pushary 1.9.192 → 1.9.194
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.
- package/CHANGELOG.md +17 -0
- package/dist/{api-XPS2NPJH.js → api-7WWLO6B4.js} +10 -10
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +24 -24
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-calls.js +16 -16
- package/dist/bin/pushary-claude.js +23 -23
- package/dist/bin/pushary-clean.js +34 -34
- package/dist/bin/pushary-codex-bridge.js +20 -20
- package/dist/bin/pushary-codex-hook.js +29 -29
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +29 -29
- package/dist/bin/pushary-cowork.js +4 -4
- package/dist/bin/pushary-daemon.js +40 -40
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-display-hook.js +9 -8
- package/dist/bin/pushary-doctor.js +40 -40
- package/dist/bin/pushary-elicitation-hook.js +24 -24
- package/dist/bin/pushary-gemini-bridge.js +16 -15
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +30 -30
- package/dist/bin/pushary-login.js +20 -20
- package/dist/bin/pushary-logout.js +23 -23
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +17 -17
- package/dist/bin/pushary-notification-hook.js +23 -23
- package/dist/bin/pushary-opencode-bridge.js +18 -18
- package/dist/bin/pushary-opencode-hook.js +27 -27
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +29 -29
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +23 -23
- package/dist/bin/pushary-session-end-hook.js +23 -23
- package/dist/bin/pushary-session-start-hook.js +33 -33
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +231 -100
- package/dist/bin/pushary-stats.js +4 -4
- package/dist/bin/pushary-status.js +28 -28
- package/dist/bin/pushary-stop-hook.js +23 -23
- package/dist/bin/pushary-stopfailure-hook.js +23 -23
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +15 -15
- package/dist/bin/pushary-transcripts.js +24 -24
- package/dist/bin/pushary-upgrade.js +40 -40
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +10 -10
- package/dist/{chunk-5WT6DLL2.js → chunk-23NHXO6T.js} +4 -4
- package/dist/{chunk-2HOKEC2I.js → chunk-25CMVBTJ.js} +2 -2
- package/dist/{chunk-YMULPOSH.js → chunk-3ZUDRXVV.js} +4 -4
- package/dist/{chunk-GR46QR45.js → chunk-44SARVA4.js} +5 -5
- package/dist/{chunk-T4GV5MOC.js → chunk-4BC4YDVL.js} +3 -3
- package/dist/{chunk-OTJEIINV.js → chunk-5AGLZUDK.js} +6 -5
- package/dist/{chunk-F326QJEJ.js → chunk-5C74GHZG.js} +5 -5
- package/dist/{chunk-DQI4647T.js → chunk-5JQQ5IQC.js} +2 -2
- package/dist/{chunk-EBIPQ3ZE.js → chunk-5NFHLMY3.js} +83 -17
- package/dist/{chunk-XSJON4TV.js → chunk-5YJSZFZ6.js} +1 -1
- package/dist/{chunk-ETT24EIH.js → chunk-62YIQ2P2.js} +2 -2
- package/dist/{chunk-7K5AYNDY.js → chunk-64LDWQKR.js} +4 -4
- package/dist/{chunk-GGKGVCUN.js → chunk-6J4KRJP4.js} +2 -2
- package/dist/{chunk-5WC6N3HA.js → chunk-6ONF5BPB.js} +6 -6
- package/dist/{chunk-UF6RZBTL.js → chunk-AJ6Q42KT.js} +2 -2
- package/dist/{chunk-FY7WHRDJ.js → chunk-BLVTNQZV.js} +2 -2
- package/dist/{chunk-JXZQ4XFL.js → chunk-BQGNF6BN.js} +2 -2
- package/dist/{chunk-XMNETXQ4.js → chunk-BXAVWEE4.js} +4 -4
- package/dist/{chunk-CDXD6W4N.js → chunk-CH7WFVC5.js} +1 -1
- package/dist/{chunk-RNPEOAPC.js → chunk-CMQCKXCF.js} +1 -1
- package/dist/{chunk-X4ENTDFT.js → chunk-D4BHK52K.js} +1 -1
- package/dist/{chunk-GUZLBFER.js → chunk-DFTVEK72.js} +5 -5
- package/dist/{chunk-GUBY4KIU.js → chunk-DWLG2IIV.js} +4 -4
- package/dist/{chunk-R2NYUOTC.js → chunk-ENEMHGBE.js} +7 -7
- package/dist/{chunk-4FVKGWWZ.js → chunk-ERVXMMGO.js} +1 -1
- package/dist/{chunk-AD7R7TNQ.js → chunk-G3HAAQ65.js} +8 -8
- package/dist/{chunk-FZWUUGC2.js → chunk-GHMCSDAN.js} +3 -3
- package/dist/{chunk-3APYAOZF.js → chunk-GZAU5W3K.js} +2 -2
- package/dist/{chunk-CDEJHIYQ.js → chunk-HNHRPMND.js} +5 -5
- package/dist/{chunk-Y2H5TF7T.js → chunk-IC5BBT2K.js} +1 -1
- package/dist/{chunk-LWUDOZHE.js → chunk-IYYWAP6P.js} +3 -3
- package/dist/{chunk-PUVD22DY.js → chunk-J7D27BKP.js} +21 -10
- package/dist/{chunk-NCN7ANYA.js → chunk-KFSWRIH2.js} +9 -9
- package/dist/{chunk-UV5ROHY2.js → chunk-LFCLDWHZ.js} +1 -1
- package/dist/{chunk-DHD54IIT.js → chunk-LOQWIBVV.js} +3 -3
- package/dist/{chunk-X7FIYMHC.js → chunk-M7O33GTP.js} +2 -2
- package/dist/{chunk-XONHTLMX.js → chunk-MAPYE7MM.js} +7 -7
- package/dist/{chunk-H6CBRJKT.js → chunk-MIO242ZB.js} +3 -3
- package/dist/{chunk-A4QFVUEY.js → chunk-N3TX5LLG.js} +3 -3
- package/dist/{chunk-7QUPTDT2.js → chunk-NFFWCJMJ.js} +1 -1
- package/dist/{chunk-ZCR5VTOC.js → chunk-OM7CKAVY.js} +3 -3
- package/dist/{chunk-EJ56NJQ4.js → chunk-OPRRDN5R.js} +5 -5
- package/dist/{chunk-WB5DD232.js → chunk-ORV2JLNH.js} +1 -1
- package/dist/{chunk-23WKGMTI.js → chunk-PEUODRKS.js} +1 -1
- package/dist/{chunk-P6NACIBR.js → chunk-PY3VOJQY.js} +3 -3
- package/dist/{chunk-JJBM5FYH.js → chunk-QOWEXH34.js} +1 -1
- package/dist/{chunk-GAAPUS5J.js → chunk-QQLYMBKM.js} +1 -1
- package/dist/{chunk-C2B4LPJU.js → chunk-RDO4NPVU.js} +2 -2
- package/dist/{chunk-DAHGMBRE.js → chunk-RE6TWTNY.js} +2 -2
- package/dist/{chunk-SHAHZQTQ.js → chunk-RL5LF7JZ.js} +4 -4
- package/dist/{chunk-O7ZCWGYA.js → chunk-S5YA65CK.js} +2 -2
- package/dist/{chunk-ITPAUHJ4.js → chunk-SRIFCDTY.js} +1 -1
- package/dist/{chunk-URVW3D2J.js → chunk-SS5PB32H.js} +10 -10
- package/dist/{chunk-6C7DT36Z.js → chunk-T3IU6PWU.js} +13 -13
- package/dist/{chunk-VNCN3Z4T.js → chunk-T776F2FQ.js} +1 -1
- package/dist/{chunk-VRNGMRJA.js → chunk-TFMIG3VP.js} +1 -1
- package/dist/{chunk-E65O7RMA.js → chunk-U2LLYPDS.js} +3 -3
- package/dist/{chunk-NFK2QF74.js → chunk-UPGPPX7W.js} +4 -4
- package/dist/{chunk-DP6YHOKF.js → chunk-UYAKT6PO.js} +1 -1
- package/dist/{chunk-6TNKY3DC.js → chunk-V3PMKMAO.js} +4 -4
- package/dist/{chunk-AQLIBG2P.js → chunk-V4R37DFH.js} +4 -4
- package/dist/{chunk-OYZUPSD7.js → chunk-V6OR4WLF.js} +7 -7
- package/dist/{chunk-6CJSVFAD.js → chunk-VD57H3ZU.js} +1 -1
- package/dist/{chunk-UQTQ6HPO.js → chunk-YJHBDJIW.js} +2 -0
- package/dist/{chunk-VDJMYP54.js → chunk-YLMBNJWN.js} +1 -1
- package/dist/{chunk-KERLAXHG.js → chunk-ZDROZABP.js} +3 -3
- package/dist/{chunk-P4JYK7WB.js → chunk-ZGS5TMMV.js} +2 -2
- package/dist/{codex-app-cards-switch-UEN23QFT.js → codex-app-cards-switch-NCSFAEUY.js} +13 -12
- package/dist/{codex-desktop-launch-DKOOCOTD.js → codex-desktop-launch-I6UPDWTQ.js} +1 -1
- package/dist/{codex-session-launch-UHNV5Z3D.js → codex-session-launch-4OT4CC2W.js} +17 -17
- package/dist/{config-EVDZ6OAI.js → config-2AGOCKSO.js} +3 -3
- package/dist/{global-upgrade-KZQWNABB.js → global-upgrade-OG6RLR36.js} +9 -9
- package/dist/{identity-A2BK7P2A.js → identity-57VX4O7Z.js} +5 -4
- package/dist/{live-capabilities-43YRGYAR.js → live-capabilities-6SRTZJ5A.js} +5 -4
- package/dist/{paths-67D2435E.js → paths-M47UHTQ4.js} +4 -3
- package/dist/{reapply-APVASEGC.js → reapply-3BXOHGEE.js} +26 -26
- package/dist/src/index.js +29 -29
- package/dist/{upgrade-lock-TG4UOPN7.js → upgrade-lock-EIPMFXKR.js} +5 -4
- package/dist/{usage-FVDJIMCB.js → usage-YSVHDBHO.js} +3 -3
- package/package.json +1 -1
|
@@ -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-
|
|
30
|
+
} from "../chunk-PY3VOJQY.js";
|
|
27
31
|
import {
|
|
28
32
|
INSTALL_NODE_STEP,
|
|
29
33
|
NPM_FILE_IN_USE_STEP,
|
|
@@ -37,7 +41,7 @@ import {
|
|
|
37
41
|
renderCommandSurface,
|
|
38
42
|
teamOfferLines,
|
|
39
43
|
unverifiedKeyClosingReason
|
|
40
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-G3HAAQ65.js";
|
|
41
45
|
import {
|
|
42
46
|
instructionsChannelFor,
|
|
43
47
|
pairingComputerOf,
|
|
@@ -46,16 +50,16 @@ import {
|
|
|
46
50
|
import {
|
|
47
51
|
coworkOutput,
|
|
48
52
|
coworkSelection
|
|
49
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-YLMBNJWN.js";
|
|
50
54
|
import "../chunk-PUZZELE6.js";
|
|
51
55
|
import {
|
|
52
56
|
readCodexHooksOnDisk
|
|
53
|
-
} from "../chunk-
|
|
54
|
-
import "../chunk-
|
|
57
|
+
} from "../chunk-ENEMHGBE.js";
|
|
58
|
+
import "../chunk-T776F2FQ.js";
|
|
55
59
|
import {
|
|
56
60
|
clearDeclinedAgent,
|
|
57
61
|
declinedAgentForSetupChoice
|
|
58
|
-
} from "../chunk-
|
|
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-
|
|
70
|
+
} from "../chunk-23NHXO6T.js";
|
|
67
71
|
import {
|
|
68
72
|
CODEX_NEEDS_A_NEWER_VERSION,
|
|
69
73
|
CODEX_SETTINGS_STOP_A_HOOK,
|
|
@@ -77,7 +81,7 @@ import {
|
|
|
77
81
|
describeHermesState,
|
|
78
82
|
hermesGateShellCommand,
|
|
79
83
|
needsCodexTrustStep
|
|
80
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-RL5LF7JZ.js";
|
|
81
85
|
import {
|
|
82
86
|
describeWaitLadder
|
|
83
87
|
} from "../chunk-CVWG2N3Y.js";
|
|
@@ -96,7 +100,7 @@ import {
|
|
|
96
100
|
phoneAwaitsNotificationPermission,
|
|
97
101
|
printConnectInstructions,
|
|
98
102
|
waitForYourPhone
|
|
99
|
-
} from "../chunk-
|
|
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-
|
|
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-
|
|
120
|
+
} from "../chunk-6ONF5BPB.js";
|
|
117
121
|
import {
|
|
118
122
|
ensureCodexTrustsPusharyHooks
|
|
119
|
-
} from "../chunk-
|
|
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-
|
|
131
|
+
} from "../chunk-62YIQ2P2.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-
|
|
147
|
+
} from "../chunk-U2LLYPDS.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-
|
|
157
|
+
} from "../chunk-3ZUDRXVV.js";
|
|
154
158
|
import "../chunk-OYIN77HO.js";
|
|
155
159
|
import {
|
|
156
160
|
mcpServerBearer,
|
|
157
161
|
readMacAppAgentKey
|
|
158
|
-
} from "../chunk-
|
|
162
|
+
} from "../chunk-GHMCSDAN.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-
|
|
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-
|
|
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-
|
|
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-
|
|
219
|
+
} from "../chunk-ZGS5TMMV.js";
|
|
216
220
|
import {
|
|
217
221
|
MCP_BRIDGE_BINARY
|
|
218
|
-
} from "../chunk-
|
|
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-
|
|
241
|
+
} from "../chunk-LOQWIBVV.js";
|
|
238
242
|
import "../chunk-4TIZJD3Q.js";
|
|
239
243
|
import "../chunk-WNCTMTMG.js";
|
|
240
244
|
import {
|
|
241
245
|
keyScopeOf
|
|
242
|
-
} from "../chunk-
|
|
246
|
+
} from "../chunk-VD57H3ZU.js";
|
|
243
247
|
import {
|
|
244
248
|
ansiPainter,
|
|
245
249
|
ciMarker,
|
|
@@ -261,16 +265,16 @@ import {
|
|
|
261
265
|
nodeCodexInstallProbe,
|
|
262
266
|
phoneStartIsRequired,
|
|
263
267
|
resolveControlPolicy
|
|
264
|
-
} from "../chunk-
|
|
268
|
+
} from "../chunk-AJ6Q42KT.js";
|
|
265
269
|
import {
|
|
266
270
|
detectClaudeVersion
|
|
267
|
-
} from "../chunk-
|
|
271
|
+
} from "../chunk-CMQCKXCF.js";
|
|
268
272
|
import "../chunk-TCE3J44Z.js";
|
|
269
273
|
import {
|
|
270
274
|
describeAutoUpdateAnnouncement,
|
|
271
275
|
takeAutoUpdateAnnouncement
|
|
272
|
-
} from "../chunk-
|
|
273
|
-
import "../chunk-
|
|
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-
|
|
292
|
+
} from "../chunk-OM7CKAVY.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-
|
|
311
|
+
} from "../chunk-V6OR4WLF.js";
|
|
308
312
|
import {
|
|
309
313
|
GEMINI_HOOK_BINARY,
|
|
310
314
|
GEMINI_HOOK_EVENTS,
|
|
@@ -320,10 +324,10 @@ import {
|
|
|
320
324
|
geminiWired,
|
|
321
325
|
planHooks,
|
|
322
326
|
pusharyHookExecutable
|
|
323
|
-
} from "../chunk-
|
|
327
|
+
} from "../chunk-5JQQ5IQC.js";
|
|
324
328
|
import {
|
|
325
329
|
reportEvent
|
|
326
|
-
} from "../chunk-
|
|
330
|
+
} from "../chunk-J7D27BKP.js";
|
|
327
331
|
import "../chunk-3ULFLONL.js";
|
|
328
332
|
import {
|
|
329
333
|
AGENT_CHOICES,
|
|
@@ -332,26 +336,26 @@ import {
|
|
|
332
336
|
effectiveVerify,
|
|
333
337
|
parseSetupOptions
|
|
334
338
|
} from "../chunk-EJJBM4OB.js";
|
|
335
|
-
import "../chunk-
|
|
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-
|
|
341
|
-
import "../chunk-
|
|
342
|
-
import "../chunk-
|
|
344
|
+
} from "../chunk-CH7WFVC5.js";
|
|
345
|
+
import "../chunk-TFMIG3VP.js";
|
|
346
|
+
import "../chunk-5AGLZUDK.js";
|
|
343
347
|
import "../chunk-5IPXL33D.js";
|
|
344
348
|
import "../chunk-POFBE6ZY.js";
|
|
345
|
-
import "../chunk-
|
|
349
|
+
import "../chunk-MIO242ZB.js";
|
|
346
350
|
import "../chunk-VEE2MRUN.js";
|
|
347
351
|
import "../chunk-VH5DPURH.js";
|
|
348
352
|
import {
|
|
349
353
|
checkApiKey,
|
|
350
354
|
describeKeyCheck,
|
|
351
355
|
samePusharyAccount
|
|
352
|
-
} from "../chunk-
|
|
353
|
-
import "../chunk-
|
|
354
|
-
import "../chunk-
|
|
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-
|
|
371
|
-
import "../chunk-
|
|
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-
|
|
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
|
-
|
|
452
|
+
resolveGlobalBinary,
|
|
453
|
+
runNpmInTerminal,
|
|
454
|
+
setupNeedsGlobalInstall,
|
|
455
|
+
setupWouldDowngrade
|
|
456
|
+
} from "../chunk-5NFHLMY3.js";
|
|
443
457
|
import {
|
|
444
458
|
getBaseUrl
|
|
445
|
-
} from "../chunk-
|
|
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-
|
|
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-
|
|
481
|
+
} from "../chunk-YJHBDJIW.js";
|
|
466
482
|
import {
|
|
467
483
|
CURSOR_GATE_SCRIPT,
|
|
468
484
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -478,8 +494,8 @@ import {
|
|
|
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
|
|
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
|
-
|
|
940
|
-
|
|
1061
|
+
join5(__dirname, "..", "..", "data", "SKILL.md"),
|
|
1062
|
+
join5(__dirname, "..", "data", "SKILL.md")
|
|
941
1063
|
];
|
|
942
|
-
const source = candidates.find((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 (!
|
|
950
|
-
writeFileSync(
|
|
1071
|
+
if (!existsSync2(dir)) mkdirSync(dir, { recursive: true });
|
|
1072
|
+
writeFileSync(join5(dir, "SKILL.md"), content, "utf-8");
|
|
951
1073
|
};
|
|
952
|
-
var skillsCliInUse = () => isInstalled("skills") ||
|
|
1074
|
+
var skillsCliInUse = () => isInstalled("skills") || existsSync2(join5(homedir(), ".agents", "skills"));
|
|
953
1075
|
var skillInstallEffects = {
|
|
954
1076
|
runSkillsCli: installSkillViaSkillsCli,
|
|
955
|
-
skillModifiedAt: (dir) => statSync(
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
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) =>
|
|
1566
|
+
return candidates.find((p) => existsSync2(join5(p, ".cursor-plugin", "plugin.json"))) ?? null;
|
|
1445
1567
|
};
|
|
1446
1568
|
var installCursorUserHooks = (gateScript) => {
|
|
1447
|
-
const bundled = readJson(
|
|
1569
|
+
const bundled = readJson(join5(CURSOR_PLUGIN_DIR, "hooks", "hooks.json")).hooks ?? {};
|
|
1448
1570
|
let userHooks = {};
|
|
1449
|
-
if (
|
|
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 =
|
|
1476
|
-
if (!
|
|
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 =
|
|
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(
|
|
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 =
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
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) =>
|
|
1675
|
+
return candidates.find((p) => existsSync2(join5(p, ".claude-plugin", "plugin.json"))) ?? null;
|
|
1554
1676
|
};
|
|
1555
1677
|
var pinGuardedVsCodeGate = (pluginDir) => {
|
|
1556
|
-
const hooksPath =
|
|
1557
|
-
const guarded = guardVsCodeGateHooks(readJson(hooksPath),
|
|
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(
|
|
1565
|
-
const current =
|
|
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 =
|
|
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(
|
|
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 =
|
|
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 (!
|
|
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") && !
|
|
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:
|
|
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(
|
|
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:
|
|
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
|
|
2119
|
+
return existsSync2(join5(CURSOR_PLUGIN_DIR, "mcp.json"));
|
|
1998
2120
|
case "vscode":
|
|
1999
|
-
return
|
|
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 || !
|
|
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 ${
|
|
2160
|
-
writeInstructionBlock(
|
|
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(
|
|
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,
|
|
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,
|
|
3100
|
+
warnVersionManagerPin(serviceNodeFor(process.execPath, existsSync2));
|
|
2970
3101
|
reportLinger(lingerReportOf(keepLinuxDaemonAfterLogout()));
|
|
2971
3102
|
controlFailureStage = "daemon-start";
|
|
2972
3103
|
daemon = await ensureDaemonRunning({ spawnDaemon: () => {
|