/**
 * Git-backed signal sources for the AgentWorktreeReaper. Kept separate from the
 * classifier so the reaper stays unit-testable with fakes; the merged-detection
 * is itself a standalone, fake-git-testable function.
 *
 * All queries are read-only (SafeGitExecutor.readSync). The single destructive
 * op — `git worktree remove` — goes through SafeGitExecutor.execSync.
 */
import type { AgentWorktreeReaperDeps } from './AgentWorktreeReaper.js';
/** Read-only git executor signature (injected so this module is testable). */
export type ReadGit = (args: string[], cwd: string) => string;
/**
 * Resolve the canonical default branch ref that exists locally, preferring the
 * upstream remote. Returns null when none resolve (→ callers treat merged as
 * unknown and KEEP).
 */
export declare function resolveBaseRef(readGit: ReadGit, repo: string): string | null;
/**
 * True when EVERY commit unique to `branchSha` already has an equivalent patch
 * in `baseRef` — i.e. the branch's content is in the default branch. Uses
 * `git cherry` (patch-id equivalence), which catches fast-forward, merge-commit,
 * rebased, and single-commit-squash merges. A multi-commit squash-merge is NOT
 * detected (its commits' individual patch-ids differ from the squashed commit) →
 * reported NOT merged → KEPT. Conservative by design: it never false-positives
 * "merged", so the reaper never deletes unmerged work.
 */
export declare function isBranchMerged(readGit: ReadGit, repo: string, baseRef: string, branchSha: string): boolean;
/**
 * Build the production git/fs-backed deps for the AgentWorktreeReaper.
 * `worktreesDir` bounds which `git worktree list` entries are considered (the
 * agent's `.worktrees/`); the main checkout and any out-of-tree worktrees are
 * excluded.
 */
export declare function makeAgentWorktreeReaperDeps(opts: {
    instarRepo: string;
    worktreesDir: string;
    readGit?: ReadGit;
    /** Override the process-cwd scanner (testing). Returns the set of worktree
     *  ROOT paths that currently have a live process cwd inside them. */
    cwdRoots?: () => Set<string>;
    now?: () => number;
}): AgentWorktreeReaperDeps;
//# sourceMappingURL=agentWorktreeGit.d.ts.map