import type { StreamingUpdate } from '../agent/types';
import { type OutputLanguage } from './outputLanguage';
export type UpdateEmitter = (update: StreamingUpdate) => void;
export interface SdkToolResultBlock {
    toolUseId?: string;
    result: unknown;
    isError?: boolean;
}
export declare function extractSdkToolResultBlocks(msg: any): SdkToolResultBlock[];
export declare function stringifySdkToolResult(result: unknown): string;
/** Return type for createSseBridge — message handler + accumulated answer accessor. */
export interface SseBridge {
    handleMessage: (msg: any) => void;
    /** Returns all text classified as answer_token during this stream.
     *  Used as fallback when the SDK terminal `result` message is empty (e.g. timeout). */
    getAccumulatedAnswer: () => string;
    /**
     * Forces any pending text buffer into answer_token mode.
     * Useful when a stream is cancelled before the SDK emits the assistant/result
     * message that would normally disambiguate and flush the final answer text.
     */
    flushPendingAnswer: () => void;
}
/**
 * Creates a bridge function that translates Agent SDK messages into
 * SmartPerfetto StreamingUpdate events for SSE forwarding to the frontend.
 */
export declare function createSseBridge(emit: UpdateEmitter, language?: OutputLanguage): SseBridge;
//# sourceMappingURL=claudeSseBridge.d.ts.map