/** Per-call limits: the child is killed after `timeout` ms, and output past `maxBuffer` bytes fails. */ type CommandLimits = { timeout?: number; maxBuffer?: number; }; /** A text-mode command runner: argv in, stdout out. Rejects on a non-zero exit. */ export type RunTextCommand = (args: string[], limits?: CommandLimits) => Promise; /** The `child_process.execFile` shape `createCommandRunner` wraps — injectable for tests. */ export type ExecFileText = (command: string, args: string[], options?: { env: NodeJS.ProcessEnv; } & CommandLimits) => Promise<{ stdout: string; }>; /** * Builds a `RunTextCommand` bound to a fixed binary. The default `exec` wraps `execFile` via * `promisify` so a test can inject a fake without spawning a real process; `runGh`/`runGit` below * are this factory applied to the two binaries this module cares about. `buildEnv` maps the * parent environment to the one the child is spawned with (identity by default). */ export declare function createCommandRunner(command: string, exec?: ExecFileText, buildEnv?: (env: NodeJS.ProcessEnv) => NodeJS.ProcessEnv): RunTextCommand; /** Runs `gh` and returns its stdout, with `CLICOLOR_FORCE` removed so `--json` output stays plain. */ export declare const runGh: RunTextCommand; /** Runs `git` and returns its stdout. */ export declare const runGit: RunTextCommand; export {};