@chatpanel/gateway 0.6.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/gateway",
3
- "version": "0.6.0",
3
+ "version": "0.6.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": {
package/src/ner.js CHANGED
@@ -10,11 +10,24 @@
10
10
  // external detector, which takes precedence — see below).
11
11
 
12
12
  import * as engine from './ner-engine.js';
13
+ import { persistConfig, configPath } from './configstore.js';
13
14
 
14
15
  export function startNer(cfg) {
15
16
  const n = cfg.ner;
16
17
  if (!n || !n.autostart) return null;
17
18
 
19
+ // Migration: versions <0.6 persisted redaction.detection → the bundled spaCy
20
+ // server on :9009 (now removed). That's NOT a user's external detector — left in
21
+ // place it makes us skip the new in-process engine and probe a dead port. Clear
22
+ // it (and the dead ner.port) so the engine loads, and persist the cleanup.
23
+ const d = cfg.redaction?.detection;
24
+ if (d && d.url && /127\.0\.0\.1:9009\/ner/.test(d.url)) {
25
+ cfg.redaction.detection = { backend: 'off' };
26
+ if (cfg.ner) delete cfg.ner.port;
27
+ try { persistConfig(cfg, configPath()); } catch { /* best effort */ }
28
+ console.log('[ner] migrated legacy spaCy detector config (:9009) → in-process engine');
29
+ }
30
+
18
31
  // Respect a USER-configured external detector (a custom NER endpoint or a local
19
32
  // LLM): don't load the bundled engine — just apply the full-tier bump so their
20
33
  // detector is actually used.
package/src/server.js CHANGED
@@ -35,7 +35,7 @@ import * as openai from './openai.js';
35
35
  import * as responses from './responses.js';
36
36
  import * as anthropic from './anthropic.js';
37
37
 
38
- export const VERSION = '0.6.0';
38
+ export const VERSION = '0.6.1';
39
39
 
40
40
  const KNOWN_AGENTS = new Set(['codex', 'claude', 'opencode', 'pi', 'kiro', 'antigravity']);
41
41