@qqbrowser/openclaw-qbot 0.0.142 → 0.0.144

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 (257) hide show
  1. package/dist/{agents-Bpp_F5In.js → agents-D3Z05GqK.js} +2 -2
  2. package/dist/{agents.config-DfIJAGcd.js → agents.config-BUQjISaN.js} +2 -2
  3. package/dist/{agents.config-B6LRG9eP.js → agents.config-BvxrGqOT.js} +2 -2
  4. package/dist/{auth-choice-DvTApGhx.js → auth-choice-CYGzLW73.js} +2 -2
  5. package/dist/{auth-choice-EQdNd7jO.js → auth-choice-DJn6683d.js} +2 -2
  6. package/dist/{banner-9u45RL26.js → banner-xQa2kS6O.js} +2 -2
  7. package/dist/build-info.json +3 -3
  8. package/dist/bundled/boot-md/handler.js +1 -1
  9. package/dist/bundled/session-memory/handler.js +1 -1
  10. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  11. package/dist/{channel-options-D2syI791.js → channel-options-BurUBfoY.js} +2 -2
  12. package/dist/{channel-options-CEIzjOno.js → channel-options-Ce8uNnAp.js} +2 -2
  13. package/dist/{channel-web-BrElpZAc.js → channel-web-D5TgFlMz.js} +2 -2
  14. package/dist/{channel-web-CxHbET4B.js → channel-web-D7FkrASC.js} +2 -2
  15. package/dist/{channels-cli-BmAJuuRs.js → channels-cli-BfzZrnkt.js} +2 -2
  16. package/dist/{channels-cli-Dgosczr6.js → channels-cli-DFI6F6G0.js} +2 -2
  17. package/dist/{cli-D8T2tphD.js → cli-CMLvfh6N.js} +2 -2
  18. package/dist/{cli-BcnoCo4z.js → cli-MTpYYgjl.js} +2 -2
  19. package/dist/{command-registry-CfuXCRwV.js → command-registry-CSBvrqwW.js} +2 -2
  20. package/dist/{compact-Dg66DXx_.js → compact-BEeB6bwq.js} +7 -7
  21. package/dist/{compact.runtime-3mTLUPqu.js → compact.runtime-BC7F7HPJ.js} +1 -1
  22. package/dist/{compact.runtime-DcTdUW4o.js → compact.runtime-BTUQRS-2.js} +1 -1
  23. package/dist/{compact.runtime-Bhewj5vA.js → compact.runtime-C0GyLWem.js} +1 -1
  24. package/dist/{compact.runtime-XXtYlNJN.js → compact.runtime-CrOFsO5D.js} +1 -1
  25. package/dist/{completion-cli-BZi4nuQb.js → completion-cli-Bizog38J.js} +2 -2
  26. package/dist/{completion-cli-C40TWdsv.js → completion-cli-W1_FoDFF.js} +2 -2
  27. package/dist/{config-cli-CBte2b1h.js → config-cli-B9hEiZsw.js} +2 -2
  28. package/dist/{config-cli-1ojSLwAj.js → config-cli-BNTGUqL_.js} +2 -2
  29. package/dist/{configure-kod4tmZa.js → configure-DForkh7R.js} +2 -2
  30. package/dist/{configure-DJrNDEpR.js → configure-DR77VUCy.js} +2 -2
  31. package/dist/{deps-send-whatsapp.runtime-C4O9crnk.js → deps-send-whatsapp.runtime-BuIiTn5n.js} +1 -1
  32. package/dist/{deps-send-whatsapp.runtime-5Lot99zq.js → deps-send-whatsapp.runtime-C4hGmfeP.js} +1 -1
  33. package/dist/{deps-send-whatsapp.runtime-LiNvHd_E.js → deps-send-whatsapp.runtime-CYlLppMS.js} +1 -1
  34. package/dist/{deps-send-whatsapp.runtime-Bg-_kVX6.js → deps-send-whatsapp.runtime-FY-HuZ5S.js} +1 -1
  35. package/dist/{doctor-completion-BJ6steqx.js → doctor-completion-Da0cocZX.js} +2 -2
  36. package/dist/{doctor-completion-DMJhfrtC.js → doctor-completion-DpCWb88H.js} +2 -2
  37. package/dist/entry.js +1 -1
  38. package/dist/extensionAPI.js +1 -1
  39. package/dist/{gateway-cli-CKu0FA7D.js → gateway-cli-C4YOlz3m.js} +6 -6
  40. package/dist/{gateway-cli-C_s9eMlC.js → gateway-cli-D78GfbjG.js} +6 -6
  41. package/dist/{health-PaRHFItm.js → health-DBu0V1Y-.js} +2 -2
  42. package/dist/{health-BgOggK9k.js → health-RQzDNQwf.js} +2 -2
  43. package/dist/{hooks-cli-CsBrScq0.js → hooks-cli-B3eDoEHO.js} +2 -2
  44. package/dist/{hooks-cli-BzyzTNBx.js → hooks-cli-xgORhqZ2.js} +2 -2
  45. package/dist/index.js +2 -2
  46. package/dist/llm-slug-generator.js +1 -1
  47. package/dist/{models-C_Vg3Cty.js → models-BEO5lvkx.js} +2 -2
  48. package/dist/{models-cli-CDZliTXq.js → models-cli-BbcJ6A0F.js} +2 -2
  49. package/dist/{models-cli-bGr8jwAb.js → models-cli-Dacwv6BY.js} +2 -2
  50. package/dist/{npm-resolution-DWPloph4.js → npm-resolution-Bui58Ks1.js} +2 -2
  51. package/dist/{npm-resolution-BnJGLwhi.js → npm-resolution-Ct6MRtq6.js} +2 -2
  52. package/dist/{onboard-B0BNCQaO.js → onboard-2iF3lTUI.js} +3 -3
  53. package/dist/{onboard-CjVhdaiR.js → onboard-B9ouFJC7.js} +3 -3
  54. package/dist/{onboard-channels-CZK_7xMR.js → onboard-channels-BXReNh4B.js} +2 -2
  55. package/dist/{onboard-channels-BMIOddLN.js → onboard-channels-CjXCpXI-.js} +2 -2
  56. package/dist/{onboarding-B6ixWwgp.js → onboarding-BTBbx6Ka.js} +2 -2
  57. package/dist/{onboarding-ouEqUuUr.js → onboarding-TkoOoq9D.js} +2 -2
  58. package/dist/{onboarding.finalize-Bgat5Npc.js → onboarding.finalize-C9QGFQpa.js} +2 -2
  59. package/dist/{onboarding.finalize-DsMVlTcH.js → onboarding.finalize-CwjLMPKK.js} +2 -2
  60. package/dist/{pi-embedded-BZSn84Bh.js → pi-embedded-B_6OtP8m.js} +7 -7
  61. package/dist/{pi-embedded-Dsz7p3MF.js → pi-embedded-DjX-gdoY.js} +7 -7
  62. package/dist/{plugin-registry-CIBiHZH1.js → plugin-registry-CI5K3iWc.js} +2 -2
  63. package/dist/{plugin-registry-C6dY-Et7.js → plugin-registry-CYlBYbc8.js} +2 -2
  64. package/dist/plugin-sdk/{channel-web-9zn1Itpg.cjs → channel-web-BSUPSLCU.cjs} +2 -2
  65. package/dist/plugin-sdk/{channel-web-4ZQVqsrt.js → channel-web-CeSPyNTh.js} +2 -2
  66. package/dist/plugin-sdk/{channel-web-BrB00HKH.js → channel-web-Cptth4mc.js} +2 -2
  67. package/dist/plugin-sdk/{channel-web-DN5La-Ol.cjs → channel-web-D4x22KPN.cjs} +2 -2
  68. package/dist/plugin-sdk/{compact.runtime-8oUv1ld1.cjs → compact.runtime-BDgWntMu.cjs} +1 -1
  69. package/dist/plugin-sdk/{compact.runtime-CmJayEYX.js → compact.runtime-BJFMaTF4.js} +1 -1
  70. package/dist/plugin-sdk/{compact.runtime-BjJCBESR.cjs → compact.runtime-BWadwUyE.cjs} +1 -1
  71. package/dist/plugin-sdk/{compact.runtime-ALKRoVEG.js → compact.runtime-Bfu2rMai.js} +1 -1
  72. package/dist/plugin-sdk/{compact.runtime-DBlESOSV.cjs → compact.runtime-Cg47oUHq.cjs} +1 -1
  73. package/dist/plugin-sdk/{compact.runtime-Dmc0G6Yn.js → compact.runtime-CqK86P7R.js} +1 -1
  74. package/dist/plugin-sdk/{compact.runtime-Chumwp0K.cjs → compact.runtime-CqrB25-A.cjs} +1 -1
  75. package/dist/plugin-sdk/{compact.runtime-Ddfxp3fz.js → compact.runtime-DeATtENL.js} +1 -1
  76. package/dist/plugin-sdk/{compact.runtime-C_dc78Lp.cjs → compact.runtime-GMu30Jmw.cjs} +1 -1
  77. package/dist/plugin-sdk/{compact.runtime-ZrApPcrV.js → compact.runtime-YFzugj-k.js} +1 -1
  78. package/dist/plugin-sdk/{compact.runtime-BF4SCZ-5.js → compact.runtime-a8Z4_6wu.js} +1 -1
  79. package/dist/plugin-sdk/{compact.runtime-CbzQiVEW.cjs → compact.runtime-jGNfnpo2.cjs} +1 -1
  80. package/dist/plugin-sdk/compat.cjs +1 -1
  81. package/dist/plugin-sdk/compat.js +1 -1
  82. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BEDFRjff.js → deps-send-whatsapp.runtime-23E2Ab5R.js} +1 -1
  83. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-QY0XTSgX.cjs → deps-send-whatsapp.runtime-B1oA3XBA.cjs} +1 -1
  84. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Du_3Rw7K.cjs → deps-send-whatsapp.runtime-C8q_3sOf.cjs} +1 -1
  85. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DMeaTnvE.cjs → deps-send-whatsapp.runtime-CsebM75z.cjs} +1 -1
  86. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-CrVVnzLl.js → deps-send-whatsapp.runtime-D3mYdwaT.js} +1 -1
  87. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DR4rvUQL.js → deps-send-whatsapp.runtime-DDwUEbJ8.js} +1 -1
  88. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BULlOkpi.cjs → deps-send-whatsapp.runtime-Di3p_3Eh.cjs} +1 -1
  89. package/dist/plugin-sdk/{deps-send-whatsapp.runtime--uXLMs1C.js → deps-send-whatsapp.runtime-JzRD4jTI.js} +1 -1
  90. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BRjb9631.cjs → deps-send-whatsapp.runtime-gEp895yA.cjs} +1 -1
  91. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-VQXeRmRl.js → deps-send-whatsapp.runtime-iV5E6CHf.js} +1 -1
  92. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-2Us9O7dL.cjs → deps-send-whatsapp.runtime-k0yGrhs2.cjs} +1 -1
  93. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BfV5Q2fx.js → deps-send-whatsapp.runtime-v3sqBoDg.js} +1 -1
  94. package/dist/plugin-sdk/{dispatch-C2YTqGlf.js → dispatch-3PrSaGZi.js} +7 -7
  95. package/dist/plugin-sdk/{dispatch-DHbSBeFJ.js → dispatch-Bcf1uPHo.js} +7 -7
  96. package/dist/plugin-sdk/{dispatch-SWyfAZT0.cjs → dispatch-BgGE9usQ.cjs} +7 -7
  97. package/dist/plugin-sdk/{dispatch-BYlcmJ9u.js → dispatch-BhUN9ZDP.js} +7 -7
  98. package/dist/plugin-sdk/{dispatch-DK5ub8qa.cjs → dispatch-C3k8j6Zb.cjs} +7 -7
  99. package/dist/plugin-sdk/{dispatch-DCSwqteL.js → dispatch-C_gJPvbD.js} +7 -7
  100. package/dist/plugin-sdk/{dispatch-5v3v8zzA.js → dispatch-Df8B7owq.js} +7 -7
  101. package/dist/plugin-sdk/{dispatch-CNy3g9ma.cjs → dispatch-YK0qHNtb.cjs} +7 -7
  102. package/dist/plugin-sdk/{dispatch-B6UbZCpL.cjs → dispatch-_fZDA253.cjs} +7 -7
  103. package/dist/plugin-sdk/{dispatch-mR2vLkGa.cjs → dispatch-wEH2eS4y.cjs} +7 -7
  104. package/dist/plugin-sdk/index.cjs +1 -1
  105. package/dist/plugin-sdk/index.js +1 -1
  106. package/dist/plugin-sdk/irc.cjs +1 -1
  107. package/dist/plugin-sdk/irc.js +1 -1
  108. package/dist/plugin-sdk/matrix.cjs +1 -1
  109. package/dist/plugin-sdk/matrix.js +1 -1
  110. package/dist/plugin-sdk/msteams.cjs +1 -1
  111. package/dist/plugin-sdk/msteams.js +1 -1
  112. package/dist/plugin-sdk/nextcloud-talk.cjs +1 -1
  113. package/dist/plugin-sdk/nextcloud-talk.js +1 -1
  114. package/dist/plugin-sdk/{reply-0zCEbT4w.cjs → reply-BoWg-IXT.cjs} +7 -7
  115. package/dist/plugin-sdk/{reply-D-f2bbXy.js → reply-bS9U9BwG.js} +7 -7
  116. package/dist/plugin-sdk/{slash-dispatch.runtime-CNhhOTEP.js → slash-dispatch.runtime-4y3z-kPo.js} +1 -1
  117. package/dist/plugin-sdk/{slash-dispatch.runtime-B3b2L4iH.js → slash-dispatch.runtime-BRr9YGOs.js} +1 -1
  118. package/dist/plugin-sdk/{slash-dispatch.runtime-CPPp4KKH.cjs → slash-dispatch.runtime-BtdMVJQe.cjs} +1 -1
  119. package/dist/plugin-sdk/{slash-dispatch.runtime-Dw9M-fvv.js → slash-dispatch.runtime-C6iak1_0.js} +1 -1
  120. package/dist/plugin-sdk/{slash-dispatch.runtime-BoTYqNiv.js → slash-dispatch.runtime-CMx727dE.js} +1 -1
  121. package/dist/plugin-sdk/{slash-dispatch.runtime-CaWoVNJu.cjs → slash-dispatch.runtime-CXXaAMYa.cjs} +1 -1
  122. package/dist/plugin-sdk/{slash-dispatch.runtime-DbheDKxM.cjs → slash-dispatch.runtime-Cvom2Onl.cjs} +1 -1
  123. package/dist/plugin-sdk/{slash-dispatch.runtime-DpBWBF7J.js → slash-dispatch.runtime-D00kIROj.js} +1 -1
  124. package/dist/plugin-sdk/{slash-dispatch.runtime-DSQ2U0MM.cjs → slash-dispatch.runtime-DEu-D4XB.cjs} +1 -1
  125. package/dist/plugin-sdk/{slash-dispatch.runtime-Bu6Gwr3m.cjs → slash-dispatch.runtime-DG7_jQXD.cjs} +1 -1
  126. package/dist/plugin-sdk/{slash-dispatch.runtime-CCEMBSm2.cjs → slash-dispatch.runtime-DVP1q-_z.cjs} +1 -1
  127. package/dist/plugin-sdk/{slash-dispatch.runtime-Dm_cVnlq.js → slash-dispatch.runtime-U6qjtCfd.js} +1 -1
  128. package/dist/plugin-sdk/{subagent-registry-runtime-bVH8kl6Y.js → subagent-registry-runtime-BD_DkCmR.js} +1 -1
  129. package/dist/plugin-sdk/{subagent-registry-runtime-Der4fbZK.cjs → subagent-registry-runtime-BWiMCyG_.cjs} +1 -1
  130. package/dist/plugin-sdk/{subagent-registry-runtime-Pp_rfnk0.js → subagent-registry-runtime-C6vGkwe9.js} +1 -1
  131. package/dist/plugin-sdk/{subagent-registry-runtime-B0cZ_eaC.cjs → subagent-registry-runtime-CCcI3vhb.cjs} +1 -1
  132. package/dist/plugin-sdk/{subagent-registry-runtime-B-P4w-z9.js → subagent-registry-runtime-CDCU--WW.js} +1 -1
  133. package/dist/plugin-sdk/{subagent-registry-runtime-Ciev9m2W.cjs → subagent-registry-runtime-D98xiwmA.cjs} +1 -1
  134. package/dist/plugin-sdk/{subagent-registry-runtime-DBPvxiJW.cjs → subagent-registry-runtime-LebBdxD7.cjs} +1 -1
  135. package/dist/plugin-sdk/{subagent-registry-runtime-BfmeSbXD.cjs → subagent-registry-runtime-MfHdezNY.cjs} +1 -1
  136. package/dist/plugin-sdk/{subagent-registry-runtime-CL0sdx5J.cjs → subagent-registry-runtime-bMabqk9V.cjs} +1 -1
  137. package/dist/plugin-sdk/{subagent-registry-runtime-DH_Jx5hU.js → subagent-registry-runtime-h3qrqiJH.js} +1 -1
  138. package/dist/plugin-sdk/{subagent-registry-runtime-CEvE9keW.js → subagent-registry-runtime-tmI7JUke.js} +1 -1
  139. package/dist/plugin-sdk/{subagent-registry-runtime-Du8BhjzJ.js → subagent-registry-runtime-uC8wbfNS.js} +1 -1
  140. package/dist/plugin-sdk/{web-BdnQzLgF.js → web-9Os8v8Cu.js} +2 -2
  141. package/dist/plugin-sdk/{web-pcTha_l7.cjs → web-BQ9hOKe8.cjs} +2 -2
  142. package/dist/plugin-sdk/{web-C9T7tf6w.js → web-Bjk0MWu3.js} +2 -2
  143. package/dist/plugin-sdk/{web-_tj8xNZE.js → web-BsmnVZaX.js} +2 -2
  144. package/dist/plugin-sdk/{web-B2PwjHsu.cjs → web-CUbdclQS.cjs} +2 -2
  145. package/dist/plugin-sdk/{web-CcYBsmAj.cjs → web-C_Vx3mgY.cjs} +1 -1
  146. package/dist/plugin-sdk/{web-BZoOYDwf.js → web-Cdo1e0C7.js} +1 -1
  147. package/dist/plugin-sdk/{web-CODD4ksc.cjs → web-CfTkaUMk.cjs} +2 -2
  148. package/dist/plugin-sdk/{web-24o5tNe3.js → web-DkmdYSZ8.js} +1 -1
  149. package/dist/plugin-sdk/{web-B-QDcVRv.cjs → web-DpGXJ6SQ.cjs} +2 -2
  150. package/dist/plugin-sdk/{web-Czl9vNVv.cjs → web-DuF9udb6.cjs} +1 -1
  151. package/dist/plugin-sdk/{web-CkdCvvR-.js → web-Jr2J55LO.js} +2 -2
  152. package/dist/plugin-sdk/whatsapp.cjs +1 -1
  153. package/dist/plugin-sdk/whatsapp.js +1 -1
  154. package/dist/{plugins-cli-BiVMAr5T.js → plugins-cli-BzJeq-CW.js} +2 -2
  155. package/dist/{plugins-cli-BbjMbzJU.js → plugins-cli-o74CJV4A.js} +2 -2
  156. package/dist/{program-BrAZTwFr.js → program-CCS3CIqA.js} +3 -3
  157. package/dist/{program-context-B9ydtPje.js → program-context-lyPXjPfN.js} +2 -2
  158. package/dist/{prompt-select-styled-DIOWLjl0.js → prompt-select-styled-DmTwJKOO.js} +2 -2
  159. package/dist/{prompt-select-styled-BeJNbzSa.js → prompt-select-styled-Z30OVmpM.js} +2 -2
  160. package/dist/{provider-auth-helpers-pBVCjBj9.js → provider-auth-helpers-BzlcSA6U.js} +2 -2
  161. package/dist/{provider-auth-helpers-1lU43eTW.js → provider-auth-helpers-CDIiLD1m.js} +2 -2
  162. package/dist/{push-apns-BGUOmD5M.js → push-apns-CrAWstBo.js} +2 -2
  163. package/dist/{push-apns-B_a2MBJ4.js → push-apns-CrMV74Qs.js} +2 -2
  164. package/dist/{register.agent-CX78s_X9.js → register.agent-CisptTv_.js} +2 -2
  165. package/dist/{register.agent-DLDKQENq.js → register.agent-Dl2Ef-K5.js} +2 -2
  166. package/dist/{register.configure-BA5u9hT3.js → register.configure-CvPihXst.js} +2 -2
  167. package/dist/{register.configure-BhPtf3Qo.js → register.configure-D8bJJ16k.js} +2 -2
  168. package/dist/{register.maintenance-r_MzNK3-.js → register.maintenance-COWBeetm.js} +2 -2
  169. package/dist/{register.maintenance-BhsBepKS.js → register.maintenance-vhmmqtIi.js} +2 -2
  170. package/dist/{register.message-CTF--Z2a.js → register.message-3zVHQZ27.js} +2 -2
  171. package/dist/{register.message-jcZ875be.js → register.message-CM_Qudzn.js} +2 -2
  172. package/dist/{register.onboard-CNwnStUk.js → register.onboard-CJZKG0PP.js} +2 -2
  173. package/dist/{register.onboard-C3yL50_c.js → register.onboard-CaFl_mB1.js} +2 -2
  174. package/dist/{register.setup-BRJMzgfU.js → register.setup-CSW03BKj.js} +2 -2
  175. package/dist/{register.setup-BvsS-zgm.js → register.setup-DDkBFyvF.js} +2 -2
  176. package/dist/{register.status-health-sessions-Dqmkw820.js → register.status-health-sessions-BXiMraHZ.js} +2 -2
  177. package/dist/{register.status-health-sessions-DVc__2pc.js → register.status-health-sessions-Bo9VWxLG.js} +2 -2
  178. package/dist/{register.subclis-D-24j83X.js → register.subclis-B_0ZS-_K.js} +2 -2
  179. package/dist/{reply-l-Y47HP4.js → reply-CjyZeZ-j.js} +7 -7
  180. package/dist/{run-main-B_YBE_TN.js → run-main-CV49c7uu.js} +2 -2
  181. package/dist/{server-node-events-CFSY_-4t.js → server-node-events-BWiQg1NL.js} +2 -2
  182. package/dist/{server-node-events-ZFwmPwQ-.js → server-node-events-DicMyck-.js} +2 -2
  183. package/dist/{slash-dispatch.runtime-pdAIQrzR.js → slash-dispatch.runtime-CGgP5dBX.js} +1 -1
  184. package/dist/{slash-dispatch.runtime-CKWXmLO1.js → slash-dispatch.runtime-CknX8Fkv.js} +1 -1
  185. package/dist/{slash-dispatch.runtime-DIR5H2MY.js → slash-dispatch.runtime-CoKGpcpS.js} +1 -1
  186. package/dist/{slash-dispatch.runtime-14ABU-DD.js → slash-dispatch.runtime-pSpPe8qL.js} +1 -1
  187. package/dist/{status-DYqPF0rB.js → status-BoL8-JxA.js} +2 -2
  188. package/dist/{status-JIPeVrsc.js → status-DEAX-TLb.js} +2 -2
  189. package/dist/{subagent-registry-runtime-rPbwTnju.js → subagent-registry-runtime-2Nh6-7ym.js} +1 -1
  190. package/dist/{subagent-registry-runtime-DTVXQJOP.js → subagent-registry-runtime-CG_2Atu3.js} +1 -1
  191. package/dist/{subagent-registry-runtime-Cj4CKKl_.js → subagent-registry-runtime-Cc264UfD.js} +1 -1
  192. package/dist/{subagent-registry-runtime-8_ktZPZB.js → subagent-registry-runtime-CpYm78z3.js} +1 -1
  193. package/dist/{update-cli-YrBbmw4f.js → update-cli--P65ciut.js} +2 -2
  194. package/dist/{update-cli-BwBMOeP0.js → update-cli-Ibrshx_w.js} +2 -2
  195. package/dist/{update-runner-BvtyRBD2.js → update-runner-CvWH2ZAc.js} +2 -2
  196. package/dist/{update-runner-DYamgo1V.js → update-runner-mMbwEOlU.js} +2 -2
  197. package/dist/{web-DwcxsgH0.js → web-ARUUCMQo.js} +2 -2
  198. package/dist/{web-C15yQ-wI.js → web-C6jRFeYp.js} +1 -1
  199. package/dist/{web-C6So15hm.js → web-CDXYiCsB.js} +1 -1
  200. package/dist/{web-Cq3xWCaD.js → web-CiagxaWr.js} +2 -2
  201. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +42 -42
  202. package/node_modules/@aws-sdk/core/dist-cjs/index.js +17 -0
  203. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +17 -0
  204. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  205. package/node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js +15 -0
  206. package/node_modules/@aws-sdk/core/package.json +11 -11
  207. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  208. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  209. package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
  210. package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
  211. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  212. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  213. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  214. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  215. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
  216. package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
  217. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  218. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  219. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  220. package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
  221. package/node_modules/@aws-sdk/middleware-websocket/package.json +9 -9
  222. package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
  223. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  224. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  225. package/node_modules/@aws-sdk/types/package.json +2 -2
  226. package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
  227. package/node_modules/@aws-sdk/util-format-url/package.json +4 -4
  228. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  229. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  230. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  231. package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/dist/index.js +1 -0
  232. package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/package.json +1 -1
  233. package/node_modules/content-disposition/index.js +118 -40
  234. package/node_modules/content-disposition/package.json +8 -11
  235. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
  236. package/node_modules/path-expression-matcher/lib/pem.d.cts +18 -0
  237. package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
  238. package/node_modules/path-expression-matcher/package.json +1 -1
  239. package/node_modules/path-expression-matcher/src/Expression.js +2 -2
  240. package/node_modules/path-expression-matcher/src/ExpressionSet.js +24 -4
  241. package/package.json +1 -1
  242. package/preset-config.json +1 -1
  243. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +0 -201
  244. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +0 -62
  245. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +0 -157
  246. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +0 -2
  247. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +0 -16
  248. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +0 -81
  249. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +0 -8
  250. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +0 -11
  251. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +0 -10
  252. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +0 -4
  253. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +0 -5
  254. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +0 -7
  255. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +0 -7
  256. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +0 -8
  257. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +0 -70
@@ -1,2 +1,2 @@
1
- import{G as e,J as t,K as n,W as r,X as i,Y as a,Z as o,p as s,q as c,r as l,rt as u}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{c as d,i as f,l as p,o as m,s as h}from"./entry.js";import{hc as g}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import{t as _}from"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import{i as v}from"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import"./compact-Dg66DXx_.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import{_ as y}from"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import{t as b}from"./path-env-emdAQejM.js";import"./note-Dp-d_utk.js";import"./issue-format-C_lNzrKa.js";import{t as x}from"./plugin-registry-C6dY-Et7.js";import{t as S}from"./runtime-guard-DX2Ie4ri.js";import{t as C}from"./banner-9u45RL26.js";import"./doctor-config-flow-D4F3mz4h.js";import{n as w}from"./config-guard-BTNXbWoO.js";import T from"node:process";import"node:url";const E={match:e=>e[0]===`health`,loadPlugins:e=>!i(e,`--json`),run:async e=>{let t=i(e,`--json`),n=a(e,{includeDebug:!0}),r=c(e,`--timeout`);if(r===null)return!1;let{healthCommand:o}=await import(`./health-PaRHFItm.js`).then(e=>e.i);return await o({json:t,timeoutMs:r,verbose:n},s),!0}},D={match:e=>e[0]===`status`,loadPlugins:!0,run:async e=>{let t=i(e,`--json`),n=i(e,`--deep`),r=i(e,`--all`),o=i(e,`--usage`),l=a(e,{includeDebug:!0}),u=c(e,`--timeout`);if(u===null)return!1;let{statusCommand:d}=await import(`./status-DYqPF0rB.js`).then(e=>e.t);return await d({json:t,deep:n,all:r,usage:o,timeoutMs:u,verbose:l},s),!0}},O={match:e=>e[0]===`sessions`&&!e[1],run:async e=>{let t=i(e,`--json`),r=i(e,`--all-agents`),a=n(e,`--agent`);if(a===null)return!1;let o=n(e,`--store`);if(o===null)return!1;let c=n(e,`--active`);if(c===null)return!1;let{sessionsCommand:l}=await import(`./sessions-BsxT0V2m.js`);return await l({json:t,store:o,agent:a,allAgents:r,active:c},s),!0}},k={match:e=>e[0]===`agents`&&e[1]===`list`,run:async e=>{let t=i(e,`--json`),n=i(e,`--bindings`),{agentsListCommand:r}=await import(`./agents-Bpp_F5In.js`);return await r({json:t,bindings:n},s),!0}},A={match:e=>e[0]===`memory`&&e[1]===`status`,run:async e=>{let t=n(e,`--agent`);if(t===null)return!1;let r=i(e,`--json`),a=i(e,`--deep`),o=i(e,`--index`),s=i(e,`--verbose`),{runMemoryStatus:c}=await import(`./memory-cli-XaxtBQm1.js`).then(e=>e.t);return await c({agent:t,json:r,deep:a,index:o,verbose:s}),!0}};function j(e,t){let n=[],r=e.slice(2);for(let e=0;e<r.length;e+=1){let i=r[e];if(!i||i===`--`)break;if(i===t){let t=r[e+1];if(!u(t))return null;n.push(t),e+=1;continue}if(i.startsWith(`${t}=`)){let e=i.slice(t.length+1).trim();if(!e)return null;n.push(e)}}return n}const M=[E,D,O,k,A,{match:e=>e[0]===`config`&&e[1]===`get`,run:async t=>{let n=e(t,{commandPath:[`config`,`get`],booleanFlags:[`--json`]});if(!n||n.length!==1)return!1;let r=n[0];if(!r)return!1;let a=i(t,`--json`),{runConfigGet:o}=await import(`./config-cli-CBte2b1h.js`);return await o({path:r,json:a}),!0}},{match:e=>e[0]===`config`&&e[1]===`unset`,run:async t=>{let n=e(t,{commandPath:[`config`,`unset`]});if(!n||n.length!==1)return!1;let r=n[0];if(!r)return!1;let{runConfigUnset:i}=await import(`./config-cli-CBte2b1h.js`);return await i({path:r}),!0}},{match:e=>e[0]===`models`&&e[1]===`list`,run:async e=>{let t=n(e,`--provider`);if(t===null)return!1;let r=i(e,`--all`),a=i(e,`--local`),o=i(e,`--json`),c=i(e,`--plain`),{modelsListCommand:l}=await import(`./models-C_Vg3Cty.js`);return await l({all:r,local:a,provider:t,json:o,plain:c},s),!0}},{match:e=>e[0]===`models`&&e[1]===`status`,run:async e=>{let t=n(e,`--probe-provider`);if(t===null)return!1;let r=n(e,`--probe-timeout`);if(r===null)return!1;let a=n(e,`--probe-concurrency`);if(a===null)return!1;let o=n(e,`--probe-max-tokens`);if(o===null)return!1;let c=n(e,`--agent`);if(c===null)return!1;let l=j(e,`--probe-profile`);if(l===null)return!1;let u=l.length===0?void 0:l.length===1?l[0]:l,d=i(e,`--json`),f=i(e,`--plain`),p=i(e,`--check`),m=i(e,`--probe`),{modelsStatusCommand:h}=await import(`./models-C_Vg3Cty.js`);return await h({json:d,plain:f,check:p,probe:m,probeProvider:t,probeProfile:u,probeTimeout:r,probeConcurrency:a,probeMaxTokens:o,agent:c},s),!0}}];function N(e){for(let t of M)if(t.match(e))return t;return null}async function P(e){let t=i(e.argv,`--json`);C(_,{argv:e.argv}),await w({runtime:s,commandPath:e.commandPath,...t?{suppressDoctorStdout:!0}:{}}),(typeof e.loadPlugins==`function`?e.loadPlugins(e.argv):e.loadPlugins)&&x()}async function F(e){if(f(process.env.OPENCLAW_DISABLE_ROUTE_FIRST)||o(e))return!1;let t=r(e,2);if(!t[0])return!1;let n=N(t);return n?(await P({argv:e,commandPath:t,loadPlugins:n.loadPlugins}),n.run(e)):!1}async function I(){try{let{closeAllMemorySearchManagers:e}=await import(`./search-manager-Bp9x20r6.js`).then(e=>e.n);await e()}catch{}}function L(e){let t=e.indexOf(`--update`);if(t===-1)return e;let n=[...e];return n.splice(t,1,`update`),n}function R(e){return e.hasBuiltinPrimary?!0:e.primary?!1:o(e.argv)}function z(e){if(o(e))return!1;let[t,n]=r(e,2);return t?!(t===`status`||t===`health`||t===`sessions`||t===`config`&&(n===`get`||n===`unset`)||t===`models`&&(n===`list`||n===`status`)):!0}async function B(e=T.argv){let n=h(e),r=p(n);if(!r.ok)throw Error(r.error);r.profile&&d({profile:r.profile}),n=r.argv,g({quiet:!0}),m(),z(n)&&b(),S();try{if(await F(n))return;l();let{buildProgram:e}=await import(`./program-BrAZTwFr.js`),r=e();y(),T.on(`uncaughtException`,e=>{console.error(`[openclaw] Uncaught exception:`,v(e)),T.exit(1)});let i=L(n),a=t(i);if(a){let{getProgramContext:e}=await import(`./program-context-CH9p6anW.js`).then(e=>e.n),t=e(r);if(t){let{registerCoreCliByName:e}=await import(`./command-registry-CfuXCRwV.js`).then(e=>e.t);await e(r,t,a,i)}let{registerSubCliByName:n}=await import(`./register.subclis-D-24j83X.js`).then(e=>e.a);await n(r,a)}if(!R({argv:i,primary:a,hasBuiltinPrimary:a!==null&&r.commands.some(e=>e.name()===a)})){let{registerPluginCliCommands:e}=await import(`./cli-D8T2tphD.js`),{loadValidatedConfigForPluginRegistration:t}=await import(`./register.subclis-D-24j83X.js`).then(e=>e.a),n=await t();n&&e(r,n)}await r.parseAsync(i)}finally{await I()}}export{B as runCli};
2
- //# sourceMappingURL=run-main-B_YBE_TN.js.map
1
+ import{G as e,J as t,K as n,W as r,X as i,Y as a,Z as o,p as s,q as c,r as l,rt as u}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{c as d,i as f,l as p,o as m,s as h}from"./entry.js";import{hc as g}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import{t as _}from"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import{i as v}from"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import{_ as y}from"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import{t as b}from"./path-env-emdAQejM.js";import"./note-Dp-d_utk.js";import"./issue-format-C_lNzrKa.js";import{t as x}from"./plugin-registry-CYlBYbc8.js";import{t as S}from"./runtime-guard-DX2Ie4ri.js";import{t as C}from"./banner-xQa2kS6O.js";import"./doctor-config-flow-D4F3mz4h.js";import{n as w}from"./config-guard-BTNXbWoO.js";import T from"node:process";import"node:url";const E={match:e=>e[0]===`health`,loadPlugins:e=>!i(e,`--json`),run:async e=>{let t=i(e,`--json`),n=a(e,{includeDebug:!0}),r=c(e,`--timeout`);if(r===null)return!1;let{healthCommand:o}=await import(`./health-DBu0V1Y-.js`).then(e=>e.i);return await o({json:t,timeoutMs:r,verbose:n},s),!0}},D={match:e=>e[0]===`status`,loadPlugins:!0,run:async e=>{let t=i(e,`--json`),n=i(e,`--deep`),r=i(e,`--all`),o=i(e,`--usage`),l=a(e,{includeDebug:!0}),u=c(e,`--timeout`);if(u===null)return!1;let{statusCommand:d}=await import(`./status-BoL8-JxA.js`).then(e=>e.t);return await d({json:t,deep:n,all:r,usage:o,timeoutMs:u,verbose:l},s),!0}},O={match:e=>e[0]===`sessions`&&!e[1],run:async e=>{let t=i(e,`--json`),r=i(e,`--all-agents`),a=n(e,`--agent`);if(a===null)return!1;let o=n(e,`--store`);if(o===null)return!1;let c=n(e,`--active`);if(c===null)return!1;let{sessionsCommand:l}=await import(`./sessions-BsxT0V2m.js`);return await l({json:t,store:o,agent:a,allAgents:r,active:c},s),!0}},k={match:e=>e[0]===`agents`&&e[1]===`list`,run:async e=>{let t=i(e,`--json`),n=i(e,`--bindings`),{agentsListCommand:r}=await import(`./agents-D3Z05GqK.js`);return await r({json:t,bindings:n},s),!0}},A={match:e=>e[0]===`memory`&&e[1]===`status`,run:async e=>{let t=n(e,`--agent`);if(t===null)return!1;let r=i(e,`--json`),a=i(e,`--deep`),o=i(e,`--index`),s=i(e,`--verbose`),{runMemoryStatus:c}=await import(`./memory-cli-XaxtBQm1.js`).then(e=>e.t);return await c({agent:t,json:r,deep:a,index:o,verbose:s}),!0}};function j(e,t){let n=[],r=e.slice(2);for(let e=0;e<r.length;e+=1){let i=r[e];if(!i||i===`--`)break;if(i===t){let t=r[e+1];if(!u(t))return null;n.push(t),e+=1;continue}if(i.startsWith(`${t}=`)){let e=i.slice(t.length+1).trim();if(!e)return null;n.push(e)}}return n}const M=[E,D,O,k,A,{match:e=>e[0]===`config`&&e[1]===`get`,run:async t=>{let n=e(t,{commandPath:[`config`,`get`],booleanFlags:[`--json`]});if(!n||n.length!==1)return!1;let r=n[0];if(!r)return!1;let a=i(t,`--json`),{runConfigGet:o}=await import(`./config-cli-B9hEiZsw.js`);return await o({path:r,json:a}),!0}},{match:e=>e[0]===`config`&&e[1]===`unset`,run:async t=>{let n=e(t,{commandPath:[`config`,`unset`]});if(!n||n.length!==1)return!1;let r=n[0];if(!r)return!1;let{runConfigUnset:i}=await import(`./config-cli-B9hEiZsw.js`);return await i({path:r}),!0}},{match:e=>e[0]===`models`&&e[1]===`list`,run:async e=>{let t=n(e,`--provider`);if(t===null)return!1;let r=i(e,`--all`),a=i(e,`--local`),o=i(e,`--json`),c=i(e,`--plain`),{modelsListCommand:l}=await import(`./models-BEO5lvkx.js`);return await l({all:r,local:a,provider:t,json:o,plain:c},s),!0}},{match:e=>e[0]===`models`&&e[1]===`status`,run:async e=>{let t=n(e,`--probe-provider`);if(t===null)return!1;let r=n(e,`--probe-timeout`);if(r===null)return!1;let a=n(e,`--probe-concurrency`);if(a===null)return!1;let o=n(e,`--probe-max-tokens`);if(o===null)return!1;let c=n(e,`--agent`);if(c===null)return!1;let l=j(e,`--probe-profile`);if(l===null)return!1;let u=l.length===0?void 0:l.length===1?l[0]:l,d=i(e,`--json`),f=i(e,`--plain`),p=i(e,`--check`),m=i(e,`--probe`),{modelsStatusCommand:h}=await import(`./models-BEO5lvkx.js`);return await h({json:d,plain:f,check:p,probe:m,probeProvider:t,probeProfile:u,probeTimeout:r,probeConcurrency:a,probeMaxTokens:o,agent:c},s),!0}}];function N(e){for(let t of M)if(t.match(e))return t;return null}async function P(e){let t=i(e.argv,`--json`);C(_,{argv:e.argv}),await w({runtime:s,commandPath:e.commandPath,...t?{suppressDoctorStdout:!0}:{}}),(typeof e.loadPlugins==`function`?e.loadPlugins(e.argv):e.loadPlugins)&&x()}async function F(e){if(f(process.env.OPENCLAW_DISABLE_ROUTE_FIRST)||o(e))return!1;let t=r(e,2);if(!t[0])return!1;let n=N(t);return n?(await P({argv:e,commandPath:t,loadPlugins:n.loadPlugins}),n.run(e)):!1}async function I(){try{let{closeAllMemorySearchManagers:e}=await import(`./search-manager-Bp9x20r6.js`).then(e=>e.n);await e()}catch{}}function L(e){let t=e.indexOf(`--update`);if(t===-1)return e;let n=[...e];return n.splice(t,1,`update`),n}function R(e){return e.hasBuiltinPrimary?!0:e.primary?!1:o(e.argv)}function z(e){if(o(e))return!1;let[t,n]=r(e,2);return t?!(t===`status`||t===`health`||t===`sessions`||t===`config`&&(n===`get`||n===`unset`)||t===`models`&&(n===`list`||n===`status`)):!0}async function B(e=T.argv){let n=h(e),r=p(n);if(!r.ok)throw Error(r.error);r.profile&&d({profile:r.profile}),n=r.argv,g({quiet:!0}),m(),z(n)&&b(),S();try{if(await F(n))return;l();let{buildProgram:e}=await import(`./program-CCS3CIqA.js`),r=e();y(),T.on(`uncaughtException`,e=>{console.error(`[openclaw] Uncaught exception:`,v(e)),T.exit(1)});let i=L(n),a=t(i);if(a){let{getProgramContext:e}=await import(`./program-context-CH9p6anW.js`).then(e=>e.n),t=e(r);if(t){let{registerCoreCliByName:e}=await import(`./command-registry-CSBvrqwW.js`).then(e=>e.t);await e(r,t,a,i)}let{registerSubCliByName:n}=await import(`./register.subclis-B_0ZS-_K.js`).then(e=>e.a);await n(r,a)}if(!R({argv:i,primary:a,hasBuiltinPrimary:a!==null&&r.commands.some(e=>e.name()===a)})){let{registerPluginCliCommands:e}=await import(`./cli-CMLvfh6N.js`),{loadValidatedConfigForPluginRegistration:t}=await import(`./register.subclis-B_0ZS-_K.js`).then(e=>e.a),n=await t();n&&e(r,n)}await r.parseAsync(i)}finally{await I()}}export{B as runCli};
2
+ //# sourceMappingURL=run-main-CV49c7uu.js.map
@@ -1,2 +1,2 @@
1
- import{p as e}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Lt as t,jo as n}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import{l as r,p as i}from"./session-key-C7F_iqYg.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import{r as a}from"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{Cn as o,O as s,bt as c,sr as l,st as u,w as d}from"./compact-Dg66DXx_.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import{t as f}from"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import{c as p,o as m,s as h}from"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import{c as g,l as _,r as v,s as y}from"./push-apns-B_a2MBJ4.js";import{randomUUID as b}from"node:crypto";const x=1500,S=new Map;function C(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function w(e){return typeof e==`number`&&Number.isFinite(e)?Math.trunc(e):null}function T(e,t){let n=C(e.eventId)??C(e.providerEventId)??C(e.transcriptId);if(n)return`event:${n}`;let r=C(e.providerCallId)??C(e.callId),i=w(e.sequence)??w(e.seq);if(r&&i!==null)return`call-seq:${r}:${i}`;let a=w(e.timestamp)??w(e.ts)??w(e.eventTimestamp);return r&&a!==null?`call-ts:${r}:${a}`:a===null?`text:${t}`:`timestamp:${a}|text:${t}`}function E(e){let t=S.get(e.sessionKey);if(t&&t.fingerprint===e.fingerprint&&e.now-t.ts<=x)return!0;if(S.set(e.sessionKey,{fingerprint:e.fingerprint,ts:e.now}),S.size>200){let t=e.now-x*2;for(let[e,n]of S)if(n.ts<t&&S.delete(e),S.size<=200)break;for(;S.size>200;){let e=S.keys().next().value;if(e===void 0)break;S.delete(e)}}return!1}function D(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=180?t:`${t.slice(0,179)}…`:``}function O(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=120?t:`${t.slice(0,119)}…`:``}async function k(e){let{storePath:n}=e;n&&await t(n,t=>{let n=p({cfg:e.cfg,key:e.sessionKey,store:t});h({store:t,canonicalKey:n.canonicalKey,candidates:n.storeKeys}),t[e.canonicalKey]={sessionId:e.sessionId,updatedAt:e.now,thinkingLevel:e.entry?.thinkingLevel,verboseLevel:e.entry?.verboseLevel,reasoningLevel:e.entry?.reasoningLevel,systemSent:e.entry?.systemSent,sendPolicy:e.entry?.sendPolicy,lastChannel:e.entry?.lastChannel,lastTo:e.entry?.lastTo}})}function A(e){k({cfg:e.cfg,sessionKey:e.sessionKey,storePath:e.storePath,canonicalKey:e.canonicalKey,entry:e.entry,sessionId:e.sessionId,now:e.now}).catch(t=>{e.ctx.logGateway.warn(`voice session-store update failed: `+_(t))})}function j(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.sessionKey==`string`?n.sessionKey.trim():``;return r.length>0?r:null}function M(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return typeof t==`object`&&t?t:null}async function N(e){let t=c({channel:e.channel,to:e.to,cfg:e.cfg,mode:`explicit`});if(!t.ok)throw Error(String(t.error));let n=l({cfg:e.cfg,sessionKey:e.sessionKey});await f({cfg:e.cfg,channel:e.channel,to:t.to,payloads:[{text:e.text}],session:n,bestEffort:!0,deps:s(e.deps)})}const P=async(t,s,c)=>{switch(c.event){case`voice.transcript`:{let i=M(c.payloadJSON);if(!i)return;let a=typeof i.text==`string`?i.text.trim():``;if(!a||a.length>2e4)return;let o=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),u=r(l.session?.mainKey),f=o.length>0?o:u,{storePath:p,entry:h,canonicalKey:g}=m(f),v=Date.now();if(E({sessionKey:g,fingerprint:T(i,a),now:v}))return;let y=h?.sessionId??b();A({ctx:t,cfg:l,sessionKey:f,storePath:p,canonicalKey:g,entry:h,sessionId:y,now:v}),t.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),d({message:a,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${s}: ${_(e)}`)});return}case`agent.request`:{if(!c.payloadJSON)return;let r=null;try{r=JSON.parse(c.payloadJSON)}catch{return}let i=(r?.message??``).trim(),o=y(r?.attachments??void 0),l=[];if(o.length>0)try{let e=await g(i,o,{maxBytes:5e6,log:t.logGateway});i=e.message.trim(),l=e.images}catch{return}if(!i||i.length>2e4)return;let u=a(typeof r?.channel==`string`?r.channel.trim():``)??void 0,f=typeof r?.to==`string`&&r.to.trim()?r.to.trim():void 0,p=!!r?.deliver,h=!!r?.receipt,v=(typeof r?.receiptText==`string`?r.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(r?.sessionKey??``).trim(),S=x.length>0?x:`node-${s}`,C=n(),{storePath:w,entry:T,canonicalKey:E}=m(S),D=Date.now(),O=T?.sessionId??b();if(await k({cfg:C,sessionKey:S,storePath:w,canonicalKey:E,entry:T,sessionId:O,now:D}),p&&(!u||!f)){let e=typeof T?.lastChannel==`string`?a(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!u&&e&&(u=e),!f&&t&&(f=t)}let A=p&&!!(u&&f),j=A?u:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${s}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:t.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{t.logGateway.warn(`agent receipt failed node=${s}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${s}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),d({message:i,images:l,sessionId:O,sessionKey:E,thinking:r?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof r?.timeoutSeconds==`number`?r.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${s}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(c.payloadJSON);if(!e)return;let t=C(e.change)?.toLowerCase();if(t!==`posted`&&t!==`removed`)return;let n=C(e.key);if(!n)return;let{canonicalKey:r}=m(C(e.sessionKey)??`node-${s}`),i=C(e.packageName),a=O(C(e.title)??``),l=O(C(e.text)??``),d=`Notification ${t} (node=${s} key=${n}`;if(i&&(d+=` package=${i}`),d+=`)`,t===`posted`){let e=[a,l].filter(Boolean);e.length>0&&(d+=`: ${e.join(` - `)}`)}o(d,{sessionKey:r,contextKey:`notification:${n}`})&&u({reason:`notifications-event`,sessionKey:r});return}case`chat.subscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeSubscribe(s,e);return}case`chat.unsubscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeUnsubscribe(s,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(c.payloadJSON);if(!e)return;let t=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${s}`;if(!t||n().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let r=typeof e.runId==`string`?e.runId.trim():``,a=typeof e.command==`string`?e.command.trim():``,l=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,d=e.timedOut===!0,f=typeof e.output==`string`?e.output.trim():``,p=typeof e.reason==`string`?e.reason.trim():``,m=``;if(c.event===`exec.started`)m=`Exec started (node=${s}${r?` id=${r}`:``})`,a&&(m+=`: ${a}`);else if(c.event===`exec.finished`){let e=d?`timeout`:`code ${l??`?`}`,t=D(f);if(!(d||l!==0||t.length>0))return;m=`Exec finished (node=${s}${r?` id=${r}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${s}${r?` id=${r}`:``}${p?`, ${p}`:``})`,a&&(m+=`: ${a}`);o(m,{sessionKey:t,contextKey:r?`exec:${r}`:`exec`}),u(i(t,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(c.payloadJSON);if(!e)return;let n=typeof e.token==`string`?e.token:``,r=typeof e.topic==`string`?e.topic:``,i=e.environment;try{await v({nodeId:s,token:n,topic:r,environment:i})}catch(e){t.logGateway.warn(`push apns register failed node=${s}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
2
- //# sourceMappingURL=server-node-events-CFSY_-4t.js.map
1
+ import{p as e}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Lt as t,jo as n}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import{l as r,p as i}from"./session-key-C7F_iqYg.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import{r as a}from"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{Cn as o,O as s,bt as c,sr as l,st as u,w as d}from"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import{t as f}from"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import{c as p,o as m,s as h}from"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import{c as g,l as _,r as v,s as y}from"./push-apns-CrMV74Qs.js";import{randomUUID as b}from"node:crypto";const x=1500,S=new Map;function C(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function w(e){return typeof e==`number`&&Number.isFinite(e)?Math.trunc(e):null}function T(e,t){let n=C(e.eventId)??C(e.providerEventId)??C(e.transcriptId);if(n)return`event:${n}`;let r=C(e.providerCallId)??C(e.callId),i=w(e.sequence)??w(e.seq);if(r&&i!==null)return`call-seq:${r}:${i}`;let a=w(e.timestamp)??w(e.ts)??w(e.eventTimestamp);return r&&a!==null?`call-ts:${r}:${a}`:a===null?`text:${t}`:`timestamp:${a}|text:${t}`}function E(e){let t=S.get(e.sessionKey);if(t&&t.fingerprint===e.fingerprint&&e.now-t.ts<=x)return!0;if(S.set(e.sessionKey,{fingerprint:e.fingerprint,ts:e.now}),S.size>200){let t=e.now-x*2;for(let[e,n]of S)if(n.ts<t&&S.delete(e),S.size<=200)break;for(;S.size>200;){let e=S.keys().next().value;if(e===void 0)break;S.delete(e)}}return!1}function D(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=180?t:`${t.slice(0,179)}…`:``}function O(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=120?t:`${t.slice(0,119)}…`:``}async function k(e){let{storePath:n}=e;n&&await t(n,t=>{let n=p({cfg:e.cfg,key:e.sessionKey,store:t});h({store:t,canonicalKey:n.canonicalKey,candidates:n.storeKeys}),t[e.canonicalKey]={sessionId:e.sessionId,updatedAt:e.now,thinkingLevel:e.entry?.thinkingLevel,verboseLevel:e.entry?.verboseLevel,reasoningLevel:e.entry?.reasoningLevel,systemSent:e.entry?.systemSent,sendPolicy:e.entry?.sendPolicy,lastChannel:e.entry?.lastChannel,lastTo:e.entry?.lastTo}})}function A(e){k({cfg:e.cfg,sessionKey:e.sessionKey,storePath:e.storePath,canonicalKey:e.canonicalKey,entry:e.entry,sessionId:e.sessionId,now:e.now}).catch(t=>{e.ctx.logGateway.warn(`voice session-store update failed: `+_(t))})}function j(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.sessionKey==`string`?n.sessionKey.trim():``;return r.length>0?r:null}function M(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return typeof t==`object`&&t?t:null}async function N(e){let t=c({channel:e.channel,to:e.to,cfg:e.cfg,mode:`explicit`});if(!t.ok)throw Error(String(t.error));let n=l({cfg:e.cfg,sessionKey:e.sessionKey});await f({cfg:e.cfg,channel:e.channel,to:t.to,payloads:[{text:e.text}],session:n,bestEffort:!0,deps:s(e.deps)})}const P=async(t,s,c)=>{switch(c.event){case`voice.transcript`:{let i=M(c.payloadJSON);if(!i)return;let a=typeof i.text==`string`?i.text.trim():``;if(!a||a.length>2e4)return;let o=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),u=r(l.session?.mainKey),f=o.length>0?o:u,{storePath:p,entry:h,canonicalKey:g}=m(f),v=Date.now();if(E({sessionKey:g,fingerprint:T(i,a),now:v}))return;let y=h?.sessionId??b();A({ctx:t,cfg:l,sessionKey:f,storePath:p,canonicalKey:g,entry:h,sessionId:y,now:v}),t.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),d({message:a,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${s}: ${_(e)}`)});return}case`agent.request`:{if(!c.payloadJSON)return;let r=null;try{r=JSON.parse(c.payloadJSON)}catch{return}let i=(r?.message??``).trim(),o=y(r?.attachments??void 0),l=[];if(o.length>0)try{let e=await g(i,o,{maxBytes:5e6,log:t.logGateway});i=e.message.trim(),l=e.images}catch{return}if(!i||i.length>2e4)return;let u=a(typeof r?.channel==`string`?r.channel.trim():``)??void 0,f=typeof r?.to==`string`&&r.to.trim()?r.to.trim():void 0,p=!!r?.deliver,h=!!r?.receipt,v=(typeof r?.receiptText==`string`?r.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(r?.sessionKey??``).trim(),S=x.length>0?x:`node-${s}`,C=n(),{storePath:w,entry:T,canonicalKey:E}=m(S),D=Date.now(),O=T?.sessionId??b();if(await k({cfg:C,sessionKey:S,storePath:w,canonicalKey:E,entry:T,sessionId:O,now:D}),p&&(!u||!f)){let e=typeof T?.lastChannel==`string`?a(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!u&&e&&(u=e),!f&&t&&(f=t)}let A=p&&!!(u&&f),j=A?u:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${s}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:t.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{t.logGateway.warn(`agent receipt failed node=${s}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${s}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),d({message:i,images:l,sessionId:O,sessionKey:E,thinking:r?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof r?.timeoutSeconds==`number`?r.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${s}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(c.payloadJSON);if(!e)return;let t=C(e.change)?.toLowerCase();if(t!==`posted`&&t!==`removed`)return;let n=C(e.key);if(!n)return;let{canonicalKey:r}=m(C(e.sessionKey)??`node-${s}`),i=C(e.packageName),a=O(C(e.title)??``),l=O(C(e.text)??``),d=`Notification ${t} (node=${s} key=${n}`;if(i&&(d+=` package=${i}`),d+=`)`,t===`posted`){let e=[a,l].filter(Boolean);e.length>0&&(d+=`: ${e.join(` - `)}`)}o(d,{sessionKey:r,contextKey:`notification:${n}`})&&u({reason:`notifications-event`,sessionKey:r});return}case`chat.subscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeSubscribe(s,e);return}case`chat.unsubscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeUnsubscribe(s,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(c.payloadJSON);if(!e)return;let t=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${s}`;if(!t||n().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let r=typeof e.runId==`string`?e.runId.trim():``,a=typeof e.command==`string`?e.command.trim():``,l=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,d=e.timedOut===!0,f=typeof e.output==`string`?e.output.trim():``,p=typeof e.reason==`string`?e.reason.trim():``,m=``;if(c.event===`exec.started`)m=`Exec started (node=${s}${r?` id=${r}`:``})`,a&&(m+=`: ${a}`);else if(c.event===`exec.finished`){let e=d?`timeout`:`code ${l??`?`}`,t=D(f);if(!(d||l!==0||t.length>0))return;m=`Exec finished (node=${s}${r?` id=${r}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${s}${r?` id=${r}`:``}${p?`, ${p}`:``})`,a&&(m+=`: ${a}`);o(m,{sessionKey:t,contextKey:r?`exec:${r}`:`exec`}),u(i(t,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(c.payloadJSON);if(!e)return;let n=typeof e.token==`string`?e.token:``,r=typeof e.topic==`string`?e.topic:``,i=e.environment;try{await v({nodeId:s,token:n,topic:r,environment:i})}catch(e){t.logGateway.warn(`push apns register failed node=${s}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
2
+ //# sourceMappingURL=server-node-events-BWiQg1NL.js.map
@@ -1,2 +1,2 @@
1
- import"./paths-B4IRk3wi.js";import{p as e}from"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import{Jn as t,qs as n}from"./model-selection-BlC_rXAN.js";import{Gn as r,Kt as i,M as a,Mt as o,N as s,Ot as c,Sn as l,br as u,j as d}from"./reply-l-Y47HP4.js";import"./agent-scope-DXZc3eNT.js";import{l as f,p}from"./session-key-D3P0tf5P.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import{r as m}from"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import{t as h}from"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import{c as g,l as _,r as v,s as y}from"./push-apns-BGUOmD5M.js";import{randomUUID as b}from"node:crypto";const x=1500,S=new Map;function C(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function w(e){return typeof e==`number`&&Number.isFinite(e)?Math.trunc(e):null}function T(e,t){let n=C(e.eventId)??C(e.providerEventId)??C(e.transcriptId);if(n)return`event:${n}`;let r=C(e.providerCallId)??C(e.callId),i=w(e.sequence)??w(e.seq);if(r&&i!==null)return`call-seq:${r}:${i}`;let a=w(e.timestamp)??w(e.ts)??w(e.eventTimestamp);return r&&a!==null?`call-ts:${r}:${a}`:a===null?`text:${t}`:`timestamp:${a}|text:${t}`}function E(e){let t=S.get(e.sessionKey);if(t&&t.fingerprint===e.fingerprint&&e.now-t.ts<=x)return!0;if(S.set(e.sessionKey,{fingerprint:e.fingerprint,ts:e.now}),S.size>200){let t=e.now-x*2;for(let[e,n]of S)if(n.ts<t&&S.delete(e),S.size<=200)break;for(;S.size>200;){let e=S.keys().next().value;if(e===void 0)break;S.delete(e)}}return!1}function D(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=180?t:`${t.slice(0,179)}…`:``}function O(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=120?t:`${t.slice(0,119)}…`:``}async function k(e){let{storePath:n}=e;n&&await t(n,t=>{let n=s({cfg:e.cfg,key:e.sessionKey,store:t});a({store:t,canonicalKey:n.canonicalKey,candidates:n.storeKeys}),t[e.canonicalKey]={sessionId:e.sessionId,updatedAt:e.now,thinkingLevel:e.entry?.thinkingLevel,verboseLevel:e.entry?.verboseLevel,reasoningLevel:e.entry?.reasoningLevel,systemSent:e.entry?.systemSent,sendPolicy:e.entry?.sendPolicy,lastChannel:e.entry?.lastChannel,lastTo:e.entry?.lastTo}})}function A(e){k({cfg:e.cfg,sessionKey:e.sessionKey,storePath:e.storePath,canonicalKey:e.canonicalKey,entry:e.entry,sessionId:e.sessionId,now:e.now}).catch(t=>{e.ctx.logGateway.warn(`voice session-store update failed: `+_(t))})}function j(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.sessionKey==`string`?n.sessionKey.trim():``;return r.length>0?r:null}function M(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return typeof t==`object`&&t?t:null}async function N(e){let t=r({channel:e.channel,to:e.to,cfg:e.cfg,mode:`explicit`});if(!t.ok)throw Error(String(t.error));let n=u({cfg:e.cfg,sessionKey:e.sessionKey});await h({cfg:e.cfg,channel:e.channel,to:t.to,payloads:[{text:e.text}],session:n,bestEffort:!0,deps:o(e.deps)})}const P=async(t,r,a)=>{switch(a.event){case`voice.transcript`:{let i=M(a.payloadJSON);if(!i)return;let o=typeof i.text==`string`?i.text.trim():``;if(!o||o.length>2e4)return;let s=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),u=f(l.session?.mainKey),p=s.length>0?s:u,{storePath:m,entry:h,canonicalKey:g}=d(p),v=Date.now();if(E({sessionKey:g,fingerprint:T(i,o),now:v}))return;let y=h?.sessionId??b();A({ctx:t,cfg:l,sessionKey:p,storePath:m,canonicalKey:g,entry:h,sessionId:y,now:v}),t.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),c({message:o,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`agent.request`:{if(!a.payloadJSON)return;let i=null;try{i=JSON.parse(a.payloadJSON)}catch{return}let o=(i?.message??``).trim(),s=y(i?.attachments??void 0),l=[];if(s.length>0)try{let e=await g(o,s,{maxBytes:5e6,log:t.logGateway});o=e.message.trim(),l=e.images}catch{return}if(!o||o.length>2e4)return;let u=m(typeof i?.channel==`string`?i.channel.trim():``)??void 0,f=typeof i?.to==`string`&&i.to.trim()?i.to.trim():void 0,p=!!i?.deliver,h=!!i?.receipt,v=(typeof i?.receiptText==`string`?i.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(i?.sessionKey??``).trim(),S=x.length>0?x:`node-${r}`,C=n(),{storePath:w,entry:T,canonicalKey:E}=d(S),D=Date.now(),O=T?.sessionId??b();if(await k({cfg:C,sessionKey:S,storePath:w,canonicalKey:E,entry:T,sessionId:O,now:D}),p&&(!u||!f)){let e=typeof T?.lastChannel==`string`?m(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!u&&e&&(u=e),!f&&t&&(f=t)}let A=p&&!!(u&&f),j=A?u:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${r}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:t.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{t.logGateway.warn(`agent receipt failed node=${r}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${r}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),c({message:o,images:l,sessionId:O,sessionKey:E,thinking:i?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof i?.timeoutSeconds==`number`?i.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(a.payloadJSON);if(!e)return;let t=C(e.change)?.toLowerCase();if(t!==`posted`&&t!==`removed`)return;let n=C(e.key);if(!n)return;let{canonicalKey:o}=d(C(e.sessionKey)??`node-${r}`),s=C(e.packageName),c=O(C(e.title)??``),u=O(C(e.text)??``),f=`Notification ${t} (node=${r} key=${n}`;if(s&&(f+=` package=${s}`),f+=`)`,t===`posted`){let e=[c,u].filter(Boolean);e.length>0&&(f+=`: ${e.join(` - `)}`)}l(f,{sessionKey:o,contextKey:`notification:${n}`})&&i({reason:`notifications-event`,sessionKey:o});return}case`chat.subscribe`:{if(!a.payloadJSON)return;let e=j(a.payloadJSON);if(!e)return;t.nodeSubscribe(r,e);return}case`chat.unsubscribe`:{if(!a.payloadJSON)return;let e=j(a.payloadJSON);if(!e)return;t.nodeUnsubscribe(r,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(a.payloadJSON);if(!e)return;let t=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${r}`;if(!t||n().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let o=typeof e.runId==`string`?e.runId.trim():``,s=typeof e.command==`string`?e.command.trim():``,c=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,u=e.timedOut===!0,d=typeof e.output==`string`?e.output.trim():``,f=typeof e.reason==`string`?e.reason.trim():``,m=``;if(a.event===`exec.started`)m=`Exec started (node=${r}${o?` id=${o}`:``})`,s&&(m+=`: ${s}`);else if(a.event===`exec.finished`){let e=u?`timeout`:`code ${c??`?`}`,t=D(d);if(!(u||c!==0||t.length>0))return;m=`Exec finished (node=${r}${o?` id=${o}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${r}${o?` id=${o}`:``}${f?`, ${f}`:``})`,s&&(m+=`: ${s}`);l(m,{sessionKey:t,contextKey:o?`exec:${o}`:`exec`}),i(p(t,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(a.payloadJSON);if(!e)return;let n=typeof e.token==`string`?e.token:``,i=typeof e.topic==`string`?e.topic:``,o=e.environment;try{await v({nodeId:r,token:n,topic:i,environment:o})}catch(e){t.logGateway.warn(`push apns register failed node=${r}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
2
- //# sourceMappingURL=server-node-events-ZFwmPwQ-.js.map
1
+ import"./paths-B4IRk3wi.js";import{p as e}from"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import{Jn as t,qs as n}from"./model-selection-BlC_rXAN.js";import{Gn as r,Kt as i,M as a,Mt as o,N as s,Ot as c,Sn as l,br as u,j as d}from"./reply-CjyZeZ-j.js";import"./agent-scope-DXZc3eNT.js";import{l as f,p}from"./session-key-D3P0tf5P.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import{r as m}from"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import{t as h}from"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";import{c as g,l as _,r as v,s as y}from"./push-apns-CrAWstBo.js";import{randomUUID as b}from"node:crypto";const x=1500,S=new Map;function C(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function w(e){return typeof e==`number`&&Number.isFinite(e)?Math.trunc(e):null}function T(e,t){let n=C(e.eventId)??C(e.providerEventId)??C(e.transcriptId);if(n)return`event:${n}`;let r=C(e.providerCallId)??C(e.callId),i=w(e.sequence)??w(e.seq);if(r&&i!==null)return`call-seq:${r}:${i}`;let a=w(e.timestamp)??w(e.ts)??w(e.eventTimestamp);return r&&a!==null?`call-ts:${r}:${a}`:a===null?`text:${t}`:`timestamp:${a}|text:${t}`}function E(e){let t=S.get(e.sessionKey);if(t&&t.fingerprint===e.fingerprint&&e.now-t.ts<=x)return!0;if(S.set(e.sessionKey,{fingerprint:e.fingerprint,ts:e.now}),S.size>200){let t=e.now-x*2;for(let[e,n]of S)if(n.ts<t&&S.delete(e),S.size<=200)break;for(;S.size>200;){let e=S.keys().next().value;if(e===void 0)break;S.delete(e)}}return!1}function D(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=180?t:`${t.slice(0,179)}…`:``}function O(e){let t=e.replace(/\s+/g,` `).trim();return t?t.length<=120?t:`${t.slice(0,119)}…`:``}async function k(e){let{storePath:n}=e;n&&await t(n,t=>{let n=s({cfg:e.cfg,key:e.sessionKey,store:t});a({store:t,canonicalKey:n.canonicalKey,candidates:n.storeKeys}),t[e.canonicalKey]={sessionId:e.sessionId,updatedAt:e.now,thinkingLevel:e.entry?.thinkingLevel,verboseLevel:e.entry?.verboseLevel,reasoningLevel:e.entry?.reasoningLevel,systemSent:e.entry?.systemSent,sendPolicy:e.entry?.sendPolicy,lastChannel:e.entry?.lastChannel,lastTo:e.entry?.lastTo}})}function A(e){k({cfg:e.cfg,sessionKey:e.sessionKey,storePath:e.storePath,canonicalKey:e.canonicalKey,entry:e.entry,sessionId:e.sessionId,now:e.now}).catch(t=>{e.ctx.logGateway.warn(`voice session-store update failed: `+_(t))})}function j(e){let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.sessionKey==`string`?n.sessionKey.trim():``;return r.length>0?r:null}function M(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}return typeof t==`object`&&t?t:null}async function N(e){let t=r({channel:e.channel,to:e.to,cfg:e.cfg,mode:`explicit`});if(!t.ok)throw Error(String(t.error));let n=u({cfg:e.cfg,sessionKey:e.sessionKey});await h({cfg:e.cfg,channel:e.channel,to:t.to,payloads:[{text:e.text}],session:n,bestEffort:!0,deps:o(e.deps)})}const P=async(t,r,a)=>{switch(a.event){case`voice.transcript`:{let i=M(a.payloadJSON);if(!i)return;let o=typeof i.text==`string`?i.text.trim():``;if(!o||o.length>2e4)return;let s=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),u=f(l.session?.mainKey),p=s.length>0?s:u,{storePath:m,entry:h,canonicalKey:g}=d(p),v=Date.now();if(E({sessionKey:g,fingerprint:T(i,o),now:v}))return;let y=h?.sessionId??b();A({ctx:t,cfg:l,sessionKey:p,storePath:m,canonicalKey:g,entry:h,sessionId:y,now:v}),t.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),c({message:o,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`agent.request`:{if(!a.payloadJSON)return;let i=null;try{i=JSON.parse(a.payloadJSON)}catch{return}let o=(i?.message??``).trim(),s=y(i?.attachments??void 0),l=[];if(s.length>0)try{let e=await g(o,s,{maxBytes:5e6,log:t.logGateway});o=e.message.trim(),l=e.images}catch{return}if(!o||o.length>2e4)return;let u=m(typeof i?.channel==`string`?i.channel.trim():``)??void 0,f=typeof i?.to==`string`&&i.to.trim()?i.to.trim():void 0,p=!!i?.deliver,h=!!i?.receipt,v=(typeof i?.receiptText==`string`?i.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(i?.sessionKey??``).trim(),S=x.length>0?x:`node-${r}`,C=n(),{storePath:w,entry:T,canonicalKey:E}=d(S),D=Date.now(),O=T?.sessionId??b();if(await k({cfg:C,sessionKey:S,storePath:w,canonicalKey:E,entry:T,sessionId:O,now:D}),p&&(!u||!f)){let e=typeof T?.lastChannel==`string`?m(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!u&&e&&(u=e),!f&&t&&(f=t)}let A=p&&!!(u&&f),j=A?u:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${r}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:t.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{t.logGateway.warn(`agent receipt failed node=${r}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${r}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),c({message:o,images:l,sessionId:O,sessionKey:E,thinking:i?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof i?.timeoutSeconds==`number`?i.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,t.deps).catch(e=>{t.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(a.payloadJSON);if(!e)return;let t=C(e.change)?.toLowerCase();if(t!==`posted`&&t!==`removed`)return;let n=C(e.key);if(!n)return;let{canonicalKey:o}=d(C(e.sessionKey)??`node-${r}`),s=C(e.packageName),c=O(C(e.title)??``),u=O(C(e.text)??``),f=`Notification ${t} (node=${r} key=${n}`;if(s&&(f+=` package=${s}`),f+=`)`,t===`posted`){let e=[c,u].filter(Boolean);e.length>0&&(f+=`: ${e.join(` - `)}`)}l(f,{sessionKey:o,contextKey:`notification:${n}`})&&i({reason:`notifications-event`,sessionKey:o});return}case`chat.subscribe`:{if(!a.payloadJSON)return;let e=j(a.payloadJSON);if(!e)return;t.nodeSubscribe(r,e);return}case`chat.unsubscribe`:{if(!a.payloadJSON)return;let e=j(a.payloadJSON);if(!e)return;t.nodeUnsubscribe(r,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(a.payloadJSON);if(!e)return;let t=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${r}`;if(!t||n().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let o=typeof e.runId==`string`?e.runId.trim():``,s=typeof e.command==`string`?e.command.trim():``,c=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,u=e.timedOut===!0,d=typeof e.output==`string`?e.output.trim():``,f=typeof e.reason==`string`?e.reason.trim():``,m=``;if(a.event===`exec.started`)m=`Exec started (node=${r}${o?` id=${o}`:``})`,s&&(m+=`: ${s}`);else if(a.event===`exec.finished`){let e=u?`timeout`:`code ${c??`?`}`,t=D(d);if(!(u||c!==0||t.length>0))return;m=`Exec finished (node=${r}${o?` id=${o}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${r}${o?` id=${o}`:``}${f?`, ${f}`:``})`,s&&(m+=`: ${s}`);l(m,{sessionKey:t,contextKey:o?`exec:${o}`:`exec`}),i(p(t,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(a.payloadJSON);if(!e)return;let n=typeof e.token==`string`?e.token:``,i=typeof e.topic==`string`?e.topic:``,o=e.environment;try{await v({nodeId:r,token:n,topic:i,environment:o})}catch(e){t.logGateway.warn(`push apns register failed node=${r}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
2
+ //# sourceMappingURL=server-node-events-DicMyck-.js.map
@@ -1 +1 @@
1
- import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import{ri as e}from"./model-selection-BlC_rXAN.js";import{On as t,Vn as n,_n as r,bi as i,lt as a,vt as o}from"./reply-l-Y47HP4.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import{m as s,s as c}from"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";export{r as createReplyPrefixOptions,o as deliverSlackSlashReplies,t as dispatchReplyWithDispatcher,i as finalizeInboundContext,a as recordInboundSessionMetaSafe,n as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import{ri as e}from"./model-selection-BlC_rXAN.js";import{On as t,Vn as n,_n as r,bi as i,lt as a,vt as o}from"./reply-CjyZeZ-j.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import{m as s,s as c}from"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";export{r as createReplyPrefixOptions,o as deliverSlackSlashReplies,t as dispatchReplyWithDispatcher,i as finalizeInboundContext,a as recordInboundSessionMetaSafe,n as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./paths-CrCoPIVK.js";import"./paths-CChBdtE8.js";import"./subsystem-Bc2XrjUz.js";import"./workspace-B0ZQeHXg.js";import"./utils-D3t-vPka.js";import{Gr as e}from"./model-selection-B5JsBS9D.js";import"./github-copilot-token-DePP-lIf.js";import"./boolean-DypnRoRK.js";import"./proxy-env-DcmW_urA.js";import"./frontmatter-CzpfPBFl.js";import"./logger-5W0OocJW.js";import"./send-Chz0YMoJ.js";import"./send-vthbs31u.js";import{E as t,N as n,i as r,l as i,r as a,y as o}from"./pi-embedded-Dsz7p3MF.js";import"./tokens-CL2fSjGl.js";import"./deliver-BFQ4Zx9z.js";import"./diagnostic-BrE4lMIf.js";import"./send-CYgHok1p.js";import"./pi-model-discovery-DeQdHV8O.js";import"./image-CcVQg-YN.js";import"./audio-transcription-runner-DSr6OIz1.js";import"./fetch-B_wRifvZ.js";import"./fetch-guard-D10s0raB.js";import"./api-key-rotation-Di6QgXx7.js";import"./proxy-fetch-BZ9O8Dvj.js";import{m as s,s as c}from"./ir-DBWscfBd.js";import"./render-CBsnn-2A.js";import"./target-errors-CRlevJJ5.js";import"./commands-registry-SeddSmFK.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-BWW6mc6t.js";import"./channel-activity-CgbOWaay.js";import"./tables-CrXdLc_6.js";import"./send-D9hVVn7p2.js";import"./outbound-attachment-Dds8xirj.js";import"./send-DlfVd5mL.js";import"./fetch-BJT3BrkJ.js";import"./query-expansion-BUUx_oWg.js";import"./manager-Dtd_loL8.js";export{i as createReplyPrefixOptions,r as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,n as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-CrCoPIVK.js";import"./paths-CChBdtE8.js";import"./subsystem-Bc2XrjUz.js";import"./workspace-B0ZQeHXg.js";import"./utils-D3t-vPka.js";import{Gr as e}from"./model-selection-B5JsBS9D.js";import"./github-copilot-token-DePP-lIf.js";import"./boolean-DypnRoRK.js";import"./proxy-env-DcmW_urA.js";import"./frontmatter-CzpfPBFl.js";import"./logger-5W0OocJW.js";import"./send-Chz0YMoJ.js";import"./send-vthbs31u.js";import{E as t,N as n,i as r,l as i,r as a,y as o}from"./pi-embedded-DjX-gdoY.js";import"./tokens-CL2fSjGl.js";import"./deliver-BFQ4Zx9z.js";import"./diagnostic-BrE4lMIf.js";import"./send-CYgHok1p.js";import"./pi-model-discovery-DeQdHV8O.js";import"./image-CcVQg-YN.js";import"./audio-transcription-runner-DSr6OIz1.js";import"./fetch-B_wRifvZ.js";import"./fetch-guard-D10s0raB.js";import"./api-key-rotation-Di6QgXx7.js";import"./proxy-fetch-BZ9O8Dvj.js";import{m as s,s as c}from"./ir-DBWscfBd.js";import"./render-CBsnn-2A.js";import"./target-errors-CRlevJJ5.js";import"./commands-registry-SeddSmFK.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-BWW6mc6t.js";import"./channel-activity-CgbOWaay.js";import"./tables-CrXdLc_6.js";import"./send-D9hVVn7p2.js";import"./outbound-attachment-Dds8xirj.js";import"./send-DlfVd5mL.js";import"./fetch-BJT3BrkJ.js";import"./query-expansion-BUUx_oWg.js";import"./manager-Dtd_loL8.js";export{i as createReplyPrefixOptions,r as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,n as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Gn as e}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{G as t,In as n,R as r,f as i,gt as a,m as o}from"./compact-Dg66DXx_.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import{m as s,s as c}from"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";export{r as createReplyPrefixOptions,o as deliverSlackSlashReplies,t as dispatchReplyWithDispatcher,n as finalizeInboundContext,i as recordInboundSessionMetaSafe,a as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Gn as e}from"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-CW81y5Wz.js";import"./send-DavpkzhH.js";import{G as t,In as n,R as r,f as i,gt as a,m as o}from"./compact-BEeB6bwq.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-_htt7eY5.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BHuhHfkH.js";import"./diagnostic-DQq4Bwrs.js";import"./send-DkiKKUkt.js";import"./pi-model-discovery-CpjYoBQf.js";import"./exec-approvals-allowlist-D8mN7nxV.js";import"./exec-safe-bin-runtime-policy-dcCS_Adf.js";import"./model-catalog-COVzoZD9.js";import"./fetch-CQaNr5J1.js";import"./audio-transcription-runner-Bd1OZC6K.js";import"./fetch-guard-BrTtJw7h.js";import"./image-BkWwI54C.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D0QU-kQ9.js";import"./proxy-fetch-gWETR3cl.js";import{m as s,s as c}from"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import"./target-errors-CgWAJOam.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Cpl4QnG4.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-8acNlxwP.js";import"./sqlite-CILF3z9U.js";import"./call-B8Fb4_oh.js";import"./pi-tools.policy-D40r0HmD.js";import"./pairing-store-BH-FTYkn.js";import"./fetch-Dh-apy46.js";import"./skill-commands-CSF6wVPU.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-DAR7V7FJ.js";import"./channel-activity-BBrgoad1.js";import"./tables-Brc2lNcB.js";import"./kill-tree-B3g7HrAO.js";import"./runtime-web-tools-D8fms06-.js";import"./runtime-Dlg2-Omq.js";import"./node-shell-DyOfwHrh.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-BBeE1TmB.js";import"./plugin-auto-enable-NzmNh4oU.js";import"./send-CVplsJpw.js";import"./outbound-attachment-BgAe99RM.js";import"./delivery-queue-nkPJu0fY.js";import"./send-C48Y9SAq.js";import"./system-run-command-BKfMiqQM.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-BlN-J_fA.js";import"./connection-auth-B_Uk6Vk8.js";import"./onboard-helpers-PGl5bVPE.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-D-kzQEL2.js";import"./search-manager-Bp9x20r6.js";import"./manager-C2YW7Hkq.js";import"./memory-cli-XaxtBQm1.js";import"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";export{r as createReplyPrefixOptions,o as deliverSlackSlashReplies,t as dispatchReplyWithDispatcher,n as finalizeInboundContext,i as recordInboundSessionMetaSafe,a as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./paths-piJASC5k.js";import"./paths-BpQOWYiT.js";import"./logger-DwWqfo66.js";import{Gr as e}from"./model-selection-vfhBuN9O.js";import{E as t,N as n,i as r,l as i,r as a,y as o}from"./pi-embedded-BZSn84Bh.js";import"./github-copilot-token-wm6mbypz.js";import"./proxy-env-BNhTHkd_.js";import"./send-DRLSCwCk.js";import"./send-Bx2Qr7VH.js";import"./tokens-B2fq-rL6.js";import"./deliver-56mQkDw3.js";import"./diagnostic-CDxNevIQ.js";import"./send-DKrzj_Ts.js";import"./pi-model-discovery-BbD1YJNx.js";import"./image-Cm1RUBqD.js";import"./audio-transcription-runner-DPwmBYQj.js";import"./fetch-B9tORjG8.js";import"./fetch-guard-cu7DGSRF.js";import"./api-key-rotation-CCH1wYVU.js";import"./proxy-fetch-DnjU1fEB.js";import{m as s,s as c}from"./ir-BF0M2kGp.js";import"./render-BXEUPIHe.js";import"./target-errors-CpKXh2RS.js";import"./commands-registry-D40KqYOm.js";import"./fetch-DHo17YmK.js";import"./skill-commands-Db232ZRp.js";import"./channel-activity-YIMhOAUo.js";import"./tables-btcG3yFT.js";import"./send-C1CJ-GHU.js";import"./outbound-attachment-DqEKghQp.js";import"./send-JYgM9Sm-2.js";import"./fetch-hy0JKSsm.js";import"./query-expansion-r_iXkNzt.js";import"./manager-4Y9fRgdw.js";export{i as createReplyPrefixOptions,r as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,n as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-piJASC5k.js";import"./paths-BpQOWYiT.js";import"./logger-DwWqfo66.js";import{Gr as e}from"./model-selection-vfhBuN9O.js";import{E as t,N as n,i as r,l as i,r as a,y as o}from"./pi-embedded-B_6OtP8m.js";import"./github-copilot-token-wm6mbypz.js";import"./proxy-env-BNhTHkd_.js";import"./send-DRLSCwCk.js";import"./send-Bx2Qr7VH.js";import"./tokens-B2fq-rL6.js";import"./deliver-56mQkDw3.js";import"./diagnostic-CDxNevIQ.js";import"./send-DKrzj_Ts.js";import"./pi-model-discovery-BbD1YJNx.js";import"./image-Cm1RUBqD.js";import"./audio-transcription-runner-DPwmBYQj.js";import"./fetch-B9tORjG8.js";import"./fetch-guard-cu7DGSRF.js";import"./api-key-rotation-CCH1wYVU.js";import"./proxy-fetch-DnjU1fEB.js";import{m as s,s as c}from"./ir-BF0M2kGp.js";import"./render-BXEUPIHe.js";import"./target-errors-CpKXh2RS.js";import"./commands-registry-D40KqYOm.js";import"./fetch-DHo17YmK.js";import"./skill-commands-Db232ZRp.js";import"./channel-activity-YIMhOAUo.js";import"./tables-btcG3yFT.js";import"./send-C1CJ-GHU.js";import"./outbound-attachment-DqEKghQp.js";import"./send-JYgM9Sm-2.js";import"./fetch-hy0JKSsm.js";import"./query-expansion-r_iXkNzt.js";import"./manager-4Y9fRgdw.js";export{i as createReplyPrefixOptions,r as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,n as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,k as n,y as r}from"./subsystem-BLbY429l.js";import{u as i}from"./paths-BjD3T_xq.js";import{Cn as a,Fo as o,Kr as s,On as c,Po as l,Qa as u,Xr as d,Yc as f,ba as p,du as m,fu as h,jo as g,jt as _,ya as v}from"./auth-profiles-T8DuH3ax.js";import{t as y}from"./command-format-CLxIPuLR.js";import{d as b}from"./agent-scope-DAWJwFfl.js";import{E as x}from"./session-key-C7F_iqYg.js";import{t as S}from"./openclaw-root-CnsBf6ZU.js";import{n as C,t as w}from"./version-q3SkUw2K.js";import{lt as T,n as E}from"./plugins-DNlgeTTc.js";import{n as D}from"./exec-B3eleY5O.js";import{En as O,Mt as k,_n as A,bn as j,fn as M,jt as ee,pn as N,vn as P,xn as F,yn as I}from"./compact-Dg66DXx_.js";import{c as L}from"./paths-BfjJY2VL.js";import{d as te,l as ne,n as R,r as z}from"./session-utils-8acNlxwP.js";import{n as B,t as re}from"./call-B8Fb4_oh.js";import{b as V,v as H,y as U}from"./pi-tools.policy-D40r0HmD.js";import{n as W}from"./format-relative-DkMjYy7z.js";import{a as ie}from"./skill-commands-CSF6wVPU.js";import{r as G}from"./format-duration-C8AzNqKh.js";import{o as ae,s as oe}from"./command-secret-targets-BlN-J_fA.js";import{C as se,g as ce}from"./onboard-helpers-PGl5bVPE.js";import{t as K}from"./search-manager-Bp9x20r6.js";import{n as q}from"./progress-d1m2sqR1.js";import{t as le}from"./skills-status-DswSl5aD.js";import{t as ue}from"./issue-format-C_lNzrKa.js";import{t as de}from"./channels-status-issues-8eFrGKyf.js";import{c as fe,n as pe}from"./service-DZ9EbS15.js";import{t as me}from"./runtime-status-DszMjvJK.js";import{r as he,t as ge}from"./probe-auth-VI96zmTK.js";import{t as _e}from"./diagnostics-Cdctg9K_.js";import{n as J,t as ve}from"./table-CR7TFMew.js";import{o as ye,t as be}from"./health-PaRHFItm.js";import{a as xe,g as Se,m as Ce,n as we,t as Te}from"./channel-account-context-DAcarnqW.js";import{t as Ee}from"./audit-jkdcAUep.js";import{t as De}from"./node-service-C0bl7jcZ.js";import{n as Y,t as Oe}from"./format-Ce7I7s-k.js";import{i as ke,n as Ae,r as je,t as Me}from"./status.update-B_8Gumuc.js";import{t as Ne}from"./text-format-DEWK6oCT.js";import{spawnSync as Pe}from"node:child_process";import Fe from"node:os";import Ie from"node:path";import Le from"node:fs";import Re from"node:fs/promises";function ze(e){if(!Array.isArray(e))return null;let t=e,n=t.find(e=>e.mode===`gateway`&&e.reason===`self`)??t.find(e=>typeof e.text==`string`&&String(e.text).startsWith(`Gateway:`))??null;return n?{host:typeof n.host==`string`?n.host:void 0,ip:typeof n.ip==`string`?n.ip:void 0,version:typeof n.version==`string`?n.version:void 0,platform:typeof n.platform==`string`?n.platform:void 0}:null}function Be(e){return e.enabled?e.available===!0?{tone:`ok`,state:`ready`}:e.available===!1?{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`unknown`}:{tone:`muted`,state:`disabled`}}function Ve(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function He(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function Ue(e){return typeof e==`string`?e.trim():``}function We(){return Ue(Pe(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Fe.release()}function Ge(){let e=Fe.platform(),t=Fe.release(),n=Fe.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${We()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function Ke(e){try{return await Re.access(e),!0}catch{return!1}}async function qe(e){let t=z(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return b(e,t.id)}catch{return null}})(),i=r==null?null:await Ke(Ie.join(r,`BOOTSTRAP.md`)),a=L(e.session?.store,{agentId:t.id}),o=(()=>{try{return _(a)}catch{return{}}})(),s=Object.values(o).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),c=s>0?s:null,l=c?n-c:null,u=Object.keys(o).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:i,sessionsPath:a,sessionsCount:u,lastUpdatedAt:c,lastActiveAgeMs:l}})),i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}const X=e=>e&&typeof e==`object`?e:{};function Z(e){let t=new Map;for(let n of e){let e=n?.trim()?n.trim():`unknown`;t.set(e,(t.get(e)??0)+1)}let n=[...t.entries()].toSorted((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}${t>1?`×${t}`:``}`);return{label:n.length>0?n.join(`+`):`unknown`,parts:n}}function Je(e){let t=e?.trim()||``;if(!t)return null;try{return Le.existsSync(t)}catch{return null}}function Q(e,t){let n=e.trim();if(!n)return`empty`;if(!t.showSecrets)return`sha256:${u(n,8)} · len ${n.length}`;let r=n.slice(0,4),i=n.slice(-4);return n.length<=10?`${n} · len ${n.length}`:`${r}…${i} · len ${n.length}`}function Ye(e,t,n){return e.config.inspectAccount?.(t,n)??H({channelId:e.id,cfg:t,accountId:n})}async function Xe(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Ye(t,r,i),o=Ye(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&U(a)&&(!V(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??F({plugin:t,account:d,cfg:n}),m=f?.configured??await j({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:P({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Ze=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},Qe=e=>{let{plugin:t,cfg:n,entry:r}=e,i=[],a=r.snapshot;a.enabled===!1&&i.push(`disabled`),a.dmPolicy&&i.push(`dm:${a.dmPolicy}`),a.tokenSource&&a.tokenSource!==`none`&&i.push(`token:${a.tokenSource}`),a.botTokenSource&&a.botTokenSource!==`none`&&i.push(`bot:${a.botTokenSource}`),a.appTokenSource&&a.appTokenSource!==`none`&&i.push(`app:${a.appTokenSource}`),a.signingSecretSource&&a.signingSecretSource!==`none`&&i.push(`signing:${a.signingSecretSource}`),U(r.account)&&i.push(`secret unavailable in this command path`),a.baseUrl&&i.push(a.baseUrl),a.port!=null&&i.push(`port:${a.port}`),a.cliPath&&i.push(`cli:${a.cliPath}`),a.dbPath&&i.push(`db:${a.dbPath}`);let o=t.config.resolveAllowFrom?.({cfg:n,accountId:a.accountId})??a.allowFrom;if(o?.length){let e=I({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function $e(e){let t=X(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=X(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function et(e){let t=[];for(let n of e){let e=X(n.account),r=X(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];Je(i)===!1&&t.push(String(i))}}return t}function tt(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>X(e.account)),r=n.some(e=>`botToken`in e),i=n.some(e=>`appToken`in e),a=n.some(e=>`signingSecret`in e||`signingSecretSource`in e||`signingSecretStatus`in e),o=n.some(e=>`token`in e);if(!r&&!i&&!a&&!o)return{state:null,detail:null};let s=e=>typeof e.mode==`string`&&e.mode.trim()===`http`,c=(e,t,n)=>{let r=e[t];return typeof r==`string`&&r.trim()?!0:e[n]===`available`};if(r&&a&&t.every(e=>s(X(e.account)))){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=X(e.account),n=c(t,`botToken`,`botTokenStatus`),r=c(t,`signingSecret`,`signingSecretStatus`);return n&&!r||!n&&r});if(n.length>0)return{state:`warn`,detail:`configured http credentials unavailable in this command path · accounts ${n.length}`};if(i.length>0)return{state:`warn`,detail:`partial credentials (need bot+signing) · accounts ${i.length}`};if(r.length===0)return{state:`setup`,detail:`no credentials (need bot+signing)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?X(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Q(u,{showSecrets:e.showSecrets}):``,p=d||f?` (bot ${d||`?`}, signing ${f||`?`})`:``;return{state:`ok`,detail:`credentials ok (bot ${a.label}, signing ${o.label})${p} · accounts ${r.length}/${t.length||1}`}}if(r&&i){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``;return!!n&&!!r}),i=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``,i=!!n,a=!!r;return i&&!a||!i&&a});if(i.length>0)return{state:`warn`,detail:`partial tokens (need bot+app) · accounts ${i.length}`};if(n.length>0)return{state:`warn`,detail:`configured tokens unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no tokens (need bot+app)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?X(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Q(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u||d?` (bot ${u||`?`}, app ${d||`?`})`:``;return{state:`ok`,detail:`tokens ok (bot ${a.label}, app ${o.label})${f} · accounts ${r.length}/${t.length||1}`}}if(r){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account);return!!(typeof t.botToken==`string`&&t.botToken.trim())});if(n.length>0)return{state:`warn`,detail:`configured bot token unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no bot token`};let i=r[0]?.account?X(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Q(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>U(e.account)),u=t.filter(e=>{let t=X(e.account);return typeof t.token==`string`?!!t.token.trim():!1});if(l.length>0)return{state:`warn`,detail:`configured token unavailable in this command path · accounts ${l.length}`};if(u.length===0)return{state:`setup`,detail:`no token`};let d=Z(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?X(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Q(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function nt(e,t){let n=t?.showSecrets===!0,r=[],i=[];for(let a of E()){let o=a.config.listAccountIds(e),s=T({plugin:a,cfg:e,accountIds:o}),c=o.length>0?o:[s],l=[],u=t?.sourceConfig??e;for(let t of c)l.push(await Xe({plugin:a,cfg:e,sourceConfig:u,accountId:t}));let d=l.some(e=>e.enabled),f=l.filter(e=>e.enabled),p=f.filter(e=>e.configured),m=f.filter(e=>U(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=$e(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=et(f),v=tt({plugin:a,cfg:e,accounts:l,showSecrets:n}),y=a.status?.collectStatusIssues?a.status.collectStatusIssues(l.map(e=>e.snapshot)):[],b=a.meta.label??a.id,x=d?_.length>0||y.length>0||m.length>0?`warn`:g.linked===!1?`setup`:v.state?v.state:g.linked===!0||p.length>0?`ok`:`setup`:`off`,S=(()=>{if(!d)return h?a.config.disabledReason?.(h.account,e)??`disabled`:`disabled`;if(_.length>0)return`missing file (${_[0]})`;if(y.length>0)return y[0]?.message??`misconfigured`;if(g.linked!==null){let e=g.linked?`linked`:`not linked`,t=[];return g.linked&&g.selfE164&&t.push(g.selfE164),g.linked&&g.authAgeMs!=null&&g.authAgeMs>=0&&t.push(`auth ${W(g.authAgeMs)}`),(l.length>1||a.meta.forceAccountBinding)&&t.push(`accounts ${l.length||1}`),t.length>0?`${e} · ${t.join(` · `)}`:e}if(m.length>0)return v.detail?.includes(`unavailable`)?v.detail:`configured credentials unavailable in this command path · accounts ${m.length}`;if(v.detail)return v.detail;if(p.length>0){let e=`configured`;return l.length<=1&&!a.meta.forceAccountBinding?e:`${e} · accounts ${p.length}/${f.length||1}`}return(h&&a.config.unconfiguredReason?a.config.unconfiguredReason(h.account,e):null)??`not configured`})();r.push({id:a.id,label:b,enabled:d,state:x,detail:S}),p.length>0&&i.push({title:`${b} accounts`,columns:[`Account`,`Status`,`Notes`],rows:p.map(t=>{let n=Qe({plugin:a,cfg:e,entry:t});return{Account:Ze({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!U(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function rt(e,t){let n=await Re.readFile(e,`utf8`).catch(()=>``);if(!n.trim())return[];let r=n.replace(/\r/g,``).split(`
1
+ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,k as n,y as r}from"./subsystem-BLbY429l.js";import{u as i}from"./paths-BjD3T_xq.js";import{Cn as a,Fo as o,Kr as s,On as c,Po as l,Qa as u,Xr as d,Yc as f,ba as p,du as m,fu as h,jo as g,jt as _,ya as v}from"./auth-profiles-T8DuH3ax.js";import{t as y}from"./command-format-CLxIPuLR.js";import{d as b}from"./agent-scope-DAWJwFfl.js";import{E as x}from"./session-key-C7F_iqYg.js";import{t as S}from"./openclaw-root-CnsBf6ZU.js";import{n as C,t as w}from"./version-q3SkUw2K.js";import{lt as T,n as E}from"./plugins-DNlgeTTc.js";import{n as D}from"./exec-B3eleY5O.js";import{En as O,Mt as k,_n as A,bn as j,fn as M,jt as ee,pn as N,vn as P,xn as F,yn as I}from"./compact-BEeB6bwq.js";import{c as L}from"./paths-BfjJY2VL.js";import{d as te,l as ne,n as R,r as z}from"./session-utils-8acNlxwP.js";import{n as B,t as re}from"./call-B8Fb4_oh.js";import{b as V,v as H,y as U}from"./pi-tools.policy-D40r0HmD.js";import{n as W}from"./format-relative-DkMjYy7z.js";import{a as ie}from"./skill-commands-CSF6wVPU.js";import{r as G}from"./format-duration-C8AzNqKh.js";import{o as ae,s as oe}from"./command-secret-targets-BlN-J_fA.js";import{C as se,g as ce}from"./onboard-helpers-PGl5bVPE.js";import{t as K}from"./search-manager-Bp9x20r6.js";import{n as q}from"./progress-d1m2sqR1.js";import{t as le}from"./skills-status-DswSl5aD.js";import{t as ue}from"./issue-format-C_lNzrKa.js";import{t as de}from"./channels-status-issues-8eFrGKyf.js";import{c as fe,n as pe}from"./service-DZ9EbS15.js";import{t as me}from"./runtime-status-DszMjvJK.js";import{r as he,t as ge}from"./probe-auth-VI96zmTK.js";import{t as _e}from"./diagnostics-Cdctg9K_.js";import{n as J,t as ve}from"./table-CR7TFMew.js";import{o as ye,t as be}from"./health-DBu0V1Y-.js";import{a as xe,g as Se,m as Ce,n as we,t as Te}from"./channel-account-context-DAcarnqW.js";import{t as Ee}from"./audit-jkdcAUep.js";import{t as De}from"./node-service-C0bl7jcZ.js";import{n as Y,t as Oe}from"./format-Ce7I7s-k.js";import{i as ke,n as Ae,r as je,t as Me}from"./status.update-B_8Gumuc.js";import{t as Ne}from"./text-format-DEWK6oCT.js";import{spawnSync as Pe}from"node:child_process";import Fe from"node:os";import Ie from"node:path";import Le from"node:fs";import Re from"node:fs/promises";function ze(e){if(!Array.isArray(e))return null;let t=e,n=t.find(e=>e.mode===`gateway`&&e.reason===`self`)??t.find(e=>typeof e.text==`string`&&String(e.text).startsWith(`Gateway:`))??null;return n?{host:typeof n.host==`string`?n.host:void 0,ip:typeof n.ip==`string`?n.ip:void 0,version:typeof n.version==`string`?n.version:void 0,platform:typeof n.platform==`string`?n.platform:void 0}:null}function Be(e){return e.enabled?e.available===!0?{tone:`ok`,state:`ready`}:e.available===!1?{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`unknown`}:{tone:`muted`,state:`disabled`}}function Ve(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function He(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function Ue(e){return typeof e==`string`?e.trim():``}function We(){return Ue(Pe(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Fe.release()}function Ge(){let e=Fe.platform(),t=Fe.release(),n=Fe.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${We()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function Ke(e){try{return await Re.access(e),!0}catch{return!1}}async function qe(e){let t=z(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return b(e,t.id)}catch{return null}})(),i=r==null?null:await Ke(Ie.join(r,`BOOTSTRAP.md`)),a=L(e.session?.store,{agentId:t.id}),o=(()=>{try{return _(a)}catch{return{}}})(),s=Object.values(o).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),c=s>0?s:null,l=c?n-c:null,u=Object.keys(o).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:i,sessionsPath:a,sessionsCount:u,lastUpdatedAt:c,lastActiveAgeMs:l}})),i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}const X=e=>e&&typeof e==`object`?e:{};function Z(e){let t=new Map;for(let n of e){let e=n?.trim()?n.trim():`unknown`;t.set(e,(t.get(e)??0)+1)}let n=[...t.entries()].toSorted((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}${t>1?`×${t}`:``}`);return{label:n.length>0?n.join(`+`):`unknown`,parts:n}}function Je(e){let t=e?.trim()||``;if(!t)return null;try{return Le.existsSync(t)}catch{return null}}function Q(e,t){let n=e.trim();if(!n)return`empty`;if(!t.showSecrets)return`sha256:${u(n,8)} · len ${n.length}`;let r=n.slice(0,4),i=n.slice(-4);return n.length<=10?`${n} · len ${n.length}`:`${r}…${i} · len ${n.length}`}function Ye(e,t,n){return e.config.inspectAccount?.(t,n)??H({channelId:e.id,cfg:t,accountId:n})}async function Xe(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Ye(t,r,i),o=Ye(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&U(a)&&(!V(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??F({plugin:t,account:d,cfg:n}),m=f?.configured??await j({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:P({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Ze=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},Qe=e=>{let{plugin:t,cfg:n,entry:r}=e,i=[],a=r.snapshot;a.enabled===!1&&i.push(`disabled`),a.dmPolicy&&i.push(`dm:${a.dmPolicy}`),a.tokenSource&&a.tokenSource!==`none`&&i.push(`token:${a.tokenSource}`),a.botTokenSource&&a.botTokenSource!==`none`&&i.push(`bot:${a.botTokenSource}`),a.appTokenSource&&a.appTokenSource!==`none`&&i.push(`app:${a.appTokenSource}`),a.signingSecretSource&&a.signingSecretSource!==`none`&&i.push(`signing:${a.signingSecretSource}`),U(r.account)&&i.push(`secret unavailable in this command path`),a.baseUrl&&i.push(a.baseUrl),a.port!=null&&i.push(`port:${a.port}`),a.cliPath&&i.push(`cli:${a.cliPath}`),a.dbPath&&i.push(`db:${a.dbPath}`);let o=t.config.resolveAllowFrom?.({cfg:n,accountId:a.accountId})??a.allowFrom;if(o?.length){let e=I({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function $e(e){let t=X(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=X(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function et(e){let t=[];for(let n of e){let e=X(n.account),r=X(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];Je(i)===!1&&t.push(String(i))}}return t}function tt(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>X(e.account)),r=n.some(e=>`botToken`in e),i=n.some(e=>`appToken`in e),a=n.some(e=>`signingSecret`in e||`signingSecretSource`in e||`signingSecretStatus`in e),o=n.some(e=>`token`in e);if(!r&&!i&&!a&&!o)return{state:null,detail:null};let s=e=>typeof e.mode==`string`&&e.mode.trim()===`http`,c=(e,t,n)=>{let r=e[t];return typeof r==`string`&&r.trim()?!0:e[n]===`available`};if(r&&a&&t.every(e=>s(X(e.account)))){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=X(e.account),n=c(t,`botToken`,`botTokenStatus`),r=c(t,`signingSecret`,`signingSecretStatus`);return n&&!r||!n&&r});if(n.length>0)return{state:`warn`,detail:`configured http credentials unavailable in this command path · accounts ${n.length}`};if(i.length>0)return{state:`warn`,detail:`partial credentials (need bot+signing) · accounts ${i.length}`};if(r.length===0)return{state:`setup`,detail:`no credentials (need bot+signing)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?X(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Q(u,{showSecrets:e.showSecrets}):``,p=d||f?` (bot ${d||`?`}, signing ${f||`?`})`:``;return{state:`ok`,detail:`credentials ok (bot ${a.label}, signing ${o.label})${p} · accounts ${r.length}/${t.length||1}`}}if(r&&i){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``;return!!n&&!!r}),i=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``,i=!!n,a=!!r;return i&&!a||!i&&a});if(i.length>0)return{state:`warn`,detail:`partial tokens (need bot+app) · accounts ${i.length}`};if(n.length>0)return{state:`warn`,detail:`configured tokens unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no tokens (need bot+app)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?X(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Q(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u||d?` (bot ${u||`?`}, app ${d||`?`})`:``;return{state:`ok`,detail:`tokens ok (bot ${a.label}, app ${o.label})${f} · accounts ${r.length}/${t.length||1}`}}if(r){let n=t.filter(e=>U(e.account)),r=t.filter(e=>{let t=X(e.account);return!!(typeof t.botToken==`string`&&t.botToken.trim())});if(n.length>0)return{state:`warn`,detail:`configured bot token unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no bot token`};let i=r[0]?.account?X(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Q(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>U(e.account)),u=t.filter(e=>{let t=X(e.account);return typeof t.token==`string`?!!t.token.trim():!1});if(l.length>0)return{state:`warn`,detail:`configured token unavailable in this command path · accounts ${l.length}`};if(u.length===0)return{state:`setup`,detail:`no token`};let d=Z(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?X(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Q(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function nt(e,t){let n=t?.showSecrets===!0,r=[],i=[];for(let a of E()){let o=a.config.listAccountIds(e),s=T({plugin:a,cfg:e,accountIds:o}),c=o.length>0?o:[s],l=[],u=t?.sourceConfig??e;for(let t of c)l.push(await Xe({plugin:a,cfg:e,sourceConfig:u,accountId:t}));let d=l.some(e=>e.enabled),f=l.filter(e=>e.enabled),p=f.filter(e=>e.configured),m=f.filter(e=>U(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=$e(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=et(f),v=tt({plugin:a,cfg:e,accounts:l,showSecrets:n}),y=a.status?.collectStatusIssues?a.status.collectStatusIssues(l.map(e=>e.snapshot)):[],b=a.meta.label??a.id,x=d?_.length>0||y.length>0||m.length>0?`warn`:g.linked===!1?`setup`:v.state?v.state:g.linked===!0||p.length>0?`ok`:`setup`:`off`,S=(()=>{if(!d)return h?a.config.disabledReason?.(h.account,e)??`disabled`:`disabled`;if(_.length>0)return`missing file (${_[0]})`;if(y.length>0)return y[0]?.message??`misconfigured`;if(g.linked!==null){let e=g.linked?`linked`:`not linked`,t=[];return g.linked&&g.selfE164&&t.push(g.selfE164),g.linked&&g.authAgeMs!=null&&g.authAgeMs>=0&&t.push(`auth ${W(g.authAgeMs)}`),(l.length>1||a.meta.forceAccountBinding)&&t.push(`accounts ${l.length||1}`),t.length>0?`${e} · ${t.join(` · `)}`:e}if(m.length>0)return v.detail?.includes(`unavailable`)?v.detail:`configured credentials unavailable in this command path · accounts ${m.length}`;if(v.detail)return v.detail;if(p.length>0){let e=`configured`;return l.length<=1&&!a.meta.forceAccountBinding?e:`${e} · accounts ${p.length}/${f.length||1}`}return(h&&a.config.unconfiguredReason?a.config.unconfiguredReason(h.account,e):null)??`not configured`})();r.push({id:a.id,label:b,enabled:d,state:x,detail:S}),p.length>0&&i.push({title:`${b} accounts`,columns:[`Account`,`Status`,`Notes`],rows:p.map(t=>{let n=Qe({plugin:a,cfg:e,entry:t});return{Account:Ze({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!U(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function rt(e,t){let n=await Re.readFile(e,`utf8`).catch(()=>``);if(!n.trim())return[];let r=n.replace(/\r/g,``).split(`
2
2
  `);return r.slice(Math.max(0,r.length-t)).map(e=>e.trimEnd()).filter(e=>e.trim().length>0)}function it(e,t){return!e||!t?0:e.split(t).length-1}function at(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,Math.max(0,t-1))}…`}function ot(e){return e.replace(/\s+runId=[^\s]+/g,``).replace(/\s+conn=[^\s]+/g,``).replace(/\s+id=[^\s]+/g,``).replace(/\s+error=Error:.*$/g,``).trim()}function st(e,t){let n=e[t]??``,r=n.indexOf(`{`);if(r<0)return null;let i=[n.slice(r)],a=it(i[0]??``,`{`)-it(i[0]??``,`}`),o=t;for(;a>0&&o+1<e.length;){o+=1;let t=e[o]??``;i.push(t),a+=it(t,`{`)-it(t,`}`)}return{json:i.join(`
3
3
  `),endIndex:o}}function ct(e,t){let n=Math.max(6,t?.maxLines??26),r=[],i=new Map,a=(e,t)=>{let n=i.get(e);if(n){n.count+=1;return}i.set(e,{count:1,index:r.length,base:t}),r.push(t)},o=e=>{let t=e.trimEnd();t&&r.push(t)},s=e.map(e=>e.trimEnd()).filter(Boolean);for(let e=0;e<s.length;e+=1){let t=s[e]??``,n=t.trimStart();if((n.startsWith(`"`)||n===`}`||n===`{`||n.startsWith(`}`)||n.startsWith(`{`))&&!n.startsWith(`[`)&&!n.startsWith(`#`))continue;let r=t.match(/^\[([^\]]+)\]\s+Token refresh failed:\s*(\d+)\s*(\{)?\s*$/);if(r){let t=r[1]??`unknown`,n=r[2]??`unknown`,i=st(s,e);if(i){e=i.endIndex;let r=(()=>{try{return JSON.parse(i.json)}catch{return null}})(),o=r?.error?.code?.trim()||null,s=r?.error?.message?.trim()||null,c=s?s.toLowerCase().includes(`signing in again`)?`re-auth required`:at(s,52):null,l=`[${t}] token refresh ${n}${o?` ${o}`:``}${c?` · ${c}`:``}`;a(`token:${t}:${n}:${o??``}:${c??``}`,l);continue}}let i=t.match(/^Embedded agent failed before reply:\s+OAuth token refresh failed for ([^:]+):/);if(i){let e=i[1]?.trim()||`unknown`;a(`embedded:${e}`,`Embedded agent: OAuth token refresh failed (${e})`);continue}if(t.startsWith(`[gws]`)&&t.includes(`errorCode=UNAVAILABLE`)&&t.includes(`OAuth token refresh failed`)){let e=ot(t);a(`gws:${e}`,e);continue}o(t)}for(let e of i.values())e.count<=1||(r[e.index]=`${e.base} ×${e.count}`);let c=[];for(let e of r)c[c.length-1]!==e&&c.push(e);if(c.length<=n)return c;let l=Math.min(6,Math.floor(n/3)),u=Math.max(1,n-l-1);return[...c.slice(0,l),`… ${c.length-l-u} lines omitted …`,...c.slice(-u)]}function lt(e){let t=new Map;for(let n of e){let e=n.channel,r=t.get(e);r?r.push(n):t.set(e,[n])}return t}async function ut(e){let{lines:t,muted:n,ok:r,warn:i,fail:a}=e,o=(e,n)=>{let o=n===`ok`?r(`✓`):n===`warn`?i(`!`):a(`✗`),s=n===`ok`?r(e):n===`warn`?i(e):a(e);t.push(`${o} ${s}`)};t.push(``),t.push(n(`Gateway connection details:`));for(let r of Y(e.connectionDetailsForReport).split(`
4
4
  `).map(e=>e.trimEnd()))t.push(` ${n(r)}`);if(t.push(``),e.snap){let r=e.snap.exists?e.snap.valid?`ok`:`warn`:`fail`;o(`Config: ${e.snap.path??`(unknown)`}`,r);let i=[...e.snap.legacyIssues??[],...e.snap.issues??[]],a=i.filter((e,t)=>i.findIndex(t=>t.path===e.path&&t.message===e.message)===t);for(let e of a.slice(0,12))t.push(` ${ue(e,`-`)}`);a.length>12&&t.push(` ${n(`… +${a.length-12} more`)}`)}else o(`Config: read failed`,`warn`);e.remoteUrlMissing&&(t.push(``),o(`Gateway remote mode misconfigured (gateway.remote.url missing)`,`warn`),t.push(` ${n(`Fix: set gateway.remote.url, or set gateway.mode=local.`)}`)),e.sentinel?.payload?(o(`Restart sentinel present`,`warn`),t.push(` ${n(`${k(e.sentinel.payload)} · ${W(Date.now()-e.sentinel.payload.ts)}`)}`)):o(`Restart sentinel: none`,`ok`);let s=e.lastErr?.trim()??``,c=s.length<8||s===`}`||s===`{`;if(s&&!c&&(t.push(``),t.push(n(`Gateway last log line:`)),t.push(` ${n(Y(s))}`)),e.portUsage){let r=e.portUsage.listeners.length===0;if(o(`Port ${e.port}`,r?`ok`:`warn`),!r)for(let r of d(e.portUsage))t.push(` ${n(r)}`)}{let r=e.tailscale.backendState??`unknown`,i=r===`Running`,a=!!e.tailscale.dnsName;o(e.tailscaleMode===`off`?`Tailscale: off · ${r}${e.tailscale.dnsName?` · ${e.tailscale.dnsName}`:``}`:`Tailscale: ${e.tailscaleMode} · ${r}${e.tailscale.dnsName?` · ${e.tailscale.dnsName}`:``}`,i&&(e.tailscaleMode===`off`||a)?`ok`:`warn`),e.tailscale.error&&t.push(` ${n(`error: ${e.tailscale.error}`)}`),e.tailscale.ips.length>0&&t.push(` ${n(`ips: ${e.tailscale.ips.slice(0,3).join(`, `)}${e.tailscale.ips.length>3?`…`:``}`)}`),e.tailscaleHttpsUrl&&t.push(` ${n(`https: ${e.tailscaleHttpsUrl}`)}`)}if(e.skillStatus){let t=e.skillStatus.skills.filter(e=>e.eligible).length,n=e.skillStatus.skills.filter(e=>e.eligible&&Object.values(e.missing).some(e=>e.length)).length;o(`Skills: ${t} eligible · ${n} missing · ${e.skillStatus.workspaceDir}`,n===0?`ok`:`warn`)}e.progress.setLabel(`Reading logs…`);let l=(()=>{try{return fe(process.env)}catch{return null}})();if(l){e.progress.setLabel(`Reading logs…`);let[r,i]=await Promise.all([rt(l.stderrPath,40).catch(()=>[]),rt(l.stdoutPath,40).catch(()=>[])]);if(r.length>0||i.length>0){t.push(``),t.push(n(`Gateway logs (tail, summarized): ${l.logDir}`)),t.push(` ${n(`# stderr: ${l.stderrPath}`)}`);for(let e of ct(r,{maxLines:22}).map(Y))t.push(` ${n(e)}`);t.push(` ${n(`# stdout: ${l.stdoutPath}`)}`);for(let e of ct(i,{maxLines:22}).map(Y))t.push(` ${n(e)}`)}}if(e.progress.tick(),e.channelsStatus){o(`Channel issues (${e.channelIssues.length||`none`})`,e.channelIssues.length===0?`ok`:`warn`);for(let n of e.channelIssues.slice(0,12)){let e=n.fix?` · fix: ${n.fix}`:``;t.push(` - ${n.channel}[${n.accountId}] ${n.kind}: ${n.message}${e}`)}e.channelIssues.length>12&&t.push(` ${n(`… +${e.channelIssues.length-12} more`)}`)}else o(`Channel issues skipped (gateway ${e.gatewayReachable?`query failed`:`unreachable`})`,`warn`);let u=(()=>{if(!e.health||typeof e.health!=`object`)return``;let t=e.health;if(!(`error`in t))return``;let n=t.error;if(!n)return``;if(typeof n==`string`)return n;try{return JSON.stringify(n,null,2)}catch{return`[unserializable error]`}})();u&&(t.push(``),t.push(n(`Gateway health:`)),t.push(` ${n(Y(u))}`)),t.push(``),t.push(n(`Pasteable debug report. Auth tokens redacted.`)),t.push(`Troubleshooting: https://docs.openclaw.ai/troubleshooting`),t.push(``)}async function dt(e){let r=n(),i=e=>r?t.heading(e):e,a=e=>r?t.success(e):e,o=e=>r?t.warn(e):e,s=e=>r?t.error(e):e,c=e=>r?t.muted(e):e,l=ve(),u=J({width:l,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Value`,header:`Value`,flex:!0,minWidth:24}],rows:e.overviewRows}),d=e.channels.rows.map(e=>({channelId:e.id,Channel:e.label,Enabled:e.enabled?a(`ON`):c(`OFF`),State:e.state===`ok`?a(`OK`):e.state===`warn`?o(`WARN`):e.state===`off`?c(`OFF`):t.accentDim(`SETUP`),Detail:e.detail})),f=lt(e.channelIssues),p=J({width:l,columns:[{key:`Channel`,header:`Channel`,minWidth:10},{key:`Enabled`,header:`Enabled`,minWidth:7},{key:`State`,header:`State`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:28}],rows:d.map(e=>{let t=f.get(e.channelId)??[];if(t.length===0)return e;let n=t[0],r=` · ${o(`gateway: ${String(n.message).slice(0,90)}`)}`;return{...e,State:o(`WARN`),Detail:`${e.Detail}${r}`}})}),m=J({width:l,columns:[{key:`Agent`,header:`Agent`,minWidth:12},{key:`BootstrapFile`,header:`Bootstrap file`,minWidth:14},{key:`Sessions`,header:`Sessions`,align:`right`,minWidth:8},{key:`Active`,header:`Active`,minWidth:10},{key:`Store`,header:`Store`,flex:!0,minWidth:34}],rows:e.agentStatus.agents.map(e=>({Agent:e.name?.trim()?`${e.id} (${e.name.trim()})`:e.id,BootstrapFile:e.bootstrapPending===!0?o(`PRESENT`):e.bootstrapPending===!1?a(`ABSENT`):`unknown`,Sessions:String(e.sessionsCount),Active:e.lastActiveAgeMs==null?`unknown`:W(e.lastActiveAgeMs),Store:e.sessionsPath}))}),h=[];h.push(i(`OpenClaw status --all`)),h.push(``),h.push(i(`Overview`)),h.push(u.trimEnd()),h.push(``),h.push(i(`Channels`)),h.push(p.trimEnd());for(let t of e.channels.details)h.push(``),h.push(i(t.title)),h.push(J({width:l,columns:t.columns.map(e=>({key:e,header:e,flex:e===`Notes`,minWidth:e===`Notes`?28:10})),rows:t.rows.map(e=>({...e,...e.Status===`OK`?{Status:a(`OK`)}:e.Status===`WARN`?{Status:o(`WARN`)}:{}}))}).trimEnd());return h.push(``),h.push(i(`Agents`)),h.push(m.trimEnd()),h.push(``),h.push(i(`Diagnosis (read-only)`)),await ut({lines:h,progress:e.progress,muted:c,ok:a,warn:o,fail:s,connectionDetailsForReport:e.connectionDetailsForReport,...e.diagnosis}),h}async function ft(e,t){try{let[t,n,r]=await Promise.all([e.isLoaded({env:process.env}).catch(()=>!1),e.readRuntime(process.env).catch(()=>void 0),e.readCommand(process.env).catch(()=>null)]),i=r!=null,a=!i&&n?.status===`running`,o=i||a,s=a?`running (externally managed)`:t?e.loadedText:e.notLoadedText;return{label:e.label,installed:o,loaded:t,managedByOpenClaw:i,externallyManaged:a,loadedText:s,runtime:n}}catch{return{label:t,installed:null,loaded:!1,managedByOpenClaw:!1,externallyManaged:!1,loadedText:`unknown`,runtime:void 0}}}async function pt(e,t){await q({label:`Scanning status --all…`,total:11},async n=>{n.setLabel(`Loading config…`);let r=await l(),{resolvedConfig:a}=await oe({config:r,commandName:`status --all`,targetIds:ae(),mode:`summary`}),c=Ge(),u=await o().catch(()=>null);n.tick(),n.setLabel(`Checking Tailscale…`);let d=a.gateway?.tailscale?.mode??`off`,f=await(async()=>{try{let e=await p(D,{timeoutMs:1200}),t=typeof e.BackendState==`string`?e.BackendState:null,n=typeof e.Self==`object`&&e.Self!==null?e.Self:null,r=n&&typeof n.DNSName==`string`?n.DNSName:null;return{ok:!0,backendState:t,dnsName:r?r.replace(/\.$/,``):null,ips:n&&Array.isArray(n.TailscaleIPs)?n.TailscaleIPs.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim()):[],error:null}}catch(e){return{ok:!1,backendState:null,dnsName:null,ips:[],error:String(e)}}})(),m=d!==`off`&&f.dnsName?`https://${f.dnsName}${se(a.gateway?.controlUi?.basePath)}`:null;n.tick(),n.setLabel(`Checking for updates…`);let h=await we({root:await S({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()}),timeoutMs:6500,fetchGit:!0,includeRegistry:!0}),g=Se({configChannel:Ce(a.update?.channel),installKind:h.installKind,gitTag:h.git?.tag??null,gitBranch:h.git?.branch??null}).label,_=xe(h);n.tick(),n.setLabel(`Probing gateway…`);let v=re({config:a}),b=a.gateway?.mode===`remote`,x=typeof a.gateway?.remote?.url==`string`?a.gateway.remote.url.trim():``,C=b&&!x,T=b?`remote`:`local`,E=ge({cfg:a,mode:`local`}),O=ge({cfg:a,mode:`remote`}),k=b&&!C?O:E,A=k.auth,j=await he({url:v.url,auth:A,timeoutMs:Math.min(5e3,t?.timeoutMs??1e4)}).catch(()=>null),M=j?.ok===!0,N=ze(j?.presence??null);n.tick(),n.setLabel(`Checking services…`);let P=async e=>{try{let t=await ft(e,e.label);return{label:t.label,installed:t.installed,managedByOpenClaw:t.managedByOpenClaw,loaded:t.loaded,loadedText:t.loadedText,runtime:t.runtime}}catch{return null}},F=await P(pe()),I=await P(De());n.tick(),n.setLabel(`Scanning agents…`);let L=await qe(a);n.tick(),n.setLabel(`Summarizing channels…`);let te=await nt(a,{showSecrets:!1,sourceConfig:r});n.tick();let ne=(()=>{if(!C)return v.message;let e=a.gateway?.bind??`loopback`;return[`Gateway mode: remote`,`Gateway target: (missing gateway.remote.url)`,`Config: ${u?.path?.trim()?u.path.trim():`(unknown config path)`}`,`Bind: ${e}`,`Local fallback (used for probes): ${v.url}`,`Fix: set gateway.remote.url, or set gateway.mode=local.`].join(`
@@ -6,4 +6,4 @@ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,k as n,y as r}f
6
6
  `)),n.tick()})}const $=e=>`${(e/1e3).toFixed(e>=1e4?0:1)}k`,mt=e=>e==null||!Number.isFinite(e)?`unknown`:G(e,{decimals:1}),ht=e=>{let t=e.totalTokens,n=e.contextTokens,r=e.cacheRead,i=e.cacheWrite,a=``;if(t==null)a=n?`unknown/${$(n)} (?%)`:`unknown used`;else if(!n)a=`${$(t)} used`;else{let r=e.percentUsed==null?`?%`:`${e.percentUsed}%`;a=`${$(t)}/${$(n)} (${r})`}if(typeof r==`number`&&r>0){let e=typeof t==`number`?t:r+(typeof i==`number`?i:0),n=Math.round(r/e*100);a+=` · 🗄️ ${n}% cached`}return a},gt=e=>{if(!e)return null;let t=[],n=e.detail?.replace(/\s+/g,` `).trim()||``,r=e.missingUnit===!0&&n.toLowerCase().includes(`could not find service`);return n&&!r&&t.push(n),me({status:e.status,pid:e.pid,state:e.state,details:t})};async function _t(e){let t=await ft(e===`gateway`?pe():De(),e===`gateway`?`Daemon`:`Node`);return{label:t.label,installed:t.installed,managedByOpenClaw:t.managedByOpenClaw,externallyManaged:t.externallyManaged,loadedText:t.loadedText,runtimeShort:gt(t.runtime)}}async function vt(){return await _t(`gateway`)}async function yt(){return await _t(`node`)}async function bt(e){try{return await Re.access(e),!0}catch{return!1}}async function xt(e=g()){let t=z(e),n=Date.now(),r=[];for(let i of t.agents){let t=i.id,a=(()=>{try{return b(e,t)}catch{return null}})(),o=a==null?null:Ie.join(a,`BOOTSTRAP.md`),s=o==null?null:await bt(o),c=L(e.session?.store,{agentId:t}),l=(()=>{try{return _(c)}catch{return{}}})(),u=Object.entries(l).filter(([e])=>e!==`global`&&e!==`unknown`).map(([,e])=>e),d=u.length,f=u.reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),p=f>0?f:null,m=p?n-p:null;r.push({id:t,name:i.name,workspaceDir:a,bootstrapPending:s,sessionsPath:c,sessionsCount:d,lastUpdatedAt:p,lastActiveAgeMs:m})}let i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}function St(e){return ge({cfg:e,mode:e.gateway?.mode===`remote`?`remote`:`local`,env:process.env})}async function Ct(e){for(let t of E()){let{defaultAccountId:n,account:r,enabled:i,configured:a}=await Te(t,e),o=t.config.describeAccount?t.config.describeAccount(r,e):{accountId:n,enabled:i,configured:a},s=t.status?.buildChannelSummary?await t.status.buildChannelSummary({account:r,cfg:e,defaultAccountId:n,snapshot:o}):void 0,c=s&&typeof s.linked==`boolean`?s.linked:null;if(c!==null)return{linked:c,authAgeMs:s&&typeof s.authAgeMs==`number`?s.authAgeMs:null,account:r,accountId:n,plugin:t}}return null}const wt=e=>{if(!e)return[];let t=[],n=e?.thinkingLevel;typeof n==`string`&&n.length>0&&t.push(`think:${n}`);let r=e?.verboseLevel;typeof r==`string`&&r.length>0&&t.push(`verbose:${r}`);let i=e?.reasoningLevel;typeof i==`string`&&i.length>0&&t.push(`reasoning:${i}`);let a=e?.elevatedLevel;typeof a==`string`&&a.length>0&&t.push(`elevated:${a}`),e?.systemSent&&t.push(`system`),e?.abortedLastRun&&t.push(`aborted`);let o=e?.sessionId;return typeof o==`string`&&o.length>0&&t.push(`id:${o}`),t};function Tt(e){return{...e,sessions:{...e.sessions,paths:[],defaults:{model:null,contextTokens:null},recent:[],byAgent:e.sessions.byAgent.map(e=>({...e,path:`[redacted]`,recent:[]}))}}}async function Et(e={}){let{includeSensitive:t=!0}=e,n=e.config??g(),r=await Ct(n),i=z(n),o=i.agents.map(e=>{let t=ye(n,e.id);return{agentId:e.id,enabled:t.enabled,every:t.every,everyMs:t.everyMs}}),s=await A(n,{colorize:!0,includeAllowFrom:!0,sourceConfig:e.sourceConfig}),l=O(c(n)),u=f({cfg:n,defaultProvider:h,defaultModel:m}),d=u.model??`claude-opus-4-6`,p=te({cfg:n,provider:u.provider??`anthropic`,model:d,contextTokensOverride:n.agents?.defaults?.contextTokens,fallbackContextTokens:2e5})??2e5,v=Date.now(),y=new Map,b=e=>{let t=y.get(e);if(t)return t;let n=_(e);return y.set(e,n),n},S=(e,t={})=>Object.entries(e).filter(([e])=>e!==`global`&&e!==`unknown`).map(([e,r])=>{let i=r?.updatedAt??null,o=i?v-i:null,s=ne(n,r,t.agentIdOverride),c=s.model??d??null,l=te({cfg:n,provider:s.provider,model:c,contextTokensOverride:r?.contextTokens,fallbackContextTokens:p??void 0})??null,u=a(r),f=typeof r?.totalTokens==`number`?r?.totalTokensFresh!==!1:!1,m=l!=null&&u!==void 0?Math.max(0,l-u):null,h=l&&l>0&&u!==void 0?Math.min(999,Math.round(u/l*100)):null,g=x(e)?.agentId;return{agentId:t.agentIdOverride??g,key:e,kind:R(e,r),sessionId:r?.sessionId,updatedAt:i,age:o,thinkingLevel:r?.thinkingLevel,verboseLevel:r?.verboseLevel,reasoningLevel:r?.reasoningLevel,elevatedLevel:r?.elevatedLevel,systemSent:r?.systemSent,abortedLastRun:r?.abortedLastRun,inputTokens:r?.inputTokens,outputTokens:r?.outputTokens,cacheRead:r?.cacheRead,cacheWrite:r?.cacheWrite,totalTokens:u??null,totalTokensFresh:f,remainingTokens:m,percentUsed:h,model:c,contextTokens:l,flags:wt(r)}}).sort((e,t)=>(t.updatedAt??0)-(e.updatedAt??0)),w=new Set,T=i.agents.map(e=>{let t=L(n.session?.store,{agentId:e.id});w.add(t);let r=S(b(t),{agentIdOverride:e.id});return{agentId:e.id,path:t,count:r.length,recent:r.slice(0,10)}}),E=Array.from(w).flatMap(e=>S(b(e))).toSorted((e,t)=>(t.updatedAt??0)-(e.updatedAt??0)),D=E.slice(0,10),k=E.length,j={runtimeVersion:C(process.env),linkChannel:r?{id:r.plugin.id,label:r.plugin.meta.label??`Channel`,linked:r.linked,authAgeMs:r.authAgeMs}:void 0,heartbeat:{defaultAgentId:i.defaultId,agents:o},channelSummary:s,queuedSystemEvents:l,sessions:{paths:Array.from(w),count:k,defaults:{model:d??null,contextTokens:p??null},recent:D,byAgent:T}};return t?j:Tt(j)}function Dt(e){return e.then(e=>({ok:!0,value:e}),e=>({ok:!1,error:e}))}function Ot(e){if(!e.ok)throw e.error;return e.value}function kt(e){if(e.plugins?.enabled===!1)return{enabled:!1,slot:null,reason:`plugins disabled`};let t=typeof e.plugins?.slots?.memory==`string`?e.plugins.slots.memory.trim():``;return t&&t.toLowerCase()===`none`?{enabled:!1,slot:null,reason:`plugins.slots.memory="none"`}:{enabled:!0,slot:t||`memory-core`}}async function At(e){let t=re({config:e.cfg}),n=e.cfg.gateway?.mode===`remote`,r=typeof e.cfg.gateway?.remote?.url==`string`?e.cfg.gateway.remote.url:``,i=n&&!r.trim(),a=n?`remote`:`local`,o=St(e.cfg),s=o.warning,c=i?null:await he({url:t.url,auth:o.auth,timeoutMs:Math.min(e.opts.all?5e3:2500,e.opts.timeoutMs??1e4)}).catch(()=>null);return s&&c?.ok===!1&&(c.error=c.error?`${c.error}; ${s}`:s,s=void 0),{gatewayConnection:t,remoteUrlMissing:i,gatewayMode:a,gatewayProbeAuth:o.auth,gatewayProbeAuthWarning:s,gatewayProbe:c}}async function jt(e){return e.gatewayReachable?await B({config:e.cfg,method:`channels.status`,params:{probe:!1,timeoutMs:Math.min(8e3,e.opts.timeoutMs??1e4)},timeoutMs:Math.min(e.opts.all?5e3:2500,e.opts.timeoutMs??1e4)}).catch(()=>null):null}async function Mt(e){let{cfg:t,agentStatus:n,memoryPlugin:r}=e;if(!r.enabled||r.slot!==`memory-core`)return null;let i=n.defaultId??`main`,{manager:a}=await K({cfg:t,agentId:i,purpose:`status`});if(!a)return null;try{await a.probeVectorAvailability()}catch{}let o=a.status();return await a.close?.().catch(()=>{}),{agentId:i,...o}}async function Nt(e){let t=await l(),{resolvedConfig:n,diagnostics:r}=await oe({config:t,commandName:`status --json`,targetIds:ae(),mode:`summary`}),i=Ge(),a=n.gateway?.tailscale?.mode??`off`,o=je({timeoutMs:e.all?6500:2500,fetchGit:!0,includeRegistry:!0}),s=xt(n),c=Et({config:n,sourceConfig:t}),u=a===`off`?Promise.resolve(null):v((e,t)=>D(e,t,{timeoutMs:1200,maxBuffer:2e5})).catch(()=>null),d=At({cfg:n,opts:e}),[f,p,m,h,g]=await Promise.all([u,o,s,d,c]),_=a!==`off`&&f?`https://${f}${se(n.gateway?.controlUi?.basePath)}`:null,{gatewayConnection:y,remoteUrlMissing:b,gatewayMode:x,gatewayProbeAuth:S,gatewayProbeAuthWarning:C,gatewayProbe:w}=h,T=w?.ok===!0,E=w?.presence?ze(w.presence):null,O=jt({cfg:n,gatewayReachable:T,opts:e}),k=kt(n),A=Mt({cfg:n,agentStatus:m,memoryPlugin:k}),[j,M]=await Promise.all([O,A]);return{cfg:n,sourceConfig:t,secretDiagnostics:r,osSummary:i,tailscaleMode:a,tailscaleDns:f,tailscaleHttpsUrl:_,update:p,gatewayConnection:y,remoteUrlMissing:b,gatewayMode:x,gatewayProbeAuth:S,gatewayProbeAuthWarning:C,gatewayProbe:w,gatewayReachable:T,gatewaySelf:E,channelIssues:j?de(j):[],agentStatus:m,channels:{rows:[],details:[]},summary:g,memory:M,memoryPlugin:k}}async function Pt(e,t){return e.json?await Nt({timeoutMs:e.timeoutMs,all:e.all}):await q({label:`Scanning status…`,total:10,enabled:!0},async t=>{t.setLabel(`Loading config…`);let n=await l(),{resolvedConfig:r,diagnostics:i}=await oe({config:n,commandName:`status`,targetIds:ae(),mode:`summary`}),a=Ge(),o=r.gateway?.tailscale?.mode??`off`,s=o===`off`?Promise.resolve(null):v((e,t)=>D(e,t,{timeoutMs:1200,maxBuffer:2e5})).catch(()=>null),c=Dt(je({timeoutMs:e.all?6500:2500,fetchGit:!0,includeRegistry:!0})),u=Dt(xt(r)),d=Dt(Et({config:r,sourceConfig:n}));t.tick(),t.setLabel(`Checking Tailscale…`);let f=await s,p=o!==`off`&&f?`https://${f}${se(r.gateway?.controlUi?.basePath)}`:null;t.tick(),t.setLabel(`Checking for updates…`);let m=Ot(await c);t.tick(),t.setLabel(`Resolving agents…`);let h=Ot(await u);t.tick(),t.setLabel(`Probing gateway…`);let{gatewayConnection:g,remoteUrlMissing:_,gatewayMode:y,gatewayProbeAuth:b,gatewayProbeAuthWarning:x,gatewayProbe:S}=await At({cfg:r,opts:e}),C=S?.ok===!0,w=S?.presence?ze(S.presence):null;t.tick(),t.setLabel(`Querying channel status…`);let T=await jt({cfg:r,gatewayReachable:C,opts:e}),E=T?de(T):[];t.tick(),t.setLabel(`Summarizing channels…`);let O=await nt(r,{showSecrets:process.env.CLAWDBOT_SHOW_SECRETS?.trim()!==`0`,sourceConfig:n});t.tick(),t.setLabel(`Checking memory…`);let k=kt(r),A=await Mt({cfg:r,agentStatus:h,memoryPlugin:k});t.tick(),t.setLabel(`Reading sessions…`);let j=Ot(await d);return t.tick(),t.setLabel(`Rendering…`),t.tick(),{cfg:r,sourceConfig:n,secretDiagnostics:i,osSummary:a,tailscaleMode:o,tailscaleDns:f,tailscaleHttpsUrl:p,update:m,gatewayConnection:g,remoteUrlMissing:_,gatewayMode:y,gatewayProbeAuth:b,gatewayProbeAuthWarning:x,gatewayProbe:S,gatewayReachable:C,gatewaySelf:w,channelIssues:E,agentStatus:h,channels:O,summary:j,memory:A,memoryPlugin:k}})}function Ft(e){let t=e=>{let t=e.trim();return!t||!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(t)?null:t},n=[e.error,e.closeReason].filter(e=>typeof e==`string`&&e.trim().length>0).join(` `);if(!n||!/pairing required/i.test(n))return null;let r=n.match(/requestId:\s*([^\s)]+)/i);return{requestId:(r&&r[1]?t(r[1]):null)||null}}async function It(e,n){if(e.all&&!e.json){await pt(n,{timeoutMs:e.timeoutMs});return}let a=await Pt({json:e.json,timeoutMs:e.timeoutMs,all:e.all},n),o=e.json?await Ee({config:a.cfg,sourceConfig:a.sourceConfig,deep:!1,includeFilesystem:!0,includeChannelSecurity:!0}):await q({label:`Running security audit…`,indeterminate:!0,enabled:!0},async()=>await Ee({config:a.cfg,sourceConfig:a.sourceConfig,deep:!1,includeFilesystem:!0,includeChannelSecurity:!0})),{cfg:s,osSummary:c,tailscaleMode:l,tailscaleDns:u,tailscaleHttpsUrl:d,update:f,gatewayConnection:p,remoteUrlMissing:m,gatewayMode:h,gatewayProbeAuth:g,gatewayProbeAuthWarning:_,gatewayProbe:v,gatewayReachable:b,gatewaySelf:x,channelIssues:S,agentStatus:C,channels:w,summary:T,secretDiagnostics:E,memory:D,memoryPlugin:O}=a,k=e.usage?await q({label:`Fetching usage snapshot…`,indeterminate:!0,enabled:e.json!==!0},async()=>await M({timeoutMs:e.timeoutMs})):void 0,A=e.deep?await q({label:`Checking gateway health…`,indeterminate:!0,enabled:e.json!==!0},async()=>await B({method:`health`,params:{probe:!0},timeoutMs:e.timeoutMs,config:a.cfg})):void 0,j=e.deep&&b?await B({method:`last-heartbeat`,params:{},timeoutMs:e.timeoutMs,config:a.cfg}).catch(()=>null):null,ee=Se({configChannel:Ce(s.update?.channel),installKind:f.installKind,gitTag:f.git?.tag??null,gitBranch:f.git?.branch??null});if(e.json){let[e,t]=await Promise.all([vt(),yt()]);n.log(JSON.stringify({...T,os:c,update:f,updateChannel:ee.channel,updateChannelSource:ee.source,memory:D,memoryPlugin:O,gateway:{mode:h,url:p.url,urlSource:p.urlSource,misconfigured:m,reachable:b,connectLatencyMs:v?.connectLatencyMs??null,self:x,error:v?.error??null,authWarning:_??null},gatewayService:e,nodeService:t,agents:C,securityAudit:o,secretDiagnostics:E,...A||k||j?{health:A,usage:k,lastHeartbeat:j}:{}},null,2));return}let P=e=>t.muted(e),F=e=>t.success(e),I=e=>t.warn(e);if(e.verbose){let e=re({config:a.cfg});n.log(r(`Gateway connection:`));for(let t of e.message.split(`
7
7
  `))n.log(` ${t}`);n.log(``)}let L=ve();if(E.length>0){n.log(t.warn(`Secret diagnostics:`));for(let e of E)n.log(`- ${e}`);n.log(``)}let te=s.gateway?.controlUi?.enabled??!0?ce({port:i(s),bind:s.gateway?.bind,customBindHost:s.gateway?.customBindHost,basePath:s.gateway?.controlUi?.basePath}).httpUrl:`disabled`,ne=(()=>{let e=m?`fallback ${p.url}`:`${p.url}${p.urlSource?` (${p.urlSource})`:``}`,t=m?I(`misconfigured (remote.url missing)`):b?F(`reachable ${mt(v?.connectLatencyMs)}`):I(v?.error?`unreachable (${v.error})`:`unreachable`),n=b&&!m?` · auth ${Oe(g)}`:``,r=x?.host||x?.version||x?.platform?[x?.host?x.host:null,x?.ip?`(${x.ip})`:null,x?.version?`app ${x.version}`:null,x?.platform?x.platform:null].filter(Boolean).join(` `):null;return`${h} · ${e} · ${t}${n}${r?` · ${r}`:``}`})(),R=Ft({error:v?.error??null,closeReason:v?.close?.reason??null}),z=(()=>{let e=C.bootstrapPendingCount>0?`${C.bootstrapPendingCount} bootstrap file${C.bootstrapPendingCount===1?``:`s`} present`:`no bootstrap files`,t=C.agents.find(e=>e.id===C.defaultId),n=t?.lastActiveAgeMs==null?`unknown`:W(t.lastActiveAgeMs),r=t?` · default ${t.id} active ${n}`:``;return`${C.agents.length} · ${e} · sessions ${C.totalSessions}${r}`})(),[V,H]=await Promise.all([vt(),yt()]),U=(()=>{if(V.installed===!1)return`${V.label} not installed`;let e=V.managedByOpenClaw?`installed · `:``;return`${V.label} ${e}${V.loadedText}${V.runtimeShort?` · ${V.runtimeShort}`:``}`})(),ie=(()=>{if(H.installed===!1)return`${H.label} not installed`;let e=H.managedByOpenClaw?`installed · `:``;return`${H.label} ${e}${H.loadedText}${H.runtimeShort?` · ${H.runtimeShort}`:``}`})(),G=T.sessions.defaults,ae=G.contextTokens?` (${$(G.contextTokens)} ctx)`:``,oe=T.queuedSystemEvents.length>0?`${T.queuedSystemEvents.length} queued`:`none`,se=A?F(`enabled`):P(`skipped (use --deep)`),K=(()=>{let e=T.heartbeat.agents.map(e=>!e.enabled||!e.everyMs?`disabled (${e.agentId})`:`${e.every} (${e.agentId})`).filter(Boolean);return e.length>0?e.join(`, `):`disabled`})(),le=(()=>{if(!e.deep)return null;if(!b)return I(`unavailable`);if(!j)return P(`none`);let t=W(Date.now()-j.ts),n=j.channel??`unknown`,r=j.accountId?`account ${j.accountId}`:null;return[j.status,`${t} ago`,n,r].filter(Boolean).join(` · `)})(),ue=T.sessions.paths.length>1?`${T.sessions.paths.length} stores`:T.sessions.paths[0]??`unknown`,de=(()=>{if(!O.enabled)return P(`disabled${O.reason?` (${O.reason})`:``}`);if(!D){let e=O.slot?`plugin ${O.slot}`:`plugin`;return O.slot&&O.slot!==`memory-core`?`enabled (${e})`:P(`enabled (${e}) · unavailable`)}let e=[],t=D.dirty?` · ${I(`dirty`)}`:``;e.push(`${D.files} files · ${D.chunks} chunks${t}`),D.sources?.length&&e.push(`sources ${D.sources.join(`, `)}`),O.slot&&e.push(`plugin ${O.slot}`);let n=(e,t)=>e===`ok`?F(t):e===`warn`?I(t):P(t),r=D.vector;if(r){let t=Be(r),i=t.state===`disabled`?`vector off`:`vector ${t.state}`;e.push(n(t.tone,i))}let i=D.fts;if(i){let t=Ve(i),r=t.state===`disabled`?`fts off`:`fts ${t.state}`;e.push(n(t.tone,r))}let a=D.cache;if(a){let t=He(a);e.push(n(t.tone,t.text))}return e.join(` · `)})(),fe=ke(f),pe=Ae(f).replace(/^Update:\s*/i,``),me=ee.label,he=xe(f),ge=[{Item:`Dashboard`,Value:te},{Item:`OS`,Value:`${c.label} · node ${process.versions.node}`},{Item:`Tailscale`,Value:l===`off`?P(`off`):u&&d?`${l} · ${u} · ${d}`:I(`${l} · magicdns unknown`)},{Item:`Channel`,Value:me},...he?[{Item:`Git`,Value:he}]:[],{Item:`Update`,Value:fe.available?I(`available · ${pe}`):pe},{Item:`Gateway`,Value:ne},..._?[{Item:`Gateway auth warning`,Value:I(_)}]:[],{Item:`Gateway service`,Value:U},{Item:`Node service`,Value:ie},{Item:`Agents`,Value:z},{Item:`Memory`,Value:de},{Item:`Probes`,Value:se},{Item:`Events`,Value:oe},{Item:`Heartbeat`,Value:K},...le?[{Item:`Last heartbeat`,Value:le}]:[],{Item:`Sessions`,Value:`${T.sessions.count} active · default ${G.model??`unknown`}${ae} · ${ue}`}];n.log(t.heading(`OpenClaw status`)),n.log(``),n.log(t.heading(`Overview`)),n.log(J({width:L,columns:[{key:`Item`,header:`Item`,minWidth:12},{key:`Value`,header:`Value`,flex:!0,minWidth:32}],rows:ge}).trimEnd()),R&&(n.log(``),n.log(t.warn(`Gateway pairing approval required.`)),R.requestId&&n.log(t.muted(`Recovery: ${y(`openclaw devices approve ${R.requestId}`)}`)),n.log(t.muted(`Fallback: ${y(`openclaw devices approve --latest`)}`)),n.log(t.muted(`Inspect: ${y(`openclaw devices list`)}`))),n.log(``),n.log(t.heading(`Security audit`)),n.log(t.muted(`Summary: ${(e=>[t.error(`${e.critical} critical`),t.warn(`${e.warn} warn`),t.muted(`${e.info} info`)].join(` · `))(o.summary)}`));let _e=o.findings.filter(e=>e.severity===`critical`||e.severity===`warn`);if(_e.length===0)n.log(t.muted(`No critical or warn findings detected.`));else{let e=e=>e===`critical`?t.error(`CRITICAL`):e===`warn`?t.warn(`WARN`):t.muted(`INFO`),r=e=>e===`critical`?0:e===`warn`?1:2,i=[..._e].toSorted((e,t)=>r(e.severity)-r(t.severity)),a=i.slice(0,6);for(let r of a)n.log(` ${e(r.severity)} ${r.title}`),n.log(` ${Ne(r.detail.replaceAll(`
8
8
  `,` `),160)}`),r.remediation?.trim()&&n.log(` ${t.muted(`Fix: ${r.remediation.trim()}`)}`);i.length>a.length&&n.log(t.muted(`… +${i.length-a.length} more`))}n.log(t.muted(`Full report: ${y(`openclaw security audit`)}`)),n.log(t.muted(`Deep probe: ${y(`openclaw security audit --deep`)}`)),n.log(``),n.log(t.heading(`Channels`));let ye=lt(S);if(n.log(J({width:L,columns:[{key:`Channel`,header:`Channel`,minWidth:10},{key:`Enabled`,header:`Enabled`,minWidth:7},{key:`State`,header:`State`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:24}],rows:w.rows.map(e=>{let n=ye.get(e.id)??[],r=e.state===`off`?`off`:n.length>0?`warn`:e.state,i=n.length>0?` · ${I(`gateway: ${Ne(n[0]?.message??`issue`,84)}`)}`:``;return{Channel:e.label,Enabled:e.enabled?F(`ON`):P(`OFF`),State:r===`ok`?F(`OK`):r===`warn`?I(`WARN`):r===`off`?P(`OFF`):t.accentDim(`SETUP`),Detail:`${e.detail}${i}`}})}).trimEnd()),n.log(``),n.log(t.heading(`Sessions`)),n.log(J({width:L,columns:[{key:`Key`,header:`Key`,minWidth:20,flex:!0},{key:`Kind`,header:`Kind`,minWidth:6},{key:`Age`,header:`Age`,minWidth:9},{key:`Model`,header:`Model`,minWidth:14},{key:`Tokens`,header:`Tokens`,minWidth:16}],rows:T.sessions.recent.length>0?T.sessions.recent.map(e=>({Key:Ne(e.key,32),Kind:e.kind,Age:e.updatedAt?W(e.age):`no activity`,Model:e.model??`unknown`,Tokens:ht(e)})):[{Key:P(`no sessions yet`),Kind:``,Age:``,Model:``,Tokens:``}]}).trimEnd()),T.queuedSystemEvents.length>0&&(n.log(``),n.log(t.heading(`System events`)),n.log(J({width:L,columns:[{key:`Event`,header:`Event`,flex:!0,minWidth:24}],rows:T.queuedSystemEvents.slice(0,5).map(e=>({Event:e}))}).trimEnd()),T.queuedSystemEvents.length>5&&n.log(P(`… +${T.queuedSystemEvents.length-5} more`))),A){n.log(``),n.log(t.heading(`Health`));let e=[];e.push({Item:`Gateway`,Status:F(`reachable`),Detail:`${A.durationMs}ms`});for(let t of be(A,{accountMode:`all`})){let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim(),a=i.toLowerCase(),o=a.startsWith(`ok`)?F(`OK`):a.startsWith(`failed`)?I(`WARN`):a.startsWith(`not configured`)?P(`OFF`):a.startsWith(`configured`)?F(`OK`):a.startsWith(`linked`)?F(`LINKED`):a.startsWith(`not linked`)?I(`UNLINKED`):I(`WARN`);e.push({Item:r,Status:o,Detail:i})}n.log(J({width:L,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Status`,header:`Status`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:28}],rows:e}).trimEnd())}if(k){n.log(``),n.log(t.heading(`Usage`));for(let e of N(k))n.log(e)}n.log(``),n.log(`FAQ: https://docs.openclaw.ai/faq`),n.log(`Troubleshooting: https://docs.openclaw.ai/troubleshooting`),n.log(``);let we=Me(f);we&&(n.log(t.warn(we)),n.log(``)),n.log(`Next steps:`),n.log(` Need to share? ${y(`openclaw status --all`)}`),n.log(` Need to debug live? ${y(`openclaw logs --follow`)}`),b?n.log(` Need to test channels? ${y(`openclaw status --deep`)}`):n.log(` Fix reachability first: ${y(`openclaw gateway probe`)}`)}var Lt=e({statusCommand:()=>It});export{ze as i,It as n,Et as r,Lt as t};
9
- //# sourceMappingURL=status-DYqPF0rB.js.map
9
+ //# sourceMappingURL=status-BoL8-JxA.js.map
@@ -1,4 +1,4 @@
1
- import{u as e}from"./paths-B4IRk3wi.js";import{A as t,k as n,y as r}from"./subsystem-C5XF2Fy5.js";import{Br as i,Fo as a,Fr as o,Hn as s,Ml as c,Nl as l,Po as u,Xs as d,Zs as f,da as p,fu as m,h,ms as g,pu as _,qs as v,sa as y}from"./model-selection-BlC_rXAN.js";import{B as b,D as x,O as S,P as C,Tn as w,c as T,d as E,ft as D,l as O,nn as k,pt as A,s as j,u as M,z as N}from"./reply-l-Y47HP4.js";import{d as P}from"./agent-scope-DXZc3eNT.js";import{E as F}from"./session-key-D3P0tf5P.js";import{t as I}from"./openclaw-root-D_0Q6--h.js";import{t as L}from"./command-format-BbDT1tlm.js";import{lt as R,n as ee}from"./plugins-CYLrFT4h.js";import{n as te}from"./exec-DHqLtFYt.js";import{c as z}from"./paths-yLEk_25I.js";import{n as B,t as ne}from"./call-CqoMqP5b.js";import{n as V,r as H,t as U}from"./read-only-account-inspect-DBwAwB3_.js";import{n as W}from"./format-relative-B9pSIdGe.js";import{r as re}from"./format-duration-D5AMtmHa.js";import{a as ie}from"./skill-commands-HJHHZqt6.js";import{o as G,s as ae}from"./command-secret-targets-BVN3kiT9.js";import{C as oe,g as se}from"./onboard-helpers-zwybUJWu.js";import{r as ce}from"./memory-cli-jhzJ3as7.js";import{n as K}from"./progress-LNttnI-y.js";import{t as le}from"./skills-status-BWIugRCz.js";import{t as ue}from"./issue-format-BT7cQEt3.js";import{t as de}from"./channels-status-issues-PRgOT90w.js";import{c as fe,n as pe}from"./service-BtB9epJk.js";import{t as me}from"./runtime-status-CqFBmdRd.js";import{r as he,t as q}from"./probe-auth-BMA0yM94.js";import{t as ge}from"./diagnostics-BgbeL9KE.js";import{n as J,t as _e}from"./table-CY440fI1.js";import{o as ve,t as ye}from"./health-BgOggK9k.js";import{a as be,g as xe,m as Se,n as Ce,t as we}from"./channel-account-context-BMPAMZEv.js";import{t as Te}from"./audit-C7RP7G_g.js";import{t as Ee}from"./node-service-BRfrNp8l.js";import{n as Y,t as De}from"./format-Bn1bwJKX.js";import{i as Oe,n as ke,r as Ae,t as je}from"./status.update-DoSzHu2F.js";import{t as Me}from"./text-format-CvrvBBre.js";import Ne from"node:fs";import Pe from"node:os";import Fe from"node:path";import Ie from"node:fs/promises";import{spawnSync as Le}from"node:child_process";function Re(e){if(!Array.isArray(e))return null;let t=e,n=t.find(e=>e.mode===`gateway`&&e.reason===`self`)??t.find(e=>typeof e.text==`string`&&String(e.text).startsWith(`Gateway:`))??null;return n?{host:typeof n.host==`string`?n.host:void 0,ip:typeof n.ip==`string`?n.ip:void 0,version:typeof n.version==`string`?n.version:void 0,platform:typeof n.platform==`string`?n.platform:void 0}:null}function ze(e){return e.enabled?e.available===!0?{tone:`ok`,state:`ready`}:e.available===!1?{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`unknown`}:{tone:`muted`,state:`disabled`}}function Be(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function Ve(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function He(e){return typeof e==`string`?e.trim():``}function Ue(){return He(Le(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Pe.release()}function We(){let e=Pe.platform(),t=Pe.release(),n=Pe.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${Ue()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function Ge(e){try{return await Ie.access(e),!0}catch{return!1}}async function Ke(e){let t=S(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return P(e,t.id)}catch{return null}})(),i=r==null?null:await Ge(Fe.join(r,`BOOTSTRAP.md`)),a=z(e.session?.store,{agentId:t.id}),o=(()=>{try{return s(a)}catch{return{}}})(),c=Object.values(o).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),l=c>0?c:null,u=l?n-l:null,d=Object.keys(o).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:i,sessionsPath:a,sessionsCount:d,lastUpdatedAt:l,lastActiveAgeMs:u}})),i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}const X=e=>e&&typeof e==`object`?e:{};function Z(e){let t=new Map;for(let n of e){let e=n?.trim()?n.trim():`unknown`;t.set(e,(t.get(e)??0)+1)}let n=[...t.entries()].toSorted((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}${t>1?`×${t}`:``}`);return{label:n.length>0?n.join(`+`):`unknown`,parts:n}}function qe(e){let t=e?.trim()||``;if(!t)return null;try{return Ne.existsSync(t)}catch{return null}}function Q(e,t){let n=e.trim();if(!n)return`empty`;if(!t.showSecrets)return`sha256:${g(n,8)} · len ${n.length}`;let r=n.slice(0,4),i=n.slice(-4);return n.length<=10?`${n} · len ${n.length}`:`${r}…${i} · len ${n.length}`}function Je(e,t,n){return e.config.inspectAccount?.(t,n)??U({channelId:e.id,cfg:t,accountId:n})}async function Ye(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Je(t,r,i),o=Je(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&V(a)&&(!H(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??E({plugin:t,account:d,cfg:n}),m=f?.configured??await M({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:T({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Xe=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},Ze=e=>{let{plugin:t,cfg:n,entry:r}=e,i=[],a=r.snapshot;a.enabled===!1&&i.push(`disabled`),a.dmPolicy&&i.push(`dm:${a.dmPolicy}`),a.tokenSource&&a.tokenSource!==`none`&&i.push(`token:${a.tokenSource}`),a.botTokenSource&&a.botTokenSource!==`none`&&i.push(`bot:${a.botTokenSource}`),a.appTokenSource&&a.appTokenSource!==`none`&&i.push(`app:${a.appTokenSource}`),a.signingSecretSource&&a.signingSecretSource!==`none`&&i.push(`signing:${a.signingSecretSource}`),V(r.account)&&i.push(`secret unavailable in this command path`),a.baseUrl&&i.push(a.baseUrl),a.port!=null&&i.push(`port:${a.port}`),a.cliPath&&i.push(`cli:${a.cliPath}`),a.dbPath&&i.push(`db:${a.dbPath}`);let o=t.config.resolveAllowFrom?.({cfg:n,accountId:a.accountId})??a.allowFrom;if(o?.length){let e=O({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function Qe(e){let t=X(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=X(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function $e(e){let t=[];for(let n of e){let e=X(n.account),r=X(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];qe(i)===!1&&t.push(String(i))}}return t}function et(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>X(e.account)),r=n.some(e=>`botToken`in e),i=n.some(e=>`appToken`in e),a=n.some(e=>`signingSecret`in e||`signingSecretSource`in e||`signingSecretStatus`in e),o=n.some(e=>`token`in e);if(!r&&!i&&!a&&!o)return{state:null,detail:null};let s=e=>typeof e.mode==`string`&&e.mode.trim()===`http`,c=(e,t,n)=>{let r=e[t];return typeof r==`string`&&r.trim()?!0:e[n]===`available`};if(r&&a&&t.every(e=>s(X(e.account)))){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=X(e.account),n=c(t,`botToken`,`botTokenStatus`),r=c(t,`signingSecret`,`signingSecretStatus`);return n&&!r||!n&&r});if(n.length>0)return{state:`warn`,detail:`configured http credentials unavailable in this command path · accounts ${n.length}`};if(i.length>0)return{state:`warn`,detail:`partial credentials (need bot+signing) · accounts ${i.length}`};if(r.length===0)return{state:`setup`,detail:`no credentials (need bot+signing)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?X(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Q(u,{showSecrets:e.showSecrets}):``,p=d||f?` (bot ${d||`?`}, signing ${f||`?`})`:``;return{state:`ok`,detail:`credentials ok (bot ${a.label}, signing ${o.label})${p} · accounts ${r.length}/${t.length||1}`}}if(r&&i){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``;return!!n&&!!r}),i=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``,i=!!n,a=!!r;return i&&!a||!i&&a});if(i.length>0)return{state:`warn`,detail:`partial tokens (need bot+app) · accounts ${i.length}`};if(n.length>0)return{state:`warn`,detail:`configured tokens unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no tokens (need bot+app)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?X(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Q(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u||d?` (bot ${u||`?`}, app ${d||`?`})`:``;return{state:`ok`,detail:`tokens ok (bot ${a.label}, app ${o.label})${f} · accounts ${r.length}/${t.length||1}`}}if(r){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account);return!!(typeof t.botToken==`string`&&t.botToken.trim())});if(n.length>0)return{state:`warn`,detail:`configured bot token unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no bot token`};let i=r[0]?.account?X(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Q(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>V(e.account)),u=t.filter(e=>{let t=X(e.account);return typeof t.token==`string`?!!t.token.trim():!1});if(l.length>0)return{state:`warn`,detail:`configured token unavailable in this command path · accounts ${l.length}`};if(u.length===0)return{state:`setup`,detail:`no token`};let d=Z(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?X(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Q(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function tt(e,t){let n=t?.showSecrets===!0,r=[],i=[];for(let a of ee()){let o=a.config.listAccountIds(e),s=R({plugin:a,cfg:e,accountIds:o}),c=o.length>0?o:[s],l=[],u=t?.sourceConfig??e;for(let t of c)l.push(await Ye({plugin:a,cfg:e,sourceConfig:u,accountId:t}));let d=l.some(e=>e.enabled),f=l.filter(e=>e.enabled),p=f.filter(e=>e.configured),m=f.filter(e=>V(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=Qe(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=$e(f),v=et({plugin:a,cfg:e,accounts:l,showSecrets:n}),y=a.status?.collectStatusIssues?a.status.collectStatusIssues(l.map(e=>e.snapshot)):[],b=a.meta.label??a.id,x=d?_.length>0||y.length>0||m.length>0?`warn`:g.linked===!1?`setup`:v.state?v.state:g.linked===!0||p.length>0?`ok`:`setup`:`off`,S=(()=>{if(!d)return h?a.config.disabledReason?.(h.account,e)??`disabled`:`disabled`;if(_.length>0)return`missing file (${_[0]})`;if(y.length>0)return y[0]?.message??`misconfigured`;if(g.linked!==null){let e=g.linked?`linked`:`not linked`,t=[];return g.linked&&g.selfE164&&t.push(g.selfE164),g.linked&&g.authAgeMs!=null&&g.authAgeMs>=0&&t.push(`auth ${W(g.authAgeMs)}`),(l.length>1||a.meta.forceAccountBinding)&&t.push(`accounts ${l.length||1}`),t.length>0?`${e} · ${t.join(` · `)}`:e}if(m.length>0)return v.detail?.includes(`unavailable`)?v.detail:`configured credentials unavailable in this command path · accounts ${m.length}`;if(v.detail)return v.detail;if(p.length>0){let e=`configured`;return l.length<=1&&!a.meta.forceAccountBinding?e:`${e} · accounts ${p.length}/${f.length||1}`}return(h&&a.config.unconfiguredReason?a.config.unconfiguredReason(h.account,e):null)??`not configured`})();r.push({id:a.id,label:b,enabled:d,state:x,detail:S}),p.length>0&&i.push({title:`${b} accounts`,columns:[`Account`,`Status`,`Notes`],rows:p.map(t=>{let n=Ze({plugin:a,cfg:e,entry:t});return{Account:Xe({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!V(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function nt(e,t){let n=await Ie.readFile(e,`utf8`).catch(()=>``);if(!n.trim())return[];let r=n.replace(/\r/g,``).split(`
1
+ import{u as e}from"./paths-B4IRk3wi.js";import{A as t,k as n,y as r}from"./subsystem-C5XF2Fy5.js";import{Br as i,Fo as a,Fr as o,Hn as s,Ml as c,Nl as l,Po as u,Xs as d,Zs as f,da as p,fu as m,h,ms as g,pu as _,qs as v,sa as y}from"./model-selection-BlC_rXAN.js";import{B as b,D as x,O as S,P as C,Tn as w,c as T,d as E,ft as D,l as O,nn as k,pt as A,s as j,u as M,z as N}from"./reply-CjyZeZ-j.js";import{d as P}from"./agent-scope-DXZc3eNT.js";import{E as F}from"./session-key-D3P0tf5P.js";import{t as I}from"./openclaw-root-D_0Q6--h.js";import{t as L}from"./command-format-BbDT1tlm.js";import{lt as R,n as ee}from"./plugins-CYLrFT4h.js";import{n as te}from"./exec-DHqLtFYt.js";import{c as z}from"./paths-yLEk_25I.js";import{n as B,t as ne}from"./call-CqoMqP5b.js";import{n as V,r as H,t as U}from"./read-only-account-inspect-DBwAwB3_.js";import{n as W}from"./format-relative-B9pSIdGe.js";import{r as re}from"./format-duration-D5AMtmHa.js";import{a as ie}from"./skill-commands-HJHHZqt6.js";import{o as G,s as ae}from"./command-secret-targets-BVN3kiT9.js";import{C as oe,g as se}from"./onboard-helpers-zwybUJWu.js";import{r as ce}from"./memory-cli-jhzJ3as7.js";import{n as K}from"./progress-LNttnI-y.js";import{t as le}from"./skills-status-BWIugRCz.js";import{t as ue}from"./issue-format-BT7cQEt3.js";import{t as de}from"./channels-status-issues-PRgOT90w.js";import{c as fe,n as pe}from"./service-BtB9epJk.js";import{t as me}from"./runtime-status-CqFBmdRd.js";import{r as he,t as q}from"./probe-auth-BMA0yM94.js";import{t as ge}from"./diagnostics-BgbeL9KE.js";import{n as J,t as _e}from"./table-CY440fI1.js";import{o as ve,t as ye}from"./health-RQzDNQwf.js";import{a as be,g as xe,m as Se,n as Ce,t as we}from"./channel-account-context-BMPAMZEv.js";import{t as Te}from"./audit-C7RP7G_g.js";import{t as Ee}from"./node-service-BRfrNp8l.js";import{n as Y,t as De}from"./format-Bn1bwJKX.js";import{i as Oe,n as ke,r as Ae,t as je}from"./status.update-DoSzHu2F.js";import{t as Me}from"./text-format-CvrvBBre.js";import Ne from"node:fs";import Pe from"node:os";import Fe from"node:path";import Ie from"node:fs/promises";import{spawnSync as Le}from"node:child_process";function Re(e){if(!Array.isArray(e))return null;let t=e,n=t.find(e=>e.mode===`gateway`&&e.reason===`self`)??t.find(e=>typeof e.text==`string`&&String(e.text).startsWith(`Gateway:`))??null;return n?{host:typeof n.host==`string`?n.host:void 0,ip:typeof n.ip==`string`?n.ip:void 0,version:typeof n.version==`string`?n.version:void 0,platform:typeof n.platform==`string`?n.platform:void 0}:null}function ze(e){return e.enabled?e.available===!0?{tone:`ok`,state:`ready`}:e.available===!1?{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`unknown`}:{tone:`muted`,state:`disabled`}}function Be(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function Ve(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function He(e){return typeof e==`string`?e.trim():``}function Ue(){return He(Le(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Pe.release()}function We(){let e=Pe.platform(),t=Pe.release(),n=Pe.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${Ue()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function Ge(e){try{return await Ie.access(e),!0}catch{return!1}}async function Ke(e){let t=S(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return P(e,t.id)}catch{return null}})(),i=r==null?null:await Ge(Fe.join(r,`BOOTSTRAP.md`)),a=z(e.session?.store,{agentId:t.id}),o=(()=>{try{return s(a)}catch{return{}}})(),c=Object.values(o).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),l=c>0?c:null,u=l?n-l:null,d=Object.keys(o).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:i,sessionsPath:a,sessionsCount:d,lastUpdatedAt:l,lastActiveAgeMs:u}})),i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}const X=e=>e&&typeof e==`object`?e:{};function Z(e){let t=new Map;for(let n of e){let e=n?.trim()?n.trim():`unknown`;t.set(e,(t.get(e)??0)+1)}let n=[...t.entries()].toSorted((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}${t>1?`×${t}`:``}`);return{label:n.length>0?n.join(`+`):`unknown`,parts:n}}function qe(e){let t=e?.trim()||``;if(!t)return null;try{return Ne.existsSync(t)}catch{return null}}function Q(e,t){let n=e.trim();if(!n)return`empty`;if(!t.showSecrets)return`sha256:${g(n,8)} · len ${n.length}`;let r=n.slice(0,4),i=n.slice(-4);return n.length<=10?`${n} · len ${n.length}`:`${r}…${i} · len ${n.length}`}function Je(e,t,n){return e.config.inspectAccount?.(t,n)??U({channelId:e.id,cfg:t,accountId:n})}async function Ye(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Je(t,r,i),o=Je(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&V(a)&&(!H(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??E({plugin:t,account:d,cfg:n}),m=f?.configured??await M({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:T({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Xe=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},Ze=e=>{let{plugin:t,cfg:n,entry:r}=e,i=[],a=r.snapshot;a.enabled===!1&&i.push(`disabled`),a.dmPolicy&&i.push(`dm:${a.dmPolicy}`),a.tokenSource&&a.tokenSource!==`none`&&i.push(`token:${a.tokenSource}`),a.botTokenSource&&a.botTokenSource!==`none`&&i.push(`bot:${a.botTokenSource}`),a.appTokenSource&&a.appTokenSource!==`none`&&i.push(`app:${a.appTokenSource}`),a.signingSecretSource&&a.signingSecretSource!==`none`&&i.push(`signing:${a.signingSecretSource}`),V(r.account)&&i.push(`secret unavailable in this command path`),a.baseUrl&&i.push(a.baseUrl),a.port!=null&&i.push(`port:${a.port}`),a.cliPath&&i.push(`cli:${a.cliPath}`),a.dbPath&&i.push(`db:${a.dbPath}`);let o=t.config.resolveAllowFrom?.({cfg:n,accountId:a.accountId})??a.allowFrom;if(o?.length){let e=O({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function Qe(e){let t=X(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=X(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function $e(e){let t=[];for(let n of e){let e=X(n.account),r=X(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];qe(i)===!1&&t.push(String(i))}}return t}function et(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>X(e.account)),r=n.some(e=>`botToken`in e),i=n.some(e=>`appToken`in e),a=n.some(e=>`signingSecret`in e||`signingSecretSource`in e||`signingSecretStatus`in e),o=n.some(e=>`token`in e);if(!r&&!i&&!a&&!o)return{state:null,detail:null};let s=e=>typeof e.mode==`string`&&e.mode.trim()===`http`,c=(e,t,n)=>{let r=e[t];return typeof r==`string`&&r.trim()?!0:e[n]===`available`};if(r&&a&&t.every(e=>s(X(e.account)))){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=X(e.account),n=c(t,`botToken`,`botTokenStatus`),r=c(t,`signingSecret`,`signingSecretStatus`);return n&&!r||!n&&r});if(n.length>0)return{state:`warn`,detail:`configured http credentials unavailable in this command path · accounts ${n.length}`};if(i.length>0)return{state:`warn`,detail:`partial credentials (need bot+signing) · accounts ${i.length}`};if(r.length===0)return{state:`setup`,detail:`no credentials (need bot+signing)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?X(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Q(u,{showSecrets:e.showSecrets}):``,p=d||f?` (bot ${d||`?`}, signing ${f||`?`})`:``;return{state:`ok`,detail:`credentials ok (bot ${a.label}, signing ${o.label})${p} · accounts ${r.length}/${t.length||1}`}}if(r&&i){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``;return!!n&&!!r}),i=t.filter(e=>{let t=X(e.account),n=typeof t.botToken==`string`?t.botToken.trim():``,r=typeof t.appToken==`string`?t.appToken.trim():``,i=!!n,a=!!r;return i&&!a||!i&&a});if(i.length>0)return{state:`warn`,detail:`partial tokens (need bot+app) · accounts ${i.length}`};if(n.length>0)return{state:`warn`,detail:`configured tokens unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no tokens (need bot+app)`};let a=Z(r.map(e=>e.snapshot.botTokenSource??`none`)),o=Z(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?X(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Q(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Q(l,{showSecrets:e.showSecrets}):``,f=u||d?` (bot ${u||`?`}, app ${d||`?`})`:``;return{state:`ok`,detail:`tokens ok (bot ${a.label}, app ${o.label})${f} · accounts ${r.length}/${t.length||1}`}}if(r){let n=t.filter(e=>V(e.account)),r=t.filter(e=>{let t=X(e.account);return!!(typeof t.botToken==`string`&&t.botToken.trim())});if(n.length>0)return{state:`warn`,detail:`configured bot token unavailable in this command path · accounts ${n.length}`};if(r.length===0)return{state:`setup`,detail:`no bot token`};let i=r[0]?.account?X(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Q(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>V(e.account)),u=t.filter(e=>{let t=X(e.account);return typeof t.token==`string`?!!t.token.trim():!1});if(l.length>0)return{state:`warn`,detail:`configured token unavailable in this command path · accounts ${l.length}`};if(u.length===0)return{state:`setup`,detail:`no token`};let d=Z(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?X(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Q(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function tt(e,t){let n=t?.showSecrets===!0,r=[],i=[];for(let a of ee()){let o=a.config.listAccountIds(e),s=R({plugin:a,cfg:e,accountIds:o}),c=o.length>0?o:[s],l=[],u=t?.sourceConfig??e;for(let t of c)l.push(await Ye({plugin:a,cfg:e,sourceConfig:u,accountId:t}));let d=l.some(e=>e.enabled),f=l.filter(e=>e.enabled),p=f.filter(e=>e.configured),m=f.filter(e=>V(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=Qe(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=$e(f),v=et({plugin:a,cfg:e,accounts:l,showSecrets:n}),y=a.status?.collectStatusIssues?a.status.collectStatusIssues(l.map(e=>e.snapshot)):[],b=a.meta.label??a.id,x=d?_.length>0||y.length>0||m.length>0?`warn`:g.linked===!1?`setup`:v.state?v.state:g.linked===!0||p.length>0?`ok`:`setup`:`off`,S=(()=>{if(!d)return h?a.config.disabledReason?.(h.account,e)??`disabled`:`disabled`;if(_.length>0)return`missing file (${_[0]})`;if(y.length>0)return y[0]?.message??`misconfigured`;if(g.linked!==null){let e=g.linked?`linked`:`not linked`,t=[];return g.linked&&g.selfE164&&t.push(g.selfE164),g.linked&&g.authAgeMs!=null&&g.authAgeMs>=0&&t.push(`auth ${W(g.authAgeMs)}`),(l.length>1||a.meta.forceAccountBinding)&&t.push(`accounts ${l.length||1}`),t.length>0?`${e} · ${t.join(` · `)}`:e}if(m.length>0)return v.detail?.includes(`unavailable`)?v.detail:`configured credentials unavailable in this command path · accounts ${m.length}`;if(v.detail)return v.detail;if(p.length>0){let e=`configured`;return l.length<=1&&!a.meta.forceAccountBinding?e:`${e} · accounts ${p.length}/${f.length||1}`}return(h&&a.config.unconfiguredReason?a.config.unconfiguredReason(h.account,e):null)??`not configured`})();r.push({id:a.id,label:b,enabled:d,state:x,detail:S}),p.length>0&&i.push({title:`${b} accounts`,columns:[`Account`,`Status`,`Notes`],rows:p.map(t=>{let n=Ze({plugin:a,cfg:e,entry:t});return{Account:Xe({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!V(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function nt(e,t){let n=await Ie.readFile(e,`utf8`).catch(()=>``);if(!n.trim())return[];let r=n.replace(/\r/g,``).split(`
2
2
  `);return r.slice(Math.max(0,r.length-t)).map(e=>e.trimEnd()).filter(e=>e.trim().length>0)}function rt(e,t){return!e||!t?0:e.split(t).length-1}function it(e,t){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,Math.max(0,t-1))}…`}function at(e){return e.replace(/\s+runId=[^\s]+/g,``).replace(/\s+conn=[^\s]+/g,``).replace(/\s+id=[^\s]+/g,``).replace(/\s+error=Error:.*$/g,``).trim()}function ot(e,t){let n=e[t]??``,r=n.indexOf(`{`);if(r<0)return null;let i=[n.slice(r)],a=rt(i[0]??``,`{`)-rt(i[0]??``,`}`),o=t;for(;a>0&&o+1<e.length;){o+=1;let t=e[o]??``;i.push(t),a+=rt(t,`{`)-rt(t,`}`)}return{json:i.join(`
3
3
  `),endIndex:o}}function st(e,t){let n=Math.max(6,t?.maxLines??26),r=[],i=new Map,a=(e,t)=>{let n=i.get(e);if(n){n.count+=1;return}i.set(e,{count:1,index:r.length,base:t}),r.push(t)},o=e=>{let t=e.trimEnd();t&&r.push(t)},s=e.map(e=>e.trimEnd()).filter(Boolean);for(let e=0;e<s.length;e+=1){let t=s[e]??``,n=t.trimStart();if((n.startsWith(`"`)||n===`}`||n===`{`||n.startsWith(`}`)||n.startsWith(`{`))&&!n.startsWith(`[`)&&!n.startsWith(`#`))continue;let r=t.match(/^\[([^\]]+)\]\s+Token refresh failed:\s*(\d+)\s*(\{)?\s*$/);if(r){let t=r[1]??`unknown`,n=r[2]??`unknown`,i=ot(s,e);if(i){e=i.endIndex;let r=(()=>{try{return JSON.parse(i.json)}catch{return null}})(),o=r?.error?.code?.trim()||null,s=r?.error?.message?.trim()||null,c=s?s.toLowerCase().includes(`signing in again`)?`re-auth required`:it(s,52):null,l=`[${t}] token refresh ${n}${o?` ${o}`:``}${c?` · ${c}`:``}`;a(`token:${t}:${n}:${o??``}:${c??``}`,l);continue}}let i=t.match(/^Embedded agent failed before reply:\s+OAuth token refresh failed for ([^:]+):/);if(i){let e=i[1]?.trim()||`unknown`;a(`embedded:${e}`,`Embedded agent: OAuth token refresh failed (${e})`);continue}if(t.startsWith(`[gws]`)&&t.includes(`errorCode=UNAVAILABLE`)&&t.includes(`OAuth token refresh failed`)){let e=at(t);a(`gws:${e}`,e);continue}o(t)}for(let e of i.values())e.count<=1||(r[e.index]=`${e.base} ×${e.count}`);let c=[];for(let e of r)c[c.length-1]!==e&&c.push(e);if(c.length<=n)return c;let l=Math.min(6,Math.floor(n/3)),u=Math.max(1,n-l-1);return[...c.slice(0,l),`… ${c.length-l-u} lines omitted …`,...c.slice(-u)]}function ct(e){let t=new Map;for(let n of e){let e=n.channel,r=t.get(e);r?r.push(n):t.set(e,[n])}return t}async function lt(e){let{lines:t,muted:n,ok:r,warn:i,fail:a}=e,o=(e,n)=>{let o=n===`ok`?r(`✓`):n===`warn`?i(`!`):a(`✗`),s=n===`ok`?r(e):n===`warn`?i(e):a(e);t.push(`${o} ${s}`)};t.push(``),t.push(n(`Gateway connection details:`));for(let r of Y(e.connectionDetailsForReport).split(`
4
4
  `).map(e=>e.trimEnd()))t.push(` ${n(r)}`);if(t.push(``),e.snap){let r=e.snap.exists?e.snap.valid?`ok`:`warn`:`fail`;o(`Config: ${e.snap.path??`(unknown)`}`,r);let i=[...e.snap.legacyIssues??[],...e.snap.issues??[]],a=i.filter((e,t)=>i.findIndex(t=>t.path===e.path&&t.message===e.message)===t);for(let e of a.slice(0,12))t.push(` ${ue(e,`-`)}`);a.length>12&&t.push(` ${n(`… +${a.length-12} more`)}`)}else o(`Config: read failed`,`warn`);e.remoteUrlMissing&&(t.push(``),o(`Gateway remote mode misconfigured (gateway.remote.url missing)`,`warn`),t.push(` ${n(`Fix: set gateway.remote.url, or set gateway.mode=local.`)}`)),e.sentinel?.payload?(o(`Restart sentinel present`,`warn`),t.push(` ${n(`${b(e.sentinel.payload)} · ${W(Date.now()-e.sentinel.payload.ts)}`)}`)):o(`Restart sentinel: none`,`ok`);let s=e.lastErr?.trim()??``,c=s.length<8||s===`}`||s===`{`;if(s&&!c&&(t.push(``),t.push(n(`Gateway last log line:`)),t.push(` ${n(Y(s))}`)),e.portUsage){let r=e.portUsage.listeners.length===0;if(o(`Port ${e.port}`,r?`ok`:`warn`),!r)for(let r of p(e.portUsage))t.push(` ${n(r)}`)}{let r=e.tailscale.backendState??`unknown`,i=r===`Running`,a=!!e.tailscale.dnsName;o(e.tailscaleMode===`off`?`Tailscale: off · ${r}${e.tailscale.dnsName?` · ${e.tailscale.dnsName}`:``}`:`Tailscale: ${e.tailscaleMode} · ${r}${e.tailscale.dnsName?` · ${e.tailscale.dnsName}`:``}`,i&&(e.tailscaleMode===`off`||a)?`ok`:`warn`),e.tailscale.error&&t.push(` ${n(`error: ${e.tailscale.error}`)}`),e.tailscale.ips.length>0&&t.push(` ${n(`ips: ${e.tailscale.ips.slice(0,3).join(`, `)}${e.tailscale.ips.length>3?`…`:``}`)}`),e.tailscaleHttpsUrl&&t.push(` ${n(`https: ${e.tailscaleHttpsUrl}`)}`)}if(e.skillStatus){let t=e.skillStatus.skills.filter(e=>e.eligible).length,n=e.skillStatus.skills.filter(e=>e.eligible&&Object.values(e.missing).some(e=>e.length)).length;o(`Skills: ${t} eligible · ${n} missing · ${e.skillStatus.workspaceDir}`,n===0?`ok`:`warn`)}e.progress.setLabel(`Reading logs…`);let l=(()=>{try{return fe(process.env)}catch{return null}})();if(l){e.progress.setLabel(`Reading logs…`);let[r,i]=await Promise.all([nt(l.stderrPath,40).catch(()=>[]),nt(l.stdoutPath,40).catch(()=>[])]);if(r.length>0||i.length>0){t.push(``),t.push(n(`Gateway logs (tail, summarized): ${l.logDir}`)),t.push(` ${n(`# stderr: ${l.stderrPath}`)}`);for(let e of st(r,{maxLines:22}).map(Y))t.push(` ${n(e)}`);t.push(` ${n(`# stdout: ${l.stdoutPath}`)}`);for(let e of st(i,{maxLines:22}).map(Y))t.push(` ${n(e)}`)}}if(e.progress.tick(),e.channelsStatus){o(`Channel issues (${e.channelIssues.length||`none`})`,e.channelIssues.length===0?`ok`:`warn`);for(let n of e.channelIssues.slice(0,12)){let e=n.fix?` · fix: ${n.fix}`:``;t.push(` - ${n.channel}[${n.accountId}] ${n.kind}: ${n.message}${e}`)}e.channelIssues.length>12&&t.push(` ${n(`… +${e.channelIssues.length-12} more`)}`)}else o(`Channel issues skipped (gateway ${e.gatewayReachable?`query failed`:`unreachable`})`,`warn`);let u=(()=>{if(!e.health||typeof e.health!=`object`)return``;let t=e.health;if(!(`error`in t))return``;let n=t.error;if(!n)return``;if(typeof n==`string`)return n;try{return JSON.stringify(n,null,2)}catch{return`[unserializable error]`}})();u&&(t.push(``),t.push(n(`Gateway health:`)),t.push(` ${n(Y(u))}`)),t.push(``),t.push(n(`Pasteable debug report. Auth tokens redacted.`)),t.push(`Troubleshooting: https://docs.openclaw.ai/troubleshooting`),t.push(``)}async function ut(e){let r=n(),i=e=>r?t.heading(e):e,a=e=>r?t.success(e):e,o=e=>r?t.warn(e):e,s=e=>r?t.error(e):e,c=e=>r?t.muted(e):e,l=_e(),u=J({width:l,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Value`,header:`Value`,flex:!0,minWidth:24}],rows:e.overviewRows}),d=e.channels.rows.map(e=>({channelId:e.id,Channel:e.label,Enabled:e.enabled?a(`ON`):c(`OFF`),State:e.state===`ok`?a(`OK`):e.state===`warn`?o(`WARN`):e.state===`off`?c(`OFF`):t.accentDim(`SETUP`),Detail:e.detail})),f=ct(e.channelIssues),p=J({width:l,columns:[{key:`Channel`,header:`Channel`,minWidth:10},{key:`Enabled`,header:`Enabled`,minWidth:7},{key:`State`,header:`State`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:28}],rows:d.map(e=>{let t=f.get(e.channelId)??[];if(t.length===0)return e;let n=t[0],r=` · ${o(`gateway: ${String(n.message).slice(0,90)}`)}`;return{...e,State:o(`WARN`),Detail:`${e.Detail}${r}`}})}),m=J({width:l,columns:[{key:`Agent`,header:`Agent`,minWidth:12},{key:`BootstrapFile`,header:`Bootstrap file`,minWidth:14},{key:`Sessions`,header:`Sessions`,align:`right`,minWidth:8},{key:`Active`,header:`Active`,minWidth:10},{key:`Store`,header:`Store`,flex:!0,minWidth:34}],rows:e.agentStatus.agents.map(e=>({Agent:e.name?.trim()?`${e.id} (${e.name.trim()})`:e.id,BootstrapFile:e.bootstrapPending===!0?o(`PRESENT`):e.bootstrapPending===!1?a(`ABSENT`):`unknown`,Sessions:String(e.sessionsCount),Active:e.lastActiveAgeMs==null?`unknown`:W(e.lastActiveAgeMs),Store:e.sessionsPath}))}),h=[];h.push(i(`OpenClaw status --all`)),h.push(``),h.push(i(`Overview`)),h.push(u.trimEnd()),h.push(``),h.push(i(`Channels`)),h.push(p.trimEnd());for(let t of e.channels.details)h.push(``),h.push(i(t.title)),h.push(J({width:l,columns:t.columns.map(e=>({key:e,header:e,flex:e===`Notes`,minWidth:e===`Notes`?28:10})),rows:t.rows.map(e=>({...e,...e.Status===`OK`?{Status:a(`OK`)}:e.Status===`WARN`?{Status:o(`WARN`)}:{}}))}).trimEnd());return h.push(``),h.push(i(`Agents`)),h.push(m.trimEnd()),h.push(``),h.push(i(`Diagnosis (read-only)`)),await lt({lines:h,progress:e.progress,muted:c,ok:a,warn:o,fail:s,connectionDetailsForReport:e.connectionDetailsForReport,...e.diagnosis}),h}async function dt(e,t){try{let[t,n,r]=await Promise.all([e.isLoaded({env:process.env}).catch(()=>!1),e.readRuntime(process.env).catch(()=>void 0),e.readCommand(process.env).catch(()=>null)]),i=r!=null,a=!i&&n?.status===`running`,o=i||a,s=a?`running (externally managed)`:t?e.loadedText:e.notLoadedText;return{label:e.label,installed:o,loaded:t,managedByOpenClaw:i,externallyManaged:a,loadedText:s,runtime:n}}catch{return{label:t,installed:null,loaded:!1,managedByOpenClaw:!1,externallyManaged:!1,loadedText:`unknown`,runtime:void 0}}}async function ft(t,n){await K({label:`Scanning status --all…`,total:11},async r=>{r.setLabel(`Loading config…`);let i=await d(),{resolvedConfig:o}=await ae({config:i,commandName:`status --all`,targetIds:G(),mode:`summary`}),s=We(),l=await f().catch(()=>null);r.tick(),r.setLabel(`Checking Tailscale…`);let u=o.gateway?.tailscale?.mode??`off`,p=await(async()=>{try{let e=await a(te,{timeoutMs:1200}),t=typeof e.BackendState==`string`?e.BackendState:null,n=typeof e.Self==`object`&&e.Self!==null?e.Self:null,r=n&&typeof n.DNSName==`string`?n.DNSName:null;return{ok:!0,backendState:t,dnsName:r?r.replace(/\.$/,``):null,ips:n&&Array.isArray(n.TailscaleIPs)?n.TailscaleIPs.filter(e=>typeof e==`string`&&e.trim().length>0).map(e=>e.trim()):[],error:null}}catch(e){return{ok:!1,backendState:null,dnsName:null,ips:[],error:String(e)}}})(),m=u!==`off`&&p.dnsName?`https://${p.dnsName}${oe(o.gateway?.controlUi?.basePath)}`:null;r.tick(),r.setLabel(`Checking for updates…`);let h=await Ce({root:await I({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()}),timeoutMs:6500,fetchGit:!0,includeRegistry:!0}),g=xe({configChannel:Se(o.update?.channel),installKind:h.installKind,gitTag:h.git?.tag??null,gitBranch:h.git?.branch??null}).label,_=be(h);r.tick(),r.setLabel(`Probing gateway…`);let v=ne({config:o}),b=o.gateway?.mode===`remote`,x=typeof o.gateway?.remote?.url==`string`?o.gateway.remote.url.trim():``,S=b&&!x,C=b?`remote`:`local`,w=q({cfg:o,mode:`local`}),T=q({cfg:o,mode:`remote`}),E=b&&!S?T:w,D=E.auth,O=await he({url:v.url,auth:D,timeoutMs:Math.min(5e3,n?.timeoutMs??1e4)}).catch(()=>null),k=O?.ok===!0,A=Re(O?.presence??null);r.tick(),r.setLabel(`Checking services…`);let j=async e=>{try{let t=await dt(e,e.label);return{label:t.label,installed:t.installed,managedByOpenClaw:t.managedByOpenClaw,loaded:t.loaded,loadedText:t.loadedText,runtime:t.runtime}}catch{return null}},M=await j(pe()),P=await j(Ee());r.tick(),r.setLabel(`Scanning agents…`);let F=await Ke(o);r.tick(),r.setLabel(`Summarizing channels…`);let R=await tt(o,{showSecrets:!1,sourceConfig:i});r.tick();let ee=(()=>{if(!S)return v.message;let e=o.gateway?.bind??`loopback`;return[`Gateway mode: remote`,`Gateway target: (missing gateway.remote.url)`,`Config: ${l?.path?.trim()?l.path.trim():`(unknown config path)`}`,`Bind: ${e}`,`Local fallback (used for probes): ${v.url}`,`Fix: set gateway.remote.url, or set gateway.mode=local.`].join(`
@@ -6,4 +6,4 @@ import{u as e}from"./paths-B4IRk3wi.js";import{A as t,k as n,y as r}from"./subsy
6
6
  `)),r.tick()})}const $=e=>`${(e/1e3).toFixed(e>=1e4?0:1)}k`,pt=e=>e==null||!Number.isFinite(e)?`unknown`:re(e,{decimals:1}),mt=e=>{let t=e.totalTokens,n=e.contextTokens,r=e.cacheRead,i=e.cacheWrite,a=``;if(t==null)a=n?`unknown/${$(n)} (?%)`:`unknown used`;else if(!n)a=`${$(t)} used`;else{let r=e.percentUsed==null?`?%`:`${e.percentUsed}%`;a=`${$(t)}/${$(n)} (${r})`}if(typeof r==`number`&&r>0){let e=typeof t==`number`?t:r+(typeof i==`number`?i:0),n=Math.round(r/e*100);a+=` · 🗄️ ${n}% cached`}return a},ht=e=>{if(!e)return null;let t=[],n=e.detail?.replace(/\s+/g,` `).trim()||``,r=e.missingUnit===!0&&n.toLowerCase().includes(`could not find service`);return n&&!r&&t.push(n),me({status:e.status,pid:e.pid,state:e.state,details:t})};async function gt(e){let t=await dt(e===`gateway`?pe():Ee(),e===`gateway`?`Daemon`:`Node`);return{label:t.label,installed:t.installed,managedByOpenClaw:t.managedByOpenClaw,externallyManaged:t.externallyManaged,loadedText:t.loadedText,runtimeShort:ht(t.runtime)}}async function _t(){return await gt(`gateway`)}async function vt(){return await gt(`node`)}async function yt(e){try{return await Ie.access(e),!0}catch{return!1}}async function bt(e=v()){let t=S(e),n=Date.now(),r=[];for(let i of t.agents){let t=i.id,a=(()=>{try{return P(e,t)}catch{return null}})(),o=a==null?null:Fe.join(a,`BOOTSTRAP.md`),c=o==null?null:await yt(o),l=z(e.session?.store,{agentId:t}),u=(()=>{try{return s(l)}catch{return{}}})(),d=Object.entries(u).filter(([e])=>e!==`global`&&e!==`unknown`).map(([,e])=>e),f=d.length,p=d.reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),m=p>0?p:null,h=m?n-m:null;r.push({id:t,name:i.name,workspaceDir:a,bootstrapPending:c,sessionsPath:l,sessionsCount:f,lastUpdatedAt:m,lastActiveAgeMs:h})}let i=r.reduce((e,t)=>e+t.sessionsCount,0),a=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:i,bootstrapPendingCount:a}}function xt(e){return q({cfg:e,mode:e.gateway?.mode===`remote`?`remote`:`local`,env:process.env})}async function St(e){for(let t of ee()){let{defaultAccountId:n,account:r,enabled:i,configured:a}=await we(t,e),o=t.config.describeAccount?t.config.describeAccount(r,e):{accountId:n,enabled:i,configured:a},s=t.status?.buildChannelSummary?await t.status.buildChannelSummary({account:r,cfg:e,defaultAccountId:n,snapshot:o}):void 0,c=s&&typeof s.linked==`boolean`?s.linked:null;if(c!==null)return{linked:c,authAgeMs:s&&typeof s.authAgeMs==`number`?s.authAgeMs:null,account:r,accountId:n,plugin:t}}return null}const Ct=e=>{if(!e)return[];let t=[],n=e?.thinkingLevel;typeof n==`string`&&n.length>0&&t.push(`think:${n}`);let r=e?.verboseLevel;typeof r==`string`&&r.length>0&&t.push(`verbose:${r}`);let i=e?.reasoningLevel;typeof i==`string`&&i.length>0&&t.push(`reasoning:${i}`);let a=e?.elevatedLevel;typeof a==`string`&&a.length>0&&t.push(`elevated:${a}`),e?.systemSent&&t.push(`system`),e?.abortedLastRun&&t.push(`aborted`);let o=e?.sessionId;return typeof o==`string`&&o.length>0&&t.push(`id:${o}`),t};function wt(e){return{...e,sessions:{...e.sessions,paths:[],defaults:{model:null,contextTokens:null},recent:[],byAgent:e.sessions.byAgent.map(e=>({...e,path:`[redacted]`,recent:[]}))}}}async function Tt(e={}){let{includeSensitive:t=!0}=e,n=e.config??v(),r=await St(n),a=S(n),c=a.agents.map(e=>{let t=ve(n,e.id);return{agentId:e.id,enabled:t.enabled,every:t.every,everyMs:t.everyMs}}),u=await j(n,{colorize:!0,includeAllowFrom:!0,sourceConfig:e.sourceConfig}),d=w(i(n)),f=h({cfg:n,defaultProvider:_,defaultModel:m}),p=f.model??`claude-opus-4-6`,g=k({cfg:n,provider:f.provider??`anthropic`,model:p,contextTokensOverride:n.agents?.defaults?.contextTokens,fallbackContextTokens:2e5})??2e5,y=Date.now(),b=new Map,T=e=>{let t=b.get(e);if(t)return t;let n=s(e);return b.set(e,n),n},E=(e,t={})=>Object.entries(e).filter(([e])=>e!==`global`&&e!==`unknown`).map(([e,r])=>{let i=r?.updatedAt??null,a=i?y-i:null,s=C(n,r,t.agentIdOverride),c=s.model??p??null,l=k({cfg:n,provider:s.provider,model:c,contextTokensOverride:r?.contextTokens,fallbackContextTokens:g??void 0})??null,u=o(r),d=typeof r?.totalTokens==`number`?r?.totalTokensFresh!==!1:!1,f=l!=null&&u!==void 0?Math.max(0,l-u):null,m=l&&l>0&&u!==void 0?Math.min(999,Math.round(u/l*100)):null,h=F(e)?.agentId;return{agentId:t.agentIdOverride??h,key:e,kind:x(e,r),sessionId:r?.sessionId,updatedAt:i,age:a,thinkingLevel:r?.thinkingLevel,verboseLevel:r?.verboseLevel,reasoningLevel:r?.reasoningLevel,elevatedLevel:r?.elevatedLevel,systemSent:r?.systemSent,abortedLastRun:r?.abortedLastRun,inputTokens:r?.inputTokens,outputTokens:r?.outputTokens,cacheRead:r?.cacheRead,cacheWrite:r?.cacheWrite,totalTokens:u??null,totalTokensFresh:d,remainingTokens:f,percentUsed:m,model:c,contextTokens:l,flags:Ct(r)}}).sort((e,t)=>(t.updatedAt??0)-(e.updatedAt??0)),D=new Set,O=a.agents.map(e=>{let t=z(n.session?.store,{agentId:e.id});D.add(t);let r=E(T(t),{agentIdOverride:e.id});return{agentId:e.id,path:t,count:r.length,recent:r.slice(0,10)}}),A=Array.from(D).flatMap(e=>E(T(e))).toSorted((e,t)=>(t.updatedAt??0)-(e.updatedAt??0)),M=A.slice(0,10),N=A.length,P={runtimeVersion:l(process.env),linkChannel:r?{id:r.plugin.id,label:r.plugin.meta.label??`Channel`,linked:r.linked,authAgeMs:r.authAgeMs}:void 0,heartbeat:{defaultAgentId:a.defaultId,agents:c},channelSummary:u,queuedSystemEvents:d,sessions:{paths:Array.from(D),count:N,defaults:{model:p??null,contextTokens:g??null},recent:M,byAgent:O}};return t?P:wt(P)}function Et(e){return e.then(e=>({ok:!0,value:e}),e=>({ok:!1,error:e}))}function Dt(e){if(!e.ok)throw e.error;return e.value}function Ot(e){if(e.plugins?.enabled===!1)return{enabled:!1,slot:null,reason:`plugins disabled`};let t=typeof e.plugins?.slots?.memory==`string`?e.plugins.slots.memory.trim():``;return t&&t.toLowerCase()===`none`?{enabled:!1,slot:null,reason:`plugins.slots.memory="none"`}:{enabled:!0,slot:t||`memory-core`}}async function kt(e){let t=ne({config:e.cfg}),n=e.cfg.gateway?.mode===`remote`,r=typeof e.cfg.gateway?.remote?.url==`string`?e.cfg.gateway.remote.url:``,i=n&&!r.trim(),a=n?`remote`:`local`,o=xt(e.cfg),s=o.warning,c=i?null:await he({url:t.url,auth:o.auth,timeoutMs:Math.min(e.opts.all?5e3:2500,e.opts.timeoutMs??1e4)}).catch(()=>null);return s&&c?.ok===!1&&(c.error=c.error?`${c.error}; ${s}`:s,s=void 0),{gatewayConnection:t,remoteUrlMissing:i,gatewayMode:a,gatewayProbeAuth:o.auth,gatewayProbeAuthWarning:s,gatewayProbe:c}}async function At(e){return e.gatewayReachable?await B({config:e.cfg,method:`channels.status`,params:{probe:!1,timeoutMs:Math.min(8e3,e.opts.timeoutMs??1e4)},timeoutMs:Math.min(e.opts.all?5e3:2500,e.opts.timeoutMs??1e4)}).catch(()=>null):null}async function jt(e){let{cfg:t,agentStatus:n,memoryPlugin:r}=e;if(!r.enabled||r.slot!==`memory-core`)return null;let i=n.defaultId??`main`,{manager:a}=await ce({cfg:t,agentId:i,purpose:`status`});if(!a)return null;try{await a.probeVectorAvailability()}catch{}let o=a.status();return await a.close?.().catch(()=>{}),{agentId:i,...o}}async function Mt(e){let t=await d(),{resolvedConfig:n,diagnostics:r}=await ae({config:t,commandName:`status --json`,targetIds:G(),mode:`summary`}),i=We(),a=n.gateway?.tailscale?.mode??`off`,o=Ae({timeoutMs:e.all?6500:2500,fetchGit:!0,includeRegistry:!0}),s=bt(n),c=Tt({config:n,sourceConfig:t}),l=a===`off`?Promise.resolve(null):u((e,t)=>te(e,t,{timeoutMs:1200,maxBuffer:2e5})).catch(()=>null),f=kt({cfg:n,opts:e}),[p,m,h,g,_]=await Promise.all([l,o,s,f,c]),v=a!==`off`&&p?`https://${p}${oe(n.gateway?.controlUi?.basePath)}`:null,{gatewayConnection:y,remoteUrlMissing:b,gatewayMode:x,gatewayProbeAuth:S,gatewayProbeAuthWarning:C,gatewayProbe:w}=g,T=w?.ok===!0,E=w?.presence?Re(w.presence):null,D=At({cfg:n,gatewayReachable:T,opts:e}),O=Ot(n),k=jt({cfg:n,agentStatus:h,memoryPlugin:O}),[A,j]=await Promise.all([D,k]);return{cfg:n,sourceConfig:t,secretDiagnostics:r,osSummary:i,tailscaleMode:a,tailscaleDns:p,tailscaleHttpsUrl:v,update:m,gatewayConnection:y,remoteUrlMissing:b,gatewayMode:x,gatewayProbeAuth:S,gatewayProbeAuthWarning:C,gatewayProbe:w,gatewayReachable:T,gatewaySelf:E,channelIssues:A?de(A):[],agentStatus:h,channels:{rows:[],details:[]},summary:_,memory:j,memoryPlugin:O}}async function Nt(e,t){return e.json?await Mt({timeoutMs:e.timeoutMs,all:e.all}):await K({label:`Scanning status…`,total:10,enabled:!0},async t=>{t.setLabel(`Loading config…`);let n=await d(),{resolvedConfig:r,diagnostics:i}=await ae({config:n,commandName:`status`,targetIds:G(),mode:`summary`}),a=We(),o=r.gateway?.tailscale?.mode??`off`,s=o===`off`?Promise.resolve(null):u((e,t)=>te(e,t,{timeoutMs:1200,maxBuffer:2e5})).catch(()=>null),c=Et(Ae({timeoutMs:e.all?6500:2500,fetchGit:!0,includeRegistry:!0})),l=Et(bt(r)),f=Et(Tt({config:r,sourceConfig:n}));t.tick(),t.setLabel(`Checking Tailscale…`);let p=await s,m=o!==`off`&&p?`https://${p}${oe(r.gateway?.controlUi?.basePath)}`:null;t.tick(),t.setLabel(`Checking for updates…`);let h=Dt(await c);t.tick(),t.setLabel(`Resolving agents…`);let g=Dt(await l);t.tick(),t.setLabel(`Probing gateway…`);let{gatewayConnection:_,remoteUrlMissing:v,gatewayMode:y,gatewayProbeAuth:b,gatewayProbeAuthWarning:x,gatewayProbe:S}=await kt({cfg:r,opts:e}),C=S?.ok===!0,w=S?.presence?Re(S.presence):null;t.tick(),t.setLabel(`Querying channel status…`);let T=await At({cfg:r,gatewayReachable:C,opts:e}),E=T?de(T):[];t.tick(),t.setLabel(`Summarizing channels…`);let D=await tt(r,{showSecrets:process.env.CLAWDBOT_SHOW_SECRETS?.trim()!==`0`,sourceConfig:n});t.tick(),t.setLabel(`Checking memory…`);let O=Ot(r),k=await jt({cfg:r,agentStatus:g,memoryPlugin:O});t.tick(),t.setLabel(`Reading sessions…`);let A=Dt(await f);return t.tick(),t.setLabel(`Rendering…`),t.tick(),{cfg:r,sourceConfig:n,secretDiagnostics:i,osSummary:a,tailscaleMode:o,tailscaleDns:p,tailscaleHttpsUrl:m,update:h,gatewayConnection:_,remoteUrlMissing:v,gatewayMode:y,gatewayProbeAuth:b,gatewayProbeAuthWarning:x,gatewayProbe:S,gatewayReachable:C,gatewaySelf:w,channelIssues:E,agentStatus:g,channels:D,summary:A,memory:k,memoryPlugin:O}})}function Pt(e){let t=e=>{let t=e.trim();return!t||!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(t)?null:t},n=[e.error,e.closeReason].filter(e=>typeof e==`string`&&e.trim().length>0).join(` `);if(!n||!/pairing required/i.test(n))return null;let r=n.match(/requestId:\s*([^\s)]+)/i);return{requestId:(r&&r[1]?t(r[1]):null)||null}}async function Ft(n,i){if(n.all&&!n.json){await ft(i,{timeoutMs:n.timeoutMs});return}let a=await Nt({json:n.json,timeoutMs:n.timeoutMs,all:n.all},i),o=n.json?await Te({config:a.cfg,sourceConfig:a.sourceConfig,deep:!1,includeFilesystem:!0,includeChannelSecurity:!0}):await K({label:`Running security audit…`,indeterminate:!0,enabled:!0},async()=>await Te({config:a.cfg,sourceConfig:a.sourceConfig,deep:!1,includeFilesystem:!0,includeChannelSecurity:!0})),{cfg:s,osSummary:c,tailscaleMode:l,tailscaleDns:u,tailscaleHttpsUrl:d,update:f,gatewayConnection:p,remoteUrlMissing:m,gatewayMode:h,gatewayProbeAuth:g,gatewayProbeAuthWarning:_,gatewayProbe:v,gatewayReachable:y,gatewaySelf:b,channelIssues:x,agentStatus:S,channels:C,summary:w,secretDiagnostics:T,memory:E,memoryPlugin:O}=a,k=n.usage?await K({label:`Fetching usage snapshot…`,indeterminate:!0,enabled:n.json!==!0},async()=>await D({timeoutMs:n.timeoutMs})):void 0,j=n.deep?await K({label:`Checking gateway health…`,indeterminate:!0,enabled:n.json!==!0},async()=>await B({method:`health`,params:{probe:!0},timeoutMs:n.timeoutMs,config:a.cfg})):void 0,M=n.deep&&y?await B({method:`last-heartbeat`,params:{},timeoutMs:n.timeoutMs,config:a.cfg}).catch(()=>null):null,N=xe({configChannel:Se(s.update?.channel),installKind:f.installKind,gitTag:f.git?.tag??null,gitBranch:f.git?.branch??null});if(n.json){let[e,t]=await Promise.all([_t(),vt()]);i.log(JSON.stringify({...w,os:c,update:f,updateChannel:N.channel,updateChannelSource:N.source,memory:E,memoryPlugin:O,gateway:{mode:h,url:p.url,urlSource:p.urlSource,misconfigured:m,reachable:y,connectLatencyMs:v?.connectLatencyMs??null,self:b,error:v?.error??null,authWarning:_??null},gatewayService:e,nodeService:t,agents:S,securityAudit:o,secretDiagnostics:T,...j||k||M?{health:j,usage:k,lastHeartbeat:M}:{}},null,2));return}let P=e=>t.muted(e),F=e=>t.success(e),I=e=>t.warn(e);if(n.verbose){let e=ne({config:a.cfg});i.log(r(`Gateway connection:`));for(let t of e.message.split(`
7
7
  `))i.log(` ${t}`);i.log(``)}let R=_e();if(T.length>0){i.log(t.warn(`Secret diagnostics:`));for(let e of T)i.log(`- ${e}`);i.log(``)}let ee=s.gateway?.controlUi?.enabled??!0?se({port:e(s),bind:s.gateway?.bind,customBindHost:s.gateway?.customBindHost,basePath:s.gateway?.controlUi?.basePath}).httpUrl:`disabled`,te=(()=>{let e=m?`fallback ${p.url}`:`${p.url}${p.urlSource?` (${p.urlSource})`:``}`,t=m?I(`misconfigured (remote.url missing)`):y?F(`reachable ${pt(v?.connectLatencyMs)}`):I(v?.error?`unreachable (${v.error})`:`unreachable`),n=y&&!m?` · auth ${De(g)}`:``,r=b?.host||b?.version||b?.platform?[b?.host?b.host:null,b?.ip?`(${b.ip})`:null,b?.version?`app ${b.version}`:null,b?.platform?b.platform:null].filter(Boolean).join(` `):null;return`${h} · ${e} · ${t}${n}${r?` · ${r}`:``}`})(),z=Pt({error:v?.error??null,closeReason:v?.close?.reason??null}),V=(()=>{let e=S.bootstrapPendingCount>0?`${S.bootstrapPendingCount} bootstrap file${S.bootstrapPendingCount===1?``:`s`} present`:`no bootstrap files`,t=S.agents.find(e=>e.id===S.defaultId),n=t?.lastActiveAgeMs==null?`unknown`:W(t.lastActiveAgeMs),r=t?` · default ${t.id} active ${n}`:``;return`${S.agents.length} · ${e} · sessions ${S.totalSessions}${r}`})(),[H,U]=await Promise.all([_t(),vt()]),re=(()=>{if(H.installed===!1)return`${H.label} not installed`;let e=H.managedByOpenClaw?`installed · `:``;return`${H.label} ${e}${H.loadedText}${H.runtimeShort?` · ${H.runtimeShort}`:``}`})(),ie=(()=>{if(U.installed===!1)return`${U.label} not installed`;let e=U.managedByOpenClaw?`installed · `:``;return`${U.label} ${e}${U.loadedText}${U.runtimeShort?` · ${U.runtimeShort}`:``}`})(),G=w.sessions.defaults,ae=G.contextTokens?` (${$(G.contextTokens)} ctx)`:``,oe=w.queuedSystemEvents.length>0?`${w.queuedSystemEvents.length} queued`:`none`,ce=j?F(`enabled`):P(`skipped (use --deep)`),le=(()=>{let e=w.heartbeat.agents.map(e=>!e.enabled||!e.everyMs?`disabled (${e.agentId})`:`${e.every} (${e.agentId})`).filter(Boolean);return e.length>0?e.join(`, `):`disabled`})(),ue=(()=>{if(!n.deep)return null;if(!y)return I(`unavailable`);if(!M)return P(`none`);let e=W(Date.now()-M.ts),t=M.channel??`unknown`,r=M.accountId?`account ${M.accountId}`:null;return[M.status,`${e} ago`,t,r].filter(Boolean).join(` · `)})(),de=w.sessions.paths.length>1?`${w.sessions.paths.length} stores`:w.sessions.paths[0]??`unknown`,fe=(()=>{if(!O.enabled)return P(`disabled${O.reason?` (${O.reason})`:``}`);if(!E){let e=O.slot?`plugin ${O.slot}`:`plugin`;return O.slot&&O.slot!==`memory-core`?`enabled (${e})`:P(`enabled (${e}) · unavailable`)}let e=[],t=E.dirty?` · ${I(`dirty`)}`:``;e.push(`${E.files} files · ${E.chunks} chunks${t}`),E.sources?.length&&e.push(`sources ${E.sources.join(`, `)}`),O.slot&&e.push(`plugin ${O.slot}`);let n=(e,t)=>e===`ok`?F(t):e===`warn`?I(t):P(t),r=E.vector;if(r){let t=ze(r),i=t.state===`disabled`?`vector off`:`vector ${t.state}`;e.push(n(t.tone,i))}let i=E.fts;if(i){let t=Be(i),r=t.state===`disabled`?`fts off`:`fts ${t.state}`;e.push(n(t.tone,r))}let a=E.cache;if(a){let t=Ve(a);e.push(n(t.tone,t.text))}return e.join(` · `)})(),pe=Oe(f),me=ke(f).replace(/^Update:\s*/i,``),he=N.label,q=be(f),ge=[{Item:`Dashboard`,Value:ee},{Item:`OS`,Value:`${c.label} · node ${process.versions.node}`},{Item:`Tailscale`,Value:l===`off`?P(`off`):u&&d?`${l} · ${u} · ${d}`:I(`${l} · magicdns unknown`)},{Item:`Channel`,Value:he},...q?[{Item:`Git`,Value:q}]:[],{Item:`Update`,Value:pe.available?I(`available · ${me}`):me},{Item:`Gateway`,Value:te},..._?[{Item:`Gateway auth warning`,Value:I(_)}]:[],{Item:`Gateway service`,Value:re},{Item:`Node service`,Value:ie},{Item:`Agents`,Value:V},{Item:`Memory`,Value:fe},{Item:`Probes`,Value:ce},{Item:`Events`,Value:oe},{Item:`Heartbeat`,Value:le},...ue?[{Item:`Last heartbeat`,Value:ue}]:[],{Item:`Sessions`,Value:`${w.sessions.count} active · default ${G.model??`unknown`}${ae} · ${de}`}];i.log(t.heading(`OpenClaw status`)),i.log(``),i.log(t.heading(`Overview`)),i.log(J({width:R,columns:[{key:`Item`,header:`Item`,minWidth:12},{key:`Value`,header:`Value`,flex:!0,minWidth:32}],rows:ge}).trimEnd()),z&&(i.log(``),i.log(t.warn(`Gateway pairing approval required.`)),z.requestId&&i.log(t.muted(`Recovery: ${L(`openclaw devices approve ${z.requestId}`)}`)),i.log(t.muted(`Fallback: ${L(`openclaw devices approve --latest`)}`)),i.log(t.muted(`Inspect: ${L(`openclaw devices list`)}`))),i.log(``),i.log(t.heading(`Security audit`)),i.log(t.muted(`Summary: ${(e=>[t.error(`${e.critical} critical`),t.warn(`${e.warn} warn`),t.muted(`${e.info} info`)].join(` · `))(o.summary)}`));let ve=o.findings.filter(e=>e.severity===`critical`||e.severity===`warn`);if(ve.length===0)i.log(t.muted(`No critical or warn findings detected.`));else{let e=e=>e===`critical`?t.error(`CRITICAL`):e===`warn`?t.warn(`WARN`):t.muted(`INFO`),n=e=>e===`critical`?0:e===`warn`?1:2,r=[...ve].toSorted((e,t)=>n(e.severity)-n(t.severity)),a=r.slice(0,6);for(let n of a)i.log(` ${e(n.severity)} ${n.title}`),i.log(` ${Me(n.detail.replaceAll(`
8
8
  `,` `),160)}`),n.remediation?.trim()&&i.log(` ${t.muted(`Fix: ${n.remediation.trim()}`)}`);r.length>a.length&&i.log(t.muted(`… +${r.length-a.length} more`))}i.log(t.muted(`Full report: ${L(`openclaw security audit`)}`)),i.log(t.muted(`Deep probe: ${L(`openclaw security audit --deep`)}`)),i.log(``),i.log(t.heading(`Channels`));let Ce=ct(x);if(i.log(J({width:R,columns:[{key:`Channel`,header:`Channel`,minWidth:10},{key:`Enabled`,header:`Enabled`,minWidth:7},{key:`State`,header:`State`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:24}],rows:C.rows.map(e=>{let n=Ce.get(e.id)??[],r=e.state===`off`?`off`:n.length>0?`warn`:e.state,i=n.length>0?` · ${I(`gateway: ${Me(n[0]?.message??`issue`,84)}`)}`:``;return{Channel:e.label,Enabled:e.enabled?F(`ON`):P(`OFF`),State:r===`ok`?F(`OK`):r===`warn`?I(`WARN`):r===`off`?P(`OFF`):t.accentDim(`SETUP`),Detail:`${e.detail}${i}`}})}).trimEnd()),i.log(``),i.log(t.heading(`Sessions`)),i.log(J({width:R,columns:[{key:`Key`,header:`Key`,minWidth:20,flex:!0},{key:`Kind`,header:`Kind`,minWidth:6},{key:`Age`,header:`Age`,minWidth:9},{key:`Model`,header:`Model`,minWidth:14},{key:`Tokens`,header:`Tokens`,minWidth:16}],rows:w.sessions.recent.length>0?w.sessions.recent.map(e=>({Key:Me(e.key,32),Kind:e.kind,Age:e.updatedAt?W(e.age):`no activity`,Model:e.model??`unknown`,Tokens:mt(e)})):[{Key:P(`no sessions yet`),Kind:``,Age:``,Model:``,Tokens:``}]}).trimEnd()),w.queuedSystemEvents.length>0&&(i.log(``),i.log(t.heading(`System events`)),i.log(J({width:R,columns:[{key:`Event`,header:`Event`,flex:!0,minWidth:24}],rows:w.queuedSystemEvents.slice(0,5).map(e=>({Event:e}))}).trimEnd()),w.queuedSystemEvents.length>5&&i.log(P(`… +${w.queuedSystemEvents.length-5} more`))),j){i.log(``),i.log(t.heading(`Health`));let e=[];e.push({Item:`Gateway`,Status:F(`reachable`),Detail:`${j.durationMs}ms`});for(let t of ye(j,{accountMode:`all`})){let n=t.indexOf(`:`);if(n===-1)continue;let r=t.slice(0,n).trim(),i=t.slice(n+1).trim(),a=i.toLowerCase(),o=a.startsWith(`ok`)?F(`OK`):a.startsWith(`failed`)?I(`WARN`):a.startsWith(`not configured`)?P(`OFF`):a.startsWith(`configured`)?F(`OK`):a.startsWith(`linked`)?F(`LINKED`):a.startsWith(`not linked`)?I(`UNLINKED`):I(`WARN`);e.push({Item:r,Status:o,Detail:i})}i.log(J({width:R,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Status`,header:`Status`,minWidth:8},{key:`Detail`,header:`Detail`,flex:!0,minWidth:28}],rows:e}).trimEnd())}if(k){i.log(``),i.log(t.heading(`Usage`));for(let e of A(k))i.log(e)}i.log(``),i.log(`FAQ: https://docs.openclaw.ai/faq`),i.log(`Troubleshooting: https://docs.openclaw.ai/troubleshooting`),i.log(``);let we=je(f);we&&(i.log(t.warn(we)),i.log(``)),i.log(`Next steps:`),i.log(` Need to share? ${L(`openclaw status --all`)}`),i.log(` Need to debug live? ${L(`openclaw logs --follow`)}`),y?i.log(` Need to test channels? ${L(`openclaw status --deep`)}`):i.log(` Fix reachability first: ${L(`openclaw gateway probe`)}`)}export{Tt as n,Re as r,Ft as t};
9
- //# sourceMappingURL=status-JIPeVrsc.js.map
9
+ //# sourceMappingURL=status-DEAX-TLb.js.map
@@ -1 +1 @@
1
- import"./paths-piJASC5k.js";import"./paths-BpQOWYiT.js";import"./logger-DwWqfo66.js";import"./model-selection-vfhBuN9O.js";import{B as e,G as t,H as n,R as r,U as i,V as a,W as o,z as s}from"./pi-embedded-BZSn84Bh.js";import"./github-copilot-token-wm6mbypz.js";import"./proxy-env-BNhTHkd_.js";import"./send-DRLSCwCk.js";import"./send-Bx2Qr7VH.js";import"./tokens-B2fq-rL6.js";import"./deliver-56mQkDw3.js";import"./diagnostic-CDxNevIQ.js";import"./send-DKrzj_Ts.js";import"./pi-model-discovery-BbD1YJNx.js";import"./image-Cm1RUBqD.js";import"./audio-transcription-runner-DPwmBYQj.js";import"./fetch-B9tORjG8.js";import"./fetch-guard-cu7DGSRF.js";import"./api-key-rotation-CCH1wYVU.js";import"./proxy-fetch-DnjU1fEB.js";import"./ir-BF0M2kGp.js";import"./render-BXEUPIHe.js";import"./target-errors-CpKXh2RS.js";import"./commands-registry-D40KqYOm.js";import"./fetch-DHo17YmK.js";import"./skill-commands-Db232ZRp.js";import"./channel-activity-YIMhOAUo.js";import"./tables-btcG3yFT.js";import"./send-C1CJ-GHU.js";import"./outbound-attachment-DqEKghQp.js";import"./send-JYgM9Sm-2.js";import"./fetch-hy0JKSsm.js";import"./query-expansion-r_iXkNzt.js";import"./manager-4Y9fRgdw.js";export{r as countActiveDescendantRuns,s as countPendingDescendantRuns,e as countPendingDescendantRunsExcludingRun,a as isSubagentSessionRunActive,n as listSubagentRunsForRequester,i as replaceSubagentRunAfterSteer,o as resolveRequesterForChildSession,t as shouldIgnorePostCompletionAnnounceForSession};
1
+ import"./paths-piJASC5k.js";import"./paths-BpQOWYiT.js";import"./logger-DwWqfo66.js";import"./model-selection-vfhBuN9O.js";import{B as e,G as t,H as n,R as r,U as i,V as a,W as o,z as s}from"./pi-embedded-B_6OtP8m.js";import"./github-copilot-token-wm6mbypz.js";import"./proxy-env-BNhTHkd_.js";import"./send-DRLSCwCk.js";import"./send-Bx2Qr7VH.js";import"./tokens-B2fq-rL6.js";import"./deliver-56mQkDw3.js";import"./diagnostic-CDxNevIQ.js";import"./send-DKrzj_Ts.js";import"./pi-model-discovery-BbD1YJNx.js";import"./image-Cm1RUBqD.js";import"./audio-transcription-runner-DPwmBYQj.js";import"./fetch-B9tORjG8.js";import"./fetch-guard-cu7DGSRF.js";import"./api-key-rotation-CCH1wYVU.js";import"./proxy-fetch-DnjU1fEB.js";import"./ir-BF0M2kGp.js";import"./render-BXEUPIHe.js";import"./target-errors-CpKXh2RS.js";import"./commands-registry-D40KqYOm.js";import"./fetch-DHo17YmK.js";import"./skill-commands-Db232ZRp.js";import"./channel-activity-YIMhOAUo.js";import"./tables-btcG3yFT.js";import"./send-C1CJ-GHU.js";import"./outbound-attachment-DqEKghQp.js";import"./send-JYgM9Sm-2.js";import"./fetch-hy0JKSsm.js";import"./query-expansion-r_iXkNzt.js";import"./manager-4Y9fRgdw.js";export{r as countActiveDescendantRuns,s as countPendingDescendantRuns,e as countPendingDescendantRunsExcludingRun,a as isSubagentSessionRunActive,n as listSubagentRunsForRequester,i as replaceSubagentRunAfterSteer,o as resolveRequesterForChildSession,t as shouldIgnorePostCompletionAnnounceForSession};
@@ -1 +1 @@
1
- import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import"./model-selection-BlC_rXAN.js";import{ar as e,dr as t,fr as n,lr as r,mr as i,or as a,pr as o,sr as s}from"./reply-l-Y47HP4.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";export{e as countActiveDescendantRuns,a as countPendingDescendantRuns,s as countPendingDescendantRunsExcludingRun,r as isSubagentSessionRunActive,t as listSubagentRunsForRequester,n as replaceSubagentRunAfterSteer,o as resolveRequesterForChildSession,i as shouldIgnorePostCompletionAnnounceForSession};
1
+ import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import"./model-selection-BlC_rXAN.js";import{ar as e,dr as t,fr as n,lr as r,mr as i,or as a,pr as o,sr as s}from"./reply-CjyZeZ-j.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-Cgd_VJHR.js";import"./send-hZFDcGLM.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-D4Bp6MM7.js";import"./image-DsoO5VP5.js";import"./models-config-CdMhNxKV.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-DPdY0NXR.js";import"./api-key-rotation-BRt-vnRV.js";import"./local-roots-6waH0SZ0.js";import"./model-catalog-C1kpjR75.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-ClBkV2eD.js";import"./commands-CGpM84iR.js";import"./commands-registry-B1x54ukc.js";import"./pairing-store-Cg2UxreQ.js";import"./fetch-Dikjvc5M.js";import"./call-CqoMqP5b.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-DOzHPnht.js";import"./send-B7sHR38c2.js";import"./pi-model-discovery-Dps1PPWz.js";import"./exec-approvals-allowlist-CE3nYh0K.js";import"./exec-safe-bin-runtime-policy-Dt0GchLp.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import"./target-errors-a35Md15n.js";import"./read-only-account-inspect-DBwAwB3_.js";import"./channel-selection-CbNtbAEf.js";import"./plugin-auto-enable-DpVL6-ES.js";import"./send-C-AP01PR.js";import"./outbound-attachment-B7wMxwj6.js";import"./delivery-queue-CKbauSFq.js";import"./send-DbeEC2a3.js";import"./channel-activity-YjYNzCpJ.js";import"./tables-Oieq7UbT.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-HJHHZqt6.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-BjYBuREl.js";import"./restart-CHXEHdSC.js";import"./runtime-web-tools-bz76ZaRc.js";import"./command-secret-targets-BVN3kiT9.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-C8iru0UB.js";import"./onboard-helpers-zwybUJWu.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-BUU_-70B.js";import"./memory-cli-jhzJ3as7.js";import"./query-expansion-0OxEb1Io.js";import"./manager-M1GKhLUC.js";import"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-DECgxo6A.js";import"./system-run-command-DEWnZE0r.js";import"./runtime-BC5Ep2pJ.js";import"./stagger-DmFYysrJ.js";export{e as countActiveDescendantRuns,a as countPendingDescendantRuns,s as countPendingDescendantRunsExcludingRun,r as isSubagentSessionRunActive,t as listSubagentRunsForRequester,n as replaceSubagentRunAfterSteer,o as resolveRequesterForChildSession,i as shouldIgnorePostCompletionAnnounceForSession};