type ExecFileResult = { stdout?: string | Buffer; }; export type ExecFileAsyncLike = (file: string, args: string[], options: { cwd: string; encoding: "utf-8"; }) => Promise; export interface GitContext { cwd: string; repo: string; repoRoot?: string; branch?: string; dirty?: boolean; dirtyFileCount?: number; } export interface GitDynamicState { /** Current branch, omitted when detached/unknown/not in a repo. */ branch?: string; /** Dirty flag, omitted when `git status` could not be read. */ dirty?: boolean; /** Number of changed/untracked entries when dirty state is known. */ dirtyFileCount?: number; /** True when any git probe failed; callers should treat omitted values as unknown. */ probeFailed: boolean; } export declare function probeGitBranch(cwd?: string, runner?: ExecFileAsyncLike): Promise; export declare function probeGitDynamic(cwd?: string, runner?: ExecFileAsyncLike): Promise; export declare function probeGitContext(cwd?: string, runner?: ExecFileAsyncLike): Promise; export interface GitContextCache { get(): Promise; peek(): GitContext | null; clear(): void; } export declare function createGitContextCache(loader: () => Promise): GitContextCache; export {};