/** * SSE stream parser for SPM Cloud Functions. * * All Cloud Functions respond with Server-Sent Events (text/event-stream). * Frame format: * data: {"type":"started"}\n\n * data: {"type":"chunk","content":"...","fullContent":"..."}\n\n * data: {"type":"complete","fullContent":"{...}"}\n\n * data: {"type":"error","message":"..."}\n\n * data: {"type":"status","message":"..."}\n\n */ export interface SseFrame { type: 'started' | 'chunk' | 'complete' | 'error' | 'status'; content?: string; fullContent?: string; message?: string; raw?: unknown; } /** * Consumes an SSE response stream and returns the parsed final JSON result. * Mirrors the parsing logic from src/lib/api/agent.ts. */ export declare function parseSseResponse(response: Response): Promise;