very-happy-cli 0.2.182 → 0.2.183

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 (200) hide show
  1. package/dist/{AcpBackend-DLk3gMYH.mjs → AcpBackend-9c-Jeaxd.mjs} +3 -3
  2. package/dist/{AcpBackend-JA5eu8Y0.cjs → AcpBackend-B-aMuEzO.cjs} +3 -3
  3. package/dist/{AcpSessionManager-DjYidq4C.cjs → AcpSessionManager-BxXe24AV.cjs} +10 -3
  4. package/dist/{AcpSessionManager-OrCww-Qv.mjs → AcpSessionManager-CS0FOSQk.mjs} +10 -3
  5. package/dist/{BasePermissionHandler-u-neo-iN.mjs → BasePermissionHandler-BJ1ID_Br.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-D3PMKLBS.cjs → BasePermissionHandler-BREjppjP.cjs} +1 -1
  7. package/dist/{acpSessionResume-u2TwX5Jd.mjs → acpSessionResume-BKtI9Jq_.mjs} +1 -1
  8. package/dist/{acpSessionResume-Dxo8222T.cjs → acpSessionResume-mVoJ75vI.cjs} +1 -1
  9. package/dist/{agentHome-D3hNrnoA.mjs → agentHome-B8Ctr_Nu.mjs} +4 -4
  10. package/dist/{agentHome-CP1tCBXz.cjs → agentHome-rzjm56o4.cjs} +4 -4
  11. package/dist/{api-C_YSQnsi.mjs → api-C29WLYkW.mjs} +79 -12
  12. package/dist/{api-CZWcG7uh.cjs → api-xZiqVynF.cjs} +81 -11
  13. package/dist/{apiMachine-DPGrED5C.cjs → apiMachine-B-FNBIYG.cjs} +14 -14
  14. package/dist/{apiMachine-C_GA5Bm-.mjs → apiMachine-Dz6Yfk0m.mjs} +14 -14
  15. package/dist/{attachmentContent-I_dJIevE.cjs → attachmentContent-COV4LF8k.cjs} +2 -2
  16. package/dist/{attachmentContent-Ckzyb1Uy.mjs → attachmentContent-DwY0uIg6.mjs} +2 -2
  17. package/dist/{auth-Lw_utSMV.cjs → auth-CYtk9_ga.cjs} +5 -5
  18. package/dist/{auth-BKnE7uv7.cjs → auth-D_qsnVr3.cjs} +8 -8
  19. package/dist/{auth-DOXMI-xp.mjs → auth-DvbSDalm.mjs} +8 -8
  20. package/dist/{auth-CGgpiJ5-.mjs → auth-xT70IYMx.mjs} +5 -5
  21. package/dist/{auto-CIgFHIyQ.cjs → auto-DT_PfpCx.cjs} +32 -25
  22. package/dist/{auto-Z56mMZnH.mjs → auto-IiPqvIsN.mjs} +32 -26
  23. package/dist/{bootstrap-DsXp74wv.cjs → bootstrap-C50NkfPx.cjs} +2 -2
  24. package/dist/{bootstrap-D3vlOROj.mjs → bootstrap-DS8Acdhm.mjs} +2 -2
  25. package/dist/{browser-CUxGoATV.mjs → browser-1j9gdZoD.mjs} +1 -1
  26. package/dist/{browser-CZlA9AkO.cjs → browser-CxKZLd2T.cjs} +1 -1
  27. package/dist/{claudeLocal-oELvwiZL.cjs → claudeLocal-CgNWpepB.cjs} +5 -5
  28. package/dist/{claudeLocal-FnTUgwCi.mjs → claudeLocal-U1Fa9sJo.mjs} +5 -5
  29. package/dist/{claudeLocalLauncher-CO5YHCzi.mjs → claudeLocalLauncher-BjCsfZUE.mjs} +10 -10
  30. package/dist/{claudeLocalLauncher-QsVXEVdE.cjs → claudeLocalLauncher-IyFm0D6a.cjs} +10 -10
  31. package/dist/{claudeSessionFork-Cspr6QW0.mjs → claudeSessionFork-6-1vKISn.mjs} +1 -1
  32. package/dist/{claudeSessionFork-BA4GE5AL.cjs → claudeSessionFork-BUO1XdSm.cjs} +1 -1
  33. package/dist/{client-xnWiHqdb.cjs → client--vZueZYF.cjs} +4 -4
  34. package/dist/{client-o-meK7-a.mjs → client-5_zDNdOh.mjs} +2 -2
  35. package/dist/{client-Ctbw05Xj.mjs → client-BgHvK7lo.mjs} +15 -7
  36. package/dist/{client-CDuW4MS9.cjs → client-DYGDBD0M.cjs} +15 -7
  37. package/dist/{client-DK8CzUry.cjs → client-DcKJ0ul_.cjs} +2 -2
  38. package/dist/{client-BGfmSbWc.mjs → client-DfDyE322.mjs} +4 -4
  39. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  40. package/dist/codex/happyMcpStdioBridge.mjs +16 -16
  41. package/dist/{codexAppServerClient-DhNDTU_i.cjs → codexAppServerClient-C3nrTfwY.cjs} +3 -3
  42. package/dist/{codexAppServerClient-BlsOZLul.mjs → codexAppServerClient-DvBg4hGc.mjs} +3 -3
  43. package/dist/{codexCommand-BGx5NMQR.mjs → codexCommand-Bqp2--g_.mjs} +94 -60
  44. package/dist/{codexCommand-DJDPfpIs.cjs → codexCommand-DSiU6MNt.cjs} +94 -60
  45. package/dist/{codexTermination-CqPMuokw.cjs → codexTermination-D9TRTglF.cjs} +1 -1
  46. package/dist/{codexTermination-CVhhwHZU.mjs → codexTermination-DsliWl_s.mjs} +1 -1
  47. package/dist/{config-CHpxzXBL.cjs → config-CRhWiOwi.cjs} +3 -3
  48. package/dist/{config-CWAe08-Q.mjs → config-DeaqRn3o.mjs} +3 -3
  49. package/dist/{configuration-B-CugKJ3.cjs → configuration-K3I6yOjZ.cjs} +1 -1
  50. package/dist/{configuration-YXw_Dcsb.mjs → configuration-elzht62L.mjs} +1 -1
  51. package/dist/{connect-BmHvMXH2.cjs → connect-B5UbfmO3.cjs} +13 -13
  52. package/dist/{connect-CPeJXHha.mjs → connect-CT5cOlnC.mjs} +13 -13
  53. package/dist/{context-Drzs_Z38.mjs → context-CLj1_RYF.mjs} +1 -1
  54. package/dist/{context-BtIVqHI5.cjs → context-DNKNF8Yh.cjs} +1 -1
  55. package/dist/{controlClient-D0kGwKYx.cjs → controlClient-ChqmxgbB.cjs} +3 -3
  56. package/dist/{controlClient-BL4hb4l3.mjs → controlClient-CuYQs2aZ.mjs} +3 -3
  57. package/dist/{createSessionMetadata-DvGDsnsn.mjs → createSessionMetadata-C1MbLQnh.mjs} +2 -2
  58. package/dist/{createSessionMetadata-L499emJn.cjs → createSessionMetadata-QfiRx4Tf.cjs} +2 -2
  59. package/dist/daemonSupervisor-57JYYzMf.cjs +268 -0
  60. package/dist/daemonSupervisor-DfzrtNhM.mjs +245 -0
  61. package/dist/{defaultPermissionMode-MXpZlXud.cjs → defaultPermissionMode-DQmdZZIg.cjs} +2 -2
  62. package/dist/{defaultPermissionMode-BLfxu-Yz.mjs → defaultPermissionMode-U9LuUeQh.mjs} +2 -2
  63. package/dist/{deterministicJson-CfLkBRvU.cjs → deterministicJson-BBRUcB8i.cjs} +569 -17
  64. package/dist/{deterministicJson-B_UAbmQ4.mjs → deterministicJson-BixlyPWV.mjs} +572 -21
  65. package/dist/{doctor-DMvlzmnE.cjs → doctor-CKgHUV4W.cjs} +7 -7
  66. package/dist/{doctor-bKScPtZu.mjs → doctor-Dban2oE2.mjs} +7 -7
  67. package/dist/{downloadTarget-D33BFvew.cjs → downloadTarget-CmC11Y7E.cjs} +6 -6
  68. package/dist/{downloadTarget-J9j37eFG.mjs → downloadTarget-VUTd9lEO.mjs} +6 -6
  69. package/dist/{ensureDaemonRunning-2IqWROJp.cjs → ensureDaemonRunning-L0fl0cLE.cjs} +5 -5
  70. package/dist/{ensureDaemonRunning-DLvwhpNg.mjs → ensureDaemonRunning-khb8Nr1n.mjs} +5 -5
  71. package/dist/{handleResumeCommand-CjtjQ_I7.mjs → handleResumeCommand-CLDGWpTJ.mjs} +5 -5
  72. package/dist/{handleResumeCommand-Dp2Y-p6V.cjs → handleResumeCommand-D9myBN2N.cjs} +5 -5
  73. package/dist/{index-BOT0Tg5E.mjs → index-BMZx-699.mjs} +4 -4
  74. package/dist/{index-CZC7egJA.cjs → index-BdJs0465.cjs} +3 -3
  75. package/dist/{index-BI0h2Zks.mjs → index-BptfFoXM.mjs} +268 -77
  76. package/dist/{index-DymOv3kK.cjs → index-COSjJPIv.cjs} +4 -4
  77. package/dist/{index-D_LvOWUN.mjs → index-CtwqBeH6.mjs} +3 -3
  78. package/dist/{index-DYVIbhAJ.cjs → index-DgA79dVw.cjs} +40 -40
  79. package/dist/{index-oh8XEozJ.cjs → index-Fq-jxjsB.cjs} +277 -76
  80. package/dist/{index-Cllzqoes.mjs → index-GkkbUZX-.mjs} +4 -4
  81. package/dist/{index-kA46KMxN.mjs → index-IRI8s8kz.mjs} +41 -41
  82. package/dist/{index-B_aNaW9w.cjs → index-y4JNyz9H.cjs} +4 -4
  83. package/dist/index.cjs +2 -2
  84. package/dist/index.mjs +2 -2
  85. package/dist/{install-D2NCbeJ-.cjs → install-BATFlr_l.cjs} +2 -2
  86. package/dist/{install-D0inLCv-.mjs → install-F3rP8tBU.mjs} +2 -2
  87. package/dist/{install-C46mkr9a.mjs → install-JvCk2PJV.mjs} +3 -3
  88. package/dist/{install-BAa_Xmof.cjs → install-cn98bTCs.cjs} +3 -3
  89. package/dist/lib.cjs +12 -12
  90. package/dist/lib.d.cts +1 -1
  91. package/dist/lib.d.mts +1 -1
  92. package/dist/lib.mjs +12 -12
  93. package/dist/{lidState-DcPvwniz.cjs → lidState-Bcs5kRHi.cjs} +1 -1
  94. package/dist/{lidState-D8Iuvjgl.mjs → lidState-DXeYTsrm.mjs} +1 -1
  95. package/dist/{localHappyAgentAuth-D3rQDRd9.mjs → localHappyAgentAuth-C1A4ChCR.mjs} +1 -1
  96. package/dist/{localHappyAgentAuth-SD6GM97y.cjs → localHappyAgentAuth-CypTSe42.cjs} +1 -1
  97. package/dist/{logger-DK1ytCz6.cjs → logger-Cgwz30rK.cjs} +2 -2
  98. package/dist/{logger-DpqihN1f.mjs → logger-RMPh5aqe.mjs} +2 -2
  99. package/dist/{machineMetadata-IJc6_iyx.cjs → machineMetadata-BSOGMNRi.cjs} +3 -3
  100. package/dist/{machineMetadata-D4E3qoIG.mjs → machineMetadata-BTUtPRth.mjs} +3 -3
  101. package/dist/{main-DUXh2rgW.cjs → main-4iiwYpCR.cjs} +61 -56
  102. package/dist/{main-CpUmw7hm.mjs → main-DNDL6t8z.mjs} +61 -56
  103. package/dist/{mcp-D5f3Vd-z.cjs → mcp-C7eEoGhz.cjs} +15 -15
  104. package/dist/{mcp-66g1TJ8P.mjs → mcp-DXYDPOpJ.mjs} +15 -15
  105. package/dist/{mirrorProtocol-bsCUcaCY.mjs → mirrorProtocol-DQRy5PaT.mjs} +3 -3
  106. package/dist/{mirrorProtocol-DkWOcZh9.cjs → mirrorProtocol-c5g5MgNc.cjs} +3 -3
  107. package/dist/{package-BfeqAzyJ.cjs → package-3aPiSpZj.cjs} +7 -7
  108. package/dist/{package-CKj8zndE.mjs → package-CTrz6U3C.mjs} +7 -7
  109. package/dist/{panels-r8LmaBs6.mjs → panels-B5sZ84vA.mjs} +5 -5
  110. package/dist/{panels-2PXsw9-d.cjs → panels-BmsmKHbw.cjs} +5 -5
  111. package/dist/{peerTools-D_id4d41.mjs → peerTools-DIPOX033.mjs} +5 -5
  112. package/dist/{peerTools-BVp1z0T_.cjs → peerTools-Dxe7iCi_.cjs} +5 -5
  113. package/dist/{persistence-BdpwWXKh.cjs → persistence-DZRMUZZS.cjs} +2 -2
  114. package/dist/{persistence-jOEuAFTS.mjs → persistence-zJo4r7YI.mjs} +2 -2
  115. package/dist/{piRunnerArgs-vxCHKnSA.cjs → piRunnerArgs-BSPiS6tZ.cjs} +1 -1
  116. package/dist/{piRunnerArgs-68I5F_M1.mjs → piRunnerArgs-IVdoHUB6.mjs} +1 -1
  117. package/dist/{piRuntime-C3Dg5uni.cjs → piRuntime-BJzjlMcN.cjs} +2 -2
  118. package/dist/{piRuntime-DgLIard1.mjs → piRuntime-BvHO3vgO.mjs} +2 -2
  119. package/dist/{piTerminal-C135BcLP.cjs → piTerminal-Cz4pW55d.cjs} +18 -18
  120. package/dist/{piTerminal-DJL0w-uA.mjs → piTerminal-D7vBOpkE.mjs} +18 -18
  121. package/dist/{pushNotifications-CMmRsbKv.mjs → pushNotifications-C4R9-1hU.mjs} +3 -3
  122. package/dist/{pushNotifications-CyQVDThC.cjs → pushNotifications-CgIrYml3.cjs} +3 -3
  123. package/dist/{query-CK--1fbL.cjs → query-CZQG1PdU.cjs} +1 -1
  124. package/dist/{query-CPXnDURZ.mjs → query-DKPmDsHS.mjs} +1 -1
  125. package/dist/{rateLimitWindows-DJxnNw-X.cjs → rateLimitWindows-CPV0nLeq.cjs} +1 -1
  126. package/dist/{rateLimitWindows-Cqa4AGaB.mjs → rateLimitWindows-HlHATOQ0.mjs} +1 -1
  127. package/dist/{registerCommonHandlers-DbNoM39q.cjs → registerCommonHandlers-D1pC83Op.cjs} +2 -2
  128. package/dist/{registerCommonHandlers-K8dICQO2.mjs → registerCommonHandlers-a9lHojSV.mjs} +2 -2
  129. package/dist/{registerKillSessionHandler-O1iriOMO.mjs → registerKillSessionHandler-Bp-fuH-w.mjs} +6 -6
  130. package/dist/{registerKillSessionHandler-DiS_go8d.cjs → registerKillSessionHandler-nTi2vVJy.cjs} +6 -6
  131. package/dist/{remoteSessionClient-BlURPulk.mjs → remoteSessionClient-Cwrddscy.mjs} +5 -5
  132. package/dist/{remoteSessionClient-CtV9mDko.cjs → remoteSessionClient-HQAKAvVd.cjs} +5 -5
  133. package/dist/{reportProgressTool-DlD_xjzU.cjs → reportProgressTool-Be-8ADI4.cjs} +4 -4
  134. package/dist/{reportProgressTool-nCExrHZH.mjs → reportProgressTool-CcZ32nrd.mjs} +4 -4
  135. package/dist/{resources-CH1iP6Cv.mjs → resources-CLdQfe3b.mjs} +1 -1
  136. package/dist/{resources-BPyN59Iv.cjs → resources-CqwHPhdK.cjs} +1 -1
  137. package/dist/{run-drtwHYkO.mjs → run-BBU8GyxE.mjs} +59 -243
  138. package/dist/{run-BBNrcCfI.cjs → run-CxRJk9qq.cjs} +69 -254
  139. package/dist/{runClaude-CFp27Tyi.mjs → runClaude-DR6pEQwd.mjs} +22 -22
  140. package/dist/{runClaude-B3KSeby4.cjs → runClaude-Dd5zJaUZ.cjs} +22 -22
  141. package/dist/{runClaudeDeps-DMcv93lA.mjs → runClaudeDeps-COgZaUZm.mjs} +50 -45
  142. package/dist/{runClaudeDeps-C_C9TCI0.cjs → runClaudeDeps-CTtZ_1mC.cjs} +45 -40
  143. package/dist/{runGemini-Bc6SY-hd.mjs → runGemini-DVoVUfPp.mjs} +37 -35
  144. package/dist/{runGemini-DzdSBAr9.cjs → runGemini-DX72qB92.cjs} +37 -35
  145. package/dist/{runOpenClaw-DI0qMlgF.mjs → runOpenClaw-BHjzmzeC.mjs} +18 -18
  146. package/dist/{runOpenClaw-DN6rEVqC.cjs → runOpenClaw-BSg4hFVt.cjs} +18 -18
  147. package/dist/{sandbox-v-ffe8LR.mjs → sandbox-CWR9EqoN.mjs} +4 -4
  148. package/dist/{sandbox-DtttPBMA.cjs → sandbox-D1T_hmgZ.cjs} +4 -4
  149. package/dist/{selfCheck-B-yy6bW3.cjs → selfCheck-CE7vlnNS.cjs} +36 -36
  150. package/dist/selfCheck-ZGgBtxFQ.mjs +85 -0
  151. package/dist/{send-DpBwSZuj.mjs → send-BDF0Zvxo.mjs} +8 -8
  152. package/dist/{send-ShzXYPRu.cjs → send-BxZqRCcG.cjs} +8 -8
  153. package/dist/{server-DScgJXxa.mjs → server-B4JtnDLF.mjs} +4 -4
  154. package/dist/{server-CEzKrfKj.cjs → server-DB7_70Mi.cjs} +6 -6
  155. package/dist/{sessionLock-Dc0fadGG.cjs → sessionLock-BXvFN6uw.cjs} +3 -3
  156. package/dist/{sessionLock-B6K4SBZD.mjs → sessionLock-CXOOX-VD.mjs} +3 -3
  157. package/dist/{sessionOps-Dx7wARjI.cjs → sessionOps-BWlDlFYP.cjs} +4 -4
  158. package/dist/{sessionOps-D0BPWPoh.mjs → sessionOps-ByVggB_q.mjs} +4 -4
  159. package/dist/{sessionScanner-BJ35TVG6.cjs → sessionScanner-DkxPB5VA.cjs} +3 -3
  160. package/dist/{sessionScanner-9Fpgaxtf.mjs → sessionScanner-r66RtF95.mjs} +3 -3
  161. package/dist/{sessions-TZGGAry1.cjs → sessions-BiJTxFy9.cjs} +10 -10
  162. package/dist/{sessions-CFtDlyZd.mjs → sessions-C1lLK_a9.mjs} +10 -10
  163. package/dist/{setupOfflineReconnection-Biaus-0T.mjs → setupOfflineReconnection-Bl3DuakT.mjs} +2 -2
  164. package/dist/{setupOfflineReconnection-B1GsVA8P.cjs → setupOfflineReconnection-CecTiFZ-.cjs} +2 -2
  165. package/dist/{spawn-CsoQ-Ecz.mjs → spawn-D-8MlEM6.mjs} +14 -14
  166. package/dist/{spawn-BRTuypQ2.cjs → spawn-D79mVa3h.cjs} +14 -14
  167. package/dist/{spawnAgents-Co-SLcx-.mjs → spawnAgents-DJHjq01u.mjs} +1 -1
  168. package/dist/{spawnAgents-CG211IW7.cjs → spawnAgents-Sfnf-4pN.cjs} +1 -1
  169. package/dist/{spawnHappyCLI-D47kX6jg.cjs → spawnHappyCLI-CQwQs9G5.cjs} +1 -1
  170. package/dist/{spawnHappyCLI-D1doCjkZ.mjs → spawnHappyCLI-v_bJwZ4Z.mjs} +1 -1
  171. package/dist/{specialCommands-Ch-Gvy-i.cjs → specialCommands-CWMVfT5s.cjs} +3 -3
  172. package/dist/{specialCommands-xSmqT_Fu.mjs → specialCommands-yMnFvS-W.mjs} +3 -3
  173. package/dist/{startFileWatcher-CCl2fFxT.mjs → startFileWatcher-BCDkT_tr.mjs} +1 -1
  174. package/dist/{startFileWatcher-gKQTstR6.cjs → startFileWatcher-GW4_E7dV.cjs} +1 -1
  175. package/dist/{startupSessionCreate-DlZc8yPl.mjs → startupSessionCreate-BcAGYo51.mjs} +1 -1
  176. package/dist/{startupSessionCreate-BXqoUX30.cjs → startupSessionCreate-tBRa_ze8.cjs} +1 -1
  177. package/dist/{streamRelay-DnJXsi36.mjs → streamRelay-BEDiy6_b.mjs} +1 -1
  178. package/dist/{streamRelay-B-J-4St1.cjs → streamRelay-BZ8drtof.cjs} +1 -1
  179. package/dist/{sync-BbjMC3sR.mjs → sync--QUIOuf8.mjs} +1 -1
  180. package/dist/{sync-BxMdnZzz.cjs → sync-BMDkyo75.cjs} +1 -1
  181. package/dist/{systemPrompt-C2KojRmK.cjs → systemPrompt-DoHSXrH0.cjs} +2 -2
  182. package/dist/{systemPrompt-CmSDAoIx.mjs → systemPrompt-O0Kd6vbA.mjs} +2 -2
  183. package/dist/{teams-DESdalox.cjs → teams-BkZop-sP.cjs} +9 -9
  184. package/dist/{teams-lRy1MS0Z.mjs → teams-CTF1gT48.mjs} +9 -9
  185. package/dist/{template-BaHAmH2K.cjs → template-CeC1dYe-.cjs} +32 -2
  186. package/dist/{template-CiOPa2rd.mjs → template-D1fm22em.mjs} +31 -3
  187. package/dist/{time-Cfknl7xG.mjs → time-B2KKdAym.mjs} +1 -1
  188. package/dist/{time-DNLeIRgR.cjs → time-CdCotzKU.cjs} +1 -1
  189. package/dist/{titleGenerator-ClnMSzwC.mjs → titleGenerator-BFDczskR.mjs} +1 -1
  190. package/dist/{titleGenerator-YNutaU88.cjs → titleGenerator-DZH1XqAf.cjs} +2 -2
  191. package/dist/{todo-DZbK5POc.mjs → todo-C2gyOUom.mjs} +6 -6
  192. package/dist/{todo-DS75Mboz.cjs → todo-DnTFTHmV.cjs} +6 -6
  193. package/dist/{tools-ClYcb1YQ.cjs → tools-C8rpwyIl.cjs} +1 -1
  194. package/dist/{tools-BgdU0dWp.mjs → tools-DUjkqSQL.mjs} +1 -1
  195. package/dist/{uninstall-bXenFevR.mjs → uninstall-B5Ew50mZ.mjs} +3 -3
  196. package/dist/{uninstall-Di1vPBLV.cjs → uninstall-CKMPWTMv.cjs} +3 -3
  197. package/package.json +7 -7
  198. package/dist/daemonSupervisor-B-SPSqhs.cjs +0 -13
  199. package/dist/daemonSupervisor-C6urv3_8.mjs +0 -10
  200. package/dist/selfCheck-BDfTwxqB.mjs +0 -85
@@ -427,7 +427,7 @@ z$1.object({
427
427
  events: z$1.array(ConnectionDiagnosticEventSchema).min(1).max(32)
428
428
  }).strict();
429
429
  const TeamPermissionModeSchema = z$1.enum(["default", "bypassPermissions"]);
430
- const id$2 = z$1.string().min(1).max(128);
430
+ const id$3 = z$1.string().min(1).max(128);
431
431
  const text$1 = z$1.string().min(1).max(32e3);
432
432
  const TeamAssistantSchema = z$1.enum(["claude", "codex", "pi-acp"]);
433
433
  const TeamModelSchema = z$1.string().trim().min(1).max(256);
@@ -438,40 +438,40 @@ const TeamActionSchema = z$1.discriminatedUnion("type", [
438
438
  z$1.object({ type: z$1.literal("start"), launch: TeamLaunchSchema }),
439
439
  z$1.object({ type: z$1.literal("set-defaults"), defaults: TeamDefaultsSchema }),
440
440
  z$1.object({ type: z$1.literal("set-permission-mode"), permissionMode: TeamPermissionModeSchema }),
441
- z$1.object({ type: z$1.literal("schedule-create"), name: id$2, botId: id$2, body: text$1, runAt: z$1.number().int().positive().max(864e13), intervalMs: z$1.number().int().min(6e4).max(366 * 864e5).optional() }),
442
- z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$2, version: z$1.number().int().positive() }),
443
- z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$2, version: z$1.number().int().positive() }),
444
- z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$2, version: z$1.number().int().positive() }),
445
- z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$2, claimId: id$2, note: z$1.string().trim().min(1).max(4e3) }),
441
+ z$1.object({ type: z$1.literal("schedule-create"), name: id$3, botId: id$3, body: text$1, runAt: z$1.number().int().positive().max(864e13), intervalMs: z$1.number().int().min(6e4).max(366 * 864e5).optional() }),
442
+ z$1.object({ type: z$1.literal("schedule-pause"), scheduleId: id$3, version: z$1.number().int().positive() }),
443
+ z$1.object({ type: z$1.literal("schedule-resume"), scheduleId: id$3, version: z$1.number().int().positive() }),
444
+ z$1.object({ type: z$1.literal("schedule-cancel"), scheduleId: id$3, version: z$1.number().int().positive() }),
445
+ z$1.object({ type: z$1.literal("reconcile-operation"), operationId: id$3, claimId: id$3, note: z$1.string().trim().min(1).max(4e3) }),
446
446
  // B-689: owner asks the execution computer to run a failed/uncertain operation again.
447
- z$1.object({ type: z$1.literal("retry-operation"), operationId: id$2, claimId: id$2 }),
447
+ z$1.object({ type: z$1.literal("retry-operation"), operationId: id$3, claimId: id$3 }),
448
448
  /** B-730: `transfer` = the owner confirmed moving a session that is bound in another live team (Web adopt); without it the server answers `session_in_other_team`. An old server strips it. */
449
- z$1.object({ type: z$1.literal("join"), name: id$2, sessionId: id$2, botId: id$2.optional(), transfer: z$1.literal(true).optional() }),
450
- z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$2.optional(), assigneeBotId: id$2.optional(), botName: id$2.optional(), directory: z$1.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional() }),
451
- z$1.object({ type: z$1.literal("message"), taskId: id$2, body: text$1, recipientBotId: id$2.optional() }),
452
- z$1.object({ type: z$1.literal("submit"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), result: text$1 }),
453
- z$1.object({ type: z$1.literal("accept"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive() }),
454
- z$1.object({ type: z$1.literal("return"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
455
- z$1.object({ type: z$1.literal("cancel"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), reason: text$1 }),
456
- z$1.object({ type: z$1.literal("handoff"), taskId: id$2, attemptId: id$2, goalVersion: z$1.number().int().positive(), assigneeBotId: id$2 }),
457
- z$1.object({ type: z$1.literal("claim-operation"), operationId: id$2, machineId: id$2, teamLaunchVersion: z$1.literal(1).optional() }),
458
- z$1.object({ type: z$1.literal("complete-operation"), operationId: id$2, machineId: id$2, claimId: id$2, sessionId: id$2.optional(), workingDirectory: z$1.string().min(1).max(4096).optional() }),
459
- z$1.object({ type: z$1.literal("fail-operation"), operationId: id$2, machineId: id$2, claimId: id$2, error: text$1, unknown: z$1.boolean().optional() }),
460
- z$1.object({ type: z$1.literal("session-event"), sessionId: id$2, event: z$1.enum(["idle", "blocked", "exited"]) }),
461
- z$1.object({ type: z$1.literal("message-delivered"), messageId: id$2, recipientBotId: id$2, generation: z$1.number().int().positive(), sessionId: id$2 })
449
+ z$1.object({ type: z$1.literal("join"), name: id$3, sessionId: id$3, botId: id$3.optional(), transfer: z$1.literal(true).optional() }),
450
+ z$1.object({ type: z$1.literal("delegate"), goal: text$1, acceptance: z$1.array(text$1).min(1).max(32), parentTaskId: id$3.optional(), assigneeBotId: id$3.optional(), botName: id$3.optional(), directory: z$1.string().min(1).max(4096).optional(), assistant: TeamAssistantSchema.optional(), model: TeamModelSchema.optional() }),
451
+ z$1.object({ type: z$1.literal("message"), taskId: id$3, body: text$1, recipientBotId: id$3.optional() }),
452
+ z$1.object({ type: z$1.literal("submit"), taskId: id$3, attemptId: id$3, goalVersion: z$1.number().int().positive(), result: text$1 }),
453
+ z$1.object({ type: z$1.literal("accept"), taskId: id$3, attemptId: id$3, goalVersion: z$1.number().int().positive() }),
454
+ z$1.object({ type: z$1.literal("return"), taskId: id$3, attemptId: id$3, goalVersion: z$1.number().int().positive(), reason: text$1 }),
455
+ z$1.object({ type: z$1.literal("cancel"), taskId: id$3, attemptId: id$3, goalVersion: z$1.number().int().positive(), reason: text$1 }),
456
+ z$1.object({ type: z$1.literal("handoff"), taskId: id$3, attemptId: id$3, goalVersion: z$1.number().int().positive(), assigneeBotId: id$3 }),
457
+ z$1.object({ type: z$1.literal("claim-operation"), operationId: id$3, machineId: id$3, teamLaunchVersion: z$1.literal(1).optional() }),
458
+ z$1.object({ type: z$1.literal("complete-operation"), operationId: id$3, machineId: id$3, claimId: id$3, sessionId: id$3.optional(), workingDirectory: z$1.string().min(1).max(4096).optional() }),
459
+ z$1.object({ type: z$1.literal("fail-operation"), operationId: id$3, machineId: id$3, claimId: id$3, error: text$1, unknown: z$1.boolean().optional() }),
460
+ z$1.object({ type: z$1.literal("session-event"), sessionId: id$3, event: z$1.enum(["idle", "blocked", "exited"]) }),
461
+ z$1.object({ type: z$1.literal("message-delivered"), messageId: id$3, recipientBotId: id$3, generation: z$1.number().int().positive(), sessionId: id$3 })
462
462
  ]);
463
- z$1.object({ requestId: id$2, action: TeamActionSchema });
463
+ z$1.object({ requestId: id$3, action: TeamActionSchema });
464
464
  const TeamProjectChoiceSchema = z$1.object({
465
- projectId: id$2.optional(),
466
- inheritFromSessionId: id$2.optional(),
465
+ projectId: id$3.optional(),
466
+ inheritFromSessionId: id$3.optional(),
467
467
  create: z$1.boolean().optional(),
468
468
  directory: z$1.string().min(1).max(4096).optional()
469
469
  });
470
- z$1.object({ name: id$2, machineId: id$2, requestId: id$2.optional(), launch: TeamLaunchSchema.optional(), project: TeamProjectChoiceSchema.optional(), sessionId: id$2.optional(), transfer: z$1.literal(true).optional() });
470
+ z$1.object({ name: id$3, machineId: id$3, requestId: id$3.optional(), launch: TeamLaunchSchema.optional(), project: TeamProjectChoiceSchema.optional(), sessionId: id$3.optional(), transfer: z$1.literal(true).optional() });
471
471
  z$1.object({
472
- projectId: id$2.nullable().optional(),
472
+ projectId: id$3.nullable().optional(),
473
473
  create: z$1.boolean().optional(),
474
- requestId: id$2.optional()
474
+ requestId: id$3.optional()
475
475
  }).refine((v) => v.projectId !== void 0 !== (v.create === true), "exactly one of projectId / create");
476
476
  const TEAM_WORKTREE = /\/teams\/worktrees\/([^/]+)(?:\/|$)/;
477
477
  function teamWorktreeId(path) {
@@ -488,7 +488,7 @@ function rebaseTeamWorktreePath(path, repository) {
488
488
  const rest = normalized.slice(match.index + match[0].length).replace(/\/+$/, "");
489
489
  return rest ? `${repository.replace(/\/+$/, "")}/${rest}` : repository;
490
490
  }
491
- const id$1 = z$1.string().min(1).max(128);
491
+ const id$2 = z$1.string().min(1).max(128);
492
492
  const text = z$1.string().min(1).max(32e3);
493
493
  const AUTOMATION_NAME_PATTERN = /^[a-z0-9][a-z0-9-_.]{0,63}$/;
494
494
  const AutomationNameSchema = z$1.string().regex(AUTOMATION_NAME_PATTERN, "automation name must match [a-z0-9][a-z0-9-_.]{0,63}");
@@ -497,6 +497,7 @@ const AUTOMATION_MAX_INTERVAL_MS = 366 * 864e5;
497
497
  const AUTOMATION_MAX_TIMESTAMP = 864e13;
498
498
  const AUTOMATION_PAYLOAD_MAX_BYTES = 65536;
499
499
  const AUTOMATION_SUMMARY_MAX_CHARS = 4096;
500
+ const AUTOMATION_ATTENTION_REASON_MAX_CHARS = 512;
500
501
  const AUTOMATION_DEFAULT_LEASE_MS = 6e4;
501
502
  const AUTOMATION_CLAIM_MAX_RUNS = 8;
502
503
  const AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS = 6e4;
@@ -527,7 +528,7 @@ const AutomationActionSchema = z$1.discriminatedUnion("kind", [
527
528
  worktree: z$1.boolean().optional(),
528
529
  sticky: AutomationStickySchema.optional()
529
530
  }),
530
- z$1.object({ kind: z$1.literal("send"), sessionId: id$1, prompt: text }),
531
+ z$1.object({ kind: z$1.literal("send"), sessionId: id$2, prompt: text }),
531
532
  z$1.object({
532
533
  kind: z$1.literal("script"),
533
534
  command: z$1.array(z$1.string().min(1).max(4096)).min(1).max(256),
@@ -553,7 +554,7 @@ const maxRuntimeMs = z$1.number().int().min(6e4).max(7 * 864e5);
553
554
  z$1.object({
554
555
  name: AutomationNameSchema,
555
556
  description: z$1.string().max(4e3).nullable().optional(),
556
- machineId: id$1,
557
+ machineId: id$2,
557
558
  trigger: AutomationTriggerSchema,
558
559
  action: AutomationActionSchema,
559
560
  concurrency: AutomationConcurrencySchema.optional(),
@@ -562,13 +563,13 @@ z$1.object({
562
563
  /** B-548. Older servers strip it silently — clients must check the response echoes `precheck`. */
563
564
  precheck: AutomationPrecheckSchema.nullable().optional(),
564
565
  /** B-644: sessions this automation spawns join this project (quiet variant). Older servers strip it — check the echo. */
565
- projectId: id$1.nullable().optional()
566
+ projectId: id$2.nullable().optional()
566
567
  });
567
568
  z$1.object({
568
569
  version: z$1.number().int().positive(),
569
570
  name: AutomationNameSchema.optional(),
570
571
  description: z$1.string().max(4e3).nullable().optional(),
571
- machineId: id$1.optional(),
572
+ machineId: id$2.optional(),
572
573
  trigger: AutomationTriggerSchema.optional(),
573
574
  action: AutomationActionSchema.optional(),
574
575
  concurrency: AutomationConcurrencySchema.optional(),
@@ -576,41 +577,41 @@ z$1.object({
576
577
  /** B-548: omitted keeps the current precheck, `null` removes it. Changing `action` alone keeps it too. */
577
578
  precheck: AutomationPrecheckSchema.nullable().optional(),
578
579
  /** B-644: omitted keeps the current project, `null` detaches. */
579
- projectId: id$1.nullable().optional()
580
+ projectId: id$2.nullable().optional()
580
581
  });
581
582
  const payload = z$1.string().max(AUTOMATION_PAYLOAD_MAX_BYTES).refine((v) => new TextEncoder().encode(v).length <= AUTOMATION_PAYLOAD_MAX_BYTES, "payload exceeds 64KB");
582
583
  z$1.object({ payload: payload.optional(), dedupeKey: z$1.string().min(1).max(256).optional() });
583
584
  z$1.object({ payload: payload.optional() });
584
585
  z$1.object({
585
- machineId: id$1,
586
+ machineId: id$2,
586
587
  limit: z$1.number().int().min(1).max(AUTOMATION_CLAIM_MAX_RUNS).optional(),
587
588
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional(),
588
589
  /** B-548: what this daemon can execute (e.g. `precheck`). Older daemons send nothing; older servers strip it. */
589
590
  capabilities: z$1.array(z$1.string().min(1).max(64)).max(32).optional()
590
591
  });
591
592
  z$1.object({
592
- claimId: id$1.optional(),
593
+ claimId: id$2.optional(),
593
594
  status: z$1.enum(["running", "done", "failed", "skipped"]).optional(),
594
- sessionId: id$1.nullable().optional(),
595
+ sessionId: id$2.nullable().optional(),
595
596
  stickyKey: z$1.string().min(1).max(512).optional(),
596
597
  summary: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
597
598
  error: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
598
599
  exitCode: z$1.number().int().nullable().optional(),
599
600
  needsAttention: z$1.boolean().optional(),
600
- attentionReason: z$1.string().max(512).nullable().optional(),
601
+ attentionReason: z$1.string().max(AUTOMATION_ATTENTION_REASON_MAX_CHARS).nullable().optional(),
601
602
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional()
602
603
  });
603
604
  z$1.object({ by: z$1.string().min(1).max(64).optional() });
604
- z$1.object({ key: z$1.string().min(1).max(512), sessionId: id$1 });
605
+ z$1.object({ key: z$1.string().min(1).max(512), sessionId: id$2 });
605
606
  z$1.object({ key: z$1.string().min(1).max(512) });
606
607
  z$1.object({
607
- automationId: id$1.optional(),
608
+ automationId: id$2.optional(),
608
609
  name: AutomationNameSchema.optional(),
609
610
  status: z$1.string().min(1).max(64).optional(),
610
611
  attention: z$1.enum(["1", "true", "0", "false"]).optional(),
611
612
  limit: z$1.coerce.number().int().min(1).max(200).optional()
612
613
  });
613
- z$1.object({ machineId: id$1.optional() });
614
+ z$1.object({ machineId: id$2.optional() });
614
615
  const PROJECT_SESSION_CAPABILITY = "project-v1";
615
616
  const PROJECT_LIMITS = {
616
617
  nameChars: 120,
@@ -622,11 +623,11 @@ const PROJECT_LIMITS = {
622
623
  messageBytes: 64 * 1024,
623
624
  presenceBatch: 200,
624
625
  memberBatch: 200};
625
- const id = z$1.string().min(1).max(128);
626
+ const id$1 = z$1.string().min(1).max(128);
626
627
  const utf8Bytes = (value) => new TextEncoder().encode(value).length;
627
628
  const boundedText = (maxBytes) => z$1.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
628
629
  const ProjectFolderSchema = z$1.object({
629
- machineId: id,
630
+ machineId: id$1,
630
631
  path: z$1.string().min(1).max(4096),
631
632
  primary: z$1.boolean().optional()
632
633
  });
@@ -646,9 +647,9 @@ z$1.object({
646
647
  folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
647
648
  defaults: ProjectDefaultsSchema.optional(),
648
649
  /** Idempotency: the same requestId returns the project it created. */
649
- requestId: id.optional(),
650
+ requestId: id$1.optional(),
650
651
  /** Optional initial members (e.g. "设为项目" moves a folder's sessions in one step). */
651
- sessionIds: z$1.array(id).max(PROJECT_LIMITS.memberBatch).optional()
652
+ sessionIds: z$1.array(id$1).max(PROJECT_LIMITS.memberBatch).optional()
652
653
  });
653
654
  z$1.object({
654
655
  name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars).optional(),
@@ -664,7 +665,7 @@ z$1.object({
664
665
  summary: z$1.string().max(200).optional()
665
666
  });
666
667
  z$1.object({
667
- sessionIds: z$1.array(id).min(1).max(PROJECT_LIMITS.memberBatch),
668
+ sessionIds: z$1.array(id$1).min(1).max(PROJECT_LIMITS.memberBatch),
668
669
  via: ProjectMemberViaInputSchema.optional()
669
670
  });
670
671
  z$1.object({
@@ -674,15 +675,15 @@ z$1.object({
674
675
  /** Entry id (or `#seq`) this entry replaces. */
675
676
  supersedes: z$1.string().min(1).max(128).optional(),
676
677
  /** Stamped by the wrapper (the agent cannot fill it). Absent = written by the user. */
677
- authorSessionId: id.optional()
678
+ authorSessionId: id$1.optional()
678
679
  });
679
680
  z$1.object({
680
681
  /** When set, only entries this session authored may be revoked. Absent = the owner. */
681
- bySessionId: id.optional()
682
+ bySessionId: id$1.optional()
682
683
  });
683
- z$1.object({ teamId: id });
684
+ z$1.object({ teamId: id$1 });
684
685
  const ProjectPresenceEntrySchema = z$1.object({
685
- sessionId: id,
686
+ sessionId: id$1,
686
687
  title: z$1.string().max(200).nullable().optional(),
687
688
  agent: z$1.string().max(64).nullable().optional(),
688
689
  machine: z$1.string().max(200).nullable().optional(),
@@ -694,19 +695,19 @@ const ProjectPresenceEntrySchema = z$1.object({
694
695
  capabilities: z$1.array(z$1.string().max(64)).max(32).optional()
695
696
  });
696
697
  z$1.object({
697
- machineId: id,
698
+ machineId: id$1,
698
699
  sessions: z$1.array(ProjectPresenceEntrySchema).max(PROJECT_LIMITS.presenceBatch),
699
700
  /** Sessions of this machine that stopped; their presence rows are marked `offline`. */
700
- gone: z$1.array(id).max(PROJECT_LIMITS.presenceBatch).optional()
701
+ gone: z$1.array(id$1).max(PROJECT_LIMITS.presenceBatch).optional()
701
702
  });
702
703
  z$1.object({
703
- fromSessionId: id,
704
- toSessionId: id,
704
+ fromSessionId: id$1,
705
+ toSessionId: id$1,
705
706
  body: boundedText(PROJECT_LIMITS.messageBytes).pipe(z$1.string().min(1))
706
707
  });
707
708
  z$1.object({
708
- sessionId: id,
709
- messageIds: z$1.array(id).min(1).max(100)
709
+ sessionId: id$1,
710
+ messageIds: z$1.array(id$1).min(1).max(100)
710
711
  });
711
712
  z$1.object({
712
713
  full: z$1.enum(["0", "1", "true", "false"]).optional(),
@@ -745,9 +746,9 @@ function object(value) {
745
746
  function stamp(value) {
746
747
  return typeof value === "number" && Number.isFinite(value) && value >= 0;
747
748
  }
748
- function parseBuiltinTodo(raw, key) {
749
+ function parseBuiltinTodo(raw, key2) {
749
750
  if (!object(raw) || raw.schemaVersion !== 1 || typeof raw.id !== "string" || !UUID.test(raw.id)) return null;
750
- if (key !== void 0 && key !== BUILTIN_TODO_PREFIX + raw.id) return null;
751
+ if (key2 !== void 0 && key2 !== BUILTIN_TODO_PREFIX + raw.id) return null;
751
752
  if (typeof raw.title !== "string" || !raw.title.trim() || raw.title.length > TITLE_MAX_LENGTH) return null;
752
753
  if (typeof raw.note !== "string" || raw.note.length > NOTE_MAX_LENGTH) return null;
753
754
  if (raw.status !== "open" && raw.status !== "done") return null;
@@ -772,11 +773,11 @@ function encodeBuiltinTodo(todo) {
772
773
  for (const byte of bytes) binary += String.fromCharCode(byte);
773
774
  return btoa(binary);
774
775
  }
775
- function decodeBuiltinTodo(value, key) {
776
+ function decodeBuiltinTodo(value, key2) {
776
777
  try {
777
778
  const binary = atob(value);
778
779
  const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
779
- return parseBuiltinTodo(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)), key);
780
+ return parseBuiltinTodo(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)), key2);
780
781
  } catch {
781
782
  return null;
782
783
  }
@@ -784,12 +785,12 @@ function decodeBuiltinTodo(value, key) {
784
785
  function sortBuiltinTodos(records) {
785
786
  return [...records].sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
786
787
  }
787
- function createBuiltinTodoClient(credentials, options) {
788
- const serverUrl = options.serverUrl.replace(/\/$/, "");
788
+ function createBuiltinTodoClient(credentials, options2) {
789
+ const serverUrl = options2.serverUrl.replace(/\/$/, "");
789
790
  const token = credentials.token;
790
- const clientId = options.clientId;
791
- const fetcher = options.fetch ?? globalThis.fetch.bind(globalThis);
792
- const timeoutMs = options.timeoutMs ?? 15e3;
791
+ const clientId = options2.clientId;
792
+ const fetcher = options2.fetch ?? globalThis.fetch.bind(globalThis);
793
+ const timeoutMs = options2.timeoutMs ?? 15e3;
793
794
  async function request(path, mutations, allowNotFound = false) {
794
795
  const controller = new AbortController();
795
796
  const timer = setTimeout(() => controller.abort(), timeoutMs);
@@ -868,19 +869,19 @@ function createBuiltinTodoClient(credentials, options) {
868
869
  const pendingCreates = /* @__PURE__ */ new Map();
869
870
  async function get(id2) {
870
871
  if (!UUID.test(id2)) throw new BuiltinTodoError("validation", "Invalid Todo ID");
871
- const key = BUILTIN_TODO_PREFIX + id2;
872
- const raw = await request(`/v1/kv/${encodeURIComponent(key)}`, void 0, true);
872
+ const key2 = BUILTIN_TODO_PREFIX + id2;
873
+ const raw = await request(`/v1/kv/${encodeURIComponent(key2)}`, void 0, true);
873
874
  if (raw === void 0) return null;
874
- const todo = object(raw) && typeof raw.value === "string" ? decodeBuiltinTodo(raw.value, key) : null;
875
- if (!todo || !object(raw) || raw.key !== key || !Number.isSafeInteger(raw.version) || raw.version < 0) {
875
+ const todo = object(raw) && typeof raw.value === "string" ? decodeBuiltinTodo(raw.value, key2) : null;
876
+ if (!todo || !object(raw) || raw.key !== key2 || !Number.isSafeInteger(raw.version) || raw.version < 0) {
876
877
  throw new BuiltinTodoError("invalid-response", "Invalid Todo read response");
877
878
  }
878
879
  return { ...todo, version: raw.version };
879
880
  }
880
- async function create(title, note = "", id2) {
881
- const cleanTitle = title.trim();
881
+ async function create(title2, note2 = "", id2) {
882
+ const cleanTitle = title2.trim();
882
883
  if (id2 !== void 0 && !UUID.test(id2)) throw new BuiltinTodoError("validation", "Invalid Todo ID");
883
- const payloadKey = JSON.stringify([cleanTitle, note, id2]);
884
+ const payloadKey = JSON.stringify([cleanTitle, note2, id2]);
884
885
  let pending = pendingCreates.get(payloadKey);
885
886
  if (pending?.operation) return pending.operation;
886
887
  if (!pending) {
@@ -889,7 +890,7 @@ function createBuiltinTodoClient(credentials, options) {
889
890
  schemaVersion: 1,
890
891
  id: id2 ?? crypto.randomUUID(),
891
892
  title: cleanTitle,
892
- note,
893
+ note: note2,
893
894
  status: "open",
894
895
  order: 0,
895
896
  createdAt: now,
@@ -902,14 +903,14 @@ function createBuiltinTodoClient(credentials, options) {
902
903
  const entry = pending;
903
904
  const operation = (async () => {
904
905
  if (entry.attempted) {
905
- const key = BUILTIN_TODO_PREFIX + entry.draft.id;
906
- const existing = await request(`/v1/kv/${encodeURIComponent(key)}`, void 0, true);
906
+ const key2 = BUILTIN_TODO_PREFIX + entry.draft.id;
907
+ const existing = await request(`/v1/kv/${encodeURIComponent(key2)}`, void 0, true);
907
908
  if (existing !== void 0) {
908
- const todo = object(existing) && typeof existing.value === "string" ? decodeBuiltinTodo(existing.value, key) : null;
909
- if (!todo || !object(existing) || existing.key !== key || !Number.isSafeInteger(existing.version) || existing.version < 0) {
909
+ const todo = object(existing) && typeof existing.value === "string" ? decodeBuiltinTodo(existing.value, key2) : null;
910
+ if (!todo || !object(existing) || existing.key !== key2 || !Number.isSafeInteger(existing.version) || existing.version < 0) {
910
911
  throw new BuiltinTodoError("invalid-response", "Cannot confirm the previous Todo creation");
911
912
  }
912
- if (id2 && (todo.title !== cleanTitle || todo.note !== note)) throw new BuiltinTodoError("conflict", "This Todo ID already has different content; read it before deciding");
913
+ if (id2 && (todo.title !== cleanTitle || todo.note !== note2)) throw new BuiltinTodoError("conflict", "This Todo ID already has different content; read it before deciding");
913
914
  return { ...todo, version: existing.version };
914
915
  }
915
916
  }
@@ -1152,5 +1153,195 @@ const ServerMigrateNoticeSchema = z$1.object({
1152
1153
  handoff: z$1.string().regex(/^vh1\.[A-Za-z0-9_-]{16,2048}\.[A-Za-z0-9_-]{43}$/),
1153
1154
  issuedAt: z$1.number().int().positive()
1154
1155
  });
1156
+ const ATTENTION_SESSION_CAPABILITY = "owner-board-v1";
1157
+ const ATTENTION_DISABLED_ERROR = "owner_board_disabled";
1158
+ const ATTENTION_LIMITS = {
1159
+ titleChars: 120,
1160
+ bodyBytes: 8 * 1024,
1161
+ keyChars: 256,
1162
+ options: { min: 2, max: 4 },
1163
+ optionIdChars: 16,
1164
+ optionLabelChars: 120,
1165
+ optionDetailChars: 1e3,
1166
+ links: 16,
1167
+ linkRefChars: 2048,
1168
+ linkLabelChars: 120,
1169
+ snippetChars: 200,
1170
+ noteChars: 2e3,
1171
+ listMax: 200,
1172
+ /** Open `needsOwner` items per session before the playbook asks the lead to merge or drop stale ones (§5.1 rule 6). */
1173
+ openPerSessionSoftCap: 5
1174
+ };
1175
+ const ATTENTION_SOURCES = ["lead", "agent", "owner", "automation", "team"];
1176
+ const ATTENTION_KINDS = ["decision", "todo", "blocked", "report", "answer", "question", "request", "pin"];
1177
+ const OWNER_BOARD_POST_KINDS = ["decision", "todo", "report", "answer"];
1178
+ const OWNER_BOARD_RESOLVE_OUTCOMES = ["done", "answered", "dropped", "superseded"];
1179
+ const ATTENTION_BOARD_LOCAL_ID_PREFIX = "board-";
1180
+ function isAttentionBoardLocalId(localId) {
1181
+ return typeof localId === "string" && localId.startsWith(ATTENTION_BOARD_LOCAL_ID_PREFIX);
1182
+ }
1183
+ const id = z$1.string().min(1).max(128);
1184
+ const title = z$1.string().trim().min(1).max(ATTENTION_LIMITS.titleChars);
1185
+ const bodyMd = z$1.string().max(ATTENTION_LIMITS.bodyBytes * 4).refine((v) => new TextEncoder().encode(v).length <= ATTENTION_LIMITS.bodyBytes, "body exceeds 8KB");
1186
+ const note = z$1.string().max(ATTENTION_LIMITS.noteChars);
1187
+ const requestId = z$1.string().min(1).max(128);
1188
+ const key = z$1.string().min(1).max(ATTENTION_LIMITS.keyChars);
1189
+ const AttentionOptionSchema = z$1.object({
1190
+ id: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars),
1191
+ label: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionLabelChars),
1192
+ detail: z$1.string().max(ATTENTION_LIMITS.optionDetailChars).optional(),
1193
+ recommended: z$1.boolean().optional()
1194
+ });
1195
+ const options = z$1.array(AttentionOptionSchema).min(ATTENTION_LIMITS.options.min).max(ATTENTION_LIMITS.options.max).refine((o) => new Set(o.map((x) => x.id)).size === o.length, "option ids must be unique");
1196
+ const ATTENTION_LINK_TYPES = ["task", "pr", "commit", "url", "panel"];
1197
+ const AttentionLinkSchema = z$1.object({
1198
+ type: z$1.enum(ATTENTION_LINK_TYPES),
1199
+ ref: z$1.string().trim().min(1).max(ATTENTION_LIMITS.linkRefChars),
1200
+ label: z$1.string().max(ATTENTION_LIMITS.linkLabelChars).optional()
1201
+ });
1202
+ const links = z$1.array(AttentionLinkSchema).max(ATTENTION_LIMITS.links);
1203
+ const AttentionAnchorSchema = z$1.object({
1204
+ localId: z$1.string().min(1).max(256).optional(),
1205
+ messageId: z$1.string().min(1).max(128).optional(),
1206
+ snippet: z$1.string().max(ATTENTION_LIMITS.snippetChars).optional()
1207
+ }).refine((a) => a.localId !== void 0 || a.messageId !== void 0, "anchor needs localId or messageId");
1208
+ const AttentionItemSchema = z$1.object({
1209
+ id: z$1.string(),
1210
+ sessionId: z$1.string(),
1211
+ teamId: z$1.string().nullable(),
1212
+ projectId: z$1.string().nullable(),
1213
+ source: z$1.string(),
1214
+ kind: z$1.string(),
1215
+ key: z$1.string().nullable(),
1216
+ title: z$1.string(),
1217
+ bodyMd: z$1.string().nullable(),
1218
+ options: z$1.array(AttentionOptionSchema.passthrough()).nullable(),
1219
+ links: z$1.array(z$1.object({ type: z$1.string(), ref: z$1.string(), label: z$1.string().optional() }).passthrough()).nullable(),
1220
+ anchor: z$1.object({ localId: z$1.string().optional(), messageId: z$1.string().optional(), snippet: z$1.string().optional() }).nullable(),
1221
+ /** The lead's first in-stream reply to an owner question (auto-attached by the CLI, §4.4). */
1222
+ firstReply: z$1.object({ localId: z$1.string().optional(), messageId: z$1.string().optional(), snippet: z$1.string().optional() }).nullable(),
1223
+ replyToId: z$1.string().nullable(),
1224
+ /** D5: drafted by the CLI from the lead's text (「自动识别」), not posted by the lead. No push until the lead confirms it. */
1225
+ inferred: z$1.boolean().default(false),
1226
+ needsOwner: z$1.boolean(),
1227
+ state: z$1.string(),
1228
+ ownerChoice: z$1.string().nullable(),
1229
+ ownerNote: z$1.string().nullable(),
1230
+ resolvedBy: z$1.string().nullable(),
1231
+ /** The lead's `owner_board_resolve` note. */
1232
+ resolveNote: z$1.string().nullable(),
1233
+ /** Times the same `(sessionId, key)` was posted again and folded into this item. */
1234
+ repostCount: z$1.number(),
1235
+ createdAt: z$1.number(),
1236
+ updatedAt: z$1.number(),
1237
+ resolvedAt: z$1.number().nullable(),
1238
+ pushedAt: z$1.number().nullable(),
1239
+ /** Bumped on every mutation; clients keep the highest version per id. */
1240
+ version: z$1.number()
1241
+ });
1242
+ z$1.object({
1243
+ t: z$1.literal("attention-item"),
1244
+ item: AttentionItemSchema
1245
+ });
1246
+ z$1.object({
1247
+ sessionId: id,
1248
+ source: z$1.enum(ATTENTION_SOURCES),
1249
+ kind: z$1.enum(ATTENTION_KINDS),
1250
+ title,
1251
+ bodyMd: bodyMd.optional(),
1252
+ options: options.optional(),
1253
+ links: links.optional(),
1254
+ anchor: AttentionAnchorSchema.optional(),
1255
+ replyToId: id.optional(),
1256
+ key: key.optional(),
1257
+ requestId: requestId.optional(),
1258
+ /**
1259
+ * D5 draft: only the CLI's auto-detect path sets it (`owner_board_post` does
1260
+ * not expose it). A repost of the key with `false` confirms the draft (and
1261
+ * pushes once); a draft never downgrades a confirmed item.
1262
+ */
1263
+ inferred: z$1.boolean().default(false)
1264
+ }).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
1265
+ z$1.object({
1266
+ title: title.optional(),
1267
+ bodyMd: bodyMd.nullable().optional(),
1268
+ appendMd: bodyMd.optional(),
1269
+ options: options.nullable().optional(),
1270
+ links: links.nullable().optional(),
1271
+ /** Only `question` → `request` (the lead reclassifies an owner message, §4.4). */
1272
+ kind: z$1.literal("request").optional(),
1273
+ state: z$1.enum(["open", "in_progress", "answered"]).optional(),
1274
+ firstReply: AttentionAnchorSchema.optional(),
1275
+ requestId: requestId.optional()
1276
+ }).refine((p) => !(p.bodyMd !== void 0 && p.appendMd !== void 0), "use bodyMd or appendMd, not both");
1277
+ z$1.object({
1278
+ outcome: z$1.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
1279
+ note: note.optional(),
1280
+ /** Defaults to `lead`. */
1281
+ by: z$1.enum(["lead", "auto-first-reply"]).optional(),
1282
+ requestId: requestId.optional()
1283
+ });
1284
+ z$1.discriminatedUnion("action", [
1285
+ z$1.object({ action: z$1.literal("choose"), choice: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars), note: note.optional() }),
1286
+ z$1.object({ action: z$1.literal("resolve"), note: note.optional() }),
1287
+ z$1.object({ action: z$1.literal("reopen"), note: note.optional() })
1288
+ ]);
1289
+ z$1.object({
1290
+ sessionId: id.optional(),
1291
+ /** `open` (default) = open + in_progress; `active` adds the latest `answered`; `all` = everything. */
1292
+ state: z$1.enum(["open", "active", "all"]).optional(),
1293
+ needsOwner: z$1.enum(["1", "true", "0", "false"]).optional(),
1294
+ /** Epoch ms; only items updated after it. */
1295
+ since: z$1.coerce.number().int().nonnegative().optional(),
1296
+ limit: z$1.coerce.number().int().min(1).max(ATTENTION_LIMITS.listMax).optional()
1297
+ });
1298
+ const OwnerBoardPostInputSchema = z$1.object({
1299
+ kind: z$1.enum(OWNER_BOARD_POST_KINDS),
1300
+ title,
1301
+ body_md: bodyMd.optional(),
1302
+ options: options.optional(),
1303
+ links: links.optional(),
1304
+ reply_to: id.optional(),
1305
+ key: key.optional(),
1306
+ anchor: z$1.union([z$1.literal("this_turn"), z$1.object({ localId: z$1.string().min(1).max(256) })]).optional(),
1307
+ request_id: requestId
1308
+ }).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
1309
+ const OwnerBoardUpdateInputSchema = z$1.object({
1310
+ id,
1311
+ title: title.optional(),
1312
+ body_md: bodyMd.optional(),
1313
+ append_md: bodyMd.optional(),
1314
+ options: options.optional(),
1315
+ links: links.optional(),
1316
+ state: z$1.enum(["open", "in_progress"]).optional(),
1317
+ request_id: requestId
1318
+ }).refine((p) => !(p.body_md !== void 0 && p.append_md !== void 0), "use body_md or append_md, not both");
1319
+ const OwnerBoardResolveInputSchema = z$1.object({
1320
+ id,
1321
+ outcome: z$1.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
1322
+ note: note.optional(),
1323
+ request_id: requestId
1324
+ });
1325
+ const OwnerBoardListInputSchema = z$1.object({
1326
+ state: z$1.enum(["open", "all"]).optional(),
1327
+ /** ISO-8601 or epoch ms. */
1328
+ since: z$1.string().min(1).max(64).optional()
1329
+ });
1330
+ function ownerBoardPostToRest(sessionId, input, anchor) {
1331
+ return {
1332
+ sessionId,
1333
+ source: "lead",
1334
+ kind: input.kind,
1335
+ title: input.title,
1336
+ ...input.body_md !== void 0 ? { bodyMd: input.body_md } : {},
1337
+ ...input.options ? { options: input.options } : {},
1338
+ ...input.links ? { links: input.links } : {},
1339
+ ...anchor ? { anchor } : {},
1340
+ ...input.reply_to ? { replyToId: input.reply_to } : {},
1341
+ ...input.key ? { key: input.key } : {},
1342
+ requestId: input.request_id,
1343
+ inferred: false
1344
+ };
1345
+ }
1155
1346
 
1156
- export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, CODEX_STEER_CAPABILITY as C, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as D, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as E, AUTOMATION_CLAIM_MAX_RUNS as F, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as G, AUTOMATION_DEFAULT_LEASE_MS as H, HARNESS_INSTALL_CAPABILITY_VERSION as I, PROMPT_QUEUE_CAPABILITY as P, ReleaseDrainNoticeSchema as R, STREAM_DELTA_MAX_CHARS as S, PROJECT_SESSION_CAPABILITY as a, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as b, AutomationPrecheckSchema as c, isInsideTeamWorktree as d, createEnvelope as e, createBuiltinTodoClient as f, BUILTIN_TODO_DISCOVERY as g, getAgentCodeDefaults as h, isAutomationRunTerminal as i, isClaudeOpus55Model as j, supportsClaudeOpus55 as k, AutomationNameSchema as l, AutomationConcurrencySchema as m, normalizeAgentKey as n, AutomationActionSchema as o, AutomationTriggerSchema as p, AgentVersionsSchema as q, rebaseTeamWorktreePath as r, streamKeyOf as s, PI_STEER_CAPABILITY as t, AGENT_VERSION_SOURCES as u, RelayAssignmentResponseSchema as v, RelayCandidatesResponseSchema as w, ServerMigrateNoticeSchema as x, isHarnessInstallId as y, AUTOMATION_SUMMARY_MAX_CHARS as z };
1347
+ export { AUTOMATION_NAME_PATTERN as A, BUILTIN_TODO_SKILL as B, isAttentionBoardLocalId as C, OwnerBoardUpdateInputSchema as D, OwnerBoardResolveInputSchema as E, OwnerBoardListInputSchema as F, ATTENTION_SESSION_CAPABILITY as G, RelayAssignmentResponseSchema as H, CODEX_STEER_CAPABILITY as I, RelayCandidatesResponseSchema as J, ServerMigrateNoticeSchema as K, isHarnessInstallId as L, AUTOMATION_PRECHECK_OUTPUT_MAX_CHARS as M, AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS as N, OwnerBoardPostInputSchema as O, PROMPT_QUEUE_CAPABILITY as P, AUTOMATION_CLAIM_MAX_RUNS as Q, ReleaseDrainNoticeSchema as R, STREAM_DELTA_MAX_CHARS as S, AUTOMATION_DAEMON_CAPABILITY_PRECHECK as T, AUTOMATION_DEFAULT_LEASE_MS as U, HARNESS_INSTALL_CAPABILITY_VERSION as V, PROJECT_SESSION_CAPABILITY as a, AUTOMATION_PRECHECK_MAX_TIMEOUT_MS as b, AutomationPrecheckSchema as c, AUTOMATION_ATTENTION_REASON_MAX_CHARS as d, AUTOMATION_SUMMARY_MAX_CHARS as e, isInsideTeamWorktree as f, createEnvelope as g, createBuiltinTodoClient as h, isAutomationRunTerminal as i, BUILTIN_TODO_DISCOVERY as j, getAgentCodeDefaults as k, isClaudeOpus55Model as l, supportsClaudeOpus55 as m, normalizeAgentKey as n, AutomationNameSchema as o, AutomationConcurrencySchema as p, AutomationActionSchema as q, rebaseTeamWorktreePath as r, streamKeyOf as s, AutomationTriggerSchema as t, AgentVersionsSchema as u, PI_STEER_CAPABILITY as v, AGENT_VERSION_SOURCES as w, ATTENTION_DISABLED_ERROR as x, ATTENTION_LIMITS as y, ownerBoardPostToRest as z };
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var query = require('./query-CK--1fbL.cjs');
3
+ var query = require('./query-CZQG1PdU.cjs');
4
4
  var claudeAgentSdk = require('@anthropic-ai/claude-agent-sdk');
5
5
  require('./smallFastModel-D_uxGMo3.cjs');
6
- require('./logger-DK1ytCz6.cjs');
6
+ require('./logger-Cgwz30rK.cjs');
7
7
  require('chalk');
8
8
  require('node:util');
9
- require('./configuration-B-CugKJ3.cjs');
9
+ require('./configuration-K3I6yOjZ.cjs');
10
10
  require('node:fs');
11
11
  require('node:os');
12
12
  require('node:path');
13
- require('./package-BfeqAzyJ.cjs');
13
+ require('./package-3aPiSpZj.cjs');
14
14
  require('node:fs/promises');
15
15
  require('./processTreeSnapshot-mDbnuojn.cjs');
16
16
  require('node:child_process');
@@ -1,4 +1,4 @@
1
- import { p as packageJson } from './package-CKj8zndE.mjs';
1
+ import { p as packageJson } from './package-CTrz6U3C.mjs';
2
2
  import module$1 from 'node:module';
3
3
  import { existsSync } from 'node:fs';
4
4
  import { readdir, rm } from 'node:fs/promises';
@@ -57,10 +57,10 @@ async function pruneStaleCompileCaches(happyHomeDir, cliVersion) {
57
57
  async function run(args) {
58
58
  enableCompileCacheIfPossible(packageJson.version);
59
59
  if (isStandaloneVersionRequest(args) || isSelfCheckRequest(args)) {
60
- const { selfCheckMain } = await import('./selfCheck-BDfTwxqB.mjs');
60
+ const { selfCheckMain } = await import('./selfCheck-ZGgBtxFQ.mjs');
61
61
  process.exit(await selfCheckMain({ verbose: isSelfCheckRequest(args) }));
62
62
  }
63
- const { main } = await import('./main-CpUmw7hm.mjs');
63
+ const { main } = await import('./main-DNDL6t8z.mjs');
64
64
  await main();
65
65
  }
66
66
  void run(process.argv.slice(2));