chat-recall 0.5.6 → 0.5.7
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 +332 -0
- package/dist/cli.js +7013 -4542
- package/dist/cli.js.map +1 -1
- package/dist/code-index-cursor.d.ts +18 -0
- package/dist/code-index-cursor.d.ts.map +1 -0
- package/dist/code-index-cursor.js +89 -0
- package/dist/code-index-cursor.js.map +1 -0
- package/dist/daemon-log.d.ts +44 -0
- package/dist/daemon-log.d.ts.map +1 -0
- package/dist/daemon-log.js +74 -0
- package/dist/daemon-log.js.map +1 -0
- package/dist/derived.d.ts +20 -0
- package/dist/derived.d.ts.map +1 -0
- package/dist/derived.js +106 -0
- package/dist/derived.js.map +1 -0
- package/dist/install-skills.d.ts.map +1 -1
- package/dist/install-skills.js +6 -1
- package/dist/install-skills.js.map +1 -1
- package/dist/log-rotate.d.ts +16 -0
- package/dist/log-rotate.d.ts.map +1 -0
- package/dist/log-rotate.js +50 -0
- package/dist/log-rotate.js.map +1 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +5830 -3788
- package/dist/mcp.js.map +1 -1
- package/dist/project-tasks.js +1 -1
- package/dist/project-tasks.js.map +1 -1
- package/dist/redact-deep.d.ts +4 -0
- package/dist/redact-deep.d.ts.map +1 -0
- package/dist/redact-deep.js +26 -0
- package/dist/redact-deep.js.map +1 -0
- package/dist/scan-pool.d.ts +56 -0
- package/dist/scan-pool.d.ts.map +1 -0
- package/dist/scan-pool.js +245 -0
- package/dist/scan-pool.js.map +1 -0
- package/dist/scan-worker.d.ts +78 -0
- package/dist/scan-worker.d.ts.map +1 -0
- package/dist/scan-worker.js +11175 -0
- package/dist/scan-worker.js.map +1 -0
- package/dist/self-restart.d.ts +20 -2
- package/dist/self-restart.d.ts.map +1 -1
- package/dist/self-restart.js +16 -6
- package/dist/self-restart.js.map +1 -1
- package/dist/server-probe.d.ts +76 -0
- package/dist/server-probe.d.ts.map +1 -0
- package/dist/server-probe.js +106 -0
- package/dist/server-probe.js.map +1 -0
- package/dist/sync-client.d.ts +24 -0
- package/dist/sync-client.d.ts.map +1 -1
- package/dist/sync-client.js +496 -151
- package/dist/sync-client.js.map +1 -1
- package/dist/target-breaker.d.ts +61 -0
- package/dist/target-breaker.d.ts.map +1 -0
- package/dist/target-breaker.js +85 -0
- package/dist/target-breaker.js.map +1 -0
- package/dist/telemetry-consent.d.ts +31 -0
- package/dist/telemetry-consent.d.ts.map +1 -0
- package/dist/telemetry-consent.js +115 -0
- package/dist/telemetry-consent.js.map +1 -0
- package/dist/telemetry.d.ts +22 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +125 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tick-queue.d.ts +67 -0
- package/dist/tick-queue.d.ts.map +1 -0
- package/dist/tick-queue.js +104 -0
- package/dist/tick-queue.js.map +1 -0
- package/dist/transport-safety.d.ts +43 -0
- package/dist/transport-safety.d.ts.map +1 -0
- package/dist/transport-safety.js +100 -0
- package/dist/transport-safety.js.map +1 -0
- package/dist/verify-repair.js +1 -1
- package/dist/verify-repair.js.map +1 -1
- package/dist/watch.js +8345 -6030
- package/package.json +21 -2
package/dist/project-tasks.js
CHANGED
|
@@ -128,7 +128,7 @@ export async function pushProjectTaskStatuses(base, authHeaders, opts = {}) {
|
|
|
128
128
|
// Bounded: this runs INSIDE the intent drain, whose tick is guarded by a
|
|
129
129
|
// single in-flight flag — one silent, never-settling request here stops
|
|
130
130
|
// the daemon from ever draining another intent (exactly what happened on
|
|
131
|
-
//
|
|
131
|
+
// desktop: 18 intents queued, none applied, no error anywhere).
|
|
132
132
|
const res = await fetchWithTimeout(`${base}${fk.trackedPath}`, { headers: authHeaders });
|
|
133
133
|
if (!res.ok)
|
|
134
134
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-tasks.js","sourceRoot":"","sources":["../src/project-tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;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,CAAC,CAAC,GAAG,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,MAAM,OAAO,KAAK,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,MAAM,gCAAgC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC;IACzH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-deep.d.ts","sourceRoot":"","sources":["../src/redact-deep.ts"],"names":[],"mappings":"AAaA,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,CASpE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redact every string anywhere inside a JSON-serializable value.
|
|
3
|
+
*
|
|
4
|
+
* Used for DERIVED payloads — diffs carry file content, outcomes carry prompt
|
|
5
|
+
* text — where field-by-field redaction would be fragile: the shapes are nested,
|
|
6
|
+
* they change when the extractors change, and a missed field ships a secret.
|
|
7
|
+
* Walking everything is the only version that stays correct as those shapes move.
|
|
8
|
+
*
|
|
9
|
+
* Extracted from sync-client so the derived-data path can be shared between the
|
|
10
|
+
* worker thread and the inline fallback without either importing the sync client.
|
|
11
|
+
*/
|
|
12
|
+
import { redactSecrets } from '@chat-recall/engine/core/secret-redactor.js';
|
|
13
|
+
export function redactDeep(v, count) {
|
|
14
|
+
if (typeof v === 'string')
|
|
15
|
+
return redactSecrets(v, { force: true, count });
|
|
16
|
+
if (Array.isArray(v))
|
|
17
|
+
return v.map((x) => redactDeep(x, count));
|
|
18
|
+
if (v && typeof v === 'object') {
|
|
19
|
+
const o = {};
|
|
20
|
+
for (const [k, val] of Object.entries(v))
|
|
21
|
+
o[k] = redactDeep(val, count);
|
|
22
|
+
return o;
|
|
23
|
+
}
|
|
24
|
+
return v;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=redact-deep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact-deep.js","sourceRoot":"","sources":["../src/redact-deep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E,MAAM,UAAU,UAAU,CAAI,CAAI,EAAE,KAA6B;IAC/D,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,aAAa,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAiB,CAAC;IAC3F,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAiB,CAAC;IAChF,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,CAAC,GAA4B,EAAE,CAAC;QACtC,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAA4B,CAAC;YAAE,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACnG,OAAO,CAAiB,CAAC;IAC3B,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ScanTask, ScanResult, DerivedTask, DerivedResult } from './scan-worker.js';
|
|
2
|
+
export declare class ScanPool {
|
|
3
|
+
private readonly size;
|
|
4
|
+
private slots;
|
|
5
|
+
private queue;
|
|
6
|
+
private nextId;
|
|
7
|
+
private started;
|
|
8
|
+
private disabled;
|
|
9
|
+
/** Version of the rule pack each worker has installed, by slot index. */
|
|
10
|
+
private packSent;
|
|
11
|
+
constructor(size?: number);
|
|
12
|
+
/** True when tasks will actually run on a worker. */
|
|
13
|
+
get enabled(): boolean;
|
|
14
|
+
private start;
|
|
15
|
+
private pump;
|
|
16
|
+
/**
|
|
17
|
+
* Keep the process alive exactly while the pool owes someone an answer.
|
|
18
|
+
*
|
|
19
|
+
* A worker with a task in flight must be ref'd or Node may exit before the
|
|
20
|
+
* reply lands; an idle one must be unref'd or the pool alone keeps a one-shot
|
|
21
|
+
* CLI command running forever.
|
|
22
|
+
*/
|
|
23
|
+
private refIfBusy;
|
|
24
|
+
/**
|
|
25
|
+
* Run one task on a worker.
|
|
26
|
+
*
|
|
27
|
+
* Returns null when the pool cannot take it — the caller must then do the
|
|
28
|
+
* work inline. Null is a normal outcome, not an error: it is what makes the
|
|
29
|
+
* pool optional.
|
|
30
|
+
*/
|
|
31
|
+
run(task: Omit<ScanTask, 'id'>): Promise<ScanResult | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Derive a session's compute rows on a worker.
|
|
34
|
+
*
|
|
35
|
+
* Same pool, same lifecycle, same null-means-inline contract as `run` — two
|
|
36
|
+
* pools would mean two sets of workers competing for the same cores.
|
|
37
|
+
*/
|
|
38
|
+
runDerived(task: Omit<DerivedTask, 'id' | 'task'>): Promise<DerivedResult | null>;
|
|
39
|
+
private dispatch;
|
|
40
|
+
/**
|
|
41
|
+
* Has this pool already sent the current rule pack? Lets the caller omit the
|
|
42
|
+
* ~74-rule pack from every task and send it only when the version changes.
|
|
43
|
+
*
|
|
44
|
+
* Conservative on purpose: the answer is per POOL, not per worker, so the
|
|
45
|
+
* pack is re-sent to every worker whenever the version moves. A worker that
|
|
46
|
+
* receives a pack it already has reinstalls it once — cheap, and far safer
|
|
47
|
+
* than a worker scanning with rules it never got.
|
|
48
|
+
*/
|
|
49
|
+
needsPack(version: string): boolean;
|
|
50
|
+
markPackSent(version: string): void;
|
|
51
|
+
close(): Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
export declare function scanPool(): ScanPool;
|
|
54
|
+
/** Tests and `logout`: drop the workers. */
|
|
55
|
+
export declare function closeScanPool(): Promise<void>;
|
|
56
|
+
//# sourceMappingURL=scan-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-pool.d.ts","sourceRoot":"","sources":["../src/scan-pool.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA4CzF,qBAAa,QAAQ;IASP,OAAO,CAAC,QAAQ,CAAC,IAAI;IARjC,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,KAAK,CAAiG;IAC9G,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,yEAAyE;IACzE,OAAO,CAAC,QAAQ,CAA6B;gBAEhB,IAAI,SAAa;IAI9C,qDAAqD;IACrD,IAAI,OAAO,IAAI,OAAO,CAA2B;IAEjD,OAAO,CAAC,KAAK;IA0Db,OAAO,CAAC,IAAI;IAUZ;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;IAOjB;;;;;;OAMG;IACG,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAIjE;;;;;OAKG;IACG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;YAIzE,QAAQ;IAYtB;;;;;;;;OAQG;IACH,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAInC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAM7B;AAID,wBAAgB,QAAQ,IAAI,QAAQ,CAGnC;AAED,4CAA4C;AAC5C,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAInD"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A tiny worker pool for the per-session scan/redact/gzip work.
|
|
3
|
+
*
|
|
4
|
+
* ── Design constraints, in priority order ────────────────────────────────
|
|
5
|
+
*
|
|
6
|
+
* 1. IT RUNS ON SOMEONE ELSE'S LAPTOP. A background collector that saturates
|
|
7
|
+
* every core is uninstalled, however fast it is. The pool defaults to ONE
|
|
8
|
+
* worker: that already achieves the goal — the main thread stops doing
|
|
9
|
+
* seconds of solid computation — while using no more CPU in total than the
|
|
10
|
+
* single-threaded version did. More workers only help once the walk builds
|
|
11
|
+
* several sessions at a time, which it does not yet; the size is env-tunable
|
|
12
|
+
* so that change does not need a release.
|
|
13
|
+
*
|
|
14
|
+
* 2. IT MUST NEVER BE THE REASON A SYNC FAILS. Every failure path — no worker
|
|
15
|
+
* file (a dev run from source), spawn refused, a worker that dies mid-task,
|
|
16
|
+
* a task that throws — falls back to computing the session inline. The
|
|
17
|
+
* fallback is the code that shipped for the last year, so the worst case is
|
|
18
|
+
* the old behaviour, not a broken sync.
|
|
19
|
+
*
|
|
20
|
+
* 3. BOUNDED MEMORY. Each worker holds one session's text, and a 47 MB
|
|
21
|
+
* transcript is a real size here. `resourceLimits` caps each worker's heap
|
|
22
|
+
* so a pathological session kills one task instead of the daemon — the OOM
|
|
23
|
+
* that started all of this was exactly a transcript-sized allocation with no
|
|
24
|
+
* ceiling.
|
|
25
|
+
*/
|
|
26
|
+
import { Worker } from 'node:worker_threads';
|
|
27
|
+
import { existsSync } from 'node:fs';
|
|
28
|
+
import { fileURLToPath } from 'node:url';
|
|
29
|
+
import { cpus } from 'node:os';
|
|
30
|
+
/** Per-worker heap ceiling. One session's text plus its gzip, with headroom. */
|
|
31
|
+
const WORKER_HEAP_MB = Number(process.env.CHAT_RECALL_SCAN_WORKER_HEAP_MB) || 768;
|
|
32
|
+
/**
|
|
33
|
+
* How many workers.
|
|
34
|
+
*
|
|
35
|
+
* Default 1 — see constraint 1. `0` disables the pool entirely and everything
|
|
36
|
+
* runs inline, which is the escape hatch if a machine misbehaves.
|
|
37
|
+
*/
|
|
38
|
+
function poolSize() {
|
|
39
|
+
const raw = process.env.CHAT_RECALL_SCAN_WORKERS;
|
|
40
|
+
if (raw !== undefined) {
|
|
41
|
+
const n = Number(raw);
|
|
42
|
+
if (Number.isFinite(n) && n >= 0)
|
|
43
|
+
return Math.min(Math.floor(n), Math.max(1, cpus().length));
|
|
44
|
+
}
|
|
45
|
+
return 1;
|
|
46
|
+
}
|
|
47
|
+
/** The bundled worker script, or null when there isn't one (source runs). */
|
|
48
|
+
function workerScript() {
|
|
49
|
+
// Two layouts, in order of likelihood:
|
|
50
|
+
// 1. bundled — dist/scan-worker.js sits beside dist/watch.js and dist/cli.js,
|
|
51
|
+
// so this resolves from whichever bundle is running.
|
|
52
|
+
// 2. from source (dev, tests) — ../dist/scan-worker.js, if a build has run.
|
|
53
|
+
//
|
|
54
|
+
// Neither found means no pool and everything runs inline. That is a supported
|
|
55
|
+
// state, not a failure: a daemon that only works after a build step is a trap.
|
|
56
|
+
for (const rel of ['./scan-worker.js', '../dist/scan-worker.js']) {
|
|
57
|
+
try {
|
|
58
|
+
const p = fileURLToPath(new URL(rel, import.meta.url));
|
|
59
|
+
if (existsSync(p))
|
|
60
|
+
return p;
|
|
61
|
+
}
|
|
62
|
+
catch { /* not resolvable from here — try the next */ }
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
export class ScanPool {
|
|
67
|
+
size;
|
|
68
|
+
slots = [];
|
|
69
|
+
queue = [];
|
|
70
|
+
nextId = 1;
|
|
71
|
+
started = false;
|
|
72
|
+
disabled = false;
|
|
73
|
+
/** Version of the rule pack each worker has installed, by slot index. */
|
|
74
|
+
packSent = new Map();
|
|
75
|
+
constructor(size = poolSize()) {
|
|
76
|
+
this.size = size;
|
|
77
|
+
if (this.size < 1)
|
|
78
|
+
this.disabled = true;
|
|
79
|
+
}
|
|
80
|
+
/** True when tasks will actually run on a worker. */
|
|
81
|
+
get enabled() { return !this.disabled; }
|
|
82
|
+
start() {
|
|
83
|
+
if (this.started)
|
|
84
|
+
return;
|
|
85
|
+
this.started = true;
|
|
86
|
+
const script = workerScript();
|
|
87
|
+
if (!script) {
|
|
88
|
+
this.disabled = true;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
for (let i = 0; i < this.size; i++) {
|
|
92
|
+
try {
|
|
93
|
+
const worker = new Worker(script, {
|
|
94
|
+
resourceLimits: { maxOldGenerationSizeMb: WORKER_HEAP_MB },
|
|
95
|
+
// DO NOT INHERIT THE PARENT'S NODE FLAGS. By default a Worker copies
|
|
96
|
+
// process.execArgv, so any flag on the parent is re-applied to a file
|
|
97
|
+
// it does not describe — `--input-type=module` made every worker exit
|
|
98
|
+
// with "can only be used with string input", and the pool degraded to
|
|
99
|
+
// the inline path SILENTLY. Anything the worker needs is set here
|
|
100
|
+
// (resourceLimits), so an empty list is both correct and insulating.
|
|
101
|
+
execArgv: [],
|
|
102
|
+
});
|
|
103
|
+
const slot = { worker, pending: null };
|
|
104
|
+
worker.on('message', (r) => {
|
|
105
|
+
const resolve = slot.pending;
|
|
106
|
+
slot.pending = null;
|
|
107
|
+
resolve?.(r);
|
|
108
|
+
this.pump();
|
|
109
|
+
});
|
|
110
|
+
// A dead worker must not strand its caller. Fail the task in flight so
|
|
111
|
+
// the caller falls back inline, and retire the slot.
|
|
112
|
+
const die = (err) => {
|
|
113
|
+
const resolve = slot.pending;
|
|
114
|
+
slot.pending = null;
|
|
115
|
+
this.slots = this.slots.filter((s) => s !== slot);
|
|
116
|
+
if (this.slots.length === 0)
|
|
117
|
+
this.disabled = true;
|
|
118
|
+
// Shaped to satisfy both result types: the caller only reads `error`
|
|
119
|
+
// on this path and falls back inline either way.
|
|
120
|
+
resolve?.({ id: -1, findings: [], redactions: 0, rows: null, error: `scan worker died: ${err}` });
|
|
121
|
+
this.pump();
|
|
122
|
+
};
|
|
123
|
+
worker.on('error', die);
|
|
124
|
+
worker.on('exit', (code) => { if (code !== 0)
|
|
125
|
+
die(`exit ${code}`); });
|
|
126
|
+
// REF WHILE BUSY, UNREF WHILE IDLE — see refIfBusy().
|
|
127
|
+
//
|
|
128
|
+
// A permanent unref() looked right ("never hold the process open on the
|
|
129
|
+
// pool's account") and broke every one-shot command. With a task in
|
|
130
|
+
// flight and nothing else on the event loop, Node has no reason to stay
|
|
131
|
+
// alive, so `chat-recall sync` returned with the worker's reply still
|
|
132
|
+
// pending: it shipped ZERO sessions, exited 0, and said nothing. The
|
|
133
|
+
// watch daemon hid it completely, because a daemon always has timers.
|
|
134
|
+
//
|
|
135
|
+
// This is the second time: the bug was found and fixed during the build
|
|
136
|
+
// pipeline work, then destroyed by `git checkout -- scan-pool.ts` when
|
|
137
|
+
// that pipeline was reverted wholesale. The compose integration test —
|
|
138
|
+
// CLI ↔ real server, one-shot — is what caught it both times.
|
|
139
|
+
worker.unref();
|
|
140
|
+
this.slots.push(slot);
|
|
141
|
+
}
|
|
142
|
+
catch { /* one failure is enough to know: fall back inline */ }
|
|
143
|
+
}
|
|
144
|
+
if (this.slots.length === 0)
|
|
145
|
+
this.disabled = true;
|
|
146
|
+
}
|
|
147
|
+
pump() {
|
|
148
|
+
if (this.queue.length === 0) {
|
|
149
|
+
this.refIfBusy();
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const slot = this.slots.find((s) => s.pending === null);
|
|
153
|
+
if (!slot) {
|
|
154
|
+
this.refIfBusy();
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
const next = this.queue.shift();
|
|
158
|
+
slot.pending = next.resolve;
|
|
159
|
+
slot.worker.postMessage(next.task);
|
|
160
|
+
this.refIfBusy();
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Keep the process alive exactly while the pool owes someone an answer.
|
|
164
|
+
*
|
|
165
|
+
* A worker with a task in flight must be ref'd or Node may exit before the
|
|
166
|
+
* reply lands; an idle one must be unref'd or the pool alone keeps a one-shot
|
|
167
|
+
* CLI command running forever.
|
|
168
|
+
*/
|
|
169
|
+
refIfBusy() {
|
|
170
|
+
const busy = this.queue.length > 0 || this.slots.some((s) => s.pending !== null);
|
|
171
|
+
for (const s of this.slots) {
|
|
172
|
+
if (busy)
|
|
173
|
+
s.worker.ref();
|
|
174
|
+
else
|
|
175
|
+
s.worker.unref();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Run one task on a worker.
|
|
180
|
+
*
|
|
181
|
+
* Returns null when the pool cannot take it — the caller must then do the
|
|
182
|
+
* work inline. Null is a normal outcome, not an error: it is what makes the
|
|
183
|
+
* pool optional.
|
|
184
|
+
*/
|
|
185
|
+
async run(task) {
|
|
186
|
+
return this.dispatch({ ...task, id: 0 });
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Derive a session's compute rows on a worker.
|
|
190
|
+
*
|
|
191
|
+
* Same pool, same lifecycle, same null-means-inline contract as `run` — two
|
|
192
|
+
* pools would mean two sets of workers competing for the same cores.
|
|
193
|
+
*/
|
|
194
|
+
async runDerived(task) {
|
|
195
|
+
return this.dispatch({ ...task, task: 'derived', id: 0 });
|
|
196
|
+
}
|
|
197
|
+
async dispatch(task) {
|
|
198
|
+
this.start();
|
|
199
|
+
if (this.disabled)
|
|
200
|
+
return null;
|
|
201
|
+
task.id = this.nextId++;
|
|
202
|
+
const result = await new Promise((resolve) => {
|
|
203
|
+
this.queue.push({ task, resolve });
|
|
204
|
+
this.pump();
|
|
205
|
+
});
|
|
206
|
+
if (result.error)
|
|
207
|
+
return null; // fall back inline for this session
|
|
208
|
+
return result;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Has this pool already sent the current rule pack? Lets the caller omit the
|
|
212
|
+
* ~74-rule pack from every task and send it only when the version changes.
|
|
213
|
+
*
|
|
214
|
+
* Conservative on purpose: the answer is per POOL, not per worker, so the
|
|
215
|
+
* pack is re-sent to every worker whenever the version moves. A worker that
|
|
216
|
+
* receives a pack it already has reinstalls it once — cheap, and far safer
|
|
217
|
+
* than a worker scanning with rules it never got.
|
|
218
|
+
*/
|
|
219
|
+
needsPack(version) {
|
|
220
|
+
return this.packSent.get(0) !== version;
|
|
221
|
+
}
|
|
222
|
+
markPackSent(version) {
|
|
223
|
+
this.packSent.set(0, version);
|
|
224
|
+
}
|
|
225
|
+
async close() {
|
|
226
|
+
const slots = this.slots;
|
|
227
|
+
this.slots = [];
|
|
228
|
+
this.disabled = true;
|
|
229
|
+
await Promise.all(slots.map((s) => s.worker.terminate().catch(() => undefined)));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/** Process-wide pool. Workers are expensive to create; one set is plenty. */
|
|
233
|
+
let shared = null;
|
|
234
|
+
export function scanPool() {
|
|
235
|
+
if (!shared)
|
|
236
|
+
shared = new ScanPool();
|
|
237
|
+
return shared;
|
|
238
|
+
}
|
|
239
|
+
/** Tests and `logout`: drop the workers. */
|
|
240
|
+
export async function closeScanPool() {
|
|
241
|
+
const p = shared;
|
|
242
|
+
shared = null;
|
|
243
|
+
await p?.close();
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=scan-pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-pool.js","sourceRoot":"","sources":["../src/scan-pool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,S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;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;CACF;AAED,6EAA6E;AAC7E,IAAI,MAAM,GAAoB,IAAI,CAAC;AACnC,MAAM,UAAU,QAAQ;IACtB,IAAI,CAAC,MAAM;QAAE,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;IACrC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,4CAA4C;AAC5C,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,CAAC,GAAG,MAAM,CAAC;IACjB,MAAM,GAAG,IAAI,CAAC;IACd,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ServerRuleSpec, type RedactorFinding } from '@chat-recall/engine/core/secret-redactor.js';
|
|
2
|
+
/** One file of a session transcript. Mirrors RawContainer.files. */
|
|
3
|
+
export interface ScanFile {
|
|
4
|
+
name: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Derive a session's compute rows — diff, outcome, commits, markers.
|
|
9
|
+
*
|
|
10
|
+
* The heaviest per-session work in the walk and, until now, entirely on the main
|
|
11
|
+
* thread: `replaySessionAny`, `computeOutcome` and `extractTurnsAny` each read
|
|
12
|
+
* the whole transcript and shell out to git. Measured on the maintainer's tail
|
|
13
|
+
* of sessions needing a rebuild: ~5 seconds each, against 78ms for the scan.
|
|
14
|
+
*
|
|
15
|
+
* It takes only an id — the worker reads the transcript itself, so nothing large
|
|
16
|
+
* crosses the boundary on the way in, and `withSessionReadCache` inside means it
|
|
17
|
+
* reads once rather than four times.
|
|
18
|
+
*/
|
|
19
|
+
export interface DerivedTask {
|
|
20
|
+
id: number;
|
|
21
|
+
task: 'derived';
|
|
22
|
+
prefixedId: string;
|
|
23
|
+
toolId: string;
|
|
24
|
+
mtime: number;
|
|
25
|
+
maxRowBytes: number;
|
|
26
|
+
pack?: {
|
|
27
|
+
version: string;
|
|
28
|
+
rules: ServerRuleSpec[];
|
|
29
|
+
};
|
|
30
|
+
packVersion: string;
|
|
31
|
+
}
|
|
32
|
+
export interface DerivedResult {
|
|
33
|
+
id: number;
|
|
34
|
+
rows: {
|
|
35
|
+
session_id: string;
|
|
36
|
+
mtime: number;
|
|
37
|
+
compute: Array<{
|
|
38
|
+
kind: string;
|
|
39
|
+
mtime: number;
|
|
40
|
+
data: unknown;
|
|
41
|
+
}>;
|
|
42
|
+
outcome_row: unknown | null;
|
|
43
|
+
} | null;
|
|
44
|
+
redactions: number;
|
|
45
|
+
error?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ScanTask {
|
|
48
|
+
id: number;
|
|
49
|
+
task?: 'scan';
|
|
50
|
+
files: ScanFile[];
|
|
51
|
+
/** Container fields needed to rebuild it for gzip, minus the file text. */
|
|
52
|
+
container: {
|
|
53
|
+
v: 1;
|
|
54
|
+
tool: string;
|
|
55
|
+
mtime: number;
|
|
56
|
+
srcHash?: string;
|
|
57
|
+
};
|
|
58
|
+
/** Produce the gzipped archive too, or scan and redact only. */
|
|
59
|
+
includeRaw: boolean;
|
|
60
|
+
/** Skip the archive when it would exceed this many gzipped bytes. */
|
|
61
|
+
maxRawBytes: number;
|
|
62
|
+
/** Server rule pack, sent only when `packVersion` differs from the worker's. */
|
|
63
|
+
pack?: {
|
|
64
|
+
version: string;
|
|
65
|
+
rules: ServerRuleSpec[];
|
|
66
|
+
};
|
|
67
|
+
packVersion: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ScanResult {
|
|
70
|
+
id: number;
|
|
71
|
+
findings: RedactorFinding[];
|
|
72
|
+
redactions: number;
|
|
73
|
+
/** Present only when includeRaw and the archive fit inside maxRawBytes. */
|
|
74
|
+
rawB64?: string;
|
|
75
|
+
rawSize?: number;
|
|
76
|
+
error?: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=scan-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-worker.d.ts","sourceRoot":"","sources":["../src/scan-worker.ts"],"names":[],"mappings":"AA8BA,OAAO,EAEL,KAAK,cAAc,EAAE,KAAK,eAAe,EAC1C,MAAM,6CAA6C,CAAC;AAErD,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AAExD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC;IACpD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAChJ,UAA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