@pushary/agent-hooks 0.95.2 → 0.95.5
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 +1 -1
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +5 -0
- package/data/cursor-plugin/README.md +6 -8
- package/data/cursor-plugin/hooks/hooks.json +56 -1
- package/data/cursor-plugin/scripts/pushary-gate.mjs +120 -71
- package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
- package/data/vscode-plugin/CHANGELOG.md +5 -0
- package/data/vscode-plugin/README.md +7 -15
- package/data/vscode-plugin/hooks/hooks.json +49 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +208 -88
- package/dist/bin/pushary-bell-hook.js +20 -22
- package/dist/bin/pushary-bell.js +9 -11
- package/dist/bin/pushary-claude.js +58 -46
- package/dist/bin/pushary-clean.js +21 -20
- package/dist/bin/pushary-codex-bridge.js +120 -25
- package/dist/bin/pushary-codex-hook.js +43 -63
- package/dist/bin/pushary-codex.js +11 -10
- package/dist/bin/pushary-connect.js +8 -10
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +26 -28
- package/dist/bin/pushary-disconnect.js +11 -10
- package/dist/bin/pushary-doctor.js +25 -25
- package/dist/bin/pushary-elicitation-hook.js +30 -31
- package/dist/bin/pushary-gemini-bridge.js +9 -11
- package/dist/bin/pushary-gemini-hook.js +45 -79
- package/dist/bin/pushary-hook.js +27 -29
- package/dist/bin/pushary-login.js +57 -31
- package/dist/bin/pushary-logout.js +6 -8
- package/dist/bin/pushary-mode.js +5 -5
- package/dist/bin/pushary-notification-hook.js +22 -24
- package/dist/bin/pushary-opencode-hook.js +38 -74
- package/dist/bin/pushary-permission-denied-hook.js +25 -27
- package/dist/bin/pushary-permission-hook.js +25 -27
- package/dist/bin/pushary-post-hook.js +22 -24
- package/dist/bin/pushary-prompt-hook.js +22 -24
- package/dist/bin/pushary-session-end-hook.js +22 -24
- package/dist/bin/pushary-session-start-hook.js +25 -27
- package/dist/bin/pushary-setup.js +78 -55
- package/dist/bin/pushary-stats.js +4 -4
- package/dist/bin/pushary-status.js +10 -12
- package/dist/bin/pushary-stop-hook.js +22 -24
- package/dist/bin/pushary-stopfailure-hook.js +22 -24
- package/dist/bin/pushary-suggestions.js +2 -2
- package/dist/bin/pushary-transcript-register.js +18 -20
- package/dist/bin/pushary-transcripts.js +7 -9
- package/dist/bin/pushary-upgrade.js +17 -19
- package/dist/bin/pushary-wait.js +5 -5
- package/dist/bin/pushary.js +1 -1
- package/dist/{chunk-7LUFYRH4.js → chunk-2D7BAOMY.js} +7 -7
- package/dist/{chunk-3ZUTNTZA.js → chunk-2ZTL3PGN.js} +1 -1
- package/dist/{chunk-EPFDN2ZT.js → chunk-32RMQO5Z.js} +1 -1
- package/dist/{chunk-EZIEXHYM.js → chunk-3AJIK5AO.js} +5 -2
- package/dist/{chunk-IPHOUBTU.js → chunk-4PX4QK2Z.js} +1 -1
- package/dist/{chunk-UW4LWAWY.js → chunk-4RF52LSU.js} +8 -8
- package/dist/{chunk-UOTSWS5N.js → chunk-67YNQ3QA.js} +43 -98
- package/dist/{chunk-G4TL4YWH.js → chunk-6AEM5RCS.js} +1 -1
- package/dist/{chunk-G24SEVCI.js → chunk-6VANQN5Q.js} +3 -7
- package/dist/{chunk-CKOLDI47.js → chunk-BDI2MXTT.js} +2 -2
- package/dist/{chunk-YKLCWWEI.js → chunk-BMANRGJQ.js} +1 -1
- package/dist/{chunk-2XUPP4WM.js → chunk-CUEZMPLJ.js} +1 -1
- package/dist/{chunk-A4R6BZCK.js → chunk-D62EONG3.js} +1 -1
- package/dist/{chunk-ZDAT5KMU.js → chunk-D6PRC3YQ.js} +1 -1
- package/dist/{chunk-MOY5X6HJ.js → chunk-DLLAWCQB.js} +1 -1
- package/dist/{chunk-DSTLA2TC.js → chunk-GOPIMNVC.js} +1 -1
- package/dist/{chunk-CH6DTGQR.js → chunk-HBHEX3JQ.js} +3 -3
- package/dist/{chunk-DNVDKHQD.js → chunk-HCMM3BOW.js} +226 -58
- package/dist/{chunk-76XICHYT.js → chunk-HGUZOUB2.js} +4 -4
- package/dist/{chunk-E3NF5CL2.js → chunk-HQIVR7MM.js} +6 -3
- package/dist/{chunk-JDFB3YKG.js → chunk-I6GZX3FT.js} +3 -3
- package/dist/{chunk-3OXHYPZG.js → chunk-IM2A5H33.js} +4 -1
- package/dist/{chunk-V27AHID3.js → chunk-IVQMNLSA.js} +3 -14
- package/dist/{chunk-4LL6LG5X.js → chunk-KAVDAZ7A.js} +43 -1
- package/dist/chunk-KBITFQST.js +6 -0
- package/dist/{chunk-AMZJ3CKW.js → chunk-KI4PA7MQ.js} +1 -1
- package/dist/{chunk-IAEXPTXA.js → chunk-N4VNLISN.js} +2 -2
- package/dist/{chunk-VX3BWMC5.js → chunk-OEKFD5BC.js} +1 -1
- package/dist/{chunk-QF4RI5CD.js → chunk-OI3DJA7N.js} +1 -1
- package/dist/{chunk-WB2C7VPF.js → chunk-OW6AZDY2.js} +3 -3
- package/dist/{chunk-4XXUHWIK.js → chunk-QHWXUNMN.js} +1 -1
- package/dist/{chunk-M7WWEFG6.js → chunk-QQGNFHIK.js} +2 -2
- package/dist/{chunk-YJAQRKH5.js → chunk-RLXVW4AM.js} +1 -1
- package/dist/{chunk-GUVCYYDK.js → chunk-S5CMLR35.js} +94 -15
- package/dist/{chunk-EUAQ4YAN.js → chunk-UCS65VVR.js} +1 -1
- package/dist/{chunk-WM5XMCID.js → chunk-VOSGZ6PH.js} +4 -4
- package/dist/{chunk-QUE76J4H.js → chunk-VTO3TNIB.js} +1 -1
- package/dist/{chunk-6FAHPGCZ.js → chunk-WDKHZRAS.js} +183 -25
- package/dist/{chunk-5GLPYGKS.js → chunk-WRDLHR2F.js} +2 -2
- package/dist/{chunk-RVSEGFPD.js → chunk-XLOELLAS.js} +9 -4
- package/dist/chunk-XS33QBJA.js +112 -0
- package/dist/{chunk-FQUV5KTM.js → chunk-Z2UWFEJW.js} +8 -8
- package/dist/src/index.d.ts +8 -1
- package/dist/src/index.js +11 -12
- package/package.json +1 -1
- package/dist/chunk-BC3VCZ3E.js +0 -86
- package/dist/chunk-RER3FRTD.js +0 -265
- package/dist/chunk-X7YWD6IS.js +0 -44
|
@@ -4,42 +4,40 @@ import {
|
|
|
4
4
|
} from "../chunk-PQ4K74WL.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-OEKFD5BC.js";
|
|
8
|
+
import "../chunk-4RF52LSU.js";
|
|
9
|
+
import "../chunk-BMANRGJQ.js";
|
|
10
|
+
import "../chunk-VOSGZ6PH.js";
|
|
11
|
+
import "../chunk-2ZTL3PGN.js";
|
|
12
|
+
import "../chunk-CUEZMPLJ.js";
|
|
13
|
+
import "../chunk-HBHEX3JQ.js";
|
|
14
|
+
import "../chunk-XLOELLAS.js";
|
|
15
|
+
import "../chunk-2D7BAOMY.js";
|
|
16
|
+
import "../chunk-GOPIMNVC.js";
|
|
17
|
+
import "../chunk-3AJIK5AO.js";
|
|
18
|
+
import "../chunk-4PX4QK2Z.js";
|
|
19
19
|
import "../chunk-EQRS3SGM.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-OI3DJA7N.js";
|
|
21
21
|
import "../chunk-XHKBHWLX.js";
|
|
22
22
|
import "../chunk-L4ZCFMWW.js";
|
|
23
23
|
import {
|
|
24
24
|
handleSessionEnd
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-HCMM3BOW.js";
|
|
26
|
+
import "../chunk-XS33QBJA.js";
|
|
27
|
+
import "../chunk-BDI2MXTT.js";
|
|
28
|
+
import "../chunk-IVQMNLSA.js";
|
|
29
|
+
import "../chunk-N4VNLISN.js";
|
|
30
|
+
import "../chunk-OW6AZDY2.js";
|
|
31
31
|
import "../chunk-GMXKITVA.js";
|
|
32
32
|
import "../chunk-DINDL2CF.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-BC3VCZ3E.js";
|
|
33
|
+
import "../chunk-S5CMLR35.js";
|
|
35
34
|
import "../chunk-EYRGBYZG.js";
|
|
36
35
|
import "../chunk-SAF6HGAA.js";
|
|
37
36
|
import "../chunk-7QLSKOSU.js";
|
|
38
37
|
import "../chunk-KZERVKTD.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-4LL6LG5X.js";
|
|
38
|
+
import "../chunk-KAVDAZ7A.js";
|
|
41
39
|
import "../chunk-2UMNXADU.js";
|
|
42
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-WDKHZRAS.js";
|
|
43
41
|
|
|
44
42
|
// bin/pushary-session-end-hook.ts
|
|
45
43
|
var main = async () => {
|
|
@@ -1,47 +1,45 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reapplyClaudeForVersion
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-Z2UWFEJW.js";
|
|
5
|
+
import "../chunk-6AEM5RCS.js";
|
|
6
|
+
import "../chunk-HGUZOUB2.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
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-
|
|
9
|
+
} from "../chunk-OEKFD5BC.js";
|
|
10
|
+
import "../chunk-4RF52LSU.js";
|
|
11
|
+
import "../chunk-BMANRGJQ.js";
|
|
12
|
+
import "../chunk-VOSGZ6PH.js";
|
|
13
|
+
import "../chunk-2ZTL3PGN.js";
|
|
14
|
+
import "../chunk-CUEZMPLJ.js";
|
|
15
|
+
import "../chunk-HBHEX3JQ.js";
|
|
16
|
+
import "../chunk-XLOELLAS.js";
|
|
17
|
+
import "../chunk-2D7BAOMY.js";
|
|
18
|
+
import "../chunk-GOPIMNVC.js";
|
|
19
|
+
import "../chunk-3AJIK5AO.js";
|
|
20
|
+
import "../chunk-4PX4QK2Z.js";
|
|
21
21
|
import "../chunk-EQRS3SGM.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-OI3DJA7N.js";
|
|
23
23
|
import "../chunk-XHKBHWLX.js";
|
|
24
24
|
import "../chunk-L4ZCFMWW.js";
|
|
25
25
|
import {
|
|
26
26
|
handleSessionStart
|
|
27
|
-
} from "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-HCMM3BOW.js";
|
|
28
|
+
import "../chunk-XS33QBJA.js";
|
|
29
|
+
import "../chunk-BDI2MXTT.js";
|
|
30
|
+
import "../chunk-IVQMNLSA.js";
|
|
31
|
+
import "../chunk-N4VNLISN.js";
|
|
32
|
+
import "../chunk-OW6AZDY2.js";
|
|
33
33
|
import "../chunk-GMXKITVA.js";
|
|
34
34
|
import "../chunk-DINDL2CF.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-BC3VCZ3E.js";
|
|
35
|
+
import "../chunk-S5CMLR35.js";
|
|
37
36
|
import "../chunk-EYRGBYZG.js";
|
|
38
37
|
import "../chunk-SAF6HGAA.js";
|
|
39
38
|
import "../chunk-7QLSKOSU.js";
|
|
40
39
|
import "../chunk-KZERVKTD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-4LL6LG5X.js";
|
|
40
|
+
import "../chunk-KAVDAZ7A.js";
|
|
43
41
|
import "../chunk-2UMNXADU.js";
|
|
44
|
-
import "../chunk-
|
|
42
|
+
import "../chunk-WDKHZRAS.js";
|
|
45
43
|
|
|
46
44
|
// bin/pushary-session-start-hook.ts
|
|
47
45
|
var main = async () => {
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
coworkOutput,
|
|
7
7
|
coworkSelection
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-WRDLHR2F.js";
|
|
9
9
|
import "../chunk-PUZZELE6.js";
|
|
10
10
|
import {
|
|
11
11
|
detectClaudeVersion
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-6AEM5RCS.js";
|
|
13
13
|
import {
|
|
14
14
|
describeVersionManagerPin,
|
|
15
15
|
versionManagerOf
|
|
16
16
|
} from "../chunk-GU3EJCVV.js";
|
|
17
17
|
import {
|
|
18
18
|
waitForMachineReadiness
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-32RMQO5Z.js";
|
|
20
20
|
import {
|
|
21
21
|
HERMES_CONFIG_SCRIPT,
|
|
22
22
|
HERMES_PIP_PACKAGE,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
shortenHome,
|
|
37
37
|
vscodeSettingsTargets,
|
|
38
38
|
writeInstructionBlock
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-6VANQN5Q.js";
|
|
40
40
|
import {
|
|
41
41
|
OPENCODE_HOOK_BINARY,
|
|
42
42
|
addOpenCodeMcpServer,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
openCodePluginDir,
|
|
48
48
|
openCodePluginFile,
|
|
49
49
|
openCodeWired
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-HQIVR7MM.js";
|
|
51
51
|
import {
|
|
52
52
|
addClaudeMcpServer,
|
|
53
53
|
addPusharyHooks,
|
|
@@ -55,12 +55,12 @@ import {
|
|
|
55
55
|
captureClaudeMcpServer,
|
|
56
56
|
isClaudeMcpSnapshot,
|
|
57
57
|
updateClaudeMcpSnapshot
|
|
58
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-HGUZOUB2.js";
|
|
59
59
|
import {
|
|
60
60
|
detectProviderLiveCapabilities,
|
|
61
61
|
hasSpawnProvider,
|
|
62
62
|
resolveControlPolicy
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-IM2A5H33.js";
|
|
64
64
|
import {
|
|
65
65
|
KEEP_HINT,
|
|
66
66
|
captureHookTakeover,
|
|
@@ -70,23 +70,23 @@ import {
|
|
|
70
70
|
hookOwnerOf,
|
|
71
71
|
mcpBearerKey,
|
|
72
72
|
planHooks
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-VOSGZ6PH.js";
|
|
74
74
|
import {
|
|
75
75
|
AGENT_CHOICES,
|
|
76
76
|
effectiveControlMode,
|
|
77
77
|
effectiveVerify,
|
|
78
78
|
parseSetupOptions
|
|
79
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-2ZTL3PGN.js";
|
|
80
80
|
import {
|
|
81
81
|
liveBridgeProbe,
|
|
82
82
|
resolveBridgeStub
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-CUEZMPLJ.js";
|
|
84
84
|
import {
|
|
85
85
|
claudeWired,
|
|
86
86
|
codexWired,
|
|
87
87
|
geminiWired,
|
|
88
88
|
pusharyHookExecutable
|
|
89
|
-
} from "../chunk-
|
|
89
|
+
} from "../chunk-HBHEX3JQ.js";
|
|
90
90
|
import {
|
|
91
91
|
clearDaemonNeedsLogin,
|
|
92
92
|
daemonHasRemoteProof,
|
|
@@ -99,23 +99,23 @@ import {
|
|
|
99
99
|
replaceDaemonService,
|
|
100
100
|
stopDaemonService,
|
|
101
101
|
waitForDaemonRemoteProof
|
|
102
|
-
} from "../chunk-
|
|
102
|
+
} from "../chunk-XLOELLAS.js";
|
|
103
103
|
import {
|
|
104
104
|
GEMINI_HOOK_BINARY,
|
|
105
105
|
addGeminiHooks,
|
|
106
106
|
addGeminiMcpServer,
|
|
107
107
|
compareVersion,
|
|
108
108
|
parseVersion
|
|
109
|
-
} from "../chunk-
|
|
110
|
-
import "../chunk-
|
|
109
|
+
} from "../chunk-2D7BAOMY.js";
|
|
110
|
+
import "../chunk-GOPIMNVC.js";
|
|
111
111
|
import {
|
|
112
112
|
guardBinary,
|
|
113
113
|
guardCursorGate,
|
|
114
114
|
guardedArgv
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-3AJIK5AO.js";
|
|
116
116
|
import {
|
|
117
117
|
transcriptPreferenceForSetup
|
|
118
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-OI3DJA7N.js";
|
|
119
119
|
import "../chunk-XHKBHWLX.js";
|
|
120
120
|
import {
|
|
121
121
|
installGlobally,
|
|
@@ -125,11 +125,11 @@ import {
|
|
|
125
125
|
} from "../chunk-L4ZCFMWW.js";
|
|
126
126
|
import {
|
|
127
127
|
reportEvent
|
|
128
|
-
} from "../chunk-
|
|
129
|
-
import "../chunk-
|
|
130
|
-
import "../chunk-
|
|
131
|
-
import "../chunk-
|
|
132
|
-
import "../chunk-
|
|
128
|
+
} from "../chunk-HCMM3BOW.js";
|
|
129
|
+
import "../chunk-XS33QBJA.js";
|
|
130
|
+
import "../chunk-BDI2MXTT.js";
|
|
131
|
+
import "../chunk-IVQMNLSA.js";
|
|
132
|
+
import "../chunk-N4VNLISN.js";
|
|
133
133
|
import {
|
|
134
134
|
addCodexHookTrust,
|
|
135
135
|
addCodexHooks,
|
|
@@ -157,7 +157,7 @@ import {
|
|
|
157
157
|
readCodexMcpAuth,
|
|
158
158
|
vscodePluginDir,
|
|
159
159
|
vscodePluginMcp
|
|
160
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-OW6AZDY2.js";
|
|
161
161
|
import {
|
|
162
162
|
confirmAppConnection,
|
|
163
163
|
connectDevice,
|
|
@@ -166,13 +166,13 @@ import {
|
|
|
166
166
|
pairingEscapeApplies,
|
|
167
167
|
printConnectInstructions,
|
|
168
168
|
verifyRoundTrip
|
|
169
|
-
} from "../chunk-
|
|
169
|
+
} from "../chunk-KI4PA7MQ.js";
|
|
170
170
|
import "../chunk-3EGEA4KH.js";
|
|
171
171
|
import {
|
|
172
172
|
checkApiKey,
|
|
173
173
|
describeKeyCheck,
|
|
174
174
|
samePusharyAccount
|
|
175
|
-
} from "../chunk-
|
|
175
|
+
} from "../chunk-I6GZX3FT.js";
|
|
176
176
|
import {
|
|
177
177
|
setHumanStream
|
|
178
178
|
} from "../chunk-QCGNGEGE.js";
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
} from "../chunk-5RUIFDTP.js";
|
|
182
182
|
import {
|
|
183
183
|
renderCommandHelp
|
|
184
|
-
} from "../chunk-
|
|
184
|
+
} from "../chunk-D6PRC3YQ.js";
|
|
185
185
|
import "../chunk-GMXKITVA.js";
|
|
186
186
|
import {
|
|
187
187
|
getPackageVersion,
|
|
@@ -190,16 +190,14 @@ import {
|
|
|
190
190
|
import {
|
|
191
191
|
KEY_FILE_MODE,
|
|
192
192
|
exportLine,
|
|
193
|
+
installClaudeAlias,
|
|
193
194
|
keyPrefix,
|
|
194
195
|
readConfigFileKey,
|
|
195
196
|
readControlMode,
|
|
196
197
|
readKeySource,
|
|
198
|
+
resolveShellRc,
|
|
197
199
|
writeKey
|
|
198
|
-
} from "../chunk-
|
|
199
|
-
import {
|
|
200
|
-
installClaudeAlias,
|
|
201
|
-
resolveShellRc
|
|
202
|
-
} from "../chunk-BC3VCZ3E.js";
|
|
200
|
+
} from "../chunk-S5CMLR35.js";
|
|
203
201
|
import "../chunk-EYRGBYZG.js";
|
|
204
202
|
import "../chunk-SAF6HGAA.js";
|
|
205
203
|
import {
|
|
@@ -208,19 +206,17 @@ import {
|
|
|
208
206
|
import {
|
|
209
207
|
EXIT
|
|
210
208
|
} from "../chunk-KZERVKTD.js";
|
|
211
|
-
import "../chunk-X7YWD6IS.js";
|
|
212
209
|
import {
|
|
213
210
|
backupFile,
|
|
214
211
|
readJsonSafe,
|
|
215
212
|
writeFileAtomic,
|
|
216
213
|
writeJsonAtomic
|
|
217
|
-
} from "../chunk-
|
|
214
|
+
} from "../chunk-KAVDAZ7A.js";
|
|
218
215
|
import "../chunk-2UMNXADU.js";
|
|
219
216
|
import {
|
|
220
|
-
CURSOR_GATE_EVENTS,
|
|
221
217
|
HOOK_LOCATOR_BINARY,
|
|
222
218
|
isValidApiKey
|
|
223
|
-
} from "../chunk-
|
|
219
|
+
} from "../chunk-WDKHZRAS.js";
|
|
224
220
|
|
|
225
221
|
// bin/pushary-setup.ts
|
|
226
222
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, readdirSync, statSync, openSync, readSync, closeSync } from "fs";
|
|
@@ -249,7 +245,7 @@ var planPhoneCheck = (context) => {
|
|
|
249
245
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
250
246
|
var COMMAND_SURFACE = [
|
|
251
247
|
{ command: "pushary status", summary: "what this machine is connected to" },
|
|
252
|
-
{ command: "pushary mode", summary: "
|
|
248
|
+
{ command: "pushary mode", summary: "choose where approval requests appear" },
|
|
253
249
|
{ command: "pushary wait", summary: "block until a pending question is answered" },
|
|
254
250
|
{ command: "pushary stats", summary: "what your agents have been asking" },
|
|
255
251
|
{ command: "pushary claude", summary: "run Claude Code with encrypted transcript support" },
|
|
@@ -259,6 +255,9 @@ var SURFACE_COLUMN = Math.max(...COMMAND_SURFACE.map((entry) => entry.command.le
|
|
|
259
255
|
var renderCommandSurface = () => COMMAND_SURFACE.map((entry) => `${entry.command.padEnd(SURFACE_COLUMN)}${entry.summary}`);
|
|
260
256
|
var nextSteps = (facts, reachable) => {
|
|
261
257
|
const lines = [];
|
|
258
|
+
if (facts.staleEnvironmentKey) {
|
|
259
|
+
lines.push("Open a new terminal or unset PUSHARY_API_KEY, then run pushary doctor before starting an agent.");
|
|
260
|
+
}
|
|
262
261
|
if (facts.transcriptSync === false) {
|
|
263
262
|
lines.push("Transcripts: disabled on this machine.");
|
|
264
263
|
lines.push("pushary setup --transcripts on enable encrypted transcript sync");
|
|
@@ -298,6 +297,14 @@ var describeClosing = (facts) => {
|
|
|
298
297
|
exitCode: EXIT.PROBLEMS_FOUND
|
|
299
298
|
};
|
|
300
299
|
}
|
|
300
|
+
if (facts.staleEnvironmentKey) {
|
|
301
|
+
return {
|
|
302
|
+
ok: false,
|
|
303
|
+
headline: "Agents configured. This terminal still selects the previous key.",
|
|
304
|
+
next: nextSteps(facts, reachable),
|
|
305
|
+
exitCode: EXIT.PROBLEMS_FOUND
|
|
306
|
+
};
|
|
307
|
+
}
|
|
301
308
|
if (facts.daemonReady === false) {
|
|
302
309
|
return {
|
|
303
310
|
ok: false,
|
|
@@ -1156,7 +1163,7 @@ var installCursorUserHooks = (gateScript) => {
|
|
|
1156
1163
|
}
|
|
1157
1164
|
}
|
|
1158
1165
|
const hooks = userHooks.hooks ?? {};
|
|
1159
|
-
for (const event of
|
|
1166
|
+
for (const event of Object.keys(bundled)) {
|
|
1160
1167
|
const template = bundled[event]?.[0];
|
|
1161
1168
|
if (!template) throw new Error(`bundled Cursor hooks.json missing a ${event} entry`);
|
|
1162
1169
|
const existing = Array.isArray(hooks[event]) ? hooks[event] : [];
|
|
@@ -1170,9 +1177,16 @@ var neutralizePluginGate = () => {
|
|
|
1170
1177
|
if (!existsSync(path)) return;
|
|
1171
1178
|
const data = readJson(path);
|
|
1172
1179
|
if (!data.hooks) return;
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1180
|
+
let changed = false;
|
|
1181
|
+
for (const [event, hooks] of Object.entries(data.hooks)) {
|
|
1182
|
+
if (!Array.isArray(hooks)) continue;
|
|
1183
|
+
const others = hooks.filter((hook) => pusharyHookExecutable(String(hook?.command ?? "")) === null);
|
|
1184
|
+
if (others.length === hooks.length) continue;
|
|
1185
|
+
changed = true;
|
|
1186
|
+
if (others.length) data.hooks[event] = others;
|
|
1187
|
+
else delete data.hooks[event];
|
|
1188
|
+
}
|
|
1189
|
+
if (!changed) return;
|
|
1176
1190
|
writeJson(path, { version: data.version ?? 1, hooks: data.hooks });
|
|
1177
1191
|
};
|
|
1178
1192
|
var setupCursor = async (apiKey) => {
|
|
@@ -1350,7 +1364,6 @@ var saveApiKey = async (apiKey, controlMode, transcriptSync) => {
|
|
|
1350
1364
|
...controlMode === null ? {} : { controlMode },
|
|
1351
1365
|
transcriptsEnabled: transcriptSync
|
|
1352
1366
|
});
|
|
1353
|
-
clearDaemonNeedsLogin();
|
|
1354
1367
|
});
|
|
1355
1368
|
if (!result) throw new Error("Could not save the API key");
|
|
1356
1369
|
if (result.configBackupPath) {
|
|
@@ -1960,7 +1973,7 @@ var main = async () => {
|
|
|
1960
1973
|
}
|
|
1961
1974
|
if (!options.dryRun) recordSetupKey(trimmedKey);
|
|
1962
1975
|
markStep("verify-key");
|
|
1963
|
-
const keyCheck =
|
|
1976
|
+
const keyCheck = await verifyKeyOrExit(trimmedKey, options, storedKeyCheck ?? void 0);
|
|
1964
1977
|
markStep("resolve-agents");
|
|
1965
1978
|
const agents = await resolveAgents(options);
|
|
1966
1979
|
if (options.dryRun) {
|
|
@@ -1975,6 +1988,7 @@ var main = async () => {
|
|
|
1975
1988
|
console.log("Transcript sync: enabling locally redacted, encrypted sync for Pushary-launched sessions. Your phone can decrypt it; authorized Pushary compliance admins can recover it for documented legal obligations. Disable with pushary setup --transcripts off.");
|
|
1976
1989
|
}
|
|
1977
1990
|
const rc = await saveApiKey(trimmedKey, controlMode, transcriptSync);
|
|
1991
|
+
if (keyCheck.kind === "ok") clearDaemonNeedsLogin();
|
|
1978
1992
|
const context = { rc };
|
|
1979
1993
|
const appBridgeAvailable = resolveBridgeStub(
|
|
1980
1994
|
join3(pusharyDir(), "bin", HOOK_LOCATOR_BINARY),
|
|
@@ -1999,7 +2013,8 @@ var main = async () => {
|
|
|
1999
2013
|
]);
|
|
2000
2014
|
return samePusharyAccount(cliAccount, appAccount);
|
|
2001
2015
|
};
|
|
2002
|
-
|
|
2016
|
+
const staleEnvironmentKey = Boolean(envKey && envKey !== trimmedKey);
|
|
2017
|
+
if (envKey && staleEnvironmentKey) {
|
|
2003
2018
|
noteManual(
|
|
2004
2019
|
`This shell still exports the previous key (${keyPrefix(envKey)}), and it wins over the one just saved. Open a new terminal before starting an agent here, or re-export PUSHARY_API_KEY.`
|
|
2005
2020
|
);
|
|
@@ -2082,7 +2097,7 @@ var main = async () => {
|
|
|
2082
2097
|
const skipPhone = options.skipPhone;
|
|
2083
2098
|
let phone = null;
|
|
2084
2099
|
const verifyMode = effectiveVerify(options, { paired: keyFromPairing });
|
|
2085
|
-
const phoneCheck = planPhoneCheck({
|
|
2100
|
+
const phoneCheck = keyCheck.kind === "unreachable" ? "unverified" : planPhoneCheck({
|
|
2086
2101
|
locked: keyCheck?.kind === "locked",
|
|
2087
2102
|
skipPhone,
|
|
2088
2103
|
verify: verifyMode,
|
|
@@ -2091,6 +2106,10 @@ var main = async () => {
|
|
|
2091
2106
|
connectMode
|
|
2092
2107
|
});
|
|
2093
2108
|
switch (phoneCheck) {
|
|
2109
|
+
case "unverified":
|
|
2110
|
+
console.log();
|
|
2111
|
+
console.log(` ${dim("Skipping the delivery check: account readiness could not be verified. Re-run setup once online.")}`);
|
|
2112
|
+
break;
|
|
2094
2113
|
case "locked":
|
|
2095
2114
|
console.log();
|
|
2096
2115
|
console.log(` ${dim("Skipping the delivery check: no approval can be delivered until the plan is active.")}`);
|
|
@@ -2117,7 +2136,7 @@ var main = async () => {
|
|
|
2117
2136
|
break;
|
|
2118
2137
|
}
|
|
2119
2138
|
let roundTrip = null;
|
|
2120
|
-
if (verifyMode === "roundtrip" && keyCheck
|
|
2139
|
+
if (verifyMode === "roundtrip" && keyCheck.kind === "ok" && !skipPhone && // Reaching nobody is already reported by the delivery check above, in copy
|
|
2121
2140
|
// that names the fix. Asking a question nobody can receive would repeat it
|
|
2122
2141
|
// 55 seconds later and add nothing.
|
|
2123
2142
|
//
|
|
@@ -2136,31 +2155,34 @@ var main = async () => {
|
|
|
2136
2155
|
const report = describeRoundTrip(roundTrip);
|
|
2137
2156
|
console.log(` ${report.ok ? check : yellow("!")} ${report.message}`);
|
|
2138
2157
|
for (const line of report.next) console.log(` ${dim(line)}`);
|
|
2139
|
-
} else if (verifyMode === "roundtrip") {
|
|
2158
|
+
} else if (verifyMode === "roundtrip" && keyCheck.kind === "ok") {
|
|
2140
2159
|
console.log();
|
|
2141
2160
|
console.log(` ${dim("Skipped the round trip: nothing is connected that could answer it.")}`);
|
|
2142
2161
|
}
|
|
2143
2162
|
console.log();
|
|
2144
|
-
if (keyCheck
|
|
2163
|
+
if (keyCheck.kind === "locked" || keyCheck.kind === "unreachable") {
|
|
2145
2164
|
const report = describeKeyCheck(keyCheck);
|
|
2165
|
+
const next = [...report.next, "Finish activation: pushary setup (reuses the saved key)."];
|
|
2166
|
+
const exitCode2 = failed.length > 0 || controlLifecycleFailure ? EXIT.PROBLEMS_FOUND : report.exitCode;
|
|
2146
2167
|
printManualSteps();
|
|
2147
|
-
console.log(` ${yellow(bold("Agents configured, approvals inactive."))}`);
|
|
2168
|
+
console.log(` ${yellow(bold(keyCheck.kind === "locked" ? "Agents configured, approvals inactive." : "Configuration saved, activation unverified."))}`);
|
|
2148
2169
|
console.log();
|
|
2149
2170
|
console.log(` ${report.message}`);
|
|
2150
|
-
for (const line of
|
|
2171
|
+
for (const line of next) console.log(` ${dim(line)}`);
|
|
2151
2172
|
console.log();
|
|
2152
2173
|
emitJson(options, {
|
|
2153
2174
|
ok: false,
|
|
2154
|
-
|
|
2175
|
+
next,
|
|
2176
|
+
reason: keyCheck.kind === "locked" ? "plan_inactive" : "readiness_unverified",
|
|
2155
2177
|
configured: completed,
|
|
2156
2178
|
skipped,
|
|
2157
2179
|
manualSteps,
|
|
2158
2180
|
failed,
|
|
2159
|
-
keyCheck:
|
|
2181
|
+
keyCheck: keyCheck.kind,
|
|
2160
2182
|
rc: rc.kind,
|
|
2161
2183
|
control: controlMode,
|
|
2162
2184
|
daemon: controlLifecycleFailure ? "unavailable" : "skipped",
|
|
2163
|
-
exitCode:
|
|
2185
|
+
exitCode: exitCode2
|
|
2164
2186
|
});
|
|
2165
2187
|
await reportSetupOutcome({
|
|
2166
2188
|
options,
|
|
@@ -2168,10 +2190,10 @@ var main = async () => {
|
|
|
2168
2190
|
skipped,
|
|
2169
2191
|
failed,
|
|
2170
2192
|
connectOutcome: "skipped",
|
|
2171
|
-
keyCheck:
|
|
2172
|
-
exitCode:
|
|
2193
|
+
keyCheck: keyCheck.kind,
|
|
2194
|
+
exitCode: exitCode2
|
|
2173
2195
|
});
|
|
2174
|
-
process.exit(
|
|
2196
|
+
process.exit(exitCode2);
|
|
2175
2197
|
}
|
|
2176
2198
|
printManualSteps();
|
|
2177
2199
|
const configuredNothing = agents.length > 0 && completed.length === 0;
|
|
@@ -2179,7 +2201,7 @@ var main = async () => {
|
|
|
2179
2201
|
const reachChecked = phone !== null;
|
|
2180
2202
|
const reachesYou = phone?.reachesYou ?? true;
|
|
2181
2203
|
markStep("closing");
|
|
2182
|
-
const keyIsTrusted =
|
|
2204
|
+
const keyIsTrusted = keyCheck.kind === "ok";
|
|
2183
2205
|
const managedControlAgents = ["claude_code", "codex", "gemini_cli"];
|
|
2184
2206
|
const configuredControlAgents = managedControlAgents.filter((agent) => agentIsWired(agent));
|
|
2185
2207
|
const controlCapabilities = detectProviderLiveCapabilities(configuredControlAgents.map(
|
|
@@ -2249,6 +2271,7 @@ var main = async () => {
|
|
|
2249
2271
|
console.log(` ${yellow("!")} Managed control could not be verified by the server: ${serverControlProof.detail}`);
|
|
2250
2272
|
}
|
|
2251
2273
|
const closing = describeClosing({
|
|
2274
|
+
staleEnvironmentKey,
|
|
2252
2275
|
agentsOk,
|
|
2253
2276
|
configuredNothing,
|
|
2254
2277
|
completed,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UCS65VVR.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-DLLAWCQB.js";
|
|
8
|
+
import "../chunk-D6PRC3YQ.js";
|
|
9
9
|
import "../chunk-DINDL2CF.js";
|
|
10
10
|
import "../chunk-KZERVKTD.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey
|
|
13
13
|
} from "../chunk-2UMNXADU.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-WDKHZRAS.js";
|
|
15
15
|
|
|
16
16
|
// bin/pushary-stats.ts
|
|
17
17
|
exitOnHelpFlag("stats");
|
|
@@ -2,35 +2,34 @@
|
|
|
2
2
|
import {
|
|
3
3
|
describeLastSeen,
|
|
4
4
|
listMachines
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-32RMQO5Z.js";
|
|
6
|
+
import "../chunk-N4VNLISN.js";
|
|
7
|
+
import "../chunk-OW6AZDY2.js";
|
|
8
8
|
import {
|
|
9
9
|
describeReach,
|
|
10
10
|
fetchChannels,
|
|
11
11
|
reachVerdict
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-KI4PA7MQ.js";
|
|
13
13
|
import "../chunk-3EGEA4KH.js";
|
|
14
14
|
import {
|
|
15
15
|
checkApiKey,
|
|
16
16
|
describeKeyCheck
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-I6GZX3FT.js";
|
|
18
18
|
import "../chunk-QCGNGEGE.js";
|
|
19
19
|
import {
|
|
20
20
|
createIo
|
|
21
21
|
} from "../chunk-5RUIFDTP.js";
|
|
22
22
|
import {
|
|
23
23
|
exitOnHelpFlag
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
} from "../chunk-DLLAWCQB.js";
|
|
25
|
+
import "../chunk-D6PRC3YQ.js";
|
|
26
26
|
import {
|
|
27
27
|
rejectUnknownFlags
|
|
28
28
|
} from "../chunk-GMXKITVA.js";
|
|
29
29
|
import "../chunk-DINDL2CF.js";
|
|
30
30
|
import {
|
|
31
31
|
readKeySource
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-BC3VCZ3E.js";
|
|
32
|
+
} from "../chunk-S5CMLR35.js";
|
|
34
33
|
import "../chunk-EYRGBYZG.js";
|
|
35
34
|
import "../chunk-SAF6HGAA.js";
|
|
36
35
|
import {
|
|
@@ -39,10 +38,9 @@ import {
|
|
|
39
38
|
import {
|
|
40
39
|
EXIT
|
|
41
40
|
} from "../chunk-KZERVKTD.js";
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-4LL6LG5X.js";
|
|
41
|
+
import "../chunk-KAVDAZ7A.js";
|
|
44
42
|
import "../chunk-2UMNXADU.js";
|
|
45
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-WDKHZRAS.js";
|
|
46
44
|
|
|
47
45
|
// src/status.ts
|
|
48
46
|
var keySourceLine = (source) => {
|