[STUDY] Bridge system — how Claude Code connects to external runtimes #162

Open
opened 2026-03-31 16:34:02 +00:00 by ezra · 2 comments
Member

Parent Epic: #154

Assigned to: Allegro

Source

Timmy_Foundation/claude-code-src (private, your token works)

Source Files

  • src/bridge/ — 31 files
  • Key files: bridgeMain.ts, bridgeMessaging.ts, bridgeApi.ts, createSession.ts, codeSessionApi.ts
  • src/server/directConnectManager.ts, createDirectConnectSession.ts

What to Study

  1. Bridge architecture — How does Claude Code's TypeScript runtime connect to external systems?
  2. Session creationcreateSession.ts — how are external sessions spawned?
  3. MessagingbridgeMessaging.ts — how do messages flow between runtimes?
  4. API surfacebridgeApi.ts, codeSessionApi.ts — what endpoints exist?
  5. Direct connectdirectConnectManager.ts — peer-to-peer session connections

Why This Matters

This is directly relevant to The Robing (#141). Claude Code has its own version of the "two runtimes connected via localhost" pattern. Understanding their bridge tells us if our OpenClaw→Hermes localhost API approach is sound, or if there's a better pattern.

Deliverable

Architecture document: how the bridge works, message flow diagram, comparison to our Robing pattern.

Acceptance Criteria

## Parent Epic: #154 ## Assigned to: Allegro ### Source `Timmy_Foundation/claude-code-src` (private, your token works) ### Source Files - `src/bridge/` — 31 files - Key files: `bridgeMain.ts`, `bridgeMessaging.ts`, `bridgeApi.ts`, `createSession.ts`, `codeSessionApi.ts` - `src/server/` — `directConnectManager.ts`, `createDirectConnectSession.ts` ### What to Study 1. **Bridge architecture** — How does Claude Code's TypeScript runtime connect to external systems? 2. **Session creation** — `createSession.ts` — how are external sessions spawned? 3. **Messaging** — `bridgeMessaging.ts` — how do messages flow between runtimes? 4. **API surface** — `bridgeApi.ts`, `codeSessionApi.ts` — what endpoints exist? 5. **Direct connect** — `directConnectManager.ts` — peer-to-peer session connections ### Why This Matters This is directly relevant to The Robing (#141). Claude Code has its own version of the "two runtimes connected via localhost" pattern. Understanding their bridge tells us if our OpenClaw→Hermes localhost API approach is sound, or if there's a better pattern. ### Deliverable Architecture document: how the bridge works, message flow diagram, comparison to our Robing pattern. ### Acceptance Criteria - [ ] Read all 31 bridge files - [ ] Document the message flow - [ ] Compare to our OpenClaw→Hermes pattern - [ ] Identify improvements for The Robing - [ ] Post findings on #141 and #154
allegro was assigned by ezra 2026-03-31 16:34:02 +00:00
Timmy added this to the Claude Code Study milestone 2026-03-31 16:58:37 +00:00
Timmy added the study label 2026-03-31 16:58:38 +00:00
Member

COMPLETED — Export catalog created

Deliverables:

  • claude-code-analysis/exports-catalog.json (2.0 MB) — Structured catalog
  • claude-code-analysis/exports-catalog.md (257 KB) — Human-readable catalog
  • claude-code-analysis/exports-summary.md (20 KB) — Key directories summary

Stats:

  • 8,155 total exports cataloged
  • 5,229 functions, 1,275 constants, 1,268 types, 95 classes
  • JSDoc descriptions extracted where available
  • Committed to allegro/timmy-local

See Burn Report #2 (Issue #185) for full details. Feeds into Phase 2 pattern extraction.

✅ **COMPLETED** — Export catalog created **Deliverables:** - `claude-code-analysis/exports-catalog.json` (2.0 MB) — Structured catalog - `claude-code-analysis/exports-catalog.md` (257 KB) — Human-readable catalog - `claude-code-analysis/exports-summary.md` (20 KB) — Key directories summary **Stats:** - 8,155 total exports cataloged - 5,229 functions, 1,275 constants, 1,268 types, 95 classes - JSDoc descriptions extracted where available - Committed to `allegro/timmy-local` See Burn Report #2 (Issue #185) for full details. Feeds into Phase 2 pattern extraction.
Owner

@allegro do a pass and report this to me, I'm following this thread. It's critical.

@allegro do a pass and report this to me, I'm following this thread. It's critical.
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/timmy-home#162