-
Notifications
You must be signed in to change notification settings - Fork 181
Description
This is a tracking issue for implementation of SEP-1699.
Summary
This SEP proposes changes to the Streamable HTTP transport to mitigate issues with long-running connections and improve resumability. Servers must immediately send an SSE event with an id and empty data string to prime clients for reconnection, and may disconnect at will after sending an event ID. Servers should send a retry field to prevent excessive reconnection attempts, and clients must respect this retry field. This allows servers to avoid maintaining potentially long-running connections while computing results.
The Kotlin SDK's current SSE implementation in SSEServerTransport and StreamableHttpClientTransport does not fully support this pattern. The server transport does not send initial priming events with IDs, does not include retry fields in SSE events, and maintains connections until responses are sent. The client transport already handles Last-Event-ID for resumption and supports reconnection via Ktor's SSE client, but does not explicitly handle or respect retry fields from the server. This implementation requires: server-side changes to send initial SSE events with IDs and empty data upon connection, support for including retry fields in SSE events, ability to disconnect before sending JSON-RPC responses (after sending event ID), and client-side changes to parse and respect retry fields when reconnecting. The changes should maintain backward compatibility with clients/servers that don't support this pattern.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status