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,23 +1,23 @@
|
|
|
1
|
-
import { C as ContextUsageSchema } from './index-
|
|
1
|
+
import { C as ContextUsageSchema } from './index-B0HEEYGh.mjs';
|
|
2
2
|
import { unlink, mkdir, open, rename } from 'node:fs/promises';
|
|
3
3
|
import { randomUUID } from 'node:crypto';
|
|
4
4
|
import { constants } from 'node:fs';
|
|
5
5
|
import { dirname } from 'node:path';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import { T as TeamConnectionPreflightError, c as createTeamsClient } from './client-
|
|
8
|
-
import { t as teamScopePath } from './context-
|
|
9
|
-
import { g as waitForSessionKey, e as sendUserMessage } from './sessionOps-
|
|
7
|
+
import { T as TeamConnectionPreflightError, c as createTeamsClient } from './client-Dsfy_SAb.mjs';
|
|
8
|
+
import { t as teamScopePath } from './context-Cr6a3NTg.mjs';
|
|
9
|
+
import { g as waitForSessionKey, e as sendUserMessage } from './sessionOps-DZRH4-hV.mjs';
|
|
10
10
|
import { T as TEAM_SKILL } from './resources-BdFBQi8r.mjs';
|
|
11
|
-
import { T as TEAM_TOOL_NAMES, r as registerTeamsTools } from './tools-
|
|
12
|
-
import { A as AUTOMATION_TOOL_NAMES, r as registerAutomationTools } from './
|
|
13
|
-
import { S as SESSION_PEER_TOOL_NAMES, r as registerSessionPeerTools, a as createSessionPeerToolExecutor } from './peerTools-
|
|
11
|
+
import { T as TEAM_TOOL_NAMES, r as registerTeamsTools } from './tools-D91mq5Ib.mjs';
|
|
12
|
+
import { c as createSelfReportState, A as AUTOMATION_TOOL_NAMES, r as registerAutomationTools, a as registerReportProgressTool, n as normalizeAttention, b as normalizePhase, d as normalizeProgress, s as shouldAcceptSelfReport } from './reportProgressTool-BvB13EwC.mjs';
|
|
13
|
+
import { S as SESSION_PEER_TOOL_NAMES, r as registerSessionPeerTools, a as createSessionPeerToolExecutor } from './peerTools-os2DVjA0.mjs';
|
|
14
14
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
15
15
|
import { createServer } from 'node:http';
|
|
16
16
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
17
|
-
import { l as logger } from './logger-
|
|
17
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
18
18
|
import { C as CLIPBOARD_TOOL_NAME, a as CLIPBOARD_TOOL_TITLE, b as CLIPBOARD_TOOL_DESCRIPTION, c as CLIPBOARD_MAX_BYTES } from './limits-DIo7rEBR.mjs';
|
|
19
|
-
import { A as ASSISTANT_TOOL_NAMES, a as registerAssistantTools } from './
|
|
20
|
-
import { P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as
|
|
19
|
+
import { A as ASSISTANT_TOOL_NAMES, a as registerAssistantTools, c as checkDownloadTarget } from './downloadTarget-Cp48jrIP.mjs';
|
|
20
|
+
import { P as PREVIEW_TOOL_NAME, R as REPORT_PROGRESS_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as PREVIEW_DOWNLOAD_PARAM_DESCRIPTION } from './agentGuidance-BDYt2Qy2.mjs';
|
|
21
21
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
22
22
|
import { createHash } from 'crypto';
|
|
23
23
|
|
|
@@ -128,29 +128,6 @@ This session is now connected as the team lead. Call team_inspect to read the au
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
const SELF_REPORT_MIN_INTERVAL_MS = 30 * 1e3;
|
|
132
|
-
const SELF_REPORT_FRESH_MS = 15 * 60 * 1e3;
|
|
133
|
-
const PROGRESS_MAX_CHARS = 200;
|
|
134
|
-
function createSelfReportState() {
|
|
135
|
-
return { lastAcceptedAt: 0 };
|
|
136
|
-
}
|
|
137
|
-
function shouldAcceptSelfReport(state, now, attention) {
|
|
138
|
-
if (state.lastAcceptedAt === 0) return true;
|
|
139
|
-
if (attention !== void 0 && attention !== state.lastAttention) return true;
|
|
140
|
-
return now - state.lastAcceptedAt >= SELF_REPORT_MIN_INTERVAL_MS;
|
|
141
|
-
}
|
|
142
|
-
function isSelfReportFresh(state, now) {
|
|
143
|
-
if (state.lastAcceptedAt === 0) return false;
|
|
144
|
-
const age = now - state.lastAcceptedAt;
|
|
145
|
-
return age >= 0 && age < SELF_REPORT_FRESH_MS;
|
|
146
|
-
}
|
|
147
|
-
function normalizeProgress(value) {
|
|
148
|
-
if (typeof value !== "string") return null;
|
|
149
|
-
const flat = value.replace(/\s+/g, " ").trim();
|
|
150
|
-
if (!flat) return null;
|
|
151
|
-
return flat.length > PROGRESS_MAX_CHARS ? flat.slice(0, PROGRESS_MAX_CHARS) : flat;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
131
|
function createMcpServer(handlers, options, sessionId, client) {
|
|
155
132
|
const mcp = new McpServer({
|
|
156
133
|
name: "Very Happy Tools",
|
|
@@ -222,17 +199,20 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
222
199
|
title: PREVIEW_TOOL_TITLE,
|
|
223
200
|
inputSchema: {
|
|
224
201
|
path: z.string().describe("Absolute path (or ~/\u2026) of the file to show the user"),
|
|
225
|
-
mode: z.enum(["file", "diff"]).optional().describe("'file' (default) renders the file; 'diff' is reserved and currently falls back to 'file'")
|
|
202
|
+
mode: z.enum(["file", "diff"]).optional().describe("'file' (default) renders the file; 'diff' is reserved and currently falls back to 'file'"),
|
|
203
|
+
// B-562: optional; old web clients ignore the resulting intent and just preview.
|
|
204
|
+
download: z.boolean().optional().describe(PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
226
205
|
}
|
|
227
206
|
}, async (args) => {
|
|
228
|
-
const response = await handlers.openPreview(args.path, args.mode ?? "file");
|
|
207
|
+
const response = await handlers.openPreview(args.path, args.mode ?? "file", args.download === true);
|
|
229
208
|
logger.debug("[happyMCP] open_preview response:", response);
|
|
230
209
|
if (response.delivered) {
|
|
210
|
+
const target = response.resolved ?? args.path;
|
|
231
211
|
return {
|
|
232
212
|
content: [{
|
|
233
213
|
type: "text",
|
|
234
214
|
// 明说不保证用户看到了——否则 claude 会基于「已预览」做后续推断(spec 风险 8)
|
|
235
|
-
text: `Asked the user's open web client(s) to
|
|
215
|
+
text: (args.download === true ? `Asked the user's open web client(s) to offer ${target} for download. This does not confirm they downloaded it.` : `Asked the user's open web client(s) to preview ${target}. This does not confirm they looked at it.`) + (response.note ? ` ${response.note}` : "")
|
|
236
216
|
}],
|
|
237
217
|
isError: false
|
|
238
218
|
};
|
|
@@ -242,15 +222,8 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
242
222
|
isError: true
|
|
243
223
|
};
|
|
244
224
|
});
|
|
245
|
-
mcp
|
|
246
|
-
|
|
247
|
-
title: REPORT_PROGRESS_TOOL_TITLE,
|
|
248
|
-
inputSchema: {
|
|
249
|
-
progress: z.string().describe("One short line describing the current state of this task"),
|
|
250
|
-
attention: z.enum(["none", "review", "blocked"]).optional().describe("'blocked' = cannot proceed without the user; 'review' = wants their eyes; 'none' = ordinary progress")
|
|
251
|
-
}
|
|
252
|
-
}, async (args) => {
|
|
253
|
-
const response = await handlers.reportProgress(args.progress, args.attention ?? "none");
|
|
225
|
+
registerReportProgressTool(mcp, async (args) => {
|
|
226
|
+
const response = await handlers.reportProgress(String(args.progress ?? ""), normalizeAttention(args.attention), normalizePhase(args.phase));
|
|
254
227
|
logger.debug("[happyMCP] report_progress response:", response);
|
|
255
228
|
if (response.accepted) {
|
|
256
229
|
return { content: [{ type: "text", text: "Board updated." }], isError: false };
|
|
@@ -265,39 +238,50 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
265
238
|
}
|
|
266
239
|
return mcp;
|
|
267
240
|
}
|
|
241
|
+
function withoutPhase(board) {
|
|
242
|
+
if (!board) return {};
|
|
243
|
+
const { phase: _phase, ...rest } = board;
|
|
244
|
+
return rest;
|
|
245
|
+
}
|
|
268
246
|
async function startHappyServer(client, options) {
|
|
269
247
|
logger.debug(`[happyMCP] server:start sessionId=${client.sessionId} assistant=${!!options?.assistant}`);
|
|
270
248
|
const selfReportState = options?.selfReportState ?? createSelfReportState();
|
|
271
249
|
const handlers = {
|
|
272
|
-
openPreview: async (path, mode) => {
|
|
250
|
+
openPreview: async (path, mode, download = false) => {
|
|
273
251
|
const verdict = checkPreviewPath(path);
|
|
274
252
|
if (verdict.deniedReason) {
|
|
275
253
|
logger.debug(`[happyMCP] open_preview denied: ${verdict.deniedReason}`);
|
|
276
254
|
return { delivered: false, error: verdict.deniedReason };
|
|
277
255
|
}
|
|
256
|
+
const target = download ? await checkDownloadTarget(verdict.resolved) : null;
|
|
257
|
+
if (target?.error) return { delivered: false, error: target.error };
|
|
278
258
|
try {
|
|
279
|
-
const result = client.pushFilePreview(verdict.resolved, mode);
|
|
280
|
-
return { delivered: result.delivered, resolved: verdict.resolved, error: result.error };
|
|
259
|
+
const result = client.pushFilePreview(verdict.resolved, mode, download ? "download" : void 0);
|
|
260
|
+
return { delivered: result.delivered, resolved: verdict.resolved, error: result.error, note: target?.note ?? void 0 };
|
|
281
261
|
} catch (error) {
|
|
282
262
|
return { delivered: false, error: String(error) };
|
|
283
263
|
}
|
|
284
264
|
},
|
|
285
|
-
reportProgress: async (progress, attention) => {
|
|
265
|
+
reportProgress: async (progress, attention, phase) => {
|
|
286
266
|
const text = normalizeProgress(progress);
|
|
287
267
|
if (!text) {
|
|
288
268
|
return { accepted: false, error: "progress must be a non-empty one-line string" };
|
|
289
269
|
}
|
|
290
270
|
const now = Date.now();
|
|
291
|
-
if (!shouldAcceptSelfReport(selfReportState, now, attention)) {
|
|
271
|
+
if (!shouldAcceptSelfReport(selfReportState, now, attention, phase)) {
|
|
292
272
|
return { accepted: false };
|
|
293
273
|
}
|
|
294
274
|
selfReportState.lastAcceptedAt = now;
|
|
295
275
|
selfReportState.lastAttention = attention;
|
|
276
|
+
selfReportState.lastPhase = phase;
|
|
296
277
|
try {
|
|
297
278
|
client.updateMetadata((metadata) => ({
|
|
298
279
|
...metadata,
|
|
299
280
|
board: {
|
|
300
|
-
|
|
281
|
+
// B-556: a report without phase must not keep the previous one
|
|
282
|
+
// (a stale label next to fresh text); taskId etc. are kept.
|
|
283
|
+
...withoutPhase(metadata?.board),
|
|
284
|
+
...phase ? { phase } : {},
|
|
301
285
|
attention,
|
|
302
286
|
progress: text,
|
|
303
287
|
analyzedAt: now,
|
|
@@ -499,4 +483,4 @@ function hashObject(obj, options, encoding = "hex") {
|
|
|
499
483
|
return createHash("sha256").update(jsonString).digest(encoding);
|
|
500
484
|
}
|
|
501
485
|
|
|
502
|
-
export {
|
|
486
|
+
export { hashObject as h, startHappyServer as s };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C9hI8a10.cjs');
|
|
4
4
|
var promises = require('node:fs/promises');
|
|
5
5
|
var node_crypto = require('node:crypto');
|
|
6
6
|
var node_fs = require('node:fs');
|
|
7
7
|
var path = require('node:path');
|
|
8
8
|
var z = require('zod');
|
|
9
|
-
var client = require('./client-
|
|
10
|
-
var context = require('./context-
|
|
11
|
-
var sessionOps = require('./sessionOps-
|
|
9
|
+
var client = require('./client-BKnKRLSt.cjs');
|
|
10
|
+
var context = require('./context-Jrq4-eCZ.cjs');
|
|
11
|
+
var sessionOps = require('./sessionOps-DzbZI3Eq.cjs');
|
|
12
12
|
var resources = require('./resources-JDPugcDq.cjs');
|
|
13
|
-
var tools = require('./tools-
|
|
14
|
-
var
|
|
15
|
-
var peerTools = require('./peerTools-
|
|
13
|
+
var tools = require('./tools-DJIANHSh.cjs');
|
|
14
|
+
var reportProgressTool = require('./reportProgressTool-D4KB_4cP.cjs');
|
|
15
|
+
var peerTools = require('./peerTools-Dkbu7gag.cjs');
|
|
16
16
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
17
17
|
var node_http = require('node:http');
|
|
18
18
|
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
19
|
-
var logger = require('./logger-
|
|
19
|
+
var logger = require('./logger-B_MWPbZz.cjs');
|
|
20
20
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
21
|
-
var
|
|
22
|
-
var agentGuidance = require('./agentGuidance-
|
|
21
|
+
var downloadTarget = require('./downloadTarget-CWTb2-EM.cjs');
|
|
22
|
+
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
23
23
|
var previewPath = require('./previewPath-B0rBdhy1.cjs');
|
|
24
24
|
var crypto = require('crypto');
|
|
25
25
|
|
|
@@ -130,36 +130,13 @@ This session is now connected as the team lead. Call team_inspect to read the au
|
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
const SELF_REPORT_MIN_INTERVAL_MS = 30 * 1e3;
|
|
134
|
-
const SELF_REPORT_FRESH_MS = 15 * 60 * 1e3;
|
|
135
|
-
const PROGRESS_MAX_CHARS = 200;
|
|
136
|
-
function createSelfReportState() {
|
|
137
|
-
return { lastAcceptedAt: 0 };
|
|
138
|
-
}
|
|
139
|
-
function shouldAcceptSelfReport(state, now, attention) {
|
|
140
|
-
if (state.lastAcceptedAt === 0) return true;
|
|
141
|
-
if (attention !== void 0 && attention !== state.lastAttention) return true;
|
|
142
|
-
return now - state.lastAcceptedAt >= SELF_REPORT_MIN_INTERVAL_MS;
|
|
143
|
-
}
|
|
144
|
-
function isSelfReportFresh(state, now) {
|
|
145
|
-
if (state.lastAcceptedAt === 0) return false;
|
|
146
|
-
const age = now - state.lastAcceptedAt;
|
|
147
|
-
return age >= 0 && age < SELF_REPORT_FRESH_MS;
|
|
148
|
-
}
|
|
149
|
-
function normalizeProgress(value) {
|
|
150
|
-
if (typeof value !== "string") return null;
|
|
151
|
-
const flat = value.replace(/\s+/g, " ").trim();
|
|
152
|
-
if (!flat) return null;
|
|
153
|
-
return flat.length > PROGRESS_MAX_CHARS ? flat.slice(0, PROGRESS_MAX_CHARS) : flat;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
133
|
function createMcpServer(handlers, options, sessionId, client) {
|
|
157
134
|
const mcp = new mcp_js.McpServer({
|
|
158
135
|
name: "Very Happy Tools",
|
|
159
136
|
version: "1.0.0"
|
|
160
137
|
});
|
|
161
138
|
tools.registerTeamsTools(mcp, sessionId);
|
|
162
|
-
|
|
139
|
+
reportProgressTool.registerAutomationTools(mcp);
|
|
163
140
|
if (client) peerTools.registerSessionPeerTools(mcp, peerTools.createSessionPeerToolExecutor(client));
|
|
164
141
|
mcp.registerTool("change_title", {
|
|
165
142
|
description: "Change the title of the current chat session",
|
|
@@ -224,17 +201,20 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
224
201
|
title: agentGuidance.PREVIEW_TOOL_TITLE,
|
|
225
202
|
inputSchema: {
|
|
226
203
|
path: z.z.string().describe("Absolute path (or ~/\u2026) of the file to show the user"),
|
|
227
|
-
mode: z.z.enum(["file", "diff"]).optional().describe("'file' (default) renders the file; 'diff' is reserved and currently falls back to 'file'")
|
|
204
|
+
mode: z.z.enum(["file", "diff"]).optional().describe("'file' (default) renders the file; 'diff' is reserved and currently falls back to 'file'"),
|
|
205
|
+
// B-562: optional; old web clients ignore the resulting intent and just preview.
|
|
206
|
+
download: z.z.boolean().optional().describe(agentGuidance.PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
228
207
|
}
|
|
229
208
|
}, async (args) => {
|
|
230
|
-
const response = await handlers.openPreview(args.path, args.mode ?? "file");
|
|
209
|
+
const response = await handlers.openPreview(args.path, args.mode ?? "file", args.download === true);
|
|
231
210
|
logger.logger.debug("[happyMCP] open_preview response:", response);
|
|
232
211
|
if (response.delivered) {
|
|
212
|
+
const target = response.resolved ?? args.path;
|
|
233
213
|
return {
|
|
234
214
|
content: [{
|
|
235
215
|
type: "text",
|
|
236
216
|
// 明说不保证用户看到了——否则 claude 会基于「已预览」做后续推断(spec 风险 8)
|
|
237
|
-
text: `Asked the user's open web client(s) to
|
|
217
|
+
text: (args.download === true ? `Asked the user's open web client(s) to offer ${target} for download. This does not confirm they downloaded it.` : `Asked the user's open web client(s) to preview ${target}. This does not confirm they looked at it.`) + (response.note ? ` ${response.note}` : "")
|
|
238
218
|
}],
|
|
239
219
|
isError: false
|
|
240
220
|
};
|
|
@@ -244,15 +224,8 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
244
224
|
isError: true
|
|
245
225
|
};
|
|
246
226
|
});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
title: agentGuidance.REPORT_PROGRESS_TOOL_TITLE,
|
|
250
|
-
inputSchema: {
|
|
251
|
-
progress: z.z.string().describe("One short line describing the current state of this task"),
|
|
252
|
-
attention: z.z.enum(["none", "review", "blocked"]).optional().describe("'blocked' = cannot proceed without the user; 'review' = wants their eyes; 'none' = ordinary progress")
|
|
253
|
-
}
|
|
254
|
-
}, async (args) => {
|
|
255
|
-
const response = await handlers.reportProgress(args.progress, args.attention ?? "none");
|
|
227
|
+
reportProgressTool.registerReportProgressTool(mcp, async (args) => {
|
|
228
|
+
const response = await handlers.reportProgress(String(args.progress ?? ""), reportProgressTool.normalizeAttention(args.attention), reportProgressTool.normalizePhase(args.phase));
|
|
256
229
|
logger.logger.debug("[happyMCP] report_progress response:", response);
|
|
257
230
|
if (response.accepted) {
|
|
258
231
|
return { content: [{ type: "text", text: "Board updated." }], isError: false };
|
|
@@ -263,43 +236,54 @@ function createMcpServer(handlers, options, sessionId, client) {
|
|
|
263
236
|
};
|
|
264
237
|
});
|
|
265
238
|
if (options?.assistant && !process.env.VH_TEAM_SCOPE_FILE) {
|
|
266
|
-
|
|
239
|
+
downloadTarget.registerAssistantTools(mcp);
|
|
267
240
|
}
|
|
268
241
|
return mcp;
|
|
269
242
|
}
|
|
243
|
+
function withoutPhase(board) {
|
|
244
|
+
if (!board) return {};
|
|
245
|
+
const { phase: _phase, ...rest } = board;
|
|
246
|
+
return rest;
|
|
247
|
+
}
|
|
270
248
|
async function startHappyServer(client, options) {
|
|
271
249
|
logger.logger.debug(`[happyMCP] server:start sessionId=${client.sessionId} assistant=${!!options?.assistant}`);
|
|
272
|
-
const selfReportState = options?.selfReportState ?? createSelfReportState();
|
|
250
|
+
const selfReportState = options?.selfReportState ?? reportProgressTool.createSelfReportState();
|
|
273
251
|
const handlers = {
|
|
274
|
-
openPreview: async (path, mode) => {
|
|
252
|
+
openPreview: async (path, mode, download = false) => {
|
|
275
253
|
const verdict = previewPath.checkPreviewPath(path);
|
|
276
254
|
if (verdict.deniedReason) {
|
|
277
255
|
logger.logger.debug(`[happyMCP] open_preview denied: ${verdict.deniedReason}`);
|
|
278
256
|
return { delivered: false, error: verdict.deniedReason };
|
|
279
257
|
}
|
|
258
|
+
const target = download ? await downloadTarget.checkDownloadTarget(verdict.resolved) : null;
|
|
259
|
+
if (target?.error) return { delivered: false, error: target.error };
|
|
280
260
|
try {
|
|
281
|
-
const result = client.pushFilePreview(verdict.resolved, mode);
|
|
282
|
-
return { delivered: result.delivered, resolved: verdict.resolved, error: result.error };
|
|
261
|
+
const result = client.pushFilePreview(verdict.resolved, mode, download ? "download" : void 0);
|
|
262
|
+
return { delivered: result.delivered, resolved: verdict.resolved, error: result.error, note: target?.note ?? void 0 };
|
|
283
263
|
} catch (error) {
|
|
284
264
|
return { delivered: false, error: String(error) };
|
|
285
265
|
}
|
|
286
266
|
},
|
|
287
|
-
reportProgress: async (progress, attention) => {
|
|
288
|
-
const text = normalizeProgress(progress);
|
|
267
|
+
reportProgress: async (progress, attention, phase) => {
|
|
268
|
+
const text = reportProgressTool.normalizeProgress(progress);
|
|
289
269
|
if (!text) {
|
|
290
270
|
return { accepted: false, error: "progress must be a non-empty one-line string" };
|
|
291
271
|
}
|
|
292
272
|
const now = Date.now();
|
|
293
|
-
if (!shouldAcceptSelfReport(selfReportState, now, attention)) {
|
|
273
|
+
if (!reportProgressTool.shouldAcceptSelfReport(selfReportState, now, attention, phase)) {
|
|
294
274
|
return { accepted: false };
|
|
295
275
|
}
|
|
296
276
|
selfReportState.lastAcceptedAt = now;
|
|
297
277
|
selfReportState.lastAttention = attention;
|
|
278
|
+
selfReportState.lastPhase = phase;
|
|
298
279
|
try {
|
|
299
280
|
client.updateMetadata((metadata) => ({
|
|
300
281
|
...metadata,
|
|
301
282
|
board: {
|
|
302
|
-
|
|
283
|
+
// B-556: a report without phase must not keep the previous one
|
|
284
|
+
// (a stale label next to fresh text); taskId etc. are kept.
|
|
285
|
+
...withoutPhase(metadata?.board),
|
|
286
|
+
...phase ? { phase } : {},
|
|
303
287
|
attention,
|
|
304
288
|
progress: text,
|
|
305
289
|
analyzedAt: now,
|
|
@@ -403,9 +387,9 @@ async function startHappyServer(client, options) {
|
|
|
403
387
|
agentGuidance.PREVIEW_TOOL_NAME,
|
|
404
388
|
agentGuidance.REPORT_PROGRESS_TOOL_NAME,
|
|
405
389
|
...tools.TEAM_TOOL_NAMES,
|
|
406
|
-
...
|
|
390
|
+
...reportProgressTool.AUTOMATION_TOOL_NAMES,
|
|
407
391
|
...peerTools.SESSION_PEER_TOOL_NAMES,
|
|
408
|
-
...options?.assistant && !process.env.VH_TEAM_SCOPE_FILE ?
|
|
392
|
+
...options?.assistant && !process.env.VH_TEAM_SCOPE_FILE ? downloadTarget.ASSISTANT_TOOL_NAMES : []
|
|
409
393
|
],
|
|
410
394
|
stop: () => {
|
|
411
395
|
logger.logger.debug(`[happyMCP] server:stop sessionId=${client.sessionId}`);
|
|
@@ -501,7 +485,5 @@ function hashObject(obj, options, encoding = "hex") {
|
|
|
501
485
|
return crypto.createHash("sha256").update(jsonString).digest(encoding);
|
|
502
486
|
}
|
|
503
487
|
|
|
504
|
-
exports.createSelfReportState = createSelfReportState;
|
|
505
488
|
exports.hashObject = hashObject;
|
|
506
|
-
exports.isSelfReportFresh = isSelfReportFresh;
|
|
507
489
|
exports.startHappyServer = startHappyServer;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var configuration = require('./configuration-
|
|
5
|
-
var persistence = require('./persistence-
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
4
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
5
|
+
var persistence = require('./persistence-BYGl0QYw.cjs');
|
|
6
|
+
var controlClient = require('./controlClient-BI6Fw3fQ.cjs');
|
|
7
7
|
var doctor$1 = require('./doctor-u46qYYKX.cjs');
|
|
8
8
|
var node_fs = require('node:fs');
|
|
9
9
|
var path = require('node:path');
|
|
10
10
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
11
|
-
var _package = require('./package-
|
|
11
|
+
var _package = require('./package-C9ZP9bpX.cjs');
|
|
12
12
|
var doctorReadiness = require('./doctorReadiness-BCZGcN0a.cjs');
|
|
13
13
|
var authRelay = require('./authRelay-BdYkC1Po.cjs');
|
|
14
14
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
@@ -312,8 +312,8 @@ ${typeLabels[type] || type}:`));
|
|
|
312
312
|
}
|
|
313
313
|
console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
|
|
314
314
|
try {
|
|
315
|
-
const { resolveAgentHomesForCli } = await Promise.resolve().then(function () { return require('./agentHome-
|
|
316
|
-
const { describeAgentHome } = await Promise.resolve().then(function () { return require('./index-
|
|
315
|
+
const { resolveAgentHomesForCli } = await Promise.resolve().then(function () { return require('./agentHome-DeAWzhSe.cjs'); });
|
|
316
|
+
const { describeAgentHome } = await Promise.resolve().then(function () { return require('./index-PNMQPKhz.cjs'); });
|
|
317
317
|
const homes = await resolveAgentHomesForCli();
|
|
318
318
|
console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
|
|
319
319
|
console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
3
|
-
import { readSettings, readCredentials, readDaemonState } from './persistence-
|
|
4
|
-
import {
|
|
2
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
3
|
+
import { r as readSettings, g as readCredentials, d as readDaemonState } from './persistence-ON0zpHfb.mjs';
|
|
4
|
+
import { a as checkIfDaemonRunningAndCleanupStaleState } from './controlClient-DTheOlvC.mjs';
|
|
5
5
|
import { findAllHappyProcesses } from './doctor-BPkYWSuq.mjs';
|
|
6
6
|
import { statSync, realpathSync, existsSync, readdirSync } from 'node:fs';
|
|
7
7
|
import { isAbsolute, resolve, dirname, basename, delimiter, join } from 'node:path';
|
|
8
8
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
9
|
-
import { p as packageJson } from './package-
|
|
9
|
+
import { p as packageJson } from './package-DU1DxhH9.mjs';
|
|
10
10
|
import { s as shareableSettingsSummary, c as collectRuntimeReadiness, S as SUPPORTED_NODE_LABEL, r as resolveClaudeCredentialReadiness, a as toolProbeLabel, b as daemonReadiness, d as daemonEndpointsMatch } from './doctorReadiness-C208SMN9.mjs';
|
|
11
11
|
import { c as credentialRelayProblem } from './authRelay-DSAvg1uv.mjs';
|
|
12
12
|
import { d as deriveLocalCliUpdateSummary } from './cliUpdate-Y34VGe9Y.mjs';
|
|
@@ -310,8 +310,8 @@ ${typeLabels[type] || type}:`));
|
|
|
310
310
|
}
|
|
311
311
|
console.log(chalk.gray(" An external claude command is only needed for native terminal/mirror use."));
|
|
312
312
|
try {
|
|
313
|
-
const { resolveAgentHomesForCli } = await import('./agentHome-
|
|
314
|
-
const { describeAgentHome } = await import('./index-
|
|
313
|
+
const { resolveAgentHomesForCli } = await import('./agentHome-Ct-VXFeG.mjs');
|
|
314
|
+
const { describeAgentHome } = await import('./index-D8m8Ripb.mjs');
|
|
315
315
|
const homes = await resolveAgentHomesForCli();
|
|
316
316
|
console.log(chalk.green(`\u2713 Claude config dir: ${describeAgentHome(homes.claudeConfigDir)}`));
|
|
317
317
|
console.log(chalk.green(`\u2713 Codex home: ${describeAgentHome(homes.codexHome)}`));
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
var promises = require('node:fs/promises');
|
|
4
4
|
var os = require('node:os');
|
|
5
5
|
var z = require('zod');
|
|
6
|
-
var logger = require('./logger-
|
|
7
|
-
var persistence = require('./persistence-
|
|
8
|
-
var controlClient = require('./controlClient-
|
|
9
|
-
var sessionOps = require('./sessionOps-
|
|
10
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
6
|
+
var logger = require('./logger-B_MWPbZz.cjs');
|
|
7
|
+
var persistence = require('./persistence-BYGl0QYw.cjs');
|
|
8
|
+
var controlClient = require('./controlClient-BI6Fw3fQ.cjs');
|
|
9
|
+
var sessionOps = require('./sessionOps-DzbZI3Eq.cjs');
|
|
10
|
+
var remoteSessionClient = require('./remoteSessionClient-PyUAIhwK.cjs');
|
|
11
11
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
12
12
|
var terminals = require('./terminals-B_bfC9c2.cjs');
|
|
13
|
-
var bootstrap = require('./bootstrap-
|
|
13
|
+
var bootstrap = require('./bootstrap-Dj8WBiR2.cjs');
|
|
14
14
|
var path = require('node:path');
|
|
15
15
|
|
|
16
16
|
const PERSONAL_MEMORY_SOFT_LIMIT_CHARS = 2e3;
|
|
@@ -375,6 +375,44 @@ ${r.text}`);
|
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
const WEB_DOWNLOAD_MAX_BYTES = 50 * 1024 * 1024;
|
|
379
|
+
function downloadTargetVerdict(path, target) {
|
|
380
|
+
switch (target.kind) {
|
|
381
|
+
case "missing":
|
|
382
|
+
return { error: `${path} does not exist; create the file first, then call open_preview again`, note: null };
|
|
383
|
+
case "directory":
|
|
384
|
+
return {
|
|
385
|
+
error: `${path} is a directory; the user can only download a single file. Pack it first (e.g. \`zip -r out.zip <dir>\`) and call open_preview with the archive and download: true`,
|
|
386
|
+
note: null
|
|
387
|
+
};
|
|
388
|
+
case "other":
|
|
389
|
+
return { error: `${path} is not a regular file`, note: null };
|
|
390
|
+
case "error":
|
|
391
|
+
return { error: `cannot read ${path}: ${target.code} (${target.message})`, note: null };
|
|
392
|
+
case "file":
|
|
393
|
+
return target.size > WEB_DOWNLOAD_MAX_BYTES ? {
|
|
394
|
+
error: null,
|
|
395
|
+
note: `Note: the file is ${(target.size / 1024 / 1024).toFixed(1)} MiB, above the 50 MiB web download limit, so the user will see its size but cannot download it. Offer to compress it or split it into parts under 50 MiB (e.g. \`zip -s 45m\`).`
|
|
396
|
+
} : { error: null, note: null };
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
async function statDownloadTarget(path) {
|
|
400
|
+
try {
|
|
401
|
+
const s = await promises.stat(path);
|
|
402
|
+
if (s.isDirectory()) return { kind: "directory" };
|
|
403
|
+
if (!s.isFile()) return { kind: "other" };
|
|
404
|
+
return { kind: "file", size: s.size };
|
|
405
|
+
} catch (error) {
|
|
406
|
+
const code = error?.code;
|
|
407
|
+
if (code === "ENOENT") return { kind: "missing" };
|
|
408
|
+
return { kind: "error", code: code ?? "UNKNOWN", message: error instanceof Error ? error.message : String(error) };
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
async function checkDownloadTarget(path) {
|
|
412
|
+
return downloadTargetVerdict(path, await statDownloadTarget(path));
|
|
413
|
+
}
|
|
414
|
+
|
|
378
415
|
exports.ASSISTANT_TOOL_NAMES = ASSISTANT_TOOL_NAMES;
|
|
416
|
+
exports.checkDownloadTarget = checkDownloadTarget;
|
|
379
417
|
exports.registerAssistantSessionTools = registerAssistantSessionTools;
|
|
380
418
|
exports.registerAssistantTools = registerAssistantTools;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { readFile, writeFile, appendFile } from 'node:fs/promises';
|
|
1
|
+
import { readFile, writeFile, appendFile, stat } from 'node:fs/promises';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { l as logger } from './logger-
|
|
5
|
-
import { readPersistedSessions } from './persistence-
|
|
6
|
-
import {
|
|
7
|
-
import { a as listSessions, r as readSessionTranscript, s as sessionWebUrl, g as waitForSessionKey, e as sendUserMessage, b as stopSession, d as archiveSession } from './sessionOps-
|
|
8
|
-
import { r as readRemoteTranscript, s as sendRemoteMessage, d as deliverToSession, R as RemoteSessionOpsError } from './remoteSessionClient-
|
|
4
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
5
|
+
import { b as readPersistedSessions } from './persistence-ON0zpHfb.mjs';
|
|
6
|
+
import { f as spawnDaemonSession } from './controlClient-DTheOlvC.mjs';
|
|
7
|
+
import { a as listSessions, r as readSessionTranscript, s as sessionWebUrl, g as waitForSessionKey, e as sendUserMessage, b as stopSession, d as archiveSession } from './sessionOps-DZRH4-hV.mjs';
|
|
8
|
+
import { r as readRemoteTranscript, s as sendRemoteMessage, d as deliverToSession, R as RemoteSessionOpsError } from './remoteSessionClient-BzPXSC21.mjs';
|
|
9
9
|
import { i as isValidSessionId, a as isValidTerminalId } from './ids-DU6sLx4C.mjs';
|
|
10
10
|
import { l as listVhTerminals, r as readVhTerminal, s as sendToVhTerminal } from './terminals-Dlg0x3nY.mjs';
|
|
11
|
-
import { bootstrapAssistantHome, assistantPersonalMemoryPath } from './bootstrap-
|
|
11
|
+
import { bootstrapAssistantHome, assistantPersonalMemoryPath } from './bootstrap-BSOxYpaP.mjs';
|
|
12
12
|
import { join, isAbsolute, normalize } from 'node:path';
|
|
13
13
|
|
|
14
14
|
const PERSONAL_MEMORY_SOFT_LIMIT_CHARS = 2e3;
|
|
@@ -373,4 +373,41 @@ ${r.text}`);
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
|
|
376
|
+
const WEB_DOWNLOAD_MAX_BYTES = 50 * 1024 * 1024;
|
|
377
|
+
function downloadTargetVerdict(path, target) {
|
|
378
|
+
switch (target.kind) {
|
|
379
|
+
case "missing":
|
|
380
|
+
return { error: `${path} does not exist; create the file first, then call open_preview again`, note: null };
|
|
381
|
+
case "directory":
|
|
382
|
+
return {
|
|
383
|
+
error: `${path} is a directory; the user can only download a single file. Pack it first (e.g. \`zip -r out.zip <dir>\`) and call open_preview with the archive and download: true`,
|
|
384
|
+
note: null
|
|
385
|
+
};
|
|
386
|
+
case "other":
|
|
387
|
+
return { error: `${path} is not a regular file`, note: null };
|
|
388
|
+
case "error":
|
|
389
|
+
return { error: `cannot read ${path}: ${target.code} (${target.message})`, note: null };
|
|
390
|
+
case "file":
|
|
391
|
+
return target.size > WEB_DOWNLOAD_MAX_BYTES ? {
|
|
392
|
+
error: null,
|
|
393
|
+
note: `Note: the file is ${(target.size / 1024 / 1024).toFixed(1)} MiB, above the 50 MiB web download limit, so the user will see its size but cannot download it. Offer to compress it or split it into parts under 50 MiB (e.g. \`zip -s 45m\`).`
|
|
394
|
+
} : { error: null, note: null };
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
async function statDownloadTarget(path) {
|
|
398
|
+
try {
|
|
399
|
+
const s = await stat(path);
|
|
400
|
+
if (s.isDirectory()) return { kind: "directory" };
|
|
401
|
+
if (!s.isFile()) return { kind: "other" };
|
|
402
|
+
return { kind: "file", size: s.size };
|
|
403
|
+
} catch (error) {
|
|
404
|
+
const code = error?.code;
|
|
405
|
+
if (code === "ENOENT") return { kind: "missing" };
|
|
406
|
+
return { kind: "error", code: code ?? "UNKNOWN", message: error instanceof Error ? error.message : String(error) };
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
async function checkDownloadTarget(path) {
|
|
410
|
+
return downloadTargetVerdict(path, await statDownloadTarget(path));
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export { ASSISTANT_TOOL_NAMES as A, registerAssistantTools as a, checkDownloadTarget as c, registerAssistantSessionTools as r };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { i as isDaemonRunningCurrentlyInstalledHappyVersion,
|
|
3
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
4
|
-
import { readDaemonState } from './persistence-
|
|
5
|
-
import { c as configuration } from './configuration-
|
|
1
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
2
|
+
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, a as checkIfDaemonRunningAndCleanupStaleState, b as stopDaemon } from './controlClient-DTheOlvC.mjs';
|
|
3
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-B2h0P4b5.mjs';
|
|
4
|
+
import { d as readDaemonState } from './persistence-ON0zpHfb.mjs';
|
|
5
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
6
6
|
import { d as daemonEndpointsMatch } from './doctorReadiness-C208SMN9.mjs';
|
|
7
7
|
|
|
8
8
|
function extractNoSandboxFlag(args) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
5
|
-
var spawnHappyCLI = require('./spawnHappyCLI-
|
|
6
|
-
var persistence = require('./persistence-
|
|
7
|
-
var configuration = require('./configuration-
|
|
3
|
+
var logger = require('./logger-B_MWPbZz.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-BI6Fw3fQ.cjs');
|
|
5
|
+
var spawnHappyCLI = require('./spawnHappyCLI-J4iEhfyZ.cjs');
|
|
6
|
+
var persistence = require('./persistence-BYGl0QYw.cjs');
|
|
7
|
+
var configuration = require('./configuration-C3piBtxY.cjs');
|
|
8
8
|
var doctorReadiness = require('./doctorReadiness-BCZGcN0a.cjs');
|
|
9
9
|
|
|
10
10
|
function extractNoSandboxFlag(args) {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
2
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-B2h0P4b5.mjs';
|
|
3
3
|
import axios, { AxiosError } from 'axios';
|
|
4
4
|
import tweetnacl from 'tweetnacl';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { d as decodeBase64, a as decryptWithDataKey, b as decryptLegacy } from './authRelay-DSAvg1uv.mjs';
|
|
7
|
-
import { c as configuration } from './configuration-
|
|
8
|
-
import { g as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials } from './localHappyAgentAuth-
|
|
7
|
+
import { c as configuration } from './configuration-WspKd2C2.mjs';
|
|
8
|
+
import { g as getLocalHappyAgentCredentialPath, r as readLocalHappyAgentCredentials } from './localHappyAgentAuth-B5XPEMwk.mjs';
|
|
9
9
|
import 'cross-spawn';
|
|
10
10
|
import 'node:path';
|
|
11
11
|
import './projectPath-BTBIMB57.mjs';
|
|
12
12
|
import 'path';
|
|
13
13
|
import 'url';
|
|
14
|
-
import './logger-
|
|
14
|
+
import './logger-CbBv3q_b.mjs';
|
|
15
15
|
import 'chalk';
|
|
16
16
|
import 'node:util';
|
|
17
17
|
import 'node:crypto';
|
|
18
18
|
import 'node:os';
|
|
19
|
-
import './package-
|
|
19
|
+
import './package-DU1DxhH9.mjs';
|
|
20
20
|
import 'node:fs/promises';
|
|
21
21
|
|
|
22
22
|
const ResumableMetadataSchema = z.object({
|