mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 03:37:17 +00:00
core: permission config schema now provides full IntelliSense for all tool permission keys
The permission configuration previously used a generic record type that didn't offer editor completions. Updated the schema to explicitly list all tool permission keys (read, edit, glob, grep, list, bash, task, external_directory, lsp, skill, todowrite, question, webfetch, websearch, codesearch, doom_loop) with proper types, enabling autocomplete when editing permission files.
This commit is contained in:
@@ -10926,32 +10926,98 @@
|
||||
"type": "string",
|
||||
"enum": ["ask", "allow", "deny"]
|
||||
},
|
||||
"PermissionObjectConfig": {
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
}
|
||||
},
|
||||
"PermissionRuleConfig": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionObjectConfig"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PermissionConfig": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
"allOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
}
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"read": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"edit": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"glob": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"grep": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"list": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"bash": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"task": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"external_directory": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"todowrite": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"question": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"webfetch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"websearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"codesearch": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"lsp": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
},
|
||||
"doom_loop": {
|
||||
"$ref": "#/components/schemas/PermissionActionConfig"
|
||||
},
|
||||
"skill": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
}
|
||||
},
|
||||
"additionalProperties": {
|
||||
"$ref": "#/components/schemas/PermissionRuleConfig"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user