token-goat 2.9.15 → 2.9.17
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 -5
- package/dist/{token-goat-chunk-IVUQLQWN.mjs → token-goat-chunk-26YUO7MP.mjs} +5 -3
- package/dist/{token-goat-chunk-SZWYESBS.mjs → token-goat-chunk-2M33Q3O4.mjs} +172 -67
- package/dist/{token-goat-chunk-S4XRY446.mjs → token-goat-chunk-2VASS5VR.mjs} +4 -3
- package/dist/{token-goat-chunk-7ZYK25AO.mjs → token-goat-chunk-2XA5ZW4T.mjs} +4 -4
- package/dist/{token-goat-chunk-C5JIO6HK.mjs → token-goat-chunk-5WB7GDH4.mjs} +5 -5
- package/dist/{token-goat-chunk-MZDIJJ3R.mjs → token-goat-chunk-66224KCZ.mjs} +40 -3
- package/dist/{token-goat-chunk-NDRP4KJQ.mjs → token-goat-chunk-73GXYYZR.mjs} +248 -50
- package/dist/{token-goat-chunk-ATIFTMRC.mjs → token-goat-chunk-7EGKXBWT.mjs} +7 -7
- package/dist/{token-goat-chunk-GMQQA7E4.mjs → token-goat-chunk-7VQMOBPQ.mjs} +2453 -722
- package/dist/token-goat-chunk-BGHSSJUA.mjs +102 -0
- package/dist/{token-goat-chunk-2X2EBBC6.mjs → token-goat-chunk-BK3RPPTK.mjs} +2 -2
- package/dist/{token-goat-chunk-YQ7WI2CO.mjs → token-goat-chunk-C26ZBGBC.mjs} +393 -3957
- package/dist/{token-goat-chunk-SFAS46RE.mjs → token-goat-chunk-CICJFVIH.mjs} +2 -2
- package/dist/{token-goat-chunk-6DLVZDB6.mjs → token-goat-chunk-CKIJWTRQ.mjs} +13 -12
- package/dist/{token-goat-chunk-5V7DAC7V.mjs → token-goat-chunk-CPHVXKNU.mjs} +10 -3
- package/dist/{token-goat-chunk-LT7JRU6K.mjs → token-goat-chunk-EKGVCAES.mjs} +4 -4
- package/dist/{token-goat-chunk-Z6UXPYJA.mjs → token-goat-chunk-F2ARFHLJ.mjs} +1 -1
- package/dist/{token-goat-chunk-NDPO7GAH.mjs → token-goat-chunk-G75WIVFM.mjs} +21 -20
- package/dist/{token-goat-chunk-YZX7EFG4.mjs → token-goat-chunk-GLOM5W5C.mjs} +1 -1
- package/dist/{token-goat-chunk-GIIHUSZX.mjs → token-goat-chunk-GPCCYQSS.mjs} +41 -11
- package/dist/{token-goat-chunk-OUGNPMDA.mjs → token-goat-chunk-HRUGS6CO.mjs} +30 -14
- package/dist/{token-goat-chunk-LCZBPOIN.mjs → token-goat-chunk-IDHWKNKZ.mjs} +143 -51
- package/dist/{token-goat-chunk-YKG35VHC.mjs → token-goat-chunk-KZPO4DWC.mjs} +1 -1
- package/dist/{token-goat-chunk-NEI4NC54.mjs → token-goat-chunk-LKSXAMJB.mjs} +7 -2
- package/dist/{token-goat-chunk-K7F2BFIK.mjs → token-goat-chunk-MWSVUKVV.mjs} +1 -1
- package/dist/{token-goat-chunk-BL5LNGBG.mjs → token-goat-chunk-PKNOHVWP.mjs} +2966 -3869
- package/dist/{token-goat-chunk-A4JYKD5H.mjs → token-goat-chunk-RB24DBBS.mjs} +2 -2
- package/dist/{token-goat-chunk-3NSDDTGL.mjs → token-goat-chunk-RFFUCQK7.mjs} +5 -5
- package/dist/token-goat-chunk-RRNZMM3A.mjs +3364 -0
- package/dist/{token-goat-chunk-XEPXYDPI.mjs → token-goat-chunk-SWRKVA3J.mjs} +11 -2
- package/dist/{token-goat-chunk-NU7TLMQK.mjs → token-goat-chunk-THBLW56G.mjs} +10 -7
- package/dist/{token-goat-chunk-PM76YS22.mjs → token-goat-chunk-UBZCON6N.mjs} +1 -1
- package/dist/{token-goat-chunk-ASYEPR3S.mjs → token-goat-chunk-W2GUUQAQ.mjs} +7 -3
- package/dist/{token-goat-chunk-DQ4J5AFF.mjs → token-goat-chunk-YFGEUIEO.mjs} +69 -18
- package/dist/token-goat-hook.mjs +13 -12
- package/dist/token-goat.core.mjs +21 -20
- package/docs/cli.md +1 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
stripMultilineStringSpan,
|
|
11
11
|
stripNestedBlockCommentSpan,
|
|
12
12
|
stripStringLiterals
|
|
13
|
-
} from "./token-goat-chunk-
|
|
13
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
14
14
|
import {
|
|
15
15
|
init_define_import_meta_env
|
|
16
16
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -1748,6 +1748,15 @@ function isReturnType(typeText) {
|
|
|
1748
1748
|
const last = first.split(".").pop() ?? "";
|
|
1749
1749
|
return /^[A-Z]/.test(last);
|
|
1750
1750
|
}
|
|
1751
|
+
function withoutTypeParams(code) {
|
|
1752
|
+
if (!code.startsWith("<")) return code;
|
|
1753
|
+
let depth = 0;
|
|
1754
|
+
for (let i = 0; i < code.length; i++) {
|
|
1755
|
+
if (code[i] === "<") depth++;
|
|
1756
|
+
else if (code[i] === ">" && --depth === 0) return code.slice(i + 1).trimStart();
|
|
1757
|
+
}
|
|
1758
|
+
return code;
|
|
1759
|
+
}
|
|
1751
1760
|
function matchGroovy(code, ctx) {
|
|
1752
1761
|
const s = stripLeadingWords(code, MODIFIERS, true);
|
|
1753
1762
|
const at = code.length - s.length;
|
|
@@ -1763,7 +1772,7 @@ function matchGroovy(code, ctx) {
|
|
|
1763
1772
|
if (ctx.scope === "container" && TYPE_KINDS2.has(ctx.parentKind) && s.startsWith(ctx.parent) && /^\s*\(/.test(s.slice(ctx.parent.length))) {
|
|
1764
1773
|
return { name: ctx.parent, kind: "constructor", end: "brace" };
|
|
1765
1774
|
}
|
|
1766
|
-
const fn = cFunctionHeader(s);
|
|
1775
|
+
const fn = cFunctionHeader(withoutTypeParams(s));
|
|
1767
1776
|
if (fn !== null && fn.qualifier === "" && isReturnType(fn.typeText)) return { name: fn.name, kind: member, end: "brace" };
|
|
1768
1777
|
}
|
|
1769
1778
|
if (ctx.insideFunction) return null;
|
|
@@ -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-KZPO4DWC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
NotAnOfficeDocumentError,
|
|
9
9
|
assertOoxmlWithinDeadline,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
ooxmlWorkDeadline,
|
|
13
13
|
parseOoxmlPart,
|
|
14
14
|
readOoxmlZip
|
|
15
|
-
} from "./token-goat-chunk-
|
|
16
|
-
import {
|
|
17
|
-
DocumentRefusedError
|
|
18
|
-
} from "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
15
|
+
} from "./token-goat-chunk-66224KCZ.mjs";
|
|
19
16
|
import {
|
|
20
17
|
displaySafeText
|
|
21
18
|
} from "./token-goat-chunk-ERTXEKB6.mjs";
|
|
19
|
+
import {
|
|
20
|
+
DocumentRefusedError
|
|
21
|
+
} from "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
22
22
|
import {
|
|
23
23
|
init_define_import_meta_env
|
|
24
24
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -158,8 +158,9 @@ function buildCell(c, shared, styles, date1904) {
|
|
|
158
158
|
raw = { error: e };
|
|
159
159
|
text = e;
|
|
160
160
|
} else {
|
|
161
|
-
const
|
|
162
|
-
|
|
161
|
+
const vText = textOf(c["v"]);
|
|
162
|
+
const n = Number(vText);
|
|
163
|
+
if (vText.trim() === "" || !Number.isFinite(n)) {
|
|
163
164
|
raw = null;
|
|
164
165
|
text = "";
|
|
165
166
|
} else if (isDateStyle) {
|
|
@@ -364,6 +365,8 @@ function cellText(cell) {
|
|
|
364
365
|
if (Array.isArray(obj.richText)) return obj.richText.map((t) => t.text).join("");
|
|
365
366
|
if (typeof obj.error === "string") return obj.error;
|
|
366
367
|
if (obj.result !== void 0) {
|
|
368
|
+
if (obj.result === null) return "";
|
|
369
|
+
if (typeof obj.result === "boolean") return obj.result ? "TRUE" : "FALSE";
|
|
367
370
|
if (obj.result instanceof Date) return formatDateCell(obj.result);
|
|
368
371
|
if (typeof obj.result === "object" && obj.result !== null && typeof obj.result.error === "string") {
|
|
369
372
|
return obj.result.error;
|
|
@@ -21,7 +21,7 @@ init_define_import_meta_env();
|
|
|
21
21
|
import { createRequire } from "node:module";
|
|
22
22
|
function resolveVersion() {
|
|
23
23
|
if (true) {
|
|
24
|
-
return "2.9.
|
|
24
|
+
return "2.9.17";
|
|
25
25
|
}
|
|
26
26
|
const require2 = createRequire(import.meta.url);
|
|
27
27
|
const pkg = require2("../package.json");
|
|
@@ -6,12 +6,13 @@ import {
|
|
|
6
6
|
collectElements,
|
|
7
7
|
collectParagraphTexts,
|
|
8
8
|
decodeZipEntry,
|
|
9
|
+
inlineMathRuns,
|
|
9
10
|
ooxmlPartBudget,
|
|
10
11
|
ooxmlWorkDeadline,
|
|
11
12
|
parseOoxmlPart,
|
|
12
13
|
readOoxmlZip,
|
|
13
14
|
sortNumberedParts
|
|
14
|
-
} from "./token-goat-chunk-
|
|
15
|
+
} from "./token-goat-chunk-66224KCZ.mjs";
|
|
15
16
|
import {
|
|
16
17
|
compileGuardedRegex
|
|
17
18
|
} from "./token-goat-chunk-GMOUBOX4.mjs";
|
|
@@ -107,16 +108,19 @@ async function notesPathFor(entries, slidePath, budget) {
|
|
|
107
108
|
}
|
|
108
109
|
return null;
|
|
109
110
|
}
|
|
111
|
+
function inlineSlideMath(xml) {
|
|
112
|
+
return inlineMathRuns(xml, '<a:r><a:t xml:space="preserve">', "</a:t></a:r>").replace(/<a14:m(?:\s[^>]*)?>/g, "").replace(/<\/a14:m>/g, "");
|
|
113
|
+
}
|
|
110
114
|
async function parseSlide(entries, path, budget) {
|
|
111
115
|
const xml = decodeZipEntry(entries, path, budget);
|
|
112
116
|
if (xml === null) throw new Error(`missing part: ${path}`);
|
|
113
|
-
return parseOoxmlPart(xml);
|
|
117
|
+
return parseOoxmlPart(inlineSlideMath(xml));
|
|
114
118
|
}
|
|
115
119
|
async function notesTextFor(entries, notesPath, budget) {
|
|
116
120
|
if (notesPath === null) return "";
|
|
117
121
|
const xml = decodeZipEntry(entries, notesPath, budget);
|
|
118
122
|
if (xml === null) return "";
|
|
119
|
-
const parsed = await parseOoxmlPart(xml);
|
|
123
|
+
const parsed = await parseOoxmlPart(inlineSlideMath(xml));
|
|
120
124
|
const shapes = collectElements(parsed, "p:sp");
|
|
121
125
|
const bodyShape = shapes.find((s) => shapePlaceholderType(s) === "body");
|
|
122
126
|
return bodyShape !== void 0 ? shapeText(bodyShape) : flatSlideText(parsed);
|
|
@@ -25,7 +25,8 @@ import {
|
|
|
25
25
|
runSkeleton,
|
|
26
26
|
runSymbol,
|
|
27
27
|
withPinnedReads
|
|
28
|
-
} from "./token-goat-chunk-
|
|
28
|
+
} from "./token-goat-chunk-IDHWKNKZ.mjs";
|
|
29
|
+
import "./token-goat-chunk-CICJFVIH.mjs";
|
|
29
30
|
import "./token-goat-chunk-LMFO66YD.mjs";
|
|
30
31
|
import {
|
|
31
32
|
buildProjectMap,
|
|
@@ -35,33 +36,31 @@ import {
|
|
|
35
36
|
getProjectIndexCounts,
|
|
36
37
|
isWorkerRunning,
|
|
37
38
|
mapLookupBytesSaved
|
|
38
|
-
} from "./token-goat-chunk-
|
|
39
|
-
import "./token-goat-chunk-
|
|
40
|
-
import
|
|
41
|
-
|
|
39
|
+
} from "./token-goat-chunk-PKNOHVWP.mjs";
|
|
40
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
41
|
+
import {
|
|
42
|
+
recordStat,
|
|
43
|
+
savedTokensFromBytes
|
|
44
|
+
} from "./token-goat-chunk-26YUO7MP.mjs";
|
|
45
|
+
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
46
|
+
import "./token-goat-chunk-KZPO4DWC.mjs";
|
|
42
47
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
43
48
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
44
49
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
45
|
-
import "./token-goat-chunk-
|
|
50
|
+
import "./token-goat-chunk-SWRKVA3J.mjs";
|
|
46
51
|
import {
|
|
47
52
|
checkEmbeddingPreflight,
|
|
48
53
|
embeddingsDepsAvailable
|
|
49
|
-
} from "./token-goat-chunk-
|
|
50
|
-
import "./token-goat-chunk-
|
|
51
|
-
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
52
|
-
import "./token-goat-chunk-SFAS46RE.mjs";
|
|
53
|
-
import {
|
|
54
|
-
recordStat,
|
|
55
|
-
savedTokensFromBytes
|
|
56
|
-
} from "./token-goat-chunk-IVUQLQWN.mjs";
|
|
54
|
+
} from "./token-goat-chunk-73GXYYZR.mjs";
|
|
55
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
57
56
|
import {
|
|
58
57
|
getDb
|
|
59
|
-
} from "./token-goat-chunk-
|
|
58
|
+
} from "./token-goat-chunk-MWSVUKVV.mjs";
|
|
60
59
|
import {
|
|
61
60
|
envStrList,
|
|
62
61
|
loadConfig,
|
|
63
62
|
resolveProjectRoot
|
|
64
|
-
} from "./token-goat-chunk-
|
|
63
|
+
} from "./token-goat-chunk-2VASS5VR.mjs";
|
|
65
64
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
66
65
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
67
66
|
import {
|
|
@@ -71,12 +70,14 @@ import {
|
|
|
71
70
|
extractErrorMessage,
|
|
72
71
|
foldCaseForContainment,
|
|
73
72
|
globalDbPath
|
|
74
|
-
} from "./token-goat-chunk-
|
|
73
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
75
74
|
import {
|
|
76
75
|
displaySafeJson,
|
|
77
76
|
normalizePath
|
|
78
77
|
} from "./token-goat-chunk-ERTXEKB6.mjs";
|
|
78
|
+
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
79
79
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
80
|
+
import "./token-goat-chunk-RRNZMM3A.mjs";
|
|
80
81
|
import {
|
|
81
82
|
init_define_import_meta_env
|
|
82
83
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
|
@@ -84,6 +85,7 @@ import {
|
|
|
84
85
|
// src/mcp_server.ts
|
|
85
86
|
init_define_import_meta_env();
|
|
86
87
|
import * as fs from "fs";
|
|
88
|
+
import * as os from "os";
|
|
87
89
|
import * as path from "path";
|
|
88
90
|
var TOKEN_GOAT_RETRY_RE = /token-goat (\w[\w-]*) "([^"]+)"/g;
|
|
89
91
|
var MCP_MAX_LIMIT = 1e3;
|
|
@@ -166,10 +168,40 @@ function resolveToolRoot(projectRoot) {
|
|
|
166
168
|
}
|
|
167
169
|
var RootNotAllowedError = class extends Error {
|
|
168
170
|
};
|
|
171
|
+
function getStandardAuxiliaryRoots(targetPath) {
|
|
172
|
+
const home = os.homedir();
|
|
173
|
+
const roots = [
|
|
174
|
+
path.join(home, ".claude", "skills"),
|
|
175
|
+
path.join(home, ".copilot", "skills"),
|
|
176
|
+
path.join(home, ".claude", "projects"),
|
|
177
|
+
path.join(home, ".copilot", "session-state")
|
|
178
|
+
];
|
|
179
|
+
const appData = process.env["APPDATA"] || path.join(home, "AppData", "Roaming");
|
|
180
|
+
roots.push(
|
|
181
|
+
path.join(appData, "Code", "User", "workspaceStorage"),
|
|
182
|
+
path.join(appData, "Code - Insiders", "User", "workspaceStorage"),
|
|
183
|
+
path.join(appData, "Cursor", "User", "workspaceStorage"),
|
|
184
|
+
path.join(home, "Library", "Application Support", "Code", "User", "workspaceStorage"),
|
|
185
|
+
path.join(home, "Library", "Application Support", "Code - Insiders", "User", "workspaceStorage"),
|
|
186
|
+
path.join(home, "Library", "Application Support", "Cursor", "User", "workspaceStorage"),
|
|
187
|
+
path.join(home, ".config", "Code", "User", "workspaceStorage"),
|
|
188
|
+
path.join(home, ".config", "Code - Insiders", "User", "workspaceStorage"),
|
|
189
|
+
path.join(home, ".config", "Cursor", "User", "workspaceStorage")
|
|
190
|
+
);
|
|
191
|
+
if (targetPath) {
|
|
192
|
+
const norm = normalizePath(targetPath);
|
|
193
|
+
const promptIdx = norm.toLowerCase().indexOf("/resources/app/extensions/");
|
|
194
|
+
if (promptIdx !== -1) {
|
|
195
|
+
roots.push(norm.slice(0, promptIdx + "/resources/app/extensions/".length));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return roots;
|
|
199
|
+
}
|
|
169
200
|
function assertRootAllowed(resolvedRoot) {
|
|
170
201
|
const allowedRoots = loadConfig().mcp.allowed_roots;
|
|
171
202
|
if (allowedRoots.length === 0) return;
|
|
172
203
|
if (allowedRoots.some((allowed) => checkWithinProjectRoot(resolvedRoot, allowed).inside)) return;
|
|
204
|
+
if (getStandardAuxiliaryRoots(resolvedRoot).some((aux) => checkWithinProjectRoot(resolvedRoot, aux).inside)) return;
|
|
173
205
|
throw new RootNotAllowedError(
|
|
174
206
|
`refused: "${resolvedRoot}" is not inside any root listed in mcp.allowed_roots. A caller-supplied projectRoot is untrusted input, so this deployment pins which roots may be named; add the root to mcp.allowed_roots (or TOKEN_GOAT_MCP_ALLOWED_ROOTS) to permit it.`
|
|
175
207
|
);
|
|
@@ -229,6 +261,7 @@ function refusalText(file, resolvedRoot, reason) {
|
|
|
229
261
|
}
|
|
230
262
|
function confineTargets(targets, resolvedRoot, splitCommas = true) {
|
|
231
263
|
if (!loadConfig(resolvedRoot).mcp.confine_reads_to_project_root) return { ok: true, targets, pins: NO_PINS };
|
|
264
|
+
const allowedRoots = loadConfig().mcp.allowed_roots;
|
|
232
265
|
const checked = [];
|
|
233
266
|
const pins = /* @__PURE__ */ new Map();
|
|
234
267
|
for (const raw of targets) {
|
|
@@ -236,7 +269,25 @@ function confineTargets(targets, resolvedRoot, splitCommas = true) {
|
|
|
236
269
|
for (const part of parts) {
|
|
237
270
|
const file = specFilePart(part);
|
|
238
271
|
if (file === "") continue;
|
|
239
|
-
|
|
272
|
+
let check = checkWithinProjectRoot(file, resolvedRoot);
|
|
273
|
+
if (!check.inside) {
|
|
274
|
+
for (const allowed of allowedRoots) {
|
|
275
|
+
const altCheck = checkWithinProjectRoot(file, allowed);
|
|
276
|
+
if (altCheck.inside) {
|
|
277
|
+
check = altCheck;
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (!check.inside) {
|
|
283
|
+
for (const aux of getStandardAuxiliaryRoots(file)) {
|
|
284
|
+
const auxCheck = checkWithinProjectRoot(file, aux);
|
|
285
|
+
if (auxCheck.inside) {
|
|
286
|
+
check = auxCheck;
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
240
291
|
if (!check.inside) {
|
|
241
292
|
return { ok: false, refusal: toCallToolResult({ text: refusalText(file, resolvedRoot, check.reason), code: 1 }) };
|
|
242
293
|
}
|
package/dist/token-goat-hook.mjs
CHANGED
|
@@ -2,23 +2,24 @@ 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-
|
|
5
|
+
} from "./token-goat-chunk-2M33Q3O4.mjs";
|
|
6
|
+
import "./token-goat-chunk-GLOM5W5C.mjs";
|
|
7
|
+
import "./token-goat-chunk-HRUGS6CO.mjs";
|
|
8
|
+
import "./token-goat-chunk-PKNOHVWP.mjs";
|
|
9
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
10
|
+
import "./token-goat-chunk-26YUO7MP.mjs";
|
|
10
11
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
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-K7F2BFIK.mjs";
|
|
16
|
-
import "./token-goat-chunk-S4XRY446.mjs";
|
|
12
|
+
import "./token-goat-chunk-73GXYYZR.mjs";
|
|
13
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
14
|
+
import "./token-goat-chunk-MWSVUKVV.mjs";
|
|
15
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
17
16
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
18
17
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
19
|
-
import "./token-goat-chunk-
|
|
18
|
+
import "./token-goat-chunk-UBZCON6N.mjs";
|
|
20
19
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
20
|
+
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
21
21
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
22
|
+
import "./token-goat-chunk-RRNZMM3A.mjs";
|
|
22
23
|
import {
|
|
23
24
|
init_define_import_meta_env
|
|
24
25
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
package/dist/token-goat.core.mjs
CHANGED
|
@@ -2,36 +2,37 @@ import { createRequire as __cjsRequire } from 'node:module';
|
|
|
2
2
|
const require = __cjsRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
run
|
|
5
|
-
} from "./token-goat-chunk-
|
|
6
|
-
import "./token-goat-chunk-
|
|
5
|
+
} from "./token-goat-chunk-7VQMOBPQ.mjs";
|
|
6
|
+
import "./token-goat-chunk-IDHWKNKZ.mjs";
|
|
7
|
+
import "./token-goat-chunk-CICJFVIH.mjs";
|
|
7
8
|
import "./token-goat-chunk-LMFO66YD.mjs";
|
|
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-
|
|
9
|
+
import "./token-goat-chunk-HRUGS6CO.mjs";
|
|
10
|
+
import "./token-goat-chunk-PKNOHVWP.mjs";
|
|
11
|
+
import "./token-goat-chunk-C26ZBGBC.mjs";
|
|
12
|
+
import "./token-goat-chunk-26YUO7MP.mjs";
|
|
13
|
+
import "./token-goat-chunk-LKSXAMJB.mjs";
|
|
14
|
+
import "./token-goat-chunk-CPHVXKNU.mjs";
|
|
15
|
+
import "./token-goat-chunk-W2GUUQAQ.mjs";
|
|
16
|
+
import "./token-goat-chunk-THBLW56G.mjs";
|
|
17
|
+
import "./token-goat-chunk-KZPO4DWC.mjs";
|
|
16
18
|
import "./token-goat-chunk-3BTK54F3.mjs";
|
|
17
|
-
import "./token-goat-chunk-
|
|
19
|
+
import "./token-goat-chunk-66224KCZ.mjs";
|
|
18
20
|
import "./token-goat-chunk-XTQAOTSO.mjs";
|
|
19
21
|
import "./token-goat-chunk-AH6QILZM.mjs";
|
|
20
|
-
import "./token-goat-chunk-
|
|
21
|
-
import "./token-goat-chunk-
|
|
22
|
-
import "./token-goat-chunk-
|
|
23
|
-
import "./token-goat-chunk-
|
|
24
|
-
import "./token-goat-chunk-
|
|
25
|
-
import "./token-goat-chunk-IVUQLQWN.mjs";
|
|
26
|
-
import "./token-goat-chunk-K7F2BFIK.mjs";
|
|
27
|
-
import "./token-goat-chunk-S4XRY446.mjs";
|
|
22
|
+
import "./token-goat-chunk-SWRKVA3J.mjs";
|
|
23
|
+
import "./token-goat-chunk-73GXYYZR.mjs";
|
|
24
|
+
import "./token-goat-chunk-BK3RPPTK.mjs";
|
|
25
|
+
import "./token-goat-chunk-MWSVUKVV.mjs";
|
|
26
|
+
import "./token-goat-chunk-2VASS5VR.mjs";
|
|
28
27
|
import "./token-goat-chunk-EEIDFMEM.mjs";
|
|
29
28
|
import "./token-goat-chunk-OSUFN2FV.mjs";
|
|
30
29
|
import {
|
|
31
30
|
installEpipeGuard
|
|
32
|
-
} from "./token-goat-chunk-
|
|
31
|
+
} from "./token-goat-chunk-UBZCON6N.mjs";
|
|
33
32
|
import "./token-goat-chunk-ERTXEKB6.mjs";
|
|
33
|
+
import "./token-goat-chunk-Y4AFKTHK.mjs";
|
|
34
34
|
import "./token-goat-chunk-GMOUBOX4.mjs";
|
|
35
|
+
import "./token-goat-chunk-RRNZMM3A.mjs";
|
|
35
36
|
import {
|
|
36
37
|
init_define_import_meta_env
|
|
37
38
|
} from "./token-goat-chunk-A37V4PBF.mjs";
|
package/docs/cli.md
CHANGED
|
@@ -74,6 +74,7 @@ token-goat pdf-extract manual.pdf --pages 12-15 --layout --head 120
|
|
|
74
74
|
| `token-goat imports "file"` | Show the import graph for a file one level deep. Accepts a comma-separated file list (`"a,b,c"`) to cover several files in one call, one clearly-headed block per file; extra space-separated file arguments are reported in a note naming that comma form instead of being silently dropped. `--grep <pattern>` only shows imports whose MODULE SPECIFIER matches this regex (literal substring if it is not valid regex), applied before `--json`'s truncation; when it matches nothing among real imports, the output names the active filter instead of reading like the file has no imports at all. |
|
|
75
75
|
| `token-goat dep-docs <package>` | Extract one installed npm package's README, `package.json` metadata, and (if resolvable) a compact `.d.ts` signature outline, instead of grepping `node_modules`. |
|
|
76
76
|
| `token-goat find "<query>"` | Find the FILES defining a symbol whose name matches a pattern: a case-insensitive substring scan over indexed symbol names, emitting the distinct file paths. When no name contains the pattern, falls back to an edit-distance match so a mistyped name still lands (`getUserr` → `getUser`) — the same ranking `Did you mean:` uses. The fallback runs only when the substring pass found nothing, so an exact match is never reordered or displaced, and a query near nothing still reports a clean miss instead of unrelated names. A recovered match names what it actually matched on stderr rather than silently answering for a name you didn't type; `--json` marks it with `fuzzy: true` and `matchedNames`, both absent on an exact hit. `--limit <n>` caps the file count. Matches on NAMES only — for meaning-based search over file content use `token-goat semantic`. |
|
|
77
|
+
| `token-goat locate <spec>` | Locate a symbol or landmark with exact line spans across the project or in a specific file. Supports `name` or `file::name`, with fuzzy edit-distance fallback when no exact match is found. `--file <path>` restricts search to a specific file; `--limit <n>` caps results; `--json` emits the shared envelope with exact line spans. |
|
|
77
78
|
| `token-goat similar "file::symbol"` | Find the top-k symbols most similar to a given symbol, via full-text search over symbol names and bodies. Also accepts `read`'s `symbol@LINE` anchor to pick out an otherwise-ambiguous candidate. |
|
|
78
79
|
| `token-goat test-for "file"` | Find test file(s) for an implementation file and list their test functions. `--json`'s `testFile` renders root-relative when a project root resolves, absolute when none does, matching plain-text output. `--json` emits the shared `{items, truncated, totalCount}` envelope — the same shape `symbol`/`refs`/`skeleton`/`outline --json` return, present whether or not truncation occurred, so a script never has to branch on shape. |
|
|
79
80
|
| `token-goat dead` | Surface functions, methods, and classes with no recorded callers in the project index. Private names and common entry points (`main`, `app`, etc.) are excluded by default. `--include-private` lifts the underscore filter; `--kind` narrows to specific symbol types, comma-separated for a union (`--kind function,method`) — an unrecognized kind errors instead of silently reading as a clean codebase; `--top N` caps output; `--json` for structured output. `--exclude-tests` hides dead symbols DEFINED in a test file (opt-in — omitted, output is unchanged); prints a note naming how many were hidden. `--grep <pattern>` only shows dead symbols whose NAME matches this regex (literal substring if it is not valid regex), applied before `--top`'s slice; when it matches nothing among dead symbols that do exist, the output names the active filter instead of reading like a genuinely clean codebase. Results are a heuristic lead — dynamic dispatch and external callers are invisible to static indexing. `--json` emits both `file` and `filePath` with the identical value, root-relative when a project root resolves, absolute when none does, matching plain-text output; `file` is retained for this release only and will be removed in a future release, `filePath` is the spelling to migrate to (matching `symbol`/`types --json`). `--json` emits the shared `{items, truncated, totalCount}` envelope — the same shape `symbol`/`refs`/`skeleton`/`outline --json` return, present whether or not truncation occurred, so a script never has to branch on shape. |
|