very-happy-cli 0.2.191 → 0.2.192

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 (212) hide show
  1. package/dist/{AcpBackend-DgrIc1vH.cjs → AcpBackend-BQO4ShOy.cjs} +3 -3
  2. package/dist/{AcpBackend-CCy_9AfR.mjs → AcpBackend-CGHTDJd9.mjs} +3 -3
  3. package/dist/{AcpSessionManager-CQnxx7gD.mjs → AcpSessionManager-G0xD6Jbq.mjs} +2 -2
  4. package/dist/{AcpSessionManager-DVOzCD3P.cjs → AcpSessionManager-LlUMmcpB.cjs} +2 -2
  5. package/dist/{BasePermissionHandler-DYLN6Ec9.mjs → BasePermissionHandler-BmTIg376.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-C9Ag7yvs.cjs → BasePermissionHandler-N6Ip3tFt.cjs} +1 -1
  7. package/dist/account-CCVT-HO_.mjs +240 -0
  8. package/dist/account-DtaouikP.cjs +245 -0
  9. package/dist/accountService-Bddy0zwL.cjs +571 -0
  10. package/dist/accountService-Dd9uqde2.mjs +566 -0
  11. package/dist/{acpSessionResume-Bi7pA1n_.mjs → acpSessionResume-BWEUxNtC.mjs} +1 -1
  12. package/dist/{acpSessionResume-TvP_4Zq2.cjs → acpSessionResume-BnHDk5eD.cjs} +1 -1
  13. package/dist/{agentHome-DGv105SR.mjs → agentHome-B0VnjkZW.mjs} +4 -4
  14. package/dist/{agentHome-DNUKJWOY.cjs → agentHome-CqQ29YY7.cjs} +4 -4
  15. package/dist/{api-jfeMRg5R.mjs → api-_LeBScjg.mjs} +10 -10
  16. package/dist/{api-BBxZ7y2z.cjs → api-hMDsC6Wg.cjs} +10 -10
  17. package/dist/{apiMachine-DRJ7y-BB.mjs → apiMachine-CgRldeJ6.mjs} +76 -21
  18. package/dist/{apiMachine-DqyjKBZG.cjs → apiMachine-CqW2m6Zr.cjs} +81 -26
  19. package/dist/{attachmentContent-BO2njyza.cjs → attachmentContent-BEeT2J5n.cjs} +2 -2
  20. package/dist/{attachmentContent-Dm_RIs5L.mjs → attachmentContent-CyptLIfq.mjs} +2 -2
  21. package/dist/{auth-DnxoVkkf.cjs → auth-C9NvNHhL.cjs} +5 -5
  22. package/dist/{auth-DLR3ksCF.cjs → auth-CA1OClsW.cjs} +8 -8
  23. package/dist/{auth-BYDtjVNb.mjs → auth-CFQikywl.mjs} +8 -8
  24. package/dist/{auth-DC6rg8lJ.mjs → auth-DL8_J9vu.mjs} +5 -5
  25. package/dist/{auto-D5Jhukq1.mjs → auto-CKI05w1D.mjs} +17 -17
  26. package/dist/{auto-CwO0u8hB.cjs → auto-uQOxlxLp.cjs} +17 -17
  27. package/dist/{bootstrap-rLaL3kTa.mjs → bootstrap-DaZ0Np7X.mjs} +2 -2
  28. package/dist/{bootstrap-sly4qPPY.cjs → bootstrap-DsZGc69k.cjs} +2 -2
  29. package/dist/{browser-CHpVgyni.mjs → browser-BUIaSHK2.mjs} +1 -1
  30. package/dist/{browser-BTgZ9d4i.cjs → browser-Ft0ASDm7.cjs} +1 -1
  31. package/dist/claudeAccountEnv-BOBpJ3k8.cjs +137 -0
  32. package/dist/claudeAccountEnv-ON24i0qv.mjs +132 -0
  33. package/dist/{claudeLocal-Bgb5GGsq.mjs → claudeLocal-B1ZVtryl.mjs} +5 -5
  34. package/dist/{claudeLocal-1vuTFcL8.cjs → claudeLocal-BMf9t4Fa.cjs} +5 -5
  35. package/dist/{claudeLocalLauncher-T7EfT68h.mjs → claudeLocalLauncher-Bp8bqF4y.mjs} +10 -10
  36. package/dist/{claudeLocalLauncher-DOsL6HFY.cjs → claudeLocalLauncher-C8TeJcfF.cjs} +10 -10
  37. package/dist/{claudeSessionFork-CPvi6yDX.mjs → claudeSessionFork-8AA47z8Y.mjs} +1 -1
  38. package/dist/{claudeSessionFork-Cko4SaVi.cjs → claudeSessionFork-YiktY55n.cjs} +1 -1
  39. package/dist/{client-Bi20Ka0h.mjs → client-Bm4oKvW7.mjs} +2 -2
  40. package/dist/{client-Bh1aUPh-.mjs → client-BmPaBnDK.mjs} +4 -4
  41. package/dist/{client-C-OdTbrU.cjs → client-CFHZfh9x.cjs} +4 -4
  42. package/dist/{client-BscskEBk.cjs → client-Crh8_cNx.cjs} +2 -2
  43. package/dist/{client-BXD66ZF5.mjs → client-Cxlp_D4I.mjs} +2 -2
  44. package/dist/{client-C5-C0t2a.cjs → client-D8XROyZc.cjs} +2 -2
  45. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  46. package/dist/codex/happyMcpStdioBridge.mjs +16 -16
  47. package/dist/{codexAppServerClient-DXhAf6i-.mjs → codexAppServerClient-BWJbLCQn.mjs} +3 -3
  48. package/dist/{codexAppServerClient-DKXeikEe.cjs → codexAppServerClient-q8GHQhyC.cjs} +3 -3
  49. package/dist/{codexCommand-CIaOiiOj.mjs → codexCommand-BfXfRQr4.mjs} +50 -48
  50. package/dist/{codexCommand-DvbbpYBS.cjs → codexCommand-BgpGg-Zy.cjs} +50 -48
  51. package/dist/{codexTermination-BszWfyk5.cjs → codexTermination-CVUF0X75.cjs} +1 -1
  52. package/dist/{codexTermination-BcQdEDaw.mjs → codexTermination-s9fd1gkA.mjs} +1 -1
  53. package/dist/{config-Di3Cf6js.cjs → config-BAjyTyYp.cjs} +3 -3
  54. package/dist/{config-OCEcVVK1.mjs → config-BF8XgLyc.mjs} +3 -3
  55. package/dist/{configuration-DfPBa-9d.cjs → configuration-CXEVKAyF.cjs} +1 -1
  56. package/dist/{configuration-ECqXu34R.mjs → configuration-IhRiLDVe.mjs} +1 -1
  57. package/dist/{connect-BTfAUhk8.mjs → connect-LZh1gr08.mjs} +13 -13
  58. package/dist/{connect-BPQRuOw5.cjs → connect-rCS56arw.cjs} +13 -13
  59. package/dist/{context-Co7hUaW-.cjs → context-3_S_mWz9.cjs} +1 -1
  60. package/dist/{context-CfgTFpCB.mjs → context-DO6F5YwH.mjs} +1 -1
  61. package/dist/{controlClient-ClI7A0qE.mjs → controlClient-8ILulwjc.mjs} +14 -5
  62. package/dist/{controlClient-C13_pSKG.cjs → controlClient-j7p5p3_7.cjs} +15 -4
  63. package/dist/{createSessionMetadata-Cf78KHtt.cjs → createSessionMetadata-DwdD_uVo.cjs} +2 -2
  64. package/dist/{createSessionMetadata-B0eT_Kfj.mjs → createSessionMetadata-oyaTZm1b.mjs} +2 -2
  65. package/dist/daemonAccounts-BCjDgoNt.cjs +51 -0
  66. package/dist/daemonAccounts-BJgt6IJe.mjs +27 -0
  67. package/dist/{defaultPermissionMode-oqTupStc.cjs → defaultPermissionMode-BFShzF55.cjs} +1 -1
  68. package/dist/{defaultPermissionMode-m6z2QVyP.mjs → defaultPermissionMode-Lt3PUCwY.mjs} +1 -1
  69. package/dist/{deterministicJson-CpFFgUL_.cjs → deterministicJson-DUN0v3St.cjs} +13 -13
  70. package/dist/{deterministicJson-BtSwbsok.mjs → deterministicJson-Dfp-7wUZ.mjs} +13 -13
  71. package/dist/{doctor-lsxmAK4o.mjs → doctor-B_UwMcVT.mjs} +7 -7
  72. package/dist/{doctor-BEU0_1Xv.cjs → doctor-FgUYTbAT.cjs} +7 -7
  73. package/dist/{downloadTarget-CikzJv1h.cjs → downloadTarget-BrrQEDxg.cjs} +6 -6
  74. package/dist/{downloadTarget-BXqXhNF7.mjs → downloadTarget-C0d6jRx-.mjs} +6 -6
  75. package/dist/{ensureDaemonRunning-BUuH-pbE.cjs → ensureDaemonRunning-Cq4FYI5Q.cjs} +5 -5
  76. package/dist/{ensureDaemonRunning-B_9WAlbU.mjs → ensureDaemonRunning-KUMFfIil.mjs} +5 -5
  77. package/dist/{handleResumeCommand-BK9XKH_l.mjs → handleResumeCommand-BGhVo3QH.mjs} +5 -5
  78. package/dist/{handleResumeCommand-Dj7oi2KO.cjs → handleResumeCommand-Cl9GIL5F.cjs} +5 -5
  79. package/dist/{index-BdOJOZ6J.mjs → index-BjXjMhGY.mjs} +4 -4
  80. package/dist/{index-CLUHaPU8.cjs → index-BzAYnYct.cjs} +110 -0
  81. package/dist/{index-CmZusg8Q.cjs → index-CQ_hLLCj.cjs} +3 -3
  82. package/dist/{index-Dg2NAF_-.cjs → index-CRipkiqo.cjs} +4 -4
  83. package/dist/{index-D3c7CLot.cjs → index-CZaLMmPC.cjs} +4 -4
  84. package/dist/{index-Cxso1rg4.mjs → index-Ca1Tt96A.mjs} +45 -41
  85. package/dist/{index-CauRYQKr.cjs → index-D8ODb0_U.cjs} +44 -40
  86. package/dist/{index-Bq8NKSCF.mjs → index-DYD3GM1m.mjs} +104 -1
  87. package/dist/{index-BjZnpGWX.mjs → index-JQDyJ3Li.mjs} +3 -3
  88. package/dist/{index-DuK9XYbZ.mjs → index-v5EmjT8l.mjs} +4 -4
  89. package/dist/index.cjs +2 -2
  90. package/dist/index.mjs +2 -2
  91. package/dist/{install-DXllkuy0.cjs → install-ClUA9tbC.cjs} +3 -3
  92. package/dist/{install-DTIveLOS.mjs → install-D6EHRtAN.mjs} +3 -3
  93. package/dist/lib.cjs +12 -12
  94. package/dist/lib.d.cts +282 -0
  95. package/dist/lib.d.mts +282 -0
  96. package/dist/lib.mjs +12 -12
  97. package/dist/{lidState-CD81ryTy.mjs → lidState-CZOXXdzv.mjs} +1 -1
  98. package/dist/{lidState-C9_DoF9i.cjs → lidState-DqoN7zH4.cjs} +1 -1
  99. package/dist/{localHappyAgentAuth-CCjUvOfi.cjs → localHappyAgentAuth-BnGCpHRX.cjs} +1 -1
  100. package/dist/{localHappyAgentAuth-Cg-m1lwm.mjs → localHappyAgentAuth-YHxDZ4x4.mjs} +1 -1
  101. package/dist/{logger-Ct2zvaq0.cjs → logger-8su64lqR.cjs} +2 -2
  102. package/dist/{logger-GcbI0eg2.mjs → logger-Fd_rNvgd.mjs} +2 -2
  103. package/dist/{machineMetadata-CXRmFNOV.mjs → machineMetadata-1HIIC7Bc.mjs} +3 -3
  104. package/dist/{machineMetadata-DDCVWb_x.cjs → machineMetadata-DYXt3p6u.cjs} +3 -3
  105. package/dist/{main-omGr_ONk.mjs → main-BI6GIzUL.mjs} +92 -48
  106. package/dist/{main-BHC-WIcM.cjs → main-C_GrcYkn.cjs} +92 -48
  107. package/dist/{mcp-xUzii0m8.cjs → mcp-BycIv9oQ.cjs} +18 -15
  108. package/dist/{mcp-D5hxmRAq.mjs → mcp-XGoxywno.mjs} +18 -15
  109. package/dist/{mirrorProtocol-Dfl8Ahyf.cjs → mirrorProtocol-DVnB8EO8.cjs} +3 -3
  110. package/dist/{mirrorProtocol-Lcx20Oby.mjs → mirrorProtocol-DXT3rv7T.mjs} +3 -3
  111. package/dist/{package-BsUHyqWe.mjs → package-6KkRAops.mjs} +7 -7
  112. package/dist/{package-9n7wd2dT.cjs → package-iuLlSiSF.cjs} +7 -7
  113. package/dist/{panels-BfknEmt7.cjs → panels-0C89q0Tu.cjs} +5 -5
  114. package/dist/{panels-CpEKWWbI.mjs → panels-B5Di2zb2.mjs} +5 -5
  115. package/dist/{peerTools-CElYh-5u.cjs → peerTools-CANTX_mG.cjs} +5 -5
  116. package/dist/{peerTools-CwCe6tmJ.mjs → peerTools-CKJ-IDM4.mjs} +5 -5
  117. package/dist/{persistence-A2NeERZJ.cjs → persistence-B4ttN-fR.cjs} +2 -2
  118. package/dist/{persistence-Cpw4yJs8.mjs → persistence-DWcHe035.mjs} +2 -2
  119. package/dist/{piRunnerArgs-BnFU0K73.cjs → piRunnerArgs-BOkfxyak.cjs} +1 -1
  120. package/dist/{piRunnerArgs-Bqmu16He.mjs → piRunnerArgs-Bl5GpBoN.mjs} +2 -2
  121. package/dist/{piRuntime-Cgn1b0OX.mjs → piRuntime-BhwxzdQf.mjs} +1 -1
  122. package/dist/{piRuntime-DpS9TAIs.cjs → piRuntime-DzrIiZU8.cjs} +1 -1
  123. package/dist/{piTerminal-rmve-VlI.cjs → piTerminal-BdS7ol7v.cjs} +20 -17
  124. package/dist/{piTerminal-BGdps8f3.mjs → piTerminal-DnA2CbGr.mjs} +20 -17
  125. package/dist/{pushNotifications-23YSd-0l.cjs → pushNotifications-BqFoLye2.cjs} +5 -3
  126. package/dist/{pushNotifications-XAM8__Pg.mjs → pushNotifications-DkQ0yvFs.mjs} +5 -3
  127. package/dist/{query-u2GX-I0C.cjs → query-BQ4br3yn.cjs} +1 -1
  128. package/dist/{query-SZcYnJoW.mjs → query-BRJYSkb1.mjs} +1 -1
  129. package/dist/{rateLimitReporter-COUkf446.mjs → rateLimitReporter-BRbYkmuP.mjs} +3 -3
  130. package/dist/{rateLimitReporter-CaTzBe3x.cjs → rateLimitReporter-DK5SQuCc.cjs} +3 -3
  131. package/dist/{rateLimitWindows-B2Kx6L0S.cjs → rateLimitWindows-DBfiuYeg.cjs} +1 -1
  132. package/dist/{rateLimitWindows-j_qQk0KY.mjs → rateLimitWindows-Da5AR-4u.mjs} +1 -1
  133. package/dist/reconnectEnv-B31lY4nR.cjs +27 -0
  134. package/dist/reconnectEnv-DeSvHl3q.mjs +24 -0
  135. package/dist/{registerCommonHandlers-D1MiSfcB.cjs → registerCommonHandlers-m6pxxf2J.cjs} +2 -2
  136. package/dist/{registerCommonHandlers-DRRfinzK.mjs → registerCommonHandlers-yQ7Ru-l0.mjs} +2 -2
  137. package/dist/{registerKillSessionHandler-hvCsEn7b.cjs → registerKillSessionHandler-BAOIa_Fs.cjs} +6 -6
  138. package/dist/{registerKillSessionHandler-Cpug_r5C.mjs → registerKillSessionHandler-BDNpi7YO.mjs} +6 -6
  139. package/dist/{remoteSessionClient-BdnJ_n8C.mjs → remoteSessionClient-CZ7aaNgj.mjs} +5 -5
  140. package/dist/{remoteSessionClient-6ymeMVa4.cjs → remoteSessionClient-iJMXRN_D.cjs} +5 -5
  141. package/dist/{reportProgressTool-XgQBzxoD.mjs → reportProgressTool-DfQhPu0s.mjs} +3 -3
  142. package/dist/{reportProgressTool-tzQLCLIw.cjs → reportProgressTool-DpFs7pSe.cjs} +3 -3
  143. package/dist/{run-Bt0AklUU.mjs → run-CwN28mcj.mjs} +211 -51
  144. package/dist/{run-DYL_wuj7.cjs → run-p-xp1_HY.cjs} +210 -50
  145. package/dist/{runClaude-CBEpYO4S.cjs → runClaude-D6U1Z575.cjs} +62 -44
  146. package/dist/{runClaude-C3rii_S6.mjs → runClaude-DRKtAGTm.mjs} +62 -44
  147. package/dist/{runClaudeDeps-DlVfMG4F.mjs → runClaudeDeps-BheVcIlD.mjs} +56 -47
  148. package/dist/{runClaudeDeps-CYuozSC6.cjs → runClaudeDeps-Dkofokgb.cjs} +51 -42
  149. package/dist/{runGemini-CEI3b90u.cjs → runGemini-C8q3YCc0.cjs} +33 -33
  150. package/dist/{runGemini-DkYhRk9S.mjs → runGemini-owbvhFbi.mjs} +33 -33
  151. package/dist/{runOpenClaw-BgjD6E4d.cjs → runOpenClaw-DGeN66-t.cjs} +18 -18
  152. package/dist/{runOpenClaw-DpprWCoz.mjs → runOpenClaw-Dky3-mjO.mjs} +18 -18
  153. package/dist/{sandbox-XCDUbH72.cjs → sandbox-D2CPyoCA.cjs} +4 -4
  154. package/dist/{sandbox-DJ7A7lsy.mjs → sandbox-sq_wy9Gl.mjs} +4 -4
  155. package/dist/{selfCheck-BYUDB1Uq.cjs → selfCheck-BgLvQKSt.cjs} +39 -37
  156. package/dist/selfCheck-vkfrgQ7X.mjs +88 -0
  157. package/dist/{send-CASDBCyJ.cjs → send-Cd10YhXh.cjs} +8 -8
  158. package/dist/{send-Ba63huxv.mjs → send-K9vg-8t-.mjs} +8 -8
  159. package/dist/{server-cZoV9XRt.cjs → server-DRrV64r0.cjs} +6 -6
  160. package/dist/{server-w3W0toNd.mjs → server-De4W1zuK.mjs} +4 -4
  161. package/dist/{sessionLock-BmLA2S8K.cjs → sessionLock-BDtSzzKS.cjs} +10 -3
  162. package/dist/{sessionLock-G2PMqvsh.mjs → sessionLock-Dl6i7IgA.mjs} +10 -4
  163. package/dist/{sessionOps-DXlTmS7J.cjs → sessionOps-DvnEH4PL.cjs} +4 -4
  164. package/dist/{sessionOps-DPw5k8vV.mjs → sessionOps-gU88-W9F.mjs} +4 -4
  165. package/dist/sessionProvider-CKcIo7KO.mjs +108 -0
  166. package/dist/sessionProvider-CbSZeZrl.cjs +113 -0
  167. package/dist/{sessionScanner-AHjnicxi.cjs → sessionScanner-7RtcCeyD.cjs} +3 -3
  168. package/dist/{sessionScanner-BCXpdZJN.mjs → sessionScanner-DR32uSby.mjs} +3 -3
  169. package/dist/{sessions-BiBXOBx0.cjs → sessions-BvuMjgvJ.cjs} +10 -10
  170. package/dist/{sessions-Clk8MR5Y.mjs → sessions-DTt2Eguk.mjs} +10 -10
  171. package/dist/{setupOfflineReconnection-DI-QZGYz.mjs → setupOfflineReconnection-BGnvhRfb.mjs} +2 -2
  172. package/dist/{setupOfflineReconnection-BKLfOd-i.cjs → setupOfflineReconnection-DduOsw6p.cjs} +2 -2
  173. package/dist/{spawn-4tsp1uhh.mjs → spawn-CL3cUc7b.mjs} +26 -17
  174. package/dist/{spawn-D5omsx1Q.cjs → spawn-DMB6rRPA.cjs} +26 -17
  175. package/dist/{spawnAgents-CtkkIFHd.cjs → spawnAgents-CClb7buD.cjs} +1 -1
  176. package/dist/{spawnAgents-CjoU6ZOS.mjs → spawnAgents-CRMfOJhh.mjs} +1 -1
  177. package/dist/{spawnHappyCLI-CIA9Sc_5.mjs → spawnHappyCLI-Cj_6IICe.mjs} +1 -1
  178. package/dist/{spawnHappyCLI-CF_gLi92.cjs → spawnHappyCLI-DJdhX_Qx.cjs} +1 -1
  179. package/dist/{startFileWatcher-CDO6fb2m.mjs → startFileWatcher-DikVa8kg.mjs} +1 -1
  180. package/dist/{startFileWatcher-9Stpxe7p.cjs → startFileWatcher-LnOmVW6H.cjs} +1 -1
  181. package/dist/{startupSessionCreate-CcF7rGGB.cjs → startupSessionCreate-B3ND-917.cjs} +3 -3
  182. package/dist/{startupSessionCreate-BtR4iYEC.mjs → startupSessionCreate-CDdaLaMq.mjs} +3 -3
  183. package/dist/store--XN-7MS0.mjs +269 -0
  184. package/dist/store-DV__wCvP.cjs +289 -0
  185. package/dist/{streamRelay-BhI6jqF-.cjs → streamRelay-DFdOaLOn.cjs} +1 -1
  186. package/dist/{streamRelay-DMwOMTKf.mjs → streamRelay-sABnxEXq.mjs} +1 -1
  187. package/dist/{sync-C0PRuTMj.mjs → sync-JoEZKRo8.mjs} +1 -1
  188. package/dist/{sync-Ba8N6xba.cjs → sync-_2lsZ1U2.cjs} +1 -1
  189. package/dist/{systemPrompt-DV5IReD4.cjs → systemPrompt-CJEvNCuW.cjs} +2 -2
  190. package/dist/{systemPrompt-D0q8eyjy.mjs → systemPrompt-Zq4HyrZ5.mjs} +2 -2
  191. package/dist/{teams-z3Gp-KlV.cjs → teams-BNZafnrT.cjs} +7 -7
  192. package/dist/{teams-BO3_arwM.mjs → teams-qz4LqKJ2.mjs} +7 -7
  193. package/dist/{template-DLR_0hfj.mjs → template-CJ8BWSsc.mjs} +1 -1
  194. package/dist/{template-B_5l6pkc.cjs → template-LgvBbOna.cjs} +1 -1
  195. package/dist/{time-Cy0a-7YX.cjs → time-CaUlWSNJ.cjs} +1 -1
  196. package/dist/{time-D0jvDRhn.mjs → time-bzmet4s5.mjs} +1 -1
  197. package/dist/{titleGenerator-RGHWP2YL.cjs → titleGenerator-BuIIu_JP.cjs} +17 -13
  198. package/dist/{titleGenerator-AGQsXskb.mjs → titleGenerator-CbTtJ_1D.mjs} +16 -12
  199. package/dist/{todo-CzIDPLFy.cjs → todo-CQ_BTf9C.cjs} +6 -6
  200. package/dist/{todo-BZ954vsz.mjs → todo-DIrVF_Ak.mjs} +6 -6
  201. package/dist/{tools-B1x1j6tz.cjs → tools-BnmmFZji.cjs} +1 -1
  202. package/dist/{tools-Bei5i03L.mjs → tools-cLOjBvPn.mjs} +1 -1
  203. package/dist/{uninstall-B4T_e3Mr.mjs → uninstall-C5OuW6dE.mjs} +3 -3
  204. package/dist/{uninstall-C3cnIvz1.cjs → uninstall-uEEGKB84.cjs} +3 -3
  205. package/dist/wrapperAccount-DXlD3bsO.mjs +106 -0
  206. package/dist/wrapperAccount-DzoGqS2b.cjs +110 -0
  207. package/package.json +7 -7
  208. package/dist/providerBinding-B-Qbx9W2.cjs +0 -140
  209. package/dist/providerBinding-CYubGg-Z.mjs +0 -132
  210. package/dist/selfCheck-C-rNljKV.mjs +0 -86
  211. package/dist/sessionProvider-DUn91LhJ.mjs +0 -109
  212. package/dist/sessionProvider-Dg691XQ4.cjs +0 -114
@@ -0,0 +1,106 @@
1
+ import { mkdirSync, writeFileSync, chmodSync, readFileSync, rmSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { dirname, join } from 'node:path';
4
+ import { r as resolveClaudeAccount, a as applyAccountEnv, o as overridingUserSettings } from './claudeAccountEnv-ON24i0qv.mjs';
5
+ import { r as readSessionBindings, w as writeSessionBinding, d as defaultSecretProbe, a as readAccounts, c as readAccountsFileV2, f as writeAccountsFile } from './store--XN-7MS0.mjs';
6
+
7
+ let current = null;
8
+ let home = null;
9
+ let currentSettings = {};
10
+ function accountClaudeSettings() {
11
+ return currentSettings;
12
+ }
13
+ function unavailableNotice(profile) {
14
+ const why = {
15
+ missing: "it no longer exists on this machine",
16
+ "missing-secret": "its key / token is missing on this machine",
17
+ expired: "its sign-in has expired \u2014 sign in again",
18
+ invalid: "its key was rejected \u2014 fix the key"
19
+ };
20
+ return `Account "${profile.label}" is unavailable: ${why[profile.reason ?? ""] ?? profile.reason ?? "unknown reason"}. This session will not fall back to the machine login; switch accounts or fix it, and the session restarts in place.`;
21
+ }
22
+ function shouldRecordSpawnAccount(spawnAccountId, hasBinding) {
23
+ return !!spawnAccountId && !hasBinding;
24
+ }
25
+ function loadWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env) {
26
+ home = happyHome;
27
+ currentSettings = {};
28
+ let bindings = readSessionBindings(happyHome);
29
+ if (shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
30
+ writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
31
+ bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
32
+ }
33
+ const probe = defaultSecretProbe(env);
34
+ const resolution = resolveClaudeAccount(sessionId, {
35
+ home: happyHome,
36
+ accounts: readAccounts(happyHome),
37
+ bindings,
38
+ fileReadable: probe.fileReadable,
39
+ env,
40
+ nodePath: process.execPath,
41
+ envKeyCopyPath: (id) => join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`),
42
+ readSecret: (path) => readFileSync(path, "utf8"),
43
+ now: Date.now()
44
+ });
45
+ if (resolution.kind === "machine") {
46
+ current = null;
47
+ return { profile: null, settings: {}, unavailable: false, notices: [], cleanup: () => {
48
+ } };
49
+ }
50
+ let cleanup = () => {
51
+ };
52
+ if (resolution.kind === "active" && resolution.envKeyCopy) {
53
+ const { name, path } = resolution.envKeyCopy;
54
+ mkdirSync(dirname(path), { recursive: true, mode: 448 });
55
+ writeFileSync(path, (env[name] ?? "").trim() + "\n", { mode: 384 });
56
+ chmodSync(path, 384);
57
+ delete env[name];
58
+ cleanup = () => rmSync(path, { force: true });
59
+ }
60
+ applyAccountEnv(env, resolution);
61
+ const notices = [];
62
+ if (resolution.kind === "unavailable") {
63
+ current = null;
64
+ notices.push(unavailableNotice(resolution.profile));
65
+ return { profile: resolution.profile, settings: {}, unavailable: true, notices, cleanup };
66
+ }
67
+ current = { id: resolution.id, kind: resolution.profile.kind };
68
+ currentSettings = resolution.settings;
69
+ const overrides = overridingUserSettings(readUserClaudeSettings(env), resolution.profile.kind);
70
+ if (overrides.length > 0) {
71
+ notices.push(`Your Claude settings.json sets ${overrides.join(", ")}, which takes precedence over account "${resolution.profile.label}". Remove it there for the account to apply.`);
72
+ }
73
+ return {
74
+ profile: resolution.profile,
75
+ settings: resolution.settings,
76
+ ...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
77
+ unavailable: false,
78
+ notices,
79
+ cleanup
80
+ };
81
+ }
82
+ function readUserClaudeSettings(env) {
83
+ const dir = env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude");
84
+ try {
85
+ return JSON.parse(readFileSync(join(dir, "settings.json"), "utf8"));
86
+ } catch {
87
+ return void 0;
88
+ }
89
+ }
90
+ function noteAccountAuthFailure(now = Date.now()) {
91
+ if (!current || !home) return false;
92
+ const status = current.kind === "claude-subscription" ? "expired" : "invalid";
93
+ try {
94
+ const file = readAccountsFileV2(home);
95
+ const record = file.accounts[current.id];
96
+ if (record) {
97
+ record.check = { status, at: now, detail: "rejected during a session" };
98
+ writeAccountsFile(home, file);
99
+ return { label: record.label, status };
100
+ }
101
+ } catch {
102
+ }
103
+ return { label: current.id, status };
104
+ }
105
+
106
+ export { accountClaudeSettings as a, loadWrapperAccount as l, noteAccountAuthFailure as n };
@@ -0,0 +1,110 @@
1
+ 'use strict';
2
+
3
+ var node_fs = require('node:fs');
4
+ var os = require('node:os');
5
+ var path = require('node:path');
6
+ var claudeAccountEnv = require('./claudeAccountEnv-BOBpJ3k8.cjs');
7
+ var store = require('./store-DV__wCvP.cjs');
8
+
9
+ let current = null;
10
+ let home = null;
11
+ let currentSettings = {};
12
+ function accountClaudeSettings() {
13
+ return currentSettings;
14
+ }
15
+ function unavailableNotice(profile) {
16
+ const why = {
17
+ missing: "it no longer exists on this machine",
18
+ "missing-secret": "its key / token is missing on this machine",
19
+ expired: "its sign-in has expired \u2014 sign in again",
20
+ invalid: "its key was rejected \u2014 fix the key"
21
+ };
22
+ return `Account "${profile.label}" is unavailable: ${why[profile.reason ?? ""] ?? profile.reason ?? "unknown reason"}. This session will not fall back to the machine login; switch accounts or fix it, and the session restarts in place.`;
23
+ }
24
+ function shouldRecordSpawnAccount(spawnAccountId, hasBinding) {
25
+ return !!spawnAccountId && !hasBinding;
26
+ }
27
+ function loadWrapperAccount(happyHome, sessionId, spawnAccountId, env = process.env) {
28
+ home = happyHome;
29
+ currentSettings = {};
30
+ let bindings = store.readSessionBindings(happyHome);
31
+ if (shouldRecordSpawnAccount(spawnAccountId, sessionId in bindings)) {
32
+ store.writeSessionBinding(happyHome, sessionId, { account: spawnAccountId });
33
+ bindings = { ...bindings, [sessionId]: { account: spawnAccountId } };
34
+ }
35
+ const probe = store.defaultSecretProbe(env);
36
+ const resolution = claudeAccountEnv.resolveClaudeAccount(sessionId, {
37
+ home: happyHome,
38
+ accounts: store.readAccounts(happyHome),
39
+ bindings,
40
+ fileReadable: probe.fileReadable,
41
+ env,
42
+ nodePath: process.execPath,
43
+ envKeyCopyPath: (id) => path.join(happyHome, "tmp", "accounts", `key-${process.pid}-${id}`),
44
+ readSecret: (path) => node_fs.readFileSync(path, "utf8"),
45
+ now: Date.now()
46
+ });
47
+ if (resolution.kind === "machine") {
48
+ current = null;
49
+ return { profile: null, settings: {}, unavailable: false, notices: [], cleanup: () => {
50
+ } };
51
+ }
52
+ let cleanup = () => {
53
+ };
54
+ if (resolution.kind === "active" && resolution.envKeyCopy) {
55
+ const { name, path: path$1 } = resolution.envKeyCopy;
56
+ node_fs.mkdirSync(path.dirname(path$1), { recursive: true, mode: 448 });
57
+ node_fs.writeFileSync(path$1, (env[name] ?? "").trim() + "\n", { mode: 384 });
58
+ node_fs.chmodSync(path$1, 384);
59
+ delete env[name];
60
+ cleanup = () => node_fs.rmSync(path$1, { force: true });
61
+ }
62
+ claudeAccountEnv.applyAccountEnv(env, resolution);
63
+ const notices = [];
64
+ if (resolution.kind === "unavailable") {
65
+ current = null;
66
+ notices.push(unavailableNotice(resolution.profile));
67
+ return { profile: resolution.profile, settings: {}, unavailable: true, notices, cleanup };
68
+ }
69
+ current = { id: resolution.id, kind: resolution.profile.kind };
70
+ currentSettings = resolution.settings;
71
+ const overrides = claudeAccountEnv.overridingUserSettings(readUserClaudeSettings(env), resolution.profile.kind);
72
+ if (overrides.length > 0) {
73
+ notices.push(`Your Claude settings.json sets ${overrides.join(", ")}, which takes precedence over account "${resolution.profile.label}". Remove it there for the account to apply.`);
74
+ }
75
+ return {
76
+ profile: resolution.profile,
77
+ settings: resolution.settings,
78
+ ...resolution.pinnedModel ? { pinnedModel: resolution.pinnedModel } : {},
79
+ unavailable: false,
80
+ notices,
81
+ cleanup
82
+ };
83
+ }
84
+ function readUserClaudeSettings(env) {
85
+ const dir = env.CLAUDE_CONFIG_DIR || path.join(os.homedir(), ".claude");
86
+ try {
87
+ return JSON.parse(node_fs.readFileSync(path.join(dir, "settings.json"), "utf8"));
88
+ } catch {
89
+ return void 0;
90
+ }
91
+ }
92
+ function noteAccountAuthFailure(now = Date.now()) {
93
+ if (!current || !home) return false;
94
+ const status = current.kind === "claude-subscription" ? "expired" : "invalid";
95
+ try {
96
+ const file = store.readAccountsFileV2(home);
97
+ const record = file.accounts[current.id];
98
+ if (record) {
99
+ record.check = { status, at: now, detail: "rejected during a session" };
100
+ store.writeAccountsFile(home, file);
101
+ return { label: record.label, status };
102
+ }
103
+ } catch {
104
+ }
105
+ return { label: current.id, status };
106
+ }
107
+
108
+ exports.accountClaudeSettings = accountClaudeSettings;
109
+ exports.loadWrapperAccount = loadWrapperAccount;
110
+ exports.noteAccountAuthFailure = noteAccountAuthFailure;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "very-happy-cli",
3
- "version": "0.2.191",
3
+ "version": "0.2.192",
4
4
  "description": "Remote multi-agent workspace CLI with deep Claude integration, native terminal streaming, and self-hosting.",
5
5
  "author": "Kirill Dubovitskiy",
6
6
  "contributors": [
@@ -117,12 +117,12 @@
117
117
  "zod": "^4.6.7"
118
118
  },
119
119
  "optionalDependencies": {
120
- "very-happy-tools-arm64-darwin": "0.2.191",
121
- "very-happy-tools-x64-darwin": "0.2.191",
122
- "very-happy-tools-arm64-linux": "0.2.191",
123
- "very-happy-tools-x64-linux": "0.2.191",
124
- "very-happy-tools-arm64-win32": "0.2.191",
125
- "very-happy-tools-x64-win32": "0.2.191"
120
+ "very-happy-tools-arm64-darwin": "0.2.192",
121
+ "very-happy-tools-x64-darwin": "0.2.192",
122
+ "very-happy-tools-arm64-linux": "0.2.192",
123
+ "very-happy-tools-x64-linux": "0.2.192",
124
+ "very-happy-tools-arm64-win32": "0.2.192",
125
+ "very-happy-tools-x64-win32": "0.2.192"
126
126
  },
127
127
  "devDependencies": {
128
128
  "@slopus/happy-wire": "workspace:*",
@@ -1,140 +0,0 @@
1
- 'use strict';
2
-
3
- var node_fs = require('node:fs');
4
- var os = require('node:os');
5
- var path = require('node:path');
6
-
7
- const PROVIDER_STRIPPED_ENV_KEYS = [
8
- "ANTHROPIC_API_KEY",
9
- "CLAUDE_CODE_OAUTH_TOKEN",
10
- "CLAUDE_CODE_OAUTH_REFRESH_TOKEN",
11
- "CLAUDE_CODE_OAUTH_SCOPES",
12
- "CLAUDE_CODE_USE_BEDROCK",
13
- "CLAUDE_CODE_USE_VERTEX",
14
- "ANTHROPIC_CUSTOM_HEADERS",
15
- "ANTHROPIC_SMALL_FAST_MODEL",
16
- "CLAUDE_CODE_MAX_CONTEXT_TOKENS"
17
- ];
18
- function providersPath(happyHomeDir) {
19
- return path.join(happyHomeDir, "providers.json");
20
- }
21
- function sessionProvidersPath(happyHomeDir) {
22
- return path.join(happyHomeDir, "session-providers.json");
23
- }
24
- function expandHome(path$1, home = os.homedir()) {
25
- return path$1 === "~" ? home : path$1.startsWith("~/") ? path.join(home, path$1.slice(2)) : path$1;
26
- }
27
- function readJson(path) {
28
- if (!node_fs.existsSync(path)) return void 0;
29
- return JSON.parse(node_fs.readFileSync(path, "utf8"));
30
- }
31
- function parseProvidersFile(raw) {
32
- const profiles = {};
33
- const src = raw && typeof raw === "object" ? raw.profiles : void 0;
34
- if (src && typeof src === "object") {
35
- for (const [id, p] of Object.entries(src)) {
36
- if (!p || typeof p !== "object") continue;
37
- const { name, baseUrl, apiKeyFile, models } = p;
38
- if (typeof baseUrl !== "string" || !/^https?:\/\//.test(baseUrl) || typeof apiKeyFile !== "string" || !apiKeyFile) continue;
39
- const ids = [];
40
- const contextWindows = {};
41
- for (const m of Array.isArray(models) ? models : []) {
42
- if (typeof m === "string") ids.push(m);
43
- else if (m && typeof m === "object" && typeof m.id === "string") {
44
- const { id: modelId, contextWindow } = m;
45
- ids.push(modelId);
46
- if (typeof contextWindow === "number" && Number.isInteger(contextWindow) && contextWindow > 0) contextWindows[modelId] = contextWindow;
47
- }
48
- }
49
- profiles[id] = {
50
- ...typeof name === "string" ? { name } : {},
51
- baseUrl: baseUrl.replace(/\/+$/, ""),
52
- apiKeyFile,
53
- ...Array.isArray(models) ? { models: ids } : {},
54
- ...Object.keys(contextWindows).length > 0 ? { contextWindows } : {}
55
- };
56
- }
57
- }
58
- return { profiles };
59
- }
60
- function parseSessionProvidersFile(raw) {
61
- const out = {};
62
- if (!raw || typeof raw !== "object") return out;
63
- for (const [sessionId, b] of Object.entries(raw)) {
64
- if (!b || typeof b !== "object") continue;
65
- const { profile, model } = b;
66
- if (typeof profile === "string" && profile && typeof model === "string" && model) out[sessionId] = { profile, model };
67
- }
68
- return out;
69
- }
70
- function readProviders(happyHomeDir) {
71
- return parseProvidersFile(readJson(providersPath(happyHomeDir)));
72
- }
73
- function readSessionProviders(happyHomeDir) {
74
- return parseSessionProvidersFile(readJson(sessionProvidersPath(happyHomeDir)));
75
- }
76
- function buildProviderEnv(profile, model, token) {
77
- const contextWindow = profile.contextWindows?.[model];
78
- return {
79
- ANTHROPIC_BASE_URL: profile.baseUrl,
80
- ANTHROPIC_AUTH_TOKEN: token,
81
- ANTHROPIC_MODEL: model,
82
- ANTHROPIC_DEFAULT_OPUS_MODEL: model,
83
- ANTHROPIC_DEFAULT_SONNET_MODEL: model,
84
- ANTHROPIC_DEFAULT_HAIKU_MODEL: model,
85
- ANTHROPIC_SMALL_FAST_MODEL: model,
86
- CLAUDE_CODE_SUBAGENT_MODEL: model,
87
- CLAUDE_CODE_NO_MODEL_FALLBACK: "1",
88
- ...contextWindow ? { CLAUDE_CODE_MAX_CONTEXT_TOKENS: String(contextWindow) } : {}
89
- };
90
- }
91
- function resolveSessionProvider(sessionId, deps) {
92
- const binding = deps.bindings[sessionId];
93
- if (!binding) return null;
94
- const profile = deps.providers.profiles[binding.profile];
95
- if (!profile) throw new Error(`provider profile "${binding.profile}" is not defined in providers.json`);
96
- const token = deps.readKey(profile.apiKeyFile).trim();
97
- if (!token) throw new Error(`provider profile "${binding.profile}": api key file is empty`);
98
- return {
99
- profile: binding.profile,
100
- model: binding.model,
101
- baseUrl: profile.baseUrl,
102
- env: buildProviderEnv(profile, binding.model, token),
103
- unset: PROVIDER_STRIPPED_ENV_KEYS
104
- };
105
- }
106
- function loadSessionProvider(happyHomeDir, sessionId) {
107
- const bindings = readSessionProviders(happyHomeDir);
108
- if (!bindings[sessionId]) return null;
109
- return resolveSessionProvider(sessionId, {
110
- providers: readProviders(happyHomeDir),
111
- bindings,
112
- readKey: (p) => node_fs.readFileSync(expandHome(p), "utf8")
113
- });
114
- }
115
- function applyProviderEnv(env, provider) {
116
- for (const key of provider.unset) delete env[key];
117
- Object.assign(env, provider.env);
118
- }
119
- function updateBindings(current, sessionId, binding) {
120
- const next = { ...current };
121
- if (binding) next[sessionId] = binding;
122
- else delete next[sessionId];
123
- return next;
124
- }
125
- function writeSessionProviders(happyHomeDir, bindings) {
126
- const path$1 = sessionProvidersPath(happyHomeDir);
127
- node_fs.mkdirSync(path.dirname(path$1), { recursive: true });
128
- const tmp = `${path$1}.${process.pid}.tmp`;
129
- node_fs.writeFileSync(tmp, JSON.stringify(bindings, null, 2) + "\n", { mode: 384 });
130
- node_fs.chmodSync(tmp, 384);
131
- node_fs.renameSync(tmp, path$1);
132
- }
133
-
134
- exports.applyProviderEnv = applyProviderEnv;
135
- exports.loadSessionProvider = loadSessionProvider;
136
- exports.readProviders = readProviders;
137
- exports.readSessionProviders = readSessionProviders;
138
- exports.sessionProvidersPath = sessionProvidersPath;
139
- exports.updateBindings = updateBindings;
140
- exports.writeSessionProviders = writeSessionProviders;
@@ -1,132 +0,0 @@
1
- import { mkdirSync, writeFileSync, chmodSync, renameSync, existsSync, readFileSync } from 'node:fs';
2
- import { homedir } from 'node:os';
3
- import { dirname, join } from 'node:path';
4
-
5
- const PROVIDER_STRIPPED_ENV_KEYS = [
6
- "ANTHROPIC_API_KEY",
7
- "CLAUDE_CODE_OAUTH_TOKEN",
8
- "CLAUDE_CODE_OAUTH_REFRESH_TOKEN",
9
- "CLAUDE_CODE_OAUTH_SCOPES",
10
- "CLAUDE_CODE_USE_BEDROCK",
11
- "CLAUDE_CODE_USE_VERTEX",
12
- "ANTHROPIC_CUSTOM_HEADERS",
13
- "ANTHROPIC_SMALL_FAST_MODEL",
14
- "CLAUDE_CODE_MAX_CONTEXT_TOKENS"
15
- ];
16
- function providersPath(happyHomeDir) {
17
- return join(happyHomeDir, "providers.json");
18
- }
19
- function sessionProvidersPath(happyHomeDir) {
20
- return join(happyHomeDir, "session-providers.json");
21
- }
22
- function expandHome(path, home = homedir()) {
23
- return path === "~" ? home : path.startsWith("~/") ? join(home, path.slice(2)) : path;
24
- }
25
- function readJson(path) {
26
- if (!existsSync(path)) return void 0;
27
- return JSON.parse(readFileSync(path, "utf8"));
28
- }
29
- function parseProvidersFile(raw) {
30
- const profiles = {};
31
- const src = raw && typeof raw === "object" ? raw.profiles : void 0;
32
- if (src && typeof src === "object") {
33
- for (const [id, p] of Object.entries(src)) {
34
- if (!p || typeof p !== "object") continue;
35
- const { name, baseUrl, apiKeyFile, models } = p;
36
- if (typeof baseUrl !== "string" || !/^https?:\/\//.test(baseUrl) || typeof apiKeyFile !== "string" || !apiKeyFile) continue;
37
- const ids = [];
38
- const contextWindows = {};
39
- for (const m of Array.isArray(models) ? models : []) {
40
- if (typeof m === "string") ids.push(m);
41
- else if (m && typeof m === "object" && typeof m.id === "string") {
42
- const { id: modelId, contextWindow } = m;
43
- ids.push(modelId);
44
- if (typeof contextWindow === "number" && Number.isInteger(contextWindow) && contextWindow > 0) contextWindows[modelId] = contextWindow;
45
- }
46
- }
47
- profiles[id] = {
48
- ...typeof name === "string" ? { name } : {},
49
- baseUrl: baseUrl.replace(/\/+$/, ""),
50
- apiKeyFile,
51
- ...Array.isArray(models) ? { models: ids } : {},
52
- ...Object.keys(contextWindows).length > 0 ? { contextWindows } : {}
53
- };
54
- }
55
- }
56
- return { profiles };
57
- }
58
- function parseSessionProvidersFile(raw) {
59
- const out = {};
60
- if (!raw || typeof raw !== "object") return out;
61
- for (const [sessionId, b] of Object.entries(raw)) {
62
- if (!b || typeof b !== "object") continue;
63
- const { profile, model } = b;
64
- if (typeof profile === "string" && profile && typeof model === "string" && model) out[sessionId] = { profile, model };
65
- }
66
- return out;
67
- }
68
- function readProviders(happyHomeDir) {
69
- return parseProvidersFile(readJson(providersPath(happyHomeDir)));
70
- }
71
- function readSessionProviders(happyHomeDir) {
72
- return parseSessionProvidersFile(readJson(sessionProvidersPath(happyHomeDir)));
73
- }
74
- function buildProviderEnv(profile, model, token) {
75
- const contextWindow = profile.contextWindows?.[model];
76
- return {
77
- ANTHROPIC_BASE_URL: profile.baseUrl,
78
- ANTHROPIC_AUTH_TOKEN: token,
79
- ANTHROPIC_MODEL: model,
80
- ANTHROPIC_DEFAULT_OPUS_MODEL: model,
81
- ANTHROPIC_DEFAULT_SONNET_MODEL: model,
82
- ANTHROPIC_DEFAULT_HAIKU_MODEL: model,
83
- ANTHROPIC_SMALL_FAST_MODEL: model,
84
- CLAUDE_CODE_SUBAGENT_MODEL: model,
85
- CLAUDE_CODE_NO_MODEL_FALLBACK: "1",
86
- ...contextWindow ? { CLAUDE_CODE_MAX_CONTEXT_TOKENS: String(contextWindow) } : {}
87
- };
88
- }
89
- function resolveSessionProvider(sessionId, deps) {
90
- const binding = deps.bindings[sessionId];
91
- if (!binding) return null;
92
- const profile = deps.providers.profiles[binding.profile];
93
- if (!profile) throw new Error(`provider profile "${binding.profile}" is not defined in providers.json`);
94
- const token = deps.readKey(profile.apiKeyFile).trim();
95
- if (!token) throw new Error(`provider profile "${binding.profile}": api key file is empty`);
96
- return {
97
- profile: binding.profile,
98
- model: binding.model,
99
- baseUrl: profile.baseUrl,
100
- env: buildProviderEnv(profile, binding.model, token),
101
- unset: PROVIDER_STRIPPED_ENV_KEYS
102
- };
103
- }
104
- function loadSessionProvider(happyHomeDir, sessionId) {
105
- const bindings = readSessionProviders(happyHomeDir);
106
- if (!bindings[sessionId]) return null;
107
- return resolveSessionProvider(sessionId, {
108
- providers: readProviders(happyHomeDir),
109
- bindings,
110
- readKey: (p) => readFileSync(expandHome(p), "utf8")
111
- });
112
- }
113
- function applyProviderEnv(env, provider) {
114
- for (const key of provider.unset) delete env[key];
115
- Object.assign(env, provider.env);
116
- }
117
- function updateBindings(current, sessionId, binding) {
118
- const next = { ...current };
119
- if (binding) next[sessionId] = binding;
120
- else delete next[sessionId];
121
- return next;
122
- }
123
- function writeSessionProviders(happyHomeDir, bindings) {
124
- const path = sessionProvidersPath(happyHomeDir);
125
- mkdirSync(dirname(path), { recursive: true });
126
- const tmp = `${path}.${process.pid}.tmp`;
127
- writeFileSync(tmp, JSON.stringify(bindings, null, 2) + "\n", { mode: 384 });
128
- chmodSync(tmp, 384);
129
- renameSync(tmp, path);
130
- }
131
-
132
- export { applyProviderEnv as a, readProviders as b, loadSessionProvider as l, readSessionProviders as r, sessionProvidersPath as s, updateBindings as u, writeSessionProviders as w };
@@ -1,86 +0,0 @@
1
- import { p as packageJson } from './package-BsUHyqWe.mjs';
2
-
3
- const LAZY_MODULES = [
4
- // Entry
5
- ["main", () => import('./main-omGr_ONk.mjs')],
6
- ["selfCheck", () => Promise.resolve().then(function () { return selfCheck; })],
7
- // Subcommands (main.ts)
8
- ["api/api", () => import('./api-jfeMRg5R.mjs').then(function (n) { return n.e; })],
9
- ["claude/claudeCliPath", () => import('./claudeCliPath-BqkaH2oR.mjs')],
10
- ["claude/runClaude", () => import('./runClaude-C3rii_S6.mjs')],
11
- ["commands/agentHome", () => import('./agentHome-DGv105SR.mjs')],
12
- ["commands/auth", () => import('./auth-BYDtjVNb.mjs')],
13
- ["commands/auto", () => import('./auto-D5Jhukq1.mjs')],
14
- ["commands/codexCommand", () => import('./codexCommand-CIaOiiOj.mjs')],
15
- ["commands/connect", () => import('./connect-BTfAUhk8.mjs')],
16
- ["commands/installPiTools", () => import('./installPiTools-B_CdM5_2.mjs')],
17
- ["commands/installTerminalHooks", () => import('./installTerminalHooks-By7gBMEF.mjs')],
18
- ["commands/mcp", () => import('./mcp-D5hxmRAq.mjs')],
19
- ["commands/panels", () => import('./panels-CpEKWWbI.mjs')],
20
- ["commands/piTerminal", () => import('./piTerminal-BGdps8f3.mjs')],
21
- ["commands/sandbox", () => import('./sandbox-DJ7A7lsy.mjs')],
22
- ["commands/send", () => import('./send-Ba63huxv.mjs')],
23
- ["commands/server", () => import('./server-w3W0toNd.mjs')],
24
- ["commands/sessions", () => import('./sessions-Clk8MR5Y.mjs')],
25
- ["commands/sessionProvider", () => import('./sessionProvider-DUn91LhJ.mjs')],
26
- ["commands/spawn", () => import('./spawn-4tsp1uhh.mjs')],
27
- ["commands/teams", () => import('./teams-BO3_arwM.mjs')],
28
- ["commands/todo", () => import('./todo-BZ954vsz.mjs')],
29
- ["daemon/doctor", () => import('./doctor-BPkYWSuq.mjs')],
30
- ["daemon/install", () => import('./install-DTIveLOS.mjs')],
31
- ["daemon/run", () => import('./run-Bt0AklUU.mjs')],
32
- ["daemon/uninstall", () => import('./uninstall-B4T_e3Mr.mjs')],
33
- ["resume/handleResumeCommand", () => import('./handleResumeCommand-BK9XKH_l.mjs')],
34
- ["ui/doctor", () => import('./doctor-lsxmAK4o.mjs').then(function (n) { return n.d; })],
35
- ["agent/acp", () => import('./index-Cxso1rg4.mjs')],
36
- ["gemini/runGemini", () => import('./runGemini-DkYhRk9S.mjs')],
37
- ["gemini/utils/config", () => import('./config-OCEcVVK1.mjs')],
38
- ["openclaw/runOpenClaw", () => import('./runOpenClaw-DpprWCoz.mjs')],
39
- ["persistence", () => import('./persistence-Cpw4yJs8.mjs').then(function (n) { return n.G; })],
40
- // Deferred halves of the runners and clients
41
- ["api/apiMachine", () => import('./apiMachine-DRJ7y-BB.mjs')],
42
- ["claude/runClaudeDeps", () => import('./runClaudeDeps-DlVfMG4F.mjs')],
43
- ["claude/claudeLocal", () => import('./claudeLocal-Bgb5GGsq.mjs')],
44
- ["claude/claudeLocalLauncher", () => import('./claudeLocalLauncher-T7EfT68h.mjs')],
45
- ["claude/sdk", () => import('./index-BdOJOZ6J.mjs')],
46
- ["assistant/bootstrap", () => import('./bootstrap-rLaL3kTa.mjs')],
47
- ["agentHome", () => import('./index-DuK9XYbZ.mjs')],
48
- ["ui/ink/RemoteModeDisplay", () => import('./RemoteModeDisplay-D-HewyXg.mjs')],
49
- // External packages imported on demand
50
- ["expo-server-sdk", () => import('expo-server-sdk')],
51
- ["ink", () => import('ink')],
52
- ["react", () => import('react')]
53
- ];
54
-
55
- async function runSelfCheck(modules = LAZY_MODULES) {
56
- const failures = [];
57
- for (const [name, load] of modules) {
58
- try {
59
- await load();
60
- } catch (error) {
61
- failures.push({ name, error: error instanceof Error ? error.message : String(error) });
62
- }
63
- }
64
- return failures;
65
- }
66
- async function selfCheckMain(opts = {}) {
67
- const started = Date.now();
68
- const failures = await runSelfCheck();
69
- if (failures.length > 0) {
70
- for (const failure of failures) {
71
- console.error(`very-happy: failed to load ${failure.name}: ${failure.error}`);
72
- }
73
- return 1;
74
- }
75
- if (opts.verbose) console.log(`self-check: ${LAZY_MODULES.length} modules loaded in ${Date.now() - started}ms`);
76
- console.log(`very-happy version: ${packageJson.version}`);
77
- return 0;
78
- }
79
-
80
- var selfCheck = /*#__PURE__*/Object.freeze({
81
- __proto__: null,
82
- runSelfCheck: runSelfCheck,
83
- selfCheckMain: selfCheckMain
84
- });
85
-
86
- export { runSelfCheck, selfCheckMain };