fix(agent-core-v2): preserve select_tools for disclosure - #2383
fix(agent-core-v2): preserve select_tools for disclosure#2383lurenjia534 wants to merge 2 commits into
Conversation
|
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a361352df4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Related Issue
Resolve #2381
Problem
In the experimental v2 engine, a profile allowlist can omit
select_toolswhile deferred MCP tools are still announced. Contribution activation applied that allowlist to the gateway before the request-time disclosure policy could apply its existing carve-out. As a result, the top-level agent could be told that deferred tools exist but receive noselect_toolsschema with which to load them.What changed
select_toolsactivatable when it is omitted from the profile allowlist, while continuing to honor an explicit profiledisallowedToolsentry.Validation
pnpm lint(passes with 0 errors)pnpm typecheckpnpm test(1,015 test files and 16,701 tests passed)pnpm --filter @moonshot-ai/agent-core-v2 lint:domainpnpm --filter @moonshot-ai/agent-core-v2 typecheckpnpm --filter @moonshot-ai/agent-core-v2 testpnpm --filter @moonshot-ai/agent-core-v2 buildpnpm --filter @moonshot-ai/kimi-code typecheckpnpm --filter @moonshot-ai/kimi-code buildNo changeset is needed because this behavior is limited to the experimental v2 engine. No documentation update is needed because no command, configuration, or usage contract changed.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.