Skip to main content

Module agent_names

Module agent_names 

Source
Expand description

Reading an instance’s /agentmux/reactive/agent-names answer: the names a LAN peer’s poll (and the Swarm’s ask of this machine’s other channels) list, and each listed agent’s state and summary line, for the Swarm’s remote rows (SPEC_SWARM_OTHER_HOSTS_AND_CHANNELS_2026_10_02.md §3.4 Phase 4).

Structs§

PeerAgents 🔒
What an instance’s /agentmux/reactive/agent-names answer says about its agents.

Functions§

apply_agent_names_poll 🔒
Applies one poll of a peer’s agent-names route to its entry, and says whether what the frontend shows changed. A failed poll keeps the last-known names, since a flapping list is worse than a slightly old one, but clears the states and lines: mDNS can keep the peer looking fresh long after it stopped answering, and its last “working” would otherwise show indefinitely (#4703).
parse_agent_names_body 🔒
Reads an agent-names body: the names, capped as above, and each listed agent’s state from agent_status ({name: {state, since_ms}}). A state for a name the body doesn’t list, or one this build doesn’t know, is dropped, so the map is never larger than the name list. The same goes for agent_lines ({name: line}). A body from a build before agent_status gives names only.