pushary 1.9.187 → 1.9.193

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 (157) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +4 -0
  4. package/data/cursor-plugin/scripts/pushary-gate.mjs +34 -6
  5. package/data/openclaw-plugin/README.md +2 -2
  6. package/data/openclaw-plugin/dist/protected-writes.js +3 -2
  7. package/data/openclaw-plugin/package.json +1 -1
  8. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  9. package/data/vscode-plugin/CHANGELOG.md +4 -0
  10. package/data/vscode-plugin/scripts/pushary-gate.mjs +34 -6
  11. package/dist/{api-6U7B4OY7.js → api-KEQ763XL.js} +12 -12
  12. package/dist/bin/pushary-audit.js +4 -4
  13. package/dist/bin/pushary-bell-hook.js +30 -30
  14. package/dist/bin/pushary-bell.js +13 -13
  15. package/dist/bin/pushary-calls.js +18 -18
  16. package/dist/bin/pushary-claude.js +30 -30
  17. package/dist/bin/pushary-clean.js +43 -43
  18. package/dist/bin/pushary-codex-bridge.js +25 -25
  19. package/dist/bin/pushary-codex-hook.js +52 -52
  20. package/dist/bin/pushary-codex-session.js +8 -8
  21. package/dist/bin/pushary-codex.js +18 -18
  22. package/dist/bin/pushary-connect.js +39 -39
  23. package/dist/bin/pushary-cowork.js +6 -6
  24. package/dist/bin/pushary-daemon.js +48 -48
  25. package/dist/bin/pushary-disconnect.js +33 -33
  26. package/dist/bin/pushary-display-hook.js +17 -8
  27. package/dist/bin/pushary-doctor.js +79 -57
  28. package/dist/bin/pushary-elicitation-hook.js +30 -30
  29. package/dist/bin/pushary-gemini-bridge.js +21 -20
  30. package/dist/bin/pushary-gemini-hook.js +34 -34
  31. package/dist/bin/pushary-hook.js +38 -38
  32. package/dist/bin/pushary-login.js +24 -24
  33. package/dist/bin/pushary-logout.js +33 -33
  34. package/dist/bin/pushary-mcp.js +13 -13
  35. package/dist/bin/pushary-mode.js +20 -20
  36. package/dist/bin/pushary-notification-hook.js +29 -29
  37. package/dist/bin/pushary-opencode-bridge.js +63 -26
  38. package/dist/bin/pushary-opencode-hook.js +47 -42
  39. package/dist/bin/pushary-permission-denied-hook.js +38 -38
  40. package/dist/bin/pushary-permission-hook.js +38 -38
  41. package/dist/bin/pushary-post-hook.js +30 -30
  42. package/dist/bin/pushary-prompt-hook.js +29 -29
  43. package/dist/bin/pushary-session-end-hook.js +29 -29
  44. package/dist/bin/pushary-session-start-hook.js +41 -41
  45. package/dist/bin/pushary-sessions.js +15 -15
  46. package/dist/bin/pushary-setup.js +242 -111
  47. package/dist/bin/pushary-stats.js +6 -6
  48. package/dist/bin/pushary-status.js +38 -38
  49. package/dist/bin/pushary-stop-hook.js +29 -29
  50. package/dist/bin/pushary-stopfailure-hook.js +29 -29
  51. package/dist/bin/pushary-suggestions.js +17 -17
  52. package/dist/bin/pushary-transcript-register.js +19 -19
  53. package/dist/bin/pushary-transcripts.js +28 -28
  54. package/dist/bin/pushary-upgrade.js +48 -48
  55. package/dist/bin/pushary-wait.js +17 -17
  56. package/dist/bin/pushary.js +11 -11
  57. package/dist/{chunk-ZL3UDLTC.js → chunk-23NHXO6T.js} +5 -5
  58. package/dist/{chunk-BWOQACK7.js → chunk-25CMVBTJ.js} +3 -3
  59. package/dist/{chunk-GTEL6ZIH.js → chunk-34D65JYW.js} +8 -6
  60. package/dist/{chunk-2ACPOE77.js → chunk-3C62WDY4.js} +1 -1
  61. package/dist/{chunk-6ZSOD7VY.js → chunk-3EFPU2IK.js} +5 -5
  62. package/dist/{chunk-TBQT2TA6.js → chunk-3QDILGKG.js} +12 -12
  63. package/dist/{chunk-3JNBZF4G.js → chunk-3ULFLONL.js} +1 -1
  64. package/dist/{chunk-QJF5I7NR.js → chunk-44SARVA4.js} +6 -6
  65. package/dist/{chunk-6NUEY2FT.js → chunk-4BC4YDVL.js} +4 -4
  66. package/dist/{chunk-BW6WGBJC.js → chunk-4DMZJSI5.js} +4 -4
  67. package/dist/{chunk-NNHD7KVL.js → chunk-4TIZJD3Q.js} +5 -5
  68. package/dist/{chunk-OLU5L3VB.js → chunk-5IPXL33D.js} +1 -1
  69. package/dist/{chunk-O7N2FQBH.js → chunk-5JQQ5IQC.js} +4 -4
  70. package/dist/{chunk-AO5BRDKS.js → chunk-5NFHLMY3.js} +100 -18
  71. package/dist/{chunk-RYBTDSQF.js → chunk-5QP7DVQF.js} +1 -1
  72. package/dist/{chunk-AYM7IBC5.js → chunk-5YJSZFZ6.js} +1 -1
  73. package/dist/{chunk-XO66RJJC.js → chunk-636GZ42G.js} +5 -5
  74. package/dist/{chunk-PS4AKK26.js → chunk-6EZY7IXB.js} +1 -1
  75. package/dist/{chunk-NXHIWGOL.js → chunk-6JKADQJT.js} +9 -9
  76. package/dist/{chunk-QNOXMVIX.js → chunk-6ONF5BPB.js} +6 -6
  77. package/dist/{chunk-VECF23YI.js → chunk-6U62H4ZX.js} +4 -4
  78. package/dist/{chunk-YMJCE2TD.js → chunk-6YBJ6E5F.js} +2 -2
  79. package/dist/{chunk-LXHH33MX.js → chunk-AJ6Q42KT.js} +3 -3
  80. package/dist/{chunk-LXZ6APGN.js → chunk-BLVTNQZV.js} +3 -3
  81. package/dist/{chunk-52CIHAC2.js → chunk-BXAVWEE4.js} +6 -6
  82. package/dist/{chunk-TYGNPI7L.js → chunk-CH7WFVC5.js} +1 -1
  83. package/dist/{chunk-DRY5YWUK.js → chunk-CMQCKXCF.js} +2 -2
  84. package/dist/{chunk-EU6NQQNG.js → chunk-D4BHK52K.js} +2 -2
  85. package/dist/{chunk-2NHK4PUR.js → chunk-D7YLLAMU.js} +6 -6
  86. package/dist/{chunk-E2CY63WZ.js → chunk-DFTVEK72.js} +5 -5
  87. package/dist/{chunk-ZKZL4EFA.js → chunk-EJJBM4OB.js} +1 -1
  88. package/dist/{chunk-ZUU4I2RK.js → chunk-EPNYDS4H.js} +1 -1
  89. package/dist/{chunk-5X7XEJTI.js → chunk-ERVXMMGO.js} +2 -2
  90. package/dist/{chunk-URZAPVR6.js → chunk-G3HAAQ65.js} +8 -8
  91. package/dist/{chunk-L7BHOFTF.js → chunk-GZAU5W3K.js} +3 -3
  92. package/dist/{chunk-3JU27SD5.js → chunk-HMMVGDL3.js} +10 -4
  93. package/dist/{chunk-Z7OTSKAT.js → chunk-HNHRPMND.js} +6 -6
  94. package/dist/{chunk-EXM3ZEUU.js → chunk-HTOPPHMO.js} +9 -9
  95. package/dist/{chunk-KZFNXNFH.js → chunk-IC5BBT2K.js} +1 -1
  96. package/dist/{chunk-FYBS4VRT.js → chunk-IYOA3NWO.js} +1 -1
  97. package/dist/{chunk-JLVVFGYN.js → chunk-IYYWAP6P.js} +4 -4
  98. package/dist/{chunk-Z2RVYQON.js → chunk-KFSWRIH2.js} +9 -9
  99. package/dist/{chunk-GYIISS2S.js → chunk-KVLAC4FS.js} +7 -7
  100. package/dist/{chunk-2PQY4TMQ.js → chunk-M7O33GTP.js} +3 -3
  101. package/dist/{chunk-SIT46O4V.js → chunk-MAPYE7MM.js} +10 -10
  102. package/dist/{chunk-KOJJ2LPJ.js → chunk-MIO242ZB.js} +5 -5
  103. package/dist/{chunk-L3BX56Y4.js → chunk-MLJ5Q7GF.js} +3 -3
  104. package/dist/{chunk-6OJ7XVBR.js → chunk-N3TX5LLG.js} +3 -3
  105. package/dist/{chunk-HYZAL77U.js → chunk-OPRRDN5R.js} +7 -7
  106. package/dist/{chunk-QUXD5OW3.js → chunk-ORV2JLNH.js} +3 -3
  107. package/dist/{chunk-5O4MW5YS.js → chunk-PEUODRKS.js} +4 -2
  108. package/dist/{chunk-BDJNHQFA.js → chunk-PY3VOJQY.js} +4 -4
  109. package/dist/{chunk-JFZPMVEC.js → chunk-QOWEXH34.js} +2 -2
  110. package/dist/{chunk-YUG7PCPJ.js → chunk-QQLYMBKM.js} +2 -2
  111. package/dist/{chunk-UFAIL7YE.js → chunk-RDO4NPVU.js} +2 -2
  112. package/dist/{chunk-I5C35DE5.js → chunk-RE6TWTNY.js} +3 -3
  113. package/dist/{chunk-OESNI7XN.js → chunk-RL5LF7JZ.js} +4 -4
  114. package/dist/{chunk-2IBCLVJK.js → chunk-SN3FCBME.js} +2 -2
  115. package/dist/{chunk-O5IRXMPV.js → chunk-SRIFCDTY.js} +1 -1
  116. package/dist/{chunk-FZQHKRQF.js → chunk-SSQIYK3H.js} +11 -11
  117. package/dist/{chunk-TKGCDWPF.js → chunk-T776F2FQ.js} +2 -2
  118. package/dist/{chunk-4OSTVMM5.js → chunk-TCBWYRFJ.js} +18 -18
  119. package/dist/{chunk-VRNGMRJA.js → chunk-TFMIG3VP.js} +1 -1
  120. package/dist/{chunk-5DSFBND4.js → chunk-TP47JHGJ.js} +1 -1
  121. package/dist/chunk-UHB4VYDB.js +92 -0
  122. package/dist/{chunk-OCHXKVIN.js → chunk-UVNH4UGJ.js} +1 -1
  123. package/dist/{chunk-7P7ZKS2G.js → chunk-UXQVXB7Q.js} +1 -1
  124. package/dist/{chunk-GBKMTVG6.js → chunk-UYAKT6PO.js} +2 -2
  125. package/dist/{chunk-AKAZRQLA.js → chunk-V3PMKMAO.js} +4 -4
  126. package/dist/{chunk-J3JG5EKP.js → chunk-V4R37DFH.js} +4 -4
  127. package/dist/{chunk-PDVGAU7A.js → chunk-V6OR4WLF.js} +8 -8
  128. package/dist/{chunk-WA5RGLKV.js → chunk-VD57H3ZU.js} +2 -2
  129. package/dist/{chunk-6D35FDXC.js → chunk-VEE2MRUN.js} +1 -1
  130. package/dist/{chunk-7IG54T3H.js → chunk-VH5DPURH.js} +1 -1
  131. package/dist/{chunk-LTB54XBS.js → chunk-W2RA43CP.js} +4 -4
  132. package/dist/{chunk-D35DKI3E.js → chunk-WEKGOHW7.js} +5 -5
  133. package/dist/{chunk-FWYOB3LW.js → chunk-WNCTMTMG.js} +1 -1
  134. package/dist/{chunk-UQTQ6HPO.js → chunk-YJHBDJIW.js} +2 -0
  135. package/dist/{chunk-XF25RJEV.js → chunk-YLMBNJWN.js} +3 -3
  136. package/dist/{chunk-6UICFJRW.js → chunk-YLZRG4U5.js} +1 -1
  137. package/dist/{chunk-IYY7KRNS.js → chunk-ZDROZABP.js} +4 -4
  138. package/dist/{chunk-HKL7HXFD.js → chunk-ZGS5TMMV.js} +3 -3
  139. package/dist/{chunk-QBPBNFDI.js → chunk-ZWQPUXSS.js} +5 -5
  140. package/dist/{codex-app-cards-switch-5B67TNLS.js → codex-app-cards-switch-ZG2FTLRZ.js} +14 -13
  141. package/dist/{codex-card-routing-3HSUBI6U.js → codex-card-routing-CJZT26VA.js} +2 -2
  142. package/dist/{codex-desktop-launch-GG5K77QD.js → codex-desktop-launch-LOTQ6MPR.js} +1 -1
  143. package/dist/{codex-session-launch-XR46HRYK.js → codex-session-launch-WSIQVGRM.js} +22 -22
  144. package/dist/{config-K7JUY27J.js → config-2AGOCKSO.js} +4 -4
  145. package/dist/{global-upgrade-R24VOCK7.js → global-upgrade-OG6RLR36.js} +10 -10
  146. package/dist/{identity-IMSNZJZL.js → identity-57VX4O7Z.js} +6 -5
  147. package/dist/{live-capabilities-BBUGAZJV.js → live-capabilities-6SRTZJ5A.js} +6 -5
  148. package/dist/{paths-HGLMPFAG.js → paths-M47UHTQ4.js} +5 -4
  149. package/dist/reapply-DBIFSOQN.js +70 -0
  150. package/dist/src/index.d.ts +1 -0
  151. package/dist/src/index.js +37 -37
  152. package/dist/{upgrade-lock-FML33CIQ.js → upgrade-lock-EIPMFXKR.js} +6 -5
  153. package/dist/usage-YSVHDBHO.js +11 -0
  154. package/package.json +1 -1
  155. package/dist/chunk-LV575VQE.js +0 -62
  156. package/dist/reapply-SYNZ2IZY.js +0 -70
  157. package/dist/usage-QMQZCRF2.js +0 -11
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-ZKZL4EFA.js";
3
+ } from "./chunk-EJJBM4OB.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-O5IRXMPV.js";
6
+ } from "./chunk-SRIFCDTY.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-BWOQACK7.js";
19
+ } from "./chunk-25CMVBTJ.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-3JU27SD5.js";
25
+ } from "./chunk-HMMVGDL3.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,3 +1,6 @@
1
+ import {
2
+ EXIT
3
+ } from "./chunk-BG4HHB7E.js";
1
4
  import {
2
5
  CLI_PACKAGE_NAMES,
3
6
  LATEST_DIST_TAG,
@@ -9,21 +12,23 @@ import {
9
12
  globalInstallTarget,
10
13
  globalPackageFolder,
11
14
  globalRootFor,
15
+ isKnownReleaseVersion,
12
16
  isNewerVersion,
13
17
  isReleaseVersion,
14
18
  ownPackageName
15
- } from "./chunk-UQTQ6HPO.js";
19
+ } from "./chunk-YJHBDJIW.js";
16
20
  import {
17
21
  redactSecretsFromContent
18
- } from "./chunk-3JU27SD5.js";
22
+ } from "./chunk-HMMVGDL3.js";
19
23
 
20
24
  // src/shell-quote.ts
21
25
  var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
22
26
 
23
27
  // src/npm.ts
24
28
  import { promisify } from "util";
25
- import { exec, execFile, execFileSync, execSync } from "child_process";
29
+ import { exec, execFile, execFileSync, execSync, spawn } from "child_process";
26
30
  import { existsSync, readFileSync, readlinkSync, realpathSync } from "fs";
31
+ import { constants as osConstants } from "os";
27
32
  import { dirname, isAbsolute, join, relative, resolve, win32 } from "path";
28
33
  var latestReleaseUrl = (packageName) => `https://registry.npmjs.org/${packageName}/latest`;
29
34
  var REGISTRY_TIMEOUT_MS = 5e3;
@@ -397,6 +402,20 @@ var fetchLatestPublishedVersion = async (request) => {
397
402
  return void 0;
398
403
  }
399
404
  };
405
+ var NpmBudgetSpentError = class extends Error {
406
+ constructor() {
407
+ super("npm took longer than this command allows");
408
+ }
409
+ };
410
+ var remainingTimeoutMs = (requested, remainingMs) => typeof requested === "number" && requested > 0 ? Math.min(requested, remainingMs) : remainingMs;
411
+ var npmRunnerWithin = (budgetMs, runNpm = execNpm, now = Date.now) => {
412
+ const deadline = now() + budgetMs;
413
+ return (args, options) => {
414
+ const remainingMs = deadline - now();
415
+ if (remainingMs <= 0) throw new NpmBudgetSpentError();
416
+ return runNpm(args, { ...options, timeout: remainingTimeoutMs(options.timeout, remainingMs) });
417
+ };
418
+ };
400
419
  var POSIX_SHELL_WORD = /^[\w@%+=:,./-]+$/;
401
420
  var quoteForPosixShell = (value) => POSIX_SHELL_WORD.test(value) ? value : `'${value.replaceAll("'", `'\\''`)}'`;
402
421
  var prefixFlagOf = (request) => request.prefix === void 0 ? "" : ` --prefix ${quoteForPosixShell(request.prefix)}`;
@@ -479,6 +498,56 @@ var newestReleaseNpmAllows = (target, installed, published, runNpm = execNpm) =>
479
498
  }
480
499
  };
481
500
  var describeReleaseNpmHolds = (published) => `${published} is not yet allowed by this machine's npm settings, such as min-release-age`;
501
+ var NPM_RELEASE_AGE_SETTINGS_QUERY = "config get min-release-age before --global --no-workspaces";
502
+ var MIN_RELEASE_AGE_SETTING = "min-release-age";
503
+ var BEFORE_SETTING = "before";
504
+ var UNSET_SETTING_VALUES = /* @__PURE__ */ new Set(["", "null", "undefined"]);
505
+ var NO_RELEASE_AGE_RULE = { kind: "none" };
506
+ var UNREADABLE_RELEASE_AGE_RULE = { kind: "unreadable" };
507
+ var npmSettingIn = (output, setting) => {
508
+ const line = output.split(/\r?\n/).map((text) => text.trim()).find((text) => text.startsWith(`${setting}=`));
509
+ const value = line?.slice(setting.length + 1).trim();
510
+ return value === void 0 || UNSET_SETTING_VALUES.has(value) ? void 0 : value;
511
+ };
512
+ var minReleaseAgeDaysIn = (output) => {
513
+ const days = Number(npmSettingIn(output, MIN_RELEASE_AGE_SETTING));
514
+ return Number.isFinite(days) && days > 0 ? days : void 0;
515
+ };
516
+ var npmReleaseAgeRuleIn = (output) => {
517
+ const days = minReleaseAgeDaysIn(output);
518
+ if (days !== void 0) return { kind: "min_release_age", days };
519
+ const cutoff = npmSettingIn(output, BEFORE_SETTING);
520
+ return cutoff === void 0 ? NO_RELEASE_AGE_RULE : { kind: "before", cutoff };
521
+ };
522
+ var readNpmReleaseAgeRule = (runNpm = execNpm) => {
523
+ try {
524
+ return npmReleaseAgeRuleIn(npmOutputText(runNpm(NPM_RELEASE_AGE_SETTINGS_QUERY, { timeout: DISCOVERY_TIMEOUT_MS })));
525
+ } catch {
526
+ return UNREADABLE_RELEASE_AGE_RULE;
527
+ }
528
+ };
529
+ var npmHoldsReleasesBack = (rule) => rule.kind === "min_release_age" || rule.kind === "before";
530
+ var NPM_NOT_STARTED = { kind: "not_started" };
531
+ var SIGNALLED_EXIT_BASE = 128;
532
+ var exitCodeOfNpm = (code, signal) => code ?? (signal === null ? EXIT.FAILED : SIGNALLED_EXIT_BASE + osConstants.signals[signal]);
533
+ var npmLaunchFor = (args, platform) => platform === "win32" ? { command: ["npm", ...args.map((arg) => quoteIfNeeded(arg, platform))].join(" "), args: [], shell: true } : { command: "npm", args, shell: false };
534
+ var spellingOf = (name) => name.toLowerCase();
535
+ var npmTerminalEnvironment = (inherited, overrides) => {
536
+ const overridden = new Set(Object.keys(overrides).map(spellingOf));
537
+ const kept = Object.entries(inherited).filter(([name]) => !overridden.has(spellingOf(name)));
538
+ return { ...Object.fromEntries(kept), ...overrides };
539
+ };
540
+ var runNpmInTerminal = (command) => new Promise((resolve2) => {
541
+ const launch = npmLaunchFor(command.args, process.platform);
542
+ const child = spawn(launch.command, [...launch.args], {
543
+ stdio: "inherit",
544
+ env: npmTerminalEnvironment(cleanNpmEnv(), command.env),
545
+ shell: launch.shell,
546
+ windowsHide: true
547
+ });
548
+ child.once("error", () => resolve2(NPM_NOT_STARTED));
549
+ child.once("exit", (code, signal) => resolve2({ kind: "exited", code: exitCodeOfNpm(code, signal) }));
550
+ });
482
551
  var needsGlobalInstall = (requested, installed, binaryPresent) => requested !== installed || !binaryPresent;
483
552
  var setupWouldDowngrade = (requested, installed) => installed !== void 0 && isReleaseVersion(installed) && isReleaseVersion(requested) && isNewerVersion(installed, requested);
484
553
  var planGlobalInstall = (platform) => {
@@ -491,10 +560,21 @@ var installedVersionOf = (prefix, name, platform) => {
491
560
  const folder = readGlobalFolder(globalRootFor(prefix, platform), name, platform);
492
561
  return folder.kind === "ours" ? folder.installed.version : void 0;
493
562
  };
563
+ var readPlannedSetupInstall = (platform = process.platform) => {
564
+ const { prefix, packageName } = planGlobalInstall(platform);
565
+ if (prefix === void 0) return { prefix, packageName, installedVersion: void 0, binsPresent: false };
566
+ return {
567
+ prefix,
568
+ packageName,
569
+ installedVersion: installedVersionOf(prefix, packageName, platform),
570
+ binsPresent: globalPackageBinsPresent(packageName, prefix, platform)
571
+ };
572
+ };
573
+ var setupNeedsGlobalInstall = (version, planned) => planned.prefix === void 0 || needsGlobalInstall(version, planned.installedVersion, planned.binsPresent);
494
574
  var asCachedResult = (result) => result === "installed" ? "cached" : result;
495
575
  var installState;
496
576
  var installGlobally = (options) => {
497
- if (!isReleaseVersion(options.version) || options.version === "0.0.0") {
577
+ if (!isKnownReleaseVersion(options.version)) {
498
578
  return Promise.reject(new NpmInstallError("Setup requires a known release version. Run an official versioned release; no global package was installed."));
499
579
  }
500
580
  if (installState) {
@@ -502,25 +582,19 @@ var installGlobally = (options) => {
502
582
  }
503
583
  const started = (async () => {
504
584
  if (!npmIsOnPath()) throw new NpmMissingError();
505
- const { withUpgradeLock } = await import("./global-upgrade-R24VOCK7.js");
506
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-FML33CIQ.js");
507
- const { autoUpdateLock } = await import("./paths-HGLMPFAG.js");
585
+ const { withUpgradeLock } = await import("./global-upgrade-OG6RLR36.js");
586
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-EIPMFXKR.js");
587
+ const { autoUpdateLock } = await import("./paths-M47UHTQ4.js");
508
588
  let result = "skipped";
509
589
  const install = async () => {
510
- const platform = process.platform;
511
- const { prefix, packageName } = planGlobalInstall(platform);
512
- const installed = prefix === void 0 ? void 0 : installedVersionOf(prefix, packageName, platform);
513
- if (setupWouldDowngrade(options.version, installed)) {
514
- throw new NpmInstallError(`Setup ${options.version} is older than the installed ${packageName} ${installed}. Run setup from the installed version or a newer policy-eligible release; Pushary did not downgrade the runtime.`);
590
+ const planned = readPlannedSetupInstall(process.platform);
591
+ if (setupWouldDowngrade(options.version, planned.installedVersion)) {
592
+ throw new NpmInstallError(`Setup ${options.version} is older than the installed ${planned.packageName} ${planned.installedVersion}. Run setup from the installed version or a newer policy-eligible release; Pushary did not downgrade the runtime.`);
515
593
  }
516
- if (prefix !== void 0 && !needsGlobalInstall(
517
- options.version,
518
- installed,
519
- globalPackageBinsPresent(packageName, prefix, platform)
520
- )) {
594
+ if (!setupNeedsGlobalInstall(options.version, planned)) {
521
595
  return;
522
596
  }
523
- installWithUpgradeLock({ packageName, version: options.version, timeoutMs: options.timeoutMs ?? 12e4 }, options.lockPath);
597
+ installWithUpgradeLock({ packageName: planned.packageName, version: options.version, timeoutMs: options.timeoutMs ?? 12e4 }, options.lockPath);
524
598
  result = "installed";
525
599
  };
526
600
  if (ownsUpgradeLock(options.lockPath ?? autoUpdateLock())) {
@@ -585,10 +659,18 @@ export {
585
659
  resolveGlobalBinDir,
586
660
  quoteIfNeeded,
587
661
  fetchLatestPublishedVersion,
662
+ npmRunnerWithin,
588
663
  installPackageGlobally,
589
664
  throwIfNpmRefusesInstall,
665
+ chosenRelease,
590
666
  newestReleaseNpmAllows,
591
667
  describeReleaseNpmHolds,
668
+ readNpmReleaseAgeRule,
669
+ npmHoldsReleasesBack,
670
+ runNpmInTerminal,
671
+ setupWouldDowngrade,
592
672
  plannedGlobalPackage,
673
+ readPlannedSetupInstall,
674
+ setupNeedsGlobalInstall,
593
675
  installGlobally
594
676
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactSecretsFromContent
3
- } from "./chunk-3JU27SD5.js";
3
+ } from "./chunk-HMMVGDL3.js";
4
4
 
5
5
  // src/cli/terminal-row.ts
6
6
  var visibleLength = (text) => text.replace(/\x1b\[[0-9;]*m/g, "").length;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-BWOQACK7.js";
3
+ } from "./chunk-25CMVBTJ.js";
4
4
  import {
5
5
  writeFileAtomic
6
6
  } from "./chunk-PM2NRK6Y.js";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-OYIN77HO.js";
6
6
  import {
7
7
  readMacAppAgentKey
8
- } from "./chunk-LTB54XBS.js";
8
+ } from "./chunk-W2RA43CP.js";
9
9
  import {
10
10
  API_KEYS_PATH
11
- } from "./chunk-WA5RGLKV.js";
11
+ } from "./chunk-VD57H3ZU.js";
12
12
  import {
13
13
  absoluteUrl
14
- } from "./chunk-L7BHOFTF.js";
14
+ } from "./chunk-GZAU5W3K.js";
15
15
  import {
16
16
  findExportedKeyLines,
17
17
  isAdoptedMacAppKey,
@@ -21,10 +21,10 @@ import {
21
21
  readConfigFileKey,
22
22
  readKeySource,
23
23
  readMacAppKeyPrefix
24
- } from "./chunk-LXZ6APGN.js";
24
+ } from "./chunk-BLVTNQZV.js";
25
25
  import {
26
26
  isValidApiKey
27
- } from "./chunk-3JU27SD5.js";
27
+ } from "./chunk-HMMVGDL3.js";
28
28
 
29
29
  // src/cli/held-key-revocation.ts
30
30
  var readCliHeldKeys = (profiles) => {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  RETRY_ACK,
6
6
  refusedReceiptMessage
7
- } from "./chunk-OLU5L3VB.js";
7
+ } from "./chunk-5IPXL33D.js";
8
8
 
9
9
  // src/command-receipts.ts
10
10
  import { randomUUID } from "crypto";
@@ -6,38 +6,38 @@ import {
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "./chunk-5O4MW5YS.js";
9
+ } from "./chunk-PEUODRKS.js";
10
10
  import {
11
11
  CommandReceipts,
12
12
  controllerCommandSchema
13
- } from "./chunk-PS4AKK26.js";
13
+ } from "./chunk-6EZY7IXB.js";
14
14
  import {
15
15
  SESSION_IDLE_TIMEOUT_MS,
16
16
  describeIdleWindow,
17
17
  idleDeadlinePassed,
18
18
  startProcessOwnership
19
- } from "./chunk-EU6NQQNG.js";
19
+ } from "./chunk-D4BHK52K.js";
20
20
  import {
21
21
  spawnClaude
22
- } from "./chunk-VRNGMRJA.js";
22
+ } from "./chunk-TFMIG3VP.js";
23
23
  import {
24
24
  isAskUserResponse,
25
25
  isDecisionStopped,
26
26
  isWaitForAnswerResponse,
27
27
  withdrawQuestion,
28
28
  writeDegraded
29
- } from "./chunk-2NHK4PUR.js";
29
+ } from "./chunk-D7YLLAMU.js";
30
30
  import {
31
31
  readCommandAck
32
- } from "./chunk-OLU5L3VB.js";
32
+ } from "./chunk-5IPXL33D.js";
33
33
  import {
34
34
  callMcpTool,
35
35
  isRetryable
36
- } from "./chunk-KOJJ2LPJ.js";
36
+ } from "./chunk-MIO242ZB.js";
37
37
  import {
38
38
  projectNameFor,
39
39
  repositoryScopeFor
40
- } from "./chunk-7IG54T3H.js";
40
+ } from "./chunk-VH5DPURH.js";
41
41
  import {
42
42
  AGENT_QUESTION_DESCRIPTION_MAX,
43
43
  AGENT_QUESTION_HEADER_MAX,
@@ -58,7 +58,7 @@ import {
58
58
  parseCodexQuestions,
59
59
  planElicitationAsk,
60
60
  readElicitationFields
61
- } from "./chunk-3JU27SD5.js";
61
+ } from "./chunk-HMMVGDL3.js";
62
62
 
63
63
  // src/codex-question-owner.ts
64
64
  import { createHash } from "crypto";
@@ -3,27 +3,27 @@ import {
3
3
  expectedLaunchCapabilities,
4
4
  hasSpawnProvider,
5
5
  resolveControlPolicy
6
- } from "./chunk-LXHH33MX.js";
6
+ } from "./chunk-AJ6Q42KT.js";
7
7
  import {
8
8
  daemonHasRemoteProof,
9
9
  daemonServiceManagerAvailable,
10
10
  hasDaemonServiceDefinition,
11
11
  readDaemonNeedsLogin,
12
12
  readDaemonStatus
13
- } from "./chunk-PDVGAU7A.js";
13
+ } from "./chunk-V6OR4WLF.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-AYM7IBC5.js";
16
+ } from "./chunk-5YJSZFZ6.js";
17
17
  import {
18
18
  readControlMode,
19
19
  readKeySource
20
- } from "./chunk-LXZ6APGN.js";
20
+ } from "./chunk-BLVTNQZV.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-KZFNXNFH.js";
23
+ } from "./chunk-IC5BBT2K.js";
24
24
  import {
25
25
  getPackageVersion
26
- } from "./chunk-UQTQ6HPO.js";
26
+ } from "./chunk-YJHBDJIW.js";
27
27
 
28
28
  // src/machines.ts
29
29
  import { hostname } from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  UNNAMED_ACTION
3
- } from "./chunk-3JNBZF4G.js";
3
+ } from "./chunk-3ULFLONL.js";
4
4
  import {
5
5
  ASK_USER_TIMEOUT_MS,
6
6
  WAIT_END_TIMEOUT_MS,
@@ -10,10 +10,10 @@ import {
10
10
  isLocalQuestionHandoff,
11
11
  unavailableQuestionUnlessRefused,
12
12
  waitForQuestion
13
- } from "./chunk-2NHK4PUR.js";
13
+ } from "./chunk-D7YLLAMU.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-AYM7IBC5.js";
16
+ } from "./chunk-5YJSZFZ6.js";
17
17
  import {
18
18
  hookMaxWaitSeconds,
19
19
  hookWaitClamped,
@@ -21,7 +21,7 @@ import {
21
21
  refusesWhenUnanswered,
22
22
  ruleApprovesAfterItsFullWindow,
23
23
  scopeBreachReasonOf
24
- } from "./chunk-3JU27SD5.js";
24
+ } from "./chunk-HMMVGDL3.js";
25
25
 
26
26
  // src/pushed-question.ts
27
27
  var scopeQuestionOf = (verdict) => {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  callDecisionStore,
3
3
  identifyingToolInput
4
- } from "./chunk-TBQT2TA6.js";
4
+ } from "./chunk-3QDILGKG.js";
5
5
  import {
6
6
  canonicalJson
7
- } from "./chunk-BWOQACK7.js";
7
+ } from "./chunk-25CMVBTJ.js";
8
8
 
9
9
  // src/phone-approval.ts
10
10
  import { createHash } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-DRY5YWUK.js";
3
+ } from "./chunk-CMQCKXCF.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-TCE3J44Z.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolvePackageVersionFromBinary,
13
13
  resolvePathBinary,
14
14
  resolvePathBinaryAsync
15
- } from "./chunk-AO5BRDKS.js";
15
+ } from "./chunk-5NFHLMY3.js";
16
16
  import {
17
17
  AGENTS,
18
18
  CLAUDE_BRIDGE_CAPABILITY,
@@ -25,7 +25,7 @@ import {
25
25
  OPENCODE_BRIDGE_CAPABILITY,
26
26
  SPAWN_CAPABILITY,
27
27
  sessionProvidersAdvertisedBy
28
- } from "./chunk-3JU27SD5.js";
28
+ } from "./chunk-HMMVGDL3.js";
29
29
 
30
30
  // src/live-capabilities.ts
31
31
  import { execFileSync } from "child_process";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveInstallSourceFor
3
- } from "./chunk-GBKMTVG6.js";
3
+ } from "./chunk-UYAKT6PO.js";
4
4
  import {
5
5
  configFilePath
6
- } from "./chunk-KZFNXNFH.js";
6
+ } from "./chunk-IC5BBT2K.js";
7
7
  import {
8
8
  backupFile,
9
9
  backupFileInto,
@@ -15,7 +15,7 @@ import {
15
15
  API_KEY_PREFIX_PATTERN,
16
16
  isRecord,
17
17
  isValidApiKey
18
- } from "./chunk-3JU27SD5.js";
18
+ } from "./chunk-HMMVGDL3.js";
19
19
 
20
20
  // src/shell-alias.ts
21
21
  import { homedir } from "os";
@@ -14,7 +14,7 @@ import {
14
14
  reachVerdict,
15
15
  reachesYou,
16
16
  verifyDelivery
17
- } from "./chunk-QJF5I7NR.js";
17
+ } from "./chunk-44SARVA4.js";
18
18
  import {
19
19
  describeRevokeAttempt,
20
20
  keyNoLongerAccepted,
@@ -29,20 +29,20 @@ import {
29
29
  isCI,
30
30
  terminalColumns,
31
31
  useColor
32
- } from "./chunk-RYBTDSQF.js";
32
+ } from "./chunk-5QP7DVQF.js";
33
33
  import {
34
34
  checkApiKey
35
- } from "./chunk-L7BHOFTF.js";
35
+ } from "./chunk-GZAU5W3K.js";
36
36
  import {
37
37
  reportedInstallSource
38
- } from "./chunk-GBKMTVG6.js";
38
+ } from "./chunk-UYAKT6PO.js";
39
39
  import {
40
40
  NPX_LATEST_COMMAND
41
- } from "./chunk-YUG7PCPJ.js";
41
+ } from "./chunk-QQLYMBKM.js";
42
42
  import {
43
43
  NO_PAIRING_COMPUTER,
44
44
  PAIR_TTL_SECONDS
45
- } from "./chunk-3JU27SD5.js";
45
+ } from "./chunk-HMMVGDL3.js";
46
46
 
47
47
  // src/onboarding.ts
48
48
  import qrcodeTerminal from "qrcode-terminal";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-LXZ6APGN.js";
3
+ } from "./chunk-BLVTNQZV.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-TCE3J44Z.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-AO5BRDKS.js";
6
+ } from "./chunk-5NFHLMY3.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-3JU27SD5.js";
9
+ } from "./chunk-HMMVGDL3.js";
10
10
 
11
11
  // src/setup/agent-probe.ts
12
12
  import { execSync } from "child_process";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-BWOQACK7.js";
3
+ } from "./chunk-25CMVBTJ.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-PM2NRK6Y.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-3JU27SD5.js";
9
+ } from "./chunk-HMMVGDL3.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -8,21 +8,21 @@ import {
8
8
  SubscriptionRequiredError,
9
9
  callMcpTool,
10
10
  isRetryable
11
- } from "./chunk-KOJJ2LPJ.js";
11
+ } from "./chunk-MIO242ZB.js";
12
12
  import {
13
13
  fetchAsCredential
14
- } from "./chunk-6D35FDXC.js";
14
+ } from "./chunk-VEE2MRUN.js";
15
15
  import {
16
16
  installNetworkDefaults,
17
17
  isNetworkFailure
18
- } from "./chunk-6NUEY2FT.js";
18
+ } from "./chunk-4BC4YDVL.js";
19
19
  import {
20
20
  clientReportClaims
21
- } from "./chunk-BWOQACK7.js";
21
+ } from "./chunk-25CMVBTJ.js";
22
22
  import {
23
23
  getApiKey,
24
24
  getBaseUrl
25
- } from "./chunk-KZFNXNFH.js";
25
+ } from "./chunk-IC5BBT2K.js";
26
26
  import {
27
27
  ASK_AGENT_NAME_MAX,
28
28
  CLIENT_REPORT_PATH,
@@ -37,7 +37,7 @@ import {
37
37
  isRecord,
38
38
  truncateLine,
39
39
  waitEndAnswered
40
- } from "./chunk-3JU27SD5.js";
40
+ } from "./chunk-HMMVGDL3.js";
41
41
 
42
42
  // src/api.ts
43
43
  import { randomUUID } from "crypto";
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-HKL7HXFD.js";
7
+ } from "./chunk-ZGS5TMMV.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-I5C35DE5.js";
10
+ } from "./chunk-RE6TWTNY.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-LXZ6APGN.js";
13
+ } from "./chunk-BLVTNQZV.js";
14
14
  import {
15
15
  CLINE_SERVER_NAME_TAKEN,
16
16
  CLINE_SETTINGS_REFUSALS,
@@ -32,10 +32,10 @@ import {
32
32
  withClinePusharyServer,
33
33
  withRefreshedClineKey,
34
34
  withoutClinePusharyServer
35
- } from "./chunk-BWOQACK7.js";
35
+ } from "./chunk-25CMVBTJ.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-AO5BRDKS.js";
38
+ } from "./chunk-5NFHLMY3.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-3JU27SD5.js";
12
+ } from "./chunk-HMMVGDL3.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-BG4HHB7E.js";
8
8
  import {
9
9
  redactSecretsFromContent
10
- } from "./chunk-3JU27SD5.js";
10
+ } from "./chunk-HMMVGDL3.js";
11
11
 
12
12
  // src/cli/json.ts
13
13
  var buildEnvelope = (command, version, data, errors = []) => ({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-BWOQACK7.js";
3
+ } from "./chunk-25CMVBTJ.js";
4
4
  import {
5
5
  readRegularJsonFile,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-3JU27SD5.js";
16
+ } from "./chunk-HMMVGDL3.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-QJF5I7NR.js";
3
+ } from "./chunk-44SARVA4.js";
4
4
  import {
5
5
  matchMacAccountStep,
6
6
  retryAgentCommand
7
- } from "./chunk-HKL7HXFD.js";
7
+ } from "./chunk-ZGS5TMMV.js";
8
8
  import {
9
9
  canChangeApprovalSettings
10
- } from "./chunk-WA5RGLKV.js";
11
- import {
12
- EXIT
13
- } from "./chunk-BG4HHB7E.js";
10
+ } from "./chunk-VD57H3ZU.js";
14
11
  import {
15
12
  NPX_LATEST_COMMAND,
16
13
  npmExecSetupCommandFor
17
- } from "./chunk-YUG7PCPJ.js";
14
+ } from "./chunk-QQLYMBKM.js";
15
+ import {
16
+ EXIT
17
+ } from "./chunk-BG4HHB7E.js";
18
18
  import {
19
19
  LATEST_DIST_TAG
20
- } from "./chunk-UQTQ6HPO.js";
20
+ } from "./chunk-YJHBDJIW.js";
21
21
 
22
22
  // src/setup/closing.ts
23
23
  var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";