Skip to content

Commit 9590355

Browse files
committed
readme: add bridge pattern section with the Pocket-to-Claude-Code demo
Adds a new section right after See it running with two screenshots showing the bridge in action end-to-end: 1. fresh Claude Code session receiving the one-paragraph setup prompt and starting the bridge publisher 2. Pocket on a phone, mid-conversation with that Claude Code session via the zhub tunnel Also stages claude-honest-recall.png + pocket-honest-diagnosis.png under docs/screenshots/bridge/ for use in social posts and follow-up docs (the meta-honesty exchange where the bridged session truthfully diagnoses what it knows vs hallucinates). The bridge proves the substrate scales to interactive agents, not just HTTP brains — same OpenAI-compat surface, but the brain is whatever is reading the inbox files.
1 parent 508be98 commit 9590355

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ End to end: Linux VM hosting the hub + publisher → Cloudflare tunnel → Windo
6666

6767
---
6868

69+
## Bridge pattern: an interactive AI session as a publisher
70+
71+
A normal publisher wraps an HTTP brain (Groq, Anthropic, Ollama, …). The **bridge pattern** is for when the brain is *interactive* — a Claude Code session, a Cursor tab, a custom agent loop, even a person at a keyboard. The chat handler writes each request to an inbox file; the agent watches the inbox, replies into an outbox file; the handler returns the reply.
72+
73+
Concretely: a fresh Claude Code session on a laptop, given a one-paragraph setup prompt, becomes reachable from Pocket on a phone in about a minute.
74+
75+
![fresh Claude Code session receiving the bridge setup prompt](docs/screenshots/bridge/claude-receiving-prompt.png)
76+
77+
![Pocket on phone talking to that Claude Code session through zhub](docs/screenshots/bridge/pocket-to-claude-code.png)
78+
79+
End to end: phone → cloudflared tunnel → hub → file bridge → Claude Code session running on a laptop in another room → reply back the same way. The session keeps its full toolset (Bash, Read, Write, all of it) because it *is* a real Claude Code session, not a wrapped API. Bridge latency is ~0.4s file polling plus whatever the agent takes to think.
80+
81+
Full how-to in [`docs/BRIDGE_PATTERN.md`](docs/BRIDGE_PATTERN.md).
82+
83+
---
84+
6985
## Why
7086

7187
Every time you want a custom AI reachable from your tools — an agent, a local model, a RAG stack, an MCP server — you end up rewriting the same plumbing: auth, tunnel, API gateway, SDK, retries, MCP bridge, identity, federation. I got tired of that.
760 KB
Loading
692 KB
Loading
66 KB
Loading
66.9 KB
Loading

0 commit comments

Comments
 (0)