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,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ withUpgradeLock
4
+ } from "../chunk-KFSWRIH2.js";
5
+ import "../chunk-N3TX5LLG.js";
2
6
  import {
3
7
  nativeBridgeAccount
4
8
  } from "../chunk-FAMKGTCF.js";
@@ -23,7 +27,7 @@ import {
23
27
  someoneIsAtTheTerminal,
24
28
  switchBackToTheShellKeyLine,
25
29
  wrongAccountHintPlacement
26
- } from "../chunk-BDJNHQFA.js";
30
+ } from "../chunk-PY3VOJQY.js";
27
31
  import {
28
32
  INSTALL_NODE_STEP,
29
33
  NPM_FILE_IN_USE_STEP,
@@ -37,25 +41,25 @@ import {
37
41
  renderCommandSurface,
38
42
  teamOfferLines,
39
43
  unverifiedKeyClosingReason
40
- } from "../chunk-URZAPVR6.js";
44
+ } from "../chunk-G3HAAQ65.js";
41
45
  import {
42
46
  instructionsChannelFor,
43
47
  pairingComputerOf,
44
48
  planPhoneCheck
45
- } from "../chunk-OCHXKVIN.js";
49
+ } from "../chunk-UVNH4UGJ.js";
46
50
  import {
47
51
  coworkOutput,
48
52
  coworkSelection
49
- } from "../chunk-XF25RJEV.js";
53
+ } from "../chunk-YLMBNJWN.js";
50
54
  import "../chunk-PUZZELE6.js";
51
55
  import {
52
56
  readCodexHooksOnDisk
53
- } from "../chunk-EXM3ZEUU.js";
54
- import "../chunk-TKGCDWPF.js";
57
+ } from "../chunk-HTOPPHMO.js";
58
+ import "../chunk-T776F2FQ.js";
55
59
  import {
56
60
  clearDeclinedAgent,
57
61
  declinedAgentForSetupChoice
58
- } from "../chunk-5X7XEJTI.js";
62
+ } from "../chunk-ERVXMMGO.js";
59
63
  import {
60
64
  OPENCLAW_RESTART_NOTE,
61
65
  describeOpenClawInstallFailure,
@@ -63,7 +67,7 @@ import {
63
67
  gateHermesShell,
64
68
  readHermesShellGate,
65
69
  saveSetupFailure
66
- } from "../chunk-ZL3UDLTC.js";
70
+ } from "../chunk-23NHXO6T.js";
67
71
  import {
68
72
  CODEX_NEEDS_A_NEWER_VERSION,
69
73
  CODEX_SETTINGS_STOP_A_HOOK,
@@ -77,14 +81,14 @@ import {
77
81
  describeHermesState,
78
82
  hermesGateShellCommand,
79
83
  needsCodexTrustStep
80
- } from "../chunk-OESNI7XN.js";
84
+ } from "../chunk-RL5LF7JZ.js";
81
85
  import {
82
86
  describeWaitLadder
83
87
  } from "../chunk-CVWG2N3Y.js";
84
88
  import {
85
89
  writeJsonError,
86
90
  writeStdoutFully
87
- } from "../chunk-ZUU4I2RK.js";
91
+ } from "../chunk-EPNYDS4H.js";
88
92
  import {
89
93
  canShowPairingQr,
90
94
  confirmAppConnection,
@@ -96,7 +100,7 @@ import {
96
100
  phoneAwaitsNotificationPermission,
97
101
  printConnectInstructions,
98
102
  waitForYourPhone
99
- } from "../chunk-52CIHAC2.js";
103
+ } from "../chunk-BXAVWEE4.js";
100
104
  import "../chunk-3EGEA4KH.js";
101
105
  import {
102
106
  SETUP_AGENT_NAME,
@@ -105,7 +109,7 @@ import {
105
109
  roundTripEvidence,
106
110
  roundTripWasAnswered,
107
111
  verifyRoundTrip
108
- } from "../chunk-QJF5I7NR.js";
112
+ } from "../chunk-44SARVA4.js";
109
113
  import {
110
114
  keepLinuxDaemonAfterLogout,
111
115
  lingerReportOf
@@ -113,10 +117,10 @@ import {
113
117
  import {
114
118
  readManagedControlEvidence,
115
119
  waitForMachineReadiness
116
- } from "../chunk-QNOXMVIX.js";
120
+ } from "../chunk-6ONF5BPB.js";
117
121
  import {
118
122
  ensureCodexTrustsPusharyHooks
119
- } from "../chunk-AKAZRQLA.js";
123
+ } from "../chunk-V3PMKMAO.js";
120
124
  import {
121
125
  describeSetupSideEffects,
122
126
  installAgentSkill,
@@ -124,7 +128,7 @@ import {
124
128
  } from "../chunk-UOPOVQ2P.js";
125
129
  import {
126
130
  codexEngineBehindLauncher
127
- } from "../chunk-L3BX56Y4.js";
131
+ } from "../chunk-MLJ5Q7GF.js";
128
132
  import "../chunk-XCEN33UP.js";
129
133
  import {
130
134
  CODEX_ENGINE_DIRECTORY,
@@ -140,7 +144,7 @@ import {
140
144
  soleGateFile,
141
145
  soleGateReceipt,
142
146
  soleGateReceiptFile
143
- } from "../chunk-BW6WGBJC.js";
147
+ } from "../chunk-4DMZJSI5.js";
144
148
  import {
145
149
  describeDetection,
146
150
  detectAllAgents,
@@ -150,12 +154,12 @@ import {
150
154
  registerPluginLocation,
151
155
  shortenHome,
152
156
  vscodeSettingsTargets
153
- } from "../chunk-QBPBNFDI.js";
157
+ } from "../chunk-ZWQPUXSS.js";
154
158
  import "../chunk-OYIN77HO.js";
155
159
  import {
156
160
  mcpServerBearer,
157
161
  readMacAppAgentKey
158
- } from "../chunk-LTB54XBS.js";
162
+ } from "../chunk-W2RA43CP.js";
159
163
  import {
160
164
  HERMES_CONFIG_FILE,
161
165
  HERMES_GATE_TOOLS_KEY,
@@ -174,7 +178,7 @@ import {
174
178
  routesHermesQuestions,
175
179
  runsAnOlderPlugin,
176
180
  shippedHermesPlugin
177
- } from "../chunk-Z7OTSKAT.js";
181
+ } from "../chunk-HNHRPMND.js";
178
182
  import {
179
183
  setHumanStream
180
184
  } from "../chunk-QCGNGEGE.js";
@@ -182,7 +186,7 @@ import {
182
186
  findOpenClawLauncher,
183
187
  isOpenClawWired,
184
188
  openClawPathsNow
185
- } from "../chunk-IYY7KRNS.js";
189
+ } from "../chunk-ZDROZABP.js";
186
190
  import {
187
191
  FX_PICKS_UP_CONFIGURATION,
188
192
  FX_PUSHARY_TOOLS_RULE,
@@ -199,7 +203,7 @@ import {
199
203
  readFxProfileForSetup,
200
204
  withFxPusharyServer,
201
205
  writeFxProfile
202
- } from "../chunk-E2CY63WZ.js";
206
+ } from "../chunk-DFTVEK72.js";
203
207
  import {
204
208
  AgentConfigError,
205
209
  afterAgentFailureNote,
@@ -212,10 +216,10 @@ import {
212
216
  retryAgentCommand,
213
217
  writeSetupConfigFile,
214
218
  writeSetupConfigJson
215
- } from "../chunk-HKL7HXFD.js";
219
+ } from "../chunk-ZGS5TMMV.js";
216
220
  import {
217
221
  MCP_BRIDGE_BINARY
218
- } from "../chunk-I5C35DE5.js";
222
+ } from "../chunk-RE6TWTNY.js";
219
223
  import {
220
224
  OPENCODE_HOOK_BINARY,
221
225
  addOpenCodeMcpServer,
@@ -234,12 +238,12 @@ import {
234
238
  openCodePluginFile,
235
239
  openCodeWired,
236
240
  withOpenCodeAskRules
237
- } from "../chunk-GYIISS2S.js";
238
- import "../chunk-NNHD7KVL.js";
239
- import "../chunk-FWYOB3LW.js";
241
+ } from "../chunk-KVLAC4FS.js";
242
+ import "../chunk-4TIZJD3Q.js";
243
+ import "../chunk-WNCTMTMG.js";
240
244
  import {
241
245
  keyScopeOf
242
- } from "../chunk-WA5RGLKV.js";
246
+ } from "../chunk-VD57H3ZU.js";
243
247
  import {
244
248
  ansiPainter,
245
249
  ciMarker,
@@ -248,7 +252,7 @@ import {
248
252
  describeError,
249
253
  isCI,
250
254
  useColor
251
- } from "../chunk-RYBTDSQF.js";
255
+ } from "../chunk-5QP7DVQF.js";
252
256
  import {
253
257
  checkCodexInstall,
254
258
  describeMissingControlPrerequisite,
@@ -261,16 +265,16 @@ import {
261
265
  nodeCodexInstallProbe,
262
266
  phoneStartIsRequired,
263
267
  resolveControlPolicy
264
- } from "../chunk-LXHH33MX.js";
268
+ } from "../chunk-AJ6Q42KT.js";
265
269
  import {
266
270
  detectClaudeVersion
267
- } from "../chunk-DRY5YWUK.js";
271
+ } from "../chunk-CMQCKXCF.js";
268
272
  import "../chunk-TCE3J44Z.js";
269
273
  import {
270
274
  describeAutoUpdateAnnouncement,
271
275
  takeAutoUpdateAnnouncement
272
- } from "../chunk-2PQY4TMQ.js";
273
- import "../chunk-JLVVFGYN.js";
276
+ } from "../chunk-M7O33GTP.js";
277
+ import "../chunk-IYYWAP6P.js";
274
278
  import "../chunk-WHB622LP.js";
275
279
  import {
276
280
  addCompatibleHooks,
@@ -285,7 +289,7 @@ import {
285
289
  compatibleRecord,
286
290
  compatibleTargetPaths,
287
291
  hasCompatibleHooks
288
- } from "../chunk-D35DKI3E.js";
292
+ } from "../chunk-WEKGOHW7.js";
289
293
  import {
290
294
  DAEMON_COLD_START_TIMEOUT_MS,
291
295
  clearDaemonNeedsLogin,
@@ -304,7 +308,7 @@ import {
304
308
  stopDaemonService,
305
309
  versionManagerOf,
306
310
  waitForDaemonRemoteProof
307
- } from "../chunk-PDVGAU7A.js";
311
+ } from "../chunk-V6OR4WLF.js";
308
312
  import {
309
313
  GEMINI_HOOK_BINARY,
310
314
  GEMINI_HOOK_EVENTS,
@@ -320,38 +324,38 @@ import {
320
324
  geminiWired,
321
325
  planHooks,
322
326
  pusharyHookExecutable
323
- } from "../chunk-O7N2FQBH.js";
327
+ } from "../chunk-5JQQ5IQC.js";
324
328
  import {
325
329
  reportEvent
326
- } from "../chunk-TBQT2TA6.js";
327
- import "../chunk-3JNBZF4G.js";
330
+ } from "../chunk-3QDILGKG.js";
331
+ import "../chunk-3ULFLONL.js";
328
332
  import {
329
333
  AGENT_CHOICES,
330
334
  effectiveAgentSelection,
331
335
  effectiveControlMode,
332
336
  effectiveVerify,
333
337
  parseSetupOptions
334
- } from "../chunk-ZKZL4EFA.js";
335
- import "../chunk-O5IRXMPV.js";
338
+ } from "../chunk-EJJBM4OB.js";
339
+ import "../chunk-SRIFCDTY.js";
336
340
  import "../chunk-BZIBNSQE.js";
337
341
  import "../chunk-55L4JSPA.js";
338
342
  import {
339
343
  transcriptPreferenceForSetup
340
- } from "../chunk-TYGNPI7L.js";
341
- import "../chunk-VRNGMRJA.js";
342
- import "../chunk-2NHK4PUR.js";
343
- import "../chunk-OLU5L3VB.js";
344
+ } from "../chunk-CH7WFVC5.js";
345
+ import "../chunk-TFMIG3VP.js";
346
+ import "../chunk-D7YLLAMU.js";
347
+ import "../chunk-5IPXL33D.js";
344
348
  import "../chunk-POFBE6ZY.js";
345
- import "../chunk-KOJJ2LPJ.js";
346
- import "../chunk-6D35FDXC.js";
347
- import "../chunk-7IG54T3H.js";
349
+ import "../chunk-MIO242ZB.js";
350
+ import "../chunk-VEE2MRUN.js";
351
+ import "../chunk-VH5DPURH.js";
348
352
  import {
349
353
  checkApiKey,
350
354
  describeKeyCheck,
351
355
  samePusharyAccount
352
- } from "../chunk-L7BHOFTF.js";
353
- import "../chunk-6NUEY2FT.js";
354
- import "../chunk-AYM7IBC5.js";
356
+ } from "../chunk-GZAU5W3K.js";
357
+ import "../chunk-4BC4YDVL.js";
358
+ import "../chunk-5YJSZFZ6.js";
355
359
  import {
356
360
  KEY_FILE_MODE,
357
361
  installClaudeAlias,
@@ -367,8 +371,8 @@ import {
367
371
  resolveShellRc,
368
372
  shellKeyWasReplaced,
369
373
  writeKey
370
- } from "../chunk-LXZ6APGN.js";
371
- import "../chunk-GBKMTVG6.js";
374
+ } from "../chunk-BLVTNQZV.js";
375
+ import "../chunk-UYAKT6PO.js";
372
376
  import {
373
377
  CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
374
378
  CLINE_AUTO_APPROVE_STEP,
@@ -384,6 +388,7 @@ import {
384
388
  addCodexMcpServer,
385
389
  addPusharyHooks,
386
390
  addPusharyToolPermissions,
391
+ autoUpdateLock,
387
392
  autoUpdateState,
388
393
  captureClaudeMcpServer,
389
394
  captureCodexHookTrust,
@@ -428,21 +433,30 @@ import {
428
433
  vscodePluginDir,
429
434
  vscodePluginMcp,
430
435
  writeInstructionBlock
431
- } from "../chunk-BWOQACK7.js";
436
+ } from "../chunk-25CMVBTJ.js";
432
437
  import {
433
438
  NpmMissingError,
434
439
  compareVersion,
440
+ execNpm,
435
441
  fetchLatestPublishedVersion,
436
442
  installGlobally,
443
+ newestReleaseNpmAllows,
444
+ npmHoldsReleasesBack,
437
445
  npmInstallFailure,
446
+ npmIsOnPath,
438
447
  parseVersion,
439
448
  plannedGlobalPackage,
449
+ readNpmReleaseAgeRule,
450
+ readPlannedSetupInstall,
440
451
  resolveGlobalBinDir,
441
- resolveGlobalBinary
442
- } from "../chunk-AO5BRDKS.js";
452
+ resolveGlobalBinary,
453
+ runNpmInTerminal,
454
+ setupNeedsGlobalInstall,
455
+ setupWouldDowngrade
456
+ } from "../chunk-5NFHLMY3.js";
443
457
  import {
444
458
  getBaseUrl
445
- } from "../chunk-KZFNXNFH.js";
459
+ } from "../chunk-IC5BBT2K.js";
446
460
  import {
447
461
  UsageError
448
462
  } from "../chunk-CINBAX5G.js";
@@ -450,19 +464,21 @@ import {
450
464
  backupFile,
451
465
  readJsonSafe
452
466
  } from "../chunk-PM2NRK6Y.js";
453
- import {
454
- EXIT
455
- } from "../chunk-BG4HHB7E.js";
456
467
  import {
457
468
  NPX_LATEST_COMMAND,
469
+ isInvocationOf,
458
470
  renderCommandHelp
459
- } from "../chunk-YUG7PCPJ.js";
471
+ } from "../chunk-QQLYMBKM.js";
472
+ import {
473
+ EXIT
474
+ } from "../chunk-BG4HHB7E.js";
460
475
  import {
461
476
  getPackageVersion,
477
+ isKnownReleaseVersion,
462
478
  isNewerVersion,
463
479
  launchedPackage,
464
480
  ownPackageName
465
- } from "../chunk-UQTQ6HPO.js";
481
+ } from "../chunk-YJHBDJIW.js";
466
482
  import {
467
483
  CURSOR_GATE_SCRIPT,
468
484
  HOOK_COMPATIBLE_PROFILES,
@@ -474,12 +490,12 @@ import {
474
490
  isRecord,
475
491
  isTimeoutAction,
476
492
  isValidApiKey
477
- } from "../chunk-3JU27SD5.js";
493
+ } from "../chunk-HMMVGDL3.js";
478
494
  import "../chunk-MLKGABMK.js";
479
495
 
480
496
  // bin/pushary-setup.ts
481
- import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
482
- import { join as join4, dirname as dirname3, basename } from "path";
497
+ import { existsSync as existsSync2, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
498
+ import { join as join5, dirname as dirname3, basename } from "path";
483
499
  import { homedir, hostname } from "os";
484
500
  import { execSync } from "child_process";
485
501
  import { checkbox, input, confirm } from "@inquirer/prompts";
@@ -759,6 +775,112 @@ var pickAppKey = (candidates) => candidates.fromAgents.find(
759
775
  (candidate) => typeof candidate === "string" && candidate !== candidates.storedKey && candidate !== candidates.envKey && isValidApiKey(candidate)
760
776
  ) ?? null;
761
777
 
778
+ // src/setup/release-age-handoff.ts
779
+ import { existsSync } from "fs";
780
+ import { mkdtemp, rm } from "fs/promises";
781
+ import { tmpdir } from "os";
782
+ import { join as join4 } from "path";
783
+ var SETUP_HANDOFF_ENV = "PUSHARY_SETUP_HANDOFF";
784
+ var SETUP_HANDOFF_MARK = "1";
785
+ var NPM_LOGS_DIRECTORY_VARIABLE = "npm_config_logs_dir";
786
+ var NPM_LOGS_KEPT_VARIABLE = "npm_config_logs_max";
787
+ var NO_NPM_LOG_FILES = "0";
788
+ var NPM_LOGS_DIRECTORY_PREFIX = "pushary-setup-npm-logs-";
789
+ var handoffEnvironment = (privateLogsDirectory) => ({
790
+ [SETUP_HANDOFF_ENV]: SETUP_HANDOFF_MARK,
791
+ [NPM_LOGS_DIRECTORY_VARIABLE]: privateLogsDirectory,
792
+ [NPM_LOGS_KEPT_VARIABLE]: NO_NPM_LOG_FILES
793
+ });
794
+ var RELEASE_CHECK_TIMEOUT_MS = 3e4;
795
+ var CLI_COMMAND = "pushary";
796
+ var SETUP_COMMAND = "setup";
797
+ var CONTINUE_SETUP = { kind: "continue" };
798
+ var KEEP_CURRENT_BEHAVIOUR = { kind: "keep_current_behaviour" };
799
+ var isSetupHandoff = (env) => env[SETUP_HANDOFF_ENV] !== void 0;
800
+ var handoffIsConceivable = (preconditions) => !preconditions.handoffGuardPresent && !preconditions.dryRun && isKnownReleaseVersion(preconditions.runningVersion);
801
+ var releaseCheckApplies = (state) => handoffIsConceivable(state) && state.npmOnPath && setupNeedsGlobalInstall(state.runningVersion, state.install);
802
+ var handoffReachesAnInstall = (allowed, install) => isKnownReleaseVersion(allowed) && !setupWouldDowngrade(allowed, install.installedVersion);
803
+ var decideSetupHandoff = (input2) => {
804
+ const heldBy = input2.releaseAgeRule;
805
+ const npmAllows = input2.npmAllows;
806
+ if (!releaseCheckApplies(input2) || !npmHoldsReleasesBack(heldBy)) return CONTINUE_SETUP;
807
+ if (npmAllows.kind === "npm_failed") return KEEP_CURRENT_BEHAVIOUR;
808
+ if (!isNewerVersion(input2.runningVersion, npmAllows.version)) return CONTINUE_SETUP;
809
+ if (!handoffReachesAnInstall(npmAllows.version, input2.install)) return KEEP_CURRENT_BEHAVIOUR;
810
+ return { kind: "hand_off", version: npmAllows.version, heldBy };
811
+ };
812
+ var argumentsAfterSetup = (argv) => argv[0] !== void 0 && isInvocationOf(argv[0], SETUP_COMMAND) ? argv.slice(1) : argv;
813
+ var handoffNpmArgs = (packageName, version, setupArgs) => ["exec", "--yes", `--package=${packageName}@${version}`, "--", CLI_COMMAND, SETUP_COMMAND, ...setupArgs];
814
+ var daysOld = (days) => `${days} ${days === 1 ? "day" : "days"}`;
815
+ var releasesNpmInstalls = (rule) => {
816
+ switch (rule.kind) {
817
+ case "min_release_age":
818
+ return `releases at least ${daysOld(rule.days)} old`;
819
+ case "before":
820
+ return `releases published before ${rule.cutoff}`;
821
+ }
822
+ };
823
+ var describeSetupHandoff = (rule, version) => `Your npm only installs ${releasesNpmInstalls(rule)}, so setup continues with ${version}, the newest release it allows.`;
824
+ var describeHandoffNotStarted = (runningVersion) => `npm could not be started, so setup continues with ${runningVersion} instead.`;
825
+ var SETUP_CONTINUED = { kind: "continued" };
826
+ var readSetupHandoffState = (preconditions, effects) => ({
827
+ ...preconditions,
828
+ npmOnPath: effects.npmIsOnPath(),
829
+ install: effects.readPlannedInstall()
830
+ });
831
+ var newestReleaseFor = (state, runNpm) => newestReleaseNpmAllows(
832
+ { packageName: state.install.packageName, timeoutMs: RELEASE_CHECK_TIMEOUT_MS },
833
+ state.install.installedVersion ?? state.runningVersion,
834
+ state.runningVersion,
835
+ runNpm
836
+ );
837
+ var handOff = async (decision, packageName, setupArgs, effects) => {
838
+ await effects.releaseAbandonedLock();
839
+ effects.announce(describeSetupHandoff(decision.heldBy, decision.version));
840
+ const args = handoffNpmArgs(packageName, decision.version, setupArgs);
841
+ const exit = await effects.inPrivateDirectory((logsDirectory) => effects.runNpmInTerminal({ args, env: handoffEnvironment(logsDirectory) }));
842
+ if (exit.kind === "exited") return { kind: "handed_off", version: decision.version, exitCode: exit.code };
843
+ effects.announce(describeHandoffNotStarted(effects.runningVersion));
844
+ return SETUP_CONTINUED;
845
+ };
846
+ var handOffSetupWhenNpmHoldsThisRelease = async (request, effects) => {
847
+ const preconditions = {
848
+ runningVersion: effects.runningVersion,
849
+ handoffGuardPresent: isSetupHandoff(effects.env),
850
+ dryRun: request.dryRun
851
+ };
852
+ if (!handoffIsConceivable(preconditions)) return SETUP_CONTINUED;
853
+ const state = readSetupHandoffState(preconditions, effects);
854
+ if (!releaseCheckApplies(state)) return SETUP_CONTINUED;
855
+ const releaseAgeRule = readNpmReleaseAgeRule(effects.runNpm);
856
+ if (!npmHoldsReleasesBack(releaseAgeRule)) return SETUP_CONTINUED;
857
+ const decision = decideSetupHandoff({ ...state, releaseAgeRule, npmAllows: newestReleaseFor(state, effects.runNpm) });
858
+ return decision.kind === "hand_off" ? handOff(decision, state.install.packageName, request.setupArgs, effects) : SETUP_CONTINUED;
859
+ };
860
+ var NO_LOCK = { kind: "no_lock" };
861
+ var holdNothing = async () => void 0;
862
+ var releaseAbandonedUpgradeLock = async (request = {}) => existsSync(request.lockPath ?? autoUpdateLock()) ? withUpgradeLock(holdNothing, request) : NO_LOCK;
863
+ var keepAFolderThatWouldNotRemove = () => void 0;
864
+ var inFreshTemporaryDirectory = async (run) => {
865
+ const directory = await mkdtemp(join4(tmpdir(), NPM_LOGS_DIRECTORY_PREFIX));
866
+ try {
867
+ return await run(directory);
868
+ } finally {
869
+ await rm(directory, { recursive: true, force: true }).catch(keepAFolderThatWouldNotRemove);
870
+ }
871
+ };
872
+ var localSetupHandoffEffects = (announce) => ({
873
+ env: process.env,
874
+ runningVersion: getPackageVersion(),
875
+ npmIsOnPath,
876
+ readPlannedInstall: () => readPlannedSetupInstall(process.platform),
877
+ runNpm: execNpm,
878
+ releaseAbandonedLock: () => releaseAbandonedUpgradeLock(),
879
+ announce,
880
+ inPrivateDirectory: inFreshTemporaryDirectory,
881
+ runNpmInTerminal
882
+ });
883
+
762
884
  // src/vscode-gate-hooks.ts
763
885
  var runsTheGate = (entry) => typeof entry.command === "string" && (pusharyHookExecutable(entry.command)?.endsWith(CURSOR_GATE_SCRIPT) ?? false);
764
886
  var guardedEntry = (entry, command) => isRecord(entry) && runsTheGate(entry) ? { ...entry, command } : entry;
@@ -936,23 +1058,23 @@ var fetchSkillContent = async () => {
936
1058
  if (_cachedSkillContent) return _cachedSkillContent;
937
1059
  const __dirname = dirname3(fileURLToPath(import.meta.url));
938
1060
  const candidates = [
939
- join4(__dirname, "..", "..", "data", "SKILL.md"),
940
- join4(__dirname, "..", "data", "SKILL.md")
1061
+ join5(__dirname, "..", "..", "data", "SKILL.md"),
1062
+ join5(__dirname, "..", "data", "SKILL.md")
941
1063
  ];
942
- const source = candidates.find((path) => existsSync(path));
1064
+ const source = candidates.find((path) => existsSync2(path));
943
1065
  if (!source) throw new Error("packaged skill not found");
944
1066
  _cachedSkillContent = readFileSync(source, "utf-8");
945
1067
  return _cachedSkillContent;
946
1068
  };
947
1069
  var writePackagedSkill = async (dir) => {
948
1070
  const content = await fetchSkillContent();
949
- if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
950
- writeFileSync(join4(dir, "SKILL.md"), content, "utf-8");
1071
+ if (!existsSync2(dir)) mkdirSync(dir, { recursive: true });
1072
+ writeFileSync(join5(dir, "SKILL.md"), content, "utf-8");
951
1073
  };
952
- var skillsCliInUse = () => isInstalled("skills") || existsSync(join4(homedir(), ".agents", "skills"));
1074
+ var skillsCliInUse = () => isInstalled("skills") || existsSync2(join5(homedir(), ".agents", "skills"));
953
1075
  var skillInstallEffects = {
954
1076
  runSkillsCli: installSkillViaSkillsCli,
955
- skillModifiedAt: (dir) => statSync(join4(dir, "SKILL.md"), { throwIfNoEntry: false })?.mtimeMs ?? null,
1077
+ skillModifiedAt: (dir) => statSync(join5(dir, "SKILL.md"), { throwIfNoEntry: false })?.mtimeMs ?? null,
956
1078
  writePackagedSkill,
957
1079
  now: () => Date.now()
958
1080
  };
@@ -1149,7 +1271,7 @@ var setupOpenClaw = async (_apiKey) => {
1149
1271
  const { state } = outcome.inspection;
1150
1272
  return state.kind === "wired" && state.gateVerified ? "verified" : "configured";
1151
1273
  };
1152
- var CODEX_HOOKS_JSON = join4(CODEX_HOME, "hooks.json");
1274
+ var CODEX_HOOKS_JSON = join5(CODEX_HOME, "hooks.json");
1153
1275
  var CODEX_HOOKS_MIN_VERSION = [0, 122, 0];
1154
1276
  var codexOnPath = () => {
1155
1277
  const whichCmd = IS_WINDOWS ? "where" : "which";
@@ -1224,7 +1346,7 @@ var bundledCodex = () => findBundledCodex({
1224
1346
  return null;
1225
1347
  }
1226
1348
  },
1227
- exists: existsSync,
1349
+ exists: existsSync2,
1228
1350
  engineBehindPusharyLauncher,
1229
1351
  home: homedir(),
1230
1352
  platform: process.platform
@@ -1436,17 +1558,17 @@ var setupCodex = async (apiKey) => {
1436
1558
  var resolveBundledPlugin = () => {
1437
1559
  const dir = dirname3(fileURLToPath(import.meta.url));
1438
1560
  const candidates = [
1439
- join4(dir, "..", "..", "data", "cursor-plugin"),
1440
- join4(dir, "..", "data", "cursor-plugin"),
1441
- join4(dir, "..", "..", "..", "cursor-plugin"),
1442
- join4(dir, "..", "..", "cursor-plugin")
1561
+ join5(dir, "..", "..", "data", "cursor-plugin"),
1562
+ join5(dir, "..", "data", "cursor-plugin"),
1563
+ join5(dir, "..", "..", "..", "cursor-plugin"),
1564
+ join5(dir, "..", "..", "cursor-plugin")
1443
1565
  ];
1444
- return candidates.find((p) => existsSync(join4(p, ".cursor-plugin", "plugin.json"))) ?? null;
1566
+ return candidates.find((p) => existsSync2(join5(p, ".cursor-plugin", "plugin.json"))) ?? null;
1445
1567
  };
1446
1568
  var installCursorUserHooks = (gateScript) => {
1447
- const bundled = readJson(join4(CURSOR_PLUGIN_DIR, "hooks", "hooks.json")).hooks ?? {};
1569
+ const bundled = readJson(join5(CURSOR_PLUGIN_DIR, "hooks", "hooks.json")).hooks ?? {};
1448
1570
  let userHooks = {};
1449
- if (existsSync(CURSOR_USER_HOOKS)) {
1571
+ if (existsSync2(CURSOR_USER_HOOKS)) {
1450
1572
  const result = readJsonSafe(CURSOR_USER_HOOKS);
1451
1573
  if (result.kind === "ok" && isRecord(result.value)) userHooks = result.value;
1452
1574
  else if (result.kind !== "missing") {
@@ -1472,8 +1594,8 @@ var installCursorUserHooks = (gateScript) => {
1472
1594
  writeJson(CURSOR_USER_HOOKS, { ...userHooks, version: userHooks.version ?? 1, hooks });
1473
1595
  };
1474
1596
  var neutralizePluginGate = () => {
1475
- const path = join4(CURSOR_PLUGIN_DIR, "hooks", "hooks.json");
1476
- if (!existsSync(path)) return;
1597
+ const path = join5(CURSOR_PLUGIN_DIR, "hooks", "hooks.json");
1598
+ if (!existsSync2(path)) return;
1477
1599
  const data = readJson(path);
1478
1600
  if (!data.hooks) return;
1479
1601
  let changed = false;
@@ -1495,7 +1617,7 @@ var setupCursor = async (apiKey) => {
1495
1617
  const source = resolveBundledPlugin();
1496
1618
  if (!source) throw new Error("bundled Cursor plugin not found in this package");
1497
1619
  await spinner("Installing Pushary plugin", async () => {
1498
- const staging = join4(dirname3(CURSOR_PLUGIN_DIR), `${CURSOR_PLUGIN_STAGING_PREFIX}${process.pid}`);
1620
+ const staging = join5(dirname3(CURSOR_PLUGIN_DIR), `${CURSOR_PLUGIN_STAGING_PREFIX}${process.pid}`);
1499
1621
  const backup = `${CURSOR_PLUGIN_DIR}${CURSOR_PLUGIN_BACKUP_INFIX}${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1500
1622
  rmSync(staging, { recursive: true, force: true });
1501
1623
  try {
@@ -1503,11 +1625,11 @@ var setupCursor = async (apiKey) => {
1503
1625
  recursive: true,
1504
1626
  filter: (p) => !["tools", "node_modules", ".git", ".DS_Store"].includes(basename(p))
1505
1627
  });
1506
- const staged = readJsonSafe(join4(staging, ".cursor-plugin", "plugin.json"));
1628
+ const staged = readJsonSafe(join5(staging, ".cursor-plugin", "plugin.json"));
1507
1629
  if (staged.kind !== "ok") {
1508
1630
  throw new Error("staged Cursor plugin is missing or has an unreadable plugin.json");
1509
1631
  }
1510
- const hadExisting = existsSync(CURSOR_PLUGIN_DIR);
1632
+ const hadExisting = existsSync2(CURSOR_PLUGIN_DIR);
1511
1633
  if (hadExisting) renameSync(CURSOR_PLUGIN_DIR, backup);
1512
1634
  try {
1513
1635
  renameSync(staging, CURSOR_PLUGIN_DIR);
@@ -1521,7 +1643,7 @@ var setupCursor = async (apiKey) => {
1521
1643
  }
1522
1644
  });
1523
1645
  await spinner("Linking your API key", async () => {
1524
- const mcpPath = join4(CURSOR_PLUGIN_DIR, "mcp.json");
1646
+ const mcpPath = join5(CURSOR_PLUGIN_DIR, "mcp.json");
1525
1647
  const mcp = readAgentJson(mcpPath);
1526
1648
  const servers = mcp.mcpServers ?? {};
1527
1649
  if (servers.pushary) {
@@ -1531,7 +1653,7 @@ var setupCursor = async (apiKey) => {
1531
1653
  }
1532
1654
  });
1533
1655
  await spinner("Registering permission gate (~/.cursor/hooks.json)", async () => {
1534
- installCursorUserHooks(join4(CURSOR_PLUGIN_DIR, "scripts", "pushary-gate.mjs"));
1656
+ installCursorUserHooks(join5(CURSOR_PLUGIN_DIR, "scripts", "pushary-gate.mjs"));
1535
1657
  neutralizePluginGate();
1536
1658
  });
1537
1659
  console.log();
@@ -1545,24 +1667,24 @@ var setupCursor = async (apiKey) => {
1545
1667
  var resolveBundledVsCodePlugin = () => {
1546
1668
  const dir = dirname3(fileURLToPath(import.meta.url));
1547
1669
  const candidates = [
1548
- join4(dir, "..", "..", "data", "vscode-plugin"),
1549
- join4(dir, "..", "data", "vscode-plugin"),
1550
- join4(dir, "..", "..", "..", "vscode-plugin"),
1551
- join4(dir, "..", "..", "vscode-plugin")
1670
+ join5(dir, "..", "..", "data", "vscode-plugin"),
1671
+ join5(dir, "..", "data", "vscode-plugin"),
1672
+ join5(dir, "..", "..", "..", "vscode-plugin"),
1673
+ join5(dir, "..", "..", "vscode-plugin")
1552
1674
  ];
1553
- return candidates.find((p) => existsSync(join4(p, ".claude-plugin", "plugin.json"))) ?? null;
1675
+ return candidates.find((p) => existsSync2(join5(p, ".claude-plugin", "plugin.json"))) ?? null;
1554
1676
  };
1555
1677
  var pinGuardedVsCodeGate = (pluginDir) => {
1556
- const hooksPath = join4(pluginDir, "hooks", "hooks.json");
1557
- const guarded = guardVsCodeGateHooks(readJson(hooksPath), join4(pluginDir, "scripts", CURSOR_GATE_SCRIPT));
1678
+ const hooksPath = join5(pluginDir, "hooks", "hooks.json");
1679
+ const guarded = guardVsCodeGateHooks(readJson(hooksPath), join5(pluginDir, "scripts", CURSOR_GATE_SCRIPT));
1558
1680
  if (guarded.kind === "invalid") throw new Error(guarded.reason);
1559
1681
  writeJson(hooksPath, guarded.document);
1560
1682
  };
1561
1683
  var registerVsCodePlugin = (pluginDir) => {
1562
1684
  const written = [];
1563
1685
  const manual = [];
1564
- for (const settingsPath of vscodeSettingsTargets(existsSync)) {
1565
- const current = existsSync(settingsPath) ? readFileSync(settingsPath, "utf-8") : null;
1686
+ for (const settingsPath of vscodeSettingsTargets(existsSync2)) {
1687
+ const current = existsSync2(settingsPath) ? readFileSync(settingsPath, "utf-8") : null;
1566
1688
  const result = registerPluginLocation(current, pluginDir);
1567
1689
  if (result.kind === "already") continue;
1568
1690
  if (result.kind === "manual") {
@@ -1583,7 +1705,7 @@ var setupVsCode = async (apiKey) => {
1583
1705
  const source = resolveBundledVsCodePlugin();
1584
1706
  if (!source) throw new Error("bundled VS Code plugin not found in this package");
1585
1707
  await spinner("Installing Pushary plugin", async () => {
1586
- const staging = join4(dirname3(VSCODE_PLUGIN_DIR), `.pushary-staging-vscode-${process.pid}`);
1708
+ const staging = join5(dirname3(VSCODE_PLUGIN_DIR), `.pushary-staging-vscode-${process.pid}`);
1587
1709
  const backup = `${VSCODE_PLUGIN_DIR}.pushary-backup-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1588
1710
  mkdirSync(dirname3(VSCODE_PLUGIN_DIR), { recursive: true });
1589
1711
  rmSync(staging, { recursive: true, force: true });
@@ -1592,11 +1714,11 @@ var setupVsCode = async (apiKey) => {
1592
1714
  recursive: true,
1593
1715
  filter: (p) => !["tools", "node_modules", ".git", ".DS_Store"].includes(basename(p))
1594
1716
  });
1595
- const staged = readJsonSafe(join4(staging, ".claude-plugin", "plugin.json"));
1717
+ const staged = readJsonSafe(join5(staging, ".claude-plugin", "plugin.json"));
1596
1718
  if (staged.kind !== "ok") {
1597
1719
  throw new Error("staged VS Code plugin is missing or has an unreadable plugin.json");
1598
1720
  }
1599
- const hadExisting = existsSync(VSCODE_PLUGIN_DIR);
1721
+ const hadExisting = existsSync2(VSCODE_PLUGIN_DIR);
1600
1722
  if (hadExisting) renameSync(VSCODE_PLUGIN_DIR, backup);
1601
1723
  try {
1602
1724
  renameSync(staging, VSCODE_PLUGIN_DIR);
@@ -1744,7 +1866,7 @@ var setupFx = async () => {
1744
1866
  console.log(` ${yellow("!")} fx does not run on Windows. Skipping.`);
1745
1867
  return "skipped";
1746
1868
  }
1747
- if (!existsSync(fxConfigDir())) {
1869
+ if (!existsSync2(fxConfigDir())) {
1748
1870
  console.log(` ${yellow("!")} fx not found (${fxConfigDir()} does not exist). Skipping.`);
1749
1871
  console.log(` ${dim("Install fx from https://fx.sh, run it once, then re-run setup.")}`);
1750
1872
  return "skipped";
@@ -1874,7 +1996,7 @@ var setupOpenCode = async (apiKey) => {
1874
1996
  console.log(`
1875
1997
  ${bold("Setting up OpenCode")}
1876
1998
  `);
1877
- if (!isInstalled("opencode") && !existsSync(openCodeConfigDir())) {
1999
+ if (!isInstalled("opencode") && !existsSync2(openCodeConfigDir())) {
1878
2000
  console.log(` ${yellow("!")} OpenCode not found. Skipping.`);
1879
2001
  console.log(` ${dim("Install OpenCode and re-run setup to configure.")}`);
1880
2002
  return "skipped";
@@ -1976,27 +2098,27 @@ var agentIsWired = async (agent) => {
1976
2098
  return claudeWired({
1977
2099
  claudeJson: readJson2(CLAUDE_JSON),
1978
2100
  settings: readJson2(CLAUDE_SETTINGS),
1979
- skillExists: existsSync(join4(CLAUDE_SKILL_DIR, "SKILL.md"))
2101
+ skillExists: existsSync2(join5(CLAUDE_SKILL_DIR, "SKILL.md"))
1980
2102
  });
1981
2103
  case "codex": {
1982
2104
  let config = null;
1983
2105
  try {
1984
- config = parseTOML(readFileSync(join4(CODEX_HOME, "config.toml"), "utf-8"));
2106
+ config = parseTOML(readFileSync(join5(CODEX_HOME, "config.toml"), "utf-8"));
1985
2107
  } catch {
1986
2108
  config = null;
1987
2109
  }
1988
2110
  return codexWired({
1989
2111
  config,
1990
2112
  hooks: readJson2(CODEX_HOOKS_JSON),
1991
- skillExists: existsSync(join4(CODEX_SKILL_DIR, "SKILL.md"))
2113
+ skillExists: existsSync2(join5(CODEX_SKILL_DIR, "SKILL.md"))
1992
2114
  });
1993
2115
  }
1994
2116
  case "gemini_cli":
1995
2117
  return geminiWired({ settings: readJson2(GEMINI_SETTINGS) });
1996
2118
  case "cursor":
1997
- return existsSync(join4(CURSOR_PLUGIN_DIR, "mcp.json"));
2119
+ return existsSync2(join5(CURSOR_PLUGIN_DIR, "mcp.json"));
1998
2120
  case "vscode":
1999
- return existsSync(VSCODE_PLUGIN_MCP);
2121
+ return existsSync2(VSCODE_PLUGIN_MCP);
2000
2122
  case "opencode":
2001
2123
  return openCodeWired();
2002
2124
  case "fx":
@@ -2049,7 +2171,7 @@ var setupCompatibleAgent = (profile) => async (apiKey) => {
2049
2171
  console.log(`
2050
2172
  ${bold(`Setting up ${profile.label}`)}
2051
2173
  `);
2052
- if (!isInstalled(profile.binary) && (profile.configDirIsShared || !existsSync(dirname3(configFile)))) {
2174
+ if (!isInstalled(profile.binary) && (profile.configDirIsShared || !existsSync2(dirname3(configFile)))) {
2053
2175
  console.log(` ${yellow("!")} ${profile.label} not found. Skipping.`);
2054
2176
  console.log(` ${dim(`Install ${profile.label} and re-run setup to configure.`)}`);
2055
2177
  return "skipped";
@@ -2156,8 +2278,8 @@ var offerProjectInstructions = async (agents, options) => {
2156
2278
  });
2157
2279
  if (!wanted) return;
2158
2280
  for (const target of targets) {
2159
- await spinner(`Writing managed block to ${join4(process.cwd(), target.file)}`, async () => {
2160
- writeInstructionBlock(join4(process.cwd(), target.file), renderProjectAgentInstructions(target.label));
2281
+ await spinner(`Writing managed block to ${join5(process.cwd(), target.file)}`, async () => {
2282
+ writeInstructionBlock(join5(process.cwd(), target.file), renderProjectAgentInstructions(target.label));
2161
2283
  }, { optional: true });
2162
2284
  }
2163
2285
  console.log(` ${dim("Commit the file to share it. Teammates without a key fall back to the terminal.")}`);
@@ -2380,7 +2502,7 @@ var resolveAgents = async (options) => {
2380
2502
  deadline.stop();
2381
2503
  }
2382
2504
  };
2383
- var AGENT_TARGETS = agentSetupTargets(existsSync);
2505
+ var AGENT_TARGETS = agentSetupTargets(existsSync2);
2384
2506
  var reportDryRun = (apiKey, agents, keyCheck, controlMode) => {
2385
2507
  console.log();
2386
2508
  console.log(` ${bold("Dry run.")} ${dim("Nothing below has been written.")}`);
@@ -2425,6 +2547,10 @@ var printManualSteps = () => {
2425
2547
  for (const step of manualSteps) console.log(` ${dim("\u2022")} ${step}`);
2426
2548
  console.log();
2427
2549
  };
2550
+ var announceSetupHandoff = (line) => {
2551
+ console.log();
2552
+ console.log(` ${yellow("!")} ${line}`);
2553
+ };
2428
2554
  var emitJson = async (options, payload) => {
2429
2555
  if (!options.json) return;
2430
2556
  await writeStdoutFully(`${JSON.stringify(payload, null, 2)}
@@ -2456,6 +2582,11 @@ var main = async () => {
2456
2582
  `);
2457
2583
  };
2458
2584
  }
2585
+ const handoff = await handOffSetupWhenNpmHoldsThisRelease(
2586
+ { setupArgs: argumentsAfterSetup(process.argv.slice(2)), dryRun: options.dryRun },
2587
+ localSetupHandoffEffects(announceSetupHandoff)
2588
+ );
2589
+ if (handoff.kind === "handed_off") process.exit(handoff.exitCode);
2459
2590
  const version = getPackageVersion();
2460
2591
  console.log();
2461
2592
  console.log(` ${bold("Pushary")} ${dim("v" + version)}`);
@@ -2949,7 +3080,7 @@ var main = async () => {
2949
3080
  });
2950
3081
  console.log(` ${yellow("!")} Retired the legacy phone-start service because it could not be safely repinned: ${legacyRuntimeFailure}`);
2951
3082
  }
2952
- if (!retired && stopped.kind === "ok") warnVersionManagerPin(serviceNodeFor(process.execPath, existsSync));
3083
+ if (!retired && stopped.kind === "ok") warnVersionManagerPin(serviceNodeFor(process.execPath, existsSync2));
2953
3084
  }
2954
3085
  if (controlMode === "on" && controlPolicy !== "enabled") {
2955
3086
  console.log(` ${yellow("!")} Phone-start was required: ${describeMissingControlPrerequisite(providerAvailable ? "service-manager" : "provider")}.`);
@@ -2966,7 +3097,7 @@ var main = async () => {
2966
3097
  controlFailureStage = "service-install";
2967
3098
  const service = await replaceDaemonService();
2968
3099
  if (service.kind === "ok") {
2969
- warnVersionManagerPin(serviceNodeFor(process.execPath, existsSync));
3100
+ warnVersionManagerPin(serviceNodeFor(process.execPath, existsSync2));
2970
3101
  reportLinger(lingerReportOf(keepLinuxDaemonAfterLogout()));
2971
3102
  controlFailureStage = "daemon-start";
2972
3103
  daemon = await ensureDaemonRunning({ spawnDaemon: () => {