Skip to content

Function: processMastraStream()

processMastraStream(options): Promise<void>

Parse Mastra agent SSE (data: … lines) and invoke onChunk per event. Mirrors @mastra/client-js’s internal reader without the processChatResponse_vNext side channel that throws when a resumed approve-tool-call stream emits tool-result without a new tool-call.

(chunk) => void | Promise<void>

AbortSignal

ReadableStream<Uint8Array<ArrayBufferLike>>

Promise<void>