chat-recall 0.7.37 → 0.7.39

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.
@@ -35,10 +35,11 @@ export declare function signIn(server: string, onPrompt: (p: DeviceLoginPrompt)
35
35
  /** The command that an AI tool runs for the relay: `chat-recall-mcp` on the PATH, else the bundle beside this file. */
36
36
  export declare function relayCommand(bundleDir: string): string[];
37
37
  /**
38
- * Puts the relay into every AI tool of the machine that the kit knows. The other tools keep the writer of `init`, and
39
- * a machine without the kit leaves every tool to it.
38
+ * Puts the hosted server into every AI tool of the machine that the kit knows, as a URL entry: a tool that reads the
39
+ * entry opens the session of the person against the server itself, and no relay process starts on this machine.
40
+ * The other tools keep the writer of `init`, and a machine without the kit leaves every tool to it.
40
41
  * `CHAT_RECALL_MCP_REGISTRATION=own` leaves the AI tools' own programs alone (`claude mcp add` and the like), for a
41
42
  * test or an image that must not run them; the writer of `init` still runs.
42
43
  */
43
- export declare function registerRelay(server: string, bundleDir: string, host?: Host, env?: NodeJS.ProcessEnv): Outcome[];
44
+ export declare function registerRelay(server: string, _bundleDir: string, host?: Host, env?: NodeJS.ProcessEnv): Outcome[];
44
45
  //# sourceMappingURL=kit-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kit-store.d.ts","sourceRoot":"","sources":["../src/kit-store.ts"],"names":[],"mappings":"AAiBA,OAAO,EAEL,KAAK,IAAI,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAC1C,MAAM,0CAA0C,CAAC;AAKlD,eAAO,MAAM,UAAU,EAAE,KAAK,OAAO,CAAC,EAAE,MAAM,KAAK,KAAkD,CAAC;AAEtG,kDAAkD;AAClD,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AAEtC,0GAA0G;AAC1G,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAK/C,iHAAiH;AACjH,wBAAgB,OAAO,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAKl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O,CAAC,IAAI,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAO,GAC/F,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED,uHAAuH;AACvH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAGxD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,EAAE,CAW9H"}
package/dist/kit-store.js CHANGED
@@ -124,12 +124,13 @@ export function relayCommand(bundleDir) {
124
124
  return bin ? [bin] : [process.execPath, join(bundleDir, 'mcp-relay.js')];
125
125
  }
126
126
  /**
127
- * Puts the relay into every AI tool of the machine that the kit knows. The other tools keep the writer of `init`, and
128
- * a machine without the kit leaves every tool to it.
127
+ * Puts the hosted server into every AI tool of the machine that the kit knows, as a URL entry: a tool that reads the
128
+ * entry opens the session of the person against the server itself, and no relay process starts on this machine.
129
+ * The other tools keep the writer of `init`, and a machine without the kit leaves every tool to it.
129
130
  * `CHAT_RECALL_MCP_REGISTRATION=own` leaves the AI tools' own programs alone (`claude mcp add` and the like), for a
130
131
  * test or an image that must not run them; the writer of `init` still runs.
131
132
  */
132
- export function registerRelay(server, bundleDir, host, env = process.env) {
133
+ export function registerRelay(server, _bundleDir, host, env = process.env) {
133
134
  if (env.CHAT_RECALL_MCP_REGISTRATION?.trim().toLowerCase() === 'own')
134
135
  return [];
135
136
  const kit = optionalKit(env);
@@ -142,7 +143,6 @@ export function registerRelay(server, bundleDir, host, env = process.env) {
142
143
  return kit.addMcpServer(machine, clients, {
143
144
  name: MCP_NAME,
144
145
  url: `${server.replace(/\/+$/, '')}/mcp`,
145
- command: relayCommand(bundleDir),
146
146
  }).outcomes;
147
147
  }
148
148
  //# sourceMappingURL=kit-store.js.map
@@ -1 +1 @@
1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AM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM;KACzC,CAAC,CAAC,QAAQ,CAAC;AACd,CAAC"}
package/dist/mcp-relay.js CHANGED
@@ -377,7 +377,7 @@ function resilientBridge(input, output, first, reconnect, exit, opts = {}) {
377
377
  }
378
378
 
379
379
  // src/mcp-relay.ts
380
- var VERSION = true ? "0.7.37" : "0.0.0";
380
+ var VERSION = true ? "0.7.39" : "0.0.0";
381
381
  var SERVER_URL = new URL("./mcp.js", import.meta.url);
382
382
  var SERVER_PATH = fileURLToPath(SERVER_URL);
383
383
  var START_TIMEOUT_MS = 15e3;
package/dist/mcp.js CHANGED
@@ -7508,15 +7508,18 @@ var init_opencode = __esm({
7508
7508
  FROM part p JOIN (SELECT id, data FROM message WHERE session_id = ?) m ON p.message_id = m.id
7509
7509
  WHERE p.session_id = ?
7510
7510
  ORDER BY p.time_created ASC, p.id ASC
7511
- `).all(realId, realId);
7512
- const lines = [JSON.stringify({ kind: "session", row: session })];
7513
- for (const r of rows)
7514
- lines.push(JSON.stringify({ kind: "part", row: r }));
7511
+ `);
7512
+ const chunks = [Buffer.from(`${JSON.stringify({ kind: "session", row: session })}
7513
+ `, "utf-8")];
7514
+ for (const r of rows.iterate(realId, realId)) {
7515
+ chunks.push(Buffer.from(`${JSON.stringify({ kind: "part", row: r })}
7516
+ `, "utf-8"));
7517
+ }
7515
7518
  const mtime = session.time_updated || session.time_created || Date.now();
7516
7519
  return {
7517
7520
  tool: "opencode",
7518
7521
  mtime: Number(mtime),
7519
- files: [{ name: `${realId}.dump.jsonl`, bytes: Buffer.from(lines.join("\n") + "\n", "utf-8") }]
7522
+ files: [{ name: `${realId}.dump.jsonl`, bytes: Buffer.concat(chunks) }]
7520
7523
  };
7521
7524
  } catch {
7522
7525
  return null;
@@ -17370,6 +17373,29 @@ var init_secret_precision = __esm({
17370
17373
  }
17371
17374
  });
17372
17375
 
17376
+ // src/walk-budget.ts
17377
+ function walkSessionLimit(env = process.env) {
17378
+ const raw = env.CHAT_RECALL_SYNC_WALK_MAX;
17379
+ if (raw === void 0 || raw.trim() === "") return DEFAULT_WALK_MAX_SESSIONS;
17380
+ const n = Number(raw);
17381
+ if (!Number.isFinite(n) || !Number.isInteger(n) || n <= 0) return DEFAULT_WALK_MAX_SESSIONS;
17382
+ return n;
17383
+ }
17384
+ function orderRefsForWalk(refs, isAcked) {
17385
+ const fresh = [];
17386
+ const acked = [];
17387
+ for (const ref of refs) (isAcked(ref.prefixedId) ? acked : fresh).push(ref);
17388
+ return [...fresh, ...acked];
17389
+ }
17390
+ var DEFAULT_WALK_MAX_SESSIONS, FULL_WALK_INTERVAL_MS;
17391
+ var init_walk_budget = __esm({
17392
+ "src/walk-budget.ts"() {
17393
+ "use strict";
17394
+ DEFAULT_WALK_MAX_SESSIONS = 2e3;
17395
+ FULL_WALK_INTERVAL_MS = 6 * 60 * 6e4;
17396
+ }
17397
+ });
17398
+
17373
17399
  // ../engine/dist/core/entity-extractor.js
17374
17400
  function looksLikeStrictTool(raw) {
17375
17401
  const t = raw.trim().toLowerCase();
@@ -29285,7 +29311,7 @@ var init_http = __esm({
29285
29311
  CLI_VERSION = JSON.parse(readFileSync44(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
29286
29312
  } catch {
29287
29313
  try {
29288
- if (true) CLI_VERSION = "0.7.37";
29314
+ if (true) CLI_VERSION = "0.7.39";
29289
29315
  } catch {
29290
29316
  }
29291
29317
  }
@@ -29783,7 +29809,7 @@ var init_telemetry = __esm({
29783
29809
  init_sync_client();
29784
29810
  cliVersion2 = () => {
29785
29811
  try {
29786
- return true ? "0.7.37" : "dev";
29812
+ return true ? "0.7.39" : "dev";
29787
29813
  } catch {
29788
29814
  return "dev";
29789
29815
  }
@@ -30413,8 +30439,11 @@ __export(sync_client_exports, {
30413
30439
  buildConversationTail: () => buildConversationTail,
30414
30440
  classedError: () => classedError,
30415
30441
  classifyError: () => classifyError,
30442
+ countsForBreaker: () => countsForBreaker,
30443
+ exportByteLength: () => exportByteLength,
30416
30444
  isStandingFailure: () => isStandingFailure,
30417
30445
  isSyncSkip: () => isSyncSkip,
30446
+ lastSuccessfulWalkAt: () => lastSuccessfulWalkAt,
30418
30447
  loadAllCredentials: () => loadAllCredentials,
30419
30448
  loadCredentials: () => loadCredentials,
30420
30449
  reapStaleScanDirs: () => reapStaleScanDirs,
@@ -30449,11 +30478,15 @@ function isStandingFailure(err) {
30449
30478
  const c = taggedClass(err);
30450
30479
  return c !== null && STANDING_FAILURE.has(c);
30451
30480
  }
30481
+ function countsForBreaker(cls) {
30482
+ return cls !== "rate_limited" && cls !== "payload_too_large";
30483
+ }
30452
30484
  function classifyError(msg, err) {
30453
30485
  const tagged = taggedClass(err);
30454
30486
  if (tagged) return tagged;
30455
30487
  const m = msg.toLowerCase();
30456
30488
  if (m.includes("429")) return "rate_limited";
30489
+ if (m.includes("body_too_large") || m.includes("payload too large") || m.includes("entity too large")) return "payload_too_large";
30457
30490
  if (m.includes("402")) return "payment_required";
30458
30491
  if (m.includes("401") || m.includes("403") || m.includes("token")) return "auth";
30459
30492
  if (m.includes("timed out") || m.includes("etimedout") || m.includes("aborted due to timeout")) return "timeout";
@@ -30722,6 +30755,12 @@ async function syncSessions(opts = {}) {
30722
30755
  const msg = e instanceof Error ? e.message : String(e);
30723
30756
  errors.push(`${cred.serverUrl}: ${msg}`);
30724
30757
  perTarget[cred.serverUrl] = { ok: false, error: msg, accepted: acceptedUploads.get(cred.serverUrl) ?? 0 };
30758
+ const cls = classifyError(msg, e);
30759
+ if (!countsForBreaker(cls)) {
30760
+ console.error(`[sync] ${cred.serverUrl}: ${cls === "rate_limited" ? "asked to slow down" : "refused one oversized body"}; the target stays out of cooldown and the next walk retries`);
30761
+ record({ kind: "target_throttled", failures: 0, retryInMs: 0, errorClass: cls, local: isLocalHost(cred.serverUrl) ? 1 : 0 });
30762
+ continue;
30763
+ }
30725
30764
  const next = noteTargetFailure(cred.serverUrl, msg);
30726
30765
  const notice = breakerNotice(cred.serverUrl, next);
30727
30766
  if (notice) console.error(`[sync] ${notice}`);
@@ -30734,7 +30773,7 @@ async function syncSessions(opts = {}) {
30734
30773
  kind: next.tripped ? "breaker_trip" : "target_failure",
30735
30774
  failures: next.failures,
30736
30775
  retryInMs: next.retryInMs,
30737
- errorClass: classifyError(msg, e),
30776
+ errorClass: cls,
30738
30777
  local: isLocalHost(cred.serverUrl) ? 1 : 0
30739
30778
  });
30740
30779
  }
@@ -30759,6 +30798,11 @@ async function syncSessions(opts = {}) {
30759
30798
  rssPeakMb: Math.round(process.memoryUsage().rss / 1048576)
30760
30799
  });
30761
30800
  }
30801
+ if (agg) {
30802
+ for (const t of targets) {
30803
+ if (!errors.some((e) => e.startsWith(`${t.serverUrl}:`))) noteWalkSuccess(t.serverUrl);
30804
+ }
30805
+ }
30762
30806
  void flush().catch(() => {
30763
30807
  });
30764
30808
  if (!agg) throw new Error(`sync failed for all targets:
@@ -30767,6 +30811,32 @@ async function syncSessions(opts = {}) {
30767
30811
  ${errors.join("\n ")}`);
30768
30812
  return { ...agg, perTarget };
30769
30813
  }
30814
+ function walkStatePath() {
30815
+ return join56(getDataDir(), "walk-state.json");
30816
+ }
30817
+ function readWalkState() {
30818
+ try {
30819
+ const raw = JSON.parse(readFileSync47(walkStatePath(), "utf-8"));
30820
+ return raw && typeof raw === "object" ? raw : {};
30821
+ } catch {
30822
+ return {};
30823
+ }
30824
+ }
30825
+ function noteWalkSuccess(serverUrl) {
30826
+ try {
30827
+ const state2 = readWalkState();
30828
+ state2[serverUrl.replace(/\/+$/, "")] = Date.now();
30829
+ mkdirSync14(getDataDir(), { recursive: true });
30830
+ writeFileSync11(walkStatePath(), JSON.stringify(state2));
30831
+ } catch {
30832
+ }
30833
+ }
30834
+ function lastSuccessfulWalkAt(serverUrl) {
30835
+ const state2 = readWalkState();
30836
+ const key2 = serverUrl?.replace(/\/+$/, "");
30837
+ const stamps = key2 ? [state2[key2]] : Object.values(state2);
30838
+ return stamps.reduce((max, v) => Math.max(max, typeof v === "number" ? v : 0), 0);
30839
+ }
30770
30840
  async function postFieldBatch(base2, token, rows) {
30771
30841
  const headers2 = { "content-type": "application/json" };
30772
30842
  if (token) headers2.authorization = `Bearer ${token}`;
@@ -31296,7 +31366,9 @@ async function syncToTargetInScope(cred, opts = {}) {
31296
31366
  }
31297
31367
  };
31298
31368
  let scanMs = 0, scanned = 0;
31299
- const slice = refs.slice(0, opts.limit ?? refs.length);
31369
+ const walkMax = opts.limit ?? walkSessionLimit();
31370
+ const ordered = walkMax > 0 ? orderRefsForWalk(refs, (id) => Boolean(ledger?.get(id))) : refs;
31371
+ const slice = walkMax > 0 ? ordered.slice(0, walkMax) : ordered;
31300
31372
  const trace = process.env.CHAT_RECALL_SYNC_TRACE === "1" ? (msg) => {
31301
31373
  const m = process.memoryUsage();
31302
31374
  console.error(`[sync-trace] ${msg} \xB7 heap=${(m.heapUsed / 1048576).toFixed(0)}MB rss=${(m.rss / 1048576).toFixed(0)}MB`);
@@ -31690,6 +31762,10 @@ async function syncToTargetInScope(cred, opts = {}) {
31690
31762
  scanMs: Math.round(scanMs)
31691
31763
  };
31692
31764
  }
31765
+ function exportByteLength(exp) {
31766
+ if (!exp) return 0;
31767
+ return exp.files.reduce((n, f) => n + f.bytes.length, 0);
31768
+ }
31693
31769
  async function scanTranscriptFindingsChunked(ref, tenantRules) {
31694
31770
  const backend = getBackendForId(ref.prefixedId);
31695
31771
  const findings = [];
@@ -31760,7 +31836,20 @@ async function buildConversationSync(ref, mtime, opts = {}) {
31760
31836
  const backend = getBackendForId(ref.prefixedId) ?? getBackend("claude");
31761
31837
  const exp = backend.exportRawSession(ref.prefixedId);
31762
31838
  let built;
31763
- if (exp) {
31839
+ const exportBytes = exportByteLength(exp);
31840
+ const overCeiling = exportBytes > FULL_BUILD_MAX_BYTES;
31841
+ if (exp && overCeiling) {
31842
+ console.error(`[sync] ${ref.prefixedId} export is ${(exportBytes / 1048576).toFixed(0)}MB (over the ${(FULL_BUILD_MAX_BYTES / 1048576).toFixed(0)}MB ceiling) \u2014 parsing it in place, no container copy, no shadow merge, no raw archive`);
31843
+ record({
31844
+ kind: "oversized_session",
31845
+ mb: Math.round(exportBytes / 1048576),
31846
+ tool: ref.toolId,
31847
+ dedupeKey: stableMark(ref.prefixedId)
31848
+ });
31849
+ includeRaw = false;
31850
+ includeMeta = false;
31851
+ }
31852
+ if (exp && !overCeiling) {
31764
31853
  try {
31765
31854
  built = buildRawContainer(exp);
31766
31855
  srcHash = containerSrcHash(built);
@@ -31784,7 +31873,7 @@ async function buildConversationSync(ref, mtime, opts = {}) {
31784
31873
  includeMeta = false;
31785
31874
  }
31786
31875
  }
31787
- const shadow = updateShadow(ref.rawId, exp, built);
31876
+ const shadow = overCeiling ? { container: null, status: "skipped", recovered: 0 } : updateShadow(ref.rawId, exp, built);
31788
31877
  if (shadow.container) {
31789
31878
  fullestContainer = shadow.container;
31790
31879
  if (shadow.status === "rewrite-merged" && shadow.recovered > 0) {
@@ -32151,6 +32240,7 @@ var init_sync_client = __esm({
32151
32240
  init_secret_precision();
32152
32241
  init_settings();
32153
32242
  init_paths();
32243
+ init_walk_budget();
32154
32244
  init_tool_backend();
32155
32245
  init_transcript();
32156
32246
  init_claude2();
@@ -32184,7 +32274,7 @@ var init_sync_client = __esm({
32184
32274
  ownVersion = JSON.parse(readFileSync47(join56(dir, "../package.json"), "utf-8")).version || ownVersion;
32185
32275
  } catch {
32186
32276
  try {
32187
- if (true) ownVersion = "0.7.37";
32277
+ if (true) ownVersion = "0.7.39";
32188
32278
  } catch {
32189
32279
  }
32190
32280
  }
@@ -32457,6 +32547,7 @@ var init_sync_delegate = __esm({
32457
32547
  var service_installer_exports = {};
32458
32548
  __export(service_installer_exports, {
32459
32549
  ServiceInstallError: () => ServiceInstallError,
32550
+ WATCH_HEAP_MB: () => WATCH_HEAP_MB,
32460
32551
  installService: () => installService,
32461
32552
  isServiceRunning: () => isServiceRunning,
32462
32553
  platformName: () => platformName,
@@ -32567,9 +32658,8 @@ function renderSystemdUnit(watchJs, node, logFile) {
32567
32658
  // Bounded heap: the daemon does bursty batch work (transcript parse,
32568
32659
  // base64 payloads); V8's default old-space on a big-RAM box is ~4GB and
32569
32660
  // GC only gets aggressive near the ceiling — observed as a multi-GB RSS
32570
- // sawtooth. 1536MB keeps GC honest (768 OOMed on the largest subagent-fanout session) with plenty of headroom for the
32571
- // largest transcripts.
32572
- `ExecStart=${node} --max-old-space-size=1536 ${watchJs}`,
32661
+ // sawtooth. The ceiling below is measured, not guessed: see WATCH_HEAP_MB.
32662
+ `ExecStart=${node} --max-old-space-size=${WATCH_HEAP_MB} ${watchJs}`,
32573
32663
  // ALWAYS: the collector never ends its own work, so any exit systemd did
32574
32664
  // not ask for is a fault. Under on-failure a clean exit left it dead: on
32575
32665
  // 2026-09-16 the unit went "inactive (dead) … status=0/SUCCESS" and stayed
@@ -32642,7 +32732,7 @@ function renderLaunchdPlist(watchJs, node, logFile, label = "com.chat-recall.wat
32642
32732
  '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
32643
32733
  '<plist version="1.0"><dict>',
32644
32734
  ` <key>Label</key><string>${label}</string>`,
32645
- ` <key>ProgramArguments</key><array><string>${node}</string><string>--max-old-space-size=1536</string><string>${watchJs}</string></array>`,
32735
+ ` <key>ProgramArguments</key><array><string>${node}</string><string>--max-old-space-size=${WATCH_HEAP_MB}</string><string>${watchJs}</string></array>`,
32646
32736
  " <key>RunAtLoad</key><true/>",
32647
32737
  " <key>KeepAlive</key><true/>",
32648
32738
  ` <key>StandardOutPath</key><string>${logFile}</string>`,
@@ -32653,7 +32743,7 @@ function renderLaunchdPlist(watchJs, node, logFile, label = "com.chat-recall.wat
32653
32743
  }
32654
32744
  function installWindowsTask(watchJs, node, logFile) {
32655
32745
  const taskName = "chat-recall-watch";
32656
- const tr = `cmd /c \\"\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`;
32746
+ const tr = `cmd /c \\"\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`;
32657
32747
  try {
32658
32748
  execSync5(`schtasks /create /tn "${taskName}" /tr "${tr}" /sc onlogon /rl LIMITED /f`, { stdio: "inherit" });
32659
32749
  try {
@@ -32666,7 +32756,7 @@ function installWindowsTask(watchJs, node, logFile) {
32666
32756
  return { definitionPath: null, logFile };
32667
32757
  }
32668
32758
  function renderWindowsTaskCommand(watchJs, node, taskName = "chat-recall-watch", logFile) {
32669
- const tr = logFile ? `cmd /c \\"\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"` : `\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\"`;
32759
+ const tr = logFile ? `cmd /c \\"\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"` : `\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\"`;
32670
32760
  return `schtasks /create /tn "${taskName}" /tr "${tr}" /sc onlogon /rl LIMITED /f`;
32671
32761
  }
32672
32762
  function uninstallService() {
@@ -32717,10 +32807,11 @@ function platformName() {
32717
32807
  if (process.platform === "win32") return "Scheduled Task";
32718
32808
  return process.platform;
32719
32809
  }
32720
- var ServiceInstallError;
32810
+ var WATCH_HEAP_MB, ServiceInstallError;
32721
32811
  var init_service_installer = __esm({
32722
32812
  "src/service-installer.ts"() {
32723
32813
  "use strict";
32814
+ WATCH_HEAP_MB = 640;
32724
32815
  ServiceInstallError = class extends Error {
32725
32816
  hint;
32726
32817
  constructor(message, hint) {
@@ -42355,7 +42446,7 @@ function installCrashGuards() {
42355
42446
  reportClientEvent2("mcp_crash", { message: err.stack || err.message });
42356
42447
  });
42357
42448
  }
42358
- var RELAY_VERSION = true ? "0.7.37" : "0.0.0";
42449
+ var RELAY_VERSION = true ? "0.7.39" : "0.0.0";
42359
42450
  function daemonIdleSecs() {
42360
42451
  const raw = process.env.CHAT_RECALL_DAEMON_IDLE_SECS;
42361
42452
  if (raw === void 0) return 900;
@@ -267,7 +267,7 @@ try {
267
267
  CLI_VERSION = JSON.parse(readFileSync5(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
268
268
  } catch {
269
269
  try {
270
- if (true) CLI_VERSION = "0.7.37";
270
+ if (true) CLI_VERSION = "0.7.39";
271
271
  } catch {
272
272
  }
273
273
  }
@@ -7149,15 +7149,18 @@ var init_opencode = __esm({
7149
7149
  FROM part p JOIN (SELECT id, data FROM message WHERE session_id = ?) m ON p.message_id = m.id
7150
7150
  WHERE p.session_id = ?
7151
7151
  ORDER BY p.time_created ASC, p.id ASC
7152
- `).all(realId, realId);
7153
- const lines = [JSON.stringify({ kind: "session", row: session })];
7154
- for (const r of rows)
7155
- lines.push(JSON.stringify({ kind: "part", row: r }));
7152
+ `);
7153
+ const chunks = [Buffer.from(`${JSON.stringify({ kind: "session", row: session })}
7154
+ `, "utf-8")];
7155
+ for (const r of rows.iterate(realId, realId)) {
7156
+ chunks.push(Buffer.from(`${JSON.stringify({ kind: "part", row: r })}
7157
+ `, "utf-8"));
7158
+ }
7156
7159
  const mtime = session.time_updated || session.time_created || Date.now();
7157
7160
  return {
7158
7161
  tool: "opencode",
7159
7162
  mtime: Number(mtime),
7160
- files: [{ name: `${realId}.dump.jsonl`, bytes: Buffer.from(lines.join("\n") + "\n", "utf-8") }]
7163
+ files: [{ name: `${realId}.dump.jsonl`, bytes: Buffer.concat(chunks) }]
7161
7164
  };
7162
7165
  } catch {
7163
7166
  return null;
@@ -1,4 +1,17 @@
1
1
  export type Platform = 'linux' | 'darwin' | 'win32' | 'other';
2
+ /**
3
+ * Old-space ceiling handed to every daemon start, in MiB.
4
+ *
5
+ * V8 expands its old space until GC pressure or this ceiling stops it, so the
6
+ * ceiling IS the memory the collector reaches on a bursty walk: at 1536 MiB the
7
+ * unit peaked at 1.64 GiB with a live heap of 10-65 MiB after collection, and
8
+ * systemd killed it for crossing MemoryHigh. The walk's largest single working
9
+ * set measured on a real corpus is ~300 MiB (a 123 MB transcript: export
10
+ * buffers plus the container strings), so 640 MiB is twice that, and the
11
+ * per-session FULL_BUILD_MAX_BYTES ceiling keeps anything larger off this path.
12
+ * The value is exported so the unit tests assert it instead of a stale literal.
13
+ */
14
+ export declare const WATCH_HEAP_MB = 640;
2
15
  export interface ServicePaths {
3
16
  /** Absolute path to the unit/plist/task definition (or null on Windows). */
4
17
  definitionPath: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"service-installer.d.ts","sourceRoot":"","sources":["../src/service-installer.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;CACjB;AAiBD,0EAA0E;AAC1E,wBAAgB,gBAAgB,IAAI,OAAO,CAe1C;AAED;;;GAGG;AACH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,IAAI,OAAO,CA2BlD;AAED,wBAAgB,cAAc,IAAI,YAAY,CAiB7C;AAsBD,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAyDxF;AAmBD,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAA0B,GAAG,MAAM,CAa1H;AAuBD,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,SA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AAC,EAAE,MAAM,GAAG,MAAM,CAKhI;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAoB1C;AAED,kDAAkD;AAClD,wBAAgB,YAAY,IAAI,MAAM,CAKrC;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;gBACF,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM;CAI3C"}
@@ -14,6 +14,19 @@ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs';
14
14
  import { homedir } from 'os';
15
15
  import { join } from 'path';
16
16
  import { fileURLToPath } from 'url';
17
+ /**
18
+ * Old-space ceiling handed to every daemon start, in MiB.
19
+ *
20
+ * V8 expands its old space until GC pressure or this ceiling stops it, so the
21
+ * ceiling IS the memory the collector reaches on a bursty walk: at 1536 MiB the
22
+ * unit peaked at 1.64 GiB with a live heap of 10-65 MiB after collection, and
23
+ * systemd killed it for crossing MemoryHigh. The walk's largest single working
24
+ * set measured on a real corpus is ~300 MiB (a 123 MB transcript: export
25
+ * buffers plus the container strings), so 640 MiB is twice that, and the
26
+ * per-session FULL_BUILD_MAX_BYTES ceiling keeps anything larger off this path.
27
+ * The value is exported so the unit tests assert it instead of a stale literal.
28
+ */
29
+ export const WATCH_HEAP_MB = 640;
17
30
  /** Resolve the watch.js entry next to this file and the log file path. */
18
31
  function resolveDaemonPaths() {
19
32
  const watchJs = fileURLToPath(new URL('./watch.js', import.meta.url));
@@ -155,9 +168,8 @@ export function renderSystemdUnit(watchJs, node, logFile) {
155
168
  // Bounded heap: the daemon does bursty batch work (transcript parse,
156
169
  // base64 payloads); V8's default old-space on a big-RAM box is ~4GB and
157
170
  // GC only gets aggressive near the ceiling — observed as a multi-GB RSS
158
- // sawtooth. 1536MB keeps GC honest (768 OOMed on the largest subagent-fanout session) with plenty of headroom for the
159
- // largest transcripts.
160
- `ExecStart=${node} --max-old-space-size=1536 ${watchJs}`,
171
+ // sawtooth. The ceiling below is measured, not guessed: see WATCH_HEAP_MB.
172
+ `ExecStart=${node} --max-old-space-size=${WATCH_HEAP_MB} ${watchJs}`,
161
173
  // ALWAYS: the collector never ends its own work, so any exit systemd did
162
174
  // not ask for is a fault. Under on-failure a clean exit left it dead: on
163
175
  // 2026-09-16 the unit went "inactive (dead) … status=0/SUCCESS" and stayed
@@ -225,7 +237,7 @@ export function renderLaunchdPlist(watchJs, node, logFile, label = 'com.chat-rec
225
237
  '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
226
238
  '<plist version="1.0"><dict>',
227
239
  ` <key>Label</key><string>${label}</string>`,
228
- ` <key>ProgramArguments</key><array><string>${node}</string><string>--max-old-space-size=1536</string><string>${watchJs}</string></array>`,
240
+ ` <key>ProgramArguments</key><array><string>${node}</string><string>--max-old-space-size=${WATCH_HEAP_MB}</string><string>${watchJs}</string></array>`,
229
241
  ' <key>RunAtLoad</key><true/>',
230
242
  ' <key>KeepAlive</key><true/>',
231
243
  ` <key>StandardOutPath</key><string>${logFile}</string>`,
@@ -243,7 +255,7 @@ function installWindowsTask(watchJs, node, logFile) {
243
255
  //
244
256
  // schtasks /tr cannot express redirection itself, so wrap in cmd /c. The
245
257
  // whole thing is one /tr argument, hence the escaped quotes.
246
- const tr = `cmd /c \\"\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`;
258
+ const tr = `cmd /c \\"\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`;
247
259
  try {
248
260
  execSync(`schtasks /create /tn "${taskName}" /tr "${tr}" /sc onlogon /rl LIMITED /f`, { stdio: 'inherit' });
249
261
  // Start now too (best-effort — starts next logon if /run unsupported).
@@ -260,8 +272,8 @@ function installWindowsTask(watchJs, node, logFile) {
260
272
  /** Render the schtasks /create command (pure — no exec). */
261
273
  export function renderWindowsTaskCommand(watchJs, node, taskName = 'chat-recall-watch', logFile) {
262
274
  const tr = logFile
263
- ? `cmd /c \\"\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`
264
- : `\\"${node}\\" --max-old-space-size=1536 \\"${watchJs}\\"`;
275
+ ? `cmd /c \\"\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\" >> \\"${logFile}\\" 2>&1\\"`
276
+ : `\\"${node}\\" --max-old-space-size=${WATCH_HEAP_MB} \\"${watchJs}\\"`;
265
277
  return `schtasks /create /tn "${taskName}" /tr "${tr}" /sc onlogon /rl LIMITED /f`;
266
278
  }
267
279
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"service-installer.js","sourceRoot":"","sources":["../src/service-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAWpC,0EAA0E;AAC1E,SAAS,kBAAkB;IACzB,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,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Class, message: string): Error;
6
6
  /** True when this error must not be retried. Exported for the tests. */
7
7
  export declare function isStandingFailure(err: unknown): boolean;
8
- export type FailureClass = 'rate_limited' | 'payment_required' | 'auth' | 'timeout' | 'refused' | 'dns' | 'network' | 'insecure_transport' | 'server_error' | 'other';
8
+ export type FailureClass = 'rate_limited' | 'payload_too_large' | 'payment_required' | 'auth' | 'timeout' | 'refused' | 'dns' | 'network' | 'insecure_transport' | 'server_error' | 'other';
9
9
  /**
10
10
  * Reduce an error message to a bounded CLASS.
11
11
  *
@@ -16,6 +16,17 @@ export type FailureClass = 'rate_limited' | 'payment_required' | 'auth' | 'timeo
16
16
  * A tag from the throw site always wins. The message tests remain for errors
17
17
  * thrown by fetch itself, and by code that predates the tag.
18
18
  */
19
+ /**
20
+ * Does a failed walk count against the target's circuit breaker?
21
+ *
22
+ * A server that answers 429 (busy, Retry-After) or 413 (this body is above the
23
+ * limit) is not broken. The in-walk retry already honoured Retry-After, and the
24
+ * body limit is a fact about one session. Counting either would open the
25
+ * breaker for 1–15 minutes and silence a healthy collector exactly while the
26
+ * server recovers (issue #16: the collector sat in cooldown on 502s and on
27
+ * rate limits while the pods were restarting).
28
+ */
29
+ export declare function countsForBreaker(cls: FailureClass): boolean;
19
30
  export declare function classifyError(msg: string, err?: unknown): FailureClass;
20
31
  import { type ArchiveFile } from './raw-archive-parts.js';
21
32
  import '@chat-recall/engine/core/backends/index.js';
@@ -122,6 +133,11 @@ export interface ReconcileResult {
122
133
  absent: number;
123
134
  }>;
124
135
  }
136
+ /**
137
+ * When did a walk last succeed (0 = never on this machine)?
138
+ * The daemon uses this to decide 'changed' or 'full' after a restart.
139
+ */
140
+ export declare function lastSuccessfulWalkAt(serverUrl?: string): number;
125
141
  /**
126
142
  * Manual entrypoint (CLI `reconcile`): reconcile derived fields for ALL targets.
127
143
  * Normal `sync` already runs reconciliation each pass; this is the explicit
@@ -255,10 +271,24 @@ export interface UnchangedConversation {
255
271
  * a resting RSS near 400 MB. At about 18 bytes per container byte, 24 MB
256
272
  * stays under the limit. */
257
273
  export declare const FULL_BUILD_MAX_BYTES: number;
274
+ /** Bytes of transcript an export actually carries.
275
+ *
276
+ * The ceiling above is measured on what we HAVE, and what we have first is the
277
+ * export. Checking the export is what makes the guard reach every backend:
278
+ * sessionBuildBytes() reads fileSize(), which is 0 for a backend whose sessions
279
+ * live in SQLite and have no file at all, so the full build ran and a 353 MB
280
+ * session OOMed the walk. A build costs many times the bytes it is given, so
281
+ * the decision has to be made before the build, not after it. */
282
+ export declare function exportByteLength(exp: {
283
+ files: Array<{
284
+ bytes: {
285
+ length: number;
286
+ };
287
+ }>;
288
+ } | null | undefined): number;
258
289
  /** Transcript bytes beyond which the derived computations (diff, outcome,
259
290
  * commits, markers) are skipped. They run in the scan worker and read the
260
- * whole transcript; a 353 MB session with 100 MB JSON lines OOMed the walk. */
261
- export declare const DERIVED_MAX_BYTES: number;
291
+ * whole transcript; a 353 MB session with 100 MB JSON lines OOMed the walk. */ export declare const DERIVED_MAX_BYTES: number;
262
292
  /** Bytes of transcript one chunk of a chunked sync carries: the head of an
263
293
  * oversized FULL sync, and each append. */
264
294
  export declare const SYNC_CHUNK_BYTES: number;