feat(runtime): per-skill capability scopes + inline MCP broker#113
Open
theyavuzarslan wants to merge 3 commits into
Open
feat(runtime): per-skill capability scopes + inline MCP broker#113theyavuzarslan wants to merge 3 commits into
theyavuzarslan wants to merge 3 commits into
Conversation
Resolve a per-skill capability scope (exec/network/filesystem allowlists) and emit CAPABILITY_*_DENIED reasons when an action falls outside it. Local capability manifests overlay cloud policy with local precedence, and capability denials bypass the auto-allow gate. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add a JSON-RPC stdio proxy that vets tools/call traffic against the runtime policy and fails closed on both block and require_approval. Exposed via a new `mcp-broker` CLI command. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AgentGuard PR ReviewI found one actionable issue in the patch.
|
- mcp-broker: funnel downstream stdout and synthesized JSON-RPC errors through a single serialized, backpressure-aware writer so an injected veto can never interleave mid-message with a downstream response. - mcp-broker: wait for in-flight evaluations and their client writes to drain before resolving on child exit, so a block response is never dropped when the child exits early. Child exit code still propagates. - capabilities: distinguish a missing manifest (silent, normal) from a present-but-malformed one (loud stderr warning) instead of silently dropping all per-skill confinement. - capabilities: document that the "*" wildcard scope only applies to skills without an explicit entry and is an opt-in, never an override. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Two independent runtime features for review:
CAPABILITY_*_DENIEDreasons when an action falls outside it. Local capability manifests overlay cloud policy with local precedence; capability denials bypass the auto-allow gate.tools/calltraffic against the runtime policy and fails closed on bothblockandrequire_approval. Exposed via a newmcp-brokerCLI command.Test plan
npm run build(tsc, clean)node --test dist/tests/*.test.js— 436 tests, 0 failuressrc/tests/capabilities.test.ts,src/tests/mcp-broker.test.ts🤖 Generated with Claude Code