token-goat 2.9.21 → 2.9.22

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.
Files changed (49) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -2
  2. package/dist/{token-goat-chunk-QUM3UNWS.mjs → token-goat-chunk-273O227F.mjs} +5 -5
  3. package/dist/{token-goat-chunk-BKHJRFDE.mjs → token-goat-chunk-2GAK6LNK.mjs} +13 -12
  4. package/dist/{token-goat-chunk-QCQUIPIP.mjs → token-goat-chunk-3U6ZYVX5.mjs} +1582 -773
  5. package/dist/{token-goat-chunk-64OEF3UN.mjs → token-goat-chunk-4642QVSQ.mjs} +6 -6
  6. package/dist/{token-goat-chunk-VXKT3W4C.mjs → token-goat-chunk-47MFMDCL.mjs} +3 -3
  7. package/dist/{token-goat-chunk-MEKVJZUN.mjs → token-goat-chunk-4NS4CAKI.mjs} +2 -2
  8. package/dist/{token-goat-chunk-BIEDTF6V.mjs → token-goat-chunk-4QGFVPFJ.mjs} +3 -3
  9. package/dist/{token-goat-chunk-FZN77SZD.mjs → token-goat-chunk-4W2SZZIL.mjs} +27 -27
  10. package/dist/{token-goat-chunk-IAMIQLCV.mjs → token-goat-chunk-646GCK7P.mjs} +200 -207
  11. package/dist/{token-goat-chunk-GO7OWONJ.mjs → token-goat-chunk-6MTX77BB.mjs} +17 -17
  12. package/dist/{token-goat-chunk-PDYQA3AP.mjs → token-goat-chunk-75DLQORE.mjs} +4 -4
  13. package/dist/{token-goat-chunk-CZ5ZFJSN.mjs → token-goat-chunk-765U7OJS.mjs} +23 -21
  14. package/dist/{token-goat-chunk-MZQORUX5.mjs → token-goat-chunk-7TAFIQS4.mjs} +1 -1
  15. package/dist/{token-goat-chunk-T6M7DAW3.mjs → token-goat-chunk-CHLHM42P.mjs} +13 -1
  16. package/dist/{token-goat-chunk-2ZHD3XCD.mjs → token-goat-chunk-CTPTUL7L.mjs} +16 -2
  17. package/dist/{token-goat-chunk-MQACN7VG.mjs → token-goat-chunk-CVPCUQON.mjs} +3 -3
  18. package/dist/{token-goat-chunk-CAHN4QU7.mjs → token-goat-chunk-DMCYWDMB.mjs} +10 -10
  19. package/dist/{token-goat-chunk-M6CDVASA.mjs → token-goat-chunk-DN4HSMH7.mjs} +1 -1
  20. package/dist/{token-goat-chunk-ORRDWKLA.mjs → token-goat-chunk-EU5KDBII.mjs} +1 -1
  21. package/dist/{token-goat-chunk-XJUPKJF5.mjs → token-goat-chunk-FI4MIIER.mjs} +40 -32
  22. package/dist/{token-goat-chunk-KRPJIXCT.mjs → token-goat-chunk-G7NIU2HH.mjs} +2 -2
  23. package/dist/{token-goat-chunk-PCR43MCM.mjs → token-goat-chunk-GKZLHNGN.mjs} +2 -2
  24. package/dist/{token-goat-chunk-KQI24O4B.mjs → token-goat-chunk-HCEW3KTN.mjs} +2 -2
  25. package/dist/{token-goat-chunk-KVAXTA2W.mjs → token-goat-chunk-HGXKWLYQ.mjs} +10 -10
  26. package/dist/{token-goat-chunk-4IIU3GNS.mjs → token-goat-chunk-I4OCEISJ.mjs} +8 -8
  27. package/dist/{token-goat-chunk-MECDAPXB.mjs → token-goat-chunk-JGQ2SBAA.mjs} +4 -4
  28. package/dist/{token-goat-chunk-TGBSMHPM.mjs → token-goat-chunk-K5KG65OI.mjs} +1 -1
  29. package/dist/{token-goat-chunk-DISVHOW6.mjs → token-goat-chunk-KJCMNJCG.mjs} +4 -4
  30. package/dist/{token-goat-chunk-XQSSPX3X.mjs → token-goat-chunk-LPOEPINH.mjs} +2 -2
  31. package/dist/{token-goat-chunk-SMUYPBF5.mjs → token-goat-chunk-N3UUZAYN.mjs} +51 -17
  32. package/dist/{token-goat-chunk-LK3YOKDF.mjs → token-goat-chunk-N6WCYKW5.mjs} +2 -2
  33. package/dist/{token-goat-chunk-SHV6QQAS.mjs → token-goat-chunk-ONXXR7MS.mjs} +1 -1
  34. package/dist/{token-goat-chunk-CMAJGP3E.mjs → token-goat-chunk-OSLK5MBY.mjs} +4 -4
  35. package/dist/{token-goat-chunk-ZJWPJL7O.mjs → token-goat-chunk-PQD6JTXN.mjs} +3 -3
  36. package/dist/{token-goat-chunk-QTIRVK3M.mjs → token-goat-chunk-SLE5MVTU.mjs} +1 -1
  37. package/dist/{token-goat-chunk-DDP64XR7.mjs → token-goat-chunk-TD5JS4ST.mjs} +3 -3
  38. package/dist/{token-goat-chunk-PPYZS7TI.mjs → token-goat-chunk-TEK5LV6B.mjs} +3 -3
  39. package/dist/{token-goat-chunk-6AQLZMCO.mjs → token-goat-chunk-VRS6B7UD.mjs} +10 -14
  40. package/dist/{token-goat-chunk-4V4OZHHV.mjs → token-goat-chunk-VVPAGLLE.mjs} +8 -8
  41. package/dist/{token-goat-chunk-OMNQUUIT.mjs → token-goat-chunk-XBESNWEX.mjs} +1 -1
  42. package/dist/token-goat-chunk-YDPJCY62.mjs +41 -0
  43. package/dist/{token-goat-chunk-M43UJVYQ.mjs → token-goat-chunk-YHCUBOVZ.mjs} +5 -5
  44. package/dist/{token-goat-chunk-PHDNWISV.mjs → token-goat-chunk-YVCGELLH.mjs} +3 -3
  45. package/dist/{token-goat-chunk-IJUHQX2M.mjs → token-goat-chunk-ZO6OALTM.mjs} +1 -1
  46. package/dist/token-goat-hook.mjs +17 -17
  47. package/dist/token-goat.core.mjs +27 -27
  48. package/package.json +1 -1
  49. package/dist/token-goat-chunk-CMHBTXMY.mjs +0 -41
@@ -2,16 +2,16 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  compareSemver
5
- } from "./token-goat-chunk-KRPJIXCT.mjs";
5
+ } from "./token-goat-chunk-G7NIU2HH.mjs";
6
6
  import {
7
7
  buildCopilotWasteReport,
8
8
  findLatestCopilotSession,
9
9
  findProjectSession,
10
10
  isCopilotTranscript
11
- } from "./token-goat-chunk-PPYZS7TI.mjs";
11
+ } from "./token-goat-chunk-TEK5LV6B.mjs";
12
12
  import {
13
13
  buildResumePacket
14
- } from "./token-goat-chunk-64OEF3UN.mjs";
14
+ } from "./token-goat-chunk-4642QVSQ.mjs";
15
15
  import {
16
16
  ALL_SYMBOLS_IN_FILE_LIMIT,
17
17
  AMBIGUOUS_HEADING_LIMIT,
@@ -107,7 +107,7 @@ import {
107
107
  symbolNamesInFile,
108
108
  upsertNote,
109
109
  warnIfFilesStale
110
- } from "./token-goat-chunk-BKHJRFDE.mjs";
110
+ } from "./token-goat-chunk-2GAK6LNK.mjs";
111
111
  import {
112
112
  DEFAULT_RECONCILE_BUDGET_MS,
113
113
  HOOK_EVENTS,
@@ -126,17 +126,17 @@ import {
126
126
  runRecallCommand,
127
127
  runReconcile,
128
128
  storeWebOutput
129
- } from "./token-goat-chunk-4V4OZHHV.mjs";
129
+ } from "./token-goat-chunk-VVPAGLLE.mjs";
130
130
  import {
131
131
  buildWasteReport,
132
132
  extractResultText,
133
133
  findLatestTranscript,
134
134
  projectTranscriptsDir,
135
135
  safeStringify
136
- } from "./token-goat-chunk-KQI24O4B.mjs";
136
+ } from "./token-goat-chunk-HCEW3KTN.mjs";
137
137
  import {
138
138
  buildManifest
139
- } from "./token-goat-chunk-PDYQA3AP.mjs";
139
+ } from "./token-goat-chunk-75DLQORE.mjs";
140
140
  import {
141
141
  GEMINI_TOOL_NAME_MAP,
142
142
  MAX_FILES_SCANNED,
@@ -208,14 +208,14 @@ import {
208
208
  visionTokensSavedByText,
209
209
  walkProject,
210
210
  writeCompact
211
- } from "./token-goat-chunk-SMUYPBF5.mjs";
211
+ } from "./token-goat-chunk-N3UUZAYN.mjs";
212
212
  import {
213
213
  CompressedOutput,
214
214
  TOOL_FILTERS,
215
215
  ToolFilter,
216
216
  deliverCompressed,
217
217
  detectFromCommand
218
- } from "./token-goat-chunk-DDP64XR7.mjs";
218
+ } from "./token-goat-chunk-TD5JS4ST.mjs";
219
219
  import {
220
220
  HOOKS_SCRIPT_FILE,
221
221
  MATERIALIZE_SHRUNK_IMAGE_JS,
@@ -253,7 +253,7 @@ import {
253
253
  visualStudioProjectMcpPath,
254
254
  visualStudioSolutionVscodeMcpPath,
255
255
  visualStudioUserMcpPath
256
- } from "./token-goat-chunk-MQACN7VG.mjs";
256
+ } from "./token-goat-chunk-CVPCUQON.mjs";
257
257
  import {
258
258
  AGENT_SALT_MARKER,
259
259
  CONTEXT_AUTOCOMPACT_TOKENS,
@@ -279,7 +279,7 @@ import {
279
279
  skillOutputsDir,
280
280
  storeCompact,
281
281
  storeOutput
282
- } from "./token-goat-chunk-MECDAPXB.mjs";
282
+ } from "./token-goat-chunk-JGQ2SBAA.mjs";
283
283
  import {
284
284
  capJsonRows,
285
285
  claudeConfigDir,
@@ -288,14 +288,14 @@ import {
288
288
  formatBytes,
289
289
  formatTokenEstimate,
290
290
  trimToBudget
291
- } from "./token-goat-chunk-MEKVJZUN.mjs";
291
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
292
292
  import {
293
293
  BASH_OUTPUT_SUBDIR,
294
294
  clipLongMatchLine,
295
295
  combineStreams,
296
296
  getBashOutput,
297
297
  isRecallCacheType
298
- } from "./token-goat-chunk-M43UJVYQ.mjs";
298
+ } from "./token-goat-chunk-YHCUBOVZ.mjs";
299
299
  import {
300
300
  C,
301
301
  DEFAULT_MAX_AGE_MS,
@@ -321,19 +321,19 @@ import {
321
321
  statsHasHarnessColumn,
322
322
  stripAnsiEscapes,
323
323
  summarize
324
- } from "./token-goat-chunk-PHDNWISV.mjs";
324
+ } from "./token-goat-chunk-YVCGELLH.mjs";
325
325
  import {
326
326
  docxOutline,
327
327
  docxTables,
328
328
  docxText,
329
329
  formatDocxTables
330
- } from "./token-goat-chunk-ORRDWKLA.mjs";
330
+ } from "./token-goat-chunk-EU5KDBII.mjs";
331
331
  import {
332
332
  pptxNotesText,
333
333
  pptxOutline,
334
334
  pptxSlideText,
335
335
  pptxTextGrep
336
- } from "./token-goat-chunk-MZQORUX5.mjs";
336
+ } from "./token-goat-chunk-7TAFIQS4.mjs";
337
337
  import {
338
338
  formatXlsxColumns,
339
339
  formatXlsxRange,
@@ -342,11 +342,11 @@ import {
342
342
  querySheet,
343
343
  rangeSheet,
344
344
  xlsxColumns
345
- } from "./token-goat-chunk-LK3YOKDF.mjs";
345
+ } from "./token-goat-chunk-N6WCYKW5.mjs";
346
346
  import {
347
347
  formatCsvTable,
348
348
  parseWhereSpecs
349
- } from "./token-goat-chunk-SHV6QQAS.mjs";
349
+ } from "./token-goat-chunk-ONXXR7MS.mjs";
350
350
  import {
351
351
  assetEmbedSha,
352
352
  deleteFileEmbeddings,
@@ -372,12 +372,12 @@ import {
372
372
  readSection,
373
373
  treeSitterCoreAvailable,
374
374
  treeSitterCoreLoadError
375
- } from "./token-goat-chunk-IAMIQLCV.mjs";
375
+ } from "./token-goat-chunk-646GCK7P.mjs";
376
376
  import {
377
377
  getFileEntry,
378
378
  getProjectFileEntries,
379
379
  querySymbols
380
- } from "./token-goat-chunk-XQSSPX3X.mjs";
380
+ } from "./token-goat-chunk-LPOEPINH.mjs";
381
381
  import {
382
382
  TREE_SITTER_LANGUAGES,
383
383
  detectLanguage,
@@ -388,7 +388,7 @@ import {
388
388
  matchGroovySlashy,
389
389
  nonTreeSitterLanguageCount,
390
390
  redactIfDotenv
391
- } from "./token-goat-chunk-2ZHD3XCD.mjs";
391
+ } from "./token-goat-chunk-CTPTUL7L.mjs";
392
392
  import {
393
393
  CONFIG_KEY_ENV_OVERRIDES,
394
394
  PROJECT_LOCKED_KEYS,
@@ -417,7 +417,7 @@ import {
417
417
  stringify,
418
418
  validateEnumField,
419
419
  validateNumericField
420
- } from "./token-goat-chunk-M6CDVASA.mjs";
420
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
421
421
  import {
422
422
  ENV_KEYS,
423
423
  LOCK_WAIT_MS_HARDENED,
@@ -478,7 +478,7 @@ import {
478
478
  withRetryOnLock,
479
479
  writeIfDifferent,
480
480
  writeJsonSettings
481
- } from "./token-goat-chunk-TGBSMHPM.mjs";
481
+ } from "./token-goat-chunk-K5KG65OI.mjs";
482
482
  import {
483
483
  UNTRUSTED_FILE_TAG,
484
484
  UNTRUSTED_TOOL_TAG,
@@ -8469,7 +8469,7 @@ async function runDoctorAndExit(opts) {
8469
8469
  }
8470
8470
  }
8471
8471
  try {
8472
- const { checkUpdateStatus } = await import("./token-goat-chunk-ZJWPJL7O.mjs");
8472
+ const { checkUpdateStatus } = await import("./token-goat-chunk-PQD6JTXN.mjs");
8473
8473
  const update = await checkUpdateStatus(1500);
8474
8474
  if (update.updateAvailable && update.latest) {
8475
8475
  console.log(`
@@ -9324,9 +9324,10 @@ function cmdProject(opts) {
9324
9324
  const staleTempFiles = findSystemTempFiles();
9325
9325
  const sweep = sweepKnownRoots(void 0, { dryRun: opts.dryRun === true });
9326
9326
  const orphanChunkPaths = sweep.prunedOrphanChunkPaths;
9327
+ const deadRetryPaths = sweep.prunedDeadRetryPaths;
9327
9328
  if (opts.dryRun === true) {
9328
9329
  if (opts.json === true) {
9329
- emit(displaySafeJson({ dryRun: true, wouldPrune: removed, stale, wouldPruneTempFiles: staleTempFiles.length, staleTempFiles, wouldPruneOrphanChunkFiles: orphanChunkPaths.length, orphanChunkPaths, wouldPruneDeadFileRows: sweep.prunedRows, deadRowRoots: sweep.prunedRoots, flaggedRoots: sweep.flaggedRoots, blocked_roots: before }));
9330
+ emit(displaySafeJson({ dryRun: true, wouldPrune: removed, stale, wouldPruneTempFiles: staleTempFiles.length, staleTempFiles, wouldPruneOrphanChunkFiles: orphanChunkPaths.length, orphanChunkPaths, wouldPruneDeadRetryPaths: deadRetryPaths.length, deadRetryPaths, wouldPruneDeadFileRows: sweep.prunedRows, deadRowRoots: sweep.prunedRoots, flaggedRoots: sweep.flaggedRoots, blocked_roots: before }));
9330
9331
  return;
9331
9332
  }
9332
9333
  if (removed === 0) {
@@ -9347,6 +9348,12 @@ function cmdProject(opts) {
9347
9348
  emit(`Would prune orphaned embedding chunks for ${orphanChunkPaths.length} file(s):`);
9348
9349
  for (const p of orphanChunkPaths) emit(` ${p}`);
9349
9350
  }
9351
+ if (deadRetryPaths.length === 0) {
9352
+ emit("Would prune 0 dead read-retry counter(s). Nothing to do.");
9353
+ } else {
9354
+ emit(`Would prune ${deadRetryPaths.length} dead read-retry counter(s):`);
9355
+ for (const p of deadRetryPaths) emit(` ${p}`);
9356
+ }
9350
9357
  if (sweep.prunedRows === 0) {
9351
9358
  emit("Would prune 0 dead file row(s) under known roots. Nothing to do.");
9352
9359
  } else {
@@ -9363,13 +9370,14 @@ function cmdProject(opts) {
9363
9370
  const prunedOrphanChunks = sweep.prunedOrphanChunkPaths;
9364
9371
  const prunedOrphanVectors = sweep.prunedOrphanVectors;
9365
9372
  if (opts.json === true) {
9366
- emit(displaySafeJson({ pruned: removed, blocked_roots: after, prunedTempFiles: prunedTempFiles.length, prunedOrphanChunkFiles: prunedOrphanChunks.length, prunedOrphanVectors, prunedDeadFileRows: sweep.prunedRows, deadRowRoots: sweep.prunedRoots, flaggedRoots: sweep.flaggedRoots }));
9373
+ emit(displaySafeJson({ pruned: removed, blocked_roots: after, prunedTempFiles: prunedTempFiles.length, prunedOrphanChunkFiles: prunedOrphanChunks.length, prunedOrphanVectors, prunedDeadRetryPaths: sweep.prunedDeadRetryPaths.length, prunedDeadFileRows: sweep.prunedRows, deadRowRoots: sweep.prunedRoots, flaggedRoots: sweep.flaggedRoots }));
9367
9374
  return;
9368
9375
  }
9369
9376
  emit(`Pruned ${removed} stale root(s). Remaining: ${after.length}`);
9370
9377
  emit(`Pruned ${prunedTempFiles.length} stale indexed temp-dir file(s).`);
9371
9378
  emit(`Pruned orphaned embedding chunks for ${prunedOrphanChunks.length} file(s).`);
9372
9379
  emit(`Pruned ${prunedOrphanVectors} orphaned embedding vector(s).`);
9380
+ emit(`Pruned ${sweep.prunedDeadRetryPaths.length} dead read-retry counter(s).`);
9373
9381
  emit(`Pruned ${sweep.prunedRows} dead file row(s) under ${sweep.prunedRoots.length} known root(s).`);
9374
9382
  for (const r of sweep.flaggedRoots) emit(` skipped (too many rows would go at once, root may be partly offline): ${r}`);
9375
9383
  return;
@@ -18425,7 +18433,7 @@ function cmdWaste(opts = {}) {
18425
18433
  });
18426
18434
  }
18427
18435
  async function cmdAudit(opts = {}) {
18428
- const { runAuditCommand } = await import("./token-goat-chunk-KVAXTA2W.mjs");
18436
+ const { runAuditCommand } = await import("./token-goat-chunk-HGXKWLYQ.mjs");
18429
18437
  return runAuditCommand({
18430
18438
  ...opts.project !== void 0 ? { project: opts.project } : {},
18431
18439
  ...opts.transcript !== void 0 ? { transcript: opts.transcript } : {},
@@ -20358,7 +20366,7 @@ async function cmdMcpServe() {
20358
20366
  let StdioServerTransport;
20359
20367
  try {
20360
20368
  ;
20361
- ({ createMcpServer } = await import("./token-goat-chunk-GO7OWONJ.mjs"));
20369
+ ({ createMcpServer } = await import("./token-goat-chunk-6MTX77BB.mjs"));
20362
20370
  ({ StdioServerTransport } = await import("./token-goat-chunk-EVC4TOLE.mjs"));
20363
20371
  } catch (err2) {
20364
20372
  process.stderr.write(
@@ -20383,7 +20391,7 @@ async function cmdHook(event, opts) {
20383
20391
  if (typeof opts.harness === "string" && opts.harness.length > 0) {
20384
20392
  process.env[ENV_KEYS.HARNESS_OVERRIDE] = opts.harness;
20385
20393
  }
20386
- const { relay } = await import("./token-goat-chunk-CMHBTXMY.mjs");
20394
+ const { relay } = await import("./token-goat-chunk-YDPJCY62.mjs");
20387
20395
  await relay(event);
20388
20396
  }
20389
20397
  function projectHooksCommitNote(pathFiles, hooksConfigPath) {
@@ -20420,7 +20428,7 @@ async function cmdInstall(opts) {
20420
20428
  if (opts.project === true && opts.user === true) {
20421
20429
  throw new Error("install takes either -p/--project or --user, not both.");
20422
20430
  }
20423
- await import("./token-goat-chunk-CMHBTXMY.mjs");
20431
+ await import("./token-goat-chunk-YDPJCY62.mjs");
20424
20432
  const scope = opts.project === true ? "project" : "user";
20425
20433
  if (wantsClaudeCodeBase(opts)) {
20426
20434
  const result = installHooks(scope);
@@ -21011,7 +21019,7 @@ async function cmdCompress(commandArgs, opts = {}) {
21011
21019
  process.exitCode = 1;
21012
21020
  return;
21013
21021
  }
21014
- const bashRunner = await import("./token-goat-chunk-4IIU3GNS.mjs");
21022
+ const bashRunner = await import("./token-goat-chunk-I4OCEISJ.mjs");
21015
21023
  if (opts.compress === false) {
21016
21024
  process.exitCode = bashRunner.runRaw(command, parseTimeout(opts.timeout, bashRunner.DEFAULT_TIMEOUT_SECONDS));
21017
21025
  return;
@@ -21277,7 +21285,7 @@ function buildProgram() {
21277
21285
  program2.command("compress [command...]").alias("bash").alias("run").description("run a shell command (under a POSIX shell / bash) and emit a compressed view of its output").allowUnknownOption(true).option("-c, --cmd <command>", "the shell command to run, as one string (use / for paths across platforms)").option("--cmd-b64 <payload>", "the shell command as a base64-encoded string (preserves quotes, backslashes, and symbols across platforms)").option("-f, --filter <name>", "filter name (auto-detected from the command when omitted)").option("--timeout <seconds>", "wall-clock timeout in seconds (0 = built-in default)").option("--no-compress", "stream output raw without compression (debug the wrapper)").option("--profile <name>", "compression profile: aggressive | balanced | minimal").option("--max-tokens <n>", "post-compress token cap (0 = no cap)").option("-q, --quiet-success", "on exit code 0, emit only [tg: ok] summary and store full output for recall via bash-output").option("--native", "use native platform shell (e.g. cmd.exe on Windows) instead of bash, preserving Windows path backslashes").action(cmdCompress);
21278
21286
  program2.command("upgrade").alias("update").description("check for updates and upgrade token-goat to the latest version").option("--check", "check whether an update is available without installing").option("-j, --json", "emit version check status as JSON").action(
21279
21287
  (opts) => guard(async () => {
21280
- const { cmdUpgrade } = await import("./token-goat-chunk-ZJWPJL7O.mjs");
21288
+ const { cmdUpgrade } = await import("./token-goat-chunk-PQD6JTXN.mjs");
21281
21289
  await cmdUpgrade(opts, () => cmdInstall({}));
21282
21290
  })()
21283
21291
  );
@@ -2,10 +2,10 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  loadConfig
5
- } from "./token-goat-chunk-M6CDVASA.mjs";
5
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
6
6
  import {
7
7
  VERSION
8
- } from "./token-goat-chunk-TGBSMHPM.mjs";
8
+ } from "./token-goat-chunk-K5KG65OI.mjs";
9
9
  import {
10
10
  displaySafeJson
11
11
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -5,11 +5,11 @@ import {
5
5
  isSupportedOcrLang,
6
6
  loadConfig,
7
7
  resolveOcrLangs
8
- } from "./token-goat-chunk-M6CDVASA.mjs";
8
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
9
9
  import {
10
10
  ensureDirSync,
11
11
  tokenGoatHome
12
- } from "./token-goat-chunk-TGBSMHPM.mjs";
12
+ } from "./token-goat-chunk-K5KG65OI.mjs";
13
13
  import {
14
14
  fenceUntrustedOcrText
15
15
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -6,12 +6,12 @@ import {
6
6
  createResidentContextStats,
7
7
  estimateTokens,
8
8
  summarizeResidentContext
9
- } from "./token-goat-chunk-MEKVJZUN.mjs";
9
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
10
10
  import {
11
11
  commandHash,
12
12
  getBashOutput,
13
13
  normalizeCommandForCacheKey
14
- } from "./token-goat-chunk-M43UJVYQ.mjs";
14
+ } from "./token-goat-chunk-YHCUBOVZ.mjs";
15
15
  import {
16
16
  init_define_import_meta_env
17
17
  } from "./token-goat-chunk-A37V4PBF.mjs";
@@ -4,22 +4,22 @@ import {
4
4
  buildCopilotWasteReport,
5
5
  findProjectSession,
6
6
  isCopilotTranscript
7
- } from "./token-goat-chunk-PPYZS7TI.mjs";
7
+ } from "./token-goat-chunk-TEK5LV6B.mjs";
8
8
  import {
9
9
  buildWasteReport
10
- } from "./token-goat-chunk-KQI24O4B.mjs";
11
- import "./token-goat-chunk-MQACN7VG.mjs";
12
- import "./token-goat-chunk-MEKVJZUN.mjs";
13
- import "./token-goat-chunk-M43UJVYQ.mjs";
14
- import "./token-goat-chunk-PHDNWISV.mjs";
15
- import "./token-goat-chunk-XQSSPX3X.mjs";
16
- import "./token-goat-chunk-2ZHD3XCD.mjs";
10
+ } from "./token-goat-chunk-HCEW3KTN.mjs";
11
+ import "./token-goat-chunk-CVPCUQON.mjs";
12
+ import "./token-goat-chunk-4NS4CAKI.mjs";
13
+ import "./token-goat-chunk-YHCUBOVZ.mjs";
14
+ import "./token-goat-chunk-YVCGELLH.mjs";
15
+ import "./token-goat-chunk-LPOEPINH.mjs";
16
+ import "./token-goat-chunk-CTPTUL7L.mjs";
17
17
  import {
18
18
  resolveProjectRoot
19
- } from "./token-goat-chunk-M6CDVASA.mjs";
19
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
20
20
  import "./token-goat-chunk-EEIDFMEM.mjs";
21
21
  import "./token-goat-chunk-OSUFN2FV.mjs";
22
- import "./token-goat-chunk-TGBSMHPM.mjs";
22
+ import "./token-goat-chunk-K5KG65OI.mjs";
23
23
  import {
24
24
  displaySafeJson
25
25
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -7,16 +7,16 @@ import {
7
7
  resolveFilter,
8
8
  run,
9
9
  runRaw
10
- } from "./token-goat-chunk-CMAJGP3E.mjs";
11
- import "./token-goat-chunk-DDP64XR7.mjs";
12
- import "./token-goat-chunk-M43UJVYQ.mjs";
13
- import "./token-goat-chunk-PHDNWISV.mjs";
14
- import "./token-goat-chunk-XQSSPX3X.mjs";
15
- import "./token-goat-chunk-2ZHD3XCD.mjs";
16
- import "./token-goat-chunk-M6CDVASA.mjs";
10
+ } from "./token-goat-chunk-OSLK5MBY.mjs";
11
+ import "./token-goat-chunk-TD5JS4ST.mjs";
12
+ import "./token-goat-chunk-YHCUBOVZ.mjs";
13
+ import "./token-goat-chunk-YVCGELLH.mjs";
14
+ import "./token-goat-chunk-LPOEPINH.mjs";
15
+ import "./token-goat-chunk-CTPTUL7L.mjs";
16
+ import "./token-goat-chunk-DN4HSMH7.mjs";
17
17
  import "./token-goat-chunk-EEIDFMEM.mjs";
18
18
  import "./token-goat-chunk-OSUFN2FV.mjs";
19
- import "./token-goat-chunk-TGBSMHPM.mjs";
19
+ import "./token-goat-chunk-K5KG65OI.mjs";
20
20
  import "./token-goat-chunk-NMTKNYGF.mjs";
21
21
  import "./token-goat-chunk-GMOUBOX4.mjs";
22
22
  import "./token-goat-chunk-A37V4PBF.mjs";
@@ -3,19 +3,19 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  claudeConfigDir,
5
5
  readTranscriptTail
6
- } from "./token-goat-chunk-MEKVJZUN.mjs";
6
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
7
7
  import {
8
8
  DEFAULT_MAX_AGE_MS,
9
9
  DEFAULT_MAX_COUNT,
10
10
  recordStat,
11
11
  redactSecrets
12
- } from "./token-goat-chunk-PHDNWISV.mjs";
12
+ } from "./token-goat-chunk-YVCGELLH.mjs";
13
13
  import {
14
14
  detectHarness,
15
15
  isAutoTriggerMultiplierExplicit,
16
16
  loadConfig,
17
17
  shortFingerprint
18
- } from "./token-goat-chunk-M6CDVASA.mjs";
18
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
19
19
  import {
20
20
  registerReset
21
21
  } from "./token-goat-chunk-EEIDFMEM.mjs";
@@ -31,7 +31,7 @@ import {
31
31
  stripLower,
32
32
  tokenGoatHome,
33
33
  withFileLock
34
- } from "./token-goat-chunk-TGBSMHPM.mjs";
34
+ } from "./token-goat-chunk-K5KG65OI.mjs";
35
35
  import {
36
36
  normalizePath
37
37
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -21,7 +21,7 @@ init_define_import_meta_env();
21
21
  import { createRequire } from "node:module";
22
22
  function resolveVersion() {
23
23
  if (true) {
24
- return "2.9.21";
24
+ return "2.9.22";
25
25
  }
26
26
  const require2 = createRequire(import.meta.url);
27
27
  const pkg = require2("../package.json");
@@ -10,13 +10,13 @@ import {
10
10
  querySheet,
11
11
  rangeSheet,
12
12
  xlsxColumns
13
- } from "./token-goat-chunk-LK3YOKDF.mjs";
14
- import "./token-goat-chunk-SHV6QQAS.mjs";
13
+ } from "./token-goat-chunk-N6WCYKW5.mjs";
14
+ import "./token-goat-chunk-ONXXR7MS.mjs";
15
15
  import "./token-goat-chunk-3BTK54F3.mjs";
16
- import "./token-goat-chunk-QTIRVK3M.mjs";
16
+ import "./token-goat-chunk-SLE5MVTU.mjs";
17
17
  import "./token-goat-chunk-XTQAOTSO.mjs";
18
18
  import "./token-goat-chunk-AH6QILZM.mjs";
19
- import "./token-goat-chunk-TGBSMHPM.mjs";
19
+ import "./token-goat-chunk-K5KG65OI.mjs";
20
20
  import "./token-goat-chunk-NMTKNYGF.mjs";
21
21
  import "./token-goat-chunk-Y4AFKTHK.mjs";
22
22
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -2,12 +2,12 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  getDb
5
- } from "./token-goat-chunk-2ZHD3XCD.mjs";
5
+ } from "./token-goat-chunk-CTPTUL7L.mjs";
6
6
  import {
7
7
  foldPath,
8
8
  globalDbPath,
9
9
  isCaseInsensitiveFs
10
- } from "./token-goat-chunk-TGBSMHPM.mjs";
10
+ } from "./token-goat-chunk-K5KG65OI.mjs";
11
11
  import {
12
12
  normalizePath
13
13
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -3,12 +3,12 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  isRewriteWorthwhile,
5
5
  resolveMinNetSavingsBytes
6
- } from "./token-goat-chunk-DDP64XR7.mjs";
6
+ } from "./token-goat-chunk-TD5JS4ST.mjs";
7
7
  import {
8
8
  COPILOT_CLI_TOOL_NAME_MAP,
9
9
  foldToolName,
10
10
  readCopilotMcpTools
11
- } from "./token-goat-chunk-MQACN7VG.mjs";
11
+ } from "./token-goat-chunk-CVPCUQON.mjs";
12
12
  import {
13
13
  contentHash,
14
14
  exportSessionState,
@@ -36,11 +36,11 @@ import {
36
36
  wasFileReadThisSession,
37
37
  wasFileTruncatedThisSession,
38
38
  writeSessionManifest
39
- } from "./token-goat-chunk-MECDAPXB.mjs";
39
+ } from "./token-goat-chunk-JGQ2SBAA.mjs";
40
40
  import {
41
41
  claudeConfigDir,
42
42
  estimateTokens
43
- } from "./token-goat-chunk-MEKVJZUN.mjs";
43
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
44
44
  import {
45
45
  getBashOutput,
46
46
  isGeneratedFile,
@@ -48,7 +48,7 @@ import {
48
48
  isLockFile,
49
49
  isManifestFile,
50
50
  storeBashOutputSync
51
- } from "./token-goat-chunk-M43UJVYQ.mjs";
51
+ } from "./token-goat-chunk-YHCUBOVZ.mjs";
52
52
  import {
53
53
  DEFAULT_MAX_AGE_MS,
54
54
  SOURCE_HINT,
@@ -60,7 +60,7 @@ import {
60
60
  savedTokensFromBytes,
61
61
  summarize,
62
62
  sweepCacheRoots
63
- } from "./token-goat-chunk-PHDNWISV.mjs";
63
+ } from "./token-goat-chunk-YVCGELLH.mjs";
64
64
  import {
65
65
  parse
66
66
  } from "./token-goat-chunk-3BTK54F3.mjs";
@@ -94,13 +94,13 @@ import {
94
94
  maxChunksEmbedSha,
95
95
  parseSourceSymbolsTreeSitterOnly,
96
96
  parserFingerprintForLanguage
97
- } from "./token-goat-chunk-IAMIQLCV.mjs";
97
+ } from "./token-goat-chunk-646GCK7P.mjs";
98
98
  import {
99
99
  getFileEntry,
100
100
  pathEqClause,
101
101
  projectScopeClause,
102
102
  querySymbols
103
- } from "./token-goat-chunk-XQSSPX3X.mjs";
103
+ } from "./token-goat-chunk-LPOEPINH.mjs";
104
104
  import {
105
105
  detectLanguage,
106
106
  detectLanguageOfFile,
@@ -108,7 +108,7 @@ import {
108
108
  getDb,
109
109
  languageHasFlag,
110
110
  redactIfDotenv
111
- } from "./token-goat-chunk-2ZHD3XCD.mjs";
111
+ } from "./token-goat-chunk-CTPTUL7L.mjs";
112
112
  import {
113
113
  detectHarness,
114
114
  fileIsAbsent,
@@ -122,7 +122,7 @@ import {
122
122
  ownGet,
123
123
  resolveProjectRoot,
124
124
  shortFingerprint
125
- } from "./token-goat-chunk-M6CDVASA.mjs";
125
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
126
126
  import {
127
127
  registerReset
128
128
  } from "./token-goat-chunk-EEIDFMEM.mjs";
@@ -152,7 +152,7 @@ import {
152
152
  statSize,
153
153
  toKB,
154
154
  tokenGoatHome
155
- } from "./token-goat-chunk-TGBSMHPM.mjs";
155
+ } from "./token-goat-chunk-K5KG65OI.mjs";
156
156
  import {
157
157
  TOOL_RESULTS_ID_CHARS,
158
158
  displaySafeJson,
@@ -1354,7 +1354,7 @@ ${dataUrl2}`);
1354
1354
  }
1355
1355
  recordStat("image_shrink", shrinkSaved, shrinkTokens, void 0, basename10);
1356
1356
  if (loadConfig().image_shrink.ocr_enabled) {
1357
- const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-QUM3UNWS.mjs");
1357
+ const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-273O227F.mjs");
1358
1358
  const ocr = await ocrImage(result.data);
1359
1359
  if (ocr !== null && isTextHeavy(ocr, loadConfig().image_shrink.ocr_min_confidence)) {
1360
1360
  const emitted = formatOcrSummary(ocr, basename10, result.originalBytes);
@@ -1534,6 +1534,7 @@ function removeFileFromIndex(db, filePath) {
1534
1534
  const tx = db.transaction(() => {
1535
1535
  deleteFileRows(db, filePath);
1536
1536
  deleteFileEmbeddings(db, filePath);
1537
+ db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`).run(foldPath(filePath));
1537
1538
  });
1538
1539
  tx.immediate();
1539
1540
  }
@@ -1638,6 +1639,31 @@ function orphanedChunkGroups(db) {
1638
1639
  }
1639
1640
  return [...byFolded.values()];
1640
1641
  }
1642
+ function findDeadRetryPaths(dbPath = globalDbPath()) {
1643
+ const rows = getDb(dbPath).prepare("SELECT path FROM index_retries").all();
1644
+ return rows.map((r) => r.path).filter(pathIsGone);
1645
+ }
1646
+ function pathIsGone(p) {
1647
+ try {
1648
+ return fs6.statSync(p, { throwIfNoEntry: false }) === void 0;
1649
+ } catch {
1650
+ return false;
1651
+ }
1652
+ }
1653
+ function pruneDeadRetryRows(dbPath = globalDbPath()) {
1654
+ const db = getDb(dbPath);
1655
+ const stmt = db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`);
1656
+ const removed = [];
1657
+ for (const p of findDeadRetryPaths(dbPath)) {
1658
+ if (!pathIsGone(p)) continue;
1659
+ try {
1660
+ stmt.run(foldPath(p));
1661
+ removed.push(p);
1662
+ } catch {
1663
+ }
1664
+ }
1665
+ return removed;
1666
+ }
1641
1667
  function pruneOrphanedChunks(dbPath = globalDbPath()) {
1642
1668
  const db = getDb(dbPath);
1643
1669
  const removed = [];
@@ -1715,7 +1741,15 @@ function sweepKnownRoots(dbPath = globalDbPath(), opts) {
1715
1741
  }
1716
1742
  const prunedOrphanChunkPaths = dryRun ? findOrphanedChunkPaths(dbPath) : pruneOrphanedChunks(dbPath);
1717
1743
  const prunedOrphanVectors = dryRun ? 0 : pruneOrphanedVectors(dbPath);
1718
- return { prunedRows, prunedRoots, flaggedRoots, prunedOrphanChunkPaths, prunedOrphanVectors };
1744
+ const prunedDeadRetryPaths = dryRun ? findDeadRetryPaths(dbPath) : pruneDeadRetryRows(dbPath);
1745
+ return {
1746
+ prunedRows,
1747
+ prunedRoots,
1748
+ flaggedRoots,
1749
+ prunedOrphanChunkPaths,
1750
+ prunedOrphanVectors,
1751
+ prunedDeadRetryPaths
1752
+ };
1719
1753
  }
1720
1754
  function findTopIndexedProjects(dbPath = globalDbPath(), limit = 3) {
1721
1755
  try {
@@ -2159,13 +2193,13 @@ function bumpRetryCount(dbPath, absPath) {
2159
2193
  const normalized = normalizePath(absPath);
2160
2194
  const folded = foldPath(normalized);
2161
2195
  const tx = db.transaction(() => {
2162
- const row = db.prepare(`SELECT retry_count FROM files WHERE ${pathEqClause("path")}`).get(folded);
2196
+ const row = db.prepare(`SELECT retry_count FROM index_retries WHERE ${pathEqClause("path")}`).get(folded);
2163
2197
  if (row !== void 0) {
2164
2198
  const next = (row.retry_count ?? 0) + 1;
2165
- db.prepare(`UPDATE files SET retry_count = ? WHERE ${pathEqClause("path")}`).run(next, folded);
2199
+ db.prepare(`UPDATE index_retries SET retry_count = ? WHERE ${pathEqClause("path")}`).run(next, folded);
2166
2200
  return next;
2167
2201
  }
2168
- db.prepare("INSERT INTO files (path, retry_count) VALUES (?, 1)").run(normalized);
2202
+ db.prepare("INSERT INTO index_retries (path, retry_count) VALUES (?, 1)").run(normalized);
2169
2203
  return 1;
2170
2204
  });
2171
2205
  return tx.immediate();
@@ -2174,7 +2208,7 @@ function clearRetryCount(dbPath, absPath) {
2174
2208
  try {
2175
2209
  const db = getDb(dbPath);
2176
2210
  const folded = foldPath(normalizePath(absPath));
2177
- db.prepare(`UPDATE files SET retry_count = 0 WHERE ${pathEqClause("path")}`).run(folded);
2211
+ db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`).run(folded);
2178
2212
  } catch {
2179
2213
  }
2180
2214
  }
@@ -3,7 +3,7 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  queryCsv,
5
5
  quoteCsvCell
6
- } from "./token-goat-chunk-SHV6QQAS.mjs";
6
+ } from "./token-goat-chunk-ONXXR7MS.mjs";
7
7
  import {
8
8
  NotAnOfficeDocumentError,
9
9
  assertOoxmlWithinDeadline,
@@ -12,7 +12,7 @@ import {
12
12
  ooxmlWorkDeadline,
13
13
  parseOoxmlPart,
14
14
  readOoxmlZip
15
- } from "./token-goat-chunk-QTIRVK3M.mjs";
15
+ } from "./token-goat-chunk-SLE5MVTU.mjs";
16
16
  import {
17
17
  displaySafeText
18
18
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./token-goat-chunk-3BTK54F3.mjs";
6
6
  import {
7
7
  filtersFilteredToEmptyNotice
8
- } from "./token-goat-chunk-TGBSMHPM.mjs";
8
+ } from "./token-goat-chunk-K5KG65OI.mjs";
9
9
  import {
10
10
  displaySafeText
11
11
  } from "./token-goat-chunk-NMTKNYGF.mjs";