token-goat 2.9.17 → 2.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{token-goat-chunk-7EGKXBWT.mjs → token-goat-chunk-2KTZ6J7T.mjs} +7 -7
  2. package/dist/{token-goat-chunk-CKIJWTRQ.mjs → token-goat-chunk-34OUJ2IE.mjs} +11 -11
  3. package/dist/{token-goat-chunk-2XA5ZW4T.mjs → token-goat-chunk-52IMXJ2L.mjs} +3 -3
  4. package/dist/{token-goat-chunk-GPCCYQSS.mjs → token-goat-chunk-5MMJAJF3.mjs} +6 -6
  5. package/dist/{token-goat-chunk-YFGEUIEO.mjs → token-goat-chunk-6LGVCCMY.mjs} +12 -12
  6. package/dist/{token-goat-chunk-66224KCZ.mjs → token-goat-chunk-7VLWNQDQ.mjs} +1 -1
  7. package/dist/{token-goat-chunk-W2GUUQAQ.mjs → token-goat-chunk-ARNRFR6M.mjs} +1 -1
  8. package/dist/{token-goat-chunk-PKNOHVWP.mjs → token-goat-chunk-BFEWOMA3.mjs} +11 -9
  9. package/dist/{token-goat-chunk-G75WIVFM.mjs → token-goat-chunk-BWCRC23L.mjs} +18 -18
  10. package/dist/{token-goat-chunk-2VASS5VR.mjs → token-goat-chunk-CA6V36KW.mjs} +1 -1
  11. package/dist/{token-goat-chunk-C26ZBGBC.mjs → token-goat-chunk-CTOYJ232.mjs} +18 -41
  12. package/dist/{token-goat-chunk-KZPO4DWC.mjs → token-goat-chunk-EPXNOKIV.mjs} +1 -1
  13. package/dist/{token-goat-chunk-SWRKVA3J.mjs → token-goat-chunk-GRI6HWX3.mjs} +1 -1
  14. package/dist/{token-goat-chunk-CICJFVIH.mjs → token-goat-chunk-H3FONFBO.mjs} +2 -2
  15. package/dist/{token-goat-chunk-EKGVCAES.mjs → token-goat-chunk-HIZXQVNU.mjs} +3 -3
  16. package/dist/{token-goat-chunk-26YUO7MP.mjs → token-goat-chunk-HPOFR6QX.mjs} +3 -3
  17. package/dist/{token-goat-chunk-BK3RPPTK.mjs → token-goat-chunk-I67CPTDD.mjs} +2 -2
  18. package/dist/{token-goat-chunk-RB24DBBS.mjs → token-goat-chunk-K4DG6EEF.mjs} +2 -2
  19. package/dist/{token-goat-chunk-MWSVUKVV.mjs → token-goat-chunk-L7VCX33I.mjs} +1 -1
  20. package/dist/{token-goat-chunk-THBLW56G.mjs → token-goat-chunk-LA3O4JGD.mjs} +2 -2
  21. package/dist/{token-goat-chunk-7VQMOBPQ.mjs → token-goat-chunk-LTYWLKAG.mjs} +50 -31
  22. package/dist/{token-goat-chunk-RFFUCQK7.mjs → token-goat-chunk-OWSJJY5R.mjs} +4 -4
  23. package/dist/{token-goat-chunk-UBZCON6N.mjs → token-goat-chunk-QIDLJGXZ.mjs} +1 -1
  24. package/dist/{token-goat-chunk-IDHWKNKZ.mjs → token-goat-chunk-QML7ITHJ.mjs} +10 -10
  25. package/dist/{token-goat-chunk-GLOM5W5C.mjs → token-goat-chunk-RHHFEXKF.mjs} +1 -1
  26. package/dist/{token-goat-chunk-CPHVXKNU.mjs → token-goat-chunk-UENEL6KX.mjs} +1 -1
  27. package/dist/{token-goat-chunk-HRUGS6CO.mjs → token-goat-chunk-V3ZWBEHM.mjs} +8 -8
  28. package/dist/{token-goat-chunk-73GXYYZR.mjs → token-goat-chunk-W3E65QOW.mjs} +8 -8
  29. package/dist/{token-goat-chunk-2M33Q3O4.mjs → token-goat-chunk-WFX2V3OF.mjs} +39 -32
  30. package/dist/{token-goat-chunk-5WB7GDH4.mjs → token-goat-chunk-YQZE5NS6.mjs} +5 -5
  31. package/dist/token-goat-hook.mjs +11 -11
  32. package/dist/token-goat.core.mjs +18 -18
  33. package/docs/cli.md +2 -2
  34. package/package.json +1 -1
@@ -4,7 +4,7 @@ import {
4
4
  canRunWrappedShell,
5
5
  clipToDeliveryCap,
6
6
  deliveredOutputBytes
7
- } from "./token-goat-chunk-GLOM5W5C.mjs";
7
+ } from "./token-goat-chunk-RHHFEXKF.mjs";
8
8
  import {
9
9
  DEFAULT_RECONCILE_BUDGET_MS,
10
10
  HOOK_EVENTS,
@@ -17,7 +17,7 @@ import {
17
17
  readStdinJson,
18
18
  reconcileProject,
19
19
  storeWebOutput
20
- } from "./token-goat-chunk-HRUGS6CO.mjs";
20
+ } from "./token-goat-chunk-V3ZWBEHM.mjs";
21
21
  import {
22
22
  BODY_FIRST_TOOL_RESPONSE_KEYS,
23
23
  GENERIC_SERVED_OUTPUT_KEY,
@@ -144,7 +144,7 @@ import {
144
144
  wasFileReadThisSession,
145
145
  wasHintShown,
146
146
  withPreservedBlocks
147
- } from "./token-goat-chunk-PKNOHVWP.mjs";
147
+ } from "./token-goat-chunk-BFEWOMA3.mjs";
148
148
  import {
149
149
  BASH_OUTPUT_SUBDIR,
150
150
  commandHash,
@@ -167,26 +167,26 @@ import {
167
167
  splitOwnTrailingNotices,
168
168
  storeBashOutput,
169
169
  summarizeOutputDelta
170
- } from "./token-goat-chunk-C26ZBGBC.mjs";
170
+ } from "./token-goat-chunk-CTOYJ232.mjs";
171
171
  import {
172
172
  recordStat,
173
173
  redactSecrets,
174
174
  savedTokensFromBytes,
175
175
  storeBlob,
176
176
  stripAnsiEscapes
177
- } from "./token-goat-chunk-26YUO7MP.mjs";
177
+ } from "./token-goat-chunk-HPOFR6QX.mjs";
178
178
  import {
179
179
  extractMarkdownHeadings,
180
180
  formatHeadingTreeParts
181
- } from "./token-goat-chunk-73GXYYZR.mjs";
181
+ } from "./token-goat-chunk-W3E65QOW.mjs";
182
182
  import {
183
183
  countSymbols
184
- } from "./token-goat-chunk-BK3RPPTK.mjs";
184
+ } from "./token-goat-chunk-I67CPTDD.mjs";
185
185
  import {
186
186
  detectLanguage,
187
187
  getDb,
188
188
  languageHasFlag
189
- } from "./token-goat-chunk-MWSVUKVV.mjs";
189
+ } from "./token-goat-chunk-L7VCX33I.mjs";
190
190
  import {
191
191
  detectHarness,
192
192
  envBool,
@@ -196,7 +196,7 @@ import {
196
196
  isUnderSystemTemp,
197
197
  loadConfig,
198
198
  shortFingerprint
199
- } from "./token-goat-chunk-2VASS5VR.mjs";
199
+ } from "./token-goat-chunk-CA6V36KW.mjs";
200
200
  import {
201
201
  ENV_KEYS,
202
202
  IDENTICAL_READ_MIN_BODY_BYTES,
@@ -216,7 +216,7 @@ import {
216
216
  isInsideRoot,
217
217
  runGit,
218
218
  toKB
219
- } from "./token-goat-chunk-UBZCON6N.mjs";
219
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
220
220
  import {
221
221
  UNTRUSTED_TOOL_TAG,
222
222
  displaySafePath,
@@ -404,7 +404,7 @@ function grepIntInput(toolInput, key) {
404
404
  function grepSignature(toolInput) {
405
405
  const pattern = toolInput["pattern"];
406
406
  if (typeof pattern !== "string" || pattern === "") return null;
407
- const path4 = typeof toolInput["path"] === "string" ? toolInput["path"] : "";
407
+ const path5 = typeof toolInput["path"] === "string" ? toolInput["path"] : "";
408
408
  const outputMode = typeof toolInput["output_mode"] === "string" ? toolInput["output_mode"] : "files_with_matches";
409
409
  const glob = typeof toolInput["glob"] === "string" ? toolInput["glob"] : "";
410
410
  const type = typeof toolInput["type"] === "string" ? toolInput["type"] : "";
@@ -419,7 +419,7 @@ function grepSignature(toolInput) {
419
419
  const offset = grepIntInput(toolInput, "offset");
420
420
  return JSON.stringify([
421
421
  pattern,
422
- path4,
422
+ path5,
423
423
  outputMode,
424
424
  glob,
425
425
  type,
@@ -563,8 +563,8 @@ function isBroadCatchAllGlob(pattern, pathArg) {
563
563
  function globSignature(toolInput) {
564
564
  const pattern = toolInput["pattern"];
565
565
  if (typeof pattern !== "string" || pattern === "") return null;
566
- const path4 = typeof toolInput["path"] === "string" ? toolInput["path"] : "";
567
- return JSON.stringify([pattern, path4]);
566
+ const path5 = typeof toolInput["path"] === "string" ? toolInput["path"] : "";
567
+ return JSON.stringify([pattern, path5]);
568
568
  }
569
569
  var { post: postGlobHandler, pre: preGlobDedupHandler } = makeDedupHintHandlers({
570
570
  toolName: "Glob",
@@ -718,6 +718,7 @@ registerHook("pre_tool_use", preWriteRewriteHandler, { toolName: "Write" });
718
718
  // src/hooks_compact.ts
719
719
  init_define_import_meta_env();
720
720
  import { spawnSync } from "node:child_process";
721
+ import * as path3 from "node:path";
721
722
  var MEM_EPOCH_TIMEOUT_MS = 800;
722
723
  var MAX_ROWS = 40;
723
724
  function appendCappedSection(lines, header, rows, cap) {
@@ -920,8 +921,14 @@ function postCompactHandler(event) {
920
921
  const summary = typeof raw === "string" ? raw : "";
921
922
  const bytes = Buffer.byteLength(summary, "utf-8");
922
923
  const sample = manifestPathSample(event.sessionId);
923
- const haystack = foldPath(summary);
924
- const survived = sample.filter((p) => haystack.includes(foldPath(p))).length;
924
+ const cwd = normalizePath(getCwd(event) ?? process.cwd());
925
+ const spell = (p) => foldPath(p.replaceAll("\\", "/"));
926
+ const haystack = spell(summary);
927
+ const survived = sample.filter((p) => {
928
+ const rel = path3.relative(cwd, p);
929
+ const forms = rel !== "" && !rel.startsWith("..") && !path3.isAbsolute(rel) ? [p, rel] : [p];
930
+ return forms.some((f) => haystack.includes(spell(f)));
931
+ }).length;
925
932
  const trigger = typeof event.raw["trigger"] === "string" ? event.raw["trigger"] : "unknown";
926
933
  const budget = loadConfig().compact_assist.summary_budget_chars;
927
934
  const over = budget > 0 && summary.length > budget ? 1 : 0;
@@ -946,7 +953,7 @@ init_define_import_meta_env();
946
953
  var TRACKED_SKILL = "token-goat";
947
954
  var MAX_COMMANDS_SHOWN = 8;
948
955
  async function currentCommandNames() {
949
- const { buildProgram } = await import("./token-goat-chunk-G75WIVFM.mjs");
956
+ const { buildProgram } = await import("./token-goat-chunk-BWCRC23L.mjs");
950
957
  return flattenCommandNames(buildCommandManifest(buildProgram()));
951
958
  }
952
959
  async function recordSkillVersionSnapshot(sessionId, skillName) {
@@ -5844,8 +5851,8 @@ function trimCharacterEnd(str, char) {
5844
5851
  function unicodeEscape(str) {
5845
5852
  return str.replace(/[\s\S]/g, (c) => "\\u" + c.charCodeAt().toString(16).padStart(4, "0"));
5846
5853
  }
5847
- function get(obj, path4) {
5848
- for (const key of path4) {
5854
+ function get(obj, path5) {
5855
+ for (const key of path5) {
5849
5856
  if (!obj) {
5850
5857
  return void 0;
5851
5858
  }
@@ -7046,8 +7053,8 @@ function withBrackets(str, brackets) {
7046
7053
  const rbr = typeof brackets[1] === "string" ? brackets[1] : "]";
7047
7054
  return lbr + str + rbr;
7048
7055
  }
7049
- function pathRewrite(path4, rewriter, baseUrl, metadata, elem) {
7050
- const modifiedPath = typeof rewriter === "function" ? rewriter(path4, metadata, elem) : path4;
7056
+ function pathRewrite(path5, rewriter, baseUrl, metadata, elem) {
7057
+ const modifiedPath = typeof rewriter === "function" ? rewriter(path5, metadata, elem) : path5;
7051
7058
  return modifiedPath[0] === "/" && baseUrl ? trimCharacterEnd(baseUrl, "/") + modifiedPath : modifiedPath;
7052
7059
  }
7053
7060
  function formatImage(elem, walk, builder, formatOptions) {
@@ -7371,9 +7378,9 @@ function handleDeprecatedOptions(options) {
7371
7378
  options.selectors.push(...tagDefinitions);
7372
7379
  options.selectors = mergeDuplicatesPreferLast(options.selectors, ((s) => s.selector));
7373
7380
  }
7374
- function set(obj, path4, value) {
7375
- const valueKey = path4.pop();
7376
- for (const key of path4) {
7381
+ function set(obj, path5, value) {
7382
+ const valueKey = path5.pop();
7383
+ for (const key of path5) {
7377
7384
  let nested = obj[key];
7378
7385
  if (!nested) {
7379
7386
  nested = {};
@@ -10326,7 +10333,7 @@ registerHook("post_tool_use", postTaskOutputHandler, { toolName: "TaskOutput" })
10326
10333
  // src/hooks_tool_failure.ts
10327
10334
  init_define_import_meta_env();
10328
10335
  import { existsSync as existsSync2, readFileSync as readFileSync3, statSync as statSync7, writeFileSync as writeFileSync2 } from "node:fs";
10329
- import { dirname as dirname2, relative } from "node:path";
10336
+ import { dirname as dirname2, relative as relative2 } from "node:path";
10330
10337
  var FAILURE_SUFFIX = ".tool-failures.json";
10331
10338
  var MAX_TRACKED_FAILURES = 64;
10332
10339
  var SIGNATURE_ERROR_CHARS = 200;
@@ -10397,7 +10404,7 @@ function diagnoseEditFailure(event, errorText) {
10397
10404
  const stat = statSync7(absPath);
10398
10405
  if (stat.size > MAX_EDIT_DIAGNOSE_BYTES) return null;
10399
10406
  const fileContent = readFileSync3(absPath, "utf8");
10400
- const relDisplay = displaySafeText(relative(process.cwd(), absPath).replace(/\\/g, "/") || absPath);
10407
+ const relDisplay = displaySafeText(relative2(process.cwd(), absPath).replace(/\\/g, "/") || absPath);
10401
10408
  if (isMultiple) {
10402
10409
  const matchLines = [];
10403
10410
  let pos = 0;
@@ -11247,7 +11254,7 @@ init_define_import_meta_env();
11247
11254
  import { createHash as createHash2 } from "node:crypto";
11248
11255
  import * as fs2 from "node:fs";
11249
11256
  import * as os2 from "node:os";
11250
- import * as path3 from "node:path";
11257
+ import * as path4 from "node:path";
11251
11258
  var BRIEFING_TARGET_TOKENS = 550;
11252
11259
  function buildSubagentBriefing() {
11253
11260
  try {
@@ -11472,8 +11479,8 @@ function parseAgentDefinition(text, fallbackName) {
11472
11479
  return { name: name2, restricted: false };
11473
11480
  }
11474
11481
  function findRestrictedAgentNames(roots) {
11475
- const projectAgentsRoot = path3.join(process.cwd(), ".claude", "agents");
11476
- const scanRoots = roots ?? [path3.join(os2.homedir(), ".claude", "agents"), projectAgentsRoot];
11482
+ const projectAgentsRoot = path4.join(process.cwd(), ".claude", "agents");
11483
+ const scanRoots = roots ?? [path4.join(os2.homedir(), ".claude", "agents"), projectAgentsRoot];
11477
11484
  const names = /* @__PURE__ */ new Set();
11478
11485
  const visited = /* @__PURE__ */ new Set();
11479
11486
  let filesSeen = 0;
@@ -11497,7 +11504,7 @@ function findRestrictedAgentNames(roots) {
11497
11504
  }
11498
11505
  for (const entry of entries) {
11499
11506
  if (filesSeen >= ROSTER_WALK_MAX_FILES) return;
11500
- const full = path3.join(dir, entry.name);
11507
+ const full = path4.join(dir, entry.name);
11501
11508
  let stat;
11502
11509
  try {
11503
11510
  stat = fs2.statSync(full);
@@ -11516,12 +11523,12 @@ function findRestrictedAgentNames(roots) {
11516
11523
  } catch {
11517
11524
  continue;
11518
11525
  }
11519
- const parsed = parseAgentDefinition(text, path3.basename(entry.name, path3.extname(entry.name)));
11526
+ const parsed = parseAgentDefinition(text, path4.basename(entry.name, path4.extname(entry.name)));
11520
11527
  if (parsed !== null && parsed.restricted) names.add(parsed.name);
11521
11528
  }
11522
11529
  };
11523
11530
  for (const root of scanRoots) {
11524
- const isProjectRoot = roots === void 0 && path3.resolve(root) === path3.resolve(projectAgentsRoot);
11531
+ const isProjectRoot = roots === void 0 && path4.resolve(root) === path4.resolve(projectAgentsRoot);
11525
11532
  if (!isProjectRoot) {
11526
11533
  walk(root, 0, null);
11527
11534
  continue;
@@ -20,17 +20,17 @@ import {
20
20
  setOcrTimeoutForTesting,
21
21
  setTesseractEntryForTesting,
22
22
  verifyOcrLangCache
23
- } from "./token-goat-chunk-CICJFVIH.mjs";
24
- import "./token-goat-chunk-26YUO7MP.mjs";
25
- import "./token-goat-chunk-MWSVUKVV.mjs";
23
+ } from "./token-goat-chunk-H3FONFBO.mjs";
24
+ import "./token-goat-chunk-HPOFR6QX.mjs";
25
+ import "./token-goat-chunk-L7VCX33I.mjs";
26
26
  import {
27
27
  DEFAULT_OCR_LANG,
28
28
  isSupportedOcrLang,
29
29
  resolveOcrLangs
30
- } from "./token-goat-chunk-2VASS5VR.mjs";
30
+ } from "./token-goat-chunk-CA6V36KW.mjs";
31
31
  import "./token-goat-chunk-EEIDFMEM.mjs";
32
32
  import "./token-goat-chunk-OSUFN2FV.mjs";
33
- import "./token-goat-chunk-UBZCON6N.mjs";
33
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
34
34
  import "./token-goat-chunk-ERTXEKB6.mjs";
35
35
  import "./token-goat-chunk-GMOUBOX4.mjs";
36
36
  import "./token-goat-chunk-A37V4PBF.mjs";
@@ -2,20 +2,20 @@ 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-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";
5
+ } from "./token-goat-chunk-WFX2V3OF.mjs";
6
+ import "./token-goat-chunk-RHHFEXKF.mjs";
7
+ import "./token-goat-chunk-V3ZWBEHM.mjs";
8
+ import "./token-goat-chunk-BFEWOMA3.mjs";
9
+ import "./token-goat-chunk-CTOYJ232.mjs";
10
+ import "./token-goat-chunk-HPOFR6QX.mjs";
11
11
  import "./token-goat-chunk-3BTK54F3.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";
12
+ import "./token-goat-chunk-W3E65QOW.mjs";
13
+ import "./token-goat-chunk-I67CPTDD.mjs";
14
+ import "./token-goat-chunk-L7VCX33I.mjs";
15
+ import "./token-goat-chunk-CA6V36KW.mjs";
16
16
  import "./token-goat-chunk-EEIDFMEM.mjs";
17
17
  import "./token-goat-chunk-OSUFN2FV.mjs";
18
- import "./token-goat-chunk-UBZCON6N.mjs";
18
+ import "./token-goat-chunk-QIDLJGXZ.mjs";
19
19
  import "./token-goat-chunk-ERTXEKB6.mjs";
20
20
  import "./token-goat-chunk-Y4AFKTHK.mjs";
21
21
  import "./token-goat-chunk-GMOUBOX4.mjs";
@@ -2,33 +2,33 @@ 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-7VQMOBPQ.mjs";
6
- import "./token-goat-chunk-IDHWKNKZ.mjs";
7
- import "./token-goat-chunk-CICJFVIH.mjs";
5
+ } from "./token-goat-chunk-LTYWLKAG.mjs";
6
+ import "./token-goat-chunk-QML7ITHJ.mjs";
7
+ import "./token-goat-chunk-H3FONFBO.mjs";
8
8
  import "./token-goat-chunk-LMFO66YD.mjs";
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";
9
+ import "./token-goat-chunk-V3ZWBEHM.mjs";
10
+ import "./token-goat-chunk-BFEWOMA3.mjs";
11
+ import "./token-goat-chunk-CTOYJ232.mjs";
12
+ import "./token-goat-chunk-HPOFR6QX.mjs";
13
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";
14
+ import "./token-goat-chunk-UENEL6KX.mjs";
15
+ import "./token-goat-chunk-ARNRFR6M.mjs";
16
+ import "./token-goat-chunk-LA3O4JGD.mjs";
17
+ import "./token-goat-chunk-EPXNOKIV.mjs";
18
18
  import "./token-goat-chunk-3BTK54F3.mjs";
19
- import "./token-goat-chunk-66224KCZ.mjs";
19
+ import "./token-goat-chunk-7VLWNQDQ.mjs";
20
20
  import "./token-goat-chunk-XTQAOTSO.mjs";
21
21
  import "./token-goat-chunk-AH6QILZM.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";
22
+ import "./token-goat-chunk-GRI6HWX3.mjs";
23
+ import "./token-goat-chunk-W3E65QOW.mjs";
24
+ import "./token-goat-chunk-I67CPTDD.mjs";
25
+ import "./token-goat-chunk-L7VCX33I.mjs";
26
+ import "./token-goat-chunk-CA6V36KW.mjs";
27
27
  import "./token-goat-chunk-EEIDFMEM.mjs";
28
28
  import "./token-goat-chunk-OSUFN2FV.mjs";
29
29
  import {
30
30
  installEpipeGuard
31
- } from "./token-goat-chunk-UBZCON6N.mjs";
31
+ } from "./token-goat-chunk-QIDLJGXZ.mjs";
32
32
  import "./token-goat-chunk-ERTXEKB6.mjs";
33
33
  import "./token-goat-chunk-Y4AFKTHK.mjs";
34
34
  import "./token-goat-chunk-GMOUBOX4.mjs";
package/docs/cli.md CHANGED
@@ -148,7 +148,7 @@ token-goat pdf-extract manual.pdf --pages 12-15 --layout --head 120
148
148
  | `token-goat transcript <file>` | Slice a WebVTT/SRT transcript by `--speaker <name>`, `--from`/`--to <hh:mm:ss>`, and/or `--grep <pattern>` instead of a raw Read. |
149
149
  | `token-goat screenshot <url> <destPath>` | Capture a local headless-browser screenshot, shrunk the same way local image reads are (image-shrink pipeline). `--executable-path` overrides the Chrome/Chromium binary; `--width`/`--height` set the viewport (default 1280x800); `--full-page` captures the full scrollable page. Only `http:`/`https:` targets are allowed, and loopback/link-local/private/cloud-metadata addresses are refused by default (`screenshot.block_private_targets`, env `TOKEN_GOAT_SCREENSHOT_BLOCK_PRIVATE_TARGETS`) — see [Security, privacy, and uninstall](security.md) for what that check does and does not cover. |
150
150
  | `token-goat clean-cache` | Prune on-disk caches to their configured floor without waiting for the worker. |
151
- | `token-goat reclaim-index` | Shrink an oversized symbol index (`VACUUM` + WAL checkpoint). `--rebuild` also drops every derived row — files/symbols/refs/chunks — so the next `token-goat index` re-derives them under current parser rules, which is what actually reclaims space held by rows a since-fixed extractor wrote too large. Refuses to run while the worker daemon is writing to the index unless `--force`. `token-goat doctor` points here when `global.db` grows past 1 GB, and separately when it finds a stored symbol body above the parser's own size cap — a leftover from a since-fixed extractor bug, which only `--rebuild` can clear (a plain `VACUUM` reclaims freed pages but never deletes row content). |
151
+ | `token-goat reclaim-index` | Shrink an oversized symbol index (`VACUUM` + WAL checkpoint). `--rebuild` also drops every derived row — files/symbols/refs/chunks — so the next `token-goat index` re-derives them under current parser rules, which is what actually reclaims space held by rows a since-fixed extractor wrote too large. Refuses to run while the worker daemon is writing to the index unless `--force`. `token-goat doctor` points here when `global.db` grows past 1 GB and at least a tenth of it is free pages (it points to `project prune` instead for scratch files indexed under the OS temp dir), and separately when it finds a stored symbol body above the parser's own size cap — a leftover from a since-fixed extractor bug, which only `--rebuild` can clear (a plain `VACUUM` reclaims freed pages but never deletes row content). |
152
152
  | `token-goat prune-cache` | Manually trigger LRU eviction across all cache directories (images, bash, web, skills). |
153
153
  | `token-goat session-summary` | Compact one-liner about current session state — designed for orchestrators and multi-agent loops. |
154
154
  | `token-goat cache-audit` | Audit your Claude Code config for patterns that bust the prompt cache. |
@@ -174,7 +174,7 @@ token-goat pdf-extract manual.pdf --pages 12-15 --layout --head 120
174
174
  | `token-goat note set/get/unset/list/clear` | Persistent per-project notes stored as key-value pairs. Token-goat injects them at session start and after compaction so they survive conversation rollover. Use to pin decisions, constraints, or reminders that would otherwise vanish after compaction. `note list --json` for machine-readable output; `note clear` removes everything at once. |
175
175
  | `token-goat project list` | Show all project roots indexed by token-goat with their file counts. Roots on the blocklist appear tagged `[excluded]`. `--json` for structured output. |
176
176
  | `token-goat project exclude <path>` | Add a project root to the blocklist so the worker never indexes it. Writes the resolved absolute path to `[worker] blocked_roots` in `config.toml`; idempotent. It also removes anything already indexed under that path and says how many files went, so excluding a directory means its contents stop being readable through `symbol` rather than merely stopping future indexing. Remove the entry from the config to re-enable indexing, then run `token-goat index` to bring the contents back. |
177
- | `token-goat project prune [--dry-run]` | Remove blocked/excluded roots that no longer exist on disk. `--dry-run` previews removals without touching the config file. Useful after deleting or moving projects. |
177
+ | `token-goat project prune [--dry-run]` | Remove blocked/excluded roots that no longer exist on disk, and index rows for files under the OS temp dir. `--dry-run` previews removals without touching the config file. Useful after deleting or moving projects. |
178
178
  | `token-goat install` | Wire up hooks (and, with the harness flags below, other AI tool integrations). No `--dry-run` or `--verify` flag — run `token-goat doctor` after install to audit the result. |
179
179
  | `token-goat upgrade` | Check for updates or upgrade token-goat to the latest version via npm. Pass `--check` to report status without installing. `--json` emits machine-readable version status. |
180
180
  | `token-goat doctor` | Confirm everything is wired correctly. Surfaces install state, cold-import timing, cache hit rates, compaction-budget telemetry, opt-in flag status, and canonical-root sanity. A **Parser freshness** check reports how much of the index for this project was written by a different build of the extractor. The stamp only refreshes when something touches a file, so after an upgrade a project goes on answering `symbol`, `read`, `outline` and `skeleton` from the previous extractor with nothing saying so. It warns past a quarter and names the fix: a plain `token-goat index` in that project, which is enough on its own, since a parser mismatch reparses without `--force`. A **Tool names** check reports any tool name a harness sent that reached no handler wanting it, and calls out the ones that differ from a handled name only by capitalisation or punctuation — the signature of a bridge that forgot to rename something, which is otherwise invisible. A **Security** section reports the posture in one place: whether offline mode is on, whether injection scanning is on, whether the Google Drive integration is enabled, whether fetching runs against an allow list or a deny list, whether MCP reads are confined to the project root, and whether the data directory is readable by other local users. It only warns when a protection that ships on has been switched off, so a default install stays quiet. It read-only audits `~/.copilot/mcp-config.json` for globally configured Chrome DevTools or Playwright `npx` launchers, recommending project scope or removal when inactive; it never prints server configuration or secrets. On Windows, it also reports duplicate Chrome DevTools/Playwright MCP launchers and orphaned Node processes without terminating anything. Pass `--context` to show the **Context footprint** section: a fill bar with severity (ok / warn / high / URGENT), per-component breakdown (skills catalog, loaded skill bodies, CLAUDE.md+MEMORY.md, conversation estimate), session-to-session growth trend with sessions-to-URGENT projection, and tiered compaction recommendations (Tier 0–4) naming the exact commands to run. Auto-shown when fill > 40 % or any loaded skill > 2 K tokens lacks a compact. `--json` emits the check results (one entry per check, with `ok`/`warn`/`fail` status) as JSON instead of text. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-goat",
3
- "version": "2.9.17",
3
+ "version": "2.9.18",
4
4
  "description": "Surgical token-reduction companion for Claude Code and other AI coding agents",
5
5
  "type": "module",
6
6
  "main": "./dist/token-goat.mjs",