token-goat 2.9.20 → 2.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/{token-goat-chunk-GIPMOGOI.mjs → token-goat-chunk-273O227F.mjs} +5 -5
- package/dist/{token-goat-chunk-3VTJC7KU.mjs → token-goat-chunk-2GAK6LNK.mjs} +13 -12
- package/dist/{token-goat-chunk-QCQUIPIP.mjs → token-goat-chunk-3U6ZYVX5.mjs} +1582 -773
- package/dist/{token-goat-chunk-W6QYCWAT.mjs → token-goat-chunk-4642QVSQ.mjs} +6 -6
- package/dist/{token-goat-chunk-VYXGHGUY.mjs → token-goat-chunk-47MFMDCL.mjs} +3 -3
- package/dist/{token-goat-chunk-ZHFM4DHJ.mjs → token-goat-chunk-4NS4CAKI.mjs} +2 -2
- package/dist/{token-goat-chunk-ASTBLE2R.mjs → token-goat-chunk-4QGFVPFJ.mjs} +3 -3
- package/dist/{token-goat-chunk-H4VC5TR6.mjs → token-goat-chunk-4W2SZZIL.mjs} +27 -27
- package/dist/{token-goat-chunk-ERGHDBC6.mjs → token-goat-chunk-646GCK7P.mjs} +213 -208
- package/dist/{token-goat-chunk-3OGZOFLS.mjs → token-goat-chunk-6MTX77BB.mjs} +17 -17
- package/dist/{token-goat-chunk-VSJGPEBB.mjs → token-goat-chunk-75DLQORE.mjs} +4 -4
- package/dist/{token-goat-chunk-Z4ALQADF.mjs → token-goat-chunk-765U7OJS.mjs} +23 -21
- package/dist/{token-goat-chunk-DNAF26L4.mjs → token-goat-chunk-7TAFIQS4.mjs} +1 -1
- package/dist/{token-goat-chunk-T6M7DAW3.mjs → token-goat-chunk-CHLHM42P.mjs} +13 -1
- package/dist/{token-goat-chunk-T63VHOL3.mjs → token-goat-chunk-CTPTUL7L.mjs} +16 -2
- package/dist/{token-goat-chunk-SP5QR2HN.mjs → token-goat-chunk-CVPCUQON.mjs} +3 -3
- package/dist/{token-goat-chunk-2CLWWRFR.mjs → token-goat-chunk-DMCYWDMB.mjs} +10 -10
- package/dist/{token-goat-chunk-74ADIZZX.mjs → token-goat-chunk-DN4HSMH7.mjs} +1 -1
- package/dist/{token-goat-chunk-PTW22MRC.mjs → token-goat-chunk-EU5KDBII.mjs} +1 -1
- package/dist/{token-goat-chunk-2Q3N5KUQ.mjs → token-goat-chunk-FI4MIIER.mjs} +54 -38
- package/dist/{token-goat-chunk-ONMU7BON.mjs → token-goat-chunk-G7NIU2HH.mjs} +2 -2
- package/dist/{token-goat-chunk-MNJWG2ZO.mjs → token-goat-chunk-GKZLHNGN.mjs} +2 -2
- package/dist/{token-goat-chunk-BQIC3AVL.mjs → token-goat-chunk-HCEW3KTN.mjs} +2 -2
- package/dist/{token-goat-chunk-DYUBZZNP.mjs → token-goat-chunk-HGXKWLYQ.mjs} +10 -10
- package/dist/{token-goat-chunk-CBXLE54Q.mjs → token-goat-chunk-I4OCEISJ.mjs} +8 -8
- package/dist/{token-goat-chunk-KT75DZK4.mjs → token-goat-chunk-JGQ2SBAA.mjs} +4 -4
- package/dist/{token-goat-chunk-6LJNM4ZZ.mjs → token-goat-chunk-K5KG65OI.mjs} +1 -1
- package/dist/{token-goat-chunk-DW4VKU7D.mjs → token-goat-chunk-KJCMNJCG.mjs} +4 -4
- package/dist/{token-goat-chunk-K3ZNBN4U.mjs → token-goat-chunk-LPOEPINH.mjs} +2 -2
- package/dist/{token-goat-chunk-DPHJU3P7.mjs → token-goat-chunk-N3UUZAYN.mjs} +60 -27
- package/dist/{token-goat-chunk-ODF7H7WS.mjs → token-goat-chunk-N6WCYKW5.mjs} +2 -2
- package/dist/{token-goat-chunk-P4XBHZXU.mjs → token-goat-chunk-ONXXR7MS.mjs} +1 -1
- package/dist/{token-goat-chunk-ITWYDOKP.mjs → token-goat-chunk-OSLK5MBY.mjs} +4 -4
- package/dist/{token-goat-chunk-AU2K2QHR.mjs → token-goat-chunk-PQD6JTXN.mjs} +3 -3
- package/dist/{token-goat-chunk-T46UKRFM.mjs → token-goat-chunk-SLE5MVTU.mjs} +1 -1
- package/dist/{token-goat-chunk-PAVWB4L4.mjs → token-goat-chunk-TD5JS4ST.mjs} +3 -3
- package/dist/{token-goat-chunk-EUZKG7ZO.mjs → token-goat-chunk-TEK5LV6B.mjs} +3 -3
- package/dist/{token-goat-chunk-FWYZVS3E.mjs → token-goat-chunk-VRS6B7UD.mjs} +10 -14
- package/dist/{token-goat-chunk-I5PQRHFE.mjs → token-goat-chunk-VVPAGLLE.mjs} +8 -8
- package/dist/{token-goat-chunk-OMNQUUIT.mjs → token-goat-chunk-XBESNWEX.mjs} +1 -1
- package/dist/token-goat-chunk-YDPJCY62.mjs +41 -0
- package/dist/{token-goat-chunk-SL454EN5.mjs → token-goat-chunk-YHCUBOVZ.mjs} +5 -5
- package/dist/{token-goat-chunk-K5XPIUVB.mjs → token-goat-chunk-YVCGELLH.mjs} +3 -3
- package/dist/{token-goat-chunk-MUJV7BR3.mjs → token-goat-chunk-ZO6OALTM.mjs} +1 -1
- package/dist/token-goat-hook.mjs +17 -17
- package/dist/token-goat.core.mjs +27 -27
- package/package.json +1 -1
- package/dist/token-goat-chunk-G6SYQQO7.mjs +0 -41
|
@@ -3,12 +3,12 @@ const require = __cjsRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
isRewriteWorthwhile,
|
|
5
5
|
resolveMinNetSavingsBytes
|
|
6
|
-
} from "./token-goat-chunk-
|
|
6
|
+
} from "./token-goat-chunk-TD5JS4ST.mjs";
|
|
7
7
|
import {
|
|
8
8
|
COPILOT_CLI_TOOL_NAME_MAP,
|
|
9
9
|
foldToolName,
|
|
10
10
|
readCopilotMcpTools
|
|
11
|
-
} from "./token-goat-chunk-
|
|
11
|
+
} from "./token-goat-chunk-CVPCUQON.mjs";
|
|
12
12
|
import {
|
|
13
13
|
contentHash,
|
|
14
14
|
exportSessionState,
|
|
@@ -36,11 +36,11 @@ import {
|
|
|
36
36
|
wasFileReadThisSession,
|
|
37
37
|
wasFileTruncatedThisSession,
|
|
38
38
|
writeSessionManifest
|
|
39
|
-
} from "./token-goat-chunk-
|
|
39
|
+
} from "./token-goat-chunk-JGQ2SBAA.mjs";
|
|
40
40
|
import {
|
|
41
41
|
claudeConfigDir,
|
|
42
42
|
estimateTokens
|
|
43
|
-
} from "./token-goat-chunk-
|
|
43
|
+
} from "./token-goat-chunk-4NS4CAKI.mjs";
|
|
44
44
|
import {
|
|
45
45
|
getBashOutput,
|
|
46
46
|
isGeneratedFile,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
isLockFile,
|
|
49
49
|
isManifestFile,
|
|
50
50
|
storeBashOutputSync
|
|
51
|
-
} from "./token-goat-chunk-
|
|
51
|
+
} from "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
52
52
|
import {
|
|
53
53
|
DEFAULT_MAX_AGE_MS,
|
|
54
54
|
SOURCE_HINT,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
savedTokensFromBytes,
|
|
61
61
|
summarize,
|
|
62
62
|
sweepCacheRoots
|
|
63
|
-
} from "./token-goat-chunk-
|
|
63
|
+
} from "./token-goat-chunk-YVCGELLH.mjs";
|
|
64
64
|
import {
|
|
65
65
|
parse
|
|
66
66
|
} from "./token-goat-chunk-3BTK54F3.mjs";
|
|
@@ -94,13 +94,13 @@ import {
|
|
|
94
94
|
maxChunksEmbedSha,
|
|
95
95
|
parseSourceSymbolsTreeSitterOnly,
|
|
96
96
|
parserFingerprintForLanguage
|
|
97
|
-
} from "./token-goat-chunk-
|
|
97
|
+
} from "./token-goat-chunk-646GCK7P.mjs";
|
|
98
98
|
import {
|
|
99
99
|
getFileEntry,
|
|
100
100
|
pathEqClause,
|
|
101
101
|
projectScopeClause,
|
|
102
102
|
querySymbols
|
|
103
|
-
} from "./token-goat-chunk-
|
|
103
|
+
} from "./token-goat-chunk-LPOEPINH.mjs";
|
|
104
104
|
import {
|
|
105
105
|
detectLanguage,
|
|
106
106
|
detectLanguageOfFile,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
getDb,
|
|
109
109
|
languageHasFlag,
|
|
110
110
|
redactIfDotenv
|
|
111
|
-
} from "./token-goat-chunk-
|
|
111
|
+
} from "./token-goat-chunk-CTPTUL7L.mjs";
|
|
112
112
|
import {
|
|
113
113
|
detectHarness,
|
|
114
114
|
fileIsAbsent,
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
ownGet,
|
|
123
123
|
resolveProjectRoot,
|
|
124
124
|
shortFingerprint
|
|
125
|
-
} from "./token-goat-chunk-
|
|
125
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
126
126
|
import {
|
|
127
127
|
registerReset
|
|
128
128
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
statSize,
|
|
153
153
|
toKB,
|
|
154
154
|
tokenGoatHome
|
|
155
|
-
} from "./token-goat-chunk-
|
|
155
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
156
156
|
import {
|
|
157
157
|
TOOL_RESULTS_ID_CHARS,
|
|
158
158
|
displaySafeJson,
|
|
@@ -1354,7 +1354,7 @@ ${dataUrl2}`);
|
|
|
1354
1354
|
}
|
|
1355
1355
|
recordStat("image_shrink", shrinkSaved, shrinkTokens, void 0, basename10);
|
|
1356
1356
|
if (loadConfig().image_shrink.ocr_enabled) {
|
|
1357
|
-
const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-
|
|
1357
|
+
const { ocrImage, isTextHeavy, formatOcrSummary } = await import("./token-goat-chunk-273O227F.mjs");
|
|
1358
1358
|
const ocr = await ocrImage(result.data);
|
|
1359
1359
|
if (ocr !== null && isTextHeavy(ocr, loadConfig().image_shrink.ocr_min_confidence)) {
|
|
1360
1360
|
const emitted = formatOcrSummary(ocr, basename10, result.originalBytes);
|
|
@@ -1534,6 +1534,7 @@ function removeFileFromIndex(db, filePath) {
|
|
|
1534
1534
|
const tx = db.transaction(() => {
|
|
1535
1535
|
deleteFileRows(db, filePath);
|
|
1536
1536
|
deleteFileEmbeddings(db, filePath);
|
|
1537
|
+
db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`).run(foldPath(filePath));
|
|
1537
1538
|
});
|
|
1538
1539
|
tx.immediate();
|
|
1539
1540
|
}
|
|
@@ -1638,6 +1639,31 @@ function orphanedChunkGroups(db) {
|
|
|
1638
1639
|
}
|
|
1639
1640
|
return [...byFolded.values()];
|
|
1640
1641
|
}
|
|
1642
|
+
function findDeadRetryPaths(dbPath = globalDbPath()) {
|
|
1643
|
+
const rows = getDb(dbPath).prepare("SELECT path FROM index_retries").all();
|
|
1644
|
+
return rows.map((r) => r.path).filter(pathIsGone);
|
|
1645
|
+
}
|
|
1646
|
+
function pathIsGone(p) {
|
|
1647
|
+
try {
|
|
1648
|
+
return fs6.statSync(p, { throwIfNoEntry: false }) === void 0;
|
|
1649
|
+
} catch {
|
|
1650
|
+
return false;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
function pruneDeadRetryRows(dbPath = globalDbPath()) {
|
|
1654
|
+
const db = getDb(dbPath);
|
|
1655
|
+
const stmt = db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`);
|
|
1656
|
+
const removed = [];
|
|
1657
|
+
for (const p of findDeadRetryPaths(dbPath)) {
|
|
1658
|
+
if (!pathIsGone(p)) continue;
|
|
1659
|
+
try {
|
|
1660
|
+
stmt.run(foldPath(p));
|
|
1661
|
+
removed.push(p);
|
|
1662
|
+
} catch {
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
return removed;
|
|
1666
|
+
}
|
|
1641
1667
|
function pruneOrphanedChunks(dbPath = globalDbPath()) {
|
|
1642
1668
|
const db = getDb(dbPath);
|
|
1643
1669
|
const removed = [];
|
|
@@ -1674,6 +1700,7 @@ function sweepKnownRoots(dbPath = globalDbPath(), opts) {
|
|
|
1674
1700
|
const db = getDb(dbPath);
|
|
1675
1701
|
const now = opts?.now ?? Date.now();
|
|
1676
1702
|
const graceMs = opts?.missingGraceMs ?? KNOWN_ROOT_MISSING_GRACE_MS;
|
|
1703
|
+
const dryRun = opts?.dryRun === true;
|
|
1677
1704
|
const roots = db.prepare("SELECT root, first_missing_ms FROM known_roots").all();
|
|
1678
1705
|
let prunedRows = 0;
|
|
1679
1706
|
const prunedRoots = [];
|
|
@@ -1688,17 +1715,17 @@ function sweepKnownRoots(dbPath = globalDbPath(), opts) {
|
|
|
1688
1715
|
}
|
|
1689
1716
|
if (!reachable) {
|
|
1690
1717
|
if (firstMissingMs === null) {
|
|
1691
|
-
db.prepare("UPDATE known_roots SET first_missing_ms = ? WHERE root = ?").run(now, root);
|
|
1718
|
+
if (!dryRun) db.prepare("UPDATE known_roots SET first_missing_ms = ? WHERE root = ?").run(now, root);
|
|
1692
1719
|
continue;
|
|
1693
1720
|
}
|
|
1694
1721
|
if (now - firstMissingMs < graceMs) continue;
|
|
1695
|
-
const count = pruneDeletedFiles(root, dbPath);
|
|
1722
|
+
const count = dryRun ? findDeletablePaths(root, dbPath).length : pruneDeletedFiles(root, dbPath);
|
|
1696
1723
|
prunedRows += count;
|
|
1697
1724
|
if (count > 0) prunedRoots.push(root);
|
|
1698
|
-
db.prepare("DELETE FROM known_roots WHERE root = ?").run(root);
|
|
1725
|
+
if (!dryRun) db.prepare("DELETE FROM known_roots WHERE root = ?").run(root);
|
|
1699
1726
|
continue;
|
|
1700
1727
|
}
|
|
1701
|
-
if (firstMissingMs !== null) {
|
|
1728
|
+
if (firstMissingMs !== null && !dryRun) {
|
|
1702
1729
|
db.prepare("UPDATE known_roots SET first_missing_ms = NULL WHERE root = ?").run(root);
|
|
1703
1730
|
}
|
|
1704
1731
|
const total = countFilesUnderRoot(root, dbPath);
|
|
@@ -1709,12 +1736,20 @@ function sweepKnownRoots(dbPath = globalDbPath(), opts) {
|
|
|
1709
1736
|
flaggedRoots.push(root);
|
|
1710
1737
|
continue;
|
|
1711
1738
|
}
|
|
1712
|
-
prunedRows += removeDeletedFilesBestEffort(db, deletable).length;
|
|
1739
|
+
prunedRows += dryRun ? deletable.length : removeDeletedFilesBestEffort(db, deletable).length;
|
|
1713
1740
|
prunedRoots.push(root);
|
|
1714
1741
|
}
|
|
1715
|
-
const prunedOrphanChunkPaths = pruneOrphanedChunks(dbPath);
|
|
1716
|
-
const prunedOrphanVectors = pruneOrphanedVectors(dbPath);
|
|
1717
|
-
|
|
1742
|
+
const prunedOrphanChunkPaths = dryRun ? findOrphanedChunkPaths(dbPath) : pruneOrphanedChunks(dbPath);
|
|
1743
|
+
const prunedOrphanVectors = dryRun ? 0 : pruneOrphanedVectors(dbPath);
|
|
1744
|
+
const prunedDeadRetryPaths = dryRun ? findDeadRetryPaths(dbPath) : pruneDeadRetryRows(dbPath);
|
|
1745
|
+
return {
|
|
1746
|
+
prunedRows,
|
|
1747
|
+
prunedRoots,
|
|
1748
|
+
flaggedRoots,
|
|
1749
|
+
prunedOrphanChunkPaths,
|
|
1750
|
+
prunedOrphanVectors,
|
|
1751
|
+
prunedDeadRetryPaths
|
|
1752
|
+
};
|
|
1718
1753
|
}
|
|
1719
1754
|
function findTopIndexedProjects(dbPath = globalDbPath(), limit = 3) {
|
|
1720
1755
|
try {
|
|
@@ -2158,13 +2193,13 @@ function bumpRetryCount(dbPath, absPath) {
|
|
|
2158
2193
|
const normalized = normalizePath(absPath);
|
|
2159
2194
|
const folded = foldPath(normalized);
|
|
2160
2195
|
const tx = db.transaction(() => {
|
|
2161
|
-
const row = db.prepare(`SELECT retry_count FROM
|
|
2196
|
+
const row = db.prepare(`SELECT retry_count FROM index_retries WHERE ${pathEqClause("path")}`).get(folded);
|
|
2162
2197
|
if (row !== void 0) {
|
|
2163
2198
|
const next = (row.retry_count ?? 0) + 1;
|
|
2164
|
-
db.prepare(`UPDATE
|
|
2199
|
+
db.prepare(`UPDATE index_retries SET retry_count = ? WHERE ${pathEqClause("path")}`).run(next, folded);
|
|
2165
2200
|
return next;
|
|
2166
2201
|
}
|
|
2167
|
-
db.prepare("INSERT INTO
|
|
2202
|
+
db.prepare("INSERT INTO index_retries (path, retry_count) VALUES (?, 1)").run(normalized);
|
|
2168
2203
|
return 1;
|
|
2169
2204
|
});
|
|
2170
2205
|
return tx.immediate();
|
|
@@ -2173,7 +2208,7 @@ function clearRetryCount(dbPath, absPath) {
|
|
|
2173
2208
|
try {
|
|
2174
2209
|
const db = getDb(dbPath);
|
|
2175
2210
|
const folded = foldPath(normalizePath(absPath));
|
|
2176
|
-
db.prepare(`
|
|
2211
|
+
db.prepare(`DELETE FROM index_retries WHERE ${pathEqClause("path")}`).run(folded);
|
|
2177
2212
|
} catch {
|
|
2178
2213
|
}
|
|
2179
2214
|
}
|
|
@@ -7313,9 +7348,7 @@ export {
|
|
|
7313
7348
|
pruneBlockedRoot,
|
|
7314
7349
|
findSystemTempFiles,
|
|
7315
7350
|
pruneSystemTempFiles,
|
|
7316
|
-
|
|
7317
|
-
pruneOrphanedChunks,
|
|
7318
|
-
pruneOrphanedVectors,
|
|
7351
|
+
sweepKnownRoots,
|
|
7319
7352
|
findTopIndexedProjects,
|
|
7320
7353
|
indexSizeBytes,
|
|
7321
7354
|
reclaimIndex,
|
|
@@ -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-ONXXR7MS.mjs";
|
|
7
7
|
import {
|
|
8
8
|
NotAnOfficeDocumentError,
|
|
9
9
|
assertOoxmlWithinDeadline,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ooxmlWorkDeadline,
|
|
13
13
|
parseOoxmlPart,
|
|
14
14
|
readOoxmlZip
|
|
15
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-SLE5MVTU.mjs";
|
|
16
16
|
import {
|
|
17
17
|
displaySafeText
|
|
18
18
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
dispatchArgv,
|
|
8
8
|
filterByName,
|
|
9
9
|
selectFilter
|
|
10
|
-
} from "./token-goat-chunk-
|
|
10
|
+
} from "./token-goat-chunk-TD5JS4ST.mjs";
|
|
11
11
|
import {
|
|
12
12
|
capTokens,
|
|
13
13
|
shlexSplit,
|
|
14
14
|
storeBashOutputSync
|
|
15
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
recordStat
|
|
18
|
-
} from "./token-goat-chunk-
|
|
18
|
+
} from "./token-goat-chunk-YVCGELLH.mjs";
|
|
19
19
|
import {
|
|
20
20
|
detectHarness,
|
|
21
21
|
loadConfig
|
|
22
|
-
} from "./token-goat-chunk-
|
|
22
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
23
23
|
import {
|
|
24
24
|
init_define_import_meta_env
|
|
25
25
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
cmdUpgrade,
|
|
6
6
|
compareSemver,
|
|
7
7
|
fetchLatestVersion
|
|
8
|
-
} from "./token-goat-chunk-
|
|
9
|
-
import "./token-goat-chunk-
|
|
8
|
+
} from "./token-goat-chunk-G7NIU2HH.mjs";
|
|
9
|
+
import "./token-goat-chunk-DN4HSMH7.mjs";
|
|
10
10
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
11
|
-
import "./token-goat-chunk-
|
|
11
|
+
import "./token-goat-chunk-K5KG65OI.mjs";
|
|
12
12
|
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
13
13
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
14
14
|
import "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -44,15 +44,15 @@ import {
|
|
|
44
44
|
trimRepeatedPrefix,
|
|
45
45
|
truncateMiddleSmart,
|
|
46
46
|
truncateTableRows
|
|
47
|
-
} from "./token-goat-chunk-
|
|
47
|
+
} from "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
48
48
|
import {
|
|
49
49
|
redactSecrets,
|
|
50
50
|
savedTokensFromBytes,
|
|
51
51
|
stripAnsiEscapes
|
|
52
|
-
} from "./token-goat-chunk-
|
|
52
|
+
} from "./token-goat-chunk-YVCGELLH.mjs";
|
|
53
53
|
import {
|
|
54
54
|
loadConfig
|
|
55
|
-
} from "./token-goat-chunk-
|
|
55
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
56
56
|
import {
|
|
57
57
|
resolveIndexPath
|
|
58
58
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
@@ -3,14 +3,14 @@ const require = __cjsRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
findLatestTranscript,
|
|
5
5
|
readFileLines
|
|
6
|
-
} from "./token-goat-chunk-
|
|
6
|
+
} from "./token-goat-chunk-HCEW3KTN.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotCliUserRoot,
|
|
9
9
|
readCopilotMcpTools
|
|
10
|
-
} from "./token-goat-chunk-
|
|
10
|
+
} from "./token-goat-chunk-CVPCUQON.mjs";
|
|
11
11
|
import {
|
|
12
12
|
canonicalize
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
14
14
|
import {
|
|
15
15
|
init_define_import_meta_env
|
|
16
16
|
} from "./token-goat-chunk-A37V4PBF.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-ZO6OALTM.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extractShellBannerHeading
|
|
31
|
-
} from "./token-goat-chunk-
|
|
32
|
-
import "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-646GCK7P.mjs";
|
|
32
|
+
import "./token-goat-chunk-LPOEPINH.mjs";
|
|
33
33
|
import {
|
|
34
34
|
GENERIC_CLAUSE,
|
|
35
35
|
assignBraceBlockSpans,
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
findHtmlHeadingMatches,
|
|
41
41
|
findMatchingBraceEndLine,
|
|
42
42
|
isInsideStringLiteral,
|
|
43
|
+
lineTextAt,
|
|
43
44
|
makeLineSymbol,
|
|
44
45
|
makeSpanSymbol,
|
|
45
46
|
makeSymbolEmitter,
|
|
@@ -58,15 +59,15 @@ import {
|
|
|
58
59
|
stripMultilineStringSpan,
|
|
59
60
|
stripStringLiterals,
|
|
60
61
|
stripXmlComments
|
|
61
|
-
} from "./token-goat-chunk-
|
|
62
|
-
import "./token-goat-chunk-
|
|
62
|
+
} from "./token-goat-chunk-CTPTUL7L.mjs";
|
|
63
|
+
import "./token-goat-chunk-DN4HSMH7.mjs";
|
|
63
64
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
64
65
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
65
66
|
import {
|
|
66
67
|
countContentLines,
|
|
67
68
|
escapeRegExp,
|
|
68
69
|
pushAll
|
|
69
|
-
} from "./token-goat-chunk-
|
|
70
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
70
71
|
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
71
72
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
72
73
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -4403,12 +4404,6 @@ function componentName(filePath) {
|
|
|
4403
4404
|
const normalized = filePath.replaceAll("\\", "/");
|
|
4404
4405
|
return path3.posix.basename(normalized).replace(/\.[^.]+$/, "");
|
|
4405
4406
|
}
|
|
4406
|
-
function matchLine(content, offset) {
|
|
4407
|
-
return content.slice(0, offset).split("\n").length;
|
|
4408
|
-
}
|
|
4409
|
-
function lineContext(content, line) {
|
|
4410
|
-
return content.split("\n")[line - 1]?.trim() ?? "";
|
|
4411
|
-
}
|
|
4412
4407
|
function blankJsStringLiterals(content) {
|
|
4413
4408
|
let out = "";
|
|
4414
4409
|
let i = 0;
|
|
@@ -4464,13 +4459,14 @@ function isComponentTag(tag, allowKebab) {
|
|
|
4464
4459
|
}
|
|
4465
4460
|
function extractComponentRefs(markup, filePath, startLine, allowKebab) {
|
|
4466
4461
|
const refs = [];
|
|
4462
|
+
const lineIndex = buildLineIndex(markup);
|
|
4467
4463
|
for (const m of markup.matchAll(OPEN_TAG_RE)) {
|
|
4468
4464
|
const tag = m[1] ?? "";
|
|
4469
4465
|
if (!tag || !isComponentTag(tag, allowKebab)) continue;
|
|
4470
4466
|
const offset = m.index ?? 0;
|
|
4471
|
-
const relLine =
|
|
4467
|
+
const relLine = offsetToLine(lineIndex, offset);
|
|
4472
4468
|
const line = startLine - 1 + relLine;
|
|
4473
|
-
refs.push({ filePath, name: tag, line, col: 0, context:
|
|
4469
|
+
refs.push({ filePath, name: tag, line, col: 0, context: lineTextAt(markup, lineIndex, relLine) });
|
|
4474
4470
|
}
|
|
4475
4471
|
return refs;
|
|
4476
4472
|
}
|
|
@@ -6,34 +6,34 @@ import {
|
|
|
6
6
|
getToolName,
|
|
7
7
|
getTrackedFiles,
|
|
8
8
|
scanAndRecord
|
|
9
|
-
} from "./token-goat-chunk-
|
|
9
|
+
} from "./token-goat-chunk-N3UUZAYN.mjs";
|
|
10
10
|
import {
|
|
11
11
|
RECALL_DEFAULT_LIMIT,
|
|
12
12
|
indexRecallEntry,
|
|
13
13
|
listRecentRecall,
|
|
14
14
|
searchRecall
|
|
15
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
isBlobStale,
|
|
18
18
|
loadBlob,
|
|
19
19
|
redactSecrets,
|
|
20
20
|
storeBlob
|
|
21
|
-
} from "./token-goat-chunk-
|
|
21
|
+
} from "./token-goat-chunk-YVCGELLH.mjs";
|
|
22
22
|
import {
|
|
23
23
|
parserFingerprintForLanguage
|
|
24
|
-
} from "./token-goat-chunk-
|
|
24
|
+
} from "./token-goat-chunk-646GCK7P.mjs";
|
|
25
25
|
import {
|
|
26
26
|
getProjectFileEntries,
|
|
27
27
|
projectScopeClause
|
|
28
|
-
} from "./token-goat-chunk-
|
|
28
|
+
} from "./token-goat-chunk-LPOEPINH.mjs";
|
|
29
29
|
import {
|
|
30
30
|
getDb
|
|
31
|
-
} from "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-CTPTUL7L.mjs";
|
|
32
32
|
import {
|
|
33
33
|
fingerprintFile,
|
|
34
34
|
getDisplayRoot,
|
|
35
35
|
shortFingerprint
|
|
36
|
-
} from "./token-goat-chunk-
|
|
36
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
37
37
|
import {
|
|
38
38
|
registerReset
|
|
39
39
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
foldPath,
|
|
45
45
|
globalDbPath,
|
|
46
46
|
pad
|
|
47
|
-
} from "./token-goat-chunk-
|
|
47
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
48
48
|
import {
|
|
49
49
|
UNTRUSTED_TOOL_TAG,
|
|
50
50
|
UNTRUSTED_WEB_TAG,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
external_exports
|
|
5
|
-
} from "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-3U6ZYVX5.mjs";
|
|
6
6
|
import {
|
|
7
7
|
init_define_import_meta_env
|
|
8
8
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createRequire as __cjsRequire } from 'node:module';
|
|
2
|
+
const require = __cjsRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
buildEvent,
|
|
5
|
+
relay,
|
|
6
|
+
relayInProcess
|
|
7
|
+
} from "./token-goat-chunk-765U7OJS.mjs";
|
|
8
|
+
import "./token-goat-chunk-OSLK5MBY.mjs";
|
|
9
|
+
import {
|
|
10
|
+
MAX_STDIN_BYTES,
|
|
11
|
+
readStdinJson
|
|
12
|
+
} from "./token-goat-chunk-VVPAGLLE.mjs";
|
|
13
|
+
import "./token-goat-chunk-HCEW3KTN.mjs";
|
|
14
|
+
import "./token-goat-chunk-75DLQORE.mjs";
|
|
15
|
+
import "./token-goat-chunk-N3UUZAYN.mjs";
|
|
16
|
+
import "./token-goat-chunk-TD5JS4ST.mjs";
|
|
17
|
+
import "./token-goat-chunk-CVPCUQON.mjs";
|
|
18
|
+
import "./token-goat-chunk-JGQ2SBAA.mjs";
|
|
19
|
+
import "./token-goat-chunk-4NS4CAKI.mjs";
|
|
20
|
+
import "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
21
|
+
import "./token-goat-chunk-YVCGELLH.mjs";
|
|
22
|
+
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
23
|
+
import "./token-goat-chunk-646GCK7P.mjs";
|
|
24
|
+
import "./token-goat-chunk-LPOEPINH.mjs";
|
|
25
|
+
import "./token-goat-chunk-CTPTUL7L.mjs";
|
|
26
|
+
import "./token-goat-chunk-DN4HSMH7.mjs";
|
|
27
|
+
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
28
|
+
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
29
|
+
import "./token-goat-chunk-K5KG65OI.mjs";
|
|
30
|
+
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
31
|
+
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
32
|
+
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
33
|
+
import "./token-goat-chunk-RRNZMM3A.mjs";
|
|
34
|
+
import "./token-goat-chunk-A37V4PBF.mjs";
|
|
35
|
+
export {
|
|
36
|
+
MAX_STDIN_BYTES,
|
|
37
|
+
buildEvent,
|
|
38
|
+
readStdinJson,
|
|
39
|
+
relay,
|
|
40
|
+
relayInProcess
|
|
41
|
+
};
|
|
@@ -8,23 +8,23 @@ import {
|
|
|
8
8
|
redactSecrets,
|
|
9
9
|
storeBlob,
|
|
10
10
|
stripAnsiEscapes
|
|
11
|
-
} from "./token-goat-chunk-
|
|
11
|
+
} from "./token-goat-chunk-YVCGELLH.mjs";
|
|
12
12
|
import {
|
|
13
13
|
sanitizeFtsQuery
|
|
14
|
-
} from "./token-goat-chunk-
|
|
14
|
+
} from "./token-goat-chunk-LPOEPINH.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getDb
|
|
17
|
-
} from "./token-goat-chunk-
|
|
17
|
+
} from "./token-goat-chunk-CTPTUL7L.mjs";
|
|
18
18
|
import {
|
|
19
19
|
shortFingerprint
|
|
20
|
-
} from "./token-goat-chunk-
|
|
20
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
21
21
|
import {
|
|
22
22
|
registerReset
|
|
23
23
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
24
24
|
import {
|
|
25
25
|
globalDbPath,
|
|
26
26
|
runGit
|
|
27
|
-
} from "./token-goat-chunk-
|
|
27
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
28
28
|
import {
|
|
29
29
|
normalizePath
|
|
30
30
|
} from "./token-goat-chunk-NMTKNYGF.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-CTPTUL7L.mjs";
|
|
6
6
|
import {
|
|
7
7
|
getHarnessName,
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./token-goat-chunk-
|
|
9
|
+
} from "./token-goat-chunk-DN4HSMH7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
registerReset
|
|
12
12
|
} from "./token-goat-chunk-EEIDFMEM.mjs";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
extractErrorMessage,
|
|
24
24
|
sanitizeIdForFilename,
|
|
25
25
|
tokenGoatHome
|
|
26
|
-
} from "./token-goat-chunk-
|
|
26
|
+
} from "./token-goat-chunk-K5KG65OI.mjs";
|
|
27
27
|
import {
|
|
28
28
|
displaySafeText
|
|
29
29
|
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
stripMultilineStringSpan,
|
|
11
11
|
stripNestedBlockCommentSpan,
|
|
12
12
|
stripStringLiterals
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-CTPTUL7L.mjs";
|
|
14
14
|
import {
|
|
15
15
|
init_define_import_meta_env
|
|
16
16
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
package/dist/token-goat-hook.mjs
CHANGED
|
@@ -2,26 +2,26 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
relayInProcess
|
|
5
|
-
} from "./token-goat-chunk-
|
|
6
|
-
import "./token-goat-chunk-
|
|
7
|
-
import "./token-goat-chunk-
|
|
8
|
-
import "./token-goat-chunk-
|
|
9
|
-
import "./token-goat-chunk-
|
|
10
|
-
import "./token-goat-chunk-
|
|
11
|
-
import "./token-goat-chunk-
|
|
12
|
-
import "./token-goat-chunk-
|
|
13
|
-
import "./token-goat-chunk-
|
|
14
|
-
import "./token-goat-chunk-
|
|
15
|
-
import "./token-goat-chunk-
|
|
16
|
-
import "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-765U7OJS.mjs";
|
|
6
|
+
import "./token-goat-chunk-OSLK5MBY.mjs";
|
|
7
|
+
import "./token-goat-chunk-VVPAGLLE.mjs";
|
|
8
|
+
import "./token-goat-chunk-HCEW3KTN.mjs";
|
|
9
|
+
import "./token-goat-chunk-75DLQORE.mjs";
|
|
10
|
+
import "./token-goat-chunk-N3UUZAYN.mjs";
|
|
11
|
+
import "./token-goat-chunk-TD5JS4ST.mjs";
|
|
12
|
+
import "./token-goat-chunk-CVPCUQON.mjs";
|
|
13
|
+
import "./token-goat-chunk-JGQ2SBAA.mjs";
|
|
14
|
+
import "./token-goat-chunk-4NS4CAKI.mjs";
|
|
15
|
+
import "./token-goat-chunk-YHCUBOVZ.mjs";
|
|
16
|
+
import "./token-goat-chunk-YVCGELLH.mjs";
|
|
17
17
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
18
|
-
import "./token-goat-chunk-
|
|
19
|
-
import "./token-goat-chunk-
|
|
20
|
-
import "./token-goat-chunk-
|
|
21
|
-
import "./token-goat-chunk-
|
|
18
|
+
import "./token-goat-chunk-646GCK7P.mjs";
|
|
19
|
+
import "./token-goat-chunk-LPOEPINH.mjs";
|
|
20
|
+
import "./token-goat-chunk-CTPTUL7L.mjs";
|
|
21
|
+
import "./token-goat-chunk-DN4HSMH7.mjs";
|
|
22
22
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
23
23
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
24
|
-
import "./token-goat-chunk-
|
|
24
|
+
import "./token-goat-chunk-K5KG65OI.mjs";
|
|
25
25
|
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
26
26
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
27
27
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|