@qqbrowser/openclaw-qbot 0.0.88 → 0.0.89

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 (156) hide show
  1. package/dist/{agents-Dxk5oWw_.js → agents-BBYlUP5T.js} +1 -1
  2. package/dist/{agents.config-CXoN8qvY.js → agents.config-CoZtnyKH.js} +1 -1
  3. package/dist/{agents.config-D6kg-4Ct.js → agents.config-Dyqz-Sk-.js} +1 -1
  4. package/dist/{auth-choice-COKpi33u.js → auth-choice-CVvPBerD.js} +1 -1
  5. package/dist/{auth-choice-K5eGX1sj.js → auth-choice-DSNX3Hdu.js} +1 -1
  6. package/dist/{banner-DsZegXc3.js → banner-C4Bgn_Gf.js} +1 -1
  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-BU9Qf5Cq.js → channel-options-9lP0IBR0.js} +1 -1
  12. package/dist/{channel-options-C-h17ZYO.js → channel-options-C9PHeVlU.js} +1 -1
  13. package/dist/{channel-web-DmmMXUdc.js → channel-web-DhNCVKla.js} +1 -1
  14. package/dist/{channel-web-C2Z4xKq3.js → channel-web-NeSGV-e7.js} +1 -1
  15. package/dist/{channels-cli-WBY_CB2-.js → channels-cli-CWu-PrIl.js} +1 -1
  16. package/dist/{channels-cli-DM6DIc_P.js → channels-cli-DHD8V6-q.js} +1 -1
  17. package/dist/{cli-DXZKyKLK.js → cli-BWE7sLVx.js} +1 -1
  18. package/dist/{cli-RLbxgNsy.js → cli-DF5ZcuuX.js} +1 -1
  19. package/dist/{command-registry-CIBlcDrG.js → command-registry-DIOnYWDt.js} +1 -1
  20. package/dist/{compact-BfHim3cA.js → compact-DgbuvsDF.js} +6 -6
  21. package/dist/{compact.runtime-C_urV0W5.js → compact.runtime-B5zaMKSa.js} +1 -1
  22. package/dist/{compact.runtime-eUr8DtWw.js → compact.runtime-B6qfwW6l.js} +1 -1
  23. package/dist/{compact.runtime-DtLl0dZ5.js → compact.runtime-BofMQvNu.js} +1 -1
  24. package/dist/{compact.runtime-BpYpUiXf.js → compact.runtime-C-OsuZNM.js} +1 -1
  25. package/dist/{completion-cli-BYf6ef-t.js → completion-cli-CckNzelT.js} +1 -1
  26. package/dist/{completion-cli-Dsi5-gGE.js → completion-cli-F60ntV7X.js} +1 -1
  27. package/dist/{config-cli-GwzrxUR-.js → config-cli-1Ut82gjz.js} +1 -1
  28. package/dist/{config-cli-IpFnLniP.js → config-cli-BVtPmTcO.js} +1 -1
  29. package/dist/{configure-Cx7WvgVM.js → configure-3Kgwf3gj.js} +1 -1
  30. package/dist/{configure-DIVEkxxF.js → configure-Bpy51qkb.js} +1 -1
  31. package/dist/{deps-send-whatsapp.runtime-CdAcLrxO.js → deps-send-whatsapp.runtime-CI4UsY0E.js} +1 -1
  32. package/dist/{deps-send-whatsapp.runtime-Dj_dh7mb.js → deps-send-whatsapp.runtime-CJbg_i22.js} +1 -1
  33. package/dist/{deps-send-whatsapp.runtime-DJOAewju.js → deps-send-whatsapp.runtime-CPhSRgv3.js} +1 -1
  34. package/dist/{deps-send-whatsapp.runtime-BfuHSQxE.js → deps-send-whatsapp.runtime-DLRNnLUS.js} +1 -1
  35. package/dist/{doctor-completion-BcvWFszV.js → doctor-completion-CucfTzWR.js} +1 -1
  36. package/dist/{doctor-completion-CQMvGm9I.js → doctor-completion-D76qqYqG.js} +1 -1
  37. package/dist/entry.js +1 -1
  38. package/dist/extensionAPI.js +1 -1
  39. package/dist/{gateway-cli-CBK9IHgW.js → gateway-cli-BKWQlBHk.js} +2 -2
  40. package/dist/{gateway-cli-BUcUT6It.js → gateway-cli-DtqcCdL7.js} +2 -2
  41. package/dist/{health-CiTej6rM.js → health-BXDoFh4Q.js} +1 -1
  42. package/dist/{health-Pqtl8jCk.js → health-xCl2atiY.js} +1 -1
  43. package/dist/{hooks-cli-C6nsAzQh.js → hooks-cli-B2j44Nvk.js} +1 -1
  44. package/dist/{hooks-cli-BR-m9Vxi.js → hooks-cli-DT0Hmbz-.js} +1 -1
  45. package/dist/index.js +2 -2
  46. package/dist/llm-slug-generator.js +1 -1
  47. package/dist/{models-CxaUXLzo.js → models-DhX1F_Pj.js} +1 -1
  48. package/dist/{models-cli-DuamSrQA.js → models-cli-B-kAey2t.js} +1 -1
  49. package/dist/{models-cli-DM55mW-t.js → models-cli-B53yy1mw.js} +1 -1
  50. package/dist/{npm-resolution-CKwFeFIB.js → npm-resolution-BIifLd1f.js} +1 -1
  51. package/dist/{npm-resolution-9bO0TPQF.js → npm-resolution-C2Ow0mqR.js} +1 -1
  52. package/dist/{onboard-BU0gG29k.js → onboard-D9IefEER.js} +2 -2
  53. package/dist/{onboard-channels-CsKyM82H.js → onboard-channels-B8JZHEaQ.js} +1 -1
  54. package/dist/{onboard-channels-BK5KINY9.js → onboard-channels-ByD6UdVu.js} +1 -1
  55. package/dist/{onboard-BlGJhhEF.js → onboard-qMIhLeRM.js} +2 -2
  56. package/dist/{onboarding-CM_9Fyo2.js → onboarding-CddGtlY5.js} +1 -1
  57. package/dist/{onboarding-Kz5K9mKB.js → onboarding-CgqsAteJ.js} +1 -1
  58. package/dist/{onboarding.finalize-DstFPCVD.js → onboarding.finalize-BgCWB7kF.js} +1 -1
  59. package/dist/{onboarding.finalize-C96gv5GP.js → onboarding.finalize-CkHWKgcF.js} +1 -1
  60. package/dist/{pi-embedded-BHryO0s2.js → pi-embedded-C6L57IhI.js} +6 -6
  61. package/dist/{pi-embedded-D_03X4gB.js → pi-embedded-CN25rQwp.js} +6 -6
  62. package/dist/{plugin-registry-DyreKTxc.js → plugin-registry-Cido8VxT.js} +1 -1
  63. package/dist/{plugin-registry-Dsb86j5r.js → plugin-registry-CpPyaWT0.js} +1 -1
  64. package/dist/plugin-sdk/{channel-web-BDO73YAY.js → channel-web-DgBEXyWx.js} +1 -1
  65. package/dist/plugin-sdk/{channel-web-C0hljM9U.js → channel-web-T7e1VB_g.js} +1 -1
  66. package/dist/plugin-sdk/{compact.runtime-B-jUdCSu.js → compact.runtime-B0qhTLAN.js} +1 -1
  67. package/dist/plugin-sdk/{compact.runtime-iEjcWTOi.js → compact.runtime-C5aI5KIg.js} +1 -1
  68. package/dist/plugin-sdk/{compact.runtime-BspLSIc1.js → compact.runtime-Da9JL-Re.js} +1 -1
  69. package/dist/plugin-sdk/{compact.runtime-CMWw2lwa.js → compact.runtime-DuWXCPO4.js} +1 -1
  70. package/dist/plugin-sdk/{compact.runtime-HnqzVAl7.js → compact.runtime-F35snTaz.js} +1 -1
  71. package/dist/plugin-sdk/{compact.runtime-C2keFFLA.js → compact.runtime-kL8PhhSi.js} +1 -1
  72. package/dist/plugin-sdk/compat.js +1 -1
  73. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BRm24Qy-.js → deps-send-whatsapp.runtime-BWVV9ImJ.js} +1 -1
  74. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Bw9eegUO.js → deps-send-whatsapp.runtime-BdOLZ0P3.js} +1 -1
  75. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DdS9G3TR.js → deps-send-whatsapp.runtime-DMD-mrgL.js} +1 -1
  76. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-ClvlojBM.js → deps-send-whatsapp.runtime-DNaHPuYl.js} +1 -1
  77. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DjAB5JP0.js → deps-send-whatsapp.runtime-DkmDJ3eX.js} +1 -1
  78. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-yd5qmNGP.js → deps-send-whatsapp.runtime-nRQWODTL.js} +1 -1
  79. package/dist/plugin-sdk/{dispatch-BtGxkC47.js → dispatch--4Vuy9oL.js} +6 -6
  80. package/dist/plugin-sdk/{dispatch-BO5EIrCx.js → dispatch-DPafUBvi.js} +6 -6
  81. package/dist/plugin-sdk/{dispatch-DABpoSJj.js → dispatch-DzdnDix3.js} +6 -6
  82. package/dist/plugin-sdk/{dispatch-DfBUhUa2.js → dispatch-_3aPMKVc.js} +6 -6
  83. package/dist/plugin-sdk/{dispatch-BFVL83hy.js → dispatch-v8f5j6tA.js} +6 -6
  84. package/dist/plugin-sdk/index.js +1 -1
  85. package/dist/plugin-sdk/irc.js +1 -1
  86. package/dist/plugin-sdk/matrix.js +1 -1
  87. package/dist/plugin-sdk/msteams.js +1 -1
  88. package/dist/plugin-sdk/nextcloud-talk.js +1 -1
  89. package/dist/plugin-sdk/{reply-0QJVop5g.js → reply-FZOMaPdT.js} +6 -6
  90. package/dist/plugin-sdk/{slash-dispatch.runtime-I6_T20Yd.js → slash-dispatch.runtime-CV3coyWo.js} +1 -1
  91. package/dist/plugin-sdk/{slash-dispatch.runtime-BwEZoF7O.js → slash-dispatch.runtime-CYrhiT19.js} +1 -1
  92. package/dist/plugin-sdk/{slash-dispatch.runtime-W9VRo3lf.js → slash-dispatch.runtime-CkVpd9xh.js} +1 -1
  93. package/dist/plugin-sdk/{slash-dispatch.runtime-CaemgmaW.js → slash-dispatch.runtime-CzBVRyba.js} +1 -1
  94. package/dist/plugin-sdk/{slash-dispatch.runtime-B4nePbcc.js → slash-dispatch.runtime-DjGJDpWI.js} +1 -1
  95. package/dist/plugin-sdk/{slash-dispatch.runtime-ByQEhvcx.js → slash-dispatch.runtime-WIHCc0nP.js} +1 -1
  96. package/dist/plugin-sdk/{subagent-registry-runtime-pjzgZyiw.js → subagent-registry-runtime-4o_8yfyB.js} +1 -1
  97. package/dist/plugin-sdk/{subagent-registry-runtime-ikSo08Bh.js → subagent-registry-runtime-BJxZkq6N.js} +1 -1
  98. package/dist/plugin-sdk/{subagent-registry-runtime-BPHOIYnR.js → subagent-registry-runtime-BRl0zIp-.js} +1 -1
  99. package/dist/plugin-sdk/{subagent-registry-runtime-C2TUyWmj.js → subagent-registry-runtime-C-2UF0IM.js} +1 -1
  100. package/dist/plugin-sdk/{subagent-registry-runtime-Co3rxlYB.js → subagent-registry-runtime-bCP-yDZd.js} +1 -1
  101. package/dist/plugin-sdk/{subagent-registry-runtime-Wu14xqj_.js → subagent-registry-runtime-lM2A6bas.js} +1 -1
  102. package/dist/plugin-sdk/{web-Bgl0ILbD.js → web--MzzmLKe.js} +1 -1
  103. package/dist/plugin-sdk/{web-BzRQSS8R.js → web-BoQezxCE.js} +1 -1
  104. package/dist/plugin-sdk/{web-CK9n5ZfK.js → web-CgFT-LB5.js} +1 -1
  105. package/dist/plugin-sdk/{web-3TYyfPQG.js → web-CskfGkR8.js} +1 -1
  106. package/dist/plugin-sdk/{web-WIpdyZZQ.js → web-KZ3WEX08.js} +1 -1
  107. package/dist/plugin-sdk/{web-BCOXLnUB.js → web-sUKMDnvE.js} +1 -1
  108. package/dist/plugin-sdk/whatsapp.js +1 -1
  109. package/dist/{plugins-cli-B_m-0xTz.js → plugins-cli-7Rom2MRn.js} +1 -1
  110. package/dist/{plugins-cli-fpI_fBTE.js → plugins-cli-ULYhpcRr.js} +1 -1
  111. package/dist/{program-B52FJo5X.js → program-C8M8kVC0.js} +2 -2
  112. package/dist/{program-context-9FmjmgRi.js → program-context-DNheupaq.js} +1 -1
  113. package/dist/{prompt-select-styled-7bpPt2PG.js → prompt-select-styled-BfSAWDfm.js} +1 -1
  114. package/dist/{prompt-select-styled-bL9scez3.js → prompt-select-styled-Qtie1Z5m.js} +1 -1
  115. package/dist/{provider-auth-helpers-CatlYQ1x.js → provider-auth-helpers-PSez6fyE.js} +1 -1
  116. package/dist/{provider-auth-helpers-DgQEZQZm.js → provider-auth-helpers-fIKVMJmj.js} +1 -1
  117. package/dist/{push-apns-Bc0uTUFe.js → push-apns-CZ3x5b7S.js} +1 -1
  118. package/dist/{push-apns-Dq1z7GKZ.js → push-apns-D4QwEU4o.js} +1 -1
  119. package/dist/{register.agent-Cjvn_JC_.js → register.agent-CQCSZoM3.js} +1 -1
  120. package/dist/{register.agent-DZ68nNV_.js → register.agent-CkdmFMol.js} +1 -1
  121. package/dist/{register.configure-DAq-OZQ_.js → register.configure-CY7jH_t-.js} +1 -1
  122. package/dist/{register.configure-DNeVIlZk.js → register.configure-jvsFtsEY.js} +1 -1
  123. package/dist/{register.maintenance-Cx5TbFUH.js → register.maintenance-Cn2-JBxc.js} +1 -1
  124. package/dist/{register.maintenance-BGD-EdYb.js → register.maintenance-DbdyMqnN.js} +1 -1
  125. package/dist/{register.message-BVBF2xBA.js → register.message-8Pxm1wyr.js} +1 -1
  126. package/dist/{register.message-BahjRagK.js → register.message-DxNX0-7A.js} +1 -1
  127. package/dist/{register.onboard-BYsU9URi.js → register.onboard-BeuVHdxu.js} +1 -1
  128. package/dist/{register.onboard-CsUvw9JY.js → register.onboard-D9LNxSOp.js} +1 -1
  129. package/dist/{register.setup-DUGQ3LjU.js → register.setup-AyriKZAD.js} +1 -1
  130. package/dist/{register.setup-Czz8kiz8.js → register.setup-D6sjApkR.js} +1 -1
  131. package/dist/{register.status-health-sessions-DwQDXdjY.js → register.status-health-sessions-C3YEi9ej.js} +1 -1
  132. package/dist/{register.status-health-sessions-C-6pt1vC.js → register.status-health-sessions-DLibm4n2.js} +1 -1
  133. package/dist/{register.subclis-nr-J0DsM.js → register.subclis-DMwBX73g.js} +1 -1
  134. package/dist/{reply-Bv0w_dst.js → reply-JaJmymld.js} +6 -6
  135. package/dist/{run-main-C9SR6tqO.js → run-main-BtJ9Rvkf.js} +1 -1
  136. package/dist/{server-node-events-DBU3p4Am.js → server-node-events-B1xc0xHC.js} +1 -1
  137. package/dist/{server-node-events-duTsLOu5.js → server-node-events-DkYb_tMY.js} +1 -1
  138. package/dist/{slash-dispatch.runtime-BKW0b-z4.js → slash-dispatch.runtime-5FhvH4vs.js} +1 -1
  139. package/dist/{slash-dispatch.runtime-Dllhj5El.js → slash-dispatch.runtime-8bdhjt7e.js} +1 -1
  140. package/dist/{slash-dispatch.runtime-BykVo525.js → slash-dispatch.runtime-BSGNAoT3.js} +1 -1
  141. package/dist/{slash-dispatch.runtime-CwKA-3Mz.js → slash-dispatch.runtime-DzFzghS8.js} +1 -1
  142. package/dist/{status-BUdDRE9f.js → status-Ln-hRgxh.js} +1 -1
  143. package/dist/{status-QCEyD_DK.js → status-XJoKJIPd.js} +1 -1
  144. package/dist/{subagent-registry-runtime-ANqbVbfo.js → subagent-registry-runtime-CMgr0_UE.js} +1 -1
  145. package/dist/{subagent-registry-runtime-CWrWUjll.js → subagent-registry-runtime-DA3RtD85.js} +1 -1
  146. package/dist/{subagent-registry-runtime-CA_UwsAM.js → subagent-registry-runtime-DDF1mHS2.js} +1 -1
  147. package/dist/{subagent-registry-runtime-DjLSmsYn.js → subagent-registry-runtime-DTliYOy2.js} +1 -1
  148. package/dist/{update-cli-2Prf30Co.js → update-cli-DhZZ9nIA.js} +1 -1
  149. package/dist/{update-cli-BZ7xaJXP.js → update-cli-T5qjfgGh.js} +1 -1
  150. package/dist/{update-runner-Dmea_7oZ.js → update-runner-C6Z9RGJ6.js} +1 -1
  151. package/dist/{update-runner-CzyTP7xB.js → update-runner-DThdoQ9_.js} +1 -1
  152. package/dist/{web-BYWPQTzp.js → web-BinddLZf.js} +1 -1
  153. package/dist/{web-B90WZv9Y.js → web-CWJIsRZO.js} +1 -1
  154. package/dist/{web-DTS3rwm1.js → web-D995jmBq.js} +1 -1
  155. package/dist/{web-BvZz642s.js → web-F5nE_LwQ.js} +1 -1
  156. package/package.json +1 -1
@@ -1 +1 @@
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-C7tbdlOl.js";import"./paths-BRJCySMM.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{xc as g}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import{t as _}from"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import{i as v}from"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import"./compact-BfHim3cA.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import{_ as y}from"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";import{t as b}from"./path-env-emdAQejM.js";import"./note-DwFvlGbe.js";import"./issue-format-CH9G9Aj1.js";import{t as x}from"./plugin-registry-Dsb86j5r.js";import{t as S}from"./runtime-guard-Cpuk3V_0.js";import{t as C}from"./banner-DsZegXc3.js";import"./doctor-config-flow-D52iYwoS.js";import{n as w}from"./config-guard-Bzr6g0i9.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-CiTej6rM.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-QCEyD_DK.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-CtE6ue9O.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-Dxk5oWw_.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-Bp_xpCbr.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-IpFnLniP.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-IpFnLniP.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-CxaUXLzo.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-CxaUXLzo.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-B35sLSi1.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-B52FJo5X.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-CIBlcDrG.js`).then(e=>e.t);await e(r,t,a,i)}let{registerSubCliByName:n}=await import(`./register.subclis-nr-J0DsM.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-DXZKyKLK.js`),{loadValidatedConfigForPluginRegistration:t}=await import(`./register.subclis-nr-J0DsM.js`).then(e=>e.a),n=await t();n&&e(r,n)}await r.parseAsync(i)}finally{await I()}}export{B as runCli};
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-C7tbdlOl.js";import"./paths-BRJCySMM.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{xc as g}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import{t as _}from"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import{i as v}from"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import"./compact-DgbuvsDF.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import{_ as y}from"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";import{t as b}from"./path-env-emdAQejM.js";import"./note-DwFvlGbe.js";import"./issue-format-CH9G9Aj1.js";import{t as x}from"./plugin-registry-CpPyaWT0.js";import{t as S}from"./runtime-guard-Cpuk3V_0.js";import{t as C}from"./banner-C4Bgn_Gf.js";import"./doctor-config-flow-D52iYwoS.js";import{n as w}from"./config-guard-Bzr6g0i9.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-BXDoFh4Q.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-XJoKJIPd.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-CtE6ue9O.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-BBYlUP5T.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-Bp_xpCbr.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-BVtPmTcO.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-BVtPmTcO.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-DhX1F_Pj.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-DhX1F_Pj.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-B35sLSi1.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-C8M8kVC0.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-DIOnYWDt.js`).then(e=>e.t);await e(r,t,a,i)}let{registerSubCliByName:n}=await import(`./register.subclis-DMwBX73g.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-BWE7sLVx.js`),{loadValidatedConfigForPluginRegistration:t}=await import(`./register.subclis-DMwBX73g.js`).then(e=>e.a),n=await t();n&&e(r,n)}await r.parseAsync(i)}finally{await I()}}export{B as runCli};
@@ -1 +1 @@
1
- import"./paths-DfDmyG-r.js";import{p as e}from"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import{Gs as t,Kn as n}from"./model-selection-D_WMcs-m.js";import{Cn as r,Tn as i,U as a,an as o,fr as s,on as c,sn as l,sr as u,z as d}from"./reply-Bv0w_dst.js";import"./agent-scope-DauKPN2a.js";import{l as f,p}from"./session-key-D3P0tf5P.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import{r as m}from"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import{t as h}from"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";import{c as g,l as _,r as v,s as y}from"./push-apns-Bc0uTUFe.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:t}=e;t&&await n(t,t=>{let n=l({cfg:e.cfg,key:e.sessionKey,store:t});c({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=i({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:a(e.deps)})}const P=async(n,r,i)=>{switch(i.event){case`voice.transcript`:{let a=M(i.payloadJSON);if(!a)return;let s=typeof a.text==`string`?a.text.trim():``;if(!s||s.length>2e4)return;let c=typeof a.sessionKey==`string`?a.sessionKey.trim():``,l=t(),u=f(l.session?.mainKey),p=c.length>0?c:u,{storePath:m,entry:h,canonicalKey:g}=o(p),v=Date.now();if(E({sessionKey:g,fingerprint:T(a,s),now:v}))return;let y=h?.sessionId??b();A({ctx:n,cfg:l,sessionKey:p,storePath:m,canonicalKey:g,entry:h,sessionId:y,now:v}),n.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),d({message:s,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,n.deps).catch(e=>{n.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`agent.request`:{if(!i.payloadJSON)return;let a=null;try{a=JSON.parse(i.payloadJSON)}catch{return}let s=(a?.message??``).trim(),c=y(a?.attachments??void 0),l=[];if(c.length>0)try{let e=await g(s,c,{maxBytes:5e6,log:n.logGateway});s=e.message.trim(),l=e.images}catch{return}if(!s||s.length>2e4)return;let u=m(typeof a?.channel==`string`?a.channel.trim():``)??void 0,f=typeof a?.to==`string`&&a.to.trim()?a.to.trim():void 0,p=!!a?.deliver,h=!!a?.receipt,v=(typeof a?.receiptText==`string`?a.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(a?.sessionKey??``).trim(),S=x.length>0?x:`node-${r}`,C=t(),{storePath:w,entry:T,canonicalKey:E}=o(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&&n.logGateway.warn(`agent delivery disabled node=${r}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:n.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{n.logGateway.warn(`agent receipt failed node=${r}: ${_(e)}`)}):h&&n.logGateway.warn(`agent receipt skipped node=${r}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),d({message:s,images:l,sessionId:O,sessionKey:E,thinking:a?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof a?.timeoutSeconds==`number`?a.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,n.deps).catch(e=>{n.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(i.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:a}=o(C(e.sessionKey)??`node-${r}`),c=C(e.packageName),l=O(C(e.title)??``),d=O(C(e.text)??``),f=`Notification ${t} (node=${r} key=${n}`;if(c&&(f+=` package=${c}`),f+=`)`,t===`posted`){let e=[l,d].filter(Boolean);e.length>0&&(f+=`: ${e.join(` - `)}`)}u(f,{sessionKey:a,contextKey:`notification:${n}`})&&s({reason:`notifications-event`,sessionKey:a});return}case`chat.subscribe`:{if(!i.payloadJSON)return;let e=j(i.payloadJSON);if(!e)return;n.nodeSubscribe(r,e);return}case`chat.unsubscribe`:{if(!i.payloadJSON)return;let e=j(i.payloadJSON);if(!e)return;n.nodeUnsubscribe(r,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(i.payloadJSON);if(!e)return;let n=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${r}`;if(!n||t().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let a=typeof e.runId==`string`?e.runId.trim():``,o=typeof e.command==`string`?e.command.trim():``,c=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,l=e.timedOut===!0,d=typeof e.output==`string`?e.output.trim():``,f=typeof e.reason==`string`?e.reason.trim():``,m=``;if(i.event===`exec.started`)m=`Exec started (node=${r}${a?` id=${a}`:``})`,o&&(m+=`: ${o}`);else if(i.event===`exec.finished`){let e=l?`timeout`:`code ${c??`?`}`,t=D(d);if(!(l||c!==0||t.length>0))return;m=`Exec finished (node=${r}${a?` id=${a}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${r}${a?` id=${a}`:``}${f?`, ${f}`:``})`,o&&(m+=`: ${o}`);u(m,{sessionKey:n,contextKey:a?`exec:${a}`:`exec`}),s(p(n,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(i.payloadJSON);if(!e)return;let t=typeof e.token==`string`?e.token:``,a=typeof e.topic==`string`?e.topic:``,o=e.environment;try{await v({nodeId:r,token:t,topic:a,environment:o})}catch(e){n.logGateway.warn(`push apns register failed node=${r}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
1
+ import"./paths-DfDmyG-r.js";import{p as e}from"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import{Gs as t,Kn as n}from"./model-selection-D_WMcs-m.js";import{Cn as r,Tn as i,U as a,an as o,fr as s,on as c,sn as l,sr as u,z as d}from"./reply-JaJmymld.js";import"./agent-scope-DauKPN2a.js";import{l as f,p}from"./session-key-D3P0tf5P.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import{r as m}from"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import{t as h}from"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";import{c as g,l as _,r as v,s as y}from"./push-apns-CZ3x5b7S.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:t}=e;t&&await n(t,t=>{let n=l({cfg:e.cfg,key:e.sessionKey,store:t});c({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=i({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:a(e.deps)})}const P=async(n,r,i)=>{switch(i.event){case`voice.transcript`:{let a=M(i.payloadJSON);if(!a)return;let s=typeof a.text==`string`?a.text.trim():``;if(!s||s.length>2e4)return;let c=typeof a.sessionKey==`string`?a.sessionKey.trim():``,l=t(),u=f(l.session?.mainKey),p=c.length>0?c:u,{storePath:m,entry:h,canonicalKey:g}=o(p),v=Date.now();if(E({sessionKey:g,fingerprint:T(a,s),now:v}))return;let y=h?.sessionId??b();A({ctx:n,cfg:l,sessionKey:p,storePath:m,canonicalKey:g,entry:h,sessionId:y,now:v}),n.addChatRun(y,{sessionKey:g,clientRunId:`voice-${b()}`}),d({message:s,sessionId:y,sessionKey:g,thinking:`low`,deliver:!1,messageChannel:`node`,inputProvenance:{kind:`external_user`,sourceChannel:`voice`,sourceTool:`gateway.voice.transcript`},senderIsOwner:!1},e,n.deps).catch(e=>{n.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`agent.request`:{if(!i.payloadJSON)return;let a=null;try{a=JSON.parse(i.payloadJSON)}catch{return}let s=(a?.message??``).trim(),c=y(a?.attachments??void 0),l=[];if(c.length>0)try{let e=await g(s,c,{maxBytes:5e6,log:n.logGateway});s=e.message.trim(),l=e.images}catch{return}if(!s||s.length>2e4)return;let u=m(typeof a?.channel==`string`?a.channel.trim():``)??void 0,f=typeof a?.to==`string`&&a.to.trim()?a.to.trim():void 0,p=!!a?.deliver,h=!!a?.receipt,v=(typeof a?.receiptText==`string`?a.receiptText.trim():``)||`Just received your iOS share + request, working on it.`,x=(a?.sessionKey??``).trim(),S=x.length>0?x:`node-${r}`,C=t(),{storePath:w,entry:T,canonicalKey:E}=o(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&&n.logGateway.warn(`agent delivery disabled node=${r}: missing session delivery route (channel=${u??`-`} to=${f??`-`})`),h&&j&&M?N({cfg:C,deps:n.deps,sessionKey:E,channel:j,to:M,text:v}).catch(e=>{n.logGateway.warn(`agent receipt failed node=${r}: ${_(e)}`)}):h&&n.logGateway.warn(`agent receipt skipped node=${r}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),d({message:s,images:l,sessionId:O,sessionKey:E,thinking:a?.thinking??void 0,deliver:A,to:M,channel:j,timeout:typeof a?.timeoutSeconds==`number`?a.timeoutSeconds.toString():void 0,messageChannel:`node`,senderIsOwner:!1},e,n.deps).catch(e=>{n.logGateway.warn(`agent failed node=${r}: ${_(e)}`)});return}case`notifications.changed`:{let e=M(i.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:a}=o(C(e.sessionKey)??`node-${r}`),c=C(e.packageName),l=O(C(e.title)??``),d=O(C(e.text)??``),f=`Notification ${t} (node=${r} key=${n}`;if(c&&(f+=` package=${c}`),f+=`)`,t===`posted`){let e=[l,d].filter(Boolean);e.length>0&&(f+=`: ${e.join(` - `)}`)}u(f,{sessionKey:a,contextKey:`notification:${n}`})&&s({reason:`notifications-event`,sessionKey:a});return}case`chat.subscribe`:{if(!i.payloadJSON)return;let e=j(i.payloadJSON);if(!e)return;n.nodeSubscribe(r,e);return}case`chat.unsubscribe`:{if(!i.payloadJSON)return;let e=j(i.payloadJSON);if(!e)return;n.nodeUnsubscribe(r,e);return}case`exec.started`:case`exec.finished`:case`exec.denied`:{let e=M(i.payloadJSON);if(!e)return;let n=typeof e.sessionKey==`string`?e.sessionKey.trim():`node-${r}`;if(!n||t().tools?.exec?.notifyOnExit===!1||e.suppressNotifyOnExit===!0)return;let a=typeof e.runId==`string`?e.runId.trim():``,o=typeof e.command==`string`?e.command.trim():``,c=typeof e.exitCode==`number`&&Number.isFinite(e.exitCode)?e.exitCode:void 0,l=e.timedOut===!0,d=typeof e.output==`string`?e.output.trim():``,f=typeof e.reason==`string`?e.reason.trim():``,m=``;if(i.event===`exec.started`)m=`Exec started (node=${r}${a?` id=${a}`:``})`,o&&(m+=`: ${o}`);else if(i.event===`exec.finished`){let e=l?`timeout`:`code ${c??`?`}`,t=D(d);if(!(l||c!==0||t.length>0))return;m=`Exec finished (node=${r}${a?` id=${a}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${r}${a?` id=${a}`:``}${f?`, ${f}`:``})`,o&&(m+=`: ${o}`);u(m,{sessionKey:n,contextKey:a?`exec:${a}`:`exec`}),s(p(n,{reason:`exec-event`}));return}case`push.apns.register`:{let e=M(i.payloadJSON);if(!e)return;let t=typeof e.token==`string`?e.token:``,a=typeof e.topic==`string`?e.topic:``,o=e.environment;try{await v({nodeId:r,token:t,topic:a,environment:o})}catch(e){n.logGateway.warn(`push apns register failed node=${r}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
@@ -1 +1 @@
1
- import{p as e}from"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import{Ft as t,ko as n}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import{l as r,p as i}from"./session-key-C7F_iqYg.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import{r as a}from"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{O as o,gn as s,lt as c,sr as l,w as u,xn as d}from"./compact-BfHim3cA.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import{t as f}from"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import{c as p,o as m,s as h}from"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";import{c as g,l as _,r as v,s as y}from"./push-apns-Dq1z7GKZ.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:o(e.deps)})}const P=async(t,o,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 s=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),d=r(l.session?.mainKey),f=s.length>0?s:d,{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()}`}),u({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=${o}: ${_(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(),s=y(r?.attachments??void 0),l=[];if(s.length>0)try{let e=await g(i,s,{maxBytes:5e6,log:t.logGateway});i=e.message.trim(),l=e.images}catch{return}if(!i||i.length>2e4)return;let d=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-${o}`,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&&(!d||!f)){let e=typeof T?.lastChannel==`string`?a(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!d&&e&&(d=e),!f&&t&&(f=t)}let A=p&&!!(d&&f),j=A?d:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${o}: missing session delivery route (channel=${d??`-`} 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=${o}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${o}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),u({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=${o}: ${_(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-${o}`),i=C(e.packageName),a=O(C(e.title)??``),l=O(C(e.text)??``),u=`Notification ${t} (node=${o} key=${n}`;if(i&&(u+=` package=${i}`),u+=`)`,t===`posted`){let e=[a,l].filter(Boolean);e.length>0&&(u+=`: ${e.join(` - `)}`)}s(u,{sessionKey:r,contextKey:`notification:${n}`})&&d({reason:`notifications-event`,sessionKey:r});return}case`chat.subscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeSubscribe(o,e);return}case`chat.unsubscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeUnsubscribe(o,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-${o}`;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,u=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=${o}${r?` id=${r}`:``})`,a&&(m+=`: ${a}`);else if(c.event===`exec.finished`){let e=u?`timeout`:`code ${l??`?`}`,t=D(f);if(!(u||l!==0||t.length>0))return;m=`Exec finished (node=${o}${r?` id=${r}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${o}${r?` id=${r}`:``}${p?`, ${p}`:``})`,a&&(m+=`: ${a}`);s(m,{sessionKey:t,contextKey:r?`exec:${r}`:`exec`}),d(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:o,token:n,topic:r,environment:i})}catch(e){t.logGateway.warn(`push apns register failed node=${o}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
1
+ import{p as e}from"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import{Ft as t,ko as n}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import{l as r,p as i}from"./session-key-C7F_iqYg.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import{r as a}from"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{O as o,gn as s,lt as c,sr as l,w as u,xn as d}from"./compact-DgbuvsDF.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import{t as f}from"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import{c as p,o as m,s as h}from"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";import{c as g,l as _,r as v,s as y}from"./push-apns-D4QwEU4o.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:o(e.deps)})}const P=async(t,o,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 s=typeof i.sessionKey==`string`?i.sessionKey.trim():``,l=n(),d=r(l.session?.mainKey),f=s.length>0?s:d,{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()}`}),u({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=${o}: ${_(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(),s=y(r?.attachments??void 0),l=[];if(s.length>0)try{let e=await g(i,s,{maxBytes:5e6,log:t.logGateway});i=e.message.trim(),l=e.images}catch{return}if(!i||i.length>2e4)return;let d=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-${o}`,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&&(!d||!f)){let e=typeof T?.lastChannel==`string`?a(T.lastChannel):void 0,t=typeof T?.lastTo==`string`?T.lastTo.trim():``;!d&&e&&(d=e),!f&&t&&(f=t)}let A=p&&!!(d&&f),j=A?d:void 0,M=A?f:void 0;p&&!A&&t.logGateway.warn(`agent delivery disabled node=${o}: missing session delivery route (channel=${d??`-`} 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=${o}: ${_(e)}`)}):h&&t.logGateway.warn(`agent receipt skipped node=${o}: missing delivery route (channel=${j??`-`} to=${M??`-`})`),u({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=${o}: ${_(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-${o}`),i=C(e.packageName),a=O(C(e.title)??``),l=O(C(e.text)??``),u=`Notification ${t} (node=${o} key=${n}`;if(i&&(u+=` package=${i}`),u+=`)`,t===`posted`){let e=[a,l].filter(Boolean);e.length>0&&(u+=`: ${e.join(` - `)}`)}s(u,{sessionKey:r,contextKey:`notification:${n}`})&&d({reason:`notifications-event`,sessionKey:r});return}case`chat.subscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeSubscribe(o,e);return}case`chat.unsubscribe`:{if(!c.payloadJSON)return;let e=j(c.payloadJSON);if(!e)return;t.nodeUnsubscribe(o,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-${o}`;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,u=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=${o}${r?` id=${r}`:``})`,a&&(m+=`: ${a}`);else if(c.event===`exec.finished`){let e=u?`timeout`:`code ${l??`?`}`,t=D(f);if(!(u||l!==0||t.length>0))return;m=`Exec finished (node=${o}${r?` id=${r}`:``}, ${e})`,t&&(m+=`\n${t}`)}else m=`Exec denied (node=${o}${r?` id=${r}`:``}${p?`, ${p}`:``})`,a&&(m+=`: ${a}`);s(m,{sessionKey:t,contextKey:r?`exec:${r}`:`exec`}),d(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:o,token:n,topic:r,environment:i})}catch(e){t.logGateway.warn(`push apns register failed node=${o}: ${_(e)}`)}return}default:return}};export{P as handleNodeEvent};
@@ -1 +1 @@
1
- import"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import{Un as e}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{Dn as t,G as n,In as r,R as i,f as a,m as o}from"./compact-BfHim3cA.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import{m as s,s as c}from"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";export{i as createReplyPrefixOptions,o as deliverSlackSlashReplies,n as dispatchReplyWithDispatcher,r as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import{Un as e}from"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{Dn as t,G as n,In as r,R as i,f as a,m as o}from"./compact-DgbuvsDF.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import{m as s,s as c}from"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";export{i as createReplyPrefixOptions,o as deliverSlackSlashReplies,n as dispatchReplyWithDispatcher,r as finalizeInboundContext,a as recordInboundSessionMetaSafe,t as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./paths-DHIowy7j.js";import"./paths-Ilv7GN3y.js";import"./logger-Bzsdb9ed.js";import{Ur as e}from"./model-selection-DFv8WdLJ.js";import{N as t,i as n,j as r,l as i,r as a,v as o}from"./pi-embedded-D_03X4gB.js";import"./github-copilot-token-cC0a32_K.js";import"./proxy-env-BpsHPwSJ.js";import"./send-yEMlt3M_.js";import"./send-Csh2M9t4.js";import"./tokens-DpCVPqg7.js";import"./deliver-Ct_8KNT3.js";import"./diagnostic-B6R9Muxd.js";import"./send-DCvhX9qG.js";import"./pi-model-discovery-D8KklxzY.js";import"./image-DtEj_K_P.js";import"./audio-transcription-runner-DKgG0lnA.js";import"./fetch-CfkK4pM6.js";import"./fetch-guard-CmJidAgV.js";import"./api-key-rotation-CEyNXJoj.js";import"./proxy-fetch-N5EC_5u0.js";import{m as s,s as c}from"./ir-D_G8H2qb.js";import"./render-BXEUPIHe.js";import"./target-errors-Cr6JxKN0.js";import"./commands-registry-BGk8X2Vf.js";import"./fetch-DHo17YmK.js";import"./skill-commands-CG2Cc4Im.js";import"./channel-activity-BxnN9hqN.js";import"./tables-OHSSazoA.js";import"./send-Era5VGYz.js";import"./outbound-attachment-Df8zVNtZ.js";import"./send-CApccc0A.js";import"./fetch-9C9TheDL.js";import"./query-expansion-Cnwzhc4U.js";import"./manager-BH-09ZG7.js";export{i as createReplyPrefixOptions,n as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,t as finalizeInboundContext,a as recordInboundSessionMetaSafe,r as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-DHIowy7j.js";import"./paths-Ilv7GN3y.js";import"./logger-Bzsdb9ed.js";import{Ur as e}from"./model-selection-DFv8WdLJ.js";import{N as t,i as n,j as r,l as i,r as a,v as o}from"./pi-embedded-CN25rQwp.js";import"./github-copilot-token-cC0a32_K.js";import"./proxy-env-BpsHPwSJ.js";import"./send-yEMlt3M_.js";import"./send-Csh2M9t4.js";import"./tokens-DpCVPqg7.js";import"./deliver-Ct_8KNT3.js";import"./diagnostic-B6R9Muxd.js";import"./send-DCvhX9qG.js";import"./pi-model-discovery-D8KklxzY.js";import"./image-DtEj_K_P.js";import"./audio-transcription-runner-DKgG0lnA.js";import"./fetch-CfkK4pM6.js";import"./fetch-guard-CmJidAgV.js";import"./api-key-rotation-CEyNXJoj.js";import"./proxy-fetch-N5EC_5u0.js";import{m as s,s as c}from"./ir-D_G8H2qb.js";import"./render-BXEUPIHe.js";import"./target-errors-Cr6JxKN0.js";import"./commands-registry-BGk8X2Vf.js";import"./fetch-DHo17YmK.js";import"./skill-commands-CG2Cc4Im.js";import"./channel-activity-BxnN9hqN.js";import"./tables-OHSSazoA.js";import"./send-Era5VGYz.js";import"./outbound-attachment-Df8zVNtZ.js";import"./send-CApccc0A.js";import"./fetch-9C9TheDL.js";import"./query-expansion-Cnwzhc4U.js";import"./manager-BH-09ZG7.js";export{i as createReplyPrefixOptions,n as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,t as finalizeInboundContext,a as recordInboundSessionMetaSafe,r as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./paths-BPlh1F_a.js";import"./paths-Bvu3v9nz.js";import"./subsystem-CGGhKjRT.js";import"./workspace-1NxMMGZW.js";import"./utils-BTURUF_N.js";import{Wr as e}from"./model-selection-CH0apK3k.js";import"./github-copilot-token-BVwzqlVJ.js";import"./boolean-DypnRoRK.js";import"./proxy-env-ChGKWN0E.js";import"./frontmatter-B9DmvcgE.js";import"./logger-CvJmQfHn.js";import"./send-bxjN3IZg.js";import"./send-6BwXVInI.js";import{F as t,N as n,b as r,d as i,i as a,r as o}from"./pi-embedded-BHryO0s2.js";import"./tokens-HHTmX-h1.js";import"./deliver-BzgU1r4b.js";import"./diagnostic-B8UkC4xT.js";import"./send-DvPpOk5w.js";import"./pi-model-discovery-dgLr8dl9.js";import"./image-Box9bWEY.js";import"./audio-transcription-runner-C0RhoXzi.js";import"./fetch-D6hEXONG.js";import"./fetch-guard-BLcWroVJ.js";import"./api-key-rotation-BgZo5UsH.js";import"./proxy-fetch-DnvHdcU4.js";import{m as s,s as c}from"./ir-C_xV8tbA.js";import"./render-CBsnn-2A.js";import"./target-errors-L1z5BrGJ.js";import"./commands-registry-BilMYHSq.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-CIDR5t1Z.js";import"./channel-activity-BHphv67n.js";import"./tables-r8RlEZ3D.js";import"./send-eEv75Prb2.js";import"./outbound-attachment-DNy8EKtN.js";import"./send-CTQ5EIQd.js";import"./fetch-CPTYqsuH.js";import"./query-expansion-CvgeGLHg.js";import"./manager-D-kas9Yh.js";export{i as createReplyPrefixOptions,a as deliverSlackSlashReplies,r as dispatchReplyWithDispatcher,t as finalizeInboundContext,o as recordInboundSessionMetaSafe,n as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-BPlh1F_a.js";import"./paths-Bvu3v9nz.js";import"./subsystem-CGGhKjRT.js";import"./workspace-1NxMMGZW.js";import"./utils-BTURUF_N.js";import{Wr as e}from"./model-selection-CH0apK3k.js";import"./github-copilot-token-BVwzqlVJ.js";import"./boolean-DypnRoRK.js";import"./proxy-env-ChGKWN0E.js";import"./frontmatter-B9DmvcgE.js";import"./logger-CvJmQfHn.js";import"./send-bxjN3IZg.js";import"./send-6BwXVInI.js";import{F as t,N as n,b as r,d as i,i as a,r as o}from"./pi-embedded-C6L57IhI.js";import"./tokens-HHTmX-h1.js";import"./deliver-BzgU1r4b.js";import"./diagnostic-B8UkC4xT.js";import"./send-DvPpOk5w.js";import"./pi-model-discovery-dgLr8dl9.js";import"./image-Box9bWEY.js";import"./audio-transcription-runner-C0RhoXzi.js";import"./fetch-D6hEXONG.js";import"./fetch-guard-BLcWroVJ.js";import"./api-key-rotation-BgZo5UsH.js";import"./proxy-fetch-DnvHdcU4.js";import{m as s,s as c}from"./ir-C_xV8tbA.js";import"./render-CBsnn-2A.js";import"./target-errors-L1z5BrGJ.js";import"./commands-registry-BilMYHSq.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-CIDR5t1Z.js";import"./channel-activity-BHphv67n.js";import"./tables-r8RlEZ3D.js";import"./send-eEv75Prb2.js";import"./outbound-attachment-DNy8EKtN.js";import"./send-CTQ5EIQd.js";import"./fetch-CPTYqsuH.js";import"./query-expansion-CvgeGLHg.js";import"./manager-D-kas9Yh.js";export{i as createReplyPrefixOptions,a as deliverSlackSlashReplies,r as dispatchReplyWithDispatcher,t as finalizeInboundContext,o as recordInboundSessionMetaSafe,n as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1 +1 @@
1
- import"./paths-DfDmyG-r.js";import"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import{ti as e}from"./model-selection-D_WMcs-m.js";import{D as t,T as n,bi as r,li as i,ot as a,pt as o}from"./reply-Bv0w_dst.js";import"./agent-scope-DauKPN2a.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import{m as s,s as c}from"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";export{a as createReplyPrefixOptions,t as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,r as finalizeInboundContext,n as recordInboundSessionMetaSafe,i as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
1
+ import"./paths-DfDmyG-r.js";import"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import{ti as e}from"./model-selection-D_WMcs-m.js";import{D as t,T as n,bi as r,li as i,ot as a,pt as o}from"./reply-JaJmymld.js";import"./agent-scope-DauKPN2a.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import{m as s,s as c}from"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";export{a as createReplyPrefixOptions,t as deliverSlackSlashReplies,o as dispatchReplyWithDispatcher,r as finalizeInboundContext,n as recordInboundSessionMetaSafe,i as resolveAgentRoute,s as resolveChunkMode,e as resolveConversationLabel,c as resolveMarkdownTableMode};
@@ -1,4 +1,4 @@
1
- import{u as e}from"./paths-DfDmyG-r.js";import{A as t,k as n,y as r}from"./subsystem-B35lZH6M.js";import{Bn as i,Gs as a,Js as o,Mo as s,No as c,Nr as l,Rl as u,Rr as d,Ys as f,aa as p,fs as m,h,la as g,vu as _,yu as v,zl as y}from"./model-selection-D_WMcs-m.js";import{Ln as b,Rn as x,Xt as S,Zt as C,c as w,cn as T,d as E,dn as D,l as O,nn as k,s as A,tn as j,u as M,ur as N}from"./reply-Bv0w_dst.js";import{d as P}from"./agent-scope-DauKPN2a.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-CPVBLi22.js";import{n as te}from"./exec-Ble6PWIi.js";import{c as z}from"./paths-wWzafjVT.js";import{n as B,t as ne}from"./call-bAaUSED1.js";import{n as V,r as H,t as U}from"./read-only-account-inspect-O_P5quS_.js";import{r as re}from"./format-duration-DJi2D8i6.js";import{n as W}from"./format-relative-BFr4b1kk.js";import{a as ie}from"./skill-commands-CPsCP-Wn.js";import{o as G,s as ae}from"./command-secret-targets-BPZrI3UX.js";import{C as oe,g as se}from"./onboard-helpers-Dn0KiH64.js";import{r as ce}from"./memory-cli-BohipG7v.js";import{n as K}from"./progress-CDXE9V22.js";import{t as le}from"./skills-status-EVqShVbs.js";import{t as ue}from"./issue-format-D8eNC7S1.js";import{t as de}from"./channels-status-issues-DsqWGQy6.js";import{c as fe,n as pe}from"./service-CqYyZjPe.js";import{t as me}from"./runtime-status-CqFBmdRd.js";import{r as he,t as q}from"./probe-auth-Dw3Mv7tm.js";import{t as ge}from"./diagnostics-TnaO44kn.js";import{n as J,t as _e}from"./table-jkvoEPT5.js";import{o as ve,t as ye}from"./health-Pqtl8jCk.js";import{a as be,g as xe,m as Se,n as Ce,t as we}from"./channel-account-context-yUoL1Htv.js";import{t as Te}from"./audit-8KSk4yf4.js";import{t as Ee}from"./node-service-39SxwxUC.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-CyapGDVY.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=k(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return P(e,t.id)}catch{return null}})(),a=r==null?null:await Ge(Fe.join(r,`BOOTSTRAP.md`)),o=z(e.session?.store,{agentId:t.id}),s=(()=>{try{return i(o)}catch{return{}}})(),c=Object.values(s).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),l=c>0?c:null,u=l?n-l:null,d=Object.keys(s).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:a,sessionsPath:o,sessionsCount:d,lastUpdatedAt:l,lastActiveAgeMs:u}})),a=r.reduce((e,t)=>e+t.sessionsCount,0),o=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:a,bootstrapPendingCount:o}}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:${m(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:w({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-DfDmyG-r.js";import{A as t,k as n,y as r}from"./subsystem-B35lZH6M.js";import{Bn as i,Gs as a,Js as o,Mo as s,No as c,Nr as l,Rl as u,Rr as d,Ys as f,aa as p,fs as m,h,la as g,vu as _,yu as v,zl as y}from"./model-selection-D_WMcs-m.js";import{Ln as b,Rn as x,Xt as S,Zt as C,c as w,cn as T,d as E,dn as D,l as O,nn as k,s as A,tn as j,u as M,ur as N}from"./reply-JaJmymld.js";import{d as P}from"./agent-scope-DauKPN2a.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-CPVBLi22.js";import{n as te}from"./exec-Ble6PWIi.js";import{c as z}from"./paths-wWzafjVT.js";import{n as B,t as ne}from"./call-bAaUSED1.js";import{n as V,r as H,t as U}from"./read-only-account-inspect-O_P5quS_.js";import{r as re}from"./format-duration-DJi2D8i6.js";import{n as W}from"./format-relative-BFr4b1kk.js";import{a as ie}from"./skill-commands-CPsCP-Wn.js";import{o as G,s as ae}from"./command-secret-targets-BPZrI3UX.js";import{C as oe,g as se}from"./onboard-helpers-Dn0KiH64.js";import{r as ce}from"./memory-cli-BohipG7v.js";import{n as K}from"./progress-CDXE9V22.js";import{t as le}from"./skills-status-EVqShVbs.js";import{t as ue}from"./issue-format-D8eNC7S1.js";import{t as de}from"./channels-status-issues-DsqWGQy6.js";import{c as fe,n as pe}from"./service-CqYyZjPe.js";import{t as me}from"./runtime-status-CqFBmdRd.js";import{r as he,t as q}from"./probe-auth-Dw3Mv7tm.js";import{t as ge}from"./diagnostics-TnaO44kn.js";import{n as J,t as _e}from"./table-jkvoEPT5.js";import{o as ve,t as ye}from"./health-xCl2atiY.js";import{a as be,g as xe,m as Se,n as Ce,t as we}from"./channel-account-context-yUoL1Htv.js";import{t as Te}from"./audit-8KSk4yf4.js";import{t as Ee}from"./node-service-39SxwxUC.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-CyapGDVY.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=k(e),n=Date.now(),r=await Promise.all(t.agents.map(async t=>{let r=(()=>{try{return P(e,t.id)}catch{return null}})(),a=r==null?null:await Ge(Fe.join(r,`BOOTSTRAP.md`)),o=z(e.session?.store,{agentId:t.id}),s=(()=>{try{return i(o)}catch{return{}}})(),c=Object.values(s).reduce((e,t)=>Math.max(e,t?.updatedAt??0),0),l=c>0?c:null,u=l?n-l:null,d=Object.keys(s).filter(e=>e!==`global`&&e!==`unknown`).length;return{id:t.id,name:t.name,workspaceDir:r,bootstrapPending:a,sessionsPath:o,sessionsCount:d,lastUpdatedAt:l,lastActiveAgeMs:u}})),a=r.reduce((e,t)=>e+t.sessionsCount,0),o=r.reduce((e,t)=>e+(t.bootstrapPending?1:0),0);return{defaultId:t.defaultId,agents:r,totalSessions:a,bootstrapPendingCount:o}}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:${m(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:w({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(`${x(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 g(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 o(),{resolvedConfig:a}=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 d=a.gateway?.tailscale?.mode??`off`,m=await(async()=>{try{let e=await c(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)}}})(),h=d!==`off`&&m.dnsName?`https://${m.dnsName}${oe(a.gateway?.controlUi?.basePath)}`:null;r.tick(),r.setLabel(`Checking for updates…`);let g=await Ce({root:await I({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()}),timeoutMs:6500,fetchGit:!0,includeRegistry:!0}),_=xe({configChannel:Se(a.update?.channel),installKind:g.installKind,gitTag:g.git?.tag??null,gitBranch:g.git?.branch??null}).label,v=be(g);r.tick(),r.setLabel(`Probing gateway…`);let y=ne({config:a}),x=a.gateway?.mode===`remote`,S=typeof a.gateway?.remote?.url==`string`?a.gateway.remote.url.trim():``,C=x&&!S,w=x?`remote`:`local`,T=q({cfg:a,mode:`local`}),E=q({cfg:a,mode:`remote`}),D=x&&!C?E:T,O=D.auth,k=await he({url:y.url,auth:O,timeoutMs:Math.min(5e3,n?.timeoutMs??1e4)}).catch(()=>null),A=k?.ok===!0,j=Re(k?.presence??null);r.tick(),r.setLabel(`Checking services…`);let M=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}},N=await M(pe()),P=await M(Ee());r.tick(),r.setLabel(`Scanning agents…`);let F=await Ke(a);r.tick(),r.setLabel(`Summarizing channels…`);let R=await tt(a,{showSecrets:!1,sourceConfig:i});r.tick();let ee=(()=>{if(!C)return y.message;let e=a.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): ${y.url}`,`Fix: set gateway.remote.url, or set gateway.mode=local.`].join(`
@@ -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-C7tbdlOl.js";import{u as i}from"./paths-BRJCySMM.js";import{En as a,Jr as o,Mo as s,No as c,Wr as l,Xa as u,_a as d,_u as f,ko as p,kt as m,tl as h,va as g,vu as _,xn as v}from"./auth-profiles-BkhVHtgY.js";import{t as y}from"./command-format-CLxIPuLR.js";import{d as b}from"./agent-scope-DjUQMckI.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-CAHuRRVU.js";import{n as D}from"./exec-CEAb_WUd.js";import{bt as O,cn as k,dn as A,fn as j,in as M,ln as N,rn as P,un as F,xt as I,yn as L}from"./compact-BfHim3cA.js";import{c as R}from"./paths-Iw1AJLOG.js";import{d as ee,l as te,n as z,r as B}from"./session-utils-DtXFoDhI.js";import{n as V,t as ne}from"./call-B4oR7TXC.js";import{_ as H,g as U,v as re}from"./pi-tools.policy-3jwvBbGG.js";import{n as W}from"./format-relative-BqI9wboy.js";import{r as ie}from"./format-duration-CPXGQMXx.js";import{a as ae}from"./skill-commands-FzYyVr7Q.js";import{o as oe,s as se}from"./command-secret-targets-BzThfkzp.js";import{C as ce,g as le}from"./onboard-helpers-bAJ8ELmK.js";import{t as G}from"./search-manager-B35sLSi1.js";import{n as K}from"./progress-CR--5qDW.js";import{t as ue}from"./skills-status-BMD3tUOS.js";import{t as de}from"./issue-format-CH9G9Aj1.js";import{t as fe}from"./channels-status-issues-N5UAZzhw.js";import{c as pe,n as me}from"./service-BmVXm2bV.js";import{t as he}from"./runtime-status-DszMjvJK.js";import{r as ge,t as _e}from"./probe-auth-Dg7KGT-W.js";import{t as ve}from"./diagnostics-D9kDOJwd.js";import{n as q,t as ye}from"./table-D3aNZFy4.js";import{o as be,t as xe}from"./health-CiTej6rM.js";import{a as Se,g as Ce,m as we,n as Te,t as Ee}from"./channel-account-context-CaJykRl9.js";import{t as De}from"./audit-FH3EU9NK.js";import{t as Oe}from"./node-service-DOO9thfm.js";import{n as J,t as ke}from"./format-Ce7I7s-k.js";import{i as Ae,n as je,r as Me,t as Ne}from"./status.update-C8lR8uWy.js";import{t as Pe}from"./text-format-DEWK6oCT.js";import{spawnSync as Fe}from"node:child_process";import Ie from"node:os";import Le from"node:path";import Re from"node:fs";import ze from"node:fs/promises";function Be(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 Ve(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 He(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function Ue(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function We(e){return typeof e==`string`?e.trim():``}function Ge(){return We(Fe(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Ie.release()}function Ke(){let e=Ie.platform(),t=Ie.release(),n=Ie.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${Ge()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function qe(e){try{return await ze.access(e),!0}catch{return!1}}async function Je(e){let t=B(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 qe(Le.join(r,`BOOTSTRAP.md`)),a=R(e.session?.store,{agentId:t.id}),o=(()=>{try{return m(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 Y=e=>e&&typeof e==`object`?e:{};function X(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 Ye(e){let t=e?.trim()||``;if(!t)return null;try{return Re.existsSync(t)}catch{return null}}function Z(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 Xe(e,t,n){return e.config.inspectAccount?.(t,n)??U({channelId:e.id,cfg:t,accountId:n})}async function Ze(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Xe(t,r,i),o=Xe(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&H(a)&&(!re(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??j({plugin:t,account:d,cfg:n}),m=f?.configured??await A({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:N({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Qe=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},$e=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}`),H(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=F({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function et(e){let t=Y(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=Y(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function tt(e){let t=[];for(let n of e){let e=Y(n.account),r=Y(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];Ye(i)===!1&&t.push(String(i))}}return t}function nt(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>Y(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(Y(e.account)))){let n=t.filter(e=>H(e.account)),r=t.filter(e=>{let t=Y(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=Y(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=X(r.map(e=>e.snapshot.botTokenSource??`none`)),o=X(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?Y(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Z(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Z(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=>H(e.account)),r=t.filter(e=>{let t=Y(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=Y(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=X(r.map(e=>e.snapshot.botTokenSource??`none`)),o=X(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?Y(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Z(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Z(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=>H(e.account)),r=t.filter(e=>{let t=Y(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?Y(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Z(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>H(e.account)),u=t.filter(e=>{let t=Y(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=X(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?Y(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Z(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function rt(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 Ze({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=>H(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=et(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=tt(f),v=nt({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=$e({plugin:a,cfg:e,entry:t});return{Account:Qe({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!H(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function it(e,t){let n=await ze.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-C7tbdlOl.js";import{u as i}from"./paths-BRJCySMM.js";import{En as a,Jr as o,Mo as s,No as c,Wr as l,Xa as u,_a as d,_u as f,ko as p,kt as m,tl as h,va as g,vu as _,xn as v}from"./auth-profiles-BkhVHtgY.js";import{t as y}from"./command-format-CLxIPuLR.js";import{d as b}from"./agent-scope-DjUQMckI.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-CAHuRRVU.js";import{n as D}from"./exec-CEAb_WUd.js";import{bt as O,cn as k,dn as A,fn as j,in as M,ln as N,rn as P,un as F,xt as I,yn as L}from"./compact-DgbuvsDF.js";import{c as R}from"./paths-Iw1AJLOG.js";import{d as ee,l as te,n as z,r as B}from"./session-utils-DtXFoDhI.js";import{n as V,t as ne}from"./call-B4oR7TXC.js";import{_ as H,g as U,v as re}from"./pi-tools.policy-3jwvBbGG.js";import{n as W}from"./format-relative-BqI9wboy.js";import{r as ie}from"./format-duration-CPXGQMXx.js";import{a as ae}from"./skill-commands-FzYyVr7Q.js";import{o as oe,s as se}from"./command-secret-targets-BzThfkzp.js";import{C as ce,g as le}from"./onboard-helpers-bAJ8ELmK.js";import{t as G}from"./search-manager-B35sLSi1.js";import{n as K}from"./progress-CR--5qDW.js";import{t as ue}from"./skills-status-BMD3tUOS.js";import{t as de}from"./issue-format-CH9G9Aj1.js";import{t as fe}from"./channels-status-issues-N5UAZzhw.js";import{c as pe,n as me}from"./service-BmVXm2bV.js";import{t as he}from"./runtime-status-DszMjvJK.js";import{r as ge,t as _e}from"./probe-auth-Dg7KGT-W.js";import{t as ve}from"./diagnostics-D9kDOJwd.js";import{n as q,t as ye}from"./table-D3aNZFy4.js";import{o as be,t as xe}from"./health-BXDoFh4Q.js";import{a as Se,g as Ce,m as we,n as Te,t as Ee}from"./channel-account-context-CaJykRl9.js";import{t as De}from"./audit-FH3EU9NK.js";import{t as Oe}from"./node-service-DOO9thfm.js";import{n as J,t as ke}from"./format-Ce7I7s-k.js";import{i as Ae,n as je,r as Me,t as Ne}from"./status.update-C8lR8uWy.js";import{t as Pe}from"./text-format-DEWK6oCT.js";import{spawnSync as Fe}from"node:child_process";import Ie from"node:os";import Le from"node:path";import Re from"node:fs";import ze from"node:fs/promises";function Be(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 Ve(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 He(e){return e.enabled?e.available?{tone:`ok`,state:`ready`}:{tone:`warn`,state:`unavailable`}:{tone:`muted`,state:`disabled`}}function Ue(e){return e.enabled?{tone:`ok`,text:`cache on${typeof e.entries==`number`?` (${e.entries})`:``}`}:{tone:`muted`,text:`cache off`}}function We(e){return typeof e==`string`?e.trim():``}function Ge(){return We(Fe(`sw_vers`,[`-productVersion`],{encoding:`utf-8`}).stdout)||Ie.release()}function Ke(){let e=Ie.platform(),t=Ie.release(),n=Ie.arch();return{platform:e,arch:n,release:t,label:e===`darwin`?`macos ${Ge()} (${n})`:e===`win32`?`windows ${t} (${n})`:`${e} ${t} (${n})`}}async function qe(e){try{return await ze.access(e),!0}catch{return!1}}async function Je(e){let t=B(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 qe(Le.join(r,`BOOTSTRAP.md`)),a=R(e.session?.store,{agentId:t.id}),o=(()=>{try{return m(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 Y=e=>e&&typeof e==`object`?e:{};function X(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 Ye(e){let t=e?.trim()||``;if(!t)return null;try{return Re.existsSync(t)}catch{return null}}function Z(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 Xe(e,t,n){return e.config.inspectAccount?.(t,n)??U({channelId:e.id,cfg:t,accountId:n})}async function Ze(e){let{plugin:t,cfg:n,sourceConfig:r,accountId:i}=e,a=Xe(t,r,i),o=Xe(t,n,i),s=o,c=a,l=o??t.config.resolveAccount(n,i),u=!!(a&&H(a)&&(!re(l)||c?.configured===!0&&s?.configured===!1)),d=u?a:l,f=u?c:s,p=f?.enabled??j({plugin:t,account:d,cfg:n}),m=f?.configured??await A({plugin:t,account:d,cfg:n,readAccountConfiguredField:!0});return{accountId:i,account:d,enabled:p,configured:m,snapshot:N({plugin:t,cfg:n,accountId:i,account:d,enabled:p,configured:m})}}const Qe=e=>{let t=e.accountId||`default`;return e.name?.trim()?`${t} (${e.name.trim()})`:t},$e=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}`),H(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=F({plugin:t,cfg:n,accountId:a.accountId,allowFrom:o}).slice(0,3);e.length>0&&i.push(`allow:${e.join(`,`)}`)}return i};function et(e){let t=Y(e),n=typeof t.linked==`boolean`?t.linked:null,r=typeof t.authAgeMs==`number`?t.authAgeMs:null,i=Y(t.self);return{linked:n,authAgeMs:r,selfE164:typeof i.e164==`string`&&i.e164.trim()?i.e164.trim():null}}function tt(e){let t=[];for(let n of e){let e=Y(n.account),r=Y(n.snapshot);for(let n of[`tokenFile`,`botTokenFile`,`appTokenFile`,`cliPath`,`dbPath`,`authDir`]){let i=e[n]??r[n];Ye(i)===!1&&t.push(String(i))}}return t}function nt(e){let t=e.accounts.filter(e=>e.enabled);if(t.length===0)return{state:null,detail:null};let n=t.map(e=>Y(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(Y(e.account)))){let n=t.filter(e=>H(e.account)),r=t.filter(e=>{let t=Y(e.account);return c(t,`botToken`,`botTokenStatus`)&&c(t,`signingSecret`,`signingSecretStatus`)}),i=t.filter(e=>{let t=Y(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=X(r.map(e=>e.snapshot.botTokenSource??`none`)),o=X(r.map(e=>e.snapshot.signingSecretSource??`none`)),s=r[0]?.account?Y(r[0].account):{},l=typeof s.botToken==`string`?s.botToken:``,u=typeof s.signingSecret==`string`?s.signingSecret:``,d=l.trim()?Z(l,{showSecrets:e.showSecrets}):``,f=u.trim()?Z(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=>H(e.account)),r=t.filter(e=>{let t=Y(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=Y(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=X(r.map(e=>e.snapshot.botTokenSource??`none`)),o=X(r.map(e=>e.snapshot.appTokenSource??`none`)),s=r[0]?.account?Y(r[0].account):{},c=typeof s.botToken==`string`?s.botToken:``,l=typeof s.appToken==`string`?s.appToken:``,u=c.trim()?Z(c,{showSecrets:e.showSecrets}):``,d=l.trim()?Z(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=>H(e.account)),r=t.filter(e=>{let t=Y(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?Y(r[0].account):{},a=typeof i.botToken==`string`?i.botToken:``,o=a.trim()?Z(a,{showSecrets:e.showSecrets}):``;return{state:`ok`,detail:`bot token config${o?` (${o})`:``} · accounts ${r.length}/${t.length||1}`}}let l=t.filter(e=>H(e.account)),u=t.filter(e=>{let t=Y(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=X(u.map(e=>e.snapshot.tokenSource)),f=u[0]?.account?Y(u[0].account):{},p=typeof f.token==`string`?f.token:``,m=p.trim()?` (${Z(p,{showSecrets:e.showSecrets})})`:``;return{state:`ok`,detail:`token ${d.label}${m} · accounts ${u.length}/${t.length||1}`}}async function rt(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 Ze({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=>H(e.account)),h=l.find(e=>e.accountId===s)??l[0],g=et(a.status?.buildChannelSummary?await a.status.buildChannelSummary({account:h?.account??{},cfg:e,defaultAccountId:s,snapshot:h?.snapshot??{accountId:s}}):void 0),_=tt(f),v=nt({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=$e({plugin:a,cfg:e,entry:t});return{Account:Qe({accountId:t.accountId,name:t.snapshot.name}),Status:t.enabled&&!H(t.account)?`OK`:`WARN`,Notes:n.join(` · `)}})})}return{rows:r,details:i}}async function it(e,t){let n=await ze.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 Q(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=Q(i[0]??``,`{`)-Q(i[0]??``,`}`),o=t;for(;a>0&&o+1<e.length;){o+=1;let t=e[o]??``;i.push(t),a+=Q(t,`{`)-Q(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,s=(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 J(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`;s(`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(` ${de(e,`-`)}`);a.length>12&&t.push(` ${n(`… +${a.length-12} more`)}`)}else s(`Config: read failed`,`warn`);e.remoteUrlMissing&&(t.push(``),s(`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?(s(`Restart sentinel present`,`warn`),t.push(` ${n(`${I(e.sentinel.payload)} · ${W(Date.now()-e.sentinel.payload.ts)}`)}`)):s(`Restart sentinel: none`,`ok`);let c=e.lastErr?.trim()??``,l=c.length<8||c===`}`||c===`{`;if(c&&!l&&(t.push(``),t.push(n(`Gateway last log line:`)),t.push(` ${n(J(c))}`)),e.portUsage){let r=e.portUsage.listeners.length===0;if(s(`Port ${e.port}`,r?`ok`:`warn`),!r)for(let r of o(e.portUsage))t.push(` ${n(r)}`)}{let r=e.tailscale.backendState??`unknown`,i=r===`Running`,a=!!e.tailscale.dnsName;s(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;s(`Skills: ${t} eligible · ${n} missing · ${e.skillStatus.workspaceDir}`,n===0?`ok`:`warn`)}e.progress.setLabel(`Reading logs…`);let u=(()=>{try{return pe(process.env)}catch{return null}})();if(u){e.progress.setLabel(`Reading logs…`);let[r,i]=await Promise.all([it(u.stderrPath,40).catch(()=>[]),it(u.stdoutPath,40).catch(()=>[])]);if(r.length>0||i.length>0){t.push(``),t.push(n(`Gateway logs (tail, summarized): ${u.logDir}`)),t.push(` ${n(`# stderr: ${u.stderrPath}`)}`);for(let e of ct(r,{maxLines:22}).map(J))t.push(` ${n(e)}`);t.push(` ${n(`# stdout: ${u.stdoutPath}`)}`);for(let e of ct(i,{maxLines:22}).map(J))t.push(` ${n(e)}`)}}if(e.progress.tick(),e.channelsStatus){s(`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 s(`Channel issues skipped (gateway ${e.gatewayReachable?`query failed`:`unreachable`})`,`warn`);let d=(()=>{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]`}})();d&&(t.push(``),t.push(n(`Gateway health:`)),t.push(` ${n(J(d))}`)),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=ye(),u=q({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=q({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=q({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(q({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 K({label:`Scanning status --all…`,total:11},async n=>{n.setLabel(`Loading config…`);let r=await s(),{resolvedConfig:a}=await se({config:r,commandName:`status --all`,targetIds:oe(),mode:`summary`}),o=Ke(),u=await c().catch(()=>null);n.tick(),n.setLabel(`Checking Tailscale…`);let d=a.gateway?.tailscale?.mode??`off`,f=await(async()=>{try{let e=await g(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)}}})(),p=d!==`off`&&f.dnsName?`https://${f.dnsName}${ce(a.gateway?.controlUi?.basePath)}`:null;n.tick(),n.setLabel(`Checking for updates…`);let m=await Te({root:await S({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()}),timeoutMs:6500,fetchGit:!0,includeRegistry:!0}),h=Ce({configChannel:we(a.update?.channel),installKind:m.installKind,gitTag:m.git?.tag??null,gitBranch:m.git?.branch??null}).label,_=Se(m);n.tick(),n.setLabel(`Probing gateway…`);let v=ne({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=_e({cfg:a,mode:`local`}),k=_e({cfg:a,mode:`remote`}),A=b&&!C?k:E,j=A.auth,M=await ge({url:v.url,auth:j,timeoutMs:Math.min(5e3,t?.timeoutMs??1e4)}).catch(()=>null),N=M?.ok===!0,P=Be(M?.presence??null);n.tick(),n.setLabel(`Checking services…`);let F=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}},I=await F(me()),L=await F(Oe());n.tick(),n.setLabel(`Scanning agents…`);let R=await Je(a);n.tick(),n.setLabel(`Summarizing channels…`);let ee=await rt(a,{showSecrets:!1,sourceConfig:r});n.tick();let te=(()=>{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(`
@@ -1 +1 @@
1
- import"./paths-DHIowy7j.js";import"./paths-Ilv7GN3y.js";import"./logger-Bzsdb9ed.js";import"./model-selection-DFv8WdLJ.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-D_03X4gB.js";import"./github-copilot-token-cC0a32_K.js";import"./proxy-env-BpsHPwSJ.js";import"./send-yEMlt3M_.js";import"./send-Csh2M9t4.js";import"./tokens-DpCVPqg7.js";import"./deliver-Ct_8KNT3.js";import"./diagnostic-B6R9Muxd.js";import"./send-DCvhX9qG.js";import"./pi-model-discovery-D8KklxzY.js";import"./image-DtEj_K_P.js";import"./audio-transcription-runner-DKgG0lnA.js";import"./fetch-CfkK4pM6.js";import"./fetch-guard-CmJidAgV.js";import"./api-key-rotation-CEyNXJoj.js";import"./proxy-fetch-N5EC_5u0.js";import"./ir-D_G8H2qb.js";import"./render-BXEUPIHe.js";import"./target-errors-Cr6JxKN0.js";import"./commands-registry-BGk8X2Vf.js";import"./fetch-DHo17YmK.js";import"./skill-commands-CG2Cc4Im.js";import"./channel-activity-BxnN9hqN.js";import"./tables-OHSSazoA.js";import"./send-Era5VGYz.js";import"./outbound-attachment-Df8zVNtZ.js";import"./send-CApccc0A.js";import"./fetch-9C9TheDL.js";import"./query-expansion-Cnwzhc4U.js";import"./manager-BH-09ZG7.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-DHIowy7j.js";import"./paths-Ilv7GN3y.js";import"./logger-Bzsdb9ed.js";import"./model-selection-DFv8WdLJ.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-CN25rQwp.js";import"./github-copilot-token-cC0a32_K.js";import"./proxy-env-BpsHPwSJ.js";import"./send-yEMlt3M_.js";import"./send-Csh2M9t4.js";import"./tokens-DpCVPqg7.js";import"./deliver-Ct_8KNT3.js";import"./diagnostic-B6R9Muxd.js";import"./send-DCvhX9qG.js";import"./pi-model-discovery-D8KklxzY.js";import"./image-DtEj_K_P.js";import"./audio-transcription-runner-DKgG0lnA.js";import"./fetch-CfkK4pM6.js";import"./fetch-guard-CmJidAgV.js";import"./api-key-rotation-CEyNXJoj.js";import"./proxy-fetch-N5EC_5u0.js";import"./ir-D_G8H2qb.js";import"./render-BXEUPIHe.js";import"./target-errors-Cr6JxKN0.js";import"./commands-registry-BGk8X2Vf.js";import"./fetch-DHo17YmK.js";import"./skill-commands-CG2Cc4Im.js";import"./channel-activity-BxnN9hqN.js";import"./tables-OHSSazoA.js";import"./send-Era5VGYz.js";import"./outbound-attachment-Df8zVNtZ.js";import"./send-CApccc0A.js";import"./fetch-9C9TheDL.js";import"./query-expansion-Cnwzhc4U.js";import"./manager-BH-09ZG7.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-DfDmyG-r.js";import"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import"./model-selection-D_WMcs-m.js";import{b as e,f as t,g as n,m as r,p as i,v as a,x as o,y as s}from"./reply-Bv0w_dst.js";import"./agent-scope-DauKPN2a.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";export{t as countActiveDescendantRuns,i as countPendingDescendantRuns,r as countPendingDescendantRunsExcludingRun,n as isSubagentSessionRunActive,a as listSubagentRunsForRequester,s as replaceSubagentRunAfterSteer,e as resolveRequesterForChildSession,o as shouldIgnorePostCompletionAnnounceForSession};
1
+ import"./paths-DfDmyG-r.js";import"./subsystem-B35lZH6M.js";import"./utils-eSzw3-BW.js";import"./model-selection-D_WMcs-m.js";import{b as e,f as t,g as n,m as r,p as i,v as a,x as o,y as s}from"./reply-JaJmymld.js";import"./agent-scope-DauKPN2a.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";export{t as countActiveDescendantRuns,i as countPendingDescendantRuns,r as countPendingDescendantRunsExcludingRun,n as isSubagentSessionRunActive,a as listSubagentRunsForRequester,s as replaceSubagentRunAfterSteer,e as resolveRequesterForChildSession,o as shouldIgnorePostCompletionAnnounceForSession};
@@ -1 +1 @@
1
- import"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{$n as e,Gn as t,Kn as n,Qn as r,Yn as i,Zn as a,er as o,qn as s}from"./compact-BfHim3cA.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";export{t as countActiveDescendantRuns,n as countPendingDescendantRuns,s as countPendingDescendantRunsExcludingRun,i as isSubagentSessionRunActive,a as listSubagentRunsForRequester,r as replaceSubagentRunAfterSteer,e as resolveRequesterForChildSession,o as shouldIgnorePostCompletionAnnounceForSession};
1
+ import"./subsystem-C7tbdlOl.js";import"./paths-BRJCySMM.js";import"./boolean-D15s2V33.js";import"./auth-profiles-BkhVHtgY.js";import"./agent-scope-DjUQMckI.js";import"./utils-bGrn0y-f.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-ByNUYL2n.js";import"./env-overrides-fatFjayp.js";import"./version-q3SkUw2K.js";import"./registry-Bfa_Ykoc.js";import"./skills-DaxiAYb1.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-CAHuRRVU.js";import"./logger-CzE2MhuY.js";import"./exec-CEAb_WUd.js";import"./windows-spawn-BgzBBwXL.js";import"./redact-Dhbd2Ou5.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-DrzTb7KS.js";import"./send-CkCusmbI.js";import"./send-BlGs1R4s.js";import{$n as e,Gn as t,Kn as n,Qn as r,Yn as i,Zn as a,er as o,qn as s}from"./compact-DgbuvsDF.js";import"./paths-Iw1AJLOG.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-JhtjMTo0.js";import"./tokens-DymrUOGE.js";import"./with-timeout-c1CzdShT.js";import"./deliver-BN5gbKUv.js";import"./diagnostic-ou4gNcG4.js";import"./send-CfpqUapa.js";import"./pi-model-discovery-Cqrh3PhQ.js";import"./exec-approvals-allowlist-DIBvoVsb.js";import"./exec-safe-bin-runtime-policy-y_ErZVFQ.js";import"./model-catalog--OA2KRxM.js";import"./fetch-Br9U2aWg.js";import"./audio-transcription-runner-hG3NgjtU.js";import"./fetch-guard-DOIM5NkG.js";import"./image-B6Fxt2ke.js";import"./tool-display-D4Lgnaij.js";import"./api-key-rotation-DIZSxMN4.js";import"./proxy-fetch-CCr-fxQ0.js";import"./ir-C205jOes.js";import"./render-DrrPmnMI.js";import"./target-errors-Befv_gd6.js";import"./commands-DcqfHXoH.js";import"./commands-registry-D2F_aNf1.js";import"./session-cost-usage-B0e3Qwrd.js";import"./session-utils-DtXFoDhI.js";import"./sqlite-C-YpDuDl.js";import"./call-B4oR7TXC.js";import"./pi-tools.policy-3jwvBbGG.js";import"./fetch-D6B2WSW_.js";import"./pairing-store-BXGybj6M.js";import"./exec-approvals-Dapj8H1y.js";import"./nodes-screen-DX6jz8OP.js";import"./restart-C27sljk1.js";import"./system-run-command-D6cuoREz.js";import"./skill-commands-FzYyVr7Q.js";import"./workspace-dirs-BTT7_AQX.js";import"./pairing-token-ByzqGayx.js";import"./channel-activity-W1yPxWJ3.js";import"./tables-Df7TI1wy.js";import"./runtime-web-tools-CzHbhY0M.js";import"./runtime-CHjN1UTv.js";import"./stagger-BDJo4a4e.js";import"./channel-selection-mEfryJZM.js";import"./plugin-auto-enable-Czb-XnGx.js";import"./send-CeULjLp_.js";import"./outbound-attachment-CxQjEgw4.js";import"./delivery-queue-C3NiY2Ub.js";import"./send-CLQzNoUy.js";import"./fetch-yQOUtDBh.js";import"./command-secret-targets-BzThfkzp.js";import"./connection-auth-C0uJgiku.js";import"./onboard-helpers-bAJ8ELmK.js";import"./prompt-style-LoGJ9Sd_.js";import"./pairing-labels-DdIEj5Sz.js";import"./search-manager-B35sLSi1.js";import"./manager-hztaxN5m.js";import"./memory-cli-Bp_xpCbr.js";import"./links-DRsshHiS.js";import"./cli-utils-C_maQ2m4.js";import"./help-format-BlhzdN7j.js";import"./progress-CR--5qDW.js";export{t as countActiveDescendantRuns,n as countPendingDescendantRuns,s as countPendingDescendantRunsExcludingRun,i as isSubagentSessionRunActive,a as listSubagentRunsForRequester,r as replaceSubagentRunAfterSteer,e as resolveRequesterForChildSession,o as shouldIgnorePostCompletionAnnounceForSession};
@@ -1 +1 @@
1
- import"./paths-BPlh1F_a.js";import"./paths-Bvu3v9nz.js";import"./subsystem-CGGhKjRT.js";import"./workspace-1NxMMGZW.js";import"./utils-BTURUF_N.js";import"./model-selection-CH0apK3k.js";import"./github-copilot-token-BVwzqlVJ.js";import"./boolean-DypnRoRK.js";import"./proxy-env-ChGKWN0E.js";import"./frontmatter-B9DmvcgE.js";import"./logger-CvJmQfHn.js";import"./send-bxjN3IZg.js";import"./send-6BwXVInI.js";import{B as e,G as t,H as n,K as r,U as i,V as a,W as o,q as s}from"./pi-embedded-BHryO0s2.js";import"./tokens-HHTmX-h1.js";import"./deliver-BzgU1r4b.js";import"./diagnostic-B8UkC4xT.js";import"./send-DvPpOk5w.js";import"./pi-model-discovery-dgLr8dl9.js";import"./image-Box9bWEY.js";import"./audio-transcription-runner-C0RhoXzi.js";import"./fetch-D6hEXONG.js";import"./fetch-guard-BLcWroVJ.js";import"./api-key-rotation-BgZo5UsH.js";import"./proxy-fetch-DnvHdcU4.js";import"./ir-C_xV8tbA.js";import"./render-CBsnn-2A.js";import"./target-errors-L1z5BrGJ.js";import"./commands-registry-BilMYHSq.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-CIDR5t1Z.js";import"./channel-activity-BHphv67n.js";import"./tables-r8RlEZ3D.js";import"./send-eEv75Prb2.js";import"./outbound-attachment-DNy8EKtN.js";import"./send-CTQ5EIQd.js";import"./fetch-CPTYqsuH.js";import"./query-expansion-CvgeGLHg.js";import"./manager-D-kas9Yh.js";export{e as countActiveDescendantRuns,a as countPendingDescendantRuns,n as countPendingDescendantRunsExcludingRun,i as isSubagentSessionRunActive,o as listSubagentRunsForRequester,t as replaceSubagentRunAfterSteer,r as resolveRequesterForChildSession,s as shouldIgnorePostCompletionAnnounceForSession};
1
+ import"./paths-BPlh1F_a.js";import"./paths-Bvu3v9nz.js";import"./subsystem-CGGhKjRT.js";import"./workspace-1NxMMGZW.js";import"./utils-BTURUF_N.js";import"./model-selection-CH0apK3k.js";import"./github-copilot-token-BVwzqlVJ.js";import"./boolean-DypnRoRK.js";import"./proxy-env-ChGKWN0E.js";import"./frontmatter-B9DmvcgE.js";import"./logger-CvJmQfHn.js";import"./send-bxjN3IZg.js";import"./send-6BwXVInI.js";import{B as e,G as t,H as n,K as r,U as i,V as a,W as o,q as s}from"./pi-embedded-C6L57IhI.js";import"./tokens-HHTmX-h1.js";import"./deliver-BzgU1r4b.js";import"./diagnostic-B8UkC4xT.js";import"./send-DvPpOk5w.js";import"./pi-model-discovery-dgLr8dl9.js";import"./image-Box9bWEY.js";import"./audio-transcription-runner-C0RhoXzi.js";import"./fetch-D6hEXONG.js";import"./fetch-guard-BLcWroVJ.js";import"./api-key-rotation-BgZo5UsH.js";import"./proxy-fetch-DnvHdcU4.js";import"./ir-C_xV8tbA.js";import"./render-CBsnn-2A.js";import"./target-errors-L1z5BrGJ.js";import"./commands-registry-BilMYHSq.js";import"./fetch-_g8lZ8K8.js";import"./skill-commands-CIDR5t1Z.js";import"./channel-activity-BHphv67n.js";import"./tables-r8RlEZ3D.js";import"./send-eEv75Prb2.js";import"./outbound-attachment-DNy8EKtN.js";import"./send-CTQ5EIQd.js";import"./fetch-CPTYqsuH.js";import"./query-expansion-CvgeGLHg.js";import"./manager-D-kas9Yh.js";export{e as countActiveDescendantRuns,a as countPendingDescendantRuns,n as countPendingDescendantRunsExcludingRun,i as isSubagentSessionRunActive,o as listSubagentRunsForRequester,t as replaceSubagentRunAfterSteer,r as resolveRequesterForChildSession,s as shouldIgnorePostCompletionAnnounceForSession};
@@ -1,4 +1,4 @@
1
- import{g as e,n as t,u as n}from"./paths-DfDmyG-r.js";import{A as r,p as i}from"./subsystem-B35lZH6M.js";import{h as a}from"./utils-eSzw3-BW.js";import{Ys as o,ec as s}from"./model-selection-D_WMcs-m.js";import{zn as c}from"./reply-Bv0w_dst.js";import"./agent-scope-DauKPN2a.js";import{t as l}from"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import{n as u,r as d,t as f}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import{t as p}from"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import{r as m}from"./format-duration-DJi2D8i6.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import{m as h,p as g,u as _}from"./arg-split-CTpz9ssG.js";import{n as v}from"./cmd-argv-pbDojmPp.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import{n as y}from"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import{t as b}from"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import{t as x}from"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";import{r as S}from"./runtime-guard-CKqXF6-d.js";import"./program-context-9FmjmgRi.js";import"./skills-status-EVqShVbs.js";import{n as C}from"./command-options-Bq5nQxz6.js";import"./note-CxxIxPA5.js";import"./install-safe-path-lI-ouoTr.js";import"./npm-pack-install-BS2u5bjW.js";import"./skill-scanner-CHwhesKZ.js";import"./installs-BC03n26J.js";import{n as ee}from"./issue-format-D8eNC7S1.js";import"./channels-status-issues-DsqWGQy6.js";import{r as w}from"./completion-cli-BYf6ef-t.js";import"./daemon-install-plan.shared-C-IuWSFq.js";import"./gateway-install-token-B-jRbPOG.js";import"./systemd-DsnmhpJH.js";import{n as te}from"./service-CqYyZjPe.js";import"./lifecycle-core-DiN--XOP.js";import"./systemd-hints-C73yX5Os.js";import{a as T,i as E,l as D,o as O,r as k}from"./daemon-cli-DcE7596R.js";import"./probe-auth-Dw3Mv7tm.js";import"./diagnostics-TnaO44kn.js";import{n as A,t as j}from"./table-jkvoEPT5.js";import"./health-Pqtl8jCk.js";import"./control-ui-assets-BjTfpvVt.js";import{d as M,g as N,h as P,i as ne,m as F,n as I,o as re,r as ie,u as ae}from"./channel-account-context-yUoL1Htv.js";import{a as L,c as R,i as oe,l as z,n as se,o as ce,r as le,s as ue,t as de}from"./update-runner-Dmea_7oZ.js";import{i as fe,n as pe,t as me}from"./status.update-CyapGDVY.js";import"./logging-KnZSytkB.js";import"./oauth-tls-preflight-CQ38e7su.js";import{n as he,t as ge}from"./update-2UHltkvP.js";import"./doctor-config-flow-Birb031c.js";import"./systemd-linger-ClH6J6p6.js";import"./health-format-B5aHha7Q.js";import{n as _e,t as ve}from"./prompt-select-styled-7bpPt2PG.js";import{r as B,t as ye}from"./doctor-completion-BcvWFszV.js";import V from"node:os";import H from"node:path";import U from"node:fs/promises";import{spawn as be,spawnSync as xe}from"node:child_process";import{confirm as W,isCancel as G,spinner as Se}from"@clack/prompts";function K(e){let t=e?Number.parseInt(e,10)*1e3:void 0;return t!==void 0&&(Number.isNaN(t)||t<=0)?(i.error(`--timeout must be a positive integer (seconds)`),i.exit(1),null):t}const q=`https://github.com/openclaw/openclaw.git`,Ce=8e3,we=`openclaw`,Te=new Set([we]);function Ee(e){return ue(e,[`openclaw`,we])}function De(e){let t=e.trim();if(!t)return null;let n=t.startsWith(`v`)?t.slice(1):t;return S(n)?n:null}async function Oe(e,t){return De(e)||((await ne({tag:e,timeoutMs:t})).version??null)}async function ke(e){try{return await U.stat(H.join(e,`.git`)),!0}catch{return!1}}async function Ae(e){let t=await R(e);return!!(t&&Te.has(t))}async function je(e){try{return(await U.readdir(e)).length===0}catch{return!1}}function Me(){let e=process.env.OPENCLAW_GIT_DIR?.trim();return e?H.resolve(e):Ne()}function Ne(){return e(process.env,V.homedir)}function J(){let e=H.basename(process.execPath).toLowerCase();return e===`node`||e===`node.exe`?process.execPath:`node`}async function Y(){return await l({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()})??process.cwd()}async function X(e){let t=e.argv.join(` `);e.progress?.onStepStart?.({name:e.name,command:t,index:0,total:0});let n=Date.now(),r=await p(e.argv,{cwd:e.cwd,timeoutMs:e.timeoutMs}),i=Date.now()-n,a=c(r.stderr,Ce);return e.progress?.onStepComplete?.({name:e.name,command:t,index:0,total:0,durationMs:i,exitCode:r.code,stderrTail:a}),{name:e.name,command:t,cwd:e.cwd??process.cwd(),durationMs:i,exitCode:r.code,stdoutTail:c(r.stdout,Ce),stderrTail:a}}async function Pe(e){if(!await a(e.dir))return await X({name:`git clone`,argv:[`git`,`clone`,q,e.dir],timeoutMs:e.timeoutMs,progress:e.progress});if(!await ke(e.dir)){if(!await je(e.dir))throw Error(`OPENCLAW_GIT_DIR points at a non-git directory: ${e.dir}. Set OPENCLAW_GIT_DIR to an empty folder or an openclaw checkout.`);return await X({name:`git clone`,argv:[`git`,`clone`,q,e.dir],cwd:e.dir,timeoutMs:e.timeoutMs,progress:e.progress})}if(!await Ae(e.dir))throw Error(`OPENCLAW_GIT_DIR does not look like a core checkout: ${e.dir}.`);return null}async function Z(e){let t=Ie();if(e.installKind===`package`){let n=await oe(t,e.root,e.timeoutMs);if(n)return n}return await le(t,e.timeoutMs)??`npm`}async function Fe(e,t){let n=H.join(e,`openclaw.mjs`);if(!await a(n))return;let o=xe(J(),[n,`completion`,`--write-state`],{cwd:e,env:process.env,encoding:`utf-8`});if(o.error){t||i.log(r.warn(`Completion cache update failed: ${String(o.error)}`));return}if(o.status!==0&&!t){let e=(o.stderr??``).toString().trim(),t=e?` (${e})`:``;i.log(r.warn(`Completion cache update failed${t}.`))}}function Ie(){return async(e,t)=>{let n=await p(e,t);return{stdout:n.stdout,stderr:n.stderr,code:n.code}}}function Le(e){let t=e.sha?e.sha.slice(0,8):null,n=e.branch&&e.branch!==`HEAD`?e.branch:null,r=e.tag;return[n??(r?`detached`:`git`),r?`tag ${r}`:null,t?`@ ${t}`:null].filter(Boolean).join(` · `)}async function Re(e){let t=K(e.timeout);if(t===null)return;let n=await Y(),a=await o(),s=a.valid?F(a.config.update?.channel):null,c=await I({root:n,timeoutMs:t??3500,fetchGit:!0,includeRegistry:!0}),l=N({configChannel:s,installKind:c.installKind,gitTag:c.git?.tag??null,gitBranch:c.git?.branch??null}),u=l.label,d=c.installKind===`git`?Le({branch:c.git?.branch??null,tag:c.git?.tag??null,sha:c.git?.sha??null}):null,f=fe(c),p=pe(c).replace(/^Update:\s*/i,``);if(e.json){i.log(JSON.stringify({update:c,channel:{value:l.channel,source:l.source,label:u,config:s},availability:f},null,2));return}let m=j(),h=[{Item:`Install`,Value:c.installKind===`git`?`git (${c.root??`unknown`})`:c.installKind===`package`?c.packageManager:`unknown`},{Item:`Channel`,Value:u},...d?[{Item:`Git`,Value:d}]:[],{Item:`Update`,Value:f.available?r.warn(`available · ${p}`):p}];i.log(r.heading(`OpenClaw update status`)),i.log(``),i.log(A({width:m,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Value`,header:`Value`,flex:!0,minWidth:24}],rows:h}).trimEnd()),i.log(``);let g=me(c);g&&i.log(r.warn(g))}const ze={"clean check":`Working directory is clean`,"upstream check":`Upstream branch exists`,"git fetch":`Fetching latest changes`,"git rebase":`Rebasing onto target commit`,"git rev-parse @{upstream}":`Resolving upstream commit`,"git rev-list":`Enumerating candidate commits`,"git clone":`Cloning git checkout`,"preflight worktree":`Preparing preflight worktree`,"preflight cleanup":`Cleaning preflight worktree`,"deps install":`Installing dependencies`,build:`Building`,"ui:build":`Building UI assets`,"ui:build (post-doctor repair)":`Restoring missing UI assets`,"ui assets verify":`Validating UI assets`,"openclaw doctor entry":`Checking doctor entrypoint`,"openclaw doctor":`Running doctor checks`,"git rev-parse HEAD (after)":`Verifying update`,"global update":`Updating via package manager`,"global update (omit optional)":`Retrying update without optional deps`,"global install":`Installing global package`};function Be(e){return ze[e.name]??e.name}function Ve(e){if(e.status!==`error`||e.mode!==`npm`)return[];let t=[...e.steps].toReversed().find(e=>e.exitCode!==0);if(!t)return[];let n=(t.stderrTail??``).toLowerCase(),r=[];return t.name.startsWith(`global update`)&&n.includes(`eacces`)&&(r.push(`Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).`),r.push(`Example: npm config set prefix ~/.local && npm i -g openclaw@latest`)),t.name.startsWith(`global update`)&&(n.includes(`node-gyp`)||n.includes(`prebuild`))&&(r.push(`Detected native optional dependency build failure. The updater retries with --omit=optional automatically.`),r.push(`If it still fails: npm i -g openclaw@latest --omit=optional`)),r}function He(e){if(!e)return{progress:{},stop:()=>{}};let t=null;return{progress:{onStepStart:e=>{t=Se(),t.start(r.accent(Be(e)))},onStepComplete:e=>{if(!t)return;let n=Be(e),a=r.muted(`(${m(e.durationMs)})`),o=e.exitCode===0?r.success(`✓`):r.error(`✗`);if(t.stop(`${o} ${n} ${a}`),t=null,e.exitCode!==0&&e.stderrTail){let t=e.stderrTail.split(`
1
+ import{g as e,n as t,u as n}from"./paths-DfDmyG-r.js";import{A as r,p as i}from"./subsystem-B35lZH6M.js";import{h as a}from"./utils-eSzw3-BW.js";import{Ys as o,ec as s}from"./model-selection-D_WMcs-m.js";import{zn as c}from"./reply-JaJmymld.js";import"./agent-scope-DauKPN2a.js";import{t as l}from"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-HBWzEstG.js";import{n as u,r as d,t as f}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import"./env-DEV6pFi3.js";import"./env-overrides-CYDvuetI.js";import"./registry-DwigmP92.js";import"./skills-sxAZFqk6.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CPVBLi22.js";import"./logger-DMM_uqZu.js";import{t as p}from"./exec-Ble6PWIi.js";import"./windows-spawn-ylt31bST.js";import"./redact-DtCbW9Lh.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-alPucxwR.js";import"./send-BjtuHdPu.js";import"./send-hasPbLlg.js";import"./paths-wWzafjVT.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-Blz-FPzD.js";import"./image-CX5WRMvG.js";import"./models-config-C5gOZ_nc.js";import"./tool-display-C3cLzGSo.js";import"./fetch-guard-vEM0OBSM.js";import"./api-key-rotation-WckBsEDu.js";import"./local-roots-CFjRwfz-.js";import"./model-catalog-CXPniyHC.js";import"./proxy-fetch-C2wlnGrt.js";import"./tokens-DH__4wsg.js";import"./deliver-2PlJp__j.js";import"./commands-DwmEeRNm.js";import"./commands-registry-BU4HdCpx.js";import"./call-bAaUSED1.js";import"./read-only-account-inspect-O_P5quS_.js";import"./send-D7fq-nJ3.js";import"./pi-model-discovery-a98ybLTx.js";import"./ir-BQmB5KFM.js";import"./render-CtSBbJxV.js";import"./target-errors-CNaozwgN.js";import"./with-timeout-DHfOS7eC.js";import"./diagnostic-J-Dby8Y5.js";import"./exec-approvals-allowlist-DtUEPDK1.js";import"./exec-safe-bin-runtime-policy-CbFmGEO0.js";import"./exec-approvals-CZ6LJByp.js";import"./nodes-screen-Daq3OqWy.js";import"./restart-F8FFXkby.js";import"./system-run-command-zYUx5RNl.js";import{r as m}from"./format-duration-DJi2D8i6.js";import"./runtime-web-tools-Cs8NdOZU.js";import"./runtime-n_o60Cbj.js";import"./stagger-Ch71fX1z.js";import{m as h,p as g,u as _}from"./arg-split-CTpz9ssG.js";import{n as v}from"./cmd-argv-pbDojmPp.js";import"./channel-selection-CVjAE1aK.js";import"./plugin-auto-enable-BACDL0lj.js";import"./send-DIiiAeSV.js";import"./outbound-attachment-BHK3lwtT.js";import"./fetch-D0ctXgLA.js";import"./delivery-queue-BavBjrc5.js";import"./send-Du5iNpc_.js";import"./pairing-store-DYDGw_J1.js";import"./session-cost-usage-C7K68CQv.js";import"./sqlite-DayONBPh.js";import"./channel-activity-BPEitbxC.js";import"./tables-DoACu3IR.js";import"./fetch-MmzBES-O.js";import"./skill-commands-CPsCP-Wn.js";import"./workspace-dirs-BT0ehvIx.js";import"./pairing-token-BNYR9_wD.js";import"./command-secret-targets-BPZrI3UX.js";import"./connection-auth-BNIAz5tD.js";import"./onboard-helpers-Dn0KiH64.js";import{n as y}from"./prompt-style-Ct-2QSEG.js";import"./pairing-labels-D_pIiFsE.js";import"./memory-cli-BohipG7v.js";import"./manager-Dc0951tf.js";import{t as b}from"./links-CmkiG3i0.js";import"./cli-utils-Cfu5AugP.js";import{t as x}from"./help-format-BY8dc9BS.js";import"./progress-CDXE9V22.js";import{r as S}from"./runtime-guard-CKqXF6-d.js";import"./program-context-DNheupaq.js";import"./skills-status-EVqShVbs.js";import{n as C}from"./command-options-Bq5nQxz6.js";import"./note-CxxIxPA5.js";import"./install-safe-path-lI-ouoTr.js";import"./npm-pack-install-BS2u5bjW.js";import"./skill-scanner-CHwhesKZ.js";import"./installs-BC03n26J.js";import{n as ee}from"./issue-format-D8eNC7S1.js";import"./channels-status-issues-DsqWGQy6.js";import{r as w}from"./completion-cli-CckNzelT.js";import"./daemon-install-plan.shared-C-IuWSFq.js";import"./gateway-install-token-B-jRbPOG.js";import"./systemd-DsnmhpJH.js";import{n as te}from"./service-CqYyZjPe.js";import"./lifecycle-core-DiN--XOP.js";import"./systemd-hints-C73yX5Os.js";import{a as T,i as E,l as D,o as O,r as k}from"./daemon-cli-DcE7596R.js";import"./probe-auth-Dw3Mv7tm.js";import"./diagnostics-TnaO44kn.js";import{n as A,t as j}from"./table-jkvoEPT5.js";import"./health-xCl2atiY.js";import"./control-ui-assets-BjTfpvVt.js";import{d as M,g as N,h as P,i as ne,m as F,n as I,o as re,r as ie,u as ae}from"./channel-account-context-yUoL1Htv.js";import{a as L,c as R,i as oe,l as z,n as se,o as ce,r as le,s as ue,t as de}from"./update-runner-C6Z9RGJ6.js";import{i as fe,n as pe,t as me}from"./status.update-CyapGDVY.js";import"./logging-KnZSytkB.js";import"./oauth-tls-preflight-CQ38e7su.js";import{n as he,t as ge}from"./update-2UHltkvP.js";import"./doctor-config-flow-Birb031c.js";import"./systemd-linger-ClH6J6p6.js";import"./health-format-B5aHha7Q.js";import{n as _e,t as ve}from"./prompt-select-styled-BfSAWDfm.js";import{r as B,t as ye}from"./doctor-completion-CucfTzWR.js";import V from"node:os";import H from"node:path";import U from"node:fs/promises";import{spawn as be,spawnSync as xe}from"node:child_process";import{confirm as W,isCancel as G,spinner as Se}from"@clack/prompts";function K(e){let t=e?Number.parseInt(e,10)*1e3:void 0;return t!==void 0&&(Number.isNaN(t)||t<=0)?(i.error(`--timeout must be a positive integer (seconds)`),i.exit(1),null):t}const q=`https://github.com/openclaw/openclaw.git`,Ce=8e3,we=`openclaw`,Te=new Set([we]);function Ee(e){return ue(e,[`openclaw`,we])}function De(e){let t=e.trim();if(!t)return null;let n=t.startsWith(`v`)?t.slice(1):t;return S(n)?n:null}async function Oe(e,t){return De(e)||((await ne({tag:e,timeoutMs:t})).version??null)}async function ke(e){try{return await U.stat(H.join(e,`.git`)),!0}catch{return!1}}async function Ae(e){let t=await R(e);return!!(t&&Te.has(t))}async function je(e){try{return(await U.readdir(e)).length===0}catch{return!1}}function Me(){let e=process.env.OPENCLAW_GIT_DIR?.trim();return e?H.resolve(e):Ne()}function Ne(){return e(process.env,V.homedir)}function J(){let e=H.basename(process.execPath).toLowerCase();return e===`node`||e===`node.exe`?process.execPath:`node`}async function Y(){return await l({moduleUrl:import.meta.url,argv1:process.argv[1],cwd:process.cwd()})??process.cwd()}async function X(e){let t=e.argv.join(` `);e.progress?.onStepStart?.({name:e.name,command:t,index:0,total:0});let n=Date.now(),r=await p(e.argv,{cwd:e.cwd,timeoutMs:e.timeoutMs}),i=Date.now()-n,a=c(r.stderr,Ce);return e.progress?.onStepComplete?.({name:e.name,command:t,index:0,total:0,durationMs:i,exitCode:r.code,stderrTail:a}),{name:e.name,command:t,cwd:e.cwd??process.cwd(),durationMs:i,exitCode:r.code,stdoutTail:c(r.stdout,Ce),stderrTail:a}}async function Pe(e){if(!await a(e.dir))return await X({name:`git clone`,argv:[`git`,`clone`,q,e.dir],timeoutMs:e.timeoutMs,progress:e.progress});if(!await ke(e.dir)){if(!await je(e.dir))throw Error(`OPENCLAW_GIT_DIR points at a non-git directory: ${e.dir}. Set OPENCLAW_GIT_DIR to an empty folder or an openclaw checkout.`);return await X({name:`git clone`,argv:[`git`,`clone`,q,e.dir],cwd:e.dir,timeoutMs:e.timeoutMs,progress:e.progress})}if(!await Ae(e.dir))throw Error(`OPENCLAW_GIT_DIR does not look like a core checkout: ${e.dir}.`);return null}async function Z(e){let t=Ie();if(e.installKind===`package`){let n=await oe(t,e.root,e.timeoutMs);if(n)return n}return await le(t,e.timeoutMs)??`npm`}async function Fe(e,t){let n=H.join(e,`openclaw.mjs`);if(!await a(n))return;let o=xe(J(),[n,`completion`,`--write-state`],{cwd:e,env:process.env,encoding:`utf-8`});if(o.error){t||i.log(r.warn(`Completion cache update failed: ${String(o.error)}`));return}if(o.status!==0&&!t){let e=(o.stderr??``).toString().trim(),t=e?` (${e})`:``;i.log(r.warn(`Completion cache update failed${t}.`))}}function Ie(){return async(e,t)=>{let n=await p(e,t);return{stdout:n.stdout,stderr:n.stderr,code:n.code}}}function Le(e){let t=e.sha?e.sha.slice(0,8):null,n=e.branch&&e.branch!==`HEAD`?e.branch:null,r=e.tag;return[n??(r?`detached`:`git`),r?`tag ${r}`:null,t?`@ ${t}`:null].filter(Boolean).join(` · `)}async function Re(e){let t=K(e.timeout);if(t===null)return;let n=await Y(),a=await o(),s=a.valid?F(a.config.update?.channel):null,c=await I({root:n,timeoutMs:t??3500,fetchGit:!0,includeRegistry:!0}),l=N({configChannel:s,installKind:c.installKind,gitTag:c.git?.tag??null,gitBranch:c.git?.branch??null}),u=l.label,d=c.installKind===`git`?Le({branch:c.git?.branch??null,tag:c.git?.tag??null,sha:c.git?.sha??null}):null,f=fe(c),p=pe(c).replace(/^Update:\s*/i,``);if(e.json){i.log(JSON.stringify({update:c,channel:{value:l.channel,source:l.source,label:u,config:s},availability:f},null,2));return}let m=j(),h=[{Item:`Install`,Value:c.installKind===`git`?`git (${c.root??`unknown`})`:c.installKind===`package`?c.packageManager:`unknown`},{Item:`Channel`,Value:u},...d?[{Item:`Git`,Value:d}]:[],{Item:`Update`,Value:f.available?r.warn(`available · ${p}`):p}];i.log(r.heading(`OpenClaw update status`)),i.log(``),i.log(A({width:m,columns:[{key:`Item`,header:`Item`,minWidth:10},{key:`Value`,header:`Value`,flex:!0,minWidth:24}],rows:h}).trimEnd()),i.log(``);let g=me(c);g&&i.log(r.warn(g))}const ze={"clean check":`Working directory is clean`,"upstream check":`Upstream branch exists`,"git fetch":`Fetching latest changes`,"git rebase":`Rebasing onto target commit`,"git rev-parse @{upstream}":`Resolving upstream commit`,"git rev-list":`Enumerating candidate commits`,"git clone":`Cloning git checkout`,"preflight worktree":`Preparing preflight worktree`,"preflight cleanup":`Cleaning preflight worktree`,"deps install":`Installing dependencies`,build:`Building`,"ui:build":`Building UI assets`,"ui:build (post-doctor repair)":`Restoring missing UI assets`,"ui assets verify":`Validating UI assets`,"openclaw doctor entry":`Checking doctor entrypoint`,"openclaw doctor":`Running doctor checks`,"git rev-parse HEAD (after)":`Verifying update`,"global update":`Updating via package manager`,"global update (omit optional)":`Retrying update without optional deps`,"global install":`Installing global package`};function Be(e){return ze[e.name]??e.name}function Ve(e){if(e.status!==`error`||e.mode!==`npm`)return[];let t=[...e.steps].toReversed().find(e=>e.exitCode!==0);if(!t)return[];let n=(t.stderrTail??``).toLowerCase(),r=[];return t.name.startsWith(`global update`)&&n.includes(`eacces`)&&(r.push(`Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).`),r.push(`Example: npm config set prefix ~/.local && npm i -g openclaw@latest`)),t.name.startsWith(`global update`)&&(n.includes(`node-gyp`)||n.includes(`prebuild`))&&(r.push(`Detected native optional dependency build failure. The updater retries with --omit=optional automatically.`),r.push(`If it still fails: npm i -g openclaw@latest --omit=optional`)),r}function He(e){if(!e)return{progress:{},stop:()=>{}};let t=null;return{progress:{onStepStart:e=>{t=Se(),t.start(r.accent(Be(e)))},onStepComplete:e=>{if(!t)return;let n=Be(e),a=r.muted(`(${m(e.durationMs)})`),o=e.exitCode===0?r.success(`✓`):r.error(`✗`);if(t.stop(`${o} ${n} ${a}`),t=null,e.exitCode!==0&&e.stderrTail){let t=e.stderrTail.split(`
2
2
  `).slice(-10);for(let e of t)e.trim()&&i.log(` ${r.error(e)}`)}}},stop:()=>{t&&=(t.stop(),null)}}}function Ue(e){return e===0?r.success(`✓`):e===null?r.warn(`?`):r.error(`✗`)}function We(e,t){if(t.json){i.log(JSON.stringify(e,null,2));return}let n=e.status===`ok`?r.success:e.status===`skipped`?r.warn:r.error;if(i.log(``),i.log(`${r.heading(`Update Result:`)} ${n(e.status.toUpperCase())}`),e.root&&i.log(` Root: ${r.muted(e.root)}`),e.reason&&i.log(` Reason: ${r.muted(e.reason)}`),e.before?.version||e.before?.sha){let t=e.before.version??e.before.sha?.slice(0,8)??``;i.log(` Before: ${r.muted(t)}`)}if(e.after?.version||e.after?.sha){let t=e.after.version??e.after.sha?.slice(0,8)??``;i.log(` After: ${r.muted(t)}`)}if(!t.hideSteps&&e.steps.length>0){i.log(``),i.log(r.heading(`Steps:`));for(let t of e.steps){let e=Ue(t.exitCode),n=r.muted(`(${m(t.durationMs)})`);if(i.log(` ${e} ${t.name} ${n}`),t.exitCode!==0&&t.stderrTail){let e=t.stderrTail.split(`
3
3
  `).slice(0,5);for(let t of e)t.trim()&&i.log(` ${r.error(t)}`)}}}let a=Ve(e);if(a.length>0){i.log(``),i.log(r.heading(`Recovery hints:`));for(let e of a)i.log(` - ${r.warn(e)}`)}i.log(``),i.log(`Total time: ${r.muted(m(e.durationMs))}`)}function Q(e){return e.replace(/'/g,`'\\''`)}function Ge(e){return/^[A-Za-z0-9 _\-().]+$/.test(e)}function Ke(e){let t=e.OPENCLAW_SYSTEMD_UNIT?.trim();return t?t.endsWith(`.service`)?t:`${t}.service`:`${g(e.OPENCLAW_PROFILE)}.service`}function qe(e){return e.OPENCLAW_LAUNCHD_LABEL?.trim()||_(e.OPENCLAW_PROFILE)}function Je(e){return e.OPENCLAW_WINDOWS_TASK_NAME?.trim()||h(e.OPENCLAW_PROFILE)}async function Ye(e=process.env,n=t){let r=V.tmpdir(),i=Date.now(),a=process.platform,o=``,s=``;try{if(a===`linux`){let t=Q(Ke(e));s=`openclaw-restart-${i}.sh`,o=`#!/bin/sh
4
4
  # Standalone restart script — survives parent process termination.