very-happy-cli 0.2.165 → 0.2.166

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 (190) hide show
  1. package/README.md +1 -1
  2. package/dist/{AcpBackend-DCfNt9bD.cjs → AcpBackend-20VHOXwb.cjs} +3 -3
  3. package/dist/{AcpBackend-C11FnVw5.mjs → AcpBackend-tRWk7yi7.mjs} +3 -3
  4. package/dist/{AcpSessionManager-BQnDJvct.mjs → AcpSessionManager-B7FIrsys.mjs} +1 -1
  5. package/dist/{AcpSessionManager-9yN2iH4b.cjs → AcpSessionManager-Zf00QnlL.cjs} +1 -1
  6. package/dist/{BasePermissionHandler-CwJ48yiB.mjs → BasePermissionHandler-CDCLIrZJ.mjs} +1 -1
  7. package/dist/{BasePermissionHandler-BwQHxl6M.cjs → BasePermissionHandler-COKc4pmt.cjs} +1 -1
  8. package/dist/{BaseReasoningProcessor-ClF2g1qz.mjs → BaseReasoningProcessor-BDVKvooR.mjs} +1 -1
  9. package/dist/{BaseReasoningProcessor-81lf_M8G.cjs → BaseReasoningProcessor-DAGQdkNp.cjs} +1 -1
  10. package/dist/{agentGuidance-CQuNlNx8.mjs → agentGuidance-BDYt2Qy2.mjs} +4 -2
  11. package/dist/{agentGuidance-B5NATuFa.cjs → agentGuidance-BtBx2xxE.cjs} +4 -1
  12. package/dist/{agentHome-DvR176E5.mjs → agentHome-2IbIjKCa.mjs} +4 -4
  13. package/dist/{agentHome-D3Nn82kI.cjs → agentHome-KVWj6nCl.cjs} +4 -4
  14. package/dist/{api-DTVPUE7g.mjs → api-Cmz3XS4P.mjs} +14 -12
  15. package/dist/{api-AzdzTKFs.cjs → api-DnNL5fLw.cjs} +14 -12
  16. package/dist/{apiMachine-BQ-b4Lu3.mjs → apiMachine-B6ySCFe0.mjs} +2137 -65
  17. package/dist/{apiMachine-B_cJldfa.cjs → apiMachine-DeoQ8QbZ.cjs} +2134 -62
  18. package/dist/{attachmentContent-dzIs-wis.mjs → attachmentContent-CTXapi-_.mjs} +2 -2
  19. package/dist/{attachmentContent-muDCe4Gy.cjs → attachmentContent-DPWxHgX4.cjs} +2 -2
  20. package/dist/{attachmentLimits-eJZ4ZBjF.cjs → attachmentLimits-BfgKV5iE.cjs} +28 -2
  21. package/dist/{attachmentLimits-B8nzhw-i.mjs → attachmentLimits-C1PCCM79.mjs} +28 -2
  22. package/dist/{auth-Jtmvh1w4.mjs → auth-BMaBjRAj.mjs} +8 -8
  23. package/dist/{auth-DtP-B4gf.cjs → auth-D4-eQz85.cjs} +8 -8
  24. package/dist/{auth-CfLd3phE.cjs → auth-ietHtvwu.cjs} +5 -5
  25. package/dist/{auth-BY5ujhGn.mjs → auth-pzWIFdOD.mjs} +5 -5
  26. package/dist/{auto-DjWfR1UB.mjs → auto-DL75Dx3I.mjs} +83 -21
  27. package/dist/{auto-ClNnbSoF.cjs → auto-DOWTQDPa.cjs} +84 -20
  28. package/dist/{bootstrap-B1dMZA-u.cjs → bootstrap-BpXIc2wn.cjs} +2 -2
  29. package/dist/{bootstrap-D_ExGrY2.mjs → bootstrap-XE8A7Ut2.mjs} +2 -2
  30. package/dist/{browser-_gV7tcPs.cjs → browser-CcG8GLRV.cjs} +1 -1
  31. package/dist/{browser-mwzpOmcw.mjs → browser-DDFi1T8C.mjs} +1 -1
  32. package/dist/{claudeLocal-G5UmJ81F.cjs → claudeLocal-DXBXwIOG.cjs} +6 -6
  33. package/dist/{claudeLocal-BeHToEK5.mjs → claudeLocal-DmM5Oyhv.mjs} +6 -6
  34. package/dist/{claudeLocalLauncher-B4y2BsmO.cjs → claudeLocalLauncher-C41Y6Kp4.cjs} +14 -11
  35. package/dist/{claudeLocalLauncher-Cq6bqAT4.mjs → claudeLocalLauncher-Cs4eUC3P.mjs} +14 -11
  36. package/dist/{claudeSessionFork-CokUhS4r.mjs → claudeSessionFork-BdLnc2Hv.mjs} +1 -1
  37. package/dist/{claudeSessionFork-CDJq_b9r.cjs → claudeSessionFork-Cs0I3eGI.cjs} +1 -1
  38. package/dist/{client-BwaWdlCm.mjs → client-CbK33y_s.mjs} +3 -3
  39. package/dist/{client-uN9d6Git.cjs → client-DJ0kX_8M.cjs} +2 -2
  40. package/dist/{client-CJZKBZCE.mjs → client-GjTnsq6F.mjs} +2 -2
  41. package/dist/{client-Do7cGPEq.cjs → client-JISJx2f-.cjs} +3 -3
  42. package/dist/codex/happyMcpStdioBridge.cjs +23 -18
  43. package/dist/codex/happyMcpStdioBridge.mjs +22 -17
  44. package/dist/{codexAppServerClient-BuSdeUxT.cjs → codexAppServerClient-BTjn2ZCZ.cjs} +46 -2
  45. package/dist/{codexAppServerClient-B0QaMQsC.mjs → codexAppServerClient-CldXEojt.mjs} +47 -3
  46. package/dist/{codexCommand-YdYmykAR.cjs → codexCommand-BpD0N1F7.cjs} +71 -51
  47. package/dist/{codexCommand-C3gdjMAw.mjs → codexCommand-DjMU-Ijf.mjs} +71 -51
  48. package/dist/{config-CGCIFRCN.mjs → config-DjSJKatx.mjs} +3 -3
  49. package/dist/{config-ChoHFnfO.cjs → config-DuLL0Ppe.cjs} +3 -3
  50. package/dist/{configuration-BE61XNsg.cjs → configuration-B0cb3xA3.cjs} +1 -1
  51. package/dist/{configuration-L1qcGTFM.mjs → configuration-D2v3puap.mjs} +1 -1
  52. package/dist/{connect-D5IKfcfd.cjs → connect-B7JWEzyg.cjs} +13 -13
  53. package/dist/{connect-CFD0Em6a.mjs → connect-CnNNyM9I.mjs} +13 -13
  54. package/dist/{context-3WVw8qPz.cjs → context-BFUpYT39.cjs} +1 -1
  55. package/dist/{context-DaCCB4cm.mjs → context-DjfqLWzE.mjs} +1 -1
  56. package/dist/{controlClient-Ci7HTMII.mjs → controlClient-BMUJfUeF.mjs} +13 -6
  57. package/dist/{controlClient-RWTlQA4_.cjs → controlClient-CmnHGcyl.cjs} +13 -5
  58. package/dist/{createSessionMetadata-CWR-AB2A.mjs → createSessionMetadata-DU0bCg2m.mjs} +2 -2
  59. package/dist/{createSessionMetadata-CPGTztXP.cjs → createSessionMetadata-DbfRBhRu.cjs} +2 -2
  60. package/dist/{deterministicJson-BBwG-Ase.mjs → deterministicJson-D-WPUrZb.mjs} +36 -52
  61. package/dist/{deterministicJson-C4Jo2RWy.cjs → deterministicJson-Dp3TVyap.cjs} +41 -59
  62. package/dist/{doctor-CAC6qY9Z.mjs → doctor-BlXXyQ1L.mjs} +6 -6
  63. package/dist/{doctor-ZOQLE5AH.cjs → doctor-CkJmdPbi.cjs} +6 -6
  64. package/dist/{assistantTools-BsrG3PD-.cjs → downloadTarget-CiQqRIc-.cjs} +44 -6
  65. package/dist/{assistantTools-DPGga5lM.mjs → downloadTarget-DjSwMHun.mjs} +45 -8
  66. package/dist/{ensureDaemonRunning-b1pvEFcS.mjs → ensureDaemonRunning-CAQag1zE.mjs} +5 -5
  67. package/dist/{ensureDaemonRunning-mIgX2vnc.cjs → ensureDaemonRunning-C_aIOhgG.cjs} +5 -5
  68. package/dist/{handleResumeCommand-DGNhbv-3.cjs → handleResumeCommand-6KzBGDnl.cjs} +5 -5
  69. package/dist/{handleResumeCommand-CTGbZkCL.mjs → handleResumeCommand-Ci7wacT-.mjs} +5 -5
  70. package/dist/{index-vVWpCoTr.mjs → index-B0HEEYGh.mjs} +22 -5
  71. package/dist/{index-DqlyNgt4.cjs → index-C9hI8a10.cjs} +26 -4
  72. package/dist/{index-BzIxE0Eu.cjs → index-CaFCAlX8.cjs} +3 -3
  73. package/dist/{index-DrSPR59N.cjs → index-DBmNwMX9.cjs} +39 -38
  74. package/dist/{index-DIodyAqF.cjs → index-DEKIgZUo.cjs} +4 -4
  75. package/dist/{index-Diu6HdWH.mjs → index-DQplgo0W.mjs} +4 -4
  76. package/dist/{index-BgzjPv07.mjs → index-HQsigW_J.mjs} +3 -3
  77. package/dist/{index-DjtBengz.mjs → index-WGCT6SSV.mjs} +40 -39
  78. package/dist/index.cjs +2 -2
  79. package/dist/index.mjs +2 -2
  80. package/dist/{install-BO_W7VhL.mjs → install-BdvKiOQw.mjs} +2 -0
  81. package/dist/{install-DrUQk2DJ.cjs → install-CejEiRGW.cjs} +3 -3
  82. package/dist/{install-Cs5qAPrB.cjs → install-Cf6AFSWC.cjs} +2 -0
  83. package/dist/{install-Cp_aB-NQ.mjs → install-oJUvsFu9.mjs} +3 -3
  84. package/dist/lib.cjs +12 -12
  85. package/dist/lib.d.cts +55 -2
  86. package/dist/lib.d.mts +55 -2
  87. package/dist/lib.mjs +12 -12
  88. package/dist/{lidState-BLHLmhwd.mjs → lidState-BfximpjX.mjs} +1 -1
  89. package/dist/{lidState-z9ekRpZu.cjs → lidState-D8BmnJV1.cjs} +1 -1
  90. package/dist/{localHappyAgentAuth-BWvmc_Hg.mjs → localHappyAgentAuth-Ct1aXwqd.mjs} +1 -1
  91. package/dist/{localHappyAgentAuth-BCx0y1qW.cjs → localHappyAgentAuth-d7B6S_o7.cjs} +1 -1
  92. package/dist/{logger-CknSVkIe.mjs → logger-BpQcwNnt.mjs} +2 -2
  93. package/dist/{logger-D0hkk7Vo.cjs → logger-JTcJU-uL.cjs} +2 -2
  94. package/dist/{machineMetadata-BDCYOXQg.cjs → machineMetadata-BBg_Njw3.cjs} +3 -3
  95. package/dist/{machineMetadata-Cj1DoFot.mjs → machineMetadata-CBdxABeI.mjs} +3 -3
  96. package/dist/{main-CKUfkVG_.mjs → main-B5b1gA3K.mjs} +44 -44
  97. package/dist/{main-COAPGIso.cjs → main-C16fOGgn.cjs} +44 -44
  98. package/dist/{mcp-BILnw4si.cjs → mcp-BnNiBBax.cjs} +24 -19
  99. package/dist/{mcp-DeYUfpo8.mjs → mcp-DGNWgVdv.mjs} +23 -18
  100. package/dist/{mirrorProtocol-BUtmg1ws.cjs → mirrorProtocol-BEGk2--0.cjs} +80 -0
  101. package/dist/{mirrorProtocol-BNLtoWjO.mjs → mirrorProtocol-h5WHpdhh.mjs} +79 -1
  102. package/dist/{package-VIUXrYZ1.mjs → package-BqwrPxL0.mjs} +7 -7
  103. package/dist/{package-UkmvSFsg.cjs → package-C1XvUQFy.cjs} +7 -7
  104. package/dist/{peerTools-SWITnkqz.mjs → peerTools-CeCe-3lk.mjs} +4 -4
  105. package/dist/{peerTools-CttfOxti.cjs → peerTools-DPvbcs8V.cjs} +4 -4
  106. package/dist/{persistence-C6ztVW1W.cjs → persistence-2Xp_o6x6.cjs} +3 -3
  107. package/dist/{persistence-DujtUH94.mjs → persistence-B9LmhAE2.mjs} +3 -3
  108. package/dist/{piRunnerArgs-BVJHIjlk.mjs → piRunnerArgs-7FaTyNOq.mjs} +1 -1
  109. package/dist/{piRunnerArgs-tBQg6xDw.cjs → piRunnerArgs-DI29dDNo.cjs} +1 -1
  110. package/dist/{piRuntime-DKFA8u8t.mjs → piRuntime-0qEK5AqE.mjs} +1 -1
  111. package/dist/{piRuntime-DZzjF9It.cjs → piRuntime-R8XVChxK.cjs} +1 -1
  112. package/dist/{piTerminal-t5pQHCPT.cjs → piTerminal-Ccj0KNPr.cjs} +17 -17
  113. package/dist/{piTerminal-BTSaFlpV.mjs → piTerminal-zcQKc8Sp.mjs} +17 -17
  114. package/dist/precheckCompat-CWOi5c9L.cjs +29 -0
  115. package/dist/precheckCompat-DeEbilbr.mjs +26 -0
  116. package/dist/rateLimitWindows-C2Jk3Ih7.cjs +258 -0
  117. package/dist/rateLimitWindows-Dhfhbtqu.mjs +248 -0
  118. package/dist/{registerCommonHandlers--8ds2auE.cjs → registerCommonHandlers-Aha_KfM3.cjs} +2 -2
  119. package/dist/{registerCommonHandlers-BR0J4g64.mjs → registerCommonHandlers-DdfGsFbM.mjs} +2 -2
  120. package/dist/{registerKillSessionHandler-CI23l8aJ.cjs → registerKillSessionHandler-CjitOpUA.cjs} +6 -6
  121. package/dist/{registerKillSessionHandler-Czz0tdki.mjs → registerKillSessionHandler-DboQlGcH.mjs} +6 -6
  122. package/dist/{remoteSessionClient-DCAUHgPz.mjs → remoteSessionClient-B2DtWuNP.mjs} +5 -5
  123. package/dist/{remoteSessionClient-BAkIwM2S.cjs → remoteSessionClient-BwI8rpQw.cjs} +5 -5
  124. package/dist/{tools-mWqsE6ji.cjs → reportProgressTool-B-Rcy0s3.cjs} +73 -9
  125. package/dist/{tools-BVRoGcQH.mjs → reportProgressTool-DnAD8wOa.mjs} +67 -10
  126. package/dist/{run-CkKujjn8.cjs → run-Bh66Xs40.cjs} +268 -118
  127. package/dist/{run-B75qm2I6.mjs → run-DPEwJpQR.mjs} +266 -116
  128. package/dist/{runClaude-B1T9DLLi.cjs → runClaude-C-lJdAKD.cjs} +25 -20
  129. package/dist/{runClaude-aBfBweec.mjs → runClaude-DLr_nBzw.mjs} +25 -20
  130. package/dist/{runClaudeDeps-BOrPP4J1.mjs → runClaudeDeps-C7JV7nXG.mjs} +47 -37
  131. package/dist/{runClaudeDeps-BGjNGfuZ.cjs → runClaudeDeps-vWWLod7J.cjs} +44 -35
  132. package/dist/{runGemini-BuAA_OQb.cjs → runGemini-o-CUSayc.cjs} +42 -35
  133. package/dist/{runGemini-a-V7JE-J.mjs → runGemini-tH6sLw-G.mjs} +42 -35
  134. package/dist/{runOpenClaw-DUSwXg1A.mjs → runOpenClaw-C5DZvVhn.mjs} +18 -18
  135. package/dist/{runOpenClaw-BBVffIh9.cjs → runOpenClaw-D24f35l0.cjs} +18 -18
  136. package/dist/{sandbox-Brb_5wzc.mjs → sandbox-BaL1aslA.mjs} +4 -4
  137. package/dist/{sandbox-Fd2G5yaq.cjs → sandbox-TJZJ6ngw.cjs} +4 -4
  138. package/dist/selfCheck-DPi4lqme.mjs +84 -0
  139. package/dist/{selfCheck-NuJKMInJ.cjs → selfCheck-Dugi0Nk_.cjs} +34 -34
  140. package/dist/{send-4dgHKC3u.cjs → send-CkWOSYmU.cjs} +8 -8
  141. package/dist/{send-DEQJiq_x.mjs → send-DDcJ3ayi.mjs} +8 -8
  142. package/dist/{server-DWGcDmHG.cjs → server-7qFQ8J2u.cjs} +6 -6
  143. package/dist/{server-C6AlUFkw.mjs → server-CUjRvQSd.mjs} +4 -4
  144. package/dist/{sessionLock-B1GgaO1q.cjs → sessionLock-DfhNICyS.cjs} +2 -2
  145. package/dist/{sessionLock-Dm8QyGo4.mjs → sessionLock-DqVyHFAQ.mjs} +2 -2
  146. package/dist/{sessionModeFile-BvOEJ4Fl.cjs → sessionModeFile-CIznKD7O.cjs} +1 -1
  147. package/dist/{sessionModeFile-CuNAWCKL.mjs → sessionModeFile-M4OpiyrF.mjs} +1 -1
  148. package/dist/{sessionOps-DG5MMEp_.mjs → sessionOps-BnaEaOKs.mjs} +4 -4
  149. package/dist/{sessionOps-JP64uJmc.cjs → sessionOps-DOyy4gkY.cjs} +4 -4
  150. package/dist/{sessionScanner-DqSk5Ol_.mjs → sessionScanner-CcuOn9uU.mjs} +75 -19
  151. package/dist/{sessionScanner-BBPEgJ5S.cjs → sessionScanner-Cu1yKlj4.cjs} +75 -19
  152. package/dist/{sessions-DgJuw_i0.cjs → sessions-BQgk5Kw8.cjs} +9 -9
  153. package/dist/{sessions-4isbBAWi.mjs → sessions-C9O91rL1.mjs} +9 -9
  154. package/dist/{setupOfflineReconnection-_MoZtsro.mjs → setupOfflineReconnection-Byy8aeKT.mjs} +2 -2
  155. package/dist/{setupOfflineReconnection-CKJKVIUS.cjs → setupOfflineReconnection-DFmQ8s6I.cjs} +2 -2
  156. package/dist/{spawn-CshERWbY.cjs → spawn-BS7LPmSm.cjs} +13 -12
  157. package/dist/{spawn-BTOG4tTm.mjs → spawn-EZ2yrtWd.mjs} +13 -12
  158. package/dist/{spawnAgents-Czi2VDzj.mjs → spawnAgents-HDaE3C0-.mjs} +1 -1
  159. package/dist/{spawnAgents-McixdtV1.cjs → spawnAgents-vglexX9N.cjs} +1 -1
  160. package/dist/{spawnHappyCLI-Dc4xYm8P.mjs → spawnHappyCLI-BAa49m0q.mjs} +1 -1
  161. package/dist/{spawnHappyCLI-Dd5_8Vex.cjs → spawnHappyCLI-DyaldIe5.cjs} +1 -1
  162. package/dist/specialCommands-CCWtwIGZ.mjs +93 -0
  163. package/dist/specialCommands-DouFaJ_0.cjs +96 -0
  164. package/dist/{startFileWatcher-1LedLBY-.cjs → startFileWatcher-DQbbypJv.cjs} +1 -1
  165. package/dist/{startFileWatcher-B0VlG-Fn.mjs → startFileWatcher-Dfs4whzr.mjs} +1 -1
  166. package/dist/{streamRelay-C0AffuX6.cjs → streamRelay-Ce9sgcOV.cjs} +1 -1
  167. package/dist/{streamRelay-BzMEEvJU.mjs → streamRelay-Iogsh51a.mjs} +1 -1
  168. package/dist/{sync-Dfm6K2te.mjs → sync-BLpH13Kb.mjs} +1 -1
  169. package/dist/{sync-DwUUGGFz.cjs → sync-x_lI_3j_.cjs} +1 -1
  170. package/dist/{systemPrompt-CB1Ls0AE.cjs → systemPrompt-4erwILTB.cjs} +3 -3
  171. package/dist/{systemPrompt-D41Zw1a3.mjs → systemPrompt-BanyDihy.mjs} +3 -3
  172. package/dist/{teams-D8Ly3i6u.mjs → teams-D6BOT3lR.mjs} +7 -7
  173. package/dist/{teams-NWv2ji16.cjs → teams-DzetlGWC.cjs} +7 -7
  174. package/dist/{time-v1Y_qEJp.mjs → time-CfDKj6Bx.mjs} +1 -1
  175. package/dist/{time-BbzJ7PJQ.cjs → time-T0YmeOhS.cjs} +1 -1
  176. package/dist/{titleGenerator-BhoblAQY.mjs → titleGenerator-ChImQ4q-.mjs} +1 -1
  177. package/dist/{titleGenerator-cH6IkPRi.cjs → titleGenerator-CoMxqKfP.cjs} +2 -2
  178. package/dist/{todo-D1hgWV6d.cjs → todo-CZZebKZg.cjs} +6 -6
  179. package/dist/{todo-CuNct-fw.mjs → todo-SVtYxGON.mjs} +6 -6
  180. package/dist/{tools-jof0Bu54.mjs → tools-3X2z3YDe.mjs} +1 -1
  181. package/dist/{tools-c2fb0CF5.cjs → tools-IJ0TAcJs.cjs} +1 -1
  182. package/dist/transcriptCursor-B7T_gkQ0.mjs +102 -0
  183. package/dist/transcriptCursor-DcXGLeSc.cjs +106 -0
  184. package/dist/{uninstall-VPH5GfrA.cjs → uninstall-CqqCWj7w.cjs} +3 -3
  185. package/dist/{uninstall-BB7WYYAk.mjs → uninstall-CypD-kr1.mjs} +3 -3
  186. package/package.json +7 -7
  187. package/scripts/terminal_status_forwarder.cjs +89 -0
  188. package/dist/selfCheck-BgwJ3NGS.mjs +0 -84
  189. package/dist/specialCommands-BSqhYg5X.mjs +0 -52
  190. package/dist/specialCommands-DSsTeRej.cjs +0 -54
package/README.md CHANGED
@@ -161,7 +161,7 @@ The web client URL follows the same precedence (`HAPPY_WEBAPP_URL`, then
161
161
 
162
162
  Base managed Claude sessions receive `change_title`, `copy_to_clipboard`,
163
163
  `open_preview`, and `report_progress`. The managed Codex, Gemini, and ACP bridge
164
- exposes the first three except progress. For a plain `claude`, the standalone
164
+ exposes the same four. For a plain `claude`, the standalone
165
165
  command is intentionally clipboard-only:
166
166
 
167
167
  ```bash
@@ -3,10 +3,10 @@
3
3
  var node_child_process = require('node:child_process');
4
4
  var sdk = require('@agentclientprotocol/sdk');
5
5
  var node_crypto = require('node:crypto');
6
- var logger = require('./logger-D0hkk7Vo.cjs');
7
- var time = require('./time-BbzJ7PJQ.cjs');
6
+ var logger = require('./logger-JTcJU-uL.cjs');
7
+ var time = require('./time-T0YmeOhS.cjs');
8
8
  var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
9
- var _package = require('./package-UkmvSFsg.cjs');
9
+ var _package = require('./package-C1XvUQFy.cjs');
10
10
 
11
11
  function acpImageBlocks(attachments, supportsImages) {
12
12
  return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
@@ -1,10 +1,10 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { ndJsonStream, ClientSideConnection } from '@agentclientprotocol/sdk';
3
3
  import { randomUUID } from 'node:crypto';
4
- import { l as logger } from './logger-CknSVkIe.mjs';
5
- import { d as delay } from './time-v1Y_qEJp.mjs';
4
+ import { l as logger } from './logger-BpQcwNnt.mjs';
5
+ import { d as delay } from './time-CfDKj6Bx.mjs';
6
6
  import { c as contentLogMetadata, e as errorLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
7
- import { p as packageJson } from './package-VIUXrYZ1.mjs';
7
+ import { p as packageJson } from './package-BqwrPxL0.mjs';
8
8
 
9
9
  function acpImageBlocks(attachments, supportsImages) {
10
10
  return attachments.filter((file) => ["image/jpeg", "image/png", "image/gif", "image/webp"].includes(file.mimeType)).map((file) => {
@@ -1,5 +1,5 @@
1
1
  import { createId } from '@paralleldrive/cuid2';
2
- import { s as streamKeyOf, e as createEnvelope } from './index-vVWpCoTr.mjs';
2
+ import { s as streamKeyOf, c as createEnvelope } from './index-B0HEEYGh.mjs';
3
3
 
4
4
  function turnOptions(turnId, time) {
5
5
  return turnId ? { turn: turnId, time } : { time };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var cuid2 = require('@paralleldrive/cuid2');
4
- var index = require('./index-DqlyNgt4.cjs');
4
+ var index = require('./index-C9hI8a10.cjs');
5
5
 
6
6
  function turnOptions(turnId, time) {
7
7
  return turnId ? { turn: turnId, time } : { time };
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-CknSVkIe.mjs';
1
+ import { l as logger } from './logger-BpQcwNnt.mjs';
2
2
 
3
3
  class BasePermissionHandler {
4
4
  pendingRequests = /* @__PURE__ */ new Map();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-D0hkk7Vo.cjs');
3
+ var logger = require('./logger-JTcJU-uL.cjs');
4
4
 
5
5
  class BasePermissionHandler {
6
6
  pendingRequests = /* @__PURE__ */ new Map();
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from 'node:crypto';
2
- import { l as logger } from './logger-CknSVkIe.mjs';
2
+ import { l as logger } from './logger-BpQcwNnt.mjs';
3
3
 
4
4
  class BaseReasoningProcessor {
5
5
  accumulator = "";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var node_crypto = require('node:crypto');
4
- var logger = require('./logger-D0hkk7Vo.cjs');
4
+ var logger = require('./logger-JTcJU-uL.cjs');
5
5
 
6
6
  class BaseReasoningProcessor {
7
7
  accumulator = "";
@@ -5,6 +5,7 @@ const AGENT_GUIDANCE = (() => trimIdent(`
5
5
 
6
6
  - Terminal output is not a good delivery channel. When the user asks for a piece of text ("copy that", "give me X", "\u590D\u5236\u7ED9\u6211", "\u53D1\u6211"), hand it over with mcp__happy__copy_to_clipboard instead of printing it for them to select by hand.
7
7
  - When you produce or want to show a FILE (a document you wrote, a report, an image, a PDF, a diff), call mcp__happy__open_preview with its path instead of cat-ing it. Their client opens the rendered file.
8
+ - If the user wants to GET a file (any type: zip, docx, binary), pass download: true to mcp__happy__open_preview. Zip a directory first.
8
9
 
9
10
  Judgement, not reflex: use these when the user's goal is to RECEIVE something. If they are asking a question you can just answer, answer it. Do not preview a file you only read for your own reasoning, and do not preview the same file repeatedly within a turn.
10
11
 
@@ -12,9 +13,10 @@ const AGENT_GUIDANCE = (() => trimIdent(`
12
13
  `))();
13
14
  const PREVIEW_TOOL_NAME = "open_preview";
14
15
  const PREVIEW_TOOL_TITLE = "Open File Preview for the User";
15
- const PREVIEW_TOOL_DESCRIPTION = 'Open a file in the preview panel of every web client the user currently has open. Use this whenever you produce or want to show the user a file: a document or report you just wrote, a generated image or diagram, a PDF, a data file, or a source file you want them to look at. Trigger phrases include: "write me a doc", "show me that file", "let me see it", "\u5199\u4E2A\u6587\u6863", "\u7ED9\u6211\u770B\u770B\u8FD9\u4E2A\u6587\u4EF6", "\u6253\u5F00\u770B\u4E0B". Pass an absolute path (or one starting with ~). The file is read on this machine and rendered in their browser \u2014 markdown is rendered, images and PDFs are displayed, other text is syntax-highlighted. Prefer this over printing file contents to the terminal, which the user is probably not looking at. NOTE: this only requests that their client open the file; it cannot confirm the user actually looked at it, so do not assume they have seen it.';
16
+ const PREVIEW_TOOL_DESCRIPTION = 'Open a file in the preview panel of every web client the user currently has open. Use this whenever you produce or want to show the user a file: a document or report you just wrote, a generated image or diagram, a PDF, a data file, or a source file you want them to look at. Trigger phrases include: "write me a doc", "show me that file", "let me see it", "\u5199\u4E2A\u6587\u6863", "\u7ED9\u6211\u770B\u770B\u8FD9\u4E2A\u6587\u4EF6", "\u6253\u5F00\u770B\u4E0B". Pass an absolute path (or one starting with ~). The file is read on this machine and rendered in their browser \u2014 markdown is rendered, images and PDFs are displayed, other text is syntax-highlighted. Prefer this over printing file contents to the terminal, which the user is probably not looking at. Set download: true when the user wants to GET the file rather than read it \u2014 any type, including zip archives, Word/Excel/PowerPoint documents, binaries and installers ("send me the file", "let me download it", "\u7ED9\u6211\u4E0B\u8F7D", "\u53D1\u6211\u8FD9\u4E2A\u6587\u4EF6"). Their client then shows a prominent download button (and may start the download on desktop). Only single regular files can be downloaded: zip a directory first and pass the archive. The web download limit is 50 MiB; compress or split anything larger. NOTE: this only requests that their client open the file; it cannot confirm the user actually looked at it or downloaded it, so do not assume they have.';
17
+ const PREVIEW_DOWNLOAD_PARAM_DESCRIPTION = "true when the user wants to download/receive the file itself (any type) rather than just read it";
16
18
  const REPORT_PROGRESS_TOOL_NAME = "report_progress";
17
19
  const REPORT_PROGRESS_TOOL_TITLE = "Report Progress to the Task Board";
18
20
  const REPORT_PROGRESS_TOOL_DESCRIPTION = `Report what you are doing to the user's task board, so they can see the state of this session at a glance without reading the transcript. Call it at meaningful milestones only: when you start substantive work, when you get blocked and need the user, when something is ready for their review, and when you are done. Do NOT call it after every tool call or every file edit \u2014 it is a status line, not a log. Set attention to "blocked" when you cannot proceed without the user, "review" when you want them to look at something, and "none" for ordinary progress. Keep progress to one short line describing the current state (the user reads it on a card).`;
19
21
 
20
- export { AGENT_GUIDANCE as A, PREVIEW_TOOL_NAME as P, REPORT_PROGRESS_TOOL_NAME as R, PREVIEW_TOOL_TITLE as a, PREVIEW_TOOL_DESCRIPTION as b, REPORT_PROGRESS_TOOL_TITLE as c, REPORT_PROGRESS_TOOL_DESCRIPTION as d };
22
+ export { AGENT_GUIDANCE as A, PREVIEW_TOOL_NAME as P, REPORT_PROGRESS_TOOL_NAME as R, PREVIEW_TOOL_TITLE as a, PREVIEW_TOOL_DESCRIPTION as b, PREVIEW_DOWNLOAD_PARAM_DESCRIPTION as c, REPORT_PROGRESS_TOOL_TITLE as d, REPORT_PROGRESS_TOOL_DESCRIPTION as e };
@@ -7,6 +7,7 @@ const AGENT_GUIDANCE = (() => trimIdent.trimIdent(`
7
7
 
8
8
  - Terminal output is not a good delivery channel. When the user asks for a piece of text ("copy that", "give me X", "\u590D\u5236\u7ED9\u6211", "\u53D1\u6211"), hand it over with mcp__happy__copy_to_clipboard instead of printing it for them to select by hand.
9
9
  - When you produce or want to show a FILE (a document you wrote, a report, an image, a PDF, a diff), call mcp__happy__open_preview with its path instead of cat-ing it. Their client opens the rendered file.
10
+ - If the user wants to GET a file (any type: zip, docx, binary), pass download: true to mcp__happy__open_preview. Zip a directory first.
10
11
 
11
12
  Judgement, not reflex: use these when the user's goal is to RECEIVE something. If they are asking a question you can just answer, answer it. Do not preview a file you only read for your own reasoning, and do not preview the same file repeatedly within a turn.
12
13
 
@@ -14,12 +15,14 @@ const AGENT_GUIDANCE = (() => trimIdent.trimIdent(`
14
15
  `))();
15
16
  const PREVIEW_TOOL_NAME = "open_preview";
16
17
  const PREVIEW_TOOL_TITLE = "Open File Preview for the User";
17
- const PREVIEW_TOOL_DESCRIPTION = 'Open a file in the preview panel of every web client the user currently has open. Use this whenever you produce or want to show the user a file: a document or report you just wrote, a generated image or diagram, a PDF, a data file, or a source file you want them to look at. Trigger phrases include: "write me a doc", "show me that file", "let me see it", "\u5199\u4E2A\u6587\u6863", "\u7ED9\u6211\u770B\u770B\u8FD9\u4E2A\u6587\u4EF6", "\u6253\u5F00\u770B\u4E0B". Pass an absolute path (or one starting with ~). The file is read on this machine and rendered in their browser \u2014 markdown is rendered, images and PDFs are displayed, other text is syntax-highlighted. Prefer this over printing file contents to the terminal, which the user is probably not looking at. NOTE: this only requests that their client open the file; it cannot confirm the user actually looked at it, so do not assume they have seen it.';
18
+ const PREVIEW_TOOL_DESCRIPTION = 'Open a file in the preview panel of every web client the user currently has open. Use this whenever you produce or want to show the user a file: a document or report you just wrote, a generated image or diagram, a PDF, a data file, or a source file you want them to look at. Trigger phrases include: "write me a doc", "show me that file", "let me see it", "\u5199\u4E2A\u6587\u6863", "\u7ED9\u6211\u770B\u770B\u8FD9\u4E2A\u6587\u4EF6", "\u6253\u5F00\u770B\u4E0B". Pass an absolute path (or one starting with ~). The file is read on this machine and rendered in their browser \u2014 markdown is rendered, images and PDFs are displayed, other text is syntax-highlighted. Prefer this over printing file contents to the terminal, which the user is probably not looking at. Set download: true when the user wants to GET the file rather than read it \u2014 any type, including zip archives, Word/Excel/PowerPoint documents, binaries and installers ("send me the file", "let me download it", "\u7ED9\u6211\u4E0B\u8F7D", "\u53D1\u6211\u8FD9\u4E2A\u6587\u4EF6"). Their client then shows a prominent download button (and may start the download on desktop). Only single regular files can be downloaded: zip a directory first and pass the archive. The web download limit is 50 MiB; compress or split anything larger. NOTE: this only requests that their client open the file; it cannot confirm the user actually looked at it or downloaded it, so do not assume they have.';
19
+ const PREVIEW_DOWNLOAD_PARAM_DESCRIPTION = "true when the user wants to download/receive the file itself (any type) rather than just read it";
18
20
  const REPORT_PROGRESS_TOOL_NAME = "report_progress";
19
21
  const REPORT_PROGRESS_TOOL_TITLE = "Report Progress to the Task Board";
20
22
  const REPORT_PROGRESS_TOOL_DESCRIPTION = `Report what you are doing to the user's task board, so they can see the state of this session at a glance without reading the transcript. Call it at meaningful milestones only: when you start substantive work, when you get blocked and need the user, when something is ready for their review, and when you are done. Do NOT call it after every tool call or every file edit \u2014 it is a status line, not a log. Set attention to "blocked" when you cannot proceed without the user, "review" when you want them to look at something, and "none" for ordinary progress. Keep progress to one short line describing the current state (the user reads it on a card).`;
21
23
 
22
24
  exports.AGENT_GUIDANCE = AGENT_GUIDANCE;
25
+ exports.PREVIEW_DOWNLOAD_PARAM_DESCRIPTION = PREVIEW_DOWNLOAD_PARAM_DESCRIPTION;
23
26
  exports.PREVIEW_TOOL_DESCRIPTION = PREVIEW_TOOL_DESCRIPTION;
24
27
  exports.PREVIEW_TOOL_NAME = PREVIEW_TOOL_NAME;
25
28
  exports.PREVIEW_TOOL_TITLE = PREVIEW_TOOL_TITLE;
@@ -1,13 +1,13 @@
1
1
  import chalk from 'chalk';
2
2
  import { homedir } from 'node:os';
3
- import { readSettings, updateSettings } from './persistence-DujtUH94.mjs';
3
+ import { readSettings, updateSettings } from './persistence-B9LmhAE2.mjs';
4
4
  import 'node:fs';
5
- import './logger-CknSVkIe.mjs';
5
+ import './logger-BpQcwNnt.mjs';
6
6
  import { d as describeAgentHome, p as probeLoginShellEnv, r as resolveAgentHomes, e as expandHomePath, A as AGENT_HOME_ENV_NAMES } from './loginShellEnv-Dw8M7tkI.mjs';
7
7
  import 'node:fs/promises';
8
- import './configuration-L1qcGTFM.mjs';
8
+ import './configuration-D2v3puap.mjs';
9
9
  import 'node:path';
10
- import './package-VIUXrYZ1.mjs';
10
+ import './package-BqwrPxL0.mjs';
11
11
  import 'zod';
12
12
  import './authRelay-DSAvg1uv.mjs';
13
13
  import 'node:crypto';
@@ -2,14 +2,14 @@
2
2
 
3
3
  var chalk = require('chalk');
4
4
  var os = require('node:os');
5
- var persistence = require('./persistence-C6ztVW1W.cjs');
5
+ var persistence = require('./persistence-2Xp_o6x6.cjs');
6
6
  require('node:fs');
7
- require('./logger-D0hkk7Vo.cjs');
7
+ require('./logger-JTcJU-uL.cjs');
8
8
  var loginShellEnv = require('./loginShellEnv-BkuYtExZ.cjs');
9
9
  require('node:fs/promises');
10
- require('./configuration-BE61XNsg.cjs');
10
+ require('./configuration-B0cb3xA3.cjs');
11
11
  require('node:path');
12
- require('./package-UkmvSFsg.cjs');
12
+ require('./package-C1XvUQFy.cjs');
13
13
  require('zod');
14
14
  require('./authRelay-BdYkC1Po.cjs');
15
15
  require('node:crypto');
@@ -1,20 +1,20 @@
1
1
  import axios from 'axios';
2
- import { l as logger, r as redactLogValue } from './logger-CknSVkIe.mjs';
3
- import { R as RpcHandlerManager, a as answerSocketRequest, c as connectGuarded, s as socketConnectGuard, d as describeSocketAckDrop, b as safeAck, i as isRateQuotaCode, p as pauseForRateQuota, e as shouldReconnect } from './lidState-BLHLmhwd.mjs';
2
+ import { l as logger, r as redactLogValue } from './logger-BpQcwNnt.mjs';
3
+ import { R as RpcHandlerManager, a as answerSocketRequest, c as connectGuarded, s as socketConnectGuard, d as describeSocketAckDrop, b as safeAck, i as isRateQuotaCode, p as pauseForRateQuota, e as shouldReconnect } from './lidState-BfximpjX.mjs';
4
4
  import { EventEmitter } from 'node:events';
5
5
  import { io } from 'socket.io-client';
6
- import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema } from './attachmentLimits-B8nzhw-i.mjs';
6
+ import { A as AsyncLock, a as MAX_CHAT_ATTACHMENT_ENCRYPTED_BYTES, U as UserMessageSchema, F as FileEventMessageSchema } from './attachmentLimits-C1PCCM79.mjs';
7
7
  import { h as decrypt, d as decodeBase64, i as decryptBlob, e as encodeBase64, g as encrypt, l as libsodiumEncryptForPublicKey, j as libsodiumPublicKeyFromSecretKey, k as getRandomBytes } from './authRelay-DSAvg1uv.mjs';
8
8
  import { p as prepareClipboardText, d as prepareClipboardHistoryText } from './limits-DIo7rEBR.mjs';
9
- import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-v1Y_qEJp.mjs';
10
- import { c as configuration } from './configuration-L1qcGTFM.mjs';
9
+ import { b as backoff, d as delay, e as exponentialBackoffDelay } from './time-CfDKj6Bx.mjs';
10
+ import { c as configuration } from './configuration-D2v3puap.mjs';
11
11
  import { createHmac, randomUUID } from 'node:crypto';
12
- import { e as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, m as RelayAssignmentResponseSchema } from './index-vVWpCoTr.mjs';
13
- import { r as registerCommonHandlers } from './registerCommonHandlers-BR0J4g64.mjs';
12
+ import { c as createEnvelope, s as streamKeyOf, R as ReleaseDrainNoticeSchema, q as RelayAssignmentResponseSchema } from './index-B0HEEYGh.mjs';
13
+ import { r as registerCommonHandlers } from './registerCommonHandlers-DdfGsFbM.mjs';
14
14
  import { createId } from '@paralleldrive/cuid2';
15
- import { I as InvalidateSync } from './sync-Dfm6K2te.mjs';
15
+ import { I as InvalidateSync } from './sync-BLpH13Kb.mjs';
16
16
  import { B as BackgroundTaskReporter } from './backgroundTaskActivity-8PdPxrvy.mjs';
17
- import { h as notifyDaemonTurnEvent, j as notifyDaemonBackgroundTasks } from './controlClient-Ci7HTMII.mjs';
17
+ import { j as notifyDaemonTurnEvent, k as notifyDaemonBackgroundTasks } from './controlClient-BMUJfUeF.mjs';
18
18
  import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
19
19
  import chalk from 'chalk';
20
20
 
@@ -2110,14 +2110,16 @@ class ApiSessionClient extends EventEmitter {
2110
2110
  * payload on this channel is (clipboard, fs RPC) — and a path leaks
2111
2111
  * project/client names and directory structure.
2112
2112
  */
2113
- pushFilePreview(path, mode = "file") {
2113
+ pushFilePreview(path, mode = "file", intent) {
2114
2114
  if (!this.socket.connected) {
2115
2115
  return { delivered: false, error: "not connected to the server" };
2116
2116
  }
2117
2117
  this.socket.emit("file-preview-push", {
2118
2118
  payload: encodeBase64(encrypt(this.encryptionKey, this.encryptionVariant, path)),
2119
2119
  enc: true,
2120
- mode
2120
+ mode,
2121
+ // B-562: only present for downloads, so a plain preview keeps the old wire shape.
2122
+ ...intent ? { intent } : {}
2121
2123
  });
2122
2124
  return { delivered: true };
2123
2125
  }
@@ -3084,7 +3086,7 @@ class ApiClient {
3084
3086
  return new ApiSessionClient(this.credential.token, session, opts);
3085
3087
  }
3086
3088
  async machineSyncClient(machine) {
3087
- const { ApiMachineClient } = await import('./apiMachine-BQ-b4Lu3.mjs');
3089
+ const { ApiMachineClient } = await import('./apiMachine-B6ySCFe0.mjs');
3088
3090
  return new ApiMachineClient(this.credential.token, machine);
3089
3091
  }
3090
3092
  push() {
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
3
  var axios = require('axios');
4
- var logger = require('./logger-D0hkk7Vo.cjs');
5
- var lidState = require('./lidState-z9ekRpZu.cjs');
4
+ var logger = require('./logger-JTcJU-uL.cjs');
5
+ var lidState = require('./lidState-D8BmnJV1.cjs');
6
6
  var node_events = require('node:events');
7
7
  var socket_ioClient = require('socket.io-client');
8
- var attachmentLimits = require('./attachmentLimits-eJZ4ZBjF.cjs');
8
+ var attachmentLimits = require('./attachmentLimits-BfgKV5iE.cjs');
9
9
  var authRelay = require('./authRelay-BdYkC1Po.cjs');
10
10
  var limits = require('./limits-C-a7gr04.cjs');
11
- var time = require('./time-BbzJ7PJQ.cjs');
12
- var configuration = require('./configuration-BE61XNsg.cjs');
11
+ var time = require('./time-T0YmeOhS.cjs');
12
+ var configuration = require('./configuration-B0cb3xA3.cjs');
13
13
  var node_crypto = require('node:crypto');
14
- var index = require('./index-DqlyNgt4.cjs');
15
- var registerCommonHandlers = require('./registerCommonHandlers--8ds2auE.cjs');
14
+ var index = require('./index-C9hI8a10.cjs');
15
+ var registerCommonHandlers = require('./registerCommonHandlers-Aha_KfM3.cjs');
16
16
  var cuid2 = require('@paralleldrive/cuid2');
17
- var sync = require('./sync-DwUUGGFz.cjs');
17
+ var sync = require('./sync-x_lI_3j_.cjs');
18
18
  var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
19
- var controlClient = require('./controlClient-RWTlQA4_.cjs');
19
+ var controlClient = require('./controlClient-CmnHGcyl.cjs');
20
20
  var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
21
21
  var chalk = require('chalk');
22
22
 
@@ -2112,14 +2112,16 @@ class ApiSessionClient extends node_events.EventEmitter {
2112
2112
  * payload on this channel is (clipboard, fs RPC) — and a path leaks
2113
2113
  * project/client names and directory structure.
2114
2114
  */
2115
- pushFilePreview(path, mode = "file") {
2115
+ pushFilePreview(path, mode = "file", intent) {
2116
2116
  if (!this.socket.connected) {
2117
2117
  return { delivered: false, error: "not connected to the server" };
2118
2118
  }
2119
2119
  this.socket.emit("file-preview-push", {
2120
2120
  payload: authRelay.encodeBase64(authRelay.encrypt(this.encryptionKey, this.encryptionVariant, path)),
2121
2121
  enc: true,
2122
- mode
2122
+ mode,
2123
+ // B-562: only present for downloads, so a plain preview keeps the old wire shape.
2124
+ ...intent ? { intent } : {}
2123
2125
  });
2124
2126
  return { delivered: true };
2125
2127
  }
@@ -3086,7 +3088,7 @@ class ApiClient {
3086
3088
  return new ApiSessionClient(this.credential.token, session, opts);
3087
3089
  }
3088
3090
  async machineSyncClient(machine) {
3089
- const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-B_cJldfa.cjs'); });
3091
+ const { ApiMachineClient } = await Promise.resolve().then(function () { return require('./apiMachine-DeoQ8QbZ.cjs'); });
3090
3092
  return new ApiMachineClient(this.credential.token, machine);
3091
3093
  }
3092
3094
  push() {