very-happy-cli 0.2.165 → 0.2.167
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-D1IKJGz_.cjs} +3 -3
- package/dist/{AcpBackend-C11FnVw5.mjs → AcpBackend-kFZlee5E.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-BwQHxl6M.cjs → BasePermissionHandler-DHxYAK5L.cjs} +1 -1
- package/dist/{BasePermissionHandler-CwJ48yiB.mjs → BasePermissionHandler-DS0kRTNI.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-ClF2g1qz.mjs → BaseReasoningProcessor-BRtCCt7q.mjs} +1 -1
- package/dist/{BaseReasoningProcessor-81lf_M8G.cjs → BaseReasoningProcessor-CsjVdt_H.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-Ct-VXFeG.mjs} +4 -4
- package/dist/{agentHome-D3Nn82kI.cjs → agentHome-DeAWzhSe.cjs} +4 -4
- package/dist/{api-AzdzTKFs.cjs → api-BZYLRDM9.cjs} +93 -13
- package/dist/{api-DTVPUE7g.mjs → api-CReZazeT.mjs} +93 -13
- package/dist/{apiMachine-B_cJldfa.cjs → apiMachine-BgMxGPsR.cjs} +2173 -66
- package/dist/{apiMachine-BQ-b4Lu3.mjs → apiMachine-CWndf1Vn.mjs} +2176 -69
- package/dist/{attachmentContent-muDCe4Gy.cjs → attachmentContent-HcJqFQW8.cjs} +2 -2
- package/dist/{attachmentContent-dzIs-wis.mjs → attachmentContent-j875mwU7.mjs} +2 -2
- package/dist/{attachmentLimits-eJZ4ZBjF.cjs → attachmentLimits-BEYEEBm8.cjs} +40 -2
- package/dist/{attachmentLimits-B8nzhw-i.mjs → attachmentLimits-CxG3T18E.mjs} +40 -2
- package/dist/{auth-Jtmvh1w4.mjs → auth-BIHuc7vY.mjs} +10 -10
- package/dist/{auth-BY5ujhGn.mjs → auth-CFS9Lfgv.mjs} +5 -5
- package/dist/{auth-DtP-B4gf.cjs → auth-Myr2Q42x.cjs} +10 -10
- package/dist/{auth-CfLd3phE.cjs → auth-VzWpbo5P.cjs} +5 -5
- package/dist/{auto-ClNnbSoF.cjs → auto-Bf6Dr7_o.cjs} +85 -21
- package/dist/{auto-DjWfR1UB.mjs → auto-Df9-zmuN.mjs} +84 -22
- package/dist/{bootstrap-D_ExGrY2.mjs → bootstrap-BSOxYpaP.mjs} +2 -2
- package/dist/{bootstrap-B1dMZA-u.cjs → bootstrap-Dj8WBiR2.cjs} +2 -2
- package/dist/{browser-mwzpOmcw.mjs → browser-BCFIHOvo.mjs} +1 -1
- package/dist/{browser-_gV7tcPs.cjs → browser-BoCV40yC.cjs} +1 -1
- package/dist/{claudeLocal-G5UmJ81F.cjs → claudeLocal-CGsq7Kul.cjs} +7 -7
- package/dist/{claudeLocal-BeHToEK5.mjs → claudeLocal-D5-eA9SC.mjs} +7 -7
- package/dist/{claudeLocalLauncher-Cq6bqAT4.mjs → claudeLocalLauncher-C9Cc438l.mjs} +15 -12
- package/dist/{claudeLocalLauncher-B4y2BsmO.cjs → claudeLocalLauncher-Cf9QeYDT.cjs} +15 -12
- package/dist/{claudeSessionFork-CDJq_b9r.cjs → claudeSessionFork-Byd8zD1U.cjs} +1 -1
- package/dist/{claudeSessionFork-CokUhS4r.mjs → claudeSessionFork-CMzAva8G.mjs} +1 -1
- package/dist/{client-Do7cGPEq.cjs → client-BKnKRLSt.cjs} +3 -3
- package/dist/{client-CJZKBZCE.mjs → client-C7FYMer0.mjs} +2 -2
- package/dist/{client-uN9d6Git.cjs → client-D0T5-6Ds.cjs} +2 -2
- package/dist/{client-BwaWdlCm.mjs → client-Dsfy_SAb.mjs} +3 -3
- package/dist/codex/happyMcpStdioBridge.cjs +23 -18
- package/dist/codex/happyMcpStdioBridge.mjs +22 -17
- package/dist/{codexAppServerClient-B0QaMQsC.mjs → codexAppServerClient-Dd_4TxHv.mjs} +48 -4
- package/dist/{codexAppServerClient-BuSdeUxT.cjs → codexAppServerClient-TiW9OBk4.cjs} +47 -3
- package/dist/{codexCommand-C3gdjMAw.mjs → codexCommand-BZSr4MKI.mjs} +170 -69
- package/dist/{codexCommand-YdYmykAR.cjs → codexCommand-Bxryqh90.cjs} +170 -69
- package/dist/{config-CGCIFRCN.mjs → config-C_Pj7yxV.mjs} +3 -3
- package/dist/{config-ChoHFnfO.cjs → config-DXPash-r.cjs} +3 -3
- package/dist/{configuration-BE61XNsg.cjs → configuration-C3piBtxY.cjs} +1 -1
- package/dist/{configuration-L1qcGTFM.mjs → configuration-WspKd2C2.mjs} +2 -2
- package/dist/{connect-D5IKfcfd.cjs → connect-BN-IBElA.cjs} +14 -14
- package/dist/{connect-CFD0Em6a.mjs → connect-DGPZs5px.mjs} +14 -14
- package/dist/{context-DaCCB4cm.mjs → context-Cr6a3NTg.mjs} +1 -1
- package/dist/{context-3WVw8qPz.cjs → context-Jrq4-eCZ.cjs} +1 -1
- package/dist/{controlClient-RWTlQA4_.cjs → controlClient-BI6Fw3fQ.cjs} +28 -5
- package/dist/{controlClient-Ci7HTMII.mjs → controlClient-DTheOlvC.mjs} +27 -6
- package/dist/{createSessionMetadata-CWR-AB2A.mjs → createSessionMetadata-BEZ4DIDA.mjs} +57 -5
- package/dist/{createSessionMetadata-CPGTztXP.cjs → createSessionMetadata-zQSz3hgk.cjs} +56 -3
- package/dist/defaultPermissionMode-Cif_RHGb.mjs +191 -0
- package/dist/defaultPermissionMode-DNKNzk7l.cjs +197 -0
- package/dist/{deterministicJson-BBwG-Ase.mjs → deterministicJson-BMMifViN.mjs} +36 -52
- package/dist/{deterministicJson-C4Jo2RWy.cjs → deterministicJson-C7O2ulKY.cjs} +41 -59
- package/dist/{doctor-ZOQLE5AH.cjs → doctor-BykBaMTr.cjs} +6 -6
- package/dist/{doctor-CAC6qY9Z.mjs → doctor-D1KKyPzB.mjs} +6 -6
- package/dist/{assistantTools-BsrG3PD-.cjs → downloadTarget-CWTb2-EM.cjs} +44 -6
- package/dist/{assistantTools-DPGga5lM.mjs → downloadTarget-Cp48jrIP.mjs} +45 -8
- package/dist/{ensureDaemonRunning-b1pvEFcS.mjs → ensureDaemonRunning-Ba5fYoxb.mjs} +5 -5
- package/dist/{ensureDaemonRunning-mIgX2vnc.cjs → ensureDaemonRunning-CCxX7MoP.cjs} +5 -5
- package/dist/{handleResumeCommand-CTGbZkCL.mjs → handleResumeCommand-BTUGlNjB.mjs} +5 -5
- package/dist/{handleResumeCommand-DGNhbv-3.cjs → handleResumeCommand-yPdDQHqz.cjs} +5 -5
- package/dist/{index-vVWpCoTr.mjs → index-B0HEEYGh.mjs} +22 -5
- package/dist/{index-BzIxE0Eu.cjs → index-BjhKqDa0.cjs} +3 -3
- package/dist/{index-BgzjPv07.mjs → index-C3_83bqS.mjs} +3 -3
- package/dist/{index-DqlyNgt4.cjs → index-C9hI8a10.cjs} +26 -4
- package/dist/{index-DjtBengz.mjs → index-CE2GgPbr.mjs} +40 -39
- package/dist/{index-Diu6HdWH.mjs → index-D8m8Ripb.mjs} +4 -4
- package/dist/{index-DrSPR59N.cjs → index-DifM62wX.cjs} +39 -38
- package/dist/{index-DIodyAqF.cjs → index-PNMQPKhz.cjs} +4 -4
- 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-Cp_aB-NQ.mjs → install-C0-QFn9s.mjs} +3 -3
- package/dist/{install-Cs5qAPrB.cjs → install-Cf6AFSWC.cjs} +2 -0
- package/dist/{install-DrUQk2DJ.cjs → install-CqZVeze8.cjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +116 -2
- package/dist/lib.d.mts +116 -2
- package/dist/lib.mjs +12 -12
- package/dist/{lidState-BLHLmhwd.mjs → lidState-B2ZxdREe.mjs} +1 -1
- package/dist/{lidState-z9ekRpZu.cjs → lidState-Bc2K9H9l.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BWvmc_Hg.mjs → localHappyAgentAuth-B5XPEMwk.mjs} +1 -1
- package/dist/{localHappyAgentAuth-BCx0y1qW.cjs → localHappyAgentAuth-T5GOvRha.cjs} +1 -1
- package/dist/{logger-D0hkk7Vo.cjs → logger-B_MWPbZz.cjs} +2 -2
- package/dist/{logger-CknSVkIe.mjs → logger-CbBv3q_b.mjs} +2 -2
- package/dist/{machineMetadata-BDCYOXQg.cjs → machineMetadata-BafS4JY8.cjs} +4 -3
- package/dist/{machineMetadata-Cj1DoFot.mjs → machineMetadata-DHg238U4.mjs} +4 -3
- package/dist/{main-COAPGIso.cjs → main-DNrA0qBy.cjs} +45 -45
- package/dist/{main-CKUfkVG_.mjs → main-DXAK0n7x.mjs} +45 -45
- package/dist/{manager-BQ4flvQZ.mjs → manager-BEsI4qt3.mjs} +9 -3
- package/dist/{manager-Cly8xVIR.cjs → manager-HrEj442o.cjs} +8 -2
- package/dist/{mcp-BILnw4si.cjs → mcp-AvPOhDXy.cjs} +24 -19
- package/dist/{mcp-DeYUfpo8.mjs → mcp-BotAjCdD.mjs} +23 -18
- package/dist/mirrorProtocol-BdcN6QlN.cjs +1270 -0
- package/dist/mirrorProtocol-BwHm8odn.mjs +1247 -0
- package/dist/{package-UkmvSFsg.cjs → package-C9ZP9bpX.cjs} +7 -7
- package/dist/{package-VIUXrYZ1.mjs → package-DU1DxhH9.mjs} +7 -7
- package/dist/{peerTools-CttfOxti.cjs → peerTools-Dkbu7gag.cjs} +4 -4
- package/dist/{peerTools-SWITnkqz.mjs → peerTools-os2DVjA0.mjs} +4 -4
- package/dist/{persistence-C6ztVW1W.cjs → persistence-BYGl0QYw.cjs} +147 -25
- package/dist/{persistence-DujtUH94.mjs → persistence-ON0zpHfb.mjs} +123 -12
- package/dist/{piRunnerArgs-BVJHIjlk.mjs → piRunnerArgs-CYsnT9sV.mjs} +1 -1
- package/dist/{piRunnerArgs-tBQg6xDw.cjs → piRunnerArgs-DpbvstUX.cjs} +1 -1
- package/dist/{piRuntime-DZzjF9It.cjs → piRuntime-CDnILlCd.cjs} +1 -1
- package/dist/{piRuntime-DKFA8u8t.mjs → piRuntime-CmEid-wu.mjs} +1 -1
- package/dist/{piTerminal-BTSaFlpV.mjs → piTerminal-0eNlXSlL.mjs} +17 -17
- package/dist/{piTerminal-t5pQHCPT.cjs → piTerminal-B57TgMON.cjs} +17 -17
- package/dist/precheckCompat-CWOi5c9L.cjs +29 -0
- package/dist/precheckCompat-DeEbilbr.mjs +26 -0
- package/dist/rateLimitWindows-CusGIqlq.cjs +258 -0
- package/dist/rateLimitWindows-vZ9Bo7aT.mjs +248 -0
- package/dist/{registerCommonHandlers-BR0J4g64.mjs → registerCommonHandlers-B0PVff2U.mjs} +2 -2
- package/dist/{registerCommonHandlers--8ds2auE.cjs → registerCommonHandlers-DVYB3iVn.cjs} +2 -2
- package/dist/{registerKillSessionHandler-Czz0tdki.mjs → registerKillSessionHandler-BJMHJHXe.mjs} +15 -10
- package/dist/{registerKillSessionHandler-CI23l8aJ.cjs → registerKillSessionHandler-BwXGKtg_.cjs} +15 -10
- package/dist/{remoteSessionClient-DCAUHgPz.mjs → remoteSessionClient-BzPXSC21.mjs} +5 -5
- package/dist/{remoteSessionClient-BAkIwM2S.cjs → remoteSessionClient-PyUAIhwK.cjs} +5 -5
- package/dist/{tools-BVRoGcQH.mjs → reportProgressTool-BvB13EwC.mjs} +67 -10
- package/dist/{tools-mWqsE6ji.cjs → reportProgressTool-D4KB_4cP.cjs} +73 -9
- package/dist/{run-CkKujjn8.cjs → run-BC8jzq_h.cjs} +558 -122
- package/dist/{run-B75qm2I6.mjs → run-O2M8LsWf.mjs} +556 -120
- package/dist/{runClaude-B1T9DLLi.cjs → runClaude-C7jPa8VP.cjs} +93 -26
- package/dist/{runClaude-aBfBweec.mjs → runClaude-DGkr5E7s.mjs} +93 -26
- package/dist/{runClaudeDeps-BGjNGfuZ.cjs → runClaudeDeps-5kzncqME.cjs} +113 -35
- package/dist/{runClaudeDeps-BOrPP4J1.mjs → runClaudeDeps-CX_TxS78.mjs} +116 -37
- package/dist/{runGemini-BuAA_OQb.cjs → runGemini-BfYA4Uqc.cjs} +43 -36
- package/dist/{runGemini-a-V7JE-J.mjs → runGemini-CwmGBH3L.mjs} +43 -36
- package/dist/{runOpenClaw-DUSwXg1A.mjs → runOpenClaw-BYAPYFyL.mjs} +18 -18
- package/dist/{runOpenClaw-BBVffIh9.cjs → runOpenClaw-C72jut7v.cjs} +18 -18
- package/dist/{sandbox-Fd2G5yaq.cjs → sandbox-Bqkp8IT7.cjs} +4 -4
- package/dist/{sandbox-Brb_5wzc.mjs → sandbox-DlVnK1Vi.mjs} +4 -4
- package/dist/{selfCheck-NuJKMInJ.cjs → selfCheck-B4lLZplk.cjs} +34 -34
- package/dist/selfCheck-DYTGBdIO.mjs +84 -0
- package/dist/{send-DEQJiq_x.mjs → send-B5bWW9Tl.mjs} +8 -8
- package/dist/{send-4dgHKC3u.cjs → send-BCwS6n_s.cjs} +8 -8
- package/dist/{server-C6AlUFkw.mjs → server-CEJfRQfj.mjs} +4 -4
- package/dist/{server-DWGcDmHG.cjs → server-CFWZehnC.cjs} +6 -6
- package/dist/{sessionLock-Dm8QyGo4.mjs → sessionLock-AwOYsKT7.mjs} +12 -4
- package/dist/{sessionLock-B1GgaO1q.cjs → sessionLock-LBWNjpHf.cjs} +12 -3
- package/dist/{sessionModeFile-BvOEJ4Fl.cjs → sessionModeFile-CyPuZRIU.cjs} +1 -1
- package/dist/{sessionModeFile-CuNAWCKL.mjs → sessionModeFile-fvFn1JVG.mjs} +1 -1
- package/dist/{sessionOps-DG5MMEp_.mjs → sessionOps-DZRH4-hV.mjs} +4 -4
- package/dist/{sessionOps-JP64uJmc.cjs → sessionOps-DzbZI3Eq.cjs} +4 -4
- package/dist/{sessionScanner-DqSk5Ol_.mjs → sessionScanner-Q_Ei2flB.mjs} +75 -19
- package/dist/{sessionScanner-BBPEgJ5S.cjs → sessionScanner-i-cgwFVw.cjs} +75 -19
- package/dist/{sessions-4isbBAWi.mjs → sessions-DAmjMAZN.mjs} +9 -9
- package/dist/{sessions-DgJuw_i0.cjs → sessions-DYK5hD4T.cjs} +9 -9
- package/dist/{setupOfflineReconnection-_MoZtsro.mjs → setupOfflineReconnection-BfDBxNdo.mjs} +2 -2
- package/dist/{setupOfflineReconnection-CKJKVIUS.cjs → setupOfflineReconnection-C2LO3hSP.cjs} +2 -2
- package/dist/{spawn-BTOG4tTm.mjs → spawn-BmjG5j5Y.mjs} +15 -14
- package/dist/{spawn-CshERWbY.cjs → spawn-GK_sXE8h.cjs} +15 -14
- 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-B2h0P4b5.mjs} +1 -1
- package/dist/{spawnHappyCLI-Dd5_8Vex.cjs → spawnHappyCLI-J4iEhfyZ.cjs} +1 -1
- package/dist/specialCommands-DisVxagO.mjs +93 -0
- package/dist/specialCommands-DmJMKspE.cjs +96 -0
- package/dist/{startFileWatcher-B0VlG-Fn.mjs → startFileWatcher-CeK1k5gt.mjs} +1 -1
- package/dist/{startFileWatcher-1LedLBY-.cjs → startFileWatcher-xKo8AoYl.cjs} +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-DwUUGGFz.cjs → sync-Bvc-vh6C.cjs} +1 -1
- package/dist/{sync-Dfm6K2te.mjs → sync-CCwYpJMS.mjs} +1 -1
- package/dist/{systemPrompt-D41Zw1a3.mjs → systemPrompt-BNIkP3tR.mjs} +3 -3
- package/dist/{systemPrompt-CB1Ls0AE.cjs → systemPrompt-DwOddbuG.cjs} +3 -3
- package/dist/{teams-D8Ly3i6u.mjs → teams-DRrLBcys.mjs} +7 -7
- package/dist/{teams-NWv2ji16.cjs → teams-GHMCRZOw.cjs} +7 -7
- package/dist/{time-BbzJ7PJQ.cjs → time-BXvtjhe9.cjs} +1 -1
- package/dist/{time-v1Y_qEJp.mjs → time-PG5Dfwdv.mjs} +1 -1
- package/dist/{titleGenerator-cH6IkPRi.cjs → titleGenerator-B07bZA0V.cjs} +2 -2
- package/dist/{titleGenerator-BhoblAQY.mjs → titleGenerator-CIzfpfZW.mjs} +1 -1
- package/dist/{todo-D1hgWV6d.cjs → todo-B0aeoNu3.cjs} +6 -6
- package/dist/{todo-CuNct-fw.mjs → todo-CfL7SBFc.mjs} +6 -6
- package/dist/{tools-jof0Bu54.mjs → tools-D91mq5Ib.mjs} +1 -1
- package/dist/{tools-c2fb0CF5.cjs → tools-DJIANHSh.cjs} +1 -1
- package/dist/transcriptCursor-B7T_gkQ0.mjs +102 -0
- package/dist/transcriptCursor-DcXGLeSc.cjs +106 -0
- package/dist/{uninstall-BB7WYYAk.mjs → uninstall-5xz3Xvhf.mjs} +3 -3
- package/dist/{uninstall-VPH5GfrA.cjs → uninstall-AtzOfdrj.cjs} +3 -3
- package/package.json +7 -7
- package/scripts/terminal_status_forwarder.cjs +89 -0
- package/dist/defaultPermissionMode-BnxJPVHT.mjs +0 -4
- package/dist/defaultPermissionMode-CxmTXUQR.cjs +0 -7
- package/dist/mirrorProtocol-BNLtoWjO.mjs +0 -170
- package/dist/mirrorProtocol-BUtmg1ws.cjs +0 -186
- package/dist/selfCheck-BgwJ3NGS.mjs +0 -84
- package/dist/specialCommands-BSqhYg5X.mjs +0 -52
- package/dist/specialCommands-DSsTeRej.cjs +0 -54
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-BZYLRDM9.cjs');
|
|
4
|
+
var logger = require('./logger-B_MWPbZz.cjs');
|
|
5
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
6
6
|
var types = require('./types-CRS-srZK.cjs');
|
|
7
7
|
require('axios');
|
|
8
|
-
require('./lidState-
|
|
8
|
+
require('./lidState-Bc2K9H9l.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-BEYEEBm8.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-BXvtjhe9.cjs');
|
|
22
|
+
require('./registerCommonHandlers-DVYB3iVn.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-Bvc-vh6C.cjs');
|
|
31
31
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
32
|
-
require('./controlClient-
|
|
33
|
-
require('./persistence-
|
|
32
|
+
require('./controlClient-BI6Fw3fQ.cjs');
|
|
33
|
+
require('./persistence-BYGl0QYw.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-C9ZP9bpX.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
package/dist/lib.d.cts
CHANGED
|
@@ -367,6 +367,7 @@ type Session = {
|
|
|
367
367
|
declare const MachineMetadataSchema: z$1.ZodObject<{
|
|
368
368
|
teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
369
369
|
teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
|
+
worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
371
|
host: z$1.ZodString;
|
|
371
372
|
platform: z$1.ZodString;
|
|
372
373
|
happyCliVersion: z$1.ZodString;
|
|
@@ -506,6 +507,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
506
507
|
rpcAvailable: z$1.ZodBoolean;
|
|
507
508
|
detectedAt: z$1.ZodNumber;
|
|
508
509
|
}, z$1.core.$strip>>;
|
|
510
|
+
historySearch: z$1.ZodOptional<z$1.ZodObject<{
|
|
511
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
512
|
+
detectedAt: z$1.ZodNumber;
|
|
513
|
+
}, z$1.core.$strip>>;
|
|
509
514
|
terminalHost: z$1.ZodOptional<z$1.ZodObject<{
|
|
510
515
|
tmuxAvailable: z$1.ZodBoolean;
|
|
511
516
|
tmuxVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -563,6 +568,26 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
563
568
|
}, z$1.core.$strip>;
|
|
564
569
|
checkedAt: z$1.ZodNumber;
|
|
565
570
|
}, z$1.core.$strip>>;
|
|
571
|
+
rateLimits: z$1.ZodOptional<z$1.ZodObject<{
|
|
572
|
+
v: z$1.ZodLiteral<1>;
|
|
573
|
+
updatedAt: z$1.ZodNumber;
|
|
574
|
+
providers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
575
|
+
observedAt: z$1.ZodNumber;
|
|
576
|
+
status: z$1.ZodOptional<z$1.ZodString>;
|
|
577
|
+
windows: z$1.ZodArray<z$1.ZodObject<{
|
|
578
|
+
kind: z$1.ZodString;
|
|
579
|
+
usedPercent: z$1.ZodNumber;
|
|
580
|
+
resetsAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
581
|
+
windowMinutes: z$1.ZodOptional<z$1.ZodNumber>;
|
|
582
|
+
observedAt: z$1.ZodNumber;
|
|
583
|
+
}, z$1.core.$strip>>;
|
|
584
|
+
}, z$1.core.$strip>>;
|
|
585
|
+
}, z$1.core.$strip>>;
|
|
586
|
+
agentHibernation: z$1.ZodOptional<z$1.ZodObject<{
|
|
587
|
+
idleMs: z$1.ZodNumber;
|
|
588
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
589
|
+
detectedAt: z$1.ZodNumber;
|
|
590
|
+
}, z$1.core.$loose>>;
|
|
566
591
|
}, z$1.core.$strip>;
|
|
567
592
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
568
593
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -695,6 +720,11 @@ type Metadata = {
|
|
|
695
720
|
queueCancellation?: boolean;
|
|
696
721
|
/** Explicit feature negotiation; old CLIs omit this field. */
|
|
697
722
|
capabilities?: string[];
|
|
723
|
+
/** B-586: session started inside a linked git worktree (snapshot at start). Old clients ignore it. */
|
|
724
|
+
worktree?: {
|
|
725
|
+
branch: string | null;
|
|
726
|
+
root: string;
|
|
727
|
+
} | null;
|
|
698
728
|
homeDir: string;
|
|
699
729
|
happyHomeDir: string;
|
|
700
730
|
happyLibDir: string;
|
|
@@ -706,6 +736,19 @@ type Metadata = {
|
|
|
706
736
|
lifecycleStateSince?: number;
|
|
707
737
|
archivedBy?: string;
|
|
708
738
|
archiveReason?: string;
|
|
739
|
+
/**
|
|
740
|
+
* B-587: written by a wrapper that exited by idle hibernation (offline, not
|
|
741
|
+
* archived); cleared by the next wrapper on reconnect. `seq` = its message
|
|
742
|
+
* cursor — records above it are replayed on wake. Old clients ignore it.
|
|
743
|
+
*/
|
|
744
|
+
hibernation?: {
|
|
745
|
+
at: number;
|
|
746
|
+
seq: number;
|
|
747
|
+
idleMs: number;
|
|
748
|
+
v: 1;
|
|
749
|
+
};
|
|
750
|
+
/** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
|
|
751
|
+
keepAwake?: boolean;
|
|
709
752
|
flavor?: string;
|
|
710
753
|
sandbox?: SandboxConfig | null;
|
|
711
754
|
dangerouslySkipPermissions?: boolean | null;
|
|
@@ -787,6 +830,8 @@ type Metadata = {
|
|
|
787
830
|
attention?: 'none' | 'review' | 'blocked';
|
|
788
831
|
/** one-line Chinese progress note */
|
|
789
832
|
progress?: string;
|
|
833
|
+
/** B-556: optional phase from report_progress (self-report only) */
|
|
834
|
+
phase?: string;
|
|
790
835
|
analyzedAt: number;
|
|
791
836
|
};
|
|
792
837
|
};
|
|
@@ -1265,6 +1310,28 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1265
1310
|
} | {
|
|
1266
1311
|
type: 'ready';
|
|
1267
1312
|
}, id?: string): void;
|
|
1313
|
+
/** Last user/agent activity this wrapper saw (spec §2.1). */
|
|
1314
|
+
private lastActivity;
|
|
1315
|
+
private inboundFrozen;
|
|
1316
|
+
private frozenInbound;
|
|
1317
|
+
private heartbeatsMuted;
|
|
1318
|
+
private lastHeartbeat;
|
|
1319
|
+
get lastHeartbeatAt(): number;
|
|
1320
|
+
muteHeartbeats(): void;
|
|
1321
|
+
unmuteHeartbeats(): void;
|
|
1322
|
+
private inboundRoutedDuringCommit;
|
|
1323
|
+
noteActivity(now?: number): void;
|
|
1324
|
+
get lastActivityAt(): number;
|
|
1325
|
+
/** The message cursor (highest seq this wrapper has seen). */
|
|
1326
|
+
get messageCursor(): number;
|
|
1327
|
+
/** Start watching for inbound routed during the hibernation commit window. */
|
|
1328
|
+
beginHibernationCommit(): void;
|
|
1329
|
+
/** Was any inbound message routed since beginHibernationCommit()? */
|
|
1330
|
+
inboundRoutedSinceCommit(): boolean;
|
|
1331
|
+
/** Stop routing inbound messages; the next wrapper replays them (spec §3/§4). */
|
|
1332
|
+
freezeInbound(): void;
|
|
1333
|
+
/** An aborted hibernation: route whatever arrived while frozen, in order. */
|
|
1334
|
+
unfreezeInbound(): void;
|
|
1268
1335
|
/**
|
|
1269
1336
|
* Send a ping message to keep the connection alive
|
|
1270
1337
|
*/
|
|
@@ -1321,7 +1388,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1321
1388
|
* payload on this channel is (clipboard, fs RPC) — and a path leaks
|
|
1322
1389
|
* project/client names and directory structure.
|
|
1323
1390
|
*/
|
|
1324
|
-
pushFilePreview(path: string, mode?: 'file' | 'diff'): {
|
|
1391
|
+
pushFilePreview(path: string, mode?: 'file' | 'diff', intent?: 'download'): {
|
|
1325
1392
|
delivered: boolean;
|
|
1326
1393
|
error?: string;
|
|
1327
1394
|
};
|
|
@@ -1358,6 +1425,13 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1358
1425
|
body: unknown;
|
|
1359
1426
|
}>>;
|
|
1360
1427
|
updateMetadata(handler: (metadata: Metadata) => Metadata): void;
|
|
1428
|
+
/**
|
|
1429
|
+
* B-587: the same write, awaitable with a ceiling — the hibernation stamp
|
|
1430
|
+
* must land before `session-end`. Resolves false on timeout (the write
|
|
1431
|
+
* itself keeps retrying in the background, exactly like updateMetadata).
|
|
1432
|
+
*/
|
|
1433
|
+
updateMetadataAndWait(handler: (metadata: Metadata) => Metadata, timeoutMs?: number): Promise<boolean>;
|
|
1434
|
+
private writeMetadata;
|
|
1361
1435
|
/**
|
|
1362
1436
|
* Update session agent state
|
|
1363
1437
|
* @param handler - Handler function that returns the updated agent state
|
|
@@ -1545,6 +1619,26 @@ interface CLIAvailability {
|
|
|
1545
1619
|
detectedAt: number;
|
|
1546
1620
|
}
|
|
1547
1621
|
|
|
1622
|
+
type RateLimitProvider = 'claude' | 'codex';
|
|
1623
|
+
type RateLimitWindow = {
|
|
1624
|
+
/** five_hour | seven_day | seven_day_opus | seven_day_sonnet | seven_day_overage_included | window_<mins>m */
|
|
1625
|
+
kind: string;
|
|
1626
|
+
/** 0–100, may exceed 100 when usage legitimately runs past the cap. */
|
|
1627
|
+
usedPercent: number;
|
|
1628
|
+
/** ms epoch, null when unknown. */
|
|
1629
|
+
resetsAt: number | null;
|
|
1630
|
+
windowMinutes?: number;
|
|
1631
|
+
/** ms epoch of the observation that produced this value. */
|
|
1632
|
+
observedAt: number;
|
|
1633
|
+
};
|
|
1634
|
+
/** One provider's observation as sent wrapper → daemon. */
|
|
1635
|
+
type RateLimitReport = {
|
|
1636
|
+
provider: RateLimitProvider;
|
|
1637
|
+
observedAt: number;
|
|
1638
|
+
status?: string;
|
|
1639
|
+
windows: RateLimitWindow[];
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1548
1642
|
/**
|
|
1549
1643
|
* WebSocket client for machine/daemon communication with Happy server
|
|
1550
1644
|
* Similar to ApiSessionClient but for machine-scoped connections
|
|
@@ -1576,6 +1670,8 @@ declare class ApiMachineClient {
|
|
|
1576
1670
|
private keepAliveInterval;
|
|
1577
1671
|
private lastKnownCLIAvailability;
|
|
1578
1672
|
private lastKnownResumeSupport;
|
|
1673
|
+
/** B-549: created on the first `history-search` call. */
|
|
1674
|
+
private historySearch;
|
|
1579
1675
|
/** Wall-clock of the last CLI availability probe. Initialised as "already
|
|
1580
1676
|
* stale" so the FIRST keep-alive tick always probes and populates the
|
|
1581
1677
|
* machine metadata that a connecting/reconnecting web client reads. */
|
|
@@ -1585,6 +1681,10 @@ declare class ApiMachineClient {
|
|
|
1585
1681
|
private cliUpdateState;
|
|
1586
1682
|
private cliUpdatePushChain;
|
|
1587
1683
|
private claudeAuthState;
|
|
1684
|
+
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1685
|
+
private agentHibernationIdleMs;
|
|
1686
|
+
private rateLimitPushChain;
|
|
1687
|
+
private readonly rateLimitPublisher;
|
|
1588
1688
|
private rpcHandlerManager;
|
|
1589
1689
|
private resumeSessionHandler;
|
|
1590
1690
|
private restartSessionHandler;
|
|
@@ -1609,6 +1709,9 @@ declare class ApiMachineClient {
|
|
|
1609
1709
|
* `set-terminal-title` RPC.
|
|
1610
1710
|
*/
|
|
1611
1711
|
setTerminalTitle(terminalId: string, title: string, ifAbsent: boolean): boolean;
|
|
1712
|
+
/** B-547: a status hook forwarded from a daemon-launched claude inside a
|
|
1713
|
+
* web terminal (control server /terminal-agent-hook → here). */
|
|
1714
|
+
ingestTerminalAgentHook(body: unknown): void;
|
|
1612
1715
|
/**
|
|
1613
1716
|
* Push text to the clipboard of every web client the user has open
|
|
1614
1717
|
* (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
|
|
@@ -1621,7 +1724,7 @@ declare class ApiMachineClient {
|
|
|
1621
1724
|
error?: string;
|
|
1622
1725
|
};
|
|
1623
1726
|
/** 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'): {
|
|
1727
|
+
pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff', intent?: 'download'): {
|
|
1625
1728
|
delivered: boolean;
|
|
1626
1729
|
error?: string;
|
|
1627
1730
|
};
|
|
@@ -1643,6 +1746,9 @@ declare class ApiMachineClient {
|
|
|
1643
1746
|
/** Cache the latest relay policy locally and publish it now or on the next
|
|
1644
1747
|
* socket connect. This makes startup/offline races harmless. */
|
|
1645
1748
|
setCliUpdateState(state: CliUpdateState | null): void;
|
|
1749
|
+
/** B-555: a wrapper's rate-limit observation; written throttled by the publisher. */
|
|
1750
|
+
reportRateLimits(report: RateLimitReport): void;
|
|
1751
|
+
private writeRateLimits;
|
|
1646
1752
|
/**
|
|
1647
1753
|
* B-276: publish the daemon-context Claude auth preflight into daemonState
|
|
1648
1754
|
* (same serialized push chain as the CLI update policy). Resolves true when
|
|
@@ -1651,6 +1757,12 @@ declare class ApiMachineClient {
|
|
|
1651
1757
|
* caller checks the echoed state and re-sends on the next probe).
|
|
1652
1758
|
*/
|
|
1653
1759
|
setClaudeAuthState(state: ClaudeAuthState): Promise<boolean>;
|
|
1760
|
+
/**
|
|
1761
|
+
* B-587: `agent-hibernation-set {idleMs}` (0 = off) and the
|
|
1762
|
+
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1763
|
+
*/
|
|
1764
|
+
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1765
|
+
private publishAgentHibernation;
|
|
1654
1766
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1655
1767
|
setClaudeAuthHandlers(handlers: {
|
|
1656
1768
|
probe: () => Promise<ClaudeAuthState>;
|
|
@@ -1728,6 +1840,8 @@ declare class ApiMachineClient {
|
|
|
1728
1840
|
private refreshRelayConnection;
|
|
1729
1841
|
private startSmartReconnect;
|
|
1730
1842
|
private stopKeepAlive;
|
|
1843
|
+
/** B-550: final terminal scrollback checkpoint; resolves within ~300ms, never rejects. */
|
|
1844
|
+
flushTerminalScrollback(): Promise<void>;
|
|
1731
1845
|
shutdown(): void;
|
|
1732
1846
|
}
|
|
1733
1847
|
|
package/dist/lib.d.mts
CHANGED
|
@@ -367,6 +367,7 @@ type Session = {
|
|
|
367
367
|
declare const MachineMetadataSchema: z$1.ZodObject<{
|
|
368
368
|
teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
369
369
|
teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
|
+
worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
|
|
370
371
|
host: z$1.ZodString;
|
|
371
372
|
platform: z$1.ZodString;
|
|
372
373
|
happyCliVersion: z$1.ZodString;
|
|
@@ -506,6 +507,10 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
506
507
|
rpcAvailable: z$1.ZodBoolean;
|
|
507
508
|
detectedAt: z$1.ZodNumber;
|
|
508
509
|
}, z$1.core.$strip>>;
|
|
510
|
+
historySearch: z$1.ZodOptional<z$1.ZodObject<{
|
|
511
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
512
|
+
detectedAt: z$1.ZodNumber;
|
|
513
|
+
}, z$1.core.$strip>>;
|
|
509
514
|
terminalHost: z$1.ZodOptional<z$1.ZodObject<{
|
|
510
515
|
tmuxAvailable: z$1.ZodBoolean;
|
|
511
516
|
tmuxVersion: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -563,6 +568,26 @@ declare const DaemonStateSchema: z$1.ZodObject<{
|
|
|
563
568
|
}, z$1.core.$strip>;
|
|
564
569
|
checkedAt: z$1.ZodNumber;
|
|
565
570
|
}, z$1.core.$strip>>;
|
|
571
|
+
rateLimits: z$1.ZodOptional<z$1.ZodObject<{
|
|
572
|
+
v: z$1.ZodLiteral<1>;
|
|
573
|
+
updatedAt: z$1.ZodNumber;
|
|
574
|
+
providers: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
575
|
+
observedAt: z$1.ZodNumber;
|
|
576
|
+
status: z$1.ZodOptional<z$1.ZodString>;
|
|
577
|
+
windows: z$1.ZodArray<z$1.ZodObject<{
|
|
578
|
+
kind: z$1.ZodString;
|
|
579
|
+
usedPercent: z$1.ZodNumber;
|
|
580
|
+
resetsAt: z$1.ZodNullable<z$1.ZodNumber>;
|
|
581
|
+
windowMinutes: z$1.ZodOptional<z$1.ZodNumber>;
|
|
582
|
+
observedAt: z$1.ZodNumber;
|
|
583
|
+
}, z$1.core.$strip>>;
|
|
584
|
+
}, z$1.core.$strip>>;
|
|
585
|
+
}, z$1.core.$strip>>;
|
|
586
|
+
agentHibernation: z$1.ZodOptional<z$1.ZodObject<{
|
|
587
|
+
idleMs: z$1.ZodNumber;
|
|
588
|
+
rpcAvailable: z$1.ZodBoolean;
|
|
589
|
+
detectedAt: z$1.ZodNumber;
|
|
590
|
+
}, z$1.core.$loose>>;
|
|
566
591
|
}, z$1.core.$strip>;
|
|
567
592
|
type DaemonState = z$1.infer<typeof DaemonStateSchema>;
|
|
568
593
|
type ClaudeAuthState = ClaudeAuthState$1;
|
|
@@ -695,6 +720,11 @@ type Metadata = {
|
|
|
695
720
|
queueCancellation?: boolean;
|
|
696
721
|
/** Explicit feature negotiation; old CLIs omit this field. */
|
|
697
722
|
capabilities?: string[];
|
|
723
|
+
/** B-586: session started inside a linked git worktree (snapshot at start). Old clients ignore it. */
|
|
724
|
+
worktree?: {
|
|
725
|
+
branch: string | null;
|
|
726
|
+
root: string;
|
|
727
|
+
} | null;
|
|
698
728
|
homeDir: string;
|
|
699
729
|
happyHomeDir: string;
|
|
700
730
|
happyLibDir: string;
|
|
@@ -706,6 +736,19 @@ type Metadata = {
|
|
|
706
736
|
lifecycleStateSince?: number;
|
|
707
737
|
archivedBy?: string;
|
|
708
738
|
archiveReason?: string;
|
|
739
|
+
/**
|
|
740
|
+
* B-587: written by a wrapper that exited by idle hibernation (offline, not
|
|
741
|
+
* archived); cleared by the next wrapper on reconnect. `seq` = its message
|
|
742
|
+
* cursor — records above it are replayed on wake. Old clients ignore it.
|
|
743
|
+
*/
|
|
744
|
+
hibernation?: {
|
|
745
|
+
at: number;
|
|
746
|
+
seq: number;
|
|
747
|
+
idleMs: number;
|
|
748
|
+
v: 1;
|
|
749
|
+
};
|
|
750
|
+
/** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
|
|
751
|
+
keepAwake?: boolean;
|
|
709
752
|
flavor?: string;
|
|
710
753
|
sandbox?: SandboxConfig | null;
|
|
711
754
|
dangerouslySkipPermissions?: boolean | null;
|
|
@@ -787,6 +830,8 @@ type Metadata = {
|
|
|
787
830
|
attention?: 'none' | 'review' | 'blocked';
|
|
788
831
|
/** one-line Chinese progress note */
|
|
789
832
|
progress?: string;
|
|
833
|
+
/** B-556: optional phase from report_progress (self-report only) */
|
|
834
|
+
phase?: string;
|
|
790
835
|
analyzedAt: number;
|
|
791
836
|
};
|
|
792
837
|
};
|
|
@@ -1265,6 +1310,28 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1265
1310
|
} | {
|
|
1266
1311
|
type: 'ready';
|
|
1267
1312
|
}, id?: string): void;
|
|
1313
|
+
/** Last user/agent activity this wrapper saw (spec §2.1). */
|
|
1314
|
+
private lastActivity;
|
|
1315
|
+
private inboundFrozen;
|
|
1316
|
+
private frozenInbound;
|
|
1317
|
+
private heartbeatsMuted;
|
|
1318
|
+
private lastHeartbeat;
|
|
1319
|
+
get lastHeartbeatAt(): number;
|
|
1320
|
+
muteHeartbeats(): void;
|
|
1321
|
+
unmuteHeartbeats(): void;
|
|
1322
|
+
private inboundRoutedDuringCommit;
|
|
1323
|
+
noteActivity(now?: number): void;
|
|
1324
|
+
get lastActivityAt(): number;
|
|
1325
|
+
/** The message cursor (highest seq this wrapper has seen). */
|
|
1326
|
+
get messageCursor(): number;
|
|
1327
|
+
/** Start watching for inbound routed during the hibernation commit window. */
|
|
1328
|
+
beginHibernationCommit(): void;
|
|
1329
|
+
/** Was any inbound message routed since beginHibernationCommit()? */
|
|
1330
|
+
inboundRoutedSinceCommit(): boolean;
|
|
1331
|
+
/** Stop routing inbound messages; the next wrapper replays them (spec §3/§4). */
|
|
1332
|
+
freezeInbound(): void;
|
|
1333
|
+
/** An aborted hibernation: route whatever arrived while frozen, in order. */
|
|
1334
|
+
unfreezeInbound(): void;
|
|
1268
1335
|
/**
|
|
1269
1336
|
* Send a ping message to keep the connection alive
|
|
1270
1337
|
*/
|
|
@@ -1321,7 +1388,7 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1321
1388
|
* payload on this channel is (clipboard, fs RPC) — and a path leaks
|
|
1322
1389
|
* project/client names and directory structure.
|
|
1323
1390
|
*/
|
|
1324
|
-
pushFilePreview(path: string, mode?: 'file' | 'diff'): {
|
|
1391
|
+
pushFilePreview(path: string, mode?: 'file' | 'diff', intent?: 'download'): {
|
|
1325
1392
|
delivered: boolean;
|
|
1326
1393
|
error?: string;
|
|
1327
1394
|
};
|
|
@@ -1358,6 +1425,13 @@ declare class ApiSessionClient extends EventEmitter {
|
|
|
1358
1425
|
body: unknown;
|
|
1359
1426
|
}>>;
|
|
1360
1427
|
updateMetadata(handler: (metadata: Metadata) => Metadata): void;
|
|
1428
|
+
/**
|
|
1429
|
+
* B-587: the same write, awaitable with a ceiling — the hibernation stamp
|
|
1430
|
+
* must land before `session-end`. Resolves false on timeout (the write
|
|
1431
|
+
* itself keeps retrying in the background, exactly like updateMetadata).
|
|
1432
|
+
*/
|
|
1433
|
+
updateMetadataAndWait(handler: (metadata: Metadata) => Metadata, timeoutMs?: number): Promise<boolean>;
|
|
1434
|
+
private writeMetadata;
|
|
1361
1435
|
/**
|
|
1362
1436
|
* Update session agent state
|
|
1363
1437
|
* @param handler - Handler function that returns the updated agent state
|
|
@@ -1545,6 +1619,26 @@ interface CLIAvailability {
|
|
|
1545
1619
|
detectedAt: number;
|
|
1546
1620
|
}
|
|
1547
1621
|
|
|
1622
|
+
type RateLimitProvider = 'claude' | 'codex';
|
|
1623
|
+
type RateLimitWindow = {
|
|
1624
|
+
/** five_hour | seven_day | seven_day_opus | seven_day_sonnet | seven_day_overage_included | window_<mins>m */
|
|
1625
|
+
kind: string;
|
|
1626
|
+
/** 0–100, may exceed 100 when usage legitimately runs past the cap. */
|
|
1627
|
+
usedPercent: number;
|
|
1628
|
+
/** ms epoch, null when unknown. */
|
|
1629
|
+
resetsAt: number | null;
|
|
1630
|
+
windowMinutes?: number;
|
|
1631
|
+
/** ms epoch of the observation that produced this value. */
|
|
1632
|
+
observedAt: number;
|
|
1633
|
+
};
|
|
1634
|
+
/** One provider's observation as sent wrapper → daemon. */
|
|
1635
|
+
type RateLimitReport = {
|
|
1636
|
+
provider: RateLimitProvider;
|
|
1637
|
+
observedAt: number;
|
|
1638
|
+
status?: string;
|
|
1639
|
+
windows: RateLimitWindow[];
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1548
1642
|
/**
|
|
1549
1643
|
* WebSocket client for machine/daemon communication with Happy server
|
|
1550
1644
|
* Similar to ApiSessionClient but for machine-scoped connections
|
|
@@ -1576,6 +1670,8 @@ declare class ApiMachineClient {
|
|
|
1576
1670
|
private keepAliveInterval;
|
|
1577
1671
|
private lastKnownCLIAvailability;
|
|
1578
1672
|
private lastKnownResumeSupport;
|
|
1673
|
+
/** B-549: created on the first `history-search` call. */
|
|
1674
|
+
private historySearch;
|
|
1579
1675
|
/** Wall-clock of the last CLI availability probe. Initialised as "already
|
|
1580
1676
|
* stale" so the FIRST keep-alive tick always probes and populates the
|
|
1581
1677
|
* machine metadata that a connecting/reconnecting web client reads. */
|
|
@@ -1585,6 +1681,10 @@ declare class ApiMachineClient {
|
|
|
1585
1681
|
private cliUpdateState;
|
|
1586
1682
|
private cliUpdatePushChain;
|
|
1587
1683
|
private claudeAuthState;
|
|
1684
|
+
/** B-587: the machine's hibernation threshold, published as a capability. */
|
|
1685
|
+
private agentHibernationIdleMs;
|
|
1686
|
+
private rateLimitPushChain;
|
|
1687
|
+
private readonly rateLimitPublisher;
|
|
1588
1688
|
private rpcHandlerManager;
|
|
1589
1689
|
private resumeSessionHandler;
|
|
1590
1690
|
private restartSessionHandler;
|
|
@@ -1609,6 +1709,9 @@ declare class ApiMachineClient {
|
|
|
1609
1709
|
* `set-terminal-title` RPC.
|
|
1610
1710
|
*/
|
|
1611
1711
|
setTerminalTitle(terminalId: string, title: string, ifAbsent: boolean): boolean;
|
|
1712
|
+
/** B-547: a status hook forwarded from a daemon-launched claude inside a
|
|
1713
|
+
* web terminal (control server /terminal-agent-hook → here). */
|
|
1714
|
+
ingestTerminalAgentHook(body: unknown): void;
|
|
1612
1715
|
/**
|
|
1613
1716
|
* Push text to the clipboard of every web client the user has open
|
|
1614
1717
|
* (terminal-path claude → `very-happy mcp` → daemon /clipboard → here).
|
|
@@ -1621,7 +1724,7 @@ declare class ApiMachineClient {
|
|
|
1621
1724
|
error?: string;
|
|
1622
1725
|
};
|
|
1623
1726
|
/** 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'): {
|
|
1727
|
+
pushFilePreview(terminalId: string, path: string, mode?: 'file' | 'diff', intent?: 'download'): {
|
|
1625
1728
|
delivered: boolean;
|
|
1626
1729
|
error?: string;
|
|
1627
1730
|
};
|
|
@@ -1643,6 +1746,9 @@ declare class ApiMachineClient {
|
|
|
1643
1746
|
/** Cache the latest relay policy locally and publish it now or on the next
|
|
1644
1747
|
* socket connect. This makes startup/offline races harmless. */
|
|
1645
1748
|
setCliUpdateState(state: CliUpdateState | null): void;
|
|
1749
|
+
/** B-555: a wrapper's rate-limit observation; written throttled by the publisher. */
|
|
1750
|
+
reportRateLimits(report: RateLimitReport): void;
|
|
1751
|
+
private writeRateLimits;
|
|
1646
1752
|
/**
|
|
1647
1753
|
* B-276: publish the daemon-context Claude auth preflight into daemonState
|
|
1648
1754
|
* (same serialized push chain as the CLI update policy). Resolves true when
|
|
@@ -1651,6 +1757,12 @@ declare class ApiMachineClient {
|
|
|
1651
1757
|
* caller checks the echoed state and re-sends on the next probe).
|
|
1652
1758
|
*/
|
|
1653
1759
|
setClaudeAuthState(state: ClaudeAuthState): Promise<boolean>;
|
|
1760
|
+
/**
|
|
1761
|
+
* B-587: `agent-hibernation-set {idleMs}` (0 = off) and the
|
|
1762
|
+
* `daemonState.agentHibernation` capability. Call before connect().
|
|
1763
|
+
*/
|
|
1764
|
+
setAgentHibernationHandlers(initialIdleMs: number, set: (idleMs: number) => Promise<number>): void;
|
|
1765
|
+
private publishAgentHibernation;
|
|
1654
1766
|
/** B-276 machine RPCs. Responses always carry `claudeAuth` so the web can refresh in place. */
|
|
1655
1767
|
setClaudeAuthHandlers(handlers: {
|
|
1656
1768
|
probe: () => Promise<ClaudeAuthState>;
|
|
@@ -1728,6 +1840,8 @@ declare class ApiMachineClient {
|
|
|
1728
1840
|
private refreshRelayConnection;
|
|
1729
1841
|
private startSmartReconnect;
|
|
1730
1842
|
private stopKeepAlive;
|
|
1843
|
+
/** B-550: final terminal scrollback checkpoint; resolves within ~300ms, never rejects. */
|
|
1844
|
+
flushTerminalScrollback(): Promise<void>;
|
|
1731
1845
|
shutdown(): void;
|
|
1732
1846
|
}
|
|
1733
1847
|
|
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-CReZazeT.mjs';
|
|
2
|
+
export { l as logger } from './logger-CbBv3q_b.mjs';
|
|
3
|
+
export { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
4
4
|
export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
5
5
|
import 'axios';
|
|
6
|
-
import './lidState-
|
|
6
|
+
import './lidState-B2ZxdREe.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-CxG3T18E.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-PG5Dfwdv.mjs';
|
|
20
|
+
import './registerCommonHandlers-B0PVff2U.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-CCwYpJMS.mjs';
|
|
29
29
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
30
|
-
import './controlClient-
|
|
31
|
-
import './persistence-
|
|
30
|
+
import './controlClient-DTheOlvC.mjs';
|
|
31
|
+
import './persistence-ON0zpHfb.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-DU1DxhH9.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
1
|
+
import { l as logger } from './logger-CbBv3q_b.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-WspKd2C2.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-C3piBtxY.cjs');
|
|
10
10
|
|
|
11
11
|
const AgentCredentialsSchema = z.z.object({
|
|
12
12
|
token: z.z.string().min(1),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_util = require('node:util');
|
|
5
|
-
var configuration = require('./configuration-
|
|
5
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var path = require('node:path');
|
|
8
8
|
|
|
@@ -238,7 +238,7 @@ async function listDaemonLogFiles(limit = 50) {
|
|
|
238
238
|
return { file, path: fullPath, modified: stats.mtime };
|
|
239
239
|
}).sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
240
240
|
try {
|
|
241
|
-
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-
|
|
241
|
+
const { readDaemonState } = await Promise.resolve().then(function () { return require('./persistence-BYGl0QYw.cjs'); }).then(function (n) { return n.persistence; });
|
|
242
242
|
const state = await readDaemonState();
|
|
243
243
|
if (!state) {
|
|
244
244
|
return logs;
|
|
@@ -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-WspKd2C2.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-ON0zpHfb.mjs').then(function (n) { return n.E; });
|
|
240
240
|
const state = await readDaemonState();
|
|
241
241
|
if (!state) {
|
|
242
242
|
return logs;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var os = require('node:os');
|
|
4
|
-
var _package = require('./package-
|
|
5
|
-
var configuration = require('./configuration-
|
|
4
|
+
var _package = require('./package-C9ZP9bpX.cjs');
|
|
5
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
6
6
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
7
7
|
var detectCLI = require('./detectCLI-DR9ZaN6B.cjs');
|
|
8
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
8
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-T5GOvRha.cjs');
|
|
9
9
|
|
|
10
10
|
function buildInitialMachineMetadata(cliAvailability) {
|
|
11
11
|
const hostSuffix = process.env.HAPPY_VARIANT === "dev" ? "-dev" : "";
|
|
12
12
|
return {
|
|
13
13
|
teamsVersion: 1,
|
|
14
14
|
teamLaunchVersion: 1,
|
|
15
|
+
worktreeVersion: 1,
|
|
15
16
|
host: os.hostname() + hostSuffix,
|
|
16
17
|
platform: os.platform(),
|
|
17
18
|
happyCliVersion: _package.packageJson.version,
|