/**
 * SSE protocol contract between the Python backend and the TS client.
 *
 * This file defines every SSE event type that /api/llm/stream can emit.
 * It is the single source of truth. If the Python backend changes an event
 * shape, this file must change first, and both sides' tests must be updated.
 *
 * Counterpart: backend/server/routes/llm_stream.py (_sse_event, _stream_llm)
 */
import type { ThinkingLevel } from '../../core/index.js';
export interface SSETextStart {
    content_index: number;
}
export interface SSETextDelta {
    content_index: number;
    delta: string;
}
export interface SSEThinkingStart {
    content_index: number;
}
export interface SSEThinkingDelta {
    content_index: number;
    delta: string;
}
export interface SSEThinkingEnd {
    content_index: number;
    signature: string;
}
export interface SSEThinkingRedacted {
    content_index: number;
    signature: string;
}
export interface SSEToolCallStart {
    content_index: number;
    id: string;
    name: string;
}
export interface SSEToolCallDelta {
    content_index: number;
    delta: string;
}
export interface SSEToolCallEnd {
    content_index: number;
    id: string;
    name: string;
    arguments: string;
}
export interface SSEDone {
    stop_reason: string;
    usage: Record<string, number>;
}
export interface SSEError {
    message: string;
}
/**
 * Full content block with citations from Anthropic's API.
 * Emitted alongside text_delta events when the text block carries
 * citation metadata (web search results, document page/char citations).
 */
export interface SSEContentBlock {
    content_index: number;
    type: 'text';
    text: string;
    citations: Array<Record<string, unknown>>;
}
/**
 * Parse a single SSE event block (lines between double-newlines) into
 * its event name and JSON data string. Returns null if the block is
 * incomplete or malformed.
 */
export declare function parseSSE(lines: string[]): {
    event: string;
    data: string;
} | null;
/** Effort level accepted by the Shortcut LLM proxy. */
export type EffortLevel = 'low' | 'medium' | 'high' | 'max';
/** Map ThinkingLevel to backend effort levels. 'off' is absent — handled by callers. */
export declare const THINKING_TO_EFFORT: Partial<Record<ThinkingLevel, EffortLevel>>;
//# sourceMappingURL=sse-protocol.d.ts.map