token-goat 2.6.34 → 2.6.36

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 (26) hide show
  1. package/README.md +4 -2
  2. package/SECURITY.md +14 -11
  3. package/dist/{token-goat-chunk-L7QLEVO7.mjs → token-goat-chunk-65BKISIS.mjs} +16 -14
  4. package/dist/{token-goat-chunk-I6EQH27G.mjs → token-goat-chunk-CNDOJ3ZP.mjs} +2 -2
  5. package/dist/{token-goat-chunk-FRMEOIRU.mjs → token-goat-chunk-FRTBMRP7.mjs} +208 -13
  6. package/dist/{token-goat-chunk-IYYQOPY4.mjs → token-goat-chunk-IYTVE6KN.mjs} +29 -10
  7. package/dist/{token-goat-chunk-GXBPEQR2.mjs → token-goat-chunk-KYFJC37X.mjs} +21 -14
  8. package/dist/{token-goat-chunk-CKRATWCJ.mjs → token-goat-chunk-LN6OUHTV.mjs} +5 -5
  9. package/dist/{token-goat-chunk-WA2ER6TZ.mjs → token-goat-chunk-MGOUYAA2.mjs} +1 -1
  10. package/dist/{token-goat-chunk-CN7GUPX6.mjs → token-goat-chunk-UFOVM7ZN.mjs} +461 -97
  11. package/dist/{token-goat-chunk-7FWBSPCT.mjs → token-goat-chunk-V465YKOR.mjs} +198 -21
  12. package/dist/{token-goat-chunk-OA3GFKP2.mjs → token-goat-chunk-VYMGEVZS.mjs} +16 -4
  13. package/dist/{token-goat-hook-chunk-2ISZ4AZR.mjs → token-goat-hook-chunk-3ZDBWJDF.mjs} +1 -1
  14. package/dist/{token-goat-hook-chunk-6C5RN3CM.mjs → token-goat-hook-chunk-5UH54CW6.mjs} +16 -4
  15. package/dist/{token-goat-hook-chunk-OQML5EMA.mjs → token-goat-hook-chunk-6ODM3MP7.mjs} +16 -14
  16. package/dist/{token-goat-hook-chunk-6QTWMSRO.mjs → token-goat-hook-chunk-A77A26A7.mjs} +461 -97
  17. package/dist/{token-goat-hook-chunk-BU5OFDGQ.mjs → token-goat-hook-chunk-BDR6C6IE.mjs} +208 -13
  18. package/dist/{token-goat-hook-chunk-I5VM5PO5.mjs → token-goat-hook-chunk-C6GIABOX.mjs} +21 -14
  19. package/dist/{token-goat-hook-chunk-QTZ6YUMQ.mjs → token-goat-hook-chunk-E257IGSN.mjs} +2 -2
  20. package/dist/{token-goat-hook-chunk-KGLMNOGD.mjs → token-goat-hook-chunk-MW5HPEGD.mjs} +29 -10
  21. package/dist/{token-goat-hook-chunk-ATEGFQAU.mjs → token-goat-hook-chunk-QSCYNJ2B.mjs} +5 -5
  22. package/dist/{token-goat-hook-chunk-CNLMPHXT.mjs → token-goat-hook-chunk-Y2WHX2P3.mjs} +198 -21
  23. package/dist/token-goat-hook.mjs +5 -5
  24. package/dist/token-goat.core.mjs +5 -5
  25. package/package.json +13 -11
  26. package/scripts/install-git-hooks.mjs +55 -0
@@ -84,7 +84,7 @@ import {
84
84
  runZipRead,
85
85
  symbolNamesInFile,
86
86
  upsertNote
87
- } from "./token-goat-chunk-IYYQOPY4.mjs";
87
+ } from "./token-goat-chunk-IYTVE6KN.mjs";
88
88
  import {
89
89
  BASH_OUTPUT_SUBDIR,
90
90
  GEMINI_TOOL_NAME_MAP,
@@ -105,7 +105,7 @@ import {
105
105
  readStdinJson,
106
106
  searchRecall,
107
107
  storeWebOutput
108
- } from "./token-goat-chunk-OA3GFKP2.mjs";
108
+ } from "./token-goat-chunk-VYMGEVZS.mjs";
109
109
  import {
110
110
  AGENT_SALT_MARKER,
111
111
  CONTEXT_AUTOCOMPACT_TOKENS,
@@ -243,7 +243,7 @@ import {
243
243
  vscodeDecoderConfigured,
244
244
  walkProject,
245
245
  writeCompact
246
- } from "./token-goat-chunk-CN7GUPX6.mjs";
246
+ } from "./token-goat-chunk-UFOVM7ZN.mjs";
247
247
  import {
248
248
  C,
249
249
  CONFIG_KEY_ENV_OVERRIDES,
@@ -294,6 +294,8 @@ import {
294
294
  normalizePath,
295
295
  pad,
296
296
  parse,
297
+ pushAll,
298
+ readConfigSource,
297
299
  recordStat,
298
300
  redactIfDotenv,
299
301
  redactUrlQuery,
@@ -322,7 +324,7 @@ import {
322
324
  withFileLock,
323
325
  withRetryOnLock,
324
326
  writeJsonSettings
325
- } from "./token-goat-chunk-7FWBSPCT.mjs";
327
+ } from "./token-goat-chunk-V465YKOR.mjs";
326
328
  import {
327
329
  __export
328
330
  } from "./token-goat-chunk-AEX54RUZ.mjs";
@@ -5873,7 +5875,7 @@ function checkConfigValid(configPath2) {
5873
5875
  };
5874
5876
  }
5875
5877
  try {
5876
- const content = fs12.readFileSync(configPath2, "utf-8");
5878
+ const content = readConfigSource(configPath2);
5877
5879
  parse(content);
5878
5880
  return {
5879
5881
  name: "Config",
@@ -9561,7 +9563,7 @@ function collectTodoFiles(patterns) {
9561
9563
  try {
9562
9564
  const stat = fs16.statSync(abs);
9563
9565
  if (stat.isDirectory()) {
9564
- results.push(...walkProject(abs).files);
9566
+ pushAll(results, walkProject(abs).files);
9565
9567
  } else {
9566
9568
  results.push(abs);
9567
9569
  }
@@ -9579,7 +9581,7 @@ function cmdTodo(patterns, opts) {
9579
9581
  const files = collectTodoFiles(patterns);
9580
9582
  const items = [];
9581
9583
  for (const f of files) {
9582
- items.push(...scanFileForTodos(f, kindSet));
9584
+ pushAll(items, scanFileForTodos(f, kindSet));
9583
9585
  }
9584
9586
  if (opts.json === true) {
9585
9587
  process.stdout.write(JSON.stringify({ items }, null, 2) + "\n");
@@ -11332,7 +11334,7 @@ function reclaimIndex(dbPath, opts = {}) {
11332
11334
  db.prepare(`DELETE FROM "${table}"`).run();
11333
11335
  dropped[table] = before;
11334
11336
  }
11335
- })();
11337
+ }).immediate();
11336
11338
  if (tableExists(db, "symbols_fts")) {
11337
11339
  try {
11338
11340
  db.prepare(`INSERT INTO symbols_fts(symbols_fts) VALUES('rebuild')`).run();
@@ -11701,8 +11703,7 @@ function cmdConfig(opts) {
11701
11703
  let raw = {};
11702
11704
  let parseErr = null;
11703
11705
  try {
11704
- const text = fs19.readFileSync(cfgFile, "utf8");
11705
- raw = parse(text);
11706
+ raw = parse(readConfigSource(cfgFile));
11706
11707
  } catch (e) {
11707
11708
  const code = e.code;
11708
11709
  if (code !== "ENOENT") {
@@ -13446,7 +13447,7 @@ async function cmdMcpServe() {
13446
13447
  let StdioServerTransport;
13447
13448
  try {
13448
13449
  ;
13449
- ({ createMcpServer } = await import("./token-goat-chunk-L7QLEVO7.mjs"));
13450
+ ({ createMcpServer } = await import("./token-goat-chunk-65BKISIS.mjs"));
13450
13451
  ({ StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js"));
13451
13452
  } catch (err2) {
13452
13453
  process.stderr.write(
@@ -13467,7 +13468,7 @@ async function cmdHook(event, opts) {
13467
13468
  if (typeof opts.harness === "string" && opts.harness.length > 0) {
13468
13469
  process.env[ENV_KEYS.HARNESS_OVERRIDE] = opts.harness;
13469
13470
  }
13470
- const { relay } = await import("./token-goat-chunk-FRMEOIRU.mjs");
13471
+ const { relay } = await import("./token-goat-chunk-FRTBMRP7.mjs");
13471
13472
  await relay(event);
13472
13473
  }
13473
13474
  async function cmdInstall(opts) {
@@ -14324,7 +14325,7 @@ function emitExtraFileArgsNote(command, first, extras, opts = {}) {
14324
14325
  }
14325
14326
  async function cmdCompress(opts) {
14326
14327
  try {
14327
- const bashRunner = await import("./token-goat-chunk-I6EQH27G.mjs");
14328
+ const bashRunner = await import("./token-goat-chunk-CNDOJ3ZP.mjs");
14328
14329
  if (opts.compress === false) {
14329
14330
  process.exitCode = bashRunner.runRaw(opts.cmd, parseTimeout(opts.timeout, bashRunner.DEFAULT_TIMEOUT_SECONDS));
14330
14331
  return;
@@ -15002,7 +15003,13 @@ function writeReplacedBuffer(file, replacedBuf, preWriteStat) {
15002
15003
  const testDelayMs = Number(process.env["TOKEN_GOAT_TEST_REPLACE_DELAY_MS"] ?? "");
15003
15004
  if (Number.isFinite(testDelayMs) && testDelayMs > 0) {
15004
15005
  process.stderr.write("TOKEN_GOAT_TEST_REPLACE_DELAY_READY\n");
15005
- sleepSync(testDelayMs);
15006
+ const until = process.env["TOKEN_GOAT_TEST_REPLACE_DELAY_UNTIL"];
15007
+ const deadline = Date.now() + testDelayMs;
15008
+ if (until !== void 0 && until !== "") {
15009
+ while (Date.now() < deadline && !fs26.existsSync(until)) sleepSync(5);
15010
+ } else {
15011
+ sleepSync(testDelayMs);
15012
+ }
15006
15013
  }
15007
15014
  let preRenameStat;
15008
15015
  try {
@@ -7,11 +7,11 @@ import {
7
7
  expandGlobs,
8
8
  leftoverIntegrations,
9
9
  run
10
- } from "./token-goat-chunk-GXBPEQR2.mjs";
11
- import "./token-goat-chunk-IYYQOPY4.mjs";
12
- import "./token-goat-chunk-OA3GFKP2.mjs";
13
- import "./token-goat-chunk-CN7GUPX6.mjs";
14
- import "./token-goat-chunk-7FWBSPCT.mjs";
10
+ } from "./token-goat-chunk-KYFJC37X.mjs";
11
+ import "./token-goat-chunk-IYTVE6KN.mjs";
12
+ import "./token-goat-chunk-VYMGEVZS.mjs";
13
+ import "./token-goat-chunk-UFOVM7ZN.mjs";
14
+ import "./token-goat-chunk-V465YKOR.mjs";
15
15
  import "./token-goat-chunk-AO2QD2AG.mjs";
16
16
  import "./token-goat-chunk-AEX54RUZ.mjs";
17
17
  export {
@@ -4,7 +4,7 @@ import {
4
4
  loadConfig,
5
5
  redactSecrets,
6
6
  stripAnsiCodes
7
- } from "./token-goat-chunk-7FWBSPCT.mjs";
7
+ } from "./token-goat-chunk-V465YKOR.mjs";
8
8
 
9
9
  // src/tool_filters/helpers.ts
10
10
  import * as fs from "node:fs";