/**
 * ChatProcessManager — manages claude --print SDK subprocess per project.
 *
 * Key design notes:
 * - sessionManager.startSession() is called AFTER system.init is received,
 *   not immediately after spawn (JSONL file doesn't exist yet at spawn time).
 * - tool_result blocks appear in USER-role messages in SDK output, not assistant.
 * - hasTerminal() is the public API name (mirrors TerminalManager.hasTerminal).
 * - Crash restart uses 3s delay; interrupt restart is immediate (500ms).
 */
import { EventEmitter } from 'events';
import { Project } from './types';
export interface ChatStreamEvent {
    projectId: string;
    type: 'stream' | 'tool_start' | 'tool_end' | 'turn_end' | 'rate_limit' | 'status';
    delta?: string;
    contentType?: 'text' | 'thinking';
    toolName?: string;
    toolInput?: unknown;
    toolOutput?: string;
    costUsd?: number;
    resetsAt?: number;
    status?: string;
}
declare class ChatProcessManager extends EventEmitter {
    private instances;
    private restartTimers;
    start(project: Project, continueSession?: boolean): void;
    stop(projectId: string): void;
    /** Interrupt current generation and immediately restart with --continue */
    interrupt(projectId: string): void;
    sendMessage(projectId: string, text: string): boolean;
    /** Named hasTerminal for API consistency with TerminalManager */
    hasTerminal(projectId: string): boolean;
    /** Stop all running chat processes — called on server shutdown. */
    stopAll(): void;
    getLastActivityAt(projectId: string): number | null;
    private stopInternal;
    private buildArgs;
    private parseLine;
    private handleExit;
}
export declare const chatProcessManager: ChatProcessManager;
export {};
//# sourceMappingURL=chat-process-manager.d.ts.map