recv: hoist RECV_BATCH_MAX into hive-sh4re, drop magic 5 in wake hint

This commit is contained in:
damocles 2026-07-02 22:22:03 +02:00 committed by mara
commit be5b36911a
3 changed files with 17 additions and 10 deletions

View file

@ -32,9 +32,9 @@ pub fn format_wake_prompt(
String::new()
} else {
// Suggested batch size is clamped to the server-side recv cap
// (see `RECV_BATCH_MAX` in hive-c0re) so the hint never asks
// for more than one round-trip can deliver.
let batch = unread.min(5);
// so the hint never asks for more than one round-trip can
// deliver.
let batch = unread.min(u64::from(hive_sh4re::RECV_BATCH_MAX));
format!(
"\n\n({unread} more message(s) pending in your inbox — call `mcp__hyperhive__recv` \
with `max: {batch}` to drain the next batch before acting. If the \