/** * Git snapshot capture and restore for conversation revert. * Captures HEAD, branch, and working tree state before each turn. */ export interface GitSnapshot { /** Current HEAD commit hash */ head: string; /** Current branch name */ branch: string; /** Stash ref for uncommitted changes (undefined if clean tree) */ stash?: string; } /** * Check if the current directory is inside a git repository. */ export declare function isGitRepo(cwd?: string): Promise; /** * Capture a snapshot of the current git state: HEAD, branch, and working tree. * Uses `git stash create -u` to capture uncommitted changes (including untracked files) * without modifying the working tree. * * Never throws - returns null if not in a git repo or on failure. */ export declare function captureSnapshot(cwd?: string): Promise; export interface RestoreResult { success: boolean; warning?: string; error?: string; } /** * Restore git state from a snapshot. * 1. Checkout the branch * 2. Reset to the snapshot HEAD * 3. Apply stashed changes if any * * If only stash apply fails, returns success with a warning. */ export declare function restoreSnapshot(snapshot: GitSnapshot, cwd?: string): Promise; //# sourceMappingURL=snapshots.d.ts.map