From 2d277038a785e4ad3f125da52585c11913543057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sat, 16 May 2026 02:44:46 +0200 Subject: [PATCH] drop damocles' reverted mcp patch from worktree picked up by the previous commit accidentally; the change was a duplicate of code already in mcp::allowed_mcp_tools and damocles self-reverted upstream. --- ...erver-allowedTools-into-allowedTools.patch | 55 ------------------- 1 file changed, 55 deletions(-) delete mode 100644 0001-mcp-wire-extra-server-allowedTools-into-allowedTools.patch diff --git a/0001-mcp-wire-extra-server-allowedTools-into-allowedTools.patch b/0001-mcp-wire-extra-server-allowedTools-into-allowedTools.patch deleted file mode 100644 index b3a563a..0000000 --- a/0001-mcp-wire-extra-server-allowedTools-into-allowedTools.patch +++ /dev/null @@ -1,55 +0,0 @@ -From e0b18ff3c2ec5a7f771ab9a1a247ff4a24a8c475 Mon Sep 17 00:00:00 2001 -From: damocles -Date: Sat, 16 May 2026 02:28:21 +0200 -Subject: [PATCH] mcp: wire extra server allowedTools into --allowedTools arg - ---- - hive-ag3nt/src/mcp.rs | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/hive-ag3nt/src/mcp.rs b/hive-ag3nt/src/mcp.rs -index d8831b4..cb0918a 100644 ---- a/hive-ag3nt/src/mcp.rs -+++ b/hive-ag3nt/src/mcp.rs -@@ -539,6 +539,8 @@ impl ManagerServer { - )] - impl ServerHandler for ManagerServer {} - -+ -+ - /// Name of the hyperhive MCP server inside claude's view. Claude prefixes - /// tools as `mcp____` (e.g. `mcp__hyperhive__send`). - pub const SERVER_NAME: &str = "hyperhive"; -@@ -601,7 +603,9 @@ pub fn allowed_mcp_tools(flavor: Flavor) -> Vec { - } - - /// Combined allow-list passed to `--allowedTools` (auto-approve) — covers --/// both the built-ins and the MCP surface. -+/// the built-ins, the hyperhive MCP surface, and any extra MCP servers. -+/// Extra server tools are read from the same `/etc/hyperhive/extra-mcp.json` -+/// file that `render_claude_config` uses, so the two are always in sync. - #[must_use] - pub fn allowed_tools_arg(flavor: Flavor) -> String { - let mut all: Vec = ALLOWED_BUILTIN_TOOLS -@@ -609,6 +613,18 @@ pub fn allowed_tools_arg(flavor: Flavor) -> String { - .map(|s| (*s).to_owned()) - .collect(); - all.extend(allowed_mcp_tools(flavor)); -+ for (name, spec) in load_extra_mcp() { -+ if name == SERVER_NAME { -+ continue; // already covered above -+ } -+ for tool in &spec.allowed_tools { -+ if tool == "*" { -+ all.push(format!("mcp__{name}__*")); -+ } else { -+ all.push(format!("mcp__{name}__{tool}")); -+ } -+ } -+ } - all.join(",") - } - --- -2.51.2 -