pushary 1.9.186 → 1.9.192

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 (154) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/data/cursor-plugin/.cursor-plugin/plugin.json +1 -1
  3. package/data/cursor-plugin/CHANGELOG.md +4 -0
  4. package/data/cursor-plugin/scripts/pushary-gate.mjs +34 -6
  5. package/data/openclaw-plugin/README.md +2 -2
  6. package/data/openclaw-plugin/dist/protected-writes.js +3 -2
  7. package/data/openclaw-plugin/package.json +1 -1
  8. package/data/vscode-plugin/.claude-plugin/plugin.json +1 -1
  9. package/data/vscode-plugin/CHANGELOG.md +4 -0
  10. package/data/vscode-plugin/scripts/pushary-gate.mjs +34 -6
  11. package/dist/{api-JW7AA573.js → api-XPS2NPJH.js} +13 -11
  12. package/dist/bin/pushary-audit.js +3 -3
  13. package/dist/bin/pushary-bell-hook.js +28 -28
  14. package/dist/bin/pushary-bell.js +12 -12
  15. package/dist/bin/pushary-calls.js +15 -15
  16. package/dist/bin/pushary-claude.js +27 -27
  17. package/dist/bin/pushary-clean.js +39 -39
  18. package/dist/bin/pushary-codex-bridge.js +23 -23
  19. package/dist/bin/pushary-codex-hook.js +91 -64
  20. package/dist/bin/pushary-codex-session.js +8 -8
  21. package/dist/bin/pushary-codex.js +16 -16
  22. package/dist/bin/pushary-connect.js +35 -35
  23. package/dist/bin/pushary-cowork.js +5 -5
  24. package/dist/bin/pushary-daemon.js +46 -46
  25. package/dist/bin/pushary-disconnect.js +30 -30
  26. package/dist/bin/pushary-display-hook.js +8 -0
  27. package/dist/bin/pushary-doctor.js +75 -53
  28. package/dist/bin/pushary-elicitation-hook.js +28 -28
  29. package/dist/bin/pushary-gemini-bridge.js +18 -18
  30. package/dist/bin/pushary-gemini-hook.js +32 -32
  31. package/dist/bin/pushary-hook.js +36 -36
  32. package/dist/bin/pushary-login.js +22 -22
  33. package/dist/bin/pushary-logout.js +30 -30
  34. package/dist/bin/pushary-mcp.js +12 -12
  35. package/dist/bin/pushary-mode.js +16 -16
  36. package/dist/bin/pushary-notification-hook.js +27 -27
  37. package/dist/bin/pushary-opencode-bridge.js +61 -24
  38. package/dist/bin/pushary-opencode-hook.js +45 -40
  39. package/dist/bin/pushary-permission-denied-hook.js +36 -36
  40. package/dist/bin/pushary-permission-hook.js +36 -36
  41. package/dist/bin/pushary-post-hook.js +28 -28
  42. package/dist/bin/pushary-prompt-hook.js +27 -27
  43. package/dist/bin/pushary-session-end-hook.js +27 -27
  44. package/dist/bin/pushary-session-start-hook.js +39 -39
  45. package/dist/bin/pushary-sessions.js +14 -14
  46. package/dist/bin/pushary-setup.js +55 -55
  47. package/dist/bin/pushary-stats.js +5 -5
  48. package/dist/bin/pushary-status.js +36 -36
  49. package/dist/bin/pushary-stop-hook.js +27 -27
  50. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  51. package/dist/bin/pushary-suggestions.js +16 -16
  52. package/dist/bin/pushary-transcript-register.js +17 -17
  53. package/dist/bin/pushary-transcripts.js +25 -25
  54. package/dist/bin/pushary-upgrade.js +44 -44
  55. package/dist/bin/pushary-wait.js +16 -16
  56. package/dist/bin/pushary.js +7 -7
  57. package/dist/{chunk-P5EVSOB6.js → chunk-23WKGMTI.js} +4 -2
  58. package/dist/{chunk-6TVDGTWR.js → chunk-2HOKEC2I.js} +2 -2
  59. package/dist/{chunk-FVQASC2C.js → chunk-3APYAOZF.js} +3 -3
  60. package/dist/{chunk-EMGKV2QC.js → chunk-3ULFLONL.js} +1 -1
  61. package/dist/{chunk-G6V3D64U.js → chunk-4FVKGWWZ.js} +2 -2
  62. package/dist/{chunk-W522XWAT.js → chunk-4TIZJD3Q.js} +5 -5
  63. package/dist/{chunk-KKUUJQ7D.js → chunk-5IPXL33D.js} +1 -1
  64. package/dist/{chunk-DGG75PIW.js → chunk-5QP7DVQF.js} +1 -1
  65. package/dist/{chunk-R3ECFKO3.js → chunk-5WC6N3HA.js} +5 -5
  66. package/dist/{chunk-IPVW4IUW.js → chunk-5WT6DLL2.js} +5 -5
  67. package/dist/{chunk-26LAHVWI.js → chunk-6C7DT36Z.js} +18 -18
  68. package/dist/{chunk-CEWERXV4.js → chunk-6CJSVFAD.js} +2 -2
  69. package/dist/{chunk-K4WBFMAT.js → chunk-6EZY7IXB.js} +1 -1
  70. package/dist/{chunk-LRLAIP75.js → chunk-6TNKY3DC.js} +2 -2
  71. package/dist/{chunk-SQA3ZPM4.js → chunk-7K5AYNDY.js} +5 -5
  72. package/dist/chunk-7QUPTDT2.js +92 -0
  73. package/dist/{chunk-JKF5I32P.js → chunk-A4QFVUEY.js} +2 -2
  74. package/dist/{chunk-SRCQFOVZ.js → chunk-AD7R7TNQ.js} +4 -4
  75. package/dist/{chunk-OY5W64TR.js → chunk-AQLIBG2P.js} +1 -1
  76. package/dist/{chunk-4WJDKZEJ.js → chunk-C2B4LPJU.js} +2 -2
  77. package/dist/{chunk-CBE5G6UP.js → chunk-CDEJHIYQ.js} +4 -4
  78. package/dist/{chunk-DUZ6V74X.js → chunk-CDXD6W4N.js} +1 -1
  79. package/dist/{chunk-STWKEQRM.js → chunk-DAHGMBRE.js} +3 -3
  80. package/dist/{chunk-CL7QR6FW.js → chunk-DHD54IIT.js} +7 -7
  81. package/dist/{chunk-RS7CW5W7.js → chunk-DP6YHOKF.js} +2 -2
  82. package/dist/{chunk-EQGQPDCH.js → chunk-DQI4647T.js} +4 -4
  83. package/dist/{chunk-NZTPGQT7.js → chunk-E65O7RMA.js} +4 -4
  84. package/dist/{chunk-I7GUIT7E.js → chunk-EBIPQ3ZE.js} +20 -4
  85. package/dist/{chunk-GP377Y34.js → chunk-EJ56NJQ4.js} +7 -7
  86. package/dist/{chunk-NITOSXEV.js → chunk-EJJBM4OB.js} +1 -1
  87. package/dist/{chunk-6PBNSFQG.js → chunk-EPNYDS4H.js} +1 -1
  88. package/dist/{chunk-ZIEZJXQY.js → chunk-ETT24EIH.js} +3 -3
  89. package/dist/{chunk-H6NPQ336.js → chunk-F326QJEJ.js} +8 -8
  90. package/dist/{chunk-S67UAFW2.js → chunk-FY7WHRDJ.js} +3 -3
  91. package/dist/{chunk-6WLQ7WOD.js → chunk-FZWUUGC2.js} +4 -4
  92. package/dist/{chunk-GL4EIL5Q.js → chunk-GAAPUS5J.js} +1 -1
  93. package/dist/{chunk-YXKQXKGV.js → chunk-GGKGVCUN.js} +6 -5
  94. package/dist/{chunk-DDNFI2GA.js → chunk-GR46QR45.js} +6 -6
  95. package/dist/{chunk-5SN2IITE.js → chunk-GUBY4KIU.js} +8 -6
  96. package/dist/{chunk-H4ZHVSKE.js → chunk-GUZLBFER.js} +5 -5
  97. package/dist/{chunk-ZXAWHBFW.js → chunk-H6CBRJKT.js} +7 -6
  98. package/dist/{chunk-X55NVFKJ.js → chunk-HMMVGDL3.js} +11 -4
  99. package/dist/{chunk-LWWUA5DF.js → chunk-ITPAUHJ4.js} +1 -1
  100. package/dist/{chunk-ECBECMRW.js → chunk-IYOA3NWO.js} +1 -1
  101. package/dist/{chunk-7Z2N3SVV.js → chunk-JJBM5FYH.js} +2 -2
  102. package/dist/{chunk-MSUOS64O.js → chunk-JXZQ4XFL.js} +2 -2
  103. package/dist/{chunk-2DNN7O7B.js → chunk-KERLAXHG.js} +3 -3
  104. package/dist/{chunk-G2IFBGTY.js → chunk-LWUDOZHE.js} +4 -4
  105. package/dist/{chunk-RNN2XAF7.js → chunk-NCN7ANYA.js} +6 -6
  106. package/dist/{chunk-O67OY3RA.js → chunk-NFK2QF74.js} +5 -5
  107. package/dist/{chunk-ZK4E2VID.js → chunk-O7ZCWGYA.js} +2 -2
  108. package/dist/{chunk-A4CQJZ3K.js → chunk-OTJEIINV.js} +10 -8
  109. package/dist/{chunk-GXR3JSXP.js → chunk-OYZUPSD7.js} +6 -6
  110. package/dist/{chunk-AWYR3KPA.js → chunk-P4JYK7WB.js} +3 -3
  111. package/dist/{chunk-EEFNFZNQ.js → chunk-P6NACIBR.js} +4 -4
  112. package/dist/{chunk-V25PSICC.js → chunk-PUVD22DY.js} +12 -12
  113. package/dist/{chunk-HFDBV3ZJ.js → chunk-R2NYUOTC.js} +9 -9
  114. package/dist/{chunk-5FDIOHNH.js → chunk-RNPEOAPC.js} +2 -2
  115. package/dist/{chunk-NGDDNKOV.js → chunk-SHAHZQTQ.js} +4 -4
  116. package/dist/{chunk-KTKM7HS5.js → chunk-T4GV5MOC.js} +3 -3
  117. package/dist/{chunk-BLLDCO5A.js → chunk-TP47JHGJ.js} +1 -1
  118. package/dist/{chunk-4CPKJI4N.js → chunk-UF6RZBTL.js} +3 -3
  119. package/dist/{chunk-N5YRPYPC.js → chunk-URVW3D2J.js} +11 -11
  120. package/dist/{chunk-NDHS2ULF.js → chunk-UV5ROHY2.js} +1 -1
  121. package/dist/{chunk-W2WM5IXQ.js → chunk-UVNH4UGJ.js} +1 -1
  122. package/dist/{chunk-OBTUMS5L.js → chunk-UXQVXB7Q.js} +1 -1
  123. package/dist/{chunk-STJYAFMW.js → chunk-VDJMYP54.js} +3 -3
  124. package/dist/{chunk-TXVRUVBB.js → chunk-VEE2MRUN.js} +1 -1
  125. package/dist/{chunk-7OQZ5GL7.js → chunk-VH5DPURH.js} +1 -1
  126. package/dist/{chunk-XL2PSZIU.js → chunk-VNCN3Z4T.js} +2 -2
  127. package/dist/{chunk-7KLNBFFD.js → chunk-WB5DD232.js} +3 -3
  128. package/dist/{chunk-63HIRFYV.js → chunk-WNCTMTMG.js} +1 -1
  129. package/dist/{chunk-OLED2XSM.js → chunk-X4ENTDFT.js} +2 -2
  130. package/dist/{chunk-Q4FXPTPH.js → chunk-X7FIYMHC.js} +2 -2
  131. package/dist/{chunk-EBSFVPHH.js → chunk-XMNETXQ4.js} +6 -6
  132. package/dist/{chunk-NK3V3E6P.js → chunk-XONHTLMX.js} +10 -10
  133. package/dist/{chunk-5JRRWACR.js → chunk-XSJON4TV.js} +1 -1
  134. package/dist/{chunk-3MKRWTLZ.js → chunk-Y2H5TF7T.js} +1 -1
  135. package/dist/{chunk-WMXQFOTJ.js → chunk-YLZRG4U5.js} +1 -1
  136. package/dist/{chunk-ERI4ISGN.js → chunk-YMULPOSH.js} +5 -5
  137. package/dist/{chunk-PZBVUHRD.js → chunk-ZCR5VTOC.js} +5 -5
  138. package/dist/{codex-app-cards-switch-J4QYBE4B.js → codex-app-cards-switch-UEN23QFT.js} +11 -11
  139. package/dist/{codex-card-routing-TLQSULL6.js → codex-card-routing-CJZT26VA.js} +2 -2
  140. package/dist/{codex-desktop-launch-QS7RJIWL.js → codex-desktop-launch-DKOOCOTD.js} +1 -1
  141. package/dist/{codex-session-launch-IOALOU37.js → codex-session-launch-UHNV5Z3D.js} +20 -20
  142. package/dist/{config-WHD32JOQ.js → config-EVDZ6OAI.js} +3 -3
  143. package/dist/{global-upgrade-SILVY22G.js → global-upgrade-KZQWNABB.js} +9 -9
  144. package/dist/{identity-ZFMKTDMM.js → identity-A2BK7P2A.js} +4 -4
  145. package/dist/{live-capabilities-A5NUXYA3.js → live-capabilities-43YRGYAR.js} +4 -4
  146. package/dist/{paths-2Q5EPYCM.js → paths-67D2435E.js} +3 -3
  147. package/dist/reapply-APVASEGC.js +70 -0
  148. package/dist/src/index.d.ts +2 -1
  149. package/dist/src/index.js +35 -35
  150. package/dist/{upgrade-lock-YNBGIRDF.js → upgrade-lock-TG4UOPN7.js} +4 -4
  151. package/dist/{usage-K74RCKF7.js → usage-FVDJIMCB.js} +3 -3
  152. package/package.json +1 -1
  153. package/dist/chunk-ZVGPDR37.js +0 -62
  154. package/dist/reapply-TXX2GU6T.js +0 -70
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.192
4
+
5
+ - A single-choice question with five or six options keeps its write-in on your phone. These questions do not fit the question card, so they go out as a plain list of options, and the list used to drop the Other box. On OpenCode every question takes a typed answer by default, so each of these questions lost it. Now the list asks your phone for an Other box whenever the question takes a typed answer, and your typed answer reaches the agent as your answer. A question that takes only its options still shows only its options. The Other box appears in the next Pushary phone app release and on the pushary.com decision page; until your phone app has it, the list looks as before.
6
+
7
+ ## 1.9.191
8
+
9
+ - `pushary doctor`: on a machine whose npm holds back new releases (`min-release-age` or `before` in your npm config), the "Global package up to date" check now passes when npm allows nothing newer than the release you have, and names the release that is waiting. Before, it failed and told you to run `pushary upgrade`, which then said there was nothing newer to install. When npm allows a newer release than yours, the check still fails, offers that release and names any newer one that is waiting. Doctor asks npm with the same `npm pack --global --dry-run` that `pushary upgrade` uses, only when a newer release is published, and gives npm at most 10 seconds in all. If npm takes longer, the check reports the published release as before.
10
+ - OpenCode 2: a question whose form has a field without a key reaches Pushary again. Your rules apply to it, so the kill switch or a standing deny dismisses it, and your phone is told to answer it in OpenCode. Since 1.9.180 such a question stayed in OpenCode with no rule and no notice.
11
+ - OpenCode, sessions started from your phone: when no OpenCode service was running and Pushary started one, your phone is told once, as soon as the service is up, even if the session then fails to start or you stop it. The notice says the service may not see API keys you export in your shell profile, that the OpenCode app and terminal will use it too, and that `opencode service restart` in a terminal starts it again with your shell's settings. A session that finds OpenCode already running sends nothing new.
12
+ - OpenCode question notices no longer repeat themselves. A question you need to answer in OpenCode reads "OpenCode is asking" with the question below it, and several read "3 questions. The first: ...". In updates-only mode the notice is titled "OpenCode has a question", or "OpenCode has 3 questions" for several, where it said "Agent has a question". A phone answer OpenCode did not take, for several questions, now reads "3 questions. The first: ... OpenCode did not take your answers from your phone."
13
+
14
+ ## 1.9.190
15
+
16
+ - Codex: when a rule lets a call run while it waits for your phone, for example "Allow Bash for this session" tapped on another card from the same burst, the Decisions page now lists that call as approved "By policy". Before, it listed only the withdrawn question as cancelled, with nothing saying the call then ran. The same entry appears when a rule covers a call that was still waiting for a free place. It names the tool and its target, not which rule. If the entry cannot be sent, the call still runs.
17
+
18
+ ## 1.9.189
19
+
20
+ - Cursor and VS Code gates (Cursor plugin 0.2.13, VS Code plugin 0.2.8, installed by `pushary setup`): when Pushary already has as many open questions in the session as it allows, the gate asks once instead of three times and does what the CLI hooks do. A shell command or MCP call in Cursor goes to Cursor's own prompt and the agent is told why; any call in VS Code goes to VS Code's own confirmation with the reason. A Cursor file edit, which has no prompt of its own, or a call under a rule that refuses when nobody answers, is refused, and the agent is told it did not run. Before, the gates asked three times and refused every call with "Pushary could not create a verifiable approval".
21
+
22
+ ## 1.9.188
23
+
24
+ - This CLI carries the OpenClaw plugin 0.1.8. A `write`, `edit` or `apply_patch` to a path with `#` in it, or a `%` that is not followed by two hex digits, such as `src/C#/Program.cs`, `notes#1.md` or `100%.md`, is now judged by where it lands, like any other path, so ordinary edits in a C# project run without asking. Before, every such path asked, and unanswered, it was blocked. OpenClaw reads `#` and `%` as ordinary characters in every path that is not a `file://` URL, and a URL still asks. Writes into OpenClaw's own files still ask with these characters in the path, such as `hooks/C#/handler.js` or `../C#/../openclaw.json`. A path with a percent escape such as `%2F` still asks, in case a later OpenClaw decodes it, and so does a path with `? * < > |`, a double quote or a control character. The preview sent to your phone now shows the change for these paths too, and a `.env` file is still left out.
25
+
26
+ ## 1.9.187
27
+
28
+ - Codex, Always, with a rule that approves a call nobody answers: a burst of parallel calls larger than the eight questions a session can have open can now run the calls past the eighth, up to about 32 with a 30 second window. Before, those calls waited at most one phone window for a free place, gave up a few seconds before the first eight windows closed, and Codex was told they did not run. Now each one keeps waiting until a place frees, for as long as its own whole window still fits in the hook's time, about 130 seconds with a 30 second window. It then asks your phone, waits its window and runs as your rule says. If you change the rule to refuse or to wait while calls are still waiting for a place, those calls are refused rather than run under the old rule. A call that has already reached your phone keeps the rule it started with. A window above about 80 seconds leaves no room for this, and a rule that refuses or keeps waiting when nobody answers is unchanged.
29
+
3
30
  ## 1.9.186
4
31
 
5
32
  - Setup no longer waits forever at the agent question. When nothing is typed there for 20 seconds, as happens when an agent runs setup in a terminal of its own, setup sets up the agents it detected, the same set pressing Enter would give, says so, and asks nothing more in that run. Each key you press restarts the 20 seconds. Pass `--agents` to choose without being asked.
@@ -67,10 +94,14 @@
67
94
 
68
95
  ## 1.9.173
69
96
 
97
+ Not published to npm. These changes first shipped in 1.9.174.
98
+
70
99
  - A session in a git worktree is named after its repository, not the worktree folder, in the questions, approvals and events the CLI sends, including the `claude` alias. Claude Code's `.claude/worktrees/<name>`, Conductor workspaces and Codex worktrees showed under the worktree's own folder name, such as `bridge-cse_01Frwpkm...`; they now show the repository's name, the same one a session in the main checkout shows, so two worktrees of one repository show the same name. Sessions whose hooks the Mac app runs, and the session list the Mac app reports, still use the folder name. A session in an ordinary checkout or a folder outside git keeps the name it had.
71
100
 
72
101
  ## 1.9.172
73
102
 
103
+ Not published to npm. These changes first shipped in 1.9.174.
104
+
74
105
  - Setup asks which agents to set up when you run it at a terminal, also after you pair the phone app. Detected agents are pre-ticked, so pressing Enter sets up the same agents as before; untick one you do not want Pushary on. Before, a run that paired the phone set up every detected agent without asking and only printed "Selected automatically". A run with nobody at the terminal still selects the detected agents automatically: one whose input or output is not a terminal, such as setup an agent runs with its output sent to a file, and `--yes` or `--json`. `--agents` still names them exactly.
75
106
 
76
107
  ## 1.9.171
@@ -142,6 +173,8 @@
142
173
 
143
174
  ## 1.9.160
144
175
 
176
+ Not published to npm. These changes first shipped in 1.9.161.
177
+
145
178
  - OpenCode: questions ask in OpenCode's own prompt again, and the same question also reaches your phone and the Mac notch. 1.9.156 sent every question through `ask_user`, which took away OpenCode's prompt, could not be interrupted from OpenCode while it waited, and gave the phone only the offered options. Now the plugin watches the form OpenCode's `question` tool raises, and only that form, and asks your phone without holding the prompt. Answer in either place and the first answer wins. The phone question stays open for as long as OpenCode's prompt does, so you can answer after an hour away; after the first ten minutes Pushary checks for your answer every thirty seconds. On the phone a choice shows each option's description and an Other box for a reply of your own when OpenCode takes a typed answer; a multi-select, a free answer and a yes/no work too. A phone answer replies to OpenCode's prompt through OpenCode's own reply route, so the model gets it exactly as if you had answered in the terminal. Pushary asks your phone only when it has checked that route first: on an OpenCode 2 server it cannot reply to, such as a standalone `opencode serve`, the question stays in OpenCode only. If OpenCode refuses the answer anyway, your phone is told to answer it in OpenCode; an answer that lost the race to one given in OpenCode sends nothing. When Pushary cannot confirm that route, it sends one notification, `OpenCode is asking: <question> Answer it in OpenCode.`, so you know to come back, and it follows the kill switch and Terminal mode as a question would. A Pushary outage or a question cancelled on the Pushary side leaves OpenCode's prompt open; only the kill switch or your own stop dismisses it. Answering, dismissing or interrupting in OpenCode, the turn ending or failing, OpenCode unloading the plugin and OpenCode exiting each withdraw the phone question. The kill switch dismisses the question and ends the step; Terminal mode leaves it in OpenCode; Notify-only sends a notification and leaves it in OpenCode; without a key nothing changes. A question call with several questions, a number field and an MCP server's question stay in OpenCode only, so the instructions now ask the model to put one question in each call. The `AGENTS.md` block tells OpenCode to ask with its own `question` tool and to use `ask_user` only when it has no question tool, naming `tools.pushary.ask_user(...)` inside `execute` for OpenCode 2 and `pushary_ask_user` for OpenCode 1. OpenCode 1 questions are answered on its `/question` route. A Mac app connection is unchanged: the Mac app's spec keeps the block that sends every question through `ask_user`, and its plugin leaves OpenCode's form alone, until the Mac app forwards the form.
146
179
  - OpenCode 2: a deny from your phone or your Pushary rules now reaches the agent with its reason. Before, the plugin rejected the permission with no message, which OpenCode treats as a stop: it ended the step and rejected every other pending permission in the session. Now OpenCode hands the reason to the model as feedback and the model carries on with it, as Claude Code does after a deny. A kill from Pushary and an approval that was cancelled or became unavailable still reject with no message, so the step still ends, as Claude Code's turn does. An allow is still one approval. OpenCode 1 replies on its session route, which takes no message, so a deny there is unchanged.
147
180
  - OpenCode 2: a turn that ends on an error is recorded in Activity as a failed turn and sends the same "OpenCode stopped on an error" push Claude Code's `StopFailure` sends, with OpenCode's own error message. The kill switch and Terminal mode keep it off your phone, and it is still recorded. An interrupted turn still sends nothing.
@@ -154,6 +187,8 @@
154
187
 
155
188
  ## 1.9.159
156
189
 
190
+ Not published to npm. These changes first shipped in 1.9.161.
191
+
157
192
  - Setup, `pushary upgrade` and automatic updates no longer leave the install lock stuck when npm holds back new releases (`min-release-age` or `before` in your npm config). Before installing, Pushary asks npm which release it would pick with `npm pack --global --dry-run`, which reads the same npm settings as a global install, runs no scripts and writes nothing. A release npm refuses is reported before the lock is marked, so the next run goes ahead with no file to delete. 1.9.154 had brought the stuck lock back: it kept the lock after any failed install, including a release-age refusal, so the next setup failed with "An earlier installation did not finish safely". A failed install that npm did start still keeps the lock, as in 1.9.154.
158
193
  - Automatic updates install the newest release your npm allows instead of failing every day while the newest release is younger than your `min-release-age`. They never install an older release than the one you have. When nothing newer is allowed yet, the update is recorded as up to date with a note saying which release is waiting.
159
194
  - When setup itself is too new for your npm, it tells you to run the newest release your npm allows, `npm exec --yes --package=pushary@latest -c "pushary setup --agents ..."`, instead of waiting until this exact release is old enough. Setups from 1.9.154 on refuse to replace a newer installed CLI; an older one that npm picks under a long `min-release-age` can still replace it.
@@ -227,6 +262,8 @@
227
262
 
228
263
  ## 1.9.146
229
264
 
265
+ Not published to npm. These changes first shipped in 1.9.147.
266
+
230
267
  - Setup no longer sends you to the browser push page by default. When nothing of yours can receive an approval and setup did not pair a phone in this run, for example because it reused a saved key or you passed `--key`, it shows a QR code and the link for the Pushary app (https://pushary.com/download) and tells you to sign in with the same account and allow notifications. Before, it printed your site's subscribe page first and the app second. The subscribe page now appears only when you ask for it with `--connect web` or `--connect browser`.
231
268
  - `pushary pair` pairs the Pushary app by default. If an app of yours is already connected it sends a test notification; otherwise it shows the pairing QR, the https://pushary.com/pair link and the fingerprint, waits for your phone to approve, as setup does, and then checks that the phone registered for notifications. This computer keeps the key it has: the key the pairing makes is revoked as soon as the phone approves. A phone that approved for another workspace, for another account, or as a teammate on this computer's own site is not tested; the command says which it is and how to fix it. The phone's approval screen names the agents found on this computer. Off a terminal, the first line says the command keeps running until the phone approves, for up to 15 minutes, so an agent should run it in the background. In CI it draws no QR, says which variable made it CI, and only checks what already reaches you, so a browser channel of yours still gets its test notification and exit 0. Browser web push now needs `--browser`; before, bare `pushary pair` opened your site's subscribe page. `--app` still works and means the same as no flag. When the phone approved but has not allowed notifications, it says to allow them and run `pushary doctor --roundtrip`, not to pair again, and each fix is printed once.
232
269
  - `pushary status`, `pushary doctor` and setup's delivery check give the same advice when no phone of yours is connected: get the app at https://pushary.com/download and sign in with the same account. They used to say `pushary pair`, which opened the browser page. The hints that sent a computer with a key to `setup --connect app`, which makes a new key and switches the computer to it, now name `pushary pair`, which keeps the key: setup's closing lines, `pushary pair` itself, and the Pushary skill (0.13.4).
@@ -407,6 +444,8 @@ Also shipped in 1.9.140 and not listed when it was published:
407
444
 
408
445
  ## 1.9.115
409
446
 
447
+ Not published to npm. These changes first shipped in 1.9.116.
448
+
410
449
  - In Claude Code's auto mode, an MCP tool call that a Team approval route sends to someone else now waits for that person. Before, MCP tools never reached the PreToolUse hook, so auto mode decided first and the approver was asked only if auto mode stopped to ask. If the approver says yes the call runs, and if they say no it does not. If nobody answers in time, the call does not run by itself: it goes back to the agent's own prompt, or is refused, as it does for a shell command in the same case. The hook decides only for a route that names the tool and that someone other than the person running the agent can answer. A route for every tool (`*`) does not hold an MCP call, so auto mode still decides first there. In every other case, and in every other permission mode, it gives no opinion and makes no network call: it checks the policy already cached on this computer and stops there. Measured on a busy Mac, the whole hook run adds about 130 ms to an MCP call. So an MCP call in default mode keeps its one ask from the PermissionRequest hook, never two.
411
450
  - A route holds an MCP call only once the policy saved on this computer includes it. The hook's other calls, such as a shell command or file edit, save the policy as they run. An MCP call that comes first, with no policy saved in the last 12 hours, or before a new route has been saved, is decided by auto mode as before.
412
451
  - `pushary setup` and `pushary upgrade`, including the automatic update, add one PreToolUse entry with the matcher `mcp__.*` for the same hook. Your other hooks and settings are not rewritten. A settings file without this entry keeps today's behaviour: the PermissionRequest hook still asks.
@@ -500,6 +539,8 @@ Also shipped in 1.9.140 and not listed when it was published:
500
539
 
501
540
  ## 1.9.98
502
541
 
542
+ Not published to npm. These changes first shipped in 1.9.99.
543
+
503
544
  - After `pushary login --force` moves this computer to another workspace and updates the `PUSHARY_API_KEY` line in your zsh or bash profile, `setup` in the same terminal now keeps the new workspace instead of saving the old key back over it. Login and setup say which workspace each key belongs to.
504
545
  - When Pushary cannot be sure your terminals read the profile it updated (a `PUSHARY_API_KEY` line it did not write, a profile it cannot replace, a shell other than zsh or bash, or Windows), login and setup no longer say new terminals use the new key. They tell you to change `PUSHARY_API_KEY` where it is set if new terminals still get the old one, and setup keeps following the key your terminal has, so your agents and their approvals stay in one workspace. A key set by a tool such as direnv is not detected.
505
546
  - The browser sign-in page lists your workspaces by name, with the plan when there is one, and leaves out sandboxes, workspaces where you only view, and shops. It preselects the Team workspace you chose to connect to, when there is one, and otherwise the workspace open in the dashboard.
@@ -525,6 +566,8 @@ Also shipped in 1.9.140 and not listed when it was published:
525
566
 
526
567
  ## 1.9.95
527
568
 
569
+ Not published to npm. These changes first shipped in 1.9.96.
570
+
528
571
  - The wider checks 1.9.94 added now apply only with permissions off (`claude --dangerously-skip-permissions`, or Codex set to never ask). In every other mode, Always allow for Bash, a Bash grant for one session, commands you allowed in Claude Code's own settings, Codex's own prompts and paused asks judge commands and file edits exactly as 1.9.93 did. So outside permissions off, `gh secret set`, a `gh api` delete, a `curl` upload, a tag push, `eas submit` and an edit to an agent's settings, a git hook or `~/.ssh` are handled as before. With permissions off nothing changes from 1.9.94.
529
572
 
530
573
  ## 1.9.94
@@ -2,7 +2,7 @@
2
2
  "name": "pushary",
3
3
  "displayName": "Pushary — Control Panel for AI Agents",
4
4
  "description": "Push notifications, human-in-the-loop questions, and permission gating for your AI coding agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
5
- "version": "0.2.12",
5
+ "version": "0.2.13",
6
6
  "minClientVersions": {
7
7
  "grokbot": "never",
8
8
  "sand": "never"
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.13
4
+
5
+ - When Pushary already has as many open questions in the session as it allows, the gate asks once instead of three times. A shell command or MCP call then goes to Cursor's own prompt, and the agent is told why ("Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here."). A file edit, which has no prompt of its own, or a call under a rule that refuses when nobody answers, is refused, and the agent is told it did not run. Before, the gate asked three times and refused every call with "Pushary could not create a verifiable approval".
6
+
3
7
  ## 0.2.12
4
8
 
5
9
  - The bundled Pushary skill is 0.13.4, from 0.13.2. When you ask the agent to call, phone or ring you if it gets stuck, it asks with `ask_user`. Pushary phones only when the reply includes `phoneCall`, and the agent does not promise a call otherwise. It tells you when the call rings in your own time (`ringsAtLocal`), not the UTC `ringsAt`. While the question is pending it keeps waiting with the same `correlationId`, so a spoken answer arrives like any other.
@@ -53,13 +53,14 @@ const respond = (decision) => {
53
53
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
54
54
  const clamp = (n, lo, hi) => Math.min(Math.max(n, lo), hi)
55
55
 
56
- const withRetry = async (fn, attempts) => {
56
+ const withRetry = async (fn, attempts, shouldRetry) => {
57
57
  let lastError
58
58
  for (let i = 0; i < attempts; i += 1) {
59
59
  try {
60
60
  return await fn()
61
61
  } catch (error) {
62
62
  lastError = error
63
+ if (!shouldRetry(error)) break
63
64
  if (i < attempts - 1) await sleep(300 * (i + 1))
64
65
  }
65
66
  }
@@ -235,6 +236,23 @@ const parseMcpBody = (body, contentType) => {
235
236
  return JSON.parse(body)
236
237
  }
237
238
 
239
+ const TOOL_FAILURE_META_KEY = 'pushary/failure'
240
+ const QUESTION_LIMIT_FAILURE = 'question_limit'
241
+ const QUESTION_LIMIT_REASON = 'Pushary already has as many open questions in this session as it allows, so nobody was asked about this and it did not run. Wait until the person answers or cancels one before trying it again.'
242
+ const QUESTION_LIMIT_PROMPT_REASON = 'Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here.'
243
+
244
+ const toolFailureCodeOf = (result) => {
245
+ const code = result?._meta?.[TOOL_FAILURE_META_KEY]
246
+ return typeof code === 'string' ? code : null
247
+ }
248
+
249
+ const toolFailureOf = (name, result) =>
250
+ Object.assign(new Error(result?.content?.[0]?.text || `Pushary ${name} failed`), { failure: toolFailureCodeOf(result) })
251
+
252
+ const isQuestionLimitRefusal = (error) => error?.failure === QUESTION_LIMIT_FAILURE
253
+
254
+ const retriesUnlessTheQuestionLimitRefused = (error) => !isQuestionLimitRefusal(error)
255
+
238
256
  const callTool = async (apiKey, name, args, timeoutMs = NET_TIMEOUT_MS) => {
239
257
  const response = await fetch(MCP_URL, {
240
258
  method: 'POST',
@@ -250,6 +268,7 @@ const callTool = async (apiKey, name, args, timeoutMs = NET_TIMEOUT_MS) => {
250
268
  if (!response.ok) throw new Error(`Pushary MCP ${response.status}`)
251
269
  const rpc = parseMcpBody(text, response.headers.get('content-type'))
252
270
  if (rpc.error) throw new Error(rpc.error.message || 'Pushary MCP error')
271
+ if (rpc.result?.isError === true) throw toolFailureOf(name, rpc.result)
253
272
  const payload = rpc.result?.content?.[0]?.text
254
273
  if (!payload) throw new Error('empty Pushary response')
255
274
  return JSON.parse(payload)
@@ -385,7 +404,7 @@ const canonicalQuestion = (context) => ({
385
404
  // ask_user caps scopePath at SCOPE_PATH_MAX_LENGTH and blocker at
386
405
  // DECISION_LINE_MAX. The server derives a cwd-relative scope path that can be
387
406
  // longer than 200, so an over-length value must be DROPPED rather than sent:
388
- // ask_user rejects the whole call, this gate cannot parse the error, and the
407
+ // ask_user rejects the whole call, the gate refuses it, and the
389
408
  // action fails closed. Dropping costs only the widening on approval.
390
409
  const SCOPE_PATH_MAX = 200
391
410
  const BLOCKER_MAX = 500
@@ -551,13 +570,21 @@ const describeRequest = (input) => {
551
570
  }
552
571
  }
553
572
 
573
+ const refusesWhenUnanswered = ({ mode, timeoutAction }) => mode === 'push_only' && timeoutAction === 'deny'
574
+
575
+ const askUser = (apiKey, args) => withRetry(() => callTool(apiKey, 'ask_user', args), 3, retriesUnlessTheQuestionLimitRefused)
576
+
577
+ const questionLimitOutcome = (refusesUnanswered) =>
578
+ refusesUnanswered || genericToolHook ? deny(QUESTION_LIMIT_REASON) : ask(QUESTION_LIMIT_PROMPT_REASON)
579
+
554
580
  // push_only: wait up to the policy timeout, then apply the timeout action.
555
581
  const handlePushOnly = async (apiKey, request, project, ident, timeoutSeconds, timeoutAction) => {
556
582
  let asked
557
583
  const args = { ...askArgs(request, project, ident), requestId: randomUUID() }
558
584
  try {
559
- asked = await withRetry(() => callTool(apiKey, 'ask_user', args), 3)
560
- } catch {
585
+ asked = await askUser(apiKey, args)
586
+ } catch (error) {
587
+ if (isQuestionLimitRefusal(error)) return questionLimitOutcome(refusesWhenUnanswered({ mode: 'push_only', timeoutAction }))
561
588
  return deny('Pushary could not create a verifiable approval. Retry the action.')
562
589
  }
563
590
  if (stopped(asked)) return deny(STOP_REASON)
@@ -605,8 +632,9 @@ const handlePushFirst = async (apiKey, request, project, ident, pushFirstSeconds
605
632
  let asked
606
633
  const args = { ...askArgs(request, project, ident), requestId: randomUUID() }
607
634
  try {
608
- asked = await withRetry(() => callTool(apiKey, 'ask_user', args), 3)
609
- } catch {
635
+ asked = await askUser(apiKey, args)
636
+ } catch (error) {
637
+ if (isQuestionLimitRefusal(error)) return questionLimitOutcome(refusesWhenUnanswered({ mode: 'push_first' }))
610
638
  return deny('Pushary could not create a verifiable approval. Retry the action.')
611
639
  }
612
640
  if (stopped(asked)) return deny(STOP_REASON)
@@ -57,7 +57,7 @@ Running `pushary setup` later installs the CLI's own copy over a ClawHub or npm
57
57
  - Every `nodes` action except the reads: `status`, `describe`, `pending`, `notify`, `camera_list`, `notifications_list` and the `device_*` reads. `nodes run` runs a command on a paired machine, `approve` pairs a new one, and the camera, screen and location actions take data from it.
58
58
  - Every `sessions_spawn` with `runtime: "acp"`. An ACP session runs Codex, Claude Code or another harness, whose own tool calls never reach this plugin, so starting one asks.
59
59
  - A `sessions_spawn` with a `cwd` outside the agent's workspace or in its `hooks` or `.openclaw` folder, or with a `projectId`, `projectGitUrl` or `worktree`, in camelCase or snake_case. The question names the folder. OpenClaw resolves a relative `cwd` from the gateway's working folder and expands `~`, `~/` or `~\` with `OPENCLAW_HOME` when it is set, so the plugin checks those readings as well as the workspace one.
60
- - Every `write`, `edit` or `apply_patch` into OpenClaw's own files: anything inside an OpenClaw state directory, `~/.config/openclaw` (where Linux keeps `gateway.env`), `~/.pushary`, the `.env` in the gateway's working folder, the config file set by `OPENCLAW_CONFIG_PATH`, and the launchd and systemd files OpenClaw installs for its gateway. The one exception is the agent's own workspace when it lives inside the state directory, which is OpenClaw's default (`~/.openclaw/workspace`). The workspace `hooks` and `.openclaw` folders always ask, wherever the workspace is, because OpenClaw loads code from them: hooks from `hooks`, and plugins from `.openclaw/extensions`, which it finds before the installed ones. The plugin resolves `~`, `@` references and symlinks before it decides, and lands a relative path in the agent's workspace both as OpenClaw names it and where its links lead. A path it cannot resolve asks, including one through a symbolic link whose target does not exist yet, and on macOS one under `/System/Volumes/Data`, `/.vol` or `/.nofollow`, which reach the same files by another name. A file with more than one name, a hard link, asks too, because a write changes it under every name; deleting or moving one asks as well. So does any path that is not plain: one with surrounding whitespace, a URL scheme such as `file://`, a `:` other than in a drive prefix, any of `% ? # < > | * "` or an ASCII control character, because OpenClaw resolves those differently in its default, workspace-only and sandbox setups. On macOS and Windows, a path asks when it, or a folder the plugin compares it with, has a character Node cannot compare the way macOS does, such as one newer than Node's Unicode tables. In a sandbox it does not map an absolute path inside the container, such as `/workspace/hooks/x.js`, to the host folder OpenClaw writes, so such a write does not ask. Writes anywhere else run without asking.
60
+ - Every `write`, `edit` or `apply_patch` into OpenClaw's own files: anything inside an OpenClaw state directory, `~/.config/openclaw` (where Linux keeps `gateway.env`), `~/.pushary`, the `.env` in the gateway's working folder, the config file set by `OPENCLAW_CONFIG_PATH`, and the launchd and systemd files OpenClaw installs for its gateway. The one exception is the agent's own workspace when it lives inside the state directory, which is OpenClaw's default (`~/.openclaw/workspace`). The workspace `hooks` and `.openclaw` folders always ask, wherever the workspace is, because OpenClaw loads code from them: hooks from `hooks`, and plugins from `.openclaw/extensions`, which it finds before the installed ones. The plugin resolves `~`, `@` references and symlinks before it decides, and lands a relative path in the agent's workspace both as OpenClaw names it and where its links lead. A path it cannot resolve asks, including one through a symbolic link whose target does not exist yet, and on macOS one under `/System/Volumes/Data`, `/.vol` or `/.nofollow`, which reach the same files by another name. A file with more than one name, a hard link, asks too, because a write changes it under every name; deleting or moving one asks as well. So does any path that is not plain: one with surrounding whitespace, a URL scheme such as `file://`, a `:` other than in a drive prefix, any of `? < > | * "`, a percent escape such as `%2F`, or an ASCII control character. OpenClaw resolves a URL differently in its default, workspace-only and sandbox setups and strips a trailing `</arg_value>>`, the other characters are not valid in a Windows file name, and a percent escape would change meaning if OpenClaw ever decoded it. A `#`, or a `%` not followed by two hex digits, is an ordinary character to OpenClaw in any path that is not a URL, so a path such as `src/C#/Program.cs` or `100%.md` is judged by where it lands, like any other. On macOS and Windows, a path asks when it, or a folder the plugin compares it with, has a character Node cannot compare the way macOS does, such as one newer than Node's Unicode tables. In a sandbox it does not map an absolute path inside the container, such as `/workspace/hooks/x.js`, to the host folder OpenClaw writes, so such a write does not ask. Writes anywhere else run without asking.
61
61
 
62
62
  To gate more tools, list their OpenClaw tool ids. The list adds to the defaults above; it never replaces them:
63
63
 
@@ -104,7 +104,7 @@ Before anything is sent, the plugin removes what it can recognise as a secret:
104
104
 
105
105
  - Key and token formats it knows: Pushary keys, `sk-` keys (OpenAI, Anthropic), Stripe, GitHub, GitLab, Slack, Google, AWS access key ids, npm, xAI and JWTs, plus private key blocks and long base64-like strings of 40 or more characters.
106
106
  - Passwords in URLs, `Bearer` and `Authorization` values, and the value of anything named like a password, token, secret, API key, access key, client secret or private key. In JSON this holds at any depth, whatever the value.
107
- - For a complete write to a `.env` file (`.env`, `.env.*` or a name ending in `.env`, such as `gateway.env`), Pushary receives the variable names when every line is a comment, blank, or a plain assignment: an uppercase `NAME`, and a value that is unquoted, or quoted on one line with no backslash or inner quote. A file with any other line, such as a value spread over several lines, sends neither names nor values. For an edit or patch, Pushary receives the paths and omits the dotenv change contents because a fragment can start inside a value. A patch that moves a file into or out of a `.env` file omits the contents of every file in it. A path that is not plain, with surrounding whitespace, a URL scheme, a `:` anywhere but in a drive prefix such as `C:\` at the start, or any of `% ? # < > | * "` or an ASCII control character, is treated as a `.env` file, because OpenClaw can resolve it to one. This check decides from the path as written and does not follow symbolic or hard links, so a write through a link to a `.env` file is sent as a write to the link. A file change the plugin cannot read is withheld too: a `write` or `edit` whose `path` is a `.env` file, and, when any parameter name or value mentions `.env`, a `write` or `edit` without a `path` or an `apply_patch` whose patch it cannot read. Pushary then receives the path, the names in patch headers that start a line, or `[dotenv file name not sent]`, plus where the call comes from, as listed above, and no other parameter.
107
+ - For a complete write to a `.env` file (`.env`, `.env.*` or a name ending in `.env`, such as `gateway.env`), Pushary receives the variable names when every line is a comment, blank, or a plain assignment: an uppercase `NAME`, and a value that is unquoted, or quoted on one line with no backslash or inner quote. A file with any other line, such as a value spread over several lines, sends neither names nor values. For an edit or patch, Pushary receives the paths and omits the dotenv change contents because a fragment can start inside a value. A patch that moves a file into or out of a `.env` file omits the contents of every file in it. A path that is not plain, with surrounding whitespace, a URL scheme, a `:` anywhere but in a drive prefix such as `C:\` at the start, or any of `? < > | * "`, a percent escape such as `%2E`, or an ASCII control character, is treated as a `.env` file, because OpenClaw can resolve it to one. This check decides from the path as written and does not follow symbolic or hard links, so a write through a link to a `.env` file is sent as a write to the link. A file change the plugin cannot read is withheld too: a `write` or `edit` whose `path` is a `.env` file, and, when any parameter name or value mentions `.env`, a `write` or `edit` without a `path` or an `apply_patch` whose patch it cannot read. Pushary then receives the path, the names in patch headers that start a line, or `[dotenv file name not sent]`, plus where the call comes from, as listed above, and no other parameter.
108
108
 
109
109
  Redaction works from these patterns. A secret in a command that matches none of them, such as a password with spaces passed to a flag of its own, is sent as written. The plugin leaves the rest of a command as it is so you can see what will run.
110
110
 
@@ -11,7 +11,8 @@ const PATCH_PARAMETER = 'input';
11
11
  const PATCH_TARGET_MARKERS = [...PATCH_FILE_MARKERS, PATCH_MOVE_MARKER];
12
12
  const FILE_URL_PREFIX = 'file://';
13
13
  const HOST_PATH_ARGUMENT_TAILS = /(?:<\/arg_value>>+\s*)+$/;
14
- const NOT_PLAIN_PATH_CHARACTER = /[\u0000-\u001f\u007f%?#<>|*"]/;
14
+ const NOT_PLAIN_PATH_CHARACTER = /[\u0000-\u001f\u007f?<>|*"]/;
15
+ const PERCENT_ESCAPE = /%[0-9A-Fa-f]{2}/;
15
16
  const WINDOWS_DRIVE_PREFIX = /^[A-Za-z]:[\\/]/;
16
17
  const PATH_SCHEME_SEPARATOR = ':';
17
18
  const FILE_REFERENCE_PREFIX = '@';
@@ -184,7 +185,7 @@ export const isPlainPath = (path) => {
184
185
  if (path !== path.trim())
185
186
  return false;
186
187
  const rest = path.replace(WINDOWS_DRIVE_PREFIX, '');
187
- return !NOT_PLAIN_PATH_CHARACTER.test(rest) && !rest.includes(PATH_SCHEME_SEPARATOR);
188
+ return !NOT_PLAIN_PATH_CHARACTER.test(rest) && !PERCENT_ESCAPE.test(rest) && !rest.includes(PATH_SCHEME_SEPARATOR);
188
189
  };
189
190
  const verdictForSpelling = (spelling, paths, system) => {
190
191
  const path = expandedHome(spelling, system.osHome);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushary/openclaw",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Phone approvals for OpenClaw. Pushary asks you before your AI agent runs a gated tool call, and blocks the call unless you approve it.",
5
5
  "author": "Pushary <business@pushary.com>",
6
6
  "homepage": "https://pushary.com/human-in-the-loop-openclaw",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pushary",
3
3
  "description": "Push notifications, human-in-the-loop questions, and permission gating for your AI agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
4
- "version": "0.2.7",
4
+ "version": "0.2.8",
5
5
  "author": {
6
6
  "name": "Pushary",
7
7
  "email": "business@pushary.com",
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.8
4
+
5
+ - When Pushary already has as many open questions in the session as it allows, the gate asks once instead of three times. The call then goes to VS Code's own confirmation with the reason ("Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here."), or, under a rule that refuses when nobody answers, is refused with the reason. Before, the gate asked three times and refused every call with "Pushary could not create a verifiable approval".
6
+
3
7
  ## 0.2.7
4
8
 
5
9
  - The bundled Pushary skill is 0.13.4, from 0.13.1. One `ask_user` or `wait_for_answer` call waits at most 48 seconds, the server's real limit; it said 55. A question still pending keeps waiting with the same `correlationId`.
@@ -83,13 +83,14 @@ const diag = (message) => {
83
83
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
84
84
  const clamp = (n, lo, hi) => Math.min(Math.max(n, lo), hi)
85
85
 
86
- const withRetry = async (fn, attempts) => {
86
+ const withRetry = async (fn, attempts, shouldRetry) => {
87
87
  let lastError
88
88
  for (let i = 0; i < attempts; i += 1) {
89
89
  try {
90
90
  return await fn()
91
91
  } catch (error) {
92
92
  lastError = error
93
+ if (!shouldRetry(error)) break
93
94
  if (i < attempts - 1) await sleep(300 * (i + 1))
94
95
  }
95
96
  }
@@ -179,6 +180,23 @@ const parseMcpBody = (body, contentType) => {
179
180
  return JSON.parse(body)
180
181
  }
181
182
 
183
+ const TOOL_FAILURE_META_KEY = 'pushary/failure'
184
+ const QUESTION_LIMIT_FAILURE = 'question_limit'
185
+ const QUESTION_LIMIT_REASON = 'Pushary already has as many open questions in this session as it allows, so nobody was asked about this and it did not run. Wait until the person answers or cancels one before trying it again.'
186
+ const QUESTION_LIMIT_PROMPT_REASON = 'Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here.'
187
+
188
+ const toolFailureCodeOf = (result) => {
189
+ const code = result?._meta?.[TOOL_FAILURE_META_KEY]
190
+ return typeof code === 'string' ? code : null
191
+ }
192
+
193
+ const toolFailureOf = (name, result) =>
194
+ Object.assign(new Error(result?.content?.[0]?.text || `Pushary ${name} failed`), { failure: toolFailureCodeOf(result) })
195
+
196
+ const isQuestionLimitRefusal = (error) => error?.failure === QUESTION_LIMIT_FAILURE
197
+
198
+ const retriesUnlessTheQuestionLimitRefused = (error) => !isQuestionLimitRefusal(error)
199
+
182
200
  const callTool = async (apiKey, name, args, timeoutMs = NET_TIMEOUT_MS) => {
183
201
  const response = await fetch(MCP_URL, {
184
202
  method: 'POST',
@@ -194,6 +212,7 @@ const callTool = async (apiKey, name, args, timeoutMs = NET_TIMEOUT_MS) => {
194
212
  if (!response.ok) throw new Error(`Pushary MCP ${response.status}`)
195
213
  const rpc = parseMcpBody(text, response.headers.get('content-type'))
196
214
  if (rpc.error) throw new Error(rpc.error.message || 'Pushary MCP error')
215
+ if (rpc.result?.isError === true) throw toolFailureOf(name, rpc.result)
197
216
  const payload = rpc.result?.content?.[0]?.text
198
217
  if (!payload) throw new Error('empty Pushary response')
199
218
  return JSON.parse(payload)
@@ -470,7 +489,7 @@ const canonicalQuestion = (context) => ({
470
489
  // ask_user caps scopePath at SCOPE_PATH_MAX_LENGTH and blocker at
471
490
  // DECISION_LINE_MAX. The server derives a cwd-relative scope path that can be
472
491
  // longer than 200, so an over-length value must be DROPPED rather than sent:
473
- // ask_user rejects the whole call, this gate cannot parse the error, and the
492
+ // ask_user rejects the whole call, the gate refuses it, and the
474
493
  // action fails closed. Dropping costs only the widening on approval.
475
494
  const SCOPE_PATH_MAX = 200
476
495
  const BLOCKER_MAX = 500
@@ -568,13 +587,21 @@ const handedOff = (asked) => asked.suppressed || asked.status === 'terminal' ||
568
587
  const handoffMessage = (asked) =>
569
588
  asked.suppressed ? 'You are at the keyboard, continue with the agent’s permissions.' : 'Continue with the agent’s permissions.'
570
589
 
590
+ const refusesWhenUnanswered = ({ mode, timeoutAction }) => mode === 'push_only' && timeoutAction === 'deny'
591
+
592
+ const askUser = (apiKey, args) => withRetry(() => callTool(apiKey, 'ask_user', args), 3, retriesUnlessTheQuestionLimitRefused)
593
+
594
+ const questionLimitOutcome = (refusesUnanswered) =>
595
+ refusesUnanswered ? deny(QUESTION_LIMIT_REASON) : ask(QUESTION_LIMIT_PROMPT_REASON)
596
+
571
597
  // push_only: wait up to the policy timeout, then apply the timeout action.
572
598
  const handlePushOnly = async (apiKey, command, project, ident, timeoutSeconds, timeoutAction) => {
573
599
  let asked
574
600
  const args = { ...askArgs(command, project, ident), requestId: randomUUID() }
575
601
  try {
576
- asked = await withRetry(() => callTool(apiKey, 'ask_user', args), 3)
577
- } catch {
602
+ asked = await askUser(apiKey, args)
603
+ } catch (error) {
604
+ if (isQuestionLimitRefusal(error)) return questionLimitOutcome(refusesWhenUnanswered({ mode: 'push_only', timeoutAction }))
578
605
  return deny('Pushary could not create a verifiable approval. Retry the action.')
579
606
  }
580
607
  if (stopped(asked)) return deny(STOP_REASON)
@@ -624,8 +651,9 @@ const handlePushFirst = async (apiKey, command, project, ident, pushFirstSeconds
624
651
  let asked
625
652
  const args = { ...askArgs(command, project, ident), requestId: randomUUID() }
626
653
  try {
627
- asked = await withRetry(() => callTool(apiKey, 'ask_user', args), 3)
628
- } catch {
654
+ asked = await askUser(apiKey, args)
655
+ } catch (error) {
656
+ if (isQuestionLimitRefusal(error)) return questionLimitOutcome(refusesWhenUnanswered({ mode: 'push_first' }))
629
657
  return deny('Pushary could not create a verifiable approval. Retry the action.')
630
658
  }
631
659
  if (stopped(asked)) return deny(STOP_REASON)
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ABANDONED_WAIT,
3
+ ASK_USER_TIMEOUT_MS,
3
4
  CANCEL_QUESTION_TIMEOUT_MS,
4
5
  LEFT_OPEN,
5
6
  WAIT_END_TIMEOUT_MS,
@@ -28,28 +29,29 @@ import {
28
29
  waitRetryPauseMs,
29
30
  waitsForThePhone,
30
31
  withdrawQuestion
31
- } from "./chunk-A4CQJZ3K.js";
32
+ } from "./chunk-OTJEIINV.js";
32
33
  import "./chunk-POFBE6ZY.js";
33
- import "./chunk-ZXAWHBFW.js";
34
- import "./chunk-TXVRUVBB.js";
35
- import "./chunk-FVQASC2C.js";
36
- import "./chunk-KTKM7HS5.js";
37
- import "./chunk-5JRRWACR.js";
38
- import "./chunk-6TVDGTWR.js";
39
- import "./chunk-I7GUIT7E.js";
40
- import "./chunk-3MKRWTLZ.js";
34
+ import "./chunk-H6CBRJKT.js";
35
+ import "./chunk-VEE2MRUN.js";
36
+ import "./chunk-3APYAOZF.js";
37
+ import "./chunk-T4GV5MOC.js";
38
+ import "./chunk-XSJON4TV.js";
39
+ import "./chunk-2HOKEC2I.js";
40
+ import "./chunk-EBIPQ3ZE.js";
41
+ import "./chunk-Y2H5TF7T.js";
41
42
  import "./chunk-CINBAX5G.js";
42
43
  import "./chunk-PM2NRK6Y.js";
43
44
  import "./chunk-BG4HHB7E.js";
44
- import "./chunk-GL4EIL5Q.js";
45
+ import "./chunk-GAAPUS5J.js";
45
46
  import "./chunk-UQTQ6HPO.js";
46
47
  import {
47
48
  DECISION_STOP_REASON,
48
49
  UNVERIFIABLE_APPROVAL_REASON
49
- } from "./chunk-X55NVFKJ.js";
50
+ } from "./chunk-HMMVGDL3.js";
50
51
  import "./chunk-MLKGABMK.js";
51
52
  export {
52
53
  ABANDONED_WAIT,
54
+ ASK_USER_TIMEOUT_MS,
53
55
  CANCEL_QUESTION_TIMEOUT_MS,
54
56
  DECISION_STOP_REASON,
55
57
  LEFT_OPEN,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  exitOnHelpFlag
4
- } from "../chunk-OY5W64TR.js";
4
+ } from "../chunk-AQLIBG2P.js";
5
5
  import {
6
6
  readJsonSafe,
7
7
  writeJsonAtomic
@@ -9,7 +9,7 @@ import {
9
9
  import {
10
10
  EXIT
11
11
  } from "../chunk-BG4HHB7E.js";
12
- import "../chunk-GL4EIL5Q.js";
12
+ import "../chunk-GAAPUS5J.js";
13
13
  import "../chunk-UQTQ6HPO.js";
14
14
  import {
15
15
  AUDIT_CHAIN_FINDING_SEVERITY,
@@ -22,7 +22,7 @@ import {
22
22
  parseAuditChainExport,
23
23
  parseAuditKnownHead,
24
24
  verifyAuditChainSite
25
- } from "../chunk-X55NVFKJ.js";
25
+ } from "../chunk-HMMVGDL3.js";
26
26
  import "../chunk-MLKGABMK.js";
27
27
 
28
28
  // src/audit-verify.ts
@@ -1,45 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-7Z2N3SVV.js";
4
+ } from "../chunk-JJBM5FYH.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-SQA3ZPM4.js";
8
- import "../chunk-G2IFBGTY.js";
9
- import "../chunk-NK3V3E6P.js";
7
+ } from "../chunk-7K5AYNDY.js";
8
+ import "../chunk-LWUDOZHE.js";
9
+ import "../chunk-XONHTLMX.js";
10
10
  import "../chunk-WHB622LP.js";
11
- import "../chunk-PZBVUHRD.js";
12
- import "../chunk-GXR3JSXP.js";
13
- import "../chunk-EQGQPDCH.js";
14
- import "../chunk-V25PSICC.js";
15
- import "../chunk-EMGKV2QC.js";
16
- import "../chunk-NITOSXEV.js";
17
- import "../chunk-LWWUA5DF.js";
11
+ import "../chunk-ZCR5VTOC.js";
12
+ import "../chunk-OYZUPSD7.js";
13
+ import "../chunk-DQI4647T.js";
14
+ import "../chunk-PUVD22DY.js";
15
+ import "../chunk-3ULFLONL.js";
16
+ import "../chunk-EJJBM4OB.js";
17
+ import "../chunk-ITPAUHJ4.js";
18
18
  import "../chunk-BZIBNSQE.js";
19
- import "../chunk-7KLNBFFD.js";
19
+ import "../chunk-WB5DD232.js";
20
20
  import "../chunk-55L4JSPA.js";
21
- import "../chunk-DUZ6V74X.js";
21
+ import "../chunk-CDXD6W4N.js";
22
22
  import "../chunk-VRNGMRJA.js";
23
- import "../chunk-A4CQJZ3K.js";
24
- import "../chunk-KKUUJQ7D.js";
23
+ import "../chunk-OTJEIINV.js";
24
+ import "../chunk-5IPXL33D.js";
25
25
  import "../chunk-POFBE6ZY.js";
26
- import "../chunk-ZXAWHBFW.js";
27
- import "../chunk-TXVRUVBB.js";
28
- import "../chunk-7OQZ5GL7.js";
29
- import "../chunk-FVQASC2C.js";
30
- import "../chunk-KTKM7HS5.js";
31
- import "../chunk-5JRRWACR.js";
32
- import "../chunk-S67UAFW2.js";
33
- import "../chunk-RS7CW5W7.js";
34
- import "../chunk-6TVDGTWR.js";
35
- import "../chunk-I7GUIT7E.js";
36
- import "../chunk-3MKRWTLZ.js";
26
+ import "../chunk-H6CBRJKT.js";
27
+ import "../chunk-VEE2MRUN.js";
28
+ import "../chunk-VH5DPURH.js";
29
+ import "../chunk-3APYAOZF.js";
30
+ import "../chunk-T4GV5MOC.js";
31
+ import "../chunk-XSJON4TV.js";
32
+ import "../chunk-FY7WHRDJ.js";
33
+ import "../chunk-DP6YHOKF.js";
34
+ import "../chunk-2HOKEC2I.js";
35
+ import "../chunk-EBIPQ3ZE.js";
36
+ import "../chunk-Y2H5TF7T.js";
37
37
  import "../chunk-CINBAX5G.js";
38
38
  import "../chunk-PM2NRK6Y.js";
39
39
  import "../chunk-BG4HHB7E.js";
40
- import "../chunk-GL4EIL5Q.js";
40
+ import "../chunk-GAAPUS5J.js";
41
41
  import "../chunk-UQTQ6HPO.js";
42
- import "../chunk-X55NVFKJ.js";
42
+ import "../chunk-HMMVGDL3.js";
43
43
  import "../chunk-MLKGABMK.js";
44
44
 
45
45
  // bin/pushary-bell-hook.ts
@@ -5,29 +5,29 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-7Z2N3SVV.js";
8
+ } from "../chunk-JJBM5FYH.js";
9
9
  import {
10
10
  createIo
11
- } from "../chunk-DGG75PIW.js";
11
+ } from "../chunk-5QP7DVQF.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-OY5W64TR.js";
14
+ } from "../chunk-AQLIBG2P.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-LWWUA5DF.js";
19
+ } from "../chunk-ITPAUHJ4.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-BZIBNSQE.js";
23
- import "../chunk-7OQZ5GL7.js";
24
- import "../chunk-S67UAFW2.js";
25
- import "../chunk-RS7CW5W7.js";
23
+ import "../chunk-VH5DPURH.js";
24
+ import "../chunk-FY7WHRDJ.js";
25
+ import "../chunk-DP6YHOKF.js";
26
26
  import {
27
27
  claudeSettings
28
- } from "../chunk-6TVDGTWR.js";
29
- import "../chunk-I7GUIT7E.js";
30
- import "../chunk-3MKRWTLZ.js";
28
+ } from "../chunk-2HOKEC2I.js";
29
+ import "../chunk-EBIPQ3ZE.js";
30
+ import "../chunk-Y2H5TF7T.js";
31
31
  import "../chunk-CINBAX5G.js";
32
32
  import {
33
33
  readJsonSafe,
@@ -36,11 +36,11 @@ import {
36
36
  import {
37
37
  EXIT
38
38
  } from "../chunk-BG4HHB7E.js";
39
- import "../chunk-GL4EIL5Q.js";
39
+ import "../chunk-GAAPUS5J.js";
40
40
  import "../chunk-UQTQ6HPO.js";
41
41
  import {
42
42
  isRecord
43
- } from "../chunk-X55NVFKJ.js";
43
+ } from "../chunk-HMMVGDL3.js";
44
44
  import "../chunk-MLKGABMK.js";
45
45
 
46
46
  // bin/pushary-bell.ts