Expand description
POST /api/v1/agent/status: Presence status. An agent says, in one line,
what it is doing now. The line is kept in its pane’s block meta with the
time (backend::work_facts::live_phrase), which is where the Swarm row and
work.goal read it. A task claim writes the task’s title in the same place
(work_queue::handle_work_claim).
Structs§
- Status
Params Presence status’s arguments, plus who is asking (agent,block: the MCP’s ownAGENTMUX_AGENT_IDand block id; the request’s agent token wins).
Statics§
- LINE_
WRITES 🔒 - The status line is written under this lock: a task’s end reads the line and clears it only if it is still the ended task’s, and a write that lands in between would otherwise be erased with it.
Functions§
- bad_
request 🔒 - handle_
agent_ 🔒status POST /api/v1/agent/status.- task_
claimed 🔒 - A task claim: the task’s title becomes the claimer’s line (source
task), replacing a line from the task before. The agent replaces it with its own words by setting a status. Skipped when the claim names no pane, or a pane that is not the holder’s (holderis the claimer’s name and UID): a claim’sblock_idis the client’s word. - task_
ended 🔒 - A task done or handed back: the line that task wrote goes, so the row does not go on naming work
that ended. A line the agent set itself stays (it said “Done: …” or something newer), and so does
the line of another task (found by
task_id, which a rename of the task does not change). Only the holder’s pane is touched:uidis the holder’s, so another agent that shares its name keeps its line. - write_
block_ 🔒meta - Write
metato the block’s own meta, the way a pane title is set, so the change is stored and reaches every window.