Transport adapter that speaks the thread-centric protocol over HTTP
commands plus SSE event streams. Bound to a specific threadId
at construction. Each openEventStream call opens an independent
filtered SSE connection via POST /threads/:thread_id/stream/events.
class ProtocolSseTransportAdapterThread ID this transport is bound to.
Shuts down the transport and releases any underlying resources.
Streams incoming protocol messages from the remote peer. Used by WebSocket transports where all events share one connection.
Opens the underlying connection (e.g. WebSocket handshake). For HTTP/SSE transports this is a no-op.
Opens an independent filtered SSE event stream.
Each call creates a new server connection with the given filter.
Returns undefined when the transport does not support per-subscription
streams (e.g. WebSocket), in which case the caller should fall back to
command-based subscriptions over events.
Sends a command and optionally returns an immediate response.