Repository navigation
refactor(mcp): OpenCode MCP tool filter follow-ups from #3698 - #3723
Merged
dyoshikawa merged 1 commit intoNov 2, 2026
Merged
Conversation
Hoist the empty builtin tool-key set, document the two-layer orphan filter and first-listed ownership when sanitized server names collide, note OpenCode tool-name sanitization in the file-formats reference, and add the tests listed in dyoshikawa#3698 items 2-6.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from #3698 for the OpenCode MCP adapter (shared with OpenCode V1 and MiMo Code). Item 1 already landed in #3699; this PR covers items 2–6 only.
Per item
SetOPENCODE_MCP_BUILTIN_TOOL_KEYS: ReadonlySet<string>insrc/features/mcp/opencode-mcp.ts(~L234–237, L253) with a short comment that OpenCode'stoolsmap holds only MCP toggles.pnpm exec vitest run src/features/mcp/opencode-mcp.test.tsgreen on basee72c4ab5and after (163 → 167 tests).convertFromOpencodeFormat(~L222–225): sanitized/legacy owner check first;orphanMcpToolFiltersToRulesyncstill runs for Kilo. No helper refactor.docs/reference/file-formats.md(~L1614);src/generated/docs-content.tsregenerated.pnpm cicheckcontent checks passed after commit.findOpencodeToolOwner(~L247–249) plus testshould attribute colliding sanitized server names to the first listed serverinopencode-mcp.test.ts(~L126–142).disabledToolsona.b, nota_b; suite green../-servers (~L145–163); V2mcp.serverssanitized keys (~L166–186); regenerate replaces legacy raw keys wholesale (~L188–214); filter fields usetoEqualinstead oftoMatchObject(~L61–62, L119–120).pnpm cicheck605 files / 16,386 tests passed.Validation
pnpm exec vitest run src/features/mcp/opencode-mcp.test.ts— 167 passedpnpm cicheck— fmt, oxlint, typecheck, tests, docs-content, gitignore, supported-tools, cspell, secretlint passedpnpm build— passed (existing unrelated ineffective dynamic import warning)Closes #3698