very-happy-cli 0.2.180 → 0.2.182

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 (202) hide show
  1. package/dist/{AcpBackend-B8Zi30Zh.mjs → AcpBackend-DLk3gMYH.mjs} +3 -3
  2. package/dist/{AcpBackend-DfRDtMcG.cjs → AcpBackend-JA5eu8Y0.cjs} +3 -3
  3. package/dist/{AcpSessionManager-CASKOnOj.cjs → AcpSessionManager-DjYidq4C.cjs} +1 -1
  4. package/dist/{AcpSessionManager-i8Rab0xT.mjs → AcpSessionManager-OrCww-Qv.mjs} +1 -1
  5. package/dist/{BasePermissionHandler-BlM_tfej.cjs → BasePermissionHandler-D3PMKLBS.cjs} +1 -1
  6. package/dist/{BasePermissionHandler-26fKbRCm.mjs → BasePermissionHandler-u-neo-iN.mjs} +1 -1
  7. package/dist/{acpSessionResume-CR5pmgVo.cjs → acpSessionResume-Dxo8222T.cjs} +1 -1
  8. package/dist/{acpSessionResume-B9l54P-X.mjs → acpSessionResume-u2TwX5Jd.mjs} +1 -1
  9. package/dist/{agentHome-C7Sb7-Tz.cjs → agentHome-CP1tCBXz.cjs} +4 -4
  10. package/dist/{agentHome-CmGy0NWv.mjs → agentHome-D3hNrnoA.mjs} +4 -4
  11. package/dist/{api-DM7b1OKj.cjs → api-CZWcG7uh.cjs} +10 -10
  12. package/dist/{api-Hov8p7CA.mjs → api-C_YSQnsi.mjs} +10 -10
  13. package/dist/{apiMachine-CwGEhQDT.mjs → apiMachine-C_GA5Bm-.mjs} +59 -32
  14. package/dist/{apiMachine-DkGRj-Ai.cjs → apiMachine-DPGrED5C.cjs} +60 -33
  15. package/dist/{attachmentContent-CIn4iPEk.mjs → attachmentContent-Ckzyb1Uy.mjs} +2 -2
  16. package/dist/{attachmentContent-CEm13_gF.cjs → attachmentContent-I_dJIevE.cjs} +2 -2
  17. package/dist/{auth-Dawj7pP5.cjs → auth-BKnE7uv7.cjs} +8 -8
  18. package/dist/{auth-BG1DY0gj.mjs → auth-CGgpiJ5-.mjs} +5 -5
  19. package/dist/{auth-rggxMpEE.mjs → auth-DOXMI-xp.mjs} +8 -8
  20. package/dist/{auth-CBXnm-Mj.cjs → auth-Lw_utSMV.cjs} +5 -5
  21. package/dist/{auto-CbYOfoPS.cjs → auto-CIgFHIyQ.cjs} +18 -18
  22. package/dist/{auto-CXXLXGeL.mjs → auto-Z56mMZnH.mjs} +18 -18
  23. package/dist/{bootstrap-Dt5I1SOl.mjs → bootstrap-D3vlOROj.mjs} +2 -2
  24. package/dist/{bootstrap-DoA7okld.cjs → bootstrap-DsXp74wv.cjs} +2 -2
  25. package/dist/{browser-DUNetFT4.mjs → browser-CUxGoATV.mjs} +1 -1
  26. package/dist/{browser-DZ6qRtfH.cjs → browser-CZlA9AkO.cjs} +1 -1
  27. package/dist/{claudeLocal-OHWQigCl.mjs → claudeLocal-FnTUgwCi.mjs} +6 -6
  28. package/dist/{claudeLocal--DNyMOSv.cjs → claudeLocal-oELvwiZL.cjs} +6 -6
  29. package/dist/{claudeLocalLauncher-BStvfa7M.mjs → claudeLocalLauncher-CO5YHCzi.mjs} +11 -11
  30. package/dist/{claudeLocalLauncher-BhvPbcyH.cjs → claudeLocalLauncher-QsVXEVdE.cjs} +11 -11
  31. package/dist/{claudeSessionFork-Be16vzGc.cjs → claudeSessionFork-BA4GE5AL.cjs} +1 -1
  32. package/dist/{claudeSessionFork-GAVWhiKG.mjs → claudeSessionFork-Cspr6QW0.mjs} +1 -1
  33. package/dist/{client-D4uPb1uu.mjs → client-BGfmSbWc.mjs} +44 -9
  34. package/dist/{client-BWjaHKtj.cjs → client-CDuW4MS9.cjs} +2 -2
  35. package/dist/{client-CnB7kRCT.mjs → client-Ctbw05Xj.mjs} +2 -2
  36. package/dist/{client-DJplzPjD.cjs → client-DK8CzUry.cjs} +2 -2
  37. package/dist/{client-Ca5Pcgy_.mjs → client-o-meK7-a.mjs} +2 -2
  38. package/dist/{client-D_loZ9IK.cjs → client-xnWiHqdb.cjs} +44 -8
  39. package/dist/codex/happyMcpStdioBridge.cjs +21 -20
  40. package/dist/codex/happyMcpStdioBridge.mjs +21 -20
  41. package/dist/{codexAppServerClient-CO4G6OS4.mjs → codexAppServerClient-BlsOZLul.mjs} +3 -3
  42. package/dist/{codexAppServerClient-PE-12AsW.cjs → codexAppServerClient-DhNDTU_i.cjs} +3 -3
  43. package/dist/{codexCommand-B_xUH79E.mjs → codexCommand-BGx5NMQR.mjs} +49 -46
  44. package/dist/{codexCommand-BNoD1t1C.cjs → codexCommand-DJDPfpIs.cjs} +49 -46
  45. package/dist/{codexTermination-Dx48ma6e.mjs → codexTermination-CVhhwHZU.mjs} +1 -1
  46. package/dist/{codexTermination-BmBbizFK.cjs → codexTermination-CqPMuokw.cjs} +1 -1
  47. package/dist/{config-CtwEUxUP.cjs → config-CHpxzXBL.cjs} +3 -3
  48. package/dist/{config-DSu0Blos.mjs → config-CWAe08-Q.mjs} +3 -3
  49. package/dist/{configuration-CYO-kPOS.cjs → configuration-B-CugKJ3.cjs} +1 -1
  50. package/dist/{configuration-PxzEJumr.mjs → configuration-YXw_Dcsb.mjs} +1 -1
  51. package/dist/{connect-Dq7wndzR.cjs → connect-BmHvMXH2.cjs} +13 -13
  52. package/dist/{connect-BQrg3TB6.mjs → connect-CPeJXHha.mjs} +13 -13
  53. package/dist/{context-6TP-iz_c.cjs → context-BtIVqHI5.cjs} +1 -1
  54. package/dist/{context-CJGRRGWW.mjs → context-Drzs_Z38.mjs} +1 -1
  55. package/dist/{controlClient-DoeYovwP.mjs → controlClient-BL4hb4l3.mjs} +3 -3
  56. package/dist/{controlClient-Bqv5v5OM.cjs → controlClient-D0kGwKYx.cjs} +3 -3
  57. package/dist/{createSessionMetadata-DDIChCx8.mjs → createSessionMetadata-DvGDsnsn.mjs} +2 -2
  58. package/dist/{createSessionMetadata-xz767pcG.cjs → createSessionMetadata-L499emJn.cjs} +2 -2
  59. package/dist/{defaultPermissionMode-i5KzdK09.mjs → defaultPermissionMode-BLfxu-Yz.mjs} +2 -2
  60. package/dist/{defaultPermissionMode-PkZGsQDk.cjs → defaultPermissionMode-MXpZlXud.cjs} +2 -2
  61. package/dist/{deterministicJson-CTEJDqtS.mjs → deterministicJson-B_UAbmQ4.mjs} +87 -24
  62. package/dist/{deterministicJson-xqA6DaOm.cjs → deterministicJson-CfLkBRvU.cjs} +87 -22
  63. package/dist/{doctor-BrgSlfXn.cjs → doctor-DMvlzmnE.cjs} +8 -7
  64. package/dist/{doctor-IctjVh9T.mjs → doctor-bKScPtZu.mjs} +8 -8
  65. package/dist/{downloadTarget-CEb9che-.cjs → downloadTarget-D33BFvew.cjs} +6 -6
  66. package/dist/{downloadTarget-jbOz1egC.mjs → downloadTarget-J9j37eFG.mjs} +6 -6
  67. package/dist/{ensureDaemonRunning-D-HyjGIX.cjs → ensureDaemonRunning-2IqWROJp.cjs} +5 -5
  68. package/dist/{ensureDaemonRunning-b1e8LCSM.mjs → ensureDaemonRunning-DLvwhpNg.mjs} +5 -5
  69. package/dist/fileStore-5qpetZS0.mjs +146 -0
  70. package/dist/fileStore-7qhnbs6N.cjs +152 -0
  71. package/dist/fsMkdir-0K3yENml.cjs +56 -0
  72. package/dist/fsMkdir-DumgLTzR.mjs +53 -0
  73. package/dist/{handleResumeCommand-DpaZvm2c.mjs → handleResumeCommand-CjtjQ_I7.mjs} +5 -5
  74. package/dist/{handleResumeCommand-BvWVuRwH.cjs → handleResumeCommand-Dp2Y-p6V.cjs} +5 -5
  75. package/dist/{index-C6Vn5Eac.mjs → index-BI0h2Zks.mjs} +54 -6
  76. package/dist/{index-CMf5VbzG.mjs → index-BOT0Tg5E.mjs} +4 -4
  77. package/dist/{index-C64Ufj4D.cjs → index-B_aNaW9w.cjs} +4 -4
  78. package/dist/{index-F2UejqYs.cjs → index-CZC7egJA.cjs} +3 -3
  79. package/dist/{index-Bsvbgh9e.mjs → index-Cllzqoes.mjs} +4 -4
  80. package/dist/{index-B2p2Mut7.cjs → index-DYVIbhAJ.cjs} +78 -60
  81. package/dist/{index-wCbtF4BK.mjs → index-D_LvOWUN.mjs} +3 -3
  82. package/dist/{index-DmTlDRSL.cjs → index-DymOv3kK.cjs} +4 -4
  83. package/dist/{index-BUNnpGFF.mjs → index-kA46KMxN.mjs} +79 -61
  84. package/dist/{index-Dv0Q48P3.cjs → index-oh8XEozJ.cjs} +57 -6
  85. package/dist/index.cjs +2 -2
  86. package/dist/index.mjs +2 -2
  87. package/dist/{install-C0ANcEAW.cjs → install-BAa_Xmof.cjs} +3 -3
  88. package/dist/{install-CdzSV7qO.mjs → install-C46mkr9a.mjs} +3 -3
  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/lib.cjs +12 -12
  92. package/dist/lib.d.cts +40 -1
  93. package/dist/lib.d.mts +40 -1
  94. package/dist/lib.mjs +12 -12
  95. package/dist/{lidState-bBrmaQd2.mjs → lidState-D8Iuvjgl.mjs} +1 -1
  96. package/dist/{lidState-DWGnm2H4.cjs → lidState-DcPvwniz.cjs} +1 -1
  97. package/dist/{localHappyAgentAuth-Dn1jYDpt.mjs → localHappyAgentAuth-D3rQDRd9.mjs} +1 -1
  98. package/dist/{localHappyAgentAuth-DZHQnIW9.cjs → localHappyAgentAuth-SD6GM97y.cjs} +1 -1
  99. package/dist/{logger-CphW5nUE.cjs → logger-DK1ytCz6.cjs} +2 -2
  100. package/dist/{logger-BUngm5Xg.mjs → logger-DpqihN1f.mjs} +2 -2
  101. package/dist/{machineMetadata-BXN_bKU3.mjs → machineMetadata-D4E3qoIG.mjs} +13 -4
  102. package/dist/{machineMetadata-BQm9YTcI.cjs → machineMetadata-IJc6_iyx.cjs} +13 -3
  103. package/dist/{main-DGkdYfEq.mjs → main-CpUmw7hm.mjs} +45 -45
  104. package/dist/{main-B2UV51nK.cjs → main-DUXh2rgW.cjs} +45 -45
  105. package/dist/{mcp-CbTtbs0f.mjs → mcp-66g1TJ8P.mjs} +17 -15
  106. package/dist/{mcp-BFvAEIRz.cjs → mcp-D5f3Vd-z.cjs} +17 -15
  107. package/dist/{mirrorProtocol-HKPivs5o.cjs → mirrorProtocol-DkWOcZh9.cjs} +16 -153
  108. package/dist/{mirrorProtocol-BR4luBC0.mjs → mirrorProtocol-bsCUcaCY.mjs} +19 -151
  109. package/dist/{package-KhLqBDX9.cjs → package-BfeqAzyJ.cjs} +8 -8
  110. package/dist/{package-7Ld1YMhh.mjs → package-CKj8zndE.mjs} +8 -8
  111. package/dist/{panels-Njf6GelF.cjs → panels-2PXsw9-d.cjs} +5 -5
  112. package/dist/{panels-C7IVqpJk.mjs → panels-r8LmaBs6.mjs} +5 -5
  113. package/dist/{peerTools-DQNlrcqM.cjs → peerTools-BVp1z0T_.cjs} +5 -5
  114. package/dist/{peerTools-BOlDRyhi.mjs → peerTools-D_id4d41.mjs} +5 -5
  115. package/dist/{persistence-9BMYspxG.cjs → persistence-BdpwWXKh.cjs} +2 -2
  116. package/dist/{persistence-BFUOHW5h.mjs → persistence-jOEuAFTS.mjs} +2 -2
  117. package/dist/pi-CqyoZMjI.mjs +380 -0
  118. package/dist/pi-DlsrPCTa.cjs +400 -0
  119. package/dist/{piRunnerArgs-H2pgpA5z.mjs → piRunnerArgs-68I5F_M1.mjs} +1 -1
  120. package/dist/{piRunnerArgs-DGaq6VYM.cjs → piRunnerArgs-vxCHKnSA.cjs} +1 -1
  121. package/dist/{piRuntime-CT5xv_3h.cjs → piRuntime-C3Dg5uni.cjs} +2 -2
  122. package/dist/{piRuntime-CdN0JAsa.mjs → piRuntime-DgLIard1.mjs} +2 -2
  123. package/dist/{piTerminal-0FBtXTHK.cjs → piTerminal-C135BcLP.cjs} +20 -18
  124. package/dist/{piTerminal-C4m9YXAV.mjs → piTerminal-DJL0w-uA.mjs} +20 -18
  125. package/dist/{prompt-lgF9IE82.cjs → prompt-Bof2aQkI.cjs} +7 -2
  126. package/dist/{prompt-BOouDaTM.mjs → prompt-QHuFx9j6.mjs} +7 -2
  127. package/dist/{pushNotifications-DCiBEVeC.mjs → pushNotifications-CMmRsbKv.mjs} +12 -4
  128. package/dist/{pushNotifications-DI92havG.cjs → pushNotifications-CyQVDThC.cjs} +12 -4
  129. package/dist/{query-BETKBrnz.cjs → query-CK--1fbL.cjs} +1 -1
  130. package/dist/{query-ywZbQUzR.mjs → query-CPXnDURZ.mjs} +1 -1
  131. package/dist/{rateLimitWindows-BkfuUB1a.mjs → rateLimitWindows-Cqa4AGaB.mjs} +1 -1
  132. package/dist/{rateLimitWindows-YRIYVdo4.cjs → rateLimitWindows-DJxnNw-X.cjs} +1 -1
  133. package/dist/{registerCommonHandlers-C7a_dUWs.cjs → registerCommonHandlers-DbNoM39q.cjs} +2 -2
  134. package/dist/{registerCommonHandlers-CTkCvjxt.mjs → registerCommonHandlers-K8dICQO2.mjs} +2 -2
  135. package/dist/{registerKillSessionHandler-CIsvBrVe.cjs → registerKillSessionHandler-DiS_go8d.cjs} +6 -6
  136. package/dist/{registerKillSessionHandler-CaqqRYq6.mjs → registerKillSessionHandler-O1iriOMO.mjs} +6 -6
  137. package/dist/{remoteSessionClient-PP-mOKmw.mjs → remoteSessionClient-BlURPulk.mjs} +5 -5
  138. package/dist/{remoteSessionClient-D843fkzL.cjs → remoteSessionClient-CtV9mDko.cjs} +5 -5
  139. package/dist/{reportProgressTool-14AXr959.cjs → reportProgressTool-DlD_xjzU.cjs} +4 -4
  140. package/dist/{reportProgressTool-ZOCNjWHr.mjs → reportProgressTool-nCExrHZH.mjs} +4 -4
  141. package/dist/{resources-CvIlkzpP.cjs → resources-BPyN59Iv.cjs} +23 -2
  142. package/dist/{resources-y9jfyO-_.mjs → resources-CH1iP6Cv.mjs} +22 -3
  143. package/dist/{run-CAOCYYfT.cjs → run-BBNrcCfI.cjs} +621 -594
  144. package/dist/{run-Dajw2E5j.mjs → run-drtwHYkO.mjs} +557 -530
  145. package/dist/{runClaude-CRRKt-tm.cjs → runClaude-B3KSeby4.cjs} +23 -22
  146. package/dist/{runClaude-C6oxWYbp.mjs → runClaude-CFp27Tyi.mjs} +23 -22
  147. package/dist/{runClaudeDeps-B1ysqTvx.cjs → runClaudeDeps-C_C9TCI0.cjs} +43 -41
  148. package/dist/{runClaudeDeps-BcZ68cX3.mjs → runClaudeDeps-DMcv93lA.mjs} +48 -46
  149. package/dist/{runGemini-D7yKc4wD.mjs → runGemini-Bc6SY-hd.mjs} +40 -37
  150. package/dist/{runGemini-DtKFXqf-.cjs → runGemini-DzdSBAr9.cjs} +40 -37
  151. package/dist/{runOpenClaw-C8ilyLP9.mjs → runOpenClaw-DI0qMlgF.mjs} +19 -18
  152. package/dist/{runOpenClaw-Cq29mryb.cjs → runOpenClaw-DN6rEVqC.cjs} +19 -18
  153. package/dist/{sandbox-gIj-EuF4.cjs → sandbox-DtttPBMA.cjs} +4 -4
  154. package/dist/{sandbox-CbCutma4.mjs → sandbox-v-ffe8LR.mjs} +4 -4
  155. package/dist/{selfCheck-BTGBVthv.cjs → selfCheck-B-yy6bW3.cjs} +36 -36
  156. package/dist/selfCheck-BDfTwxqB.mjs +85 -0
  157. package/dist/{send-YZRMQvMJ.mjs → send-DpBwSZuj.mjs} +8 -8
  158. package/dist/{send-CZf5lLw_.cjs → send-ShzXYPRu.cjs} +8 -8
  159. package/dist/{server-CknFq6xG.cjs → server-CEzKrfKj.cjs} +6 -6
  160. package/dist/{server-BqwXRzFZ.mjs → server-DScgJXxa.mjs} +4 -4
  161. package/dist/{sessionLock-nBXdJxJm.mjs → sessionLock-B6K4SBZD.mjs} +3 -3
  162. package/dist/{sessionLock-DRZUcKHT.cjs → sessionLock-Dc0fadGG.cjs} +3 -3
  163. package/dist/{sessionOps-C58iDeD5.mjs → sessionOps-D0BPWPoh.mjs} +4 -4
  164. package/dist/{sessionOps-BrGiU9-s.cjs → sessionOps-Dx7wARjI.cjs} +4 -4
  165. package/dist/{sessionScanner-Bm57LEXe.mjs → sessionScanner-9Fpgaxtf.mjs} +3 -3
  166. package/dist/{sessionScanner-CaO8bLaG.cjs → sessionScanner-BJ35TVG6.cjs} +3 -3
  167. package/dist/{sessions-BXyBHo8n.mjs → sessions-CFtDlyZd.mjs} +10 -10
  168. package/dist/{sessions-uzqPCc37.cjs → sessions-TZGGAry1.cjs} +10 -10
  169. package/dist/{setupOfflineReconnection-DvvVX3TB.cjs → setupOfflineReconnection-B1GsVA8P.cjs} +2 -2
  170. package/dist/{setupOfflineReconnection-1Qlek3wl.mjs → setupOfflineReconnection-Biaus-0T.mjs} +2 -2
  171. package/dist/{spawn-DBkodJEO.cjs → spawn-BRTuypQ2.cjs} +14 -14
  172. package/dist/{spawn-vn93PhYL.mjs → spawn-CsoQ-Ecz.mjs} +14 -14
  173. package/dist/{spawnAgents-DLNMlhWJ.cjs → spawnAgents-CG211IW7.cjs} +1 -1
  174. package/dist/{spawnAgents-CgPMWexP.mjs → spawnAgents-Co-SLcx-.mjs} +1 -1
  175. package/dist/{spawnHappyCLI-BjFZc_7V.mjs → spawnHappyCLI-D1doCjkZ.mjs} +1 -1
  176. package/dist/{spawnHappyCLI-DnUZv0X2.cjs → spawnHappyCLI-D47kX6jg.cjs} +1 -1
  177. package/dist/{specialCommands-BRufxlqe.cjs → specialCommands-Ch-Gvy-i.cjs} +3 -3
  178. package/dist/{specialCommands-D3ND9bdg.mjs → specialCommands-xSmqT_Fu.mjs} +3 -3
  179. package/dist/{startFileWatcher-DXJ7yB5v.mjs → startFileWatcher-CCl2fFxT.mjs} +1 -1
  180. package/dist/{startFileWatcher-D9cYzZOq.cjs → startFileWatcher-gKQTstR6.cjs} +1 -1
  181. package/dist/{startupSessionCreate-kdr3m1uX.cjs → startupSessionCreate-BXqoUX30.cjs} +1 -1
  182. package/dist/{startupSessionCreate-uZ6BM0ty.mjs → startupSessionCreate-DlZc8yPl.mjs} +1 -1
  183. package/dist/{streamRelay-Dy6amlzx.cjs → streamRelay-B-J-4St1.cjs} +1 -1
  184. package/dist/{streamRelay-DnMCMMfV.mjs → streamRelay-DnJXsi36.mjs} +1 -1
  185. package/dist/{sync-BvVhDO40.mjs → sync-BbjMC3sR.mjs} +1 -1
  186. package/dist/{sync-Bn-idAoy.cjs → sync-BxMdnZzz.cjs} +1 -1
  187. package/dist/{systemPrompt-DlyEk35T.cjs → systemPrompt-C2KojRmK.cjs} +3 -3
  188. package/dist/{systemPrompt-CIZcJuJF.mjs → systemPrompt-CmSDAoIx.mjs} +3 -3
  189. package/dist/{teams-BLeRpDxv.cjs → teams-DESdalox.cjs} +13 -10
  190. package/dist/{teams-DLY3B5yi.mjs → teams-lRy1MS0Z.mjs} +13 -10
  191. package/dist/{time-D3ETL7Jb.mjs → time-Cfknl7xG.mjs} +1 -1
  192. package/dist/{time-Cjv0zxQO.cjs → time-DNLeIRgR.cjs} +1 -1
  193. package/dist/{titleGenerator-Uzbd4utr.mjs → titleGenerator-ClnMSzwC.mjs} +1 -1
  194. package/dist/{titleGenerator-Cgp5ihFb.cjs → titleGenerator-YNutaU88.cjs} +2 -2
  195. package/dist/{todo-pOMcEECE.cjs → todo-DS75Mboz.cjs} +6 -6
  196. package/dist/{todo-C9Ga-oEM.mjs → todo-DZbK5POc.mjs} +6 -6
  197. package/dist/{tools-Cho7iIWf.mjs → tools-BgdU0dWp.mjs} +3 -3
  198. package/dist/{tools-BL7Byl_x.cjs → tools-ClYcb1YQ.cjs} +3 -3
  199. package/dist/{uninstall-CbayEVoV.cjs → uninstall-Di1vPBLV.cjs} +3 -3
  200. package/dist/{uninstall-CvZHVY9C.mjs → uninstall-bXenFevR.mjs} +3 -3
  201. package/package.json +8 -8
  202. package/dist/selfCheck-Smt-5Xiq.mjs +0 -85
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { p as AgentVersionsSchema } from './index-C6Vn5Eac.mjs';
2
+ import { q as AgentVersionsSchema } from './index-BI0h2Zks.mjs';
3
3
  import axios from 'axios';
4
- import { l as logger } from './logger-BUngm5Xg.mjs';
5
- import { c as configuration } from './configuration-PxzEJumr.mjs';
4
+ import { l as logger } from './logger-DpqihN1f.mjs';
5
+ import { c as configuration } from './configuration-YXw_Dcsb.mjs';
6
6
  import { c as contentLogMetadata } from './contentLogMetadata-BlWI0egu.mjs';
7
7
 
8
8
  z.object({
@@ -12,8 +12,12 @@ z.object({
12
12
  teamRetryVersion: z.number().int().positive().optional(),
13
13
  /** B-586: daemon serves the `worktree-*` RPCs. Absent on old daemons. */
14
14
  worktreeVersion: z.number().int().positive().optional(),
15
+ /** B-755: this daemon serves `fs-mkdir` (web gates 「新建工作目录」 on it). */
16
+ fsMkdirVersion: z.number().int().positive().optional(),
15
17
  /** B-688: daemon serves the `model-config-*` RPCs (harness model/provider config). */
16
18
  modelConfigVersion: z.number().int().positive().optional(),
19
+ /** B-719: daemon serves `harness-install` (Install / Update buttons for coding-agent CLIs). */
20
+ harnessInstallVersion: z.number().int().positive().optional(),
17
21
  host: z.string(),
18
22
  platform: z.string(),
19
23
  happyCliVersion: z.string(),
@@ -78,7 +82,11 @@ const CliUpdateStateSchema = z.object({
78
82
  version: z.string().nullable(),
79
83
  detail: z.string().optional(),
80
84
  at: z.number()
81
- }).nullable().optional()
85
+ }).nullable().optional(),
86
+ /** B-718: the machine-level `cliAutoUpdate` setting (absent = not read yet / old daemon). */
87
+ autoUpdateEnabled: z.boolean().optional(),
88
+ /** B-718: the last install this machine completed, carried across its handover. */
89
+ lastInstall: z.object({ from: z.string(), to: z.string(), at: z.number(), source: z.string() }).nullable().optional()
82
90
  });
83
91
  const WebTerminalListItemSchema = z.object({
84
92
  id: z.string(),
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var z = require('zod');
4
- var index = require('./index-Dv0Q48P3.cjs');
4
+ var index = require('./index-oh8XEozJ.cjs');
5
5
  var axios = require('axios');
6
- var logger = require('./logger-CphW5nUE.cjs');
7
- var configuration = require('./configuration-CYO-kPOS.cjs');
6
+ var logger = require('./logger-DK1ytCz6.cjs');
7
+ var configuration = require('./configuration-B-CugKJ3.cjs');
8
8
  var contentLogMetadata = require('./contentLogMetadata-ZSFk_NjQ.cjs');
9
9
 
10
10
  z.z.object({
@@ -14,8 +14,12 @@ z.z.object({
14
14
  teamRetryVersion: z.z.number().int().positive().optional(),
15
15
  /** B-586: daemon serves the `worktree-*` RPCs. Absent on old daemons. */
16
16
  worktreeVersion: z.z.number().int().positive().optional(),
17
+ /** B-755: this daemon serves `fs-mkdir` (web gates 「新建工作目录」 on it). */
18
+ fsMkdirVersion: z.z.number().int().positive().optional(),
17
19
  /** B-688: daemon serves the `model-config-*` RPCs (harness model/provider config). */
18
20
  modelConfigVersion: z.z.number().int().positive().optional(),
21
+ /** B-719: daemon serves `harness-install` (Install / Update buttons for coding-agent CLIs). */
22
+ harnessInstallVersion: z.z.number().int().positive().optional(),
19
23
  host: z.z.string(),
20
24
  platform: z.z.string(),
21
25
  happyCliVersion: z.z.string(),
@@ -80,7 +84,11 @@ const CliUpdateStateSchema = z.z.object({
80
84
  version: z.z.string().nullable(),
81
85
  detail: z.z.string().optional(),
82
86
  at: z.z.number()
83
- }).nullable().optional()
87
+ }).nullable().optional(),
88
+ /** B-718: the machine-level `cliAutoUpdate` setting (absent = not read yet / old daemon). */
89
+ autoUpdateEnabled: z.z.boolean().optional(),
90
+ /** B-718: the last install this machine completed, carried across its handover. */
91
+ lastInstall: z.z.object({ from: z.z.string(), to: z.z.string(), at: z.z.number(), source: z.z.string() }).nullable().optional()
84
92
  });
85
93
  const WebTerminalListItemSchema = z.z.object({
86
94
  id: z.z.string(),
@@ -2,7 +2,7 @@
2
2
 
3
3
  var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
4
4
  var smallFastModel = require('./smallFastModel-D_uxGMo3.cjs');
5
- var logger = require('./logger-CphW5nUE.cjs');
5
+ var logger = require('./logger-DK1ytCz6.cjs');
6
6
  var processTreeSnapshot = require('./processTreeSnapshot-mDbnuojn.cjs');
7
7
 
8
8
  const HAPPY_DEFAULT_ENTRYPOINT = "remote_mobile";
@@ -1,6 +1,6 @@
1
1
  import { query as query$1 } from '@anthropic-ai/claude-agent-sdk';
2
2
  import { p as pinSmallFastModel, e as ensureLocalProxyBypass } from './smallFastModel-BLNgMrwR.mjs';
3
- import { l as logger } from './logger-BUngm5Xg.mjs';
3
+ import { l as logger } from './logger-DpqihN1f.mjs';
4
4
  import { s as snapshotTree, k as killSurvivors } from './processTreeSnapshot-CuLJDNC-.mjs';
5
5
 
6
6
  const HAPPY_DEFAULT_ENTRYPOINT = "remote_mobile";
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-BUngm5Xg.mjs';
1
+ import { l as logger } from './logger-DpqihN1f.mjs';
2
2
 
3
3
  const MAX_WINDOWS_PER_PROVIDER = 8;
4
4
  function finite(value) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-CphW5nUE.cjs');
3
+ var logger = require('./logger-DK1ytCz6.cjs');
4
4
 
5
5
  const MAX_WINDOWS_PER_PROVIDER = 8;
6
6
  function finite(value) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-CphW5nUE.cjs');
3
+ var logger = require('./logger-DK1ytCz6.cjs');
4
4
  var child_process = require('child_process');
5
5
  var util = require('util');
6
6
  var fs = require('fs/promises');
@@ -9,7 +9,7 @@ var require$$1 = require('path');
9
9
  var spawn = require('cross-spawn');
10
10
  var projectPath = require('./projectPath-C3ioB4Bu.cjs');
11
11
  var os = require('os');
12
- var configuration = require('./configuration-CYO-kPOS.cjs');
12
+ var configuration = require('./configuration-B-CugKJ3.cjs');
13
13
 
14
14
  function run$1(args, options) {
15
15
  const RUNNER_PATH = require$$1.resolve(require$$1.join(projectPath.projectPath(), "scripts", "ripgrep_launcher.cjs"));
@@ -1,4 +1,4 @@
1
- import { l as logger } from './logger-BUngm5Xg.mjs';
1
+ import { l as logger } from './logger-DpqihN1f.mjs';
2
2
  import { spawn as spawn$1, exec } from 'child_process';
3
3
  import { promisify } from 'util';
4
4
  import { mkdir, writeFile, appendFile, stat, rename, unlink, readdir, readFile } from 'fs/promises';
@@ -7,7 +7,7 @@ import { resolve, join, sep } from 'path';
7
7
  import { spawn } from 'cross-spawn';
8
8
  import { p as projectPath } from './projectPath-BTBIMB57.mjs';
9
9
  import { platform } from 'os';
10
- import { c as configuration } from './configuration-PxzEJumr.mjs';
10
+ import { c as configuration } from './configuration-YXw_Dcsb.mjs';
11
11
 
12
12
  function run$1(args, options) {
13
13
  const RUNNER_PATH = resolve(join(projectPath(), "scripts", "ripgrep_launcher.cjs"));
@@ -1,19 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var logger = require('./logger-CphW5nUE.cjs');
3
+ var logger = require('./logger-DK1ytCz6.cjs');
4
4
  require('axios');
5
5
  require('node:events');
6
6
  require('socket.io-client');
7
- require('./pushNotifications-DI92havG.cjs');
7
+ require('./pushNotifications-CyQVDThC.cjs');
8
8
  require('node:crypto');
9
9
  require('tweetnacl');
10
- require('./configuration-CYO-kPOS.cjs');
11
- require('./index-Dv0Q48P3.cjs');
12
- require('./registerCommonHandlers-C7a_dUWs.cjs');
10
+ require('./configuration-B-CugKJ3.cjs');
11
+ require('./index-oh8XEozJ.cjs');
12
+ require('./registerCommonHandlers-DbNoM39q.cjs');
13
13
  require('os');
14
14
  require('child_process');
15
15
  require('@paralleldrive/cuid2');
16
- require('./persistence-9BMYspxG.cjs');
16
+ require('./persistence-BdpwWXKh.cjs');
17
17
  require('chalk');
18
18
  require('./types-CRS-srZK.cjs');
19
19
 
@@ -1,17 +1,17 @@
1
- import { l as logger } from './logger-BUngm5Xg.mjs';
1
+ import { l as logger } from './logger-DpqihN1f.mjs';
2
2
  import 'axios';
3
3
  import 'node:events';
4
4
  import 'socket.io-client';
5
- import './pushNotifications-DCiBEVeC.mjs';
5
+ import './pushNotifications-CMmRsbKv.mjs';
6
6
  import 'node:crypto';
7
7
  import 'tweetnacl';
8
- import './configuration-PxzEJumr.mjs';
9
- import './index-C6Vn5Eac.mjs';
10
- import './registerCommonHandlers-CTkCvjxt.mjs';
8
+ import './configuration-YXw_Dcsb.mjs';
9
+ import './index-BI0h2Zks.mjs';
10
+ import './registerCommonHandlers-K8dICQO2.mjs';
11
11
  import 'os';
12
12
  import 'child_process';
13
13
  import '@paralleldrive/cuid2';
14
- import './persistence-BFUOHW5h.mjs';
14
+ import './persistence-jOEuAFTS.mjs';
15
15
  import 'chalk';
16
16
  import './types-CkqAACXx.mjs';
17
17
 
@@ -1,10 +1,10 @@
1
- import { h as resumeDaemonSession, l as listDaemonSessions } from './controlClient-DoeYovwP.mjs';
2
- import { d as archiveSession, u as unarchiveSession, h as sessionLiveness, e as sendUserMessage, i as readSessionState, o as openUserScopedSocket } from './sessionOps-C58iDeD5.mjs';
3
- import { d as delay } from './time-D3ETL7Jb.mjs';
1
+ import { h as resumeDaemonSession, l as listDaemonSessions } from './controlClient-BL4hb4l3.mjs';
2
+ import { d as archiveSession, u as unarchiveSession, h as sessionLiveness, e as sendUserMessage, i as readSessionState, o as openUserScopedSocket } from './sessionOps-D0BPWPoh.mjs';
3
+ import { d as delay } from './time-Cfknl7xG.mjs';
4
4
  import axios from 'axios';
5
5
  import { hostname } from 'node:os';
6
- import { c as configuration } from './configuration-PxzEJumr.mjs';
7
- import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-BFUOHW5h.mjs';
6
+ import { c as configuration } from './configuration-YXw_Dcsb.mjs';
7
+ import { r as readSettings, b as readCredentialsForConfiguredRelay } from './persistence-jOEuAFTS.mjs';
8
8
  import { randomUUID } from 'node:crypto';
9
9
 
10
10
  const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var controlClient = require('./controlClient-Bqv5v5OM.cjs');
4
- var sessionOps = require('./sessionOps-BrGiU9-s.cjs');
5
- var time = require('./time-Cjv0zxQO.cjs');
3
+ var controlClient = require('./controlClient-D0kGwKYx.cjs');
4
+ var sessionOps = require('./sessionOps-Dx7wARjI.cjs');
5
+ var time = require('./time-DNLeIRgR.cjs');
6
6
  var axios = require('axios');
7
7
  var os = require('node:os');
8
- var configuration = require('./configuration-CYO-kPOS.cjs');
9
- var persistence = require('./persistence-9BMYspxG.cjs');
8
+ var configuration = require('./configuration-B-CugKJ3.cjs');
9
+ var persistence = require('./persistence-BdpwWXKh.cjs');
10
10
  var node_crypto = require('node:crypto');
11
11
 
12
12
  const ACTIVE_FRESH_WINDOW_MS = 15 * 60 * 1e3;
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var z = require('zod');
4
- var index = require('./index-Dv0Q48P3.cjs');
5
- var client = require('./client-BWjaHKtj.cjs');
4
+ var index = require('./index-oh8XEozJ.cjs');
5
+ var client = require('./client-CDuW4MS9.cjs');
6
6
  var precheckCompat = require('./precheckCompat-CWOi5c9L.cjs');
7
- var client$1 = require('./client-DJplzPjD.cjs');
8
- var prompt = require('./prompt-lgF9IE82.cjs');
7
+ var client$1 = require('./client-DK8CzUry.cjs');
8
+ var prompt = require('./prompt-Bof2aQkI.cjs');
9
9
  var agentGuidance = require('./agentGuidance-BtBx2xxE.cjs');
10
10
 
11
11
  const AUTOMATION_TOOL_NAMES = [
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { k as AutomationNameSchema, c as AutomationPrecheckSchema, l as AutomationConcurrencySchema, m as AutomationActionSchema, o as AutomationTriggerSchema } from './index-C6Vn5Eac.mjs';
3
- import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-CnB7kRCT.mjs';
2
+ import { l as AutomationNameSchema, c as AutomationPrecheckSchema, m as AutomationConcurrencySchema, o as AutomationActionSchema, p as AutomationTriggerSchema } from './index-BI0h2Zks.mjs';
3
+ import { a as authenticatedAutomationsClient, b as automationRunIdFromEnv } from './client-Ctbw05Xj.mjs';
4
4
  import { u as updateAutomationChecked, c as createAutomationChecked } from './precheckCompat-DeEbilbr.mjs';
5
- import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-Ca5Pcgy_.mjs';
6
- import { f as formatContextForTool } from './prompt-BOouDaTM.mjs';
5
+ import { P as ProjectsUnsupportedError, a as ProjectRequestError, s as sharedProjectsClient } from './client-o-meK7-a.mjs';
6
+ import { f as formatContextForTool } from './prompt-QHuFx9j6.mjs';
7
7
  import { R as REPORT_PROGRESS_TOOL_NAME, d as REPORT_PROGRESS_TOOL_TITLE, e as REPORT_PROGRESS_TOOL_DESCRIPTION } from './agentGuidance-BDYt2Qy2.mjs';
8
8
 
9
9
  const AUTOMATION_TOOL_NAMES = [
@@ -11,7 +11,7 @@ Use the team_* tools in a managed Very Happy session. If absent, explain that th
11
11
 
12
12
  Start with team_inspect if already assigned. Otherwise team_create or team_join connects the current session. A scoped worker cannot create another root identity or use account-wide tools to bypass its scope.
13
13
 
14
- Work yourself when delegation would add needless overhead. Delegate independent work with a clear goal and acceptance criteria. When delegating within your assignment, pass its parentTaskId. Members may delegate further within their existing authority. After delegating child work, wait for those results instead of continuing parallel edits yourself. Waiting parents yield their execution slot to their children; the team limit counts progressing leaf assignments, not OS processes.
14
+ A team lead delegates by default (see the lead playbook). A member works itself when delegation would add needless overhead. Delegate independent work with a clear goal and acceptance criteria. When delegating within your assignment, pass its parentTaskId. Members may delegate further within their existing authority. After delegating child work, wait for those results instead of continuing parallel edits yourself. Waiting parents yield their execution slot to their children; the team limit counts progressing leaf assignments, not OS processes.
15
15
 
16
16
  Name exactly one integrator for each team. Workers edit only their assigned worktrees; they must not merge main, publish releases, change global daemon or npm installations, or allocate shared backlog IDs. The integrator serializes these operations. Across teams, the owner coordinates shared resources: a worktree is not a global lock.
17
17
 
@@ -25,6 +25,17 @@ A root member may create a persistent schedule for itself with the schedule tool
25
25
 
26
26
  On restart inspect authoritative state and messages before taking new actions. Do not invent completed work from a previous context. Scope credentials are runtime-owned; never read, print, or copy them into prompts.
27
27
  `;
28
+ const TEAM_LEAD_PLAYBOOK = `## Lead playbook
29
+ You coordinate; members do the work. Follow these defaults unless the user says otherwise.
30
+ 1. Delegate first. You split, assign, decide, review and report. Do not write code yourself; only tiny bookkeeping edits are yours. Every file you read or edit spends the context you need to coordinate.
31
+ 2. Run work in parallel. Delegate independent pieces to different members at the same time, within the team's parallel limit (team_inspect shows maxParallel). Accept or return submissions promptly to free slots. Give follow-up work to the member who already worked on that area (assigneeBotId); it keeps the context.
32
+ 3. Prevent conflicts. Before delegating, name the files or modules each task will touch. Give work on the same area to one member in sequence, or agree the boundary and who rebases onto whom before both start. Relay overlaps between members yourself. Merges are serialized and yours.
33
+ 4. Keep the team context. When the user gives a new instruction, or you make a decision, assign work, accept or return a result, or agree a conflict rule, record it at once with mcp__happy__project_note (kind decision, finding or handoff) in the team's project. After a context compaction or restart, read mcp__happy__project_context (full=true) and team_inspect before acting. If it answers "not in a project", ask the user to link this team to a project on the team page.
34
+ 5. Write complete task briefs. Each goal states the background with the user's own words, what to do, acceptance criteria, boundaries (no merging, releasing or touching production unless the user authorized it), and the evidence to hand back (tests, screenshots, CI).
35
+ 6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it.
36
+ 7. Communicate briefly. Set recipientBotId on every team_message; without it the message goes to the task's assignee. Report to the user conclusion first, with only what they must decide or know.
37
+ 8. Never create a team to recover. If a team tool says this session has no team or no team scope, do not call team_create or team_join: run team_inspect, or tell the user and wait.`;
38
+ const TEAM_MEMBER_RULES = `Before starting, read the team's project context with mcp__happy__project_context; it returns "not in a project" when the team has none. Do only what your task asks. If your work overlaps another member's or needs a wider scope, tell your lead with team_message (recipientBotId = the lead) before going further. Submit with evidence: commands and results, artifact paths, screenshots or CI links.`;
28
39
  const PI_TEAMS_EXTENSION = `// Managed by Very Happy Agent Teams.
29
40
  export default async function(pi) {
30
41
  const managed = !!process.env.HAPPY_MCP_URL;
@@ -45,7 +56,15 @@ export default async function(pi) {
45
56
  const usage = ctx.getContextUsage?.();
46
57
  const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
47
58
  if (!(contextWindow > 0)) return;
48
- const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow};
59
+ // B-727: model + same-id registry entries let the wrapper tell pi's 128k default from a configured window.
60
+ const model = typeof ctx.model?.id === 'string' ? ctx.model.id.slice(0, 200) : null;
61
+ const provider = typeof ctx.model?.provider === 'string' ? ctx.model.provider.slice(0, 200) : null;
62
+ let peers = [];
63
+ try {
64
+ const bare = model ? model.split('/').pop() : null;
65
+ peers = (ctx.modelRegistry?.getAll?.() || []).filter(m => m && m.provider !== provider && (m.id === model || m.id === bare) && m.contextWindow > 0).slice(0, 8).map(m => ({provider:String(m.provider).slice(0, 200), contextWindow:m.contextWindow}));
66
+ } catch {}
67
+ const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow, model, provider, event:name, peers};
49
68
  reporting = reporting.catch(() => {}).then(async () => {
50
69
  try { await fetch(contextEndpoint, {method:'POST', redirect:'error', headers:{'content-type':'application/json'}, body:JSON.stringify(snapshot), signal:AbortSignal.timeout(2000)}); } catch {}
51
70
  });
@@ -147,4 +166,6 @@ export default async function(pi) {
147
166
  `;
148
167
 
149
168
  exports.PI_TEAMS_EXTENSION = PI_TEAMS_EXTENSION;
169
+ exports.TEAM_LEAD_PLAYBOOK = TEAM_LEAD_PLAYBOOK;
170
+ exports.TEAM_MEMBER_RULES = TEAM_MEMBER_RULES;
150
171
  exports.TEAM_SKILL = TEAM_SKILL;
@@ -9,7 +9,7 @@ Use the team_* tools in a managed Very Happy session. If absent, explain that th
9
9
 
10
10
  Start with team_inspect if already assigned. Otherwise team_create or team_join connects the current session. A scoped worker cannot create another root identity or use account-wide tools to bypass its scope.
11
11
 
12
- Work yourself when delegation would add needless overhead. Delegate independent work with a clear goal and acceptance criteria. When delegating within your assignment, pass its parentTaskId. Members may delegate further within their existing authority. After delegating child work, wait for those results instead of continuing parallel edits yourself. Waiting parents yield their execution slot to their children; the team limit counts progressing leaf assignments, not OS processes.
12
+ A team lead delegates by default (see the lead playbook). A member works itself when delegation would add needless overhead. Delegate independent work with a clear goal and acceptance criteria. When delegating within your assignment, pass its parentTaskId. Members may delegate further within their existing authority. After delegating child work, wait for those results instead of continuing parallel edits yourself. Waiting parents yield their execution slot to their children; the team limit counts progressing leaf assignments, not OS processes.
13
13
 
14
14
  Name exactly one integrator for each team. Workers edit only their assigned worktrees; they must not merge main, publish releases, change global daemon or npm installations, or allocate shared backlog IDs. The integrator serializes these operations. Across teams, the owner coordinates shared resources: a worktree is not a global lock.
15
15
 
@@ -23,6 +23,17 @@ A root member may create a persistent schedule for itself with the schedule tool
23
23
 
24
24
  On restart inspect authoritative state and messages before taking new actions. Do not invent completed work from a previous context. Scope credentials are runtime-owned; never read, print, or copy them into prompts.
25
25
  `;
26
+ const TEAM_LEAD_PLAYBOOK = `## Lead playbook
27
+ You coordinate; members do the work. Follow these defaults unless the user says otherwise.
28
+ 1. Delegate first. You split, assign, decide, review and report. Do not write code yourself; only tiny bookkeeping edits are yours. Every file you read or edit spends the context you need to coordinate.
29
+ 2. Run work in parallel. Delegate independent pieces to different members at the same time, within the team's parallel limit (team_inspect shows maxParallel). Accept or return submissions promptly to free slots. Give follow-up work to the member who already worked on that area (assigneeBotId); it keeps the context.
30
+ 3. Prevent conflicts. Before delegating, name the files or modules each task will touch. Give work on the same area to one member in sequence, or agree the boundary and who rebases onto whom before both start. Relay overlaps between members yourself. Merges are serialized and yours.
31
+ 4. Keep the team context. When the user gives a new instruction, or you make a decision, assign work, accept or return a result, or agree a conflict rule, record it at once with mcp__happy__project_note (kind decision, finding or handoff) in the team's project. After a context compaction or restart, read mcp__happy__project_context (full=true) and team_inspect before acting. If it answers "not in a project", ask the user to link this team to a project on the team page.
32
+ 5. Write complete task briefs. Each goal states the background with the user's own words, what to do, acceptance criteria, boundaries (no merging, releasing or touching production unless the user authorized it), and the evidence to hand back (tests, screenshots, CI).
33
+ 6. Review before accepting. A submission is not completion: check its evidence before team_accept. With team_return, say exactly what is wrong and how to fix it. Have a different member re-review security-sensitive changes. An idle member is neither done nor stuck; run team_inspect before chasing it.
34
+ 7. Communicate briefly. Set recipientBotId on every team_message; without it the message goes to the task's assignee. Report to the user conclusion first, with only what they must decide or know.
35
+ 8. Never create a team to recover. If a team tool says this session has no team or no team scope, do not call team_create or team_join: run team_inspect, or tell the user and wait.`;
36
+ const TEAM_MEMBER_RULES = `Before starting, read the team's project context with mcp__happy__project_context; it returns "not in a project" when the team has none. Do only what your task asks. If your work overlaps another member's or needs a wider scope, tell your lead with team_message (recipientBotId = the lead) before going further. Submit with evidence: commands and results, artifact paths, screenshots or CI links.`;
26
37
  const PI_TEAMS_EXTENSION = `// Managed by Very Happy Agent Teams.
27
38
  export default async function(pi) {
28
39
  const managed = !!process.env.HAPPY_MCP_URL;
@@ -43,7 +54,15 @@ export default async function(pi) {
43
54
  const usage = ctx.getContextUsage?.();
44
55
  const contextWindow = usage?.contextWindow ?? ctx.model?.contextWindow;
45
56
  if (!(contextWindow > 0)) return;
46
- const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow};
57
+ // B-727: model + same-id registry entries let the wrapper tell pi's 128k default from a configured window.
58
+ const model = typeof ctx.model?.id === 'string' ? ctx.model.id.slice(0, 200) : null;
59
+ const provider = typeof ctx.model?.provider === 'string' ? ctx.model.provider.slice(0, 200) : null;
60
+ let peers = [];
61
+ try {
62
+ const bare = model ? model.split('/').pop() : null;
63
+ peers = (ctx.modelRegistry?.getAll?.() || []).filter(m => m && m.provider !== provider && (m.id === model || m.id === bare) && m.contextWindow > 0).slice(0, 8).map(m => ({provider:String(m.provider).slice(0, 200), contextWindow:m.contextWindow}));
64
+ } catch {}
65
+ const snapshot = {source:'pi', tokens:usage?.tokens ?? null, contextWindow, model, provider, event:name, peers};
47
66
  reporting = reporting.catch(() => {}).then(async () => {
48
67
  try { await fetch(contextEndpoint, {method:'POST', redirect:'error', headers:{'content-type':'application/json'}, body:JSON.stringify(snapshot), signal:AbortSignal.timeout(2000)}); } catch {}
49
68
  });
@@ -144,4 +163,4 @@ export default async function(pi) {
144
163
  }
145
164
  `;
146
165
 
147
- export { PI_TEAMS_EXTENSION as P, TEAM_SKILL as T };
166
+ export { PI_TEAMS_EXTENSION as P, TEAM_SKILL as T, TEAM_LEAD_PLAYBOOK as a, TEAM_MEMBER_RULES as b };