token-goat 2.6.32 → 2.6.34

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 (35) hide show
  1. package/README.md +24 -1
  2. package/dist/{token-goat-chunk-5EXIMDHA.mjs → token-goat-chunk-7FWBSPCT.mjs} +1573 -386
  3. package/dist/token-goat-chunk-AEX54RUZ.mjs +11 -0
  4. package/dist/{token-goat-chunk-3KW5C2KQ.mjs → token-goat-chunk-AO2QD2AG.mjs} +0 -4
  5. package/dist/{token-goat-chunk-TBCLQTPG.mjs → token-goat-chunk-CKRATWCJ.mjs} +7 -7
  6. package/dist/{token-goat-chunk-X5OPORR4.mjs → token-goat-chunk-CN7GUPX6.mjs} +1258 -1769
  7. package/dist/{token-goat-hook-chunk-TKXOXN4J.mjs → token-goat-chunk-DG53MVNJ.mjs} +2 -98
  8. package/dist/{token-goat-chunk-DFBD2FFU.mjs → token-goat-chunk-FRMEOIRU.mjs} +365 -139
  9. package/dist/{token-goat-chunk-YWYITDOS.mjs → token-goat-chunk-G6XLWJWI.mjs} +2 -5
  10. package/dist/{token-goat-chunk-RD6O3PJU.mjs → token-goat-chunk-GXBPEQR2.mjs} +3699 -3341
  11. package/dist/{token-goat-chunk-DNEPSN3P.mjs → token-goat-chunk-I6EQH27G.mjs} +4 -7
  12. package/dist/{token-goat-hook-chunk-Q5URQRIF.mjs → token-goat-chunk-IYYQOPY4.mjs} +811 -79
  13. package/dist/{token-goat-chunk-W3MX4LQV.mjs → token-goat-chunk-L7QLEVO7.mjs} +6 -9
  14. package/dist/{token-goat-chunk-O7TGKV5I.mjs → token-goat-chunk-OA3GFKP2.mjs} +23 -24
  15. package/dist/{token-goat-chunk-GWZJ5SI2.mjs → token-goat-chunk-WA2ER6TZ.mjs} +7 -32
  16. package/dist/{token-goat-hook-chunk-VHZECEQD.mjs → token-goat-hook-chunk-2ISZ4AZR.mjs} +7 -32
  17. package/dist/{token-goat-chunk-4M7PSAO3.mjs → token-goat-hook-chunk-3QYSN4QV.mjs} +2 -98
  18. package/dist/{token-goat-hook-chunk-LFYT4DLB.mjs → token-goat-hook-chunk-6C5RN3CM.mjs} +23 -24
  19. package/dist/{token-goat-hook-chunk-WBTHUYJP.mjs → token-goat-hook-chunk-6QTWMSRO.mjs} +1221 -1730
  20. package/dist/token-goat-hook-chunk-ATEGFQAU.mjs +23 -0
  21. package/dist/{token-goat-hook-chunk-DJZGX27J.mjs → token-goat-hook-chunk-BU5OFDGQ.mjs} +363 -138
  22. package/dist/{token-goat-hook-chunk-J2ZK2FYW.mjs → token-goat-hook-chunk-BUOCULAM.mjs} +0 -4
  23. package/dist/{token-goat-hook-chunk-DHW6SRHR.mjs → token-goat-hook-chunk-CNLMPHXT.mjs} +1569 -382
  24. package/dist/{token-goat-hook-chunk-6NF4WM2U.mjs → token-goat-hook-chunk-I5VM5PO5.mjs} +3700 -3342
  25. package/dist/{token-goat-chunk-N53GXI2Z.mjs → token-goat-hook-chunk-KGLMNOGD.mjs} +811 -79
  26. package/dist/{token-goat-hook-chunk-TBJ5PUPQ.mjs → token-goat-hook-chunk-OQML5EMA.mjs} +6 -9
  27. package/dist/{token-goat-hook-chunk-UXD3B4OY.mjs → token-goat-hook-chunk-QTZ6YUMQ.mjs} +4 -7
  28. package/dist/token-goat-hook-chunk-RFRLWOQH.mjs +11 -0
  29. package/dist/{token-goat-hook-chunk-PCP4W65Z.mjs → token-goat-hook-chunk-XUMIVYEN.mjs} +2 -5
  30. package/dist/token-goat-hook.mjs +7 -12
  31. package/dist/token-goat.core.mjs +7 -10
  32. package/package.json +20 -40
  33. package/dist/token-goat-chunk-3UOG7PSZ.mjs +0 -63
  34. package/dist/token-goat-hook-chunk-ANFXTEQO.mjs +0 -23
  35. package/dist/token-goat-hook-chunk-K33JMLL7.mjs +0 -63
@@ -25,7 +25,7 @@ import {
25
25
  runSkeleton,
26
26
  runSymbol,
27
27
  withPinnedReads
28
- } from "./token-goat-hook-chunk-Q5URQRIF.mjs";
28
+ } from "./token-goat-hook-chunk-KGLMNOGD.mjs";
29
29
  import {
30
30
  buildProjectMap,
31
31
  embeddingsDepsAvailable,
@@ -34,7 +34,7 @@ import {
34
34
  getProjectIndexCounts,
35
35
  isWorkerRunning,
36
36
  mapLookupBytesSaved
37
- } from "./token-goat-hook-chunk-WBTHUYJP.mjs";
37
+ } from "./token-goat-hook-chunk-6QTWMSRO.mjs";
38
38
  import {
39
39
  VERSION,
40
40
  dataDir,
@@ -45,14 +45,11 @@ import {
45
45
  normalizePath,
46
46
  recordStat,
47
47
  resolveProjectRoot
48
- } from "./token-goat-hook-chunk-DHW6SRHR.mjs";
49
- import "./token-goat-hook-chunk-J2ZK2FYW.mjs";
50
- import {
51
- init_define_import_meta_env
52
- } from "./token-goat-hook-chunk-K33JMLL7.mjs";
48
+ } from "./token-goat-hook-chunk-CNLMPHXT.mjs";
49
+ import "./token-goat-hook-chunk-BUOCULAM.mjs";
50
+ import "./token-goat-hook-chunk-RFRLWOQH.mjs";
53
51
 
54
52
  // src/mcp_server.ts
55
- init_define_import_meta_env();
56
53
  import * as fs from "fs";
57
54
  import * as path from "path";
58
55
  var TOKEN_GOAT_RETRY_RE = /token-goat (\w[\w-]*) "([^"]+)"/g;
@@ -202,7 +199,7 @@ function withConfinedRead(pins, fn) {
202
199
  }
203
200
  }
204
201
  async function createMcpServer() {
205
- const [{ McpServer }, { z }] = await Promise.all([import("@modelcontextprotocol/sdk/server/mcp.js"), import("./token-goat-hook-chunk-TKXOXN4J.mjs")]);
202
+ const [{ McpServer }, { z }] = await Promise.all([import("@modelcontextprotocol/sdk/server/mcp.js"), import("./token-goat-hook-chunk-3QYSN4QV.mjs")]);
206
203
  const server = new McpServer({ name: "token-goat", version: VERSION });
207
204
  const makeProjectRootField = (verb) => z.string().optional().describe(
208
205
  `absolute path to the workspace root to scope this ${verb} to; defaults to the MCP server process's cwd, which is not always the actual workspace root for MCP clients -- pass this explicitly when it might differ`
@@ -10,18 +10,15 @@ import {
10
10
  selectFilter,
11
11
  shlexSplit,
12
12
  wrappedShell
13
- } from "./token-goat-hook-chunk-VHZECEQD.mjs";
13
+ } from "./token-goat-hook-chunk-2ISZ4AZR.mjs";
14
14
  import {
15
15
  loadConfig,
16
16
  recordStat
17
- } from "./token-goat-hook-chunk-DHW6SRHR.mjs";
18
- import "./token-goat-hook-chunk-J2ZK2FYW.mjs";
19
- import {
20
- init_define_import_meta_env
21
- } from "./token-goat-hook-chunk-K33JMLL7.mjs";
17
+ } from "./token-goat-hook-chunk-CNLMPHXT.mjs";
18
+ import "./token-goat-hook-chunk-BUOCULAM.mjs";
19
+ import "./token-goat-hook-chunk-RFRLWOQH.mjs";
22
20
 
23
21
  // src/bash_runner.ts
24
- init_define_import_meta_env();
25
22
  import { spawnSync } from "node:child_process";
26
23
  import * as os from "node:os";
27
24
  var IdentityFilter = class extends ToolFilter {
@@ -0,0 +1,11 @@
1
+ import { createRequire as __cjsRequire } from 'node:module';
2
+ const require = __cjsRequire(import.meta.url);
3
+ var __defProp = Object.defineProperty;
4
+ var __export = (target, all) => {
5
+ for (var name in all)
6
+ __defProp(target, name, { get: all[name], enumerable: true });
7
+ };
8
+
9
+ export {
10
+ __export
11
+ };
@@ -2,13 +2,10 @@ import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
3
  import {
4
4
  clearModuleCaches
5
- } from "./token-goat-hook-chunk-J2ZK2FYW.mjs";
6
- import {
7
- init_define_import_meta_env
8
- } from "./token-goat-hook-chunk-K33JMLL7.mjs";
5
+ } from "./token-goat-hook-chunk-BUOCULAM.mjs";
6
+ import "./token-goat-hook-chunk-RFRLWOQH.mjs";
9
7
 
10
8
  // src/batch_serve.ts
11
- init_define_import_meta_env();
12
9
  function swapEnv(next) {
13
10
  const before = { ...process.env };
14
11
  for (const key of Object.keys(process.env)) if (!(key in next)) delete process.env[key];
@@ -2,18 +2,13 @@ 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-hook-chunk-DJZGX27J.mjs";
6
- import "./token-goat-hook-chunk-VHZECEQD.mjs";
7
- import "./token-goat-hook-chunk-LFYT4DLB.mjs";
8
- import "./token-goat-hook-chunk-WBTHUYJP.mjs";
9
- import "./token-goat-hook-chunk-DHW6SRHR.mjs";
10
- import "./token-goat-hook-chunk-J2ZK2FYW.mjs";
11
- import {
12
- init_define_import_meta_env
13
- } from "./token-goat-hook-chunk-K33JMLL7.mjs";
14
-
15
- // src/hook_lib.ts
16
- init_define_import_meta_env();
5
+ } from "./token-goat-hook-chunk-BU5OFDGQ.mjs";
6
+ import "./token-goat-hook-chunk-2ISZ4AZR.mjs";
7
+ import "./token-goat-hook-chunk-6C5RN3CM.mjs";
8
+ import "./token-goat-hook-chunk-6QTWMSRO.mjs";
9
+ import "./token-goat-hook-chunk-CNLMPHXT.mjs";
10
+ import "./token-goat-hook-chunk-BUOCULAM.mjs";
11
+ import "./token-goat-hook-chunk-RFRLWOQH.mjs";
17
12
  export {
18
13
  relayInProcess
19
14
  };
@@ -2,19 +2,16 @@ 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-RD6O3PJU.mjs";
6
- import "./token-goat-chunk-N53GXI2Z.mjs";
7
- import "./token-goat-chunk-O7TGKV5I.mjs";
8
- import "./token-goat-chunk-X5OPORR4.mjs";
5
+ } from "./token-goat-chunk-GXBPEQR2.mjs";
6
+ import "./token-goat-chunk-IYYQOPY4.mjs";
7
+ import "./token-goat-chunk-OA3GFKP2.mjs";
8
+ import "./token-goat-chunk-CN7GUPX6.mjs";
9
9
  import {
10
10
  installEpipeGuard
11
- } from "./token-goat-chunk-5EXIMDHA.mjs";
12
- import "./token-goat-chunk-3KW5C2KQ.mjs";
13
- import {
14
- init_define_import_meta_env
15
- } from "./token-goat-chunk-3UOG7PSZ.mjs";
11
+ } from "./token-goat-chunk-7FWBSPCT.mjs";
12
+ import "./token-goat-chunk-AO2QD2AG.mjs";
13
+ import "./token-goat-chunk-AEX54RUZ.mjs";
16
14
 
17
15
  // src/main.ts
18
- init_define_import_meta_env();
19
16
  installEpipeGuard();
20
17
  void run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-goat",
3
- "version": "2.6.32",
3
+ "version": "2.6.34",
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",
@@ -57,29 +57,29 @@
57
57
  "node": ">=22.0.0"
58
58
  },
59
59
  "dependencies": {
60
- "better-sqlite3": "^11.3.0",
61
- "commander": "^12.1.0",
62
- "csv-parse": "^7.0.1",
60
+ "better-sqlite3": "^12.11.1",
61
+ "commander": "^15.0.0",
62
+ "csv-parse": "^7.0.2",
63
63
  "js-yaml": "^5.2.1",
64
64
  "jsonc-parser": "^3.3.1",
65
- "smol-toml": "^1.7.0",
65
+ "smol-toml": "^1.8.0",
66
66
  "zod": "^4.4.3"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@eslint/js": "^10.0.1",
70
- "@types/better-sqlite3": "^7.6.11",
71
- "@types/node": "^22.0.0",
70
+ "@types/better-sqlite3": "^9.6.0",
71
+ "@types/node": "^26.2.0",
72
72
  "esbuild": "^0.28.2",
73
- "eslint": "^10.5.0",
74
- "html-to-text": "^10.0.0",
73
+ "eslint": "^10.8.1",
74
+ "html-to-text": "^10.0.1",
75
75
  "lefthook": "^2.1.10",
76
- "tsx": "^4.19.0",
76
+ "tsx": "^4.23.12",
77
77
  "typescript": "^6.0.3",
78
- "typescript-eslint": "^8.62.0",
79
- "vitest": "^4.1.10"
78
+ "typescript-eslint": "^8.67.0",
79
+ "vitest": "^4.1.11"
80
80
  },
81
81
  "optionalDependencies": {
82
- "@modelcontextprotocol/sdk": "^1.29.0",
82
+ "@modelcontextprotocol/sdk": "^1.30.0",
83
83
  "@xenova/transformers": "^2.17.2",
84
84
  "exceljs": "^4.4.0",
85
85
  "fast-xml-parser": "^5.9.3",
@@ -88,39 +88,19 @@
88
88
  "puppeteer-core": "^25.8.0",
89
89
  "sharp": "^0.35.3",
90
90
  "sqlite-vec": "^0.1.9",
91
- "tesseract.js": "^6.0.1",
92
- "tree-sitter": "^0.22.4",
93
- "tree-sitter-c": "^0.23.0",
91
+ "tesseract.js": "^7.0.0",
92
+ "tree-sitter": "^0.25.1",
93
+ "tree-sitter-c": "^0.24.1",
94
94
  "tree-sitter-cpp": "^0.23.4",
95
- "tree-sitter-go": "^0.23.0",
95
+ "tree-sitter-go": "^0.25.0",
96
96
  "tree-sitter-java": "^0.23.0",
97
- "tree-sitter-javascript": "^0.23.1",
98
- "tree-sitter-python": "^0.23.6",
97
+ "tree-sitter-javascript": "^0.25.0",
98
+ "tree-sitter-python": "^0.25.0",
99
99
  "tree-sitter-ruby": "^0.23.0",
100
- "tree-sitter-rust": "^0.23.0",
100
+ "tree-sitter-rust": "^0.24.0",
101
101
  "tree-sitter-typescript": "^0.23.2",
102
102
  "typescript": "^6.0.3"
103
103
  },
104
- "allowScripts": {
105
- "esbuild@0.24.2": true,
106
- "esbuild@0.28.1": true,
107
- "sharp@0.32.6": true,
108
- "sharp@0.33.5": true,
109
- "better-sqlite3@11.10.0": true,
110
- "lefthook@2.1.10": true,
111
- "protobufjs@6.11.6": true,
112
- "tesseract.js@6.0.1": true,
113
- "tree-sitter@0.22.4": true,
114
- "tree-sitter-c@0.23.6": true,
115
- "tree-sitter-cpp@0.23.4": true,
116
- "tree-sitter-go@0.23.4": true,
117
- "tree-sitter-java@0.23.5": true,
118
- "tree-sitter-javascript@0.23.1": true,
119
- "tree-sitter-python@0.23.6": true,
120
- "tree-sitter-ruby@0.23.1": true,
121
- "tree-sitter-rust@0.23.3": true,
122
- "tree-sitter-typescript@0.23.2": true
123
- },
124
104
  "overrides": {
125
105
  "protobufjs": "^8.7.2",
126
106
  "deepmerge-ts": "^8.0.1",
@@ -1,63 +0,0 @@
1
- import { createRequire as __cjsRequire } from 'node:module';
2
- const require = __cjsRequire(import.meta.url);
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
- }) : x)(function(x) {
12
- if (typeof require !== "undefined") return require.apply(this, arguments);
13
- throw Error('Dynamic require of "' + x + '" is not supported');
14
- });
15
- var __esm = (fn, res, err) => function __init() {
16
- if (err) throw err[0];
17
- try {
18
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
19
- } catch (e) {
20
- throw err = [e], e;
21
- }
22
- };
23
- var __commonJS = (cb, mod) => function __require2() {
24
- try {
25
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26
- } catch (e) {
27
- throw mod = 0, e;
28
- }
29
- };
30
- var __export = (target, all) => {
31
- for (var name in all)
32
- __defProp(target, name, { get: all[name], enumerable: true });
33
- };
34
- var __copyProps = (to, from, except, desc) => {
35
- if (from && typeof from === "object" || typeof from === "function") {
36
- for (let key of __getOwnPropNames(from))
37
- if (!__hasOwnProp.call(to, key) && key !== except)
38
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
39
- }
40
- return to;
41
- };
42
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
43
- // If the importer is in node compatibility mode or this is not an ESM
44
- // file that has been converted to a CommonJS file using a Babel-
45
- // compatible transform (i.e. "__esModule" has not been set), then set
46
- // "default" to the CommonJS "module.exports" for node compatibility.
47
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
48
- mod
49
- ));
50
-
51
- // <define:import.meta.env>
52
- var init_define_import_meta_env = __esm({
53
- "<define:import.meta.env>"() {
54
- }
55
- });
56
-
57
- export {
58
- __require,
59
- __commonJS,
60
- __export,
61
- __toESM,
62
- init_define_import_meta_env
63
- };
@@ -1,23 +0,0 @@
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-hook-chunk-DJZGX27J.mjs";
8
- import "./token-goat-hook-chunk-VHZECEQD.mjs";
9
- import {
10
- MAX_STDIN_BYTES,
11
- readStdinJson
12
- } from "./token-goat-hook-chunk-LFYT4DLB.mjs";
13
- import "./token-goat-hook-chunk-WBTHUYJP.mjs";
14
- import "./token-goat-hook-chunk-DHW6SRHR.mjs";
15
- import "./token-goat-hook-chunk-J2ZK2FYW.mjs";
16
- import "./token-goat-hook-chunk-K33JMLL7.mjs";
17
- export {
18
- MAX_STDIN_BYTES,
19
- buildEvent,
20
- readStdinJson,
21
- relay,
22
- relayInProcess
23
- };
@@ -1,63 +0,0 @@
1
- import { createRequire as __cjsRequire } from 'node:module';
2
- const require = __cjsRequire(import.meta.url);
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
10
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
11
- }) : x)(function(x) {
12
- if (typeof require !== "undefined") return require.apply(this, arguments);
13
- throw Error('Dynamic require of "' + x + '" is not supported');
14
- });
15
- var __esm = (fn, res, err) => function __init() {
16
- if (err) throw err[0];
17
- try {
18
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
19
- } catch (e) {
20
- throw err = [e], e;
21
- }
22
- };
23
- var __commonJS = (cb, mod) => function __require2() {
24
- try {
25
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
26
- } catch (e) {
27
- throw mod = 0, e;
28
- }
29
- };
30
- var __export = (target, all) => {
31
- for (var name in all)
32
- __defProp(target, name, { get: all[name], enumerable: true });
33
- };
34
- var __copyProps = (to, from, except, desc) => {
35
- if (from && typeof from === "object" || typeof from === "function") {
36
- for (let key of __getOwnPropNames(from))
37
- if (!__hasOwnProp.call(to, key) && key !== except)
38
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
39
- }
40
- return to;
41
- };
42
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
43
- // If the importer is in node compatibility mode or this is not an ESM
44
- // file that has been converted to a CommonJS file using a Babel-
45
- // compatible transform (i.e. "__esModule" has not been set), then set
46
- // "default" to the CommonJS "module.exports" for node compatibility.
47
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
48
- mod
49
- ));
50
-
51
- // <define:import.meta.env>
52
- var init_define_import_meta_env = __esm({
53
- "<define:import.meta.env>"() {
54
- }
55
- });
56
-
57
- export {
58
- __require,
59
- __commonJS,
60
- __export,
61
- __toESM,
62
- init_define_import_meta_env
63
- };