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
@@ -32,7 +32,8 @@ from .register import (
|
||||
stored_order,
|
||||
)
|
||||
from .reviewing import review_row
|
||||
from .settings import media_origins
|
||||
from .settings import media_origins, valid_settings
|
||||
from .signed import signing
|
||||
from .skill_scripts import OUTPUT_LIMIT
|
||||
|
||||
RADIO_WINDOW = 86400
|
||||
@@ -134,8 +135,25 @@ class View:
|
||||
"graph": drawn,
|
||||
}
|
||||
|
||||
def stream_change(self, raw: dict) -> dict | None:
|
||||
"""Returns:
|
||||
The item the operator's passkey signs when the settings let the
|
||||
page load audio from an origin the saved ones do not, else None.
|
||||
"""
|
||||
origins = media_origins(valid_settings(raw))
|
||||
return signing.stream_item(origins) if set(origins) - set(media_origins(self.settings.get())) else None
|
||||
|
||||
def sign_settings(self, body: bytes) -> dict:
|
||||
change = self.stream_change(decode(body))
|
||||
return self.challenge_for([] if change is None else [change])
|
||||
|
||||
def save_settings(self, body: bytes) -> dict:
|
||||
return self.settings.put(decode(body))
|
||||
payload = decode(body)
|
||||
proof = payload.pop("proof", None)
|
||||
change = self.stream_change(payload)
|
||||
if change is not None:
|
||||
self.operator_proven(proof, change)
|
||||
return self.settings.put(payload)
|
||||
|
||||
def render(self, nonce: str) -> tuple[str, str]:
|
||||
now = time.time()
|
||||
|
||||
Reference in new issue
Block a user