pushary 1.9.260 → 1.9.262

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 (147) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +6 -0
  3. package/dist/{api-IT47BCBQ.js → api-TGVE6ZKD.js} +11 -11
  4. package/dist/bin/pushary-audit.js +3 -3
  5. package/dist/bin/pushary-bell-hook.js +29 -29
  6. package/dist/bin/pushary-bell.js +12 -12
  7. package/dist/bin/pushary-calls.js +15 -15
  8. package/dist/bin/pushary-claude.js +26 -26
  9. package/dist/bin/pushary-clean.js +40 -40
  10. package/dist/bin/pushary-codex-bridge.js +23 -23
  11. package/dist/bin/pushary-codex-hook.js +36 -36
  12. package/dist/bin/pushary-codex-session.js +8 -8
  13. package/dist/bin/pushary-codex.js +16 -16
  14. package/dist/bin/pushary-connect.js +36 -36
  15. package/dist/bin/pushary-cowork.js +5 -5
  16. package/dist/bin/pushary-daemon.js +47 -47
  17. package/dist/bin/pushary-disconnect.js +31 -31
  18. package/dist/bin/pushary-display-hook.js +60 -2
  19. package/dist/bin/pushary-doctor.js +143 -48
  20. package/dist/bin/pushary-elicitation-hook.js +28 -28
  21. package/dist/bin/pushary-gemini-bridge.js +18 -18
  22. package/dist/bin/pushary-gemini-hook.js +32 -32
  23. package/dist/bin/pushary-hook.js +36 -36
  24. package/dist/bin/pushary-login.js +41 -23
  25. package/dist/bin/pushary-logout.js +32 -32
  26. package/dist/bin/pushary-mcp.js +12 -12
  27. package/dist/bin/pushary-mode.js +16 -16
  28. package/dist/bin/pushary-notification-hook.js +28 -28
  29. package/dist/bin/pushary-opencode-bridge.js +22 -22
  30. package/dist/bin/pushary-opencode-hook.js +33 -33
  31. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  32. package/dist/bin/pushary-permission-hook.js +36 -36
  33. package/dist/bin/pushary-post-hook.js +31 -31
  34. package/dist/bin/pushary-prompt-hook.js +28 -28
  35. package/dist/bin/pushary-session-end-hook.js +28 -28
  36. package/dist/bin/pushary-session-start-hook.js +40 -40
  37. package/dist/bin/pushary-sessions.js +12 -12
  38. package/dist/bin/pushary-setup.js +174 -82
  39. package/dist/bin/pushary-stats.js +5 -5
  40. package/dist/bin/pushary-status.js +37 -37
  41. package/dist/bin/pushary-stop-hook.js +28 -28
  42. package/dist/bin/pushary-stopfailure-hook.js +28 -28
  43. package/dist/bin/pushary-suggestions.js +16 -16
  44. package/dist/bin/pushary-transcript-register.js +17 -17
  45. package/dist/bin/pushary-transcripts.js +26 -26
  46. package/dist/bin/pushary-upgrade.js +48 -48
  47. package/dist/bin/pushary-wait.js +16 -16
  48. package/dist/bin/pushary.js +7 -7
  49. package/dist/{chunk-QYQMIAYH.js → chunk-23ELMB2F.js} +2 -2
  50. package/dist/{chunk-Y2OJGMJX.js → chunk-2DYJTOOU.js} +3 -3
  51. package/dist/{chunk-V3YAXCQU.js → chunk-2Q3ZTT57.js} +7 -7
  52. package/dist/{chunk-I7TBQ7S5.js → chunk-43DXK6WE.js} +1 -1
  53. package/dist/{chunk-2G3DG3NV.js → chunk-5K5MT22J.js} +4 -4
  54. package/dist/{chunk-XYSD5VPQ.js → chunk-5SVZXCAJ.js} +1 -1
  55. package/dist/{chunk-YAUW3PBG.js → chunk-67UJTXRZ.js} +1 -1
  56. package/dist/{chunk-7B27SJIZ.js → chunk-73ROMTIN.js} +6 -6
  57. package/dist/{chunk-7BJQM5GI.js → chunk-APTFA4KF.js} +1 -1
  58. package/dist/{chunk-4EGBDV3T.js → chunk-AURPPDRZ.js} +2 -2
  59. package/dist/{chunk-JBXHNML3.js → chunk-BTSJ2W7I.js} +1 -1
  60. package/dist/{chunk-EZI67YOT.js → chunk-BZ2V2ES3.js} +5 -5
  61. package/dist/{chunk-JWBRJTPT.js → chunk-C4D6R27P.js} +5 -5
  62. package/dist/{chunk-RLTFMU3B.js → chunk-CAOMKUSR.js} +4 -4
  63. package/dist/{chunk-DTSWVMTP.js → chunk-CC6BYFNM.js} +6 -6
  64. package/dist/{chunk-HD3ECNDC.js → chunk-CTTIW2A3.js} +2 -2
  65. package/dist/{chunk-AWRQHXQK.js → chunk-CXGRUUUM.js} +10 -10
  66. package/dist/{chunk-CTG3F2D5.js → chunk-D2666AVW.js} +6 -6
  67. package/dist/{chunk-C3EE5L6V.js → chunk-DIHUVYT2.js} +147 -40
  68. package/dist/{chunk-FUNDDXWK.js → chunk-DOMSM62I.js} +2 -2
  69. package/dist/{chunk-SFXNXZA5.js → chunk-DS3C4SRR.js} +2 -2
  70. package/dist/{chunk-6EE4F4PG.js → chunk-DU2YTOTA.js} +1 -1
  71. package/dist/{chunk-HQ6RWSWN.js → chunk-DU5MLJQL.js} +1 -1
  72. package/dist/{chunk-3VYL4GCX.js → chunk-EHH4PQG7.js} +4 -4
  73. package/dist/{chunk-277GOA5S.js → chunk-EPT6MZBG.js} +5 -5
  74. package/dist/{chunk-LDXGL2QH.js → chunk-EVJ5DPRU.js} +1 -1
  75. package/dist/{chunk-HUMF6AIT.js → chunk-F6LNIS2Y.js} +1 -1
  76. package/dist/{chunk-U7VDCUWD.js → chunk-FKYZEIH7.js} +10 -10
  77. package/dist/{chunk-KQVVDMUD.js → chunk-FNDKQEJP.js} +4 -4
  78. package/dist/{chunk-B3MTDMWH.js → chunk-FURJQUDT.js} +2 -2
  79. package/dist/{chunk-LG47IOFN.js → chunk-H4DPB3LK.js} +8 -8
  80. package/dist/{chunk-ZO65DKXG.js → chunk-H4XEEC4I.js} +2 -2
  81. package/dist/{chunk-BX2A6VVT.js → chunk-HB3S3KDX.js} +1 -1
  82. package/dist/{chunk-QXI7SYVB.js → chunk-HMN4XEJE.js} +4 -4
  83. package/dist/{chunk-2WLNEOT7.js → chunk-HSVVH7K2.js} +1 -1
  84. package/dist/{chunk-JHBGO2PF.js → chunk-HVY3YUJU.js} +1 -1
  85. package/dist/{chunk-DLJ4ZGPG.js → chunk-HZ76NLD2.js} +6 -6
  86. package/dist/{chunk-WAT7A5DW.js → chunk-I4D4XEIJ.js} +5 -5
  87. package/dist/{chunk-6JTLZZ32.js → chunk-IHH3HGQQ.js} +3 -3
  88. package/dist/{chunk-ELXKZ6XS.js → chunk-IK4MIPI2.js} +3 -3
  89. package/dist/{chunk-ATGFCOLG.js → chunk-IMSFJFN6.js} +1 -1
  90. package/dist/{chunk-X27JRAYF.js → chunk-IS5WMKN2.js} +3 -3
  91. package/dist/{chunk-3W5AT2Y4.js → chunk-J7V5ZFZC.js} +6 -6
  92. package/dist/{chunk-PGP4AQ6G.js → chunk-JG4JGAI2.js} +4 -4
  93. package/dist/{chunk-HUK6GLBG.js → chunk-JOQAW5BM.js} +12 -12
  94. package/dist/{chunk-BJ3PEW5V.js → chunk-JUCN4TV4.js} +5 -5
  95. package/dist/{chunk-QHF3SYTV.js → chunk-JVZCCUN4.js} +5 -5
  96. package/dist/{chunk-S5GQCO2I.js → chunk-K5ZEJCJO.js} +3 -3
  97. package/dist/{chunk-DRCBTY5T.js → chunk-KEC73KH6.js} +1 -1
  98. package/dist/{chunk-3N2FP6BB.js → chunk-LE6VFEJU.js} +1 -1
  99. package/dist/{chunk-6CI7KSDE.js → chunk-LZRXFGEP.js} +49 -3
  100. package/dist/chunk-MJW6P7A6.js +129 -0
  101. package/dist/{chunk-2D5MYSTO.js → chunk-NHLCREFU.js} +1 -1
  102. package/dist/{chunk-ITRSDEVH.js → chunk-NLW2YDL5.js} +5 -5
  103. package/dist/{chunk-OOWMON6B.js → chunk-OAE54AV7.js} +1 -1
  104. package/dist/{chunk-LO6EAFRS.js → chunk-Q54QQO5E.js} +5 -5
  105. package/dist/{chunk-R5AX37KI.js → chunk-QGYVOSDC.js} +1 -1
  106. package/dist/{chunk-IJUHRBKA.js → chunk-QIOPWRBQ.js} +1 -1
  107. package/dist/{chunk-DDRT2WJA.js → chunk-QWSXLYTX.js} +3 -3
  108. package/dist/{chunk-GIHIYB3Q.js → chunk-R33I7ZNR.js} +5 -5
  109. package/dist/{chunk-Z43TNC27.js → chunk-RA4RSVVJ.js} +1 -1
  110. package/dist/{chunk-6WBHZHZS.js → chunk-RX75OG6S.js} +6 -6
  111. package/dist/{chunk-S3R4CZT3.js → chunk-SCXUTDQM.js} +3 -3
  112. package/dist/{chunk-GNY6Z2U2.js → chunk-SG4IFPJP.js} +1 -1
  113. package/dist/{chunk-E7XXDMHV.js → chunk-SLD22IUB.js} +4 -4
  114. package/dist/{chunk-MR3JQ3LS.js → chunk-SOJPAKCB.js} +1 -1
  115. package/dist/{chunk-6FEJR64W.js → chunk-T4EVAVKF.js} +5 -5
  116. package/dist/{chunk-W6FZOPF4.js → chunk-V6MQUYE2.js} +7 -7
  117. package/dist/{chunk-JHPL4VBE.js → chunk-VDPUBIL2.js} +2 -2
  118. package/dist/{chunk-DP3AS752.js → chunk-VL4AJPCE.js} +4 -4
  119. package/dist/{chunk-63R6OZXQ.js → chunk-VSW5ZMPX.js} +3 -3
  120. package/dist/{chunk-DC32YKE2.js → chunk-VZVKJP3Q.js} +75 -3
  121. package/dist/{chunk-DLCLDR6K.js → chunk-W7QW3XFQ.js} +4 -4
  122. package/dist/{chunk-2MRIJ7TX.js → chunk-WCOI5PQU.js} +1 -1
  123. package/dist/{chunk-5J5JO5UQ.js → chunk-WFUVBCKK.js} +4 -4
  124. package/dist/{chunk-GFDMYQGZ.js → chunk-WOEMRT24.js} +3 -3
  125. package/dist/{chunk-64KRDJ46.js → chunk-WTFR2OK4.js} +38 -26
  126. package/dist/{chunk-XGF3JB3R.js → chunk-WV7OME3F.js} +2 -2
  127. package/dist/{chunk-SBY4JFPZ.js → chunk-WYYHSHBO.js} +2 -2
  128. package/dist/{chunk-CXSLZIBE.js → chunk-YEIHJAE6.js} +3 -3
  129. package/dist/{chunk-PFGQS4QA.js → chunk-YQTU6V4X.js} +2 -2
  130. package/dist/{chunk-HITBECZ4.js → chunk-ZPM6H6GM.js} +1 -1
  131. package/dist/{codex-app-cards-switch-WVE7EY3Q.js → codex-app-cards-switch-CQZL4XI6.js} +12 -12
  132. package/dist/{codex-card-routing-TW5PGTDQ.js → codex-card-routing-VV2HQAGX.js} +2 -2
  133. package/dist/{codex-desktop-launch-HCWAIOUD.js → codex-desktop-launch-FYXOQGBR.js} +3 -3
  134. package/dist/{codex-session-launch-QE7ET6HE.js → codex-session-launch-A4LDZ4GU.js} +20 -20
  135. package/dist/{config-G3A5OUOA.js → config-EHAN6BUF.js} +3 -3
  136. package/dist/{global-upgrade-RMVGM26D.js → global-upgrade-EJZ2EX7R.js} +9 -9
  137. package/dist/{identity-5YOIBGSM.js → identity-L7SFKUOG.js} +4 -4
  138. package/dist/{live-capabilities-DXRASGGQ.js → live-capabilities-QAVKVTKD.js} +4 -4
  139. package/dist/{paths-JZZB2B5C.js → paths-BD7XIUNJ.js} +3 -3
  140. package/dist/reapply-QFSUMRID.js +76 -0
  141. package/dist/src/index.d.ts +1 -0
  142. package/dist/src/index.js +34 -34
  143. package/dist/{upgrade-lock-RPTYWUWT.js → upgrade-lock-Y35PJNJT.js} +4 -4
  144. package/dist/{usage-LFHZHCB5.js → usage-E5Z3XUTZ.js} +3 -3
  145. package/package.json +1 -1
  146. package/dist/chunk-KQXWREMT.js +0 -69
  147. package/dist/reapply-55YYSVPF.js +0 -76
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  withUpgradeLock
4
- } from "../chunk-7B27SJIZ.js";
5
- import "../chunk-SFXNXZA5.js";
4
+ } from "../chunk-73ROMTIN.js";
5
+ import "../chunk-DS3C4SRR.js";
6
6
  import {
7
7
  browserEntryUrl,
8
8
  cancelLogin,
9
+ installRunExitGuard,
9
10
  listenForThisTerminal,
10
11
  localConfirmStateHash,
11
12
  newLocalConfirmState,
@@ -14,7 +15,7 @@ import {
14
15
  runBrowserLogin,
15
16
  startLogin,
16
17
  waitForLogin
17
- } from "../chunk-6CI7KSDE.js";
18
+ } from "../chunk-LZRXFGEP.js";
18
19
  import {
19
20
  FREE_DISK_SPACE_STEP,
20
21
  INSTALL_NODE_STEP,
@@ -31,7 +32,7 @@ import {
31
32
  stepsBlockingAgentsFirst,
32
33
  teamOfferLines,
33
34
  unverifiedKeyClosingReason
34
- } from "../chunk-QHF3SYTV.js";
35
+ } from "../chunk-JVZCCUN4.js";
35
36
  import {
36
37
  WRONG_ACCOUNT_HINT,
37
38
  canAskAtTheTerminal,
@@ -55,33 +56,33 @@ import {
55
56
  someoneIsAtTheTerminal,
56
57
  switchBackToTheShellKeyLine,
57
58
  wrongAccountHintPlacement
58
- } from "../chunk-KQVVDMUD.js";
59
+ } from "../chunk-FNDKQEJP.js";
59
60
  import {
60
61
  NO_AGENT_CONNECTED_LINE,
61
62
  instructionsChannelFor,
62
63
  pairingComputerOf,
63
64
  planPhoneCheck
64
- } from "../chunk-YAUW3PBG.js";
65
+ } from "../chunk-67UJTXRZ.js";
65
66
  import {
66
67
  coworkOutput,
67
68
  coworkSelection
68
- } from "../chunk-S3R4CZT3.js";
69
+ } from "../chunk-SCXUTDQM.js";
69
70
  import {
70
71
  canOpenBrowser,
71
72
  openInBrowser
72
73
  } from "../chunk-PUZZELE6.js";
73
74
  import {
74
75
  readCodexHooksOnDisk
75
- } from "../chunk-U7VDCUWD.js";
76
+ } from "../chunk-FKYZEIH7.js";
76
77
  import {
77
78
  macAppHistoryDecision,
78
79
  nativeBridgeAccount
79
80
  } from "../chunk-TWWOQKXK.js";
80
- import "../chunk-QYQMIAYH.js";
81
+ import "../chunk-23ELMB2F.js";
81
82
  import {
82
83
  clearDeclinedAgent,
83
84
  declinedAgentForSetupChoice
84
- } from "../chunk-SBY4JFPZ.js";
85
+ } from "../chunk-WYYHSHBO.js";
85
86
  import {
86
87
  OPENCLAW_RESTART_NOTE,
87
88
  describeOpenClawInstallFailure,
@@ -89,7 +90,7 @@ import {
89
90
  gateHermesShell,
90
91
  readHermesShellGate,
91
92
  saveSetupFailure
92
- } from "../chunk-6FEJR64W.js";
93
+ } from "../chunk-T4EVAVKF.js";
93
94
  import {
94
95
  CODEX_NEEDS_A_NEWER_VERSION,
95
96
  CODEX_SETTINGS_STOP_A_HOOK,
@@ -105,14 +106,14 @@ import {
105
106
  describeHermesState,
106
107
  hermesGateShellCommand,
107
108
  needsCodexTrustStep
108
- } from "../chunk-PGP4AQ6G.js";
109
+ } from "../chunk-JG4JGAI2.js";
109
110
  import {
110
111
  describeWaitLadder
111
112
  } from "../chunk-CVWG2N3Y.js";
112
113
  import {
113
114
  writeJsonError,
114
115
  writeStdoutFully
115
- } from "../chunk-R5AX37KI.js";
116
+ } from "../chunk-QGYVOSDC.js";
116
117
  import {
117
118
  EXIT_ABORTED,
118
119
  EXIT_TERMINATED,
@@ -142,7 +143,7 @@ import {
142
143
  startPairing,
143
144
  waitForYourPhone,
144
145
  writeStatusLine
145
- } from "../chunk-DTSWVMTP.js";
146
+ } from "../chunk-CC6BYFNM.js";
146
147
  import {
147
148
  generateKeypair,
148
149
  publicKeyFingerprint
@@ -154,7 +155,7 @@ import {
154
155
  roundTripEvidence,
155
156
  roundTripWasAnswered,
156
157
  verifyRoundTrip
157
- } from "../chunk-CTG3F2D5.js";
158
+ } from "../chunk-D2666AVW.js";
158
159
  import {
159
160
  keepLinuxDaemonAfterLogout,
160
161
  lingerReportOf
@@ -162,13 +163,13 @@ import {
162
163
  import {
163
164
  readManagedControlEvidence,
164
165
  waitForMachineReadiness
165
- } from "../chunk-BJ3PEW5V.js";
166
+ } from "../chunk-JUCN4TV4.js";
166
167
  import {
167
168
  ensureCodexTrustsPusharyHooks,
168
169
  hermesHistoryHelperRecordPath,
169
170
  hermesHistoryNeedsTheCliHelper,
170
171
  recordInstalledHermesHistoryHelper
171
- } from "../chunk-Y2OJGMJX.js";
172
+ } from "../chunk-2DYJTOOU.js";
172
173
  import {
173
174
  scheduleWithTimer
174
175
  } from "../chunk-AVFPHV4N.js";
@@ -179,7 +180,7 @@ import {
179
180
  } from "../chunk-XNF5DVAF.js";
180
181
  import {
181
182
  codexEngineBehindLauncher
182
- } from "../chunk-5J5JO5UQ.js";
183
+ } from "../chunk-WFUVBCKK.js";
183
184
  import "../chunk-XCEN33UP.js";
184
185
  import {
185
186
  CODEX_ENGINE_DIRECTORY,
@@ -196,7 +197,7 @@ import {
196
197
  soleGateLeftAloneFor,
197
198
  soleGateReceipt,
198
199
  soleGateReceiptFile
199
- } from "../chunk-3VYL4GCX.js";
200
+ } from "../chunk-EHH4PQG7.js";
200
201
  import {
201
202
  describeDetection,
202
203
  detectAllAgents,
@@ -206,14 +207,14 @@ import {
206
207
  registerPluginLocation,
207
208
  shortenHome,
208
209
  vscodeSettingsTargets
209
- } from "../chunk-277GOA5S.js";
210
+ } from "../chunk-EPT6MZBG.js";
210
211
  import {
211
212
  revokeOwnKey
212
213
  } from "../chunk-OYIN77HO.js";
213
214
  import {
214
215
  mcpServerBearer,
215
216
  readMacAppAgentKey
216
- } from "../chunk-DP3AS752.js";
217
+ } from "../chunk-VL4AJPCE.js";
217
218
  import {
218
219
  HERMES_CONFIG_FILE,
219
220
  HERMES_GATE_TOOLS_KEY,
@@ -232,7 +233,7 @@ import {
232
233
  routesHermesQuestions,
233
234
  runsAnOlderPlugin,
234
235
  shippedHermesPlugin
235
- } from "../chunk-RLTFMU3B.js";
236
+ } from "../chunk-CAOMKUSR.js";
236
237
  import {
237
238
  setHumanStream
238
239
  } from "../chunk-QCGNGEGE.js";
@@ -240,7 +241,7 @@ import {
240
241
  findOpenClawLauncher,
241
242
  isOpenClawWired,
242
243
  openClawPathsNow
243
- } from "../chunk-X27JRAYF.js";
244
+ } from "../chunk-IS5WMKN2.js";
244
245
  import {
245
246
  FX_PICKS_UP_CONFIGURATION,
246
247
  FX_PUSHARY_TOOLS_RULE,
@@ -257,7 +258,7 @@ import {
257
258
  readFxProfileForSetup,
258
259
  withFxPusharyServer,
259
260
  writeFxProfile
260
- } from "../chunk-WAT7A5DW.js";
261
+ } from "../chunk-I4D4XEIJ.js";
261
262
  import {
262
263
  AgentConfigError,
263
264
  afterAgentFailureNote,
@@ -270,10 +271,10 @@ import {
270
271
  retryAgentCommand,
271
272
  writeSetupConfigFile,
272
273
  writeSetupConfigJson
273
- } from "../chunk-6JTLZZ32.js";
274
+ } from "../chunk-IHH3HGQQ.js";
274
275
  import {
275
276
  MCP_BRIDGE_BINARY
276
- } from "../chunk-DLCLDR6K.js";
277
+ } from "../chunk-W7QW3XFQ.js";
277
278
  import {
278
279
  OPENCODE_HOOK_BINARY,
279
280
  addOpenCodeMcpServer,
@@ -292,12 +293,12 @@ import {
292
293
  openCodePluginFile,
293
294
  openCodeWired,
294
295
  withOpenCodeAskRules
295
- } from "../chunk-W6FZOPF4.js";
296
- import "../chunk-ATGFCOLG.js";
297
- import "../chunk-IJUHRBKA.js";
296
+ } from "../chunk-V6MQUYE2.js";
297
+ import "../chunk-IMSFJFN6.js";
298
+ import "../chunk-QIOPWRBQ.js";
298
299
  import {
299
300
  keyScopeOf
300
- } from "../chunk-FUNDDXWK.js";
301
+ } from "../chunk-DOMSM62I.js";
301
302
  import {
302
303
  ansiPainter,
303
304
  ciMarker,
@@ -306,7 +307,7 @@ import {
306
307
  describeError,
307
308
  isCI,
308
309
  useColor
309
- } from "../chunk-DRCBTY5T.js";
310
+ } from "../chunk-KEC73KH6.js";
310
311
  import {
311
312
  checkCodexInstall,
312
313
  describeMissingControlPrerequisite,
@@ -319,16 +320,16 @@ import {
319
320
  nodeCodexInstallProbe,
320
321
  phoneStartIsRequired,
321
322
  resolveControlPolicy
322
- } from "../chunk-63R6OZXQ.js";
323
+ } from "../chunk-VSW5ZMPX.js";
323
324
  import {
324
325
  detectClaudeVersion
325
- } from "../chunk-HITBECZ4.js";
326
+ } from "../chunk-ZPM6H6GM.js";
326
327
  import "../chunk-TCE3J44Z.js";
327
328
  import {
328
329
  describeAutoUpdateAnnouncement,
329
330
  takeAutoUpdateAnnouncement
330
- } from "../chunk-ZO65DKXG.js";
331
- import "../chunk-DDRT2WJA.js";
331
+ } from "../chunk-H4XEEC4I.js";
332
+ import "../chunk-QWSXLYTX.js";
332
333
  import "../chunk-WHB622LP.js";
333
334
  import {
334
335
  addCompatibleHooks,
@@ -343,8 +344,8 @@ import {
343
344
  compatibleRecord,
344
345
  compatibleTargetPaths,
345
346
  hasCompatibleHooks
346
- } from "../chunk-DLJ4ZGPG.js";
347
- import "../chunk-Z43TNC27.js";
347
+ } from "../chunk-HZ76NLD2.js";
348
+ import "../chunk-RA4RSVVJ.js";
348
349
  import {
349
350
  DAEMON_COLD_START_TIMEOUT_MS,
350
351
  clearDaemonNeedsLogin,
@@ -363,7 +364,7 @@ import {
363
364
  stopDaemonService,
364
365
  versionManagerOf,
365
366
  waitForDaemonRemoteProof
366
- } from "../chunk-3W5AT2Y4.js";
367
+ } from "../chunk-J7V5ZFZC.js";
367
368
  import {
368
369
  GEMINI_HOOK_BINARY,
369
370
  GEMINI_HOOK_EVENTS,
@@ -377,38 +378,39 @@ import {
377
378
  geminiWired,
378
379
  planHooks,
379
380
  pusharyHookExecutable
380
- } from "../chunk-2G3DG3NV.js";
381
+ } from "../chunk-5K5MT22J.js";
381
382
  import {
382
- reportEvent
383
- } from "../chunk-C3EE5L6V.js";
384
- import "../chunk-JHBGO2PF.js";
383
+ reportEvent,
384
+ telemetryOptedOut
385
+ } from "../chunk-DIHUVYT2.js";
386
+ import "../chunk-HVY3YUJU.js";
385
387
  import {
386
388
  AGENT_CHOICES,
387
389
  effectiveAgentSelection,
388
390
  effectiveControlMode,
389
391
  effectiveVerify,
390
392
  parseSetupOptions
391
- } from "../chunk-2D5MYSTO.js";
392
- import "../chunk-I7TBQ7S5.js";
393
+ } from "../chunk-NHLCREFU.js";
394
+ import "../chunk-43DXK6WE.js";
393
395
  import "../chunk-BZIBNSQE.js";
394
396
  import {
395
397
  transcriptPreferenceForSetup
396
- } from "../chunk-6EE4F4PG.js";
398
+ } from "../chunk-DU2YTOTA.js";
397
399
  import "../chunk-P6DUWKAO.js";
398
400
  import "../chunk-3PSNUHC5.js";
399
- import "../chunk-6WBHZHZS.js";
400
- import "../chunk-HUMF6AIT.js";
401
+ import "../chunk-RX75OG6S.js";
402
+ import "../chunk-F6LNIS2Y.js";
401
403
  import "../chunk-POFBE6ZY.js";
402
- import "../chunk-JWBRJTPT.js";
403
- import "../chunk-3N2FP6BB.js";
404
- import "../chunk-LDXGL2QH.js";
404
+ import "../chunk-C4D6R27P.js";
405
+ import "../chunk-LE6VFEJU.js";
406
+ import "../chunk-EVJ5DPRU.js";
405
407
  import {
406
408
  checkApiKey,
407
409
  describeKeyCheck,
408
410
  samePusharyAccount
409
- } from "../chunk-CXSLZIBE.js";
410
- import "../chunk-ELXKZ6XS.js";
411
- import "../chunk-2WLNEOT7.js";
411
+ } from "../chunk-YEIHJAE6.js";
412
+ import "../chunk-IK4MIPI2.js";
413
+ import "../chunk-HSVVH7K2.js";
412
414
  import {
413
415
  KEY_FILE_MODE,
414
416
  keyEnvFilePath,
@@ -422,10 +424,10 @@ import {
422
424
  resolveShellRc,
423
425
  shellKeyWasReplaced,
424
426
  writeKey
425
- } from "../chunk-S5GQCO2I.js";
427
+ } from "../chunk-K5ZEJCJO.js";
426
428
  import {
427
429
  reportedInstallSource
428
- } from "../chunk-HD3ECNDC.js";
430
+ } from "../chunk-CTTIW2A3.js";
429
431
  import {
430
432
  CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
431
433
  CLINE_AUTO_APPROVE_STEP,
@@ -485,7 +487,7 @@ import {
485
487
  vscodePluginDir,
486
488
  vscodePluginMcp,
487
489
  writeInstructionBlock
488
- } from "../chunk-4EGBDV3T.js";
490
+ } from "../chunk-AURPPDRZ.js";
489
491
  import {
490
492
  compareVersion,
491
493
  parseVersion
@@ -507,11 +509,11 @@ import {
507
509
  runNpmInTerminal,
508
510
  setupNeedsGlobalInstall,
509
511
  setupWouldDowngrade
510
- } from "../chunk-E7XXDMHV.js";
512
+ } from "../chunk-SLD22IUB.js";
511
513
  import {
512
514
  getBaseUrl,
513
515
  readApiKey
514
- } from "../chunk-XGF3JB3R.js";
516
+ } from "../chunk-WV7OME3F.js";
515
517
  import {
516
518
  UsageError
517
519
  } from "../chunk-CINBAX5G.js";
@@ -523,7 +525,7 @@ import {
523
525
  NPX_LATEST_COMMAND,
524
526
  isInvocationOf,
525
527
  renderCommandHelp
526
- } from "../chunk-7BJQM5GI.js";
528
+ } from "../chunk-APTFA4KF.js";
527
529
  import {
528
530
  EXIT
529
531
  } from "../chunk-BG4HHB7E.js";
@@ -539,6 +541,7 @@ import {
539
541
  HOOK_COMPATIBLE_PROFILES,
540
542
  PHONE_SIGN_IN_CLIENT_HEADER,
541
543
  PRETOOLUSE_GATED_TOOLS,
544
+ SETUP_STARTED_PHASE,
542
545
  SETUP_STOPPED_PATH,
543
546
  SUPPORT_EMAIL,
544
547
  TERMINAL_PHONE_SIGN_IN_CLIENT,
@@ -547,8 +550,9 @@ import {
547
550
  isApprovalMode,
548
551
  isRecord,
549
552
  isTimeoutAction,
550
- isValidApiKey
551
- } from "../chunk-DC32YKE2.js";
553
+ isValidApiKey,
554
+ setupCrashKindOf
555
+ } from "../chunk-VZVKJP3Q.js";
552
556
  import "../chunk-MLKGABMK.js";
553
557
 
554
558
  // bin/pushary-setup.ts
@@ -1448,7 +1452,19 @@ var connectOutcomeOf = (roundTrip, phone) => {
1448
1452
  return phone.reachesYou ? "delivered" : "unreachable";
1449
1453
  };
1450
1454
  var currentStep = "start";
1455
+ var SetupStoppingError = class extends Error {
1456
+ constructor(refusedStep) {
1457
+ super(`Setup is stopping; ${refusedStep} was not started.`);
1458
+ this.refusedStep = refusedStep;
1459
+ }
1460
+ };
1461
+ var stopping = false;
1462
+ var recordSetupStopping = () => {
1463
+ stopping = true;
1464
+ };
1465
+ var isSetupStopping = () => stopping;
1451
1466
  var markStep = (step) => {
1467
+ if (stopping) throw new SetupStoppingError(step);
1452
1468
  currentStep = step;
1453
1469
  };
1454
1470
  var recordedOptions = null;
@@ -1459,6 +1475,14 @@ var recordedKey = null;
1459
1475
  var recordSetupKey = (apiKey) => {
1460
1476
  recordedKey = apiKey;
1461
1477
  };
1478
+ var verifiedKey = null;
1479
+ var recordSetupKeyVerified = () => {
1480
+ verifiedKey = recordedKey;
1481
+ };
1482
+ var recordedCrashKind = null;
1483
+ var recordSetupCrash = (error) => {
1484
+ recordedCrashKind = setupCrashKindOf(error);
1485
+ };
1462
1486
  var recordedCodexTrust = null;
1463
1487
  var recordCodexTrust = (outcome) => {
1464
1488
  recordedCodexTrust = outcome;
@@ -1471,7 +1495,10 @@ var emitted = false;
1471
1495
  var SETUP_COMPLETED_EVENT = "agent_setup_completed";
1472
1496
  var SETUP_AGENT_TYPE = "setup";
1473
1497
  var SETUP_RUN_ID = randomUUID();
1474
- var SETUP_STOP_TIMEOUT_MS = 2e3;
1498
+ var SETUP_BEACON_BUDGET_MS = 2e3;
1499
+ var SETUP_START_TIMEOUT_MS = 1500;
1500
+ var SETUP_STOP_BEACON_BUDGET_MS = 800;
1501
+ var beaconBudgetMs = () => stopping ? SETUP_STOP_BEACON_BUDGET_MS : SETUP_BEACON_BUDGET_MS;
1475
1502
  var saveLocalSetupDiagnostic = (event) => {
1476
1503
  try {
1477
1504
  saveSetupFailure({ ...event });
@@ -1479,12 +1506,12 @@ var saveLocalSetupDiagnostic = (event) => {
1479
1506
  process.stderr.write("[pushary] Could not save the local setup diagnostic. Keep the setup output for support.\n");
1480
1507
  }
1481
1508
  };
1482
- var postSetupStop = async (beacon) => {
1509
+ var postKeylessSetupBeacon = async (beacon, timeoutMs) => {
1483
1510
  await fetch(`${getBaseUrl()}${SETUP_STOPPED_PATH}`, {
1484
1511
  method: "POST",
1485
1512
  headers: { "content-type": "application/json" },
1486
1513
  body: JSON.stringify(beacon),
1487
- signal: AbortSignal.timeout(SETUP_STOP_TIMEOUT_MS)
1514
+ signal: AbortSignal.timeout(timeoutMs)
1488
1515
  });
1489
1516
  };
1490
1517
  var savedKeyInForce = () => {
@@ -1492,39 +1519,77 @@ var savedKeyInForce = () => {
1492
1519
  return read.kind === "key" ? read.key : null;
1493
1520
  };
1494
1521
  var defaultDeps = {
1495
- report: async (event, options) => {
1496
- saveLocalSetupDiagnostic({ ...event });
1497
- return reportEvent(event, options);
1498
- },
1499
- reportStop: async (beacon) => {
1500
- saveLocalSetupDiagnostic({ event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...beacon });
1501
- return postSetupStop(beacon);
1502
- },
1503
- savedKey: savedKeyInForce
1522
+ report: reportEvent,
1523
+ reportStop: postKeylessSetupBeacon,
1524
+ reportStart: postKeylessSetupBeacon,
1525
+ savedKey: savedKeyInForce,
1526
+ saveDiagnostic: saveLocalSetupDiagnostic,
1527
+ optedOut: () => telemetryOptedOut(process.env),
1528
+ now: Date.now
1504
1529
  };
1505
1530
  var completeBeacon = (run) => ({
1506
1531
  ...run,
1507
1532
  codexTrust: recordedCodexTrust,
1508
1533
  phoneSignIn: recordedPhoneSignIn,
1509
1534
  cliVersion: getPackageVersion(),
1510
- os: computerOsOfPlatform(process.platform)
1535
+ os: computerOsOfPlatform(process.platform),
1536
+ crashKind: run.abortReason === "crashed" ? recordedCrashKind ?? "other" : null,
1537
+ runId: SETUP_RUN_ID
1511
1538
  });
1539
+ var setupBeaconRouteOf = (keys) => {
1540
+ if (keys.abortReason === null) return { kind: "keyed", apiKey: keys.recordedKey ?? keys.savedKey };
1541
+ return keys.verifiedKey === null ? { kind: "keyless" } : { kind: "keyed", apiKey: keys.verifiedKey };
1542
+ };
1543
+ var keyedDelivered = async (deps, beacon, apiKey, budgetMs, analyticsAllowed) => {
1544
+ try {
1545
+ await deps.report(
1546
+ { event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...beacon, ...analyticsAllowed ? {} : { telemetryOptOut: true } },
1547
+ { maxAttempts: 1, timeoutMs: budgetMs, requireOk: true, ...apiKey ? { apiKey } : {} }
1548
+ );
1549
+ return true;
1550
+ } catch {
1551
+ return false;
1552
+ }
1553
+ };
1554
+ var sendKeyless = async (deps, beacon, timeoutMs) => {
1555
+ try {
1556
+ await deps.reportStop(beacon, timeoutMs);
1557
+ } catch {
1558
+ return;
1559
+ }
1560
+ };
1512
1561
  var emit = async (deps, run) => {
1513
1562
  if (emitted) return;
1514
1563
  emitted = true;
1564
+ const beacon = completeBeacon(run);
1565
+ deps.saveDiagnostic({ event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...beacon });
1566
+ const analyticsAllowed = !deps.optedOut();
1567
+ const budgetMs = beaconBudgetMs();
1568
+ const startedAt = deps.now();
1569
+ const route = setupBeaconRouteOf({ abortReason: run.abortReason, verifiedKey, recordedKey, savedKey: deps.savedKey() });
1570
+ if (route.kind === "keyless") {
1571
+ if (analyticsAllowed) await sendKeyless(deps, beacon, budgetMs);
1572
+ return;
1573
+ }
1574
+ if (await keyedDelivered(deps, beacon, route.apiKey, budgetMs, analyticsAllowed)) return;
1575
+ const remainingMs = budgetMs - (deps.now() - startedAt);
1576
+ if (analyticsAllowed && run.abortReason !== null && remainingMs > 0) await sendKeyless(deps, beacon, remainingMs);
1577
+ };
1578
+ var startReported = false;
1579
+ var reportSetupStartWith = async (deps) => {
1580
+ if (startReported) return;
1581
+ startReported = true;
1582
+ if (deps.optedOut()) return;
1515
1583
  try {
1516
- const apiKey = recordedKey ?? deps.savedKey();
1517
- if (apiKey === null && run.abortReason !== null) {
1518
- await deps.reportStop({ ...completeBeacon(run), runId: SETUP_RUN_ID });
1519
- return;
1520
- }
1521
- await deps.report(
1522
- { event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...completeBeacon(run) },
1523
- { maxAttempts: 1, timeoutMs: 2e3, ...apiKey ? { apiKey } : {} }
1584
+ await deps.reportStart(
1585
+ { phase: SETUP_STARTED_PHASE, runId: SETUP_RUN_ID, cliVersion: getPackageVersion(), os: computerOsOfPlatform(process.platform) },
1586
+ SETUP_START_TIMEOUT_MS
1524
1587
  );
1525
1588
  } catch {
1589
+ return;
1526
1590
  }
1527
1591
  };
1592
+ var reportSetupStart = () => reportSetupStartWith(defaultDeps);
1528
1593
  var reportSetupOutcomeWith = async (deps, outcome) => emit(deps, {
1529
1594
  agents: outcome.completed,
1530
1595
  connectMode: outcome.options.connectMode,
@@ -3466,6 +3531,23 @@ var emitJson = async (options, payload) => {
3466
3531
  await writeStdoutFully(`${JSON.stringify(payload, null, 2)}
3467
3532
  `);
3468
3533
  };
3534
+ var SETUP_STOP_CEILING_MS = SETUP_STOP_BEACON_BUDGET_MS + 700;
3535
+ var crashReportOf = (error) => error instanceof Error && error.stack ? error.stack : String(error);
3536
+ var reportRunStop = async (stop) => {
3537
+ recordSetupStopping();
3538
+ if (stop.kind === "crash") {
3539
+ recordSetupCrash(stop.error);
3540
+ process.stderr.write(`${crashReportOf(stop.error)}
3541
+ `);
3542
+ return abortWith("crashed", stop.exitCode);
3543
+ }
3544
+ console.log();
3545
+ console.log(` ${dim("Setup stopped.")}`);
3546
+ console.log();
3547
+ return abortWith("interrupted", stop.exitCode);
3548
+ };
3549
+ var heldUntilTheStopExits = () => new Promise(() => {
3550
+ });
3469
3551
  var main = async () => {
3470
3552
  const connector = coworkSelection(process.argv.slice(2));
3471
3553
  if (connector) {
@@ -3497,6 +3579,12 @@ var main = async () => {
3497
3579
  localSetupHandoffEffects(announceSetupHandoff)
3498
3580
  );
3499
3581
  if (handoff.kind === "handed_off") process.exit(handoff.exitCode);
3582
+ installRunExitGuard(process, {
3583
+ stop: reportRunStop,
3584
+ exit: (code) => process.exit(code),
3585
+ crashExitCode: EXIT.FAILED,
3586
+ ceilingMs: SETUP_STOP_CEILING_MS
3587
+ });
3500
3588
  const version = getPackageVersion();
3501
3589
  console.log();
3502
3590
  console.log(` ${bold("Pushary")} ${dim("v" + version)}`);
@@ -3504,6 +3592,7 @@ var main = async () => {
3504
3592
  console.log();
3505
3593
  await checkForUpdates(version, !options.dryRun);
3506
3594
  markStep("resolve-key");
3595
+ if (!options.dryRun) void reportSetupStart();
3507
3596
  const connectMode = options.connectMode;
3508
3597
  const flagKey = await readKeyFromStdin(options) ?? options.key ?? void 0;
3509
3598
  const envKey = process.env.PUSHARY_API_KEY?.trim();
@@ -3707,6 +3796,7 @@ var main = async () => {
3707
3796
  if (!options.dryRun) recordSetupKey(trimmedKey);
3708
3797
  markStep("verify-key");
3709
3798
  const keyCheck = await verifyKeyOrExit(trimmedKey, options, storedKeyCheck ?? void 0);
3799
+ if (!options.dryRun) recordSetupKeyVerified();
3710
3800
  const keyScope = keyScopeOf(keyCheck);
3711
3801
  const wrongAccountHint = wrongAccountHintPlacement({
3712
3802
  canPairWithApp,
@@ -4221,6 +4311,7 @@ var main = async () => {
4221
4311
  }
4222
4312
  };
4223
4313
  main().catch(async (err) => {
4314
+ if (isSetupStopping()) return heldUntilTheStopExits();
4224
4315
  if (err instanceof UsageError) {
4225
4316
  const { written, exitCode } = await writeJsonError("setup", err);
4226
4317
  if (written) process.exit(exitCode);
@@ -4240,5 +4331,6 @@ main().catch(async (err) => {
4240
4331
  console.log(` ${yellow("!")} Setup failed: ${describeError(err)}`);
4241
4332
  console.log(` ${dim("Run")} ${cyan(`${NPX_LATEST_COMMAND} doctor`)} ${dim("after fixing the issue, then rerun setup.")}`);
4242
4333
  console.log();
4334
+ recordSetupCrash(err);
4243
4335
  process.exit(await abortWith("crashed", EXIT.FAILED));
4244
4336
  });
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-XYSD5VPQ.js";
4
+ } from "../chunk-5SVZXCAJ.js";
5
5
  import {
6
6
  readLedgerSummary
7
- } from "../chunk-HQ6RWSWN.js";
7
+ } from "../chunk-DU5MLJQL.js";
8
8
  import {
9
9
  getApiKey
10
- } from "../chunk-XGF3JB3R.js";
11
- import "../chunk-7BJQM5GI.js";
10
+ } from "../chunk-WV7OME3F.js";
11
+ import "../chunk-APTFA4KF.js";
12
12
  import "../chunk-BG4HHB7E.js";
13
13
  import "../chunk-CXQWDQCJ.js";
14
- import "../chunk-DC32YKE2.js";
14
+ import "../chunk-VZVKJP3Q.js";
15
15
  import "../chunk-MLKGABMK.js";
16
16
 
17
17
  // bin/pushary-stats.ts