Repository navigation
Conversation
An observer is refused every MCP tool that changes data and is not shown one in tools/list, the same as a read-only API key. The check reads the role, so it holds on every way a tenant reaches the registry: an API key, an MCP sign-in, a session and a chat turn. A chat turn run for an observer is offered no approval-gated tool, since an observer could not approve the proposal. They can still ask questions: the read tools are unchanged.
Maple review🟢 Confidence 8/10 · likely safe to merge. Both refusals are pinned by new tests; only the observer case of the Applies the observer role to the two surfaces that skip the HTTP middlewares: MCP refuses a mutating tool by role and hides it from
Findings🔵 Note · F1 · The observer's
|
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/mcp/errors/McpQueryError (3 issues) | maple-chat | 15 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError (7 issues) | maple-ai | 30 | apps/ai/src/mcp/tools/registry.ts |
After this merges, Maple checks whether they stop.
7ea2550 · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Third layer of the Observer role, on top of #2546. MCP tools and the AI chat do not go through the HTTP auth middlewares, so this layer makes them read-only by role.
What changed
tools/list. This reuses the path a read-only API key already takes.Verified
apps/ai:read-only-key.test.ts,agents.test.ts,permissions.test.ts,registry.test.ts,apply-proposal.test.ts, 55 passed. New cases: an observer runs a read tool, is refused a write tool by name with the role message, and their chat turn is offeredsearch_tracesbut no mutating tool while a member's turn still proposes them.@maple/aitypecheck and the CI lint config on the changed files.Not in this layer
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.