feat(keyword-detector): add enabled_expansions config for allowlist control
Add optional enabled_expansions field to keyword_detector config schema. When set, acts as an allowlist - only those expansion types fire. Empty array disables all expansions. Absent field keeps all enabled (backward-compatible). Also supports coexistence with disabled_keywords denylist for fine-grained control. - src/config/schema/keyword-detector.ts: add enabled_expansions field - src/hooks/keyword-detector/detector.ts: apply allowlist filter in detectKeywordsWithType - src/hooks/keyword-detector/hook.ts: pass enabled_expansions from config - src/hooks/keyword-detector/index.test.ts: add 4 tests for enabled_expansions behavior - assets/oh-my-opencode.schema.json: regenerate schema
This commit is contained in:
@@ -6026,6 +6026,20 @@
|
||||
"keyword_detector": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled_expansions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ultrawork",
|
||||
"search",
|
||||
"analyze",
|
||||
"team",
|
||||
"hyperplan",
|
||||
"hyperplan-ultrawork"
|
||||
]
|
||||
}
|
||||
},
|
||||
"disabled_keywords": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
||||
Reference in New Issue
Block a user