/** * A single Server-Sent Event frame, parsed from a `text/event-stream` body. * * Only the two fields LLM gateways use in practice are surfaced: the optional * `event:` name and the (possibly multi-line) `data:` payload. Comment lines * (`:`-prefixed) and `id:` / `retry:` fields are consumed and ignored. */ export interface SseEvent { /** The `event:` field, if the frame declared one. */ event?: string | undefined; /** The concatenated `data:` payload (multiple `data:` lines joined by `\n`). */ data: string; } /** * Frame a `text/event-stream` response body into {@link SseEvent}s. * * Standalone and dependency-free so the gateway template ships its own * framing — every built-in chat provider streams through a vendor SDK, so * there is no shared framer to reuse. Handles `\n` and `\r\n` line endings, * multi-line `data:` payloads, and back-pressure-friendly chunk boundaries * (an event split across two network reads is buffered until complete). * * Aborts cleanly: when `signal` fires, the reader is cancelled and iteration * ends. A trailing event with no terminating blank line is still yielded once * the stream closes. */ export declare function parseSseStream(body: ReadableStream, signal?: AbortSignal): AsyncGenerator; //# sourceMappingURL=sse.d.ts.map