/**
 * Server-Sent Events framing.
 *
 * A clean re-derivation of the WHATWG HTML "event stream" interpretation rules
 * (https://html.spec.whatwg.org/multipage/server-sent-events.html), restricted
 * to the subset that LLM providers actually transmit:
 *
 *   - The byte stream is decoded as UTF-8.
 *   - It is split into lines on LF, CR, or CRLF.
 *   - Lines are grouped into events; a blank line dispatches the buffered event.
 *   - Each non-blank line is `field`, `field: value`, or `field:value`; a single
 *     leading space after the colon is stripped from the value.
 *   - `event` sets the event type (default "message"); `data` lines accumulate,
 *     joined by `\n`; a line that begins with `:` is a comment and is ignored.
 *   - Fields we do not consume (`id`, `retry`) are parsed and discarded.
 *
 * Only events that carried at least one `data` field are yielded.
 */
/** One dispatched server-sent event: its type and its accumulated data payload. */
export interface ServerEvent {
    readonly event: string;
    readonly data: string;
}
/**
 * Decode an SSE response body into a stream of {@link ServerEvent}s.
 *
 * @param body   The response's byte stream.
 * @param signal Optional abort signal; when aborted, iteration stops promptly
 *               with an `aborted` {@link GatewayError}.
 */
export declare function sseEvents(body: ReadableStream<Uint8Array>, signal?: AbortSignal): AsyncGenerator<ServerEvent>;
