Skip to main content

Module seat

Module seat 

Source
Expand description

agent.setSeat: the operator sets or clears an agent’s seat (SPEC_AGENT_SEATS_IN_THE_UI_2026_10_23.md §3). A connection registered as an agent is refused here; an agent sets seats through MuxAPI’s Agents set_seat (app_api/agent_seats.rs), which shares the checks below (plan_seats) and records the agent as the one who set them.

Structs§

PlannedSeat 🔒
A seat change that passed every check, ready to write.
SeatChange 🔒
One seat to set (Some) or clear (None) on the agent whose uid is agent_id.

Enums§

SeatActor 🔒
Who made a seat change, for the log: the operator’s window, or an agent.

Functions§

one_super_agent 🔒
At most one agent holds the super seat: naming a second one moves it. The agent that held it goes back to the role it had (prior_role, else worker), keeping its qualifier, lead and area. An agent made super remembers the role it had.
operator_only 🔒
Refuse a connection registered as an agent (bus:register), the same rule as Tower’s and the browser profiles’ RPCs: only the operator’s own client sets a seat, an agent’s own included.
plan_seats 🔒
Check every change as it will stand once all of them are written: a lead may be an agent set in the same call, and a cycle through two changes of one call is a cycle. Nothing is written. refuse starts the message of the two “no such agent” refusals, so each caller names itself. remote are the leads on other machines (Name@host) the caller checked against the LAN directory and accepts in this call.
refresh_pane_seats 🔒
Bring the agent:seat of every open agent pane up to date, so the pane header’s tooltip shows the seat just set, or a lead’s new name after a rename (§4). Best-effort: a pane that can’t be patched shows the old seat until it’s opened again.
register
set_seat 🔒
Validate and store (or clear) the seat, and log it as an identity change.
write_seats 🔒
Write planned seats and log each as an identity change by actor. The caller holds the seat lock from the check to here.