feat(#1065): web_tools tool group gates WebFetch/WebSearch built-ins
Replaces the earlier capability-based approach (closed #1069) with a ToolGroup — capabilities are for privileged system access, web egress is a tool permission. Add ToolGroup::WebTools to hive-sh4re: - tools() returns &[] (no MCP tools gated) - builtin_tools() returns &["WebFetch", "WebSearch"] — new method on ToolGroup - Present in ALL and as_str() → "web_tools" In hive-ag3nt/mcp.rs: - allowed_tools_arg() now iterates group.builtin_tools() to prepend any group-gated built-ins alongside the base ALLOWED_BUILTIN_TOOLS set - builtin_tools_arg_for_flavor(flavor) replaces builtin_tools_arg() so the flavor-correct effective groups are used when building --tools - builtin_tools_arg() kept as a flavor=Agent convenience alias - turn.rs updated to call builtin_tools_arg_for_flavor(files.flavor) so manager sessions also see web tools when web_tools is in their groups The dashboard T00L GR0UPS table gains a web_tools column automatically (ToolGroup::ALL drives the columns).
This commit is contained in:
parent
cd6cbf9997
commit
f6b80cf02e
3 changed files with 58 additions and 11 deletions
|
|
@ -672,7 +672,7 @@ async fn run_claude(prompt: &str, files: &TurnFiles, bus: &Bus) -> Result<(bool,
|
|||
.arg(&files.mcp_config)
|
||||
.arg("--strict-mcp-config")
|
||||
.arg("--tools")
|
||||
.arg(mcp::builtin_tools_arg())
|
||||
.arg(mcp::builtin_tools_arg_for_flavor(files.flavor))
|
||||
.arg("--allowedTools")
|
||||
.arg(mcp::allowed_tools_arg(files.flavor));
|
||||
let mut child = cmd
|
||||
|
|
|
|||
Loading…
Reference in a new issue