@pushary/agent-hooks 1.4.2 → 1.5.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 +21 -0
- package/README.md +28 -0
- package/data/vscode-plugin/README.md +1 -1
- package/data/vscode-plugin/scripts/pushary-gate.mjs +2 -2
- package/dist/bin/pushary-bell-hook.js +22 -21
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +28 -24
- package/dist/bin/pushary-clean.js +25 -25
- package/dist/bin/pushary-codex-bridge.js +16 -14
- package/dist/bin/pushary-codex-hook.js +32 -27
- package/dist/bin/pushary-codex.js +15 -10
- package/dist/bin/pushary-connect.js +11 -11
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +32 -28
- package/dist/bin/pushary-disconnect.js +16 -16
- package/dist/bin/pushary-doctor.js +111 -40
- package/dist/bin/pushary-elicitation-hook.js +23 -22
- package/dist/bin/pushary-gemini-bridge.js +13 -11
- package/dist/bin/pushary-gemini-hook.js +29 -24
- package/dist/bin/pushary-hook.js +30 -30
- package/dist/bin/pushary-login.js +14 -14
- package/dist/bin/pushary-logout.js +8 -8
- package/dist/bin/pushary-mode.js +7 -7
- package/dist/bin/pushary-notification-hook.js +26 -25
- package/dist/bin/pushary-opencode-hook.js +25 -24
- package/dist/bin/pushary-permission-denied-hook.js +30 -29
- package/dist/bin/pushary-permission-hook.js +29 -28
- package/dist/bin/pushary-post-hook.js +26 -25
- package/dist/bin/pushary-prompt-hook.js +26 -25
- package/dist/bin/pushary-session-end-hook.js +26 -25
- package/dist/bin/pushary-session-start-hook.js +33 -27
- package/dist/bin/pushary-setup.js +94 -88
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +26 -25
- package/dist/bin/pushary-stopfailure-hook.js +26 -25
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +20 -19
- package/dist/bin/pushary-transcripts.js +8 -8
- package/dist/bin/pushary-upgrade.js +269 -45
- package/dist/bin/pushary-wait.js +7 -7
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-LPYCPFBZ.js → chunk-2AUIEZYS.js} +3 -3
- package/dist/{chunk-4BROEAKH.js → chunk-2QT3GCU4.js} +1 -1
- package/dist/{chunk-55KW4FLG.js → chunk-3ZSGKLSO.js} +2 -2
- package/dist/{chunk-NY6XQ6CA.js → chunk-43LJSM4F.js} +2 -2
- package/dist/{chunk-LEAAERSQ.js → chunk-43ZDACBO.js} +1 -1
- package/dist/{chunk-II7PUMPB.js → chunk-4ERLRNOK.js} +3 -3
- package/dist/{chunk-M5CTUFF3.js → chunk-5HYNICS7.js} +1 -1
- package/dist/{chunk-MW6ZPC6R.js → chunk-5UQ5ATIE.js} +1 -1
- package/dist/{chunk-TYEO6T5J.js → chunk-5ZZG76S2.js} +2 -2
- package/dist/{chunk-EQRS3SGM.js → chunk-66H2QQAK.js} +1 -1
- package/dist/chunk-6EEANS74.js +300 -0
- package/dist/{chunk-TRLFZKVG.js → chunk-6IU45EHE.js} +49 -26
- package/dist/{chunk-JVTOML54.js → chunk-6QFEQIPM.js} +2 -2
- package/dist/chunk-BY2CRWBO.js +38 -0
- package/dist/{chunk-G653QPTR.js → chunk-D573TLP6.js} +7 -7
- package/dist/{chunk-25RTLTQD.js → chunk-DTQNDR7C.js} +1 -1
- package/dist/{chunk-FAH3D74E.js → chunk-EA3IELHP.js} +6 -0
- package/dist/{chunk-EYRGBYZG.js → chunk-HETOKNIL.js} +1 -1
- package/dist/{chunk-UM5J3J4V.js → chunk-HU5LSYL2.js} +2 -2
- package/dist/{chunk-PC6DU5C4.js → chunk-HUAOMX4U.js} +1 -1
- package/dist/{chunk-2V2IKOGJ.js → chunk-HVBF35GT.js} +2 -2
- package/dist/{chunk-DINDL2CF.js → chunk-HWJW3CPO.js} +25 -5
- package/dist/{chunk-VW66JEGU.js → chunk-IV3RHICU.js} +8 -8
- package/dist/{chunk-ACYIZ3KH.js → chunk-JKBDGZFL.js} +12 -6
- package/dist/{chunk-ZVY25BMK.js → chunk-K3QVDAZW.js} +1 -1
- package/dist/{chunk-MUVTZNJW.js → chunk-KHXVTWYS.js} +3 -3
- package/dist/{chunk-T5SZ4PML.js → chunk-KJRALILH.js} +7 -4
- package/dist/{chunk-VOMOZ4D5.js → chunk-M2LMXPJZ.js} +1 -1
- package/dist/{chunk-SUWRZYQG.js → chunk-MDJJW3LP.js} +3 -3
- package/dist/chunk-MU3WU2FO.js +166 -0
- package/dist/{chunk-2UMNXADU.js → chunk-OSJEMXSR.js} +5 -1
- package/dist/{chunk-TWWLVOPB.js → chunk-P4BNYJ5Q.js} +5 -5
- package/dist/{chunk-XDP3UYH5.js → chunk-PJ27EHCD.js} +8 -8
- package/dist/{chunk-LGXUGYUH.js → chunk-PYCQXCI5.js} +2 -2
- package/dist/{chunk-VIOL2DJS.js → chunk-R5KY3PBN.js} +5 -5
- package/dist/{chunk-SOUZBGYJ.js → chunk-T4QY64OR.js} +15 -14
- package/dist/{chunk-DY4ILT6L.js → chunk-TFKBFQCE.js} +1 -1
- package/dist/{chunk-GZ7E6VOB.js → chunk-TIWURSLS.js} +1 -1
- package/dist/{chunk-F4UWL4NY.js → chunk-TUXFIVOH.js} +1 -1
- package/dist/{chunk-UJBZIKSY.js → chunk-TZGCUNOX.js} +8 -8
- package/dist/{chunk-FU2DFEAZ.js → chunk-USQDVBEV.js} +2 -2
- package/dist/{chunk-YXP3WPAI.js → chunk-UYDTFCHW.js} +1 -1
- package/dist/{chunk-4ZDKSDVW.js → chunk-WNJSGZY7.js} +4 -4
- package/dist/{chunk-NHTAHAIS.js → chunk-WOLPADR6.js} +1 -1
- package/dist/{chunk-BZ4GDOJX.js → chunk-X7FESZTD.js} +7 -7
- package/dist/{chunk-NOWZUGZW.js → chunk-XWEONSLV.js} +1 -1
- package/dist/{chunk-Y3MM6PYN.js → chunk-YAWXKL2X.js} +1 -1
- package/dist/{chunk-GKIUEIDX.js → chunk-YQMFGWBD.js} +1 -1
- package/dist/{chunk-WPVHRUDT.js → chunk-Z4VGIBJ7.js} +3 -3
- package/dist/{reapply-J527BCJG.js → reapply-5CZSTJZI.js} +13 -8
- package/dist/src/index.js +18 -16
- package/package.json +1 -1
|
@@ -1,31 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-D573TLP6.js";
|
|
5
|
+
import "../chunk-UYDTFCHW.js";
|
|
6
6
|
import {
|
|
7
7
|
askUser,
|
|
8
8
|
isDecisionStopped,
|
|
9
9
|
waitForAnswer
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-PYCQXCI5.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-WOLPADR6.js";
|
|
14
|
+
import "../chunk-6IU45EHE.js";
|
|
15
|
+
import "../chunk-HETOKNIL.js";
|
|
16
16
|
import "../chunk-SAF6HGAA.js";
|
|
17
17
|
import "../chunk-7QLSKOSU.js";
|
|
18
18
|
import "../chunk-KZERVKTD.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-HU5LSYL2.js";
|
|
20
20
|
import "../chunk-T7E75EKA.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-OSJEMXSR.js";
|
|
24
|
+
import "../chunk-T4QY64OR.js";
|
|
25
|
+
import {
|
|
26
|
+
NPX_LATEST_COMMAND
|
|
27
|
+
} from "../chunk-EA3IELHP.js";
|
|
28
|
+
import "../chunk-HWJW3CPO.js";
|
|
25
29
|
|
|
26
30
|
// bin/pushary-codex.ts
|
|
27
31
|
import { basename } from "path";
|
|
28
|
-
var DEPRECATION_NOTICE =
|
|
32
|
+
var DEPRECATION_NOTICE = `[pushary-codex] Deprecated: this is the legacy Codex notify handler. Native Codex hooks via pushary-codex-hook replace it. Run ${NPX_LATEST_COMMAND} setup to migrate.
|
|
33
|
+
`;
|
|
29
34
|
var readStdin = async () => {
|
|
30
35
|
let raw = "";
|
|
31
36
|
for await (const chunk of process.stdin) raw += chunk;
|
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
printKeyCheck
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XWEONSLV.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDevice,
|
|
7
7
|
connectExistingApp,
|
|
8
8
|
printConnectInstructions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-KJRALILH.js";
|
|
10
10
|
import "../chunk-3EGEA4KH.js";
|
|
11
11
|
import {
|
|
12
12
|
checkApiKey
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-43LJSM4F.js";
|
|
14
14
|
import "../chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
createIo
|
|
17
17
|
} from "../chunk-5RUIFDTP.js";
|
|
18
18
|
import {
|
|
19
19
|
exitOnHelpFlag
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-FAH3D74E.js";
|
|
20
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
22
21
|
import {
|
|
23
22
|
parseFlags
|
|
24
23
|
} from "../chunk-GMXKITVA.js";
|
|
25
|
-
import "../chunk-DINDL2CF.js";
|
|
26
24
|
import {
|
|
27
25
|
readKeySource
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
26
|
+
} from "../chunk-USQDVBEV.js";
|
|
27
|
+
import "../chunk-HETOKNIL.js";
|
|
30
28
|
import "../chunk-SAF6HGAA.js";
|
|
31
29
|
import {
|
|
32
30
|
UsageError
|
|
@@ -34,10 +32,12 @@ import {
|
|
|
34
32
|
import {
|
|
35
33
|
EXIT
|
|
36
34
|
} from "../chunk-KZERVKTD.js";
|
|
37
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-HU5LSYL2.js";
|
|
38
36
|
import "../chunk-T7E75EKA.js";
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-OSJEMXSR.js";
|
|
38
|
+
import "../chunk-T4QY64OR.js";
|
|
39
|
+
import "../chunk-EA3IELHP.js";
|
|
40
|
+
import "../chunk-HWJW3CPO.js";
|
|
41
41
|
|
|
42
42
|
// bin/pushary-connect.ts
|
|
43
43
|
exitOnHelpFlag("connect");
|
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
coworkOutput,
|
|
4
4
|
parseCoworkOptions
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-3ZSGKLSO.js";
|
|
6
6
|
import {
|
|
7
7
|
canOpenBrowser,
|
|
8
8
|
openInBrowser
|
|
9
9
|
} from "../chunk-PUZZELE6.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-TFKBFQCE.js";
|
|
11
11
|
import {
|
|
12
12
|
exitOnHelpFlag
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-FAH3D74E.js";
|
|
13
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
15
14
|
import "../chunk-GMXKITVA.js";
|
|
16
|
-
import "../chunk-DINDL2CF.js";
|
|
17
15
|
import {
|
|
18
16
|
UsageError
|
|
19
17
|
} from "../chunk-7QLSKOSU.js";
|
|
@@ -22,7 +20,9 @@ import {
|
|
|
22
20
|
} from "../chunk-KZERVKTD.js";
|
|
23
21
|
import {
|
|
24
22
|
CLAUDE_CONNECTOR_GUIDE
|
|
25
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-T4QY64OR.js";
|
|
24
|
+
import "../chunk-EA3IELHP.js";
|
|
25
|
+
import "../chunk-HWJW3CPO.js";
|
|
26
26
|
|
|
27
27
|
// bin/pushary-cowork.ts
|
|
28
28
|
exitOnHelpFlag("cowork");
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
inspectConfiguredManagedProviders
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-JKBDGZFL.js";
|
|
5
|
+
import "../chunk-HUAOMX4U.js";
|
|
6
|
+
import "../chunk-6EEANS74.js";
|
|
6
7
|
import {
|
|
7
8
|
HEARTBEAT_INTERVAL_MS,
|
|
8
9
|
sendHeartbeat
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-IV3RHICU.js";
|
|
11
|
+
import "../chunk-4ERLRNOK.js";
|
|
11
12
|
import {
|
|
12
13
|
detectProviderLiveCapabilities,
|
|
13
14
|
hasSpawnProvider,
|
|
14
15
|
resolveControlPolicy
|
|
15
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-5ZZG76S2.js";
|
|
16
17
|
import {
|
|
17
18
|
SESSION_REAP_SILENCE_MS,
|
|
18
19
|
describeIdleWindow,
|
|
@@ -20,15 +21,15 @@ import {
|
|
|
20
21
|
listProcessProofs,
|
|
21
22
|
ownsLiveProcess,
|
|
22
23
|
silentSpawnedProofs
|
|
23
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-M2LMXPJZ.js";
|
|
24
25
|
import {
|
|
25
26
|
startRegisteredTranscripts
|
|
26
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TZGCUNOX.js";
|
|
27
28
|
import "../chunk-SGZJ5LYH.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-WNJSGZY7.js";
|
|
30
|
+
import "../chunk-TFKBFQCE.js";
|
|
31
|
+
import "../chunk-K3QVDAZW.js";
|
|
32
|
+
import "../chunk-Z4VGIBJ7.js";
|
|
32
33
|
import {
|
|
33
34
|
DAEMON_LEASE_RENEW_INTERVAL_MS,
|
|
34
35
|
acquireDaemonLease,
|
|
@@ -45,45 +46,47 @@ import {
|
|
|
45
46
|
requestDaemonHandoff,
|
|
46
47
|
stopDaemonRunning,
|
|
47
48
|
writeDaemonNeedsLogin
|
|
48
|
-
} from "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
53
|
-
import "../chunk-
|
|
49
|
+
} from "../chunk-X7FESZTD.js";
|
|
50
|
+
import "../chunk-2AUIEZYS.js";
|
|
51
|
+
import "../chunk-5UQ5ATIE.js";
|
|
52
|
+
import "../chunk-TIWURSLS.js";
|
|
53
|
+
import "../chunk-66H2QQAK.js";
|
|
54
|
+
import "../chunk-2QT3GCU4.js";
|
|
54
55
|
import {
|
|
55
56
|
spawnClaude
|
|
56
57
|
} from "../chunk-XHKBHWLX.js";
|
|
57
|
-
import "../chunk-
|
|
58
|
+
import "../chunk-UYDTFCHW.js";
|
|
58
59
|
import {
|
|
59
60
|
getMachineId
|
|
60
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-WOLPADR6.js";
|
|
61
62
|
import {
|
|
62
63
|
resolveBinary
|
|
63
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-6IU45EHE.js";
|
|
64
65
|
import {
|
|
65
66
|
writeHuman
|
|
66
67
|
} from "../chunk-QCGNGEGE.js";
|
|
67
68
|
import {
|
|
68
69
|
exitOnHelpFlag
|
|
69
|
-
} from "../chunk-
|
|
70
|
-
import "../chunk-FAH3D74E.js";
|
|
70
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
71
71
|
import "../chunk-GMXKITVA.js";
|
|
72
|
-
import "../chunk-DINDL2CF.js";
|
|
73
72
|
import {
|
|
74
73
|
readControlMode
|
|
75
|
-
} from "../chunk-
|
|
74
|
+
} from "../chunk-USQDVBEV.js";
|
|
76
75
|
import "../chunk-7QLSKOSU.js";
|
|
77
76
|
import {
|
|
78
77
|
EXIT
|
|
79
78
|
} from "../chunk-KZERVKTD.js";
|
|
80
|
-
import "../chunk-
|
|
79
|
+
import "../chunk-HU5LSYL2.js";
|
|
81
80
|
import "../chunk-T7E75EKA.js";
|
|
82
81
|
import {
|
|
83
82
|
getApiKey,
|
|
84
83
|
getBaseUrl
|
|
85
|
-
} from "../chunk-
|
|
86
|
-
import "../chunk-
|
|
84
|
+
} from "../chunk-OSJEMXSR.js";
|
|
85
|
+
import "../chunk-T4QY64OR.js";
|
|
86
|
+
import {
|
|
87
|
+
NPX_LATEST_COMMAND
|
|
88
|
+
} from "../chunk-EA3IELHP.js";
|
|
89
|
+
import "../chunk-HWJW3CPO.js";
|
|
87
90
|
|
|
88
91
|
// src/spawn-daemon.ts
|
|
89
92
|
import { execFileSync, spawn } from "child_process";
|
|
@@ -306,7 +309,8 @@ var runSpawnDaemon = async () => {
|
|
|
306
309
|
try {
|
|
307
310
|
apiKey = getApiKey();
|
|
308
311
|
} catch {
|
|
309
|
-
stderr(
|
|
312
|
+
stderr(`[pushary] daemon needs an API key. Run \`${NPX_LATEST_COMMAND} setup\`.
|
|
313
|
+
`);
|
|
310
314
|
return 1;
|
|
311
315
|
}
|
|
312
316
|
const loginBlock = readDaemonNeedsLogin();
|
|
@@ -8,28 +8,28 @@ import {
|
|
|
8
8
|
openCodePluginDir,
|
|
9
9
|
openCodePluginFile,
|
|
10
10
|
removeOpenCodeMcpServer
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-TUXFIVOH.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-R5KY3PBN.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-4ERLRNOK.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-2AUIEZYS.js";
|
|
29
|
+
import "../chunk-D573TLP6.js";
|
|
30
|
+
import "../chunk-UYDTFCHW.js";
|
|
31
|
+
import "../chunk-PYCQXCI5.js";
|
|
32
|
+
import "../chunk-WOLPADR6.js";
|
|
33
33
|
import {
|
|
34
34
|
claudeJson,
|
|
35
35
|
claudeMcpReceipt,
|
|
@@ -43,23 +43,23 @@ import {
|
|
|
43
43
|
geminiSettings,
|
|
44
44
|
removeCodexHooks,
|
|
45
45
|
removeCodexSettings
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-6IU45EHE.js";
|
|
47
47
|
import {
|
|
48
48
|
exitOnHelpFlag
|
|
49
|
-
} from "../chunk-
|
|
50
|
-
import "../chunk-
|
|
51
|
-
import "../chunk-DINDL2CF.js";
|
|
52
|
-
import "../chunk-EYRGBYZG.js";
|
|
49
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
50
|
+
import "../chunk-HETOKNIL.js";
|
|
53
51
|
import "../chunk-SAF6HGAA.js";
|
|
54
52
|
import "../chunk-7QLSKOSU.js";
|
|
55
53
|
import "../chunk-KZERVKTD.js";
|
|
56
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-HU5LSYL2.js";
|
|
57
55
|
import "../chunk-T7E75EKA.js";
|
|
58
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-OSJEMXSR.js";
|
|
59
57
|
import {
|
|
60
58
|
DISCONNECTABLE_AGENTS,
|
|
61
59
|
hookCompatibleProfileBySource
|
|
62
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-T4QY64OR.js";
|
|
61
|
+
import "../chunk-EA3IELHP.js";
|
|
62
|
+
import "../chunk-HWJW3CPO.js";
|
|
63
63
|
|
|
64
64
|
// bin/pushary-disconnect.ts
|
|
65
65
|
import { readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -6,10 +6,14 @@ import {
|
|
|
6
6
|
readServiceExecPath,
|
|
7
7
|
versionManagerOf
|
|
8
8
|
} from "../chunk-GU3EJCVV.js";
|
|
9
|
+
import {
|
|
10
|
+
assessCodexHookTrust,
|
|
11
|
+
readCodexTrustForPusharyHooks
|
|
12
|
+
} from "../chunk-6EEANS74.js";
|
|
9
13
|
import {
|
|
10
14
|
readMachineReadiness,
|
|
11
15
|
readManagedControlEvidence
|
|
12
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-IV3RHICU.js";
|
|
13
17
|
import {
|
|
14
18
|
CURSOR_GATE_SCRIPT
|
|
15
19
|
} from "../chunk-P32LPT2L.js";
|
|
@@ -22,35 +26,43 @@ import {
|
|
|
22
26
|
isPluginRegistered,
|
|
23
27
|
shortenHome,
|
|
24
28
|
vscodeSettingsTargets
|
|
25
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-KHXVTWYS.js";
|
|
26
30
|
import {
|
|
27
31
|
OPENCODE_PLUGIN_PLACEHOLDER,
|
|
28
32
|
openCodePluginDir,
|
|
29
33
|
openCodePluginFile,
|
|
30
34
|
openCodeWired
|
|
31
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-TUXFIVOH.js";
|
|
32
36
|
import {
|
|
33
37
|
compatibleConfigFile,
|
|
34
38
|
compatibleInstructionsFile,
|
|
35
39
|
compatibleMcpFile,
|
|
36
40
|
hasCompatibleHooks,
|
|
37
41
|
missingCompatibleHookEvents
|
|
38
|
-
} from "../chunk-
|
|
39
|
-
import "../chunk-
|
|
42
|
+
} from "../chunk-R5KY3PBN.js";
|
|
43
|
+
import "../chunk-4ERLRNOK.js";
|
|
40
44
|
import {
|
|
41
45
|
detectProviderLiveCapabilities,
|
|
42
46
|
hasSpawnProvider,
|
|
43
47
|
resolveControlPolicy
|
|
44
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-5ZZG76S2.js";
|
|
49
|
+
import {
|
|
50
|
+
AUTO_UPDATE_DISABLE_ENV,
|
|
51
|
+
autoUpdateOffReason,
|
|
52
|
+
describeAutoUpdateAnnouncement,
|
|
53
|
+
describeAutoUpdateCheck,
|
|
54
|
+
readAutoUpdateState,
|
|
55
|
+
takeAutoUpdateAnnouncement
|
|
56
|
+
} from "../chunk-MU3WU2FO.js";
|
|
45
57
|
import {
|
|
46
58
|
readLedgerSummary
|
|
47
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-43ZDACBO.js";
|
|
48
60
|
import {
|
|
49
61
|
describeBridgeResolution,
|
|
50
62
|
isBridgeLocator,
|
|
51
63
|
liveBridgeProbe,
|
|
52
64
|
resolveBridgeStub
|
|
53
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-K3QVDAZW.js";
|
|
54
66
|
import {
|
|
55
67
|
claudeOtherHolders,
|
|
56
68
|
claudeUnprovenHolds,
|
|
@@ -67,7 +79,7 @@ import {
|
|
|
67
79
|
geminiWired,
|
|
68
80
|
holdsLong,
|
|
69
81
|
pusharyHookExecutable
|
|
70
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-Z4VGIBJ7.js";
|
|
71
83
|
import {
|
|
72
84
|
daemonHasRemoteProof,
|
|
73
85
|
daemonServiceManagerAvailable,
|
|
@@ -76,21 +88,22 @@ import {
|
|
|
76
88
|
readDaemonNeedsLogin,
|
|
77
89
|
readDaemonStatus,
|
|
78
90
|
readInstalledDaemonService
|
|
79
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-X7FESZTD.js";
|
|
80
92
|
import {
|
|
81
93
|
GEMINI_HOOK_BINARY,
|
|
82
94
|
hasGeminiHooks,
|
|
83
95
|
missingGeminiHookEvents
|
|
84
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-2AUIEZYS.js";
|
|
85
97
|
import "../chunk-XHKBHWLX.js";
|
|
86
|
-
import "../chunk-
|
|
87
|
-
import "../chunk-
|
|
88
|
-
import "../chunk-
|
|
98
|
+
import "../chunk-D573TLP6.js";
|
|
99
|
+
import "../chunk-UYDTFCHW.js";
|
|
100
|
+
import "../chunk-PYCQXCI5.js";
|
|
89
101
|
import {
|
|
90
102
|
getMachineId
|
|
91
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-WOLPADR6.js";
|
|
92
104
|
import {
|
|
93
105
|
CODEX_HOOK_EVENTS,
|
|
106
|
+
autoUpdateState,
|
|
94
107
|
claudeJson,
|
|
95
108
|
claudeSettings,
|
|
96
109
|
claudeSkillDir,
|
|
@@ -104,6 +117,7 @@ import {
|
|
|
104
117
|
cursorUserHooks,
|
|
105
118
|
cursorUserMcp,
|
|
106
119
|
execNpm,
|
|
120
|
+
fetchLatestPublishedVersion,
|
|
107
121
|
geminiMd,
|
|
108
122
|
geminiSettings,
|
|
109
123
|
hasCodexHooks,
|
|
@@ -111,7 +125,7 @@ import {
|
|
|
111
125
|
pusharyConfigFile,
|
|
112
126
|
readCodexMcpAuth,
|
|
113
127
|
vscodePluginDir
|
|
114
|
-
} from "../chunk-
|
|
128
|
+
} from "../chunk-6IU45EHE.js";
|
|
115
129
|
import {
|
|
116
130
|
describeReach,
|
|
117
131
|
describeRoundTrip,
|
|
@@ -119,35 +133,31 @@ import {
|
|
|
119
133
|
reachVerdict,
|
|
120
134
|
roundTripEvidence,
|
|
121
135
|
verifyRoundTrip
|
|
122
|
-
} from "../chunk-
|
|
136
|
+
} from "../chunk-KJRALILH.js";
|
|
123
137
|
import "../chunk-3EGEA4KH.js";
|
|
124
138
|
import {
|
|
125
139
|
checkApiKey,
|
|
126
140
|
describeKeyCheck
|
|
127
|
-
} from "../chunk-
|
|
141
|
+
} from "../chunk-43LJSM4F.js";
|
|
128
142
|
import "../chunk-QCGNGEGE.js";
|
|
129
143
|
import {
|
|
130
144
|
createIo
|
|
131
145
|
} from "../chunk-5RUIFDTP.js";
|
|
132
146
|
import {
|
|
133
147
|
exitOnHelpFlag
|
|
134
|
-
} from "../chunk-
|
|
135
|
-
import "../chunk-FAH3D74E.js";
|
|
148
|
+
} from "../chunk-P4BNYJ5Q.js";
|
|
136
149
|
import {
|
|
137
150
|
parseFlags
|
|
138
151
|
} from "../chunk-GMXKITVA.js";
|
|
139
|
-
import {
|
|
140
|
-
getPackageVersion
|
|
141
|
-
} from "../chunk-DINDL2CF.js";
|
|
142
152
|
import {
|
|
143
153
|
keyPrefix,
|
|
144
154
|
readControlMode,
|
|
145
155
|
readKeySource
|
|
146
|
-
} from "../chunk-
|
|
156
|
+
} from "../chunk-USQDVBEV.js";
|
|
147
157
|
import {
|
|
148
158
|
callMcpTool,
|
|
149
159
|
sendMcpRequest
|
|
150
|
-
} from "../chunk-
|
|
160
|
+
} from "../chunk-HETOKNIL.js";
|
|
151
161
|
import "../chunk-SAF6HGAA.js";
|
|
152
162
|
import {
|
|
153
163
|
UsageError
|
|
@@ -155,11 +165,11 @@ import {
|
|
|
155
165
|
import {
|
|
156
166
|
EXIT
|
|
157
167
|
} from "../chunk-KZERVKTD.js";
|
|
158
|
-
import "../chunk-
|
|
168
|
+
import "../chunk-HU5LSYL2.js";
|
|
159
169
|
import "../chunk-T7E75EKA.js";
|
|
160
170
|
import {
|
|
161
171
|
getBaseUrl
|
|
162
|
-
} from "../chunk-
|
|
172
|
+
} from "../chunk-OSJEMXSR.js";
|
|
163
173
|
import {
|
|
164
174
|
AGENTS,
|
|
165
175
|
CURSOR_GATE_EVENTS,
|
|
@@ -171,7 +181,14 @@ import {
|
|
|
171
181
|
hookActivationResult,
|
|
172
182
|
hookCompatibleProfile,
|
|
173
183
|
isHookActivationReport
|
|
174
|
-
} from "../chunk-
|
|
184
|
+
} from "../chunk-T4QY64OR.js";
|
|
185
|
+
import {
|
|
186
|
+
NPX_LATEST_COMMAND
|
|
187
|
+
} from "../chunk-EA3IELHP.js";
|
|
188
|
+
import {
|
|
189
|
+
getPackageVersion,
|
|
190
|
+
isNewerVersion
|
|
191
|
+
} from "../chunk-HWJW3CPO.js";
|
|
175
192
|
|
|
176
193
|
// bin/pushary-doctor.ts
|
|
177
194
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -181,6 +198,37 @@ import { execFileSync } from "child_process";
|
|
|
181
198
|
import { confirm } from "@inquirer/prompts";
|
|
182
199
|
import { parse as parseTOML } from "smol-toml";
|
|
183
200
|
|
|
201
|
+
// src/diagnostics/auto-update.ts
|
|
202
|
+
var globalPackageFreshness = (installed2, latest) => isNewerVersion(latest, installed2) ? { upToDate: false, detail: `${installed2} installed, ${latest} available \u2014 run ${NPX_LATEST_COMMAND} upgrade` } : { upToDate: true, detail: installed2 };
|
|
203
|
+
var AUTO_UPDATE_ON = "on: once a day at session start, within the same major version";
|
|
204
|
+
var AUTO_UPDATE_OFF = {
|
|
205
|
+
disabled_by_env: `off: ${AUTO_UPDATE_DISABLE_ENV} is set`,
|
|
206
|
+
disabled_by_user: "off: turn it back on with pushary upgrade --auto=on",
|
|
207
|
+
ci: "off in CI",
|
|
208
|
+
windows: "not available on Windows yet",
|
|
209
|
+
linux: "paused on Linux to protect running sessions; upgrade manually after sessions finish"
|
|
210
|
+
};
|
|
211
|
+
var needsAttention = (input) => input.state.lastResult === "failed" || input.state.lastResult === "needs_manual" || Boolean(input.state.detail);
|
|
212
|
+
var LAST_CHECK_LABEL = "Last automatic update check";
|
|
213
|
+
var describeAutoUpdateStatus = (input) => {
|
|
214
|
+
const offReason = autoUpdateOffReason(input);
|
|
215
|
+
const status = {
|
|
216
|
+
tone: "info",
|
|
217
|
+
label: "Automatic updates",
|
|
218
|
+
detail: offReason === null ? AUTO_UPDATE_ON : AUTO_UPDATE_OFF[offReason]
|
|
219
|
+
};
|
|
220
|
+
const checkedAt = input.state.at ?? input.state.lastCheckAt;
|
|
221
|
+
if (checkedAt === void 0) return [status];
|
|
222
|
+
return [
|
|
223
|
+
status,
|
|
224
|
+
{
|
|
225
|
+
tone: needsAttention(input) ? "warn" : "info",
|
|
226
|
+
label: LAST_CHECK_LABEL,
|
|
227
|
+
detail: `${checkedAt}: ${describeAutoUpdateCheck(input.state)}`
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
};
|
|
231
|
+
|
|
184
232
|
// src/diagnostics/bundle.ts
|
|
185
233
|
import { homedir, hostname } from "os";
|
|
186
234
|
var globalVersion = () => {
|
|
@@ -464,6 +512,21 @@ var reportOtherHolders = (agentLabel, holders) => {
|
|
|
464
512
|
}
|
|
465
513
|
console.log(` ${dim(describeHoldSentence(agentLabel))}`);
|
|
466
514
|
};
|
|
515
|
+
var describeReadings = (readings) => readings.map((reading) => `${reading.event} ${reading.status}`).join(", ");
|
|
516
|
+
var CODEX_NONE_LISTED = "Codex lists none of the Pushary hooks, so it runs none of them. Check [features].hooks in config.toml, then re-run setup";
|
|
517
|
+
var reportCodexOwnTrust = (assessment) => {
|
|
518
|
+
if (assessment.kind === "unlisted") {
|
|
519
|
+
check(false, "Codex: hooks trusted", CODEX_NONE_LISTED);
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
check(assessment.kind === "trusted", "Codex: hooks trusted", assessment.kind === "trusted" ? `Codex reports ${assessment.trusted} of ${assessment.total} trusted` : `Codex reports ${describeReadings(assessment.failures)}. Type /hooks in Codex and trust them, once`);
|
|
523
|
+
if (assessment.notListed.length > 0) {
|
|
524
|
+
console.log(` ${warn} Codex: does not list ${assessment.notListed.join(", ")} ${dim("(this Codex may not support those events yet)")}`);
|
|
525
|
+
}
|
|
526
|
+
if (assessment.disabled.length > 0) {
|
|
527
|
+
console.log(` ${warn} Codex: ${assessment.disabled.join(", ")} turned off in Codex ${dim("(turn them back on in /hooks)")}`);
|
|
528
|
+
}
|
|
529
|
+
};
|
|
467
530
|
var skipped = (label, why) => {
|
|
468
531
|
console.log(` ${dim("\u2013")} ${label} ${dim(`(${why})`)}`);
|
|
469
532
|
};
|
|
@@ -679,16 +742,24 @@ var main = async () => {
|
|
|
679
742
|
console.log(` ${warn} Codex: stale legacy notify entry ${dim("(double-push risk, re-run setup to remove it)")}`);
|
|
680
743
|
}
|
|
681
744
|
if (hookCommand) {
|
|
745
|
+
const positions = codexHookPositions(codexHooksConfig);
|
|
682
746
|
const gaps = codexTrustGaps(
|
|
683
747
|
codexParsed,
|
|
684
748
|
codexHooksConfig,
|
|
685
749
|
codexHooksPath,
|
|
686
750
|
hookCommand,
|
|
687
|
-
|
|
751
|
+
positions
|
|
688
752
|
);
|
|
689
753
|
const untrusted = gaps.filter((gap) => gap.kind === "untrusted").map((gap) => gap.event);
|
|
690
754
|
const stale = gaps.filter((gap) => gap.kind === "stale").map((gap) => gap.event);
|
|
691
|
-
|
|
755
|
+
const codexTrust = await readCodexTrustForPusharyHooks();
|
|
756
|
+
if (codexTrust.kind === "listed") {
|
|
757
|
+
reportCodexOwnTrust(assessCodexHookTrust(Object.keys(positions), codexTrust.hooks));
|
|
758
|
+
} else {
|
|
759
|
+
const why = codexTrust.kind === "skipped" ? "did not ask" : "could not ask";
|
|
760
|
+
console.log(` ${warn} Codex: ${why} Codex about hook trust ${dim(`(${codexTrust.reason}); checking Pushary's own record instead`)}`);
|
|
761
|
+
check(untrusted.length === 0, "Codex: hooks trusted", untrusted.length === 0 ? "all events trusted" : `untrusted (${untrusted.join(", ")}) \u2014 type /hooks in Codex and trust them, once`);
|
|
762
|
+
}
|
|
692
763
|
if (stale.length > 0) {
|
|
693
764
|
console.log(` ${warn} Codex: ${stale.join(", ")} trusted at an older shape ${dim("(fires normally; re-run setup to pick up the current one)")}`);
|
|
694
765
|
}
|
|
@@ -1008,18 +1079,18 @@ var main = async () => {
|
|
|
1008
1079
|
}
|
|
1009
1080
|
check(!!globalVersion2, "Global package installed", globalVersion2 || "not found");
|
|
1010
1081
|
if (globalVersion2) {
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const latest = res.ok ? (await res.json()).version ?? "" : "";
|
|
1016
|
-
if (latest) {
|
|
1017
|
-
const upToDate = latest === globalVersion2;
|
|
1018
|
-
check(upToDate, "Global package up to date", upToDate ? globalVersion2 : `${globalVersion2} installed, ${latest} available \u2014 run npx @pushary/agent-hooks@latest upgrade`);
|
|
1019
|
-
}
|
|
1020
|
-
} catch {
|
|
1082
|
+
const latest = await fetchLatestPublishedVersion();
|
|
1083
|
+
if (latest) {
|
|
1084
|
+
const freshness = globalPackageFreshness(globalVersion2, latest);
|
|
1085
|
+
check(freshness.upToDate, "Global package up to date", freshness.detail);
|
|
1021
1086
|
}
|
|
1022
1087
|
}
|
|
1088
|
+
const autoUpdateStatePath = autoUpdateState();
|
|
1089
|
+
const autoUpdateAnnouncement = takeAutoUpdateAnnouncement(autoUpdateStatePath, true);
|
|
1090
|
+
if (autoUpdateAnnouncement) console.log(` ${pass} ${describeAutoUpdateAnnouncement(autoUpdateAnnouncement)}`);
|
|
1091
|
+
for (const note of describeAutoUpdateStatus({ env: process.env, platform: process.platform, state: readAutoUpdateState(autoUpdateStatePath) })) {
|
|
1092
|
+
console.log(` ${note.tone === "warn" ? warn : dim("\u2013")} ${note.label} ${dim(`(${note.detail})`)}`);
|
|
1093
|
+
}
|
|
1023
1094
|
console.log();
|
|
1024
1095
|
console.log(` ${dim("Remote control")}`);
|
|
1025
1096
|
const aliasRc = SHELL_FILES.find((f) => {
|