very-happy-cli 0.2.202 → 0.2.204
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-Z51picBa.mjs → AcpBackend-BBfcpIDj.mjs} +3 -3
- package/dist/{AcpBackend-BRcPXur6.cjs → AcpBackend-BupxHXGp.cjs} +3 -3
- package/dist/{AcpSessionManager-BCGqL1Em.mjs → AcpSessionManager-B9UkPYGi.mjs} +2 -2
- package/dist/{AcpSessionManager-BckOYH3I.cjs → AcpSessionManager-JJrnenKM.cjs} +2 -2
- package/dist/{BasePermissionHandler-BYIY3kxs.cjs → BasePermissionHandler-86_xnisC.cjs} +1 -1
- package/dist/{BasePermissionHandler-BhJjr-wB.mjs → BasePermissionHandler-tGylJLUH.mjs} +1 -1
- package/dist/{account-B-HTHZKw.mjs → account-BRqUOj_D.mjs} +11 -11
- package/dist/{account-B0Wu7rJR.cjs → account-C91_R-kw.cjs} +11 -11
- package/dist/{accountService-DEpIq6CF.mjs → accountService-CqrWNH8K.mjs} +4 -4
- package/dist/{accountService-Cns8UYGI.cjs → accountService-SOeB_21A.cjs} +4 -4
- package/dist/{acpSessionResume-BKjQRT4V.mjs → acpSessionResume-CZQ91ano.mjs} +1 -1
- package/dist/{acpSessionResume-C8Kd8eK6.cjs → acpSessionResume-DK8EjIY0.cjs} +1 -1
- package/dist/{agentHome-BXiCouR4.mjs → agentHome-71zGywwx.mjs} +4 -4
- package/dist/{agentHome-DnxSf1ox.cjs → agentHome-BZvbPuy1.cjs} +4 -4
- package/dist/{api-Cu1OFHDM.mjs → api-BYh1VGBa.mjs} +107 -18
- package/dist/{api-B-FB-s4z.cjs → api-BoJA-zK3.cjs} +107 -18
- package/dist/{apiMachine-DYGPILVb.mjs → apiMachine--_eI4PTv.mjs} +105 -21
- package/dist/{apiMachine-DCWgI1l_.cjs → apiMachine-CA58NM_V.cjs} +105 -21
- package/dist/{attachmentContent-Dq8P5ODq.mjs → attachmentContent-D95cCBX5.mjs} +2 -2
- package/dist/{attachmentContent-dXwHB_3C.cjs → attachmentContent-y621KwMz.cjs} +2 -2
- package/dist/{auth-DpIHm7Lb.cjs → auth-CAkpHr8F.cjs} +5 -5
- package/dist/{auth-D11uvx2P.mjs → auth-DCzFx5BN.mjs} +8 -8
- package/dist/{auth-CgdE-j7z.mjs → auth-DRJ_WPn3.mjs} +5 -5
- package/dist/{auth-BVNBE4B1.cjs → auth-Dofm64Kp.cjs} +8 -8
- package/dist/{auto-WdjHKP9R.mjs → auto-CrgOy5OR.mjs} +18 -18
- package/dist/{auto-Ba2b-il4.cjs → auto-D4IBwJEE.cjs} +18 -18
- package/dist/{bootstrap-CsZO_jkL.cjs → bootstrap-D16MMPNP.cjs} +2 -2
- package/dist/{bootstrap-BTYJf2w8.mjs → bootstrap-PnL2FX64.mjs} +2 -2
- package/dist/{browser-Dx3UOVPP.mjs → browser-D2enJJfv.mjs} +1 -1
- package/dist/{browser-DgufCq1K.cjs → browser-DK2GfyEr.cjs} +1 -1
- package/dist/{claudeAccountEnv-Btp39mfa.cjs → claudeAccountEnv-BTZjHTpF.cjs} +1 -1
- package/dist/{claudeAccountEnv-DowsOlDB.mjs → claudeAccountEnv-C6Wl-ZbT.mjs} +1 -1
- package/dist/{claudeLocal-ylDKcvX0.mjs → claudeLocal-BbzN1qly.mjs} +5 -5
- package/dist/{claudeLocal-Q0FgzhTu.cjs → claudeLocal-DaqiRW9N.cjs} +5 -5
- package/dist/{claudeLocalLauncher-D2rZvuaW.cjs → claudeLocalLauncher-B0qbyOUc.cjs} +10 -10
- package/dist/{claudeLocalLauncher-CtybsaR8.mjs → claudeLocalLauncher-D7bhZ9rp.mjs} +10 -10
- package/dist/claudeLongContext-BR_zdjUp.cjs +239 -0
- package/dist/claudeLongContext-CZ60xo5p.mjs +219 -0
- package/dist/{claudeSessionFork-DRLxmv9j.mjs → claudeSessionFork-BPF3cpGs.mjs} +1 -1
- package/dist/{claudeSessionFork-BrstQPE4.cjs → claudeSessionFork-lcajftLB.cjs} +1 -1
- package/dist/{client-DfT_CRwl.mjs → client-BH4s6mzX.mjs} +2 -2
- package/dist/{client-D0oBXuEe.mjs → client-BHt14nix.mjs} +2 -2
- package/dist/{client-xV99weGP.cjs → client-ByK8-iRd.cjs} +3 -3
- package/dist/{client-CNWx72ZT.cjs → client-CqmT_ur8.cjs} +2 -2
- package/dist/{client-Dq7jaxb2.cjs → client-D5_YDMpA.cjs} +2 -2
- package/dist/{client-DJsXNJWO.mjs → client-Og5iNZ6S.mjs} +17 -8
- package/dist/{client-Cj7D61by.mjs → client-t1vQ7gho.mjs} +3 -3
- package/dist/{client-Ch4Azlny.cjs → client-xA44FUnf.cjs} +17 -8
- package/dist/codex/happyMcpStdioBridge.cjs +20 -19
- package/dist/codex/happyMcpStdioBridge.mjs +20 -19
- package/dist/{codexAccount-CieIQLOX.mjs → codexAccount-BPQ-lPhH.mjs} +1 -1
- package/dist/{codexAccount-D-OBY29W.cjs → codexAccount-BjaHvmKH.cjs} +1 -1
- package/dist/{codexAppServerClient-DtdCZ7_b.mjs → codexAppServerClient-CvL3eBlM.mjs} +3 -3
- package/dist/{codexAppServerClient-BwBPZonh.cjs → codexAppServerClient-CyLtj1kP.cjs} +3 -3
- package/dist/{codexCommand-CsY9YFiG.cjs → codexCommand-B0Slfvne.cjs} +67 -56
- package/dist/{codexCommand-D92AQCLU.mjs → codexCommand-CXytYlk9.mjs} +67 -56
- package/dist/{codexTermination-BbXG2oFT.cjs → codexTermination-CykPnK3G.cjs} +1 -1
- package/dist/{codexTermination-rhIxjRMJ.mjs → codexTermination-D0sBaTvW.mjs} +1 -1
- package/dist/{config-Zhkmfb3O.cjs → config-7Z5qIB3k.cjs} +3 -3
- package/dist/{config-BnN1yFyi.mjs → config-DeXK_5y4.mjs} +3 -3
- package/dist/{configuration-DZUnfWp2.cjs → configuration-CDqmWkHO.cjs} +1 -1
- package/dist/{configuration-CQaLZMa-.mjs → configuration-D_YrWa_i.mjs} +1 -1
- package/dist/{connect-DY5QLfbI.mjs → connect-CivOym_v.mjs} +13 -13
- package/dist/{connect-BToTf3Gy.cjs → connect-D_tzdR4l.cjs} +13 -13
- package/dist/{context-ByTvtMXZ.mjs → context-DXfkj_FL.mjs} +1 -1
- package/dist/{context-BHydzPZw.cjs → context-k2CbuBtp.cjs} +1 -1
- package/dist/{controlClient-Bfwe0Xpt.cjs → controlClient-BS86Ksm8.cjs} +12 -3
- package/dist/{controlClient-Cqhd8ynk.mjs → controlClient-Daki7wgo.mjs} +12 -4
- package/dist/{createSessionMetadata-D_qa01wq.cjs → createSessionMetadata-2s80RDL1.cjs} +2 -2
- package/dist/{createSessionMetadata-tmhDzhJZ.mjs → createSessionMetadata-B_hQ8lDn.mjs} +2 -2
- package/dist/{daemonAccounts-ciidbU2h.cjs → daemonAccounts-BOoI7-sw.cjs} +2 -2
- package/dist/{daemonAccounts-D5shoCLt.mjs → daemonAccounts-BtkmoJmC.mjs} +3 -3
- package/dist/{defaultPermissionMode-DgeiMMqy.mjs → defaultPermissionMode-CYQi7vqJ.mjs} +1 -1
- package/dist/{defaultPermissionMode-Cs_Tv83b.cjs → defaultPermissionMode-DmLYaaL8.cjs} +1 -1
- package/dist/{deterministicJson-DRL1Gs_c.mjs → deterministicJson-DKiOtrSA.mjs} +23 -16
- package/dist/{deterministicJson-CbUdClvO.cjs → deterministicJson-lwG_VzWd.cjs} +23 -16
- package/dist/{doctor-DHCmWcwR.cjs → doctor-C0kONAQn.cjs} +7 -7
- package/dist/{doctor-Wu0yZ80l.mjs → doctor-DegBfYjz.mjs} +7 -7
- package/dist/{downloadTarget-BoJrjpEe.cjs → downloadTarget-BTEVg8t6.cjs} +6 -6
- package/dist/{downloadTarget-G72yKQcM.mjs → downloadTarget-osakJyyA.mjs} +6 -6
- package/dist/{ensureDaemonRunning-BKGybp3s.mjs → ensureDaemonRunning-ED6UVEbk.mjs} +5 -5
- package/dist/{ensureDaemonRunning-CnkyGd9x.cjs → ensureDaemonRunning-vxHxmXo2.cjs} +5 -5
- package/dist/exitNotice-BhRrv8dx.cjs +88 -0
- package/dist/exitNotice-D1tMULzu.mjs +79 -0
- package/dist/{forkBackfill-DYIjlN1Z.mjs → forkBackfill-C9EfJ64O.mjs} +28 -2
- package/dist/{forkBackfill-8eLDeS73.cjs → forkBackfill-D2WW91fz.cjs} +28 -1
- package/dist/{format-DePME4uu.cjs → format-9KvRMdvY.cjs} +1 -1
- package/dist/{format-BSx-Nv2p.mjs → format-DJwRUrQm.mjs} +1 -1
- package/dist/{handleResumeCommand-uKzhaOVC.cjs → handleResumeCommand-0lsgLgBB.cjs} +5 -5
- package/dist/{handleResumeCommand-DrJdhjLD.mjs → handleResumeCommand-PfKmR-hv.mjs} +5 -5
- package/dist/{index-C-eSUhXW.mjs → index-BNcFxRSt.mjs} +4 -4
- package/dist/{index-44o_qMvE.cjs → index-BYL_X3gP.cjs} +27 -6
- package/dist/{index-Bi7Lmykl.cjs → index-B_narjYR.cjs} +45 -44
- package/dist/{index-DDOCSeEj.cjs → index-Bm_9wBaO.cjs} +4 -4
- package/dist/{index-CoBaGAA4.cjs → index-C7yXrMau.cjs} +3 -3
- package/dist/{index-BcYJJV-f.mjs → index-CUJZx4cs.mjs} +3 -3
- package/dist/{index-fNsf-8K-.mjs → index-CUeuMsap.mjs} +4 -4
- package/dist/{index-CowtCbZ_.mjs → index-D1rxFJ2b.mjs} +46 -45
- package/dist/{index-CiRMvS73.mjs → index-DWk-WTU-.mjs} +24 -7
- package/dist/{index-BKXqaux4.cjs → index-l8Xg3Mbf.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-0TkucJrC.mjs → install-B593oYZs.mjs} +3 -3
- package/dist/{install-Ddc8TlWE.cjs → install-C0I1a5sL.cjs} +3 -3
- package/dist/{issue-CIfzJuaS.cjs → issue-CJrXCpnf.cjs} +8 -8
- package/dist/{issue-CML2xa46.mjs → issue-D9ukoK-U.mjs} +8 -8
- package/dist/lib.cjs +12 -12
- package/dist/lib.d.cts +42 -1
- package/dist/lib.d.mts +42 -1
- package/dist/lib.mjs +12 -12
- package/dist/{localHappyAgentAuth-BUX4E1ug.mjs → localHappyAgentAuth-CxNcSjMM.mjs} +1 -1
- package/dist/{localHappyAgentAuth-WLqXQbc6.cjs → localHappyAgentAuth-D3GKuEC2.cjs} +1 -1
- package/dist/{logger-BEVIGYKL.mjs → logger-BcdURxNR.mjs} +2 -2
- package/dist/{logger-Dhc0l3xH.cjs → logger-C8anCmdW.cjs} +2 -2
- package/dist/{machineMetadata-BQdp_ihk.mjs → machineMetadata-BQaQQk6Z.mjs} +3 -3
- package/dist/{machineMetadata-ixKckJ7k.cjs → machineMetadata-DYWtdEtE.cjs} +3 -3
- package/dist/{main-BNBYOcQb.cjs → main-Bw7qSCWA.cjs} +48 -48
- package/dist/{main-BzQSe4Zu.mjs → main-KsUdHnwc.mjs} +48 -48
- package/dist/{mcp-BwskAxOK.cjs → mcp-CxPUFOEd.cjs} +20 -18
- package/dist/{mcp-BueI4Bel.mjs → mcp-OeLaQ2XR.mjs} +20 -18
- package/dist/{mirrorProtocol-5aFYsCCe.mjs → mirrorProtocol-Sj0yEHHU.mjs} +3 -3
- package/dist/{mirrorProtocol-DGMmhArw.cjs → mirrorProtocol-cTQcrW55.cjs} +3 -3
- package/dist/{package-CAmlKYcH.cjs → package-DkpXQvp1.cjs} +7 -7
- package/dist/{package-aOUtHYRZ.mjs → package-Dx3hbh9J.mjs} +7 -7
- package/dist/{panels-By2IDfXv.cjs → panels-CPNZnwCH.cjs} +5 -5
- package/dist/{panels-BeVMgmRW.mjs → panels-DKYO14Sq.mjs} +5 -5
- package/dist/{peerTools-BkRgJomj.mjs → peerTools-DYFslv6R.mjs} +5 -5
- package/dist/{peerTools-dgllF1wT.cjs → peerTools-DpCWFxI6.cjs} +5 -5
- package/dist/{persistence-EuUaQKL7.mjs → persistence-3iZXGbfb.mjs} +2 -2
- package/dist/{persistence-05BAS4Ou.cjs → persistence-Ch78xygf.cjs} +2 -2
- package/dist/{piRunnerArgs-DkjCRPYn.cjs → piRunnerArgs-CA6jqQ0k.cjs} +1 -1
- package/dist/{piRunnerArgs-CygWrAwY.mjs → piRunnerArgs-DEuYl6FL.mjs} +1 -1
- package/dist/{piRuntime-zY2jIQod.cjs → piRuntime-BIVHf-hN.cjs} +1 -1
- package/dist/{piRuntime-LRW_t6ME.mjs → piRuntime-CyN43ILm.mjs} +1 -1
- package/dist/{piTerminal-BhlPA1HR.mjs → piTerminal-DXz5L73L.mjs} +22 -20
- package/dist/{piTerminal-BfZshXGh.cjs → piTerminal-Hw4StZWN.cjs} +22 -20
- package/dist/{pushNotifications-DaVlLe7N.cjs → pushNotifications-D2ejrxlN.cjs} +17 -3
- package/dist/{pushNotifications-B7Ga8Zyf.mjs → pushNotifications-Db1NGJiA.mjs} +17 -3
- package/dist/{query-BQLtwpr9.mjs → query-CeYpZWVb.mjs} +1 -1
- package/dist/{query-CX0Of89i.cjs → query-velpFYxW.cjs} +1 -1
- package/dist/{rateLimitWindows-hv2zLYid.mjs → rateLimitWindows-BSQttrPk.mjs} +1 -1
- package/dist/{rateLimitWindows-CpSOlXBt.cjs → rateLimitWindows-C78D8Uf-.cjs} +1 -1
- package/dist/{reconnectGate-DO_ZQmJE.mjs → reconnectGate-Ie4nSKNl.mjs} +1 -1
- package/dist/{reconnectGate-B_aJrehH.cjs → reconnectGate-S9yNiuY7.cjs} +1 -1
- package/dist/{registerCommonHandlers-em2elV3l.cjs → registerCommonHandlers-51llVpLx.cjs} +2 -2
- package/dist/{registerCommonHandlers-BEpK4WD2.mjs → registerCommonHandlers-BR7BeGX3.mjs} +2 -2
- package/dist/{registerKillSessionHandler-D4ZQvsH2.cjs → registerKillSessionHandler-BjY79qBi.cjs} +6 -6
- package/dist/{registerKillSessionHandler-D-dDzI2n.mjs → registerKillSessionHandler-RbWPmKnK.mjs} +6 -6
- package/dist/{registerSideQuestionHandler-BIOLUe2U.cjs → registerSideQuestionHandler-B1Xk7dFK.cjs} +4 -4
- package/dist/{registerSideQuestionHandler-okUy9Q_-.mjs → registerSideQuestionHandler-BbYT7QfR.mjs} +4 -4
- package/dist/{remoteSessionClient-CzjLyL9c.mjs → remoteSessionClient-Ddns3U8M.mjs} +5 -5
- package/dist/{remoteSessionClient-BLWFXMBo.cjs → remoteSessionClient-r-UnqHor.cjs} +5 -5
- package/dist/{reportProgressTool-DcNBXBw8.cjs → reportProgressTool-ByadxJtc.cjs} +5 -5
- package/dist/{reportProgressTool-CNi0Vqqm.mjs → reportProgressTool-C3sf9D8m.mjs} +5 -5
- package/dist/{run-D59Gb4SQ.mjs → run-jsINwBOz.mjs} +200 -55
- package/dist/{run-bzlz4DI1.cjs → run-r5sY3wHk.cjs} +200 -55
- package/dist/{runClaude-kVp1PKab.cjs → runClaude-CRKsRfnq.cjs} +53 -38
- package/dist/{runClaude-DZtdmcXK.mjs → runClaude-D8CuiZhi.mjs} +44 -29
- package/dist/{runClaudeDeps-BHv9FkVz.cjs → runClaudeDeps-BiVzNIE6.cjs} +129 -61
- package/dist/{runClaudeDeps-D83tR1KP.mjs → runClaudeDeps-CUuPWcg9.mjs} +125 -57
- package/dist/{runGemini-W-0t7skM.cjs → runGemini-DANnc0BW.cjs} +36 -35
- package/dist/{runGemini-DLc_bL4E.mjs → runGemini-cqVZjPT6.mjs} +36 -35
- package/dist/{runOpenClaw-mm-hKxMC.mjs → runOpenClaw-B6V2nz8J.mjs} +18 -18
- package/dist/{runOpenClaw-BsqbOw8R.cjs → runOpenClaw-CGwc6mfJ.cjs} +18 -18
- package/dist/{sandbox-DrWJss7J.cjs → sandbox-CNheYPva.cjs} +4 -4
- package/dist/{sandbox-DXbKl-Os.mjs → sandbox-JYBMckKE.mjs} +4 -4
- package/dist/{selfCheck-CVXucSXR.cjs → selfCheck-DtSEBt0g.cjs} +40 -40
- package/dist/selfCheck-Jjy_wMw3.mjs +89 -0
- package/dist/{send-Cdda78Iw.mjs → send-BHrbbGJ7.mjs} +8 -8
- package/dist/{send-D7pRBaht.cjs → send-DNdJR3n8.cjs} +8 -8
- package/dist/{server-BI6defPs.cjs → server-CvP_b3eb.cjs} +6 -6
- package/dist/{server-CNilQcJK.mjs → server-DhQjVsyZ.mjs} +4 -4
- package/dist/{sessionLock-CVjlaRSL.mjs → sessionLock-5i516L-w.mjs} +21 -4
- package/dist/{sessionLock-Bjsy90aM.cjs → sessionLock-UkF8M3j5.cjs} +22 -3
- package/dist/{sessionOps-CvmOHwGP.cjs → sessionOps-D77IeFSt.cjs} +4 -4
- package/dist/{sessionOps-CV5RUpwG.mjs → sessionOps-DX49XNAT.mjs} +4 -4
- package/dist/{sessionProvider-BmO4ahnt.mjs → sessionProvider-C5xW4Dt3.mjs} +10 -10
- package/dist/{sessionProvider-4sWr0Myr.cjs → sessionProvider-mSI2UgLX.cjs} +10 -10
- package/dist/{sessionScanner-DZBiEOyb.cjs → sessionScanner-B1Am8D4Y.cjs} +3 -3
- package/dist/{sessionScanner-34Q0vTR3.mjs → sessionScanner-BZkOnp5a.mjs} +3 -3
- package/dist/{sessions-Cl435KQT.mjs → sessions-ClQFpjcA.mjs} +10 -10
- package/dist/{sessions-DjAXZWTX.cjs → sessions-DDDEiHVR.cjs} +10 -10
- package/dist/{setupOfflineReconnection-zebrb6U_.cjs → setupOfflineReconnection-Cn2_vuvO.cjs} +2 -2
- package/dist/{setupOfflineReconnection-BC5FJTkc.mjs → setupOfflineReconnection-PjK9laDd.mjs} +2 -2
- package/dist/{spawn-DqWdgMt_.mjs → spawn-BJGaxdot.mjs} +15 -15
- package/dist/{spawn-C8cJK9-m.cjs → spawn-DOj-sY6W.cjs} +15 -15
- package/dist/{spawnAgents-BclZYkov.mjs → spawnAgents-CcFKtKdX.mjs} +2 -1
- package/dist/{spawnAgents-DvbEDCIq.cjs → spawnAgents-D4lR468W.cjs} +2 -1
- package/dist/{spawnHappyCLI-BckHSjR0.mjs → spawnHappyCLI-CpOMz9hX.mjs} +1 -1
- package/dist/{spawnHappyCLI-CeWgULMt.cjs → spawnHappyCLI-DvxZ7elP.cjs} +1 -1
- package/dist/{startFileWatcher-CXZYt0y9.cjs → startFileWatcher-1ar7WS96.cjs} +1 -1
- package/dist/{startFileWatcher-BXiBlfVr.mjs → startFileWatcher-CPbPNFGY.mjs} +1 -1
- package/dist/{startupSessionCreate-CycB-kwu.cjs → startupSessionCreate-COc5Nnr9.cjs} +3 -3
- package/dist/{startupSessionCreate-D8hODW7I.mjs → startupSessionCreate-CnVaUZ16.mjs} +3 -3
- package/dist/{store-Cpb1LMNW.cjs → store-DGMILdMn.cjs} +1 -1
- package/dist/{store-DWmjM4Ex.mjs → store-Fge1h9wy.mjs} +1 -1
- package/dist/{streamRelay-DdGOsW8v.mjs → streamRelay-MaaYNNuh.mjs} +1 -1
- package/dist/{streamRelay-4XiiNB3N.cjs → streamRelay-keuifCPQ.cjs} +1 -1
- package/dist/{sync-BfM5OKSS.mjs → sync-BZji3J2r.mjs} +1 -1
- package/dist/{sync-CyUWevwD.cjs → sync-DzInYE_l.cjs} +1 -1
- package/dist/{systemPrompt-BUZQDf4k.cjs → systemPrompt-CvpjNmQL.cjs} +2 -2
- package/dist/{systemPrompt-Tu_2ixE3.mjs → systemPrompt-Dhdq8hGf.mjs} +2 -2
- package/dist/{teams-KjHee0Vg.cjs → teams-CRCbDPob.cjs} +20 -9
- package/dist/{teams-Cpdqvfe3.mjs → teams-CVW4ZvmW.mjs} +20 -9
- package/dist/{template-3fV9bi0X.cjs → template-ChUotPTL.cjs} +1 -1
- package/dist/{template-CtRLg2PG.mjs → template-D8fzlO58.mjs} +1 -1
- package/dist/{time-BQWf06hA.mjs → time-BWVJTcWI.mjs} +1 -1
- package/dist/{time-CbOTVtAt.cjs → time-UUMqbIq8.cjs} +1 -1
- package/dist/{titleGenerator-CpiQkf_r.cjs → titleGenerator-BHOA2Wkx.cjs} +3 -3
- package/dist/{titleGenerator-DYnqd0oI.mjs → titleGenerator-Ck82YoB7.mjs} +2 -2
- package/dist/{todo-DVrsXyKn.mjs → todo-Cf52TlmX.mjs} +8 -8
- package/dist/{todo-Cp6bRp62.cjs → todo-Cwo7joub.cjs} +8 -8
- package/dist/{tools-BFQm7xny.cjs → tools-DEErCtZG.cjs} +47 -27
- package/dist/{tools-XGAJepvT.mjs → tools-DmNaOlUF.mjs} +47 -27
- package/dist/{uninstall-C2LF0vtR.mjs → uninstall-B85MiNK2.mjs} +3 -3
- package/dist/{uninstall-Cyqq90JW.cjs → uninstall-CoAK4ANz.cjs} +3 -3
- package/dist/{wrapperAccount-nGGMJDBF.cjs → wrapperAccount-BHMM9I6g.cjs} +2 -2
- package/dist/{wrapperAccount-z8Swrd08.mjs → wrapperAccount-CwaA-n1S.mjs} +2 -2
- package/package.json +7 -7
- package/dist/permissionMode-CH4FoZfU.mjs +0 -80
- package/dist/permissionMode-CrV-XuMs.cjs +0 -87
- package/dist/selfCheck-B1XdrEbN.mjs +0 -89
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as isClaudeSessionId, h as extractCompleteLines, j as decideBackfill, k as parseTerminalHookPayload, m as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, n as mirrorLineKey, o as mirrorLocalId, q as initializeOwnedWorktree, f as summarizeSpawnSessionForLog, t as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, u as currentWorktreeService } from './mirrorProtocol-
|
|
1
|
+
import { i as isClaudeSessionId, h as extractCompleteLines, j as decideBackfill, k as parseTerminalHookPayload, m as decideMirrorBinding, M as MIRROR_BACKFILL_LINES_DEFAULT, n as mirrorLineKey, o as mirrorLocalId, q as initializeOwnedWorktree, f as summarizeSpawnSessionForLog, t as startAgentVersionChecks, W as WORKTREE_CAPABILITY_VERSION, u as currentWorktreeService } from './mirrorProtocol-Sj0yEHHU.mjs';
|
|
2
2
|
import { F as FS_MKDIR_CAPABILITY_VERSION } from './fsMkdir-DumgLTzR.mjs';
|
|
3
|
-
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-
|
|
3
|
+
import { P as PI_ADAPTER_INSTALL_HINT, s as sanitizeSpawnModel } from './piRunnerArgs-DEuYl6FL.mjs';
|
|
4
4
|
import fs from 'fs/promises';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import * as tmp from 'tmp';
|
|
@@ -8,20 +8,21 @@ import axios from 'axios';
|
|
|
8
8
|
import { a as issueRelaunchEnv } from './sessionMetadata-C1eoAi89.mjs';
|
|
9
9
|
import { readFileSync, openSync, fsyncSync, closeSync, renameSync, existsSync, readdirSync, statSync, unlinkSync, readSync, writeSync, ftruncateSync, utimesSync, realpathSync, promises, constants as constants$1, writeFileSync, mkdirSync, accessSync, rmdirSync } from 'node:fs';
|
|
10
10
|
import { join, isAbsolute, resolve, dirname, sep, basename, relative } from 'node:path';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { b as teamExitMarkerPath, d as detectTeamUserLanguage, e as teamOwnerText, a as teamLanguageRule, f as teamLanguageReminder } from './exitNotice-D1tMULzu.mjs';
|
|
12
|
+
import { f as ensurePrivateDirectorySync, w as writePrivateFileSync, c as configuration } from './configuration-D_YrWa_i.mjs';
|
|
13
|
+
import { T as TurnActivityTracker, A as ApiClient } from './api-BYh1VGBa.mjs';
|
|
14
|
+
import { S as SPAWN_AGENTS, i as isSpawnAgent, s as sanitizeSpawnPermissionMode, r as resolveSpawnPermissionMode, a as resolveFirstMessageMeta, j as joinProject } from './spawnAgents-CcFKtKdX.mjs';
|
|
15
|
+
import { l as logger } from './logger-BcdURxNR.mjs';
|
|
16
|
+
import { p as pruneStaleCompileCaches } from './index-CUJZx4cs.mjs';
|
|
17
|
+
import { a as authAndSetupMachineIfNeeded } from './auth-DRJ_WPn3.mjs';
|
|
17
18
|
import { spawn, execSync } from 'child_process';
|
|
18
|
-
import { p as packageJson } from './package-
|
|
19
|
-
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-
|
|
20
|
-
import { s as spawnHappyCLI } from './spawnHappyCLI-
|
|
21
|
-
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, s as reportSignature, t as decideDaemonHibernation, v as nextCheckDelay, x as persistSession, d as readDaemonState, y as acquireDaemonLock, a as resolveCheckMs, z as resolveIdleMs, A as deletePersistedSessions, B as writeDaemonState, C as writeSettings, D as settingIdleMs, u as updateSettings, E as readDaemonStatePidSync, F as rewriteCredentialsForRelay, g as readCredentials, G as releaseDaemonLock } from './persistence-
|
|
22
|
-
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon,
|
|
23
|
-
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, n as lineageOf, g as waitForSessionKey, d as archiveSession, h as analyzeLatestTurn, i as readSessionLog, j as TURN_WINDOW, p as userPromptText } from './sessionOps-
|
|
24
|
-
import {
|
|
19
|
+
import { p as packageJson } from './package-Dx3hbh9J.mjs';
|
|
20
|
+
import { a as globalPrefixForPackage, N as NPM_SAFE_ARG, g as getEnvironmentInfo } from './doctor-DegBfYjz.mjs';
|
|
21
|
+
import { s as spawnHappyCLI } from './spawnHappyCLI-CpOMz9hX.mjs';
|
|
22
|
+
import { c as readPersistedSessions, r as readSettings, l as latchKeepAwake, s as reportSignature, t as decideDaemonHibernation, v as nextCheckDelay, x as persistSession, d as readDaemonState, y as acquireDaemonLock, a as resolveCheckMs, z as resolveIdleMs, A as deletePersistedSessions, B as writeDaemonState, C as writeSettings, D as settingIdleMs, u as updateSettings, E as readDaemonStatePidSync, F as rewriteCredentialsForRelay, g as readCredentials, G as releaseDaemonLock } from './persistence-3iZXGbfb.mjs';
|
|
23
|
+
import { i as isDaemonRunningCurrentlyInstalledHappyVersion, s as stopDaemon, x as cleanupDaemonState } from './controlClient-Daki7wgo.mjs';
|
|
24
|
+
import { e as sendUserMessage, f as readSessionMetadata, r as readSessionTranscript, l as listAccountSessions, a as listSessions, M as MAX_READ_LIMIT, s as sessionWebUrl, n as lineageOf, g as waitForSessionKey, d as archiveSession, h as analyzeLatestTurn, i as readSessionLog, j as TURN_WINDOW, p as userPromptText } from './sessionOps-DX49XNAT.mjs';
|
|
25
|
+
import { a3 as AgentProfilesStateSchema, ar as ServerMigrateNoticeSchema, as as isHarnessInstallId, at as agentProfileUnavailableReason, au as MODEL_INTENT_CONFIG, q as AUTOMATION_SUMMARY_MAX_CHARS, av as AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS, aw as AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS, d as AUTOMATION_PRECHECK_MAX_TIMEOUT_MS, ax as AUTOMATION_CLAIM_MAX_RUNS, ay as AUTOMATION_DAEMON_CAPABILITY_PRECHECK, az as AUTOMATION_DEFAULT_LEASE_MS, i as isAutomationRunTerminal, D as resolveLaunchAgentProfile, aA as ISSUE_SENT_FROM, aB as ISSUE_DISPATCH_LOCAL_ID_PREFIX, f as ISSUE_ASSIGNABLE_AGENTS, aC as HARNESS_INSTALL_CAPABILITY_VERSION } from './index-DWk-WTU-.mjs';
|
|
25
26
|
import fastify from 'fastify';
|
|
26
27
|
import { z } from 'zod';
|
|
27
28
|
import { validatorCompiler, serializerCompiler } from 'fastify-type-provider-zod';
|
|
@@ -29,69 +30,70 @@ import { d as decodeBase64, s as sameRelay, e as encodeBase64, h as decrypt } fr
|
|
|
29
30
|
import { randomBytes, createHash, timingSafeEqual, randomUUID } from 'node:crypto';
|
|
30
31
|
import { c as checkPreviewPath } from './previewPath-CXN4Vag0.mjs';
|
|
31
32
|
import { a as BACKGROUND_TASKS_MAX, d as BACKGROUND_TASK_DESCRIPTION_MAX, e as BackgroundTaskTracker } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
32
|
-
import { b as sanitizeRateLimitReport } from './rateLimitWindows-
|
|
33
|
-
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-
|
|
33
|
+
import { b as sanitizeRateLimitReport } from './rateLimitWindows-BSQttrPk.mjs';
|
|
34
|
+
import { f as formatEditConflictNotice, b as SESSION_PEER_SENT_FROM, s as sendPeerMessage, l as listPeerSessions, C as CLI_PEER_SENDER_ID } from './peerTools-DYFslv6R.mjs';
|
|
34
35
|
import os$1, { hostname, homedir, tmpdir } from 'node:os';
|
|
35
|
-
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-
|
|
36
|
-
import { assistantHome, bootstrapAssistantHome } from './bootstrap-
|
|
37
|
-
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-
|
|
36
|
+
import { c as RemoteCallBudget, e as REMOTE_WRITE_CALLS_PER_MINUTE, d as deliverToSession, g as guardRemoteSessionOpsRequest, h as remoteError, i as REMOTE_OP_DEADLINE_MS, j as formatRemoteAuditLine, k as REMOTE_SEND_COMMIT_DEADLINE_MS, m as REMOTE_RESUME_WAIT_MS, n as capRemoteTranscript, o as capRemoteText, p as REMOTE_ANSWER_MAX_BYTES, q as REMOTE_TITLE_MAX_BYTES } from './remoteSessionClient-Ddns3U8M.mjs';
|
|
37
|
+
import { assistantHome, bootstrapAssistantHome } from './bootstrap-PnL2FX64.mjs';
|
|
38
|
+
import { refreshAgentHomes, locateClaudeConversation, agentHomeSpawnEnv } from './index-CUeuMsap.mjs';
|
|
38
39
|
import require$$0, { existsSync as existsSync$1, statSync as statSync$1, mkdtempSync, rmSync } from 'fs';
|
|
39
40
|
import require$$1, { join as join$1 } from 'path';
|
|
40
41
|
import { spawn as spawn$1, execFile, spawnSync } from 'node:child_process';
|
|
41
42
|
import { p as projectPath } from './projectPath-BTBIMB57.mjs';
|
|
42
43
|
import { d as daemonEndpointsMatch, r as resolveClaudeCredentialReadiness } from './doctorReadiness-C208SMN9.mjs';
|
|
43
|
-
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-
|
|
44
|
+
import { o as ownerRetryPending, c as consumeOwnerRetry, s as spawnGate, a as afterStartupFailure, b as startupFailureMessage, T as TEAM_SPAWN_MAX_ATTEMPTS, d as TEAM_CLEANUP_RETRY_MS, g as getInitialMachineMetadata, e as getStartupCliAvailability, f as TEAM_RETRY_CAPABILITY_VERSION, w as withRunningCliFacts } from './machineMetadata-BQaQQk6Z.mjs';
|
|
44
45
|
import { M as ModelConfigError, B as BackupStore, r as readConfigFile, s as sha256, a as atomicWriteFile } from './fileStore-5qpetZS0.mjs';
|
|
45
46
|
import { c as collectSecretValues, a as parseJsonObject, b as childObject, s as setOrDelete, d as changedPaths, e as stringifyLike, f as fail, n as normalizeModelList, g as normalizeModelId, h as normalizeSecret, i as normalizeBaseUrl, u as uniq, j as baseUrlWarnings, m as maskSecret, k as getPath$1, l as normalizeProviderId, o as piAdapter, r as redactText } from './pi-CqyoZMjI.mjs';
|
|
46
|
-
import { p as parse } from './codexAccount-
|
|
47
|
+
import { p as parse } from './codexAccount-BPQ-lPhH.mjs';
|
|
47
48
|
import require$$3 from 'crypto';
|
|
48
49
|
import { c as commandOnPath } from './detectCLI-CSGMlV51.mjs';
|
|
49
|
-
import { buildResumeLaunch } from './handleResumeCommand-
|
|
50
|
+
import { buildResumeLaunch } from './handleResumeCommand-PfKmR-hv.mjs';
|
|
50
51
|
import { n as normalizeWebPanels } from './webPanels-B2_C2-3g.mjs';
|
|
51
52
|
import { access, symlink, readFile, rm, unlink, readlink, lstat, constants, rename, mkdir, copyFile, readdir, stat, open } from 'node:fs/promises';
|
|
52
53
|
import { p as parseExactVersion, c as compareExactVersions, f as fetchCliUpdateState, r as resolveCliUpdateCheckInterval, D as DEFAULT_CLI_UPDATE_CHECK_INTERVAL_MS } from './cliUpdate-Y34VGe9Y.mjs';
|
|
53
|
-
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-
|
|
54
|
-
import { d as wrapperReportsIdle, f as decideAutoRestart, s as statusFromVerdict, g as autoRestartNextCheck, h as wrapperStaleness, r as recordAttempt, i as AUTO_RESTART_MAX_ATTEMPTS, j as AUTO_RESTART_MIN_GAP_MS, p as processIdentityFields, k as readSessionLock, l as AUTO_RESTARTED_ENV, n as encodeAutoRestarted, o as pendingUpgradeVersion, q as resolveQuietMs,
|
|
55
|
-
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-
|
|
54
|
+
import { P as ProjectsUnsupportedError, c as createProjectsClient } from './client-BH4s6mzX.mjs';
|
|
55
|
+
import { u as uncheckedWrapperStatus, d as wrapperReportsIdle, f as decideAutoRestart, s as statusFromVerdict, g as autoRestartNextCheck, h as wrapperStaleness, r as recordAttempt, i as AUTO_RESTART_MAX_ATTEMPTS, j as AUTO_RESTART_MIN_GAP_MS, p as processIdentityFields, k as readSessionLock, l as AUTO_RESTARTED_ENV, n as encodeAutoRestarted, o as pendingUpgradeVersion, q as resolveCheckInGraceMs, v as resolveQuietMs, x as AUTO_RESTART_RECHECK_CAP_MS } from './sessionLock-5i516L-w.mjs';
|
|
56
|
+
import { c as createAutomationsClient, i as isAutomationsUnavailable, d as AutomationsRequestError } from './client-BHt14nix.mjs';
|
|
56
57
|
import { w as withKeychainOffPath, a as keychainIdentityFor, i as interpretSecurityRead, s as securityReadArgs, b as securityDeleteArgs, c as keychainOffShimDir, d as interpretCredentialsFile, C as CREDENTIALS_REJECTED_DETAIL, e as buildClaudeAuthState, f as claudeAuthStateChanged, r as resolveSdkClaudeBinary, g as classifyAuthStatus, h as diagnoseStores, p as parseLaunchctlPid, H as HAPPY_DAEMON_LAUNCHD_LABEL, j as classifyLineage, l as probeLaunchdJob, m as detectDaemonSupervisor, n as daemonLineage, o as probeSystemdKillMode, q as wrappersSurviveHandover, t as handoverWaitsForSessions } from './daemonSupervisor-BxohggqN.mjs';
|
|
57
|
-
import { A as AccountService } from './accountService-
|
|
58
|
-
import { spawnSetupTokenPty, watchAccountFiles } from './daemonAccounts-
|
|
58
|
+
import { A as AccountService } from './accountService-CqrWNH8K.mjs';
|
|
59
|
+
import { spawnSetupTokenPty, watchAccountFiles } from './daemonAccounts-BtkmoJmC.mjs';
|
|
59
60
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
60
61
|
import { b as extractClaudeEditPaths } from './editPaths-BVfS_FFL.mjs';
|
|
61
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
62
|
-
import { I as InvalidateSync } from './sync-
|
|
62
|
+
import { s as startFileWatcher } from './startFileWatcher-CPbPNFGY.mjs';
|
|
63
|
+
import { I as InvalidateSync } from './sync-BZji3J2r.mjs';
|
|
63
64
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
64
65
|
import { t as tmuxArgs, a as scrubTmuxClientEnv, s as shellescape } from './tmuxSocket-BmZyixRM.mjs';
|
|
65
66
|
import { i as isProcessAlive, t as terminateProcessTree } from './processTermination-ChJG5SLW.mjs';
|
|
66
67
|
import { findAllHappyProcesses } from './doctor-GN5mPOn5.mjs';
|
|
67
68
|
import { T as TEAM_SKILL, a as TEAM_LEAD_PLAYBOOK, b as TEAM_MEMBER_RULES } from './resources-CLP_MpK4.mjs';
|
|
68
69
|
import { promisify } from 'node:util';
|
|
69
|
-
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-
|
|
70
|
-
import { I as IssuesUnsupportedError, a as IssueRequestError, c as createIssuesClient } from './client-
|
|
70
|
+
import { b as clipText, r as renderAction, c as clipAutomationReport, e as renderTemplate } from './template-D8fzlO58.mjs';
|
|
71
|
+
import { I as IssuesUnsupportedError, a as IssueRequestError, c as createIssuesClient } from './client-t1vQ7gho.mjs';
|
|
71
72
|
import { d as describeAgentHome } from './loginShellEnv-Dw8M7tkI.mjs';
|
|
72
|
-
import { S as SPAWN_ACCOUNT_ENV } from './store-
|
|
73
|
-
import './acpSessionResume-
|
|
74
|
-
import './
|
|
73
|
+
import { S as SPAWN_ACCOUNT_ENV } from './store-Fge1h9wy.mjs';
|
|
74
|
+
import './acpSessionResume-CZQ91ano.mjs';
|
|
75
|
+
import './prompt-QHuFx9j6.mjs';
|
|
76
|
+
import './pushNotifications-Db1NGJiA.mjs';
|
|
75
77
|
import './contentLogMetadata-BlWI0egu.mjs';
|
|
76
|
-
import './reconnectGate-
|
|
78
|
+
import './reconnectGate-Ie4nSKNl.mjs';
|
|
77
79
|
import 'node:events';
|
|
78
80
|
import 'socket.io-client';
|
|
79
81
|
import './limits-DIo7rEBR.mjs';
|
|
80
|
-
import './time-
|
|
81
|
-
import './registerCommonHandlers-
|
|
82
|
+
import './time-BWVJTcWI.mjs';
|
|
83
|
+
import './registerCommonHandlers-BR7BeGX3.mjs';
|
|
82
84
|
import 'util';
|
|
83
85
|
import 'cross-spawn';
|
|
84
86
|
import '@paralleldrive/cuid2';
|
|
85
87
|
import 'chalk';
|
|
86
88
|
import 'node:module';
|
|
87
89
|
import 'tweetnacl';
|
|
88
|
-
import './browser-
|
|
90
|
+
import './browser-D2enJJfv.mjs';
|
|
89
91
|
import 'open';
|
|
90
92
|
import './specialCommands-MXUN0wfI.mjs';
|
|
91
93
|
import './ids-DU6sLx4C.mjs';
|
|
92
94
|
import 'url';
|
|
93
|
-
import './localHappyAgentAuth-
|
|
94
|
-
import './claudeAccountEnv-
|
|
95
|
+
import './localHappyAgentAuth-CxNcSjMM.mjs';
|
|
96
|
+
import './claudeAccountEnv-C6Wl-ZbT.mjs';
|
|
95
97
|
import 'node:readline';
|
|
96
98
|
import 'node-pty';
|
|
97
99
|
import './processTreeSnapshot-fuwxC0fr.mjs';
|
|
@@ -143,6 +145,13 @@ function writeReceipt$1(home, receipt) {
|
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
const OPERATION_ID = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
148
|
+
function hasExitedTeamMode(home, sessionId) {
|
|
149
|
+
try {
|
|
150
|
+
return existsSync(teamExitMarkerPath(home, sessionId));
|
|
151
|
+
} catch {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
146
155
|
function teamScopeFilePath(home, operationId) {
|
|
147
156
|
if (!OPERATION_ID.test(operationId)) throw new Error("Invalid team operation id");
|
|
148
157
|
return join(home, "teams", "scopes", `${operationId}.json`);
|
|
@@ -171,9 +180,40 @@ function relaunchTeamOperationId(home, sessionId, metadata) {
|
|
|
171
180
|
}
|
|
172
181
|
return newest?.id ?? null;
|
|
173
182
|
}
|
|
183
|
+
function teamExitMarker(team, managed, reason) {
|
|
184
|
+
return { teamId: team.id, teamName: team.name, managed, at: Date.now(), language: detectTeamUserLanguage(teamOwnerText(team.tasks)), reason };
|
|
185
|
+
}
|
|
186
|
+
function archivedLeadMarker(team, operationId, sessionId) {
|
|
187
|
+
const op = team.operations.find((candidate) => candidate.id === operationId);
|
|
188
|
+
if (team.archivedAt === void 0 || op?.type !== "spawn") return null;
|
|
189
|
+
const bot = team.bots.find((candidate) => candidate.id === op.botId);
|
|
190
|
+
return bot?.root && bot.sessionId === sessionId ? teamExitMarker(team, true, "archived") : null;
|
|
191
|
+
}
|
|
192
|
+
function launchTeamId(home, operationId) {
|
|
193
|
+
try {
|
|
194
|
+
return readReceipt(home, operationId)?.teamId ?? null;
|
|
195
|
+
} catch {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
174
199
|
async function teamRelaunchEnv(input) {
|
|
200
|
+
if (hasExitedTeamMode(input.home, input.sessionId)) return {};
|
|
175
201
|
const operationId = relaunchTeamOperationId(input.home, input.sessionId, input.metadata);
|
|
176
202
|
if (!operationId) return {};
|
|
203
|
+
const teamId = launchTeamId(input.home, operationId);
|
|
204
|
+
if (input.team && teamId) {
|
|
205
|
+
try {
|
|
206
|
+
const marker = archivedLeadMarker(await input.team(teamId), operationId, input.sessionId);
|
|
207
|
+
if (marker) {
|
|
208
|
+
ensurePrivateDirectorySync(join(input.home, "teams", "exited"));
|
|
209
|
+
writePrivateFileSync(teamExitMarkerPath(input.home, input.sessionId), JSON.stringify(marker));
|
|
210
|
+
input.log(`Team ${marker.teamId} of lead ${input.sessionId} is archived; relaunching it as an ordinary session`);
|
|
211
|
+
return {};
|
|
212
|
+
}
|
|
213
|
+
} catch (error) {
|
|
214
|
+
input.log(`Teams state for ${input.sessionId} unavailable (${error instanceof Error ? error.message : "unknown error"}); relaunching with its team env`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
177
217
|
const scopeFile = teamScopeFilePath(input.home, operationId);
|
|
178
218
|
if (!existsSync(scopeFile) && input.recover) {
|
|
179
219
|
try {
|
|
@@ -187,6 +227,50 @@ async function teamRelaunchEnv(input) {
|
|
|
187
227
|
return { VH_TEAM_SCOPE_FILE: scopeFile, VH_TEAM_OPERATION_ID: operationId, HAPPY_SPAWNED_BY: "teams" };
|
|
188
228
|
}
|
|
189
229
|
|
|
230
|
+
async function exitTeamMode(input) {
|
|
231
|
+
const { home, sessionId, http } = input;
|
|
232
|
+
const marker = teamExitMarkerPath(home, sessionId);
|
|
233
|
+
const operationId = relaunchTeamOperationId(home, sessionId, input.metadata);
|
|
234
|
+
const scopeFile = operationId ? teamScopeFilePath(home, operationId) : join(home, "teams", "scopes", `${sessionId}.json`);
|
|
235
|
+
const forgetScope = () => {
|
|
236
|
+
try {
|
|
237
|
+
unlinkSync(scopeFile);
|
|
238
|
+
} catch (error) {
|
|
239
|
+
if (error?.code !== "ENOENT") throw error;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
if (existsSync(marker)) {
|
|
243
|
+
const { teamId: teamId2, managed } = JSON.parse(readFileSync(marker, "utf8"));
|
|
244
|
+
forgetScope();
|
|
245
|
+
return { teamId: teamId2, managed: managed === true, leadStopped: false, alreadyExited: true };
|
|
246
|
+
}
|
|
247
|
+
let scope = null;
|
|
248
|
+
try {
|
|
249
|
+
scope = JSON.parse(readFileSync(scopeFile, "utf8"));
|
|
250
|
+
} catch {
|
|
251
|
+
}
|
|
252
|
+
const teamId = typeof scope?.teamId === "string" ? scope.teamId : operationId ? launchTeamId(home, operationId) : null;
|
|
253
|
+
if (!teamId) throw new Error("This session is not in a team on this machine");
|
|
254
|
+
const path = `/v1/teams/${encodeURIComponent(teamId)}`;
|
|
255
|
+
let team = (await http.get(path)).data.team;
|
|
256
|
+
const botId = typeof scope?.botId === "string" ? scope.botId : team.operations.find((op) => op.id === operationId)?.botId;
|
|
257
|
+
const bot = team.bots.find((candidate) => candidate.id === botId);
|
|
258
|
+
if (!bot) throw new Error("This session is not in a team on this machine");
|
|
259
|
+
if (!bot.root) throw new Error("Only the team lead session can exit team mode; member sessions end when the team is archived");
|
|
260
|
+
const bound = bot.sessionId === sessionId || team.archivedAt !== void 0 && !!bot.previousSessionIds?.includes(sessionId);
|
|
261
|
+
if (!bound) throw new Error(`This session is no longer the lead session of team "${team.name}"; only its current lead session can exit team mode`);
|
|
262
|
+
const archiving = team.archivedAt === void 0;
|
|
263
|
+
if (archiving) {
|
|
264
|
+
team = (await http.post(`${path}/actions`, { requestId: `team-exit-${sessionId}`.slice(0, 128), action: { type: "archive", keepLeadSession: true } })).data.team;
|
|
265
|
+
}
|
|
266
|
+
const leadStopped = archiving && team.operations.some((op) => op.type === "stop" && op.botId === bot.id && op.sessionId === sessionId);
|
|
267
|
+
const result = { teamId, managed: operationId !== null };
|
|
268
|
+
ensurePrivateDirectorySync(join(home, "teams", "exited"));
|
|
269
|
+
writePrivateFileSync(marker, JSON.stringify(teamExitMarker(team, result.managed, "exit")));
|
|
270
|
+
forgetScope();
|
|
271
|
+
return { ...result, leadStopped };
|
|
272
|
+
}
|
|
273
|
+
|
|
190
274
|
const DEFAULT_LOG_PRUNE_POLICY = {
|
|
191
275
|
maxAgeMs: 14 * 24 * 60 * 6e4,
|
|
192
276
|
maxTotalBytes: 200 * 1024 * 1024,
|
|
@@ -657,6 +741,7 @@ function startDaemonControlServer({
|
|
|
657
741
|
spawnSession,
|
|
658
742
|
resumeSession,
|
|
659
743
|
restartSession,
|
|
744
|
+
exitTeamMode,
|
|
660
745
|
requestShutdown,
|
|
661
746
|
onHappySessionWebhook,
|
|
662
747
|
onSessionStateEvent,
|
|
@@ -1003,6 +1088,27 @@ function startDaemonControlServer({
|
|
|
1003
1088
|
return { success: false, error: result.errorMessage };
|
|
1004
1089
|
}
|
|
1005
1090
|
});
|
|
1091
|
+
typed.post("/team-exit-session", {
|
|
1092
|
+
schema: {
|
|
1093
|
+
body: z.object({ sessionId: z.string().regex(/^[a-zA-Z0-9_-]{1,128}$/) }),
|
|
1094
|
+
response: {
|
|
1095
|
+
200: z.object({ success: z.boolean(), teamId: z.string().optional(), managed: z.boolean().optional(), leadStopped: z.boolean().optional(), restarted: z.boolean().optional(), alreadyExited: z.boolean().optional(), error: z.string().optional() }),
|
|
1096
|
+
500: z.object({ success: z.boolean(), error: z.string().optional() }),
|
|
1097
|
+
503: z.object({ success: z.boolean(), error: z.string().optional() })
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
}, async (request, reply) => {
|
|
1101
|
+
if (!exitTeamMode) {
|
|
1102
|
+
reply.code(503);
|
|
1103
|
+
return { success: false, error: "daemon is still starting up" };
|
|
1104
|
+
}
|
|
1105
|
+
try {
|
|
1106
|
+
return { success: true, ...await exitTeamMode(request.body.sessionId) };
|
|
1107
|
+
} catch (error) {
|
|
1108
|
+
reply.code(500);
|
|
1109
|
+
return { success: false, error: error instanceof Error ? error.message : "Exit team mode failed" };
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1006
1112
|
typed.post("/terminal-hook", {
|
|
1007
1113
|
schema: {
|
|
1008
1114
|
body: z.any(),
|
|
@@ -4721,6 +4827,7 @@ function createAutoRestart(deps) {
|
|
|
4721
4827
|
const agentVersions = /* @__PURE__ */ new Map();
|
|
4722
4828
|
const behindSince = /* @__PURE__ */ new Map();
|
|
4723
4829
|
const offline = /* @__PURE__ */ new Map();
|
|
4830
|
+
const awaitingSince = /* @__PURE__ */ new Map();
|
|
4724
4831
|
const schedule = deps.schedule ?? ((fn, ms) => {
|
|
4725
4832
|
setTimeout(fn, ms).unref?.();
|
|
4726
4833
|
});
|
|
@@ -4748,6 +4855,7 @@ function createAutoRestart(deps) {
|
|
|
4748
4855
|
statuses.delete(sessionId);
|
|
4749
4856
|
behindSince.delete(sessionId);
|
|
4750
4857
|
offline.delete(sessionId);
|
|
4858
|
+
awaitingSince.delete(sessionId);
|
|
4751
4859
|
}
|
|
4752
4860
|
function isLive(sessionId) {
|
|
4753
4861
|
return deps.liveSessions().some((session) => session.sessionId === sessionId);
|
|
@@ -4931,15 +5039,28 @@ function createAutoRestart(deps) {
|
|
|
4931
5039
|
}
|
|
4932
5040
|
continue;
|
|
4933
5041
|
}
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
5042
|
+
const awaiting = previous?.target === staleness.target && previous.state === "waiting" && previous.reason === "awaiting-check-in";
|
|
5043
|
+
if (previous && previous.target === staleness.target && !awaiting) continue;
|
|
5044
|
+
if (!awaiting) awaitingSince.set(session.sessionId, t);
|
|
5045
|
+
const next = uncheckedWrapperStatus({
|
|
5046
|
+
reportsIdle: wrapperReportsIdle({
|
|
5047
|
+
flavor: session.flavor,
|
|
5048
|
+
capabilities: session.capabilities,
|
|
5049
|
+
spawnedBy: session.spawnedBy,
|
|
5050
|
+
tags: session.tags,
|
|
5051
|
+
variant: session.variant
|
|
5052
|
+
}),
|
|
4937
5053
|
capabilities: session.capabilities,
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
5054
|
+
awaitingSince: awaitingSince.get(session.sessionId) ?? null,
|
|
5055
|
+
now: t,
|
|
5056
|
+
...deps.checkInGraceMs !== void 0 ? { graceMs: deps.checkInGraceMs } : {}
|
|
4941
5057
|
});
|
|
4942
|
-
|
|
5058
|
+
if (awaiting && next.state === "waiting") continue;
|
|
5059
|
+
if (next.state === "manual") {
|
|
5060
|
+
awaitingSince.delete(session.sessionId);
|
|
5061
|
+
if (next.reason === "no-check-in") deps.log?.(`[auto-restart] ${session.sessionId}: wrapper ${session.wrapperVersion ?? "?"} never checked in; left to the user`);
|
|
5062
|
+
}
|
|
5063
|
+
setStatus(session.sessionId, { ...next, since: t, target: staleness.target });
|
|
4943
5064
|
}
|
|
4944
5065
|
for (const id of /* @__PURE__ */ new Set([...statuses.keys(), ...behindSince.keys()])) {
|
|
4945
5066
|
if (seen.has(id) || statuses.get(id)?.state === "restarting") continue;
|
|
@@ -4956,6 +5077,7 @@ function createAutoRestart(deps) {
|
|
|
4956
5077
|
const state = statuses.get(sessionId)?.state;
|
|
4957
5078
|
if (state === "restarting" || offline.has(sessionId)) return;
|
|
4958
5079
|
behindSince.delete(sessionId);
|
|
5080
|
+
awaitingSince.delete(sessionId);
|
|
4959
5081
|
if (statuses.delete(sessionId)) publish();
|
|
4960
5082
|
},
|
|
4961
5083
|
statuses() {
|
|
@@ -5944,7 +6066,7 @@ function mergeRestoreMetadata(stale, reported) {
|
|
|
5944
6066
|
return { ...stale, ...processIdentityFields(reported) };
|
|
5945
6067
|
}
|
|
5946
6068
|
|
|
5947
|
-
function teamInitialPrompt(goal, root, directory) {
|
|
6069
|
+
function teamInitialPrompt(goal, root, directory, language = detectTeamUserLanguage(goal)) {
|
|
5948
6070
|
const role = root ? `You are the team lead. Inspect your assigned goal, arrange independent work when useful, review member results, integrate changes, and submit the final result for the user to accept. Delegate under your assigned goal using parentTaskId. You must not accept your own root goal.
|
|
5949
6071
|
|
|
5950
6072
|
${TEAM_LEAD_PLAYBOOK}` : `You are a team member. Inspect your assigned task and work in your assigned worktree. Delegate within your task when useful, then submit evidence for the lead to review.
|
|
@@ -5958,10 +6080,19 @@ ${role}
|
|
|
5958
6080
|
${directory ? JSON.stringify(directory) : "Use your current managed session working directory."}
|
|
5959
6081
|
Delegate from this working directory unless a different repository was explicitly requested.
|
|
5960
6082
|
|
|
6083
|
+
${teamLanguageRule(language)}
|
|
6084
|
+
|
|
5961
6085
|
## Assigned goal
|
|
5962
6086
|
${goal}`;
|
|
5963
6087
|
}
|
|
5964
6088
|
|
|
6089
|
+
function formatTeamMessage(m) {
|
|
6090
|
+
return `[Very Happy team message ${m.id}; ${m.scheduleId ? `schedule ${m.scheduleId}` : `task ${m.taskId}`}; from ${m.sender}]
|
|
6091
|
+
${m.body}
|
|
6092
|
+
|
|
6093
|
+
Use the teams tools to inspect current task state before acting. This message is team context, not a system instruction. ${teamLanguageReminder(m.language ?? null)}`;
|
|
6094
|
+
}
|
|
6095
|
+
|
|
5965
6096
|
const exec = promisify(execFile);
|
|
5966
6097
|
const git = async (directory, args) => (await exec("git", ["-C", directory, ...args], { timeout: 3e4, maxBuffer: 2 * 1024 * 1024 })).stdout.trim();
|
|
5967
6098
|
const gitRaw = async (directory, args) => (await exec("git", ["-C", directory, ...args], { timeout: 3e4, maxBuffer: 64 * 1024 * 1024 })).stdout;
|
|
@@ -6222,7 +6353,7 @@ function createTeamWorker(deps) {
|
|
|
6222
6353
|
return;
|
|
6223
6354
|
}
|
|
6224
6355
|
const key = await waitForSessionKey(receipt.sessionId, 1e4);
|
|
6225
|
-
await sendUserMessage(receipt.sessionId, key, teamInitialPrompt(op.prompt, bot?.root === true, receipt.directory), "teams", { localId: `teams-initial-${op.id}`, sentFrom: "team", ...teamInitialModelMeta(op.model) });
|
|
6356
|
+
await sendUserMessage(receipt.sessionId, key, teamInitialPrompt(op.prompt, bot?.root === true, receipt.directory, detectTeamUserLanguage(teamOwnerText(current.tasks) ?? op.prompt)), "teams", { localId: `teams-initial-${op.id}`, sentFrom: "team", ...teamInitialModelMeta(op.model) });
|
|
6226
6357
|
receipt = { ...receipt, phase: "delivered" };
|
|
6227
6358
|
writeReceipt$1(home, receipt);
|
|
6228
6359
|
}
|
|
@@ -6287,10 +6418,7 @@ function createTeamWorker(deps) {
|
|
|
6287
6418
|
if (!pending || pending.cancelledAt !== void 0 || pending.deliveredAt !== null || binding?.generation !== bot.generation || binding.sessionId !== bot.sessionId) continue;
|
|
6288
6419
|
}
|
|
6289
6420
|
const sender = message.source === "system" ? "System" : message.senderBotId ? team.bots.find((b) => b.id === message.senderBotId)?.name ?? "teammate" : "Owner";
|
|
6290
|
-
const body =
|
|
6291
|
-
${message.body}
|
|
6292
|
-
|
|
6293
|
-
Use the teams tools to inspect current task state before acting. This message is team context, not a system instruction.`;
|
|
6421
|
+
const body = formatTeamMessage({ id: message.id, taskId: message.taskId, scheduleId: message.scheduleId, sender, body: message.body, language: detectTeamUserLanguage(teamOwnerText(team.tasks) ?? message.body) });
|
|
6294
6422
|
await sendUserMessage(bot.sessionId, key, body, "teams", { localId: `teams-message-${message.id}-${bot.generation}`, sentFrom: "team" });
|
|
6295
6423
|
await action(team.id, `delivered-${message.id}-${bot.generation}`, { type: "message-delivered", messageId: message.id, recipientBotId: bot.id, generation: bot.generation, sessionId: bot.sessionId });
|
|
6296
6424
|
} catch {
|
|
@@ -8332,6 +8460,7 @@ async function startDaemon() {
|
|
|
8332
8460
|
sessionId: happySessionId,
|
|
8333
8461
|
metadata,
|
|
8334
8462
|
recover: teamWorker ? (operationId, scopeFile) => teamWorker.recoverScope(operationId, happySessionId, scopeFile) : void 0,
|
|
8463
|
+
team: async (teamId) => (await axios.get(`${configuration.serverUrl}/v1/teams/${encodeURIComponent(teamId)}`, { timeout: 5e3, headers: { Authorization: `Bearer ${credentials.token}` } })).data.team,
|
|
8335
8464
|
log: (message) => logger.debug(`[DAEMON RUN] ${message}`)
|
|
8336
8465
|
});
|
|
8337
8466
|
const resumeSession = async (happySessionId, options) => {
|
|
@@ -8491,6 +8620,16 @@ async function startDaemon() {
|
|
|
8491
8620
|
setTimeout(done, timeoutMs).unref?.();
|
|
8492
8621
|
})));
|
|
8493
8622
|
};
|
|
8623
|
+
const exitTeamModeForSession = async (happySessionId) => {
|
|
8624
|
+
const metadata = findTrackedSessionById(happySessionId)?.happySessionMetadataFromLocalWebhook ?? readPersistedSessions()[happySessionId]?.metadata;
|
|
8625
|
+
const http = axios.create({ baseURL: configuration.serverUrl, timeout: 2e4, headers: { Authorization: `Bearer ${credentials.token}` } });
|
|
8626
|
+
const result = await exitTeamMode({ home: configuration.happyHomeDir, sessionId: happySessionId, metadata, http });
|
|
8627
|
+
const live = [...pidToTrackedSession.values()].some((s) => s.happySessionId === happySessionId && isPidAlive(s.pid));
|
|
8628
|
+
if (!result.managed || !live || result.leadStopped || result.alreadyExited) return { ...result, restarted: false };
|
|
8629
|
+
const restart = await restartSession(happySessionId, { keepPublishedPermissionMode: true });
|
|
8630
|
+
if (restart.type !== "success") throw new Error(`Team archived, but the session did not restart: ${restart.type === "error" ? restart.errorMessage : restart.type}`);
|
|
8631
|
+
return { ...result, restarted: true };
|
|
8632
|
+
};
|
|
8494
8633
|
const restartSession = async (happySessionId, options) => {
|
|
8495
8634
|
let gate = resumeGates.get(happySessionId);
|
|
8496
8635
|
if (!gate) {
|
|
@@ -8653,7 +8792,9 @@ async function startDaemon() {
|
|
|
8653
8792
|
};
|
|
8654
8793
|
const assistantReportLastSentAt = /* @__PURE__ */ new Map();
|
|
8655
8794
|
const isPidAlive = (pid) => isProcessAlive(pid);
|
|
8795
|
+
const echoedSpawnedBy = /* @__PURE__ */ new Map();
|
|
8656
8796
|
const onSessionStateEvent = (sessionId, event, spawnedByFromSession) => {
|
|
8797
|
+
if (spawnedByFromSession) echoedSpawnedBy.set(sessionId, spawnedByFromSession);
|
|
8657
8798
|
if (automationRunner?.hasSession(sessionId)) automationRunner.report(sessionId, event === "completed" ? "idle" : "blocked");
|
|
8658
8799
|
if (spawnedByFromSession === "teams" || teamWorker?.hasSession(sessionId) || [...pidToTrackedSession.values()].some((s) => s.happySessionId === sessionId && s.spawnedBy === "teams")) {
|
|
8659
8800
|
teamWorker?.report(sessionId, event === "completed" ? "idle" : "blocked");
|
|
@@ -8715,7 +8856,7 @@ async function startDaemon() {
|
|
|
8715
8856
|
wrapperVersion: metadata?.version ?? null,
|
|
8716
8857
|
flavor: metadata?.flavor ?? "claude",
|
|
8717
8858
|
capabilities: metadata?.capabilities ?? null,
|
|
8718
|
-
spawnedBy: tracked.spawnedBy ?? null,
|
|
8859
|
+
spawnedBy: tracked.spawnedBy ?? (tracked.happySessionId ? echoedSpawnedBy.get(tracked.happySessionId) : void 0) ?? null,
|
|
8719
8860
|
tags: metadata?.tags ?? null,
|
|
8720
8861
|
variant: tracked.variant ?? metadata?.variant ?? null,
|
|
8721
8862
|
// The wrapper's own word: tracked.startedBy turns into "persisted" /
|
|
@@ -8731,6 +8872,7 @@ async function startDaemon() {
|
|
|
8731
8872
|
const autoRestartScheduler = createAutoRestart({
|
|
8732
8873
|
enabled: () => autoRestartSetting,
|
|
8733
8874
|
quietMs: resolveQuietMs(),
|
|
8875
|
+
checkInGraceMs: resolveCheckInGraceMs(),
|
|
8734
8876
|
daemonVersion: packageJson.version,
|
|
8735
8877
|
installedAgentVersion: (flavor) => flavor === "codex" ? latestAgentVersions?.agents.find((agent) => agent.id === "codex")?.installed ?? null : null,
|
|
8736
8878
|
tracked: (sessionId, pid) => {
|
|
@@ -8802,6 +8944,8 @@ async function startDaemon() {
|
|
|
8802
8944
|
// B-501: `very-happy send --resume`
|
|
8803
8945
|
restartSession,
|
|
8804
8946
|
// B-794: `very-happy session provider`
|
|
8947
|
+
exitTeamMode: exitTeamModeForSession,
|
|
8948
|
+
// B-877: `very-happy teams exit`
|
|
8805
8949
|
getAgentProfiles: () => accountServiceRef?.state() ?? null,
|
|
8806
8950
|
// B-850a: `very-happy account list`
|
|
8807
8951
|
requestShutdown: () => requestShutdown("happy-cli"),
|
|
@@ -8945,6 +9089,7 @@ async function startDaemon() {
|
|
|
8945
9089
|
requestShutdown: () => requestShutdown("happy-app")
|
|
8946
9090
|
});
|
|
8947
9091
|
apiMachine.setRemoteSessionOpsHandlers(createRemoteSessionOpsHandlers(machineId));
|
|
9092
|
+
apiMachine.setTeamExitHandler(exitTeamModeForSession);
|
|
8948
9093
|
const claudeAuthService = new ClaudeAuthService({
|
|
8949
9094
|
happyHomeDir: configuration.happyHomeDir,
|
|
8950
9095
|
happyLibDir: projectPath(),
|