@pushary/agent-hooks 0.86.0 → 0.87.0

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 (58) hide show
  1. package/dist/bin/pushary-bell-hook.js +4 -4
  2. package/dist/bin/pushary-bell.js +6 -6
  3. package/dist/bin/pushary-claude.js +12 -10
  4. package/dist/bin/pushary-clean.js +6 -6
  5. package/dist/bin/pushary-codex-bridge.js +5 -5
  6. package/dist/bin/pushary-codex-hook.js +13 -29
  7. package/dist/bin/pushary-codex.js +6 -4
  8. package/dist/bin/pushary-connect.js +6 -6
  9. package/dist/bin/pushary-daemon.js +4 -4
  10. package/dist/bin/pushary-disconnect.js +22 -8
  11. package/dist/bin/pushary-doctor.js +21 -15
  12. package/dist/bin/pushary-elicitation-hook.d.ts +1 -0
  13. package/dist/bin/pushary-elicitation-hook.js +210 -0
  14. package/dist/bin/pushary-gemini-bridge.js +5 -5
  15. package/dist/bin/pushary-gemini-hook.js +10 -8
  16. package/dist/bin/pushary-hook.js +6 -5
  17. package/dist/bin/pushary-login.js +4 -4
  18. package/dist/bin/pushary-logout.js +4 -4
  19. package/dist/bin/pushary-mode.js +3 -3
  20. package/dist/bin/pushary-notification-hook.js +4 -3
  21. package/dist/bin/pushary-permission-denied-hook.js +6 -5
  22. package/dist/bin/pushary-permission-hook.js +6 -5
  23. package/dist/bin/pushary-post-hook.js +4 -3
  24. package/dist/bin/pushary-prompt-hook.js +4 -3
  25. package/dist/bin/pushary-session-end-hook.js +4 -3
  26. package/dist/bin/pushary-session-start-hook.js +4 -3
  27. package/dist/bin/pushary-setup.js +19 -15
  28. package/dist/bin/pushary-stats.js +2 -2
  29. package/dist/bin/pushary-status.js +5 -5
  30. package/dist/bin/pushary-stop-hook.js +4 -3
  31. package/dist/bin/pushary-stopfailure-hook.js +4 -3
  32. package/dist/bin/pushary-upgrade.js +8 -7
  33. package/dist/bin/pushary-wait.js +3 -3
  34. package/dist/{chunk-5EUZYWID.js → chunk-2T3GX7WG.js} +1 -1
  35. package/dist/{chunk-GK4CED6Z.js → chunk-5646VKR4.js} +7 -3
  36. package/dist/{chunk-MNQI6ZZU.js → chunk-7MBDFNUC.js} +1 -1
  37. package/dist/{chunk-CY4TZK5O.js → chunk-7YJS2VTG.js} +31 -4
  38. package/dist/{chunk-PZR4XMFU.js → chunk-A3PFIWWN.js} +1 -1
  39. package/dist/{chunk-2TZCZ7CL.js → chunk-A4I5JGCW.js} +1 -1
  40. package/dist/{chunk-VPJAAGD4.js → chunk-B3V2H6SA.js} +37 -17
  41. package/dist/{chunk-XPAGN3SC.js → chunk-ECEUMWBH.js} +1 -1
  42. package/dist/{chunk-2255DZ74.js → chunk-HAUTLCMA.js} +1 -1
  43. package/dist/{chunk-S3UD7O35.js → chunk-HJ44HIUW.js} +12 -28
  44. package/dist/{chunk-QW27ZFA4.js → chunk-IWL5LWIE.js} +1 -1
  45. package/dist/chunk-J3YDT4HM.js +128 -0
  46. package/dist/{chunk-N52CIK47.js → chunk-JAICP7BA.js} +1 -1
  47. package/dist/{chunk-HSGEEBBL.js → chunk-M7RYIZX6.js} +3 -3
  48. package/dist/{chunk-7G5VO76N.js → chunk-OT4YD54Q.js} +1 -1
  49. package/dist/{chunk-VZNDR3Z7.js → chunk-QBWYNVKY.js} +1 -1
  50. package/dist/{chunk-MTKR4YLW.js → chunk-SJVLFIYP.js} +1 -1
  51. package/dist/{chunk-33T5OOKP.js → chunk-V2XPF77V.js} +96 -161
  52. package/dist/{chunk-FOY5FISQ.js → chunk-WLLBFDVY.js} +1 -1
  53. package/dist/{chunk-Q7N3XGWM.js → chunk-XW5CHAQX.js} +2 -2
  54. package/dist/{chunk-7C5CJC3H.js → chunk-Y3UTTFTZ.js} +1 -1
  55. package/dist/{chunk-2C6B6V2U.js → chunk-ZZE6FN7T.js} +1 -1
  56. package/dist/src/index.d.ts +2 -2
  57. package/dist/src/index.js +10 -8
  58. package/package.json +3 -1
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-5EUZYWID.js";
4
+ } from "../chunk-2T3GX7WG.js";
5
5
  import {
6
6
  readHookInput
7
7
  } from "../chunk-6CUUA7HO.js";
8
- import "../chunk-7G5VO76N.js";
8
+ import "../chunk-OT4YD54Q.js";
9
9
  import "../chunk-BC3VCZ3E.js";
10
10
  import "../chunk-6MTNS63X.js";
11
- import "../chunk-7C5CJC3H.js";
11
+ import "../chunk-Y3UTTFTZ.js";
12
12
  import "../chunk-2UMNXADU.js";
13
- import "../chunk-CY4TZK5O.js";
13
+ import "../chunk-7YJS2VTG.js";
14
14
 
15
15
  // bin/pushary-bell-hook.ts
16
16
  var main = async () => {
@@ -5,18 +5,18 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-5EUZYWID.js";
8
+ } from "../chunk-2T3GX7WG.js";
9
9
  import {
10
10
  guardBinary
11
- } from "../chunk-HSGEEBBL.js";
11
+ } from "../chunk-M7RYIZX6.js";
12
12
  import "../chunk-VT4IVERX.js";
13
13
  import {
14
14
  claudeSettings
15
- } from "../chunk-VPJAAGD4.js";
15
+ } from "../chunk-B3V2H6SA.js";
16
16
  import {
17
17
  createIo
18
18
  } from "../chunk-5RUIFDTP.js";
19
- import "../chunk-7G5VO76N.js";
19
+ import "../chunk-OT4YD54Q.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
@@ -30,13 +30,13 @@ import {
30
30
  readJsonSafe,
31
31
  writeJsonAtomic
32
32
  } from "../chunk-6MTNS63X.js";
33
- import "../chunk-7C5CJC3H.js";
33
+ import "../chunk-Y3UTTFTZ.js";
34
34
  import "../chunk-7QLSKOSU.js";
35
35
  import {
36
36
  EXIT
37
37
  } from "../chunk-KZERVKTD.js";
38
38
  import "../chunk-2UMNXADU.js";
39
- import "../chunk-CY4TZK5O.js";
39
+ import "../chunk-7YJS2VTG.js";
40
40
 
41
41
  // src/bell/install.ts
42
42
  import { join } from "path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ensureDaemonRunning
4
- } from "../chunk-MTKR4YLW.js";
4
+ } from "../chunk-SJVLFIYP.js";
5
5
  import {
6
6
  buildTranscriptRecords,
7
7
  decodePublicKey,
@@ -9,32 +9,34 @@ import {
9
9
  generateSessionKey,
10
10
  uploadTranscriptRecords,
11
11
  wrapSessionKey
12
- } from "../chunk-XPAGN3SC.js";
12
+ } from "../chunk-ECEUMWBH.js";
13
13
  import {
14
14
  startProcessOwnership,
15
15
  withSpawnProcessOwnership
16
- } from "../chunk-VZNDR3Z7.js";
16
+ } from "../chunk-QBWYNVKY.js";
17
17
  import {
18
18
  needsShell,
19
19
  spawnClaude
20
20
  } from "../chunk-XHKBHWLX.js";
21
21
  import "../chunk-VT4IVERX.js";
22
- import "../chunk-VPJAAGD4.js";
22
+ import "../chunk-B3V2H6SA.js";
23
23
  import {
24
24
  isDeferAnswer
25
25
  } from "../chunk-YHG74UFF.js";
26
26
  import {
27
- askUser,
28
- cancelQuestion,
29
27
  deriveToolTarget,
30
28
  describeToolCall,
31
29
  fetchModeState,
32
30
  getPolicy,
33
31
  repoKeyFor,
34
32
  reportEvent,
35
- scopePathFor,
33
+ scopePathFor
34
+ } from "../chunk-V2XPF77V.js";
35
+ import {
36
+ askUser,
37
+ cancelQuestion,
36
38
  waitForAnswer
37
- } from "../chunk-33T5OOKP.js";
39
+ } from "../chunk-J3YDT4HM.js";
38
40
  import {
39
41
  getMachineId
40
42
  } from "../chunk-RN3NOEJF.js";
@@ -42,7 +44,7 @@ import "../chunk-DINDL2CF.js";
42
44
  import "../chunk-6MTNS63X.js";
43
45
  import "../chunk-BSZYIAZL.js";
44
46
  import "../chunk-SAF6HGAA.js";
45
- import "../chunk-7C5CJC3H.js";
47
+ import "../chunk-Y3UTTFTZ.js";
46
48
  import "../chunk-7QLSKOSU.js";
47
49
  import "../chunk-KZERVKTD.js";
48
50
  import {
@@ -52,7 +54,7 @@ import {
52
54
  import {
53
55
  KILL_REASON,
54
56
  resolveGate
55
- } from "../chunk-CY4TZK5O.js";
57
+ } from "../chunk-7YJS2VTG.js";
56
58
 
57
59
  // src/wrapper/claudeBinary.ts
58
60
  import { statSync } from "fs";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  removeClaudeMcpServers,
4
4
  removePusharySettings
5
- } from "../chunk-GK4CED6Z.js";
5
+ } from "../chunk-5646VKR4.js";
6
6
  import {
7
7
  removeInstructionBlock,
8
8
  shortenHome,
9
9
  unregisterPluginLocation,
10
10
  vscodeSettingsTargets
11
- } from "../chunk-QW27ZFA4.js";
11
+ } from "../chunk-IWL5LWIE.js";
12
12
  import {
13
13
  removeGeminiSettings
14
- } from "../chunk-2C6B6V2U.js";
14
+ } from "../chunk-ZZE6FN7T.js";
15
15
  import "../chunk-ATBKJNWS.js";
16
- import "../chunk-HSGEEBBL.js";
16
+ import "../chunk-M7RYIZX6.js";
17
17
  import {
18
18
  execNpm
19
19
  } from "../chunk-VT4IVERX.js";
@@ -34,7 +34,7 @@ import {
34
34
  pusharyDir,
35
35
  removeCodexHooks,
36
36
  vscodePluginDir
37
- } from "../chunk-VPJAAGD4.js";
37
+ } from "../chunk-B3V2H6SA.js";
38
38
  import {
39
39
  rejectUnknownFlags
40
40
  } from "../chunk-GMXKITVA.js";
@@ -50,7 +50,7 @@ import "../chunk-7QLSKOSU.js";
50
50
  import {
51
51
  EXIT
52
52
  } from "../chunk-KZERVKTD.js";
53
- import "../chunk-CY4TZK5O.js";
53
+ import "../chunk-7YJS2VTG.js";
54
54
 
55
55
  // bin/pushary-clean.ts
56
56
  import { existsSync, readFileSync, copyFileSync, readdirSync } from "fs";
@@ -6,19 +6,19 @@ import {
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "../chunk-FOY5FISQ.js";
10
- import "../chunk-XPAGN3SC.js";
9
+ } from "../chunk-WLLBFDVY.js";
10
+ import "../chunk-ECEUMWBH.js";
11
11
  import {
12
12
  startProcessOwnership,
13
13
  withSpawnProcessOwnership
14
- } from "../chunk-VZNDR3Z7.js";
14
+ } from "../chunk-QBWYNVKY.js";
15
15
  import {
16
16
  spawnClaude
17
17
  } from "../chunk-XHKBHWLX.js";
18
18
  import {
19
19
  resolveBinary
20
20
  } from "../chunk-VT4IVERX.js";
21
- import "../chunk-VPJAAGD4.js";
21
+ import "../chunk-B3V2H6SA.js";
22
22
  import {
23
23
  getMachineId
24
24
  } from "../chunk-RN3NOEJF.js";
@@ -27,7 +27,7 @@ import {
27
27
  getApiKey,
28
28
  getBaseUrl
29
29
  } from "../chunk-2UMNXADU.js";
30
- import "../chunk-CY4TZK5O.js";
30
+ import "../chunk-7YJS2VTG.js";
31
31
 
32
32
  // bin/pushary-codex-bridge.ts
33
33
  import { existsSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  isGatingMoment,
4
4
  recordKeylessMoment
5
- } from "../chunk-MNQI6ZZU.js";
5
+ } from "../chunk-7MBDFNUC.js";
6
6
  import {
7
7
  readHookInput
8
8
  } from "../chunk-6CUUA7HO.js";
@@ -12,9 +12,6 @@ import {
12
12
  } from "../chunk-YHG74UFF.js";
13
13
  import {
14
14
  CODEX_AGENT,
15
- DEFAULT_SESSION,
16
- askUser,
17
- cancelQuestion,
18
15
  codexAllow,
19
16
  codexDeny,
20
17
  codexPass,
@@ -34,20 +31,25 @@ import {
34
31
  readLastPrompt,
35
32
  repoKeyFor,
36
33
  reportEvent,
37
- savePendingQuestion,
38
34
  scopePathFor,
39
- sendNotification,
40
35
  toCodexWire,
41
36
  toPolicyLookup,
42
- toPolicyLookups,
43
- waitForAnswer
44
- } from "../chunk-33T5OOKP.js";
37
+ toPolicyLookups
38
+ } from "../chunk-V2XPF77V.js";
39
+ import {
40
+ DEFAULT_SESSION,
41
+ askUser,
42
+ cancelQuestion,
43
+ pollForAnswer,
44
+ savePendingQuestion,
45
+ sendNotification
46
+ } from "../chunk-J3YDT4HM.js";
45
47
  import {
46
48
  getMachineId
47
49
  } from "../chunk-RN3NOEJF.js";
48
50
  import "../chunk-BSZYIAZL.js";
49
51
  import "../chunk-SAF6HGAA.js";
50
- import "../chunk-7C5CJC3H.js";
52
+ import "../chunk-Y3UTTFTZ.js";
51
53
  import "../chunk-7QLSKOSU.js";
52
54
  import "../chunk-KZERVKTD.js";
53
55
  import {
@@ -60,7 +62,7 @@ import {
60
62
  hookWaitClamped,
61
63
  hookWaitDeadline,
62
64
  resolveGate
63
- } from "../chunk-CY4TZK5O.js";
65
+ } from "../chunk-7YJS2VTG.js";
64
66
 
65
67
  // bin/pushary-codex-hook.ts
66
68
  import { basename, join } from "path";
@@ -111,24 +113,6 @@ var claimNotify = (toolUseId) => {
111
113
  return true;
112
114
  }
113
115
  };
114
- var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
115
- var pollForAnswer = async (apiKey, correlationId, deadlineMs, pollInterval = 2e3) => {
116
- while (Date.now() < deadlineMs) {
117
- const remaining = Math.min(Math.max(deadlineMs - Date.now(), 1e3), 3e4);
118
- let answer;
119
- try {
120
- answer = await waitForAnswer(apiKey, correlationId, remaining);
121
- } catch {
122
- if (Date.now() + pollInterval >= deadlineMs) break;
123
- await sleep(pollInterval);
124
- continue;
125
- }
126
- if (answer.answered) return answer;
127
- if (Date.now() + pollInterval >= deadlineMs) break;
128
- await sleep(pollInterval);
129
- }
130
- return { answered: false };
131
- };
132
116
  var agentNameFor = (input) => `Codex - ${basename(input.cwd ?? process.cwd())}`;
133
117
  var describeFor = (input, lookup) => input.tool_name === "apply_patch" ? describeApplyPatch(input.tool_input?.command) ?? describeToolCall(lookup.tool, lookup.input, "hook") : describeToolCall(lookup.tool, lookup.input, "hook");
134
118
  var pushQuestion = async (apiKey, input, lookup, waitSeconds, mode) => {
@@ -1,21 +1,23 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ reportEvent
4
+ } from "../chunk-V2XPF77V.js";
2
5
  import {
3
6
  askUser,
4
- reportEvent,
5
7
  waitForAnswer
6
- } from "../chunk-33T5OOKP.js";
8
+ } from "../chunk-J3YDT4HM.js";
7
9
  import {
8
10
  getMachineId
9
11
  } from "../chunk-RN3NOEJF.js";
10
12
  import "../chunk-BSZYIAZL.js";
11
13
  import "../chunk-SAF6HGAA.js";
12
- import "../chunk-7C5CJC3H.js";
14
+ import "../chunk-Y3UTTFTZ.js";
13
15
  import "../chunk-7QLSKOSU.js";
14
16
  import "../chunk-KZERVKTD.js";
15
17
  import {
16
18
  getApiKey
17
19
  } from "../chunk-2UMNXADU.js";
18
- import "../chunk-CY4TZK5O.js";
20
+ import "../chunk-7YJS2VTG.js";
19
21
 
20
22
  // bin/pushary-codex.ts
21
23
  import { basename } from "path";
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  printKeyCheck
4
- } from "../chunk-N52CIK47.js";
4
+ } from "../chunk-JAICP7BA.js";
5
5
  import {
6
6
  confirmAppConnection,
7
7
  connectDevice,
8
8
  printConnectInstructions
9
- } from "../chunk-PZR4XMFU.js";
9
+ } from "../chunk-A3PFIWWN.js";
10
10
  import "../chunk-3EGEA4KH.js";
11
11
  import {
12
12
  checkApiKey
13
- } from "../chunk-2TZCZ7CL.js";
13
+ } from "../chunk-A4I5JGCW.js";
14
14
  import {
15
15
  createIo
16
16
  } from "../chunk-5RUIFDTP.js";
17
17
  import {
18
18
  readKeySource
19
- } from "../chunk-7G5VO76N.js";
19
+ } from "../chunk-OT4YD54Q.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
@@ -29,7 +29,7 @@ import "../chunk-DINDL2CF.js";
29
29
  import "../chunk-6MTNS63X.js";
30
30
  import "../chunk-BSZYIAZL.js";
31
31
  import "../chunk-SAF6HGAA.js";
32
- import "../chunk-7C5CJC3H.js";
32
+ import "../chunk-Y3UTTFTZ.js";
33
33
  import {
34
34
  UsageError
35
35
  } from "../chunk-7QLSKOSU.js";
@@ -37,7 +37,7 @@ import {
37
37
  EXIT
38
38
  } from "../chunk-KZERVKTD.js";
39
39
  import "../chunk-2UMNXADU.js";
40
- import "../chunk-CY4TZK5O.js";
40
+ import "../chunk-7YJS2VTG.js";
41
41
 
42
42
  // bin/pushary-connect.ts
43
43
  exitOnHelpFlag("connect");
@@ -8,7 +8,7 @@ import {
8
8
  acquireDaemonLease,
9
9
  readDaemonStatus,
10
10
  requestDaemonHandoff
11
- } from "../chunk-MTKR4YLW.js";
11
+ } from "../chunk-SJVLFIYP.js";
12
12
  import {
13
13
  CODEX_BRIDGE_CAPABILITY,
14
14
  CODEX_RESUME_CAPABILITY,
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  findLiveProcessBySpawnId,
19
19
  ownsLiveProcess
20
- } from "../chunk-VZNDR3Z7.js";
20
+ } from "../chunk-QBWYNVKY.js";
21
21
  import {
22
22
  spawnClaude
23
23
  } from "../chunk-XHKBHWLX.js";
@@ -26,7 +26,7 @@ import {
26
26
  resolveGlobalPackageVersion,
27
27
  resolvePackageVersionFromBinary
28
28
  } from "../chunk-VT4IVERX.js";
29
- import "../chunk-VPJAAGD4.js";
29
+ import "../chunk-B3V2H6SA.js";
30
30
  import {
31
31
  getMachineId
32
32
  } from "../chunk-RN3NOEJF.js";
@@ -43,7 +43,7 @@ import {
43
43
  getApiKey,
44
44
  getBaseUrl
45
45
  } from "../chunk-2UMNXADU.js";
46
- import "../chunk-CY4TZK5O.js";
46
+ import "../chunk-7YJS2VTG.js";
47
47
 
48
48
  // src/spawn-daemon.ts
49
49
  import { execFileSync, spawn } from "child_process";
@@ -2,32 +2,33 @@
2
2
  import {
3
3
  removeClaudeMcpServers,
4
4
  removePusharySettings
5
- } from "../chunk-GK4CED6Z.js";
5
+ } from "../chunk-5646VKR4.js";
6
6
  import {
7
7
  removeGeminiSettings
8
- } from "../chunk-2C6B6V2U.js";
8
+ } from "../chunk-ZZE6FN7T.js";
9
9
  import "../chunk-ATBKJNWS.js";
10
- import "../chunk-HSGEEBBL.js";
10
+ import "../chunk-M7RYIZX6.js";
11
11
  import "../chunk-VT4IVERX.js";
12
12
  import {
13
13
  claudeJson,
14
14
  claudeSettings,
15
15
  claudeSettingsLocal,
16
16
  codexConfigToml,
17
+ codexHookPositions,
17
18
  codexHooksJson,
18
19
  cursorUserHooks,
19
20
  cursorUserMcp,
20
21
  geminiSettings,
21
22
  removeCodexHooks,
22
23
  removeCodexSettings
23
- } from "../chunk-VPJAAGD4.js";
24
+ } from "../chunk-B3V2H6SA.js";
24
25
  import {
25
26
  exitOnHelpFlag
26
27
  } from "../chunk-SQOFGPNX.js";
27
28
  import "../chunk-GOEXZ5QJ.js";
28
29
  import "../chunk-DINDL2CF.js";
29
30
  import "../chunk-KZERVKTD.js";
30
- import "../chunk-CY4TZK5O.js";
31
+ import "../chunk-7YJS2VTG.js";
31
32
 
32
33
  // bin/pushary-disconnect.ts
33
34
  import { readFileSync, writeFileSync } from "fs";
@@ -59,11 +60,24 @@ var disconnectPlan = (agent) => {
59
60
  { path: claudeSettingsLocal(), format: "json", remove: removePusharySettings },
60
61
  { path: claudeJson(), format: "json", remove: removeClaudeMcpServers }
61
62
  ];
62
- case "codex":
63
+ case "codex": {
64
+ const positions = {};
63
65
  return [
64
- { path: codexHooksJson(), format: "json", remove: removeCodexHooks },
65
- { path: codexConfigToml(), format: "toml", remove: (config) => removeCodexSettings(config, codexHooksJson()) }
66
+ {
67
+ path: codexHooksJson(),
68
+ format: "json",
69
+ remove: (config) => {
70
+ Object.assign(positions, codexHookPositions(config));
71
+ return removeCodexHooks(config);
72
+ }
73
+ },
74
+ {
75
+ path: codexConfigToml(),
76
+ format: "toml",
77
+ remove: (config) => removeCodexSettings(config, codexHooksJson(), positions)
78
+ }
66
79
  ];
80
+ }
67
81
  case "gemini":
68
82
  return [{ path: geminiSettings(), format: "json", remove: removeGeminiSettings }];
69
83
  case "cursor":
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ describeWaitLadder
4
+ } from "../chunk-IIENZE2J.js";
2
5
  import {
3
6
  claudeWired,
4
7
  codexWired,
5
8
  geminiWired
6
- } from "../chunk-Q7N3XGWM.js";
7
- import {
8
- describeWaitLadder
9
- } from "../chunk-IIENZE2J.js";
9
+ } from "../chunk-XW5CHAQX.js";
10
10
  import {
11
11
  readDaemonStatus
12
- } from "../chunk-MTKR4YLW.js";
12
+ } from "../chunk-SJVLFIYP.js";
13
13
  import {
14
14
  agentProbes,
15
15
  detectAgent,
@@ -18,12 +18,12 @@ import {
18
18
  isDetected,
19
19
  isPluginRegistered,
20
20
  vscodeSettingsTargets
21
- } from "../chunk-QW27ZFA4.js";
21
+ } from "../chunk-IWL5LWIE.js";
22
22
  import {
23
23
  GEMINI_HOOK_BINARY,
24
24
  hasGeminiHooks,
25
25
  missingGeminiHookEvents
26
- } from "../chunk-2C6B6V2U.js";
26
+ } from "../chunk-ZZE6FN7T.js";
27
27
  import "../chunk-XHKBHWLX.js";
28
28
  import {
29
29
  execNpm
@@ -34,6 +34,7 @@ import {
34
34
  claudeSkillDir,
35
35
  codexAgentsMd,
36
36
  codexConfigToml,
37
+ codexHookPositions,
37
38
  codexHooksJson,
38
39
  codexSkillDir,
39
40
  cursorPluginDir,
@@ -46,10 +47,10 @@ import {
46
47
  readCodexMcpAuth,
47
48
  untrustedCodexHookEvents,
48
49
  vscodePluginDir
49
- } from "../chunk-VPJAAGD4.js";
50
+ } from "../chunk-B3V2H6SA.js";
50
51
  import {
51
52
  readLedgerSummary
52
- } from "../chunk-MNQI6ZZU.js";
53
+ } from "../chunk-7MBDFNUC.js";
53
54
  import {
54
55
  getMachineId
55
56
  } from "../chunk-RN3NOEJF.js";
@@ -59,19 +60,19 @@ import {
59
60
  fetchChannels,
60
61
  reachVerdict,
61
62
  verifyRoundTrip
62
- } from "../chunk-PZR4XMFU.js";
63
+ } from "../chunk-A3PFIWWN.js";
63
64
  import "../chunk-3EGEA4KH.js";
64
65
  import {
65
66
  checkApiKey,
66
67
  describeKeyCheck
67
- } from "../chunk-2TZCZ7CL.js";
68
+ } from "../chunk-A4I5JGCW.js";
68
69
  import {
69
70
  createIo
70
71
  } from "../chunk-5RUIFDTP.js";
71
72
  import {
72
73
  keyPrefix,
73
74
  readKeySource
74
- } from "../chunk-7G5VO76N.js";
75
+ } from "../chunk-OT4YD54Q.js";
75
76
  import {
76
77
  parseFlags
77
78
  } from "../chunk-GMXKITVA.js";
@@ -89,7 +90,7 @@ import {
89
90
  sendMcpRequest
90
91
  } from "../chunk-BSZYIAZL.js";
91
92
  import "../chunk-SAF6HGAA.js";
92
- import "../chunk-7C5CJC3H.js";
93
+ import "../chunk-Y3UTTFTZ.js";
93
94
  import {
94
95
  UsageError
95
96
  } from "../chunk-7QLSKOSU.js";
@@ -99,7 +100,7 @@ import {
99
100
  import {
100
101
  getBaseUrl
101
102
  } from "../chunk-2UMNXADU.js";
102
- import "../chunk-CY4TZK5O.js";
103
+ import "../chunk-7YJS2VTG.js";
103
104
 
104
105
  // bin/pushary-doctor.ts
105
106
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -463,7 +464,12 @@ var main = async () => {
463
464
  console.log(` ${warn} Codex: stale legacy notify entry ${dim("(double-push risk, re-run setup to remove it)")}`);
464
465
  }
465
466
  if (hookCommand) {
466
- const untrusted = untrustedCodexHookEvents(codexParsed, codexHooksPath, hookCommand);
467
+ const untrusted = untrustedCodexHookEvents(
468
+ codexParsed,
469
+ codexHooksPath,
470
+ hookCommand,
471
+ codexHookPositions(codexHooksConfig)
472
+ );
467
473
  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`);
468
474
  }
469
475
  } else {
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node