SubAgentRunner: filter mcp_servers against subagent_tools whitelist
When a profile defines subagent_tools (strict whitelist for sub-agents),
MCP servers were still expanded unconditionally, granting sub-agents access
to MCP tools not listed in the whitelist.  Now:

- If subagent_tools contains mcp:xxx entries, only those specific MCP tools
  are passed to build_tool_list.
- If subagent_tools is non-empty but contains no mcp: entries, mcp_servers
  is set to None — sub-agents get no MCP tools at all.
- If subagent_tools is empty (fallback to enabled_tools), full mcp_servers
  is kept for backward compatibility.

400 passed, 1 skipped
1 parent fac9483 commit 3ab3ada965522bc921cc1064b94942b848cecdb4
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 21 May
Showing 1 changed file
View
navi/core/subagent_runner.py