export type OutputFormat = 'text' | 'stream-json';
export interface StreamSystemInit {
    type: 'system';
    subtype: 'init';
    cwd: string;
    session_id: string;
    tools: string[];
    mcp_servers: string[];
    model: string;
    permissionMode: string;
    slash_commands: string[];
    apiKeySource: string;
    output_style: string;
    uuid: string;
}
export interface StreamMessage {
    type: 'assistant' | 'user';
    message: {
        id?: string;
        type: 'message';
        role: 'assistant' | 'user';
        model?: string;
        content: Array<{
            type: 'text' | 'tool_use' | 'tool_result';
            text?: string;
            id?: string;
            name?: string;
            input?: any;
            tool_use_id?: string;
            content?: string;
        }>;
        stop_reason?: string | null;
        stop_sequence?: string | null;
        usage?: {
            input_tokens: number;
            cache_creation_input_tokens?: number;
            cache_read_input_tokens?: number;
            cache_creation?: {
                ephemeral_5m_input_tokens?: number;
                ephemeral_1h_input_tokens?: number;
            };
            output_tokens: number;
            service_tier?: string;
        };
    };
    parent_tool_use_id: string | null;
    session_id: string;
    uuid: string;
}
export interface StreamResult {
    type: 'result';
    subtype: 'success' | 'error';
    is_error: boolean;
    duration_ms: number;
    duration_api_ms: number;
    num_turns: number;
    result: string;
    session_id: string;
    total_cost_usd: number;
    usage: {
        input_tokens: number;
        cache_creation_input_tokens?: number;
        cache_read_input_tokens?: number;
        output_tokens: number;
        server_tool_use?: {
            web_search_requests: number;
        };
        service_tier?: string;
    };
    permission_denials: any[];
    uuid: string;
}
export declare class OutputHandler {
    private format;
    options: {
        model?: string;
        tools?: string[];
        mcpServers?: string[];
        cwd?: string;
    };
    private sessionId;
    private startTime;
    private turnCount;
    private finalResult;
    private totalUsage;
    constructor(format?: OutputFormat, options?: {
        model?: string;
        tools?: string[];
        mcpServers?: string[];
        cwd?: string;
    });
    /**
     * Initialize stream-json session
     */
    initializeSession(tools: string[], mcpServers?: string[], model?: string): void;
    /**
     * Output a complete message
     */
    outputMessage(role: 'assistant' | 'user', content: string, usage?: any, toolCalls?: any[]): void;
    /**
     * Output a tool call as a message
     */
    outputToolCallMessage(toolCall: any): void;
    /**
     * Output a tool call (legacy method for text format)
     */
    outputToolCall(toolName: string, args: any): void;
    /**
     * Output a tool result
     */
    outputToolResult(toolUseId: string, result: any): void;
    /**
     * Output an error
     */
    outputError(error: string | Error): void;
    /**
     * Output completion signal
     */
    outputComplete(usage?: any, apiDuration?: number): void;
    /**
     * Start a spinner (only for text format)
     */
    startSpinner(message: string): any;
    /**
     * Calculate approximate cost (simplified)
     */
    private calculateCost;
    /**
     * Get session ID
     */
    getSessionId(): string;
    /**
     * Update session ID (for coordination with SessionManager)
     */
    setSessionId(sessionId: string): void;
}
//# sourceMappingURL=output.d.ts.map