resolve_shared_registry_dir

Function resolve_shared_registry_dir 

Source
pub fn resolve_shared_registry_dir() -> Option<PathBuf>
Expand description

Resolve the GLOBAL <home>/shared/agents/registry/ directory.

P0.3 re-roots the named-instance registry from the old channel-scoped channels/<ch>/agents/registry/ (which walked AGENTMUX_DATA_DIR up three levels and so landed inside the current channel) to the channel-independent ~/.agentmux/shared/. An agent named in one channel is then visible in every channel, exactly like the definition store (resolve_shared_definitions_dir) — the two are now siblings under shared/agents/.

The base directory that instance working_directory values are stored relative to is tracked separately (the Store’s registry_agents_base, fed from AGENTMUX_AGENTS_DIR) — it must stay the current channel’s agents dir even though the registry files are now global.

Returns None only if the global shared root can’t be resolved — caller treats this as “registry disabled,” no write attempts.