very-happy-cli 0.2.179 → 0.2.181
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-DFipFF7-.cjs → AcpBackend-CgHb_ya5.cjs} +3 -3
- package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-DZGCSuXF.mjs} +3 -3
- package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CacC2EVn.cjs} +1 -1
- package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-DwuPzWBh.mjs} +1 -1
- package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-DCP8ZEB4.cjs} +1 -1
- package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-Uo-GUjbb.mjs} +1 -1
- package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-9OLTD6kT.mjs} +1 -1
- package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-BaVMD80f.cjs} +1 -1
- package/dist/{agentHome-CghLvL_1.mjs → agentHome-B1BsKeqD.mjs} +4 -4
- package/dist/{agentHome-BWcz8mz0.cjs → agentHome-BtUmGcPX.cjs} +4 -4
- package/dist/{api-Cmjfr8Z7.cjs → api-COHFAkb_.cjs} +20 -12
- package/dist/{api-CzwFpJQc.mjs → api-Dr3wXL_7.mjs} +21 -13
- package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CHEzPQdS.mjs} +73 -32
- package/dist/{apiMachine-G6OogT08.cjs → apiMachine-D8H7CXaz.cjs} +75 -34
- package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-1YwtKgWl.mjs} +2 -2
- package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-mIhbtRKl.cjs} +2 -2
- package/dist/{auth-DMX0xPNK.mjs → auth-CbZkcMAb.mjs} +8 -8
- package/dist/{auth-D6bBUwZa.cjs → auth-CgQP7d0q.cjs} +5 -5
- package/dist/{auth-BS6PaOOG.mjs → auth-DZsthtSk.mjs} +5 -5
- package/dist/{auth-HEhRaNgL.cjs → auth-Fg8fLadK.cjs} +8 -8
- package/dist/{auto-C6I55iOh.cjs → auto-BB7kqSh5.cjs} +19 -19
- package/dist/{auto-Cl1SEDcD.mjs → auto-_T-Ud-z5.mjs} +19 -19
- package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
- package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-B6EkZh4u.mjs} +2 -2
- package/dist/{bootstrap-exVucYav.cjs → bootstrap-CYtOtbi7.cjs} +2 -2
- package/dist/{browser-CSYum7xH.mjs → browser-C2qhUHSE.mjs} +1 -1
- package/dist/{browser-BohJK12g.cjs → browser-DjNNQQk2.cjs} +1 -1
- package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
- package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-BAFjWhZ8.mjs} +6 -6
- package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal-O_w7-fBh.cjs} +8 -8
- package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-CWn30LZR.mjs} +11 -11
- package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-Df3zg1q0.cjs} +13 -13
- package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-2ZkSTOGn.mjs} +1 -1
- package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-pwcKqB-e.cjs} +1 -1
- package/dist/{client-BhoEBnuN.mjs → client-BKyU66lg.mjs} +2 -2
- package/dist/{client-BKcK1Bi-.cjs → client-CUO3ItoB.cjs} +34 -8
- package/dist/{client-wo9nbxuf.mjs → client-CXOnzuOy.mjs} +2 -2
- package/dist/{client-ZjOsn6nZ.cjs → client-DWs6k041.cjs} +2 -2
- package/dist/{client-CuVdN6PP.cjs → client-D_U2VjO3.cjs} +2 -2
- package/dist/{client-DuTDwWSQ.mjs → client-DsQcxVUV.mjs} +34 -9
- package/dist/codex/happyMcpStdioBridge.cjs +17 -17
- package/dist/codex/happyMcpStdioBridge.mjs +18 -18
- package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-BRX3JZ_5.cjs} +3 -3
- package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-C3JO3pwM.mjs} +3 -3
- package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-BZIAAqKS.mjs} +59 -51
- package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-dKOc5iQl.cjs} +85 -77
- package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BVR9HeVI.cjs} +7 -2
- package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-ztFkwHrG.mjs} +7 -2
- package/dist/{config-2oMG_fEI.mjs → config-NbHjx8ge.mjs} +3 -3
- package/dist/{config-B0uK6K7n.cjs → config-cftYxLC7.cjs} +26 -26
- package/dist/{configuration-WMi4idBB.mjs → configuration-BPrfb17M.mjs} +1 -1
- package/dist/{configuration-CMHZnp6G.cjs → configuration-C8JgseHy.cjs} +1 -1
- package/dist/{connect-uaglGrde.cjs → connect-Br8VMrK1.cjs} +27 -27
- package/dist/{connect-BLVHhHzA.mjs → connect-CLD1ai0k.mjs} +14 -14
- package/dist/{context-DXzU5bFM.cjs → context-D1lgQTJC.cjs} +1 -1
- package/dist/{context-DploEcoN.mjs → context-_YGq8xdH.mjs} +1 -1
- package/dist/{controlClient-BWUJrj3t.mjs → controlClient-CkNpT5zS.mjs} +4 -4
- package/dist/{controlClient-C-5qCt8W.cjs → controlClient-D68Zj7Q-.cjs} +3 -3
- package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-3WAj3_xl.mjs} +2 -2
- package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-DNIbKLHg.cjs} +3 -3
- package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-BmvjP32v.cjs} +2 -2
- package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-DXMznl8v.mjs} +2 -2
- package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
- package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-BS7D7URE.cjs} +89 -24
- package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-BcBIKKf1.mjs} +87 -24
- package/dist/{doctor-Br1Kcy2J.cjs → doctor-Be7zC0AF.cjs} +10 -9
- package/dist/{doctor-CmtSsR2-.mjs → doctor-CoOaPq6w.mjs} +8 -8
- package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
- package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-CeaAXdJj.mjs} +6 -6
- package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-LyOiucn_.cjs} +6 -6
- package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning--98j7-17.mjs} +5 -5
- package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-B8z37VKD.cjs} +6 -6
- package/dist/fileStore-5qpetZS0.mjs +146 -0
- package/dist/fileStore-7qhnbs6N.cjs +152 -0
- package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BFZlrFVH.cjs} +7 -7
- package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-gO8I4keP.mjs} +6 -6
- package/dist/{index-DMqDMT1Q.cjs → index-B5PXbZjW.cjs} +80 -62
- package/dist/{index-D09T1m8Y.cjs → index-BRMq9gOe.cjs} +3 -3
- package/dist/{index-B0UjHlAe.cjs → index-BkluinoS.cjs} +4 -4
- package/dist/{index-CdQI0C9p.mjs → index-CO0n9ue6.mjs} +4 -4
- package/dist/{index-DPOa4NhL.mjs → index-CeRXrGnH.mjs} +41 -6
- package/dist/{index-C6O2vVjm.cjs → index-Df2eHm3O.cjs} +42 -6
- package/dist/{index-BTxHphpV.mjs → index-DneHoQXf.mjs} +80 -62
- package/dist/{index-BiyC7cZ3.mjs → index-WUj3954m.mjs} +4 -4
- package/dist/{index-D3bidoG8.mjs → index-hQ8LP1C2.mjs} +3 -3
- package/dist/{index-CUuc6iCn.cjs → index-jF2t3ACW.cjs} +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
- package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
- package/dist/{install-hnve_9vq.mjs → install-DkYFiVK4.mjs} +3 -3
- package/dist/{install-CYRZxS87.cjs → install-FqkSUjPC.cjs} +7 -7
- package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
- package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
- package/dist/lib.cjs +13 -13
- package/dist/lib.d.cts +216 -2
- package/dist/lib.d.mts +216 -2
- package/dist/lib.mjs +13 -13
- package/dist/{lidState-Bb8fgXg3.mjs → lidState-DghbfRbr.mjs} +1 -1
- package/dist/{lidState-Dv2wwFTj.cjs → lidState-x8cJ8J_9.cjs} +1 -1
- package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZ2kb9uq.cjs} +1 -1
- package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-IKmeRpuQ.mjs} +1 -1
- package/dist/{logger-C1GWx3gi.cjs → logger-DgBwUSgS.cjs} +2 -2
- package/dist/{logger-BtVhHnD8.mjs → logger-LFr8iPgl.mjs} +2 -2
- package/dist/machineMetadata-BglCsfvf.mjs +75 -0
- package/dist/machineMetadata-DB03ez4K.cjs +87 -0
- package/dist/{main-CWhSsbtU.cjs → main-YQ-Vkakw.cjs} +99 -132
- package/dist/{main-B2LWV8DI.mjs → main-_1LSzlLv.mjs} +93 -126
- package/dist/{mcp-CARUsXHV.cjs → mcp-BIY80jSc.cjs} +15 -15
- package/dist/{mcp-ext92q3Y.mjs → mcp-Csj-mT5Y.mjs} +15 -15
- package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-BphKIAK9.cjs} +15 -6
- package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-CAxOMBkb.mjs} +15 -6
- package/dist/{package-BPPebGQF.mjs → package-DYGwlmXl.mjs} +9 -8
- package/dist/{package-SgqTYsjn.cjs → package-NoD8QOOM.cjs} +9 -8
- package/dist/{panels-BZ0_Tt7B.mjs → panels-B8zRm7_d.mjs} +5 -5
- package/dist/{panels-D1c7q2dD.cjs → panels-DYEc1NyQ.cjs} +5 -5
- package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-CK3JYu1k.mjs} +5 -5
- package/dist/{peerTools-DRQETXaz.cjs → peerTools-CP-x-Peu.cjs} +5 -5
- package/dist/{persistence-BegE7NPa.cjs → persistence-BY-D00wT.cjs} +2 -2
- package/dist/{persistence-Cr-wutZ4.mjs → persistence-D2Djrf7t.mjs} +2 -2
- package/dist/pi-CqyoZMjI.mjs +380 -0
- package/dist/pi-DlsrPCTa.cjs +400 -0
- package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-IZLoL7TG.mjs} +1 -1
- package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-gxLYIZH4.cjs} +1 -1
- package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-D7Y4oHVL.mjs} +2 -2
- package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-o5L8uX-W.cjs} +2 -2
- package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-C_-JDkLN.cjs} +18 -18
- package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-Kphx8Uhw.mjs} +18 -18
- package/dist/projectPath-C3ioB4Bu.cjs +13 -0
- package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
- package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
- package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-BXoOSq_G.cjs} +14 -4
- package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DXGIhE-A.mjs} +14 -4
- package/dist/{query-DYP_W1wp.mjs → query-CcA6DVZK.mjs} +1 -1
- package/dist/{query-Ctfg-5gy.cjs → query-CdCxzuaB.cjs} +1 -1
- package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-OpAmdOtC.cjs} +1 -1
- package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-ZtHZHe-l.mjs} +1 -1
- package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-CRjBoJLK.cjs} +30 -30
- package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-DF6bdDtd.mjs} +2 -2
- package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-7fOm6ooh.cjs} +6 -6
- package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-DDCKL3wf.mjs} +6 -6
- package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-B2POSKFT.mjs} +5 -5
- package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-CFCn42bs.cjs} +5 -5
- package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-tPxEvh6x.mjs} +4 -4
- package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-th4trcET.cjs} +4 -4
- package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
- package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
- package/dist/{run-CNXwIe0A.cjs → run-C_FumCQk.cjs} +2767 -183
- package/dist/{run-BM4TxiyN.mjs → run-cKQBbVi4.mjs} +2762 -178
- package/dist/{runClaude-C_3I8hvR.mjs → runClaude-CYnM6krL.mjs} +34 -28
- package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-z_2YC_aa.cjs} +35 -29
- package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-CLubzWnA.cjs} +59 -122
- package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-duS06Pb4.mjs} +52 -114
- package/dist/{runGemini-BEdWEZLR.mjs → runGemini-C_Pc2EhH.mjs} +39 -37
- package/dist/{runGemini-CgRLYbt5.cjs → runGemini-vEoXV6qT.cjs} +67 -65
- package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-CXJCtMgB.cjs} +20 -20
- package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-Cxun1qLC.mjs} +19 -19
- package/dist/{sandbox-nocIjliq.cjs → sandbox-CO46H2tK.cjs} +4 -4
- package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CsvPnTmz.mjs} +4 -4
- package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-DIr7Gc0i.cjs} +39 -39
- package/dist/selfCheck-NamtBHVB.mjs +85 -0
- package/dist/{send-Ct7X4pPU.mjs → send-DMoFg6F1.mjs} +9 -9
- package/dist/{send-Dydf_hwZ.cjs → send-X2mfVEyr.cjs} +8 -8
- package/dist/{server-CosABFbd.cjs → server-BwTEdbkr.cjs} +6 -6
- package/dist/{server-DTQGZMxh.mjs → server-CkqQ0sRH.mjs} +4 -4
- package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
- package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
- package/dist/{sessionLock-DokGab2R.cjs → sessionLock-CdIRJlHH.cjs} +25 -5
- package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-JIfwCqMk.mjs} +24 -5
- package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-DVA-00nR.cjs} +4 -4
- package/dist/{sessionOps-BIGgRube.mjs → sessionOps-DqlftXxe.mjs} +5 -5
- package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-BI0Vo1xT.mjs} +3 -3
- package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-BMwgGAhY.cjs} +3 -3
- package/dist/{sessions-BJHEZpi2.mjs → sessions-D6IimX7b.mjs} +11 -11
- package/dist/{sessions-JchI1w3z.cjs → sessions-DjgEcHaT.cjs} +10 -10
- package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-CjuCiKY3.cjs} +2 -2
- package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-DgJK_4m1.mjs} +2 -2
- package/dist/{spawn-DgvUNYEo.mjs → spawn-Dvzy-tzc.mjs} +15 -15
- package/dist/{spawn-6PD7nnoC.cjs → spawn-rhF28shY.cjs} +15 -15
- package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CCnlq-FI.mjs} +1 -1
- package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-iwuqrgR9.cjs} +1 -1
- package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnKmIsEt.cjs} +2 -2
- package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-Dq3LLXLb.mjs} +1 -1
- package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-CcyZ1hGA.mjs} +3 -3
- package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-Zwr2C6A2.cjs} +3 -3
- package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-4thXDK9d.mjs} +1 -1
- package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-K6hJSyiR.cjs} +1 -1
- package/dist/startupSessionCreate-BfByJ16A.mjs +24 -0
- package/dist/startupSessionCreate-CKEbq0tL.cjs +26 -0
- package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Gy8Xfnon.cjs} +1 -1
- package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-LcDvyEjK.mjs} +1 -1
- package/dist/{sync-D23jbqVa.cjs → sync-1hQ5KHpL.cjs} +1 -1
- package/dist/{sync-CSe0Rf45.mjs → sync-DO-2PU45.mjs} +1 -1
- package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-BctLfMZs.mjs} +3 -3
- package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-Dj7pgkMK.cjs} +3 -3
- package/dist/{teams-DyY669f0.mjs → teams-Bu8YeOoF.mjs} +8 -8
- package/dist/{teams-Ov2BDT-A.cjs → teams-uQxUlyyz.cjs} +8 -8
- package/dist/{time-65DcU6Jx.mjs → time-BcoJaG8E.mjs} +1 -1
- package/dist/{time-CrwIMHta.cjs → time-nqa9shu8.cjs} +1 -1
- package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-D09XyYYG.cjs} +3 -3
- package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-D5r06bhf.mjs} +1 -1
- package/dist/{todo-KY-okGii.cjs → todo-CCOnL7pT.cjs} +6 -6
- package/dist/{todo-BDONw0sK.mjs → todo-D1q8146q.mjs} +6 -6
- package/dist/{tools-D8-PnZEG.mjs → tools-D2E--n1x.mjs} +3 -3
- package/dist/{tools-_w52DZG6.cjs → tools-DiCXnAC5.cjs} +3 -3
- package/dist/{uninstall-8vnLN-IE.cjs → uninstall-BrNwwwSD.cjs} +6 -6
- package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CtwXi1Rt.mjs} +3 -3
- package/package.json +9 -8
- package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
- package/dist/machineMetadata-D-g--oU_.mjs +0 -39
- package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
- package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
- package/dist/projectPath-ChLhdOyt.cjs +0 -13
- package/dist/selfCheck-CjCF4C3v.mjs +0 -85
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { p as packageJson } from './package-DYGwlmXl.mjs';
|
|
2
|
+
|
|
3
|
+
const LAZY_MODULES = [
|
|
4
|
+
// Entry
|
|
5
|
+
["main", () => import('./main-_1LSzlLv.mjs')],
|
|
6
|
+
["selfCheck", () => Promise.resolve().then(function () { return selfCheck; })],
|
|
7
|
+
// Subcommands (main.ts)
|
|
8
|
+
["api/api", () => import('./api-Dr3wXL_7.mjs').then(function (n) { return n.b; })],
|
|
9
|
+
["claude/claudeCliPath", () => import('./claudeCliPath-BqkaH2oR.mjs')],
|
|
10
|
+
["claude/runClaude", () => import('./runClaude-CYnM6krL.mjs')],
|
|
11
|
+
["commands/agentHome", () => import('./agentHome-B1BsKeqD.mjs')],
|
|
12
|
+
["commands/auth", () => import('./auth-CbZkcMAb.mjs')],
|
|
13
|
+
["commands/auto", () => import('./auto-_T-Ud-z5.mjs')],
|
|
14
|
+
["commands/codexCommand", () => import('./codexCommand-BZIAAqKS.mjs')],
|
|
15
|
+
["commands/connect", () => import('./connect-CLD1ai0k.mjs')],
|
|
16
|
+
["commands/installPiTools", () => import('./installPiTools-B_CdM5_2.mjs')],
|
|
17
|
+
["commands/installTerminalHooks", () => import('./installTerminalHooks-By7gBMEF.mjs')],
|
|
18
|
+
["commands/mcp", () => import('./mcp-Csj-mT5Y.mjs')],
|
|
19
|
+
["commands/panels", () => import('./panels-B8zRm7_d.mjs')],
|
|
20
|
+
["commands/piTerminal", () => import('./piTerminal-Kphx8Uhw.mjs')],
|
|
21
|
+
["commands/sandbox", () => import('./sandbox-CsvPnTmz.mjs')],
|
|
22
|
+
["commands/send", () => import('./send-DMoFg6F1.mjs')],
|
|
23
|
+
["commands/server", () => import('./server-CkqQ0sRH.mjs')],
|
|
24
|
+
["commands/sessions", () => import('./sessions-D6IimX7b.mjs')],
|
|
25
|
+
["commands/spawn", () => import('./spawn-Dvzy-tzc.mjs')],
|
|
26
|
+
["commands/teams", () => import('./teams-Bu8YeOoF.mjs')],
|
|
27
|
+
["commands/todo", () => import('./todo-D1q8146q.mjs')],
|
|
28
|
+
["daemon/doctor", () => import('./doctor-BPkYWSuq.mjs')],
|
|
29
|
+
["daemon/install", () => import('./install-DkYFiVK4.mjs')],
|
|
30
|
+
["daemon/run", () => import('./run-cKQBbVi4.mjs')],
|
|
31
|
+
["daemon/uninstall", () => import('./uninstall-CtwXi1Rt.mjs')],
|
|
32
|
+
["resume/handleResumeCommand", () => import('./handleResumeCommand-gO8I4keP.mjs')],
|
|
33
|
+
["ui/doctor", () => import('./doctor-CoOaPq6w.mjs').then(function (n) { return n.d; })],
|
|
34
|
+
["agent/acp", () => import('./index-DneHoQXf.mjs')],
|
|
35
|
+
["gemini/runGemini", () => import('./runGemini-C_Pc2EhH.mjs')],
|
|
36
|
+
["gemini/utils/config", () => import('./config-NbHjx8ge.mjs')],
|
|
37
|
+
["openclaw/runOpenClaw", () => import('./runOpenClaw-Cxun1qLC.mjs')],
|
|
38
|
+
["persistence", () => import('./persistence-D2Djrf7t.mjs').then(function (n) { return n.F; })],
|
|
39
|
+
// Deferred halves of the runners and clients
|
|
40
|
+
["api/apiMachine", () => import('./apiMachine-CHEzPQdS.mjs')],
|
|
41
|
+
["claude/runClaudeDeps", () => import('./runClaudeDeps-duS06Pb4.mjs')],
|
|
42
|
+
["claude/claudeLocal", () => import('./claudeLocal-BAFjWhZ8.mjs')],
|
|
43
|
+
["claude/claudeLocalLauncher", () => import('./claudeLocalLauncher-CWn30LZR.mjs')],
|
|
44
|
+
["claude/sdk", () => import('./index-WUj3954m.mjs')],
|
|
45
|
+
["assistant/bootstrap", () => import('./bootstrap-B6EkZh4u.mjs')],
|
|
46
|
+
["agentHome", () => import('./index-CO0n9ue6.mjs')],
|
|
47
|
+
["ui/ink/RemoteModeDisplay", () => import('./RemoteModeDisplay-D-HewyXg.mjs')],
|
|
48
|
+
// External packages imported on demand
|
|
49
|
+
["expo-server-sdk", () => import('expo-server-sdk')],
|
|
50
|
+
["ink", () => import('ink')],
|
|
51
|
+
["react", () => import('react')]
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
async function runSelfCheck(modules = LAZY_MODULES) {
|
|
55
|
+
const failures = [];
|
|
56
|
+
for (const [name, load] of modules) {
|
|
57
|
+
try {
|
|
58
|
+
await load();
|
|
59
|
+
} catch (error) {
|
|
60
|
+
failures.push({ name, error: error instanceof Error ? error.message : String(error) });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return failures;
|
|
64
|
+
}
|
|
65
|
+
async function selfCheckMain(opts = {}) {
|
|
66
|
+
const started = Date.now();
|
|
67
|
+
const failures = await runSelfCheck();
|
|
68
|
+
if (failures.length > 0) {
|
|
69
|
+
for (const failure of failures) {
|
|
70
|
+
console.error(`very-happy: failed to load ${failure.name}: ${failure.error}`);
|
|
71
|
+
}
|
|
72
|
+
return 1;
|
|
73
|
+
}
|
|
74
|
+
if (opts.verbose) console.log(`self-check: ${LAZY_MODULES.length} modules loaded in ${Date.now() - started}ms`);
|
|
75
|
+
console.log(`very-happy version: ${packageJson.version}`);
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var selfCheck = /*#__PURE__*/Object.freeze({
|
|
80
|
+
__proto__: null,
|
|
81
|
+
runSelfCheck: runSelfCheck,
|
|
82
|
+
selfCheckMain: selfCheckMain
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export { runSelfCheck, selfCheckMain };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { readFileSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
-
import { c as readPersistedSessions } from './persistence-
|
|
5
|
-
import { s as sessionWebUrl } from './sessionOps-
|
|
6
|
-
import { d as deliverToSession, s as sendRemoteMessage } from './remoteSessionClient-
|
|
4
|
+
import { c as readPersistedSessions } from './persistence-D2Djrf7t.mjs';
|
|
5
|
+
import { s as sessionWebUrl } from './sessionOps-DqlftXxe.mjs';
|
|
6
|
+
import { d as deliverToSession, s as sendRemoteMessage } from './remoteSessionClient-B2POSKFT.mjs';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
|
-
import './configuration-
|
|
8
|
+
import './configuration-BPrfb17M.mjs';
|
|
9
9
|
import 'node:os';
|
|
10
|
-
import './package-
|
|
10
|
+
import './package-DYGwlmXl.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import './authRelay-DhQhkBvX.mjs';
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'tweetnacl';
|
|
15
|
-
import './logger-
|
|
15
|
+
import './logger-LFr8iPgl.mjs';
|
|
16
16
|
import 'node:util';
|
|
17
17
|
import 'axios';
|
|
18
|
-
import './controlClient-
|
|
19
|
-
import './time-
|
|
18
|
+
import './controlClient-CkNpT5zS.mjs';
|
|
19
|
+
import './time-BcoJaG8E.mjs';
|
|
20
20
|
import 'socket.io-client';
|
|
21
|
-
import './backgroundTaskActivity-
|
|
21
|
+
import './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
22
22
|
|
|
23
23
|
const EXIT_SESSION_NOT_LIVE = 3;
|
|
24
24
|
const MACHINE_ID_RE = /^[a-zA-Z0-9_-]{1,128}$/;
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
var chalk = require('chalk');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var persistence = require('./persistence-
|
|
7
|
-
var sessionOps = require('./sessionOps-
|
|
8
|
-
var remoteSessionClient = require('./remoteSessionClient-
|
|
6
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
7
|
+
var sessionOps = require('./sessionOps-DVA-00nR.cjs');
|
|
8
|
+
var remoteSessionClient = require('./remoteSessionClient-CFCn42bs.cjs');
|
|
9
9
|
require('node:fs/promises');
|
|
10
|
-
require('./configuration-
|
|
10
|
+
require('./configuration-C8JgseHy.cjs');
|
|
11
11
|
require('node:os');
|
|
12
|
-
require('./package-
|
|
12
|
+
require('./package-NoD8QOOM.cjs');
|
|
13
13
|
require('zod');
|
|
14
14
|
require('./authRelay-Dy1qU9td.cjs');
|
|
15
15
|
require('node:crypto');
|
|
16
16
|
require('tweetnacl');
|
|
17
|
-
require('./logger-
|
|
17
|
+
require('./logger-DgBwUSgS.cjs');
|
|
18
18
|
require('node:util');
|
|
19
19
|
require('axios');
|
|
20
|
-
require('./controlClient-
|
|
21
|
-
require('./time-
|
|
20
|
+
require('./controlClient-D68Zj7Q-.cjs');
|
|
21
|
+
require('./time-nqa9shu8.cjs');
|
|
22
22
|
require('socket.io-client');
|
|
23
23
|
require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
24
24
|
|
|
@@ -8,15 +8,15 @@ var module$1 = require('node:module');
|
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var node_child_process = require('node:child_process');
|
|
10
10
|
var promises = require('node:readline/promises');
|
|
11
|
-
var configuration = require('./configuration-
|
|
12
|
-
var persistence = require('./persistence-
|
|
11
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
12
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
13
13
|
require('node:os');
|
|
14
|
-
require('./package-
|
|
14
|
+
require('./package-NoD8QOOM.cjs');
|
|
15
15
|
require('node:fs/promises');
|
|
16
16
|
require('zod');
|
|
17
17
|
require('./authRelay-Dy1qU9td.cjs');
|
|
18
18
|
require('tweetnacl');
|
|
19
|
-
require('./logger-
|
|
19
|
+
require('./logger-DgBwUSgS.cjs');
|
|
20
20
|
require('node:util');
|
|
21
21
|
|
|
22
22
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -33,9 +33,9 @@ function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, gene
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('server-
|
|
36
|
+
const __filename$1 = node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('server-BwTEdbkr.cjs', document.baseURI).href)));
|
|
37
37
|
const __dirname$1 = path.dirname(__filename$1);
|
|
38
|
-
const require_ = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('server-
|
|
38
|
+
const require_ = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('server-BwTEdbkr.cjs', document.baseURI).href)));
|
|
39
39
|
const PRISMA_QUERY_ENGINE_FILES = {
|
|
40
40
|
"arm64-darwin": "libquery_engine-darwin-arm64.dylib.node",
|
|
41
41
|
"x64-darwin": "libquery_engine-darwin.dylib.node",
|
|
@@ -6,15 +6,15 @@ import { createRequire } from 'node:module';
|
|
|
6
6
|
import { randomBytes } from 'node:crypto';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
8
|
import { createInterface } from 'node:readline/promises';
|
|
9
|
-
import { c as configuration } from './configuration-
|
|
10
|
-
import { u as updateSettings } from './persistence-
|
|
9
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
10
|
+
import { u as updateSettings } from './persistence-D2Djrf7t.mjs';
|
|
11
11
|
import 'node:os';
|
|
12
|
-
import './package-
|
|
12
|
+
import './package-DYGwlmXl.mjs';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
import 'zod';
|
|
15
15
|
import './authRelay-DhQhkBvX.mjs';
|
|
16
16
|
import 'tweetnacl';
|
|
17
|
-
import './logger-
|
|
17
|
+
import './logger-LFr8iPgl.mjs';
|
|
18
18
|
import 'node:util';
|
|
19
19
|
|
|
20
20
|
function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, generatedInviteCode) {
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
class MessageBuffer {
|
|
2
|
+
messages = [];
|
|
3
|
+
listeners = [];
|
|
4
|
+
nextId = 1;
|
|
5
|
+
addMessage(content, type = "assistant") {
|
|
6
|
+
const message = {
|
|
7
|
+
id: `msg-${this.nextId++}`,
|
|
8
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
9
|
+
content,
|
|
10
|
+
type
|
|
11
|
+
};
|
|
12
|
+
this.messages.push(message);
|
|
13
|
+
this.notifyListeners();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Update the last message of a specific type by appending content to it
|
|
17
|
+
* Useful for streaming responses where deltas should accumulate in one message
|
|
18
|
+
*/
|
|
19
|
+
updateLastMessage(contentDelta, type = "assistant") {
|
|
20
|
+
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
21
|
+
if (this.messages[i].type === type) {
|
|
22
|
+
const oldMessage = this.messages[i];
|
|
23
|
+
const updatedMessage = {
|
|
24
|
+
...oldMessage,
|
|
25
|
+
content: oldMessage.content + contentDelta
|
|
26
|
+
};
|
|
27
|
+
this.messages[i] = updatedMessage;
|
|
28
|
+
this.notifyListeners();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
this.addMessage(contentDelta, type);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Remove the last message of a specific type
|
|
36
|
+
* Useful for removing placeholder messages like "Thinking..." when actual response starts
|
|
37
|
+
*/
|
|
38
|
+
removeLastMessage(type) {
|
|
39
|
+
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
40
|
+
if (this.messages[i].type === type) {
|
|
41
|
+
this.messages.splice(i, 1);
|
|
42
|
+
this.notifyListeners();
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
getMessages() {
|
|
49
|
+
return [...this.messages];
|
|
50
|
+
}
|
|
51
|
+
clear() {
|
|
52
|
+
this.messages = [];
|
|
53
|
+
this.nextId = 1;
|
|
54
|
+
this.notifyListeners();
|
|
55
|
+
}
|
|
56
|
+
onUpdate(listener) {
|
|
57
|
+
this.listeners.push(listener);
|
|
58
|
+
return () => {
|
|
59
|
+
const index = this.listeners.indexOf(listener);
|
|
60
|
+
if (index > -1) {
|
|
61
|
+
this.listeners.splice(index, 1);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
notifyListeners() {
|
|
66
|
+
const messages = this.getMessages();
|
|
67
|
+
this.listeners.forEach((listener) => listener(messages));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const OFFLINE_EXIT_STAMP_TIMEOUT_MS = 3e3;
|
|
72
|
+
async function settleSessionOnExit(sessionId, intent, deps) {
|
|
73
|
+
if (intent === "archive") {
|
|
74
|
+
deps.updateMetadata((currentMetadata) => ({
|
|
75
|
+
...currentMetadata,
|
|
76
|
+
lifecycleState: "archived",
|
|
77
|
+
lifecycleStateSince: Date.now(),
|
|
78
|
+
archivedBy: "cli",
|
|
79
|
+
archiveReason: "User terminated"
|
|
80
|
+
}));
|
|
81
|
+
}
|
|
82
|
+
if (intent === "hibernate" && deps.hibernation) {
|
|
83
|
+
const stamp = deps.hibernation;
|
|
84
|
+
const handler = (currentMetadata) => ({ ...currentMetadata, hibernation: stamp });
|
|
85
|
+
const landed = deps.updateMetadataAndWait ? await deps.updateMetadataAndWait(handler) : (deps.updateMetadata(handler), false);
|
|
86
|
+
if (!landed) deps.log?.("[START] hibernation stamp not confirmed before going offline");
|
|
87
|
+
}
|
|
88
|
+
if (intent === "offline" && deps.exitCursor && deps.updateMetadataAndWait) {
|
|
89
|
+
const stamp = deps.exitCursor;
|
|
90
|
+
const landed = await deps.updateMetadataAndWait((currentMetadata) => ({ ...currentMetadata, exitCursor: stamp }), OFFLINE_EXIT_STAMP_TIMEOUT_MS);
|
|
91
|
+
if (!landed) deps.log?.("[START] offline exit cursor not confirmed before going offline");
|
|
92
|
+
}
|
|
93
|
+
deps.sendSessionDeath();
|
|
94
|
+
try {
|
|
95
|
+
if (intent === "archive") await deps.archiveSession(sessionId);
|
|
96
|
+
else await deps.deactivateSession(sessionId);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
deps.log?.(`[START] ${intent === "archive" ? "archiveSession" : "deactivateSession"} during cleanup failed:`, error);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
class SessionExitGate {
|
|
102
|
+
decided = null;
|
|
103
|
+
hibernateCommitted = false;
|
|
104
|
+
deferred = null;
|
|
105
|
+
/** Returns the intent to act on, or null when cleanup already started. */
|
|
106
|
+
claim(intent) {
|
|
107
|
+
if (this.decided === "hibernate" && !this.hibernateCommitted && intent !== "hibernate") {
|
|
108
|
+
if (this.deferred !== "archive") this.deferred = intent;
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
if (this.decided !== null) return null;
|
|
112
|
+
this.decided = intent;
|
|
113
|
+
return intent;
|
|
114
|
+
}
|
|
115
|
+
get current() {
|
|
116
|
+
return this.decided;
|
|
117
|
+
}
|
|
118
|
+
/** B-587: an exit was requested while the hibernation was deciding. */
|
|
119
|
+
get exitRequested() {
|
|
120
|
+
return this.deferred !== null;
|
|
121
|
+
}
|
|
122
|
+
/** B-587: the hibernation passed its last check — no more deferral. */
|
|
123
|
+
commitHibernate() {
|
|
124
|
+
if (this.decided === "hibernate") this.hibernateCommitted = true;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* B-587: a hibernation that aborted hands the exit back. Returns the exit
|
|
128
|
+
* deferred meanwhile (the caller must run it now), or null.
|
|
129
|
+
*/
|
|
130
|
+
release(intent) {
|
|
131
|
+
if (this.decided !== intent || intent === "hibernate" && this.hibernateCommitted) return null;
|
|
132
|
+
this.decided = null;
|
|
133
|
+
const deferred = this.deferred;
|
|
134
|
+
this.deferred = null;
|
|
135
|
+
return deferred;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function exitIntentFromArchiveFlag(archive) {
|
|
139
|
+
return archive ?? true ? "archive" : "offline";
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { MessageBuffer as M, OFFLINE_EXIT_STAMP_TIMEOUT_MS as O, SessionExitGate as S, exitIntentFromArchiveFlag as e, settleSessionOnExit as s };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class MessageBuffer {
|
|
4
|
+
messages = [];
|
|
5
|
+
listeners = [];
|
|
6
|
+
nextId = 1;
|
|
7
|
+
addMessage(content, type = "assistant") {
|
|
8
|
+
const message = {
|
|
9
|
+
id: `msg-${this.nextId++}`,
|
|
10
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
11
|
+
content,
|
|
12
|
+
type
|
|
13
|
+
};
|
|
14
|
+
this.messages.push(message);
|
|
15
|
+
this.notifyListeners();
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Update the last message of a specific type by appending content to it
|
|
19
|
+
* Useful for streaming responses where deltas should accumulate in one message
|
|
20
|
+
*/
|
|
21
|
+
updateLastMessage(contentDelta, type = "assistant") {
|
|
22
|
+
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
23
|
+
if (this.messages[i].type === type) {
|
|
24
|
+
const oldMessage = this.messages[i];
|
|
25
|
+
const updatedMessage = {
|
|
26
|
+
...oldMessage,
|
|
27
|
+
content: oldMessage.content + contentDelta
|
|
28
|
+
};
|
|
29
|
+
this.messages[i] = updatedMessage;
|
|
30
|
+
this.notifyListeners();
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
this.addMessage(contentDelta, type);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Remove the last message of a specific type
|
|
38
|
+
* Useful for removing placeholder messages like "Thinking..." when actual response starts
|
|
39
|
+
*/
|
|
40
|
+
removeLastMessage(type) {
|
|
41
|
+
for (let i = this.messages.length - 1; i >= 0; i--) {
|
|
42
|
+
if (this.messages[i].type === type) {
|
|
43
|
+
this.messages.splice(i, 1);
|
|
44
|
+
this.notifyListeners();
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
getMessages() {
|
|
51
|
+
return [...this.messages];
|
|
52
|
+
}
|
|
53
|
+
clear() {
|
|
54
|
+
this.messages = [];
|
|
55
|
+
this.nextId = 1;
|
|
56
|
+
this.notifyListeners();
|
|
57
|
+
}
|
|
58
|
+
onUpdate(listener) {
|
|
59
|
+
this.listeners.push(listener);
|
|
60
|
+
return () => {
|
|
61
|
+
const index = this.listeners.indexOf(listener);
|
|
62
|
+
if (index > -1) {
|
|
63
|
+
this.listeners.splice(index, 1);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
notifyListeners() {
|
|
68
|
+
const messages = this.getMessages();
|
|
69
|
+
this.listeners.forEach((listener) => listener(messages));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const OFFLINE_EXIT_STAMP_TIMEOUT_MS = 3e3;
|
|
74
|
+
async function settleSessionOnExit(sessionId, intent, deps) {
|
|
75
|
+
if (intent === "archive") {
|
|
76
|
+
deps.updateMetadata((currentMetadata) => ({
|
|
77
|
+
...currentMetadata,
|
|
78
|
+
lifecycleState: "archived",
|
|
79
|
+
lifecycleStateSince: Date.now(),
|
|
80
|
+
archivedBy: "cli",
|
|
81
|
+
archiveReason: "User terminated"
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
if (intent === "hibernate" && deps.hibernation) {
|
|
85
|
+
const stamp = deps.hibernation;
|
|
86
|
+
const handler = (currentMetadata) => ({ ...currentMetadata, hibernation: stamp });
|
|
87
|
+
const landed = deps.updateMetadataAndWait ? await deps.updateMetadataAndWait(handler) : (deps.updateMetadata(handler), false);
|
|
88
|
+
if (!landed) deps.log?.("[START] hibernation stamp not confirmed before going offline");
|
|
89
|
+
}
|
|
90
|
+
if (intent === "offline" && deps.exitCursor && deps.updateMetadataAndWait) {
|
|
91
|
+
const stamp = deps.exitCursor;
|
|
92
|
+
const landed = await deps.updateMetadataAndWait((currentMetadata) => ({ ...currentMetadata, exitCursor: stamp }), OFFLINE_EXIT_STAMP_TIMEOUT_MS);
|
|
93
|
+
if (!landed) deps.log?.("[START] offline exit cursor not confirmed before going offline");
|
|
94
|
+
}
|
|
95
|
+
deps.sendSessionDeath();
|
|
96
|
+
try {
|
|
97
|
+
if (intent === "archive") await deps.archiveSession(sessionId);
|
|
98
|
+
else await deps.deactivateSession(sessionId);
|
|
99
|
+
} catch (error) {
|
|
100
|
+
deps.log?.(`[START] ${intent === "archive" ? "archiveSession" : "deactivateSession"} during cleanup failed:`, error);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
class SessionExitGate {
|
|
104
|
+
decided = null;
|
|
105
|
+
hibernateCommitted = false;
|
|
106
|
+
deferred = null;
|
|
107
|
+
/** Returns the intent to act on, or null when cleanup already started. */
|
|
108
|
+
claim(intent) {
|
|
109
|
+
if (this.decided === "hibernate" && !this.hibernateCommitted && intent !== "hibernate") {
|
|
110
|
+
if (this.deferred !== "archive") this.deferred = intent;
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
if (this.decided !== null) return null;
|
|
114
|
+
this.decided = intent;
|
|
115
|
+
return intent;
|
|
116
|
+
}
|
|
117
|
+
get current() {
|
|
118
|
+
return this.decided;
|
|
119
|
+
}
|
|
120
|
+
/** B-587: an exit was requested while the hibernation was deciding. */
|
|
121
|
+
get exitRequested() {
|
|
122
|
+
return this.deferred !== null;
|
|
123
|
+
}
|
|
124
|
+
/** B-587: the hibernation passed its last check — no more deferral. */
|
|
125
|
+
commitHibernate() {
|
|
126
|
+
if (this.decided === "hibernate") this.hibernateCommitted = true;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* B-587: a hibernation that aborted hands the exit back. Returns the exit
|
|
130
|
+
* deferred meanwhile (the caller must run it now), or null.
|
|
131
|
+
*/
|
|
132
|
+
release(intent) {
|
|
133
|
+
if (this.decided !== intent || intent === "hibernate" && this.hibernateCommitted) return null;
|
|
134
|
+
this.decided = null;
|
|
135
|
+
const deferred = this.deferred;
|
|
136
|
+
this.deferred = null;
|
|
137
|
+
return deferred;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function exitIntentFromArchiveFlag(archive) {
|
|
141
|
+
return archive ?? true ? "archive" : "offline";
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
exports.MessageBuffer = MessageBuffer;
|
|
145
|
+
exports.OFFLINE_EXIT_STAMP_TIMEOUT_MS = OFFLINE_EXIT_STAMP_TIMEOUT_MS;
|
|
146
|
+
exports.SessionExitGate = SessionExitGate;
|
|
147
|
+
exports.exitIntentFromArchiveFlag = exitIntentFromArchiveFlag;
|
|
148
|
+
exports.settleSessionOnExit = settleSessionOnExit;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var persistence = require('./persistence-
|
|
3
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
4
4
|
var node_fs = require('node:fs');
|
|
5
5
|
var path = require('node:path');
|
|
6
|
-
var configuration = require('./configuration-
|
|
7
|
-
var logger = require('./logger-
|
|
6
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
7
|
+
var logger = require('./logger-DgBwUSgS.cjs');
|
|
8
8
|
var processTreeSnapshot = require('./processTreeSnapshot-mDbnuojn.cjs');
|
|
9
9
|
|
|
10
10
|
const PROCESS_IDENTITY_FIELDS = [
|
|
@@ -42,7 +42,9 @@ function mergeReconnectMetadata(server, local, now) {
|
|
|
42
42
|
archivedBy: void 0,
|
|
43
43
|
archiveReason: void 0,
|
|
44
44
|
// B-587: awake again — the hibernation stamp no longer describes us.
|
|
45
|
-
hibernation: void 0
|
|
45
|
+
hibernation: void 0,
|
|
46
|
+
// B-679: likewise the previous wrapper's offline-exit cursor.
|
|
47
|
+
exitCursor: void 0
|
|
46
48
|
};
|
|
47
49
|
}
|
|
48
50
|
function applyServerSnapshot(response, snapshot) {
|
|
@@ -63,6 +65,23 @@ function applyHibernationReplay(response) {
|
|
|
63
65
|
if (replaySeq === null) return { response, replaying: false };
|
|
64
66
|
return { response: { ...response, seq: replaySeq }, replaying: true };
|
|
65
67
|
}
|
|
68
|
+
function readExitCursor(metadata) {
|
|
69
|
+
const raw = metadata?.exitCursor;
|
|
70
|
+
if (!raw || typeof raw !== "object") return null;
|
|
71
|
+
const { at, seq } = raw;
|
|
72
|
+
if (typeof at !== "number" || typeof seq !== "number" || !Number.isInteger(seq) || seq < 0) return null;
|
|
73
|
+
return { at, seq, v: 1 };
|
|
74
|
+
}
|
|
75
|
+
function exitCursorStamp(seq, now) {
|
|
76
|
+
return { at: now, seq, v: 1 };
|
|
77
|
+
}
|
|
78
|
+
function applyReconnectReplay(response) {
|
|
79
|
+
const wake = applyHibernationReplay(response);
|
|
80
|
+
if (wake.replaying) return { response: wake.response, replay: { source: "hibernation", seq: wake.response.seq } };
|
|
81
|
+
const cursor = readExitCursor(response.metadata);
|
|
82
|
+
if (!cursor || cursor.seq >= response.seq) return { response, replay: null };
|
|
83
|
+
return { response: { ...response, seq: cursor.seq }, replay: { source: "offline-exit", seq: cursor.seq } };
|
|
84
|
+
}
|
|
66
85
|
|
|
67
86
|
const runtime = {
|
|
68
87
|
signal: (pid, signal) => process.kill(pid, signal),
|
|
@@ -216,9 +235,10 @@ async function claimSessionOrExit(happySessionId, options) {
|
|
|
216
235
|
process.on("exit", () => releaseSessionLock(happySessionId));
|
|
217
236
|
}
|
|
218
237
|
|
|
219
|
-
exports.
|
|
238
|
+
exports.applyReconnectReplay = applyReconnectReplay;
|
|
220
239
|
exports.applyServerSnapshot = applyServerSnapshot;
|
|
221
240
|
exports.claimSessionOrExit = claimSessionOrExit;
|
|
241
|
+
exports.exitCursorStamp = exitCursorStamp;
|
|
222
242
|
exports.mergeReconnectMetadata = mergeReconnectMetadata;
|
|
223
243
|
exports.processIdentityFields = processIdentityFields;
|
|
224
244
|
exports.readSessionLock = readSessionLock;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as hibernationReplaySeq } from './persistence-
|
|
1
|
+
import { n as hibernationReplaySeq } from './persistence-D2Djrf7t.mjs';
|
|
2
2
|
import { existsSync, readFileSync, unlinkSync, mkdirSync, renameSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { c as configuration, w as writePrivateFileSync } from './configuration-
|
|
5
|
-
import { l as logger } from './logger-
|
|
4
|
+
import { c as configuration, w as writePrivateFileSync } from './configuration-BPrfb17M.mjs';
|
|
5
|
+
import { l as logger } from './logger-LFr8iPgl.mjs';
|
|
6
6
|
import { s as snapshotTree, k as killSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
|
|
7
7
|
|
|
8
8
|
const PROCESS_IDENTITY_FIELDS = [
|
|
@@ -40,7 +40,9 @@ function mergeReconnectMetadata(server, local, now) {
|
|
|
40
40
|
archivedBy: void 0,
|
|
41
41
|
archiveReason: void 0,
|
|
42
42
|
// B-587: awake again — the hibernation stamp no longer describes us.
|
|
43
|
-
hibernation: void 0
|
|
43
|
+
hibernation: void 0,
|
|
44
|
+
// B-679: likewise the previous wrapper's offline-exit cursor.
|
|
45
|
+
exitCursor: void 0
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
function applyServerSnapshot(response, snapshot) {
|
|
@@ -61,6 +63,23 @@ function applyHibernationReplay(response) {
|
|
|
61
63
|
if (replaySeq === null) return { response, replaying: false };
|
|
62
64
|
return { response: { ...response, seq: replaySeq }, replaying: true };
|
|
63
65
|
}
|
|
66
|
+
function readExitCursor(metadata) {
|
|
67
|
+
const raw = metadata?.exitCursor;
|
|
68
|
+
if (!raw || typeof raw !== "object") return null;
|
|
69
|
+
const { at, seq } = raw;
|
|
70
|
+
if (typeof at !== "number" || typeof seq !== "number" || !Number.isInteger(seq) || seq < 0) return null;
|
|
71
|
+
return { at, seq, v: 1 };
|
|
72
|
+
}
|
|
73
|
+
function exitCursorStamp(seq, now) {
|
|
74
|
+
return { at: now, seq, v: 1 };
|
|
75
|
+
}
|
|
76
|
+
function applyReconnectReplay(response) {
|
|
77
|
+
const wake = applyHibernationReplay(response);
|
|
78
|
+
if (wake.replaying) return { response: wake.response, replay: { source: "hibernation", seq: wake.response.seq } };
|
|
79
|
+
const cursor = readExitCursor(response.metadata);
|
|
80
|
+
if (!cursor || cursor.seq >= response.seq) return { response, replay: null };
|
|
81
|
+
return { response: { ...response, seq: cursor.seq }, replay: { source: "offline-exit", seq: cursor.seq } };
|
|
82
|
+
}
|
|
64
83
|
|
|
65
84
|
const runtime = {
|
|
66
85
|
signal: (pid, signal) => process.kill(pid, signal),
|
|
@@ -214,4 +233,4 @@ async function claimSessionOrExit(happySessionId, options) {
|
|
|
214
233
|
process.on("exit", () => releaseSessionLock(happySessionId));
|
|
215
234
|
}
|
|
216
235
|
|
|
217
|
-
export { applyServerSnapshot as a,
|
|
236
|
+
export { applyServerSnapshot as a, applyReconnectReplay as b, claimSessionOrExit as c, terminateProcessTree as d, exitCursorStamp as e, mergeReconnectMetadata as m, processIdentityFields as p, readSessionLock as r, terminateProcess as t, withoutServerSnapshot as w };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var axios = require('axios');
|
|
4
|
-
var configuration = require('./configuration-
|
|
4
|
+
var configuration = require('./configuration-C8JgseHy.cjs');
|
|
5
5
|
var authRelay = require('./authRelay-Dy1qU9td.cjs');
|
|
6
|
-
var controlClient = require('./controlClient-
|
|
7
|
-
var persistence = require('./persistence-
|
|
6
|
+
var controlClient = require('./controlClient-D68Zj7Q-.cjs');
|
|
7
|
+
var persistence = require('./persistence-BY-D00wT.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
|
-
var time = require('./time-
|
|
9
|
+
var time = require('./time-nqa9shu8.cjs');
|
|
10
10
|
var socket_ioClient = require('socket.io-client');
|
|
11
11
|
var backgroundTaskActivity = require('./backgroundTaskActivity-CBvUdj39.cjs');
|
|
12
12
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import { c as configuration } from './configuration-
|
|
2
|
+
import { c as configuration } from './configuration-BPrfb17M.mjs';
|
|
3
3
|
import { e as encodeBase64, g as encrypt, d as decodeBase64, h as decrypt } from './authRelay-DhQhkBvX.mjs';
|
|
4
|
-
import { l as listDaemonSessions,
|
|
5
|
-
import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-
|
|
4
|
+
import { l as listDaemonSessions, f as stopDaemonSession } from './controlClient-CkNpT5zS.mjs';
|
|
5
|
+
import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-D2Djrf7t.mjs';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
|
-
import { d as delay } from './time-
|
|
7
|
+
import { d as delay } from './time-BcoJaG8E.mjs';
|
|
8
8
|
import { io } from 'socket.io-client';
|
|
9
|
-
import { b as backgroundTasksReport } from './backgroundTaskActivity-
|
|
9
|
+
import { b as backgroundTasksReport } from './backgroundTaskActivity-8PdPxrvy.mjs';
|
|
10
10
|
|
|
11
11
|
function sessionWebUrl(sessionId) {
|
|
12
12
|
return `${configuration.webappUrl.replace(/\/+$/, "")}/session/${sessionId}`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as InvalidateSync } from './sync-
|
|
1
|
+
import { I as InvalidateSync } from './sync-DO-2PU45.mjs';
|
|
2
2
|
import { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { statSync } from 'node:fs';
|
|
5
5
|
import { r as readTranscriptIncrement, i as isValidTranscriptHint } from './transcriptCursor-B7T_gkQ0.mjs';
|
|
6
|
-
import { l as logger } from './logger-
|
|
7
|
-
import { s as startFileWatcher } from './startFileWatcher-
|
|
6
|
+
import { l as logger } from './logger-LFr8iPgl.mjs';
|
|
7
|
+
import { s as startFileWatcher } from './startFileWatcher-4thXDK9d.mjs';
|
|
8
8
|
import { g as getProjectPath } from './path-D2wdaNSk.mjs';
|
|
9
9
|
|
|
10
10
|
class Future {
|