feat(control-v2): add blocked/approve/deny aliases and autonomy guardrails

This commit is contained in:
Prime Backup Bot
2026-03-11 21:30:35 +00:00
parent 65e1c64613
commit 985ad4127c
4 changed files with 123 additions and 4 deletions
+7 -2
View File
@@ -3,6 +3,7 @@ import json
import time
from pathlib import Path
from .queue import enqueue
from .guardrails import allowed_now, record_task
AUTON_PATH = Path('/srv/prime-core/state/autonomous-mode.json')
GOALS_PATH = Path('/srv/prime-core/state/goals.json')
@@ -54,8 +55,12 @@ def tick():
prev = int(lm.get(gid, 0))
# seed one planning task per goal every 30m
if now - prev >= 1800:
enqueue('planning', f"Advance goal: {g.get('text','')}")
lm[gid] = now
task = f"Advance goal: {g.get('text','')}"
ok, reason = allowed_now(task)
if ok:
enqueue('planning', task)
record_task(task)
lm[gid] = now
save_last(lm)