[Fix] Approval control no longer gates Roomote-internal MCP servers - #3101
Open
roomote-roomote[bot] wants to merge 6 commits into
Open
roomote-roomote[bot] wants to merge 6 commits into
roomote-roomote[bot] wants to merge 6 commits into
Conversation
Contributor
|
No code issues found. See task
Reviewed a697dcd |
Contributor
Author
|
All five review issues are fixed; latest commit a697dcd8:
The |
Contributor
|
I saw the mention, but I need your GitHub account linked to Roomote before issue and PR comments can start work here. Link it from Settings -> Linked Accounts and then mention me again. If you'd like an invite to join the community Roomote, please send MrUbens a message on Discord: http://discord.gg/roomote |
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 22, 2026 15:09
8 tasks
This branch has not been deployed
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.
Related issue
Related to floating product feedback from an internal owner; no linked issue. (If required to close this PR, please have a maintainer rename.)
Why this PR exists
What changed
Per-tool integration approvals excluded Roomote's own MCP servers: the internal classification (
INTERNAL_MCP_SERVER_IDS:roomote,_roomote_http_integrations,gbrain) now labels those servers approval-exempt, so they are no longer governed by the shared policy resolver, compile into no native ask/deny rules, return no blocks at the integration-boundary proxy, and no longer fall through the SDK's task-approval recorder. The admin listing, personal policy setters (single and bulk), session override setter, and pending/override GET route all reject or filter internal ids, and the settings UI hides approval controls for them.A native permission key cannot name which server half it came from, so a key an actual internal tool flattens to (for example a custom
gbrain_getserver'spagetool colliding with the Brain's ownget_page) is left ungated in both compilers: enforcing it would also hold the exempt internal tool. The drop is exact — a custom server whose id merely starts with an internal server's name keeps its rules. The Brain's agent-facing tool set is the existing static allowlist (GBRAIN_READ_TOOL_NAMES, now in@roomote/typesnext toBRAIN_MCP_ID);_roomote_http_integrationsis structurally collision-free because its flattened keys start with_, which no governable server name can produce;roomoteis not mounted in task runs. The integration proxy remains the authoritative per-integration boundary for task runs.New custom MCP servers may not take a name starting with an internal server prefix (
roomote_,gbrain_): a flattened-key collision requires exactly that prefix, so no external tool'saskpolicy can become permanently unapprovable through a native-key collision. Legacy rows with such names stay editable (names are immutable) but are never mounted into tasks — their tools cannot gate an exempt internal tool and their own policies stay inert. The FastaddRemoteCustomMcpForFastcreation path enforces the same prefix guard, so agents cannot create rows that would silently never mount.Auto mode (#3084) also honors the exemption: internal servers get no
<server>_*wildcard ask rule.External built-ins and custom MCPs keep exactly the same approval behavior they had; this only removes approval control from genuine Roomote-internal infrastructure (do not exempt Notion/Linear/Granola-like in-process catalog integrations).
How it was tested
Regression tests added:
@roomote/types: resolver never governs internal ids; task-rule compiler skips them and drops only the exact native keys of actual internal tools;isInternalMcpServerpredicate coverage; structural invariant that the HTTP integrations broker cannot collide; create-only name rejection and legacy-name update acceptance; no Auto wildcard for internal servers.@roomote/api:resolveProxyToolApprovalBlocksreturns no blocks, no Auto default, and no shadow assessment for internal ids.@roomote/cloud-agents: fast-agent rule builder emits no rules for internal ids and drops rules for keys shared with internal tools.@roomote/sdk:requestTaskToolApprovalreturnsnot_requiredfor internal ids; legacy internal-prefixed custom servers never mount; the Fast creation path rejects internal-prefixed names before any fetch or write.Suites run: full
@roomote/types(1172), sdk mcp-connections (50), sdk task-tool-approvals (13), sdk add-remote-custom-mcp (39), API enforcement (11), web integration-tool-policies and custom-mcp-servers commands (24). CITestcheck passes at a697dcd.Screenshots
Checklist
[Fix],[Feat],[Improve],[Refactor],[Docs], or[Chore]followed by a user-facing descriptionpnpm lintandpnpm check-typespass locallypnpm changeset