import type { ParsedSSEEvent } from './tui-types.js';
/**
 * Consume an SSE stream from a `ReadableStream<Uint8Array>` (Node.js 22+ fetch body).
 *
 * Parses the standard SSE wire format:
 *   event: <name>\n
 *   data: <json>\n
 *   id: <id>\n
 *   \n
 *
 * Calls `onEvent` for each complete event block.
 */
export declare function consumeSSEStream(body: ReadableStream<Uint8Array>, onEvent: (event: ParsedSSEEvent) => void, signal?: AbortSignal): Promise<void>;
/** Parse SSE data field as JSON, returning null on failure. */
export declare function parseSSEData<T = unknown>(data: string): T | null;
