@heyanon-arp/cli 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -733,7 +733,7 @@ var import_commander = require("commander");
733
733
  // package.json
734
734
  var package_default = {
735
735
  name: "@heyanon-arp/cli",
736
- version: "0.0.22",
736
+ version: "0.0.24",
737
737
  description: "Command-line client for the Agent Relationship Protocol \u2014 register agents, sign envelopes, run escrowed work cycles on Solana.",
738
738
  license: "MIT",
739
739
  keywords: ["arp", "agent-relationship-protocol", "did", "solana", "escrow", "ed25519", "agents", "a2a", "cli"],
@@ -8333,19 +8333,13 @@ var import_node_path7 = require("path");
8333
8333
  init_paths();
8334
8334
  var CHECK_INTERVAL_MS = 60 * 60 * 1e3;
8335
8335
  var REGISTRY_TIMEOUT_MS = 1500;
8336
- var VERSION_GATE_BYPASS_ENV = "HEYARP_IGNORE_VERSION_GATE";
8337
8336
  var cacheFile = () => (0, import_node_path7.join)(arpHomeDir(), "update-check.json");
8338
- function compareVersions(a, b) {
8339
- const seg = (v, i) => Number.parseInt(v.split(".")[i] ?? "0", 10) || 0;
8340
- for (let i = 0; i < 3; i++) {
8341
- const d = seg(a, i) - seg(b, i);
8342
- if (d !== 0) return d > 0 ? 1 : -1;
8343
- }
8344
- return 0;
8337
+ function majorOf(version) {
8338
+ return Number.parseInt(version.split(".")[0] ?? "0", 10) || 0;
8345
8339
  }
8346
8340
  function isClientBlocked(current, latest) {
8347
8341
  if (!latest) return false;
8348
- return compareVersions(current, latest) < 0;
8342
+ return majorOf(current) < majorOf(latest);
8349
8343
  }
8350
8344
  function isVersionGateExempt(argv) {
8351
8345
  if (argv.length === 0) return true;
@@ -8388,7 +8382,6 @@ async function resolveLatest(pkgName) {
8388
8382
  return fresh;
8389
8383
  }
8390
8384
  async function enforceMinClientVersion(pkg, argv) {
8391
- if (process.env[VERSION_GATE_BYPASS_ENV]) return;
8392
8385
  if (isVersionGateExempt(argv)) return;
8393
8386
  let latest;
8394
8387
  try {
@@ -8402,20 +8395,18 @@ async function enforceMinClientVersion(pkg, argv) {
8402
8395
  console.error(
8403
8396
  JSON.stringify({
8404
8397
  code: "CLI_VERSION_TOO_OLD",
8405
- message: `heyarp ${pkg.version} is out of date and blocked; the current release is ${latest}. Update with \`${update}\`, then re-run.`,
8406
- details: { current: pkg.version, latest, update, bypassEnv: VERSION_GATE_BYPASS_ENV }
8398
+ message: `heyarp ${pkg.version} is incompatible with the current major release (${latest}); a major update is required. Update with \`${update}\`, then re-run.`,
8399
+ details: { current: pkg.version, latest, update }
8407
8400
  })
8408
8401
  );
8409
8402
  } else {
8410
8403
  process.stderr.write(
8411
8404
  `
8412
- heyarp ${pkg.version} is out of date and is blocked.
8413
- The current release is ${latest}. Update, then re-run:
8405
+ heyarp ${pkg.version} is incompatible with the current major release (${latest}).
8406
+ A major update is required. Update, then re-run:
8414
8407
 
8415
8408
  ${update}
8416
8409
 
8417
- (emergency bypass: set ${VERSION_GATE_BYPASS_ENV}=1)
8418
-
8419
8410
  `
8420
8411
  );
8421
8412
  }