@pushary/agent-hooks 1.9.66 → 1.9.68

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 (127) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/data/SKILL.md +1 -1
  3. package/data/cursor-plugin/skills/pushary/SKILL.md +1 -1
  4. package/data/vscode-plugin/skills/pushary/SKILL.md +1 -1
  5. package/dist/{api-GDSVUTI2.js → api-6Q7XIB67.js} +10 -10
  6. package/dist/bin/pushary-bell-hook.js +25 -25
  7. package/dist/bin/pushary-bell.js +10 -10
  8. package/dist/bin/pushary-claude.js +26 -26
  9. package/dist/bin/pushary-clean.js +73 -74
  10. package/dist/bin/pushary-codex-bridge.js +21 -21
  11. package/dist/bin/pushary-codex-hook.js +30 -30
  12. package/dist/bin/pushary-codex-session.js +8 -8
  13. package/dist/bin/pushary-codex.js +13 -13
  14. package/dist/bin/pushary-connect.js +28 -27
  15. package/dist/bin/pushary-cowork.js +5 -5
  16. package/dist/bin/pushary-daemon.js +40 -39
  17. package/dist/bin/pushary-disconnect.js +25 -25
  18. package/dist/bin/pushary-doctor.js +126 -72
  19. package/dist/bin/pushary-elicitation-hook.js +25 -25
  20. package/dist/bin/pushary-gemini-bridge.js +15 -15
  21. package/dist/bin/pushary-gemini-hook.js +27 -27
  22. package/dist/bin/pushary-hook.js +29 -29
  23. package/dist/bin/pushary-login.js +20 -19
  24. package/dist/bin/pushary-logout.js +26 -27
  25. package/dist/bin/pushary-mcp.js +11 -11
  26. package/dist/bin/pushary-mode.js +16 -15
  27. package/dist/bin/pushary-notification-hook.js +24 -24
  28. package/dist/bin/pushary-opencode-hook.js +26 -26
  29. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  30. package/dist/bin/pushary-permission-hook.js +29 -29
  31. package/dist/bin/pushary-post-hook.js +24 -24
  32. package/dist/bin/pushary-prompt-hook.js +24 -24
  33. package/dist/bin/pushary-session-end-hook.js +26 -26
  34. package/dist/bin/pushary-session-start-hook.js +34 -33
  35. package/dist/bin/pushary-setup.js +115 -98
  36. package/dist/bin/pushary-stats.js +5 -5
  37. package/dist/bin/pushary-status.js +37 -35
  38. package/dist/bin/pushary-stop-hook.js +24 -24
  39. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  40. package/dist/bin/pushary-suggestions.js +15 -14
  41. package/dist/bin/pushary-transcript-register.js +16 -16
  42. package/dist/bin/pushary-transcripts.js +18 -17
  43. package/dist/bin/pushary-upgrade.js +66 -38
  44. package/dist/bin/pushary-wait.js +26 -20
  45. package/dist/bin/pushary.js +7 -7
  46. package/dist/{chunk-ZJV7SFIJ.js → chunk-2HMKZYF5.js} +1 -1
  47. package/dist/{chunk-IA5VWIHV.js → chunk-2VYQG2HG.js} +2 -2
  48. package/dist/{chunk-A47UKPC7.js → chunk-32OSSYGZ.js} +1 -1
  49. package/dist/{chunk-DBUHSUL7.js → chunk-4TIN3T2A.js} +1 -1
  50. package/dist/{chunk-JL3SZJJP.js → chunk-53Q4LRBU.js} +2 -2
  51. package/dist/{chunk-HUGVJBDN.js → chunk-53RH3ZIK.js} +2 -2
  52. package/dist/{chunk-2BL6KWN7.js → chunk-6IFEYELN.js} +9 -9
  53. package/dist/{chunk-DKMVVBXO.js → chunk-6VFZVL65.js} +55 -13
  54. package/dist/{chunk-YQDCTID4.js → chunk-73DHP3JX.js} +4 -4
  55. package/dist/{chunk-G6VJZ3RB.js → chunk-77L2TNJW.js} +1 -1
  56. package/dist/{chunk-IQ3GKPFM.js → chunk-77QP22FL.js} +1 -1
  57. package/dist/{chunk-VURDLVAQ.js → chunk-7S7NTMDJ.js} +3 -3
  58. package/dist/{chunk-4APD2DPI.js → chunk-7SKGS7QN.js} +53 -3
  59. package/dist/chunk-7V63A4AI.js +25 -0
  60. package/dist/{chunk-6BGVSV2Q.js → chunk-7YJSDXLM.js} +1 -1
  61. package/dist/{chunk-MNNQEUQC.js → chunk-AJIT4SCL.js} +27 -8
  62. package/dist/{chunk-QR2QWGQI.js → chunk-BSMHSN3Y.js} +3 -3
  63. package/dist/{chunk-R7C2FS33.js → chunk-C4EDAHXI.js} +1 -1
  64. package/dist/{chunk-7LK3Y6ET.js → chunk-CB4U6WRP.js} +6 -6
  65. package/dist/chunk-D6W7QDQE.js +2298 -0
  66. package/dist/{chunk-V4EOFOB2.js → chunk-E5PEOVUJ.js} +6 -6
  67. package/dist/{chunk-32ZT2ATY.js → chunk-EOWHEZHD.js} +8 -8
  68. package/dist/{chunk-57NTMVMI.js → chunk-EUU5PDUI.js} +6 -6
  69. package/dist/{chunk-XXIJBYNW.js → chunk-GMHQYX3D.js} +1 -1
  70. package/dist/{chunk-V3YBVOTZ.js → chunk-I5FFSOCV.js} +2 -2
  71. package/dist/{chunk-RJ6JEHCP.js → chunk-JAKWPQ2L.js} +1 -1
  72. package/dist/{chunk-XDDSURY3.js → chunk-JPVV27O2.js} +3 -3
  73. package/dist/{chunk-GWYCKTXS.js → chunk-K4TSXWVX.js} +5 -5
  74. package/dist/chunk-LF2NSOAQ.js +299 -0
  75. package/dist/{chunk-6RJZSBPD.js → chunk-LGCVAE52.js} +1 -1
  76. package/dist/{chunk-GDLT32I4.js → chunk-LQAAOXYJ.js} +21 -13
  77. package/dist/{chunk-3ELJIG2R.js → chunk-MCNHNIRC.js} +3 -3
  78. package/dist/{chunk-XIJTXRWB.js → chunk-METUT7V4.js} +2 -2
  79. package/dist/{chunk-MDIGG3Q7.js → chunk-MFWHANKG.js} +3 -3
  80. package/dist/{chunk-GECU7V44.js → chunk-MHC34X5A.js} +3 -3
  81. package/dist/{chunk-376TUN72.js → chunk-MMTA7UKA.js} +3 -3
  82. package/dist/{chunk-XGFFNERF.js → chunk-MUDUWF74.js} +1 -1
  83. package/dist/{chunk-KS3O6O7E.js → chunk-NAQCWM4U.js} +3 -3
  84. package/dist/{chunk-TQNFDNJA.js → chunk-NKPSJOHJ.js} +6 -6
  85. package/dist/{chunk-DPU6H4JY.js → chunk-NLDEC4Y7.js} +3 -3
  86. package/dist/{chunk-XEXF2OFZ.js → chunk-NWN6GGJL.js} +2 -2
  87. package/dist/{chunk-IGO3AGZK.js → chunk-O655YCOG.js} +4 -4
  88. package/dist/{chunk-5FJDODOA.js → chunk-ODAAK2RZ.js} +3 -3
  89. package/dist/{chunk-AVWECJSN.js → chunk-ORHVVRVL.js} +2 -2
  90. package/dist/{chunk-YB3HMDKE.js → chunk-P4XZX7CL.js} +2 -2
  91. package/dist/{chunk-CNJ7SI5V.js → chunk-PBEW5CJK.js} +4 -4
  92. package/dist/{chunk-CN6JFM62.js → chunk-PEPRUUGM.js} +15 -6
  93. package/dist/{chunk-QN25WBXL.js → chunk-PGOPIIOQ.js} +7 -7
  94. package/dist/{chunk-Q5RNYE2L.js → chunk-PZZKXX6Q.js} +4 -4
  95. package/dist/{chunk-SVKCYUYP.js → chunk-Q6JXE3PD.js} +9 -9
  96. package/dist/{chunk-ZAZUDYSF.js → chunk-QYTOYNV2.js} +5 -5
  97. package/dist/{chunk-3FQX74E4.js → chunk-REQO3WWO.js} +23 -8
  98. package/dist/{chunk-EJR5JXMV.js → chunk-RQOT6QL3.js} +43 -5
  99. package/dist/{chunk-AWGBL4P3.js → chunk-RWXDWOQQ.js} +89 -41
  100. package/dist/{chunk-6ZXCWK27.js → chunk-SL7CIZCL.js} +60 -6
  101. package/dist/{chunk-3EZP5ZPS.js → chunk-TVVJ6OYG.js} +4 -4
  102. package/dist/{chunk-B6JC676X.js → chunk-UC2J5RR4.js} +1 -1
  103. package/dist/{chunk-26W46E46.js → chunk-UETS2WEA.js} +27 -10
  104. package/dist/{chunk-EU2ZOZC3.js → chunk-UXN73YAE.js} +3 -3
  105. package/dist/{chunk-XFQAK35L.js → chunk-VHMZPN3N.js} +1 -1
  106. package/dist/{chunk-45KMS76L.js → chunk-VKZ3RJ5U.js} +1 -1
  107. package/dist/{chunk-T6YLXO6N.js → chunk-VRFFMTIG.js} +4 -4
  108. package/dist/{chunk-DIUTSF6I.js → chunk-WPOXZPEH.js} +4 -4
  109. package/dist/{chunk-GO7YKPT3.js → chunk-X2MTVD4W.js} +1 -1
  110. package/dist/{chunk-5J7OZBJ4.js → chunk-XQKB4LEK.js} +2 -2
  111. package/dist/{chunk-QOIPUYUD.js → chunk-XZKSUJ55.js} +1 -1
  112. package/dist/{chunk-RSZQEEEW.js → chunk-YZHJQG6W.js} +8 -6
  113. package/dist/{chunk-UTAARXYQ.js → chunk-ZK5WYAMI.js} +1 -1
  114. package/dist/{codex-app-cards-switch-W7OLKOMO.js → codex-app-cards-switch-VZ4XIDJO.js} +11 -11
  115. package/dist/{codex-desktop-launch-U6V3AXZF.js → codex-desktop-launch-CX2IE5BI.js} +1 -1
  116. package/dist/{codex-session-launch-EFU46WBL.js → codex-session-launch-WUIM6ZGA.js} +18 -18
  117. package/dist/{config-UC4LMCNX.js → config-OBGYURFX.js} +3 -3
  118. package/dist/{global-upgrade-ABF5O3HU.js → global-upgrade-XZ5L7LDB.js} +10 -10
  119. package/dist/{identity-3ZUZPHN6.js → identity-TGQPFIE4.js} +4 -4
  120. package/dist/{live-capabilities-BXWXJARK.js → live-capabilities-JHESROAP.js} +5 -5
  121. package/dist/{paths-FO76CFRQ.js → paths-EOMNC4QM.js} +7 -3
  122. package/dist/{reapply-3T3DFUAI.js → reapply-J5HHUUBE.js} +27 -26
  123. package/dist/src/index.js +28 -28
  124. package/dist/{upgrade-lock-EZ5JIPJE.js → upgrade-lock-VQORI6G5.js} +4 -4
  125. package/dist/{usage-Y6BL7RUD.js → usage-KX2HN47E.js} +3 -3
  126. package/package.json +1 -1
  127. package/dist/chunk-QBNICXMC.js +0 -615
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeJsonAtomicDurable
3
- } from "./chunk-KS3O6O7E.js";
3
+ } from "./chunk-NAQCWM4U.js";
4
4
 
5
5
  // src/transcript-recipient-pin.ts
6
6
  import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
@@ -7,10 +7,10 @@ import {
7
7
  codexHome,
8
8
  codexHooksJsonIn,
9
9
  isPusharyCodexCommand
10
- } from "./chunk-GDLT32I4.js";
10
+ } from "./chunk-LQAAOXYJ.js";
11
11
  import {
12
12
  resolvePathBinary
13
- } from "./chunk-KS3O6O7E.js";
13
+ } from "./chunk-NAQCWM4U.js";
14
14
  import {
15
15
  getPackageVersion
16
16
  } from "./chunk-QTOLNRET.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-Q5RNYE2L.js";
3
+ } from "./chunk-PZZKXX6Q.js";
4
4
  import {
5
5
  NPX_LATEST_COMMAND
6
- } from "./chunk-GO7YKPT3.js";
6
+ } from "./chunk-X2MTVD4W.js";
7
7
 
8
8
  // src/mcp-stdio-bridge.ts
9
9
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  repoKeyFor
3
- } from "./chunk-XXIJBYNW.js";
3
+ } from "./chunk-GMHQYX3D.js";
4
4
  import {
5
5
  cancelQuestion,
6
6
  clientErrorKindOf,
@@ -8,29 +8,29 @@ import {
8
8
  reportClientError,
9
9
  sendNotification,
10
10
  waitForAnswer
11
- } from "./chunk-ZAZUDYSF.js";
11
+ } from "./chunk-QYTOYNV2.js";
12
12
  import {
13
13
  withRetry
14
- } from "./chunk-Q5RNYE2L.js";
14
+ } from "./chunk-PZZKXX6Q.js";
15
15
  import {
16
16
  getMachineId
17
- } from "./chunk-IA5VWIHV.js";
17
+ } from "./chunk-2VYQG2HG.js";
18
18
  import {
19
19
  reportedInstallSource
20
- } from "./chunk-XIJTXRWB.js";
20
+ } from "./chunk-METUT7V4.js";
21
21
  import {
22
22
  IDLE_PROMPT_NOTIFICATION,
23
23
  NOTIFICATION_PUSH_TYPES,
24
24
  POSTTOOLUSE_MIRROR_ONLY_TOOLS,
25
25
  canonicalJson
26
- } from "./chunk-GDLT32I4.js";
26
+ } from "./chunk-LQAAOXYJ.js";
27
27
  import {
28
28
  writeFileAtomic
29
- } from "./chunk-KS3O6O7E.js";
29
+ } from "./chunk-NAQCWM4U.js";
30
30
  import {
31
31
  getApiKey,
32
32
  getBaseUrl
33
- } from "./chunk-A47UKPC7.js";
33
+ } from "./chunk-32OSSYGZ.js";
34
34
  import {
35
35
  ACTION_BODY_MAX,
36
36
  AGENTS,
@@ -65,7 +65,7 @@ import {
65
65
  toToolLookup,
66
66
  truncateLine,
67
67
  unansweredRefusalReason
68
- } from "./chunk-EJR5JXMV.js";
68
+ } from "./chunk-RQOT6QL3.js";
69
69
 
70
70
  // ../hook-mapping/src/describe.ts
71
71
  import { isAbsolute, relative, resolve } from "path";
@@ -1,13 +1,23 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-JL3SZJJP.js";
3
+ } from "./chunk-53Q4LRBU.js";
4
+ import {
5
+ hermesReceiptPaths,
6
+ hermesSetupPredatesThePluginFolder,
7
+ installHermesPlugin,
8
+ refreshHermesPluginFiles,
9
+ shippedHermesPlugin
10
+ } from "./chunk-D6W7QDQE.js";
4
11
  import {
5
12
  fxIgnoresInstructionsFile,
6
13
  fxInstructionsBody,
7
14
  fxServerHolder,
15
+ inspectFxPusharyHttpWiring,
16
+ installedCliFxBridgeEntry,
8
17
  macAppFxBridge,
9
- refreshClineKey
10
- } from "./chunk-6ZXCWK27.js";
18
+ refreshClineKey,
19
+ switchFxHttpEntryToBridge
20
+ } from "./chunk-SL7CIZCL.js";
11
21
  import {
12
22
  OPENCODE_HOOK_BINARY,
13
23
  agentHookOwner,
@@ -19,16 +29,16 @@ import {
19
29
  openCodePluginDir,
20
30
  openCodeWired,
21
31
  withOpenCodeAskRules
22
- } from "./chunk-7LK3Y6ET.js";
32
+ } from "./chunk-CB4U6WRP.js";
23
33
  import {
24
34
  detectClaudeVersion
25
- } from "./chunk-MDIGG3Q7.js";
35
+ } from "./chunk-MFWHANKG.js";
26
36
  import {
27
37
  addCompatibleHooks,
28
38
  compatibleConfigFile,
29
39
  compatibleInstructionsFile,
30
40
  hasCompatibleHooks
31
- } from "./chunk-3EZP5ZPS.js";
41
+ } from "./chunk-TVVJ6OYG.js";
32
42
  import {
33
43
  GEMINI_HOOK_BINARY,
34
44
  addGeminiHooks,
@@ -40,7 +50,7 @@ import {
40
50
  geminiWired,
41
51
  hasGeminiHooks,
42
52
  planHooks
43
- } from "./chunk-YQDCTID4.js";
53
+ } from "./chunk-73DHP3JX.js";
44
54
  import {
45
55
  CLAUDE_HOOK_BINARY,
46
56
  CLAUDE_HOOK_EVENTS,
@@ -85,7 +95,7 @@ import {
85
95
  renderAgentInstructions,
86
96
  supportedClaudeEvents,
87
97
  vscodePluginMcp
88
- } from "./chunk-GDLT32I4.js";
98
+ } from "./chunk-LQAAOXYJ.js";
89
99
  import {
90
100
  formatVersion,
91
101
  readJsonSafe,
@@ -93,12 +103,12 @@ import {
93
103
  resolveGlobalBinary,
94
104
  writeFileAtomic,
95
105
  writeJsonAtomic
96
- } from "./chunk-KS3O6O7E.js";
106
+ } from "./chunk-NAQCWM4U.js";
97
107
  import {
98
108
  HOOK_COMPATIBLE_PROFILES,
99
109
  isCompatibleAgentType,
100
110
  isRecord
101
- } from "./chunk-EJR5JXMV.js";
111
+ } from "./chunk-RQOT6QL3.js";
102
112
 
103
113
  // src/reapply.ts
104
114
  import { dirname, join } from "path";
@@ -395,7 +405,18 @@ var reapplyCompatibleHooks = (profile, paths = {}) => {
395
405
  };
396
406
  var CONFIGURED_AND_UNCHANGED = { configured: true, reapplied: false, hooks: false, mcp: false };
397
407
  var fxHolder = () => fxServerHolder(fxMcpProfile(), macAppFxBridge(pusharyDir()));
398
- var inspectFxWiring = () => fxHolder() === "cli" ? CONFIGURED_AND_UNCHANGED : NOT_CONFIGURED;
408
+ var FX_SWITCHED_TO_BRIDGE = { configured: true, reapplied: true, hooks: false, mcp: false, fxBridge: true };
409
+ var FX_SWITCH_RESULTS = {
410
+ switched: FX_SWITCHED_TO_BRIDGE,
411
+ "not-http": NOT_CONFIGURED,
412
+ failed: CONFIGURED_BUT_FAILED
413
+ };
414
+ var reapplyFxWiring = (apiKey) => {
415
+ if (fxHolder() === "cli") return CONFIGURED_AND_UNCHANGED;
416
+ if (!apiKey || !inspectFxPusharyHttpWiring(fxMcpProfile()).pusharyOverHttp) return NOT_CONFIGURED;
417
+ const bridgeEntry = installedCliFxBridgeEntry();
418
+ return bridgeEntry ? FX_SWITCH_RESULTS[switchFxHttpEntryToBridge(fxMcpProfile(), bridgeEntry)] : NOT_CONFIGURED;
419
+ };
399
420
  var REFRESHED_MCP = { configured: true, reapplied: true, hooks: false, mcp: true };
400
421
  var CLINE_REAPPLY_RESULTS = {
401
422
  refreshed: REFRESHED_MCP,
@@ -428,7 +449,8 @@ var SETUP_CHOICE_BY_REAPPLY_ID = {
428
449
  vscode: "vscode",
429
450
  opencode: "opencode",
430
451
  fx: "fx",
431
- cline: "cline"
452
+ cline: "cline",
453
+ hermes: "hermes"
432
454
  };
433
455
  var setupChoiceOf = (id) => isCompatibleAgentType(id) ? id : SETUP_CHOICE_BY_REAPPLY_ID[id];
434
456
  var reapplyHookOwner = (id, appAvailable) => agentHookOwner(setupChoiceOf(id), appAvailable);
@@ -437,6 +459,25 @@ var fxHeldByApp = (appAvailable) => appAvailable && fxHolder() === "app";
437
459
  var reapplyHolder = (id, appAvailable) => (id === "fx" ? fxHeldByApp(appAvailable) : hooksHeldByApp(id, appAvailable)) ? "app" : "cli";
438
460
  var KEPT_FOR_APP = { configured: true, reapplied: false, hooks: false, mcp: false };
439
461
  var FAILED_REAPPLY = { configured: false, reapplied: false, hooks: false, mcp: false, failed: true };
462
+ var HERMES_PLUGIN_WRITTEN = { configured: true, reapplied: true, hooks: false, mcp: false, pluginFiles: true, hermesRestartRequired: true };
463
+ var HERMES_REFRESH_RESULTS = {
464
+ refreshed: HERMES_PLUGIN_WRITTEN,
465
+ current: { configured: true, reapplied: false, hooks: false, mcp: false },
466
+ not_ours: { configured: false, reapplied: false, hooks: false, mcp: false },
467
+ failed: FAILED_REAPPLY
468
+ };
469
+ var HERMES_MIGRATION_RESULTS = {
470
+ installed: HERMES_PLUGIN_WRITTEN,
471
+ no_launcher: { configured: false, reapplied: false, hooks: false, mcp: false },
472
+ failed: FAILED_REAPPLY
473
+ };
474
+ var reapplyHermesPlugin = () => {
475
+ const plugin = shippedHermesPlugin();
476
+ if (hermesSetupPredatesThePluginFolder()) {
477
+ return HERMES_MIGRATION_RESULTS[installHermesPlugin({ installedBy: "cli", plugin, receipts: hermesReceiptPaths() }).kind];
478
+ }
479
+ return HERMES_REFRESH_RESULTS[refreshHermesPluginFiles("cli", plugin)];
480
+ };
440
481
  var noInstructionBlock = () => null;
441
482
  var reapplyAllAgents = (apiKey, options = {}) => {
442
483
  const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
@@ -462,8 +503,9 @@ var reapplyAllAgents = (apiKey, options = {}) => {
462
503
  run: () => reapplyOpenCodePlugin(),
463
504
  instructions: () => ({ file: openCodeInstructionsFile(), body: renderAgentInstructions(OPENCODE_INSTRUCTIONS_LABEL) })
464
505
  },
465
- { id: "fx", label: "fx", run: inspectFxWiring, instructions: fxInstructionTarget },
506
+ { id: "fx", label: "fx", run: () => reapplyFxWiring(apiKey), instructions: fxInstructionTarget },
466
507
  { id: "cline", label: CLINE_LABEL, run: () => reapplyClineSettings(apiKey), instructions: clineInstructionTarget },
508
+ { id: "hermes", label: "Hermes", run: reapplyHermesPlugin, instructions: noInstructionBlock },
467
509
  ...HOOK_COMPATIBLE_PROFILES.map((profile) => ({
468
510
  id: profile.agentType,
469
511
  label: profile.label,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AGENT_CHOICES
3
- } from "./chunk-UTAARXYQ.js";
3
+ } from "./chunk-ZK5WYAMI.js";
4
4
  import {
5
5
  BELL_HOOK_BINARY
6
- } from "./chunk-IQ3GKPFM.js";
6
+ } from "./chunk-77QP22FL.js";
7
7
  import {
8
8
  CLAUDE_HOOK_EVENTS,
9
9
  CODEX_HOOK_EVENTS,
@@ -12,13 +12,13 @@ import {
12
12
  holdBudgetOf,
13
13
  isProtectedByScope,
14
14
  registerHookEntry
15
- } from "./chunk-GDLT32I4.js";
15
+ } from "./chunk-LQAAOXYJ.js";
16
16
  import {
17
17
  CURSOR_GATE_EVENTS,
18
18
  HOOK_BUDGETS,
19
19
  HOOK_LOCATOR_BINARY,
20
20
  hookCommandHoldBudget
21
- } from "./chunk-EJR5JXMV.js";
21
+ } from "./chunk-RQOT6QL3.js";
22
22
 
23
23
  // src/diagnostics/bridge.ts
24
24
  import { execFileSync } from "child_process";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KZERVKTD.js";
4
4
  import {
5
5
  renderCommandHelp
6
- } from "./chunk-GO7YKPT3.js";
6
+ } from "./chunk-X2MTVD4W.js";
7
7
  import {
8
8
  getPackageVersion
9
9
  } from "./chunk-QTOLNRET.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-GDLT32I4.js";
3
+ } from "./chunk-LQAAOXYJ.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-GDLT32I4.js";
6
+ } from "./chunk-LQAAOXYJ.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
10
- } from "./chunk-KS3O6O7E.js";
10
+ } from "./chunk-NAQCWM4U.js";
11
11
  import {
12
12
  CLI_PACKAGE_NAMES,
13
13
  POSIX_GLOBAL_ROOT_SEGMENTS,
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-QTOLNRET.js";
18
18
  import {
19
19
  isAutoUpdateResult
20
- } from "./chunk-EJR5JXMV.js";
20
+ } from "./chunk-RQOT6QL3.js";
21
21
 
22
22
  // src/auto-update.ts
23
23
  import { spawn } from "child_process";
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  CODEX_HOOK_STATUS
3
- } from "./chunk-JL3SZJJP.js";
3
+ } from "./chunk-53Q4LRBU.js";
4
+ import {
5
+ retryAgentCommand
6
+ } from "./chunk-ODAAK2RZ.js";
4
7
  import {
5
8
  NPX_LATEST_COMMAND
6
- } from "./chunk-GO7YKPT3.js";
9
+ } from "./chunk-X2MTVD4W.js";
7
10
 
8
11
  // src/setup/codex-trust.ts
9
12
  var CODEX_TRUST_TELEMETRY = {
@@ -61,9 +64,56 @@ var describeCodexTrustConfirmation = (confirmation) => {
61
64
  }
62
65
  };
63
66
 
67
+ // src/hermes/messages.ts
68
+ var HERMES_RESTART_COMMAND = "hermes gateway restart";
69
+ var HERMES_MAC_APP_REPAIR = "open Pushary on this Mac and connect Hermes again";
70
+ var describeHermesInstallFailure = (reason, pluginDirectory, receiptPath) => {
71
+ switch (reason) {
72
+ case "home_unknown":
73
+ return "Hermes did not say where its settings live. Check that `hermes config path` works, then run setup again.";
74
+ case "receipt_invalid":
75
+ return `${receiptPath} is unreadable, so setup cannot record what it changes. Move it aside, then run setup again.`;
76
+ case "settings_unreadable":
77
+ return "Hermes would not report its settings through `hermes config get`. Run `hermes update`, then run setup again.";
78
+ case "plugin_folder_not_ours":
79
+ return `${pluginDirectory} holds a pushary plugin that Pushary did not install. Remove that folder, then run setup again.`;
80
+ case "plugin_write_failed":
81
+ return `Could not write the Pushary plugin to ${pluginDirectory}.`;
82
+ case "settings_failed":
83
+ return "The plugin is in place, but Hermes refused a settings change. Run `hermes plugins enable pushary`, then run setup again.";
84
+ }
85
+ };
86
+ var PROBLEM_DESCRIPTIONS = {
87
+ plugin_missing: "the Pushary plugin folder is missing",
88
+ plugin_not_enabled: "pushary is not in plugins.enabled",
89
+ plugin_disabled: "pushary is in plugins.disabled"
90
+ };
91
+ var describeHermesProblems = (problems) => problems.map((problem) => PROBLEM_DESCRIPTIONS[problem]).join(", ");
92
+ var hermesRepairStep = (installer) => installer === "mac_app" ? HERMES_MAC_APP_REPAIR : `run ${retryAgentCommand("hermes")}`;
93
+ var describeHermesState = (state) => {
94
+ switch (state.kind) {
95
+ case "not_wired":
96
+ return "Pushary is not set up for Hermes";
97
+ case "needs_repair":
98
+ return `Hermes needs repair: ${describeHermesProblems(state.problems)}`;
99
+ case "restart_needed":
100
+ return `Restart Hermes to load Pushary ${state.installedVersion ?? ""}`.trim();
101
+ case "connected":
102
+ if (!state.live) {
103
+ return state.gatewayRunning ? "Hermes is running, and this plugin copy does not report whether it loaded" : "Hermes loads Pushary the next time it starts";
104
+ }
105
+ 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"}`;
106
+ }
107
+ };
108
+
64
109
  export {
65
110
  codexTrustOutcome,
66
111
  CODEX_HOOK_REMEDY,
67
112
  needsCodexTrustStep,
68
- describeCodexTrustConfirmation
113
+ describeCodexTrustConfirmation,
114
+ HERMES_RESTART_COMMAND,
115
+ describeHermesInstallFailure,
116
+ describeHermesProblems,
117
+ hermesRepairStep,
118
+ describeHermesState
69
119
  };
@@ -0,0 +1,25 @@
1
+ import {
2
+ absoluteUrl
3
+ } from "./chunk-BSMHSN3Y.js";
4
+ import {
5
+ KEY_SCOPE
6
+ } from "./chunk-RQOT6QL3.js";
7
+
8
+ // src/cli/approval-settings-pages.ts
9
+ var API_KEYS_PATH = "/dashboard/agent/settings";
10
+ var APPROVAL_RULES_PATH = "/dashboard/agent/policies";
11
+ var PUSH_WINDOW_COMMAND = "pushary wait <seconds>";
12
+ var PUSH_WINDOW_RESET_COMMAND = "pushary wait clear";
13
+ var keyScopeOf = (check) => check?.kind === "ok" ? check.identity.keyScope : null;
14
+ var canChangeApprovalSettings = (keyScope) => keyScope === KEY_SCOPE.full_access;
15
+ var pushWindowChangeStep = (keyScope, baseUrl) => canChangeApprovalSettings(keyScope) ? PUSH_WINDOW_COMMAND : absoluteUrl(baseUrl, APPROVAL_RULES_PATH);
16
+
17
+ export {
18
+ API_KEYS_PATH,
19
+ APPROVAL_RULES_PATH,
20
+ PUSH_WINDOW_COMMAND,
21
+ PUSH_WINDOW_RESET_COMMAND,
22
+ keyScopeOf,
23
+ canChangeApprovalSettings,
24
+ pushWindowChangeStep
25
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-EJR5JXMV.js";
3
+ } from "./chunk-RQOT6QL3.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -1,13 +1,24 @@
1
+ import {
2
+ APPROVAL_RULES_PATH,
3
+ canChangeApprovalSettings
4
+ } from "./chunk-7V63A4AI.js";
1
5
  import {
2
6
  callMcpTool
3
- } from "./chunk-Q5RNYE2L.js";
7
+ } from "./chunk-PZZKXX6Q.js";
8
+ import {
9
+ absoluteUrl
10
+ } from "./chunk-BSMHSN3Y.js";
11
+ import {
12
+ getBaseUrl
13
+ } from "./chunk-32OSSYGZ.js";
4
14
  import {
5
15
  NPX_LATEST_COMMAND
6
- } from "./chunk-GO7YKPT3.js";
16
+ } from "./chunk-X2MTVD4W.js";
7
17
  import {
18
+ APPROVAL_MODE_META,
8
19
  classifyConfirmResponse,
9
20
  isAnswerSource
10
- } from "./chunk-EJR5JXMV.js";
21
+ } from "./chunk-RQOT6QL3.js";
11
22
 
12
23
  // src/reach.ts
13
24
  var reachVerdict = (channels) => {
@@ -304,7 +315,15 @@ var unansweredNextStep = (appPlatforms) => {
304
315
  const step = notificationAnswerStep(appPlatforms);
305
316
  return step === null ? CHECK_THE_NOTIFICATION_OPENED : `To send another one, run pushary doctor --roundtrip. ${step}`;
306
317
  };
307
- var describeRoundTripOutcome = (outcome, appPlatforms = []) => {
318
+ var PHONE_APPROVAL_MODES = ["push_only", "push_first"];
319
+ var NOTIFY_ONLY_SENT = `Sent. This site is set to ${APPROVAL_MODE_META.notify_only.label}, so questions never wait for an answer.`;
320
+ var phoneApprovalModeLabels = PHONE_APPROVAL_MODES.map((mode) => APPROVAL_MODE_META[mode].label).join(" or ");
321
+ var phoneApprovalModeCommands = PHONE_APPROVAL_MODES.map((mode) => `pushary mode ${mode}`).join(" or ");
322
+ var answerFromYourPhoneSteps = (baseUrl, keyScope) => {
323
+ const inTheAppOrDashboard = `To answer approvals from your phone, choose ${phoneApprovalModeLabels} in the Pushary app, or on the dashboard: ${absoluteUrl(baseUrl, APPROVAL_RULES_PATH)}`;
324
+ return canChangeApprovalSettings(keyScope) ? [inTheAppOrDashboard, `With this key you can also run ${phoneApprovalModeCommands}.`] : [inTheAppOrDashboard];
325
+ };
326
+ var describeRoundTripOutcome = (outcome, { appPlatforms = [], baseUrl = getBaseUrl(), keyScope = null } = {}) => {
308
327
  switch (outcome.kind) {
309
328
  case "answered":
310
329
  return {
@@ -324,8 +343,8 @@ var describeRoundTripOutcome = (outcome, appPlatforms = []) => {
324
343
  case "notify-only":
325
344
  return {
326
345
  ok: true,
327
- message: "Sent. This site is in notify-only mode, so questions never wait for an answer.",
328
- next: ["Switch with pushary mode push_first if you want approvals to hold for your phone."]
346
+ message: NOTIFY_ONLY_SENT,
347
+ next: [...answerFromYourPhoneSteps(baseUrl, keyScope)]
329
348
  };
330
349
  case "no-recipients":
331
350
  return {
@@ -344,8 +363,8 @@ var describeRoundTripOutcome = (outcome, appPlatforms = []) => {
344
363
  };
345
364
  }
346
365
  };
347
- var describeRoundTrip = (outcome, appPlatforms = []) => {
348
- const report = describeRoundTripOutcome(outcome, appPlatforms);
366
+ var describeRoundTrip = (outcome, context = {}) => {
367
+ const report = describeRoundTripOutcome(outcome, context);
349
368
  return { ...report, next: [...report.next, "Agent hook activation remains unverified. Restart your agent and check one real approval."] };
350
369
  };
351
370
  var roundTripEvidence = (outcome) => ({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyFetch
3
- } from "./chunk-GECU7V44.js";
3
+ } from "./chunk-MHC34X5A.js";
4
4
  import {
5
5
  NetworkError
6
6
  } from "./chunk-PPY5N2E6.js";
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-KZERVKTD.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-A47UKPC7.js";
12
+ } from "./chunk-32OSSYGZ.js";
13
13
  import {
14
14
  isValidApiKey,
15
15
  normalizeKeyScope
16
- } from "./chunk-EJR5JXMV.js";
16
+ } from "./chunk-RQOT6QL3.js";
17
17
 
18
18
  // src/session.ts
19
19
  var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-3EGEA4KH.js";
10
10
  import {
11
11
  getBaseUrl
12
- } from "./chunk-A47UKPC7.js";
12
+ } from "./chunk-32OSSYGZ.js";
13
13
 
14
14
  // src/cli/login-ui.ts
15
15
  import { hostname } from "os";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-3EZP5ZPS.js";
3
+ } from "./chunk-TVVJ6OYG.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands,
7
7
  liveBridgeProbe,
8
8
  resolveBridgeStub
9
- } from "./chunk-YQDCTID4.js";
9
+ } from "./chunk-73DHP3JX.js";
10
10
  import {
11
11
  AGENT_CHOICES
12
- } from "./chunk-UTAARXYQ.js";
12
+ } from "./chunk-ZK5WYAMI.js";
13
13
  import {
14
14
  claudeSettings,
15
15
  codexHooksJson,
@@ -18,10 +18,10 @@ import {
18
18
  guardedArgv,
19
19
  pusharyDir,
20
20
  vscodePluginDir
21
- } from "./chunk-GDLT32I4.js";
21
+ } from "./chunk-LQAAOXYJ.js";
22
22
  import {
23
23
  readJsonSafe
24
- } from "./chunk-KS3O6O7E.js";
24
+ } from "./chunk-NAQCWM4U.js";
25
25
  import {
26
26
  HOOK_BUDGETS,
27
27
  HOOK_COMPATIBLE_PROFILES,
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-EJR5JXMV.js";
32
+ } from "./chunk-RQOT6QL3.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";