@pushary/agent-hooks 1.9.50 → 1.9.52

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 +22 -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 +68 -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-WLT6J3SB.js → chunk-ALZZVC3E.js} +2 -2
  56. package/dist/{chunk-ZMYLVFXC.js → chunk-BL3WAGIK.js} +14 -9
  57. package/dist/{chunk-PA54A437.js → chunk-BUXDR6US.js} +1 -1
  58. package/dist/{chunk-VUS6QGND.js → chunk-CQ5JGRML.js} +5 -1
  59. package/dist/{chunk-IF2UPWD2.js → chunk-DHJSBK63.js} +1 -1
  60. package/dist/chunk-DMJFW4KL.js +729 -0
  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-OHSHDQZF.js +271 -0
  86. package/dist/{chunk-ZYYQJSIO.js → chunk-OML4YFBN.js} +44 -462
  87. package/dist/{chunk-X3RCIOIH.js → chunk-ONCWYACA.js} +1 -1
  88. package/dist/{chunk-LZYJMSOY.js → chunk-P2546BBI.js} +3 -3
  89. package/dist/{chunk-WEY5ZHDB.js → chunk-Q7OXI6VS.js} +5 -5
  90. package/dist/{chunk-APASKZ2I.js → chunk-QKU46TK5.js} +5 -3
  91. package/dist/chunk-QTOLNRET.js +169 -0
  92. package/dist/{chunk-TYTIDEBW.js → chunk-RH6KR6EH.js} +5 -5
  93. package/dist/{chunk-7RMSB4A2.js → chunk-RL7EOD6I.js} +87 -24
  94. package/dist/{chunk-BOVSUH4N.js → chunk-S6RNS4UL.js} +2 -2
  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-OUQ3DUWF.js +52 -0
  108. package/dist/codex-desktop-launch-EIFLPLB7.js +27 -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,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.52
4
+
5
+ - `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.
6
+ - 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.
7
+ - 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.
8
+ - 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.
9
+ - 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.
10
+ - Agents the Pushary Mac app owns are left alone, fx included, and reported as kept.
11
+ - `pushary upgrade` on a machine with no global install now names fx and the command that updates it.
12
+
13
+ ## 1.9.51
14
+
15
+ - `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.
16
+ - 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.
17
+ - The launch no longer touches commands or file edits in the Codex app. Your hooks already handle those, so nothing is asked twice.
18
+ - 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.
19
+ - 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.
20
+ - 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.
21
+ - 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.
22
+ - 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.
23
+ - `pushary codex` is experimental and no longer appears in `pushary --help`. It still runs when typed, and `pushary codex --help` describes it.
24
+
3
25
  ## 1.9.50
4
26
 
5
27
  - 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,27 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ CODEX_APP_CARDS_DIRECTORY,
4
+ removeCodexAppCardsFromThisMac
5
+ } from "../chunk-OHSHDQZF.js";
2
6
  import {
3
7
  PUSHARY_SKILL_NAME,
4
8
  PUSHARY_SKILL_SOURCE,
5
9
  createGuards
6
10
  } from "../chunk-EUW7JL2K.js";
11
+ import "../chunk-DMJFW4KL.js";
12
+ import "../chunk-XCEN33UP.js";
7
13
  import {
8
14
  describeCliKeyRevocation,
9
15
  planCliKeyRevocations,
10
16
  readCliHeldKeys,
11
17
  revokeCliKeys
12
- } from "../chunk-TYTIDEBW.js";
13
- import "../chunk-5Q2FRMPC.js";
18
+ } from "../chunk-RH6KR6EH.js";
19
+ import "../chunk-JOWF4Y4P.js";
14
20
  import {
15
21
  isCursorPluginLeftover,
16
22
  releaseSoleGate,
17
23
  withoutPusharyCursorHooks
18
- } from "../chunk-34AQAQKW.js";
24
+ } from "../chunk-63IQRYVP.js";
19
25
  import {
20
26
  HERMES_PIP_PACKAGE,
21
27
  readHermesStatus,
@@ -24,20 +30,21 @@ import {
24
30
  shortenHome,
25
31
  unregisterPluginLocation,
26
32
  vscodeSettingsTargets
27
- } from "../chunk-VCZN7NAB.js";
33
+ } from "../chunk-EPOD7QHT.js";
28
34
  import {
29
35
  macAppKeepsMcpEntry,
30
36
  mcpServerBearer,
31
37
  pusharyKey,
32
38
  readMacAppAgentKey,
33
39
  setupReceiptKey
34
- } from "../chunk-K73CBZKW.js";
35
- import "../chunk-4PCJ6DYK.js";
40
+ } from "../chunk-MHQB62K5.js";
41
+ import "../chunk-QCGNGEGE.js";
42
+ import "../chunk-6SWMKF5E.js";
36
43
  import {
37
44
  planFxRemoval,
38
45
  removeInstructionBlock
39
- } from "../chunk-DH4BWFU7.js";
40
- import "../chunk-GDDXGBTM.js";
46
+ } from "../chunk-MTKV4RUQ.js";
47
+ import "../chunk-46TC24ET.js";
41
48
  import {
42
49
  OPENCODE_PLUGIN_SIBLING,
43
50
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -49,11 +56,14 @@ import {
49
56
  openCodePluginDir,
50
57
  openCodePluginFile,
51
58
  removeOpenCodeMcpServer
52
- } from "../chunk-LLRYP5TR.js";
59
+ } from "../chunk-K23WMLPY.js";
53
60
  import {
54
61
  ansiPainter,
55
62
  useColor
56
63
  } from "../chunk-FO3MDD26.js";
64
+ import {
65
+ exitOnHelpFlag
66
+ } from "../chunk-S6RNS4UL.js";
57
67
  import {
58
68
  compatibleConfigFile,
59
69
  compatibleDocuments,
@@ -70,10 +80,10 @@ import {
70
80
  removePusharyToolPermissions,
71
81
  restoreClaudeMcpServer,
72
82
  serializeConfigDocument
73
- } from "../chunk-Y74IJ2IO.js";
83
+ } from "../chunk-N77BH7H2.js";
74
84
  import {
75
85
  disableDaemonService
76
- } from "../chunk-ZMYLVFXC.js";
86
+ } from "../chunk-BL3WAGIK.js";
77
87
  import {
78
88
  hookOwnerOf,
79
89
  isHookTakeoverReceipt,
@@ -81,46 +91,44 @@ import {
81
91
  resolveBridgeStub,
82
92
  restoreHookTakeover,
83
93
  restoreMcpServer
84
- } from "../chunk-WEY5ZHDB.js";
94
+ } from "../chunk-Q7OXI6VS.js";
85
95
  import {
86
96
  removeGeminiSettings
87
- } from "../chunk-25SYEAW4.js";
88
- import "../chunk-PA54A437.js";
89
- import "../chunk-XTVEW2NG.js";
97
+ } from "../chunk-6C4S3QYD.js";
98
+ import "../chunk-BUXDR6US.js";
99
+ import "../chunk-LIESRXK5.js";
90
100
  import {
91
101
  rejectUnknownFlags
92
102
  } from "../chunk-GMXKITVA.js";
103
+ import "../chunk-XHKBHWLX.js";
104
+ import "../chunk-6ICPEJY5.js";
93
105
  import {
94
106
  CANDIDATE_RCS,
95
107
  isDisabledExport,
96
108
  removeClaudeAlias,
97
109
  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";
110
+ } from "../chunk-VYBH6D4X.js";
111
+ import "../chunk-36NGFHE4.js";
112
+ import "../chunk-U2L42GVI.js";
113
+ import "../chunk-3RPN7AAT.js";
114
+ import "../chunk-JBT3ZSJS.js";
115
+ import "../chunk-ZMPR436Z.js";
116
+ import "../chunk-P2546BBI.js";
108
117
  import "../chunk-POFBE6ZY.js";
109
- import "../chunk-LZYJMSOY.js";
110
- import "../chunk-34RXPM5U.js";
111
- import "../chunk-ABMEBN2R.js";
112
- import "../chunk-LY3OJFBW.js";
118
+ import "../chunk-L5YTS2BP.js";
119
+ import "../chunk-EK7SZJ4K.js";
120
+ import "../chunk-T6RIKJUO.js";
113
121
  import "../chunk-7QLSKOSU.js";
114
122
  import {
115
123
  EXIT
116
124
  } from "../chunk-KZERVKTD.js";
125
+ import "../chunk-4QQEUJL4.js";
117
126
  import {
118
127
  claudeJson,
119
128
  claudeMcpReceipt,
120
129
  claudeSettings,
121
130
  claudeSettingsLocal,
122
131
  claudeSkillDir,
123
- cleanNpmEnv,
124
132
  codexAgentsMd,
125
133
  codexConfigToml,
126
134
  codexHookPositions,
@@ -136,40 +144,45 @@ import {
136
144
  fxSettings,
137
145
  geminiMd,
138
146
  geminiSettings,
139
- globalPackageState,
140
147
  hermesConfig,
141
148
  hermesConfigReceipt,
142
149
  hookTakeoverReceipt,
143
- npmIsOnPath,
144
150
  pusharyDir,
145
151
  readCodexMcpAuth,
146
- readGlobalFolder,
147
- readGlobalPrefix,
148
152
  removeCodexHookTrust,
149
153
  removeCodexHooks,
150
154
  restoreCodexHookTrust,
151
155
  vscodePluginDir,
152
156
  vscodePluginMcp
153
- } from "../chunk-ZYYQJSIO.js";
157
+ } from "../chunk-OML4YFBN.js";
158
+ import {
159
+ cleanNpmEnv,
160
+ globalPackageState,
161
+ npmIsOnPath,
162
+ readGlobalFolder,
163
+ readGlobalPrefix
164
+ } from "../chunk-XUW2DRAQ.js";
154
165
  import "../chunk-AQFEP65J.js";
155
166
  import {
156
167
  getBaseUrl
157
- } from "../chunk-VUS6QGND.js";
168
+ } from "../chunk-CQ5JGRML.js";
158
169
  import {
159
170
  NPX_LATEST_COMMAND
160
- } from "../chunk-ZOKMGBPR.js";
171
+ } from "../chunk-MC4VY5LK.js";
161
172
  import {
162
173
  CLI_PACKAGE_NAMES,
174
+ globalPackageFolder,
175
+ globalPackagesToUninstall,
176
+ globalRootFor
177
+ } from "../chunk-QTOLNRET.js";
178
+ import {
163
179
  HOOK_COMPATIBLE_PROFILES,
164
180
  HOOK_LOCATOR_BINARY,
165
181
  SUPPORT_DISCORD,
166
182
  SUPPORT_EMAIL,
167
- globalPackageFolder,
168
- globalPackagesToUninstall,
169
- globalRootFor,
170
183
  isValidApiKey,
171
184
  redactSecrets
172
- } from "../chunk-OR5F63C2.js";
185
+ } from "../chunk-LF3TLC7B.js";
173
186
 
174
187
  // bin/pushary-clean.ts
175
188
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync5 } from "fs";
@@ -980,6 +993,19 @@ var main = async () => {
980
993
  process.exit(EXIT.FAILED);
981
994
  }
982
995
  console.log(` ${check} Background service ${dim(did("uninstalled"))}`);
996
+ const uid = process.platform === "darwin" ? process.getuid?.() : void 0;
997
+ let macAppKeepsCodexAppCards = false;
998
+ if (uid !== void 0) {
999
+ try {
1000
+ const appCards = removeCodexAppCardsFromThisMac({ homeDir: homedir5(), uid, keepWhatTheMacAppTurnedOn: keepShared, dryRun });
1001
+ macAppKeepsCodexAppCards = appCards === "kept_for_the_mac_app";
1002
+ if (appCards === "removed") console.log(` ${check} Codex app cards ${dim(did("removed"))} ${dim("(quit Codex and open it again)")}`);
1003
+ if (macAppKeepsCodexAppCards) console.log(` ${skip} Codex app cards ${dim("(turned on by the Mac app; left on)")}`);
1004
+ } catch {
1005
+ incompleteClean = true;
1006
+ console.log(` ${cross} Codex app cards ${dim("(could not turn off; run pushary codex --app-cards off)")}`);
1007
+ }
1008
+ }
983
1009
  if (everything) await revokeKeysThisCliCreated();
984
1010
  const claudeJson2 = readJson(CLAUDE_JSON);
985
1011
  const keepClaudeMcp = macAppKeeps("claude_code", mcpServerBearer(claudeJson2?.mcpServers));
@@ -1334,7 +1360,7 @@ var main = async () => {
1334
1360
  let removed = 0;
1335
1361
  const kept = [];
1336
1362
  for (const entry of readdirSync5(PUSHARY_DIR)) {
1337
- if (keepShared && isAppOwned(entry) || entry === "setup" && (keepShared || incompleteClean)) {
1363
+ if (keepShared && isAppOwned(entry) || entry === "setup" && (keepShared || incompleteClean) || entry === CODEX_APP_CARDS_DIRECTORY && macAppKeepsCodexAppCards) {
1338
1364
  kept.push(entry);
1339
1365
  continue;
1340
1366
  }
@@ -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";