@hua-labs/tap 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/bin/tap-comms.mjs +2 -0
- package/dist/bridges/codex-bridge-runner.d.mts +2 -0
- package/dist/bridges/codex-bridge-runner.mjs +1009 -0
- package/dist/bridges/codex-bridge-runner.mjs.map +1 -0
- package/dist/cli.d.mts +2 -0
- package/dist/cli.mjs +4166 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +272 -0
- package/dist/index.mjs +439 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# tap
|
|
2
|
+
|
|
3
|
+
> Your AI sessions can already work in parallel. tap gives them a shared protocol.
|
|
4
|
+
>
|
|
5
|
+
> Sessions end. Systems grow.
|
|
6
|
+
|
|
7
|
+
**A local-first, cross-model orchestration protocol for AI coding agents.**
|
|
8
|
+
|
|
9
|
+
Run multiple AI agents (Claude, Codex, Gemini) on the same codebase — in parallel.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What you can do with tap
|
|
14
|
+
|
|
15
|
+
- Run multiple AI agents in parallel on one repo
|
|
16
|
+
- Split work into independent tasks with isolated worktrees
|
|
17
|
+
- Communicate between Claude, Codex, and Gemini sessions
|
|
18
|
+
- Review code across models (Codex reviews Claude's code, and vice versa)
|
|
19
|
+
- Keep all communication and history in git
|
|
20
|
+
- Continue work across sessions and machines — nothing is lost
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Why tap?
|
|
25
|
+
|
|
26
|
+
Because using one AI at a time is slow.
|
|
27
|
+
|
|
28
|
+
You already have Claude Code, Codex, Gemini CLI. They're powerful alone. But they can't see each other. tap connects them — through files, not proxies.
|
|
29
|
+
|
|
30
|
+
- **No server.** Messages are markdown files in a git repo.
|
|
31
|
+
- **No vendor lock-in.** Works with any model that can read/write files.
|
|
32
|
+
- **No lost context.** Everything persists in git — messages, reviews, findings, retros.
|
|
33
|
+
- **No TOS violations.** Only official interfaces — MCP, App Server WebSocket, fs.watch.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @hua-labs/tap init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
One command. Sets up comms directory, config, and MCP server entry. Works on Windows, macOS, and Linux.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## How It Works
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
tap (protocol) --> bridge (delivery) --> agent (execution)
|
|
51
|
+
git (memory) <-- human (governance) <-- tower (decision)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
No central server. The file system is the message bus — git is the transport and history.
|
|
55
|
+
|
|
56
|
+
Messages are plain markdown files: `inbox/YYYYMMDD-{from}-{to}-{subject}.md`
|
|
57
|
+
|
|
58
|
+
**Delivery modes:**
|
|
59
|
+
- **Claude**: MCP channel push — real-time
|
|
60
|
+
- **Codex**: App Server WebSocket bridge — real-time
|
|
61
|
+
- **Gemini**: File-watch notification — experimental
|
|
62
|
+
|
|
63
|
+
**Cross-device?** Point both machines at the same git repo. Done.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Quick Start
|
|
68
|
+
|
|
69
|
+
### 1. Two agents talking
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Terminal 1 — Agent A
|
|
73
|
+
npx @hua-labs/tap init
|
|
74
|
+
claude --dangerously-load-development-channels server:tap-comms
|
|
75
|
+
# Inside Claude: tap_set_name("agent-a")
|
|
76
|
+
# Inside Claude: tap_reply(to: "agent-b", subject: "hello", content: "can you see this?")
|
|
77
|
+
|
|
78
|
+
# Terminal 2 — Agent B
|
|
79
|
+
cd same-repo
|
|
80
|
+
claude
|
|
81
|
+
# Inside Claude: tap_set_name("agent-b")
|
|
82
|
+
# Inside Claude: tap_list_unread()
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
That's it. Two Claude sessions, talking through files. You should see messages appear in the other session instantly.
|
|
86
|
+
|
|
87
|
+
### 2. Parallel work with worktrees
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Set up isolated workspaces
|
|
91
|
+
npx @hua-labs/tap init-worktree --path ../wt-1 --branch feat/auth
|
|
92
|
+
npx @hua-labs/tap init-worktree --path ../wt-2 --branch feat/dashboard
|
|
93
|
+
|
|
94
|
+
# Each agent works in its own worktree — no git conflicts
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. Add Codex to the team
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Register and start bridge
|
|
101
|
+
npx @hua-labs/tap add codex --name reviewer --port 4501
|
|
102
|
+
npx @hua-labs/tap bridge start codex-reviewer --agent-name reviewer
|
|
103
|
+
|
|
104
|
+
# You can now send a message from Claude and see it appear in Codex in real time.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## CLI Commands
|
|
110
|
+
|
|
111
|
+
| Command | Description |
|
|
112
|
+
|---------|-------------|
|
|
113
|
+
| `tap init` | Initialize tap in a project |
|
|
114
|
+
| `tap init-worktree` | Bootstrap a git worktree with deps, permissions, MCP config |
|
|
115
|
+
| `tap add <runtime>` | Register a runtime (codex, gemini) |
|
|
116
|
+
| `tap remove <runtime>` | Remove a registered runtime |
|
|
117
|
+
| `tap bridge start` | Start real-time bridge for a runtime |
|
|
118
|
+
| `tap bridge stop` | Stop a running bridge |
|
|
119
|
+
| `tap bridge status` | Show bridge health and heartbeat |
|
|
120
|
+
| `tap status` | Show registered runtimes and instances |
|
|
121
|
+
| `tap dashboard` | Unified ops view — agents, bridges, PRs |
|
|
122
|
+
| `tap serve` | Start MCP server for development |
|
|
123
|
+
|
|
124
|
+
All commands support `--json` for automation.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Advanced Features
|
|
129
|
+
|
|
130
|
+
### Multi-Instance Bridge
|
|
131
|
+
|
|
132
|
+
Run multiple agents on the same runtime:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx @hua-labs/tap add codex --name reviewer --port 4501
|
|
136
|
+
npx @hua-labs/tap add codex --name builder --port 4502
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Each instance gets its own PID, state directory, and heartbeat.
|
|
140
|
+
|
|
141
|
+
### Headless Reviewer
|
|
142
|
+
|
|
143
|
+
Run Codex as a background review daemon — no TUI:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npx @hua-labs/tap bridge start codex --headless --role reviewer --agent-name my-reviewer
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Auto-polls inbox for review requests. Terminates based on configurable conditions (round cap, quality threshold, repetition detection).
|
|
150
|
+
|
|
151
|
+
### Ops Dashboard
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx @hua-labs/tap dashboard
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Agents, bridges, and PR status in one screen. `--watch` for live updates.
|
|
158
|
+
|
|
159
|
+
### Config System
|
|
160
|
+
|
|
161
|
+
Two-layer config for portability:
|
|
162
|
+
|
|
163
|
+
- `tap-config.json` — shared, git-tracked
|
|
164
|
+
- `tap-config.local.json` — machine-specific, gitignored
|
|
165
|
+
|
|
166
|
+
Automatic runtime resolution: `.node-version` + fnm probing + tsx fallback.
|
|
167
|
+
|
|
168
|
+
### Generational Knowledge Transfer
|
|
169
|
+
|
|
170
|
+
Agents are stateless — sessions end, context is lost. tap solves this with files:
|
|
171
|
+
|
|
172
|
+
- **Retros** — what worked, what didn't
|
|
173
|
+
- **Handoffs** — context for the next session
|
|
174
|
+
- **Findings** — discoveries that become backlog items
|
|
175
|
+
- **Letters** — agent-to-agent or agent-to-human messages
|
|
176
|
+
|
|
177
|
+
Used across multiple sessions ("generations") where each session builds on previous findings and handoffs.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Results
|
|
182
|
+
|
|
183
|
+
Used in production multi-session workflows:
|
|
184
|
+
|
|
185
|
+
| Metric | Value |
|
|
186
|
+
|--------|-------|
|
|
187
|
+
| Generations | 11 |
|
|
188
|
+
| Agents | 50+ |
|
|
189
|
+
| Models | Claude + Codex + Gemini |
|
|
190
|
+
| PRs merged | 55+ |
|
|
191
|
+
| Platforms | Windows + macOS + Linux |
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Docs
|
|
196
|
+
|
|
197
|
+
| Document | Description |
|
|
198
|
+
|----------|-------------|
|
|
199
|
+
| [ARCHITECTURE.md](ARCHITECTURE.md) | Design decisions, data model, delivery modes |
|
|
200
|
+
| [CHANGELOG.md](CHANGELOG.md) | Version history |
|
|
201
|
+
| [Protocol Rules](docs/) | Rules for agent coordination |
|
|
202
|
+
| [Cross-Platform Strategy](docs/cross-platform-strategy.md) | Windows, macOS, Linux support |
|
|
203
|
+
| [Codex Bridge Deep Dive](docs/codex-app-server-bridge.md) | WebSocket injection details |
|
|
204
|
+
| [Multi-Device Hub](docs/MULTI-DEVICE-HUB.md) | Cross-device via git sync |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Contributing
|
|
209
|
+
|
|
210
|
+
Built by [HUA Labs](https://github.com/HUA-Labs). Issues and PRs welcome.
|
|
211
|
+
|
|
212
|
+
The best way to contribute? Use tap, run a generation, and submit your retro as a PR.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
*Built by Claude (Anthropic) + Codex (OpenAI) + Gemini (Google) + Devin (human).*
|
|
217
|
+
|
|
218
|
+
*"Sessions end. Systems grow."*
|
|
219
|
+
|
|
220
|
+
**MIT License** — HUA Labs
|