@pushary/agent-hooks 1.7.2 → 1.8.0
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 +13 -1
- package/data/cursor-plugin/CHANGELOG.md +1 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +2 -21
- package/data/cursor-plugin/scripts/pushary-gate.test.mjs +23 -1
- package/data/cursor-plugin/scripts/redaction.mjs +51 -0
- package/data/vscode-plugin/CHANGELOG.md +1 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -21
- package/data/vscode-plugin/scripts/redaction.mjs +51 -0
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +28 -28
- package/dist/bin/pushary-clean.js +91 -107
- 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 +85 -79
- 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 +60 -127
- 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 +231 -105
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-VQDJ6KB3.js → chunk-2ABTSGFT.js} +3 -3
- package/dist/{chunk-UFNBKYWT.js → chunk-2OY3ZZ5N.js} +3 -3
- package/dist/{chunk-A6WQF7FQ.js → chunk-3EVPNIBE.js} +3 -3
- package/dist/{chunk-L6IF4JOF.js → chunk-6J2JC2RT.js} +3 -3
- package/dist/{chunk-3NSRL5E7.js → chunk-7Z7Q4GGS.js} +2 -2
- package/dist/{chunk-NYBZJ44G.js → chunk-A2A2YTMG.js} +108 -25
- package/dist/{chunk-SKEW3TQX.js → chunk-AHV4LNB5.js} +1 -1
- package/dist/{chunk-KAJT6HPI.js → chunk-AXPCESYO.js} +3 -3
- package/dist/{chunk-JMSB6CJT.js → chunk-C2WCPBF7.js} +1 -1
- package/dist/chunk-CJVVKOSR.js +73 -0
- package/dist/{chunk-2B4XCMH6.js → chunk-CULUZTWQ.js} +283 -41
- package/dist/{chunk-6QZK4O36.js → chunk-CVQYGMSR.js} +4 -4
- package/dist/{chunk-SEIZQZEE.js → chunk-D2FX3EPW.js} +1 -1
- package/dist/{chunk-LI3C2IQY.js → chunk-DB3ONZB4.js} +2 -2
- package/dist/{chunk-YU54LNC6.js → chunk-DE4Y6TCC.js} +6 -6
- package/dist/{chunk-65RN6ZCO.js → chunk-E4FJTUH4.js} +1 -1
- package/dist/{chunk-RLRDPZG4.js → chunk-EPCXUP3P.js} +3 -1
- package/dist/{chunk-OXEF6JHD.js → chunk-EX3GAPA4.js} +1 -1
- package/dist/{chunk-E3PLF7YB.js → chunk-EYK3GSRH.js} +4 -4
- package/dist/{chunk-SJN64NJX.js → chunk-GPEGOGRJ.js} +1 -1
- package/dist/chunk-GU3EJCVV.js +43 -0
- package/dist/{chunk-YNJ2H2FD.js → chunk-HQ6G3B5R.js} +2 -2
- package/dist/{chunk-6NHXKTQU.js → chunk-HZVVNGEW.js} +2 -2
- package/dist/{chunk-ZUKZJQGR.js → chunk-IPVKH2ST.js} +1 -1
- package/dist/{chunk-T3PRPFDY.js → chunk-J5TIV3J6.js} +5 -5
- package/dist/{chunk-F6BMJOSW.js → chunk-JU6W3XAU.js} +1 -1
- package/dist/{chunk-AWZNDM3B.js → chunk-JYG4B33G.js} +1 -1
- package/dist/{chunk-ZMWX5SDA.js → chunk-JZTHGAPA.js} +8 -8
- package/dist/{chunk-3RO2UWJQ.js → chunk-KGDWDSNL.js} +2 -2
- package/dist/{chunk-MY3UZO5U.js → chunk-KVQBWI5T.js} +3 -3
- package/dist/{chunk-HOIGXMI7.js → chunk-LXQ5FBBD.js} +1 -1
- package/dist/{chunk-D4OGEWLH.js → chunk-M5ICYGHT.js} +3 -3
- package/dist/{chunk-YLCSKVQQ.js → chunk-M5JDZ45W.js} +4 -4
- package/dist/{chunk-SKMWPXGV.js → chunk-MDEPU45E.js} +183 -28
- package/dist/{chunk-R7ZETVNR.js → chunk-MPWXGONV.js} +3 -3
- package/dist/{chunk-2XOHXZRC.js → chunk-NGDD6TXY.js} +20 -5
- package/dist/{chunk-WWTLAZQA.js → chunk-NQTHFF4W.js} +178 -39
- package/dist/{chunk-KLXYMPTM.js → chunk-OKXS7WDZ.js} +1 -1
- package/dist/{chunk-Q7CDBJXU.js → chunk-OLQRRFBX.js} +1 -1
- package/dist/{chunk-VSGKQ3HI.js → chunk-P7WQEVWA.js} +2 -2
- package/dist/{chunk-UUTWHVSV.js → chunk-Q7E4I6UA.js} +28 -16
- package/dist/{chunk-WXIVUIXA.js → chunk-R7437YI3.js} +2 -2
- package/dist/{chunk-5GIBNUBD.js → chunk-RHR6NARM.js} +2 -2
- package/dist/{chunk-QSZ37ROP.js → chunk-SAXBC4AZ.js} +1 -1
- package/dist/{chunk-U3MS6D5X.js → chunk-SIFVFP6T.js} +1 -1
- package/dist/{chunk-TVJYGZXB.js → chunk-SLFABHW3.js} +40 -10
- package/dist/{chunk-M2JGLFFS.js → chunk-TY4JT7W3.js} +1 -1
- package/dist/{chunk-YU4222G2.js → chunk-UI36QSBI.js} +28 -16
- package/dist/{chunk-OJRB5QKN.js → chunk-VQKRG3AC.js} +6 -6
- package/dist/{chunk-4S7CCOXB.js → chunk-WE2J62NC.js} +31 -17
- package/dist/{chunk-PWNQGITG.js → chunk-ZSZSSJCV.js} +1 -1
- package/dist/{chunk-I7B2DNVU.js → chunk-ZVSKMPBZ.js} +1 -1
- package/dist/{reapply-D6RSDYCK.js → reapply-CW3MA66V.js} +9 -9
- package/dist/src/index.js +20 -20
- package/package.json +1 -1
- package/dist/chunk-INR3RVQ3.js +0 -92
- package/dist/chunk-IZVAVXHQ.js +0 -255
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reapplyClaudeForVersion
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-VQKRG3AC.js";
|
|
5
|
+
import "../chunk-SIFVFP6T.js";
|
|
6
|
+
import "../chunk-RHR6NARM.js";
|
|
7
7
|
import {
|
|
8
8
|
activeHookSource,
|
|
9
9
|
activeIdentity
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-J5TIV3J6.js";
|
|
11
|
+
import "../chunk-AXPCESYO.js";
|
|
12
12
|
import {
|
|
13
13
|
triggerAutoUpdate
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-UI36QSBI.js";
|
|
15
15
|
import {
|
|
16
16
|
readHookInput
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-KGDWDSNL.js";
|
|
18
|
+
import "../chunk-JZTHGAPA.js";
|
|
19
19
|
import "../chunk-SGZJ5LYH.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-EYK3GSRH.js";
|
|
21
|
+
import "../chunk-ZVSKMPBZ.js";
|
|
22
|
+
import "../chunk-C2WCPBF7.js";
|
|
23
|
+
import "../chunk-6J2JC2RT.js";
|
|
24
|
+
import "../chunk-WE2J62NC.js";
|
|
25
|
+
import "../chunk-3EVPNIBE.js";
|
|
26
|
+
import "../chunk-OKXS7WDZ.js";
|
|
27
|
+
import "../chunk-MPWXGONV.js";
|
|
28
|
+
import "../chunk-SAXBC4AZ.js";
|
|
29
|
+
import "../chunk-OLQRRFBX.js";
|
|
30
30
|
import "../chunk-XHKBHWLX.js";
|
|
31
31
|
import {
|
|
32
32
|
CLAUDE_CODE_AGENT,
|
|
33
33
|
handleSessionStart
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-CULUZTWQ.js";
|
|
35
35
|
import "../chunk-N6IOSZOE.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-EPCXUP3P.js";
|
|
37
|
+
import "../chunk-NGDD6TXY.js";
|
|
38
|
+
import "../chunk-CVQYGMSR.js";
|
|
39
39
|
import "../chunk-POFBE6ZY.js";
|
|
40
40
|
import "../chunk-GMXKITVA.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-P7WQEVWA.js";
|
|
42
|
+
import "../chunk-M5ICYGHT.js";
|
|
43
|
+
import "../chunk-2ABTSGFT.js";
|
|
44
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
45
|
+
import "../chunk-LXQ5FBBD.js";
|
|
46
46
|
import "../chunk-7QLSKOSU.js";
|
|
47
47
|
import "../chunk-KZERVKTD.js";
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-DB3ONZB4.js";
|
|
49
|
+
import "../chunk-A2A2YTMG.js";
|
|
50
50
|
import "../chunk-T7E75EKA.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-GPEGOGRJ.js";
|
|
52
|
+
import "../chunk-E4FJTUH4.js";
|
|
53
|
+
import "../chunk-NQTHFF4W.js";
|
|
54
54
|
|
|
55
55
|
// bin/pushary-session-start-hook.ts
|
|
56
56
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -2,83 +2,73 @@
|
|
|
2
2
|
import {
|
|
3
3
|
codexTrustOutcome,
|
|
4
4
|
describeCodexTrustConfirmation
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-TY4JT7W3.js";
|
|
6
6
|
import {
|
|
7
7
|
runBrowserLogin
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-JYG4B33G.js";
|
|
9
9
|
import {
|
|
10
10
|
coworkOutput,
|
|
11
11
|
coworkSelection
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-7Z7Q4GGS.js";
|
|
13
13
|
import "../chunk-PUZZELE6.js";
|
|
14
14
|
import {
|
|
15
15
|
detectClaudeVersion
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-SIFVFP6T.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-RHR6NARM.js";
|
|
32
24
|
import {
|
|
33
25
|
readManagedControlEvidence,
|
|
34
26
|
waitForMachineReadiness
|
|
35
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-DE4Y6TCC.js";
|
|
36
28
|
import {
|
|
37
29
|
describeSetupSideEffects,
|
|
38
30
|
installAgentSkill,
|
|
39
31
|
installSkillViaSkillsCli,
|
|
40
32
|
registerCursorGate
|
|
41
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-KVQBWI5T.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-MDEPU45E.js";
|
|
79
69
|
import {
|
|
80
70
|
MCP_BRIDGE_BINARY
|
|
81
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-SLFABHW3.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-AHV4LNB5.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-J5TIV3J6.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-AXPCESYO.js";
|
|
112
102
|
import {
|
|
113
103
|
detectProviderLiveCapabilities,
|
|
114
104
|
hasSpawnProvider,
|
|
115
105
|
resolveControlPolicy
|
|
116
|
-
} from "../chunk-
|
|
106
|
+
} from "../chunk-HQ6G3B5R.js";
|
|
117
107
|
import {
|
|
118
108
|
describeAutoUpdateAnnouncement,
|
|
119
109
|
takeAutoUpdateAnnouncement
|
|
120
|
-
} from "../chunk-
|
|
110
|
+
} from "../chunk-UI36QSBI.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-EYK3GSRH.js";
|
|
131
121
|
import {
|
|
132
122
|
AGENT_CHOICES,
|
|
133
123
|
effectiveControlMode,
|
|
134
124
|
effectiveVerify,
|
|
135
125
|
parseSetupOptions
|
|
136
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-ZVSKMPBZ.js";
|
|
137
127
|
import {
|
|
138
128
|
liveBridgeProbe,
|
|
139
129
|
resolveBridgeStub
|
|
140
|
-
} from "../chunk-
|
|
130
|
+
} from "../chunk-C2WCPBF7.js";
|
|
141
131
|
import {
|
|
142
132
|
claudeWired,
|
|
143
133
|
codexWired,
|
|
144
134
|
geminiWired,
|
|
145
135
|
pusharyHookExecutable
|
|
146
|
-
} from "../chunk-
|
|
136
|
+
} from "../chunk-6J2JC2RT.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-WE2J62NC.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-3EVPNIBE.js";
|
|
157
|
+
import "../chunk-OKXS7WDZ.js";
|
|
168
158
|
import {
|
|
169
159
|
transcriptPreferenceForSetup
|
|
170
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-OLQRRFBX.js";
|
|
171
161
|
import "../chunk-XHKBHWLX.js";
|
|
172
162
|
import {
|
|
173
163
|
reportEvent
|
|
174
|
-
} from "../chunk-
|
|
164
|
+
} from "../chunk-CULUZTWQ.js";
|
|
175
165
|
import "../chunk-N6IOSZOE.js";
|
|
176
|
-
import "../chunk-
|
|
177
|
-
import "../chunk-
|
|
178
|
-
import "../chunk-
|
|
166
|
+
import "../chunk-EPCXUP3P.js";
|
|
167
|
+
import "../chunk-NGDD6TXY.js";
|
|
168
|
+
import "../chunk-CVQYGMSR.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-M5JDZ45W.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-P7WQEVWA.js";
|
|
202
|
+
import "../chunk-M5ICYGHT.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-2ABTSGFT.js";
|
|
208
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
209
|
+
import "../chunk-LXQ5FBBD.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-DB3ONZB4.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-A2A2YTMG.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-GPEGOGRJ.js";
|
|
278
269
|
import {
|
|
279
270
|
NPX_LATEST_COMMAND,
|
|
280
271
|
renderCommandHelp
|
|
281
|
-
} from "../chunk-
|
|
272
|
+
} from "../chunk-E4FJTUH4.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-NQTHFF4W.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,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-JU6W3XAU.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HZVVNGEW.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-GPEGOGRJ.js";
|
|
12
|
+
import "../chunk-E4FJTUH4.js";
|
|
13
|
+
import "../chunk-NQTHFF4W.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-DE4Y6TCC.js";
|
|
6
|
+
import "../chunk-HQ6G3B5R.js";
|
|
7
|
+
import "../chunk-WE2J62NC.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-M5JDZ45W.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-HZVVNGEW.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-P7WQEVWA.js";
|
|
28
|
+
import "../chunk-M5ICYGHT.js";
|
|
29
29
|
import {
|
|
30
30
|
checkApiKey,
|
|
31
31
|
describeKeyCheck
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-2ABTSGFT.js";
|
|
33
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
34
|
+
import "../chunk-LXQ5FBBD.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-DB3ONZB4.js";
|
|
42
|
+
import "../chunk-A2A2YTMG.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-GPEGOGRJ.js";
|
|
45
|
+
import "../chunk-E4FJTUH4.js";
|
|
46
|
+
import "../chunk-NQTHFF4W.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-J5TIV3J6.js";
|
|
6
|
+
import "../chunk-AXPCESYO.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-KGDWDSNL.js";
|
|
10
|
+
import "../chunk-JZTHGAPA.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-EYK3GSRH.js";
|
|
13
|
+
import "../chunk-ZVSKMPBZ.js";
|
|
14
|
+
import "../chunk-C2WCPBF7.js";
|
|
15
|
+
import "../chunk-6J2JC2RT.js";
|
|
16
|
+
import "../chunk-WE2J62NC.js";
|
|
17
|
+
import "../chunk-3EVPNIBE.js";
|
|
18
|
+
import "../chunk-OKXS7WDZ.js";
|
|
19
|
+
import "../chunk-MPWXGONV.js";
|
|
20
|
+
import "../chunk-SAXBC4AZ.js";
|
|
21
|
+
import "../chunk-OLQRRFBX.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-CULUZTWQ.js";
|
|
28
28
|
import "../chunk-N6IOSZOE.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-EPCXUP3P.js";
|
|
30
|
+
import "../chunk-NGDD6TXY.js";
|
|
31
|
+
import "../chunk-CVQYGMSR.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-P7WQEVWA.js";
|
|
35
|
+
import "../chunk-M5ICYGHT.js";
|
|
36
|
+
import "../chunk-2ABTSGFT.js";
|
|
37
|
+
import "../chunk-2OY3ZZ5N.js";
|
|
38
|
+
import "../chunk-LXQ5FBBD.js";
|
|
39
39
|
import "../chunk-7QLSKOSU.js";
|
|
40
40
|
import "../chunk-KZERVKTD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-DB3ONZB4.js";
|
|
42
|
+
import "../chunk-A2A2YTMG.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-GPEGOGRJ.js";
|
|
45
|
+
import "../chunk-E4FJTUH4.js";
|
|
46
|
+
import "../chunk-NQTHFF4W.js";
|
|
47
47
|
|
|
48
48
|
// bin/pushary-stop-hook.ts
|
|
49
49
|
var AGENT = activeIdentity(process.argv);
|