@eve-horizon/cli 0.2.34 → 0.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +843 -474
  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;
@@ -9811,8 +9811,8 @@ var require_sync = __commonJS({
9811
9811
  }
9812
9812
  return x;
9813
9813
  };
9814
- var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync23, pkgfile) {
9815
- var body = readFileSync23(pkgfile);
9814
+ var defaultReadPackageSync = function defaultReadPackageSync2(readFileSync24, pkgfile) {
9815
+ var body = readFileSync24(pkgfile);
9816
9816
  try {
9817
9817
  var pkg = JSON.parse(body);
9818
9818
  return pkg;
@@ -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 readFileSync23 = 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,11 +9885,11 @@ 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
- var pkg = readPackageSync(readFileSync23, pkgfile);
9892
+ var pkg = readPackageSync(readFileSync24, pkgfile);
9893
9893
  if (pkg && opts.packageFilter) {
9894
9894
  pkg = opts.packageFilter(
9895
9895
  pkg,
@@ -9900,10 +9900,10 @@ 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
- var pkg = readPackageSync(readFileSync23, pkgfile);
9906
+ var pkg = readPackageSync(readFileSync24, pkgfile);
9907
9907
  } catch (e) {
9908
9908
  }
9909
9909
  if (pkg && opts.packageFilter) {
@@ -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
  }
@@ -49514,7 +49514,7 @@ and switching profiles won't affect other checkouts.`,
49514
49514
  auth: {
49515
49515
  description: `Authenticate with Eve Horizon. Auth is optional for local development but required
49516
49516
  for cloud deployments. Credentials are stored globally per API URL.`,
49517
- usage: "eve auth <login|logout|status|whoami|bootstrap|sync|creds|token|mint|permissions>",
49517
+ usage: "eve auth <login|logout|status|whoami|bootstrap|sync|creds|token|mint|permissions|request-access>",
49518
49518
  subcommands: {
49519
49519
  login: {
49520
49520
  description: "Login via GitHub SSH challenge (default) or Supabase (legacy)",
@@ -49642,6 +49642,24 @@ for cloud deployments. Credentials are stored globally per API URL.`,
49642
49642
  "eve auth permissions",
49643
49643
  "eve auth permissions --json"
49644
49644
  ]
49645
+ },
49646
+ "request-access": {
49647
+ description: "Self-service access request \u2014 submit your SSH key and wait for admin approval",
49648
+ usage: 'eve auth request-access --org "<org name>" [--ssh-key <path>] [--email <email>] [--wait]',
49649
+ options: [
49650
+ "--org <name> Organization to request access to (required)",
49651
+ "--org-slug <slug> Preferred org slug",
49652
+ "--ssh-key <path> Path to SSH public key (default: ~/.ssh/id_ed25519.pub)",
49653
+ "--email <email> Contact email",
49654
+ "--nostr-pubkey <hex> Nostr public key (alternative to SSH)",
49655
+ "--wait Poll until approved, then auto-login",
49656
+ "--status <id> Check status of an existing request"
49657
+ ],
49658
+ examples: [
49659
+ 'eve auth request-access --org "Acme Corp" --ssh-key ~/.ssh/id_ed25519.pub --wait',
49660
+ 'eve auth request-access --org "Acme Corp" --email user@example.com --wait',
49661
+ "eve auth request-access --status <request_id>"
49662
+ ]
49645
49663
  }
49646
49664
  }
49647
49665
  },
@@ -50293,17 +50311,40 @@ for cloud deployments. Credentials are stored globally per API URL.`,
50293
50311
  usage: "eve admin <subcommand> [options]",
50294
50312
  subcommands: {
50295
50313
  invite: {
50296
- description: "Invite a user by registering their GitHub SSH keys and adding them to an org",
50297
- usage: "eve admin invite --email <email> [--github <username>] [--role <role>] [--org <org_id>]",
50314
+ description: "Invite a user by registering their SSH keys (from GitHub or a local file) and adding them to an org",
50315
+ usage: "eve admin invite --email <email> [--github <username>] [--ssh-key <path>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]",
50298
50316
  options: [
50299
50317
  "--email <email> User email address (required)",
50300
50318
  "--github <username> GitHub username to fetch SSH keys from",
50319
+ "--ssh-key <path> Path to an SSH public key file to register",
50301
50320
  "--role <role> Org role: owner, admin, member (default: member)",
50302
- "--org <org_id> Organization to add user to"
50321
+ "--org <org_id> Organization to add user to",
50322
+ "--web Send a Supabase Auth invite email",
50323
+ "--redirect-to <url> Redirect URL after web login",
50324
+ "",
50325
+ "At least one auth method (--github, --ssh-key, or --web) is recommended.",
50326
+ 'Users can also self-register: eve auth request-access --org "Org" --ssh-key ~/.ssh/id_ed25519.pub --wait'
50303
50327
  ],
50304
50328
  examples: [
50305
50329
  "eve admin invite --email user@example.com --github octocat",
50306
- "eve admin invite --email user@example.com --github octocat --role admin --org org_xxx"
50330
+ "eve admin invite --email user@example.com --ssh-key ~/.ssh/id_ed25519.pub --org org_xxx",
50331
+ "eve admin invite --email user@example.com --github octocat --role admin --org org_xxx",
50332
+ "eve admin invite --email user@example.com --web --redirect-to https://app.example.com"
50333
+ ]
50334
+ },
50335
+ "access-requests": {
50336
+ description: "Review, approve, or reject self-service access requests",
50337
+ usage: 'eve admin access-requests [approve|reject <id>] [--reason "..."]',
50338
+ options: [
50339
+ "(no action) List pending access requests",
50340
+ "approve <id> Approve a request (creates user, org membership, and identity)",
50341
+ "reject <id> Reject a request",
50342
+ '--reason "<text>" Note to attach to approval/rejection'
50343
+ ],
50344
+ examples: [
50345
+ "eve admin access-requests",
50346
+ "eve admin access-requests approve ar_xxx",
50347
+ 'eve admin access-requests reject ar_xxx --reason "Unknown user"'
50307
50348
  ]
50308
50349
  },
50309
50350
  "ingress-aliases": {
@@ -50321,7 +50362,9 @@ for cloud deployments. Credentials are stored globally per API URL.`,
50321
50362
  },
50322
50363
  examples: [
50323
50364
  "eve admin invite --email user@example.com --github octocat",
50324
- "eve admin invite --email user@example.com --github octocat --org org_xxx",
50365
+ "eve admin invite --email user@example.com --ssh-key ~/.ssh/id_ed25519.pub --org org_xxx",
50366
+ "eve admin access-requests",
50367
+ "eve admin access-requests approve ar_xxx",
50325
50368
  "eve admin ingress-aliases list"
50326
50369
  ]
50327
50370
  },
@@ -51425,8 +51468,8 @@ function showSubcommandHelp(command, subcommand) {
51425
51468
  }
51426
51469
 
51427
51470
  // src/lib/client.ts
51428
- async function requestJson(context2, path7, options = {}) {
51429
- const response = await requestRaw(context2, path7, options);
51471
+ async function requestJson(context2, path8, options = {}) {
51472
+ const response = await requestRaw(context2, path8, options);
51430
51473
  const method = options.method ?? "GET";
51431
51474
  if (response.status === 401 && options.tokenOverride === void 0) {
51432
51475
  const refreshed = await attemptRefresh(context2);
@@ -51434,20 +51477,20 @@ async function requestJson(context2, path7, options = {}) {
51434
51477
  context2.token = refreshed.access_token;
51435
51478
  context2.refreshToken = refreshed.refresh_token;
51436
51479
  context2.expiresAt = refreshed.expires_at;
51437
- const retry = await requestRaw(context2, path7, {
51480
+ const retry = await requestRaw(context2, path8, {
51438
51481
  ...options,
51439
51482
  tokenOverride: refreshed.access_token
51440
51483
  });
51441
51484
  if (!retry.ok && !options.allowError) {
51442
51485
  const message = formatErrorMessage(retry);
51443
- throw new Error(`HTTP ${retry.status}: ${method} ${path7}: ${message}`);
51486
+ throw new Error(`HTTP ${retry.status}: ${method} ${path8}: ${message}`);
51444
51487
  }
51445
51488
  return retry.data;
51446
51489
  }
51447
51490
  }
51448
51491
  if (!response.ok && !options.allowError) {
51449
51492
  const message = formatErrorMessage(response);
51450
- const requestTarget = `${method} ${path7}`;
51493
+ const requestTarget = `${method} ${path8}`;
51451
51494
  const requestFailedContext = `while calling ${requestTarget}: ${message}`;
51452
51495
  if ((response.status === 404 || response.status === 500) && message.includes("Project not found")) {
51453
51496
  const projectIdMatch = message.match(/Project not found: (proj_[a-z0-9]+)/);
@@ -51479,7 +51522,7 @@ function unwrapListResponse(value) {
51479
51522
  }
51480
51523
  throw new Error("Expected list response envelope with data[]");
51481
51524
  }
51482
- async function requestRaw(context2, path7, options = {}) {
51525
+ async function requestRaw(context2, path8, options = {}) {
51483
51526
  const headers = {
51484
51527
  ...options.headers
51485
51528
  };
@@ -51490,7 +51533,7 @@ async function requestRaw(context2, path7, options = {}) {
51490
51533
  if (token) {
51491
51534
  headers.Authorization = `Bearer ${token}`;
51492
51535
  }
51493
- const url = `${context2.apiUrl}${path7}`;
51536
+ const url = `${context2.apiUrl}${path8}`;
51494
51537
  const method = options.method ?? "GET";
51495
51538
  let response;
51496
51539
  try {
@@ -52346,7 +52389,7 @@ function buildQuery2(params) {
52346
52389
  }
52347
52390
 
52348
52391
  // src/commands/job.ts
52349
- var import_child_process = require("child_process");
52392
+ var import_child_process2 = require("child_process");
52350
52393
  var import_fs = require("fs");
52351
52394
  var import_path = require("path");
52352
52395
 
@@ -52828,8 +52871,8 @@ function getErrorMap() {
52828
52871
 
52829
52872
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
52830
52873
  var makeIssue = (params) => {
52831
- const { data, path: path7, errorMaps, issueData } = params;
52832
- const fullPath = [...path7, ...issueData.path || []];
52874
+ const { data, path: path8, errorMaps, issueData } = params;
52875
+ const fullPath = [...path8, ...issueData.path || []];
52833
52876
  const fullIssue = {
52834
52877
  ...issueData,
52835
52878
  path: fullPath
@@ -52945,11 +52988,11 @@ var errorUtil;
52945
52988
 
52946
52989
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
52947
52990
  var ParseInputLazyPath = class {
52948
- constructor(parent, value, path7, key) {
52991
+ constructor(parent, value, path8, key) {
52949
52992
  this._cachedPath = [];
52950
52993
  this.parent = parent;
52951
52994
  this.data = value;
52952
- this._path = path7;
52995
+ this._path = path8;
52953
52996
  this._key = key;
52954
52997
  }
52955
52998
  get path() {
@@ -56493,6 +56536,81 @@ var configSchema = external_exports.object({
56493
56536
  ZAI_MODEL: external_exports.string().optional()
56494
56537
  });
56495
56538
 
56539
+ // ../shared/dist/harnesses/config.js
56540
+ var fs = __toESM(require("node:fs"), 1);
56541
+ var path = __toESM(require("node:path"), 1);
56542
+ function resolveHarnessConfigRoot(options) {
56543
+ const env = options.env ?? process.env;
56544
+ const envRoot = env.EVE_HARNESS_CONFIG_ROOT;
56545
+ if (envRoot) {
56546
+ return { root: path.join(envRoot, options.harness), source: "env" };
56547
+ }
56548
+ const repoPath = options.repoPath ?? process.cwd();
56549
+ return {
56550
+ root: path.join(repoPath, ".agent", "harnesses", options.harness),
56551
+ source: options.repoPath ? "repo" : "default"
56552
+ };
56553
+ }
56554
+ function resolveHarnessConfig(options) {
56555
+ const { root, source } = resolveHarnessConfigRoot(options);
56556
+ if (!options.variant) {
56557
+ return {
56558
+ configDir: root,
56559
+ baseDir: root,
56560
+ hasVariant: false,
56561
+ source
56562
+ };
56563
+ }
56564
+ const variantDir = path.join(root, "variants", options.variant);
56565
+ const hasVariant = fs.existsSync(variantDir);
56566
+ return {
56567
+ configDir: hasVariant ? variantDir : root,
56568
+ baseDir: root,
56569
+ hasVariant,
56570
+ source
56571
+ };
56572
+ }
56573
+ function resolveClaudeConfigDir(harness, variant, options) {
56574
+ const env = options?.env ?? process.env;
56575
+ const existing = env.CLAUDE_CONFIG_DIR;
56576
+ if (existing) {
56577
+ if (!variant)
56578
+ return existing;
56579
+ const normalized = existing.replace(/\/+$/, "");
56580
+ const marker = `${path.sep}variants${path.sep}`;
56581
+ if (normalized.includes(marker)) {
56582
+ return existing;
56583
+ }
56584
+ return path.join(normalized, "variants", variant);
56585
+ }
56586
+ return resolveHarnessConfig({
56587
+ harness,
56588
+ variant,
56589
+ repoPath: options?.repoPath,
56590
+ env
56591
+ }).configDir;
56592
+ }
56593
+ function resolveCodeConfigDir(harness, variant, options) {
56594
+ const env = options?.env ?? process.env;
56595
+ const existing = env.CODEX_HOME;
56596
+ if (existing) {
56597
+ if (!variant)
56598
+ return existing;
56599
+ const normalized = existing.replace(/\/+$/, "");
56600
+ const marker = `${path.sep}variants${path.sep}`;
56601
+ if (normalized.includes(marker)) {
56602
+ return existing;
56603
+ }
56604
+ return path.join(normalized, "variants", variant);
56605
+ }
56606
+ return resolveHarnessConfig({
56607
+ harness,
56608
+ variant,
56609
+ repoPath: options?.repoPath,
56610
+ env
56611
+ }).configDir;
56612
+ }
56613
+
56496
56614
  // ../shared/dist/harnesses/auth.js
56497
56615
  var import_node_child_process2 = require("node:child_process");
56498
56616
  var import_node_fs4 = require("node:fs");
@@ -56683,6 +56801,207 @@ var HARNESS_CAPABILITIES = {
56683
56801
  }
56684
56802
  };
56685
56803
 
56804
+ // ../shared/dist/harnesses/adapters/reasoning.js
56805
+ var CLAUDE_THINKING_TOKENS = {
56806
+ low: "1024",
56807
+ medium: "8192",
56808
+ high: "16000",
56809
+ "x-high": "32000"
56810
+ };
56811
+ var CODE_REASONING_MAP = {
56812
+ low: "low",
56813
+ medium: "medium",
56814
+ high: "high",
56815
+ "x-high": "xhigh"
56816
+ };
56817
+ function mapReasoningEffort(harness, effort) {
56818
+ if (!effort)
56819
+ return void 0;
56820
+ if (!["low", "medium", "high", "x-high"].includes(effort))
56821
+ return void 0;
56822
+ if (harness === "mclaude" || harness === "claude" || harness === "zai") {
56823
+ return CLAUDE_THINKING_TOKENS[effort];
56824
+ }
56825
+ if (harness === "code" || harness === "coder" || harness === "codex") {
56826
+ return CODE_REASONING_MAP[effort];
56827
+ }
56828
+ if (harness === "gemini") {
56829
+ return effort;
56830
+ }
56831
+ return void 0;
56832
+ }
56833
+
56834
+ // ../shared/dist/harnesses/adapters/claude.js
56835
+ var claudeAdapter = {
56836
+ name: "claude",
56837
+ buildOptions: async (ctx) => {
56838
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.CLAUDE_MODEL || "opus");
56839
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56840
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56841
+ const configDir = resolveClaudeConfigDir("claude", variant, {
56842
+ repoPath: ctx.repoPath,
56843
+ env: ctx.env
56844
+ });
56845
+ const auth = await ctx.helpers.resolveMclaudeAuth({ configDir });
56846
+ return {
56847
+ harness: ctx.harness,
56848
+ permission: ctx.permission,
56849
+ variant,
56850
+ model,
56851
+ reasoning,
56852
+ env: {
56853
+ ...auth.env,
56854
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL,
56855
+ CLAUDE_CONFIG_DIR: configDir
56856
+ }
56857
+ };
56858
+ }
56859
+ };
56860
+
56861
+ // ../shared/dist/harnesses/adapters/mclaude.js
56862
+ var mclaudeAdapter = {
56863
+ name: "mclaude",
56864
+ buildOptions: async (ctx) => {
56865
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.CLAUDE_MODEL || "opus");
56866
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56867
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56868
+ const configDir = resolveClaudeConfigDir("mclaude", variant, {
56869
+ repoPath: ctx.repoPath,
56870
+ env: ctx.env
56871
+ });
56872
+ const auth = await ctx.helpers.resolveMclaudeAuth({ configDir });
56873
+ return {
56874
+ harness: ctx.harness,
56875
+ permission: ctx.permission,
56876
+ variant,
56877
+ model,
56878
+ reasoning,
56879
+ env: {
56880
+ ...auth.env,
56881
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL,
56882
+ CLAUDE_CONFIG_DIR: configDir
56883
+ }
56884
+ };
56885
+ }
56886
+ };
56887
+
56888
+ // ../shared/dist/harnesses/adapters/zai.js
56889
+ var zaiAdapter = {
56890
+ name: "zai",
56891
+ buildOptions: async (ctx) => {
56892
+ const apiKey = ctx.env.Z_AI_API_KEY ?? ctx.env.ZAI_API_KEY;
56893
+ if (!apiKey) {
56894
+ throw new Error("Zai harness requires Z_AI_API_KEY environment variable");
56895
+ }
56896
+ const model = ctx.invocation.harness_options?.model ?? (ctx.env.ZAI_MODEL || ctx.env.CLAUDE_MODEL);
56897
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56898
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56899
+ const configDir = resolveClaudeConfigDir("zai", variant, {
56900
+ repoPath: ctx.repoPath,
56901
+ env: ctx.env
56902
+ });
56903
+ return {
56904
+ harness: ctx.harness,
56905
+ permission: ctx.permission,
56906
+ variant,
56907
+ model,
56908
+ reasoning,
56909
+ env: {
56910
+ Z_AI_API_KEY: apiKey,
56911
+ Z_AI_BASE_URL: ctx.env.Z_AI_BASE_URL,
56912
+ ANTHROPIC_BASE_URL: ctx.env.ANTHROPIC_BASE_URL ?? ctx.env.Z_AI_BASE_URL,
56913
+ // Claude Code reads ANTHROPIC_API_KEY - use Z_AI_API_KEY for zai provider
56914
+ ANTHROPIC_API_KEY: apiKey,
56915
+ CLAUDE_CONFIG_DIR: configDir
56916
+ }
56917
+ };
56918
+ }
56919
+ };
56920
+
56921
+ // ../shared/dist/harnesses/adapters/gemini.js
56922
+ var geminiAdapter = {
56923
+ name: "gemini",
56924
+ buildOptions: async (ctx) => ({
56925
+ harness: ctx.harness,
56926
+ permission: ctx.permission,
56927
+ variant: ctx.invocation.harness_options?.variant ?? ctx.invocation.variant,
56928
+ model: ctx.invocation.harness_options?.model,
56929
+ reasoning: mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort)
56930
+ })
56931
+ };
56932
+
56933
+ // ../shared/dist/harnesses/adapters/code.js
56934
+ var codeAdapter = {
56935
+ name: "code",
56936
+ aliases: ["coder"],
56937
+ buildOptions: async (ctx) => {
56938
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56939
+ const model = ctx.invocation.harness_options?.model;
56940
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56941
+ const configDir = resolveCodeConfigDir("code", variant, {
56942
+ repoPath: ctx.repoPath,
56943
+ env: ctx.env
56944
+ });
56945
+ const auth = await ctx.helpers.resolveCodeAuth({ configDir });
56946
+ return {
56947
+ harness: ctx.harness,
56948
+ permission: ctx.permission,
56949
+ variant,
56950
+ model,
56951
+ reasoning,
56952
+ env: {
56953
+ ...auth.env,
56954
+ CODEX_HOME: configDir
56955
+ }
56956
+ };
56957
+ }
56958
+ };
56959
+
56960
+ // ../shared/dist/harnesses/adapters/codex.js
56961
+ var codexAdapter = {
56962
+ name: "codex",
56963
+ buildOptions: async (ctx) => {
56964
+ const variant = ctx.invocation.harness_options?.variant ?? ctx.invocation.variant;
56965
+ const model = ctx.invocation.harness_options?.model;
56966
+ const reasoning = mapReasoningEffort(ctx.harness, ctx.invocation.harness_options?.reasoning_effort);
56967
+ const configDir = resolveCodeConfigDir("codex", variant, {
56968
+ repoPath: ctx.repoPath,
56969
+ env: ctx.env
56970
+ });
56971
+ const auth = await ctx.helpers.resolveCodeAuth({ configDir });
56972
+ return {
56973
+ harness: ctx.harness,
56974
+ permission: ctx.permission,
56975
+ variant,
56976
+ model,
56977
+ reasoning,
56978
+ env: {
56979
+ ...auth.env,
56980
+ CODEX_HOME: configDir
56981
+ }
56982
+ };
56983
+ }
56984
+ };
56985
+
56986
+ // ../shared/dist/harnesses/adapters/index.js
56987
+ var adapters = [
56988
+ claudeAdapter,
56989
+ mclaudeAdapter,
56990
+ zaiAdapter,
56991
+ geminiAdapter,
56992
+ codeAdapter,
56993
+ codexAdapter
56994
+ ];
56995
+ var registry = /* @__PURE__ */ new Map();
56996
+ for (const adapter of adapters) {
56997
+ registry.set(adapter.name, adapter);
56998
+ if (adapter.aliases) {
56999
+ for (const alias of adapter.aliases) {
57000
+ registry.set(alias, adapter);
57001
+ }
57002
+ }
57003
+ }
57004
+
56686
57005
  // ../shared/dist/types/job.js
56687
57006
  var JobStatus;
56688
57007
  (function(JobStatus2) {
@@ -57425,7 +57744,8 @@ var AuthStatusResponseSchema = external_exports.object({
57425
57744
  is_admin: external_exports.boolean().optional(),
57426
57745
  is_job_token: external_exports.boolean().optional(),
57427
57746
  is_service_principal: external_exports.boolean().optional(),
57428
- permissions: external_exports.array(external_exports.string()).optional()
57747
+ permissions: external_exports.array(external_exports.string()).optional(),
57748
+ memberships: external_exports.array(external_exports.object({ org_id: external_exports.string(), role: external_exports.string() })).optional()
57429
57749
  });
57430
57750
  var AuthChallengeRequestSchema = external_exports.object({
57431
57751
  provider: external_exports.enum(["github_ssh", "nostr"]).default("github_ssh"),
@@ -59783,23 +60103,23 @@ var correlationStorage = new import_async_hooks.AsyncLocalStorage();
59783
60103
  var import_auto_instrumentations_node = __toESM(require_src57(), 1);
59784
60104
 
59785
60105
  // ../shared/dist/lib/pack-resolver.js
59786
- var fs = __toESM(require("node:fs"), 1);
59787
- var path2 = __toESM(require("node:path"), 1);
60106
+ var fs2 = __toESM(require("node:fs"), 1);
60107
+ var path3 = __toESM(require("node:path"), 1);
59788
60108
  var os = __toESM(require("node:os"), 1);
59789
60109
  var import_node_child_process3 = require("node:child_process");
59790
60110
  var import_yaml2 = require("yaml");
59791
- var CACHE_ROOT = path2.join(os.homedir(), ".eve", "cache", "packs");
60111
+ var CACHE_ROOT = path3.join(os.homedir(), ".eve", "cache", "packs");
59792
60112
  async function resolvePack(entry, projectSlug, repoRoot) {
59793
60113
  const packDir = await fetchPackSource(entry, repoRoot);
59794
- const packYamlPath = path2.join(packDir, "eve", "pack.yaml");
59795
- const eveDir = path2.join(packDir, "eve");
59796
- if (fs.existsSync(packYamlPath)) {
59797
- const raw = fs.readFileSync(packYamlPath, "utf-8");
60114
+ const packYamlPath = path3.join(packDir, "eve", "pack.yaml");
60115
+ const eveDir = path3.join(packDir, "eve");
60116
+ if (fs2.existsSync(packYamlPath)) {
60117
+ const raw = fs2.readFileSync(packYamlPath, "utf-8");
59798
60118
  const parsed = PackYamlSchema.parse((0, import_yaml2.parse)(raw));
59799
- const agents = loadYamlMap(path2.join(packDir, parsed.imports.agents));
59800
- const teams = loadYamlMap(path2.join(packDir, parsed.imports.teams));
59801
- const chat = parsed.imports.chat ? loadYamlMap(path2.join(packDir, parsed.imports.chat)) : null;
59802
- const xEve = parsed.imports.x_eve ? loadYamlMap(path2.join(packDir, parsed.imports.x_eve)) : null;
60119
+ const agents = loadYamlMap(path3.join(packDir, parsed.imports.agents));
60120
+ const teams = loadYamlMap(path3.join(packDir, parsed.imports.teams));
60121
+ const chat = parsed.imports.chat ? loadYamlMap(path3.join(packDir, parsed.imports.chat)) : null;
60122
+ const xEve = parsed.imports.x_eve ? loadYamlMap(path3.join(packDir, parsed.imports.x_eve)) : null;
59803
60123
  const prefixedAgents = prefixAgentSlugs(agents, projectSlug);
59804
60124
  const packDefaultPolicy = parsed.gateway?.default_policy ?? "none";
59805
60125
  const gatewayResolvedAgents = resolveAgentGatewayPolicies(prefixedAgents, packDefaultPolicy);
@@ -59815,12 +60135,12 @@ async function resolvePack(entry, projectSlug, repoRoot) {
59815
60135
  skillPaths: skillPaths2
59816
60136
  };
59817
60137
  }
59818
- if (fs.existsSync(eveDir)) {
60138
+ if (fs2.existsSync(eveDir)) {
59819
60139
  throw new Error(`Pack "${entry.source}" has eve/ directory but no pack.yaml. Add eve/pack.yaml or remove the eve/ directory.`);
59820
60140
  }
59821
60141
  const skillPaths = discoverSkillPaths(packDir);
59822
60142
  return {
59823
- id: path2.basename(packDir),
60143
+ id: path3.basename(packDir),
59824
60144
  source: entry.source,
59825
60145
  ref: entry.ref ?? resolveLocalRef(packDir),
59826
60146
  agents: {},
@@ -59834,8 +60154,8 @@ async function fetchPackSource(entry, repoRoot) {
59834
60154
  const { source, ref } = entry;
59835
60155
  if (source.startsWith("./") || source.startsWith("../") || source.startsWith("/")) {
59836
60156
  const base = repoRoot ?? process.cwd();
59837
- const resolved = path2.resolve(base, source);
59838
- if (!fs.existsSync(resolved)) {
60157
+ const resolved = path3.resolve(base, source);
60158
+ if (!fs2.existsSync(resolved)) {
59839
60159
  throw new Error(`Local pack source not found: ${resolved}`);
59840
60160
  }
59841
60161
  return resolved;
@@ -59843,17 +60163,17 @@ async function fetchPackSource(entry, repoRoot) {
59843
60163
  if (!ref) {
59844
60164
  throw new Error(`Remote pack source "${source}" requires a ref (40-char SHA)`);
59845
60165
  }
59846
- const cacheDir = path2.join(CACHE_ROOT, ref);
59847
- if (fs.existsSync(cacheDir)) {
60166
+ const cacheDir = path3.join(CACHE_ROOT, ref);
60167
+ if (fs2.existsSync(cacheDir)) {
59848
60168
  return cacheDir;
59849
60169
  }
59850
- fs.mkdirSync(cacheDir, { recursive: true });
60170
+ fs2.mkdirSync(cacheDir, { recursive: true });
59851
60171
  try {
59852
60172
  const gitUrl = resolveGitUrl(source);
59853
60173
  (0, import_node_child_process3.execSync)(`git clone --depth 1 ${JSON.stringify(gitUrl)} ${JSON.stringify(cacheDir)}`, { stdio: "pipe", timeout: 6e4 });
59854
60174
  (0, import_node_child_process3.execSync)(`git -C ${JSON.stringify(cacheDir)} checkout ${ref}`, { stdio: "pipe", timeout: 3e4 });
59855
60175
  } catch (err) {
59856
- fs.rmSync(cacheDir, { recursive: true, force: true });
60176
+ fs2.rmSync(cacheDir, { recursive: true, force: true });
59857
60177
  throw new Error(`Failed to clone pack "${source}" at ref ${ref}: ${err}`);
59858
60178
  }
59859
60179
  return cacheDir;
@@ -59871,10 +60191,10 @@ function resolveGitUrl(source) {
59871
60191
  return source;
59872
60192
  }
59873
60193
  function loadYamlMap(filePath) {
59874
- if (!fs.existsSync(filePath)) {
60194
+ if (!fs2.existsSync(filePath)) {
59875
60195
  throw new Error(`Pack import file not found: ${filePath}`);
59876
60196
  }
59877
- const raw = fs.readFileSync(filePath, "utf-8");
60197
+ const raw = fs2.readFileSync(filePath, "utf-8");
59878
60198
  const parsed = (0, import_yaml2.parse)(raw);
59879
60199
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
59880
60200
  throw new Error(`Pack import file must be a YAML map: ${filePath}`);
@@ -59940,16 +60260,16 @@ function resolveAgentGatewayPolicies(agentsConfig, packDefaultPolicy) {
59940
60260
  }
59941
60261
  function discoverSkillPaths(packDir) {
59942
60262
  const paths = [];
59943
- const skillsDir = path2.join(packDir, "skills");
59944
- if (!fs.existsSync(skillsDir)) {
60263
+ const skillsDir = path3.join(packDir, "skills");
60264
+ if (!fs2.existsSync(skillsDir)) {
59945
60265
  return paths;
59946
60266
  }
59947
60267
  const walk = (dir) => {
59948
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
60268
+ for (const entry of fs2.readdirSync(dir, { withFileTypes: true })) {
59949
60269
  if (!entry.isDirectory() || entry.name.startsWith("."))
59950
60270
  continue;
59951
- const fullPath = path2.join(dir, entry.name);
59952
- if (fs.existsSync(path2.join(fullPath, "SKILL.md"))) {
60271
+ const fullPath = path3.join(dir, entry.name);
60272
+ if (fs2.existsSync(path3.join(fullPath, "SKILL.md"))) {
59953
60273
  paths.push(fullPath);
59954
60274
  }
59955
60275
  walk(fullPath);
@@ -60038,10 +60358,10 @@ function mergeXEve(packFragments, projectXEve) {
60038
60358
  // ../shared/dist/lib/resource-uris.js
60039
60359
  var ORG_DOCS_PREFIX = "org_docs:/";
60040
60360
  var JOB_ATTACHMENTS_PREFIX = "job_attachments:/";
60041
- function normalizeOrgDocPath(path7) {
60042
- if (!path7)
60361
+ function normalizeOrgDocPath(path8) {
60362
+ if (!path8)
60043
60363
  return "/";
60044
- return path7.startsWith("/") ? path7 : `/${path7}`;
60364
+ return path8.startsWith("/") ? path8 : `/${path8}`;
60045
60365
  }
60046
60366
  function parseResourceUri(uri) {
60047
60367
  if (!uri || typeof uri !== "string")
@@ -60052,11 +60372,11 @@ function parseResourceUri(uri) {
60052
60372
  return null;
60053
60373
  const match = raw.match(/^(.*)@v(\d+)$/);
60054
60374
  if (match) {
60055
- const path7 = normalizeOrgDocPath(match[1]);
60375
+ const path8 = normalizeOrgDocPath(match[1]);
60056
60376
  const version2 = Number(match[2]);
60057
60377
  if (!Number.isFinite(version2) || version2 <= 0)
60058
60378
  return null;
60059
- return { scheme: "org_docs", path: path7, version: version2 };
60379
+ return { scheme: "org_docs", path: path8, version: version2 };
60060
60380
  }
60061
60381
  return { scheme: "org_docs", path: normalizeOrgDocPath(raw) };
60062
60382
  }
@@ -61863,6 +62183,11 @@ var ALL_PERMISSIONS = [
61863
62183
  ];
61864
62184
  var PERMISSION_SET = new Set(ALL_PERMISSIONS);
61865
62185
 
62186
+ // ../shared/dist/git/git-workspace.js
62187
+ var import_child_process = require("child_process");
62188
+ var import_util4 = require("util");
62189
+ var execFileAsync = (0, import_util4.promisify)(import_child_process.execFile);
62190
+
61866
62191
  // src/commands/job.ts
61867
62192
  async function handleJob(subcommand, positionals, flags, context2) {
61868
62193
  const json = Boolean(flags.json);
@@ -64451,7 +64776,7 @@ async function handleRunnerLogs(positionals, flags, context2) {
64451
64776
  console.log(`No pod_name in runtime_meta, using label selector: job-id=${jobId}`);
64452
64777
  kubectlArgs = ["-n", "eve", "logs", "-f", "-l", `job-id=${jobId}`];
64453
64778
  }
64454
- const kubectl = (0, import_child_process.spawn)("kubectl", kubectlArgs, {
64779
+ const kubectl = (0, import_child_process2.spawn)("kubectl", kubectlArgs, {
64455
64780
  stdio: "inherit"
64456
64781
  });
64457
64782
  return new Promise((resolve8, reject) => {
@@ -64930,8 +65255,21 @@ async function handleAuth(subcommand, flags, context2, credentials) {
64930
65255
  }
64931
65256
  if (!json && data.permissions && data.permissions.length > 0) {
64932
65257
  console.log(`User: ${data.user_id ?? "unknown"} (${data.email ?? "no email"})`);
64933
- console.log(`Role: ${data.role ?? "member"}`);
65258
+ let displayRole = data.role ?? "member";
65259
+ if (context2.orgId && data.memberships?.length) {
65260
+ const match = data.memberships.find((m) => m.org_id === context2.orgId);
65261
+ if (match) displayRole = match.role;
65262
+ }
65263
+ console.log(`Role: ${displayRole}`);
64934
65264
  console.log(`Admin: ${data.is_admin ?? false}`);
65265
+ if (context2.orgId && data.memberships?.length) {
65266
+ console.log(`
65267
+ Org memberships:`);
65268
+ for (const m of data.memberships) {
65269
+ const marker = m.org_id === context2.orgId ? " (active)" : "";
65270
+ console.log(` ${m.org_id}: ${m.role}${marker}`);
65271
+ }
65272
+ }
64935
65273
  console.log(`
64936
65274
  Permissions (${data.permissions.length}):`);
64937
65275
  for (const perm of data.permissions) {
@@ -65201,37 +65539,14 @@ Permissions (${data.permissions.length}):`);
65201
65539
  }
65202
65540
  }
65203
65541
  if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN || !extractedTokens.CODEX_AUTH_JSON_B64) {
65204
- const codexAuthPaths = [
65205
- `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
65206
- `${(0, import_node_os3.homedir)()}/.code/auth.json`
65207
- ];
65208
- for (const authPath of codexAuthPaths) {
65209
- if ((0, import_node_fs5.existsSync)(authPath)) {
65210
- try {
65211
- const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
65212
- const auth = JSON.parse(content);
65213
- if (!extractedTokens.CODEX_AUTH_JSON_B64) {
65214
- extractedTokens.CODEX_AUTH_JSON_B64 = Buffer.from(content, "utf8").toString("base64");
65215
- }
65216
- const tokens = auth.tokens;
65217
- if (tokens?.access_token) {
65218
- if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
65219
- extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = tokens.access_token;
65220
- }
65221
- break;
65222
- }
65223
- if (auth.oauth_token || auth.access_token) {
65224
- if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
65225
- extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = auth.oauth_token || auth.access_token;
65226
- }
65227
- break;
65228
- }
65229
- if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
65230
- extractedTokens.OPENAI_API_KEY = auth.OPENAI_API_KEY;
65231
- break;
65232
- }
65233
- } catch {
65234
- }
65542
+ const freshest = pickFreshestCodeAuth();
65543
+ if (freshest) {
65544
+ extractedTokens.CODEX_AUTH_JSON_B64 = freshest.authJsonB64;
65545
+ if (freshest.accessToken) {
65546
+ extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = freshest.accessToken;
65547
+ }
65548
+ if (freshest.apiKey) {
65549
+ extractedTokens.OPENAI_API_KEY = freshest.apiKey;
65235
65550
  }
65236
65551
  }
65237
65552
  }
@@ -65386,37 +65701,15 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65386
65701
  }
65387
65702
  }
65388
65703
  if (!codexFound) {
65389
- const codexAuthPaths = [
65390
- `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
65391
- `${(0, import_node_os3.homedir)()}/.code/auth.json`
65392
- ];
65393
- for (const authPath of codexAuthPaths) {
65394
- if ((0, import_node_fs5.existsSync)(authPath)) {
65395
- try {
65396
- const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
65397
- const auth = JSON.parse(content);
65398
- const tokens = auth.tokens;
65399
- if (tokens?.access_token) {
65400
- codexFound = true;
65401
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
65402
- codexPreview = tokens.access_token.substring(0, 15) + "...";
65403
- break;
65404
- }
65405
- if (auth.oauth_token || auth.access_token) {
65406
- codexFound = true;
65407
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
65408
- const token = auth.oauth_token || auth.access_token;
65409
- codexPreview = token.substring(0, 15) + "...";
65410
- break;
65411
- }
65412
- if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
65413
- codexFound = true;
65414
- codexSource = authPath.replace((0, import_node_os3.homedir)(), "~") + " (API key)";
65415
- codexPreview = auth.OPENAI_API_KEY.substring(0, 10) + "...";
65416
- break;
65417
- }
65418
- } catch {
65419
- }
65704
+ const freshest = pickFreshestCodeAuth();
65705
+ if (freshest) {
65706
+ codexFound = true;
65707
+ codexSource = freshest.sourcePath.replace((0, import_node_os3.homedir)(), "~");
65708
+ if (freshest.accessToken) {
65709
+ codexPreview = freshest.accessToken.substring(0, 15) + "...";
65710
+ } else if (freshest.apiKey) {
65711
+ codexSource += " (API key)";
65712
+ codexPreview = freshest.apiKey.substring(0, 10) + "...";
65420
65713
  }
65421
65714
  }
65422
65715
  }
@@ -65513,7 +65806,10 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
65513
65806
  const requestData = submitResponse.data;
65514
65807
  if (!wait) {
65515
65808
  outputJson(requestData, json, `Access request submitted: ${requestData.id} (status: ${requestData.status})
65516
- Poll with: eve auth request-access --status ${requestData.id}`);
65809
+ Poll with: eve auth request-access --status ${requestData.id}
65810
+
65811
+ Tip: Use --wait to auto-poll and login on approval:
65812
+ eve auth request-access --org "${orgName}" --wait`);
65517
65813
  return;
65518
65814
  }
65519
65815
  console.log(`Access request submitted: ${requestData.id}`);
@@ -65665,6 +65961,52 @@ No token minted (use --scopes to mint a token).`);
65665
65961
  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>");
65666
65962
  }
65667
65963
  }
65964
+ function pickFreshestCodeAuth() {
65965
+ const codexAuthPaths = [
65966
+ `${(0, import_node_os3.homedir)()}/.codex/auth.json`,
65967
+ `${(0, import_node_os3.homedir)()}/.code/auth.json`
65968
+ ];
65969
+ const candidates = [];
65970
+ for (const authPath of codexAuthPaths) {
65971
+ if (!(0, import_node_fs5.existsSync)(authPath)) continue;
65972
+ try {
65973
+ const content = (0, import_node_fs5.readFileSync)(authPath, "utf8");
65974
+ const auth = JSON.parse(content);
65975
+ const authJsonB64 = Buffer.from(content, "utf8").toString("base64");
65976
+ const tokens = auth.tokens;
65977
+ if (tokens?.access_token) {
65978
+ const expiresAt = typeof tokens.expires_at === "number" ? tokens.expires_at : 0;
65979
+ candidates.push({
65980
+ sourcePath: authPath,
65981
+ authJsonB64,
65982
+ accessToken: tokens.access_token,
65983
+ expiresAt
65984
+ });
65985
+ continue;
65986
+ }
65987
+ if (auth.oauth_token || auth.access_token) {
65988
+ candidates.push({
65989
+ sourcePath: authPath,
65990
+ authJsonB64,
65991
+ accessToken: auth.oauth_token || auth.access_token,
65992
+ expiresAt: 0
65993
+ });
65994
+ continue;
65995
+ }
65996
+ if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
65997
+ candidates.push({
65998
+ sourcePath: authPath,
65999
+ authJsonB64,
66000
+ apiKey: auth.OPENAI_API_KEY,
66001
+ expiresAt: 0
66002
+ });
66003
+ }
66004
+ } catch {
66005
+ }
66006
+ }
66007
+ if (candidates.length === 0) return null;
66008
+ return candidates.reduce((best, c) => c.expiresAt > best.expiresAt ? c : best);
66009
+ }
65668
66010
  function signNonceWithSsh(keyPath, nonce) {
65669
66011
  const tempDir = (0, import_node_fs5.mkdtempSync)((0, import_node_path5.join)((0, import_node_os3.tmpdir)(), "eve-auth-"));
65670
66012
  const noncePath = (0, import_node_path5.join)(tempDir, "nonce");
@@ -66758,9 +67100,9 @@ function getOrchestratorUrl(context2) {
66758
67100
  apiUrl.port = orchPort;
66759
67101
  return apiUrl.toString().replace(/\/$/, "");
66760
67102
  }
66761
- async function requestOrchestratorJson(context2, path7, options) {
67103
+ async function requestOrchestratorJson(context2, path8, options) {
66762
67104
  const orchUrl = getOrchestratorUrl(context2);
66763
- const url = `${orchUrl}${path7}`;
67105
+ const url = `${orchUrl}${path8}`;
66764
67106
  const headers = {};
66765
67107
  if (options?.body) {
66766
67108
  headers["Content-Type"] = "application/json";
@@ -68966,13 +69308,13 @@ async function handleCall(positionals, flags, context2) {
68966
69308
  const body = graphqlBody ?? jsonBody;
68967
69309
  const method = methodInput.toUpperCase();
68968
69310
  const resolvedBaseUrl = resolveApiBaseUrlForRuntime(api.base_url, context2.apiUrl);
68969
- const path7 = resolveApiPath(resolvedBaseUrl, pathInput);
69311
+ const path8 = resolveApiPath(resolvedBaseUrl, pathInput);
68970
69312
  const tokenOverride = getStringFlag(flags, ["token"]);
68971
69313
  const authToken = tokenOverride ?? process.env.EVE_JOB_TOKEN ?? context2.token;
68972
69314
  if (printCurl) {
68973
69315
  const curl = buildCurlCommand({
68974
69316
  method,
68975
- url: path7,
69317
+ url: path8,
68976
69318
  authToken,
68977
69319
  jsonBody: body,
68978
69320
  authHint: tokenOverride ? "override" : process.env.EVE_JOB_TOKEN ? "job" : "user"
@@ -68980,7 +69322,7 @@ async function handleCall(positionals, flags, context2) {
68980
69322
  console.log(curl);
68981
69323
  return;
68982
69324
  }
68983
- const response = await fetch(path7, {
69325
+ const response = await fetch(path8, {
68984
69326
  method,
68985
69327
  headers: buildApiHeaders(authToken, body),
68986
69328
  body: body ? JSON.stringify(body) : void 0
@@ -69076,7 +69418,7 @@ async function fetchApiSpec(context2, projectId, name, env) {
69076
69418
  function buildCurlExamples(api, spec) {
69077
69419
  const paths = spec.paths ?? {};
69078
69420
  const examples = [];
69079
- Object.entries(paths).forEach(([path7, methods]) => {
69421
+ Object.entries(paths).forEach(([path8, methods]) => {
69080
69422
  Object.entries(methods).forEach(([method, operation]) => {
69081
69423
  const lower = method.toLowerCase();
69082
69424
  if (!["get", "post", "put", "patch", "delete"].includes(lower)) {
@@ -69087,7 +69429,7 @@ function buildCurlExamples(api, spec) {
69087
69429
  const needsBody = ["post", "put", "patch"].includes(lower);
69088
69430
  const curl = buildCurlCommand({
69089
69431
  method: lower.toUpperCase(),
69090
- url: resolveApiPath(api.base_url, path7),
69432
+ url: resolveApiPath(api.base_url, path8),
69091
69433
  authToken: api.auth_mode === "eve" ? "$EVE_JOB_TOKEN" : void 0,
69092
69434
  jsonBody: needsBody ? examplePayload ?? {} : void 0,
69093
69435
  authHint: "job"
@@ -69109,15 +69451,15 @@ function extractExamplePayload(requestBody) {
69109
69451
  if (examples.length === 0) return void 0;
69110
69452
  return examples[0]?.value;
69111
69453
  }
69112
- function resolveApiPath(baseUrl, path7) {
69113
- if (path7.startsWith("http://") || path7.startsWith("https://")) {
69114
- return path7;
69454
+ function resolveApiPath(baseUrl, path8) {
69455
+ if (path8.startsWith("http://") || path8.startsWith("https://")) {
69456
+ return path8;
69115
69457
  }
69116
69458
  if (!baseUrl) {
69117
- return path7;
69459
+ return path8;
69118
69460
  }
69119
69461
  const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
69120
- const trimmedPath = path7.startsWith("/") ? path7 : `/${path7}`;
69462
+ const trimmedPath = path8.startsWith("/") ? path8 : `/${path8}`;
69121
69463
  return `${trimmedBase}${trimmedPath}`;
69122
69464
  }
69123
69465
  function resolveApiBaseUrlForRuntime(baseUrl, eveApiUrl) {
@@ -70846,13 +71188,13 @@ function Subscribe(postgres2, options) {
70846
71188
  }
70847
71189
  }
70848
71190
  function handle(a, b2) {
70849
- const path7 = b2.relation.schema + "." + b2.relation.table;
71191
+ const path8 = b2.relation.schema + "." + b2.relation.table;
70850
71192
  call("*", a, b2);
70851
- call("*:" + path7, a, b2);
70852
- b2.relation.keys.length && call("*:" + path7 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
71193
+ call("*:" + path8, a, b2);
71194
+ b2.relation.keys.length && call("*:" + path8 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
70853
71195
  call(b2.command, a, b2);
70854
- call(b2.command + ":" + path7, a, b2);
70855
- b2.relation.keys.length && call(b2.command + ":" + path7 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
71196
+ call(b2.command + ":" + path8, a, b2);
71197
+ b2.relation.keys.length && call(b2.command + ":" + path8 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
70856
71198
  }
70857
71199
  function pong() {
70858
71200
  const x2 = Buffer.alloc(34);
@@ -70965,8 +71307,8 @@ function parseEvent(x) {
70965
71307
  const xs = x.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
70966
71308
  if (!xs)
70967
71309
  throw new Error("Malformed subscribe pattern: " + x);
70968
- const [, command, path7, key] = xs;
70969
- return (command || "*") + (path7 ? ":" + (path7.indexOf(".") === -1 ? "public." + path7 : path7) : "") + (key ? "=" + key : "");
71310
+ const [, command, path8, key] = xs;
71311
+ return (command || "*") + (path8 ? ":" + (path8.indexOf(".") === -1 ? "public." + path8 : path8) : "") + (key ? "=" + key : "");
70970
71312
  }
70971
71313
 
70972
71314
  // ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/large.js
@@ -71111,10 +71453,10 @@ function Postgres(a, b2) {
71111
71453
  });
71112
71454
  return query;
71113
71455
  }
71114
- function file(path7, args = [], options2 = {}) {
71456
+ function file(path8, args = [], options2 = {}) {
71115
71457
  arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
71116
71458
  const query = new Query([], args, (query2) => {
71117
- import_fs2.default.readFile(path7, "utf8", (err, string) => {
71459
+ import_fs2.default.readFile(path8, "utf8", (err, string) => {
71118
71460
  if (err)
71119
71461
  return query2.reject(err);
71120
71462
  query2.strings = [string];
@@ -72502,10 +72844,10 @@ function padRight6(str, width) {
72502
72844
  }
72503
72845
 
72504
72846
  // src/commands/skills.ts
72505
- var fs3 = __toESM(require("node:fs"));
72506
- var path5 = __toESM(require("node:path"));
72847
+ var fs4 = __toESM(require("node:fs"));
72848
+ var path6 = __toESM(require("node:path"));
72507
72849
  var import_node_child_process7 = require("node:child_process");
72508
- var UNIVERSAL_SKILLS_DIR = path5.join(".agents", "skills");
72850
+ var UNIVERSAL_SKILLS_DIR = path6.join(".agents", "skills");
72509
72851
  var PRIVATE_SKILLS_DIRNAME = "private-skills";
72510
72852
  async function handleSkills(subcommand, positionals, flags) {
72511
72853
  switch (subcommand) {
@@ -72521,8 +72863,8 @@ async function handleInstall(positionals, flags) {
72521
72863
  const skipInstalled = Boolean(flags["skip-installed"]);
72522
72864
  const projectRoot = process.cwd();
72523
72865
  const skillsBin = resolveSkillsBinary();
72524
- const manifestPath = path5.join(projectRoot, "skills.txt");
72525
- const skillsDir = path5.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72866
+ const manifestPath = path6.join(projectRoot, "skills.txt");
72867
+ const skillsDir = path6.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72526
72868
  const source = positionals[0];
72527
72869
  if (source) {
72528
72870
  const parsed = parseSkillSource(source);
@@ -72555,7 +72897,7 @@ async function handleInstall(positionals, flags) {
72555
72897
  function installSkill(skillsBin, skill, projectRoot) {
72556
72898
  console.log(` Installing: ${skill.source} (${skill.type})`);
72557
72899
  const localDir = resolveLocalDirIfExists(skill, projectRoot);
72558
- const wantsExcludePrivate = localDir !== null && fs3.existsSync(path5.join(localDir, PRIVATE_SKILLS_DIRNAME)) && !sourcePathExplicitlyTargetsPrivate(skill.source);
72900
+ const wantsExcludePrivate = localDir !== null && fs4.existsSync(path6.join(localDir, PRIVATE_SKILLS_DIRNAME)) && !sourcePathExplicitlyTargetsPrivate(skill.source);
72559
72901
  try {
72560
72902
  const agents = ["claude-code", "codex", "gemini-cli"];
72561
72903
  if (wantsExcludePrivate && localDir) {
@@ -72566,7 +72908,7 @@ function installSkill(skillsBin, skill, projectRoot) {
72566
72908
  }
72567
72909
  console.log(` Installing ${skillDirs.length} public skill(s) (excluding ${PRIVATE_SKILLS_DIRNAME}/)...`);
72568
72910
  for (const dir of skillDirs) {
72569
- const rel = path5.relative(projectRoot, dir);
72911
+ const rel = path6.relative(projectRoot, dir);
72570
72912
  const installSource = rel.startsWith(".") ? rel : `./${rel}`;
72571
72913
  for (const agent of agents) {
72572
72914
  (0, import_node_child_process7.execSync)(`${skillsBin} add ${JSON.stringify(installSource)} -a ${agent} -s '*' -y --full-depth`, {
@@ -72590,16 +72932,16 @@ function installSkill(skillsBin, skill, projectRoot) {
72590
72932
  }
72591
72933
  }
72592
72934
  function persistToManifest(manifestPath, source) {
72593
- if (!fs3.existsSync(manifestPath)) {
72594
- fs3.writeFileSync(manifestPath, `${source}
72935
+ if (!fs4.existsSync(manifestPath)) {
72936
+ fs4.writeFileSync(manifestPath, `${source}
72595
72937
  `);
72596
72938
  console.log(`Created skills.txt with ${source}`);
72597
72939
  return;
72598
72940
  }
72599
- const content = fs3.readFileSync(manifestPath, "utf-8");
72941
+ const content = fs4.readFileSync(manifestPath, "utf-8");
72600
72942
  const lines = content.split("\n").map((l) => l.split("#")[0].trim());
72601
72943
  if (!lines.includes(source)) {
72602
- fs3.appendFileSync(manifestPath, `
72944
+ fs4.appendFileSync(manifestPath, `
72603
72945
  ${source}
72604
72946
  `);
72605
72947
  console.log(`Added ${source} to skills.txt`);
@@ -72607,11 +72949,11 @@ ${source}
72607
72949
  }
72608
72950
  function resolveSkillsBinary() {
72609
72951
  const candidates = [
72610
- path5.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
72611
- path5.resolve(__dirname, "..", "..", ".bin", "skills")
72952
+ path6.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
72953
+ path6.resolve(__dirname, "..", "..", ".bin", "skills")
72612
72954
  ];
72613
72955
  for (const candidate of candidates) {
72614
- if (fs3.existsSync(candidate)) return candidate;
72956
+ if (fs4.existsSync(candidate)) return candidate;
72615
72957
  }
72616
72958
  if (commandExists("skills")) return "skills";
72617
72959
  throw new Error(
@@ -72635,21 +72977,21 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72635
72977
  const basePattern = pattern.replace(/\/\*+$/, "");
72636
72978
  let searchRoot;
72637
72979
  if (basePattern.startsWith("./") || basePattern.startsWith("../")) {
72638
- searchRoot = path5.resolve(path5.dirname(basePath), basePattern);
72980
+ searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
72639
72981
  } else if (basePattern.startsWith("/")) {
72640
72982
  searchRoot = basePattern;
72641
72983
  } else if (basePattern.startsWith("~")) {
72642
72984
  searchRoot = basePattern.replace(/^~/, process.env.HOME || "~");
72643
72985
  } else {
72644
- searchRoot = path5.resolve(path5.dirname(basePath), basePattern);
72986
+ searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
72645
72987
  }
72646
- if (!fs3.existsSync(searchRoot)) {
72988
+ if (!fs4.existsSync(searchRoot)) {
72647
72989
  console.warn(`Warning: Glob pattern base directory not found: ${searchRoot}`);
72648
72990
  return sources;
72649
72991
  }
72650
72992
  const findSkillDirs2 = (dir, depth) => {
72651
72993
  try {
72652
- const entries = fs3.readdirSync(dir, { withFileTypes: true });
72994
+ const entries = fs4.readdirSync(dir, { withFileTypes: true });
72653
72995
  for (const entry of entries) {
72654
72996
  if (!entry.isDirectory() || entry.name.startsWith(".")) {
72655
72997
  continue;
@@ -72657,11 +72999,11 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72657
72999
  if (!explicitPrivateTarget && entry.name === PRIVATE_SKILLS_DIRNAME) {
72658
73000
  continue;
72659
73001
  }
72660
- const fullPath = path5.join(dir, entry.name);
72661
- const skillMdPath = path5.join(fullPath, "SKILL.md");
72662
- if (fs3.existsSync(skillMdPath)) {
73002
+ const fullPath = path6.join(dir, entry.name);
73003
+ const skillMdPath = path6.join(fullPath, "SKILL.md");
73004
+ if (fs4.existsSync(skillMdPath)) {
72663
73005
  const name = entry.name;
72664
- const relativePath = path5.relative(path5.dirname(basePath), fullPath);
73006
+ const relativePath = path6.relative(path6.dirname(basePath), fullPath);
72665
73007
  const source = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
72666
73008
  if (!explicitPrivateTarget && pathContainsPrivateSkills(source)) {
72667
73009
  continue;
@@ -72685,10 +73027,10 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
72685
73027
  return sources;
72686
73028
  }
72687
73029
  function parseSkillsManifest(manifestPath) {
72688
- if (!fs3.existsSync(manifestPath)) {
73030
+ if (!fs4.existsSync(manifestPath)) {
72689
73031
  return [];
72690
73032
  }
72691
- const content = fs3.readFileSync(manifestPath, "utf-8");
73033
+ const content = fs4.readFileSync(manifestPath, "utf-8");
72692
73034
  const sources = [];
72693
73035
  for (const rawLine of content.split("\n")) {
72694
73036
  const line = rawLine.split("#")[0].trim();
@@ -72714,22 +73056,22 @@ function parseSkillSource(line) {
72714
73056
  return { raw: line, source: line, type: "github", name: name2 };
72715
73057
  }
72716
73058
  if (line.startsWith("/") || line.startsWith("~")) {
72717
- const name2 = path5.basename(line);
73059
+ const name2 = path6.basename(line);
72718
73060
  return { raw: line, source: line, type: "local", name: name2 };
72719
73061
  }
72720
73062
  if (line.startsWith("./") || line.startsWith("../")) {
72721
- const name2 = path5.basename(line);
73063
+ const name2 = path6.basename(line);
72722
73064
  return { raw: line, source: line, type: "local", name: name2 };
72723
73065
  }
72724
- if (fs3.existsSync(line)) {
72725
- const name2 = path5.basename(line);
73066
+ if (fs4.existsSync(line)) {
73067
+ const name2 = path6.basename(line);
72726
73068
  return { raw: line, source: `./${line}`, type: "local", name: name2 };
72727
73069
  }
72728
73070
  if (line.includes("/") && !line.includes(" ")) {
72729
73071
  const name2 = extractNameFromRepo(line);
72730
73072
  return { raw: line, source: line, type: "github", name: name2 };
72731
73073
  }
72732
- const name = path5.basename(line);
73074
+ const name = path6.basename(line);
72733
73075
  return { raw: line, source: `./${line}`, type: "local", name };
72734
73076
  }
72735
73077
  function extractNameFromUrl(url) {
@@ -72737,7 +73079,7 @@ function extractNameFromUrl(url) {
72737
73079
  if (match) {
72738
73080
  return match[1].replace(/\.git$/, "");
72739
73081
  }
72740
- return path5.basename(new URL(url).pathname).replace(/\.git$/, "");
73082
+ return path6.basename(new URL(url).pathname).replace(/\.git$/, "");
72741
73083
  }
72742
73084
  function extractNameFromRepo(repo) {
72743
73085
  const parts = repo.split("/");
@@ -72745,10 +73087,10 @@ function extractNameFromRepo(repo) {
72745
73087
  }
72746
73088
  function getInstalledSkills(skillsDir) {
72747
73089
  const installed = /* @__PURE__ */ new Set();
72748
- if (!fs3.existsSync(skillsDir)) {
73090
+ if (!fs4.existsSync(skillsDir)) {
72749
73091
  return installed;
72750
73092
  }
72751
- const entries = fs3.readdirSync(skillsDir, { withFileTypes: true });
73093
+ const entries = fs4.readdirSync(skillsDir, { withFileTypes: true });
72752
73094
  for (const entry of entries) {
72753
73095
  if (entry.isDirectory() && !entry.name.startsWith(".")) {
72754
73096
  installed.add(entry.name);
@@ -72757,46 +73099,46 @@ function getInstalledSkills(skillsDir) {
72757
73099
  return installed;
72758
73100
  }
72759
73101
  function ensureSkillsSymlink(projectRoot) {
72760
- const agentSkills = path5.join(projectRoot, UNIVERSAL_SKILLS_DIR);
72761
- const claudeDir = path5.join(projectRoot, ".claude");
72762
- const claudeSkills = path5.join(claudeDir, "skills");
72763
- if (!fs3.existsSync(agentSkills)) {
72764
- fs3.mkdirSync(agentSkills, { recursive: true });
73102
+ const agentSkills = path6.join(projectRoot, UNIVERSAL_SKILLS_DIR);
73103
+ const claudeDir = path6.join(projectRoot, ".claude");
73104
+ const claudeSkills = path6.join(claudeDir, "skills");
73105
+ if (!fs4.existsSync(agentSkills)) {
73106
+ fs4.mkdirSync(agentSkills, { recursive: true });
72765
73107
  }
72766
- if (!fs3.existsSync(claudeDir)) {
72767
- fs3.mkdirSync(claudeDir, { recursive: true });
73108
+ if (!fs4.existsSync(claudeDir)) {
73109
+ fs4.mkdirSync(claudeDir, { recursive: true });
72768
73110
  }
72769
- if (fs3.existsSync(claudeSkills) && !fs3.lstatSync(claudeSkills).isSymbolicLink()) {
73111
+ if (fs4.existsSync(claudeSkills) && !fs4.lstatSync(claudeSkills).isSymbolicLink()) {
72770
73112
  try {
72771
- const claudeStat = fs3.lstatSync(claudeSkills);
73113
+ const claudeStat = fs4.lstatSync(claudeSkills);
72772
73114
  if (claudeStat.isDirectory()) {
72773
- const entries = fs3.readdirSync(agentSkills, { withFileTypes: true });
73115
+ const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
72774
73116
  for (const entry of entries) {
72775
73117
  if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
72776
- const dst = path5.join(claudeSkills, entry.name);
72777
- if (fs3.existsSync(dst)) continue;
72778
- fs3.symlinkSync(path5.join("..", "..", UNIVERSAL_SKILLS_DIR, entry.name), dst);
73118
+ const dst = path6.join(claudeSkills, entry.name);
73119
+ if (fs4.existsSync(dst)) continue;
73120
+ fs4.symlinkSync(path6.join("..", "..", UNIVERSAL_SKILLS_DIR, entry.name), dst);
72779
73121
  }
72780
73122
  }
72781
73123
  } catch {
72782
73124
  }
72783
73125
  return;
72784
73126
  }
72785
- if (fs3.existsSync(claudeSkills)) {
72786
- const stat = fs3.lstatSync(claudeSkills);
73127
+ if (fs4.existsSync(claudeSkills)) {
73128
+ const stat = fs4.lstatSync(claudeSkills);
72787
73129
  if (stat.isSymbolicLink()) {
72788
- const target = fs3.readlinkSync(claudeSkills);
73130
+ const target = fs4.readlinkSync(claudeSkills);
72789
73131
  if (target === `../${UNIVERSAL_SKILLS_DIR}` || target === agentSkills) {
72790
73132
  return;
72791
73133
  }
72792
- fs3.unlinkSync(claudeSkills);
73134
+ fs4.unlinkSync(claudeSkills);
72793
73135
  } else {
72794
73136
  console.log(".claude/skills exists and is not a symlink; skipping");
72795
73137
  return;
72796
73138
  }
72797
73139
  }
72798
73140
  try {
72799
- fs3.symlinkSync(`../${UNIVERSAL_SKILLS_DIR}`, claudeSkills);
73141
+ fs4.symlinkSync(`../${UNIVERSAL_SKILLS_DIR}`, claudeSkills);
72800
73142
  console.log(`Linked .claude/skills -> ${UNIVERSAL_SKILLS_DIR}`);
72801
73143
  } catch (err) {
72802
73144
  console.warn("Warning: Failed to create symlink:", err);
@@ -72808,10 +73150,10 @@ function resolveLocalDirIfExists(skill, projectRoot) {
72808
73150
  if (source.startsWith("~")) {
72809
73151
  source = source.replace(/^~/, process.env.HOME || "~");
72810
73152
  }
72811
- const abs = path5.isAbsolute(source) ? source : path5.resolve(projectRoot, source);
73153
+ const abs = path6.isAbsolute(source) ? source : path6.resolve(projectRoot, source);
72812
73154
  try {
72813
- if (!fs3.existsSync(abs)) return null;
72814
- if (!fs3.statSync(abs).isDirectory()) return null;
73155
+ if (!fs4.existsSync(abs)) return null;
73156
+ if (!fs4.statSync(abs).isDirectory()) return null;
72815
73157
  return abs;
72816
73158
  } catch {
72817
73159
  return null;
@@ -72821,7 +73163,7 @@ function sourcePathExplicitlyTargetsPrivate(source) {
72821
73163
  return pathContainsPrivateSkills(source);
72822
73164
  }
72823
73165
  function pathContainsPrivateSkills(source) {
72824
- const normalized = path5.normalize(source).replace(/\\/g, "/");
73166
+ const normalized = path6.normalize(source).replace(/\\/g, "/");
72825
73167
  const segments = normalized.split("/").filter(Boolean);
72826
73168
  return segments.includes(PRIVATE_SKILLS_DIRNAME);
72827
73169
  }
@@ -72837,7 +73179,7 @@ function findSkillDirs(rootDir, opts) {
72837
73179
  const walk = (dir) => {
72838
73180
  let entries;
72839
73181
  try {
72840
- entries = fs3.readdirSync(dir, { withFileTypes: true });
73182
+ entries = fs4.readdirSync(dir, { withFileTypes: true });
72841
73183
  } catch {
72842
73184
  return;
72843
73185
  }
@@ -72849,7 +73191,7 @@ function findSkillDirs(rootDir, opts) {
72849
73191
  for (const entry of entries) {
72850
73192
  if (!entry.isDirectory()) continue;
72851
73193
  if (shouldSkipDir(dir, entry.name)) continue;
72852
- walk(path5.join(dir, entry.name));
73194
+ walk(path6.join(dir, entry.name));
72853
73195
  }
72854
73196
  };
72855
73197
  walk(rootDir);
@@ -72857,18 +73199,20 @@ function findSkillDirs(rootDir, opts) {
72857
73199
  }
72858
73200
 
72859
73201
  // src/commands/admin.ts
73202
+ var import_node_fs10 = require("node:fs");
72860
73203
  async function handleAdmin(subcommand, positionals, flags, context2) {
72861
73204
  const json = Boolean(flags.json);
72862
73205
  switch (subcommand) {
72863
73206
  case "invite": {
72864
73207
  const githubUsername = getStringFlag(flags, ["github"]);
73208
+ const sshKeyPath = getStringFlag(flags, ["ssh-key"]);
72865
73209
  const email = getStringFlag(flags, ["email"]);
72866
73210
  const role = getStringFlag(flags, ["role"]) ?? "member";
72867
73211
  const orgId = getStringFlag(flags, ["org"]) ?? context2.orgId;
72868
73212
  const web = getBooleanFlag(flags, ["web"]) ?? false;
72869
73213
  const redirectTo = getStringFlag(flags, ["redirect-to"]);
72870
73214
  if (!email) {
72871
- throw new Error("Usage: eve admin invite --email <email> [--github <username>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]");
73215
+ throw new Error("Usage: eve admin invite --email <email> [--github <username>] [--ssh-key <path>] [--role <role>] [--org <org_id>] [--web] [--redirect-to <url>]");
72872
73216
  }
72873
73217
  if (!["owner", "admin", "member"].includes(role)) {
72874
73218
  throw new Error(`Invalid role: ${role}. Must be one of: owner, admin, member`);
@@ -72908,6 +73252,29 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
72908
73252
  results.keys_registered += 1;
72909
73253
  }
72910
73254
  }
73255
+ if (sshKeyPath) {
73256
+ if (!(0, import_node_fs10.existsSync)(sshKeyPath)) {
73257
+ throw new Error(`SSH public key not found: ${sshKeyPath}`);
73258
+ }
73259
+ const publicKey = (0, import_node_fs10.readFileSync)(sshKeyPath, "utf8").trim();
73260
+ if (!publicKey.startsWith("ssh-")) {
73261
+ throw new Error(`File does not look like an SSH public key: ${sshKeyPath}`);
73262
+ }
73263
+ const identity = await requestJson(context2, "/auth/identities", {
73264
+ method: "POST",
73265
+ body: {
73266
+ email,
73267
+ public_key: publicKey,
73268
+ label: `ssh-key`
73269
+ }
73270
+ });
73271
+ results.identities.push(identity);
73272
+ results.keys_registered += 1;
73273
+ }
73274
+ if (!githubUsername && !sshKeyPath && !web) {
73275
+ console.warn("Warning: No auth method specified (--github, --ssh-key, or --web). User won't be able to log in.");
73276
+ console.warn('Tip: The user can self-register via: eve auth request-access --org "<org>" --ssh-key ~/.ssh/id_ed25519.pub --wait');
73277
+ }
72911
73278
  if (web) {
72912
73279
  const body = { email };
72913
73280
  if (redirectTo) {
@@ -73117,8 +73484,8 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
73117
73484
  if (untilRaw) params.set("until", untilRaw);
73118
73485
  if (limit) params.set("limit", limit);
73119
73486
  const qs = params.toString();
73120
- const path7 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
73121
- const response = await requestJson(context2, path7);
73487
+ const path8 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
73488
+ const response = await requestJson(context2, path8);
73122
73489
  if (json) {
73123
73490
  outputJson(response, true);
73124
73491
  } else {
@@ -73156,8 +73523,8 @@ ${response.length} transaction(s)`);
73156
73523
  if (untilRaw) params.set("until", untilRaw);
73157
73524
  if (limit) params.set("limit", limit);
73158
73525
  const qs = params.toString();
73159
- const path7 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
73160
- const response = await requestJson(context2, path7);
73526
+ const path8 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
73527
+ const response = await requestJson(context2, path8);
73161
73528
  if (json) {
73162
73529
  outputJson(response, true);
73163
73530
  } else {
@@ -73181,8 +73548,8 @@ ${response.length} record(s)`);
73181
73548
  if (sinceRaw) params.set("since", parseSinceValue4(sinceRaw));
73182
73549
  if (untilRaw) params.set("until", untilRaw);
73183
73550
  const qs = params.toString();
73184
- const path7 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
73185
- const response = await requestJson(context2, path7);
73551
+ const path8 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
73552
+ const response = await requestJson(context2, path8);
73186
73553
  if (json) {
73187
73554
  outputJson(response, true);
73188
73555
  } else {
@@ -73218,8 +73585,8 @@ ${response.length} record(s)`);
73218
73585
  if (limit) params.set("limit", limit);
73219
73586
  if (offset) params.set("offset", offset);
73220
73587
  const query = params.toString();
73221
- const path7 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
73222
- const response = await requestJson(context2, path7);
73588
+ const path8 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
73589
+ const response = await requestJson(context2, path8);
73223
73590
  if (json) {
73224
73591
  outputJson(response, true);
73225
73592
  return;
@@ -73314,6 +73681,8 @@ ${rows.length} alias(es)`);
73314
73681
  }
73315
73682
  console.log(`Approve: eve admin access-requests approve <id>`);
73316
73683
  console.log(`Reject: eve admin access-requests reject <id> --reason "..."`);
73684
+ console.log("");
73685
+ console.log(`Tip: Users can self-register with: eve auth request-access --org "Org Name" --ssh-key ~/.ssh/id_ed25519.pub --wait`);
73317
73686
  return;
73318
73687
  }
73319
73688
  }
@@ -73374,11 +73743,11 @@ async function fetchGitHubKeys2(username) {
73374
73743
 
73375
73744
  // src/commands/agents.ts
73376
73745
  var import_node_child_process8 = require("node:child_process");
73377
- var import_node_fs10 = require("node:fs");
73746
+ var import_node_fs11 = require("node:fs");
73378
73747
  var import_node_path11 = require("node:path");
73379
73748
  var import_yaml3 = require("yaml");
73380
73749
  function readYamlFile(filePath) {
73381
- const raw = (0, import_node_fs10.readFileSync)(filePath, "utf-8");
73750
+ const raw = (0, import_node_fs11.readFileSync)(filePath, "utf-8");
73382
73751
  const parsed = (0, import_yaml3.parse)(raw);
73383
73752
  if (!parsed || typeof parsed !== "object") {
73384
73753
  throw new Error(`Invalid YAML in ${filePath}`);
@@ -73401,11 +73770,11 @@ function resolveAgentsConfigPaths(repoRoot, manifest) {
73401
73770
  function pickString(value) {
73402
73771
  return typeof value === "string" && value.trim().length > 0 ? value : void 0;
73403
73772
  }
73404
- function ensureFileExists(path7, label) {
73405
- if (!(0, import_node_fs10.existsSync)(path7)) {
73406
- throw new Error(`Missing ${label} at ${path7}. Update manifest config_path or add the file.`);
73773
+ function ensureFileExists(path8, label) {
73774
+ if (!(0, import_node_fs11.existsSync)(path8)) {
73775
+ throw new Error(`Missing ${label} at ${path8}. Update manifest config_path or add the file.`);
73407
73776
  }
73408
- return path7;
73777
+ return path8;
73409
73778
  }
73410
73779
  function isLocalApiUrl(apiUrl) {
73411
73780
  try {
@@ -73419,7 +73788,7 @@ function isLocalApiUrl(apiUrl) {
73419
73788
  function loadAgentsConfig(repoRoot) {
73420
73789
  const eveDir = (0, import_node_path11.join)(repoRoot, ".eve");
73421
73790
  const manifestPath = (0, import_node_path11.join)(eveDir, "manifest.yaml");
73422
- if ((0, import_node_fs10.existsSync)(manifestPath)) {
73791
+ if ((0, import_node_fs11.existsSync)(manifestPath)) {
73423
73792
  const manifest = readYamlFile(manifestPath);
73424
73793
  const xEve = manifest["x-eve"] || manifest["x_eve"] || {};
73425
73794
  const policy = xEve["agents"] || null;
@@ -73469,16 +73838,16 @@ async function resolvePacksAndMerge(repoRoot, manifest, projectSlug) {
73469
73838
  }
73470
73839
  }
73471
73840
  const configPaths = resolveAgentsConfigPaths(repoRoot, manifest);
73472
- if ((0, import_node_fs10.existsSync)(configPaths.agentsPath)) {
73473
- const projectAgents = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.agentsPath, "utf-8")) ?? {};
73841
+ if ((0, import_node_fs11.existsSync)(configPaths.agentsPath)) {
73842
+ const projectAgents = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.agentsPath, "utf-8")) ?? {};
73474
73843
  mergedAgents = mergeMapConfig(mergedAgents, projectAgents);
73475
73844
  }
73476
- if ((0, import_node_fs10.existsSync)(configPaths.teamsPath)) {
73477
- const projectTeams = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.teamsPath, "utf-8")) ?? {};
73845
+ if ((0, import_node_fs11.existsSync)(configPaths.teamsPath)) {
73846
+ const projectTeams = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.teamsPath, "utf-8")) ?? {};
73478
73847
  mergedTeams = mergeMapConfig(mergedTeams, projectTeams);
73479
73848
  }
73480
- if ((0, import_node_fs10.existsSync)(configPaths.chatPath)) {
73481
- const projectChat = (0, import_yaml3.parse)((0, import_node_fs10.readFileSync)(configPaths.chatPath, "utf-8")) ?? {};
73849
+ if ((0, import_node_fs11.existsSync)(configPaths.chatPath)) {
73850
+ const projectChat = (0, import_yaml3.parse)((0, import_node_fs11.readFileSync)(configPaths.chatPath, "utf-8")) ?? {};
73482
73851
  mergedChat = mergeChatConfig(
73483
73852
  mergedChat,
73484
73853
  projectChat
@@ -73508,9 +73877,9 @@ async function resolvePacksAndMerge(repoRoot, manifest, projectSlug) {
73508
73877
  }
73509
73878
  };
73510
73879
  const eveDir = (0, import_node_path11.join)(repoRoot, ".eve");
73511
- (0, import_node_fs10.mkdirSync)(eveDir, { recursive: true });
73880
+ (0, import_node_fs11.mkdirSync)(eveDir, { recursive: true });
73512
73881
  const lockfilePath = (0, import_node_path11.join)(eveDir, "packs.lock.yaml");
73513
- (0, import_node_fs10.writeFileSync)(lockfilePath, (0, import_yaml3.stringify)(lockfile), "utf-8");
73882
+ (0, import_node_fs11.writeFileSync)(lockfilePath, (0, import_yaml3.stringify)(lockfile), "utf-8");
73514
73883
  console.log(` \u2713 Lockfile written: .eve/packs.lock.yaml`);
73515
73884
  const packRefs = resolvedPacks.map((p) => ({ id: p.id, source: p.source, ref: p.ref }));
73516
73885
  return {
@@ -73653,7 +74022,7 @@ async function handleAgents(subcommand, positionals, flags, context2) {
73653
74022
  throw new Error("Working tree is dirty. Commit changes or pass --allow-dirty to sync anyway.");
73654
74023
  }
73655
74024
  const manifestPath = (0, import_node_path11.join)(repoRoot, ".eve", "manifest.yaml");
73656
- if (!(0, import_node_fs10.existsSync)(manifestPath)) {
74025
+ if (!(0, import_node_fs11.existsSync)(manifestPath)) {
73657
74026
  throw new Error(`Missing manifest at ${manifestPath}. Expected .eve/manifest.yaml.`);
73658
74027
  }
73659
74028
  const manifest = readYamlFile(manifestPath);
@@ -73682,9 +74051,9 @@ async function handleAgents(subcommand, positionals, flags, context2) {
73682
74051
  packRefs = packResult.packRefs;
73683
74052
  } else {
73684
74053
  const configPaths = resolveAgentsConfigPaths(repoRoot, manifest);
73685
- agentsYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.agentsPath, "agents config"), "utf-8");
73686
- teamsYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.teamsPath, "teams config"), "utf-8");
73687
- chatYaml = (0, import_node_fs10.readFileSync)(ensureFileExists(configPaths.chatPath, "chat config"), "utf-8");
74054
+ agentsYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.agentsPath, "agents config"), "utf-8");
74055
+ teamsYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.teamsPath, "teams config"), "utf-8");
74056
+ chatYaml = (0, import_node_fs11.readFileSync)(ensureFileExists(configPaths.chatPath, "chat config"), "utf-8");
73688
74057
  }
73689
74058
  let gitSha;
73690
74059
  let branch;
@@ -73807,8 +74176,8 @@ function formatAgeSeconds(isoDate) {
73807
74176
  }
73808
74177
 
73809
74178
  // src/commands/init.ts
73810
- var fs4 = __toESM(require("node:fs"));
73811
- var path6 = __toESM(require("node:path"));
74179
+ var fs5 = __toESM(require("node:fs"));
74180
+ var path7 = __toESM(require("node:path"));
73812
74181
  var os3 = __toESM(require("node:os"));
73813
74182
  var import_node_child_process9 = require("node:child_process");
73814
74183
  var DEFAULT_TEMPLATE = "https://github.com/incept5/eve-horizon-starter";
@@ -73818,12 +74187,12 @@ async function handleInit(positionals, flags) {
73818
74187
  const template = getStringFlag(flags, ["template", "t"]) || DEFAULT_TEMPLATE;
73819
74188
  const branch = getStringFlag(flags, ["branch", "b"]) || DEFAULT_BRANCH;
73820
74189
  const skipSkills = Boolean(flags["skip-skills"]);
73821
- const resolvedTarget = path6.resolve(targetDir);
73822
- const targetName = path6.basename(resolvedTarget);
74190
+ const resolvedTarget = path7.resolve(targetDir);
74191
+ const targetName = path7.basename(resolvedTarget);
73823
74192
  const isCurrentDir = targetDir === ".";
73824
74193
  if (isCurrentDir) {
73825
- if (fs4.existsSync(resolvedTarget)) {
73826
- const entries = fs4.readdirSync(resolvedTarget);
74194
+ if (fs5.existsSync(resolvedTarget)) {
74195
+ const entries = fs5.readdirSync(resolvedTarget);
73827
74196
  const nonHiddenEntries = entries.filter((e) => !e.startsWith("."));
73828
74197
  if (nonHiddenEntries.length > 0) {
73829
74198
  throw new Error(
@@ -73833,8 +74202,8 @@ async function handleInit(positionals, flags) {
73833
74202
  }
73834
74203
  }
73835
74204
  } else {
73836
- if (fs4.existsSync(resolvedTarget)) {
73837
- const entries = fs4.readdirSync(resolvedTarget);
74205
+ if (fs5.existsSync(resolvedTarget)) {
74206
+ const entries = fs5.readdirSync(resolvedTarget);
73838
74207
  if (entries.length > 0) {
73839
74208
  throw new Error(
73840
74209
  `Directory '${targetDir}' already exists and is not empty.`
@@ -73846,7 +74215,7 @@ async function handleInit(positionals, flags) {
73846
74215
  console.log(`Template: ${template}`);
73847
74216
  console.log(`Branch: ${branch}`);
73848
74217
  console.log("");
73849
- const tempDir = fs4.mkdtempSync(path6.join(os3.tmpdir(), "eve-init-"));
74218
+ const tempDir = fs5.mkdtempSync(path7.join(os3.tmpdir(), "eve-init-"));
73850
74219
  try {
73851
74220
  console.log("Downloading template...");
73852
74221
  const cloneResult = (0, import_node_child_process9.spawnSync)("git", ["clone", "--depth=1", `--branch=${branch}`, template, tempDir], {
@@ -73859,12 +74228,12 @@ async function handleInit(positionals, flags) {
73859
74228
  ${cloneResult.stderr || cloneResult.stdout}`
73860
74229
  );
73861
74230
  }
73862
- const gitDir = path6.join(tempDir, ".git");
73863
- if (fs4.existsSync(gitDir)) {
73864
- fs4.rmSync(gitDir, { recursive: true, force: true });
74231
+ const gitDir = path7.join(tempDir, ".git");
74232
+ if (fs5.existsSync(gitDir)) {
74233
+ fs5.rmSync(gitDir, { recursive: true, force: true });
73865
74234
  }
73866
- if (!fs4.existsSync(resolvedTarget)) {
73867
- fs4.mkdirSync(resolvedTarget, { recursive: true });
74235
+ if (!fs5.existsSync(resolvedTarget)) {
74236
+ fs5.mkdirSync(resolvedTarget, { recursive: true });
73868
74237
  }
73869
74238
  console.log("Setting up project...");
73870
74239
  copyDirRecursive(tempDir, resolvedTarget);
@@ -73899,38 +74268,38 @@ ${cloneResult.stderr || cloneResult.stdout}`
73899
74268
  console.log(" - Set up your project manifest");
73900
74269
  console.log(" - Help you set up your own Git remote");
73901
74270
  } finally {
73902
- if (fs4.existsSync(tempDir)) {
73903
- fs4.rmSync(tempDir, { recursive: true, force: true });
74271
+ if (fs5.existsSync(tempDir)) {
74272
+ fs5.rmSync(tempDir, { recursive: true, force: true });
73904
74273
  }
73905
74274
  }
73906
74275
  }
73907
74276
  function copyDirRecursive(src, dest) {
73908
- const entries = fs4.readdirSync(src, { withFileTypes: true });
74277
+ const entries = fs5.readdirSync(src, { withFileTypes: true });
73909
74278
  for (const entry of entries) {
73910
- const srcPath = path6.join(src, entry.name);
73911
- const destPath = path6.join(dest, entry.name);
74279
+ const srcPath = path7.join(src, entry.name);
74280
+ const destPath = path7.join(dest, entry.name);
73912
74281
  if (entry.isDirectory()) {
73913
- if (!fs4.existsSync(destPath)) {
73914
- fs4.mkdirSync(destPath, { recursive: true });
74282
+ if (!fs5.existsSync(destPath)) {
74283
+ fs5.mkdirSync(destPath, { recursive: true });
73915
74284
  }
73916
74285
  copyDirRecursive(srcPath, destPath);
73917
74286
  } else if (entry.isSymbolicLink()) {
73918
- const linkTarget = fs4.readlinkSync(srcPath);
73919
- if (!fs4.existsSync(destPath)) {
73920
- fs4.symlinkSync(linkTarget, destPath);
74287
+ const linkTarget = fs5.readlinkSync(srcPath);
74288
+ if (!fs5.existsSync(destPath)) {
74289
+ fs5.symlinkSync(linkTarget, destPath);
73921
74290
  }
73922
74291
  } else {
73923
- fs4.copyFileSync(srcPath, destPath);
74292
+ fs5.copyFileSync(srcPath, destPath);
73924
74293
  }
73925
74294
  }
73926
74295
  }
73927
74296
  function resolveSkillsBinary2() {
73928
74297
  const candidates = [
73929
- path6.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
73930
- path6.resolve(__dirname, "..", "..", ".bin", "skills")
74298
+ path7.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
74299
+ path7.resolve(__dirname, "..", "..", ".bin", "skills")
73931
74300
  ];
73932
74301
  for (const candidate of candidates) {
73933
- if (fs4.existsSync(candidate)) return candidate;
74302
+ if (fs5.existsSync(candidate)) return candidate;
73934
74303
  }
73935
74304
  const result = (0, import_node_child_process9.spawnSync)("which", ["skills"], { encoding: "utf8" });
73936
74305
  if (result.status === 0) return "skills";
@@ -73939,15 +74308,15 @@ function resolveSkillsBinary2() {
73939
74308
  );
73940
74309
  }
73941
74310
  async function installSkills(projectRoot) {
73942
- const skillsTxt = path6.join(projectRoot, "skills.txt");
73943
- if (!fs4.existsSync(skillsTxt)) {
74311
+ const skillsTxt = path7.join(projectRoot, "skills.txt");
74312
+ if (!fs5.existsSync(skillsTxt)) {
73944
74313
  console.log("No skills.txt found, skipping skill installation");
73945
74314
  return;
73946
74315
  }
73947
74316
  const skillsBin = resolveSkillsBinary2();
73948
74317
  const agents = ["claude-code", "codex", "gemini-cli"];
73949
74318
  try {
73950
- const content = fs4.readFileSync(skillsTxt, "utf-8");
74319
+ const content = fs5.readFileSync(skillsTxt, "utf-8");
73951
74320
  const lines = content.split("\n").map((line) => line.split("#")[0].trim()).filter((line) => line.length > 0);
73952
74321
  for (const source of lines) {
73953
74322
  console.log(` Installing: ${source}`);
@@ -73983,51 +74352,51 @@ async function installSkills(projectRoot) {
73983
74352
  }
73984
74353
  }
73985
74354
  function ensureSkillsSymlink2(projectRoot) {
73986
- const agentSkills = path6.join(projectRoot, ".agents", "skills");
73987
- const claudeDir = path6.join(projectRoot, ".claude");
73988
- const claudeSkills = path6.join(claudeDir, "skills");
73989
- if (!fs4.existsSync(agentSkills)) {
73990
- fs4.mkdirSync(agentSkills, { recursive: true });
74355
+ const agentSkills = path7.join(projectRoot, ".agents", "skills");
74356
+ const claudeDir = path7.join(projectRoot, ".claude");
74357
+ const claudeSkills = path7.join(claudeDir, "skills");
74358
+ if (!fs5.existsSync(agentSkills)) {
74359
+ fs5.mkdirSync(agentSkills, { recursive: true });
73991
74360
  }
73992
- if (!fs4.existsSync(claudeDir)) {
73993
- fs4.mkdirSync(claudeDir, { recursive: true });
74361
+ if (!fs5.existsSync(claudeDir)) {
74362
+ fs5.mkdirSync(claudeDir, { recursive: true });
73994
74363
  }
73995
- if (fs4.existsSync(claudeSkills) && !fs4.lstatSync(claudeSkills).isSymbolicLink()) {
74364
+ if (fs5.existsSync(claudeSkills) && !fs5.lstatSync(claudeSkills).isSymbolicLink()) {
73996
74365
  try {
73997
- const stat = fs4.lstatSync(claudeSkills);
74366
+ const stat = fs5.lstatSync(claudeSkills);
73998
74367
  if (stat.isDirectory()) {
73999
- const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
74368
+ const entries = fs5.readdirSync(agentSkills, { withFileTypes: true });
74000
74369
  for (const entry of entries) {
74001
74370
  if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
74002
- const dst = path6.join(claudeSkills, entry.name);
74003
- if (fs4.existsSync(dst)) continue;
74004
- fs4.symlinkSync(path6.join("..", "..", ".agents", "skills", entry.name), dst);
74371
+ const dst = path7.join(claudeSkills, entry.name);
74372
+ if (fs5.existsSync(dst)) continue;
74373
+ fs5.symlinkSync(path7.join("..", "..", ".agents", "skills", entry.name), dst);
74005
74374
  }
74006
74375
  }
74007
74376
  } catch {
74008
74377
  }
74009
74378
  return;
74010
74379
  }
74011
- if (fs4.existsSync(claudeSkills)) {
74012
- const stat = fs4.lstatSync(claudeSkills);
74380
+ if (fs5.existsSync(claudeSkills)) {
74381
+ const stat = fs5.lstatSync(claudeSkills);
74013
74382
  if (stat.isSymbolicLink()) {
74014
- const target = fs4.readlinkSync(claudeSkills);
74383
+ const target = fs5.readlinkSync(claudeSkills);
74015
74384
  if (target === "../.agents/skills" || target === agentSkills) {
74016
74385
  return;
74017
74386
  }
74018
- fs4.unlinkSync(claudeSkills);
74387
+ fs5.unlinkSync(claudeSkills);
74019
74388
  } else {
74020
74389
  return;
74021
74390
  }
74022
74391
  }
74023
74392
  try {
74024
- fs4.symlinkSync("../.agents/skills", claudeSkills);
74393
+ fs5.symlinkSync("../.agents/skills", claudeSkills);
74025
74394
  } catch {
74026
74395
  }
74027
74396
  }
74028
74397
 
74029
74398
  // src/commands/release.ts
74030
- var import_node_fs11 = require("node:fs");
74399
+ var import_node_fs12 = require("node:fs");
74031
74400
  var import_node_path12 = require("node:path");
74032
74401
  async function handleRelease2(subcommand, positionals, flags, context2) {
74033
74402
  const json = Boolean(flags.json);
@@ -74042,7 +74411,7 @@ async function handleRelease2(subcommand, positionals, flags, context2) {
74042
74411
  const dir = typeof flags.dir === "string" ? flags.dir : process.cwd();
74043
74412
  const manifestPath = (0, import_node_path12.join)(dir, ".eve", "manifest.yaml");
74044
74413
  try {
74045
- const yaml = (0, import_node_fs11.readFileSync)(manifestPath, "utf-8");
74414
+ const yaml = (0, import_node_fs12.readFileSync)(manifestPath, "utf-8");
74046
74415
  const projectMatch = yaml.match(/^project:\s*(\S+)/m);
74047
74416
  if (projectMatch) {
74048
74417
  projectId = projectMatch[1];
@@ -74091,7 +74460,7 @@ Make sure the release exists and the tag is correct.`
74091
74460
  }
74092
74461
 
74093
74462
  // src/commands/manifest.ts
74094
- var import_node_fs12 = require("node:fs");
74463
+ var import_node_fs13 = require("node:fs");
74095
74464
  var import_node_path13 = require("node:path");
74096
74465
  async function handleManifest(subcommand, positionals, flags, context2) {
74097
74466
  const json = Boolean(flags.json);
@@ -74106,7 +74475,7 @@ async function handleManifest(subcommand, positionals, flags, context2) {
74106
74475
  let manifestYaml;
74107
74476
  if (!useLatest) {
74108
74477
  try {
74109
- manifestYaml = (0, import_node_fs12.readFileSync)(manifestPath, "utf-8");
74478
+ manifestYaml = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74110
74479
  } catch (error) {
74111
74480
  throw new Error(`Failed to read manifest at ${manifestPath}: ${error.message}`);
74112
74481
  }
@@ -74174,7 +74543,7 @@ async function handleManifest(subcommand, positionals, flags, context2) {
74174
74543
  }
74175
74544
 
74176
74545
  // src/commands/packs.ts
74177
- var import_node_fs13 = require("node:fs");
74546
+ var import_node_fs14 = require("node:fs");
74178
74547
  var import_node_path14 = require("node:path");
74179
74548
  var import_yaml4 = require("yaml");
74180
74549
  async function handlePacks(subcommand, _rest, flags, _context) {
@@ -74196,12 +74565,12 @@ async function handlePacks(subcommand, _rest, flags, _context) {
74196
74565
  function printPacksStatus(repoRoot) {
74197
74566
  const lockfilePath = (0, import_node_path14.join)(repoRoot, ".eve", "packs.lock.yaml");
74198
74567
  const manifestPath = (0, import_node_path14.join)(repoRoot, ".eve", "manifest.yaml");
74199
- if (!(0, import_node_fs13.existsSync)(lockfilePath)) {
74568
+ if (!(0, import_node_fs14.existsSync)(lockfilePath)) {
74200
74569
  console.log("No lockfile found at .eve/packs.lock.yaml");
74201
74570
  console.log('Run "eve agents sync" to resolve packs and generate the lockfile.');
74202
74571
  return;
74203
74572
  }
74204
- const lockRaw = (0, import_node_fs13.readFileSync)(lockfilePath, "utf-8");
74573
+ const lockRaw = (0, import_node_fs14.readFileSync)(lockfilePath, "utf-8");
74205
74574
  const lock = (0, import_yaml4.parse)(lockRaw);
74206
74575
  if (!lock || !lock.packs) {
74207
74576
  console.log("Lockfile is empty or malformed.");
@@ -74236,8 +74605,8 @@ function printPacksStatus(repoRoot) {
74236
74605
  console.log(` Agents: ${lock.effective.agents_count}`);
74237
74606
  console.log(` Teams: ${lock.effective.teams_count}`);
74238
74607
  console.log(` Routes: ${lock.effective.routes_count}`);
74239
- if ((0, import_node_fs13.existsSync)(manifestPath)) {
74240
- const manifestRaw = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74608
+ if ((0, import_node_fs14.existsSync)(manifestPath)) {
74609
+ const manifestRaw = (0, import_node_fs14.readFileSync)(manifestPath, "utf-8");
74241
74610
  const manifest = (0, import_yaml4.parse)(manifestRaw);
74242
74611
  if (manifest) {
74243
74612
  const xEve = manifest["x-eve"] ?? manifest["x_eve"] ?? {};
@@ -74284,10 +74653,10 @@ function printPacksResolve(repoRoot, dryRun) {
74284
74653
  if (dryRun) {
74285
74654
  const lockfilePath = (0, import_node_path14.join)(repoRoot, ".eve", "packs.lock.yaml");
74286
74655
  const manifestPath = (0, import_node_path14.join)(repoRoot, ".eve", "manifest.yaml");
74287
- if (!(0, import_node_fs13.existsSync)(manifestPath)) {
74656
+ if (!(0, import_node_fs14.existsSync)(manifestPath)) {
74288
74657
  throw new Error("No manifest found at .eve/manifest.yaml");
74289
74658
  }
74290
- const manifestRaw = (0, import_node_fs13.readFileSync)(manifestPath, "utf-8");
74659
+ const manifestRaw = (0, import_node_fs14.readFileSync)(manifestPath, "utf-8");
74291
74660
  const manifest = (0, import_yaml4.parse)(manifestRaw);
74292
74661
  if (!manifest) {
74293
74662
  throw new Error("Manifest is empty or malformed.");
@@ -74305,8 +74674,8 @@ function printPacksResolve(repoRoot, dryRun) {
74305
74674
  const refShort = mp.ref ? mp.ref.substring(0, 12) : "(local)";
74306
74675
  console.log(` - ${mp.source} @ ${refShort}`);
74307
74676
  }
74308
- if ((0, import_node_fs13.existsSync)(lockfilePath)) {
74309
- const lockRaw = (0, import_node_fs13.readFileSync)(lockfilePath, "utf-8");
74677
+ if ((0, import_node_fs14.existsSync)(lockfilePath)) {
74678
+ const lockRaw = (0, import_node_fs14.readFileSync)(lockfilePath, "utf-8");
74310
74679
  const lock = (0, import_yaml4.parse)(lockRaw);
74311
74680
  if (lock?.packs) {
74312
74681
  const drift = detectDrift(lock, manifestPacks);
@@ -75196,7 +75565,7 @@ Cursor: ${result.cursor}`);
75196
75565
  }
75197
75566
 
75198
75567
  // src/commands/migrate.ts
75199
- var import_node_fs14 = require("node:fs");
75568
+ var import_node_fs15 = require("node:fs");
75200
75569
  var import_node_path15 = require("node:path");
75201
75570
  var import_yaml5 = require("yaml");
75202
75571
  async function handleMigrate2(subcommand, _rest, _flags) {
@@ -75218,11 +75587,11 @@ async function migrateSkillsToPacks() {
75218
75587
  throw new Error("Not in a git repository. Run this from your project root.");
75219
75588
  }
75220
75589
  const skillsTxtPath = (0, import_node_path15.join)(repoRoot, "skills.txt");
75221
- if (!(0, import_node_fs14.existsSync)(skillsTxtPath)) {
75590
+ if (!(0, import_node_fs15.existsSync)(skillsTxtPath)) {
75222
75591
  console.log("No skills.txt found at repository root. Nothing to migrate.");
75223
75592
  return;
75224
75593
  }
75225
- const content = (0, import_node_fs14.readFileSync)(skillsTxtPath, "utf-8");
75594
+ const content = (0, import_node_fs15.readFileSync)(skillsTxtPath, "utf-8");
75226
75595
  const lines = content.split("\n");
75227
75596
  const localSources = [];
75228
75597
  const remoteSources = [];
@@ -75360,7 +75729,7 @@ function padRight9(str, width) {
75360
75729
  }
75361
75730
 
75362
75731
  // src/commands/access.ts
75363
- var import_node_fs15 = require("node:fs");
75732
+ var import_node_fs16 = require("node:fs");
75364
75733
  var import_node_path16 = require("node:path");
75365
75734
  var readline3 = __toESM(require("node:readline/promises"));
75366
75735
  var import_yaml6 = require("yaml");
@@ -75856,8 +76225,8 @@ async function handleBindings(action, flags, context2, json) {
75856
76225
  params.set("project_id", projectId);
75857
76226
  }
75858
76227
  const queryString = params.toString();
75859
- const path7 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
75860
- const bindingsResponse = await requestJson(context2, path7);
76228
+ const path8 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
76229
+ const bindingsResponse = await requestJson(context2, path8);
75861
76230
  const bindings = unwrapListResponse(bindingsResponse);
75862
76231
  if (json) {
75863
76232
  outputJson({ data: bindings }, json);
@@ -76124,10 +76493,10 @@ function resolveFilePath(flags) {
76124
76493
  return (0, import_node_path16.resolve)(process.cwd(), filePath);
76125
76494
  }
76126
76495
  function loadAccessYaml(filePath) {
76127
- if (!(0, import_node_fs15.existsSync)(filePath)) {
76496
+ if (!(0, import_node_fs16.existsSync)(filePath)) {
76128
76497
  throw new Error(`File not found: ${filePath}`);
76129
76498
  }
76130
- const raw = (0, import_node_fs15.readFileSync)(filePath, "utf-8");
76499
+ const raw = (0, import_node_fs16.readFileSync)(filePath, "utf-8");
76131
76500
  let parsed;
76132
76501
  try {
76133
76502
  parsed = (0, import_yaml6.parse)(raw);
@@ -77095,10 +77464,10 @@ Sync complete: ${parts.join(", ")}`);
77095
77464
  }
77096
77465
 
77097
77466
  // src/commands/docs.ts
77098
- var import_node_fs16 = require("node:fs");
77467
+ var import_node_fs17 = require("node:fs");
77099
77468
  var import_node_path17 = require("node:path");
77100
- function encodeDocPathParam(path7) {
77101
- const trimmed = path7.startsWith("/") ? path7.slice(1) : path7;
77469
+ function encodeDocPathParam(path8) {
77470
+ const trimmed = path8.startsWith("/") ? path8.slice(1) : path8;
77102
77471
  return encodeURIComponent(trimmed);
77103
77472
  }
77104
77473
  function parseWhereClause(raw) {
@@ -77171,9 +77540,9 @@ async function handleDocs(subcommand, positionals, flags, context2) {
77171
77540
  const filePath = getStringFlag(flags, ["file"]);
77172
77541
  const useStdin = flags.stdin === true || flags.stdin === "true";
77173
77542
  if (filePath) {
77174
- content = (0, import_node_fs16.readFileSync)((0, import_node_path17.resolve)(filePath), "utf-8");
77543
+ content = (0, import_node_fs17.readFileSync)((0, import_node_path17.resolve)(filePath), "utf-8");
77175
77544
  } else if (useStdin) {
77176
- content = (0, import_node_fs16.readFileSync)(0, "utf-8");
77545
+ content = (0, import_node_fs17.readFileSync)(0, "utf-8");
77177
77546
  } else {
77178
77547
  throw new Error("Provide --file <path> or --stdin to supply document content");
77179
77548
  }
@@ -77411,7 +77780,7 @@ async function handleDocs(subcommand, positionals, flags, context2) {
77411
77780
  }
77412
77781
 
77413
77782
  // src/commands/memory.ts
77414
- var import_node_fs17 = require("node:fs");
77783
+ var import_node_fs18 = require("node:fs");
77415
77784
  var import_node_path18 = require("node:path");
77416
77785
  function parseCsv(raw) {
77417
77786
  if (!raw) return [];
@@ -77471,9 +77840,9 @@ async function handleMemory(subcommand, positionals, flags, context2) {
77471
77840
  if (contentInline !== void 0) {
77472
77841
  content = contentInline;
77473
77842
  } else if (filePath) {
77474
- content = (0, import_node_fs17.readFileSync)((0, import_node_path18.resolve)(filePath), "utf-8");
77843
+ content = (0, import_node_fs18.readFileSync)((0, import_node_path18.resolve)(filePath), "utf-8");
77475
77844
  } else if (useStdin) {
77476
- content = (0, import_node_fs17.readFileSync)(0, "utf-8");
77845
+ content = (0, import_node_fs18.readFileSync)(0, "utf-8");
77477
77846
  } else {
77478
77847
  throw new Error("Provide --file <path>, --stdin, or --content <text>");
77479
77848
  }
@@ -78130,8 +78499,8 @@ function normalizeManagedModelRows(payload) {
78130
78499
  function looksLikeGatewayPath(baseUrl) {
78131
78500
  try {
78132
78501
  const parsed = new URL(baseUrl);
78133
- const path7 = parsed.pathname.toLowerCase();
78134
- return path7.includes("/inference/v1") || path7.endsWith("/v1");
78502
+ const path8 = parsed.pathname.toLowerCase();
78503
+ return path8.includes("/inference/v1") || path8.endsWith("/v1");
78135
78504
  } catch {
78136
78505
  return false;
78137
78506
  }
@@ -78594,7 +78963,7 @@ async function handleOllama(subcommand, positionals, flags, context2) {
78594
78963
 
78595
78964
  // src/commands/fs.ts
78596
78965
  var import_promises = require("node:fs/promises");
78597
- var import_node_fs18 = require("node:fs");
78966
+ var import_node_fs19 = require("node:fs");
78598
78967
  var import_node_os5 = require("node:os");
78599
78968
  function getOrgOrThrow(flags, context2) {
78600
78969
  const orgId = getStringFlag(flags, ["org", "org-id", "org_id"]) ?? context2.orgId;
@@ -78838,7 +79207,7 @@ async function handleSync2(action, positionals, flags, context2) {
78838
79207
  for (const link of links.data) {
78839
79208
  let writable = false;
78840
79209
  try {
78841
- await (0, import_promises.access)(link.local_path, import_node_fs18.constants.R_OK | import_node_fs18.constants.W_OK);
79210
+ await (0, import_promises.access)(link.local_path, import_node_fs19.constants.R_OK | import_node_fs19.constants.W_OK);
78842
79211
  writable = true;
78843
79212
  } catch {
78844
79213
  writable = false;
@@ -78871,7 +79240,7 @@ async function handleFs(subcommand, positionals, flags, context2) {
78871
79240
  }
78872
79241
 
78873
79242
  // src/commands/local.ts
78874
- var import_node_fs19 = require("node:fs");
79243
+ var import_node_fs20 = require("node:fs");
78875
79244
  var import_node_crypto = require("node:crypto");
78876
79245
  var import_node_child_process10 = require("node:child_process");
78877
79246
  var import_node_os6 = require("node:os");
@@ -79289,7 +79658,7 @@ async function ensureManagedTool(tool, runtimeOptions) {
79289
79658
  if (findExecutable(tool)) {
79290
79659
  return;
79291
79660
  }
79292
- (0, import_node_fs19.mkdirSync)(MANAGED_BIN_DIR, { recursive: true });
79661
+ (0, import_node_fs20.mkdirSync)(MANAGED_BIN_DIR, { recursive: true });
79293
79662
  if (tool === "k3d") {
79294
79663
  printProgress(runtimeOptions, `Installing k3d ${K3D_VERSION} into ${MANAGED_BIN_DIR}...`);
79295
79664
  await installK3dBinary();
@@ -79370,9 +79739,9 @@ async function fetchText(url, headers) {
79370
79739
  }
79371
79740
  function writeExecutable(destination, bytes) {
79372
79741
  const tempPath = `${destination}.tmp-${Date.now()}-${process.pid}`;
79373
- (0, import_node_fs19.writeFileSync)(tempPath, bytes);
79374
- (0, import_node_fs19.chmodSync)(tempPath, 493);
79375
- (0, import_node_fs19.renameSync)(tempPath, destination);
79742
+ (0, import_node_fs20.writeFileSync)(tempPath, bytes);
79743
+ (0, import_node_fs20.chmodSync)(tempPath, 493);
79744
+ (0, import_node_fs20.renameSync)(tempPath, destination);
79376
79745
  }
79377
79746
  async function ensureClusterReady(runtimeOptions) {
79378
79747
  const k3d = requireToolPath("k3d", "Run 'eve local up' again to auto-install managed tools.");
@@ -79469,10 +79838,10 @@ async function fetchRegistryTags(imageRef) {
79469
79838
  if (slashIndex < 0) {
79470
79839
  throw new Error(`Invalid image reference '${imageRef}'.`);
79471
79840
  }
79472
- const registry = imageRef.slice(0, slashIndex);
79841
+ const registry2 = imageRef.slice(0, slashIndex);
79473
79842
  const repository = imageRef.slice(slashIndex + 1);
79474
79843
  const tagsPayload = await fetchText(
79475
- `https://${registry}/v2/${repository}/tags/list?n=200`
79844
+ `https://${registry2}/v2/${repository}/tags/list?n=200`
79476
79845
  );
79477
79846
  return JSON.parse(tagsPayload).tags ?? [];
79478
79847
  }
@@ -79522,8 +79891,8 @@ function importImageViaTar(docker, k3d, imageTag, component, stdio) {
79522
79891
  run(docker, ["image", "save", "--platform", "linux/amd64", imageTag, "-o", tarPath], { stdio });
79523
79892
  run(k3d, ["image", "import", "--mode", "direct", tarPath, "-c", DEFAULT_CLUSTER_NAME], { stdio });
79524
79893
  } finally {
79525
- if ((0, import_node_fs19.existsSync)(tarPath)) {
79526
- (0, import_node_fs19.unlinkSync)(tarPath);
79894
+ if ((0, import_node_fs20.existsSync)(tarPath)) {
79895
+ (0, import_node_fs20.unlinkSync)(tarPath);
79527
79896
  }
79528
79897
  }
79529
79898
  }
@@ -79796,7 +80165,7 @@ function assertLocalAssetsPresent() {
79796
80165
  (0, import_node_path19.join)(LOCAL_STACK_BASE, "auth-bootstrap-job.yaml")
79797
80166
  ];
79798
80167
  for (const file of files) {
79799
- if (!(0, import_node_fs19.existsSync)(file)) {
80168
+ if (!(0, import_node_fs20.existsSync)(file)) {
79800
80169
  throw new Error(
79801
80170
  `Missing local stack assets at ${file}. Reinstall the CLI or ensure package assets were published.`
79802
80171
  );
@@ -79884,7 +80253,7 @@ function parseTimeoutSeconds(flags, defaultValue) {
79884
80253
  }
79885
80254
  function run(command, args, options = {}) {
79886
80255
  const env = { ...process.env };
79887
- if ((0, import_node_fs19.existsSync)(MANAGED_BIN_DIR)) {
80256
+ if ((0, import_node_fs20.existsSync)(MANAGED_BIN_DIR)) {
79888
80257
  env.PATH = `${MANAGED_BIN_DIR}:${env.PATH ?? ""}`;
79889
80258
  }
79890
80259
  const result = (0, import_node_child_process10.spawnSync)(command, args, {
@@ -79905,7 +80274,7 @@ function run(command, args, options = {}) {
79905
80274
  }
79906
80275
  function findExecutable(name) {
79907
80276
  const managed = (0, import_node_path19.join)(MANAGED_BIN_DIR, name);
79908
- if ((0, import_node_fs19.existsSync)(managed)) {
80277
+ if ((0, import_node_fs20.existsSync)(managed)) {
79909
80278
  return managed;
79910
80279
  }
79911
80280
  const found = (0, import_node_child_process10.spawnSync)("which", [name], {
@@ -79923,11 +80292,11 @@ function ensureTool(name, installHint) {
79923
80292
  }
79924
80293
  }
79925
80294
  function requireToolPath(name, hint) {
79926
- const path7 = findExecutable(name);
79927
- if (!path7) {
80295
+ const path8 = findExecutable(name);
80296
+ if (!path8) {
79928
80297
  throw new Error(`Missing required tool '${name}'. ${hint}`);
79929
80298
  }
79930
- return path7;
80299
+ return path8;
79931
80300
  }
79932
80301
  function assertDockerRunning() {
79933
80302
  const docker = findExecutable("docker");