Watch
0
0
Fork
You've already forked hyperhive
0

drop the remaining pointers at the removed send/recv tools

This commit is contained in:
damocles 2026-11-07 12:01:50 +01:00 • committed by mara
commit c5fba26d62
6 changed files with 16 additions and 20 deletions

View file

@ -78,7 +78,7 @@ Every agent is a full NixOS container with its own unix user (passwordless
sudo inside the cage) and a durable, self-compacting session. Out of the
box it gets:
- **messaging** — peers and the operator talk over matrix; `send` / `recv` is the hive-local broker for system traffic and agents without matrix,
- **messaging** — peers and the operator talk over matrix; agents without matrix are cut off from peers on purpose,
`remind` to wake itself, scheduled prompts the operator sets for it at
swarm level, and a todo list that forge notifications and other
producers feed. → [schedules](docs/2-handbook/swarm/schedules.md)

View file

@ -410,9 +410,9 @@ impl AgentServer {
}
#[tool_handler(
instructions = "You are a hyperhive agent. Talk to peers and the operator over matrix if \
you have it; `send` (by logical name) is the hive-local broker, for peers without matrix. Use `recv` to drain your inbox one \
message at a time. Use `remind` to schedule a future wake-up message for yourself."
instructions = "You are a hyperhive agent. Talk to peers and the operator over matrix \
(`send_dm` takes a peer's agent name). Use `remind` to schedule a future wake-up \
message for yourself."
)]
impl ServerHandler for AgentServer {}

View file

@ -1,4 +1,4 @@
//! Formatting / render helpers for the MCP tool surface: ack / recv /
//! Formatting / render helpers for the MCP tool surface: ack /
//! loose-end / agent-meta reply shaping plus the retry annotation.
//! Stateless string builders, with one exception —
//! [`matrix_unread_summary`] queries `hive-matrix-daemon`'s local
@ -91,7 +91,7 @@ fn render_one_loose_end(out: &mut String, t: &hive_sh4re::inbox::LooseEnd) {
hive_sh4re::inbox::LooseEnd::PendingMessages { count } => {
let _ = writeln!(
out,
"- {count} pending inbox message(s) — drain with recv (recv(max: {count}) to batch)"
"- {count} inbox message(s) queued; the harness delivers them one per turn"
);
}
hive_sh4re::inbox::LooseEnd::UnreadMatrix { rooms, summary } => {

View file

@ -8,7 +8,7 @@
use hive_types::Permission;
/// Name of the hyperhive MCP server inside claude's view. Claude prefixes
/// tools as `mcp__<this>__<tool>` (e.g. `mcp__hyperhive__send`).
/// tools as `mcp__<this>__<tool>` (e.g. `mcp__hyperhive__remind`).
pub const SERVER_NAME: &str = "hyperhive";
/// Default loopback port the built-in hyperhive MCP surface is served on

View file

@ -13,8 +13,8 @@ use hive_sh4re::inbox::LooseEnd;
use crate::coordinator::Coordinator;
/// Open threads pending against `agent`: undelivered inbox messages this
/// agent still owes itself a `recv` for, only when the count is non-zero.
/// Open threads pending against `agent`: undelivered inbox messages for this
/// agent, only when the count is non-zero.
///
/// # Errors
///

View file

@ -1,8 +1,7 @@
//! Per-agent socket — `/run/hyperhive/agents/<name>/mcp.sock` on the
//! host, bind-mounted into the container at `/run/hive/mcp.sock`. The
//! inbox/messaging wire shapes: message envelopes, the loose-ends
//! response types, and the shared wake-prompt/`recv`-result hint
//! constants + builder.
//! response types, and the shared wake-prompt hint constants.
use chrono::{DateTime, Utc};
use hive_types::Ident;
@ -18,10 +17,8 @@ use serde::{Deserialize, Serialize};
/// constant instead of a scattered magic value.
pub const RECV_BATCH_MAX: u32 = 5;
/// Banner prepended to a wake prompt / `recv` result when the message was
/// redelivered after a harness restart (the turn that first drove it never
/// acked). Shared between the harness serve loop (wake prompt) and the MCP
/// server (`recv` tool result) so both surfaces phrase it identically.
/// Banner prepended to a wake prompt when the message was redelivered after
/// a harness restart (the turn that first drove it never acked).
pub const REDELIVERY_HINT: &str = "[redelivered after harness restart — may already be handled]\n";
/// Banner prepended to a wake prompt when the previous turn was cut off by
@ -120,11 +117,10 @@ pub enum LooseEnd {
due_at: DateTime<Utc>,
age_seconds: u64,
},
/// Undelivered inbox messages waiting to be `recv`'d by this agent.
/// Not cancellable — drain them with `recv`. Surfaced so an agent
/// doing a between-turns `get_loose_ends` sweep sees it still owes
/// itself a `recv` without having to poll the inbox separately. Only
/// emitted when `count > 0`.
/// Undelivered inbox messages waiting for this agent. Not cancellable:
/// the harness delivers them one per turn. Surfaced so a between-turns
/// `get_loose_ends` sweep sees a backlog without polling the inbox.
/// Only emitted when `count > 0`.
PendingMessages {
/// Number of undelivered messages queued for this agent.
count: u64,