//#region src/utils/sse-parser.d.ts
/**
 * SSE (Server-Sent Events) Response Parser
 *
 * Shared utility for parsing SSE responses from the chat API.
 * Used by EvaluationService, Slack integration, and other consumers.
 *
 * Handles multiple response formats:
 * - OpenAI-compatible chat completion chunks
 * - Vercel AI SDK data stream format (text-delta)
 * - Error operations and events
 */
interface ParsedSSEResponse {
  text: string;
  error?: string;
}
/**
 * Parse SSE (Server-Sent Events) response from chat API
 * Handles text deltas, error operations, and other data operations
 *
 * Supports:
 * - OpenAI-compatible format: `chat.completion.chunk` with `delta.content`
 * - Vercel AI SDK format: `text-delta` with `delta`
 * - Vercel AI SDK format: `text-start` and `text-end` markers (ignored)
 * - Error operations: `data-operation` with `type: 'error'`
 * - Direct error events: `type: 'error'`
 *
 * Ignores:
 * - `data-operation` events (metadata, not content)
 * - `text-start` and `text-end` markers
 * - `[DONE]` markers
 */
declare function parseSSEResponse(sseText: string): ParsedSSEResponse;
//#endregion
export { ParsedSSEResponse, parseSSEResponse };