Skip to main content

Module settings_path

Module settings_path 

Source
Expand description

Where a channel’s settings.json lives: one answer for srv, the host and the launcher (#1903).

srv loads and watches <settings dir>/settings.json, where the settings dir is:

  1. AGENTMUX_SETTINGS_DIR, when set;
  2. on an isolated channel (every channel but stable, see crate::isolated_settings_enabled), the channel’s config dir itself: <root>/channels/<ch>/config;
  3. on a global channel (stable), two levels above the config dir: <root>/channels, the file every global channel shares.

The config dir already sits under the resolved AgentMux root, so a AGENTMUX_HOME_OVERRIDE carries through. The host and the launcher used to answer this themselves: the host seeded channels/stable/config/settings.json, which srv never reads on stable, and its window settings fell back to the real ~/.agentmux/channels/settings.json under an override.

Constants§

ISOLATED_SETTINGS_ENV
1 isolates the channel’s settings, any other value shares them.
SETTINGS_DIR_ENV
Explicit settings dir; wins over everything else.
SETTINGS_FILE
The settings file’s name inside its dir.

Functions§

isolated_settings_reason_for
The isolation rule, with its inputs passed in: opt is the value of AGENTMUX_ISOLATED_SETTINGS (if set) and channel the channel name.
settings_dir_for
The settings dir from its inputs, or None when neither an explicit dir nor a config dir (with two parents, for a global channel) is known. Empty paths count as unset.