Expand description
The agents’ side of the Kanban (docs/specs/SPEC_WARDEN_KANBAN_2026_10_20.md
§6.5, §6.8, §6.12), beside the queue’s own routes in work_queue.rs:
POST /agentmux/work/:id/update — a progress note, a checklist, links POST /agentmux/work/:id/ask — a question for the operator (blocked) POST /agentmux/work/:id/submit — hand it in (review, or done) POST /agentmux/work/:id/hold — put a waiting task on hold, or pause one’s own (any agent) POST /agentmux/work/:id/unhold — take a held task off hold (any agent)
And what srv adds to every task an agent touches: its card (number,
repository, who asked), its history, the next task waiting for the agent
when it finishes one, and leases that a live holder keeps without calling
heartbeat.
Structs§
- Filing 🔒
- What an enqueue adds for the board: who asked, the repository.
- Hold
Request 🔒 - Update
Request 🔒
Constants§
- GET_
HISTORY 🔒 - The most history lines
GET /agentmux/work/:idreturns. - LEASE_
MS 🔒 - The lease a live holder’s claim is kept at (
work_queue::DEFAULT_LEASE_MS). - MAX_
CHECKLIST 🔒 - The most checklist steps kept.
- MAX_
PAYLOAD 🔒 - The most characters a task’s payload (the brief its holder is handed) holds.
- MAX_
TEXT 🔒 - The longest note, question or result kept on a card.
- QUOTE_
WINDOW_ 🔒MS - How far a pane’s stored prompt may be from the start of the turn and still be what started it. The pane writes the prompt as the message is sent and srv opens the turn right after, so the two differ by a moment; a prompt from an earlier turn is minutes or more away.
Functions§
- annotate 🔒
updatewithout an attempt: any agent leaves a note, and links, on a task nobody holds (waiting, or on hold), as any agent can already hold, move or edit one. It is not a claim: no attempt is used and no lease is touched. The note is written as “: ” so the card says who wrote it, and the history line carries the same agent. A claimed task’s note, checklist and files stay its holder’s. - attempt_
of 🔒 - The attempt of a call only a holder can make (
ask,submit). - caller_
reg 🔒 - The calling agent’s registration, by its token only: who asked for a task must not be something the caller can claim (§6.5).
- card_
update 🔒 - clean 🔒
- Text kept on a card or in the history: sanitized, at most
MAX_TEXTcharacters. - conflict 🔒
- doc_
problem 🔒 - Why a handed-in document path can’t be kept, if it can’t. The card’s Open
button gives the path to the Editor as it is, and srv has no way to tell
which clone a relative path meant, so only an absolute (or
~/) path will do. - expiring 🔒
- The claims about to be reaped: record them as expired after the reap.
- extend_
live_ 🔒leases - Keep the leases of claims whose holder is alive, so a long tool call or a
model that never calls
heartbeatdoesn’t lose its task (§6.8). A holder is alive while it is registered and its process runs; one that is out of quota or signed out is alive but may let go of a task nobody in particular owns (renews_lease). Run before the reap. - failed 🔒
- file_
card 🔒 - Give a just-enqueued task its card and first history line. Returns its number. Synchronous: called right after the enqueue, with nothing awaited between them; a claim or list that got in first made an empty card, which this fills.
- finish 🔒
- Finish a claimed task, for
completeandsubmit: to Review when it needs review (the agent can’t accept its own work), else done. Answers with the resulting state and the agent’s next waiting task. - finish_
task 🔒 - handle_
work_ 🔒ask POST /agentmux/work/:id/ask: the holder needs the operator. The task goes to Needs you; the holder keeps it, its lease paused.- handle_
work_ 🔒get GET /agentmux/work/:id(Tasksget): one task whole, for any agent that sees its board: the instruction it was filed with, who it is for and who holds it, its card (links, note, question, checklist, what it starts after) and its last history lines. A task on a board the caller can’t see is refused like one that doesn’t exist.- handle_
work_ 🔒hold POST /agentmux/work/:id/hold: any agent puts a waiting task on hold, so no one takes it until it is taken off hold; the holder of a claimed task pauses it, with itsattempt(SPEC_KANBAN_AGENTS_HOLD_AND_UNHOLD_2026_10_22.md §3.1, §3.2).- handle_
work_ 🔒submit POST /agentmux/work/:id/submit: the holder hands it in. A task that needs review waits in Review for the operator; one that doesn’t is done. The answer names the next task waiting for the agent.- handle_
work_ 🔒tokens GET /agentmux/work/:id/tokens(Taskstokens): a task’s tally and where it went, as counts, for any agent that sees its board. Never part of the answers an agent gets anyway: it costs nothing unless it asks.- handle_
work_ 🔒unhold POST /agentmux/work/:id/unhold: any agent takes a held task off hold; it waits again for whoever it is for (§3.1).- handle_
work_ 🔒update POST /agentmux/work/:id/update: a progress note, a checklist, links. Also a heartbeat.- holder_
uid 🔒 - holds 🔒
- Whether the caller holds this claim now: the same rule as the queue’s holder transitions (UID when both are known, else the name), and the fence.
- moved 🔒
- name_of 🔒
- A task as an agent’s answer names it:
#12, else its id. - next_
for 🔒 - The next task waiting for this agent, as the answer to finishing one carries it (§6.5: it proceeds through its backlog).
- payload_
problem 🔒 - Why a payload can’t be filed: it is empty, or longer than
MAX_PAYLOAD. - payload_
text 🔒 - A payload as stored: sanitized and whole, or the reason it is refused.
- payload_
too_ 🔒long - Why a payload is refused when it is longer than
MAX_PAYLOAD: said, never cut, because an agent handed half a brief works from half. - pick_
board 🔒 - The board a call names (none: the default board), if the caller sees it. A board it can’t see is
refused like one that doesn’t exist;
filingalso refuses an archived board, which takes no new tasks. - prepare_
card 🔒 - The card of a task about to be enqueued: who asked, the repository, the
filer. Worked out before the row exists, so nothing awaits between the
row and its card (
file_card). - provenance 🔒
- Who asked for what the agent is doing now: the operator, when a message of
theirs started or joined the agent’s current turn (with their words, when
they are tied to this task:
quote_for_turn); another agent, when its message started it; else other.unknownwhen the call carried no token. - quote_
for_ 🔒turn - The operator’s own words for a card, or nothing when they can’t be tied to the task. A task carries a quote only when all of these hold, so a quote is never a guess:
- record 🔒
- One line of history; a failure to write it is logged, never the caller’s.
- ref_of 🔒
- How a task is written (
#12on the default board, elsework#12) and its board’s slug. - refused 🔒
- remote_
card 🔒 - The card of a task an agent of another machine files: asked by that agent (
slug@machine), never by the operator, so it is not held for an Accept unless the request says so. - renews_
lease 🔒 - Whether a live holder’s lease on
itemis renewed (R5 of docs/specs/SPEC_UNRESPONSIVE_AGENTS_2026_10_23.md). Always, except for a holder that is out of quota or signed out on a task open to anyone or to a group: after 30 minutes of it, and with its reset more than an hour away (or not known), the lease lapses so someone else can take the task. A task aimed at an agent stays with it and shows in Needs you. The rule isdecidewithIntent::Lease(backend/agent_status.rs), with the numbers. - repo_of 🔒
- The repository the agent works in and the branch it is on, from its work facts.
- resolve_
after 🔒 - The tasks a task starts after (§6.15), as given: ids or numbers (
12,"#12"), resolved to ids. The store checks the list when it writes it. - resolve_
id 🔒 - A task’s id from what an agent or the operator typed: its id, or its
number (
12,#12). - sees_
task 🔒 - Whether the caller may see the board a task is on (a call with no token sees every board). A task on a board whose agent list leaves the caller out is refused like one that doesn’t exist.
- sensitive_
reason 🔒 - A hold’s reason shows on the shared Kanban: one that looks like a credential or a destructive command is refused, before anything moves.
- target_
state_ 🔒words - Where the agent a task is aimed at stands, as words after its name: its state when it runs here, else that it is not running (stopped, parked or gone), which no claim of its own will end.
- task_
brief 🔒 - The few fields of a task an agent’s answer names.
- text_
too_ 🔒long - Why agent text is refused when
cleanwould cut it: a note, a question or a result longer thanMAX_TEXTis said so, not kept cut. - viewer 🔒
- The agent a call comes from, by its token, for which boards it sees: its id and UID.
Nonewhen the call carries no token, which sees every board. - waiting_
for 🔒 - Who a waiting task is for, as an answer says it.
- why_
not_ 🔒claimed - Why a named claim (
claimwithid) took nothing: the first rule the task fails, in words the agent can act on.