Skip to main content

Module tool_store

Module tool_store 

Source
Expand description

Tool store: ensures CLI tools (jq, rg, etc.) are available to agent subprocesses. Reads a bundled catalog JSON, checks system/bundled/managed install paths, and can download + verify tools on demand.

Structs§

PlatformSpec
ToolCatalog
ToolSpec
ToolStatusEntry

Enums§

ToolStatus
UserToolsPrecedence
Where the user tools dir goes relative to the existing PATH. The bundled dir always goes first: it is app-owned and version-locked, and a stale system copy shadowing it is the exit-130 trap (RETRO_BASHWRAP_STALE_BUNDLE_2026_06_13.md).

Constants§

CATALOG_JSON 🔒

Functions§

bashwrap_path
The agentmux-bashwrap agents’ Bash commands run through: the bundled copy, else the user tools dir’s (where task dev puts it), in the order tools_path puts them on PATH. An absolute path, so a stale copy elsewhere on PATH can never be the one that runs (RETRO_BASHWRAP_STALE_BUNDLE_2026_06_13.md).
bundled_tools_dir
Returns the bundled tools bin dir: <exe_dir>/tools/bin/.
compose_tools_path
existing with the given tool dirs added (bundled first, user per user_precedence). None when neither dir is given, so the caller can leave PATH untouched.
current_platform
Returns the platform key for the current compile target.
downloads_dir 🔒
Returns ~/.agentmux/tools/downloads/.
get_tool_statuses
Get the install status of every tool in the catalog.
install_tool
Download, verify, and install a single tool by ID into the user-managed store (~/.agentmux/tools/bin/).
load_catalog
Load and parse the embedded catalog.
probe_system_path 🔒
Returns true if name can be found on the system PATH.
probe_version 🔒
Run cmd --version-arg and extract the first version-looking token. Returns Some(version_string) on success, None if the command fails or the output contains no recognisable version token.
system_path_of 🔒
Returns the system PATH location of name, or None.
tools_path
compose_tools_path over the tool dirs that exist on this machine.
user_tools_dir
Returns ~/.agentmux/tools/bin/.