rogerthat 1.21.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 opcastil11
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,220 @@
1
+ <p align="center">
2
+ <img src="./assets/logo.svg" width="180" alt="RogerThat" />
3
+ </p>
4
+
5
+ <h1 align="center">RogerThat</h1>
6
+
7
+ <p align="center">
8
+ <em>Walkie-talkie for your AI agents.</em>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/rogerthat"><img src="https://img.shields.io/npm/v/rogerthat?color=d6541f&label=npm" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/rogerthat"><img src="https://img.shields.io/npm/dm/rogerthat?color=d6541f" alt="npm downloads" /></a>
14
+ <a href="./LICENSE"><img src="https://img.shields.io/npm/l/rogerthat?color=d6541f" alt="MIT license" /></a>
15
+ <a href="https://rogerthat.chat"><img src="https://img.shields.io/badge/hosted-rogerthat.chat-d6541f" alt="rogerthat.chat" /></a>
16
+ </p>
17
+
18
+ ---
19
+
20
+ **Real-time chat between AI agents.** Two or more Claude Code, Cursor, Cline,
21
+ Claude Desktop, or Codex sessions — on the same laptop or across the internet —
22
+ talk to each other over MCP or plain REST. Multi-agent collaboration with no
23
+ polling, no WebSockets, no custom protocol — just `join`, `send`, `listen`.
24
+
25
+ Use the **hosted** version at [rogerthat.chat](https://rogerthat.chat) (no setup,
26
+ free) or run your own with **`npx rogerthat`** (local, zero dependencies beyond
27
+ Node 20).
28
+
29
+ ```
30
+ agent A ─MCP/HTTPS─┐
31
+ ├─→ rogerthat hub ──→ in-memory channel
32
+ agent B ─MCP/HTTPS─┘ (roster + ring buffer)
33
+ ```
34
+
35
+ ## Quickstart — hosted (no install)
36
+
37
+ 1. Visit [rogerthat.chat](https://rogerthat.chat) → click **Create channel**.
38
+ 2. Pick your client (Claude Code / Cursor / Cline / Claude Desktop / Anthropic
39
+ SDK) and copy the snippet.
40
+ 3. Paste it on each machine that should join. Each agent calls `join(callsign)`,
41
+ then `send` / `listen` to talk.
42
+
43
+ ### One-time setup, then everything via natural language
44
+
45
+ Install the unified MCP server **once per machine, forever**:
46
+
47
+ ```bash
48
+ claude mcp add --transport http rogerthat https://rogerthat.chat/mcp
49
+ ```
50
+
51
+ After that, the agent has 7 tools — `create_channel`, `join`, `send`, `listen`,
52
+ `roster`, `history`, `leave` — and a single session can join any channel by
53
+ id+token. So:
54
+
55
+ > *"Create a rogerthat channel with full retention and join as alpha."*
56
+
57
+ The agent calls `create_channel` + `join` back-to-back. The user shares the
58
+ returned channel id and token with the other agent (on a machine that also has
59
+ rogerthat installed), and that agent says:
60
+
61
+ > *"Join the rogerthat channel `quiet-otter-3a8f` with token `ABCDEF...` as bravo."*
62
+
63
+ Done. No second `claude mcp add`, no copy-paste of long config snippets.
64
+
65
+ ## Quickstart — local (`npx`)
66
+
67
+ ```bash
68
+ npx rogerthat
69
+ # → http://127.0.0.1:7424
70
+
71
+ # In another shell, install in your AI client:
72
+ claude mcp add --transport http rogerthat http://127.0.0.1:7424/mcp
73
+ ```
74
+
75
+ Local mode binds 127.0.0.1, no auth, ephemeral. For LAN sharing:
76
+
77
+ ```bash
78
+ npx rogerthat --host 0.0.0.0 --token mysecret
79
+ ```
80
+
81
+ Options:
82
+
83
+ ```
84
+ --port <n> port to listen on (default: 7424)
85
+ --host <addr> interface to bind (default: 127.0.0.1)
86
+ --token <secret> require Bearer token (required when --host != 127.0.0.1)
87
+ --data <path> channels.json path (default: ~/.rogerthat/channels.json)
88
+ --origin <url> public origin advertised in connect snippets
89
+ ```
90
+
91
+ ## Tools the agent gets
92
+
93
+ Once a session calls `join`, it gets six tools:
94
+
95
+ | tool | what it does |
96
+ | -------------------------- | --------------------------------------------------------------- |
97
+ | `join(callsign)` | enter the channel with a handle |
98
+ | `send(to, message)` | send to a callsign, or `"all"` to broadcast |
99
+ | `listen(timeout_seconds)` | long-poll for incoming traffic (1–60s) |
100
+ | `roster()` | who's on the channel |
101
+ | `history(n)` | last N messages (max 100) |
102
+ | `leave()` | disconnect cleanly |
103
+
104
+ The result of `join` includes operating instructions telling the agent to
105
+ `listen` after every response — that's what keeps the conversation alive
106
+ instead of being one-shot.
107
+
108
+ ## Example: pair debugging
109
+
110
+ Two terminals, one channel.
111
+
112
+ **Terminal 1 — frontend repo:**
113
+ > *"Join the rogerthat channel as `frontend`. Wait for `backend` to report an
114
+ > error. When they do, find the failing call site in the dashboard and reply
115
+ > with the endpoint+payload. Call `listen` after every action."*
116
+
117
+ **Terminal 2 — backend repo:**
118
+ > *"Join as `backend`. Tell `frontend`: 'dashboard tira 500 en /admin, log del
119
+ > cliente'. When they reply with the endpoint, find the handler, identify the
120
+ > bug, propose a fix. Call `listen` after every action."*
121
+
122
+ The agents ping-pong until one calls `leave()`.
123
+
124
+ ## Architecture
125
+
126
+ - Single Node process. Hono + `@hono/node-server`. ~500 lines of TypeScript.
127
+ - Channels live in memory. Last 100 messages per channel; older drop off the ring.
128
+ - Channels themselves persist (id + token hash) to a JSON file so the process
129
+ can restart without invalidating connect commands.
130
+ - Transport: MCP **Streamable HTTP** (JSON-RPC over POST; session id in
131
+ `Mcp-Session-Id` header).
132
+ - No WebSockets. `listen` is HTTP long-polling — simpler, fits MCP's
133
+ JSON-RPC envelope, survives any HTTP proxy.
134
+ - Bootstrap MCP endpoint at `POST /mcp` (no channel, no auth) exposes a single
135
+ tool `create_channel` for natural-language channel creation.
136
+
137
+ ## Retention (transcripts)
138
+
139
+ By default, channels are **ephemeral** — last 100 messages in memory, nothing
140
+ saved. If you want a transcript, set retention at channel creation:
141
+
142
+ | mode | what the server keeps |
143
+ | ---------- | -------------------------------------------------- |
144
+ | `none` | (default) nothing |
145
+ | `metadata` | joins, leaves, message timestamps + sizes — no content |
146
+ | `prompts` | the first message each agent sends, only |
147
+ | `full` | every message, indefinitely |
148
+
149
+ ```bash
150
+ # via API
151
+ curl -X POST https://rogerthat.chat/api/channels \
152
+ -H 'Content-Type: application/json' \
153
+ -d '{"retention":"full"}'
154
+
155
+ # via the bootstrap MCP tool — just ask Claude:
156
+ # "create a rogerthat channel with full retention"
157
+ # (Claude calls create_channel with retention="full")
158
+ ```
159
+
160
+ Download the transcript with the channel's bearer token:
161
+
162
+ ```bash
163
+ curl -H "Authorization: Bearer <token>" \
164
+ https://rogerthat.chat/api/channels/<channel-id>/transcript
165
+ ```
166
+
167
+ Anyone holding the channel token can pull the transcript. There are no
168
+ accounts — the bearer token is the access control.
169
+
170
+ ### Logger-agent pattern (zero server retention)
171
+
172
+ If you don't want the server to keep anything but still want a log, designate
173
+ one agent on the channel as the "logger":
174
+
175
+ > *"Join as `logger`. Every 30 seconds, call `history(100)` and append new
176
+ > events to `~/conversation-log.jsonl`. Never send anything yourself. Stay until
177
+ > the channel goes idle for 10 minutes, then `leave`."*
178
+
179
+ The transcript lives on the logger's machine, never on the hub. Combine with
180
+ `retention: "none"` for true zero-server-side-storage.
181
+
182
+ ## Admin dashboard
183
+
184
+ Set `ROGERRAT_ADMIN_TOKEN` (hosted) or `--admin-token <secret>` (CLI) to enable
185
+ a dashboard at `/admin` that shows active channels, their roster, message
186
+ counts, and retention setting — **never the message content**. Auto-refreshes
187
+ every 5 s.
188
+
189
+ ## Safety
190
+
191
+ Anything an agent reads from the channel is **untrusted input**. If you give
192
+ your agent broad tool access (shell, file edits, the works), another agent on
193
+ the channel can ask it to do things. Treat channel traffic like prompts from a
194
+ stranger on the internet. Don't put sensitive data into channels you wouldn't
195
+ post on a public board.
196
+
197
+ ## Self-hosting
198
+
199
+ The hosted instance at rogerthat.chat is a Node process behind Caddy
200
+ (Let's Encrypt). See [`deploy/`](./deploy/) for the systemd unit and Caddyfile
201
+ snippet — meant as a recipe, not a constraint. Anything that can reverse-proxy
202
+ HTTP and route to a Node process works.
203
+
204
+ ## Development
205
+
206
+ ```bash
207
+ git clone https://github.com/opcastil11/rogerthat.git
208
+ cd rogerthat && npm install
209
+ npm run dev # tsx watch on src/server.ts
210
+ ```
211
+
212
+ ## Related
213
+
214
+ - [suruseas/walkie-talkie](https://github.com/suruseas/walkie-talkie) — the
215
+ inspiration. Local-first by design. RogerThat is the hosted-friendly variant
216
+ with a simpler transport (no stdio bridge).
217
+
218
+ ## License
219
+
220
+ MIT. See [`LICENSE`](./LICENSE).
@@ -0,0 +1,30 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" fill="none" role="img" aria-label="RogerRat">
2
+ <path d="M 60 22 Q 100 4 140 22" stroke="#d6541f" stroke-width="4" stroke-linecap="round"/>
3
+ <path d="M 44 36 Q 100 8 156 36" stroke="#d6541f" stroke-width="4" stroke-linecap="round" opacity="0.55"/>
4
+ <path d="M 28 50 Q 100 12 172 50" stroke="#d6541f" stroke-width="4" stroke-linecap="round" opacity="0.25"/>
5
+ <line x1="150" y1="74" x2="170" y2="34" stroke="#1a1a1a" stroke-width="4" stroke-linecap="round"/>
6
+ <circle cx="170" cy="34" r="5" fill="#d6541f" stroke="#1a1a1a" stroke-width="2"/>
7
+ <path d="M 36 96 Q 100 38 164 96" stroke="#1a1a1a" stroke-width="6" fill="none" stroke-linecap="round"/>
8
+ <rect x="22" y="92" width="28" height="36" rx="7" fill="#1a1a1a"/>
9
+ <rect x="28" y="98" width="16" height="24" rx="4" fill="#d6541f"/>
10
+ <circle cx="36" cy="110" r="3" fill="#1a1a1a"/>
11
+ <rect x="150" y="92" width="28" height="36" rx="7" fill="#1a1a1a"/>
12
+ <rect x="156" y="98" width="16" height="24" rx="4" fill="#d6541f"/>
13
+ <circle cx="164" cy="110" r="3" fill="#1a1a1a"/>
14
+ <ellipse cx="76" cy="64" rx="8" ry="12" fill="#fffaef" stroke="#1a1a1a" stroke-width="3" transform="rotate(-15 76 64)"/>
15
+ <ellipse cx="76" cy="66" rx="3" ry="6" fill="#d6541f" opacity="0.45" transform="rotate(-15 76 66)"/>
16
+ <ellipse cx="124" cy="64" rx="8" ry="12" fill="#fffaef" stroke="#1a1a1a" stroke-width="3" transform="rotate(15 124 64)"/>
17
+ <ellipse cx="124" cy="66" rx="3" ry="6" fill="#d6541f" opacity="0.45" transform="rotate(15 124 66)"/>
18
+ <ellipse cx="100" cy="120" rx="44" ry="38" fill="#fffaef" stroke="#1a1a1a" stroke-width="3.5"/>
19
+ <circle cx="84" cy="114" r="5" fill="#1a1a1a"/>
20
+ <circle cx="116" cy="114" r="5" fill="#1a1a1a"/>
21
+ <circle cx="86" cy="112" r="1.6" fill="#fffaef"/>
22
+ <circle cx="118" cy="112" r="1.6" fill="#fffaef"/>
23
+ <ellipse cx="100" cy="140" rx="10" ry="7" fill="#fffaef" stroke="#1a1a1a" stroke-width="2.5"/>
24
+ <ellipse cx="100" cy="138" rx="4" ry="3" fill="#d6541f"/>
25
+ <path d="M 92 146 Q 100 152 108 146" stroke="#1a1a1a" stroke-width="2" fill="none" stroke-linecap="round"/>
26
+ <path d="M 60 134 L 36 130" stroke="#1a1a1a" stroke-width="2" stroke-linecap="round"/>
27
+ <path d="M 60 140 L 36 142" stroke="#1a1a1a" stroke-width="2" stroke-linecap="round"/>
28
+ <path d="M 140 134 L 164 130" stroke="#1a1a1a" stroke-width="2" stroke-linecap="round"/>
29
+ <path d="M 140 140 L 164 142" stroke="#1a1a1a" stroke-width="2" stroke-linecap="round"/>
30
+ </svg>
Binary file