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.
- package/README.md +1 -1
- package/dist/{AcpBackend-DCfNt9bD.cjs → AcpBackend-20VHOXwb.cjs} +3 -3
- package/dist/{AcpBackend-C11FnVw5.mjs → AcpBackend-tRWk7yi7.mjs} +3 -3
- package/dist/{AcpSessionManager-BQnDJvct.mjs → AcpSessionManager-B7FIrsys.mjs} +1 -1
- package/dist/{AcpSessionManager-9yN2iH4b.cjs → AcpSessionManager-Zf00QnlL.cjs} +1 -1
- package/dist/{BasePermissionHandler-CwJ48yiB.mjs → BasePermissionHandler-CDCLIrZJ.mjs} +1 -1
- package/dist/{BasePermissionHandler-BwQHxl6M.cjs → BasePermissionHandler-COKc4pmt.cjs} +1 -1
- package/dist/{BaseReasoningProcessor-ClF2g1qz.mjs → BaseReasoningProcessor-BDVKvooR.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-81lf_M8G.cjs → BaseReasoningProcessor-DAGQdkNp.cjs} +1 -1
- package/dist/{agentGuidance-CQuNlNx8.mjs → agentGuidance-BDYt2Qy2.mjs} +4 -2
- package/dist/{agentGuidance-B5NATuFa.cjs → agentGuidance-BtBx2xxE.cjs} +4 -1
- package/dist/{agentHome-DvR176E5.mjs → agentHome-2IbIjKCa.mjs} +4 -4
- package/dist/{agentHome-D3Nn82kI.cjs → agentHome-KVWj6nCl.cjs} +4 -4
- package/dist/{api-DTVPUE7g.mjs → api-Cmz3XS4P.mjs} +14 -12
- package/dist/{api-AzdzTKFs.cjs → api-DnNL5fLw.cjs} +14 -12
- package/dist/{apiMachine-BQ-b4Lu3.mjs → apiMachine-B6ySCFe0.mjs} +2137 -65
- package/dist/{apiMachine-B_cJldfa.cjs → apiMachine-DeoQ8QbZ.cjs} +2134 -62
- package/dist/{attachmentContent-dzIs-wis.mjs → attachmentContent-CTXapi-_.mjs} +2 -2
- package/dist/{attachmentContent-muDCe4Gy.cjs → attachmentContent-DPWxHgX4.cjs} +2 -2
- package/dist/{attachmentLimits-eJZ4ZBjF.cjs → attachmentLimits-BfgKV5iE.cjs} +28 -2
- package/dist/{attachmentLimits-B8nzhw-i.mjs → attachmentLimits-C1PCCM79.mjs} +28 -2
- package/dist/{auth-Jtmvh1w4.mjs → auth-BMaBjRAj.mjs} +8 -8
- package/dist/{auth-DtP-B4gf.cjs → auth-D4-eQz85.cjs} +8 -8
- package/dist/{auth-CfLd3phE.cjs → auth-ietHtvwu.cjs} +5 -5
- package/dist/{auth-BY5ujhGn.mjs → auth-pzWIFdOD.mjs} +5 -5
- package/dist/{auto-DjWfR1UB.mjs → auto-DL75Dx3I.mjs} +83 -21
- package/dist/{auto-ClNnbSoF.cjs → auto-DOWTQDPa.cjs} +84 -20
- package/dist/{bootstrap-B1dMZA-u.cjs → bootstrap-BpXIc2wn.cjs} +2 -2
- package/dist/{bootstrap-D_ExGrY2.mjs → bootstrap-XE8A7Ut2.mjs} +2 -2
- package/dist/{browser-_gV7tcPs.cjs → browser-CcG8GLRV.cjs} +1 -1
- package/dist/{browser-mwzpOmcw.mjs → browser-DDFi1T8C.mjs} +1 -1
- package/dist/{claudeLocal-G5UmJ81F.cjs → claudeLocal-DXBXwIOG.cjs} +6 -6
- package/dist/{claudeLocal-BeHToEK5.mjs → claudeLocal-DmM5Oyhv.mjs} +6 -6
- package/dist/{claudeLocalLauncher-B4y2BsmO.cjs → claudeLocalLauncher-C41Y6Kp4.cjs} +14 -11
- package/dist/{claudeLocalLauncher-Cq6bqAT4.mjs → claudeLocalLauncher-Cs4eUC3P.mjs} +14 -11
- package/dist/{claudeSessionFork-CokUhS4r.mjs → claudeSessionFork-BdLnc2Hv.mjs} +1 -1
- package/dist/{claudeSessionFork-CDJq_b9r.cjs → claudeSessionFork-Cs0I3eGI.cjs} +1 -1
- package/dist/{client-BwaWdlCm.mjs → client-CbK33y_s.mjs} +3 -3
- package/dist/{client-uN9d6Git.cjs → client-DJ0kX_8M.cjs} +2 -2
- package/dist/{client-CJZKBZCE.mjs → client-GjTnsq6F.mjs} +2 -2
- package/dist/{client-Do7cGPEq.cjs → client-JISJx2f-.cjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +23 -18
- package/dist/codex/happyMcpStdioBridge.mjs +22 -17
- package/dist/{codexAppServerClient-BuSdeUxT.cjs → codexAppServerClient-BTjn2ZCZ.cjs} +46 -2
- package/dist/{codexAppServerClient-B0QaMQsC.mjs → codexAppServerClient-CldXEojt.mjs} +47 -3
- package/dist/{codexCommand-YdYmykAR.cjs → codexCommand-BpD0N1F7.cjs} +71 -51
- package/dist/{codexCommand-C3gdjMAw.mjs → codexCommand-DjMU-Ijf.mjs} +71 -51
- package/dist/{config-CGCIFRCN.mjs → config-DjSJKatx.mjs} +3 -3
- package/dist/{config-ChoHFnfO.cjs → config-DuLL0Ppe.cjs} +3 -3
- package/dist/{configuration-BE61XNsg.cjs → configuration-B0cb3xA3.cjs} +1 -1
- package/dist/{configuration-L1qcGTFM.mjs → configuration-D2v3puap.mjs} +1 -1
- package/dist/{connect-D5IKfcfd.cjs → connect-B7JWEzyg.cjs} +13 -13
- package/dist/{connect-CFD0Em6a.mjs → connect-CnNNyM9I.mjs} +13 -13
- package/dist/{context-3WVw8qPz.cjs → context-BFUpYT39.cjs} +1 -1
- package/dist/{context-DaCCB4cm.mjs → context-DjfqLWzE.mjs} +1 -1
- package/dist/{controlClient-Ci7HTMII.mjs → controlClient-BMUJfUeF.mjs} +13 -6
- package/dist/{controlClient-RWTlQA4_.cjs → controlClient-CmnHGcyl.cjs} +13 -5
- package/dist/{createSessionMetadata-CWR-AB2A.mjs → createSessionMetadata-DU0bCg2m.mjs} +2 -2
- package/dist/{createSessionMetadata-CPGTztXP.cjs → createSessionMetadata-DbfRBhRu.cjs} +2 -2
- package/dist/{deterministicJson-BBwG-Ase.mjs → deterministicJson-D-WPUrZb.mjs} +36 -52
- package/dist/{deterministicJson-C4Jo2RWy.cjs → deterministicJson-Dp3TVyap.cjs} +41 -59
- package/dist/{doctor-CAC6qY9Z.mjs → doctor-BlXXyQ1L.mjs} +6 -6
- package/dist/{doctor-ZOQLE5AH.cjs → doctor-CkJmdPbi.cjs} +6 -6
- package/dist/{assistantTools-BsrG3PD-.cjs → downloadTarget-CiQqRIc-.cjs} +44 -6
- package/dist/{assistantTools-DPGga5lM.mjs → downloadTarget-DjSwMHun.mjs} +45 -8
- package/dist/{ensureDaemonRunning-b1pvEFcS.mjs → ensureDaemonRunning-CAQag1zE.mjs} +5 -5
- package/dist/{ensureDaemonRunning-mIgX2vnc.cjs → ensureDaemonRunning-C_aIOhgG.cjs} +5 -5
- package/dist/{handleResumeCommand-DGNhbv-3.cjs → handleResumeCommand-6KzBGDnl.cjs} +5 -5
- package/dist/{handleResumeCommand-CTGbZkCL.mjs → handleResumeCommand-Ci7wacT-.mjs} +5 -5
- package/dist/{index-vVWpCoTr.mjs → index-B0HEEYGh.mjs} +22 -5
- package/dist/{index-DqlyNgt4.cjs → index-C9hI8a10.cjs} +26 -4
- package/dist/{index-BzIxE0Eu.cjs → index-CaFCAlX8.cjs} +3 -3
- package/dist/{index-DrSPR59N.cjs → index-DBmNwMX9.cjs} +39 -38
- package/dist/{index-DIodyAqF.cjs → index-DEKIgZUo.cjs} +4 -4
- package/dist/{index-Diu6HdWH.mjs → index-DQplgo0W.mjs} +4 -4
- package/dist/{index-BgzjPv07.mjs → index-HQsigW_J.mjs} +3 -3
- package/dist/{index-DjtBengz.mjs → index-WGCT6SSV.mjs} +40 -39
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BO_W7VhL.mjs → install-BdvKiOQw.mjs} +2 -0
- package/dist/{install-DrUQk2DJ.cjs → install-CejEiRGW.cjs} +3 -3
- package/dist/{install-Cs5qAPrB.cjs → install-Cf6AFSWC.cjs} +2 -0
- package/dist/{install-Cp_aB-NQ.mjs → install-oJUvsFu9.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +55 -2
- package/dist/lib.d.mts +55 -2
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-BLHLmhwd.mjs → lidState-BfximpjX.mjs} +1 -1
- package/dist/{lidState-z9ekRpZu.cjs → lidState-D8BmnJV1.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BWvmc_Hg.mjs → localHappyAgentAuth-Ct1aXwqd.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BCx0y1qW.cjs → localHappyAgentAuth-d7B6S_o7.cjs} +1 -1
- package/dist/{logger-CknSVkIe.mjs → logger-BpQcwNnt.mjs} +2 -2
- package/dist/{logger-D0hkk7Vo.cjs → logger-JTcJU-uL.cjs} +2 -2
- package/dist/{machineMetadata-BDCYOXQg.cjs → machineMetadata-BBg_Njw3.cjs} +3 -3
- package/dist/{machineMetadata-Cj1DoFot.mjs → machineMetadata-CBdxABeI.mjs} +3 -3
- package/dist/{main-CKUfkVG_.mjs → main-B5b1gA3K.mjs} +44 -44
- package/dist/{main-COAPGIso.cjs → main-C16fOGgn.cjs} +44 -44
- package/dist/{mcp-BILnw4si.cjs → mcp-BnNiBBax.cjs} +24 -19
- package/dist/{mcp-DeYUfpo8.mjs → mcp-DGNWgVdv.mjs} +23 -18
- package/dist/{mirrorProtocol-BUtmg1ws.cjs → mirrorProtocol-BEGk2--0.cjs} +80 -0
- package/dist/{mirrorProtocol-BNLtoWjO.mjs → mirrorProtocol-h5WHpdhh.mjs} +79 -1
- package/dist/{package-VIUXrYZ1.mjs → package-BqwrPxL0.mjs} +7 -7
- package/dist/{package-UkmvSFsg.cjs → package-C1XvUQFy.cjs} +7 -7
- package/dist/{peerTools-SWITnkqz.mjs → peerTools-CeCe-3lk.mjs} +4 -4
- package/dist/{peerTools-CttfOxti.cjs → peerTools-DPvbcs8V.cjs} +4 -4
- package/dist/{persistence-C6ztVW1W.cjs → persistence-2Xp_o6x6.cjs} +3 -3
- package/dist/{persistence-DujtUH94.mjs → persistence-B9LmhAE2.mjs} +3 -3
- package/dist/{piRunnerArgs-BVJHIjlk.mjs → piRunnerArgs-7FaTyNOq.mjs} +1 -1
- package/dist/{piRunnerArgs-tBQg6xDw.cjs → piRunnerArgs-DI29dDNo.cjs} +1 -1
- package/dist/{piRuntime-DKFA8u8t.mjs → piRuntime-0qEK5AqE.mjs} +1 -1
- package/dist/{piRuntime-DZzjF9It.cjs → piRuntime-R8XVChxK.cjs} +1 -1
- package/dist/{piTerminal-t5pQHCPT.cjs → piTerminal-Ccj0KNPr.cjs} +17 -17
- package/dist/{piTerminal-BTSaFlpV.mjs → piTerminal-zcQKc8Sp.mjs} +17 -17
- package/dist/precheckCompat-CWOi5c9L.cjs +29 -0
- package/dist/precheckCompat-DeEbilbr.mjs +26 -0
- package/dist/rateLimitWindows-C2Jk3Ih7.cjs +258 -0
- package/dist/rateLimitWindows-Dhfhbtqu.mjs +248 -0
- package/dist/{registerCommonHandlers--8ds2auE.cjs → registerCommonHandlers-Aha_KfM3.cjs} +2 -2
- package/dist/{registerCommonHandlers-BR0J4g64.mjs → registerCommonHandlers-DdfGsFbM.mjs} +2 -2
- package/dist/{registerKillSessionHandler-CI23l8aJ.cjs → registerKillSessionHandler-CjitOpUA.cjs} +6 -6
- package/dist/{registerKillSessionHandler-Czz0tdki.mjs → registerKillSessionHandler-DboQlGcH.mjs} +6 -6
- package/dist/{remoteSessionClient-DCAUHgPz.mjs → remoteSessionClient-B2DtWuNP.mjs} +5 -5
- package/dist/{remoteSessionClient-BAkIwM2S.cjs → remoteSessionClient-BwI8rpQw.cjs} +5 -5
- package/dist/{tools-mWqsE6ji.cjs → reportProgressTool-B-Rcy0s3.cjs} +73 -9
- package/dist/{tools-BVRoGcQH.mjs → reportProgressTool-DnAD8wOa.mjs} +67 -10
- package/dist/{run-CkKujjn8.cjs → run-Bh66Xs40.cjs} +268 -118
- package/dist/{run-B75qm2I6.mjs → run-DPEwJpQR.mjs} +266 -116
- package/dist/{runClaude-B1T9DLLi.cjs → runClaude-C-lJdAKD.cjs} +25 -20
- package/dist/{runClaude-aBfBweec.mjs → runClaude-DLr_nBzw.mjs} +25 -20
- package/dist/{runClaudeDeps-BOrPP4J1.mjs → runClaudeDeps-C7JV7nXG.mjs} +47 -37
- package/dist/{runClaudeDeps-BGjNGfuZ.cjs → runClaudeDeps-vWWLod7J.cjs} +44 -35
- package/dist/{runGemini-BuAA_OQb.cjs → runGemini-o-CUSayc.cjs} +42 -35
- package/dist/{runGemini-a-V7JE-J.mjs → runGemini-tH6sLw-G.mjs} +42 -35
- package/dist/{runOpenClaw-DUSwXg1A.mjs → runOpenClaw-C5DZvVhn.mjs} +18 -18
- package/dist/{runOpenClaw-BBVffIh9.cjs → runOpenClaw-D24f35l0.cjs} +18 -18
- package/dist/{sandbox-Brb_5wzc.mjs → sandbox-BaL1aslA.mjs} +4 -4
- package/dist/{sandbox-Fd2G5yaq.cjs → sandbox-TJZJ6ngw.cjs} +4 -4
- package/dist/selfCheck-DPi4lqme.mjs +84 -0
- package/dist/{selfCheck-NuJKMInJ.cjs → selfCheck-Dugi0Nk_.cjs} +34 -34
- package/dist/{send-4dgHKC3u.cjs → send-CkWOSYmU.cjs} +8 -8
- package/dist/{send-DEQJiq_x.mjs → send-DDcJ3ayi.mjs} +8 -8
- package/dist/{server-DWGcDmHG.cjs → server-7qFQ8J2u.cjs} +6 -6
- package/dist/{server-C6AlUFkw.mjs → server-CUjRvQSd.mjs} +4 -4
- package/dist/{sessionLock-B1GgaO1q.cjs → sessionLock-DfhNICyS.cjs} +2 -2
- package/dist/{sessionLock-Dm8QyGo4.mjs → sessionLock-DqVyHFAQ.mjs} +2 -2
- package/dist/{sessionModeFile-BvOEJ4Fl.cjs → sessionModeFile-CIznKD7O.cjs} +1 -1
- package/dist/{sessionModeFile-CuNAWCKL.mjs → sessionModeFile-M4OpiyrF.mjs} +1 -1
- package/dist/{sessionOps-DG5MMEp_.mjs → sessionOps-BnaEaOKs.mjs} +4 -4
- package/dist/{sessionOps-JP64uJmc.cjs → sessionOps-DOyy4gkY.cjs} +4 -4
- package/dist/{sessionScanner-DqSk5Ol_.mjs → sessionScanner-CcuOn9uU.mjs} +75 -19
- package/dist/{sessionScanner-BBPEgJ5S.cjs → sessionScanner-Cu1yKlj4.cjs} +75 -19
- package/dist/{sessions-DgJuw_i0.cjs → sessions-BQgk5Kw8.cjs} +9 -9
- package/dist/{sessions-4isbBAWi.mjs → sessions-C9O91rL1.mjs} +9 -9
- package/dist/{setupOfflineReconnection-_MoZtsro.mjs → setupOfflineReconnection-Byy8aeKT.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CKJKVIUS.cjs → setupOfflineReconnection-DFmQ8s6I.cjs} +2 -2
- package/dist/{spawn-CshERWbY.cjs → spawn-BS7LPmSm.cjs} +13 -12
- package/dist/{spawn-BTOG4tTm.mjs → spawn-EZ2yrtWd.mjs} +13 -12
- package/dist/{spawnAgents-Czi2VDzj.mjs → spawnAgents-HDaE3C0-.mjs} +1 -1
- package/dist/{spawnAgents-McixdtV1.cjs → spawnAgents-vglexX9N.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dc4xYm8P.mjs → spawnHappyCLI-BAa49m0q.mjs} +1 -1
- package/dist/{spawnHappyCLI-Dd5_8Vex.cjs → spawnHappyCLI-DyaldIe5.cjs} +1 -1
- package/dist/specialCommands-CCWtwIGZ.mjs +93 -0
- package/dist/specialCommands-DouFaJ_0.cjs +96 -0
- package/dist/{startFileWatcher-1LedLBY-.cjs → startFileWatcher-DQbbypJv.cjs} +1 -1
- package/dist/{startFileWatcher-B0VlG-Fn.mjs → startFileWatcher-Dfs4whzr.mjs} +1 -1
- package/dist/{streamRelay-C0AffuX6.cjs → streamRelay-Ce9sgcOV.cjs} +1 -1
- package/dist/{streamRelay-BzMEEvJU.mjs → streamRelay-Iogsh51a.mjs} +1 -1
- package/dist/{sync-Dfm6K2te.mjs → sync-BLpH13Kb.mjs} +1 -1
- package/dist/{sync-DwUUGGFz.cjs → sync-x_lI_3j_.cjs} +1 -1
- package/dist/{systemPrompt-CB1Ls0AE.cjs → systemPrompt-4erwILTB.cjs} +3 -3
- package/dist/{systemPrompt-D41Zw1a3.mjs → systemPrompt-BanyDihy.mjs} +3 -3
- package/dist/{teams-D8Ly3i6u.mjs → teams-D6BOT3lR.mjs} +7 -7
- package/dist/{teams-NWv2ji16.cjs → teams-DzetlGWC.cjs} +7 -7
- package/dist/{time-v1Y_qEJp.mjs → time-CfDKj6Bx.mjs} +1 -1
- package/dist/{time-BbzJ7PJQ.cjs → time-T0YmeOhS.cjs} +1 -1
- package/dist/{titleGenerator-BhoblAQY.mjs → titleGenerator-ChImQ4q-.mjs} +1 -1
- package/dist/{titleGenerator-cH6IkPRi.cjs → titleGenerator-CoMxqKfP.cjs} +2 -2
- package/dist/{todo-D1hgWV6d.cjs → todo-CZZebKZg.cjs} +6 -6
- package/dist/{todo-CuNct-fw.mjs → todo-SVtYxGON.mjs} +6 -6
- package/dist/{tools-jof0Bu54.mjs → tools-3X2z3YDe.mjs} +1 -1
- package/dist/{tools-c2fb0CF5.cjs → tools-IJ0TAcJs.cjs} +1 -1
- package/dist/transcriptCursor-B7T_gkQ0.mjs +102 -0
- package/dist/transcriptCursor-DcXGLeSc.cjs +106 -0
- package/dist/{uninstall-VPH5GfrA.cjs → uninstall-CqqCWj7w.cjs} +3 -3
- package/dist/{uninstall-BB7WYYAk.mjs → uninstall-CypD-kr1.mjs} +3 -3
- package/package.json +7 -7
- package/scripts/terminal_status_forwarder.cjs +89 -0
- package/dist/selfCheck-BgwJ3NGS.mjs +0 -84
- package/dist/specialCommands-BSqhYg5X.mjs +0 -52
- package/dist/specialCommands-DSsTeRej.cjs +0 -54
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { D as DefaultTransport, A as AcpBackend } from './AcpBackend-
|
|
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-
|
|
3
|
-
import { l as logger } from './logger-
|
|
4
|
-
import { A as AcpSessionManager } from './AcpSessionManager-
|
|
5
|
-
import {
|
|
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-
|
|
8
|
-
import { C as CLAUDE_ATTACHMENT_KINDS, a as stageClaudeAttachments, b as appendStagedAttachmentsToPrompt } from './attachmentContent-
|
|
9
|
-
import { p as preparePiTeamsRuntime } from './piRuntime-
|
|
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-
|
|
13
|
-
import { M as MessageQueue2, r as registerKillSessionHandler } from './registerKillSessionHandler-
|
|
14
|
-
import { h as hashObject, s as startHappyServer } from './deterministicJson-
|
|
15
|
-
import { readSettings } from './persistence-
|
|
16
|
-
import { g as getInitialMachineMetadata } from './machineMetadata-
|
|
17
|
-
import { c as createSessionMetadata } from './createSessionMetadata-
|
|
18
|
-
import { s as setupOfflineReconnection } from './setupOfflineReconnection-
|
|
19
|
-
import { n as notifyDaemonSessionStarted,
|
|
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-
|
|
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-
|
|
24
|
-
import { T as TitleGenerator } from './titleGenerator-
|
|
25
|
-
import { w as writeSessionModeFile, n as normalizeAcpPermissionMode, r as removeSessionModeFile } from './sessionModeFile-
|
|
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-
|
|
29
|
+
import './time-CfDKj6Bx.mjs';
|
|
30
30
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
31
|
-
import './package-
|
|
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-
|
|
39
|
+
import './attachmentLimits-C1PCCM79.mjs';
|
|
40
40
|
import './resources-BdFBQi8r.mjs';
|
|
41
41
|
import 'axios';
|
|
42
|
-
import './lidState-
|
|
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-
|
|
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-
|
|
54
|
+
import './sync-BLpH13Kb.mjs';
|
|
55
55
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
56
56
|
import 'tweetnacl';
|
|
57
57
|
import './types-CkqAACXx.mjs';
|
|
58
|
-
import './client-
|
|
59
|
-
import './context-
|
|
60
|
-
import './sessionOps-
|
|
61
|
-
import './tools-
|
|
62
|
-
import './
|
|
63
|
-
import './client-
|
|
64
|
-
import './
|
|
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-
|
|
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 './
|
|
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-
|
|
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-
|
|
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
package/dist/index.mjs
CHANGED
|
@@ -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-
|
|
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-
|
|
10
|
+
require('./configuration-B0cb3xA3.cjs');
|
|
11
11
|
require('node:fs');
|
|
12
12
|
require('node:os');
|
|
13
13
|
require('node:path');
|
|
14
|
-
require('./package-
|
|
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-
|
|
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-
|
|
8
|
+
import './configuration-D2v3puap.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'node:path';
|
|
12
|
-
import './package-
|
|
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-
|
|
4
|
-
var logger = require('./logger-
|
|
5
|
-
var configuration = require('./configuration-
|
|
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-
|
|
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-
|
|
16
|
+
require('./attachmentLimits-BfgKV5iE.cjs');
|
|
17
17
|
require('zod');
|
|
18
|
-
require('./index-
|
|
18
|
+
require('./index-C9hI8a10.cjs');
|
|
19
19
|
require('@paralleldrive/cuid2');
|
|
20
20
|
require('./limits-C-a7gr04.cjs');
|
|
21
|
-
require('./time-
|
|
22
|
-
require('./registerCommonHandlers
|
|
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-
|
|
30
|
+
require('./sync-x_lI_3j_.cjs');
|
|
31
31
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
32
|
-
require('./controlClient-
|
|
33
|
-
require('./persistence-
|
|
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-
|
|
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-
|
|
2
|
-
export { l as logger } from './logger-
|
|
3
|
-
export { c as configuration } from './configuration-
|
|
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-
|
|
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-
|
|
14
|
+
import './attachmentLimits-C1PCCM79.mjs';
|
|
15
15
|
import 'zod';
|
|
16
|
-
import './index-
|
|
16
|
+
import './index-B0HEEYGh.mjs';
|
|
17
17
|
import '@paralleldrive/cuid2';
|
|
18
18
|
import './limits-DIo7rEBR.mjs';
|
|
19
|
-
import './time-
|
|
20
|
-
import './registerCommonHandlers-
|
|
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-
|
|
28
|
+
import './sync-BLpH13Kb.mjs';
|
|
29
29
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
30
|
-
import './controlClient-
|
|
31
|
-
import './persistence-
|
|
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-
|
|
39
|
+
import './package-BqwrPxL0.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
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';
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
239
|
+
const { readDaemonState } = await import('./persistence-B9LmhAE2.mjs');
|
|
240
240
|
const state = await readDaemonState();
|
|
241
241
|
if (!state) {
|
|
242
242
|
return logs;
|