@pushary/agent-hooks 1.7.0 → 1.7.2

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 +28 -0
  2. package/dist/bin/pushary-bell-hook.js +23 -23
  3. package/dist/bin/pushary-bell.js +10 -10
  4. package/dist/bin/pushary-claude.js +46 -35
  5. package/dist/bin/pushary-clean.js +194 -102
  6. package/dist/bin/pushary-codex-bridge.js +18 -17
  7. package/dist/bin/pushary-codex-hook.js +53 -39
  8. package/dist/bin/pushary-codex.js +14 -12
  9. package/dist/bin/pushary-connect.js +16 -16
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +27 -27
  12. package/dist/bin/pushary-disconnect.js +19 -17
  13. package/dist/bin/pushary-doctor.js +99 -43
  14. package/dist/bin/pushary-elicitation-hook.js +35 -26
  15. package/dist/bin/pushary-gemini-bridge.js +12 -12
  16. package/dist/bin/pushary-gemini-hook.js +47 -32
  17. package/dist/bin/pushary-hook.js +34 -32
  18. package/dist/bin/pushary-login.js +16 -16
  19. package/dist/bin/pushary-logout.js +8 -8
  20. package/dist/bin/pushary-mcp.js +9 -8
  21. package/dist/bin/pushary-mode.js +10 -10
  22. package/dist/bin/pushary-notification-hook.js +29 -27
  23. package/dist/bin/pushary-opencode-hook.js +46 -32
  24. package/dist/bin/pushary-permission-denied-hook.js +34 -32
  25. package/dist/bin/pushary-permission-hook.js +33 -31
  26. package/dist/bin/pushary-post-hook.js +29 -27
  27. package/dist/bin/pushary-prompt-hook.js +29 -27
  28. package/dist/bin/pushary-session-end-hook.js +29 -27
  29. package/dist/bin/pushary-session-start-hook.js +33 -31
  30. package/dist/bin/pushary-setup.js +143 -105
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +19 -19
  33. package/dist/bin/pushary-stop-hook.js +29 -27
  34. package/dist/bin/pushary-stopfailure-hook.js +29 -27
  35. package/dist/bin/pushary-suggestions.js +5 -5
  36. package/dist/bin/pushary-transcript-register.js +19 -19
  37. package/dist/bin/pushary-transcripts.js +7 -7
  38. package/dist/bin/pushary-upgrade.js +20 -20
  39. package/dist/bin/pushary-wait.js +10 -10
  40. package/dist/bin/pushary.js +6 -6
  41. package/dist/{chunk-IJ6ECPA6.js → chunk-2B4XCMH6.js} +75 -232
  42. package/dist/{chunk-EGKXSQCY.js → chunk-2XOHXZRC.js} +12 -4
  43. package/dist/{chunk-D6BULEJW.js → chunk-3NSRL5E7.js} +2 -2
  44. package/dist/{chunk-UC65FJJT.js → chunk-3RO2UWJQ.js} +2 -2
  45. package/dist/{chunk-73T6MSU5.js → chunk-4S7CCOXB.js} +5 -5
  46. package/dist/{chunk-7OS4IHGI.js → chunk-5GIBNUBD.js} +2 -2
  47. package/dist/chunk-5OP5MQI7.js +45 -0
  48. package/dist/{chunk-B3UXMSMW.js → chunk-65RN6ZCO.js} +1 -1
  49. package/dist/{chunk-2PS6QWDW.js → chunk-6NHXKTQU.js} +2 -2
  50. package/dist/{chunk-V6QRSU2G.js → chunk-6QZK4O36.js} +4 -4
  51. package/dist/{chunk-ZQ7IDOKY.js → chunk-A6WQF7FQ.js} +3 -3
  52. package/dist/{chunk-QXAK5RFU.js → chunk-AWZNDM3B.js} +1 -1
  53. package/dist/{chunk-JNXVOU6Y.js → chunk-D4OGEWLH.js} +19 -2
  54. package/dist/{chunk-R2XCLT6I.js → chunk-E3PLF7YB.js} +4 -4
  55. package/dist/{chunk-2C7CCWVX.js → chunk-F6BMJOSW.js} +1 -1
  56. package/dist/{chunk-XNCMT7YY.js → chunk-HOIGXMI7.js} +1 -1
  57. package/dist/{chunk-CVALVGA7.js → chunk-I7B2DNVU.js} +1 -1
  58. package/dist/{chunk-S3UD4V6W.js → chunk-INR3RVQ3.js} +13 -3
  59. package/dist/{chunk-52NVBNJT.js → chunk-IZVAVXHQ.js} +6 -4
  60. package/dist/{chunk-5HLTWFJ6.js → chunk-JMSB6CJT.js} +1 -1
  61. package/dist/{chunk-KYQXUGH7.js → chunk-KAJT6HPI.js} +3 -3
  62. package/dist/{chunk-VKVIAZQO.js → chunk-KLXYMPTM.js} +1 -1
  63. package/dist/{chunk-PQ4F64M2.js → chunk-L6IF4JOF.js} +3 -3
  64. package/dist/{chunk-ROQK7IN3.js → chunk-LI3C2IQY.js} +2 -2
  65. package/dist/{chunk-B234346F.js → chunk-M2JGLFFS.js} +1 -1
  66. package/dist/chunk-MY3UZO5U.js +99 -0
  67. package/dist/chunk-N6IOSZOE.js +185 -0
  68. package/dist/{chunk-DNJUSFBL.js → chunk-NYBZJ44G.js} +40 -5
  69. package/dist/{chunk-BBKNJJVX.js → chunk-OJRB5QKN.js} +6 -6
  70. package/dist/{chunk-PUDBG3GM.js → chunk-OXEF6JHD.js} +4 -4
  71. package/dist/{chunk-LEZFOTMI.js → chunk-PWNQGITG.js} +1 -1
  72. package/dist/{chunk-B76WVEDX.js → chunk-Q7CDBJXU.js} +1 -1
  73. package/dist/{chunk-KXMZMZD3.js → chunk-QSZ37ROP.js} +1 -1
  74. package/dist/{chunk-BH2SKSSK.js → chunk-R7ZETVNR.js} +1 -1
  75. package/dist/{chunk-DZURML2D.js → chunk-RLRDPZG4.js} +1 -1
  76. package/dist/{chunk-J2355HR7.js → chunk-SEIZQZEE.js} +1 -1
  77. package/dist/{chunk-V4AQBAVG.js → chunk-SJN64NJX.js} +1 -1
  78. package/dist/{chunk-B3YQANFN.js → chunk-SKEW3TQX.js} +1 -1
  79. package/dist/{chunk-L4H2Q2S4.js → chunk-SKMWPXGV.js} +500 -46
  80. package/dist/{chunk-WUNZAE7I.js → chunk-T3PRPFDY.js} +5 -5
  81. package/dist/{chunk-YYINL576.js → chunk-TVJYGZXB.js} +2 -2
  82. package/dist/{chunk-O2LEPIU6.js → chunk-U3MS6D5X.js} +1 -1
  83. package/dist/{chunk-5RUIFDTP.js → chunk-U4TMAANR.js} +33 -2
  84. package/dist/{chunk-KW2RRR7D.js → chunk-UFNBKYWT.js} +3 -3
  85. package/dist/{chunk-DVQDPI3T.js → chunk-UUTWHVSV.js} +35 -35
  86. package/dist/{chunk-X6KDKOV5.js → chunk-VQDJ6KB3.js} +3 -3
  87. package/dist/{chunk-UOAQ6QMP.js → chunk-VSGKQ3HI.js} +2 -2
  88. package/dist/{chunk-YROGUPOZ.js → chunk-WWTLAZQA.js} +25 -8
  89. package/dist/{chunk-SQRWHALT.js → chunk-WXIVUIXA.js} +2 -2
  90. package/dist/{chunk-HDRNWNVP.js → chunk-YLCSKVQQ.js} +9 -28
  91. package/dist/{chunk-JXUAXO74.js → chunk-YNJ2H2FD.js} +2 -2
  92. package/dist/{chunk-BWYJ6AAF.js → chunk-YU4222G2.js} +2 -2
  93. package/dist/{chunk-4F46VIEE.js → chunk-YU54LNC6.js} +6 -6
  94. package/dist/{chunk-EAQMWJPG.js → chunk-ZMWX5SDA.js} +8 -8
  95. package/dist/{chunk-6ADZQFVW.js → chunk-ZUKZJQGR.js} +1 -1
  96. package/dist/{reapply-6PH3FMPX.js → reapply-D6RSDYCK.js} +9 -9
  97. package/dist/src/index.d.ts +1 -0
  98. package/dist/src/index.js +22 -20
  99. package/package.json +2 -1
  100. package/dist/chunk-DANOZVZK.js +0 -307
  101. package/dist/chunk-P32LPT2L.js +0 -6
  102. package/dist/chunk-YHG74UFF.js +0 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.2
4
+
5
+ - **Approval text shows the whole command again.** A credential name that closes a quoted string, as in `grep -rl "password=" . | xargs rm -f`, made 1.7.1 redact everything after it, so the approval read `grep -rl "password="[redacted]"` and hid the `rm`. The value after a credential name is still redacted, and the rest of the command is shown.
6
+ - **Hermes works again after an uninstall.** When setup found Pushary's own Hermes settings already in `~/.hermes/config.yaml`, left by an earlier install, its record of your config included them, and `pushary clean` put them back: approvals stayed pointed at the plugin clean had just uninstalled, and Hermes' `clarify` tool stayed off, so Hermes could not ask you anything in the terminal. Clean now recognises Pushary's own values in that record, including records older versions wrote, and removes `transport: pushary`, the `pushary` plugin entry, and the `clarify` entry that came with Pushary's transport, while restoring everything else you set. Running clean again, or after the Mac app has disconnected Hermes, no longer fails once Hermes' defaults fill the removed settings back in.
7
+ - `pushary clean` says what it did to Hermes: "Pushary settings removed" only when it changed `config.yaml`, "no Pushary settings" when there was nothing of ours, and it skips the plugin uninstall when the plugin is not installed. `--dry-run` previews the exact change without saving it.
8
+ - `pushary doctor` checks Hermes when Pushary set it up: that the plugin is installed in Hermes' Python and enabled, and whether approvals and questions go through Pushary. A plugin the Mac app left installed but disabled is not reported as a failure.
9
+ - Setup on a machine without npm now says so and asks you to install Node.js, instead of printing `/bin/sh: npm: command not found` and suggesting an `npx` retry that needs npm too. Pushary still needs npm; bun, pnpm and yarn installs are not supported yet.
10
+ - `pushary clean` tells an npm it cannot find, a package that is not installed and a failed uninstall apart, instead of calling each of them "not installed". A failed uninstall no longer ends in "Clean complete".
11
+ - `pushary clean --dry-run` lists only the Mac keychain items and preference domains that exist, and the fx setup record only when there is one. It used to list every candidate it would try. A keychain that cannot be read, for example while locked, still counts as possibly holding Pushary's items, so clean tries them and reports a failure instead of calling the keychain clean.
12
+ - `pushary clean` honours `NO_COLOR`.
13
+ - Setup's agent picker shows only the names you picked once you confirm, instead of repeating every agent's description, and the transcript notice is indented like the lines around it.
14
+ - A message you send from your phone or the Mac notch while Claude Code is running a subagent now waits for Claude Code itself. It used to be handed to the subagent's next tool call, where the main conversation never saw it.
15
+ - When your Pushary workspace has no active subscription, Pushary now steps aside and your agent's own approval prompt decides, as it does when Pushary is not installed. Claude Code, Codex, Gemini CLI and OpenCode used to refuse gated tool calls instead, telling you to retry or that the approval was cancelled, and Claude Code questions, plan approvals and MCP forms stopped the same way. A kill switch and your deny rules still apply.
16
+ - Your agent's terminal says once per session why Pushary stepped aside, with the link to subscribe.
17
+ - A Claude Code or Gemini CLI session started from your phone has no prompt on your machine, so it still refuses the call, now saying the workspace has no active subscription instead of asking you to retry.
18
+ - Pairing your phone during setup now says when your workspace has no active subscription, and to subscribe in the Pushary app or at pushary.com before running setup again. It used to say only that pairing failed.
19
+
20
+ ## 1.7.1
21
+
22
+ - **fx asks through Pushary.** Setup now adds `"ask_user_question": "deny"` as the last rule in `~/.fx/settings.json`, which removes fx's own terminal question tool from what its agent can call, so every question goes through `mcp_pushary_ask_user`: to the Mac notch at the Mac, to the phone away from it. fx cannot forward its own prompt, so a question asked there used to wait unseen once you walked away. A rule you already set for `ask_user_question` is kept, and setup names it. The instructions in `~/.fx/AGENTS.md` now tell fx's agent to load `mcp_pushary_ask_user` with `mcp_select_tool` by exact name and to ask there even while you are at the terminal, and to ask in its reply only when Pushary hands the question back or cannot be reached.
23
+ - fx's full-access mode (`yolo`, `full-access` or `full access`, from settings, a workspace, or `FX_PERMISSION_MODE`) ignores permission rules, so the terminal question tool stays on there; setup and `pushary doctor` say so instead of claiming questions are routed, and the instructions still steer the agent to Pushary. fx workspaces with their own permission rules replace the global ones, and setup and doctor name how many keep the question tool on. Setup reads the rules the way fx does (globs, last match wins, per-target maps) and leaves a `settings.json` fx would reject, such as one with an unknown action or permission mode, untouched and says fx ignores it.
24
+ - `pushary clean` removes the question rule only when setup recorded adding it and it is still `deny`, so a rule of your own survives.
25
+ - `pushary clean` now removes Pushary entries from every event in `~/.cursor/hooks.json`, not only the events the permission gate uses. The Mac app registers its bridge on session, compaction and stop events too, and those eight entries were left behind under "Clean complete". Other tools' hooks are untouched.
26
+ - `pushary clean` now removes the Pushary block from OpenCode's `~/.config/opencode/AGENTS.md`, as it already did for Codex and Gemini. Setup wrote it and clean left it.
27
+ - `pushary clean` removes temp files that an interrupted config write left next to an agent's config (`.<file>.pushary-<id>` and `.<pid>-<time>.pushary-tmp`), only next to the agent configs clean rewrites (your home folder, Claude Code, Codex, Gemini, Cursor, OpenCode, fx and VS Code settings), never through a symlink, and only once they are over a minute old.
28
+ - Setup's summary no longer says "(others completed successfully)" or "Other agents will continue" when the failed agent was the only one; it names the agents that were configured.
29
+ - Setup's progress lines no longer leave the tail of the previous frame behind ("with Codexex", "tap the notificationon"): setup uses the shared spinner, which clears the line, keeps each frame to one terminal row, and does not animate into a log when colour is forced on.
30
+
3
31
  ## 1.7.0
4
32
 
5
33
  - **fx.** `npx @pushary/agent-hooks@latest setup --agents fx`, or ticking fx in the picker, connects Vercel Labs' fx coding agent. Setup adds a `pushary` server to `~/.fx/mcp.json` that runs the new `pushary-mcp` command, a local bridge that signs in with the key setup saved in `~/.pushary`. No key is written to fx's files, and a rotated key is used without running setup again. fx has no hooks other tools can register, so Pushary cannot answer fx's own approval prompts; fx's agent asks through Pushary's tools when it chooses to, guided by a managed block setup writes to `~/.fx/AGENTS.md`.
@@ -1,38 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-6ADZQFVW.js";
4
+ } from "../chunk-ZUKZJQGR.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-UC65FJJT.js";
8
- import "../chunk-EAQMWJPG.js";
7
+ } from "../chunk-3RO2UWJQ.js";
8
+ import "../chunk-ZMWX5SDA.js";
9
9
  import "../chunk-SGZJ5LYH.js";
10
- import "../chunk-R2XCLT6I.js";
11
- import "../chunk-CVALVGA7.js";
12
- import "../chunk-5HLTWFJ6.js";
13
- import "../chunk-PQ4F64M2.js";
14
- import "../chunk-73T6MSU5.js";
15
- import "../chunk-ZQ7IDOKY.js";
16
- import "../chunk-VKVIAZQO.js";
17
- import "../chunk-BH2SKSSK.js";
18
- import "../chunk-KXMZMZD3.js";
19
- import "../chunk-B76WVEDX.js";
10
+ import "../chunk-E3PLF7YB.js";
11
+ import "../chunk-I7B2DNVU.js";
12
+ import "../chunk-JMSB6CJT.js";
13
+ import "../chunk-L6IF4JOF.js";
14
+ import "../chunk-4S7CCOXB.js";
15
+ import "../chunk-A6WQF7FQ.js";
16
+ import "../chunk-KLXYMPTM.js";
17
+ import "../chunk-R7ZETVNR.js";
18
+ import "../chunk-QSZ37ROP.js";
19
+ import "../chunk-Q7CDBJXU.js";
20
20
  import "../chunk-XHKBHWLX.js";
21
- import "../chunk-DZURML2D.js";
22
- import "../chunk-V6QRSU2G.js";
21
+ import "../chunk-RLRDPZG4.js";
22
+ import "../chunk-6QZK4O36.js";
23
23
  import "../chunk-POFBE6ZY.js";
24
24
  import "../chunk-GMXKITVA.js";
25
- import "../chunk-UOAQ6QMP.js";
26
- import "../chunk-KW2RRR7D.js";
27
- import "../chunk-XNCMT7YY.js";
25
+ import "../chunk-VSGKQ3HI.js";
26
+ import "../chunk-UFNBKYWT.js";
27
+ import "../chunk-HOIGXMI7.js";
28
28
  import "../chunk-7QLSKOSU.js";
29
29
  import "../chunk-KZERVKTD.js";
30
- import "../chunk-ROQK7IN3.js";
31
- import "../chunk-DNJUSFBL.js";
30
+ import "../chunk-LI3C2IQY.js";
31
+ import "../chunk-NYBZJ44G.js";
32
32
  import "../chunk-T7E75EKA.js";
33
- import "../chunk-V4AQBAVG.js";
34
- import "../chunk-B3UXMSMW.js";
35
- import "../chunk-YROGUPOZ.js";
33
+ import "../chunk-SJN64NJX.js";
34
+ import "../chunk-65RN6ZCO.js";
35
+ import "../chunk-WWTLAZQA.js";
36
36
 
37
37
  // bin/pushary-bell-hook.ts
38
38
  var main = async () => {
@@ -5,37 +5,37 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-6ADZQFVW.js";
8
+ } from "../chunk-ZUKZJQGR.js";
9
9
  import {
10
10
  addBellHooks,
11
11
  bellInstalled,
12
12
  removeBellHooks
13
- } from "../chunk-VKVIAZQO.js";
13
+ } from "../chunk-KLXYMPTM.js";
14
14
  import {
15
15
  createIo
16
- } from "../chunk-5RUIFDTP.js";
16
+ } from "../chunk-U4TMAANR.js";
17
17
  import {
18
18
  exitOnHelpFlag
19
- } from "../chunk-2PS6QWDW.js";
19
+ } from "../chunk-6NHXKTQU.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
23
- import "../chunk-UOAQ6QMP.js";
23
+ import "../chunk-VSGKQ3HI.js";
24
24
  import "../chunk-7QLSKOSU.js";
25
25
  import {
26
26
  EXIT
27
27
  } from "../chunk-KZERVKTD.js";
28
- import "../chunk-ROQK7IN3.js";
28
+ import "../chunk-LI3C2IQY.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-DNJUSFBL.js";
31
+ } from "../chunk-NYBZJ44G.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
35
35
  } from "../chunk-T7E75EKA.js";
36
- import "../chunk-V4AQBAVG.js";
37
- import "../chunk-B3UXMSMW.js";
38
- import "../chunk-YROGUPOZ.js";
36
+ import "../chunk-SJN64NJX.js";
37
+ import "../chunk-65RN6ZCO.js";
38
+ import "../chunk-WWTLAZQA.js";
39
39
 
40
40
  // bin/pushary-bell.ts
41
41
  exitOnHelpFlag("bell");
@@ -8,58 +8,62 @@ import {
8
8
  describeIdleWindow,
9
9
  startProcessOwnership,
10
10
  withSpawnProcessOwnership
11
- } from "../chunk-LEZFOTMI.js";
11
+ } from "../chunk-PWNQGITG.js";
12
12
  import {
13
+ announceSubscriptionRequired,
13
14
  isDeferAnswer
14
- } from "../chunk-YHG74UFF.js";
15
+ } from "../chunk-5OP5MQI7.js";
15
16
  import {
16
17
  claudeTranscriptPath,
17
18
  loadSessionKey,
18
19
  registerTranscript,
19
20
  registeredTranscriptEnabled
20
- } from "../chunk-EAQMWJPG.js";
21
+ } from "../chunk-ZMWX5SDA.js";
21
22
  import "../chunk-SGZJ5LYH.js";
22
- import "../chunk-R2XCLT6I.js";
23
- import "../chunk-CVALVGA7.js";
24
- import "../chunk-5HLTWFJ6.js";
25
- import "../chunk-PQ4F64M2.js";
23
+ import "../chunk-E3PLF7YB.js";
24
+ import "../chunk-I7B2DNVU.js";
25
+ import "../chunk-JMSB6CJT.js";
26
+ import "../chunk-L6IF4JOF.js";
26
27
  import {
27
28
  ensureDaemonRunning
28
- } from "../chunk-73T6MSU5.js";
29
- import "../chunk-ZQ7IDOKY.js";
30
- import "../chunk-VKVIAZQO.js";
29
+ } from "../chunk-4S7CCOXB.js";
30
+ import "../chunk-A6WQF7FQ.js";
31
+ import "../chunk-KLXYMPTM.js";
31
32
  import {
32
33
  encryptRecord
33
- } from "../chunk-BH2SKSSK.js";
34
- import "../chunk-KXMZMZD3.js";
34
+ } from "../chunk-R7ZETVNR.js";
35
+ import "../chunk-QSZ37ROP.js";
35
36
  import {
36
37
  transcriptsEnabled
37
- } from "../chunk-B76WVEDX.js";
38
+ } from "../chunk-Q7CDBJXU.js";
38
39
  import {
39
40
  needsShell,
40
41
  spawnClaude
41
42
  } from "../chunk-XHKBHWLX.js";
42
43
  import {
43
- DEFAULT_SESSION,
44
44
  UNNAMED_ACTION,
45
45
  deriveToolTarget,
46
46
  describeToolCall,
47
47
  fetchModeState,
48
48
  getPolicy,
49
+ phoneDrivenEnv,
50
+ repoKeyFor,
51
+ reportEvent,
52
+ scopePathFor
53
+ } from "../chunk-2B4XCMH6.js";
54
+ import {
55
+ DEFAULT_SESSION,
49
56
  markPendingCommandDelivered,
50
57
  markPendingCommandFailed,
51
- phoneDrivenEnv,
52
58
  readPendingCommand,
53
59
  readPendingCommandById,
54
60
  removePendingCommand,
55
- repoKeyFor,
56
- reportEvent,
57
- savePendingCommand,
58
- scopePathFor
59
- } from "../chunk-IJ6ECPA6.js";
60
- import "../chunk-DZURML2D.js";
61
+ savePendingCommand
62
+ } from "../chunk-N6IOSZOE.js";
63
+ import "../chunk-RLRDPZG4.js";
61
64
  import {
62
65
  DECISION_STOP_REASON,
66
+ UNVERIFIABLE_APPROVAL_REASON,
63
67
  askUser,
64
68
  cancelQuestion,
65
69
  isDecisionStopped,
@@ -67,33 +71,36 @@ import {
67
71
  nextLongPollMs,
68
72
  waitForAnswer,
69
73
  withdrawQuestion
70
- } from "../chunk-EGKXSQCY.js";
71
- import "../chunk-V6QRSU2G.js";
74
+ } from "../chunk-2XOHXZRC.js";
75
+ import "../chunk-6QZK4O36.js";
72
76
  import "../chunk-POFBE6ZY.js";
73
77
  import "../chunk-GMXKITVA.js";
74
- import "../chunk-UOAQ6QMP.js";
75
- import "../chunk-JNXVOU6Y.js";
76
- import "../chunk-KW2RRR7D.js";
78
+ import "../chunk-VSGKQ3HI.js";
79
+ import {
80
+ SubscriptionRequiredError
81
+ } from "../chunk-D4OGEWLH.js";
82
+ import "../chunk-VQDJ6KB3.js";
83
+ import "../chunk-UFNBKYWT.js";
77
84
  import {
78
85
  getMachineId
79
- } from "../chunk-XNCMT7YY.js";
86
+ } from "../chunk-HOIGXMI7.js";
80
87
  import "../chunk-7QLSKOSU.js";
81
88
  import "../chunk-KZERVKTD.js";
82
- import "../chunk-ROQK7IN3.js";
83
- import "../chunk-DNJUSFBL.js";
89
+ import "../chunk-LI3C2IQY.js";
90
+ import "../chunk-NYBZJ44G.js";
84
91
  import "../chunk-T7E75EKA.js";
85
92
  import {
86
93
  getApiKey,
87
94
  getBaseUrl
88
- } from "../chunk-V4AQBAVG.js";
95
+ } from "../chunk-SJN64NJX.js";
89
96
  import {
90
97
  NPX_LATEST_COMMAND
91
- } from "../chunk-B3UXMSMW.js";
98
+ } from "../chunk-65RN6ZCO.js";
92
99
  import {
93
100
  KILL_REASON,
94
101
  redactSecrets,
95
102
  resolveGate
96
- } from "../chunk-YROGUPOZ.js";
103
+ } from "../chunk-WWTLAZQA.js";
97
104
 
98
105
  // src/wrapper/localPassthrough.ts
99
106
  var SIGNAL_NUMBERS = {
@@ -425,6 +432,8 @@ var BoundedInputQueue = class {
425
432
 
426
433
  // src/wrapper/approver.ts
427
434
  var DEFAULT_MAX_CONCURRENT = 16;
435
+ var NO_LOCAL_APPROVAL_UI = "This remote session has no local approval UI. Continue in an interactive session or choose a mode that permits remote approval.";
436
+ var SUBSCRIPTION_REQUIRED_NO_LOCAL_APPROVAL_UI = "Your Pushary workspace has no active subscription, so approvals cannot reach your phone, and this remote session has no local approval UI. Continue in an interactive session.";
428
437
  var DEFAULT_APPROVAL_WINDOW_MS = 5 * 6e4;
429
438
  var MAX_APPROVAL_WINDOW_MS = 30 * 6e4;
430
439
  var allow = (input) => ({
@@ -528,8 +537,10 @@ var createRemoteApprover = (deps) => {
528
537
  toolTarget,
529
538
  repoKey: repoKeyFor(deps.cwd)
530
539
  });
531
- } catch {
532
- return deny("Pushary could not create a verifiable approval. Retry the action.");
540
+ } catch (error) {
541
+ if (!(error instanceof SubscriptionRequiredError)) return deny(UNVERIFIABLE_APPROVAL_REASON);
542
+ announceSubscriptionRequired(error.upgradeUrl, sessionId);
543
+ return deny(SUBSCRIPTION_REQUIRED_NO_LOCAL_APPROVAL_UI);
533
544
  }
534
545
  if (isDecisionStopped(question)) return deny(DECISION_STOP_REASON);
535
546
  entry.correlationId = question.correlationId;
@@ -546,7 +557,7 @@ var createRemoteApprover = (deps) => {
546
557
  if (isDeferAnswer(answer.value)) return deny("Deferred \u2014 handle it on the machine");
547
558
  return answer.value === "yes" ? allow(input) : deny("Denied from your phone");
548
559
  }
549
- if (localHandoff) return deny("This remote session has no local approval UI. Continue in an interactive session or choose a mode that permits remote approval.");
560
+ if (localHandoff) return deny(NO_LOCAL_APPROVAL_UI);
550
561
  return applyTimeout(policy, input);
551
562
  } catch {
552
563
  return deny("Approval unavailable; denied by default");