broker: recv_batch(max) — drain a bursty inbox in one round-trip
This commit is contained in:
parent
96ffb0e39a
commit
77b89bf2c6
9 changed files with 354 additions and 11 deletions
|
|
@ -265,6 +265,7 @@ async fn serve(
|
|||
Ok(
|
||||
AgentResponse::Ok
|
||||
| AgentResponse::Status { .. }
|
||||
| AgentResponse::Batch { .. }
|
||||
| AgentResponse::Recent { .. }
|
||||
| AgentResponse::QuestionQueued { .. }
|
||||
| AgentResponse::LooseEnds { .. }
|
||||
|
|
@ -301,7 +302,8 @@ fn format_wake_prompt(from: &str, body: &str, unread: u64, redelivered: bool) ->
|
|||
String::new()
|
||||
} else {
|
||||
format!(
|
||||
"\n\n({unread} more message(s) pending in your inbox — drain via `mcp__hyperhive__recv` if relevant.)"
|
||||
"\n\n({unread} more message(s) pending in your inbox — call `mcp__hyperhive__recv_batch` \
|
||||
with `max: {unread}` to drain them all in one round-trip before acting.)"
|
||||
)
|
||||
};
|
||||
format!("{banner}Incoming message from `{from}`:\n---\n{body}\n---{pending}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue