/**
 * AgentRegistry - 에이전트 실행 이력 영속 저장 (SQLite)
 * 세션 재시작 시 복구, 통계, 크래시 감지
 */
export interface AgentExecution {
    id: string;
    taskId: string;
    agentName: string;
    prompt?: string;
    result?: string;
    status: 'pending' | 'running' | 'completed' | 'failed';
    duration?: number;
    model?: string;
    startedAt: number;
    completedAt?: number;
    sessionId?: string;
    error?: string;
    createdAt?: number;
}
export interface AgentHistoryItem {
    id: string;
    taskId: string;
    agentName: string;
    status: string;
    duration: number | null;
    model: string | null;
    startedAt: number;
    completedAt: number | null;
    error: string | null;
    createdAt: number;
}
export interface AgentStatsSummary {
    totalExecutions: number;
    completed: number;
    failed: number;
    successRate: number;
    avgDuration: number;
}
export interface GlobalAgentStats {
    total: number;
    completed: number;
    failed: number;
    successRate: number;
    avgDuration: number;
    byAgent: Record<string, AgentStatsSummary>;
    byModel: Record<string, {
        count: number;
        avgDuration: number;
    }>;
}
export declare class AgentRegistry {
    private db;
    private insertStmt;
    private updateCompleteStmt;
    private updateFailStmt;
    constructor(projectPath: string);
    private initializeSchema;
    recordStart(execution: {
        id: string;
        taskId: string;
        agentName: string;
        prompt?: string;
        model?: string;
        sessionId?: string;
    }): string;
    recordComplete(id: string, result: string, duration: number): void;
    recordFailure(id: string, error: string, duration: number): void;
    getIncompleteExecutions(): AgentHistoryItem[];
    markOrphaned(olderThanMs: number): number;
    getHistory(limit?: number, agentName?: string): AgentHistoryItem[];
    getAgentStats(agentName: string): AgentStatsSummary;
    getGlobalStats(): GlobalAgentStats;
    cleanup(ttlMs?: number): number;
    close(): void;
}
//# sourceMappingURL=AgentRegistry.d.ts.map