import { o as LaunchCommandSpec } from "../types-KR94Pl4P.js"; //#region src/utils/runner.d.ts /** * Pick a spawnable Windows executable from `where ` output. * * On Windows, package managers often generate multiple shims: * - `` (no extension) for Git Bash/MSYS * - `.cmd` for cmd.exe * - or a real `.exe` * * Bun's `child_process.spawn()` does not reliably resolve PATHEXT shims when * you pass the bare command name (e.g. `codex`), so we prefer explicit paths. */ declare function selectWindowsWhereCandidate(whereLines: readonly string[]): string | null; interface SpawnOptions { cwd?: string; env?: Record; args?: string[]; } interface SpawnResult { pid: number; command: string; } /** * Launch a child process * @param spec Launch command specification * @param options Additional spawn options * @returns Process ID and the full command string */ declare function spawnProcess(spec: LaunchCommandSpec, options?: SpawnOptions): Promise; /** * Check whether an executable exists on the PATH * @param name Executable name to look up */ declare function checkExecutable(name: string): Promise; /** * Retrieve the version string from an executable * @param executable Program name * @param versionArgs Arguments passed to print the version (defaults to --version) */ declare function getExecutableVersion(executable: string, versionArgs?: string[]): Promise; interface RunCommandOptions { cwd?: string; env?: Record; silent?: boolean; throwOnError?: boolean; } interface RunCommandResult { stdout: string; stderr: string; exitCode: number; success: boolean; } /** * Run a command and capture its output * Lightweight wrapper for git commands that don't need full LaunchCommandSpec * @param command Executable to run * @param args Command arguments * @param options Run options */ declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise; //#endregion export { RunCommandOptions, RunCommandResult, SpawnOptions, SpawnResult, checkExecutable, getExecutableVersion, runCommand, selectWindowsWhereCandidate, spawnProcess };