Expand description
The Connectors → Remotes list (SPEC_REMOTES_PANE_2026_10_05.md §4.6): every remote machine AgentMux knows about, one record each, built from what srv already keeps:
- the hosts named in
~/.ssh/config(ssh_config); - the per-connection settings (
settings.json→connections); - recent connections (
remote-recent.json, kept here, §4.5); - WSL distributions (
wsl); - each connection’s status (
status); - where the helper is, and each host’s platform (
helper_hosts); - which agents may use a host (
agent_access); - the last count of durable sessions seen on a host (kept here).
Building the list never opens an ssh connection.
Structs§
- Inputs
- Everything
buildreads, gathered bylist. - Recent
Entry - One SSH connection that has reached
connected. - Recent
File 🔒
Constants§
- MAX_
RECENT - Recent connections kept; the least recently used goes first.
- RECENT_
FILE 🔒 - TOUCH_
EVERY_ 🔒MS - A connection already recent is re-written at most this often.
Statics§
Functions§
- apply_
connection_ values - Apply
valuestoconnection’s entry in the rawconnectionsobject ofsettings.json: anullremoves a key, an entry left empty is removed. Works on the raw JSON, so keys AgentMux doesn’t know survive untouched. - build
- One record per remote, by name (the pane sorts them into sections).
- check_
connection_ entry - Refuse an edit that would leave
connection’s entry unreadable (a string wheredisplay:pinnedwants a boolean, say): the write would land on disk while the live config silently kept the old values. - forget_
recent forget_recent_inunder this instance’s config dir.- forget_
recent_ in - Forget
connectionfrom the recent list. Returns whether it was there. - identify 🔒
- The canonical name and kind of a connection name, or
Noneforlocal. - list
- The list now, for
RemotesList.settingsisFullConfigType::connections. - note_
sessions - Remember how many durable sessions
connection’s host had when last listed (the list never opens ssh to count them). - platform_
of uname -sm→ platform.- publish_
change - Tell every open Connectors → Remotes its list changed.
- read_
recent 🔒 - recent_
in - The recent list, most recently used first.
- recent_
path 🔒 - record_
recent record_recent_inunder this instance’s config dir, now. Best effort.- record_
recent_ in - Record that
connection(SSH only) was used atnow_ms. Returns whether the list changed (a new entry); touching an existing one is written at most once a minute. - session_
counts 🔒 - ssh_
name 🔒 - write_
recent 🔒