import { EventEmitter } from 'events';
export interface FileSnapshot {
    path: string;
    content: string;
    existed: boolean;
}
export interface Checkpoint {
    id: string;
    timestamp: Date;
    description: string;
    files: FileSnapshot[];
    workingDirectory: string;
}
export interface CheckpointManagerOptions {
    maxCheckpoints?: number;
    autoCheckpoint?: boolean;
}
/**
 * Checkpoint Manager for saving and restoring file states
 */
export declare class CheckpointManager extends EventEmitter {
    private checkpoints;
    private maxCheckpoints;
    private autoCheckpoint;
    private workingDirectory;
    constructor(options?: CheckpointManagerOptions);
    /**
     * Create a new checkpoint
     */
    createCheckpoint(description: string, files?: string[]): Checkpoint;
    /**
     * Create a checkpoint before modifying a file
     */
    checkpointBeforeEdit(filePath: string, description?: string): Checkpoint;
    /**
     * Create a checkpoint before creating a file
     */
    checkpointBeforeCreate(filePath: string, description?: string): Checkpoint;
    /**
     * Snapshot multiple files
     */
    private snapshotFiles;
    /**
     * Rewind to a specific checkpoint
     */
    rewindTo(checkpointId: string): {
        success: boolean;
        restored: string[];
        errors: string[];
    };
    /**
     * Rewind to the last checkpoint
     */
    rewindToLast(): {
        success: boolean;
        restored: string[];
        errors: string[];
        checkpoint?: Checkpoint;
    };
    /**
     * Get all checkpoints
     */
    getCheckpoints(): Checkpoint[];
    /**
     * Get a specific checkpoint by ID
     */
    getCheckpoint(id: string): Checkpoint | undefined;
    /**
     * Get the last N checkpoints
     */
    getRecentCheckpoints(count?: number): Checkpoint[];
    /**
     * Clear all checkpoints
     */
    clearCheckpoints(): void;
    /**
     * Delete a specific checkpoint
     */
    deleteCheckpoint(id: string): boolean;
    /**
     * Check if auto-checkpoint is enabled
     */
    isAutoCheckpointEnabled(): boolean;
    /**
     * Enable or disable auto-checkpoint
     */
    setAutoCheckpoint(enabled: boolean): void;
    /**
     * Format checkpoint for display
     */
    formatCheckpoint(checkpoint: Checkpoint): string;
    /**
     * Format all checkpoints for display
     */
    formatCheckpointList(): string;
    /**
     * Generate a unique checkpoint ID
     */
    private generateId;
    /**
     * Get statistics about checkpoints
     */
    getStats(): {
        count: number;
        totalFiles: number;
        oldestTimestamp?: Date;
        newestTimestamp?: Date;
    };
    /**
     * Dispose and cleanup resources
     */
    dispose(): void;
}
export declare function getCheckpointManager(options?: CheckpointManagerOptions): CheckpointManager;
export declare function resetCheckpointManager(): void;
