import type { StreamChunk } from './types.js'; /** * Convert an ai-sdk agent stream to Vercel AI SDK Data Stream Protocol format * (the v4 wire that `X-Vercel-AI-Data-Stream: v1` selects and `useChat()` reads). * * Protocol prefixes: * - `0:` text delta (JSON string) * - `9:` tool call, complete (JSON: toolCallId + toolName + args) * - `a:` tool result (JSON: toolCallId + result) * - `b:` tool call streaming start (JSON: toolCallId + toolName) * - `c:` tool call delta (JSON: toolCallId + argsTextDelta) * - `e:` finish step (JSON: finishReason + usage) * - `d:` finish message (JSON: finishReason + usage) * * @see https://ai-sdk.dev/v4/docs/ai-sdk-ui/stream-protocol */ export declare function toVercelDataStream(stream: AsyncIterable): ReadableStream; /** Create a Response object with proper headers for Vercel AI SDK streaming. */ export declare function toVercelResponse(stream: AsyncIterable): Response; //# sourceMappingURL=vercel-protocol.d.ts.map