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:
parent
7e6a4c7727
commit
80e8361da9
7 changed files with 25 additions and 17 deletions
|
|
@ -667,7 +667,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn send_to_operator_is_refused_with_the_matrix_pointer() {
|
||||
fn send_to_operator_is_refused_naming_matrix_and_the_no_matrix_fallback() {
|
||||
let (_dir, coord) = coordinator();
|
||||
let resp = handle_send(
|
||||
&coord,
|
||||
|
|
@ -677,7 +677,8 @@ mod tests {
|
|||
None,
|
||||
);
|
||||
assert!(
|
||||
matches!(&resp, Response::Err { message } if message.contains("mcp__matrix__")),
|
||||
matches!(&resp, Response::Err { message }
|
||||
if message.contains("mcp__matrix__") && message.contains("set_status")),
|
||||
"{resp:?}"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue