mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-10 06:28:26 +00:00
fix(mcp): hide denied resource template tool (#33686)
This commit is contained in:
parent
2684293291
commit
116ac93ddb
1 changed files with 1 additions and 1 deletions
|
|
@ -214,7 +214,7 @@ export function merge(...rulesets: PermissionV1.Ruleset[]): PermissionV1.Rule[]
|
|||
|
||||
export function disabled(tools: string[], ruleset: PermissionV1.Ruleset): Set<string> {
|
||||
const edits = ["edit", "write", "apply_patch"]
|
||||
const reads = ["list_mcp_resources", "read_mcp_resource"]
|
||||
const reads = ["list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource"]
|
||||
return new Set(
|
||||
tools.filter((tool) => {
|
||||
const permission = edits.includes(tool) ? "edit" : reads.includes(tool) ? "read" : tool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue