import { type GitRunner } from '../project.js';
import { type LinkedPr, type PrLookup } from './gh.js';
/** A project's git status for the panel. */
export interface GitStatus {
    branch: string;
    /** Uncommitted changes present. */
    dirty: boolean;
    pr?: LinkedPr;
    /** The PR is not known yet, rather than absent (#1028): the lookup is still running. */
    prPending?: boolean;
}
/** Injectable seams so {@link readGitStatus} is unit-testable off disk. */
export interface GitStatusDeps {
    git?: GitRunner;
    pr?: PrLookup;
    /**
     * The agent's start, when the status is read for an agent's checkout (#1255). The default lookup is
     * `gh pr view`, which answers the newest PR for the branch *in any state* — so an agent on a reused
     * pinned branch (`the-framework/triage-quick`) wears a predecessor's merged PR as its own badge.
     * With `since` set the PR is picked from the branch's whole history by {@link pickAgentPr}
     * instead: an open PR, or a closed one no older than the agent itself.
     */
    since?: string;
    /** The branch's full PR history, for the {@link GitStatusDeps.since} path (default {@link cachedPrsForBranch}). */
    prs?: (cwd: string, branch: string) => Promise<LinkedPr[]>;
}
/**
 * Read a project's git status: the current branch and dirty flag (from git), plus the linked
 * PR (best-effort). Returns undefined when the path is not a git repo. Forgiving — a failed
 * `git status` reads as clean, and a failed PR lookup simply omits the PR.
 */
export declare function readGitStatus(cwd: string, deps?: GitStatusDeps): Promise<GitStatus | undefined>;
//# sourceMappingURL=git-status.d.ts.map