@chatpanel/gateway 0.1.0 → 0.1.1
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 +3 -3
- package/package.json +2 -2
- package/src/redact.js +1 -1
- package/src/server.js +2 -2
- package/src/stream.js +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Two backends (config `backend`):
|
|
|
34
34
|
the gateway stores no keys.
|
|
35
35
|
|
|
36
36
|
The redaction engine is the **same code** the ChatPanel extension runs — the
|
|
37
|
-
[
|
|
37
|
+
[`@chatpanel/pii`](https://github.com/chatpanel/chatpanel-pii) package is the
|
|
38
38
|
single source of truth, so a privacy feature added once is shared everywhere.
|
|
39
39
|
|
|
40
40
|
## Quick start (bridge backend)
|
|
@@ -43,7 +43,7 @@ You need the [ChatPanel bridge](https://github.com/chatpanel/chatpanel-bridge)
|
|
|
43
43
|
running and logged into codex/claude (the same bridge the extension uses).
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npm install -g chatpanel
|
|
46
|
+
npm install -g @chatpanel/gateway
|
|
47
47
|
chatpanel-gateway
|
|
48
48
|
# → ChatPanel Privacy Gateway v0.1.0 on http://127.0.0.1:4320
|
|
49
49
|
# backend : bridge (agent: codex, via http://127.0.0.1:4319)
|
|
@@ -129,7 +129,7 @@ restores cleanly.
|
|
|
129
129
|
The [extension](https://github.com/chatpanel/chatpanel-extension) redacts inside
|
|
130
130
|
the browser; the [bridge](https://github.com/chatpanel/chatpanel-bridge) lets the
|
|
131
131
|
browser drive local CLI agents. This gateway reuses the bridge to put the **same
|
|
132
|
-
redaction engine** ([
|
|
132
|
+
redaction engine** ([`@chatpanel/pii`](https://github.com/chatpanel/chatpanel-pii))
|
|
133
133
|
in front of *any* agent — so non-browser tools get the privacy too, and the
|
|
134
134
|
agent's own multi-turn loop is blinded, not just the first prompt.
|
|
135
135
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"node": ">=18"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@chatpanel/pii": "^0.1.
|
|
31
|
+
"@chatpanel/pii": "^0.1.1"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://chatpanel.net",
|
|
34
34
|
"repository": {
|
package/src/redact.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// mapping is self-consistent within the request. (Same reasoning as the
|
|
9
9
|
// extension's pii-pipeline.)
|
|
10
10
|
|
|
11
|
-
import { createVault, redactText, detectEntities, effectiveTier, gatedDictionary } from 'chatpanel
|
|
11
|
+
import { createVault, redactText, detectEntities, effectiveTier, gatedDictionary } from '@chatpanel/pii';
|
|
12
12
|
|
|
13
13
|
// tier: 'basic' | 'full'. For 'full' we run the local detector over the combined
|
|
14
14
|
// text to harvest names/orgs, then redact every segment against that entity set.
|
package/src/server.js
CHANGED
|
@@ -21,7 +21,7 @@ import { createServer } from 'node:http';
|
|
|
21
21
|
import { loadConfig } from './config.js';
|
|
22
22
|
import { redactSegments } from './redact.js';
|
|
23
23
|
import { pipeRestoredStream, makeTokenRestorer } from './stream.js';
|
|
24
|
-
import { restoreText } from 'chatpanel
|
|
24
|
+
import { restoreText } from '@chatpanel/pii';
|
|
25
25
|
import { streamBridgeChat, readBridgeToken } from './bridge.js';
|
|
26
26
|
import { shaperFor } from './shape.js';
|
|
27
27
|
import { startNer } from './ner.js';
|
|
@@ -31,7 +31,7 @@ import * as openai from './openai.js';
|
|
|
31
31
|
import * as responses from './responses.js';
|
|
32
32
|
import * as anthropic from './anthropic.js';
|
|
33
33
|
|
|
34
|
-
export const VERSION = '0.1.
|
|
34
|
+
export const VERSION = '0.1.1';
|
|
35
35
|
|
|
36
36
|
const KNOWN_AGENTS = new Set(['codex', 'claude', 'opencode', 'pi', 'kiro', 'antigravity']);
|
|
37
37
|
|
package/src/stream.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// agent unchanged — its defined "permanent substitution" behavior. Only reversible
|
|
13
13
|
// [[TYPE_n]] tokens are restored here.
|
|
14
14
|
|
|
15
|
-
import { restoreText } from 'chatpanel
|
|
15
|
+
import { restoreText } from '@chatpanel/pii';
|
|
16
16
|
|
|
17
17
|
// Returns a TransformStream-free chunk transformer: feed it decoded string chunks,
|
|
18
18
|
// it returns the prefix that's safe to forward now and buffers a possibly-partial
|