/** * Git signal extractor (ADR-11). * * Runs `git log` as a subprocess against the source repo root, parses * the output into commit records with per-commit file lists, and * returns them newest-first. Also captures the current HEAD SHA for * atlas staleness detection. * * Full re-extract every call — see ADR-11's "Git signal is * re-extracted in full each run" discussion. Subprocess is seconds, * not minutes, even on large histories, so SHA-incremental logic * would be complexity for no latency win. * * Non-git repos (no `.git/` ancestor) yield an empty commit list and * a null HEAD SHA. Extraction completes; the bundle silently omits * the git block for every symbol. This is the documented * "git absence is legitimate state" branch. */ export interface GitCommit { /** Full SHA (40 chars). */ sha: string; /** ISO-8601 author date, e.g. "2026-04-12T14:02:11+00:00". */ date: string; /** Commit subject (first line of the message only). */ message: string; /** Author email. */ authorEmail: string; /** * Paths touched in this commit, relative to the source root. * Sorted ascending for deterministic storage / export. */ files: string[]; } export interface GitExtractionResult { /** HEAD SHA at the time of extraction, or null when repo is not a git tree. */ headSha: string | null; /** Commits newest-first. Empty when repo is not a git tree. */ commits: GitCommit[]; } export interface GitExtractorOptions { /** Absolute path to the source repo root. */ repoRoot: string; /** Max commits to retrieve. Default 500 per ADR-11. */ commitLimit?: number; /** Override the `git` binary. Default `"git"`. */ gitBinary?: string; } export declare const DEFAULT_COMMIT_LIMIT = 500; /** * Run `git log` and return parsed commits plus HEAD SHA. * Never throws on missing git or non-git directory — returns the * "no git" shape instead. */ export declare function extractGitSignal(options: GitExtractorOptions): GitExtractionResult; /** * Parse the output of `git log --pretty=format:%H\x1f%aI\x1f%ae\x1f%s --name-only`. * * Output shape (commits separated by blank lines; last commit has no * trailing blank line): * * \x1f\x1f\x1f * path/one.ts * path/two.ts * * \x1f... * path/three.ts * * Exported for unit testing. */ export declare function parseGitLog(stdout: string): GitCommit[]; //# sourceMappingURL=git-extractor.d.ts.map