feat(operator): Phase 1 — Claude-driven room bridge (join/read/say)

Invert the agent model: a headless OperatorBridge(Client) owns the
websocket while a Claude Code session drives it via a unix control
socket. Reuses Client SRP/Fernet and AgentBridge's reconnect/serve
shape. Ships an hh-bridge CLI (up/read/say/roster/status/down) with a
seq'd in-RAM inbox + asyncio.Condition long-poll (read --wait) for
in-turn autonomy. ACL/sandbox-status frames are recorded for later
phases. Sandbox drive, delegation and nesting are out of scope here.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
leetcrypt
2026-06-26 12:19:47 -07:00
parent 46e5620f89
commit 7e81a059b9
6 changed files with 917 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
"""Operator bridge — a Claude Code session drives a hack-house room as a client.
The room becomes an API: a headless daemon (`OperatorBridge`) owns the
websocket, and the `hh-bridge` CLI (`python -m cmd_chat.operator`) reads/sends
through a local unix socket. See `bridge.py` for the protocol reuse map.
"""
from .bridge import OperatorBridge
from .session import Session
__all__ = ["OperatorBridge", "Session"]