token-goat 2.9.18 → 2.9.19
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 +2 -0
- package/dist/{token-goat-chunk-V3ZWBEHM.mjs → token-goat-chunk-2GTB5RBZ.mjs} +365 -26
- package/dist/{token-goat-chunk-ARNRFR6M.mjs → token-goat-chunk-3W5P673V.mjs} +1 -1
- package/dist/{token-goat-chunk-YQZE5NS6.mjs → token-goat-chunk-62VJ47WN.mjs} +6 -6
- package/dist/{token-goat-chunk-CTOYJ232.mjs → token-goat-chunk-7DGTVBWP.mjs} +45 -8
- package/dist/{token-goat-chunk-5MMJAJF3.mjs → token-goat-chunk-AVRD7SBO.mjs} +60 -8
- package/dist/{token-goat-chunk-7VLWNQDQ.mjs → token-goat-chunk-BTKDZW7F.mjs} +1 -1
- package/dist/{token-goat-chunk-LMFO66YD.mjs → token-goat-chunk-DA43OE7L.mjs} +1 -1
- package/dist/{token-goat-chunk-6LGVCCMY.mjs → token-goat-chunk-DA6TIDLI.mjs} +21 -16
- package/dist/{token-goat-chunk-UENEL6KX.mjs → token-goat-chunk-DHIXE6GV.mjs} +2 -2
- package/dist/{token-goat-chunk-W3E65QOW.mjs → token-goat-chunk-EP7TCWHM.mjs} +304 -46
- package/dist/{token-goat-chunk-HIZXQVNU.mjs → token-goat-chunk-EXLLLIC3.mjs} +4 -4
- package/dist/{token-goat-chunk-H3FONFBO.mjs → token-goat-chunk-F24NE3FO.mjs} +3 -3
- package/dist/{token-goat-chunk-LA3O4JGD.mjs → token-goat-chunk-FJZ5MZK7.mjs} +3 -3
- package/dist/{token-goat-chunk-BFEWOMA3.mjs → token-goat-chunk-FQYMZASI.mjs} +632 -352
- package/dist/{token-goat-chunk-OWSJJY5R.mjs → token-goat-chunk-FX5DHKGF.mjs} +5 -5
- package/dist/{token-goat-chunk-K4DG6EEF.mjs → token-goat-chunk-GYC34EGE.mjs} +7 -8
- package/dist/{token-goat-chunk-WFX2V3OF.mjs → token-goat-chunk-HPMMLV37.mjs} +358 -116
- package/dist/{token-goat-chunk-I67CPTDD.mjs → token-goat-chunk-IBTFGZBX.mjs} +19 -14
- package/dist/{token-goat-chunk-L7VCX33I.mjs → token-goat-chunk-JNIFSVWM.mjs} +36 -10
- package/dist/{token-goat-chunk-EPXNOKIV.mjs → token-goat-chunk-KWM6KBPA.mjs} +2 -2
- package/dist/{token-goat-chunk-BWCRC23L.mjs → token-goat-chunk-L2UOJBV4.mjs} +21 -20
- package/dist/{token-goat-chunk-52IMXJ2L.mjs → token-goat-chunk-LACH3WKS.mjs} +4 -4
- package/dist/token-goat-chunk-MU6I4IDI.mjs +337 -0
- package/dist/{token-goat-chunk-GRI6HWX3.mjs → token-goat-chunk-NJKNAC37.mjs} +1 -1
- package/dist/{token-goat-chunk-ERTXEKB6.mjs → token-goat-chunk-NMTKNYGF.mjs} +2 -0
- package/dist/{token-goat-chunk-34OUJ2IE.mjs → token-goat-chunk-NYFYIRG3.mjs} +12 -12
- package/dist/{token-goat-chunk-4EXFN2AW.mjs → token-goat-chunk-OZRSREKR.mjs} +2 -2
- package/dist/token-goat-chunk-P46RTOAQ.mjs +27 -0
- package/dist/{token-goat-chunk-QML7ITHJ.mjs → token-goat-chunk-PIAESKVU.mjs} +139 -23
- package/dist/{token-goat-chunk-HPOFR6QX.mjs → token-goat-chunk-S7RFIX4Y.mjs} +180 -50
- package/dist/{token-goat-chunk-CA6V36KW.mjs → token-goat-chunk-SOKAPOOC.mjs} +23 -4
- package/dist/token-goat-chunk-VJQBYSXG.mjs +20 -0
- package/dist/{token-goat-chunk-LTYWLKAG.mjs → token-goat-chunk-WKO5TVNA.mjs} +922 -611
- package/dist/{token-goat-chunk-QIDLJGXZ.mjs → token-goat-chunk-ZGQXRYKE.mjs} +29 -5
- package/dist/token-goat-hook.mjs +12 -12
- package/dist/token-goat.core.mjs +21 -20
- package/docs/cli.md +2 -1
- package/docs/security.md +1 -1
- package/package.json +1 -1
- package/dist/token-goat-chunk-2KTZ6J7T.mjs +0 -173
- package/dist/token-goat-chunk-RHHFEXKF.mjs +0 -93
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
extractSwift,
|
|
26
26
|
extractThrift,
|
|
27
27
|
extractWgsl
|
|
28
|
-
} from "./token-goat-chunk-
|
|
28
|
+
} from "./token-goat-chunk-NJKNAC37.mjs";
|
|
29
29
|
import {
|
|
30
30
|
extractShellBannerHeading
|
|
31
|
-
} from "./token-goat-chunk-
|
|
32
|
-
import "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-EP7TCWHM.mjs";
|
|
32
|
+
import "./token-goat-chunk-IBTFGZBX.mjs";
|
|
33
33
|
import {
|
|
34
34
|
GENERIC_CLAUSE,
|
|
35
35
|
assignBraceBlockSpans,
|
|
@@ -58,16 +58,16 @@ 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-JNIFSVWM.mjs";
|
|
62
|
+
import "./token-goat-chunk-SOKAPOOC.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-
|
|
70
|
-
import "./token-goat-chunk-
|
|
69
|
+
} from "./token-goat-chunk-ZGQXRYKE.mjs";
|
|
70
|
+
import "./token-goat-chunk-NMTKNYGF.mjs";
|
|
71
71
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
72
72
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
73
73
|
import {
|
|
@@ -525,6 +525,54 @@ function isNoise(name) {
|
|
|
525
525
|
return NOISE_IDS_CLASSES.has(name.toLowerCase());
|
|
526
526
|
}
|
|
527
527
|
var MAX_SYMBOLS = 1e4;
|
|
528
|
+
var VOID_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]);
|
|
529
|
+
var TAG_RE = /<(\/?)([a-zA-Z][a-zA-Z0-9:-]*)(?:\s(?:"[^"]*"|'[^']*'|[^'">])*)?>/g;
|
|
530
|
+
var ELEMENT_SPAN_SCAN_CAP = 2e6;
|
|
531
|
+
function buildElementSpans(code) {
|
|
532
|
+
const spans = /* @__PURE__ */ new Map();
|
|
533
|
+
const openTagRanges = [];
|
|
534
|
+
const stack = [];
|
|
535
|
+
TAG_RE.lastIndex = 0;
|
|
536
|
+
let m;
|
|
537
|
+
while ((m = TAG_RE.exec(code)) !== null) {
|
|
538
|
+
if (m.index > ELEMENT_SPAN_SCAN_CAP) break;
|
|
539
|
+
const isClose = m[1] === "/";
|
|
540
|
+
const name = (m[2] ?? "").toLowerCase();
|
|
541
|
+
const selfClosing = m[0][m[0].length - 2] === "/";
|
|
542
|
+
const tagEnd = m.index + m[0].length;
|
|
543
|
+
if (isClose) {
|
|
544
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
545
|
+
if (stack[i].name === name) {
|
|
546
|
+
spans.set(stack[i].start, tagEnd);
|
|
547
|
+
stack.length = i;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
continue;
|
|
552
|
+
}
|
|
553
|
+
openTagRanges.push({ start: m.index, end: tagEnd });
|
|
554
|
+
if (selfClosing || VOID_ELEMENTS.has(name)) continue;
|
|
555
|
+
if (name === "style") {
|
|
556
|
+
const closeMatch = /<\/style\s*>/gi.exec(code.slice(tagEnd));
|
|
557
|
+
if (closeMatch !== null) TAG_RE.lastIndex = tagEnd + closeMatch.index + closeMatch[0].length;
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
stack.push({ name, start: m.index });
|
|
561
|
+
}
|
|
562
|
+
return { spans, openTagRanges };
|
|
563
|
+
}
|
|
564
|
+
function findEnclosingTagStart(openTagRanges, offset) {
|
|
565
|
+
let lo = 0;
|
|
566
|
+
let hi = openTagRanges.length - 1;
|
|
567
|
+
while (lo <= hi) {
|
|
568
|
+
const mid = lo + hi >> 1;
|
|
569
|
+
const range = openTagRanges[mid];
|
|
570
|
+
if (offset < range.start) hi = mid - 1;
|
|
571
|
+
else if (offset >= range.end) lo = mid + 1;
|
|
572
|
+
else return range.start;
|
|
573
|
+
}
|
|
574
|
+
return null;
|
|
575
|
+
}
|
|
528
576
|
function extractHtml(content, filePath) {
|
|
529
577
|
const symbols = [];
|
|
530
578
|
const imports = [];
|
|
@@ -550,6 +598,7 @@ function extractHtml(content, filePath) {
|
|
|
550
598
|
assignFlatEndLines(sections, totalLines);
|
|
551
599
|
const seenId = /* @__PURE__ */ new Set();
|
|
552
600
|
const seenClass = /* @__PURE__ */ new Set();
|
|
601
|
+
const { spans: elementSpans, openTagRanges } = buildElementSpans(code);
|
|
553
602
|
for (const m of code.matchAll(ID_RE)) {
|
|
554
603
|
if (symbols.length >= MAX_SYMBOLS) break;
|
|
555
604
|
const idVal = m[2] ?? "";
|
|
@@ -558,7 +607,10 @@ function extractHtml(content, filePath) {
|
|
|
558
607
|
const key = `${idVal}\0${line}`;
|
|
559
608
|
if (!seenId.has(key)) {
|
|
560
609
|
seenId.add(key);
|
|
561
|
-
|
|
610
|
+
const tagStart = findEnclosingTagStart(openTagRanges, m.index ?? 0);
|
|
611
|
+
const elementEnd = tagStart !== null ? elementSpans.get(tagStart) : void 0;
|
|
612
|
+
const lineEnd = elementEnd !== void 0 ? offsetToLine(lineIndex, elementEnd - 1) : line;
|
|
613
|
+
symbols.push({ filePath, name: idVal, kind: "html_id", lineStart: line, lineEnd, body: "", docstring: "", parent: "" });
|
|
562
614
|
}
|
|
563
615
|
}
|
|
564
616
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
createHandoff,
|
|
9
9
|
fileIdentity,
|
|
10
10
|
findSpecSeparator,
|
|
11
|
+
parseColonLineSpec,
|
|
11
12
|
parseLineRange,
|
|
12
13
|
pinKey,
|
|
13
14
|
resolveHandoff,
|
|
@@ -25,42 +26,43 @@ import {
|
|
|
25
26
|
runSkeleton,
|
|
26
27
|
runSymbol,
|
|
27
28
|
withPinnedReads
|
|
28
|
-
} from "./token-goat-chunk-
|
|
29
|
-
import "./token-goat-chunk-
|
|
30
|
-
import "./token-goat-chunk-
|
|
29
|
+
} from "./token-goat-chunk-PIAESKVU.mjs";
|
|
30
|
+
import "./token-goat-chunk-F24NE3FO.mjs";
|
|
31
|
+
import "./token-goat-chunk-DA43OE7L.mjs";
|
|
31
32
|
import {
|
|
32
33
|
buildProjectMap,
|
|
34
|
+
claudeConfigDir,
|
|
33
35
|
formatProjectMap,
|
|
34
36
|
getDirtyPathsFor,
|
|
35
37
|
getEmbeddingCoverage,
|
|
36
38
|
getProjectIndexCounts,
|
|
37
39
|
isWorkerRunning,
|
|
38
40
|
mapLookupBytesSaved
|
|
39
|
-
} from "./token-goat-chunk-
|
|
40
|
-
import "./token-goat-chunk-
|
|
41
|
+
} from "./token-goat-chunk-FQYMZASI.mjs";
|
|
42
|
+
import "./token-goat-chunk-7DGTVBWP.mjs";
|
|
41
43
|
import {
|
|
42
44
|
recordStat,
|
|
43
45
|
savedTokensFromBytes
|
|
44
|
-
} from "./token-goat-chunk-
|
|
46
|
+
} from "./token-goat-chunk-S7RFIX4Y.mjs";
|
|
45
47
|
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
46
|
-
import "./token-goat-chunk-
|
|
48
|
+
import "./token-goat-chunk-KWM6KBPA.mjs";
|
|
47
49
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
48
50
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
49
51
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
50
|
-
import "./token-goat-chunk-
|
|
52
|
+
import "./token-goat-chunk-NJKNAC37.mjs";
|
|
51
53
|
import {
|
|
52
54
|
checkEmbeddingPreflight,
|
|
53
55
|
embeddingsDepsAvailable
|
|
54
|
-
} from "./token-goat-chunk-
|
|
55
|
-
import "./token-goat-chunk-
|
|
56
|
+
} from "./token-goat-chunk-EP7TCWHM.mjs";
|
|
57
|
+
import "./token-goat-chunk-IBTFGZBX.mjs";
|
|
56
58
|
import {
|
|
57
59
|
getDb
|
|
58
|
-
} from "./token-goat-chunk-
|
|
60
|
+
} from "./token-goat-chunk-JNIFSVWM.mjs";
|
|
59
61
|
import {
|
|
60
62
|
envStrList,
|
|
61
63
|
loadConfig,
|
|
62
64
|
resolveProjectRoot
|
|
63
|
-
} from "./token-goat-chunk-
|
|
65
|
+
} from "./token-goat-chunk-SOKAPOOC.mjs";
|
|
64
66
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
65
67
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
66
68
|
import {
|
|
@@ -70,11 +72,11 @@ import {
|
|
|
70
72
|
extractErrorMessage,
|
|
71
73
|
foldCaseForContainment,
|
|
72
74
|
globalDbPath
|
|
73
|
-
} from "./token-goat-chunk-
|
|
75
|
+
} from "./token-goat-chunk-ZGQXRYKE.mjs";
|
|
74
76
|
import {
|
|
75
77
|
displaySafeJson,
|
|
76
78
|
normalizePath
|
|
77
|
-
} from "./token-goat-chunk-
|
|
79
|
+
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
78
80
|
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
79
81
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
80
82
|
import "./token-goat-chunk-RRNZMM3A.mjs";
|
|
@@ -170,10 +172,11 @@ var RootNotAllowedError = class extends Error {
|
|
|
170
172
|
};
|
|
171
173
|
function getStandardAuxiliaryRoots(targetPath) {
|
|
172
174
|
const home = os.homedir();
|
|
175
|
+
const claudeHome = claudeConfigDir(home);
|
|
173
176
|
const roots = [
|
|
174
|
-
path.join(
|
|
177
|
+
path.join(claudeHome, "skills"),
|
|
175
178
|
path.join(home, ".copilot", "skills"),
|
|
176
|
-
path.join(
|
|
179
|
+
path.join(claudeHome, "projects"),
|
|
177
180
|
path.join(home, ".copilot", "session-state")
|
|
178
181
|
];
|
|
179
182
|
const appData = process.env["APPDATA"] || path.join(home, "AppData", "Roaming");
|
|
@@ -244,6 +247,8 @@ function checkWithinProjectRoot(target, resolvedRoot) {
|
|
|
244
247
|
function specFilePart(spec) {
|
|
245
248
|
const range = parseLineRange(spec);
|
|
246
249
|
if (range !== null) return range.file;
|
|
250
|
+
const region = parseColonLineSpec(spec);
|
|
251
|
+
if (region !== null) return region.file;
|
|
247
252
|
const colonIdx = findSpecSeparator(spec);
|
|
248
253
|
return colonIdx === -1 ? spec : spec.slice(0, colonIdx);
|
|
249
254
|
}
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
ooxmlPartBudget,
|
|
12
12
|
parseOoxmlPart,
|
|
13
13
|
readOoxmlZip
|
|
14
|
-
} from "./token-goat-chunk-
|
|
14
|
+
} from "./token-goat-chunk-BTKDZW7F.mjs";
|
|
15
15
|
import {
|
|
16
16
|
displaySafeText
|
|
17
|
-
} from "./token-goat-chunk-
|
|
17
|
+
} from "./token-goat-chunk-NMTKNYGF.mjs";
|
|
18
18
|
import {
|
|
19
19
|
init_define_import_meta_env
|
|
20
20
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|