Expand description
Compatibility shim around agentmux_common::DataPaths.
Historically the launcher computed its own paths via the
launcher-local resolve_paths() function. After the data-dir
unification (see docs/specs/SPEC_DATA_DIR_UNIFICATION_2026-05-05.md
and PR #695), path resolution is centralized in
agentmux_common::DataPaths. This module keeps the launcher’s
existing public API surface (DataPaths struct with 4 fields,
resolve_paths(), ensure_dirs()) so call sites in main.rs,
diag.rs, srv_spawner.rs etc. don’t need to be rewritten — they
see the same shape, populated from the common implementation.
Field mapping:
- launcher.data_dir = common.data_dir
- launcher.config_dir = common.config_dir
- launcher.user_home_dir = common.home_dir (the agentmux root,
e.g.
~/.agentmux/, whereconfig.tomllives) - launcher.portable_root = exe_dir when mode == Portable, else None
The launcher continues to use these field names internally; the
env vars it passes to host + srv are switched in main.rs to the
canonical AGENTMUX_* names emitted by DataPaths::to_env_vars.
Structs§
- Data
Paths - Resolved per-instance paths. Compat shape — see module doc.
Functions§
- ensure_
dirs - Create every directory the launcher + srv expect to exist. Idempotent. Delegates to the common implementation.
- launcher_
saga_ log_ path - Canonical path for the launcher saga log
(
<data-dir>/db/launcher-sagas.db). Performs a one-shot back- compat migration: launcher releases prior to this change wrote the saga log directly under<data-dir>/launcher-sagas.db(with srv DBs alongside in<data-dir>/db/, an inconsistency flagged by AUDIT_SQLITE_SYSTEMS §8.3). If only the legacy path exists, move it intodb/. - launcher_
saga_ log_ path_ read_ only - Read-only resolver for the launcher saga log path. Returns
whichever location actually holds the data: the canonical
<data-dir>/db/launcher-sagas.dbif present, otherwise the legacy<data-dir>/launcher-sagas.dbif THAT exists, otherwise the canonical path (for the fresh-install case). - resolve_
paths - Resolve all paths from the launcher’s vantage point.