Watch
0
0
Fork
You've already forked hyperhive
0

agents: the send(operator) refusal also covers agents without matrix

An agent with no matrix account has no `mcp__matrix__*` tools, so a
refusal that only says "use the matrix MCP tools" points it at something
it cannot call. `OPERATOR_SEND_REFUSAL` now names matrix for an agent
that has it, and tells one without it that there is no direct channel:
the operator reads its `set_status` line, its turn output on the
dashboard, and its logs. The allow-list refusal, the `send` tool
description, the MCP server instructions and the system prompt say
"over matrix if you have it" to match, and the helper-event bullets go
back to "ask the operator" without naming a channel.
This commit is contained in:
atlas 2026-10-12 02:56:19 +02:00 • committed by mara
commit 80e8361da9
7 changed files with 25 additions and 17 deletions

View file

@ -14,11 +14,14 @@ pub const MANAGER_AGENT: &str = "ruth";
/// [`OPERATOR_SEND_REFUSAL`].
pub const OPERATOR_RECIPIENT: &str = "operator";
/// The error a `send` to [`OPERATOR_RECIPIENT`] returns. Agents reach the
/// operator over matrix, so the text names the matrix tools to use.
/// The error a `send` to [`OPERATOR_RECIPIENT`] returns. One text for every
/// agent, so it covers both an agent with the matrix MCP tools and one
/// without them.
pub const OPERATOR_SEND_REFUSAL: &str = "send failed: `operator` is not a send recipient. \
Reach the operator over matrix with the matrix MCP tools \
(`mcp__matrix__send_dm`, or `mcp__matrix__send_message` to a room the operator is in).";
If you have the matrix MCP tools, reach the operator over matrix \
(`mcp__matrix__send_dm`, or `mcp__matrix__send_message` to a room the operator is in). \
Without them there is no direct channel to the operator: they read your `set_status` \
line and turn output on the dashboard, and your logs.";
/// Sender hive-c0re uses for events it pushes into the manager's inbox.
/// Manager harness recognises this and parses the body as a `HelperEvent`.