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
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function summarizeSpawnSessionForLog(value) {
|
|
4
|
-
const input = value && typeof value === "object" ? value : {};
|
|
5
|
-
const environmentVariables = input.environmentVariables && typeof input.environmentVariables === "object" ? input.environmentVariables : {};
|
|
6
|
-
return {
|
|
7
|
-
...typeof input.agent === "string" ? { agent: input.agent } : {},
|
|
8
|
-
...typeof input.variant === "string" ? { variant: input.variant } : {},
|
|
9
|
-
...typeof input.sessionId === "string" ? { sessionId: input.sessionId } : {},
|
|
10
|
-
hasDirectory: typeof input.directory === "string" && input.directory.length > 0,
|
|
11
|
-
hasToken: typeof input.token === "string" && input.token.length > 0,
|
|
12
|
-
environmentVariableNames: Object.keys(environmentVariables).sort(),
|
|
13
|
-
resumesClaude: typeof input.resumeClaudeSessionId === "string" && input.resumeClaudeSessionId.length > 0,
|
|
14
|
-
resumesCodex: typeof input.resumeCodexThreadId === "string" && input.resumeCodexThreadId.length > 0,
|
|
15
|
-
importsClaude: typeof input.importedFromClaudeSessionId === "string" && input.importedFromClaudeSessionId.length > 0,
|
|
16
|
-
forceNew: input.forceNew === true,
|
|
17
|
-
...typeof input.permissionMode === "string" ? { permissionMode: input.permissionMode } : {}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function sanitizeGeometry(cols, rows) {
|
|
22
|
-
const ok = (v) => typeof v === "number" && Number.isInteger(v) && v >= 2 && v <= 1e4;
|
|
23
|
-
return ok(cols) && ok(rows) ? { cols, rows } : void 0;
|
|
24
|
-
}
|
|
25
|
-
function sanitizeTagList(value) {
|
|
26
|
-
if (!Array.isArray(value)) return void 0;
|
|
27
|
-
const out = [];
|
|
28
|
-
for (const tag of value) {
|
|
29
|
-
if (typeof tag !== "string") continue;
|
|
30
|
-
const clean = tag.trim();
|
|
31
|
-
if (clean && !out.includes(clean)) out.push(clean);
|
|
32
|
-
if (out.length >= 64) break;
|
|
33
|
-
}
|
|
34
|
-
return out;
|
|
35
|
-
}
|
|
36
|
-
const LIVE_SNAPSHOT_TTL_MS = 14 * 24 * 60 * 60 * 1e3;
|
|
37
|
-
const LIVE_SNAPSHOT_MAX = 100;
|
|
38
|
-
function sanitizeLiveSnapshot(raw, now, ttlMs = LIVE_SNAPSHOT_TTL_MS, max = LIVE_SNAPSHOT_MAX) {
|
|
39
|
-
const out = /* @__PURE__ */ new Map();
|
|
40
|
-
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return out;
|
|
41
|
-
const rows = [];
|
|
42
|
-
for (const [id, value] of Object.entries(raw)) {
|
|
43
|
-
if (!id || !value || typeof value !== "object") continue;
|
|
44
|
-
const { title, cwd, seenAt, tags, manual, attachTmux, cols: rawCols, rows: rawRows } = value;
|
|
45
|
-
if (typeof seenAt !== "number" || !Number.isFinite(seenAt)) continue;
|
|
46
|
-
if (now - seenAt >= ttlMs) continue;
|
|
47
|
-
const tagList = sanitizeTagList(tags);
|
|
48
|
-
rows.push([id, {
|
|
49
|
-
title: typeof title === "string" && title.trim() ? title : void 0,
|
|
50
|
-
cwd: typeof cwd === "string" && cwd ? cwd : void 0,
|
|
51
|
-
...tagList !== void 0 ? { tags: tagList } : {},
|
|
52
|
-
...manual === true ? { manual: true } : {},
|
|
53
|
-
...typeof attachTmux === "string" && attachTmux ? { attachTmux } : {},
|
|
54
|
-
...sanitizeGeometry(rawCols, rawRows) ?? {},
|
|
55
|
-
seenAt
|
|
56
|
-
}]);
|
|
57
|
-
}
|
|
58
|
-
rows.sort((a, b) => b[1].seenAt - a[1].seenAt);
|
|
59
|
-
for (const [id, info] of rows.slice(0, max)) out.set(id, info);
|
|
60
|
-
return out;
|
|
61
|
-
}
|
|
62
|
-
function serializeLiveSnapshot(map, max = LIVE_SNAPSHOT_MAX) {
|
|
63
|
-
const rows = [...map.entries()].sort((a, b) => b[1].seenAt - a[1].seenAt).slice(0, max);
|
|
64
|
-
const out = {};
|
|
65
|
-
for (const [id, info] of rows) out[id] = info;
|
|
66
|
-
return out;
|
|
67
|
-
}
|
|
68
|
-
function liveSnapshotChanged(prev, next) {
|
|
69
|
-
if (prev.size !== next.size) return true;
|
|
70
|
-
for (const [id, info] of next) {
|
|
71
|
-
const before = prev.get(id);
|
|
72
|
-
if (!before) return true;
|
|
73
|
-
if (before.title !== info.title || before.cwd !== info.cwd) return true;
|
|
74
|
-
if (!!before.manual !== !!info.manual) return true;
|
|
75
|
-
if ((before.attachTmux ?? "") !== (info.attachTmux ?? "")) return true;
|
|
76
|
-
if ((before.tags ?? []).join("\0") !== (info.tags ?? []).join("\0")) return true;
|
|
77
|
-
if (before.cols !== info.cols || before.rows !== info.rows) return true;
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
}
|
|
81
|
-
const CLAUDE_SESSION_ID_RE = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
82
|
-
function isClaudeSessionId(value) {
|
|
83
|
-
return typeof value === "string" && CLAUDE_SESSION_ID_RE.test(value);
|
|
84
|
-
}
|
|
85
|
-
function pickMirrorForTerminal(sessions, terminalId) {
|
|
86
|
-
if (!terminalId) return null;
|
|
87
|
-
let best = null;
|
|
88
|
-
for (const [id, session] of Object.entries(sessions || {})) {
|
|
89
|
-
const meta = session?.metadata;
|
|
90
|
-
if (!meta || meta.terminalId !== terminalId) continue;
|
|
91
|
-
const savedAt = typeof session.savedAt === "number" ? session.savedAt : 0;
|
|
92
|
-
if (best && savedAt <= best.savedAt) continue;
|
|
93
|
-
best = {
|
|
94
|
-
id,
|
|
95
|
-
savedAt,
|
|
96
|
-
claude: isClaudeSessionId(meta.claudeSessionId) ? meta.claudeSessionId : void 0
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
return best ? { sessionId: best.id, claudeSessionId: best.claude } : null;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function parseTerminalHookPayload(body) {
|
|
103
|
-
if (!body || typeof body !== "object") return null;
|
|
104
|
-
const raw = body;
|
|
105
|
-
const eventName = raw.hook_event_name;
|
|
106
|
-
if (eventName !== "SessionStart" && eventName !== "SessionEnd") return null;
|
|
107
|
-
const claudeSessionId = typeof raw.session_id === "string" && raw.session_id.length > 0 ? raw.session_id : typeof raw.sessionId === "string" && raw.sessionId.length > 0 ? raw.sessionId : null;
|
|
108
|
-
if (!claudeSessionId) return null;
|
|
109
|
-
const terminalId = typeof raw.terminalId === "string" && raw.terminalId.length > 0 ? raw.terminalId : null;
|
|
110
|
-
if (!terminalId) return null;
|
|
111
|
-
return {
|
|
112
|
-
event: eventName,
|
|
113
|
-
claudeSessionId,
|
|
114
|
-
terminalId,
|
|
115
|
-
transcriptPath: typeof raw.transcript_path === "string" && raw.transcript_path.length > 0 ? raw.transcript_path : void 0,
|
|
116
|
-
cwd: typeof raw.cwd === "string" && raw.cwd.length > 0 ? raw.cwd : void 0,
|
|
117
|
-
source: typeof raw.source === "string" && raw.source.length > 0 ? raw.source : void 0
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
const FRESH_CONVERSATION_SOURCES = /* @__PURE__ */ new Set(["startup", "clear"]);
|
|
121
|
-
function decideMirrorBinding(event, binding) {
|
|
122
|
-
if (event.event === "SessionEnd") {
|
|
123
|
-
if (!binding) return { action: "ignore", reason: "no binding for terminal" };
|
|
124
|
-
if (binding.claudeSessionId !== event.claudeSessionId) {
|
|
125
|
-
return { action: "ignore", reason: "stale SessionEnd for a superseded claude session" };
|
|
126
|
-
}
|
|
127
|
-
if (binding.status === "ended") return { action: "ignore", reason: "already ended" };
|
|
128
|
-
return { action: "end" };
|
|
129
|
-
}
|
|
130
|
-
if (!binding) return { action: "create" };
|
|
131
|
-
if (binding.status === "active" && binding.claudeSessionId === event.claudeSessionId) {
|
|
132
|
-
return { action: "ignore", reason: "duplicate SessionStart for the bound session" };
|
|
133
|
-
}
|
|
134
|
-
if (FRESH_CONVERSATION_SOURCES.has(event.source ?? "startup")) {
|
|
135
|
-
return { action: "create", replaces: binding };
|
|
136
|
-
}
|
|
137
|
-
return { action: "continue" };
|
|
138
|
-
}
|
|
139
|
-
function mirrorLineKey(message) {
|
|
140
|
-
if (message.type === "summary") return `summary-${message.leafUuid}`;
|
|
141
|
-
if (message.type === "user" || message.type === "assistant" || message.type === "system") {
|
|
142
|
-
return message.uuid;
|
|
143
|
-
}
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
function mirrorLocalId(lineKey, envelopeIndex) {
|
|
147
|
-
return `mirror:${lineKey}:${envelopeIndex}`;
|
|
148
|
-
}
|
|
149
|
-
function extractCompleteLines(buf) {
|
|
150
|
-
const lastNl = buf.lastIndexOf(10);
|
|
151
|
-
if (lastNl === -1) return { lines: [], consumedBytes: 0 };
|
|
152
|
-
const text = buf.subarray(0, lastNl).toString("utf-8");
|
|
153
|
-
const lines = text.split("\n").filter((l) => l.trim().length > 0);
|
|
154
|
-
return { lines, consumedBytes: lastNl + 1 };
|
|
155
|
-
}
|
|
156
|
-
const MIRROR_SEND_MAX_CHARS = 16384;
|
|
157
|
-
function parseMirrorSendParams(params, isValidTerminalId) {
|
|
158
|
-
if (!params || typeof params !== "object") return { error: "invalid params" };
|
|
159
|
-
const { terminalId, text, submit } = params;
|
|
160
|
-
if (!isValidTerminalId(terminalId)) return { error: "invalid terminalId" };
|
|
161
|
-
if (typeof text !== "string" || text.length === 0) return { error: "text is required" };
|
|
162
|
-
if (text.length > MIRROR_SEND_MAX_CHARS) return { error: `text too long (max ${MIRROR_SEND_MAX_CHARS} chars)` };
|
|
163
|
-
return { terminalId, text, submit: submit !== false };
|
|
164
|
-
}
|
|
165
|
-
const MIRROR_BACKFILL_LINES_DEFAULT = 500;
|
|
166
|
-
function decideBackfill(messages, maxLines) {
|
|
167
|
-
const cap = Math.max(0, Math.floor(maxLines));
|
|
168
|
-
if (messages.length <= cap) return { replay: messages, truncated: false };
|
|
169
|
-
return { replay: messages.slice(messages.length - cap), truncated: true };
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
exports.MIRROR_BACKFILL_LINES_DEFAULT = MIRROR_BACKFILL_LINES_DEFAULT;
|
|
173
|
-
exports.decideBackfill = decideBackfill;
|
|
174
|
-
exports.decideMirrorBinding = decideMirrorBinding;
|
|
175
|
-
exports.extractCompleteLines = extractCompleteLines;
|
|
176
|
-
exports.isClaudeSessionId = isClaudeSessionId;
|
|
177
|
-
exports.liveSnapshotChanged = liveSnapshotChanged;
|
|
178
|
-
exports.mirrorLineKey = mirrorLineKey;
|
|
179
|
-
exports.mirrorLocalId = mirrorLocalId;
|
|
180
|
-
exports.parseMirrorSendParams = parseMirrorSendParams;
|
|
181
|
-
exports.parseTerminalHookPayload = parseTerminalHookPayload;
|
|
182
|
-
exports.pickMirrorForTerminal = pickMirrorForTerminal;
|
|
183
|
-
exports.sanitizeLiveSnapshot = sanitizeLiveSnapshot;
|
|
184
|
-
exports.sanitizeTagList = sanitizeTagList;
|
|
185
|
-
exports.serializeLiveSnapshot = serializeLiveSnapshot;
|
|
186
|
-
exports.summarizeSpawnSessionForLog = summarizeSpawnSessionForLog;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { p as packageJson } from './package-VIUXrYZ1.mjs';
|
|
2
|
-
|
|
3
|
-
const LAZY_MODULES = [
|
|
4
|
-
// Entry
|
|
5
|
-
["main", () => import('./main-CKUfkVG_.mjs')],
|
|
6
|
-
["selfCheck", () => Promise.resolve().then(function () { return selfCheck; })],
|
|
7
|
-
// Subcommands (main.ts)
|
|
8
|
-
["api/api", () => import('./api-DTVPUE7g.mjs').then(function (n) { return n.b; })],
|
|
9
|
-
["claude/claudeCliPath", () => import('./claudeCliPath-BqkaH2oR.mjs')],
|
|
10
|
-
["claude/runClaude", () => import('./runClaude-aBfBweec.mjs')],
|
|
11
|
-
["commands/agentHome", () => import('./agentHome-DvR176E5.mjs')],
|
|
12
|
-
["commands/auth", () => import('./auth-Jtmvh1w4.mjs')],
|
|
13
|
-
["commands/auto", () => import('./auto-DjWfR1UB.mjs')],
|
|
14
|
-
["commands/codexCommand", () => import('./codexCommand-C3gdjMAw.mjs')],
|
|
15
|
-
["commands/connect", () => import('./connect-CFD0Em6a.mjs')],
|
|
16
|
-
["commands/installPiTools", () => import('./installPiTools-B_CdM5_2.mjs')],
|
|
17
|
-
["commands/installTerminalHooks", () => import('./installTerminalHooks-By7gBMEF.mjs')],
|
|
18
|
-
["commands/mcp", () => import('./mcp-DeYUfpo8.mjs')],
|
|
19
|
-
["commands/piTerminal", () => import('./piTerminal-BTSaFlpV.mjs')],
|
|
20
|
-
["commands/sandbox", () => import('./sandbox-Brb_5wzc.mjs')],
|
|
21
|
-
["commands/send", () => import('./send-DEQJiq_x.mjs')],
|
|
22
|
-
["commands/server", () => import('./server-C6AlUFkw.mjs')],
|
|
23
|
-
["commands/sessions", () => import('./sessions-4isbBAWi.mjs')],
|
|
24
|
-
["commands/spawn", () => import('./spawn-BTOG4tTm.mjs')],
|
|
25
|
-
["commands/teams", () => import('./teams-D8Ly3i6u.mjs')],
|
|
26
|
-
["commands/todo", () => import('./todo-CuNct-fw.mjs')],
|
|
27
|
-
["daemon/doctor", () => import('./doctor-BPkYWSuq.mjs')],
|
|
28
|
-
["daemon/install", () => import('./install-Cp_aB-NQ.mjs')],
|
|
29
|
-
["daemon/run", () => import('./run-B75qm2I6.mjs')],
|
|
30
|
-
["daemon/uninstall", () => import('./uninstall-BB7WYYAk.mjs')],
|
|
31
|
-
["resume/handleResumeCommand", () => import('./handleResumeCommand-CTGbZkCL.mjs')],
|
|
32
|
-
["ui/doctor", () => import('./doctor-CAC6qY9Z.mjs').then(function (n) { return n.d; })],
|
|
33
|
-
["agent/acp", () => import('./index-DjtBengz.mjs')],
|
|
34
|
-
["gemini/runGemini", () => import('./runGemini-a-V7JE-J.mjs')],
|
|
35
|
-
["gemini/utils/config", () => import('./config-CGCIFRCN.mjs')],
|
|
36
|
-
["openclaw/runOpenClaw", () => import('./runOpenClaw-DUSwXg1A.mjs')],
|
|
37
|
-
["persistence", () => import('./persistence-DujtUH94.mjs')],
|
|
38
|
-
// Deferred halves of the runners and clients
|
|
39
|
-
["api/apiMachine", () => import('./apiMachine-BQ-b4Lu3.mjs')],
|
|
40
|
-
["claude/runClaudeDeps", () => import('./runClaudeDeps-BOrPP4J1.mjs')],
|
|
41
|
-
["claude/claudeLocal", () => import('./claudeLocal-BeHToEK5.mjs')],
|
|
42
|
-
["claude/claudeLocalLauncher", () => import('./claudeLocalLauncher-Cq6bqAT4.mjs')],
|
|
43
|
-
["claude/sdk", () => import('./index-B6UGRQ7h.mjs')],
|
|
44
|
-
["assistant/bootstrap", () => import('./bootstrap-D_ExGrY2.mjs')],
|
|
45
|
-
["agentHome", () => import('./index-Diu6HdWH.mjs')],
|
|
46
|
-
["ui/ink/RemoteModeDisplay", () => import('./RemoteModeDisplay-D-HewyXg.mjs')],
|
|
47
|
-
// External packages imported on demand
|
|
48
|
-
["expo-server-sdk", () => import('expo-server-sdk')],
|
|
49
|
-
["ink", () => import('ink')],
|
|
50
|
-
["react", () => import('react')]
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
async function runSelfCheck(modules = LAZY_MODULES) {
|
|
54
|
-
const failures = [];
|
|
55
|
-
for (const [name, load] of modules) {
|
|
56
|
-
try {
|
|
57
|
-
await load();
|
|
58
|
-
} catch (error) {
|
|
59
|
-
failures.push({ name, error: error instanceof Error ? error.message : String(error) });
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return failures;
|
|
63
|
-
}
|
|
64
|
-
async function selfCheckMain(opts = {}) {
|
|
65
|
-
const started = Date.now();
|
|
66
|
-
const failures = await runSelfCheck();
|
|
67
|
-
if (failures.length > 0) {
|
|
68
|
-
for (const failure of failures) {
|
|
69
|
-
console.error(`very-happy: failed to load ${failure.name}: ${failure.error}`);
|
|
70
|
-
}
|
|
71
|
-
return 1;
|
|
72
|
-
}
|
|
73
|
-
if (opts.verbose) console.log(`self-check: ${LAZY_MODULES.length} modules loaded in ${Date.now() - started}ms`);
|
|
74
|
-
console.log(`very-happy version: ${packageJson.version}`);
|
|
75
|
-
return 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
var selfCheck = /*#__PURE__*/Object.freeze({
|
|
79
|
-
__proto__: null,
|
|
80
|
-
runSelfCheck: runSelfCheck,
|
|
81
|
-
selfCheckMain: selfCheckMain
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
export { runSelfCheck, selfCheckMain };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
function parseCompact(message) {
|
|
2
|
-
const trimmed = message.trim();
|
|
3
|
-
if (trimmed === "/compact") {
|
|
4
|
-
return {
|
|
5
|
-
isCompact: true,
|
|
6
|
-
originalMessage: trimmed
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
if (trimmed.startsWith("/compact ")) {
|
|
10
|
-
return {
|
|
11
|
-
isCompact: true,
|
|
12
|
-
originalMessage: trimmed
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
return {
|
|
16
|
-
isCompact: false,
|
|
17
|
-
originalMessage: message
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function parseClear(message) {
|
|
21
|
-
const trimmed = message.trim();
|
|
22
|
-
return {
|
|
23
|
-
isClear: trimmed === "/clear"
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function parseSpecialCommand(message) {
|
|
27
|
-
const compactResult = parseCompact(message);
|
|
28
|
-
if (compactResult.isCompact) {
|
|
29
|
-
return {
|
|
30
|
-
type: "compact",
|
|
31
|
-
originalMessage: compactResult.originalMessage
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const clearResult = parseClear(message);
|
|
35
|
-
if (clearResult.isClear) {
|
|
36
|
-
return {
|
|
37
|
-
type: "clear"
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
const trimmed = message.trim().toLowerCase();
|
|
41
|
-
if (trimmed === "/mcp") {
|
|
42
|
-
return { type: "mcp" };
|
|
43
|
-
}
|
|
44
|
-
if (trimmed === "/skills") {
|
|
45
|
-
return { type: "skills" };
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
type: null
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { parseSpecialCommand as p };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function parseCompact(message) {
|
|
4
|
-
const trimmed = message.trim();
|
|
5
|
-
if (trimmed === "/compact") {
|
|
6
|
-
return {
|
|
7
|
-
isCompact: true,
|
|
8
|
-
originalMessage: trimmed
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
if (trimmed.startsWith("/compact ")) {
|
|
12
|
-
return {
|
|
13
|
-
isCompact: true,
|
|
14
|
-
originalMessage: trimmed
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
isCompact: false,
|
|
19
|
-
originalMessage: message
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function parseClear(message) {
|
|
23
|
-
const trimmed = message.trim();
|
|
24
|
-
return {
|
|
25
|
-
isClear: trimmed === "/clear"
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
function parseSpecialCommand(message) {
|
|
29
|
-
const compactResult = parseCompact(message);
|
|
30
|
-
if (compactResult.isCompact) {
|
|
31
|
-
return {
|
|
32
|
-
type: "compact",
|
|
33
|
-
originalMessage: compactResult.originalMessage
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const clearResult = parseClear(message);
|
|
37
|
-
if (clearResult.isClear) {
|
|
38
|
-
return {
|
|
39
|
-
type: "clear"
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
const trimmed = message.trim().toLowerCase();
|
|
43
|
-
if (trimmed === "/mcp") {
|
|
44
|
-
return { type: "mcp" };
|
|
45
|
-
}
|
|
46
|
-
if (trimmed === "/skills") {
|
|
47
|
-
return { type: "skills" };
|
|
48
|
-
}
|
|
49
|
-
return {
|
|
50
|
-
type: null
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
exports.parseSpecialCommand = parseSpecialCommand;
|