Expand description
Agents set_seat (POST /api/v1/agent/seats): an agent, host or container, sets or clears
the seats of agents on this machine, several in one call (a whole roster).
A seat is an agent’s role, who it reports to and what it owns
(backend::agent_seat); the operator’s window sets one with agent.setSeat
(agent_handlers/seat.rs), and an agent does it here.
The caller is the agent its token names; a request without one is refused,
so a change is never attributed to the operator. The checks are the
window’s (roles, lengths, leads that are agents here, no cycle), applied to
the whole call at once: it is written all together or not at all. Each
change, and each refused attempt, is recorded in the audit log under the
calling agent’s slug and in the identity log with its UID.
Structs§
- Actor 🔒
- The agent making the request.
- Refusal 🔒
- Seat
Entry 🔒 - SetSeats
Request 🔒
Constants§
- AUDIT_
ACTION 🔒 - The audit entry’s action for a change.
- MAX_
SEATS_ 🔒PER_ CALL - The most seats one call changes: a roster, not a sweep.
Functions§
- actor_
of 🔒 - apply 🔒
- Plan, then write all of
changesunder the seat lock. - audit 🔒
- changes_
of 🔒 - The changes
reqasks for, with every agent and lead named by id, and the leads on other machines among them. - changes_
of_ 🔒with - handle_
agent_ 🔒seats - known_
remote_ 🔒agents - The agents on other machines this one sees on the LAN, as
Name@host: the leads a seat may name besides this machine’s own agents. - refuse 🔒
- remote_
agents_ 🔒on peers(host, agent names) asName@host, without the ones onown_host: another channel on this machine shares its agents, which are named by their local id, andName@hostwould only be a second spelling of a local agent that the self-lead and cycle checks do not see.- remote_
lead 🔒 - The lead
named(agent@host, any case) as the LAN lists it, else a refusal that lists what is known. - run 🔒
- run_as 🔒
- run_
remote 🔒 set_seatfor an agent on another machine (remote_ops::agent_ops): the same checks and write a local call has, recorded underwho(slug@machine).- summary_
of 🔒 - What a change did, for the audit line and the answer.
- uid_of 🔒
- The uid of the agent
named(an id or a slug) on this machine.