Repository navigation
feat(core): support glob patterns in mcp.allowed and mcp.excluded #6012
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
Changes from 7 commits
e58acf2
1f1286b
1f2908e
840c0ab
0a22670
4264185
64ab9fe
7e64cea
11ba2ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ import type { | |
| ToolInvocation, | ||
| } from './tools.js'; | ||
| import { Kind, BaseDeclarativeTool, BaseToolInvocation } from './tools.js'; | ||
| import type { Config } from '../config/config.js'; | ||
| import { type Config, matchesAnyServerPattern } from '../config/config.js'; | ||
|
DennisYu07 marked this conversation as resolved.
Resolved
|
||
| import { spawn } from 'node:child_process'; | ||
| import { StringDecoder } from 'node:string_decoder'; | ||
| import type { SendSdkMcpMessage } from './mcp-client.js'; | ||
|
|
@@ -449,7 +449,7 @@ export class ToolRegistry { | |
| // while isMcpServerDisabled still returns false, mis-reporting | ||
| // an intentional disable as a connectivity failure. | ||
| const currentExcluded = this.config.getExcludedMcpServers() || []; | ||
| if (!currentExcluded.includes(serverName)) { | ||
| if (!matchesAnyServerPattern(serverName, currentExcluded)) { | ||
| this.config.setExcludedMcpServers([...currentExcluded, serverName]); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] Auto-disable writes raw Escape glob metacharacters when appending literals, or document the constraint that server names must not contain — qwen3.7-max via Qwen Code /review |
||
| } | ||
| } finally { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.