token-goat 2.9.16 → 2.9.18

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 (35) hide show
  1. package/README.md +2 -5
  2. package/dist/{token-goat-chunk-ULA4WCED.mjs → token-goat-chunk-2KTZ6J7T.mjs} +7 -7
  3. package/dist/{token-goat-chunk-LJL6FGDS.mjs → token-goat-chunk-34OUJ2IE.mjs} +11 -11
  4. package/dist/{token-goat-chunk-OCI25AXY.mjs → token-goat-chunk-52IMXJ2L.mjs} +3 -3
  5. package/dist/{token-goat-chunk-MIL62GMN.mjs → token-goat-chunk-5MMJAJF3.mjs} +6 -6
  6. package/dist/{token-goat-chunk-NOBZV7PM.mjs → token-goat-chunk-6LGVCCMY.mjs} +12 -12
  7. package/dist/{token-goat-chunk-MA5BZ2KI.mjs → token-goat-chunk-7VLWNQDQ.mjs} +1 -1
  8. package/dist/{token-goat-chunk-2IEIBVVD.mjs → token-goat-chunk-ARNRFR6M.mjs} +1 -1
  9. package/dist/{token-goat-chunk-XOHTFRDH.mjs → token-goat-chunk-BFEWOMA3.mjs} +11 -9
  10. package/dist/{token-goat-chunk-QMZMHQRR.mjs → token-goat-chunk-BWCRC23L.mjs} +18 -18
  11. package/dist/{token-goat-chunk-H3DXI6VD.mjs → token-goat-chunk-CA6V36KW.mjs} +1 -1
  12. package/dist/{token-goat-chunk-5USHO7B6.mjs → token-goat-chunk-CTOYJ232.mjs} +18 -41
  13. package/dist/{token-goat-chunk-GIMGT34T.mjs → token-goat-chunk-EPXNOKIV.mjs} +1 -1
  14. package/dist/{token-goat-chunk-YPS64ACE.mjs → token-goat-chunk-GRI6HWX3.mjs} +1 -1
  15. package/dist/{token-goat-chunk-EJCY6KHO.mjs → token-goat-chunk-H3FONFBO.mjs} +2 -2
  16. package/dist/{token-goat-chunk-VVIYEFBI.mjs → token-goat-chunk-HIZXQVNU.mjs} +3 -3
  17. package/dist/{token-goat-chunk-DMQ32ZSR.mjs → token-goat-chunk-HPOFR6QX.mjs} +3 -3
  18. package/dist/{token-goat-chunk-63QWJ6UM.mjs → token-goat-chunk-I67CPTDD.mjs} +2 -2
  19. package/dist/{token-goat-chunk-M2R4UQ3B.mjs → token-goat-chunk-K4DG6EEF.mjs} +2 -2
  20. package/dist/{token-goat-chunk-R3X5TCPB.mjs → token-goat-chunk-L7VCX33I.mjs} +1 -1
  21. package/dist/{token-goat-chunk-NAMH252H.mjs → token-goat-chunk-LA3O4JGD.mjs} +2 -2
  22. package/dist/{token-goat-chunk-Z5VPAXTC.mjs → token-goat-chunk-LTYWLKAG.mjs} +61 -31
  23. package/dist/{token-goat-chunk-ZEHFYJ7Z.mjs → token-goat-chunk-OWSJJY5R.mjs} +4 -4
  24. package/dist/{token-goat-chunk-3H6FQT62.mjs → token-goat-chunk-QIDLJGXZ.mjs} +1 -1
  25. package/dist/{token-goat-chunk-2PCFAQAS.mjs → token-goat-chunk-QML7ITHJ.mjs} +87 -10
  26. package/dist/{token-goat-chunk-UXHDBVUR.mjs → token-goat-chunk-RHHFEXKF.mjs} +1 -1
  27. package/dist/{token-goat-chunk-NQZCSVN2.mjs → token-goat-chunk-UENEL6KX.mjs} +1 -1
  28. package/dist/{token-goat-chunk-UMXD2M7O.mjs → token-goat-chunk-V3ZWBEHM.mjs} +8 -8
  29. package/dist/{token-goat-chunk-BFNTLGVA.mjs → token-goat-chunk-W3E65QOW.mjs} +31 -9
  30. package/dist/{token-goat-chunk-GMXBQS6O.mjs → token-goat-chunk-WFX2V3OF.mjs} +58 -47
  31. package/dist/{token-goat-chunk-4DC6DDIB.mjs → token-goat-chunk-YQZE5NS6.mjs} +5 -5
  32. package/dist/token-goat-hook.mjs +11 -11
  33. package/dist/token-goat.core.mjs +18 -18
  34. package/docs/cli.md +3 -2
  35. package/package.json +1 -1
package/README.md CHANGED
@@ -341,12 +341,9 @@ Per-harness setup for Codex, Gemini, Qwen, Kimi, opencode, OpenClaw, pi, Copilot
341
341
 
342
342
  ## CLI
343
343
 
344
- You rarely type these yourself. Installation writes a routing guide into the agent's instructions, and the agent picks the command that answers its question: a surgical read (`read`, `symbol`, `section`, `skeleton`), a search (`semantic`, `refs`), orientation in an unfamiliar repo (`map`, `arch`, `affected`), recall of output it already has (`bash-output`, `web-output`, `mcp-output`), or a bounded reader for a PDF, Word file, slide deck, workbook, SQLite database, HTML document or image.
344
+ You rarely type these yourself. Installation writes a routing guide into the agent's instructions, and the agent picks the command that answers its question: a surgical read (`read`, `symbol`, `locate`, `section`, `skeleton`), a search (`semantic`, `refs`), orientation in an unfamiliar repo (`map`, `arch`, `affected`), recall of output it already has (`bash-output`, `web-output`, `mcp-output`), or a bounded reader for a PDF, Word file, slide deck, workbook, SQLite database, HTML document or image.
345
345
 
346
- One command is for people working on token-goat rather than for agents: `token-goat bench` replays a
347
- corpus of captured shell output through the real compression path and reports how much smaller the
348
- result got, alongside a count of the lines each case is not allowed to lose. Deleting output makes
349
- the first number look better, so the second one is what keeps the first honest.
346
+ One command is for people working on token-goat rather than for agents: `token-goat bench` replays a corpus of captured shell output through the real compression path and reports how much smaller the result got, alongside a count of the lines each case is not allowed to lose. Deleting output makes the first number look better, so the second one is what keeps the first honest.
350
347
 
351
348
  Every command, with its flags, its output, and the comparison workflows that chain them: **[CLI reference](docs/cli.md)**. For architectural analysis, empirical evaluations, and technical answers to common engineering questions: **[Architecture & Technical Q&A](docs/architecture-qa.html)**.
352
349
 
@@ -3,7 +3,7 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  deliveredOutputBytes,
5
5
  wrappedShell
6
- } from "./token-goat-chunk-UXHDBVUR.mjs";
6
+ } from "./token-goat-chunk-RHHFEXKF.mjs";
7
7
  import {
8
8
  ToolFilter,
9
9
  capTokens,
@@ -14,18 +14,18 @@ import {
14
14
  selectFilter,
15
15
  shlexSplit,
16
16
  storeBashOutputSync
17
- } from "./token-goat-chunk-5USHO7B6.mjs";
17
+ } from "./token-goat-chunk-CTOYJ232.mjs";
18
18
  import {
19
19
  recordStat
20
- } from "./token-goat-chunk-DMQ32ZSR.mjs";
21
- import "./token-goat-chunk-63QWJ6UM.mjs";
22
- import "./token-goat-chunk-R3X5TCPB.mjs";
20
+ } from "./token-goat-chunk-HPOFR6QX.mjs";
21
+ import "./token-goat-chunk-I67CPTDD.mjs";
22
+ import "./token-goat-chunk-L7VCX33I.mjs";
23
23
  import {
24
24
  loadConfig
25
- } from "./token-goat-chunk-H3DXI6VD.mjs";
25
+ } from "./token-goat-chunk-CA6V36KW.mjs";
26
26
  import "./token-goat-chunk-EEIDFMEM.mjs";
27
27
  import "./token-goat-chunk-OSUFN2FV.mjs";
28
- import "./token-goat-chunk-3H6FQT62.mjs";
28
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
29
29
  import "./token-goat-chunk-ERTXEKB6.mjs";
30
30
  import "./token-goat-chunk-GMOUBOX4.mjs";
31
31
  import {
@@ -4,23 +4,23 @@ import {
4
4
  buildEvent,
5
5
  relay,
6
6
  relayInProcess
7
- } from "./token-goat-chunk-GMXBQS6O.mjs";
8
- import "./token-goat-chunk-UXHDBVUR.mjs";
7
+ } from "./token-goat-chunk-WFX2V3OF.mjs";
8
+ import "./token-goat-chunk-RHHFEXKF.mjs";
9
9
  import {
10
10
  MAX_STDIN_BYTES,
11
11
  readStdinJson
12
- } from "./token-goat-chunk-UMXD2M7O.mjs";
13
- import "./token-goat-chunk-XOHTFRDH.mjs";
14
- import "./token-goat-chunk-5USHO7B6.mjs";
15
- import "./token-goat-chunk-DMQ32ZSR.mjs";
12
+ } from "./token-goat-chunk-V3ZWBEHM.mjs";
13
+ import "./token-goat-chunk-BFEWOMA3.mjs";
14
+ import "./token-goat-chunk-CTOYJ232.mjs";
15
+ import "./token-goat-chunk-HPOFR6QX.mjs";
16
16
  import "./token-goat-chunk-3BTK54F3.mjs";
17
- import "./token-goat-chunk-BFNTLGVA.mjs";
18
- import "./token-goat-chunk-63QWJ6UM.mjs";
19
- import "./token-goat-chunk-R3X5TCPB.mjs";
20
- import "./token-goat-chunk-H3DXI6VD.mjs";
17
+ import "./token-goat-chunk-W3E65QOW.mjs";
18
+ import "./token-goat-chunk-I67CPTDD.mjs";
19
+ import "./token-goat-chunk-L7VCX33I.mjs";
20
+ import "./token-goat-chunk-CA6V36KW.mjs";
21
21
  import "./token-goat-chunk-EEIDFMEM.mjs";
22
22
  import "./token-goat-chunk-OSUFN2FV.mjs";
23
- import "./token-goat-chunk-3H6FQT62.mjs";
23
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
24
24
  import "./token-goat-chunk-ERTXEKB6.mjs";
25
25
  import "./token-goat-chunk-Y4AFKTHK.mjs";
26
26
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -6,11 +6,11 @@ import {
6
6
  pptxOutline,
7
7
  pptxSlideText,
8
8
  pptxTextGrep
9
- } from "./token-goat-chunk-2IEIBVVD.mjs";
10
- import "./token-goat-chunk-MA5BZ2KI.mjs";
9
+ } from "./token-goat-chunk-ARNRFR6M.mjs";
10
+ import "./token-goat-chunk-7VLWNQDQ.mjs";
11
11
  import "./token-goat-chunk-XTQAOTSO.mjs";
12
12
  import "./token-goat-chunk-AH6QILZM.mjs";
13
- import "./token-goat-chunk-3H6FQT62.mjs";
13
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
14
14
  import "./token-goat-chunk-ERTXEKB6.mjs";
15
15
  import "./token-goat-chunk-Y4AFKTHK.mjs";
16
16
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -25,11 +25,11 @@ import {
25
25
  extractSwift,
26
26
  extractThrift,
27
27
  extractWgsl
28
- } from "./token-goat-chunk-YPS64ACE.mjs";
28
+ } from "./token-goat-chunk-GRI6HWX3.mjs";
29
29
  import {
30
30
  extractShellBannerHeading
31
- } from "./token-goat-chunk-BFNTLGVA.mjs";
32
- import "./token-goat-chunk-63QWJ6UM.mjs";
31
+ } from "./token-goat-chunk-W3E65QOW.mjs";
32
+ import "./token-goat-chunk-I67CPTDD.mjs";
33
33
  import {
34
34
  GENERIC_CLAUSE,
35
35
  assignBraceBlockSpans,
@@ -58,15 +58,15 @@ import {
58
58
  stripMultilineStringSpan,
59
59
  stripStringLiterals,
60
60
  stripXmlComments
61
- } from "./token-goat-chunk-R3X5TCPB.mjs";
62
- import "./token-goat-chunk-H3DXI6VD.mjs";
61
+ } from "./token-goat-chunk-L7VCX33I.mjs";
62
+ import "./token-goat-chunk-CA6V36KW.mjs";
63
63
  import "./token-goat-chunk-EEIDFMEM.mjs";
64
64
  import "./token-goat-chunk-OSUFN2FV.mjs";
65
65
  import {
66
66
  countContentLines,
67
67
  escapeRegExp,
68
68
  pushAll
69
- } from "./token-goat-chunk-3H6FQT62.mjs";
69
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
70
70
  import "./token-goat-chunk-ERTXEKB6.mjs";
71
71
  import "./token-goat-chunk-Y4AFKTHK.mjs";
72
72
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -25,8 +25,8 @@ import {
25
25
  runSkeleton,
26
26
  runSymbol,
27
27
  withPinnedReads
28
- } from "./token-goat-chunk-2PCFAQAS.mjs";
29
- import "./token-goat-chunk-EJCY6KHO.mjs";
28
+ } from "./token-goat-chunk-QML7ITHJ.mjs";
29
+ import "./token-goat-chunk-H3FONFBO.mjs";
30
30
  import "./token-goat-chunk-LMFO66YD.mjs";
31
31
  import {
32
32
  buildProjectMap,
@@ -36,31 +36,31 @@ import {
36
36
  getProjectIndexCounts,
37
37
  isWorkerRunning,
38
38
  mapLookupBytesSaved
39
- } from "./token-goat-chunk-XOHTFRDH.mjs";
40
- import "./token-goat-chunk-5USHO7B6.mjs";
39
+ } from "./token-goat-chunk-BFEWOMA3.mjs";
40
+ import "./token-goat-chunk-CTOYJ232.mjs";
41
41
  import {
42
42
  recordStat,
43
43
  savedTokensFromBytes
44
- } from "./token-goat-chunk-DMQ32ZSR.mjs";
44
+ } from "./token-goat-chunk-HPOFR6QX.mjs";
45
45
  import "./token-goat-chunk-LKSXAMJB.mjs";
46
- import "./token-goat-chunk-GIMGT34T.mjs";
46
+ import "./token-goat-chunk-EPXNOKIV.mjs";
47
47
  import "./token-goat-chunk-3BTK54F3.mjs";
48
48
  import "./token-goat-chunk-XTQAOTSO.mjs";
49
49
  import "./token-goat-chunk-AH6QILZM.mjs";
50
- import "./token-goat-chunk-YPS64ACE.mjs";
50
+ import "./token-goat-chunk-GRI6HWX3.mjs";
51
51
  import {
52
52
  checkEmbeddingPreflight,
53
53
  embeddingsDepsAvailable
54
- } from "./token-goat-chunk-BFNTLGVA.mjs";
55
- import "./token-goat-chunk-63QWJ6UM.mjs";
54
+ } from "./token-goat-chunk-W3E65QOW.mjs";
55
+ import "./token-goat-chunk-I67CPTDD.mjs";
56
56
  import {
57
57
  getDb
58
- } from "./token-goat-chunk-R3X5TCPB.mjs";
58
+ } from "./token-goat-chunk-L7VCX33I.mjs";
59
59
  import {
60
60
  envStrList,
61
61
  loadConfig,
62
62
  resolveProjectRoot
63
- } from "./token-goat-chunk-H3DXI6VD.mjs";
63
+ } from "./token-goat-chunk-CA6V36KW.mjs";
64
64
  import "./token-goat-chunk-EEIDFMEM.mjs";
65
65
  import "./token-goat-chunk-OSUFN2FV.mjs";
66
66
  import {
@@ -70,7 +70,7 @@ import {
70
70
  extractErrorMessage,
71
71
  foldCaseForContainment,
72
72
  globalDbPath
73
- } from "./token-goat-chunk-3H6FQT62.mjs";
73
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
74
74
  import {
75
75
  displaySafeJson,
76
76
  normalizePath
@@ -12,7 +12,7 @@ import {
12
12
  } from "./token-goat-chunk-AH6QILZM.mjs";
13
13
  import {
14
14
  pushAll
15
- } from "./token-goat-chunk-3H6FQT62.mjs";
15
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
16
16
  import {
17
17
  DocumentRefusedError,
18
18
  MAX_DOCUMENT_WORK_MILLIS
@@ -12,7 +12,7 @@ import {
12
12
  parseOoxmlPart,
13
13
  readOoxmlZip,
14
14
  sortNumberedParts
15
- } from "./token-goat-chunk-MA5BZ2KI.mjs";
15
+ } from "./token-goat-chunk-7VLWNQDQ.mjs";
16
16
  import {
17
17
  compileGuardedRegex
18
18
  } from "./token-goat-chunk-GMOUBOX4.mjs";
@@ -10,7 +10,7 @@ import {
10
10
  resolveMinNetSavingsBytes,
11
11
  storeBashOutputSync,
12
12
  stripAnsiCodes
13
- } from "./token-goat-chunk-5USHO7B6.mjs";
13
+ } from "./token-goat-chunk-CTOYJ232.mjs";
14
14
  import {
15
15
  DEFAULT_MAX_AGE_MS,
16
16
  DEFAULT_MAX_COUNT,
@@ -22,7 +22,7 @@ import {
22
22
  savedTokensFromBytes,
23
23
  summarize,
24
24
  sweepCacheRoots
25
- } from "./token-goat-chunk-DMQ32ZSR.mjs";
25
+ } from "./token-goat-chunk-HPOFR6QX.mjs";
26
26
  import {
27
27
  parse
28
28
  } from "./token-goat-chunk-3BTK54F3.mjs";
@@ -52,13 +52,13 @@ import {
52
52
  isTreeSitterAvailable,
53
53
  loadRegexExtractors,
54
54
  parseSourceSymbolsTreeSitterOnly
55
- } from "./token-goat-chunk-BFNTLGVA.mjs";
55
+ } from "./token-goat-chunk-W3E65QOW.mjs";
56
56
  import {
57
57
  getFileEntry,
58
58
  pathEqClause,
59
59
  projectScopeClause,
60
60
  querySymbols
61
- } from "./token-goat-chunk-63QWJ6UM.mjs";
61
+ } from "./token-goat-chunk-I67CPTDD.mjs";
62
62
  import {
63
63
  detectLanguage,
64
64
  detectLanguageOfFile,
@@ -66,7 +66,7 @@ import {
66
66
  getDb,
67
67
  languageHasFlag,
68
68
  redactIfDotenv
69
- } from "./token-goat-chunk-R3X5TCPB.mjs";
69
+ } from "./token-goat-chunk-L7VCX33I.mjs";
70
70
  import {
71
71
  detectHarness,
72
72
  fileIsAbsent,
@@ -80,7 +80,7 @@ import {
80
80
  makeProjectAt,
81
81
  resolveProjectRoot,
82
82
  shortFingerprint
83
- } from "./token-goat-chunk-H3DXI6VD.mjs";
83
+ } from "./token-goat-chunk-CA6V36KW.mjs";
84
84
  import {
85
85
  registerReset
86
86
  } from "./token-goat-chunk-EEIDFMEM.mjs";
@@ -126,7 +126,7 @@ import {
126
126
  withFileLock,
127
127
  withInstallScope,
128
128
  writeIfDifferent
129
- } from "./token-goat-chunk-3H6FQT62.mjs";
129
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
130
130
  import {
131
131
  displaySafeJson,
132
132
  displaySafePath,
@@ -4151,7 +4151,7 @@ ${dataUrl2}`);
4151
4151
  }
4152
4152
  recordStat("image_shrink", shrinkSaved, shrinkTokens, void 0, basename11);
4153
4153
  if (loadConfig().image_shrink.ocr_enabled) {
4154
- const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-4DC6DDIB.mjs");
4154
+ const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-YQZE5NS6.mjs");
4155
4155
  const ocr = await ocrImage(result.data);
4156
4156
  if (ocr !== null && isTextHeavy(ocr, loadConfig().image_shrink.ocr_min_confidence)) {
4157
4157
  const emitted = formatOcrSummary(ocr, basename11, result.originalBytes);
@@ -5625,7 +5625,9 @@ function appendDirtyPath(normalizedPath) {
5625
5625
  }
5626
5626
  function enqueueDirtyPathSafe(filePath, opts) {
5627
5627
  try {
5628
- appendDirtyPath(opts?.alreadyResolved === true ? filePath : resolveIndexPath(filePath));
5628
+ const resolved = opts?.alreadyResolved === true ? filePath : resolveIndexPath(filePath);
5629
+ if (isUnderSystemTemp(resolved)) return;
5630
+ appendDirtyPath(resolved);
5629
5631
  } catch {
5630
5632
  return;
5631
5633
  }
@@ -70,34 +70,34 @@ import {
70
70
  requirePositiveInt,
71
71
  run,
72
72
  visualStudioManualSteps
73
- } from "./token-goat-chunk-Z5VPAXTC.mjs";
74
- import "./token-goat-chunk-2PCFAQAS.mjs";
75
- import "./token-goat-chunk-EJCY6KHO.mjs";
73
+ } from "./token-goat-chunk-LTYWLKAG.mjs";
74
+ import "./token-goat-chunk-QML7ITHJ.mjs";
75
+ import "./token-goat-chunk-H3FONFBO.mjs";
76
76
  import "./token-goat-chunk-LMFO66YD.mjs";
77
77
  import {
78
78
  cmdDescribe,
79
79
  cmdSessionSchema
80
- } from "./token-goat-chunk-UMXD2M7O.mjs";
81
- import "./token-goat-chunk-XOHTFRDH.mjs";
82
- import "./token-goat-chunk-5USHO7B6.mjs";
83
- import "./token-goat-chunk-DMQ32ZSR.mjs";
80
+ } from "./token-goat-chunk-V3ZWBEHM.mjs";
81
+ import "./token-goat-chunk-BFEWOMA3.mjs";
82
+ import "./token-goat-chunk-CTOYJ232.mjs";
83
+ import "./token-goat-chunk-HPOFR6QX.mjs";
84
84
  import "./token-goat-chunk-LKSXAMJB.mjs";
85
- import "./token-goat-chunk-NQZCSVN2.mjs";
86
- import "./token-goat-chunk-2IEIBVVD.mjs";
87
- import "./token-goat-chunk-NAMH252H.mjs";
88
- import "./token-goat-chunk-GIMGT34T.mjs";
85
+ import "./token-goat-chunk-UENEL6KX.mjs";
86
+ import "./token-goat-chunk-ARNRFR6M.mjs";
87
+ import "./token-goat-chunk-LA3O4JGD.mjs";
88
+ import "./token-goat-chunk-EPXNOKIV.mjs";
89
89
  import "./token-goat-chunk-3BTK54F3.mjs";
90
- import "./token-goat-chunk-MA5BZ2KI.mjs";
90
+ import "./token-goat-chunk-7VLWNQDQ.mjs";
91
91
  import "./token-goat-chunk-XTQAOTSO.mjs";
92
92
  import "./token-goat-chunk-AH6QILZM.mjs";
93
- import "./token-goat-chunk-YPS64ACE.mjs";
94
- import "./token-goat-chunk-BFNTLGVA.mjs";
95
- import "./token-goat-chunk-63QWJ6UM.mjs";
96
- import "./token-goat-chunk-R3X5TCPB.mjs";
97
- import "./token-goat-chunk-H3DXI6VD.mjs";
93
+ import "./token-goat-chunk-GRI6HWX3.mjs";
94
+ import "./token-goat-chunk-W3E65QOW.mjs";
95
+ import "./token-goat-chunk-I67CPTDD.mjs";
96
+ import "./token-goat-chunk-L7VCX33I.mjs";
97
+ import "./token-goat-chunk-CA6V36KW.mjs";
98
98
  import "./token-goat-chunk-EEIDFMEM.mjs";
99
99
  import "./token-goat-chunk-OSUFN2FV.mjs";
100
- import "./token-goat-chunk-3H6FQT62.mjs";
100
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
101
101
  import "./token-goat-chunk-ERTXEKB6.mjs";
102
102
  import "./token-goat-chunk-Y4AFKTHK.mjs";
103
103
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -13,7 +13,7 @@ import {
13
13
  foldPath,
14
14
  projectConfigPath,
15
15
  runGit
16
- } from "./token-goat-chunk-3H6FQT62.mjs";
16
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
17
17
  import {
18
18
  normalizeDarwinSystemAlias
19
19
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -9,24 +9,24 @@ import {
9
9
  savedTokensFromBytes,
10
10
  storeBlob,
11
11
  stripAnsiEscapes
12
- } from "./token-goat-chunk-DMQ32ZSR.mjs";
12
+ } from "./token-goat-chunk-HPOFR6QX.mjs";
13
13
  import {
14
14
  sanitizeFtsQuery
15
- } from "./token-goat-chunk-63QWJ6UM.mjs";
15
+ } from "./token-goat-chunk-I67CPTDD.mjs";
16
16
  import {
17
17
  getDb
18
- } from "./token-goat-chunk-R3X5TCPB.mjs";
18
+ } from "./token-goat-chunk-L7VCX33I.mjs";
19
19
  import {
20
20
  loadConfig,
21
21
  shortFingerprint
22
- } from "./token-goat-chunk-H3DXI6VD.mjs";
22
+ } from "./token-goat-chunk-CA6V36KW.mjs";
23
23
  import {
24
24
  registerReset
25
25
  } from "./token-goat-chunk-EEIDFMEM.mjs";
26
26
  import {
27
27
  globalDbPath,
28
28
  runGit
29
- } from "./token-goat-chunk-3H6FQT62.mjs";
29
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
30
30
  import {
31
31
  normalizePath,
32
32
  resolveIndexPath
@@ -1694,6 +1694,7 @@ registerReset(() => {
1694
1694
  // src/tool_filters/base.ts
1695
1695
  init_define_import_meta_env();
1696
1696
  var DEFAULT_MIN_NET_SAVINGS_BYTES = 100;
1697
+ var EARLY_EXIT_NOTE = "early-exit: normalisation alone sufficient";
1697
1698
  function resolveMinNetSavingsBytes() {
1698
1699
  try {
1699
1700
  return loadConfig().bash_compress.min_net_savings_bytes;
@@ -1744,28 +1745,19 @@ var CompressedOutput = class {
1744
1745
  return 100 * this.bytesSaved / this.originalBytes;
1745
1746
  }
1746
1747
  /**
1747
- * Byte cost of the trailing marker {@link withMarker} would append for this
1748
- * result's filter name and percentage. The marker is not free — a rewrite
1749
- * whose `bytesSaved` doesn't even cover its own marker is strictly worse
1750
- * than doing nothing.
1748
+ * Byte cost of the trailing marker {@link withMarker} would append for this result's filter name and percentage. The marker is not free — a rewrite whose `bytesSaved` doesn't even cover its own marker is strictly worse than doing nothing.
1751
1749
  */
1752
1750
  get markerBytes() {
1753
1751
  return byteLength(compressionMarker(this.filterName, this.percentSaved));
1754
1752
  }
1755
1753
  /**
1756
- * Net savings after subtracting the marker's own byte cost — the true
1757
- * benefit of shipping the rewrite instead of the untouched original.
1754
+ * Net savings after subtracting the marker's own byte cost — the true benefit of shipping the rewrite instead of the untouched original.
1758
1755
  */
1759
1756
  get netSavingsBytes() {
1760
1757
  return this.bytesSaved - this.markerBytes;
1761
1758
  }
1762
1759
  /**
1763
- * Single definition of "is this rewrite worth shipping". `minNetSavingsBytes`
1764
- * is the configured floor (`bash_compress.min_net_savings_bytes`) below
1765
- * which a rewrite is considered too trivial to justify destabilising the
1766
- * bytes (breaks provider prefix caching) for — every consumer that chooses
1767
- * between the compressed body and the original output must go through this,
1768
- * not re-derive its own `bytesSaved > 0` check.
1760
+ * Single definition of "is this rewrite worth shipping". `minNetSavingsBytes` is the configured floor (`bash_compress.min_net_savings_bytes`) below which a rewrite is considered too trivial to justify destabilising the bytes (breaks provider prefix caching) for — every consumer that chooses between the compressed body and the original output must go through this, not re-derive its own `bytesSaved > 0` check.
1769
1761
  */
1770
1762
  worthApplying(minNetSavingsBytes) {
1771
1763
  return isRewriteWorthwhile({
@@ -1776,10 +1768,7 @@ var CompressedOutput = class {
1776
1768
  });
1777
1769
  }
1778
1770
  /**
1779
- * `text` with the trailing compression-summary marker appended. Skipped
1780
- * entirely when the rewrite doesn't clear `minNetSavingsBytes` (default 0,
1781
- * i.e. the marker must at least pay for itself) so raw output never carries
1782
- * a marker for a trivial or net-negative rewrite.
1771
+ * `text` with the trailing compression-summary marker appended. Skipped entirely when the rewrite doesn't clear `minNetSavingsBytes` (default 0, i.e. the marker must at least pay for itself) so raw output never carries a marker for a trivial or net-negative rewrite.
1783
1772
  */
1784
1773
  withMarker(minNetSavingsBytes = 0) {
1785
1774
  if (!this.worthApplying(minNetSavingsBytes)) return this.text;
@@ -1794,10 +1783,7 @@ var ToolFilter = class {
1794
1783
  /** When true, pass raw error output through on non-zero exit. */
1795
1784
  errorPassthrough = false;
1796
1785
  /**
1797
- * Return true when this filter should run for `argv`. Checks `binaries`
1798
- * against the lowercased stem (and full name, for dot-in-name binaries like
1799
- * `py.test`) of `argv[0]`; when `subcommands` is non-empty, requires one in
1800
- * the first three positional args.
1786
+ * Return true when this filter should run for `argv`. Checks `binaries` against the lowercased stem (and full name, for dot-in-name binaries like `py.test`) of `argv[0]`; when `subcommands` is non-empty, requires one in the first three positional args.
1801
1787
  */
1802
1788
  matches(argv) {
1803
1789
  if (argv.length === 0) return false;
@@ -1821,18 +1807,13 @@ var ToolFilter = class {
1821
1807
  return squeezeBlankLines(kept.join("\n"));
1822
1808
  }
1823
1809
  /**
1824
- * Hook applied to each stream right after {@link normalise}. Identity by
1825
- * default; the git filter family overrides it to strip CRLF warnings. Keeps
1826
- * `apply` free of per-family name checks.
1810
+ * Hook applied to each stream right after {@link normalise}. Identity by default; the git filter family overrides it to strip CRLF warnings. Keeps `apply` free of per-family name checks.
1827
1811
  */
1828
1812
  postNormalise(text) {
1829
1813
  return text;
1830
1814
  }
1831
1815
  /**
1832
- * Template: when {@link errorPassthrough} is set, return the raw combined
1833
- * error output on non-zero exit before delegating to {@link compressBody}.
1834
- * Filters that handle errors structurally (pytest, cargo) override this
1835
- * directly and leave `errorPassthrough` false.
1816
+ * Template: when {@link errorPassthrough} is set, return the raw combined error output on non-zero exit before delegating to {@link compressBody}. Filters that handle errors structurally (pytest, cargo) override this directly and leave `errorPassthrough` false.
1836
1817
  */
1837
1818
  compress(stdout, stderr, exitCode, argv, ctx = {}) {
1838
1819
  if (this.errorPassthrough) {
@@ -1842,9 +1823,7 @@ var ToolFilter = class {
1842
1823
  return this.compressBody(stdout, stderr, exitCode, argv, ctx);
1843
1824
  }
1844
1825
  /**
1845
- * Inner compression logic, called after the error-passthrough guard.
1846
- * Default is a passthrough that joins the two streams — useful when the only
1847
- * compression is the ANSI / progress strip `apply` already performed.
1826
+ * Inner compression logic, called after the error-passthrough guard. Default is a passthrough that joins the two streams — useful when the only compression is the ANSI / progress strip `apply` already performed.
1848
1827
  */
1849
1828
  compressBody(stdout, stderr, _exitCode, _argv, _ctx = {}) {
1850
1829
  if (stderr && stdout) return `${stdout.replace(/\s+$/, "")}
@@ -1853,10 +1832,7 @@ ${stderr.replace(/\s+$/, "")}`;
1853
1832
  return stdout || stderr;
1854
1833
  }
1855
1834
  /**
1856
- * Top-level entry: sanitise → input cap → normalise → compress → line/byte
1857
- * cap → wrap in {@link CompressedOutput}. Faithful port of the Python
1858
- * `apply` 10-step pipeline. Errors from {@link compress} fall back to a
1859
- * truncated view so the agent always sees something.
1835
+ * Top-level entry: sanitise → input cap → normalise → compress → line/byte cap → wrap in {@link CompressedOutput}. Faithful port of the Python `apply` 10-step pipeline. Errors from {@link compress} fall back to a truncated view so the agent always sees something.
1860
1836
  */
1861
1837
  apply(stdout, stderr, exitCode, argv, opts = {}) {
1862
1838
  const maxLines = opts.maxLines ?? DEFAULT_MAX_LINES;
@@ -1907,7 +1883,7 @@ ${stderr.replace(/\s+$/, "")}`;
1907
1883
  const normBytes = byteLength(normOut) + byteLength(normErr);
1908
1884
  if (preNormBytes > 0 && normBytes <= preNormBytes * 0.6) {
1909
1885
  body = compressBashOutput(normOut, normErr);
1910
- notes.push("early-exit: normalisation alone sufficient");
1886
+ notes.push(EARLY_EXIT_NOTE);
1911
1887
  } else if (normBytes > MAX_INSPECT_BYTES) {
1912
1888
  notes.push(`input exceeded inspect budget (${Math.floor(MAX_INSPECT_BYTES / 1024)} KiB); fell back to truncation`);
1913
1889
  body = fallbackTruncate(normOut, normErr, maxLines);
@@ -1929,7 +1905,8 @@ ${stderr.replace(/\s+$/, "")}`;
1929
1905
  body = redacted.text;
1930
1906
  redactedCount += redacted.count;
1931
1907
  if (redactedCount > 0) notes.push(`redacted ${redactedCount} secret-shaped value(s)`);
1932
- if (notes.length) body = `[${notes.join("; ")}]
1908
+ const shown = notes.filter((n) => n !== EARLY_EXIT_NOTE);
1909
+ if (shown.length) body = `[${shown.join("; ")}]
1933
1910
  ${body}`;
1934
1911
  return new CompressedOutput(body, originalBytes, byteLength(body), this.name, exitCode, notes);
1935
1912
  }
@@ -5,7 +5,7 @@ import {
5
5
  } from "./token-goat-chunk-3BTK54F3.mjs";
6
6
  import {
7
7
  filtersFilteredToEmptyNotice
8
- } from "./token-goat-chunk-3H6FQT62.mjs";
8
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
9
9
  import {
10
10
  displaySafeText
11
11
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -10,7 +10,7 @@ import {
10
10
  stripMultilineStringSpan,
11
11
  stripNestedBlockCommentSpan,
12
12
  stripStringLiterals
13
- } from "./token-goat-chunk-R3X5TCPB.mjs";
13
+ } from "./token-goat-chunk-L7VCX33I.mjs";
14
14
  import {
15
15
  init_define_import_meta_env
16
16
  } from "./token-goat-chunk-A37V4PBF.mjs";
@@ -5,11 +5,11 @@ import {
5
5
  isSupportedOcrLang,
6
6
  loadConfig,
7
7
  resolveOcrLangs
8
- } from "./token-goat-chunk-H3DXI6VD.mjs";
8
+ } from "./token-goat-chunk-CA6V36KW.mjs";
9
9
  import {
10
10
  ensureDirSync,
11
11
  tokenGoatHome
12
- } from "./token-goat-chunk-3H6FQT62.mjs";
12
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
13
13
  import {
14
14
  fenceUntrustedOcrText
15
15
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -5,11 +5,11 @@ import {
5
5
  docxTables,
6
6
  docxText,
7
7
  formatDocxTables
8
- } from "./token-goat-chunk-NQZCSVN2.mjs";
9
- import "./token-goat-chunk-MA5BZ2KI.mjs";
8
+ } from "./token-goat-chunk-UENEL6KX.mjs";
9
+ import "./token-goat-chunk-7VLWNQDQ.mjs";
10
10
  import "./token-goat-chunk-XTQAOTSO.mjs";
11
11
  import "./token-goat-chunk-AH6QILZM.mjs";
12
- import "./token-goat-chunk-3H6FQT62.mjs";
12
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
13
13
  import "./token-goat-chunk-ERTXEKB6.mjs";
14
14
  import "./token-goat-chunk-Y4AFKTHK.mjs";
15
15
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -2,11 +2,11 @@ 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-R3X5TCPB.mjs";
5
+ } from "./token-goat-chunk-L7VCX33I.mjs";
6
6
  import {
7
7
  getHarnessName,
8
8
  loadConfig
9
- } from "./token-goat-chunk-H3DXI6VD.mjs";
9
+ } from "./token-goat-chunk-CA6V36KW.mjs";
10
10
  import {
11
11
  registerReset
12
12
  } from "./token-goat-chunk-EEIDFMEM.mjs";
@@ -19,7 +19,7 @@ import {
19
19
  ensureDirSync,
20
20
  sanitizeIdForFilename,
21
21
  tokenGoatHome
22
- } from "./token-goat-chunk-3H6FQT62.mjs";
22
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
23
23
  import {
24
24
  displaySafeText
25
25
  } from "./token-goat-chunk-ERTXEKB6.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-R3X5TCPB.mjs";
5
+ } from "./token-goat-chunk-L7VCX33I.mjs";
6
6
  import {
7
7
  foldPath,
8
8
  globalDbPath,
9
9
  isCaseInsensitiveFs
10
- } from "./token-goat-chunk-3H6FQT62.mjs";
10
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
11
11
  import {
12
12
  normalizePath
13
13
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -2,11 +2,11 @@ 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-H3DXI6VD.mjs";
5
+ } from "./token-goat-chunk-CA6V36KW.mjs";
6
6
  import "./token-goat-chunk-EEIDFMEM.mjs";
7
7
  import {
8
8
  VERSION
9
- } from "./token-goat-chunk-3H6FQT62.mjs";
9
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
10
10
  import {
11
11
  displaySafeJson
12
12
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -15,7 +15,7 @@ import {
15
15
  foldCase,
16
16
  foldPath,
17
17
  sleepSync
18
- } from "./token-goat-chunk-3H6FQT62.mjs";
18
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
19
19
  import {
20
20
  safeJoin
21
21
  } from "./token-goat-chunk-ERTXEKB6.mjs";
@@ -3,7 +3,7 @@ const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  queryCsv,
5
5
  quoteCsvCell
6
- } from "./token-goat-chunk-GIMGT34T.mjs";
6
+ } from "./token-goat-chunk-EPXNOKIV.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-MA5BZ2KI.mjs";
15
+ } from "./token-goat-chunk-7VLWNQDQ.mjs";
16
16
  import {
17
17
  displaySafeText
18
18
  } from "./token-goat-chunk-ERTXEKB6.mjs";