recv mcp tool: default max to a small batch of 5 (wire default stays 1)
This commit is contained in:
parent
f310b1ce5a
commit
d46d3c261b
3 changed files with 31 additions and 23 deletions
|
|
@ -119,9 +119,13 @@ in `hive-c0re::dashboard_events::DashboardEvent`.
|
|||
|
||||
`AgentRequest::Recv` is the only path that delivers messages to an
|
||||
agent. Always returns a list (`Messages { messages }`) — empty when
|
||||
nothing's pending, single-pop when `max = None` (default 1, the
|
||||
single-message behaviour), batched up to `max` when caller asks for
|
||||
more (server-side cap is 32; values above clamp silently).
|
||||
nothing's pending, single-pop when `max = None` (wire default 1),
|
||||
batched up to `max` when the caller asks for more (server-side cap
|
||||
is 32; values above clamp silently). The wire default MUST stay 1:
|
||||
the harness turn loop sends `max: None` and consumes only the first
|
||||
message, so a bigger server-side default would silently drop the
|
||||
rest of a popped batch. The agent-facing `recv` MCP tool defaults to
|
||||
`max = 5` at the tool layer instead (a small batch per call).
|
||||
`wait_seconds` long-polls for the first message; once one arrives —
|
||||
or one is already pending — the call drains up to `max` in total
|
||||
before returning, so a single `Recv` call coalesces a burst.
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ ttl_seconds?, to?)`, `answer(id, answer)`, `ack_until(up_to)`.
|
|||
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
|
||||
(cap 180) — incoming messages wake instantly. `max` (tool default 5, cap
|
||||
32) drains up to N rows; `wait_seconds` applies to the first, then
|
||||
drains up to `max` total. Each returned row is prefixed with
|
||||
`[msg #<id>]` (broker row id; note the highest id seen, then pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue