@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.
Files changed (105) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +4 -0
  4. package/data/cursor-plugin/scripts/pushary-gate.mjs +1 -1
  5. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  6. package/data/vscode-plugin/CHANGELOG.md +4 -0
  7. package/data/vscode-plugin/scripts/pushary-gate.mjs +1 -1
  8. package/dist/bin/pushary-bell-hook.js +23 -23
  9. package/dist/bin/pushary-bell.js +9 -9
  10. package/dist/bin/pushary-claude.js +26 -26
  11. package/dist/bin/pushary-clean.js +28 -28
  12. package/dist/bin/pushary-codex-bridge.js +18 -18
  13. package/dist/bin/pushary-codex-hook.js +31 -31
  14. package/dist/bin/pushary-codex.js +13 -13
  15. package/dist/bin/pushary-connect.js +13 -13
  16. package/dist/bin/pushary-cowork.js +5 -5
  17. package/dist/bin/pushary-daemon.js +26 -26
  18. package/dist/bin/pushary-disconnect.js +18 -18
  19. package/dist/bin/pushary-doctor.js +99 -48
  20. package/dist/bin/pushary-elicitation-hook.js +25 -25
  21. package/dist/bin/pushary-gemini-bridge.js +13 -13
  22. package/dist/bin/pushary-gemini-hook.js +28 -28
  23. package/dist/bin/pushary-hook.js +32 -32
  24. package/dist/bin/pushary-login.js +26 -23
  25. package/dist/bin/pushary-logout.js +7 -7
  26. package/dist/bin/pushary-mcp.js +9 -9
  27. package/dist/bin/pushary-mode.js +9 -9
  28. package/dist/bin/pushary-notification-hook.js +28 -28
  29. package/dist/bin/pushary-opencode-hook.js +27 -27
  30. package/dist/bin/pushary-permission-denied-hook.js +32 -32
  31. package/dist/bin/pushary-permission-hook.js +31 -31
  32. package/dist/bin/pushary-post-hook.js +28 -28
  33. package/dist/bin/pushary-prompt-hook.js +28 -28
  34. package/dist/bin/pushary-session-end-hook.js +28 -28
  35. package/dist/bin/pushary-session-start-hook.js +31 -31
  36. package/dist/bin/pushary-setup.js +69 -52
  37. package/dist/bin/pushary-stats.js +5 -5
  38. package/dist/bin/pushary-status.js +15 -15
  39. package/dist/bin/pushary-stop-hook.js +28 -28
  40. package/dist/bin/pushary-stopfailure-hook.js +28 -28
  41. package/dist/bin/pushary-suggestions.js +4 -4
  42. package/dist/bin/pushary-transcript-register.js +19 -19
  43. package/dist/bin/pushary-transcripts.js +7 -7
  44. package/dist/bin/pushary-upgrade.js +21 -21
  45. package/dist/bin/pushary-wait.js +9 -9
  46. package/dist/bin/pushary.js +6 -6
  47. package/dist/{chunk-COSADFEH.js → chunk-2UWD2WZC.js} +1 -1
  48. package/dist/{chunk-7ER66HZH.js → chunk-34JHGOYO.js} +1 -1
  49. package/dist/{chunk-4SB46XLF.js → chunk-4GTXFYQ7.js} +1 -1
  50. package/dist/{chunk-P7YDVWLL.js → chunk-552AGATI.js} +1 -1
  51. package/dist/{chunk-ZMKEKWNR.js → chunk-5IIAUWEJ.js} +18 -5
  52. package/dist/{chunk-AKCJ5SNO.js → chunk-7FVC3RGF.js} +17 -12
  53. package/dist/{chunk-DMA3QUOB.js → chunk-7MO3CNBX.js} +3 -3
  54. package/dist/{chunk-IITCMJ4G.js → chunk-AGW7PMMO.js} +2 -2
  55. package/dist/{chunk-WWDPULS3.js → chunk-AMFNJPJ5.js} +8 -8
  56. package/dist/{chunk-LJI7U6PM.js → chunk-AUS3LY4N.js} +2 -2
  57. package/dist/{chunk-RS4ZOFSF.js → chunk-BPGATW2F.js} +7 -6
  58. package/dist/{chunk-JCER3Q6P.js → chunk-CJFVYYKM.js} +10 -9
  59. package/dist/{chunk-D3RS57MN.js → chunk-CVVPUVBD.js} +3 -3
  60. package/dist/{chunk-JGQ2ANHQ.js → chunk-DEWCUHOY.js} +2 -2
  61. package/dist/chunk-EO23EUOK.js +14 -0
  62. package/dist/{chunk-FVOCQSBG.js → chunk-EZFE4PC3.js} +1 -1
  63. package/dist/{chunk-LXWUYG7D.js → chunk-FANGHYW5.js} +1 -1
  64. package/dist/{chunk-SKEP3M6M.js → chunk-FLUECSUC.js} +2 -2
  65. package/dist/{chunk-J7JXA2LX.js → chunk-FSFI2PQL.js} +1 -1
  66. package/dist/{chunk-UPTEPARD.js → chunk-G2YXIZZS.js} +2 -2
  67. package/dist/{chunk-65TOHCXT.js → chunk-GB2U4QVF.js} +4 -4
  68. package/dist/{chunk-CE4UH4AP.js → chunk-GOWCPJTP.js} +7 -5
  69. package/dist/{chunk-RNDFGHSQ.js → chunk-HBUQ2EQD.js} +1 -1
  70. package/dist/{chunk-GHKNUQYU.js → chunk-HIQNUBWO.js} +2 -2
  71. package/dist/{chunk-QXL27RY6.js → chunk-HPXFPXW7.js} +1 -1
  72. package/dist/{chunk-CGRPHFOV.js → chunk-IVF3OVR2.js} +1 -1
  73. package/dist/{chunk-XEIV5QOT.js → chunk-JDUWMJDP.js} +118 -170
  74. package/dist/{chunk-V4H33GBM.js → chunk-JM2MCYRZ.js} +6 -6
  75. package/dist/{chunk-LZMH4EGE.js → chunk-KA2GI53J.js} +1 -1
  76. package/dist/{chunk-SWGY5WNX.js → chunk-KO7UOTLD.js} +5 -5
  77. package/dist/{chunk-HU2LWGEE.js → chunk-MH6SJHUE.js} +1 -1
  78. package/dist/{chunk-XW2B4QV2.js → chunk-NGD7H3GZ.js} +2 -2
  79. package/dist/{chunk-UYHLMBPQ.js → chunk-NP5RJL34.js} +1 -1
  80. package/dist/{chunk-IJXJW2VH.js → chunk-NZJ5LFMX.js} +10 -10
  81. package/dist/{chunk-QQJCDRD3.js → chunk-OEMF3KJ3.js} +5 -5
  82. package/dist/{chunk-6L7TNZ43.js → chunk-OXJRUMZT.js} +1 -1
  83. package/dist/{chunk-C6PPDKVI.js → chunk-P3REVSM5.js} +3 -3
  84. package/dist/{chunk-SPB3QRE7.js → chunk-PPC4FZKJ.js} +4 -4
  85. package/dist/{chunk-FJPC35OW.js → chunk-Q4RF7EEP.js} +1 -1
  86. package/dist/{chunk-4XT4JXMG.js → chunk-Q7FLA4N3.js} +1 -1
  87. package/dist/{chunk-LKKYRNJT.js → chunk-Q7KSRRQ4.js} +1 -1
  88. package/dist/{chunk-KR5JASA4.js → chunk-QVUOPB32.js} +44 -16
  89. package/dist/{chunk-VH6763OR.js → chunk-SJC5TXK7.js} +3 -3
  90. package/dist/{chunk-6QSDNXGM.js → chunk-U3DBAX7P.js} +2 -2
  91. package/dist/{chunk-JHZAZAI3.js → chunk-UWMEY4RS.js} +5 -5
  92. package/dist/{chunk-NVLXK2I6.js → chunk-VRPNTJX3.js} +5 -5
  93. package/dist/{chunk-5K43TBK4.js → chunk-VRYOALHQ.js} +3 -3
  94. package/dist/{chunk-VQLWYKX7.js → chunk-WEK6US33.js} +1 -1
  95. package/dist/{chunk-PEGKBNGN.js → chunk-WL4YO6CO.js} +5 -5
  96. package/dist/{chunk-6JTTJIKJ.js → chunk-WRDMCP4G.js} +3 -3
  97. package/dist/{chunk-RJ7ECJSZ.js → chunk-ZPTSEJMD.js} +4 -2
  98. package/dist/{chunk-6Q4NM2LW.js → chunk-ZUZKHTPJ.js} +3 -3
  99. package/dist/{chunk-PMS3EBD2.js → chunk-ZV32QRBR.js} +1 -1
  100. package/dist/{global-upgrade-ML2RHV4W.js → global-upgrade-VEQ4KQEW.js} +6 -6
  101. package/dist/{paths-LG3IEDDM.js → paths-QTOUBV2V.js} +2 -2
  102. package/dist/{reapply-7PFOITE4.js → reapply-T5PLCAGP.js} +8 -8
  103. package/dist/src/index.js +20 -20
  104. package/dist/{upgrade-lock-2A2YUUEU.js → upgrade-lock-KFZBAPNU.js} +3 -3
  105. package/package.json +1 -1
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerTranscript
4
- } from "../chunk-WWDPULS3.js";
4
+ } from "../chunk-AMFNJPJ5.js";
5
5
  import "../chunk-SGZJ5LYH.js";
6
- import "../chunk-65TOHCXT.js";
7
- import "../chunk-HU2LWGEE.js";
8
- import "../chunk-LXWUYG7D.js";
9
- import "../chunk-5K43TBK4.js";
10
- import "../chunk-PEGKBNGN.js";
11
- import "../chunk-D3RS57MN.js";
12
- import "../chunk-COSADFEH.js";
13
- import "../chunk-FJPC35OW.js";
14
- import "../chunk-PMS3EBD2.js";
15
- import "../chunk-7ER66HZH.js";
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-RNDFGHSQ.js";
18
+ import "../chunk-HBUQ2EQD.js";
19
19
  import "../chunk-GMXKITVA.js";
20
- import "../chunk-RJ7ECJSZ.js";
21
- import "../chunk-J7JXA2LX.js";
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-6QSDNXGM.js";
25
- import "../chunk-ZMKEKWNR.js";
24
+ import "../chunk-U3DBAX7P.js";
25
+ import "../chunk-5IIAUWEJ.js";
26
26
  import "../chunk-T7E75EKA.js";
27
- import "../chunk-4SB46XLF.js";
28
- import "../chunk-FVOCQSBG.js";
29
- import "../chunk-XEIV5QOT.js";
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-7ER66HZH.js";
9
+ } from "../chunk-34JHGOYO.js";
10
10
  import {
11
11
  exitOnHelpFlag
12
- } from "../chunk-JGQ2ANHQ.js";
13
- import "../chunk-RJ7ECJSZ.js";
12
+ } from "../chunk-DEWCUHOY.js";
13
+ import "../chunk-ZPTSEJMD.js";
14
14
  import "../chunk-KZERVKTD.js";
15
- import "../chunk-6QSDNXGM.js";
15
+ import "../chunk-U3DBAX7P.js";
16
16
  import "../chunk-T7E75EKA.js";
17
- import "../chunk-4SB46XLF.js";
18
- import "../chunk-FVOCQSBG.js";
19
- import "../chunk-XEIV5QOT.js";
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-QQJCDRD3.js";
10
+ } from "../chunk-OEMF3KJ3.js";
11
11
  import {
12
12
  installWithUpgradeLock
13
- } from "../chunk-QXL27RY6.js";
13
+ } from "../chunk-HPXFPXW7.js";
14
14
  import {
15
15
  describeCodexTrustConfirmation
16
- } from "../chunk-VQLWYKX7.js";
16
+ } from "../chunk-WEK6US33.js";
17
17
  import {
18
18
  ensureCodexTrustAfterReapply,
19
19
  reapplyAllAgents
20
- } from "../chunk-SWGY5WNX.js";
21
- import "../chunk-KR5JASA4.js";
20
+ } from "../chunk-KO7UOTLD.js";
21
+ import "../chunk-QVUOPB32.js";
22
22
  import {
23
23
  waitForMachineReadiness
24
- } from "../chunk-AKCJ5SNO.js";
25
- import "../chunk-6Q4NM2LW.js";
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-IITCMJ4G.js";
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-CE4UH4AP.js";
42
- import "../chunk-5K43TBK4.js";
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-PEGKBNGN.js";
54
- import "../chunk-D3RS57MN.js";
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-RNDFGHSQ.js";
57
+ import "../chunk-HBUQ2EQD.js";
58
58
  import "../chunk-POFBE6ZY.js";
59
59
  import {
60
60
  exitOnHelpFlag
61
- } from "../chunk-JGQ2ANHQ.js";
61
+ } from "../chunk-DEWCUHOY.js";
62
62
  import {
63
63
  readControlMode
64
- } from "../chunk-RJ7ECJSZ.js";
65
- import "../chunk-J7JXA2LX.js";
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-6QSDNXGM.js";
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-ZMKEKWNR.js";
79
+ } from "../chunk-5IIAUWEJ.js";
80
80
  import "../chunk-T7E75EKA.js";
81
81
  import {
82
82
  getApiKey
83
- } from "../chunk-4SB46XLF.js";
83
+ } from "../chunk-4GTXFYQ7.js";
84
84
  import {
85
85
  NPX_LATEST_COMMAND
86
- } from "../chunk-FVOCQSBG.js";
86
+ } from "../chunk-EZFE4PC3.js";
87
87
  import {
88
88
  CANONICAL_PACKAGE,
89
89
  LEGACY_PACKAGE,
90
90
  getPackageVersion
91
- } from "../chunk-XEIV5QOT.js";
91
+ } from "../chunk-JDUWMJDP.js";
92
92
 
93
93
  // bin/pushary-upgrade.ts
94
94
  import { existsSync } from "fs";
@@ -4,33 +4,33 @@ import {
4
4
  } from "../chunk-CVWG2N3Y.js";
5
5
  import {
6
6
  exitOnFailedResponse
7
- } from "../chunk-LZMH4EGE.js";
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-JGQ2ANHQ.js";
13
+ } from "../chunk-DEWCUHOY.js";
14
14
  import {
15
15
  rejectUnknownFlags
16
16
  } from "../chunk-GMXKITVA.js";
17
- import "../chunk-DMA3QUOB.js";
18
- import "../chunk-6JTTJIKJ.js";
19
- import "../chunk-J7JXA2LX.js";
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-ZMKEKWNR.js";
26
+ import "../chunk-5IIAUWEJ.js";
27
27
  import "../chunk-T7E75EKA.js";
28
28
  import {
29
29
  getApiKey,
30
30
  getBaseUrl
31
- } from "../chunk-4SB46XLF.js";
32
- import "../chunk-FVOCQSBG.js";
33
- import "../chunk-XEIV5QOT.js";
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");
@@ -1,23 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  installNetworkDefaults
4
- } from "../chunk-6JTTJIKJ.js";
5
- import "../chunk-J7JXA2LX.js";
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-ZMKEKWNR.js";
10
+ import "../chunk-5IIAUWEJ.js";
11
11
  import "../chunk-T7E75EKA.js";
12
- import "../chunk-4SB46XLF.js";
12
+ import "../chunk-4GTXFYQ7.js";
13
13
  import {
14
14
  COMMANDS,
15
15
  isCommandName,
16
16
  renderHelp
17
- } from "../chunk-FVOCQSBG.js";
17
+ } from "../chunk-EZFE4PC3.js";
18
18
  import {
19
19
  getPackageVersion
20
- } from "../chunk-XEIV5QOT.js";
20
+ } from "../chunk-JDUWMJDP.js";
21
21
 
22
22
  // src/cli/runtime.ts
23
23
  var supportsRuntime = (version) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-ZMKEKWNR.js";
3
+ } from "./chunk-5IIAUWEJ.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readTranscriptPreference
3
- } from "./chunk-RJ7ECJSZ.js";
3
+ } from "./chunk-ZPTSEJMD.js";
4
4
 
5
5
  // src/transcript-setting.ts
6
6
  var transcriptEnvironmentPreference = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-FVOCQSBG.js";
3
+ } from "./chunk-EZFE4PC3.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-XEIV5QOT.js";
3
+ } from "./chunk-JDUWMJDP.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -13,7 +13,7 @@ import {
13
13
  isReleaseVersion,
14
14
  ownPackageName,
15
15
  withHookHoldBudget
16
- } from "./chunk-XEIV5QOT.js";
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-ML2RHV4W.js");
369
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-2A2YUUEU.js");
370
- const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-LG3IEDDM.js");
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 stored = asRecord2(state?.[codexHookStateKey(hooksJsonPath, definition.event, position)])?.trusted_hash;
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-IITCMJ4G.js";
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-PEGKBNGN.js";
13
+ } from "./chunk-WL4YO6CO.js";
14
14
  import {
15
15
  readControlMode,
16
16
  readKeySource
17
- } from "./chunk-RJ7ECJSZ.js";
17
+ } from "./chunk-ZPTSEJMD.js";
18
18
  import {
19
19
  getMachineId
20
- } from "./chunk-J7JXA2LX.js";
20
+ } from "./chunk-FSFI2PQL.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-4SB46XLF.js";
23
+ } from "./chunk-4GTXFYQ7.js";
24
24
  import {
25
25
  getPackageVersion
26
- } from "./chunk-XEIV5QOT.js";
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 machineReadiness = (machines, machineId, expectedCapabilities, now = Date.now()) => {
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-6JTTJIKJ.js";
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-4SB46XLF.js";
12
+ } from "./chunk-4GTXFYQ7.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-XEIV5QOT.js";
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-ZMKEKWNR.js";
13
+ } from "./chunk-5IIAUWEJ.js";
14
14
  import {
15
15
  MANAGED_PROVIDERS
16
- } from "./chunk-XEIV5QOT.js";
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-65TOHCXT.js";
9
+ } from "./chunk-GB2U4QVF.js";
10
10
  import {
11
11
  ensureDaemonRunning
12
- } from "./chunk-PEGKBNGN.js";
12
+ } from "./chunk-WL4YO6CO.js";
13
13
  import {
14
14
  buildTranscriptRecords,
15
15
  decodePublicKey,
16
16
  generateSessionKey,
17
17
  wrapSessionKey
18
- } from "./chunk-FJPC35OW.js";
18
+ } from "./chunk-Q4RF7EEP.js";
19
19
  import {
20
20
  fetchTranscriptRecipients,
21
21
  uploadTranscriptRecords
22
- } from "./chunk-PMS3EBD2.js";
22
+ } from "./chunk-ZV32QRBR.js";
23
23
  import {
24
24
  transcriptEnvironmentPreference,
25
25
  transcriptsEnabled
26
- } from "./chunk-7ER66HZH.js";
26
+ } from "./chunk-34JHGOYO.js";
27
27
  import {
28
28
  readTranscriptPreference
29
- } from "./chunk-RJ7ECJSZ.js";
29
+ } from "./chunk-ZPTSEJMD.js";
30
30
  import {
31
31
  codexHome,
32
32
  pusharyDir
33
- } from "./chunk-ZMKEKWNR.js";
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-4SB46XLF.js";
40
+ } from "./chunk-4GTXFYQ7.js";
41
41
 
42
42
  // src/transcript-registration.ts
43
43
  import { createHash } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-VH6763OR.js";
3
+ } from "./chunk-SJC5TXK7.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-FVOCQSBG.js";
6
+ } from "./chunk-EZFE4PC3.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -14,18 +14,19 @@ import {
14
14
  } from "./chunk-U4TMAANR.js";
15
15
  import {
16
16
  callMcpTool
17
- } from "./chunk-VH6763OR.js";
17
+ } from "./chunk-SJC5TXK7.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-6QSDNXGM.js";
20
+ } from "./chunk-U3DBAX7P.js";
21
21
  import {
22
22
  NPX_LATEST_COMMAND
23
- } from "./chunk-FVOCQSBG.js";
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-XEIV5QOT.js";
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 !== "yes" && answer.value !== "no") {
210
- return { kind: "error", detail: "the server reported an answer without a valid Yes or No value" };
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-RNDFGHSQ.js";
17
+ } from "./chunk-HBUQ2EQD.js";
18
18
  import {
19
19
  cancelQuestion,
20
20
  isPolicyConfig,
21
21
  sendNotification,
22
22
  waitForAnswer
23
- } from "./chunk-JHZAZAI3.js";
23
+ } from "./chunk-UWMEY4RS.js";
24
24
  import {
25
25
  clientErrorKindOf,
26
26
  reportClientError
27
- } from "./chunk-SPB3QRE7.js";
27
+ } from "./chunk-PPC4FZKJ.js";
28
28
  import {
29
29
  withRetry
30
- } from "./chunk-VH6763OR.js";
30
+ } from "./chunk-SJC5TXK7.js";
31
31
  import {
32
32
  getMachineId
33
- } from "./chunk-J7JXA2LX.js";
33
+ } from "./chunk-FSFI2PQL.js";
34
34
  import {
35
35
  reportedInstallSource
36
- } from "./chunk-6QSDNXGM.js";
36
+ } from "./chunk-U3DBAX7P.js";
37
37
  import {
38
38
  canonicalJson
39
- } from "./chunk-ZMKEKWNR.js";
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-4SB46XLF.js";
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-XEIV5QOT.js";
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-RNDFGHSQ.js";
8
+ } from "./chunk-HBUQ2EQD.js";
9
9
  import {
10
10
  isProtectedByScope,
11
11
  registerHookEntry
12
- } from "./chunk-ZMKEKWNR.js";
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-XEIV5QOT.js";
17
+ } from "./chunk-JDUWMJDP.js";
18
18
 
19
19
  // src/gemini-config.ts
20
20
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";