import { IQwenpawParseState, IQwenpawSseEvent, IQwenpawStreamChunk, QwenpawTextMode } from './qwenpaw.type'; export declare const createQwenpawParseState: () => IQwenpawParseState; /** Feed one SSE `data:` payload — exported for tests. */ export declare const parseQwenpawDataLine: (line: string) => IQwenpawSseEvent | null; /** Text from `output[]` — NON-reasoning items only. */ export declare const extractEventText: (event: IQwenpawSseEvent) => string; /** Human message from an event's error field (object or bare string). */ export declare const extractEventError: (event: IQwenpawSseEvent) => string; /** Normalize one wire event into a UI chunk (null = nothing to render). */ export declare const toStreamChunk: (event: IQwenpawSseEvent, textMode: QwenpawTextMode, state: IQwenpawParseState) => IQwenpawStreamChunk | null; /** * Read the SSE body line-by-line and emit normalized chunks. Resolves * when the stream ends; throws `Error(message)` on a `failed` event. */ export declare const iterateQwenpawEvents: (body: ReadableStream, onChunk: (chunk: IQwenpawStreamChunk) => void, textMode?: QwenpawTextMode, onRawEvent?: (raw: string) => void) => Promise; //# sourceMappingURL=stream.d.ts.map