/** * Bounded SSE line parser for the inline wire path. Handles `event:` and * `data:` fields, multi-line data, CRLF, comments, and trailing events * without a final blank line; unknown fields are ignored and oversized * individual events are rejected. * @module dsh-github-copilot/sse */ /** Upper bound on one incomplete SSE event, in bytes. */ export declare const MAX_SSE_EVENT_BYTES: number; /** Stable error raised when one incomplete SSE event exceeds its byte bound. */ export declare class SseEventSizeError extends Error { readonly limit: number; constructor(); } /** One parsed SSE event; `type` falls back to `message`. */ export interface SseEvent { readonly type: string; readonly data: unknown; } /** * Parse an SSE byte stream into typed events. * @param body - the response body stream. * @returns an async generator of parsed events. * @throws on invalid JSON or when one event exceeds * {@link MAX_SSE_EVENT_BYTES}. */ export declare function parseSse(body: ReadableStream): AsyncGenerator; //# sourceMappingURL=sse.d.ts.map