token-goat 2.9.26 → 2.9.29
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/README.md +30 -88
- package/SECURITY.md +14 -0
- package/dist/{token-goat-chunk-OZRSREKR.mjs → token-goat-chunk-2AWQ2R5X.mjs} +2 -2
- package/dist/{token-goat-chunk-BH4ZVRB2.mjs → token-goat-chunk-2NNUA2LR.mjs} +4 -4
- package/dist/token-goat-chunk-2WOUYWLM.mjs +955 -0
- package/dist/{token-goat-chunk-IKZLSRII.mjs → token-goat-chunk-435UQTKD.mjs} +5 -3
- package/dist/{token-goat-chunk-62IHOU6L.mjs → token-goat-chunk-44BM7DDQ.mjs} +5 -3
- package/dist/token-goat-chunk-52NSDWYY.mjs +96 -0
- package/dist/{token-goat-chunk-CXBOFPF4.mjs → token-goat-chunk-67BNIKKO.mjs} +32 -18
- package/dist/{token-goat-chunk-XBESNWEX.mjs → token-goat-chunk-6AK46ZT7.mjs} +2 -3
- package/dist/{token-goat-chunk-7SXPJOSZ.mjs → token-goat-chunk-7CPMDFGB.mjs} +166 -40
- package/dist/token-goat-chunk-ASLWOQ3I.mjs +14 -0
- package/dist/{token-goat-chunk-MWID3YOY.mjs → token-goat-chunk-BGYOZ6DO.mjs} +6 -4
- package/dist/{token-goat-chunk-PAV6NNY7.mjs → token-goat-chunk-C5YPNZKQ.mjs} +22 -8
- package/dist/{token-goat-chunk-D2X7XN5M.mjs → token-goat-chunk-CIQ2FTY3.mjs} +23 -242
- package/dist/token-goat-chunk-D4ETHJD6.mjs +246 -0
- package/dist/{token-goat-chunk-7Y6GWTII.mjs → token-goat-chunk-DNRPXHYH.mjs} +25 -17
- package/dist/{token-goat-chunk-L43RKNHA.mjs → token-goat-chunk-DNSPXQXQ.mjs} +2 -2
- package/dist/token-goat-chunk-DPNLUJWB.mjs +220 -0
- package/dist/token-goat-chunk-E4ZOJIZK.mjs +1382 -0
- package/dist/token-goat-chunk-E5TK5DNO.mjs +718 -0
- package/dist/{token-goat-chunk-VVROQBQJ.mjs → token-goat-chunk-EUSDXRXU.mjs} +62 -12
- package/dist/{token-goat-chunk-POOI26O6.mjs → token-goat-chunk-FTP4U4QA.mjs} +12 -8
- package/dist/token-goat-chunk-G23DWHV4.mjs +142 -0
- package/dist/{token-goat-chunk-MDV5VWF4.mjs → token-goat-chunk-G7IWXCFF.mjs} +223 -15
- package/dist/{token-goat-chunk-C2PG4K5D.mjs → token-goat-chunk-GLXRTTLE.mjs} +7 -5
- package/dist/{token-goat-chunk-M6CVNHTW.mjs → token-goat-chunk-H5J3C56Q.mjs} +95 -573
- package/dist/{token-goat-chunk-BAWKGODL.mjs → token-goat-chunk-HNFZZHFW.mjs} +2 -2
- package/dist/{token-goat-chunk-TG5ZPD6B.mjs → token-goat-chunk-HUYUHODZ.mjs} +1036 -759
- package/dist/token-goat-chunk-IVE6U7KV.mjs +53 -0
- package/dist/{token-goat-chunk-ZZT6PVB3.mjs → token-goat-chunk-IVWI2OCK.mjs} +72 -45
- package/dist/{token-goat-chunk-GMOUBOX4.mjs → token-goat-chunk-JTKCQMQA.mjs} +37 -5
- package/dist/{token-goat-chunk-H2CPLEMP.mjs → token-goat-chunk-KOPIR3KZ.mjs} +46 -23
- package/dist/token-goat-chunk-L7H3U27L.mjs +35 -0
- package/dist/{token-goat-chunk-FLEYOCAS.mjs → token-goat-chunk-LZNBQTDK.mjs} +6 -4
- package/dist/token-goat-chunk-MELOKFDJ.mjs +199 -0
- package/dist/{token-goat-chunk-RH27ZSPF.mjs → token-goat-chunk-NMBWLRHW.mjs} +164 -50
- package/dist/{token-goat-chunk-43JFN26X.mjs → token-goat-chunk-O6I2XU4P.mjs} +27 -967
- package/dist/{token-goat-chunk-G6EYO5CD.mjs → token-goat-chunk-ONXH6NZ5.mjs} +2 -87
- package/dist/token-goat-chunk-ORNFMIER.mjs +295 -0
- package/dist/{token-goat-chunk-LHUP4DXZ.mjs → token-goat-chunk-PGTH2U4C.mjs} +1 -1
- package/dist/{token-goat-chunk-5BQ7W7D7.mjs → token-goat-chunk-PKRWMHVP.mjs} +76 -59
- package/dist/{token-goat-chunk-DA43OE7L.mjs → token-goat-chunk-PQ53BSCF.mjs} +1 -1
- package/dist/{token-goat-chunk-STYRLQIW.mjs → token-goat-chunk-PYSUADX4.mjs} +2 -2
- package/dist/{token-goat-chunk-JALB3KWJ.mjs → token-goat-chunk-QO3LXVVR.mjs} +4247 -5005
- package/dist/{token-goat-chunk-L45IWWMC.mjs → token-goat-chunk-RLP6J7WR.mjs} +6 -6
- package/dist/token-goat-chunk-RQGGMPCR.mjs +205 -0
- package/dist/{token-goat-chunk-MBDJR6HU.mjs → token-goat-chunk-RTMVLHWX.mjs} +3708 -4003
- package/dist/{token-goat-chunk-E3K3BTEQ.mjs → token-goat-chunk-S4VSXURL.mjs} +8 -6
- package/dist/{token-goat-chunk-LKSXAMJB.mjs → token-goat-chunk-SE6E4BKJ.mjs} +1 -1
- package/dist/token-goat-chunk-TCQANXYC.mjs +351 -0
- package/dist/token-goat-chunk-TDUT2CL6.mjs +564 -0
- package/dist/{token-goat-chunk-LRIZ7K3F.mjs → token-goat-chunk-TGOXNAHW.mjs} +54 -111
- package/dist/{token-goat-chunk-WNBSCSAI.mjs → token-goat-chunk-UA5BKWWQ.mjs} +1 -1
- package/dist/{token-goat-chunk-RIB6XY2V.mjs → token-goat-chunk-UXSXQQIY.mjs} +1 -1
- package/dist/{token-goat-chunk-7EPYB34H.mjs → token-goat-chunk-VMFWNHGR.mjs} +84 -73
- package/dist/token-goat-chunk-VQ6F6T7X.mjs +36 -0
- package/dist/{token-goat-chunk-5M3NRJD2.mjs → token-goat-chunk-VZQEWRVH.mjs} +6 -4
- package/dist/{token-goat-chunk-OSUFN2FV.mjs → token-goat-chunk-XB5KKOCG.mjs} +5 -25
- package/dist/{token-goat-chunk-6E2IDLHF.mjs → token-goat-chunk-XYWPOSCN.mjs} +57 -615
- package/dist/{token-goat-chunk-CQHY4SL7.mjs → token-goat-chunk-YAGLESS3.mjs} +8 -5
- package/dist/token-goat-chunk-YKSRAWUU.mjs +33 -0
- package/dist/{token-goat-chunk-F2ARFHLJ.mjs → token-goat-chunk-YOOVFPTP.mjs} +2 -2
- package/dist/{token-goat-chunk-EEIDFMEM.mjs → token-goat-chunk-YZAAZU2S.mjs} +12 -3
- package/dist/token-goat-chunk-Z6KBMOBI.mjs +53 -0
- package/dist/{token-goat-chunk-4GEDH2WU.mjs → token-goat-chunk-ZER6EAXZ.mjs} +81 -70
- package/dist/token-goat-hook-client.cjs +475 -0
- package/dist/token-goat-hook-client.mjs +26 -0
- package/dist/token-goat-hook.mjs +31 -21
- package/dist/token-goat.core.mjs +9 -39
- package/docs/C4_RUNTIME_ARCHITECTURE.md +2 -2
- package/docs/cli.md +35 -23
- package/docs/install.md +18 -14
- package/package.json +1 -1
- package/dist/token-goat-chunk-ADMR3QVF.mjs +0 -41
- package/dist/token-goat-chunk-E6B2UFDF.mjs +0 -30
- package/dist/token-goat-chunk-GKZ2US5B.mjs +0 -187
- package/dist/token-goat-chunk-MZTO4FXH.mjs +0 -26
|
@@ -2,21 +2,33 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
registerReset
|
|
5
|
-
} from "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-YZAAZU2S.mjs";
|
|
6
|
+
import {
|
|
7
|
+
FALSY_ENV_VALUES,
|
|
8
|
+
TRUTHY_ENV_VALUES,
|
|
9
|
+
envBool,
|
|
10
|
+
envInt,
|
|
11
|
+
envStr,
|
|
12
|
+
envStrList
|
|
13
|
+
} from "./token-goat-chunk-IVE6U7KV.mjs";
|
|
6
14
|
import {
|
|
7
|
-
ENV_KEYS,
|
|
8
15
|
atomicWriteText,
|
|
9
|
-
canonicalize,
|
|
10
|
-
configPath,
|
|
11
16
|
decodeSource,
|
|
12
17
|
extractErrorMessage,
|
|
13
|
-
foldPath,
|
|
14
|
-
projectConfigPath,
|
|
15
18
|
runGit
|
|
16
|
-
} from "./token-goat-chunk-
|
|
19
|
+
} from "./token-goat-chunk-XYWPOSCN.mjs";
|
|
20
|
+
import {
|
|
21
|
+
canonicalize,
|
|
22
|
+
foldPath
|
|
23
|
+
} from "./token-goat-chunk-TCQANXYC.mjs";
|
|
17
24
|
import {
|
|
18
25
|
normalizeDarwinSystemAlias
|
|
19
26
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
27
|
+
import {
|
|
28
|
+
ENV_KEYS,
|
|
29
|
+
configPath,
|
|
30
|
+
projectConfigPath
|
|
31
|
+
} from "./token-goat-chunk-MELOKFDJ.mjs";
|
|
20
32
|
import {
|
|
21
33
|
init_define_import_meta_env
|
|
22
34
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -39,6 +51,13 @@ var KNOWN_HARNESS_NAMES = /* @__PURE__ */ new Set([
|
|
|
39
51
|
"visualstudio",
|
|
40
52
|
"generic"
|
|
41
53
|
]);
|
|
54
|
+
var relaySeededSessionIdValue;
|
|
55
|
+
function setRelaySeededSessionId(id) {
|
|
56
|
+
relaySeededSessionIdValue = id;
|
|
57
|
+
}
|
|
58
|
+
function relaySeededSessionId() {
|
|
59
|
+
return relaySeededSessionIdValue;
|
|
60
|
+
}
|
|
42
61
|
function detectHarness() {
|
|
43
62
|
const env = process.env;
|
|
44
63
|
const override = (env[ENV_KEYS.HARNESS_OVERRIDE] ?? "").toLowerCase().trim();
|
|
@@ -48,7 +67,7 @@ function detectHarness() {
|
|
|
48
67
|
if (env["HERMES_SESSION_ID"] || env["HERMES_HOME"]) {
|
|
49
68
|
return "hermes";
|
|
50
69
|
}
|
|
51
|
-
if (env["TERM_PROGRAM"] === "claude-code" || env["CLAUDE_CODE_VERSION"] !== void 0 || env["CLAUDE_CODE_SESSION_ID"]) {
|
|
70
|
+
if (env["TERM_PROGRAM"] === "claude-code" || env["CLAUDE_CODE_VERSION"] !== void 0 || env["CLAUDE_CODE_SESSION_ID"] && env["CLAUDE_CODE_SESSION_ID"] !== relaySeededSessionIdValue) {
|
|
52
71
|
return "claudecode";
|
|
53
72
|
}
|
|
54
73
|
if (env["CODEX_SESSION_ID"] !== void 0 || env["CODEX_SESSION"]) {
|
|
@@ -84,46 +103,7 @@ function getHarnessName() {
|
|
|
84
103
|
function resetHarnessCache() {
|
|
85
104
|
_cached = null;
|
|
86
105
|
}
|
|
87
|
-
registerReset(resetHarnessCache);
|
|
88
|
-
|
|
89
|
-
// src/env.ts
|
|
90
|
-
init_define_import_meta_env();
|
|
91
|
-
var FALSY_ENV_VALUES = /* @__PURE__ */ new Set(["0", "false", "no", "off"]);
|
|
92
|
-
var TRUTHY_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
|
|
93
|
-
function envStr(key, defaultVal) {
|
|
94
|
-
const raw = process.env[key];
|
|
95
|
-
if (raw === void 0) return defaultVal;
|
|
96
|
-
const trimmed = raw.trim();
|
|
97
|
-
return trimmed === "" ? defaultVal : trimmed;
|
|
98
|
-
}
|
|
99
|
-
function envBool(key, defaultVal) {
|
|
100
|
-
const raw = process.env[key];
|
|
101
|
-
if (raw === void 0) return defaultVal;
|
|
102
|
-
const norm = raw.trim().toLowerCase();
|
|
103
|
-
if (norm === "") return defaultVal;
|
|
104
|
-
if (TRUTHY_ENV_VALUES.has(norm)) return true;
|
|
105
|
-
if (FALSY_ENV_VALUES.has(norm)) return false;
|
|
106
|
-
return defaultVal;
|
|
107
|
-
}
|
|
108
|
-
function envInt(key, defaultVal, min, max) {
|
|
109
|
-
const raw = process.env[key];
|
|
110
|
-
if (raw === void 0) return defaultVal;
|
|
111
|
-
const norm = raw.trim();
|
|
112
|
-
if (norm === "") return defaultVal;
|
|
113
|
-
if (!/^[+-]?\d+$/.test(norm)) return defaultVal;
|
|
114
|
-
const val = parseInt(norm, 10);
|
|
115
|
-
if (!Number.isFinite(val)) return defaultVal;
|
|
116
|
-
let clamped = val;
|
|
117
|
-
if (min !== void 0) clamped = Math.max(min, clamped);
|
|
118
|
-
if (max !== void 0) clamped = Math.min(max, clamped);
|
|
119
|
-
return clamped;
|
|
120
|
-
}
|
|
121
|
-
function envStrList(key, defaultVal, delimiter2) {
|
|
122
|
-
const raw = process.env[key];
|
|
123
|
-
if (raw === void 0) return defaultVal;
|
|
124
|
-
const entries = raw.split(delimiter2).map((s) => s.trim()).filter((s) => s !== "");
|
|
125
|
-
return entries.length > 0 ? entries : defaultVal;
|
|
126
|
-
}
|
|
106
|
+
registerReset(resetHarnessCache, { perRequest: true });
|
|
127
107
|
|
|
128
108
|
// src/fingerprint.ts
|
|
129
109
|
init_define_import_meta_env();
|
|
@@ -328,7 +308,7 @@ function getDisplayRoot(explicitRoot) {
|
|
|
328
308
|
}
|
|
329
309
|
registerReset(() => {
|
|
330
310
|
_displayRootCache = null;
|
|
331
|
-
});
|
|
311
|
+
}, { perRequest: true });
|
|
332
312
|
function isUnderSystemTemp(filePath) {
|
|
333
313
|
let sysTemp;
|
|
334
314
|
try {
|
|
@@ -1208,9 +1188,7 @@ var PROJECT_LOCKED_KEYS = [
|
|
|
1208
1188
|
// The same blast radius as the indexing keys above, applied to retrieval rather than to what gets indexed: `semantic` drops a dense hit whose distance exceeds this, so a checked-in `.token-goat.toml` setting it near the floor removes this repository's own code from the vector half of every search a reviewing agent runs, and the command then answers "no matches" in the words it uses for a name that genuinely is not there. The keyword pass would still answer, which makes it worse rather than better -- the result looks like a working search. The user's own global config still sets it freely; only the project-supplied layer is refused.
|
|
1209
1189
|
"semantic.max_distance",
|
|
1210
1190
|
"worker.blocked_roots",
|
|
1211
|
-
// global.db is a machine-wide shared database across every project on the host. A checked-in
|
|
1212
|
-
// per-project .token-goat.toml must not be able to lower the size warning threshold or trigger
|
|
1213
|
-
// auto-reclaim/purging of embeddings across other repositories sharing the same database.
|
|
1191
|
+
// global.db is a machine-wide shared database across every project on the host. A checked-in per-project .token-goat.toml must not be able to lower the size warning threshold or trigger auto-reclaim/purging of embeddings across other repositories sharing the same database.
|
|
1214
1192
|
"indexing.max_db_size_mb",
|
|
1215
1193
|
"indexing.auto_reclaim_embeddings"
|
|
1216
1194
|
];
|
|
@@ -1318,7 +1296,7 @@ function resolveConfigProjectRoot() {
|
|
|
1318
1296
|
}
|
|
1319
1297
|
registerReset(() => {
|
|
1320
1298
|
_projectRootCache = null;
|
|
1321
|
-
});
|
|
1299
|
+
}, { perRequest: true });
|
|
1322
1300
|
function getProjectConfigInfo(projectRoot) {
|
|
1323
1301
|
const root = projectRoot ?? resolveConfigProjectRoot();
|
|
1324
1302
|
const p = projectConfigPath(root);
|
|
@@ -1377,18 +1355,12 @@ var CONFIG_DEFAULTS = {
|
|
|
1377
1355
|
max_lines: 1e3,
|
|
1378
1356
|
max_bytes: 64 * 1024,
|
|
1379
1357
|
timeout_seconds: 600,
|
|
1380
|
-
// Matches the hardcoded MIN_CACHE_BYTES floor hooks_bash.ts used before this
|
|
1381
|
-
// knob was wired to a real consumer, so untouched-config installs see no
|
|
1382
|
-
// behavior change now that hooks_bash.ts reads this value instead.
|
|
1358
|
+
// Matches the hardcoded MIN_CACHE_BYTES floor hooks_bash.ts used before this knob was wired to a real consumer, so untouched-config installs see no behavior change now that hooks_bash.ts reads this value instead.
|
|
1383
1359
|
cache_min_bytes: 512,
|
|
1384
1360
|
cache_max_file_count: 4096,
|
|
1385
1361
|
cache_max_bytes: 16 * 1024 * 1024,
|
|
1386
1362
|
cache_max_bytes_per_output: 50 * 1024 * 1024,
|
|
1387
|
-
// Measured against the filter test-fixture corpus (424 apply() calls, 298 with
|
|
1388
|
-
// bytesSaved > 0): net-of-marker savings (bytesSaved - ~70-79B marker cost) is
|
|
1389
|
-
// <= 0 for 130/298 (44%) of "compressed" results and <= 100 for 170/298 (57%),
|
|
1390
|
-
// while the real-win half sits at p75=393B / p90=952B net. 100 kills the
|
|
1391
|
-
// marker-doesn't-even-pay-for-itself tier without touching genuine wins.
|
|
1363
|
+
// Measured against the filter test-fixture corpus (424 apply() calls, 298 with bytesSaved > 0): net-of-marker savings (bytesSaved - ~70-79B marker cost) is <= 0 for 130/298 (44%) of "compressed" results and <= 100 for 170/298 (57%), while the real-win half sits at p75=393B / p90=952B net. 100 kills the marker-doesn't-even-pay-for-itself tier without touching genuine wins.
|
|
1392
1364
|
min_net_savings_bytes: 100,
|
|
1393
1365
|
// Extends the per-file already-served elision (which only reaches cat/head/tail/sed/awk-shaped reads) to every other Bash command's output -- npm test, git, rg, build runs -- matched against a session-wide served-output list instead of a per-file one. On by default: it goes through the same isRewriteWorthwhile net-benefit gate as every other rewrite here, so it never ships a notice that costs more than the lines it withholds.
|
|
1394
1366
|
elide_served_shell_output: true
|
|
@@ -1432,20 +1404,10 @@ var CONFIG_DEFAULTS = {
|
|
|
1432
1404
|
max_image_pixels: 64e6,
|
|
1433
1405
|
screenshot_redirect: true,
|
|
1434
1406
|
ocr_enabled: true,
|
|
1435
|
-
// Confidence is Tesseract's own 0-100 mean-word-confidence score. 65 is a deliberately
|
|
1436
|
-
// conservative floor: a real screenshot of terminal/code/prose text routinely scores
|
|
1437
|
-
// 85+, while a photo with an incidental sign or logo in frame scores much lower and
|
|
1438
|
-
// noisier -- padding the threshold below the terminal/code norm still comfortably
|
|
1439
|
-
// excludes photographic false positives without needing a second heuristic.
|
|
1407
|
+
// Confidence is Tesseract's own 0-100 mean-word-confidence score. 65 is a deliberately conservative floor: a real screenshot of terminal/code/prose text routinely scores 85+, while a photo with an incidental sign or logo in frame scores much lower and noisier -- padding the threshold below the terminal/code norm still comfortably excludes photographic false positives without needing a second heuristic.
|
|
1440
1408
|
ocr_min_confidence: 65,
|
|
1441
1409
|
ocr_lang: DEFAULT_OCR_LANG,
|
|
1442
|
-
// Which resolution tier the model being shown the image is on, which decides what its pixels
|
|
1443
|
-
// cost. 'standard' (1568px long edge, 1568 visual tokens) is every model before Claude 4.7;
|
|
1444
|
-
// 'high' (2576px, 4784 tokens) is 4.7 and later, and bills the same large image up to roughly
|
|
1445
|
-
// three times higher. Only the saving *reported* by `token-goat stats` depends on this -- no
|
|
1446
|
-
// image is encoded differently -- and 'standard' is the default because it is the floor: it
|
|
1447
|
-
// caps the counterfactual at the smaller of the two bills and so can never credit a saving
|
|
1448
|
-
// that was not there. Set it to 'high' on a Claude 4.7+ model to see the larger real figure.
|
|
1410
|
+
// Which resolution tier the model being shown the image is on, which decides what its pixels cost. 'standard' (1568px long edge, 1568 visual tokens) is every model before Claude 4.7; 'high' (2576px, 4784 tokens) is 4.7 and later, and bills the same large image up to roughly three times higher. Only the saving *reported* by `token-goat stats` depends on this -- no image is encoded differently -- and 'standard' is the default because it is the floor: it caps the counterfactual at the smaller of the two bills and so can never credit a saving that was not there. Set it to 'high' on a Claude 4.7+ model to see the larger real figure.
|
|
1449
1411
|
vision_tier: "standard"
|
|
1450
1412
|
},
|
|
1451
1413
|
screenshot: {
|
|
@@ -1471,14 +1433,9 @@ var CONFIG_DEFAULTS = {
|
|
|
1471
1433
|
web_dedup_min_bytes: 200,
|
|
1472
1434
|
grep_dedup_min_matches: 5,
|
|
1473
1435
|
glob_dedup_min_matches: 5,
|
|
1474
|
-
// Existing on-disk file must have at least this many lines before a Write rewrite is even
|
|
1475
|
-
// considered -- rewriting a small file whole is fine, so hooks_write.ts's detector skips
|
|
1476
|
-
// comparison entirely below this floor rather than firing on trivial files.
|
|
1436
|
+
// Existing on-disk file must have at least this many lines before a Write rewrite is even considered -- rewriting a small file whole is fine, so hooks_write.ts's detector skips comparison entirely below this floor rather than firing on trivial files.
|
|
1477
1437
|
write_rewrite_min_lines: 40,
|
|
1478
|
-
// Minimum percentage of the existing file's lines that must survive unchanged (by LCS) in
|
|
1479
|
-
// the incoming Write content for hooks_write.ts to advise Edit instead. High by design: this
|
|
1480
|
-
// is only meant to catch the "mostly untouched, a few lines changed" case, not a genuine
|
|
1481
|
-
// rewrite that happens to share some boilerplate.
|
|
1438
|
+
// Minimum percentage of the existing file's lines that must survive unchanged (by LCS) in the incoming Write content for hooks_write.ts to advise Edit instead. High by design: this is only meant to catch the "mostly untouched, a few lines changed" case, not a genuine rewrite that happens to share some boilerplate.
|
|
1482
1439
|
write_rewrite_unchanged_pct: 75,
|
|
1483
1440
|
serve_diff_on_reread: true,
|
|
1484
1441
|
elide_served_lines: true,
|
|
@@ -1489,15 +1446,10 @@ var CONFIG_DEFAULTS = {
|
|
|
1489
1446
|
pre_skill_advisory: true,
|
|
1490
1447
|
context_threshold_advisory: true,
|
|
1491
1448
|
diff_hint_min_tokens_saved: 1e3,
|
|
1492
|
-
// Base for the pressure-scaled first-read deny gate in hooks_read.ts (large file, never read
|
|
1493
|
-
// before). Matches that gate's long-tuned 500KB threshold at 'cool' context pressure; warm/hot/
|
|
1494
|
-
// critical scale it down from there so the same read gets redirected to a surgical read sooner
|
|
1495
|
-
// once the context window is nearly full.
|
|
1449
|
+
// Base for the pressure-scaled first-read deny gate in hooks_read.ts (large file, never read before). Matches that gate's long-tuned 500KB threshold at 'cool' context pressure; warm/hot/ critical scale it down from there so the same read gets redirected to a surgical read sooner once the context window is nearly full.
|
|
1496
1450
|
large_read_redirect_bytes: 512e3,
|
|
1497
1451
|
reread_deny: true,
|
|
1498
|
-
// Matches hooks_read.ts's previously-hardcoded REREAD_DENY_BYTES (50 * 1024) so wiring this
|
|
1499
|
-
// key up as the real gate for that logic does not silently change default behavior for
|
|
1500
|
-
// existing users -- see the reread_deny/reread_deny_min_bytes fix's commit message.
|
|
1452
|
+
// Matches hooks_read.ts's previously-hardcoded REREAD_DENY_BYTES (50 * 1024) so wiring this key up as the real gate for that logic does not silently change default behavior for existing users -- see the reread_deny/reread_deny_min_bytes fix's commit message.
|
|
1501
1453
|
reread_deny_min_bytes: 51200,
|
|
1502
1454
|
stable_doc_compacts: true,
|
|
1503
1455
|
// On. It has now run. The gate that finds the spans answered only from the index, and the index carried the shipping parser stamp on 46 of 17,952 files, so the lever was very nearly dead in practice: a disk parse of the delivered file is now the fallback, worth +3.0 points of withheld bytes on shell reads with no index at all. The cost side is the one this comment used to call unobservable, and it is observable: joining folds to later reads of the folded symbol scores 62.3% recovery, but the same window measured backwards scores 55.8% and a shuffled pairing scores 24.3%, so the excess attributable to the fold is 6.6 points rather than 62. Unlike every re-read mechanism beside it this rewrites a FIRST look, where the reader has no prior copy to notice an omission against, which is why the notice names the symbol and the command that returns it verbatim.
|
|
@@ -1521,8 +1473,8 @@ var CONFIG_DEFAULTS = {
|
|
|
1521
1473
|
session_start_reminder: true
|
|
1522
1474
|
},
|
|
1523
1475
|
hooks: {
|
|
1524
|
-
|
|
1525
|
-
|
|
1476
|
+
latency_budget_ms: 1500,
|
|
1477
|
+
server: true
|
|
1526
1478
|
},
|
|
1527
1479
|
webfetch: {
|
|
1528
1480
|
allow: [],
|
|
@@ -1535,15 +1487,7 @@ var CONFIG_DEFAULTS = {
|
|
|
1535
1487
|
worker: {
|
|
1536
1488
|
blocked_roots: [],
|
|
1537
1489
|
max_pool_workers: 4,
|
|
1538
|
-
// 4, not 2. Measured on a 26-core Windows host with a foreground CPU probe: at `priority`
|
|
1539
|
-
// below_normal, 2, 4 and 6 threads are all indistinguishable from an idle machine, including
|
|
1540
|
-
// when the indexer and the probe are pinned to the same 4 cores, and including 4 threads pinned
|
|
1541
|
-
// to 2 cores, which is genuine oversubscription. The same probe reads -10% at 16 threads and
|
|
1542
|
-
// -69% with a 292 ms stall at 4 threads on 2 cores once the priority is normal instead. So the
|
|
1543
|
-
// priority below is what keeps the foreground responsive, not this number, and 4 buys a
|
|
1544
|
-
// measured 1.77x on indexing for no foreground cost. It stays a cap rather than tracking the
|
|
1545
|
-
// core count, because where the platform refuses the priority change (some hardened Linux
|
|
1546
|
-
// setups, sandboxes) this is the only thing left holding indexing back.
|
|
1490
|
+
// 4, not 2. Measured on a 26-core Windows host with a foreground CPU probe: at `priority` below_normal, 2, 4 and 6 threads are all indistinguishable from an idle machine, including when the indexer and the probe are pinned to the same 4 cores, and including 4 threads pinned to 2 cores, which is genuine oversubscription. The same probe reads -10% at 16 threads and -69% with a 292 ms stall at 4 threads on 2 cores once the priority is normal instead. So the priority below is what keeps the foreground responsive, not this number, and 4 buys a measured 1.77x on indexing for no foreground cost. It stays a cap rather than tracking the core count, because where the platform refuses the priority change (some hardened Linux setups, sandboxes) this is the only thing left holding indexing back.
|
|
1547
1491
|
embed_threads: 4,
|
|
1548
1492
|
priority: "below_normal"
|
|
1549
1493
|
},
|
|
@@ -1716,7 +1660,6 @@ var NUMERIC_FIELD_BOUNDS = {
|
|
|
1716
1660
|
"hints.protect_recent_reads": { min: 0, max: 100 },
|
|
1717
1661
|
"hints.cross_session_read_dedup_ttl_secs": { min: 1, max: 86400 },
|
|
1718
1662
|
"hints.mcp_dedup_ttl_secs": { min: 1, max: 3600 },
|
|
1719
|
-
"hooks.watchdog_ms": { min: 100, max: 3e4 },
|
|
1720
1663
|
"hooks.latency_budget_ms": { min: 1, max: 6e5 },
|
|
1721
1664
|
"webfetch.max_file_count": { min: 0, max: 1e7 },
|
|
1722
1665
|
"webfetch.max_bytes": { min: 0, max: 100 * 1024 * 1024 * 1024 },
|
|
@@ -1766,9 +1709,7 @@ var ENUM_FIELD_VALUES = {
|
|
|
1766
1709
|
"compression.profile": ["auto", "aggressive", "balanced", "minimal"],
|
|
1767
1710
|
"compact_assist.harness": ["auto", ...KNOWN_HARNESS_NAMES],
|
|
1768
1711
|
"image_shrink.ocr_lang": [...SUPPORTED_OCR_LANG_CODES],
|
|
1769
|
-
// Deliberately has no entry above `normal`. This table is what `config set` checks; a
|
|
1770
|
-
// hand-edited TOML bypasses it, which is why resolveWorkerPriority (process_priority.ts) maps an
|
|
1771
|
-
// unrecognized value back to the default rather than trusting whatever the file said.
|
|
1712
|
+
// Deliberately has no entry above `normal`. This table is what `config set` checks; a hand-edited TOML bypasses it, which is why resolveWorkerPriority (process_priority.ts) maps an unrecognized value back to the default rather than trusting whatever the file said.
|
|
1772
1713
|
"worker.priority": ["below_normal", "low", "normal"]
|
|
1773
1714
|
};
|
|
1774
1715
|
function validateEnumField(fieldKey, value) {
|
|
@@ -1796,7 +1737,6 @@ var ENV_KEYS2 = [
|
|
|
1796
1737
|
"TOKEN_GOAT_HINT_JSON_SIDECAR",
|
|
1797
1738
|
"TOKEN_GOAT_LARGE_READ_BYTES",
|
|
1798
1739
|
"TOKEN_GOAT_HINT_BUDGET",
|
|
1799
|
-
"TOKEN_GOAT_HOOK_WATCHDOG_MS",
|
|
1800
1740
|
"TOKEN_GOAT_WEB_COMPRESS",
|
|
1801
1741
|
"TOKEN_GOAT_WORKER_WATCHDOG",
|
|
1802
1742
|
"TOKEN_GOAT_WORKER_MAX_POOL",
|
|
@@ -1998,6 +1938,9 @@ function loadPersistedConfig() {
|
|
|
1998
1938
|
_lastConfigParseError = parseError;
|
|
1999
1939
|
return buildPersistedConfig(raw);
|
|
2000
1940
|
}
|
|
1941
|
+
function hookServerEnabled() {
|
|
1942
|
+
return envBool("TOKEN_GOAT_HOOK_SERVER", loadPersistedConfig().hooks.server);
|
|
1943
|
+
}
|
|
2001
1944
|
function _buildConfig(raw, projectRaw = {}) {
|
|
2002
1945
|
const { cleaned: safeProjectRaw, dropped: lockedKeys } = stripLockedProjectKeys(projectRaw);
|
|
2003
1946
|
setLastProjectConfigLockedKeys(lockedKeys);
|
|
@@ -2186,10 +2129,10 @@ function _buildConfig(raw, projectRaw = {}) {
|
|
|
2186
2129
|
}
|
|
2187
2130
|
const hk_raw = section(raw, "hooks");
|
|
2188
2131
|
const hk = getDefaultConfig("hooks");
|
|
2189
|
-
hk.watchdog_ms = validatedInt(hk_raw["watchdog_ms"], hk.watchdog_ms, ...boundsOf("hooks.watchdog_ms"));
|
|
2190
|
-
hk.watchdog_ms = envInt("TOKEN_GOAT_HOOK_WATCHDOG_MS", hk.watchdog_ms, ...boundsOf("hooks.watchdog_ms"));
|
|
2191
2132
|
hk.latency_budget_ms = validatedInt(hk_raw["latency_budget_ms"], hk.latency_budget_ms, ...boundsOf("hooks.latency_budget_ms"));
|
|
2192
2133
|
hk.latency_budget_ms = envInt("TOKEN_GOAT_HOOK_LATENCY_BUDGET_MS", hk.latency_budget_ms, ...boundsOf("hooks.latency_budget_ms"));
|
|
2134
|
+
hk.server = validatedBool(hk_raw["server"], hk.server);
|
|
2135
|
+
hk.server = envBool("TOKEN_GOAT_HOOK_SERVER", hk.server);
|
|
2193
2136
|
const wf_raw = section(raw, "webfetch");
|
|
2194
2137
|
const wf = getDefaultConfig("webfetch");
|
|
2195
2138
|
wf.allow = validatedStrList(wf_raw["allow"], wf.allow);
|
|
@@ -2360,8 +2303,8 @@ var CONFIG_KEY_ENV_OVERRIDES = {
|
|
|
2360
2303
|
"hints.context_threshold_advisory": ["TOKEN_GOAT_CONTEXT_THRESHOLD_ADVISORY"],
|
|
2361
2304
|
"hints.pre_skill_advisory": ["TOKEN_GOAT_PRE_SKILL_ADVISORY"],
|
|
2362
2305
|
"hints.quiet_hours": ["TOKEN_GOAT_QUIET_HOURS"],
|
|
2363
|
-
"hooks.watchdog_ms": ["TOKEN_GOAT_HOOK_WATCHDOG_MS"],
|
|
2364
2306
|
"hooks.latency_budget_ms": ["TOKEN_GOAT_HOOK_LATENCY_BUDGET_MS"],
|
|
2307
|
+
"hooks.server": ["TOKEN_GOAT_HOOK_SERVER"],
|
|
2365
2308
|
"webfetch.max_file_count": ["TOKEN_GOAT_WEB_CACHE_MAX_FILES"],
|
|
2366
2309
|
"webfetch.max_bytes": ["TOKEN_GOAT_WEB_CACHE_MAX_BYTES"],
|
|
2367
2310
|
"webfetch.compress_bodies": ["TOKEN_GOAT_WEB_COMPRESS"],
|
|
@@ -2509,8 +2452,8 @@ function saveConfig(config) {
|
|
|
2509
2452
|
session_start_reminder: config.hints.session_start_reminder
|
|
2510
2453
|
},
|
|
2511
2454
|
hooks: {
|
|
2512
|
-
|
|
2513
|
-
|
|
2455
|
+
latency_budget_ms: config.hooks.latency_budget_ms,
|
|
2456
|
+
server: config.hooks.server
|
|
2514
2457
|
},
|
|
2515
2458
|
webfetch: {
|
|
2516
2459
|
allow: config.webfetch.allow,
|
|
@@ -2578,11 +2521,10 @@ function saveConfig(config) {
|
|
|
2578
2521
|
export {
|
|
2579
2522
|
parse,
|
|
2580
2523
|
stringify,
|
|
2524
|
+
setRelaySeededSessionId,
|
|
2525
|
+
relaySeededSessionId,
|
|
2581
2526
|
detectHarness,
|
|
2582
2527
|
getHarnessName,
|
|
2583
|
-
envBool,
|
|
2584
|
-
envInt,
|
|
2585
|
-
envStrList,
|
|
2586
2528
|
fingerprintContent,
|
|
2587
2529
|
shortFingerprint,
|
|
2588
2530
|
fingerprintFile,
|
|
@@ -2612,6 +2554,7 @@ export {
|
|
|
2612
2554
|
loadConfig,
|
|
2613
2555
|
invalidateConfigCache,
|
|
2614
2556
|
loadPersistedConfig,
|
|
2557
|
+
hookServerEnabled,
|
|
2615
2558
|
CONFIG_KEY_ENV_OVERRIDES,
|
|
2616
2559
|
saveConfig
|
|
2617
2560
|
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
pathEqClause,
|
|
5
5
|
projectScopeClause,
|
|
6
6
|
querySymbols
|
|
7
|
-
} from "./token-goat-chunk-
|
|
7
|
+
} from "./token-goat-chunk-435UQTKD.mjs";
|
|
8
8
|
import {
|
|
9
9
|
TREE_SITTER_LANGUAGES,
|
|
10
10
|
_detectOpenQuote,
|
|
@@ -22,29 +22,33 @@ import {
|
|
|
22
22
|
stripJsComments,
|
|
23
23
|
stripStringLiterals,
|
|
24
24
|
stripXmlComments
|
|
25
|
-
} from "./token-goat-chunk-
|
|
25
|
+
} from "./token-goat-chunk-7CPMDFGB.mjs";
|
|
26
26
|
import {
|
|
27
27
|
fingerprintContent,
|
|
28
28
|
loadConfig
|
|
29
|
-
} from "./token-goat-chunk-
|
|
29
|
+
} from "./token-goat-chunk-TGOXNAHW.mjs";
|
|
30
30
|
import {
|
|
31
31
|
registerReset
|
|
32
|
-
} from "./token-goat-chunk-
|
|
32
|
+
} from "./token-goat-chunk-YZAAZU2S.mjs";
|
|
33
33
|
import {
|
|
34
|
-
SYMBOL_BODY_CHAR_CAP,
|
|
35
34
|
countContentLines,
|
|
36
|
-
dataDir,
|
|
37
35
|
decodeSource,
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
ensureDirSync
|
|
37
|
+
} from "./token-goat-chunk-XYWPOSCN.mjs";
|
|
38
|
+
import {
|
|
40
39
|
foldPath,
|
|
41
|
-
globalDbPath,
|
|
42
40
|
isCaseInsensitiveFs
|
|
43
|
-
} from "./token-goat-chunk-
|
|
41
|
+
} from "./token-goat-chunk-TCQANXYC.mjs";
|
|
44
42
|
import {
|
|
45
43
|
displaySafeText,
|
|
46
44
|
normalizePath
|
|
47
45
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
46
|
+
import {
|
|
47
|
+
SYMBOL_BODY_CHAR_CAP,
|
|
48
|
+
dataDir,
|
|
49
|
+
ensureDataDirPrivate,
|
|
50
|
+
globalDbPath
|
|
51
|
+
} from "./token-goat-chunk-MELOKFDJ.mjs";
|
|
48
52
|
import {
|
|
49
53
|
DocumentRefusedError,
|
|
50
54
|
MAX_DOCUMENT_WORK_MILLIS
|
|
@@ -70,16 +74,16 @@ function isTransientDocumentRefusal(err) {
|
|
|
70
74
|
async function extractEmbeddableDocumentText(filePath) {
|
|
71
75
|
switch (path.extname(filePath).toLowerCase()) {
|
|
72
76
|
case ".pdf": {
|
|
73
|
-
const { extractPdfText, readPdfFileWithinBounds } = await import("./token-goat-chunk-
|
|
77
|
+
const { extractPdfText, readPdfFileWithinBounds } = await import("./token-goat-chunk-YOOVFPTP.mjs");
|
|
74
78
|
const { text } = await extractPdfText(await readPdfFileWithinBounds(filePath));
|
|
75
79
|
return text;
|
|
76
80
|
}
|
|
77
81
|
case ".docx":
|
|
78
|
-
return await (await import("./token-goat-chunk-
|
|
82
|
+
return await (await import("./token-goat-chunk-BGYOZ6DO.mjs")).docxText(filePath);
|
|
79
83
|
case ".pptx":
|
|
80
|
-
return await (await import("./token-goat-chunk-
|
|
84
|
+
return await (await import("./token-goat-chunk-LZNBQTDK.mjs")).pptxAllSlidesText(filePath, true);
|
|
81
85
|
case ".xlsx":
|
|
82
|
-
return await (await import("./token-goat-chunk-
|
|
86
|
+
return await (await import("./token-goat-chunk-GLXRTTLE.mjs")).allSheetsHeadText(filePath, XLSX_SHEET_ROW_CAP);
|
|
83
87
|
default:
|
|
84
88
|
return null;
|
|
85
89
|
}
|
|
@@ -1470,60 +1474,60 @@ init_define_import_meta_env();
|
|
|
1470
1474
|
|
|
1471
1475
|
// src/parser_fingerprint.ts
|
|
1472
1476
|
init_define_import_meta_env();
|
|
1473
|
-
var PARSER_FINGERPRINT = "
|
|
1477
|
+
var PARSER_FINGERPRINT = "2d89b6499a42ed1d";
|
|
1474
1478
|
var LANGUAGE_PARSER_FINGERPRINTS = /* @__PURE__ */ new Map([
|
|
1475
|
-
["abap", "
|
|
1476
|
-
["abl", "
|
|
1477
|
-
["apache", "
|
|
1478
|
-
["apex", "
|
|
1479
|
-
["asm", "
|
|
1480
|
-
["bash", "
|
|
1481
|
-
["batch", "
|
|
1482
|
-
["caddy", "
|
|
1483
|
-
["clojure", "
|
|
1484
|
-
["cmake", "
|
|
1485
|
-
["common_lisp", "
|
|
1486
|
-
["csharp", "
|
|
1487
|
-
["dart", "
|
|
1488
|
-
["elixir", "
|
|
1489
|
-
["emacs_lisp", "
|
|
1490
|
-
["erlang", "
|
|
1491
|
-
["fortran", "
|
|
1492
|
-
["fsharp", "
|
|
1493
|
-
["graphql", "
|
|
1494
|
-
["groovy", "
|
|
1495
|
-
["haskell", "
|
|
1496
|
-
["jcl", "
|
|
1497
|
-
["kotlin", "
|
|
1498
|
-
["liquid", "
|
|
1499
|
-
["lua", "
|
|
1500
|
-
["makefile", "
|
|
1501
|
-
["matlab", "
|
|
1502
|
-
["nginx", "
|
|
1503
|
-
["nix", "
|
|
1504
|
-
["objc", "
|
|
1505
|
-
["ocaml", "
|
|
1506
|
-
["pascal", "
|
|
1507
|
-
["perl", "
|
|
1508
|
-
["php", "
|
|
1509
|
-
["pli", "
|
|
1510
|
-
["powershell", "
|
|
1511
|
-
["proto", "
|
|
1512
|
-
["r", "
|
|
1513
|
-
["racket", "
|
|
1514
|
-
["rpg", "
|
|
1515
|
-
["salesforce_metadata", "
|
|
1516
|
-
["sas", "
|
|
1517
|
-
["scala", "
|
|
1518
|
-
["scheme", "
|
|
1519
|
-
["solidity", "
|
|
1520
|
-
["sql", "
|
|
1521
|
-
["swift", "
|
|
1522
|
-
["terraform", "
|
|
1523
|
-
["thrift", "
|
|
1524
|
-
["vb", "
|
|
1525
|
-
["vhdl", "
|
|
1526
|
-
["zig", "
|
|
1479
|
+
["abap", "ace64ed1a90c6fe2"],
|
|
1480
|
+
["abl", "49747d3ea4a63996"],
|
|
1481
|
+
["apache", "dc4c4c1a4535edaa"],
|
|
1482
|
+
["apex", "ba09f466435bac98"],
|
|
1483
|
+
["asm", "381803d9b7d37222"],
|
|
1484
|
+
["bash", "d79de6bc5521aa1c"],
|
|
1485
|
+
["batch", "ae1b1353f77a0e3d"],
|
|
1486
|
+
["caddy", "e4a8a743ed862a26"],
|
|
1487
|
+
["clojure", "45cb3fbe66685d67"],
|
|
1488
|
+
["cmake", "54a50f9ec5f77ee1"],
|
|
1489
|
+
["common_lisp", "59dfcd3bcf2b12d6"],
|
|
1490
|
+
["csharp", "ffd0d771ab250bb7"],
|
|
1491
|
+
["dart", "e70f3adc4f21925e"],
|
|
1492
|
+
["elixir", "e4a41c6c2111456f"],
|
|
1493
|
+
["emacs_lisp", "8d1165fa3e1c1294"],
|
|
1494
|
+
["erlang", "864920c971acb5d8"],
|
|
1495
|
+
["fortran", "6c3c979574ba3634"],
|
|
1496
|
+
["fsharp", "3d12f87ae36bd8c8"],
|
|
1497
|
+
["graphql", "d3097d428382f6a6"],
|
|
1498
|
+
["groovy", "9c6deaeb58514162"],
|
|
1499
|
+
["haskell", "f71bcbe8ad0c822c"],
|
|
1500
|
+
["jcl", "2df5befa1e1bf338"],
|
|
1501
|
+
["kotlin", "35bd48532ca099f9"],
|
|
1502
|
+
["liquid", "b690060daff453e3"],
|
|
1503
|
+
["lua", "b819c32f3e285380"],
|
|
1504
|
+
["makefile", "90b4f22a02906869"],
|
|
1505
|
+
["matlab", "6987f5931cb0115c"],
|
|
1506
|
+
["nginx", "e09eee0153d68597"],
|
|
1507
|
+
["nix", "f2c0fe5157ea42d4"],
|
|
1508
|
+
["objc", "00fe927b86fce11a"],
|
|
1509
|
+
["ocaml", "d30ade0b53bab229"],
|
|
1510
|
+
["pascal", "eb9634ba12f9c034"],
|
|
1511
|
+
["perl", "1914f4f683566235"],
|
|
1512
|
+
["php", "0d5dbaf75addd247"],
|
|
1513
|
+
["pli", "e0750ee540a9ec21"],
|
|
1514
|
+
["powershell", "c34d22937b367114"],
|
|
1515
|
+
["proto", "fc07b91d857f3775"],
|
|
1516
|
+
["r", "dc0bf5a6f1145c18"],
|
|
1517
|
+
["racket", "a3a1aad82f7ad007"],
|
|
1518
|
+
["rpg", "b377ec9a51a52784"],
|
|
1519
|
+
["salesforce_metadata", "f143c6eef872cb92"],
|
|
1520
|
+
["sas", "b6162f794de7b72e"],
|
|
1521
|
+
["scala", "3208d9f8b987936c"],
|
|
1522
|
+
["scheme", "7c67037a020cfebc"],
|
|
1523
|
+
["solidity", "c399df7b96ac4bac"],
|
|
1524
|
+
["sql", "8456d9445630f7fc"],
|
|
1525
|
+
["swift", "f7e06269477c3a87"],
|
|
1526
|
+
["terraform", "1ef21f729614d340"],
|
|
1527
|
+
["thrift", "33d6cdadd7446f83"],
|
|
1528
|
+
["vb", "c07ca9e16e0d3e67"],
|
|
1529
|
+
["vhdl", "8ca86b768f29b646"],
|
|
1530
|
+
["zig", "e10a8a352adc898a"]
|
|
1527
1531
|
]);
|
|
1528
1532
|
|
|
1529
1533
|
// src/parser_stamp.ts
|
|
@@ -3922,7 +3926,7 @@ function parseSourceSymbolsTreeSitterOnly(content, filePath, language) {
|
|
|
3922
3926
|
var REGEX_ADAPTERS_SLOT = /* @__PURE__ */ Symbol.for("token-goat.regex-adapters");
|
|
3923
3927
|
var adapterSlot = globalThis;
|
|
3924
3928
|
async function loadRegexExtractors() {
|
|
3925
|
-
adapterSlot[REGEX_ADAPTERS_SLOT] ??= await import("./token-goat-chunk-
|
|
3929
|
+
adapterSlot[REGEX_ADAPTERS_SLOT] ??= await import("./token-goat-chunk-KOPIR3KZ.mjs");
|
|
3926
3930
|
}
|
|
3927
3931
|
function regexAdapters() {
|
|
3928
3932
|
const loaded = adapterSlot[REGEX_ADAPTERS_SLOT];
|
|
@@ -4072,6 +4076,10 @@ var DISABLED_EMBED_SHA_PREFIX = "disabled:";
|
|
|
4072
4076
|
function disabledEmbedSha(sha) {
|
|
4073
4077
|
return DISABLED_EMBED_SHA_PREFIX + sha;
|
|
4074
4078
|
}
|
|
4079
|
+
var disabledStamps = 0;
|
|
4080
|
+
function disabledStampCount() {
|
|
4081
|
+
return disabledStamps;
|
|
4082
|
+
}
|
|
4075
4083
|
var UNAVAILABLE_EMBED_SHA_PREFIX = "unavailable:";
|
|
4076
4084
|
function unavailableEmbedSha(sha) {
|
|
4077
4085
|
return UNAVAILABLE_EMBED_SHA_PREFIX + sha;
|
|
@@ -4164,6 +4172,7 @@ async function indexFileEmbeddings(rawPath, dbPath = globalDbPath(), sha, onErro
|
|
|
4164
4172
|
const ixCfg = loadConfig().indexing;
|
|
4165
4173
|
if (!ixCfg.embeddings_enabled) {
|
|
4166
4174
|
stampEmbedSha(getDb(dbPath), filePath, sha, disabledEmbedSha);
|
|
4175
|
+
disabledStamps += 1;
|
|
4167
4176
|
return;
|
|
4168
4177
|
}
|
|
4169
4178
|
if (filePath.toLowerCase().endsWith(".profile-meta.xml")) {
|
|
@@ -4804,6 +4813,11 @@ export {
|
|
|
4804
4813
|
isEmbeddableDocument,
|
|
4805
4814
|
ipynbToVirtualSource,
|
|
4806
4815
|
eachUnfencedLine,
|
|
4816
|
+
MARKDOWN_SIZE_THRESHOLD,
|
|
4817
|
+
extractMarkdownHeadings,
|
|
4818
|
+
formatHeadingTreeParts,
|
|
4819
|
+
getWellKnownSections,
|
|
4820
|
+
extractChangelogVersionHint,
|
|
4807
4821
|
isImagePath,
|
|
4808
4822
|
isNonTextAsset,
|
|
4809
4823
|
modelFilesPresent,
|
|
@@ -4819,11 +4833,6 @@ export {
|
|
|
4819
4833
|
embeddingsDepsAvailable,
|
|
4820
4834
|
deleteFileEmbeddings,
|
|
4821
4835
|
ensureEmbeddingProvenance,
|
|
4822
|
-
MARKDOWN_SIZE_THRESHOLD,
|
|
4823
|
-
extractMarkdownHeadings,
|
|
4824
|
-
formatHeadingTreeParts,
|
|
4825
|
-
getWellKnownSections,
|
|
4826
|
-
extractChangelogVersionHint,
|
|
4827
4836
|
parserFingerprintForLanguage,
|
|
4828
4837
|
treeSitterCoreAvailable,
|
|
4829
4838
|
treeSitterCoreLoadError,
|
|
@@ -4834,6 +4843,8 @@ export {
|
|
|
4834
4843
|
deleteFileRows,
|
|
4835
4844
|
isParseSkipEligible,
|
|
4836
4845
|
indexFileSync,
|
|
4846
|
+
disabledStampCount,
|
|
4847
|
+
oversizeEmbedSha,
|
|
4837
4848
|
assetEmbedSha,
|
|
4838
4849
|
maxChunksEmbedSha,
|
|
4839
4850
|
indexedPathSpellingIsStale,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRequire as __cjsRequire } from 'node:module';
|
|
2
|
+
const require = __cjsRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
DEFAULT_HEARTBEAT_INTERVAL_MS,
|
|
5
|
+
DEFAULT_TIMEOUT_SECONDS,
|
|
6
|
+
MAX_CAPTURE_BYTES,
|
|
7
|
+
resolveFilter,
|
|
8
|
+
run,
|
|
9
|
+
runRaw
|
|
10
|
+
} from "./token-goat-chunk-IVWI2OCK.mjs";
|
|
11
|
+
import "./token-goat-chunk-L7H3U27L.mjs";
|
|
12
|
+
import "./token-goat-chunk-ZER6EAXZ.mjs";
|
|
13
|
+
import "./token-goat-chunk-O6I2XU4P.mjs";
|
|
14
|
+
import "./token-goat-chunk-D4ETHJD6.mjs";
|
|
15
|
+
import "./token-goat-chunk-2WOUYWLM.mjs";
|
|
16
|
+
import "./token-goat-chunk-CIQ2FTY3.mjs";
|
|
17
|
+
import "./token-goat-chunk-435UQTKD.mjs";
|
|
18
|
+
import "./token-goat-chunk-7CPMDFGB.mjs";
|
|
19
|
+
import "./token-goat-chunk-TGOXNAHW.mjs";
|
|
20
|
+
import "./token-goat-chunk-XB5KKOCG.mjs";
|
|
21
|
+
import "./token-goat-chunk-YZAAZU2S.mjs";
|
|
22
|
+
import "./token-goat-chunk-IVE6U7KV.mjs";
|
|
23
|
+
import "./token-goat-chunk-XYWPOSCN.mjs";
|
|
24
|
+
import "./token-goat-chunk-TCQANXYC.mjs";
|
|
25
|
+
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
26
|
+
import "./token-goat-chunk-MELOKFDJ.mjs";
|
|
27
|
+
import "./token-goat-chunk-JTKCQMQA.mjs";
|
|
28
|
+
import "./token-goat-chunk-A37V4PBF.mjs";
|
|
29
|
+
export {
|
|
30
|
+
DEFAULT_HEARTBEAT_INTERVAL_MS,
|
|
31
|
+
DEFAULT_TIMEOUT_SECONDS,
|
|
32
|
+
MAX_CAPTURE_BYTES,
|
|
33
|
+
resolveFilter,
|
|
34
|
+
run,
|
|
35
|
+
runRaw
|
|
36
|
+
};
|
|
@@ -5,14 +5,16 @@ import {
|
|
|
5
5
|
isSupportedOcrLang,
|
|
6
6
|
loadConfig,
|
|
7
7
|
resolveOcrLangs
|
|
8
|
-
} from "./token-goat-chunk-
|
|
8
|
+
} from "./token-goat-chunk-TGOXNAHW.mjs";
|
|
9
9
|
import {
|
|
10
|
-
ensureDirSync
|
|
11
|
-
|
|
12
|
-
} from "./token-goat-chunk-6E2IDLHF.mjs";
|
|
10
|
+
ensureDirSync
|
|
11
|
+
} from "./token-goat-chunk-XYWPOSCN.mjs";
|
|
13
12
|
import {
|
|
14
13
|
fenceUntrustedOcrText
|
|
15
14
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
15
|
+
import {
|
|
16
|
+
tokenGoatHome
|
|
17
|
+
} from "./token-goat-chunk-MELOKFDJ.mjs";
|
|
16
18
|
import {
|
|
17
19
|
init_define_import_meta_env
|
|
18
20
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|