pushary 1.9.97 → 1.9.100

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 (127) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/{api-WH3DLHJB.js → api-H734WJ2V.js} +10 -10
  3. package/dist/bin/pushary-bell-hook.js +27 -26
  4. package/dist/bin/pushary-bell.js +10 -10
  5. package/dist/bin/pushary-claude.js +48 -33
  6. package/dist/bin/pushary-clean.js +34 -34
  7. package/dist/bin/pushary-codex-bridge.js +21 -21
  8. package/dist/bin/pushary-codex-hook.js +32 -31
  9. package/dist/bin/pushary-codex-session.js +8 -8
  10. package/dist/bin/pushary-codex.js +14 -14
  11. package/dist/bin/pushary-connect.js +27 -27
  12. package/dist/bin/pushary-cowork.js +5 -5
  13. package/dist/bin/pushary-daemon.js +40 -39
  14. package/dist/bin/pushary-disconnect.js +26 -26
  15. package/dist/bin/pushary-display-hook.js +18 -17
  16. package/dist/bin/pushary-doctor.js +42 -42
  17. package/dist/bin/pushary-elicitation-hook.js +27 -26
  18. package/dist/bin/pushary-gemini-bridge.js +15 -15
  19. package/dist/bin/pushary-gemini-hook.js +29 -28
  20. package/dist/bin/pushary-hook.js +31 -30
  21. package/dist/bin/pushary-login.js +38 -20
  22. package/dist/bin/pushary-logout.js +25 -25
  23. package/dist/bin/pushary-mcp.js +11 -11
  24. package/dist/bin/pushary-mode.js +15 -15
  25. package/dist/bin/pushary-notification-hook.js +26 -25
  26. package/dist/bin/pushary-opencode-hook.js +28 -27
  27. package/dist/bin/pushary-permission-denied-hook.js +31 -30
  28. package/dist/bin/pushary-permission-hook.js +31 -30
  29. package/dist/bin/pushary-post-hook.js +26 -25
  30. package/dist/bin/pushary-prompt-hook.js +26 -25
  31. package/dist/bin/pushary-session-end-hook.js +28 -27
  32. package/dist/bin/pushary-session-start-hook.js +36 -35
  33. package/dist/bin/pushary-setup.js +103 -109
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +32 -32
  36. package/dist/bin/pushary-stop-hook.js +26 -25
  37. package/dist/bin/pushary-stopfailure-hook.js +26 -25
  38. package/dist/bin/pushary-suggestions.js +15 -15
  39. package/dist/bin/pushary-transcript-register.js +19 -18
  40. package/dist/bin/pushary-transcripts.js +27 -26
  41. package/dist/bin/pushary-upgrade.js +40 -40
  42. package/dist/bin/pushary-wait.js +15 -15
  43. package/dist/bin/pushary.js +7 -7
  44. package/dist/{chunk-TSSV3NBD.js → chunk-2SFVZ3IT.js} +2 -2
  45. package/dist/{chunk-FZQSUS3R.js → chunk-33YOO7FG.js} +14 -14
  46. package/dist/{chunk-CG3C2WL7.js → chunk-3BBJO25D.js} +14 -12
  47. package/dist/{chunk-UAUADSJX.js → chunk-3OIUMHHO.js} +2 -2
  48. package/dist/{chunk-5RNZP53C.js → chunk-43CU2HYQ.js} +6 -6
  49. package/dist/{chunk-WOFHN2IZ.js → chunk-4FAJQPFY.js} +256 -12
  50. package/dist/{chunk-QCEY7TSX.js → chunk-4JUQ74CG.js} +3 -3
  51. package/dist/{chunk-CB2RYMAO.js → chunk-4QO267OY.js} +1 -1
  52. package/dist/{chunk-R7D3PH2M.js → chunk-4TLE7CSQ.js} +6 -6
  53. package/dist/{chunk-RRA6POT5.js → chunk-4TVLPGJV.js} +1 -1
  54. package/dist/{chunk-ORVMA5KJ.js → chunk-5PW25NHB.js} +3 -3
  55. package/dist/{chunk-W5IW7NZE.js → chunk-5QB6P3I7.js} +104 -2
  56. package/dist/{chunk-GN2L5CYF.js → chunk-6VFN4XTI.js} +1 -1
  57. package/dist/{chunk-Z6O6CDTP.js → chunk-7ZHLBWOV.js} +5 -5
  58. package/dist/{chunk-IED5CTYP.js → chunk-A7JQJUGZ.js} +3 -3
  59. package/dist/{chunk-VVHNHETX.js → chunk-ACVL2MHG.js} +2 -2
  60. package/dist/{chunk-GEA6ZV2P.js → chunk-AFGMZZEB.js} +2 -2
  61. package/dist/{chunk-NDJ7H2WF.js → chunk-AHIAB7JQ.js} +1 -1
  62. package/dist/chunk-BBNMGXZA.js +45 -0
  63. package/dist/{chunk-TKOL7DJH.js → chunk-BFEY6FRZ.js} +2 -2
  64. package/dist/{chunk-RILJLDKG.js → chunk-BIUD3TAY.js} +5 -5
  65. package/dist/{chunk-KYX7VBEE.js → chunk-CC24CQ7P.js} +2 -2
  66. package/dist/{chunk-5WYXFKZV.js → chunk-CK6YJZEK.js} +1 -1
  67. package/dist/{chunk-ZFUSWR2P.js → chunk-DCYA2SW2.js} +2 -2
  68. package/dist/{chunk-SXX47FHL.js → chunk-DIWNHZ6I.js} +2 -2
  69. package/dist/{chunk-5WOO44TA.js → chunk-DPGG3AAG.js} +5 -5
  70. package/dist/{chunk-EAJT6RYP.js → chunk-E2YENQFD.js} +7 -7
  71. package/dist/{chunk-VHOGSWUF.js → chunk-E34NVKR7.js} +3 -3
  72. package/dist/{chunk-APFQBVQW.js → chunk-E4YZIS4C.js} +6 -6
  73. package/dist/{chunk-RSITUL2U.js → chunk-ERO2ERIE.js} +2 -2
  74. package/dist/{chunk-JA6GCOW2.js → chunk-FIKNFZ7Z.js} +7 -7
  75. package/dist/{chunk-VPT3RDTO.js → chunk-G66WIAST.js} +0 -43
  76. package/dist/{chunk-6CDA4R5L.js → chunk-GKNTNKVQ.js} +3 -3
  77. package/dist/{chunk-VAY5AJ6N.js → chunk-GSQZTDPZ.js} +4 -4
  78. package/dist/{chunk-AUZITE2H.js → chunk-GTUCRZRJ.js} +6 -6
  79. package/dist/{chunk-JR6FCHAQ.js → chunk-IGEY7ZFQ.js} +3 -3
  80. package/dist/{chunk-TZE2S3XP.js → chunk-IGIWULLQ.js} +3 -3
  81. package/dist/{chunk-OBB6VTSG.js → chunk-K6QZMKAP.js} +5 -5
  82. package/dist/{chunk-5OLBO5EB.js → chunk-KACD6W6J.js} +1 -1
  83. package/dist/{chunk-RZD7ULBJ.js → chunk-KOUB4ZLX.js} +1 -1
  84. package/dist/{chunk-VVP4CP4O.js → chunk-KUIJMRES.js} +11 -10
  85. package/dist/{chunk-ZDIQPYM2.js → chunk-MP3SEXXJ.js} +1 -1
  86. package/dist/{chunk-2ZAFA3XI.js → chunk-MY7NJM56.js} +3 -3
  87. package/dist/{chunk-NTCVGJFC.js → chunk-N6UPDKCI.js} +4 -4
  88. package/dist/{chunk-HXUE6IIP.js → chunk-NTTFATKG.js} +5 -5
  89. package/dist/{chunk-OW4WEO56.js → chunk-O35JKL4T.js} +3 -3
  90. package/dist/{chunk-RPY5XCGA.js → chunk-ODJQ5KFS.js} +2 -2
  91. package/dist/{chunk-HWEEBVS7.js → chunk-OUF7TX2C.js} +4 -4
  92. package/dist/{chunk-CMDIKFVL.js → chunk-PWGD5EP6.js} +1 -1
  93. package/dist/{chunk-32577NGL.js → chunk-QD57EL3I.js} +1 -1
  94. package/dist/{chunk-IFQKSIID.js → chunk-RAASN7OG.js} +3 -3
  95. package/dist/{chunk-KNVTKFDP.js → chunk-SGECX2RY.js} +2 -2
  96. package/dist/{chunk-MFJFN4DA.js → chunk-SJXNDL73.js} +3 -3
  97. package/dist/{chunk-X22LLKBY.js → chunk-SOBHT3J7.js} +3 -3
  98. package/dist/{chunk-GNFUPHPZ.js → chunk-SQSL6DVX.js} +10 -10
  99. package/dist/{chunk-W3OTAHLV.js → chunk-SSLEGJYI.js} +4 -4
  100. package/dist/{chunk-5U63KUP3.js → chunk-T72OMEHB.js} +1 -1
  101. package/dist/{chunk-HD7AURL6.js → chunk-THHVB46D.js} +52 -7
  102. package/dist/{chunk-MYKZPTAL.js → chunk-TLERJKSE.js} +1 -1
  103. package/dist/{chunk-NI3NSURQ.js → chunk-UPQE4YPM.js} +1 -1
  104. package/dist/{chunk-E5WUBHVH.js → chunk-VMXY3PAT.js} +4 -4
  105. package/dist/{chunk-QP3OSLKU.js → chunk-W44TA4CT.js} +5 -5
  106. package/dist/{chunk-MGYGWHG5.js → chunk-WPK2UWDU.js} +1 -1
  107. package/dist/{chunk-T35RHO3X.js → chunk-WRCQCJA7.js} +5 -5
  108. package/dist/{chunk-5YRDZE5F.js → chunk-WVAJSBI2.js} +1 -1
  109. package/dist/{chunk-KZTN6OXM.js → chunk-XEGKTXTC.js} +6 -6
  110. package/dist/{chunk-4D4USO5K.js → chunk-XJF4WX5C.js} +6 -6
  111. package/dist/{chunk-LKDAMWTZ.js → chunk-YVAFDGK2.js} +4 -4
  112. package/dist/{chunk-R7TVELKF.js → chunk-Z6HHEV7A.js} +1 -1
  113. package/dist/{chunk-6RGQIKAC.js → chunk-ZG6M5VQV.js} +3 -3
  114. package/dist/{chunk-CP72YEEA.js → chunk-ZNPUYLOY.js} +1 -1
  115. package/dist/{codex-app-cards-switch-DFZK6GPW.js → codex-app-cards-switch-JKKTCZNB.js} +11 -11
  116. package/dist/{codex-desktop-launch-7QGN7SL7.js → codex-desktop-launch-6BONFDHF.js} +1 -1
  117. package/dist/{codex-session-launch-OWMNCYAH.js → codex-session-launch-5FRL6UGU.js} +18 -18
  118. package/dist/{config-ITPE5M6M.js → config-A5EC37VZ.js} +3 -3
  119. package/dist/{global-upgrade-PYEFLMJA.js → global-upgrade-W4ZTLGUY.js} +10 -10
  120. package/dist/{identity-WTYTOLG3.js → identity-2LPVILX4.js} +4 -4
  121. package/dist/{live-capabilities-HZ42KLZS.js → live-capabilities-SWMCZORB.js} +5 -5
  122. package/dist/{paths-6JUJIM74.js → paths-4SVXADJ6.js} +3 -3
  123. package/dist/{reapply-5WV6IS5V.js → reapply-WEXL57SG.js} +28 -28
  124. package/dist/src/index.js +30 -29
  125. package/dist/{upgrade-lock-ENAQL63D.js → upgrade-lock-NZ2MBGYE.js} +4 -4
  126. package/dist/{usage-BO7LGOA3.js → usage-U6H5UFS2.js} +3 -3
  127. package/package.json +1 -1
@@ -1,10 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  nativeBridgeAccount
4
- } from "../chunk-5WYXFKZV.js";
4
+ } from "../chunk-CK6YJZEK.js";
5
5
  import {
6
- runBrowserLogin
7
- } from "../chunk-W5IW7NZE.js";
6
+ WRONG_ACCOUNT_HINT,
7
+ canAskAtTheTerminal,
8
+ continueAsQuestion,
9
+ describeFoundKey,
10
+ describeKeyAccount,
11
+ describeLockedKeyAccount,
12
+ describeShellKeyShadow,
13
+ describeSignedIn,
14
+ describeUsedKey,
15
+ isKeyHeldByMacApp,
16
+ keepSavedKeyQuestion,
17
+ keepsTheSavedKeyOverTheReplacedShellKey,
18
+ keyAccountHandle,
19
+ keyReuseConfirmation,
20
+ pickReusableKey,
21
+ replacedShellKeyChoice,
22
+ runBrowserLogin,
23
+ switchBackToTheShellKeyLine,
24
+ wrongAccountHintPlacement
25
+ } from "../chunk-5QB6P3I7.js";
8
26
  import {
9
27
  INSTALL_NODE_STEP,
10
28
  NPM_FILE_IN_USE_STEP,
@@ -17,21 +35,21 @@ import {
17
35
  phoneStartServiceState,
18
36
  renderCommandSurface,
19
37
  unverifiedKeyClosingReason
20
- } from "../chunk-NTCVGJFC.js";
38
+ } from "../chunk-N6UPDKCI.js";
21
39
  import {
22
40
  coworkOutput,
23
41
  coworkSelection
24
- } from "../chunk-ORVMA5KJ.js";
42
+ } from "../chunk-5PW25NHB.js";
25
43
  import "../chunk-PUZZELE6.js";
26
44
  import {
27
45
  clearDeclinedAgent,
28
46
  declinedAgentForSetupChoice
29
- } from "../chunk-MFJFN4DA.js";
47
+ } from "../chunk-SJXNDL73.js";
30
48
  import {
31
49
  describeVersionManagerPin,
32
50
  saveSetupFailure,
33
51
  versionManagerOf
34
- } from "../chunk-IFQKSIID.js";
52
+ } from "../chunk-RAASN7OG.js";
35
53
  import {
36
54
  describeWaitLadder
37
55
  } from "../chunk-CVWG2N3Y.js";
@@ -42,11 +60,11 @@ import {
42
60
  describeHermesInstallFailure,
43
61
  describeHermesState,
44
62
  needsCodexTrustStep
45
- } from "../chunk-X22LLKBY.js";
63
+ } from "../chunk-SOBHT3J7.js";
46
64
  import {
47
65
  writeJsonError,
48
66
  writeStdoutFully
49
- } from "../chunk-32577NGL.js";
67
+ } from "../chunk-QD57EL3I.js";
50
68
  import {
51
69
  confirmAppConnection,
52
70
  connectDevice,
@@ -55,7 +73,7 @@ import {
55
73
  pairingEscapeApplies,
56
74
  printConnectInstructions,
57
75
  waitForYourPhone
58
- } from "../chunk-W3OTAHLV.js";
76
+ } from "../chunk-SSLEGJYI.js";
59
77
  import "../chunk-3EGEA4KH.js";
60
78
  import {
61
79
  SETUP_AGENT_NAME,
@@ -64,14 +82,14 @@ import {
64
82
  roundTripEvidence,
65
83
  roundTripWasAnswered,
66
84
  verifyRoundTrip
67
- } from "../chunk-R7D3PH2M.js";
85
+ } from "../chunk-4TLE7CSQ.js";
68
86
  import {
69
87
  readManagedControlEvidence,
70
88
  waitForMachineReadiness
71
- } from "../chunk-RILJLDKG.js";
89
+ } from "../chunk-BIUD3TAY.js";
72
90
  import {
73
91
  ensureCodexTrustsPusharyHooks
74
- } from "../chunk-SXX47FHL.js";
92
+ } from "../chunk-DIWNHZ6I.js";
75
93
  import {
76
94
  describeSetupSideEffects,
77
95
  installAgentSkill,
@@ -79,7 +97,7 @@ import {
79
97
  } from "../chunk-J42EAEX3.js";
80
98
  import {
81
99
  codexEngineBehindLauncher
82
- } from "../chunk-TKOL7DJH.js";
100
+ } from "../chunk-BFEY6FRZ.js";
83
101
  import "../chunk-XCEN33UP.js";
84
102
  import {
85
103
  CURSOR_PLUGIN_BACKUP_INFIX,
@@ -89,7 +107,7 @@ import {
89
107
  soleGateFile,
90
108
  soleGateReceipt,
91
109
  soleGateReceiptFile
92
- } from "../chunk-VAY5AJ6N.js";
110
+ } from "../chunk-GSQZTDPZ.js";
93
111
  import {
94
112
  describeDetection,
95
113
  detectAllAgents,
@@ -98,14 +116,14 @@ import {
98
116
  registerPluginLocation,
99
117
  shortenHome,
100
118
  vscodeSettingsTargets
101
- } from "../chunk-5WOO44TA.js";
119
+ } from "../chunk-DPGG3AAG.js";
102
120
  import {
103
121
  mcpServerBearer,
104
122
  readMacAppAgentKey
105
- } from "../chunk-QP3OSLKU.js";
123
+ } from "../chunk-W44TA4CT.js";
106
124
  import {
107
125
  keyScopeOf
108
- } from "../chunk-VVHNHETX.js";
126
+ } from "../chunk-ACVL2MHG.js";
109
127
  import {
110
128
  HERMES_CONFIG_FILE,
111
129
  defaultHermesHome,
@@ -118,7 +136,7 @@ import {
118
136
  routesHermesQuestions,
119
137
  runsAnOlderPlugin,
120
138
  shippedHermesPlugin
121
- } from "../chunk-JR6FCHAQ.js";
139
+ } from "../chunk-IGEY7ZFQ.js";
122
140
  import {
123
141
  setHumanStream
124
142
  } from "../chunk-QCGNGEGE.js";
@@ -137,7 +155,7 @@ import {
137
155
  readFxProfileForSetup,
138
156
  withFxPusharyServer,
139
157
  writeFxProfile
140
- } from "../chunk-OBB6VTSG.js";
158
+ } from "../chunk-K6QZMKAP.js";
141
159
  import {
142
160
  AgentConfigError,
143
161
  afterAgentFailureNote,
@@ -150,10 +168,10 @@ import {
150
168
  retryAgentCommand,
151
169
  writeSetupConfigFile,
152
170
  writeSetupConfigJson
153
- } from "../chunk-TZE2S3XP.js";
171
+ } from "../chunk-IGIWULLQ.js";
154
172
  import {
155
173
  MCP_BRIDGE_BINARY
156
- } from "../chunk-RSITUL2U.js";
174
+ } from "../chunk-ERO2ERIE.js";
157
175
  import {
158
176
  OPENCODE_HOOK_BINARY,
159
177
  addOpenCodeMcpServer,
@@ -171,7 +189,7 @@ import {
171
189
  openCodePluginFile,
172
190
  openCodeWired,
173
191
  withOpenCodeAskRules
174
- } from "../chunk-4D4USO5K.js";
192
+ } from "../chunk-XJF4WX5C.js";
175
193
  import {
176
194
  ansiPainter,
177
195
  createIo,
@@ -187,19 +205,17 @@ import {
187
205
  nodeCodexInstallProbe,
188
206
  phoneStartIsRequired,
189
207
  resolveControlPolicy
190
- } from "../chunk-LKDAMWTZ.js";
208
+ } from "../chunk-YVAFDGK2.js";
191
209
  import {
192
210
  detectClaudeVersion
193
- } from "../chunk-QCEY7TSX.js";
194
- import "../chunk-NI3NSURQ.js";
211
+ } from "../chunk-4JUQ74CG.js";
212
+ import "../chunk-UPQE4YPM.js";
195
213
  import {
196
214
  describeAutoUpdateAnnouncement,
197
215
  takeAutoUpdateAnnouncement
198
- } from "../chunk-IED5CTYP.js";
199
- import {
200
- PLAN_CONFIGS,
201
- PLAN_TYPES
202
- } from "../chunk-VPT3RDTO.js";
216
+ } from "../chunk-A7JQJUGZ.js";
217
+ import "../chunk-BBNMGXZA.js";
218
+ import "../chunk-G66WIAST.js";
203
219
  import {
204
220
  addCompatibleHooks,
205
221
  addCompatibleMcpServer,
@@ -213,7 +229,7 @@ import {
213
229
  compatibleRecord,
214
230
  compatibleTargetPaths,
215
231
  hasCompatibleHooks
216
- } from "../chunk-HXUE6IIP.js";
232
+ } from "../chunk-NTTFATKG.js";
217
233
  import {
218
234
  DAEMON_COLD_START_TIMEOUT_MS,
219
235
  clearDaemonNeedsLogin,
@@ -229,7 +245,7 @@ import {
229
245
  serviceNodeFor,
230
246
  stopDaemonService,
231
247
  waitForDaemonRemoteProof
232
- } from "../chunk-APFQBVQW.js";
248
+ } from "../chunk-E4YZIS4C.js";
233
249
  import {
234
250
  GEMINI_HOOK_BINARY,
235
251
  GEMINI_HOOK_EVENTS,
@@ -245,20 +261,20 @@ import {
245
261
  geminiWired,
246
262
  planHooks,
247
263
  pusharyHookExecutable
248
- } from "../chunk-HWEEBVS7.js";
264
+ } from "../chunk-OUF7TX2C.js";
249
265
  import {
250
266
  AGENT_CHOICES,
251
267
  effectiveAgentSelection,
252
268
  effectiveControlMode,
253
269
  effectiveVerify,
254
270
  parseSetupOptions
255
- } from "../chunk-5YRDZE5F.js";
256
- import "../chunk-5U63KUP3.js";
271
+ } from "../chunk-WVAJSBI2.js";
272
+ import "../chunk-T72OMEHB.js";
257
273
  import "../chunk-NMUI3ZWG.js";
258
274
  import "../chunk-XMSDA5WA.js";
259
275
  import {
260
276
  transcriptPreferenceForSetup
261
- } from "../chunk-CP72YEEA.js";
277
+ } from "../chunk-ZNPUYLOY.js";
262
278
  import "../chunk-XHKBHWLX.js";
263
279
  import {
264
280
  KEY_FILE_MODE,
@@ -266,13 +282,17 @@ import {
266
282
  installClaudeAlias,
267
283
  keyPrefix,
268
284
  manualKeyStepFor,
285
+ newTerminalsUseSavedKey,
269
286
  readConfigFileKey,
270
287
  readControlMode,
271
288
  readKeySource,
289
+ readReplacedKeyPrefix,
272
290
  recordMacAppKeyPrefix,
291
+ replacedKeyRecordIsHonoured,
273
292
  resolveShellRc,
293
+ shellKeyWasReplaced,
274
294
  writeKey
275
- } from "../chunk-HD7AURL6.js";
295
+ } from "../chunk-THHVB46D.js";
276
296
  import {
277
297
  CODEX_ENGINE_DIRECTORY,
278
298
  CODEX_ENGINE_ENTRYPOINT,
@@ -281,20 +301,20 @@ import {
281
301
  } from "../chunk-E46NE7FB.js";
282
302
  import {
283
303
  reportEvent
284
- } from "../chunk-VVP4CP4O.js";
285
- import "../chunk-ZDIQPYM2.js";
286
- import "../chunk-CB2RYMAO.js";
287
- import "../chunk-Z6O6CDTP.js";
304
+ } from "../chunk-KUIJMRES.js";
305
+ import "../chunk-MP3SEXXJ.js";
306
+ import "../chunk-4QO267OY.js";
307
+ import "../chunk-7ZHLBWOV.js";
288
308
  import "../chunk-POFBE6ZY.js";
289
- import "../chunk-E5WUBHVH.js";
309
+ import "../chunk-VMXY3PAT.js";
290
310
  import {
291
311
  checkApiKey,
292
312
  describeKeyCheck,
293
313
  samePusharyAccount
294
- } from "../chunk-OW4WEO56.js";
295
- import "../chunk-6RGQIKAC.js";
296
- import "../chunk-ZFUSWR2P.js";
297
- import "../chunk-GEA6ZV2P.js";
314
+ } from "../chunk-O35JKL4T.js";
315
+ import "../chunk-ZG6M5VQV.js";
316
+ import "../chunk-DCYA2SW2.js";
317
+ import "../chunk-AFGMZZEB.js";
298
318
  import {
299
319
  CLINE_AUTO_APPROVE_STEP,
300
320
  CLINE_RELOAD_STEP,
@@ -353,7 +373,7 @@ import {
353
373
  vscodePluginDir,
354
374
  vscodePluginMcp,
355
375
  writeInstructionBlock
356
- } from "../chunk-KNVTKFDP.js";
376
+ } from "../chunk-SGECX2RY.js";
357
377
  import {
358
378
  NpmMissingError,
359
379
  backupFile,
@@ -366,10 +386,10 @@ import {
366
386
  readJsonSafe,
367
387
  resolveGlobalBinDir,
368
388
  resolveGlobalBinary
369
- } from "../chunk-6CDA4R5L.js";
389
+ } from "../chunk-GKNTNKVQ.js";
370
390
  import {
371
391
  getBaseUrl
372
- } from "../chunk-RZD7ULBJ.js";
392
+ } from "../chunk-KOUB4ZLX.js";
373
393
  import {
374
394
  UsageError
375
395
  } from "../chunk-PPY5N2E6.js";
@@ -379,7 +399,7 @@ import {
379
399
  import {
380
400
  NPX_LATEST_COMMAND,
381
401
  renderCommandHelp
382
- } from "../chunk-CMDIKFVL.js";
402
+ } from "../chunk-PWGD5EP6.js";
383
403
  import {
384
404
  getPackageVersion,
385
405
  isNewerVersion,
@@ -398,7 +418,7 @@ import {
398
418
  isRecord,
399
419
  isTimeoutAction,
400
420
  isValidApiKey
401
- } from "../chunk-WOFHN2IZ.js";
421
+ } from "../chunk-4FAJQPFY.js";
402
422
  import "../chunk-MLKGABMK.js";
403
423
 
404
424
  // bin/pushary-setup.ts
@@ -448,51 +468,6 @@ var enterKeyListener = (input2 = process.stdin) => {
448
468
  };
449
469
  };
450
470
 
451
- // src/setup/key-account.ts
452
- var isKeyHeldByMacApp = (key, holder) => holder.macAppInstalled && holder.macAppKey === key;
453
- var agentConfigKeySource = (agentConfigKey, holder) => isKeyHeldByMacApp(agentConfigKey, holder) ? "mac-app" : "agent-settings";
454
- var pickReusableKey = (candidates) => {
455
- if (candidates.storedKey !== null && candidates.storedCheck !== null) {
456
- return { source: "stored", key: candidates.storedKey, check: candidates.storedCheck };
457
- }
458
- if (candidates.envKey && candidates.envCheck !== null) {
459
- return { source: "environment", key: candidates.envKey, check: candidates.envCheck };
460
- }
461
- if (candidates.agentConfigKey !== null && candidates.agentConfigCheck !== null) {
462
- return { source: agentConfigKeySource(candidates.agentConfigKey, candidates), key: candidates.agentConfigKey, check: candidates.agentConfigCheck };
463
- }
464
- return null;
465
- };
466
- var REUSED_KEY_SOURCE_LABELS = {
467
- stored: "the key saved on this machine",
468
- environment: "the key in PUSHARY_API_KEY",
469
- "mac-app": "the key Pushary for Mac is signed in with",
470
- "agent-settings": "a key found in your agent settings"
471
- };
472
- var maskKey = (key) => `${key.slice(0, 8)}...${key.slice(-4)}`;
473
- var describeFoundKey = (reusable) => `Found ${REUSED_KEY_SOURCE_LABELS[reusable.source]}: ${maskKey(reusable.key)}`;
474
- var describeUsedKey = (reusable) => `Using ${REUSED_KEY_SOURCE_LABELS[reusable.source]}: ${maskKey(reusable.key)}`;
475
- var keyReuseConfirmation = (context) => context.stdoutIsTty && !context.nonInteractive && !context.dryRun && context.canPairWithApp ? "ask" : "announce";
476
- var accountHandleOf = (identity) => identity.siteSlug ? `@${identity.siteSlug}` : identity.siteName || null;
477
- var keyAccountHandle = (check2) => check2.kind === "ok" ? accountHandleOf(check2.identity) : null;
478
- var continueAsQuestion = (account) => account ? `Continue as ${account}?` : "Continue with this key?";
479
- var WRONG_ACCOUNT_HINT = `Wrong account? Run ${NPX_LATEST_COMMAND} setup --connect app`;
480
- var wrongAccountHintPlacement = (context) => {
481
- if (!context.canPairWithApp) return "none";
482
- if (context.planInactive && !context.dryRun) return "with-inactive-plan";
483
- return context.reusedWithoutAsking ? "after-key-check" : "none";
484
- };
485
- var planNameOf = (plan) => {
486
- const known = PLAN_TYPES.find((type) => type === plan);
487
- return known ? PLAN_CONFIGS[known].name : null;
488
- };
489
- var describeSignedIn = (identity) => {
490
- const account = accountHandleOf(identity) ?? "your account";
491
- const planName = planNameOf(identity.plan);
492
- return planName ? `Signed in to ${account} (${planName} plan)` : `Signed in to ${account}`;
493
- };
494
- var describeLockedKeyAccount = (key, account) => account ? `${account} has no active plan.` : `The key ${maskKey(key)} is on an account with no active plan.`;
495
-
496
471
  // src/setup/service-notice.ts
497
472
  var PHONE_START_OPT_OUT = "Turn it off with --control off.";
498
473
  var describeServiceInstall = (servicePresent) => servicePresent ? `Updating the background service that lets your phone start agents. ${PHONE_START_OPT_OUT}` : `Installing a background service so your phone can start agents. ${PHONE_START_OPT_OUT}`;
@@ -1539,12 +1514,13 @@ ${pluginLocationSnippet(VSCODE_PLUGIN_DIR)}`
1539
1514
  noteManual("Fully quit and reopen VS Code. A Reload Window may not pick up a new plugin location.");
1540
1515
  };
1541
1516
  var keySavedInConfigLine = (configPath) => `Your key is saved in ${configPath}, which is where hooks read it.`;
1542
- var saveApiKey = async (apiKey, origin, controlMode, transcriptSync) => {
1517
+ var saveApiKey = async (apiKey, origin, controlMode, transcriptSync, replacedKeyRecordWasHonoured) => {
1543
1518
  let result;
1544
1519
  await spinner("Saving your API key", async () => {
1545
1520
  result = writeKey(apiKey, origin, {
1546
1521
  controlMode,
1547
- transcriptsEnabled: transcriptSync
1522
+ transcriptsEnabled: transcriptSync,
1523
+ replacedKeyRecordWasHonoured
1548
1524
  });
1549
1525
  });
1550
1526
  if (!result) throw new Error("Could not save the API key");
@@ -2115,6 +2091,7 @@ var usableStoredKey = async (apiKey) => {
2115
2091
  }
2116
2092
  return result.kind === "rejected" || result.kind === "malformed" ? null : result;
2117
2093
  };
2094
+ var keepOrLeaveTheSavedKey = async (saved, exported) => await confirm({ message: keepSavedKeyQuestion(keyAccountHandle(saved.check), keyAccountHandle(exported.check)), default: true }) ? saved : exported;
2118
2095
  var acceptReusableKey = async (reusable, confirmation) => {
2119
2096
  if (confirmation === "announce") {
2120
2097
  console.log(` ${check} ${describeUsedKey(reusable)}`);
@@ -2327,7 +2304,8 @@ var main = async () => {
2327
2304
  const pairingRequested = connectMode === "app" && options.connectExplicit && !options.skipPhone;
2328
2305
  const ambientEligible = flagKey === void 0 && !pairingRequested;
2329
2306
  const envCheck = ambientEligible && envKey && isValidApiKey(envKey) ? await usableStoredKey(envKey) : null;
2330
- const storedCheck = ambientEligible && envCheck === null && storedKey !== null && isValidApiKey(storedKey) && // login writes both, so without this the same key is probed twice.
2307
+ const envKeyWasReplaced = shellKeyWasReplaced({ shellKey: envKey, savedKey: storedKey, replacedKeyPrefix: readReplacedKeyPrefix() });
2308
+ const storedCheck = ambientEligible && (envCheck === null || envKeyWasReplaced) && storedKey !== null && isValidApiKey(storedKey) && // login writes both, so without this the same key is probed twice.
2331
2309
  storedKey !== envKey ? await usableStoredKey(storedKey) : null;
2332
2310
  const appKey = ambientEligible && envCheck === null && storedCheck === null ? pickAppKey({ fromAgents: AGENT_CHOICES.map(appMcpKeyIfReadable), storedKey, envKey }) : null;
2333
2311
  const appKeyCheck = appKey === null ? null : await usableStoredKey(appKey);
@@ -2349,8 +2327,21 @@ var main = async () => {
2349
2327
  agentConfigCheck: appKeyCheck,
2350
2328
  ...macAppHolder
2351
2329
  });
2352
- const reuseAccepted = reusable !== null && await acceptReusableKey(reusable, keyReuse);
2353
- const reuseDeclined = reusable !== null && !reuseAccepted;
2330
+ const replacedShellKey = replacedShellKeyChoice({
2331
+ shellKeyWasReplaced: envKeyWasReplaced,
2332
+ shellKeyUsable: envCheck !== null,
2333
+ savedKeyFound: reusable?.source === "stored",
2334
+ recordHonoured: replacedKeyRecordIsHonoured(),
2335
+ canAsk: canAskAtTheTerminal({ stdoutIsTty: process.stdout.isTTY === true, nonInteractive: options.nonInteractive, dryRun: options.dryRun })
2336
+ });
2337
+ const exportedKey = envKey && envCheck !== null ? { source: "environment", key: envKey, check: envCheck } : null;
2338
+ const reused = replacedShellKey === "ask_to_keep_saved_key" && reusable !== null && exportedKey !== null ? await keepOrLeaveTheSavedKey(reusable, exportedKey) : reusable;
2339
+ const reuseAccepted = reused !== null && await acceptReusableKey(reused, replacedShellKey === "ask_to_keep_saved_key" ? "announce" : keyReuse);
2340
+ const reuseDeclined = reused !== null && !reuseAccepted;
2341
+ if (replacedShellKey === "keep_saved_key_and_say_how_to_switch" && reuseAccepted) {
2342
+ console.log(` ${dim(switchBackToTheShellKeyLine(envCheck === null ? null : keyAccountHandle(envCheck)))}`);
2343
+ }
2344
+ const replacedKeyRecordWasHonoured = keepsTheSavedKeyOverTheReplacedShellKey(replacedShellKey, reused, reuseAccepted);
2354
2345
  let storedKeyCheck = null;
2355
2346
  let pairedHandle = null;
2356
2347
  if (flagKey) {
@@ -2358,9 +2349,9 @@ var main = async () => {
2358
2349
  console.log(` ${check} Using API key: ${dim(masked)}`);
2359
2350
  console.log();
2360
2351
  trimmedKey = flagKey;
2361
- } else if (reusable !== null && reuseAccepted) {
2362
- trimmedKey = reusable.key;
2363
- storedKeyCheck = reusable.check;
2352
+ } else if (reused !== null && reuseAccepted) {
2353
+ trimmedKey = reused.key;
2354
+ storedKeyCheck = reused.check;
2364
2355
  } else if (options.dryRun) {
2365
2356
  console.log(` ${dim("No key on this machine. A real run would connect one first.")}`);
2366
2357
  console.log();
@@ -2474,7 +2465,7 @@ var main = async () => {
2474
2465
  console.log();
2475
2466
  console.log(` ${TRANSCRIPT_SYNC_NOTICE}`);
2476
2467
  }
2477
- const rc = await saveApiKey(trimmedKey, keyOrigin, controlMode, transcriptSync);
2468
+ const rc = await saveApiKey(trimmedKey, keyOrigin, controlMode, transcriptSync, replacedKeyRecordWasHonoured);
2478
2469
  if (isKeyHeldByMacApp(trimmedKey, macAppHolder)) recordMacAppKeyPrefix(trimmedKey);
2479
2470
  if (keyCheck.kind === "ok") clearDaemonNeedsLogin();
2480
2471
  markStep("resolve-agents");
@@ -2506,9 +2497,12 @@ var main = async () => {
2506
2497
  };
2507
2498
  const staleEnvironmentKey = Boolean(envKey && envKey !== trimmedKey);
2508
2499
  if (envKey && staleEnvironmentKey) {
2509
- noteManual(
2510
- `This shell still exports the previous key (${keyPrefix(envKey)}), and it wins over the one just saved. Open a new terminal before starting an agent here, or re-export PUSHARY_API_KEY.`
2511
- );
2500
+ noteManual(describeShellKeyShadow({
2501
+ shellKey: envKey,
2502
+ shellAccount: envCheck === null ? null : describeKeyAccount(envCheck),
2503
+ savedAccount: describeKeyAccount(keyCheck),
2504
+ newTerminalsUseSavedKey: newTerminalsUseSavedKey(rc, process.platform)
2505
+ }).join(" "));
2512
2506
  }
2513
2507
  const failures = [];
2514
2508
  const completed = [];
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-MGYGWHG5.js";
4
+ } from "../chunk-WPK2UWDU.js";
5
5
  import {
6
6
  readLedgerSummary
7
- } from "../chunk-RRA6POT5.js";
7
+ } from "../chunk-4TVLPGJV.js";
8
8
  import {
9
9
  getApiKey
10
- } from "../chunk-RZD7ULBJ.js";
10
+ } from "../chunk-KOUB4ZLX.js";
11
11
  import "../chunk-KZERVKTD.js";
12
- import "../chunk-CMDIKFVL.js";
12
+ import "../chunk-PWGD5EP6.js";
13
13
  import "../chunk-ZVU6WMMU.js";
14
- import "../chunk-WOFHN2IZ.js";
14
+ import "../chunk-4FAJQPFY.js";
15
15
  import "../chunk-MLKGABMK.js";
16
16
 
17
17
  // bin/pushary-stats.ts
@@ -1,79 +1,79 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  writeJsonError
4
- } from "../chunk-32577NGL.js";
4
+ } from "../chunk-QD57EL3I.js";
5
5
  import {
6
6
  fetchChannels
7
- } from "../chunk-W3OTAHLV.js";
7
+ } from "../chunk-SSLEGJYI.js";
8
8
  import "../chunk-3EGEA4KH.js";
9
9
  import {
10
10
  describeReach,
11
11
  reachVerdict
12
- } from "../chunk-R7D3PH2M.js";
12
+ } from "../chunk-4TLE7CSQ.js";
13
13
  import {
14
14
  describeLastSeen,
15
15
  listMachines
16
- } from "../chunk-RILJLDKG.js";
16
+ } from "../chunk-BIUD3TAY.js";
17
17
  import {
18
18
  SIGNED_OUT_ON_MAC_MESSAGE,
19
19
  activeKeyVerdictOf,
20
20
  describeSignedOutKey,
21
21
  readSignedOutDiagnosis
22
- } from "../chunk-RPY5XCGA.js";
22
+ } from "../chunk-ODJQ5KFS.js";
23
23
  import {
24
24
  CONNECTED_THROUGH_MAC_APP,
25
25
  keyWrittenByMacApp,
26
26
  readMacAppConnectionWhenKeyless
27
- } from "../chunk-QP3OSLKU.js";
28
- import "../chunk-VVHNHETX.js";
27
+ } from "../chunk-W44TA4CT.js";
28
+ import "../chunk-ACVL2MHG.js";
29
29
  import "../chunk-QCGNGEGE.js";
30
- import "../chunk-4D4USO5K.js";
30
+ import "../chunk-XJF4WX5C.js";
31
31
  import {
32
32
  createIo
33
33
  } from "../chunk-FO3MDD26.js";
34
34
  import {
35
35
  exitOnHelpFlag
36
- } from "../chunk-MGYGWHG5.js";
37
- import "../chunk-LKDAMWTZ.js";
38
- import "../chunk-QCEY7TSX.js";
39
- import "../chunk-NI3NSURQ.js";
40
- import "../chunk-HXUE6IIP.js";
41
- import "../chunk-APFQBVQW.js";
42
- import "../chunk-HWEEBVS7.js";
43
- import "../chunk-5YRDZE5F.js";
44
- import "../chunk-5U63KUP3.js";
36
+ } from "../chunk-WPK2UWDU.js";
37
+ import "../chunk-YVAFDGK2.js";
38
+ import "../chunk-4JUQ74CG.js";
39
+ import "../chunk-UPQE4YPM.js";
40
+ import "../chunk-NTTFATKG.js";
41
+ import "../chunk-E4YZIS4C.js";
42
+ import "../chunk-OUF7TX2C.js";
43
+ import "../chunk-WVAJSBI2.js";
44
+ import "../chunk-T72OMEHB.js";
45
45
  import {
46
46
  rejectUnknownFlags
47
47
  } from "../chunk-NMUI3ZWG.js";
48
48
  import "../chunk-XHKBHWLX.js";
49
49
  import {
50
50
  readKeySource
51
- } from "../chunk-HD7AURL6.js";
52
- import "../chunk-VVP4CP4O.js";
53
- import "../chunk-ZDIQPYM2.js";
54
- import "../chunk-CB2RYMAO.js";
55
- import "../chunk-Z6O6CDTP.js";
51
+ } from "../chunk-THHVB46D.js";
52
+ import "../chunk-KUIJMRES.js";
53
+ import "../chunk-MP3SEXXJ.js";
54
+ import "../chunk-4QO267OY.js";
55
+ import "../chunk-7ZHLBWOV.js";
56
56
  import "../chunk-POFBE6ZY.js";
57
- import "../chunk-E5WUBHVH.js";
57
+ import "../chunk-VMXY3PAT.js";
58
58
  import {
59
59
  checkApiKey,
60
60
  describeKeyCheck
61
- } from "../chunk-OW4WEO56.js";
62
- import "../chunk-6RGQIKAC.js";
63
- import "../chunk-ZFUSWR2P.js";
64
- import "../chunk-GEA6ZV2P.js";
65
- import "../chunk-KNVTKFDP.js";
66
- import "../chunk-6CDA4R5L.js";
67
- import "../chunk-RZD7ULBJ.js";
61
+ } from "../chunk-O35JKL4T.js";
62
+ import "../chunk-ZG6M5VQV.js";
63
+ import "../chunk-DCYA2SW2.js";
64
+ import "../chunk-AFGMZZEB.js";
65
+ import "../chunk-SGECX2RY.js";
66
+ import "../chunk-GKNTNKVQ.js";
67
+ import "../chunk-KOUB4ZLX.js";
68
68
  import {
69
69
  UsageError
70
70
  } from "../chunk-PPY5N2E6.js";
71
71
  import {
72
72
  EXIT
73
73
  } from "../chunk-KZERVKTD.js";
74
- import "../chunk-CMDIKFVL.js";
74
+ import "../chunk-PWGD5EP6.js";
75
75
  import "../chunk-ZVU6WMMU.js";
76
- import "../chunk-WOFHN2IZ.js";
76
+ import "../chunk-4FAJQPFY.js";
77
77
  import "../chunk-MLKGABMK.js";
78
78
 
79
79
  // src/status.ts
@@ -1,46 +1,47 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-EAJT6RYP.js";
5
- import "../chunk-CG3C2WL7.js";
6
- import "../chunk-VPT3RDTO.js";
4
+ } from "../chunk-E2YENQFD.js";
5
+ import "../chunk-3BBJO25D.js";
6
+ import "../chunk-BBNMGXZA.js";
7
+ import "../chunk-G66WIAST.js";
7
8
  import {
8
9
  activeHookSource,
9
10
  activeIdentity
10
- } from "../chunk-HXUE6IIP.js";
11
- import "../chunk-APFQBVQW.js";
12
- import "../chunk-HWEEBVS7.js";
13
- import "../chunk-5YRDZE5F.js";
14
- import "../chunk-5U63KUP3.js";
11
+ } from "../chunk-NTTFATKG.js";
12
+ import "../chunk-E4YZIS4C.js";
13
+ import "../chunk-OUF7TX2C.js";
14
+ import "../chunk-WVAJSBI2.js";
15
+ import "../chunk-T72OMEHB.js";
15
16
  import "../chunk-NMUI3ZWG.js";
16
- import "../chunk-UAUADSJX.js";
17
+ import "../chunk-3OIUMHHO.js";
17
18
  import "../chunk-XMSDA5WA.js";
18
- import "../chunk-CP72YEEA.js";
19
+ import "../chunk-ZNPUYLOY.js";
19
20
  import "../chunk-XHKBHWLX.js";
20
- import "../chunk-HD7AURL6.js";
21
+ import "../chunk-THHVB46D.js";
21
22
  import {
22
23
  emitHookOutput,
23
24
  handleStop,
24
25
  handleSubagentStop,
25
26
  isSubagentStop
26
- } from "../chunk-VVP4CP4O.js";
27
- import "../chunk-ZDIQPYM2.js";
28
- import "../chunk-CB2RYMAO.js";
29
- import "../chunk-Z6O6CDTP.js";
27
+ } from "../chunk-KUIJMRES.js";
28
+ import "../chunk-MP3SEXXJ.js";
29
+ import "../chunk-4QO267OY.js";
30
+ import "../chunk-7ZHLBWOV.js";
30
31
  import "../chunk-POFBE6ZY.js";
31
- import "../chunk-E5WUBHVH.js";
32
- import "../chunk-OW4WEO56.js";
33
- import "../chunk-6RGQIKAC.js";
34
- import "../chunk-ZFUSWR2P.js";
35
- import "../chunk-GEA6ZV2P.js";
36
- import "../chunk-KNVTKFDP.js";
37
- import "../chunk-6CDA4R5L.js";
38
- import "../chunk-RZD7ULBJ.js";
32
+ import "../chunk-VMXY3PAT.js";
33
+ import "../chunk-O35JKL4T.js";
34
+ import "../chunk-ZG6M5VQV.js";
35
+ import "../chunk-DCYA2SW2.js";
36
+ import "../chunk-AFGMZZEB.js";
37
+ import "../chunk-SGECX2RY.js";
38
+ import "../chunk-GKNTNKVQ.js";
39
+ import "../chunk-KOUB4ZLX.js";
39
40
  import "../chunk-PPY5N2E6.js";
40
41
  import "../chunk-KZERVKTD.js";
41
- import "../chunk-CMDIKFVL.js";
42
+ import "../chunk-PWGD5EP6.js";
42
43
  import "../chunk-ZVU6WMMU.js";
43
- import "../chunk-WOFHN2IZ.js";
44
+ import "../chunk-4FAJQPFY.js";
44
45
  import "../chunk-MLKGABMK.js";
45
46
 
46
47
  // bin/pushary-stop-hook.ts