mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
Generated
+7
-7
@@ -6941,9 +6941,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pctx_config"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88750f27b7000e143e8b7c5703947fe9565b1a616e119513578bf08ef40fc24f"
|
||||
checksum = "c89eac48aabd3fdd2ed13839c006aff8be43f5ba70858378162551414103199d"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.22.1",
|
||||
@@ -7413,7 +7413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.14.0",
|
||||
"itertools 0.13.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.117",
|
||||
@@ -8051,9 +8051,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rmcp"
|
||||
version = "1.2.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba6b9d2f0efe2258b23767f1f9e0054cfbcac9c2d6f81a031214143096d7864f"
|
||||
checksum = "67d69668de0b0ccd9cc435f700f3b39a7861863cf37a15e1f304ea78688a4826"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.22.1",
|
||||
@@ -8086,9 +8086,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rmcp-macros"
|
||||
version = "1.2.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab9d95d7ed26ad8306352b0d5f05b593222b272790564589790d210aa15caa9e"
|
||||
checksum = "48fdc01c81097b0aed18633e676e269fefa3a78ec1df56b4fe597c1241b92025"
|
||||
dependencies = [
|
||||
"darling 0.23.0",
|
||||
"proc-macro2",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ uninlined_format_args = "allow"
|
||||
string_slice = "warn"
|
||||
|
||||
[workspace.dependencies]
|
||||
rmcp = { version = "1.2.0", features = ["schemars", "auth"] }
|
||||
rmcp = { version = "1.5.0", features = ["schemars", "auth"] }
|
||||
agent-client-protocol-schema = { version = "0.11", features = ["unstable"] }
|
||||
sacp = "11.0.0"
|
||||
arboard = "3"
|
||||
|
||||
@@ -121,7 +121,7 @@ impl McpFixtureServer {
|
||||
}
|
||||
}
|
||||
|
||||
#[tool_handler]
|
||||
#[tool_handler(router = self.tool_router)]
|
||||
impl ServerHandler for McpFixtureServer {
|
||||
fn get_info(&self) -> ServerInfo {
|
||||
InitializeResult::new(ServerCapabilities::builder().enable_tools().build())
|
||||
|
||||
@@ -443,10 +443,7 @@ async fn create_streamable_http_client(
|
||||
|
||||
let transport = StreamableHttpClientTransport::with_client(
|
||||
http_client,
|
||||
StreamableHttpClientTransportConfig {
|
||||
uri: uri.into(),
|
||||
..Default::default()
|
||||
},
|
||||
StreamableHttpClientTransportConfig::with_uri(uri),
|
||||
);
|
||||
|
||||
let timeout_duration = Duration::from_secs(resolve_timeout(timeout));
|
||||
@@ -475,10 +472,7 @@ async fn create_streamable_http_client(
|
||||
let auth_client = AuthClient::new(auth_http_client, auth_manager);
|
||||
let transport = StreamableHttpClientTransport::with_client(
|
||||
auth_client,
|
||||
StreamableHttpClientTransportConfig {
|
||||
uri: uri.into(),
|
||||
..Default::default()
|
||||
},
|
||||
StreamableHttpClientTransportConfig::with_uri(uri),
|
||||
);
|
||||
Ok(Box::new(
|
||||
McpClient::connect(
|
||||
@@ -2318,11 +2312,11 @@ mod tests {
|
||||
|
||||
fn transport_err(error: Box<dyn std::error::Error + Send + Sync>) -> ClientInitializeError {
|
||||
ClientInitializeError::TransportError {
|
||||
error: rmcp::transport::DynamicTransportError {
|
||||
transport_name: "test".into(),
|
||||
transport_type_id: std::any::TypeId::of::<()>(),
|
||||
error: rmcp::transport::DynamicTransportError::from_parts(
|
||||
"test",
|
||||
std::any::TypeId::of::<()>(),
|
||||
error,
|
||||
},
|
||||
),
|
||||
context: "test context".into(),
|
||||
}
|
||||
}
|
||||
@@ -2337,9 +2331,9 @@ mod tests {
|
||||
fn test_oauth_fallback_on_typed_auth_required() {
|
||||
let err = streamable_err(
|
||||
rmcp::transport::streamable_http_client::StreamableHttpError::AuthRequired(
|
||||
rmcp::transport::streamable_http_client::AuthRequiredError {
|
||||
www_authenticate_header: "Bearer realm=\"test\"".to_string(),
|
||||
},
|
||||
rmcp::transport::streamable_http_client::AuthRequiredError::new(
|
||||
"Bearer realm=\"test\"".to_string(),
|
||||
),
|
||||
),
|
||||
);
|
||||
assert!(should_attempt_oauth_fallback(&Err(err)));
|
||||
|
||||
@@ -330,6 +330,7 @@ impl ClientHandler for GooseClient {
|
||||
.map(|user_data| CreateElicitationResult {
|
||||
action: ElicitationAction::Accept,
|
||||
content: Some(user_data),
|
||||
meta: None,
|
||||
})
|
||||
.map_err(|e| {
|
||||
ErrorData::new(
|
||||
|
||||
@@ -115,17 +115,17 @@ pub async fn oauth_flow(
|
||||
.unwrap_or_default();
|
||||
|
||||
credential_store
|
||||
.save(StoredCredentials {
|
||||
.save(StoredCredentials::new(
|
||||
client_id,
|
||||
token_response,
|
||||
granted_scopes,
|
||||
token_received_at: Some(
|
||||
Some(
|
||||
std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.map(|duration| duration.as_secs())
|
||||
.unwrap_or(0),
|
||||
),
|
||||
})
|
||||
))
|
||||
.await?;
|
||||
|
||||
auth_manager.set_credential_store(credential_store);
|
||||
|
||||
Reference in New Issue
Block a user