import { Checkpoint, StageResult, Finding, AgentPhase, SerializedAgentState } from '../types';
export interface CheckpointManagerConfig {
    checkpointDir?: string;
    retentionMs?: number;
    maxCheckpointsPerSession?: number;
}
/**
 * 检查点管理器实现
 */
export declare class CheckpointManager {
    private config;
    private checkpointDir;
    constructor(config?: CheckpointManagerConfig);
    /**
     * 创建检查点
     */
    createCheckpoint(sessionId: string, stageId: string, phase: AgentPhase, stageResults: StageResult[], findings: Finding[], additionalState?: Partial<SerializedAgentState>): Promise<Checkpoint>;
    /**
     * 保存检查点到磁盘
     */
    private saveCheckpoint;
    /**
     * 生成检查点 ID
     */
    private generateCheckpointId;
    /**
     * 加载检查点
     */
    loadCheckpoint(sessionId: string, checkpointId: string): Promise<Checkpoint | null>;
    /**
     * 获取会话的最新检查点
     */
    getLatestCheckpoint(sessionId: string): Promise<Checkpoint | null>;
    /**
     * 列出会话的所有检查点
     */
    listCheckpoints(sessionId: string): Promise<Checkpoint[]>;
    /**
     * 获取检查点对应的阶段结果
     */
    getStageResults(sessionId: string, checkpointId: string): Promise<StageResult[]>;
    /**
     * 清理旧检查点（保留最新的 N 个）
     */
    private cleanupOldCheckpoints;
    /**
     * 删除检查点
     */
    deleteCheckpoint(sessionId: string, checkpointId: string): Promise<void>;
    /**
     * 清理会话的所有检查点
     */
    clearSession(sessionId: string): Promise<void>;
    /**
     * 清理过期检查点
     */
    cleanupExpired(): Promise<number>;
    /**
     * 获取会话目录路径
     */
    private getSessionDir;
    /**
     * 确保目录存在
     */
    private ensureDirectory;
    /**
     * 检查会话是否有可恢复的检查点
     */
    canResume(sessionId: string): Promise<boolean>;
    /**
     * 获取可恢复的会话列表
     */
    listRecoverableSessions(): Promise<string[]>;
    /**
     * 获取检查点统计信息
     */
    getStats(): Promise<{
        totalSessions: number;
        totalCheckpoints: number;
        oldestCheckpoint: number | null;
        newestCheckpoint: number | null;
    }>;
}
export default CheckpointManager;
//# sourceMappingURL=checkpointManager.d.ts.map