Expand description
Installing AgentMux’s helper (agentmux-remote) on an SSH host, for
durable sessions (spec §6.2 of
SPEC_REMOTE_TERMINALS_AND_DURABLE_SESSIONS_2026_10_02.md).
- Probe the host over the pane’s own ssh:
uname -sm, and whether this version’s helper is already at~/.agentmux-remote/bin/<version>/. - Get the matching static build from this package, which carries all four
(
tools/remote/<target>/, spec §9.1; on macOS the Linux builds sit inContents/Resources/remote/<target>/). A developer can pointAGENTMUX_REMOTE_HELPER_DIRat their own builds (scripts/build-remote-helpers.shwrites the same layout). - Upload it over that ssh (
cat >a temp file in an owner-only folder; no scp or sftp needed on the host), check its hash there, thenchmod 700and move it into place.
Every remote script runs under sh -c '...', so it works whatever the
user’s login shell is.
Structs§
- Probe
- What a probe found.
Constants§
Functions§
- asset_
name - The flat name a build had as a release asset,
agentmux-remote-<version>-<target>. Still accepted inAGENTMUX_REMOTE_HELPER_DIRbeside the packaged layout. - candidate_
paths 🔒 - The paths to try for
target, in order:dev_dir(AGENTMUX_REMOTE_HELPER_DIR) alone when it is set, else this package’s. - ensure
- Put this version’s helper on
hostif it is not there (spec §6.2): probe the platform (recorded underconnectionfor Connectors → Remotes), get the matching build (checked against the release’s hashes), upload it over ssh, check its hash there, move it in.tagnames this install’s own temp file (letters, digits,-,_), so two installs on one host never touch each other’s upload.announcehears the size just before the upload, for whoever is waiting to say what is happening. - install_
command - Checks the uploaded file’s hash; on a match makes it the helper, else
removes it. Prints
okormismatch <hash>. - local_
build - This version’s build for
target, and its hash: fromAGENTMUX_REMOTE_HELPER_DIRwhen set (a developer’s own builds), else from this package (spec §9.1). Nothing is downloaded. - packaged_
paths - Where a package keeps the build for
target, relative to srv’s own folder (exe_dir):tools/remote/<target>/beside the other bundled tools, or, in a macOS app,../Resources/remote/<target>/, because the bundle seal only allows Mach-O code underContents/MacOSand the Linux builds are data there. - parse_
probe - Read a probe’s output.
- probe_
command - Prints
uname -sm, then this version’s helper’sversionline if it is installed and runs. - read_
first 🔒 - remote_
dir 🔒 - The helper’s folder on the host, relative to the remote home.
- remove_
command - Removes the helper from the host (SPEC_REMOTES_PANE_2026_10_05.md §4.9):
ends every session each installed version’s daemon holds, then deletes
~/.agentmux-remote. The daemon, with no sessions left, exits on its own. Printsok. - sh 🔒
- One remote command:
sh -c '<script>', single-quoted for whatever shell the user logs in with. - sha256_
hex - target_
for - The helper’s build target for
uname -smoutput (Linux x86_64,Darwin arm64, …).Nonefor a platform without a build. - temp_
name 🔒 - Reads the binary from stdin into a temp file in an owner-only folder.
A temp file of this install’s own (
tag: the pane’s session id, letters, digits,-and_), so two panes installing on one host at once never write, check or remove each other’s upload. - upload_
command