/**
 * Turn Diff Tracker (Codex-inspired)
 *
 * Tracks file changes per agent turn for easy rollback.
 * Before each tool execution that modifies files, snapshots
 * the file state. After the turn, records what changed.
 */
export interface FileSnapshot {
    path: string;
    content: string | null;
    mtime: number | null;
}
export interface FileDiff {
    path: string;
    action: 'created' | 'modified' | 'deleted';
    before: string | null;
    after: string | null;
}
export interface TurnRecord {
    turnId: number;
    timestamp: number;
    snapshots: FileSnapshot[];
    diffs: FileDiff[];
    toolName?: string;
}
/**
 * Tracks file changes across agent turns for rollback support.
 */
export declare class TurnDiffTracker {
    private turns;
    private currentTurn;
    private turnCounter;
    private maxTurns;
    constructor(options?: {
        maxTurns?: number;
    });
    /**
     * Start tracking a new turn.
     */
    startTurn(toolName?: string): number;
    /**
     * Snapshot a file before it gets modified.
     * Call this before any file write/edit/delete operation.
     */
    snapshotFile(filePath: string): void;
    /**
     * End the current turn. Computes diffs by comparing snapshots to current state.
     */
    endTurn(): TurnRecord | null;
    /**
     * Rollback a specific turn — restore all files to their pre-turn state.
     */
    rollback(turnId: number): {
        restored: string[];
        errors: string[];
    };
    /**
     * Get the diff summary for a turn.
     */
    getTurnSummary(turnId: number): string | null;
    /**
     * Get all recorded turns.
     */
    getTurns(): TurnRecord[];
    /**
     * Get the last N turns.
     */
    getRecentTurns(count?: number): TurnRecord[];
    /**
     * Get total number of files changed across all turns.
     */
    getStats(): {
        turns: number;
        filesChanged: number;
        created: number;
        modified: number;
        deleted: number;
    };
}
