@chatpanel/gateway 0.6.22 → 0.6.23
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 +1 -1
- package/src/server.js +10 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/gateway",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.23",
|
|
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
|
@@ -43,7 +43,7 @@ import * as openai from './openai.js';
|
|
|
43
43
|
import * as responses from './responses.js';
|
|
44
44
|
import * as anthropic from './anthropic.js';
|
|
45
45
|
|
|
46
|
-
export const VERSION = '0.6.
|
|
46
|
+
export const VERSION = '0.6.23';
|
|
47
47
|
|
|
48
48
|
// WARM search tier — SQLite + FTS5 record store (falls back to an encrypted-JSON
|
|
49
49
|
// store if SQLite can't load), fed by the extension's ingest sync + backup-ingest.
|
|
@@ -760,9 +760,15 @@ export function createGateway(cfg = loadConfig()) {
|
|
|
760
760
|
send({ type: 'state', state: sttEngine.state() });
|
|
761
761
|
const progressTimer = setInterval(() => {
|
|
762
762
|
const st = sttEngine.state();
|
|
763
|
-
if (st === 'downloading' || st === 'loading') send({ type: 'progress', state: st, ...(sttEngine.progress() || {}) });
|
|
764
|
-
|
|
765
|
-
|
|
763
|
+
if (st === 'downloading' || st === 'loading') { send({ type: 'progress', state: st, ...(sttEngine.progress() || {}) }); return; }
|
|
764
|
+
if (st === 'error') { send({ type: 'error', code: 'model_failed', message: sttEngine.health().error || 'model failed to load', fatal: true }); clearInterval(progressTimer); return; }
|
|
765
|
+
// STT ready — if diarization is on, surface ITS one-time download too, so
|
|
766
|
+
// "who said what" doesn't silently lag while the speaker model fetches.
|
|
767
|
+
if (sess.diarize) {
|
|
768
|
+
const ds = diarizeEngine.state();
|
|
769
|
+
if (ds === 'downloading' || ds === 'loading') { send({ type: 'diarize-progress', state: ds, ...(diarizeEngine.progress() || {}) }); return; }
|
|
770
|
+
}
|
|
771
|
+
send({ type: 'state', state: st }); clearInterval(progressTimer);
|
|
766
772
|
}, 500);
|
|
767
773
|
progressTimer.unref?.();
|
|
768
774
|
// Redaction is async — chain events so finals can't overtake interims.
|