@chatpanel/gateway 0.6.109 → 0.6.110
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 +9 -3
- package/src/team-store.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chatpanel/gateway",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.110",
|
|
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
|
@@ -64,7 +64,7 @@ import * as openai from './openai.js';
|
|
|
64
64
|
import * as responses from './responses.js';
|
|
65
65
|
import * as anthropic from './anthropic.js';
|
|
66
66
|
|
|
67
|
-
export const VERSION = '0.6.
|
|
67
|
+
export const VERSION = '0.6.110';
|
|
68
68
|
|
|
69
69
|
// WARM search tier — SQLite + FTS5 record store (falls back to an encrypted-JSON
|
|
70
70
|
// store if SQLite can't load), fed by the extension's ingest sync + backup-ingest.
|
|
@@ -1005,7 +1005,7 @@ export function createGateway(cfg = loadConfig()) {
|
|
|
1005
1005
|
// GET /v1/teams/runs/:id/checkpoint → { ok, checkpoint } what resumeTeam needs, from the record
|
|
1006
1006
|
// POST /v1/teams/runs/:id/claim { client } → { ok, run } a client takes a stopped/stale run over
|
|
1007
1007
|
// POST /v1/teams/runs/:id/stop → { ok, run } a stop request any client may make
|
|
1008
|
-
// DELETE /v1/teams/runs/:id → { ok, removed }
|
|
1008
|
+
// DELETE /v1/teams/runs/:id → { ok, removed } a live run is stopped first (0.6.110)
|
|
1009
1009
|
if (pathname === '/v1/teams/runs' && req.method === 'GET') {
|
|
1010
1010
|
return sendJson(res, 200, { ok: true, runs: teamStore.list({ limit: url.searchParams.get('limit') || 50, team: url.searchParams.get('team') || '' }) });
|
|
1011
1011
|
}
|
|
@@ -1026,7 +1026,13 @@ export function createGateway(cfg = loadConfig()) {
|
|
|
1026
1026
|
const run = teamStore.get(id, { events: url.searchParams.get('events') === '1' });
|
|
1027
1027
|
return run ? sendJson(res, 200, { ok: true, run }) : sendJson(res, 404, { error: { message: `no run ${id}`, type: 'not_found' } });
|
|
1028
1028
|
}
|
|
1029
|
-
if (!sub && req.method === 'DELETE')
|
|
1029
|
+
if (!sub && req.method === 'DELETE') {
|
|
1030
|
+
// A live run is stopped BEFORE its record goes (0.6.110), so the client running it
|
|
1031
|
+
// hears `run.stop-requested` on its tail. Removing the record alone left the member
|
|
1032
|
+
// working on for a run nobody could see, its appends failing until it gave up.
|
|
1033
|
+
teamStore.stop(id);
|
|
1034
|
+
return sendJson(res, 200, { ok: true, removed: teamStore.remove(id) });
|
|
1035
|
+
}
|
|
1030
1036
|
if (sub === '/stop' && req.method === 'POST') {
|
|
1031
1037
|
const run = teamStore.stop(id);
|
|
1032
1038
|
return run ? sendJson(res, 200, { ok: true, run }) : sendJson(res, 404, { error: { message: `no run ${id}`, type: 'not_found' } });
|
package/src/team-store.js
CHANGED
|
@@ -252,7 +252,7 @@ export class TeamStore {
|
|
|
252
252
|
}
|
|
253
253
|
remove(id) {
|
|
254
254
|
const had = this.runs.delete(String(id || ''));
|
|
255
|
-
if (had) this.save();
|
|
255
|
+
if (had) { this.watchers.delete(String(id || '')); this.save(); }
|
|
256
256
|
return had;
|
|
257
257
|
}
|
|
258
258
|
get size() { return this.runs.size; }
|