token-goat 2.9.17 → 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.
- package/dist/{token-goat-chunk-7EGKXBWT.mjs → token-goat-chunk-2KTZ6J7T.mjs} +7 -7
- package/dist/{token-goat-chunk-CKIJWTRQ.mjs → token-goat-chunk-34OUJ2IE.mjs} +11 -11
- package/dist/{token-goat-chunk-2XA5ZW4T.mjs → token-goat-chunk-52IMXJ2L.mjs} +3 -3
- package/dist/{token-goat-chunk-GPCCYQSS.mjs → token-goat-chunk-5MMJAJF3.mjs} +6 -6
- package/dist/{token-goat-chunk-YFGEUIEO.mjs → token-goat-chunk-6LGVCCMY.mjs} +12 -12
- package/dist/{token-goat-chunk-66224KCZ.mjs → token-goat-chunk-7VLWNQDQ.mjs} +1 -1
- package/dist/{token-goat-chunk-W2GUUQAQ.mjs → token-goat-chunk-ARNRFR6M.mjs} +1 -1
- package/dist/{token-goat-chunk-PKNOHVWP.mjs → token-goat-chunk-BFEWOMA3.mjs} +11 -9
- package/dist/{token-goat-chunk-G75WIVFM.mjs → token-goat-chunk-BWCRC23L.mjs} +18 -18
- package/dist/{token-goat-chunk-2VASS5VR.mjs → token-goat-chunk-CA6V36KW.mjs} +1 -1
- package/dist/{token-goat-chunk-C26ZBGBC.mjs → token-goat-chunk-CTOYJ232.mjs} +18 -41
- package/dist/{token-goat-chunk-KZPO4DWC.mjs → token-goat-chunk-EPXNOKIV.mjs} +1 -1
- package/dist/{token-goat-chunk-SWRKVA3J.mjs → token-goat-chunk-GRI6HWX3.mjs} +1 -1
- package/dist/{token-goat-chunk-CICJFVIH.mjs → token-goat-chunk-H3FONFBO.mjs} +2 -2
- package/dist/{token-goat-chunk-EKGVCAES.mjs → token-goat-chunk-HIZXQVNU.mjs} +3 -3
- package/dist/{token-goat-chunk-26YUO7MP.mjs → token-goat-chunk-HPOFR6QX.mjs} +3 -3
- package/dist/{token-goat-chunk-BK3RPPTK.mjs → token-goat-chunk-I67CPTDD.mjs} +2 -2
- package/dist/{token-goat-chunk-RB24DBBS.mjs → token-goat-chunk-K4DG6EEF.mjs} +2 -2
- package/dist/{token-goat-chunk-MWSVUKVV.mjs → token-goat-chunk-L7VCX33I.mjs} +1 -1
- package/dist/{token-goat-chunk-THBLW56G.mjs → token-goat-chunk-LA3O4JGD.mjs} +2 -2
- package/dist/{token-goat-chunk-7VQMOBPQ.mjs → token-goat-chunk-LTYWLKAG.mjs} +50 -31
- package/dist/{token-goat-chunk-RFFUCQK7.mjs → token-goat-chunk-OWSJJY5R.mjs} +4 -4
- package/dist/{token-goat-chunk-UBZCON6N.mjs → token-goat-chunk-QIDLJGXZ.mjs} +1 -1
- package/dist/{token-goat-chunk-IDHWKNKZ.mjs → token-goat-chunk-QML7ITHJ.mjs} +10 -10
- package/dist/{token-goat-chunk-GLOM5W5C.mjs → token-goat-chunk-RHHFEXKF.mjs} +1 -1
- package/dist/{token-goat-chunk-CPHVXKNU.mjs → token-goat-chunk-UENEL6KX.mjs} +1 -1
- package/dist/{token-goat-chunk-HRUGS6CO.mjs → token-goat-chunk-V3ZWBEHM.mjs} +8 -8
- package/dist/{token-goat-chunk-73GXYYZR.mjs → token-goat-chunk-W3E65QOW.mjs} +8 -8
- package/dist/{token-goat-chunk-2M33Q3O4.mjs → token-goat-chunk-WFX2V3OF.mjs} +39 -32
- package/dist/{token-goat-chunk-5WB7GDH4.mjs → token-goat-chunk-YQZE5NS6.mjs} +5 -5
- package/dist/token-goat-hook.mjs +11 -11
- package/dist/token-goat.core.mjs +18 -18
- package/docs/cli.md +2 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ const require = __cjsRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
deliveredOutputBytes,
|
|
5
5
|
wrappedShell
|
|
6
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
17
|
+
} from "./token-goat-chunk-CTOYJ232.mjs";
|
|
18
18
|
import {
|
|
19
19
|
recordStat
|
|
20
|
-
} from "./token-goat-chunk-
|
|
21
|
-
import "./token-goat-chunk-
|
|
22
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
8
|
-
import "./token-goat-chunk-
|
|
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-
|
|
13
|
-
import "./token-goat-chunk-
|
|
14
|
-
import "./token-goat-chunk-
|
|
15
|
-
import "./token-goat-chunk-
|
|
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-
|
|
18
|
-
import "./token-goat-chunk-
|
|
19
|
-
import "./token-goat-chunk-
|
|
20
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
10
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
28
|
+
} from "./token-goat-chunk-GRI6HWX3.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extractShellBannerHeading
|
|
31
|
-
} from "./token-goat-chunk-
|
|
32
|
-
import "./token-goat-chunk-
|
|
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-
|
|
62
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
29
|
-
import "./token-goat-chunk-
|
|
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-
|
|
40
|
-
import "./token-goat-chunk-
|
|
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-
|
|
44
|
+
} from "./token-goat-chunk-HPOFR6QX.mjs";
|
|
45
45
|
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
46
|
-
import "./token-goat-chunk-
|
|
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-
|
|
50
|
+
import "./token-goat-chunk-GRI6HWX3.mjs";
|
|
51
51
|
import {
|
|
52
52
|
checkEmbeddingPreflight,
|
|
53
53
|
embeddingsDepsAvailable
|
|
54
|
-
} from "./token-goat-chunk-
|
|
55
|
-
import "./token-goat-chunk-
|
|
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-
|
|
58
|
+
} from "./token-goat-chunk-L7VCX33I.mjs";
|
|
59
59
|
import {
|
|
60
60
|
envStrList,
|
|
61
61
|
loadConfig,
|
|
62
62
|
resolveProjectRoot
|
|
63
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
73
|
+
} from "./token-goat-chunk-QIDLJGXZ.mjs";
|
|
74
74
|
import {
|
|
75
75
|
displaySafeJson,
|
|
76
76
|
normalizePath
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveMinNetSavingsBytes,
|
|
11
11
|
storeBashOutputSync,
|
|
12
12
|
stripAnsiCodes
|
|
13
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
74
|
-
import "./token-goat-chunk-
|
|
75
|
-
import "./token-goat-chunk-
|
|
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-
|
|
81
|
-
import "./token-goat-chunk-
|
|
82
|
-
import "./token-goat-chunk-
|
|
83
|
-
import "./token-goat-chunk-
|
|
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-
|
|
86
|
-
import "./token-goat-chunk-
|
|
87
|
-
import "./token-goat-chunk-
|
|
88
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
94
|
-
import "./token-goat-chunk-
|
|
95
|
-
import "./token-goat-chunk-
|
|
96
|
-
import "./token-goat-chunk-
|
|
97
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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";
|
|
@@ -9,24 +9,24 @@ import {
|
|
|
9
9
|
savedTokensFromBytes,
|
|
10
10
|
storeBlob,
|
|
11
11
|
stripAnsiEscapes
|
|
12
|
-
} from "./token-goat-chunk-
|
|
12
|
+
} from "./token-goat-chunk-HPOFR6QX.mjs";
|
|
13
13
|
import {
|
|
14
14
|
sanitizeFtsQuery
|
|
15
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-I67CPTDD.mjs";
|
|
16
16
|
import {
|
|
17
17
|
getDb
|
|
18
|
-
} from "./token-goat-chunk-
|
|
18
|
+
} from "./token-goat-chunk-L7VCX33I.mjs";
|
|
19
19
|
import {
|
|
20
20
|
loadConfig,
|
|
21
21
|
shortFingerprint
|
|
22
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
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(
|
|
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
|
-
|
|
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
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
stripMultilineStringSpan,
|
|
11
11
|
stripNestedBlockCommentSpan,
|
|
12
12
|
stripStringLiterals
|
|
13
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
8
|
+
} from "./token-goat-chunk-CA6V36KW.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ensureDirSync,
|
|
11
11
|
tokenGoatHome
|
|
12
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
9
|
-
import "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
5
|
+
} from "./token-goat-chunk-L7VCX33I.mjs";
|
|
6
6
|
import {
|
|
7
7
|
getHarnessName,
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
5
|
+
} from "./token-goat-chunk-L7VCX33I.mjs";
|
|
6
6
|
import {
|
|
7
7
|
foldPath,
|
|
8
8
|
globalDbPath,
|
|
9
9
|
isCaseInsensitiveFs
|
|
10
|
-
} from "./token-goat-chunk-
|
|
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-
|
|
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-
|
|
9
|
+
} from "./token-goat-chunk-QIDLJGXZ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
displaySafeJson
|
|
12
12
|
} 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-
|
|
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-
|
|
15
|
+
} from "./token-goat-chunk-7VLWNQDQ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
displaySafeText
|
|
18
18
|
} from "./token-goat-chunk-ERTXEKB6.mjs";
|