@chatpanel/bridge 0.2.9 → 0.2.11
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 +22 -26
- package/package.json +1 -1
- package/src/engines/claude.js +15 -4
- package/src/server.js +1 -1
- package/src/service.js +3 -1
package/README.md
CHANGED
|
@@ -14,26 +14,30 @@ the ones the bridge reports as available.
|
|
|
14
14
|
|
|
15
15
|
## Run it
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### macOS / Linux — one line, no Node.js needed
|
|
18
18
|
|
|
19
|
-
**macOS / Linux:**
|
|
20
19
|
```bash
|
|
21
20
|
curl -fsSL https://dl.chatpanel.net/bridge/install.sh | bash
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
Downloads the standalone binary, installs it, and sets it to start at login
|
|
24
|
+
(installing via curl avoids the macOS "damaged" prompt). Re-running is a clean
|
|
25
|
+
in-place upgrade.
|
|
26
|
+
|
|
27
|
+
### Windows — via Node (recommended)
|
|
28
|
+
|
|
29
|
+
Windows SmartScreen flags unsigned downloads, so on Windows run the bridge through
|
|
30
|
+
Node — you already have it if you use Claude Code / Codex / Gemini (all npm CLIs),
|
|
31
|
+
and there's no security prompt:
|
|
32
|
+
|
|
25
33
|
```powershell
|
|
26
|
-
|
|
34
|
+
npm i -g @chatpanel/bridge
|
|
35
|
+
chatpanel-bridge --install # starts hidden at login
|
|
27
36
|
```
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
start at login. **Recommended** — installing this way avoids the macOS "damaged"
|
|
31
|
-
and Windows SmartScreen prompts that browser downloads trigger. Re-running it is a
|
|
32
|
-
clean in-place upgrade (no duplicate installs). Then open the ChatPanel side panel
|
|
33
|
-
and your agents appear.
|
|
38
|
+
Just trying it? `npx @chatpanel/bridge` runs it once in the foreground.
|
|
34
39
|
|
|
35
|
-
Manage it: `chatpanel-bridge --status` · `--uninstall
|
|
36
|
-
once in the foreground.
|
|
40
|
+
Manage it anywhere: `chatpanel-bridge --status` · `--uninstall`.
|
|
37
41
|
|
|
38
42
|
### Manual download
|
|
39
43
|
|
|
@@ -50,25 +54,17 @@ chmod +x chatpanel-bridge-macos-arm64
|
|
|
50
54
|
.\chatpanel-bridge-windows-x64.exe --install
|
|
51
55
|
```
|
|
52
56
|
|
|
53
|
-
> These binaries aren't
|
|
54
|
-
>
|
|
55
|
-
>
|
|
56
|
-
> **Intel Mac?** No x64 binary yet — use **Option B** (`npx @chatpanel/bridge`).
|
|
57
|
-
> Apple Silicon (`uname -m` → `arm64`) uses `chatpanel-bridge-macos-arm64`.
|
|
58
|
-
|
|
59
|
-
### Option B — via npm (needs Node.js 18+)
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npx @chatpanel/bridge # → http://127.0.0.1:4319
|
|
63
|
-
```
|
|
57
|
+
> These binaries aren't code-signed yet, so macOS/Windows may warn on first run
|
|
58
|
+
> (the curl/npm routes above sidestep that). **Intel Mac?** No x64 binary yet —
|
|
59
|
+
> use npm (`npx @chatpanel/bridge`). Apple Silicon uses `chatpanel-bridge-macos-arm64`.
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
command? `npm i -g @chatpanel/bridge` then `chatpanel-bridge`.
|
|
61
|
+
### Prerequisites
|
|
67
62
|
|
|
68
|
-
|
|
63
|
+
The agents you want to use must already be set up:
|
|
69
64
|
|
|
70
|
-
- **Claude Code**:
|
|
65
|
+
- **Claude Code**: installed and signed in (`claude`), or set `ANTHROPIC_API_KEY`.
|
|
71
66
|
- **Codex**: `codex` on your `PATH` and `codex login` done.
|
|
67
|
+
- **Gemini CLI**: `gemini` on your `PATH` and signed in.
|
|
72
68
|
|
|
73
69
|
The extension polls `/health` and shows each agent as available/unavailable.
|
|
74
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/bridge",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local bridge that exposes the AI coding agents installed on your machine — Claude Code (Agent SDK), Codex (CLI), and Gemini CLI — to the ChatPanel Chrome extension over a localhost SSE endpoint. Bring your own agent.",
|
|
6
6
|
"keywords": [
|
package/src/engines/claude.js
CHANGED
|
@@ -29,11 +29,22 @@ function claudeExecutable() {
|
|
|
29
29
|
const bin = findAgentBin('claude');
|
|
30
30
|
if (!bin) return undefined;
|
|
31
31
|
const dir = path.dirname(bin);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
// The npm install ships cli.js; the native installer ships cli-wrapper.cjs
|
|
33
|
+
// (a JS entry next to a platform binary). Prefer either runnable JS entry over
|
|
34
|
+
// the native `claude` binary, since the SDK runs it with its own JS runtime.
|
|
35
|
+
const pkgDirs = [
|
|
36
|
+
path.join(dir, 'node_modules', '@anthropic-ai', 'claude-code'),
|
|
37
|
+
path.join(dir, '..', 'lib', 'node_modules', '@anthropic-ai', 'claude-code'),
|
|
38
|
+
// npm global on macOS/Homebrew symlinks bin/claude → ../lib/node_modules/...,
|
|
39
|
+
// so dir is already the package's own bin/ in the native install.
|
|
40
|
+
path.join(dir, '..'),
|
|
35
41
|
];
|
|
36
|
-
for (const
|
|
42
|
+
for (const p of pkgDirs) {
|
|
43
|
+
for (const entry of ['cli.js', 'cli-wrapper.cjs']) {
|
|
44
|
+
const c = path.join(p, entry);
|
|
45
|
+
if (existsSync(c)) return c;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
37
48
|
return bin;
|
|
38
49
|
}
|
|
39
50
|
|
package/src/server.js
CHANGED
|
@@ -22,7 +22,7 @@ import * as gemini from './engines/gemini.js';
|
|
|
22
22
|
import { installService, uninstallService, serviceStatus } from './service.js';
|
|
23
23
|
import { enrichPath, findAgentBin } from './env.js';
|
|
24
24
|
|
|
25
|
-
const VERSION = '0.2.
|
|
25
|
+
const VERSION = '0.2.10';
|
|
26
26
|
const HOST = process.env.CHATPANEL_BRIDGE_HOST || '127.0.0.1';
|
|
27
27
|
const PORT = Number(process.env.CHATPANEL_BRIDGE_PORT) || 4319;
|
|
28
28
|
|
package/src/service.js
CHANGED
|
@@ -84,7 +84,9 @@ function macStatus() {
|
|
|
84
84
|
// the bridge with NO console window.
|
|
85
85
|
const WIN_RUN_KEY = 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run';
|
|
86
86
|
const WIN_RUN_NAME = 'ChatPanelBridge';
|
|
87
|
-
|
|
87
|
+
// A user-writable location for the launcher. NOT next to the program — under
|
|
88
|
+
// `npm i -g` the program is node.exe, whose dir is protected (EPERM).
|
|
89
|
+
const winVbs = () => path.join(os.homedir(), '.chatpanel', 'launch.vbs');
|
|
88
90
|
|
|
89
91
|
function winInstall() {
|
|
90
92
|
const { program, args } = resolveLaunch();
|