@pushary/agent-hooks 1.9.144 → 1.9.147

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 (167) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +5 -4
  3. package/data/SKILL.md +3 -3
  4. package/data/cursor-plugin/scripts/redaction.mjs +2 -1
  5. package/data/cursor-plugin/skills/pushary/SKILL.md +2 -2
  6. package/data/openclaw-plugin/LICENSE +21 -0
  7. package/data/openclaw-plugin/README.md +113 -0
  8. package/data/openclaw-plugin/dist/api-key-shape.js +5 -0
  9. package/data/openclaw-plugin/dist/approval-hook.js +88 -0
  10. package/data/openclaw-plugin/dist/approval-question.js +66 -0
  11. package/data/openclaw-plugin/dist/connection.js +101 -0
  12. package/data/openclaw-plugin/dist/decision-reply.js +6 -0
  13. package/data/openclaw-plugin/dist/gate-result.js +58 -0
  14. package/data/openclaw-plugin/dist/gate.js +173 -0
  15. package/data/openclaw-plugin/dist/hook-budget.js +19 -0
  16. package/data/openclaw-plugin/dist/host-api.js +1 -0
  17. package/data/openclaw-plugin/dist/host-version.js +25 -0
  18. package/data/openclaw-plugin/dist/index.js +32 -0
  19. package/data/openclaw-plugin/dist/openclaw-paths.js +43 -0
  20. package/data/openclaw-plugin/dist/openclaw-write-guard.js +93 -0
  21. package/data/openclaw-plugin/dist/protected-writes.js +217 -0
  22. package/data/openclaw-plugin/dist/pushary-client.js +103 -0
  23. package/data/openclaw-plugin/dist/pushary-hosts.js +3 -0
  24. package/data/openclaw-plugin/dist/redaction.js +53 -0
  25. package/data/openclaw-plugin/dist/replies.js +65 -0
  26. package/data/openclaw-plugin/dist/settings.js +103 -0
  27. package/data/openclaw-plugin/openclaw.plugin.json +32 -0
  28. package/data/openclaw-plugin/package.json +70 -0
  29. package/data/vscode-plugin/scripts/redaction.mjs +2 -1
  30. package/data/vscode-plugin/skills/pushary/SKILL.md +2 -2
  31. package/dist/{api-ZV7TT25P.js → api-2KDVLXHT.js} +11 -11
  32. package/dist/bin/pushary-audit.js +3 -3
  33. package/dist/bin/pushary-bell-hook.js +28 -28
  34. package/dist/bin/pushary-bell.js +11 -11
  35. package/dist/bin/pushary-claude.js +27 -27
  36. package/dist/bin/pushary-clean.js +76 -39
  37. package/dist/bin/pushary-codex-bridge.js +23 -23
  38. package/dist/bin/pushary-codex-hook.js +35 -35
  39. package/dist/bin/pushary-codex-session.js +8 -8
  40. package/dist/bin/pushary-codex.js +16 -16
  41. package/dist/bin/pushary-connect.js +78 -36
  42. package/dist/bin/pushary-cowork.js +5 -5
  43. package/dist/bin/pushary-daemon.js +44 -43
  44. package/dist/bin/pushary-disconnect.js +28 -28
  45. package/dist/bin/pushary-display-hook.js +103 -44
  46. package/dist/bin/pushary-doctor.js +139 -55
  47. package/dist/bin/pushary-elicitation-hook.js +28 -28
  48. package/dist/bin/pushary-gemini-bridge.js +17 -17
  49. package/dist/bin/pushary-gemini-hook.js +32 -32
  50. package/dist/bin/pushary-hook.js +35 -35
  51. package/dist/bin/pushary-login.js +22 -22
  52. package/dist/bin/pushary-logout.js +33 -31
  53. package/dist/bin/pushary-mcp.js +12 -12
  54. package/dist/bin/pushary-mode.js +16 -16
  55. package/dist/bin/pushary-notification-hook.js +27 -27
  56. package/dist/bin/pushary-opencode-hook.js +31 -31
  57. package/dist/bin/pushary-permission-denied-hook.js +35 -35
  58. package/dist/bin/pushary-permission-hook.js +35 -35
  59. package/dist/bin/pushary-post-hook.js +28 -28
  60. package/dist/bin/pushary-prompt-hook.js +27 -27
  61. package/dist/bin/pushary-session-end-hook.js +27 -27
  62. package/dist/bin/pushary-session-start-hook.js +37 -36
  63. package/dist/bin/pushary-setup.js +209 -89
  64. package/dist/bin/pushary-stats.js +5 -5
  65. package/dist/bin/pushary-status.js +38 -36
  66. package/dist/bin/pushary-stop-hook.js +27 -27
  67. package/dist/bin/pushary-stopfailure-hook.js +27 -27
  68. package/dist/bin/pushary-suggestions.js +16 -16
  69. package/dist/bin/pushary-transcript-register.js +17 -17
  70. package/dist/bin/pushary-transcripts.js +25 -25
  71. package/dist/bin/pushary-upgrade.js +42 -41
  72. package/dist/bin/pushary-wait.js +16 -16
  73. package/dist/bin/pushary.js +7 -7
  74. package/dist/{chunk-LUVSHGLH.js → chunk-2EETRVCZ.js} +1 -1
  75. package/dist/{chunk-YESBU4VQ.js → chunk-2G54YLN3.js} +3 -3
  76. package/dist/{chunk-WGOTBZ23.js → chunk-2I6A34GJ.js} +15 -5
  77. package/dist/{chunk-WGT5LCIB.js → chunk-2QY2BD4T.js} +5 -5
  78. package/dist/{chunk-HGIW56MU.js → chunk-2RAIG6NF.js} +2 -2
  79. package/dist/{chunk-QLGLUUOP.js → chunk-2YNAQ5TX.js} +1 -1
  80. package/dist/{chunk-44WPMZGQ.js → chunk-37ZBJB2Q.js} +5 -5
  81. package/dist/{chunk-4EBJ4PTZ.js → chunk-3NMX4725.js} +1 -1
  82. package/dist/{chunk-E32SRYTE.js → chunk-3TTXOU6G.js} +3 -3
  83. package/dist/{chunk-GV3FDGQH.js → chunk-4P3ML7HP.js} +200 -59
  84. package/dist/{chunk-22CXL7YI.js → chunk-526XSNMS.js} +3 -3
  85. package/dist/{chunk-B4VIT5N3.js → chunk-57GVGSOQ.js} +1 -1
  86. package/dist/{chunk-6LALK6GI.js → chunk-5II3USXS.js} +2 -2
  87. package/dist/{chunk-WWCM6UL7.js → chunk-5K65H6OO.js} +1 -1
  88. package/dist/{chunk-56HFENZK.js → chunk-6C5QRJIH.js} +5 -5
  89. package/dist/{chunk-EOKUIOMT.js → chunk-6EPTMB7L.js} +4 -4
  90. package/dist/{chunk-C5LIS3XM.js → chunk-6JBX55K4.js} +38 -8
  91. package/dist/{chunk-23CGCD5L.js → chunk-6YVGY2ZX.js} +7 -7
  92. package/dist/{chunk-WC25Z4XS.js → chunk-72S6PF2I.js} +2 -2
  93. package/dist/{chunk-YY5YVMBA.js → chunk-7P32YU2M.js} +10 -74
  94. package/dist/{chunk-WTBFPSTR.js → chunk-7TVSWGAV.js} +8 -6
  95. package/dist/{chunk-S7WVJ6AR.js → chunk-7WDEJTNX.js} +4 -4
  96. package/dist/{chunk-AJQ4TTPJ.js → chunk-7XIJD7NL.js} +3 -3
  97. package/dist/{chunk-PYT4WXXR.js → chunk-A5MSVNFS.js} +10 -10
  98. package/dist/{chunk-FC2ENROR.js → chunk-ANLR5G2W.js} +4 -4
  99. package/dist/{chunk-7VMVMC4H.js → chunk-BEDAQAEN.js} +1 -1
  100. package/dist/{chunk-4JTZZXB3.js → chunk-BHGSNYG5.js} +3 -3
  101. package/dist/{chunk-5I3UQEAX.js → chunk-BU2J4P7P.js} +3 -3
  102. package/dist/{chunk-EMODTMHE.js → chunk-BYVLAPCF.js} +1 -1
  103. package/dist/{chunk-5BTAIFVV.js → chunk-CSNG5NQR.js} +1 -1
  104. package/dist/{chunk-7QWH257P.js → chunk-D7ZWJYXB.js} +1 -1
  105. package/dist/{chunk-AGUL2JDK.js → chunk-ELRZO6A7.js} +3 -3
  106. package/dist/{chunk-Z2WQD2W6.js → chunk-EV54ZQ5J.js} +4 -4
  107. package/dist/{chunk-5TZYAMGW.js → chunk-FHBJJOMF.js} +1 -1
  108. package/dist/{chunk-74QCFZKV.js → chunk-FKGWP4MF.js} +8 -7
  109. package/dist/{chunk-MCI6KYN7.js → chunk-FMAIUTVU.js} +3 -3
  110. package/dist/{chunk-WTULK73V.js → chunk-FWCECQTY.js} +2 -2
  111. package/dist/{chunk-ZVJIJPQY.js → chunk-GGCUXNZN.js} +1 -1
  112. package/dist/{chunk-VP4T5352.js → chunk-GIWI5IHB.js} +6 -6
  113. package/dist/{chunk-RPXSGCRG.js → chunk-GJV5RVUU.js} +98 -47
  114. package/dist/chunk-GPAMD5JG.js +157 -0
  115. package/dist/{chunk-ZGYGKKXF.js → chunk-I72UU75H.js} +16 -16
  116. package/dist/{chunk-CV4EIXPV.js → chunk-ISM6XF3V.js} +494 -15
  117. package/dist/{chunk-HNFYZPNJ.js → chunk-ISOP4ENY.js} +17 -5
  118. package/dist/{chunk-R7FSMUHG.js → chunk-JDIKCM2N.js} +6 -5
  119. package/dist/{chunk-BHNX7XNO.js → chunk-KDJIDRJS.js} +3 -3
  120. package/dist/{chunk-DDJHPMBJ.js → chunk-KFL7OWLI.js} +1 -1
  121. package/dist/{chunk-5AXDNDUJ.js → chunk-KH27X5CW.js} +2 -2
  122. package/dist/{chunk-BHKODM4L.js → chunk-KXMIDDUN.js} +2 -2
  123. package/dist/{chunk-3KRGT5AZ.js → chunk-L2M6D2N4.js} +67 -4
  124. package/dist/{chunk-KEBI7NYU.js → chunk-L6BTSIKF.js} +4 -4
  125. package/dist/{chunk-YFK3MJGZ.js → chunk-LO52V6WG.js} +2 -2
  126. package/dist/{chunk-LVOHE66T.js → chunk-MI7GHNTO.js} +5 -5
  127. package/dist/{chunk-4524ZR2U.js → chunk-MYJJNLT2.js} +2 -2
  128. package/dist/{chunk-CZOMD2IW.js → chunk-NAGF5ZJ2.js} +8 -8
  129. package/dist/{chunk-53KLGXFL.js → chunk-NMUEUDTT.js} +4 -3
  130. package/dist/{chunk-C6SKS6IU.js → chunk-OSYULPJO.js} +23 -12
  131. package/dist/{chunk-F37YD4YE.js → chunk-OXDKZYBO.js} +1 -1
  132. package/dist/chunk-OYIN77HO.js +72 -0
  133. package/dist/{chunk-XLMJEEW3.js → chunk-P6W2V2AP.js} +2 -2
  134. package/dist/{chunk-ZKKZEVNI.js → chunk-Q3JW44JV.js} +2 -2
  135. package/dist/{chunk-EY5CVFDL.js → chunk-Q6POCQOV.js} +12 -12
  136. package/dist/{chunk-P5QXH5QI.js → chunk-Q767Y4LY.js} +1 -1
  137. package/dist/{chunk-UK5DKLZY.js → chunk-QGKFDSEO.js} +8 -8
  138. package/dist/{chunk-YD376BLV.js → chunk-RZGR4G5G.js} +5 -5
  139. package/dist/{chunk-OZG6CGYW.js → chunk-RZJHCHEA.js} +6 -6
  140. package/dist/{chunk-H33CFJOF.js → chunk-T274HRSR.js} +4 -4
  141. package/dist/chunk-T2CR5REM.js +176 -0
  142. package/dist/{chunk-QESEICW4.js → chunk-T3TVMMXJ.js} +1 -1
  143. package/dist/{chunk-44BLJJPH.js → chunk-TZ7CBPCD.js} +2 -2
  144. package/dist/{chunk-YCU7Y77H.js → chunk-UGPNLU4O.js} +1 -1
  145. package/dist/{chunk-BE5LO5VW.js → chunk-UR55VBLY.js} +2 -2
  146. package/dist/{chunk-EC7VHNHE.js → chunk-WLKW2TF7.js} +19 -12
  147. package/dist/{chunk-CWWO3JTD.js → chunk-WNV3X2VU.js} +3 -3
  148. package/dist/{chunk-HIIXYZYV.js → chunk-XQOBM3E6.js} +3 -3
  149. package/dist/{chunk-JK7DTAQH.js → chunk-YICO6HEW.js} +5 -5
  150. package/dist/{chunk-FO3MDD26.js → chunk-YM2T76UM.js} +27 -0
  151. package/dist/chunk-YOVJOHM5.js +36 -0
  152. package/dist/{chunk-LS6BU5RM.js → chunk-ZKAQWXGO.js} +1 -1
  153. package/dist/{codex-app-cards-switch-5PWB62W3.js → codex-app-cards-switch-GN65VEKM.js} +11 -11
  154. package/dist/{codex-card-routing-I6YOJBTT.js → codex-card-routing-JTS75442.js} +2 -2
  155. package/dist/{codex-desktop-launch-BCPUKOCV.js → codex-desktop-launch-AQ2HSOQJ.js} +1 -1
  156. package/dist/{codex-session-launch-4ZUBROFZ.js → codex-session-launch-QYZZGVSQ.js} +20 -20
  157. package/dist/{config-2CHOLFNB.js → config-5ATI6KPI.js} +3 -3
  158. package/dist/{global-upgrade-4IKWJHLE.js → global-upgrade-K4HWVUMI.js} +9 -9
  159. package/dist/{identity-I2VWLZAQ.js → identity-V2GZCPJV.js} +4 -4
  160. package/dist/{live-capabilities-4CLCROSP.js → live-capabilities-PD62FO4K.js} +4 -4
  161. package/dist/{paths-YMHQKLFX.js → paths-WPJEIHUE.js} +7 -3
  162. package/dist/{reapply-FBQ7VR6L.js → reapply-ZEWMGDXT.js} +30 -29
  163. package/dist/src/index.js +34 -34
  164. package/dist/{upgrade-lock-7ONNXM6V.js → upgrade-lock-7OR6V323.js} +4 -4
  165. package/dist/{usage-GWUTCS5A.js → usage-GWZ3UGZG.js} +3 -3
  166. package/package.json +1 -1
  167. package/dist/chunk-I6HXZIER.js +0 -31
@@ -1,20 +1,25 @@
1
+ import {
2
+ openClawLauncherCandidates
3
+ } from "./chunk-T2CR5REM.js";
1
4
  import {
2
5
  openCodeConfigDirFrom
3
- } from "./chunk-LVOHE66T.js";
6
+ } from "./chunk-MI7GHNTO.js";
4
7
  import {
5
8
  nativeClaudeInstallPath
6
9
  } from "./chunk-CYTPQDQY.js";
7
10
  import {
8
11
  grokHome
9
- } from "./chunk-WGOTBZ23.js";
12
+ } from "./chunk-2I6A34GJ.js";
10
13
  import {
11
14
  claudeConfigDir,
12
15
  clineDataDirectory,
13
- codexHomeFrom
14
- } from "./chunk-RPXSGCRG.js";
16
+ codexHomeFrom,
17
+ openClawEnvironmentOf,
18
+ openClawPathsFrom
19
+ } from "./chunk-GJV5RVUU.js";
15
20
  import {
16
21
  HOOK_COMPATIBLE_PROFILES
17
- } from "./chunk-C5LIS3XM.js";
22
+ } from "./chunk-6JBX55K4.js";
18
23
 
19
24
  // src/vscode-config.ts
20
25
  import { homedir } from "os";
@@ -220,6 +225,11 @@ var agentProbes = (home = homedir2(), platform = process.platform) => ({
220
225
  paths: [],
221
226
  configMarkers: [join2(home, ".hermes")]
222
227
  },
228
+ openclaw: {
229
+ binary: "openclaw",
230
+ paths: openClawLauncherCandidates(openClawPathsFrom(openClawEnvironmentOf(process.env), home), home),
231
+ configMarkers: [openClawPathsFrom(openClawEnvironmentOf(process.env), home).stateDirectory]
232
+ },
223
233
  cursor: {
224
234
  // GUI editor. `cursor` on PATH only exists if the user ran "Install 'cursor'
225
235
  // command in PATH" from the command palette, which most never do.
@@ -277,6 +287,7 @@ var detectAllAgents = (deps = defaultDeps, home) => {
277
287
  }));
278
288
  };
279
289
  var isDetected = (result) => result.kind === "installed";
290
+ var detectedAgentChoices = () => detectAllAgents().filter((entry) => isDetected(entry.result)).map((entry) => entry.agent);
280
291
  var shortenHome = (path, home = homedir2()) => home && path.startsWith(home) ? `~${path.slice(home.length)}` : path;
281
292
  var describeDetection = (result, home) => {
282
293
  if (result.kind !== "installed") return null;
@@ -294,6 +305,7 @@ export {
294
305
  agentProbes,
295
306
  detectAllAgents,
296
307
  isDetected,
308
+ detectedAgentChoices,
297
309
  shortenHome,
298
310
  describeDetection
299
311
  };
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-C5LIS3XM.js";
5
+ } from "./chunk-6JBX55K4.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -55,7 +55,7 @@ var COMMAND_LIST = [
55
55
  {
56
56
  name: "setup",
57
57
  module: "pushary-setup",
58
- summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, Cursor, VS Code, OpenCode, or fx with Pushary"
58
+ summary: "Configure Claude Code, Codex, Gemini CLI, Hermes, OpenClaw, Cursor, VS Code, OpenCode, or fx with Pushary"
59
59
  },
60
60
  {
61
61
  name: "claude",
@@ -95,7 +95,7 @@ var COMMAND_LIST = [
95
95
  name: "pair",
96
96
  module: "pushary-connect",
97
97
  aliases: ["connect"],
98
- summary: "Pair a phone without re-running setup (--app for the Pushary app; also: connect)"
98
+ summary: "Pair a phone without re-running setup: the Pushary app, or --browser for web push (also: connect)"
99
99
  },
100
100
  {
101
101
  name: "bell",
@@ -159,8 +159,8 @@ var COMMAND_OPTIONS = {
159
159
  ["--force", "Start a new sign-in instead of reusing the saved key"]
160
160
  ],
161
161
  pair: [
162
- ["--app", "Pair with the Pushary app"],
163
- ["--browser", "Pair through a browser (default)"]
162
+ ["--app", "Pair the Pushary app (default)"],
163
+ ["--browser", "Use browser web push instead of the app"]
164
164
  ],
165
165
  cowork: [
166
166
  ["--open", "Also open the setup guide in your browser"],
@@ -241,6 +241,7 @@ var SETUP_OPTIONS = [
241
241
  ["--transcripts on|off", "Enable or disable encrypted transcript sync on this machine"],
242
242
  ["--skip-phone", "Skip pairing a phone"],
243
243
  ["--take-over-hooks", "Replace hooks the Pushary Mac app owns with the CLI's. Without it the app's wiring is kept"],
244
+ ["--hermes-gate-terminal", "Add Hermes's terminal tool to PUSHARY_GATE_TOOLS when Hermes skips its own approvals on a container backend"],
244
245
  ["--verify roundtrip", "Send a real question and wait for you to answer it (default when a human is present)"],
245
246
  ["--verify push", "Only prove a notification was delivered. Automatic when nobody is at the terminal"],
246
247
  ["--verify none", "Skip the final check entirely"],
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-WGT5LCIB.js";
3
+ } from "./chunk-2QY2BD4T.js";
4
4
  import {
5
5
  fetchAsCredential
6
- } from "./chunk-YCU7Y77H.js";
6
+ } from "./chunk-UGPNLU4O.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-R7FSMUHG.js";
9
+ } from "./chunk-JDIKCM2N.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  RETRY_ACK,
6
6
  refusedReceiptMessage
7
- } from "./chunk-ZVJIJPQY.js";
7
+ } from "./chunk-GGCUXNZN.js";
8
8
 
9
9
  // src/command-receipts.ts
10
10
  import { randomUUID } from "crypto";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-RPXSGCRG.js";
3
+ } from "./chunk-GJV5RVUU.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-TODDEIYG.js";
7
7
  import {
8
8
  isRecord
9
- } from "./chunk-C5LIS3XM.js";
9
+ } from "./chunk-6JBX55K4.js";
10
10
 
11
11
  // src/process-ownership.ts
12
12
  import { createHash, randomUUID } from "crypto";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  configFilePath
3
- } from "./chunk-4EBJ4PTZ.js";
3
+ } from "./chunk-3NMX4725.js";
4
4
  import {
5
5
  normalizeInstallSource
6
- } from "./chunk-C5LIS3XM.js";
6
+ } from "./chunk-6JBX55K4.js";
7
7
 
8
8
  // src/install-source.ts
9
9
  import { readFileSync } from "fs";
@@ -1,12 +1,18 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-6LALK6GI.js";
3
+ } from "./chunk-5II3USXS.js";
4
+ import {
5
+ HERMES_ALWAYS_ALLOWED_SHELL_RULE,
6
+ HERMES_COMMAND_ALLOWLIST_KEY,
7
+ HERMES_GATE_TOOLS_KEY,
8
+ HERMES_SHELL_TOOL
9
+ } from "./chunk-ISM6XF3V.js";
4
10
  import {
5
11
  retryAgentCommand
6
- } from "./chunk-MCI6KYN7.js";
12
+ } from "./chunk-FMAIUTVU.js";
7
13
  import {
8
14
  NPX_LATEST_COMMAND
9
- } from "./chunk-R7FSMUHG.js";
15
+ } from "./chunk-JDIKCM2N.js";
10
16
 
11
17
  // src/setup/codex-trust.ts
12
18
  var CODEX_TRUST_TELEMETRY = {
@@ -78,6 +84,8 @@ var describeCodexTrustConfirmation = (confirmation) => {
78
84
  // src/hermes/messages.ts
79
85
  var HERMES_RESTART_COMMAND = "hermes gateway restart";
80
86
  var HERMES_MAC_APP_REPAIR = "open Pushary on this Mac and connect Hermes again";
87
+ var HERMES_GATE_SHELL_FLAG = "--hermes-gate-terminal";
88
+ var hermesGateShellCommand = () => `${retryAgentCommand("hermes")} ${HERMES_GATE_SHELL_FLAG}`;
81
89
  var describeHermesInstallFailure = (reason, pluginDirectory, receiptPath) => {
82
90
  switch (reason) {
83
91
  case "home_unknown":
@@ -118,6 +126,58 @@ var describeHermesState = (state) => {
118
126
  return state.runningVersion === state.version ? "Hermes loaded Pushary" : `Hermes runs Pushary ${state.runningVersion ?? "from an older copy"}; restart it to load ${state.version ?? "the new copy"}`;
119
127
  }
120
128
  };
129
+ var ONLY_LISTED_TOOLS = `Pushary only gates the tools listed in ${HERMES_GATE_TOOLS_KEY}, and ${HERMES_SHELL_TOOL} is not one of them`;
130
+ var SKIP_DOUBTS = {
131
+ plugin_backend: "A terminal backend from a plugin may tell Hermes to skip its own approvals.",
132
+ docker_start_folder: "Hermes checks dangerous commands on docker only when it mounts a host folder. docker_mount_cwd_to_workspace mounts the folder Hermes starts in, but not /root or /workspace, so a gateway started there skips the check."
133
+ };
134
+ var shellGateFix = () => `run ${hermesGateShellCommand()}, then ${HERMES_RESTART_COMMAND}`;
135
+ var whyTheShellNeedsAGate = (backend, skip) => skip.kind === "skips" ? `Hermes skips its own dangerous-command approvals on the ${backend} backend, because it treats the container as the boundary.` : SKIP_DOUBTS[skip.doubt];
136
+ var ungatedLabel = (backend, skip) => skip.kind === "skips" ? `Hermes: no dangerous-command approvals reach your phone on the ${backend} backend` : `Hermes: dangerous-command approvals may not reach your phone on the ${backend} backend`;
137
+ var gatedDetail = (backend, skip) => {
138
+ const why = skip.kind === "skips" ? `Hermes skips its own approvals on the ${backend} backend` : `the ${backend} backend may skip Hermes's own approvals`;
139
+ return `${why}, and ${HERMES_GATE_TOOLS_KEY} includes ${HERMES_SHELL_TOOL}`;
140
+ };
141
+ var describeHermesShellGate = (state) => {
142
+ switch (state.kind) {
143
+ case "hermes_asks":
144
+ return { tone: "pass", label: "Hermes: checks dangerous commands before running them", detail: `terminal backend ${state.backend}` };
145
+ case "pushary_gates":
146
+ return { tone: "pass", label: `Hermes: Pushary gates every ${HERMES_SHELL_TOOL} command`, detail: gatedDetail(state.backend, state.skip) };
147
+ case "always_allowed":
148
+ return {
149
+ tone: "warn",
150
+ label: `Hermes: ${HERMES_SHELL_TOOL} commands run without asking`,
151
+ detail: `${HERMES_COMMAND_ALLOWLIST_KEY} holds ${HERMES_ALWAYS_ALLOWED_SHELL_RULE}, which "Always allow" adds, so Hermes lets every ${HERMES_SHELL_TOOL} command through before Pushary is asked`,
152
+ fix: `remove ${HERMES_ALWAYS_ALLOWED_SHELL_RULE} from ${HERMES_COMMAND_ALLOWLIST_KEY} in your Hermes config.yaml, then ${HERMES_RESTART_COMMAND}`
153
+ };
154
+ case "ungated":
155
+ return {
156
+ tone: "warn",
157
+ label: ungatedLabel(state.backend, state.skip),
158
+ detail: `${whyTheShellNeedsAGate(state.backend, state.skip)} ${ONLY_LISTED_TOOLS}`,
159
+ fix: shellGateFix()
160
+ };
161
+ case "unreadable":
162
+ return {
163
+ tone: "note",
164
+ label: "Hermes: terminal settings unknown",
165
+ detail: "Hermes did not report its terminal backend or docker mounts through hermes config get in a form Pushary can read, so it cannot say whether Hermes checks dangerous commands"
166
+ };
167
+ }
168
+ };
169
+ var describeHermesShellGateFailure = (reason, receiptPath) => {
170
+ switch (reason) {
171
+ case "receipt_missing":
172
+ return `${receiptPath} is missing, so setup cannot record what ${HERMES_GATE_TOOLS_KEY} held before. Run setup again.`;
173
+ case "receipt_invalid":
174
+ return `${receiptPath} is unreadable, so setup cannot record what ${HERMES_GATE_TOOLS_KEY} held before. Move it aside, then run setup again.`;
175
+ case "setting_unreadable":
176
+ return `${HERMES_GATE_TOOLS_KEY} holds a value setup cannot read as a list of tools, so it was left as it is. Add ${HERMES_SHELL_TOOL} to it yourself with hermes config set ${HERMES_GATE_TOOLS_KEY}.`;
177
+ case "setting_refused":
178
+ return `Hermes refused to change ${HERMES_GATE_TOOLS_KEY}. Add ${HERMES_SHELL_TOOL} to it yourself with hermes config set ${HERMES_GATE_TOOLS_KEY}.`;
179
+ }
180
+ };
121
181
 
122
182
  export {
123
183
  codexTrustOutcome,
@@ -128,8 +188,11 @@ export {
128
188
  needsCodexTrustStep,
129
189
  describeCodexTrustConfirmation,
130
190
  HERMES_RESTART_COMMAND,
191
+ hermesGateShellCommand,
131
192
  describeHermesInstallFailure,
132
193
  describeHermesProblems,
133
194
  hermesRepairStep,
134
- describeHermesState
195
+ describeHermesState,
196
+ describeHermesShellGate,
197
+ describeHermesShellGateFailure
135
198
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-53KLGXFL.js";
3
+ } from "./chunk-NMUEUDTT.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-F37YD4YE.js";
6
+ } from "./chunk-OXDKZYBO.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -16,13 +16,13 @@ import {
16
16
  isBridgeLocator,
17
17
  isProtectedByScope,
18
18
  registerHookEntry
19
- } from "./chunk-RPXSGCRG.js";
19
+ } from "./chunk-GJV5RVUU.js";
20
20
  import {
21
21
  CURSOR_GATE_EVENTS,
22
22
  HOOK_BUDGETS,
23
23
  HOOK_LOCATOR_BINARY,
24
24
  hookCommandHoldBudget
25
- } from "./chunk-C5LIS3XM.js";
25
+ } from "./chunk-6JBX55K4.js";
26
26
 
27
27
  // src/gemini-config.ts
28
28
  var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-E32SRYTE.js";
3
+ } from "./chunk-3TTXOU6G.js";
4
4
  import {
5
5
  KEY_SCOPE
6
- } from "./chunk-C5LIS3XM.js";
6
+ } from "./chunk-6JBX55K4.js";
7
7
 
8
8
  // src/cli/approval-settings-pages.ts
9
9
  var API_KEYS_PATH = "/dashboard/agent/settings";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-WGOTBZ23.js";
3
+ } from "./chunk-2I6A34GJ.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands
7
- } from "./chunk-KEBI7NYU.js";
7
+ } from "./chunk-L6BTSIKF.js";
8
8
  import {
9
9
  AGENT_CHOICES
10
- } from "./chunk-53KLGXFL.js";
10
+ } from "./chunk-NMUEUDTT.js";
11
11
  import {
12
12
  bridgeStub,
13
13
  claudeSettings,
@@ -19,7 +19,7 @@ import {
19
19
  resolveBridgeStub,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-RPXSGCRG.js";
22
+ } from "./chunk-GJV5RVUU.js";
23
23
  import {
24
24
  readJsonSafe
25
25
  } from "./chunk-TODDEIYG.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-C5LIS3XM.js";
32
+ } from "./chunk-6JBX55K4.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-RPXSGCRG.js";
6
+ } from "./chunk-GJV5RVUU.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-WIIMW5YO.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-C5LIS3XM.js";
20
+ } from "./chunk-6JBX55K4.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -4,37 +4,37 @@ import {
4
4
  postLiveSession,
5
5
  postLiveSessionUntilAccepted,
6
6
  startLiveSessionHeartbeat
7
- } from "./chunk-B4VIT5N3.js";
7
+ } from "./chunk-57GVGSOQ.js";
8
8
  import {
9
9
  CommandReceipts,
10
10
  controllerCommandSchema
11
- } from "./chunk-DDJHPMBJ.js";
11
+ } from "./chunk-KFL7OWLI.js";
12
12
  import {
13
13
  SESSION_IDLE_TIMEOUT_MS,
14
14
  describeIdleWindow,
15
15
  idleDeadlinePassed,
16
16
  startProcessOwnership
17
- } from "./chunk-5AXDNDUJ.js";
17
+ } from "./chunk-KH27X5CW.js";
18
18
  import {
19
19
  repositoryScopeFor
20
- } from "./chunk-EMODTMHE.js";
20
+ } from "./chunk-BYVLAPCF.js";
21
21
  import {
22
22
  isAskUserResponse,
23
23
  isDecisionStopped,
24
24
  isWaitForAnswerResponse,
25
25
  withdrawQuestion,
26
26
  writeDegraded
27
- } from "./chunk-74QCFZKV.js";
27
+ } from "./chunk-FKGWP4MF.js";
28
28
  import {
29
29
  callMcpTool,
30
30
  isRetryable
31
- } from "./chunk-WGT5LCIB.js";
31
+ } from "./chunk-2QY2BD4T.js";
32
32
  import {
33
33
  spawnClaude
34
34
  } from "./chunk-H6CL3T2S.js";
35
35
  import {
36
36
  readCommandAck
37
- } from "./chunk-ZVJIJPQY.js";
37
+ } from "./chunk-GGCUXNZN.js";
38
38
  import {
39
39
  AGENT_QUESTION_DESCRIPTION_MAX,
40
40
  AGENT_QUESTION_HEADER_MAX,
@@ -55,7 +55,7 @@ import {
55
55
  parseCodexQuestions,
56
56
  planElicitationAsk,
57
57
  readElicitationFields
58
- } from "./chunk-C5LIS3XM.js";
58
+ } from "./chunk-6JBX55K4.js";
59
59
 
60
60
  // src/codex-question-owner.ts
61
61
  import { createHash } from "crypto";
@@ -9,7 +9,7 @@ import {
9
9
  isSetupConnectMode,
10
10
  isValidApiKey,
11
11
  normalizeAgentId
12
- } from "./chunk-C5LIS3XM.js";
12
+ } from "./chunk-6JBX55K4.js";
13
13
 
14
14
  // src/setup/options.ts
15
15
  var AGENT_CHOICES = SETUP_AGENT_CHOICES;
@@ -39,7 +39,7 @@ var effectiveVerify = (options, context) => {
39
39
  };
40
40
  var effectiveAgentSelection = (selection, context) => context.paired && context.hasDetectedAgents && selection.kind === "ask" ? { kind: "auto" } : selection;
41
41
  var SETUP_FLAGS = {
42
- bools: ["key-stdin", "skip-phone", "yes", "y", "json", "dry-run", "take-over-hooks", "help", "h"],
42
+ bools: ["key-stdin", "skip-phone", "yes", "y", "json", "dry-run", "take-over-hooks", "hermes-gate-terminal", "help", "h"],
43
43
  values: ["key", "connect", "agents", "verify", "control", "transcripts"]
44
44
  };
45
45
  var effectiveControlMode = (options, stored) => options.controlExplicit ? options.control : stored ?? options.control;
@@ -124,7 +124,8 @@ var parseSetupOptions = (input) => {
124
124
  control: controlRaw === void 0 ? "auto" : parseControlMode(controlRaw),
125
125
  controlExplicit: controlRaw !== void 0,
126
126
  transcripts: transcriptsRaw === void 0 ? null : transcriptsRaw === "on",
127
- takeOverHooks: flags.bools.has("take-over-hooks")
127
+ takeOverHooks: flags.bools.has("take-over-hooks"),
128
+ hermesGateTerminal: flags.bools.has("hermes-gate-terminal")
128
129
  };
129
130
  };
130
131
 
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-6LALK6GI.js";
3
+ } from "./chunk-5II3USXS.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
7
7
  installHermesPlugin,
8
+ openClawFilesNow,
8
9
  refreshHermesPluginFiles,
10
+ refreshOpenClawPlugin,
9
11
  shippedHermesPlugin
10
- } from "./chunk-CV4EIXPV.js";
12
+ } from "./chunk-ISM6XF3V.js";
11
13
  import {
12
14
  fxIgnoresInstructionsFile,
13
15
  fxInstructionsBody,
@@ -16,7 +18,7 @@ import {
16
18
  macAppFxBridge,
17
19
  refreshClineKey,
18
20
  switchFxHttpEntryToBridge
19
- } from "./chunk-YD376BLV.js";
21
+ } from "./chunk-RZGR4G5G.js";
20
22
  import {
21
23
  OPENCODE_HOOK_BINARY,
22
24
  agentHookOwner,
@@ -28,16 +30,16 @@ import {
28
30
  openCodePluginDir,
29
31
  openCodeWired,
30
32
  withOpenCodeAskRules
31
- } from "./chunk-LVOHE66T.js";
33
+ } from "./chunk-MI7GHNTO.js";
32
34
  import {
33
35
  detectClaudeVersion
34
- } from "./chunk-BE5LO5VW.js";
36
+ } from "./chunk-UR55VBLY.js";
35
37
  import {
36
38
  addCompatibleHooks,
37
39
  compatibleConfigFile,
38
40
  compatibleInstructionsFile,
39
41
  hasCompatibleHooks
40
- } from "./chunk-WGOTBZ23.js";
42
+ } from "./chunk-2I6A34GJ.js";
41
43
  import {
42
44
  GEMINI_HOOK_BINARY,
43
45
  addGeminiHooks,
@@ -49,10 +51,10 @@ import {
49
51
  geminiWired,
50
52
  hasGeminiHooks,
51
53
  planHooks
52
- } from "./chunk-KEBI7NYU.js";
54
+ } from "./chunk-L6BTSIKF.js";
53
55
  import {
54
56
  KEY_FILE_MODE
55
- } from "./chunk-HIIXYZYV.js";
57
+ } from "./chunk-XQOBM3E6.js";
56
58
  import {
57
59
  CLAUDE_HOOK_BINARY,
58
60
  CLAUDE_HOOK_EVENTS,
@@ -99,13 +101,13 @@ import {
99
101
  renderAgentInstructions,
100
102
  supportedClaudeEvents,
101
103
  vscodePluginMcp
102
- } from "./chunk-RPXSGCRG.js";
104
+ } from "./chunk-GJV5RVUU.js";
103
105
  import {
104
106
  formatVersion,
105
107
  hookCommandsUseBareNames,
106
108
  resolveGlobalBinDir,
107
109
  resolveGlobalBinary
108
- } from "./chunk-5I3UQEAX.js";
110
+ } from "./chunk-BU2J4P7P.js";
109
111
  import {
110
112
  readJsonSafe,
111
113
  writeFileAtomic,
@@ -115,7 +117,7 @@ import {
115
117
  HOOK_COMPATIBLE_PROFILES,
116
118
  isCompatibleAgentType,
117
119
  isRecord
118
- } from "./chunk-C5LIS3XM.js";
120
+ } from "./chunk-6JBX55K4.js";
119
121
 
120
122
  // src/reapply.ts
121
123
  import { dirname, join } from "path";
@@ -470,7 +472,8 @@ var SETUP_CHOICE_BY_REAPPLY_ID = {
470
472
  opencode: "opencode",
471
473
  fx: "fx",
472
474
  cline: "cline",
473
- hermes: "hermes"
475
+ hermes: "hermes",
476
+ openclaw: "openclaw"
474
477
  };
475
478
  var setupChoiceOf = (id) => isCompatibleAgentType(id) ? id : SETUP_CHOICE_BY_REAPPLY_ID[id];
476
479
  var reapplyHookOwner = (id, appAvailable) => agentHookOwner(setupChoiceOf(id), appAvailable);
@@ -498,6 +501,13 @@ var reapplyHermesPlugin = async () => {
498
501
  }
499
502
  return HERMES_REFRESH_RESULTS[refreshHermesPluginFiles("cli", plugin)];
500
503
  };
504
+ var OPENCLAW_REFRESH_RESULTS = {
505
+ refreshed: { configured: true, reapplied: true, hooks: false, mcp: false, pluginFiles: true },
506
+ current: { configured: true, reapplied: false, hooks: false, mcp: false },
507
+ not_set_up: { configured: false, reapplied: false, hooks: false, mcp: false },
508
+ failed: FAILED_REAPPLY
509
+ };
510
+ var reapplyOpenClawPlugin = async () => OPENCLAW_REFRESH_RESULTS[await refreshOpenClawPlugin({ files: openClawFilesNow() })];
501
511
  var noInstructionBlock = () => null;
502
512
  var reapplyAllAgents = async (apiKey, options = {}) => {
503
513
  const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
@@ -526,6 +536,7 @@ var reapplyAllAgents = async (apiKey, options = {}) => {
526
536
  { id: "fx", label: "fx", run: () => reapplyFxWiring(apiKey), instructions: fxInstructionTarget },
527
537
  { id: "cline", label: CLINE_LABEL, run: () => reapplyClineSettings(apiKey), instructions: clineInstructionTarget },
528
538
  { id: "hermes", label: "Hermes", run: reapplyHermesPlugin, instructions: noInstructionBlock },
539
+ { id: "openclaw", label: "OpenClaw", run: reapplyOpenClawPlugin, instructions: noInstructionBlock },
529
540
  ...HOOK_COMPATIBLE_PROFILES.map((profile) => ({
530
541
  id: profile.agentType,
531
542
  label: profile.label,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-RPXSGCRG.js";
3
+ } from "./chunk-GJV5RVUU.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -0,0 +1,72 @@
1
+ // src/key-revocation.ts
2
+ var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
3
+ var DEVICE_KEY_PATH = "/api/agent/device-key";
4
+ var FULL_ACCESS_ONLY_STATUS = 403;
5
+ var REVOKE_TIMEOUT_MS = 1e4;
6
+ var readRevokedCount = async (response) => {
7
+ try {
8
+ const body = await response.json();
9
+ const revoked = typeof body === "object" && body !== null && "revoked" in body ? body.revoked : void 0;
10
+ return typeof revoked === "number" && Number.isInteger(revoked) && revoked >= 0 ? revoked : null;
11
+ } catch {
12
+ return null;
13
+ }
14
+ };
15
+ var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
16
+ const response = await fetchImpl(`${baseUrl}${DEVICE_KEY_PATH}`, {
17
+ method: "DELETE",
18
+ headers: { Authorization: `Bearer ${apiKey}` },
19
+ signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
20
+ });
21
+ if (!response.ok) return { kind: "refused", status: response.status };
22
+ const revoked = await readRevokedCount(response);
23
+ if (revoked === null) return { kind: "unconfirmed", status: response.status };
24
+ return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
25
+ };
26
+ var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
27
+ try {
28
+ const response = await fetchImpl(`${baseUrl}${SELF_REVOKE_PATH}`, {
29
+ method: "POST",
30
+ headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
31
+ signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
32
+ });
33
+ if (response.status === 401) return { kind: "not_accepted" };
34
+ if (response.status === FULL_ACCESS_ONLY_STATUS) return await revokeAgentKey(apiKey, baseUrl, fetchImpl);
35
+ if (!response.ok) return { kind: "refused", status: response.status };
36
+ return { kind: "revoked" };
37
+ } catch (err) {
38
+ return { kind: "unreachable", detail: err instanceof Error ? err.message : "network error" };
39
+ }
40
+ };
41
+ var REVOKE_DETAIL = {
42
+ revoked: "Revoked the key on pushary.com.",
43
+ not_accepted: "pushary.com had already stopped accepting the key.",
44
+ refused: "pushary.com refused to revoke the key",
45
+ unconfirmed: "pushary.com did not confirm the key was revoked",
46
+ unreachable: "Could not reach pushary.com to revoke the key"
47
+ };
48
+ var describeRevokeAttempt = (attempt) => {
49
+ if (attempt.kind === "refused" || attempt.kind === "unconfirmed") return `${REVOKE_DETAIL[attempt.kind]} (HTTP ${attempt.status}).`;
50
+ if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
51
+ return REVOKE_DETAIL[attempt.kind];
52
+ };
53
+ var keyNoLongerAccepted = (attempt) => attempt.kind === "revoked" || attempt.kind === "not_accepted";
54
+ var keyValidityOf = (check) => {
55
+ switch (check.kind) {
56
+ case "ok":
57
+ case "locked":
58
+ return "valid";
59
+ case "rejected":
60
+ case "malformed":
61
+ return "invalid";
62
+ case "unreachable":
63
+ return "unknown";
64
+ }
65
+ };
66
+
67
+ export {
68
+ revokeOwnKey,
69
+ describeRevokeAttempt,
70
+ keyNoLongerAccepted,
71
+ keyValidityOf
72
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-RPXSGCRG.js";
3
+ } from "./chunk-GJV5RVUU.js";
4
4
  import {
5
5
  readRegularJsonFile,
6
6
  writeFileAtomic
@@ -13,7 +13,7 @@ import {
13
13
  serializeDeclinedAgents,
14
14
  withDeclinedAgent,
15
15
  withoutDeclinedAgent
16
- } from "./chunk-C5LIS3XM.js";
16
+ } from "./chunk-6JBX55K4.js";
17
17
 
18
18
  // src/declined-agents-file.ts
19
19
  import { join } from "path";
@@ -4,10 +4,10 @@ import {
4
4
  keyPrefix,
5
5
  readConfigFileKey,
6
6
  readMacAppKeyPrefix
7
- } from "./chunk-HIIXYZYV.js";
7
+ } from "./chunk-XQOBM3E6.js";
8
8
  import {
9
9
  NPX_LATEST_COMMAND
10
- } from "./chunk-R7FSMUHG.js";
10
+ } from "./chunk-JDIKCM2N.js";
11
11
 
12
12
  // src/key-signed-out.ts
13
13
  var VERDICT_BY_CHECK = {