symfonic.platform.transport_sse_response¶
transport_sse_response ¶
ASGI-owned status choice and cleanup for native SSE turns.
The first agent event is pulled while the disconnect watcher is active and before response.start. A refusal on that pull can therefore use a real HTTP status. Once headers are sent, the existing stream projector owns the wire shape and terminal error frame.
NativeStreamResponse ¶
NativeStreamResponse(agent: Any, query: str, history: tuple[Any, ...], session_id: str, prepared: Any, *, typed: bool)
Bases: StreamingResponse
Choose status before headers and close a primed stream on every exit.