import type { GitChangedFile, GitChurnSummary, GitCochangeSummary, GitCommitHistory, GitDiffHunks, GitDiffPatch, GitDiffSummary, GitFileHistoryEntry, GitFileHistory, GitRange } from './types.js';
import type { ResolveDiffRangeOptions } from './client.js';
export interface GitContextOptions extends ResolveDiffRangeOptions {
    paths?: readonly string[];
    excludePaths?: readonly string[];
    /**
     * Rebase diff paths to `repoRoot` and limit output to its subtree
     * (`git diff --relative`). Without this, a diff taken from a repository
     * subdirectory reports toplevel-relative paths that resolve to nonexistent
     * files when joined to the subdirectory root — the changed-focus repo map's
     * silent no-op.
     */
    relative?: boolean;
}
export interface GitPatchOptions extends GitContextOptions {
    tokenBudget?: number;
    tokenizer?: string;
}
export interface GitHistoryOptions extends GitContextOptions {
    limit?: number;
    since?: string;
    /**
     * 'range' (default) aggregates over the resolved diff range (base..HEAD),
     * which is empty on a clean tree that sits exactly on its base branch.
     * 'history' aggregates over full HEAD history instead — pair it with
     * `since` to bound the window. Honored by `getGitCommitHistory`,
     * `getGitChurnSummary`, and `getGitCochange`; `getGitFileHistory` always
     * logs full HEAD history, so the option is a no-op there.
     */
    scope?: 'range' | 'history';
}
export interface GitFileHistoryOptions extends GitHistoryOptions {
    path: string;
    follow?: boolean;
    lineRange?: {
        start: number;
        end: number;
    };
}
export interface GitChurnOptions extends GitHistoryOptions {
    sort?: 'churn' | 'commits' | 'added' | 'deleted' | 'net';
}
export interface GitCochangeOptions extends GitHistoryOptions {
    target?: string;
    maxCommitFiles?: number;
}
export declare function parseLineHistory(output: string): GitFileHistoryEntry[];
export declare function resolveGitRange(options?: ResolveDiffRangeOptions): Promise<GitRange>;
export declare function getGitChangedFiles(options?: GitContextOptions): Promise<GitChangedFile[]>;
/**
 * Files present in the working tree that git is not tracking, honoring
 * `.gitignore` and the other standard exclude sources.
 *
 * Every other API here reads a diff, and a diff by definition cannot see an
 * untracked file — so callers that need the *whole* working state (entity
 * blame on a brand-new file, for instance) previously had no way to learn such
 * a file existed. Directories are expanded to their files rather than reported
 * as a single entry, so the result is always a list of paths that can be read.
 */
export declare function getGitUntrackedFiles(options?: GitContextOptions): Promise<string[]>;
export declare function getGitDiffSummary(options?: GitContextOptions): Promise<GitDiffSummary>;
export declare function getGitDiffPatch(options?: GitPatchOptions): Promise<GitDiffPatch>;
export declare function getGitDiffHunks(options?: GitContextOptions): Promise<GitDiffHunks>;
export declare function getGitDiffFunctionContext(options?: GitContextOptions): Promise<GitDiffHunks>;
export declare function getGitCommitHistory(options?: GitHistoryOptions): Promise<GitCommitHistory>;
export declare function getGitFileHistory(options: GitFileHistoryOptions): Promise<GitFileHistory>;
export declare function getGitChurnSummary(options?: GitChurnOptions): Promise<GitChurnSummary>;
export declare function getGitCochange(options?: GitCochangeOptions): Promise<GitCochangeSummary>;
