@chatpanel/gateway 0.6.79 → 0.6.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/server.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/gateway",
3
- "version": "0.6.79",
3
+ "version": "0.6.80",
4
4
  "description": "Local privacy gateway \u2014 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": {
@@ -27,7 +27,7 @@
27
27
  "node": ">=18"
28
28
  },
29
29
  "dependencies": {
30
- "@chatpanel/pii": "^0.7.2",
30
+ "@chatpanel/pii": "^0.7.4",
31
31
  "@huggingface/transformers": "^4.2.0",
32
32
  "onnxruntime-web": "1.26.0-dev.20260416-b7804b056c",
33
33
  "phonemizer": "^1.2.1"
package/src/server.js CHANGED
@@ -22,7 +22,7 @@ import { loadConfig } from './config.js';
22
22
  import { startEntitlementRefresh, maybeRevalidate } from './entitlement-refresh.js';
23
23
  import { redactSegments, segment } from './redact.js';
24
24
  import { pipeRestoredStream, pipeRestoredOpenAIStream, makeTokenRestorer, restoreDeep } from './stream.js';
25
- import { restoreText, gatedDictionary, narrowSpecs, makeToolHarness, placeholderToolNote, assertEndpointUrl } from '@chatpanel/pii';
25
+ import { restoreText, gatedDictionary, narrowSpecs, makeToolHarness, placeholderToolNote, placeholderNote, assertEndpointUrl } from '@chatpanel/pii';
26
26
  import { ensureGatewayToken, isAdminAuthorized } from './gateway-token.js';
27
27
  import { resolveBridgeUrl } from './bridge.js';
28
28
  import { secureFetch } from './secure-fetch.js';
@@ -58,7 +58,7 @@ import * as openai from './openai.js';
58
58
  import * as responses from './responses.js';
59
59
  import * as anthropic from './anthropic.js';
60
60
 
61
- export const VERSION = '0.6.79';
61
+ export const VERSION = '0.6.80';
62
62
 
63
63
  // WARM search tier — SQLite + FTS5 record store (falls back to an encrypted-JSON
64
64
  // store if SQLite can't load), fed by the extension's ingest sync + backup-ingest.
@@ -1936,6 +1936,10 @@ export function createGateway(cfg = loadConfig()) {
1936
1936
  });
1937
1937
  const ownTools = !(early && early.type === 'api');
1938
1938
  r.adapter.injectSystemNote(body, placeholderToolNote({ toolData: cfg.tools?.toolData, ownTools }));
1939
+ } else if (!redactionOff && count > 0 && typeof r.adapter.injectSystemNote === 'function') {
1940
+ // No tools, but something WAS replaced: the model still meets [[LOCATION_1]] and, told
1941
+ // nothing, a coding agent stops to ask what the "unresolved placeholder" means.
1942
+ r.adapter.injectSystemNote(body, placeholderNote());
1939
1943
  }
1940
1944
  outBody = Buffer.from(JSON.stringify(body), 'utf8');
1941
1945
  }