@pushary/agent-hooks 1.6.4 → 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 +19 -0
- package/README.md +3 -2
- package/dist/bin/pushary-bell-hook.js +23 -24
- package/dist/bin/pushary-bell.js +10 -11
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +173 -71
- package/dist/bin/pushary-codex-bridge.js +17 -18
- package/dist/bin/pushary-codex-hook.js +30 -31
- package/dist/bin/pushary-codex.js +12 -13
- package/dist/bin/pushary-connect.js +14 -15
- package/dist/bin/pushary-cowork.js +5 -6
- package/dist/bin/pushary-daemon.js +27 -28
- package/dist/bin/pushary-disconnect.js +17 -18
- package/dist/bin/pushary-doctor.js +104 -41
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +12 -13
- package/dist/bin/pushary-gemini-hook.js +27 -28
- package/dist/bin/pushary-hook.js +31 -32
- package/dist/bin/pushary-login.js +14 -16
- package/dist/bin/pushary-logout.js +8 -9
- package/dist/bin/pushary-mcp.d.ts +1 -0
- package/dist/bin/pushary-mcp.js +56 -0
- package/dist/bin/pushary-mode.js +10 -11
- package/dist/bin/pushary-notification-hook.js +27 -28
- package/dist/bin/pushary-opencode-hook.js +26 -27
- package/dist/bin/pushary-permission-denied-hook.js +31 -32
- package/dist/bin/pushary-permission-hook.js +30 -31
- package/dist/bin/pushary-post-hook.js +27 -28
- package/dist/bin/pushary-prompt-hook.js +27 -28
- package/dist/bin/pushary-session-end-hook.js +27 -28
- package/dist/bin/pushary-session-start-hook.js +31 -32
- package/dist/bin/pushary-setup.js +235 -100
- package/dist/bin/pushary-stats.js +5 -6
- package/dist/bin/pushary-status.js +16 -17
- package/dist/bin/pushary-stop-hook.js +27 -28
- package/dist/bin/pushary-stopfailure-hook.js +27 -28
- package/dist/bin/pushary-suggestions.js +5 -5
- package/dist/bin/pushary-transcript-register.js +19 -20
- package/dist/bin/pushary-transcripts.js +7 -8
- package/dist/bin/pushary-upgrade.js +20 -21
- package/dist/bin/pushary-wait.js +10 -11
- package/dist/bin/pushary.js +6 -7
- package/dist/chunk-2FU43B5Q.js +120 -0
- package/dist/{chunk-6NLWK6ZV.js → chunk-3QE3BHBW.js} +2 -2
- package/dist/{chunk-NYMPLNV3.js → chunk-3QORH5EJ.js} +3 -3
- package/dist/{chunk-LFMOYHPY.js → chunk-3T35OE7C.js} +2 -2
- package/dist/{chunk-5U3FJ6YF.js → chunk-42XR73I2.js} +8 -8
- package/dist/{chunk-UGKDBJJX.js → chunk-43SSQCWO.js} +3 -3
- package/dist/{chunk-K32C2RGK.js → chunk-454KMJHF.js} +17 -9
- package/dist/{chunk-YUGGNZSF.js → chunk-4C4NRDIC.js} +1 -1
- package/dist/{chunk-HUB4Q35G.js → chunk-55RO62FV.js} +1 -1
- package/dist/{chunk-YQMFGWBD.js → chunk-62TEPRWQ.js} +1 -1
- package/dist/{chunk-P4BNYJ5Q.js → chunk-6PV2JQ64.js} +2 -2
- package/dist/{chunk-53DN77WB.js → chunk-6SJQ442W.js} +2 -2
- package/dist/{chunk-UAP556WK.js → chunk-7GI6QC3M.js} +2 -2
- package/dist/{chunk-D3K2FPPJ.js → chunk-7GYGVQBU.js} +8 -8
- package/dist/{chunk-OZE2TQX5.js → chunk-AAGLDXH4.js} +5 -5
- package/dist/{chunk-XJG2FUWS.js → chunk-AHWJHLG5.js} +9 -30
- package/dist/{chunk-P4UYILQK.js → chunk-BYVB3RX3.js} +2 -2
- package/dist/{chunk-EA3IELHP.js → chunk-EIZW73P5.js} +6 -2
- package/dist/{chunk-BY2CRWBO.js → chunk-H6JV44TE.js} +1 -1
- package/dist/{chunk-3LU74H52.js → chunk-IGBDOZUO.js} +1 -1
- package/dist/{chunk-N62KAMMY.js → chunk-JMBG47WV.js} +30 -1
- package/dist/{chunk-DESAUCH2.js → chunk-JTQDP4ZL.js} +4 -6
- package/dist/{chunk-LJEL7IB5.js → chunk-KBLIVEFJ.js} +5 -5
- package/dist/{chunk-VOCZHOXV.js → chunk-KSNAAMU5.js} +4 -4
- package/dist/{chunk-5UWV5GHM.js → chunk-MCNS4725.js} +1 -1
- package/dist/{chunk-I3XJATMR.js → chunk-MWVCDP64.js} +1 -1
- package/dist/chunk-NAAZCNKI.js +757 -0
- package/dist/{chunk-3VZX4NSP.js → chunk-NID4UZDN.js} +1 -1
- package/dist/{chunk-BJENQBMH.js → chunk-NQFGVAT6.js} +8 -4
- package/dist/{chunk-XOMH53NB.js → chunk-O5JD7UI5.js} +1 -1
- package/dist/{chunk-5RUIFDTP.js → chunk-O5PRIYFZ.js} +30 -2
- package/dist/{chunk-OSJEMXSR.js → chunk-OAL44FM2.js} +1 -1
- package/dist/{chunk-66H2QQAK.js → chunk-OTZHT34O.js} +1 -1
- package/dist/{chunk-DZTKLE7Q.js → chunk-P5CBNSYL.js} +1 -1
- package/dist/{chunk-GBL4BTG3.js → chunk-Q7QRR6YL.js} +2 -2
- package/dist/{chunk-YPONELWS.js → chunk-QPR33SHS.js} +6 -6
- package/dist/{chunk-LDRGVXLR.js → chunk-SNWNA3MQ.js} +1 -1
- package/dist/{chunk-5SWQZ6HY.js → chunk-SVEMF2VO.js} +4 -4
- package/dist/{chunk-VHNDE3ZD.js → chunk-UPKP67TA.js} +2 -2
- package/dist/{chunk-PJF7L7AA.js → chunk-VCMFKZON.js} +2 -2
- package/dist/{chunk-H6XU22TN.js → chunk-WM3U2RUK.js} +8 -8
- package/dist/{chunk-ZA5UXRNE.js → chunk-WSC53O7I.js} +3 -3
- package/dist/{chunk-7CLTSZOL.js → chunk-WZWXBTRF.js} +3 -3
- package/dist/{chunk-YXPGFRRW.js → chunk-XDASEYRS.js} +3 -3
- package/dist/{chunk-CAS7GFWI.js → chunk-XFNVG3OV.js} +75 -5
- package/dist/{chunk-I2YUMZLE.js → chunk-XMN37YJH.js} +1 -1
- package/dist/{chunk-LQI7W4RG.js → chunk-XPMOCJHN.js} +1 -1
- package/dist/{chunk-VA2R64I7.js → chunk-XPTCPU6V.js} +1 -1
- package/dist/{chunk-PBKEYMAO.js → chunk-Y6GKOZBT.js} +1 -1
- package/dist/{chunk-JOGA3TL2.js → chunk-YQN7S57T.js} +6 -6
- package/dist/{chunk-R4HVHTNA.js → chunk-YZKS3ME3.js} +2 -2
- package/dist/chunk-ZEMSCGDD.js +87 -0
- package/dist/{chunk-EREBZHN2.js → chunk-ZIIYTQHC.js} +4 -4
- package/dist/{reapply-4DAJKNVP.js → reapply-66GQIBXN.js} +9 -10
- package/dist/src/index.js +19 -20
- package/package.json +2 -1
- package/dist/chunk-GU3EJCVV.js +0 -43
- package/dist/chunk-HWJW3CPO.js +0 -65
- package/dist/chunk-NFH73H5B.js +0 -360
- package/dist/chunk-P32LPT2L.js +0 -6
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-WM3U2RUK.js";
|
|
5
|
+
import "../chunk-4C4NRDIC.js";
|
|
6
6
|
import {
|
|
7
7
|
askUser,
|
|
8
8
|
isDecisionStopped,
|
|
9
9
|
waitForAnswer
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-ZIIYTQHC.js";
|
|
11
|
+
import "../chunk-KSNAAMU5.js";
|
|
12
12
|
import "../chunk-POFBE6ZY.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-NQFGVAT6.js";
|
|
14
|
+
import "../chunk-JTQDP4ZL.js";
|
|
15
15
|
import {
|
|
16
16
|
getMachineId
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-P5CBNSYL.js";
|
|
18
18
|
import "../chunk-7QLSKOSU.js";
|
|
19
19
|
import "../chunk-KZERVKTD.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-UPKP67TA.js";
|
|
21
|
+
import "../chunk-454KMJHF.js";
|
|
22
22
|
import "../chunk-T7E75EKA.js";
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-CAS7GFWI.js";
|
|
25
|
+
} from "../chunk-OAL44FM2.js";
|
|
27
26
|
import {
|
|
28
27
|
NPX_LATEST_COMMAND
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-EIZW73P5.js";
|
|
29
|
+
import "../chunk-XFNVG3OV.js";
|
|
31
30
|
|
|
32
31
|
// bin/pushary-codex.ts
|
|
33
32
|
import { basename } from "path";
|
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
printKeyCheck
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3T35OE7C.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDevice,
|
|
7
7
|
connectExistingApp,
|
|
8
8
|
printConnectInstructions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-AHWJHLG5.js";
|
|
10
10
|
import "../chunk-3EGEA4KH.js";
|
|
11
11
|
import {
|
|
12
12
|
checkApiKey
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-43SSQCWO.js";
|
|
14
14
|
import "../chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
createIo
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-O5PRIYFZ.js";
|
|
18
18
|
import {
|
|
19
19
|
exitOnHelpFlag
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-6PV2JQ64.js";
|
|
21
21
|
import {
|
|
22
22
|
parseFlags
|
|
23
23
|
} from "../chunk-GMXKITVA.js";
|
|
24
24
|
import {
|
|
25
25
|
readKeySource
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
26
|
+
} from "../chunk-YZKS3ME3.js";
|
|
27
|
+
import "../chunk-NQFGVAT6.js";
|
|
28
|
+
import "../chunk-JTQDP4ZL.js";
|
|
29
|
+
import "../chunk-P5CBNSYL.js";
|
|
30
30
|
import {
|
|
31
31
|
UsageError
|
|
32
32
|
} from "../chunk-7QLSKOSU.js";
|
|
33
33
|
import {
|
|
34
34
|
EXIT
|
|
35
35
|
} from "../chunk-KZERVKTD.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-UPKP67TA.js";
|
|
37
|
+
import "../chunk-454KMJHF.js";
|
|
38
38
|
import "../chunk-T7E75EKA.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-HWJW3CPO.js";
|
|
39
|
+
import "../chunk-OAL44FM2.js";
|
|
40
|
+
import "../chunk-EIZW73P5.js";
|
|
41
|
+
import "../chunk-XFNVG3OV.js";
|
|
43
42
|
|
|
44
43
|
// bin/pushary-connect.ts
|
|
45
44
|
exitOnHelpFlag("connect");
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
coworkOutput,
|
|
4
4
|
parseCoworkOptions
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-3QE3BHBW.js";
|
|
6
6
|
import {
|
|
7
7
|
canOpenBrowser,
|
|
8
8
|
openInBrowser
|
|
9
9
|
} from "../chunk-PUZZELE6.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-XMN37YJH.js";
|
|
11
11
|
import {
|
|
12
12
|
exitOnHelpFlag
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-6PV2JQ64.js";
|
|
14
14
|
import "../chunk-GMXKITVA.js";
|
|
15
15
|
import {
|
|
16
16
|
UsageError
|
|
@@ -18,11 +18,10 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "../chunk-KZERVKTD.js";
|
|
21
|
+
import "../chunk-EIZW73P5.js";
|
|
21
22
|
import {
|
|
22
23
|
CLAUDE_CONNECTOR_GUIDE
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-EA3IELHP.js";
|
|
25
|
-
import "../chunk-HWJW3CPO.js";
|
|
24
|
+
} from "../chunk-XFNVG3OV.js";
|
|
26
25
|
|
|
27
26
|
// bin/pushary-cowork.ts
|
|
28
27
|
exitOnHelpFlag("cowork");
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
inspectConfiguredManagedProviders
|
|
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
|
HEARTBEAT_INTERVAL_MS,
|
|
9
9
|
sendHeartbeat
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-YQN7S57T.js";
|
|
11
|
+
import "../chunk-WSC53O7I.js";
|
|
12
12
|
import {
|
|
13
13
|
detectProviderLiveCapabilities,
|
|
14
14
|
hasSpawnProvider,
|
|
15
15
|
resolveControlPolicy
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-Q7QRR6YL.js";
|
|
17
17
|
import {
|
|
18
18
|
SESSION_REAP_SILENCE_MS,
|
|
19
19
|
describeIdleWindow,
|
|
@@ -21,15 +21,15 @@ import {
|
|
|
21
21
|
listProcessProofs,
|
|
22
22
|
ownsLiveProcess,
|
|
23
23
|
silentSpawnedProofs
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-SNWNA3MQ.js";
|
|
25
25
|
import {
|
|
26
26
|
startRegisteredTranscripts
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-7GYGVQBU.js";
|
|
28
28
|
import "../chunk-SGZJ5LYH.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-SVEMF2VO.js";
|
|
30
|
+
import "../chunk-XMN37YJH.js";
|
|
31
|
+
import "../chunk-MWVCDP64.js";
|
|
32
|
+
import "../chunk-XDASEYRS.js";
|
|
33
33
|
import {
|
|
34
34
|
DAEMON_LEASE_RENEW_INTERVAL_MS,
|
|
35
35
|
acquireDaemonLease,
|
|
@@ -46,47 +46,46 @@ import {
|
|
|
46
46
|
requestDaemonHandoff,
|
|
47
47
|
stopDaemonRunning,
|
|
48
48
|
writeDaemonNeedsLogin
|
|
49
|
-
} from "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
54
|
-
import "../chunk-
|
|
49
|
+
} from "../chunk-AAGLDXH4.js";
|
|
50
|
+
import "../chunk-WZWXBTRF.js";
|
|
51
|
+
import "../chunk-XPMOCJHN.js";
|
|
52
|
+
import "../chunk-O5JD7UI5.js";
|
|
53
|
+
import "../chunk-OTZHT34O.js";
|
|
54
|
+
import "../chunk-XPTCPU6V.js";
|
|
55
55
|
import {
|
|
56
56
|
spawnClaude
|
|
57
57
|
} from "../chunk-XHKBHWLX.js";
|
|
58
|
-
import "../chunk-
|
|
58
|
+
import "../chunk-4C4NRDIC.js";
|
|
59
59
|
import {
|
|
60
60
|
writeHuman
|
|
61
61
|
} from "../chunk-QCGNGEGE.js";
|
|
62
62
|
import {
|
|
63
63
|
exitOnHelpFlag
|
|
64
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-6PV2JQ64.js";
|
|
65
65
|
import "../chunk-GMXKITVA.js";
|
|
66
66
|
import {
|
|
67
67
|
readControlMode
|
|
68
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-YZKS3ME3.js";
|
|
69
69
|
import {
|
|
70
70
|
getMachineId
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-P5CBNSYL.js";
|
|
72
72
|
import "../chunk-7QLSKOSU.js";
|
|
73
73
|
import {
|
|
74
74
|
EXIT
|
|
75
75
|
} from "../chunk-KZERVKTD.js";
|
|
76
|
-
import "../chunk-
|
|
76
|
+
import "../chunk-UPKP67TA.js";
|
|
77
77
|
import {
|
|
78
78
|
resolveBinary
|
|
79
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-454KMJHF.js";
|
|
80
80
|
import "../chunk-T7E75EKA.js";
|
|
81
81
|
import {
|
|
82
82
|
getApiKey,
|
|
83
83
|
getBaseUrl
|
|
84
|
-
} from "../chunk-
|
|
85
|
-
import "../chunk-CAS7GFWI.js";
|
|
84
|
+
} from "../chunk-OAL44FM2.js";
|
|
86
85
|
import {
|
|
87
86
|
NPX_LATEST_COMMAND
|
|
88
|
-
} from "../chunk-
|
|
89
|
-
import "../chunk-
|
|
87
|
+
} from "../chunk-EIZW73P5.js";
|
|
88
|
+
import "../chunk-XFNVG3OV.js";
|
|
90
89
|
|
|
91
90
|
// src/spawn-daemon.ts
|
|
92
91
|
import { execFileSync, spawn } from "child_process";
|
|
@@ -8,38 +8,38 @@ import {
|
|
|
8
8
|
openCodePluginDir,
|
|
9
9
|
openCodePluginFile,
|
|
10
10
|
removeOpenCodeMcpServer
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-NID4UZDN.js";
|
|
12
12
|
import {
|
|
13
13
|
compatibleConfigFile,
|
|
14
14
|
compatibleMcpFile,
|
|
15
15
|
compatiblePermissionRuleFile,
|
|
16
16
|
removeCompatibleHooks,
|
|
17
17
|
removeCompatibleMcpServer
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-KBLIVEFJ.js";
|
|
19
19
|
import {
|
|
20
20
|
isClaudeMcpSnapshot,
|
|
21
21
|
removeClaudeMcpServers,
|
|
22
22
|
removePusharySettings,
|
|
23
23
|
removePusharyToolPermissions,
|
|
24
24
|
restoreClaudeMcpServer
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-WSC53O7I.js";
|
|
26
26
|
import {
|
|
27
27
|
removeGeminiSettings
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-WZWXBTRF.js";
|
|
29
|
+
import "../chunk-WM3U2RUK.js";
|
|
30
|
+
import "../chunk-4C4NRDIC.js";
|
|
31
|
+
import "../chunk-ZIIYTQHC.js";
|
|
32
|
+
import "../chunk-KSNAAMU5.js";
|
|
33
33
|
import "../chunk-POFBE6ZY.js";
|
|
34
34
|
import {
|
|
35
35
|
exitOnHelpFlag
|
|
36
|
-
} from "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
36
|
+
} from "../chunk-6PV2JQ64.js";
|
|
37
|
+
import "../chunk-NQFGVAT6.js";
|
|
38
|
+
import "../chunk-JTQDP4ZL.js";
|
|
39
|
+
import "../chunk-P5CBNSYL.js";
|
|
40
40
|
import "../chunk-7QLSKOSU.js";
|
|
41
41
|
import "../chunk-KZERVKTD.js";
|
|
42
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-UPKP67TA.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeJson,
|
|
45
45
|
claudeMcpReceipt,
|
|
@@ -53,15 +53,14 @@ import {
|
|
|
53
53
|
geminiSettings,
|
|
54
54
|
removeCodexHooks,
|
|
55
55
|
removeCodexSettings
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-454KMJHF.js";
|
|
57
57
|
import "../chunk-T7E75EKA.js";
|
|
58
|
-
import "../chunk-
|
|
58
|
+
import "../chunk-OAL44FM2.js";
|
|
59
|
+
import "../chunk-EIZW73P5.js";
|
|
59
60
|
import {
|
|
60
61
|
DISCONNECTABLE_AGENTS,
|
|
61
62
|
hookCompatibleProfileBySource
|
|
62
|
-
} from "../chunk-
|
|
63
|
-
import "../chunk-EA3IELHP.js";
|
|
64
|
-
import "../chunk-HWJW3CPO.js";
|
|
63
|
+
} from "../chunk-XFNVG3OV.js";
|
|
65
64
|
|
|
66
65
|
// bin/pushary-disconnect.ts
|
|
67
66
|
import { readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -4,48 +4,60 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
readServiceExecPath,
|
|
7
|
+
retryAgentCommand,
|
|
7
8
|
versionManagerOf
|
|
8
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-ZEMSCGDD.js";
|
|
9
10
|
import {
|
|
10
11
|
assessCodexHookTrust,
|
|
11
12
|
readCodexTrustForPusharyHooks
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-6SJQ442W.js";
|
|
13
14
|
import {
|
|
14
15
|
readMachineReadiness,
|
|
15
16
|
readManagedControlEvidence
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import {
|
|
18
|
-
CURSOR_GATE_SCRIPT
|
|
19
|
-
} from "../chunk-P32LPT2L.js";
|
|
17
|
+
} from "../chunk-YQN7S57T.js";
|
|
20
18
|
import {
|
|
19
|
+
FX_PROFILE_REFUSALS,
|
|
20
|
+
FX_PUSHARY_TOOLS_RULE,
|
|
21
|
+
FX_QUESTION_TOOL,
|
|
22
|
+
FX_SETTINGS_REFUSALS,
|
|
21
23
|
agentProbes,
|
|
22
24
|
detectAgent,
|
|
23
25
|
detectAllAgents,
|
|
26
|
+
fxBridgeTargetOf,
|
|
27
|
+
fxPusharyEntryOf,
|
|
28
|
+
fxQuestionRouting,
|
|
24
29
|
hasInstructionBlock,
|
|
25
30
|
isDetected,
|
|
31
|
+
isFxPusharyEntry,
|
|
26
32
|
isPluginRegistered,
|
|
33
|
+
pusharyToolsAllowed,
|
|
34
|
+
readFxFile,
|
|
35
|
+
readFxProfile,
|
|
36
|
+
readFxSettings,
|
|
27
37
|
shortenHome,
|
|
28
|
-
vscodeSettingsTargets
|
|
29
|
-
|
|
38
|
+
vscodeSettingsTargets,
|
|
39
|
+
workspacesShowingQuestionTool
|
|
40
|
+
} from "../chunk-NAAZCNKI.js";
|
|
41
|
+
import "../chunk-2FU43B5Q.js";
|
|
30
42
|
import {
|
|
31
43
|
OPENCODE_PLUGIN_PLACEHOLDER,
|
|
32
44
|
openCodePluginDir,
|
|
33
45
|
openCodePluginFile,
|
|
34
46
|
openCodeWired
|
|
35
|
-
} from "../chunk-
|
|
47
|
+
} from "../chunk-NID4UZDN.js";
|
|
36
48
|
import {
|
|
37
49
|
compatibleConfigFile,
|
|
38
50
|
compatibleInstructionsFile,
|
|
39
51
|
compatibleMcpFile,
|
|
40
52
|
hasCompatibleHooks,
|
|
41
53
|
missingCompatibleHookEvents
|
|
42
|
-
} from "../chunk-
|
|
43
|
-
import "../chunk-
|
|
54
|
+
} from "../chunk-KBLIVEFJ.js";
|
|
55
|
+
import "../chunk-WSC53O7I.js";
|
|
44
56
|
import {
|
|
45
57
|
detectProviderLiveCapabilities,
|
|
46
58
|
hasSpawnProvider,
|
|
47
59
|
resolveControlPolicy
|
|
48
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-Q7QRR6YL.js";
|
|
49
61
|
import {
|
|
50
62
|
AUTO_UPDATE_DISABLE_ENV,
|
|
51
63
|
autoUpdateOffReason,
|
|
@@ -53,16 +65,16 @@ import {
|
|
|
53
65
|
describeAutoUpdateCheck,
|
|
54
66
|
readAutoUpdateState,
|
|
55
67
|
takeAutoUpdateAnnouncement
|
|
56
|
-
} from "../chunk-
|
|
68
|
+
} from "../chunk-BYVB3RX3.js";
|
|
57
69
|
import {
|
|
58
70
|
readLedgerSummary
|
|
59
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-MCNS4725.js";
|
|
60
72
|
import {
|
|
61
73
|
describeBridgeResolution,
|
|
62
74
|
isBridgeLocator,
|
|
63
75
|
liveBridgeProbe,
|
|
64
76
|
resolveBridgeStub
|
|
65
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-MWVCDP64.js";
|
|
66
78
|
import {
|
|
67
79
|
claudeOtherHolders,
|
|
68
80
|
claudeUnprovenHolds,
|
|
@@ -79,7 +91,7 @@ import {
|
|
|
79
91
|
geminiWired,
|
|
80
92
|
holdsLong,
|
|
81
93
|
pusharyHookExecutable
|
|
82
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-XDASEYRS.js";
|
|
83
95
|
import {
|
|
84
96
|
daemonHasRemoteProof,
|
|
85
97
|
daemonServiceManagerAvailable,
|
|
@@ -88,17 +100,17 @@ import {
|
|
|
88
100
|
readDaemonNeedsLogin,
|
|
89
101
|
readDaemonStatus,
|
|
90
102
|
readInstalledDaemonService
|
|
91
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-AAGLDXH4.js";
|
|
92
104
|
import {
|
|
93
105
|
GEMINI_HOOK_BINARY,
|
|
94
106
|
hasGeminiHooks,
|
|
95
107
|
missingGeminiHookEvents
|
|
96
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-WZWXBTRF.js";
|
|
97
109
|
import "../chunk-XHKBHWLX.js";
|
|
98
|
-
import "../chunk-
|
|
99
|
-
import "../chunk-
|
|
100
|
-
import "../chunk-
|
|
101
|
-
import "../chunk-
|
|
110
|
+
import "../chunk-WM3U2RUK.js";
|
|
111
|
+
import "../chunk-4C4NRDIC.js";
|
|
112
|
+
import "../chunk-ZIIYTQHC.js";
|
|
113
|
+
import "../chunk-KSNAAMU5.js";
|
|
102
114
|
import "../chunk-POFBE6ZY.js";
|
|
103
115
|
import {
|
|
104
116
|
describeReach,
|
|
@@ -107,19 +119,19 @@ import {
|
|
|
107
119
|
reachVerdict,
|
|
108
120
|
roundTripEvidence,
|
|
109
121
|
verifyRoundTrip
|
|
110
|
-
} from "../chunk-
|
|
122
|
+
} from "../chunk-AHWJHLG5.js";
|
|
111
123
|
import "../chunk-3EGEA4KH.js";
|
|
112
124
|
import {
|
|
113
125
|
checkApiKey,
|
|
114
126
|
describeKeyCheck
|
|
115
|
-
} from "../chunk-
|
|
127
|
+
} from "../chunk-43SSQCWO.js";
|
|
116
128
|
import "../chunk-QCGNGEGE.js";
|
|
117
129
|
import {
|
|
118
130
|
createIo
|
|
119
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-O5PRIYFZ.js";
|
|
120
132
|
import {
|
|
121
133
|
exitOnHelpFlag
|
|
122
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-6PV2JQ64.js";
|
|
123
135
|
import {
|
|
124
136
|
parseFlags
|
|
125
137
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -127,22 +139,22 @@ import {
|
|
|
127
139
|
keyPrefix,
|
|
128
140
|
readControlMode,
|
|
129
141
|
readKeySource
|
|
130
|
-
} from "../chunk-
|
|
142
|
+
} from "../chunk-YZKS3ME3.js";
|
|
131
143
|
import {
|
|
132
144
|
callMcpTool,
|
|
133
145
|
sendMcpRequest
|
|
134
|
-
} from "../chunk-
|
|
135
|
-
import "../chunk-
|
|
146
|
+
} from "../chunk-NQFGVAT6.js";
|
|
147
|
+
import "../chunk-JTQDP4ZL.js";
|
|
136
148
|
import {
|
|
137
149
|
getMachineId
|
|
138
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-P5CBNSYL.js";
|
|
139
151
|
import {
|
|
140
152
|
UsageError
|
|
141
153
|
} from "../chunk-7QLSKOSU.js";
|
|
142
154
|
import {
|
|
143
155
|
EXIT
|
|
144
156
|
} from "../chunk-KZERVKTD.js";
|
|
145
|
-
import "../chunk-
|
|
157
|
+
import "../chunk-UPKP67TA.js";
|
|
146
158
|
import {
|
|
147
159
|
CODEX_HOOK_EVENTS,
|
|
148
160
|
autoUpdateState,
|
|
@@ -160,18 +172,24 @@ import {
|
|
|
160
172
|
cursorUserMcp,
|
|
161
173
|
execNpm,
|
|
162
174
|
fetchLatestPublishedVersion,
|
|
175
|
+
fxMcpProfile,
|
|
176
|
+
fxSettings,
|
|
163
177
|
geminiMd,
|
|
164
178
|
geminiSettings,
|
|
165
179
|
hasCodexHooks,
|
|
166
180
|
missingCodexHookEvents,
|
|
167
181
|
pusharyConfigFile,
|
|
168
182
|
readCodexMcpAuth,
|
|
183
|
+
resolvePathBinary,
|
|
169
184
|
vscodePluginDir
|
|
170
|
-
} from "../chunk-
|
|
185
|
+
} from "../chunk-454KMJHF.js";
|
|
171
186
|
import "../chunk-T7E75EKA.js";
|
|
172
187
|
import {
|
|
173
188
|
getBaseUrl
|
|
174
|
-
} from "../chunk-
|
|
189
|
+
} from "../chunk-OAL44FM2.js";
|
|
190
|
+
import {
|
|
191
|
+
NPX_LATEST_COMMAND
|
|
192
|
+
} from "../chunk-EIZW73P5.js";
|
|
175
193
|
import {
|
|
176
194
|
AGENTS,
|
|
177
195
|
CURSOR_GATE_EVENTS,
|
|
@@ -180,17 +198,12 @@ import {
|
|
|
180
198
|
HOOK_SOURCES,
|
|
181
199
|
SUPPORT_DISCORD,
|
|
182
200
|
SUPPORT_EMAIL,
|
|
201
|
+
getPackageVersion,
|
|
183
202
|
hookActivationResult,
|
|
184
203
|
hookCompatibleProfile,
|
|
185
|
-
isHookActivationReport
|
|
186
|
-
} from "../chunk-CAS7GFWI.js";
|
|
187
|
-
import {
|
|
188
|
-
NPX_LATEST_COMMAND
|
|
189
|
-
} from "../chunk-EA3IELHP.js";
|
|
190
|
-
import {
|
|
191
|
-
getPackageVersion,
|
|
204
|
+
isHookActivationReport,
|
|
192
205
|
isNewerVersion
|
|
193
|
-
} from "../chunk-
|
|
206
|
+
} from "../chunk-XFNVG3OV.js";
|
|
194
207
|
|
|
195
208
|
// bin/pushary-doctor.ts
|
|
196
209
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -355,6 +368,9 @@ function inertRegistrations(configs, resolves) {
|
|
|
355
368
|
var describeInertRegistration = ({ named }) => `hooks here are registered for "${named}", which this CLI has no profile for, so every one of them stands aside`;
|
|
356
369
|
var inertRegistrationRemedy = () => "Upgrade with npx @pushary/agent-hooks@latest upgrade, or re-run setup to rewrite them for an agent this version knows";
|
|
357
370
|
|
|
371
|
+
// src/hooks-spec.ts
|
|
372
|
+
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
373
|
+
|
|
358
374
|
// src/diagnostics/activation.ts
|
|
359
375
|
var readHookActivation = async (apiKey, agentType, target, deps = {}) => {
|
|
360
376
|
const machineId = deps.machineId ?? getMachineId();
|
|
@@ -443,6 +459,24 @@ var CLAUDE_SETTINGS = claudeSettings();
|
|
|
443
459
|
var registeredConfigs = () => [CLAUDE_SETTINGS, codexHooksJson(), ...HOOK_COMPATIBLE_PROFILES.map((profile) => compatibleConfigFile(profile))].filter(existsSync).map((file) => ({ file, contents: readFileSync(file, "utf-8") }));
|
|
444
460
|
var SKILL_PATH = join(claudeSkillDir(), "SKILL.md");
|
|
445
461
|
var SHELL_FILES = [".zshrc", ".zprofile", ".bashrc", ".bash_profile"].map((f) => join(homedir2(), f));
|
|
462
|
+
var reportFxQuestionRouting = (routing) => {
|
|
463
|
+
if (routing === "routed") {
|
|
464
|
+
check(true, "fx: questions go through Pushary", `${FX_QUESTION_TOOL} is off in ${fxSettings()}`);
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
console.log(` ${warn} fx: questions can still stop in the terminal ${dim(`(${FX_QUESTION_ROUTING_WARNINGS[routing]})`)}`);
|
|
468
|
+
};
|
|
469
|
+
var fxSettingsProblem = (read) => {
|
|
470
|
+
if (read.kind === "missing") return `${fxSettings()} is missing, so fx runs with no Pushary rules; re-run ${retryAgentCommand("fx")}`;
|
|
471
|
+
if (read.kind === "unreadable") return `${fxSettings()} could not be read`;
|
|
472
|
+
if (read.kind === "refused") return `${fxSettings()} ${FX_SETTINGS_REFUSALS[read.reason]}`;
|
|
473
|
+
return null;
|
|
474
|
+
};
|
|
475
|
+
var FX_QUESTION_ROUTING_WARNINGS = {
|
|
476
|
+
"full-access": "full-access mode ignores permission rules, so fx's terminal question tool stays on; its instructions ask it to use Pushary instead",
|
|
477
|
+
overridden: `a rule in ${fxSettings()} keeps ${FX_QUESTION_TOOL} on; make "${FX_QUESTION_TOOL}": "deny" the last rule that matches it`
|
|
478
|
+
};
|
|
479
|
+
var fxBridgeFound = (target) => target.includes("/") ? existsSync(target) : resolvePathBinary(target) !== void 0;
|
|
446
480
|
var readJson = (path) => {
|
|
447
481
|
try {
|
|
448
482
|
return JSON.parse(readFileSync(path, "utf-8"));
|
|
@@ -1061,6 +1095,35 @@ var main = async () => {
|
|
|
1061
1095
|
} else {
|
|
1062
1096
|
skipped("OpenCode", installed("opencode") ? "installed, but Pushary is not set up for it" : "not installed");
|
|
1063
1097
|
}
|
|
1098
|
+
const fxProfile = readFxFile(fxMcpProfile(), readFxProfile);
|
|
1099
|
+
const fxEntry = fxProfile.kind === "profile" ? fxPusharyEntryOf(fxProfile.profile) : void 0;
|
|
1100
|
+
if (isFxPusharyEntry(fxEntry)) {
|
|
1101
|
+
checking("fx");
|
|
1102
|
+
check(true, "fx: Pushary MCP server configured", fxMcpProfile());
|
|
1103
|
+
const bridge = fxBridgeTargetOf(fxEntry);
|
|
1104
|
+
if (bridge) {
|
|
1105
|
+
const found = fxBridgeFound(bridge);
|
|
1106
|
+
check(found, "fx: bridge binary resolves", found ? bridge : `${bridge} is not installed or not on PATH \u2014 re-run ${retryAgentCommand("fx")}`);
|
|
1107
|
+
}
|
|
1108
|
+
const fxSettingsRead = readFxFile(fxSettings(), readFxSettings);
|
|
1109
|
+
const settingsProblem = fxSettingsProblem(fxSettingsRead);
|
|
1110
|
+
const fxSettings2 = fxSettingsRead.kind === "settings" ? fxSettingsRead.settings : {};
|
|
1111
|
+
if (settingsProblem) {
|
|
1112
|
+
console.log(` ${warn} fx: Pushary tools are not auto-allowed and questions can still stop in the terminal ${dim(`(${settingsProblem})`)}`);
|
|
1113
|
+
} else if (!pusharyToolsAllowed(fxSettings2)) {
|
|
1114
|
+
console.log(` ${warn} fx: Pushary tools are not auto-allowed ${dim(`(fx will review or prompt for each call; add "${FX_PUSHARY_TOOLS_RULE}": "allow" to permission in ${fxSettings()})`)}`);
|
|
1115
|
+
}
|
|
1116
|
+
const questionRouting = fxQuestionRouting(fxSettings2, process.env);
|
|
1117
|
+
if (settingsProblem === null) reportFxQuestionRouting(questionRouting);
|
|
1118
|
+
const workspacesShowingQuestions = workspacesShowingQuestionTool(fxSettings2);
|
|
1119
|
+
if (workspacesShowingQuestions.length > 0) {
|
|
1120
|
+
console.log(` ${warn} fx: ${workspacesShowingQuestions.length} workspace(s) replace the global rules and keep ${FX_QUESTION_TOOL} on ${dim(`(add "${FX_QUESTION_TOOL}": "deny" to their permission rules in ${fxSettings()})`)}`);
|
|
1121
|
+
}
|
|
1122
|
+
} else if (fxProfile.kind === "refused" && installed("fx")) {
|
|
1123
|
+
check(false, "fx: MCP profile", `${fxMcpProfile()} ${FX_PROFILE_REFUSALS[fxProfile.reason]} \u2014 fix it, then run ${retryAgentCommand("fx")}`);
|
|
1124
|
+
} else {
|
|
1125
|
+
skipped("fx", installed("fx") ? "installed, but Pushary is not set up for it" : "not installed");
|
|
1126
|
+
}
|
|
1064
1127
|
if (bridgeStub) {
|
|
1065
1128
|
const resolution = resolveBridgeStub(bridgeStub, liveBridgeProbe());
|
|
1066
1129
|
check(resolution.kind === "bundle", "Mac app behind pushary-bridge", describeBridgeResolution(resolution));
|