/**
 * Git traceability — capture branch, commit, changed files, PR URLs, CI snapshots locally.
 */
import type { Database } from "bun:sqlite";
import { getTaskTraceability, type CiSnapshot, type TaskCommit, type TaskTraceabilityReport } from "../db/task-commits.js";
export declare const GIT_TRACEABILITY_SCHEMA_VERSION = "todos.git_traceability.v1";
export interface GitCommitInfo {
    sha: string;
    message: string;
    author: string;
    committed_at: string;
    files_changed: string[];
    branch: string | null;
    repo_path: string | null;
}
export interface LinkGitTraceInput {
    task_id: string;
    sha?: string;
    branch?: string;
    pr_url?: string;
    pr_number?: number;
    pr_state?: string;
    release_tag?: string;
    ci_snapshot_path?: string;
    ci_snapshot?: CiSnapshot;
    cwd?: string;
    traceability?: Record<string, unknown>;
}
export declare function resolveGitRoot(cwd?: string): string | null;
export declare function getCurrentBranch(cwd?: string): string | null;
export declare function getHeadSha(cwd?: string): string | null;
export declare function inspectGitCommit(sha: string, cwd?: string): GitCommitInfo | null;
export declare function loadCiSnapshot(path?: string): CiSnapshot | null;
/** Try gh CLI for PR info on current branch (local gh auth, no hosted todos API). */
export declare function detectPrForBranch(branch: string, cwd?: string): {
    pr_url: string;
    pr_number: number;
    pr_state: string;
} | null;
export declare function linkTaskGitTrace(input: LinkGitTraceInput, db?: Database): TaskCommit;
export declare function formatTraceabilityReport(report: TaskTraceabilityReport): string;
export { getTaskTraceability };
//# sourceMappingURL=git-traceability.d.ts.map