@pushary/agent-hooks 1.9.162 → 1.9.164

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 (139) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{api-7NPCSUGY.js → api-D4SZ2E5J.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -28
  5. package/dist/bin/pushary-bell.js +11 -11
  6. package/dist/bin/pushary-calls.js +15 -15
  7. package/dist/bin/pushary-claude.js +27 -27
  8. package/dist/bin/pushary-clean.js +38 -38
  9. package/dist/bin/pushary-codex-bridge.js +23 -23
  10. package/dist/bin/pushary-codex-hook.js +36 -36
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +16 -16
  13. package/dist/bin/pushary-connect.js +34 -34
  14. package/dist/bin/pushary-cowork.js +5 -5
  15. package/dist/bin/pushary-daemon.js +45 -45
  16. package/dist/bin/pushary-disconnect.js +29 -29
  17. package/dist/bin/pushary-display-hook.js +6 -1
  18. package/dist/bin/pushary-doctor.js +46 -46
  19. package/dist/bin/pushary-elicitation-hook.js +28 -28
  20. package/dist/bin/pushary-gemini-bridge.js +17 -17
  21. package/dist/bin/pushary-gemini-hook.js +32 -32
  22. package/dist/bin/pushary-hook.js +36 -36
  23. package/dist/bin/pushary-login.js +22 -22
  24. package/dist/bin/pushary-logout.js +29 -29
  25. package/dist/bin/pushary-mcp.js +12 -12
  26. package/dist/bin/pushary-mode.js +16 -16
  27. package/dist/bin/pushary-notification-hook.js +27 -27
  28. package/dist/bin/pushary-opencode-hook.js +124 -75
  29. package/dist/bin/pushary-permission-denied-hook.js +36 -36
  30. package/dist/bin/pushary-permission-hook.js +36 -36
  31. package/dist/bin/pushary-post-hook.js +28 -28
  32. package/dist/bin/pushary-prompt-hook.js +27 -27
  33. package/dist/bin/pushary-session-end-hook.js +27 -27
  34. package/dist/bin/pushary-session-start-hook.js +38 -38
  35. package/dist/bin/pushary-setup.js +54 -54
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +35 -35
  38. package/dist/bin/pushary-stop-hook.js +27 -27
  39. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  40. package/dist/bin/pushary-suggestions.js +16 -16
  41. package/dist/bin/pushary-transcript-register.js +17 -17
  42. package/dist/bin/pushary-transcripts.js +25 -25
  43. package/dist/bin/pushary-upgrade.js +43 -43
  44. package/dist/bin/pushary-wait.js +16 -16
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-QKNHNDOY.js → chunk-2FLJZICI.js} +2 -2
  47. package/dist/{chunk-GJOHGES6.js → chunk-2J3IIFS3.js} +2 -2
  48. package/dist/{chunk-PIIKLAFY.js → chunk-2KZZZ4JK.js} +3 -3
  49. package/dist/{chunk-L44II2WD.js → chunk-3CLLJJJ2.js} +5 -5
  50. package/dist/{chunk-UBY7NJCU.js → chunk-3GWMSKFY.js} +18 -18
  51. package/dist/{chunk-4IBUBMMP.js → chunk-3I5IFXHF.js} +1 -1
  52. package/dist/{chunk-NX3Y36VY.js → chunk-5I34FSSW.js} +6 -6
  53. package/dist/{chunk-L6BMVCQQ.js → chunk-635I27L4.js} +3 -3
  54. package/dist/{chunk-VGLIGBAJ.js → chunk-67CGCPI4.js} +2 -2
  55. package/dist/{chunk-YPG3RXWO.js → chunk-6OBGKICP.js} +3 -3
  56. package/dist/{chunk-LGR7WXI5.js → chunk-6QLOTNO2.js} +2 -2
  57. package/dist/{chunk-RUAGEPUJ.js → chunk-6ZGXNEBA.js} +5 -5
  58. package/dist/{chunk-WCWWO5QL.js → chunk-7HXO72HS.js} +1 -1
  59. package/dist/{chunk-44DRCGP2.js → chunk-7JO3NNIQ.js} +2 -2
  60. package/dist/{chunk-AP26EU5H.js → chunk-7PMCRTPW.js} +3 -3
  61. package/dist/{chunk-ZWNFP4HZ.js → chunk-7TQXWAOZ.js} +1 -1
  62. package/dist/{chunk-V3TWYF32.js → chunk-7WHUMPWM.js} +1 -1
  63. package/dist/{chunk-LVRFOGQY.js → chunk-7X7ZTLIN.js} +11 -11
  64. package/dist/{chunk-72SYV43F.js → chunk-7YUKURRZ.js} +1 -1
  65. package/dist/{chunk-YUF3AYAP.js → chunk-A4IK6JTC.js} +4 -4
  66. package/dist/{chunk-X5QSIMXA.js → chunk-ANMVHKNK.js} +3 -3
  67. package/dist/{chunk-L3LFCZ5D.js → chunk-BFMILGSX.js} +3 -3
  68. package/dist/{chunk-I5ANEYUK.js → chunk-BOJWXETW.js} +1 -1
  69. package/dist/{chunk-FIR2MGSB.js → chunk-C2PGBMTH.js} +1 -1
  70. package/dist/{chunk-H7OY4AAT.js → chunk-D3KD7K3N.js} +4 -4
  71. package/dist/{chunk-SFYX32FX.js → chunk-DFGHHYS5.js} +4 -4
  72. package/dist/{chunk-UPCIKGWA.js → chunk-EANTIGY7.js} +1 -1
  73. package/dist/{chunk-4U3GYVIW.js → chunk-GNCFKXQS.js} +2 -2
  74. package/dist/{chunk-Z23SHFIC.js → chunk-I2FH4E6H.js} +2 -2
  75. package/dist/{chunk-I35XT5YY.js → chunk-I4BIOADS.js} +4 -4
  76. package/dist/{chunk-CWH4LBUW.js → chunk-IEENAYGT.js} +1 -1
  77. package/dist/{chunk-DSWUG4NV.js → chunk-IGBKHRCZ.js} +1 -1
  78. package/dist/{chunk-6QQUGYH6.js → chunk-ILBNQX44.js} +5 -5
  79. package/dist/{chunk-LQDIOUVU.js → chunk-ILGAR7DW.js} +134 -8
  80. package/dist/{chunk-BMOGTNLK.js → chunk-ITGM5QW4.js} +6 -6
  81. package/dist/{chunk-ZC42UG7B.js → chunk-JAE5ULC6.js} +5 -5
  82. package/dist/{chunk-5ZS73ZLX.js → chunk-JARCCL3M.js} +2 -2
  83. package/dist/{chunk-644AKJMN.js → chunk-JLGZGITL.js} +2 -2
  84. package/dist/{chunk-M74WT5NA.js → chunk-KYBVLSMT.js} +3 -3
  85. package/dist/{chunk-WWSR5LMP.js → chunk-L2NGVERQ.js} +1 -1
  86. package/dist/{chunk-CSDB5VTI.js → chunk-L4HJSUP7.js} +1 -1
  87. package/dist/{chunk-EKELMI3A.js → chunk-L54D5IIR.js} +24 -14
  88. package/dist/{chunk-XOSSXRIR.js → chunk-LDEZYH7Y.js} +10 -10
  89. package/dist/{chunk-RKURAOFK.js → chunk-LFS3PX7S.js} +4 -4
  90. package/dist/{chunk-JCTS7COD.js → chunk-LJSRMA5C.js} +5 -5
  91. package/dist/{chunk-TUXX7TKR.js → chunk-MN2FFBYE.js} +2 -2
  92. package/dist/{chunk-YEVRMDG7.js → chunk-MTB52RSH.js} +2 -2
  93. package/dist/{chunk-5TU26542.js → chunk-MYN6FNBS.js} +3 -3
  94. package/dist/{chunk-SKA3U7QI.js → chunk-NCZ7MLNW.js} +9 -9
  95. package/dist/{chunk-EPQTCF6A.js → chunk-NEGPZ3DO.js} +2 -2
  96. package/dist/{chunk-VUGF2OC7.js → chunk-NN2RZ2UB.js} +3 -3
  97. package/dist/{chunk-J6KDUXJF.js → chunk-NUHIGW7H.js} +1 -1
  98. package/dist/{chunk-AQKMKVAD.js → chunk-NXTAXFQS.js} +8 -8
  99. package/dist/{chunk-W3FE7GTH.js → chunk-NYCN3CCK.js} +1 -1
  100. package/dist/{chunk-IUXXEM4Q.js → chunk-OJRX6UVD.js} +7 -7
  101. package/dist/{chunk-U4LHE5DH.js → chunk-OPN6FWMG.js} +1 -1
  102. package/dist/{chunk-Y3ELKLNH.js → chunk-QV5HMBT4.js} +12 -12
  103. package/dist/{chunk-SVVZFXDX.js → chunk-R23ZNBJU.js} +6 -6
  104. package/dist/{chunk-ZT55PJSW.js → chunk-RN4Z5BQJ.js} +3 -3
  105. package/dist/{chunk-YH6EHCKQ.js → chunk-RZRBXDGN.js} +6 -6
  106. package/dist/{chunk-BHT76IIB.js → chunk-SIZBYHXW.js} +4 -4
  107. package/dist/{chunk-G5IL6C6S.js → chunk-TBDSTEO3.js} +3 -3
  108. package/dist/{chunk-SRSXZINE.js → chunk-TVXGBUOL.js} +1 -1
  109. package/dist/{chunk-A5DXHJVS.js → chunk-U6NNLBWJ.js} +5 -5
  110. package/dist/{chunk-OH2WAG47.js → chunk-UM4RAZPH.js} +1 -1
  111. package/dist/{chunk-I5HCOOAA.js → chunk-VDNKX5OF.js} +5 -5
  112. package/dist/{chunk-53IBMDX2.js → chunk-WIVLMIJ6.js} +4 -4
  113. package/dist/{chunk-SVWCMYR7.js → chunk-WTUQEQ54.js} +27 -13
  114. package/dist/{chunk-L6NG6EZS.js → chunk-X4YQCI5T.js} +1 -1
  115. package/dist/{chunk-G6M6YJK4.js → chunk-X6YYQZW7.js} +1 -1
  116. package/dist/{chunk-XIICM4TX.js → chunk-X7IIWYAG.js} +1 -1
  117. package/dist/{chunk-TMDCIVZ2.js → chunk-XRAUQWLP.js} +5 -5
  118. package/dist/{chunk-DAMTDSAE.js → chunk-Y3QV3VYX.js} +1 -1
  119. package/dist/{chunk-WIFMTEQI.js → chunk-YENSTBQI.js} +1 -1
  120. package/dist/{chunk-EFKJCBWA.js → chunk-YLR6QHCH.js} +6 -6
  121. package/dist/{chunk-SQ4RPZ6O.js → chunk-YORHQJ5M.js} +4 -4
  122. package/dist/{chunk-P4KAYIMX.js → chunk-YQ67XWMM.js} +4 -4
  123. package/dist/{chunk-2H7SDIM7.js → chunk-ZB5O3LKY.js} +1 -1
  124. package/dist/{chunk-M2ZGNZRS.js → chunk-ZEPOIQ4H.js} +9 -0
  125. package/dist/{chunk-HAOYL5JP.js → chunk-ZPFENH7C.js} +39 -9
  126. package/dist/{codex-app-cards-switch-PJEY3EU5.js → codex-app-cards-switch-BOIE5IZL.js} +11 -11
  127. package/dist/{codex-card-routing-MNAMCRPO.js → codex-card-routing-B2ZI4WRI.js} +2 -2
  128. package/dist/{codex-desktop-launch-AUNDRYOL.js → codex-desktop-launch-LBL2LPS7.js} +1 -1
  129. package/dist/{codex-session-launch-IZNSTT7N.js → codex-session-launch-7WVCWASC.js} +20 -20
  130. package/dist/{config-LG2RJO37.js → config-S53I5YNR.js} +3 -3
  131. package/dist/{global-upgrade-QE5Q3BYW.js → global-upgrade-ND726NHJ.js} +9 -9
  132. package/dist/{identity-3BT6LWOP.js → identity-3G66JTAR.js} +4 -4
  133. package/dist/{live-capabilities-IKTQBLVH.js → live-capabilities-76C2DKTY.js} +4 -4
  134. package/dist/{paths-VEUTZJOY.js → paths-O3CZR2BV.js} +3 -3
  135. package/dist/{reapply-BC2AF55M.js → reapply-TEATBGFG.js} +31 -31
  136. package/dist/src/index.js +35 -35
  137. package/dist/{upgrade-lock-NUGEPR75.js → upgrade-lock-PDCUHFRW.js} +6 -4
  138. package/dist/{usage-TEB5CX2Y.js → usage-DFCL7TQU.js} +3 -3
  139. package/package.json +1 -1
@@ -8,21 +8,21 @@ import {
8
8
  SubscriptionRequiredError,
9
9
  callMcpTool,
10
10
  isRetryable
11
- } from "./chunk-6QQUGYH6.js";
11
+ } from "./chunk-ILBNQX44.js";
12
12
  import {
13
13
  fetchAsCredential
14
- } from "./chunk-WIFMTEQI.js";
14
+ } from "./chunk-YENSTBQI.js";
15
15
  import {
16
16
  installNetworkDefaults,
17
17
  isNetworkFailure
18
- } from "./chunk-VUGF2OC7.js";
18
+ } from "./chunk-NN2RZ2UB.js";
19
19
  import {
20
20
  clientReportClaims
21
- } from "./chunk-TUXX7TKR.js";
21
+ } from "./chunk-MN2FFBYE.js";
22
22
  import {
23
23
  getApiKey,
24
24
  getBaseUrl
25
- } from "./chunk-DAMTDSAE.js";
25
+ } from "./chunk-Y3QV3VYX.js";
26
26
  import {
27
27
  ASK_AGENT_NAME_MAX,
28
28
  CLIENT_REPORT_PATH,
@@ -32,7 +32,7 @@ import {
32
32
  degradedLine,
33
33
  isDecisionStoppedReply,
34
34
  truncateLine
35
- } from "./chunk-M2ZGNZRS.js";
35
+ } from "./chunk-ZEPOIQ4H.js";
36
36
 
37
37
  // src/api.ts
38
38
  import { randomUUID } from "crypto";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  compatibleConfigFile,
3
3
  hasCompatibleHooks
4
- } from "./chunk-TMDCIVZ2.js";
4
+ } from "./chunk-XRAUQWLP.js";
5
5
  import {
6
6
  pusharyHookExecutable
7
- } from "./chunk-H7OY4AAT.js";
7
+ } from "./chunk-D3KD7K3N.js";
8
8
  import {
9
9
  isProtectedByScope,
10
10
  registerHookEntry
11
- } from "./chunk-TUXX7TKR.js";
11
+ } from "./chunk-MN2FFBYE.js";
12
12
  import {
13
13
  isRecord
14
- } from "./chunk-M2ZGNZRS.js";
14
+ } from "./chunk-ZEPOIQ4H.js";
15
15
 
16
16
  // src/cursor-config.ts
17
17
  var hookCommandOf = (entry) => {
@@ -536,8 +536,8 @@ var loadedOnce = (load) => {
536
536
  };
537
537
 
538
538
  // src/codex-desktop-proxy.ts
539
- var loadThePhone = () => import("./api-7NPCSUGY.js");
540
- var loadTheCardRouting = () => import("./codex-card-routing-MNAMCRPO.js");
539
+ var loadThePhone = () => import("./api-D4SZ2E5J.js");
540
+ var loadTheCardRouting = () => import("./codex-card-routing-B2ZI4WRI.js");
541
541
  var theFirstCardLoadsAgain = () => {
542
542
  };
543
543
  var ASKS_WITHOUT_ROUTING = {};
@@ -1097,7 +1097,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1097
1097
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1098
1098
  }
1099
1099
  if (args[0] === APP_CARDS_FLAG) {
1100
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-PJEY3EU5.js");
1100
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-BOIE5IZL.js");
1101
1101
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1102
1102
  }
1103
1103
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  shouldDeferToNativeMode
3
- } from "./chunk-M2ZGNZRS.js";
3
+ } from "./chunk-ZEPOIQ4H.js";
4
4
 
5
5
  // src/native-defer.ts
6
6
  var nativeDeferOptions = () => {
@@ -18,18 +18,18 @@ import {
18
18
  settingSnapshot,
19
19
  writeHermesSetting,
20
20
  writeSetupReceipt
21
- } from "./chunk-I35XT5YY.js";
21
+ } from "./chunk-I4BIOADS.js";
22
22
  import {
23
23
  OPENCLAW_MIN_VERSION,
24
24
  OPENCLAW_PLUGIN_ID,
25
25
  OPENCLAW_PLUGIN_PACKAGE
26
- } from "./chunk-X5QSIMXA.js";
26
+ } from "./chunk-ANMVHKNK.js";
27
27
  import {
28
28
  retryAgentCommand
29
- } from "./chunk-YPG3RXWO.js";
29
+ } from "./chunk-6OBGKICP.js";
30
30
  import {
31
31
  configFilePath
32
- } from "./chunk-DAMTDSAE.js";
32
+ } from "./chunk-Y3QV3VYX.js";
33
33
  import {
34
34
  readJsonSafe,
35
35
  writeJsonAtomic
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  readSetupOutcomeProperties,
39
39
  redactSecretsFromContent
40
- } from "./chunk-M2ZGNZRS.js";
40
+ } from "./chunk-ZEPOIQ4H.js";
41
41
 
42
42
  // src/hermes/shell-gate.ts
43
43
  var readHermesShellGate = async (launcher) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isFinalCommandAckRefusal
3
- } from "./chunk-M2ZGNZRS.js";
3
+ } from "./chunk-ZEPOIQ4H.js";
4
4
 
5
5
  // src/command-ack-outcome.ts
6
6
  var SETTLED_ACK = { outcome: "settled" };
@@ -4,13 +4,13 @@ import {
4
4
  configFailureKind,
5
5
  retryAgentCommand,
6
6
  writeSetupConfigFile
7
- } from "./chunk-YPG3RXWO.js";
7
+ } from "./chunk-6OBGKICP.js";
8
8
  import {
9
9
  MCP_BRIDGE_BINARY
10
- } from "./chunk-AP26EU5H.js";
10
+ } from "./chunk-7PMCRTPW.js";
11
11
  import {
12
12
  KEY_FILE_MODE
13
- } from "./chunk-M74WT5NA.js";
13
+ } from "./chunk-KYBVLSMT.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-TUXX7TKR.js";
35
+ } from "./chunk-MN2FFBYE.js";
36
36
  import {
37
37
  resolveGlobalBinary
38
- } from "./chunk-HAOYL5JP.js";
38
+ } from "./chunk-ZPFENH7C.js";
39
39
  import {
40
40
  readJsonSafe,
41
41
  writeFileAtomic,
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  notificationAnswerStep
3
- } from "./chunk-BMOGTNLK.js";
3
+ } from "./chunk-ITGM5QW4.js";
4
4
  import {
5
5
  matchMacAccountStep,
6
6
  retryAgentCommand
7
- } from "./chunk-YPG3RXWO.js";
7
+ } from "./chunk-6OBGKICP.js";
8
8
  import {
9
9
  canChangeApprovalSettings
10
- } from "./chunk-GJOHGES6.js";
10
+ } from "./chunk-2J3IIFS3.js";
11
11
  import {
12
12
  EXIT
13
13
  } from "./chunk-BG4HHB7E.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND,
16
16
  npmExecSetupCommandFor
17
- } from "./chunk-I5ANEYUK.js";
17
+ } from "./chunk-BOJWXETW.js";
18
18
  import {
19
19
  LATEST_DIST_TAG
20
20
  } from "./chunk-UQTQ6HPO.js";
@@ -3,10 +3,10 @@ import {
3
3
  forkFinishWithUpgradeLock,
4
4
  installWithUpgradeLock,
5
5
  releaseAutoUpdateLock
6
- } from "./chunk-LQDIOUVU.js";
6
+ } from "./chunk-ILGAR7DW.js";
7
7
  import {
8
8
  phoneStartIsRequired
9
- } from "./chunk-L3LFCZ5D.js";
9
+ } from "./chunk-BFMILGSX.js";
10
10
  import {
11
11
  describeAutoUpdateCheck,
12
12
  globalInstallLocation,
@@ -18,26 +18,27 @@ import {
18
18
  readAutoUpdateState,
19
19
  updateAutoUpdateState,
20
20
  upgradeEntryFor
21
- } from "./chunk-QKNHNDOY.js";
21
+ } from "./chunk-2FLJZICI.js";
22
22
  import {
23
23
  autoUpdateLock,
24
24
  autoUpdateLog,
25
25
  autoUpdateState
26
- } from "./chunk-TUXX7TKR.js";
26
+ } from "./chunk-MN2FFBYE.js";
27
27
  import {
28
28
  execNpm,
29
29
  fetchLatestPublishedVersion,
30
30
  npmErrorMessage,
31
+ npmExemptsFromReleaseAge,
31
32
  previewGlobalInstall,
32
33
  readGlobalCliInstallAt,
33
34
  readGlobalPrefix
34
- } from "./chunk-HAOYL5JP.js";
35
+ } from "./chunk-ZPFENH7C.js";
35
36
  import {
36
37
  EXIT
37
38
  } from "./chunk-BG4HHB7E.js";
38
39
  import {
39
40
  NPX_LATEST_COMMAND
40
- } from "./chunk-I5ANEYUK.js";
41
+ } from "./chunk-BOJWXETW.js";
41
42
  import {
42
43
  LATEST_DIST_TAG,
43
44
  commandsPackage,
@@ -187,16 +188,27 @@ var finishInstalledUpgrade = async (context, from, to, finishAttempts) => {
187
188
  };
188
189
  var settledFinishCheck = (state) => ({ result: "finish_blocked", from: state.from, to: state.to, detail: state.detail });
189
190
  var isInstallableRelease = (latest, installed) => latest !== void 0 && isNewerVersion(latest, installed) && isSameMajorVersion(latest, installed);
191
+ var releaseNpmInstalls = (request, resolved, published, runNpm) => isNewerVersion(published, resolved) && npmExemptsFromReleaseAge(request, runNpm) ? published : resolved;
192
+ var chosenRelease = (version) => ({ kind: "chosen", version });
190
193
  var releaseNpmAllows = (context, installed, published) => {
191
- if (!isInstallableRelease(published, installed)) return published;
192
- const preview = previewGlobalInstall({
194
+ if (published === void 0 || !isInstallableRelease(published, installed)) return chosenRelease(published);
195
+ const request = {
193
196
  packageName: context.location.packageName,
194
197
  version: LATEST_DIST_TAG,
195
198
  prefix: context.location.prefix,
196
199
  timeoutMs: INSTALL_TIMEOUT_MS
197
- }, context.runNpm);
198
- if (preview.kind === "resolved") return preview.version;
199
- return preview.kind === "refused_for_release_age" ? installed : published;
200
+ };
201
+ const preview = previewGlobalInstall(request, context.runNpm);
202
+ switch (preview.kind) {
203
+ case "resolved":
204
+ return chosenRelease(releaseNpmInstalls(request, preview.version, published, context.runNpm));
205
+ case "refused_for_release_age":
206
+ return chosenRelease(installed);
207
+ case "failed":
208
+ return { kind: "npm_failed", failure: preview.failure };
209
+ case "unavailable":
210
+ return chosenRelease(published);
211
+ }
200
212
  };
201
213
  var npmPolicyHoldDetail = (published, allowed) => published !== void 0 && published !== allowed && isNewerVersion(published, allowed) ? `${published} is not yet allowed by this machine's npm settings, such as min-release-age` : void 0;
202
214
  var checkAndInstall = async (context) => {
@@ -207,7 +219,9 @@ var checkAndInstall = async (context) => {
207
219
  const previous = readAutoUpdateState(context.statePath);
208
220
  const pendingFinish = hasRetryableUpgradeFinish(previous, installed);
209
221
  const published = await fetchLatestPublishedVersion({ packageName: context.location.packageName, fetchImpl: context.fetchImpl });
210
- const latest = releaseNpmAllows(context, installed, published);
222
+ const choice = releaseNpmAllows(context, installed, published);
223
+ if (choice.kind === "npm_failed") return { result: "failed", from: installed, to: published, detail: npmErrorMessage(choice.failure) };
224
+ const latest = choice.version;
211
225
  if (pendingFinish && !isInstallableRelease(latest, installed)) return finishInstalledUpgrade(context, previous.from, installed, nextFinishAttempt(previous, installed));
212
226
  if (hasSettledUpgradeFinish(previous, installed) && !isInstallableRelease(latest, installed)) return settledFinishCheck(previous);
213
227
  if (latest === void 0) return { result: "failed", from: installed, detail: UNREACHABLE_REGISTRY };
@@ -246,7 +260,7 @@ var runAutoUpdate = async (run = {}) => {
246
260
  const now = run.now ?? Date.now;
247
261
  const lockPath = run.lockPath ?? autoUpdateLock();
248
262
  const logPath = run.logPath ?? autoUpdateLog();
249
- const claim = await claimUpgradeLock({ lockPath });
263
+ const claim = await claimUpgradeLock({ lockPath, now, isAlive: run.isAlive, platform: run.platform, readProcessTable: run.readProcessTable });
250
264
  if (claim.kind === "unavailable") {
251
265
  const at = new Date(now()).toISOString();
252
266
  const state = recordAutoUpdateCheck(run.statePath ?? autoUpdateState(), { result: "failed", detail: claim.reason }, at);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOOK_HOLD_BUDGET_ENV,
3
3
  hookHoldBudgetProof
4
- } from "./chunk-M2ZGNZRS.js";
4
+ } from "./chunk-ZEPOIQ4H.js";
5
5
 
6
6
  // src/hold-budget.ts
7
7
  var takeHookHoldBudget = (args = process.argv.slice(2), env = process.env) => {
@@ -25,7 +25,7 @@ import {
25
25
  reportableSessionId,
26
26
  toToolLookup,
27
27
  truncateLine
28
- } from "./chunk-M2ZGNZRS.js";
28
+ } from "./chunk-ZEPOIQ4H.js";
29
29
 
30
30
  // ../hook-mapping/src/commit-receipt.ts
31
31
  var COMMIT_OUTPUT_MAX_LENGTH = 65536;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BG4HHB7E.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-I5ANEYUK.js";
6
+ } from "./chunk-BOJWXETW.js";
7
7
  import {
8
8
  getPackageVersion
9
9
  } from "./chunk-UQTQ6HPO.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  addGeminiMcpServer,
3
3
  removeGeminiMcpServer
4
- } from "./chunk-H7OY4AAT.js";
4
+ } from "./chunk-D3KD7K3N.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT
7
- } from "./chunk-Y3ELKLNH.js";
7
+ } from "./chunk-QV5HMBT4.js";
8
8
  import {
9
9
  compatibleToolLookup
10
- } from "./chunk-G6M6YJK4.js";
10
+ } from "./chunk-X6YYQZW7.js";
11
11
  import {
12
12
  CLAUDE_HOOK_EVENTS,
13
13
  PUSHARY_MCP_URL,
@@ -19,7 +19,7 @@ import {
19
19
  isPusharyHook,
20
20
  registerHookEntry,
21
21
  removeClaudeMcpServers
22
- } from "./chunk-TUXX7TKR.js";
22
+ } from "./chunk-MN2FFBYE.js";
23
23
  import {
24
24
  HOOK_COMPATIBLE_PROFILES,
25
25
  PHONE_ANSWERED_TOOLS,
@@ -30,7 +30,7 @@ import {
30
30
  pusharyMissingReason,
31
31
  refusalOutput,
32
32
  withHookHoldBudget
33
- } from "./chunk-M2ZGNZRS.js";
33
+ } from "./chunk-ZEPOIQ4H.js";
34
34
 
35
35
  // src/config-document.ts
36
36
  import { parse, stringify } from "smol-toml";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-I5ANEYUK.js";
3
+ } from "./chunk-BOJWXETW.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -5,7 +5,7 @@ import {
5
5
  MCP_CREDENTIAL_REJECTION_BODY,
6
6
  isRecord,
7
7
  responseRejectsCredential
8
- } from "./chunk-M2ZGNZRS.js";
8
+ } from "./chunk-ZEPOIQ4H.js";
9
9
 
10
10
  // src/credential-rejection.ts
11
11
  import { createHash, randomUUID } from "crypto";
@@ -4,19 +4,19 @@ import {
4
4
  } from "./chunk-Y6ILCLKE.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-DSWUG4NV.js";
7
+ } from "./chunk-IGBKHRCZ.js";
8
8
  import {
9
9
  readControlMode
10
- } from "./chunk-M74WT5NA.js";
10
+ } from "./chunk-KYBVLSMT.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-TUXX7TKR.js";
13
+ } from "./chunk-MN2FFBYE.js";
14
14
  import {
15
15
  resolveGlobalBinary
16
- } from "./chunk-HAOYL5JP.js";
16
+ } from "./chunk-ZPFENH7C.js";
17
17
  import {
18
18
  getApiKey
19
- } from "./chunk-DAMTDSAE.js";
19
+ } from "./chunk-Y3QV3VYX.js";
20
20
  import {
21
21
  readJsonSafe,
22
22
  writeFileAtomic,
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-UQTQ6HPO.js";
33
33
  import {
34
34
  isRecord
35
- } from "./chunk-M2ZGNZRS.js";
35
+ } from "./chunk-ZEPOIQ4H.js";
36
36
 
37
37
  // src/daemon-entry-guard.ts
38
38
  import { mkdirSync, readFileSync } from "fs";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  macAppBridgeAvailable
3
- } from "./chunk-NX3Y36VY.js";
3
+ } from "./chunk-5I34FSSW.js";
4
4
  import {
5
5
  keyPrefix
6
- } from "./chunk-M74WT5NA.js";
6
+ } from "./chunk-KYBVLSMT.js";
7
7
  import {
8
8
  bridgeAgentKey
9
- } from "./chunk-TUXX7TKR.js";
9
+ } from "./chunk-MN2FFBYE.js";
10
10
  import {
11
11
  readJsonSafe
12
12
  } from "./chunk-TODDEIYG.js";
13
13
  import {
14
14
  isRecord,
15
15
  isValidApiKey
16
- } from "./chunk-M2ZGNZRS.js";
16
+ } from "./chunk-ZEPOIQ4H.js";
17
17
 
18
18
  // src/shared-mcp-key.ts
19
19
  var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-H7OY4AAT.js";
3
+ } from "./chunk-D3KD7K3N.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-TUXX7TKR.js";
10
+ } from "./chunk-MN2FFBYE.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-HAOYL5JP.js";
14
+ } from "./chunk-ZPFENH7C.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-M2ZGNZRS.js";
24
+ } from "./chunk-ZEPOIQ4H.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -2,7 +2,7 @@ import {
2
2
  isApprovalMode,
3
3
  isRecord,
4
4
  isTimeoutAction
5
- } from "./chunk-M2ZGNZRS.js";
5
+ } from "./chunk-ZEPOIQ4H.js";
6
6
 
7
7
  // src/cli/settings-response.ts
8
8
  var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
@@ -77,6 +77,9 @@ var MAX_AGENT_QUESTION_OPTIONS = 4;
77
77
  var AGENT_QUESTION_HEADER_MAX = 40;
78
78
  var AGENT_QUESTION_OPTION_MAX = 100;
79
79
  var AGENT_QUESTION_DESCRIPTION_MAX = 500;
80
+ var MIN_ASK_SELECT_OPTIONS = 2;
81
+ var MAX_ASK_SELECT_OPTIONS = 6;
82
+ var fitsAPlainSelect = (question) => !question.multiSelect && question.options.length >= MIN_ASK_SELECT_OPTIONS && question.options.length <= MAX_ASK_SELECT_OPTIONS;
80
83
  var agentQuestionOptionIn = (raw) => {
81
84
  if (!isRecord(raw) || typeof raw.label !== "string" || raw.label.length === 0) return [];
82
85
  return [{
@@ -10087,7 +10090,11 @@ var PLAN_DECLINED_REASON = "Plan declined from the phone. Ask what to change bef
10087
10090
  var claudeStoppedPreToolUseOutput = (reason) => stoppedOutput(claudePreToolUseOutput("deny", reason), reason);
10088
10091
  var claudeStoppedPermissionRequestOutput = (reason) => stoppedOutput(claudePermissionRequestOutput("deny", reason), reason);
10089
10092
  var UNANSWERED_ASKS_BEFORE_PAUSE = 3;
10093
+ var UNPAUSABLE_ASK_TOOLS = /* @__PURE__ */ new Set([...ASKED_IN_EVERY_MODE, ...ELICITATION_EVENTS]);
10090
10094
  var CLAUDE_CODE_AGENT_TYPE = "claude_code";
10095
+ var HOOK_KILL_SECONDS_BY_AGENT_TYPE = {
10096
+ codex: HOOK_BUDGETS.codex.budgetSeconds
10097
+ };
10091
10098
  var SESSION_PAUSED_REASON = `Phone approvals for this session are paused because ${UNANSWERED_ASKS_BEFORE_PAUSE} of them went unanswered, so this was refused without asking anyone. A notification was sent to your phone: tap Approve on it to resume, then run this again.`;
10092
10099
  var unansweredRefusalReason = (paused) => paused ? SESSION_PAUSED_REASON : NO_RESPONSE_REASON;
10093
10100
  var UNHEARD_PUSH_WINDOW_DAYS = 14;
@@ -10270,9 +10277,11 @@ export {
10270
10277
  claudeWakeDecision,
10271
10278
  CLAUDE_WAKE_API,
10272
10279
  claudeWakeWaitingOn,
10280
+ MAX_AGENT_QUESTIONS,
10273
10281
  AGENT_QUESTION_HEADER_MAX,
10274
10282
  AGENT_QUESTION_OPTION_MAX,
10275
10283
  AGENT_QUESTION_DESCRIPTION_MAX,
10284
+ fitsAPlainSelect,
10276
10285
  parseAgentQuestions,
10277
10286
  isTypedAnswerQuestion,
10278
10287
  isAgentQuestionSet,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-UQTQ6HPO.js";
15
15
  import {
16
16
  redactSecretsFromContent
17
- } from "./chunk-M2ZGNZRS.js";
17
+ } from "./chunk-ZEPOIQ4H.js";
18
18
 
19
19
  // src/shell-quote.ts
20
20
  var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
@@ -403,7 +403,6 @@ var packageSpecOf = (request) => quoteForPosixShell(`${request.packageName}@${re
403
403
  var installPackageGlobally = (request, runNpm = execNpm) => {
404
404
  runNpm(`install -g --no-workspaces${prefixFlagOf(request)} ${packageSpecOf(request)}`, { timeout: request.timeoutMs });
405
405
  };
406
- var PREVIEW_TIMEOUT_MS = 3e4;
407
406
  var UNAVAILABLE_PREVIEW = { kind: "unavailable" };
408
407
  var npmOutputText = (output) => typeof output === "string" ? output : Buffer.isBuffer(output) ? output.toString() : "";
409
408
  var packedVersionOf = (entry, packageName) => {
@@ -419,18 +418,48 @@ var packedPackageVersionIn = (output, packageName) => {
419
418
  return void 0;
420
419
  }
421
420
  };
421
+ var FIRST_NPM_INSTALLING_RELEASE_AGE_EXCLUSIONS = "11.17.0";
422
+ var SCOPE_WILDCARD = "/*";
423
+ var npmInstallHonorsReleaseAgeExclusions = (runNpm) => {
424
+ const version = npmOutputText(runNpm("--version", { timeout: DISCOVERY_TIMEOUT_MS })).trim();
425
+ return isReleaseVersion(version) && !isNewerVersion(FIRST_NPM_INSTALLING_RELEASE_AGE_EXCLUSIONS, version);
426
+ };
427
+ var releaseAgeExclusionsIn = (output) => output.split(/[,\n]/).map((pattern) => pattern.trim()).filter((pattern) => pattern.length > 0);
428
+ var releaseAgeExclusionMatches = (pattern, packageName) => {
429
+ if (pattern === packageName) return true;
430
+ if (!pattern.startsWith("@") || !pattern.endsWith(SCOPE_WILDCARD)) return false;
431
+ const scope = pattern.slice(0, -SCOPE_WILDCARD.length);
432
+ return packageName.startsWith(`${scope}/`) && !packageName.slice(scope.length + 1).includes("/");
433
+ };
434
+ var npmExemptsFromReleaseAge = (request, runNpm = execNpm) => {
435
+ try {
436
+ if (!npmInstallHonorsReleaseAgeExclusions(runNpm)) return false;
437
+ const output = runNpm(`config get min-release-age-exclude --global --no-workspaces${prefixFlagOf(request)}`, { timeout: DISCOVERY_TIMEOUT_MS });
438
+ return releaseAgeExclusionsIn(npmOutputText(output)).some((pattern) => releaseAgeExclusionMatches(pattern, request.packageName));
439
+ } catch {
440
+ return false;
441
+ }
442
+ };
443
+ var npmStoppedAfterStarting = (error) => npmExitedOnItsOwn(error) || npmWasKilledBySignal(error);
444
+ var previewOfFailedDryRun = (request, error, runNpm) => {
445
+ if (npmExitedOnReleaseAge(error)) {
446
+ return npmExemptsFromReleaseAge(request, runNpm) ? UNAVAILABLE_PREVIEW : { kind: "refused_for_release_age", refusal: error };
447
+ }
448
+ return npmStoppedAfterStarting(error) ? { kind: "failed", failure: error } : UNAVAILABLE_PREVIEW;
449
+ };
422
450
  var previewGlobalInstall = (request, runNpm = execNpm) => {
423
451
  try {
424
- const output = runNpm(`pack --global --dry-run --json --ignore-scripts --no-workspaces${prefixFlagOf(request)} ${packageSpecOf(request)}`, { timeout: Math.min(request.timeoutMs, PREVIEW_TIMEOUT_MS) });
452
+ const output = runNpm(`pack --global --dry-run --json --ignore-scripts --no-workspaces${prefixFlagOf(request)} ${packageSpecOf(request)}`, { timeout: request.timeoutMs });
425
453
  const version = packedPackageVersionIn(npmOutputText(output), request.packageName);
426
454
  return version === void 0 ? UNAVAILABLE_PREVIEW : { kind: "resolved", version };
427
455
  } catch (error) {
428
- return npmExitedOnReleaseAge(error) ? { kind: "refused_for_release_age", refusal: error } : UNAVAILABLE_PREVIEW;
456
+ return previewOfFailedDryRun(request, error, runNpm);
429
457
  }
430
458
  };
431
- var throwIfNpmPolicyRefuses = (request, runNpm = execNpm) => {
459
+ var throwIfNpmRefusesInstall = (request, runNpm = execNpm) => {
432
460
  const preview = previewGlobalInstall(request, runNpm);
433
461
  if (preview.kind === "refused_for_release_age") throw preview.refusal;
462
+ if (preview.kind === "failed") throw preview.failure;
434
463
  };
435
464
  var needsGlobalInstall = (requested, installed, binaryPresent) => requested !== installed || !binaryPresent;
436
465
  var setupWouldDowngrade = (requested, installed) => installed !== void 0 && isReleaseVersion(installed) && isReleaseVersion(requested) && isNewerVersion(installed, requested);
@@ -455,9 +484,9 @@ var installGlobally = (options) => {
455
484
  }
456
485
  const started = (async () => {
457
486
  if (!npmIsOnPath()) throw new NpmMissingError();
458
- const { withUpgradeLock } = await import("./global-upgrade-QE5Q3BYW.js");
459
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-NUGEPR75.js");
460
- const { autoUpdateLock } = await import("./paths-VEUTZJOY.js");
487
+ const { withUpgradeLock } = await import("./global-upgrade-ND726NHJ.js");
488
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-PDCUHFRW.js");
489
+ const { autoUpdateLock } = await import("./paths-O3CZR2BV.js");
461
490
  let result = "skipped";
462
491
  const install = async () => {
463
492
  const platform = process.platform;
@@ -538,8 +567,9 @@ export {
538
567
  quoteIfNeeded,
539
568
  fetchLatestPublishedVersion,
540
569
  installPackageGlobally,
570
+ npmExemptsFromReleaseAge,
541
571
  previewGlobalInstall,
542
- throwIfNpmPolicyRefuses,
572
+ throwIfNpmRefusesInstall,
543
573
  plannedGlobalPackage,
544
574
  installGlobally
545
575
  };
@@ -22,23 +22,23 @@ import {
22
22
  turnCodexAppCardsOff,
23
23
  turnCodexAppCardsOn,
24
24
  whyLaunchctlFailed
25
- } from "./chunk-VGLIGBAJ.js";
26
- import "./chunk-G5IL6C6S.js";
25
+ } from "./chunk-67CGCPI4.js";
26
+ import "./chunk-TBDSTEO3.js";
27
27
  import "./chunk-XCEN33UP.js";
28
28
  import "./chunk-U4P4NDVB.js";
29
29
  import "./chunk-QCGNGEGE.js";
30
- import "./chunk-EFKJCBWA.js";
30
+ import "./chunk-YLR6QHCH.js";
31
31
  import "./chunk-Y6ILCLKE.js";
32
- import "./chunk-DSWUG4NV.js";
33
- import "./chunk-M74WT5NA.js";
34
- import "./chunk-YEVRMDG7.js";
35
- import "./chunk-TUXX7TKR.js";
36
- import "./chunk-HAOYL5JP.js";
37
- import "./chunk-DAMTDSAE.js";
32
+ import "./chunk-IGBKHRCZ.js";
33
+ import "./chunk-KYBVLSMT.js";
34
+ import "./chunk-MTB52RSH.js";
35
+ import "./chunk-MN2FFBYE.js";
36
+ import "./chunk-ZPFENH7C.js";
37
+ import "./chunk-Y3QV3VYX.js";
38
38
  import "./chunk-TODDEIYG.js";
39
- import "./chunk-I5ANEYUK.js";
39
+ import "./chunk-BOJWXETW.js";
40
40
  import "./chunk-UQTQ6HPO.js";
41
- import "./chunk-M2ZGNZRS.js";
41
+ import "./chunk-ZEPOIQ4H.js";
42
42
  import "./chunk-MLKGABMK.js";
43
43
  export {
44
44
  CODEX_APP_CARDS_DIRECTORY,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  deriveToolTarget
3
- } from "./chunk-G6M6YJK4.js";
3
+ } from "./chunk-X6YYQZW7.js";
4
4
  import {
5
5
  TOOL_NAME_MAX_LENGTH,
6
6
  codexElicitationToolName
7
- } from "./chunk-M2ZGNZRS.js";
7
+ } from "./chunk-ZEPOIQ4H.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
 
10
10
  // src/codex-card-routing.ts
@@ -11,7 +11,7 @@ import {
11
11
  installedCodexApp,
12
12
  shellQuoted,
13
13
  writeDesktopProxy
14
- } from "./chunk-G5IL6C6S.js";
14
+ } from "./chunk-TBDSTEO3.js";
15
15
  import "./chunk-XCEN33UP.js";
16
16
  import {
17
17
  CODEX_APP_LAUNCH_VARIABLE