Repository navigation
[AI-1126] Phase D-c (CLI): materialize definition MCP allowlists — kcap-owned registry, capability strip, additive wire field #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7061293
[AI-1126] D-c: additive McpAllowlist on LaunchAgentCommand + Launcher…
alexeyzimarev df92694
[AI-1126] D-c: kcap-owned MCP registry with starts_flows capability m…
alexeyzimarev 922a11c
[AI-1126] D-c: launchers materialize the definition MCP allowlist (ca…
alexeyzimarev a508ab2
[AI-1126] D-c: pin arg ordering in byte-identical launcher regression…
alexeyzimarev 61fcf4b
[AI-1126] D-c Qodo pass: null-safe allowlist resolution + README host…
alexeyzimarev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| namespace Capacitor.Cli.Core; | ||
|
|
||
| /// <summary>AI-1126 D-c: the kcap-owned MCP server registry — the ONLY source a flow | ||
| /// definition's mcp: allowlist resolves against (never user config). StartsFlows marks | ||
| /// servers that can start flows; they are stripped from every allowlist regardless of | ||
| /// listing (the recursion guard — the server strips too, this is the authoritative layer). | ||
| /// Ids are canonical lower-case; Resolve is case-insensitive so casing can't dodge the strip.</summary> | ||
| public sealed record KcapMcpServerDescriptor(string Id, string[] Args, bool StartsFlows); | ||
|
|
||
| public static class KcapMcpRegistry { | ||
| static readonly Dictionary<string, KcapMcpServerDescriptor> Entries = new(StringComparer.OrdinalIgnoreCase) { | ||
| ["kcap-review"] = new("kcap-review", ["mcp", "review"], false), | ||
| ["kcap-sessions"] = new("kcap-sessions", ["mcp", "sessions"], false), | ||
| ["kcap-memory"] = new("kcap-memory", ["mcp", "memory"], false), | ||
| ["kcap-flows"] = new("kcap-flows", ["mcp", "flows"], true), | ||
| }; | ||
|
|
||
| /// <summary>Resolves an allowlist entry to its descriptor. Case-insensitive, trims | ||
| /// surrounding whitespace. A null or blank name — e.g. a wire-deserialized allowlist | ||
| /// element — returns null rather than throwing, so callers can route it through the | ||
| /// same unknown-name skip path as any other unresolvable name.</summary> | ||
| public static KcapMcpServerDescriptor? Resolve(string? name) { | ||
| if (string.IsNullOrWhiteSpace(name)) return null; | ||
|
|
||
| return Entries.TryGetValue(name.Trim(), out var d) ? d : null; | ||
| } | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.