token-goat 2.9.2 → 2.9.3

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 +20 -49
  2. package/dist/{token-goat-chunk-Q4LOQY44.mjs → token-goat-chunk-2VVXTAGD.mjs} +137 -12
  3. package/dist/{token-goat-chunk-LEBYARO3.mjs → token-goat-chunk-3UBORD6Z.mjs} +9 -6
  4. package/dist/{token-goat-chunk-LJ3CHCTT.mjs → token-goat-chunk-3XVGPLDS.mjs} +3492 -46
  5. package/dist/{token-goat-chunk-KKIB7O3Z.mjs → token-goat-chunk-6FQMEMWX.mjs} +418 -105
  6. package/dist/{token-goat-chunk-FXAPKVRG.mjs → token-goat-chunk-7A7SBE6R.mjs} +26 -5
  7. package/dist/token-goat-chunk-A37V4PBF.mjs +56 -0
  8. package/dist/{token-goat-chunk-VCNW7BGU.mjs → token-goat-chunk-A4VBNWSL.mjs} +20 -3
  9. package/dist/{token-goat-chunk-G6XLWJWI.mjs → token-goat-chunk-E3K3BTEQ.mjs} +5 -2
  10. package/dist/{token-goat-chunk-AO2QD2AG.mjs → token-goat-chunk-EEIDFMEM.mjs} +4 -0
  11. package/dist/{token-goat-chunk-324QOJYZ.mjs → token-goat-chunk-EVC4TOLE.mjs} +4 -1
  12. package/dist/{token-goat-chunk-WN5T5EW5.mjs → token-goat-chunk-FQD3OB5W.mjs} +98 -2
  13. package/dist/token-goat-chunk-HC5NMGPD.mjs +23 -0
  14. package/dist/{token-goat-chunk-UZ2NFOOZ.mjs → token-goat-chunk-KKHKXUVS.mjs} +154 -8
  15. package/dist/{token-goat-chunk-NY4HYRSK.mjs → token-goat-chunk-LLNA42NI.mjs} +10 -12
  16. package/dist/{token-goat-chunk-5CVKO3DA.mjs → token-goat-chunk-LYWIRYCF.mjs} +5 -2
  17. package/dist/{token-goat-chunk-CGWACYYZ.mjs → token-goat-chunk-OKJX2JWW.mjs} +6 -1
  18. package/dist/{token-goat-chunk-R4SR7MQY.mjs → token-goat-chunk-PXWBHSFB.mjs} +2 -2
  19. package/dist/{token-goat-chunk-JMUBXBG7.mjs → token-goat-chunk-XSSQFI4C.mjs} +7 -7
  20. package/dist/token-goat-hook.mjs +12 -7
  21. package/dist/token-goat.core.mjs +10 -7
  22. package/docs/cli.md +53 -0
  23. package/docs/security.md +6 -2
  24. package/package.json +8 -2
  25. package/dist/token-goat-chunk-AEX54RUZ.mjs +0 -11
  26. package/dist/token-goat-chunk-ZVN5WHTO.mjs +0 -23
@@ -68,7 +68,7 @@ import {
68
68
  walkProject,
69
69
  yamlLineClosesQuote,
70
70
  yamlOpenQuoteAfter
71
- } from "./token-goat-chunk-LJ3CHCTT.mjs";
71
+ } from "./token-goat-chunk-3XVGPLDS.mjs";
72
72
  import {
73
73
  Database,
74
74
  PER_FILE_COUNTERFACTUAL_CEILING,
@@ -122,12 +122,16 @@ import {
122
122
  unsupportedLanguageName,
123
123
  windowsCmdQuoteArg,
124
124
  withExtension
125
- } from "./token-goat-chunk-UZ2NFOOZ.mjs";
125
+ } from "./token-goat-chunk-KKHKXUVS.mjs";
126
126
  import {
127
127
  registerReset
128
- } from "./token-goat-chunk-AO2QD2AG.mjs";
128
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
129
+ import {
130
+ init_define_import_meta_env
131
+ } from "./token-goat-chunk-A37V4PBF.mjs";
129
132
 
130
133
  // src/section_reader.ts
134
+ init_define_import_meta_env();
131
135
  import { readFileSync } from "node:fs";
132
136
  function parseHeadingSpec(spec, headers) {
133
137
  const m = /^([^#\r\n]+)#(\d+)$/.exec(spec);
@@ -447,6 +451,7 @@ function listSections(filePath, readFn) {
447
451
  }
448
452
 
449
453
  // src/graph_commands.ts
454
+ init_define_import_meta_env();
450
455
  import * as fs6 from "node:fs";
451
456
  import * as os from "node:os";
452
457
  import * as path6 from "node:path";
@@ -454,10 +459,12 @@ import { execFileSync, spawnSync as spawnSync2 } from "node:child_process";
454
459
  import { randomUUID } from "node:crypto";
455
460
 
456
461
  // src/read_commands.ts
462
+ init_define_import_meta_env();
457
463
  import * as fs4 from "node:fs";
458
464
  import * as path4 from "node:path";
459
465
 
460
466
  // src/json_query.ts
467
+ init_define_import_meta_env();
461
468
  function jsonType(value) {
462
469
  if (value === null) return "null";
463
470
  if (Array.isArray(value)) return "array";
@@ -596,6 +603,7 @@ function queryJson(data, spec) {
596
603
  }
597
604
 
598
605
  // src/xml_query.ts
606
+ init_define_import_meta_env();
599
607
  var XML_NAME_START = "A-Za-z_:\xC0-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uD800-\uDFFF\uF900-\uFDCF\uFDF0-\uFFFD";
600
608
  var XML_NAME_REST = "A-Za-z_:\xC0-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uD800-\uDFFF\uF900-\uFDCF\uFDF0-\uFFFD0-9.\xB7\u0300-\u036F\u203F-\u2040-";
601
609
  var XML_NAME = `[${XML_NAME_START}][${XML_NAME_REST}]*`;
@@ -1064,6 +1072,7 @@ function queryXml(xmlText, pathStr) {
1064
1072
  }
1065
1073
 
1066
1074
  // node_modules/js-yaml/dist/js-yaml.mjs
1075
+ init_define_import_meta_env();
1067
1076
  var NOT_RESOLVED = /* @__PURE__ */ Symbol("NOT_RESOLVED");
1068
1077
  function defineScalarTag(tagName, options) {
1069
1078
  return {
@@ -3530,6 +3539,7 @@ var CHOMPING_STRIP = CHOMPING_MODE.STRIP;
3530
3539
  var CHOMPING_KEEP = CHOMPING_MODE.KEEP;
3531
3540
 
3532
3541
  // src/openapi_query.ts
3542
+ init_define_import_meta_env();
3533
3543
  import * as path from "node:path";
3534
3544
  var HTTP_METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
3535
3545
  function parseOpenApiSpec(text, filePath) {
@@ -3676,6 +3686,7 @@ function formatOperationDetail(op) {
3676
3686
  }
3677
3687
 
3678
3688
  // src/archive_query.ts
3689
+ init_define_import_meta_env();
3679
3690
  var loadFflate = createLazyModuleLoader(
3680
3691
  async () => await import("fflate"),
3681
3692
  "archive reading disabled (fflate unavailable)"
@@ -3719,6 +3730,7 @@ async function extractZipEntry(data, entryPath) {
3719
3730
  }
3720
3731
 
3721
3732
  // src/pr_slice.ts
3733
+ init_define_import_meta_env();
3722
3734
  import { spawnSync } from "node:child_process";
3723
3735
  var _ghAvailable;
3724
3736
  function isGhAvailable() {
@@ -3888,6 +3900,7 @@ ${c.body}`).join("\n\n");
3888
3900
  }
3889
3901
 
3890
3902
  // src/sqlite_query.ts
3903
+ init_define_import_meta_env();
3891
3904
  import * as fs from "node:fs";
3892
3905
  var SQLITE_QUERY_ROW_CAP = 5e3;
3893
3906
  var SQLITE_MAGIC = Buffer.from([83, 81, 76, 105, 116, 101, 32, 102, 111, 114, 109, 97, 116, 32, 51, 0]);
@@ -4150,6 +4163,7 @@ function quoteCsvCellLocal(cell) {
4150
4163
  }
4151
4164
 
4152
4165
  // src/coverage_query.ts
4166
+ init_define_import_meta_env();
4153
4167
  function num(v) {
4154
4168
  return typeof v === "number" && Number.isFinite(v) ? v : 0;
4155
4169
  }
@@ -4451,6 +4465,7 @@ function formatCoverageGaps(report) {
4451
4465
  }
4452
4466
 
4453
4467
  // src/conflict_query.ts
4468
+ init_define_import_meta_env();
4454
4469
  var OURS_RE = /^<{7}(?:\s+(.*))?$/;
4455
4470
  var BASE_RE = /^\|{7}(?:\s+(.*))?$/;
4456
4471
  var SEP_RE = /^={7}\s*$/;
@@ -4615,6 +4630,7 @@ function formatConflictSummaries(summaries) {
4615
4630
  }
4616
4631
 
4617
4632
  // src/screenshot.ts
4633
+ init_define_import_meta_env();
4618
4634
  import dns from "node:dns/promises";
4619
4635
  import fs2 from "node:fs";
4620
4636
  import path2 from "node:path";
@@ -4941,6 +4957,7 @@ async function takeScreenshot(url, destPath, opts) {
4941
4957
  }
4942
4958
 
4943
4959
  // src/notes.ts
4960
+ init_define_import_meta_env();
4944
4961
  import * as fs3 from "node:fs";
4945
4962
  var WHOLE_FILE_NOTE_SYMBOL = "";
4946
4963
  function toNoteRow(row) {
@@ -5016,6 +5033,7 @@ function isNoteStale(note, dbPath = globalDbPath()) {
5016
5033
  }
5017
5034
 
5018
5035
  // src/ts_refs.ts
5036
+ init_define_import_meta_env();
5019
5037
  import { createRequire } from "node:module";
5020
5038
  import * as path3 from "node:path";
5021
5039
  var _require = createRequire(import.meta.url);
@@ -7498,7 +7516,7 @@ async function runImageMeta(file) {
7498
7516
  throw e;
7499
7517
  }
7500
7518
  if (probe === null) {
7501
- return { width: 0, height: 0, format: null, bytes, sharpAvailable: false, wouldShrink: false, shrunkBytes: null };
7519
+ return { width: 0, height: 0, format: null, bytes, decodable: false, wouldShrink: false, shrunkBytes: null };
7502
7520
  }
7503
7521
  const shrink = await shrinkImage(data, { sizeThresholdBytes: 0 });
7504
7522
  return {
@@ -7506,7 +7524,7 @@ async function runImageMeta(file) {
7506
7524
  height: probe.height,
7507
7525
  format: probe.format,
7508
7526
  bytes,
7509
- sharpAvailable: true,
7527
+ decodable: true,
7510
7528
  wouldShrink: shrink !== null,
7511
7529
  shrunkBytes: shrink !== null ? shrink.shrunkBytes : null
7512
7530
  };
@@ -9206,6 +9224,7 @@ function runNoteList(opts = {}) {
9206
9224
  }
9207
9225
 
9208
9226
  // src/import_graph.ts
9227
+ init_define_import_meta_env();
9209
9228
  import * as fs5 from "node:fs";
9210
9229
  import * as path5 from "node:path";
9211
9230
  var DIRECT_PROBE_EXTENSIONS = ["", ".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs", ".cjs", ".cts", ".py"];
@@ -9257,6 +9276,7 @@ function buildImportGraph(cwd) {
9257
9276
  }
9258
9277
 
9259
9278
  // src/modules.ts
9279
+ init_define_import_meta_env();
9260
9280
  var WEAK_MODULARITY = 0.3;
9261
9281
  var MAX_PASSES = 32;
9262
9282
  var GAIN_EPSILON = 1e-12;
@@ -10762,6 +10782,7 @@ ANSWER:`;
10762
10782
  }
10763
10783
 
10764
10784
  // src/content_store.ts
10785
+ init_define_import_meta_env();
10765
10786
  import { deflateRawSync } from "node:zlib";
10766
10787
  import * as path7 from "node:path";
10767
10788
  var CONTENT_MAX_INPUT_CHARS = 512 * 1024;
@@ -0,0 +1,56 @@
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 __esm = (fn, res, err) => function __init() {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
17
+ var __commonJS = (cb, mod) => function __require() {
18
+ try {
19
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
+ } catch (e) {
21
+ throw mod = 0, e;
22
+ }
23
+ };
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
37
+ // If the importer is in node compatibility mode or this is not an ESM
38
+ // file that has been converted to a CommonJS file using a Babel-
39
+ // compatible transform (i.e. "__esModule" has not been set), then set
40
+ // "default" to the CommonJS "module.exports" for node compatibility.
41
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
42
+ mod
43
+ ));
44
+
45
+ // <define:import.meta.env>
46
+ var init_define_import_meta_env = __esm({
47
+ "<define:import.meta.env>"() {
48
+ }
49
+ });
50
+
51
+ export {
52
+ __commonJS,
53
+ __export,
54
+ __toESM,
55
+ init_define_import_meta_env
56
+ };
@@ -9,7 +9,7 @@ import {
9
9
  isBlobStale,
10
10
  loadBlob,
11
11
  storeBlob
12
- } from "./token-goat-chunk-LJ3CHCTT.mjs";
12
+ } from "./token-goat-chunk-3XVGPLDS.mjs";
13
13
  import {
14
14
  SYMBOL_BODY_CHAR_CAP,
15
15
  copilotCliMcpToolsDir,
@@ -24,12 +24,22 @@ import {
24
24
  resolveIndexPath,
25
25
  shortFingerprint,
26
26
  toDisplayPath
27
- } from "./token-goat-chunk-UZ2NFOOZ.mjs";
27
+ } from "./token-goat-chunk-KKHKXUVS.mjs";
28
28
  import {
29
29
  registerReset
30
- } from "./token-goat-chunk-AO2QD2AG.mjs";
30
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
31
+ import {
32
+ init_define_import_meta_env
33
+ } from "./token-goat-chunk-A37V4PBF.mjs";
34
+
35
+ // src/hooks_cli.ts
36
+ init_define_import_meta_env();
37
+
38
+ // src/copilot_mcp_names.ts
39
+ init_define_import_meta_env();
31
40
 
32
41
  // src/copilot_mcp_tools.ts
42
+ init_define_import_meta_env();
33
43
  import fs from "node:fs";
34
44
  import path from "node:path";
35
45
  function wireShapeLength(tools) {
@@ -314,6 +324,7 @@ function normalizePayload(payload, harness = "claude") {
314
324
  }
315
325
 
316
326
  // src/web_cache.ts
327
+ init_define_import_meta_env();
317
328
  var WEB_OUTPUT_SUBDIR = "web_outputs";
318
329
  var _byId = /* @__PURE__ */ new Map();
319
330
  var _rawById = /* @__PURE__ */ new Map();
@@ -370,6 +381,7 @@ registerReset(() => {
370
381
  });
371
382
 
372
383
  // src/types.ts
384
+ init_define_import_meta_env();
373
385
  var HOOK_EVENTS = [
374
386
  "pre_tool_use",
375
387
  "post_tool_use",
@@ -384,6 +396,7 @@ var HOOK_EVENTS = [
384
396
  ];
385
397
 
386
398
  // src/cli_commands.ts
399
+ init_define_import_meta_env();
387
400
  function toEntry(cmd) {
388
401
  return {
389
402
  name: cmd.name(),
@@ -452,6 +465,7 @@ function formatCommandManifest(manifest) {
452
465
  }
453
466
 
454
467
  // src/reconcile.ts
468
+ init_define_import_meta_env();
455
469
  import * as fs2 from "node:fs";
456
470
  var DEFAULT_RECONCILE_BUDGET_MS = 1500;
457
471
  function runReconcile(opts = {}) {
@@ -575,6 +589,7 @@ function reconcileProject(opts = {}) {
575
589
  }
576
590
 
577
591
  // src/stdin_json.ts
592
+ init_define_import_meta_env();
578
593
  var DEFAULT_STDIN_TIMEOUT_MS = 5e3;
579
594
  var MAX_STDIN_WALL_MS = 6e4;
580
595
  var MAX_STDIN_BYTES = 64 * 1024 * 1024;
@@ -641,6 +656,7 @@ function readStdinJson(timeoutMs = DEFAULT_STDIN_TIMEOUT_MS, maxBytes = MAX_STDI
641
656
  }
642
657
 
643
658
  // src/symbol_body_probe.ts
659
+ init_define_import_meta_env();
644
660
  import * as fs3 from "fs";
645
661
  var OVERSIZED_BODY_PROBE_SQL = `SELECT 1 FROM symbols WHERE LENGTH(body) > ${SYMBOL_BODY_CHAR_CAP} LIMIT 1`;
646
662
  function checkSymbolBodySize(dbPath) {
@@ -668,6 +684,7 @@ function checkSymbolBodySize(dbPath) {
668
684
  }
669
685
 
670
686
  // src/resident_context.ts
687
+ init_define_import_meta_env();
671
688
  import * as fs4 from "node:fs";
672
689
  var LARGE_TASK_LIST_BYTES = 2e4;
673
690
  var LARGE_SKILL_BODY_BYTES = 2e4;
@@ -2,10 +2,13 @@ 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-chunk-AO2QD2AG.mjs";
6
- import "./token-goat-chunk-AEX54RUZ.mjs";
5
+ } from "./token-goat-chunk-EEIDFMEM.mjs";
6
+ import {
7
+ init_define_import_meta_env
8
+ } from "./token-goat-chunk-A37V4PBF.mjs";
7
9
 
8
10
  // src/batch_serve.ts
11
+ init_define_import_meta_env();
9
12
  function swapEnv(next) {
10
13
  const before = { ...process.env };
11
14
  for (const key of Object.keys(process.env)) if (!(key in next)) delete process.env[key];
@@ -1,7 +1,11 @@
1
1
  import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
+ import {
4
+ init_define_import_meta_env
5
+ } from "./token-goat-chunk-A37V4PBF.mjs";
3
6
 
4
7
  // src/reset.ts
8
+ init_define_import_meta_env();
5
9
  var _resets = [];
6
10
  function registerReset(fn) {
7
11
  _resets.push(fn);
@@ -1,8 +1,11 @@
1
1
  import { createRequire as __cjsRequire } from 'node:module';
2
2
  const require = __cjsRequire(import.meta.url);
3
- import "./token-goat-chunk-AEX54RUZ.mjs";
3
+ import {
4
+ init_define_import_meta_env
5
+ } from "./token-goat-chunk-A37V4PBF.mjs";
4
6
 
5
7
  // src/mcp_stdio.ts
8
+ init_define_import_meta_env();
6
9
  import process from "node:process";
7
10
  var STDIO_MAX_BUFFER_BYTES = 10 * 1024 * 1024;
8
11
  var StdioServerTransport = class {