feat(orchestrator): hub requirements 066 to 082 and 084
Radio footer, rules page, schedules editor (System timers and Claude tasks through signed runner jobs), account usage bar, usage explorer with a streamed usage.jsonl, queue Controls tab and override, running tasks on the board, stale task prune with the generic dial, greyed card stamps, commit-tree diffs from the runner preview, VS Code path links, expired asks and decisions that stay as EXPIRED cards (asks keyed by a call digest; an async PostToolUse hook closes those answered in the terminal), the Match refresh hourglass, attachments by paste, drop and paperclip in every text field (page CSP gains img-src blob: for the thumbnails) and the limits board with profiles and a passkey to loosen. Fixes: one red accept on a red-gate commit and no release while a risk is open, the send bar footer segments share one height, the mic button survives a redraw, new Match cards queue before the release card. E2E specs were still running at commit time (operator order); their failures follow as separate fixes. 🎯 Fix: 88 % 💥 Break: 8 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 81 🚦 Gate: ⛔ fix 88 % < 90, break 8 % > 5 (committed on the operator's word) Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dc0d578eca
commit
f356083a24
149 files changed
+10646
-963
No files matched your search
@@ -10,6 +10,7 @@ STALE = 15 * 60
|
||||
UNANSWERED = 10 * 60
|
||||
SNAPSHOT = "agent-sessions.json"
|
||||
SNAPSHOT_STALE = 5 * 60
|
||||
BUSY = "busy"
|
||||
|
||||
|
||||
def fresh_snapshot(path: Path, now: float) -> dict[str, dict] | None:
|
||||
@@ -38,6 +39,35 @@ def read_snapshot(path: Path, now: float) -> dict[str, dict]:
|
||||
return fresh_snapshot(path, now) or {}
|
||||
|
||||
|
||||
def status_time(record: dict) -> float | None:
|
||||
"""Returns:
|
||||
The record's statusUpdatedAt, which the host stores in
|
||||
milliseconds, in epoch seconds; None when it is no valid time.
|
||||
"""
|
||||
stamp = record.get("statusUpdatedAt")
|
||||
return epoch(stamp / 1000) if isinstance(stamp, int | float) and not isinstance(stamp, bool) else None
|
||||
|
||||
|
||||
def beats(sessions: dict[str, dict], claims: list[dict]) -> dict[str, float]:
|
||||
"""Args:
|
||||
sessions: the session records of read_snapshot.
|
||||
claims: the council claims.
|
||||
|
||||
Returns:
|
||||
The latest heartbeat per agent name as agent() reads it, in epoch
|
||||
seconds: the status_time of each running busy session record and
|
||||
the beat of each claim an agent other than the Operator holds.
|
||||
Kanban.marks judges how fresh a beat must be.
|
||||
"""
|
||||
stamps = [(agent(record.get("name")), status_time(record)) for record in sessions.values() if record.get("running") is True and record.get("status") == BUSY]
|
||||
stamps += [(claim["agent"], claim["beat"]) for claim in claims if claim["agent"] != HUMAN]
|
||||
found: dict[str, float] = {}
|
||||
for name, beat in stamps:
|
||||
if name and beat is not None:
|
||||
found[name] = max(beat, found.get(name, beat))
|
||||
return found
|
||||
|
||||
|
||||
def unanswered(news: list[dict], now: float) -> list[tuple[str, float]]:
|
||||
"""Returns:
|
||||
(callee, call time) of every call older than UNANSWERED without a
|
||||
@@ -85,9 +115,8 @@ def presence(sessions: dict[str, dict], parts: dict[str, str], mode: str, claims
|
||||
if record.get("running") is not True:
|
||||
states[sid] = "dead"
|
||||
continue
|
||||
busy = record.get("status") == "busy"
|
||||
stamp = record.get("statusUpdatedAt")
|
||||
updated = (epoch(stamp / 1000) if isinstance(stamp, int | float) and not isinstance(stamp, bool) else None) or 0
|
||||
busy = record.get("status") == BUSY
|
||||
updated = status_time(record) or 0
|
||||
called = names.get(sid, set()) | {agent(record.get("name")), sid}
|
||||
if (busy and now - updated > STALE) or any(name in called and ts > updated for name, ts in late):
|
||||
states[sid] = "unreachable"
|
||||
|
||||
Reference in new issue
Block a user