Skip to main content

Module cli_download

Module cli_download 

Source
Expand description

AgentMux’s own copy of an agent CLI that is not on npm: the pinned release file is fetched straight from the vendor’s origin, checked against a SHA-256 compiled into this registry, and unpacked next to the npm installs (<shared>/cli/<provider>/<pin>/, same lock, same completion marker). SPEC_ISOLATED_INSTALL_FOR_NON_NPM_CLIS_2026_11_05.md.

No vendor script is ever run, and a caller names only a provider id: the URL, the hash and the size all come from SPECS, so the vendor’s origin cannot swap the file and a request cannot point the install elsewhere. The layout is <dir>/bin/<cli>[.exe]; crate::backend::cli_install finds it the same way it finds an npm shim.

Structs§

Asset
One downloadable file for one platform.
DownloadSpec

Enums§

Archive
DownloadError

Statics§

SPECS
Grok and Muse Code are pinned below: each asset carries the hash taken for it.

Functions§

download_bin
<dir>/bin/<cli>, .exe on Windows.
download_spec
The download install for provider_id, if AgentMux has one.
install_into
Download, verify, unpack and publish into the install dir. The caller holds the install lock and has cleared leftovers. A failure removes the partial dir, so nothing unmarked is left behind.
install_managed_cli
Install provider_id’s pinned copy, async: take the cross-instance lock (blocking, off the runtime), reuse a finished install another instance made while this one waited, otherwise clear leftovers and install. resolvecli’s path; install.start polls the lock itself (it must stay cancellable) and calls install_managed_into once it holds it.
install_managed_into
Install into the install dir; the caller holds the lock and has cleared leftovers. A failure removes the partial dir, so nothing unmarked is left.
is_managed_install
Whether AgentMux installs provider_id itself without npm: a pinned release download.