@eve-horizon/cli 0.2.35 → 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.
- package/dist/index.js +706 -410
- 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
|
|
8753
|
+
var sep2 = require("path").sep;
|
|
8754
8754
|
module2.exports = function(file) {
|
|
8755
|
-
var segments = file.split(
|
|
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] +
|
|
8768
|
+
basedir += segments[i] + sep2;
|
|
8769
8769
|
}
|
|
8770
8770
|
}
|
|
8771
|
-
var
|
|
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
|
-
|
|
8775
|
+
path8 += segments[i2];
|
|
8776
8776
|
} else {
|
|
8777
|
-
|
|
8777
|
+
path8 += segments[i2] + sep2;
|
|
8778
8778
|
}
|
|
8779
8779
|
}
|
|
8780
8780
|
return {
|
|
8781
8781
|
name,
|
|
8782
8782
|
basedir,
|
|
8783
|
-
path:
|
|
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
|
|
8890
|
-
var parse3 =
|
|
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
|
|
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
|
|
9269
|
+
var fs6 = require("fs");
|
|
9270
9270
|
var getHomedir = require_homedir();
|
|
9271
|
-
var
|
|
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" &&
|
|
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
|
-
|
|
9284
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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] =
|
|
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 ||
|
|
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 ||
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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
|
-
|
|
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(
|
|
9471
|
-
var pkgfile =
|
|
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(
|
|
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 =
|
|
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(
|
|
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(
|
|
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(
|
|
9517
|
-
var dir =
|
|
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(
|
|
9521
|
+
loadAsFile(path8.join(x2, "index"), pkg3, cb2);
|
|
9522
9522
|
});
|
|
9523
9523
|
});
|
|
9524
9524
|
return;
|
|
9525
9525
|
}
|
|
9526
|
-
loadAsFile(
|
|
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(
|
|
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
|
|
9764
|
-
var
|
|
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" &&
|
|
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
|
-
|
|
9777
|
-
|
|
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 =
|
|
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 =
|
|
9791
|
+
var stat = fs6.statSync(dir, { throwIfNoEntry: false });
|
|
9792
9792
|
} catch (e) {
|
|
9793
9793
|
if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
|
|
9794
9794
|
throw e;
|
|
@@ -9822,7 +9822,7 @@ var require_sync = __commonJS({
|
|
|
9822
9822
|
var getPackageCandidates = function getPackageCandidates2(x, start, opts) {
|
|
9823
9823
|
var dirs = nodeModulesPaths(start, opts, x);
|
|
9824
9824
|
for (var i = 0; i < dirs.length; i++) {
|
|
9825
|
-
dirs[i] =
|
|
9825
|
+
dirs[i] = path8.join(dirs[i], x);
|
|
9826
9826
|
}
|
|
9827
9827
|
return dirs;
|
|
9828
9828
|
};
|
|
@@ -9832,7 +9832,7 @@ var require_sync = __commonJS({
|
|
|
9832
9832
|
}
|
|
9833
9833
|
var opts = normalizeOptions(x, options);
|
|
9834
9834
|
var isFile = opts.isFile || defaultIsFile;
|
|
9835
|
-
var readFileSync24 = opts.readFileSync ||
|
|
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 ||
|
|
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,
|
|
9848
|
+
var absoluteStart = maybeRealpathSync(realpathSync, path8.resolve(basedir), opts);
|
|
9849
9849
|
if (relativePathRegex.test(x)) {
|
|
9850
|
-
var res =
|
|
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(
|
|
9864
|
+
var pkg = loadpkg(path8.dirname(x2));
|
|
9865
9865
|
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
|
|
9866
|
-
var rfile =
|
|
9866
|
+
var rfile = path8.relative(pkg.dir, x2);
|
|
9867
9867
|
var r = opts.pathFilter(pkg.pkg, x2, rfile);
|
|
9868
9868
|
if (r) {
|
|
9869
|
-
x2 =
|
|
9869
|
+
x2 = path8.resolve(pkg.dir, r);
|
|
9870
9870
|
}
|
|
9871
9871
|
}
|
|
9872
9872
|
if (isFile(x2)) {
|
|
@@ -9885,9 +9885,9 @@ var require_sync = __commonJS({
|
|
|
9885
9885
|
return;
|
|
9886
9886
|
}
|
|
9887
9887
|
if (nodeModulesRegex.test(dir)) return;
|
|
9888
|
-
var pkgfile =
|
|
9888
|
+
var pkgfile = path8.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
|
|
9889
9889
|
if (!isFile(pkgfile)) {
|
|
9890
|
-
return loadpkg(
|
|
9890
|
+
return loadpkg(path8.dirname(dir));
|
|
9891
9891
|
}
|
|
9892
9892
|
var pkg = readPackageSync(readFileSync24, pkgfile);
|
|
9893
9893
|
if (pkg && opts.packageFilter) {
|
|
@@ -9900,7 +9900,7 @@ var require_sync = __commonJS({
|
|
|
9900
9900
|
return { pkg, dir };
|
|
9901
9901
|
}
|
|
9902
9902
|
function loadAsDirectorySync(x2) {
|
|
9903
|
-
var pkgfile =
|
|
9903
|
+
var pkgfile = path8.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
|
|
9904
9904
|
if (isFile(pkgfile)) {
|
|
9905
9905
|
try {
|
|
9906
9906
|
var pkg = readPackageSync(readFileSync24, pkgfile);
|
|
@@ -9923,15 +9923,15 @@ var require_sync = __commonJS({
|
|
|
9923
9923
|
pkg.main = "index";
|
|
9924
9924
|
}
|
|
9925
9925
|
try {
|
|
9926
|
-
var m2 = loadAsFileSync(
|
|
9926
|
+
var m2 = loadAsFileSync(path8.resolve(x2, pkg.main));
|
|
9927
9927
|
if (m2) return m2;
|
|
9928
|
-
var n2 = loadAsDirectorySync(
|
|
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(
|
|
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(
|
|
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
|
|
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 =
|
|
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 +
|
|
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 =
|
|
10283
|
-
return
|
|
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
|
|
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
|
|
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
|
|
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 +
|
|
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
|
|
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)(
|
|
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 =
|
|
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 &&
|
|
10855
|
-
const parsedPath =
|
|
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 =
|
|
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
|
|
18112
|
-
var
|
|
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 =
|
|
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 =
|
|
18142
|
+
let filename = path8.resolve(taskRoot, moduleRoot, module3);
|
|
18143
18143
|
if (!filename.endsWith(".js")) {
|
|
18144
18144
|
try {
|
|
18145
|
-
|
|
18145
|
+
fs6.statSync(`${filename}.js`);
|
|
18146
18146
|
filename += ".js";
|
|
18147
18147
|
} catch (e) {
|
|
18148
18148
|
try {
|
|
18149
|
-
|
|
18149
|
+
fs6.statSync(`${filename}.mjs`);
|
|
18150
18150
|
filename += ".mjs";
|
|
18151
18151
|
} catch (e2) {
|
|
18152
18152
|
try {
|
|
18153
|
-
|
|
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 = (
|
|
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 `${
|
|
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)(
|
|
21316
|
+
return (0, exports2.getRouterPath)(path8, stackLayer);
|
|
21317
21317
|
}
|
|
21318
|
-
return
|
|
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((
|
|
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(
|
|
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:
|
|
22164
|
+
objectToPatch: fs6[functionName1],
|
|
22165
22165
|
functionNameToPatch: functionName2
|
|
22166
22166
|
};
|
|
22167
22167
|
} else {
|
|
22168
22168
|
return {
|
|
22169
|
-
objectToPatch:
|
|
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", ["*"], (
|
|
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)(
|
|
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)(
|
|
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)(
|
|
22221
|
-
this._unwrap(
|
|
22220
|
+
if ((0, instrumentation_1.isWrapped)(fs6.promises[fName])) {
|
|
22221
|
+
this._unwrap(fs6.promises, fName);
|
|
22222
22222
|
}
|
|
22223
|
-
this._wrap(
|
|
22223
|
+
this._wrap(fs6.promises, fName, this._patchPromiseFunction.bind(this, fName));
|
|
22224
22224
|
}
|
|
22225
|
-
return
|
|
22226
|
-
}, (
|
|
22227
|
-
if (
|
|
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)(
|
|
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)(
|
|
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)(
|
|
22243
|
-
this._unwrap(
|
|
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(
|
|
22397
|
-
return new Promise((resolve8) => functionWithOriginalProperties(
|
|
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,
|
|
22773
|
-
let field = getField(contextValue,
|
|
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,
|
|
22777
|
+
const parent = getParentField(contextValue, path8);
|
|
22778
22778
|
field = {
|
|
22779
22779
|
parent,
|
|
22780
|
-
span: createResolverSpan(tracer, getConfig, contextValue, info,
|
|
22780
|
+
span: createResolverSpan(tracer, getConfig, contextValue, info, path8, parent.span),
|
|
22781
22781
|
error: null
|
|
22782
22782
|
};
|
|
22783
|
-
addField(contextValue,
|
|
22783
|
+
addField(contextValue, path8, field);
|
|
22784
22784
|
}
|
|
22785
22785
|
return { spanAdded, field };
|
|
22786
22786
|
}
|
|
22787
|
-
function createResolverSpan(tracer, getConfig, contextValue, info,
|
|
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]:
|
|
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,
|
|
22832
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
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,
|
|
22835
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
22834
|
+
function getField(contextValue, path8) {
|
|
22835
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path8.join(".")];
|
|
22836
22836
|
}
|
|
22837
|
-
function getParentField(contextValue,
|
|
22838
|
-
for (let i =
|
|
22839
|
-
const field = getField(contextValue,
|
|
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,
|
|
22848
|
+
function pathToArray(mergeItems, path8) {
|
|
22849
22849
|
const flattened = [];
|
|
22850
|
-
let curr =
|
|
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
|
|
22988
|
-
const depth =
|
|
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,
|
|
22992
|
+
field = getParentField(contextValue, path8);
|
|
22993
22993
|
} else {
|
|
22994
|
-
const newField = createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
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
|
|
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}${
|
|
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
|
|
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,
|
|
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(
|
|
36918
|
-
return original.call(this,
|
|
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
|
|
38866
|
+
for (const path8 of paths) {
|
|
38867
38867
|
try {
|
|
38868
|
-
const result = await fs_1.promises.readFile(
|
|
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
|
|
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,
|
|
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(
|
|
39833
|
-
AwsBeanstalkDetectorSync.fileAccessAsync = util2.promisify(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
40355
|
-
AwsEksDetectorSync.fileAccessAsync = util2.promisify(
|
|
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
|
|
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(
|
|
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
|
|
41557
|
-
if (
|
|
41556
|
+
const path8 = url.path;
|
|
41557
|
+
if (path8.length === 0) {
|
|
41558
41558
|
return;
|
|
41559
41559
|
}
|
|
41560
|
-
if (url.scheme === "file" &&
|
|
41560
|
+
if (url.scheme === "file" && path8.length === 1 && isNormalizedWindowsDriveLetter(path8[0])) {
|
|
41561
41561
|
return;
|
|
41562
41562
|
}
|
|
41563
|
-
|
|
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(
|
|
48616
|
-
if (!(0, import_node_fs.existsSync)(
|
|
48617
|
-
const raw = (0, import_node_fs.readFileSync)(
|
|
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 ${
|
|
48622
|
+
throw new Error(`Failed to parse ${path8}: ${error.message}`);
|
|
48623
48623
|
}
|
|
48624
48624
|
}
|
|
48625
|
-
function writeJsonFile(
|
|
48625
|
+
function writeJsonFile(path8, value) {
|
|
48626
48626
|
ensureConfigDir();
|
|
48627
|
-
(0, import_node_fs.writeFileSync)(
|
|
48627
|
+
(0, import_node_fs.writeFileSync)(path8, JSON.stringify(value, null, 2));
|
|
48628
48628
|
try {
|
|
48629
|
-
(0, import_node_fs.chmodSync)(
|
|
48629
|
+
(0, import_node_fs.chmodSync)(path8, 384);
|
|
48630
48630
|
} catch {
|
|
48631
48631
|
}
|
|
48632
48632
|
}
|
|
@@ -51468,8 +51468,8 @@ function showSubcommandHelp(command, subcommand) {
|
|
|
51468
51468
|
}
|
|
51469
51469
|
|
|
51470
51470
|
// src/lib/client.ts
|
|
51471
|
-
async function requestJson(context2,
|
|
51472
|
-
const response = await requestRaw(context2,
|
|
51471
|
+
async function requestJson(context2, path8, options = {}) {
|
|
51472
|
+
const response = await requestRaw(context2, path8, options);
|
|
51473
51473
|
const method = options.method ?? "GET";
|
|
51474
51474
|
if (response.status === 401 && options.tokenOverride === void 0) {
|
|
51475
51475
|
const refreshed = await attemptRefresh(context2);
|
|
@@ -51477,20 +51477,20 @@ async function requestJson(context2, path7, options = {}) {
|
|
|
51477
51477
|
context2.token = refreshed.access_token;
|
|
51478
51478
|
context2.refreshToken = refreshed.refresh_token;
|
|
51479
51479
|
context2.expiresAt = refreshed.expires_at;
|
|
51480
|
-
const retry = await requestRaw(context2,
|
|
51480
|
+
const retry = await requestRaw(context2, path8, {
|
|
51481
51481
|
...options,
|
|
51482
51482
|
tokenOverride: refreshed.access_token
|
|
51483
51483
|
});
|
|
51484
51484
|
if (!retry.ok && !options.allowError) {
|
|
51485
51485
|
const message = formatErrorMessage(retry);
|
|
51486
|
-
throw new Error(`HTTP ${retry.status}: ${method} ${
|
|
51486
|
+
throw new Error(`HTTP ${retry.status}: ${method} ${path8}: ${message}`);
|
|
51487
51487
|
}
|
|
51488
51488
|
return retry.data;
|
|
51489
51489
|
}
|
|
51490
51490
|
}
|
|
51491
51491
|
if (!response.ok && !options.allowError) {
|
|
51492
51492
|
const message = formatErrorMessage(response);
|
|
51493
|
-
const requestTarget = `${method} ${
|
|
51493
|
+
const requestTarget = `${method} ${path8}`;
|
|
51494
51494
|
const requestFailedContext = `while calling ${requestTarget}: ${message}`;
|
|
51495
51495
|
if ((response.status === 404 || response.status === 500) && message.includes("Project not found")) {
|
|
51496
51496
|
const projectIdMatch = message.match(/Project not found: (proj_[a-z0-9]+)/);
|
|
@@ -51522,7 +51522,7 @@ function unwrapListResponse(value) {
|
|
|
51522
51522
|
}
|
|
51523
51523
|
throw new Error("Expected list response envelope with data[]");
|
|
51524
51524
|
}
|
|
51525
|
-
async function requestRaw(context2,
|
|
51525
|
+
async function requestRaw(context2, path8, options = {}) {
|
|
51526
51526
|
const headers = {
|
|
51527
51527
|
...options.headers
|
|
51528
51528
|
};
|
|
@@ -51533,7 +51533,7 @@ async function requestRaw(context2, path7, options = {}) {
|
|
|
51533
51533
|
if (token) {
|
|
51534
51534
|
headers.Authorization = `Bearer ${token}`;
|
|
51535
51535
|
}
|
|
51536
|
-
const url = `${context2.apiUrl}${
|
|
51536
|
+
const url = `${context2.apiUrl}${path8}`;
|
|
51537
51537
|
const method = options.method ?? "GET";
|
|
51538
51538
|
let response;
|
|
51539
51539
|
try {
|
|
@@ -52389,7 +52389,7 @@ function buildQuery2(params) {
|
|
|
52389
52389
|
}
|
|
52390
52390
|
|
|
52391
52391
|
// src/commands/job.ts
|
|
52392
|
-
var
|
|
52392
|
+
var import_child_process2 = require("child_process");
|
|
52393
52393
|
var import_fs = require("fs");
|
|
52394
52394
|
var import_path = require("path");
|
|
52395
52395
|
|
|
@@ -52871,8 +52871,8 @@ function getErrorMap() {
|
|
|
52871
52871
|
|
|
52872
52872
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
52873
52873
|
var makeIssue = (params) => {
|
|
52874
|
-
const { data, path:
|
|
52875
|
-
const fullPath = [...
|
|
52874
|
+
const { data, path: path8, errorMaps, issueData } = params;
|
|
52875
|
+
const fullPath = [...path8, ...issueData.path || []];
|
|
52876
52876
|
const fullIssue = {
|
|
52877
52877
|
...issueData,
|
|
52878
52878
|
path: fullPath
|
|
@@ -52988,11 +52988,11 @@ var errorUtil;
|
|
|
52988
52988
|
|
|
52989
52989
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
52990
52990
|
var ParseInputLazyPath = class {
|
|
52991
|
-
constructor(parent, value,
|
|
52991
|
+
constructor(parent, value, path8, key) {
|
|
52992
52992
|
this._cachedPath = [];
|
|
52993
52993
|
this.parent = parent;
|
|
52994
52994
|
this.data = value;
|
|
52995
|
-
this._path =
|
|
52995
|
+
this._path = path8;
|
|
52996
52996
|
this._key = key;
|
|
52997
52997
|
}
|
|
52998
52998
|
get path() {
|
|
@@ -56536,6 +56536,81 @@ var configSchema = external_exports.object({
|
|
|
56536
56536
|
ZAI_MODEL: external_exports.string().optional()
|
|
56537
56537
|
});
|
|
56538
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
|
+
|
|
56539
56614
|
// ../shared/dist/harnesses/auth.js
|
|
56540
56615
|
var import_node_child_process2 = require("node:child_process");
|
|
56541
56616
|
var import_node_fs4 = require("node:fs");
|
|
@@ -56726,6 +56801,207 @@ var HARNESS_CAPABILITIES = {
|
|
|
56726
56801
|
}
|
|
56727
56802
|
};
|
|
56728
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
|
+
|
|
56729
57005
|
// ../shared/dist/types/job.js
|
|
56730
57006
|
var JobStatus;
|
|
56731
57007
|
(function(JobStatus2) {
|
|
@@ -57468,7 +57744,8 @@ var AuthStatusResponseSchema = external_exports.object({
|
|
|
57468
57744
|
is_admin: external_exports.boolean().optional(),
|
|
57469
57745
|
is_job_token: external_exports.boolean().optional(),
|
|
57470
57746
|
is_service_principal: external_exports.boolean().optional(),
|
|
57471
|
-
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()
|
|
57472
57749
|
});
|
|
57473
57750
|
var AuthChallengeRequestSchema = external_exports.object({
|
|
57474
57751
|
provider: external_exports.enum(["github_ssh", "nostr"]).default("github_ssh"),
|
|
@@ -59826,23 +60103,23 @@ var correlationStorage = new import_async_hooks.AsyncLocalStorage();
|
|
|
59826
60103
|
var import_auto_instrumentations_node = __toESM(require_src57(), 1);
|
|
59827
60104
|
|
|
59828
60105
|
// ../shared/dist/lib/pack-resolver.js
|
|
59829
|
-
var
|
|
59830
|
-
var
|
|
60106
|
+
var fs2 = __toESM(require("node:fs"), 1);
|
|
60107
|
+
var path3 = __toESM(require("node:path"), 1);
|
|
59831
60108
|
var os = __toESM(require("node:os"), 1);
|
|
59832
60109
|
var import_node_child_process3 = require("node:child_process");
|
|
59833
60110
|
var import_yaml2 = require("yaml");
|
|
59834
|
-
var CACHE_ROOT =
|
|
60111
|
+
var CACHE_ROOT = path3.join(os.homedir(), ".eve", "cache", "packs");
|
|
59835
60112
|
async function resolvePack(entry, projectSlug, repoRoot) {
|
|
59836
60113
|
const packDir = await fetchPackSource(entry, repoRoot);
|
|
59837
|
-
const packYamlPath =
|
|
59838
|
-
const eveDir =
|
|
59839
|
-
if (
|
|
59840
|
-
const raw =
|
|
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");
|
|
59841
60118
|
const parsed = PackYamlSchema.parse((0, import_yaml2.parse)(raw));
|
|
59842
|
-
const agents = loadYamlMap(
|
|
59843
|
-
const teams = loadYamlMap(
|
|
59844
|
-
const chat = parsed.imports.chat ? loadYamlMap(
|
|
59845
|
-
const xEve = parsed.imports.x_eve ? loadYamlMap(
|
|
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;
|
|
59846
60123
|
const prefixedAgents = prefixAgentSlugs(agents, projectSlug);
|
|
59847
60124
|
const packDefaultPolicy = parsed.gateway?.default_policy ?? "none";
|
|
59848
60125
|
const gatewayResolvedAgents = resolveAgentGatewayPolicies(prefixedAgents, packDefaultPolicy);
|
|
@@ -59858,12 +60135,12 @@ async function resolvePack(entry, projectSlug, repoRoot) {
|
|
|
59858
60135
|
skillPaths: skillPaths2
|
|
59859
60136
|
};
|
|
59860
60137
|
}
|
|
59861
|
-
if (
|
|
60138
|
+
if (fs2.existsSync(eveDir)) {
|
|
59862
60139
|
throw new Error(`Pack "${entry.source}" has eve/ directory but no pack.yaml. Add eve/pack.yaml or remove the eve/ directory.`);
|
|
59863
60140
|
}
|
|
59864
60141
|
const skillPaths = discoverSkillPaths(packDir);
|
|
59865
60142
|
return {
|
|
59866
|
-
id:
|
|
60143
|
+
id: path3.basename(packDir),
|
|
59867
60144
|
source: entry.source,
|
|
59868
60145
|
ref: entry.ref ?? resolveLocalRef(packDir),
|
|
59869
60146
|
agents: {},
|
|
@@ -59877,8 +60154,8 @@ async function fetchPackSource(entry, repoRoot) {
|
|
|
59877
60154
|
const { source, ref } = entry;
|
|
59878
60155
|
if (source.startsWith("./") || source.startsWith("../") || source.startsWith("/")) {
|
|
59879
60156
|
const base = repoRoot ?? process.cwd();
|
|
59880
|
-
const resolved =
|
|
59881
|
-
if (!
|
|
60157
|
+
const resolved = path3.resolve(base, source);
|
|
60158
|
+
if (!fs2.existsSync(resolved)) {
|
|
59882
60159
|
throw new Error(`Local pack source not found: ${resolved}`);
|
|
59883
60160
|
}
|
|
59884
60161
|
return resolved;
|
|
@@ -59886,17 +60163,17 @@ async function fetchPackSource(entry, repoRoot) {
|
|
|
59886
60163
|
if (!ref) {
|
|
59887
60164
|
throw new Error(`Remote pack source "${source}" requires a ref (40-char SHA)`);
|
|
59888
60165
|
}
|
|
59889
|
-
const cacheDir =
|
|
59890
|
-
if (
|
|
60166
|
+
const cacheDir = path3.join(CACHE_ROOT, ref);
|
|
60167
|
+
if (fs2.existsSync(cacheDir)) {
|
|
59891
60168
|
return cacheDir;
|
|
59892
60169
|
}
|
|
59893
|
-
|
|
60170
|
+
fs2.mkdirSync(cacheDir, { recursive: true });
|
|
59894
60171
|
try {
|
|
59895
60172
|
const gitUrl = resolveGitUrl(source);
|
|
59896
60173
|
(0, import_node_child_process3.execSync)(`git clone --depth 1 ${JSON.stringify(gitUrl)} ${JSON.stringify(cacheDir)}`, { stdio: "pipe", timeout: 6e4 });
|
|
59897
60174
|
(0, import_node_child_process3.execSync)(`git -C ${JSON.stringify(cacheDir)} checkout ${ref}`, { stdio: "pipe", timeout: 3e4 });
|
|
59898
60175
|
} catch (err) {
|
|
59899
|
-
|
|
60176
|
+
fs2.rmSync(cacheDir, { recursive: true, force: true });
|
|
59900
60177
|
throw new Error(`Failed to clone pack "${source}" at ref ${ref}: ${err}`);
|
|
59901
60178
|
}
|
|
59902
60179
|
return cacheDir;
|
|
@@ -59914,10 +60191,10 @@ function resolveGitUrl(source) {
|
|
|
59914
60191
|
return source;
|
|
59915
60192
|
}
|
|
59916
60193
|
function loadYamlMap(filePath) {
|
|
59917
|
-
if (!
|
|
60194
|
+
if (!fs2.existsSync(filePath)) {
|
|
59918
60195
|
throw new Error(`Pack import file not found: ${filePath}`);
|
|
59919
60196
|
}
|
|
59920
|
-
const raw =
|
|
60197
|
+
const raw = fs2.readFileSync(filePath, "utf-8");
|
|
59921
60198
|
const parsed = (0, import_yaml2.parse)(raw);
|
|
59922
60199
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
|
|
59923
60200
|
throw new Error(`Pack import file must be a YAML map: ${filePath}`);
|
|
@@ -59983,16 +60260,16 @@ function resolveAgentGatewayPolicies(agentsConfig, packDefaultPolicy) {
|
|
|
59983
60260
|
}
|
|
59984
60261
|
function discoverSkillPaths(packDir) {
|
|
59985
60262
|
const paths = [];
|
|
59986
|
-
const skillsDir =
|
|
59987
|
-
if (!
|
|
60263
|
+
const skillsDir = path3.join(packDir, "skills");
|
|
60264
|
+
if (!fs2.existsSync(skillsDir)) {
|
|
59988
60265
|
return paths;
|
|
59989
60266
|
}
|
|
59990
60267
|
const walk = (dir) => {
|
|
59991
|
-
for (const entry of
|
|
60268
|
+
for (const entry of fs2.readdirSync(dir, { withFileTypes: true })) {
|
|
59992
60269
|
if (!entry.isDirectory() || entry.name.startsWith("."))
|
|
59993
60270
|
continue;
|
|
59994
|
-
const fullPath =
|
|
59995
|
-
if (
|
|
60271
|
+
const fullPath = path3.join(dir, entry.name);
|
|
60272
|
+
if (fs2.existsSync(path3.join(fullPath, "SKILL.md"))) {
|
|
59996
60273
|
paths.push(fullPath);
|
|
59997
60274
|
}
|
|
59998
60275
|
walk(fullPath);
|
|
@@ -60081,10 +60358,10 @@ function mergeXEve(packFragments, projectXEve) {
|
|
|
60081
60358
|
// ../shared/dist/lib/resource-uris.js
|
|
60082
60359
|
var ORG_DOCS_PREFIX = "org_docs:/";
|
|
60083
60360
|
var JOB_ATTACHMENTS_PREFIX = "job_attachments:/";
|
|
60084
|
-
function normalizeOrgDocPath(
|
|
60085
|
-
if (!
|
|
60361
|
+
function normalizeOrgDocPath(path8) {
|
|
60362
|
+
if (!path8)
|
|
60086
60363
|
return "/";
|
|
60087
|
-
return
|
|
60364
|
+
return path8.startsWith("/") ? path8 : `/${path8}`;
|
|
60088
60365
|
}
|
|
60089
60366
|
function parseResourceUri(uri) {
|
|
60090
60367
|
if (!uri || typeof uri !== "string")
|
|
@@ -60095,11 +60372,11 @@ function parseResourceUri(uri) {
|
|
|
60095
60372
|
return null;
|
|
60096
60373
|
const match = raw.match(/^(.*)@v(\d+)$/);
|
|
60097
60374
|
if (match) {
|
|
60098
|
-
const
|
|
60375
|
+
const path8 = normalizeOrgDocPath(match[1]);
|
|
60099
60376
|
const version2 = Number(match[2]);
|
|
60100
60377
|
if (!Number.isFinite(version2) || version2 <= 0)
|
|
60101
60378
|
return null;
|
|
60102
|
-
return { scheme: "org_docs", path:
|
|
60379
|
+
return { scheme: "org_docs", path: path8, version: version2 };
|
|
60103
60380
|
}
|
|
60104
60381
|
return { scheme: "org_docs", path: normalizeOrgDocPath(raw) };
|
|
60105
60382
|
}
|
|
@@ -61906,6 +62183,11 @@ var ALL_PERMISSIONS = [
|
|
|
61906
62183
|
];
|
|
61907
62184
|
var PERMISSION_SET = new Set(ALL_PERMISSIONS);
|
|
61908
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
|
+
|
|
61909
62191
|
// src/commands/job.ts
|
|
61910
62192
|
async function handleJob(subcommand, positionals, flags, context2) {
|
|
61911
62193
|
const json = Boolean(flags.json);
|
|
@@ -64494,7 +64776,7 @@ async function handleRunnerLogs(positionals, flags, context2) {
|
|
|
64494
64776
|
console.log(`No pod_name in runtime_meta, using label selector: job-id=${jobId}`);
|
|
64495
64777
|
kubectlArgs = ["-n", "eve", "logs", "-f", "-l", `job-id=${jobId}`];
|
|
64496
64778
|
}
|
|
64497
|
-
const kubectl = (0,
|
|
64779
|
+
const kubectl = (0, import_child_process2.spawn)("kubectl", kubectlArgs, {
|
|
64498
64780
|
stdio: "inherit"
|
|
64499
64781
|
});
|
|
64500
64782
|
return new Promise((resolve8, reject) => {
|
|
@@ -64973,8 +65255,21 @@ async function handleAuth(subcommand, flags, context2, credentials) {
|
|
|
64973
65255
|
}
|
|
64974
65256
|
if (!json && data.permissions && data.permissions.length > 0) {
|
|
64975
65257
|
console.log(`User: ${data.user_id ?? "unknown"} (${data.email ?? "no email"})`);
|
|
64976
|
-
|
|
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}`);
|
|
64977
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
|
+
}
|
|
64978
65273
|
console.log(`
|
|
64979
65274
|
Permissions (${data.permissions.length}):`);
|
|
64980
65275
|
for (const perm of data.permissions) {
|
|
@@ -65244,37 +65539,14 @@ Permissions (${data.permissions.length}):`);
|
|
|
65244
65539
|
}
|
|
65245
65540
|
}
|
|
65246
65541
|
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN || !extractedTokens.CODEX_AUTH_JSON_B64) {
|
|
65247
|
-
const
|
|
65248
|
-
|
|
65249
|
-
|
|
65250
|
-
|
|
65251
|
-
|
|
65252
|
-
|
|
65253
|
-
|
|
65254
|
-
|
|
65255
|
-
const auth = JSON.parse(content);
|
|
65256
|
-
if (!extractedTokens.CODEX_AUTH_JSON_B64) {
|
|
65257
|
-
extractedTokens.CODEX_AUTH_JSON_B64 = Buffer.from(content, "utf8").toString("base64");
|
|
65258
|
-
}
|
|
65259
|
-
const tokens = auth.tokens;
|
|
65260
|
-
if (tokens?.access_token) {
|
|
65261
|
-
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
|
|
65262
|
-
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = tokens.access_token;
|
|
65263
|
-
}
|
|
65264
|
-
break;
|
|
65265
|
-
}
|
|
65266
|
-
if (auth.oauth_token || auth.access_token) {
|
|
65267
|
-
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
|
|
65268
|
-
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = auth.oauth_token || auth.access_token;
|
|
65269
|
-
}
|
|
65270
|
-
break;
|
|
65271
|
-
}
|
|
65272
|
-
if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
|
|
65273
|
-
extractedTokens.OPENAI_API_KEY = auth.OPENAI_API_KEY;
|
|
65274
|
-
break;
|
|
65275
|
-
}
|
|
65276
|
-
} catch {
|
|
65277
|
-
}
|
|
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;
|
|
65278
65550
|
}
|
|
65279
65551
|
}
|
|
65280
65552
|
}
|
|
@@ -65429,37 +65701,15 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
|
|
|
65429
65701
|
}
|
|
65430
65702
|
}
|
|
65431
65703
|
if (!codexFound) {
|
|
65432
|
-
const
|
|
65433
|
-
|
|
65434
|
-
|
|
65435
|
-
|
|
65436
|
-
|
|
65437
|
-
|
|
65438
|
-
|
|
65439
|
-
|
|
65440
|
-
|
|
65441
|
-
const tokens = auth.tokens;
|
|
65442
|
-
if (tokens?.access_token) {
|
|
65443
|
-
codexFound = true;
|
|
65444
|
-
codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
|
|
65445
|
-
codexPreview = tokens.access_token.substring(0, 15) + "...";
|
|
65446
|
-
break;
|
|
65447
|
-
}
|
|
65448
|
-
if (auth.oauth_token || auth.access_token) {
|
|
65449
|
-
codexFound = true;
|
|
65450
|
-
codexSource = authPath.replace((0, import_node_os3.homedir)(), "~");
|
|
65451
|
-
const token = auth.oauth_token || auth.access_token;
|
|
65452
|
-
codexPreview = token.substring(0, 15) + "...";
|
|
65453
|
-
break;
|
|
65454
|
-
}
|
|
65455
|
-
if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
|
|
65456
|
-
codexFound = true;
|
|
65457
|
-
codexSource = authPath.replace((0, import_node_os3.homedir)(), "~") + " (API key)";
|
|
65458
|
-
codexPreview = auth.OPENAI_API_KEY.substring(0, 10) + "...";
|
|
65459
|
-
break;
|
|
65460
|
-
}
|
|
65461
|
-
} catch {
|
|
65462
|
-
}
|
|
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) + "...";
|
|
65463
65713
|
}
|
|
65464
65714
|
}
|
|
65465
65715
|
}
|
|
@@ -65711,6 +65961,52 @@ No token minted (use --scopes to mint a token).`);
|
|
|
65711
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>");
|
|
65712
65962
|
}
|
|
65713
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
|
+
}
|
|
65714
66010
|
function signNonceWithSsh(keyPath, nonce) {
|
|
65715
66011
|
const tempDir = (0, import_node_fs5.mkdtempSync)((0, import_node_path5.join)((0, import_node_os3.tmpdir)(), "eve-auth-"));
|
|
65716
66012
|
const noncePath = (0, import_node_path5.join)(tempDir, "nonce");
|
|
@@ -66804,9 +67100,9 @@ function getOrchestratorUrl(context2) {
|
|
|
66804
67100
|
apiUrl.port = orchPort;
|
|
66805
67101
|
return apiUrl.toString().replace(/\/$/, "");
|
|
66806
67102
|
}
|
|
66807
|
-
async function requestOrchestratorJson(context2,
|
|
67103
|
+
async function requestOrchestratorJson(context2, path8, options) {
|
|
66808
67104
|
const orchUrl = getOrchestratorUrl(context2);
|
|
66809
|
-
const url = `${orchUrl}${
|
|
67105
|
+
const url = `${orchUrl}${path8}`;
|
|
66810
67106
|
const headers = {};
|
|
66811
67107
|
if (options?.body) {
|
|
66812
67108
|
headers["Content-Type"] = "application/json";
|
|
@@ -69012,13 +69308,13 @@ async function handleCall(positionals, flags, context2) {
|
|
|
69012
69308
|
const body = graphqlBody ?? jsonBody;
|
|
69013
69309
|
const method = methodInput.toUpperCase();
|
|
69014
69310
|
const resolvedBaseUrl = resolveApiBaseUrlForRuntime(api.base_url, context2.apiUrl);
|
|
69015
|
-
const
|
|
69311
|
+
const path8 = resolveApiPath(resolvedBaseUrl, pathInput);
|
|
69016
69312
|
const tokenOverride = getStringFlag(flags, ["token"]);
|
|
69017
69313
|
const authToken = tokenOverride ?? process.env.EVE_JOB_TOKEN ?? context2.token;
|
|
69018
69314
|
if (printCurl) {
|
|
69019
69315
|
const curl = buildCurlCommand({
|
|
69020
69316
|
method,
|
|
69021
|
-
url:
|
|
69317
|
+
url: path8,
|
|
69022
69318
|
authToken,
|
|
69023
69319
|
jsonBody: body,
|
|
69024
69320
|
authHint: tokenOverride ? "override" : process.env.EVE_JOB_TOKEN ? "job" : "user"
|
|
@@ -69026,7 +69322,7 @@ async function handleCall(positionals, flags, context2) {
|
|
|
69026
69322
|
console.log(curl);
|
|
69027
69323
|
return;
|
|
69028
69324
|
}
|
|
69029
|
-
const response = await fetch(
|
|
69325
|
+
const response = await fetch(path8, {
|
|
69030
69326
|
method,
|
|
69031
69327
|
headers: buildApiHeaders(authToken, body),
|
|
69032
69328
|
body: body ? JSON.stringify(body) : void 0
|
|
@@ -69122,7 +69418,7 @@ async function fetchApiSpec(context2, projectId, name, env) {
|
|
|
69122
69418
|
function buildCurlExamples(api, spec) {
|
|
69123
69419
|
const paths = spec.paths ?? {};
|
|
69124
69420
|
const examples = [];
|
|
69125
|
-
Object.entries(paths).forEach(([
|
|
69421
|
+
Object.entries(paths).forEach(([path8, methods]) => {
|
|
69126
69422
|
Object.entries(methods).forEach(([method, operation]) => {
|
|
69127
69423
|
const lower = method.toLowerCase();
|
|
69128
69424
|
if (!["get", "post", "put", "patch", "delete"].includes(lower)) {
|
|
@@ -69133,7 +69429,7 @@ function buildCurlExamples(api, spec) {
|
|
|
69133
69429
|
const needsBody = ["post", "put", "patch"].includes(lower);
|
|
69134
69430
|
const curl = buildCurlCommand({
|
|
69135
69431
|
method: lower.toUpperCase(),
|
|
69136
|
-
url: resolveApiPath(api.base_url,
|
|
69432
|
+
url: resolveApiPath(api.base_url, path8),
|
|
69137
69433
|
authToken: api.auth_mode === "eve" ? "$EVE_JOB_TOKEN" : void 0,
|
|
69138
69434
|
jsonBody: needsBody ? examplePayload ?? {} : void 0,
|
|
69139
69435
|
authHint: "job"
|
|
@@ -69155,15 +69451,15 @@ function extractExamplePayload(requestBody) {
|
|
|
69155
69451
|
if (examples.length === 0) return void 0;
|
|
69156
69452
|
return examples[0]?.value;
|
|
69157
69453
|
}
|
|
69158
|
-
function resolveApiPath(baseUrl,
|
|
69159
|
-
if (
|
|
69160
|
-
return
|
|
69454
|
+
function resolveApiPath(baseUrl, path8) {
|
|
69455
|
+
if (path8.startsWith("http://") || path8.startsWith("https://")) {
|
|
69456
|
+
return path8;
|
|
69161
69457
|
}
|
|
69162
69458
|
if (!baseUrl) {
|
|
69163
|
-
return
|
|
69459
|
+
return path8;
|
|
69164
69460
|
}
|
|
69165
69461
|
const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
|
|
69166
|
-
const trimmedPath =
|
|
69462
|
+
const trimmedPath = path8.startsWith("/") ? path8 : `/${path8}`;
|
|
69167
69463
|
return `${trimmedBase}${trimmedPath}`;
|
|
69168
69464
|
}
|
|
69169
69465
|
function resolveApiBaseUrlForRuntime(baseUrl, eveApiUrl) {
|
|
@@ -70892,13 +71188,13 @@ function Subscribe(postgres2, options) {
|
|
|
70892
71188
|
}
|
|
70893
71189
|
}
|
|
70894
71190
|
function handle(a, b2) {
|
|
70895
|
-
const
|
|
71191
|
+
const path8 = b2.relation.schema + "." + b2.relation.table;
|
|
70896
71192
|
call("*", a, b2);
|
|
70897
|
-
call("*:" +
|
|
70898
|
-
b2.relation.keys.length && call("*:" +
|
|
71193
|
+
call("*:" + path8, a, b2);
|
|
71194
|
+
b2.relation.keys.length && call("*:" + path8 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
|
|
70899
71195
|
call(b2.command, a, b2);
|
|
70900
|
-
call(b2.command + ":" +
|
|
70901
|
-
b2.relation.keys.length && call(b2.command + ":" +
|
|
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);
|
|
70902
71198
|
}
|
|
70903
71199
|
function pong() {
|
|
70904
71200
|
const x2 = Buffer.alloc(34);
|
|
@@ -71011,8 +71307,8 @@ function parseEvent(x) {
|
|
|
71011
71307
|
const xs = x.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
|
|
71012
71308
|
if (!xs)
|
|
71013
71309
|
throw new Error("Malformed subscribe pattern: " + x);
|
|
71014
|
-
const [, command,
|
|
71015
|
-
return (command || "*") + (
|
|
71310
|
+
const [, command, path8, key] = xs;
|
|
71311
|
+
return (command || "*") + (path8 ? ":" + (path8.indexOf(".") === -1 ? "public." + path8 : path8) : "") + (key ? "=" + key : "");
|
|
71016
71312
|
}
|
|
71017
71313
|
|
|
71018
71314
|
// ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/large.js
|
|
@@ -71157,10 +71453,10 @@ function Postgres(a, b2) {
|
|
|
71157
71453
|
});
|
|
71158
71454
|
return query;
|
|
71159
71455
|
}
|
|
71160
|
-
function file(
|
|
71456
|
+
function file(path8, args = [], options2 = {}) {
|
|
71161
71457
|
arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
|
|
71162
71458
|
const query = new Query([], args, (query2) => {
|
|
71163
|
-
import_fs2.default.readFile(
|
|
71459
|
+
import_fs2.default.readFile(path8, "utf8", (err, string) => {
|
|
71164
71460
|
if (err)
|
|
71165
71461
|
return query2.reject(err);
|
|
71166
71462
|
query2.strings = [string];
|
|
@@ -72548,10 +72844,10 @@ function padRight6(str, width) {
|
|
|
72548
72844
|
}
|
|
72549
72845
|
|
|
72550
72846
|
// src/commands/skills.ts
|
|
72551
|
-
var
|
|
72552
|
-
var
|
|
72847
|
+
var fs4 = __toESM(require("node:fs"));
|
|
72848
|
+
var path6 = __toESM(require("node:path"));
|
|
72553
72849
|
var import_node_child_process7 = require("node:child_process");
|
|
72554
|
-
var UNIVERSAL_SKILLS_DIR =
|
|
72850
|
+
var UNIVERSAL_SKILLS_DIR = path6.join(".agents", "skills");
|
|
72555
72851
|
var PRIVATE_SKILLS_DIRNAME = "private-skills";
|
|
72556
72852
|
async function handleSkills(subcommand, positionals, flags) {
|
|
72557
72853
|
switch (subcommand) {
|
|
@@ -72567,8 +72863,8 @@ async function handleInstall(positionals, flags) {
|
|
|
72567
72863
|
const skipInstalled = Boolean(flags["skip-installed"]);
|
|
72568
72864
|
const projectRoot = process.cwd();
|
|
72569
72865
|
const skillsBin = resolveSkillsBinary();
|
|
72570
|
-
const manifestPath =
|
|
72571
|
-
const skillsDir =
|
|
72866
|
+
const manifestPath = path6.join(projectRoot, "skills.txt");
|
|
72867
|
+
const skillsDir = path6.join(projectRoot, UNIVERSAL_SKILLS_DIR);
|
|
72572
72868
|
const source = positionals[0];
|
|
72573
72869
|
if (source) {
|
|
72574
72870
|
const parsed = parseSkillSource(source);
|
|
@@ -72601,7 +72897,7 @@ async function handleInstall(positionals, flags) {
|
|
|
72601
72897
|
function installSkill(skillsBin, skill, projectRoot) {
|
|
72602
72898
|
console.log(` Installing: ${skill.source} (${skill.type})`);
|
|
72603
72899
|
const localDir = resolveLocalDirIfExists(skill, projectRoot);
|
|
72604
|
-
const wantsExcludePrivate = localDir !== null &&
|
|
72900
|
+
const wantsExcludePrivate = localDir !== null && fs4.existsSync(path6.join(localDir, PRIVATE_SKILLS_DIRNAME)) && !sourcePathExplicitlyTargetsPrivate(skill.source);
|
|
72605
72901
|
try {
|
|
72606
72902
|
const agents = ["claude-code", "codex", "gemini-cli"];
|
|
72607
72903
|
if (wantsExcludePrivate && localDir) {
|
|
@@ -72612,7 +72908,7 @@ function installSkill(skillsBin, skill, projectRoot) {
|
|
|
72612
72908
|
}
|
|
72613
72909
|
console.log(` Installing ${skillDirs.length} public skill(s) (excluding ${PRIVATE_SKILLS_DIRNAME}/)...`);
|
|
72614
72910
|
for (const dir of skillDirs) {
|
|
72615
|
-
const rel =
|
|
72911
|
+
const rel = path6.relative(projectRoot, dir);
|
|
72616
72912
|
const installSource = rel.startsWith(".") ? rel : `./${rel}`;
|
|
72617
72913
|
for (const agent of agents) {
|
|
72618
72914
|
(0, import_node_child_process7.execSync)(`${skillsBin} add ${JSON.stringify(installSource)} -a ${agent} -s '*' -y --full-depth`, {
|
|
@@ -72636,16 +72932,16 @@ function installSkill(skillsBin, skill, projectRoot) {
|
|
|
72636
72932
|
}
|
|
72637
72933
|
}
|
|
72638
72934
|
function persistToManifest(manifestPath, source) {
|
|
72639
|
-
if (!
|
|
72640
|
-
|
|
72935
|
+
if (!fs4.existsSync(manifestPath)) {
|
|
72936
|
+
fs4.writeFileSync(manifestPath, `${source}
|
|
72641
72937
|
`);
|
|
72642
72938
|
console.log(`Created skills.txt with ${source}`);
|
|
72643
72939
|
return;
|
|
72644
72940
|
}
|
|
72645
|
-
const content =
|
|
72941
|
+
const content = fs4.readFileSync(manifestPath, "utf-8");
|
|
72646
72942
|
const lines = content.split("\n").map((l) => l.split("#")[0].trim());
|
|
72647
72943
|
if (!lines.includes(source)) {
|
|
72648
|
-
|
|
72944
|
+
fs4.appendFileSync(manifestPath, `
|
|
72649
72945
|
${source}
|
|
72650
72946
|
`);
|
|
72651
72947
|
console.log(`Added ${source} to skills.txt`);
|
|
@@ -72653,11 +72949,11 @@ ${source}
|
|
|
72653
72949
|
}
|
|
72654
72950
|
function resolveSkillsBinary() {
|
|
72655
72951
|
const candidates = [
|
|
72656
|
-
|
|
72657
|
-
|
|
72952
|
+
path6.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
|
|
72953
|
+
path6.resolve(__dirname, "..", "..", ".bin", "skills")
|
|
72658
72954
|
];
|
|
72659
72955
|
for (const candidate of candidates) {
|
|
72660
|
-
if (
|
|
72956
|
+
if (fs4.existsSync(candidate)) return candidate;
|
|
72661
72957
|
}
|
|
72662
72958
|
if (commandExists("skills")) return "skills";
|
|
72663
72959
|
throw new Error(
|
|
@@ -72681,21 +72977,21 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
|
|
|
72681
72977
|
const basePattern = pattern.replace(/\/\*+$/, "");
|
|
72682
72978
|
let searchRoot;
|
|
72683
72979
|
if (basePattern.startsWith("./") || basePattern.startsWith("../")) {
|
|
72684
|
-
searchRoot =
|
|
72980
|
+
searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
|
|
72685
72981
|
} else if (basePattern.startsWith("/")) {
|
|
72686
72982
|
searchRoot = basePattern;
|
|
72687
72983
|
} else if (basePattern.startsWith("~")) {
|
|
72688
72984
|
searchRoot = basePattern.replace(/^~/, process.env.HOME || "~");
|
|
72689
72985
|
} else {
|
|
72690
|
-
searchRoot =
|
|
72986
|
+
searchRoot = path6.resolve(path6.dirname(basePath), basePattern);
|
|
72691
72987
|
}
|
|
72692
|
-
if (!
|
|
72988
|
+
if (!fs4.existsSync(searchRoot)) {
|
|
72693
72989
|
console.warn(`Warning: Glob pattern base directory not found: ${searchRoot}`);
|
|
72694
72990
|
return sources;
|
|
72695
72991
|
}
|
|
72696
72992
|
const findSkillDirs2 = (dir, depth) => {
|
|
72697
72993
|
try {
|
|
72698
|
-
const entries =
|
|
72994
|
+
const entries = fs4.readdirSync(dir, { withFileTypes: true });
|
|
72699
72995
|
for (const entry of entries) {
|
|
72700
72996
|
if (!entry.isDirectory() || entry.name.startsWith(".")) {
|
|
72701
72997
|
continue;
|
|
@@ -72703,11 +72999,11 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
|
|
|
72703
72999
|
if (!explicitPrivateTarget && entry.name === PRIVATE_SKILLS_DIRNAME) {
|
|
72704
73000
|
continue;
|
|
72705
73001
|
}
|
|
72706
|
-
const fullPath =
|
|
72707
|
-
const skillMdPath =
|
|
72708
|
-
if (
|
|
73002
|
+
const fullPath = path6.join(dir, entry.name);
|
|
73003
|
+
const skillMdPath = path6.join(fullPath, "SKILL.md");
|
|
73004
|
+
if (fs4.existsSync(skillMdPath)) {
|
|
72709
73005
|
const name = entry.name;
|
|
72710
|
-
const relativePath =
|
|
73006
|
+
const relativePath = path6.relative(path6.dirname(basePath), fullPath);
|
|
72711
73007
|
const source = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
72712
73008
|
if (!explicitPrivateTarget && pathContainsPrivateSkills(source)) {
|
|
72713
73009
|
continue;
|
|
@@ -72731,10 +73027,10 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
|
|
|
72731
73027
|
return sources;
|
|
72732
73028
|
}
|
|
72733
73029
|
function parseSkillsManifest(manifestPath) {
|
|
72734
|
-
if (!
|
|
73030
|
+
if (!fs4.existsSync(manifestPath)) {
|
|
72735
73031
|
return [];
|
|
72736
73032
|
}
|
|
72737
|
-
const content =
|
|
73033
|
+
const content = fs4.readFileSync(manifestPath, "utf-8");
|
|
72738
73034
|
const sources = [];
|
|
72739
73035
|
for (const rawLine of content.split("\n")) {
|
|
72740
73036
|
const line = rawLine.split("#")[0].trim();
|
|
@@ -72760,22 +73056,22 @@ function parseSkillSource(line) {
|
|
|
72760
73056
|
return { raw: line, source: line, type: "github", name: name2 };
|
|
72761
73057
|
}
|
|
72762
73058
|
if (line.startsWith("/") || line.startsWith("~")) {
|
|
72763
|
-
const name2 =
|
|
73059
|
+
const name2 = path6.basename(line);
|
|
72764
73060
|
return { raw: line, source: line, type: "local", name: name2 };
|
|
72765
73061
|
}
|
|
72766
73062
|
if (line.startsWith("./") || line.startsWith("../")) {
|
|
72767
|
-
const name2 =
|
|
73063
|
+
const name2 = path6.basename(line);
|
|
72768
73064
|
return { raw: line, source: line, type: "local", name: name2 };
|
|
72769
73065
|
}
|
|
72770
|
-
if (
|
|
72771
|
-
const name2 =
|
|
73066
|
+
if (fs4.existsSync(line)) {
|
|
73067
|
+
const name2 = path6.basename(line);
|
|
72772
73068
|
return { raw: line, source: `./${line}`, type: "local", name: name2 };
|
|
72773
73069
|
}
|
|
72774
73070
|
if (line.includes("/") && !line.includes(" ")) {
|
|
72775
73071
|
const name2 = extractNameFromRepo(line);
|
|
72776
73072
|
return { raw: line, source: line, type: "github", name: name2 };
|
|
72777
73073
|
}
|
|
72778
|
-
const name =
|
|
73074
|
+
const name = path6.basename(line);
|
|
72779
73075
|
return { raw: line, source: `./${line}`, type: "local", name };
|
|
72780
73076
|
}
|
|
72781
73077
|
function extractNameFromUrl(url) {
|
|
@@ -72783,7 +73079,7 @@ function extractNameFromUrl(url) {
|
|
|
72783
73079
|
if (match) {
|
|
72784
73080
|
return match[1].replace(/\.git$/, "");
|
|
72785
73081
|
}
|
|
72786
|
-
return
|
|
73082
|
+
return path6.basename(new URL(url).pathname).replace(/\.git$/, "");
|
|
72787
73083
|
}
|
|
72788
73084
|
function extractNameFromRepo(repo) {
|
|
72789
73085
|
const parts = repo.split("/");
|
|
@@ -72791,10 +73087,10 @@ function extractNameFromRepo(repo) {
|
|
|
72791
73087
|
}
|
|
72792
73088
|
function getInstalledSkills(skillsDir) {
|
|
72793
73089
|
const installed = /* @__PURE__ */ new Set();
|
|
72794
|
-
if (!
|
|
73090
|
+
if (!fs4.existsSync(skillsDir)) {
|
|
72795
73091
|
return installed;
|
|
72796
73092
|
}
|
|
72797
|
-
const entries =
|
|
73093
|
+
const entries = fs4.readdirSync(skillsDir, { withFileTypes: true });
|
|
72798
73094
|
for (const entry of entries) {
|
|
72799
73095
|
if (entry.isDirectory() && !entry.name.startsWith(".")) {
|
|
72800
73096
|
installed.add(entry.name);
|
|
@@ -72803,46 +73099,46 @@ function getInstalledSkills(skillsDir) {
|
|
|
72803
73099
|
return installed;
|
|
72804
73100
|
}
|
|
72805
73101
|
function ensureSkillsSymlink(projectRoot) {
|
|
72806
|
-
const agentSkills =
|
|
72807
|
-
const claudeDir =
|
|
72808
|
-
const claudeSkills =
|
|
72809
|
-
if (!
|
|
72810
|
-
|
|
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 });
|
|
72811
73107
|
}
|
|
72812
|
-
if (!
|
|
72813
|
-
|
|
73108
|
+
if (!fs4.existsSync(claudeDir)) {
|
|
73109
|
+
fs4.mkdirSync(claudeDir, { recursive: true });
|
|
72814
73110
|
}
|
|
72815
|
-
if (
|
|
73111
|
+
if (fs4.existsSync(claudeSkills) && !fs4.lstatSync(claudeSkills).isSymbolicLink()) {
|
|
72816
73112
|
try {
|
|
72817
|
-
const claudeStat =
|
|
73113
|
+
const claudeStat = fs4.lstatSync(claudeSkills);
|
|
72818
73114
|
if (claudeStat.isDirectory()) {
|
|
72819
|
-
const entries =
|
|
73115
|
+
const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
|
|
72820
73116
|
for (const entry of entries) {
|
|
72821
73117
|
if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
|
|
72822
|
-
const dst =
|
|
72823
|
-
if (
|
|
72824
|
-
|
|
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);
|
|
72825
73121
|
}
|
|
72826
73122
|
}
|
|
72827
73123
|
} catch {
|
|
72828
73124
|
}
|
|
72829
73125
|
return;
|
|
72830
73126
|
}
|
|
72831
|
-
if (
|
|
72832
|
-
const stat =
|
|
73127
|
+
if (fs4.existsSync(claudeSkills)) {
|
|
73128
|
+
const stat = fs4.lstatSync(claudeSkills);
|
|
72833
73129
|
if (stat.isSymbolicLink()) {
|
|
72834
|
-
const target =
|
|
73130
|
+
const target = fs4.readlinkSync(claudeSkills);
|
|
72835
73131
|
if (target === `../${UNIVERSAL_SKILLS_DIR}` || target === agentSkills) {
|
|
72836
73132
|
return;
|
|
72837
73133
|
}
|
|
72838
|
-
|
|
73134
|
+
fs4.unlinkSync(claudeSkills);
|
|
72839
73135
|
} else {
|
|
72840
73136
|
console.log(".claude/skills exists and is not a symlink; skipping");
|
|
72841
73137
|
return;
|
|
72842
73138
|
}
|
|
72843
73139
|
}
|
|
72844
73140
|
try {
|
|
72845
|
-
|
|
73141
|
+
fs4.symlinkSync(`../${UNIVERSAL_SKILLS_DIR}`, claudeSkills);
|
|
72846
73142
|
console.log(`Linked .claude/skills -> ${UNIVERSAL_SKILLS_DIR}`);
|
|
72847
73143
|
} catch (err) {
|
|
72848
73144
|
console.warn("Warning: Failed to create symlink:", err);
|
|
@@ -72854,10 +73150,10 @@ function resolveLocalDirIfExists(skill, projectRoot) {
|
|
|
72854
73150
|
if (source.startsWith("~")) {
|
|
72855
73151
|
source = source.replace(/^~/, process.env.HOME || "~");
|
|
72856
73152
|
}
|
|
72857
|
-
const abs =
|
|
73153
|
+
const abs = path6.isAbsolute(source) ? source : path6.resolve(projectRoot, source);
|
|
72858
73154
|
try {
|
|
72859
|
-
if (!
|
|
72860
|
-
if (!
|
|
73155
|
+
if (!fs4.existsSync(abs)) return null;
|
|
73156
|
+
if (!fs4.statSync(abs).isDirectory()) return null;
|
|
72861
73157
|
return abs;
|
|
72862
73158
|
} catch {
|
|
72863
73159
|
return null;
|
|
@@ -72867,7 +73163,7 @@ function sourcePathExplicitlyTargetsPrivate(source) {
|
|
|
72867
73163
|
return pathContainsPrivateSkills(source);
|
|
72868
73164
|
}
|
|
72869
73165
|
function pathContainsPrivateSkills(source) {
|
|
72870
|
-
const normalized =
|
|
73166
|
+
const normalized = path6.normalize(source).replace(/\\/g, "/");
|
|
72871
73167
|
const segments = normalized.split("/").filter(Boolean);
|
|
72872
73168
|
return segments.includes(PRIVATE_SKILLS_DIRNAME);
|
|
72873
73169
|
}
|
|
@@ -72883,7 +73179,7 @@ function findSkillDirs(rootDir, opts) {
|
|
|
72883
73179
|
const walk = (dir) => {
|
|
72884
73180
|
let entries;
|
|
72885
73181
|
try {
|
|
72886
|
-
entries =
|
|
73182
|
+
entries = fs4.readdirSync(dir, { withFileTypes: true });
|
|
72887
73183
|
} catch {
|
|
72888
73184
|
return;
|
|
72889
73185
|
}
|
|
@@ -72895,7 +73191,7 @@ function findSkillDirs(rootDir, opts) {
|
|
|
72895
73191
|
for (const entry of entries) {
|
|
72896
73192
|
if (!entry.isDirectory()) continue;
|
|
72897
73193
|
if (shouldSkipDir(dir, entry.name)) continue;
|
|
72898
|
-
walk(
|
|
73194
|
+
walk(path6.join(dir, entry.name));
|
|
72899
73195
|
}
|
|
72900
73196
|
};
|
|
72901
73197
|
walk(rootDir);
|
|
@@ -73188,8 +73484,8 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
|
|
|
73188
73484
|
if (untilRaw) params.set("until", untilRaw);
|
|
73189
73485
|
if (limit) params.set("limit", limit);
|
|
73190
73486
|
const qs = params.toString();
|
|
73191
|
-
const
|
|
73192
|
-
const response = await requestJson(context2,
|
|
73487
|
+
const path8 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
|
|
73488
|
+
const response = await requestJson(context2, path8);
|
|
73193
73489
|
if (json) {
|
|
73194
73490
|
outputJson(response, true);
|
|
73195
73491
|
} else {
|
|
@@ -73227,8 +73523,8 @@ ${response.length} transaction(s)`);
|
|
|
73227
73523
|
if (untilRaw) params.set("until", untilRaw);
|
|
73228
73524
|
if (limit) params.set("limit", limit);
|
|
73229
73525
|
const qs = params.toString();
|
|
73230
|
-
const
|
|
73231
|
-
const response = await requestJson(context2,
|
|
73526
|
+
const path8 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
|
|
73527
|
+
const response = await requestJson(context2, path8);
|
|
73232
73528
|
if (json) {
|
|
73233
73529
|
outputJson(response, true);
|
|
73234
73530
|
} else {
|
|
@@ -73252,8 +73548,8 @@ ${response.length} record(s)`);
|
|
|
73252
73548
|
if (sinceRaw) params.set("since", parseSinceValue4(sinceRaw));
|
|
73253
73549
|
if (untilRaw) params.set("until", untilRaw);
|
|
73254
73550
|
const qs = params.toString();
|
|
73255
|
-
const
|
|
73256
|
-
const response = await requestJson(context2,
|
|
73551
|
+
const path8 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
|
|
73552
|
+
const response = await requestJson(context2, path8);
|
|
73257
73553
|
if (json) {
|
|
73258
73554
|
outputJson(response, true);
|
|
73259
73555
|
} else {
|
|
@@ -73289,8 +73585,8 @@ ${response.length} record(s)`);
|
|
|
73289
73585
|
if (limit) params.set("limit", limit);
|
|
73290
73586
|
if (offset) params.set("offset", offset);
|
|
73291
73587
|
const query = params.toString();
|
|
73292
|
-
const
|
|
73293
|
-
const response = await requestJson(context2,
|
|
73588
|
+
const path8 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
|
|
73589
|
+
const response = await requestJson(context2, path8);
|
|
73294
73590
|
if (json) {
|
|
73295
73591
|
outputJson(response, true);
|
|
73296
73592
|
return;
|
|
@@ -73474,11 +73770,11 @@ function resolveAgentsConfigPaths(repoRoot, manifest) {
|
|
|
73474
73770
|
function pickString(value) {
|
|
73475
73771
|
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
73476
73772
|
}
|
|
73477
|
-
function ensureFileExists(
|
|
73478
|
-
if (!(0, import_node_fs11.existsSync)(
|
|
73479
|
-
throw new Error(`Missing ${label} at ${
|
|
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.`);
|
|
73480
73776
|
}
|
|
73481
|
-
return
|
|
73777
|
+
return path8;
|
|
73482
73778
|
}
|
|
73483
73779
|
function isLocalApiUrl(apiUrl) {
|
|
73484
73780
|
try {
|
|
@@ -73880,8 +74176,8 @@ function formatAgeSeconds(isoDate) {
|
|
|
73880
74176
|
}
|
|
73881
74177
|
|
|
73882
74178
|
// src/commands/init.ts
|
|
73883
|
-
var
|
|
73884
|
-
var
|
|
74179
|
+
var fs5 = __toESM(require("node:fs"));
|
|
74180
|
+
var path7 = __toESM(require("node:path"));
|
|
73885
74181
|
var os3 = __toESM(require("node:os"));
|
|
73886
74182
|
var import_node_child_process9 = require("node:child_process");
|
|
73887
74183
|
var DEFAULT_TEMPLATE = "https://github.com/incept5/eve-horizon-starter";
|
|
@@ -73891,12 +74187,12 @@ async function handleInit(positionals, flags) {
|
|
|
73891
74187
|
const template = getStringFlag(flags, ["template", "t"]) || DEFAULT_TEMPLATE;
|
|
73892
74188
|
const branch = getStringFlag(flags, ["branch", "b"]) || DEFAULT_BRANCH;
|
|
73893
74189
|
const skipSkills = Boolean(flags["skip-skills"]);
|
|
73894
|
-
const resolvedTarget =
|
|
73895
|
-
const targetName =
|
|
74190
|
+
const resolvedTarget = path7.resolve(targetDir);
|
|
74191
|
+
const targetName = path7.basename(resolvedTarget);
|
|
73896
74192
|
const isCurrentDir = targetDir === ".";
|
|
73897
74193
|
if (isCurrentDir) {
|
|
73898
|
-
if (
|
|
73899
|
-
const entries =
|
|
74194
|
+
if (fs5.existsSync(resolvedTarget)) {
|
|
74195
|
+
const entries = fs5.readdirSync(resolvedTarget);
|
|
73900
74196
|
const nonHiddenEntries = entries.filter((e) => !e.startsWith("."));
|
|
73901
74197
|
if (nonHiddenEntries.length > 0) {
|
|
73902
74198
|
throw new Error(
|
|
@@ -73906,8 +74202,8 @@ async function handleInit(positionals, flags) {
|
|
|
73906
74202
|
}
|
|
73907
74203
|
}
|
|
73908
74204
|
} else {
|
|
73909
|
-
if (
|
|
73910
|
-
const entries =
|
|
74205
|
+
if (fs5.existsSync(resolvedTarget)) {
|
|
74206
|
+
const entries = fs5.readdirSync(resolvedTarget);
|
|
73911
74207
|
if (entries.length > 0) {
|
|
73912
74208
|
throw new Error(
|
|
73913
74209
|
`Directory '${targetDir}' already exists and is not empty.`
|
|
@@ -73919,7 +74215,7 @@ async function handleInit(positionals, flags) {
|
|
|
73919
74215
|
console.log(`Template: ${template}`);
|
|
73920
74216
|
console.log(`Branch: ${branch}`);
|
|
73921
74217
|
console.log("");
|
|
73922
|
-
const tempDir =
|
|
74218
|
+
const tempDir = fs5.mkdtempSync(path7.join(os3.tmpdir(), "eve-init-"));
|
|
73923
74219
|
try {
|
|
73924
74220
|
console.log("Downloading template...");
|
|
73925
74221
|
const cloneResult = (0, import_node_child_process9.spawnSync)("git", ["clone", "--depth=1", `--branch=${branch}`, template, tempDir], {
|
|
@@ -73932,12 +74228,12 @@ async function handleInit(positionals, flags) {
|
|
|
73932
74228
|
${cloneResult.stderr || cloneResult.stdout}`
|
|
73933
74229
|
);
|
|
73934
74230
|
}
|
|
73935
|
-
const gitDir =
|
|
73936
|
-
if (
|
|
73937
|
-
|
|
74231
|
+
const gitDir = path7.join(tempDir, ".git");
|
|
74232
|
+
if (fs5.existsSync(gitDir)) {
|
|
74233
|
+
fs5.rmSync(gitDir, { recursive: true, force: true });
|
|
73938
74234
|
}
|
|
73939
|
-
if (!
|
|
73940
|
-
|
|
74235
|
+
if (!fs5.existsSync(resolvedTarget)) {
|
|
74236
|
+
fs5.mkdirSync(resolvedTarget, { recursive: true });
|
|
73941
74237
|
}
|
|
73942
74238
|
console.log("Setting up project...");
|
|
73943
74239
|
copyDirRecursive(tempDir, resolvedTarget);
|
|
@@ -73972,38 +74268,38 @@ ${cloneResult.stderr || cloneResult.stdout}`
|
|
|
73972
74268
|
console.log(" - Set up your project manifest");
|
|
73973
74269
|
console.log(" - Help you set up your own Git remote");
|
|
73974
74270
|
} finally {
|
|
73975
|
-
if (
|
|
73976
|
-
|
|
74271
|
+
if (fs5.existsSync(tempDir)) {
|
|
74272
|
+
fs5.rmSync(tempDir, { recursive: true, force: true });
|
|
73977
74273
|
}
|
|
73978
74274
|
}
|
|
73979
74275
|
}
|
|
73980
74276
|
function copyDirRecursive(src, dest) {
|
|
73981
|
-
const entries =
|
|
74277
|
+
const entries = fs5.readdirSync(src, { withFileTypes: true });
|
|
73982
74278
|
for (const entry of entries) {
|
|
73983
|
-
const srcPath =
|
|
73984
|
-
const destPath =
|
|
74279
|
+
const srcPath = path7.join(src, entry.name);
|
|
74280
|
+
const destPath = path7.join(dest, entry.name);
|
|
73985
74281
|
if (entry.isDirectory()) {
|
|
73986
|
-
if (!
|
|
73987
|
-
|
|
74282
|
+
if (!fs5.existsSync(destPath)) {
|
|
74283
|
+
fs5.mkdirSync(destPath, { recursive: true });
|
|
73988
74284
|
}
|
|
73989
74285
|
copyDirRecursive(srcPath, destPath);
|
|
73990
74286
|
} else if (entry.isSymbolicLink()) {
|
|
73991
|
-
const linkTarget =
|
|
73992
|
-
if (!
|
|
73993
|
-
|
|
74287
|
+
const linkTarget = fs5.readlinkSync(srcPath);
|
|
74288
|
+
if (!fs5.existsSync(destPath)) {
|
|
74289
|
+
fs5.symlinkSync(linkTarget, destPath);
|
|
73994
74290
|
}
|
|
73995
74291
|
} else {
|
|
73996
|
-
|
|
74292
|
+
fs5.copyFileSync(srcPath, destPath);
|
|
73997
74293
|
}
|
|
73998
74294
|
}
|
|
73999
74295
|
}
|
|
74000
74296
|
function resolveSkillsBinary2() {
|
|
74001
74297
|
const candidates = [
|
|
74002
|
-
|
|
74003
|
-
|
|
74298
|
+
path7.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
|
|
74299
|
+
path7.resolve(__dirname, "..", "..", ".bin", "skills")
|
|
74004
74300
|
];
|
|
74005
74301
|
for (const candidate of candidates) {
|
|
74006
|
-
if (
|
|
74302
|
+
if (fs5.existsSync(candidate)) return candidate;
|
|
74007
74303
|
}
|
|
74008
74304
|
const result = (0, import_node_child_process9.spawnSync)("which", ["skills"], { encoding: "utf8" });
|
|
74009
74305
|
if (result.status === 0) return "skills";
|
|
@@ -74012,15 +74308,15 @@ function resolveSkillsBinary2() {
|
|
|
74012
74308
|
);
|
|
74013
74309
|
}
|
|
74014
74310
|
async function installSkills(projectRoot) {
|
|
74015
|
-
const skillsTxt =
|
|
74016
|
-
if (!
|
|
74311
|
+
const skillsTxt = path7.join(projectRoot, "skills.txt");
|
|
74312
|
+
if (!fs5.existsSync(skillsTxt)) {
|
|
74017
74313
|
console.log("No skills.txt found, skipping skill installation");
|
|
74018
74314
|
return;
|
|
74019
74315
|
}
|
|
74020
74316
|
const skillsBin = resolveSkillsBinary2();
|
|
74021
74317
|
const agents = ["claude-code", "codex", "gemini-cli"];
|
|
74022
74318
|
try {
|
|
74023
|
-
const content =
|
|
74319
|
+
const content = fs5.readFileSync(skillsTxt, "utf-8");
|
|
74024
74320
|
const lines = content.split("\n").map((line) => line.split("#")[0].trim()).filter((line) => line.length > 0);
|
|
74025
74321
|
for (const source of lines) {
|
|
74026
74322
|
console.log(` Installing: ${source}`);
|
|
@@ -74056,45 +74352,45 @@ async function installSkills(projectRoot) {
|
|
|
74056
74352
|
}
|
|
74057
74353
|
}
|
|
74058
74354
|
function ensureSkillsSymlink2(projectRoot) {
|
|
74059
|
-
const agentSkills =
|
|
74060
|
-
const claudeDir =
|
|
74061
|
-
const claudeSkills =
|
|
74062
|
-
if (!
|
|
74063
|
-
|
|
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 });
|
|
74064
74360
|
}
|
|
74065
|
-
if (!
|
|
74066
|
-
|
|
74361
|
+
if (!fs5.existsSync(claudeDir)) {
|
|
74362
|
+
fs5.mkdirSync(claudeDir, { recursive: true });
|
|
74067
74363
|
}
|
|
74068
|
-
if (
|
|
74364
|
+
if (fs5.existsSync(claudeSkills) && !fs5.lstatSync(claudeSkills).isSymbolicLink()) {
|
|
74069
74365
|
try {
|
|
74070
|
-
const stat =
|
|
74366
|
+
const stat = fs5.lstatSync(claudeSkills);
|
|
74071
74367
|
if (stat.isDirectory()) {
|
|
74072
|
-
const entries =
|
|
74368
|
+
const entries = fs5.readdirSync(agentSkills, { withFileTypes: true });
|
|
74073
74369
|
for (const entry of entries) {
|
|
74074
74370
|
if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
|
|
74075
|
-
const dst =
|
|
74076
|
-
if (
|
|
74077
|
-
|
|
74371
|
+
const dst = path7.join(claudeSkills, entry.name);
|
|
74372
|
+
if (fs5.existsSync(dst)) continue;
|
|
74373
|
+
fs5.symlinkSync(path7.join("..", "..", ".agents", "skills", entry.name), dst);
|
|
74078
74374
|
}
|
|
74079
74375
|
}
|
|
74080
74376
|
} catch {
|
|
74081
74377
|
}
|
|
74082
74378
|
return;
|
|
74083
74379
|
}
|
|
74084
|
-
if (
|
|
74085
|
-
const stat =
|
|
74380
|
+
if (fs5.existsSync(claudeSkills)) {
|
|
74381
|
+
const stat = fs5.lstatSync(claudeSkills);
|
|
74086
74382
|
if (stat.isSymbolicLink()) {
|
|
74087
|
-
const target =
|
|
74383
|
+
const target = fs5.readlinkSync(claudeSkills);
|
|
74088
74384
|
if (target === "../.agents/skills" || target === agentSkills) {
|
|
74089
74385
|
return;
|
|
74090
74386
|
}
|
|
74091
|
-
|
|
74387
|
+
fs5.unlinkSync(claudeSkills);
|
|
74092
74388
|
} else {
|
|
74093
74389
|
return;
|
|
74094
74390
|
}
|
|
74095
74391
|
}
|
|
74096
74392
|
try {
|
|
74097
|
-
|
|
74393
|
+
fs5.symlinkSync("../.agents/skills", claudeSkills);
|
|
74098
74394
|
} catch {
|
|
74099
74395
|
}
|
|
74100
74396
|
}
|
|
@@ -75929,8 +76225,8 @@ async function handleBindings(action, flags, context2, json) {
|
|
|
75929
76225
|
params.set("project_id", projectId);
|
|
75930
76226
|
}
|
|
75931
76227
|
const queryString = params.toString();
|
|
75932
|
-
const
|
|
75933
|
-
const bindingsResponse = await requestJson(context2,
|
|
76228
|
+
const path8 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
|
|
76229
|
+
const bindingsResponse = await requestJson(context2, path8);
|
|
75934
76230
|
const bindings = unwrapListResponse(bindingsResponse);
|
|
75935
76231
|
if (json) {
|
|
75936
76232
|
outputJson({ data: bindings }, json);
|
|
@@ -77170,8 +77466,8 @@ Sync complete: ${parts.join(", ")}`);
|
|
|
77170
77466
|
// src/commands/docs.ts
|
|
77171
77467
|
var import_node_fs17 = require("node:fs");
|
|
77172
77468
|
var import_node_path17 = require("node:path");
|
|
77173
|
-
function encodeDocPathParam(
|
|
77174
|
-
const trimmed =
|
|
77469
|
+
function encodeDocPathParam(path8) {
|
|
77470
|
+
const trimmed = path8.startsWith("/") ? path8.slice(1) : path8;
|
|
77175
77471
|
return encodeURIComponent(trimmed);
|
|
77176
77472
|
}
|
|
77177
77473
|
function parseWhereClause(raw) {
|
|
@@ -78203,8 +78499,8 @@ function normalizeManagedModelRows(payload) {
|
|
|
78203
78499
|
function looksLikeGatewayPath(baseUrl) {
|
|
78204
78500
|
try {
|
|
78205
78501
|
const parsed = new URL(baseUrl);
|
|
78206
|
-
const
|
|
78207
|
-
return
|
|
78502
|
+
const path8 = parsed.pathname.toLowerCase();
|
|
78503
|
+
return path8.includes("/inference/v1") || path8.endsWith("/v1");
|
|
78208
78504
|
} catch {
|
|
78209
78505
|
return false;
|
|
78210
78506
|
}
|
|
@@ -79542,10 +79838,10 @@ async function fetchRegistryTags(imageRef) {
|
|
|
79542
79838
|
if (slashIndex < 0) {
|
|
79543
79839
|
throw new Error(`Invalid image reference '${imageRef}'.`);
|
|
79544
79840
|
}
|
|
79545
|
-
const
|
|
79841
|
+
const registry2 = imageRef.slice(0, slashIndex);
|
|
79546
79842
|
const repository = imageRef.slice(slashIndex + 1);
|
|
79547
79843
|
const tagsPayload = await fetchText(
|
|
79548
|
-
`https://${
|
|
79844
|
+
`https://${registry2}/v2/${repository}/tags/list?n=200`
|
|
79549
79845
|
);
|
|
79550
79846
|
return JSON.parse(tagsPayload).tags ?? [];
|
|
79551
79847
|
}
|
|
@@ -79996,11 +80292,11 @@ function ensureTool(name, installHint) {
|
|
|
79996
80292
|
}
|
|
79997
80293
|
}
|
|
79998
80294
|
function requireToolPath(name, hint) {
|
|
79999
|
-
const
|
|
80000
|
-
if (!
|
|
80295
|
+
const path8 = findExecutable(name);
|
|
80296
|
+
if (!path8) {
|
|
80001
80297
|
throw new Error(`Missing required tool '${name}'. ${hint}`);
|
|
80002
80298
|
}
|
|
80003
|
-
return
|
|
80299
|
+
return path8;
|
|
80004
80300
|
}
|
|
80005
80301
|
function assertDockerRunning() {
|
|
80006
80302
|
const docker = findExecutable("docker");
|