no nap tool — recv with long wait_seconds replaces it; max raised to 180s
recv-with-timeout is strictly better than a fixed sleep because it wakes instantly on incoming messages. drop the half-written nap MCP tool, raise the recv wait_seconds cap from 60s to 180s on both agent and manager sockets. prompts updated: agent.md + manager.md now spell out the pattern — when there's nothing else useful to do, call recv with wait_seconds=180 to park the turn; do NOT use Bash sleep for the same purpose. todo drops the nap entry and the napping-state-badge follow-up; both replaced by 'just use a long recv'.
This commit is contained in:
parent
f65ee88269
commit
7d93dd9db4
6 changed files with 16 additions and 21 deletions
|
|
@ -79,10 +79,12 @@ async fn serve(stream: UnixStream, agent: String, broker: Arc<Broker>) -> Result
|
|||
|
||||
/// Default and max long-poll window for `Recv`. Caller can request a
|
||||
/// shorter (or longer up to `RECV_LONG_POLL_MAX`) wait via the
|
||||
/// `wait_seconds` field; values above the cap are clamped. Set well
|
||||
/// below typical TCP / proxy idle limits.
|
||||
/// `wait_seconds` field; values above the cap are clamped. 180s
|
||||
/// max keeps us under typical TCP/proxy idle limits while letting
|
||||
/// agents park their turn until a message lands instead of busy-
|
||||
/// looping with short waits.
|
||||
const RECV_LONG_POLL_DEFAULT: std::time::Duration = std::time::Duration::from_secs(30);
|
||||
const RECV_LONG_POLL_MAX: std::time::Duration = std::time::Duration::from_secs(60);
|
||||
const RECV_LONG_POLL_MAX: std::time::Duration = std::time::Duration::from_secs(180);
|
||||
|
||||
fn recv_timeout(wait_seconds: Option<u64>) -> std::time::Duration {
|
||||
match wait_seconds {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue