feat(orchestrator): operator composer with signed text and voice
Stream -> Radio gets one line per station with state, play and stop, autoplay and CSP refusals as row state and toast, and the speaking agent pulsing there and in the Orbit and Chord views. The composer sends on all seven channels; push-to-talk records with MediaRecorder, whisper.cpp transcribes off the request thread under per-minute and per-hour caps, and the recording travels only when "Aufnahme anhängen" is ticked. Every operator message, the mayday clear, the day and night board actions and a settings save that adds a stream origin take the passkey; the hub verifies each signature once against the pinned keys before it relays or acts. The container gets TMPDIR=/scratch so that verification no longer fails on the read-only root. A denial now signs its recipient: the inbox and the signing step resolve it through one function, a claim set naming several agents leaves a direct denial without recipient, and a recipient that changed after the inbox showed it is refused with 409. operator_message returns only the signed reason for a denial, never the agent's own words the radio row quotes, and the permission hook hashes the signed recipient too. 🎯 Fix: 95 % 💥 Break: 3 % 💸 Cost: 99 % ⏱️ Time: 68 % 🛡️ Security: 100 % 🏆 Score: 100 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dbd9ec3311
commit
089f8dbb9f
49 files changed
+1971
-241
No files matched your search
@@ -4,6 +4,7 @@ import hashlib
|
||||
import http.server
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import secrets
|
||||
import stat
|
||||
import subprocess
|
||||
@@ -297,6 +298,20 @@ class TestApproval(unittest.TestCase):
|
||||
with mock.patch.object(passkey, "serialization", None):
|
||||
verifier.check(signer.proof(self.payload([self.item], int(self.now) + 60), ORIGIN), self.item, "", self.trust, self.now)
|
||||
|
||||
def test_openssl_without_a_temporary_directory_refuses_cleanly(self):
|
||||
signer = key(-7, "main")
|
||||
data = os.urandom(64)
|
||||
signature = signer.sign(data)
|
||||
with mock.patch.object(tempfile, "tempdir", str(self.base / "no-such-tmp")), self.assertRaisesRegex(signing.Refused, "no writable temporary directory"):
|
||||
passkey.by_openssl(-7, signer.spki, data, signature)
|
||||
self.assertTrue(passkey.by_openssl(-7, signer.spki, data, signature))
|
||||
|
||||
def test_the_container_points_tmpdir_at_a_tmpfs(self):
|
||||
compose = (HUB / "compose.yml").read_text(encoding="utf-8")
|
||||
tmpdir = re.search(r"(?m)^ {6}TMPDIR: (/\S+)$", compose)
|
||||
self.assertIsNotNone(tmpdir, "compose.yml sets no TMPDIR for the hub")
|
||||
self.assertRegex(compose, rf"(?m)^ {{6}}- {re.escape(tmpdir.group(1))}:size=")
|
||||
|
||||
def test_the_pin_cli_writes_the_pinned_keys_with_mode_0600(self):
|
||||
approvers = self.base / "fresh" / "kvb-orchestrator" / "approvers.json"
|
||||
|
||||
|
||||
Reference in new issue
Block a user