@chatpanel/gateway 0.6.95 → 0.6.97
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 +4 -1
- package/bin/chatpanel-gateway.js +20 -2
- package/package.json +1 -1
- package/src/server.js +1 -1
- package/src/service.js +8 -0
- package/src/tts-models.js +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,10 @@ chatpanel-gateway
|
|
|
62
62
|
|
|
63
63
|
On Windows, if `chatpanel-gateway` is "not recognized" right after `npm i -g`, npm's global bin
|
|
64
64
|
folder is not on that shell's PATH yet: open a new PowerShell, or run it by path —
|
|
65
|
-
`node "$(npm root -g)/@chatpanel/gateway/bin/chatpanel-gateway.js" --install`.
|
|
65
|
+
`node "$(npm root -g)/@chatpanel/gateway/bin/chatpanel-gateway.js" --install`. **Updating on
|
|
66
|
+
Windows:** stop the running gateway first, or npm fails with `EBUSY` on `onnxruntime_binding.node`
|
|
67
|
+
(a loaded DLL cannot be overwritten) —
|
|
68
|
+
`chatpanel-gateway --stop; npm i -g @chatpanel/gateway; chatpanel-gateway --install`. npm may also warn
|
|
66
69
|
that `boolean@3.2.0` is deprecated and that `onnxruntime-node` / `sharp` / `protobufjs` run install
|
|
67
70
|
scripts: all three come through `@huggingface/transformers` (the native model runtime) and are
|
|
68
71
|
expected.
|
package/bin/chatpanel-gateway.js
CHANGED
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
// chatpanel-gateway connect point your CLI agents (Codex, Claude Code, …) at this server
|
|
11
11
|
// chatpanel-gateway --install register login auto-start + start now
|
|
12
12
|
// chatpanel-gateway --uninstall remove login auto-start
|
|
13
|
+
// chatpanel-gateway --stop stop the running gateway (before an npm update on Windows)
|
|
13
14
|
// chatpanel-gateway --status is auto-start registered?
|
|
14
15
|
// chatpanel-gateway --version print version
|
|
15
16
|
// chatpanel-gateway --bridge run the embedded bridge (the supervisor's child; not for hands)
|
|
17
|
+
// chatpanel-gateway --mcp-stdio <url> the embedded bridge's per-turn tool proxy (spawned by CLI agents; not for hands)
|
|
16
18
|
//
|
|
17
19
|
// Config comes from gateway.config.json / env (see src/config.js).
|
|
18
20
|
export {}; // mark as an ES module (all imports below are dynamic)
|
|
@@ -29,6 +31,16 @@ try {
|
|
|
29
31
|
process.env.CHATPANEL_BRIDGE_EMBEDDED = '1';
|
|
30
32
|
process.argv.splice(2, 1);
|
|
31
33
|
await import('@chatpanel/bridge/src/server.js');
|
|
34
|
+
} else if (arg === '--mcp-stdio') {
|
|
35
|
+
// THE EMBEDDED BRIDGE'S PER-TURN TOOL SERVER. The bridge hands every CLI agent (Claude
|
|
36
|
+
// Code, Codex, a custom CLI) its per-turn ChatPanel tools — `team`, page, notes — as a
|
|
37
|
+
// stdio MCP server whose command is "re-run me with --mcp-stdio <url>"; embedded, "me"
|
|
38
|
+
// is this bin. Refusing the flag made the proxy exit 2 and Claude Code report the
|
|
39
|
+
// ChatPanel tools as "Connection closed" — a saved team ran as one agent doing a web
|
|
40
|
+
// search. Bridge 0.11.22+ sends `--bridge --mcp-stdio`; this keeps the older embedded
|
|
41
|
+
// copy working too. Not the history `mcp` server above — that one proxies to the gateway.
|
|
42
|
+
process.env.CHATPANEL_BRIDGE_EMBEDDED = '1';
|
|
43
|
+
await import('@chatpanel/bridge/src/server.js');
|
|
32
44
|
} else if (arg === 'mcp') {
|
|
33
45
|
// Its own path: proxies to the running gateway over HTTP and must NOT import
|
|
34
46
|
// server.js (which would open a second handle on the warm SQLite store).
|
|
@@ -49,8 +61,14 @@ try {
|
|
|
49
61
|
process.stdout.write(formatConnect(connectAgents({ dryRun }), { dryRun }));
|
|
50
62
|
} else {
|
|
51
63
|
const { start, VERSION } = await import('../src/server.js');
|
|
52
|
-
const { installService, uninstallService, serviceStatus } = await import('../src/service.js');
|
|
64
|
+
const { installService, uninstallService, serviceStatus, stopService } = await import('../src/service.js');
|
|
53
65
|
switch (arg) {
|
|
66
|
+
case '--stop':
|
|
67
|
+
// Before `npm i -g` on Windows: a running gateway holds onnxruntime's DLL, and npm's
|
|
68
|
+
// copy of the new one fails with EBUSY. Stop, install, `--install`.
|
|
69
|
+
stopService();
|
|
70
|
+
console.log('ChatPanel Gateway: stopped (auto-start is still registered; `--install` or a login starts it again).');
|
|
71
|
+
break;
|
|
54
72
|
case '--version':
|
|
55
73
|
case '-v':
|
|
56
74
|
console.log(VERSION);
|
|
@@ -70,7 +88,7 @@ try {
|
|
|
70
88
|
start();
|
|
71
89
|
break;
|
|
72
90
|
default:
|
|
73
|
-
console.error(`unknown option: ${arg}\nUsage: chatpanel-gateway [mcp|tools list|tools schema <tool>|call <tool> '<json>'|local|connect|--install|--uninstall|--status|--version|--bridge]`);
|
|
91
|
+
console.error(`unknown option: ${arg}\nUsage: chatpanel-gateway [mcp|tools list|tools schema <tool>|call <tool> '<json>'|local|connect|--install|--uninstall|--stop|--status|--version|--bridge]`);
|
|
74
92
|
process.exit(2);
|
|
75
93
|
}
|
|
76
94
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/gateway",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.97",
|
|
4
4
|
"description": "Local privacy gateway — redacts PII out of OpenAI/Anthropic API traffic before it reaches a model, then restores it in the reply. Point opencode, codex, aider, Claude Code, etc. at it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/server.js
CHANGED
|
@@ -63,7 +63,7 @@ import * as openai from './openai.js';
|
|
|
63
63
|
import * as responses from './responses.js';
|
|
64
64
|
import * as anthropic from './anthropic.js';
|
|
65
65
|
|
|
66
|
-
export const VERSION = '0.6.
|
|
66
|
+
export const VERSION = '0.6.97';
|
|
67
67
|
|
|
68
68
|
// WARM search tier — SQLite + FTS5 record store (falls back to an encrypted-JSON
|
|
69
69
|
// store if SQLite can't load), fed by the extension's ingest sync + backup-ingest.
|
package/src/service.js
CHANGED
|
@@ -94,6 +94,14 @@ function winStopRunning() {
|
|
|
94
94
|
run('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', ps], { timeout: 15000 });
|
|
95
95
|
run('taskkill', ['/IM', 'chatpanel-gateway.exe', '/F']); // belt and braces for the exe
|
|
96
96
|
}
|
|
97
|
+
/** Stop the running gateway (and its bridge child) on any platform — what an update needs first. */
|
|
98
|
+
export function stopService() {
|
|
99
|
+
if (process.platform === 'win32') return winStopRunning();
|
|
100
|
+
if (process.platform === 'darwin') { run('launchctl', ['bootout', `gui/${process.getuid?.() ?? ''}/${LABEL}`]); }
|
|
101
|
+
else run('systemctl', ['--user', 'stop', 'chatpanel-gateway.service']);
|
|
102
|
+
run('pkill', ['-f', 'chatpanel-gateway']);
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
97
105
|
function winInstall() {
|
|
98
106
|
const { program, args } = resolveLaunch();
|
|
99
107
|
const parts = [program, ...args].map((p) => `""${p}""`).join(' ');
|
package/src/tts-models.js
CHANGED
|
@@ -96,7 +96,7 @@ export const TTS_MODEL_CATALOG = [
|
|
|
96
96
|
recommended: true,
|
|
97
97
|
// Raw onnxruntime, which the standalone binary cannot provide.
|
|
98
98
|
requiresNative: true,
|
|
99
|
-
note: 'Kyutai Pocket TTS (MIT code, CC-BY-4.0 weights). Eight built-in voices, and it can clone yours. Fastest model here.
|
|
99
|
+
note: 'Kyutai Pocket TTS (MIT code, CC-BY-4.0 weights). Eight built-in voices (downloaded with the model), and it can clone yours. Fastest model here. ~200 MB. Needs the npm gateway.',
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
id: 'Xenova/speecht5_tts',
|