/** * The names to try for one command on this platform. * * ⚠ A command that ALREADY carries a known extension (`agy.exe`) is a complete name — appending * PATHEXT to it would look for `agy.exe.EXE` and find nothing. The membership test is * case-insensitive because Windows paths are. */ export declare function executableCandidates(command: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string[]; /** * Is `command` runnable from PATH? * * ⚠ **The `platform` argument governs the WHOLE lookup, not just the extension list.** PATH is * split and joined through `path.win32` or `path.posix` chosen by that argument, never through the * unqualified `node:path` bindings — those follow the REAL host, so a caller simulating win32 on a * POSIX host would split a `C:\a;C:\b` PATH on `:` and shred it into garbage segments while the * candidate list was correctly virtualized. Half-virtualized is worse than not virtualized: the * two halves disagree about which OS they are pretending to be, and the function returns a * confident wrong boolean. This is the Windows-versus-Linux-CI divergence class `CLAUDE.md` * repeatedly flags. * * ⚠ **A match must be a FILE.** `X_OK` has no effect on Windows — Node degrades it to `F_OK` — so * an `accessSync` check alone reports a *directory* named `codex` on PATH as an executable. The * `isFile()` test is what makes the Windows answer mean the same thing as the POSIX one. * * ⚠ Absence is the branch signal, not an exceptional condition — a missing entry is the normal * case and must never throw. */ export declare function executableOnPath(command: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string | undefined; /** Is `command` runnable from PATH? Boolean compatibility surface over the one resolving walk. */ export declare function commandExistsOnPath(command: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): boolean;