export declare class CiWorktreeError extends Error { readonly exitCode: number; constructor(message: string, exitCode?: 1 | 2); } /** Parent directory for ephemeral CI worktrees (`RUNNER_TEMP` in Actions, else OS tmp). */ export declare function ciWorktreeScratchParent(): string; export declare function gitRepoRoot(cwd: string): string; /** Consumer path relative to the repository root (`.` when already at root). */ export declare function consumerRelativeFromRepoRoot(repoRoot: string, consumerCwd: string): string; export declare function worktreeRunCwd(worktreePath: string, consumerRel: string): string; export declare function assertResolvableCommit(sha: string, cwd: string): void; /** Force the consumer checkout onto `--head` without ever checking out `--base`. */ export declare function ensureConsumerAtHead(repoRoot: string, head: string): void; export declare class CiProcessExit { readonly exitCode: number; constructor(exitCode: number); } export declare class CiWorktreeSession { private readonly repoRoot; private readonly scratchParent; private readonly worktrees; private disposed; constructor(repoRoot: string, scratchParent?: string); scratchRoot(): string; /** Add (or return) a detached worktree at `sha` under the scratch parent. */ addDetached(sha: string, label: string): string; remove(label: string): void; dispose(): void; }