recv: None = peek, positive value = opt-in long-poll
old behavior: omitted wait_seconds fell through to the 30s RECV_LONG_POLL_DEFAULT — claude calling 'is there anything in my inbox right now?' between actions blocked the turn for half a minute. flip the semantics: None (or 0) returns immediately, positive value parks up to MAX (180s, unchanged). cleaner 'peek vs wait' distinction; tool descriptions + agent/manager prompts updated to point at the new shape. harness's own serve loops in hive-ag3nt + hive-m1nd relied on the old default for their inbox poll. they now explicitly pass wait_seconds: Some(180) to opt into the full park — same effective behavior as before, just spelled out. retires the matching TODO under Turn loop.
This commit is contained in:
parent
90df2106bf
commit
06af23c8a4
9 changed files with 53 additions and 45 deletions
|
|
@ -102,11 +102,11 @@ it as a stdio child via `--mcp-config`. The hyperhive socket name is
|
|||
- `send(to, body)` — message a peer (logical agent name), another
|
||||
agent, or the operator (recipient `operator`, surfaces in the
|
||||
dashboard inbox).
|
||||
- `recv(wait_seconds?)` — drain one inbox message. Long-polls
|
||||
server-side; `wait_seconds` is capped at 180 (default 30 when
|
||||
omitted). Agents use a long wait to park their turn waiting for
|
||||
work instead of busy-looping with short polls — they wake
|
||||
instantly when a message arrives.
|
||||
- `recv(wait_seconds?)` — drain one inbox message. Without
|
||||
`wait_seconds` (or with `0`) returns immediately, a cheap
|
||||
"anything pending?" peek. Positive value parks the turn up
|
||||
to that many seconds (cap 180) — incoming messages wake
|
||||
instantly, otherwise returns empty at the timeout.
|
||||
- `ask_operator(question, options?, multi?, ttl_seconds?)` —
|
||||
surface a question on the dashboard. Same shape as the manager's;
|
||||
answer routes back to the asker's own inbox as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue