Commit Graph

59 Commits

Author SHA1 Message Date
Akhilesh Kumar 54a9bce2b7 refactor(core): architectural decoupling of MCP management and tool isolation
This commit implements a proper architectural decoupling of MCP servers from the global ToolRegistry, eliminating the need for the `__agent__` naming prefix while maintaining perfect isolation.

Key changes:
1. McpClientManager now acts as a pure connection pool, keying clients by a hash of their configuration. This allows multiple agents or extensions to define servers with the same name (e.g. 'github') without collision.
2. McpClient supports multiple 'RegistrySets', allowing it to push discovered tools, prompts, and resources into arbitrary isolated registries.
3. LocalAgentExecutor now creates and manages its own isolated Tool, Prompt, and Resource registries. The `__agent__` prefix is removed, and tools retain their standard `mcp_{server}_{tool}` FQN.
4. CoreToolScheduler and policy checks are reverted to use standard names, as isolation is now handled at the registry level rather than via string namespacing.
5. Proxied the Config object within subagents to ensure system-wide components (like prompt templates) automatically use the agent-specific registries.
6. Verified through comprehensive updates to core tests for agents, MCP management, and registries.
2026-03-13 19:23:33 +00:00
Akhilesh Kumar ee425228fe fix(core): ensure policy engine compatibility with isolated MCP servers
This commit addresses PR feedback regarding the prefixing of isolated subagent MCP servers and its potential to break existing security policies relying on standard FQNs.

1. Added `originalName` to `MCPServerConfig` and `originalServerName` to `DiscoveredMCPTool`.
2. Updated `CoreToolScheduler` to reconstruct the original FQN (without the `__agent__` prefix) when performing policy checks via the Policy Engine. This ensures policies mapping to standard `mcp_{server}_{tool}` formats still apply correctly to isolated agents.
3. Added a remote agent back to `NewAgentsNotification.test.tsx` to maintain coverage for both local and remote agents.
2026-03-13 17:30:32 +00:00
Abhi 8432bcee75 fix(core): resolve MCP tool FQN validation, schema export, and wildcards in subagents (#22069) 2026-03-12 14:17:36 +00:00
Spencer a220874281 feat(policy): support auto-add to policy by default and scoped persistence (#20361) 2026-03-10 17:01:41 +00:00
Christian Gunderman dac3735626 Disallow underspecified types (#21485) 2026-03-07 21:05:38 +00:00
Abhi 931e668b47 refactor(core): standardize MCP tool naming to mcp_ FQN format (#21425) 2026-03-06 22:17:28 +00:00
nityam 28af4e127f fix: merge duplicate imports in packages/core (3/4) (#20928) 2026-03-04 00:12:59 +00:00
Abhi 28e79831ac fix(core): sanitize and length-check MCP tool qualified names (#20987) 2026-03-03 21:38:52 +00:00
Spencer 20d884da2f fix(core): reduce intrusive MCP errors and deduplicate diagnostics (#20232) 2026-02-27 20:04:36 +00:00
Sandy Tao 3ff5cfaaf6 feat(telemetry): Add context breakdown to API response event (#19699) 2026-02-24 23:26:28 +00:00
Jerop Kipruto 15f6c8b8da feat(policy): Propagate Tool Annotations for MCP Servers (#20083) 2026-02-24 14:20:11 +00:00
Yuki Okita 05bc0399f3 feat(cli): allow expanding full details of MCP tool on approval (#19916) 2026-02-24 01:45:05 +00:00
Abhi acb7f577de chore(lint): fix lint errors seen when running npm run lint (#19844) 2026-02-21 18:33:25 +00:00
joshualitt 6351352e54 feat(core): Implement parallel FC for read only tools. (#18791) 2026-02-20 00:38:22 +00:00
Abhijit Balaji 3408542a66 fix(core): prevent duplicate tool approval entries in auto-saved.toml (#19487)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-19 20:03:52 +00:00
Christian Gunderman fd65416a2f Disallow unsafe type assertions (#18688) 2026-02-10 00:10:15 +00:00
Adib234 fe975da91e feat(plan): implement support for MCP servers in Plan mode (#18229) 2026-02-05 21:37:28 +00:00
Abhi eccc200f4f feat(core): enforce server prefixes for MCP tools in agent definitions (#17574) 2026-01-27 04:53:05 +00:00
Andrew Garrett 97aac696fb Fix mcp tool lookup in tool registry (#17054)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-01-21 04:18:33 +00:00
Vijay Vasudevan eb3f3cfdb8 feat(hooks): add mcp_context to BeforeTool and AfterTool hook inputs (#15656)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
2026-01-08 18:35:33 +00:00
Abhi 12c7c9cc42 feat(core,cli): enforce mandatory MessageBus injection (Phase 3 Hard Migration) (#15776) 2026-01-04 22:11:43 +00:00
Abhi 90be9c3587 feat(core): Standardize Tool and Agent Invocation constructors (Phase 2) (#15775) 2026-01-04 20:51:23 +00:00
Allen Hutchison 5f298c17d7 feat: Persistent "Always Allow" policies with granular shell & MCP support (#14737)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-12 21:45:39 +00:00
Kevin Ramdass 2d3db97067 Fix: Correctly detect MCP tool errors (#14937) 2025-12-11 16:41:02 +00:00
Jacob MacDonald c883403147 [feat] Extension Reloading - respect updates to exclude tools (#12728) 2025-11-07 20:18:35 +00:00
Allen Hutchison f5bd474e51 fix(core): prevent server name spoofing in policy engine (#12511) 2025-11-05 18:10:23 +00:00
Shardul Natu 236334d015 feat(telemetry): Add extension name to ToolCallEvent telemetry (#12343)
Co-authored-by: Shnatu <snatu@google.com>
2025-10-31 13:50:22 +00:00
Allen Hutchison 064edc52f5 feat(policy): Introduce config-based policy engine with TOML configuration (#11992) 2025-10-28 16:20:57 +00:00
Allen Hutchison b188a51c32 feat(core): Introduce message bus for tool execution confirmation (#11544)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-24 20:04:40 +00:00
christine betts c6a59896f3 Add extensions logging (#11261) 2025-10-21 20:55:16 +00:00
fuyou 66c2184fe5 feat: Add AbortSignal support for retry logic and tool execution (#9196)
Co-authored-by: Sandy Tao <sandytao520@icloud.com>
2025-09-24 19:10:55 +00:00
Jacob MacDonald d2ae869bb4 Simplify MCP server timeout configuration (#7661) 2025-09-03 17:34:32 +00:00
shrutip90 2a0e69d833 fix(trust): Update config.isTrustedFolder (#7373) 2025-08-29 02:41:33 +00:00
shrutip90 a0fbe000ee Skip MCP server connections in untrusted folders (#7358) 2025-08-28 22:46:27 +00:00
Pascal Birchler 0f031a7f89 Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
Lee James 240830afac feat(mcp): log include MCP request with error (#6778) 2025-08-22 18:10:30 +00:00
joshualitt ec41b8db8e feat(core): Annotate remaining error paths in tools with type. (#6699) 2025-08-21 21:40:18 +00:00
Jacob MacDonald 1738d40745 return the JSON stringified parameters from getDescription for MCP tools and Discovered tools (#6655) 2025-08-20 20:10:02 +00:00
Richie Foreman 2998f27f70 chore(compiler): Enable strict property access TS compiler flag. (#6255)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-08-17 16:43:21 +00:00
Lee James f47af1607a bug(mcp): catch errors reported by GitHub MCP (#6194) 2025-08-14 22:30:05 +00:00
Richie Foreman a90aeb3d8f chore(build/compiler): Enable a bunch of strict TS compiler options. (#6138) 2025-08-13 20:17:38 +00:00
joshualitt 904f4623b6 feat(core): Continue declarative tool migration. (#6114) 2025-08-13 18:57:37 +00:00
Agus Zubiaga d3fda9dafb Zed integration schema upgrade (#5536)
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Ben Brandt <benjamin@zed.dev>
2025-08-13 15:58:26 +00:00
Wanlin Du d9fb08c9da feat: migrate tools to use parametersJsonSchema. (#5330) 2025-08-11 23:12:41 +00:00
Luccas Paroni 2778c7d851 feat(core): Parse Multimodal MCP Tool responses (#5529)
Co-authored-by: Luccas Paroni <luccasparoni@google.com>
2025-08-05 19:19:47 +00:00
Didier Durand 0f6405e28d fix typos in diverse files (#3550)
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
Co-authored-by: Pascal Birchler <pascalb@google.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-07-20 22:36:34 +00:00
Tommaso Sciortino 4dbd9f30b6 Revert background agent commits (#4479) 2025-07-19 00:28:40 +00:00
Tommaso Sciortino 003609239f Add /background commands (when background agent is configured) (#4407)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2025-07-18 22:38:04 +00:00
Tommaso Sciortino b5f5ea2c31 Use simple name for MCP tools where possible. (#4459) 2025-07-18 21:29:09 +00:00
Conrad Irwin 761ffc6338 Zed integration (#4266)
Co-authored-by: Agus Zubiaga <agus@zed.dev>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: mkorwel <matt.korwel@gmail.com>
2025-07-17 22:25:23 +00:00