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,6 +1,6 @@
|
|
|
1
1
|
import { SandboxManager } from '@anthropic-ai/sandbox-runtime';
|
|
2
2
|
import { homedir } from 'node:os';
|
|
3
|
-
import { resolve, isAbsolute } from 'node:path';
|
|
3
|
+
import { resolve, isAbsolute, join } from 'node:path';
|
|
4
4
|
|
|
5
5
|
function expandPath(pathValue, sessionPath) {
|
|
6
6
|
const expandedHome = pathValue.replace(/^~(?=\/|$)/, homedir());
|
|
@@ -20,10 +20,16 @@ function getSharedAgentStatePaths(sessionPath) {
|
|
|
20
20
|
expandPath(claudeConfigDir, sessionPath)
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
|
+
function defaultHappyHomeDir(env = process.env) {
|
|
24
|
+
return env.HAPPY_HOME_DIR ? env.HAPPY_HOME_DIR.replace(/^~/, homedir()) : join(homedir(), ".happy");
|
|
25
|
+
}
|
|
26
|
+
function protectedWritePaths(happyHomeDir) {
|
|
27
|
+
return [join(resolve(happyHomeDir), "worktree-setup")];
|
|
28
|
+
}
|
|
23
29
|
function uniquePaths(paths) {
|
|
24
30
|
return [...new Set(paths)];
|
|
25
31
|
}
|
|
26
|
-
function buildSandboxRuntimeConfig(sandboxConfig, sessionPath) {
|
|
32
|
+
function buildSandboxRuntimeConfig(sandboxConfig, sessionPath, happyHomeDir = defaultHappyHomeDir()) {
|
|
27
33
|
const extraWritePaths = resolvePaths(sandboxConfig.extraWritePaths, sessionPath);
|
|
28
34
|
const sharedAgentStatePaths = getSharedAgentStatePaths(sessionPath);
|
|
29
35
|
const allowWrite = (() => {
|
|
@@ -75,7 +81,7 @@ function buildSandboxRuntimeConfig(sandboxConfig, sessionPath) {
|
|
|
75
81
|
filesystem: {
|
|
76
82
|
denyRead: resolvePaths(sandboxConfig.denyReadPaths, sessionPath),
|
|
77
83
|
allowWrite,
|
|
78
|
-
denyWrite: resolvePaths(sandboxConfig.denyWritePaths, sessionPath)
|
|
84
|
+
denyWrite: uniquePaths([...resolvePaths(sandboxConfig.denyWritePaths, sessionPath), ...protectedWritePaths(happyHomeDir)])
|
|
79
85
|
}
|
|
80
86
|
};
|
|
81
87
|
}
|
|
@@ -22,10 +22,16 @@ function getSharedAgentStatePaths(sessionPath) {
|
|
|
22
22
|
expandPath(claudeConfigDir, sessionPath)
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
|
+
function defaultHappyHomeDir(env = process.env) {
|
|
26
|
+
return env.HAPPY_HOME_DIR ? env.HAPPY_HOME_DIR.replace(/^~/, os.homedir()) : path.join(os.homedir(), ".happy");
|
|
27
|
+
}
|
|
28
|
+
function protectedWritePaths(happyHomeDir) {
|
|
29
|
+
return [path.join(path.resolve(happyHomeDir), "worktree-setup")];
|
|
30
|
+
}
|
|
25
31
|
function uniquePaths(paths) {
|
|
26
32
|
return [...new Set(paths)];
|
|
27
33
|
}
|
|
28
|
-
function buildSandboxRuntimeConfig(sandboxConfig, sessionPath) {
|
|
34
|
+
function buildSandboxRuntimeConfig(sandboxConfig, sessionPath, happyHomeDir = defaultHappyHomeDir()) {
|
|
29
35
|
const extraWritePaths = resolvePaths(sandboxConfig.extraWritePaths, sessionPath);
|
|
30
36
|
const sharedAgentStatePaths = getSharedAgentStatePaths(sessionPath);
|
|
31
37
|
const allowWrite = (() => {
|
|
@@ -77,7 +83,7 @@ function buildSandboxRuntimeConfig(sandboxConfig, sessionPath) {
|
|
|
77
83
|
filesystem: {
|
|
78
84
|
denyRead: resolvePaths(sandboxConfig.denyReadPaths, sessionPath),
|
|
79
85
|
allowWrite,
|
|
80
|
-
denyWrite: resolvePaths(sandboxConfig.denyWritePaths, sessionPath)
|
|
86
|
+
denyWrite: uniquePaths([...resolvePaths(sandboxConfig.denyWritePaths, sessionPath), ...protectedWritePaths(happyHomeDir)])
|
|
81
87
|
}
|
|
82
88
|
};
|
|
83
89
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tools = require('./tools-
|
|
3
|
+
var tools = require('./tools-DJIANHSh.cjs');
|
|
4
4
|
var mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
5
5
|
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
6
6
|
var z = require('zod');
|
|
7
|
-
var controlClient = require('./controlClient-
|
|
7
|
+
var controlClient = require('./controlClient-BI6Fw3fQ.cjs');
|
|
8
8
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
9
|
-
var
|
|
10
|
-
var logger = require('./logger-
|
|
9
|
+
var downloadTarget = require('./downloadTarget-CWTb2-EM.cjs');
|
|
10
|
+
var logger = require('./logger-B_MWPbZz.cjs');
|
|
11
11
|
var previewPath = require('./previewPath-B0rBdhy1.cjs');
|
|
12
|
-
var agentGuidance = require('./agentGuidance-
|
|
12
|
+
var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
|
|
13
13
|
require('node:fs/promises');
|
|
14
14
|
require('node:os');
|
|
15
|
-
require('./persistence-
|
|
16
|
-
require('./configuration-
|
|
15
|
+
require('./persistence-BYGl0QYw.cjs');
|
|
16
|
+
require('./configuration-C3piBtxY.cjs');
|
|
17
17
|
require('node:crypto');
|
|
18
18
|
require('axios');
|
|
19
19
|
require('tweetnacl');
|
|
@@ -23,21 +23,21 @@ require('./terminals-B_bfC9c2.cjs');
|
|
|
23
23
|
require('node:fs');
|
|
24
24
|
require('node:path');
|
|
25
25
|
var terminalTitleSuggest = require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
26
|
-
var titleGenerator = require('./titleGenerator-
|
|
26
|
+
var titleGenerator = require('./titleGenerator-B07bZA0V.cjs');
|
|
27
27
|
var terminalToolContext = require('./terminalToolContext-DoV9Gs7K.cjs');
|
|
28
|
-
require('./client-
|
|
29
|
-
require('./context-
|
|
30
|
-
require('./sessionOps-
|
|
28
|
+
require('./client-BKnKRLSt.cjs');
|
|
29
|
+
require('./context-Jrq4-eCZ.cjs');
|
|
30
|
+
require('./sessionOps-DzbZI3Eq.cjs');
|
|
31
31
|
require('./authRelay-BdYkC1Po.cjs');
|
|
32
|
-
require('./time-
|
|
32
|
+
require('./time-BXvtjhe9.cjs');
|
|
33
33
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
34
|
-
require('./remoteSessionClient-
|
|
34
|
+
require('./remoteSessionClient-PyUAIhwK.cjs');
|
|
35
35
|
require('./ids-B6ZC0HGt.cjs');
|
|
36
|
-
require('./bootstrap-
|
|
36
|
+
require('./bootstrap-Dj8WBiR2.cjs');
|
|
37
37
|
require('chalk');
|
|
38
38
|
require('node:util');
|
|
39
39
|
require('./trimIdent-4gvk9Wk6.cjs');
|
|
40
|
-
require('./package-
|
|
40
|
+
require('./package-C9ZP9bpX.cjs');
|
|
41
41
|
require('./tmuxSocket-D-Xt6Vn-.cjs');
|
|
42
42
|
require('node:module');
|
|
43
43
|
require('./oneShotPrompts-CL0dip9C.cjs');
|
|
@@ -92,14 +92,19 @@ function registerMcpTools(server, surface, terminalId = null) {
|
|
|
92
92
|
title: agentGuidance.PREVIEW_TOOL_TITLE,
|
|
93
93
|
inputSchema: {
|
|
94
94
|
path: z.z.string().min(1).describe("Absolute path or path relative to the current working directory"),
|
|
95
|
-
mode: z.z.enum(["file", "diff"]).optional().describe("'file' (default) previews the file; 'diff' is reserved and currently falls back to 'file'")
|
|
95
|
+
mode: z.z.enum(["file", "diff"]).optional().describe("'file' (default) previews the file; 'diff' is reserved and currently falls back to 'file'"),
|
|
96
|
+
download: z.z.boolean().optional().describe(agentGuidance.PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
96
97
|
}
|
|
97
98
|
}, async (args) => {
|
|
98
99
|
const verdict = previewPath.checkPreviewPath(args.path);
|
|
99
100
|
if (verdict.deniedReason) return { content: [{ type: "text", text: verdict.deniedReason }], isError: true };
|
|
100
|
-
const
|
|
101
|
+
const download = args.download === true;
|
|
102
|
+
const target = download ? await downloadTarget.checkDownloadTarget(verdict.resolved) : null;
|
|
103
|
+
if (target?.error) return { content: [{ type: "text", text: target.error }], isError: true };
|
|
104
|
+
const result = await controlClient.pushFilePreviewViaDaemon(terminalId, verdict.resolved, args.mode ?? "file", download ? "download" : void 0);
|
|
105
|
+
const note = target?.note ? ` ${target.note}` : "";
|
|
101
106
|
return {
|
|
102
|
-
content: [{ type: "text", text: result.delivered ? `Queued a preview request for ${verdict.resolved}. This does not confirm that a browser opened it.` : `Failed to request preview: ${result.error || "unknown error"}` }],
|
|
107
|
+
content: [{ type: "text", text: result.delivered ? download ? `Queued a download request for ${verdict.resolved}. This does not confirm that a browser downloaded it.${note}` : `Queued a preview request for ${verdict.resolved}. This does not confirm that a browser opened it.` : `Failed to request preview: ${result.error || "unknown error"}` }],
|
|
103
108
|
isError: !result.delivered
|
|
104
109
|
};
|
|
105
110
|
});
|
|
@@ -128,7 +133,7 @@ function registerMcpTools(server, surface, terminalId = null) {
|
|
|
128
133
|
});
|
|
129
134
|
}
|
|
130
135
|
if (surface === "assistant" && !process.env.VH_TEAM_SCOPE_FILE) {
|
|
131
|
-
|
|
136
|
+
downloadTarget.registerAssistantSessionTools(server);
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
139
|
async function handleMcpCommand(terminalToolsOnly = false) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { r as registerTeamsTools } from './tools-
|
|
1
|
+
import { r as registerTeamsTools } from './tools-D91mq5Ib.mjs';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { p as pushClipboardViaDaemon,
|
|
5
|
+
import { p as pushClipboardViaDaemon, d as pushFilePreviewViaDaemon, e as setTerminalTitleViaDaemon } from './controlClient-DTheOlvC.mjs';
|
|
6
6
|
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';
|
|
7
|
-
import { r as registerAssistantSessionTools } from './
|
|
8
|
-
import { l as logger } from './logger-
|
|
7
|
+
import { c as checkDownloadTarget, r as registerAssistantSessionTools } from './downloadTarget-Cp48jrIP.mjs';
|
|
8
|
+
import { l as logger } from './logger-CbBv3q_b.mjs';
|
|
9
9
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
10
|
-
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION } from './agentGuidance-
|
|
10
|
+
import { P as PREVIEW_TOOL_NAME, a as PREVIEW_TOOL_TITLE, b as PREVIEW_TOOL_DESCRIPTION, c as PREVIEW_DOWNLOAD_PARAM_DESCRIPTION } from './agentGuidance-BDYt2Qy2.mjs';
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'node:os';
|
|
13
|
-
import './persistence-
|
|
14
|
-
import './configuration-
|
|
13
|
+
import './persistence-ON0zpHfb.mjs';
|
|
14
|
+
import './configuration-WspKd2C2.mjs';
|
|
15
15
|
import 'node:crypto';
|
|
16
16
|
import 'axios';
|
|
17
17
|
import 'tweetnacl';
|
|
@@ -21,21 +21,21 @@ import './terminals-Dlg0x3nY.mjs';
|
|
|
21
21
|
import 'node:fs';
|
|
22
22
|
import 'node:path';
|
|
23
23
|
import { b as TerminalTitleSuggestRequestSchema } from './terminalTitleSuggest-CeKsX_V6.mjs';
|
|
24
|
-
import { s as suggestTitleForPrompt } from './titleGenerator-
|
|
24
|
+
import { s as suggestTitleForPrompt } from './titleGenerator-CIzfpfZW.mjs';
|
|
25
25
|
import { r as resolveMcpTerminalId } from './terminalToolContext-CFeGeaNm.mjs';
|
|
26
|
-
import './client-
|
|
27
|
-
import './context-
|
|
28
|
-
import './sessionOps-
|
|
26
|
+
import './client-Dsfy_SAb.mjs';
|
|
27
|
+
import './context-Cr6a3NTg.mjs';
|
|
28
|
+
import './sessionOps-DZRH4-hV.mjs';
|
|
29
29
|
import './authRelay-DSAvg1uv.mjs';
|
|
30
|
-
import './time-
|
|
30
|
+
import './time-PG5Dfwdv.mjs';
|
|
31
31
|
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
32
|
-
import './remoteSessionClient-
|
|
32
|
+
import './remoteSessionClient-BzPXSC21.mjs';
|
|
33
33
|
import './ids-DU6sLx4C.mjs';
|
|
34
|
-
import './bootstrap-
|
|
34
|
+
import './bootstrap-BSOxYpaP.mjs';
|
|
35
35
|
import 'chalk';
|
|
36
36
|
import 'node:util';
|
|
37
37
|
import './trimIdent-BAjmv_TG.mjs';
|
|
38
|
-
import './package-
|
|
38
|
+
import './package-DU1DxhH9.mjs';
|
|
39
39
|
import './tmuxSocket-B8Yx20sT.mjs';
|
|
40
40
|
import 'node:module';
|
|
41
41
|
import './oneShotPrompts-DT4p6RNd.mjs';
|
|
@@ -90,14 +90,19 @@ function registerMcpTools(server, surface, terminalId = null) {
|
|
|
90
90
|
title: PREVIEW_TOOL_TITLE,
|
|
91
91
|
inputSchema: {
|
|
92
92
|
path: z.string().min(1).describe("Absolute path or path relative to the current working directory"),
|
|
93
|
-
mode: z.enum(["file", "diff"]).optional().describe("'file' (default) previews the file; 'diff' is reserved and currently falls back to 'file'")
|
|
93
|
+
mode: z.enum(["file", "diff"]).optional().describe("'file' (default) previews the file; 'diff' is reserved and currently falls back to 'file'"),
|
|
94
|
+
download: z.boolean().optional().describe(PREVIEW_DOWNLOAD_PARAM_DESCRIPTION)
|
|
94
95
|
}
|
|
95
96
|
}, async (args) => {
|
|
96
97
|
const verdict = checkPreviewPath(args.path);
|
|
97
98
|
if (verdict.deniedReason) return { content: [{ type: "text", text: verdict.deniedReason }], isError: true };
|
|
98
|
-
const
|
|
99
|
+
const download = args.download === true;
|
|
100
|
+
const target = download ? await checkDownloadTarget(verdict.resolved) : null;
|
|
101
|
+
if (target?.error) return { content: [{ type: "text", text: target.error }], isError: true };
|
|
102
|
+
const result = await pushFilePreviewViaDaemon(terminalId, verdict.resolved, args.mode ?? "file", download ? "download" : void 0);
|
|
103
|
+
const note = target?.note ? ` ${target.note}` : "";
|
|
99
104
|
return {
|
|
100
|
-
content: [{ type: "text", text: result.delivered ? `Queued a preview request for ${verdict.resolved}. This does not confirm that a browser opened it.` : `Failed to request preview: ${result.error || "unknown error"}` }],
|
|
105
|
+
content: [{ type: "text", text: result.delivered ? download ? `Queued a download request for ${verdict.resolved}. This does not confirm that a browser downloaded it.${note}` : `Queued a preview request for ${verdict.resolved}. This does not confirm that a browser opened it.` : `Failed to request preview: ${result.error || "unknown error"}` }],
|
|
101
106
|
isError: !result.delivered
|
|
102
107
|
};
|
|
103
108
|
});
|