@pushary/agent-hooks 1.9.1 → 1.9.3
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 +10 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +1 -1
- package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
- package/data/vscode-plugin/CHANGELOG.md +4 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -1
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +31 -31
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +13 -13
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +26 -26
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +99 -48
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +28 -28
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +26 -23
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +27 -27
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +31 -31
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +28 -28
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +69 -52
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +21 -21
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-COSADFEH.js → chunk-2UWD2WZC.js} +1 -1
- package/dist/{chunk-7ER66HZH.js → chunk-34JHGOYO.js} +1 -1
- package/dist/{chunk-4SB46XLF.js → chunk-4GTXFYQ7.js} +1 -1
- package/dist/{chunk-P7YDVWLL.js → chunk-552AGATI.js} +1 -1
- package/dist/{chunk-ZMKEKWNR.js → chunk-5IIAUWEJ.js} +18 -5
- package/dist/{chunk-AKCJ5SNO.js → chunk-7FVC3RGF.js} +17 -12
- package/dist/{chunk-DMA3QUOB.js → chunk-7MO3CNBX.js} +3 -3
- package/dist/{chunk-IITCMJ4G.js → chunk-AGW7PMMO.js} +2 -2
- package/dist/{chunk-WWDPULS3.js → chunk-AMFNJPJ5.js} +8 -8
- package/dist/{chunk-LJI7U6PM.js → chunk-AUS3LY4N.js} +2 -2
- package/dist/{chunk-RS4ZOFSF.js → chunk-BPGATW2F.js} +7 -6
- package/dist/{chunk-JCER3Q6P.js → chunk-CJFVYYKM.js} +10 -9
- package/dist/{chunk-D3RS57MN.js → chunk-CVVPUVBD.js} +3 -3
- package/dist/{chunk-JGQ2ANHQ.js → chunk-DEWCUHOY.js} +2 -2
- package/dist/chunk-EO23EUOK.js +14 -0
- package/dist/{chunk-FVOCQSBG.js → chunk-EZFE4PC3.js} +1 -1
- package/dist/{chunk-LXWUYG7D.js → chunk-FANGHYW5.js} +1 -1
- package/dist/{chunk-SKEP3M6M.js → chunk-FLUECSUC.js} +2 -2
- package/dist/{chunk-J7JXA2LX.js → chunk-FSFI2PQL.js} +1 -1
- package/dist/{chunk-UPTEPARD.js → chunk-G2YXIZZS.js} +2 -2
- package/dist/{chunk-65TOHCXT.js → chunk-GB2U4QVF.js} +4 -4
- package/dist/{chunk-CE4UH4AP.js → chunk-GOWCPJTP.js} +7 -5
- package/dist/{chunk-RNDFGHSQ.js → chunk-HBUQ2EQD.js} +1 -1
- package/dist/{chunk-GHKNUQYU.js → chunk-HIQNUBWO.js} +2 -2
- package/dist/{chunk-QXL27RY6.js → chunk-HPXFPXW7.js} +1 -1
- package/dist/{chunk-CGRPHFOV.js → chunk-IVF3OVR2.js} +1 -1
- package/dist/{chunk-XEIV5QOT.js → chunk-JDUWMJDP.js} +118 -170
- package/dist/{chunk-V4H33GBM.js → chunk-JM2MCYRZ.js} +6 -6
- package/dist/{chunk-LZMH4EGE.js → chunk-KA2GI53J.js} +1 -1
- package/dist/{chunk-SWGY5WNX.js → chunk-KO7UOTLD.js} +5 -5
- package/dist/{chunk-HU2LWGEE.js → chunk-MH6SJHUE.js} +1 -1
- package/dist/{chunk-XW2B4QV2.js → chunk-NGD7H3GZ.js} +2 -2
- package/dist/{chunk-UYHLMBPQ.js → chunk-NP5RJL34.js} +1 -1
- package/dist/{chunk-IJXJW2VH.js → chunk-NZJ5LFMX.js} +10 -10
- package/dist/{chunk-QQJCDRD3.js → chunk-OEMF3KJ3.js} +5 -5
- package/dist/{chunk-6L7TNZ43.js → chunk-OXJRUMZT.js} +1 -1
- package/dist/{chunk-C6PPDKVI.js → chunk-P3REVSM5.js} +3 -3
- package/dist/{chunk-SPB3QRE7.js → chunk-PPC4FZKJ.js} +4 -4
- package/dist/{chunk-FJPC35OW.js → chunk-Q4RF7EEP.js} +1 -1
- package/dist/{chunk-4XT4JXMG.js → chunk-Q7FLA4N3.js} +1 -1
- package/dist/{chunk-LKKYRNJT.js → chunk-Q7KSRRQ4.js} +1 -1
- package/dist/{chunk-KR5JASA4.js → chunk-QVUOPB32.js} +44 -16
- package/dist/{chunk-VH6763OR.js → chunk-SJC5TXK7.js} +3 -3
- package/dist/{chunk-6QSDNXGM.js → chunk-U3DBAX7P.js} +2 -2
- package/dist/{chunk-JHZAZAI3.js → chunk-UWMEY4RS.js} +5 -5
- package/dist/{chunk-NVLXK2I6.js → chunk-VRPNTJX3.js} +5 -5
- package/dist/{chunk-5K43TBK4.js → chunk-VRYOALHQ.js} +3 -3
- package/dist/{chunk-VQLWYKX7.js → chunk-WEK6US33.js} +1 -1
- package/dist/{chunk-PEGKBNGN.js → chunk-WL4YO6CO.js} +5 -5
- package/dist/{chunk-6JTTJIKJ.js → chunk-WRDMCP4G.js} +3 -3
- package/dist/{chunk-RJ7ECJSZ.js → chunk-ZPTSEJMD.js} +4 -2
- package/dist/{chunk-6Q4NM2LW.js → chunk-ZUZKHTPJ.js} +3 -3
- package/dist/{chunk-PMS3EBD2.js → chunk-ZV32QRBR.js} +1 -1
- package/dist/{global-upgrade-ML2RHV4W.js → global-upgrade-VEQ4KQEW.js} +6 -6
- package/dist/{paths-LG3IEDDM.js → paths-QTOUBV2V.js} +2 -2
- package/dist/{reapply-7PFOITE4.js → reapply-T5PLCAGP.js} +8 -8
- package/dist/src/index.js +20 -20
- package/dist/{upgrade-lock-2A2YUUEU.js → upgrade-lock-KFZBAPNU.js} +3 -3
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
registerTranscript
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-AMFNJPJ5.js";
|
|
5
5
|
import "../chunk-SGZJ5LYH.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../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-
|
|
6
|
+
import "../chunk-GB2U4QVF.js";
|
|
7
|
+
import "../chunk-MH6SJHUE.js";
|
|
8
|
+
import "../chunk-FANGHYW5.js";
|
|
9
|
+
import "../chunk-VRYOALHQ.js";
|
|
10
|
+
import "../chunk-WL4YO6CO.js";
|
|
11
|
+
import "../chunk-CVVPUVBD.js";
|
|
12
|
+
import "../chunk-2UWD2WZC.js";
|
|
13
|
+
import "../chunk-Q4RF7EEP.js";
|
|
14
|
+
import "../chunk-ZV32QRBR.js";
|
|
15
|
+
import "../chunk-34JHGOYO.js";
|
|
16
16
|
import "../chunk-XHKBHWLX.js";
|
|
17
17
|
import "../chunk-6ICPEJY5.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-HBUQ2EQD.js";
|
|
19
19
|
import "../chunk-GMXKITVA.js";
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-ZPTSEJMD.js";
|
|
21
|
+
import "../chunk-FSFI2PQL.js";
|
|
22
22
|
import "../chunk-7QLSKOSU.js";
|
|
23
23
|
import "../chunk-KZERVKTD.js";
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-U3DBAX7P.js";
|
|
25
|
+
import "../chunk-5IIAUWEJ.js";
|
|
26
26
|
import "../chunk-T7E75EKA.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-4GTXFYQ7.js";
|
|
28
|
+
import "../chunk-EZFE4PC3.js";
|
|
29
|
+
import "../chunk-JDUWMJDP.js";
|
|
30
30
|
|
|
31
31
|
// bin/pushary-transcript-register.ts
|
|
32
32
|
var raw = "";
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
} from "../chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
transcriptsEnabled
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-34JHGOYO.js";
|
|
10
10
|
import {
|
|
11
11
|
exitOnHelpFlag
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-DEWCUHOY.js";
|
|
13
|
+
import "../chunk-ZPTSEJMD.js";
|
|
14
14
|
import "../chunk-KZERVKTD.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-U3DBAX7P.js";
|
|
16
16
|
import "../chunk-T7E75EKA.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-4GTXFYQ7.js";
|
|
18
|
+
import "../chunk-EZFE4PC3.js";
|
|
19
|
+
import "../chunk-JDUWMJDP.js";
|
|
20
20
|
|
|
21
21
|
// bin/pushary-transcripts.ts
|
|
22
22
|
exitOnHelpFlag("transcripts");
|
|
@@ -7,28 +7,28 @@ import {
|
|
|
7
7
|
runAutoUpdate,
|
|
8
8
|
upgradeInstalledPackage,
|
|
9
9
|
withUpgradeLock
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OEMF3KJ3.js";
|
|
11
11
|
import {
|
|
12
12
|
installWithUpgradeLock
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-HPXFPXW7.js";
|
|
14
14
|
import {
|
|
15
15
|
describeCodexTrustConfirmation
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WEK6US33.js";
|
|
17
17
|
import {
|
|
18
18
|
ensureCodexTrustAfterReapply,
|
|
19
19
|
reapplyAllAgents
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-KO7UOTLD.js";
|
|
21
|
+
import "../chunk-QVUOPB32.js";
|
|
22
22
|
import {
|
|
23
23
|
waitForMachineReadiness
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import "../chunk-
|
|
24
|
+
} from "../chunk-7FVC3RGF.js";
|
|
25
|
+
import "../chunk-ZUZKHTPJ.js";
|
|
26
26
|
import {
|
|
27
27
|
detectProviderLiveCapabilities,
|
|
28
28
|
expectedLaunchCapabilities,
|
|
29
29
|
hasSpawnProvider,
|
|
30
30
|
resolveControlPolicy
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-AGW7PMMO.js";
|
|
32
32
|
import "../chunk-RIVNNBEK.js";
|
|
33
33
|
import {
|
|
34
34
|
AUTO_UPDATE_DISABLE_ENV,
|
|
@@ -38,8 +38,8 @@ import {
|
|
|
38
38
|
parseAutoUpdateFlag,
|
|
39
39
|
readAutoUpdateState,
|
|
40
40
|
updateAutoUpdateState
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
} from "../chunk-GOWCPJTP.js";
|
|
42
|
+
import "../chunk-VRYOALHQ.js";
|
|
43
43
|
import {
|
|
44
44
|
daemonHasRemoteProof,
|
|
45
45
|
daemonServiceManagerAvailable,
|
|
@@ -50,23 +50,23 @@ import {
|
|
|
50
50
|
replaceDaemonService,
|
|
51
51
|
stopDaemonService,
|
|
52
52
|
waitForDaemonRemoteProof
|
|
53
|
-
} from "../chunk-
|
|
54
|
-
import "../chunk-
|
|
53
|
+
} from "../chunk-WL4YO6CO.js";
|
|
54
|
+
import "../chunk-CVVPUVBD.js";
|
|
55
55
|
import "../chunk-XHKBHWLX.js";
|
|
56
56
|
import "../chunk-6ICPEJY5.js";
|
|
57
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-HBUQ2EQD.js";
|
|
58
58
|
import "../chunk-POFBE6ZY.js";
|
|
59
59
|
import {
|
|
60
60
|
exitOnHelpFlag
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-DEWCUHOY.js";
|
|
62
62
|
import {
|
|
63
63
|
readControlMode
|
|
64
|
-
} from "../chunk-
|
|
65
|
-
import "../chunk-
|
|
64
|
+
} from "../chunk-ZPTSEJMD.js";
|
|
65
|
+
import "../chunk-FSFI2PQL.js";
|
|
66
66
|
import {
|
|
67
67
|
EXIT
|
|
68
68
|
} from "../chunk-KZERVKTD.js";
|
|
69
|
-
import "../chunk-
|
|
69
|
+
import "../chunk-U3DBAX7P.js";
|
|
70
70
|
import {
|
|
71
71
|
LATEST_TAG,
|
|
72
72
|
autoUpdateState,
|
|
@@ -76,19 +76,19 @@ import {
|
|
|
76
76
|
fetchLatestPublishedVersion,
|
|
77
77
|
geminiSettings,
|
|
78
78
|
vscodePluginDir
|
|
79
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-5IIAUWEJ.js";
|
|
80
80
|
import "../chunk-T7E75EKA.js";
|
|
81
81
|
import {
|
|
82
82
|
getApiKey
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-4GTXFYQ7.js";
|
|
84
84
|
import {
|
|
85
85
|
NPX_LATEST_COMMAND
|
|
86
|
-
} from "../chunk-
|
|
86
|
+
} from "../chunk-EZFE4PC3.js";
|
|
87
87
|
import {
|
|
88
88
|
CANONICAL_PACKAGE,
|
|
89
89
|
LEGACY_PACKAGE,
|
|
90
90
|
getPackageVersion
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-JDUWMJDP.js";
|
|
92
92
|
|
|
93
93
|
// bin/pushary-upgrade.ts
|
|
94
94
|
import { existsSync } from "fs";
|
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,33 +4,33 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KA2GI53J.js";
|
|
8
8
|
import {
|
|
9
9
|
createIo
|
|
10
10
|
} from "../chunk-U4TMAANR.js";
|
|
11
11
|
import {
|
|
12
12
|
exitOnHelpFlag
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-DEWCUHOY.js";
|
|
14
14
|
import {
|
|
15
15
|
rejectUnknownFlags
|
|
16
16
|
} from "../chunk-GMXKITVA.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-7MO3CNBX.js";
|
|
18
|
+
import "../chunk-WRDMCP4G.js";
|
|
19
|
+
import "../chunk-FSFI2PQL.js";
|
|
20
20
|
import {
|
|
21
21
|
UsageError
|
|
22
22
|
} from "../chunk-7QLSKOSU.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT
|
|
25
25
|
} from "../chunk-KZERVKTD.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-5IIAUWEJ.js";
|
|
27
27
|
import "../chunk-T7E75EKA.js";
|
|
28
28
|
import {
|
|
29
29
|
getApiKey,
|
|
30
30
|
getBaseUrl
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
31
|
+
} from "../chunk-4GTXFYQ7.js";
|
|
32
|
+
import "../chunk-EZFE4PC3.js";
|
|
33
|
+
import "../chunk-JDUWMJDP.js";
|
|
34
34
|
|
|
35
35
|
// bin/pushary-wait.ts
|
|
36
36
|
exitOnHelpFlag("wait");
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-WRDMCP4G.js";
|
|
5
|
+
import "../chunk-FSFI2PQL.js";
|
|
6
6
|
import "../chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "../chunk-KZERVKTD.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-5IIAUWEJ.js";
|
|
11
11
|
import "../chunk-T7E75EKA.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-4GTXFYQ7.js";
|
|
13
13
|
import {
|
|
14
14
|
COMMANDS,
|
|
15
15
|
isCommandName,
|
|
16
16
|
renderHelp
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-EZFE4PC3.js";
|
|
18
18
|
import {
|
|
19
19
|
getPackageVersion
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-JDUWMJDP.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/runtime.ts
|
|
23
23
|
var supportsRuntime = (version) => {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JDUWMJDP.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -365,9 +365,9 @@ var installGlobally = (options) => {
|
|
|
365
365
|
}
|
|
366
366
|
const started = (async () => {
|
|
367
367
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
368
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
369
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
370
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
368
|
+
const { withUpgradeLock } = await import("./global-upgrade-VEQ4KQEW.js");
|
|
369
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-KFZBAPNU.js");
|
|
370
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-QTOUBV2V.js");
|
|
371
371
|
let result = "skipped";
|
|
372
372
|
const install = async () => {
|
|
373
373
|
const platform = process.platform;
|
|
@@ -510,6 +510,7 @@ var CODEX_HOOK_EVENTS = [
|
|
|
510
510
|
{ event: "PreCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 },
|
|
511
511
|
{ event: "PostCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 }
|
|
512
512
|
];
|
|
513
|
+
var CODEX_REQUIRED_APPROVAL_EVENTS = CODEX_HOOK_EVENTS.filter((event) => event.delivery === "approval").map((event) => event.event);
|
|
513
514
|
var CODEX_EVENT_KEY = {
|
|
514
515
|
PermissionRequest: "permission_request",
|
|
515
516
|
PreToolUse: "pre_tool_use",
|
|
@@ -701,11 +702,22 @@ var codexTrustGaps = (config, hooksConfig, hooksJsonPath, command, positions) =>
|
|
|
701
702
|
for (const definition of CODEX_HOOK_EVENTS) {
|
|
702
703
|
const position = positions[definition.event];
|
|
703
704
|
if (!position) continue;
|
|
704
|
-
const
|
|
705
|
+
const hookState = asRecord2(state?.[codexHookStateKey(hooksJsonPath, definition.event, position)]);
|
|
706
|
+
if (definition.delivery === "approval" && hookState?.enabled === false) {
|
|
707
|
+
gaps.push({ event: definition.event, kind: "disabled" });
|
|
708
|
+
continue;
|
|
709
|
+
}
|
|
710
|
+
const stored = hookState?.trusted_hash;
|
|
705
711
|
const eventKey = CODEX_EVENT_KEY[definition.event] ?? definition.event;
|
|
706
712
|
const onDisk = asRecord2(
|
|
707
713
|
asRecord2(hooks?.[definition.event]) ?? (Array.isArray(hooks?.[definition.event]) ? hooks[definition.event][position[0]] : void 0)
|
|
708
714
|
);
|
|
715
|
+
const handlers = onDisk?.hooks;
|
|
716
|
+
const handler = Array.isArray(handlers) ? asRecord2(handlers[position[1]]) : void 0;
|
|
717
|
+
if (definition.delivery === "approval" && handler?.async === true) {
|
|
718
|
+
gaps.push({ event: definition.event, kind: "asynchronous" });
|
|
719
|
+
continue;
|
|
720
|
+
}
|
|
709
721
|
const diskHash = onDisk ? codexEntryTrustHash(eventKey, onDisk) : void 0;
|
|
710
722
|
if (stored !== void 0 && diskHash !== void 0 && stored === diskHash) {
|
|
711
723
|
if (diskHash !== codexHookTrustHash(definition, command)) {
|
|
@@ -855,6 +867,7 @@ export {
|
|
|
855
867
|
codexAgentsMd,
|
|
856
868
|
codexSkillDir,
|
|
857
869
|
CODEX_HOOK_EVENTS,
|
|
870
|
+
CODEX_REQUIRED_APPROVAL_EVENTS,
|
|
858
871
|
addCodexMcpServer,
|
|
859
872
|
readCodexMcpAuth,
|
|
860
873
|
isPusharyCodexCommand,
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AGW7PMMO.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WL4YO6CO.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZPTSEJMD.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FSFI2PQL.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4GTXFYQ7.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JDUWMJDP.js";
|
|
27
27
|
|
|
28
28
|
// src/machines.ts
|
|
29
29
|
import { hostname } from "os";
|
|
@@ -67,7 +67,11 @@ var parseMachine = (value) => {
|
|
|
67
67
|
online: raw.online === true
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
var
|
|
70
|
+
var serverClockOffsetMs = (response, receivedAt) => {
|
|
71
|
+
const serverTime = Date.parse(response.headers.get("date") ?? "");
|
|
72
|
+
return Number.isFinite(serverTime) ? serverTime - receivedAt : 0;
|
|
73
|
+
};
|
|
74
|
+
var machineReadiness = (machines, machineId, expectedCapabilities, now = Date.now(), clockOffsetMs = 0) => {
|
|
71
75
|
const machine = machines.find((item) => item.machineId === machineId);
|
|
72
76
|
if (!machine) return { kind: "not-ready", detail: "this machine has not heartbeated to the server" };
|
|
73
77
|
if (!machine.online) return { kind: "not-ready", detail: "the server reports this machine offline" };
|
|
@@ -77,15 +81,15 @@ var machineReadiness = (machines, machineId, expectedCapabilities, now = Date.no
|
|
|
77
81
|
if (machine.lastControlAt === null || !Number.isFinite(Date.parse(machine.lastControlAt))) {
|
|
78
82
|
return { kind: "not-ready", detail: "the server has not observed this machine polling the control queue" };
|
|
79
83
|
}
|
|
80
|
-
if (!daemonHasRemoteProof({ kind: "running", lastSuccessfulHeartbeatAt: machine.lastSeenAt, lastSuccessfulControlAt: machine.lastControlAt }, now)) {
|
|
84
|
+
if (!daemonHasRemoteProof({ kind: "running", lastSuccessfulHeartbeatAt: machine.lastSeenAt, lastSuccessfulControlAt: machine.lastControlAt }, now + clockOffsetMs)) {
|
|
81
85
|
return { kind: "not-ready", detail: "the heartbeat or control-queue proof is stale; wake this machine and retry pushary doctor" };
|
|
82
86
|
}
|
|
83
87
|
const missing = expectedCapabilities.filter((capability) => !machine.capabilities.includes(capability));
|
|
84
|
-
return missing.length === 0 ? { kind: "ready", machine } : { kind: "not-ready", detail: `the server is missing capabilities: ${missing.join(", ")}` };
|
|
88
|
+
return missing.length === 0 ? { kind: "ready", machine, clockOffsetMs } : { kind: "not-ready", detail: `the server is missing capabilities: ${missing.join(", ")}` };
|
|
85
89
|
};
|
|
86
90
|
var readMachineReadiness = async (apiKey, expectedCapabilities, deps = {}) => {
|
|
87
91
|
const listed = await listMachines(apiKey, deps);
|
|
88
|
-
return listed.kind === "ok" ? machineReadiness(listed.machines, deps.machineId ?? getMachineId(), expectedCapabilities, deps.now?.()) : listed.kind === "unsupported" ? { kind: "unsupported", detail: "the server does not report machine readiness yet" } : listed;
|
|
92
|
+
return listed.kind === "ok" ? machineReadiness(listed.machines, deps.machineId ?? getMachineId(), expectedCapabilities, deps.now?.(), listed.clockOffsetMs) : listed.kind === "unsupported" ? { kind: "unsupported", detail: "the server does not report machine readiness yet" } : listed;
|
|
89
93
|
};
|
|
90
94
|
var waitForMachineReadiness = async (apiKey, expectedCapabilities, deps = {}) => {
|
|
91
95
|
const attempts = deps.attempts ?? 21;
|
|
@@ -106,11 +110,12 @@ var listMachines = async (apiKey, deps = {}) => {
|
|
|
106
110
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
107
111
|
signal: AbortSignal.timeout(1e4)
|
|
108
112
|
});
|
|
113
|
+
const clockOffsetMs = serverClockOffsetMs(res, (deps.now ?? Date.now)());
|
|
109
114
|
if (res.status === 404) return { kind: "unsupported" };
|
|
110
115
|
if (!res.ok) return { kind: "failed", detail: `HTTP ${res.status}` };
|
|
111
116
|
const body = await res.json().catch(() => null);
|
|
112
117
|
const list = body && Array.isArray(body.machines) ? body.machines : [];
|
|
113
|
-
return { kind: "ok", machines: list.map(parseMachine).filter((m) => m !== null) };
|
|
118
|
+
return { kind: "ok", machines: list.map(parseMachine).filter((m) => m !== null), clockOffsetMs };
|
|
114
119
|
} catch (err) {
|
|
115
120
|
return { kind: "failed", detail: err instanceof Error ? err.message : "network error" };
|
|
116
121
|
}
|
|
@@ -136,7 +141,7 @@ var readManagedControlEvidence = (apiKey, providers, serverProof) => {
|
|
|
136
141
|
const keyCurrent = Boolean(apiKey) && readKeySource().key === apiKey && readDaemonNeedsLogin().kind !== "blocked";
|
|
137
142
|
const policy = resolveControlPolicy({ mode: readControlMode(), providerAvailable, managerAvailable, servicePresent: serviceInstalled || daemon.kind !== "absent" });
|
|
138
143
|
const localProof = daemonHasRemoteProof(daemon, now);
|
|
139
|
-
const remote = serverProof?.kind === "ready" ? machineReadiness([serverProof.machine], daemon.machineId ?? "", expectedLaunchCapabilities(providers), now) : serverProof;
|
|
144
|
+
const remote = serverProof?.kind === "ready" ? machineReadiness([serverProof.machine], daemon.machineId ?? "", expectedLaunchCapabilities(providers), now, serverProof.clockOffsetMs) : serverProof;
|
|
140
145
|
return {
|
|
141
146
|
ready: keyCurrent && policy === "enabled" && providerAvailable && managerAvailable && serviceInstalled && localProof && remote?.kind === "ready",
|
|
142
147
|
keyCurrent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WRDMCP4G.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4GTXFYQ7.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JDUWMJDP.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5IIAUWEJ.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JDUWMJDP.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GB2U4QVF.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDaemonRunning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WL4YO6CO.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
wrapSessionKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Q4RF7EEP.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchTranscriptRecipients,
|
|
21
21
|
uploadTranscriptRecords
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZV32QRBR.js";
|
|
23
23
|
import {
|
|
24
24
|
transcriptEnvironmentPreference,
|
|
25
25
|
transcriptsEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-34JHGOYO.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ZPTSEJMD.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-5IIAUWEJ.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-T7E75EKA.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-4GTXFYQ7.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -14,18 +14,19 @@ import {
|
|
|
14
14
|
} from "./chunk-U4TMAANR.js";
|
|
15
15
|
import {
|
|
16
16
|
callMcpTool
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SJC5TXK7.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-U3DBAX7P.js";
|
|
21
21
|
import {
|
|
22
22
|
NPX_LATEST_COMMAND
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EZFE4PC3.js";
|
|
24
24
|
import {
|
|
25
25
|
NO_PAIRING_COMPUTER,
|
|
26
26
|
PAIR_TTL_SECONDS,
|
|
27
|
+
classifyConfirmResponse,
|
|
27
28
|
isAnswerSource
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JDUWMJDP.js";
|
|
29
30
|
|
|
30
31
|
// src/reach.ts
|
|
31
32
|
var reachVerdict = (channels) => {
|
|
@@ -206,8 +207,8 @@ var defaultCancel = async (apiKey, correlationId) => {
|
|
|
206
207
|
});
|
|
207
208
|
};
|
|
208
209
|
var answeredRoundTrip = (answer, correlationId, latencyMs) => {
|
|
209
|
-
if (answer.value
|
|
210
|
-
return { kind: "error", detail: "the server reported an answer without a valid Yes or
|
|
210
|
+
if (answer.value === void 0 || classifyConfirmResponse(answer.value) === null) {
|
|
211
|
+
return { kind: "error", detail: "the server reported an answer without a valid Yes, No or defer value" };
|
|
211
212
|
}
|
|
212
213
|
return {
|
|
213
214
|
kind: "answered",
|
|
@@ -14,36 +14,36 @@ import {
|
|
|
14
14
|
IDLE_PROMPT_NOTIFICATION,
|
|
15
15
|
NOTIFICATION_PUSH_TYPES,
|
|
16
16
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HBUQ2EQD.js";
|
|
18
18
|
import {
|
|
19
19
|
cancelQuestion,
|
|
20
20
|
isPolicyConfig,
|
|
21
21
|
sendNotification,
|
|
22
22
|
waitForAnswer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UWMEY4RS.js";
|
|
24
24
|
import {
|
|
25
25
|
clientErrorKindOf,
|
|
26
26
|
reportClientError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PPC4FZKJ.js";
|
|
28
28
|
import {
|
|
29
29
|
withRetry
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SJC5TXK7.js";
|
|
31
31
|
import {
|
|
32
32
|
getMachineId
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FSFI2PQL.js";
|
|
34
34
|
import {
|
|
35
35
|
reportedInstallSource
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-U3DBAX7P.js";
|
|
37
37
|
import {
|
|
38
38
|
canonicalJson
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5IIAUWEJ.js";
|
|
40
40
|
import {
|
|
41
41
|
writeFileAtomic
|
|
42
42
|
} from "./chunk-T7E75EKA.js";
|
|
43
43
|
import {
|
|
44
44
|
getApiKey,
|
|
45
45
|
getBaseUrl
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4GTXFYQ7.js";
|
|
47
47
|
import {
|
|
48
48
|
ACTION_BODY_MAX,
|
|
49
49
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
resolvePolicy,
|
|
71
71
|
toToolLookup,
|
|
72
72
|
truncateLine
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-JDUWMJDP.js";
|
|
74
74
|
|
|
75
75
|
// src/policy.ts
|
|
76
76
|
import { createHash } from "crypto";
|
|
@@ -576,6 +576,7 @@ var rawActionBody = (toolName, toolInput) => {
|
|
|
576
576
|
if (toolName === "Bash" || toolName === "PowerShell" || toolName === "Monitor" || toolName === "run_shell_command" || toolName === "shell" || toolName === "apply_patch") {
|
|
577
577
|
return firstString(toolInput.command);
|
|
578
578
|
}
|
|
579
|
+
if (toolName === "write_stdin" || toolName === "request_permissions") return JSON.stringify(toolInput, null, 2);
|
|
579
580
|
return firstString(toolInput.url, toolInput.href);
|
|
580
581
|
};
|
|
581
582
|
var deriveActionBody = (toolName, toolInput) => {
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HBUQ2EQD.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5IIAUWEJ.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JDUWMJDP.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|