Skip to content

Commit b9fa9b9

Browse files
committed
fix: gate streamable HTTP transport on not(local) feature
1 parent 55876cb commit b9fa9b9

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

crates/rmcp/src/transport.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub use auth::{
107107
// pub mod ws;
108108
#[cfg(feature = "transport-streamable-http-server-session")]
109109
pub mod streamable_http_server;
110-
#[cfg(feature = "transport-streamable-http-server")]
110+
#[cfg(all(feature = "transport-streamable-http-server", not(feature = "local")))]
111111
pub use streamable_http_server::tower::{StreamableHttpServerConfig, StreamableHttpService};
112112

113113
#[cfg(feature = "transport-streamable-http-client")]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub mod session;
2-
#[cfg(feature = "transport-streamable-http-server")]
2+
#[cfg(all(feature = "transport-streamable-http-server", not(feature = "local")))]
33
pub mod tower;
44
pub use session::{SessionId, SessionManager};
5-
#[cfg(feature = "transport-streamable-http-server")]
5+
#[cfg(all(feature = "transport-streamable-http-server", not(feature = "local")))]
66
pub use tower::{StreamableHttpServerConfig, StreamableHttpService};

crates/rmcp/src/transport/streamable_http_server/tower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl<S, M> Clone for StreamableHttpService<S, M> {
204204
impl<RequestBody, S, M> tower_service::Service<Request<RequestBody>> for StreamableHttpService<S, M>
205205
where
206206
RequestBody: Body + Send + 'static,
207-
S: crate::Service<RoleServer>,
207+
S: crate::Service<RoleServer> + Send + 'static,
208208
M: SessionManager,
209209
RequestBody::Error: Display,
210210
RequestBody::Data: Send + 'static,

crates/rmcp/tests/test_sse_concurrent_streams.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(not(feature = "local"))]
12
/// Tests for concurrent SSE stream handling (shadow channels)
23
///
34
/// These tests verify that multiple GET SSE streams on the same session

crates/rmcp/tests/test_streamable_http_json_response.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(not(feature = "local"))]
12
use rmcp::transport::streamable_http_server::{
23
StreamableHttpServerConfig, StreamableHttpService, session::local::LocalSessionManager,
34
};

crates/rmcp/tests/test_streamable_http_priming.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![cfg(not(feature = "local"))]
12
use std::time::Duration;
23

34
use rmcp::transport::streamable_http_server::{

crates/rmcp/tests/test_streamable_http_stale_session.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#![cfg(all(
22
feature = "transport-streamable-http-client",
33
feature = "transport-streamable-http-client-reqwest",
4-
feature = "transport-streamable-http-server"
4+
feature = "transport-streamable-http-server",
5+
not(feature = "local")
56
))]
67

78
use std::{collections::HashMap, sync::Arc};

0 commit comments

Comments
 (0)