interface CallableBridge { isConnected: boolean; call(method: string, params: Record): Promise; } export interface GitSnapshotConfig { enabled: boolean; paths: string[]; snapshot_dir: string; } export interface Snapshot { treeHash: string; projectDir: string; gitDir: string; workTree: string; paths: string[]; /** Absolute paths that existed at snapshot time. Used to diff on rollback. */ tracked: Set; } /** * Snapshot the given paths (relative to projectDir) into a shadow bare git repo. * Returns a handle that can be passed to `restoreSnapshot` to reset those paths. * Throws if any required tool (git) is missing. */ export declare function takeSnapshot(projectDir: string, paths: string[], snapshotDir: string): Snapshot; /** * Restore the snapshotted paths. Files that were added after the snapshot are * removed; files that were modified are reverted; files that existed at * snapshot time are restored to their snapshot contents. */ export declare function restoreSnapshot(snap: Snapshot): { changedPaths: string[]; }; /** * Best-effort call to reload_package on every Content-rooted .uasset / .umap * that changed during restore, so the editor drops stale in-memory copies. */ export declare function reloadAffectedPackages(bridge: CallableBridge, projectDir: string, changedPaths: string[]): Promise<{ reloaded: number; errors: number; }>; /** * Delete snapshot refs older than `maxAgeMs`. Call opportunistically so the * shadow repo doesn't grow unboundedly. */ export declare function pruneOldSnapshots(snapshotDir: string, maxAgeMs: number): void; export {};