Files
skills/orchestrator/kvb_orchestrator/signed.py
T
Kevin Veen-BirkenbachandClaude Opus 5.5 f356083a24 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>
2026-11-27 19:05:38 +00:00

59 lines
2.1 KiB
Python

from __future__ import annotations
import importlib.util
import sys
from pathlib import Path
from types import ModuleType
CLIENT = Path(__file__).resolve().parents[1] / "client"
def client_module(name: str, uses: dict[str, ModuleType]) -> ModuleType:
"""Args:
name: a module of orchestrator/client, loaded under its own
kvb_orchestrator_<name> name.
uses: the client modules it imports by their bare names; they are
visible under those names only while it loads.
"""
spec = importlib.util.spec_from_file_location(f"kvb_orchestrator_{name}", CLIENT / f"{name}.py")
module = importlib.util.module_from_spec(spec)
before = {key: sys.modules.get(key) for key in uses}
sys.modules.update(uses)
try:
spec.loader.exec_module(module)
finally:
for key, old in before.items():
if old is None:
sys.modules.pop(key, None)
else:
sys.modules[key] = old
return module
limits = client_module("hub_limits", {})
signing = client_module("signing", {})
passkey = client_module("passkey", {"signing": signing})
verifier = client_module("verifier", {"signing": signing, "passkey": passkey})
pruning = client_module("pruning", {"signing": signing})
def ask_signed(ask: dict) -> dict:
return signing.ask_item(ask["id"], ask["tool"], ask["command"], ask["cwd"], ask["session"])
def review_signed(review: dict) -> dict:
return signing.review_item(review["id"], review.get("repo", ""), review["worktree"], review["branch"], review["tree"])
def operator_signed(row: dict) -> dict:
return signing.operator_item(row["task"], row["command"], row["directory"])
def request_signed(request: dict) -> dict:
return signing.rule_request_item(request["id"], request["kind"], request["tool"], request["pattern"], request["scope"], int(request["expires"]))
def message_signed(message: dict) -> dict:
upload = message["upload"]
return signing.message_item(message["to"], message["class"], message["text"], "" if upload is None else upload["id"], message["voice"] or "", message["voice_sha256"])