@pushary/agent-hooks 1.7.3 → 1.8.1
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 +14 -0
- package/README.md +39 -19
- package/data/SKILL.md +8 -8
- package/data/cowork/SKILL.md +2 -2
- package/data/cursor-plugin/README.md +2 -2
- package/data/cursor-plugin/scripts/pushary-gate.mjs +2 -21
- package/data/cursor-plugin/scripts/redaction.mjs +53 -0
- package/data/cursor-plugin/skills/pushary/SKILL.md +7 -7
- package/data/vscode-plugin/README.md +4 -4
- package/data/vscode-plugin/scripts/pushary-gate.mjs +3 -23
- package/data/vscode-plugin/scripts/redaction.mjs +53 -0
- package/data/vscode-plugin/skills/pushary/SKILL.md +7 -7
- 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 +97 -111
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +42 -43
- 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 +27 -27
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +92 -86
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +12 -12
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +85 -28
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- 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 +32 -32
- package/dist/bin/pushary-setup.js +62 -129
- 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 +236 -110
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-DUQO4C4I.js → chunk-2SLCHCVN.js} +3 -3
- package/dist/{chunk-YYCTF4Q5.js → chunk-35X5UDML.js} +7 -7
- package/dist/{chunk-OVC5QXN5.js → chunk-4A3UQERT.js} +1 -1
- package/dist/chunk-5DGNEUXK.js +73 -0
- package/dist/{chunk-62CVUUNU.js → chunk-5Y2DY6X4.js} +2 -2
- package/dist/{chunk-G4GLCLKK.js → chunk-5YY3IJT4.js} +159 -36
- package/dist/{chunk-KJXUIPS4.js → chunk-64H5IZZD.js} +28 -16
- package/dist/{chunk-OTNOANMX.js → chunk-6TK4IY3A.js} +8 -8
- package/dist/{chunk-LPNJLKBQ.js → chunk-72WOCX22.js} +1 -1
- package/dist/{chunk-IRZG3HEU.js → chunk-7ITOAMCD.js} +1 -1
- package/dist/{chunk-G62JL2NT.js → chunk-7U7ZWUTR.js} +1 -1
- package/dist/{chunk-IPSRMLCJ.js → chunk-ASWRMBOM.js} +1 -1
- package/dist/{chunk-5S2VBSJI.js → chunk-CB23AO4D.js} +2 -2
- package/dist/{chunk-VKVSRCBO.js → chunk-CHMOVJ2M.js} +1 -1
- package/dist/{chunk-BGBLLHZ4.js → chunk-DLEKCAQL.js} +1 -1
- package/dist/{chunk-EEEJ2JIL.js → chunk-DVW2MYCM.js} +3 -3
- package/dist/{chunk-AWVNAYGD.js → chunk-DXBS2EL7.js} +1 -1
- package/dist/{chunk-ZKJ34T2F.js → chunk-EIGJYCOE.js} +31 -17
- package/dist/{chunk-U6RVDUJ5.js → chunk-F6NTWZZC.js} +283 -41
- package/dist/{chunk-7RUJKCR4.js → chunk-FLQPM2GQ.js} +2 -2
- package/dist/{chunk-TCVMK6GI.js → chunk-GBNQXYN4.js} +4 -4
- package/dist/{chunk-G6RRVJOG.js → chunk-GH6KGWMC.js} +6 -6
- package/dist/chunk-GU3EJCVV.js +43 -0
- package/dist/{chunk-6JQFIHZC.js → chunk-HBWC3JVZ.js} +3 -3
- package/dist/{chunk-IWJKSIB4.js → chunk-HMNR7B2F.js} +1 -1
- package/dist/{chunk-NOI3XTCY.js → chunk-HOEB6AKG.js} +1 -1
- package/dist/{chunk-62VT3BPH.js → chunk-HQRCVEI2.js} +32 -17
- package/dist/{chunk-MIXWMA73.js → chunk-HTEGMMT3.js} +3 -3
- package/dist/{chunk-BIH2Y2HP.js → chunk-HVDMGDYV.js} +2 -2
- package/dist/{chunk-VE7TXLR4.js → chunk-I4HKMUZQ.js} +3 -3
- package/dist/{chunk-YPUBA2FL.js → chunk-INSMZNS7.js} +5 -5
- package/dist/{chunk-G3OMOTJ4.js → chunk-JRQRNNGA.js} +3 -3
- package/dist/{chunk-N5MZH5A6.js → chunk-KB2FTO4O.js} +4 -4
- package/dist/{chunk-O3JDWNLU.js → chunk-LK2S5XIV.js} +183 -28
- package/dist/{chunk-YC27PROF.js → chunk-MMVCI6DT.js} +20 -5
- package/dist/{chunk-3EUBQARL.js → chunk-MYHG7PX2.js} +1 -1
- package/dist/{chunk-EADXTSHE.js → chunk-N6JJJTPH.js} +6 -3
- package/dist/{chunk-PRNFSORD.js → chunk-NHCUXTEM.js} +1 -1
- package/dist/{chunk-KEL5MXRL.js → chunk-NOLPURUI.js} +1 -1
- package/dist/{chunk-WTJM7PSL.js → chunk-OCVVSRDA.js} +3 -3
- package/dist/{chunk-R6OYCUNK.js → chunk-ON5JW2HP.js} +1 -1
- package/dist/{chunk-UOQRM7JQ.js → chunk-QB6QYZ6B.js} +5 -5
- package/dist/{chunk-7OA34PNW.js → chunk-T55H6YEP.js} +40 -10
- package/dist/{chunk-D6OODZCM.js → chunk-TJMAXQ5Q.js} +2 -2
- package/dist/{chunk-WGMW7OXW.js → chunk-TKQ6LZQZ.js} +6 -6
- package/dist/{chunk-WPX67AKT.js → chunk-UMMCHS6P.js} +1 -1
- package/dist/{chunk-MZBRL5H5.js → chunk-UPLV5AJF.js} +108 -25
- package/dist/{chunk-P2VIBGXA.js → chunk-URNXU3FO.js} +1 -1
- package/dist/{chunk-EUGNVLMG.js → chunk-VFFHQC7W.js} +3 -1
- package/dist/{chunk-Y4ZH64UK.js → chunk-VZMIHERK.js} +2 -2
- package/dist/{chunk-RLW3JWDY.js → chunk-W2LJ4O3A.js} +2 -2
- package/dist/{chunk-LHC45YUC.js → chunk-ZJYJAD52.js} +1 -1
- package/dist/{reapply-PH5T4BGR.js → reapply-ICGTBHVE.js} +9 -9
- package/dist/src/index.js +20 -20
- package/package.json +1 -1
- package/dist/chunk-5GB22QYL.js +0 -255
- package/dist/chunk-VYPJHGG6.js +0 -92
|
@@ -2,83 +2,73 @@
|
|
|
2
2
|
import {
|
|
3
3
|
codexTrustOutcome,
|
|
4
4
|
describeCodexTrustConfirmation
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-DXBS2EL7.js";
|
|
6
6
|
import {
|
|
7
7
|
runBrowserLogin
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-7U7ZWUTR.js";
|
|
9
9
|
import {
|
|
10
10
|
coworkOutput,
|
|
11
11
|
coworkSelection
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-N6JJJTPH.js";
|
|
13
13
|
import "../chunk-PUZZELE6.js";
|
|
14
14
|
import {
|
|
15
15
|
detectClaudeVersion
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-ASWRMBOM.js";
|
|
17
17
|
import {
|
|
18
|
-
AgentConfigError,
|
|
19
|
-
afterAgentFailureNote,
|
|
20
|
-
agentFailureFromError,
|
|
21
|
-
agentFailureWire,
|
|
22
|
-
configFailureKind,
|
|
23
18
|
describeVersionManagerPin,
|
|
24
|
-
describedAgentFailure,
|
|
25
|
-
failedAgentsContext,
|
|
26
|
-
retryAgentCommand,
|
|
27
19
|
versionManagerOf
|
|
28
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-GU3EJCVV.js";
|
|
29
21
|
import {
|
|
30
22
|
ensureCodexTrustsPusharyHooks
|
|
31
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-W2LJ4O3A.js";
|
|
32
24
|
import {
|
|
33
25
|
readManagedControlEvidence,
|
|
34
26
|
waitForMachineReadiness
|
|
35
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TKQ6LZQZ.js";
|
|
36
28
|
import {
|
|
37
29
|
describeSetupSideEffects,
|
|
38
30
|
installAgentSkill,
|
|
39
31
|
installSkillViaSkillsCli,
|
|
40
32
|
registerCursorGate
|
|
41
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-HBWC3JVZ.js";
|
|
42
34
|
import {
|
|
43
|
-
|
|
35
|
+
AgentConfigError,
|
|
44
36
|
FX_PUSHARY_TOOLS_RULE,
|
|
45
|
-
FX_QUESTION_RULE_RECEIPT,
|
|
46
37
|
FX_QUESTION_TOOL,
|
|
47
|
-
FX_SETTINGS_REFUSALS,
|
|
48
38
|
FX_TOOL_DISCOVERY_NOTE,
|
|
49
39
|
HERMES_PIP_PACKAGE,
|
|
40
|
+
SHARED_AGENTS_MD_LABEL,
|
|
41
|
+
afterAgentFailureNote,
|
|
42
|
+
agentFailureFromError,
|
|
43
|
+
agentFailureWire,
|
|
44
|
+
configFailureKind,
|
|
45
|
+
configureFxSettings,
|
|
50
46
|
describeDetection,
|
|
47
|
+
describedAgentFailure,
|
|
51
48
|
detectAllAgents,
|
|
49
|
+
failedAgentsContext,
|
|
52
50
|
fxIgnoresInstructionsFile,
|
|
53
|
-
fxProfileText,
|
|
54
51
|
fxPusharyEntry,
|
|
55
|
-
|
|
56
|
-
fxQuestionRouting,
|
|
57
|
-
fxSettingsText,
|
|
52
|
+
inspectFxInstallation,
|
|
58
53
|
isDetected,
|
|
59
|
-
isFxPusharyEntry,
|
|
60
54
|
isHermesConfigReceipt,
|
|
61
55
|
pluginLocationSnippet,
|
|
62
|
-
|
|
63
|
-
readFxProfile,
|
|
64
|
-
readFxSettings,
|
|
56
|
+
readFxProfileForSetup,
|
|
65
57
|
registerPluginLocation,
|
|
66
58
|
renderAgentInstructions,
|
|
67
59
|
renderProjectAgentInstructions,
|
|
68
60
|
resolveHermesPython,
|
|
61
|
+
retryAgentCommand,
|
|
69
62
|
runHermesConfigScript,
|
|
70
63
|
shortenHome,
|
|
71
64
|
vscodeSettingsTargets,
|
|
72
65
|
withFxPusharyServer,
|
|
73
|
-
|
|
74
|
-
withQuestionsRoutedToPushary,
|
|
75
|
-
workspacesOverridingPusharyRule,
|
|
76
|
-
workspacesShowingQuestionTool,
|
|
66
|
+
writeFxProfile,
|
|
77
67
|
writeInstructionBlock
|
|
78
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-LK2S5XIV.js";
|
|
79
69
|
import {
|
|
80
70
|
MCP_BRIDGE_BINARY
|
|
81
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-T55H6YEP.js";
|
|
82
72
|
import {
|
|
83
73
|
OPENCODE_HOOK_BINARY,
|
|
84
74
|
addOpenCodeMcpServer,
|
|
@@ -89,7 +79,7 @@ import {
|
|
|
89
79
|
openCodePluginDir,
|
|
90
80
|
openCodePluginFile,
|
|
91
81
|
openCodeWired
|
|
92
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-NOLPURUI.js";
|
|
93
83
|
import {
|
|
94
84
|
addCompatibleHooks,
|
|
95
85
|
addCompatibleMcpServer,
|
|
@@ -100,7 +90,7 @@ import {
|
|
|
100
90
|
compatibleMcpFile,
|
|
101
91
|
compatiblePermissionRuleFile,
|
|
102
92
|
hasCompatibleHooks
|
|
103
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-QB6QYZ6B.js";
|
|
104
94
|
import {
|
|
105
95
|
addClaudeMcpServer,
|
|
106
96
|
addPusharyHooks,
|
|
@@ -108,16 +98,16 @@ import {
|
|
|
108
98
|
captureClaudeMcpServer,
|
|
109
99
|
isClaudeMcpSnapshot,
|
|
110
100
|
updateClaudeMcpSnapshot
|
|
111
|
-
} from "../chunk-
|
|
101
|
+
} from "../chunk-JRQRNNGA.js";
|
|
112
102
|
import {
|
|
113
103
|
detectProviderLiveCapabilities,
|
|
114
104
|
hasSpawnProvider,
|
|
115
105
|
resolveControlPolicy
|
|
116
|
-
} from "../chunk-
|
|
106
|
+
} from "../chunk-VZMIHERK.js";
|
|
117
107
|
import {
|
|
118
108
|
describeAutoUpdateAnnouncement,
|
|
119
109
|
takeAutoUpdateAnnouncement
|
|
120
|
-
} from "../chunk-
|
|
110
|
+
} from "../chunk-64H5IZZD.js";
|
|
121
111
|
import {
|
|
122
112
|
KEEP_HINT,
|
|
123
113
|
captureHookTakeover,
|
|
@@ -127,23 +117,23 @@ import {
|
|
|
127
117
|
hookOwnerOf,
|
|
128
118
|
mcpBearerKey,
|
|
129
119
|
planHooks
|
|
130
|
-
} from "../chunk-
|
|
120
|
+
} from "../chunk-GBNQXYN4.js";
|
|
131
121
|
import {
|
|
132
122
|
AGENT_CHOICES,
|
|
133
123
|
effectiveControlMode,
|
|
134
124
|
effectiveVerify,
|
|
135
125
|
parseSetupOptions
|
|
136
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-DLEKCAQL.js";
|
|
137
127
|
import {
|
|
138
128
|
liveBridgeProbe,
|
|
139
129
|
resolveBridgeStub
|
|
140
|
-
} from "../chunk-
|
|
130
|
+
} from "../chunk-MYHG7PX2.js";
|
|
141
131
|
import {
|
|
142
132
|
claudeWired,
|
|
143
133
|
codexWired,
|
|
144
134
|
geminiWired,
|
|
145
135
|
pusharyHookExecutable
|
|
146
|
-
} from "../chunk-
|
|
136
|
+
} from "../chunk-OCVVSRDA.js";
|
|
147
137
|
import {
|
|
148
138
|
clearDaemonNeedsLogin,
|
|
149
139
|
daemonHasRemoteProof,
|
|
@@ -156,26 +146,26 @@ import {
|
|
|
156
146
|
replaceDaemonService,
|
|
157
147
|
stopDaemonService,
|
|
158
148
|
waitForDaemonRemoteProof
|
|
159
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-EIGJYCOE.js";
|
|
160
150
|
import {
|
|
161
151
|
GEMINI_HOOK_BINARY,
|
|
162
152
|
addGeminiHooks,
|
|
163
153
|
addGeminiMcpServer,
|
|
164
154
|
compareVersion,
|
|
165
155
|
parseVersion
|
|
166
|
-
} from "../chunk-
|
|
167
|
-
import "../chunk-
|
|
156
|
+
} from "../chunk-HTEGMMT3.js";
|
|
157
|
+
import "../chunk-HOEB6AKG.js";
|
|
168
158
|
import {
|
|
169
159
|
transcriptPreferenceForSetup
|
|
170
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-72WOCX22.js";
|
|
171
161
|
import "../chunk-XHKBHWLX.js";
|
|
172
162
|
import {
|
|
173
163
|
reportEvent
|
|
174
|
-
} from "../chunk-
|
|
164
|
+
} from "../chunk-F6NTWZZC.js";
|
|
175
165
|
import "../chunk-N6IOSZOE.js";
|
|
176
|
-
import "../chunk-
|
|
177
|
-
import "../chunk-
|
|
178
|
-
import "../chunk-
|
|
166
|
+
import "../chunk-VFFHQC7W.js";
|
|
167
|
+
import "../chunk-MMVCI6DT.js";
|
|
168
|
+
import "../chunk-KB2FTO4O.js";
|
|
179
169
|
import "../chunk-POFBE6ZY.js";
|
|
180
170
|
import {
|
|
181
171
|
BROWSER_CONNECT_COMMAND,
|
|
@@ -187,7 +177,7 @@ import {
|
|
|
187
177
|
printConnectInstructions,
|
|
188
178
|
roundTripEvidence,
|
|
189
179
|
verifyRoundTrip
|
|
190
|
-
} from "../chunk-
|
|
180
|
+
} from "../chunk-INSMZNS7.js";
|
|
191
181
|
import "../chunk-3EGEA4KH.js";
|
|
192
182
|
import {
|
|
193
183
|
setHumanStream
|
|
@@ -208,22 +198,22 @@ import {
|
|
|
208
198
|
readKeySource,
|
|
209
199
|
resolveShellRc,
|
|
210
200
|
writeKey
|
|
211
|
-
} from "../chunk-
|
|
212
|
-
import "../chunk-
|
|
201
|
+
} from "../chunk-TJMAXQ5Q.js";
|
|
202
|
+
import "../chunk-I4HKMUZQ.js";
|
|
213
203
|
import {
|
|
214
204
|
checkApiKey,
|
|
215
205
|
describeKeyCheck,
|
|
216
206
|
samePusharyAccount
|
|
217
|
-
} from "../chunk-
|
|
218
|
-
import "../chunk-
|
|
219
|
-
import "../chunk-
|
|
207
|
+
} from "../chunk-DVW2MYCM.js";
|
|
208
|
+
import "../chunk-2SLCHCVN.js";
|
|
209
|
+
import "../chunk-4A3UQERT.js";
|
|
220
210
|
import {
|
|
221
211
|
UsageError
|
|
222
212
|
} from "../chunk-7QLSKOSU.js";
|
|
223
213
|
import {
|
|
224
214
|
EXIT
|
|
225
215
|
} from "../chunk-KZERVKTD.js";
|
|
226
|
-
import "../chunk-
|
|
216
|
+
import "../chunk-5Y2DY6X4.js";
|
|
227
217
|
import {
|
|
228
218
|
NpmMissingError,
|
|
229
219
|
addCodexHookTrust,
|
|
@@ -260,6 +250,7 @@ import {
|
|
|
260
250
|
hookTakeoverReceipt,
|
|
261
251
|
installGlobally,
|
|
262
252
|
npmErrorMessage,
|
|
253
|
+
plannedGlobalPackage,
|
|
263
254
|
pusharyConfigFile,
|
|
264
255
|
pusharyDir,
|
|
265
256
|
readCodexMcpAuth,
|
|
@@ -267,18 +258,18 @@ import {
|
|
|
267
258
|
resolveGlobalBinary,
|
|
268
259
|
vscodePluginDir,
|
|
269
260
|
vscodePluginMcp
|
|
270
|
-
} from "../chunk-
|
|
261
|
+
} from "../chunk-UPLV5AJF.js";
|
|
271
262
|
import {
|
|
272
263
|
backupFile,
|
|
273
264
|
readJsonSafe,
|
|
274
265
|
writeFileAtomic,
|
|
275
266
|
writeJsonAtomic
|
|
276
267
|
} from "../chunk-T7E75EKA.js";
|
|
277
|
-
import "../chunk-
|
|
268
|
+
import "../chunk-ON5JW2HP.js";
|
|
278
269
|
import {
|
|
279
270
|
NPX_LATEST_COMMAND,
|
|
280
271
|
renderCommandHelp
|
|
281
|
-
} from "../chunk-
|
|
272
|
+
} from "../chunk-35X5UDML.js";
|
|
282
273
|
import {
|
|
283
274
|
HOOK_COMPATIBLE_PROFILES,
|
|
284
275
|
HOOK_LOCATOR_BINARY,
|
|
@@ -288,8 +279,10 @@ import {
|
|
|
288
279
|
getPackageVersion,
|
|
289
280
|
hookCompatibleProfile,
|
|
290
281
|
isNewerVersion,
|
|
291
|
-
isValidApiKey
|
|
292
|
-
|
|
282
|
+
isValidApiKey,
|
|
283
|
+
launchedPackage,
|
|
284
|
+
ownPackageName
|
|
285
|
+
} from "../chunk-5YY3IJT4.js";
|
|
293
286
|
|
|
294
287
|
// bin/pushary-setup.ts
|
|
295
288
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, readdirSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -796,7 +789,7 @@ var checkForUpdates = async (current, markAnnounced) => {
|
|
|
796
789
|
console.log(` ${check} ${describeAutoUpdateAnnouncement(announcement)}`);
|
|
797
790
|
console.log();
|
|
798
791
|
}
|
|
799
|
-
const latest = await fetchLatestPublishedVersion({ timeoutMs: 3e3 });
|
|
792
|
+
const latest = await fetchLatestPublishedVersion({ packageName: launchedPackage(ownPackageName()), timeoutMs: 3e3 });
|
|
800
793
|
if (latest && isNewerVersion(latest, current)) {
|
|
801
794
|
console.log(` ${yellow("!")} Update available: ${dim(current)} \u2192 ${green(latest)}`);
|
|
802
795
|
console.log(` ${dim("Run:")} ${NPX_LATEST_COMMAND} upgrade`);
|
|
@@ -1480,65 +1473,7 @@ var saveApiKey = async (apiKey, controlMode, transcriptSync) => {
|
|
|
1480
1473
|
}
|
|
1481
1474
|
return rc;
|
|
1482
1475
|
};
|
|
1483
|
-
var fxRetryHint = () => `Fix it, then run ${retryAgentCommand("fx")}.`;
|
|
1484
|
-
var readFxProfileForSetup = (filePath) => {
|
|
1485
|
-
const read = readFxFile(filePath, readFxProfile);
|
|
1486
|
-
if (read.kind === "profile") return read.profile;
|
|
1487
|
-
if (read.kind === "missing") return {};
|
|
1488
|
-
if (read.kind === "unreadable") {
|
|
1489
|
-
throw new AgentConfigError(configFailureKind("unreadable"), filePath, `${filePath} could not be read, so it was left untouched. ${fxRetryHint()}`);
|
|
1490
|
-
}
|
|
1491
|
-
throw new AgentConfigError(
|
|
1492
|
-
configFailureKind("unparseable"),
|
|
1493
|
-
filePath,
|
|
1494
|
-
`${filePath} ${FX_PROFILE_REFUSALS[read.reason]}, so it was left untouched. ${fxRetryHint()}`
|
|
1495
|
-
);
|
|
1496
|
-
};
|
|
1497
|
-
var writeFxProfile = (filePath, profile) => {
|
|
1498
|
-
const rendered = fxProfileText(profile);
|
|
1499
|
-
if (rendered.kind === "refused") {
|
|
1500
|
-
throw new Error(`${filePath} would grow past the size fx reads, so it was left untouched. ${fxRetryHint()}`);
|
|
1501
|
-
}
|
|
1502
|
-
writeFileAtomic(filePath, rendered.text, KEY_FILE_MODE);
|
|
1503
|
-
};
|
|
1504
1476
|
var FX_SETTINGS_RULES_SNIPPET = `"permission": { "${FX_PUSHARY_TOOLS_RULE}": "allow", "${FX_QUESTION_TOOL}": "deny" }`;
|
|
1505
|
-
var fxSettingsReadRefusal = (filePath, read) => {
|
|
1506
|
-
if (read.kind === "unreadable") return `${filePath} could not be read`;
|
|
1507
|
-
if (read.kind === "refused") return `${filePath} ${FX_SETTINGS_REFUSALS[read.reason]}`;
|
|
1508
|
-
return null;
|
|
1509
|
-
};
|
|
1510
|
-
var recordFxQuestionRule = () => {
|
|
1511
|
-
try {
|
|
1512
|
-
if (!existsSync(fxQuestionRuleReceipt())) writeJsonAtomic(fxQuestionRuleReceipt(), FX_QUESTION_RULE_RECEIPT, 384);
|
|
1513
|
-
return true;
|
|
1514
|
-
} catch {
|
|
1515
|
-
return false;
|
|
1516
|
-
}
|
|
1517
|
-
};
|
|
1518
|
-
var configureFxSettings = (filePath) => {
|
|
1519
|
-
const read = readFxFile(filePath, readFxSettings);
|
|
1520
|
-
const refusal = fxSettingsReadRefusal(filePath, read);
|
|
1521
|
-
if (refusal) return { kind: "refused", detail: refusal };
|
|
1522
|
-
const allowed = withPusharyToolsAllowed(read.kind === "settings" ? read.settings : {});
|
|
1523
|
-
const routed = withQuestionsRoutedToPushary(allowed.settings);
|
|
1524
|
-
const written = {
|
|
1525
|
-
kind: "written",
|
|
1526
|
-
toolsChange: allowed.change,
|
|
1527
|
-
questionChange: routed.change,
|
|
1528
|
-
questionRouting: fxQuestionRouting(routed.settings, process.env),
|
|
1529
|
-
workspacesWithOwnRules: [.../* @__PURE__ */ new Set([...workspacesOverridingPusharyRule(routed.settings), ...workspacesShowingQuestionTool(routed.settings)])],
|
|
1530
|
-
ruleRecorded: true
|
|
1531
|
-
};
|
|
1532
|
-
if (allowed.change !== "added" && routed.change !== "added") return written;
|
|
1533
|
-
const rendered = fxSettingsText(routed.settings);
|
|
1534
|
-
if (rendered.kind === "refused") return { kind: "refused", detail: `${filePath} would grow past the 64 KiB fx reads` };
|
|
1535
|
-
try {
|
|
1536
|
-
writeFileAtomic(filePath, rendered.text, KEY_FILE_MODE);
|
|
1537
|
-
} catch (err) {
|
|
1538
|
-
return { kind: "refused", detail: `${filePath} could not be written (${formatError(err)})` };
|
|
1539
|
-
}
|
|
1540
|
-
return { ...written, ruleRecorded: routed.change !== "added" || recordFxQuestionRule() };
|
|
1541
|
-
};
|
|
1542
1477
|
var FX_QUESTION_ROUTING_REPORTS = {
|
|
1543
1478
|
"full-access": "fx runs in full-access mode, which ignores permission rules, so its terminal question tool stays on. Its instructions tell it to ask through Pushary instead; leave full-access mode with /permissions to turn the tool off for certain.",
|
|
1544
1479
|
overridden: `A rule in ${fxSettings()} keeps fx's terminal question tool on, so fx can still ask there instead of through Pushary.`
|
|
@@ -1580,10 +1515,7 @@ var teachFxToAskViaPush = () => {
|
|
|
1580
1515
|
${FX_TOOL_DISCOVERY_NOTE}`);
|
|
1581
1516
|
return true;
|
|
1582
1517
|
};
|
|
1583
|
-
var fxWired = () =>
|
|
1584
|
-
const read = readFxFile(fxMcpProfile(), readFxProfile);
|
|
1585
|
-
return read.kind === "profile" && isFxPusharyEntry(fxPusharyEntryOf(read.profile));
|
|
1586
|
-
};
|
|
1518
|
+
var fxWired = () => inspectFxInstallation(fxMcpProfile(), fxSettings(), process.env).configured;
|
|
1587
1519
|
var setupFx = async () => {
|
|
1588
1520
|
console.log(`
|
|
1589
1521
|
${bold("Setting up fx")}
|
|
@@ -1604,7 +1536,7 @@ var setupFx = async () => {
|
|
|
1604
1536
|
const entry = fxPusharyEntry(guardedArgv({ kind: "binary", path: bridge, runtime: "node" }));
|
|
1605
1537
|
writeFxProfile(fxMcpProfile(), withFxPusharyServer(profile, entry));
|
|
1606
1538
|
});
|
|
1607
|
-
const settingsOutcome = configureFxSettings(fxSettings());
|
|
1539
|
+
const settingsOutcome = configureFxSettings(fxSettings(), fxQuestionRuleReceipt(), process.env);
|
|
1608
1540
|
reportFxSettings(settingsOutcome);
|
|
1609
1541
|
if (teachFxToAskViaPush()) {
|
|
1610
1542
|
console.log(` ${check} Teaching fx to ask via push (${fxAgentsMd()})`);
|
|
@@ -1902,7 +1834,7 @@ var AGENT_SETUP = {
|
|
|
1902
1834
|
};
|
|
1903
1835
|
var PROJECT_INSTRUCTION_TARGETS = {
|
|
1904
1836
|
claude_code: { file: "CLAUDE.md", label: "Claude Code" },
|
|
1905
|
-
codex: { file: "AGENTS.md", label:
|
|
1837
|
+
codex: { file: "AGENTS.md", label: SHARED_AGENTS_MD_LABEL }
|
|
1906
1838
|
};
|
|
1907
1839
|
var offerProjectInstructions = async (agents, options) => {
|
|
1908
1840
|
const targets = agents.map((agent) => PROJECT_INSTRUCTION_TARGETS[agent]).filter((target) => target !== void 0);
|
|
@@ -2112,6 +2044,7 @@ var reportDryRun = (apiKey, agents, keyCheck, controlMode) => {
|
|
|
2112
2044
|
console.log();
|
|
2113
2045
|
console.log(` ${bold("Also, on a real run")}`);
|
|
2114
2046
|
for (const line of describeSetupSideEffects({
|
|
2047
|
+
globalPackage: plannedGlobalPackage(),
|
|
2115
2048
|
version: getPackageVersion(),
|
|
2116
2049
|
configFile: PUSHARY_CONFIG_FILE,
|
|
2117
2050
|
rcPath: rc?.path ?? null,
|
|
@@ -2399,7 +2332,7 @@ var main = async () => {
|
|
|
2399
2332
|
const failure = describedAgentFailure(agent, "not-wired");
|
|
2400
2333
|
failures.push(failure);
|
|
2401
2334
|
console.log(` ${yellow("!")} ${AGENT_NAMES[agent]} ${failure.detail}`);
|
|
2402
|
-
console.log(` ${dim("Re-run setup, then")} ${cyan(
|
|
2335
|
+
console.log(` ${dim("Re-run setup, then")} ${cyan(`${NPX_LATEST_COMMAND} doctor`)} ${dim("to see what is missing.")}`);
|
|
2403
2336
|
}
|
|
2404
2337
|
} catch (err) {
|
|
2405
2338
|
const failure = agentFailureFromError(agent, err, formatError);
|
|
@@ -2419,7 +2352,7 @@ var main = async () => {
|
|
|
2419
2352
|
console.log(` ${yellow("!")} Failed: ${failedAgentNames(failures).join(", ")}${configured ? ` ${dim(configured)}` : ""}`);
|
|
2420
2353
|
for (const followUp of agentFailureFollowUps(failures)) {
|
|
2421
2354
|
if (followUp === "install-node") console.log(` ${INSTALL_NODE_STEP}`);
|
|
2422
|
-
else console.log(` ${dim("Run")}
|
|
2355
|
+
else console.log(` ${dim("Run")} ${NPX_LATEST_COMMAND} doctor ${dim("for the reason, or send it to")} ${SUPPORT_EMAIL}`);
|
|
2423
2356
|
}
|
|
2424
2357
|
}
|
|
2425
2358
|
markStep("project-instructions");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7ITOAMCD.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-CB23AO4D.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-ON5JW2HP.js";
|
|
12
|
+
import "../chunk-35X5UDML.js";
|
|
13
|
+
import "../chunk-5YY3IJT4.js";
|
|
14
14
|
|
|
15
15
|
// bin/pushary-stats.ts
|
|
16
16
|
exitOnHelpFlag("stats");
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
describeLastSeen,
|
|
4
4
|
listMachines
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-TKQ6LZQZ.js";
|
|
6
|
+
import "../chunk-VZMIHERK.js";
|
|
7
|
+
import "../chunk-EIGJYCOE.js";
|
|
8
8
|
import "../chunk-XHKBHWLX.js";
|
|
9
9
|
import {
|
|
10
10
|
describeReach,
|
|
11
11
|
fetchChannels,
|
|
12
12
|
reachVerdict
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-INSMZNS7.js";
|
|
14
14
|
import "../chunk-3EGEA4KH.js";
|
|
15
15
|
import "../chunk-QCGNGEGE.js";
|
|
16
16
|
import {
|
|
@@ -18,32 +18,32 @@ import {
|
|
|
18
18
|
} from "../chunk-U4TMAANR.js";
|
|
19
19
|
import {
|
|
20
20
|
exitOnHelpFlag
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-CB23AO4D.js";
|
|
22
22
|
import {
|
|
23
23
|
rejectUnknownFlags
|
|
24
24
|
} from "../chunk-GMXKITVA.js";
|
|
25
25
|
import {
|
|
26
26
|
readKeySource
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-TJMAXQ5Q.js";
|
|
28
|
+
import "../chunk-I4HKMUZQ.js";
|
|
29
29
|
import {
|
|
30
30
|
checkApiKey,
|
|
31
31
|
describeKeyCheck
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-DVW2MYCM.js";
|
|
33
|
+
import "../chunk-2SLCHCVN.js";
|
|
34
|
+
import "../chunk-4A3UQERT.js";
|
|
35
35
|
import {
|
|
36
36
|
UsageError
|
|
37
37
|
} from "../chunk-7QLSKOSU.js";
|
|
38
38
|
import {
|
|
39
39
|
EXIT
|
|
40
40
|
} from "../chunk-KZERVKTD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-5Y2DY6X4.js";
|
|
42
|
+
import "../chunk-UPLV5AJF.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-ON5JW2HP.js";
|
|
45
|
+
import "../chunk-35X5UDML.js";
|
|
46
|
+
import "../chunk-5YY3IJT4.js";
|
|
47
47
|
|
|
48
48
|
// src/status.ts
|
|
49
49
|
var keySourceLine = (source) => {
|
|
@@ -2,48 +2,48 @@
|
|
|
2
2
|
import {
|
|
3
3
|
activeHookSource,
|
|
4
4
|
activeIdentity
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-QB6QYZ6B.js";
|
|
6
|
+
import "../chunk-JRQRNNGA.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-FLQPM2GQ.js";
|
|
10
|
+
import "../chunk-6TK4IY3A.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-GBNQXYN4.js";
|
|
13
|
+
import "../chunk-DLEKCAQL.js";
|
|
14
|
+
import "../chunk-MYHG7PX2.js";
|
|
15
|
+
import "../chunk-OCVVSRDA.js";
|
|
16
|
+
import "../chunk-EIGJYCOE.js";
|
|
17
|
+
import "../chunk-HTEGMMT3.js";
|
|
18
|
+
import "../chunk-HOEB6AKG.js";
|
|
19
|
+
import "../chunk-URNXU3FO.js";
|
|
20
|
+
import "../chunk-UMMCHS6P.js";
|
|
21
|
+
import "../chunk-72WOCX22.js";
|
|
22
22
|
import "../chunk-XHKBHWLX.js";
|
|
23
23
|
import {
|
|
24
24
|
handleStop,
|
|
25
25
|
handleSubagentStop,
|
|
26
26
|
isSubagentStop
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-F6NTWZZC.js";
|
|
28
28
|
import "../chunk-N6IOSZOE.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-VFFHQC7W.js";
|
|
30
|
+
import "../chunk-MMVCI6DT.js";
|
|
31
|
+
import "../chunk-KB2FTO4O.js";
|
|
32
32
|
import "../chunk-POFBE6ZY.js";
|
|
33
33
|
import "../chunk-GMXKITVA.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-TJMAXQ5Q.js";
|
|
35
|
+
import "../chunk-I4HKMUZQ.js";
|
|
36
|
+
import "../chunk-DVW2MYCM.js";
|
|
37
|
+
import "../chunk-2SLCHCVN.js";
|
|
38
|
+
import "../chunk-4A3UQERT.js";
|
|
39
39
|
import "../chunk-7QLSKOSU.js";
|
|
40
40
|
import "../chunk-KZERVKTD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-5Y2DY6X4.js";
|
|
42
|
+
import "../chunk-UPLV5AJF.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-ON5JW2HP.js";
|
|
45
|
+
import "../chunk-35X5UDML.js";
|
|
46
|
+
import "../chunk-5YY3IJT4.js";
|
|
47
47
|
|
|
48
48
|
// bin/pushary-stop-hook.ts
|
|
49
49
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -2,46 +2,46 @@
|
|
|
2
2
|
import {
|
|
3
3
|
activeHookSource,
|
|
4
4
|
activeIdentity
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-QB6QYZ6B.js";
|
|
6
|
+
import "../chunk-JRQRNNGA.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-FLQPM2GQ.js";
|
|
10
|
+
import "../chunk-6TK4IY3A.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-GBNQXYN4.js";
|
|
13
|
+
import "../chunk-DLEKCAQL.js";
|
|
14
|
+
import "../chunk-MYHG7PX2.js";
|
|
15
|
+
import "../chunk-OCVVSRDA.js";
|
|
16
|
+
import "../chunk-EIGJYCOE.js";
|
|
17
|
+
import "../chunk-HTEGMMT3.js";
|
|
18
|
+
import "../chunk-HOEB6AKG.js";
|
|
19
|
+
import "../chunk-URNXU3FO.js";
|
|
20
|
+
import "../chunk-UMMCHS6P.js";
|
|
21
|
+
import "../chunk-72WOCX22.js";
|
|
22
22
|
import "../chunk-XHKBHWLX.js";
|
|
23
23
|
import {
|
|
24
24
|
handleStopFailure
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-F6NTWZZC.js";
|
|
26
26
|
import "../chunk-N6IOSZOE.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-VFFHQC7W.js";
|
|
28
|
+
import "../chunk-MMVCI6DT.js";
|
|
29
|
+
import "../chunk-KB2FTO4O.js";
|
|
30
30
|
import "../chunk-POFBE6ZY.js";
|
|
31
31
|
import "../chunk-GMXKITVA.js";
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-TJMAXQ5Q.js";
|
|
33
|
+
import "../chunk-I4HKMUZQ.js";
|
|
34
|
+
import "../chunk-DVW2MYCM.js";
|
|
35
|
+
import "../chunk-2SLCHCVN.js";
|
|
36
|
+
import "../chunk-4A3UQERT.js";
|
|
37
37
|
import "../chunk-7QLSKOSU.js";
|
|
38
38
|
import "../chunk-KZERVKTD.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-5Y2DY6X4.js";
|
|
40
|
+
import "../chunk-UPLV5AJF.js";
|
|
41
41
|
import "../chunk-T7E75EKA.js";
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-ON5JW2HP.js";
|
|
43
|
+
import "../chunk-35X5UDML.js";
|
|
44
|
+
import "../chunk-5YY3IJT4.js";
|
|
45
45
|
|
|
46
46
|
// bin/pushary-stopfailure-hook.ts
|
|
47
47
|
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-CB23AO4D.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-ON5JW2HP.js";
|
|
21
|
+
import "../chunk-35X5UDML.js";
|
|
22
|
+
import "../chunk-5YY3IJT4.js";
|
|
23
23
|
|
|
24
24
|
// bin/pushary-suggestions.ts
|
|
25
25
|
exitOnHelpFlag("suggestions");
|