pushary 1.9.234 → 1.9.235
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 +12 -0
- package/dist/{api-M67GCEPF.js → api-UVFEVNJD.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-calls.js +15 -15
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -35
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -46
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +1 -0
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +23 -23
- package/dist/bin/pushary-logout.js +31 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +22 -22
- package/dist/bin/pushary-opencode-hook.js +32 -32
- package/dist/bin/pushary-permission-denied-hook.js +34 -34
- package/dist/bin/pushary-permission-hook.js +35 -35
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +39 -39
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +367 -109
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -36
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +26 -26
- package/dist/bin/pushary-upgrade.js +47 -47
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-WOH6BCX7.js → chunk-2QUYUFYQ.js} +4 -4
- package/dist/{chunk-T6KURDWS.js → chunk-3B5FQ542.js} +2 -2
- package/dist/{chunk-TZDZ3QGG.js → chunk-3C2XMGXE.js} +3 -3
- package/dist/{chunk-YUBMSPWE.js → chunk-3K2S4OW7.js} +10 -33
- package/dist/{chunk-U6HLDWKF.js → chunk-3QQY5USW.js} +4 -4
- package/dist/{chunk-JD67C7KL.js → chunk-4CEGJAEB.js} +1 -1
- package/dist/{chunk-RGJ6YCGT.js → chunk-4QQ3HXGR.js} +3 -3
- package/dist/{chunk-IAUCVHGV.js → chunk-4UIVOCDT.js} +1 -1
- package/dist/{chunk-VTCM3LRD.js → chunk-52PIW2SN.js} +3 -3
- package/dist/{chunk-V7DKNNN3.js → chunk-5DRTR5FC.js} +5 -5
- package/dist/{chunk-3JIMXIO5.js → chunk-5QLIXOVT.js} +1 -1
- package/dist/{chunk-ADMVVNW2.js → chunk-6H3RBEHP.js} +1 -1
- package/dist/{chunk-OI5PIRYC.js → chunk-7B2DHU32.js} +16 -16
- package/dist/{chunk-HXYZSB4U.js → chunk-7MRK2WXT.js} +2 -1
- package/dist/{chunk-256X3DP6.js → chunk-7XCL66ON.js} +2 -2
- package/dist/{chunk-EA6DCQMW.js → chunk-A2GO3G2I.js} +6 -6
- package/dist/{chunk-A3V2JCN3.js → chunk-AA54OZM2.js} +5 -5
- package/dist/{chunk-BBPSHOSK.js → chunk-BBZ3BBZC.js} +4 -4
- package/dist/{chunk-JCRH5R45.js → chunk-BJRPBKE7.js} +12 -4
- package/dist/{chunk-6XKHPCFW.js → chunk-CSXA4HMV.js} +2 -2
- package/dist/{chunk-IPVZPZBT.js → chunk-DN6HPGCI.js} +5 -5
- package/dist/{chunk-2BSSRM5U.js → chunk-DW7ZQX7L.js} +1 -1
- package/dist/{chunk-BM4WXLS6.js → chunk-E6IFBGZF.js} +2 -2
- package/dist/{chunk-G6Y63AZ2.js → chunk-EINN22XV.js} +2 -2
- package/dist/{chunk-5ZTBYRTQ.js → chunk-ELP65DFC.js} +1 -1
- package/dist/{chunk-VNEKDZRS.js → chunk-FCQ52N4E.js} +8 -8
- package/dist/{chunk-ZGQCZKNY.js → chunk-FEVQDABQ.js} +2 -2
- package/dist/{chunk-KNM3GFV5.js → chunk-FKX7SWNT.js} +7 -7
- package/dist/{chunk-HEOH4JH3.js → chunk-FMWG4X3D.js} +5 -5
- package/dist/{chunk-E4XS75YY.js → chunk-FUJZW3R5.js} +1 -1
- package/dist/{chunk-VWELQENE.js → chunk-FZN7TKSM.js} +1 -1
- package/dist/{chunk-FHMZFJJI.js → chunk-G5EKU4RB.js} +3 -3
- package/dist/{chunk-LT2X6GMR.js → chunk-G5OTSL26.js} +3 -3
- package/dist/{chunk-7O766ACL.js → chunk-GPD4BB76.js} +1 -1
- package/dist/{chunk-6RMGY4KP.js → chunk-GSB62GNT.js} +4 -4
- package/dist/{chunk-KKVTBTX5.js → chunk-H4364HR3.js} +5 -5
- package/dist/{chunk-EKCCDM3D.js → chunk-H5TBR4BB.js} +5 -5
- package/dist/{chunk-3FW2QYX2.js → chunk-HDD23XYP.js} +11 -11
- package/dist/{chunk-AS326WXH.js → chunk-HI3LOBT5.js} +9 -7
- package/dist/{chunk-BEEJ3QJP.js → chunk-HJSW3MH2.js} +2 -2
- package/dist/{chunk-PIEQTKMS.js → chunk-HPFGXE6Y.js} +6 -6
- package/dist/{chunk-JO7YECNL.js → chunk-ICLT2KA5.js} +1 -1
- package/dist/{chunk-KAHKKD4R.js → chunk-JF3ONE4H.js} +2 -2
- package/dist/{chunk-DXB3WZQH.js → chunk-JF4VX754.js} +1 -1
- package/dist/{chunk-R3VB6IWK.js → chunk-JFXYGMV5.js} +4 -4
- package/dist/{chunk-DECR2ASU.js → chunk-JM6EAV42.js} +5 -5
- package/dist/{chunk-PIEQVLWA.js → chunk-JPKOYDQJ.js} +6 -6
- package/dist/{chunk-N5FLIE3B.js → chunk-JYFMVOML.js} +1 -1
- package/dist/{chunk-DXLNLE7C.js → chunk-K6PBTBLO.js} +4 -4
- package/dist/{chunk-WMELBTKZ.js → chunk-KTJHZVCD.js} +3 -3
- package/dist/{chunk-MNVPOPER.js → chunk-LDX3KQMJ.js} +2 -2
- package/dist/{chunk-WXSWR2FG.js → chunk-LIYQSMYK.js} +4 -4
- package/dist/{chunk-3ABPJTSC.js → chunk-M64A2Z2F.js} +1 -1
- package/dist/{chunk-GRWWQNKA.js → chunk-MHZSIN5K.js} +3 -3
- package/dist/{chunk-XW7UUCSM.js → chunk-MN6DXDJR.js} +6 -6
- package/dist/{chunk-ZATM23SV.js → chunk-MQSO2S3H.js} +1 -1
- package/dist/{chunk-Q3LFQVDS.js → chunk-NDXTGRZG.js} +1 -1
- package/dist/{chunk-746XV434.js → chunk-OSDIFFSP.js} +3 -3
- package/dist/{chunk-J3LMHXHV.js → chunk-OV2XD2UY.js} +1 -1
- package/dist/{chunk-WC4WLJ6L.js → chunk-Q5SVRCFU.js} +1 -1
- package/dist/{chunk-E43Q5IZQ.js → chunk-RV5LIW3K.js} +12 -12
- package/dist/{chunk-NDPIHRLT.js → chunk-SFIYMKWT.js} +5 -5
- package/dist/{chunk-FQNL4HE7.js → chunk-TAXOI6AK.js} +4 -4
- package/dist/{chunk-IX2DIIR5.js → chunk-TGM2WHUG.js} +2 -2
- package/dist/{chunk-4JJDUPF5.js → chunk-TMN7LKDC.js} +7 -7
- package/dist/{chunk-AJCFOXEE.js → chunk-TWACA7ER.js} +9 -9
- package/dist/{chunk-JMHS55ZS.js → chunk-UIBQDALO.js} +3 -3
- package/dist/{chunk-QU6OSEUV.js → chunk-ULDUDSTW.js} +2 -0
- package/dist/{chunk-MCJGCJUQ.js → chunk-URDT623B.js} +1 -1
- package/dist/{chunk-7KIEBY2I.js → chunk-V4ZQBKI6.js} +1 -1
- package/dist/{chunk-J6CSPMZF.js → chunk-V7ULGI7U.js} +4 -4
- package/dist/{chunk-BWGJWF7M.js → chunk-VPG6QENY.js} +10 -10
- package/dist/{chunk-2X7O2QE3.js → chunk-WMCF6PR5.js} +3 -3
- package/dist/{chunk-NHKJDBKZ.js → chunk-WVJFHP75.js} +1 -1
- package/dist/{chunk-6MKKNXW6.js → chunk-WY2UKKLD.js} +1 -1
- package/dist/{chunk-ZHPK2JGH.js → chunk-X4G5G2ZN.js} +2 -2
- package/dist/{chunk-A4QB2DOJ.js → chunk-XGW4PJPO.js} +2 -2
- package/dist/{chunk-2JM3H72Y.js → chunk-XYRXKL3V.js} +1 -1
- package/dist/{chunk-Z6VYPLVI.js → chunk-Z5EWWGD2.js} +5 -5
- package/dist/{chunk-OVM54QWV.js → chunk-Z7LAWFZ7.js} +4 -3
- package/dist/{chunk-E7QTBSY2.js → chunk-ZPQPTIIY.js} +2 -2
- package/dist/{codex-app-cards-switch-FCF22YK6.js → codex-app-cards-switch-DBFQJU3Y.js} +11 -11
- package/dist/{codex-card-routing-33FTWY2U.js → codex-card-routing-TKG7LOP4.js} +2 -2
- package/dist/{codex-desktop-launch-CMMBCQDF.js → codex-desktop-launch-UXMYKS5C.js} +3 -3
- package/dist/{codex-session-launch-VW4737L5.js → codex-session-launch-5NOJKDWN.js} +20 -20
- package/dist/{config-GPO476YL.js → config-HHUSXJZE.js} +3 -3
- package/dist/{global-upgrade-6DOQCXZJ.js → global-upgrade-J2NB62DV.js} +9 -9
- package/dist/{identity-4OD6GQPB.js → identity-7O3ZBVUY.js} +4 -4
- package/dist/{live-capabilities-X6O5HJCK.js → live-capabilities-773SVQWH.js} +4 -4
- package/dist/{paths-LYVFVRQM.js → paths-VZXMX35O.js} +3 -3
- package/dist/{reapply-GKXG74LO.js → reapply-7MIBK2WB.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-LZIWY4Q6.js → upgrade-lock-WWTTPOIZ.js} +4 -4
- package/dist/{usage-RN5ED6TT.js → usage-PHTLHFL2.js} +3 -3
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
withUpgradeLock
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-HPFGXE6Y.js";
|
|
5
|
+
import "../chunk-E6IFBGZF.js";
|
|
6
6
|
import {
|
|
7
7
|
runBrowserLogin
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-4CEGJAEB.js";
|
|
9
9
|
import {
|
|
10
10
|
INSTALL_NODE_STEP,
|
|
11
11
|
NPM_FILE_IN_USE_STEP,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
renderCommandSurface,
|
|
20
20
|
teamOfferLines,
|
|
21
21
|
unverifiedKeyClosingReason
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-3K2S4OW7.js";
|
|
23
23
|
import {
|
|
24
24
|
WRONG_ACCOUNT_HINT,
|
|
25
25
|
canAskAtTheTerminal,
|
|
@@ -42,29 +42,29 @@ import {
|
|
|
42
42
|
someoneIsAtTheTerminal,
|
|
43
43
|
switchBackToTheShellKeyLine,
|
|
44
44
|
wrongAccountHintPlacement
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-TAXOI6AK.js";
|
|
46
46
|
import {
|
|
47
47
|
instructionsChannelFor,
|
|
48
48
|
pairingComputerOf,
|
|
49
49
|
planPhoneCheck
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-WY2UKKLD.js";
|
|
51
51
|
import {
|
|
52
52
|
coworkOutput,
|
|
53
53
|
coworkSelection
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-3C2XMGXE.js";
|
|
55
55
|
import "../chunk-PUZZELE6.js";
|
|
56
56
|
import {
|
|
57
57
|
readCodexHooksOnDisk
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-TWACA7ER.js";
|
|
59
59
|
import {
|
|
60
60
|
macAppHistoryDecision,
|
|
61
61
|
nativeBridgeAccount
|
|
62
62
|
} from "../chunk-TWWOQKXK.js";
|
|
63
|
-
import "../chunk-
|
|
63
|
+
import "../chunk-LDX3KQMJ.js";
|
|
64
64
|
import {
|
|
65
65
|
clearDeclinedAgent,
|
|
66
66
|
declinedAgentForSetupChoice
|
|
67
|
-
} from "../chunk-
|
|
67
|
+
} from "../chunk-EINN22XV.js";
|
|
68
68
|
import {
|
|
69
69
|
OPENCLAW_RESTART_NOTE,
|
|
70
70
|
describeOpenClawInstallFailure,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
gateHermesShell,
|
|
73
73
|
readHermesShellGate,
|
|
74
74
|
saveSetupFailure
|
|
75
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-Z5EWWGD2.js";
|
|
76
76
|
import {
|
|
77
77
|
CODEX_NEEDS_A_NEWER_VERSION,
|
|
78
78
|
CODEX_SETTINGS_STOP_A_HOOK,
|
|
@@ -88,15 +88,16 @@ import {
|
|
|
88
88
|
describeHermesState,
|
|
89
89
|
hermesGateShellCommand,
|
|
90
90
|
needsCodexTrustStep
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-3QQY5USW.js";
|
|
92
92
|
import {
|
|
93
93
|
describeWaitLadder
|
|
94
94
|
} from "../chunk-CVWG2N3Y.js";
|
|
95
95
|
import {
|
|
96
96
|
writeJsonError,
|
|
97
97
|
writeStdoutFully
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-MQSO2S3H.js";
|
|
99
99
|
import {
|
|
100
|
+
PHONE_WAIT_SKIP_KEY,
|
|
100
101
|
canShowPairingQr,
|
|
101
102
|
confirmAppConnection,
|
|
102
103
|
connectDevice,
|
|
@@ -107,7 +108,7 @@ import {
|
|
|
107
108
|
phoneAwaitsNotificationPermission,
|
|
108
109
|
printConnectInstructions,
|
|
109
110
|
waitForYourPhone
|
|
110
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-HI3LOBT5.js";
|
|
111
112
|
import "../chunk-3EGEA4KH.js";
|
|
112
113
|
import {
|
|
113
114
|
SETUP_AGENT_NAME,
|
|
@@ -116,7 +117,7 @@ import {
|
|
|
116
117
|
roundTripEvidence,
|
|
117
118
|
roundTripWasAnswered,
|
|
118
119
|
verifyRoundTrip
|
|
119
|
-
} from "../chunk-
|
|
120
|
+
} from "../chunk-MN6DXDJR.js";
|
|
120
121
|
import {
|
|
121
122
|
keepLinuxDaemonAfterLogout,
|
|
122
123
|
lingerReportOf
|
|
@@ -124,13 +125,13 @@ import {
|
|
|
124
125
|
import {
|
|
125
126
|
readManagedControlEvidence,
|
|
126
127
|
waitForMachineReadiness
|
|
127
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-5DRTR5FC.js";
|
|
128
129
|
import {
|
|
129
130
|
ensureCodexTrustsPusharyHooks,
|
|
130
131
|
hermesHistoryHelperRecordPath,
|
|
131
132
|
hermesHistoryNeedsTheCliHelper,
|
|
132
133
|
recordInstalledHermesHistoryHelper
|
|
133
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-KTJHZVCD.js";
|
|
134
135
|
import {
|
|
135
136
|
scheduleWithTimer
|
|
136
137
|
} from "../chunk-AVFPHV4N.js";
|
|
@@ -141,7 +142,7 @@ import {
|
|
|
141
142
|
} from "../chunk-UOPOVQ2P.js";
|
|
142
143
|
import {
|
|
143
144
|
codexEngineBehindLauncher
|
|
144
|
-
} from "../chunk-
|
|
145
|
+
} from "../chunk-LIYQSMYK.js";
|
|
145
146
|
import "../chunk-XCEN33UP.js";
|
|
146
147
|
import {
|
|
147
148
|
CODEX_ENGINE_DIRECTORY,
|
|
@@ -155,9 +156,10 @@ import {
|
|
|
155
156
|
claimSoleGate,
|
|
156
157
|
registerCursorGate,
|
|
157
158
|
soleGateFile,
|
|
159
|
+
soleGateLeftAloneFor,
|
|
158
160
|
soleGateReceipt,
|
|
159
161
|
soleGateReceiptFile
|
|
160
|
-
} from "../chunk-
|
|
162
|
+
} from "../chunk-BJRPBKE7.js";
|
|
161
163
|
import {
|
|
162
164
|
describeDetection,
|
|
163
165
|
detectAllAgents,
|
|
@@ -167,12 +169,12 @@ import {
|
|
|
167
169
|
registerPluginLocation,
|
|
168
170
|
shortenHome,
|
|
169
171
|
vscodeSettingsTargets
|
|
170
|
-
} from "../chunk-
|
|
172
|
+
} from "../chunk-JM6EAV42.js";
|
|
171
173
|
import "../chunk-OYIN77HO.js";
|
|
172
174
|
import {
|
|
173
175
|
mcpServerBearer,
|
|
174
176
|
readMacAppAgentKey
|
|
175
|
-
} from "../chunk-
|
|
177
|
+
} from "../chunk-BBZ3BBZC.js";
|
|
176
178
|
import {
|
|
177
179
|
HERMES_CONFIG_FILE,
|
|
178
180
|
HERMES_GATE_TOOLS_KEY,
|
|
@@ -191,7 +193,7 @@ import {
|
|
|
191
193
|
routesHermesQuestions,
|
|
192
194
|
runsAnOlderPlugin,
|
|
193
195
|
shippedHermesPlugin
|
|
194
|
-
} from "../chunk-
|
|
196
|
+
} from "../chunk-2QUYUFYQ.js";
|
|
195
197
|
import {
|
|
196
198
|
setHumanStream
|
|
197
199
|
} from "../chunk-QCGNGEGE.js";
|
|
@@ -199,7 +201,7 @@ import {
|
|
|
199
201
|
findOpenClawLauncher,
|
|
200
202
|
isOpenClawWired,
|
|
201
203
|
openClawPathsNow
|
|
202
|
-
} from "../chunk-
|
|
204
|
+
} from "../chunk-4QQ3HXGR.js";
|
|
203
205
|
import {
|
|
204
206
|
FX_PICKS_UP_CONFIGURATION,
|
|
205
207
|
FX_PUSHARY_TOOLS_RULE,
|
|
@@ -216,7 +218,7 @@ import {
|
|
|
216
218
|
readFxProfileForSetup,
|
|
217
219
|
withFxPusharyServer,
|
|
218
220
|
writeFxProfile
|
|
219
|
-
} from "../chunk-
|
|
221
|
+
} from "../chunk-SFIYMKWT.js";
|
|
220
222
|
import {
|
|
221
223
|
AgentConfigError,
|
|
222
224
|
afterAgentFailureNote,
|
|
@@ -229,10 +231,10 @@ import {
|
|
|
229
231
|
retryAgentCommand,
|
|
230
232
|
writeSetupConfigFile,
|
|
231
233
|
writeSetupConfigJson
|
|
232
|
-
} from "../chunk-
|
|
234
|
+
} from "../chunk-MHZSIN5K.js";
|
|
233
235
|
import {
|
|
234
236
|
MCP_BRIDGE_BINARY
|
|
235
|
-
} from "../chunk-
|
|
237
|
+
} from "../chunk-GSB62GNT.js";
|
|
236
238
|
import {
|
|
237
239
|
OPENCODE_HOOK_BINARY,
|
|
238
240
|
addOpenCodeMcpServer,
|
|
@@ -251,12 +253,12 @@ import {
|
|
|
251
253
|
openCodePluginFile,
|
|
252
254
|
openCodeWired,
|
|
253
255
|
withOpenCodeAskRules
|
|
254
|
-
} from "../chunk-
|
|
255
|
-
import "../chunk-
|
|
256
|
-
import "../chunk-
|
|
256
|
+
} from "../chunk-FKX7SWNT.js";
|
|
257
|
+
import "../chunk-GPD4BB76.js";
|
|
258
|
+
import "../chunk-JYFMVOML.js";
|
|
257
259
|
import {
|
|
258
260
|
keyScopeOf
|
|
259
|
-
} from "../chunk-
|
|
261
|
+
} from "../chunk-ZPQPTIIY.js";
|
|
260
262
|
import {
|
|
261
263
|
ansiPainter,
|
|
262
264
|
ciMarker,
|
|
@@ -265,7 +267,7 @@ import {
|
|
|
265
267
|
describeError,
|
|
266
268
|
isCI,
|
|
267
269
|
useColor
|
|
268
|
-
} from "../chunk-
|
|
270
|
+
} from "../chunk-FZN7TKSM.js";
|
|
269
271
|
import {
|
|
270
272
|
checkCodexInstall,
|
|
271
273
|
describeMissingControlPrerequisite,
|
|
@@ -278,16 +280,16 @@ import {
|
|
|
278
280
|
nodeCodexInstallProbe,
|
|
279
281
|
phoneStartIsRequired,
|
|
280
282
|
resolveControlPolicy
|
|
281
|
-
} from "../chunk-
|
|
283
|
+
} from "../chunk-G5EKU4RB.js";
|
|
282
284
|
import {
|
|
283
285
|
detectClaudeVersion
|
|
284
|
-
} from "../chunk-
|
|
286
|
+
} from "../chunk-Q5SVRCFU.js";
|
|
285
287
|
import "../chunk-TCE3J44Z.js";
|
|
286
288
|
import {
|
|
287
289
|
describeAutoUpdateAnnouncement,
|
|
288
290
|
takeAutoUpdateAnnouncement
|
|
289
|
-
} from "../chunk-
|
|
290
|
-
import "../chunk-
|
|
291
|
+
} from "../chunk-JF3ONE4H.js";
|
|
292
|
+
import "../chunk-UIBQDALO.js";
|
|
291
293
|
import "../chunk-WHB622LP.js";
|
|
292
294
|
import {
|
|
293
295
|
addCompatibleHooks,
|
|
@@ -302,7 +304,7 @@ import {
|
|
|
302
304
|
compatibleRecord,
|
|
303
305
|
compatibleTargetPaths,
|
|
304
306
|
hasCompatibleHooks
|
|
305
|
-
} from "../chunk-
|
|
307
|
+
} from "../chunk-FMWG4X3D.js";
|
|
306
308
|
import {
|
|
307
309
|
DAEMON_COLD_START_TIMEOUT_MS,
|
|
308
310
|
clearDaemonNeedsLogin,
|
|
@@ -321,7 +323,7 @@ import {
|
|
|
321
323
|
stopDaemonService,
|
|
322
324
|
versionManagerOf,
|
|
323
325
|
waitForDaemonRemoteProof
|
|
324
|
-
} from "../chunk-
|
|
326
|
+
} from "../chunk-JPKOYDQJ.js";
|
|
325
327
|
import {
|
|
326
328
|
GEMINI_HOOK_BINARY,
|
|
327
329
|
GEMINI_HOOK_EVENTS,
|
|
@@ -337,38 +339,38 @@ import {
|
|
|
337
339
|
geminiWired,
|
|
338
340
|
planHooks,
|
|
339
341
|
pusharyHookExecutable
|
|
340
|
-
} from "../chunk-
|
|
342
|
+
} from "../chunk-K6PBTBLO.js";
|
|
341
343
|
import {
|
|
342
344
|
reportEvent
|
|
343
|
-
} from "../chunk-
|
|
344
|
-
import "../chunk-
|
|
345
|
+
} from "../chunk-HDD23XYP.js";
|
|
346
|
+
import "../chunk-WVJFHP75.js";
|
|
345
347
|
import {
|
|
346
348
|
AGENT_CHOICES,
|
|
347
349
|
effectiveAgentSelection,
|
|
348
350
|
effectiveControlMode,
|
|
349
351
|
effectiveVerify,
|
|
350
352
|
parseSetupOptions
|
|
351
|
-
} from "../chunk-
|
|
352
|
-
import "../chunk-
|
|
353
|
+
} from "../chunk-Z7LAWFZ7.js";
|
|
354
|
+
import "../chunk-5QLIXOVT.js";
|
|
353
355
|
import "../chunk-BZIBNSQE.js";
|
|
354
356
|
import {
|
|
355
357
|
transcriptPreferenceForSetup
|
|
356
|
-
} from "../chunk-
|
|
358
|
+
} from "../chunk-XYRXKL3V.js";
|
|
357
359
|
import "../chunk-P6DUWKAO.js";
|
|
358
360
|
import "../chunk-3PSNUHC5.js";
|
|
359
|
-
import "../chunk-
|
|
360
|
-
import "../chunk-
|
|
361
|
+
import "../chunk-A2GO3G2I.js";
|
|
362
|
+
import "../chunk-M64A2Z2F.js";
|
|
361
363
|
import "../chunk-POFBE6ZY.js";
|
|
362
|
-
import "../chunk-
|
|
363
|
-
import "../chunk-
|
|
364
|
-
import "../chunk-
|
|
364
|
+
import "../chunk-H4364HR3.js";
|
|
365
|
+
import "../chunk-NDXTGRZG.js";
|
|
366
|
+
import "../chunk-4UIVOCDT.js";
|
|
365
367
|
import {
|
|
366
368
|
checkApiKey,
|
|
367
369
|
describeKeyCheck,
|
|
368
370
|
samePusharyAccount
|
|
369
|
-
} from "../chunk-
|
|
370
|
-
import "../chunk-
|
|
371
|
-
import "../chunk-
|
|
371
|
+
} from "../chunk-G5OTSL26.js";
|
|
372
|
+
import "../chunk-OSDIFFSP.js";
|
|
373
|
+
import "../chunk-OV2XD2UY.js";
|
|
372
374
|
import {
|
|
373
375
|
KEY_FILE_MODE,
|
|
374
376
|
installClaudeAlias,
|
|
@@ -383,8 +385,8 @@ import {
|
|
|
383
385
|
resolveShellRc,
|
|
384
386
|
shellKeyWasReplaced,
|
|
385
387
|
writeKey
|
|
386
|
-
} from "../chunk-
|
|
387
|
-
import "../chunk-
|
|
388
|
+
} from "../chunk-WMCF6PR5.js";
|
|
389
|
+
import "../chunk-X4G5G2ZN.js";
|
|
388
390
|
import {
|
|
389
391
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
390
392
|
CLINE_AUTO_APPROVE_STEP,
|
|
@@ -446,7 +448,7 @@ import {
|
|
|
446
448
|
vscodePluginDir,
|
|
447
449
|
vscodePluginMcp,
|
|
448
450
|
writeInstructionBlock
|
|
449
|
-
} from "../chunk-
|
|
451
|
+
} from "../chunk-FEVQDABQ.js";
|
|
450
452
|
import {
|
|
451
453
|
compareVersion,
|
|
452
454
|
parseVersion
|
|
@@ -468,10 +470,11 @@ import {
|
|
|
468
470
|
runNpmInTerminal,
|
|
469
471
|
setupNeedsGlobalInstall,
|
|
470
472
|
setupWouldDowngrade
|
|
471
|
-
} from "../chunk-
|
|
473
|
+
} from "../chunk-JFXYGMV5.js";
|
|
472
474
|
import {
|
|
473
|
-
getBaseUrl
|
|
474
|
-
|
|
475
|
+
getBaseUrl,
|
|
476
|
+
readApiKey
|
|
477
|
+
} from "../chunk-XGW4PJPO.js";
|
|
475
478
|
import {
|
|
476
479
|
UsageError
|
|
477
480
|
} from "../chunk-CINBAX5G.js";
|
|
@@ -483,7 +486,7 @@ import {
|
|
|
483
486
|
NPX_LATEST_COMMAND,
|
|
484
487
|
isInvocationOf,
|
|
485
488
|
renderCommandHelp
|
|
486
|
-
} from "../chunk-
|
|
489
|
+
} from "../chunk-7MRK2WXT.js";
|
|
487
490
|
import {
|
|
488
491
|
EXIT
|
|
489
492
|
} from "../chunk-BG4HHB7E.js";
|
|
@@ -498,6 +501,7 @@ import {
|
|
|
498
501
|
CURSOR_GATE_SCRIPT,
|
|
499
502
|
HOOK_COMPATIBLE_PROFILES,
|
|
500
503
|
PRETOOLUSE_GATED_TOOLS,
|
|
504
|
+
SETUP_STOPPED_PATH,
|
|
501
505
|
SUPPORT_EMAIL,
|
|
502
506
|
computerOsOfPlatform,
|
|
503
507
|
hookCompatibleProfile,
|
|
@@ -505,7 +509,7 @@ import {
|
|
|
505
509
|
isRecord,
|
|
506
510
|
isTimeoutAction,
|
|
507
511
|
isValidApiKey
|
|
508
|
-
} from "../chunk-
|
|
512
|
+
} from "../chunk-ULDUDSTW.js";
|
|
509
513
|
import "../chunk-MLKGABMK.js";
|
|
510
514
|
|
|
511
515
|
// bin/pushary-setup.ts
|
|
@@ -538,6 +542,18 @@ import {
|
|
|
538
542
|
import { cursorHide } from "@inquirer/ansi";
|
|
539
543
|
import figures from "@inquirer/figures";
|
|
540
544
|
import { styleText } from "util";
|
|
545
|
+
var ONE_SECOND_MS = 1e3;
|
|
546
|
+
var tickEverySecondWithTimer = (tick, everyMs) => {
|
|
547
|
+
const timer = setInterval(tick, everyMs);
|
|
548
|
+
timer.unref?.();
|
|
549
|
+
return () => clearInterval(timer);
|
|
550
|
+
};
|
|
551
|
+
var TERMINAL_BELL = "\x07";
|
|
552
|
+
var idleCountdownLine = (countdown) => {
|
|
553
|
+
if (countdown.tickedCount === 0) return `Nothing is ticked. Setup stops in ${countdown.secondsLeft} s unless you tick an agent.`;
|
|
554
|
+
return countdown.keystrokes === 0 ? `Setting up the detected agents in ${countdown.secondsLeft} s. Press any key to choose.` : `Setting up the ticked agents in ${countdown.secondsLeft} s. Press Enter to set them up now.`;
|
|
555
|
+
};
|
|
556
|
+
var wholeSecondsIn = (ms) => Math.max(1, Math.ceil(ms / ONE_SECOND_MS));
|
|
541
557
|
var PAGE_SIZE = 7;
|
|
542
558
|
var SELECT_ALL_KEY = "a";
|
|
543
559
|
var INVERT_KEY = "i";
|
|
@@ -572,11 +588,21 @@ var renderAgentPicker = (config, done) => {
|
|
|
572
588
|
const [keystrokes, setKeystrokes] = useState(0);
|
|
573
589
|
const prefix = usePrefix({ status, theme: PICKER_THEME });
|
|
574
590
|
const scheduleIdle = config.scheduleIdle ?? scheduleWithTimer;
|
|
591
|
+
const scheduleTick = config.scheduleTick ?? tickEverySecondWithTimer;
|
|
592
|
+
const [secondsLeft, setSecondsLeft] = useState(wholeSecondsIn(config.idleLimitMs));
|
|
575
593
|
const settle = (outcome) => {
|
|
576
594
|
setStatus("done");
|
|
577
595
|
done(outcome);
|
|
578
596
|
};
|
|
579
597
|
useEffect(() => scheduleIdle(() => settle(outcomeWhenIdle(keystrokes, choices)), config.idleLimitMs), [keystrokes]);
|
|
598
|
+
useEffect(() => {
|
|
599
|
+
let left = wholeSecondsIn(config.idleLimitMs);
|
|
600
|
+
setSecondsLeft(left);
|
|
601
|
+
return scheduleTick(() => {
|
|
602
|
+
left = Math.max(1, left - 1);
|
|
603
|
+
setSecondsLeft(left);
|
|
604
|
+
}, ONE_SECOND_MS);
|
|
605
|
+
}, [keystrokes]);
|
|
580
606
|
const submit = () => {
|
|
581
607
|
const picked = tickedAgents(choices);
|
|
582
608
|
const verdict = config.validate(picked);
|
|
@@ -599,6 +625,7 @@ var renderAgentPicker = (config, done) => {
|
|
|
599
625
|
};
|
|
600
626
|
const respondToKey = (key) => {
|
|
601
627
|
setKeystrokes(keystrokes + 1);
|
|
628
|
+
setSecondsLeft(wholeSecondsIn(config.idleLimitMs));
|
|
602
629
|
if (isEnterKey(key)) submit();
|
|
603
630
|
else if (isUpKey(key)) moveCursor(-1);
|
|
604
631
|
else if (isDownKey(key)) moveCursor(1);
|
|
@@ -616,7 +643,8 @@ var renderAgentPicker = (config, done) => {
|
|
|
616
643
|
page,
|
|
617
644
|
" ",
|
|
618
645
|
error ? PICKER_THEME.style.error(error) : "",
|
|
619
|
-
renderedKeyHelp()
|
|
646
|
+
renderedKeyHelp(),
|
|
647
|
+
styleText("dim", idleCountdownLine({ secondsLeft, keystrokes, tickedCount: tickedAgents(choices).length }))
|
|
620
648
|
].filter(Boolean).join("\n").trimEnd();
|
|
621
649
|
return `${lines}${cursorHide}`;
|
|
622
650
|
};
|
|
@@ -645,19 +673,107 @@ var agentSetupTargets = (exists) => ({
|
|
|
645
673
|
});
|
|
646
674
|
|
|
647
675
|
// src/cli/enter-key.ts
|
|
648
|
-
var
|
|
676
|
+
var CONTROL_C = "";
|
|
677
|
+
var interruptThisProcess = () => {
|
|
678
|
+
process.kill(process.pid, "SIGINT");
|
|
679
|
+
};
|
|
680
|
+
var singleKeyListener = (key, input2 = process.stdin, interrupt = interruptThisProcess) => {
|
|
649
681
|
if (input2.isTTY !== true) return null;
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
input2.
|
|
682
|
+
const wanted = key.toLowerCase();
|
|
683
|
+
return (onKey) => {
|
|
684
|
+
const wasRaw = input2.isRaw === true;
|
|
685
|
+
const onData = (chunk) => {
|
|
686
|
+
const typed = chunk.toString().toLowerCase();
|
|
687
|
+
if (typed.includes(CONTROL_C)) interrupt();
|
|
688
|
+
else if (typed.includes(wanted)) onKey();
|
|
689
|
+
};
|
|
690
|
+
input2.setRawMode(true);
|
|
691
|
+
input2.on("data", onData);
|
|
653
692
|
input2.resume();
|
|
654
693
|
return () => {
|
|
655
|
-
input2.off("data",
|
|
694
|
+
input2.off("data", onData);
|
|
695
|
+
input2.setRawMode(wasRaw);
|
|
656
696
|
input2.pause();
|
|
657
697
|
};
|
|
658
698
|
};
|
|
659
699
|
};
|
|
660
700
|
|
|
701
|
+
// src/setup/restart-steps.ts
|
|
702
|
+
var AND_LIST = new Intl.ListFormat("en", { style: "long", type: "conjunction" });
|
|
703
|
+
var namesNeeding = (restarts, kind) => [...new Set(restarts.filter((restart) => restart.kind === kind).map((restart) => restart.agentName))];
|
|
704
|
+
var describeRestarts = (restarts) => {
|
|
705
|
+
const restart = namesNeeding(restarts, "restart");
|
|
706
|
+
const quit = namesNeeding(restarts, "quit-and-reopen");
|
|
707
|
+
return [
|
|
708
|
+
...restart.length > 0 ? [`Restart ${AND_LIST.format(restart)} to load Pushary.`] : [],
|
|
709
|
+
...quit.length > 0 ? [`Fully quit and reopen ${AND_LIST.format(quit)}. A Reload Window may not be enough.`] : []
|
|
710
|
+
];
|
|
711
|
+
};
|
|
712
|
+
|
|
713
|
+
// src/setup/agent-output.ts
|
|
714
|
+
var AGENTS_WHOSE_STEPS_ARE_THE_INSTRUCTIONS = /* @__PURE__ */ new Set(["custom"]);
|
|
715
|
+
var setupMayChangeHermesShellGate = (context) => context.agent === "hermes" && context.hermesShellGate !== "report";
|
|
716
|
+
var agentOutputModeFor = (context) => {
|
|
717
|
+
if (context.verbose) return "every-step";
|
|
718
|
+
if (AGENTS_WHOSE_STEPS_ARE_THE_INSTRUCTIONS.has(context.agent)) return "every-step";
|
|
719
|
+
return setupMayChangeHermesShellGate(context) ? "every-step" : "one-line";
|
|
720
|
+
};
|
|
721
|
+
var TERMINAL_CONTROL_SEQUENCE = /\x1b\[[0-9;?]*[A-Za-z]/g;
|
|
722
|
+
var CARRIAGE_RETURN = "\r";
|
|
723
|
+
var WARNING_MARK = "!";
|
|
724
|
+
var SUCCESS_MARK = "\u2713";
|
|
725
|
+
var visibleText = (line) => line.replace(TERMINAL_CONTROL_SEQUENCE, "").trim();
|
|
726
|
+
var lastRedrawOf = (line) => line.slice(line.lastIndexOf(CARRIAGE_RETURN) + 1);
|
|
727
|
+
var ERASE_TO_END_OF_LINE = "\x1B[K";
|
|
728
|
+
var printedLinesOf = (written) => {
|
|
729
|
+
const lines = written.split("\n").map((line) => lastRedrawOf(line).split(ERASE_TO_END_OF_LINE).join(""));
|
|
730
|
+
return lines.at(-1) === "" ? lines.slice(0, -1) : lines;
|
|
731
|
+
};
|
|
732
|
+
var endsAWarning = (text) => text === "" || text.startsWith(SUCCESS_MARK);
|
|
733
|
+
var warningLinesOf = (lines) => {
|
|
734
|
+
const kept = [];
|
|
735
|
+
let insideWarning = false;
|
|
736
|
+
for (const line of lines) {
|
|
737
|
+
const text = visibleText(line);
|
|
738
|
+
if (text.startsWith(WARNING_MARK)) {
|
|
739
|
+
insideWarning = true;
|
|
740
|
+
kept.push(line);
|
|
741
|
+
} else if (endsAWarning(text)) {
|
|
742
|
+
insideWarning = false;
|
|
743
|
+
} else if (insideWarning) {
|
|
744
|
+
kept.push(line);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return kept;
|
|
748
|
+
};
|
|
749
|
+
var textOf = (chunk) => typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8");
|
|
750
|
+
var captureStreamWrites = (stream) => {
|
|
751
|
+
const original = stream.write;
|
|
752
|
+
let written = "";
|
|
753
|
+
let released = false;
|
|
754
|
+
const capturingWrite = (chunk, encodingOrCallback, callback) => {
|
|
755
|
+
written += textOf(chunk);
|
|
756
|
+
const done = typeof encodingOrCallback === "function" ? encodingOrCallback : callback;
|
|
757
|
+
done?.(null);
|
|
758
|
+
return true;
|
|
759
|
+
};
|
|
760
|
+
stream.write = capturingWrite;
|
|
761
|
+
return {
|
|
762
|
+
written: () => written,
|
|
763
|
+
writeThrough: (text) => {
|
|
764
|
+
original.call(stream, text);
|
|
765
|
+
},
|
|
766
|
+
release: () => {
|
|
767
|
+
if (released) return;
|
|
768
|
+
released = true;
|
|
769
|
+
stream.write = original;
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
var PROGRESS_MARK = "\u2026";
|
|
774
|
+
var progressLineFor = (agentName) => ` ${PROGRESS_MARK} ${agentName}`;
|
|
775
|
+
var CLEAR_PROGRESS_LINE = `\r${ERASE_TO_END_OF_LINE}`;
|
|
776
|
+
|
|
661
777
|
// src/setup/service-notice.ts
|
|
662
778
|
var PHONE_START_OPT_OUT = "Turn it off with --control off.";
|
|
663
779
|
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}`;
|
|
@@ -780,6 +896,7 @@ var parseCodexEngineManifestVersion = (contents) => {
|
|
|
780
896
|
var parseEmbeddedCodexVersion = (haystack) => haystack.match(/cli_version(\d+\.\d+\.\d+)/)?.[1] ?? null;
|
|
781
897
|
|
|
782
898
|
// src/setup/telemetry.ts
|
|
899
|
+
import { randomUUID } from "crypto";
|
|
783
900
|
var roundTripOutcome = (outcome) => {
|
|
784
901
|
switch (outcome?.kind) {
|
|
785
902
|
case "answered":
|
|
@@ -819,15 +936,37 @@ var recordCodexTrust = (outcome) => {
|
|
|
819
936
|
var emitted = false;
|
|
820
937
|
var SETUP_COMPLETED_EVENT = "agent_setup_completed";
|
|
821
938
|
var SETUP_AGENT_TYPE = "setup";
|
|
939
|
+
var SETUP_RUN_ID = randomUUID();
|
|
940
|
+
var SETUP_STOP_TIMEOUT_MS = 2e3;
|
|
941
|
+
var saveLocalSetupDiagnostic = (event) => {
|
|
942
|
+
try {
|
|
943
|
+
saveSetupFailure({ ...event });
|
|
944
|
+
} catch {
|
|
945
|
+
process.stderr.write("[pushary] Could not save the local setup diagnostic. Keep the setup output for support.\n");
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
var postSetupStop = async (beacon) => {
|
|
949
|
+
await fetch(`${getBaseUrl()}${SETUP_STOPPED_PATH}`, {
|
|
950
|
+
method: "POST",
|
|
951
|
+
headers: { "content-type": "application/json" },
|
|
952
|
+
body: JSON.stringify(beacon),
|
|
953
|
+
signal: AbortSignal.timeout(SETUP_STOP_TIMEOUT_MS)
|
|
954
|
+
});
|
|
955
|
+
};
|
|
956
|
+
var savedKeyInForce = () => {
|
|
957
|
+
const read = readApiKey();
|
|
958
|
+
return read.kind === "key" ? read.key : null;
|
|
959
|
+
};
|
|
822
960
|
var defaultDeps = {
|
|
823
961
|
report: async (event, options) => {
|
|
824
|
-
|
|
825
|
-
saveSetupFailure({ ...event });
|
|
826
|
-
} catch {
|
|
827
|
-
process.stderr.write("[pushary] Could not save the local setup diagnostic. Keep the setup output for support.\n");
|
|
828
|
-
}
|
|
962
|
+
saveLocalSetupDiagnostic({ ...event });
|
|
829
963
|
return reportEvent(event, options);
|
|
830
|
-
}
|
|
964
|
+
},
|
|
965
|
+
reportStop: async (beacon) => {
|
|
966
|
+
saveLocalSetupDiagnostic({ event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...beacon });
|
|
967
|
+
return postSetupStop(beacon);
|
|
968
|
+
},
|
|
969
|
+
savedKey: savedKeyInForce
|
|
831
970
|
};
|
|
832
971
|
var completeBeacon = (run) => ({
|
|
833
972
|
...run,
|
|
@@ -839,9 +978,14 @@ var emit = async (deps, run) => {
|
|
|
839
978
|
if (emitted) return;
|
|
840
979
|
emitted = true;
|
|
841
980
|
try {
|
|
981
|
+
const apiKey = recordedKey ?? deps.savedKey();
|
|
982
|
+
if (apiKey === null && run.abortReason !== null) {
|
|
983
|
+
await deps.reportStop({ ...completeBeacon(run), runId: SETUP_RUN_ID });
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
842
986
|
await deps.report(
|
|
843
987
|
{ event: SETUP_COMPLETED_EVENT, agentType: SETUP_AGENT_TYPE, ...completeBeacon(run) },
|
|
844
|
-
{ maxAttempts: 1, timeoutMs: 2e3, ...
|
|
988
|
+
{ maxAttempts: 1, timeoutMs: 2e3, ...apiKey ? { apiKey } : {} }
|
|
845
989
|
);
|
|
846
990
|
} catch {
|
|
847
991
|
}
|
|
@@ -926,7 +1070,10 @@ var decideSetupHandoff = (input2) => {
|
|
|
926
1070
|
return { kind: "hand_off", version: npmAllows.version, heldBy };
|
|
927
1071
|
};
|
|
928
1072
|
var argumentsAfterSetup = (argv) => argv[0] !== void 0 && isInvocationOf(argv[0], SETUP_COMMAND) ? argv.slice(1) : argv;
|
|
929
|
-
var
|
|
1073
|
+
var VERBOSE_FLAG = "--verbose";
|
|
1074
|
+
var FIRST_RELEASE_WITH_VERBOSE = "1.9.235";
|
|
1075
|
+
var setupArgsTheReleaseKnows = (version, setupArgs) => isNewerVersion(FIRST_RELEASE_WITH_VERBOSE, version) ? setupArgs.filter((arg) => arg !== VERBOSE_FLAG) : setupArgs;
|
|
1076
|
+
var handoffNpmArgs = (packageName, version, setupArgs) => ["exec", "--yes", `--package=${packageName}@${version}`, "--", CLI_COMMAND, SETUP_COMMAND, ...setupArgsTheReleaseKnows(version, setupArgs)];
|
|
930
1077
|
var daysOld = (days) => `${days} ${days === 1 ? "day" : "days"}`;
|
|
931
1078
|
var releasesNpmInstalls = (rule) => {
|
|
932
1079
|
switch (rule.kind) {
|
|
@@ -1033,6 +1180,13 @@ var manualSteps = [];
|
|
|
1033
1180
|
var noteManual = (step) => {
|
|
1034
1181
|
manualSteps.push(step);
|
|
1035
1182
|
};
|
|
1183
|
+
var restartsNoted = [];
|
|
1184
|
+
var manualStepsPrinted = 0;
|
|
1185
|
+
var restartsPrinted = 0;
|
|
1186
|
+
var noteRestart = (restart, step) => {
|
|
1187
|
+
noteManual(step);
|
|
1188
|
+
restartsNoted.push({ step, restart });
|
|
1189
|
+
};
|
|
1036
1190
|
var codexApprovals = null;
|
|
1037
1191
|
var humanStream = process.stdout;
|
|
1038
1192
|
var writeHuman = (text) => {
|
|
@@ -1371,7 +1525,7 @@ var setupHermes = async (_apiKey, context) => {
|
|
|
1371
1525
|
const message = describeHermesInstallFailure(outcome.reason, shortenHome(hermesPluginDirectory(defaultHermesHome())), shortenHome(receipts.receiptPath));
|
|
1372
1526
|
console.log(` ${yellow("!")} ${message}`);
|
|
1373
1527
|
noteManual(message);
|
|
1374
|
-
return "
|
|
1528
|
+
return "unchanged";
|
|
1375
1529
|
}
|
|
1376
1530
|
reportHermesInstall(outcome, plugin.version);
|
|
1377
1531
|
await connectHermesHistoryHelper(context);
|
|
@@ -1413,7 +1567,7 @@ var setupOpenClaw = async (_apiKey) => {
|
|
|
1413
1567
|
const message = describeOpenClawInstallFailure(outcome.reason, outcome.detail);
|
|
1414
1568
|
console.log(` ${yellow("!")} ${message}`);
|
|
1415
1569
|
noteManual(message);
|
|
1416
|
-
return "
|
|
1570
|
+
return "unchanged";
|
|
1417
1571
|
}
|
|
1418
1572
|
reportOpenClawInstall(outcome);
|
|
1419
1573
|
const { state } = outcome.inspection;
|
|
@@ -1810,7 +1964,7 @@ var setupCursor = async (apiKey) => {
|
|
|
1810
1964
|
console.log(` ${dim("\u2022")} Permission gate registered once in ~/.cursor/hooks.json`);
|
|
1811
1965
|
console.log(` ${dim("\u2022")} Risky shell commands route to push approval before they run`);
|
|
1812
1966
|
console.log(` ${dim("\u2022")} Fully quit and reopen Cursor to load it (a Reload Window may not be enough)`);
|
|
1813
|
-
|
|
1967
|
+
noteRestart({ agentName: "Cursor", kind: "quit-and-reopen" }, "Fully quit and reopen Cursor. A Reload Window may not be enough.");
|
|
1814
1968
|
};
|
|
1815
1969
|
var resolveBundledVsCodePlugin = () => {
|
|
1816
1970
|
const dir = dirname3(fileURLToPath(import.meta.url));
|
|
@@ -1907,19 +2061,18 @@ var setupVsCode = async (apiKey) => {
|
|
|
1907
2061
|
console.log(` ${dim("These settings files already have a chat.pluginLocations block, and")}`);
|
|
1908
2062
|
console.log(` ${dim("they contain comments, so they were left untouched rather than rewritten.")}`);
|
|
1909
2063
|
console.log(` ${dim("Add this entry inside that block:")}`);
|
|
1910
|
-
console.log();
|
|
1911
|
-
console.log(` ${cyan(`${JSON.stringify(VSCODE_PLUGIN_DIR)}: true`)}`);
|
|
1912
|
-
console.log();
|
|
2064
|
+
console.log(` ${cyan(`${JSON.stringify(VSCODE_PLUGIN_DIR)}: true`)}`);
|
|
1913
2065
|
for (const path of registration.manual) {
|
|
1914
2066
|
console.log(` ${dim("in")} ${path}`);
|
|
1915
2067
|
}
|
|
2068
|
+
console.log();
|
|
1916
2069
|
noteManual(
|
|
1917
2070
|
`Add ${JSON.stringify(VSCODE_PLUGIN_DIR)}: true to the chat.pluginLocations block in ${registration.manual.join(" and ")}. Full snippet:
|
|
1918
2071
|
${pluginLocationSnippet(VSCODE_PLUGIN_DIR)}`
|
|
1919
2072
|
);
|
|
1920
2073
|
}
|
|
1921
2074
|
console.log(` ${dim("\u2022")} Fully quit and reopen VS Code to load the plugin`);
|
|
1922
|
-
|
|
2075
|
+
noteRestart({ agentName: "VS Code", kind: "quit-and-reopen" }, "Fully quit and reopen VS Code. A Reload Window may not pick up a new plugin location.");
|
|
1923
2076
|
};
|
|
1924
2077
|
var keySavedInConfigLine = (configPath) => `Your key is saved in ${configPath}, which is where hooks read it.`;
|
|
1925
2078
|
var saveApiKey = async (apiKey, origin, controlMode, transcriptSync, replacedKeyRecordWasHonoured) => {
|
|
@@ -2012,7 +2165,7 @@ var setupFx = async () => {
|
|
|
2012
2165
|
`);
|
|
2013
2166
|
if (process.platform === "win32") {
|
|
2014
2167
|
console.log(` ${yellow("!")} fx does not run on Windows. Skipping.`);
|
|
2015
|
-
return "
|
|
2168
|
+
return "unchanged";
|
|
2016
2169
|
}
|
|
2017
2170
|
if (!existsSync2(fxConfigDir())) {
|
|
2018
2171
|
console.log(` ${yellow("!")} fx not found (${fxConfigDir()} does not exist). Skipping.`);
|
|
@@ -2127,7 +2280,7 @@ var setupGemini = async (apiKey) => {
|
|
|
2127
2280
|
console.log(` ${dim("\u2022")} Gate covers ${bold("run_shell_command")}, ${bold("write_file")}, ${bold("replace")} and MCP tool calls`);
|
|
2128
2281
|
console.log(` ${dim("\u2022")} Auto-allowed tools: Pushary MCP calls run without a confirmation prompt`);
|
|
2129
2282
|
console.log(` ${dim("Restart Gemini CLI to load the new config.")}`);
|
|
2130
|
-
|
|
2283
|
+
noteRestart({ agentName: "Gemini CLI", kind: "restart" }, "Restart Gemini CLI to load the new config.");
|
|
2131
2284
|
};
|
|
2132
2285
|
var OPENCODE_INSTRUCTIONS = openCodeInstructionsFile;
|
|
2133
2286
|
var openCodeApprovalLines = (change, leftOpen) => {
|
|
@@ -2173,7 +2326,7 @@ var setupOpenCode = async (apiKey) => {
|
|
|
2173
2326
|
for (const line of openCodeApprovalLines(askRules, leftOpen)) console.log(line);
|
|
2174
2327
|
console.log(` ${dim("\u2022")} Receipts: tool results, prompts and turn boundaries reach your account`);
|
|
2175
2328
|
console.log(` ${dim("Restart OpenCode to load the plugin.")}`);
|
|
2176
|
-
|
|
2329
|
+
noteRestart({ agentName: "OpenCode", kind: "restart" }, "Restart OpenCode to load the plugin.");
|
|
2177
2330
|
return "configured";
|
|
2178
2331
|
};
|
|
2179
2332
|
var clearSetupChoiceDecline = (agent) => {
|
|
@@ -2297,8 +2450,20 @@ var soleGateSettingText = (gate, value) => `"${gate.key}": "${value}"`;
|
|
|
2297
2450
|
var reportSoleGate = (profile, gate, claim) => {
|
|
2298
2451
|
const settings = shortenHome(soleGateFile(gate));
|
|
2299
2452
|
switch (claim.kind) {
|
|
2453
|
+
case "left_for_a_person": {
|
|
2454
|
+
const note = `${profile.label} was left as it is. Setting it up turns off its own prompt, so setup does that only when you choose it. To set it up, run ${retryAgentCommand(profile.agentType)}`;
|
|
2455
|
+
console.log(` ${yellow("!")} ${note}`);
|
|
2456
|
+
noteManual(note);
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
case "settings_unreadable": {
|
|
2460
|
+
const note = `${profile.label} was left as it is. ${settings} is not a settings file setup can read, so setup cannot tell whether you chose a Tool Permission mode there. Fix or remove that file, then run ${retryAgentCommand(profile.agentType)}`;
|
|
2461
|
+
console.log(` ${yellow("!")} ${note}`);
|
|
2462
|
+
noteManual(note);
|
|
2463
|
+
return;
|
|
2464
|
+
}
|
|
2300
2465
|
case "claimed":
|
|
2301
|
-
console.log(` ${
|
|
2466
|
+
console.log(` ${yellow("!")} Pushary is the only gate: set ${soleGateSettingText(gate, gate.value)} in ${settings}, so ${profile.label} no longer asks in its own prompt. ${dim(`pushary disconnect ${profile.source} puts it back.`)}`);
|
|
2302
2467
|
return;
|
|
2303
2468
|
case "already_sole_gate":
|
|
2304
2469
|
console.log(` ${dim("\u2022")} ${profile.label} already has ${soleGateSettingText(gate, gate.value)}, so Pushary is its only gate`);
|
|
@@ -2311,7 +2476,17 @@ var reportSoleGate = (profile, gate, claim) => {
|
|
|
2311
2476
|
}
|
|
2312
2477
|
}
|
|
2313
2478
|
};
|
|
2314
|
-
var
|
|
2479
|
+
var pusharyHooksAlreadyInSoleGateAgent = (profile) => {
|
|
2480
|
+
if (profile.soleGate === null) return false;
|
|
2481
|
+
const hooks = readJsonSafe(compatibleConfigFile(profile));
|
|
2482
|
+
return hooks.kind === "ok" && isRecord(hooks.value) && hasCompatibleHooks(hooks.value, profile);
|
|
2483
|
+
};
|
|
2484
|
+
var readSoleGateSettings = (gate) => {
|
|
2485
|
+
const saved = readJsonSafe(soleGateFile(gate));
|
|
2486
|
+
if (saved.kind === "missing") return { kind: "missing" };
|
|
2487
|
+
return saved.kind === "ok" && isRecord(saved.value) ? { kind: "record", value: saved.value } : { kind: "unreadable" };
|
|
2488
|
+
};
|
|
2489
|
+
var setupCompatibleAgent = (profile) => async (apiKey, context) => {
|
|
2315
2490
|
const configFile = compatibleConfigFile(profile);
|
|
2316
2491
|
const mcpFile = compatibleMcpFile(profile);
|
|
2317
2492
|
const permissionFile = compatiblePermissionRuleFile(profile);
|
|
@@ -2324,6 +2499,13 @@ var setupCompatibleAgent = (profile) => async (apiKey) => {
|
|
|
2324
2499
|
console.log(` ${dim(`Install ${profile.label} and re-run setup to configure.`)}`);
|
|
2325
2500
|
return "skipped";
|
|
2326
2501
|
}
|
|
2502
|
+
const gate = profile.soleGate;
|
|
2503
|
+
const chosenBefore = context.agentsChosenByPerson || pusharyHooksAlreadyInSoleGateAgent(profile);
|
|
2504
|
+
const leftAlone = gate ? soleGateLeftAloneFor(readSoleGateSettings(gate), gate, chosenBefore) : null;
|
|
2505
|
+
if (gate && leftAlone) {
|
|
2506
|
+
reportSoleGate(profile, gate, leftAlone);
|
|
2507
|
+
return "unchanged";
|
|
2508
|
+
}
|
|
2327
2509
|
await installGlobally2();
|
|
2328
2510
|
const documents = /* @__PURE__ */ new Map();
|
|
2329
2511
|
const open = (file) => {
|
|
@@ -2359,7 +2541,7 @@ var setupCompatibleAgent = (profile) => async (apiKey) => {
|
|
|
2359
2541
|
${yellow("!")} ${profile.label} keeps something unexpected where Pushary writes. Nothing was changed.`);
|
|
2360
2542
|
for (const conflict of declined) console.log(` ${dim(`\u2022 ${conflict}`)}`);
|
|
2361
2543
|
console.log(` ${dim("Pushary expects a list of hook entries there. Move that key and re-run setup.")}`);
|
|
2362
|
-
return "
|
|
2544
|
+
return "unchanged";
|
|
2363
2545
|
}
|
|
2364
2546
|
for (const [path, document] of documents) {
|
|
2365
2547
|
await spinner(`Writing ${shortenHome(path)}`, async () => {
|
|
@@ -2372,7 +2554,6 @@ var setupCompatibleAgent = (profile) => async (apiKey) => {
|
|
|
2372
2554
|
writeInstructionBlock(instructionsFile, renderAgentInstructions(profile.instructions.label));
|
|
2373
2555
|
});
|
|
2374
2556
|
}
|
|
2375
|
-
const gate = profile.soleGate;
|
|
2376
2557
|
const settingsPath = gate ? soleGateFile(gate) : null;
|
|
2377
2558
|
const settings = settingsPath ? readAgentJson(settingsPath) : null;
|
|
2378
2559
|
const soleGateClaim = gate && settings ? claimSoleGate(settings, gate) : null;
|
|
@@ -2389,9 +2570,12 @@ var setupCompatibleAgent = (profile) => async (apiKey) => {
|
|
|
2389
2570
|
if (mcpFile) console.log(` ${dim("\u2022")} MCP server: ${profile.label} can send notifications and ask questions`);
|
|
2390
2571
|
else console.log(` ${dim("\u2022")} ${dim(`No MCP server: ${profile.label} documents no remote-server config shape, so approvals work and agent-initiated questions do not`)}`);
|
|
2391
2572
|
if (instructionsFile) console.log(` ${dim("\u2022")} Proactive instructions: ${shortenHome(instructionsFile)}`);
|
|
2392
|
-
if (gate && soleGateClaim)
|
|
2573
|
+
if (gate && soleGateClaim) {
|
|
2574
|
+
reportSoleGate(profile, gate, soleGateClaim);
|
|
2575
|
+
console.log();
|
|
2576
|
+
}
|
|
2393
2577
|
console.log(` ${dim(`Restart ${profile.label} to load the new config.`)}`);
|
|
2394
|
-
|
|
2578
|
+
noteRestart({ agentName: profile.label, kind: "restart" }, `Restart ${profile.label} to load the new config.`);
|
|
2395
2579
|
return "configured";
|
|
2396
2580
|
};
|
|
2397
2581
|
var COMPATIBLE_SETUP = HOOK_COMPATIBLE_PROFILES.reduce((installers, profile) => ({
|
|
@@ -2568,6 +2752,48 @@ var AGENT_LABELS = Object.fromEntries(
|
|
|
2568
2752
|
`${AGENT_NAMES[agent].padEnd(NAME_COLUMN)}${dim(AGENT_CAPABILITIES[agent])}`
|
|
2569
2753
|
])
|
|
2570
2754
|
);
|
|
2755
|
+
var printSteps = (steps) => {
|
|
2756
|
+
for (const line of steps) console.log(line);
|
|
2757
|
+
};
|
|
2758
|
+
var printAgentLine = (agent, steps) => {
|
|
2759
|
+
console.log(` ${check} ${AGENT_LABELS[agent]}`);
|
|
2760
|
+
printSteps(warningLinesOf(steps));
|
|
2761
|
+
};
|
|
2762
|
+
var printWhyUnchanged = (steps) => {
|
|
2763
|
+
const warnings = warningLinesOf(steps);
|
|
2764
|
+
printSteps(warnings.length > 0 ? warnings : steps);
|
|
2765
|
+
};
|
|
2766
|
+
var installWithOneLine = async (agent, install) => {
|
|
2767
|
+
const stream = humanStream;
|
|
2768
|
+
const capture = captureStreamWrites(stream);
|
|
2769
|
+
const showsProgress = stream.isTTY === true;
|
|
2770
|
+
let finished = false;
|
|
2771
|
+
const finish = () => {
|
|
2772
|
+
if (finished) return;
|
|
2773
|
+
finished = true;
|
|
2774
|
+
if (showsProgress) capture.writeThrough(CLEAR_PROGRESS_LINE);
|
|
2775
|
+
capture.release();
|
|
2776
|
+
process.off("exit", showStepsOnExit);
|
|
2777
|
+
};
|
|
2778
|
+
const showStepsOnExit = () => {
|
|
2779
|
+
if (finished) return;
|
|
2780
|
+
finish();
|
|
2781
|
+
stream.write(capture.written());
|
|
2782
|
+
};
|
|
2783
|
+
process.once("exit", showStepsOnExit);
|
|
2784
|
+
if (showsProgress) capture.writeThrough(progressLineFor(AGENT_NAMES[agent]));
|
|
2785
|
+
try {
|
|
2786
|
+
const outcome = await install();
|
|
2787
|
+
finish();
|
|
2788
|
+
return { outcome, steps: printedLinesOf(capture.written()) };
|
|
2789
|
+
} catch (err) {
|
|
2790
|
+
finish();
|
|
2791
|
+
printSteps(printedLinesOf(capture.written()));
|
|
2792
|
+
throw err;
|
|
2793
|
+
} finally {
|
|
2794
|
+
finish();
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2571
2797
|
var detectAgents = () => {
|
|
2572
2798
|
const map = {};
|
|
2573
2799
|
for (const entry of detectAllAgents()) {
|
|
@@ -2577,7 +2803,9 @@ var detectAgents = () => {
|
|
|
2577
2803
|
};
|
|
2578
2804
|
var canRunBrowserLogin = () => process.stdout.isTTY === true && !isCI();
|
|
2579
2805
|
var AGENT_PICKER_IDLE_LIMIT_MS = 2e4;
|
|
2580
|
-
var answeredWith = (agents) => ({ agents, nobodyAnswered: false });
|
|
2806
|
+
var answeredWith = (agents) => ({ agents, nobodyAnswered: false, chosenByPerson: true });
|
|
2807
|
+
var pickedWithoutAPerson = (agents, nobodyAnswered) => ({ agents, nobodyAnswered, chosenByPerson: false });
|
|
2808
|
+
var tickedByAPersonWhoLeft = (agents) => ({ agents, nobodyAnswered: true, chosenByPerson: true });
|
|
2581
2809
|
var AGENT_PICKER_IDLE_SECONDS = AGENT_PICKER_IDLE_LIMIT_MS / 1e3;
|
|
2582
2810
|
var CHOOSE_WITH_AGENTS_FLAG = "(--agents to choose)";
|
|
2583
2811
|
var selectDetectedAgents = async (detected) => {
|
|
@@ -2609,9 +2837,9 @@ var agentResolutionFromPicker = async (outcome, detected) => {
|
|
|
2609
2837
|
return answeredWith(outcome.agents);
|
|
2610
2838
|
case "idle-before-any-key":
|
|
2611
2839
|
console.log(` ${yellow("!")} Nothing was pressed at the agent question for ${AGENT_PICKER_IDLE_SECONDS} seconds.`);
|
|
2612
|
-
return
|
|
2840
|
+
return pickedWithoutAPerson(await selectDetectedAgents(detected), true);
|
|
2613
2841
|
case "idle-after-keys":
|
|
2614
|
-
return
|
|
2842
|
+
return tickedByAPersonWhoLeft(await selectAgentsTickedWhenIdle(outcome.agents, detected));
|
|
2615
2843
|
}
|
|
2616
2844
|
};
|
|
2617
2845
|
var resolveAgents = async (options) => {
|
|
@@ -2621,7 +2849,7 @@ var resolveAgents = async (options) => {
|
|
|
2621
2849
|
for (const agent of options.agents.agents) {
|
|
2622
2850
|
if (agent !== "custom" && !detected2[agent].found) {
|
|
2623
2851
|
console.log(` ${yellow("!")} ${AGENT_NAMES[agent]} was not detected on this machine.`);
|
|
2624
|
-
console.log(` ${dim("Continuing anyway.
|
|
2852
|
+
console.log(` ${dim("Continuing anyway. Setup says below what it configured.")}`);
|
|
2625
2853
|
}
|
|
2626
2854
|
}
|
|
2627
2855
|
return answeredWith(options.agents.agents);
|
|
@@ -2631,8 +2859,9 @@ var resolveAgents = async (options) => {
|
|
|
2631
2859
|
const selection = effectiveAgentSelection(options.agents, {
|
|
2632
2860
|
someoneCanAnswer: someoneIsAtTheTerminal({ stdoutIsTty: process.stdout.isTTY === true, nonInteractive: options.nonInteractive })
|
|
2633
2861
|
});
|
|
2634
|
-
if (selection.kind === "auto") return
|
|
2862
|
+
if (selection.kind === "auto") return pickedWithoutAPerson(await selectDetectedAgents(detected), false);
|
|
2635
2863
|
const hint = hasDetectedAgents ? "(detected agents pre-selected)" : "(space = toggle, enter = confirm)";
|
|
2864
|
+
if (process.stdout.isTTY === true) process.stdout.write(TERMINAL_BELL);
|
|
2636
2865
|
return agentResolutionFromPicker(
|
|
2637
2866
|
await pickAgentsUntilIdle({
|
|
2638
2867
|
message: "Which agents do you use? " + dim(hint),
|
|
@@ -2690,12 +2919,26 @@ var reportDryRun = (apiKey, agents, keyCheck, controlMode) => {
|
|
|
2690
2919
|
console.log(` ${dim("Re-run without --dry-run to apply.")}`);
|
|
2691
2920
|
console.log();
|
|
2692
2921
|
};
|
|
2693
|
-
var
|
|
2694
|
-
|
|
2922
|
+
var printManualStepsNotYetShown = () => {
|
|
2923
|
+
const newSteps = manualSteps.slice(manualStepsPrinted);
|
|
2924
|
+
const newRestarts = restartsNoted.slice(restartsPrinted);
|
|
2925
|
+
manualStepsPrinted = manualSteps.length;
|
|
2926
|
+
restartsPrinted = restartsNoted.length;
|
|
2927
|
+
if (newSteps.length === 0) return;
|
|
2928
|
+
const restartSteps = new Set(newRestarts.map((noted) => noted.step));
|
|
2929
|
+
const steps = [
|
|
2930
|
+
...newSteps.filter((step) => !restartSteps.has(step)),
|
|
2931
|
+
...describeRestarts(newRestarts.map((noted) => noted.restart))
|
|
2932
|
+
];
|
|
2695
2933
|
console.log(` ${bold("Still to do")}`);
|
|
2696
|
-
for (const step of
|
|
2934
|
+
for (const step of steps) console.log(` ${dim("\u2022")} ${step}`);
|
|
2697
2935
|
console.log();
|
|
2698
2936
|
};
|
|
2937
|
+
var showManualStepsSoFar = () => {
|
|
2938
|
+
if (manualSteps.length === manualStepsPrinted) return;
|
|
2939
|
+
console.log();
|
|
2940
|
+
printManualStepsNotYetShown();
|
|
2941
|
+
};
|
|
2699
2942
|
var announceSetupHandoff = (line) => {
|
|
2700
2943
|
console.log();
|
|
2701
2944
|
console.log(` ${yellow("!")} ${line}`);
|
|
@@ -2921,10 +3164,11 @@ var main = async () => {
|
|
|
2921
3164
|
if (isKeyHeldByMacApp(trimmedKey, macAppHolder)) recordMacAppKeyPrefix(trimmedKey);
|
|
2922
3165
|
if (keyCheck.kind === "ok") clearDaemonNeedsLogin();
|
|
2923
3166
|
markStep("resolve-agents");
|
|
2924
|
-
const { agents, nobodyAnswered } = await resolveAgents(options);
|
|
3167
|
+
const { agents, nobodyAnswered, chosenByPerson } = await resolveAgents(options);
|
|
2925
3168
|
const context = {
|
|
2926
3169
|
rc,
|
|
2927
3170
|
sessionHistory: transcriptSync,
|
|
3171
|
+
agentsChosenByPerson: chosenByPerson,
|
|
2928
3172
|
hermesShellGate: hermesShellGateChoice({
|
|
2929
3173
|
requested: options.hermesGateTerminal,
|
|
2930
3174
|
canAsk: !nobodyAnswered && canAskAtTheTerminal({ stdoutIsTty: process.stdout.isTTY === true, nonInteractive: options.nonInteractive, dryRun: options.dryRun })
|
|
@@ -2968,6 +3212,7 @@ var main = async () => {
|
|
|
2968
3212
|
const failures = [];
|
|
2969
3213
|
const completed = [];
|
|
2970
3214
|
const skipped = [];
|
|
3215
|
+
const leftUnchanged = [];
|
|
2971
3216
|
const hookOwners = [];
|
|
2972
3217
|
let controlLifecycleFailure = null;
|
|
2973
3218
|
if (agents.length === 0) {
|
|
@@ -2975,6 +3220,7 @@ var main = async () => {
|
|
|
2975
3220
|
${check} API key saved. No agents configured.`);
|
|
2976
3221
|
console.log(` ${dim("Run setup again with --agents <id> when you want one wired up.")}`);
|
|
2977
3222
|
} else {
|
|
3223
|
+
if (!options.verbose) console.log();
|
|
2978
3224
|
for (const [index, agent] of agents.entries()) {
|
|
2979
3225
|
markStep(`configure:${agent}`);
|
|
2980
3226
|
try {
|
|
@@ -2986,7 +3232,7 @@ var main = async () => {
|
|
|
2986
3232
|
if (!account.matches) {
|
|
2987
3233
|
hookOwners.push({ agent, owner: "app", kept: true });
|
|
2988
3234
|
failures.push(describedAgentFailure(agent, "app-account-mismatch"));
|
|
2989
|
-
const [summary, ...
|
|
3235
|
+
const [summary, ...steps2] = describeMacAccountMismatch({
|
|
2990
3236
|
agent,
|
|
2991
3237
|
agentName: AGENT_NAMES[agent],
|
|
2992
3238
|
setupAccount: account.setupAccount,
|
|
@@ -2994,7 +3240,7 @@ var main = async () => {
|
|
|
2994
3240
|
});
|
|
2995
3241
|
console.log(`
|
|
2996
3242
|
${yellow("!")} ${summary}`);
|
|
2997
|
-
for (const step of
|
|
3243
|
+
for (const step of steps2) console.log(` ${dim(step)}`);
|
|
2998
3244
|
continue;
|
|
2999
3245
|
}
|
|
3000
3246
|
console.log(`
|
|
@@ -3005,14 +3251,19 @@ var main = async () => {
|
|
|
3005
3251
|
continue;
|
|
3006
3252
|
}
|
|
3007
3253
|
if (ownerBefore === "app") captureTakeoverReceipt(agent);
|
|
3008
|
-
const
|
|
3009
|
-
|
|
3254
|
+
const install = () => AGENT_SETUP[agent](trimmedKey, context);
|
|
3255
|
+
const { outcome, steps } = agentOutputModeFor({ agent, verbose: options.verbose, hermesShellGate: context.hermesShellGate }) === "one-line" ? await installWithOneLine(agent, install) : { outcome: await install(), steps: null };
|
|
3256
|
+
if (outcome === "skipped" || outcome === "unchanged") {
|
|
3010
3257
|
skipped.push(agent);
|
|
3258
|
+
if (outcome === "unchanged") leftUnchanged.push(agent);
|
|
3259
|
+
if (outcome === "unchanged" && steps) printWhyUnchanged(steps);
|
|
3011
3260
|
} else if (outcome === "verified" || await agentIsWired(agent)) {
|
|
3012
3261
|
completed.push(agent);
|
|
3013
3262
|
clearSetupChoiceDecline(agent);
|
|
3014
3263
|
hookOwners.push({ agent, owner: agentHookOwner(agent, appBridgeAvailable), kept: false });
|
|
3264
|
+
if (steps) printAgentLine(agent, steps);
|
|
3015
3265
|
} else {
|
|
3266
|
+
if (steps) printSteps(steps);
|
|
3016
3267
|
const failure = describedAgentFailure(agent, "not-wired");
|
|
3017
3268
|
failures.push(failure);
|
|
3018
3269
|
console.log(` ${yellow("!")} ${AGENT_NAMES[agent]} ${failure.detail}`);
|
|
@@ -3026,9 +3277,14 @@ var main = async () => {
|
|
|
3026
3277
|
if (continuation) console.log(` ${dim(continuation)}`);
|
|
3027
3278
|
}
|
|
3028
3279
|
}
|
|
3029
|
-
|
|
3280
|
+
const notInstalled = skipped.filter((agent) => !leftUnchanged.includes(agent));
|
|
3281
|
+
if (notInstalled.length > 0) {
|
|
3282
|
+
console.log();
|
|
3283
|
+
console.log(` ${yellow("!")} Not configured: ${notInstalled.map((agent) => AGENT_NAMES[agent]).join(", ")} ${dim("(not installed on this machine)")}`);
|
|
3284
|
+
}
|
|
3285
|
+
if (leftUnchanged.length > 0) {
|
|
3030
3286
|
console.log();
|
|
3031
|
-
console.log(` ${yellow("!")} Not configured: ${
|
|
3287
|
+
console.log(` ${yellow("!")} Not configured: ${leftUnchanged.map((agent) => AGENT_NAMES[agent]).join(", ")} ${dim("(the reason is above)")}`);
|
|
3032
3288
|
}
|
|
3033
3289
|
if (failures.length > 0) {
|
|
3034
3290
|
console.log();
|
|
@@ -3036,6 +3292,7 @@ var main = async () => {
|
|
|
3036
3292
|
console.log(` ${yellow("!")} Failed: ${failedAgentNames(failures).join(", ")}${configured ? ` ${dim(configured)}` : ""}`);
|
|
3037
3293
|
for (const followUp of agentFailureFollowUps(failures)) console.log(` ${agentFailureFollowUpLine(followUp)}`);
|
|
3038
3294
|
}
|
|
3295
|
+
showManualStepsSoFar();
|
|
3039
3296
|
if (!keyFromPairing && !nobodyAnswered) {
|
|
3040
3297
|
markStep("project-instructions");
|
|
3041
3298
|
await offerProjectInstructions(agents, options);
|
|
@@ -3052,6 +3309,7 @@ var main = async () => {
|
|
|
3052
3309
|
console.log(` ${check} Phone-start background service disabled.`);
|
|
3053
3310
|
}
|
|
3054
3311
|
}
|
|
3312
|
+
showManualStepsSoFar();
|
|
3055
3313
|
markStep(CONNECT_PHONE_STEP);
|
|
3056
3314
|
if (keyCheck.kind === "ok") console.log(` ${dim(await fetchSetupWaitGuidance(trimmedKey))}`);
|
|
3057
3315
|
const skipPhone = options.skipPhone;
|
|
@@ -3095,7 +3353,7 @@ var main = async () => {
|
|
|
3095
3353
|
phone = await printConnectInstructions(trimmedKey, connectInstructions);
|
|
3096
3354
|
break;
|
|
3097
3355
|
case "wait-for-app": {
|
|
3098
|
-
const skip =
|
|
3356
|
+
const skip = singleKeyListener(PHONE_WAIT_SKIP_KEY);
|
|
3099
3357
|
phone = skip === null ? await printConnectInstructions(trimmedKey, connectInstructions) : await waitForYourPhone(trimmedKey, { skip });
|
|
3100
3358
|
break;
|
|
3101
3359
|
}
|
|
@@ -3142,7 +3400,7 @@ var main = async () => {
|
|
|
3142
3400
|
const inactivePlanHint = wrongAccountHint === "with-inactive-plan" ? [WRONG_ACCOUNT_HINT] : [];
|
|
3143
3401
|
const next = keyCheck.kind === "locked" ? [...report.next, describeLockedKeyAccount(trimmedKey, pairedHandle), ...inactivePlanHint] : [...report.next, "Finish activation: pushary setup (reuses the saved key)."];
|
|
3144
3402
|
const exitCode2 = failures.length > 0 || controlLifecycleFailure ? EXIT.PROBLEMS_FOUND : report.exitCode;
|
|
3145
|
-
|
|
3403
|
+
printManualStepsNotYetShown();
|
|
3146
3404
|
console.log(` ${yellow(bold(keyCheck.kind === "locked" ? "Agents configured, approvals inactive." : "Configuration saved, activation unverified."))}`);
|
|
3147
3405
|
if (failures.length > 0) {
|
|
3148
3406
|
console.log();
|
|
@@ -3185,7 +3443,7 @@ var main = async () => {
|
|
|
3185
3443
|
});
|
|
3186
3444
|
process.exit(exitCode2);
|
|
3187
3445
|
}
|
|
3188
|
-
|
|
3446
|
+
printManualStepsNotYetShown();
|
|
3189
3447
|
const configuredNothing = agents.length > 0 && completed.length === 0;
|
|
3190
3448
|
const agentsOk = failures.length === 0 && !configuredNothing;
|
|
3191
3449
|
const reachChecked = phone !== null;
|
|
@@ -3326,7 +3584,7 @@ var main = async () => {
|
|
|
3326
3584
|
for (const line of closing.next) console.log(` ${line}`);
|
|
3327
3585
|
console.log();
|
|
3328
3586
|
console.log(` ${dim("Useful:")}`);
|
|
3329
|
-
for (const line of renderCommandSurface(
|
|
3587
|
+
for (const line of renderCommandSurface()) console.log(` ${dim(line)}`);
|
|
3330
3588
|
const teamOffer = teamOfferLines(closing.ok, keyCheck?.kind === "ok" ? keyCheck.identity.plan : null);
|
|
3331
3589
|
if (teamOffer.length > 0) console.log();
|
|
3332
3590
|
for (const line of teamOffer) console.log(` ${line}`);
|
|
@@ -3376,7 +3634,7 @@ var main = async () => {
|
|
|
3376
3634
|
exitCode
|
|
3377
3635
|
});
|
|
3378
3636
|
if (exitCode !== EXIT.OK) {
|
|
3379
|
-
if (configuredNothing && failures.length === 0) {
|
|
3637
|
+
if (configuredNothing && failures.length === 0 && leftUnchanged.length === 0) {
|
|
3380
3638
|
console.log(` ${yellow("!")} Nothing was configured: none of the agents you asked for are installed here.`);
|
|
3381
3639
|
console.log(` ${dim("Your key is saved. Install one and re-run, or pass --agents none to accept this.")}`);
|
|
3382
3640
|
console.log();
|