diff --git a/Cargo.lock b/Cargo.lock index 937f67c79..b13fee326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -344,7 +344,8 @@ dependencies = [ "rmcp", "serde", "serde_json", - "sse-stream", + "sse-stream 0.2.6", + "sse-stream 0.3.0", "thiserror 2.0.21", "tokio", "tokio-stream", @@ -6627,7 +6628,7 @@ dependencies = [ "schemars 1.2.2", "serde", "serde_json", - "sse-stream", + "sse-stream 0.2.6", "thiserror 2.0.21", "tokio", "tokio-stream", @@ -7475,6 +7476,22 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "sse-stream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d385160fc0fba84f7b9cc8ef3263e410d0e3ca7ab4927f1356df33145ace69a4" +dependencies = [ + "bytes", + "futures-util", + "http-body", + "http-body-util", + "memchr", + "pin-project-lite", + "simdutf8", + "thiserror 2.0.21", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" diff --git a/Cargo.toml b/Cargo.toml index 60987adc0..8a2d6e0ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ tokio-tungstenite = { version = "0.30.0", features = ["rustls-tls-webpki-roots"] # MCP and API clients rmcp = { version = "^3.5.1", default-features = false } -sse-stream = "0.2.6" +sse-stream = "0.3.0" async-openai = { version = "^0.42.0", features = ["byot", "chat-completion", "responses"] } reqwest = { version = "^0.13.4", default-features = false, features = ["json", "query", "rustls", "http2", "stream"] } oauth2 = "5.0" diff --git a/crates/mcp-utils/Cargo.toml b/crates/mcp-utils/Cargo.toml index 16aec25a2..3f4077d2b 100644 --- a/crates/mcp-utils/Cargo.toml +++ b/crates/mcp-utils/Cargo.toml @@ -36,6 +36,7 @@ client = [ "dep:serde", "dep:serde_json", "dep:sse-stream", + "dep:sse-stream-rmcp", "dep:tokio-stream", "dep:utils", "rmcp/transport-streamable-http-client-reqwest", @@ -60,6 +61,8 @@ reqwest = { workspace = true, optional = true } serde = { workspace = true, optional = true } serde_json = { workspace = true, optional = true } sse-stream = { workspace = true, optional = true } +# rmcp 3.5's StreamableHttpClient trait uses Sse from sse-stream 0.2.x. +sse-stream-rmcp = { package = "sse-stream", version = "0.2.6", optional = true } tokio-stream = { workspace = true, features = ["sync"], optional = true } utils = { package = "aether-utils", path = "../utils", version = "0.2.19", optional = true } diff --git a/crates/mcp-utils/src/client/sigv4.rs b/crates/mcp-utils/src/client/sigv4.rs index 1f1e85548..3d41743aa 100644 --- a/crates/mcp-utils/src/client/sigv4.rs +++ b/crates/mcp-utils/src/client/sigv4.rs @@ -6,7 +6,7 @@ use rmcp::transport::auth::AuthError; use rmcp::transport::streamable_http_client::{ SseError, StreamableHttpClient, StreamableHttpError, StreamableHttpPostResponse, }; -use sse_stream::Sse; +use sse_stream_rmcp::Sse; use std::collections::HashMap; use std::sync::Arc;