very-happy-cli 0.2.182 → 0.2.184

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/{AcpBackend-DLk3gMYH.mjs → AcpBackend-Csg7Sy2P.mjs} +3 -3
  2. package/dist/{AcpBackend-JA5eu8Y0.cjs → AcpBackend-DOzn74zn.cjs} +3 -3
  3. package/dist/{AcpSessionManager-OrCww-Qv.mjs → AcpSessionManager-BRK2F2yN.mjs} +10 -3
  4. package/dist/{AcpSessionManager-DjYidq4C.cjs → AcpSessionManager-CJXDNNtq.cjs} +10 -3
  5. package/dist/{BasePermissionHandler-u-neo-iN.mjs → BasePermissionHandler-BqYwrCra.mjs} +1 -1
  6. package/dist/{BasePermissionHandler-D3PMKLBS.cjs → BasePermissionHandler-CfrnkG3v.cjs} +1 -1
  7. package/dist/{acpSessionResume-Dxo8222T.cjs → acpSessionResume-DZ65DBeE.cjs} +1 -1
  8. package/dist/{acpSessionResume-u2TwX5Jd.mjs → acpSessionResume-Dz1myMbR.mjs} +1 -1
  9. package/dist/{agentHome-D3hNrnoA.mjs → agentHome-B_tu3tFJ.mjs} +4 -4
  10. package/dist/{agentHome-CP1tCBXz.cjs → agentHome-CKAXhc8P.cjs} +4 -4
  11. package/dist/{api-C_YSQnsi.mjs → api-BpTDU2BO.mjs} +79 -12
  12. package/dist/{api-CZWcG7uh.cjs → api-rw5xkzxo.cjs} +81 -11
  13. package/dist/{apiMachine-DPGrED5C.cjs → apiMachine-Bs1XXHKs.cjs} +14 -14
  14. package/dist/{apiMachine-C_GA5Bm-.mjs → apiMachine-wp0hWG3F.mjs} +14 -14
  15. package/dist/{attachmentContent-Ckzyb1Uy.mjs → attachmentContent-CWSSGMMo.mjs} +2 -2
  16. package/dist/{attachmentContent-I_dJIevE.cjs → attachmentContent-K_Up4InS.cjs} +2 -2
  17. package/dist/{auth-BKnE7uv7.cjs → auth-C4_mXYgj.cjs} +8 -8
  18. package/dist/{auth-DOXMI-xp.mjs → auth-CBESCCCn.mjs} +8 -8
  19. package/dist/{auth-CGgpiJ5-.mjs → auth-D6kSt2sR.mjs} +5 -5
  20. package/dist/{auth-Lw_utSMV.cjs → auth-gGryJImw.cjs} +5 -5
  21. package/dist/{auto-Z56mMZnH.mjs → auto-CEucVmFR.mjs} +32 -26
  22. package/dist/{auto-CIgFHIyQ.cjs → auto-Do43AOza.cjs} +32 -25
  23. package/dist/{bootstrap-DsXp74wv.cjs → bootstrap-BPz1iX77.cjs} +2 -2
  24. package/dist/{bootstrap-D3vlOROj.mjs → bootstrap-CodyCmGt.mjs} +2 -2
  25. package/dist/{browser-CUxGoATV.mjs → browser-CqMhj8Gm.mjs} +1 -1
  26. package/dist/{browser-CZlA9AkO.cjs → browser-D9D-1eqa.cjs} +1 -1
  27. package/dist/{claudeLocal-FnTUgwCi.mjs → claudeLocal-BgIRtT3Q.mjs} +5 -5
  28. package/dist/{claudeLocal-oELvwiZL.cjs → claudeLocal-Dywp8NKr.cjs} +5 -5
  29. package/dist/{claudeLocalLauncher-CO5YHCzi.mjs → claudeLocalLauncher-CaHjZ8HW.mjs} +10 -10
  30. package/dist/{claudeLocalLauncher-QsVXEVdE.cjs → claudeLocalLauncher-_TOL73g5.cjs} +10 -10
  31. package/dist/{claudeSessionFork-Cspr6QW0.mjs → claudeSessionFork-C9nB7fs5.mjs} +1 -1
  32. package/dist/{claudeSessionFork-BA4GE5AL.cjs → claudeSessionFork-jq-_WiAu.cjs} +1 -1
  33. package/dist/{client-CDuW4MS9.cjs → client-BFDji81N.cjs} +15 -7
  34. package/dist/{client-Ctbw05Xj.mjs → client-BdbVizjk.mjs} +15 -7
  35. package/dist/{client-xnWiHqdb.cjs → client-ByZFACEw.cjs} +18 -5
  36. package/dist/{client-DK8CzUry.cjs → client-C49zFRkX.cjs} +2 -2
  37. package/dist/{client-o-meK7-a.mjs → client-CX-_2myt.mjs} +2 -2
  38. package/dist/{client-BGfmSbWc.mjs → client-DwlYk8uJ.mjs} +18 -5
  39. package/dist/codex/happyMcpStdioBridge.cjs +16 -16
  40. package/dist/codex/happyMcpStdioBridge.mjs +16 -16
  41. package/dist/{codexAppServerClient-BlsOZLul.mjs → codexAppServerClient-CmOIqiNQ.mjs} +3 -3
  42. package/dist/{codexAppServerClient-DhNDTU_i.cjs → codexAppServerClient-DF12ZSw1.cjs} +3 -3
  43. package/dist/{codexCommand-BGx5NMQR.mjs → codexCommand-BN05uEyv.mjs} +94 -60
  44. package/dist/{codexCommand-DJDPfpIs.cjs → codexCommand-H-ObWTtx.cjs} +94 -60
  45. package/dist/{codexTermination-CVhhwHZU.mjs → codexTermination-Byohgj8h.mjs} +1 -1
  46. package/dist/{codexTermination-CqPMuokw.cjs → codexTermination-RwKa8pKk.cjs} +1 -1
  47. package/dist/{config-CWAe08-Q.mjs → config-ChHLh-hf.mjs} +3 -3
  48. package/dist/{config-CHpxzXBL.cjs → config-D_wNqwxX.cjs} +3 -3
  49. package/dist/{configuration-B-CugKJ3.cjs → configuration-C9Sx-Foo.cjs} +1 -1
  50. package/dist/{configuration-YXw_Dcsb.mjs → configuration-CVgUe2qN.mjs} +1 -1
  51. package/dist/{connect-BmHvMXH2.cjs → connect-B61xJDRq.cjs} +13 -13
  52. package/dist/{connect-CPeJXHha.mjs → connect-DJEQjS7C.mjs} +13 -13
  53. package/dist/{context-BtIVqHI5.cjs → context-Bf3BG7w8.cjs} +1 -1
  54. package/dist/{context-Drzs_Z38.mjs → context-CDPfhHTo.mjs} +1 -1
  55. package/dist/{controlClient-D0kGwKYx.cjs → controlClient-BLO1_pPx.cjs} +14 -3
  56. package/dist/{controlClient-BL4hb4l3.mjs → controlClient-DMCxtwq2.mjs} +14 -4
  57. package/dist/{createSessionMetadata-L499emJn.cjs → createSessionMetadata-5Mde6Dfh.cjs} +2 -2
  58. package/dist/{createSessionMetadata-DvGDsnsn.mjs → createSessionMetadata-BYroCdrU.mjs} +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-B7mjHQKp.cjs} +2 -2
  62. package/dist/{defaultPermissionMode-BLfxu-Yz.mjs → defaultPermissionMode-CTdxUV_3.mjs} +2 -2
  63. package/dist/{deterministicJson-CfLkBRvU.cjs → deterministicJson-C1Z9MlDX.cjs} +569 -17
  64. package/dist/{deterministicJson-B_UAbmQ4.mjs → deterministicJson-C3QXOc1N.mjs} +572 -21
  65. package/dist/{doctor-DMvlzmnE.cjs → doctor-DRdV3thy.cjs} +7 -7
  66. package/dist/{doctor-bKScPtZu.mjs → doctor-OwNmTpYh.mjs} +7 -7
  67. package/dist/{downloadTarget-J9j37eFG.mjs → downloadTarget-CNtQ8rhV.mjs} +6 -6
  68. package/dist/{downloadTarget-D33BFvew.cjs → downloadTarget-Di5bf7r0.cjs} +6 -6
  69. package/dist/{ensureDaemonRunning-2IqWROJp.cjs → ensureDaemonRunning-CMY--T9Q.cjs} +5 -5
  70. package/dist/{ensureDaemonRunning-DLvwhpNg.mjs → ensureDaemonRunning-IRV-w0wH.mjs} +5 -5
  71. package/dist/{handleResumeCommand-CjtjQ_I7.mjs → handleResumeCommand-BO00SYjG.mjs} +5 -5
  72. package/dist/{handleResumeCommand-Dp2Y-p6V.cjs → handleResumeCommand-z7wY7QVM.cjs} +5 -5
  73. package/dist/{index-DYVIbhAJ.cjs → index-B4cyX2by.cjs} +40 -40
  74. package/dist/{index-B_aNaW9w.cjs → index-BsoUsrKS.cjs} +4 -4
  75. package/dist/{index-Cllzqoes.mjs → index-C7zgeuLP.mjs} +4 -4
  76. package/dist/{index-D_LvOWUN.mjs → index-CVUiytNq.mjs} +3 -3
  77. package/dist/{index-BOT0Tg5E.mjs → index-DZvi6_tB.mjs} +4 -4
  78. package/dist/{index-BI0h2Zks.mjs → index-DisBaRvM.mjs} +277 -77
  79. package/dist/{index-CZC7egJA.cjs → index-NhmqjrGv.cjs} +3 -3
  80. package/dist/{index-oh8XEozJ.cjs → index-Ub-5xbcU.cjs} +286 -76
  81. package/dist/{index-kA46KMxN.mjs → index-_LfuIz-O.mjs} +41 -41
  82. package/dist/{index-DymOv3kK.cjs → index-wYJu2yGc.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-BAa_Xmof.cjs → install-CGYDeYes.cjs} +3 -3
  87. package/dist/{install-C46mkr9a.mjs → install-DeUM6h8X.mjs} +3 -3
  88. package/dist/{install-D0inLCv-.mjs → install-F3rP8tBU.mjs} +2 -2
  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-C4YgPn6y.cjs} +1 -1
  94. package/dist/{lidState-D8Iuvjgl.mjs → lidState-CBjQEwTt.mjs} +1 -1
  95. package/dist/{localHappyAgentAuth-SD6GM97y.cjs → localHappyAgentAuth-BzCuIkzi.cjs} +1 -1
  96. package/dist/{localHappyAgentAuth-D3rQDRd9.mjs → localHappyAgentAuth-CcWGU_lS.mjs} +1 -1
  97. package/dist/{logger-DK1ytCz6.cjs → logger-CrtT0opS.cjs} +2 -2
  98. package/dist/{logger-DpqihN1f.mjs → logger-D2qd0mMg.mjs} +2 -2
  99. package/dist/{machineMetadata-D4E3qoIG.mjs → machineMetadata-B2czDiTd.mjs} +3 -3
  100. package/dist/{machineMetadata-IJc6_iyx.cjs → machineMetadata-D1hlm_oF.cjs} +3 -3
  101. package/dist/{main-CpUmw7hm.mjs → main-BNYWELul.mjs} +69 -56
  102. package/dist/{main-DUXh2rgW.cjs → main-BWgWN5d1.cjs} +69 -56
  103. package/dist/{mcp-D5f3Vd-z.cjs → mcp-C18unjs1.cjs} +15 -15
  104. package/dist/{mcp-66g1TJ8P.mjs → mcp-ColtiH23.mjs} +15 -15
  105. package/dist/{mirrorProtocol-DkWOcZh9.cjs → mirrorProtocol-D4CR5I5W.cjs} +3 -3
  106. package/dist/{mirrorProtocol-bsCUcaCY.mjs → mirrorProtocol-DTHWtAE5.mjs} +3 -3
  107. package/dist/{package-BfeqAzyJ.cjs → package-DczR1k0c.cjs} +7 -7
  108. package/dist/{package-CKj8zndE.mjs → package-Ek5FOyEo.mjs} +7 -7
  109. package/dist/{panels-r8LmaBs6.mjs → panels-BIQ7FrCB.mjs} +5 -5
  110. package/dist/{panels-2PXsw9-d.cjs → panels-DYSMHhdb.cjs} +5 -5
  111. package/dist/{peerTools-D_id4d41.mjs → peerTools-CABQ6iKd.mjs} +5 -5
  112. package/dist/{peerTools-BVp1z0T_.cjs → peerTools-Cufh4Qp_.cjs} +5 -5
  113. package/dist/{persistence-jOEuAFTS.mjs → persistence-DFtgQvr6.mjs} +2 -2
  114. package/dist/{persistence-BdpwWXKh.cjs → persistence-IYH6bAXY.cjs} +2 -2
  115. package/dist/{piRunnerArgs-68I5F_M1.mjs → piRunnerArgs-CIWprC1S.mjs} +1 -1
  116. package/dist/{piRunnerArgs-vxCHKnSA.cjs → piRunnerArgs-Dgjmj8KL.cjs} +1 -1
  117. package/dist/{piRuntime-C3Dg5uni.cjs → piRuntime-C_nX977w.cjs} +2 -2
  118. package/dist/{piRuntime-DgLIard1.mjs → piRuntime-K6o4GPZ9.mjs} +2 -2
  119. package/dist/{piTerminal-DJL0w-uA.mjs → piTerminal-CRl0EZc3.mjs} +18 -18
  120. package/dist/{piTerminal-C135BcLP.cjs → piTerminal-CYhcmkyi.cjs} +18 -18
  121. package/dist/providerBinding-B-Qbx9W2.cjs +140 -0
  122. package/dist/providerBinding-CYubGg-Z.mjs +132 -0
  123. package/dist/{pushNotifications-CyQVDThC.cjs → pushNotifications-BgQ_QTgS.cjs} +3 -3
  124. package/dist/{pushNotifications-CMmRsbKv.mjs → pushNotifications-gVJWGFBP.mjs} +3 -3
  125. package/dist/{query-CPXnDURZ.mjs → query-CGp9vY4e.mjs} +1 -1
  126. package/dist/{query-CK--1fbL.cjs → query-DFreaScb.cjs} +1 -1
  127. package/dist/{rateLimitWindows-DJxnNw-X.cjs → rateLimitWindows-CeogT1b6.cjs} +1 -1
  128. package/dist/{rateLimitWindows-Cqa4AGaB.mjs → rateLimitWindows-DM_gshI4.mjs} +1 -1
  129. package/dist/{registerCommonHandlers-DbNoM39q.cjs → registerCommonHandlers-CRqKXwQt.cjs} +2 -2
  130. package/dist/{registerCommonHandlers-K8dICQO2.mjs → registerCommonHandlers-CyAtDNvs.mjs} +2 -2
  131. package/dist/{registerKillSessionHandler-DiS_go8d.cjs → registerKillSessionHandler-CX49N52L.cjs} +6 -6
  132. package/dist/{registerKillSessionHandler-O1iriOMO.mjs → registerKillSessionHandler-DGWADNla.mjs} +6 -6
  133. package/dist/{remoteSessionClient-BlURPulk.mjs → remoteSessionClient-1nycIdrG.mjs} +5 -5
  134. package/dist/{remoteSessionClient-CtV9mDko.cjs → remoteSessionClient-CuAkp19e.cjs} +5 -5
  135. package/dist/{reportProgressTool-DlD_xjzU.cjs → reportProgressTool-BS7TkeEk.cjs} +4 -4
  136. package/dist/{reportProgressTool-nCExrHZH.mjs → reportProgressTool-CdSi-uSC.mjs} +4 -4
  137. package/dist/{resources-CH1iP6Cv.mjs → resources-CLdQfe3b.mjs} +1 -1
  138. package/dist/{resources-BPyN59Iv.cjs → resources-CqwHPhdK.cjs} +1 -1
  139. package/dist/{run-drtwHYkO.mjs → run-DqjEj8M2.mjs} +101 -248
  140. package/dist/{run-BBNrcCfI.cjs → run-gVwkplx0.cjs} +111 -259
  141. package/dist/{runClaude-B3KSeby4.cjs → runClaude-CtVoFstP.cjs} +39 -24
  142. package/dist/{runClaude-CFp27Tyi.mjs → runClaude-CuSjrZSf.mjs} +39 -24
  143. package/dist/{runClaudeDeps-C_C9TCI0.cjs → runClaudeDeps-DqOgRuKq.cjs} +49 -40
  144. package/dist/{runClaudeDeps-DMcv93lA.mjs → runClaudeDeps-eazOhb6g.mjs} +54 -45
  145. package/dist/{runGemini-DzdSBAr9.cjs → runGemini-81wkPvMv.cjs} +37 -35
  146. package/dist/{runGemini-Bc6SY-hd.mjs → runGemini-B4EqAd1U.mjs} +37 -35
  147. package/dist/{runOpenClaw-DN6rEVqC.cjs → runOpenClaw-BK7ZQEKj.cjs} +18 -18
  148. package/dist/{runOpenClaw-DI0qMlgF.mjs → runOpenClaw-Brb1KKAA.mjs} +18 -18
  149. package/dist/{sandbox-DtttPBMA.cjs → sandbox-DFD6an8o.cjs} +4 -4
  150. package/dist/{sandbox-v-ffe8LR.mjs → sandbox-t43Exd4t.mjs} +4 -4
  151. package/dist/{selfCheck-B-yy6bW3.cjs → selfCheck-Bel50SH3.cjs} +37 -36
  152. package/dist/selfCheck-CwpZepG-.mjs +86 -0
  153. package/dist/{send-DpBwSZuj.mjs → send-Co9jxmc4.mjs} +8 -8
  154. package/dist/{send-ShzXYPRu.cjs → send-IR5DnG9V.cjs} +8 -8
  155. package/dist/{server-CEzKrfKj.cjs → server-CAo6a3Vw.cjs} +6 -6
  156. package/dist/{server-DScgJXxa.mjs → server-KnIeKeTb.mjs} +4 -4
  157. package/dist/{sessionLock-Dc0fadGG.cjs → sessionLock-DNGDn9oj.cjs} +3 -3
  158. package/dist/{sessionLock-B6K4SBZD.mjs → sessionLock-ha9gsQEn.mjs} +3 -3
  159. package/dist/{sessionOps-D0BPWPoh.mjs → sessionOps-Di9MC0FP.mjs} +4 -4
  160. package/dist/{sessionOps-Dx7wARjI.cjs → sessionOps-hRqzcMXB.cjs} +4 -4
  161. package/dist/sessionProvider-4Nn6e9Kd.mjs +109 -0
  162. package/dist/sessionProvider-LqE7Y_cf.cjs +114 -0
  163. package/dist/{sessionScanner-BJ35TVG6.cjs → sessionScanner-BzEtrHB8.cjs} +3 -3
  164. package/dist/{sessionScanner-9Fpgaxtf.mjs → sessionScanner-DKFKDsrW.mjs} +3 -3
  165. package/dist/{sessions-TZGGAry1.cjs → sessions-CmLiagcb.cjs} +10 -10
  166. package/dist/{sessions-CFtDlyZd.mjs → sessions-DzgMNXo5.mjs} +10 -10
  167. package/dist/{setupOfflineReconnection-Biaus-0T.mjs → setupOfflineReconnection-D4NGi3Jf.mjs} +2 -2
  168. package/dist/{setupOfflineReconnection-B1GsVA8P.cjs → setupOfflineReconnection-Dq4N2Txp.cjs} +2 -2
  169. package/dist/{spawn-CsoQ-Ecz.mjs → spawn-C6CE5PsI.mjs} +14 -14
  170. package/dist/{spawn-BRTuypQ2.cjs → spawn-tmoekkOW.cjs} +14 -14
  171. package/dist/{spawnAgents-CG211IW7.cjs → spawnAgents-D15n6tAj.cjs} +1 -1
  172. package/dist/{spawnAgents-Co-SLcx-.mjs → spawnAgents-jXo9jIYo.mjs} +1 -1
  173. package/dist/{spawnHappyCLI-D1doCjkZ.mjs → spawnHappyCLI-66grqHO0.mjs} +1 -1
  174. package/dist/{spawnHappyCLI-D47kX6jg.cjs → spawnHappyCLI-8NcKgkuy.cjs} +1 -1
  175. package/dist/{specialCommands-xSmqT_Fu.mjs → specialCommands-BO8ipH0n.mjs} +3 -3
  176. package/dist/{specialCommands-Ch-Gvy-i.cjs → specialCommands-Dq0TmY1Z.cjs} +3 -3
  177. package/dist/{startFileWatcher-CCl2fFxT.mjs → startFileWatcher-BLDkieUW.mjs} +1 -1
  178. package/dist/{startFileWatcher-gKQTstR6.cjs → startFileWatcher-CjgKvec9.cjs} +1 -1
  179. package/dist/{startupSessionCreate-DlZc8yPl.mjs → startupSessionCreate-B60THeNz.mjs} +1 -1
  180. package/dist/{startupSessionCreate-BXqoUX30.cjs → startupSessionCreate-CXRVahaU.cjs} +1 -1
  181. package/dist/{streamRelay-B-J-4St1.cjs → streamRelay-CtTpf-Li.cjs} +1 -1
  182. package/dist/{streamRelay-DnJXsi36.mjs → streamRelay-GzHxvMem.mjs} +1 -1
  183. package/dist/{sync-BbjMC3sR.mjs → sync-DJvx7RbO.mjs} +1 -1
  184. package/dist/{sync-BxMdnZzz.cjs → sync-DKSZOi6w.cjs} +1 -1
  185. package/dist/{systemPrompt-C2KojRmK.cjs → systemPrompt-Duos1BtM.cjs} +2 -2
  186. package/dist/{systemPrompt-CmSDAoIx.mjs → systemPrompt-dOOpz8L7.mjs} +2 -2
  187. package/dist/{teams-DESdalox.cjs → teams-pO5rjvPO.cjs} +9 -9
  188. package/dist/{teams-lRy1MS0Z.mjs → teams-uWiMJEe1.mjs} +9 -9
  189. package/dist/{template-BaHAmH2K.cjs → template-BLJxflCH.cjs} +32 -2
  190. package/dist/{template-CiOPa2rd.mjs → template-YlpbYGeQ.mjs} +31 -3
  191. package/dist/{time-DNLeIRgR.cjs → time-D-8GFCE7.cjs} +1 -1
  192. package/dist/{time-Cfknl7xG.mjs → time-Du0scQeJ.mjs} +1 -1
  193. package/dist/{titleGenerator-ClnMSzwC.mjs → titleGenerator-DKYj8rLY.mjs} +1 -1
  194. package/dist/{titleGenerator-YNutaU88.cjs → titleGenerator-DnKygjBP.cjs} +2 -2
  195. package/dist/{todo-DS75Mboz.cjs → todo-BFDb7O8q.cjs} +6 -6
  196. package/dist/{todo-DZbK5POc.mjs → todo-Du5dAwnt.mjs} +6 -6
  197. package/dist/{tools-BgdU0dWp.mjs → tools-DHvMVL0a.mjs} +1 -1
  198. package/dist/{tools-ClYcb1YQ.cjs → tools-DK_x86Kl.cjs} +1 -1
  199. package/dist/{uninstall-bXenFevR.mjs → uninstall-CLDEXir0.mjs} +3 -3
  200. package/dist/{uninstall-Di1vPBLV.cjs → uninstall-c3zjum2o.cjs} +3 -3
  201. package/package.json +7 -7
  202. package/dist/daemonSupervisor-B-SPSqhs.cjs +0 -13
  203. package/dist/daemonSupervisor-C6urv3_8.mjs +0 -10
  204. 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,49 @@ 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({
460
+ type: z$1.literal("fail-operation"),
461
+ operationId: id$3,
462
+ machineId: id$3,
463
+ claimId: id$3,
464
+ error: text$1,
465
+ unknown: z$1.boolean().optional(),
466
+ /** B-775: a failed cleanup whose wrapper was already stopped (only resources retained). */
467
+ sessionStopped: z$1.boolean().optional()
468
+ }),
469
+ z$1.object({ type: z$1.literal("session-event"), sessionId: id$3, event: z$1.enum(["idle", "blocked", "exited"]) }),
470
+ 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
471
  ]);
463
- z$1.object({ requestId: id$2, action: TeamActionSchema });
472
+ z$1.object({ requestId: id$3, action: TeamActionSchema });
464
473
  const TeamProjectChoiceSchema = z$1.object({
465
- projectId: id$2.optional(),
466
- inheritFromSessionId: id$2.optional(),
474
+ projectId: id$3.optional(),
475
+ inheritFromSessionId: id$3.optional(),
467
476
  create: z$1.boolean().optional(),
468
477
  directory: z$1.string().min(1).max(4096).optional()
469
478
  });
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() });
479
+ 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
480
  z$1.object({
472
- projectId: id$2.nullable().optional(),
481
+ projectId: id$3.nullable().optional(),
473
482
  create: z$1.boolean().optional(),
474
- requestId: id$2.optional()
483
+ requestId: id$3.optional()
475
484
  }).refine((v) => v.projectId !== void 0 !== (v.create === true), "exactly one of projectId / create");
476
485
  const TEAM_WORKTREE = /\/teams\/worktrees\/([^/]+)(?:\/|$)/;
477
486
  function teamWorktreeId(path) {
@@ -488,7 +497,7 @@ function rebaseTeamWorktreePath(path, repository) {
488
497
  const rest = normalized.slice(match.index + match[0].length).replace(/\/+$/, "");
489
498
  return rest ? `${repository.replace(/\/+$/, "")}/${rest}` : repository;
490
499
  }
491
- const id$1 = z$1.string().min(1).max(128);
500
+ const id$2 = z$1.string().min(1).max(128);
492
501
  const text = z$1.string().min(1).max(32e3);
493
502
  const AUTOMATION_NAME_PATTERN = /^[a-z0-9][a-z0-9-_.]{0,63}$/;
494
503
  const AutomationNameSchema = z$1.string().regex(AUTOMATION_NAME_PATTERN, "automation name must match [a-z0-9][a-z0-9-_.]{0,63}");
@@ -497,6 +506,7 @@ const AUTOMATION_MAX_INTERVAL_MS = 366 * 864e5;
497
506
  const AUTOMATION_MAX_TIMESTAMP = 864e13;
498
507
  const AUTOMATION_PAYLOAD_MAX_BYTES = 65536;
499
508
  const AUTOMATION_SUMMARY_MAX_CHARS = 4096;
509
+ const AUTOMATION_ATTENTION_REASON_MAX_CHARS = 512;
500
510
  const AUTOMATION_DEFAULT_LEASE_MS = 6e4;
501
511
  const AUTOMATION_CLAIM_MAX_RUNS = 8;
502
512
  const AUTOMATION_PRECHECK_DEFAULT_TIMEOUT_MS = 6e4;
@@ -527,7 +537,7 @@ const AutomationActionSchema = z$1.discriminatedUnion("kind", [
527
537
  worktree: z$1.boolean().optional(),
528
538
  sticky: AutomationStickySchema.optional()
529
539
  }),
530
- z$1.object({ kind: z$1.literal("send"), sessionId: id$1, prompt: text }),
540
+ z$1.object({ kind: z$1.literal("send"), sessionId: id$2, prompt: text }),
531
541
  z$1.object({
532
542
  kind: z$1.literal("script"),
533
543
  command: z$1.array(z$1.string().min(1).max(4096)).min(1).max(256),
@@ -553,7 +563,7 @@ const maxRuntimeMs = z$1.number().int().min(6e4).max(7 * 864e5);
553
563
  z$1.object({
554
564
  name: AutomationNameSchema,
555
565
  description: z$1.string().max(4e3).nullable().optional(),
556
- machineId: id$1,
566
+ machineId: id$2,
557
567
  trigger: AutomationTriggerSchema,
558
568
  action: AutomationActionSchema,
559
569
  concurrency: AutomationConcurrencySchema.optional(),
@@ -562,13 +572,13 @@ z$1.object({
562
572
  /** B-548. Older servers strip it silently — clients must check the response echoes `precheck`. */
563
573
  precheck: AutomationPrecheckSchema.nullable().optional(),
564
574
  /** B-644: sessions this automation spawns join this project (quiet variant). Older servers strip it — check the echo. */
565
- projectId: id$1.nullable().optional()
575
+ projectId: id$2.nullable().optional()
566
576
  });
567
577
  z$1.object({
568
578
  version: z$1.number().int().positive(),
569
579
  name: AutomationNameSchema.optional(),
570
580
  description: z$1.string().max(4e3).nullable().optional(),
571
- machineId: id$1.optional(),
581
+ machineId: id$2.optional(),
572
582
  trigger: AutomationTriggerSchema.optional(),
573
583
  action: AutomationActionSchema.optional(),
574
584
  concurrency: AutomationConcurrencySchema.optional(),
@@ -576,41 +586,41 @@ z$1.object({
576
586
  /** B-548: omitted keeps the current precheck, `null` removes it. Changing `action` alone keeps it too. */
577
587
  precheck: AutomationPrecheckSchema.nullable().optional(),
578
588
  /** B-644: omitted keeps the current project, `null` detaches. */
579
- projectId: id$1.nullable().optional()
589
+ projectId: id$2.nullable().optional()
580
590
  });
581
591
  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
592
  z$1.object({ payload: payload.optional(), dedupeKey: z$1.string().min(1).max(256).optional() });
583
593
  z$1.object({ payload: payload.optional() });
584
594
  z$1.object({
585
- machineId: id$1,
595
+ machineId: id$2,
586
596
  limit: z$1.number().int().min(1).max(AUTOMATION_CLAIM_MAX_RUNS).optional(),
587
597
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional(),
588
598
  /** B-548: what this daemon can execute (e.g. `precheck`). Older daemons send nothing; older servers strip it. */
589
599
  capabilities: z$1.array(z$1.string().min(1).max(64)).max(32).optional()
590
600
  });
591
601
  z$1.object({
592
- claimId: id$1.optional(),
602
+ claimId: id$2.optional(),
593
603
  status: z$1.enum(["running", "done", "failed", "skipped"]).optional(),
594
- sessionId: id$1.nullable().optional(),
604
+ sessionId: id$2.nullable().optional(),
595
605
  stickyKey: z$1.string().min(1).max(512).optional(),
596
606
  summary: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
597
607
  error: z$1.string().max(AUTOMATION_SUMMARY_MAX_CHARS).nullable().optional(),
598
608
  exitCode: z$1.number().int().nullable().optional(),
599
609
  needsAttention: z$1.boolean().optional(),
600
- attentionReason: z$1.string().max(512).nullable().optional(),
610
+ attentionReason: z$1.string().max(AUTOMATION_ATTENTION_REASON_MAX_CHARS).nullable().optional(),
601
611
  leaseMs: z$1.number().int().min(5e3).max(36e5).optional()
602
612
  });
603
613
  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 });
614
+ z$1.object({ key: z$1.string().min(1).max(512), sessionId: id$2 });
605
615
  z$1.object({ key: z$1.string().min(1).max(512) });
606
616
  z$1.object({
607
- automationId: id$1.optional(),
617
+ automationId: id$2.optional(),
608
618
  name: AutomationNameSchema.optional(),
609
619
  status: z$1.string().min(1).max(64).optional(),
610
620
  attention: z$1.enum(["1", "true", "0", "false"]).optional(),
611
621
  limit: z$1.coerce.number().int().min(1).max(200).optional()
612
622
  });
613
- z$1.object({ machineId: id$1.optional() });
623
+ z$1.object({ machineId: id$2.optional() });
614
624
  const PROJECT_SESSION_CAPABILITY = "project-v1";
615
625
  const PROJECT_LIMITS = {
616
626
  nameChars: 120,
@@ -622,11 +632,11 @@ const PROJECT_LIMITS = {
622
632
  messageBytes: 64 * 1024,
623
633
  presenceBatch: 200,
624
634
  memberBatch: 200};
625
- const id = z$1.string().min(1).max(128);
635
+ const id$1 = z$1.string().min(1).max(128);
626
636
  const utf8Bytes = (value) => new TextEncoder().encode(value).length;
627
637
  const boundedText = (maxBytes) => z$1.string().max(maxBytes).refine((v) => utf8Bytes(v) <= maxBytes, `exceeds ${maxBytes} bytes`);
628
638
  const ProjectFolderSchema = z$1.object({
629
- machineId: id,
639
+ machineId: id$1,
630
640
  path: z$1.string().min(1).max(4096),
631
641
  primary: z$1.boolean().optional()
632
642
  });
@@ -646,9 +656,9 @@ z$1.object({
646
656
  folders: z$1.array(ProjectFolderSchema).max(PROJECT_LIMITS.folders).optional(),
647
657
  defaults: ProjectDefaultsSchema.optional(),
648
658
  /** Idempotency: the same requestId returns the project it created. */
649
- requestId: id.optional(),
659
+ requestId: id$1.optional(),
650
660
  /** Optional initial members (e.g. "设为项目" moves a folder's sessions in one step). */
651
- sessionIds: z$1.array(id).max(PROJECT_LIMITS.memberBatch).optional()
661
+ sessionIds: z$1.array(id$1).max(PROJECT_LIMITS.memberBatch).optional()
652
662
  });
653
663
  z$1.object({
654
664
  name: z$1.string().trim().min(1).max(PROJECT_LIMITS.nameChars).optional(),
@@ -664,7 +674,7 @@ z$1.object({
664
674
  summary: z$1.string().max(200).optional()
665
675
  });
666
676
  z$1.object({
667
- sessionIds: z$1.array(id).min(1).max(PROJECT_LIMITS.memberBatch),
677
+ sessionIds: z$1.array(id$1).min(1).max(PROJECT_LIMITS.memberBatch),
668
678
  via: ProjectMemberViaInputSchema.optional()
669
679
  });
670
680
  z$1.object({
@@ -674,15 +684,15 @@ z$1.object({
674
684
  /** Entry id (or `#seq`) this entry replaces. */
675
685
  supersedes: z$1.string().min(1).max(128).optional(),
676
686
  /** Stamped by the wrapper (the agent cannot fill it). Absent = written by the user. */
677
- authorSessionId: id.optional()
687
+ authorSessionId: id$1.optional()
678
688
  });
679
689
  z$1.object({
680
690
  /** When set, only entries this session authored may be revoked. Absent = the owner. */
681
- bySessionId: id.optional()
691
+ bySessionId: id$1.optional()
682
692
  });
683
- z$1.object({ teamId: id });
693
+ z$1.object({ teamId: id$1 });
684
694
  const ProjectPresenceEntrySchema = z$1.object({
685
- sessionId: id,
695
+ sessionId: id$1,
686
696
  title: z$1.string().max(200).nullable().optional(),
687
697
  agent: z$1.string().max(64).nullable().optional(),
688
698
  machine: z$1.string().max(200).nullable().optional(),
@@ -694,19 +704,19 @@ const ProjectPresenceEntrySchema = z$1.object({
694
704
  capabilities: z$1.array(z$1.string().max(64)).max(32).optional()
695
705
  });
696
706
  z$1.object({
697
- machineId: id,
707
+ machineId: id$1,
698
708
  sessions: z$1.array(ProjectPresenceEntrySchema).max(PROJECT_LIMITS.presenceBatch),
699
709
  /** Sessions of this machine that stopped; their presence rows are marked `offline`. */
700
- gone: z$1.array(id).max(PROJECT_LIMITS.presenceBatch).optional()
710
+ gone: z$1.array(id$1).max(PROJECT_LIMITS.presenceBatch).optional()
701
711
  });
702
712
  z$1.object({
703
- fromSessionId: id,
704
- toSessionId: id,
713
+ fromSessionId: id$1,
714
+ toSessionId: id$1,
705
715
  body: boundedText(PROJECT_LIMITS.messageBytes).pipe(z$1.string().min(1))
706
716
  });
707
717
  z$1.object({
708
- sessionId: id,
709
- messageIds: z$1.array(id).min(1).max(100)
718
+ sessionId: id$1,
719
+ messageIds: z$1.array(id$1).min(1).max(100)
710
720
  });
711
721
  z$1.object({
712
722
  full: z$1.enum(["0", "1", "true", "false"]).optional(),
@@ -745,9 +755,9 @@ function object(value) {
745
755
  function stamp(value) {
746
756
  return typeof value === "number" && Number.isFinite(value) && value >= 0;
747
757
  }
748
- function parseBuiltinTodo(raw, key) {
758
+ function parseBuiltinTodo(raw, key2) {
749
759
  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;
760
+ if (key2 !== void 0 && key2 !== BUILTIN_TODO_PREFIX + raw.id) return null;
751
761
  if (typeof raw.title !== "string" || !raw.title.trim() || raw.title.length > TITLE_MAX_LENGTH) return null;
752
762
  if (typeof raw.note !== "string" || raw.note.length > NOTE_MAX_LENGTH) return null;
753
763
  if (raw.status !== "open" && raw.status !== "done") return null;
@@ -772,11 +782,11 @@ function encodeBuiltinTodo(todo) {
772
782
  for (const byte of bytes) binary += String.fromCharCode(byte);
773
783
  return btoa(binary);
774
784
  }
775
- function decodeBuiltinTodo(value, key) {
785
+ function decodeBuiltinTodo(value, key2) {
776
786
  try {
777
787
  const binary = atob(value);
778
788
  const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
779
- return parseBuiltinTodo(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)), key);
789
+ return parseBuiltinTodo(JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes)), key2);
780
790
  } catch {
781
791
  return null;
782
792
  }
@@ -784,12 +794,12 @@ function decodeBuiltinTodo(value, key) {
784
794
  function sortBuiltinTodos(records) {
785
795
  return [...records].sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
786
796
  }
787
- function createBuiltinTodoClient(credentials, options) {
788
- const serverUrl = options.serverUrl.replace(/\/$/, "");
797
+ function createBuiltinTodoClient(credentials, options2) {
798
+ const serverUrl = options2.serverUrl.replace(/\/$/, "");
789
799
  const token = credentials.token;
790
- const clientId = options.clientId;
791
- const fetcher = options.fetch ?? globalThis.fetch.bind(globalThis);
792
- const timeoutMs = options.timeoutMs ?? 15e3;
800
+ const clientId = options2.clientId;
801
+ const fetcher = options2.fetch ?? globalThis.fetch.bind(globalThis);
802
+ const timeoutMs = options2.timeoutMs ?? 15e3;
793
803
  async function request(path, mutations, allowNotFound = false) {
794
804
  const controller = new AbortController();
795
805
  const timer = setTimeout(() => controller.abort(), timeoutMs);
@@ -868,19 +878,19 @@ function createBuiltinTodoClient(credentials, options) {
868
878
  const pendingCreates = /* @__PURE__ */ new Map();
869
879
  async function get(id2) {
870
880
  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);
881
+ const key2 = BUILTIN_TODO_PREFIX + id2;
882
+ const raw = await request(`/v1/kv/${encodeURIComponent(key2)}`, void 0, true);
873
883
  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) {
884
+ const todo = object(raw) && typeof raw.value === "string" ? decodeBuiltinTodo(raw.value, key2) : null;
885
+ if (!todo || !object(raw) || raw.key !== key2 || !Number.isSafeInteger(raw.version) || raw.version < 0) {
876
886
  throw new BuiltinTodoError("invalid-response", "Invalid Todo read response");
877
887
  }
878
888
  return { ...todo, version: raw.version };
879
889
  }
880
- async function create(title, note = "", id2) {
881
- const cleanTitle = title.trim();
890
+ async function create(title2, note2 = "", id2) {
891
+ const cleanTitle = title2.trim();
882
892
  if (id2 !== void 0 && !UUID.test(id2)) throw new BuiltinTodoError("validation", "Invalid Todo ID");
883
- const payloadKey = JSON.stringify([cleanTitle, note, id2]);
893
+ const payloadKey = JSON.stringify([cleanTitle, note2, id2]);
884
894
  let pending = pendingCreates.get(payloadKey);
885
895
  if (pending?.operation) return pending.operation;
886
896
  if (!pending) {
@@ -889,7 +899,7 @@ function createBuiltinTodoClient(credentials, options) {
889
899
  schemaVersion: 1,
890
900
  id: id2 ?? crypto.randomUUID(),
891
901
  title: cleanTitle,
892
- note,
902
+ note: note2,
893
903
  status: "open",
894
904
  order: 0,
895
905
  createdAt: now,
@@ -902,14 +912,14 @@ function createBuiltinTodoClient(credentials, options) {
902
912
  const entry = pending;
903
913
  const operation = (async () => {
904
914
  if (entry.attempted) {
905
- const key = BUILTIN_TODO_PREFIX + entry.draft.id;
906
- const existing = await request(`/v1/kv/${encodeURIComponent(key)}`, void 0, true);
915
+ const key2 = BUILTIN_TODO_PREFIX + entry.draft.id;
916
+ const existing = await request(`/v1/kv/${encodeURIComponent(key2)}`, void 0, true);
907
917
  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) {
918
+ const todo = object(existing) && typeof existing.value === "string" ? decodeBuiltinTodo(existing.value, key2) : null;
919
+ if (!todo || !object(existing) || existing.key !== key2 || !Number.isSafeInteger(existing.version) || existing.version < 0) {
910
920
  throw new BuiltinTodoError("invalid-response", "Cannot confirm the previous Todo creation");
911
921
  }
912
- if (id2 && (todo.title !== cleanTitle || todo.note !== note)) throw new BuiltinTodoError("conflict", "This Todo ID already has different content; read it before deciding");
922
+ if (id2 && (todo.title !== cleanTitle || todo.note !== note2)) throw new BuiltinTodoError("conflict", "This Todo ID already has different content; read it before deciding");
913
923
  return { ...todo, version: existing.version };
914
924
  }
915
925
  }
@@ -1152,5 +1162,195 @@ const ServerMigrateNoticeSchema = z$1.object({
1152
1162
  handoff: z$1.string().regex(/^vh1\.[A-Za-z0-9_-]{16,2048}\.[A-Za-z0-9_-]{43}$/),
1153
1163
  issuedAt: z$1.number().int().positive()
1154
1164
  });
1165
+ const ATTENTION_SESSION_CAPABILITY = "owner-board-v1";
1166
+ const ATTENTION_DISABLED_ERROR = "owner_board_disabled";
1167
+ const ATTENTION_LIMITS = {
1168
+ titleChars: 120,
1169
+ bodyBytes: 8 * 1024,
1170
+ keyChars: 256,
1171
+ options: { min: 2, max: 4 },
1172
+ optionIdChars: 16,
1173
+ optionLabelChars: 120,
1174
+ optionDetailChars: 1e3,
1175
+ links: 16,
1176
+ linkRefChars: 2048,
1177
+ linkLabelChars: 120,
1178
+ snippetChars: 200,
1179
+ noteChars: 2e3,
1180
+ listMax: 200,
1181
+ /** Open `needsOwner` items per session before the playbook asks the lead to merge or drop stale ones (§5.1 rule 6). */
1182
+ openPerSessionSoftCap: 5
1183
+ };
1184
+ const ATTENTION_SOURCES = ["lead", "agent", "owner", "automation", "team"];
1185
+ const ATTENTION_KINDS = ["decision", "todo", "blocked", "report", "answer", "question", "request", "pin"];
1186
+ const OWNER_BOARD_POST_KINDS = ["decision", "todo", "report", "answer"];
1187
+ const OWNER_BOARD_RESOLVE_OUTCOMES = ["done", "answered", "dropped", "superseded"];
1188
+ const ATTENTION_BOARD_LOCAL_ID_PREFIX = "board-";
1189
+ function isAttentionBoardLocalId(localId) {
1190
+ return typeof localId === "string" && localId.startsWith(ATTENTION_BOARD_LOCAL_ID_PREFIX);
1191
+ }
1192
+ const id = z$1.string().min(1).max(128);
1193
+ const title = z$1.string().trim().min(1).max(ATTENTION_LIMITS.titleChars);
1194
+ const bodyMd = z$1.string().max(ATTENTION_LIMITS.bodyBytes * 4).refine((v) => new TextEncoder().encode(v).length <= ATTENTION_LIMITS.bodyBytes, "body exceeds 8KB");
1195
+ const note = z$1.string().max(ATTENTION_LIMITS.noteChars);
1196
+ const requestId = z$1.string().min(1).max(128);
1197
+ const key = z$1.string().min(1).max(ATTENTION_LIMITS.keyChars);
1198
+ const AttentionOptionSchema = z$1.object({
1199
+ id: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars),
1200
+ label: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionLabelChars),
1201
+ detail: z$1.string().max(ATTENTION_LIMITS.optionDetailChars).optional(),
1202
+ recommended: z$1.boolean().optional()
1203
+ });
1204
+ 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");
1205
+ const ATTENTION_LINK_TYPES = ["task", "pr", "commit", "url", "panel"];
1206
+ const AttentionLinkSchema = z$1.object({
1207
+ type: z$1.enum(ATTENTION_LINK_TYPES),
1208
+ ref: z$1.string().trim().min(1).max(ATTENTION_LIMITS.linkRefChars),
1209
+ label: z$1.string().max(ATTENTION_LIMITS.linkLabelChars).optional()
1210
+ });
1211
+ const links = z$1.array(AttentionLinkSchema).max(ATTENTION_LIMITS.links);
1212
+ const AttentionAnchorSchema = z$1.object({
1213
+ localId: z$1.string().min(1).max(256).optional(),
1214
+ messageId: z$1.string().min(1).max(128).optional(),
1215
+ snippet: z$1.string().max(ATTENTION_LIMITS.snippetChars).optional()
1216
+ }).refine((a) => a.localId !== void 0 || a.messageId !== void 0, "anchor needs localId or messageId");
1217
+ const AttentionItemSchema = z$1.object({
1218
+ id: z$1.string(),
1219
+ sessionId: z$1.string(),
1220
+ teamId: z$1.string().nullable(),
1221
+ projectId: z$1.string().nullable(),
1222
+ source: z$1.string(),
1223
+ kind: z$1.string(),
1224
+ key: z$1.string().nullable(),
1225
+ title: z$1.string(),
1226
+ bodyMd: z$1.string().nullable(),
1227
+ options: z$1.array(AttentionOptionSchema.passthrough()).nullable(),
1228
+ links: z$1.array(z$1.object({ type: z$1.string(), ref: z$1.string(), label: z$1.string().optional() }).passthrough()).nullable(),
1229
+ anchor: z$1.object({ localId: z$1.string().optional(), messageId: z$1.string().optional(), snippet: z$1.string().optional() }).nullable(),
1230
+ /** The lead's first in-stream reply to an owner question (auto-attached by the CLI, §4.4). */
1231
+ firstReply: z$1.object({ localId: z$1.string().optional(), messageId: z$1.string().optional(), snippet: z$1.string().optional() }).nullable(),
1232
+ replyToId: z$1.string().nullable(),
1233
+ /** D5: drafted by the CLI from the lead's text (「自动识别」), not posted by the lead. No push until the lead confirms it. */
1234
+ inferred: z$1.boolean().default(false),
1235
+ needsOwner: z$1.boolean(),
1236
+ state: z$1.string(),
1237
+ ownerChoice: z$1.string().nullable(),
1238
+ ownerNote: z$1.string().nullable(),
1239
+ resolvedBy: z$1.string().nullable(),
1240
+ /** The lead's `owner_board_resolve` note. */
1241
+ resolveNote: z$1.string().nullable(),
1242
+ /** Times the same `(sessionId, key)` was posted again and folded into this item. */
1243
+ repostCount: z$1.number(),
1244
+ createdAt: z$1.number(),
1245
+ updatedAt: z$1.number(),
1246
+ resolvedAt: z$1.number().nullable(),
1247
+ pushedAt: z$1.number().nullable(),
1248
+ /** Bumped on every mutation; clients keep the highest version per id. */
1249
+ version: z$1.number()
1250
+ });
1251
+ z$1.object({
1252
+ t: z$1.literal("attention-item"),
1253
+ item: AttentionItemSchema
1254
+ });
1255
+ z$1.object({
1256
+ sessionId: id,
1257
+ source: z$1.enum(ATTENTION_SOURCES),
1258
+ kind: z$1.enum(ATTENTION_KINDS),
1259
+ title,
1260
+ bodyMd: bodyMd.optional(),
1261
+ options: options.optional(),
1262
+ links: links.optional(),
1263
+ anchor: AttentionAnchorSchema.optional(),
1264
+ replyToId: id.optional(),
1265
+ key: key.optional(),
1266
+ requestId: requestId.optional(),
1267
+ /**
1268
+ * D5 draft: only the CLI's auto-detect path sets it (`owner_board_post` does
1269
+ * not expose it). A repost of the key with `false` confirms the draft (and
1270
+ * pushes once); a draft never downgrades a confirmed item.
1271
+ */
1272
+ inferred: z$1.boolean().default(false)
1273
+ }).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
1274
+ z$1.object({
1275
+ title: title.optional(),
1276
+ bodyMd: bodyMd.nullable().optional(),
1277
+ appendMd: bodyMd.optional(),
1278
+ options: options.nullable().optional(),
1279
+ links: links.nullable().optional(),
1280
+ /** Only `question` → `request` (the lead reclassifies an owner message, §4.4). */
1281
+ kind: z$1.literal("request").optional(),
1282
+ state: z$1.enum(["open", "in_progress", "answered"]).optional(),
1283
+ firstReply: AttentionAnchorSchema.optional(),
1284
+ requestId: requestId.optional()
1285
+ }).refine((p) => !(p.bodyMd !== void 0 && p.appendMd !== void 0), "use bodyMd or appendMd, not both");
1286
+ z$1.object({
1287
+ outcome: z$1.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
1288
+ note: note.optional(),
1289
+ /** Defaults to `lead`. */
1290
+ by: z$1.enum(["lead", "auto-first-reply"]).optional(),
1291
+ requestId: requestId.optional()
1292
+ });
1293
+ z$1.discriminatedUnion("action", [
1294
+ z$1.object({ action: z$1.literal("choose"), choice: z$1.string().trim().min(1).max(ATTENTION_LIMITS.optionIdChars), note: note.optional() }),
1295
+ z$1.object({ action: z$1.literal("resolve"), note: note.optional() }),
1296
+ z$1.object({ action: z$1.literal("reopen"), note: note.optional() })
1297
+ ]);
1298
+ z$1.object({
1299
+ sessionId: id.optional(),
1300
+ /** `open` (default) = open + in_progress; `active` adds the latest `answered`; `all` = everything. */
1301
+ state: z$1.enum(["open", "active", "all"]).optional(),
1302
+ needsOwner: z$1.enum(["1", "true", "0", "false"]).optional(),
1303
+ /** Epoch ms; only items updated after it. */
1304
+ since: z$1.coerce.number().int().nonnegative().optional(),
1305
+ limit: z$1.coerce.number().int().min(1).max(ATTENTION_LIMITS.listMax).optional()
1306
+ });
1307
+ const OwnerBoardPostInputSchema = z$1.object({
1308
+ kind: z$1.enum(OWNER_BOARD_POST_KINDS),
1309
+ title,
1310
+ body_md: bodyMd.optional(),
1311
+ options: options.optional(),
1312
+ links: links.optional(),
1313
+ reply_to: id.optional(),
1314
+ key: key.optional(),
1315
+ anchor: z$1.union([z$1.literal("this_turn"), z$1.object({ localId: z$1.string().min(1).max(256) })]).optional(),
1316
+ request_id: requestId
1317
+ }).refine((p) => p.kind !== "decision" || p.options !== void 0, { message: "decision needs 2-4 options", path: ["options"] });
1318
+ const OwnerBoardUpdateInputSchema = z$1.object({
1319
+ id,
1320
+ title: title.optional(),
1321
+ body_md: bodyMd.optional(),
1322
+ append_md: bodyMd.optional(),
1323
+ options: options.optional(),
1324
+ links: links.optional(),
1325
+ state: z$1.enum(["open", "in_progress"]).optional(),
1326
+ request_id: requestId
1327
+ }).refine((p) => !(p.body_md !== void 0 && p.append_md !== void 0), "use body_md or append_md, not both");
1328
+ const OwnerBoardResolveInputSchema = z$1.object({
1329
+ id,
1330
+ outcome: z$1.enum(OWNER_BOARD_RESOLVE_OUTCOMES),
1331
+ note: note.optional(),
1332
+ request_id: requestId
1333
+ });
1334
+ const OwnerBoardListInputSchema = z$1.object({
1335
+ state: z$1.enum(["open", "all"]).optional(),
1336
+ /** ISO-8601 or epoch ms. */
1337
+ since: z$1.string().min(1).max(64).optional()
1338
+ });
1339
+ function ownerBoardPostToRest(sessionId, input, anchor) {
1340
+ return {
1341
+ sessionId,
1342
+ source: "lead",
1343
+ kind: input.kind,
1344
+ title: input.title,
1345
+ ...input.body_md !== void 0 ? { bodyMd: input.body_md } : {},
1346
+ ...input.options ? { options: input.options } : {},
1347
+ ...input.links ? { links: input.links } : {},
1348
+ ...anchor ? { anchor } : {},
1349
+ ...input.reply_to ? { replyToId: input.reply_to } : {},
1350
+ ...input.key ? { key: input.key } : {},
1351
+ requestId: input.request_id,
1352
+ inferred: false
1353
+ };
1354
+ }
1155
1355
 
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 };
1356
+ 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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var _package = require('./package-BfeqAzyJ.cjs');
3
+ var _package = require('./package-DczR1k0c.cjs');
4
4
  var module$1 = require('node:module');
5
5
  var node_fs = require('node:fs');
6
6
  var promises = require('node:fs/promises');
@@ -59,10 +59,10 @@ async function pruneStaleCompileCaches(happyHomeDir, cliVersion) {
59
59
  async function run(args) {
60
60
  enableCompileCacheIfPossible(_package.packageJson.version);
61
61
  if (isStandaloneVersionRequest(args) || isSelfCheckRequest(args)) {
62
- const { selfCheckMain } = await Promise.resolve().then(function () { return require('./selfCheck-B-yy6bW3.cjs'); });
62
+ const { selfCheckMain } = await Promise.resolve().then(function () { return require('./selfCheck-Bel50SH3.cjs'); });
63
63
  process.exit(await selfCheckMain({ verbose: isSelfCheckRequest(args) }));
64
64
  }
65
- const { main } = await Promise.resolve().then(function () { return require('./main-DUXh2rgW.cjs'); });
65
+ const { main } = await Promise.resolve().then(function () { return require('./main-BWgWN5d1.cjs'); });
66
66
  await main();
67
67
  }
68
68
  void run(process.argv.slice(2));