recv: drop wait_seconds from the MCP tool, always an immediate peek

This commit is contained in:
damocles 2026-08-02 03:42:55 +02:00 committed by mara
commit ceff662d25
6 changed files with 59 additions and 117 deletions

View file

@ -23,7 +23,7 @@ preset (`AGENT_DEFAULT`) includes `messaging`, `meta`, `inbox`, and
## Core tools (always available)
**Messaging** (`messaging` group): `send(to, body, in_reply_to?)`,
`recv(wait_seconds?, max?)`, `ask(question, options?, multi?,
`recv(max?)`, `ask(question, options?, multi?,
ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`.
- `send` — message a peer (logical name) or the operator
@ -36,11 +36,10 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`.
`[ "operator" ]` to restrict a sub-agent to operator messages only
(the topology parent is always reachable regardless of this list —
that carve-out is structural, keyed on parent relationship, not name).
- `recv` — drain inbox. Without `wait_seconds` (or `0`) returns
immediately. Positive value parks the turn up to that many seconds
(cap 180) — incoming messages wake instantly. `max` (default 1, cap
5) drains up to N rows; `wait_seconds` applies to the first, then
drains up to `max` total. Each returned row is prefixed with
- `recv` — drain inbox. Always an immediate peek, never blocks (#2814
— dropped the `wait_seconds` long-poll param entirely; nobody had a
use case for it that wasn't already better served by ending the
turn). `max` (default 1, cap 5) drains up to N rows. Each returned row is prefixed with
`[msg #<id>]` (broker row id; note the highest id seen, then pass
it to `ack_until` to bulk-triage the batch). **Graceful shutdown**: when the harness
receives a stop signal, the inbox becomes fenced and `recv` returns an