Expand description
Unified data-path resolution for AgentMux.
Single source of truth for where state lives on disk. Replaces the launcher / host / sidecar trio of independent path computations (see docs/specs/SPEC_DATA_DIR_UNIFICATION_2026-05-05.md §3) and the per-version isolation pattern it set up (data was keyed on the build version so My Agents reset on every patch bump). The current model keys data on a channel — a stable identifier that spans versions within the same compat band, so agents survive rebuilds. See docs/specs/SPEC_DATA_CHANNELS_2026_05_24.md and discussion #1026 for the channel design and rationale.
Layout:
~/.agentmux/
├── shared/ (cookies, credentials, account-wide)
├── channels/<channel>/ (installed + portable + custom)
│ ├── data/, config/, logs/, cef-cache/, agents/
│ └── runtime/ (lock + IPC, single instance per channel)
└── dev/<branch>/ (per-branch dev isolation)
└── (same children as channels/<channel>/)Channel resolution (via DataPaths::resolve):
AGENTMUX_CHANNEL=<name>env override wins forInstalled/Portablemodes — lets the operator point a released binary at any channel for parallel-channel testing.RuntimeMode::Installed/Portablew/o override → build-time default fromAGENTMUX_BUILD_CHANNEL_DEFAULT(set by the packaging script; defaults to"stable"if unset, e.g. forcargo run).RuntimeMode::Dev { branch }→ channel name isdev-<branch>for diagnostics; on-disk path stays at~/.agentmux/dev/<branch>/(NOT underchannels/). Both the host (agentmux-cef) and launcher (agentmux-launcher) useDataPaths::resolve_path_onlyfor dev builds to ignoreAGENTMUX_CHANNEL— a dev session launched from inside a parent agentmux pane mustn’t inherit the parent’s channel and break per-branch isolation. Channel override is intentionally NOT supported in dev mode; if you want a different channel, use a portable build.
Structs§
- Data
Paths - All paths a launcher / host / srv needs. Computed once by the launcher; downstream binaries read paths from env vars set by the launcher rather than recomputing (avoids the legacy desync risk where each binary made its own portable / dev-mode determination).