export type GhRunner = (args: string[], options: { cwd: string; env: NodeJS.ProcessEnv; }) => Promise; /** * `gh` on the server's PATH, else a common absolute location. Relative PATH entries are skipped: * gh runs with the target worktree as cwd, where a relative path could name a checkout file. */ export declare function locateGh(env: NodeJS.ProcessEnv, fallbacks?: readonly string[]): Promise; /** * The environment gh runs in: the server's, without the blackboard credentials, and without * GH_REPO, which would point gh at a repository other than the validated worktree's. */ export declare function ghEnvironment(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv; /** A runner that locates gh once, on first use, from the server's environment. */ export declare function createGhRunner(serverEnv: NodeJS.ProcessEnv, locate?: (env: NodeJS.ProcessEnv) => Promise): GhRunner;