/** * GitPort is the seam for git operations on isolated worktrees. The real * implementation shells out to git CLI; tests use a fake ProcessRunner. */ /** * Thrown by commit() when there is nothing staged to commit. This is a distinct * type (not a generic Error) so callers can distinguish "the worker produced no * new changes" — a recoverable, defer-to-verifier condition — from a real git * failure. A stage whose scope an earlier stage already satisfied legitimately * has nothing new to commit; that must not abort the whole pipeline. */ export declare class NoChangesToCommitError extends Error { readonly worktree: string; constructor(worktree: string); } export interface GitPort { /** Create an isolated worktree at /.worktrees/ on a new branch (default diablo/, or the given branch), cut from baseBranch. Returns the absolute worktree path. */ worktreeAdd(issue: string, baseBranch: string, branch?: string): Promise; /** Stage all changes in the worktree and commit with the given message. Returns the resulting commit SHA (full 40-char). */ commit(worktree: string, message: string): Promise; /** Return the current HEAD SHA (full) of the worktree. */ headSha(worktree: string): Promise; /** Return `git diff --stat` output for the worktree against baseBranch. */ diffStat(worktree: string, baseBranch: string): Promise; /** Return the file paths changed by a single commit (handles root commits). */ committedFiles(worktree: string, sha: string): Promise; }