fix(control): allow help/start/read-only commands through guardrails
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
TIERS = {
|
||||
'tier1_read': ['status', 'queue list', 'goals show'],
|
||||
'tier1_read': ['status', 'help', '/help', 'start', '/start', 'blocked', 'guardrails show', 'allowlist show', 'queue list', 'goals show'],
|
||||
'tier2_safe_write': ['queue add', 'queue approve', 'queue deny', 'goals add', 'mode autonomous'],
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ HIGH_RISK_KEYWORDS = [
|
||||
|
||||
|
||||
def classify(text: str) -> str:
|
||||
t = text.lower().strip()
|
||||
t = text.lower().lstrip('/').strip()
|
||||
if any(t.startswith(cmd) for cmd in TIERS['tier1_read']):
|
||||
return 'tier1_read'
|
||||
if any(t.startswith(cmd) for cmd in TIERS['tier2_safe_write']):
|
||||
|
||||
Reference in New Issue
Block a user