@pushary/agent-hooks 1.4.1 → 1.5.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 (92) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +27 -0
  3. package/data/vscode-plugin/README.md +1 -1
  4. package/data/vscode-plugin/scripts/pushary-gate.mjs +2 -2
  5. package/dist/bin/pushary-bell-hook.js +22 -21
  6. package/dist/bin/pushary-bell.js +10 -10
  7. package/dist/bin/pushary-claude.js +28 -24
  8. package/dist/bin/pushary-clean.js +30 -26
  9. package/dist/bin/pushary-codex-bridge.js +16 -14
  10. package/dist/bin/pushary-codex-hook.js +41 -31
  11. package/dist/bin/pushary-codex.js +15 -10
  12. package/dist/bin/pushary-connect.js +11 -11
  13. package/dist/bin/pushary-cowork.js +6 -6
  14. package/dist/bin/pushary-daemon.js +31 -28
  15. package/dist/bin/pushary-disconnect.js +16 -16
  16. package/dist/bin/pushary-doctor.js +81 -38
  17. package/dist/bin/pushary-elicitation-hook.js +23 -22
  18. package/dist/bin/pushary-gemini-bridge.js +13 -11
  19. package/dist/bin/pushary-gemini-hook.js +29 -24
  20. package/dist/bin/pushary-hook.js +30 -30
  21. package/dist/bin/pushary-login.js +14 -14
  22. package/dist/bin/pushary-logout.js +8 -8
  23. package/dist/bin/pushary-mode.js +7 -7
  24. package/dist/bin/pushary-notification-hook.js +26 -25
  25. package/dist/bin/pushary-opencode-hook.js +25 -24
  26. package/dist/bin/pushary-permission-denied-hook.js +30 -29
  27. package/dist/bin/pushary-permission-hook.js +29 -28
  28. package/dist/bin/pushary-post-hook.js +26 -25
  29. package/dist/bin/pushary-prompt-hook.js +26 -25
  30. package/dist/bin/pushary-session-end-hook.js +26 -25
  31. package/dist/bin/pushary-session-start-hook.js +32 -27
  32. package/dist/bin/pushary-setup.js +85 -59
  33. package/dist/bin/pushary-stats.js +6 -6
  34. package/dist/bin/pushary-status.js +15 -15
  35. package/dist/bin/pushary-stop-hook.js +26 -25
  36. package/dist/bin/pushary-stopfailure-hook.js +26 -25
  37. package/dist/bin/pushary-suggestions.js +4 -4
  38. package/dist/bin/pushary-transcript-register.js +20 -19
  39. package/dist/bin/pushary-transcripts.js +8 -8
  40. package/dist/bin/pushary-upgrade.js +231 -37
  41. package/dist/bin/pushary-wait.js +7 -7
  42. package/dist/bin/pushary.js +8 -8
  43. package/dist/{chunk-MN3XOVRK.js → chunk-2QT3GCU4.js} +1 -1
  44. package/dist/{chunk-LUT2EZLG.js → chunk-3NBODGQS.js} +1 -1
  45. package/dist/{chunk-43JKGLZZ.js → chunk-3ZSGKLSO.js} +2 -2
  46. package/dist/{chunk-QBS6LGEK.js → chunk-43LJSM4F.js} +2 -2
  47. package/dist/{chunk-SWFF5U2N.js → chunk-43ZDACBO.js} +1 -1
  48. package/dist/{chunk-HK3IXIQJ.js → chunk-5HYNICS7.js} +1 -1
  49. package/dist/{chunk-EQRS3SGM.js → chunk-66H2QQAK.js} +1 -1
  50. package/dist/{chunk-3BPB2HYZ.js → chunk-7XT76LWT.js} +7 -7
  51. package/dist/{chunk-ALFT7H5B.js → chunk-CQYHOHOK.js} +56 -5
  52. package/dist/{chunk-3UA6FPRC.js → chunk-DLJN5XEU.js} +3 -3
  53. package/dist/{chunk-BZBUPZC6.js → chunk-DTQNDR7C.js} +1 -1
  54. package/dist/{chunk-SAF6NNXY.js → chunk-DYHXOXUF.js} +43 -6
  55. package/dist/{chunk-FAH3D74E.js → chunk-EA3IELHP.js} +6 -0
  56. package/dist/{chunk-ED5TA2FJ.js → chunk-EADZPVYW.js} +3 -3
  57. package/dist/{chunk-I6HRQOMT.js → chunk-F57RGL7K.js} +8 -8
  58. package/dist/{chunk-LNGYW6G4.js → chunk-FDHMNT24.js} +20 -16
  59. package/dist/{chunk-37VLIYLI.js → chunk-H5LHTC5X.js} +1 -1
  60. package/dist/{chunk-EYRGBYZG.js → chunk-HETOKNIL.js} +1 -1
  61. package/dist/{chunk-K6I5M2ME.js → chunk-HU5LSYL2.js} +2 -2
  62. package/dist/{chunk-SKXLIVFM.js → chunk-HVBF35GT.js} +2 -2
  63. package/dist/{chunk-DINDL2CF.js → chunk-HWJW3CPO.js} +25 -5
  64. package/dist/{chunk-GOFDGTEI.js → chunk-IYTQ4B5I.js} +18 -45
  65. package/dist/{chunk-WIOXWUUH.js → chunk-J4J45VPZ.js} +3 -3
  66. package/dist/{chunk-HQLAZWJJ.js → chunk-JF736N4C.js} +5 -5
  67. package/dist/{chunk-LYXX5NSB.js → chunk-K3QVDAZW.js} +1 -1
  68. package/dist/{chunk-KI36MAT6.js → chunk-KEOLNHR3.js} +2 -2
  69. package/dist/{chunk-S3EP4B35.js → chunk-KJRALILH.js} +28 -11
  70. package/dist/{chunk-PHHGHHOW.js → chunk-MYP4UUFH.js} +1 -1
  71. package/dist/{chunk-TNS3YLFE.js → chunk-NFKVRMTM.js} +8 -8
  72. package/dist/{chunk-TF4IOINR.js → chunk-NTQSICPJ.js} +3 -3
  73. package/dist/{chunk-4FN6VV56.js → chunk-ORLJNJEO.js} +2 -2
  74. package/dist/{chunk-2UMNXADU.js → chunk-OSJEMXSR.js} +5 -1
  75. package/dist/chunk-OSSDK5RS.js +162 -0
  76. package/dist/{chunk-TWWLVOPB.js → chunk-P4BNYJ5Q.js} +5 -5
  77. package/dist/{chunk-KEMEBTCJ.js → chunk-PCGZXWGQ.js} +4 -4
  78. package/dist/{chunk-2GMI6JH6.js → chunk-PNNBMH4E.js} +5 -5
  79. package/dist/{chunk-LGXUGYUH.js → chunk-PYCQXCI5.js} +2 -2
  80. package/dist/{chunk-JOVWYVSR.js → chunk-SOCEY746.js} +1 -1
  81. package/dist/{chunk-FVKFDTN6.js → chunk-T4QY64OR.js} +19 -14
  82. package/dist/{chunk-R3AMKNIW.js → chunk-TFKBFQCE.js} +1 -1
  83. package/dist/{chunk-CRNAXFQ6.js → chunk-TIWURSLS.js} +1 -1
  84. package/dist/{chunk-VYUDGQM7.js → chunk-TUXFIVOH.js} +1 -1
  85. package/dist/{chunk-3T52B2OF.js → chunk-UQHUUZ5H.js} +1 -1
  86. package/dist/{chunk-TI3ZWXZG.js → chunk-USQDVBEV.js} +2 -2
  87. package/dist/{chunk-WEO5JCB4.js → chunk-UYDTFCHW.js} +1 -1
  88. package/dist/{chunk-D7ERHWYB.js → chunk-XWEONSLV.js} +1 -1
  89. package/dist/{chunk-GKIUEIDX.js → chunk-YQMFGWBD.js} +1 -1
  90. package/dist/{reapply-BAWDJTG7.js → reapply-D2TFN6XK.js} +9 -8
  91. package/dist/src/index.js +18 -16
  92. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.0
4
+
5
+ - Pushary now updates itself in the background. When an agent session starts, it checks at most once a day for a newer version within the same major version, installs it into the global npm folder your hooks already run from, and refreshes each agent's config the way `pushary upgrade` does. The session never waits for it. A new major version is shown in `pushary doctor` and left for you to install.
6
+ - Turn it off with `pushary upgrade --auto=off` (and back on with `--auto=on`), or set `PUSHARY_DISABLE_AUTOUPDATE=1` in the environment your agents start from.
7
+ - It does not run on Windows yet, in CI, or for a copy run through `npx`, a plugin, or the Mac app. It never uses `sudo`: if npm cannot write to the global folder, the attempt is recorded as failed and nothing changes.
8
+ - This only reaches machines on 1.5.0 or later. To get there, run `npx @pushary/agent-hooks@latest upgrade` once.
9
+ - `pushary doctor` shows whether automatic updates are on and the result of the last check, and `setup` and `doctor` tell you once when Pushary has updated itself.
10
+ - `pushary doctor` no longer calls a build newer than the npm release out of date.
11
+ - The commands the CLI prints for you to copy now say `npx @pushary/agent-hooks@latest`. Without `@latest`, npx runs whatever older version is installed globally.
12
+ - A failed npm install now reports npm's reason, such as a permission error, instead of a line like `syscall mkdir`.
13
+
14
+ ## 1.4.2
15
+
16
+ - Setup trusts the Pushary hooks for you on Codex up to 0.155.1. It used to stop at 0.147.0, so on a newer Codex it wrote the hooks without trusting them, Codex never ran them, and setup still said it was done.
17
+ - On a Codex newer than the last version Pushary checked, setup says so in one line and tells you to open Codex and choose Trust for the Pushary hooks.
18
+ - The phone QR stops waiting 10 seconds before the pairing code expires, so the code is cancelled cleanly on a timeout.
19
+ - After a minute at the QR with no scan, setup offers the browser sign-in: Ctrl-C, then `npx @pushary/agent-hooks setup --connect browser`.
20
+ - A kill switch or standing deny on Codex now appears in your decision history, as it already did for Claude Code. If that record fails to send, it is sent again on the next matching denial.
21
+ - `clean --everything` also removes the sign-in session the Mac app now keeps in the keychain.
22
+
3
23
  ## 1.4.1
4
24
 
5
25
  - `clean` masks credentials in shell lines it cannot rewrite, including output you might send to support.
package/README.md CHANGED
@@ -244,6 +244,33 @@ npx @pushary/agent-hooks@latest wait 45
244
244
  npx @pushary/agent-hooks@latest clean
245
245
  ```
246
246
 
247
+ ## Updates
248
+
249
+ From 1.5.0, Pushary updates itself. When an agent session starts, the session-start
250
+ hook checks at most once a day whether a newer version is published. If one is, it
251
+ installs that version in the background into the same global npm folder your hooks
252
+ already run from, then refreshes each agent's config the way `pushary upgrade` does.
253
+ The session does not wait for it, and the new version runs from the next hook call.
254
+
255
+ - It stays within the same major version. A new major shows in `pushary doctor`, and
256
+ you move to it with `npx @pushary/agent-hooks@latest upgrade`.
257
+ - It only updates a global npm install. A copy run through `npx`, a plugin, or the Mac
258
+ app updates by its own route.
259
+ - It never uses `sudo`. If npm cannot write to the global folder, the attempt is
260
+ recorded as failed and nothing changes.
261
+ - It does not run on Windows yet, or when `CI` is set.
262
+
263
+ Turn it off with either of these:
264
+
265
+ ```bash
266
+ pushary upgrade --auto=off # turn it back on with --auto=on
267
+ export PUSHARY_DISABLE_AUTOUPDATE=1 # in the environment your agents start from
268
+ ```
269
+
270
+ `pushary doctor` shows whether it is on and the result of the last check. The state is
271
+ kept in `~/.pushary/auto-update.json`, and the output of recent updates in
272
+ `~/.pushary/logs/auto-update.log`.
273
+
247
274
  ## Manual MCP setup
248
275
 
249
276
  If you only want notifications and questions (no permission gating), add Pushary to your MCP config directly:
@@ -106,7 +106,7 @@ This repository uses the `.claude-plugin/plugin.json` layout, which VS Code, Git
106
106
 
107
107
  The layout is portable; this plugin is not meant to be. `hooks/hooks.json` uses VS Code's flat hook form, and the gate speaks VS Code's tool names, so treat this as a VS Code plugin that happens to sit in a portable folder shape.
108
108
 
109
- Claude Code users are served by `npx @pushary/agent-hooks setup --agents claude_code`, which installs a hook built for Claude Code's own tool names and matcher format. Do not install this directory as a Claude Code plugin as well: at best it duplicates the MCP server, and the two installs would fight over the same approvals.
109
+ Claude Code users are served by `npx @pushary/agent-hooks@latest setup --agents claude_code`, which installs a hook built for Claude Code's own tool names and matcher format. Do not install this directory as a Claude Code plugin as well: at best it duplicates the MCP server, and the two installs would fight over the same approvals.
110
110
 
111
111
  ## Development
112
112
 
@@ -723,9 +723,9 @@ const main = async () => {
723
723
 
724
724
  const apiKey = resolveApiKey()
725
725
  if (!apiKey) {
726
- diag('no API key found (PUSHARY_API_KEY, the plugin .mcp.json, or ~/.pushary/config.json). Run: npx @pushary/agent-hooks setup')
726
+ diag('no API key found (PUSHARY_API_KEY, the plugin .mcp.json, or ~/.pushary/config.json). Run: npx @pushary/agent-hooks@latest setup')
727
727
  return respond(
728
- unresolved(input.tool_name, 'Pushary is not configured: run `npx @pushary/agent-hooks setup` (get a key at https://pushary.com) to route this approval to your phone.')
728
+ unresolved(input.tool_name, 'Pushary is not configured: run `npx @pushary/agent-hooks@latest setup` (get a key at https://pushary.com) to route this approval to your phone.')
729
729
  )
730
730
  }
731
731
 
@@ -1,35 +1,36 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-BZBUPZC6.js";
4
+ } from "../chunk-DTQNDR7C.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-4FN6VV56.js";
8
- import "../chunk-TNS3YLFE.js";
7
+ } from "../chunk-ORLJNJEO.js";
8
+ import "../chunk-NFKVRMTM.js";
9
9
  import "../chunk-SGZJ5LYH.js";
10
- import "../chunk-KEMEBTCJ.js";
11
- import "../chunk-R3AMKNIW.js";
12
- import "../chunk-LYXX5NSB.js";
13
- import "../chunk-TF4IOINR.js";
14
- import "../chunk-3BPB2HYZ.js";
15
- import "../chunk-ED5TA2FJ.js";
16
- import "../chunk-JOVWYVSR.js";
17
- import "../chunk-CRNAXFQ6.js";
18
- import "../chunk-EQRS3SGM.js";
19
- import "../chunk-MN3XOVRK.js";
10
+ import "../chunk-PCGZXWGQ.js";
11
+ import "../chunk-TFKBFQCE.js";
12
+ import "../chunk-K3QVDAZW.js";
13
+ import "../chunk-NTQSICPJ.js";
14
+ import "../chunk-7XT76LWT.js";
15
+ import "../chunk-EADZPVYW.js";
16
+ import "../chunk-SOCEY746.js";
17
+ import "../chunk-TIWURSLS.js";
18
+ import "../chunk-66H2QQAK.js";
19
+ import "../chunk-2QT3GCU4.js";
20
20
  import "../chunk-XHKBHWLX.js";
21
- import "../chunk-WEO5JCB4.js";
22
- import "../chunk-3T52B2OF.js";
23
- import "../chunk-SAF6NNXY.js";
21
+ import "../chunk-UYDTFCHW.js";
22
+ import "../chunk-UQHUUZ5H.js";
23
+ import "../chunk-DYHXOXUF.js";
24
24
  import "../chunk-GMXKITVA.js";
25
- import "../chunk-DINDL2CF.js";
26
- import "../chunk-TI3ZWXZG.js";
25
+ import "../chunk-USQDVBEV.js";
27
26
  import "../chunk-7QLSKOSU.js";
28
27
  import "../chunk-KZERVKTD.js";
29
- import "../chunk-K6I5M2ME.js";
28
+ import "../chunk-HU5LSYL2.js";
30
29
  import "../chunk-T7E75EKA.js";
31
- import "../chunk-2UMNXADU.js";
32
- import "../chunk-FVKFDTN6.js";
30
+ import "../chunk-OSJEMXSR.js";
31
+ import "../chunk-T4QY64OR.js";
32
+ import "../chunk-EA3IELHP.js";
33
+ import "../chunk-HWJW3CPO.js";
33
34
 
34
35
  // bin/pushary-bell-hook.ts
35
36
  var main = async () => {
@@ -5,38 +5,38 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-BZBUPZC6.js";
8
+ } from "../chunk-DTQNDR7C.js";
9
9
  import {
10
10
  addBellHooks,
11
11
  bellInstalled,
12
12
  removeBellHooks
13
- } from "../chunk-JOVWYVSR.js";
13
+ } from "../chunk-SOCEY746.js";
14
14
  import {
15
15
  claudeSettings
16
- } from "../chunk-SAF6NNXY.js";
16
+ } from "../chunk-DYHXOXUF.js";
17
17
  import {
18
18
  createIo
19
19
  } from "../chunk-5RUIFDTP.js";
20
20
  import {
21
21
  exitOnHelpFlag
22
- } from "../chunk-TWWLVOPB.js";
23
- import "../chunk-FAH3D74E.js";
22
+ } from "../chunk-P4BNYJ5Q.js";
24
23
  import {
25
24
  parseFlags
26
25
  } from "../chunk-GMXKITVA.js";
27
- import "../chunk-DINDL2CF.js";
28
- import "../chunk-TI3ZWXZG.js";
26
+ import "../chunk-USQDVBEV.js";
29
27
  import "../chunk-7QLSKOSU.js";
30
28
  import {
31
29
  EXIT
32
30
  } from "../chunk-KZERVKTD.js";
33
- import "../chunk-K6I5M2ME.js";
31
+ import "../chunk-HU5LSYL2.js";
34
32
  import {
35
33
  readJsonSafe,
36
34
  writeJsonAtomic
37
35
  } from "../chunk-T7E75EKA.js";
38
- import "../chunk-2UMNXADU.js";
39
- import "../chunk-FVKFDTN6.js";
36
+ import "../chunk-OSJEMXSR.js";
37
+ import "../chunk-T4QY64OR.js";
38
+ import "../chunk-EA3IELHP.js";
39
+ import "../chunk-HWJW3CPO.js";
40
40
 
41
41
  // bin/pushary-bell.ts
42
42
  exitOnHelpFlag("bell");
@@ -8,7 +8,7 @@ import {
8
8
  describeIdleWindow,
9
9
  startProcessOwnership,
10
10
  withSpawnProcessOwnership
11
- } from "../chunk-PHHGHHOW.js";
11
+ } from "../chunk-MYP4UUFH.js";
12
12
  import {
13
13
  isDeferAnswer
14
14
  } from "../chunk-YHG74UFF.js";
@@ -17,24 +17,24 @@ import {
17
17
  loadSessionKey,
18
18
  registerTranscript,
19
19
  registeredTranscriptEnabled
20
- } from "../chunk-TNS3YLFE.js";
20
+ } from "../chunk-NFKVRMTM.js";
21
21
  import "../chunk-SGZJ5LYH.js";
22
- import "../chunk-KEMEBTCJ.js";
23
- import "../chunk-R3AMKNIW.js";
24
- import "../chunk-LYXX5NSB.js";
25
- import "../chunk-TF4IOINR.js";
22
+ import "../chunk-PCGZXWGQ.js";
23
+ import "../chunk-TFKBFQCE.js";
24
+ import "../chunk-K3QVDAZW.js";
25
+ import "../chunk-NTQSICPJ.js";
26
26
  import {
27
27
  ensureDaemonRunning
28
- } from "../chunk-3BPB2HYZ.js";
29
- import "../chunk-ED5TA2FJ.js";
30
- import "../chunk-JOVWYVSR.js";
28
+ } from "../chunk-7XT76LWT.js";
29
+ import "../chunk-EADZPVYW.js";
30
+ import "../chunk-SOCEY746.js";
31
31
  import {
32
32
  encryptRecord
33
- } from "../chunk-CRNAXFQ6.js";
34
- import "../chunk-EQRS3SGM.js";
33
+ } from "../chunk-TIWURSLS.js";
34
+ import "../chunk-66H2QQAK.js";
35
35
  import {
36
36
  transcriptsEnabled
37
- } from "../chunk-MN3XOVRK.js";
37
+ } from "../chunk-2QT3GCU4.js";
38
38
  import {
39
39
  needsShell,
40
40
  spawnClaude
@@ -56,8 +56,8 @@ import {
56
56
  reportEvent,
57
57
  savePendingCommand,
58
58
  scopePathFor
59
- } from "../chunk-LNGYW6G4.js";
60
- import "../chunk-WEO5JCB4.js";
59
+ } from "../chunk-FDHMNT24.js";
60
+ import "../chunk-UYDTFCHW.js";
61
61
  import {
62
62
  DECISION_STOP_REASON,
63
63
  askUser,
@@ -67,29 +67,32 @@ import {
67
67
  nextLongPollMs,
68
68
  waitForAnswer,
69
69
  withdrawQuestion
70
- } from "../chunk-LGXUGYUH.js";
70
+ } from "../chunk-PYCQXCI5.js";
71
71
  import {
72
72
  getMachineId
73
- } from "../chunk-3T52B2OF.js";
74
- import "../chunk-SAF6NNXY.js";
73
+ } from "../chunk-UQHUUZ5H.js";
74
+ import "../chunk-DYHXOXUF.js";
75
75
  import "../chunk-GMXKITVA.js";
76
- import "../chunk-DINDL2CF.js";
77
- import "../chunk-TI3ZWXZG.js";
78
- import "../chunk-EYRGBYZG.js";
76
+ import "../chunk-USQDVBEV.js";
77
+ import "../chunk-HETOKNIL.js";
79
78
  import "../chunk-SAF6HGAA.js";
80
79
  import "../chunk-7QLSKOSU.js";
81
80
  import "../chunk-KZERVKTD.js";
82
- import "../chunk-K6I5M2ME.js";
81
+ import "../chunk-HU5LSYL2.js";
83
82
  import "../chunk-T7E75EKA.js";
84
83
  import {
85
84
  getApiKey,
86
85
  getBaseUrl
87
- } from "../chunk-2UMNXADU.js";
86
+ } from "../chunk-OSJEMXSR.js";
88
87
  import {
89
88
  KILL_REASON,
90
89
  redactSecrets,
91
90
  resolveGate
92
- } from "../chunk-FVKFDTN6.js";
91
+ } from "../chunk-T4QY64OR.js";
92
+ import {
93
+ NPX_LATEST_COMMAND
94
+ } from "../chunk-EA3IELHP.js";
95
+ import "../chunk-HWJW3CPO.js";
93
96
 
94
97
  // src/wrapper/localPassthrough.ts
95
98
  var SIGNAL_NUMBERS = {
@@ -1548,7 +1551,8 @@ var runDualMode = async (binary, args2, startingMode) => {
1548
1551
  apiKey = getApiKey();
1549
1552
  } catch {
1550
1553
  process.stderr.write(
1551
- "[pushary] phone control needs an API key. Run `npx @pushary/agent-hooks setup`. Running the normal passthrough for now.\n"
1554
+ `[pushary] phone control needs an API key. Run \`${NPX_LATEST_COMMAND} setup\`. Running the normal passthrough for now.
1555
+ `
1552
1556
  );
1553
1557
  return { implemented: false };
1554
1558
  }
@@ -7,14 +7,14 @@ import {
7
7
  createGuards,
8
8
  resolveHermesPython,
9
9
  runHermesPythonScript
10
- } from "../chunk-37VLIYLI.js";
10
+ } from "../chunk-H5LHTC5X.js";
11
11
  import "../chunk-P32LPT2L.js";
12
12
  import {
13
13
  removeInstructionBlock,
14
14
  shortenHome,
15
15
  unregisterPluginLocation,
16
16
  vscodeSettingsTargets
17
- } from "../chunk-3UA6FPRC.js";
17
+ } from "../chunk-DLJN5XEU.js";
18
18
  import {
19
19
  OPENCODE_PLUGIN_SIBLING,
20
20
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -24,7 +24,7 @@ import {
24
24
  openCodePluginDir,
25
25
  openCodePluginFile,
26
26
  removeOpenCodeMcpServer
27
- } from "../chunk-VYUDGQM7.js";
27
+ } from "../chunk-TUXFIVOH.js";
28
28
  import {
29
29
  compatibleConfigFile,
30
30
  compatibleInstructionsFile,
@@ -32,40 +32,40 @@ import {
32
32
  compatiblePermissionRuleFile,
33
33
  removeCompatibleHooks,
34
34
  removeCompatibleMcpServer
35
- } from "../chunk-HQLAZWJJ.js";
35
+ } from "../chunk-JF736N4C.js";
36
36
  import {
37
37
  isClaudeMcpSnapshot,
38
38
  removeClaudeMcpServers,
39
39
  removePusharySettings,
40
40
  removePusharyToolPermissions,
41
41
  restoreClaudeMcpServer
42
- } from "../chunk-WIOXWUUH.js";
42
+ } from "../chunk-J4J45VPZ.js";
43
43
  import {
44
44
  hookOwnerOf,
45
45
  isHookTakeoverReceipt,
46
46
  restoreHookTakeover,
47
47
  restoreMcpServer
48
- } from "../chunk-KEMEBTCJ.js";
49
- import "../chunk-R3AMKNIW.js";
48
+ } from "../chunk-PCGZXWGQ.js";
49
+ import "../chunk-TFKBFQCE.js";
50
50
  import {
51
51
  liveBridgeProbe,
52
52
  resolveBridgeStub
53
- } from "../chunk-LYXX5NSB.js";
53
+ } from "../chunk-K3QVDAZW.js";
54
54
  import {
55
55
  pusharyHookExecutable
56
- } from "../chunk-TF4IOINR.js";
56
+ } from "../chunk-NTQSICPJ.js";
57
57
  import {
58
58
  disableDaemonService
59
- } from "../chunk-3BPB2HYZ.js";
59
+ } from "../chunk-7XT76LWT.js";
60
60
  import {
61
61
  removeGeminiSettings
62
- } from "../chunk-ED5TA2FJ.js";
63
- import "../chunk-JOVWYVSR.js";
62
+ } from "../chunk-EADZPVYW.js";
63
+ import "../chunk-SOCEY746.js";
64
64
  import "../chunk-XHKBHWLX.js";
65
- import "../chunk-LNGYW6G4.js";
66
- import "../chunk-WEO5JCB4.js";
67
- import "../chunk-LGXUGYUH.js";
68
- import "../chunk-3T52B2OF.js";
65
+ import "../chunk-FDHMNT24.js";
66
+ import "../chunk-UYDTFCHW.js";
67
+ import "../chunk-PYCQXCI5.js";
68
+ import "../chunk-UQHUUZ5H.js";
69
69
  import {
70
70
  bridgeAgentKey,
71
71
  claudeJson,
@@ -94,29 +94,27 @@ import {
94
94
  restoreCodexHookTrust,
95
95
  vscodePluginDir,
96
96
  vscodePluginMcp
97
- } from "../chunk-SAF6NNXY.js";
97
+ } from "../chunk-DYHXOXUF.js";
98
98
  import {
99
99
  exitOnHelpFlag
100
- } from "../chunk-TWWLVOPB.js";
101
- import "../chunk-FAH3D74E.js";
100
+ } from "../chunk-P4BNYJ5Q.js";
102
101
  import {
103
102
  rejectUnknownFlags
104
103
  } from "../chunk-GMXKITVA.js";
105
- import "../chunk-DINDL2CF.js";
106
104
  import {
107
105
  CANDIDATE_RCS,
108
106
  isDisabledExport,
109
107
  removeClaudeAlias
110
- } from "../chunk-TI3ZWXZG.js";
111
- import "../chunk-EYRGBYZG.js";
108
+ } from "../chunk-USQDVBEV.js";
109
+ import "../chunk-HETOKNIL.js";
112
110
  import "../chunk-SAF6HGAA.js";
113
111
  import "../chunk-7QLSKOSU.js";
114
112
  import {
115
113
  EXIT
116
114
  } from "../chunk-KZERVKTD.js";
117
- import "../chunk-K6I5M2ME.js";
115
+ import "../chunk-HU5LSYL2.js";
118
116
  import "../chunk-T7E75EKA.js";
119
- import "../chunk-2UMNXADU.js";
117
+ import "../chunk-OSJEMXSR.js";
120
118
  import {
121
119
  CURSOR_GATE_EVENTS,
122
120
  HOOK_COMPATIBLE_PROFILES,
@@ -125,7 +123,9 @@ import {
125
123
  SUPPORT_EMAIL,
126
124
  isValidApiKey,
127
125
  redactSecrets
128
- } from "../chunk-FVKFDTN6.js";
126
+ } from "../chunk-T4QY64OR.js";
127
+ import "../chunk-EA3IELHP.js";
128
+ import "../chunk-HWJW3CPO.js";
129
129
 
130
130
  // bin/pushary-clean.ts
131
131
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync3 } from "fs";
@@ -187,7 +187,11 @@ var MAC_KEYCHAIN_ACCOUNTS = [
187
187
  "pushary.site-api-key",
188
188
  "pushary.site-id",
189
189
  "clerk.device-token",
190
- "clerk.session-id"
190
+ "clerk.session-id",
191
+ "clerkDeviceToken",
192
+ "cachedClient",
193
+ "cachedClientServerDate",
194
+ "cachedEnvironment"
191
195
  ];
192
196
  var MAC_DEFAULTS_DOMAINS = ["com.pushary.app", "pushary-bridge", "pushary.render"];
193
197
  var macLibraryState = (home = homedir()) => [
@@ -1,54 +1,56 @@
1
1
  #!/usr/bin/env node
2
- import "../chunk-KI36MAT6.js";
2
+ import "../chunk-KEOLNHR3.js";
3
3
  import {
4
4
  LiveTranscriptRelay,
5
5
  liveSessionSleep,
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "../chunk-SKXLIVFM.js";
9
+ } from "../chunk-HVBF35GT.js";
10
10
  import {
11
11
  SESSION_IDLE_TIMEOUT_MS,
12
12
  describeIdleWindow,
13
13
  idleDeadlinePassed,
14
14
  startProcessOwnership,
15
15
  withSpawnProcessOwnership
16
- } from "../chunk-PHHGHHOW.js";
17
- import "../chunk-CRNAXFQ6.js";
18
- import "../chunk-EQRS3SGM.js";
16
+ } from "../chunk-MYP4UUFH.js";
17
+ import "../chunk-TIWURSLS.js";
18
+ import "../chunk-66H2QQAK.js";
19
19
  import {
20
20
  transcriptsEnabled
21
- } from "../chunk-MN3XOVRK.js";
21
+ } from "../chunk-2QT3GCU4.js";
22
22
  import {
23
23
  spawnClaude
24
24
  } from "../chunk-XHKBHWLX.js";
25
25
  import {
26
26
  isDecisionStopped,
27
27
  withdrawQuestion
28
- } from "../chunk-LGXUGYUH.js";
28
+ } from "../chunk-PYCQXCI5.js";
29
29
  import {
30
30
  getMachineId
31
- } from "../chunk-3T52B2OF.js";
31
+ } from "../chunk-UQHUUZ5H.js";
32
32
  import {
33
33
  resolveBinary
34
- } from "../chunk-SAF6NNXY.js";
35
- import "../chunk-TI3ZWXZG.js";
34
+ } from "../chunk-DYHXOXUF.js";
35
+ import "../chunk-USQDVBEV.js";
36
36
  import {
37
37
  callMcpTool
38
- } from "../chunk-EYRGBYZG.js";
38
+ } from "../chunk-HETOKNIL.js";
39
39
  import "../chunk-SAF6HGAA.js";
40
40
  import "../chunk-7QLSKOSU.js";
41
41
  import "../chunk-KZERVKTD.js";
42
- import "../chunk-K6I5M2ME.js";
42
+ import "../chunk-HU5LSYL2.js";
43
43
  import "../chunk-T7E75EKA.js";
44
44
  import {
45
45
  getApiKey,
46
46
  getBaseUrl
47
- } from "../chunk-2UMNXADU.js";
47
+ } from "../chunk-OSJEMXSR.js";
48
48
  import {
49
49
  parseAgentQuestion,
50
50
  parseAgentQuestionAnswers
51
- } from "../chunk-FVKFDTN6.js";
51
+ } from "../chunk-T4QY64OR.js";
52
+ import "../chunk-EA3IELHP.js";
53
+ import "../chunk-HWJW3CPO.js";
52
54
 
53
55
  // bin/pushary-codex-bridge.ts
54
56
  import { existsSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  takeHookHoldBudget
4
- } from "../chunk-HK3IXIQJ.js";
4
+ } from "../chunk-5HYNICS7.js";
5
5
  import {
6
6
  blockedActionFingerprint,
7
7
  codexCallKey,
@@ -11,31 +11,35 @@ import {
11
11
  hasBlockedActionHint,
12
12
  recordBlockedActionHint,
13
13
  recordCodexCallDecision,
14
+ reportMachineDenial,
14
15
  userScope
15
- } from "../chunk-ALFT7H5B.js";
16
+ } from "../chunk-CQYHOHOK.js";
17
+ import {
18
+ triggerAutoUpdate
19
+ } from "../chunk-OSSDK5RS.js";
16
20
  import {
17
21
  isGatingMoment,
18
22
  recordKeylessMoment
19
- } from "../chunk-SWFF5U2N.js";
23
+ } from "../chunk-43ZDACBO.js";
20
24
  import {
21
25
  readHookInput
22
- } from "../chunk-4FN6VV56.js";
26
+ } from "../chunk-ORLJNJEO.js";
23
27
  import {
24
28
  denyReasonFrom,
25
29
  isDeferAnswer
26
30
  } from "../chunk-YHG74UFF.js";
27
- import "../chunk-TNS3YLFE.js";
31
+ import "../chunk-NFKVRMTM.js";
28
32
  import "../chunk-SGZJ5LYH.js";
29
- import "../chunk-KEMEBTCJ.js";
30
- import "../chunk-R3AMKNIW.js";
31
- import "../chunk-LYXX5NSB.js";
32
- import "../chunk-TF4IOINR.js";
33
- import "../chunk-3BPB2HYZ.js";
34
- import "../chunk-ED5TA2FJ.js";
35
- import "../chunk-JOVWYVSR.js";
36
- import "../chunk-CRNAXFQ6.js";
37
- import "../chunk-EQRS3SGM.js";
38
- import "../chunk-MN3XOVRK.js";
33
+ import "../chunk-PCGZXWGQ.js";
34
+ import "../chunk-TFKBFQCE.js";
35
+ import "../chunk-K3QVDAZW.js";
36
+ import "../chunk-NTQSICPJ.js";
37
+ import "../chunk-7XT76LWT.js";
38
+ import "../chunk-EADZPVYW.js";
39
+ import "../chunk-SOCEY746.js";
40
+ import "../chunk-TIWURSLS.js";
41
+ import "../chunk-66H2QQAK.js";
42
+ import "../chunk-2QT3GCU4.js";
39
43
  import "../chunk-XHKBHWLX.js";
40
44
  import {
41
45
  CODEX_AGENT,
@@ -72,8 +76,8 @@ import {
72
76
  toCodexWire,
73
77
  toPolicyLookup,
74
78
  toPolicyLookups
75
- } from "../chunk-LNGYW6G4.js";
76
- import "../chunk-WEO5JCB4.js";
79
+ } from "../chunk-FDHMNT24.js";
80
+ import "../chunk-UYDTFCHW.js";
77
81
  import {
78
82
  DECISION_STOP_REASON,
79
83
  askUser,
@@ -85,27 +89,26 @@ import {
85
89
  requestGate,
86
90
  sendNotification,
87
91
  waitForQuestion
88
- } from "../chunk-LGXUGYUH.js";
92
+ } from "../chunk-PYCQXCI5.js";
89
93
  import {
90
94
  getMachineId
91
- } from "../chunk-3T52B2OF.js";
95
+ } from "../chunk-UQHUUZ5H.js";
92
96
  import {
93
97
  canonicalJson
94
- } from "../chunk-SAF6NNXY.js";
98
+ } from "../chunk-DYHXOXUF.js";
95
99
  import "../chunk-GMXKITVA.js";
96
- import "../chunk-DINDL2CF.js";
97
- import "../chunk-TI3ZWXZG.js";
98
- import "../chunk-EYRGBYZG.js";
100
+ import "../chunk-USQDVBEV.js";
101
+ import "../chunk-HETOKNIL.js";
99
102
  import "../chunk-SAF6HGAA.js";
100
103
  import "../chunk-7QLSKOSU.js";
101
104
  import "../chunk-KZERVKTD.js";
102
- import "../chunk-K6I5M2ME.js";
105
+ import "../chunk-HU5LSYL2.js";
103
106
  import {
104
107
  writeFileAtomic
105
108
  } from "../chunk-T7E75EKA.js";
106
109
  import {
107
110
  getApiKey
108
- } from "../chunk-2UMNXADU.js";
111
+ } from "../chunk-OSJEMXSR.js";
109
112
  import {
110
113
  CODEX_RESCUE_TOOL_NAME,
111
114
  DECISION_LINE_MAX,
@@ -119,7 +122,9 @@ import {
119
122
  hookWaitClamped,
120
123
  hookWaitDeadline,
121
124
  resolveGate
122
- } from "../chunk-FVKFDTN6.js";
125
+ } from "../chunk-T4QY64OR.js";
126
+ import "../chunk-EA3IELHP.js";
127
+ import "../chunk-HWJW3CPO.js";
123
128
 
124
129
  // bin/pushary-codex-hook.ts
125
130
  import { basename } from "path";
@@ -609,8 +614,10 @@ var decidePermissionRequest = async (input) => {
609
614
  try {
610
615
  const apiKey = getApiKey();
611
616
  const { verdict, lookup, gateInput } = await codexGate(apiKey, input);
612
- if (verdict.kind === "kill") return codexDeny(KILL_REASON);
613
- if (verdict.kind === "deny") return codexDeny(verdict.reason);
617
+ if (verdict.kind === "kill" || verdict.kind === "deny") {
618
+ await reportMachineDenial({ ...input, tool_name: lookup.tool, tool_input: lookup.input }, verdict, CODEX_AGENT);
619
+ return codexDeny(verdict.kind === "kill" ? KILL_REASON : verdict.reason);
620
+ }
614
621
  const recorded = consumeCodexCallDecision(callKeyFor(input));
615
622
  if (recorded?.kind === "denied") return codexDeny(recorded.reason);
616
623
  if (recorded?.kind === "handled") return codexPass();
@@ -695,9 +702,11 @@ var decidePreToolUse = async (input) => {
695
702
  }
696
703
  try {
697
704
  const { verdict, lookup } = await codexGate(apiKey, input);
698
- if (verdict.kind === "kill") return codexDeny(KILL_REASON);
705
+ if (verdict.kind === "kill" || verdict.kind === "deny") {
706
+ await reportMachineDenial({ ...input, tool_name: lookup.tool, tool_input: lookup.input }, verdict, CODEX_AGENT);
707
+ return codexDeny(verdict.kind === "kill" ? KILL_REASON : verdict.reason);
708
+ }
699
709
  if (verdict.kind === "allow") return codexPass();
700
- if (verdict.kind === "deny") return codexDeny(verdict.reason);
701
710
  if (codexApprovalsReviewer(input) === "auto_review") return codexPass();
702
711
  if (defersToNativeMode(input.permission_mode, input.tool_name ?? "")) return codexPass();
703
712
  if (verdict.kind === "defer") return codexPass();
@@ -736,7 +745,7 @@ var decidePreToolUse = async (input) => {
736
745
  };
737
746
  var repairCodexHoldsQuietly = async () => {
738
747
  try {
739
- const { repairCodexHolds } = await import("../reapply-BAWDJTG7.js");
748
+ const { repairCodexHolds } = await import("../reapply-D2TFN6XK.js");
740
749
  repairCodexHolds();
741
750
  } catch {
742
751
  return;
@@ -813,6 +822,7 @@ var main = async () => {
813
822
  }
814
823
  case "SessionStart":
815
824
  await repairCodexHoldsQuietly();
825
+ triggerAutoUpdate({ isSubagentStart: Boolean(input.agent_id) });
816
826
  await reportSessionStart(input);
817
827
  break;
818
828
  case "SessionEnd":