Skip to main content

Module cli_handlers

Module cli_handlers 

Source

Structs§

CliNotices 🔒
The CLI notices one ResolveCli call can put in its pane (backend::cli_notice, SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_STARTUP_FILES_2026_09_30.md §6.3). A probe with no block_id (the picker, the Toolchain pane) puts nothing anywhere.

Functions§

get_cli_version 🔒
is_script_wrapper 🔒
Whether path is a Windows batch script (.cmd/.bat), which runs through cmd.exe and re-parses its arguments.
make_cli_cmd 🔒
Re-export from shared crate for internal use. Build a provider-CLI command with this instance’s identity already stripped.
notice_block_id 🔒
The pane a resolve’s notices go to: the launch target when the caller names one (a quick fork resolves from its source pane), else block_id.
pi_lists_models 🔒
pi --list-models exits 0 either way; it is signed in when it lists models rather than “No models available”.
prune_result 🔒
The wire form of a prune crate::backend::cli_prune::Run.
register_cli_handlers
Register CLI-related RPC handlers (resolvecli, checkcliauth, runclilogin).
resolve_cli_candidates_on_path 🔒
Every spawnable match for cli_command on PATH that exists, in PATH order.
resolve_cli_on_path 🔒
Resolve a CLI command on the system PATH.
resolve_provider_cli_on_path 🔒
A PATH-only provider’s CLI: on PATH, else in the folder its own installer uses (crate::backend::providers::known_install_paths), which may not be on this process’s PATH until AgentMux restarts.
run_auth_check 🔒
Run the provider auth-check CLI against auth_env and parse the verdict. Returns (authenticated, email, auth_method, raw_output). Extracted so the stale-credential self-heal can re-run the exact same check after refreshing.
spawnable_candidates 🔒
The lines of where/which output a spawn can use. On Windows that is the ones make_cli_cmd can run (.exe / .cmd / .bat), skipping e.g. the extensionless npm shell script; elsewhere which prints one path.