Repository navigation
Description
Context
Split out of #626 (MCP transport/spec parity). Investigation (see comment on #626) found that @jimhoyd/urlcode-mcp's remaining gap — the Streamable HTTP transport's optional GET/SSE stream for server-initiated messages, plus Mcp-Session-Id session resumption — cannot land as a package-only change: HandlerResult (the generic extension response type every runtime target implements) is a single buffered {status, headers, body?} every host awaits in full. There is no streaming seam anywhere in prepareResponse/writeResponse, and no session/connection registry in core for resumption to build on.
Findings on feasibility per target
packages/core/src/server.tsandvercel.tsboth sit on realnode:httpServerResponseobjects — chunked/long-lived writes are architecturally reachable, but need their own admission/timeout treatment (the currentrequestTimeoutMs/maxInFlightRequestsare tuned for short buffered requests, not long-lived streams).packages/core/src/aws.tsis a genuine structural blocker: classic Lambda payload-format-2.0 (one JSON event in, onePromise<LambdaResponse>object out). Real Lambda response streaming needsawslambda.streamifyResponse()with an entirely different handler signature (Function URLs +RESPONSE_STREAM) — not an incremental change.- Cloudflare is out of scope entirely:
packages/core/src/extensions.ts'sprepareExtensionshard-asserts extensiontargetscan only benode/aws/vercel— Workers don't runRuntimeExtensions at all today, so this was never reachable there regardless of streaming.
Suggested split
- This issue: a core-only PR adding an additive streaming capability, consumed only by
server.ts/vercel.ts, explicitly refused (not silently ignored) onaws, reported throughcapabilities.ts's existingnative/delegated/refusedvocabulary, with its ownRIM-*card indocs/RUNTIME-IMPLEMENTATION.md. - Follow-up,
packages/mcp-only: consume the new capability for the GET/SSE stream plus a boundedMcp-Session-Idregistry withLast-Event-IDreplay, proven with real reconnect-after-restart tests. (Tracked as the remainder of [Request]: full MCP transport/spec parity for @jimhoyd/urlcode-mcp (streaming, batching, pagination, resources/prompts) #626.)
Not a commitment
Per the ai-first/evidence-gathering pattern this repo uses elsewhere: this issue records the investigation so the design isn't re-derived from scratch next time, not a decision to implement. A maintainer should confirm the split above (or propose a different one) before either PR is attempted.
Activity
jimhoyd commentedon Sep 24, 2026
Decision (owner, 2026-09-24): parked. No current tool needs progress or log streaming. Reopen the decision when a real tool does; the first step would then be SSE replies to POST for progress/logging on node (vercel delegated, aws refused).
jimhoyd commentedon Sep 26, 2026
Decision (owner, 2026-09-26): un-parked. Build streaming generically, with the MCP use in the same pull request.
functionroutes.sandbox: trueroutes are refused; the isolated worker keeps returning whole buffered answers, unchanged.httpand is supported the same way.capabilities.ts's native/delegated/refused vocabulary.RIM-*card plus docs and tests.notifications/progress, and the optional GET/SSE server stream.Mcp-Session-Idregistry withLast-Event-IDreplay.Generated by Claude Code
Streaming responses for extensions and trusted functions, and the opt…