@eve-horizon/cli 0.2.35 → 0.2.37

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 (2) hide show
  1. package/dist/index.js +764 -421
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -8750,9 +8750,9 @@ var require_src3 = __commonJS({
8750
8750
  var require_module_details_from_path = __commonJS({
8751
8751
  "../../node_modules/.pnpm/module-details-from-path@1.0.4/node_modules/module-details-from-path/index.js"(exports2, module2) {
8752
8752
  "use strict";
8753
- var sep = require("path").sep;
8753
+ var sep2 = require("path").sep;
8754
8754
  module2.exports = function(file) {
8755
- var segments = file.split(sep);
8755
+ var segments = file.split(sep2);
8756
8756
  var index = segments.lastIndexOf("node_modules");
8757
8757
  if (index === -1) return;
8758
8758
  if (!segments[index + 1]) return;
@@ -8765,22 +8765,22 @@ var require_module_details_from_path = __commonJS({
8765
8765
  if (i === lastBaseDirSegmentIndex) {
8766
8766
  basedir += segments[i];
8767
8767
  } else {
8768
- basedir += segments[i] + sep;
8768
+ basedir += segments[i] + sep2;
8769
8769
  }
8770
8770
  }
8771
- var path7 = "";
8771
+ var path8 = "";
8772
8772
  var lastSegmentIndex = segments.length - 1;
8773
8773
  for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) {
8774
8774
  if (i2 === lastSegmentIndex) {
8775
- path7 += segments[i2];
8775
+ path8 += segments[i2];
8776
8776
  } else {
8777
- path7 += segments[i2] + sep;
8777
+ path8 += segments[i2] + sep2;
8778
8778
  }
8779
8779
  }
8780
8780
  return {
8781
8781
  name,
8782
8782
  basedir,
8783
- path: path7
8783
+ path: path8
8784
8784
  };
8785
8785
  };
8786
8786
  }
@@ -8886,8 +8886,8 @@ var require_path_parse = __commonJS({
8886
8886
  // ../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/node-modules-paths.js
8887
8887
  var require_node_modules_paths = __commonJS({
8888
8888
  "../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/node-modules-paths.js"(exports2, module2) {
8889
- var path7 = require("path");
8890
- var parse3 = path7.parse || require_path_parse();
8889
+ var path8 = require("path");
8890
+ var parse3 = path8.parse || require_path_parse();
8891
8891
  var driveLetterRegex = /^([A-Za-z]:)/;
8892
8892
  var uncPathRegex = /^\\\\/;
8893
8893
  var getNodeModulesDirs = function getNodeModulesDirs2(absoluteStart, modules) {
@@ -8905,7 +8905,7 @@ var require_node_modules_paths = __commonJS({
8905
8905
  }
8906
8906
  return paths.reduce(function(dirs, aPath) {
8907
8907
  return dirs.concat(modules.map(function(moduleDir) {
8908
- return path7.resolve(prefix, aPath, moduleDir);
8908
+ return path8.resolve(prefix, aPath, moduleDir);
8909
8909
  }));
8910
8910
  }, []);
8911
8911
  };
@@ -9266,26 +9266,26 @@ var require_is_core_module = __commonJS({
9266
9266
  // ../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/async.js
9267
9267
  var require_async = __commonJS({
9268
9268
  "../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/async.js"(exports2, module2) {
9269
- var fs5 = require("fs");
9269
+ var fs6 = require("fs");
9270
9270
  var getHomedir = require_homedir();
9271
- var path7 = require("path");
9271
+ var path8 = require("path");
9272
9272
  var caller = require_caller();
9273
9273
  var nodeModulesPaths = require_node_modules_paths();
9274
9274
  var normalizeOptions = require_normalize_options();
9275
9275
  var isCore = require_is_core_module();
9276
- var realpathFS = process.platform !== "win32" && fs5.realpath && typeof fs5.realpath.native === "function" ? fs5.realpath.native : fs5.realpath;
9276
+ var realpathFS = process.platform !== "win32" && fs6.realpath && typeof fs6.realpath.native === "function" ? fs6.realpath.native : fs6.realpath;
9277
9277
  var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
9278
9278
  var windowsDriveRegex = /^\w:[/\\]*$/;
9279
9279
  var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
9280
9280
  var homedir6 = getHomedir();
9281
9281
  var defaultPaths = function() {
9282
9282
  return [
9283
- path7.join(homedir6, ".node_modules"),
9284
- path7.join(homedir6, ".node_libraries")
9283
+ path8.join(homedir6, ".node_modules"),
9284
+ path8.join(homedir6, ".node_libraries")
9285
9285
  ];
9286
9286
  };
9287
9287
  var defaultIsFile = function isFile(file, cb) {
9288
- fs5.stat(file, function(err, stat) {
9288
+ fs6.stat(file, function(err, stat) {
9289
9289
  if (!err) {
9290
9290
  return cb(null, stat.isFile() || stat.isFIFO());
9291
9291
  }
@@ -9294,7 +9294,7 @@ var require_async = __commonJS({
9294
9294
  });
9295
9295
  };
9296
9296
  var defaultIsDir = function isDirectory(dir, cb) {
9297
- fs5.stat(dir, function(err, stat) {
9297
+ fs6.stat(dir, function(err, stat) {
9298
9298
  if (!err) {
9299
9299
  return cb(null, stat.isDirectory());
9300
9300
  }
@@ -9331,7 +9331,7 @@ var require_async = __commonJS({
9331
9331
  var getPackageCandidates = function getPackageCandidates2(x, start, opts) {
9332
9332
  var dirs = nodeModulesPaths(start, opts, x);
9333
9333
  for (var i = 0; i < dirs.length; i++) {
9334
- dirs[i] = path7.join(dirs[i], x);
9334
+ dirs[i] = path8.join(dirs[i], x);
9335
9335
  }
9336
9336
  return dirs;
9337
9337
  };
@@ -9351,7 +9351,7 @@ var require_async = __commonJS({
9351
9351
  opts = normalizeOptions(x, opts);
9352
9352
  var isFile = opts.isFile || defaultIsFile;
9353
9353
  var isDirectory = opts.isDirectory || defaultIsDir;
9354
- var readFile = opts.readFile || fs5.readFile;
9354
+ var readFile = opts.readFile || fs6.readFile;
9355
9355
  var realpath = opts.realpath || defaultRealpath;
9356
9356
  var readPackage = opts.readPackage || defaultReadPackage;
9357
9357
  if (opts.readFile && opts.readPackage) {
@@ -9363,10 +9363,10 @@ var require_async = __commonJS({
9363
9363
  var packageIterator = opts.packageIterator;
9364
9364
  var extensions = opts.extensions || [".js"];
9365
9365
  var includeCoreModules = opts.includeCoreModules !== false;
9366
- var basedir = opts.basedir || path7.dirname(caller());
9366
+ var basedir = opts.basedir || path8.dirname(caller());
9367
9367
  var parent = opts.filename || basedir;
9368
9368
  opts.paths = opts.paths || defaultPaths();
9369
- var absoluteStart = path7.resolve(basedir);
9369
+ var absoluteStart = path8.resolve(basedir);
9370
9370
  maybeRealpath(
9371
9371
  realpath,
9372
9372
  absoluteStart,
@@ -9379,7 +9379,7 @@ var require_async = __commonJS({
9379
9379
  var res;
9380
9380
  function init(basedir2) {
9381
9381
  if (relativePathRegex.test(x)) {
9382
- res = path7.resolve(basedir2, x);
9382
+ res = path8.resolve(basedir2, x);
9383
9383
  if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
9384
9384
  if (x.slice(-1) === "/" && res === basedir2) {
9385
9385
  loadAsDirectory(res, opts.package, onfile);
@@ -9437,17 +9437,17 @@ var require_async = __commonJS({
9437
9437
  var file = x3 + exts2[0];
9438
9438
  var pkg = loadPackage;
9439
9439
  if (pkg) onpkg(null, pkg);
9440
- else loadpkg(path7.dirname(file), onpkg);
9440
+ else loadpkg(path8.dirname(file), onpkg);
9441
9441
  function onpkg(err2, pkg_, dir) {
9442
9442
  pkg = pkg_;
9443
9443
  if (err2) return cb2(err2);
9444
9444
  if (dir && pkg && opts.pathFilter) {
9445
- var rfile = path7.relative(dir, file);
9445
+ var rfile = path8.relative(dir, file);
9446
9446
  var rel = rfile.slice(0, rfile.length - exts2[0].length);
9447
9447
  var r = opts.pathFilter(pkg, x3, rel);
9448
9448
  if (r) return load(
9449
9449
  [""].concat(extensions.slice()),
9450
- path7.resolve(dir, r),
9450
+ path8.resolve(dir, r),
9451
9451
  pkg
9452
9452
  );
9453
9453
  }
@@ -9467,10 +9467,10 @@ var require_async = __commonJS({
9467
9467
  }
9468
9468
  if (nodeModulesRegex.test(dir)) return cb2(null);
9469
9469
  maybeRealpath(realpath, dir, opts, function(unwrapErr, pkgdir) {
9470
- if (unwrapErr) return loadpkg(path7.dirname(dir), cb2);
9471
- var pkgfile = path7.join(pkgdir, "package.json");
9470
+ if (unwrapErr) return loadpkg(path8.dirname(dir), cb2);
9471
+ var pkgfile = path8.join(pkgdir, "package.json");
9472
9472
  isFile(pkgfile, function(err2, ex) {
9473
- if (!ex) return loadpkg(path7.dirname(dir), cb2);
9473
+ if (!ex) return loadpkg(path8.dirname(dir), cb2);
9474
9474
  readPackage(readFile, pkgfile, function(err3, pkgParam) {
9475
9475
  if (err3) cb2(err3);
9476
9476
  var pkg = pkgParam;
@@ -9491,10 +9491,10 @@ var require_async = __commonJS({
9491
9491
  }
9492
9492
  maybeRealpath(realpath, x2, opts, function(unwrapErr, pkgdir) {
9493
9493
  if (unwrapErr) return cb2(unwrapErr);
9494
- var pkgfile = path7.join(pkgdir, "package.json");
9494
+ var pkgfile = path8.join(pkgdir, "package.json");
9495
9495
  isFile(pkgfile, function(err2, ex) {
9496
9496
  if (err2) return cb2(err2);
9497
- if (!ex) return loadAsFile(path7.join(x2, "index"), fpkg, cb2);
9497
+ if (!ex) return loadAsFile(path8.join(x2, "index"), fpkg, cb2);
9498
9498
  readPackage(readFile, pkgfile, function(err3, pkgParam) {
9499
9499
  if (err3) return cb2(err3);
9500
9500
  var pkg = pkgParam;
@@ -9510,20 +9510,20 @@ var require_async = __commonJS({
9510
9510
  if (pkg.main === "." || pkg.main === "./") {
9511
9511
  pkg.main = "index";
9512
9512
  }
9513
- loadAsFile(path7.resolve(x2, pkg.main), pkg, function(err4, m, pkg2) {
9513
+ loadAsFile(path8.resolve(x2, pkg.main), pkg, function(err4, m, pkg2) {
9514
9514
  if (err4) return cb2(err4);
9515
9515
  if (m) return cb2(null, m, pkg2);
9516
- if (!pkg2) return loadAsFile(path7.join(x2, "index"), pkg2, cb2);
9517
- var dir = path7.resolve(x2, pkg2.main);
9516
+ if (!pkg2) return loadAsFile(path8.join(x2, "index"), pkg2, cb2);
9517
+ var dir = path8.resolve(x2, pkg2.main);
9518
9518
  loadAsDirectory(dir, pkg2, function(err5, n, pkg3) {
9519
9519
  if (err5) return cb2(err5);
9520
9520
  if (n) return cb2(null, n, pkg3);
9521
- loadAsFile(path7.join(x2, "index"), pkg3, cb2);
9521
+ loadAsFile(path8.join(x2, "index"), pkg3, cb2);
9522
9522
  });
9523
9523
  });
9524
9524
  return;
9525
9525
  }
9526
- loadAsFile(path7.join(x2, "/index"), pkg, cb2);
9526
+ loadAsFile(path8.join(x2, "/index"), pkg, cb2);
9527
9527
  });
9528
9528
  });
9529
9529
  });
@@ -9531,7 +9531,7 @@ var require_async = __commonJS({
9531
9531
  function processDirs(cb2, dirs) {
9532
9532
  if (dirs.length === 0) return cb2(null, void 0);
9533
9533
  var dir = dirs[0];
9534
- isDirectory(path7.dirname(dir), isdir);
9534
+ isDirectory(path8.dirname(dir), isdir);
9535
9535
  function isdir(err2, isdir2) {
9536
9536
  if (err2) return cb2(err2);
9537
9537
  if (!isdir2) return processDirs(cb2, dirs.slice(1));
@@ -9760,26 +9760,26 @@ var require_is_core = __commonJS({
9760
9760
  var require_sync = __commonJS({
9761
9761
  "../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/sync.js"(exports2, module2) {
9762
9762
  var isCore = require_is_core_module();
9763
- var fs5 = require("fs");
9764
- var path7 = require("path");
9763
+ var fs6 = require("fs");
9764
+ var path8 = require("path");
9765
9765
  var getHomedir = require_homedir();
9766
9766
  var caller = require_caller();
9767
9767
  var nodeModulesPaths = require_node_modules_paths();
9768
9768
  var normalizeOptions = require_normalize_options();
9769
- var realpathFS = process.platform !== "win32" && fs5.realpathSync && typeof fs5.realpathSync.native === "function" ? fs5.realpathSync.native : fs5.realpathSync;
9769
+ var realpathFS = process.platform !== "win32" && fs6.realpathSync && typeof fs6.realpathSync.native === "function" ? fs6.realpathSync.native : fs6.realpathSync;
9770
9770
  var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
9771
9771
  var windowsDriveRegex = /^\w:[/\\]*$/;
9772
9772
  var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
9773
9773
  var homedir6 = getHomedir();
9774
9774
  var defaultPaths = function() {
9775
9775
  return [
9776
- path7.join(homedir6, ".node_modules"),
9777
- path7.join(homedir6, ".node_libraries")
9776
+ path8.join(homedir6, ".node_modules"),
9777
+ path8.join(homedir6, ".node_libraries")
9778
9778
  ];
9779
9779
  };
9780
9780
  var defaultIsFile = function isFile(file) {
9781
9781
  try {
9782
- var stat = fs5.statSync(file, { throwIfNoEntry: false });
9782
+ var stat = fs6.statSync(file, { throwIfNoEntry: false });
9783
9783
  } catch (e) {
9784
9784
  if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
9785
9785
  throw e;
@@ -9788,7 +9788,7 @@ var require_sync = __commonJS({
9788
9788
  };
9789
9789
  var defaultIsDir = function isDirectory(dir) {
9790
9790
  try {
9791
- var stat = fs5.statSync(dir, { throwIfNoEntry: false });
9791
+ var stat = fs6.statSync(dir, { throwIfNoEntry: false });
9792
9792
  } catch (e) {
9793
9793
  if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
9794
9794
  throw e;
@@ -9822,7 +9822,7 @@ var require_sync = __commonJS({
9822
9822
  var getPackageCandidates = function getPackageCandidates2(x, start, opts) {
9823
9823
  var dirs = nodeModulesPaths(start, opts, x);
9824
9824
  for (var i = 0; i < dirs.length; i++) {
9825
- dirs[i] = path7.join(dirs[i], x);
9825
+ dirs[i] = path8.join(dirs[i], x);
9826
9826
  }
9827
9827
  return dirs;
9828
9828
  };
@@ -9832,7 +9832,7 @@ var require_sync = __commonJS({
9832
9832
  }
9833
9833
  var opts = normalizeOptions(x, options);
9834
9834
  var isFile = opts.isFile || defaultIsFile;
9835
- var readFileSync24 = opts.readFileSync || fs5.readFileSync;
9835
+ var readFileSync24 = opts.readFileSync || fs6.readFileSync;
9836
9836
  var isDirectory = opts.isDirectory || defaultIsDir;
9837
9837
  var realpathSync = opts.realpathSync || defaultRealpathSync;
9838
9838
  var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
@@ -9842,12 +9842,12 @@ var require_sync = __commonJS({
9842
9842
  var packageIterator = opts.packageIterator;
9843
9843
  var extensions = opts.extensions || [".js"];
9844
9844
  var includeCoreModules = opts.includeCoreModules !== false;
9845
- var basedir = opts.basedir || path7.dirname(caller());
9845
+ var basedir = opts.basedir || path8.dirname(caller());
9846
9846
  var parent = opts.filename || basedir;
9847
9847
  opts.paths = opts.paths || defaultPaths();
9848
- var absoluteStart = maybeRealpathSync(realpathSync, path7.resolve(basedir), opts);
9848
+ var absoluteStart = maybeRealpathSync(realpathSync, path8.resolve(basedir), opts);
9849
9849
  if (relativePathRegex.test(x)) {
9850
- var res = path7.resolve(absoluteStart, x);
9850
+ var res = path8.resolve(absoluteStart, x);
9851
9851
  if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
9852
9852
  var m = loadAsFileSync(res) || loadAsDirectorySync(res);
9853
9853
  if (m) return maybeRealpathSync(realpathSync, m, opts);
@@ -9861,12 +9861,12 @@ var require_sync = __commonJS({
9861
9861
  err.code = "MODULE_NOT_FOUND";
9862
9862
  throw err;
9863
9863
  function loadAsFileSync(x2) {
9864
- var pkg = loadpkg(path7.dirname(x2));
9864
+ var pkg = loadpkg(path8.dirname(x2));
9865
9865
  if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
9866
- var rfile = path7.relative(pkg.dir, x2);
9866
+ var rfile = path8.relative(pkg.dir, x2);
9867
9867
  var r = opts.pathFilter(pkg.pkg, x2, rfile);
9868
9868
  if (r) {
9869
- x2 = path7.resolve(pkg.dir, r);
9869
+ x2 = path8.resolve(pkg.dir, r);
9870
9870
  }
9871
9871
  }
9872
9872
  if (isFile(x2)) {
@@ -9885,9 +9885,9 @@ var require_sync = __commonJS({
9885
9885
  return;
9886
9886
  }
9887
9887
  if (nodeModulesRegex.test(dir)) return;
9888
- var pkgfile = path7.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
9888
+ var pkgfile = path8.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
9889
9889
  if (!isFile(pkgfile)) {
9890
- return loadpkg(path7.dirname(dir));
9890
+ return loadpkg(path8.dirname(dir));
9891
9891
  }
9892
9892
  var pkg = readPackageSync(readFileSync24, pkgfile);
9893
9893
  if (pkg && opts.packageFilter) {
@@ -9900,7 +9900,7 @@ var require_sync = __commonJS({
9900
9900
  return { pkg, dir };
9901
9901
  }
9902
9902
  function loadAsDirectorySync(x2) {
9903
- var pkgfile = path7.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
9903
+ var pkgfile = path8.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
9904
9904
  if (isFile(pkgfile)) {
9905
9905
  try {
9906
9906
  var pkg = readPackageSync(readFileSync24, pkgfile);
@@ -9923,15 +9923,15 @@ var require_sync = __commonJS({
9923
9923
  pkg.main = "index";
9924
9924
  }
9925
9925
  try {
9926
- var m2 = loadAsFileSync(path7.resolve(x2, pkg.main));
9926
+ var m2 = loadAsFileSync(path8.resolve(x2, pkg.main));
9927
9927
  if (m2) return m2;
9928
- var n2 = loadAsDirectorySync(path7.resolve(x2, pkg.main));
9928
+ var n2 = loadAsDirectorySync(path8.resolve(x2, pkg.main));
9929
9929
  if (n2) return n2;
9930
9930
  } catch (e) {
9931
9931
  }
9932
9932
  }
9933
9933
  }
9934
- return loadAsFileSync(path7.join(x2, "/index"));
9934
+ return loadAsFileSync(path8.join(x2, "/index"));
9935
9935
  }
9936
9936
  function loadNodeModulesSync(x2, start) {
9937
9937
  var thunk = function() {
@@ -9940,7 +9940,7 @@ var require_sync = __commonJS({
9940
9940
  var dirs = packageIterator ? packageIterator(x2, start, thunk, opts) : thunk();
9941
9941
  for (var i = 0; i < dirs.length; i++) {
9942
9942
  var dir = dirs[i];
9943
- if (isDirectory(path7.dirname(dir))) {
9943
+ if (isDirectory(path8.dirname(dir))) {
9944
9944
  var m2 = loadAsFileSync(dir);
9945
9945
  if (m2) return m2;
9946
9946
  var n2 = loadAsDirectorySync(dir);
@@ -10031,7 +10031,7 @@ var require_package = __commonJS({
10031
10031
  var require_require_in_the_middle = __commonJS({
10032
10032
  "../../node_modules/.pnpm/require-in-the-middle@7.5.2/node_modules/require-in-the-middle/index.js"(exports2, module2) {
10033
10033
  "use strict";
10034
- var path7 = require("path");
10034
+ var path8 = require("path");
10035
10035
  var Module = require("module");
10036
10036
  var debug = require_src3()("require-in-the-middle");
10037
10037
  var moduleDetailsFromPath = require_module_details_from_path();
@@ -10205,7 +10205,7 @@ var require_require_in_the_middle = __commonJS({
10205
10205
  }
10206
10206
  moduleName = filename;
10207
10207
  } else if (hasWhitelist === true && modules.includes(filename)) {
10208
- const parsedPath = path7.parse(filename);
10208
+ const parsedPath = path8.parse(filename);
10209
10209
  moduleName = parsedPath.name;
10210
10210
  basedir = parsedPath.dir;
10211
10211
  } else {
@@ -10243,7 +10243,7 @@ var require_require_in_the_middle = __commonJS({
10243
10243
  }
10244
10244
  if (res !== filename) {
10245
10245
  if (internals === true) {
10246
- moduleName = moduleName + path7.sep + path7.relative(basedir, filename);
10246
+ moduleName = moduleName + path8.sep + path8.relative(basedir, filename);
10247
10247
  debug("preparing to process require of internal file: %s", moduleName);
10248
10248
  } else {
10249
10249
  debug("ignoring require of non-main module file: %s", res);
@@ -10279,8 +10279,8 @@ var require_require_in_the_middle = __commonJS({
10279
10279
  }
10280
10280
  };
10281
10281
  function resolveModuleName(stat) {
10282
- const normalizedPath = path7.sep !== "/" ? stat.path.split(path7.sep).join("/") : stat.path;
10283
- return path7.posix.join(stat.name, normalizedPath).replace(normalize2, "");
10282
+ const normalizedPath = path8.sep !== "/" ? stat.path.split(path8.sep).join("/") : stat.path;
10283
+ return path8.posix.join(stat.name, normalizedPath).replace(normalize2, "");
10284
10284
  }
10285
10285
  }
10286
10286
  });
@@ -10369,7 +10369,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
10369
10369
  Object.defineProperty(exports2, "__esModule", { value: true });
10370
10370
  exports2.RequireInTheMiddleSingleton = void 0;
10371
10371
  var require_in_the_middle_1 = require_require_in_the_middle();
10372
- var path7 = require("path");
10372
+ var path8 = require("path");
10373
10373
  var ModuleNameTrie_1 = require_ModuleNameTrie();
10374
10374
  var isMocha = [
10375
10375
  "afterEach",
@@ -10433,7 +10433,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
10433
10433
  };
10434
10434
  exports2.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
10435
10435
  function normalizePathSeparators(moduleNameOrPath) {
10436
- return path7.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path7.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
10436
+ return path8.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path8.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
10437
10437
  }
10438
10438
  }
10439
10439
  });
@@ -10493,7 +10493,7 @@ var require_register = __commonJS({
10493
10493
  // ../../node_modules/.pnpm/import-in-the-middle@1.15.0/node_modules/import-in-the-middle/index.js
10494
10494
  var require_import_in_the_middle = __commonJS({
10495
10495
  "../../node_modules/.pnpm/import-in-the-middle@1.15.0/node_modules/import-in-the-middle/index.js"(exports2, module2) {
10496
- var path7 = require("path");
10496
+ var path8 = require("path");
10497
10497
  var parse3 = require_module_details_from_path();
10498
10498
  var { fileURLToPath } = require("url");
10499
10499
  var { MessageChannel } = require("worker_threads");
@@ -10589,7 +10589,7 @@ var require_import_in_the_middle = __commonJS({
10589
10589
  if (moduleName === name) {
10590
10590
  if (baseDir) {
10591
10591
  if (internals) {
10592
- name = name + path7.sep + path7.relative(baseDir, fileURLToPath(filename));
10592
+ name = name + path8.sep + path8.relative(baseDir, fileURLToPath(filename));
10593
10593
  } else {
10594
10594
  if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename))) continue;
10595
10595
  }
@@ -10665,7 +10665,7 @@ var require_instrumentation2 = __commonJS({
10665
10665
  "use strict";
10666
10666
  Object.defineProperty(exports2, "__esModule", { value: true });
10667
10667
  exports2.InstrumentationBase = void 0;
10668
- var path7 = require("path");
10668
+ var path8 = require("path");
10669
10669
  var util_1 = require("util");
10670
10670
  var semver_1 = require_semver2();
10671
10671
  var shimmer_1 = require_shimmer();
@@ -10762,7 +10762,7 @@ var require_instrumentation2 = __commonJS({
10762
10762
  }
10763
10763
  _extractPackageVersion(baseDir) {
10764
10764
  try {
10765
- const json = (0, fs_1.readFileSync)(path7.join(baseDir, "package.json"), {
10765
+ const json = (0, fs_1.readFileSync)(path8.join(baseDir, "package.json"), {
10766
10766
  encoding: "utf8"
10767
10767
  });
10768
10768
  const version2 = JSON.parse(json).version;
@@ -10805,7 +10805,7 @@ var require_instrumentation2 = __commonJS({
10805
10805
  return exports3;
10806
10806
  }
10807
10807
  const files = (_a = module3.files) !== null && _a !== void 0 ? _a : [];
10808
- const normalizedName = path7.normalize(name);
10808
+ const normalizedName = path8.normalize(name);
10809
10809
  const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName).filter((f) => isSupported(f.supportedVersions, version2, module3.includePrerelease));
10810
10810
  return supportedFileInstrumentations.reduce((patchedExports, file) => {
10811
10811
  file.moduleExports = patchedExports;
@@ -10851,8 +10851,8 @@ var require_instrumentation2 = __commonJS({
10851
10851
  this._warnOnPreloadedModules();
10852
10852
  for (const module3 of this._modules) {
10853
10853
  const hookFn = (exports3, name, baseDir) => {
10854
- if (!baseDir && path7.isAbsolute(name)) {
10855
- const parsedPath = path7.parse(name);
10854
+ if (!baseDir && path8.isAbsolute(name)) {
10855
+ const parsedPath = path8.parse(name);
10856
10856
  name = parsedPath.name;
10857
10857
  baseDir = parsedPath.dir;
10858
10858
  }
@@ -10861,7 +10861,7 @@ var require_instrumentation2 = __commonJS({
10861
10861
  const onRequire = (exports3, name, baseDir) => {
10862
10862
  return this._onRequire(module3, exports3, name, baseDir);
10863
10863
  };
10864
- const hook = path7.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
10864
+ const hook = path8.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
10865
10865
  this._hooks.push(hook);
10866
10866
  const esmHook = new import_in_the_middle_1.Hook([module3.name], { internals: false }, hookFn);
10867
10867
  this._hooks.push(esmHook);
@@ -18108,8 +18108,8 @@ var require_instrumentation3 = __commonJS({
18108
18108
  "use strict";
18109
18109
  Object.defineProperty(exports2, "__esModule", { value: true });
18110
18110
  exports2.AwsLambdaInstrumentation = exports2.lambdaMaxInitInMilliseconds = void 0;
18111
- var path7 = require("path");
18112
- var fs5 = require("fs");
18111
+ var path8 = require("path");
18112
+ var fs6 = require("fs");
18113
18113
  var instrumentation_1 = require_src4();
18114
18114
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
18115
18115
  var semantic_conventions_1 = (init_esm3(), __toCommonJS(esm_exports3));
@@ -18136,21 +18136,21 @@ var require_instrumentation3 = __commonJS({
18136
18136
  this._diag.debug("Skipping lambda instrumentation: no _HANDLER/lambdaHandler or LAMBDA_TASK_ROOT.", { taskRoot, handlerDef });
18137
18137
  return [];
18138
18138
  }
18139
- const handler = path7.basename(handlerDef);
18139
+ const handler = path8.basename(handlerDef);
18140
18140
  const moduleRoot = handlerDef.substr(0, handlerDef.length - handler.length);
18141
18141
  const [module3, functionName] = handler.split(".", 2);
18142
- let filename = path7.resolve(taskRoot, moduleRoot, module3);
18142
+ let filename = path8.resolve(taskRoot, moduleRoot, module3);
18143
18143
  if (!filename.endsWith(".js")) {
18144
18144
  try {
18145
- fs5.statSync(`${filename}.js`);
18145
+ fs6.statSync(`${filename}.js`);
18146
18146
  filename += ".js";
18147
18147
  } catch (e) {
18148
18148
  try {
18149
- fs5.statSync(`${filename}.mjs`);
18149
+ fs6.statSync(`${filename}.mjs`);
18150
18150
  filename += ".mjs";
18151
18151
  } catch (e2) {
18152
18152
  try {
18153
- fs5.statSync(`${filename}.cjs`);
18153
+ fs6.statSync(`${filename}.cjs`);
18154
18154
  filename += ".cjs";
18155
18155
  } catch (e3) {
18156
18156
  this._diag.warn("No handler file was able to resolved with one of the known extensions for the file", filename);
@@ -21306,16 +21306,16 @@ var require_utils7 = __commonJS({
21306
21306
  request[internal_types_1._LAYERS_STORE_PROPERTY].push(value);
21307
21307
  };
21308
21308
  exports2.storeLayerPath = storeLayerPath;
21309
- var getRouterPath = (path7, layer) => {
21309
+ var getRouterPath = (path8, layer) => {
21310
21310
  var _a, _b, _c, _d;
21311
21311
  const stackLayer = (_b = (_a = layer.handle) === null || _a === void 0 ? void 0 : _a.stack) === null || _b === void 0 ? void 0 : _b[0];
21312
21312
  if ((_c = stackLayer === null || stackLayer === void 0 ? void 0 : stackLayer.route) === null || _c === void 0 ? void 0 : _c.path) {
21313
- return `${path7}${stackLayer.route.path}`;
21313
+ return `${path8}${stackLayer.route.path}`;
21314
21314
  }
21315
21315
  if ((_d = stackLayer === null || stackLayer === void 0 ? void 0 : stackLayer.handle) === null || _d === void 0 ? void 0 : _d.stack) {
21316
- return (0, exports2.getRouterPath)(path7, stackLayer);
21316
+ return (0, exports2.getRouterPath)(path8, stackLayer);
21317
21317
  }
21318
- return path7;
21318
+ return path8;
21319
21319
  };
21320
21320
  exports2.getRouterPath = getRouterPath;
21321
21321
  var getLayerMetadata = (route, layer, layerPath) => {
@@ -21515,7 +21515,7 @@ var require_instrumentation10 = __commonJS({
21515
21515
  return original;
21516
21516
  const patched = function(req, res) {
21517
21517
  (0, utils_1.storeLayerPath)(req, layerPath);
21518
- const route = req[internal_types_1._LAYERS_STORE_PROPERTY].filter((path7) => path7 !== "/" && path7 !== "/*").join("").replace(/\/{2,}/g, "/");
21518
+ const route = req[internal_types_1._LAYERS_STORE_PROPERTY].filter((path8) => path8 !== "/" && path8 !== "/*").join("").replace(/\/{2,}/g, "/");
21519
21519
  const attributes = {
21520
21520
  [semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: route.length > 0 ? route : "/"
21521
21521
  };
@@ -22154,19 +22154,19 @@ var require_utils9 = __commonJS({
22154
22154
  }
22155
22155
  }
22156
22156
  exports2.splitTwoLevels = splitTwoLevels;
22157
- function indexFs(fs5, member) {
22157
+ function indexFs(fs6, member) {
22158
22158
  if (!member)
22159
22159
  throw new Error(JSON.stringify({ member }));
22160
22160
  const splitResult = splitTwoLevels(member);
22161
22161
  const [functionName1, functionName2] = splitResult;
22162
22162
  if (functionName2) {
22163
22163
  return {
22164
- objectToPatch: fs5[functionName1],
22164
+ objectToPatch: fs6[functionName1],
22165
22165
  functionNameToPatch: functionName2
22166
22166
  };
22167
22167
  } else {
22168
22168
  return {
22169
- objectToPatch: fs5,
22169
+ objectToPatch: fs6,
22170
22170
  functionNameToPatch: functionName1
22171
22171
  };
22172
22172
  }
@@ -22197,16 +22197,16 @@ var require_instrumentation12 = __commonJS({
22197
22197
  }
22198
22198
  init() {
22199
22199
  return [
22200
- new instrumentation_1.InstrumentationNodeModuleDefinition("fs", ["*"], (fs5) => {
22200
+ new instrumentation_1.InstrumentationNodeModuleDefinition("fs", ["*"], (fs6) => {
22201
22201
  for (const fName of constants_1.SYNC_FUNCTIONS) {
22202
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs5, fName);
22202
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs6, fName);
22203
22203
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
22204
22204
  this._unwrap(objectToPatch, functionNameToPatch);
22205
22205
  }
22206
22206
  this._wrap(objectToPatch, functionNameToPatch, this._patchSyncFunction.bind(this, fName));
22207
22207
  }
22208
22208
  for (const fName of constants_1.CALLBACK_FUNCTIONS) {
22209
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs5, fName);
22209
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs6, fName);
22210
22210
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
22211
22211
  this._unwrap(objectToPatch, functionNameToPatch);
22212
22212
  }
@@ -22217,30 +22217,30 @@ var require_instrumentation12 = __commonJS({
22217
22217
  this._wrap(objectToPatch, functionNameToPatch, this._patchCallbackFunction.bind(this, fName));
22218
22218
  }
22219
22219
  for (const fName of constants_1.PROMISE_FUNCTIONS) {
22220
- if ((0, instrumentation_1.isWrapped)(fs5.promises[fName])) {
22221
- this._unwrap(fs5.promises, fName);
22220
+ if ((0, instrumentation_1.isWrapped)(fs6.promises[fName])) {
22221
+ this._unwrap(fs6.promises, fName);
22222
22222
  }
22223
- this._wrap(fs5.promises, fName, this._patchPromiseFunction.bind(this, fName));
22223
+ this._wrap(fs6.promises, fName, this._patchPromiseFunction.bind(this, fName));
22224
22224
  }
22225
- return fs5;
22226
- }, (fs5) => {
22227
- if (fs5 === void 0)
22225
+ return fs6;
22226
+ }, (fs6) => {
22227
+ if (fs6 === void 0)
22228
22228
  return;
22229
22229
  for (const fName of constants_1.SYNC_FUNCTIONS) {
22230
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs5, fName);
22230
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs6, fName);
22231
22231
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
22232
22232
  this._unwrap(objectToPatch, functionNameToPatch);
22233
22233
  }
22234
22234
  }
22235
22235
  for (const fName of constants_1.CALLBACK_FUNCTIONS) {
22236
- const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs5, fName);
22236
+ const { objectToPatch, functionNameToPatch } = (0, utils_1.indexFs)(fs6, fName);
22237
22237
  if ((0, instrumentation_1.isWrapped)(objectToPatch[functionNameToPatch])) {
22238
22238
  this._unwrap(objectToPatch, functionNameToPatch);
22239
22239
  }
22240
22240
  }
22241
22241
  for (const fName of constants_1.PROMISE_FUNCTIONS) {
22242
- if ((0, instrumentation_1.isWrapped)(fs5.promises[fName])) {
22243
- this._unwrap(fs5.promises, fName);
22242
+ if ((0, instrumentation_1.isWrapped)(fs6.promises[fName])) {
22243
+ this._unwrap(fs6.promises, fName);
22244
22244
  }
22245
22245
  }
22246
22246
  }),
@@ -22393,8 +22393,8 @@ var require_instrumentation12 = __commonJS({
22393
22393
  }
22394
22394
  };
22395
22395
  const functionWithOriginalProperties = patchedFunctionWithOriginalProperties(patchedFunction, original);
22396
- const promisified = function(path7) {
22397
- return new Promise((resolve8) => functionWithOriginalProperties(path7, resolve8));
22396
+ const promisified = function(path8) {
22397
+ return new Promise((resolve8) => functionWithOriginalProperties(path8, resolve8));
22398
22398
  };
22399
22399
  Object.defineProperty(promisified, "name", { value: functionName });
22400
22400
  Object.defineProperty(functionWithOriginalProperties, util_1.promisify.custom, {
@@ -22769,26 +22769,26 @@ var require_utils10 = __commonJS({
22769
22769
  span.setAttribute(AttributeNames_1.AttributeNames.SOURCE, source);
22770
22770
  }
22771
22771
  exports2.addSpanSource = addSpanSource;
22772
- function createFieldIfNotExists(tracer, getConfig, contextValue, info, path7) {
22773
- let field = getField(contextValue, path7);
22772
+ function createFieldIfNotExists(tracer, getConfig, contextValue, info, path8) {
22773
+ let field = getField(contextValue, path8);
22774
22774
  let spanAdded = false;
22775
22775
  if (!field) {
22776
22776
  spanAdded = true;
22777
- const parent = getParentField(contextValue, path7);
22777
+ const parent = getParentField(contextValue, path8);
22778
22778
  field = {
22779
22779
  parent,
22780
- span: createResolverSpan(tracer, getConfig, contextValue, info, path7, parent.span),
22780
+ span: createResolverSpan(tracer, getConfig, contextValue, info, path8, parent.span),
22781
22781
  error: null
22782
22782
  };
22783
- addField(contextValue, path7, field);
22783
+ addField(contextValue, path8, field);
22784
22784
  }
22785
22785
  return { spanAdded, field };
22786
22786
  }
22787
- function createResolverSpan(tracer, getConfig, contextValue, info, path7, parentSpan) {
22787
+ function createResolverSpan(tracer, getConfig, contextValue, info, path8, parentSpan) {
22788
22788
  var _a, _b;
22789
22789
  const attributes = {
22790
22790
  [AttributeNames_1.AttributeNames.FIELD_NAME]: info.fieldName,
22791
- [AttributeNames_1.AttributeNames.FIELD_PATH]: path7.join("."),
22791
+ [AttributeNames_1.AttributeNames.FIELD_PATH]: path8.join("."),
22792
22792
  [AttributeNames_1.AttributeNames.FIELD_TYPE]: info.returnType.toString()
22793
22793
  };
22794
22794
  const span = tracer.startSpan(`${enum_1.SpanNames.RESOLVE} ${attributes[AttributeNames_1.AttributeNames.FIELD_PATH]}`, {
@@ -22828,15 +22828,15 @@ var require_utils10 = __commonJS({
22828
22828
  }
22829
22829
  }
22830
22830
  exports2.getOperation = getOperation;
22831
- function addField(contextValue, path7, field) {
22832
- return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path7.join(".")] = field;
22831
+ function addField(contextValue, path8, field) {
22832
+ return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path8.join(".")] = field;
22833
22833
  }
22834
- function getField(contextValue, path7) {
22835
- return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path7.join(".")];
22834
+ function getField(contextValue, path8) {
22835
+ return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path8.join(".")];
22836
22836
  }
22837
- function getParentField(contextValue, path7) {
22838
- for (let i = path7.length - 1; i > 0; i--) {
22839
- const field = getField(contextValue, path7.slice(0, i));
22837
+ function getParentField(contextValue, path8) {
22838
+ for (let i = path8.length - 1; i > 0; i--) {
22839
+ const field = getField(contextValue, path8.slice(0, i));
22840
22840
  if (field) {
22841
22841
  return field;
22842
22842
  }
@@ -22845,9 +22845,9 @@ var require_utils10 = __commonJS({
22845
22845
  span: contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].span
22846
22846
  };
22847
22847
  }
22848
- function pathToArray(mergeItems, path7) {
22848
+ function pathToArray(mergeItems, path8) {
22849
22849
  const flattened = [];
22850
- let curr = path7;
22850
+ let curr = path8;
22851
22851
  while (curr) {
22852
22852
  let key = curr.key;
22853
22853
  if (mergeItems && typeof key === "number") {
@@ -22984,14 +22984,14 @@ var require_utils10 = __commonJS({
22984
22984
  if (!contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL]) {
22985
22985
  return fieldResolver.call(this, source, args, contextValue, info);
22986
22986
  }
22987
- const path7 = pathToArray(config.mergeItems, info && info.path);
22988
- const depth = path7.filter((item) => typeof item === "string").length;
22987
+ const path8 = pathToArray(config.mergeItems, info && info.path);
22988
+ const depth = path8.filter((item) => typeof item === "string").length;
22989
22989
  let field;
22990
22990
  let shouldEndSpan = false;
22991
22991
  if (config.depth >= 0 && config.depth < depth) {
22992
- field = getParentField(contextValue, path7);
22992
+ field = getParentField(contextValue, path8);
22993
22993
  } else {
22994
- const newField = createFieldIfNotExists(tracer, getConfig, contextValue, info, path7);
22994
+ const newField = createFieldIfNotExists(tracer, getConfig, contextValue, info, path8);
22995
22995
  field = newField.field;
22996
22996
  shouldEndSpan = newField.spanAdded;
22997
22997
  }
@@ -28447,12 +28447,12 @@ var require_utils14 = __commonJS({
28447
28447
  const reqUrlObject = requestUrl || {};
28448
28448
  const protocol = reqUrlObject.protocol || fallbackProtocol;
28449
28449
  const port = (reqUrlObject.port || "").toString();
28450
- const path7 = reqUrlObject.path || "/";
28450
+ const path8 = reqUrlObject.path || "/";
28451
28451
  let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
28452
28452
  if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
28453
28453
  host += `:${port}`;
28454
28454
  }
28455
- return `${protocol}//${host}${path7}`;
28455
+ return `${protocol}//${host}${path8}`;
28456
28456
  };
28457
28457
  exports2.getAbsoluteUrl = getAbsoluteUrl;
28458
28458
  var parseResponseStatus = (kind, statusCode) => {
@@ -30520,11 +30520,11 @@ var require_instrumentation20 = __commonJS({
30520
30520
  const router = dispatchLayer.router;
30521
30521
  const routesStack = (_a = router === null || router === void 0 ? void 0 : router.stack) !== null && _a !== void 0 ? _a : [];
30522
30522
  for (const pathLayer of routesStack) {
30523
- const path7 = pathLayer.path;
30523
+ const path8 = pathLayer.path;
30524
30524
  const pathStack = pathLayer.stack;
30525
30525
  for (let j = 0; j < pathStack.length; j++) {
30526
30526
  const routedMiddleware = pathStack[j];
30527
- pathStack[j] = this._patchLayer(routedMiddleware, true, path7);
30527
+ pathStack[j] = this._patchLayer(routedMiddleware, true, path8);
30528
30528
  }
30529
30529
  }
30530
30530
  return dispatchLayer;
@@ -36914,8 +36914,8 @@ var require_instrumentation32 = __commonJS({
36914
36914
  }
36915
36915
  _methodPatcher(original, methodName) {
36916
36916
  const instrumentation = this;
36917
- return function(path7, ...handler) {
36918
- return original.call(this, path7, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path7, methodName }, handler));
36917
+ return function(path8, ...handler) {
36918
+ return original.call(this, path8, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path8, methodName }, handler));
36919
36919
  };
36920
36920
  }
36921
36921
  // will return the same type as `handler`, but all functions recursively patched
@@ -38863,9 +38863,9 @@ var require_getMachineId_linux = __commonJS({
38863
38863
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
38864
38864
  async function getMachineId() {
38865
38865
  const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
38866
- for (const path7 of paths) {
38866
+ for (const path8 of paths) {
38867
38867
  try {
38868
- const result = await fs_1.promises.readFile(path7, { encoding: "utf8" });
38868
+ const result = await fs_1.promises.readFile(path8, { encoding: "utf8" });
38869
38869
  return result.trim();
38870
38870
  } catch (e) {
38871
38871
  api_1.diag.debug(`error reading machine id: ${e}`);
@@ -39785,7 +39785,7 @@ var require_AwsBeanstalkDetectorSync = __commonJS({
39785
39785
  var resources_1 = require_src48();
39786
39786
  var semantic_conventions_1 = (init_esm3(), __toCommonJS(esm_exports3));
39787
39787
  var semconv_1 = require_semconv();
39788
- var fs5 = require("fs");
39788
+ var fs6 = require("fs");
39789
39789
  var util2 = require("util");
39790
39790
  var DEFAULT_BEANSTALK_CONF_PATH = "/var/elasticbeanstalk/xray/environment.conf";
39791
39791
  var WIN_OS_BEANSTALK_CONF_PATH = "C:\\Program Files\\Amazon\\XRay\\environment.conf";
@@ -39811,7 +39811,7 @@ var require_AwsBeanstalkDetectorSync = __commonJS({
39811
39811
  */
39812
39812
  async _getAttributes(_config) {
39813
39813
  try {
39814
- await _AwsBeanstalkDetectorSync.fileAccessAsync(this.BEANSTALK_CONF_PATH, fs5.constants.R_OK);
39814
+ await _AwsBeanstalkDetectorSync.fileAccessAsync(this.BEANSTALK_CONF_PATH, fs6.constants.R_OK);
39815
39815
  const rawData = await _AwsBeanstalkDetectorSync.readFileAsync(this.BEANSTALK_CONF_PATH, "utf8");
39816
39816
  const parsedData = JSON.parse(rawData);
39817
39817
  return {
@@ -39829,8 +39829,8 @@ var require_AwsBeanstalkDetectorSync = __commonJS({
39829
39829
  }
39830
39830
  };
39831
39831
  exports2.AwsBeanstalkDetectorSync = AwsBeanstalkDetectorSync;
39832
- AwsBeanstalkDetectorSync.readFileAsync = util2.promisify(fs5.readFile);
39833
- AwsBeanstalkDetectorSync.fileAccessAsync = util2.promisify(fs5.access);
39832
+ AwsBeanstalkDetectorSync.readFileAsync = util2.promisify(fs6.readFile);
39833
+ AwsBeanstalkDetectorSync.fileAccessAsync = util2.promisify(fs6.access);
39834
39834
  exports2.awsBeanstalkDetectorSync = new AwsBeanstalkDetectorSync();
39835
39835
  }
39836
39836
  });
@@ -40010,7 +40010,7 @@ var require_AwsEcsDetectorSync = __commonJS({
40010
40010
  var semconv_1 = require_semconv();
40011
40011
  var http = require("http");
40012
40012
  var util2 = require("util");
40013
- var fs5 = require("fs");
40013
+ var fs6 = require("fs");
40014
40014
  var os4 = require("os");
40015
40015
  var HTTP_TIMEOUT_IN_MS = 1e3;
40016
40016
  var AwsEcsDetectorSync = class _AwsEcsDetectorSync {
@@ -40148,7 +40148,7 @@ var require_AwsEcsDetectorSync = __commonJS({
40148
40148
  exports2.AwsEcsDetectorSync = AwsEcsDetectorSync;
40149
40149
  AwsEcsDetectorSync.CONTAINER_ID_LENGTH = 64;
40150
40150
  AwsEcsDetectorSync.DEFAULT_CGROUP_PATH = "/proc/self/cgroup";
40151
- AwsEcsDetectorSync.readFileAsync = util2.promisify(fs5.readFile);
40151
+ AwsEcsDetectorSync.readFileAsync = util2.promisify(fs6.readFile);
40152
40152
  exports2.awsEcsDetectorSync = new AwsEcsDetectorSync();
40153
40153
  }
40154
40154
  });
@@ -40181,7 +40181,7 @@ var require_AwsEksDetectorSync = __commonJS({
40181
40181
  var resources_1 = require_src48();
40182
40182
  var semconv_1 = require_semconv();
40183
40183
  var https = require("https");
40184
- var fs5 = require("fs");
40184
+ var fs6 = require("fs");
40185
40185
  var util2 = require("util");
40186
40186
  var api_2 = (init_esm(), __toCommonJS(esm_exports));
40187
40187
  var AwsEksDetectorSync = class _AwsEksDetectorSync {
@@ -40351,8 +40351,8 @@ var require_AwsEksDetectorSync = __commonJS({
40351
40351
  }
40352
40352
  };
40353
40353
  exports2.AwsEksDetectorSync = AwsEksDetectorSync;
40354
- AwsEksDetectorSync.readFileAsync = util2.promisify(fs5.readFile);
40355
- AwsEksDetectorSync.fileAccessAsync = util2.promisify(fs5.access);
40354
+ AwsEksDetectorSync.readFileAsync = util2.promisify(fs6.readFile);
40355
+ AwsEksDetectorSync.fileAccessAsync = util2.promisify(fs6.access);
40356
40356
  exports2.awsEksDetectorSync = new AwsEksDetectorSync();
40357
40357
  }
40358
40358
  });
@@ -40593,7 +40593,7 @@ var require_ContainerDetector = __commonJS({
40593
40593
  exports2.containerDetector = exports2.ContainerDetector = void 0;
40594
40594
  var resources_1 = require_src48();
40595
40595
  var semantic_conventions_1 = (init_esm3(), __toCommonJS(esm_exports3));
40596
- var fs5 = require("fs");
40596
+ var fs6 = require("fs");
40597
40597
  var util2 = require("util");
40598
40598
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
40599
40599
  var core_1 = require_src();
@@ -40683,7 +40683,7 @@ var require_ContainerDetector = __commonJS({
40683
40683
  }
40684
40684
  };
40685
40685
  exports2.ContainerDetector = ContainerDetector;
40686
- ContainerDetector.readFileAsync = util2.promisify(fs5.readFile);
40686
+ ContainerDetector.readFileAsync = util2.promisify(fs6.readFile);
40687
40687
  exports2.containerDetector = new ContainerDetector();
40688
40688
  }
40689
40689
  });
@@ -41553,14 +41553,14 @@ var require_url_state_machine = __commonJS({
41553
41553
  return url.replace(/\u0009|\u000A|\u000D/g, "");
41554
41554
  }
41555
41555
  function shortenPath(url) {
41556
- const path7 = url.path;
41557
- if (path7.length === 0) {
41556
+ const path8 = url.path;
41557
+ if (path8.length === 0) {
41558
41558
  return;
41559
41559
  }
41560
- if (url.scheme === "file" && path7.length === 1 && isNormalizedWindowsDriveLetter(path7[0])) {
41560
+ if (url.scheme === "file" && path8.length === 1 && isNormalizedWindowsDriveLetter(path8[0])) {
41561
41561
  return;
41562
41562
  }
41563
- path7.pop();
41563
+ path8.pop();
41564
41564
  }
41565
41565
  function includesCredentials(url) {
41566
41566
  return url.username !== "" || url.password !== "";
@@ -48612,21 +48612,21 @@ function ensureConfigDir() {
48612
48612
  (0, import_node_fs.mkdirSync)(CONFIG_DIR, { recursive: true });
48613
48613
  }
48614
48614
  }
48615
- function readJsonFile(path7, fallback) {
48616
- if (!(0, import_node_fs.existsSync)(path7)) return fallback;
48617
- const raw = (0, import_node_fs.readFileSync)(path7, "utf8");
48615
+ function readJsonFile(path8, fallback) {
48616
+ if (!(0, import_node_fs.existsSync)(path8)) return fallback;
48617
+ const raw = (0, import_node_fs.readFileSync)(path8, "utf8");
48618
48618
  if (!raw.trim()) return fallback;
48619
48619
  try {
48620
48620
  return JSON.parse(raw);
48621
48621
  } catch (error) {
48622
- throw new Error(`Failed to parse ${path7}: ${error.message}`);
48622
+ throw new Error(`Failed to parse ${path8}: ${error.message}`);
48623
48623
  }
48624
48624
  }
48625
- function writeJsonFile(path7, value) {
48625
+ function writeJsonFile(path8, value) {
48626
48626
  ensureConfigDir();
48627
- (0, import_node_fs.writeFileSync)(path7, JSON.stringify(value, null, 2));
48627
+ (0, import_node_fs.writeFileSync)(path8, JSON.stringify(value, null, 2));
48628
48628
  try {
48629
- (0, import_node_fs.chmodSync)(path7, 384);
48629
+ (0, import_node_fs.chmodSync)(path8, 384);
48630
48630
  } catch {
48631
48631
  }
48632
48632
  }
@@ -49613,7 +49613,14 @@ for cloud deployments. Credentials are stored globally per API URL.`,
49613
49613
  "--dry-run Show what would be set without actually setting",
49614
49614
  "",
49615
49615
  "Scope priority: --project > --org > user (default)",
49616
- "Default scope is user-level, so credentials are available to all your jobs."
49616
+ "Default scope is user-level, so credentials are available to all your jobs.",
49617
+ "",
49618
+ "Token type guidance:",
49619
+ " Tokens starting with sk-ant-oat01-* are long-lived setup-tokens (preferred).",
49620
+ " A warning is emitted when syncing any other Claude token (short-lived OAuth,",
49621
+ " ~15h). Generate a long-lived token with: claude setup-token",
49622
+ " Codex/Code tokens are automatically written back to their originating secret",
49623
+ " scope after each job when the CLI refreshes them during the session."
49617
49624
  ],
49618
49625
  examples: [
49619
49626
  "eve auth sync # Sync to user-level (default)",
@@ -49627,7 +49634,10 @@ for cloud deployments. Credentials are stored globally per API URL.`,
49627
49634
  usage: "eve auth creds [--claude] [--codex]",
49628
49635
  options: [
49629
49636
  "--claude Only check Claude/Anthropic credentials",
49630
- "--codex Only check Codex/OpenAI credentials"
49637
+ "--codex Only check Codex/OpenAI credentials",
49638
+ "",
49639
+ "Shows token type for Claude (setup-token = long-lived, oauth = short-lived ~15h)",
49640
+ "and expiry for Codex/Code tokens."
49631
49641
  ],
49632
49642
  examples: [
49633
49643
  "eve auth creds",
@@ -51468,8 +51478,8 @@ function showSubcommandHelp(command, subcommand) {
51468
51478
  }
51469
51479
 
51470
51480
  // src/lib/client.ts
51471
- async function requestJson(context2, path7, options = {}) {
51472
- const response = await requestRaw(context2, path7, options);
51481
+ async function requestJson(context2, path8, options = {}) {
51482
+ const response = await requestRaw(context2, path8, options);
51473
51483
  const method = options.method ?? "GET";
51474
51484
  if (response.status === 401 && options.tokenOverride === void 0) {
51475
51485
  const refreshed = await attemptRefresh(context2);
@@ -51477,20 +51487,20 @@ async function requestJson(context2, path7, options = {}) {
51477
51487
  context2.token = refreshed.access_token;
51478
51488
  context2.refreshToken = refreshed.refresh_token;
51479
51489
  context2.expiresAt = refreshed.expires_at;
51480
- const retry = await requestRaw(context2, path7, {
51490
+ const retry = await requestRaw(context2, path8, {
51481
51491
  ...options,
51482
51492
  tokenOverride: refreshed.access_token
51483
51493
  });
51484
51494
  if (!retry.ok && !options.allowError) {
51485
51495
  const message = formatErrorMessage(retry);
51486
- throw new Error(`HTTP ${retry.status}: ${method} ${path7}: ${message}`);
51496
+ throw new Error(`HTTP ${retry.status}: ${method} ${path8}: ${message}`);
51487
51497
  }
51488
51498
  return retry.data;
51489
51499
  }
51490
51500
  }
51491
51501
  if (!response.ok && !options.allowError) {
51492
51502
  const message = formatErrorMessage(response);
51493
- const requestTarget = `${method} ${path7}`;
51503
+ const requestTarget = `${method} ${path8}`;
51494
51504
  const requestFailedContext = `while calling ${requestTarget}: ${message}`;
51495
51505
  if ((response.status === 404 || response.status === 500) && message.includes("Project not found")) {
51496
51506
  const projectIdMatch = message.match(/Project not found: (proj_[a-z0-9]+)/);
@@ -51522,7 +51532,7 @@ function unwrapListResponse(value) {
51522
51532
  }
51523
51533
  throw new Error("Expected list response envelope with data[]");
51524
51534
  }
51525
- async function requestRaw(context2, path7, options = {}) {
51535
+ async function requestRaw(context2, path8, options = {}) {
51526
51536
  const headers = {
51527
51537
  ...options.headers
51528
51538
  };
@@ -51533,7 +51543,7 @@ async function requestRaw(context2, path7, options = {}) {
51533
51543
  if (token) {
51534
51544
  headers.Authorization = `Bearer ${token}`;
51535
51545
  }
51536
- const url = `${context2.apiUrl}${path7}`;
51546
+ const url = `${context2.apiUrl}${path8}`;
51537
51547
  const method = options.method ?? "GET";
51538
51548
  let response;
51539
51549
  try {
@@ -52389,7 +52399,7 @@ function buildQuery2(params) {
52389
52399
  }
52390
52400
 
52391
52401
  // src/commands/job.ts
52392
- var import_child_process = require("child_process");
52402
+ var import_child_process2 = require("child_process");
52393
52403
  var import_fs = require("fs");
52394
52404
  var import_path = require("path");
52395
52405
 
@@ -52871,8 +52881,8 @@ function getErrorMap() {
52871
52881
 
52872
52882
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
52873
52883
  var makeIssue = (params) => {
52874
- const { data, path: path7, errorMaps, issueData } = params;
52875
- const fullPath = [...path7, ...issueData.path || []];
52884
+ const { data, path: path8, errorMaps, issueData } = params;
52885
+ const fullPath = [...path8, ...issueData.path || []];
52876
52886
  const fullIssue = {
52877
52887
  ...issueData,
52878
52888
  path: fullPath
@@ -52988,11 +52998,11 @@ var errorUtil;
52988
52998
 
52989
52999
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
52990
53000
  var ParseInputLazyPath = class {
52991
- constructor(parent, value, path7, key) {
53001
+ constructor(parent, value, path8, key) {
52992
53002
  this._cachedPath = [];
52993
53003
  this.parent = parent;
52994
53004
  this.data = value;
52995
- this._path = path7;
53005
+ this._path = path8;
52996
53006
  this._key = key;
52997
53007
  }
52998
53008
  get path() {
@@ -56536,6 +56546,81 @@ var configSchema = external_exports.object({
56536
56546
  ZAI_MODEL: external_exports.string().optional()
56537
56547
  });
56538
56548
 
56549
+ // ../shared/dist/harnesses/config.js
56550
+ var fs = __toESM(require("node:fs"), 1);
56551
+ var path = __toESM(require("node:path"), 1);
56552
+ function resolveHarnessConfigRoot(options) {
56553
+ const env = options.env ?? process.env;
56554
+ const envRoot = env.EVE_HARNESS_CONFIG_ROOT;
56555
+ if (envRoot) {
56556
+ return { root: path.join(envRoot, options.harness), source: "env" };
56557
+ }
56558
+ const repoPath = options.repoPath ?? process.cwd();
56559
+ return {
56560
+ root: path.join(repoPath, ".agent", "harnesses", options.harness),
56561
+ source: options.repoPath ? "repo" : "default"
56562
+ };
56563
+ }
56564
+ function resolveHarnessConfig(options) {
56565
+ const { root, source } = resolveHarnessConfigRoot(options);
56566
+ if (!options.variant) {
56567
+ return {
56568
+ configDir: root,
56569
+ baseDir: root,
56570
+ hasVariant: false,
56571
+ source
56572
+ };
56573
+ }
56574
+ const variantDir = path.join(root, "variants", options.variant);
56575
+ const hasVariant = fs.existsSync(variantDir);
56576
+ return {
56577
+ configDir: hasVariant ? variantDir : root,
56578
+ baseDir: root,
56579
+ hasVariant,
56580
+ source
56581
+ };
56582
+ }
56583
+ function resolveClaudeConfigDir(harness, variant, options) {
56584
+ const env = options?.env ?? process.env;
56585
+ const existing = env.CLAUDE_CONFIG_DIR;
56586
+ if (existing) {
56587
+ if (!variant)
56588
+ return existing;
56589
+ const normalized = existing.replace(/\/+$/, "");
56590
+ const marker = `${path.sep}variants${path.sep}`;
56591
+ if (normalized.includes(marker)) {
56592
+ return existing;
56593
+ }
56594
+ return path.join(normalized, "variants", variant);
56595
+ }
56596
+ return resolveHarnessConfig({
56597
+ harness,
56598
+ variant,
56599
+ repoPath: options?.repoPath,
56600
+ env
56601
+ }).configDir;
56602
+ }
56603
+ function resolveCodeConfigDir(harness, variant, options) {
56604
+ const env = options?.env ?? process.env;
56605
+ const existing = env.CODEX_HOME;
56606
+ if (existing) {
56607
+ if (!variant)
56608
+ return existing;
56609
+ const normalized = existing.replace(/\/+$/, "");
56610
+ const marker = `${path.sep}variants${path.sep}`;
56611
+ if (normalized.includes(marker)) {
56612
+ return existing;
56613
+ }
56614
+ return path.join(normalized, "variants", variant);
56615
+ }
56616
+ return resolveHarnessConfig({
56617
+ harness,
56618
+ variant,
56619
+ repoPath: options?.repoPath,
56620
+ env
56621
+ }).configDir;
56622
+ }
56623
+
56539
56624
  // ../shared/dist/harnesses/auth.js
56540
56625
  var import_node_child_process2 = require("node:child_process");
56541
56626
  var import_node_fs4 = require("node:fs");
@@ -56726,6 +56811,207 @@ var HARNESS_CAPABILITIES = {
56726
56811
  }
56727
56812
  };
56728
56813
 
56814
+ // ../shared/dist/harnesses/adapters/reasoning.js
56815
+ var CLAUDE_THINKING_TOKENS = {
56816
+ low: "1024",
56817
+ medium: "8192",
56818
+ high: "16000",
56819
+ "x-high": "32000"
56820
+ };
56821
+ var CODE_REASONING_MAP = {
56822
+ low: "low",
56823
+ medium: "medium",
56824
+ high: "high",
56825
+ "x-high": "xhigh"
56826
+ };
56827
+ function mapReasoningEffort(harness, effort) {
56828
+ if (!effort)
56829
+ return void 0;
56830
+ if (!["low", "medium", "high", "x-high"].includes(effort))
56831
+ return void 0;
56832
+ if (harness === "mclaude" || harness === "claude" || harness === "zai") {
56833
+ return CLAUDE_THINKING_TOKENS[effort];
56834
+ }
56835
+ if (harness === "code" || harness === "coder" || harness === "codex") {
56836
+ return CODE_REASONING_MAP[effort];
56837
+ }
56838
+ if (harness === "gemini") {
56839
+ return effort;
56840
+ }
56841
+ return void 0;
56842
+ }
56843
+
56844
+ // ../shared/dist/harnesses/adapters/claude.js
56845
+ var claudeAdapter = {
56846
+ name: "claude",
56847
+ buildOptions: async (ctx) => {
56848
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.CLAUDE_MODEL || "opus");
56849
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56850
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56851
+ const configDir = resolveClaudeConfigDir("claude", variant, {
56852
+ repoPath: ctx.repoPath,
56853
+ env: ctx.env
56854
+ });
56855
+ const auth = await ctx.helpers.resolveMclaudeAuth({ configDir });
56856
+ return {
56857
+ harness: ctx.harness,
56858
+ permission: ctx.permission,
56859
+ variant,
56860
+ model,
56861
+ reasoning,
56862
+ env: {
56863
+ ...auth.env,
56864
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL,
56865
+ CLAUDE_CONFIG_DIR: configDir
56866
+ }
56867
+ };
56868
+ }
56869
+ };
56870
+
56871
+ // ../shared/dist/harnesses/adapters/mclaude.js
56872
+ var mclaudeAdapter = {
56873
+ name: "mclaude",
56874
+ buildOptions: async (ctx) => {
56875
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.CLAUDE_MODEL || "opus");
56876
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56877
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56878
+ const configDir = resolveClaudeConfigDir("mclaude", variant, {
56879
+ repoPath: ctx.repoPath,
56880
+ env: ctx.env
56881
+ });
56882
+ const auth = await ctx.helpers.resolveMclaudeAuth({ configDir });
56883
+ return {
56884
+ harness: ctx.harness,
56885
+ permission: ctx.permission,
56886
+ variant,
56887
+ model,
56888
+ reasoning,
56889
+ env: {
56890
+ ...auth.env,
56891
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL,
56892
+ CLAUDE_CONFIG_DIR: configDir
56893
+ }
56894
+ };
56895
+ }
56896
+ };
56897
+
56898
+ // ../shared/dist/harnesses/adapters/zai.js
56899
+ var zaiAdapter = {
56900
+ name: "zai",
56901
+ buildOptions: async (ctx) => {
56902
+ const apiKey = ctx.env.Z_AI_API_KEY ?? ctx.env.ZAI_API_KEY;
56903
+ if (!apiKey) {
56904
+ throw new Error("Zai harness requires Z_AI_API_KEY environment variable");
56905
+ }
56906
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.ZAI_MODEL || ctx.env.CLAUDE_MODEL);
56907
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56908
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56909
+ const configDir = resolveClaudeConfigDir("zai", variant, {
56910
+ repoPath: ctx.repoPath,
56911
+ env: ctx.env
56912
+ });
56913
+ return {
56914
+ harness: ctx.harness,
56915
+ permission: ctx.permission,
56916
+ variant,
56917
+ model,
56918
+ reasoning,
56919
+ env: {
56920
+ Z_AI_API_KEY: apiKey,
56921
+ Z_AI_BASE_URL: ctx.env.Z_AI_BASE_URL,
56922
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL ?? ctx.env.Z_AI_BASE_URL,
56923
+ // Claude Code reads ANTHROPIC_API_KEY - use Z_AI_API_KEY for zai provider
56924
+ ANTHROPIC_API_KEY: apiKey,
56925
+ CLAUDE_CONFIG_DIR: configDir
56926
+ }
56927
+ };
56928
+ }
56929
+ };
56930
+
56931
+ // ../shared/dist/harnesses/adapters/gemini.js
56932
+ var geminiAdapter = {
56933
+ name: "gemini",
56934
+ buildOptions: async (ctx) => ({
56935
+ harness: ctx.harness,
56936
+ permission: ctx.permission,
56937
+ variant: ctx.invocation.harness_options?.variant ?? ctx.invocation.variant,
56938
+ model: ctx.invocation.harness_options?.model,
56939
+ reasoning: mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort)
56940
+ })
56941
+ };
56942
+
56943
+ // ../shared/dist/harnesses/adapters/code.js
56944
+ var codeAdapter = {
56945
+ name: "code",
56946
+ aliases: ["coder"],
56947
+ buildOptions: async (ctx) => {
56948
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56949
+ const model = ctx.invocation.harness_options?.model;
56950
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56951
+ const configDir = resolveCodeConfigDir("code", variant, {
56952
+ repoPath: ctx.repoPath,
56953
+ env: ctx.env
56954
+ });
56955
+ const auth = await ctx.helpers.resolveCodeAuth({ configDir });
56956
+ return {
56957
+ harness: ctx.harness,
56958
+ permission: ctx.permission,
56959
+ variant,
56960
+ model,
56961
+ reasoning,
56962
+ env: {
56963
+ ...auth.env,
56964
+ CODEX_HOME: configDir
56965
+ }
56966
+ };
56967
+ }
56968
+ };
56969
+
56970
+ // ../shared/dist/harnesses/adapters/codex.js
56971
+ var codexAdapter = {
56972
+ name: "codex",
56973
+ buildOptions: async (ctx) => {
56974
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56975
+ const model = ctx.invocation.harness_options?.model;
56976
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56977
+ const configDir = resolveCodeConfigDir("codex", variant, {
56978
+ repoPath: ctx.repoPath,
56979
+ env: ctx.env
56980
+ });
56981
+ const auth = await ctx.helpers.resolveCodeAuth({ configDir });
56982
+ return {
56983
+ harness: ctx.harness,
56984
+ permission: ctx.permission,
56985
+ variant,
56986
+ model,
56987
+ reasoning,
56988
+ env: {
56989
+ ...auth.env,
56990
+ CODEX_HOME: configDir
56991
+ }
56992
+ };
56993
+ }
56994
+ };
56995
+
56996
+ // ../shared/dist/harnesses/adapters/index.js
56997
+ var adapters = [
56998
+ claudeAdapter,
56999
+ mclaudeAdapter,
57000
+ zaiAdapter,
57001
+ geminiAdapter,
57002
+ codeAdapter,
57003
+ codexAdapter
57004
+ ];
57005
+ var registry = /* @__PURE__ */ new Map();
57006
+ for (const adapter of adapters) {
57007
+ registry.set(adapter.name, adapter);
57008
+ if (adapter.aliases) {
57009
+ for (const alias of adapter.aliases) {
57010
+ registry.set(alias, adapter);
57011
+ }
57012
+ }
57013
+ }
57014
+
56729
57015
  // ../shared/dist/types/job.js
56730
57016
  var JobStatus;
56731
57017
  (function(JobStatus2) {
@@ -57468,7 +57754,8 @@ var AuthStatusResponseSchema = external_exports.object({
57468
57754
  is_admin: external_exports.boolean().optional(),
57469
57755
  is_job_token: external_exports.boolean().optional(),
57470
57756
  is_service_principal: external_exports.boolean().optional(),
57471
- permissions: external_exports.array(external_exports.string()).optional()
57757
+ permissions: external_exports.array(external_exports.string()).optional(),
57758
+ memberships: external_exports.array(external_exports.object({ org_id: external_exports.string(), role: external_exports.string() })).optional()
57472
57759
  });
57473
57760
  var AuthChallengeRequestSchema = external_exports.object({
57474
57761
  provider: external_exports.enum(["github_ssh", "nostr"]).default("github_ssh"),
@@ -57912,7 +58199,9 @@ var SecretResolveRequestSchema = external_exports.object({
57912
58199
  var SecretResolveItemSchema = external_exports.object({
57913
58200
  key: external_exports.string(),
57914
58201
  value: external_exports.string(),
57915
- type: SecretTypeSchema
58202
+ type: SecretTypeSchema,
58203
+ scope_type: external_exports.enum(["user", "org", "project", "system"]).optional(),
58204
+ scope_id: external_exports.string().optional()
57916
58205
  });
57917
58206
  var SecretResolveResponseSchema = external_exports.object({
57918
58207
  data: external_exports.array(SecretResolveItemSchema)
@@ -59826,23 +60115,23 @@ var correlationStorage = new import_async_hooks.AsyncLocalStorage();
59826
60115
  var import_auto_instrumentations_node = __toESM(require_src57(), 1);
59827
60116
 
59828
60117
  // ../shared/dist/lib/pack-resolver.js
59829
- var fs = __toESM(require("node:fs"), 1);
59830
- var path2 = __toESM(require("node:path"), 1);
60118
+ var fs2 = __toESM(require("node:fs"), 1);
60119
+ var path3 = __toESM(require("node:path"), 1);
59831
60120
  var os = __toESM(require("node:os"), 1);
59832
60121
  var import_node_child_process3 = require("node:child_process");
59833
60122
  var import_yaml2 = require("yaml");
59834
- var CACHE_ROOT = path2.join(os.homedir(), ".eve", "cache", "packs");
60123
+ var CACHE_ROOT = path3.join(os.homedir(), ".eve", "cache", "packs");
59835
60124
  async function resolvePack(entry, projectSlug, repoRoot) {
59836
60125
  const packDir = await fetchPackSource(entry, repoRoot);
59837
- const packYamlPath = path2.join(packDir, "eve", "pack.yaml");
59838
- const eveDir = path2.join(packDir, "eve");
59839
- if (fs.existsSync(packYamlPath)) {
59840
- const raw = fs.readFileSync(packYamlPath, "utf-8");
60126
+ const packYamlPath = path3.join(packDir, "eve", "pack.yaml");
60127
+ const eveDir = path3.join(packDir, "eve");
60128
+ if (fs2.existsSync(packYamlPath)) {
60129
+ const raw = fs2.readFileSync(packYamlPath, "utf-8");
59841
60130
  const parsed = PackYamlSchema.parse((0, import_yaml2.parse)(raw));
59842
- const agents = loadYamlMap(path2.join(packDir, parsed.imports.agents));
59843
- const teams = loadYamlMap(path2.join(packDir, parsed.imports.teams));
59844
- const chat = parsed.imports.chat ? loadYamlMap(path2.join(packDir, parsed.imports.chat)) : null;
59845
- const xEve = parsed.imports.x_eve ? loadYamlMap(path2.join(packDir, parsed.imports.x_eve)) : null;
60131
+ const agents = loadYamlMap(path3.join(packDir, parsed.imports.agents));
60132
+ const teams = loadYamlMap(path3.join(packDir, parsed.imports.teams));
60133
+ const chat = parsed.imports.chat ? loadYamlMap(path3.join(packDir, parsed.imports.chat)) : null;
60134
+ const xEve = parsed.imports.x_eve ? loadYamlMap(path3.join(packDir, parsed.imports.x_eve)) : null;
59846
60135
  const prefixedAgents = prefixAgentSlugs(agents, projectSlug);
59847
60136
  const packDefaultPolicy = parsed.gateway?.default_policy ?? "none";
59848
60137
  const gatewayResolvedAgents = resolveAgentGatewayPolicies(prefixedAgents, packDefaultPolicy);
@@ -59858,12 +60147,12 @@ async function resolvePack(entry, projectSlug, repoRoot) {
59858
60147
  skillPaths: skillPaths2
59859
60148
  };
59860
60149
  }
59861
- if (fs.existsSync(eveDir)) {
60150
+ if (fs2.existsSync(eveDir)) {
59862
60151
  throw new Error(`Pack "${entry.source}" has eve/ directory but no pack.yaml. Add eve/pack.yaml or remove the eve/ directory.`);
59863
60152
  }
59864
60153
  const skillPaths = discoverSkillPaths(packDir);
59865
60154
  return {
59866
- id: path2.basename(packDir),
60155
+ id: path3.basename(packDir),
59867
60156
  source: entry.source,
59868
60157
  ref: entry.ref ?? resolveLocalRef(packDir),
59869
60158
  agents: {},
@@ -59877,8 +60166,8 @@ async function fetchPackSource(entry, repoRoot) {
59877
60166
  const { source, ref } = entry;
59878
60167
  if (source.startsWith("./") || source.startsWith("../") || source.startsWith("/")) {
59879
60168
  const base = repoRoot ?? process.cwd();
59880
- const resolved = path2.resolve(base, source);
59881
- if (!fs.existsSync(resolved)) {
60169
+ const resolved = path3.resolve(base, source);
60170
+ if (!fs2.existsSync(resolved)) {
59882
60171
  throw new Error(`Local pack source not found: ${resolved}`);
59883
60172
  }
59884
60173
  return resolved;
@@ -59886,17 +60175,17 @@ async function fetchPackSource(entry, repoRoot) {
59886
60175
  if (!ref) {
59887
60176
  throw new Error(`Remote pack source "${source}" requires a ref (40-char SHA)`);
59888
60177
  }
59889
- const cacheDir = path2.join(CACHE_ROOT, ref);
59890
- if (fs.existsSync(cacheDir)) {
60178
+ const cacheDir = path3.join(CACHE_ROOT, ref);
60179
+ if (fs2.existsSync(cacheDir)) {
59891
60180
  return cacheDir;
59892
60181
  }
59893
- fs.mkdirSync(cacheDir, { recursive: true });
60182
+ fs2.mkdirSync(cacheDir, { recursive: true });
59894
60183
  try {
59895
60184
  const gitUrl = resolveGitUrl(source);
59896
60185
  (0, import_node_child_process3.execSync)(`git clone --depth 1 ${JSON.stringify(gitUrl)} ${JSON.stringify(cacheDir)}`, { stdio: "pipe", timeout: 6e4 });
59897
60186
  (0, import_node_child_process3.execSync)(`git -C ${JSON.stringify(cacheDir)} checkout ${ref}`, { stdio: "pipe", timeout: 3e4 });
59898
60187
  } catch (err) {
59899
- fs.rmSync(cacheDir, { recursive: true, force: true });
60188
+ fs2.rmSync(cacheDir, { recursive: true, force: true });
59900
60189
  throw new Error(`Failed to clone pack "${source}" at ref ${ref}: ${err}`);
59901
60190
  }
59902
60191
  return cacheDir;
@@ -59914,10 +60203,10 @@ function resolveGitUrl(source) {
59914
60203
  return source;
59915
60204
  }
59916
60205
  function loadYamlMap(filePath) {
59917
- if (!fs.existsSync(filePath)) {
60206
+ if (!fs2.existsSync(filePath)) {
59918
60207
  throw new Error(`Pack import file not found: ${filePath}`);
59919
60208
  }
59920
- const raw = fs.readFileSync(filePath, "utf-8");
60209
+ const raw = fs2.readFileSync(filePath, "utf-8");
59921
60210
  const parsed = (0, import_yaml2.parse)(raw);
59922
60211
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
59923
60212
  throw new Error(`Pack import file must be a YAML map: ${filePath}`);
@@ -59983,16 +60272,16 @@ function resolveAgentGatewayPolicies(agentsConfig, packDefaultPolicy) {
59983
60272
  }
59984
60273
  function discoverSkillPaths(packDir) {
59985
60274
  const paths = [];
59986
- const skillsDir = path2.join(packDir, "skills");
59987
- if (!fs.existsSync(skillsDir)) {
60275
+ const skillsDir = path3.join(packDir, "skills");
60276
+ if (!fs2.existsSync(skillsDir)) {
59988
60277
  return paths;
59989
60278
  }
59990
60279
  const walk = (dir) => {
59991
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
60280
+ for (const entry of fs2.readdirSync(dir, { withFileTypes: true })) {
59992
60281
  if (!entry.isDirectory() || entry.name.startsWith("."))
59993
60282
  continue;
59994
- const fullPath = path2.join(dir, entry.name);
59995
- if (fs.existsSync(path2.join(fullPath, "SKILL.md"))) {
60283
+ const fullPath = path3.join(dir, entry.name);
60284
+ if (fs2.existsSync(path3.join(fullPath, "SKILL.md"))) {
59996
60285
  paths.push(fullPath);
59997
60286
  }
59998
60287
  walk(fullPath);
@@ -60081,10 +60370,10 @@ function mergeXEve(packFragments, projectXEve) {
60081
60370
  // ../shared/dist/lib/resource-uris.js
60082
60371
  var ORG_DOCS_PREFIX = "org_docs:/";
60083
60372
  var JOB_ATTACHMENTS_PREFIX = "job_attachments:/";
60084
- function normalizeOrgDocPath(path7) {
60085
- if (!path7)
60373
+ function normalizeOrgDocPath(path8) {
60374
+ if (!path8)
60086
60375
  return "/";
60087
- return path7.startsWith("/") ? path7 : `/${path7}`;
60376
+ return path8.startsWith("/") ? path8 : `/${path8}`;
60088
60377
  }
60089
60378
  function parseResourceUri(uri) {
60090
60379
  if (!uri || typeof uri !== "string")
@@ -60095,11 +60384,11 @@ function parseResourceUri(uri) {
60095
60384
  return null;
60096
60385
  const match = raw.match(/^(.*)@v(\d+)$/);
60097
60386
  if (match) {
60098
- const path7 = normalizeOrgDocPath(match[1]);
60387
+ const path8 = normalizeOrgDocPath(match[1]);
60099
60388
  const version2 = Number(match[2]);
60100
60389
  if (!Number.isFinite(version2) || version2 <= 0)
60101
60390
  return null;
60102
- return { scheme: "org_docs", path: path7, version: version2 };
60391
+ return { scheme: "org_docs", path: path8, version: version2 };
60103
60392
  }
60104
60393
  return { scheme: "org_docs", path: normalizeOrgDocPath(raw) };
60105
60394
  }
@@ -61906,6 +62195,11 @@ var ALL_PERMISSIONS = [
61906
62195
  ];
61907
62196
  var PERMISSION_SET = new Set(ALL_PERMISSIONS);
61908
62197
 
62198
+ // ../shared/dist/git/git-workspace.js
62199
+ var import_child_process = require("child_process");
62200
+ var import_util4 = require("util");
62201
+ var execFileAsync = (0, import_util4.promisify)(import_child_process.execFile);
62202
+
61909
62203
  // src/commands/job.ts
61910
62204
  async function handleJob(subcommand, positionals, flags, context2) {
61911
62205
  const json = Boolean(flags.json);
@@ -64494,7 +64788,7 @@ async function handleRunnerLogs(positionals, flags, context2) {
64494
64788
  console.log(`No pod_name in runtime_meta, using label selector: job-id=${jobId}`);
64495
64789
  kubectlArgs = ["-n", "eve", "logs", "-f", "-l", `job-id=${jobId}`];
64496
64790
  }
64497
- const kubectl = (0, import_child_process.spawn)("kubectl", kubectlArgs, {
64791
+ const kubectl = (0, import_child_process2.spawn)("kubectl", kubectlArgs, {
64498
64792
  stdio: "inherit"
64499
64793
  });
64500
64794
  return new Promise((resolve8, reject) => {
@@ -64973,8 +65267,21 @@ async function handleAuth(subcommand, flags, context2, credentials) {
64973
65267
  }
64974
65268
  if (!json && data.permissions && data.permissions.length > 0) {
64975
65269
  console.log(`User: ${data.user_id ?? "unknown"} (${data.email ?? "no email"})`);
64976
- console.log(`Role: ${data.role ?? "member"}`);
65270
+ let displayRole = data.role ?? "member";
65271
+ if (context2.orgId && data.memberships?.length) {
65272
+ const match = data.memberships.find((m) => m.org_id === context2.orgId);
65273
+ if (match) displayRole = match.role;
65274
+ }
65275
+ console.log(`Role: ${displayRole}`);
64977
65276
  console.log(`Admin: ${data.is_admin ?? false}`);
65277
+ if (context2.orgId && data.memberships?.length) {
65278
+ console.log(`
65279
+ Org memberships:`);
65280
+ for (const m of data.memberships) {
65281
+ const marker = m.org_id === context2.orgId ? " (active)" : "";
65282
+ console.log(` ${m.org_id}: ${m.role}${marker}`);
65283
+ }
65284
+ }
64978
65285
  console.log(`
64979
65286
  Permissions (${data.permissions.length}):`);
64980
65287
  for (const perm of data.permissions) {
@@ -65244,37 +65551,14 @@ Permissions (${data.permissions.length}):`);
65244
65551
  }
65245
65552
  }
65246
65553
  if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN || !extractedTokens.CODEX_AUTH_JSON_B64) {
65247
- const codexAuthPaths = [
65248
- `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
65249
- `${(0, import_node_os3.homedir)()}/.code/auth.json`
65250
- ];
65251
- for (const authPath of codexAuthPaths) {
65252
- if ((0, import_node_fs5.existsSync)(authPath)) {
65253
- try {
65254
- const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
65255
- const auth = JSON.parse(content);
65256
- if (!extractedTokens.CODEX_AUTH_JSON_B64) {
65257
- extractedTokens.CODEX_AUTH_JSON_B64 = Buffer.from(content, "utf8").toString("base64");
65258
- }
65259
- const tokens = auth.tokens;
65260
- if (tokens?.access_token) {
65261
- if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
65262
- extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = tokens.access_token;
65263
- }
65264
- break;
65265
- }
65266
- if (auth.oauth_token || auth.access_token) {
65267
- if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
65268
- extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = auth.oauth_token || auth.access_token;
65269
- }
65270
- break;
65271
- }
65272
- if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
65273
- extractedTokens.OPENAI_API_KEY = auth.OPENAI_API_KEY;
65274
- break;
65275
- }
65276
- } catch {
65277
- }
65554
+ const freshest = pickFreshestCodeAuth();
65555
+ if (freshest) {
65556
+ extractedTokens.CODEX_AUTH_JSON_B64 = freshest.authJsonB64;
65557
+ if (freshest.accessToken) {
65558
+ extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = freshest.accessToken;
65559
+ }
65560
+ if (freshest.apiKey) {
65561
+ extractedTokens.OPENAI_API_KEY = freshest.apiKey;
65278
65562
  }
65279
65563
  }
65280
65564
  }
@@ -65287,6 +65571,18 @@ Permissions (${data.permissions.length}):`);
65287
65571
  );
65288
65572
  return;
65289
65573
  }
65574
+ const warnings = [];
65575
+ const claudeToken = extractedTokens.CLAUDE_CODE_OAUTH_TOKEN;
65576
+ if (claudeToken && !claudeToken.startsWith("sk-ant-oat01-")) {
65577
+ warnings.push("Found short-lived Claude OAuth token (expires in ~15h). For reliable agent execution, generate a long-lived token: claude setup-token\nThen re-run: eve auth sync");
65578
+ if (!json) {
65579
+ process.stderr.write(`\u26A0 Found short-lived Claude OAuth token (expires in ~15h).
65580
+ For reliable agent execution, generate a long-lived token: claude setup-token
65581
+ Then re-run: eve auth sync
65582
+
65583
+ `);
65584
+ }
65585
+ }
65290
65586
  const targetLabel = scope.type === "user" ? "user" : scope.type === "org" ? `org ${scope.orgId}` : `project ${scope.projectId}`;
65291
65587
  if (dryRun) {
65292
65588
  const tokenList = Object.keys(extractedTokens).map((key) => ({
@@ -65294,7 +65590,7 @@ Permissions (${data.permissions.length}):`);
65294
65590
  value: `${extractedTokens[key].substring(0, 10)}...`
65295
65591
  }));
65296
65592
  outputJson(
65297
- { dry_run: true, would_set: tokenList, target: targetLabel, scope },
65593
+ { dry_run: true, would_set: tokenList, target: targetLabel, scope, warnings },
65298
65594
  json,
65299
65595
  `Would set ${tokenList.length} token(s) on ${targetLabel}:
65300
65596
  ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
@@ -65329,7 +65625,8 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65329
65625
  scope,
65330
65626
  results,
65331
65627
  success: successCount,
65332
- failed: failCount
65628
+ failed: failCount,
65629
+ warnings
65333
65630
  },
65334
65631
  json,
65335
65632
  `\u2713 Set ${successCount} secret(s) on ${targetLabel}${failCount > 0 ? ` (${failCount} failed)` : ""}`
@@ -65348,6 +65645,7 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65348
65645
  let claudeSource = "";
65349
65646
  let claudePreview = "";
65350
65647
  let claudeExpires;
65648
+ let claudeTokenType;
65351
65649
  if (plat === "darwin" && !claudeFound) {
65352
65650
  for (const service of ["Claude Code-credentials", "anthropic.claude"]) {
65353
65651
  try {
@@ -65358,7 +65656,15 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65358
65656
  if (output) {
65359
65657
  claudeFound = true;
65360
65658
  claudeSource = `macOS Keychain (${service})`;
65361
- claudePreview = output.substring(0, 15) + "...";
65659
+ let tokenStr = output;
65660
+ try {
65661
+ const parsed = JSON.parse(output);
65662
+ const claudeOauth = parsed.claudeAiOauth;
65663
+ if (typeof claudeOauth?.accessToken === "string") tokenStr = claudeOauth.accessToken;
65664
+ } catch {
65665
+ }
65666
+ claudeTokenType = tokenStr.startsWith("sk-ant-oat01-") ? "setup-token" : "oauth";
65667
+ claudePreview = tokenStr.substring(0, 15) + "...";
65362
65668
  break;
65363
65669
  }
65364
65670
  } catch {
@@ -65380,7 +65686,9 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65380
65686
  if (claudeOauth?.accessToken) {
65381
65687
  claudeFound = true;
65382
65688
  claudeSource = credPath.replace((0, import_node_os3.homedir)(), "~");
65383
- claudePreview = claudeOauth.accessToken.substring(0, 15) + "...";
65689
+ const tokenStr = claudeOauth.accessToken;
65690
+ claudePreview = tokenStr.substring(0, 15) + "...";
65691
+ claudeTokenType = tokenStr.startsWith("sk-ant-oat01-") ? "setup-token" : "oauth";
65384
65692
  if (claudeOauth.expiresAt) {
65385
65693
  const expDate = new Date(claudeOauth.expiresAt);
65386
65694
  claudeExpires = expDate.toISOString();
@@ -65392,6 +65700,7 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65392
65700
  claudeSource = credPath.replace((0, import_node_os3.homedir)(), "~");
65393
65701
  const token = creds.oauth_token || creds.access_token;
65394
65702
  claudePreview = token.substring(0, 15) + "...";
65703
+ claudeTokenType = token.startsWith("sk-ant-oat01-") ? "setup-token" : "oauth";
65395
65704
  break;
65396
65705
  }
65397
65706
  } catch {
@@ -65404,7 +65713,8 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65404
65713
  source: claudeFound ? claudeSource : "not found",
65405
65714
  found: claudeFound,
65406
65715
  preview: claudePreview || void 0,
65407
- expiresAt: claudeExpires
65716
+ expiresAt: claudeExpires,
65717
+ tokenType: claudeTokenType
65408
65718
  });
65409
65719
  }
65410
65720
  if (checkCodex) {
@@ -65428,38 +65738,20 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65428
65738
  }
65429
65739
  }
65430
65740
  }
65741
+ let codexExpires;
65431
65742
  if (!codexFound) {
65432
- const codexAuthPaths = [
65433
- `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
65434
- `${(0, import_node_os3.homedir)()}/.code/auth.json`
65435
- ];
65436
- for (const authPath of codexAuthPaths) {
65437
- if ((0, import_node_fs5.existsSync)(authPath)) {
65438
- try {
65439
- const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
65440
- const auth = JSON.parse(content);
65441
- const tokens = auth.tokens;
65442
- if (tokens?.access_token) {
65443
- codexFound = true;
65444
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
65445
- codexPreview = tokens.access_token.substring(0, 15) + "...";
65446
- break;
65447
- }
65448
- if (auth.oauth_token || auth.access_token) {
65449
- codexFound = true;
65450
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
65451
- const token = auth.oauth_token || auth.access_token;
65452
- codexPreview = token.substring(0, 15) + "...";
65453
- break;
65454
- }
65455
- if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
65456
- codexFound = true;
65457
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~") + " (API key)";
65458
- codexPreview = auth.OPENAI_API_KEY.substring(0, 10) + "...";
65459
- break;
65460
- }
65461
- } catch {
65462
- }
65743
+ const freshest = pickFreshestCodeAuth();
65744
+ if (freshest) {
65745
+ codexFound = true;
65746
+ codexSource = freshest.sourcePath.replace((0, import_node_os3.homedir)(), "~");
65747
+ if (freshest.accessToken) {
65748
+ codexPreview = freshest.accessToken.substring(0, 15) + "...";
65749
+ } else if (freshest.apiKey) {
65750
+ codexSource += " (API key)";
65751
+ codexPreview = freshest.apiKey.substring(0, 10) + "...";
65752
+ }
65753
+ if (freshest.expiresAt > 0) {
65754
+ codexExpires = new Date(freshest.expiresAt * 1e3).toISOString();
65463
65755
  }
65464
65756
  }
65465
65757
  }
@@ -65467,7 +65759,8 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65467
65759
  name: "Codex/Code OAuth",
65468
65760
  source: codexFound ? codexSource : "not found",
65469
65761
  found: codexFound,
65470
- preview: codexPreview || void 0
65762
+ preview: codexPreview || void 0,
65763
+ expiresAt: codexExpires
65471
65764
  });
65472
65765
  }
65473
65766
  const foundCount = credentials2.filter((c) => c.found).length;
@@ -65481,6 +65774,10 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65481
65774
  const status = cred.found ? "\u2713" : "\u2717";
65482
65775
  console.log(` ${status} ${cred.name}`);
65483
65776
  console.log(` Source: ${cred.source}`);
65777
+ if (cred.tokenType) {
65778
+ const typeLabel = cred.tokenType === "setup-token" ? "setup-token (long-lived)" : "oauth (short-lived, ~15h)";
65779
+ console.log(` Type: ${typeLabel}`);
65780
+ }
65484
65781
  if (cred.preview) {
65485
65782
  console.log(` Token: ${cred.preview}`);
65486
65783
  }
@@ -65488,8 +65785,8 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65488
65785
  const expDate = new Date(cred.expiresAt);
65489
65786
  const now = /* @__PURE__ */ new Date();
65490
65787
  const isExpired = expDate < now;
65491
- const expLabel = isExpired ? "(expired)" : "";
65492
- console.log(` Expires: ${cred.expiresAt} ${expLabel}`);
65788
+ const expLabel = isExpired ? " (expired)" : "";
65789
+ console.log(` Expires: ${cred.expiresAt}${expLabel}`);
65493
65790
  }
65494
65791
  console.log("");
65495
65792
  }
@@ -65711,6 +66008,52 @@ No token minted (use --scopes to mint a token).`);
65711
66008
  throw new Error("Usage: eve auth <login|logout|status|whoami|bootstrap|sync|creds|token|mint|permissions|request-access|create-service-account|list-service-accounts|revoke-service-account>");
65712
66009
  }
65713
66010
  }
66011
+ function pickFreshestCodeAuth() {
66012
+ const codexAuthPaths = [
66013
+ `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
66014
+ `${(0, import_node_os3.homedir)()}/.code/auth.json`
66015
+ ];
66016
+ const candidates = [];
66017
+ for (const authPath of codexAuthPaths) {
66018
+ if (!(0, import_node_fs5.existsSync)(authPath)) continue;
66019
+ try {
66020
+ const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
66021
+ const auth = JSON.parse(content);
66022
+ const authJsonB64 = Buffer.from(content, "utf8").toString("base64");
66023
+ const tokens = auth.tokens;
66024
+ if (tokens?.access_token) {
66025
+ const expiresAt = typeof tokens.expires_at === "number" ? tokens.expires_at : 0;
66026
+ candidates.push({
66027
+ sourcePath: authPath,
66028
+ authJsonB64,
66029
+ accessToken: tokens.access_token,
66030
+ expiresAt
66031
+ });
66032
+ continue;
66033
+ }
66034
+ if (auth.oauth_token || auth.access_token) {
66035
+ candidates.push({
66036
+ sourcePath: authPath,
66037
+ authJsonB64,
66038
+ accessToken: auth.oauth_token || auth.access_token,
66039
+ expiresAt: 0
66040
+ });
66041
+ continue;
66042
+ }
66043
+ if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
66044
+ candidates.push({
66045
+ sourcePath: authPath,
66046
+ authJsonB64,
66047
+ apiKey: auth.OPENAI_API_KEY,
66048
+ expiresAt: 0
66049
+ });
66050
+ }
66051
+ } catch {
66052
+ }
66053
+ }
66054
+ if (candidates.length === 0) return null;
66055
+ return candidates.reduce((best, c) => c.expiresAt > best.expiresAt ? c : best);
66056
+ }
65714
66057
  function signNonceWithSsh(keyPath, nonce) {
65715
66058
  const tempDir = (0, import_node_fs5.mkdtempSync)((0, import_node_path5.join)((0, import_node_os3.tmpdir)(), "eve-auth-"));
65716
66059
  const noncePath = (0, import_node_path5.join)(tempDir, "nonce");
@@ -66804,9 +67147,9 @@ function getOrchestratorUrl(context2) {
66804
67147
  apiUrl.port = orchPort;
66805
67148
  return apiUrl.toString().replace(/\/$/, "");
66806
67149
  }
66807
- async function requestOrchestratorJson(context2, path7, options) {
67150
+ async function requestOrchestratorJson(context2, path8, options) {
66808
67151
  const orchUrl = getOrchestratorUrl(context2);
66809
- const url = `${orchUrl}${path7}`;
67152
+ const url = `${orchUrl}${path8}`;
66810
67153
  const headers = {};
66811
67154
  if (options?.body) {
66812
67155
  headers["Content-Type"] = "application/json";
@@ -69012,13 +69355,13 @@ async function handleCall(positionals, flags, context2) {
69012
69355
  const body = graphqlBody ?? jsonBody;
69013
69356
  const method = methodInput.toUpperCase();
69014
69357
  const resolvedBaseUrl = resolveApiBaseUrlForRuntime(api.base_url, context2.apiUrl);
69015
- const path7 = resolveApiPath(resolvedBaseUrl, pathInput);
69358
+ const path8 = resolveApiPath(resolvedBaseUrl, pathInput);
69016
69359
  const tokenOverride = getStringFlag(flags, ["token"]);
69017
69360
  const authToken = tokenOverride ?? process.env.EVE_JOB_TOKEN ?? context2.token;
69018
69361
  if (printCurl) {
69019
69362
  const curl = buildCurlCommand({
69020
69363
  method,
69021
- url: path7,
69364
+ url: path8,
69022
69365
  authToken,
69023
69366
  jsonBody: body,
69024
69367
  authHint: tokenOverride ? "override" : process.env.EVE_JOB_TOKEN ? "job" : "user"
@@ -69026,7 +69369,7 @@ async function handleCall(positionals, flags, context2) {
69026
69369
  console.log(curl);
69027
69370
  return;
69028
69371
  }
69029
- const response = await fetch(path7, {
69372
+ const response = await fetch(path8, {
69030
69373
  method,
69031
69374
  headers: buildApiHeaders(authToken, body),
69032
69375
  body: body ? JSON.stringify(body) : void 0
@@ -69122,7 +69465,7 @@ async function fetchApiSpec(context2, projectId, name, env) {
69122
69465
  function buildCurlExamples(api, spec) {
69123
69466
  const paths = spec.paths ?? {};
69124
69467
  const examples = [];
69125
- Object.entries(paths).forEach(([path7, methods]) => {
69468
+ Object.entries(paths).forEach(([path8, methods]) => {
69126
69469
  Object.entries(methods).forEach(([method, operation]) => {
69127
69470
  const lower = method.toLowerCase();
69128
69471
  if (!["get", "post", "put", "patch", "delete"].includes(lower)) {
@@ -69133,7 +69476,7 @@ function buildCurlExamples(api, spec) {
69133
69476
  const needsBody = ["post", "put", "patch"].includes(lower);
69134
69477
  const curl = buildCurlCommand({
69135
69478
  method: lower.toUpperCase(),
69136
- url: resolveApiPath(api.base_url, path7),
69479
+ url: resolveApiPath(api.base_url, path8),
69137
69480
  authToken: api.auth_mode === "eve" ? "$EVE_JOB_TOKEN" : void 0,
69138
69481
  jsonBody: needsBody ? examplePayload ?? {} : void 0,
69139
69482
  authHint: "job"
@@ -69155,15 +69498,15 @@ function extractExamplePayload(requestBody) {
69155
69498
  if (examples.length === 0) return void 0;
69156
69499
  return examples[0]?.value;
69157
69500
  }
69158
- function resolveApiPath(baseUrl, path7) {
69159
- if (path7.startsWith("http://") || path7.startsWith("https://")) {
69160
- return path7;
69501
+ function resolveApiPath(baseUrl, path8) {
69502
+ if (path8.startsWith("http://") || path8.startsWith("https://")) {
69503
+ return path8;
69161
69504
  }
69162
69505
  if (!baseUrl) {
69163
- return path7;
69506
+ return path8;
69164
69507
  }
69165
69508
  const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
69166
- const trimmedPath = path7.startsWith("/") ? path7 : `/${path7}`;
69509
+ const trimmedPath = path8.startsWith("/") ? path8 : `/${path8}`;
69167
69510
  return `${trimmedBase}${trimmedPath}`;
69168
69511
  }
69169
69512
  function resolveApiBaseUrlForRuntime(baseUrl, eveApiUrl) {
@@ -70892,13 +71235,13 @@ function Subscribe(postgres2, options) {
70892
71235
  }
70893
71236
  }
70894
71237
  function handle(a, b2) {
70895
- const path7 = b2.relation.schema + "." + b2.relation.table;
71238
+ const path8 = b2.relation.schema + "." + b2.relation.table;
70896
71239
  call("*", a, b2);
70897
- call("*:" + path7, a, b2);
70898
- b2.relation.keys.length && call("*:" + path7 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
71240
+ call("*:" + path8, a, b2);
71241
+ b2.relation.keys.length && call("*:" + path8 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
70899
71242
  call(b2.command, a, b2);
70900
- call(b2.command + ":" + path7, a, b2);
70901
- b2.relation.keys.length && call(b2.command + ":" + path7 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
71243
+ call(b2.command + ":" + path8, a, b2);
71244
+ b2.relation.keys.length && call(b2.command + ":" + path8 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
70902
71245
  }
70903
71246
  function pong() {
70904
71247
  const x2 = Buffer.alloc(34);
@@ -71011,8 +71354,8 @@ function parseEvent(x) {
71011
71354
  const xs = x.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
71012
71355
  if (!xs)
71013
71356
  throw new Error("Malformed subscribe pattern: " + x);
71014
- const [, command, path7, key] = xs;
71015
- return (command || "*") + (path7 ? ":" + (path7.indexOf(".") === -1 ? "public." + path7 : path7) : "") + (key ? "=" + key : "");
71357
+ const [, command, path8, key] = xs;
71358
+ return (command || "*") + (path8 ? ":" + (path8.indexOf(".") === -1 ? "public." + path8 : path8) : "") + (key ? "=" + key : "");
71016
71359
  }
71017
71360
 
71018
71361
  // ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/large.js
@@ -71157,10 +71500,10 @@ function Postgres(a, b2) {
71157
71500
  });
71158
71501
  return query;
71159
71502
  }
71160
- function file(path7, args = [], options2 = {}) {
71503
+ function file(path8, args = [], options2 = {}) {
71161
71504
  arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
71162
71505
  const query = new Query([], args, (query2) => {
71163
- import_fs2.default.readFile(path7, "utf8", (err, string) => {
71506
+ import_fs2.default.readFile(path8, "utf8", (err, string) => {
71164
71507
  if (err)
71165
71508
  return query2.reject(err);
71166
71509
  query2.strings = [string];
@@ -72548,10 +72891,10 @@ function padRight6(str, width) {
72548
72891
  }
72549
72892
 
72550
72893
  // src/commands/skills.ts
72551
- var fs3 = __toESM(require("node:fs"));
72552
- var path5 = __toESM(require("node:path"));
72894
+ var fs4 = __toESM(require("node:fs"));
72895
+ var path6 = __toESM(require("node:path"));
72553
72896
  var import_node_child_process7 = require("node:child_process");
72554
- var UNIVERSAL_SKILLS_DIR = path5.join(".agents", "skills");
72897
+ var UNIVERSAL_SKILLS_DIR = path6.join(".agents", "skills");
72555
72898
  var PRIVATE_SKILLS_DIRNAME = "private-skills";
72556
72899
  async function handleSkills(subcommand, positionals, flags) {
72557
72900
  switch (subcommand) {
@@ -72567,8 +72910,8 @@ async function handleInstall(positionals, flags) {
72567
72910
  const skipInstalled = Boolean(flags["skip-installed"]);
72568
72911
  const projectRoot = process.cwd();
72569
72912
  const skillsBin = resolveSkillsBinary();
72570
- const manifestPath = path5.join(projectRoot, "skills.txt");
72571
- const skillsDir = path5.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72913
+ const manifestPath = path6.join(projectRoot, "skills.txt");
72914
+ const skillsDir = path6.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72572
72915
  const source = positionals[0];
72573
72916
  if (source) {
72574
72917
  const parsed = parseSkillSource(source);
@@ -72601,7 +72944,7 @@ async function handleInstall(positionals, flags) {
72601
72944
  function installSkill(skillsBin, skill, projectRoot) {
72602
72945
  console.log(` Installing: ${skill.source} (${skill.type})`);
72603
72946
  const localDir = resolveLocalDirIfExists(skill, projectRoot);
72604
- const wantsExcludePrivate = localDir !== null && fs3.existsSync(path5.join(localDir, PRIVATE_SKILLS_DIRNAME)) && !sourcePathExplicitlyTargetsPrivate(skill.source);
72947
+ const wantsExcludePrivate = localDir !== null && fs4.existsSync(path6.join(localDir, PRIVATE_SKILLS_DIRNAME)) && !sourcePathExplicitlyTargetsPrivate(skill.source);
72605
72948
  try {
72606
72949
  const agents = ["claude-code", "codex", "gemini-cli"];
72607
72950
  if (wantsExcludePrivate && localDir) {
@@ -72612,7 +72955,7 @@ function installSkill(skillsBin, skill, projectRoot) {
72612
72955
  }
72613
72956
  console.log(` Installing ${skillDirs.length} public skill(s) (excluding ${PRIVATE_SKILLS_DIRNAME}/)...`);
72614
72957
  for (const dir of skillDirs) {
72615
- const rel = path5.relative(projectRoot, dir);
72958
+ const rel = path6.relative(projectRoot, dir);
72616
72959
  const installSource = rel.startsWith(".") ? rel : `./${rel}`;
72617
72960
  for (const agent of agents) {
72618
72961
  (0, import_node_child_process7.execSync)(`${skillsBin} add ${JSON.stringify(installSource)} -a ${agent} -s '*' -y --full-depth`, {
@@ -72636,16 +72979,16 @@ function installSkill(skillsBin, skill, projectRoot) {
72636
72979
  }
72637
72980
  }
72638
72981
  function persistToManifest(manifestPath, source) {
72639
- if (!fs3.existsSync(manifestPath)) {
72640
- fs3.writeFileSync(manifestPath, `${source}
72982
+ if (!fs4.existsSync(manifestPath)) {
72983
+ fs4.writeFileSync(manifestPath, `${source}
72641
72984
  `);
72642
72985
  console.log(`Created skills.txt with ${source}`);
72643
72986
  return;
72644
72987
  }
72645
- const content = fs3.readFileSync(manifestPath, "utf-8");
72988
+ const content = fs4.readFileSync(manifestPath, "utf-8");
72646
72989
  const lines = content.split("\n").map((l) => l.split("#")[0].trim());
72647
72990
  if (!lines.includes(source)) {
72648
- fs3.appendFileSync(manifestPath, `
72991
+ fs4.appendFileSync(manifestPath, `
72649
72992
  ${source}
72650
72993
  `);
72651
72994
  console.log(`Added ${source} to skills.txt`);
@@ -72653,11 +72996,11 @@ ${source}
72653
72996
  }
72654
72997
  function resolveSkillsBinary() {
72655
72998
  const candidates = [
72656
- path5.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
72657
- path5.resolve(__dirname, "..", "..", ".bin", "skills")
72999
+ path6.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
73000
+ path6.resolve(__dirname, "..", "..", ".bin", "skills")
72658
73001
  ];
72659
73002
  for (const candidate of candidates) {
72660
- if (fs3.existsSync(candidate)) return candidate;
73003
+ if (fs4.existsSync(candidate)) return candidate;
72661
73004
  }
72662
73005
  if (commandExists("skills")) return "skills";
72663
73006
  throw new Error(
@@ -72681,21 +73024,21 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72681
73024
  const basePattern = pattern.replace(/\/\*+$/, "");
72682
73025
  let searchRoot;
72683
73026
  if (basePattern.startsWith("./") || basePattern.startsWith("../")) {
72684
- searchRoot = path5.resolve(path5.dirname(basePath), basePattern);
73027
+ searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
72685
73028
  } else if (basePattern.startsWith("/")) {
72686
73029
  searchRoot = basePattern;
72687
73030
  } else if (basePattern.startsWith("~")) {
72688
73031
  searchRoot = basePattern.replace(/^~/, process.env.HOME || "~");
72689
73032
  } else {
72690
- searchRoot = path5.resolve(path5.dirname(basePath), basePattern);
73033
+ searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
72691
73034
  }
72692
- if (!fs3.existsSync(searchRoot)) {
73035
+ if (!fs4.existsSync(searchRoot)) {
72693
73036
  console.warn(`Warning: Glob pattern base directory not found: ${searchRoot}`);
72694
73037
  return sources;
72695
73038
  }
72696
73039
  const findSkillDirs2 = (dir, depth) => {
72697
73040
  try {
72698
- const entries = fs3.readdirSync(dir, { withFileTypes: true });
73041
+ const entries = fs4.readdirSync(dir, { withFileTypes: true });
72699
73042
  for (const entry of entries) {
72700
73043
  if (!entry.isDirectory() || entry.name.startsWith(".")) {
72701
73044
  continue;
@@ -72703,11 +73046,11 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72703
73046
  if (!explicitPrivateTarget && entry.name === PRIVATE_SKILLS_DIRNAME) {
72704
73047
  continue;
72705
73048
  }
72706
- const fullPath = path5.join(dir, entry.name);
72707
- const skillMdPath = path5.join(fullPath, "SKILL.md");
72708
- if (fs3.existsSync(skillMdPath)) {
73049
+ const fullPath = path6.join(dir, entry.name);
73050
+ const skillMdPath = path6.join(fullPath, "SKILL.md");
73051
+ if (fs4.existsSync(skillMdPath)) {
72709
73052
  const name = entry.name;
72710
- const relativePath = path5.relative(path5.dirname(basePath), fullPath);
73053
+ const relativePath = path6.relative(path6.dirname(basePath), fullPath);
72711
73054
  const source = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
72712
73055
  if (!explicitPrivateTarget && pathContainsPrivateSkills(source)) {
72713
73056
  continue;
@@ -72731,10 +73074,10 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72731
73074
  return sources;
72732
73075
  }
72733
73076
  function parseSkillsManifest(manifestPath) {
72734
- if (!fs3.existsSync(manifestPath)) {
73077
+ if (!fs4.existsSync(manifestPath)) {
72735
73078
  return [];
72736
73079
  }
72737
- const content = fs3.readFileSync(manifestPath, "utf-8");
73080
+ const content = fs4.readFileSync(manifestPath, "utf-8");
72738
73081
  const sources = [];
72739
73082
  for (const rawLine of content.split("\n")) {
72740
73083
  const line = rawLine.split("#")[0].trim();
@@ -72760,22 +73103,22 @@ function parseSkillSource(line) {
72760
73103
  return { raw: line, source: line, type: "github", name: name2 };
72761
73104
  }
72762
73105
  if (line.startsWith("/") || line.startsWith("~")) {
72763
- const name2 = path5.basename(line);
73106
+ const name2 = path6.basename(line);
72764
73107
  return { raw: line, source: line, type: "local", name: name2 };
72765
73108
  }
72766
73109
  if (line.startsWith("./") || line.startsWith("../")) {
72767
- const name2 = path5.basename(line);
73110
+ const name2 = path6.basename(line);
72768
73111
  return { raw: line, source: line, type: "local", name: name2 };
72769
73112
  }
72770
- if (fs3.existsSync(line)) {
72771
- const name2 = path5.basename(line);
73113
+ if (fs4.existsSync(line)) {
73114
+ const name2 = path6.basename(line);
72772
73115
  return { raw: line, source: `./${line}`, type: "local", name: name2 };
72773
73116
  }
72774
73117
  if (line.includes("/") && !line.includes(" ")) {
72775
73118
  const name2 = extractNameFromRepo(line);
72776
73119
  return { raw: line, source: line, type: "github", name: name2 };
72777
73120
  }
72778
- const name = path5.basename(line);
73121
+ const name = path6.basename(line);
72779
73122
  return { raw: line, source: `./${line}`, type: "local", name };
72780
73123
  }
72781
73124
  function extractNameFromUrl(url) {
@@ -72783,7 +73126,7 @@ function extractNameFromUrl(url) {
72783
73126
  if (match) {
72784
73127
  return match[1].replace(/\.git$/, "");
72785
73128
  }
72786
- return path5.basename(new URL(url).pathname).replace(/\.git$/, "");
73129
+ return path6.basename(new URL(url).pathname).replace(/\.git$/, "");
72787
73130
  }
72788
73131
  function extractNameFromRepo(repo) {
72789
73132
  const parts = repo.split("/");
@@ -72791,10 +73134,10 @@ function extractNameFromRepo(repo) {
72791
73134
  }
72792
73135
  function getInstalledSkills(skillsDir) {
72793
73136
  const installed = /* @__PURE__ */ new Set();
72794
- if (!fs3.existsSync(skillsDir)) {
73137
+ if (!fs4.existsSync(skillsDir)) {
72795
73138
  return installed;
72796
73139
  }
72797
- const entries = fs3.readdirSync(skillsDir, { withFileTypes: true });
73140
+ const entries = fs4.readdirSync(skillsDir, { withFileTypes: true });
72798
73141
  for (const entry of entries) {
72799
73142
  if (entry.isDirectory() && !entry.name.startsWith(".")) {
72800
73143
  installed.add(entry.name);
@@ -72803,46 +73146,46 @@ function getInstalledSkills(skillsDir) {
72803
73146
  return installed;
72804
73147
  }
72805
73148
  function ensureSkillsSymlink(projectRoot) {
72806
- const agentSkills = path5.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72807
- const claudeDir = path5.join(projectRoot, ".claude");
72808
- const claudeSkills = path5.join(claudeDir, "skills");
72809
- if (!fs3.existsSync(agentSkills)) {
72810
- fs3.mkdirSync(agentSkills, { recursive: true });
73149
+ const agentSkills = path6.join(projectRoot, UNIVERSAL_SKILLS_DIR);
73150
+ const claudeDir = path6.join(projectRoot, ".claude");
73151
+ const claudeSkills = path6.join(claudeDir, "skills");
73152
+ if (!fs4.existsSync(agentSkills)) {
73153
+ fs4.mkdirSync(agentSkills, { recursive: true });
72811
73154
  }
72812
- if (!fs3.existsSync(claudeDir)) {
72813
- fs3.mkdirSync(claudeDir, { recursive: true });
73155
+ if (!fs4.existsSync(claudeDir)) {
73156
+ fs4.mkdirSync(claudeDir, { recursive: true });
72814
73157
  }
72815
- if (fs3.existsSync(claudeSkills) && !fs3.lstatSync(claudeSkills).isSymbolicLink()) {
73158
+ if (fs4.existsSync(claudeSkills) && !fs4.lstatSync(claudeSkills).isSymbolicLink()) {
72816
73159
  try {
72817
- const claudeStat = fs3.lstatSync(claudeSkills);
73160
+ const claudeStat = fs4.lstatSync(claudeSkills);
72818
73161
  if (claudeStat.isDirectory()) {
72819
- const entries = fs3.readdirSync(agentSkills, { withFileTypes: true });
73162
+ const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
72820
73163
  for (const entry of entries) {
72821
73164
  if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
72822
- const dst = path5.join(claudeSkills, entry.name);
72823
- if (fs3.existsSync(dst)) continue;
72824
- fs3.symlinkSync(path5.join("..", "..", UNIVERSAL_SKILLS_DIR, entry.name), dst);
73165
+ const dst = path6.join(claudeSkills, entry.name);
73166
+ if (fs4.existsSync(dst)) continue;
73167
+ fs4.symlinkSync(path6.join("..", "..", UNIVERSAL_SKILLS_DIR, entry.name), dst);
72825
73168
  }
72826
73169
  }
72827
73170
  } catch {
72828
73171
  }
72829
73172
  return;
72830
73173
  }
72831
- if (fs3.existsSync(claudeSkills)) {
72832
- const stat = fs3.lstatSync(claudeSkills);
73174
+ if (fs4.existsSync(claudeSkills)) {
73175
+ const stat = fs4.lstatSync(claudeSkills);
72833
73176
  if (stat.isSymbolicLink()) {
72834
- const target = fs3.readlinkSync(claudeSkills);
73177
+ const target = fs4.readlinkSync(claudeSkills);
72835
73178
  if (target === `../${UNIVERSAL_SKILLS_DIR}` || target === agentSkills) {
72836
73179
  return;
72837
73180
  }
72838
- fs3.unlinkSync(claudeSkills);
73181
+ fs4.unlinkSync(claudeSkills);
72839
73182
  } else {
72840
73183
  console.log(".claude/skills exists and is not a symlink; skipping");
72841
73184
  return;
72842
73185
  }
72843
73186
  }
72844
73187
  try {
72845
- fs3.symlinkSync(`../${UNIVERSAL_SKILLS_DIR}`, claudeSkills);
73188
+ fs4.symlinkSync(`../${UNIVERSAL_SKILLS_DIR}`, claudeSkills);
72846
73189
  console.log(`Linked .claude/skills -> ${UNIVERSAL_SKILLS_DIR}`);
72847
73190
  } catch (err) {
72848
73191
  console.warn("Warning: Failed to create symlink:", err);
@@ -72854,10 +73197,10 @@ function resolveLocalDirIfExists(skill, projectRoot) {
72854
73197
  if (source.startsWith("~")) {
72855
73198
  source = source.replace(/^~/, process.env.HOME || "~");
72856
73199
  }
72857
- const abs = path5.isAbsolute(source) ? source : path5.resolve(projectRoot, source);
73200
+ const abs = path6.isAbsolute(source) ? source : path6.resolve(projectRoot, source);
72858
73201
  try {
72859
- if (!fs3.existsSync(abs)) return null;
72860
- if (!fs3.statSync(abs).isDirectory()) return null;
73202
+ if (!fs4.existsSync(abs)) return null;
73203
+ if (!fs4.statSync(abs).isDirectory()) return null;
72861
73204
  return abs;
72862
73205
  } catch {
72863
73206
  return null;
@@ -72867,7 +73210,7 @@ function sourcePathExplicitlyTargetsPrivate(source) {
72867
73210
  return pathContainsPrivateSkills(source);
72868
73211
  }
72869
73212
  function pathContainsPrivateSkills(source) {
72870
- const normalized = path5.normalize(source).replace(/\\/g, "/");
73213
+ const normalized = path6.normalize(source).replace(/\\/g, "/");
72871
73214
  const segments = normalized.split("/").filter(Boolean);
72872
73215
  return segments.includes(PRIVATE_SKILLS_DIRNAME);
72873
73216
  }
@@ -72883,7 +73226,7 @@ function findSkillDirs(rootDir, opts) {
72883
73226
  const walk = (dir) => {
72884
73227
  let entries;
72885
73228
  try {
72886
- entries = fs3.readdirSync(dir, { withFileTypes: true });
73229
+ entries = fs4.readdirSync(dir, { withFileTypes: true });
72887
73230
  } catch {
72888
73231
  return;
72889
73232
  }
@@ -72895,7 +73238,7 @@ function findSkillDirs(rootDir, opts) {
72895
73238
  for (const entry of entries) {
72896
73239
  if (!entry.isDirectory()) continue;
72897
73240
  if (shouldSkipDir(dir, entry.name)) continue;
72898
- walk(path5.join(dir, entry.name));
73241
+ walk(path6.join(dir, entry.name));
72899
73242
  }
72900
73243
  };
72901
73244
  walk(rootDir);
@@ -73188,8 +73531,8 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
73188
73531
  if (untilRaw) params.set("until", untilRaw);
73189
73532
  if (limit) params.set("limit", limit);
73190
73533
  const qs = params.toString();
73191
- const path7 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
73192
- const response = await requestJson(context2, path7);
73534
+ const path8 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
73535
+ const response = await requestJson(context2, path8);
73193
73536
  if (json) {
73194
73537
  outputJson(response, true);
73195
73538
  } else {
@@ -73227,8 +73570,8 @@ ${response.length} transaction(s)`);
73227
73570
  if (untilRaw) params.set("until", untilRaw);
73228
73571
  if (limit) params.set("limit", limit);
73229
73572
  const qs = params.toString();
73230
- const path7 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
73231
- const response = await requestJson(context2, path7);
73573
+ const path8 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
73574
+ const response = await requestJson(context2, path8);
73232
73575
  if (json) {
73233
73576
  outputJson(response, true);
73234
73577
  } else {
@@ -73252,8 +73595,8 @@ ${response.length} record(s)`);
73252
73595
  if (sinceRaw) params.set("since", parseSinceValue4(sinceRaw));
73253
73596
  if (untilRaw) params.set("until", untilRaw);
73254
73597
  const qs = params.toString();
73255
- const path7 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
73256
- const response = await requestJson(context2, path7);
73598
+ const path8 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
73599
+ const response = await requestJson(context2, path8);
73257
73600
  if (json) {
73258
73601
  outputJson(response, true);
73259
73602
  } else {
@@ -73289,8 +73632,8 @@ ${response.length} record(s)`);
73289
73632
  if (limit) params.set("limit", limit);
73290
73633
  if (offset) params.set("offset", offset);
73291
73634
  const query = params.toString();
73292
- const path7 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
73293
- const response = await requestJson(context2, path7);
73635
+ const path8 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
73636
+ const response = await requestJson(context2, path8);
73294
73637
  if (json) {
73295
73638
  outputJson(response, true);
73296
73639
  return;
@@ -73474,11 +73817,11 @@ function resolveAgentsConfigPaths(repoRoot, manifest) {
73474
73817
  function pickString(value) {
73475
73818
  return typeof value === "string" && value.trim().length > 0 ? value : void 0;
73476
73819
  }
73477
- function ensureFileExists(path7, label) {
73478
- if (!(0, import_node_fs11.existsSync)(path7)) {
73479
- throw new Error(`Missing ${label} at ${path7}. Update manifest config_path or add the file.`);
73820
+ function ensureFileExists(path8, label) {
73821
+ if (!(0, import_node_fs11.existsSync)(path8)) {
73822
+ throw new Error(`Missing ${label} at ${path8}. Update manifest config_path or add the file.`);
73480
73823
  }
73481
- return path7;
73824
+ return path8;
73482
73825
  }
73483
73826
  function isLocalApiUrl(apiUrl) {
73484
73827
  try {
@@ -73880,8 +74223,8 @@ function formatAgeSeconds(isoDate) {
73880
74223
  }
73881
74224
 
73882
74225
  // src/commands/init.ts
73883
- var fs4 = __toESM(require("node:fs"));
73884
- var path6 = __toESM(require("node:path"));
74226
+ var fs5 = __toESM(require("node:fs"));
74227
+ var path7 = __toESM(require("node:path"));
73885
74228
  var os3 = __toESM(require("node:os"));
73886
74229
  var import_node_child_process9 = require("node:child_process");
73887
74230
  var DEFAULT_TEMPLATE = "https://github.com/incept5/eve-horizon-starter";
@@ -73891,12 +74234,12 @@ async function handleInit(positionals, flags) {
73891
74234
  const template = getStringFlag(flags, ["template", "t"]) || DEFAULT_TEMPLATE;
73892
74235
  const branch = getStringFlag(flags, ["branch", "b"]) || DEFAULT_BRANCH;
73893
74236
  const skipSkills = Boolean(flags["skip-skills"]);
73894
- const resolvedTarget = path6.resolve(targetDir);
73895
- const targetName = path6.basename(resolvedTarget);
74237
+ const resolvedTarget = path7.resolve(targetDir);
74238
+ const targetName = path7.basename(resolvedTarget);
73896
74239
  const isCurrentDir = targetDir === ".";
73897
74240
  if (isCurrentDir) {
73898
- if (fs4.existsSync(resolvedTarget)) {
73899
- const entries = fs4.readdirSync(resolvedTarget);
74241
+ if (fs5.existsSync(resolvedTarget)) {
74242
+ const entries = fs5.readdirSync(resolvedTarget);
73900
74243
  const nonHiddenEntries = entries.filter((e) => !e.startsWith("."));
73901
74244
  if (nonHiddenEntries.length > 0) {
73902
74245
  throw new Error(
@@ -73906,8 +74249,8 @@ async function handleInit(positionals, flags) {
73906
74249
  }
73907
74250
  }
73908
74251
  } else {
73909
- if (fs4.existsSync(resolvedTarget)) {
73910
- const entries = fs4.readdirSync(resolvedTarget);
74252
+ if (fs5.existsSync(resolvedTarget)) {
74253
+ const entries = fs5.readdirSync(resolvedTarget);
73911
74254
  if (entries.length > 0) {
73912
74255
  throw new Error(
73913
74256
  `Directory '${targetDir}' already exists and is not empty.`
@@ -73919,7 +74262,7 @@ async function handleInit(positionals, flags) {
73919
74262
  console.log(`Template: ${template}`);
73920
74263
  console.log(`Branch: ${branch}`);
73921
74264
  console.log("");
73922
- const tempDir = fs4.mkdtempSync(path6.join(os3.tmpdir(), "eve-init-"));
74265
+ const tempDir = fs5.mkdtempSync(path7.join(os3.tmpdir(), "eve-init-"));
73923
74266
  try {
73924
74267
  console.log("Downloading template...");
73925
74268
  const cloneResult = (0, import_node_child_process9.spawnSync)("git", ["clone", "--depth=1", `--branch=${branch}`, template, tempDir], {
@@ -73932,12 +74275,12 @@ async function handleInit(positionals, flags) {
73932
74275
  ${cloneResult.stderr || cloneResult.stdout}`
73933
74276
  );
73934
74277
  }
73935
- const gitDir = path6.join(tempDir, ".git");
73936
- if (fs4.existsSync(gitDir)) {
73937
- fs4.rmSync(gitDir, { recursive: true, force: true });
74278
+ const gitDir = path7.join(tempDir, ".git");
74279
+ if (fs5.existsSync(gitDir)) {
74280
+ fs5.rmSync(gitDir, { recursive: true, force: true });
73938
74281
  }
73939
- if (!fs4.existsSync(resolvedTarget)) {
73940
- fs4.mkdirSync(resolvedTarget, { recursive: true });
74282
+ if (!fs5.existsSync(resolvedTarget)) {
74283
+ fs5.mkdirSync(resolvedTarget, { recursive: true });
73941
74284
  }
73942
74285
  console.log("Setting up project...");
73943
74286
  copyDirRecursive(tempDir, resolvedTarget);
@@ -73972,38 +74315,38 @@ ${cloneResult.stderr || cloneResult.stdout}`
73972
74315
  console.log(" - Set up your project manifest");
73973
74316
  console.log(" - Help you set up your own Git remote");
73974
74317
  } finally {
73975
- if (fs4.existsSync(tempDir)) {
73976
- fs4.rmSync(tempDir, { recursive: true, force: true });
74318
+ if (fs5.existsSync(tempDir)) {
74319
+ fs5.rmSync(tempDir, { recursive: true, force: true });
73977
74320
  }
73978
74321
  }
73979
74322
  }
73980
74323
  function copyDirRecursive(src, dest) {
73981
- const entries = fs4.readdirSync(src, { withFileTypes: true });
74324
+ const entries = fs5.readdirSync(src, { withFileTypes: true });
73982
74325
  for (const entry of entries) {
73983
- const srcPath = path6.join(src, entry.name);
73984
- const destPath = path6.join(dest, entry.name);
74326
+ const srcPath = path7.join(src, entry.name);
74327
+ const destPath = path7.join(dest, entry.name);
73985
74328
  if (entry.isDirectory()) {
73986
- if (!fs4.existsSync(destPath)) {
73987
- fs4.mkdirSync(destPath, { recursive: true });
74329
+ if (!fs5.existsSync(destPath)) {
74330
+ fs5.mkdirSync(destPath, { recursive: true });
73988
74331
  }
73989
74332
  copyDirRecursive(srcPath, destPath);
73990
74333
  } else if (entry.isSymbolicLink()) {
73991
- const linkTarget = fs4.readlinkSync(srcPath);
73992
- if (!fs4.existsSync(destPath)) {
73993
- fs4.symlinkSync(linkTarget, destPath);
74334
+ const linkTarget = fs5.readlinkSync(srcPath);
74335
+ if (!fs5.existsSync(destPath)) {
74336
+ fs5.symlinkSync(linkTarget, destPath);
73994
74337
  }
73995
74338
  } else {
73996
- fs4.copyFileSync(srcPath, destPath);
74339
+ fs5.copyFileSync(srcPath, destPath);
73997
74340
  }
73998
74341
  }
73999
74342
  }
74000
74343
  function resolveSkillsBinary2() {
74001
74344
  const candidates = [
74002
- path6.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
74003
- path6.resolve(__dirname, "..", "..", ".bin", "skills")
74345
+ path7.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
74346
+ path7.resolve(__dirname, "..", "..", ".bin", "skills")
74004
74347
  ];
74005
74348
  for (const candidate of candidates) {
74006
- if (fs4.existsSync(candidate)) return candidate;
74349
+ if (fs5.existsSync(candidate)) return candidate;
74007
74350
  }
74008
74351
  const result = (0, import_node_child_process9.spawnSync)("which", ["skills"], { encoding: "utf8" });
74009
74352
  if (result.status === 0) return "skills";
@@ -74012,15 +74355,15 @@ function resolveSkillsBinary2() {
74012
74355
  );
74013
74356
  }
74014
74357
  async function installSkills(projectRoot) {
74015
- const skillsTxt = path6.join(projectRoot, "skills.txt");
74016
- if (!fs4.existsSync(skillsTxt)) {
74358
+ const skillsTxt = path7.join(projectRoot, "skills.txt");
74359
+ if (!fs5.existsSync(skillsTxt)) {
74017
74360
  console.log("No skills.txt found, skipping skill installation");
74018
74361
  return;
74019
74362
  }
74020
74363
  const skillsBin = resolveSkillsBinary2();
74021
74364
  const agents = ["claude-code", "codex", "gemini-cli"];
74022
74365
  try {
74023
- const content = fs4.readFileSync(skillsTxt, "utf-8");
74366
+ const content = fs5.readFileSync(skillsTxt, "utf-8");
74024
74367
  const lines = content.split("\n").map((line) => line.split("#")[0].trim()).filter((line) => line.length > 0);
74025
74368
  for (const source of lines) {
74026
74369
  console.log(` Installing: ${source}`);
@@ -74056,45 +74399,45 @@ async function installSkills(projectRoot) {
74056
74399
  }
74057
74400
  }
74058
74401
  function ensureSkillsSymlink2(projectRoot) {
74059
- const agentSkills = path6.join(projectRoot, ".agents", "skills");
74060
- const claudeDir = path6.join(projectRoot, ".claude");
74061
- const claudeSkills = path6.join(claudeDir, "skills");
74062
- if (!fs4.existsSync(agentSkills)) {
74063
- fs4.mkdirSync(agentSkills, { recursive: true });
74402
+ const agentSkills = path7.join(projectRoot, ".agents", "skills");
74403
+ const claudeDir = path7.join(projectRoot, ".claude");
74404
+ const claudeSkills = path7.join(claudeDir, "skills");
74405
+ if (!fs5.existsSync(agentSkills)) {
74406
+ fs5.mkdirSync(agentSkills, { recursive: true });
74064
74407
  }
74065
- if (!fs4.existsSync(claudeDir)) {
74066
- fs4.mkdirSync(claudeDir, { recursive: true });
74408
+ if (!fs5.existsSync(claudeDir)) {
74409
+ fs5.mkdirSync(claudeDir, { recursive: true });
74067
74410
  }
74068
- if (fs4.existsSync(claudeSkills) && !fs4.lstatSync(claudeSkills).isSymbolicLink()) {
74411
+ if (fs5.existsSync(claudeSkills) && !fs5.lstatSync(claudeSkills).isSymbolicLink()) {
74069
74412
  try {
74070
- const stat = fs4.lstatSync(claudeSkills);
74413
+ const stat = fs5.lstatSync(claudeSkills);
74071
74414
  if (stat.isDirectory()) {
74072
- const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
74415
+ const entries = fs5.readdirSync(agentSkills, { withFileTypes: true });
74073
74416
  for (const entry of entries) {
74074
74417
  if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
74075
- const dst = path6.join(claudeSkills, entry.name);
74076
- if (fs4.existsSync(dst)) continue;
74077
- fs4.symlinkSync(path6.join("..", "..", ".agents", "skills", entry.name), dst);
74418
+ const dst = path7.join(claudeSkills, entry.name);
74419
+ if (fs5.existsSync(dst)) continue;
74420
+ fs5.symlinkSync(path7.join("..", "..", ".agents", "skills", entry.name), dst);
74078
74421
  }
74079
74422
  }
74080
74423
  } catch {
74081
74424
  }
74082
74425
  return;
74083
74426
  }
74084
- if (fs4.existsSync(claudeSkills)) {
74085
- const stat = fs4.lstatSync(claudeSkills);
74427
+ if (fs5.existsSync(claudeSkills)) {
74428
+ const stat = fs5.lstatSync(claudeSkills);
74086
74429
  if (stat.isSymbolicLink()) {
74087
- const target = fs4.readlinkSync(claudeSkills);
74430
+ const target = fs5.readlinkSync(claudeSkills);
74088
74431
  if (target === "../.agents/skills" || target === agentSkills) {
74089
74432
  return;
74090
74433
  }
74091
- fs4.unlinkSync(claudeSkills);
74434
+ fs5.unlinkSync(claudeSkills);
74092
74435
  } else {
74093
74436
  return;
74094
74437
  }
74095
74438
  }
74096
74439
  try {
74097
- fs4.symlinkSync("../.agents/skills", claudeSkills);
74440
+ fs5.symlinkSync("../.agents/skills", claudeSkills);
74098
74441
  } catch {
74099
74442
  }
74100
74443
  }
@@ -75929,8 +76272,8 @@ async function handleBindings(action, flags, context2, json) {
75929
76272
  params.set("project_id", projectId);
75930
76273
  }
75931
76274
  const queryString = params.toString();
75932
- const path7 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
75933
- const bindingsResponse = await requestJson(context2, path7);
76275
+ const path8 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
76276
+ const bindingsResponse = await requestJson(context2, path8);
75934
76277
  const bindings = unwrapListResponse(bindingsResponse);
75935
76278
  if (json) {
75936
76279
  outputJson({ data: bindings }, json);
@@ -77170,8 +77513,8 @@ Sync complete: ${parts.join(", ")}`);
77170
77513
  // src/commands/docs.ts
77171
77514
  var import_node_fs17 = require("node:fs");
77172
77515
  var import_node_path17 = require("node:path");
77173
- function encodeDocPathParam(path7) {
77174
- const trimmed = path7.startsWith("/") ? path7.slice(1) : path7;
77516
+ function encodeDocPathParam(path8) {
77517
+ const trimmed = path8.startsWith("/") ? path8.slice(1) : path8;
77175
77518
  return encodeURIComponent(trimmed);
77176
77519
  }
77177
77520
  function parseWhereClause(raw) {
@@ -78203,8 +78546,8 @@ function normalizeManagedModelRows(payload) {
78203
78546
  function looksLikeGatewayPath(baseUrl) {
78204
78547
  try {
78205
78548
  const parsed = new URL(baseUrl);
78206
- const path7 = parsed.pathname.toLowerCase();
78207
- return path7.includes("/inference/v1") || path7.endsWith("/v1");
78549
+ const path8 = parsed.pathname.toLowerCase();
78550
+ return path8.includes("/inference/v1") || path8.endsWith("/v1");
78208
78551
  } catch {
78209
78552
  return false;
78210
78553
  }
@@ -79542,10 +79885,10 @@ async function fetchRegistryTags(imageRef) {
79542
79885
  if (slashIndex < 0) {
79543
79886
  throw new Error(`Invalid image reference '${imageRef}'.`);
79544
79887
  }
79545
- const registry = imageRef.slice(0, slashIndex);
79888
+ const registry2 = imageRef.slice(0, slashIndex);
79546
79889
  const repository = imageRef.slice(slashIndex + 1);
79547
79890
  const tagsPayload = await fetchText(
79548
- `https://${registry}/v2/${repository}/tags/list?n=200`
79891
+ `https://${registry2}/v2/${repository}/tags/list?n=200`
79549
79892
  );
79550
79893
  return JSON.parse(tagsPayload).tags ?? [];
79551
79894
  }
@@ -79996,11 +80339,11 @@ function ensureTool(name, installHint) {
79996
80339
  }
79997
80340
  }
79998
80341
  function requireToolPath(name, hint) {
79999
- const path7 = findExecutable(name);
80000
- if (!path7) {
80342
+ const path8 = findExecutable(name);
80343
+ if (!path8) {
80001
80344
  throw new Error(`Missing required tool '${name}'. ${hint}`);
80002
80345
  }
80003
- return path7;
80346
+ return path8;
80004
80347
  }
80005
80348
  function assertDockerRunning() {
80006
80349
  const docker = findExecutable("docker");