very-happy-cli 0.2.177 → 0.2.179
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/dist/{AcpBackend-B0K0WrtW.mjs → AcpBackend-CHp3y7cb.mjs} +135 -16
- package/dist/{AcpBackend-B-ny68XM.cjs → AcpBackend-DFipFF7-.cjs} +135 -16
- package/dist/{AcpSessionManager-CjdJLofq.cjs → AcpSessionManager-0zpvRJXc.cjs} +38 -4
- package/dist/{AcpSessionManager-DykjzBM4.mjs → AcpSessionManager-d2-rKWWa.mjs} +38 -4
- package/dist/{BasePermissionHandler-DR6nxuEn.cjs → BasePermissionHandler-CH3zuEkA.cjs} +5 -2
- package/dist/{BasePermissionHandler-hdY7kTqX.mjs → BasePermissionHandler-DdZBYIR4.mjs} +5 -2
- package/dist/acpSessionResume-DTGmAPLt.mjs +67 -0
- package/dist/acpSessionResume-oiCBnAVA.cjs +74 -0
- package/dist/{agentHome-BdTXEUPe.cjs → agentHome-BWcz8mz0.cjs} +5 -5
- package/dist/{agentHome-GRN2VfHv.mjs → agentHome-CghLvL_1.mjs} +5 -5
- package/dist/{api-BWX10o97.cjs → api-Cmjfr8Z7.cjs} +29 -261
- package/dist/{api-CKBViqI3.mjs → api-CzwFpJQc.mjs} +22 -254
- package/dist/{apiMachine-DttO4UFj.mjs → apiMachine-DJkTEiqy.mjs} +53 -16
- package/dist/{apiMachine-BYYFGgFs.cjs → apiMachine-G6OogT08.cjs} +53 -16
- package/dist/{attachmentContent-cPVF463_.mjs → attachmentContent-B2os4HbA.mjs} +2 -2
- package/dist/{attachmentContent-kJKXpkMX.cjs → attachmentContent-Bo0UAsSu.cjs} +4 -4
- package/dist/{auth-BmESeKuM.mjs → auth-BS6PaOOG.mjs} +6 -6
- package/dist/{auth-CTECt2Oz.cjs → auth-D6bBUwZa.cjs} +6 -6
- package/dist/{auth-CKdXb9zp.mjs → auth-DMX0xPNK.mjs} +9 -9
- package/dist/{auth-DNxVmVbn.cjs → auth-HEhRaNgL.cjs} +9 -9
- package/dist/{authRelay-DSAvg1uv.mjs → authRelay-DhQhkBvX.mjs} +1 -1
- package/dist/{authRelay-BdYkC1Po.cjs → authRelay-Dy1qU9td.cjs} +1 -0
- package/dist/{auto-D1ypjjfx.cjs → auto-C6I55iOh.cjs} +19 -18
- package/dist/{auto-Ch3203qd.mjs → auto-Cl1SEDcD.mjs} +19 -18
- package/dist/{bootstrap-6OI698q9.cjs → bootstrap-exVucYav.cjs} +2 -2
- package/dist/{bootstrap-C0s2bPFQ.mjs → bootstrap-iuyufnp3.mjs} +2 -2
- package/dist/{browser-DG6Uof5O.cjs → browser-BohJK12g.cjs} +1 -1
- package/dist/{browser-BlLWZUMx.mjs → browser-CSYum7xH.mjs} +1 -1
- package/dist/{claudeLocal-CcWcKnoo.mjs → claudeLocal-Dq_R3Ax_.mjs} +6 -5
- package/dist/{claudeLocal-CemsIArT.cjs → claudeLocal-re4yjSTx.cjs} +6 -5
- package/dist/{claudeLocalLauncher-A4VuevIi.cjs → claudeLocalLauncher-B4hJHpCA.cjs} +11 -10
- package/dist/{claudeLocalLauncher-7p6y88nj.mjs → claudeLocalLauncher-CN67lN7-.mjs} +11 -10
- package/dist/{claudeSessionFork-BtROOjqf.mjs → claudeSessionFork-BihfD0Ik.mjs} +1 -1
- package/dist/{claudeSessionFork-CbDfm8Fz.cjs → claudeSessionFork-DiSMYerV.cjs} +1 -1
- package/dist/{client-DyvBTYee.cjs → client-BKcK1Bi-.cjs} +3 -3
- package/dist/client-BhoEBnuN.mjs +71 -0
- package/dist/{client-COmgDDy0.cjs → client-CuVdN6PP.cjs} +2 -2
- package/dist/{client-BPMWutfs.mjs → client-DuTDwWSQ.mjs} +3 -3
- package/dist/client-ZjOsn6nZ.cjs +76 -0
- package/dist/{client-DG5ndWLw.mjs → client-wo9nbxuf.mjs} +2 -2
- package/dist/codex/happyMcpStdioBridge.cjs +25 -16
- package/dist/codex/happyMcpStdioBridge.mjs +25 -16
- package/dist/{codexAppServerClient-D-Z8qSfI.mjs → codexAppServerClient-BK3zra_1.mjs} +3 -3
- package/dist/{codexAppServerClient-R24WZZfg.cjs → codexAppServerClient-Dt5zxrun.cjs} +3 -3
- package/dist/{codexCommand-CVTkZJ1o.mjs → codexCommand-B6pY7CMh.mjs} +66 -61
- package/dist/{codexCommand-6hW19gsq.cjs → codexCommand-CAZ1SLjg.cjs} +89 -84
- package/dist/{codexTermination-CCIfwzcx.mjs → codexTermination-Cd1Eon_4.mjs} +1 -1
- package/dist/{codexTermination-BBU7e92y.cjs → codexTermination-DmGbHxcD.cjs} +1 -1
- package/dist/{config-CvsNChKX.mjs → config-2oMG_fEI.mjs} +3 -3
- package/dist/{config-DhdrvOLV.cjs → config-B0uK6K7n.cjs} +3 -3
- package/dist/{configuration-DZPy0T9Z.cjs → configuration-CMHZnp6G.cjs} +1 -1
- package/dist/{configuration-D55F0t16.mjs → configuration-WMi4idBB.mjs} +1 -1
- package/dist/{connect-CwCXMRmD.mjs → connect-BLVHhHzA.mjs} +15 -15
- package/dist/{connect-Wz-XZYXW.cjs → connect-uaglGrde.cjs} +15 -15
- package/dist/{context-BKbrZ55r.cjs → context-DXzU5bFM.cjs} +1 -1
- package/dist/{context-CCRpVXFo.mjs → context-DploEcoN.mjs} +1 -1
- package/dist/{controlClient-C4xB5J6O.mjs → controlClient-BWUJrj3t.mjs} +3 -3
- package/dist/{controlClient-SX8gSza2.cjs → controlClient-C-5qCt8W.cjs} +3 -3
- package/dist/{createSessionMetadata-Bi-m0Y_O.mjs → createSessionMetadata-3uXrJgOW.mjs} +2 -2
- package/dist/{createSessionMetadata-BCFmYlBo.cjs → createSessionMetadata-BkIzHALd.cjs} +2 -2
- package/dist/{defaultPermissionMode-wBcbBezm.mjs → defaultPermissionMode-BzxLh20a.mjs} +2 -2
- package/dist/{defaultPermissionMode-DMBEnXll.cjs → defaultPermissionMode-pS3vmiSg.cjs} +2 -2
- package/dist/{deterministicJson-ChGfQEF6.cjs → deterministicJson-B8z2GPi9.cjs} +220 -14
- package/dist/{deterministicJson-BkQETt8_.mjs → deterministicJson-D_whDMFd.mjs} +217 -12
- package/dist/{doctor-BsN3JZJn.cjs → doctor-Br1Kcy2J.cjs} +8 -8
- package/dist/{doctor-B9c2C9dF.mjs → doctor-CmtSsR2-.mjs} +8 -8
- package/dist/{downloadTarget-Dj3WoVJa.cjs → downloadTarget-BQJK_6oH.cjs} +6 -6
- package/dist/{downloadTarget-ByXzbDK4.mjs → downloadTarget-BoNwTIH_.mjs} +6 -6
- package/dist/{ensureDaemonRunning-7Wb8M7Lv.cjs → ensureDaemonRunning-BRUmsq6J.cjs} +5 -5
- package/dist/{ensureDaemonRunning--HYzs5Ce.mjs → ensureDaemonRunning-Czo9IHJQ.mjs} +5 -5
- package/dist/{handleResumeCommand-DHddBkNJ.mjs → handleResumeCommand-C8thKjqf.mjs} +22 -6
- package/dist/{handleResumeCommand-OmuUGYjQ.cjs → handleResumeCommand-tKD_Hpxc.cjs} +22 -6
- package/dist/{index-CrR4JISa.cjs → index-B0UjHlAe.cjs} +5 -5
- package/dist/{index-BzJNDsJq.mjs → index-BTxHphpV.mjs} +254 -49
- package/dist/index-BiyC7cZ3.mjs +18 -0
- package/dist/{index-De8L5lFK.cjs → index-C6O2vVjm.cjs} +156 -34
- package/dist/index-CUuc6iCn.cjs +24 -0
- package/dist/{index-Dhl6_bw7.mjs → index-CdQI0C9p.mjs} +5 -5
- package/dist/{index-D9NoYc5I.cjs → index-D09T1m8Y.cjs} +3 -3
- package/dist/{index-CEm0MYiS.mjs → index-D3bidoG8.mjs} +3 -3
- package/dist/{index-BRJzH4sc.cjs → index-DMqDMT1Q.cjs} +257 -52
- package/dist/{index-DMy3OCBe.mjs → index-DPOa4NhL.mjs} +154 -35
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BdvKiOQw.mjs → install-BX3lv3NO.mjs} +1 -1
- package/dist/{install-Cf6AFSWC.cjs → install-BXvf2E3o.cjs} +1 -1
- package/dist/{install-1qn-D9FS.cjs → install-CYRZxS87.cjs} +3 -3
- package/dist/{install-BDIUtPXi.mjs → install-hnve_9vq.mjs} +3 -3
- package/dist/lib.cjs +14 -14
- package/dist/lib.d.cts +65 -1
- package/dist/lib.d.mts +65 -1
- package/dist/lib.mjs +14 -14
- package/dist/{lidState-BqVsw7H1.mjs → lidState-Bb8fgXg3.mjs} +2 -2
- package/dist/{lidState-DxbK0qfu.cjs → lidState-Dv2wwFTj.cjs} +2 -2
- package/dist/{localHappyAgentAuth-D5tANdRD.cjs → localHappyAgentAuth-DjYvkXvV.cjs} +2 -2
- package/dist/{localHappyAgentAuth-Ce8kO2yc.mjs → localHappyAgentAuth-NEU7fax7.mjs} +2 -2
- package/dist/{logger-13cBr_ew.mjs → logger-BtVhHnD8.mjs} +2 -2
- package/dist/{logger-LvwVeATU.cjs → logger-C1GWx3gi.cjs} +2 -2
- package/dist/{machineMetadata-29h7vgf4.cjs → machineMetadata-CLHS9sv_.cjs} +3 -3
- package/dist/{machineMetadata-dMida2qq.mjs → machineMetadata-D-g--oU_.mjs} +3 -3
- package/dist/{main-x4nAhdH5.mjs → main-B2LWV8DI.mjs} +59 -46
- package/dist/{main-DpM5jaFH.cjs → main-CWhSsbtU.cjs} +59 -46
- package/dist/{mcp-DQv3caXs.cjs → mcp-CARUsXHV.cjs} +15 -15
- package/dist/{mcp-DMiFGYMT.mjs → mcp-ext92q3Y.mjs} +15 -15
- package/dist/{mirrorProtocol-Bz8tEabR.mjs → mirrorProtocol-BwYibqry.mjs} +3 -3
- package/dist/{mirrorProtocol-BfrERW7Z.cjs → mirrorProtocol-DEy2g1CB.cjs} +3 -3
- package/dist/{package-CjlsAaRe.mjs → package-BPPebGQF.mjs} +7 -7
- package/dist/{package-Ch9WGDV_.cjs → package-SgqTYsjn.cjs} +7 -7
- package/dist/panels-BZ0_Tt7B.mjs +137 -0
- package/dist/panels-D1c7q2dD.cjs +142 -0
- package/dist/{peerTools-CxmrKnfV.mjs → peerTools-CWKzcQ7u.mjs} +60 -10
- package/dist/{peerTools-DtGKWli5.cjs → peerTools-DRQETXaz.cjs} +60 -9
- package/dist/{persistence-DXbKOHxl.cjs → persistence-BegE7NPa.cjs} +14 -3
- package/dist/{persistence-C_tYtOqK.mjs → persistence-Cr-wutZ4.mjs} +14 -4
- package/dist/{piRunnerArgs-BVRZe2AR.cjs → piRunnerArgs-Cs-378Vz.cjs} +8 -2
- package/dist/{piRunnerArgs-BpHc-JZl.mjs → piRunnerArgs-DwvM_yWA.mjs} +7 -1
- package/dist/{piRuntime-D7eio8Ix.cjs → piRuntime-BG-1td_n.cjs} +2 -2
- package/dist/{piRuntime-DOdGF395.mjs → piRuntime-Bue5mnlc.mjs} +2 -2
- package/dist/{piTerminal-dpxz4Q8D.mjs → piTerminal-B5x9X5yV.mjs} +18 -18
- package/dist/{piTerminal-y_PRo2NY.cjs → piTerminal-G4z-xVyy.cjs} +18 -18
- package/dist/processTreeSnapshot-CuLJDNC-.mjs +101 -0
- package/dist/processTreeSnapshot-mDbnuojn.cjs +105 -0
- package/dist/prompt-BOouDaTM.mjs +99 -0
- package/dist/prompt-lgF9IE82.cjs +105 -0
- package/dist/{attachmentLimits-Di1Z93lN.mjs → pushNotifications-BdFjDjQe.mjs} +303 -3
- package/dist/{attachmentLimits-DtFqqiwR.cjs → pushNotifications-DaLQUyi0.cjs} +304 -2
- package/dist/{index-DFPT4HOO.cjs → query-Ctfg-5gy.cjs} +25 -5
- package/dist/{index-CEjJnq05.mjs → query-DYP_W1wp.mjs} +26 -3
- package/dist/{rateLimitWindows-DYHDGuzQ.mjs → rateLimitWindows-CuEqk_0g.mjs} +1 -1
- package/dist/{rateLimitWindows-DFnMU2Vt.cjs → rateLimitWindows-Dj_8voBK.cjs} +1 -1
- package/dist/{registerCommonHandlers-D8OMpBbQ.mjs → registerCommonHandlers-BAlP7SGc.mjs} +2 -2
- package/dist/{registerCommonHandlers-60VuTkdg.cjs → registerCommonHandlers-Cj084Sg7.cjs} +2 -2
- package/dist/{registerKillSessionHandler-Drhf7-Vz.mjs → registerKillSessionHandler-PD0jWtQo.mjs} +6 -6
- package/dist/{registerKillSessionHandler-pqChBKwO.cjs → registerKillSessionHandler-qMju0ZfF.cjs} +6 -6
- package/dist/{remoteSessionClient-B7NvjHD3.cjs → remoteSessionClient-B7i7MkYV.cjs} +5 -5
- package/dist/{remoteSessionClient-D01Hso2-.mjs → remoteSessionClient-Bn2qu5C5.mjs} +5 -5
- package/dist/{reportProgressTool-Du_zAK4h.cjs → reportProgressTool-CM1JFAHg.cjs} +84 -2
- package/dist/{reportProgressTool-B203EZCR.mjs → reportProgressTool-gHItlSzz.mjs} +82 -3
- package/dist/{resources-JDPugcDq.cjs → resources-CvIlkzpP.cjs} +30 -0
- package/dist/{resources-BdFBQi8r.mjs → resources-y9jfyO-_.mjs} +30 -0
- package/dist/{run-DX4Zs3Ug.mjs → run-BM4TxiyN.mjs} +249 -45
- package/dist/{run-DZ5jU53c.cjs → run-CNXwIe0A.cjs} +263 -59
- package/dist/{runClaude-ClRhHpwR.cjs → runClaude-CWhj2V4Q.cjs} +37 -41
- package/dist/{runClaude-CgPHXP0L.mjs → runClaude-C_3I8hvR.mjs} +37 -41
- package/dist/{runClaudeDeps-D2v_WDSL.cjs → runClaudeDeps-B81cOKnH.cjs} +295 -157
- package/dist/{runClaudeDeps-Dz2iydq4.mjs → runClaudeDeps-QGrOeDe2.mjs} +295 -160
- package/dist/{runGemini-DBXxpoY8.mjs → runGemini-BEdWEZLR.mjs} +61 -55
- package/dist/{runGemini-BtZqGFkp.cjs → runGemini-CgRLYbt5.cjs} +61 -55
- package/dist/{runOpenClaw-D8q8G57u.cjs → runOpenClaw-C1NVmzOL.cjs} +19 -19
- package/dist/{runOpenClaw-BOHpzCEU.mjs → runOpenClaw-DdQZAYj1.mjs} +19 -19
- package/dist/{sandbox-C452Vrsc.mjs → sandbox-DjQUdCMG.mjs} +5 -5
- package/dist/{sandbox-Cu9mMzjx.cjs → sandbox-nocIjliq.cjs} +5 -5
- package/dist/selfCheck-CjCF4C3v.mjs +85 -0
- package/dist/{selfCheck-gKa3uVr1.cjs → selfCheck-DCt4Uzbq.cjs} +36 -35
- package/dist/{send-B8HARi7x.mjs → send-Ct7X4pPU.mjs} +9 -9
- package/dist/{send-2Vb5eppI.cjs → send-Dydf_hwZ.cjs} +9 -9
- package/dist/{server-Db9Wuam3.cjs → server-CosABFbd.cjs} +7 -7
- package/dist/{server-BBWCIZyS.mjs → server-DTQGZMxh.mjs} +5 -5
- package/dist/{sessionLock-6qL_N6Rn.cjs → sessionLock-DokGab2R.cjs} +16 -3
- package/dist/{sessionLock-ZfvFVdUi.mjs → sessionLock-WYIyaVO4.mjs} +16 -4
- package/dist/{sessionOps-CdgbEJgf.mjs → sessionOps-BIGgRube.mjs} +11 -6
- package/dist/{sessionOps-Dmt7WUUs.cjs → sessionOps-S-qPBLFf.cjs} +11 -6
- package/dist/{sessionScanner-CQL_WSaC.cjs → sessionScanner-CIMM2hvZ.cjs} +3 -3
- package/dist/{sessionScanner-CNVaSNOn.mjs → sessionScanner-o5hnMi5e.mjs} +3 -3
- package/dist/{sessions-DTomHfFg.mjs → sessions-BJHEZpi2.mjs} +40 -18
- package/dist/{sessions-BJblG_Hx.cjs → sessions-JchI1w3z.cjs} +40 -17
- package/dist/{setupOfflineReconnection-DVA0VpQL.cjs → setupOfflineReconnection-CNiAt5ZP.cjs} +2 -2
- package/dist/{setupOfflineReconnection-C5trsV-j.mjs → setupOfflineReconnection-DMiBO2y9.mjs} +2 -2
- package/dist/{spawn-DRyNAqD8.cjs → spawn-6PD7nnoC.cjs} +49 -18
- package/dist/{spawn-CQJFgoOq.mjs → spawn-DgvUNYEo.mjs} +49 -18
- package/dist/{spawnAgents-CCjJifAW.cjs → spawnAgents-DsXgegHM.cjs} +37 -1
- package/dist/spawnAgents-P006Hqio.mjs +79 -0
- package/dist/{spawnHappyCLI-B_0RWxD4.mjs → spawnHappyCLI-CCOrEtf9.mjs} +1 -1
- package/dist/{spawnHappyCLI-ChniczJ5.cjs → spawnHappyCLI-Dywezwk6.cjs} +1 -1
- package/dist/{specialCommands-DkdFJi4N.mjs → specialCommands-DPcd9edP.mjs} +3 -3
- package/dist/{specialCommands-DbntVs0d.cjs → specialCommands-QxPpkGKf.cjs} +3 -3
- package/dist/{startFileWatcher-UQyTSRAP.mjs → startFileWatcher-DghDOCO4.mjs} +1 -1
- package/dist/{startFileWatcher-C292fhra.cjs → startFileWatcher-RECH5qY8.cjs} +1 -1
- package/dist/{streamRelay-_qCd873P.mjs → streamRelay-DMV_TXfS.mjs} +1 -1
- package/dist/{streamRelay-Cx01enfe.cjs → streamRelay-DlUWKUpo.cjs} +1 -1
- package/dist/{sync-C3p7-KLn.mjs → sync-CSe0Rf45.mjs} +1 -1
- package/dist/{sync-C7sxoUYG.cjs → sync-D23jbqVa.cjs} +1 -1
- package/dist/{systemPrompt-DtibzbRU.cjs → systemPrompt-BOy4kU4P.cjs} +4 -3
- package/dist/{systemPrompt-CdHOlyVW.mjs → systemPrompt-CFNKnh65.mjs} +4 -3
- package/dist/{teams-ujXr3AFn.mjs → teams-DyY669f0.mjs} +9 -9
- package/dist/{teams-D7O7TpVU.cjs → teams-Ov2BDT-A.cjs} +9 -9
- package/dist/{time-yEL6wHUF.mjs → time-65DcU6Jx.mjs} +1 -1
- package/dist/{time-Dg5tVB8S.cjs → time-CrwIMHta.cjs} +1 -1
- package/dist/{titleGenerator-BMEaDTwU.cjs → titleGenerator-CS_rh2_J.cjs} +9 -8
- package/dist/{titleGenerator-Dr-BtjzO.mjs → titleGenerator-CiAMxf7s.mjs} +9 -8
- package/dist/{todo-CvJe4M2C.mjs → todo-BDONw0sK.mjs} +7 -7
- package/dist/{todo-CUcFamGs.cjs → todo-KY-okGii.cjs} +7 -7
- package/dist/{tools-BrM3bZW5.mjs → tools-D8-PnZEG.mjs} +1 -1
- package/dist/{tools-DDKTB5aQ.cjs → tools-_w52DZG6.cjs} +1 -1
- package/dist/{uninstall-7oLuhYIu.cjs → uninstall-8vnLN-IE.cjs} +3 -3
- package/dist/{uninstall-CEcMMQGz.mjs → uninstall-_fjGRP9b.mjs} +3 -3
- package/dist/webPanels-B2_C2-3g.mjs +49 -0
- package/dist/webPanels-FCgFKvVe.cjs +53 -0
- package/package.json +7 -7
- package/dist/selfCheck-BAvqBwBR.mjs +0 -84
- package/dist/sessionModeFile-CWVq8AT9.mjs +0 -32
- package/dist/sessionModeFile-CsLtn_PL.cjs +0 -36
- package/dist/spawnAgents-BjtmjBvP.mjs +0 -45
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
|
-
var sessionOps = require('./sessionOps-
|
|
4
|
+
var sessionOps = require('./sessionOps-S-qPBLFf.cjs');
|
|
5
5
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
6
|
-
var peerTools = require('./peerTools-
|
|
7
|
-
var persistence = require('./persistence-
|
|
6
|
+
var peerTools = require('./peerTools-DRQETXaz.cjs');
|
|
7
|
+
var persistence = require('./persistence-BegE7NPa.cjs');
|
|
8
8
|
var path = require('node:path');
|
|
9
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
9
|
+
var remoteSessionClient = require('./remoteSessionClient-B7i7MkYV.cjs');
|
|
10
10
|
require('axios');
|
|
11
|
-
require('./configuration-
|
|
11
|
+
require('./configuration-CMHZnp6G.cjs');
|
|
12
12
|
require('node:fs');
|
|
13
13
|
require('node:os');
|
|
14
|
-
require('./package-
|
|
14
|
+
require('./package-SgqTYsjn.cjs');
|
|
15
15
|
require('node:fs/promises');
|
|
16
|
-
require('./authRelay-
|
|
16
|
+
require('./authRelay-Dy1qU9td.cjs');
|
|
17
17
|
require('node:crypto');
|
|
18
18
|
require('tweetnacl');
|
|
19
|
-
require('./controlClient-
|
|
20
|
-
require('./logger-
|
|
19
|
+
require('./controlClient-C-5qCt8W.cjs');
|
|
20
|
+
require('./logger-C1GWx3gi.cjs');
|
|
21
21
|
require('node:util');
|
|
22
|
-
require('./time-
|
|
22
|
+
require('./time-CrwIMHta.cjs');
|
|
23
23
|
require('socket.io-client');
|
|
24
24
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
25
25
|
require('zod');
|
|
26
|
+
require('./client-ZjOsn6nZ.cjs');
|
|
26
27
|
|
|
27
28
|
const MACHINE_ID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
28
29
|
const ACTIONS = ["list", "read", "stop", "archive", "approve", "deny", "peers", "message"];
|
|
@@ -67,7 +68,7 @@ function parseSessionsArgs(args) {
|
|
|
67
68
|
} else if (arg === "--scope") {
|
|
68
69
|
const value = args[++i];
|
|
69
70
|
if (value === void 0) throw new Error("--scope requires a value");
|
|
70
|
-
if (!peerTools.PEER_SCOPES.includes(value)) throw new Error(`--scope must be one of ${peerTools.PEER_SCOPES.join(", ")}`);
|
|
71
|
+
if (value !== "project" && !peerTools.PEER_SCOPES.includes(value)) throw new Error(`--scope must be one of ${[...peerTools.PEER_SCOPES, "project"].join(", ")}`);
|
|
71
72
|
options.scope = value;
|
|
72
73
|
} else if (arg === "--cwd") {
|
|
73
74
|
const value = args[++i];
|
|
@@ -164,7 +165,7 @@ ${chalk.bold("Usage:")}
|
|
|
164
165
|
very-happy sessions archive <id> [--json]
|
|
165
166
|
very-happy sessions approve <id> <requestId> [--for-session] [--json]
|
|
166
167
|
very-happy sessions deny <id> <requestId> [--reason <text>] [--json]
|
|
167
|
-
very-happy sessions peers [--scope repo|cwd|machine] [--cwd <dir>] [--machine <id>] [--json]
|
|
168
|
+
very-happy sessions peers [--scope repo|cwd|machine|project] [--cwd <dir>] [--machine <id>] [--json]
|
|
168
169
|
very-happy sessions message <id> <text> [--reply-to <msgId>] [--machine <id>] [--json]
|
|
169
170
|
|
|
170
171
|
${chalk.bold("Actions:")}
|
|
@@ -202,7 +203,10 @@ ${chalk.bold("Actions:")}
|
|
|
202
203
|
managed session's shell, else this CLI) and tells the peer how to
|
|
203
204
|
reply. A session another machine spawned is delivered through
|
|
204
205
|
that machine's daemon, with this host named in the header.
|
|
205
|
-
Refused for sessions that are not running, or terminal mirrors
|
|
206
|
+
Refused for sessions that are not running, or terminal mirrors \u2014
|
|
207
|
+
except a session in the same project as the sender: there the
|
|
208
|
+
message is kept server-side and read on its next turn
|
|
209
|
+
(\`status: offline-stored\`, exit 0).
|
|
206
210
|
\`delivered\` follows \`very-happy send\`: true only when a
|
|
207
211
|
wrapper was attached before and after the POST (\`stored\` = it
|
|
208
212
|
is on the server anyway).
|
|
@@ -227,7 +231,9 @@ ${chalk.bold("Options:")}
|
|
|
227
231
|
--timeout <s> read --wait only: give up after <s> seconds (default 600).
|
|
228
232
|
--for-session approve only: approved_for_session instead of approved.
|
|
229
233
|
--reason <text> deny only: reason forwarded to the wrapper.
|
|
230
|
-
--scope <s> peers only: repo (default) | cwd | machine
|
|
234
|
+
--scope <s> peers only: repo (default) | cwd | machine | project
|
|
235
|
+
(project = the other sessions of the calling session's
|
|
236
|
+
Very Happy project on any machine).
|
|
231
237
|
--cwd <dir> peers only: directory the scope is computed from
|
|
232
238
|
(default: the process cwd, or HAPPY_SESSION_ID's cwd).
|
|
233
239
|
--reply-to <id> message only: the peer message id being answered.
|
|
@@ -251,7 +257,8 @@ ${chalk.bold("Exit codes:")}
|
|
|
251
257
|
2 read --wait: the turn had not ended when --timeout ran out (the
|
|
252
258
|
partial state is still printed)
|
|
253
259
|
0 success (approve/deny: the wrapper acknowledged the verdict; check
|
|
254
|
-
\`settled\` in --json to see whether the request has left the pending set
|
|
260
|
+
\`settled\` in --json to see whether the request has left the pending set;
|
|
261
|
+
message: delivered, or kept for a same-project session's next turn)
|
|
255
262
|
1 bad arguments, unknown session, no machine of the account holds it (or
|
|
256
263
|
its machine is offline / too old), request not pending, session not
|
|
257
264
|
online, or the operation failed (including \`stop\` on a session the
|
|
@@ -284,6 +291,9 @@ function formatAccountSummaryLine(summary) {
|
|
|
284
291
|
parts.push(summary.url);
|
|
285
292
|
return parts.join(" ");
|
|
286
293
|
}
|
|
294
|
+
function peerMessageExitCode(result) {
|
|
295
|
+
return result.delivered || result.status === "offline-stored" ? 0 : 1;
|
|
296
|
+
}
|
|
287
297
|
function permissionFailureRecord(sessionId, requestId, error) {
|
|
288
298
|
return { sessionId, requestId, error: error instanceof Error ? error.message : String(error) };
|
|
289
299
|
}
|
|
@@ -375,8 +385,18 @@ async function handleSessionsCommand(args) {
|
|
|
375
385
|
const cwd = options.cwd ? path.resolve(options.cwd) : process.cwd();
|
|
376
386
|
const persisted = persistence.readPersistedSessions();
|
|
377
387
|
const context = { self: () => peerTools.cliPeerSelf(process.env, cwd, persisted), readPersisted: () => persisted };
|
|
388
|
+
if (options.action === "peers" && options.scope === "project") {
|
|
389
|
+
const self = peerTools.cliPeerSelf(process.env, cwd, persisted);
|
|
390
|
+
const listing = await peerTools.executeSessionPeerTool("session_peers", { scope: "project" }, context);
|
|
391
|
+
if (options.json) console.log(JSON.stringify(listing));
|
|
392
|
+
else if (!listing.project) console.log(`Not in a project (${self.sessionId}).`);
|
|
393
|
+
else if (listing.peers.length === 0) console.log(`No other sessions in project "${listing.project.name}".`);
|
|
394
|
+
else for (const peer of listing.peers) console.log([peer.sessionId, `[${peer.state ?? "?"}]`, peer.title ? `title="${peer.title}"` : "", peer.agent ? `agent=${peer.agent}` : "", peer.machine ? `machine=${peer.machine}` : "", peer.doing ? `doing="${peer.doing}"` : "", peer.url].filter(Boolean).join(" "));
|
|
395
|
+
process.exit(0);
|
|
396
|
+
}
|
|
378
397
|
if (options.action === "peers") {
|
|
379
|
-
const
|
|
398
|
+
const scope = options.scope === "project" ? void 0 : options.scope;
|
|
399
|
+
const listing = options.machine ? await remoteSessionClient.listRemotePeers(options.machine, { ...scope ? { scope } : {}, ...options.cwd ? { cwd: options.cwd } : {} }) : await peerTools.listPeerSessions(context, scope ?? "repo");
|
|
380
400
|
if (options.json) {
|
|
381
401
|
console.log(JSON.stringify(listing));
|
|
382
402
|
} else if (listing.peers.length === 0) {
|
|
@@ -400,9 +420,11 @@ async function handleSessionsCommand(args) {
|
|
|
400
420
|
const result = await peerTools.sendPeerMessage(context, { to: target, body: options.text, replyTo: options.replyTo, ...options.machine ? { machineId: options.machine } : {} });
|
|
401
421
|
if (options.json) console.log(JSON.stringify(result));
|
|
402
422
|
else if (result.delivered) console.log(`Message ${result.messageId} delivered to ${target}${result.machine ? ` on ${result.machine.host}` : ""}
|
|
423
|
+
${result.url}`);
|
|
424
|
+
else if (result.status === "offline-stored") console.log(`Message ${result.messageId} ${result.note ?? "stored"} (${target} is not running; same project)
|
|
403
425
|
${result.url}`);
|
|
404
426
|
else console.error(chalk.yellow("Not delivered:"), result.error ?? `session is ${result.status}`, result.stored ? "(stored server-side, unread)" : "");
|
|
405
|
-
process.exit(result
|
|
427
|
+
process.exit(peerMessageExitCode(result));
|
|
406
428
|
} catch (error) {
|
|
407
429
|
if (options.json) console.log(JSON.stringify({ delivered: false, to: target, error: error instanceof Error ? error.message : String(error) }));
|
|
408
430
|
throw error;
|
|
@@ -509,4 +531,5 @@ ${result.url}`);
|
|
|
509
531
|
exports.SESSIONS_HELP = SESSIONS_HELP;
|
|
510
532
|
exports.handleSessionsCommand = handleSessionsCommand;
|
|
511
533
|
exports.parseSessionsArgs = parseSessionsArgs;
|
|
534
|
+
exports.peerMessageExitCode = peerMessageExitCode;
|
|
512
535
|
exports.permissionFailureRecord = permissionFailureRecord;
|
package/dist/{setupOfflineReconnection-DVA0VpQL.cjs → setupOfflineReconnection-CNiAt5ZP.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configuration = require('./configuration-
|
|
4
|
-
var api = require('./api-
|
|
3
|
+
var configuration = require('./configuration-CMHZnp6G.cjs');
|
|
4
|
+
var api = require('./api-Cmjfr8Z7.cjs');
|
|
5
5
|
|
|
6
6
|
function createOfflineSessionStub(sessionTag) {
|
|
7
7
|
return {
|
package/dist/{setupOfflineReconnection-C5trsV-j.mjs → setupOfflineReconnection-DMiBO2y9.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as configuration } from './configuration-
|
|
2
|
-
import { s as startOfflineReconnection } from './api-
|
|
1
|
+
import { c as configuration } from './configuration-WMi4idBB.mjs';
|
|
2
|
+
import { s as startOfflineReconnection } from './api-CzwFpJQc.mjs';
|
|
3
3
|
|
|
4
4
|
function createOfflineSessionStub(sessionTag) {
|
|
5
5
|
return {
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var spawnAgents = require('./spawnAgents-DsXgegHM.cjs');
|
|
4
|
+
var client = require('./client-ZjOsn6nZ.cjs');
|
|
3
5
|
var chalk = require('chalk');
|
|
4
6
|
var node_fs = require('node:fs');
|
|
5
7
|
var path$1 = require('node:path');
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
7
|
-
var persistence = require('./persistence-
|
|
8
|
-
var spawnAgents = require('./spawnAgents-CCjJifAW.cjs');
|
|
8
|
+
var controlClient = require('./controlClient-C-5qCt8W.cjs');
|
|
9
|
+
var persistence = require('./persistence-BegE7NPa.cjs');
|
|
9
10
|
var path = require('./path-B7zW-WwE.cjs');
|
|
10
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
11
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
11
|
+
var claudeSessionFork = require('./claudeSessionFork-DiSMYerV.cjs');
|
|
12
|
+
var codexAppServerClient = require('./codexAppServerClient-Dt5zxrun.cjs');
|
|
12
13
|
var codexThreadFork = require('./codexThreadFork-DNekT4nQ.cjs');
|
|
13
|
-
var sessionOps = require('./sessionOps-
|
|
14
|
-
var createSessionMetadata = require('./createSessionMetadata-
|
|
15
|
-
var logger = require('./logger-
|
|
14
|
+
var sessionOps = require('./sessionOps-S-qPBLFf.cjs');
|
|
15
|
+
var createSessionMetadata = require('./createSessionMetadata-BkIzHALd.cjs');
|
|
16
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
16
17
|
var forkBackfill = require('./forkBackfill-8eLDeS73.cjs');
|
|
17
|
-
require('./
|
|
18
|
+
require('./index-C6O2vVjm.cjs');
|
|
19
|
+
require('zod');
|
|
20
|
+
require('@paralleldrive/cuid2');
|
|
21
|
+
require('./configuration-CMHZnp6G.cjs');
|
|
18
22
|
require('node:os');
|
|
19
|
-
require('./package-
|
|
23
|
+
require('./package-SgqTYsjn.cjs');
|
|
20
24
|
require('node:fs/promises');
|
|
21
|
-
require('
|
|
22
|
-
require('./authRelay-BdYkC1Po.cjs');
|
|
25
|
+
require('./authRelay-Dy1qU9td.cjs');
|
|
23
26
|
require('node:crypto');
|
|
24
27
|
require('tweetnacl');
|
|
25
|
-
require('./index-De8L5lFK.cjs');
|
|
26
|
-
require('@paralleldrive/cuid2');
|
|
27
28
|
require('node:readline');
|
|
28
29
|
require('node:child_process');
|
|
29
30
|
require('cross-spawn');
|
|
30
31
|
require('./contentLogMetadata-ZSFk_NjQ.cjs');
|
|
31
32
|
require('./manager-HrEj442o.cjs');
|
|
32
33
|
require('@anthropic-ai/sandbox-runtime');
|
|
33
|
-
require('./rateLimitWindows-
|
|
34
|
+
require('./rateLimitWindows-Dj_8voBK.cjs');
|
|
34
35
|
require('./processTree-CMHWlVse.cjs');
|
|
35
36
|
require('axios');
|
|
36
|
-
require('./time-
|
|
37
|
+
require('./time-CrwIMHta.cjs');
|
|
37
38
|
require('socket.io-client');
|
|
38
39
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
39
40
|
require('./projectPath-ChLhdOyt.cjs');
|
|
@@ -142,6 +143,13 @@ function parseSpawnArgs(args) {
|
|
|
142
143
|
if (value === void 0) throw new Error("--fork requires a session id");
|
|
143
144
|
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(value)) throw new Error(`Invalid session id for --fork: ${value}`);
|
|
144
145
|
options.fork = value;
|
|
146
|
+
} else if (arg === "--project") {
|
|
147
|
+
const value = args[++i];
|
|
148
|
+
if (value === void 0) throw new Error("--project requires a project id");
|
|
149
|
+
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(value)) throw new Error(`Invalid project id for --project: ${value}`);
|
|
150
|
+
options.project = value;
|
|
151
|
+
} else if (arg === "--no-project") {
|
|
152
|
+
options.noProject = true;
|
|
145
153
|
} else if (arg === "--json") {
|
|
146
154
|
options.json = true;
|
|
147
155
|
} else if (arg === "--help" || arg === "-h") {
|
|
@@ -153,6 +161,9 @@ function parseSpawnArgs(args) {
|
|
|
153
161
|
if (options.prompt !== void 0 && options.promptFile !== void 0) {
|
|
154
162
|
throw new Error("--prompt and --prompt-file are mutually exclusive");
|
|
155
163
|
}
|
|
164
|
+
if (options.project !== void 0 && options.noProject) {
|
|
165
|
+
throw new Error("--project and --no-project are mutually exclusive");
|
|
166
|
+
}
|
|
156
167
|
return options;
|
|
157
168
|
}
|
|
158
169
|
function printHelp() {
|
|
@@ -162,9 +173,11 @@ ${chalk.bold("very-happy spawn")} - Spawn a remote session via the local daemon
|
|
|
162
173
|
${chalk.bold("Usage:")}
|
|
163
174
|
very-happy spawn --dir <path> [--prompt <text> | --prompt-file <file>]
|
|
164
175
|
[--spawned-by <name>] [--permission-mode <mode>]
|
|
165
|
-
[--agent <name>] [--model <id>] [--env KEY=VALUE]...
|
|
176
|
+
[--agent <name>] [--model <id>] [--env KEY=VALUE]...
|
|
177
|
+
[--project <id> | --no-project] [--json]
|
|
166
178
|
very-happy spawn --fork <sessionId> [--prompt \u2026] [--permission-mode <mode>]
|
|
167
|
-
[--model <id>] [--spawned-by <name>] [--
|
|
179
|
+
[--model <id>] [--spawned-by <name>] [--project <id>]
|
|
180
|
+
[--json]
|
|
168
181
|
|
|
169
182
|
${chalk.bold("Options:")}
|
|
170
183
|
--dir, -d <path> Working directory for the new session (required)
|
|
@@ -194,6 +207,12 @@ ${chalk.bold("Options:")}
|
|
|
194
207
|
--env KEY=VALUE Extra environment for the session process. Repeatable.
|
|
195
208
|
\${VAR} is expanded against the daemon's environment;
|
|
196
209
|
an unresolved reference fails the spawn.
|
|
210
|
+
--project <id> Put the new session in this Very Happy project before
|
|
211
|
+
its first message (it then starts with the project's
|
|
212
|
+
instructions and decisions).
|
|
213
|
+
--no-project Do not inherit the project of the session that runs
|
|
214
|
+
this command (by default a session spawned from
|
|
215
|
+
inside a project session joins the same project).
|
|
197
216
|
--json Machine-readable output: {"sessionId", "url",
|
|
198
217
|
"permissionMode", \u2026}
|
|
199
218
|
-h, --help Show this help
|
|
@@ -339,6 +358,15 @@ async function handleSpawnCommand(args) {
|
|
|
339
358
|
console.error(chalk.red("Error:"), "The running daemon is too old to fork from the CLI (it spawned a fresh session, now stopped). Restart the daemon on this CLI version and retry.");
|
|
340
359
|
process.exit(1);
|
|
341
360
|
}
|
|
361
|
+
const projectChoice = spawnAgents.chooseProject({
|
|
362
|
+
project: options.project,
|
|
363
|
+
noProject: options.noProject,
|
|
364
|
+
parentSessionId: forkSource ? null : process.env.VH_PEER_SESSION_ID ?? null
|
|
365
|
+
});
|
|
366
|
+
const projectOutcome = await spawnAgents.joinProject(client.sharedProjectsClient(), sessionId, projectChoice);
|
|
367
|
+
if (options.project && !projectOutcome.joined) {
|
|
368
|
+
console.error(chalk.yellow("Warning:"), `Could not add the session to project ${options.project}: ${projectOutcome.reason}`);
|
|
369
|
+
}
|
|
342
370
|
let promptError = null;
|
|
343
371
|
let sentMeta = null;
|
|
344
372
|
if (prompt !== void 0) {
|
|
@@ -364,6 +392,9 @@ async function handleSpawnCommand(args) {
|
|
|
364
392
|
if (forkSource) {
|
|
365
393
|
payload.forkedFrom = forkSource.parentSessionId;
|
|
366
394
|
}
|
|
395
|
+
if (projectOutcome.joined) {
|
|
396
|
+
payload.project = { id: projectOutcome.projectId, via: projectOutcome.via };
|
|
397
|
+
}
|
|
367
398
|
if (sentMeta && sentMeta.model !== void 0) {
|
|
368
399
|
payload.model = sentMeta.model;
|
|
369
400
|
}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
+
import { r as resolveSpawnPermissionMode, c as chooseProject, j as joinProject, a as resolveFirstMessageMeta, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-P006Hqio.mjs';
|
|
2
|
+
import { s as sharedProjectsClient } from './client-BhoEBnuN.mjs';
|
|
1
3
|
import chalk from 'chalk';
|
|
2
4
|
import { readFileSync, statSync } from 'node:fs';
|
|
3
5
|
import { resolve } from 'node:path';
|
|
4
|
-
import { a as checkIfDaemonRunningAndCleanupStaleState, f as spawnDaemonSession, s as stopDaemonSession } from './controlClient-
|
|
5
|
-
import {
|
|
6
|
-
import { r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, s as sanitizeSpawnPermissionMode, A as ALLOWED_SPAWN_PERMISSION_MODES, S as SPAWN_AGENTS } from './spawnAgents-BjtmjBvP.mjs';
|
|
6
|
+
import { a as checkIfDaemonRunningAndCleanupStaleState, f as spawnDaemonSession, s as stopDaemonSession } from './controlClient-BWUJrj3t.mjs';
|
|
7
|
+
import { c as readPersistedSessions } from './persistence-Cr-wutZ4.mjs';
|
|
7
8
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
8
|
-
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-
|
|
9
|
-
import { C as CodexAppServerClient } from './codexAppServerClient-
|
|
9
|
+
import { f as forkSession, F as ForkSourceMissingError } from './claudeSessionFork-BihfD0Ik.mjs';
|
|
10
|
+
import { C as CodexAppServerClient } from './codexAppServerClient-BK3zra_1.mjs';
|
|
10
11
|
import { f as forkCodexThread } from './codexThreadFork-R76RU5H0.mjs';
|
|
11
|
-
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps-
|
|
12
|
-
import { i as isValidSpawnOrigin } from './createSessionMetadata-
|
|
13
|
-
import { l as logger } from './logger-
|
|
12
|
+
import { e as sendUserMessage, f as readSessionMetadata, g as waitForSessionKey, s as sessionWebUrl } from './sessionOps-BIGgRube.mjs';
|
|
13
|
+
import { i as isValidSpawnOrigin } from './createSessionMetadata-3uXrJgOW.mjs';
|
|
14
|
+
import { l as logger } from './logger-BtVhHnD8.mjs';
|
|
14
15
|
import { w as waitForForkBackfill } from './forkBackfill-DYIjlN1Z.mjs';
|
|
15
|
-
import './
|
|
16
|
+
import './index-DPOa4NhL.mjs';
|
|
17
|
+
import 'zod';
|
|
18
|
+
import '@paralleldrive/cuid2';
|
|
19
|
+
import './configuration-WMi4idBB.mjs';
|
|
16
20
|
import 'node:os';
|
|
17
|
-
import './package-
|
|
21
|
+
import './package-BPPebGQF.mjs';
|
|
18
22
|
import 'node:fs/promises';
|
|
19
|
-
import '
|
|
20
|
-
import './authRelay-DSAvg1uv.mjs';
|
|
23
|
+
import './authRelay-DhQhkBvX.mjs';
|
|
21
24
|
import 'node:crypto';
|
|
22
25
|
import 'tweetnacl';
|
|
23
|
-
import './index-DMy3OCBe.mjs';
|
|
24
|
-
import '@paralleldrive/cuid2';
|
|
25
26
|
import 'node:readline';
|
|
26
27
|
import 'node:child_process';
|
|
27
28
|
import 'cross-spawn';
|
|
28
29
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
29
30
|
import './manager-BEsI4qt3.mjs';
|
|
30
31
|
import '@anthropic-ai/sandbox-runtime';
|
|
31
|
-
import './rateLimitWindows-
|
|
32
|
+
import './rateLimitWindows-CuEqk_0g.mjs';
|
|
32
33
|
import './processTree-CP5IvQ2Z.mjs';
|
|
33
34
|
import 'axios';
|
|
34
|
-
import './time-
|
|
35
|
+
import './time-65DcU6Jx.mjs';
|
|
35
36
|
import 'socket.io-client';
|
|
36
37
|
import './backgroundTaskActivity-BVwJBl02.mjs';
|
|
37
38
|
import './projectPath-BTBIMB57.mjs';
|
|
@@ -140,6 +141,13 @@ function parseSpawnArgs(args) {
|
|
|
140
141
|
if (value === void 0) throw new Error("--fork requires a session id");
|
|
141
142
|
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(value)) throw new Error(`Invalid session id for --fork: ${value}`);
|
|
142
143
|
options.fork = value;
|
|
144
|
+
} else if (arg === "--project") {
|
|
145
|
+
const value = args[++i];
|
|
146
|
+
if (value === void 0) throw new Error("--project requires a project id");
|
|
147
|
+
if (!/^[a-zA-Z0-9_-]{1,128}$/.test(value)) throw new Error(`Invalid project id for --project: ${value}`);
|
|
148
|
+
options.project = value;
|
|
149
|
+
} else if (arg === "--no-project") {
|
|
150
|
+
options.noProject = true;
|
|
143
151
|
} else if (arg === "--json") {
|
|
144
152
|
options.json = true;
|
|
145
153
|
} else if (arg === "--help" || arg === "-h") {
|
|
@@ -151,6 +159,9 @@ function parseSpawnArgs(args) {
|
|
|
151
159
|
if (options.prompt !== void 0 && options.promptFile !== void 0) {
|
|
152
160
|
throw new Error("--prompt and --prompt-file are mutually exclusive");
|
|
153
161
|
}
|
|
162
|
+
if (options.project !== void 0 && options.noProject) {
|
|
163
|
+
throw new Error("--project and --no-project are mutually exclusive");
|
|
164
|
+
}
|
|
154
165
|
return options;
|
|
155
166
|
}
|
|
156
167
|
function printHelp() {
|
|
@@ -160,9 +171,11 @@ ${chalk.bold("very-happy spawn")} - Spawn a remote session via the local daemon
|
|
|
160
171
|
${chalk.bold("Usage:")}
|
|
161
172
|
very-happy spawn --dir <path> [--prompt <text> | --prompt-file <file>]
|
|
162
173
|
[--spawned-by <name>] [--permission-mode <mode>]
|
|
163
|
-
[--agent <name>] [--model <id>] [--env KEY=VALUE]...
|
|
174
|
+
[--agent <name>] [--model <id>] [--env KEY=VALUE]...
|
|
175
|
+
[--project <id> | --no-project] [--json]
|
|
164
176
|
very-happy spawn --fork <sessionId> [--prompt \u2026] [--permission-mode <mode>]
|
|
165
|
-
[--model <id>] [--spawned-by <name>] [--
|
|
177
|
+
[--model <id>] [--spawned-by <name>] [--project <id>]
|
|
178
|
+
[--json]
|
|
166
179
|
|
|
167
180
|
${chalk.bold("Options:")}
|
|
168
181
|
--dir, -d <path> Working directory for the new session (required)
|
|
@@ -192,6 +205,12 @@ ${chalk.bold("Options:")}
|
|
|
192
205
|
--env KEY=VALUE Extra environment for the session process. Repeatable.
|
|
193
206
|
\${VAR} is expanded against the daemon's environment;
|
|
194
207
|
an unresolved reference fails the spawn.
|
|
208
|
+
--project <id> Put the new session in this Very Happy project before
|
|
209
|
+
its first message (it then starts with the project's
|
|
210
|
+
instructions and decisions).
|
|
211
|
+
--no-project Do not inherit the project of the session that runs
|
|
212
|
+
this command (by default a session spawned from
|
|
213
|
+
inside a project session joins the same project).
|
|
195
214
|
--json Machine-readable output: {"sessionId", "url",
|
|
196
215
|
"permissionMode", \u2026}
|
|
197
216
|
-h, --help Show this help
|
|
@@ -337,6 +356,15 @@ async function handleSpawnCommand(args) {
|
|
|
337
356
|
console.error(chalk.red("Error:"), "The running daemon is too old to fork from the CLI (it spawned a fresh session, now stopped). Restart the daemon on this CLI version and retry.");
|
|
338
357
|
process.exit(1);
|
|
339
358
|
}
|
|
359
|
+
const projectChoice = chooseProject({
|
|
360
|
+
project: options.project,
|
|
361
|
+
noProject: options.noProject,
|
|
362
|
+
parentSessionId: forkSource ? null : process.env.VH_PEER_SESSION_ID ?? null
|
|
363
|
+
});
|
|
364
|
+
const projectOutcome = await joinProject(sharedProjectsClient(), sessionId, projectChoice);
|
|
365
|
+
if (options.project && !projectOutcome.joined) {
|
|
366
|
+
console.error(chalk.yellow("Warning:"), `Could not add the session to project ${options.project}: ${projectOutcome.reason}`);
|
|
367
|
+
}
|
|
340
368
|
let promptError = null;
|
|
341
369
|
let sentMeta = null;
|
|
342
370
|
if (prompt !== void 0) {
|
|
@@ -362,6 +390,9 @@ async function handleSpawnCommand(args) {
|
|
|
362
390
|
if (forkSource) {
|
|
363
391
|
payload.forkedFrom = forkSource.parentSessionId;
|
|
364
392
|
}
|
|
393
|
+
if (projectOutcome.joined) {
|
|
394
|
+
payload.project = { id: projectOutcome.projectId, via: projectOutcome.via };
|
|
395
|
+
}
|
|
365
396
|
if (sentMeta && sentMeta.model !== void 0) {
|
|
366
397
|
payload.model = sentMeta.model;
|
|
367
398
|
}
|
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C6O2vVjm.cjs');
|
|
4
|
+
|
|
5
|
+
function chooseProject(opts) {
|
|
6
|
+
if (opts.project) return { kind: "explicit", projectId: opts.project };
|
|
7
|
+
if (opts.noProject) return { kind: "none" };
|
|
8
|
+
if (opts.parentSessionId) return { kind: "lineage", parentSessionId: opts.parentSessionId };
|
|
9
|
+
return { kind: "none" };
|
|
10
|
+
}
|
|
11
|
+
async function joinProject(client, sessionId, choice, opts = {}) {
|
|
12
|
+
if (choice.kind === "none") return { joined: false, reason: "no project" };
|
|
13
|
+
const timeoutMs = opts.timeoutMs ?? 3e3;
|
|
14
|
+
const work = async () => {
|
|
15
|
+
let projectId;
|
|
16
|
+
let via;
|
|
17
|
+
if (choice.kind === "explicit") {
|
|
18
|
+
projectId = choice.projectId;
|
|
19
|
+
via = opts.via ?? "explicit";
|
|
20
|
+
} else {
|
|
21
|
+
const parent = await client.membership(choice.parentSessionId);
|
|
22
|
+
if (!parent.projectId) return { joined: false, reason: "parent has no project" };
|
|
23
|
+
projectId = parent.projectId;
|
|
24
|
+
via = "lineage";
|
|
25
|
+
}
|
|
26
|
+
await client.addMembers(projectId, [sessionId], via);
|
|
27
|
+
return { joined: true, projectId, via };
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
return await Promise.race([
|
|
31
|
+
work(),
|
|
32
|
+
new Promise((resolve) => setTimeout(() => resolve({ joined: false, reason: "timeout" }), timeoutMs).unref?.())
|
|
33
|
+
]);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return { joined: false, reason: error instanceof Error ? error.message : String(error) };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
4
38
|
|
|
5
39
|
function resolveSpawnPermissionMode(agent, explicit) {
|
|
6
40
|
return explicit ?? index.getAgentCodeDefaults(agent ?? "claude").permissionMode;
|
|
@@ -46,7 +80,9 @@ function isSpawnAgent(value) {
|
|
|
46
80
|
|
|
47
81
|
exports.ALLOWED_SPAWN_PERMISSION_MODES = ALLOWED_SPAWN_PERMISSION_MODES;
|
|
48
82
|
exports.SPAWN_AGENTS = SPAWN_AGENTS;
|
|
83
|
+
exports.chooseProject = chooseProject;
|
|
49
84
|
exports.isSpawnAgent = isSpawnAgent;
|
|
85
|
+
exports.joinProject = joinProject;
|
|
50
86
|
exports.resolveFirstMessageMeta = resolveFirstMessageMeta;
|
|
51
87
|
exports.resolveSpawnPermissionMode = resolveSpawnPermissionMode;
|
|
52
88
|
exports.sanitizeSpawnPermissionMode = sanitizeSpawnPermissionMode;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { g as getAgentCodeDefaults, n as normalizeAgentKey, h as isClaudeOpus55Model, j as supportsClaudeOpus55 } from './index-DPOa4NhL.mjs';
|
|
2
|
+
|
|
3
|
+
function chooseProject(opts) {
|
|
4
|
+
if (opts.project) return { kind: "explicit", projectId: opts.project };
|
|
5
|
+
if (opts.noProject) return { kind: "none" };
|
|
6
|
+
if (opts.parentSessionId) return { kind: "lineage", parentSessionId: opts.parentSessionId };
|
|
7
|
+
return { kind: "none" };
|
|
8
|
+
}
|
|
9
|
+
async function joinProject(client, sessionId, choice, opts = {}) {
|
|
10
|
+
if (choice.kind === "none") return { joined: false, reason: "no project" };
|
|
11
|
+
const timeoutMs = opts.timeoutMs ?? 3e3;
|
|
12
|
+
const work = async () => {
|
|
13
|
+
let projectId;
|
|
14
|
+
let via;
|
|
15
|
+
if (choice.kind === "explicit") {
|
|
16
|
+
projectId = choice.projectId;
|
|
17
|
+
via = opts.via ?? "explicit";
|
|
18
|
+
} else {
|
|
19
|
+
const parent = await client.membership(choice.parentSessionId);
|
|
20
|
+
if (!parent.projectId) return { joined: false, reason: "parent has no project" };
|
|
21
|
+
projectId = parent.projectId;
|
|
22
|
+
via = "lineage";
|
|
23
|
+
}
|
|
24
|
+
await client.addMembers(projectId, [sessionId], via);
|
|
25
|
+
return { joined: true, projectId, via };
|
|
26
|
+
};
|
|
27
|
+
try {
|
|
28
|
+
return await Promise.race([
|
|
29
|
+
work(),
|
|
30
|
+
new Promise((resolve) => setTimeout(() => resolve({ joined: false, reason: "timeout" }), timeoutMs).unref?.())
|
|
31
|
+
]);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
return { joined: false, reason: error instanceof Error ? error.message : String(error) };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function resolveSpawnPermissionMode(agent, explicit) {
|
|
38
|
+
return explicit ?? getAgentCodeDefaults(agent ?? "claude").permissionMode;
|
|
39
|
+
}
|
|
40
|
+
function outboundPermissionMode(agent, mode) {
|
|
41
|
+
const key = normalizeAgentKey(agent ?? "claude");
|
|
42
|
+
if ((key === "claude" || key === "pi") && mode === "yolo") return "bypassPermissions";
|
|
43
|
+
return mode;
|
|
44
|
+
}
|
|
45
|
+
function resolveFirstMessageMeta(input) {
|
|
46
|
+
const meta = {
|
|
47
|
+
permissionMode: outboundPermissionMode(input.agent, input.permissionMode)
|
|
48
|
+
};
|
|
49
|
+
if (input.explicitModel !== void 0) {
|
|
50
|
+
meta.model = input.explicitModel === "default" ? null : input.explicitModel;
|
|
51
|
+
}
|
|
52
|
+
if (normalizeAgentKey(input.agent ?? "claude") !== "claude") return meta;
|
|
53
|
+
if (meta.model === void 0) {
|
|
54
|
+
const model = getAgentCodeDefaults("claude").modelMode;
|
|
55
|
+
const runnable = !isClaudeOpus55Model(model) || supportsClaudeOpus55({ capabilities: input.capabilities ?? null });
|
|
56
|
+
meta.model = runnable && model !== "default" ? model : null;
|
|
57
|
+
}
|
|
58
|
+
meta.effort = null;
|
|
59
|
+
return meta;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const ALLOWED_SPAWN_PERMISSION_MODES = [
|
|
63
|
+
"default",
|
|
64
|
+
"acceptEdits",
|
|
65
|
+
"plan",
|
|
66
|
+
"yolo",
|
|
67
|
+
"bypassPermissions"
|
|
68
|
+
];
|
|
69
|
+
function sanitizeSpawnPermissionMode(value) {
|
|
70
|
+
if (typeof value !== "string") return null;
|
|
71
|
+
return ALLOWED_SPAWN_PERMISSION_MODES.includes(value) ? value : null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const SPAWN_AGENTS = ["claude", "codex", "gemini", "openclaw", "pi"];
|
|
75
|
+
function isSpawnAgent(value) {
|
|
76
|
+
return typeof value === "string" && SPAWN_AGENTS.includes(value);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { ALLOWED_SPAWN_PERMISSION_MODES as A, SPAWN_AGENTS as S, resolveFirstMessageMeta as a, chooseProject as c, isSpawnAgent as i, joinProject as j, resolveSpawnPermissionMode as r, sanitizeSpawnPermissionMode as s };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'cross-spawn';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
4
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { l as logger } from './logger-BtVhHnD8.mjs';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
|
|
7
7
|
let cachedRuntime = null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var spawn = require('cross-spawn');
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var projectPath = require('./projectPath-ChLhdOyt.cjs');
|
|
6
|
-
var logger = require('./logger-
|
|
6
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
7
7
|
var node_fs = require('node:fs');
|
|
8
8
|
|
|
9
9
|
let cachedRuntime = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as logger } from './logger-
|
|
2
|
-
import { r as reportRateLimitsToDaemon } from './controlClient-
|
|
3
|
-
import { f as fromCodexRateLimits, a as fromClaudeRateLimitInfo, r as rateLimitReportSignature, R as RATE_LIMIT_OBSERVED_REFRESH_MS } from './rateLimitWindows-
|
|
1
|
+
import { l as logger } from './logger-BtVhHnD8.mjs';
|
|
2
|
+
import { r as reportRateLimitsToDaemon } from './controlClient-BWUJrj3t.mjs';
|
|
3
|
+
import { f as fromCodexRateLimits, a as fromClaudeRateLimitInfo, r as rateLimitReportSignature, R as RATE_LIMIT_OBSERVED_REFRESH_MS } from './rateLimitWindows-CuEqk_0g.mjs';
|
|
4
4
|
|
|
5
5
|
function createRateLimitReporter(send, now = Date.now) {
|
|
6
6
|
const last = /* @__PURE__ */ new Map();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var logger = require('./logger-
|
|
4
|
-
var controlClient = require('./controlClient-
|
|
5
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
3
|
+
var logger = require('./logger-C1GWx3gi.cjs');
|
|
4
|
+
var controlClient = require('./controlClient-C-5qCt8W.cjs');
|
|
5
|
+
var rateLimitWindows = require('./rateLimitWindows-Dj_8voBK.cjs');
|
|
6
6
|
|
|
7
7
|
function createRateLimitReporter(send, now = Date.now) {
|
|
8
8
|
const last = /* @__PURE__ */ new Map();
|