thinkpool-pair 0.7.79 → 0.7.80
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 +19 -3
- package/claude-session.mjs +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,11 @@ no copy/paste.
|
|
|
7
7
|
> A web page can't read your terminal directly (browser security). This tiny
|
|
8
8
|
> helper is the bridge: it runs CLIs in PTYs and streams them to the room.
|
|
9
9
|
|
|
10
|
+
> **Don't want it tied to your laptop?** Run this same bridge on an always-on box
|
|
11
|
+
> you control (a cheap VM, a home server, a Raspberry Pi) so the agent stays live
|
|
12
|
+
> with your laptop closed. It's outbound-only — no ports, no public IP. See
|
|
13
|
+
> [**Run it in the cloud**](#run-it-in-the-cloud-remote-host--vm--container) below.
|
|
14
|
+
|
|
10
15
|
## Run it (one command)
|
|
11
16
|
|
|
12
17
|
```bash
|
|
@@ -63,9 +68,20 @@ cd /path/to/your/repo
|
|
|
63
68
|
npx thinkpool-pair@latest <ROOM> -- claude # structured Claude, no TTY needed
|
|
64
69
|
```
|
|
65
70
|
|
|
66
|
-
- **Auth
|
|
67
|
-
|
|
68
|
-
|
|
71
|
+
- **Auth** — two ways to sign in on a box with no browser. Both are your own
|
|
72
|
+
account on your own hardware, so both are fine:
|
|
73
|
+
- **API key** — `export ANTHROPIC_API_KEY=sk-ant-...` from your Anthropic
|
|
74
|
+
Console. Simplest, pay-per-token, cleanest cost tracking.
|
|
75
|
+
- **Your Claude subscription** — a server has no browser, so mint a long-lived
|
|
76
|
+
token *on a machine that does*: run `claude setup-token` there (prints a
|
|
77
|
+
~1-year `CLAUDE_CODE_OAUTH_TOKEN`), then `export CLAUDE_CODE_OAUTH_TOKEN=...`
|
|
78
|
+
on the box. Uses your existing Pro/Max plan — no per-token bill.
|
|
79
|
+
|
|
80
|
+
The Agent SDK reads either one automatically and runs its bundled `claude`, so
|
|
81
|
+
you don't need Claude Code installed separately. (Note: this is *you* running
|
|
82
|
+
*your* login on *your* machine. Handing a subscription token to a third-party
|
|
83
|
+
host to run for you is what Anthropic's terms forbid — that's why a future
|
|
84
|
+
"we host it for you" option would require an API key, not your subscription.)
|
|
69
85
|
- **Use `@latest`**: a bare `npx thinkpool-pair` reuses npx's local cache and can
|
|
70
86
|
run a stale version across restarts. `@latest` (and the service below) always
|
|
71
87
|
re-resolve the newest publish.
|
package/claude-session.mjs
CHANGED
|
@@ -361,6 +361,9 @@ export function startClaudeSession({ cwd, model, resume, env, mode: initialMode
|
|
|
361
361
|
'LINKS & ARTIFACTS (hard rule for ThinkPool Code rooms): the room is driven from a phone or browser, and the bridge runs on the host machine — so a local filesystem path, a file:// URL, or a localhost address only opens on the host and is useless to the room (a partner literally cannot open it).',
|
|
362
362
|
'Whenever you produce an HTML artifact (a demo, mockup, preview, report, or page) or surface ANY link meant to be opened or shared, NEVER hand the room a local path, a file:// URL, or a localhost/127.0.0.1 address. Publish it to a GitHub-shareable URL that renders in a browser — push the HTML to a GitHub repo and give its GitHub Pages URL (or an equivalent raw-HTML URL that actually renders, not raw.githubusercontent.com which serves HTML as plain text) — so anyone in the room can open it. The same applies to any other link you surface: it must be one the room can reach, not a host-only path.',
|
|
363
363
|
'If you cannot publish a shareable link, say so and ask how to proceed — do not fall back to handing over a local path.',
|
|
364
|
+
'SHOW YOUR WORK, do not just describe it: the room is watched live from a phone, where a wall of text is painful to read. Whenever you build, change, or fix anything visual — a UI, a page, an HTML artifact, a chart, a diagram, a rendered result — capture a screenshot and surface the PNG (for example, read the image file into your turn) so it appears inline in the room. The room auto-uploads any image you surface. Default to showing a picture of the result over narrating it; err toward more screenshots, not fewer.',
|
|
365
|
+
'HTML PREVIEWS: for any HTML you produce, give the room something it can actually open, by whichever path is available. (a) IN-ROOM PREVIEW: if a mockup render helper is present — one that writes a manifest into the directory named by $TP_MOCKUP_OUTBOX, such as the mockup-iterate render.sh script when the bridge was launched from the thinkpool repo — use it; it surfaces an inline card with desktop and mobile views that the room can expand. (b) SHAREABLE LINK: additionally or otherwise, publish the HTML to a GitHub Pages URL per the LINKS & ARTIFACTS rule above and post the link. Never leave an HTML artifact viewable only as a local path.',
|
|
366
|
+
'RUN IT, DO NOT ASK: verify your own work before calling it done. Actually run or serve what you changed, observe that it behaves correctly, and show the evidence in the room — a screenshot of the running result, the passing test output, or the real response — rather than telling the user "this should work, go test it." If you could not verify something, say exactly what is unverified. This room follows verify-before-claiming: runtime evidence you produced, not assertion.',
|
|
364
367
|
].join(' '),
|
|
365
368
|
// Needed for live thinking-token progress (SDKThinkingTokensMessage) to
|
|
366
369
|
// flow during a turn. We ignore the fine-grained stream_event partials in
|