chat-recall 0.7.79 → 0.7.81

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/dist/cli.js CHANGED
@@ -7615,7 +7615,38 @@ var init_first_prompt = __esm({
7615
7615
  });
7616
7616
 
7617
7617
  // ../engine/dist/core/project-dir-name.js
7618
- import { readdirSync as readdirSync6 } from "node:fs";
7618
+ import { readdirSync as readdirSync6, statSync as statSync8 } from "node:fs";
7619
+ function makeChildDirsLister(fs = realFs) {
7620
+ const cache4 = /* @__PURE__ */ new Map();
7621
+ let diskListings = 0;
7622
+ return {
7623
+ list(path) {
7624
+ let stamp = null;
7625
+ try {
7626
+ stamp = fs.statDir(path);
7627
+ } catch {
7628
+ }
7629
+ const hit = cache4.get(path);
7630
+ if (stamp && hit && hit.mtimeMs === stamp.mtimeMs && hit.nlink === stamp.nlink)
7631
+ return hit.names;
7632
+ const listedAt = fs.now();
7633
+ const names = fs.listDirs(path);
7634
+ diskListings++;
7635
+ cache4.delete(path);
7636
+ if (stamp && listedAt - stamp.mtimeMs > CHILD_DIRS_RACY_MS) {
7637
+ if (cache4.size >= CHILD_DIRS_CACHE_MAX) {
7638
+ const oldest = cache4.keys().next().value;
7639
+ if (oldest !== void 0)
7640
+ cache4.delete(oldest);
7641
+ }
7642
+ cache4.set(path, { ...stamp, names });
7643
+ }
7644
+ return names;
7645
+ },
7646
+ diskListings: () => diskListings,
7647
+ clear: () => cache4.clear()
7648
+ };
7649
+ }
7619
7650
  function looksWindowsEncoded(dirName) {
7620
7651
  return /^[A-Za-z]--/.test(dirName);
7621
7652
  }
@@ -7635,7 +7666,7 @@ function resolveProjectDirName(dirName, deps = {}) {
7635
7666
  return structural;
7636
7667
  if (looksWindowsEncoded(dirName))
7637
7668
  return structural;
7638
- const readdir3 = deps.readdir ?? ((p) => readdirSync6(p, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name));
7669
+ const readdir3 = deps.readdir ?? childDirs.list;
7639
7670
  const encodeName = (name) => name.replace(/[-_.]/g, "-");
7640
7671
  let remaining = dirName.replace(/^-/, "");
7641
7672
  let current = "/";
@@ -7666,9 +7697,21 @@ function resolveProjectDirName(dirName, deps = {}) {
7666
7697
  }
7667
7698
  return remaining ? structural : current;
7668
7699
  }
7700
+ var CHILD_DIRS_RACY_MS, CHILD_DIRS_CACHE_MAX, realFs, childDirs;
7669
7701
  var init_project_dir_name = __esm({
7670
7702
  "../engine/dist/core/project-dir-name.js"() {
7671
7703
  "use strict";
7704
+ CHILD_DIRS_RACY_MS = 2e3;
7705
+ CHILD_DIRS_CACHE_MAX = 512;
7706
+ realFs = {
7707
+ statDir: (p) => {
7708
+ const st = statSync8(p);
7709
+ return { mtimeMs: st.mtimeMs, nlink: st.nlink };
7710
+ },
7711
+ listDirs: (p) => readdirSync6(p, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name),
7712
+ now: () => Date.now()
7713
+ };
7714
+ childDirs = makeChildDirsLister();
7672
7715
  }
7673
7716
  });
7674
7717
 
@@ -7946,7 +7989,7 @@ var init_generic_engine = __esm({
7946
7989
  });
7947
7990
 
7948
7991
  // ../engine/dist/core/backends/claude.js
7949
- import { existsSync as existsSync9, readdirSync as readdirSync7, readFileSync as readFileSync7, statSync as statSync8, openSync as openSync3, readSync as readSync3, closeSync as closeSync3 } from "fs";
7992
+ import { existsSync as existsSync9, readdirSync as readdirSync7, readFileSync as readFileSync7, statSync as statSync9, openSync as openSync3, readSync as readSync3, closeSync as closeSync3 } from "fs";
7950
7993
  import { join as join10, basename as basename5 } from "path";
7951
7994
  function stripReminders(text) {
7952
7995
  return text.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, "").trim();
@@ -8077,7 +8120,7 @@ var init_claude = __esm({
8077
8120
  let mtime = 0;
8078
8121
  for (const c of copies) {
8079
8122
  try {
8080
- mtime = Math.max(mtime, statSync8(c.path).mtimeMs);
8123
+ mtime = Math.max(mtime, statSync9(c.path).mtimeMs);
8081
8124
  } catch {
8082
8125
  }
8083
8126
  }
@@ -8144,7 +8187,7 @@ var init_claude = __esm({
8144
8187
  if (!f.endsWith(".jsonl") || f === "sessions-index.json")
8145
8188
  continue;
8146
8189
  try {
8147
- if (statSync8(join10(projPath, f)).mtimeMs >= cutoff)
8190
+ if (statSync9(join10(projPath, f)).mtimeMs >= cutoff)
8148
8191
  ids.add(basename5(f, ".jsonl"));
8149
8192
  } catch {
8150
8193
  }
@@ -8222,7 +8265,7 @@ var init_claude = __esm({
8222
8265
  const fullPath = join10(projPath, f);
8223
8266
  let stat3;
8224
8267
  try {
8225
- stat3 = statSync8(fullPath);
8268
+ stat3 = statSync9(fullPath);
8226
8269
  } catch {
8227
8270
  continue;
8228
8271
  }
@@ -8476,7 +8519,7 @@ var init_claude = __esm({
8476
8519
  const events = this.readEvents(rawId);
8477
8520
  let fileMtime = 0;
8478
8521
  try {
8479
- fileMtime = statSync8(located.path).mtimeMs;
8522
+ fileMtime = statSync9(located.path).mtimeMs;
8480
8523
  } catch {
8481
8524
  }
8482
8525
  return liveScanEditsFromEvents(events, this.fileToolMap, {
@@ -8531,13 +8574,13 @@ var init_claude = __esm({
8531
8574
  continue;
8532
8575
  const fp = join10(projPath, f);
8533
8576
  try {
8534
- const st = statSync8(fp);
8577
+ const st = statSync9(fp);
8535
8578
  let mtime = st.mtimeMs;
8536
8579
  const subDir = join10(projPath, f.slice(0, -6), "subagents");
8537
8580
  if (existsSync9(subDir)) {
8538
8581
  for (const sub of readdirSync7(subDir)) {
8539
8582
  try {
8540
- const subSt = statSync8(join10(subDir, sub));
8583
+ const subSt = statSync9(join10(subDir, sub));
8541
8584
  if (subSt.mtimeMs > mtime)
8542
8585
  mtime = subSt.mtimeMs;
8543
8586
  } catch {
@@ -8602,7 +8645,7 @@ var init_claude = __esm({
8602
8645
  let total = 0;
8603
8646
  for (const located of findSessionFiles(this.toRawId(prefixedId))) {
8604
8647
  try {
8605
- total += statSync8(located.path).size;
8648
+ total += statSync9(located.path).size;
8606
8649
  } catch {
8607
8650
  }
8608
8651
  }
@@ -8631,7 +8674,7 @@ var init_claude = __esm({
8631
8674
  return copies.slice(0, -1).map((c) => {
8632
8675
  let size = -1;
8633
8676
  try {
8634
- size = statSync8(c.path).size;
8677
+ size = statSync9(c.path).size;
8635
8678
  } catch {
8636
8679
  }
8637
8680
  return `${c.path}:${size}`;
@@ -8827,7 +8870,7 @@ var init_model_pricing = __esm({
8827
8870
  });
8828
8871
 
8829
8872
  // ../engine/dist/parsers/session.js
8830
- import { createReadStream as createReadStream2, existsSync as existsSync10, readdirSync as readdirSync8, readFileSync as readFileSync8, statSync as statSync9, openSync as openSync4, readSync as readSync4, closeSync as closeSync4 } from "fs";
8873
+ import { createReadStream as createReadStream2, existsSync as existsSync10, readdirSync as readdirSync8, readFileSync as readFileSync8, statSync as statSync10, openSync as openSync4, readSync as readSync4, closeSync as closeSync4 } from "fs";
8831
8874
  import { createInterface } from "readline";
8832
8875
  import { join as join11, basename as basename6 } from "path";
8833
8876
  function removeCodeBlocks(text) {
@@ -10928,7 +10971,7 @@ var init_opencode = __esm({
10928
10971
  });
10929
10972
 
10930
10973
  // ../engine/dist/core/backends/codex.js
10931
- import { readdirSync as readdirSync9, readFileSync as readFileSync9, statSync as statSync10, openSync as openSync5, readSync as readSync5, closeSync as closeSync5 } from "fs";
10974
+ import { readdirSync as readdirSync9, readFileSync as readFileSync9, statSync as statSync11, openSync as openSync5, readSync as readSync5, closeSync as closeSync5 } from "fs";
10932
10975
  import { basename as basename9, dirname as dirname11, join as join15 } from "path";
10933
10976
  function parseShellWrites(cmd) {
10934
10977
  const out = [];
@@ -11163,7 +11206,7 @@ var init_codex2 = __esm({
11163
11206
  return null;
11164
11207
  let mtime = 0;
11165
11208
  try {
11166
- mtime = statSync10(located.path).mtimeMs;
11209
+ mtime = statSync11(located.path).mtimeMs;
11167
11210
  } catch {
11168
11211
  }
11169
11212
  return {
@@ -11183,7 +11226,7 @@ var init_codex2 = __esm({
11183
11226
  for (const filePath of walkRollouts(root)) {
11184
11227
  let stat3;
11185
11228
  try {
11186
- stat3 = statSync10(filePath);
11229
+ stat3 = statSync11(filePath);
11187
11230
  } catch {
11188
11231
  continue;
11189
11232
  }
@@ -11380,7 +11423,7 @@ var init_codex2 = __esm({
11380
11423
  let mtime = 0;
11381
11424
  try {
11382
11425
  raw = readFileSync9(path, "utf-8");
11383
- mtime = statSync10(path).mtimeMs;
11426
+ mtime = statSync11(path).mtimeMs;
11384
11427
  } catch {
11385
11428
  return [];
11386
11429
  }
@@ -11480,7 +11523,7 @@ var init_codex2 = __esm({
11480
11523
  const events = this.readEvents(this.toRawId(id));
11481
11524
  let fileMtime = 0;
11482
11525
  try {
11483
- fileMtime = statSync10(located.path).mtimeMs;
11526
+ fileMtime = statSync11(located.path).mtimeMs;
11484
11527
  } catch {
11485
11528
  }
11486
11529
  return liveScanEditsFromEvents(events, this.fileToolMap, {
@@ -11544,7 +11587,7 @@ var init_codex2 = __esm({
11544
11587
  const p = join15(dir, entry.name);
11545
11588
  let st;
11546
11589
  try {
11547
- st = statSync10(p);
11590
+ st = statSync11(p);
11548
11591
  } catch {
11549
11592
  continue;
11550
11593
  }
@@ -11611,7 +11654,7 @@ var init_codex2 = __esm({
11611
11654
  let mtime = 0;
11612
11655
  const push = (path, name) => {
11613
11656
  try {
11614
- const st = statSync10(path);
11657
+ const st = statSync11(path);
11615
11658
  files.push({ name, bytes: readFileSync9(path) });
11616
11659
  if (st.mtimeMs > mtime)
11617
11660
  mtime = st.mtimeMs;
@@ -11653,7 +11696,7 @@ var init_codex2 = __esm({
11653
11696
  if (!loc)
11654
11697
  return 0;
11655
11698
  try {
11656
- return statSync10(loc.path).size;
11699
+ return statSync11(loc.path).size;
11657
11700
  } catch {
11658
11701
  return 0;
11659
11702
  }
@@ -11670,7 +11713,7 @@ var init_codex2 = __esm({
11670
11713
  });
11671
11714
 
11672
11715
  // ../engine/dist/core/backends/agy.js
11673
- import { existsSync as existsSync12, readdirSync as readdirSync10, readFileSync as readFileSync10, statSync as statSync11 } from "fs";
11716
+ import { existsSync as existsSync12, readdirSync as readdirSync10, readFileSync as readFileSync10, statSync as statSync12 } from "fs";
11674
11717
  import { basename as basename10, dirname as dirname12, join as join16 } from "path";
11675
11718
  function agyTranscriptPath(logsDir) {
11676
11719
  const full = join16(logsDir, "transcript_full.jsonl");
@@ -11867,7 +11910,7 @@ var init_agy = __esm({
11867
11910
  return null;
11868
11911
  let mtime = 0;
11869
11912
  try {
11870
- mtime = statSync11(path).mtimeMs;
11913
+ mtime = statSync12(path).mtimeMs;
11871
11914
  } catch {
11872
11915
  }
11873
11916
  const projectPath = resolveAgyProject(dirname12(path), this.homeDir());
@@ -11895,7 +11938,7 @@ var init_agy = __esm({
11895
11938
  for (const rawId of sessionDirs) {
11896
11939
  const sessionPath = join16(brainDir, rawId);
11897
11940
  try {
11898
- if (!statSync11(sessionPath).isDirectory())
11941
+ if (!statSync12(sessionPath).isDirectory())
11899
11942
  continue;
11900
11943
  } catch {
11901
11944
  continue;
@@ -11905,7 +11948,7 @@ var init_agy = __esm({
11905
11948
  continue;
11906
11949
  let stat3;
11907
11950
  try {
11908
- stat3 = statSync11(filePath);
11951
+ stat3 = statSync12(filePath);
11909
11952
  } catch {
11910
11953
  continue;
11911
11954
  }
@@ -12171,7 +12214,7 @@ var init_agy = __esm({
12171
12214
  for (const rawId of sessionDirs) {
12172
12215
  const sessionPath = join16(brainDir, rawId);
12173
12216
  try {
12174
- if (!statSync11(sessionPath).isDirectory())
12217
+ if (!statSync12(sessionPath).isDirectory())
12175
12218
  continue;
12176
12219
  } catch {
12177
12220
  continue;
@@ -12180,7 +12223,7 @@ var init_agy = __esm({
12180
12223
  if (!filePath)
12181
12224
  continue;
12182
12225
  try {
12183
- const st = statSync11(filePath);
12226
+ const st = statSync12(filePath);
12184
12227
  if (st.mtimeMs < opts.sinceMs)
12185
12228
  continue;
12186
12229
  candidates2.push({ rawId, mtime: st.mtimeMs });
@@ -12208,7 +12251,7 @@ var init_agy = __esm({
12208
12251
  try {
12209
12252
  return {
12210
12253
  tool: "agy",
12211
- mtime: statSync11(loc.path).mtimeMs,
12254
+ mtime: statSync12(loc.path).mtimeMs,
12212
12255
  files: [{ name: basename10(loc.path), bytes: readFileSync10(loc.path) }]
12213
12256
  };
12214
12257
  } catch {
@@ -12223,7 +12266,7 @@ var init_agy = __esm({
12223
12266
  if (!loc)
12224
12267
  return 0;
12225
12268
  try {
12226
- return statSync11(loc.path).size;
12269
+ return statSync12(loc.path).size;
12227
12270
  } catch {
12228
12271
  return 0;
12229
12272
  }
@@ -12240,7 +12283,7 @@ var init_agy = __esm({
12240
12283
  });
12241
12284
 
12242
12285
  // ../engine/dist/core/backends/cursor-store.js
12243
- import { existsSync as existsSync13, readdirSync as readdirSync11, readFileSync as readFileSync11, statSync as statSync12 } from "fs";
12286
+ import { existsSync as existsSync13, readdirSync as readdirSync11, readFileSync as readFileSync11, statSync as statSync13 } from "fs";
12244
12287
  import { join as join17 } from "path";
12245
12288
  function cursorProjectSlug(absPath) {
12246
12289
  return absPath.replace(/[^a-zA-Z0-9]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
@@ -12257,7 +12300,7 @@ function listChatsIn(chatsRoot) {
12257
12300
  const hashPath3 = join17(chatsRoot, workspaceHash);
12258
12301
  let chatIds;
12259
12302
  try {
12260
- if (!statSync12(hashPath3).isDirectory())
12303
+ if (!statSync13(hashPath3).isDirectory())
12261
12304
  continue;
12262
12305
  chatIds = readdirSync11(hashPath3);
12263
12306
  } catch {
@@ -12279,7 +12322,7 @@ function listChatsIn(chatsRoot) {
12279
12322
  let created = meta.createdAtMs ?? 0;
12280
12323
  if (!mtime || !created) {
12281
12324
  try {
12282
- const st = statSync12(dbPath);
12325
+ const st = statSync13(dbPath);
12283
12326
  mtime = mtime || st.mtimeMs;
12284
12327
  created = created || st.birthtimeMs || st.mtimeMs;
12285
12328
  } catch {
@@ -12322,7 +12365,7 @@ function findChat(chatsRoots, chatId) {
12322
12365
  let created = meta.createdAtMs ?? 0;
12323
12366
  if (!mtime || !created) {
12324
12367
  try {
12325
- const st = statSync12(dbPath);
12368
+ const st = statSync13(dbPath);
12326
12369
  mtime = mtime || st.mtimeMs;
12327
12370
  created = created || st.birthtimeMs || st.mtimeMs;
12328
12371
  } catch {
@@ -12625,7 +12668,7 @@ var init_cursor_store = __esm({
12625
12668
  });
12626
12669
 
12627
12670
  // ../engine/dist/core/backends/cursor-ide.js
12628
- import { existsSync as existsSync14, readFileSync as readFileSync12, readdirSync as readdirSync12, statSync as statSync13 } from "fs";
12671
+ import { existsSync as existsSync14, readFileSync as readFileSync12, readdirSync as readdirSync12, statSync as statSync14 } from "fs";
12629
12672
  import { dirname as dirname13, join as join18 } from "path";
12630
12673
  function jsonOf(value) {
12631
12674
  if (value == null)
@@ -12695,7 +12738,7 @@ function workspaceIndex(workspaceRoots) {
12695
12738
  for (const id of entries) {
12696
12739
  const dir = join18(root, id);
12697
12740
  try {
12698
- if (!statSync13(dir).isDirectory())
12741
+ if (!statSync14(dir).isDirectory())
12699
12742
  continue;
12700
12743
  } catch {
12701
12744
  continue;
@@ -13041,7 +13084,7 @@ var init_cursor_ide = __esm({
13041
13084
  });
13042
13085
 
13043
13086
  // ../engine/dist/core/backends/cursor.js
13044
- import { existsSync as existsSync15, readFileSync as readFileSync13, statSync as statSync14 } from "fs";
13087
+ import { existsSync as existsSync15, readFileSync as readFileSync13, statSync as statSync15 } from "fs";
13045
13088
  import { join as join19 } from "path";
13046
13089
  var PREFIX4, CursorBackend, cursorBackend;
13047
13090
  var init_cursor = __esm({
@@ -13094,7 +13137,7 @@ var init_cursor = __esm({
13094
13137
  if (r.surface === "cli") {
13095
13138
  let mtime2 = r.chat.updatedAtMs;
13096
13139
  try {
13097
- mtime2 = statSync14(r.chat.dbPath).mtimeMs || mtime2;
13140
+ mtime2 = statSync15(r.chat.dbPath).mtimeMs || mtime2;
13098
13141
  } catch {
13099
13142
  }
13100
13143
  return {
@@ -13107,7 +13150,7 @@ var init_cursor = __esm({
13107
13150
  }
13108
13151
  let mtime = r.composer.updatedAtMs;
13109
13152
  try {
13110
- mtime = statSync14(r.composer.globalDbPath).mtimeMs || mtime;
13153
+ mtime = statSync15(r.composer.globalDbPath).mtimeMs || mtime;
13111
13154
  } catch {
13112
13155
  }
13113
13156
  return {
@@ -13353,7 +13396,7 @@ var init_cursor = __esm({
13353
13396
  if (existsSync15(metaPath)) {
13354
13397
  files.push({ name: "meta.json", bytes: readFileSync13(metaPath) });
13355
13398
  }
13356
- return { tool: "cursor", mtime: statSync14(r.chat.dbPath).mtimeMs, files };
13399
+ return { tool: "cursor", mtime: statSync15(r.chat.dbPath).mtimeMs, files };
13357
13400
  }
13358
13401
  const events = readComposerEvents(r.composer);
13359
13402
  if (events.length === 0)
@@ -13361,7 +13404,7 @@ var init_cursor = __esm({
13361
13404
  const body2 = events.map((e) => JSON.stringify(e)).join("\n") + "\n";
13362
13405
  return {
13363
13406
  tool: "cursor",
13364
- mtime: statSync14(r.composer.globalDbPath).mtimeMs,
13407
+ mtime: statSync15(r.composer.globalDbPath).mtimeMs,
13365
13408
  files: [{ name: `${r.composer.composerId}.jsonl`, bytes: Buffer.from(body2, "utf8") }]
13366
13409
  };
13367
13410
  } catch {
@@ -13903,7 +13946,7 @@ var init_backends = __esm({
13903
13946
  // ../engine/dist/transcript/shadow.js
13904
13947
  import { gzipSync as gzipSync2, gunzipSync as gunzipSync2 } from "zlib";
13905
13948
  import { createHash as createHash6 } from "crypto";
13906
- import { existsSync as existsSync17, mkdirSync as mkdirSync4, readFileSync as readFileSync14, writeFileSync as writeFileSync4, renameSync as renameSync2, statSync as statSync15, openSync as openSync6, readSync as readSync6, closeSync as closeSync6 } from "fs";
13949
+ import { existsSync as existsSync17, mkdirSync as mkdirSync4, readFileSync as readFileSync14, writeFileSync as writeFileSync4, renameSync as renameSync2, statSync as statSync16, openSync as openSync6, readSync as readSync6, closeSync as closeSync6 } from "fs";
13907
13950
  import { dirname as dirname14, join as join20 } from "path";
13908
13951
  function shadowRoot() {
13909
13952
  return join20(getDataDir(), "shadow");
@@ -14112,7 +14155,7 @@ function liveFingerprint(backend, rawId) {
14112
14155
  const loc = backend.findSession(rawId);
14113
14156
  if (!loc?.path)
14114
14157
  return "";
14115
- const st = statSync15(loc.path);
14158
+ const st = statSync16(loc.path);
14116
14159
  return `${st.mtimeMs}:${st.size}`;
14117
14160
  } catch {
14118
14161
  return "";
@@ -14132,7 +14175,7 @@ function shadowUncompressedBytes(tool, rawId) {
14132
14175
  const path = shadowFileFor(tool, rawId);
14133
14176
  let fd = null;
14134
14177
  try {
14135
- const size = statSync15(path).size;
14178
+ const size = statSync16(path).size;
14136
14179
  if (size < 18)
14137
14180
  return 0;
14138
14181
  fd = openSync6(path, "r");
@@ -14153,7 +14196,7 @@ function shadowUncompressedBytes(tool, rawId) {
14153
14196
  }
14154
14197
  function shadowSizeOnDisk(tool, rawId) {
14155
14198
  try {
14156
- return statSync15(shadowFileFor(tool, rawId)).size;
14199
+ return statSync16(shadowFileFor(tool, rawId)).size;
14157
14200
  } catch {
14158
14201
  return 0;
14159
14202
  }
@@ -14195,7 +14238,7 @@ __export(live_session_scan_exports, {
14195
14238
  withSessionReadCache: () => withSessionReadCache,
14196
14239
  withSessionScanScope: () => withSessionScanScope
14197
14240
  });
14198
- import { existsSync as existsSync18, readdirSync as readdirSync13, readFileSync as readFileSync15, statSync as statSync16, openSync as openSync7, readSync as readSync7, closeSync as closeSync7 } from "fs";
14241
+ import { existsSync as existsSync18, readdirSync as readdirSync13, readFileSync as readFileSync15, statSync as statSync17, openSync as openSync7, readSync as readSync7, closeSync as closeSync7 } from "fs";
14199
14242
  import { join as join21, basename as basename11 } from "path";
14200
14243
  import { createHash as createHash7 } from "crypto";
14201
14244
  function lazyGeminiProjectsJson() {
@@ -14348,7 +14391,7 @@ function readSessionGroupText(group) {
14348
14391
  const parts = [];
14349
14392
  for (const p of group.paths) {
14350
14393
  try {
14351
- const st = statSync16(p);
14394
+ const st = statSync17(p);
14352
14395
  parts.push(`${p}:${st.mtimeMs}:${st.size}`);
14353
14396
  } catch {
14354
14397
  parts.push(`${p}:missing`);
@@ -14368,7 +14411,7 @@ function readSessionGroupText(group) {
14368
14411
  continue;
14369
14412
  }
14370
14413
  try {
14371
- mtime = Math.max(mtime, statSync16(p).mtimeMs);
14414
+ mtime = Math.max(mtime, statSync17(p).mtimeMs);
14372
14415
  } catch {
14373
14416
  }
14374
14417
  text = text ? mergeLineText(text, raw).text : raw;
@@ -14683,7 +14726,7 @@ var init_live_session_scan = __esm({
14683
14726
  INDEX_RECHECK_MS = 1e3;
14684
14727
  dirMtime = (p) => {
14685
14728
  try {
14686
- return statSync16(p).mtimeMs;
14729
+ return statSync17(p).mtimeMs;
14687
14730
  } catch {
14688
14731
  return -1;
14689
14732
  }
@@ -14904,7 +14947,7 @@ var init_session_outcome = __esm({
14904
14947
  });
14905
14948
 
14906
14949
  // ../engine/dist/core/backends/pi.js
14907
- import { readdirSync as readdirSync14, readFileSync as readFileSync16, statSync as statSync17, openSync as openSync8, readSync as readSync8, closeSync as closeSync8 } from "fs";
14950
+ import { readdirSync as readdirSync14, readFileSync as readFileSync16, statSync as statSync18, openSync as openSync8, readSync as readSync8, closeSync as closeSync8 } from "fs";
14908
14951
  import { createHash as createHash8 } from "crypto";
14909
14952
  import { basename as basename12, join as join22 } from "path";
14910
14953
  function parsePiFile(path) {
@@ -14990,7 +15033,7 @@ function readPiHeader(path) {
14990
15033
  function dirSignature(root) {
14991
15034
  const parts = [];
14992
15035
  try {
14993
- parts.push(String(statSync17(root).mtimeMs));
15036
+ parts.push(String(statSync18(root).mtimeMs));
14994
15037
  } catch {
14995
15038
  return "missing";
14996
15039
  }
@@ -15004,7 +15047,7 @@ function dirSignature(root) {
15004
15047
  if (!entry.isDirectory())
15005
15048
  continue;
15006
15049
  try {
15007
- parts.push(`${entry.name}:${statSync17(join22(root, entry.name)).mtimeMs}`);
15050
+ parts.push(`${entry.name}:${statSync18(join22(root, entry.name)).mtimeMs}`);
15008
15051
  } catch {
15009
15052
  }
15010
15053
  }
@@ -15029,7 +15072,7 @@ function projectSuffix(projectDir) {
15029
15072
  }
15030
15073
  function mtimeOf(path, fallback) {
15031
15074
  try {
15032
- return statSync17(path).mtimeMs;
15075
+ return statSync18(path).mtimeMs;
15033
15076
  } catch {
15034
15077
  return fallback;
15035
15078
  }
@@ -15123,7 +15166,7 @@ var init_pi = __esm({
15123
15166
  for (const path of walkSessionFiles(root)) {
15124
15167
  let mtime = 0;
15125
15168
  try {
15126
- mtime = statSync17(path).mtimeMs;
15169
+ mtime = statSync18(path).mtimeMs;
15127
15170
  } catch {
15128
15171
  continue;
15129
15172
  }
@@ -15179,7 +15222,7 @@ var init_pi = __esm({
15179
15222
  return null;
15180
15223
  let mtime = 0;
15181
15224
  try {
15182
- mtime = statSync17(path).mtimeMs;
15225
+ mtime = statSync18(path).mtimeMs;
15183
15226
  } catch {
15184
15227
  }
15185
15228
  return {
@@ -15197,7 +15240,7 @@ var init_pi = __esm({
15197
15240
  for (const [rawId, path] of this.fileIndex()) {
15198
15241
  let stat3;
15199
15242
  try {
15200
- stat3 = statSync17(path);
15243
+ stat3 = statSync18(path);
15201
15244
  } catch {
15202
15245
  continue;
15203
15246
  }
@@ -15448,7 +15491,7 @@ var init_pi = __esm({
15448
15491
  for (const [rawId, path] of this.fileIndex()) {
15449
15492
  let stat3;
15450
15493
  try {
15451
- stat3 = statSync17(path);
15494
+ stat3 = statSync18(path);
15452
15495
  } catch {
15453
15496
  continue;
15454
15497
  }
@@ -15496,7 +15539,7 @@ var init_pi = __esm({
15496
15539
  if (!located)
15497
15540
  return null;
15498
15541
  try {
15499
- const st = statSync17(located.path);
15542
+ const st = statSync18(located.path);
15500
15543
  return {
15501
15544
  tool: "pi",
15502
15545
  mtime: st.mtimeMs,
@@ -15514,7 +15557,7 @@ var init_pi = __esm({
15514
15557
  if (!located)
15515
15558
  return 0;
15516
15559
  try {
15517
- return statSync17(located.path).size;
15560
+ return statSync18(located.path).size;
15518
15561
  } catch {
15519
15562
  return 0;
15520
15563
  }
@@ -15541,7 +15584,7 @@ __export(home_discovery_exports, {
15541
15584
  sessionIdsInHome: () => sessionIdsInHome
15542
15585
  });
15543
15586
  import { execFileSync as execFileSync2 } from "child_process";
15544
- import { existsSync as existsSync19, readdirSync as readdirSync15, readFileSync as readFileSync17, realpathSync as realpathSync4, statSync as statSync18 } from "fs";
15587
+ import { existsSync as existsSync19, readdirSync as readdirSync15, readFileSync as readFileSync17, realpathSync as realpathSync4, statSync as statSync19 } from "fs";
15545
15588
  import { homedir as homedir6, platform as osPlatform } from "os";
15546
15589
  import { basename as basename13, join as join23 } from "path";
15547
15590
  function candidateRoots(plat = osPlatform(), env = process.env) {
@@ -15752,7 +15795,7 @@ function sessionIdsInHome(dir, tool) {
15752
15795
  continue;
15753
15796
  let mtime = 0;
15754
15797
  try {
15755
- mtime = statSync18(full).mtimeMs;
15798
+ mtime = statSync19(full).mtimeMs;
15756
15799
  } catch {
15757
15800
  continue;
15758
15801
  }
@@ -15908,7 +15951,7 @@ function discoverHomes(opts = {}) {
15908
15951
  return;
15909
15952
  }
15910
15953
  try {
15911
- if (!statSync18(real).isDirectory())
15954
+ if (!statSync19(real).isDirectory())
15912
15955
  return;
15913
15956
  } catch {
15914
15957
  return;
@@ -16010,7 +16053,7 @@ __export(detector_install_exports, {
16010
16053
  });
16011
16054
  import { spawnSync as spawnSync2 } from "child_process";
16012
16055
  import { createHash as createHash9 } from "crypto";
16013
- import { existsSync as existsSync20, mkdirSync as mkdirSync5, mkdtempSync, chmodSync as chmodSync3, renameSync as renameSync3, rmSync as rmSync2, writeFileSync as writeFileSync5, readFileSync as readFileSync18, statSync as statSync19, copyFileSync as copyFileSync2 } from "fs";
16056
+ import { existsSync as existsSync20, mkdirSync as mkdirSync5, mkdtempSync, chmodSync as chmodSync3, renameSync as renameSync3, rmSync as rmSync2, writeFileSync as writeFileSync5, readFileSync as readFileSync18, statSync as statSync20, copyFileSync as copyFileSync2 } from "fs";
16014
16057
  import { join as join24 } from "path";
16015
16058
  function managedDetectorPath(name) {
16016
16059
  return join24(getDetectorBinDir(), name + exeSuffix());
@@ -16031,7 +16074,7 @@ function readReceipt(name) {
16031
16074
  function verifiedSha(path) {
16032
16075
  let st;
16033
16076
  try {
16034
- st = statSync19(path);
16077
+ st = statSync20(path);
16035
16078
  } catch {
16036
16079
  return null;
16037
16080
  }
@@ -16812,7 +16855,7 @@ __export(sync_ledger_exports, {
16812
16855
  syncMode: () => syncMode,
16813
16856
  unackedCursorAttemptCount: () => unackedCursorAttemptCount
16814
16857
  });
16815
- import { readFileSync as readFileSync21, writeFileSync as writeFileSync6, renameSync as renameSync4, mkdirSync as mkdirSync6, statSync as statSync20 } from "node:fs";
16858
+ import { readFileSync as readFileSync21, writeFileSync as writeFileSync6, renameSync as renameSync4, mkdirSync as mkdirSync6, statSync as statSync21 } from "node:fs";
16816
16859
  import { join as join26, dirname as dirname15 } from "node:path";
16817
16860
  function toRow(entry) {
16818
16861
  if (entry === void 0) return void 0;
@@ -16823,7 +16866,7 @@ function ledgerFilePath() {
16823
16866
  }
16824
16867
  function stampOf(path) {
16825
16868
  try {
16826
- const st = statSync20(path);
16869
+ const st = statSync21(path);
16827
16870
  return `${st.mtimeMs}:${st.size}`;
16828
16871
  } catch {
16829
16872
  return null;
@@ -17462,7 +17505,7 @@ __export(transcript_exports, {
17462
17505
  writeShadowContainer: () => writeShadowContainer,
17463
17506
  writeTranscriptEnvelope: () => writeTranscriptEnvelope
17464
17507
  });
17465
- import { statSync as statSync21 } from "fs";
17508
+ import { statSync as statSync22 } from "fs";
17466
17509
  async function parseTranscript(sessionId, opts = {}) {
17467
17510
  const t = await parseTranscriptUncut(sessionId, opts);
17468
17511
  const cap = opts.payloadCap;
@@ -17540,7 +17583,7 @@ async function parseTranscriptUncut(sessionId, opts) {
17540
17583
  }
17541
17584
  function safeMtime(path) {
17542
17585
  try {
17543
- return statSync21(path).mtimeMs;
17586
+ return statSync22(path).mtimeMs;
17544
17587
  } catch {
17545
17588
  return 0;
17546
17589
  }
@@ -18022,11 +18065,11 @@ var init_entity_extractor = __esm({
18022
18065
  });
18023
18066
 
18024
18067
  // ../engine/dist/core/source-policy.js
18025
- import { statSync as statSync22 } from "fs";
18068
+ import { statSync as statSync23 } from "fs";
18026
18069
  function settings() {
18027
18070
  let mtimeMs = -1;
18028
18071
  try {
18029
- mtimeMs = statSync22(settingsFilePath()).mtimeMs;
18072
+ mtimeMs = statSync23(settingsFilePath()).mtimeMs;
18030
18073
  } catch {
18031
18074
  }
18032
18075
  if (cache3 && cache3.mtimeMs === mtimeMs)
@@ -18296,7 +18339,7 @@ var init_utils = __esm({
18296
18339
  });
18297
18340
 
18298
18341
  // ../engine/dist/parsers/plan-source.js
18299
- import { existsSync as existsSync23, readdirSync as readdirSync17, readFileSync as readFileSync22, statSync as statSync23 } from "fs";
18342
+ import { existsSync as existsSync23, readdirSync as readdirSync17, readFileSync as readFileSync22, statSync as statSync24 } from "fs";
18300
18343
  import { homedir as homedir8 } from "os";
18301
18344
  import { join as join28, basename as basename14 } from "path";
18302
18345
  function parseFrontmatter(content) {
@@ -18395,7 +18438,7 @@ var init_plan_source = __esm({
18395
18438
  seenClaude.add(file);
18396
18439
  const filePath = join28(plansDir, file);
18397
18440
  try {
18398
- const stat3 = statSync23(filePath);
18441
+ const stat3 = statSync24(filePath);
18399
18442
  const planName = basename14(file, ".md");
18400
18443
  const isAgentPlan = planName.includes("-agent-");
18401
18444
  const content = readFileSync22(filePath, "utf-8");
@@ -18439,7 +18482,7 @@ var init_plan_source = __esm({
18439
18482
  for (const file of files) {
18440
18483
  const filePath = join28(plansDir, file);
18441
18484
  try {
18442
- const stat3 = statSync23(filePath);
18485
+ const stat3 = statSync24(filePath);
18443
18486
  const content = readFileSync22(filePath, "utf-8");
18444
18487
  const firstLine = content.split("\n").find((l) => l.trim())?.replace(/^#+\s*/, "").trim() || file;
18445
18488
  const planName = `${opencodeBackend.idPrefix}plan_${basename14(file, ".md")}`;
@@ -18642,7 +18685,7 @@ var init_plan_source = __esm({
18642
18685
  for (const rawId of sessionDirs) {
18643
18686
  const sessionPath = join28(brainDir, rawId);
18644
18687
  try {
18645
- if (!statSync23(sessionPath).isDirectory())
18688
+ if (!statSync24(sessionPath).isDirectory())
18646
18689
  continue;
18647
18690
  } catch {
18648
18691
  continue;
@@ -18656,7 +18699,7 @@ var init_plan_source = __esm({
18656
18699
  for (const file of files) {
18657
18700
  const filePath = join28(sessionPath, file);
18658
18701
  try {
18659
- const stat3 = statSync23(filePath);
18702
+ const stat3 = statSync24(filePath);
18660
18703
  const content = readFileSync22(filePath, "utf-8");
18661
18704
  const firstLine = content.split("\n").find((l) => l.trim())?.replace(/^#+\s*/, "").trim() || file;
18662
18705
  const sessionLoc = agyBackend.findSession(rawId);
@@ -18686,7 +18729,7 @@ var init_plan_source = __esm({
18686
18729
  });
18687
18730
 
18688
18731
  // ../engine/dist/parsers/task-source.js
18689
- import { existsSync as existsSync24, readdirSync as readdirSync18, readFileSync as readFileSync23, statSync as statSync24 } from "fs";
18732
+ import { existsSync as existsSync24, readdirSync as readdirSync18, readFileSync as readFileSync23, statSync as statSync25 } from "fs";
18690
18733
  import { join as join29 } from "path";
18691
18734
  var MAX_CHUNK_CHARS2, TaskSource;
18692
18735
  var init_task_source = __esm({
@@ -18728,7 +18771,7 @@ var init_task_source = __esm({
18728
18771
  const filePath = join29(todosDir, file);
18729
18772
  let stat3;
18730
18773
  try {
18731
- stat3 = statSync24(filePath);
18774
+ stat3 = statSync25(filePath);
18732
18775
  } catch {
18733
18776
  continue;
18734
18777
  }
@@ -18776,7 +18819,7 @@ var init_task_source = __esm({
18776
18819
  const sessionUuid = entry.name;
18777
18820
  const taskDir = join29(tasksDir, sessionUuid);
18778
18821
  try {
18779
- const stat3 = statSync24(taskDir);
18822
+ const stat3 = statSync25(taskDir);
18780
18823
  const taskFiles = readdirSync18(taskDir).filter((f) => f.endsWith(".json"));
18781
18824
  if (taskFiles.length === 0)
18782
18825
  continue;
@@ -18922,7 +18965,7 @@ ${task.description}`.slice(0, MAX_CHUNK_CHARS2);
18922
18965
  });
18923
18966
 
18924
18967
  // ../engine/dist/parsers/claude-md-source.js
18925
- import { existsSync as existsSync25, readFileSync as readFileSync24, readdirSync as readdirSync19, statSync as statSync25 } from "fs";
18968
+ import { existsSync as existsSync25, readFileSync as readFileSync24, readdirSync as readdirSync19, statSync as statSync26 } from "fs";
18926
18969
  import { homedir as homedir9 } from "os";
18927
18970
  import { join as join30, basename as basename15, dirname as dirname16 } from "path";
18928
18971
  import { createHash as createHash10 } from "crypto";
@@ -19119,7 +19162,7 @@ var init_claude_md_source = __esm({
19119
19162
  }
19120
19163
  fileToItem(filePath, filename, tool) {
19121
19164
  try {
19122
- const stat3 = statSync25(filePath);
19165
+ const stat3 = statSync26(filePath);
19123
19166
  const projectDir = dirname16(filePath);
19124
19167
  const projectName = basename15(projectDir);
19125
19168
  const projectPath = projectDir;
@@ -19148,7 +19191,7 @@ var init_claude_md_source = __esm({
19148
19191
  });
19149
19192
 
19150
19193
  // ../engine/dist/parsers/agent-memory-source.js
19151
- import { existsSync as existsSync26, readFileSync as readFileSync25, readdirSync as readdirSync20, statSync as statSync26 } from "fs";
19194
+ import { existsSync as existsSync26, readFileSync as readFileSync25, readdirSync as readdirSync20, statSync as statSync27 } from "fs";
19152
19195
  import { homedir as homedir10 } from "os";
19153
19196
  import { join as join31, basename as basename16 } from "path";
19154
19197
  function parseFrontmatter2(content) {
@@ -19301,7 +19344,7 @@ var init_agent_memory_source = __esm({
19301
19344
  }
19302
19345
  fileToItem(filePath, filename, projectPath, _projectHash) {
19303
19346
  try {
19304
- const stat3 = statSync26(filePath);
19347
+ const stat3 = statSync27(filePath);
19305
19348
  const content = readFileSync25(filePath, "utf-8");
19306
19349
  const { fm } = parseFrontmatter2(content);
19307
19350
  const stem = filename.replace(/\.md$/, "");
@@ -19333,7 +19376,7 @@ var init_agent_memory_source = __esm({
19333
19376
  });
19334
19377
 
19335
19378
  // ../engine/dist/parsers/history-source.js
19336
- import { existsSync as existsSync27, readdirSync as readdirSync21, statSync as statSync27 } from "fs";
19379
+ import { existsSync as existsSync27, readdirSync as readdirSync21, statSync as statSync28 } from "fs";
19337
19380
  import { createReadStream as createReadStream3 } from "fs";
19338
19381
  import { createInterface as createInterface2 } from "readline";
19339
19382
  import { homedir as homedir11 } from "os";
@@ -19376,7 +19419,7 @@ var init_history_source = __esm({
19376
19419
  const historyPath = this.historyPaths.find((p) => existsSync27(p));
19377
19420
  if (!historyPath)
19378
19421
  return;
19379
- const stat3 = statSync27(historyPath);
19422
+ const stat3 = statSync28(historyPath);
19380
19423
  const groups = await this.groupByProject();
19381
19424
  for (const [project, group] of groups) {
19382
19425
  const projectId = project.replace(/\//g, "-").replace(/^-/, "");
@@ -19517,7 +19560,7 @@ var init_history_source = __esm({
19517
19560
  });
19518
19561
 
19519
19562
  // ../engine/dist/parsers/paste-source.js
19520
- import { existsSync as existsSync28, readdirSync as readdirSync22, readFileSync as readFileSync26, statSync as statSync28 } from "fs";
19563
+ import { existsSync as existsSync28, readdirSync as readdirSync22, readFileSync as readFileSync26, statSync as statSync29 } from "fs";
19521
19564
  import { homedir as homedir12 } from "os";
19522
19565
  import { join as join33, basename as basename17 } from "path";
19523
19566
  var MAX_CHUNK_CHARS6, MAX_FILE_SIZE, PasteSource;
@@ -19567,7 +19610,7 @@ var init_paste_source = __esm({
19567
19610
  seen.add(file);
19568
19611
  const filePath = join33(cacheDir, file);
19569
19612
  try {
19570
- const stat3 = statSync28(filePath);
19613
+ const stat3 = statSync29(filePath);
19571
19614
  if (stat3.size > MAX_FILE_SIZE)
19572
19615
  continue;
19573
19616
  if (stat3.size < 10)
@@ -19617,7 +19660,7 @@ var init_paste_source = __esm({
19617
19660
  });
19618
19661
 
19619
19662
  // ../engine/dist/parsers/antigravity-brain-source.js
19620
- import { existsSync as existsSync29, readdirSync as readdirSync23, readFileSync as readFileSync27, statSync as statSync29 } from "fs";
19663
+ import { existsSync as existsSync29, readdirSync as readdirSync23, readFileSync as readFileSync27, statSync as statSync30 } from "fs";
19621
19664
  import { join as join34 } from "path";
19622
19665
  var MAX_CHUNK_CHARS7, AntigravityBrainSource;
19623
19666
  var init_antigravity_brain_source = __esm({
@@ -19649,7 +19692,7 @@ var init_antigravity_brain_source = __esm({
19649
19692
  for (const file of files) {
19650
19693
  const filePath = join34(sessionDir, file);
19651
19694
  try {
19652
- const stat3 = statSync29(filePath);
19695
+ const stat3 = statSync30(filePath);
19653
19696
  const content = readFileSync27(filePath, "utf-8");
19654
19697
  const firstLine = content.split("\n").find((l) => l.trim() && !l.startsWith("#"))?.trim() || "";
19655
19698
  const heading = content.split("\n").find((l) => l.startsWith("#"))?.replace(/^#+\s*/, "").trim() || file;
@@ -20031,7 +20074,7 @@ var init_opencode_todo_source = __esm({
20031
20074
  });
20032
20075
 
20033
20076
  // ../engine/dist/parsers/codex-session-source.js
20034
- import { existsSync as existsSync32, readdirSync as readdirSync24, readFileSync as readFileSync28, statSync as statSync30 } from "fs";
20077
+ import { existsSync as existsSync32, readdirSync as readdirSync24, readFileSync as readFileSync28, statSync as statSync31 } from "fs";
20035
20078
  import { join as join35, basename as basename18 } from "path";
20036
20079
  function getCodexSessionsDir() {
20037
20080
  return codexBackend.sessionsDir();
@@ -20093,7 +20136,7 @@ var init_codex_session_source = __esm({
20093
20136
  const jsonlFiles = this.collectJsonlFiles(this.sessionsDir);
20094
20137
  for (const filePath of jsonlFiles) {
20095
20138
  try {
20096
- const stat3 = statSync30(filePath);
20139
+ const stat3 = statSync31(filePath);
20097
20140
  const lines = readFileSync28(filePath, "utf-8").split("\n");
20098
20141
  const firstLine = lines.find((l) => l.trim());
20099
20142
  if (!firstLine)
@@ -20267,7 +20310,7 @@ var init_codex_session_source = __esm({
20267
20310
  });
20268
20311
 
20269
20312
  // ../engine/dist/parsers/diary-source.js
20270
- import { existsSync as existsSync33, mkdirSync as mkdirSync7, readdirSync as readdirSync25, readFileSync as readFileSync29, writeFileSync as writeFileSync7, statSync as statSync31 } from "fs";
20313
+ import { existsSync as existsSync33, mkdirSync as mkdirSync7, readdirSync as readdirSync25, readFileSync as readFileSync29, writeFileSync as writeFileSync7, statSync as statSync32 } from "fs";
20271
20314
  import { join as join36, basename as basename19 } from "path";
20272
20315
  var MAX_CHUNK_CHARS10, DiarySource;
20273
20316
  var init_diary_source = __esm({
@@ -20292,7 +20335,7 @@ var init_diary_source = __esm({
20292
20335
  for (const file of files) {
20293
20336
  const filePath = join36(agentPath2, file);
20294
20337
  try {
20295
- const stat3 = statSync31(filePath);
20338
+ const stat3 = statSync32(filePath);
20296
20339
  const raw = readFileSync29(filePath, "utf-8");
20297
20340
  const entry = JSON.parse(raw);
20298
20341
  const entryId = basename19(file, ".json");
@@ -20428,7 +20471,7 @@ var init_redact_inline = __esm({
20428
20471
  });
20429
20472
 
20430
20473
  // ../engine/dist/parsers/skills-source.js
20431
- import { existsSync as existsSync34, readdirSync as readdirSync26, readFileSync as readFileSync30, statSync as statSync32 } from "fs";
20474
+ import { existsSync as existsSync34, readdirSync as readdirSync26, readFileSync as readFileSync30, statSync as statSync33 } from "fs";
20432
20475
  import { homedir as homedir13 } from "os";
20433
20476
  import { join as join37 } from "path";
20434
20477
  function rebuildBody(content) {
@@ -20536,7 +20579,7 @@ var init_skills_source = __esm({
20536
20579
  const skillDir = join37(root.path, name);
20537
20580
  let st;
20538
20581
  try {
20539
- st = statSync32(skillDir);
20582
+ st = statSync33(skillDir);
20540
20583
  } catch {
20541
20584
  continue;
20542
20585
  }
@@ -20558,7 +20601,7 @@ var init_skills_source = __esm({
20558
20601
  const skillName = fm.name || name;
20559
20602
  let mtime = st.mtimeMs;
20560
20603
  try {
20561
- mtime = statSync32(skillMd).mtimeMs;
20604
+ mtime = statSync33(skillMd).mtimeMs;
20562
20605
  } catch {
20563
20606
  }
20564
20607
  const subdirs = {};
@@ -20566,7 +20609,7 @@ var init_skills_source = __esm({
20566
20609
  for (const sub of readdirSync26(skillDir)) {
20567
20610
  const subPath = join37(skillDir, sub);
20568
20611
  try {
20569
- const ss = statSync32(subPath);
20612
+ const ss = statSync33(subPath);
20570
20613
  if (ss.isDirectory()) {
20571
20614
  let count = 0;
20572
20615
  try {
@@ -28025,7 +28068,7 @@ var init_hermes_config = __esm({
28025
28068
  });
28026
28069
 
28027
28070
  // ../engine/dist/parsers/mcps-source.js
28028
- import { existsSync as existsSync36, readFileSync as readFileSync32, statSync as statSync33 } from "fs";
28071
+ import { existsSync as existsSync36, readFileSync as readFileSync32, statSync as statSync34 } from "fs";
28029
28072
  import { homedir as homedir14 } from "os";
28030
28073
  import { join as join39 } from "path";
28031
28074
  function readJson(path) {
@@ -28164,7 +28207,7 @@ var init_mcps_source = __esm({
28164
28207
  return;
28165
28208
  let mtime = 0;
28166
28209
  try {
28167
- mtime = statSync33(ctx.filePath).mtimeMs;
28210
+ mtime = statSync34(ctx.filePath).mtimeMs;
28168
28211
  } catch {
28169
28212
  }
28170
28213
  for (const [name, cfgRaw] of Object.entries(obj2)) {
@@ -28378,7 +28421,7 @@ var init_toolkit_format = __esm({
28378
28421
  });
28379
28422
 
28380
28423
  // ../engine/dist/parsers/slash-commands-source.js
28381
- import { existsSync as existsSync37, readdirSync as readdirSync27, readFileSync as readFileSync33, statSync as statSync34 } from "fs";
28424
+ import { existsSync as existsSync37, readdirSync as readdirSync27, readFileSync as readFileSync33, statSync as statSync35 } from "fs";
28382
28425
  import { join as join40, basename as basename20 } from "path";
28383
28426
  function rebuildBody2(content) {
28384
28427
  const { text, redacted } = redactInlineSecrets(content);
@@ -28476,7 +28519,7 @@ var init_slash_commands_source = __esm({
28476
28519
  for (const file of files) {
28477
28520
  const filePath = join40(root.path, file);
28478
28521
  try {
28479
- const stat3 = statSync34(filePath);
28522
+ const stat3 = statSync35(filePath);
28480
28523
  const content = readFileSync33(filePath, "utf-8");
28481
28524
  const parsed = parseCommand(content, basename20(file, ext), root.format);
28482
28525
  yield {
@@ -28529,7 +28572,7 @@ var init_slash_commands_source = __esm({
28529
28572
  });
28530
28573
 
28531
28574
  // ../engine/dist/parsers/subagents-source.js
28532
- import { existsSync as existsSync38, readdirSync as readdirSync28, readFileSync as readFileSync34, statSync as statSync35 } from "fs";
28575
+ import { existsSync as existsSync38, readdirSync as readdirSync28, readFileSync as readFileSync34, statSync as statSync36 } from "fs";
28533
28576
  import { join as join41, basename as basename21 } from "path";
28534
28577
  function rebuildBody3(content) {
28535
28578
  const { text, redacted } = redactInlineSecrets(content);
@@ -28625,7 +28668,7 @@ var init_subagents_source = __esm({
28625
28668
  for (const file of files) {
28626
28669
  const filePath = join41(root.path, file);
28627
28670
  try {
28628
- const stat3 = statSync35(filePath);
28671
+ const stat3 = statSync36(filePath);
28629
28672
  const content = readFileSync34(filePath, "utf-8");
28630
28673
  const parsed = parseAgent(content, basename21(file, ext), root.format);
28631
28674
  yield {
@@ -28679,7 +28722,7 @@ var init_subagents_source = __esm({
28679
28722
  });
28680
28723
 
28681
28724
  // ../engine/dist/parsers/hooks-source.js
28682
- import { existsSync as existsSync39, readFileSync as readFileSync35, readdirSync as readdirSync29, statSync as statSync36 } from "fs";
28725
+ import { existsSync as existsSync39, readFileSync as readFileSync35, readdirSync as readdirSync29, statSync as statSync37 } from "fs";
28683
28726
  import { join as join42 } from "path";
28684
28727
  function readJson2(path) {
28685
28728
  if (!existsSync39(path))
@@ -28728,7 +28771,7 @@ var init_hooks_source = __esm({
28728
28771
  return;
28729
28772
  let mtime = 0;
28730
28773
  try {
28731
- mtime = statSync36(settingsPath2).mtimeMs;
28774
+ mtime = statSync37(settingsPath2).mtimeMs;
28732
28775
  } catch {
28733
28776
  }
28734
28777
  for (const [event, groups] of Object.entries(hooks)) {
@@ -28802,7 +28845,7 @@ var init_hooks_source = __esm({
28802
28845
  });
28803
28846
 
28804
28847
  // ../engine/dist/parsers/plugins-source.js
28805
- import { existsSync as existsSync40, readFileSync as readFileSync36, readdirSync as readdirSync30, statSync as statSync37 } from "fs";
28848
+ import { existsSync as existsSync40, readFileSync as readFileSync36, readdirSync as readdirSync30, statSync as statSync38 } from "fs";
28806
28849
  import { homedir as homedir15 } from "os";
28807
28850
  import { join as join43 } from "path";
28808
28851
  function readJson3(path) {
@@ -28831,7 +28874,7 @@ var init_plugins_source = __esm({
28831
28874
  if (claudeJson?.plugins && typeof claudeJson.plugins === "object") {
28832
28875
  let mtime = 0;
28833
28876
  try {
28834
- mtime = statSync37(claudePluginsManifest).mtimeMs;
28877
+ mtime = statSync38(claudePluginsManifest).mtimeMs;
28835
28878
  } catch {
28836
28879
  }
28837
28880
  for (const [pluginRef, installs] of Object.entries(claudeJson.plugins)) {
@@ -28872,7 +28915,7 @@ var init_plugins_source = __esm({
28872
28915
  const dir = join43(gemRoot, name);
28873
28916
  let st;
28874
28917
  try {
28875
- st = statSync37(dir);
28918
+ st = statSync38(dir);
28876
28919
  } catch {
28877
28920
  continue;
28878
28921
  }
@@ -28884,7 +28927,7 @@ var init_plugins_source = __esm({
28884
28927
  continue;
28885
28928
  let mtime = st.mtimeMs;
28886
28929
  try {
28887
- mtime = statSync37(manifestPath).mtimeMs;
28930
+ mtime = statSync38(manifestPath).mtimeMs;
28888
28931
  } catch {
28889
28932
  }
28890
28933
  const mcpServers = manifest.mcpServers ? Object.keys(manifest.mcpServers) : [];
@@ -28912,7 +28955,7 @@ var init_plugins_source = __esm({
28912
28955
  for (const { name, dir: pluginDir } of codexBackend.installedPluginDirs()) {
28913
28956
  let st;
28914
28957
  try {
28915
- st = statSync37(pluginDir);
28958
+ st = statSync38(pluginDir);
28916
28959
  } catch {
28917
28960
  continue;
28918
28961
  }
@@ -29047,7 +29090,7 @@ var init_sync_fields = __esm({
29047
29090
  });
29048
29091
 
29049
29092
  // ../engine/dist/core/index-lock.js
29050
- import { existsSync as existsSync41, mkdirSync as mkdirSync8, openSync as openSync9, writeFileSync as writeFileSync8, readFileSync as readFileSync37, rmSync as rmSync4, statSync as statSync38, closeSync as closeSync9 } from "fs";
29093
+ import { existsSync as existsSync41, mkdirSync as mkdirSync8, openSync as openSync9, writeFileSync as writeFileSync8, readFileSync as readFileSync37, rmSync as rmSync4, statSync as statSync39, closeSync as closeSync9 } from "fs";
29051
29094
  import { dirname as dirname17, join as join44 } from "path";
29052
29095
  function acquireIndexLock(opts) {
29053
29096
  const lockPath = lockFilePath(opts.file);
@@ -29097,7 +29140,7 @@ function lockFilePath(file = ".compact.lock") {
29097
29140
  }
29098
29141
  function stealStaleLock(lockPath, staleAfterMs) {
29099
29142
  try {
29100
- const s = statSync38(lockPath);
29143
+ const s = statSync39(lockPath);
29101
29144
  const age = Date.now() - s.mtimeMs;
29102
29145
  let payload;
29103
29146
  try {
@@ -29836,13 +29879,13 @@ var init_collector_health = __esm({
29836
29879
 
29837
29880
  // src/session-file-scan.ts
29838
29881
  import { open as open3 } from "node:fs/promises";
29839
- import { statSync as statSync39 } from "node:fs";
29882
+ import { statSync as statSync40 } from "node:fs";
29840
29883
  function sessionGroupsBytes(groups) {
29841
29884
  let total = 0;
29842
29885
  for (const g of groups) {
29843
29886
  for (const p of g.paths) {
29844
29887
  try {
29845
- total += statSync39(p).size;
29888
+ total += statSync40(p).size;
29846
29889
  } catch {
29847
29890
  }
29848
29891
  }
@@ -29961,7 +30004,7 @@ var init_session_file_scan = __esm({
29961
30004
  });
29962
30005
 
29963
30006
  // src/raw-archive-parts.ts
29964
- import { createReadStream as createReadStream4, createWriteStream, openSync as openSync10, readSync as readSync9, closeSync as closeSync10, rmSync as rmSync5, statSync as statSync40 } from "node:fs";
30007
+ import { createReadStream as createReadStream4, createWriteStream, openSync as openSync10, readSync as readSync9, closeSync as closeSync10, rmSync as rmSync5, statSync as statSync41 } from "node:fs";
29965
30008
  import { tmpdir as tmpdir2 } from "node:os";
29966
30009
  import { join as join46 } from "node:path";
29967
30010
  import { randomBytes } from "node:crypto";
@@ -30029,7 +30072,7 @@ async function writeArchiveFile(source, meta, redact, dir = tmpdir2()) {
30029
30072
  rmSync5(path, { force: true });
30030
30073
  throw err;
30031
30074
  }
30032
- return { path, gzSize: statSync40(path).size, size };
30075
+ return { path, gzSize: statSync41(path).size, size };
30033
30076
  }
30034
30077
  async function putPart(url, body2) {
30035
30078
  let last;
@@ -30104,6 +30147,16 @@ var init_raw_archive_parts = __esm({
30104
30147
  }
30105
30148
  });
30106
30149
 
30150
+ // src/yield-loop.ts
30151
+ function yieldToEventLoop() {
30152
+ return new Promise((resolve3) => setImmediate(resolve3));
30153
+ }
30154
+ var init_yield_loop = __esm({
30155
+ "src/yield-loop.ts"() {
30156
+ "use strict";
30157
+ }
30158
+ });
30159
+
30107
30160
  // src/server-probe.ts
30108
30161
  var server_probe_exports = {};
30109
30162
  __export(server_probe_exports, {
@@ -30332,7 +30385,7 @@ __export(auto_update_exports, {
30332
30385
  import { execSync as execSync2, execFileSync as execFileSync3 } from "node:child_process";
30333
30386
  import { readFileSync as readFileSync41, existsSync as existsSync43 } from "node:fs";
30334
30387
  import { fileURLToPath as fileURLToPath2 } from "node:url";
30335
- import { writeFileSync as writeFileSync10, mkdtempSync as mkdtempSync3, rmSync as rmSync6, readdirSync as readdirSync31, statSync as statSync41, mkdirSync as mkdirSync10 } from "node:fs";
30388
+ import { writeFileSync as writeFileSync10, mkdtempSync as mkdtempSync3, rmSync as rmSync6, readdirSync as readdirSync31, statSync as statSync42, mkdirSync as mkdirSync10 } from "node:fs";
30336
30389
  import { join as join47, dirname as dirname19, sep as sep2, posix as pathPosix, win32 as pathWin32 } from "node:path";
30337
30390
  import { tmpdir as tmpdir3, homedir as homedir16 } from "node:os";
30338
30391
  import { createHash as createHash11 } from "node:crypto";
@@ -30385,7 +30438,7 @@ function sweepStaleStaging(root = tmpdir3(), now = Date.now()) {
30385
30438
  if (!MKDTEMP_SUFFIX.test(name)) continue;
30386
30439
  const dir = join47(root, name);
30387
30440
  try {
30388
- const st = statSync41(dir);
30441
+ const st = statSync42(dir);
30389
30442
  if (!st.isDirectory() || now - st.mtimeMs < COLD_MS) continue;
30390
30443
  const inside = readdirSync31(dir);
30391
30444
  if (inside.length > 1 || inside.length === 1 && inside[0] !== "chat-recall.tgz") continue;
@@ -30671,7 +30724,7 @@ __export(sync_client_exports, {
30671
30724
  syncSessions: () => syncSessions
30672
30725
  });
30673
30726
  import { join as join48, dirname as dirname20, basename as basename22 } from "node:path";
30674
- import { readFileSync as readFileSync42, writeFileSync as writeFileSync11, mkdirSync as mkdirSync11, mkdtempSync as mkdtempSync4, rmSync as rmSync7, chmodSync as chmodSync4, unlinkSync as unlinkSync2, readdirSync as readdirSync32, statSync as statSync42 } from "node:fs";
30727
+ import { readFileSync as readFileSync42, writeFileSync as writeFileSync11, mkdirSync as mkdirSync11, mkdtempSync as mkdtempSync4, rmSync as rmSync7, chmodSync as chmodSync4, unlinkSync as unlinkSync2, readdirSync as readdirSync32, statSync as statSync43 } from "node:fs";
30675
30728
  import { tmpdir as tmpdir4, hostname as hostname2 } from "node:os";
30676
30729
  import { createHash as createHash12 } from "node:crypto";
30677
30730
  import { fileURLToPath as fileURLToPath3 } from "node:url";
@@ -31148,7 +31201,7 @@ function reapStaleScanDirs(dir = tmpdir4(), maxAgeMs = 6 * 36e5, now = Date.now(
31148
31201
  if (!name.startsWith("cr-batchscan-")) continue;
31149
31202
  const p = join48(dir, name);
31150
31203
  try {
31151
- if (now - statSync42(p).mtimeMs < maxAgeMs) continue;
31204
+ if (now - statSync43(p).mtimeMs < maxAgeMs) continue;
31152
31205
  rmSync7(p, { recursive: true, force: true });
31153
31206
  reaped++;
31154
31207
  } catch {
@@ -31675,7 +31728,7 @@ async function syncToTargetInScope(cred, opts = {}) {
31675
31728
  let walkPaused = false;
31676
31729
  let considered = 0;
31677
31730
  for (const ref of slice) {
31678
- await new Promise((resolve3) => setImmediate(resolve3));
31731
+ await yieldToEventLoop();
31679
31732
  considered++;
31680
31733
  const usedNow = usedMb();
31681
31734
  if (shouldPause(usedNow, memBudget, sessionsBuilt)) {
@@ -32028,6 +32081,7 @@ async function scanTranscriptFindingsChunked(ref, tenantRules) {
32028
32081
  let offset = 0;
32029
32082
  let lineBase = 0;
32030
32083
  for (; ; ) {
32084
+ await yieldToEventLoop();
32031
32085
  const chunk = await backend.readFromOffset(ref.prefixedId, offset, SYNC_CHUNK_BYTES);
32032
32086
  if (chunk.newOffset <= offset) break;
32033
32087
  offset = chunk.newOffset;
@@ -32587,6 +32641,7 @@ var init_sync_client = __esm({
32587
32641
  init_live_session_scan();
32588
32642
  init_session_file_scan();
32589
32643
  init_raw_archive_parts();
32644
+ init_yield_loop();
32590
32645
  init_backends();
32591
32646
  ownVersion = "0.0.0";
32592
32647
  try {
@@ -32747,11 +32802,11 @@ var init_update_notice = __esm({
32747
32802
  });
32748
32803
 
32749
32804
  // ../engine/dist/core/which.js
32750
- import { existsSync as existsSync44, statSync as statSync43, accessSync, constants } from "node:fs";
32805
+ import { existsSync as existsSync44, statSync as statSync44, accessSync, constants } from "node:fs";
32751
32806
  import { join as join50, isAbsolute as isAbsolute3, delimiter as delimiter2, sep as sep3 } from "node:path";
32752
32807
  function executable(p) {
32753
32808
  try {
32754
- if (!statSync43(p).isFile())
32809
+ if (!statSync44(p).isFile())
32755
32810
  return false;
32756
32811
  } catch {
32757
32812
  return false;
@@ -34920,7 +34975,7 @@ __export(companions_exports, {
34920
34975
  uninstallCodeindex: () => uninstallCodeindex,
34921
34976
  unregisterCodeindexMcp: () => unregisterCodeindexMcp
34922
34977
  });
34923
- import { existsSync as existsSync49, mkdirSync as mkdirSync15, statSync as statSync44, chmodSync as chmodSync6, unlinkSync as unlinkSync3, renameSync as renameSync7, createWriteStream as createWriteStream2, readFileSync as readFileSync47, writeFileSync as writeFileSync17 } from "node:fs";
34978
+ import { existsSync as existsSync49, mkdirSync as mkdirSync15, statSync as statSync45, chmodSync as chmodSync6, unlinkSync as unlinkSync3, renameSync as renameSync7, createWriteStream as createWriteStream2, readFileSync as readFileSync47, writeFileSync as writeFileSync17 } from "node:fs";
34924
34979
  import { homedir as homedir21 } from "node:os";
34925
34980
  import { join as join59 } from "node:path";
34926
34981
  import { execSync as execSync3 } from "node:child_process";
@@ -34971,7 +35026,7 @@ function checkCodeindexStatus() {
34971
35026
  status.installed = true;
34972
35027
  status.path = foundPath;
34973
35028
  try {
34974
- status.size = statSync44(foundPath).size;
35029
+ status.size = statSync45(foundPath).size;
34975
35030
  } catch {
34976
35031
  }
34977
35032
  try {
@@ -35121,7 +35176,7 @@ __export(install_skills_exports, {
35121
35176
  skillsSourceDir: () => skillsSourceDir,
35122
35177
  uninstallSkills: () => uninstallSkills
35123
35178
  });
35124
- import { readdirSync as readdirSync33, existsSync as existsSync50, mkdirSync as mkdirSync16, rmSync as rmSync8, cpSync, writeFileSync as writeFileSync18, readFileSync as readFileSync48, statSync as statSync45, realpathSync as realpathSync5 } from "fs";
35179
+ import { readdirSync as readdirSync33, existsSync as existsSync50, mkdirSync as mkdirSync16, rmSync as rmSync8, cpSync, writeFileSync as writeFileSync18, readFileSync as readFileSync48, statSync as statSync46, realpathSync as realpathSync5 } from "fs";
35125
35180
  import { createHash as createHash15 } from "crypto";
35126
35181
  import { join as join60, basename as basename23 } from "path";
35127
35182
  function skillsSourceDir() {
@@ -36136,11 +36191,11 @@ __export(toolkit_pull_exports, {
36136
36191
  platformRefusal: () => platformRefusal,
36137
36192
  portableCommand: () => portableCommand
36138
36193
  });
36139
- import { existsSync as existsSync52, mkdirSync as mkdirSync18, statSync as statSync46, writeFileSync as writeFileSync20 } from "node:fs";
36194
+ import { existsSync as existsSync52, mkdirSync as mkdirSync18, statSync as statSync47, writeFileSync as writeFileSync20 } from "node:fs";
36140
36195
  import { dirname as dirname26, join as join63, basename as basename26, isAbsolute as isAbsolute4 } from "node:path";
36141
36196
  function isExecutableFile(p) {
36142
36197
  try {
36143
- return statSync46(p).isFile();
36198
+ return statSync47(p).isFile();
36144
36199
  } catch {
36145
36200
  return false;
36146
36201
  }
@@ -38566,7 +38621,7 @@ __export(project_tasks_exports, {
38566
38621
  pushProjectTaskStatuses: () => pushProjectTaskStatuses,
38567
38622
  renderTeamTasksMd: () => renderTeamTasksMd
38568
38623
  });
38569
- import { existsSync as existsSync56, readFileSync as readFileSync53, writeFileSync as writeFileSync22, mkdirSync as mkdirSync20, statSync as statSync47 } from "node:fs";
38624
+ import { existsSync as existsSync56, readFileSync as readFileSync53, writeFileSync as writeFileSync22, mkdirSync as mkdirSync20, statSync as statSync48 } from "node:fs";
38570
38625
  import { join as join67, dirname as dirname28 } from "node:path";
38571
38626
  import { homedir as homedir24 } from "node:os";
38572
38627
  function isTeamTaskStatus(v) {
@@ -38655,7 +38710,7 @@ async function pushProjectTaskStatuses(base4, authHeaders, opts = {}) {
38655
38710
  if (!existsSync56(file)) continue;
38656
38711
  let mtime;
38657
38712
  try {
38658
- mtime = statSync47(file).mtimeMs;
38713
+ mtime = statSync48(file).mtimeMs;
38659
38714
  } catch {
38660
38715
  continue;
38661
38716
  }
@@ -39168,7 +39223,7 @@ var team_merge_exports = {};
39168
39223
  __export(team_merge_exports, {
39169
39224
  mergePullResult: () => mergePullResult
39170
39225
  });
39171
- import { existsSync as existsSync58, mkdirSync as mkdirSync22, readFileSync as readFileSync55, rmSync as rmSync11, writeFileSync as writeFileSync24, statSync as statSync48 } from "fs";
39226
+ import { existsSync as existsSync58, mkdirSync as mkdirSync22, readFileSync as readFileSync55, rmSync as rmSync11, writeFileSync as writeFileSync24, statSync as statSync49 } from "fs";
39172
39227
  import { dirname as dirname30, join as join69 } from "path";
39173
39228
  import { createHash as createHash18 } from "crypto";
39174
39229
  function installPathFor(art, tool) {
@@ -39305,7 +39360,7 @@ function readFileIfExists(path) {
39305
39360
  try {
39306
39361
  if (!existsSync58(path))
39307
39362
  return null;
39308
- const s = statSync48(path);
39363
+ const s = statSync49(path);
39309
39364
  if (!s.isFile())
39310
39365
  return null;
39311
39366
  return readFileSync55(path);
@@ -39389,7 +39444,7 @@ var init_vault_crypto = __esm({
39389
39444
  });
39390
39445
 
39391
39446
  // ../engine/dist/core/vault-source.js
39392
- import { existsSync as existsSync59, readdirSync as readdirSync35, statSync as statSync49 } from "fs";
39447
+ import { existsSync as existsSync59, readdirSync as readdirSync35, statSync as statSync50 } from "fs";
39393
39448
  import { extname, join as join70 } from "path";
39394
39449
  function* walkVaultSources() {
39395
39450
  const t = loadSettings().team.vault;
@@ -39405,7 +39460,7 @@ function* walkVaultSources() {
39405
39460
  }
39406
39461
  function safeStat(path) {
39407
39462
  try {
39408
- const s = statSync49(path);
39463
+ const s = statSync50(path);
39409
39464
  if (!s.isFile())
39410
39465
  return null;
39411
39466
  return { mtimeMs: s.mtimeMs, size: s.size };
@@ -39508,7 +39563,7 @@ function* walkAgy() {
39508
39563
  for (const rawId of sessionDirs) {
39509
39564
  const sessionPath = join70(brainDir, rawId);
39510
39565
  try {
39511
- if (!statSync49(sessionPath).isDirectory())
39566
+ if (!statSync50(sessionPath).isDirectory())
39512
39567
  continue;
39513
39568
  } catch {
39514
39569
  continue;
@@ -42119,7 +42174,7 @@ program.command("feedback").argument("<message...>", "what you want to say \u201
42119
42174
  }
42120
42175
  });
42121
42176
  program.command("doctor").description("Quick health check across login, server, credentials, hooks, MCP server, and codeindex").option("--purge-local", "Remove the legacy local index (cache.db + vector/KG files) left by pre-thin-collector versions \u2014 storage is server-side now. Requires login; keeps credentials, sync ledger, identity, and the audit log.").action(async (opts) => {
42122
- const { existsSync: existsSync63, readFileSync: readFileSync60, statSync: statSync50 } = await import("fs");
42177
+ const { existsSync: existsSync63, readFileSync: readFileSync60, statSync: statSync51 } = await import("fs");
42123
42178
  const { execSync: execSync6 } = await import("child_process");
42124
42179
  const rows = [];
42125
42180
  const note = (ok, label, detail) => rows.push({ ok, label, detail });
@@ -42187,7 +42242,7 @@ program.command("doctor").description("Quick health check across login, server,
42187
42242
  note(false, "Credentials file", `missing \u2014 run \`chat-recall login <server-url>\``);
42188
42243
  } else {
42189
42244
  try {
42190
- const mode = statSync50(credFile).mode & 511;
42245
+ const mode = statSync51(credFile).mode & 511;
42191
42246
  const isWin = process.platform === "win32";
42192
42247
  const safe = isWin || (mode & 63) === 0;
42193
42248
  note(safe, "Credentials file", isWin ? `${credFile} (Windows ACL \u2014 POSIX mode does not apply)` : `${credFile} (mode ${mode.toString(8).padStart(3, "0")}${safe ? "" : " \u2014 should be 600"})`);