@pushary/agent-hooks 1.7.0 → 1.7.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 +11 -0
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +116 -71
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +14 -14
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +27 -27
- package/dist/bin/pushary-disconnect.js +17 -17
- package/dist/bin/pushary-doctor.js +68 -40
- package/dist/bin/pushary-elicitation-hook.js +24 -24
- package/dist/bin/pushary-gemini-bridge.js +12 -12
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +31 -31
- package/dist/bin/pushary-login.js +13 -13
- package/dist/bin/pushary-logout.js +8 -8
- package/dist/bin/pushary-mcp.js +8 -8
- package/dist/bin/pushary-mode.js +10 -10
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +31 -31
- package/dist/bin/pushary-permission-hook.js +30 -30
- package/dist/bin/pushary-post-hook.js +27 -27
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +114 -89
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +16 -16
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +5 -5
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +20 -20
- package/dist/bin/pushary-wait.js +10 -10
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-YYINL576.js → chunk-2FU43B5Q.js} +2 -2
- package/dist/{chunk-D6BULEJW.js → chunk-3QE3BHBW.js} +2 -2
- package/dist/{chunk-52NVBNJT.js → chunk-3QORH5EJ.js} +3 -3
- package/dist/{chunk-PUDBG3GM.js → chunk-3T35OE7C.js} +2 -2
- package/dist/{chunk-DVQDPI3T.js → chunk-42XR73I2.js} +8 -8
- package/dist/{chunk-X6KDKOV5.js → chunk-43SSQCWO.js} +3 -3
- package/dist/{chunk-DNJUSFBL.js → chunk-454KMJHF.js} +7 -5
- package/dist/{chunk-DZURML2D.js → chunk-4C4NRDIC.js} +1 -1
- package/dist/{chunk-6ADZQFVW.js → chunk-55RO62FV.js} +1 -1
- package/dist/{chunk-QXAK5RFU.js → chunk-62TEPRWQ.js} +1 -1
- package/dist/{chunk-2PS6QWDW.js → chunk-6PV2JQ64.js} +2 -2
- package/dist/{chunk-7OS4IHGI.js → chunk-6SJQ442W.js} +2 -2
- package/dist/{chunk-UC65FJJT.js → chunk-7GI6QC3M.js} +2 -2
- package/dist/{chunk-EAQMWJPG.js → chunk-7GYGVQBU.js} +8 -8
- package/dist/{chunk-73T6MSU5.js → chunk-AAGLDXH4.js} +5 -5
- package/dist/{chunk-HDRNWNVP.js → chunk-AHWJHLG5.js} +7 -28
- package/dist/{chunk-BWYJ6AAF.js → chunk-BYVB3RX3.js} +2 -2
- package/dist/{chunk-B3UXMSMW.js → chunk-EIZW73P5.js} +1 -1
- package/dist/{chunk-B234346F.js → chunk-H6JV44TE.js} +1 -1
- package/dist/{chunk-J2355HR7.js → chunk-IGBDOZUO.js} +1 -1
- package/dist/{chunk-DANOZVZK.js → chunk-JMBG47WV.js} +30 -1
- package/dist/{chunk-KW2RRR7D.js → chunk-JTQDP4ZL.js} +3 -3
- package/dist/{chunk-WUNZAE7I.js → chunk-KBLIVEFJ.js} +5 -5
- package/dist/{chunk-V6QRSU2G.js → chunk-KSNAAMU5.js} +4 -4
- package/dist/{chunk-2C7CCWVX.js → chunk-MCNS4725.js} +1 -1
- package/dist/{chunk-5HLTWFJ6.js → chunk-MWVCDP64.js} +1 -1
- package/dist/{chunk-L4H2Q2S4.js → chunk-NAAZCNKI.js} +153 -13
- package/dist/{chunk-B3YQANFN.js → chunk-NID4UZDN.js} +1 -1
- package/dist/{chunk-JNXVOU6Y.js → chunk-NQFGVAT6.js} +2 -2
- package/dist/{chunk-BH2SKSSK.js → chunk-O5JD7UI5.js} +1 -1
- package/dist/{chunk-5RUIFDTP.js → chunk-O5PRIYFZ.js} +30 -2
- package/dist/{chunk-V4AQBAVG.js → chunk-OAL44FM2.js} +1 -1
- package/dist/{chunk-KXMZMZD3.js → chunk-OTZHT34O.js} +1 -1
- package/dist/{chunk-XNCMT7YY.js → chunk-P5CBNSYL.js} +1 -1
- package/dist/{chunk-JXUAXO74.js → chunk-Q7QRR6YL.js} +2 -2
- package/dist/{chunk-BBKNJJVX.js → chunk-QPR33SHS.js} +6 -6
- package/dist/{chunk-LEZFOTMI.js → chunk-SNWNA3MQ.js} +1 -1
- package/dist/{chunk-R2XCLT6I.js → chunk-SVEMF2VO.js} +4 -4
- package/dist/{chunk-ROQK7IN3.js → chunk-UPKP67TA.js} +2 -2
- package/dist/{chunk-SQRWHALT.js → chunk-VCMFKZON.js} +2 -2
- package/dist/{chunk-IJ6ECPA6.js → chunk-WM3U2RUK.js} +8 -8
- package/dist/{chunk-KYQXUGH7.js → chunk-WSC53O7I.js} +3 -3
- package/dist/{chunk-ZQ7IDOKY.js → chunk-WZWXBTRF.js} +3 -3
- package/dist/{chunk-PQ4F64M2.js → chunk-XDASEYRS.js} +3 -3
- package/dist/{chunk-YROGUPOZ.js → chunk-XFNVG3OV.js} +1 -1
- package/dist/{chunk-CVALVGA7.js → chunk-XMN37YJH.js} +1 -1
- package/dist/{chunk-VKVIAZQO.js → chunk-XPMOCJHN.js} +1 -1
- package/dist/{chunk-B76WVEDX.js → chunk-XPTCPU6V.js} +1 -1
- package/dist/{chunk-O2LEPIU6.js → chunk-Y6GKOZBT.js} +1 -1
- package/dist/{chunk-4F46VIEE.js → chunk-YQN7S57T.js} +6 -6
- package/dist/{chunk-UOAQ6QMP.js → chunk-YZKS3ME3.js} +2 -2
- package/dist/{chunk-S3UD4V6W.js → chunk-ZEMSCGDD.js} +6 -1
- package/dist/{chunk-EGKXSQCY.js → chunk-ZIIYTQHC.js} +4 -4
- package/dist/{reapply-6PH3FMPX.js → reapply-66GQIBXN.js} +9 -9
- package/dist/src/index.js +19 -19
- package/package.json +1 -1
- package/dist/chunk-P32LPT2L.js +0 -6
|
@@ -5,44 +5,44 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
activeHookSource,
|
|
7
7
|
activeIdentity
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-KBLIVEFJ.js";
|
|
9
|
+
import "../chunk-WSC53O7I.js";
|
|
10
10
|
import {
|
|
11
11
|
readHookInput
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-7GI6QC3M.js";
|
|
13
|
+
import "../chunk-7GYGVQBU.js";
|
|
14
14
|
import "../chunk-SGZJ5LYH.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-SVEMF2VO.js";
|
|
16
|
+
import "../chunk-XMN37YJH.js";
|
|
17
|
+
import "../chunk-MWVCDP64.js";
|
|
18
|
+
import "../chunk-XDASEYRS.js";
|
|
19
|
+
import "../chunk-AAGLDXH4.js";
|
|
20
|
+
import "../chunk-WZWXBTRF.js";
|
|
21
|
+
import "../chunk-XPMOCJHN.js";
|
|
22
|
+
import "../chunk-O5JD7UI5.js";
|
|
23
|
+
import "../chunk-OTZHT34O.js";
|
|
24
|
+
import "../chunk-XPTCPU6V.js";
|
|
25
25
|
import "../chunk-XHKBHWLX.js";
|
|
26
26
|
import {
|
|
27
27
|
handleSessionEnd
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-WM3U2RUK.js";
|
|
29
|
+
import "../chunk-4C4NRDIC.js";
|
|
30
|
+
import "../chunk-ZIIYTQHC.js";
|
|
31
|
+
import "../chunk-KSNAAMU5.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-
|
|
34
|
+
import "../chunk-YZKS3ME3.js";
|
|
35
|
+
import "../chunk-NQFGVAT6.js";
|
|
36
|
+
import "../chunk-JTQDP4ZL.js";
|
|
37
|
+
import "../chunk-P5CBNSYL.js";
|
|
38
38
|
import "../chunk-7QLSKOSU.js";
|
|
39
39
|
import "../chunk-KZERVKTD.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-UPKP67TA.js";
|
|
41
|
+
import "../chunk-454KMJHF.js";
|
|
42
42
|
import "../chunk-T7E75EKA.js";
|
|
43
|
-
import "../chunk-
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-OAL44FM2.js";
|
|
44
|
+
import "../chunk-EIZW73P5.js";
|
|
45
|
+
import "../chunk-XFNVG3OV.js";
|
|
46
46
|
|
|
47
47
|
// bin/pushary-session-end-hook.ts
|
|
48
48
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reapplyClaudeForVersion
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-QPR33SHS.js";
|
|
5
|
+
import "../chunk-Y6GKOZBT.js";
|
|
6
|
+
import "../chunk-6SJQ442W.js";
|
|
7
7
|
import {
|
|
8
8
|
activeHookSource,
|
|
9
9
|
activeIdentity
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-KBLIVEFJ.js";
|
|
11
|
+
import "../chunk-WSC53O7I.js";
|
|
12
12
|
import {
|
|
13
13
|
triggerAutoUpdate
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-BYVB3RX3.js";
|
|
15
15
|
import {
|
|
16
16
|
readHookInput
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-7GI6QC3M.js";
|
|
18
|
+
import "../chunk-7GYGVQBU.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-SVEMF2VO.js";
|
|
21
|
+
import "../chunk-XMN37YJH.js";
|
|
22
|
+
import "../chunk-MWVCDP64.js";
|
|
23
|
+
import "../chunk-XDASEYRS.js";
|
|
24
|
+
import "../chunk-AAGLDXH4.js";
|
|
25
|
+
import "../chunk-WZWXBTRF.js";
|
|
26
|
+
import "../chunk-XPMOCJHN.js";
|
|
27
|
+
import "../chunk-O5JD7UI5.js";
|
|
28
|
+
import "../chunk-OTZHT34O.js";
|
|
29
|
+
import "../chunk-XPTCPU6V.js";
|
|
30
30
|
import "../chunk-XHKBHWLX.js";
|
|
31
31
|
import {
|
|
32
32
|
CLAUDE_CODE_AGENT,
|
|
33
33
|
handleSessionStart
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-WM3U2RUK.js";
|
|
35
|
+
import "../chunk-4C4NRDIC.js";
|
|
36
|
+
import "../chunk-ZIIYTQHC.js";
|
|
37
|
+
import "../chunk-KSNAAMU5.js";
|
|
38
38
|
import "../chunk-POFBE6ZY.js";
|
|
39
39
|
import "../chunk-GMXKITVA.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-YZKS3ME3.js";
|
|
41
|
+
import "../chunk-NQFGVAT6.js";
|
|
42
|
+
import "../chunk-JTQDP4ZL.js";
|
|
43
|
+
import "../chunk-P5CBNSYL.js";
|
|
44
44
|
import "../chunk-7QLSKOSU.js";
|
|
45
45
|
import "../chunk-KZERVKTD.js";
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-UPKP67TA.js";
|
|
47
|
+
import "../chunk-454KMJHF.js";
|
|
48
48
|
import "../chunk-T7E75EKA.js";
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-OAL44FM2.js";
|
|
50
|
+
import "../chunk-EIZW73P5.js";
|
|
51
|
+
import "../chunk-XFNVG3OV.js";
|
|
52
52
|
|
|
53
53
|
// bin/pushary-session-start-hook.ts
|
|
54
54
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -2,35 +2,37 @@
|
|
|
2
2
|
import {
|
|
3
3
|
codexTrustOutcome,
|
|
4
4
|
describeCodexTrustConfirmation
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-H6JV44TE.js";
|
|
6
6
|
import {
|
|
7
7
|
runBrowserLogin
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-62TEPRWQ.js";
|
|
9
9
|
import {
|
|
10
10
|
coworkOutput,
|
|
11
11
|
coworkSelection
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-3QE3BHBW.js";
|
|
13
13
|
import "../chunk-PUZZELE6.js";
|
|
14
14
|
import {
|
|
15
15
|
detectClaudeVersion
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-Y6GKOZBT.js";
|
|
17
17
|
import {
|
|
18
18
|
AgentConfigError,
|
|
19
|
+
afterAgentFailureNote,
|
|
19
20
|
agentFailureFromError,
|
|
20
21
|
agentFailureWire,
|
|
21
22
|
configFailureKind,
|
|
22
23
|
describeVersionManagerPin,
|
|
23
24
|
describedAgentFailure,
|
|
25
|
+
failedAgentsContext,
|
|
24
26
|
retryAgentCommand,
|
|
25
27
|
versionManagerOf
|
|
26
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-ZEMSCGDD.js";
|
|
27
29
|
import {
|
|
28
30
|
ensureCodexTrustsPusharyHooks
|
|
29
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-6SJQ442W.js";
|
|
30
32
|
import {
|
|
31
33
|
readManagedControlEvidence,
|
|
32
34
|
waitForMachineReadiness
|
|
33
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-YQN7S57T.js";
|
|
34
36
|
import {
|
|
35
37
|
HERMES_CONFIG_SCRIPT,
|
|
36
38
|
HERMES_PIP_PACKAGE,
|
|
@@ -38,12 +40,15 @@ import {
|
|
|
38
40
|
installAgentSkill,
|
|
39
41
|
installSkillViaSkillsCli,
|
|
40
42
|
isHermesConfigReceipt,
|
|
43
|
+
registerCursorGate,
|
|
41
44
|
resolveHermesPython,
|
|
42
45
|
runHermesPythonScript
|
|
43
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-JMBG47WV.js";
|
|
44
47
|
import {
|
|
45
48
|
FX_PROFILE_REFUSALS,
|
|
46
49
|
FX_PUSHARY_TOOLS_RULE,
|
|
50
|
+
FX_QUESTION_RULE_RECEIPT,
|
|
51
|
+
FX_QUESTION_TOOL,
|
|
47
52
|
FX_SETTINGS_REFUSALS,
|
|
48
53
|
FX_TOOL_DISCOVERY_NOTE,
|
|
49
54
|
describeDetection,
|
|
@@ -52,6 +57,7 @@ import {
|
|
|
52
57
|
fxProfileText,
|
|
53
58
|
fxPusharyEntry,
|
|
54
59
|
fxPusharyEntryOf,
|
|
60
|
+
fxQuestionRouting,
|
|
55
61
|
fxSettingsText,
|
|
56
62
|
isDetected,
|
|
57
63
|
isFxPusharyEntry,
|
|
@@ -66,12 +72,14 @@ import {
|
|
|
66
72
|
vscodeSettingsTargets,
|
|
67
73
|
withFxPusharyServer,
|
|
68
74
|
withPusharyToolsAllowed,
|
|
75
|
+
withQuestionsRoutedToPushary,
|
|
69
76
|
workspacesOverridingPusharyRule,
|
|
77
|
+
workspacesShowingQuestionTool,
|
|
70
78
|
writeInstructionBlock
|
|
71
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-NAAZCNKI.js";
|
|
72
80
|
import {
|
|
73
81
|
MCP_BRIDGE_BINARY
|
|
74
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-2FU43B5Q.js";
|
|
75
83
|
import {
|
|
76
84
|
OPENCODE_HOOK_BINARY,
|
|
77
85
|
addOpenCodeMcpServer,
|
|
@@ -82,7 +90,7 @@ import {
|
|
|
82
90
|
openCodePluginDir,
|
|
83
91
|
openCodePluginFile,
|
|
84
92
|
openCodeWired
|
|
85
|
-
} from "../chunk-
|
|
93
|
+
} from "../chunk-NID4UZDN.js";
|
|
86
94
|
import {
|
|
87
95
|
addCompatibleHooks,
|
|
88
96
|
addCompatibleMcpServer,
|
|
@@ -93,7 +101,7 @@ import {
|
|
|
93
101
|
compatibleMcpFile,
|
|
94
102
|
compatiblePermissionRuleFile,
|
|
95
103
|
hasCompatibleHooks
|
|
96
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-KBLIVEFJ.js";
|
|
97
105
|
import {
|
|
98
106
|
addClaudeMcpServer,
|
|
99
107
|
addPusharyHooks,
|
|
@@ -101,16 +109,16 @@ import {
|
|
|
101
109
|
captureClaudeMcpServer,
|
|
102
110
|
isClaudeMcpSnapshot,
|
|
103
111
|
updateClaudeMcpSnapshot
|
|
104
|
-
} from "../chunk-
|
|
112
|
+
} from "../chunk-WSC53O7I.js";
|
|
105
113
|
import {
|
|
106
114
|
detectProviderLiveCapabilities,
|
|
107
115
|
hasSpawnProvider,
|
|
108
116
|
resolveControlPolicy
|
|
109
|
-
} from "../chunk-
|
|
117
|
+
} from "../chunk-Q7QRR6YL.js";
|
|
110
118
|
import {
|
|
111
119
|
describeAutoUpdateAnnouncement,
|
|
112
120
|
takeAutoUpdateAnnouncement
|
|
113
|
-
} from "../chunk-
|
|
121
|
+
} from "../chunk-BYVB3RX3.js";
|
|
114
122
|
import {
|
|
115
123
|
KEEP_HINT,
|
|
116
124
|
captureHookTakeover,
|
|
@@ -120,23 +128,23 @@ import {
|
|
|
120
128
|
hookOwnerOf,
|
|
121
129
|
mcpBearerKey,
|
|
122
130
|
planHooks
|
|
123
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-SVEMF2VO.js";
|
|
124
132
|
import {
|
|
125
133
|
AGENT_CHOICES,
|
|
126
134
|
effectiveControlMode,
|
|
127
135
|
effectiveVerify,
|
|
128
136
|
parseSetupOptions
|
|
129
|
-
} from "../chunk-
|
|
137
|
+
} from "../chunk-XMN37YJH.js";
|
|
130
138
|
import {
|
|
131
139
|
liveBridgeProbe,
|
|
132
140
|
resolveBridgeStub
|
|
133
|
-
} from "../chunk-
|
|
141
|
+
} from "../chunk-MWVCDP64.js";
|
|
134
142
|
import {
|
|
135
143
|
claudeWired,
|
|
136
144
|
codexWired,
|
|
137
145
|
geminiWired,
|
|
138
146
|
pusharyHookExecutable
|
|
139
|
-
} from "../chunk-
|
|
147
|
+
} from "../chunk-XDASEYRS.js";
|
|
140
148
|
import {
|
|
141
149
|
clearDaemonNeedsLogin,
|
|
142
150
|
daemonHasRemoteProof,
|
|
@@ -149,25 +157,25 @@ import {
|
|
|
149
157
|
replaceDaemonService,
|
|
150
158
|
stopDaemonService,
|
|
151
159
|
waitForDaemonRemoteProof
|
|
152
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-AAGLDXH4.js";
|
|
153
161
|
import {
|
|
154
162
|
GEMINI_HOOK_BINARY,
|
|
155
163
|
addGeminiHooks,
|
|
156
164
|
addGeminiMcpServer,
|
|
157
165
|
compareVersion,
|
|
158
166
|
parseVersion
|
|
159
|
-
} from "../chunk-
|
|
160
|
-
import "../chunk-
|
|
167
|
+
} from "../chunk-WZWXBTRF.js";
|
|
168
|
+
import "../chunk-XPMOCJHN.js";
|
|
161
169
|
import {
|
|
162
170
|
transcriptPreferenceForSetup
|
|
163
|
-
} from "../chunk-
|
|
171
|
+
} from "../chunk-XPTCPU6V.js";
|
|
164
172
|
import "../chunk-XHKBHWLX.js";
|
|
165
173
|
import {
|
|
166
174
|
reportEvent
|
|
167
|
-
} from "../chunk-
|
|
168
|
-
import "../chunk-
|
|
169
|
-
import "../chunk-
|
|
170
|
-
import "../chunk-
|
|
175
|
+
} from "../chunk-WM3U2RUK.js";
|
|
176
|
+
import "../chunk-4C4NRDIC.js";
|
|
177
|
+
import "../chunk-ZIIYTQHC.js";
|
|
178
|
+
import "../chunk-KSNAAMU5.js";
|
|
171
179
|
import "../chunk-POFBE6ZY.js";
|
|
172
180
|
import {
|
|
173
181
|
BROWSER_CONNECT_COMMAND,
|
|
@@ -179,19 +187,20 @@ import {
|
|
|
179
187
|
printConnectInstructions,
|
|
180
188
|
roundTripEvidence,
|
|
181
189
|
verifyRoundTrip
|
|
182
|
-
} from "../chunk-
|
|
190
|
+
} from "../chunk-AHWJHLG5.js";
|
|
183
191
|
import "../chunk-3EGEA4KH.js";
|
|
184
192
|
import {
|
|
185
193
|
checkApiKey,
|
|
186
194
|
describeKeyCheck,
|
|
187
195
|
samePusharyAccount
|
|
188
|
-
} from "../chunk-
|
|
196
|
+
} from "../chunk-43SSQCWO.js";
|
|
189
197
|
import {
|
|
190
198
|
setHumanStream
|
|
191
199
|
} from "../chunk-QCGNGEGE.js";
|
|
192
200
|
import {
|
|
201
|
+
createIo,
|
|
193
202
|
useColor
|
|
194
|
-
} from "../chunk-
|
|
203
|
+
} from "../chunk-O5PRIYFZ.js";
|
|
195
204
|
import "../chunk-GMXKITVA.js";
|
|
196
205
|
import {
|
|
197
206
|
KEY_FILE_MODE,
|
|
@@ -203,17 +212,17 @@ import {
|
|
|
203
212
|
readKeySource,
|
|
204
213
|
resolveShellRc,
|
|
205
214
|
writeKey
|
|
206
|
-
} from "../chunk-
|
|
207
|
-
import "../chunk-
|
|
208
|
-
import "../chunk-
|
|
209
|
-
import "../chunk-
|
|
215
|
+
} from "../chunk-YZKS3ME3.js";
|
|
216
|
+
import "../chunk-NQFGVAT6.js";
|
|
217
|
+
import "../chunk-JTQDP4ZL.js";
|
|
218
|
+
import "../chunk-P5CBNSYL.js";
|
|
210
219
|
import {
|
|
211
220
|
UsageError
|
|
212
221
|
} from "../chunk-7QLSKOSU.js";
|
|
213
222
|
import {
|
|
214
223
|
EXIT
|
|
215
224
|
} from "../chunk-KZERVKTD.js";
|
|
216
|
-
import "../chunk-
|
|
225
|
+
import "../chunk-UPKP67TA.js";
|
|
217
226
|
import {
|
|
218
227
|
addCodexHookTrust,
|
|
219
228
|
addCodexHooks,
|
|
@@ -238,6 +247,7 @@ import {
|
|
|
238
247
|
fxAgentsMd,
|
|
239
248
|
fxConfigDir,
|
|
240
249
|
fxMcpProfile,
|
|
250
|
+
fxQuestionRuleReceipt,
|
|
241
251
|
fxSettings,
|
|
242
252
|
geminiMd,
|
|
243
253
|
geminiSettings,
|
|
@@ -251,23 +261,22 @@ import {
|
|
|
251
261
|
pusharyConfigFile,
|
|
252
262
|
pusharyDir,
|
|
253
263
|
readCodexMcpAuth,
|
|
254
|
-
registerHookEntry,
|
|
255
264
|
resolveGlobalBinDir,
|
|
256
265
|
resolveGlobalBinary,
|
|
257
266
|
vscodePluginDir,
|
|
258
267
|
vscodePluginMcp
|
|
259
|
-
} from "../chunk-
|
|
268
|
+
} from "../chunk-454KMJHF.js";
|
|
260
269
|
import {
|
|
261
270
|
backupFile,
|
|
262
271
|
readJsonSafe,
|
|
263
272
|
writeFileAtomic,
|
|
264
273
|
writeJsonAtomic
|
|
265
274
|
} from "../chunk-T7E75EKA.js";
|
|
266
|
-
import "../chunk-
|
|
275
|
+
import "../chunk-OAL44FM2.js";
|
|
267
276
|
import {
|
|
268
277
|
NPX_LATEST_COMMAND,
|
|
269
278
|
renderCommandHelp
|
|
270
|
-
} from "../chunk-
|
|
279
|
+
} from "../chunk-EIZW73P5.js";
|
|
271
280
|
import {
|
|
272
281
|
HOOK_COMPATIBLE_PROFILES,
|
|
273
282
|
HOOK_LOCATOR_BINARY,
|
|
@@ -278,7 +287,7 @@ import {
|
|
|
278
287
|
hookCompatibleProfile,
|
|
279
288
|
isNewerVersion,
|
|
280
289
|
isValidApiKey
|
|
281
|
-
} from "../chunk-
|
|
290
|
+
} from "../chunk-XFNVG3OV.js";
|
|
282
291
|
|
|
283
292
|
// bin/pushary-setup.ts
|
|
284
293
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, readdirSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -292,10 +301,6 @@ import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
|
|
|
292
301
|
// src/cli/exit.ts
|
|
293
302
|
var isExitPromptError = (err) => err instanceof Error && (err.name === "ExitPromptError" || err.message.includes("User force closed") || /force closed the prompt/i.test(err.message));
|
|
294
303
|
|
|
295
|
-
// src/cursor-config.ts
|
|
296
|
-
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(String(entry?.command ?? "")) !== null;
|
|
297
|
-
var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
|
|
298
|
-
|
|
299
304
|
// src/setup/phone-check.ts
|
|
300
305
|
var planPhoneCheck = (context) => {
|
|
301
306
|
if (context.locked) return "locked";
|
|
@@ -776,24 +781,7 @@ var formatError = (err) => {
|
|
|
776
781
|
}
|
|
777
782
|
return String(err);
|
|
778
783
|
};
|
|
779
|
-
var spinner =
|
|
780
|
-
const frames = [" ", ". ", ".. ", "..."];
|
|
781
|
-
let i = 0;
|
|
782
|
-
const interval = setInterval(() => {
|
|
783
|
-
writeHuman(`\r ${dim(frames[i++ % frames.length])} ${label}`);
|
|
784
|
-
}, 200);
|
|
785
|
-
try {
|
|
786
|
-
await fn();
|
|
787
|
-
clearInterval(interval);
|
|
788
|
-
writeHuman(`\r ${check} ${label}
|
|
789
|
-
`);
|
|
790
|
-
} catch (err) {
|
|
791
|
-
clearInterval(interval);
|
|
792
|
-
writeHuman(`\r ${yellow("!")} ${label} ${dim(`(${formatError(err)})`)}
|
|
793
|
-
`);
|
|
794
|
-
if (!options.optional) throw err;
|
|
795
|
-
}
|
|
796
|
-
};
|
|
784
|
+
var spinner = (label, fn, options = {}) => createIo(humanStream, { json: jsonMode }).spinner(label, fn, options);
|
|
797
785
|
var checkForUpdates = async (current, markAnnounced) => {
|
|
798
786
|
const announcement = takeAutoUpdateAnnouncement(autoUpdateState(), markAnnounced);
|
|
799
787
|
if (announcement) {
|
|
@@ -1505,40 +1493,76 @@ var writeFxProfile = (filePath, profile) => {
|
|
|
1505
1493
|
}
|
|
1506
1494
|
writeFileAtomic(filePath, rendered.text, KEY_FILE_MODE);
|
|
1507
1495
|
};
|
|
1508
|
-
var
|
|
1496
|
+
var FX_SETTINGS_RULES_SNIPPET = `"permission": { "${FX_PUSHARY_TOOLS_RULE}": "allow", "${FX_QUESTION_TOOL}": "deny" }`;
|
|
1509
1497
|
var fxSettingsReadRefusal = (filePath, read) => {
|
|
1510
1498
|
if (read.kind === "unreadable") return `${filePath} could not be read`;
|
|
1511
1499
|
if (read.kind === "refused") return `${filePath} ${FX_SETTINGS_REFUSALS[read.reason]}`;
|
|
1512
1500
|
return null;
|
|
1513
1501
|
};
|
|
1514
|
-
var
|
|
1502
|
+
var recordFxQuestionRule = () => {
|
|
1503
|
+
try {
|
|
1504
|
+
if (!existsSync(fxQuestionRuleReceipt())) writeJsonAtomic(fxQuestionRuleReceipt(), FX_QUESTION_RULE_RECEIPT, 384);
|
|
1505
|
+
return true;
|
|
1506
|
+
} catch {
|
|
1507
|
+
return false;
|
|
1508
|
+
}
|
|
1509
|
+
};
|
|
1510
|
+
var configureFxSettings = (filePath) => {
|
|
1515
1511
|
const read = readFxFile(filePath, readFxSettings);
|
|
1516
1512
|
const refusal = fxSettingsReadRefusal(filePath, read);
|
|
1517
1513
|
if (refusal) return { kind: "refused", detail: refusal };
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
const
|
|
1514
|
+
const allowed = withPusharyToolsAllowed(read.kind === "settings" ? read.settings : {});
|
|
1515
|
+
const routed = withQuestionsRoutedToPushary(allowed.settings);
|
|
1516
|
+
const written = {
|
|
1517
|
+
kind: "written",
|
|
1518
|
+
toolsChange: allowed.change,
|
|
1519
|
+
questionChange: routed.change,
|
|
1520
|
+
questionRouting: fxQuestionRouting(routed.settings, process.env),
|
|
1521
|
+
workspacesWithOwnRules: [.../* @__PURE__ */ new Set([...workspacesOverridingPusharyRule(routed.settings), ...workspacesShowingQuestionTool(routed.settings)])],
|
|
1522
|
+
ruleRecorded: true
|
|
1523
|
+
};
|
|
1524
|
+
if (allowed.change !== "added" && routed.change !== "added") return written;
|
|
1525
|
+
const rendered = fxSettingsText(routed.settings);
|
|
1521
1526
|
if (rendered.kind === "refused") return { kind: "refused", detail: `${filePath} would grow past the 64 KiB fx reads` };
|
|
1522
1527
|
try {
|
|
1523
1528
|
writeFileAtomic(filePath, rendered.text, KEY_FILE_MODE);
|
|
1524
1529
|
} catch (err) {
|
|
1525
1530
|
return { kind: "refused", detail: `${filePath} could not be written (${formatError(err)})` };
|
|
1526
1531
|
}
|
|
1527
|
-
return {
|
|
1532
|
+
return { ...written, ruleRecorded: routed.change !== "added" || recordFxQuestionRule() };
|
|
1533
|
+
};
|
|
1534
|
+
var FX_QUESTION_ROUTING_REPORTS = {
|
|
1535
|
+
"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.",
|
|
1536
|
+
overridden: `A rule in ${fxSettings()} keeps fx's terminal question tool on, so fx can still ask there instead of through Pushary.`
|
|
1528
1537
|
};
|
|
1529
|
-
var
|
|
1538
|
+
var FX_QUESTION_SUMMARIES = {
|
|
1539
|
+
routed: "fx's agent asks through Pushary, which reaches your phone, or the Mac notch while the Pushary Mac app runs",
|
|
1540
|
+
"full-access": "fx's agent is told to ask through Pushary, but full-access mode keeps fx's terminal prompt available to it",
|
|
1541
|
+
overridden: "fx's terminal prompt stays available, so fx's agent is only told to ask through Pushary"
|
|
1542
|
+
};
|
|
1543
|
+
var reportFxSettings = (outcome) => {
|
|
1530
1544
|
if (outcome.kind === "refused") {
|
|
1531
|
-
console.log(` ${yellow("!")} ${outcome.detail}, so Pushary tools were not auto-allowed
|
|
1532
|
-
noteManual(`Add ${
|
|
1545
|
+
console.log(` ${yellow("!")} ${outcome.detail}, so Pushary tools were not auto-allowed and fx's terminal question tool stays on.`);
|
|
1546
|
+
noteManual(`Add ${FX_SETTINGS_RULES_SNIPPET} to ${fxSettings()} so fx runs Pushary tools without a prompt and asks through Pushary.`);
|
|
1533
1547
|
return;
|
|
1534
1548
|
}
|
|
1535
|
-
if (outcome.
|
|
1549
|
+
if (outcome.toolsChange === "user-rule-kept") {
|
|
1536
1550
|
console.log(` ${yellow("!")} ${fxSettings()} already has a ${FX_PUSHARY_TOOLS_RULE} rule, so it was left as you set it.`);
|
|
1537
1551
|
} else {
|
|
1538
|
-
console.log(` ${
|
|
1552
|
+
console.log(` ${check} Auto-allowing Pushary tools (${fxSettings()})`);
|
|
1553
|
+
}
|
|
1554
|
+
if (outcome.questionRouting === "routed") {
|
|
1555
|
+
console.log(` ${check} Turning off fx's terminal question tool, so its questions go through Pushary`);
|
|
1556
|
+
} else if (outcome.questionChange === "user-rule-kept") {
|
|
1557
|
+
console.log(` ${yellow("!")} ${fxSettings()} already has a ${FX_QUESTION_TOOL} rule, so it was left as you set it and fx can still ask in the terminal.`);
|
|
1558
|
+
} else {
|
|
1559
|
+
console.log(` ${yellow("!")} ${FX_QUESTION_ROUTING_REPORTS[outcome.questionRouting]}`);
|
|
1539
1560
|
}
|
|
1540
|
-
if (outcome.
|
|
1541
|
-
console.log(` ${yellow("!")} ${
|
|
1561
|
+
if (!outcome.ruleRecorded) {
|
|
1562
|
+
console.log(` ${yellow("!")} ${fxQuestionRuleReceipt()} could not be written, so pushary clean will treat the ${FX_QUESTION_TOOL} rule as yours and leave it.`);
|
|
1563
|
+
}
|
|
1564
|
+
if (outcome.workspacesWithOwnRules.length > 0) {
|
|
1565
|
+
console.log(` ${yellow("!")} ${outcome.workspacesWithOwnRules.length} fx workspace(s) set their own permission rules, which replace the global ones there. Add "${FX_PUSHARY_TOOLS_RULE}": "allow" and "${FX_QUESTION_TOOL}": "deny" to each to route them through Pushary.`);
|
|
1542
1566
|
}
|
|
1543
1567
|
};
|
|
1544
1568
|
var teachFxToAskViaPush = () => {
|
|
@@ -1572,20 +1596,19 @@ var setupFx = async () => {
|
|
|
1572
1596
|
const entry = fxPusharyEntry(guardedArgv({ kind: "binary", path: bridge, runtime: "node" }));
|
|
1573
1597
|
writeFxProfile(fxMcpProfile(), withFxPusharyServer(profile, entry));
|
|
1574
1598
|
});
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
console.log(` ${dim("\u2022")} MCP server ${bold("pushary")} in ${fxMcpProfile()}`);
|
|
1580
|
-
console.log(` ${dim("\u2022")} It runs ${MCP_BRIDGE_BINARY}, which signs in with the key saved in ~/.pushary, so no key is written to fx's config`);
|
|
1581
|
-
reportFxToolsRule(toolsRule);
|
|
1582
|
-
if (instructionsWritten) {
|
|
1583
|
-
console.log(` ${dim("\u2022")} Instructions: ${fxAgentsMd()}`);
|
|
1599
|
+
const settingsOutcome = configureFxSettings(fxSettings());
|
|
1600
|
+
reportFxSettings(settingsOutcome);
|
|
1601
|
+
if (teachFxToAskViaPush()) {
|
|
1602
|
+
console.log(` ${check} Teaching fx to ask via push (${fxAgentsMd()})`);
|
|
1584
1603
|
} else {
|
|
1585
1604
|
console.log(` ${yellow("!")} ${fxAgentsMd()} links outside ${fxConfigDir()}, and fx ignores such a file, so no instructions were written.`);
|
|
1586
1605
|
noteManual(`Replace the ${fxAgentsMd()} symlink with a file so fx loads Pushary's instructions, then run ${retryAgentCommand("fx")}.`);
|
|
1587
1606
|
}
|
|
1588
|
-
console.log(
|
|
1607
|
+
console.log();
|
|
1608
|
+
console.log(` ${dim("What this configured:")}`);
|
|
1609
|
+
console.log(` ${dim("\u2022")} MCP server ${bold("pushary")} in ${fxMcpProfile()}, which runs ${MCP_BRIDGE_BINARY} and signs in with the key saved in ~/.pushary, so no key is written to fx's config`);
|
|
1610
|
+
console.log(` ${dim("\u2022")} Questions: ${FX_QUESTION_SUMMARIES[settingsOutcome.kind === "written" ? settingsOutcome.questionRouting : "overridden"]}`);
|
|
1611
|
+
console.log(` ${dim("\u2022")} fx cannot hand its own approval prompts to Pushary, so those still wait in the terminal`);
|
|
1589
1612
|
console.log(` ${dim("Restart fx, or run /mcp reload in a running session.")}`);
|
|
1590
1613
|
noteManual("Restart fx, or run /mcp reload in a running session.");
|
|
1591
1614
|
return "configured";
|
|
@@ -1982,7 +2005,7 @@ var AGENT_CAPABILITIES = {
|
|
|
1982
2005
|
cursor: "plugin + permission gate",
|
|
1983
2006
|
vscode: "agent plugin + permission gate",
|
|
1984
2007
|
opencode: "generated plugin + permission gate",
|
|
1985
|
-
fx: "MCP through a local bridge",
|
|
2008
|
+
fx: "MCP through a local bridge + questions via push",
|
|
1986
2009
|
...compatibleRecord((profile) => profile.mcp ? "MCP + native hooks" : "native hooks"),
|
|
1987
2010
|
custom: "any MCP or HTTP agent (Windsurf, n8n, custom)"
|
|
1988
2011
|
};
|
|
@@ -2332,7 +2355,7 @@ var main = async () => {
|
|
|
2332
2355
|
${check} API key saved. No agents configured.`);
|
|
2333
2356
|
console.log(` ${dim("Run setup again with --agents <id> when you want one wired up.")}`);
|
|
2334
2357
|
} else {
|
|
2335
|
-
for (const agent of agents) {
|
|
2358
|
+
for (const [index, agent] of agents.entries()) {
|
|
2336
2359
|
markStep(`configure:${agent}`);
|
|
2337
2360
|
try {
|
|
2338
2361
|
const ownerBefore = hookOwnerFor(agent, appBridgeAvailable);
|
|
@@ -2372,7 +2395,8 @@ var main = async () => {
|
|
|
2372
2395
|
const failure = agentFailureFromError(agent, err, formatError);
|
|
2373
2396
|
failures.push(failure);
|
|
2374
2397
|
console.log(` ${yellow("!")} ${AGENT_NAMES[agent]} setup failed: ${failure.detail}`);
|
|
2375
|
-
|
|
2398
|
+
const continuation = afterAgentFailureNote(agents.length - index - 1);
|
|
2399
|
+
if (continuation) console.log(` ${dim(continuation)}`);
|
|
2376
2400
|
}
|
|
2377
2401
|
}
|
|
2378
2402
|
if (skipped.length > 0) {
|
|
@@ -2381,7 +2405,8 @@ var main = async () => {
|
|
|
2381
2405
|
}
|
|
2382
2406
|
if (failures.length > 0) {
|
|
2383
2407
|
console.log();
|
|
2384
|
-
|
|
2408
|
+
const configured = failedAgentsContext(completed.map((agent) => AGENT_NAMES[agent]));
|
|
2409
|
+
console.log(` ${yellow("!")} Failed: ${failedAgentNames(failures).join(", ")}${configured ? ` ${dim(configured)}` : ""}`);
|
|
2385
2410
|
console.log(` ${dim("Run")} npx @pushary/agent-hooks@latest doctor ${dim("for the reason, or send it to")} ${SUPPORT_EMAIL}`);
|
|
2386
2411
|
}
|
|
2387
2412
|
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-MCNS4725.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6PV2JQ64.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-OAL44FM2.js";
|
|
12
|
+
import "../chunk-EIZW73P5.js";
|
|
13
|
+
import "../chunk-XFNVG3OV.js";
|
|
14
14
|
|
|
15
15
|
// bin/pushary-stats.ts
|
|
16
16
|
exitOnHelpFlag("stats");
|