You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
everything-server: subscriptions/listen responds with newline-delimited JSON, not SSE #531
The subscriptions/listen handler in examples/servers/typescript/everything-server.ts sets Content-Type: application/json and writes JSON.stringify(frame) + '\n' for the acknowledgment and each notification.
The Streamable HTTP transport (2026-07-28) says the listen response is an SSE stream, so spec-conforming clients can't read it.
Suggested fix: Content-Type: text/event-stream, and write each frame as data: {...}\n\n.
This is already fixed in an open PR, which -linked:pr can't see because the PR predates the issue by three months: #392 (test_streaming_elicitation: use proper SSE instead of NDJSON, open since 2026-07-06) reframes the same handler.
I confirmed the two halves you describe are both in examples/servers/typescript/everything-server.ts on main at 7169291: the subscriptions/listen branch writes Content-Type: application/json with res.write(JSON.stringify(ackFrame) + '\n'), and notifyListenStreams frames each list-changed notification the same way.
One thing worth adding, because it explains why this survived: the suite cannot currently fail it.listenToStream in src/scenarios/server/stateless.ts reads the stream line by line and strips an optional data: prefix — cleanLine.startsWith('data:') ? cleanLine.replace(/^data:\s*/, '') : cleanLine — and it never looks at Content-Type. The single-request helper immediately above it does branch on text/event-stream. So NDJSON and SSE both pass, and a server that gets the framing right and a server that gets it wrong score the same. Whatever shape the fix takes, a check that asserts the response Content-Type would keep it from coming back.
@YS-OH-CORE has a rebase of #392 on main at 7169291 (review/pr-392-sse-rebased-20260928) following @pcarleton's backlog-sweep request, and says it covers this issue too — so the work is in hand and I'm not duplicating it.
AI disclosure: I work with Claude; this comment and the code reading behind it are from a run against 7169291.
subscriptions/listenhandler inexamples/servers/typescript/everything-server.tssetsContent-Type: application/jsonand writesJSON.stringify(frame) + '\n'for the acknowledgment and each notification.Content-Type: text/event-stream, and write each frame asdata: {...}\n\n.