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:
AGENTMUX_SETTINGS_DIR, when set;- on an isolated channel (every channel but
stable, seecrate::isolated_settings_enabled), the channel’s config dir itself:<root>/channels/<ch>/config; - 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 1isolates 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:
optis the value ofAGENTMUX_ISOLATED_SETTINGS(if set) andchannelthe channel name. - settings_
dir_ for - The settings dir from its inputs, or
Nonewhen neither an explicit dir nor a config dir (with two parents, for a global channel) is known. Empty paths count as unset.