very-happy-cli 0.2.196 → 0.2.198
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-RqGkFeeY.mjs → AcpBackend-Bm3EodAb.mjs} +3 -3
- package/dist/{AcpBackend-tL_g_UJ5.cjs → AcpBackend-DOuWeCAx.cjs} +3 -3
- package/dist/{AcpSessionManager-C-R6yHXc.mjs → AcpSessionManager-BiwuXpbx.mjs} +2 -2
- package/dist/{AcpSessionManager-CFB24qBh.cjs → AcpSessionManager-DvsZWTXp.cjs} +2 -2
- package/dist/{BasePermissionHandler-CgHLVNKT.mjs → BasePermissionHandler-1QcavYFn.mjs} +1 -1
- package/dist/{BasePermissionHandler-C0JS37Jt.cjs → BasePermissionHandler-25RmI4dK.cjs} +1 -1
- package/dist/{account-DOil1Hn8.cjs → account-ChUtFYld.cjs} +11 -11
- package/dist/{account-EzL-zwwE.mjs → account-DA4mbX3-.mjs} +11 -11
- package/dist/{accountService-DL6xhVUa.cjs → accountService-BWUjgHl0.cjs} +4 -4
- package/dist/{accountService-DQ21IlBs.mjs → accountService-D7NZrnQd.mjs} +4 -4
- package/dist/{acpSessionResume-B01oHWDS.cjs → acpSessionResume-CeQu84Ol.cjs} +1 -1
- package/dist/{acpSessionResume-DEOIZUuj.mjs → acpSessionResume-D6YgeofW.mjs} +1 -1
- package/dist/{agentHome-DucTue1n.mjs → agentHome-DM6mC64c.mjs} +4 -4
- package/dist/{agentHome-BulDO_1K.cjs → agentHome-DevJCRG9.cjs} +4 -4
- package/dist/{api-CiNezCys.mjs → api-oceym3w6.mjs} +14 -12
- package/dist/{api-fuwEEEkT.cjs → api-te19Pzi3.cjs} +30 -28
- package/dist/{apiMachine-CxmiSa2-.cjs → apiMachine-BjhCXg6C.cjs} +117 -44
- package/dist/{apiMachine-DCmKjms1.mjs → apiMachine-DCHsqtFQ.mjs} +105 -32
- package/dist/{attachmentContent-Cehh7ClR.cjs → attachmentContent-BfCEgPTP.cjs} +2 -2
- package/dist/{attachmentContent-CiY3MvdO.mjs → attachmentContent-Dl29U1v1.mjs} +2 -2
- package/dist/{auth-DVsH_a8J.mjs → auth-BIkCWkRV.mjs} +5 -5
- package/dist/{auth-DHqHrs5d.mjs → auth-BJ8Tej9L.mjs} +8 -8
- package/dist/{auth-DHlbjtf7.cjs → auth-SH0o7ue7.cjs} +5 -5
- package/dist/{auth-tlMcvk2Y.cjs → auth-SshU0tNW.cjs} +8 -8
- package/dist/{auto-Cnn8luKk.mjs → auto-Bdr4sSJk.mjs} +17 -17
- package/dist/{auto-DNAa8xDZ.cjs → auto-t1B1Yzb3.cjs} +17 -17
- package/dist/{bootstrap-C2XSEyOe.mjs → bootstrap-D8DYLUId.mjs} +2 -2
- package/dist/{bootstrap-PeTZ2sAn.cjs → bootstrap-GZDknvPy.cjs} +2 -2
- package/dist/{browser-CWWyaf8_.mjs → browser-C-H3QYV2.mjs} +1 -1
- package/dist/{browser-Bm24RiFU.cjs → browser-DwCi-9Ya.cjs} +1 -1
- package/dist/{claudeAccountEnv-_O3x5AJ1.cjs → claudeAccountEnv-DSaFKajJ.cjs} +1 -1
- package/dist/{claudeAccountEnv-CPO6CGNd.mjs → claudeAccountEnv-DmVbGhZb.mjs} +1 -1
- package/dist/{claudeLocal-CRG-Q7kS.mjs → claudeLocal-BiM2x9DJ.mjs} +5 -5
- package/dist/{claudeLocal-BDWy2pFt.cjs → claudeLocal-Ck1jTve1.cjs} +5 -5
- package/dist/{claudeLocalLauncher-B5cOrszW.mjs → claudeLocalLauncher-DzvM0jBo.mjs} +10 -10
- package/dist/{claudeLocalLauncher-DmSLoHlw.cjs → claudeLocalLauncher-Jsupvl4V.cjs} +10 -10
- package/dist/{claudeSessionFork-OffWLYgd.cjs → claudeSessionFork-CDTbQmYi.cjs} +1 -1
- package/dist/{claudeSessionFork-BqV6E0ep.mjs → claudeSessionFork-D-BhXkRa.mjs} +1 -1
- package/dist/{client-CfTeXnYS.mjs → client-BRuFIwki.mjs} +2 -2
- package/dist/{client-Cg_cuQb1.mjs → client-CISkP897.mjs} +2 -2
- package/dist/{client-Ckic3nxZ.cjs → client-D-HEr922.cjs} +2 -2
- package/dist/{client-B3lOol4f.mjs → client-E4kW5qjR.mjs} +4 -4
- package/dist/{client-B9fcSMXP.cjs → client-oqSAKwmy.cjs} +2 -2
- package/dist/{client-YFvImdwH.cjs → client-v6rdLsBH.cjs} +4 -4
- package/dist/codex/happyMcpStdioBridge.cjs +16 -16
- package/dist/codex/happyMcpStdioBridge.mjs +16 -16
- package/dist/{codexAccount-CYhQir50.cjs → codexAccount-CQ4W1Ax8.cjs} +1 -1
- package/dist/{codexAccount-iZwmpYti.mjs → codexAccount-CnbDfCOM.mjs} +1 -1
- package/dist/{codexAppServerClient-C-UwVMUN.cjs → codexAppServerClient--K-ILfqM.cjs} +3 -3
- package/dist/{codexAppServerClient-aV5m-FpZ.mjs → codexAppServerClient-BLasFGTm.mjs} +3 -3
- package/dist/{codexCommand-5nWT7F8A.cjs → codexCommand-M1uNblJx.cjs} +48 -48
- package/dist/{codexCommand-CI2NTyIF.mjs → codexCommand-Wv1WVNtM.mjs} +48 -48
- package/dist/{codexTermination-D18IHgLP.cjs → codexTermination-BumRIUqm.cjs} +1 -1
- package/dist/{codexTermination-CLjDP6Ja.mjs → codexTermination-DigTBSJE.mjs} +1 -1
- package/dist/{config-BfwjfFSC.mjs → config-Br2fCFwB.mjs} +3 -3
- package/dist/{config-B7YtrHi0.cjs → config-Czs0Tucv.cjs} +3 -3
- package/dist/{configuration-CWRKSOyj.cjs → configuration-DfRs3WLd.cjs} +1 -1
- package/dist/{configuration-C8r6uD9k.mjs → configuration-JBFF7432.mjs} +1 -1
- package/dist/{connect-K5HBcM56.mjs → connect-CbCqv-MV.mjs} +13 -13
- package/dist/{connect-DALX1hGB.cjs → connect-Cr--b0yl.cjs} +13 -13
- package/dist/{context-BqhlGL3u.cjs → context-C5WWlHOl.cjs} +1 -1
- package/dist/{context-CtMY-M8T.mjs → context-DLIjT5qU.mjs} +1 -1
- package/dist/{controlClient-DyNgxNl7.cjs → controlClient-B61crTpk.cjs} +3 -3
- package/dist/{controlClient-DYQ1g2ar.mjs → controlClient-D5BYm3PU.mjs} +3 -3
- package/dist/{createSessionMetadata-C4WN8pVK.cjs → createSessionMetadata-BwYysMTH.cjs} +2 -2
- package/dist/{createSessionMetadata-CZuEDo2v.mjs → createSessionMetadata-OMKj3e48.mjs} +2 -2
- package/dist/{daemonAccounts-CxMJw7x2.cjs → daemonAccounts-CqAnPXDJ.cjs} +2 -2
- package/dist/{daemonAccounts-CnAEaJE_.mjs → daemonAccounts-asWvoPKG.mjs} +3 -3
- package/dist/{defaultPermissionMode-CpEJ0wlb.mjs → defaultPermissionMode-4KYZA4WF.mjs} +1 -1
- package/dist/{defaultPermissionMode-BCWCMONI.cjs → defaultPermissionMode-BItpIZML.cjs} +1 -1
- package/dist/{deterministicJson-r4zhG546.cjs → deterministicJson-DIzyb1dQ.cjs} +13 -13
- package/dist/{deterministicJson-Dg_0QJAR.mjs → deterministicJson-DnTSkEgb.mjs} +13 -13
- package/dist/{doctor-0gLGzwz6.cjs → doctor-Dn1G6QhF.cjs} +7 -7
- package/dist/{doctor-COeFzPpz.mjs → doctor-jrvm-tl3.mjs} +7 -7
- package/dist/{downloadTarget-CbuUiS5p.mjs → downloadTarget-BtsN_-LN.mjs} +7 -7
- package/dist/{downloadTarget-8ovVpDv1.cjs → downloadTarget-DGnCGrDZ.cjs} +7 -7
- package/dist/{ensureDaemonRunning-CwlujXmV.mjs → ensureDaemonRunning-DCmXUwNi.mjs} +5 -5
- package/dist/{ensureDaemonRunning-Bq-n6xTt.cjs → ensureDaemonRunning-DsvcjXb4.cjs} +5 -5
- package/dist/{handleResumeCommand-B5GgmPm_.mjs → handleResumeCommand-CFupxyHT.mjs} +5 -5
- package/dist/{handleResumeCommand-muSrYA5y.cjs → handleResumeCommand-hzho-lp7.cjs} +5 -5
- package/dist/{index-BUOd8bNd.cjs → index-5TDKOvkU.cjs} +4 -4
- package/dist/{index-DKCmDned.mjs → index-BMFLwBCd.mjs} +4 -4
- package/dist/{index-D9Hidq-g.cjs → index-BknTkVnR.cjs} +256 -89
- package/dist/{index-BRH0XYSO.mjs → index-CHk8F9OY.mjs} +45 -45
- package/dist/{index-Dt_YE-zw.cjs → index-CRI-_-YH.cjs} +44 -44
- package/dist/{index-D0V-seiN.mjs → index-CZpFhEmE.mjs} +3 -3
- package/dist/{index-BZCIkrFj.mjs → index-CofTgtQ3.mjs} +4 -4
- package/dist/{index-C27JFCbe.mjs → index-CxiisoO1.mjs} +256 -89
- package/dist/{index-CQZg9jKx.cjs → index-DCfEzudP.cjs} +4 -4
- package/dist/{index-CnY74Dae.cjs → index-EGwuuFdL.cjs} +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BlW2kkPl.cjs → install-CB5eTmzm.cjs} +3 -3
- package/dist/{install-CooQf1oU.mjs → install-CeDqNGxI.mjs} +3 -3
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +9 -0
- package/dist/lib.d.mts +9 -0
- package/dist/lib.mjs +12 -12
- package/dist/{localHappyAgentAuth-oxhpgJOb.cjs → localHappyAgentAuth-B6xdH-Fr.cjs} +1 -1
- package/dist/{localHappyAgentAuth-BAK_nqMG.mjs → localHappyAgentAuth-BiIyMoiG.mjs} +1 -1
- package/dist/{logger-D1hb3CG8.mjs → logger-BHfBDOsy.mjs} +2 -2
- package/dist/{logger-HQ9yDb8R.cjs → logger-BrAF4iuT.cjs} +2 -2
- package/dist/{machineMetadata-Dzwn-HjN.cjs → machineMetadata-D5PO2ylb.cjs} +3 -3
- package/dist/{machineMetadata-Dxng45Uh.mjs → machineMetadata-Ekniv5o4.mjs} +3 -3
- package/dist/{main-D7qre-pa.cjs → main-C8lsRSYS.cjs} +47 -47
- package/dist/{main-BP0iY2vQ.mjs → main-HXdcnexS.mjs} +47 -47
- package/dist/{mcp-BmDGyj7k.mjs → mcp-C2YD6mq4.mjs} +20 -20
- package/dist/{mcp-D3yzLkh8.cjs → mcp-D9sglL02.cjs} +20 -20
- package/dist/{mirrorProtocol-C9Zc6GFT.mjs → mirrorProtocol-BLhArCS9.mjs} +12 -5
- package/dist/{mirrorProtocol-Cv2otcvM.cjs → mirrorProtocol-CNF1eHsm.cjs} +12 -4
- package/dist/{package-CpmoMPuj.mjs → package-BGZo2vAj.mjs} +7 -7
- package/dist/{package-Dn7zZkY1.cjs → package-CStJrLG3.cjs} +7 -7
- package/dist/{panels-D59PlNoD.cjs → panels-D4_yGw4n.cjs} +5 -5
- package/dist/{panels-CQobcX5w.mjs → panels-GVnnEsow.mjs} +5 -5
- package/dist/{peerTools-CNzlwuL7.mjs → peerTools-BO-H0wNj.mjs} +5 -5
- package/dist/{peerTools-D417O7d-.cjs → peerTools-Drow2-P4.cjs} +5 -5
- package/dist/{persistence-BiyvEYaR.cjs → persistence-DGfEdbA5.cjs} +2 -2
- package/dist/{persistence-CagHeZ-f.mjs → persistence-DvD-irLh.mjs} +2 -2
- package/dist/{piRunnerArgs-kTaNYd23.cjs → piRunnerArgs-C1dLsoXF.cjs} +1 -1
- package/dist/{piRunnerArgs-DKU5LoWu.mjs → piRunnerArgs-DwcAwwzm.mjs} +1 -1
- package/dist/{piRuntime-BV4fQyZD.mjs → piRuntime-_yRSPgnR.mjs} +1 -1
- package/dist/{piRuntime-BI4KNAUY.cjs → piRuntime-d2h0Cska.cjs} +1 -1
- package/dist/{piTerminal-WPUtDJAV.cjs → piTerminal-CVB4fa5R.cjs} +22 -22
- package/dist/{piTerminal-oObkl3WJ.mjs → piTerminal-WN0AMv9u.mjs} +22 -22
- package/dist/{pushNotifications-DRDWUnP-.cjs → pushNotifications-3YsyCEfY.cjs} +16 -3
- package/dist/{pushNotifications-4sNESDMv.mjs → pushNotifications-D2UZnoTB.mjs} +16 -3
- package/dist/{query-qIbeJ2-r.cjs → query-Ba7UXc_y.cjs} +1 -1
- package/dist/{query-6OWHW1U1.mjs → query-_sw0hG6A.mjs} +1 -1
- package/dist/{rateLimitWindows-U4fc1-_6.cjs → rateLimitWindows-DiiGHS9r.cjs} +1 -1
- package/dist/{rateLimitWindows-4uhuwKnU.mjs → rateLimitWindows-DzXv6p_W.mjs} +1 -1
- package/dist/{lidState-VZ1j_QYw.cjs → reconnectGate-BpePVLPu.cjs} +27 -2
- package/dist/{lidState-BflRFw38.mjs → reconnectGate-CxLgZCBh.mjs} +27 -3
- package/dist/{registerCommonHandlers-CEV9KUsq.cjs → registerCommonHandlers-6iKpECuR.cjs} +2 -2
- package/dist/{registerCommonHandlers-PTJ8TBj9.mjs → registerCommonHandlers-ChdVwZW6.mjs} +2 -2
- package/dist/{registerKillSessionHandler-C6F1sjoo.cjs → registerKillSessionHandler-BDTgrstx.cjs} +6 -6
- package/dist/{registerKillSessionHandler-D4SSwQj8.mjs → registerKillSessionHandler-D6wYbAIt.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-4mRv0Msq.mjs → registerSideQuestionHandler-C3K_qKwA.mjs} +4 -4
- package/dist/{registerSideQuestionHandler-ByUnjI3V.cjs → registerSideQuestionHandler-U4LGga_Z.cjs} +4 -4
- package/dist/{remoteSessionClient-CfYDFlKm.mjs → remoteSessionClient-CFNM8UEh.mjs} +5 -5
- package/dist/{remoteSessionClient-CUk6haD7.cjs → remoteSessionClient-DSC5Cj21.cjs} +5 -5
- package/dist/{reportProgressTool-BCn5oG52.mjs → reportProgressTool-CFmDK8ag.mjs} +3 -3
- package/dist/{reportProgressTool-C1JOvo6T.cjs → reportProgressTool-Cr25LWeW.cjs} +3 -3
- package/dist/{run-D2SlfZPP.cjs → run-Be0yicft.cjs} +41 -41
- package/dist/{run-DC8BIklA.mjs → run-D0D73Dam.mjs} +41 -41
- package/dist/{runClaude-D6fqN9PD.mjs → runClaude-1NP467UM.mjs} +25 -25
- package/dist/{runClaude-BE-5GgIZ.cjs → runClaude-BOxvKK4H.cjs} +25 -25
- package/dist/{runClaudeDeps-BmdwskeI.mjs → runClaudeDeps-BPzLoWyT.mjs} +48 -48
- package/dist/{runClaudeDeps-W0nv2vHL.cjs → runClaudeDeps-CkRlQx2Y.cjs} +42 -42
- package/dist/{runGemini-Da_d-2kV.cjs → runGemini-BowXJRXb.cjs} +35 -35
- package/dist/{runGemini-C3Ipeu1i.mjs → runGemini-j2n5ZlOL.mjs} +35 -35
- package/dist/{runOpenClaw-BoI6nbKB.mjs → runOpenClaw-6zrT8dPO.mjs} +18 -18
- package/dist/{runOpenClaw-af5qDNU0.cjs → runOpenClaw-DLsnZnFM.cjs} +18 -18
- package/dist/{sandbox-CjoyUSGa.mjs → sandbox-BFbT6HDl.mjs} +4 -4
- package/dist/{sandbox-UGF68GrE.cjs → sandbox-DLijcRKk.cjs} +4 -4
- package/dist/selfCheck-DCIqaiMu.mjs +88 -0
- package/dist/{selfCheck-Cr8eAw4m.cjs → selfCheck-U-A1DCi9.cjs} +39 -39
- package/dist/{send-CVSht9s_.cjs → send-CGxo_QUR.cjs} +8 -8
- package/dist/{send-gqX0-i4p.mjs → send-CQGKb3Kb.mjs} +8 -8
- package/dist/{server-BPgVv-BG.cjs → server-CWbcDBjV.cjs} +6 -6
- package/dist/{server-DxlNqWJo.mjs → server-DR5bQzTq.mjs} +4 -4
- package/dist/{sessionLock-D2usWXAg.cjs → sessionLock-CJiayMcZ.cjs} +3 -3
- package/dist/{sessionLock-BfvR9BGB.mjs → sessionLock-DqFKSW8u.mjs} +3 -3
- package/dist/{sessionOps-JRyQhF5s.cjs → sessionOps-Cw_JivR2.cjs} +4 -4
- package/dist/{sessionOps-OmRqUFm4.mjs → sessionOps-D-SDNs-D.mjs} +4 -4
- package/dist/{sessionProvider-DTEdidBc.mjs → sessionProvider-Cb-LtbFQ.mjs} +10 -10
- package/dist/{sessionProvider-BpscgwwC.cjs → sessionProvider-JEAWxBF6.cjs} +10 -10
- package/dist/{sessionScanner-BlAOpqMh.mjs → sessionScanner-C2M697xz.mjs} +3 -3
- package/dist/{sessionScanner-C_qVc1ok.cjs → sessionScanner-zJrc_Oe0.cjs} +3 -3
- package/dist/{sessions-CnjHHllR.mjs → sessions-CIxnjpCM.mjs} +10 -10
- package/dist/{sessions-7iyjxti9.cjs → sessions-D2yLkE5R.cjs} +10 -10
- package/dist/{setupOfflineReconnection-IKEI7fLJ.mjs → setupOfflineReconnection-DzV1wB4y.mjs} +2 -2
- package/dist/{setupOfflineReconnection-BCbJa5mT.cjs → setupOfflineReconnection-Uu3tqISz.cjs} +2 -2
- package/dist/{spawn-CbfcClhj.mjs → spawn-CeeM-Piz.mjs} +14 -14
- package/dist/{spawn-CxEl0Dyz.cjs → spawn-DD1Sv8Ri.cjs} +14 -14
- package/dist/{spawnAgents-Cm23BW-D.cjs → spawnAgents-CrHgpAzU.cjs} +1 -1
- package/dist/{spawnAgents-N3jxdNJC.mjs → spawnAgents-DEBfpoPZ.mjs} +1 -1
- package/dist/{spawnHappyCLI-C8gMHJu5.mjs → spawnHappyCLI-CUfe8n_m.mjs} +1 -1
- package/dist/{spawnHappyCLI-CHSlXWUe.cjs → spawnHappyCLI-CYzlz9Sl.cjs} +1 -1
- package/dist/{startFileWatcher-BGpYPz6L.cjs → startFileWatcher-C0u3J6Bj.cjs} +1 -1
- package/dist/{startFileWatcher-6hslFu_B.mjs → startFileWatcher-JdO3v65I.mjs} +1 -1
- package/dist/{startupSessionCreate-B7jrCZUD.mjs → startupSessionCreate-CfBajt2k.mjs} +3 -3
- package/dist/{startupSessionCreate-CltDtCEF.cjs → startupSessionCreate-s1ekIs2Z.cjs} +3 -3
- package/dist/{store-BlPvTr_Q.mjs → store-DEhdblkI.mjs} +1 -1
- package/dist/{store-aa3CVNwS.cjs → store-QBBJB5Ox.cjs} +1 -1
- package/dist/{streamRelay-C2Lb2z39.cjs → streamRelay-BVrCYh2G.cjs} +1 -1
- package/dist/{streamRelay-DFZyAPD_.mjs → streamRelay-DymKR1Rk.mjs} +1 -1
- package/dist/{sync-DtzoF9sw.mjs → sync-BLGrIKN9.mjs} +1 -1
- package/dist/{sync-DfI78smj.cjs → sync-BO4DRSub.cjs} +1 -1
- package/dist/{systemPrompt-HZNR9rjt.cjs → systemPrompt-DTUJZOn6.cjs} +2 -2
- package/dist/{systemPrompt-B1Xd99hK.mjs → systemPrompt-YylizkJs.mjs} +2 -2
- package/dist/{teams-fFX-L_ms.cjs → teams-DnLPBPKx.cjs} +7 -7
- package/dist/{teams-Vk75H6BZ.mjs → teams-zkGFcwsG.mjs} +7 -7
- package/dist/{template-CJ8uLlD8.mjs → template-BGlDAjbM.mjs} +1 -1
- package/dist/{template-B1AORlgU.cjs → template-uSKZ53Sv.cjs} +1 -1
- package/dist/{terminals-Dlg0x3nY.mjs → terminals-Dc38XmZv.mjs} +9 -5
- package/dist/{terminals-B_bfC9c2.cjs → terminals-dK3Lrjfp.cjs} +9 -5
- package/dist/{time-BqPZjTpo.cjs → time-Cv4hbCLT.cjs} +1 -1
- package/dist/{time-CgAwVt5R.mjs → time-DZE0879N.mjs} +1 -1
- package/dist/{titleGenerator-D2UB7Uyr.mjs → titleGenerator-B2BbmJuc.mjs} +2 -2
- package/dist/{titleGenerator-ijVOuv3J.cjs → titleGenerator-D2ehxbvK.cjs} +3 -3
- package/dist/tmuxSocket-BmZyixRM.mjs +29 -0
- package/dist/{tmuxSocket-D-Xt6Vn-.cjs → tmuxSocket-Dg11Olx0.cjs} +12 -0
- package/dist/{todo-vCzaIwNp.cjs → todo-9kn_9N-H.cjs} +6 -6
- package/dist/{todo-CCuqtD0O.mjs → todo-DUpW9d8p.mjs} +6 -6
- package/dist/{tools-DthGQoo3.mjs → tools-gIDXwAzk.mjs} +1 -1
- package/dist/{tools-CL8h3fqh.cjs → tools-rMr-wPIc.cjs} +1 -1
- package/dist/{uninstall-DCJh4UoO.mjs → uninstall-CBlRzvNa.mjs} +3 -3
- package/dist/{uninstall-CIvThBvI.cjs → uninstall-CHx5TOHi.cjs} +3 -3
- package/dist/{wrapperAccount-RPtq8BwD.mjs → wrapperAccount-Ce78kKMo.mjs} +2 -2
- package/dist/{wrapperAccount-BubTurHU.cjs → wrapperAccount-EkmR4V-v.cjs} +2 -2
- package/package.json +7 -7
- package/dist/selfCheck-CNrOZgBv.mjs +0 -88
- package/dist/tmuxSocket-B8Yx20sT.mjs +0 -19
|
@@ -2,46 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
var socket_ioClient = require('socket.io-client');
|
|
4
4
|
var webPanels = require('./webPanels-FCgFKvVe.cjs');
|
|
5
|
-
var logger = require('./logger-
|
|
6
|
-
var
|
|
7
|
-
var mirrorProtocol = require('./mirrorProtocol-
|
|
8
|
-
var configuration = require('./configuration-
|
|
5
|
+
var logger = require('./logger-BrAF4iuT.cjs');
|
|
6
|
+
var reconnectGate = require('./reconnectGate-BpePVLPu.cjs');
|
|
7
|
+
var mirrorProtocol = require('./mirrorProtocol-CNF1eHsm.cjs');
|
|
8
|
+
var configuration = require('./configuration-DfRs3WLd.cjs');
|
|
9
9
|
var cliUpdate = require('./cliUpdate-DsKXPFYp.cjs');
|
|
10
|
-
var registerCommonHandlers = require('./registerCommonHandlers-
|
|
10
|
+
var registerCommonHandlers = require('./registerCommonHandlers-6iKpECuR.cjs');
|
|
11
11
|
var promises = require('node:fs/promises');
|
|
12
12
|
var path = require('node:path');
|
|
13
13
|
var os = require('node:os');
|
|
14
14
|
var fsMkdir = require('./fsMkdir-0K3yENml.cjs');
|
|
15
15
|
var node_child_process = require('node:child_process');
|
|
16
|
-
var persistence = require('./persistence-
|
|
16
|
+
var persistence = require('./persistence-DGfEdbA5.cjs');
|
|
17
17
|
var fileStore = require('./fileStore-7qhnbs6N.cjs');
|
|
18
|
-
var index = require('./index-
|
|
19
|
-
var accountService = require('./accountService-
|
|
18
|
+
var index = require('./index-BknTkVnR.cjs');
|
|
19
|
+
var accountService = require('./accountService-BWUjgHl0.cjs');
|
|
20
20
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
21
21
|
var limits = require('./limits-C-a7gr04.cjs');
|
|
22
|
-
var time = require('./time-
|
|
22
|
+
var time = require('./time-Cv4hbCLT.cjs');
|
|
23
23
|
var pty = require('node-pty');
|
|
24
|
-
var terminals = require('./terminals-
|
|
25
|
-
var tmuxSocket = require('./tmuxSocket-
|
|
26
|
-
var index$1 = require('./index-
|
|
24
|
+
var terminals = require('./terminals-dK3Lrjfp.cjs');
|
|
25
|
+
var tmuxSocket = require('./tmuxSocket-Dg11Olx0.cjs');
|
|
26
|
+
var index$1 = require('./index-DCfEzudP.cjs');
|
|
27
27
|
var node_crypto = require('node:crypto');
|
|
28
28
|
var node_fs = require('node:fs');
|
|
29
29
|
var axios = require('axios');
|
|
30
30
|
var projectPath = require('./projectPath-C3ioB4Bu.cjs');
|
|
31
31
|
var ids = require('./ids-B6ZC0HGt.cjs');
|
|
32
32
|
var detectCLI = require('./detectCLI-BuYR_Qxe.cjs');
|
|
33
|
-
var localHappyAgentAuth = require('./localHappyAgentAuth-
|
|
33
|
+
var localHappyAgentAuth = require('./localHappyAgentAuth-B6xdH-Fr.cjs');
|
|
34
34
|
var path$1 = require('./path-B7zW-WwE.cjs');
|
|
35
35
|
var oneShotPrompts = require('./oneShotPrompts-CL0dip9C.cjs');
|
|
36
|
-
var claudeSessionFork = require('./claudeSessionFork-
|
|
37
|
-
var codexAppServerClient = require('./codexAppServerClient-
|
|
36
|
+
var claudeSessionFork = require('./claudeSessionFork-CDTbQmYi.cjs');
|
|
37
|
+
var codexAppServerClient = require('./codexAppServerClient--K-ILfqM.cjs');
|
|
38
38
|
var codexThreadFork = require('./codexThreadFork-C6ZmcT2z.cjs');
|
|
39
|
-
var rateLimitWindows = require('./rateLimitWindows-
|
|
39
|
+
var rateLimitWindows = require('./rateLimitWindows-DiiGHS9r.cjs');
|
|
40
40
|
require('chalk');
|
|
41
41
|
require('node:util');
|
|
42
42
|
require('os');
|
|
43
43
|
require('child_process');
|
|
44
|
-
require('./package-
|
|
44
|
+
require('./package-CStJrLG3.cjs');
|
|
45
45
|
require('util');
|
|
46
46
|
require('fs/promises');
|
|
47
47
|
require('crypto');
|
|
@@ -49,9 +49,9 @@ require('path');
|
|
|
49
49
|
require('cross-spawn');
|
|
50
50
|
require('zod');
|
|
51
51
|
require('@paralleldrive/cuid2');
|
|
52
|
-
require('./claudeAccountEnv-
|
|
53
|
-
require('./store-
|
|
54
|
-
require('./codexAccount-
|
|
52
|
+
require('./claudeAccountEnv-DSaFKajJ.cjs');
|
|
53
|
+
require('./store-QBBJB5Ox.cjs');
|
|
54
|
+
require('./codexAccount-CQ4W1Ax8.cjs');
|
|
55
55
|
require('node:readline');
|
|
56
56
|
require('tweetnacl');
|
|
57
57
|
require('./terminalTitleSuggest-DhvRFX3H.cjs');
|
|
@@ -486,6 +486,7 @@ function planTerminalRestore(record, facts) {
|
|
|
486
486
|
title: record.title ?? record.attachTmux,
|
|
487
487
|
manual: true,
|
|
488
488
|
tags: record.tags,
|
|
489
|
+
...record.projectId ? { projectId: record.projectId } : {},
|
|
489
490
|
command: terminals.attachStartupCommand(matches[0].id, facts.attachSocket),
|
|
490
491
|
attachTmux: record.attachTmux,
|
|
491
492
|
...recordGeometry(record)
|
|
@@ -500,6 +501,7 @@ function planTerminalRestore(record, facts) {
|
|
|
500
501
|
title: record.title,
|
|
501
502
|
manual: record.manual === true,
|
|
502
503
|
tags: record.tags,
|
|
504
|
+
...record.projectId ? { projectId: record.projectId } : {},
|
|
503
505
|
...resumable ? { command: `claude --resume ${record.claudeSessionId}` } : {},
|
|
504
506
|
...recordGeometry(record)
|
|
505
507
|
};
|
|
@@ -6052,6 +6054,7 @@ function selectAutoRestore(candidates, opts) {
|
|
|
6052
6054
|
terminalId: c.id,
|
|
6053
6055
|
...c.tags !== void 0 ? { tags: c.tags } : {},
|
|
6054
6056
|
...c.manual ? { manual: true } : {},
|
|
6057
|
+
...c.projectId ? { projectId: c.projectId } : {},
|
|
6055
6058
|
...c.cols !== void 0 && c.rows !== void 0 ? { cols: c.cols, rows: c.rows } : {},
|
|
6056
6059
|
cwd: c.cwd,
|
|
6057
6060
|
title: c.title,
|
|
@@ -6101,7 +6104,7 @@ function sanitizeClosedTerminals(raw, max = CLOSED_TERMINALS_MAX) {
|
|
|
6101
6104
|
const out = [];
|
|
6102
6105
|
for (const item of raw) {
|
|
6103
6106
|
if (!item || typeof item !== "object") continue;
|
|
6104
|
-
const { id, title, cwd, mirrorSessionId, claudeSessionId, reason, closedAt, tags, manual, attachTmux } = item;
|
|
6107
|
+
const { id, title, cwd, mirrorSessionId, claudeSessionId, reason, closedAt, tags, manual, attachTmux, projectId } = item;
|
|
6105
6108
|
if (typeof id !== "string" || id.length === 0 || typeof closedAt !== "number") continue;
|
|
6106
6109
|
if (seen.has(id)) continue;
|
|
6107
6110
|
seen.add(id);
|
|
@@ -6116,6 +6119,7 @@ function sanitizeClosedTerminals(raw, max = CLOSED_TERMINALS_MAX) {
|
|
|
6116
6119
|
...tagList !== void 0 ? { tags: tagList } : {},
|
|
6117
6120
|
...manual === true ? { manual: true } : {},
|
|
6118
6121
|
...typeof attachTmux === "string" && attachTmux ? { attachTmux } : {},
|
|
6122
|
+
...mirrorProtocol.projectField(projectId),
|
|
6119
6123
|
closedAt
|
|
6120
6124
|
});
|
|
6121
6125
|
}
|
|
@@ -6132,6 +6136,7 @@ function directTerminalItems(sessions, tmuxIds) {
|
|
|
6132
6136
|
id: s.id,
|
|
6133
6137
|
...title ? { title } : {},
|
|
6134
6138
|
tags: s.direct.tags ?? [],
|
|
6139
|
+
projectId: s.direct.projectId ?? null,
|
|
6135
6140
|
...s.direct.manual ? { manual: true } : {},
|
|
6136
6141
|
cwd: s.direct.cwd,
|
|
6137
6142
|
createdAt: s.direct.createdAt,
|
|
@@ -6879,7 +6884,7 @@ function startupInjectionArgs(tmuxSession, command) {
|
|
|
6879
6884
|
];
|
|
6880
6885
|
}
|
|
6881
6886
|
function seenInfoOf(t) {
|
|
6882
|
-
return { title: t.title, cwd: t.cwd, tags: t.tags, manual: t.manual, attachTmux: t.attachTmux, ...seenGeometry(t.paneCols, t.paneRows) };
|
|
6887
|
+
return { title: t.title, cwd: t.cwd, tags: t.tags, manual: t.manual, attachTmux: t.attachTmux, ...t.projectId ? { projectId: t.projectId } : {}, ...seenGeometry(t.paneCols, t.paneRows) };
|
|
6883
6888
|
}
|
|
6884
6889
|
function seenGeometry(cols, rows) {
|
|
6885
6890
|
return cols !== void 0 && rows !== void 0 ? { cols, rows } : {};
|
|
@@ -6899,7 +6904,9 @@ function terminalListSignature(items) {
|
|
|
6899
6904
|
// list, or the web never learns the toggle became available.
|
|
6900
6905
|
t.mirrorSessionId ?? "",
|
|
6901
6906
|
t.attachTmux ?? "",
|
|
6902
|
-
t.direct ? 1 : 0
|
|
6907
|
+
t.direct ? 1 : 0,
|
|
6908
|
+
// B-868: moving a terminal between projects must push at once.
|
|
6909
|
+
t.projectId ?? ""
|
|
6903
6910
|
]);
|
|
6904
6911
|
return JSON.stringify(canon);
|
|
6905
6912
|
}
|
|
@@ -7751,6 +7758,7 @@ class WebTerminalManager {
|
|
|
7751
7758
|
tags: info.tags,
|
|
7752
7759
|
manual: info.manual,
|
|
7753
7760
|
...info.attachTmux ? { attachTmux: info.attachTmux } : {},
|
|
7761
|
+
...info.projectId ? { projectId: info.projectId } : {},
|
|
7754
7762
|
...seenGeometry(info.cols, info.rows),
|
|
7755
7763
|
// Live binding first (authoritative while it exists), persisted
|
|
7756
7764
|
// metadata as the fallback once the mirror has been torn down.
|
|
@@ -7806,6 +7814,7 @@ class WebTerminalManager {
|
|
|
7806
7814
|
tags: info.tags,
|
|
7807
7815
|
manual: info.manual,
|
|
7808
7816
|
...info.attachTmux ? { attachTmux: info.attachTmux } : {},
|
|
7817
|
+
...info.projectId ? { projectId: info.projectId } : {},
|
|
7809
7818
|
...seenGeometry(info.cols, info.rows),
|
|
7810
7819
|
mirrorSessionId: mirror?.sessionId,
|
|
7811
7820
|
claudeSessionId: mirror?.claudeSessionId,
|
|
@@ -7819,6 +7828,7 @@ class WebTerminalManager {
|
|
|
7819
7828
|
cwd: info.cwd,
|
|
7820
7829
|
tags: info.tags,
|
|
7821
7830
|
manual: info.manual,
|
|
7831
|
+
...info.projectId ? { projectId: info.projectId } : {},
|
|
7822
7832
|
...seenGeometry(info.cols, info.rows),
|
|
7823
7833
|
seenAt: info.seenAt,
|
|
7824
7834
|
claudeSessionId: mirror?.claudeSessionId
|
|
@@ -8009,6 +8019,14 @@ class WebTerminalManager {
|
|
|
8009
8019
|
{ stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
|
|
8010
8020
|
);
|
|
8011
8021
|
}
|
|
8022
|
+
const projectId = tmuxSocket.validateTerminalProjectId(plan.projectId);
|
|
8023
|
+
if (projectId) {
|
|
8024
|
+
node_child_process.spawnSync(
|
|
8025
|
+
"tmux",
|
|
8026
|
+
tmuxSocket.tmuxArgs(["set-option", "-t", `=${name}:`, "@vh_project", projectId]),
|
|
8027
|
+
{ stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env }
|
|
8028
|
+
);
|
|
8029
|
+
}
|
|
8012
8030
|
if (plan.command) {
|
|
8013
8031
|
const command = withTerminalHooks(plan.command, plan.terminalId, this.claudeVersion.current());
|
|
8014
8032
|
for (const argv of startupInjectionArgs(name, command)) {
|
|
@@ -8022,7 +8040,7 @@ class WebTerminalManager {
|
|
|
8022
8040
|
* would care about changed (see liveSnapshotChanged). */
|
|
8023
8041
|
persistLiveSnapshot(live, now) {
|
|
8024
8042
|
const candidate = /* @__PURE__ */ new Map();
|
|
8025
|
-
for (const [id, info] of live) candidate.set(id, { title: info.title, cwd: info.cwd, tags: info.tags, manual: info.manual, ...info.attachTmux ? { attachTmux: info.attachTmux } : {}, ...seenGeometry(info.cols, info.rows), seenAt: now });
|
|
8043
|
+
for (const [id, info] of live) candidate.set(id, { title: info.title, cwd: info.cwd, tags: info.tags, manual: info.manual, ...info.attachTmux ? { attachTmux: info.attachTmux } : {}, ...info.projectId ? { projectId: info.projectId } : {}, ...seenGeometry(info.cols, info.rows), seenAt: now });
|
|
8026
8044
|
if (!mirrorProtocol.liveSnapshotChanged(this.lastPersistedSnapshot, candidate)) return;
|
|
8027
8045
|
this.lastPersistedSnapshot = candidate;
|
|
8028
8046
|
saveLiveSnapshot(candidate);
|
|
@@ -8243,7 +8261,7 @@ class WebTerminalManager {
|
|
|
8243
8261
|
}
|
|
8244
8262
|
}
|
|
8245
8263
|
if (createdNew) {
|
|
8246
|
-
attachedTmux = this.injectIntoCreated(tmuxSession, attachTarget, opts.startupCommand, env);
|
|
8264
|
+
attachedTmux = this.injectIntoCreated(tmuxSession, attachTarget, opts.startupCommand, env, opts.projectId);
|
|
8247
8265
|
} else if (opts.attachTmux && !attachOnly) {
|
|
8248
8266
|
const stored = node_child_process.spawnSync(
|
|
8249
8267
|
"tmux",
|
|
@@ -8266,7 +8284,7 @@ class WebTerminalManager {
|
|
|
8266
8284
|
{ stdio: "ignore", timeout: TMUX_CREATE_TIMEOUT_MS, env }
|
|
8267
8285
|
);
|
|
8268
8286
|
createdNew = retry.status === 0;
|
|
8269
|
-
if (createdNew) attachedTmux = this.injectIntoCreated(tmuxSession, attachTarget, opts.startupCommand, env);
|
|
8287
|
+
if (createdNew) attachedTmux = this.injectIntoCreated(tmuxSession, attachTarget, opts.startupCommand, env, opts.projectId);
|
|
8270
8288
|
}
|
|
8271
8289
|
}
|
|
8272
8290
|
if (!attachOnly && !createdNew) {
|
|
@@ -8345,7 +8363,8 @@ class WebTerminalManager {
|
|
|
8345
8363
|
}
|
|
8346
8364
|
}
|
|
8347
8365
|
const created = new TerminalSession(id, { kind: "pty", pty: proc }, void 0, cols, rows);
|
|
8348
|
-
|
|
8366
|
+
const createProject = tmuxSocket.validateTerminalProjectId(opts.projectId);
|
|
8367
|
+
created.direct = { cwd, createdAt: Date.now(), ...createProject ? { projectId: createProject } : {} };
|
|
8349
8368
|
created.onTitleChange((title) => {
|
|
8350
8369
|
if (created.direct && !created.direct.manual) created.direct.title = terminals.deriveAutoTitle(title, os.hostname(), created.direct.cwd);
|
|
8351
8370
|
});
|
|
@@ -8393,7 +8412,14 @@ class WebTerminalManager {
|
|
|
8393
8412
|
* records / restore and types the attach line; otherwise the ordinary
|
|
8394
8413
|
* startup command runs. Returns what to echo as `attachedTmux`.
|
|
8395
8414
|
*/
|
|
8396
|
-
injectIntoCreated(tmuxSession, attachTarget, startupCommand, env) {
|
|
8415
|
+
injectIntoCreated(tmuxSession, attachTarget, startupCommand, env, projectId) {
|
|
8416
|
+
const project = tmuxSocket.validateTerminalProjectId(projectId);
|
|
8417
|
+
if (project) {
|
|
8418
|
+
try {
|
|
8419
|
+
node_child_process.spawnSync("tmux", tmuxSocket.tmuxArgs(["set-option", "-t", `=${tmuxSession}:`, "@vh_project", project]), { stdio: "ignore", timeout: TMUX_PROBE_TIMEOUT_MS, env });
|
|
8420
|
+
} catch {
|
|
8421
|
+
}
|
|
8422
|
+
}
|
|
8397
8423
|
if (attachTarget) {
|
|
8398
8424
|
for (const a of [
|
|
8399
8425
|
["set-option", "-t", `=${tmuxSession}:`, "@vh_title", attachTarget.name],
|
|
@@ -8714,6 +8740,7 @@ class WebTerminalManager {
|
|
|
8714
8740
|
cwd: liveDirect.direct.cwd,
|
|
8715
8741
|
tags: liveDirect.direct.tags ?? [],
|
|
8716
8742
|
...liveDirect.direct.manual ? { manual: true } : {},
|
|
8743
|
+
...liveDirect.direct.projectId ? { projectId: liveDirect.direct.projectId } : {},
|
|
8717
8744
|
reason: "closed",
|
|
8718
8745
|
closedAt: Date.now()
|
|
8719
8746
|
});
|
|
@@ -8757,6 +8784,7 @@ class WebTerminalManager {
|
|
|
8757
8784
|
tags: info.tags,
|
|
8758
8785
|
manual: info.manual,
|
|
8759
8786
|
...info.attachTmux ? { attachTmux: info.attachTmux } : {},
|
|
8787
|
+
...info.projectId ? { projectId: info.projectId } : {},
|
|
8760
8788
|
...seenGeometry(info.cols, info.rows),
|
|
8761
8789
|
mirrorSessionId: this.mirrorResolver?.(terminalId) ?? mirror?.sessionId,
|
|
8762
8790
|
claudeSessionId: mirror?.claudeSessionId,
|
|
@@ -8847,6 +8875,7 @@ class WebTerminalManager {
|
|
|
8847
8875
|
title,
|
|
8848
8876
|
// Always include [] so Web can feature-detect tag support.
|
|
8849
8877
|
tags: s.tags,
|
|
8878
|
+
projectId: s.projectId,
|
|
8850
8879
|
cwd: s.cwd,
|
|
8851
8880
|
createdAt: s.created,
|
|
8852
8881
|
// tmux last-activity (epoch s) → ms; optional so old daemons
|
|
@@ -9087,6 +9116,34 @@ class WebTerminalManager {
|
|
|
9087
9116
|
return false;
|
|
9088
9117
|
}
|
|
9089
9118
|
}
|
|
9119
|
+
/** B-868: put the terminal in a Very Happy project, or take it out (null).
|
|
9120
|
+
* Only the id is stored (`@vh_project`); the web resolves it against the
|
|
9121
|
+
* account's projects. Nothing is ever injected into the terminal. */
|
|
9122
|
+
setProject(terminalId, projectId) {
|
|
9123
|
+
const direct = this.terminals.get(terminalId)?.direct;
|
|
9124
|
+
if (!direct && !isTmuxAvailable()) return false;
|
|
9125
|
+
if (!/^[a-zA-Z0-9_-]{1,64}$/.test(terminalId)) return false;
|
|
9126
|
+
const valid = tmuxSocket.validateTerminalProjectId(projectId);
|
|
9127
|
+
if (valid === void 0) return false;
|
|
9128
|
+
if (direct) {
|
|
9129
|
+
if (valid) direct.projectId = valid;
|
|
9130
|
+
else delete direct.projectId;
|
|
9131
|
+
this.kickListRefresh();
|
|
9132
|
+
return true;
|
|
9133
|
+
}
|
|
9134
|
+
const target = `=vh-${terminalId}:`;
|
|
9135
|
+
try {
|
|
9136
|
+
const r = node_child_process.spawnSync("tmux", tmuxSocket.tmuxArgs(valid ? ["set-option", "-t", target, "@vh_project", valid] : ["set-option", "-u", "-t", target, "@vh_project"]), {
|
|
9137
|
+
stdio: "ignore",
|
|
9138
|
+
env: ptyEnv()
|
|
9139
|
+
});
|
|
9140
|
+
if (r.status !== 0) return false;
|
|
9141
|
+
this.kickListRefresh();
|
|
9142
|
+
return true;
|
|
9143
|
+
} catch {
|
|
9144
|
+
return false;
|
|
9145
|
+
}
|
|
9146
|
+
}
|
|
9090
9147
|
}
|
|
9091
9148
|
|
|
9092
9149
|
const UUID_RE$4 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -10504,7 +10561,7 @@ class ApiMachineClient {
|
|
|
10504
10561
|
constructor(token, machine) {
|
|
10505
10562
|
this.token = token;
|
|
10506
10563
|
this.machine = machine;
|
|
10507
|
-
this.rpcHandlerManager = new
|
|
10564
|
+
this.rpcHandlerManager = new reconnectGate.RpcHandlerManager({
|
|
10508
10565
|
scopePrefix: this.machine.id,
|
|
10509
10566
|
encryptionKey: this.machine.encryptionKey,
|
|
10510
10567
|
encryptionVariant: this.machine.encryptionVariant,
|
|
@@ -10935,7 +10992,7 @@ class ApiMachineClient {
|
|
|
10935
10992
|
this.syncResumeSessionRpcRegistration();
|
|
10936
10993
|
this.syncRestartSessionRpcRegistration();
|
|
10937
10994
|
this.rpcHandlerManager.registerHandler("open-terminal", async (params) => {
|
|
10938
|
-
const { terminalId, cols, rows, cwd, fromSeq, encStream, startupCommand, resub, attachOnly, streamMode, attachTmux } = params || {};
|
|
10995
|
+
const { terminalId, cols, rows, cwd, fromSeq, encStream, startupCommand, resub, attachOnly, streamMode, attachTmux, projectId } = params || {};
|
|
10939
10996
|
const attach = attachTmux && typeof attachTmux === "object" && typeof attachTmux.id === "string" && typeof attachTmux.name === "string" ? { id: attachTmux.id, name: attachTmux.name } : void 0;
|
|
10940
10997
|
const result = await this.webTerminal.open({
|
|
10941
10998
|
terminalId,
|
|
@@ -10947,7 +11004,9 @@ class ApiMachineClient {
|
|
|
10947
11004
|
resub,
|
|
10948
11005
|
attachOnly,
|
|
10949
11006
|
streamMode: streamMode === "lines" ? "lines" : void 0,
|
|
10950
|
-
...attach ? { attachTmux: attach } : {}
|
|
11007
|
+
...attach ? { attachTmux: attach } : {},
|
|
11008
|
+
// B-868: create-only; validated inside open().
|
|
11009
|
+
...typeof projectId === "string" ? { projectId } : {}
|
|
10951
11010
|
});
|
|
10952
11011
|
if (encStream) {
|
|
10953
11012
|
this.encTerminals.add(result.terminalId);
|
|
@@ -11045,6 +11104,16 @@ class ApiMachineClient {
|
|
|
11045
11104
|
}
|
|
11046
11105
|
return { type: "success" };
|
|
11047
11106
|
});
|
|
11107
|
+
this.rpcHandlerManager.registerHandler("set-terminal-project", async (params) => {
|
|
11108
|
+
const { terminalId, projectId } = params || {};
|
|
11109
|
+
if (typeof terminalId !== "string" || !terminalId || projectId === void 0) {
|
|
11110
|
+
throw new Error("terminalId and projectId are required");
|
|
11111
|
+
}
|
|
11112
|
+
if (!this.webTerminal.setProject(terminalId, projectId)) {
|
|
11113
|
+
throw new Error("Failed to set terminal project (invalid id, tmux unavailable, or session gone)");
|
|
11114
|
+
}
|
|
11115
|
+
return { type: "success" };
|
|
11116
|
+
});
|
|
11048
11117
|
this.rpcHandlerManager.registerHandler("stop-session", (params) => {
|
|
11049
11118
|
const { sessionId } = params || {};
|
|
11050
11119
|
if (!sessionId) {
|
|
@@ -11435,9 +11504,9 @@ class ApiMachineClient {
|
|
|
11435
11504
|
}
|
|
11436
11505
|
throw new Error("Metadata version mismatch");
|
|
11437
11506
|
} else if (answer.result === "error") {
|
|
11438
|
-
if (
|
|
11507
|
+
if (reconnectGate.isRateQuotaCode(answer.error)) {
|
|
11439
11508
|
rateRefusals += 1;
|
|
11440
|
-
await
|
|
11509
|
+
await reconnectGate.pauseForRateQuota({
|
|
11441
11510
|
label: "machine metadata",
|
|
11442
11511
|
code: answer.error,
|
|
11443
11512
|
attempt: rateRefusals,
|
|
@@ -11474,9 +11543,9 @@ class ApiMachineClient {
|
|
|
11474
11543
|
}
|
|
11475
11544
|
throw new Error("Daemon state version mismatch");
|
|
11476
11545
|
} else if (answer.result === "error") {
|
|
11477
|
-
if (
|
|
11546
|
+
if (reconnectGate.isRateQuotaCode(answer.error)) {
|
|
11478
11547
|
rateRefusals += 1;
|
|
11479
|
-
await
|
|
11548
|
+
await reconnectGate.pauseForRateQuota({
|
|
11480
11549
|
label: "daemon state",
|
|
11481
11550
|
code: answer.error,
|
|
11482
11551
|
attempt: rateRefusals,
|
|
@@ -11523,7 +11592,7 @@ class ApiMachineClient {
|
|
|
11523
11592
|
reconnection: false,
|
|
11524
11593
|
...handover ? { autoConnect: false } : {}
|
|
11525
11594
|
});
|
|
11526
|
-
|
|
11595
|
+
reconnectGate.socketConnectGuard(socket, guardOptions);
|
|
11527
11596
|
return socket;
|
|
11528
11597
|
}
|
|
11529
11598
|
activateControlSocket(socket, rpcAlreadyRegistered = false) {
|
|
@@ -11558,6 +11627,8 @@ class ApiMachineClient {
|
|
|
11558
11627
|
codexHistory: { rpcAvailable: true, detectedAt: now },
|
|
11559
11628
|
// B-549 capability flag: `history-search` (same restamp discipline).
|
|
11560
11629
|
historySearch: { rpcAvailable: true, detectedAt: now },
|
|
11630
|
+
// B-868 capability flag: `set-terminal-project` (same restamp discipline).
|
|
11631
|
+
terminalProjects: { rpcAvailable: true, detectedAt: now },
|
|
11561
11632
|
// B-084: closed records survive daemon restarts (persisted
|
|
11562
11633
|
// in closed-terminals.json), so the connect snapshot ships
|
|
11563
11634
|
// them too — not just the incremental pushes.
|
|
@@ -11658,7 +11729,7 @@ class ApiMachineClient {
|
|
|
11658
11729
|
clearTimeout(timer);
|
|
11659
11730
|
reject(error);
|
|
11660
11731
|
});
|
|
11661
|
-
|
|
11732
|
+
reconnectGate.connectGuarded(candidate, "release-handover", guardOptions);
|
|
11662
11733
|
});
|
|
11663
11734
|
await this.rpcHandlerManager.onSocketConnectAndWait(candidate, timeoutMs);
|
|
11664
11735
|
if (this.socket !== previous) {
|
|
@@ -11748,10 +11819,10 @@ class ApiMachineClient {
|
|
|
11748
11819
|
} else {
|
|
11749
11820
|
logger.logger.debugLargeJson(`[API MACHINE] Received RPC request via ${transport}:`, data);
|
|
11750
11821
|
}
|
|
11751
|
-
await
|
|
11822
|
+
await reconnectGate.answerSocketRequest(
|
|
11752
11823
|
callback,
|
|
11753
11824
|
() => this.rpcHandlerManager.handleRequest(data),
|
|
11754
|
-
(drop) => logger.logger.debug(`[API MACHINE] RPC ${data?.method} via ${transport} unanswered \u2014 ${
|
|
11825
|
+
(drop) => logger.logger.debug(`[API MACHINE] RPC ${data?.method} via ${transport} unanswered \u2014 ${reconnectGate.describeSocketAckDrop(drop)}`)
|
|
11755
11826
|
);
|
|
11756
11827
|
});
|
|
11757
11828
|
}
|
|
@@ -11867,23 +11938,25 @@ class ApiMachineClient {
|
|
|
11867
11938
|
}
|
|
11868
11939
|
startSmartReconnect() {
|
|
11869
11940
|
if (this.reconnectInterval) return;
|
|
11941
|
+
const gate = reconnectGate.createReconnectGate();
|
|
11870
11942
|
this.reconnectInterval = setInterval(() => {
|
|
11871
11943
|
if (this.socket.connected) {
|
|
11872
11944
|
clearInterval(this.reconnectInterval);
|
|
11873
11945
|
this.reconnectInterval = null;
|
|
11874
11946
|
return;
|
|
11875
11947
|
}
|
|
11876
|
-
|
|
11948
|
+
const decision = gate.decide(reconnectGate.shouldReconnect());
|
|
11949
|
+
if (decision === "wait") {
|
|
11877
11950
|
logger.logger.debug("[API MACHINE] Still not ready to reconnect");
|
|
11878
11951
|
return;
|
|
11879
11952
|
}
|
|
11880
|
-
logger.logger.debug("[API MACHINE] Attempting reconnect");
|
|
11881
|
-
|
|
11953
|
+
logger.logger.debug(decision === "force" ? "[API MACHINE] Still not ready after repeated checks \u2014 forcing a reconnect attempt" : "[API MACHINE] Attempting reconnect");
|
|
11954
|
+
reconnectGate.connectGuarded(this.socket, "reconnect-interval", guardOptions);
|
|
11882
11955
|
}, 3e3);
|
|
11883
|
-
if (
|
|
11956
|
+
if (reconnectGate.shouldReconnect()) {
|
|
11884
11957
|
logger.logger.debug("[API MACHINE] Network up + lid open \u2014 reconnecting in 1s");
|
|
11885
11958
|
setTimeout(() => {
|
|
11886
|
-
|
|
11959
|
+
reconnectGate.connectGuarded(this.socket, "reconnect-soon", guardOptions);
|
|
11887
11960
|
}, 1e3);
|
|
11888
11961
|
}
|
|
11889
11962
|
}
|