pushary 1.9.35 → 1.9.37

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 (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +9 -9
  5. package/dist/bin/pushary-claude.js +24 -24
  6. package/dist/bin/pushary-clean.js +52 -45
  7. package/dist/bin/pushary-codex-bridge.js +17 -17
  8. package/dist/bin/pushary-codex-hook.js +65 -41
  9. package/dist/bin/pushary-codex.js +12 -12
  10. package/dist/bin/pushary-connect.js +24 -24
  11. package/dist/bin/pushary-cowork.js +5 -5
  12. package/dist/bin/pushary-daemon.js +32 -32
  13. package/dist/bin/pushary-disconnect.js +31 -28
  14. package/dist/bin/pushary-doctor.js +35 -34
  15. package/dist/bin/pushary-elicitation-hook.js +25 -25
  16. package/dist/bin/pushary-gemini-bridge.js +13 -13
  17. package/dist/bin/pushary-gemini-hook.js +27 -27
  18. package/dist/bin/pushary-hook.js +34 -30
  19. package/dist/bin/pushary-login.js +12 -12
  20. package/dist/bin/pushary-logout.js +24 -24
  21. package/dist/bin/pushary-mcp.js +9 -9
  22. package/dist/bin/pushary-mode.js +12 -12
  23. package/dist/bin/pushary-notification-hook.js +24 -24
  24. package/dist/bin/pushary-opencode-hook.js +26 -26
  25. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  26. package/dist/bin/pushary-permission-hook.js +28 -28
  27. package/dist/bin/pushary-post-hook.js +24 -24
  28. package/dist/bin/pushary-prompt-hook.js +24 -24
  29. package/dist/bin/pushary-session-end-hook.js +24 -24
  30. package/dist/bin/pushary-session-start-hook.js +28 -28
  31. package/dist/bin/pushary-setup.js +65 -56
  32. package/dist/bin/pushary-stats.js +5 -5
  33. package/dist/bin/pushary-status.js +26 -26
  34. package/dist/bin/pushary-stop-hook.js +24 -24
  35. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  36. package/dist/bin/pushary-suggestions.js +12 -12
  37. package/dist/bin/pushary-transcript-register.js +17 -17
  38. package/dist/bin/pushary-transcripts.js +7 -7
  39. package/dist/bin/pushary-upgrade.js +30 -30
  40. package/dist/bin/pushary-wait.js +12 -12
  41. package/dist/bin/pushary.js +6 -6
  42. package/dist/{chunk-7FQL5NWJ.js → chunk-235LKHLW.js} +301 -90
  43. package/dist/{chunk-LOYSI2CZ.js → chunk-2WZJHJAB.js} +5 -5
  44. package/dist/{chunk-YABMIGR3.js → chunk-3Y73MQPF.js} +1 -1
  45. package/dist/{chunk-GC3SUMYD.js → chunk-4OQHT5IJ.js} +4 -4
  46. package/dist/{chunk-QJ3ENGBT.js → chunk-6SYU5LVK.js} +3 -3
  47. package/dist/{chunk-NKAMF2YJ.js → chunk-6VUVVVVN.js} +1 -1
  48. package/dist/{chunk-3LS3GFJW.js → chunk-AZXPJLKC.js} +1 -1
  49. package/dist/{chunk-A455TSHF.js → chunk-B7SE22M7.js} +2 -2
  50. package/dist/{chunk-XLXG6MA5.js → chunk-DG5QHKJA.js} +3 -3
  51. package/dist/{chunk-7IVV4LLF.js → chunk-DYALNCS6.js} +3 -3
  52. package/dist/{chunk-PEEJP4HN.js → chunk-EK6PRPCY.js} +4 -4
  53. package/dist/{chunk-FPYBX36E.js → chunk-F3J6JFR2.js} +5 -5
  54. package/dist/{chunk-Z6HDYK2A.js → chunk-FFRH7KZP.js} +2 -2
  55. package/dist/{chunk-V4ZIG66K.js → chunk-GKTVIN4F.js} +1 -1
  56. package/dist/{chunk-YRDNKY77.js → chunk-GQSJVYKN.js} +6 -6
  57. package/dist/{chunk-EGTRIM74.js → chunk-GSP7CC52.js} +4 -4
  58. package/dist/{chunk-NMQLY4PE.js → chunk-GUHM2UQO.js} +2 -2
  59. package/dist/{chunk-OZMGO4WF.js → chunk-HA22GGDG.js} +5 -5
  60. package/dist/{chunk-WFPXKCN4.js → chunk-HJF57K2U.js} +5 -5
  61. package/dist/{chunk-VTAC5FBZ.js → chunk-HK2RPWAD.js} +1 -1
  62. package/dist/{chunk-SMSX4TCC.js → chunk-HQR6DYVG.js} +1 -1
  63. package/dist/{chunk-FQQSW7MD.js → chunk-ISNGKZG4.js} +1 -1
  64. package/dist/{chunk-EJWSE7S7.js → chunk-JLQV3XLV.js} +4 -4
  65. package/dist/{chunk-A5FFSXZE.js → chunk-JMLJHKJN.js} +2 -2
  66. package/dist/{chunk-7S7H7V5V.js → chunk-KHLYOIPY.js} +97 -40
  67. package/dist/{chunk-HVUBWLER.js → chunk-KZ3XE3JG.js} +34 -109
  68. package/dist/{chunk-CK3W7Q5S.js → chunk-MAGB6VW6.js} +1 -1
  69. package/dist/{chunk-DCBSD22V.js → chunk-N5WEEYV6.js} +3 -3
  70. package/dist/{chunk-U7CN5HG2.js → chunk-NDQXKLGE.js} +5 -5
  71. package/dist/{chunk-IRU7DKJW.js → chunk-NPE44CX4.js} +7 -3
  72. package/dist/{chunk-22YSHBTI.js → chunk-NWSWP3KY.js} +3 -3
  73. package/dist/{chunk-HQKYWUBF.js → chunk-OSLC7G3D.js} +2 -2
  74. package/dist/{chunk-7UGGCTTW.js → chunk-PDDJKGIW.js} +2 -2
  75. package/dist/chunk-PDRKQSC6.js +184 -0
  76. package/dist/{chunk-4PIAOJAW.js → chunk-PYWLW7PC.js} +1 -1
  77. package/dist/{chunk-6OGDGQTT.js → chunk-Q3TCLMYC.js} +5 -5
  78. package/dist/{chunk-57FFQR46.js → chunk-Q52PBCN7.js} +1 -1
  79. package/dist/{chunk-DQKEGNTI.js → chunk-QUKATQ66.js} +1 -1
  80. package/dist/{chunk-UPRNSD2T.js → chunk-RFIHLLRH.js} +9 -6
  81. package/dist/{chunk-36ZCFJUI.js → chunk-SNI4FGOV.js} +1 -1
  82. package/dist/{chunk-43H2FUNN.js → chunk-SNUNAIKK.js} +4 -4
  83. package/dist/{chunk-WMB3OCI4.js → chunk-T2NKNQPM.js} +2 -2
  84. package/dist/{chunk-WPSI4246.js → chunk-UEIL72RN.js} +1 -1
  85. package/dist/{chunk-UDECNZYI.js → chunk-UK3WY3LE.js} +2 -2
  86. package/dist/{chunk-E2OZZZKP.js → chunk-UKCGR5T2.js} +2 -2
  87. package/dist/{chunk-CPYOJRDN.js → chunk-V7Q7DQXL.js} +8 -8
  88. package/dist/{chunk-ULJFIF5N.js → chunk-VA36Q6BD.js} +1 -1
  89. package/dist/{chunk-FDNMQEU6.js → chunk-VMIDUNOT.js} +2 -2
  90. package/dist/{chunk-SMRMWDFE.js → chunk-W73URGML.js} +43 -17
  91. package/dist/{chunk-45OXG3VR.js → chunk-WXA3CFZR.js} +1 -1
  92. package/dist/{chunk-4TFD3WAA.js → chunk-YNJ372JU.js} +2 -2
  93. package/dist/{chunk-H52HBSOD.js → chunk-Z5ORWTY3.js} +3 -3
  94. package/dist/{chunk-B5RLJ6QD.js → chunk-ZMR3DSMH.js} +9 -5
  95. package/dist/{chunk-HJNCVY5F.js → chunk-ZQD6GVS7.js} +7 -7
  96. package/dist/{global-upgrade-IZCB4WIE.js → global-upgrade-R57HCUTC.js} +6 -6
  97. package/dist/{paths-4WAA57P5.js → paths-G2AYNZCD.js} +2 -2
  98. package/dist/{reapply-GJ73ZHDD.js → reapply-FHCOPXEN.js} +20 -20
  99. package/dist/src/index.js +19 -19
  100. package/dist/{upgrade-lock-J5PIKSYV.js → upgrade-lock-3I7AF7E3.js} +3 -3
  101. package/package.json +1 -1
  102. package/dist/chunk-FYQG2UTK.js +0 -71
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.37
4
+
5
+ - Codex questions reach Pushary. When Codex asks you something with its question card (`request_user_input`), the question and its choices go to your phone or the Mac notch, and your answer goes back to Codex in place of the card. A question with no choices, one choice, more than four, or a secret stays in Codex, and so does one nobody answers or Pushary cannot reach. Setup and upgrade widen the Codex `PreToolUse` matcher to include both question tools.
6
+ - When away now asks about a destructive Codex command (such as `rm -rf`, a force push, `git reset --hard` or `git clean`) or a patch that deletes a file, because Codex can run those without a prompt of its own. The question goes to your phone when you are away from the keyboard; at the keyboard Codex carries on as before. A call nobody answers is refused.
7
+
8
+ ## 1.9.36
9
+
10
+ - Connect Grok Build to Pushary with native hooks for tool approvals, session activity and subagent activity. Setup, doctor, upgrades and disconnect use Grok's configuration directory, including a custom `GROK_HOME`.
11
+ - Grok patch approvals inspect every affected path, including move destinations, and show the patch in the approval receipt. Existing kill, deny and scope rules apply to those calls.
12
+ - Cleanup reports malformed or unreadable agent configuration and preserves the file so it can be repaired.
13
+ - Grok's question and plan dialogs stay in Grok. Use Pushary's MCP tools for phone questions. Grok itself continues after a hook crash or timeout, so Pushary hooks do not replace Grok's native permission checks.
14
+
3
15
  ## 1.9.35
4
16
 
5
17
  - When you run setup yourself in a terminal and your phone cannot get notifications yet, it no longer stops with exit code 6. It asks you to open the Pushary app and allow notifications, waits up to 10 minutes for your phone, then sends a test notification. Press Enter to skip the wait. Runs with `--yes`, `--agents` or `--json`, and computers with the Pushary Mac app, keep the single check.
package/README.md CHANGED
@@ -214,7 +214,7 @@ sign-out Sign out: remove the key this machine stores, and say what it does
214
214
  pair Pair a phone without re-running setup (--app for the Pushary app; also: connect)
215
215
  bell Free local bell when an agent finishes or needs you. No account, no key, no network
216
216
  doctor Verify your Pushary installation is working
217
- disconnect Turn off one agent (claude|codex|gemini|cursor|opencode|qwen|codebuddy|qoder|droid|devin|antigravity|fx)
217
+ disconnect Turn off one agent (claude|codex|gemini|cursor|opencode|qwen|codebuddy|qoder|droid|devin|antigravity|grok|fx)
218
218
  clean Remove Pushary from this machine (--everything: the Mac app's setup too, --dry-run: preview)
219
219
  mode Choose where approval requests appear
220
220
  wait Show or set the "wait for your phone" ladder (pushary wait 45)
@@ -1,41 +1,41 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-WPSI4246.js";
4
+ } from "../chunk-UEIL72RN.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-B5RLJ6QD.js";
8
- import "../chunk-CPYOJRDN.js";
7
+ } from "../chunk-ZMR3DSMH.js";
8
+ import "../chunk-V7Q7DQXL.js";
9
9
  import "../chunk-DWQYCOPI.js";
10
- import "../chunk-FPYBX36E.js";
11
- import "../chunk-CK3W7Q5S.js";
12
- import "../chunk-4PIAOJAW.js";
13
- import "../chunk-SMSX4TCC.js";
10
+ import "../chunk-F3J6JFR2.js";
11
+ import "../chunk-MAGB6VW6.js";
12
+ import "../chunk-PYWLW7PC.js";
13
+ import "../chunk-HQR6DYVG.js";
14
14
  import "../chunk-XHKBHWLX.js";
15
- import "../chunk-7S7H7V5V.js";
16
- import "../chunk-6OGDGQTT.js";
17
- import "../chunk-QJ3ENGBT.js";
18
- import "../chunk-57FFQR46.js";
19
- import "../chunk-36ZCFJUI.js";
15
+ import "../chunk-KHLYOIPY.js";
16
+ import "../chunk-Q3TCLMYC.js";
17
+ import "../chunk-6SYU5LVK.js";
18
+ import "../chunk-Q52PBCN7.js";
19
+ import "../chunk-SNI4FGOV.js";
20
20
  import "../chunk-GMXKITVA.js";
21
21
  import "../chunk-6ICPEJY5.js";
22
- import "../chunk-DCBSD22V.js";
23
- import "../chunk-SMRMWDFE.js";
24
- import "../chunk-DQKEGNTI.js";
25
- import "../chunk-OZMGO4WF.js";
22
+ import "../chunk-N5WEEYV6.js";
23
+ import "../chunk-W73URGML.js";
24
+ import "../chunk-QUKATQ66.js";
25
+ import "../chunk-HA22GGDG.js";
26
26
  import "../chunk-POFBE6ZY.js";
27
- import "../chunk-H52HBSOD.js";
28
- import "../chunk-7IVV4LLF.js";
29
- import "../chunk-22YSHBTI.js";
30
- import "../chunk-ULJFIF5N.js";
27
+ import "../chunk-Z5ORWTY3.js";
28
+ import "../chunk-DYALNCS6.js";
29
+ import "../chunk-NWSWP3KY.js";
30
+ import "../chunk-VA36Q6BD.js";
31
31
  import "../chunk-7QLSKOSU.js";
32
32
  import "../chunk-KZERVKTD.js";
33
- import "../chunk-NMQLY4PE.js";
34
- import "../chunk-UPRNSD2T.js";
33
+ import "../chunk-GUHM2UQO.js";
34
+ import "../chunk-RFIHLLRH.js";
35
35
  import "../chunk-AQFEP65J.js";
36
- import "../chunk-3LS3GFJW.js";
37
- import "../chunk-45OXG3VR.js";
38
- import "../chunk-7FQL5NWJ.js";
36
+ import "../chunk-AZXPJLKC.js";
37
+ import "../chunk-WXA3CFZR.js";
38
+ import "../chunk-235LKHLW.js";
39
39
 
40
40
  // bin/pushary-bell-hook.ts
41
41
  var main = async () => {
@@ -5,39 +5,39 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-WPSI4246.js";
8
+ } from "../chunk-UEIL72RN.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-FO3MDD26.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-A5FFSXZE.js";
14
+ } from "../chunk-JMLJHKJN.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-36ZCFJUI.js";
19
+ } from "../chunk-SNI4FGOV.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
23
- import "../chunk-DCBSD22V.js";
23
+ import "../chunk-N5WEEYV6.js";
24
24
  import "../chunk-7QLSKOSU.js";
25
25
  import {
26
26
  EXIT
27
27
  } from "../chunk-KZERVKTD.js";
28
- import "../chunk-NMQLY4PE.js";
28
+ import "../chunk-GUHM2UQO.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-UPRNSD2T.js";
31
+ } from "../chunk-RFIHLLRH.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
35
35
  } from "../chunk-AQFEP65J.js";
36
- import "../chunk-3LS3GFJW.js";
37
- import "../chunk-45OXG3VR.js";
36
+ import "../chunk-AZXPJLKC.js";
37
+ import "../chunk-WXA3CFZR.js";
38
38
  import {
39
39
  isRecord
40
- } from "../chunk-7FQL5NWJ.js";
40
+ } from "../chunk-235LKHLW.js";
41
41
 
42
42
  // bin/pushary-bell.ts
43
43
  exitOnHelpFlag("bell");
@@ -8,39 +8,39 @@ import {
8
8
  describeIdleWindow,
9
9
  startProcessOwnership,
10
10
  withSpawnProcessOwnership
11
- } from "../chunk-E2OZZZKP.js";
11
+ } from "../chunk-UKCGR5T2.js";
12
12
  import {
13
13
  announceSubscriptionRequired,
14
14
  isDeferAnswer
15
- } from "../chunk-NKAMF2YJ.js";
15
+ } from "../chunk-6VUVVVVN.js";
16
16
  import {
17
17
  claudeTranscriptPath,
18
18
  loadSessionKey,
19
19
  registerTranscript,
20
20
  registeredTranscriptEnabled
21
- } from "../chunk-CPYOJRDN.js";
21
+ } from "../chunk-V7Q7DQXL.js";
22
22
  import "../chunk-DWQYCOPI.js";
23
23
  import {
24
24
  ensureDaemonRunning
25
- } from "../chunk-FPYBX36E.js";
25
+ } from "../chunk-F3J6JFR2.js";
26
26
  import {
27
27
  encryptRecord
28
- } from "../chunk-CK3W7Q5S.js";
29
- import "../chunk-4PIAOJAW.js";
28
+ } from "../chunk-MAGB6VW6.js";
29
+ import "../chunk-PYWLW7PC.js";
30
30
  import {
31
31
  transcriptsEnabled
32
- } from "../chunk-SMSX4TCC.js";
32
+ } from "../chunk-HQR6DYVG.js";
33
33
  import {
34
34
  needsShell,
35
35
  spawnClaude
36
36
  } from "../chunk-XHKBHWLX.js";
37
- import "../chunk-6OGDGQTT.js";
38
- import "../chunk-QJ3ENGBT.js";
39
- import "../chunk-57FFQR46.js";
40
- import "../chunk-36ZCFJUI.js";
37
+ import "../chunk-Q3TCLMYC.js";
38
+ import "../chunk-6SYU5LVK.js";
39
+ import "../chunk-Q52PBCN7.js";
40
+ import "../chunk-SNI4FGOV.js";
41
41
  import "../chunk-GMXKITVA.js";
42
42
  import "../chunk-6ICPEJY5.js";
43
- import "../chunk-DCBSD22V.js";
43
+ import "../chunk-N5WEEYV6.js";
44
44
  import {
45
45
  DEFAULT_SESSION,
46
46
  UNNAMED_ACTION,
@@ -58,8 +58,8 @@ import {
58
58
  reportEvent,
59
59
  savePendingCommand,
60
60
  scopePathFor
61
- } from "../chunk-SMRMWDFE.js";
62
- import "../chunk-DQKEGNTI.js";
61
+ } from "../chunk-W73URGML.js";
62
+ import "../chunk-QUKATQ66.js";
63
63
  import {
64
64
  askUser,
65
65
  cancelQuestion,
@@ -70,28 +70,28 @@ import {
70
70
  waitForAnswer,
71
71
  waitsForThePhone,
72
72
  withdrawQuestion
73
- } from "../chunk-OZMGO4WF.js";
73
+ } from "../chunk-HA22GGDG.js";
74
74
  import "../chunk-POFBE6ZY.js";
75
75
  import {
76
76
  SubscriptionRequiredError
77
- } from "../chunk-H52HBSOD.js";
78
- import "../chunk-7IVV4LLF.js";
79
- import "../chunk-22YSHBTI.js";
77
+ } from "../chunk-Z5ORWTY3.js";
78
+ import "../chunk-DYALNCS6.js";
79
+ import "../chunk-NWSWP3KY.js";
80
80
  import {
81
81
  getMachineId
82
- } from "../chunk-ULJFIF5N.js";
82
+ } from "../chunk-VA36Q6BD.js";
83
83
  import "../chunk-7QLSKOSU.js";
84
84
  import "../chunk-KZERVKTD.js";
85
- import "../chunk-NMQLY4PE.js";
86
- import "../chunk-UPRNSD2T.js";
85
+ import "../chunk-GUHM2UQO.js";
86
+ import "../chunk-RFIHLLRH.js";
87
87
  import "../chunk-AQFEP65J.js";
88
88
  import {
89
89
  getApiKey,
90
90
  getBaseUrl
91
- } from "../chunk-3LS3GFJW.js";
91
+ } from "../chunk-AZXPJLKC.js";
92
92
  import {
93
93
  NPX_LATEST_COMMAND
94
- } from "../chunk-45OXG3VR.js";
94
+ } from "../chunk-WXA3CFZR.js";
95
95
  import {
96
96
  DECISION_STOP_REASON,
97
97
  HAND_BACK_WITHOUT_A_PROMPT,
@@ -101,7 +101,7 @@ import {
101
101
  redactSecretsFromContent,
102
102
  resolveGate,
103
103
  timeoutActionWithoutLocalPrompt
104
- } from "../chunk-7FQL5NWJ.js";
104
+ } from "../chunk-235LKHLW.js";
105
105
 
106
106
  // src/wrapper/localPassthrough.ts
107
107
  var SIGNAL_NUMBERS = {
@@ -9,12 +9,12 @@ import {
9
9
  planCliKeyRevocations,
10
10
  readCliHeldKeys,
11
11
  revokeCliKeys
12
- } from "../chunk-U7CN5HG2.js";
12
+ } from "../chunk-NDQXKLGE.js";
13
13
  import {
14
14
  isCursorPluginLeftover,
15
15
  releaseSoleGate,
16
16
  withoutPusharyCursorHooks
17
- } from "../chunk-GC3SUMYD.js";
17
+ } from "../chunk-4OQHT5IJ.js";
18
18
  import {
19
19
  HERMES_PIP_PACKAGE,
20
20
  readHermesStatus,
@@ -23,25 +23,25 @@ import {
23
23
  shortenHome,
24
24
  unregisterPluginLocation,
25
25
  vscodeSettingsTargets
26
- } from "../chunk-IRU7DKJW.js";
26
+ } from "../chunk-NPE44CX4.js";
27
27
  import {
28
28
  planFxRemoval,
29
29
  removeInstructionBlock
30
- } from "../chunk-EJWSE7S7.js";
31
- import "../chunk-UDECNZYI.js";
30
+ } from "../chunk-JLQV3XLV.js";
31
+ import "../chunk-UK3WY3LE.js";
32
32
  import {
33
33
  disableDaemonService
34
- } from "../chunk-FPYBX36E.js";
34
+ } from "../chunk-F3J6JFR2.js";
35
35
  import "../chunk-XHKBHWLX.js";
36
- import "../chunk-PEEJP4HN.js";
36
+ import "../chunk-EK6PRPCY.js";
37
37
  import {
38
38
  macAppKeepsMcpEntry,
39
39
  mcpServerBearer,
40
40
  pusharyKey,
41
41
  readMacAppAgentKey,
42
42
  setupReceiptKey
43
- } from "../chunk-EGTRIM74.js";
44
- import "../chunk-FDNMQEU6.js";
43
+ } from "../chunk-GSP7CC52.js";
44
+ import "../chunk-VMIDUNOT.js";
45
45
  import {
46
46
  OPENCODE_PLUGIN_SIBLING,
47
47
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -53,27 +53,30 @@ import {
53
53
  openCodePluginDir,
54
54
  openCodePluginFile,
55
55
  removeOpenCodeMcpServer
56
- } from "../chunk-WFPXKCN4.js";
56
+ } from "../chunk-HJF57K2U.js";
57
57
  import {
58
58
  ansiPainter,
59
59
  useColor
60
60
  } from "../chunk-FO3MDD26.js";
61
61
  import {
62
62
  exitOnHelpFlag
63
- } from "../chunk-A5FFSXZE.js";
63
+ } from "../chunk-JMLJHKJN.js";
64
64
  import {
65
65
  compatibleConfigFile,
66
+ compatibleDocuments,
66
67
  compatibleInstructionsFile,
67
68
  compatibleMcpFile,
68
69
  compatiblePermissionRuleFile,
69
70
  isClaudeMcpSnapshot,
71
+ readConfigDocument,
70
72
  removeClaudeMcpServers,
71
73
  removeCompatibleHooks,
72
74
  removeCompatibleMcpServer,
73
75
  removePusharySettings,
74
76
  removePusharyToolPermissions,
75
- restoreClaudeMcpServer
76
- } from "../chunk-7S7H7V5V.js";
77
+ restoreClaudeMcpServer,
78
+ serializeConfigDocument
79
+ } from "../chunk-KHLYOIPY.js";
77
80
  import {
78
81
  hookOwnerOf,
79
82
  isHookTakeoverReceipt,
@@ -81,12 +84,12 @@ import {
81
84
  resolveBridgeStub,
82
85
  restoreHookTakeover,
83
86
  restoreMcpServer
84
- } from "../chunk-6OGDGQTT.js";
87
+ } from "../chunk-Q3TCLMYC.js";
85
88
  import {
86
89
  removeGeminiSettings
87
- } from "../chunk-QJ3ENGBT.js";
88
- import "../chunk-57FFQR46.js";
89
- import "../chunk-36ZCFJUI.js";
90
+ } from "../chunk-6SYU5LVK.js";
91
+ import "../chunk-Q52PBCN7.js";
92
+ import "../chunk-SNI4FGOV.js";
90
93
  import {
91
94
  rejectUnknownFlags
92
95
  } from "../chunk-GMXKITVA.js";
@@ -96,20 +99,20 @@ import {
96
99
  isDisabledExport,
97
100
  removeClaudeAlias,
98
101
  shellProfileCandidates
99
- } from "../chunk-DCBSD22V.js";
100
- import "../chunk-SMRMWDFE.js";
101
- import "../chunk-DQKEGNTI.js";
102
- import "../chunk-OZMGO4WF.js";
102
+ } from "../chunk-N5WEEYV6.js";
103
+ import "../chunk-W73URGML.js";
104
+ import "../chunk-QUKATQ66.js";
105
+ import "../chunk-HA22GGDG.js";
103
106
  import "../chunk-POFBE6ZY.js";
104
- import "../chunk-H52HBSOD.js";
105
- import "../chunk-7IVV4LLF.js";
106
- import "../chunk-22YSHBTI.js";
107
- import "../chunk-ULJFIF5N.js";
107
+ import "../chunk-Z5ORWTY3.js";
108
+ import "../chunk-DYALNCS6.js";
109
+ import "../chunk-NWSWP3KY.js";
110
+ import "../chunk-VA36Q6BD.js";
108
111
  import "../chunk-7QLSKOSU.js";
109
112
  import {
110
113
  EXIT
111
114
  } from "../chunk-KZERVKTD.js";
112
- import "../chunk-NMQLY4PE.js";
115
+ import "../chunk-GUHM2UQO.js";
113
116
  import {
114
117
  claudeJson,
115
118
  claudeMcpReceipt,
@@ -146,14 +149,14 @@ import {
146
149
  restoreCodexHookTrust,
147
150
  vscodePluginDir,
148
151
  vscodePluginMcp
149
- } from "../chunk-UPRNSD2T.js";
152
+ } from "../chunk-RFIHLLRH.js";
150
153
  import "../chunk-AQFEP65J.js";
151
154
  import {
152
155
  getBaseUrl
153
- } from "../chunk-3LS3GFJW.js";
156
+ } from "../chunk-AZXPJLKC.js";
154
157
  import {
155
158
  NPX_LATEST_COMMAND
156
- } from "../chunk-45OXG3VR.js";
159
+ } from "../chunk-WXA3CFZR.js";
157
160
  import {
158
161
  CLI_PACKAGE_NAMES,
159
162
  HOOK_COMPATIBLE_PROFILES,
@@ -165,7 +168,7 @@ import {
165
168
  globalRootFor,
166
169
  isValidApiKey,
167
170
  redactSecrets
168
- } from "../chunk-7FQL5NWJ.js";
171
+ } from "../chunk-235LKHLW.js";
169
172
 
170
173
  // bin/pushary-clean.ts
171
174
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
@@ -550,9 +553,9 @@ var isAppOwned = (name) => APP_OWNED_ENTRIES.includes(name);
550
553
  // src/compatible-clean.ts
551
554
  var keepsMcpServer = (profile, scope, io, home) => {
552
555
  const mcpPath = compatibleMcpFile(profile, home);
553
- if (!mcpPath) return false;
554
- const mcp = io.readJson(mcpPath);
555
- return mcp !== null && scope.keepsMcpEntry(profile.agentType, mcpServerBearer(mcp.mcpServers));
556
+ if (!mcpPath || !profile.mcp) return false;
557
+ const document = readConfigDocument(mcpPath, profile.mcp.file.format, io.files);
558
+ return document.kind === "parsed" && scope.keepsMcpEntry(profile.agentType, mcpServerBearer(document.value[profile.mcp.container]));
556
559
  };
557
560
  var removalsByPath = (profile, removalScope2, home) => {
558
561
  const removals = /* @__PURE__ */ new Map();
@@ -575,19 +578,23 @@ var cleanInstructions = (profile, scope, io, home) => {
575
578
  var cleanCompatibleAgent = (profile, scope, io, home) => {
576
579
  const mcpKeptForApp = keepsMcpServer(profile, scope, io, home);
577
580
  const removalScope2 = { keepAppWiring: scope.keepAppWiring, keepMcpServer: mcpKeptForApp };
578
- const files = [...removalsByPath(profile, removalScope2, home)].map(([path, removals]) => {
579
- const config = io.readJson(path);
580
- if (!config) return { path, outcome: "not_found" };
581
- if (!removals.reduce((changed, remove) => remove(config) || changed, false)) return { path, outcome: "unchanged" };
582
- io.writeJson(path, config);
583
- return { path, outcome: "cleaned" };
581
+ const removals = removalsByPath(profile, removalScope2, home);
582
+ const files = [...compatibleDocuments(profile, home)].flatMap(([path, file]) => {
583
+ const edits = removals.get(path);
584
+ if (!edits) return [];
585
+ const document = readConfigDocument(path, file.format, io.files);
586
+ if (document.kind === "missing") return [{ path, outcome: "not_found" }];
587
+ if (document.kind === "unreadable") return [{ path, outcome: "unreadable" }];
588
+ if (!edits.reduce((changed, remove) => remove(document.value) || changed, false)) return [{ path, outcome: "unchanged" }];
589
+ io.files.write(path, serializeConfigDocument(document.value, file.format));
590
+ return [{ path, outcome: "cleaned" }];
584
591
  });
585
592
  return {
586
593
  profile,
587
594
  files,
588
595
  mcpKeptForApp,
589
596
  instructions: cleanInstructions(profile, scope, io, home),
590
- soleGate: releaseSoleGate(profile, io.soleGateFiles, home)
597
+ soleGate: releaseSoleGate(profile, io.files, home)
591
598
  };
592
599
  };
593
600
 
@@ -634,8 +641,9 @@ var codexMcpKey = (config) => {
634
641
  var readText = (path) => {
635
642
  try {
636
643
  return readFileSync4(path, "utf-8");
637
- } catch {
638
- return null;
644
+ } catch (error) {
645
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return null;
646
+ throw error;
639
647
  }
640
648
  };
641
649
  var readJson = (path) => {
@@ -1094,16 +1102,15 @@ var main = async () => {
1094
1102
  }
1095
1103
  const compatibleScope = { keepAppWiring: keepShared, keepsMcpEntry: macAppKeeps };
1096
1104
  const compatibleIo = {
1097
- readJson,
1098
- writeJson,
1099
1105
  removeInstructionBlock: guardedInstructionBlockRemoval,
1100
- soleGateFiles: { read: readText, write: guardedWrite, remove: (path) => guardedRemove(path, { force: true }) }
1106
+ files: { read: readText, write: guardedWrite, remove: (path) => guardedRemove(path, { force: true }) }
1101
1107
  };
1102
1108
  for (const profile of HOOK_COMPATIBLE_PROFILES) {
1103
1109
  const report = cleanCompatibleAgent(profile, compatibleScope, compatibleIo);
1104
1110
  for (const file of report.files) {
1105
1111
  const label2 = `${profile.label} ${shortenHome(file.path)}`;
1106
1112
  if (file.outcome === "not_found") console.log(` ${skip} ${label2} ${dim("(not found)")}`);
1113
+ else if (file.outcome === "unreadable") console.log(` ${skip} ${label2} ${yellow("(could not read configuration; left unchanged)")}`);
1107
1114
  else if (file.outcome === "cleaned") console.log(` ${check} ${label2} ${dim(did("cleaned"))}`);
1108
1115
  else console.log(` ${skip} ${label2} ${dim(keepShared ? "(nothing the CLI wrote)" : "(no pushary entries)")}`);
1109
1116
  }
@@ -5,10 +5,10 @@ import {
5
5
  postLiveSession,
6
6
  postLiveSessionUntilAccepted,
7
7
  startLiveSessionHeartbeat
8
- } from "../chunk-HQKYWUBF.js";
8
+ } from "../chunk-OSLC7G3D.js";
9
9
  import {
10
10
  resolveProviderBinary
11
- } from "../chunk-4TFD3WAA.js";
11
+ } from "../chunk-YNJ372JU.js";
12
12
  import "../chunk-RIVNNBEK.js";
13
13
  import {
14
14
  SESSION_IDLE_TIMEOUT_MS,
@@ -16,50 +16,50 @@ import {
16
16
  idleDeadlinePassed,
17
17
  startProcessOwnership,
18
18
  withSpawnProcessOwnership
19
- } from "../chunk-E2OZZZKP.js";
20
- import "../chunk-CK3W7Q5S.js";
21
- import "../chunk-4PIAOJAW.js";
19
+ } from "../chunk-UKCGR5T2.js";
20
+ import "../chunk-MAGB6VW6.js";
21
+ import "../chunk-PYWLW7PC.js";
22
22
  import {
23
23
  transcriptsEnabled
24
- } from "../chunk-SMSX4TCC.js";
24
+ } from "../chunk-HQR6DYVG.js";
25
25
  import {
26
26
  spawnClaude
27
27
  } from "../chunk-XHKBHWLX.js";
28
28
  import "../chunk-6ICPEJY5.js";
29
- import "../chunk-DCBSD22V.js";
29
+ import "../chunk-N5WEEYV6.js";
30
30
  import {
31
31
  isAskUserResponse,
32
32
  isDecisionStopped,
33
33
  isWaitForAnswerResponse,
34
34
  withdrawQuestion,
35
35
  writeDegraded
36
- } from "../chunk-OZMGO4WF.js";
36
+ } from "../chunk-HA22GGDG.js";
37
37
  import "../chunk-POFBE6ZY.js";
38
38
  import {
39
39
  callMcpTool
40
- } from "../chunk-H52HBSOD.js";
41
- import "../chunk-7IVV4LLF.js";
42
- import "../chunk-22YSHBTI.js";
40
+ } from "../chunk-Z5ORWTY3.js";
41
+ import "../chunk-DYALNCS6.js";
42
+ import "../chunk-NWSWP3KY.js";
43
43
  import {
44
44
  getMachineId
45
- } from "../chunk-ULJFIF5N.js";
45
+ } from "../chunk-VA36Q6BD.js";
46
46
  import "../chunk-7QLSKOSU.js";
47
47
  import "../chunk-KZERVKTD.js";
48
- import "../chunk-NMQLY4PE.js";
49
- import "../chunk-UPRNSD2T.js";
48
+ import "../chunk-GUHM2UQO.js";
49
+ import "../chunk-RFIHLLRH.js";
50
50
  import "../chunk-AQFEP65J.js";
51
51
  import {
52
52
  getApiKey,
53
53
  getBaseUrl
54
- } from "../chunk-3LS3GFJW.js";
55
- import "../chunk-45OXG3VR.js";
54
+ } from "../chunk-AZXPJLKC.js";
55
+ import "../chunk-WXA3CFZR.js";
56
56
  import {
57
57
  elicitationContent,
58
58
  parseAgentQuestion,
59
59
  parseAgentQuestionAnswers,
60
60
  planElicitationAsk,
61
61
  readElicitationFields
62
- } from "../chunk-7FQL5NWJ.js";
62
+ } from "../chunk-235LKHLW.js";
63
63
 
64
64
  // bin/pushary-codex-bridge.ts
65
65
  import { existsSync } from "fs";