Expand description
Shell integration script deployment and shell startup configuration.
Embeds shell integration scripts (bash, zsh, pwsh, fish) and deploys them to
~/.agentmux/shell/<type>/ on first use or when the version changes.
The shell controller uses these scripts to install prompt hooks that send
OSC 16162;E commands carrying AGENTMUX_AGENT_ID, enabling per-pane title
and color to work.
Structs§
- Shell
Startup - Shell startup configuration: extra args and env vars to inject.
Enums§
Constants§
- BASH_
SCRIPT 🔒 - FISH_
SCRIPT 🔒 - MUXCLIENT_
JS 🔒 - Shared auth-env-read + authenticated-fetch plumbing every core above
(except muxlog, which does no REST calls) imports via a relative
./lib/muxclient.mjs— so it must be deployed at<shell>/lib/, not flat beside its callers. See docs/specs/SPEC_MUXSH_FULL_COLLECTION_2026_09_16.md §2.8. - MUXLOG_
JS 🔒 - Shared muxlog core (Node). Deployed once at
<shell>/muxlog.mjs; every shell’smuxlogfunction delegates to it. One tested implementation does log discovery + NDJSON rendering + filtering for all shells. - MUXOPEN_
JS 🔒 - muxopen — launch an agent into a pane from a terminal (the constructive
sibling of the stop verbs; REPORT_AGENT_OPEN_API_GAP_2026_09_06.md).
Deployed beside muxlog.mjs/muxspect.mjs; shell
muxopenfunctions delegate here. - MUXSH_
JS 🔒 - muxsh — open editor/browser panes from a terminal
(REPORT_WSH_STYLE_CLI_FOR_AGENT_APP_API_2026_09_16.md,
SPEC_MUXSH_CLI_2026_09_16.md). Deployed beside its three siblings; shell
muxshfunctions delegate here. - MUXSPECT_
JS 🔒 - Shared muxspect core (Node) — muxlog’s live-state sibling. Deployed once
at
<shell>/muxspect.mjs; every shell’smuxspectfunction delegates to it. See docs/specs/SPEC_MUXSPECT_LIVE_INTROSPECTION_TOOL_2026_08_01.md. - PWSH_
SCRIPT 🔒 - ZSH_
SCRIPT 🔒
Functions§
- deploy_
scripts - detect_
shell_ type - Detect shell type from the shell binary path.
- documented_
shell_ root - The stable, user-facing script root:
~/.agentmux/shell. - get_
shell_ startup - Get the startup configuration for launching an interactive shell with
AgentMux integration. Returns
Nonefor unknown shell types. - integration_
base integration_base_forbound to this process’s real data dir and home.- integration_
base_ for - Deploy shell integration scripts into
<shell_root>/<type>/. Skips deployment if the version marker is already current. Errors are logged but not fatal — a missing script just means no integration. Root under which this instance’s shell-integration scripts are deployed. - version_
marker 🔒 - Deployment marker:
<package version>-<content hash>, NOT the bare package version alone (codex P2 on PR #2380). Local/dev builds routinely iterate on these embedded scripts WITHOUT a version bump (this repo’s own convention — see CLAUDE.md’s “Build versioning — local builds are labeled, not versioned”), so a version-only marker left.versionalready matching on every same-version rebuild/restart, silently skipping deployment of a newly-added or newly-edited script (muxspect.mjs specifically, added in the same PR that added the startup call site — the marker never invalidated to pick it up). Hashing the actual embedded content means ANY change to ANY script forces a redeploy regardless of whether the package version moved, while an unchanged rebuild still skips the (cheap, but not free) disk writes.