@zeroxyz/cli 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2314 -239
  2. package/package.json +3 -1
package/dist/index.js CHANGED
@@ -76448,6 +76448,2000 @@ var require_siwe = __commonJS({
76448
76448
  }
76449
76449
  });
76450
76450
 
76451
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
76452
+ var require_constants3 = __commonJS({
76453
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports$1, module) {
76454
+ init_esm_shims();
76455
+ var SEMVER_SPEC_VERSION = "2.0.0";
76456
+ var MAX_LENGTH = 256;
76457
+ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
76458
+ 9007199254740991;
76459
+ var MAX_SAFE_COMPONENT_LENGTH = 16;
76460
+ var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
76461
+ var RELEASE_TYPES = [
76462
+ "major",
76463
+ "premajor",
76464
+ "minor",
76465
+ "preminor",
76466
+ "patch",
76467
+ "prepatch",
76468
+ "prerelease"
76469
+ ];
76470
+ module.exports = {
76471
+ MAX_LENGTH,
76472
+ MAX_SAFE_COMPONENT_LENGTH,
76473
+ MAX_SAFE_BUILD_LENGTH,
76474
+ MAX_SAFE_INTEGER,
76475
+ RELEASE_TYPES,
76476
+ SEMVER_SPEC_VERSION,
76477
+ FLAG_INCLUDE_PRERELEASE: 1,
76478
+ FLAG_LOOSE: 2
76479
+ };
76480
+ }
76481
+ });
76482
+
76483
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
76484
+ var require_debug2 = __commonJS({
76485
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports$1, module) {
76486
+ init_esm_shims();
76487
+ var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
76488
+ };
76489
+ module.exports = debug;
76490
+ }
76491
+ });
76492
+
76493
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
76494
+ var require_re = __commonJS({
76495
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports$1, module) {
76496
+ init_esm_shims();
76497
+ var {
76498
+ MAX_SAFE_COMPONENT_LENGTH,
76499
+ MAX_SAFE_BUILD_LENGTH,
76500
+ MAX_LENGTH
76501
+ } = require_constants3();
76502
+ var debug = require_debug2();
76503
+ exports$1 = module.exports = {};
76504
+ var re = exports$1.re = [];
76505
+ var safeRe = exports$1.safeRe = [];
76506
+ var src = exports$1.src = [];
76507
+ var safeSrc = exports$1.safeSrc = [];
76508
+ var t = exports$1.t = {};
76509
+ var R2 = 0;
76510
+ var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
76511
+ var safeRegexReplacements = [
76512
+ ["\\s", 1],
76513
+ ["\\d", MAX_LENGTH],
76514
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
76515
+ ];
76516
+ var makeSafeRegex = (value) => {
76517
+ for (const [token, max] of safeRegexReplacements) {
76518
+ value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
76519
+ }
76520
+ return value;
76521
+ };
76522
+ var createToken = (name, value, isGlobal) => {
76523
+ const safe = makeSafeRegex(value);
76524
+ const index3 = R2++;
76525
+ debug(name, index3, value);
76526
+ t[name] = index3;
76527
+ src[index3] = value;
76528
+ safeSrc[index3] = safe;
76529
+ re[index3] = new RegExp(value, isGlobal ? "g" : void 0);
76530
+ safeRe[index3] = new RegExp(safe, isGlobal ? "g" : void 0);
76531
+ };
76532
+ createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
76533
+ createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
76534
+ createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
76535
+ createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
76536
+ createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
76537
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`);
76538
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`);
76539
+ createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
76540
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
76541
+ createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
76542
+ createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
76543
+ createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
76544
+ createToken("FULL", `^${src[t.FULLPLAIN]}$`);
76545
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
76546
+ createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
76547
+ createToken("GTLT", "((?:<|>)?=?)");
76548
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
76549
+ createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
76550
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
76551
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
76552
+ createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
76553
+ createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
76554
+ createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
76555
+ createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
76556
+ createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
76557
+ createToken("COERCERTL", src[t.COERCE], true);
76558
+ createToken("COERCERTLFULL", src[t.COERCEFULL], true);
76559
+ createToken("LONETILDE", "(?:~>?)");
76560
+ createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
76561
+ exports$1.tildeTrimReplace = "$1~";
76562
+ createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
76563
+ createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
76564
+ createToken("LONECARET", "(?:\\^)");
76565
+ createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
76566
+ exports$1.caretTrimReplace = "$1^";
76567
+ createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
76568
+ createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
76569
+ createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
76570
+ createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
76571
+ createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
76572
+ exports$1.comparatorTrimReplace = "$1$2$3";
76573
+ createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
76574
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
76575
+ createToken("STAR", "(<|>)?=?\\s*\\*");
76576
+ createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
76577
+ createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
76578
+ }
76579
+ });
76580
+
76581
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
76582
+ var require_parse_options = __commonJS({
76583
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports$1, module) {
76584
+ init_esm_shims();
76585
+ var looseOption = Object.freeze({ loose: true });
76586
+ var emptyOpts = Object.freeze({});
76587
+ var parseOptions = (options) => {
76588
+ if (!options) {
76589
+ return emptyOpts;
76590
+ }
76591
+ if (typeof options !== "object") {
76592
+ return looseOption;
76593
+ }
76594
+ return options;
76595
+ };
76596
+ module.exports = parseOptions;
76597
+ }
76598
+ });
76599
+
76600
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
76601
+ var require_identifiers2 = __commonJS({
76602
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports$1, module) {
76603
+ init_esm_shims();
76604
+ var numeric = /^[0-9]+$/;
76605
+ var compareIdentifiers = (a, b3) => {
76606
+ if (typeof a === "number" && typeof b3 === "number") {
76607
+ return a === b3 ? 0 : a < b3 ? -1 : 1;
76608
+ }
76609
+ const anum2 = numeric.test(a);
76610
+ const bnum = numeric.test(b3);
76611
+ if (anum2 && bnum) {
76612
+ a = +a;
76613
+ b3 = +b3;
76614
+ }
76615
+ return a === b3 ? 0 : anum2 && !bnum ? -1 : bnum && !anum2 ? 1 : a < b3 ? -1 : 1;
76616
+ };
76617
+ var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
76618
+ module.exports = {
76619
+ compareIdentifiers,
76620
+ rcompareIdentifiers
76621
+ };
76622
+ }
76623
+ });
76624
+
76625
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
76626
+ var require_semver = __commonJS({
76627
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports$1, module) {
76628
+ init_esm_shims();
76629
+ var debug = require_debug2();
76630
+ var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
76631
+ var { safeRe: re, t } = require_re();
76632
+ var parseOptions = require_parse_options();
76633
+ var { compareIdentifiers } = require_identifiers2();
76634
+ var isPrereleaseIdentifier = (prerelease, identifier) => {
76635
+ const identifiers = identifier.split(".");
76636
+ if (identifiers.length > prerelease.length) {
76637
+ return false;
76638
+ }
76639
+ for (let i = 0; i < identifiers.length; i++) {
76640
+ if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) {
76641
+ return false;
76642
+ }
76643
+ }
76644
+ return true;
76645
+ };
76646
+ var SemVer = class _SemVer {
76647
+ constructor(version12, options) {
76648
+ options = parseOptions(options);
76649
+ if (version12 instanceof _SemVer) {
76650
+ if (version12.loose === !!options.loose && version12.includePrerelease === !!options.includePrerelease) {
76651
+ return version12;
76652
+ } else {
76653
+ version12 = version12.version;
76654
+ }
76655
+ } else if (typeof version12 !== "string") {
76656
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version12}".`);
76657
+ }
76658
+ if (version12.length > MAX_LENGTH) {
76659
+ throw new TypeError(
76660
+ `version is longer than ${MAX_LENGTH} characters`
76661
+ );
76662
+ }
76663
+ debug("SemVer", version12, options);
76664
+ this.options = options;
76665
+ this.loose = !!options.loose;
76666
+ this.includePrerelease = !!options.includePrerelease;
76667
+ const m2 = version12.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
76668
+ if (!m2) {
76669
+ throw new TypeError(`Invalid Version: ${version12}`);
76670
+ }
76671
+ this.raw = version12;
76672
+ this.major = +m2[1];
76673
+ this.minor = +m2[2];
76674
+ this.patch = +m2[3];
76675
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
76676
+ throw new TypeError("Invalid major version");
76677
+ }
76678
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
76679
+ throw new TypeError("Invalid minor version");
76680
+ }
76681
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
76682
+ throw new TypeError("Invalid patch version");
76683
+ }
76684
+ if (!m2[4]) {
76685
+ this.prerelease = [];
76686
+ } else {
76687
+ this.prerelease = m2[4].split(".").map((id) => {
76688
+ if (/^[0-9]+$/.test(id)) {
76689
+ const num2 = +id;
76690
+ if (num2 >= 0 && num2 < MAX_SAFE_INTEGER) {
76691
+ return num2;
76692
+ }
76693
+ }
76694
+ return id;
76695
+ });
76696
+ }
76697
+ this.build = m2[5] ? m2[5].split(".") : [];
76698
+ this.format();
76699
+ }
76700
+ format() {
76701
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
76702
+ if (this.prerelease.length) {
76703
+ this.version += `-${this.prerelease.join(".")}`;
76704
+ }
76705
+ return this.version;
76706
+ }
76707
+ toString() {
76708
+ return this.version;
76709
+ }
76710
+ compare(other) {
76711
+ debug("SemVer.compare", this.version, this.options, other);
76712
+ if (!(other instanceof _SemVer)) {
76713
+ if (typeof other === "string" && other === this.version) {
76714
+ return 0;
76715
+ }
76716
+ other = new _SemVer(other, this.options);
76717
+ }
76718
+ if (other.version === this.version) {
76719
+ return 0;
76720
+ }
76721
+ return this.compareMain(other) || this.comparePre(other);
76722
+ }
76723
+ compareMain(other) {
76724
+ if (!(other instanceof _SemVer)) {
76725
+ other = new _SemVer(other, this.options);
76726
+ }
76727
+ if (this.major < other.major) {
76728
+ return -1;
76729
+ }
76730
+ if (this.major > other.major) {
76731
+ return 1;
76732
+ }
76733
+ if (this.minor < other.minor) {
76734
+ return -1;
76735
+ }
76736
+ if (this.minor > other.minor) {
76737
+ return 1;
76738
+ }
76739
+ if (this.patch < other.patch) {
76740
+ return -1;
76741
+ }
76742
+ if (this.patch > other.patch) {
76743
+ return 1;
76744
+ }
76745
+ return 0;
76746
+ }
76747
+ comparePre(other) {
76748
+ if (!(other instanceof _SemVer)) {
76749
+ other = new _SemVer(other, this.options);
76750
+ }
76751
+ if (this.prerelease.length && !other.prerelease.length) {
76752
+ return -1;
76753
+ } else if (!this.prerelease.length && other.prerelease.length) {
76754
+ return 1;
76755
+ } else if (!this.prerelease.length && !other.prerelease.length) {
76756
+ return 0;
76757
+ }
76758
+ let i = 0;
76759
+ do {
76760
+ const a = this.prerelease[i];
76761
+ const b3 = other.prerelease[i];
76762
+ debug("prerelease compare", i, a, b3);
76763
+ if (a === void 0 && b3 === void 0) {
76764
+ return 0;
76765
+ } else if (b3 === void 0) {
76766
+ return 1;
76767
+ } else if (a === void 0) {
76768
+ return -1;
76769
+ } else if (a === b3) {
76770
+ continue;
76771
+ } else {
76772
+ return compareIdentifiers(a, b3);
76773
+ }
76774
+ } while (++i);
76775
+ }
76776
+ compareBuild(other) {
76777
+ if (!(other instanceof _SemVer)) {
76778
+ other = new _SemVer(other, this.options);
76779
+ }
76780
+ let i = 0;
76781
+ do {
76782
+ const a = this.build[i];
76783
+ const b3 = other.build[i];
76784
+ debug("build compare", i, a, b3);
76785
+ if (a === void 0 && b3 === void 0) {
76786
+ return 0;
76787
+ } else if (b3 === void 0) {
76788
+ return 1;
76789
+ } else if (a === void 0) {
76790
+ return -1;
76791
+ } else if (a === b3) {
76792
+ continue;
76793
+ } else {
76794
+ return compareIdentifiers(a, b3);
76795
+ }
76796
+ } while (++i);
76797
+ }
76798
+ // preminor will bump the version up to the next minor release, and immediately
76799
+ // down to pre-release. premajor and prepatch work the same way.
76800
+ inc(release, identifier, identifierBase) {
76801
+ if (release.startsWith("pre")) {
76802
+ if (!identifier && identifierBase === false) {
76803
+ throw new Error("invalid increment argument: identifier is empty");
76804
+ }
76805
+ if (identifier) {
76806
+ const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
76807
+ if (!match || match[1] !== identifier) {
76808
+ throw new Error(`invalid identifier: ${identifier}`);
76809
+ }
76810
+ }
76811
+ }
76812
+ switch (release) {
76813
+ case "premajor":
76814
+ this.prerelease.length = 0;
76815
+ this.patch = 0;
76816
+ this.minor = 0;
76817
+ this.major++;
76818
+ this.inc("pre", identifier, identifierBase);
76819
+ break;
76820
+ case "preminor":
76821
+ this.prerelease.length = 0;
76822
+ this.patch = 0;
76823
+ this.minor++;
76824
+ this.inc("pre", identifier, identifierBase);
76825
+ break;
76826
+ case "prepatch":
76827
+ this.prerelease.length = 0;
76828
+ this.inc("patch", identifier, identifierBase);
76829
+ this.inc("pre", identifier, identifierBase);
76830
+ break;
76831
+ // If the input is a non-prerelease version, this acts the same as
76832
+ // prepatch.
76833
+ case "prerelease":
76834
+ if (this.prerelease.length === 0) {
76835
+ this.inc("patch", identifier, identifierBase);
76836
+ }
76837
+ this.inc("pre", identifier, identifierBase);
76838
+ break;
76839
+ case "release":
76840
+ if (this.prerelease.length === 0) {
76841
+ throw new Error(`version ${this.raw} is not a prerelease`);
76842
+ }
76843
+ this.prerelease.length = 0;
76844
+ break;
76845
+ case "major":
76846
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
76847
+ this.major++;
76848
+ }
76849
+ this.minor = 0;
76850
+ this.patch = 0;
76851
+ this.prerelease = [];
76852
+ break;
76853
+ case "minor":
76854
+ if (this.patch !== 0 || this.prerelease.length === 0) {
76855
+ this.minor++;
76856
+ }
76857
+ this.patch = 0;
76858
+ this.prerelease = [];
76859
+ break;
76860
+ case "patch":
76861
+ if (this.prerelease.length === 0) {
76862
+ this.patch++;
76863
+ }
76864
+ this.prerelease = [];
76865
+ break;
76866
+ // This probably shouldn't be used publicly.
76867
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
76868
+ case "pre": {
76869
+ const base2 = Number(identifierBase) ? 1 : 0;
76870
+ if (this.prerelease.length === 0) {
76871
+ this.prerelease = [base2];
76872
+ } else {
76873
+ let i = this.prerelease.length;
76874
+ while (--i >= 0) {
76875
+ if (typeof this.prerelease[i] === "number") {
76876
+ this.prerelease[i]++;
76877
+ i = -2;
76878
+ }
76879
+ }
76880
+ if (i === -1) {
76881
+ if (identifier === this.prerelease.join(".") && identifierBase === false) {
76882
+ throw new Error("invalid increment argument: identifier already exists");
76883
+ }
76884
+ this.prerelease.push(base2);
76885
+ }
76886
+ }
76887
+ if (identifier) {
76888
+ let prerelease = [identifier, base2];
76889
+ if (identifierBase === false) {
76890
+ prerelease = [identifier];
76891
+ }
76892
+ if (isPrereleaseIdentifier(this.prerelease, identifier)) {
76893
+ const prereleaseBase = this.prerelease[identifier.split(".").length];
76894
+ if (isNaN(prereleaseBase)) {
76895
+ this.prerelease = prerelease;
76896
+ }
76897
+ } else {
76898
+ this.prerelease = prerelease;
76899
+ }
76900
+ }
76901
+ break;
76902
+ }
76903
+ default:
76904
+ throw new Error(`invalid increment argument: ${release}`);
76905
+ }
76906
+ this.raw = this.format();
76907
+ if (this.build.length) {
76908
+ this.raw += `+${this.build.join(".")}`;
76909
+ }
76910
+ return this;
76911
+ }
76912
+ };
76913
+ module.exports = SemVer;
76914
+ }
76915
+ });
76916
+
76917
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
76918
+ var require_parse = __commonJS({
76919
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports$1, module) {
76920
+ init_esm_shims();
76921
+ var SemVer = require_semver();
76922
+ var parse6 = (version12, options, throwErrors = false) => {
76923
+ if (version12 instanceof SemVer) {
76924
+ return version12;
76925
+ }
76926
+ try {
76927
+ return new SemVer(version12, options);
76928
+ } catch (er) {
76929
+ if (!throwErrors) {
76930
+ return null;
76931
+ }
76932
+ throw er;
76933
+ }
76934
+ };
76935
+ module.exports = parse6;
76936
+ }
76937
+ });
76938
+
76939
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
76940
+ var require_valid = __commonJS({
76941
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports$1, module) {
76942
+ init_esm_shims();
76943
+ var parse6 = require_parse();
76944
+ var valid = (version12, options) => {
76945
+ const v = parse6(version12, options);
76946
+ return v ? v.version : null;
76947
+ };
76948
+ module.exports = valid;
76949
+ }
76950
+ });
76951
+
76952
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
76953
+ var require_clean = __commonJS({
76954
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports$1, module) {
76955
+ init_esm_shims();
76956
+ var parse6 = require_parse();
76957
+ var clean2 = (version12, options) => {
76958
+ const s = parse6(version12.trim().replace(/^[=v]+/, ""), options);
76959
+ return s ? s.version : null;
76960
+ };
76961
+ module.exports = clean2;
76962
+ }
76963
+ });
76964
+
76965
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
76966
+ var require_inc = __commonJS({
76967
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports$1, module) {
76968
+ init_esm_shims();
76969
+ var SemVer = require_semver();
76970
+ var inc = (version12, release, options, identifier, identifierBase) => {
76971
+ if (typeof options === "string") {
76972
+ identifierBase = identifier;
76973
+ identifier = options;
76974
+ options = void 0;
76975
+ }
76976
+ try {
76977
+ return new SemVer(
76978
+ version12 instanceof SemVer ? version12.version : version12,
76979
+ options
76980
+ ).inc(release, identifier, identifierBase).version;
76981
+ } catch (er) {
76982
+ return null;
76983
+ }
76984
+ };
76985
+ module.exports = inc;
76986
+ }
76987
+ });
76988
+
76989
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
76990
+ var require_diff = __commonJS({
76991
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports$1, module) {
76992
+ init_esm_shims();
76993
+ var parse6 = require_parse();
76994
+ var diff = (version1, version22) => {
76995
+ const v1 = parse6(version1, null, true);
76996
+ const v2 = parse6(version22, null, true);
76997
+ const comparison = v1.compare(v2);
76998
+ if (comparison === 0) {
76999
+ return null;
77000
+ }
77001
+ const v1Higher = comparison > 0;
77002
+ const highVersion = v1Higher ? v1 : v2;
77003
+ const lowVersion = v1Higher ? v2 : v1;
77004
+ const highHasPre = !!highVersion.prerelease.length;
77005
+ const lowHasPre = !!lowVersion.prerelease.length;
77006
+ if (lowHasPre && !highHasPre) {
77007
+ if (!lowVersion.patch && !lowVersion.minor) {
77008
+ return "major";
77009
+ }
77010
+ if (lowVersion.compareMain(highVersion) === 0) {
77011
+ if (lowVersion.minor && !lowVersion.patch) {
77012
+ return "minor";
77013
+ }
77014
+ return "patch";
77015
+ }
77016
+ }
77017
+ const prefix = highHasPre ? "pre" : "";
77018
+ if (v1.major !== v2.major) {
77019
+ return prefix + "major";
77020
+ }
77021
+ if (v1.minor !== v2.minor) {
77022
+ return prefix + "minor";
77023
+ }
77024
+ if (v1.patch !== v2.patch) {
77025
+ return prefix + "patch";
77026
+ }
77027
+ return "prerelease";
77028
+ };
77029
+ module.exports = diff;
77030
+ }
77031
+ });
77032
+
77033
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
77034
+ var require_major = __commonJS({
77035
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports$1, module) {
77036
+ init_esm_shims();
77037
+ var SemVer = require_semver();
77038
+ var major = (a, loose) => new SemVer(a, loose).major;
77039
+ module.exports = major;
77040
+ }
77041
+ });
77042
+
77043
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
77044
+ var require_minor = __commonJS({
77045
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports$1, module) {
77046
+ init_esm_shims();
77047
+ var SemVer = require_semver();
77048
+ var minor = (a, loose) => new SemVer(a, loose).minor;
77049
+ module.exports = minor;
77050
+ }
77051
+ });
77052
+
77053
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
77054
+ var require_patch = __commonJS({
77055
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports$1, module) {
77056
+ init_esm_shims();
77057
+ var SemVer = require_semver();
77058
+ var patch = (a, loose) => new SemVer(a, loose).patch;
77059
+ module.exports = patch;
77060
+ }
77061
+ });
77062
+
77063
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
77064
+ var require_prerelease = __commonJS({
77065
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports$1, module) {
77066
+ init_esm_shims();
77067
+ var parse6 = require_parse();
77068
+ var prerelease = (version12, options) => {
77069
+ const parsed = parse6(version12, options);
77070
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
77071
+ };
77072
+ module.exports = prerelease;
77073
+ }
77074
+ });
77075
+
77076
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
77077
+ var require_compare = __commonJS({
77078
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports$1, module) {
77079
+ init_esm_shims();
77080
+ var SemVer = require_semver();
77081
+ var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
77082
+ module.exports = compare;
77083
+ }
77084
+ });
77085
+
77086
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
77087
+ var require_rcompare = __commonJS({
77088
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports$1, module) {
77089
+ init_esm_shims();
77090
+ var compare = require_compare();
77091
+ var rcompare = (a, b3, loose) => compare(b3, a, loose);
77092
+ module.exports = rcompare;
77093
+ }
77094
+ });
77095
+
77096
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
77097
+ var require_compare_loose = __commonJS({
77098
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports$1, module) {
77099
+ init_esm_shims();
77100
+ var compare = require_compare();
77101
+ var compareLoose = (a, b3) => compare(a, b3, true);
77102
+ module.exports = compareLoose;
77103
+ }
77104
+ });
77105
+
77106
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
77107
+ var require_compare_build = __commonJS({
77108
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports$1, module) {
77109
+ init_esm_shims();
77110
+ var SemVer = require_semver();
77111
+ var compareBuild = (a, b3, loose) => {
77112
+ const versionA = new SemVer(a, loose);
77113
+ const versionB = new SemVer(b3, loose);
77114
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
77115
+ };
77116
+ module.exports = compareBuild;
77117
+ }
77118
+ });
77119
+
77120
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
77121
+ var require_sort = __commonJS({
77122
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports$1, module) {
77123
+ init_esm_shims();
77124
+ var compareBuild = require_compare_build();
77125
+ var sort = (list2, loose) => list2.sort((a, b3) => compareBuild(a, b3, loose));
77126
+ module.exports = sort;
77127
+ }
77128
+ });
77129
+
77130
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
77131
+ var require_rsort = __commonJS({
77132
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports$1, module) {
77133
+ init_esm_shims();
77134
+ var compareBuild = require_compare_build();
77135
+ var rsort = (list2, loose) => list2.sort((a, b3) => compareBuild(b3, a, loose));
77136
+ module.exports = rsort;
77137
+ }
77138
+ });
77139
+
77140
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
77141
+ var require_gt = __commonJS({
77142
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports$1, module) {
77143
+ init_esm_shims();
77144
+ var compare = require_compare();
77145
+ var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
77146
+ module.exports = gt;
77147
+ }
77148
+ });
77149
+
77150
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
77151
+ var require_lt = __commonJS({
77152
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports$1, module) {
77153
+ init_esm_shims();
77154
+ var compare = require_compare();
77155
+ var lt2 = (a, b3, loose) => compare(a, b3, loose) < 0;
77156
+ module.exports = lt2;
77157
+ }
77158
+ });
77159
+
77160
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
77161
+ var require_eq = __commonJS({
77162
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports$1, module) {
77163
+ init_esm_shims();
77164
+ var compare = require_compare();
77165
+ var eq = (a, b3, loose) => compare(a, b3, loose) === 0;
77166
+ module.exports = eq;
77167
+ }
77168
+ });
77169
+
77170
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
77171
+ var require_neq = __commonJS({
77172
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports$1, module) {
77173
+ init_esm_shims();
77174
+ var compare = require_compare();
77175
+ var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
77176
+ module.exports = neq;
77177
+ }
77178
+ });
77179
+
77180
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
77181
+ var require_gte = __commonJS({
77182
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports$1, module) {
77183
+ init_esm_shims();
77184
+ var compare = require_compare();
77185
+ var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
77186
+ module.exports = gte;
77187
+ }
77188
+ });
77189
+
77190
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
77191
+ var require_lte = __commonJS({
77192
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports$1, module) {
77193
+ init_esm_shims();
77194
+ var compare = require_compare();
77195
+ var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
77196
+ module.exports = lte;
77197
+ }
77198
+ });
77199
+
77200
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
77201
+ var require_cmp = __commonJS({
77202
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports$1, module) {
77203
+ init_esm_shims();
77204
+ var eq = require_eq();
77205
+ var neq = require_neq();
77206
+ var gt = require_gt();
77207
+ var gte = require_gte();
77208
+ var lt2 = require_lt();
77209
+ var lte = require_lte();
77210
+ var cmp = (a, op, b3, loose) => {
77211
+ switch (op) {
77212
+ case "===":
77213
+ if (typeof a === "object") {
77214
+ a = a.version;
77215
+ }
77216
+ if (typeof b3 === "object") {
77217
+ b3 = b3.version;
77218
+ }
77219
+ return a === b3;
77220
+ case "!==":
77221
+ if (typeof a === "object") {
77222
+ a = a.version;
77223
+ }
77224
+ if (typeof b3 === "object") {
77225
+ b3 = b3.version;
77226
+ }
77227
+ return a !== b3;
77228
+ case "":
77229
+ case "=":
77230
+ case "==":
77231
+ return eq(a, b3, loose);
77232
+ case "!=":
77233
+ return neq(a, b3, loose);
77234
+ case ">":
77235
+ return gt(a, b3, loose);
77236
+ case ">=":
77237
+ return gte(a, b3, loose);
77238
+ case "<":
77239
+ return lt2(a, b3, loose);
77240
+ case "<=":
77241
+ return lte(a, b3, loose);
77242
+ default:
77243
+ throw new TypeError(`Invalid operator: ${op}`);
77244
+ }
77245
+ };
77246
+ module.exports = cmp;
77247
+ }
77248
+ });
77249
+
77250
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
77251
+ var require_coerce = __commonJS({
77252
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports$1, module) {
77253
+ init_esm_shims();
77254
+ var SemVer = require_semver();
77255
+ var parse6 = require_parse();
77256
+ var { safeRe: re, t } = require_re();
77257
+ var coerce2 = (version12, options) => {
77258
+ if (version12 instanceof SemVer) {
77259
+ return version12;
77260
+ }
77261
+ if (typeof version12 === "number") {
77262
+ version12 = String(version12);
77263
+ }
77264
+ if (typeof version12 !== "string") {
77265
+ return null;
77266
+ }
77267
+ options = options || {};
77268
+ let match = null;
77269
+ if (!options.rtl) {
77270
+ match = version12.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
77271
+ } else {
77272
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
77273
+ let next;
77274
+ while ((next = coerceRtlRegex.exec(version12)) && (!match || match.index + match[0].length !== version12.length)) {
77275
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
77276
+ match = next;
77277
+ }
77278
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
77279
+ }
77280
+ coerceRtlRegex.lastIndex = -1;
77281
+ }
77282
+ if (match === null) {
77283
+ return null;
77284
+ }
77285
+ const major = match[2];
77286
+ const minor = match[3] || "0";
77287
+ const patch = match[4] || "0";
77288
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
77289
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
77290
+ return parse6(`${major}.${minor}.${patch}${prerelease}${build}`, options);
77291
+ };
77292
+ module.exports = coerce2;
77293
+ }
77294
+ });
77295
+
77296
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
77297
+ var require_truncate = __commonJS({
77298
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports$1, module) {
77299
+ init_esm_shims();
77300
+ var parse6 = require_parse();
77301
+ var constants = require_constants3();
77302
+ var SemVer = require_semver();
77303
+ var truncate = (version12, truncation, options) => {
77304
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
77305
+ return null;
77306
+ }
77307
+ const clonedVersion = cloneInputVersion(version12, options);
77308
+ return clonedVersion && doTruncation(clonedVersion, truncation);
77309
+ };
77310
+ var cloneInputVersion = (version12, options) => {
77311
+ const versionStringToParse = version12 instanceof SemVer ? version12.version : version12;
77312
+ return parse6(versionStringToParse, options);
77313
+ };
77314
+ var doTruncation = (version12, truncation) => {
77315
+ if (isPrerelease(truncation)) {
77316
+ return version12.version;
77317
+ }
77318
+ version12.prerelease = [];
77319
+ switch (truncation) {
77320
+ case "major":
77321
+ version12.minor = 0;
77322
+ version12.patch = 0;
77323
+ break;
77324
+ case "minor":
77325
+ version12.patch = 0;
77326
+ break;
77327
+ }
77328
+ return version12.format();
77329
+ };
77330
+ var isPrerelease = (type2) => {
77331
+ return type2.startsWith("pre");
77332
+ };
77333
+ module.exports = truncate;
77334
+ }
77335
+ });
77336
+
77337
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
77338
+ var require_lrucache = __commonJS({
77339
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports$1, module) {
77340
+ init_esm_shims();
77341
+ var LRUCache = class {
77342
+ constructor() {
77343
+ this.max = 1e3;
77344
+ this.map = /* @__PURE__ */ new Map();
77345
+ }
77346
+ get(key) {
77347
+ const value = this.map.get(key);
77348
+ if (value === void 0) {
77349
+ return void 0;
77350
+ } else {
77351
+ this.map.delete(key);
77352
+ this.map.set(key, value);
77353
+ return value;
77354
+ }
77355
+ }
77356
+ delete(key) {
77357
+ return this.map.delete(key);
77358
+ }
77359
+ set(key, value) {
77360
+ const deleted = this.delete(key);
77361
+ if (!deleted && value !== void 0) {
77362
+ if (this.map.size >= this.max) {
77363
+ const firstKey = this.map.keys().next().value;
77364
+ this.delete(firstKey);
77365
+ }
77366
+ this.map.set(key, value);
77367
+ }
77368
+ return this;
77369
+ }
77370
+ };
77371
+ module.exports = LRUCache;
77372
+ }
77373
+ });
77374
+
77375
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
77376
+ var require_range2 = __commonJS({
77377
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports$1, module) {
77378
+ init_esm_shims();
77379
+ var SPACE_CHARACTERS = /\s+/g;
77380
+ var Range = class _Range {
77381
+ constructor(range, options) {
77382
+ options = parseOptions(options);
77383
+ if (range instanceof _Range) {
77384
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
77385
+ return range;
77386
+ } else {
77387
+ return new _Range(range.raw, options);
77388
+ }
77389
+ }
77390
+ if (range instanceof Comparator) {
77391
+ this.raw = range.value;
77392
+ this.set = [[range]];
77393
+ this.formatted = void 0;
77394
+ return this;
77395
+ }
77396
+ this.options = options;
77397
+ this.loose = !!options.loose;
77398
+ this.includePrerelease = !!options.includePrerelease;
77399
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
77400
+ this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c) => c.length);
77401
+ if (!this.set.length) {
77402
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
77403
+ }
77404
+ if (this.set.length > 1) {
77405
+ const first = this.set[0];
77406
+ this.set = this.set.filter((c) => !isNullSet(c[0]));
77407
+ if (this.set.length === 0) {
77408
+ this.set = [first];
77409
+ } else if (this.set.length > 1) {
77410
+ for (const c of this.set) {
77411
+ if (c.length === 1 && isAny(c[0])) {
77412
+ this.set = [c];
77413
+ break;
77414
+ }
77415
+ }
77416
+ }
77417
+ }
77418
+ this.formatted = void 0;
77419
+ }
77420
+ get range() {
77421
+ if (this.formatted === void 0) {
77422
+ this.formatted = "";
77423
+ for (let i = 0; i < this.set.length; i++) {
77424
+ if (i > 0) {
77425
+ this.formatted += "||";
77426
+ }
77427
+ const comps = this.set[i];
77428
+ for (let k3 = 0; k3 < comps.length; k3++) {
77429
+ if (k3 > 0) {
77430
+ this.formatted += " ";
77431
+ }
77432
+ this.formatted += comps[k3].toString().trim();
77433
+ }
77434
+ }
77435
+ }
77436
+ return this.formatted;
77437
+ }
77438
+ format() {
77439
+ return this.range;
77440
+ }
77441
+ toString() {
77442
+ return this.range;
77443
+ }
77444
+ parseRange(range) {
77445
+ range = range.replace(BUILDSTRIPRE, "");
77446
+ const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
77447
+ const memoKey = memoOpts + ":" + range;
77448
+ const cached2 = cache.get(memoKey);
77449
+ if (cached2) {
77450
+ return cached2;
77451
+ }
77452
+ const loose = this.options.loose;
77453
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
77454
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
77455
+ debug("hyphen replace", range);
77456
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
77457
+ debug("comparator trim", range);
77458
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
77459
+ debug("tilde trim", range);
77460
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace);
77461
+ debug("caret trim", range);
77462
+ let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
77463
+ if (loose) {
77464
+ rangeList = rangeList.filter((comp) => {
77465
+ debug("loose invalid filter", comp, this.options);
77466
+ return !!comp.match(re[t.COMPARATORLOOSE]);
77467
+ });
77468
+ }
77469
+ debug("range list", rangeList);
77470
+ const rangeMap = /* @__PURE__ */ new Map();
77471
+ const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
77472
+ for (const comp of comparators) {
77473
+ if (isNullSet(comp)) {
77474
+ return [comp];
77475
+ }
77476
+ rangeMap.set(comp.value, comp);
77477
+ }
77478
+ if (rangeMap.size > 1 && rangeMap.has("")) {
77479
+ rangeMap.delete("");
77480
+ }
77481
+ const result = [...rangeMap.values()];
77482
+ cache.set(memoKey, result);
77483
+ return result;
77484
+ }
77485
+ intersects(range, options) {
77486
+ if (!(range instanceof _Range)) {
77487
+ throw new TypeError("a Range is required");
77488
+ }
77489
+ return this.set.some((thisComparators) => {
77490
+ return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
77491
+ return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
77492
+ return rangeComparators.every((rangeComparator) => {
77493
+ return thisComparator.intersects(rangeComparator, options);
77494
+ });
77495
+ });
77496
+ });
77497
+ });
77498
+ }
77499
+ // if ANY of the sets match ALL of its comparators, then pass
77500
+ test(version12) {
77501
+ if (!version12) {
77502
+ return false;
77503
+ }
77504
+ if (typeof version12 === "string") {
77505
+ try {
77506
+ version12 = new SemVer(version12, this.options);
77507
+ } catch (er) {
77508
+ return false;
77509
+ }
77510
+ }
77511
+ for (let i = 0; i < this.set.length; i++) {
77512
+ if (testSet(this.set[i], version12, this.options)) {
77513
+ return true;
77514
+ }
77515
+ }
77516
+ return false;
77517
+ }
77518
+ };
77519
+ module.exports = Range;
77520
+ var LRU = require_lrucache();
77521
+ var cache = new LRU();
77522
+ var parseOptions = require_parse_options();
77523
+ var Comparator = require_comparator();
77524
+ var debug = require_debug2();
77525
+ var SemVer = require_semver();
77526
+ var {
77527
+ safeRe: re,
77528
+ src,
77529
+ t,
77530
+ comparatorTrimReplace,
77531
+ tildeTrimReplace,
77532
+ caretTrimReplace
77533
+ } = require_re();
77534
+ var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
77535
+ var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g");
77536
+ var isNullSet = (c) => c.value === "<0.0.0-0";
77537
+ var isAny = (c) => c.value === "";
77538
+ var isSatisfiable = (comparators, options) => {
77539
+ let result = true;
77540
+ const remainingComparators = comparators.slice();
77541
+ let testComparator = remainingComparators.pop();
77542
+ while (result && remainingComparators.length) {
77543
+ result = remainingComparators.every((otherComparator) => {
77544
+ return testComparator.intersects(otherComparator, options);
77545
+ });
77546
+ testComparator = remainingComparators.pop();
77547
+ }
77548
+ return result;
77549
+ };
77550
+ var parseComparator = (comp, options) => {
77551
+ comp = comp.replace(re[t.BUILD], "");
77552
+ debug("comp", comp, options);
77553
+ comp = replaceCarets(comp, options);
77554
+ debug("caret", comp);
77555
+ comp = replaceTildes(comp, options);
77556
+ debug("tildes", comp);
77557
+ comp = replaceXRanges(comp, options);
77558
+ debug("xrange", comp);
77559
+ comp = replaceStars(comp, options);
77560
+ debug("stars", comp);
77561
+ return comp;
77562
+ };
77563
+ var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
77564
+ var invalidXRangeOrder = (M2, m2, p2) => isX(M2) && !isX(m2) || isX(m2) && p2 && !isX(p2);
77565
+ var replaceTildes = (comp, options) => {
77566
+ return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
77567
+ };
77568
+ var replaceTilde = (comp, options) => {
77569
+ const r2 = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
77570
+ const z3 = options.includePrerelease ? "-0" : "";
77571
+ return comp.replace(r2, (_3, M2, m2, p2, pr) => {
77572
+ debug("tilde", comp, _3, M2, m2, p2, pr);
77573
+ let ret;
77574
+ if (isX(M2)) {
77575
+ ret = "";
77576
+ } else if (isX(m2)) {
77577
+ ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
77578
+ } else if (isX(p2)) {
77579
+ ret = `>=${M2}.${m2}.0${z3} <${M2}.${+m2 + 1}.0-0`;
77580
+ } else if (pr) {
77581
+ debug("replaceTilde pr", pr);
77582
+ ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`;
77583
+ } else {
77584
+ ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`;
77585
+ }
77586
+ debug("tilde return", ret);
77587
+ return ret;
77588
+ });
77589
+ };
77590
+ var replaceCarets = (comp, options) => {
77591
+ return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
77592
+ };
77593
+ var replaceCaret = (comp, options) => {
77594
+ debug("caret", comp, options);
77595
+ const r2 = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
77596
+ const z3 = options.includePrerelease ? "-0" : "";
77597
+ return comp.replace(r2, (_3, M2, m2, p2, pr) => {
77598
+ debug("caret", comp, _3, M2, m2, p2, pr);
77599
+ let ret;
77600
+ if (isX(M2)) {
77601
+ ret = "";
77602
+ } else if (isX(m2)) {
77603
+ ret = `>=${M2}.0.0${z3} <${+M2 + 1}.0.0-0`;
77604
+ } else if (isX(p2)) {
77605
+ if (M2 === "0") {
77606
+ ret = `>=${M2}.${m2}.0${z3} <${M2}.${+m2 + 1}.0-0`;
77607
+ } else {
77608
+ ret = `>=${M2}.${m2}.0${z3} <${+M2 + 1}.0.0-0`;
77609
+ }
77610
+ } else if (pr) {
77611
+ debug("replaceCaret pr", pr);
77612
+ if (M2 === "0") {
77613
+ if (m2 === "0") {
77614
+ ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${m2}.${+p2 + 1}-0`;
77615
+ } else {
77616
+ ret = `>=${M2}.${m2}.${p2}-${pr} <${M2}.${+m2 + 1}.0-0`;
77617
+ }
77618
+ } else {
77619
+ ret = `>=${M2}.${m2}.${p2}-${pr} <${+M2 + 1}.0.0-0`;
77620
+ }
77621
+ } else {
77622
+ debug("no pr");
77623
+ if (M2 === "0") {
77624
+ if (m2 === "0") {
77625
+ ret = `>=${M2}.${m2}.${p2} <${M2}.${m2}.${+p2 + 1}-0`;
77626
+ } else {
77627
+ ret = `>=${M2}.${m2}.${p2} <${M2}.${+m2 + 1}.0-0`;
77628
+ }
77629
+ } else {
77630
+ ret = `>=${M2}.${m2}.${p2} <${+M2 + 1}.0.0-0`;
77631
+ }
77632
+ }
77633
+ debug("caret return", ret);
77634
+ return ret;
77635
+ });
77636
+ };
77637
+ var replaceXRanges = (comp, options) => {
77638
+ debug("replaceXRanges", comp, options);
77639
+ return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
77640
+ };
77641
+ var replaceXRange = (comp, options) => {
77642
+ comp = comp.trim();
77643
+ const r2 = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
77644
+ return comp.replace(r2, (ret, gtlt, M2, m2, p2, pr) => {
77645
+ debug("xRange", comp, ret, gtlt, M2, m2, p2, pr);
77646
+ if (invalidXRangeOrder(M2, m2, p2)) {
77647
+ return comp;
77648
+ }
77649
+ const xM = isX(M2);
77650
+ const xm = xM || isX(m2);
77651
+ const xp = xm || isX(p2);
77652
+ const anyX = xp;
77653
+ if (gtlt === "=" && anyX) {
77654
+ gtlt = "";
77655
+ }
77656
+ pr = options.includePrerelease ? "-0" : "";
77657
+ if (xM) {
77658
+ if (gtlt === ">" || gtlt === "<") {
77659
+ ret = "<0.0.0-0";
77660
+ } else {
77661
+ ret = "*";
77662
+ }
77663
+ } else if (gtlt && anyX) {
77664
+ if (xm) {
77665
+ m2 = 0;
77666
+ }
77667
+ p2 = 0;
77668
+ if (gtlt === ">") {
77669
+ gtlt = ">=";
77670
+ if (xm) {
77671
+ M2 = +M2 + 1;
77672
+ m2 = 0;
77673
+ p2 = 0;
77674
+ } else {
77675
+ m2 = +m2 + 1;
77676
+ p2 = 0;
77677
+ }
77678
+ } else if (gtlt === "<=") {
77679
+ gtlt = "<";
77680
+ if (xm) {
77681
+ M2 = +M2 + 1;
77682
+ } else {
77683
+ m2 = +m2 + 1;
77684
+ }
77685
+ }
77686
+ if (gtlt === "<") {
77687
+ pr = "-0";
77688
+ }
77689
+ ret = `${gtlt + M2}.${m2}.${p2}${pr}`;
77690
+ } else if (xm) {
77691
+ ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`;
77692
+ } else if (xp) {
77693
+ ret = `>=${M2}.${m2}.0${pr} <${M2}.${+m2 + 1}.0-0`;
77694
+ }
77695
+ debug("xRange return", ret);
77696
+ return ret;
77697
+ });
77698
+ };
77699
+ var replaceStars = (comp, options) => {
77700
+ debug("replaceStars", comp, options);
77701
+ return comp.trim().replace(re[t.STAR], "");
77702
+ };
77703
+ var replaceGTE0 = (comp, options) => {
77704
+ debug("replaceGTE0", comp, options);
77705
+ return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
77706
+ };
77707
+ var hyphenReplace = (incPr) => ($0, from50, fM, fm, fp, fpr, fb, to2, tM, tm, tp, tpr) => {
77708
+ if (isX(fM)) {
77709
+ from50 = "";
77710
+ } else if (isX(fm)) {
77711
+ from50 = `>=${fM}.0.0${incPr ? "-0" : ""}`;
77712
+ } else if (isX(fp)) {
77713
+ from50 = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
77714
+ } else if (fpr) {
77715
+ from50 = `>=${from50}`;
77716
+ } else {
77717
+ from50 = `>=${from50}${incPr ? "-0" : ""}`;
77718
+ }
77719
+ if (isX(tM)) {
77720
+ to2 = "";
77721
+ } else if (isX(tm)) {
77722
+ to2 = `<${+tM + 1}.0.0-0`;
77723
+ } else if (isX(tp)) {
77724
+ to2 = `<${tM}.${+tm + 1}.0-0`;
77725
+ } else if (tpr) {
77726
+ to2 = `<=${tM}.${tm}.${tp}-${tpr}`;
77727
+ } else if (incPr) {
77728
+ to2 = `<${tM}.${tm}.${+tp + 1}-0`;
77729
+ } else {
77730
+ to2 = `<=${to2}`;
77731
+ }
77732
+ return `${from50} ${to2}`.trim();
77733
+ };
77734
+ var testSet = (set4, version12, options) => {
77735
+ for (let i = 0; i < set4.length; i++) {
77736
+ if (!set4[i].test(version12)) {
77737
+ return false;
77738
+ }
77739
+ }
77740
+ if (version12.prerelease.length && !options.includePrerelease) {
77741
+ for (let i = 0; i < set4.length; i++) {
77742
+ debug(set4[i].semver);
77743
+ if (set4[i].semver === Comparator.ANY) {
77744
+ continue;
77745
+ }
77746
+ if (set4[i].semver.prerelease.length > 0) {
77747
+ const allowed = set4[i].semver;
77748
+ if (allowed.major === version12.major && allowed.minor === version12.minor && allowed.patch === version12.patch) {
77749
+ return true;
77750
+ }
77751
+ }
77752
+ }
77753
+ return false;
77754
+ }
77755
+ return true;
77756
+ };
77757
+ }
77758
+ });
77759
+
77760
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
77761
+ var require_comparator = __commonJS({
77762
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports$1, module) {
77763
+ init_esm_shims();
77764
+ var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
77765
+ var Comparator = class _Comparator {
77766
+ static get ANY() {
77767
+ return ANY;
77768
+ }
77769
+ constructor(comp, options) {
77770
+ options = parseOptions(options);
77771
+ if (comp instanceof _Comparator) {
77772
+ if (comp.loose === !!options.loose) {
77773
+ return comp;
77774
+ } else {
77775
+ comp = comp.value;
77776
+ }
77777
+ }
77778
+ comp = comp.trim().split(/\s+/).join(" ");
77779
+ debug("comparator", comp, options);
77780
+ this.options = options;
77781
+ this.loose = !!options.loose;
77782
+ this.parse(comp);
77783
+ if (this.semver === ANY) {
77784
+ this.value = "";
77785
+ } else {
77786
+ this.value = this.operator + this.semver.version;
77787
+ }
77788
+ debug("comp", this);
77789
+ }
77790
+ parse(comp) {
77791
+ const r2 = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
77792
+ const m2 = comp.match(r2);
77793
+ if (!m2) {
77794
+ throw new TypeError(`Invalid comparator: ${comp}`);
77795
+ }
77796
+ this.operator = m2[1] !== void 0 ? m2[1] : "";
77797
+ if (this.operator === "=") {
77798
+ this.operator = "";
77799
+ }
77800
+ if (!m2[2]) {
77801
+ this.semver = ANY;
77802
+ } else {
77803
+ this.semver = new SemVer(m2[2], this.options.loose);
77804
+ }
77805
+ }
77806
+ toString() {
77807
+ return this.value;
77808
+ }
77809
+ test(version12) {
77810
+ debug("Comparator.test", version12, this.options.loose);
77811
+ if (this.semver === ANY || version12 === ANY) {
77812
+ return true;
77813
+ }
77814
+ if (typeof version12 === "string") {
77815
+ try {
77816
+ version12 = new SemVer(version12, this.options);
77817
+ } catch (er) {
77818
+ return false;
77819
+ }
77820
+ }
77821
+ return cmp(version12, this.operator, this.semver, this.options);
77822
+ }
77823
+ intersects(comp, options) {
77824
+ if (!(comp instanceof _Comparator)) {
77825
+ throw new TypeError("a Comparator is required");
77826
+ }
77827
+ if (this.operator === "") {
77828
+ if (this.value === "") {
77829
+ return true;
77830
+ }
77831
+ return new Range(comp.value, options).test(this.value);
77832
+ } else if (comp.operator === "") {
77833
+ if (comp.value === "") {
77834
+ return true;
77835
+ }
77836
+ return new Range(this.value, options).test(comp.semver);
77837
+ }
77838
+ options = parseOptions(options);
77839
+ if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
77840
+ return false;
77841
+ }
77842
+ if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
77843
+ return false;
77844
+ }
77845
+ if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
77846
+ return true;
77847
+ }
77848
+ if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
77849
+ return true;
77850
+ }
77851
+ if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
77852
+ return true;
77853
+ }
77854
+ if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
77855
+ return true;
77856
+ }
77857
+ if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
77858
+ return true;
77859
+ }
77860
+ return false;
77861
+ }
77862
+ };
77863
+ module.exports = Comparator;
77864
+ var parseOptions = require_parse_options();
77865
+ var { safeRe: re, t } = require_re();
77866
+ var cmp = require_cmp();
77867
+ var debug = require_debug2();
77868
+ var SemVer = require_semver();
77869
+ var Range = require_range2();
77870
+ }
77871
+ });
77872
+
77873
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
77874
+ var require_satisfies = __commonJS({
77875
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports$1, module) {
77876
+ init_esm_shims();
77877
+ var Range = require_range2();
77878
+ var satisfies = (version12, range, options) => {
77879
+ try {
77880
+ range = new Range(range, options);
77881
+ } catch (er) {
77882
+ return false;
77883
+ }
77884
+ return range.test(version12);
77885
+ };
77886
+ module.exports = satisfies;
77887
+ }
77888
+ });
77889
+
77890
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
77891
+ var require_to_comparators = __commonJS({
77892
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports$1, module) {
77893
+ init_esm_shims();
77894
+ var Range = require_range2();
77895
+ var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
77896
+ module.exports = toComparators;
77897
+ }
77898
+ });
77899
+
77900
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
77901
+ var require_max_satisfying = __commonJS({
77902
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports$1, module) {
77903
+ init_esm_shims();
77904
+ var SemVer = require_semver();
77905
+ var Range = require_range2();
77906
+ var maxSatisfying = (versions, range, options) => {
77907
+ let max = null;
77908
+ let maxSV = null;
77909
+ let rangeObj = null;
77910
+ try {
77911
+ rangeObj = new Range(range, options);
77912
+ } catch (er) {
77913
+ return null;
77914
+ }
77915
+ versions.forEach((v) => {
77916
+ if (rangeObj.test(v)) {
77917
+ if (!max || maxSV.compare(v) === -1) {
77918
+ max = v;
77919
+ maxSV = new SemVer(max, options);
77920
+ }
77921
+ }
77922
+ });
77923
+ return max;
77924
+ };
77925
+ module.exports = maxSatisfying;
77926
+ }
77927
+ });
77928
+
77929
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
77930
+ var require_min_satisfying = __commonJS({
77931
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports$1, module) {
77932
+ init_esm_shims();
77933
+ var SemVer = require_semver();
77934
+ var Range = require_range2();
77935
+ var minSatisfying = (versions, range, options) => {
77936
+ let min = null;
77937
+ let minSV = null;
77938
+ let rangeObj = null;
77939
+ try {
77940
+ rangeObj = new Range(range, options);
77941
+ } catch (er) {
77942
+ return null;
77943
+ }
77944
+ versions.forEach((v) => {
77945
+ if (rangeObj.test(v)) {
77946
+ if (!min || minSV.compare(v) === 1) {
77947
+ min = v;
77948
+ minSV = new SemVer(min, options);
77949
+ }
77950
+ }
77951
+ });
77952
+ return min;
77953
+ };
77954
+ module.exports = minSatisfying;
77955
+ }
77956
+ });
77957
+
77958
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
77959
+ var require_min_version = __commonJS({
77960
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports$1, module) {
77961
+ init_esm_shims();
77962
+ var SemVer = require_semver();
77963
+ var Range = require_range2();
77964
+ var gt = require_gt();
77965
+ var minVersion = (range, loose) => {
77966
+ range = new Range(range, loose);
77967
+ let minver = new SemVer("0.0.0");
77968
+ if (range.test(minver)) {
77969
+ return minver;
77970
+ }
77971
+ minver = new SemVer("0.0.0-0");
77972
+ if (range.test(minver)) {
77973
+ return minver;
77974
+ }
77975
+ minver = null;
77976
+ for (let i = 0; i < range.set.length; ++i) {
77977
+ const comparators = range.set[i];
77978
+ let setMin = null;
77979
+ comparators.forEach((comparator) => {
77980
+ const compver = new SemVer(comparator.semver.version);
77981
+ switch (comparator.operator) {
77982
+ case ">":
77983
+ if (compver.prerelease.length === 0) {
77984
+ compver.patch++;
77985
+ } else {
77986
+ compver.prerelease.push(0);
77987
+ }
77988
+ compver.raw = compver.format();
77989
+ /* fallthrough */
77990
+ case "":
77991
+ case ">=":
77992
+ if (!setMin || gt(compver, setMin)) {
77993
+ setMin = compver;
77994
+ }
77995
+ break;
77996
+ case "<":
77997
+ case "<=":
77998
+ break;
77999
+ /* istanbul ignore next */
78000
+ default:
78001
+ throw new Error(`Unexpected operation: ${comparator.operator}`);
78002
+ }
78003
+ });
78004
+ if (setMin && (!minver || gt(minver, setMin))) {
78005
+ minver = setMin;
78006
+ }
78007
+ }
78008
+ if (minver && range.test(minver)) {
78009
+ return minver;
78010
+ }
78011
+ return null;
78012
+ };
78013
+ module.exports = minVersion;
78014
+ }
78015
+ });
78016
+
78017
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
78018
+ var require_valid2 = __commonJS({
78019
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports$1, module) {
78020
+ init_esm_shims();
78021
+ var Range = require_range2();
78022
+ var validRange = (range, options) => {
78023
+ try {
78024
+ return new Range(range, options).range || "*";
78025
+ } catch (er) {
78026
+ return null;
78027
+ }
78028
+ };
78029
+ module.exports = validRange;
78030
+ }
78031
+ });
78032
+
78033
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
78034
+ var require_outside = __commonJS({
78035
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports$1, module) {
78036
+ init_esm_shims();
78037
+ var SemVer = require_semver();
78038
+ var Comparator = require_comparator();
78039
+ var { ANY } = Comparator;
78040
+ var Range = require_range2();
78041
+ var satisfies = require_satisfies();
78042
+ var gt = require_gt();
78043
+ var lt2 = require_lt();
78044
+ var lte = require_lte();
78045
+ var gte = require_gte();
78046
+ var outside = (version12, range, hilo, options) => {
78047
+ version12 = new SemVer(version12, options);
78048
+ range = new Range(range, options);
78049
+ let gtfn, ltefn, ltfn, comp, ecomp;
78050
+ switch (hilo) {
78051
+ case ">":
78052
+ gtfn = gt;
78053
+ ltefn = lte;
78054
+ ltfn = lt2;
78055
+ comp = ">";
78056
+ ecomp = ">=";
78057
+ break;
78058
+ case "<":
78059
+ gtfn = lt2;
78060
+ ltefn = gte;
78061
+ ltfn = gt;
78062
+ comp = "<";
78063
+ ecomp = "<=";
78064
+ break;
78065
+ default:
78066
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
78067
+ }
78068
+ if (satisfies(version12, range, options)) {
78069
+ return false;
78070
+ }
78071
+ for (let i = 0; i < range.set.length; ++i) {
78072
+ const comparators = range.set[i];
78073
+ let high = null;
78074
+ let low = null;
78075
+ comparators.forEach((comparator) => {
78076
+ if (comparator.semver === ANY) {
78077
+ comparator = new Comparator(">=0.0.0");
78078
+ }
78079
+ high = high || comparator;
78080
+ low = low || comparator;
78081
+ if (gtfn(comparator.semver, high.semver, options)) {
78082
+ high = comparator;
78083
+ } else if (ltfn(comparator.semver, low.semver, options)) {
78084
+ low = comparator;
78085
+ }
78086
+ });
78087
+ if (high.operator === comp || high.operator === ecomp) {
78088
+ return false;
78089
+ }
78090
+ if ((!low.operator || low.operator === comp) && ltefn(version12, low.semver)) {
78091
+ return false;
78092
+ } else if (low.operator === ecomp && ltfn(version12, low.semver)) {
78093
+ return false;
78094
+ }
78095
+ }
78096
+ return true;
78097
+ };
78098
+ module.exports = outside;
78099
+ }
78100
+ });
78101
+
78102
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
78103
+ var require_gtr = __commonJS({
78104
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports$1, module) {
78105
+ init_esm_shims();
78106
+ var outside = require_outside();
78107
+ var gtr = (version12, range, options) => outside(version12, range, ">", options);
78108
+ module.exports = gtr;
78109
+ }
78110
+ });
78111
+
78112
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
78113
+ var require_ltr = __commonJS({
78114
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports$1, module) {
78115
+ init_esm_shims();
78116
+ var outside = require_outside();
78117
+ var ltr = (version12, range, options) => outside(version12, range, "<", options);
78118
+ module.exports = ltr;
78119
+ }
78120
+ });
78121
+
78122
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
78123
+ var require_intersects = __commonJS({
78124
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports$1, module) {
78125
+ init_esm_shims();
78126
+ var Range = require_range2();
78127
+ var intersects = (r1, r2, options) => {
78128
+ r1 = new Range(r1, options);
78129
+ r2 = new Range(r2, options);
78130
+ return r1.intersects(r2, options);
78131
+ };
78132
+ module.exports = intersects;
78133
+ }
78134
+ });
78135
+
78136
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
78137
+ var require_simplify = __commonJS({
78138
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports$1, module) {
78139
+ init_esm_shims();
78140
+ var satisfies = require_satisfies();
78141
+ var compare = require_compare();
78142
+ module.exports = (versions, range, options) => {
78143
+ const set4 = [];
78144
+ let first = null;
78145
+ let prev = null;
78146
+ const v = versions.sort((a, b3) => compare(a, b3, options));
78147
+ for (const version12 of v) {
78148
+ const included = satisfies(version12, range, options);
78149
+ if (included) {
78150
+ prev = version12;
78151
+ if (!first) {
78152
+ first = version12;
78153
+ }
78154
+ } else {
78155
+ if (prev) {
78156
+ set4.push([first, prev]);
78157
+ }
78158
+ prev = null;
78159
+ first = null;
78160
+ }
78161
+ }
78162
+ if (first) {
78163
+ set4.push([first, null]);
78164
+ }
78165
+ const ranges = [];
78166
+ for (const [min, max] of set4) {
78167
+ if (min === max) {
78168
+ ranges.push(min);
78169
+ } else if (!max && min === v[0]) {
78170
+ ranges.push("*");
78171
+ } else if (!max) {
78172
+ ranges.push(`>=${min}`);
78173
+ } else if (min === v[0]) {
78174
+ ranges.push(`<=${max}`);
78175
+ } else {
78176
+ ranges.push(`${min} - ${max}`);
78177
+ }
78178
+ }
78179
+ const simplified = ranges.join(" || ");
78180
+ const original = typeof range.raw === "string" ? range.raw : String(range);
78181
+ return simplified.length < original.length ? simplified : range;
78182
+ };
78183
+ }
78184
+ });
78185
+
78186
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
78187
+ var require_subset = __commonJS({
78188
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports$1, module) {
78189
+ init_esm_shims();
78190
+ var Range = require_range2();
78191
+ var Comparator = require_comparator();
78192
+ var { ANY } = Comparator;
78193
+ var satisfies = require_satisfies();
78194
+ var compare = require_compare();
78195
+ var subset = (sub, dom, options = {}) => {
78196
+ if (sub === dom) {
78197
+ return true;
78198
+ }
78199
+ sub = new Range(sub, options);
78200
+ dom = new Range(dom, options);
78201
+ let sawNonNull = false;
78202
+ OUTER: for (const simpleSub of sub.set) {
78203
+ for (const simpleDom of dom.set) {
78204
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
78205
+ sawNonNull = sawNonNull || isSub !== null;
78206
+ if (isSub) {
78207
+ continue OUTER;
78208
+ }
78209
+ }
78210
+ if (sawNonNull) {
78211
+ return false;
78212
+ }
78213
+ }
78214
+ return true;
78215
+ };
78216
+ var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
78217
+ var minimumVersion = [new Comparator(">=0.0.0")];
78218
+ var simpleSubset = (sub, dom, options) => {
78219
+ if (sub === dom) {
78220
+ return true;
78221
+ }
78222
+ if (sub.length === 1 && sub[0].semver === ANY) {
78223
+ if (dom.length === 1 && dom[0].semver === ANY) {
78224
+ return true;
78225
+ } else if (options.includePrerelease) {
78226
+ sub = minimumVersionWithPreRelease;
78227
+ } else {
78228
+ sub = minimumVersion;
78229
+ }
78230
+ }
78231
+ if (dom.length === 1 && dom[0].semver === ANY) {
78232
+ if (options.includePrerelease) {
78233
+ return true;
78234
+ } else {
78235
+ dom = minimumVersion;
78236
+ }
78237
+ }
78238
+ const eqSet = /* @__PURE__ */ new Set();
78239
+ let gt, lt2;
78240
+ for (const c of sub) {
78241
+ if (c.operator === ">" || c.operator === ">=") {
78242
+ gt = higherGT(gt, c, options);
78243
+ } else if (c.operator === "<" || c.operator === "<=") {
78244
+ lt2 = lowerLT(lt2, c, options);
78245
+ } else {
78246
+ eqSet.add(c.semver);
78247
+ }
78248
+ }
78249
+ if (eqSet.size > 1) {
78250
+ return null;
78251
+ }
78252
+ let gtltComp;
78253
+ if (gt && lt2) {
78254
+ gtltComp = compare(gt.semver, lt2.semver, options);
78255
+ if (gtltComp > 0) {
78256
+ return null;
78257
+ } else if (gtltComp === 0 && (gt.operator !== ">=" || lt2.operator !== "<=")) {
78258
+ return null;
78259
+ }
78260
+ }
78261
+ for (const eq of eqSet) {
78262
+ if (gt && !satisfies(eq, String(gt), options)) {
78263
+ return null;
78264
+ }
78265
+ if (lt2 && !satisfies(eq, String(lt2), options)) {
78266
+ return null;
78267
+ }
78268
+ for (const c of dom) {
78269
+ if (!satisfies(eq, String(c), options)) {
78270
+ return false;
78271
+ }
78272
+ }
78273
+ return true;
78274
+ }
78275
+ let higher, lower;
78276
+ let hasDomLT, hasDomGT;
78277
+ let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
78278
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
78279
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
78280
+ needDomLTPre = false;
78281
+ }
78282
+ for (const c of dom) {
78283
+ hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
78284
+ hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
78285
+ if (gt) {
78286
+ if (needDomGTPre) {
78287
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
78288
+ needDomGTPre = false;
78289
+ }
78290
+ }
78291
+ if (c.operator === ">" || c.operator === ">=") {
78292
+ higher = higherGT(gt, c, options);
78293
+ if (higher === c && higher !== gt) {
78294
+ return false;
78295
+ }
78296
+ } else if (gt.operator === ">=" && !c.test(gt.semver)) {
78297
+ return false;
78298
+ }
78299
+ }
78300
+ if (lt2) {
78301
+ if (needDomLTPre) {
78302
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
78303
+ needDomLTPre = false;
78304
+ }
78305
+ }
78306
+ if (c.operator === "<" || c.operator === "<=") {
78307
+ lower = lowerLT(lt2, c, options);
78308
+ if (lower === c && lower !== lt2) {
78309
+ return false;
78310
+ }
78311
+ } else if (lt2.operator === "<=" && !c.test(lt2.semver)) {
78312
+ return false;
78313
+ }
78314
+ }
78315
+ if (!c.operator && (lt2 || gt) && gtltComp !== 0) {
78316
+ return false;
78317
+ }
78318
+ }
78319
+ if (gt && hasDomLT && !lt2 && gtltComp !== 0) {
78320
+ return false;
78321
+ }
78322
+ if (lt2 && hasDomGT && !gt && gtltComp !== 0) {
78323
+ return false;
78324
+ }
78325
+ if (needDomGTPre || needDomLTPre) {
78326
+ return false;
78327
+ }
78328
+ return true;
78329
+ };
78330
+ var higherGT = (a, b3, options) => {
78331
+ if (!a) {
78332
+ return b3;
78333
+ }
78334
+ const comp = compare(a.semver, b3.semver, options);
78335
+ return comp > 0 ? a : comp < 0 ? b3 : b3.operator === ">" && a.operator === ">=" ? b3 : a;
78336
+ };
78337
+ var lowerLT = (a, b3, options) => {
78338
+ if (!a) {
78339
+ return b3;
78340
+ }
78341
+ const comp = compare(a.semver, b3.semver, options);
78342
+ return comp < 0 ? a : comp > 0 ? b3 : b3.operator === "<" && a.operator === "<=" ? b3 : a;
78343
+ };
78344
+ module.exports = subset;
78345
+ }
78346
+ });
78347
+
78348
+ // ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
78349
+ var require_semver2 = __commonJS({
78350
+ "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports$1, module) {
78351
+ init_esm_shims();
78352
+ var internalRe = require_re();
78353
+ var constants = require_constants3();
78354
+ var SemVer = require_semver();
78355
+ var identifiers = require_identifiers2();
78356
+ var parse6 = require_parse();
78357
+ var valid = require_valid();
78358
+ var clean2 = require_clean();
78359
+ var inc = require_inc();
78360
+ var diff = require_diff();
78361
+ var major = require_major();
78362
+ var minor = require_minor();
78363
+ var patch = require_patch();
78364
+ var prerelease = require_prerelease();
78365
+ var compare = require_compare();
78366
+ var rcompare = require_rcompare();
78367
+ var compareLoose = require_compare_loose();
78368
+ var compareBuild = require_compare_build();
78369
+ var sort = require_sort();
78370
+ var rsort = require_rsort();
78371
+ var gt = require_gt();
78372
+ var lt2 = require_lt();
78373
+ var eq = require_eq();
78374
+ var neq = require_neq();
78375
+ var gte = require_gte();
78376
+ var lte = require_lte();
78377
+ var cmp = require_cmp();
78378
+ var coerce2 = require_coerce();
78379
+ var truncate = require_truncate();
78380
+ var Comparator = require_comparator();
78381
+ var Range = require_range2();
78382
+ var satisfies = require_satisfies();
78383
+ var toComparators = require_to_comparators();
78384
+ var maxSatisfying = require_max_satisfying();
78385
+ var minSatisfying = require_min_satisfying();
78386
+ var minVersion = require_min_version();
78387
+ var validRange = require_valid2();
78388
+ var outside = require_outside();
78389
+ var gtr = require_gtr();
78390
+ var ltr = require_ltr();
78391
+ var intersects = require_intersects();
78392
+ var simplifyRange = require_simplify();
78393
+ var subset = require_subset();
78394
+ module.exports = {
78395
+ parse: parse6,
78396
+ valid,
78397
+ clean: clean2,
78398
+ inc,
78399
+ diff,
78400
+ major,
78401
+ minor,
78402
+ patch,
78403
+ prerelease,
78404
+ compare,
78405
+ rcompare,
78406
+ compareLoose,
78407
+ compareBuild,
78408
+ sort,
78409
+ rsort,
78410
+ gt,
78411
+ lt: lt2,
78412
+ eq,
78413
+ neq,
78414
+ gte,
78415
+ lte,
78416
+ cmp,
78417
+ coerce: coerce2,
78418
+ truncate,
78419
+ Comparator,
78420
+ Range,
78421
+ satisfies,
78422
+ toComparators,
78423
+ maxSatisfying,
78424
+ minSatisfying,
78425
+ minVersion,
78426
+ validRange,
78427
+ outside,
78428
+ gtr,
78429
+ ltr,
78430
+ intersects,
78431
+ simplifyRange,
78432
+ subset,
78433
+ SemVer,
78434
+ re: internalRe.re,
78435
+ src: internalRe.src,
78436
+ tokens: internalRe.t,
78437
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
78438
+ RELEASE_TYPES: constants.RELEASE_TYPES,
78439
+ compareIdentifiers: identifiers.compareIdentifiers,
78440
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
78441
+ };
78442
+ }
78443
+ });
78444
+
76451
78445
  // ../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js
76452
78446
  var require_src2 = __commonJS({
76453
78447
  "../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js"(exports$1, module) {
@@ -76582,7 +78576,7 @@ init_esm_shims();
76582
78576
 
76583
78577
  // package.json
76584
78578
  var package_default = {
76585
- version: "1.9.0"};
78579
+ version: "1.11.0"};
76586
78580
 
76587
78581
  // src/app.ts
76588
78582
  init_esm_shims();
@@ -77590,7 +79584,7 @@ init_esm_shims();
77590
79584
  // ../sdk/dist/index.js
77591
79585
  init_esm_shims();
77592
79586
 
77593
- // ../sdk/dist/chunk-26IHUYNK.js
79587
+ // ../sdk/dist/chunk-NUBD543C.js
77594
79588
  init_esm_shims();
77595
79589
 
77596
79590
  // ../../node_modules/.pnpm/viem@2.52.2_bufferutil@4.1.0_typescript@5.9.3_utf-8-validate@6.0.6_zod@4.3.6/node_modules/viem/_esm/index.js
@@ -142972,7 +144966,7 @@ config(en_default2());
142972
144966
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
142973
144967
  var zod_default = external_exports3;
142974
144968
 
142975
- // ../sdk/dist/chunk-26IHUYNK.js
144969
+ // ../sdk/dist/chunk-NUBD543C.js
142976
144970
  var createManagedAccount = (client, address2) => toAccount({
142977
144971
  address: address2,
142978
144972
  async signMessage({ message: message2 }) {
@@ -144784,7 +146778,7 @@ var clientFetch = async (client, url4, opts = {}) => {
144784
146778
  return result;
144785
146779
  };
144786
146780
  var package_default2 = {
144787
- version: "0.7.0"
146781
+ version: "0.8.0"
144788
146782
  };
144789
146783
  var SDK_VERSION2 = package_default2.version;
144790
146784
  var userWalletDtoSchema = external_exports3.object({
@@ -145391,6 +147385,14 @@ var capabilityResponseSchema = external_exports3.object({
145391
147385
  example: external_exports3.object({ request: external_exports3.unknown(), response: external_exports3.unknown() }).nullable(),
145392
147386
  tags: external_exports3.array(external_exports3.string()).nullable(),
145393
147387
  exampleAgentPrompt: external_exports3.string().nullable().optional(),
147388
+ whatItDoes: external_exports3.string().nullable().optional(),
147389
+ resultDescription: external_exports3.string().nullable().optional(),
147390
+ failureModes: external_exports3.array(external_exports3.string()).nullable().optional(),
147391
+ whenToPreferThis: external_exports3.string().nullable().optional(),
147392
+ // Agent-facing execution guide (markdown). Covers usage patterns, input
147393
+ // field guidance, cross-cap composition, and known failure modes.
147394
+ // Named after MCP tool convention: description = what it is, instructions = how to use it.
147395
+ instructions: external_exports3.string().nullable().optional(),
145394
147396
  displayCostAmount: external_exports3.string(),
145395
147397
  displayCostAsset: external_exports3.string(),
145396
147398
  reviewCount: external_exports3.number(),
@@ -147073,28 +149075,35 @@ var fetchCommand = (appContext) => new Command("fetch").description(
147073
149075
  })
147074
149076
  );
147075
149077
  } else if (runId && outcomeInfo.reviewable) {
149078
+ const isTTY = process.stderr.isTTY;
147076
149079
  console.error(`
147077
149080
  Run ID: ${runId}`);
147078
- console.error(
147079
- ` Leave a review to help other agents discover great capabilities:`
147080
- );
147081
- console.error(
147082
- ` zero review ${runId} --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"`
147083
- );
147084
- console.error(
147085
- [
147086
- ``,
147087
- ` Tips for a great review:`,
147088
- ` --success / --no-success Did the API return the result you expected?`,
147089
- ` --accuracy 1-5 How correct was the response? (1 = wrong, 5 = perfect)`,
147090
- ` --value 1-5 Was it worth the price? (1 = overpriced, 5 = great deal)`,
147091
- ` --reliability 1-5 Did it respond quickly and without errors? (1 = flaky, 5 = rock solid)`,
147092
- ` --content Free-text is optional but helps other agents pick the best capability.`,
147093
- ` Published publicly \u2014 do not include personal or identifying`,
147094
- ` information (names, emails, phone numbers, addresses, keys, SSNs).`,
147095
- ``
147096
- ].join("\n")
147097
- );
149081
+ if (isTTY) {
149082
+ console.error(
149083
+ ` Leave a review to help other agents discover great capabilities:`
149084
+ );
149085
+ console.error(
149086
+ ` zero review ${runId} --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"`
149087
+ );
149088
+ console.error(
149089
+ [
149090
+ ``,
149091
+ ` Tips for a great review:`,
149092
+ ` --success / --no-success Did the API return the result you expected?`,
149093
+ ` --accuracy 1-5 How correct was the response? (1 = wrong, 5 = perfect)`,
149094
+ ` --value 1-5 Was it worth the price? (1 = overpriced, 5 = great deal)`,
149095
+ ` --reliability 1-5 Did it respond quickly and without errors? (1 = flaky, 5 = rock solid)`,
149096
+ ` --content Free-text is optional but helps other agents pick the best capability.`,
149097
+ ` Published publicly \u2014 do not include personal or identifying`,
149098
+ ` information (names, emails, phone numbers, addresses, keys, SSNs).`,
149099
+ ``
149100
+ ].join("\n")
149101
+ );
149102
+ } else {
149103
+ console.error(
149104
+ ` zero review ${runId} --success --accuracy 5 --value 4 --reliability 5`
149105
+ );
149106
+ }
147098
149107
  } else if (!runId && cliSkipReasons.length > 0) {
147099
149108
  console.error(
147100
149109
  `
@@ -147405,7 +149414,11 @@ var buildTryItExample = (capability) => {
147405
149414
  if (method === "GET" || queryParams && !body) {
147406
149415
  const qpProps = queryParams ? asNode(queryParams.properties) : null;
147407
149416
  const qs = qpProps ? Object.entries(qpProps).map(
147408
- ([k3, schema]) => `${encodeURIComponent(k3)}=${encodeURIComponent(placeholderFor(k3, schema))}`
149417
+ // Key is always an identifier — safe to encode. Value is
149418
+ // left unencoded so `<FIELD>` placeholders stay readable
149419
+ // (encodeURIComponent would produce %3CFIELD%3E, which
149420
+ // agents copy verbatim and get a charged 400).
149421
+ ([k3, schema]) => `${encodeURIComponent(k3)}=${placeholderFor(k3, schema)}`
147409
149422
  ).join("&") : "";
147410
149423
  const url4 = qs ? `${capability.url}?${qs}` : capability.url;
147411
149424
  const urlLine = ` zero fetch --capability ${capability.slug} "${url4}"`;
@@ -147453,6 +149466,12 @@ var formatCapability = (capability) => {
147453
149466
  lines.push(
147454
149467
  ` Last successful run: ${formatRelativeTimestamp(capability.lastSuccessfullyRanAt)}`
147455
149468
  );
149469
+ if (capability.instructions?.trim()) {
149470
+ lines.push("", "Instructions:");
149471
+ for (const line of capability.instructions.trim().split("\n")) {
149472
+ lines.push(` ${line}`);
149473
+ }
149474
+ }
147456
149475
  if (capability.exampleAgentPrompt?.trim()) {
147457
149476
  lines.push(" Example prompt:");
147458
149477
  for (const promptLine of capability.exampleAgentPrompt.split("\n")) {
@@ -147499,6 +149518,136 @@ var getCommand = (appContext) => new Command("get").description("Get details for
147499
149518
  // src/commands/init-command.ts
147500
149519
  init_esm_shims();
147501
149520
 
149521
+ // src/agents/load-agents.ts
149522
+ init_esm_shims();
149523
+ var import_semver = __toESM(require_semver2());
149524
+
149525
+ // src/agents/schema.ts
149526
+ init_esm_shims();
149527
+ var agentDetectSchema = zod_default.looseObject({
149528
+ // Config dir under $HOME (e.g. ".claude"). Presence is the PRIMARY signal
149529
+ // that an agent is installed on this machine.
149530
+ dir: zod_default.string(),
149531
+ // Executable name resolved on PATH (e.g. "claude"). Secondary: decides
149532
+ // plugin-install vs. standalone-fallback for a present agent.
149533
+ exe: zod_default.string()
149534
+ });
149535
+ var agentInstallStepSchema = zod_default.looseObject({
149536
+ label: zod_default.string(),
149537
+ // Bare executable name (resolved on PATH) and its literal argv. Run with no
149538
+ // shell, so args are never word-split or interpolated.
149539
+ command: zod_default.string(),
149540
+ args: zod_default.array(zod_default.string()),
149541
+ // required:false steps may fail without failing the install (e.g. a
149542
+ // marketplace add that's already present).
149543
+ required: zod_default.boolean().optional()
149544
+ });
149545
+ var agentInstallSchema = zod_default.looseObject({
149546
+ // The executable the steps need on PATH (shown in manual instructions).
149547
+ executable: zod_default.string(),
149548
+ steps: zod_default.array(agentInstallStepSchema)
149549
+ });
149550
+ var agentStandaloneMcpSchema = zod_default.looseObject({
149551
+ file: zod_default.string(),
149552
+ shape: zod_default.string()
149553
+ });
149554
+ var agentStandaloneHooksSchema = zod_default.looseObject({
149555
+ // Config file to merge the hook declarations into (relative to $HOME).
149556
+ file: zod_default.string(),
149557
+ // Names the config schema. The CLI's generic JSON merger handles the shared
149558
+ // `{ hooks: { Event: [...] } }` shape (claude-settings, codex-hooks); other
149559
+ // formats (e.g. kiro-agent) need their own writer and are skipped until one
149560
+ // exists.
149561
+ format: zod_default.string(),
149562
+ sessionStart: zod_default.boolean().optional(),
149563
+ // Domains to ensure on this host's sandbox network allowlist
149564
+ // (sandbox.network.allowedDomains) after merging — e.g. ["*.zero.xyz"] for
149565
+ // Claude. Omitted hosts get no allowlist entry.
149566
+ network: zod_default.array(zod_default.string()).optional()
149567
+ });
149568
+ var agentStandaloneSchema = zod_default.looseObject({
149569
+ // Skill install dirs (relative to $HOME) for the standalone fallback.
149570
+ skills: zod_default.array(zod_default.string()).optional(),
149571
+ // mcp/hooks targets are carried for a future pass; only `skills` is consumed
149572
+ // today (see init-command.ts). `mcp` is optional — hook-provisioned hosts
149573
+ // (claude-code, codex) omit it; ephemeral/plugin-bundled hosts (e.g. kiro)
149574
+ // carry it.
149575
+ mcp: agentStandaloneMcpSchema.optional(),
149576
+ hooks: agentStandaloneHooksSchema.optional()
149577
+ });
149578
+ var agentEntrySchema = zod_default.looseObject({
149579
+ id: zod_default.string(),
149580
+ name: zod_default.string(),
149581
+ // Optional per-entry minimum CLI version gate (semver). Top-level minCli
149582
+ // applies to the whole matrix.
149583
+ minCli: zod_default.string().optional(),
149584
+ detect: agentDetectSchema,
149585
+ // Optional: standalone-only agents (e.g. kiro) carry no install block.
149586
+ install: agentInstallSchema.optional(),
149587
+ standalone: agentStandaloneSchema.optional()
149588
+ });
149589
+ var agentsMatrixSchema = zod_default.looseObject({
149590
+ schemaVersion: zod_default.number(),
149591
+ minCli: zod_default.string().optional(),
149592
+ agents: zod_default.array(agentEntrySchema)
149593
+ });
149594
+
149595
+ // src/agents/load-agents.ts
149596
+ var ALLOWED_ORG = "officialzeroxyz";
149597
+ var isBelowGate = (version12, gate) => {
149598
+ const v = import_semver.default.coerce(version12);
149599
+ const g2 = import_semver.default.coerce(gate);
149600
+ if (!v || !g2) return false;
149601
+ return import_semver.default.lt(v, g2);
149602
+ };
149603
+ var isAllowedSlug = (slug) => {
149604
+ const value = slug.trim();
149605
+ if (value.length === 0) return false;
149606
+ const urlMatch = value.match(
149607
+ /^(?:https?:\/\/)?github\.com\/([^/]+)(?:\/|$)/i
149608
+ );
149609
+ if (urlMatch) {
149610
+ return urlMatch[1]?.toLowerCase() === ALLOWED_ORG;
149611
+ }
149612
+ if (value.includes("://")) return false;
149613
+ const shorthand = value.match(/^([^/]+)\/[^/]+$/);
149614
+ if (shorthand) {
149615
+ return shorthand[1]?.toLowerCase() === ALLOWED_ORG;
149616
+ }
149617
+ return false;
149618
+ };
149619
+ var looksLikeRepoRef = (arg) => {
149620
+ if (/github\.com/i.test(arg)) return true;
149621
+ if (arg.includes("://")) return false;
149622
+ return /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/.test(arg);
149623
+ };
149624
+ var passesAllowlist = (entry) => {
149625
+ if (!entry.install) return true;
149626
+ return entry.install.steps.every(
149627
+ (step) => step.args.filter(looksLikeRepoRef).every(isAllowedSlug)
149628
+ );
149629
+ };
149630
+ var filterMatrix = (matrix, cliVersion) => {
149631
+ const topGate = matrix.minCli;
149632
+ return matrix.agents.filter((entry) => {
149633
+ const gate = entry.minCli ?? topGate;
149634
+ if (gate && isBelowGate(cliVersion, gate)) return false;
149635
+ return passesAllowlist(entry);
149636
+ });
149637
+ };
149638
+ var fetchMatrix = async (url4) => {
149639
+ const res = await fetch(url4);
149640
+ if (!res.ok) {
149641
+ throw new Error(`GET ${url4} failed with ${res.status}`);
149642
+ }
149643
+ const raw = await res.json();
149644
+ return agentsMatrixSchema.parse(raw);
149645
+ };
149646
+ var loadAgents = async (webBase, cliVersion) => {
149647
+ const matrix = await fetchMatrix(`${webBase}/agents.json`);
149648
+ return { entries: filterMatrix(matrix, cliVersion) };
149649
+ };
149650
+
147502
149651
  // src/util/install-banner.ts
147503
149652
  init_esm_shims();
147504
149653
  var colorsEnabled = () => {
@@ -147572,106 +149721,17 @@ var updateJsonConfigFile = (path3, update2, options = {}) => {
147572
149721
 
147573
149722
  // src/commands/init-command.ts
147574
149723
  var SKILL_DIRS = [".claude/skills", ".agents/skills"];
147575
- var ZERO_SANDBOX_DOMAIN = "*.zero.xyz";
147576
149724
  var CLAUDE_SETTINGS_PATH = ".claude/settings.json";
147577
149725
  var CODEX_HOOKS_PATH = ".codex/hooks.json";
147578
- var PLUGIN_AGENTS = ["codex", "claude", "gemini", "openclaw"];
147579
- var INIT_AGENTS = [...PLUGIN_AGENTS, "standalone"];
147580
- var initAgentSchema = zod_default.enum(INIT_AGENTS);
147581
- var HARNESS_SPECS = {
147582
- claude: {
147583
- agent: "claude",
147584
- displayName: "Claude Code",
147585
- executable: "claude",
147586
- installCommands: [
147587
- {
147588
- label: "add marketplace",
147589
- command: "claude",
147590
- args: ["plugin", "marketplace", "add", "officialzeroxyz/zero-plugins"],
147591
- required: false
147592
- },
147593
- {
147594
- label: "install plugin",
147595
- command: "claude",
147596
- args: ["plugin", "install", "zero@zero-plugins"]
147597
- }
147598
- ],
147599
- manualInstructions: [
147600
- "Claude Code Desktop: open the Code tab, choose Customize, then add a Personal plugin marketplace from officialzeroxyz/zero-plugins.",
147601
- "After it syncs, click the + icon on the Zero plugin, then start a new session and ask Claude to help set up and test Zero."
147602
- ]
147603
- },
147604
- codex: {
147605
- agent: "codex",
147606
- displayName: "Codex",
147607
- executable: "codex",
147608
- installCommands: [
147609
- {
147610
- label: "add marketplace",
147611
- command: "codex",
147612
- args: ["plugin", "marketplace", "add", "officialzeroxyz/zero-plugins"],
147613
- required: false
147614
- },
147615
- {
147616
- label: "install plugin",
147617
- command: "codex",
147618
- args: ["plugin", "add", "zero@zero-plugins"]
147619
- }
147620
- ],
147621
- manualInstructions: [
147622
- "Codex app: open Plugins in the sidebar, click +, then add marketplace officialzeroxyz/zero-plugins.",
147623
- "Select the Zero filter, click Add plugin on Zero, then start a new chat and ask Codex to help set up and test Zero."
147624
- ]
147625
- },
147626
- gemini: {
147627
- agent: "gemini",
147628
- displayName: "Gemini CLI",
147629
- executable: "gemini",
147630
- installCommands: [
147631
- {
147632
- label: "install extension",
147633
- command: "gemini",
147634
- args: [
147635
- "extensions",
147636
- "install",
147637
- "https://github.com/officialzeroxyz/zero-plugins",
147638
- "--auto-update"
147639
- ]
147640
- }
147641
- ],
147642
- manualInstructions: [
147643
- "Gemini CLI: run this from a shell where `gemini` is on PATH: gemini extensions install https://github.com/officialzeroxyz/zero-plugins --auto-update"
147644
- ]
147645
- },
147646
- openclaw: {
147647
- agent: "openclaw",
147648
- displayName: "OpenClaw",
147649
- executable: "openclaw",
147650
- installCommands: [
147651
- {
147652
- label: "install plugin",
147653
- command: "openclaw",
147654
- args: [
147655
- "plugins",
147656
- "install",
147657
- "zero",
147658
- "--marketplace",
147659
- "officialzeroxyz/zero-plugins"
147660
- ]
147661
- }
147662
- ],
147663
- manualInstructions: [
147664
- "OpenClaw: run this from a shell where `openclaw` is on PATH: openclaw plugins install zero --marketplace officialzeroxyz/zero-plugins"
147665
- ]
147666
- }
147667
- };
149726
+ var CLI_VERSION = package_default.version;
149727
+ var STANDALONE = "standalone";
147668
149728
  var unique = (items) => [...new Set(items)];
147669
- var parseAgentValues = (values) => {
149729
+ var parseAgentValues = (values, matrixIds) => {
147670
149730
  if (!values || values.length === 0) {
147671
149731
  return {
147672
149732
  kind: "default",
147673
- requestedAgents: [...PLUGIN_AGENTS],
147674
- pluginAgents: [...PLUGIN_AGENTS]
149733
+ requestedAgents: [...matrixIds],
149734
+ pluginAgents: [...matrixIds]
147675
149735
  };
147676
149736
  }
147677
149737
  const parsed = unique(
@@ -147682,28 +149742,24 @@ var parseAgentValues = (values) => {
147682
149742
  if (parsed.length === 0) {
147683
149743
  throw new Error("Pass at least one agent name to --agent");
147684
149744
  }
149745
+ const valid = /* @__PURE__ */ new Set([...matrixIds, STANDALONE]);
147685
149746
  const agents = parsed.map((value) => {
147686
- const result = initAgentSchema.safeParse(value);
147687
- if (!result.success) {
149747
+ if (!valid.has(value)) {
147688
149748
  throw new Error(
147689
- `Unknown agent "${value}". Expected one of: ${INIT_AGENTS.join(", ")}`
149749
+ `Unknown agent "${value}". Expected one of: ${[...valid].join(", ")}`
147690
149750
  );
147691
149751
  }
147692
- return result.data;
149752
+ return value;
147693
149753
  });
147694
- if (agents.includes("standalone") && agents.length > 1) {
149754
+ if (agents.includes(STANDALONE) && agents.length > 1) {
147695
149755
  throw new Error(
147696
149756
  "`standalone` cannot be combined with other --agent values; run it separately."
147697
149757
  );
147698
149758
  }
147699
- if (agents[0] === "standalone") {
149759
+ if (agents[0] === STANDALONE) {
147700
149760
  return { kind: "standalone", requestedAgents: agents, pluginAgents: [] };
147701
149761
  }
147702
- return {
147703
- kind: "specific",
147704
- requestedAgents: agents,
147705
- pluginAgents: agents
147706
- };
149762
+ return { kind: "specific", requestedAgents: agents, pluginAgents: agents };
147707
149763
  };
147708
149764
  var collectAgentOption = (value, previous = []) => [
147709
149765
  ...previous,
@@ -147735,20 +149791,22 @@ var isCommandCallable = (command) => {
147735
149791
  });
147736
149792
  return result.status === 0;
147737
149793
  };
147738
- var installHarnessPlugin = (spec, options) => {
149794
+ var detectAgent = (home, entry) => ({
149795
+ entry,
149796
+ present: existsSync(join(home, entry.detect.dir)),
149797
+ exeCallable: isCommandCallable(entry.detect.exe),
149798
+ method: entry.install ?? null
149799
+ });
149800
+ var installAgentPlugin = (entry, method, options) => {
149801
+ const base2 = { agent: entry.id, displayName: entry.name };
147739
149802
  if (options.dryRun) {
147740
- for (const step of spec.installCommands) {
149803
+ for (const step of method.steps) {
147741
149804
  stepInfo(`would run: ${commandSummary(step.command, step.args)}`);
147742
149805
  }
147743
- return {
147744
- agent: spec.agent,
147745
- displayName: spec.displayName,
147746
- status: "would_install",
147747
- detail: "dry run"
147748
- };
149806
+ return { ...base2, status: "would_install", detail: "dry run" };
147749
149807
  }
147750
149808
  let optionalFailure;
147751
- for (const step of spec.installCommands) {
149809
+ for (const step of method.steps) {
147752
149810
  if (options.verbose) {
147753
149811
  stepInfo(`running: ${commandSummary(step.command, step.args)}`);
147754
149812
  }
@@ -147764,33 +149822,36 @@ var installHarnessPlugin = (spec, options) => {
147764
149822
  if (options.verbose) stepInfo(`${optionalFailure}; continuing`);
147765
149823
  continue;
147766
149824
  }
147767
- return {
147768
- agent: spec.agent,
147769
- displayName: spec.displayName,
147770
- status: "failed",
147771
- detail
147772
- };
149825
+ return { ...base2, status: "failed", detail };
147773
149826
  }
147774
149827
  return {
147775
- agent: spec.agent,
147776
- displayName: spec.displayName,
149828
+ ...base2,
147777
149829
  status: "installed",
147778
149830
  detail: optionalFailure ? `installed; ignored ${optionalFailure}` : void 0
147779
149831
  };
147780
149832
  };
147781
- var printManualInstructions = (spec) => {
147782
- for (const line of spec.manualInstructions) {
149833
+ var manualInstructionLines = (entry, method) => {
149834
+ if (!method) {
149835
+ return [`${entry.name}: no automated plugin install is available.`];
149836
+ }
149837
+ return [
149838
+ `${entry.name}: run these from a shell where \`${method.executable}\` is on PATH:`,
149839
+ ...method.steps.map((step) => commandSummary(step.command, step.args))
149840
+ ];
149841
+ };
149842
+ var printManualInstructions = (lines) => {
149843
+ for (const line of lines) {
147783
149844
  console.log(` ${color.gray("\xB7")} ${color.dim(line)}`);
147784
149845
  }
147785
149846
  };
147786
- var fallbackReason = (selection, detectedAgents, results) => {
149847
+ var fallbackReason = (selection, detections, results) => {
147787
149848
  if (selection.kind === "standalone")
147788
149849
  return "--agent standalone was requested";
147789
- if (selection.kind === "default" && detectedAgents.length === 0) {
147790
- return "no supported harness CLIs were callable in this shell";
149850
+ if (!detections.some((detection) => detection.present)) {
149851
+ return selection.kind === "default" ? "no supported harness was detected in this environment" : "no requested harness was detected in this environment";
147791
149852
  }
147792
- if (results.every((result) => result.status === "skipped_unavailable")) {
147793
- return "no requested harness CLIs were callable in this shell";
149853
+ if (results.length > 0 && results.every((result) => result.status === "skipped_unavailable")) {
149854
+ return "no detected harness could install the Zero plugin";
147794
149855
  }
147795
149856
  return "no plugin install succeeded";
147796
149857
  };
@@ -147858,7 +149919,8 @@ var installHookScripts = async (home, hooksJson, webBase, verbose) => {
147858
149919
  })
147859
149920
  );
147860
149921
  };
147861
- var ensureZeroSandboxAllowlist = (settings, verbose) => {
149922
+ var ensureSandboxDomains = (settings, domains, verbose) => {
149923
+ if (domains.length === 0) return;
147862
149924
  if (!settings.sandbox || typeof settings.sandbox !== "object") {
147863
149925
  settings.sandbox = {};
147864
149926
  }
@@ -147871,10 +149933,10 @@ var ensureZeroSandboxAllowlist = (settings, verbose) => {
147871
149933
  network.allowedDomains = [];
147872
149934
  }
147873
149935
  const allowedDomains = network.allowedDomains;
147874
- if (!allowedDomains.includes(ZERO_SANDBOX_DOMAIN)) {
147875
- allowedDomains.push(ZERO_SANDBOX_DOMAIN);
147876
- if (verbose) {
147877
- stepInfo(`sandbox.network.allowedDomains += ${ZERO_SANDBOX_DOMAIN}`);
149936
+ for (const domain3 of domains) {
149937
+ if (!allowedDomains.includes(domain3)) {
149938
+ allowedDomains.push(domain3);
149939
+ if (verbose) stepInfo(`sandbox.network.allowedDomains += ${domain3}`);
147878
149940
  }
147879
149941
  }
147880
149942
  };
@@ -147926,9 +149988,7 @@ var registerHooksInJsonFile = (home, hooksJson, target, verbose) => {
147926
149988
  }
147927
149989
  }
147928
149990
  }
147929
- if (target.includeSandboxAllowlist) {
147930
- ensureZeroSandboxAllowlist(config2, verbose);
147931
- }
149991
+ ensureSandboxDomains(config2, target.network, verbose);
147932
149992
  return true;
147933
149993
  },
147934
149994
  { createIfMissing: true }
@@ -147942,6 +150002,21 @@ var registerHooksInJsonFile = (home, hooksJson, target, verbose) => {
147942
150002
  }
147943
150003
  return true;
147944
150004
  };
150005
+ var JSON_HOOK_FORMATS = /* @__PURE__ */ new Set(["claude-settings", "codex-hooks"]);
150006
+ var buildHookTargets = (entries) => {
150007
+ const byFile = /* @__PURE__ */ new Map();
150008
+ for (const entry of entries) {
150009
+ const hooks = entry.standalone?.hooks;
150010
+ if (!hooks || !JSON_HOOK_FORMATS.has(hooks.format)) continue;
150011
+ const existing = byFile.get(hooks.file);
150012
+ const network = unique([
150013
+ ...existing?.network ?? [],
150014
+ ...hooks.network ?? []
150015
+ ]);
150016
+ byFile.set(hooks.file, { relativePath: hooks.file, network });
150017
+ }
150018
+ return [...byFile.values()];
150019
+ };
147945
150020
  var runStandaloneInit = async (appContext, options = {}) => {
147946
150021
  const verbose = options.verbose ?? false;
147947
150022
  options.onStep?.("fetch");
@@ -147987,35 +150062,24 @@ var runStandaloneInit = async (appContext, options = {}) => {
147987
150062
  );
147988
150063
  stepSuccess("Hook scripts installed", "~/.zero/hooks");
147989
150064
  options.onStep?.("settings");
147990
- const settingsRegistered = registerHooksInJsonFile(
147991
- home,
147992
- hooksJson,
147993
- {
147994
- relativePath: CLAUDE_SETTINGS_PATH,
147995
- includeSandboxAllowlist: true
147996
- },
147997
- verbose
147998
- );
147999
- if (settingsRegistered) {
148000
- stepSuccess("Hooks registered", "~/.claude/settings.json");
148001
- }
148002
- const codexHooksRegistered = registerHooksInJsonFile(
148003
- home,
148004
- hooksJson,
148005
- {
148006
- relativePath: CODEX_HOOKS_PATH,
148007
- includeSandboxAllowlist: false
148008
- },
148009
- verbose
148010
- );
148011
- if (codexHooksRegistered) {
148012
- stepSuccess("Codex hooks registered", "~/.codex/hooks.json");
150065
+ const registeredFiles = /* @__PURE__ */ new Set();
150066
+ for (const target of options.hookTargets ?? []) {
150067
+ const registered = registerHooksInJsonFile(
150068
+ home,
150069
+ hooksJson,
150070
+ target,
150071
+ verbose
150072
+ );
150073
+ if (registered) {
150074
+ registeredFiles.add(target.relativePath);
150075
+ stepSuccess("Hooks registered", `~/${target.relativePath}`);
150076
+ }
148013
150077
  }
148014
150078
  return {
148015
150079
  skillsInstalled,
148016
150080
  hookScriptsInstalled,
148017
- settingsRegistered,
148018
- codexHooksRegistered
150081
+ settingsRegistered: registeredFiles.has(CLAUDE_SETTINGS_PATH),
150082
+ codexHooksRegistered: registeredFiles.has(CODEX_HOOKS_PATH)
148019
150083
  };
148020
150084
  };
148021
150085
  var statusLabel = (result) => {
@@ -148042,8 +150106,7 @@ var runInit = async (appContext, options = {}) => {
148042
150106
  const verbose = options.verbose ?? false;
148043
150107
  const dryRun = options.dryRun ?? false;
148044
150108
  const fallbackAllowed = options.fallback ?? true;
148045
- const selection = parseAgentValues(options.agent);
148046
- const requestedAgents = selection.requestedAgents;
150109
+ const home = homedir();
148047
150110
  let currentStep = "plugins";
148048
150111
  appContext.services.analyticsService.capture("init_started", {});
148049
150112
  try {
@@ -148052,56 +150115,63 @@ var runInit = async (appContext, options = {}) => {
148052
150115
  console.log("");
148053
150116
  console.log(color.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
148054
150117
  console.log("");
150118
+ currentStep = "fetch";
150119
+ const { entries } = await loadAgents(
150120
+ appContext.env.ZERO_WEB_URL,
150121
+ CLI_VERSION
150122
+ );
150123
+ currentStep = "plugins";
150124
+ const entryById = new Map(entries.map((entry) => [entry.id, entry]));
150125
+ const selection = parseAgentValues(
150126
+ options.agent,
150127
+ entries.map((entry) => entry.id)
150128
+ );
150129
+ const requestedAgents = selection.requestedAgents;
148055
150130
  console.log(` Requested agents: ${requestedAgents.join(", ")}`);
148056
150131
  if (dryRun) stepInfo("dry run: no plugin commands or file writes will run");
148057
- const detectedAgents = selection.kind === "standalone" ? [] : selection.pluginAgents.filter(
148058
- (agent) => isCommandCallable(HARNESS_SPECS[agent].executable)
148059
- );
150132
+ const detections = selection.kind === "standalone" ? [] : selection.pluginAgents.flatMap((id) => {
150133
+ const entry = entryById.get(id);
150134
+ return entry ? [detectAgent(home, entry)] : [];
150135
+ });
150136
+ const detectedAgents = detections.filter((detection) => detection.present).map((detection) => detection.entry.id);
148060
150137
  if (selection.kind === "default") {
148061
150138
  console.log(
148062
- ` Detected callable harnesses: ${detectedAgents.length > 0 ? detectedAgents.join(", ") : "none"}`
150139
+ ` Detected harnesses: ${detectedAgents.length > 0 ? detectedAgents.join(", ") : "none"}`
148063
150140
  );
148064
150141
  }
148065
150142
  console.log("");
150143
+ const fallbackSkillDirs = [];
148066
150144
  const pluginResults = [];
148067
- if (selection.kind !== "standalone") {
148068
- for (const agent of selection.pluginAgents) {
148069
- const spec = HARNESS_SPECS[agent];
148070
- if (!detectedAgents.includes(agent)) {
148071
- const result2 = {
148072
- agent,
148073
- displayName: spec.displayName,
148074
- status: "skipped_unavailable",
148075
- detail: `\`${spec.executable}\` is not callable in this shell`
148076
- };
148077
- pluginResults.push(result2);
148078
- stepSkip(
148079
- `${spec.displayName}: ${statusLabel(result2)}`,
148080
- result2.detail
148081
- );
148082
- if (selection.kind === "specific") {
148083
- printManualInstructions(spec);
148084
- }
148085
- continue;
148086
- }
148087
- const result = installHarnessPlugin(spec, { dryRun, verbose });
148088
- pluginResults.push(result);
148089
- if (result.status === "installed") {
148090
- stepSuccess(
148091
- `${spec.displayName}: ${statusLabel(result)}`,
148092
- result.detail
148093
- );
148094
- } else if (result.status === "would_install") {
148095
- stepSkip(
148096
- `${spec.displayName}: ${statusLabel(result)}`,
148097
- result.detail
148098
- );
150145
+ for (const detection of detections) {
150146
+ const { entry, present, exeCallable, method } = detection;
150147
+ if (present && exeCallable && method) {
150148
+ const result2 = installAgentPlugin(entry, method, { dryRun, verbose });
150149
+ pluginResults.push(result2);
150150
+ if (result2.status === "installed") {
150151
+ stepSuccess(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
150152
+ } else if (result2.status === "would_install") {
150153
+ stepSkip(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
148099
150154
  } else {
148100
- stepWarn(
148101
- `${spec.displayName}: ${statusLabel(result)}`,
148102
- result.detail
148103
- );
150155
+ stepWarn(`${entry.name}: ${statusLabel(result2)}`, result2.detail);
148104
150156
  }
150157
+ continue;
150158
+ }
150159
+ const detail = !present ? `~/${entry.detect.dir} not found` : !method ? "no plugin install available for this harness" : `\`${entry.detect.exe}\` is not callable in this shell`;
150160
+ const result = {
150161
+ agent: entry.id,
150162
+ displayName: entry.name,
150163
+ status: "skipped_unavailable",
150164
+ detail
150165
+ };
150166
+ pluginResults.push(result);
150167
+ stepSkip(`${entry.name}: ${statusLabel(result)}`, result.detail);
150168
+ if (present && !exeCallable) {
150169
+ for (const dir of entry.standalone?.skills ?? []) {
150170
+ fallbackSkillDirs.push(join(home, dir));
150171
+ }
150172
+ }
150173
+ if (selection.kind === "specific") {
150174
+ printManualInstructions(manualInstructionLines(entry, method));
148105
150175
  }
148106
150176
  }
148107
150177
  const pluginSucceeded = pluginResults.some(
@@ -148118,7 +150188,7 @@ var runInit = async (appContext, options = {}) => {
148118
150188
  if (selection.kind === "standalone" || !pluginSucceeded) {
148119
150189
  standaloneFallbackReason = fallbackReason(
148120
150190
  selection,
148121
- detectedAgents,
150191
+ detections,
148122
150192
  pluginResults
148123
150193
  );
148124
150194
  if (!fallbackAllowed && selection.kind !== "standalone") {
@@ -148141,7 +150211,11 @@ var runInit = async (appContext, options = {}) => {
148141
150211
  } else {
148142
150212
  standaloneResult = await runStandaloneInit(appContext, {
148143
150213
  verbose,
148144
- skillsDir: options.skillsDir,
150214
+ skillsDir: unique([
150215
+ ...options.skillsDir ?? [],
150216
+ ...fallbackSkillDirs
150217
+ ]),
150218
+ hookTargets: buildHookTargets(entries),
148145
150219
  onStep: (step) => {
148146
150220
  currentStep = step;
148147
150221
  }
@@ -148209,7 +150283,7 @@ var initCommand = (appContext) => new Command("init").description(
148209
150283
  "Install the Zero plugin for supported agents, with a standalone skill/hook fallback"
148210
150284
  ).option(
148211
150285
  "--agent <agent>",
148212
- "Agent target: codex, claude, gemini, openclaw, or standalone. Repeat or comma-separate values. Omit to target every supported agent.",
150286
+ "Agent target: a supported harness id (e.g. claude-code, codex, droid, gemini-cli) or standalone. Repeat or comma-separate values. Omit to target every supported agent.",
148213
150287
  collectAgentOption,
148214
150288
  []
148215
150289
  ).option(
@@ -148679,7 +150753,8 @@ var formatSearchResults = (results) => {
148679
150753
  const ratingBadge = formatRatingBadge(r2.rating);
148680
150754
  const statusBadge = formatStatusBadge(r2.availabilityStatus);
148681
150755
  const costLabel = r2.cost.amount === "0" ? "Free" : r2.cost.amount === "unknown" ? "variable pricing" : `$${r2.cost.amount}/call`;
148682
- return ` ${r2.position}. ${displayName} \u2014 ${costLabel} \u2014 ${ratingBadge}${statusBadge}
150756
+ const tokenHint = r2.token ? ` [${r2.token}]` : "";
150757
+ return ` ${r2.position}.${tokenHint} ${displayName} \u2014 ${costLabel} \u2014 ${ratingBadge}${statusBadge}
148683
150758
  "${displayDescription}"`;
148684
150759
  }).join("\n");
148685
150760
  };
@@ -148826,7 +150901,7 @@ var HOOK_FILES = [
148826
150901
  "zero-context.sh",
148827
150902
  "ensure-runner.sh"
148828
150903
  ];
148829
- var ZERO_SANDBOX_DOMAIN2 = "*.zero.xyz";
150904
+ var ZERO_SANDBOX_DOMAIN = "*.zero.xyz";
148830
150905
  var CLAUDE_SETTINGS_PATH2 = ".claude/settings.json";
148831
150906
  var CODEX_HOOKS_PATH2 = ".codex/hooks.json";
148832
150907
  var LEGACY_SKILL_NAMES = ["zero"];
@@ -148924,11 +150999,11 @@ var stripZeroFromSettings = (settings, verbose, removeSandboxAllowlist) => {
148924
150999
  const network = sandbox?.network && typeof sandbox.network === "object" ? sandbox.network : null;
148925
151000
  if (network && Array.isArray(network.allowedDomains)) {
148926
151001
  const domains = network.allowedDomains;
148927
- const next = domains.filter((d3) => d3 !== ZERO_SANDBOX_DOMAIN2);
151002
+ const next = domains.filter((d3) => d3 !== ZERO_SANDBOX_DOMAIN);
148928
151003
  if (next.length !== domains.length) {
148929
151004
  changed = true;
148930
151005
  if (verbose) {
148931
- stepInfo(`sandbox.network.allowedDomains -= ${ZERO_SANDBOX_DOMAIN2}`);
151006
+ stepInfo(`sandbox.network.allowedDomains -= ${ZERO_SANDBOX_DOMAIN}`);
148932
151007
  }
148933
151008
  if (next.length === 0) {
148934
151009
  delete network.allowedDomains;
@@ -154262,7 +156337,7 @@ var detectAgentHost = (env = process.env) => {
154262
156337
  };
154263
156338
 
154264
156339
  // src/app/app-services.ts
154265
- var CLI_VERSION = package_default.version;
156340
+ var CLI_VERSION2 = package_default.version;
154266
156341
  var resolveCredentials = (env, config2, injectedToken) => {
154267
156342
  const credentials = injectedToken ? {
154268
156343
  kind: "session",
@@ -154316,7 +156391,7 @@ var getServices = async (env) => {
154316
156391
  baseUrl: env.ZERO_API_URL,
154317
156392
  // The SDK scopes defaultHeaders to same-origin API calls, so this
154318
156393
  // never reaches capability URLs.
154319
- defaultHeaders: { "x-zero-client": `cli/${CLI_VERSION}` },
156394
+ defaultHeaders: { "x-zero-client": `cli/${CLI_VERSION2}` },
154320
156395
  // `POST /v1/runs` is non-idempotent (no server-side dedup key); a
154321
156396
  // transport-level replay after the row inserted would double-count
154322
156397
  // runs and skew capability quality signal. 401 refresh-replay still
@@ -154348,7 +156423,7 @@ var getServices = async (env) => {
154348
156423
  const analyticsService = new AnalyticsService({
154349
156424
  walletAddress: account?.address ?? null,
154350
156425
  configPath,
154351
- cliVersion: CLI_VERSION,
156426
+ cliVersion: CLI_VERSION2,
154352
156427
  environment: env.ZERO_ENV,
154353
156428
  requestId: randomUUID(),
154354
156429
  agentHost: detectAgentHost()