Skip to main content

Module exe

Module exe 

Source
Expand description

Executable discovery (spec §20): an explicit configured override, then the absolute entries of PATH.

Structs§

Found
A discovered executable.

Enums§

ExecutableStatus
Where agents resolved an agent’s executable to (SP5a design §3). Each variant is a listed fact, not an error.
Hit 🔒
What a PATH directory holds for an agent.
Origin
Where a discovered executable came from.

Constants§

SHELL_EXTENSIONS 🔒
Extensions std would run through a shell or that need an interpreter: refused on every platform (spec §23.2, SP2 design §7.2).

Functions§

discover
Finds name for agent: the explicit override when given, otherwise the first absolute PATH directory that holds it. A shell script or a Windows shim is refused with a hint naming config_file.
has_shell_extension 🔒
Whether the file name ends in a shell extension. Trailing spaces and dots are ignored first, because Windows strips them when it opens or launches the path (codex.cmd runs codex.cmd through cmd.exe).
is_executable 🔒
not_installed 🔒
repository_local
Finds name through the RELATIVE entries of path_var, each resolved against cwd, in order; the first native (or, on Windows, unsupported) form wins. Absolute entries are skipped. Never runs anything.
search_dir 🔒
search_path 🔒
unsupported 🔒