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
@@ -26,8 +26,8 @@ import {
26
26
  runSkeleton,
27
27
  runSymbol,
28
28
  withPinnedReads
29
- } from "./token-goat-chunk-BKHJRFDE.mjs";
30
- import "./token-goat-chunk-PCR43MCM.mjs";
29
+ } from "./token-goat-chunk-2GAK6LNK.mjs";
30
+ import "./token-goat-chunk-GKZLHNGN.mjs";
31
31
  import "./token-goat-chunk-DA43OE7L.mjs";
32
32
  import {
33
33
  buildProjectMap,
@@ -37,37 +37,37 @@ import {
37
37
  getProjectIndexCounts,
38
38
  isWorkerRunning,
39
39
  mapLookupBytesSaved
40
- } from "./token-goat-chunk-SMUYPBF5.mjs";
41
- import "./token-goat-chunk-DDP64XR7.mjs";
42
- import "./token-goat-chunk-MQACN7VG.mjs";
43
- import "./token-goat-chunk-MECDAPXB.mjs";
40
+ } from "./token-goat-chunk-N3UUZAYN.mjs";
41
+ import "./token-goat-chunk-TD5JS4ST.mjs";
42
+ import "./token-goat-chunk-CVPCUQON.mjs";
43
+ import "./token-goat-chunk-JGQ2SBAA.mjs";
44
44
  import {
45
45
  claudeConfigDir
46
- } from "./token-goat-chunk-MEKVJZUN.mjs";
47
- import "./token-goat-chunk-M43UJVYQ.mjs";
46
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
47
+ import "./token-goat-chunk-YHCUBOVZ.mjs";
48
48
  import {
49
49
  recordStat,
50
50
  savedTokensFromBytes
51
- } from "./token-goat-chunk-PHDNWISV.mjs";
51
+ } from "./token-goat-chunk-YVCGELLH.mjs";
52
52
  import "./token-goat-chunk-LKSXAMJB.mjs";
53
- import "./token-goat-chunk-SHV6QQAS.mjs";
53
+ import "./token-goat-chunk-ONXXR7MS.mjs";
54
54
  import "./token-goat-chunk-3BTK54F3.mjs";
55
55
  import "./token-goat-chunk-XTQAOTSO.mjs";
56
56
  import "./token-goat-chunk-AH6QILZM.mjs";
57
- import "./token-goat-chunk-IJUHQX2M.mjs";
57
+ import "./token-goat-chunk-ZO6OALTM.mjs";
58
58
  import {
59
59
  checkEmbeddingPreflight,
60
60
  embeddingsDepsAvailable
61
- } from "./token-goat-chunk-IAMIQLCV.mjs";
62
- import "./token-goat-chunk-XQSSPX3X.mjs";
61
+ } from "./token-goat-chunk-646GCK7P.mjs";
62
+ import "./token-goat-chunk-LPOEPINH.mjs";
63
63
  import {
64
64
  getDb
65
- } from "./token-goat-chunk-2ZHD3XCD.mjs";
65
+ } from "./token-goat-chunk-CTPTUL7L.mjs";
66
66
  import {
67
67
  envStrList,
68
68
  loadConfig,
69
69
  resolveProjectRoot
70
- } from "./token-goat-chunk-M6CDVASA.mjs";
70
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
71
71
  import "./token-goat-chunk-EEIDFMEM.mjs";
72
72
  import "./token-goat-chunk-OSUFN2FV.mjs";
73
73
  import {
@@ -77,7 +77,7 @@ import {
77
77
  extractErrorMessage,
78
78
  foldCaseForContainment,
79
79
  globalDbPath
80
- } from "./token-goat-chunk-TGBSMHPM.mjs";
80
+ } from "./token-goat-chunk-K5KG65OI.mjs";
81
81
  import {
82
82
  displaySafeJson,
83
83
  normalizePath
@@ -325,7 +325,7 @@ function mcpToolAllowlist() {
325
325
  return names.length === 0 ? null : new Set(names);
326
326
  }
327
327
  async function createMcpServer() {
328
- const [{ McpServer }, { z }] = await Promise.all([import("./token-goat-chunk-OMNQUUIT.mjs"), import("./token-goat-chunk-T6M7DAW3.mjs")]);
328
+ const [{ McpServer }, { z }] = await Promise.all([import("./token-goat-chunk-XBESNWEX.mjs"), import("./token-goat-chunk-CHLHM42P.mjs")]);
329
329
  const server = new McpServer({ name: "token-goat", version: VERSION });
330
330
  const allowlist = mcpToolAllowlist();
331
331
  if (allowlist !== null) {
@@ -11,18 +11,18 @@ import {
11
11
  isNoisePath,
12
12
  listSiblingSessionStates,
13
13
  loadSessionCache
14
- } from "./token-goat-chunk-MECDAPXB.mjs";
14
+ } from "./token-goat-chunk-JGQ2SBAA.mjs";
15
15
  import {
16
16
  getBashOutput
17
- } from "./token-goat-chunk-M43UJVYQ.mjs";
17
+ } from "./token-goat-chunk-YHCUBOVZ.mjs";
18
18
  import {
19
19
  loadConfig
20
- } from "./token-goat-chunk-M6CDVASA.mjs";
20
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
21
21
  import {
22
22
  foldPath,
23
23
  runGit,
24
24
  toKB
25
- } from "./token-goat-chunk-TGBSMHPM.mjs";
25
+ } from "./token-goat-chunk-K5KG65OI.mjs";
26
26
  import {
27
27
  displaySafePath,
28
28
  displaySafeText,
@@ -5,7 +5,7 @@ import {
5
5
  canRunWrappedShell,
6
6
  clipToDeliveryCap,
7
7
  deliveredOutputBytes
8
- } from "./token-goat-chunk-CMAJGP3E.mjs";
8
+ } from "./token-goat-chunk-OSLK5MBY.mjs";
9
9
  import {
10
10
  DEFAULT_RECONCILE_BUDGET_MS,
11
11
  HOOK_EVENTS,
@@ -20,10 +20,10 @@ import {
20
20
  readStdinJson,
21
21
  reconcileProject,
22
22
  storeWebOutput
23
- } from "./token-goat-chunk-4V4OZHHV.mjs";
23
+ } from "./token-goat-chunk-VVPAGLLE.mjs";
24
24
  import {
25
25
  projectTranscriptsDir
26
- } from "./token-goat-chunk-KQI24O4B.mjs";
26
+ } from "./token-goat-chunk-HCEW3KTN.mjs";
27
27
  import {
28
28
  BUDGET_ESCALATION_MARKER,
29
29
  MANIFEST_PREAMBLE,
@@ -31,7 +31,7 @@ import {
31
31
  buildManifest,
32
32
  manifestPrintedPaths,
33
33
  summaryBudgetDirective
34
- } from "./token-goat-chunk-PDYQA3AP.mjs";
34
+ } from "./token-goat-chunk-75DLQORE.mjs";
35
35
  import {
36
36
  BODY_FIRST_TOOL_RESPONSE_KEYS,
37
37
  OUTLINE_MAX_REPLACEMENT_RATIO,
@@ -99,7 +99,7 @@ import {
99
99
  visionTokensSaved,
100
100
  vscodePathAllowed,
101
101
  withPreservedBlocks
102
- } from "./token-goat-chunk-SMUYPBF5.mjs";
102
+ } from "./token-goat-chunk-N3UUZAYN.mjs";
103
103
  import {
104
104
  compressOutput,
105
105
  detectFromCommand,
@@ -108,10 +108,10 @@ import {
108
108
  looksLikePytestOutput,
109
109
  pytestFilter,
110
110
  resolveMinNetSavingsBytes
111
- } from "./token-goat-chunk-DDP64XR7.mjs";
111
+ } from "./token-goat-chunk-TD5JS4ST.mjs";
112
112
  import {
113
113
  readCopilotHooksOwners
114
- } from "./token-goat-chunk-MQACN7VG.mjs";
114
+ } from "./token-goat-chunk-CVPCUQON.mjs";
115
115
  import {
116
116
  GENERIC_SERVED_OUTPUT_KEY,
117
117
  clearCurlDownload,
@@ -159,7 +159,7 @@ import {
159
159
  wasCliReadThisSession,
160
160
  wasFileReadThisSession,
161
161
  wasHintShown
162
- } from "./token-goat-chunk-MECDAPXB.mjs";
162
+ } from "./token-goat-chunk-JGQ2SBAA.mjs";
163
163
  import {
164
164
  accumulateResidentLines,
165
165
  claudeConfigDir,
@@ -169,7 +169,7 @@ import {
169
169
  repeatedSkillBodyHint,
170
170
  summarizeResidentContext,
171
171
  taskListPruneHint
172
- } from "./token-goat-chunk-MEKVJZUN.mjs";
172
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
173
173
  import {
174
174
  BASH_OUTPUT_SUBDIR,
175
175
  bashOutputIdSync,
@@ -190,28 +190,30 @@ import {
190
190
  splitOwnTrailingNotices,
191
191
  storeBashOutput,
192
192
  summarizeOutputDelta
193
- } from "./token-goat-chunk-M43UJVYQ.mjs";
193
+ } from "./token-goat-chunk-YHCUBOVZ.mjs";
194
194
  import {
195
195
  recordStat,
196
196
  redactSecrets,
197
197
  savedTokensFromBytes,
198
198
  storeBlob,
199
199
  stripAnsiEscapes
200
- } from "./token-goat-chunk-PHDNWISV.mjs";
200
+ } from "./token-goat-chunk-YVCGELLH.mjs";
201
201
  import {
202
202
  extractMarkdownHeadings,
203
203
  formatHeadingTreeParts
204
- } from "./token-goat-chunk-IAMIQLCV.mjs";
204
+ } from "./token-goat-chunk-646GCK7P.mjs";
205
205
  import {
206
206
  countSymbols,
207
207
  getFileEntry,
208
208
  querySymbols
209
- } from "./token-goat-chunk-XQSSPX3X.mjs";
209
+ } from "./token-goat-chunk-LPOEPINH.mjs";
210
210
  import {
211
+ buildLineIndex,
211
212
  detectLanguage,
212
213
  getDb,
213
- languageHasFlag
214
- } from "./token-goat-chunk-2ZHD3XCD.mjs";
214
+ languageHasFlag,
215
+ offsetToLine
216
+ } from "./token-goat-chunk-CTPTUL7L.mjs";
215
217
  import {
216
218
  detectHarness,
217
219
  envBool,
@@ -222,7 +224,7 @@ import {
222
224
  isUnderSystemTemp,
223
225
  loadConfig,
224
226
  shortFingerprint
225
- } from "./token-goat-chunk-M6CDVASA.mjs";
227
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
226
228
  import {
227
229
  ENV_KEYS,
228
230
  IDENTICAL_READ_MIN_BODY_BYTES,
@@ -242,7 +244,7 @@ import {
242
244
  isInsideRoot,
243
245
  runGit,
244
246
  toKB
245
- } from "./token-goat-chunk-TGBSMHPM.mjs";
247
+ } from "./token-goat-chunk-K5KG65OI.mjs";
246
248
  import {
247
249
  TOOL_RESULTS_ID_CHARS,
248
250
  UNTRUSTED_TOOL_TAG,
@@ -866,7 +868,7 @@ init_define_import_meta_env();
866
868
  var TRACKED_SKILL = "token-goat";
867
869
  var MAX_COMMANDS_SHOWN = 8;
868
870
  async function currentCommandNames() {
869
- const { buildProgram } = await import("./token-goat-chunk-FZN77SZD.mjs");
871
+ const { buildProgram } = await import("./token-goat-chunk-4W2SZZIL.mjs");
870
872
  return flattenCommandNames(buildCommandManifest(buildProgram()));
871
873
  }
872
874
  async function recordSkillVersionSnapshot(sessionId, skillName) {
@@ -1137,7 +1139,7 @@ async function postCompactRecovery(event) {
1137
1139
  if (event.raw["source"] !== "compact" || event.sessionId === void 0) return null;
1138
1140
  if (!loadConfig().compact_assist.enabled) return null;
1139
1141
  try {
1140
- const { buildResumePacket } = await import("./token-goat-chunk-CAHN4QU7.mjs");
1142
+ const { buildResumePacket } = await import("./token-goat-chunk-DMCYWDMB.mjs");
1141
1143
  return await buildResumePacket(event.sessionId);
1142
1144
  } catch {
1143
1145
  return null;
@@ -10560,12 +10562,12 @@ function diagnoseEditFailure(event, errorText) {
10560
10562
  const relDisplay = displaySafeText(relative2(process.cwd(), absPath).replace(/\\/g, "/") || absPath);
10561
10563
  if (isMultiple) {
10562
10564
  const matchLines = [];
10565
+ const lineIndex = buildLineIndex(fileContent);
10563
10566
  let pos = 0;
10564
10567
  while (pos < fileContent.length) {
10565
10568
  const idx = fileContent.indexOf(oldString, pos);
10566
10569
  if (idx === -1) break;
10567
- const line = fileContent.slice(0, idx).split("\n").length;
10568
- matchLines.push(line);
10570
+ matchLines.push(offsetToLine(lineIndex, idx));
10569
10571
  pos = idx + Math.max(1, oldString.length);
10570
10572
  }
10571
10573
  if (matchLines.length > 1) {
@@ -12,7 +12,7 @@ import {
12
12
  parseOoxmlPart,
13
13
  readOoxmlZip,
14
14
  sortNumberedParts
15
- } from "./token-goat-chunk-QTIRVK3M.mjs";
15
+ } from "./token-goat-chunk-SLE5MVTU.mjs";
16
16
  import {
17
17
  compileGuardedRegex
18
18
  } from "./token-goat-chunk-GMOUBOX4.mjs";
@@ -4,6 +4,7 @@ import {
4
4
  $brand,
5
5
  $input,
6
6
  $output,
7
+ INVALID,
7
8
  NEVER,
8
9
  TimePrecision,
9
10
  ZodAny,
@@ -37,12 +38,14 @@ import {
37
38
  ZodFirstPartyTypeKind,
38
39
  ZodFunction,
39
40
  ZodGUID,
41
+ ZodIBAN,
40
42
  ZodIPv4,
41
43
  ZodIPv6,
42
44
  ZodISODate,
43
45
  ZodISODateTime,
44
46
  ZodISODuration,
45
47
  ZodISOTime,
48
+ ZodInstanceOf,
46
49
  ZodIntersection,
47
50
  ZodIssueCode,
48
51
  ZodJWT,
@@ -143,6 +146,7 @@ import {
143
146
  creditCard,
144
147
  cuid,
145
148
  cuid2,
149
+ currencyCode,
146
150
  custom,
147
151
  date,
148
152
  decode,
@@ -171,6 +175,7 @@ import {
171
175
  hex,
172
176
  hostname,
173
177
  httpUrl,
178
+ iban,
174
179
  input,
175
180
  int,
176
181
  int32,
@@ -251,14 +256,16 @@ import {
251
256
  uuidv7,
252
257
  validate,
253
258
  validateAsync,
259
+ withParser,
254
260
  xid,
255
261
  xor
256
- } from "./token-goat-chunk-QCQUIPIP.mjs";
262
+ } from "./token-goat-chunk-3U6ZYVX5.mjs";
257
263
  import "./token-goat-chunk-A37V4PBF.mjs";
258
264
  export {
259
265
  $brand,
260
266
  $input,
261
267
  $output,
268
+ INVALID,
262
269
  NEVER,
263
270
  TimePrecision,
264
271
  ZodAny,
@@ -292,12 +299,14 @@ export {
292
299
  ZodFirstPartyTypeKind,
293
300
  ZodFunction,
294
301
  ZodGUID,
302
+ ZodIBAN,
295
303
  ZodIPv4,
296
304
  ZodIPv6,
297
305
  ZodISODate,
298
306
  ZodISODateTime,
299
307
  ZodISODuration,
300
308
  ZodISOTime,
309
+ ZodInstanceOf,
301
310
  ZodIntersection,
302
311
  ZodIssueCode,
303
312
  ZodJWT,
@@ -363,6 +372,7 @@ export {
363
372
  creditCard,
364
373
  cuid,
365
374
  cuid2,
375
+ currencyCode,
366
376
  custom,
367
377
  date,
368
378
  decode,
@@ -396,6 +406,7 @@ export {
396
406
  hex,
397
407
  hostname,
398
408
  httpUrl,
409
+ iban,
399
410
  _includes as includes,
400
411
  input,
401
412
  _instanceof as instanceof,
@@ -507,6 +518,7 @@ export {
507
518
  validate,
508
519
  validateAsync,
509
520
  _void as void,
521
+ withParser,
510
522
  xid,
511
523
  xor,
512
524
  external_exports as z
@@ -15,7 +15,7 @@ import {
15
15
  foldCase,
16
16
  foldPath,
17
17
  sleepSync
18
- } from "./token-goat-chunk-TGBSMHPM.mjs";
18
+ } from "./token-goat-chunk-K5KG65OI.mjs";
19
19
  import {
20
20
  safeJoin
21
21
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -114,6 +114,12 @@ function offsetToLine(lineIndex, offset) {
114
114
  }
115
115
  return lo + 1;
116
116
  }
117
+ function lineTextAt(content, lineIndex, line) {
118
+ const start = lineIndex[line - 1];
119
+ if (start === void 0) return "";
120
+ const next = lineIndex[line];
121
+ return content.slice(start, next === void 0 ? content.length : next - 1).trim();
122
+ }
117
123
  function stripCstyleComments(text, lineCommentRe) {
118
124
  const lines = text.split("\n");
119
125
  let inComment = false;
@@ -1943,6 +1949,13 @@ CREATE TABLE IF NOT EXISTS files (
1943
1949
  -- -- no MIGRATIONS entry or SCHEMA_VERSION bump is needed for this index.
1944
1950
  CREATE INDEX IF NOT EXISTS idx_files_path_folded ON files(TG_LOWER(path));
1945
1951
 
1952
+ -- Transient-read-failure counters, keyed by path. See the note above SCHEMA_SQL for why they are not in files.
1953
+ CREATE TABLE IF NOT EXISTS index_retries (
1954
+ path TEXT PRIMARY KEY,
1955
+ retry_count INTEGER NOT NULL
1956
+ );
1957
+ CREATE INDEX IF NOT EXISTS idx_index_retries_path_folded ON index_retries(TG_LOWER(path));
1958
+
1946
1959
  CREATE TABLE IF NOT EXISTS symbols (
1947
1960
  id INTEGER PRIMARY KEY AUTOINCREMENT,
1948
1961
  file_path TEXT,
@@ -2274,7 +2287,7 @@ function rebuildFtsAtCurrentTokenizer(conn) {
2274
2287
  var MIGRATIONS = {
2275
2288
  // v1 -> v2: adds files.embed_sha, tracked separately from files.sha so embedding freshness can be gated independently of parse freshness (see makeIndexer in worker.ts). A pre-existing v1 database's `files` table predates the column, so it needs an explicit ALTER TABLE here; a brand-new database already has the column from SCHEMA_SQL's CREATE TABLE above, so the ALTER TABLE would fail with "duplicate column name" there -- swallow exactly that error and rethrow anything else, so a genuine ALTER TABLE failure is never silently lost.
2276
2289
  1: (conn) => alterTableIdempotent(conn, "ALTER TABLE files ADD COLUMN embed_sha TEXT"),
2277
- // v2 -> v3: adds files.retry_count, a durable per-path counter for consecutive transient-read-failure requeues (see MAX_TRANSIENT_RETRIES / requeueDirtyPath / clearRetryCount in worker.ts). Previously this counter lived only in an in-memory Map inside worker.ts, which meant the retry-count reset -- run at the time in the short-lived hook CLI process -- could never actually reach the long-lived detached daemon process's own copy of that Map: they are different Node processes with no shared memory, so the reset was a silent no-op in the real deployed topology. Persisting the counter in `files` makes it visible to both processes via the one thing they do share: the index DB. Same swallow-duplicate-column pattern as v1 -> v2 above.
2290
+ // v2 -> v3: adds files.retry_count, a durable per-path counter for consecutive transient-read-failure requeues (see MAX_TRANSIENT_RETRIES / requeueDirtyPath / clearRetryCount in worker.ts). Previously this counter lived only in an in-memory Map inside worker.ts, which meant the retry-count reset -- run at the time in the short-lived hook CLI process -- could never actually reach the long-lived detached daemon process's own copy of that Map: they are different Node processes with no shared memory, so the reset was a silent no-op in the real deployed topology. Persisting the counter in `files` makes it visible to both processes via the one thing they do share: the index DB. Same swallow-duplicate-column pattern as v1 -> v2 above. Superseded since: the counter shares the DB but no longer the table, because holding it in `files` meant a never-indexed path got a `files` row the moment one read failed, and three readers take a `files` row to mean the file is indexed -- see the `index_retries` comment in SCHEMA_SQL above. This column is still created for databases that predate that move; nothing reads or writes it.
2278
2291
  2: (conn) => alterTableIdempotent(conn, "ALTER TABLE files ADD COLUMN retry_count INTEGER NOT NULL DEFAULT 0"),
2279
2292
  // v8 -> v9: adds symbols.parent (see SCHEMA_VERSION comment above for why). A pre-existing v8 database's `symbols` table predates the column, so it needs an explicit ALTER TABLE here; a brand-new database already has the column from SCHEMA_SQL's CREATE TABLE above, so the ALTER TABLE would fail with "duplicate column name" there -- swallow exactly that error and rethrow anything else, same pattern as v1 -> v2 / v2 -> v3 above.
2280
2293
  8: (conn) => alterTableIdempotent(conn, "ALTER TABLE symbols ADD COLUMN parent TEXT NOT NULL DEFAULT ''"),
@@ -2406,6 +2419,7 @@ export {
2406
2419
  precedingDocComment,
2407
2420
  buildLineIndex,
2408
2421
  offsetToLine,
2422
+ lineTextAt,
2409
2423
  stripCstyleComments,
2410
2424
  stripXmlComments,
2411
2425
  scanQuotedStringEnd,
@@ -2,10 +2,10 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  estimateTokensFromLength
5
- } from "./token-goat-chunk-MEKVJZUN.mjs";
5
+ } from "./token-goat-chunk-4NS4CAKI.mjs";
6
6
  import {
7
7
  loadConfig
8
- } from "./token-goat-chunk-M6CDVASA.mjs";
8
+ } from "./token-goat-chunk-DN4HSMH7.mjs";
9
9
  import {
10
10
  atomicWriteText,
11
11
  backupFile,
@@ -21,7 +21,7 @@ import {
21
21
  upsertDelimitedBlock,
22
22
  withInstallScope,
23
23
  writeIfDifferent
24
- } from "./token-goat-chunk-TGBSMHPM.mjs";
24
+ } from "./token-goat-chunk-K5KG65OI.mjs";
25
25
  import {
26
26
  init_define_import_meta_env
27
27
  } from "./token-goat-chunk-A37V4PBF.mjs";
@@ -4,18 +4,18 @@ import {
4
4
  MAX_RESUME_CHARS,
5
5
  MAX_RESUME_TOKENS,
6
6
  buildResumePacket
7
- } from "./token-goat-chunk-64OEF3UN.mjs";
8
- import "./token-goat-chunk-PDYQA3AP.mjs";
9
- import "./token-goat-chunk-MECDAPXB.mjs";
10
- import "./token-goat-chunk-MEKVJZUN.mjs";
11
- import "./token-goat-chunk-M43UJVYQ.mjs";
12
- import "./token-goat-chunk-PHDNWISV.mjs";
13
- import "./token-goat-chunk-XQSSPX3X.mjs";
14
- import "./token-goat-chunk-2ZHD3XCD.mjs";
15
- import "./token-goat-chunk-M6CDVASA.mjs";
7
+ } from "./token-goat-chunk-4642QVSQ.mjs";
8
+ import "./token-goat-chunk-75DLQORE.mjs";
9
+ import "./token-goat-chunk-JGQ2SBAA.mjs";
10
+ import "./token-goat-chunk-4NS4CAKI.mjs";
11
+ import "./token-goat-chunk-YHCUBOVZ.mjs";
12
+ import "./token-goat-chunk-YVCGELLH.mjs";
13
+ import "./token-goat-chunk-LPOEPINH.mjs";
14
+ import "./token-goat-chunk-CTPTUL7L.mjs";
15
+ import "./token-goat-chunk-DN4HSMH7.mjs";
16
16
  import "./token-goat-chunk-EEIDFMEM.mjs";
17
17
  import "./token-goat-chunk-OSUFN2FV.mjs";
18
- import "./token-goat-chunk-TGBSMHPM.mjs";
18
+ import "./token-goat-chunk-K5KG65OI.mjs";
19
19
  import "./token-goat-chunk-NMTKNYGF.mjs";
20
20
  import "./token-goat-chunk-GMOUBOX4.mjs";
21
21
  import "./token-goat-chunk-A37V4PBF.mjs";
@@ -13,7 +13,7 @@ import {
13
13
  foldPath,
14
14
  projectConfigPath,
15
15
  runGit
16
- } from "./token-goat-chunk-TGBSMHPM.mjs";
16
+ } from "./token-goat-chunk-K5KG65OI.mjs";
17
17
  import {
18
18
  normalizeDarwinSystemAlias
19
19
  } from "./token-goat-chunk-NMTKNYGF.mjs";
@@ -11,7 +11,7 @@ import {
11
11
  ooxmlPartBudget,
12
12
  parseOoxmlPart,
13
13
  readOoxmlZip
14
- } from "./token-goat-chunk-QTIRVK3M.mjs";
14
+ } from "./token-goat-chunk-SLE5MVTU.mjs";
15
15
  import {
16
16
  displaySafeText
17
17
  } from "./token-goat-chunk-NMTKNYGF.mjs";