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.
Files changed (214) hide show
  1. package/dist/{AcpBackend-DFipFF7-.cjs → AcpBackend-CgHb_ya5.cjs} +3 -3
  2. package/dist/{AcpBackend-CHp3y7cb.mjs → AcpBackend-DZGCSuXF.mjs} +3 -3
  3. package/dist/{AcpSessionManager-0zpvRJXc.cjs → AcpSessionManager-CacC2EVn.cjs} +1 -1
  4. package/dist/{AcpSessionManager-d2-rKWWa.mjs → AcpSessionManager-DwuPzWBh.mjs} +1 -1
  5. package/dist/{BasePermissionHandler-CH3zuEkA.cjs → BasePermissionHandler-DCP8ZEB4.cjs} +1 -1
  6. package/dist/{BasePermissionHandler-DdZBYIR4.mjs → BasePermissionHandler-Uo-GUjbb.mjs} +1 -1
  7. package/dist/{acpSessionResume-DTGmAPLt.mjs → acpSessionResume-9OLTD6kT.mjs} +1 -1
  8. package/dist/{acpSessionResume-oiCBnAVA.cjs → acpSessionResume-BaVMD80f.cjs} +1 -1
  9. package/dist/{agentHome-CghLvL_1.mjs → agentHome-B1BsKeqD.mjs} +4 -4
  10. package/dist/{agentHome-BWcz8mz0.cjs → agentHome-BtUmGcPX.cjs} +4 -4
  11. package/dist/{api-Cmjfr8Z7.cjs → api-COHFAkb_.cjs} +20 -12
  12. package/dist/{api-CzwFpJQc.mjs → api-Dr3wXL_7.mjs} +21 -13
  13. package/dist/{apiMachine-DJkTEiqy.mjs → apiMachine-CHEzPQdS.mjs} +73 -32
  14. package/dist/{apiMachine-G6OogT08.cjs → apiMachine-D8H7CXaz.cjs} +75 -34
  15. package/dist/{attachmentContent-B2os4HbA.mjs → attachmentContent-1YwtKgWl.mjs} +2 -2
  16. package/dist/{attachmentContent-Bo0UAsSu.cjs → attachmentContent-mIhbtRKl.cjs} +2 -2
  17. package/dist/{auth-DMX0xPNK.mjs → auth-CbZkcMAb.mjs} +8 -8
  18. package/dist/{auth-D6bBUwZa.cjs → auth-CgQP7d0q.cjs} +5 -5
  19. package/dist/{auth-BS6PaOOG.mjs → auth-DZsthtSk.mjs} +5 -5
  20. package/dist/{auth-HEhRaNgL.cjs → auth-Fg8fLadK.cjs} +8 -8
  21. package/dist/{auto-C6I55iOh.cjs → auto-BB7kqSh5.cjs} +19 -19
  22. package/dist/{auto-Cl1SEDcD.mjs → auto-_T-Ud-z5.mjs} +19 -19
  23. package/dist/{backgroundTaskActivity-BVwJBl02.mjs → backgroundTaskActivity-8PdPxrvy.mjs} +1 -1
  24. package/dist/{bootstrap-iuyufnp3.mjs → bootstrap-B6EkZh4u.mjs} +2 -2
  25. package/dist/{bootstrap-exVucYav.cjs → bootstrap-CYtOtbi7.cjs} +2 -2
  26. package/dist/{browser-CSYum7xH.mjs → browser-C2qhUHSE.mjs} +1 -1
  27. package/dist/{browser-BohJK12g.cjs → browser-DjNNQQk2.cjs} +1 -1
  28. package/dist/{claudeCliPath-U4HHmV4r.cjs → claudeCliPath-GaP3UUz1.cjs} +1 -1
  29. package/dist/{claudeLocal-Dq_R3Ax_.mjs → claudeLocal-BAFjWhZ8.mjs} +6 -6
  30. package/dist/{claudeLocal-re4yjSTx.cjs → claudeLocal-O_w7-fBh.cjs} +8 -8
  31. package/dist/{claudeLocalLauncher-CN67lN7-.mjs → claudeLocalLauncher-CWn30LZR.mjs} +11 -11
  32. package/dist/{claudeLocalLauncher-B4hJHpCA.cjs → claudeLocalLauncher-Df3zg1q0.cjs} +13 -13
  33. package/dist/{claudeSessionFork-BihfD0Ik.mjs → claudeSessionFork-2ZkSTOGn.mjs} +1 -1
  34. package/dist/{claudeSessionFork-DiSMYerV.cjs → claudeSessionFork-pwcKqB-e.cjs} +1 -1
  35. package/dist/{client-BhoEBnuN.mjs → client-BKyU66lg.mjs} +2 -2
  36. package/dist/{client-BKcK1Bi-.cjs → client-CUO3ItoB.cjs} +34 -8
  37. package/dist/{client-wo9nbxuf.mjs → client-CXOnzuOy.mjs} +2 -2
  38. package/dist/{client-ZjOsn6nZ.cjs → client-DWs6k041.cjs} +2 -2
  39. package/dist/{client-CuVdN6PP.cjs → client-D_U2VjO3.cjs} +2 -2
  40. package/dist/{client-DuTDwWSQ.mjs → client-DsQcxVUV.mjs} +34 -9
  41. package/dist/codex/happyMcpStdioBridge.cjs +17 -17
  42. package/dist/codex/happyMcpStdioBridge.mjs +18 -18
  43. package/dist/{codexAppServerClient-Dt5zxrun.cjs → codexAppServerClient-BRX3JZ_5.cjs} +3 -3
  44. package/dist/{codexAppServerClient-BK3zra_1.mjs → codexAppServerClient-C3JO3pwM.mjs} +3 -3
  45. package/dist/{codexCommand-B6pY7CMh.mjs → codexCommand-BZIAAqKS.mjs} +59 -51
  46. package/dist/{codexCommand-CAZ1SLjg.cjs → codexCommand-dKOc5iQl.cjs} +85 -77
  47. package/dist/{codexTermination-DmGbHxcD.cjs → codexTermination-BVR9HeVI.cjs} +7 -2
  48. package/dist/{codexTermination-Cd1Eon_4.mjs → codexTermination-ztFkwHrG.mjs} +7 -2
  49. package/dist/{config-2oMG_fEI.mjs → config-NbHjx8ge.mjs} +3 -3
  50. package/dist/{config-B0uK6K7n.cjs → config-cftYxLC7.cjs} +26 -26
  51. package/dist/{configuration-WMi4idBB.mjs → configuration-BPrfb17M.mjs} +1 -1
  52. package/dist/{configuration-CMHZnp6G.cjs → configuration-C8JgseHy.cjs} +1 -1
  53. package/dist/{connect-uaglGrde.cjs → connect-Br8VMrK1.cjs} +27 -27
  54. package/dist/{connect-BLVHhHzA.mjs → connect-CLD1ai0k.mjs} +14 -14
  55. package/dist/{context-DXzU5bFM.cjs → context-D1lgQTJC.cjs} +1 -1
  56. package/dist/{context-DploEcoN.mjs → context-_YGq8xdH.mjs} +1 -1
  57. package/dist/{controlClient-BWUJrj3t.mjs → controlClient-CkNpT5zS.mjs} +4 -4
  58. package/dist/{controlClient-C-5qCt8W.cjs → controlClient-D68Zj7Q-.cjs} +3 -3
  59. package/dist/{createSessionMetadata-3uXrJgOW.mjs → createSessionMetadata-3WAj3_xl.mjs} +2 -2
  60. package/dist/{createSessionMetadata-BkIzHALd.cjs → createSessionMetadata-DNIbKLHg.cjs} +3 -3
  61. package/dist/{defaultPermissionMode-pS3vmiSg.cjs → defaultPermissionMode-BmvjP32v.cjs} +2 -2
  62. package/dist/{defaultPermissionMode-BzxLh20a.mjs → defaultPermissionMode-DXMznl8v.mjs} +2 -2
  63. package/dist/{detectCLI-DR9ZaN6B.cjs → detectCLI-BuYR_Qxe.cjs} +4 -4
  64. package/dist/{deterministicJson-B8z2GPi9.cjs → deterministicJson-BS7D7URE.cjs} +89 -24
  65. package/dist/{deterministicJson-D_whDMFd.mjs → deterministicJson-BcBIKKf1.mjs} +87 -24
  66. package/dist/{doctor-Br1Kcy2J.cjs → doctor-Be7zC0AF.cjs} +10 -9
  67. package/dist/{doctor-CmtSsR2-.mjs → doctor-CoOaPq6w.mjs} +8 -8
  68. package/dist/{doctorReadiness-BCZGcN0a.cjs → doctorReadiness-Dl6yRQCy.cjs} +1 -1
  69. package/dist/{downloadTarget-BoNwTIH_.mjs → downloadTarget-CeaAXdJj.mjs} +6 -6
  70. package/dist/{downloadTarget-BQJK_6oH.cjs → downloadTarget-LyOiucn_.cjs} +6 -6
  71. package/dist/{ensureDaemonRunning-Czo9IHJQ.mjs → ensureDaemonRunning--98j7-17.mjs} +5 -5
  72. package/dist/{ensureDaemonRunning-BRUmsq6J.cjs → ensureDaemonRunning-B8z37VKD.cjs} +6 -6
  73. package/dist/fileStore-5qpetZS0.mjs +146 -0
  74. package/dist/fileStore-7qhnbs6N.cjs +152 -0
  75. package/dist/{handleResumeCommand-tKD_Hpxc.cjs → handleResumeCommand-BFZlrFVH.cjs} +7 -7
  76. package/dist/{handleResumeCommand-C8thKjqf.mjs → handleResumeCommand-gO8I4keP.mjs} +6 -6
  77. package/dist/{index-DMqDMT1Q.cjs → index-B5PXbZjW.cjs} +80 -62
  78. package/dist/{index-D09T1m8Y.cjs → index-BRMq9gOe.cjs} +3 -3
  79. package/dist/{index-B0UjHlAe.cjs → index-BkluinoS.cjs} +4 -4
  80. package/dist/{index-CdQI0C9p.mjs → index-CO0n9ue6.mjs} +4 -4
  81. package/dist/{index-DPOa4NhL.mjs → index-CeRXrGnH.mjs} +41 -6
  82. package/dist/{index-C6O2vVjm.cjs → index-Df2eHm3O.cjs} +42 -6
  83. package/dist/{index-BTxHphpV.mjs → index-DneHoQXf.mjs} +80 -62
  84. package/dist/{index-BiyC7cZ3.mjs → index-WUj3954m.mjs} +4 -4
  85. package/dist/{index-D3bidoG8.mjs → index-hQ8LP1C2.mjs} +3 -3
  86. package/dist/{index-CUuc6iCn.cjs → index-jF2t3ACW.cjs} +4 -4
  87. package/dist/index.cjs +2 -2
  88. package/dist/index.mjs +2 -2
  89. package/dist/{install-BX3lv3NO.mjs → install-D0inLCv-.mjs} +1 -1
  90. package/dist/{install-BXvf2E3o.cjs → install-D2NCbeJ-.cjs} +1 -1
  91. package/dist/{install-hnve_9vq.mjs → install-DkYFiVK4.mjs} +3 -3
  92. package/dist/{install-CYRZxS87.cjs → install-FqkSUjPC.cjs} +7 -7
  93. package/dist/{installPiTools-BKnXjrVu.cjs → installPiTools-CL_axh_6.cjs} +1 -1
  94. package/dist/{installTerminalHooks-BQZbvxsZ.cjs → installTerminalHooks-BETLKAtd.cjs} +3 -3
  95. package/dist/lib.cjs +13 -13
  96. package/dist/lib.d.cts +216 -2
  97. package/dist/lib.d.mts +216 -2
  98. package/dist/lib.mjs +13 -13
  99. package/dist/{lidState-Bb8fgXg3.mjs → lidState-DghbfRbr.mjs} +1 -1
  100. package/dist/{lidState-Dv2wwFTj.cjs → lidState-x8cJ8J_9.cjs} +1 -1
  101. package/dist/{localHappyAgentAuth-DjYvkXvV.cjs → localHappyAgentAuth-DZ2kb9uq.cjs} +1 -1
  102. package/dist/{localHappyAgentAuth-NEU7fax7.mjs → localHappyAgentAuth-IKmeRpuQ.mjs} +1 -1
  103. package/dist/{logger-C1GWx3gi.cjs → logger-DgBwUSgS.cjs} +2 -2
  104. package/dist/{logger-BtVhHnD8.mjs → logger-LFr8iPgl.mjs} +2 -2
  105. package/dist/machineMetadata-BglCsfvf.mjs +75 -0
  106. package/dist/machineMetadata-DB03ez4K.cjs +87 -0
  107. package/dist/{main-CWhSsbtU.cjs → main-YQ-Vkakw.cjs} +99 -132
  108. package/dist/{main-B2LWV8DI.mjs → main-_1LSzlLv.mjs} +93 -126
  109. package/dist/{mcp-CARUsXHV.cjs → mcp-BIY80jSc.cjs} +15 -15
  110. package/dist/{mcp-ext92q3Y.mjs → mcp-Csj-mT5Y.mjs} +15 -15
  111. package/dist/{mirrorProtocol-DEy2g1CB.cjs → mirrorProtocol-BphKIAK9.cjs} +15 -6
  112. package/dist/{mirrorProtocol-BwYibqry.mjs → mirrorProtocol-CAxOMBkb.mjs} +15 -6
  113. package/dist/{package-BPPebGQF.mjs → package-DYGwlmXl.mjs} +9 -8
  114. package/dist/{package-SgqTYsjn.cjs → package-NoD8QOOM.cjs} +9 -8
  115. package/dist/{panels-BZ0_Tt7B.mjs → panels-B8zRm7_d.mjs} +5 -5
  116. package/dist/{panels-D1c7q2dD.cjs → panels-DYEc1NyQ.cjs} +5 -5
  117. package/dist/{peerTools-CWKzcQ7u.mjs → peerTools-CK3JYu1k.mjs} +5 -5
  118. package/dist/{peerTools-DRQETXaz.cjs → peerTools-CP-x-Peu.cjs} +5 -5
  119. package/dist/{persistence-BegE7NPa.cjs → persistence-BY-D00wT.cjs} +2 -2
  120. package/dist/{persistence-Cr-wutZ4.mjs → persistence-D2Djrf7t.mjs} +2 -2
  121. package/dist/pi-CqyoZMjI.mjs +380 -0
  122. package/dist/pi-DlsrPCTa.cjs +400 -0
  123. package/dist/{piRunnerArgs-DwvM_yWA.mjs → piRunnerArgs-IZLoL7TG.mjs} +1 -1
  124. package/dist/{piRunnerArgs-Cs-378Vz.cjs → piRunnerArgs-gxLYIZH4.cjs} +1 -1
  125. package/dist/{piRuntime-Bue5mnlc.mjs → piRuntime-D7Y4oHVL.mjs} +2 -2
  126. package/dist/{piRuntime-BG-1td_n.cjs → piRuntime-o5L8uX-W.cjs} +2 -2
  127. package/dist/{piTerminal-G4z-xVyy.cjs → piTerminal-C_-JDkLN.cjs} +18 -18
  128. package/dist/{piTerminal-B5x9X5yV.mjs → piTerminal-Kphx8Uhw.mjs} +18 -18
  129. package/dist/projectPath-C3ioB4Bu.cjs +13 -0
  130. package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
  131. package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
  132. package/dist/{pushNotifications-DaLQUyi0.cjs → pushNotifications-BXoOSq_G.cjs} +14 -4
  133. package/dist/{pushNotifications-BdFjDjQe.mjs → pushNotifications-DXGIhE-A.mjs} +14 -4
  134. package/dist/{query-DYP_W1wp.mjs → query-CcA6DVZK.mjs} +1 -1
  135. package/dist/{query-Ctfg-5gy.cjs → query-CdCxzuaB.cjs} +1 -1
  136. package/dist/{rateLimitWindows-Dj_8voBK.cjs → rateLimitWindows-OpAmdOtC.cjs} +1 -1
  137. package/dist/{rateLimitWindows-CuEqk_0g.mjs → rateLimitWindows-ZtHZHe-l.mjs} +1 -1
  138. package/dist/{registerCommonHandlers-Cj084Sg7.cjs → registerCommonHandlers-CRjBoJLK.cjs} +30 -30
  139. package/dist/{registerCommonHandlers-BAlP7SGc.mjs → registerCommonHandlers-DF6bdDtd.mjs} +2 -2
  140. package/dist/{registerKillSessionHandler-qMju0ZfF.cjs → registerKillSessionHandler-7fOm6ooh.cjs} +6 -6
  141. package/dist/{registerKillSessionHandler-PD0jWtQo.mjs → registerKillSessionHandler-DDCKL3wf.mjs} +6 -6
  142. package/dist/{remoteSessionClient-Bn2qu5C5.mjs → remoteSessionClient-B2POSKFT.mjs} +5 -5
  143. package/dist/{remoteSessionClient-B7i7MkYV.cjs → remoteSessionClient-CFCn42bs.cjs} +5 -5
  144. package/dist/{reportProgressTool-gHItlSzz.mjs → reportProgressTool-tPxEvh6x.mjs} +4 -4
  145. package/dist/{reportProgressTool-CM1JFAHg.cjs → reportProgressTool-th4trcET.cjs} +4 -4
  146. package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
  147. package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
  148. package/dist/{run-CNXwIe0A.cjs → run-C_FumCQk.cjs} +2767 -183
  149. package/dist/{run-BM4TxiyN.mjs → run-cKQBbVi4.mjs} +2762 -178
  150. package/dist/{runClaude-C_3I8hvR.mjs → runClaude-CYnM6krL.mjs} +34 -28
  151. package/dist/{runClaude-CWhj2V4Q.cjs → runClaude-z_2YC_aa.cjs} +35 -29
  152. package/dist/{runClaudeDeps-B81cOKnH.cjs → runClaudeDeps-CLubzWnA.cjs} +59 -122
  153. package/dist/{runClaudeDeps-QGrOeDe2.mjs → runClaudeDeps-duS06Pb4.mjs} +52 -114
  154. package/dist/{runGemini-BEdWEZLR.mjs → runGemini-C_Pc2EhH.mjs} +39 -37
  155. package/dist/{runGemini-CgRLYbt5.cjs → runGemini-vEoXV6qT.cjs} +67 -65
  156. package/dist/{runOpenClaw-C1NVmzOL.cjs → runOpenClaw-CXJCtMgB.cjs} +20 -20
  157. package/dist/{runOpenClaw-DdQZAYj1.mjs → runOpenClaw-Cxun1qLC.mjs} +19 -19
  158. package/dist/{sandbox-nocIjliq.cjs → sandbox-CO46H2tK.cjs} +4 -4
  159. package/dist/{sandbox-DjQUdCMG.mjs → sandbox-CsvPnTmz.mjs} +4 -4
  160. package/dist/{selfCheck-DCt4Uzbq.cjs → selfCheck-DIr7Gc0i.cjs} +39 -39
  161. package/dist/selfCheck-NamtBHVB.mjs +85 -0
  162. package/dist/{send-Ct7X4pPU.mjs → send-DMoFg6F1.mjs} +9 -9
  163. package/dist/{send-Dydf_hwZ.cjs → send-X2mfVEyr.cjs} +8 -8
  164. package/dist/{server-CosABFbd.cjs → server-BwTEdbkr.cjs} +6 -6
  165. package/dist/{server-DTQGZMxh.mjs → server-CkqQ0sRH.mjs} +4 -4
  166. package/dist/sessionExitLifecycle-CzkLIgNZ.mjs +142 -0
  167. package/dist/sessionExitLifecycle-DFltxXU8.cjs +148 -0
  168. package/dist/{sessionLock-DokGab2R.cjs → sessionLock-CdIRJlHH.cjs} +25 -5
  169. package/dist/{sessionLock-WYIyaVO4.mjs → sessionLock-JIfwCqMk.mjs} +24 -5
  170. package/dist/{sessionOps-S-qPBLFf.cjs → sessionOps-DVA-00nR.cjs} +4 -4
  171. package/dist/{sessionOps-BIGgRube.mjs → sessionOps-DqlftXxe.mjs} +5 -5
  172. package/dist/{sessionScanner-o5hnMi5e.mjs → sessionScanner-BI0Vo1xT.mjs} +3 -3
  173. package/dist/{sessionScanner-CIMM2hvZ.cjs → sessionScanner-BMwgGAhY.cjs} +3 -3
  174. package/dist/{sessions-BJHEZpi2.mjs → sessions-D6IimX7b.mjs} +11 -11
  175. package/dist/{sessions-JchI1w3z.cjs → sessions-DjgEcHaT.cjs} +10 -10
  176. package/dist/{setupOfflineReconnection-CNiAt5ZP.cjs → setupOfflineReconnection-CjuCiKY3.cjs} +2 -2
  177. package/dist/{setupOfflineReconnection-DMiBO2y9.mjs → setupOfflineReconnection-DgJK_4m1.mjs} +2 -2
  178. package/dist/{spawn-DgvUNYEo.mjs → spawn-Dvzy-tzc.mjs} +15 -15
  179. package/dist/{spawn-6PD7nnoC.cjs → spawn-rhF28shY.cjs} +15 -15
  180. package/dist/{spawnAgents-P006Hqio.mjs → spawnAgents-CCnlq-FI.mjs} +1 -1
  181. package/dist/{spawnAgents-DsXgegHM.cjs → spawnAgents-iwuqrgR9.cjs} +1 -1
  182. package/dist/{spawnHappyCLI-Dywezwk6.cjs → spawnHappyCLI-DnKmIsEt.cjs} +2 -2
  183. package/dist/{spawnHappyCLI-CCOrEtf9.mjs → spawnHappyCLI-Dq3LLXLb.mjs} +1 -1
  184. package/dist/{specialCommands-DPcd9edP.mjs → specialCommands-CcyZ1hGA.mjs} +3 -3
  185. package/dist/{specialCommands-QxPpkGKf.cjs → specialCommands-Zwr2C6A2.cjs} +3 -3
  186. package/dist/{startFileWatcher-DghDOCO4.mjs → startFileWatcher-4thXDK9d.mjs} +1 -1
  187. package/dist/{startFileWatcher-RECH5qY8.cjs → startFileWatcher-K6hJSyiR.cjs} +1 -1
  188. package/dist/startupSessionCreate-BfByJ16A.mjs +24 -0
  189. package/dist/startupSessionCreate-CKEbq0tL.cjs +26 -0
  190. package/dist/{streamRelay-DlUWKUpo.cjs → streamRelay-Gy8Xfnon.cjs} +1 -1
  191. package/dist/{streamRelay-DMV_TXfS.mjs → streamRelay-LcDvyEjK.mjs} +1 -1
  192. package/dist/{sync-D23jbqVa.cjs → sync-1hQ5KHpL.cjs} +1 -1
  193. package/dist/{sync-CSe0Rf45.mjs → sync-DO-2PU45.mjs} +1 -1
  194. package/dist/{systemPrompt-CFNKnh65.mjs → systemPrompt-BctLfMZs.mjs} +3 -3
  195. package/dist/{systemPrompt-BOy4kU4P.cjs → systemPrompt-Dj7pgkMK.cjs} +3 -3
  196. package/dist/{teams-DyY669f0.mjs → teams-Bu8YeOoF.mjs} +8 -8
  197. package/dist/{teams-Ov2BDT-A.cjs → teams-uQxUlyyz.cjs} +8 -8
  198. package/dist/{time-65DcU6Jx.mjs → time-BcoJaG8E.mjs} +1 -1
  199. package/dist/{time-CrwIMHta.cjs → time-nqa9shu8.cjs} +1 -1
  200. package/dist/{titleGenerator-CS_rh2_J.cjs → titleGenerator-D09XyYYG.cjs} +3 -3
  201. package/dist/{titleGenerator-CiAMxf7s.mjs → titleGenerator-D5r06bhf.mjs} +1 -1
  202. package/dist/{todo-KY-okGii.cjs → todo-CCOnL7pT.cjs} +6 -6
  203. package/dist/{todo-BDONw0sK.mjs → todo-D1q8146q.mjs} +6 -6
  204. package/dist/{tools-D8-PnZEG.mjs → tools-D2E--n1x.mjs} +3 -3
  205. package/dist/{tools-_w52DZG6.cjs → tools-DiCXnAC5.cjs} +3 -3
  206. package/dist/{uninstall-8vnLN-IE.cjs → uninstall-BrNwwwSD.cjs} +6 -6
  207. package/dist/{uninstall-_fjGRP9b.mjs → uninstall-CtwXi1Rt.mjs} +3 -3
  208. package/package.json +9 -8
  209. package/dist/machineMetadata-CLHS9sv_.cjs +0 -42
  210. package/dist/machineMetadata-D-g--oU_.mjs +0 -39
  211. package/dist/messageBuffer-BWlGgR3A.mjs +0 -71
  212. package/dist/messageBuffer-fJMH6uY8.cjs +0 -73
  213. package/dist/projectPath-ChLhdOyt.cjs +0 -13
  214. package/dist/selfCheck-CjCF4C3v.mjs +0 -85
package/dist/lib.d.cts CHANGED
@@ -200,12 +200,22 @@ declare const sessionStreamFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
200
200
  }, z.core.$strip>], "t">;
201
201
  type SessionStreamFrame = z.infer<typeof sessionStreamFrameSchema>;
202
202
 
203
- /** Runtime context occupancy, never cumulative billing. null after compaction is unknown. */
203
+ /**
204
+ * Runtime context occupancy, never cumulative billing. null after compaction is unknown.
205
+ *
206
+ * B-727 (specs/2026-10-pi-context-usage.md): `contextWindow` stays required so
207
+ * older webs keep rendering; `windowSource` says whether it may be used as a
208
+ * denominator. Free strings + read whitelist (iron rule 14): an unknown value
209
+ * must not make the whole agentState fail to parse.
210
+ */
204
211
  declare const ContextUsageSchema: z$1.ZodObject<{
205
212
  source: z$1.ZodLiteral<"pi">;
206
213
  tokens: z$1.ZodNullable<z$1.ZodNumber>;
207
214
  contextWindow: z$1.ZodNumber;
208
215
  updatedAt: z$1.ZodNumber;
216
+ windowSource: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
217
+ model: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
218
+ compactedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
209
219
  }, z$1.core.$strip>;
210
220
  type ContextUsage = z$1.infer<typeof ContextUsageSchema>;
211
221
 
@@ -367,7 +377,10 @@ type Session = {
367
377
  declare const MachineMetadataSchema: z$1.ZodObject<{
368
378
  teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
369
379
  teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
380
+ teamRetryVersion: z$1.ZodOptional<z$1.ZodNumber>;
370
381
  worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
382
+ modelConfigVersion: z$1.ZodOptional<z$1.ZodNumber>;
383
+ harnessInstallVersion: z$1.ZodOptional<z$1.ZodNumber>;
371
384
  host: z$1.ZodString;
372
385
  platform: z$1.ZodString;
373
386
  happyCliVersion: z$1.ZodString;
@@ -420,6 +433,13 @@ declare const CliUpdateStateSchema: z$1.ZodObject<{
420
433
  detail: z$1.ZodOptional<z$1.ZodString>;
421
434
  at: z$1.ZodNumber;
422
435
  }, z$1.core.$strip>>>;
436
+ autoUpdateEnabled: z$1.ZodOptional<z$1.ZodBoolean>;
437
+ lastInstall: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
438
+ from: z$1.ZodString;
439
+ to: z$1.ZodString;
440
+ at: z$1.ZodNumber;
441
+ source: z$1.ZodString;
442
+ }, z$1.core.$strip>>>;
423
443
  }, z$1.core.$strip>;
424
444
  type CliUpdateState = z$1.infer<typeof CliUpdateStateSchema>;
425
445
  /**
@@ -545,6 +565,13 @@ declare const DaemonStateSchema: z$1.ZodObject<{
545
565
  detail: z$1.ZodOptional<z$1.ZodString>;
546
566
  at: z$1.ZodNumber;
547
567
  }, z$1.core.$strip>>>;
568
+ autoUpdateEnabled: z$1.ZodOptional<z$1.ZodBoolean>;
569
+ lastInstall: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
570
+ from: z$1.ZodString;
571
+ to: z$1.ZodString;
572
+ at: z$1.ZodNumber;
573
+ source: z$1.ZodString;
574
+ }, z$1.core.$strip>>>;
548
575
  }, z$1.core.$strip>>;
549
576
  claudeAuth: z$1.ZodOptional<z$1.ZodObject<{
550
577
  probeVersion: z$1.ZodNumber;
@@ -757,6 +784,18 @@ type Metadata = {
757
784
  idleMs: number;
758
785
  v: 1;
759
786
  };
787
+ /**
788
+ * B-679: written by a wrapper that went OFFLINE (SIGTERM / SIGINT: `sessions
789
+ * stop`, daemon stop / upgrade, shutdown); cleared by the next wrapper on
790
+ * reconnect. `seq` = its message cursor — user input stored above it (sent
791
+ * to the offline session) was never routed and is replayed on resume. Old
792
+ * clients ignore it.
793
+ */
794
+ exitCursor?: {
795
+ at: number;
796
+ seq: number;
797
+ v: 1;
798
+ };
760
799
  /** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
761
800
  keepAwake?: boolean;
762
801
  flavor?: string;
@@ -1283,7 +1322,9 @@ declare class ApiSessionClient extends EventEmitter {
1283
1322
  * session down. Needs no socket; POSTs through the same session-message
1284
1323
  * channel so the web receives it identically to a cancel-button tombstone.
1285
1324
  */
1286
- cancelUndeliveredQueuedInputs(): Promise<void>;
1325
+ cancelUndeliveredQueuedInputs(opts?: {
1326
+ maxSeq?: number;
1327
+ }): Promise<void>;
1287
1328
  /**
1288
1329
  * Send a message to session
1289
1330
  * @param body - Message body (can be MessageContent or raw content for agent messages)
@@ -1488,6 +1529,24 @@ interface WebPanel {
1488
1529
  embed: boolean;
1489
1530
  }
1490
1531
 
1532
+ /**
1533
+ * B-689: why a daemon-spawned wrapper died before it reported its session.
1534
+ *
1535
+ * The wrapper runs with `stdio: 'ignore'`, so the daemon cannot read its
1536
+ * stderr; the wrapper's own log file is the record (utils/exitReason.ts writes
1537
+ * an `[EXIT] …` line on every non-zero exit). Older wrappers have no `[EXIT]`
1538
+ * line — fall back to the last logged error.
1539
+ */
1540
+ type StartupExit = {
1541
+ /** The process is confirmed gone (exited, or stopped after the timeout). */
1542
+ exited: boolean;
1543
+ code: number | null;
1544
+ signal: string | null;
1545
+ /** No session report within the spawn window; the daemon stopped it. */
1546
+ timedOut?: boolean;
1547
+ reason?: string;
1548
+ };
1549
+
1491
1550
  /**
1492
1551
  * The backends the daemon can spawn as a remote session.
1493
1552
  *
@@ -1584,8 +1643,150 @@ type SpawnSessionResult = {
1584
1643
  } | {
1585
1644
  type: 'error';
1586
1645
  errorMessage: string;
1646
+ startupExit?: StartupExit;
1587
1647
  };
1588
1648
 
1649
+ /**
1650
+ * B-688 wire shapes for the `model-config-*` machine RPCs
1651
+ * (spec specs/2026-10-custom-models.md). Mirrored by the web in
1652
+ * packages/happy-web-v2/src/sync/modelConfigTypes.ts — keep both in step.
1653
+ *
1654
+ * Patch convention: a field left `undefined` keeps the file's value; `null`
1655
+ * or '' removes the key Very Happy manages. Secrets never come back: reads
1656
+ * return `SecretView`, never the value.
1657
+ */
1658
+
1659
+ declare const MODEL_CONFIG_CAPABILITY_VERSION = 1;
1660
+ type HarnessId = 'claude' | 'codex' | 'gemini' | 'pi';
1661
+ interface SecretView {
1662
+ /** none: nothing configured; command: a helper/command the user wrote (not shown). */
1663
+ mode: 'none' | 'literal' | 'env' | 'command';
1664
+ /** `sk-a…9f3c` / `••••` for literal; never the value. */
1665
+ masked?: string;
1666
+ envName?: string;
1667
+ /** Whether the daemon's environment (inherited by sessions) defines envName. */
1668
+ envPresent?: boolean;
1669
+ }
1670
+ interface ConfigWarning {
1671
+ code: string;
1672
+ message: string;
1673
+ }
1674
+ interface FileView {
1675
+ role: string;
1676
+ path: string;
1677
+ exists: boolean;
1678
+ error?: {
1679
+ code: string;
1680
+ message: string;
1681
+ };
1682
+ }
1683
+ interface BackupView {
1684
+ id: string;
1685
+ createdAt: number;
1686
+ reason: string;
1687
+ files: string[];
1688
+ }
1689
+ /** Per-harness current values, already masked. Shape depends on the harness. */
1690
+ interface HarnessCurrent {
1691
+ baseUrl?: string | null;
1692
+ apiKey?: SecretView;
1693
+ authHeader?: 'bearer' | 'x-api-key';
1694
+ model?: string | null;
1695
+ opusModel?: string | null;
1696
+ sonnetModel?: string | null;
1697
+ haikuModel?: string | null;
1698
+ pickerModels?: string[];
1699
+ providerId?: string | null;
1700
+ providerName?: string | null;
1701
+ api?: string | null;
1702
+ models?: string[];
1703
+ /** pi: explicit `contextWindow` per model of the selected provider (B-727; absent on older daemons). */
1704
+ contextWindows?: Record<string, number>;
1705
+ defaultModel?: string | null;
1706
+ /** codex/pi: provider currently selected by the harness. */
1707
+ activeProvider?: string | null;
1708
+ active?: boolean;
1709
+ }
1710
+ interface HarnessConfigView {
1711
+ harness: HarnessId;
1712
+ /** Harness binary found on the daemon's PATH. */
1713
+ installed: boolean;
1714
+ files: FileView[];
1715
+ /** sha256 over all files; `apply`/`restore` refuse when the disk moved on. */
1716
+ baseHash: string;
1717
+ current: HarnessCurrent;
1718
+ /** codex/pi: user-defined provider ids in the file. */
1719
+ providers?: string[];
1720
+ /** Model keys the web should offer in this harness's composer picker. */
1721
+ pickerModels: string[];
1722
+ backups: BackupView[];
1723
+ warnings: ConfigWarning[];
1724
+ }
1725
+ interface ModelConfigReadResult {
1726
+ version: typeof MODEL_CONFIG_CAPABILITY_VERSION;
1727
+ harnesses: HarnessConfigView[];
1728
+ }
1729
+ interface FileDiff {
1730
+ path: string;
1731
+ /** Unified diff with secrets masked; '' when unchanged. */
1732
+ diff: string;
1733
+ created: boolean;
1734
+ deleted: boolean;
1735
+ }
1736
+ interface ModelConfigApplyResult {
1737
+ harness: HarnessId;
1738
+ dryRun: boolean;
1739
+ changed: boolean;
1740
+ baseHash: string;
1741
+ files: FileDiff[];
1742
+ warnings: ConfigWarning[];
1743
+ backup?: BackupView;
1744
+ /** Fresh view after a real write. */
1745
+ config?: HarnessConfigView;
1746
+ }
1747
+
1748
+ interface ModelConfigServiceOptions {
1749
+ /** The home the harnesses resolve `~` against (the daemon user's). */
1750
+ home: string;
1751
+ /** The daemon's environment: harness dir overrides + env-reference presence. */
1752
+ env: NodeJS.ProcessEnv;
1753
+ /** Very Happy home; backups and the audit log live under it. */
1754
+ happyHomeDir: string;
1755
+ isInstalled?: (binary: string) => boolean;
1756
+ /** Called after a successful write (e.g. re-run the Claude auth preflight). */
1757
+ onChanged?: (harness: HarnessId) => void;
1758
+ now?: () => number;
1759
+ }
1760
+ declare class ModelConfigService {
1761
+ private readonly opts;
1762
+ private readonly backups;
1763
+ private readonly auditPath;
1764
+ private chain;
1765
+ constructor(opts: ModelConfigServiceOptions);
1766
+ private get ctx();
1767
+ private serialize;
1768
+ private loadFiles;
1769
+ readOne(harness: HarnessId, providerId?: string): Promise<HarnessConfigView>;
1770
+ read(params?: {
1771
+ harness?: unknown;
1772
+ providerId?: unknown;
1773
+ }): Promise<ModelConfigReadResult>;
1774
+ private diffs;
1775
+ private write;
1776
+ private audit;
1777
+ apply(params: {
1778
+ patch?: unknown;
1779
+ baseHash?: unknown;
1780
+ dryRun?: unknown;
1781
+ }): Promise<ModelConfigApplyResult>;
1782
+ restore(params: {
1783
+ harness?: unknown;
1784
+ backupId?: unknown;
1785
+ baseHash?: unknown;
1786
+ dryRun?: unknown;
1787
+ }): Promise<ModelConfigApplyResult>;
1788
+ }
1789
+
1589
1790
  /** Agent-specific visible-screen adapters. Unknown is deliberately not idle. */
1590
1791
  type CodingAgentKind = 'claude' | 'codex' | 'pi';
1591
1792
 
@@ -1784,6 +1985,8 @@ declare class ApiMachineClient {
1784
1985
  } | {
1785
1986
  error: string;
1786
1987
  }>): void;
1988
+ /** B-719: `harness-install` — the owner asked this machine to install one harness id. */
1989
+ setHarnessInstallHandler(handler: (params: unknown) => Promise<unknown>): void;
1787
1990
  setCliUpdateRetryHandler(handler: (version: unknown) => Promise<{
1788
1991
  accepted: true;
1789
1992
  } | {
@@ -1827,6 +2030,8 @@ declare class ApiMachineClient {
1827
2030
  }>;
1828
2031
  setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
1829
2032
  }): void;
2033
+ /** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
2034
+ setModelConfigService(service: ModelConfigService): void;
1830
2035
  /**
1831
2036
  * B-506: the five `sessions.*` methods a CLI on ANOTHER machine of this
1832
2037
  * account calls to read / message sessions this daemon spawned. Plaintext
@@ -1879,12 +2084,21 @@ declare class ApiMachineClient {
1879
2084
  private createControlSocket;
1880
2085
  private activateControlSocket;
1881
2086
  private bindControlDataHandlers;
2087
+ private cliUpdatePolicyHandler;
2088
+ /** B-718: the daemon decides what a policy announcement means (update/policyAnnouncement.ts). */
2089
+ setCliUpdatePolicyHandler(handler: ((payload: unknown) => void) | null): void;
1882
2090
  private serverMigrateHandler;
1883
2091
  /** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
1884
2092
  setServerMigrateHandler(handler: ((notice: unknown) => void) | null): void;
1885
2093
  private startReleaseHandover;
1886
2094
  private releaseHandover;
1887
2095
  private startKeepAlive;
2096
+ /**
2097
+ * Re-detect CLI availability and publish it when it changed. Called on the
2098
+ * throttled keep-alive and, B-719, right after the owner installed a
2099
+ * harness so the launcher enables it without waiting up to five minutes.
2100
+ */
2101
+ recheckCliAvailability(): void;
1888
2102
  private bindRpcRequestHandler;
1889
2103
  private bindMachineCommandHandlers;
1890
2104
  private unbindMachineCommandHandlers;
package/dist/lib.d.mts CHANGED
@@ -200,12 +200,22 @@ declare const sessionStreamFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
200
200
  }, z.core.$strip>], "t">;
201
201
  type SessionStreamFrame = z.infer<typeof sessionStreamFrameSchema>;
202
202
 
203
- /** Runtime context occupancy, never cumulative billing. null after compaction is unknown. */
203
+ /**
204
+ * Runtime context occupancy, never cumulative billing. null after compaction is unknown.
205
+ *
206
+ * B-727 (specs/2026-10-pi-context-usage.md): `contextWindow` stays required so
207
+ * older webs keep rendering; `windowSource` says whether it may be used as a
208
+ * denominator. Free strings + read whitelist (iron rule 14): an unknown value
209
+ * must not make the whole agentState fail to parse.
210
+ */
204
211
  declare const ContextUsageSchema: z$1.ZodObject<{
205
212
  source: z$1.ZodLiteral<"pi">;
206
213
  tokens: z$1.ZodNullable<z$1.ZodNumber>;
207
214
  contextWindow: z$1.ZodNumber;
208
215
  updatedAt: z$1.ZodNumber;
216
+ windowSource: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
217
+ model: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
218
+ compactedAt: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodNumber>>;
209
219
  }, z$1.core.$strip>;
210
220
  type ContextUsage = z$1.infer<typeof ContextUsageSchema>;
211
221
 
@@ -367,7 +377,10 @@ type Session = {
367
377
  declare const MachineMetadataSchema: z$1.ZodObject<{
368
378
  teamsVersion: z$1.ZodOptional<z$1.ZodNumber>;
369
379
  teamLaunchVersion: z$1.ZodOptional<z$1.ZodNumber>;
380
+ teamRetryVersion: z$1.ZodOptional<z$1.ZodNumber>;
370
381
  worktreeVersion: z$1.ZodOptional<z$1.ZodNumber>;
382
+ modelConfigVersion: z$1.ZodOptional<z$1.ZodNumber>;
383
+ harnessInstallVersion: z$1.ZodOptional<z$1.ZodNumber>;
371
384
  host: z$1.ZodString;
372
385
  platform: z$1.ZodString;
373
386
  happyCliVersion: z$1.ZodString;
@@ -420,6 +433,13 @@ declare const CliUpdateStateSchema: z$1.ZodObject<{
420
433
  detail: z$1.ZodOptional<z$1.ZodString>;
421
434
  at: z$1.ZodNumber;
422
435
  }, z$1.core.$strip>>>;
436
+ autoUpdateEnabled: z$1.ZodOptional<z$1.ZodBoolean>;
437
+ lastInstall: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
438
+ from: z$1.ZodString;
439
+ to: z$1.ZodString;
440
+ at: z$1.ZodNumber;
441
+ source: z$1.ZodString;
442
+ }, z$1.core.$strip>>>;
423
443
  }, z$1.core.$strip>;
424
444
  type CliUpdateState = z$1.infer<typeof CliUpdateStateSchema>;
425
445
  /**
@@ -545,6 +565,13 @@ declare const DaemonStateSchema: z$1.ZodObject<{
545
565
  detail: z$1.ZodOptional<z$1.ZodString>;
546
566
  at: z$1.ZodNumber;
547
567
  }, z$1.core.$strip>>>;
568
+ autoUpdateEnabled: z$1.ZodOptional<z$1.ZodBoolean>;
569
+ lastInstall: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
570
+ from: z$1.ZodString;
571
+ to: z$1.ZodString;
572
+ at: z$1.ZodNumber;
573
+ source: z$1.ZodString;
574
+ }, z$1.core.$strip>>>;
548
575
  }, z$1.core.$strip>>;
549
576
  claudeAuth: z$1.ZodOptional<z$1.ZodObject<{
550
577
  probeVersion: z$1.ZodNumber;
@@ -757,6 +784,18 @@ type Metadata = {
757
784
  idleMs: number;
758
785
  v: 1;
759
786
  };
787
+ /**
788
+ * B-679: written by a wrapper that went OFFLINE (SIGTERM / SIGINT: `sessions
789
+ * stop`, daemon stop / upgrade, shutdown); cleared by the next wrapper on
790
+ * reconnect. `seq` = its message cursor — user input stored above it (sent
791
+ * to the offline session) was never routed and is replayed on resume. Old
792
+ * clients ignore it.
793
+ */
794
+ exitCursor?: {
795
+ at: number;
796
+ seq: number;
797
+ v: 1;
798
+ };
760
799
  /** B-587: user opted this session out of idle hibernation (web ⋯ menu). */
761
800
  keepAwake?: boolean;
762
801
  flavor?: string;
@@ -1283,7 +1322,9 @@ declare class ApiSessionClient extends EventEmitter {
1283
1322
  * session down. Needs no socket; POSTs through the same session-message
1284
1323
  * channel so the web receives it identically to a cancel-button tombstone.
1285
1324
  */
1286
- cancelUndeliveredQueuedInputs(): Promise<void>;
1325
+ cancelUndeliveredQueuedInputs(opts?: {
1326
+ maxSeq?: number;
1327
+ }): Promise<void>;
1287
1328
  /**
1288
1329
  * Send a message to session
1289
1330
  * @param body - Message body (can be MessageContent or raw content for agent messages)
@@ -1488,6 +1529,24 @@ interface WebPanel {
1488
1529
  embed: boolean;
1489
1530
  }
1490
1531
 
1532
+ /**
1533
+ * B-689: why a daemon-spawned wrapper died before it reported its session.
1534
+ *
1535
+ * The wrapper runs with `stdio: 'ignore'`, so the daemon cannot read its
1536
+ * stderr; the wrapper's own log file is the record (utils/exitReason.ts writes
1537
+ * an `[EXIT] …` line on every non-zero exit). Older wrappers have no `[EXIT]`
1538
+ * line — fall back to the last logged error.
1539
+ */
1540
+ type StartupExit = {
1541
+ /** The process is confirmed gone (exited, or stopped after the timeout). */
1542
+ exited: boolean;
1543
+ code: number | null;
1544
+ signal: string | null;
1545
+ /** No session report within the spawn window; the daemon stopped it. */
1546
+ timedOut?: boolean;
1547
+ reason?: string;
1548
+ };
1549
+
1491
1550
  /**
1492
1551
  * The backends the daemon can spawn as a remote session.
1493
1552
  *
@@ -1584,8 +1643,150 @@ type SpawnSessionResult = {
1584
1643
  } | {
1585
1644
  type: 'error';
1586
1645
  errorMessage: string;
1646
+ startupExit?: StartupExit;
1587
1647
  };
1588
1648
 
1649
+ /**
1650
+ * B-688 wire shapes for the `model-config-*` machine RPCs
1651
+ * (spec specs/2026-10-custom-models.md). Mirrored by the web in
1652
+ * packages/happy-web-v2/src/sync/modelConfigTypes.ts — keep both in step.
1653
+ *
1654
+ * Patch convention: a field left `undefined` keeps the file's value; `null`
1655
+ * or '' removes the key Very Happy manages. Secrets never come back: reads
1656
+ * return `SecretView`, never the value.
1657
+ */
1658
+
1659
+ declare const MODEL_CONFIG_CAPABILITY_VERSION = 1;
1660
+ type HarnessId = 'claude' | 'codex' | 'gemini' | 'pi';
1661
+ interface SecretView {
1662
+ /** none: nothing configured; command: a helper/command the user wrote (not shown). */
1663
+ mode: 'none' | 'literal' | 'env' | 'command';
1664
+ /** `sk-a…9f3c` / `••••` for literal; never the value. */
1665
+ masked?: string;
1666
+ envName?: string;
1667
+ /** Whether the daemon's environment (inherited by sessions) defines envName. */
1668
+ envPresent?: boolean;
1669
+ }
1670
+ interface ConfigWarning {
1671
+ code: string;
1672
+ message: string;
1673
+ }
1674
+ interface FileView {
1675
+ role: string;
1676
+ path: string;
1677
+ exists: boolean;
1678
+ error?: {
1679
+ code: string;
1680
+ message: string;
1681
+ };
1682
+ }
1683
+ interface BackupView {
1684
+ id: string;
1685
+ createdAt: number;
1686
+ reason: string;
1687
+ files: string[];
1688
+ }
1689
+ /** Per-harness current values, already masked. Shape depends on the harness. */
1690
+ interface HarnessCurrent {
1691
+ baseUrl?: string | null;
1692
+ apiKey?: SecretView;
1693
+ authHeader?: 'bearer' | 'x-api-key';
1694
+ model?: string | null;
1695
+ opusModel?: string | null;
1696
+ sonnetModel?: string | null;
1697
+ haikuModel?: string | null;
1698
+ pickerModels?: string[];
1699
+ providerId?: string | null;
1700
+ providerName?: string | null;
1701
+ api?: string | null;
1702
+ models?: string[];
1703
+ /** pi: explicit `contextWindow` per model of the selected provider (B-727; absent on older daemons). */
1704
+ contextWindows?: Record<string, number>;
1705
+ defaultModel?: string | null;
1706
+ /** codex/pi: provider currently selected by the harness. */
1707
+ activeProvider?: string | null;
1708
+ active?: boolean;
1709
+ }
1710
+ interface HarnessConfigView {
1711
+ harness: HarnessId;
1712
+ /** Harness binary found on the daemon's PATH. */
1713
+ installed: boolean;
1714
+ files: FileView[];
1715
+ /** sha256 over all files; `apply`/`restore` refuse when the disk moved on. */
1716
+ baseHash: string;
1717
+ current: HarnessCurrent;
1718
+ /** codex/pi: user-defined provider ids in the file. */
1719
+ providers?: string[];
1720
+ /** Model keys the web should offer in this harness's composer picker. */
1721
+ pickerModels: string[];
1722
+ backups: BackupView[];
1723
+ warnings: ConfigWarning[];
1724
+ }
1725
+ interface ModelConfigReadResult {
1726
+ version: typeof MODEL_CONFIG_CAPABILITY_VERSION;
1727
+ harnesses: HarnessConfigView[];
1728
+ }
1729
+ interface FileDiff {
1730
+ path: string;
1731
+ /** Unified diff with secrets masked; '' when unchanged. */
1732
+ diff: string;
1733
+ created: boolean;
1734
+ deleted: boolean;
1735
+ }
1736
+ interface ModelConfigApplyResult {
1737
+ harness: HarnessId;
1738
+ dryRun: boolean;
1739
+ changed: boolean;
1740
+ baseHash: string;
1741
+ files: FileDiff[];
1742
+ warnings: ConfigWarning[];
1743
+ backup?: BackupView;
1744
+ /** Fresh view after a real write. */
1745
+ config?: HarnessConfigView;
1746
+ }
1747
+
1748
+ interface ModelConfigServiceOptions {
1749
+ /** The home the harnesses resolve `~` against (the daemon user's). */
1750
+ home: string;
1751
+ /** The daemon's environment: harness dir overrides + env-reference presence. */
1752
+ env: NodeJS.ProcessEnv;
1753
+ /** Very Happy home; backups and the audit log live under it. */
1754
+ happyHomeDir: string;
1755
+ isInstalled?: (binary: string) => boolean;
1756
+ /** Called after a successful write (e.g. re-run the Claude auth preflight). */
1757
+ onChanged?: (harness: HarnessId) => void;
1758
+ now?: () => number;
1759
+ }
1760
+ declare class ModelConfigService {
1761
+ private readonly opts;
1762
+ private readonly backups;
1763
+ private readonly auditPath;
1764
+ private chain;
1765
+ constructor(opts: ModelConfigServiceOptions);
1766
+ private get ctx();
1767
+ private serialize;
1768
+ private loadFiles;
1769
+ readOne(harness: HarnessId, providerId?: string): Promise<HarnessConfigView>;
1770
+ read(params?: {
1771
+ harness?: unknown;
1772
+ providerId?: unknown;
1773
+ }): Promise<ModelConfigReadResult>;
1774
+ private diffs;
1775
+ private write;
1776
+ private audit;
1777
+ apply(params: {
1778
+ patch?: unknown;
1779
+ baseHash?: unknown;
1780
+ dryRun?: unknown;
1781
+ }): Promise<ModelConfigApplyResult>;
1782
+ restore(params: {
1783
+ harness?: unknown;
1784
+ backupId?: unknown;
1785
+ baseHash?: unknown;
1786
+ dryRun?: unknown;
1787
+ }): Promise<ModelConfigApplyResult>;
1788
+ }
1789
+
1589
1790
  /** Agent-specific visible-screen adapters. Unknown is deliberately not idle. */
1590
1791
  type CodingAgentKind = 'claude' | 'codex' | 'pi';
1591
1792
 
@@ -1784,6 +1985,8 @@ declare class ApiMachineClient {
1784
1985
  } | {
1785
1986
  error: string;
1786
1987
  }>): void;
1988
+ /** B-719: `harness-install` — the owner asked this machine to install one harness id. */
1989
+ setHarnessInstallHandler(handler: (params: unknown) => Promise<unknown>): void;
1787
1990
  setCliUpdateRetryHandler(handler: (version: unknown) => Promise<{
1788
1991
  accepted: true;
1789
1992
  } | {
@@ -1827,6 +2030,8 @@ declare class ApiMachineClient {
1827
2030
  }>;
1828
2031
  setStore: (store: 'auto' | 'file') => Promise<ClaudeAuthState>;
1829
2032
  }): void;
2033
+ /** B-688 machine RPCs `model-config-*` (modules/modelConfig/modelConfigRpc.ts). */
2034
+ setModelConfigService(service: ModelConfigService): void;
1830
2035
  /**
1831
2036
  * B-506: the five `sessions.*` methods a CLI on ANOTHER machine of this
1832
2037
  * account calls to read / message sessions this daemon spawned. Plaintext
@@ -1879,12 +2084,21 @@ declare class ApiMachineClient {
1879
2084
  private createControlSocket;
1880
2085
  private activateControlSocket;
1881
2086
  private bindControlDataHandlers;
2087
+ private cliUpdatePolicyHandler;
2088
+ /** B-718: the daemon decides what a policy announcement means (update/policyAnnouncement.ts). */
2089
+ setCliUpdatePolicyHandler(handler: ((payload: unknown) => void) | null): void;
1882
2090
  private serverMigrateHandler;
1883
2091
  /** B-635: the daemon decides what to do with a relay-migration notice (daemon/serverMigration.ts). */
1884
2092
  setServerMigrateHandler(handler: ((notice: unknown) => void) | null): void;
1885
2093
  private startReleaseHandover;
1886
2094
  private releaseHandover;
1887
2095
  private startKeepAlive;
2096
+ /**
2097
+ * Re-detect CLI availability and publish it when it changed. Called on the
2098
+ * throttled keep-alive and, B-719, right after the owner installed a
2099
+ * harness so the launcher enables it without waiting up to five minutes.
2100
+ */
2101
+ recheckCliAvailability(): void;
1888
2102
  private bindRpcRequestHandler;
1889
2103
  private bindMachineCommandHandlers;
1890
2104
  private unbindMachineCommandHandlers;
package/dist/lib.mjs CHANGED
@@ -1,9 +1,9 @@
1
- export { A as ApiClient, a as ApiSessionClient } from './api-CzwFpJQc.mjs';
2
- export { l as logger } from './logger-BtVhHnD8.mjs';
3
- export { c as configuration } from './configuration-WMi4idBB.mjs';
1
+ export { A as ApiClient, a as ApiSessionClient } from './api-Dr3wXL_7.mjs';
2
+ export { l as logger } from './logger-LFr8iPgl.mjs';
3
+ export { c as configuration } from './configuration-BPrfb17M.mjs';
4
4
  export { R as RawJSONLinesSchema } from './types-CkqAACXx.mjs';
5
5
  import 'axios';
6
- import './lidState-Bb8fgXg3.mjs';
6
+ import './lidState-DghbfRbr.mjs';
7
7
  import './authRelay-DhQhkBvX.mjs';
8
8
  import 'node:crypto';
9
9
  import 'tweetnacl';
@@ -11,14 +11,14 @@ import 'os';
11
11
  import 'child_process';
12
12
  import 'node:events';
13
13
  import 'socket.io-client';
14
- import './pushNotifications-BdFjDjQe.mjs';
14
+ import './pushNotifications-DXGIhE-A.mjs';
15
15
  import 'zod';
16
- import './index-DPOa4NhL.mjs';
16
+ import './index-CeRXrGnH.mjs';
17
17
  import '@paralleldrive/cuid2';
18
18
  import './contentLogMetadata-BlWI0egu.mjs';
19
19
  import './limits-DIo7rEBR.mjs';
20
- import './time-65DcU6Jx.mjs';
21
- import './registerCommonHandlers-BAlP7SGc.mjs';
20
+ import './time-BcoJaG8E.mjs';
21
+ import './registerCommonHandlers-DF6bdDtd.mjs';
22
22
  import 'util';
23
23
  import 'fs/promises';
24
24
  import 'crypto';
@@ -26,14 +26,14 @@ import 'path';
26
26
  import 'cross-spawn';
27
27
  import './projectPath-BTBIMB57.mjs';
28
28
  import 'url';
29
- import './sync-CSe0Rf45.mjs';
30
- import './backgroundTaskActivity-BVwJBl02.mjs';
31
- import './controlClient-BWUJrj3t.mjs';
32
- import './persistence-Cr-wutZ4.mjs';
29
+ import './sync-DO-2PU45.mjs';
30
+ import './backgroundTaskActivity-8PdPxrvy.mjs';
31
+ import './controlClient-CkNpT5zS.mjs';
32
+ import './persistence-D2Djrf7t.mjs';
33
33
  import 'node:fs/promises';
34
34
  import 'node:fs';
35
35
  import 'chalk';
36
36
  import 'node:util';
37
37
  import 'node:path';
38
38
  import 'node:os';
39
- import './package-BPPebGQF.mjs';
39
+ import './package-DYGwlmXl.mjs';
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-BtVhHnD8.mjs';
1
+ import { l as logger } from './logger-LFr8iPgl.mjs';
2
2
  import { e as encodeBase64, g as encrypt, h as decrypt, d as decodeBase64 } from './authRelay-DhQhkBvX.mjs';
3
3
  import os from 'os';
4
4
  import { execSync } from 'child_process';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-C1GWx3gi.cjs');
3
+ var logger = require('./logger-DgBwUSgS.cjs');
4
4
  var authRelay = require('./authRelay-Dy1qU9td.cjs');
5
5
  var os = require('os');
6
6
  var child_process = require('child_process');
@@ -6,7 +6,7 @@ var path = require('node:path');
6
6
  var tweetnacl = require('tweetnacl');
7
7
  var z = require('zod');
8
8
  var authRelay = require('./authRelay-Dy1qU9td.cjs');
9
- var configuration = require('./configuration-CMHZnp6G.cjs');
9
+ var configuration = require('./configuration-C8JgseHy.cjs');
10
10
 
11
11
  const AgentCredentialsSchema = z.z.object({
12
12
  token: z.z.string().min(1),