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
@@ -1,34 +1,34 @@
1
- import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-C11FnVw5.mjs';
2
- export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-C11FnVw5.mjs';
3
- import { l as logger } from './logger-CknSVkIe.mjs';
4
- import { A as AcpSessionManager } from './AcpSessionManager-BQnDJvct.mjs';
5
- import { l as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-vVWpCoTr.mjs';
1
+ import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-tRWk7yi7.mjs';
2
+ export { a as DEFAULT_IDLE_TIMEOUT_MS, b as DEFAULT_TOOL_CALL_TIMEOUT_MS, e as extractErrorDetail, f as formatDuration, c as formatDurationMinutes, h as handleAgentMessageChunk, d as handleAgentThoughtChunk, g as handleLegacyMessageChunk, i as handlePlanUpdate, j as handleThinkingUpdate, k as handleToolCall, l as handleToolCallUpdate, p as parseArgsFromContent } from './AcpBackend-tRWk7yi7.mjs';
3
+ import { l as logger } from './logger-BpQcwNnt.mjs';
4
+ import { A as AcpSessionManager } from './AcpSessionManager-B7FIrsys.mjs';
5
+ import { o as BUILTIN_TODO_DISCOVERY, P as PROMPT_QUEUE_CAPABILITY } from './index-B0HEEYGh.mjs';
6
6
  import { r as registerAgentAttachmentDownloads } from './agentAttachments-M_B5qEF2.mjs';
7
- import { c as configuration } from './configuration-L1qcGTFM.mjs';
8
- import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-dzIs-wis.mjs';
9
- import { p as preparePiTeamsRuntime } from './piRuntime-DKFA8u8t.mjs';
7
+ import { c as configuration } from './configuration-D2v3puap.mjs';
8
+ import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-CTXapi-_.mjs';
9
+ import { p as preparePiTeamsRuntime } from './piRuntime-0qEK5AqE.mjs';
10
10
  import { randomUUID } from 'node:crypto';
11
11
  import { join } from 'node:path';
12
- import { c as connectionState, A as ApiClient } from './api-DTVPUE7g.mjs';
13
- import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-Czz0tdki.mjs';
14
- import { h as hashObject, s as startHappyServer } from './deterministicJson-BBwG-Ase.mjs';
15
- import { readSettings } from './persistence-DujtUH94.mjs';
16
- import { g as getInitialMachineMetadata } from './machineMetadata-Cj1DoFot.mjs';
17
- import { c as createSessionMetadata } from './createSessionMetadata-CWR-AB2A.mjs';
18
- import { s as setupOfflineReconnection } from './setupOfflineReconnection-_MoZtsro.mjs';
19
- import { n as notifyDaemonSessionStarted, g as reportSessionEditToDaemon } from './controlClient-Ci7HTMII.mjs';
12
+ import { c as connectionState, A as ApiClient } from './api-Cmz3XS4P.mjs';
13
+ import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-DboQlGcH.mjs';
14
+ import { h as hashObject, s as startHappyServer } from './deterministicJson-D-WPUrZb.mjs';
15
+ import { readSettings } from './persistence-B9LmhAE2.mjs';
16
+ import { g as getInitialMachineMetadata } from './machineMetadata-CBdxABeI.mjs';
17
+ import { c as createSessionMetadata } from './createSessionMetadata-DU0bCg2m.mjs';
18
+ import { s as setupOfflineReconnection } from './setupOfflineReconnection-Byy8aeKT.mjs';
19
+ import { n as notifyDaemonSessionStarted, h as reportSessionEditToDaemon } from './controlClient-BMUJfUeF.mjs';
20
20
  import { e as encodeBase64 } from './authRelay-DSAvg1uv.mjs';
21
- import { S as StreamRelay } from './streamRelay-BzMEEvJU.mjs';
21
+ import { S as StreamRelay } from './streamRelay-Iogsh51a.mjs';
22
22
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
23
- import { B as BasePermissionHandler } from './BasePermissionHandler-CwJ48yiB.mjs';
24
- import { T as TitleGenerator } from './titleGenerator-BhoblAQY.mjs';
25
- import { w as writeSessionModeFile, n as normalizeAcpPermissionMode, r as removeSessionModeFile } from './sessionModeFile-CuNAWCKL.mjs';
23
+ import { B as BasePermissionHandler } from './BasePermissionHandler-CDCLIrZJ.mjs';
24
+ import { T as TitleGenerator } from './titleGenerator-ChImQ4q-.mjs';
25
+ import { w as writeSessionModeFile, n as normalizeAcpPermissionMode, r as removeSessionModeFile } from './sessionModeFile-M4OpiyrF.mjs';
26
26
  import { E as EditReportThrottle, e as extractAcpEditPaths } from './editPaths-BVfS_FFL.mjs';
27
27
  import 'node:child_process';
28
28
  import '@agentclientprotocol/sdk';
29
- import './time-v1Y_qEJp.mjs';
29
+ import './time-CfDKj6Bx.mjs';
30
30
  import './contentLogMetadata-BlWI0egu.mjs';
31
- import './package-VIUXrYZ1.mjs';
31
+ import './package-BqwrPxL0.mjs';
32
32
  import 'chalk';
33
33
  import 'node:util';
34
34
  import 'node:fs';
@@ -36,48 +36,49 @@ import '@paralleldrive/cuid2';
36
36
  import 'zod';
37
37
  import 'node:os';
38
38
  import 'node:fs/promises';
39
- import './attachmentLimits-B8nzhw-i.mjs';
39
+ import './attachmentLimits-C1PCCM79.mjs';
40
40
  import './resources-BdFBQi8r.mjs';
41
41
  import 'axios';
42
- import './lidState-BLHLmhwd.mjs';
42
+ import './lidState-BfximpjX.mjs';
43
43
  import 'os';
44
44
  import 'child_process';
45
45
  import 'node:events';
46
46
  import 'socket.io-client';
47
47
  import './limits-DIo7rEBR.mjs';
48
- import './registerCommonHandlers-BR0J4g64.mjs';
48
+ import './registerCommonHandlers-DdfGsFbM.mjs';
49
49
  import 'util';
50
50
  import 'fs/promises';
51
51
  import 'crypto';
52
52
  import 'path';
53
53
  import 'cross-spawn';
54
- import './sync-Dfm6K2te.mjs';
54
+ import './sync-BLpH13Kb.mjs';
55
55
  import './backgroundTaskActivity-8PdPxrvy.mjs';
56
56
  import 'tweetnacl';
57
57
  import './types-CkqAACXx.mjs';
58
- import './client-BwaWdlCm.mjs';
59
- import './context-DaCCB4cm.mjs';
60
- import './sessionOps-DG5MMEp_.mjs';
61
- import './tools-jof0Bu54.mjs';
62
- import './tools-BVRoGcQH.mjs';
63
- import './client-CJZKBZCE.mjs';
64
- import './peerTools-SWITnkqz.mjs';
58
+ import './client-CbK33y_s.mjs';
59
+ import './context-DjfqLWzE.mjs';
60
+ import './sessionOps-BnaEaOKs.mjs';
61
+ import './tools-3X2z3YDe.mjs';
62
+ import './reportProgressTool-DnAD8wOa.mjs';
63
+ import './client-GjTnsq6F.mjs';
64
+ import './precheckCompat-DeEbilbr.mjs';
65
+ import './agentGuidance-BDYt2Qy2.mjs';
66
+ import './trimIdent-BAjmv_TG.mjs';
67
+ import './peerTools-CeCe-3lk.mjs';
65
68
  import './ids-DU6sLx4C.mjs';
66
- import './remoteSessionClient-DCAUHgPz.mjs';
69
+ import './remoteSessionClient-B2DtWuNP.mjs';
67
70
  import '@modelcontextprotocol/sdk/server/mcp.js';
68
71
  import 'node:http';
69
72
  import '@modelcontextprotocol/sdk/server/streamableHttp.js';
70
- import './assistantTools-DPGga5lM.mjs';
73
+ import './downloadTarget-DjSwMHun.mjs';
71
74
  import './terminals-Dlg0x3nY.mjs';
72
75
  import './terminalTitleSuggest-CeKsX_V6.mjs';
73
76
  import './tmuxSocket-B8Yx20sT.mjs';
74
- import './bootstrap-D_ExGrY2.mjs';
75
- import './agentGuidance-CQuNlNx8.mjs';
76
- import './trimIdent-BAjmv_TG.mjs';
77
+ import './bootstrap-XE8A7Ut2.mjs';
77
78
  import './previewPath-CXN4Vag0.mjs';
78
79
  import './detectCLI-CSGMlV51.mjs';
79
80
  import 'fs';
80
- import './localHappyAgentAuth-BWvmc_Hg.mjs';
81
+ import './localHappyAgentAuth-Ct1aXwqd.mjs';
81
82
  import 'url';
82
83
  import 'node:module';
83
84
  import './oneShotPrompts-DT4p6RNd.mjs';
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- require('./package-UkmvSFsg.cjs');
4
- require('./index-BzIxE0Eu.cjs');
3
+ require('./package-C1XvUQFy.cjs');
4
+ require('./index-CaFCAlX8.cjs');
5
5
  require('node:module');
6
6
  require('node:fs');
7
7
  require('node:fs/promises');
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import './package-VIUXrYZ1.mjs';
2
- import './index-BgzjPv07.mjs';
1
+ import './package-BqwrPxL0.mjs';
2
+ import './index-HQsigW_J.mjs';
3
3
  import 'node:module';
4
4
  import 'node:fs';
5
5
  import 'node:fs/promises';
@@ -24,6 +24,8 @@ Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi
24
24
 
25
25
  Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
26
26
 
27
+ Add a \`precheck\` when the action should only run if there is something to do (for example "new messages since the last run"): exactly one of \`command\` (argv) or \`shell\` (one command line, not template-rendered \u2014 read the payload from \`$VH_AUTOMATION_PAYLOAD\`), optional \`cwd\` (defaults to the action directory), \`timeoutMs\` (default 60s, max 10m) and \`includeOutput\` (append its stdout to the spawn/send prompt as context). Exit 0 runs the action; any other exit records the run as skipped (\`precheck_failed\`), a timeout or launch error as \`precheck_timeout\` / \`precheck_error\` with attention. Consecutive scheduled skips for the same reason fold into one run with an \`occurrenceCount\` (fired and manual runs keep one run each). A machine whose CLI is too old to run prechecks never executes the action; its runs are skipped as \`precheck_unsupported_cli\`.
28
+
27
29
  \`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
28
30
 
29
31
  ## Event triggers
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-D0hkk7Vo.cjs');
3
+ var logger = require('./logger-JTcJU-uL.cjs');
4
4
  var fs = require('fs');
5
5
  var child_process = require('child_process');
6
6
  var trimIdent = require('./trimIdent-4gvk9Wk6.cjs');
7
7
  var os = require('os');
8
8
  require('chalk');
9
9
  require('node:util');
10
- require('./configuration-BE61XNsg.cjs');
10
+ require('./configuration-B0cb3xA3.cjs');
11
11
  require('node:fs');
12
12
  require('node:os');
13
13
  require('node:path');
14
- require('./package-UkmvSFsg.cjs');
14
+ require('./package-C1XvUQFy.cjs');
15
15
  require('node:fs/promises');
16
16
 
17
17
  const PLIST_LABEL = "com.happy-cli.daemon";
@@ -26,6 +26,8 @@ Pick the trigger, then the action. \`spawn\` takes an agent (claude / codex / pi
26
26
 
27
27
  Use \`sticky: { key }\` on a spawn action when repeated events about the same subject should continue one conversation: the key is a template (for example \`{{payload.conversationId}}\`). A run whose rendered key matches a live session sends the prompt into that session; otherwise it spawns a new one and remembers it. A dead or archived session is replaced on the next run.
28
28
 
29
+ Add a \`precheck\` when the action should only run if there is something to do (for example "new messages since the last run"): exactly one of \`command\` (argv) or \`shell\` (one command line, not template-rendered \u2014 read the payload from \`$VH_AUTOMATION_PAYLOAD\`), optional \`cwd\` (defaults to the action directory), \`timeoutMs\` (default 60s, max 10m) and \`includeOutput\` (append its stdout to the spawn/send prompt as context). Exit 0 runs the action; any other exit records the run as skipped (\`precheck_failed\`), a timeout or launch error as \`precheck_timeout\` / \`precheck_error\` with attention. Consecutive scheduled skips for the same reason fold into one run with an \`occurrenceCount\` (fired and manual runs keep one run each). A machine whose CLI is too old to run prechecks never executes the action; its runs are skipped as \`precheck_unsupported_cli\`.
30
+
29
31
  \`concurrency: skip\` (default) records a run as skipped while the previous one is still running; \`queue\` waits. \`maxRuntimeMs\` bounds a run (default 6h; scripts 30m).
30
32
 
31
33
  ## Event triggers
@@ -1,15 +1,15 @@
1
- import { l as logger } from './logger-CknSVkIe.mjs';
1
+ import { l as logger } from './logger-BpQcwNnt.mjs';
2
2
  import { existsSync, writeFileSync, chmodSync } from 'fs';
3
3
  import { execSync } from 'child_process';
4
4
  import { t as trimIdent } from './trimIdent-BAjmv_TG.mjs';
5
5
  import os from 'os';
6
6
  import 'chalk';
7
7
  import 'node:util';
8
- import './configuration-L1qcGTFM.mjs';
8
+ import './configuration-D2v3puap.mjs';
9
9
  import 'node:fs';
10
10
  import 'node:os';
11
11
  import 'node:path';
12
- import './package-VIUXrYZ1.mjs';
12
+ import './package-BqwrPxL0.mjs';
13
13
  import 'node:fs/promises';
14
14
 
15
15
  const PLIST_LABEL = "com.happy-cli.daemon";
package/dist/lib.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var api = require('./api-AzdzTKFs.cjs');
4
- var logger = require('./logger-D0hkk7Vo.cjs');
5
- var configuration = require('./configuration-BE61XNsg.cjs');
3
+ var api = require('./api-DnNL5fLw.cjs');
4
+ var logger = require('./logger-JTcJU-uL.cjs');
5
+ var configuration = require('./configuration-B0cb3xA3.cjs');
6
6
  var types = require('./types-CRS-srZK.cjs');
7
7
  require('axios');
8
- require('./lidState-z9ekRpZu.cjs');
8
+ require('./lidState-D8BmnJV1.cjs');
9
9
  require('./authRelay-BdYkC1Po.cjs');
10
10
  require('node:crypto');
11
11
  require('tweetnacl');
@@ -13,13 +13,13 @@ require('os');
13
13
  require('child_process');
14
14
  require('node:events');
15
15
  require('socket.io-client');
16
- require('./attachmentLimits-eJZ4ZBjF.cjs');
16
+ require('./attachmentLimits-BfgKV5iE.cjs');
17
17
  require('zod');
18
- require('./index-DqlyNgt4.cjs');
18
+ require('./index-C9hI8a10.cjs');
19
19
  require('@paralleldrive/cuid2');
20
20
  require('./limits-C-a7gr04.cjs');
21
- require('./time-BbzJ7PJQ.cjs');
22
- require('./registerCommonHandlers--8ds2auE.cjs');
21
+ require('./time-T0YmeOhS.cjs');
22
+ require('./registerCommonHandlers-Aha_KfM3.cjs');
23
23
  require('util');
24
24
  require('fs/promises');
25
25
  require('crypto');
@@ -27,10 +27,10 @@ require('path');
27
27
  require('cross-spawn');
28
28
  require('./projectPath-ChLhdOyt.cjs');
29
29
  require('url');
30
- require('./sync-DwUUGGFz.cjs');
30
+ require('./sync-x_lI_3j_.cjs');
31
31
  require('./backgroundTaskActivity-CBvUdj39.cjs');
32
- require('./controlClient-RWTlQA4_.cjs');
33
- require('./persistence-C6ztVW1W.cjs');
32
+ require('./controlClient-CmnHGcyl.cjs');
33
+ require('./persistence-2Xp_o6x6.cjs');
34
34
  require('node:fs/promises');
35
35
  require('node:fs');
36
36
  require('./contentLogMetadata-ZSFk_NjQ.cjs');
@@ -38,7 +38,7 @@ require('chalk');
38
38
  require('node:util');
39
39
  require('node:path');
40
40
  require('node:os');
41
- require('./package-UkmvSFsg.cjs');
41
+ require('./package-C1XvUQFy.cjs');
42
42
 
43
43
 
44
44
 
package/dist/lib.d.cts CHANGED
@@ -506,6 +506,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
506
506
  rpcAvailable: z$1.ZodBoolean;
507
507
  detectedAt: z$1.ZodNumber;
508
508
  }, z$1.core.$strip>>;
509
+ historySearch: z$1.ZodOptional<z$1.ZodObject<{
510
+ rpcAvailable: z$1.ZodBoolean;
511
+ detectedAt: z$1.ZodNumber;
512
+ }, z$1.core.$strip>>;
509
513
  terminalHost: z$1.ZodOptional<z$1.ZodObject<{
510
514
  tmuxAvailable: z$1.ZodBoolean;
511
515
  tmuxVersion: z$1.ZodOptional<z$1.ZodString>;
@@ -563,6 +567,21 @@ declare const DaemonStateSchema: z$1.ZodObject<{
563
567
  }, z$1.core.$strip>;
564
568
  checkedAt: z$1.ZodNumber;
565
569
  }, z$1.core.$strip>>;
570
+ rateLimits: z$1.ZodOptional<z$1.ZodObject<{
571
+ v: z$1.ZodLiteral<1>;
572
+ updatedAt: z$1.ZodNumber;
573
+ providers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
574
+ observedAt: z$1.ZodNumber;
575
+ status: z$1.ZodOptional<z$1.ZodString>;
576
+ windows: z$1.ZodArray<z$1.ZodObject<{
577
+ kind: z$1.ZodString;
578
+ usedPercent: z$1.ZodNumber;
579
+ resetsAt: z$1.ZodNullable<z$1.ZodNumber>;
580
+ windowMinutes: z$1.ZodOptional<z$1.ZodNumber>;
581
+ observedAt: z$1.ZodNumber;
582
+ }, z$1.core.$strip>>;
583
+ }, z$1.core.$strip>>;
584
+ }, z$1.core.$strip>>;
566
585
  }, z$1.core.$strip>;
567
586
  type DaemonState = z$1.infer<typeof DaemonStateSchema>;
568
587
  type ClaudeAuthState = ClaudeAuthState$1;
@@ -787,6 +806,8 @@ type Metadata = {
787
806
  attention?: 'none' | 'review' | 'blocked';
788
807
  /** one-line Chinese progress note */
789
808
  progress?: string;
809
+ /** B-556: optional phase from report_progress (self-report only) */
810
+ phase?: string;
790
811
  analyzedAt: number;
791
812
  };
792
813
  };
@@ -1321,7 +1342,7 @@ declare class ApiSessionClient extends EventEmitter {
1321
1342
  * payload on this channel is (clipboard, fs RPC) — and a path leaks
1322
1343
  * project/client names and directory structure.
1323
1344
  */
1324
- pushFilePreview(path: string, mode?: 'file' | 'diff'): {
1345
+ pushFilePreview(path: string, mode?: 'file' | 'diff', intent?: 'download'): {
1325
1346
  delivered: boolean;
1326
1347
  error?: string;
1327
1348
  };
@@ -1545,6 +1566,26 @@ interface CLIAvailability {
1545
1566
  detectedAt: number;
1546
1567
  }
1547
1568
 
1569
+ type RateLimitProvider = 'claude' | 'codex';
1570
+ type RateLimitWindow = {
1571
+ /** five_hour | seven_day | seven_day_opus | seven_day_sonnet | seven_day_overage_included | window_<mins>m */
1572
+ kind: string;
1573
+ /** 0–100, may exceed 100 when usage legitimately runs past the cap. */
1574
+ usedPercent: number;
1575
+ /** ms epoch, null when unknown. */
1576
+ resetsAt: number | null;
1577
+ windowMinutes?: number;
1578
+ /** ms epoch of the observation that produced this value. */
1579
+ observedAt: number;
1580
+ };
1581
+ /** One provider's observation as sent wrapper → daemon. */
1582
+ type RateLimitReport = {
1583
+ provider: RateLimitProvider;
1584
+ observedAt: number;
1585
+ status?: string;
1586
+ windows: RateLimitWindow[];
1587
+ };
1588
+
1548
1589
  /**
1549
1590
  * WebSocket client for machine/daemon communication with Happy server
1550
1591
  * Similar to ApiSessionClient but for machine-scoped connections
@@ -1576,6 +1617,8 @@ declare class ApiMachineClient {
1576
1617
  private keepAliveInterval;
1577
1618
  private lastKnownCLIAvailability;
1578
1619
  private lastKnownResumeSupport;
1620
+ /** B-549: created on the first `history-search` call. */
1621
+ private historySearch;
1579
1622
  /** Wall-clock of the last CLI availability probe. Initialised as "already
1580
1623
  * stale" so the FIRST keep-alive tick always probes and populates the
1581
1624
  * machine metadata that a connecting/reconnecting web client reads. */
@@ -1585,6 +1628,8 @@ declare class ApiMachineClient {
1585
1628
  private cliUpdateState;
1586
1629
  private cliUpdatePushChain;
1587
1630
  private claudeAuthState;
1631
+ private rateLimitPushChain;
1632
+ private readonly rateLimitPublisher;
1588
1633
  private rpcHandlerManager;
1589
1634
  private resumeSessionHandler;
1590
1635
  private restartSessionHandler;
@@ -1609,6 +1654,9 @@ declare class ApiMachineClient {
1609
1654
  * `set-terminal-title` RPC.
1610
1655
  */
1611
1656
  setTerminalTitle(terminalId: string, title: string, ifAbsent: boolean): boolean;
1657
+ /** B-547: a status hook forwarded from a daemon-launched claude inside a
1658
+ * web terminal (control server /terminal-agent-hook → here). */
1659
+ ingestTerminalAgentHook(body: unknown): void;
1612
1660
  /**
1613
1661
  * Push text to the clipboard of every web client the user has open
1614
1662
  * (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
@@ -1621,7 +1669,7 @@ declare class ApiMachineClient {
1621
1669
  error?: string;
1622
1670
  };
1623
1671
  /** Queue a terminal preview with the machine key. Delivery does not prove a browser opened it. */
1624
- pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff'): {
1672
+ pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff', intent?: 'download'): {
1625
1673
  delivered: boolean;
1626
1674
  error?: string;
1627
1675
  };
@@ -1643,6 +1691,9 @@ declare class ApiMachineClient {
1643
1691
  /** Cache the latest relay policy locally and publish it now or on the next
1644
1692
  * socket connect. This makes startup/offline races harmless. */
1645
1693
  setCliUpdateState(state: CliUpdateState | null): void;
1694
+ /** B-555: a wrapper's rate-limit observation; written throttled by the publisher. */
1695
+ reportRateLimits(report: RateLimitReport): void;
1696
+ private writeRateLimits;
1646
1697
  /**
1647
1698
  * B-276: publish the daemon-context Claude auth preflight into daemonState
1648
1699
  * (same serialized push chain as the CLI update policy). Resolves true when
@@ -1728,6 +1779,8 @@ declare class ApiMachineClient {
1728
1779
  private refreshRelayConnection;
1729
1780
  private startSmartReconnect;
1730
1781
  private stopKeepAlive;
1782
+ /** B-550: final terminal scrollback checkpoint; resolves within ~300ms, never rejects. */
1783
+ flushTerminalScrollback(): Promise<void>;
1731
1784
  shutdown(): void;
1732
1785
  }
1733
1786
 
package/dist/lib.d.mts CHANGED
@@ -506,6 +506,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
506
506
  rpcAvailable: z$1.ZodBoolean;
507
507
  detectedAt: z$1.ZodNumber;
508
508
  }, z$1.core.$strip>>;
509
+ historySearch: z$1.ZodOptional<z$1.ZodObject<{
510
+ rpcAvailable: z$1.ZodBoolean;
511
+ detectedAt: z$1.ZodNumber;
512
+ }, z$1.core.$strip>>;
509
513
  terminalHost: z$1.ZodOptional<z$1.ZodObject<{
510
514
  tmuxAvailable: z$1.ZodBoolean;
511
515
  tmuxVersion: z$1.ZodOptional<z$1.ZodString>;
@@ -563,6 +567,21 @@ declare const DaemonStateSchema: z$1.ZodObject<{
563
567
  }, z$1.core.$strip>;
564
568
  checkedAt: z$1.ZodNumber;
565
569
  }, z$1.core.$strip>>;
570
+ rateLimits: z$1.ZodOptional<z$1.ZodObject<{
571
+ v: z$1.ZodLiteral<1>;
572
+ updatedAt: z$1.ZodNumber;
573
+ providers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
574
+ observedAt: z$1.ZodNumber;
575
+ status: z$1.ZodOptional<z$1.ZodString>;
576
+ windows: z$1.ZodArray<z$1.ZodObject<{
577
+ kind: z$1.ZodString;
578
+ usedPercent: z$1.ZodNumber;
579
+ resetsAt: z$1.ZodNullable<z$1.ZodNumber>;
580
+ windowMinutes: z$1.ZodOptional<z$1.ZodNumber>;
581
+ observedAt: z$1.ZodNumber;
582
+ }, z$1.core.$strip>>;
583
+ }, z$1.core.$strip>>;
584
+ }, z$1.core.$strip>>;
566
585
  }, z$1.core.$strip>;
567
586
  type DaemonState = z$1.infer<typeof DaemonStateSchema>;
568
587
  type ClaudeAuthState = ClaudeAuthState$1;
@@ -787,6 +806,8 @@ type Metadata = {
787
806
  attention?: 'none' | 'review' | 'blocked';
788
807
  /** one-line Chinese progress note */
789
808
  progress?: string;
809
+ /** B-556: optional phase from report_progress (self-report only) */
810
+ phase?: string;
790
811
  analyzedAt: number;
791
812
  };
792
813
  };
@@ -1321,7 +1342,7 @@ declare class ApiSessionClient extends EventEmitter {
1321
1342
  * payload on this channel is (clipboard, fs RPC) — and a path leaks
1322
1343
  * project/client names and directory structure.
1323
1344
  */
1324
- pushFilePreview(path: string, mode?: 'file' | 'diff'): {
1345
+ pushFilePreview(path: string, mode?: 'file' | 'diff', intent?: 'download'): {
1325
1346
  delivered: boolean;
1326
1347
  error?: string;
1327
1348
  };
@@ -1545,6 +1566,26 @@ interface CLIAvailability {
1545
1566
  detectedAt: number;
1546
1567
  }
1547
1568
 
1569
+ type RateLimitProvider = 'claude' | 'codex';
1570
+ type RateLimitWindow = {
1571
+ /** five_hour | seven_day | seven_day_opus | seven_day_sonnet | seven_day_overage_included | window_<mins>m */
1572
+ kind: string;
1573
+ /** 0–100, may exceed 100 when usage legitimately runs past the cap. */
1574
+ usedPercent: number;
1575
+ /** ms epoch, null when unknown. */
1576
+ resetsAt: number | null;
1577
+ windowMinutes?: number;
1578
+ /** ms epoch of the observation that produced this value. */
1579
+ observedAt: number;
1580
+ };
1581
+ /** One provider's observation as sent wrapper → daemon. */
1582
+ type RateLimitReport = {
1583
+ provider: RateLimitProvider;
1584
+ observedAt: number;
1585
+ status?: string;
1586
+ windows: RateLimitWindow[];
1587
+ };
1588
+
1548
1589
  /**
1549
1590
  * WebSocket client for machine/daemon communication with Happy server
1550
1591
  * Similar to ApiSessionClient but for machine-scoped connections
@@ -1576,6 +1617,8 @@ declare class ApiMachineClient {
1576
1617
  private keepAliveInterval;
1577
1618
  private lastKnownCLIAvailability;
1578
1619
  private lastKnownResumeSupport;
1620
+ /** B-549: created on the first `history-search` call. */
1621
+ private historySearch;
1579
1622
  /** Wall-clock of the last CLI availability probe. Initialised as "already
1580
1623
  * stale" so the FIRST keep-alive tick always probes and populates the
1581
1624
  * machine metadata that a connecting/reconnecting web client reads. */
@@ -1585,6 +1628,8 @@ declare class ApiMachineClient {
1585
1628
  private cliUpdateState;
1586
1629
  private cliUpdatePushChain;
1587
1630
  private claudeAuthState;
1631
+ private rateLimitPushChain;
1632
+ private readonly rateLimitPublisher;
1588
1633
  private rpcHandlerManager;
1589
1634
  private resumeSessionHandler;
1590
1635
  private restartSessionHandler;
@@ -1609,6 +1654,9 @@ declare class ApiMachineClient {
1609
1654
  * `set-terminal-title` RPC.
1610
1655
  */
1611
1656
  setTerminalTitle(terminalId: string, title: string, ifAbsent: boolean): boolean;
1657
+ /** B-547: a status hook forwarded from a daemon-launched claude inside a
1658
+ * web terminal (control server /terminal-agent-hook → here). */
1659
+ ingestTerminalAgentHook(body: unknown): void;
1612
1660
  /**
1613
1661
  * Push text to the clipboard of every web client the user has open
1614
1662
  * (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
@@ -1621,7 +1669,7 @@ declare class ApiMachineClient {
1621
1669
  error?: string;
1622
1670
  };
1623
1671
  /** Queue a terminal preview with the machine key. Delivery does not prove a browser opened it. */
1624
- pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff'): {
1672
+ pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff', intent?: 'download'): {
1625
1673
  delivered: boolean;
1626
1674
  error?: string;
1627
1675
  };
@@ -1643,6 +1691,9 @@ declare class ApiMachineClient {
1643
1691
  /** Cache the latest relay policy locally and publish it now or on the next
1644
1692
  * socket connect. This makes startup/offline races harmless. */
1645
1693
  setCliUpdateState(state: CliUpdateState | null): void;
1694
+ /** B-555: a wrapper's rate-limit observation; written throttled by the publisher. */
1695
+ reportRateLimits(report: RateLimitReport): void;
1696
+ private writeRateLimits;
1646
1697
  /**
1647
1698
  * B-276: publish the daemon-context Claude auth preflight into daemonState
1648
1699
  * (same serialized push chain as the CLI update policy). Resolves true when
@@ -1728,6 +1779,8 @@ declare class ApiMachineClient {
1728
1779
  private refreshRelayConnection;
1729
1780
  private startSmartReconnect;
1730
1781
  private stopKeepAlive;
1782
+ /** B-550: final terminal scrollback checkpoint; resolves within ~300ms, never rejects. */
1783
+ flushTerminalScrollback(): Promise<void>;
1731
1784
  shutdown(): void;
1732
1785
  }
1733
1786
 
package/dist/lib.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { A as ApiClient, a as ApiSessionClient } from './api-DTVPUE7g.mjs';
2
- export { l as logger } from './logger-CknSVkIe.mjs';
3
- export { c as configuration } from './configuration-L1qcGTFM.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient } from './api-Cmz3XS4P.mjs';
2
+ export { l as logger } from './logger-BpQcwNnt.mjs';
3
+ export { c as configuration } from './configuration-D2v3puap.mjs';
4
4
  export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
5
5
  import 'axios';
6
- import './lidState-BLHLmhwd.mjs';
6
+ import './lidState-BfximpjX.mjs';
7
7
  import './authRelay-DSAvg1uv.mjs';
8
8
  import 'node:crypto';
9
9
  import 'tweetnacl';
@@ -11,13 +11,13 @@ import 'os';
11
11
  import 'child_process';
12
12
  import 'node:events';
13
13
  import 'socket.io-client';
14
- import './attachmentLimits-B8nzhw-i.mjs';
14
+ import './attachmentLimits-C1PCCM79.mjs';
15
15
  import 'zod';
16
- import './index-vVWpCoTr.mjs';
16
+ import './index-B0HEEYGh.mjs';
17
17
  import '@paralleldrive/cuid2';
18
18
  import './limits-DIo7rEBR.mjs';
19
- import './time-v1Y_qEJp.mjs';
20
- import './registerCommonHandlers-BR0J4g64.mjs';
19
+ import './time-CfDKj6Bx.mjs';
20
+ import './registerCommonHandlers-DdfGsFbM.mjs';
21
21
  import 'util';
22
22
  import 'fs/promises';
23
23
  import 'crypto';
@@ -25,10 +25,10 @@ import 'path';
25
25
  import 'cross-spawn';
26
26
  import './projectPath-BTBIMB57.mjs';
27
27
  import 'url';
28
- import './sync-Dfm6K2te.mjs';
28
+ import './sync-BLpH13Kb.mjs';
29
29
  import './backgroundTaskActivity-8PdPxrvy.mjs';
30
- import './controlClient-Ci7HTMII.mjs';
31
- import './persistence-DujtUH94.mjs';
30
+ import './controlClient-BMUJfUeF.mjs';
31
+ import './persistence-B9LmhAE2.mjs';
32
32
  import 'node:fs/promises';
33
33
  import 'node:fs';
34
34
  import './contentLogMetadata-BlWI0egu.mjs';
@@ -36,4 +36,4 @@ import 'chalk';
36
36
  import 'node:util';
37
37
  import 'node:path';
38
38
  import 'node:os';
39
- import './package-VIUXrYZ1.mjs';
39
+ import './package-BqwrPxL0.mjs';
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-CknSVkIe.mjs';
1
+ import { l as logger } from './logger-BpQcwNnt.mjs';
2
2
  import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
3
3
  import os from 'os';
4
4
  import { execSync } from 'child_process';
@@ -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
  var authRelay = require('./authRelay-BdYkC1Po.cjs');
5
5
  var os = require('os');
6
6
  var child_process = require('child_process');
@@ -4,7 +4,7 @@ import { join } from 'node:path';
4
4
  import tweetnacl from 'tweetnacl';
5
5
  import { z } from 'zod';
6
6
  import { c as credentialRelayProblem, d as decodeBase64 } from './authRelay-DSAvg1uv.mjs';
7
- import { c as configuration } from './configuration-L1qcGTFM.mjs';
7
+ import { c as configuration } from './configuration-D2v3puap.mjs';
8
8
 
9
9
  const AgentCredentialsSchema = z.object({
10
10
  token: z.string().min(1),
@@ -6,7 +6,7 @@ var path = require('node:path');
6
6
  var tweetnacl = require('tweetnacl');
7
7
  var z = require('zod');
8
8
  var authRelay = require('./authRelay-BdYkC1Po.cjs');
9
- var configuration = require('./configuration-BE61XNsg.cjs');
9
+ var configuration = require('./configuration-B0cb3xA3.cjs');
10
10
 
11
11
  const AgentCredentialsSchema = z.z.object({
12
12
  token: z.z.string().min(1),
@@ -1,6 +1,6 @@
1
1
  import chalk from 'chalk';
2
2
  import { inspect } from 'node:util';
3
- import { d as appendPrivateFileSync, c as configuration } from './configuration-L1qcGTFM.mjs';
3
+ import { d as appendPrivateFileSync, c as configuration } from './configuration-D2v3puap.mjs';
4
4
  import { existsSync, readdirSync, statSync } from 'node:fs';
5
5
  import { join, basename } from 'node:path';
6
6
 
@@ -236,7 +236,7 @@ async function listDaemonLogFiles(limit = 50) {
236
236
  return { file, path: fullPath, modified: stats.mtime };
237
237
  }).sort((a, b) => b.modified.getTime() - a.modified.getTime());
238
238
  try {
239
- const { readDaemonState } = await import('./persistence-DujtUH94.mjs');
239
+ const { readDaemonState } = await import('./persistence-B9LmhAE2.mjs');
240
240
  const state = await readDaemonState();
241
241
  if (!state) {
242
242
  return logs;