Skip to main content

Module agent_line

Module agent_line 

Source
Expand description

An agent’s summary line as other instances see it: the line under its Swarm row, sent with its status on GET /agentmux/reactive/agent-names so this machine’s other channels and LAN hosts can show it on their remote rows (SPEC_SWARM_OTHER_HOSTS_AND_CHANNELS_2026_10_02.md §3.4 Phase 4).

The line is the frontend’s readSwarmSummary: the generated title when it is usable, else the CLI’s OSC title. The local row’s fallbacks (a restored title, a one-liner from the last prompt, a status phrase) are not sent.

Sent unless swarm:sharesummaries is off, by the owner’s decision of 2026-10-13 (on by default, every tier). clean_line bounds a line on both sides: a peer is untrusted.

Constants§

MAX_LINE_CHARS
Longest line sent or kept, in characters. A stored title is at most 200.
META_OSC_TITLE
The CLI’s own window title (frontend/app/store/meta-keys.ts).

Functions§

agent_line_of_block
The line of the agent on block_id. Reads the store.
clean_line
One line: whitespace and control characters folded to single spaces, trimmed and capped at MAX_LINE_CHARS. None when nothing is left.
line_from_meta
The line for a block’s meta, or None when it has none to show.
lines_by_name
Each agent’s line by name, an agent with none left out, for the names route; None when swarm:sharesummaries is off. agents is (name, block_id). Reads the store.
sharing_on
“Share what my agents are working on”. Absent means on. The key is written out at the read so the settings-defaults check finds this default.