@pushary/agent-hooks 1.9.1 → 1.9.3
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 +10 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +1 -1
- package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
- package/data/vscode-plugin/CHANGELOG.md +4 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -1
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +31 -31
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +13 -13
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +26 -26
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +99 -48
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +28 -28
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +26 -23
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +27 -27
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +31 -31
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +28 -28
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +69 -52
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +21 -21
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-COSADFEH.js → chunk-2UWD2WZC.js} +1 -1
- package/dist/{chunk-7ER66HZH.js → chunk-34JHGOYO.js} +1 -1
- package/dist/{chunk-4SB46XLF.js → chunk-4GTXFYQ7.js} +1 -1
- package/dist/{chunk-P7YDVWLL.js → chunk-552AGATI.js} +1 -1
- package/dist/{chunk-ZMKEKWNR.js → chunk-5IIAUWEJ.js} +18 -5
- package/dist/{chunk-AKCJ5SNO.js → chunk-7FVC3RGF.js} +17 -12
- package/dist/{chunk-DMA3QUOB.js → chunk-7MO3CNBX.js} +3 -3
- package/dist/{chunk-IITCMJ4G.js → chunk-AGW7PMMO.js} +2 -2
- package/dist/{chunk-WWDPULS3.js → chunk-AMFNJPJ5.js} +8 -8
- package/dist/{chunk-LJI7U6PM.js → chunk-AUS3LY4N.js} +2 -2
- package/dist/{chunk-RS4ZOFSF.js → chunk-BPGATW2F.js} +7 -6
- package/dist/{chunk-JCER3Q6P.js → chunk-CJFVYYKM.js} +10 -9
- package/dist/{chunk-D3RS57MN.js → chunk-CVVPUVBD.js} +3 -3
- package/dist/{chunk-JGQ2ANHQ.js → chunk-DEWCUHOY.js} +2 -2
- package/dist/chunk-EO23EUOK.js +14 -0
- package/dist/{chunk-FVOCQSBG.js → chunk-EZFE4PC3.js} +1 -1
- package/dist/{chunk-LXWUYG7D.js → chunk-FANGHYW5.js} +1 -1
- package/dist/{chunk-SKEP3M6M.js → chunk-FLUECSUC.js} +2 -2
- package/dist/{chunk-J7JXA2LX.js → chunk-FSFI2PQL.js} +1 -1
- package/dist/{chunk-UPTEPARD.js → chunk-G2YXIZZS.js} +2 -2
- package/dist/{chunk-65TOHCXT.js → chunk-GB2U4QVF.js} +4 -4
- package/dist/{chunk-CE4UH4AP.js → chunk-GOWCPJTP.js} +7 -5
- package/dist/{chunk-RNDFGHSQ.js → chunk-HBUQ2EQD.js} +1 -1
- package/dist/{chunk-GHKNUQYU.js → chunk-HIQNUBWO.js} +2 -2
- package/dist/{chunk-QXL27RY6.js → chunk-HPXFPXW7.js} +1 -1
- package/dist/{chunk-CGRPHFOV.js → chunk-IVF3OVR2.js} +1 -1
- package/dist/{chunk-XEIV5QOT.js → chunk-JDUWMJDP.js} +118 -170
- package/dist/{chunk-V4H33GBM.js → chunk-JM2MCYRZ.js} +6 -6
- package/dist/{chunk-LZMH4EGE.js → chunk-KA2GI53J.js} +1 -1
- package/dist/{chunk-SWGY5WNX.js → chunk-KO7UOTLD.js} +5 -5
- package/dist/{chunk-HU2LWGEE.js → chunk-MH6SJHUE.js} +1 -1
- package/dist/{chunk-XW2B4QV2.js → chunk-NGD7H3GZ.js} +2 -2
- package/dist/{chunk-UYHLMBPQ.js → chunk-NP5RJL34.js} +1 -1
- package/dist/{chunk-IJXJW2VH.js → chunk-NZJ5LFMX.js} +10 -10
- package/dist/{chunk-QQJCDRD3.js → chunk-OEMF3KJ3.js} +5 -5
- package/dist/{chunk-6L7TNZ43.js → chunk-OXJRUMZT.js} +1 -1
- package/dist/{chunk-C6PPDKVI.js → chunk-P3REVSM5.js} +3 -3
- package/dist/{chunk-SPB3QRE7.js → chunk-PPC4FZKJ.js} +4 -4
- package/dist/{chunk-FJPC35OW.js → chunk-Q4RF7EEP.js} +1 -1
- package/dist/{chunk-4XT4JXMG.js → chunk-Q7FLA4N3.js} +1 -1
- package/dist/{chunk-LKKYRNJT.js → chunk-Q7KSRRQ4.js} +1 -1
- package/dist/{chunk-KR5JASA4.js → chunk-QVUOPB32.js} +44 -16
- package/dist/{chunk-VH6763OR.js → chunk-SJC5TXK7.js} +3 -3
- package/dist/{chunk-6QSDNXGM.js → chunk-U3DBAX7P.js} +2 -2
- package/dist/{chunk-JHZAZAI3.js → chunk-UWMEY4RS.js} +5 -5
- package/dist/{chunk-NVLXK2I6.js → chunk-VRPNTJX3.js} +5 -5
- package/dist/{chunk-5K43TBK4.js → chunk-VRYOALHQ.js} +3 -3
- package/dist/{chunk-VQLWYKX7.js → chunk-WEK6US33.js} +1 -1
- package/dist/{chunk-PEGKBNGN.js → chunk-WL4YO6CO.js} +5 -5
- package/dist/{chunk-6JTTJIKJ.js → chunk-WRDMCP4G.js} +3 -3
- package/dist/{chunk-RJ7ECJSZ.js → chunk-ZPTSEJMD.js} +4 -2
- package/dist/{chunk-6Q4NM2LW.js → chunk-ZUZKHTPJ.js} +3 -3
- package/dist/{chunk-PMS3EBD2.js → chunk-ZV32QRBR.js} +1 -1
- package/dist/{global-upgrade-ML2RHV4W.js → global-upgrade-VEQ4KQEW.js} +6 -6
- package/dist/{paths-LG3IEDDM.js → paths-QTOUBV2V.js} +2 -2
- package/dist/{reapply-7PFOITE4.js → reapply-T5PLCAGP.js} +8 -8
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-2A2YUUEU.js → upgrade-lock-KFZBAPNU.js} +3 -3
- package/package.json +1 -1
|
@@ -2,32 +2,35 @@
|
|
|
2
2
|
import {
|
|
3
3
|
codexTrustOutcome,
|
|
4
4
|
describeCodexTrustConfirmation
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-WEK6US33.js";
|
|
6
6
|
import {
|
|
7
7
|
runBrowserLogin
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-Q7KSRRQ4.js";
|
|
9
9
|
import {
|
|
10
10
|
coworkOutput,
|
|
11
11
|
coworkSelection
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-P3REVSM5.js";
|
|
13
13
|
import "../chunk-PUZZELE6.js";
|
|
14
14
|
import {
|
|
15
15
|
describeVersionManagerPin,
|
|
16
16
|
versionManagerOf
|
|
17
17
|
} from "../chunk-GU3EJCVV.js";
|
|
18
|
+
import {
|
|
19
|
+
writeStdoutFully
|
|
20
|
+
} from "../chunk-EO23EUOK.js";
|
|
18
21
|
import {
|
|
19
22
|
ensureCodexTrustsPusharyHooks
|
|
20
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-QVUOPB32.js";
|
|
21
24
|
import {
|
|
22
25
|
readManagedControlEvidence,
|
|
23
26
|
waitForMachineReadiness
|
|
24
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-7FVC3RGF.js";
|
|
25
28
|
import {
|
|
26
29
|
describeSetupSideEffects,
|
|
27
30
|
installAgentSkill,
|
|
28
31
|
installSkillViaSkillsCli,
|
|
29
32
|
registerCursorGate
|
|
30
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-NGD7H3GZ.js";
|
|
31
34
|
import {
|
|
32
35
|
AgentConfigError,
|
|
33
36
|
FX_PUSHARY_TOOLS_RULE,
|
|
@@ -62,10 +65,10 @@ import {
|
|
|
62
65
|
withFxPusharyServer,
|
|
63
66
|
writeFxProfile,
|
|
64
67
|
writeInstructionBlock
|
|
65
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-JM2MCYRZ.js";
|
|
66
69
|
import {
|
|
67
70
|
MCP_BRIDGE_BINARY
|
|
68
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-AUS3LY4N.js";
|
|
69
72
|
import {
|
|
70
73
|
OPENCODE_HOOK_BINARY,
|
|
71
74
|
addOpenCodeMcpServer,
|
|
@@ -76,7 +79,7 @@ import {
|
|
|
76
79
|
openCodePluginDir,
|
|
77
80
|
openCodePluginFile,
|
|
78
81
|
openCodeWired
|
|
79
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-IVF3OVR2.js";
|
|
80
83
|
import {
|
|
81
84
|
addCompatibleHooks,
|
|
82
85
|
addCompatibleMcpServer,
|
|
@@ -87,7 +90,7 @@ import {
|
|
|
87
90
|
compatibleMcpFile,
|
|
88
91
|
compatiblePermissionRuleFile,
|
|
89
92
|
hasCompatibleHooks
|
|
90
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-VRPNTJX3.js";
|
|
91
94
|
import {
|
|
92
95
|
addClaudeMcpServer,
|
|
93
96
|
addPusharyHooks,
|
|
@@ -95,7 +98,7 @@ import {
|
|
|
95
98
|
captureClaudeMcpServer,
|
|
96
99
|
isClaudeMcpSnapshot,
|
|
97
100
|
updateClaudeMcpSnapshot
|
|
98
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-ZUZKHTPJ.js";
|
|
99
102
|
import {
|
|
100
103
|
checkCodexInstall,
|
|
101
104
|
detectProviderLiveCapabilities,
|
|
@@ -103,14 +106,14 @@ import {
|
|
|
103
106
|
hasSpawnProvider,
|
|
104
107
|
nodeCodexInstallProbe,
|
|
105
108
|
resolveControlPolicy
|
|
106
|
-
} from "../chunk-
|
|
109
|
+
} from "../chunk-AGW7PMMO.js";
|
|
107
110
|
import {
|
|
108
111
|
detectClaudeVersion
|
|
109
112
|
} from "../chunk-RIVNNBEK.js";
|
|
110
113
|
import {
|
|
111
114
|
describeAutoUpdateAnnouncement,
|
|
112
115
|
takeAutoUpdateAnnouncement
|
|
113
|
-
} from "../chunk-
|
|
116
|
+
} from "../chunk-GOWCPJTP.js";
|
|
114
117
|
import {
|
|
115
118
|
KEEP_HINT,
|
|
116
119
|
captureHookTakeover,
|
|
@@ -120,23 +123,23 @@ import {
|
|
|
120
123
|
hookOwnerOf,
|
|
121
124
|
mcpBearerKey,
|
|
122
125
|
planHooks
|
|
123
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-GB2U4QVF.js";
|
|
124
127
|
import {
|
|
125
128
|
AGENT_CHOICES,
|
|
126
129
|
effectiveControlMode,
|
|
127
130
|
effectiveVerify,
|
|
128
131
|
parseSetupOptions
|
|
129
|
-
} from "../chunk-
|
|
132
|
+
} from "../chunk-MH6SJHUE.js";
|
|
130
133
|
import {
|
|
131
134
|
liveBridgeProbe,
|
|
132
135
|
resolveBridgeStub
|
|
133
|
-
} from "../chunk-
|
|
136
|
+
} from "../chunk-FANGHYW5.js";
|
|
134
137
|
import {
|
|
135
138
|
claudeWired,
|
|
136
139
|
codexWired,
|
|
137
140
|
geminiWired,
|
|
138
141
|
pusharyHookExecutable
|
|
139
|
-
} from "../chunk-
|
|
142
|
+
} from "../chunk-VRYOALHQ.js";
|
|
140
143
|
import {
|
|
141
144
|
clearDaemonNeedsLogin,
|
|
142
145
|
daemonHasRemoteProof,
|
|
@@ -149,16 +152,16 @@ import {
|
|
|
149
152
|
replaceDaemonService,
|
|
150
153
|
stopDaemonService,
|
|
151
154
|
waitForDaemonRemoteProof
|
|
152
|
-
} from "../chunk-
|
|
155
|
+
} from "../chunk-WL4YO6CO.js";
|
|
153
156
|
import {
|
|
154
157
|
GEMINI_HOOK_BINARY,
|
|
155
158
|
addGeminiHooks,
|
|
156
159
|
addGeminiMcpServer
|
|
157
|
-
} from "../chunk-
|
|
158
|
-
import "../chunk-
|
|
160
|
+
} from "../chunk-CVVPUVBD.js";
|
|
161
|
+
import "../chunk-2UWD2WZC.js";
|
|
159
162
|
import {
|
|
160
163
|
transcriptPreferenceForSetup
|
|
161
|
-
} from "../chunk-
|
|
164
|
+
} from "../chunk-34JHGOYO.js";
|
|
162
165
|
import "../chunk-XHKBHWLX.js";
|
|
163
166
|
import {
|
|
164
167
|
compareVersion,
|
|
@@ -166,11 +169,11 @@ import {
|
|
|
166
169
|
} from "../chunk-6ICPEJY5.js";
|
|
167
170
|
import {
|
|
168
171
|
reportEvent
|
|
169
|
-
} from "../chunk-
|
|
172
|
+
} from "../chunk-CJFVYYKM.js";
|
|
170
173
|
import "../chunk-N6IOSZOE.js";
|
|
171
|
-
import "../chunk-
|
|
172
|
-
import "../chunk-
|
|
173
|
-
import "../chunk-
|
|
174
|
+
import "../chunk-HBUQ2EQD.js";
|
|
175
|
+
import "../chunk-UWMEY4RS.js";
|
|
176
|
+
import "../chunk-PPC4FZKJ.js";
|
|
174
177
|
import "../chunk-POFBE6ZY.js";
|
|
175
178
|
import {
|
|
176
179
|
BROWSER_CONNECT_COMMAND,
|
|
@@ -182,7 +185,7 @@ import {
|
|
|
182
185
|
printConnectInstructions,
|
|
183
186
|
roundTripEvidence,
|
|
184
187
|
verifyRoundTrip
|
|
185
|
-
} from "../chunk-
|
|
188
|
+
} from "../chunk-BPGATW2F.js";
|
|
186
189
|
import "../chunk-3EGEA4KH.js";
|
|
187
190
|
import {
|
|
188
191
|
setHumanStream
|
|
@@ -198,27 +201,28 @@ import {
|
|
|
198
201
|
exportLine,
|
|
199
202
|
installClaudeAlias,
|
|
200
203
|
keyPrefix,
|
|
204
|
+
manualKeyStepFor,
|
|
201
205
|
readConfigFileKey,
|
|
202
206
|
readControlMode,
|
|
203
207
|
readKeySource,
|
|
204
208
|
resolveShellRc,
|
|
205
209
|
writeKey
|
|
206
|
-
} from "../chunk-
|
|
207
|
-
import "../chunk-
|
|
210
|
+
} from "../chunk-ZPTSEJMD.js";
|
|
211
|
+
import "../chunk-SJC5TXK7.js";
|
|
208
212
|
import {
|
|
209
213
|
checkApiKey,
|
|
210
214
|
describeKeyCheck,
|
|
211
215
|
samePusharyAccount
|
|
212
|
-
} from "../chunk-
|
|
213
|
-
import "../chunk-
|
|
214
|
-
import "../chunk-
|
|
216
|
+
} from "../chunk-7MO3CNBX.js";
|
|
217
|
+
import "../chunk-WRDMCP4G.js";
|
|
218
|
+
import "../chunk-FSFI2PQL.js";
|
|
215
219
|
import {
|
|
216
220
|
UsageError
|
|
217
221
|
} from "../chunk-7QLSKOSU.js";
|
|
218
222
|
import {
|
|
219
223
|
EXIT
|
|
220
224
|
} from "../chunk-KZERVKTD.js";
|
|
221
|
-
import "../chunk-
|
|
225
|
+
import "../chunk-U3DBAX7P.js";
|
|
222
226
|
import {
|
|
223
227
|
NpmMissingError,
|
|
224
228
|
addCodexHookTrust,
|
|
@@ -263,18 +267,18 @@ import {
|
|
|
263
267
|
resolveGlobalBinary,
|
|
264
268
|
vscodePluginDir,
|
|
265
269
|
vscodePluginMcp
|
|
266
|
-
} from "../chunk-
|
|
270
|
+
} from "../chunk-5IIAUWEJ.js";
|
|
267
271
|
import {
|
|
268
272
|
backupFile,
|
|
269
273
|
readJsonSafe,
|
|
270
274
|
writeFileAtomic,
|
|
271
275
|
writeJsonAtomic
|
|
272
276
|
} from "../chunk-T7E75EKA.js";
|
|
273
|
-
import "../chunk-
|
|
277
|
+
import "../chunk-4GTXFYQ7.js";
|
|
274
278
|
import {
|
|
275
279
|
NPX_LATEST_COMMAND,
|
|
276
280
|
renderCommandHelp
|
|
277
|
-
} from "../chunk-
|
|
281
|
+
} from "../chunk-EZFE4PC3.js";
|
|
278
282
|
import {
|
|
279
283
|
HOOK_COMPATIBLE_PROFILES,
|
|
280
284
|
HOOK_LOCATOR_BINARY,
|
|
@@ -289,7 +293,7 @@ import {
|
|
|
289
293
|
isValidApiKey,
|
|
290
294
|
launchedPackage,
|
|
291
295
|
ownPackageName
|
|
292
|
-
} from "../chunk-
|
|
296
|
+
} from "../chunk-JDUWMJDP.js";
|
|
293
297
|
|
|
294
298
|
// bin/pushary-setup.ts
|
|
295
299
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -672,7 +676,7 @@ var check = green("\u2713");
|
|
|
672
676
|
var abortWith = async (reason, code, keyCheck) => {
|
|
673
677
|
await reportSetupAbort(reason, code, keyCheck);
|
|
674
678
|
if (jsonMode) {
|
|
675
|
-
|
|
679
|
+
await writeStdoutFully(`${JSON.stringify({ ok: false, reason, exitCode: code, ...keyCheck ? { keyCheck } : {} }, null, 2)}
|
|
676
680
|
`);
|
|
677
681
|
}
|
|
678
682
|
return code;
|
|
@@ -1393,6 +1397,7 @@ ${pluginLocationSnippet(VSCODE_PLUGIN_DIR)}`
|
|
|
1393
1397
|
console.log(` ${dim("\u2022")} Fully quit and reopen VS Code to load the plugin`);
|
|
1394
1398
|
noteManual("Fully quit and reopen VS Code. A Reload Window may not pick up a new plugin location.");
|
|
1395
1399
|
};
|
|
1400
|
+
var keySavedInConfigLine = (configPath) => `Your key is saved in ${configPath}, which is where hooks read it.`;
|
|
1396
1401
|
var saveApiKey = async (apiKey, controlMode, transcriptSync) => {
|
|
1397
1402
|
let result;
|
|
1398
1403
|
await spinner("Saving your API key", async () => {
|
|
@@ -1406,22 +1411,31 @@ var saveApiKey = async (apiKey, controlMode, transcriptSync) => {
|
|
|
1406
1411
|
console.log(` ${yellow("!")} ${PUSHARY_CONFIG_FILE} did not parse. Saved a copy at ${dim(result.configBackupPath)}`);
|
|
1407
1412
|
}
|
|
1408
1413
|
const rc = result.rc;
|
|
1414
|
+
const keyStep = manualKeyStepFor(rc.kind, process.platform);
|
|
1415
|
+
const savedInConfig = keySavedInConfigLine(result.configPath);
|
|
1409
1416
|
switch (rc.kind) {
|
|
1410
1417
|
case "updated":
|
|
1411
1418
|
console.log(` ${check} Replaced the old key in ${dim(rc.path ?? "")}${rc.previousKeyPrefix ? dim(` (was ${rc.previousKeyPrefix})`) : ""}`);
|
|
1412
1419
|
break;
|
|
1413
1420
|
case "declined":
|
|
1414
1421
|
console.log(` ${yellow("!")} ${rc.path}:${rc.declinedLine} already sets ${cyan("PUSHARY_API_KEY")} in a form Pushary did not write.`);
|
|
1415
|
-
|
|
1416
|
-
|
|
1422
|
+
if (keyStep === "paste-export") {
|
|
1423
|
+
console.log(` ${dim("It was left alone, and it will shadow the new key in new shells. Update it to:")}`);
|
|
1424
|
+
console.log(` ${cyan(exportLine(apiKey))}`);
|
|
1425
|
+
} else {
|
|
1426
|
+
console.log(` ${dim(`It was left alone, and it will shadow the new key in new shells. Remove it. ${savedInConfig}`)}`);
|
|
1427
|
+
}
|
|
1417
1428
|
break;
|
|
1418
1429
|
case "unavailable":
|
|
1419
|
-
|
|
1420
|
-
|
|
1430
|
+
if (keyStep === "paste-export") {
|
|
1431
|
+
console.log(` ${yellow("!")} Could not update ${rc.path}${rc.detail ? dim(` (${rc.detail})`) : ""}. Add this line yourself:`);
|
|
1432
|
+
console.log(` ${cyan(exportLine(apiKey))}`);
|
|
1433
|
+
} else {
|
|
1434
|
+
console.log(` ${yellow("!")} Could not update ${rc.path}${rc.detail ? dim(` (${rc.detail})`) : ""}. ${savedInConfig}`);
|
|
1435
|
+
}
|
|
1421
1436
|
break;
|
|
1422
1437
|
case "no-rc":
|
|
1423
|
-
console.log(` ${
|
|
1424
|
-
console.log(` ${cyan(exportLine(apiKey))}`);
|
|
1438
|
+
console.log(` ${dim(savedInConfig)}`);
|
|
1425
1439
|
break;
|
|
1426
1440
|
case "written":
|
|
1427
1441
|
case "unchanged":
|
|
@@ -1513,12 +1527,15 @@ var setupCustom = async (apiKey, context) => {
|
|
|
1513
1527
|
console.log(`
|
|
1514
1528
|
${bold("Connect any other agent (MCP or HTTP)")}
|
|
1515
1529
|
`);
|
|
1516
|
-
const
|
|
1530
|
+
const rcKind = context?.rc.kind ?? "written";
|
|
1531
|
+
const wroteExport = ["written", "updated", "unchanged"].includes(rcKind);
|
|
1517
1532
|
if (wroteExport) {
|
|
1518
1533
|
console.log(` ${dim("Your key is saved as")} ${cyan("$PUSHARY_API_KEY")} ${dim("in your shell profile.")}`);
|
|
1519
|
-
} else {
|
|
1534
|
+
} else if (manualKeyStepFor(rcKind, process.platform) === "paste-export") {
|
|
1520
1535
|
console.log(` ${dim("Add this to your shell profile so")} ${cyan("$PUSHARY_API_KEY")} ${dim("resolves:")}`);
|
|
1521
1536
|
console.log(` ${cyan(exportLine(apiKey))}`);
|
|
1537
|
+
} else {
|
|
1538
|
+
console.log(` ${dim(`Use the key saved in ${PUSHARY_CONFIG_FILE} wherever`)} ${cyan("$PUSHARY_API_KEY")} ${dim("appears below.")}`);
|
|
1522
1539
|
}
|
|
1523
1540
|
console.log();
|
|
1524
1541
|
console.log(` ${dim("MCP clients (Windsurf, LangChain, custom) \u2014 add this server:")}`);
|
|
@@ -1997,7 +2014,7 @@ var reportDryRun = (apiKey, agents, keyCheck, controlMode) => {
|
|
|
1997
2014
|
console.log(` ${dim("Key store:")} ${PUSHARY_CONFIG_FILE}`);
|
|
1998
2015
|
console.log(` ${dim("Control:")} ${controlMode ?? "unchanged (legacy install)"}`);
|
|
1999
2016
|
const rc = resolveShellRc();
|
|
2000
|
-
console.log(` ${dim("Shell rc:")} ${rc ? rc.path : dim("none for this shell; the
|
|
2017
|
+
console.log(` ${dim("Shell rc:")} ${rc ? rc.path : dim("none for this shell; the key would stay in Pushary's config only")}`);
|
|
2001
2018
|
console.log();
|
|
2002
2019
|
console.log(` ${bold("Also, on a real run")}`);
|
|
2003
2020
|
for (const line of describeSetupSideEffects({
|
|
@@ -2029,9 +2046,9 @@ var printManualSteps = () => {
|
|
|
2029
2046
|
for (const step of manualSteps) console.log(` ${dim("\u2022")} ${step}`);
|
|
2030
2047
|
console.log();
|
|
2031
2048
|
};
|
|
2032
|
-
var emitJson = (options, payload) => {
|
|
2049
|
+
var emitJson = async (options, payload) => {
|
|
2033
2050
|
if (!options.json) return;
|
|
2034
|
-
|
|
2051
|
+
await writeStdoutFully(`${JSON.stringify(payload, null, 2)}
|
|
2035
2052
|
`);
|
|
2036
2053
|
};
|
|
2037
2054
|
var main = async () => {
|
|
@@ -2117,7 +2134,7 @@ var main = async () => {
|
|
|
2117
2134
|
markStep("resolve-agents");
|
|
2118
2135
|
const plannedAgents = await resolveAgents(options);
|
|
2119
2136
|
reportDryRun(null, plannedAgents, null, controlMode);
|
|
2120
|
-
emitJson(options, { ok: true, dryRun: true, agents: plannedAgents, control: controlMode, keyCheck: "skipped", key: "none" });
|
|
2137
|
+
await emitJson(options, { ok: true, dryRun: true, agents: plannedAgents, control: controlMode, keyCheck: "skipped", key: "none" });
|
|
2121
2138
|
return;
|
|
2122
2139
|
} else if (connectMode === "app" && canShowPairingQr() && !options.skipPhone) {
|
|
2123
2140
|
console.log(` ${dim("Pairing with your Pushary app.")}`);
|
|
@@ -2206,7 +2223,7 @@ var main = async () => {
|
|
|
2206
2223
|
const agents = await resolveAgents(options);
|
|
2207
2224
|
if (options.dryRun) {
|
|
2208
2225
|
reportDryRun(trimmedKey, agents, keyCheck, controlMode);
|
|
2209
|
-
emitJson(options, { ok: true, dryRun: true, agents, control: controlMode, keyCheck: keyCheck?.kind ?? "skipped" });
|
|
2226
|
+
await emitJson(options, { ok: true, dryRun: true, agents, control: controlMode, keyCheck: keyCheck?.kind ?? "skipped" });
|
|
2210
2227
|
return;
|
|
2211
2228
|
}
|
|
2212
2229
|
markStep("save-key");
|
|
@@ -2411,7 +2428,7 @@ var main = async () => {
|
|
|
2411
2428
|
console.log(` ${report.message}`);
|
|
2412
2429
|
for (const line of next) console.log(` ${dim(line)}`);
|
|
2413
2430
|
console.log();
|
|
2414
|
-
emitJson(options, {
|
|
2431
|
+
await emitJson(options, {
|
|
2415
2432
|
ok: false,
|
|
2416
2433
|
next,
|
|
2417
2434
|
reason: keyCheck.kind === "locked" ? "plan_inactive" : "readiness_unverified",
|
|
@@ -2563,7 +2580,7 @@ var main = async () => {
|
|
|
2563
2580
|
keyCheck: keyCheck?.kind ?? "skipped",
|
|
2564
2581
|
exitCode
|
|
2565
2582
|
});
|
|
2566
|
-
emitJson(options, {
|
|
2583
|
+
await emitJson(options, {
|
|
2567
2584
|
ok: closing.ok,
|
|
2568
2585
|
configured: completed,
|
|
2569
2586
|
skipped,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-552AGATI.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-DEWCUHOY.js";
|
|
8
8
|
import "../chunk-KZERVKTD.js";
|
|
9
9
|
import {
|
|
10
10
|
getApiKey
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-4GTXFYQ7.js";
|
|
12
|
+
import "../chunk-EZFE4PC3.js";
|
|
13
|
+
import "../chunk-JDUWMJDP.js";
|
|
14
14
|
|
|
15
15
|
// bin/pushary-stats.ts
|
|
16
16
|
exitOnHelpFlag("stats");
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
describeLastSeen,
|
|
4
4
|
listMachines
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-7FVC3RGF.js";
|
|
6
|
+
import "../chunk-AGW7PMMO.js";
|
|
7
7
|
import "../chunk-RIVNNBEK.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-WL4YO6CO.js";
|
|
9
9
|
import "../chunk-XHKBHWLX.js";
|
|
10
10
|
import "../chunk-6ICPEJY5.js";
|
|
11
11
|
import {
|
|
12
12
|
describeReach,
|
|
13
13
|
fetchChannels,
|
|
14
14
|
reachVerdict
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-BPGATW2F.js";
|
|
16
16
|
import "../chunk-3EGEA4KH.js";
|
|
17
17
|
import "../chunk-QCGNGEGE.js";
|
|
18
18
|
import {
|
|
@@ -20,32 +20,32 @@ import {
|
|
|
20
20
|
} from "../chunk-U4TMAANR.js";
|
|
21
21
|
import {
|
|
22
22
|
exitOnHelpFlag
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-DEWCUHOY.js";
|
|
24
24
|
import {
|
|
25
25
|
rejectUnknownFlags
|
|
26
26
|
} from "../chunk-GMXKITVA.js";
|
|
27
27
|
import {
|
|
28
28
|
readKeySource
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-ZPTSEJMD.js";
|
|
30
|
+
import "../chunk-SJC5TXK7.js";
|
|
31
31
|
import {
|
|
32
32
|
checkApiKey,
|
|
33
33
|
describeKeyCheck
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-7MO3CNBX.js";
|
|
35
|
+
import "../chunk-WRDMCP4G.js";
|
|
36
|
+
import "../chunk-FSFI2PQL.js";
|
|
37
37
|
import {
|
|
38
38
|
UsageError
|
|
39
39
|
} from "../chunk-7QLSKOSU.js";
|
|
40
40
|
import {
|
|
41
41
|
EXIT
|
|
42
42
|
} from "../chunk-KZERVKTD.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-U3DBAX7P.js";
|
|
44
|
+
import "../chunk-5IIAUWEJ.js";
|
|
45
45
|
import "../chunk-T7E75EKA.js";
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-4GTXFYQ7.js";
|
|
47
|
+
import "../chunk-EZFE4PC3.js";
|
|
48
|
+
import "../chunk-JDUWMJDP.js";
|
|
49
49
|
|
|
50
50
|
// src/status.ts
|
|
51
51
|
var keySourceLine = (source) => {
|
|
@@ -2,49 +2,49 @@
|
|
|
2
2
|
import {
|
|
3
3
|
activeHookSource,
|
|
4
4
|
activeIdentity
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-VRPNTJX3.js";
|
|
6
|
+
import "../chunk-ZUZKHTPJ.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-G2YXIZZS.js";
|
|
10
|
+
import "../chunk-AMFNJPJ5.js";
|
|
11
11
|
import "../chunk-SGZJ5LYH.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-GB2U4QVF.js";
|
|
13
|
+
import "../chunk-MH6SJHUE.js";
|
|
14
|
+
import "../chunk-FANGHYW5.js";
|
|
15
|
+
import "../chunk-VRYOALHQ.js";
|
|
16
|
+
import "../chunk-WL4YO6CO.js";
|
|
17
|
+
import "../chunk-CVVPUVBD.js";
|
|
18
|
+
import "../chunk-2UWD2WZC.js";
|
|
19
|
+
import "../chunk-Q4RF7EEP.js";
|
|
20
|
+
import "../chunk-ZV32QRBR.js";
|
|
21
|
+
import "../chunk-34JHGOYO.js";
|
|
22
22
|
import "../chunk-XHKBHWLX.js";
|
|
23
23
|
import "../chunk-6ICPEJY5.js";
|
|
24
24
|
import {
|
|
25
25
|
handleStop,
|
|
26
26
|
handleSubagentStop,
|
|
27
27
|
isSubagentStop
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-CJFVYYKM.js";
|
|
29
29
|
import "../chunk-N6IOSZOE.js";
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-HBUQ2EQD.js";
|
|
31
|
+
import "../chunk-UWMEY4RS.js";
|
|
32
|
+
import "../chunk-PPC4FZKJ.js";
|
|
33
33
|
import "../chunk-POFBE6ZY.js";
|
|
34
34
|
import "../chunk-GMXKITVA.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-ZPTSEJMD.js";
|
|
36
|
+
import "../chunk-SJC5TXK7.js";
|
|
37
|
+
import "../chunk-7MO3CNBX.js";
|
|
38
|
+
import "../chunk-WRDMCP4G.js";
|
|
39
|
+
import "../chunk-FSFI2PQL.js";
|
|
40
40
|
import "../chunk-7QLSKOSU.js";
|
|
41
41
|
import "../chunk-KZERVKTD.js";
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-U3DBAX7P.js";
|
|
43
|
+
import "../chunk-5IIAUWEJ.js";
|
|
44
44
|
import "../chunk-T7E75EKA.js";
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-4GTXFYQ7.js";
|
|
46
|
+
import "../chunk-EZFE4PC3.js";
|
|
47
|
+
import "../chunk-JDUWMJDP.js";
|
|
48
48
|
|
|
49
49
|
// bin/pushary-stop-hook.ts
|
|
50
50
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -2,47 +2,47 @@
|
|
|
2
2
|
import {
|
|
3
3
|
activeHookSource,
|
|
4
4
|
activeIdentity
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-VRPNTJX3.js";
|
|
6
|
+
import "../chunk-ZUZKHTPJ.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-G2YXIZZS.js";
|
|
10
|
+
import "../chunk-AMFNJPJ5.js";
|
|
11
11
|
import "../chunk-SGZJ5LYH.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-GB2U4QVF.js";
|
|
13
|
+
import "../chunk-MH6SJHUE.js";
|
|
14
|
+
import "../chunk-FANGHYW5.js";
|
|
15
|
+
import "../chunk-VRYOALHQ.js";
|
|
16
|
+
import "../chunk-WL4YO6CO.js";
|
|
17
|
+
import "../chunk-CVVPUVBD.js";
|
|
18
|
+
import "../chunk-2UWD2WZC.js";
|
|
19
|
+
import "../chunk-Q4RF7EEP.js";
|
|
20
|
+
import "../chunk-ZV32QRBR.js";
|
|
21
|
+
import "../chunk-34JHGOYO.js";
|
|
22
22
|
import "../chunk-XHKBHWLX.js";
|
|
23
23
|
import "../chunk-6ICPEJY5.js";
|
|
24
24
|
import {
|
|
25
25
|
handleStopFailure
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-CJFVYYKM.js";
|
|
27
27
|
import "../chunk-N6IOSZOE.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-HBUQ2EQD.js";
|
|
29
|
+
import "../chunk-UWMEY4RS.js";
|
|
30
|
+
import "../chunk-PPC4FZKJ.js";
|
|
31
31
|
import "../chunk-POFBE6ZY.js";
|
|
32
32
|
import "../chunk-GMXKITVA.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-ZPTSEJMD.js";
|
|
34
|
+
import "../chunk-SJC5TXK7.js";
|
|
35
|
+
import "../chunk-7MO3CNBX.js";
|
|
36
|
+
import "../chunk-WRDMCP4G.js";
|
|
37
|
+
import "../chunk-FSFI2PQL.js";
|
|
38
38
|
import "../chunk-7QLSKOSU.js";
|
|
39
39
|
import "../chunk-KZERVKTD.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-U3DBAX7P.js";
|
|
41
|
+
import "../chunk-5IIAUWEJ.js";
|
|
42
42
|
import "../chunk-T7E75EKA.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-4GTXFYQ7.js";
|
|
44
|
+
import "../chunk-EZFE4PC3.js";
|
|
45
|
+
import "../chunk-JDUWMJDP.js";
|
|
46
46
|
|
|
47
47
|
// bin/pushary-stopfailure-hook.ts
|
|
48
48
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "../chunk-U4TMAANR.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-DEWCUHOY.js";
|
|
8
8
|
import {
|
|
9
9
|
rejectUnknownFlags
|
|
10
10
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
getApiKey,
|
|
19
19
|
getBaseUrl
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-4GTXFYQ7.js";
|
|
21
|
+
import "../chunk-EZFE4PC3.js";
|
|
22
|
+
import "../chunk-JDUWMJDP.js";
|
|
23
23
|
|
|
24
24
|
// bin/pushary-suggestions.ts
|
|
25
25
|
exitOnHelpFlag("suggestions");
|