Shared provider-specific CLI resolution policies for the core runtime.
Built-in provider profiles should resolve their launch program through this module instead of duplicating discovery logic in downstream adapters.
Summary
Functions
Classifies a provider runtime failure after launch selection has already completed.
Maps a classified runtime failure to the stable public error code used across the shared provider/runtime stack.
Types
@type resolve_opt() :: {:allow_js_entrypoint, boolean()} | {:default_command, String.t()} | {:display_name, String.t()} | {:env_var, String.t() | nil} | {:execution_surface, ExternalRuntimeTransport.ExecutionSurface.t() | map() | keyword() | nil} | {:extra_keys, [atom()]} | {:install_hint, String.t() | nil} | {:known_locations, [String.t()]} | {:known_locations_first?, boolean()} | {:node_command, String.t()} | {:npm_global_bin, String.t() | nil} | {:npx_command, String.t() | nil} | {:npx_disable_env, String.t() | nil} | {:npx_package, String.t() | nil} | {:path_candidates, [String.t()]} | {:resolution_cwd, String.t() | nil}
Functions
@spec resolve(atom(), keyword(), [resolve_opt()]) :: {:ok, CliSubprocessCore.CommandSpec.t()} | {:error, CliSubprocessCore.ProviderCLI.Error.t()}
@spec resolve!(atom(), keyword(), [resolve_opt()]) :: CliSubprocessCore.CommandSpec.t()
@spec runtime_failure(atom(), term(), [runtime_failure_opt()]) :: CliSubprocessCore.ProviderCLI.ErrorRuntimeFailure.t()
Classifies a provider runtime failure after launch selection has already completed.
This covers both local transport errors (for example {:command_not_found, "gemini"}) and remote execution failures that only become visible after the
provider command is invoked over an execution surface such as SSH.
@spec runtime_failure_code(CliSubprocessCore.ProviderCLI.ErrorRuntimeFailure.t()) :: String.t()
Maps a classified runtime failure to the stable public error code used across the shared provider/runtime stack.