very-happy-cli 0.2.179 → 0.2.180

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.
Files changed (204) hide show
  1. package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-B8Zi30Zh.mjs} +3 -3
  2. package/dist/{AcpBackend-DFipFF7-.cjs → AcpBackend-DfRDtMcG.cjs} +3 -3
  3. package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CASKOnOj.cjs} +1 -1
  4. package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-i8Rab0xT.mjs} +1 -1
  5. package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-26fKbRCm.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-BlM_tfej.cjs} +1 -1
  7. package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-B9l54P-X.mjs} +1 -1
  8. package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-CR5pmgVo.cjs} +1 -1
  9. package/dist/{agentHome-BWcz8mz0.cjs → agentHome-C7Sb7-Tz.cjs} +4 -4
  10. package/dist/{agentHome-CghLvL_1.mjs → agentHome-CmGy0NWv.mjs} +4 -4
  11. package/dist/{api-Cmjfr8Z7.cjs → api-DM7b1OKj.cjs} +20 -12
  12. package/dist/{api-CzwFpJQc.mjs → api-Hov8p7CA.mjs} +21 -13
  13. package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CwGEhQDT.mjs} +33 -14
  14. package/dist/{apiMachine-G6OogT08.cjs → apiMachine-DkGRj-Ai.cjs} +35 -16
  15. package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-CEm13_gF.cjs} +2 -2
  16. package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-CIn4iPEk.mjs} +2 -2
  17. package/dist/{auth-BS6PaOOG.mjs → auth-BG1DY0gj.mjs} +5 -5
  18. package/dist/{auth-D6bBUwZa.cjs → auth-CBXnm-Mj.cjs} +5 -5
  19. package/dist/{auth-HEhRaNgL.cjs → auth-Dawj7pP5.cjs} +8 -8
  20. package/dist/{auth-DMX0xPNK.mjs → auth-rggxMpEE.mjs} +8 -8
  21. package/dist/{auto-Cl1SEDcD.mjs → auto-CXXLXGeL.mjs} +17 -17
  22. package/dist/{auto-C6I55iOh.cjs → auto-CbYOfoPS.cjs} +17 -17
  23. package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
  24. package/dist/{bootstrap-exVucYav.cjs → bootstrap-DoA7okld.cjs} +2 -2
  25. package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-Dt5I1SOl.mjs} +2 -2
  26. package/dist/{browser-CSYum7xH.mjs → browser-DUNetFT4.mjs} +1 -1
  27. package/dist/{browser-BohJK12g.cjs → browser-DZ6qRtfH.cjs} +1 -1
  28. package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
  29. package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal--DNyMOSv.cjs} +7 -7
  30. package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-OHWQigCl.mjs} +5 -5
  31. package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-BStvfa7M.mjs} +10 -10
  32. package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-BhvPbcyH.cjs} +12 -12
  33. package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-Be16vzGc.cjs} +1 -1
  34. package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-GAVWhiKG.mjs} +1 -1
  35. package/dist/{client-CuVdN6PP.cjs → client-BWjaHKtj.cjs} +2 -2
  36. package/dist/{client-BhoEBnuN.mjs → client-Ca5Pcgy_.mjs} +2 -2
  37. package/dist/{client-wo9nbxuf.mjs → client-CnB7kRCT.mjs} +2 -2
  38. package/dist/{client-DuTDwWSQ.mjs → client-D4uPb1uu.mjs} +3 -3
  39. package/dist/{client-ZjOsn6nZ.cjs → client-DJplzPjD.cjs} +2 -2
  40. package/dist/{client-BKcK1Bi-.cjs → client-D_loZ9IK.cjs} +3 -3
  41. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  42. package/dist/codex/happyMcpStdioBridge.mjs +17 -17
  43. package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-CO4G6OS4.mjs} +3 -3
  44. package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-PE-12AsW.cjs} +3 -3
  45. package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-BNoD1t1C.cjs} +80 -74
  46. package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-B_xUH79E.mjs} +54 -48
  47. package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BmBbizFK.cjs} +7 -2
  48. package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-Dx48ma6e.mjs} +7 -2
  49. package/dist/{config-B0uK6K7n.cjs → config-CtwEUxUP.cjs} +26 -26
  50. package/dist/{config-2oMG_fEI.mjs → config-DSu0Blos.mjs} +3 -3
  51. package/dist/{configuration-CMHZnp6G.cjs → configuration-CYO-kPOS.cjs} +1 -1
  52. package/dist/{configuration-WMi4idBB.mjs → configuration-PxzEJumr.mjs} +1 -1
  53. package/dist/{connect-BLVHhHzA.mjs → connect-BQrg3TB6.mjs} +14 -14
  54. package/dist/{connect-uaglGrde.cjs → connect-Dq7wndzR.cjs} +27 -27
  55. package/dist/{context-DXzU5bFM.cjs → context-6TP-iz_c.cjs} +1 -1
  56. package/dist/{context-DploEcoN.mjs → context-CJGRRGWW.mjs} +1 -1
  57. package/dist/{controlClient-C-5qCt8W.cjs → controlClient-Bqv5v5OM.cjs} +3 -3
  58. package/dist/{controlClient-BWUJrj3t.mjs → controlClient-DoeYovwP.mjs} +4 -4
  59. package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-DDIChCx8.mjs} +2 -2
  60. package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-xz767pcG.cjs} +3 -3
  61. package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-PkZGsQDk.cjs} +2 -2
  62. package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-i5KzdK09.mjs} +2 -2
  63. package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
  64. package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-CTEJDqtS.mjs} +12 -12
  65. package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-xqA6DaOm.cjs} +14 -14
  66. package/dist/{doctor-Br1Kcy2J.cjs → doctor-BrgSlfXn.cjs} +9 -9
  67. package/dist/{doctor-CmtSsR2-.mjs → doctor-IctjVh9T.mjs} +8 -8
  68. package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
  69. package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-CEb9che-.cjs} +6 -6
  70. package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-jbOz1egC.mjs} +6 -6
  71. package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-D-HyjGIX.cjs} +6 -6
  72. package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning-b1e8LCSM.mjs} +5 -5
  73. package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BvWVuRwH.cjs} +7 -7
  74. package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-DpaZvm2c.mjs} +6 -6
  75. package/dist/{index-DMqDMT1Q.cjs → index-B2p2Mut7.cjs} +42 -41
  76. package/dist/{index-BTxHphpV.mjs → index-BUNnpGFF.mjs} +42 -41
  77. package/dist/{index-CdQI0C9p.mjs → index-Bsvbgh9e.mjs} +4 -4
  78. package/dist/{index-B0UjHlAe.cjs → index-C64Ufj4D.cjs} +4 -4
  79. package/dist/{index-DPOa4NhL.mjs → index-C6Vn5Eac.mjs} +2 -0
  80. package/dist/{index-BiyC7cZ3.mjs → index-CMf5VbzG.mjs} +4 -4
  81. package/dist/{index-CUuc6iCn.cjs → index-DmTlDRSL.cjs} +4 -4
  82. package/dist/{index-C6O2vVjm.cjs → index-Dv0Q48P3.cjs} +2 -0
  83. package/dist/{index-D09T1m8Y.cjs → index-F2UejqYs.cjs} +3 -3
  84. package/dist/{index-D3bidoG8.mjs → index-wCbtF4BK.mjs} +3 -3
  85. package/dist/index.cjs +2 -2
  86. package/dist/index.mjs +2 -2
  87. package/dist/{install-CYRZxS87.cjs → install-C0ANcEAW.cjs} +7 -7
  88. package/dist/{install-hnve_9vq.mjs → install-CdzSV7qO.mjs} +3 -3
  89. package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
  90. package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
  91. package/dist/lib.cjs +13 -13
  92. package/dist/lib.d.cts +177 -1
  93. package/dist/lib.d.mts +177 -1
  94. package/dist/lib.mjs +13 -13
  95. package/dist/{lidState-Dv2wwFTj.cjs → lidState-DWGnm2H4.cjs} +1 -1
  96. package/dist/{lidState-Bb8fgXg3.mjs → lidState-bBrmaQd2.mjs} +1 -1
  97. package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZHQnIW9.cjs} +1 -1
  98. package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-Dn1jYDpt.mjs} +1 -1
  99. package/dist/{logger-BtVhHnD8.mjs → logger-BUngm5Xg.mjs} +2 -2
  100. package/dist/{logger-C1GWx3gi.cjs → logger-CphW5nUE.cjs} +2 -2
  101. package/dist/machineMetadata-BQm9YTcI.cjs +79 -0
  102. package/dist/machineMetadata-BXN_bKU3.mjs +68 -0
  103. package/dist/{main-CWhSsbtU.cjs → main-B2UV51nK.cjs} +99 -132
  104. package/dist/{main-B2LWV8DI.mjs → main-DGkdYfEq.mjs} +93 -126
  105. package/dist/{mcp-CARUsXHV.cjs → mcp-BFvAEIRz.cjs} +15 -15
  106. package/dist/{mcp-ext92q3Y.mjs → mcp-CbTtbs0f.mjs} +15 -15
  107. package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-BR4luBC0.mjs} +148 -7
  108. package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-HKPivs5o.cjs} +150 -4
  109. package/dist/{package-BPPebGQF.mjs → package-7Ld1YMhh.mjs} +8 -7
  110. package/dist/{package-SgqTYsjn.cjs → package-KhLqBDX9.cjs} +8 -7
  111. package/dist/{panels-BZ0_Tt7B.mjs → panels-C7IVqpJk.mjs} +5 -5
  112. package/dist/{panels-D1c7q2dD.cjs → panels-Njf6GelF.cjs} +5 -5
  113. package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-BOlDRyhi.mjs} +5 -5
  114. package/dist/{peerTools-DRQETXaz.cjs → peerTools-DQNlrcqM.cjs} +5 -5
  115. package/dist/{persistence-BegE7NPa.cjs → persistence-9BMYspxG.cjs} +2 -2
  116. package/dist/{persistence-Cr-wutZ4.mjs → persistence-BFUOHW5h.mjs} +2 -2
  117. package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-DGaq6VYM.cjs} +1 -1
  118. package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-H2pgpA5z.mjs} +1 -1
  119. package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-CT5xv_3h.cjs} +1 -1
  120. package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-CdN0JAsa.mjs} +1 -1
  121. package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-0FBtXTHK.cjs} +17 -17
  122. package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-C4m9YXAV.mjs} +17 -17
  123. package/dist/projectPath-C3ioB4Bu.cjs +13 -0
  124. package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DCiBEVeC.mjs} +7 -3
  125. package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-DI92havG.cjs} +7 -3
  126. package/dist/{query-Ctfg-5gy.cjs → query-BETKBrnz.cjs} +1 -1
  127. package/dist/{query-DYP_W1wp.mjs → query-ywZbQUzR.mjs} +1 -1
  128. package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-BkfuUB1a.mjs} +1 -1
  129. package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-YRIYVdo4.cjs} +1 -1
  130. package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-C7a_dUWs.cjs} +30 -30
  131. package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-CTkCvjxt.mjs} +2 -2
  132. package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-CIsvBrVe.cjs} +6 -6
  133. package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-CaqqRYq6.mjs} +6 -6
  134. package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-D843fkzL.cjs} +5 -5
  135. package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-PP-mOKmw.mjs} +5 -5
  136. package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-14AXr959.cjs} +3 -3
  137. package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-ZOCNjWHr.mjs} +3 -3
  138. package/dist/{run-CNXwIe0A.cjs → run-CAOCYYfT.cjs} +2650 -90
  139. package/dist/{run-BM4TxiyN.mjs → run-Dajw2E5j.mjs} +2644 -84
  140. package/dist/{runClaude-C_3I8hvR.mjs → runClaude-C6oxWYbp.mjs} +34 -28
  141. package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-CRRKt-tm.cjs} +35 -29
  142. package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-B1ysqTvx.cjs} +54 -119
  143. package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-BcZ68cX3.mjs} +47 -111
  144. package/dist/{runGemini-BEdWEZLR.mjs → runGemini-D7yKc4wD.mjs} +35 -35
  145. package/dist/{runGemini-CgRLYbt5.cjs → runGemini-DtKFXqf-.cjs} +63 -63
  146. package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-C8ilyLP9.mjs} +19 -19
  147. package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-Cq29mryb.cjs} +20 -20
  148. package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CbCutma4.mjs} +4 -4
  149. package/dist/{sandbox-nocIjliq.cjs → sandbox-gIj-EuF4.cjs} +4 -4
  150. package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-BTGBVthv.cjs} +39 -39
  151. package/dist/selfCheck-Smt-5Xiq.mjs +85 -0
  152. package/dist/{send-Dydf_hwZ.cjs → send-CZf5lLw_.cjs} +8 -8
  153. package/dist/{send-Ct7X4pPU.mjs → send-YZRMQvMJ.mjs} +9 -9
  154. package/dist/{server-DTQGZMxh.mjs → server-BqwXRzFZ.mjs} +4 -4
  155. package/dist/{server-CosABFbd.cjs → server-CknFq6xG.cjs} +6 -6
  156. package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
  157. package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
  158. package/dist/{sessionLock-DokGab2R.cjs → sessionLock-DRZUcKHT.cjs} +25 -5
  159. package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-nBXdJxJm.mjs} +24 -5
  160. package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-BrGiU9-s.cjs} +4 -4
  161. package/dist/{sessionOps-BIGgRube.mjs → sessionOps-C58iDeD5.mjs} +5 -5
  162. package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-Bm57LEXe.mjs} +3 -3
  163. package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-CaO8bLaG.cjs} +3 -3
  164. package/dist/{sessions-BJHEZpi2.mjs → sessions-BXyBHo8n.mjs} +11 -11
  165. package/dist/{sessions-JchI1w3z.cjs → sessions-uzqPCc37.cjs} +10 -10
  166. package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-1Qlek3wl.mjs} +2 -2
  167. package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-DvvVX3TB.cjs} +2 -2
  168. package/dist/{spawn-6PD7nnoC.cjs → spawn-DBkodJEO.cjs} +15 -15
  169. package/dist/{spawn-DgvUNYEo.mjs → spawn-vn93PhYL.mjs} +15 -15
  170. package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CgPMWexP.mjs} +1 -1
  171. package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-DLNMlhWJ.cjs} +1 -1
  172. package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-BjFZc_7V.mjs} +1 -1
  173. package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnUZv0X2.cjs} +2 -2
  174. package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-BRufxlqe.cjs} +3 -3
  175. package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-D3ND9bdg.mjs} +3 -3
  176. package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-D9cYzZOq.cjs} +1 -1
  177. package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-DXJ7yB5v.mjs} +1 -1
  178. package/dist/startupSessionCreate-kdr3m1uX.cjs +26 -0
  179. package/dist/startupSessionCreate-uZ6BM0ty.mjs +24 -0
  180. package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-DnMCMMfV.mjs} +1 -1
  181. package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Dy6amlzx.cjs} +1 -1
  182. package/dist/{sync-D23jbqVa.cjs → sync-Bn-idAoy.cjs} +1 -1
  183. package/dist/{sync-CSe0Rf45.mjs → sync-BvVhDO40.mjs} +1 -1
  184. package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-CIZcJuJF.mjs} +2 -2
  185. package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-DlyEk35T.cjs} +2 -2
  186. package/dist/{teams-Ov2BDT-A.cjs → teams-BLeRpDxv.cjs} +6 -6
  187. package/dist/{teams-DyY669f0.mjs → teams-DLY3B5yi.mjs} +6 -6
  188. package/dist/{time-CrwIMHta.cjs → time-Cjv0zxQO.cjs} +1 -1
  189. package/dist/{time-65DcU6Jx.mjs → time-D3ETL7Jb.mjs} +1 -1
  190. package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-Cgp5ihFb.cjs} +3 -3
  191. package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-Uzbd4utr.mjs} +1 -1
  192. package/dist/{todo-BDONw0sK.mjs → todo-C9Ga-oEM.mjs} +6 -6
  193. package/dist/{todo-KY-okGii.cjs → todo-pOMcEECE.cjs} +6 -6
  194. package/dist/{tools-_w52DZG6.cjs → tools-BL7Byl_x.cjs} +1 -1
  195. package/dist/{tools-D8-PnZEG.mjs → tools-Cho7iIWf.mjs} +1 -1
  196. package/dist/{uninstall-8vnLN-IE.cjs → uninstall-CbayEVoV.cjs} +6 -6
  197. package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CvZHVY9C.mjs} +3 -3
  198. package/package.json +8 -7
  199. package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
  200. package/dist/machineMetadata-D-g--oU_.mjs +0 -39
  201. package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
  202. package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
  203. package/dist/projectPath-ChLhdOyt.cjs +0 -13
  204. package/dist/selfCheck-CjCF4C3v.mjs +0 -85
@@ -0,0 +1,85 @@
1
+ import { p as packageJson } from './package-7Ld1YMhh.mjs';
2
+
3
+ const LAZY_MODULES = [
4
+ // Entry
5
+ ["main", () => import('./main-DGkdYfEq.mjs')],
6
+ ["selfCheck", () => Promise.resolve().then(function () { return selfCheck; })],
7
+ // Subcommands (main.ts)
8
+ ["api/api", () => import('./api-Hov8p7CA.mjs').then(function (n) { return n.b; })],
9
+ ["claude/claudeCliPath", () => import('./claudeCliPath-BqkaH2oR.mjs')],
10
+ ["claude/runClaude", () => import('./runClaude-C6oxWYbp.mjs')],
11
+ ["commands/agentHome", () => import('./agentHome-CmGy0NWv.mjs')],
12
+ ["commands/auth", () => import('./auth-rggxMpEE.mjs')],
13
+ ["commands/auto", () => import('./auto-CXXLXGeL.mjs')],
14
+ ["commands/codexCommand", () => import('./codexCommand-B_xUH79E.mjs')],
15
+ ["commands/connect", () => import('./connect-BQrg3TB6.mjs')],
16
+ ["commands/installPiTools", () => import('./installPiTools-B_CdM5_2.mjs')],
17
+ ["commands/installTerminalHooks", () => import('./installTerminalHooks-By7gBMEF.mjs')],
18
+ ["commands/mcp", () => import('./mcp-CbTtbs0f.mjs')],
19
+ ["commands/panels", () => import('./panels-C7IVqpJk.mjs')],
20
+ ["commands/piTerminal", () => import('./piTerminal-C4m9YXAV.mjs')],
21
+ ["commands/sandbox", () => import('./sandbox-CbCutma4.mjs')],
22
+ ["commands/send", () => import('./send-YZRMQvMJ.mjs')],
23
+ ["commands/server", () => import('./server-BqwXRzFZ.mjs')],
24
+ ["commands/sessions", () => import('./sessions-BXyBHo8n.mjs')],
25
+ ["commands/spawn", () => import('./spawn-vn93PhYL.mjs')],
26
+ ["commands/teams", () => import('./teams-DLY3B5yi.mjs')],
27
+ ["commands/todo", () => import('./todo-C9Ga-oEM.mjs')],
28
+ ["daemon/doctor", () => import('./doctor-BPkYWSuq.mjs')],
29
+ ["daemon/install", () => import('./install-CdzSV7qO.mjs')],
30
+ ["daemon/run", () => import('./run-Dajw2E5j.mjs')],
31
+ ["daemon/uninstall", () => import('./uninstall-CvZHVY9C.mjs')],
32
+ ["resume/handleResumeCommand", () => import('./handleResumeCommand-DpaZvm2c.mjs')],
33
+ ["ui/doctor", () => import('./doctor-IctjVh9T.mjs').then(function (n) { return n.d; })],
34
+ ["agent/acp", () => import('./index-BUNnpGFF.mjs')],
35
+ ["gemini/runGemini", () => import('./runGemini-D7yKc4wD.mjs')],
36
+ ["gemini/utils/config", () => import('./config-DSu0Blos.mjs')],
37
+ ["openclaw/runOpenClaw", () => import('./runOpenClaw-C8ilyLP9.mjs')],
38
+ ["persistence", () => import('./persistence-BFUOHW5h.mjs').then(function (n) { return n.F; })],
39
+ // Deferred halves of the runners and clients
40
+ ["api/apiMachine", () => import('./apiMachine-CwGEhQDT.mjs')],
41
+ ["claude/runClaudeDeps", () => import('./runClaudeDeps-BcZ68cX3.mjs')],
42
+ ["claude/claudeLocal", () => import('./claudeLocal-OHWQigCl.mjs')],
43
+ ["claude/claudeLocalLauncher", () => import('./claudeLocalLauncher-BStvfa7M.mjs')],
44
+ ["claude/sdk", () => import('./index-CMf5VbzG.mjs')],
45
+ ["assistant/bootstrap", () => import('./bootstrap-Dt5I1SOl.mjs')],
46
+ ["agentHome", () => import('./index-Bsvbgh9e.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 };
@@ -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-BegE7NPa.cjs');
7
- var sessionOps = require('./sessionOps-S-qPBLFf.cjs');
8
- var remoteSessionClient = require('./remoteSessionClient-B7i7MkYV.cjs');
6
+ var persistence = require('./persistence-9BMYspxG.cjs');
7
+ var sessionOps = require('./sessionOps-BrGiU9-s.cjs');
8
+ var remoteSessionClient = require('./remoteSessionClient-D843fkzL.cjs');
9
9
  require('node:fs/promises');
10
- require('./configuration-CMHZnp6G.cjs');
10
+ require('./configuration-CYO-kPOS.cjs');
11
11
  require('node:os');
12
- require('./package-SgqTYsjn.cjs');
12
+ require('./package-KhLqBDX9.cjs');
13
13
  require('zod');
14
14
  require('./authRelay-Dy1qU9td.cjs');
15
15
  require('node:crypto');
16
16
  require('tweetnacl');
17
- require('./logger-C1GWx3gi.cjs');
17
+ require('./logger-CphW5nUE.cjs');
18
18
  require('node:util');
19
19
  require('axios');
20
- require('./controlClient-C-5qCt8W.cjs');
21
- require('./time-CrwIMHta.cjs');
20
+ require('./controlClient-Bqv5v5OM.cjs');
21
+ require('./time-Cjv0zxQO.cjs');
22
22
  require('socket.io-client');
23
23
  require('./backgroundTaskActivity-CBvUdj39.cjs');
24
24
 
@@ -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-Cr-wutZ4.mjs';
5
- import { s as sessionWebUrl } from './sessionOps-BIGgRube.mjs';
6
- import { d as deliverToSession, s as sendRemoteMessage } from './remoteSessionClient-Bn2qu5C5.mjs';
4
+ import { c as readPersistedSessions } from './persistence-BFUOHW5h.mjs';
5
+ import { s as sessionWebUrl } from './sessionOps-C58iDeD5.mjs';
6
+ import { d as deliverToSession, s as sendRemoteMessage } from './remoteSessionClient-PP-mOKmw.mjs';
7
7
  import 'node:fs/promises';
8
- import './configuration-WMi4idBB.mjs';
8
+ import './configuration-PxzEJumr.mjs';
9
9
  import 'node:os';
10
- import './package-BPPebGQF.mjs';
10
+ import './package-7Ld1YMhh.mjs';
11
11
  import 'zod';
12
12
  import './authRelay-DhQhkBvX.mjs';
13
13
  import 'node:crypto';
14
14
  import 'tweetnacl';
15
- import './logger-BtVhHnD8.mjs';
15
+ import './logger-BUngm5Xg.mjs';
16
16
  import 'node:util';
17
17
  import 'axios';
18
- import './controlClient-BWUJrj3t.mjs';
19
- import './time-65DcU6Jx.mjs';
18
+ import './controlClient-DoeYovwP.mjs';
19
+ import './time-D3ETL7Jb.mjs';
20
20
  import 'socket.io-client';
21
- import './backgroundTaskActivity-BVwJBl02.mjs';
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}$/;
@@ -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-WMi4idBB.mjs';
10
- import { u as updateSettings } from './persistence-Cr-wutZ4.mjs';
9
+ import { c as configuration } from './configuration-PxzEJumr.mjs';
10
+ import { u as updateSettings } from './persistence-BFUOHW5h.mjs';
11
11
  import 'node:os';
12
- import './package-BPPebGQF.mjs';
12
+ import './package-7Ld1YMhh.mjs';
13
13
  import 'node:fs/promises';
14
14
  import 'zod';
15
15
  import './authRelay-DhQhkBvX.mjs';
16
16
  import 'tweetnacl';
17
- import './logger-BtVhHnD8.mjs';
17
+ import './logger-BUngm5Xg.mjs';
18
18
  import 'node:util';
19
19
 
20
20
  function resolveLocalSignupBootstrap(configuredMode, configuredInviteCodes, generatedInviteCode) {
@@ -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-CMHZnp6G.cjs');
12
- var persistence = require('./persistence-BegE7NPa.cjs');
11
+ var configuration = require('./configuration-CYO-kPOS.cjs');
12
+ var persistence = require('./persistence-9BMYspxG.cjs');
13
13
  require('node:os');
14
- require('./package-SgqTYsjn.cjs');
14
+ require('./package-KhLqBDX9.cjs');
15
15
  require('node:fs/promises');
16
16
  require('zod');
17
17
  require('./authRelay-Dy1qU9td.cjs');
18
18
  require('tweetnacl');
19
- require('./logger-C1GWx3gi.cjs');
19
+ require('./logger-CphW5nUE.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-CosABFbd.cjs', document.baseURI).href)));
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-CknFq6xG.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-CosABFbd.cjs', document.baseURI).href)));
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-CknFq6xG.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",
@@ -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-BegE7NPa.cjs');
3
+ var persistence = require('./persistence-9BMYspxG.cjs');
4
4
  var node_fs = require('node:fs');
5
5
  var path = require('node:path');
6
- var configuration = require('./configuration-CMHZnp6G.cjs');
7
- var logger = require('./logger-C1GWx3gi.cjs');
6
+ var configuration = require('./configuration-CYO-kPOS.cjs');
7
+ var logger = require('./logger-CphW5nUE.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.applyHibernationReplay = applyHibernationReplay;
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-Cr-wutZ4.mjs';
1
+ import { n as hibernationReplaySeq } from './persistence-BFUOHW5h.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-WMi4idBB.mjs';
5
- import { l as logger } from './logger-BtVhHnD8.mjs';
4
+ import { c as configuration, w as writePrivateFileSync } from './configuration-PxzEJumr.mjs';
5
+ import { l as logger } from './logger-BUngm5Xg.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, applyHibernationReplay as b, claimSessionOrExit as c, terminateProcessTree as d, mergeReconnectMetadata as m, processIdentityFields as p, readSessionLock as r, terminateProcess as t, withoutServerSnapshot as w };
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-CMHZnp6G.cjs');
4
+ var configuration = require('./configuration-CYO-kPOS.cjs');
5
5
  var authRelay = require('./authRelay-Dy1qU9td.cjs');
6
- var controlClient = require('./controlClient-C-5qCt8W.cjs');
7
- var persistence = require('./persistence-BegE7NPa.cjs');
6
+ var controlClient = require('./controlClient-Bqv5v5OM.cjs');
7
+ var persistence = require('./persistence-9BMYspxG.cjs');
8
8
  var node_crypto = require('node:crypto');
9
- var time = require('./time-CrwIMHta.cjs');
9
+ var time = require('./time-Cjv0zxQO.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-WMi4idBB.mjs';
2
+ import { c as configuration } from './configuration-PxzEJumr.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, s as stopDaemonSession } from './controlClient-BWUJrj3t.mjs';
5
- import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-Cr-wutZ4.mjs';
4
+ import { l as listDaemonSessions, f as stopDaemonSession } from './controlClient-DoeYovwP.mjs';
5
+ import { b as readCredentialsForConfiguredRelay, c as readPersistedSessions } from './persistence-BFUOHW5h.mjs';
6
6
  import { randomUUID } from 'node:crypto';
7
- import { d as delay } from './time-65DcU6Jx.mjs';
7
+ import { d as delay } from './time-D3ETL7Jb.mjs';
8
8
  import { io } from 'socket.io-client';
9
- import { b as backgroundTasksReport } from './backgroundTaskActivity-BVwJBl02.mjs';
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-CSe0Rf45.mjs';
1
+ import { I as InvalidateSync } from './sync-BvVhDO40.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-BtVhHnD8.mjs';
7
- import { s as startFileWatcher } from './startFileWatcher-DghDOCO4.mjs';
6
+ import { l as logger } from './logger-BUngm5Xg.mjs';
7
+ import { s as startFileWatcher } from './startFileWatcher-DXJ7yB5v.mjs';
8
8
  import { g as getProjectPath } from './path-D2wdaNSk.mjs';
9
9
 
10
10
  class Future {