feat(orchestrator): triage, dialog-bound cards and silent expired drops on the hub

093: triage.py classifies every request as open, failed, expired or
stale; POST /api/requests/dismiss hides many requests hub-wide under one
passkey signature with the usual undo window, ledger dismissals.json.
094: an ask or hooked decision lives as long as its Claude dialog: the
hook waits the hub Settings' hook wait (1-60 min, default 60), PostToolUse,
Stop, UserPromptSubmit and SessionEnd hooks close the session's cards,
and a card whose hook stopped waiting reads open in Claude. Closes are
bound to a per-session closer token whose sha256 the hub stores, so a
local process cannot close another session's cards or forge a choice.
GET /api/match/closed lets the page drop closed cards within 5 s.
096: the release signs dismissals of dropped expired cards together with
the inbox entries; no radio reaches the agent.
088: the prune list is no longer capped at 50 tasks.
091: nvidia-smi's error line reaches the GPU row as its cause; limits
take a batch of staged values under one proof.

MEDUSA: 57 findings accepted as false positives after an independent
skeptic review and the operator's word (MM-SCAN-058 regex PLA matching
replay/place/replace, CODEGEN-SCAN-001 on Map.delete and labels,
fixed nvidia-smi argv, localhost-only hook URLs, passkey in tooltips).

Gate missed on the operator's word: break 8 %, the E2E runs after the
page bundle; operator must run make orchestrator-hook and restart every
Claude Code session after the install.

🎯 Fix: 92 %
💥 Break: 8 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 85
🚦 Gate: ⛔ break 8 % > 5

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-28 01:21:37 +00:00
1 parent 909ea85605
commit 8ee52644c8
25 files changed
+1531 -130

No files matched your search

+19 -1
View File
@@ -20,11 +20,12 @@ TRENDS = ("off", "regression", "velocity")
TREND_DAYS = (1, 365)
THRESHOLDS = tuple(range(0, ALWAYS + 1, 10))
WPM = (5, 40)
LATE = ("rates", "morse", "undo", "popups", "agents", "forecast", "match")
LATE = ("rates", "morse", "undo", "popups", "agents", "forecast", "match", "hook")
AGENT_SWITCHES = ("sound", "aloud", "bubbles")
AGENTS_LIMIT = 200
UNDO_RANGE = (0, 60)
MATCH_REFRESH = (1, 60)
HOOK_WAIT = (1, 60)
POPUP_SOURCES = ("resources", "mayday", "dream")
POPUP_UNTIL = 4102444800
NOTIFY = "notify.json"
@@ -62,6 +63,7 @@ SETTINGS = {
"agents": {},
"forecast": False,
"match": {"refresh": 2},
"hook": {"wait": 60},
}
RATE_CHIP = (2, 9)
SPACE_AXES = ("none", "time", "spawn")
@@ -217,6 +219,21 @@ def match_setting(raw: object) -> dict:
return {"refresh": refresh}
def hook_setting(raw: object) -> dict:
"""Args:
raw: {"wait"}: whole minutes the PermissionRequest hook waits for the
hub while Claude shows its own dialog; scripts/orchestrator.sh
hook writes it into the hook's --timeout and its settings.json
timeout, so it applies from the next make orchestrator-hook.
"""
entry = section(raw, "hook", tuple(SETTINGS["hook"]))
low, high = HOOK_WAIT
wait = entry["wait"]
if isinstance(wait, bool) or not isinstance(wait, int) or not low <= wait <= high:
raise ToolError(f"hook.wait must be whole minutes from {low} to {high}")
return {"wait": wait}
def popups_setting(raw: object) -> dict:
data = section(raw, "popups", POPUP_SOURCES)
popups = {}
@@ -288,6 +305,7 @@ def valid_settings(raw: object) -> dict:
"agents": agents_setting(data["agents"]),
"forecast": flag(data["forecast"], "forecast"),
"match": match_setting(data["match"]),
"hook": hook_setting(data["hook"]),
}