import type { StreamPart } from '../types/stream.js'; /** * One `StreamPart` sequence covering every variant `harnessToUIMessageStream` * maps, so three independently-written serialisers can be compared against a * single input. * * Scope note: only seven variants carry `channel: 'client'` at the type level * (`text-*`, `conversation-outcome`, `error`, `done`). The rest are `internal` * and reach a browser only under `streamFilter: 'all'` — but the canonical * adapter maps them, so a serialiser that drops them is still divergent. The * fixture therefore follows the adapter's switch, not the channel tag. * * `error` is deliberately last: the adapter throws `ClientStreamError` on it, * which terminates the stream. Placing it earlier would truncate everything * after it and hide the very drift this fixture exists to expose. */ export declare const ALL_CLIENT_STREAM_PARTS: StreamPart[]; /** * Drains an SSE `ReadableStream` into parsed frame objects. * * The SSE decoding is the AI SDK's `parseJsonEventStream` rather than a * hand-rolled splitter — it already handles chunk boundaries, the `[DONE]` * sentinel, and malformed frames, and it is the same parser the SDK's own * clients use, so the test decodes the wire exactly as a real consumer does. * * Frames are compared whole rather than by `type` alone: the divergences this * exists to catch include a missing `id` on text frames and differently-named * `data-*` parts, both of which a type-only comparison would wave through. */ export declare function drainSSEFrames(stream: ReadableStream): Promise>>; /** Wraps a plain array as the `AsyncIterable` the adapters consume. */ export declare function asStreamPartSource(parts?: readonly StreamPart[]): AsyncGenerator;