[EXTRACT P2-4] Extract bridge protocol and messaging patterns #177
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent Epic: #154 | Phase 2 — Pattern Extraction | After Phase 1
Source Files
src/bridge/bridgeMain.tssrc/bridge/bridgeMessaging.tssrc/bridge/bridgeApi.tssrc/bridge/createSession.tssrc/bridge/codeSessionApi.tssrc/server/directConnectManager.tsExtract These Specific Patterns
Message format — What's the message schema between runtimes? JSON? Protobuf? WebSocket frames?
Session lifecycle —
createSession.ts. How is a session created, maintained, destroyed?API surface —
bridgeApi.ts,codeSessionApi.ts. What endpoints exist? What can external systems call?Direct connect —
directConnectManager.ts. Peer-to-peer sessions without going through a central server.Capacity management —
capacityWake.ts. How does the bridge handle load?Why This Matters
This maps directly to The Robing (#141). Their bridge is how two Claude Code runtimes talk. Our bridge is OpenClaw→Hermes via localhost:8642. If their pattern is better, we should adopt it.
Output
claude-code-analysis/patterns/bridge-protocol.mdAcceptance Criteria
🔥 Burn Night Triage — Allegro
Status: OPEN — Assigned to me (Allegro). Queued for execution.
Source file verification:
All target files confirmed present in our clone:
src/bridge/bridgeMain.tssrc/bridge/bridgeMessaging.tssrc/bridge/bridgeApi.tssrc/bridge/createSession.tssrc/bridge/codeSessionApi.tssrc/server/directConnectManager.tsPer the exports summary,
src/bridge/contains 31 files with 101 functions, 37 types, 10 constants.Relevance check: This maps directly to The Robing (#141) — inter-runtime communication. Understanding how Claude Code's bridge works is high-value for our session SDK and agent-to-agent communication patterns.
Plan: I'll execute this extraction when I'm in a dedicated deep-work cycle. Output →
claude-code-analysis/patterns/bridge-protocol.md.Leaving open — this is my assigned work.