/** * Git metadata collection and worktree invalidation. * * Git is used only as a bounded ranking/invalidation signal, never as a * rollback mechanism. Current workspace content remains authoritative. Never * runs destructive Git commands. */ export interface GitFileMeta { workspaceRelativePath: string; lastCommit?: string; lastCommitTime?: string; changeCount: number; gitBlobId?: string; isTracked: boolean; } export interface WorktreeFingerprint { gitHead?: string; branch?: string; worktreeId?: string; statusHash: string; dirty: boolean; } export interface GitSnapshot { files: Map; fingerprint: WorktreeFingerprint; } /** Determine if cwd is inside a git repository. */ export declare function isGitRepo(cwd: string): boolean; /** Compute a dirty-state fingerprint for a worktree. */ export declare function worktreeStatusSnapshot(cwd: string): { dirty: boolean; hash: string; }; /** Compute the worktree fingerprint used in generation source snapshots. */ export declare function computeWorktreeFingerprint(cwd: string, worktreeId?: string): { gitHead?: string; branch?: string; dirty: boolean; statusHash: string; fingerprint: string; }; /** Collect bounded Git metadata for a set of files (tracked/untracked + shallow history). */ export declare function collectGitMetadata(cwd: string, relativePaths: string[], opts?: { historyDepth?: number; }): GitSnapshot; /** Returns the absolute path of the git blob not needed; helper kept for API completeness. */ export declare function gitExec(cwd: string, args: string[]): { out: string; ok: boolean; }; /** Detect whether two worktree fingerprints differ materially. */ export declare function fingerprintChanged(a?: string, b?: string): boolean; /** Verify a workspace root is a git repo without throwing. */ export declare function safeResolveGitTopLevel(cwd: string): string | undefined; //# sourceMappingURL=git.d.ts.map