@pushary/agent-hooks 1.9.50 → 1.9.53

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 (120) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +9 -1
  3. package/dist/api-K6ZROHYB.js +55 -0
  4. package/dist/bin/pushary-bell-hook.js +28 -25
  5. package/dist/bin/pushary-bell.js +13 -11
  6. package/dist/bin/pushary-claude.js +37 -33
  7. package/dist/bin/pushary-clean.js +70 -42
  8. package/dist/bin/pushary-codex-bridge.js +23 -20
  9. package/dist/bin/pushary-codex-hook.js +36 -32
  10. package/dist/bin/pushary-codex-session.js +17 -616
  11. package/dist/bin/pushary-codex.js +15 -12
  12. package/dist/bin/pushary-connect.js +31 -28
  13. package/dist/bin/pushary-cowork.js +7 -6
  14. package/dist/bin/pushary-daemon.js +57 -52
  15. package/dist/bin/pushary-disconnect.js +29 -26
  16. package/dist/bin/pushary-doctor.js +58 -53
  17. package/dist/bin/pushary-elicitation-hook.js +29 -26
  18. package/dist/bin/pushary-gemini-bridge.js +17 -15
  19. package/dist/bin/pushary-gemini-hook.js +33 -29
  20. package/dist/bin/pushary-hook.js +34 -31
  21. package/dist/bin/pushary-login.js +19 -16
  22. package/dist/bin/pushary-logout.js +30 -27
  23. package/dist/bin/pushary-mcp.js +16 -9
  24. package/dist/bin/pushary-mode.js +16 -14
  25. package/dist/bin/pushary-notification-hook.js +27 -24
  26. package/dist/bin/pushary-opencode-hook.js +32 -28
  27. package/dist/bin/pushary-permission-denied-hook.js +32 -29
  28. package/dist/bin/pushary-permission-hook.js +31 -28
  29. package/dist/bin/pushary-post-hook.js +27 -24
  30. package/dist/bin/pushary-prompt-hook.js +27 -24
  31. package/dist/bin/pushary-session-end-hook.js +27 -24
  32. package/dist/bin/pushary-session-start-hook.js +34 -29
  33. package/dist/bin/pushary-setup.js +195 -138
  34. package/dist/bin/pushary-stats.js +8 -7
  35. package/dist/bin/pushary-status.js +35 -32
  36. package/dist/bin/pushary-stop-hook.js +27 -24
  37. package/dist/bin/pushary-stopfailure-hook.js +27 -24
  38. package/dist/bin/pushary-suggestions.js +16 -14
  39. package/dist/bin/pushary-transcript-register.js +19 -17
  40. package/dist/bin/pushary-transcripts.js +10 -9
  41. package/dist/bin/pushary-upgrade.js +76 -46
  42. package/dist/bin/pushary-wait.js +16 -14
  43. package/dist/bin/pushary.js +10 -8
  44. package/dist/{chunk-GBKSCDEK.js → chunk-2LEH5IGX.js} +17 -4
  45. package/dist/chunk-36NGFHE4.js +72 -0
  46. package/dist/{chunk-B7LV6W7U.js → chunk-3RPN7AAT.js} +1 -1
  47. package/dist/{chunk-GDDXGBTM.js → chunk-46TC24ET.js} +2 -2
  48. package/dist/{chunk-KEAIIVW3.js → chunk-4QQEUJL4.js} +2 -2
  49. package/dist/{chunk-XNZB274I.js → chunk-5463UUO2.js} +1 -1
  50. package/dist/{chunk-FPKQGWAF.js → chunk-56ZTIY6D.js} +2 -2
  51. package/dist/{chunk-34AQAQKW.js → chunk-63IQRYVP.js} +4 -4
  52. package/dist/{chunk-25SYEAW4.js → chunk-6C4S3QYD.js} +3 -3
  53. package/dist/{chunk-4PCJ6DYK.js → chunk-6SWMKF5E.js} +2 -2
  54. package/dist/{chunk-Y7WD72J7.js → chunk-7CLLWDCP.js} +1 -1
  55. package/dist/chunk-ABGN5RN2.js +732 -0
  56. package/dist/{chunk-WLT6J3SB.js → chunk-ALZZVC3E.js} +2 -2
  57. package/dist/{chunk-ZMYLVFXC.js → chunk-BL3WAGIK.js} +14 -9
  58. package/dist/{chunk-PA54A437.js → chunk-BUXDR6US.js} +1 -1
  59. package/dist/{chunk-VUS6QGND.js → chunk-CQ5JGRML.js} +5 -1
  60. package/dist/{chunk-IF2UPWD2.js → chunk-DHJSBK63.js} +1 -1
  61. package/dist/{chunk-ABMEBN2R.js → chunk-EK7SZJ4K.js} +6 -4
  62. package/dist/{chunk-VCZN7NAB.js → chunk-EPOD7QHT.js} +7 -5
  63. package/dist/{chunk-KIO2MZQC.js → chunk-FCMWUYIE.js} +5 -3
  64. package/dist/{chunk-YTYXFA5M.js → chunk-FI73DGNB.js} +1 -1
  65. package/dist/{chunk-JGNYCRB2.js → chunk-FV34HT35.js} +1 -1
  66. package/dist/{chunk-KK2DIUVV.js → chunk-GCN73COS.js} +1 -1
  67. package/dist/{chunk-KBGKWB5T.js → chunk-H57DXSHR.js} +4 -2
  68. package/dist/{chunk-SALUTWPX.js → chunk-IHUFRAHB.js} +4 -4
  69. package/dist/chunk-JBT3ZSJS.js +92 -0
  70. package/dist/{chunk-5Q2FRMPC.js → chunk-JOWF4Y4P.js} +4 -4
  71. package/dist/{chunk-EP6S6VY3.js → chunk-JPABKXK6.js} +6 -6
  72. package/dist/{chunk-LLRYP5TR.js → chunk-K23WMLPY.js} +5 -5
  73. package/dist/{chunk-34RXPM5U.js → chunk-L5YTS2BP.js} +3 -3
  74. package/dist/{chunk-SE4JFMLW.js → chunk-LD4MWJMD.js} +8 -6
  75. package/dist/{chunk-OR5F63C2.js → chunk-LF3TLC7B.js} +2 -168
  76. package/dist/{chunk-XTVEW2NG.js → chunk-LIESRXK5.js} +1 -1
  77. package/dist/{chunk-ZOKMGBPR.js → chunk-MC4VY5LK.js} +16 -5
  78. package/dist/{chunk-K73CBZKW.js → chunk-MHQB62K5.js} +4 -4
  79. package/dist/{chunk-DH4BWFU7.js → chunk-MTKV4RUQ.js} +82 -16
  80. package/dist/{chunk-Y74IJ2IO.js → chunk-N77BH7H2.js} +10 -4
  81. package/dist/{chunk-ZTTCYHOM.js → chunk-NECZKPJN.js} +31 -6
  82. package/dist/{chunk-TGCIFEDE.js → chunk-NELH25J7.js} +13 -11
  83. package/dist/{chunk-HXRH7ZCK.js → chunk-NHVEQLQC.js} +2 -2
  84. package/dist/{chunk-OW4DNSQ6.js → chunk-NSY2V7XU.js} +1 -1
  85. package/dist/{chunk-ZYYQJSIO.js → chunk-OML4YFBN.js} +44 -462
  86. package/dist/{chunk-X3RCIOIH.js → chunk-ONCWYACA.js} +1 -1
  87. package/dist/{chunk-LZYJMSOY.js → chunk-P2546BBI.js} +3 -3
  88. package/dist/{chunk-WEY5ZHDB.js → chunk-Q7OXI6VS.js} +5 -5
  89. package/dist/{chunk-APASKZ2I.js → chunk-QKU46TK5.js} +5 -3
  90. package/dist/chunk-QTOLNRET.js +169 -0
  91. package/dist/{chunk-TYTIDEBW.js → chunk-RH6KR6EH.js} +5 -5
  92. package/dist/{chunk-7RMSB4A2.js → chunk-RL7EOD6I.js} +87 -24
  93. package/dist/{chunk-BOVSUH4N.js → chunk-S6RNS4UL.js} +2 -2
  94. package/dist/chunk-SUIB4O3S.js +311 -0
  95. package/dist/{chunk-LY3OJFBW.js → chunk-T6RIKJUO.js} +2 -1
  96. package/dist/{chunk-YVO4HIHX.js → chunk-U2L42GVI.js} +12 -10
  97. package/dist/{chunk-BXK6ZJVJ.js → chunk-UVT6B6XN.js} +2 -2
  98. package/dist/{chunk-UCF3EZZL.js → chunk-VQPSWD3A.js} +13 -13
  99. package/dist/{chunk-XH3F66VD.js → chunk-VYBH6D4X.js} +3 -3
  100. package/dist/chunk-XCEN33UP.js +7 -0
  101. package/dist/{chunk-GTGXQ7FJ.js → chunk-XDCXTDHH.js} +11 -11
  102. package/dist/{chunk-OZLGTMIY.js → chunk-XSUJ2PQY.js} +2 -2
  103. package/dist/chunk-XUW2DRAQ.js +427 -0
  104. package/dist/{chunk-UHVD7BSV.js → chunk-XZRLFBEA.js} +6 -6
  105. package/dist/{chunk-AWMMABVB.js → chunk-ZMPR436Z.js} +52 -138
  106. package/dist/{chunk-PXUNPXOX.js → chunk-ZOP3I2GQ.js} +3 -3
  107. package/dist/codex-app-cards-switch-RENOSSDD.js +60 -0
  108. package/dist/codex-desktop-launch-I2D6QATK.js +31 -0
  109. package/dist/codex-session-launch-KLH2FSSJ.js +331 -0
  110. package/dist/config-HX6ZNOIL.js +14 -0
  111. package/dist/{global-upgrade-AIUSS2YH.js → global-upgrade-AZN3BPI3.js} +8 -6
  112. package/dist/identity-AQIMUWYN.js +15 -0
  113. package/dist/live-capabilities-4IIFAMHU.js +53 -0
  114. package/dist/{paths-RO34TYNM.js → paths-X4IPV2WJ.js} +4 -2
  115. package/dist/{reapply-KTNPP4XE.js → reapply-CXODG53B.js} +27 -21
  116. package/dist/src/index.d.ts +3 -3
  117. package/dist/src/index.js +22 -19
  118. package/dist/{upgrade-lock-5UAGXIW7.js → upgrade-lock-AHISGKER.js} +5 -3
  119. package/dist/usage-ZC6BKIE3.js +10 -0
  120. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.53
4
+
5
+ - `pushary codex --app-cards status --json` prints the switch's state as one line of JSON for a program to read: the state, the Codex app found on this Mac, whether the Mac app turned the switch on, and whether it was turned off on purpose. The Pushary Mac app uses it for its new Settings switch, which is on by default there.
6
+ - `pushary codex --app-cards off` is remembered. The Pushary Mac app turns the switch on by itself, and it leaves alone a switch you turned off with this command until you turn it on again. `pushary clean` keeps that record while the Mac app stays installed.
7
+ - The login item that keeps Codex app cards on after a restart now also checks that every file of Pushary's own program is still there. If Pushary was removed without turning the switch off, Codex starts the ordinary way from the next login. An existing login item gets the check the next time the switch is turned on.
8
+
9
+ ## 1.9.52
10
+
11
+ - `pushary upgrade` and the daily automatic update now refresh the Pushary instructions in each agent's instruction file: Codex, Gemini CLI, OpenCode, fx, Qwen Code, CodeBuddy and Grok. Before this release only `setup` wrote them, so a machine set up before 1.9.43 kept the old text after every update and its agents were never told about reminders. In fx a plain "remind me in 2 minutes" could fall back to a sleep timer that stops when fx closes.
12
+ - The refresh only replaces a Pushary block that is already there. It never adds one to a file that has none, never creates a file, and keeps the text around the block byte for byte, Windows line endings included. The file is replaced in one step, so a full disk or a stopped update cannot leave half a file.
13
+ - It leaves a file alone and names it when the file is read-only, is not UTF-8 text, or holds Pushary markers that do not form exactly one block. The upgrade still finishes. Fix the file and run `pushary upgrade` again.
14
+ - fx is now part of the refresh. Its instructions are refreshed when the Pushary server entry in `~/.fx/mcp.json` is the CLI's. The server entry and `~/.fx/settings.json` are not touched.
15
+ - fx starts the daily update check. Each time fx starts the Pushary server, Pushary checks at most once a day for a newer version, the same way a Claude Code, Codex or Gemini session start does. A machine that only uses fx used to stay on the version it was set up with.
16
+ - Agents the Pushary Mac app owns are left alone, fx included, and reported as kept.
17
+ - `pushary upgrade` on a machine with no global install now names fx and the command that updates it.
18
+
19
+ ## 1.9.51
20
+
21
+ - `pushary codex --desktop` now does the one thing it was built for. When the Codex app shows "Allow Computer Use to use Calculator?", you get one Pushary question, "Allow Codex to use Calculator for this conversation?". Yes allows that app for that conversation, No denies it, and answering in Codex first withdraws the question. Before this release the launch never forwarded anything: it expected the Codex app to start its engine in a way the app does not, and it did not recognise the request the app really sends.
22
+ - Pushary asks only when the card comes from Codex's own Computer Use and carries exactly the words Codex shows. A card another tool raises, or one worded differently, stays in Codex. It waits ten minutes for an answer, then withdraws the question.
23
+ - The launch no longer touches commands or file edits in the Codex app. Your hooks already handle those, so nothing is asked twice.
24
+ - The launch works with any Codex app version that keeps its engine in the known place, instead of one exact version. A request Pushary does not recognise stays in Codex.
25
+ - New, off by default: `pushary codex --app-cards on` makes the Codex app start through the same pass-through every time you open it, including after a restart, with no terminal to keep open. `pushary codex --app-cards off` undoes it and `status` says where it stands, including when Pushary or the Codex engine is no longer where the launcher expects. It writes a launcher under `~/.pushary/codex-app`, a login item, and the `CODEX_CLI_PATH` setting for your login session, and leaves that setting alone if another program already owns it. `off` replaces the launcher with one that only runs Codex's engine and leaves that file in place, because the Codex app records its path in `~/.codex/config.toml` and an open Codex keeps using it; `pushary clean` removes it, after which Codex should be reopened.
26
+ - The launcher steps aside by itself: it hands every engine command except the app's own protocol straight to Codex's engine, starts the engine itself when Pushary is missing, broken, never starts it, or the launcher cannot write beside itself, and turns its own setting off if a Codex update moves the engine. If the launcher is stopped, Pushary stops the engine within a few seconds.
27
+ - The pass-through holds at most 64 KiB of the app's input and inspects at most 256 KiB of a line from the engine, loads the code that talks to Pushary only when a card appears, does nothing while idle except check every two seconds that its launcher is still running, lets the engine finish its own shutdown when Codex quits, and keeps copying if anything in it fails. The first time Computer Use asks in a way this version does not know, it says so once in Codex's own log.
28
+ - Setup: a Mac that has the Codex app and no Codex CLI gets native hooks again. The current Codex app keeps its engine behind a small script with its version in a file beside it; setup looked for the version inside the script, found none, and treated Codex as too old for hooks. Setup now reads that file, finds the engine where the app keeps it now, and never takes Pushary's own launcher for Codex.
29
+ - `pushary codex` is experimental and no longer appears in `pushary --help`. It still runs when typed, and `pushary codex --help` describes it.
30
+
3
31
  ## 1.9.50
4
32
 
5
33
  - Setup no longer reports a problem when it tried to install phone-start on its own and the background service did not start. The run closes on what the approval check found, and the closing notes say phone-start is not running. `--control on` still fails the run when phone-start cannot be made ready.
package/README.md CHANGED
@@ -205,7 +205,6 @@ failing closed would let one malformed download silence every hook on the machin
205
205
 
206
206
  ```
207
207
  cowork Set up Claude Desktop and Cowork with the Pushary connector
208
- codex Start Codex with Pushary native approvals
209
208
  setup Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, OpenCode, or fx with Pushary
210
209
  claude Run Claude Code through Pushary, reachable from your phone even when idle
211
210
  daemon Keep this machine reachable so your phone can START a new session
@@ -273,6 +272,15 @@ hook checks at most once a day whether a newer version is published. If one is,
273
272
  installs that version in the background into the same global npm folder your hooks
274
273
  already run from, then refreshes each agent's config the way `pushary upgrade` does.
275
274
  The session does not wait for it, and the new version runs from the next hook call.
275
+ From 1.9.52, fx starts the same check each time it starts the Pushary server.
276
+
277
+ The refresh covers what an update can safely rewrite for an agent that is already set
278
+ up: its hooks, the Pushary block in its instruction file, and the Pushary server entry
279
+ for Claude Code, Codex, Gemini CLI, Cursor and VS Code. It never adds an agent or an
280
+ instruction block that is not already there. Skills, editor plugins, the fx server
281
+ entry and permission rules, and the server entry of the other agents are written by
282
+ `setup` only. An instruction file that is read-only, is not UTF-8 text, or holds
283
+ Pushary markers that do not form exactly one block is left as it is and named.
276
284
 
277
285
  - It stays within the same major version. A new major shows in `pushary doctor`, and
278
286
  you move to it with `npx pushary@latest upgrade`.
@@ -0,0 +1,55 @@
1
+ import {
2
+ WAIT_RESPONSE_GRACE_MS,
3
+ askUser,
4
+ cancelQuestion,
5
+ claimBlockedAction,
6
+ isAwayPaused,
7
+ isDecisionStopped,
8
+ isLocalQuestionHandoff,
9
+ nextLongPollMs,
10
+ pollForAnswer,
11
+ requestGate,
12
+ sendNotification,
13
+ unavailableQuestionUnlessSubscriptionRequired,
14
+ waitForAnswer,
15
+ waitForQuestion,
16
+ waitsForThePhone,
17
+ withdrawQuestion
18
+ } from "./chunk-ZMPR436Z.js";
19
+ import "./chunk-P2546BBI.js";
20
+ import "./chunk-POFBE6ZY.js";
21
+ import "./chunk-L5YTS2BP.js";
22
+ import "./chunk-EK7SZJ4K.js";
23
+ import "./chunk-T6RIKJUO.js";
24
+ import "./chunk-7QLSKOSU.js";
25
+ import "./chunk-KZERVKTD.js";
26
+ import "./chunk-OML4YFBN.js";
27
+ import "./chunk-XUW2DRAQ.js";
28
+ import "./chunk-AQFEP65J.js";
29
+ import "./chunk-CQ5JGRML.js";
30
+ import "./chunk-MC4VY5LK.js";
31
+ import "./chunk-QTOLNRET.js";
32
+ import {
33
+ DECISION_STOP_REASON,
34
+ UNVERIFIABLE_APPROVAL_REASON
35
+ } from "./chunk-LF3TLC7B.js";
36
+ export {
37
+ DECISION_STOP_REASON,
38
+ UNVERIFIABLE_APPROVAL_REASON,
39
+ WAIT_RESPONSE_GRACE_MS,
40
+ askUser,
41
+ cancelQuestion,
42
+ claimBlockedAction,
43
+ isAwayPaused,
44
+ isDecisionStopped,
45
+ isLocalQuestionHandoff,
46
+ nextLongPollMs,
47
+ pollForAnswer,
48
+ requestGate,
49
+ sendNotification,
50
+ unavailableQuestionUnlessSubscriptionRequired,
51
+ waitForAnswer,
52
+ waitForQuestion,
53
+ waitsForThePhone,
54
+ withdrawQuestion
55
+ };
@@ -1,41 +1,44 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-X3RCIOIH.js";
4
+ } from "../chunk-ONCWYACA.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-SALUTWPX.js";
8
- import "../chunk-UCF3EZZL.js";
7
+ } from "../chunk-IHUFRAHB.js";
8
+ import "../chunk-VQPSWD3A.js";
9
9
  import "../chunk-DWQYCOPI.js";
10
- import "../chunk-Y74IJ2IO.js";
11
- import "../chunk-ZMYLVFXC.js";
12
- import "../chunk-WEY5ZHDB.js";
13
- import "../chunk-25SYEAW4.js";
14
- import "../chunk-PA54A437.js";
15
- import "../chunk-XTVEW2NG.js";
10
+ import "../chunk-N77BH7H2.js";
11
+ import "../chunk-BL3WAGIK.js";
12
+ import "../chunk-Q7OXI6VS.js";
13
+ import "../chunk-6C4S3QYD.js";
14
+ import "../chunk-BUXDR6US.js";
15
+ import "../chunk-LIESRXK5.js";
16
16
  import "../chunk-GMXKITVA.js";
17
- import "../chunk-JGNYCRB2.js";
18
- import "../chunk-XH3F66VD.js";
19
- import "../chunk-XNZB274I.js";
20
- import "../chunk-KK2DIUVV.js";
17
+ import "../chunk-5463UUO2.js";
18
+ import "../chunk-GCN73COS.js";
19
+ import "../chunk-FV34HT35.js";
21
20
  import "../chunk-XHKBHWLX.js";
22
21
  import "../chunk-6ICPEJY5.js";
23
- import "../chunk-YVO4HIHX.js";
24
- import "../chunk-B7LV6W7U.js";
25
- import "../chunk-KEAIIVW3.js";
26
- import "../chunk-AWMMABVB.js";
22
+ import "../chunk-VYBH6D4X.js";
23
+ import "../chunk-U2L42GVI.js";
24
+ import "../chunk-3RPN7AAT.js";
25
+ import "../chunk-JBT3ZSJS.js";
26
+ import "../chunk-ZMPR436Z.js";
27
+ import "../chunk-P2546BBI.js";
27
28
  import "../chunk-POFBE6ZY.js";
28
- import "../chunk-LZYJMSOY.js";
29
- import "../chunk-34RXPM5U.js";
30
- import "../chunk-ABMEBN2R.js";
31
- import "../chunk-LY3OJFBW.js";
29
+ import "../chunk-L5YTS2BP.js";
30
+ import "../chunk-EK7SZJ4K.js";
31
+ import "../chunk-T6RIKJUO.js";
32
32
  import "../chunk-7QLSKOSU.js";
33
33
  import "../chunk-KZERVKTD.js";
34
- import "../chunk-ZYYQJSIO.js";
34
+ import "../chunk-4QQEUJL4.js";
35
+ import "../chunk-OML4YFBN.js";
36
+ import "../chunk-XUW2DRAQ.js";
35
37
  import "../chunk-AQFEP65J.js";
36
- import "../chunk-VUS6QGND.js";
37
- import "../chunk-ZOKMGBPR.js";
38
- import "../chunk-OR5F63C2.js";
38
+ import "../chunk-CQ5JGRML.js";
39
+ import "../chunk-MC4VY5LK.js";
40
+ import "../chunk-QTOLNRET.js";
41
+ import "../chunk-LF3TLC7B.js";
39
42
 
40
43
  // bin/pushary-bell-hook.ts
41
44
  var main = async () => {
@@ -5,39 +5,41 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-X3RCIOIH.js";
8
+ } from "../chunk-ONCWYACA.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-FO3MDD26.js";
12
+ import {
13
+ exitOnHelpFlag
14
+ } from "../chunk-S6RNS4UL.js";
12
15
  import {
13
16
  addBellHooks,
14
17
  bellInstalled,
15
18
  removeBellHooks
16
- } from "../chunk-XTVEW2NG.js";
19
+ } from "../chunk-LIESRXK5.js";
17
20
  import {
18
21
  parseFlags
19
22
  } from "../chunk-GMXKITVA.js";
20
- import "../chunk-XH3F66VD.js";
21
- import {
22
- exitOnHelpFlag
23
- } from "../chunk-BOVSUH4N.js";
24
- import "../chunk-KEAIIVW3.js";
23
+ import "../chunk-VYBH6D4X.js";
25
24
  import "../chunk-7QLSKOSU.js";
26
25
  import {
27
26
  EXIT
28
27
  } from "../chunk-KZERVKTD.js";
28
+ import "../chunk-4QQEUJL4.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-ZYYQJSIO.js";
31
+ } from "../chunk-OML4YFBN.js";
32
+ import "../chunk-XUW2DRAQ.js";
32
33
  import {
33
34
  readJsonSafe,
34
35
  writeJsonAtomic
35
36
  } from "../chunk-AQFEP65J.js";
36
- import "../chunk-VUS6QGND.js";
37
- import "../chunk-ZOKMGBPR.js";
37
+ import "../chunk-CQ5JGRML.js";
38
+ import "../chunk-MC4VY5LK.js";
39
+ import "../chunk-QTOLNRET.js";
38
40
  import {
39
41
  isRecord
40
- } from "../chunk-OR5F63C2.js";
42
+ } from "../chunk-LF3TLC7B.js";
41
43
 
42
44
  // bin/pushary-bell.ts
43
45
  exitOnHelpFlag("bell");
@@ -3,44 +3,44 @@ import {
3
3
  WRAPPER_ACTIVE_ENV,
4
4
  findClaudeBinary
5
5
  } from "../chunk-PQ4K74WL.js";
6
+ import {
7
+ SESSION_IDLE_TIMEOUT_MS,
8
+ describeIdleWindow,
9
+ startProcessOwnership,
10
+ withSpawnProcessOwnership
11
+ } from "../chunk-56ZTIY6D.js";
6
12
  import {
7
13
  announceSubscriptionRequired,
8
14
  isDeferAnswer
9
- } from "../chunk-IF2UPWD2.js";
15
+ } from "../chunk-DHJSBK63.js";
10
16
  import {
11
17
  claudeTranscriptPath,
12
18
  loadSessionKey,
13
19
  registerTranscript,
14
20
  registeredTranscriptEnabled
15
- } from "../chunk-UCF3EZZL.js";
21
+ } from "../chunk-VQPSWD3A.js";
16
22
  import "../chunk-DWQYCOPI.js";
17
23
  import {
18
24
  ensureDaemonRunning
19
- } from "../chunk-ZMYLVFXC.js";
20
- import "../chunk-WEY5ZHDB.js";
21
- import "../chunk-25SYEAW4.js";
22
- import "../chunk-PA54A437.js";
23
- import "../chunk-XTVEW2NG.js";
25
+ } from "../chunk-BL3WAGIK.js";
26
+ import "../chunk-Q7OXI6VS.js";
27
+ import "../chunk-6C4S3QYD.js";
28
+ import "../chunk-BUXDR6US.js";
29
+ import "../chunk-LIESRXK5.js";
24
30
  import "../chunk-GMXKITVA.js";
25
- import {
26
- transcriptsEnabled
27
- } from "../chunk-JGNYCRB2.js";
28
- import "../chunk-XH3F66VD.js";
29
- import {
30
- SESSION_IDLE_TIMEOUT_MS,
31
- describeIdleWindow,
32
- startProcessOwnership,
33
- withSpawnProcessOwnership
34
- } from "../chunk-FPKQGWAF.js";
35
31
  import {
36
32
  encryptRecord
37
- } from "../chunk-XNZB274I.js";
38
- import "../chunk-KK2DIUVV.js";
33
+ } from "../chunk-5463UUO2.js";
34
+ import "../chunk-GCN73COS.js";
35
+ import {
36
+ transcriptsEnabled
37
+ } from "../chunk-FV34HT35.js";
39
38
  import {
40
39
  needsShell,
41
40
  spawnClaude
42
41
  } from "../chunk-XHKBHWLX.js";
43
42
  import "../chunk-6ICPEJY5.js";
43
+ import "../chunk-VYBH6D4X.js";
44
44
  import {
45
45
  DEFAULT_SESSION,
46
46
  UNNAMED_ACTION,
@@ -57,9 +57,11 @@ import {
57
57
  reportEvent,
58
58
  savePendingCommand,
59
59
  scopePathFor
60
- } from "../chunk-YVO4HIHX.js";
61
- import "../chunk-B7LV6W7U.js";
62
- import "../chunk-KEAIIVW3.js";
60
+ } from "../chunk-U2L42GVI.js";
61
+ import "../chunk-3RPN7AAT.js";
62
+ import {
63
+ repoKeyFor
64
+ } from "../chunk-JBT3ZSJS.js";
63
65
  import {
64
66
  askUser,
65
67
  cancelQuestion,
@@ -67,31 +69,33 @@ import {
67
69
  isDecisionStopped,
68
70
  isLocalQuestionHandoff,
69
71
  nextLongPollMs,
70
- repoKeyFor,
71
72
  waitForAnswer,
72
73
  waitsForThePhone,
73
74
  withdrawQuestion
74
- } from "../chunk-AWMMABVB.js";
75
- import "../chunk-POFBE6ZY.js";
75
+ } from "../chunk-ZMPR436Z.js";
76
76
  import {
77
77
  SubscriptionRequiredError
78
- } from "../chunk-LZYJMSOY.js";
79
- import "../chunk-34RXPM5U.js";
80
- import "../chunk-ABMEBN2R.js";
78
+ } from "../chunk-P2546BBI.js";
79
+ import "../chunk-POFBE6ZY.js";
80
+ import "../chunk-L5YTS2BP.js";
81
+ import "../chunk-EK7SZJ4K.js";
81
82
  import {
82
83
  getMachineId
83
- } from "../chunk-LY3OJFBW.js";
84
+ } from "../chunk-T6RIKJUO.js";
84
85
  import "../chunk-7QLSKOSU.js";
85
86
  import "../chunk-KZERVKTD.js";
86
- import "../chunk-ZYYQJSIO.js";
87
+ import "../chunk-4QQEUJL4.js";
88
+ import "../chunk-OML4YFBN.js";
89
+ import "../chunk-XUW2DRAQ.js";
87
90
  import "../chunk-AQFEP65J.js";
88
91
  import {
89
92
  getApiKey,
90
93
  getBaseUrl
91
- } from "../chunk-VUS6QGND.js";
94
+ } from "../chunk-CQ5JGRML.js";
92
95
  import {
93
96
  NPX_LATEST_COMMAND
94
- } from "../chunk-ZOKMGBPR.js";
97
+ } from "../chunk-MC4VY5LK.js";
98
+ import "../chunk-QTOLNRET.js";
95
99
  import {
96
100
  DECISION_STOP_REASON,
97
101
  HAND_BACK_WITHOUT_A_PROMPT,
@@ -101,7 +105,7 @@ import {
101
105
  redactSecretsFromContent,
102
106
  resolveGate,
103
107
  timeoutActionWithoutLocalPrompt
104
- } from "../chunk-OR5F63C2.js";
108
+ } from "../chunk-LF3TLC7B.js";
105
109
 
106
110
  // src/wrapper/localPassthrough.ts
107
111
  var SIGNAL_NUMBERS = {
@@ -1,21 +1,28 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ CODEX_APP_CARDS_DIRECTORY,
4
+ codexAppCardsFolderStaysOnThisMac,
5
+ removeCodexAppCardsFromThisMac
6
+ } from "../chunk-SUIB4O3S.js";
2
7
  import {
3
8
  PUSHARY_SKILL_NAME,
4
9
  PUSHARY_SKILL_SOURCE,
5
10
  createGuards
6
11
  } from "../chunk-EUW7JL2K.js";
12
+ import "../chunk-ABGN5RN2.js";
13
+ import "../chunk-XCEN33UP.js";
7
14
  import {
8
15
  describeCliKeyRevocation,
9
16
  planCliKeyRevocations,
10
17
  readCliHeldKeys,
11
18
  revokeCliKeys
12
- } from "../chunk-TYTIDEBW.js";
13
- import "../chunk-5Q2FRMPC.js";
19
+ } from "../chunk-RH6KR6EH.js";
20
+ import "../chunk-JOWF4Y4P.js";
14
21
  import {
15
22
  isCursorPluginLeftover,
16
23
  releaseSoleGate,
17
24
  withoutPusharyCursorHooks
18
- } from "../chunk-34AQAQKW.js";
25
+ } from "../chunk-63IQRYVP.js";
19
26
  import {
20
27
  HERMES_PIP_PACKAGE,
21
28
  readHermesStatus,
@@ -24,20 +31,21 @@ import {
24
31
  shortenHome,
25
32
  unregisterPluginLocation,
26
33
  vscodeSettingsTargets
27
- } from "../chunk-VCZN7NAB.js";
34
+ } from "../chunk-EPOD7QHT.js";
28
35
  import {
29
36
  macAppKeepsMcpEntry,
30
37
  mcpServerBearer,
31
38
  pusharyKey,
32
39
  readMacAppAgentKey,
33
40
  setupReceiptKey
34
- } from "../chunk-K73CBZKW.js";
35
- import "../chunk-4PCJ6DYK.js";
41
+ } from "../chunk-MHQB62K5.js";
42
+ import "../chunk-QCGNGEGE.js";
43
+ import "../chunk-6SWMKF5E.js";
36
44
  import {
37
45
  planFxRemoval,
38
46
  removeInstructionBlock
39
- } from "../chunk-DH4BWFU7.js";
40
- import "../chunk-GDDXGBTM.js";
47
+ } from "../chunk-MTKV4RUQ.js";
48
+ import "../chunk-46TC24ET.js";
41
49
  import {
42
50
  OPENCODE_PLUGIN_SIBLING,
43
51
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -49,11 +57,14 @@ import {
49
57
  openCodePluginDir,
50
58
  openCodePluginFile,
51
59
  removeOpenCodeMcpServer
52
- } from "../chunk-LLRYP5TR.js";
60
+ } from "../chunk-K23WMLPY.js";
53
61
  import {
54
62
  ansiPainter,
55
63
  useColor
56
64
  } from "../chunk-FO3MDD26.js";
65
+ import {
66
+ exitOnHelpFlag
67
+ } from "../chunk-S6RNS4UL.js";
57
68
  import {
58
69
  compatibleConfigFile,
59
70
  compatibleDocuments,
@@ -70,10 +81,10 @@ import {
70
81
  removePusharyToolPermissions,
71
82
  restoreClaudeMcpServer,
72
83
  serializeConfigDocument
73
- } from "../chunk-Y74IJ2IO.js";
84
+ } from "../chunk-N77BH7H2.js";
74
85
  import {
75
86
  disableDaemonService
76
- } from "../chunk-ZMYLVFXC.js";
87
+ } from "../chunk-BL3WAGIK.js";
77
88
  import {
78
89
  hookOwnerOf,
79
90
  isHookTakeoverReceipt,
@@ -81,46 +92,44 @@ import {
81
92
  resolveBridgeStub,
82
93
  restoreHookTakeover,
83
94
  restoreMcpServer
84
- } from "../chunk-WEY5ZHDB.js";
95
+ } from "../chunk-Q7OXI6VS.js";
85
96
  import {
86
97
  removeGeminiSettings
87
- } from "../chunk-25SYEAW4.js";
88
- import "../chunk-PA54A437.js";
89
- import "../chunk-XTVEW2NG.js";
98
+ } from "../chunk-6C4S3QYD.js";
99
+ import "../chunk-BUXDR6US.js";
100
+ import "../chunk-LIESRXK5.js";
90
101
  import {
91
102
  rejectUnknownFlags
92
103
  } from "../chunk-GMXKITVA.js";
104
+ import "../chunk-XHKBHWLX.js";
105
+ import "../chunk-6ICPEJY5.js";
93
106
  import {
94
107
  CANDIDATE_RCS,
95
108
  isDisabledExport,
96
109
  removeClaudeAlias,
97
110
  shellProfileCandidates
98
- } from "../chunk-XH3F66VD.js";
99
- import {
100
- exitOnHelpFlag
101
- } from "../chunk-BOVSUH4N.js";
102
- import "../chunk-XHKBHWLX.js";
103
- import "../chunk-6ICPEJY5.js";
104
- import "../chunk-YVO4HIHX.js";
105
- import "../chunk-B7LV6W7U.js";
106
- import "../chunk-KEAIIVW3.js";
107
- import "../chunk-AWMMABVB.js";
111
+ } from "../chunk-VYBH6D4X.js";
112
+ import "../chunk-36NGFHE4.js";
113
+ import "../chunk-U2L42GVI.js";
114
+ import "../chunk-3RPN7AAT.js";
115
+ import "../chunk-JBT3ZSJS.js";
116
+ import "../chunk-ZMPR436Z.js";
117
+ import "../chunk-P2546BBI.js";
108
118
  import "../chunk-POFBE6ZY.js";
109
- import "../chunk-LZYJMSOY.js";
110
- import "../chunk-34RXPM5U.js";
111
- import "../chunk-ABMEBN2R.js";
112
- import "../chunk-LY3OJFBW.js";
119
+ import "../chunk-L5YTS2BP.js";
120
+ import "../chunk-EK7SZJ4K.js";
121
+ import "../chunk-T6RIKJUO.js";
113
122
  import "../chunk-7QLSKOSU.js";
114
123
  import {
115
124
  EXIT
116
125
  } from "../chunk-KZERVKTD.js";
126
+ import "../chunk-4QQEUJL4.js";
117
127
  import {
118
128
  claudeJson,
119
129
  claudeMcpReceipt,
120
130
  claudeSettings,
121
131
  claudeSettingsLocal,
122
132
  claudeSkillDir,
123
- cleanNpmEnv,
124
133
  codexAgentsMd,
125
134
  codexConfigToml,
126
135
  codexHookPositions,
@@ -136,40 +145,45 @@ import {
136
145
  fxSettings,
137
146
  geminiMd,
138
147
  geminiSettings,
139
- globalPackageState,
140
148
  hermesConfig,
141
149
  hermesConfigReceipt,
142
150
  hookTakeoverReceipt,
143
- npmIsOnPath,
144
151
  pusharyDir,
145
152
  readCodexMcpAuth,
146
- readGlobalFolder,
147
- readGlobalPrefix,
148
153
  removeCodexHookTrust,
149
154
  removeCodexHooks,
150
155
  restoreCodexHookTrust,
151
156
  vscodePluginDir,
152
157
  vscodePluginMcp
153
- } from "../chunk-ZYYQJSIO.js";
158
+ } from "../chunk-OML4YFBN.js";
159
+ import {
160
+ cleanNpmEnv,
161
+ globalPackageState,
162
+ npmIsOnPath,
163
+ readGlobalFolder,
164
+ readGlobalPrefix
165
+ } from "../chunk-XUW2DRAQ.js";
154
166
  import "../chunk-AQFEP65J.js";
155
167
  import {
156
168
  getBaseUrl
157
- } from "../chunk-VUS6QGND.js";
169
+ } from "../chunk-CQ5JGRML.js";
158
170
  import {
159
171
  NPX_LATEST_COMMAND
160
- } from "../chunk-ZOKMGBPR.js";
172
+ } from "../chunk-MC4VY5LK.js";
161
173
  import {
162
174
  CLI_PACKAGE_NAMES,
175
+ globalPackageFolder,
176
+ globalPackagesToUninstall,
177
+ globalRootFor
178
+ } from "../chunk-QTOLNRET.js";
179
+ import {
163
180
  HOOK_COMPATIBLE_PROFILES,
164
181
  HOOK_LOCATOR_BINARY,
165
182
  SUPPORT_DISCORD,
166
183
  SUPPORT_EMAIL,
167
- globalPackageFolder,
168
- globalPackagesToUninstall,
169
- globalRootFor,
170
184
  isValidApiKey,
171
185
  redactSecrets
172
- } from "../chunk-OR5F63C2.js";
186
+ } from "../chunk-LF3TLC7B.js";
173
187
 
174
188
  // bin/pushary-clean.ts
175
189
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync5 } from "fs";
@@ -980,6 +994,20 @@ var main = async () => {
980
994
  process.exit(EXIT.FAILED);
981
995
  }
982
996
  console.log(` ${check} Background service ${dim(did("uninstalled"))}`);
997
+ const uid = process.platform === "darwin" ? process.getuid?.() : void 0;
998
+ let macAppKeepsCodexAppCards = false;
999
+ if (uid !== void 0) {
1000
+ try {
1001
+ const removal = { homeDir: homedir5(), uid, keepWhatTheMacAppTurnedOn: keepShared, dryRun };
1002
+ const appCards = removeCodexAppCardsFromThisMac(removal);
1003
+ macAppKeepsCodexAppCards = codexAppCardsFolderStaysOnThisMac(removal);
1004
+ if (appCards === "removed") console.log(` ${check} Codex app cards ${dim(did("removed"))} ${dim("(quit Codex and open it again)")}`);
1005
+ if (appCards === "kept_for_the_mac_app") console.log(` ${skip} Codex app cards ${dim("(turned on by the Mac app; left on)")}`);
1006
+ } catch {
1007
+ incompleteClean = true;
1008
+ console.log(` ${cross} Codex app cards ${dim("(could not turn off; run pushary codex --app-cards off)")}`);
1009
+ }
1010
+ }
983
1011
  if (everything) await revokeKeysThisCliCreated();
984
1012
  const claudeJson2 = readJson(CLAUDE_JSON);
985
1013
  const keepClaudeMcp = macAppKeeps("claude_code", mcpServerBearer(claudeJson2?.mcpServers));
@@ -1334,7 +1362,7 @@ var main = async () => {
1334
1362
  let removed = 0;
1335
1363
  const kept = [];
1336
1364
  for (const entry of readdirSync5(PUSHARY_DIR)) {
1337
- if (keepShared && isAppOwned(entry) || entry === "setup" && (keepShared || incompleteClean)) {
1365
+ if (keepShared && isAppOwned(entry) || entry === "setup" && (keepShared || incompleteClean) || entry === CODEX_APP_CARDS_DIRECTORY && macAppKeepsCodexAppCards) {
1338
1366
  kept.push(entry);
1339
1367
  continue;
1340
1368
  }
@@ -1,42 +1,45 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- transcriptsEnabled
4
- } from "../chunk-JGNYCRB2.js";
5
- import "../chunk-XH3F66VD.js";
6
2
  import {
7
3
  runCodexBridge
8
- } from "../chunk-SE4JFMLW.js";
9
- import "../chunk-BXK6ZJVJ.js";
4
+ } from "../chunk-LD4MWJMD.js";
5
+ import "../chunk-UVT6B6XN.js";
10
6
  import {
11
7
  resolveProviderBinary
12
- } from "../chunk-GBKSCDEK.js";
8
+ } from "../chunk-2LEH5IGX.js";
13
9
  import "../chunk-RIVNNBEK.js";
14
10
  import {
15
11
  withSpawnProcessOwnership
16
- } from "../chunk-FPKQGWAF.js";
17
- import "../chunk-XNZB274I.js";
18
- import "../chunk-KK2DIUVV.js";
12
+ } from "../chunk-56ZTIY6D.js";
13
+ import "../chunk-5463UUO2.js";
14
+ import "../chunk-GCN73COS.js";
15
+ import {
16
+ transcriptsEnabled
17
+ } from "../chunk-FV34HT35.js";
19
18
  import "../chunk-XHKBHWLX.js";
20
19
  import "../chunk-6ICPEJY5.js";
21
- import "../chunk-KEAIIVW3.js";
22
- import "../chunk-AWMMABVB.js";
20
+ import "../chunk-VYBH6D4X.js";
21
+ import "../chunk-JBT3ZSJS.js";
22
+ import "../chunk-ZMPR436Z.js";
23
+ import "../chunk-P2546BBI.js";
23
24
  import "../chunk-POFBE6ZY.js";
24
- import "../chunk-LZYJMSOY.js";
25
- import "../chunk-34RXPM5U.js";
26
- import "../chunk-ABMEBN2R.js";
25
+ import "../chunk-L5YTS2BP.js";
26
+ import "../chunk-EK7SZJ4K.js";
27
27
  import {
28
28
  getMachineId
29
- } from "../chunk-LY3OJFBW.js";
29
+ } from "../chunk-T6RIKJUO.js";
30
30
  import "../chunk-7QLSKOSU.js";
31
31
  import "../chunk-KZERVKTD.js";
32
- import "../chunk-ZYYQJSIO.js";
32
+ import "../chunk-4QQEUJL4.js";
33
+ import "../chunk-OML4YFBN.js";
34
+ import "../chunk-XUW2DRAQ.js";
33
35
  import "../chunk-AQFEP65J.js";
34
36
  import {
35
37
  getApiKey,
36
38
  getBaseUrl
37
- } from "../chunk-VUS6QGND.js";
38
- import "../chunk-ZOKMGBPR.js";
39
- import "../chunk-OR5F63C2.js";
39
+ } from "../chunk-CQ5JGRML.js";
40
+ import "../chunk-MC4VY5LK.js";
41
+ import "../chunk-QTOLNRET.js";
42
+ import "../chunk-LF3TLC7B.js";
40
43
 
41
44
  // bin/pushary-codex-bridge.ts
42
45
  import { existsSync } from "fs";