Expand description
ProgressSink implementation that publishes MCP notifications/progress
JSON-RPC messages onto a per-request channel. The HTTP handler wires the
receiver end into an SSE stream that ships events back to the client.
Shape of the emitted JSON-RPC message follows the MCP spec:
{
"jsonrpc": "2.0",
"method": "notifications/progress",
"params": {
"progressToken": <u64>,
"progress": <u64>,
"total": <u64 | null>,
"message": "<optional string>"
}
}§Dual-fanout (M4)
In addition to the per-request SSE channel, McpProgressSink can also
publish a ProgressEvent onto the session’s shared broadcast channel
(see session::SessionState::events). That second fanout is what feeds
the V2 Code tab’s inline status-card strip: the external CLI drives the
request, but the Construct UI reads the same events via the session-wide
stream regardless of who is talking to the daemon.
Broadcast send errors (no live receivers) are intentionally ignored — progress events are advisory and must never block a tool invocation.
Structs§
- McpProgress
Sink - Sink used for a single in-flight
tools/callJSON-RPC request.