/**
 * Operation History Tool
 *
 * Tracks file operations and provides undo/redo capabilities.
 * Persists history to disk for recovery across sessions.
 *
 * Inspired by hurry-mode's operation history capabilities.
 */
import { HistoryEntry, FileSnapshot, HistoryConfig, FileOperation, RollbackData } from "./types.js";
/**
 * Operation History Manager
 */
export declare class OperationHistory {
    private config;
    private history;
    private currentPosition;
    private persistPath;
    private vfs;
    constructor(config?: Partial<HistoryConfig>);
    /**
     * Initialize history (load from disk)
     */
    initialize(): Promise<void>;
    /**
     * Record a new operation
     */
    record(description: string, operations: FileOperation[], rollbackData: RollbackData[]): Promise<string>;
    /**
     * Record a file snapshot before modification
     */
    recordSnapshot(filePath: string): Promise<FileSnapshot | null>;
    /**
     * Undo the last operation
     */
    undo(): Promise<{
        success: boolean;
        entry?: HistoryEntry;
        error?: string;
    }>;
    /**
     * Redo the last undone operation
     */
    redo(): Promise<{
        success: boolean;
        entry?: HistoryEntry;
        error?: string;
    }>;
    /**
     * Jump to a specific history point
     */
    goToHistoryPoint(targetIndex: number): Promise<{
        success: boolean;
        error?: string;
    }>;
    /**
     * Get history entries
     */
    getHistory(limit?: number): HistoryEntry[];
    /**
     * Get entry at specific index
     */
    getEntry(index: number): HistoryEntry | undefined;
    /**
     * Get entry by ID
     */
    getEntryById(id: string): HistoryEntry | undefined;
    /**
     * Get current position
     */
    getCurrentPosition(): number;
    /**
     * Check if can undo
     */
    canUndo(): boolean;
    /**
     * Check if can redo
     */
    canRedo(): boolean;
    /**
     * Clear all history
     */
    clear(): Promise<void>;
    /**
     * Restore file from rollback data
     */
    private restoreFromRollback;
    /**
     * Execute an operation (for redo)
     */
    private executeOperation;
    /**
     * Enforce maximum entries
     */
    private enforceMaxEntries;
    /**
     * Save history to disk
     */
    private save;
    /**
     * Load history from disk
     */
    private load;
    /**
     * Format history for display
     */
    formatHistory(limit?: number): string;
    /**
     * Create unique ID
     */
    private createId;
    /**
     * Get statistics
     */
    getStats(): {
        totalEntries: number;
        currentPosition: number;
        canUndo: boolean;
        canRedo: boolean;
        oldestEntry: Date | null;
        newestEntry: Date | null;
    };
}
/**
 * Create an operation history manager
 */
export declare function createOperationHistory(config?: Partial<HistoryConfig>): OperationHistory;
export declare function getOperationHistory(): OperationHistory;
export declare function resetOperationHistory(): void;
