@eve-horizon/cli 0.2.54 → 0.2.55
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 +459 -233
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8463,7 +8463,7 @@ var require_has_flag = __commonJS({
|
|
|
8463
8463
|
var require_supports_color = __commonJS({
|
|
8464
8464
|
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
8465
8465
|
"use strict";
|
|
8466
|
-
var
|
|
8466
|
+
var os5 = require("os");
|
|
8467
8467
|
var tty = require("tty");
|
|
8468
8468
|
var hasFlag = require_has_flag();
|
|
8469
8469
|
var { env } = process;
|
|
@@ -8511,7 +8511,7 @@ var require_supports_color = __commonJS({
|
|
|
8511
8511
|
return min;
|
|
8512
8512
|
}
|
|
8513
8513
|
if (process.platform === "win32") {
|
|
8514
|
-
const osRelease =
|
|
8514
|
+
const osRelease = os5.release().split(".");
|
|
8515
8515
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
8516
8516
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
8517
8517
|
}
|
|
@@ -8768,19 +8768,19 @@ var require_module_details_from_path = __commonJS({
|
|
|
8768
8768
|
basedir += segments[i] + sep2;
|
|
8769
8769
|
}
|
|
8770
8770
|
}
|
|
8771
|
-
var
|
|
8771
|
+
var path9 = "";
|
|
8772
8772
|
var lastSegmentIndex = segments.length - 1;
|
|
8773
8773
|
for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) {
|
|
8774
8774
|
if (i2 === lastSegmentIndex) {
|
|
8775
|
-
|
|
8775
|
+
path9 += segments[i2];
|
|
8776
8776
|
} else {
|
|
8777
|
-
|
|
8777
|
+
path9 += segments[i2] + sep2;
|
|
8778
8778
|
}
|
|
8779
8779
|
}
|
|
8780
8780
|
return {
|
|
8781
8781
|
name,
|
|
8782
8782
|
basedir,
|
|
8783
|
-
path:
|
|
8783
|
+
path: path9
|
|
8784
8784
|
};
|
|
8785
8785
|
};
|
|
8786
8786
|
}
|
|
@@ -8790,8 +8790,8 @@ var require_module_details_from_path = __commonJS({
|
|
|
8790
8790
|
var require_homedir = __commonJS({
|
|
8791
8791
|
"../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/homedir.js"(exports2, module2) {
|
|
8792
8792
|
"use strict";
|
|
8793
|
-
var
|
|
8794
|
-
module2.exports =
|
|
8793
|
+
var os5 = require("os");
|
|
8794
|
+
module2.exports = os5.homedir || function homedir6() {
|
|
8795
8795
|
var home = process.env.HOME;
|
|
8796
8796
|
var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
|
|
8797
8797
|
if (process.platform === "win32") {
|
|
@@ -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 parse4 =
|
|
8889
|
+
var path9 = require("path");
|
|
8890
|
+
var parse4 = path9.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 path9.resolve(prefix, aPath, moduleDir);
|
|
8909
8909
|
}));
|
|
8910
8910
|
}, []);
|
|
8911
8911
|
};
|
|
@@ -9268,7 +9268,7 @@ var require_async = __commonJS({
|
|
|
9268
9268
|
"../../node_modules/.pnpm/resolve@1.22.11/node_modules/resolve/lib/async.js"(exports2, module2) {
|
|
9269
9269
|
var fs6 = require("fs");
|
|
9270
9270
|
var getHomedir = require_homedir();
|
|
9271
|
-
var
|
|
9271
|
+
var path9 = require("path");
|
|
9272
9272
|
var caller = require_caller();
|
|
9273
9273
|
var nodeModulesPaths = require_node_modules_paths();
|
|
9274
9274
|
var normalizeOptions = require_normalize_options();
|
|
@@ -9280,8 +9280,8 @@ var require_async = __commonJS({
|
|
|
9280
9280
|
var homedir6 = getHomedir();
|
|
9281
9281
|
var defaultPaths = function() {
|
|
9282
9282
|
return [
|
|
9283
|
-
|
|
9284
|
-
|
|
9283
|
+
path9.join(homedir6, ".node_modules"),
|
|
9284
|
+
path9.join(homedir6, ".node_libraries")
|
|
9285
9285
|
];
|
|
9286
9286
|
};
|
|
9287
9287
|
var defaultIsFile = function isFile(file, cb) {
|
|
@@ -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] = path9.join(dirs[i], x);
|
|
9335
9335
|
}
|
|
9336
9336
|
return dirs;
|
|
9337
9337
|
};
|
|
@@ -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 || path9.dirname(caller());
|
|
9367
9367
|
var parent = opts.filename || basedir;
|
|
9368
9368
|
opts.paths = opts.paths || defaultPaths();
|
|
9369
|
-
var absoluteStart =
|
|
9369
|
+
var absoluteStart = path9.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 = path9.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(path9.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 = path9.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
|
+
path9.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(path9.dirname(dir), cb2);
|
|
9471
|
+
var pkgfile = path9.join(pkgdir, "package.json");
|
|
9472
9472
|
isFile(pkgfile, function(err2, ex) {
|
|
9473
|
-
if (!ex) return loadpkg(
|
|
9473
|
+
if (!ex) return loadpkg(path9.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 = path9.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(path9.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(path9.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(path9.join(x2, "index"), pkg2, cb2);
|
|
9517
|
+
var dir = path9.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(path9.join(x2, "index"), pkg3, cb2);
|
|
9522
9522
|
});
|
|
9523
9523
|
});
|
|
9524
9524
|
return;
|
|
9525
9525
|
}
|
|
9526
|
-
loadAsFile(
|
|
9526
|
+
loadAsFile(path9.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(path9.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));
|
|
@@ -9761,7 +9761,7 @@ 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
9763
|
var fs6 = require("fs");
|
|
9764
|
-
var
|
|
9764
|
+
var path9 = require("path");
|
|
9765
9765
|
var getHomedir = require_homedir();
|
|
9766
9766
|
var caller = require_caller();
|
|
9767
9767
|
var nodeModulesPaths = require_node_modules_paths();
|
|
@@ -9773,8 +9773,8 @@ var require_sync = __commonJS({
|
|
|
9773
9773
|
var homedir6 = getHomedir();
|
|
9774
9774
|
var defaultPaths = function() {
|
|
9775
9775
|
return [
|
|
9776
|
-
|
|
9777
|
-
|
|
9776
|
+
path9.join(homedir6, ".node_modules"),
|
|
9777
|
+
path9.join(homedir6, ".node_libraries")
|
|
9778
9778
|
];
|
|
9779
9779
|
};
|
|
9780
9780
|
var defaultIsFile = function isFile(file) {
|
|
@@ -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] = path9.join(dirs[i], x);
|
|
9826
9826
|
}
|
|
9827
9827
|
return dirs;
|
|
9828
9828
|
};
|
|
@@ -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 || path9.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, path9.resolve(basedir), opts);
|
|
9849
9849
|
if (relativePathRegex.test(x)) {
|
|
9850
|
-
var res =
|
|
9850
|
+
var res = path9.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(path9.dirname(x2));
|
|
9865
9865
|
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
|
|
9866
|
-
var rfile =
|
|
9866
|
+
var rfile = path9.relative(pkg.dir, x2);
|
|
9867
9867
|
var r = opts.pathFilter(pkg.pkg, x2, rfile);
|
|
9868
9868
|
if (r) {
|
|
9869
|
-
x2 =
|
|
9869
|
+
x2 = path9.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 = path9.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
|
|
9889
9889
|
if (!isFile(pkgfile)) {
|
|
9890
|
-
return loadpkg(
|
|
9890
|
+
return loadpkg(path9.dirname(dir));
|
|
9891
9891
|
}
|
|
9892
9892
|
var pkg = readPackageSync(readFileSync26, 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 = path9.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
|
|
9904
9904
|
if (isFile(pkgfile)) {
|
|
9905
9905
|
try {
|
|
9906
9906
|
var pkg = readPackageSync(readFileSync26, 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(path9.resolve(x2, pkg.main));
|
|
9927
9927
|
if (m2) return m2;
|
|
9928
|
-
var n2 = loadAsDirectorySync(
|
|
9928
|
+
var n2 = loadAsDirectorySync(path9.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(path9.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(path9.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 path9 = 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 = path9.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 + path9.sep + path9.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 = path9.sep !== "/" ? stat.path.split(path9.sep).join("/") : stat.path;
|
|
10283
|
+
return path9.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 path9 = 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 path9.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path9.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 path9 = require("path");
|
|
10497
10497
|
var parse4 = 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 + path9.sep + path9.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 path9 = 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)(path9.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 = path9.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 && path9.isAbsolute(name)) {
|
|
10855
|
+
const parsedPath = path9.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 = path9.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,7 +18108,7 @@ 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
|
|
18111
|
+
var path9 = require("path");
|
|
18112
18112
|
var fs6 = require("fs");
|
|
18113
18113
|
var instrumentation_1 = require_src4();
|
|
18114
18114
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
@@ -18136,10 +18136,10 @@ 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 = path9.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 = path9.resolve(taskRoot, moduleRoot, module3);
|
|
18143
18143
|
if (!filename.endsWith(".js")) {
|
|
18144
18144
|
try {
|
|
18145
18145
|
fs6.statSync(`${filename}.js`);
|
|
@@ -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 = (path9, 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 `${path9}${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)(path9, stackLayer);
|
|
21317
21317
|
}
|
|
21318
|
-
return
|
|
21318
|
+
return path9;
|
|
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((path9) => path9 !== "/" && path9 !== "/*").join("").replace(/\/{2,}/g, "/");
|
|
21519
21519
|
const attributes = {
|
|
21520
21520
|
[semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: route.length > 0 ? route : "/"
|
|
21521
21521
|
};
|
|
@@ -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(path9) {
|
|
22397
|
+
return new Promise((resolve8) => functionWithOriginalProperties(path9, 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, path9) {
|
|
22773
|
+
let field = getField(contextValue, path9);
|
|
22774
22774
|
let spanAdded = false;
|
|
22775
22775
|
if (!field) {
|
|
22776
22776
|
spanAdded = true;
|
|
22777
|
-
const parent = getParentField(contextValue,
|
|
22777
|
+
const parent = getParentField(contextValue, path9);
|
|
22778
22778
|
field = {
|
|
22779
22779
|
parent,
|
|
22780
|
-
span: createResolverSpan(tracer, getConfig, contextValue, info,
|
|
22780
|
+
span: createResolverSpan(tracer, getConfig, contextValue, info, path9, parent.span),
|
|
22781
22781
|
error: null
|
|
22782
22782
|
};
|
|
22783
|
-
addField(contextValue,
|
|
22783
|
+
addField(contextValue, path9, field);
|
|
22784
22784
|
}
|
|
22785
22785
|
return { spanAdded, field };
|
|
22786
22786
|
}
|
|
22787
|
-
function createResolverSpan(tracer, getConfig, contextValue, info,
|
|
22787
|
+
function createResolverSpan(tracer, getConfig, contextValue, info, path9, 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]: path9.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, path9, field) {
|
|
22832
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path9.join(".")] = field;
|
|
22833
22833
|
}
|
|
22834
|
-
function getField(contextValue,
|
|
22835
|
-
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
22834
|
+
function getField(contextValue, path9) {
|
|
22835
|
+
return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path9.join(".")];
|
|
22836
22836
|
}
|
|
22837
|
-
function getParentField(contextValue,
|
|
22838
|
-
for (let i =
|
|
22839
|
-
const field = getField(contextValue,
|
|
22837
|
+
function getParentField(contextValue, path9) {
|
|
22838
|
+
for (let i = path9.length - 1; i > 0; i--) {
|
|
22839
|
+
const field = getField(contextValue, path9.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, path9) {
|
|
22849
22849
|
const flattened = [];
|
|
22850
|
-
let curr =
|
|
22850
|
+
let curr = path9;
|
|
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 path9 = pathToArray(config.mergeItems, info && info.path);
|
|
22988
|
+
const depth = path9.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, path9);
|
|
22993
22993
|
} else {
|
|
22994
|
-
const newField = createFieldIfNotExists(tracer, getConfig, contextValue, info,
|
|
22994
|
+
const newField = createFieldIfNotExists(tracer, getConfig, contextValue, info, path9);
|
|
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 path9 = 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}${path9}`;
|
|
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 path9 = 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, path9);
|
|
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(path9, ...handler) {
|
|
36918
|
+
return original.call(this, path9, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path9, 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 path9 of paths) {
|
|
38867
38867
|
try {
|
|
38868
|
-
const result = await fs_1.promises.readFile(
|
|
38868
|
+
const result = await fs_1.promises.readFile(path9, { encoding: "utf8" });
|
|
38869
38869
|
return result.trim();
|
|
38870
38870
|
} catch (e) {
|
|
38871
38871
|
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
@@ -39075,7 +39075,7 @@ var require_ProcessDetectorSync = __commonJS({
|
|
|
39075
39075
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
39076
39076
|
var semantic_conventions_1 = (init_esm2(), __toCommonJS(esm_exports2));
|
|
39077
39077
|
var Resource_1 = require_Resource();
|
|
39078
|
-
var
|
|
39078
|
+
var os5 = require("os");
|
|
39079
39079
|
var ProcessDetectorSync = class {
|
|
39080
39080
|
detect(_config) {
|
|
39081
39081
|
const attributes = {
|
|
@@ -39095,7 +39095,7 @@ var require_ProcessDetectorSync = __commonJS({
|
|
|
39095
39095
|
attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];
|
|
39096
39096
|
}
|
|
39097
39097
|
try {
|
|
39098
|
-
const userInfo =
|
|
39098
|
+
const userInfo = os5.userInfo();
|
|
39099
39099
|
attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_OWNER] = userInfo.username;
|
|
39100
39100
|
} catch (e) {
|
|
39101
39101
|
api_1.diag.debug(`error obtaining process owner: ${e}`);
|
|
@@ -40011,7 +40011,7 @@ var require_AwsEcsDetectorSync = __commonJS({
|
|
|
40011
40011
|
var http = require("http");
|
|
40012
40012
|
var util2 = require("util");
|
|
40013
40013
|
var fs6 = require("fs");
|
|
40014
|
-
var
|
|
40014
|
+
var os5 = require("os");
|
|
40015
40015
|
var HTTP_TIMEOUT_IN_MS = 1e3;
|
|
40016
40016
|
var AwsEcsDetectorSync = class _AwsEcsDetectorSync {
|
|
40017
40017
|
detect() {
|
|
@@ -40051,7 +40051,7 @@ var require_AwsEcsDetectorSync = __commonJS({
|
|
|
40051
40051
|
* and then return null string
|
|
40052
40052
|
*/
|
|
40053
40053
|
static async _getContainerIdAndHostnameResource() {
|
|
40054
|
-
const hostName =
|
|
40054
|
+
const hostName = os5.hostname();
|
|
40055
40055
|
let containerId = "";
|
|
40056
40056
|
try {
|
|
40057
40057
|
const rawData = await _AwsEcsDetectorSync.readFileAsync(_AwsEcsDetectorSync.DEFAULT_CGROUP_PATH, "utf8");
|
|
@@ -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 path9 = url.path;
|
|
41557
|
+
if (path9.length === 0) {
|
|
41558
41558
|
return;
|
|
41559
41559
|
}
|
|
41560
|
-
if (url.scheme === "file" &&
|
|
41560
|
+
if (url.scheme === "file" && path9.length === 1 && isNormalizedWindowsDriveLetter(path9[0])) {
|
|
41561
41561
|
return;
|
|
41562
41562
|
}
|
|
41563
|
-
|
|
41563
|
+
path9.pop();
|
|
41564
41564
|
}
|
|
41565
41565
|
function includesCredentials(url) {
|
|
41566
41566
|
return url.username !== "" || url.password !== "";
|
|
@@ -48616,21 +48616,21 @@ function ensureConfigDir() {
|
|
|
48616
48616
|
(0, import_node_fs.mkdirSync)(CONFIG_DIR, { recursive: true });
|
|
48617
48617
|
}
|
|
48618
48618
|
}
|
|
48619
|
-
function readJsonFile(
|
|
48620
|
-
if (!(0, import_node_fs.existsSync)(
|
|
48621
|
-
const raw = (0, import_node_fs.readFileSync)(
|
|
48619
|
+
function readJsonFile(path9, fallback) {
|
|
48620
|
+
if (!(0, import_node_fs.existsSync)(path9)) return fallback;
|
|
48621
|
+
const raw = (0, import_node_fs.readFileSync)(path9, "utf8");
|
|
48622
48622
|
if (!raw.trim()) return fallback;
|
|
48623
48623
|
try {
|
|
48624
48624
|
return JSON.parse(raw);
|
|
48625
48625
|
} catch (error) {
|
|
48626
|
-
throw new Error(`Failed to parse ${
|
|
48626
|
+
throw new Error(`Failed to parse ${path9}: ${error.message}`);
|
|
48627
48627
|
}
|
|
48628
48628
|
}
|
|
48629
|
-
function writeJsonFile(
|
|
48629
|
+
function writeJsonFile(path9, value) {
|
|
48630
48630
|
ensureConfigDir();
|
|
48631
|
-
(0, import_node_fs.writeFileSync)(
|
|
48631
|
+
(0, import_node_fs.writeFileSync)(path9, JSON.stringify(value, null, 2));
|
|
48632
48632
|
try {
|
|
48633
|
-
(0, import_node_fs.chmodSync)(
|
|
48633
|
+
(0, import_node_fs.chmodSync)(path9, 384);
|
|
48634
48634
|
} catch {
|
|
48635
48635
|
}
|
|
48636
48636
|
}
|
|
@@ -51526,8 +51526,8 @@ function showSubcommandHelp(command, subcommand) {
|
|
|
51526
51526
|
}
|
|
51527
51527
|
|
|
51528
51528
|
// src/lib/client.ts
|
|
51529
|
-
async function requestJson(context2,
|
|
51530
|
-
const response = await requestRaw(context2,
|
|
51529
|
+
async function requestJson(context2, path9, options = {}) {
|
|
51530
|
+
const response = await requestRaw(context2, path9, options);
|
|
51531
51531
|
const method = options.method ?? "GET";
|
|
51532
51532
|
if (response.status === 401 && options.tokenOverride === void 0) {
|
|
51533
51533
|
const refreshed = await attemptRefresh(context2);
|
|
@@ -51535,20 +51535,20 @@ async function requestJson(context2, path8, options = {}) {
|
|
|
51535
51535
|
context2.token = refreshed.access_token;
|
|
51536
51536
|
context2.refreshToken = refreshed.refresh_token;
|
|
51537
51537
|
context2.expiresAt = refreshed.expires_at;
|
|
51538
|
-
const retry = await requestRaw(context2,
|
|
51538
|
+
const retry = await requestRaw(context2, path9, {
|
|
51539
51539
|
...options,
|
|
51540
51540
|
tokenOverride: refreshed.access_token
|
|
51541
51541
|
});
|
|
51542
51542
|
if (!retry.ok && !options.allowError) {
|
|
51543
51543
|
const message = formatErrorMessage(retry);
|
|
51544
|
-
throw new Error(`HTTP ${retry.status}: ${method} ${
|
|
51544
|
+
throw new Error(`HTTP ${retry.status}: ${method} ${path9}: ${message}`);
|
|
51545
51545
|
}
|
|
51546
51546
|
return retry.data;
|
|
51547
51547
|
}
|
|
51548
51548
|
}
|
|
51549
51549
|
if (!response.ok && !options.allowError) {
|
|
51550
51550
|
const message = formatErrorMessage(response);
|
|
51551
|
-
const requestTarget = `${method} ${
|
|
51551
|
+
const requestTarget = `${method} ${path9}`;
|
|
51552
51552
|
const requestFailedContext = `while calling ${requestTarget}: ${message}`;
|
|
51553
51553
|
if ((response.status === 404 || response.status === 500) && message.includes("Project not found")) {
|
|
51554
51554
|
const projectIdMatch = message.match(/Project not found: (proj_[a-z0-9]+)/);
|
|
@@ -51580,7 +51580,7 @@ function unwrapListResponse(value) {
|
|
|
51580
51580
|
}
|
|
51581
51581
|
throw new Error("Expected list response envelope with data[]");
|
|
51582
51582
|
}
|
|
51583
|
-
async function requestRaw(context2,
|
|
51583
|
+
async function requestRaw(context2, path9, options = {}) {
|
|
51584
51584
|
const headers = {
|
|
51585
51585
|
...options.headers
|
|
51586
51586
|
};
|
|
@@ -51591,7 +51591,7 @@ async function requestRaw(context2, path8, options = {}) {
|
|
|
51591
51591
|
if (token) {
|
|
51592
51592
|
headers.Authorization = `Bearer ${token}`;
|
|
51593
51593
|
}
|
|
51594
|
-
const url = `${context2.apiUrl}${
|
|
51594
|
+
const url = `${context2.apiUrl}${path9}`;
|
|
51595
51595
|
const method = options.method ?? "GET";
|
|
51596
51596
|
let response;
|
|
51597
51597
|
try {
|
|
@@ -52989,8 +52989,8 @@ function getErrorMap() {
|
|
|
52989
52989
|
|
|
52990
52990
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
52991
52991
|
var makeIssue = (params) => {
|
|
52992
|
-
const { data, path:
|
|
52993
|
-
const fullPath = [...
|
|
52992
|
+
const { data, path: path9, errorMaps, issueData } = params;
|
|
52993
|
+
const fullPath = [...path9, ...issueData.path || []];
|
|
52994
52994
|
const fullIssue = {
|
|
52995
52995
|
...issueData,
|
|
52996
52996
|
path: fullPath
|
|
@@ -53106,11 +53106,11 @@ var errorUtil;
|
|
|
53106
53106
|
|
|
53107
53107
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
|
|
53108
53108
|
var ParseInputLazyPath = class {
|
|
53109
|
-
constructor(parent, value,
|
|
53109
|
+
constructor(parent, value, path9, key) {
|
|
53110
53110
|
this._cachedPath = [];
|
|
53111
53111
|
this.parent = parent;
|
|
53112
53112
|
this.data = value;
|
|
53113
|
-
this._path =
|
|
53113
|
+
this._path = path9;
|
|
53114
53114
|
this._key = key;
|
|
53115
53115
|
}
|
|
53116
53116
|
get path() {
|
|
@@ -57961,7 +57961,9 @@ var AuthStatusResponseSchema = external_exports.object({
|
|
|
57961
57961
|
is_job_token: external_exports.boolean().optional(),
|
|
57962
57962
|
is_service_principal: external_exports.boolean().optional(),
|
|
57963
57963
|
permissions: external_exports.array(external_exports.string()).optional(),
|
|
57964
|
-
memberships: external_exports.array(external_exports.object({ org_id: external_exports.string(), role: external_exports.string() })).optional()
|
|
57964
|
+
memberships: external_exports.array(external_exports.object({ org_id: external_exports.string(), role: external_exports.string() })).optional(),
|
|
57965
|
+
/** Project-level role when X-Eve-Project-Id header is provided */
|
|
57966
|
+
project_role: external_exports.enum(["owner", "admin", "member"]).nullable().optional()
|
|
57965
57967
|
});
|
|
57966
57968
|
var AuthChallengeRequestSchema = external_exports.object({
|
|
57967
57969
|
provider: external_exports.enum(["github_ssh", "nostr"]).default("github_ssh"),
|
|
@@ -58980,6 +58982,7 @@ var EventSchema = external_exports.object({
|
|
|
58980
58982
|
actor_id: external_exports.string().nullable(),
|
|
58981
58983
|
payload_json: external_exports.record(external_exports.unknown()).nullable(),
|
|
58982
58984
|
dedupe_key: external_exports.string().nullable(),
|
|
58985
|
+
job_id: external_exports.string().nullable(),
|
|
58983
58986
|
status: EventStatusSchema,
|
|
58984
58987
|
processed_at: external_exports.string().nullable(),
|
|
58985
58988
|
created_at: external_exports.string(),
|
|
@@ -60703,10 +60706,10 @@ function mergeXEve(packFragments, projectXEve) {
|
|
|
60703
60706
|
var ORG_DOCS_PREFIX = "org_docs:/";
|
|
60704
60707
|
var JOB_ATTACHMENTS_PREFIX = "job_attachments:/";
|
|
60705
60708
|
var INGEST_PREFIX = "ingest:/";
|
|
60706
|
-
function normalizeOrgDocPath(
|
|
60707
|
-
if (!
|
|
60709
|
+
function normalizeOrgDocPath(path9) {
|
|
60710
|
+
if (!path9)
|
|
60708
60711
|
return "/";
|
|
60709
|
-
return
|
|
60712
|
+
return path9.startsWith("/") ? path9 : `/${path9}`;
|
|
60710
60713
|
}
|
|
60711
60714
|
function parseResourceUri(uri) {
|
|
60712
60715
|
if (!uri || typeof uri !== "string")
|
|
@@ -60717,11 +60720,11 @@ function parseResourceUri(uri) {
|
|
|
60717
60720
|
return null;
|
|
60718
60721
|
const match = raw.match(/^(.*)@v(\d+)$/);
|
|
60719
60722
|
if (match) {
|
|
60720
|
-
const
|
|
60723
|
+
const path9 = normalizeOrgDocPath(match[1]);
|
|
60721
60724
|
const version2 = Number(match[2]);
|
|
60722
60725
|
if (!Number.isFinite(version2) || version2 <= 0)
|
|
60723
60726
|
return null;
|
|
60724
|
-
return { scheme: "org_docs", path:
|
|
60727
|
+
return { scheme: "org_docs", path: path9, version: version2 };
|
|
60725
60728
|
}
|
|
60726
60729
|
return { scheme: "org_docs", path: normalizeOrgDocPath(raw) };
|
|
60727
60730
|
}
|
|
@@ -62656,6 +62659,11 @@ var import_child_process3 = require("child_process");
|
|
|
62656
62659
|
var import_util6 = require("util");
|
|
62657
62660
|
var execFileAsync3 = (0, import_util6.promisify)(import_child_process3.execFile);
|
|
62658
62661
|
|
|
62662
|
+
// ../shared/dist/invoke/job-user-home.js
|
|
62663
|
+
var path4 = __toESM(require("path"), 1);
|
|
62664
|
+
var os2 = __toESM(require("os"), 1);
|
|
62665
|
+
var JOB_HOMES_ROOT = path4.join(os2.tmpdir(), "eve", "agent-homes");
|
|
62666
|
+
|
|
62659
62667
|
// src/commands/job.ts
|
|
62660
62668
|
async function handleJob(subcommand, positionals, flags, context2) {
|
|
62661
62669
|
const json = Boolean(flags.json);
|
|
@@ -62999,10 +63007,14 @@ function parseSinceValue3(since) {
|
|
|
62999
63007
|
async function handleList(flags, context2, json) {
|
|
63000
63008
|
const all = Boolean(flags.all);
|
|
63001
63009
|
if (all) {
|
|
63010
|
+
const root2 = Boolean(flags.root);
|
|
63002
63011
|
const query2 = buildQuery3({
|
|
63003
63012
|
org_id: getStringFlag(flags, ["org"]),
|
|
63004
63013
|
project_id: getStringFlag(flags, ["project"]),
|
|
63005
63014
|
phase: getStringFlag(flags, ["phase"]),
|
|
63015
|
+
label: getStringFlag(flags, ["label"]),
|
|
63016
|
+
type: getStringFlag(flags, ["type"]),
|
|
63017
|
+
parent: root2 ? "null" : void 0,
|
|
63006
63018
|
limit: getStringFlag(flags, ["limit"]) ?? "50",
|
|
63007
63019
|
offset: getStringFlag(flags, ["offset"])
|
|
63008
63020
|
});
|
|
@@ -63031,6 +63043,7 @@ async function handleList(flags, context2, json) {
|
|
|
63031
63043
|
const since = sinceRaw ? parseSinceValue3(sinceRaw) : void 0;
|
|
63032
63044
|
const stuck = Boolean(flags.stuck);
|
|
63033
63045
|
const stuckMinutes = getStringFlag(flags, ["stuck-minutes"]);
|
|
63046
|
+
const root = Boolean(flags.root);
|
|
63034
63047
|
const query = buildQuery3({
|
|
63035
63048
|
phase: getStringFlag(flags, ["phase"]),
|
|
63036
63049
|
assignee: getStringFlag(flags, ["assignee"]),
|
|
@@ -63038,6 +63051,9 @@ async function handleList(flags, context2, json) {
|
|
|
63038
63051
|
since,
|
|
63039
63052
|
stuck: stuck ? "true" : void 0,
|
|
63040
63053
|
stuck_minutes: stuckMinutes,
|
|
63054
|
+
label: getStringFlag(flags, ["label"]),
|
|
63055
|
+
type: getStringFlag(flags, ["type"]),
|
|
63056
|
+
parent: root ? "null" : void 0,
|
|
63041
63057
|
limit: getStringFlag(flags, ["limit"]),
|
|
63042
63058
|
offset: getStringFlag(flags, ["offset"])
|
|
63043
63059
|
});
|
|
@@ -64046,8 +64062,9 @@ async function handleAttempts(positionals, context2, json) {
|
|
|
64046
64062
|
async function handleLogs(positionals, flags, context2, json) {
|
|
64047
64063
|
const jobId = positionals[0];
|
|
64048
64064
|
if (!jobId) {
|
|
64049
|
-
throw new Error("Usage: eve jobs logs <job-id> [--attempt=N] [--after=N]");
|
|
64065
|
+
throw new Error("Usage: eve jobs logs <job-id> [--attempt=N] [--after=N] [--summary]");
|
|
64050
64066
|
}
|
|
64067
|
+
const summaryMode = Boolean(flags.summary);
|
|
64051
64068
|
const attemptStr = getStringFlag(flags, ["attempt"]);
|
|
64052
64069
|
let attemptNum;
|
|
64053
64070
|
if (attemptStr) {
|
|
@@ -64071,6 +64088,40 @@ async function handleLogs(positionals, flags, context2, json) {
|
|
|
64071
64088
|
);
|
|
64072
64089
|
if (json) {
|
|
64073
64090
|
outputJson(response, json);
|
|
64091
|
+
} else if (summaryMode) {
|
|
64092
|
+
if (response.logs.length === 0) {
|
|
64093
|
+
console.log(`No logs found for attempt #${attemptNum}.`);
|
|
64094
|
+
return;
|
|
64095
|
+
}
|
|
64096
|
+
console.log(`Logs for job ${jobId}, attempt #${attemptNum} (summary):`);
|
|
64097
|
+
console.log("");
|
|
64098
|
+
summaryLlmCallCount = 0;
|
|
64099
|
+
summaryLlmTotalMicroUsd = 0n;
|
|
64100
|
+
summaryLlmTotalInputTokens = 0;
|
|
64101
|
+
summaryLlmTotalOutputTokens = 0;
|
|
64102
|
+
summaryToolUseCount = 0;
|
|
64103
|
+
summaryLastLlmEmitCount = 0;
|
|
64104
|
+
summaryLastLlmEmitTime = Date.now();
|
|
64105
|
+
summaryStartTime = Date.now();
|
|
64106
|
+
for (const log of response.logs) {
|
|
64107
|
+
const sseEvent = {
|
|
64108
|
+
sequence: log.sequence,
|
|
64109
|
+
timestamp: log.timestamp,
|
|
64110
|
+
type: log.type || log.line.type || "log",
|
|
64111
|
+
line: log.line
|
|
64112
|
+
};
|
|
64113
|
+
const line = formatFollowSummaryLine(sseEvent);
|
|
64114
|
+
if (line) console.log(line);
|
|
64115
|
+
}
|
|
64116
|
+
const pending = flushSummaryLlmAggregate(true);
|
|
64117
|
+
if (pending) console.log(pending);
|
|
64118
|
+
console.log("");
|
|
64119
|
+
console.log("--- Summary ---");
|
|
64120
|
+
console.log(`Log entries: ${response.logs.length}`);
|
|
64121
|
+
console.log(`LLM calls: ${summaryLlmCallCount}`);
|
|
64122
|
+
console.log(`Tokens: ${formatNumber(summaryLlmTotalInputTokens)} in / ${formatNumber(summaryLlmTotalOutputTokens)} out`);
|
|
64123
|
+
console.log(`Cost: ~$${formatFixed6Usd(summaryLlmTotalMicroUsd)}`);
|
|
64124
|
+
console.log(`Tool uses: ${summaryToolUseCount}`);
|
|
64074
64125
|
} else {
|
|
64075
64126
|
if (response.logs.length === 0) {
|
|
64076
64127
|
console.log(`No logs found for attempt #${attemptNum}.`);
|
|
@@ -64861,6 +64912,14 @@ function processWatchSSEEvent(eventType, eventData) {
|
|
|
64861
64912
|
}
|
|
64862
64913
|
var followLlmCallCount = 0;
|
|
64863
64914
|
var followLlmTotalMicroUsd = 0n;
|
|
64915
|
+
var summaryLlmCallCount = 0;
|
|
64916
|
+
var summaryLlmTotalMicroUsd = 0n;
|
|
64917
|
+
var summaryLlmTotalInputTokens = 0;
|
|
64918
|
+
var summaryLlmTotalOutputTokens = 0;
|
|
64919
|
+
var summaryToolUseCount = 0;
|
|
64920
|
+
var summaryLastLlmEmitCount = 0;
|
|
64921
|
+
var summaryLastLlmEmitTime = 0;
|
|
64922
|
+
var summaryStartTime = 0;
|
|
64864
64923
|
function parseFixed6Usd(amount) {
|
|
64865
64924
|
const [wholeRaw, fracRaw = ""] = amount.split(".");
|
|
64866
64925
|
const whole = wholeRaw.trim() ? BigInt(wholeRaw) : 0n;
|
|
@@ -64875,13 +64934,22 @@ function formatFixed6Usd(micro) {
|
|
|
64875
64934
|
async function handleFollow(positionals, flags, context2) {
|
|
64876
64935
|
const jobId = positionals[0];
|
|
64877
64936
|
if (!jobId) {
|
|
64878
|
-
throw new Error("Usage: eve job follow <job-id> [--raw] [--no-result]");
|
|
64937
|
+
throw new Error("Usage: eve job follow <job-id> [--raw] [--no-result] [--summary]");
|
|
64879
64938
|
}
|
|
64880
64939
|
const raw = Boolean(flags.raw);
|
|
64940
|
+
const summary = Boolean(flags.summary);
|
|
64881
64941
|
const showResult = !flags["no-result"];
|
|
64882
|
-
console.log(`Following ${jobId}...`);
|
|
64942
|
+
console.log(`Following ${jobId}${summary ? " (summary mode)" : ""}...`);
|
|
64883
64943
|
followLlmCallCount = 0;
|
|
64884
64944
|
followLlmTotalMicroUsd = 0n;
|
|
64945
|
+
summaryLlmCallCount = 0;
|
|
64946
|
+
summaryLlmTotalMicroUsd = 0n;
|
|
64947
|
+
summaryLlmTotalInputTokens = 0;
|
|
64948
|
+
summaryLlmTotalOutputTokens = 0;
|
|
64949
|
+
summaryToolUseCount = 0;
|
|
64950
|
+
summaryLastLlmEmitCount = 0;
|
|
64951
|
+
summaryLastLlmEmitTime = Date.now();
|
|
64952
|
+
summaryStartTime = Date.now();
|
|
64885
64953
|
const url = `${context2.apiUrl}/jobs/${jobId}/stream`;
|
|
64886
64954
|
const headers = {
|
|
64887
64955
|
Accept: "text/event-stream"
|
|
@@ -64918,8 +64986,9 @@ async function handleFollow(positionals, flags, context2) {
|
|
|
64918
64986
|
} else if (line.startsWith("data:")) {
|
|
64919
64987
|
eventData = line.slice(5).trim();
|
|
64920
64988
|
} else if (line === "" && eventData) {
|
|
64921
|
-
exitCode = processSSEEvent(eventType, eventData, raw, showResult);
|
|
64989
|
+
exitCode = processSSEEvent(eventType, eventData, raw, showResult, summary);
|
|
64922
64990
|
if (exitCode !== -1) {
|
|
64991
|
+
if (summary) printSummaryFooter();
|
|
64923
64992
|
process.exit(exitCode);
|
|
64924
64993
|
}
|
|
64925
64994
|
eventType = "";
|
|
@@ -64939,22 +65008,25 @@ async function handleFollow(positionals, flags, context2) {
|
|
|
64939
65008
|
}
|
|
64940
65009
|
}
|
|
64941
65010
|
if (eventData) {
|
|
64942
|
-
exitCode = processSSEEvent(eventType, eventData, raw, showResult);
|
|
65011
|
+
exitCode = processSSEEvent(eventType, eventData, raw, showResult, summary);
|
|
64943
65012
|
if (exitCode !== -1) {
|
|
65013
|
+
if (summary) printSummaryFooter();
|
|
64944
65014
|
process.exit(exitCode);
|
|
64945
65015
|
}
|
|
64946
65016
|
}
|
|
64947
65017
|
}
|
|
65018
|
+
if (summary) printSummaryFooter();
|
|
64948
65019
|
console.log("");
|
|
64949
65020
|
console.log("Stream ended.");
|
|
64950
65021
|
process.exit(0);
|
|
64951
65022
|
} catch (error) {
|
|
65023
|
+
if (summary) printSummaryFooter();
|
|
64952
65024
|
const err = error;
|
|
64953
65025
|
console.error(`Error following job: ${err.message}`);
|
|
64954
65026
|
process.exit(1);
|
|
64955
65027
|
}
|
|
64956
65028
|
}
|
|
64957
|
-
function processSSEEvent(eventType, eventData, raw, showResult) {
|
|
65029
|
+
function processSSEEvent(eventType, eventData, raw, showResult, summary = false) {
|
|
64958
65030
|
let parsed;
|
|
64959
65031
|
try {
|
|
64960
65032
|
parsed = JSON.parse(eventData);
|
|
@@ -64969,6 +65041,9 @@ function processSSEEvent(eventType, eventData, raw, showResult) {
|
|
|
64969
65041
|
const logEvent = parsed;
|
|
64970
65042
|
if (raw) {
|
|
64971
65043
|
console.log(JSON.stringify(logEvent));
|
|
65044
|
+
} else if (summary) {
|
|
65045
|
+
const line = formatFollowSummaryLine(logEvent);
|
|
65046
|
+
if (line) console.log(line);
|
|
64972
65047
|
} else {
|
|
64973
65048
|
formatFollowLogLine(logEvent);
|
|
64974
65049
|
}
|
|
@@ -64978,6 +65053,17 @@ function processSSEEvent(eventType, eventData, raw, showResult) {
|
|
|
64978
65053
|
const completeEvent = parsed;
|
|
64979
65054
|
if (raw) {
|
|
64980
65055
|
console.log(JSON.stringify(completeEvent));
|
|
65056
|
+
} else if (summary) {
|
|
65057
|
+
const pendingLlm = flushSummaryLlmAggregate(true);
|
|
65058
|
+
if (pendingLlm) console.log(pendingLlm);
|
|
65059
|
+
const ts = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
65060
|
+
const exitCode = completeEvent.exit_code ?? 0;
|
|
65061
|
+
const icon = exitCode === 0 ? "+" : "!";
|
|
65062
|
+
console.log(`[${ts}] [${icon}] Completed (exit ${exitCode})`);
|
|
65063
|
+
if (showResult && completeEvent.result) {
|
|
65064
|
+
console.log("");
|
|
65065
|
+
console.log(completeEvent.result);
|
|
65066
|
+
}
|
|
64981
65067
|
} else {
|
|
64982
65068
|
console.log("[+] Completed");
|
|
64983
65069
|
if (showResult && completeEvent.result) {
|
|
@@ -64991,6 +65077,12 @@ function processSSEEvent(eventType, eventData, raw, showResult) {
|
|
|
64991
65077
|
const errorEvent = parsed;
|
|
64992
65078
|
if (raw) {
|
|
64993
65079
|
console.log(JSON.stringify(errorEvent));
|
|
65080
|
+
} else if (summary) {
|
|
65081
|
+
const pendingLlm = flushSummaryLlmAggregate(true);
|
|
65082
|
+
if (pendingLlm) console.log(pendingLlm);
|
|
65083
|
+
const ts = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
65084
|
+
const errMsg = errorEvent.error ? `: ${errorEvent.error}` : "";
|
|
65085
|
+
console.log(`[${ts}] [!] Error${errMsg}`);
|
|
64994
65086
|
} else {
|
|
64995
65087
|
console.log("[!] Error");
|
|
64996
65088
|
if (errorEvent.error) {
|
|
@@ -65110,6 +65202,134 @@ function formatFollowLogLine(event) {
|
|
|
65110
65202
|
}
|
|
65111
65203
|
}
|
|
65112
65204
|
}
|
|
65205
|
+
function formatFollowSummaryLine(event) {
|
|
65206
|
+
const line = event.line;
|
|
65207
|
+
const type = event.type || line.type || "log";
|
|
65208
|
+
const ts = new Date(event.timestamp).toLocaleTimeString();
|
|
65209
|
+
if (type.startsWith("lifecycle_")) {
|
|
65210
|
+
const content = line;
|
|
65211
|
+
const phase = content.phase || "unknown";
|
|
65212
|
+
const action = content.action || "unknown";
|
|
65213
|
+
const duration = content.duration_ms;
|
|
65214
|
+
const success = content.success;
|
|
65215
|
+
const error = content.error;
|
|
65216
|
+
const meta = content.meta || {};
|
|
65217
|
+
if (action === "start") {
|
|
65218
|
+
const detail = formatLifecycleMeta(phase, meta);
|
|
65219
|
+
return `[${ts}] >> ${phase}${detail}`;
|
|
65220
|
+
}
|
|
65221
|
+
if (action === "end") {
|
|
65222
|
+
const dur = duration ? ` (${duration}ms)` : "";
|
|
65223
|
+
if (success === false && error) {
|
|
65224
|
+
return `[${ts}] !! ${phase} failed${dur}: ${error}`;
|
|
65225
|
+
}
|
|
65226
|
+
return `[${ts}] ok ${phase}${dur}`;
|
|
65227
|
+
}
|
|
65228
|
+
return null;
|
|
65229
|
+
}
|
|
65230
|
+
if (type === "llm.call") {
|
|
65231
|
+
const call = line;
|
|
65232
|
+
const source = call.source === "managed" ? "managed" : "byok";
|
|
65233
|
+
const provider = call.provider || "unknown";
|
|
65234
|
+
const model = call.model || "unknown";
|
|
65235
|
+
const status = call.status || "ok";
|
|
65236
|
+
const usage = call.usage ?? {};
|
|
65237
|
+
const inputTokens = Number(usage.input_tokens) || 0;
|
|
65238
|
+
const outputTokens = Number(usage.output_tokens) || 0;
|
|
65239
|
+
const costs = calculateBilledCost({
|
|
65240
|
+
rate_card: DEFAULT_RATE_CARD_V1,
|
|
65241
|
+
llm_usage: [{
|
|
65242
|
+
provider,
|
|
65243
|
+
model,
|
|
65244
|
+
source,
|
|
65245
|
+
usage: {
|
|
65246
|
+
input_tokens: inputTokens,
|
|
65247
|
+
output_tokens: outputTokens,
|
|
65248
|
+
cache_read_tokens: Number(usage.cache_read_tokens) || 0,
|
|
65249
|
+
cache_write_tokens: Number(usage.cache_write_tokens) || 0,
|
|
65250
|
+
reasoning_tokens: Number(usage.reasoning_tokens) || 0
|
|
65251
|
+
}
|
|
65252
|
+
}],
|
|
65253
|
+
compute_usage: null,
|
|
65254
|
+
markup_pct: 0,
|
|
65255
|
+
billing_currency: "usd",
|
|
65256
|
+
fx_usd_to_billing: null
|
|
65257
|
+
});
|
|
65258
|
+
summaryLlmCallCount += 1;
|
|
65259
|
+
summaryLlmTotalInputTokens += inputTokens;
|
|
65260
|
+
summaryLlmTotalOutputTokens += outputTokens;
|
|
65261
|
+
summaryLlmTotalMicroUsd += parseFixed6Usd(costs.base_cost_usd.llm_usd.amount);
|
|
65262
|
+
if (status === "error") {
|
|
65263
|
+
return `[${ts}] !! LLM error (${provider}/${model})`;
|
|
65264
|
+
}
|
|
65265
|
+
return flushSummaryLlmAggregate(false);
|
|
65266
|
+
}
|
|
65267
|
+
const normalized = normalizeLogLine(line);
|
|
65268
|
+
const nType = normalized.type;
|
|
65269
|
+
if (nType === "tool_result") {
|
|
65270
|
+
const resultText = normalized.message || line.tool_result || "";
|
|
65271
|
+
if (resultText.includes("requires approval") || resultText.includes("permission denied")) {
|
|
65272
|
+
return `[${ts}] !! Permission rejected: ${resultText.substring(0, 120)}`;
|
|
65273
|
+
}
|
|
65274
|
+
}
|
|
65275
|
+
if (type === "event") {
|
|
65276
|
+
const rawLine = line.raw;
|
|
65277
|
+
const msg = rawLine?.message;
|
|
65278
|
+
const contentArr = msg?.content;
|
|
65279
|
+
if (Array.isArray(contentArr)) {
|
|
65280
|
+
for (const block of contentArr) {
|
|
65281
|
+
const b2 = block;
|
|
65282
|
+
if (b2.is_error && typeof b2.content === "string" && b2.content.includes("requires approval")) {
|
|
65283
|
+
return `[${ts}] !! Permission rejected: ${b2.content.substring(0, 120)}`;
|
|
65284
|
+
}
|
|
65285
|
+
}
|
|
65286
|
+
}
|
|
65287
|
+
}
|
|
65288
|
+
if (nType === "assistant" || nType === "text") {
|
|
65289
|
+
const text = normalized.message || line.message || line.text || "";
|
|
65290
|
+
const match = text.match(/```eve-message\n([\s\S]*?)```/);
|
|
65291
|
+
if (match) {
|
|
65292
|
+
return `[${ts}] -- ${match[1].trim()}`;
|
|
65293
|
+
}
|
|
65294
|
+
}
|
|
65295
|
+
if (nType === "tool_use") {
|
|
65296
|
+
const tool = normalized.tool || line.tool;
|
|
65297
|
+
if (tool) {
|
|
65298
|
+
summaryToolUseCount += 1;
|
|
65299
|
+
return `[${ts}] ${tool}`;
|
|
65300
|
+
}
|
|
65301
|
+
}
|
|
65302
|
+
if (nType === "error") {
|
|
65303
|
+
const errMsg = normalized.message || line.message || JSON.stringify(line);
|
|
65304
|
+
return `[${ts}] !! Error: ${errMsg}`;
|
|
65305
|
+
}
|
|
65306
|
+
return null;
|
|
65307
|
+
}
|
|
65308
|
+
function flushSummaryLlmAggregate(force) {
|
|
65309
|
+
const callsSinceLastEmit = summaryLlmCallCount - summaryLastLlmEmitCount;
|
|
65310
|
+
const msSinceLastEmit = Date.now() - summaryLastLlmEmitTime;
|
|
65311
|
+
if (callsSinceLastEmit === 0) return null;
|
|
65312
|
+
if (!force && callsSinceLastEmit < 10 && msSinceLastEmit < 3e4) return null;
|
|
65313
|
+
summaryLastLlmEmitCount = summaryLlmCallCount;
|
|
65314
|
+
summaryLastLlmEmitTime = Date.now();
|
|
65315
|
+
const ts = (/* @__PURE__ */ new Date()).toLocaleTimeString();
|
|
65316
|
+
return `[${ts}] LLM: ${summaryLlmCallCount} calls, ${formatNumber(summaryLlmTotalInputTokens)} in / ${formatNumber(summaryLlmTotalOutputTokens)} out (~$${formatFixed6Usd(summaryLlmTotalMicroUsd)})`;
|
|
65317
|
+
}
|
|
65318
|
+
function printSummaryFooter() {
|
|
65319
|
+
const pending = flushSummaryLlmAggregate(true);
|
|
65320
|
+
if (pending) console.log(pending);
|
|
65321
|
+
const elapsed = Math.round((Date.now() - summaryStartTime) / 1e3);
|
|
65322
|
+
const mins = Math.floor(elapsed / 60);
|
|
65323
|
+
const secs = elapsed % 60;
|
|
65324
|
+
const durStr = mins > 0 ? `${mins}m ${secs}s` : `${secs}s`;
|
|
65325
|
+
console.log("");
|
|
65326
|
+
console.log("--- Summary ---");
|
|
65327
|
+
console.log(`Duration: ${durStr}`);
|
|
65328
|
+
console.log(`LLM calls: ${summaryLlmCallCount}`);
|
|
65329
|
+
console.log(`Tokens: ${formatNumber(summaryLlmTotalInputTokens)} in / ${formatNumber(summaryLlmTotalOutputTokens)} out`);
|
|
65330
|
+
console.log(`Cost: ~$${formatFixed6Usd(summaryLlmTotalMicroUsd)}`);
|
|
65331
|
+
console.log(`Tool uses: ${summaryToolUseCount}`);
|
|
65332
|
+
}
|
|
65113
65333
|
function getStatusIcon(status) {
|
|
65114
65334
|
switch (status) {
|
|
65115
65335
|
case "pending":
|
|
@@ -67599,9 +67819,9 @@ function getOrchestratorUrl(context2) {
|
|
|
67599
67819
|
apiUrl.port = orchPort;
|
|
67600
67820
|
return apiUrl.toString().replace(/\/$/, "");
|
|
67601
67821
|
}
|
|
67602
|
-
async function requestOrchestratorJson(context2,
|
|
67822
|
+
async function requestOrchestratorJson(context2, path9, options) {
|
|
67603
67823
|
const orchUrl = getOrchestratorUrl(context2);
|
|
67604
|
-
const url = `${orchUrl}${
|
|
67824
|
+
const url = `${orchUrl}${path9}`;
|
|
67605
67825
|
const headers = {};
|
|
67606
67826
|
if (options?.body) {
|
|
67607
67827
|
headers["Content-Type"] = "application/json";
|
|
@@ -69840,13 +70060,13 @@ async function handleCall(positionals, flags, context2) {
|
|
|
69840
70060
|
const body = graphqlBody ?? jsonBody;
|
|
69841
70061
|
const method = methodInput.toUpperCase();
|
|
69842
70062
|
const resolvedBaseUrl = resolveApiBaseUrlForRuntime(api.base_url, context2.apiUrl);
|
|
69843
|
-
const
|
|
70063
|
+
const path9 = resolveApiPath(resolvedBaseUrl, pathInput);
|
|
69844
70064
|
const tokenOverride = getStringFlag(flags, ["token"]);
|
|
69845
70065
|
const authToken = tokenOverride ?? process.env.EVE_JOB_TOKEN ?? context2.token;
|
|
69846
70066
|
if (printCurl) {
|
|
69847
70067
|
const curl = buildCurlCommand({
|
|
69848
70068
|
method,
|
|
69849
|
-
url:
|
|
70069
|
+
url: path9,
|
|
69850
70070
|
authToken,
|
|
69851
70071
|
jsonBody: body,
|
|
69852
70072
|
authHint: tokenOverride ? "override" : process.env.EVE_JOB_TOKEN ? "job" : "user"
|
|
@@ -69854,7 +70074,7 @@ async function handleCall(positionals, flags, context2) {
|
|
|
69854
70074
|
console.log(curl);
|
|
69855
70075
|
return;
|
|
69856
70076
|
}
|
|
69857
|
-
const response = await fetch(
|
|
70077
|
+
const response = await fetch(path9, {
|
|
69858
70078
|
method,
|
|
69859
70079
|
headers: buildApiHeaders(authToken, body),
|
|
69860
70080
|
body: body ? JSON.stringify(body) : void 0
|
|
@@ -69950,7 +70170,7 @@ async function fetchApiSpec(context2, projectId, name, env) {
|
|
|
69950
70170
|
function buildCurlExamples(api, spec) {
|
|
69951
70171
|
const paths = spec.paths ?? {};
|
|
69952
70172
|
const examples = [];
|
|
69953
|
-
Object.entries(paths).forEach(([
|
|
70173
|
+
Object.entries(paths).forEach(([path9, methods]) => {
|
|
69954
70174
|
Object.entries(methods).forEach(([method, operation]) => {
|
|
69955
70175
|
const lower = method.toLowerCase();
|
|
69956
70176
|
if (!["get", "post", "put", "patch", "delete"].includes(lower)) {
|
|
@@ -69961,7 +70181,7 @@ function buildCurlExamples(api, spec) {
|
|
|
69961
70181
|
const needsBody = ["post", "put", "patch"].includes(lower);
|
|
69962
70182
|
const curl = buildCurlCommand({
|
|
69963
70183
|
method: lower.toUpperCase(),
|
|
69964
|
-
url: resolveApiPath(api.base_url,
|
|
70184
|
+
url: resolveApiPath(api.base_url, path9),
|
|
69965
70185
|
authToken: api.auth_mode === "eve" ? "$EVE_JOB_TOKEN" : void 0,
|
|
69966
70186
|
jsonBody: needsBody ? examplePayload ?? {} : void 0,
|
|
69967
70187
|
authHint: "job"
|
|
@@ -69983,15 +70203,15 @@ function extractExamplePayload(requestBody) {
|
|
|
69983
70203
|
if (examples.length === 0) return void 0;
|
|
69984
70204
|
return examples[0]?.value;
|
|
69985
70205
|
}
|
|
69986
|
-
function resolveApiPath(baseUrl,
|
|
69987
|
-
if (
|
|
69988
|
-
return
|
|
70206
|
+
function resolveApiPath(baseUrl, path9) {
|
|
70207
|
+
if (path9.startsWith("http://") || path9.startsWith("https://")) {
|
|
70208
|
+
return path9;
|
|
69989
70209
|
}
|
|
69990
70210
|
if (!baseUrl) {
|
|
69991
|
-
return
|
|
70211
|
+
return path9;
|
|
69992
70212
|
}
|
|
69993
70213
|
const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
|
|
69994
|
-
const trimmedPath =
|
|
70214
|
+
const trimmedPath = path9.startsWith("/") ? path9 : `/${path9}`;
|
|
69995
70215
|
return `${trimmedBase}${trimmedPath}`;
|
|
69996
70216
|
}
|
|
69997
70217
|
function resolveApiBaseUrlForRuntime(baseUrl, eveApiUrl) {
|
|
@@ -71720,13 +71940,13 @@ function Subscribe(postgres2, options) {
|
|
|
71720
71940
|
}
|
|
71721
71941
|
}
|
|
71722
71942
|
function handle(a, b2) {
|
|
71723
|
-
const
|
|
71943
|
+
const path9 = b2.relation.schema + "." + b2.relation.table;
|
|
71724
71944
|
call("*", a, b2);
|
|
71725
|
-
call("*:" +
|
|
71726
|
-
b2.relation.keys.length && call("*:" +
|
|
71945
|
+
call("*:" + path9, a, b2);
|
|
71946
|
+
b2.relation.keys.length && call("*:" + path9 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
|
|
71727
71947
|
call(b2.command, a, b2);
|
|
71728
|
-
call(b2.command + ":" +
|
|
71729
|
-
b2.relation.keys.length && call(b2.command + ":" +
|
|
71948
|
+
call(b2.command + ":" + path9, a, b2);
|
|
71949
|
+
b2.relation.keys.length && call(b2.command + ":" + path9 + "=" + b2.relation.keys.map((x2) => a[x2.name]), a, b2);
|
|
71730
71950
|
}
|
|
71731
71951
|
function pong() {
|
|
71732
71952
|
const x2 = Buffer.alloc(34);
|
|
@@ -71839,8 +72059,8 @@ function parseEvent(x) {
|
|
|
71839
72059
|
const xs = x.match(/^(\*|insert|update|delete)?:?([^.]+?\.?[^=]+)?=?(.+)?/i) || [];
|
|
71840
72060
|
if (!xs)
|
|
71841
72061
|
throw new Error("Malformed subscribe pattern: " + x);
|
|
71842
|
-
const [, command,
|
|
71843
|
-
return (command || "*") + (
|
|
72062
|
+
const [, command, path9, key] = xs;
|
|
72063
|
+
return (command || "*") + (path9 ? ":" + (path9.indexOf(".") === -1 ? "public." + path9 : path9) : "") + (key ? "=" + key : "");
|
|
71844
72064
|
}
|
|
71845
72065
|
|
|
71846
72066
|
// ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/large.js
|
|
@@ -71985,10 +72205,10 @@ function Postgres(a, b2) {
|
|
|
71985
72205
|
});
|
|
71986
72206
|
return query;
|
|
71987
72207
|
}
|
|
71988
|
-
function file(
|
|
72208
|
+
function file(path9, args = [], options2 = {}) {
|
|
71989
72209
|
arguments.length === 2 && !Array.isArray(args) && (options2 = args, args = []);
|
|
71990
72210
|
const query = new Query([], args, (query2) => {
|
|
71991
|
-
import_fs2.default.readFile(
|
|
72211
|
+
import_fs2.default.readFile(path9, "utf8", (err, string) => {
|
|
71992
72212
|
if (err)
|
|
71993
72213
|
return query2.reject(err);
|
|
71994
72214
|
query2.strings = [string];
|
|
@@ -73480,11 +73700,13 @@ function formatEventsTable(events) {
|
|
|
73480
73700
|
const typeWidth = Math.max(4, ...events.map((e) => e.type.length));
|
|
73481
73701
|
const sourceWidth = Math.max(6, ...events.map((e) => e.source.length));
|
|
73482
73702
|
const statusWidth = Math.max(6, ...events.map((e) => e.status.length));
|
|
73703
|
+
const jobIdWidth = Math.max(6, ...events.map((e) => (e.job_id || "-").length));
|
|
73483
73704
|
const header = [
|
|
73484
73705
|
padRight6("ID", idWidth),
|
|
73485
73706
|
padRight6("Type", typeWidth),
|
|
73486
73707
|
padRight6("Source", sourceWidth),
|
|
73487
73708
|
padRight6("Status", statusWidth),
|
|
73709
|
+
padRight6("Job ID", jobIdWidth),
|
|
73488
73710
|
padRight6("Env", 12),
|
|
73489
73711
|
padRight6("Branch", 20),
|
|
73490
73712
|
"Created"
|
|
@@ -73497,6 +73719,7 @@ function formatEventsTable(events) {
|
|
|
73497
73719
|
padRight6(event.type, typeWidth),
|
|
73498
73720
|
padRight6(event.source, sourceWidth),
|
|
73499
73721
|
padRight6(event.status, statusWidth),
|
|
73722
|
+
padRight6(event.job_id || "-", jobIdWidth),
|
|
73500
73723
|
padRight6(event.env_name || "-", 12),
|
|
73501
73724
|
padRight6(event.ref_branch || "-", 20),
|
|
73502
73725
|
formatDate3(event.created_at)
|
|
@@ -73531,6 +73754,9 @@ function formatEventDetails(event) {
|
|
|
73531
73754
|
if (event.dedupe_key) {
|
|
73532
73755
|
console.log(` Dedupe Key: ${event.dedupe_key}`);
|
|
73533
73756
|
}
|
|
73757
|
+
if (event.job_id) {
|
|
73758
|
+
console.log(` Job ID: ${event.job_id}`);
|
|
73759
|
+
}
|
|
73534
73760
|
if (event.payload_json && Object.keys(event.payload_json).length > 0) {
|
|
73535
73761
|
console.log("");
|
|
73536
73762
|
console.log(" Payload:");
|
|
@@ -73558,10 +73784,10 @@ function padRight6(str, width) {
|
|
|
73558
73784
|
|
|
73559
73785
|
// src/commands/skills.ts
|
|
73560
73786
|
var fs4 = __toESM(require("node:fs"));
|
|
73561
|
-
var
|
|
73787
|
+
var path7 = __toESM(require("node:path"));
|
|
73562
73788
|
var import_node_child_process7 = require("node:child_process");
|
|
73563
73789
|
var yaml = __toESM(require("yaml"));
|
|
73564
|
-
var UNIVERSAL_SKILLS_DIR =
|
|
73790
|
+
var UNIVERSAL_SKILLS_DIR = path7.join(".agents", "skills");
|
|
73565
73791
|
var PRIVATE_SKILLS_DIRNAME = "private-skills";
|
|
73566
73792
|
async function handleSkills(subcommand, positionals, flags) {
|
|
73567
73793
|
switch (subcommand) {
|
|
@@ -73577,8 +73803,8 @@ async function handleInstall(positionals, flags) {
|
|
|
73577
73803
|
const skipInstalled = Boolean(flags["skip-installed"]);
|
|
73578
73804
|
const projectRoot = process.cwd();
|
|
73579
73805
|
const skillsBin = resolveSkillsBinary();
|
|
73580
|
-
const manifestPath =
|
|
73581
|
-
const skillsDir =
|
|
73806
|
+
const manifestPath = path7.join(projectRoot, "skills.txt");
|
|
73807
|
+
const skillsDir = path7.join(projectRoot, UNIVERSAL_SKILLS_DIR);
|
|
73582
73808
|
const source = positionals[0];
|
|
73583
73809
|
if (source) {
|
|
73584
73810
|
const parsed = parseSkillSource(source);
|
|
@@ -73625,7 +73851,7 @@ function installSkill(skillsBin, skill, projectRoot) {
|
|
|
73625
73851
|
const label = excludePrivate ? ` (excluding ${PRIVATE_SKILLS_DIRNAME}/)` : "";
|
|
73626
73852
|
console.log(` Installing ${skillDirs.length} skill(s)${label}...`);
|
|
73627
73853
|
for (const dir of skillDirs) {
|
|
73628
|
-
const rel =
|
|
73854
|
+
const rel = path7.relative(projectRoot, dir);
|
|
73629
73855
|
const installSource = rel.startsWith(".") ? rel : `./${rel}`;
|
|
73630
73856
|
for (const agent of agents) {
|
|
73631
73857
|
(0, import_node_child_process7.execSync)(`${skillsBin} add ${JSON.stringify(installSource)} -a ${agent} -s '*' -y --full-depth`, {
|
|
@@ -73651,7 +73877,7 @@ function installSkill(skillsBin, skill, projectRoot) {
|
|
|
73651
73877
|
}
|
|
73652
73878
|
var DEFAULT_AGENTS = ["claude-code", "codex", "gemini-cli", "pi"];
|
|
73653
73879
|
function installPackSkills(skillsBin, projectRoot) {
|
|
73654
|
-
const manifestPath =
|
|
73880
|
+
const manifestPath = path7.join(projectRoot, ".eve", "manifest.yaml");
|
|
73655
73881
|
if (!fs4.existsSync(manifestPath)) return false;
|
|
73656
73882
|
let manifest;
|
|
73657
73883
|
try {
|
|
@@ -73663,7 +73889,7 @@ function installPackSkills(skillsBin, projectRoot) {
|
|
|
73663
73889
|
const packs = xEve?.packs ?? [];
|
|
73664
73890
|
if (packs.length === 0) return false;
|
|
73665
73891
|
const installAgents = xEve?.install_agents ?? DEFAULT_AGENTS;
|
|
73666
|
-
const lockfilePath =
|
|
73892
|
+
const lockfilePath = path7.join(projectRoot, ".eve", "packs.lock.yaml");
|
|
73667
73893
|
if (!fs4.existsSync(lockfilePath)) {
|
|
73668
73894
|
console.error('Warning: packs defined in manifest but no .eve/packs.lock.yaml found. Run "eve agents sync" first.');
|
|
73669
73895
|
return false;
|
|
@@ -73691,14 +73917,14 @@ function installPackSkills(skillsBin, projectRoot) {
|
|
|
73691
73917
|
for (const pack of packs) {
|
|
73692
73918
|
const agents = pack.install_agents ?? installAgents;
|
|
73693
73919
|
console.log(` Pack: ${pack.source}`);
|
|
73694
|
-
const localDir = resolveLocalDirIfExists({ source: pack.source, type: "local", raw: pack.source, name:
|
|
73920
|
+
const localDir = resolveLocalDirIfExists({ source: pack.source, type: "local", raw: pack.source, name: path7.basename(pack.source) }, projectRoot);
|
|
73695
73921
|
const wantsExcludePrivate = localDir !== null && !sourcePathExplicitlyTargetsPrivate(pack.source);
|
|
73696
73922
|
for (const agent of agents) {
|
|
73697
73923
|
try {
|
|
73698
73924
|
if (wantsExcludePrivate && localDir) {
|
|
73699
73925
|
const skillDirs = findSkillDirs(localDir, { fullDepth: true, excludePrivate: true });
|
|
73700
73926
|
for (const dir of skillDirs) {
|
|
73701
|
-
const rel =
|
|
73927
|
+
const rel = path7.relative(projectRoot, dir);
|
|
73702
73928
|
const installSource = rel.startsWith(".") ? rel : `./${rel}`;
|
|
73703
73929
|
(0, import_node_child_process7.execSync)(`${skillsBin} add ${JSON.stringify(installSource)} -a ${agent} -s '*' -y --full-depth`, {
|
|
73704
73930
|
cwd: projectRoot,
|
|
@@ -73738,8 +73964,8 @@ ${source}
|
|
|
73738
73964
|
}
|
|
73739
73965
|
function resolveSkillsBinary() {
|
|
73740
73966
|
const candidates = [
|
|
73741
|
-
|
|
73742
|
-
|
|
73967
|
+
path7.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
|
|
73968
|
+
path7.resolve(__dirname, "..", "..", ".bin", "skills")
|
|
73743
73969
|
];
|
|
73744
73970
|
for (const candidate of candidates) {
|
|
73745
73971
|
if (fs4.existsSync(candidate)) return candidate;
|
|
@@ -73766,13 +73992,13 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
|
|
|
73766
73992
|
const basePattern = pattern.replace(/\/\*+$/, "");
|
|
73767
73993
|
let searchRoot;
|
|
73768
73994
|
if (basePattern.startsWith("./") || basePattern.startsWith("../")) {
|
|
73769
|
-
searchRoot =
|
|
73995
|
+
searchRoot = path7.resolve(path7.dirname(basePath), basePattern);
|
|
73770
73996
|
} else if (basePattern.startsWith("/")) {
|
|
73771
73997
|
searchRoot = basePattern;
|
|
73772
73998
|
} else if (basePattern.startsWith("~")) {
|
|
73773
73999
|
searchRoot = basePattern.replace(/^~/, process.env.HOME || "~");
|
|
73774
74000
|
} else {
|
|
73775
|
-
searchRoot =
|
|
74001
|
+
searchRoot = path7.resolve(path7.dirname(basePath), basePattern);
|
|
73776
74002
|
}
|
|
73777
74003
|
if (!fs4.existsSync(searchRoot)) {
|
|
73778
74004
|
console.warn(`Warning: Glob pattern base directory not found: ${searchRoot}`);
|
|
@@ -73788,11 +74014,11 @@ function expandGlobPattern(pattern, basePath, explicitPrivateTarget) {
|
|
|
73788
74014
|
if (!explicitPrivateTarget && entry.name === PRIVATE_SKILLS_DIRNAME) {
|
|
73789
74015
|
continue;
|
|
73790
74016
|
}
|
|
73791
|
-
const fullPath =
|
|
73792
|
-
const skillMdPath =
|
|
74017
|
+
const fullPath = path7.join(dir, entry.name);
|
|
74018
|
+
const skillMdPath = path7.join(fullPath, "SKILL.md");
|
|
73793
74019
|
if (fs4.existsSync(skillMdPath)) {
|
|
73794
74020
|
const name = entry.name;
|
|
73795
|
-
const relativePath =
|
|
74021
|
+
const relativePath = path7.relative(path7.dirname(basePath), fullPath);
|
|
73796
74022
|
const source = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
73797
74023
|
if (!explicitPrivateTarget && pathContainsPrivateSkills(source)) {
|
|
73798
74024
|
continue;
|
|
@@ -73821,7 +74047,7 @@ function parseSkillsManifest(manifestPath) {
|
|
|
73821
74047
|
}
|
|
73822
74048
|
const content = fs4.readFileSync(manifestPath, "utf-8");
|
|
73823
74049
|
const sources = [];
|
|
73824
|
-
const manifestDir =
|
|
74050
|
+
const manifestDir = path7.dirname(manifestPath);
|
|
73825
74051
|
for (const rawLine of content.split("\n")) {
|
|
73826
74052
|
const line = rawLine.split("#")[0].trim();
|
|
73827
74053
|
if (!line) continue;
|
|
@@ -73848,19 +74074,19 @@ function tryExpandLocalDirectory(skill, manifestDir) {
|
|
|
73848
74074
|
if (source.startsWith("~")) {
|
|
73849
74075
|
source = source.replace(/^~/, process.env.HOME || "~");
|
|
73850
74076
|
}
|
|
73851
|
-
const abs =
|
|
74077
|
+
const abs = path7.isAbsolute(source) ? source : path7.resolve(manifestDir, source);
|
|
73852
74078
|
try {
|
|
73853
74079
|
if (!fs4.existsSync(abs) || !fs4.statSync(abs).isDirectory()) return null;
|
|
73854
74080
|
} catch {
|
|
73855
74081
|
return null;
|
|
73856
74082
|
}
|
|
73857
|
-
if (fs4.existsSync(
|
|
74083
|
+
if (fs4.existsSync(path7.join(abs, "SKILL.md"))) return null;
|
|
73858
74084
|
const explicitPrivate = sourcePathExplicitlyTargetsPrivate(skill.source);
|
|
73859
74085
|
const skillDirs = findSkillDirs(abs, { fullDepth: true, excludePrivate: !explicitPrivate });
|
|
73860
74086
|
if (skillDirs.length === 0) return null;
|
|
73861
74087
|
return skillDirs.map((dir) => {
|
|
73862
|
-
const name =
|
|
73863
|
-
const relativePath =
|
|
74088
|
+
const name = path7.basename(dir);
|
|
74089
|
+
const relativePath = path7.relative(manifestDir, dir);
|
|
73864
74090
|
const resolvedSource = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
73865
74091
|
return {
|
|
73866
74092
|
raw: skill.raw,
|
|
@@ -73881,22 +74107,22 @@ function parseSkillSource(line) {
|
|
|
73881
74107
|
return { raw: line, source: line, type: "github", name: name2 };
|
|
73882
74108
|
}
|
|
73883
74109
|
if (line.startsWith("/") || line.startsWith("~")) {
|
|
73884
|
-
const name2 =
|
|
74110
|
+
const name2 = path7.basename(line);
|
|
73885
74111
|
return { raw: line, source: line, type: "local", name: name2 };
|
|
73886
74112
|
}
|
|
73887
74113
|
if (line.startsWith("./") || line.startsWith("../")) {
|
|
73888
|
-
const name2 =
|
|
74114
|
+
const name2 = path7.basename(line);
|
|
73889
74115
|
return { raw: line, source: line, type: "local", name: name2 };
|
|
73890
74116
|
}
|
|
73891
74117
|
if (fs4.existsSync(line)) {
|
|
73892
|
-
const name2 =
|
|
74118
|
+
const name2 = path7.basename(line);
|
|
73893
74119
|
return { raw: line, source: `./${line}`, type: "local", name: name2 };
|
|
73894
74120
|
}
|
|
73895
74121
|
if (line.includes("/") && !line.includes(" ")) {
|
|
73896
74122
|
const name2 = extractNameFromRepo(line);
|
|
73897
74123
|
return { raw: line, source: line, type: "github", name: name2 };
|
|
73898
74124
|
}
|
|
73899
|
-
const name =
|
|
74125
|
+
const name = path7.basename(line);
|
|
73900
74126
|
return { raw: line, source: `./${line}`, type: "local", name };
|
|
73901
74127
|
}
|
|
73902
74128
|
function extractNameFromUrl(url) {
|
|
@@ -73904,7 +74130,7 @@ function extractNameFromUrl(url) {
|
|
|
73904
74130
|
if (match) {
|
|
73905
74131
|
return match[1].replace(/\.git$/, "");
|
|
73906
74132
|
}
|
|
73907
|
-
return
|
|
74133
|
+
return path7.basename(new URL(url).pathname).replace(/\.git$/, "");
|
|
73908
74134
|
}
|
|
73909
74135
|
function extractNameFromRepo(repo) {
|
|
73910
74136
|
const parts = repo.split("/");
|
|
@@ -73924,9 +74150,9 @@ function getInstalledSkills(skillsDir) {
|
|
|
73924
74150
|
return installed;
|
|
73925
74151
|
}
|
|
73926
74152
|
function ensureSkillsSymlink(projectRoot) {
|
|
73927
|
-
const agentSkills =
|
|
73928
|
-
const claudeDir =
|
|
73929
|
-
const claudeSkills =
|
|
74153
|
+
const agentSkills = path7.join(projectRoot, UNIVERSAL_SKILLS_DIR);
|
|
74154
|
+
const claudeDir = path7.join(projectRoot, ".claude");
|
|
74155
|
+
const claudeSkills = path7.join(claudeDir, "skills");
|
|
73930
74156
|
if (!fs4.existsSync(agentSkills)) {
|
|
73931
74157
|
fs4.mkdirSync(agentSkills, { recursive: true });
|
|
73932
74158
|
}
|
|
@@ -73940,9 +74166,9 @@ function ensureSkillsSymlink(projectRoot) {
|
|
|
73940
74166
|
const entries = fs4.readdirSync(agentSkills, { withFileTypes: true });
|
|
73941
74167
|
for (const entry of entries) {
|
|
73942
74168
|
if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
|
|
73943
|
-
const dst =
|
|
74169
|
+
const dst = path7.join(claudeSkills, entry.name);
|
|
73944
74170
|
if (fs4.existsSync(dst)) continue;
|
|
73945
|
-
fs4.symlinkSync(
|
|
74171
|
+
fs4.symlinkSync(path7.join("..", "..", UNIVERSAL_SKILLS_DIR, entry.name), dst);
|
|
73946
74172
|
}
|
|
73947
74173
|
}
|
|
73948
74174
|
} catch {
|
|
@@ -73975,7 +74201,7 @@ function resolveLocalDirIfExists(skill, projectRoot) {
|
|
|
73975
74201
|
if (source.startsWith("~")) {
|
|
73976
74202
|
source = source.replace(/^~/, process.env.HOME || "~");
|
|
73977
74203
|
}
|
|
73978
|
-
const abs =
|
|
74204
|
+
const abs = path7.isAbsolute(source) ? source : path7.resolve(projectRoot, source);
|
|
73979
74205
|
try {
|
|
73980
74206
|
if (!fs4.existsSync(abs)) return null;
|
|
73981
74207
|
if (!fs4.statSync(abs).isDirectory()) return null;
|
|
@@ -73988,7 +74214,7 @@ function sourcePathExplicitlyTargetsPrivate(source) {
|
|
|
73988
74214
|
return pathContainsPrivateSkills(source);
|
|
73989
74215
|
}
|
|
73990
74216
|
function pathContainsPrivateSkills(source) {
|
|
73991
|
-
const normalized =
|
|
74217
|
+
const normalized = path7.normalize(source).replace(/\\/g, "/");
|
|
73992
74218
|
const segments = normalized.split("/").filter(Boolean);
|
|
73993
74219
|
return segments.includes(PRIVATE_SKILLS_DIRNAME);
|
|
73994
74220
|
}
|
|
@@ -74016,7 +74242,7 @@ function findSkillDirs(rootDir, opts) {
|
|
|
74016
74242
|
for (const entry of entries) {
|
|
74017
74243
|
if (!entry.isDirectory()) continue;
|
|
74018
74244
|
if (shouldSkipDir(dir, entry.name)) continue;
|
|
74019
|
-
walk(
|
|
74245
|
+
walk(path7.join(dir, entry.name));
|
|
74020
74246
|
}
|
|
74021
74247
|
};
|
|
74022
74248
|
walk(rootDir);
|
|
@@ -74312,8 +74538,8 @@ async function handleAdmin(subcommand, positionals, flags, context2) {
|
|
|
74312
74538
|
if (untilRaw) params.set("until", untilRaw);
|
|
74313
74539
|
if (limit) params.set("limit", limit);
|
|
74314
74540
|
const qs = params.toString();
|
|
74315
|
-
const
|
|
74316
|
-
const response = await requestJson(context2,
|
|
74541
|
+
const path9 = `/admin/orgs/${orgId}/balance/transactions${qs ? `?${qs}` : ""}`;
|
|
74542
|
+
const response = await requestJson(context2, path9);
|
|
74317
74543
|
if (json) {
|
|
74318
74544
|
outputJson(response, true);
|
|
74319
74545
|
} else {
|
|
@@ -74351,8 +74577,8 @@ ${response.length} transaction(s)`);
|
|
|
74351
74577
|
if (untilRaw) params.set("until", untilRaw);
|
|
74352
74578
|
if (limit) params.set("limit", limit);
|
|
74353
74579
|
const qs = params.toString();
|
|
74354
|
-
const
|
|
74355
|
-
const response = await requestJson(context2,
|
|
74580
|
+
const path9 = `/admin/orgs/${orgId}/usage${qs ? `?${qs}` : ""}`;
|
|
74581
|
+
const response = await requestJson(context2, path9);
|
|
74356
74582
|
if (json) {
|
|
74357
74583
|
outputJson(response, true);
|
|
74358
74584
|
} else {
|
|
@@ -74376,8 +74602,8 @@ ${response.length} record(s)`);
|
|
|
74376
74602
|
if (sinceRaw) params.set("since", parseSinceValue4(sinceRaw));
|
|
74377
74603
|
if (untilRaw) params.set("until", untilRaw);
|
|
74378
74604
|
const qs = params.toString();
|
|
74379
|
-
const
|
|
74380
|
-
const response = await requestJson(context2,
|
|
74605
|
+
const path9 = `/admin/orgs/${orgId}/usage/summary${qs ? `?${qs}` : ""}`;
|
|
74606
|
+
const response = await requestJson(context2, path9);
|
|
74381
74607
|
if (json) {
|
|
74382
74608
|
outputJson(response, true);
|
|
74383
74609
|
} else {
|
|
@@ -74413,8 +74639,8 @@ ${response.length} record(s)`);
|
|
|
74413
74639
|
if (limit) params.set("limit", limit);
|
|
74414
74640
|
if (offset) params.set("offset", offset);
|
|
74415
74641
|
const query = params.toString();
|
|
74416
|
-
const
|
|
74417
|
-
const response = await requestJson(context2,
|
|
74642
|
+
const path9 = `/admin/ingress-aliases${query ? `?${query}` : ""}`;
|
|
74643
|
+
const response = await requestJson(context2, path9);
|
|
74418
74644
|
if (json) {
|
|
74419
74645
|
outputJson(response, true);
|
|
74420
74646
|
return;
|
|
@@ -74665,11 +74891,11 @@ function resolveAgentsConfigPaths(repoRoot, manifest) {
|
|
|
74665
74891
|
function pickString(value) {
|
|
74666
74892
|
return typeof value === "string" && value.trim().length > 0 ? value : void 0;
|
|
74667
74893
|
}
|
|
74668
|
-
function ensureFileExists(
|
|
74669
|
-
if (!(0, import_node_fs11.existsSync)(
|
|
74670
|
-
throw new Error(`Missing ${label} at ${
|
|
74894
|
+
function ensureFileExists(path9, label) {
|
|
74895
|
+
if (!(0, import_node_fs11.existsSync)(path9)) {
|
|
74896
|
+
throw new Error(`Missing ${label} at ${path9}. Update manifest config_path or add the file.`);
|
|
74671
74897
|
}
|
|
74672
|
-
return
|
|
74898
|
+
return path9;
|
|
74673
74899
|
}
|
|
74674
74900
|
function isLocalApiUrl(apiUrl) {
|
|
74675
74901
|
try {
|
|
@@ -75099,8 +75325,8 @@ function formatAgeSeconds(isoDate) {
|
|
|
75099
75325
|
|
|
75100
75326
|
// src/commands/init.ts
|
|
75101
75327
|
var fs5 = __toESM(require("node:fs"));
|
|
75102
|
-
var
|
|
75103
|
-
var
|
|
75328
|
+
var path8 = __toESM(require("node:path"));
|
|
75329
|
+
var os4 = __toESM(require("node:os"));
|
|
75104
75330
|
var import_node_child_process9 = require("node:child_process");
|
|
75105
75331
|
var DEFAULT_TEMPLATE = "https://github.com/incept5/eve-horizon-starter";
|
|
75106
75332
|
var DEFAULT_BRANCH = "main";
|
|
@@ -75109,8 +75335,8 @@ async function handleInit(positionals, flags) {
|
|
|
75109
75335
|
const template = getStringFlag(flags, ["template", "t"]) || DEFAULT_TEMPLATE;
|
|
75110
75336
|
const branch = getStringFlag(flags, ["branch", "b"]) || DEFAULT_BRANCH;
|
|
75111
75337
|
const skipSkills = Boolean(flags["skip-skills"]);
|
|
75112
|
-
const resolvedTarget =
|
|
75113
|
-
const targetName =
|
|
75338
|
+
const resolvedTarget = path8.resolve(targetDir);
|
|
75339
|
+
const targetName = path8.basename(resolvedTarget);
|
|
75114
75340
|
const isCurrentDir = targetDir === ".";
|
|
75115
75341
|
if (isCurrentDir) {
|
|
75116
75342
|
if (fs5.existsSync(resolvedTarget)) {
|
|
@@ -75137,7 +75363,7 @@ async function handleInit(positionals, flags) {
|
|
|
75137
75363
|
console.log(`Template: ${template}`);
|
|
75138
75364
|
console.log(`Branch: ${branch}`);
|
|
75139
75365
|
console.log("");
|
|
75140
|
-
const tempDir = fs5.mkdtempSync(
|
|
75366
|
+
const tempDir = fs5.mkdtempSync(path8.join(os4.tmpdir(), "eve-init-"));
|
|
75141
75367
|
try {
|
|
75142
75368
|
console.log("Downloading template...");
|
|
75143
75369
|
const cloneResult = (0, import_node_child_process9.spawnSync)("git", ["clone", "--depth=1", `--branch=${branch}`, template, tempDir], {
|
|
@@ -75150,7 +75376,7 @@ async function handleInit(positionals, flags) {
|
|
|
75150
75376
|
${cloneResult.stderr || cloneResult.stdout}`
|
|
75151
75377
|
);
|
|
75152
75378
|
}
|
|
75153
|
-
const gitDir =
|
|
75379
|
+
const gitDir = path8.join(tempDir, ".git");
|
|
75154
75380
|
if (fs5.existsSync(gitDir)) {
|
|
75155
75381
|
fs5.rmSync(gitDir, { recursive: true, force: true });
|
|
75156
75382
|
}
|
|
@@ -75198,8 +75424,8 @@ ${cloneResult.stderr || cloneResult.stdout}`
|
|
|
75198
75424
|
function copyDirRecursive(src, dest) {
|
|
75199
75425
|
const entries = fs5.readdirSync(src, { withFileTypes: true });
|
|
75200
75426
|
for (const entry of entries) {
|
|
75201
|
-
const srcPath =
|
|
75202
|
-
const destPath =
|
|
75427
|
+
const srcPath = path8.join(src, entry.name);
|
|
75428
|
+
const destPath = path8.join(dest, entry.name);
|
|
75203
75429
|
if (entry.isDirectory()) {
|
|
75204
75430
|
if (!fs5.existsSync(destPath)) {
|
|
75205
75431
|
fs5.mkdirSync(destPath, { recursive: true });
|
|
@@ -75217,8 +75443,8 @@ function copyDirRecursive(src, dest) {
|
|
|
75217
75443
|
}
|
|
75218
75444
|
function resolveSkillsBinary2() {
|
|
75219
75445
|
const candidates = [
|
|
75220
|
-
|
|
75221
|
-
|
|
75446
|
+
path8.resolve(__dirname, "..", "node_modules", ".bin", "skills"),
|
|
75447
|
+
path8.resolve(__dirname, "..", "..", ".bin", "skills")
|
|
75222
75448
|
];
|
|
75223
75449
|
for (const candidate of candidates) {
|
|
75224
75450
|
if (fs5.existsSync(candidate)) return candidate;
|
|
@@ -75230,7 +75456,7 @@ function resolveSkillsBinary2() {
|
|
|
75230
75456
|
);
|
|
75231
75457
|
}
|
|
75232
75458
|
async function installSkills(projectRoot) {
|
|
75233
|
-
const skillsTxt =
|
|
75459
|
+
const skillsTxt = path8.join(projectRoot, "skills.txt");
|
|
75234
75460
|
if (!fs5.existsSync(skillsTxt)) {
|
|
75235
75461
|
console.log("No skills.txt found, skipping skill installation");
|
|
75236
75462
|
return;
|
|
@@ -75274,9 +75500,9 @@ async function installSkills(projectRoot) {
|
|
|
75274
75500
|
}
|
|
75275
75501
|
}
|
|
75276
75502
|
function ensureSkillsSymlink2(projectRoot) {
|
|
75277
|
-
const agentSkills =
|
|
75278
|
-
const claudeDir =
|
|
75279
|
-
const claudeSkills =
|
|
75503
|
+
const agentSkills = path8.join(projectRoot, ".agents", "skills");
|
|
75504
|
+
const claudeDir = path8.join(projectRoot, ".claude");
|
|
75505
|
+
const claudeSkills = path8.join(claudeDir, "skills");
|
|
75280
75506
|
if (!fs5.existsSync(agentSkills)) {
|
|
75281
75507
|
fs5.mkdirSync(agentSkills, { recursive: true });
|
|
75282
75508
|
}
|
|
@@ -75290,9 +75516,9 @@ function ensureSkillsSymlink2(projectRoot) {
|
|
|
75290
75516
|
const entries = fs5.readdirSync(agentSkills, { withFileTypes: true });
|
|
75291
75517
|
for (const entry of entries) {
|
|
75292
75518
|
if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
|
|
75293
|
-
const dst =
|
|
75519
|
+
const dst = path8.join(claudeSkills, entry.name);
|
|
75294
75520
|
if (fs5.existsSync(dst)) continue;
|
|
75295
|
-
fs5.symlinkSync(
|
|
75521
|
+
fs5.symlinkSync(path8.join("..", "..", ".agents", "skills", entry.name), dst);
|
|
75296
75522
|
}
|
|
75297
75523
|
}
|
|
75298
75524
|
} catch {
|
|
@@ -77198,8 +77424,8 @@ async function handleBindings(action, flags, context2, json) {
|
|
|
77198
77424
|
params.set("project_id", projectId);
|
|
77199
77425
|
}
|
|
77200
77426
|
const queryString = params.toString();
|
|
77201
|
-
const
|
|
77202
|
-
const bindingsResponse = await requestJson(context2,
|
|
77427
|
+
const path9 = queryString ? `/orgs/${orgId}/access/bindings?${queryString}` : `/orgs/${orgId}/access/bindings`;
|
|
77428
|
+
const bindingsResponse = await requestJson(context2, path9);
|
|
77203
77429
|
const bindings = unwrapListResponse(bindingsResponse);
|
|
77204
77430
|
if (json) {
|
|
77205
77431
|
outputJson({ data: bindings }, json);
|
|
@@ -78439,8 +78665,8 @@ Sync complete: ${parts.join(", ")}`);
|
|
|
78439
78665
|
// src/commands/docs.ts
|
|
78440
78666
|
var import_node_fs17 = require("node:fs");
|
|
78441
78667
|
var import_node_path17 = require("node:path");
|
|
78442
|
-
function encodeDocPathParam(
|
|
78443
|
-
const trimmed =
|
|
78668
|
+
function encodeDocPathParam(path9) {
|
|
78669
|
+
const trimmed = path9.startsWith("/") ? path9.slice(1) : path9;
|
|
78444
78670
|
return encodeURIComponent(trimmed);
|
|
78445
78671
|
}
|
|
78446
78672
|
function parseWhereClause(raw) {
|
|
@@ -79970,10 +80196,10 @@ async function handleFs(subcommand, positionals, flags, context2) {
|
|
|
79970
80196
|
}
|
|
79971
80197
|
case "share": {
|
|
79972
80198
|
const orgId = getOrgOrThrow(flags, context2);
|
|
79973
|
-
const
|
|
79974
|
-
if (!
|
|
80199
|
+
const path9 = positionals[0];
|
|
80200
|
+
if (!path9) throw new Error("Usage: eve fs share <path> --org <org> [--expires <duration>] [--label <text>]");
|
|
79975
80201
|
const body = {
|
|
79976
|
-
path:
|
|
80202
|
+
path: path9,
|
|
79977
80203
|
expires_in: getStringFlag(flags, ["expires", "expires-in", "ttl"]) ?? void 0,
|
|
79978
80204
|
label: getStringFlag(flags, ["label"]) ?? void 0
|
|
79979
80205
|
};
|
|
@@ -81173,11 +81399,11 @@ function ensureTool(name, installHint) {
|
|
|
81173
81399
|
}
|
|
81174
81400
|
}
|
|
81175
81401
|
function requireToolPath(name, hint) {
|
|
81176
|
-
const
|
|
81177
|
-
if (!
|
|
81402
|
+
const path9 = findExecutable(name);
|
|
81403
|
+
if (!path9) {
|
|
81178
81404
|
throw new Error(`Missing required tool '${name}'. ${hint}`);
|
|
81179
81405
|
}
|
|
81180
|
-
return
|
|
81406
|
+
return path9;
|
|
81181
81407
|
}
|
|
81182
81408
|
function assertDockerRunning() {
|
|
81183
81409
|
const docker = findExecutable("docker");
|