export interface GitResult { readonly code: number; readonly stdout: string; readonly stderr: string; } export declare function runGit(cwd: string, args: readonly string[]): Promise; export declare function listWorktreesPorcelain(repo: string): Promise; /** * Default branch detection: `origin/HEAD` symbolic ref first, then a local * `main`, then `master`. Mirrors the prototype's fallback chain. */ export declare function detectDefaultBranch(repo: string): Promise; /** `git merge-base --is-ancestor ` — the merged oracle. */ export declare function isMerged(repo: string, ref: string, defaultBranch: string): Promise; export declare function isDirty(worktreePath: string): Promise; /** Never uses `--force`: git itself refuses dirty and locked worktrees. */ export declare function removeWorktree(repo: string, worktreePath: string): Promise; export declare function pruneWorktrees(repo: string): Promise; export declare function resolveRepoRoot(cwd: string): Promise;