MCP: execute modern subscriptions through SDK listen handler
CI / UI Checks (pull_request) Successful in 11s
CI / Rust Checks (pull_request) Successful in 40m16s
CI / Rust Feature Validation (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Required Checks (pull_request) Successful in 1s
CI / Deploy (pull_request) Skipped

This commit is contained in:
bsodfather committed 2026-11-14 06:54:57 +00:00
1 parent d01bdf019c
commit 0755e6e8e8
13 files changed
+1003 -46

No files matched your search

+14 -13
View File
@@ -691,8 +691,8 @@ pub(super) async fn handle_modern_request(
);
}
};
let accepted = match filter.notifications.accepted() {
crate::protocol::FilterOutcome::Accepted(accepted) => accepted,
match filter.notifications.accepted() {
crate::protocol::FilterOutcome::Accepted(_) => {}
crate::protocol::FilterOutcome::Invalid(detail) => {
return transport_response(
StatusCode::OK,
@@ -719,18 +719,19 @@ pub(super) async fn handle_modern_request(
else {
return StatusCode::TOO_MANY_REQUESTS.into_response();
};
let acknowledged = crate::protocol::acknowledged_frame(&subscription_id, accepted);
let receiver = crate::protocol::spawn_signal_watch(
let (acknowledged, receiver) = match super::rmcp_subscriptions::start(
Arc::clone(state),
crate::protocol::Watch {
workspace_slug: path.workspace_slug.clone(),
agent_slug: path.agent_slug.clone(),
signals: accepted,
wire: crate::protocol::Wire::Modern(subscription_id),
legacy_stream: None,
deadline: None,
},
);
path.workspace_slug.clone(),
path.agent_slug.clone(),
subscription_id,
filter.notifications.into_sdk(),
super::rmcp_subscriptions::project_meta(message),
)
.await
{
Ok(stream) => stream,
Err(error) => return sdk_error_response(message, response_mode, version, error),
};
let stream = crate::protocol::frames_stream(vec![acknowledged], receiver, permit);
sse_response(StatusCode::OK, stream, None, Some(version))