@qqbrowser/openclaw-qbot 0.0.148 → 0.10.1

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 (1698) hide show
  1. package/dist/account-lookup-CW-_CL7y.js +0 -1
  2. package/dist/acp-cli-BHsTg1ac.js +0 -1
  3. package/dist/acp-cli-D_WC9SZX.js +0 -1
  4. package/dist/active-listener-1MJXk3Iq.js +0 -1
  5. package/dist/active-listener-D8VOdVx3.js +0 -1
  6. package/dist/active-listener-D8uP0H5W.js +0 -1
  7. package/dist/active-listener-DeKRt_UV.js +0 -1
  8. package/dist/agent-scope-DAWJwFfl.js +0 -1
  9. package/dist/agent-scope-DXZc3eNT.js +0 -1
  10. package/dist/agents-Cd1yL8fG.js +0 -1
  11. package/dist/agents.config-CaRMmWS8.js +0 -1
  12. package/dist/agents.config-DSCcdYtv.js +0 -1
  13. package/dist/allow-from-B6dI7oz8.js +0 -1
  14. package/dist/allow-from-DEeVIPKS.js +0 -1
  15. package/dist/api-BeG0ObSq.js +0 -1
  16. package/dist/api-Dx8x1KTs.js +0 -1
  17. package/dist/api-key-rotation-BLt5E2Cw.js +0 -1
  18. package/dist/api-key-rotation-BpEL4aeX.js +0 -1
  19. package/dist/api-key-rotation-DayEfYpa.js +0 -1
  20. package/dist/api-key-rotation-Rz2ESQSA.js +0 -1
  21. package/dist/arg-split-BOqSMBuf.js +0 -1
  22. package/dist/arg-split-DE5RqDHq.js +0 -1
  23. package/dist/audio-preflight-8WB1LJBS.js +0 -1
  24. package/dist/audio-preflight-BcPHPfr_.js +0 -1
  25. package/dist/audio-preflight-DTO631Yb.js +0 -1
  26. package/dist/audio-preflight-O-0lDeKh.js +0 -1
  27. package/dist/audio-transcription-runner-9H9eUZ1D.js +0 -1
  28. package/dist/audio-transcription-runner-BIKj1CBU.js +0 -1
  29. package/dist/audio-transcription-runner-BwjMhAUa.js +0 -1
  30. package/dist/audio-transcription-runner-CQ7rq0d_.js +0 -1
  31. package/dist/audit-9I53EvMQ.js +0 -1
  32. package/dist/audit-BGsUfJzD.js +0 -1
  33. package/dist/audit-membership-runtime-BpRsMj5-.js +0 -1
  34. package/dist/audit-membership-runtime-BsfLZNBj.js +0 -1
  35. package/dist/audit-membership-runtime-DRHirRmx.js +0 -1
  36. package/dist/audit-membership-runtime-g0dEWJTp.js +0 -1
  37. package/dist/audit-membership-runtime-kdyToskD.js +0 -1
  38. package/dist/auth-choice-BmI4sIGs.js +0 -1
  39. package/dist/auth-choice-DDsPJF6F.js +0 -1
  40. package/dist/auth-choice-Dy0jIOLV.js +0 -1
  41. package/dist/auth-choice-MqcWuVyu.js +0 -1
  42. package/dist/auth-choice-options-B3WQyS7I.js +0 -1
  43. package/dist/auth-choice-options-Dw14noox.js +0 -1
  44. package/dist/auth-choice-prompt-uegl56cf.js +0 -1
  45. package/dist/auth-choice-prompt-xYj13czb.js +0 -1
  46. package/dist/auth-choice.apply-helpers-D911bYcw.js +0 -1
  47. package/dist/auth-choice.apply-helpers-pJ4CPZCk.js +0 -1
  48. package/dist/auth-profiles-C8rZRS0X.js +0 -1
  49. package/dist/auth-token-DZLZ3d_I.js +0 -1
  50. package/dist/auth-token-Dp6bxT29.js +0 -1
  51. package/dist/banner-CAtilyXr.js +0 -1
  52. package/dist/bonjour-discovery-ClTijpMw.js +0 -1
  53. package/dist/bonjour-discovery-DMB6yrOF.js +0 -1
  54. package/dist/boolean-Ch3DfXPy.js +0 -1
  55. package/dist/boolean-D15s2V33.js +0 -1
  56. package/dist/boolean-DypnRoRK.js +0 -1
  57. package/dist/brew-COcDl8CB.js +0 -1
  58. package/dist/brew-DDPm_HfE.js +0 -1
  59. package/dist/browser-cli-Bf-Pzjxs.js +0 -1
  60. package/dist/browser-cli-DkrBCfYg.js +0 -1
  61. package/dist/build-info.json +3 -3
  62. package/dist/bundled/boot-md/handler.js +0 -1
  63. package/dist/bundled/bootstrap-extra-files/handler.js +0 -1
  64. package/dist/bundled/command-logger/handler.js +0 -1
  65. package/dist/bundled/session-memory/handler.js +0 -1
  66. package/dist/call-BWx7hNtl.js +0 -1
  67. package/dist/call-JB-cGR9n.js +0 -1
  68. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  69. package/dist/channel-account-context-BMPAMZEv.js +0 -1
  70. package/dist/channel-account-context-DAcarnqW.js +0 -1
  71. package/dist/channel-activity-B04WbrrK.js +0 -1
  72. package/dist/channel-activity-BhiLsKvM.js +0 -1
  73. package/dist/channel-activity-DmgWmSAG.js +0 -1
  74. package/dist/channel-activity-Dw6F-ehJ.js +0 -1
  75. package/dist/channel-activity-htoVXTET.js +0 -1
  76. package/dist/channel-options-CCqtIYCc.js +0 -1
  77. package/dist/channel-options-CKoyPq8p.js +0 -1
  78. package/dist/channel-selection-BPxE8JR7.js +0 -1
  79. package/dist/channel-selection-si1OzWyQ.js +0 -1
  80. package/dist/channel-web-CCSMlUux.js +0 -1
  81. package/dist/channel-web-CwUfYqjg.js +0 -1
  82. package/dist/channels/plugins/actions/discord.js +0 -1
  83. package/dist/channels/plugins/actions/signal.js +0 -1
  84. package/dist/channels/plugins/actions/telegram.js +0 -1
  85. package/dist/channels/plugins/agent-tools/whatsapp-login.js +0 -1
  86. package/dist/channels-cli-BfgVv5jH.js +0 -1
  87. package/dist/channels-cli-BvGXgERj.js +0 -1
  88. package/dist/channels-status-issues-8eFrGKyf.js +0 -1
  89. package/dist/channels-status-issues-PRgOT90w.js +0 -1
  90. package/dist/chat-envelope-Bznn2SoS.js +0 -1
  91. package/dist/chat-envelope-HVpKusFc.js +0 -1
  92. package/dist/clack-prompter-DBPdGdqp.js +0 -1
  93. package/dist/clack-prompter-Dq0aY6iM.js +0 -1
  94. package/dist/clawbot-cli-B0iTJ-pm.js +0 -1
  95. package/dist/clawbot-cli-BcEtQbFY.js +0 -1
  96. package/dist/cleanup-utils-BWm70DoD.js +0 -1
  97. package/dist/cleanup-utils-D-RhEX6F.js +0 -1
  98. package/dist/cli-Bt--1dhL.js +0 -1
  99. package/dist/cli-CBg8KhmQ.js +0 -1
  100. package/dist/cli-utils-BY7dLMFy.js +0 -1
  101. package/dist/cli-utils-BleB1eys.js +0 -1
  102. package/dist/clipboard-Bk8cviBt.js +0 -1
  103. package/dist/clipboard-CKT_VIkG.js +0 -1
  104. package/dist/cmd-argv-BBT5l8AV.js +0 -1
  105. package/dist/cmd-argv-Bh-KpaZ0.js +0 -1
  106. package/dist/command-format-BbDT1tlm.js +0 -1
  107. package/dist/command-format-CLxIPuLR.js +0 -1
  108. package/dist/command-options-BpOUDl2S.js +0 -1
  109. package/dist/command-options-Bq5nQxz6.js +0 -1
  110. package/dist/command-poll-backoff-BZLHYB2k.js +0 -1
  111. package/dist/command-poll-backoff-Cww_r-24.js +0 -1
  112. package/dist/command-poll-backoff-Df6cOQrX.js +0 -1
  113. package/dist/command-poll-backoff-endAPdwn.js +0 -1
  114. package/dist/{command-registry-BxNiXs5w.js → command-registry-D_jtBegA.js} +1 -2
  115. package/dist/command-secret-targets-BEjtBf5Z.js +0 -1
  116. package/dist/command-secret-targets-CfXtLkLF.js +0 -1
  117. package/dist/commands-CGpM84iR.js +0 -1
  118. package/dist/commands-Dy7duWlt.js +0 -1
  119. package/dist/commands-registry-C5Hg7gyk.js +0 -1
  120. package/dist/commands-registry-DT6FDUev.js +0 -1
  121. package/dist/commands-registry-DlvNUkXz.js +0 -1
  122. package/dist/commands-registry-gvMK7Pw9.js +0 -1
  123. package/dist/compact-CYbPi7_-.js +0 -1
  124. package/dist/{completion-cli-Yg5BF97F.js → completion-cli-BVbT_aR2.js} +1 -2
  125. package/dist/{completion-cli-BRE0F8Tu.js → completion-cli-Bw_hBrlA.js} +1 -2
  126. package/dist/config-BqW5S1xL.js +0 -1
  127. package/dist/config-Cji73to5.js +0 -1
  128. package/dist/config-cli-CwW76_j_.js +0 -1
  129. package/dist/config-cli-F-lkPjjz.js +0 -1
  130. package/dist/config-guard-0_afzaJz.js +0 -1
  131. package/dist/config-guard-CqUJ8uaF.js +0 -1
  132. package/dist/config-validation-6hk_fxD8.js +0 -1
  133. package/dist/config-validation-BAmmD9p4.js +0 -1
  134. package/dist/configure--c4tTVPz.js +0 -1
  135. package/dist/configure-DFlnM_zh.js +0 -1
  136. package/dist/connection-auth-CjaeEu5D.js +0 -1
  137. package/dist/connection-auth-smZlFWxD.js +0 -1
  138. package/dist/context-window-guard-7crlatf9.js +0 -1
  139. package/dist/context-window-guard-CPChk363.js +0 -1
  140. package/dist/control-ui-assets-BIa0GGDg.js +0 -1
  141. package/dist/control-ui-assets-CTHGGgaX.js +0 -1
  142. package/dist/cron-cli-BKS4L-uW.js +0 -1
  143. package/dist/cron-cli-L9wLLocl.js +0 -1
  144. package/dist/daemon-cli-BdDHNRqp.js +0 -1
  145. package/dist/daemon-cli-CEHkT-54.js +0 -1
  146. package/dist/daemon-cli.js +0 -1
  147. package/dist/daemon-install-CMNtsW5o.js +0 -1
  148. package/dist/daemon-install-D2gMiA0p.js +0 -1
  149. package/dist/daemon-install-plan.shared-BkwZgIAY.js +0 -1
  150. package/dist/daemon-install-plan.shared-Dx3DBXCG.js +0 -1
  151. package/dist/daemon-runtime-DHiDbRuC.js +0 -1
  152. package/dist/daemon-runtime-VcpeBRJV.js +0 -1
  153. package/dist/dangerous-name-matching-BOmvAibz.js +0 -1
  154. package/dist/dangerous-name-matching-DtllRqBD.js +0 -1
  155. package/dist/dangerous-tools-CFRYQJ6V.js +0 -1
  156. package/dist/dangerous-tools-oYCu5wfC.js +0 -1
  157. package/dist/deliver-AM3FP5rj.js +0 -1
  158. package/dist/deliver-BhWhLvQO.js +0 -1
  159. package/dist/deliver-DUNkj4hy.js +0 -1
  160. package/dist/deliver-SqSusZP3.js +0 -1
  161. package/dist/delivery-queue-CKbauSFq.js +0 -1
  162. package/dist/delivery-queue-nkPJu0fY.js +0 -1
  163. package/dist/device-pairing-DAzYy3vX.js +0 -1
  164. package/dist/device-pairing-DknI3IDo.js +0 -1
  165. package/dist/devices-cli-BYD6Sq88.js +0 -1
  166. package/dist/devices-cli-Dl-0fQmR.js +0 -1
  167. package/dist/diagnostic-BEZszppF.js +0 -1
  168. package/dist/diagnostic-D1H7_8QG.js +0 -1
  169. package/dist/diagnostic-DtuQPRbp.js +0 -1
  170. package/dist/diagnostic-VBPCgF9l.js +0 -1
  171. package/dist/diagnostics-BgbeL9KE.js +0 -1
  172. package/dist/diagnostics-Cdctg9K_.js +0 -1
  173. package/dist/directory-cli-CpMjutQb.js +0 -1
  174. package/dist/directory-cli-b_l3qJI_.js +0 -1
  175. package/dist/dns-cli-C7L4RYOm.js +0 -1
  176. package/dist/dns-cli-wKg6nn6f.js +0 -1
  177. package/dist/docs-cli-CwW4sqbC.js +0 -1
  178. package/dist/docs-cli-DnLLU7eX.js +0 -1
  179. package/dist/{doctor-completion-II0Wb435.js → doctor-completion-C9CPhCor.js} +1 -2
  180. package/dist/{doctor-completion-Bu-98ocm.js → doctor-completion-DI7mGC3D.js} +1 -2
  181. package/dist/doctor-config-flow-BVpr8-q9.js +0 -1
  182. package/dist/doctor-config-flow-Dio3s4x6.js +0 -1
  183. package/dist/enable-CjFPAUgo.js +0 -1
  184. package/dist/enable-PO3qN4Lf.js +0 -1
  185. package/dist/entry-status-CCwwKO43.js +0 -1
  186. package/dist/entry-status-CoXkbJcX.js +0 -1
  187. package/dist/entry.js +1 -2
  188. package/dist/env-D7wNuBx1.js +0 -1
  189. package/dist/env-overrides-DHtB4kK3.js +0 -1
  190. package/dist/env-overrides-DXJbFrwI.js +0 -1
  191. package/dist/errors-6SQWM9dj.js +0 -1
  192. package/dist/errors-Bunti32V.js +0 -1
  193. package/dist/exec-B3eleY5O.js +0 -1
  194. package/dist/exec-DHqLtFYt.js +0 -1
  195. package/dist/exec-approvals-BXO9Cezj.js +0 -1
  196. package/dist/exec-approvals-BpBNEy6i.js +0 -1
  197. package/dist/exec-approvals-allowlist-B-Yf6RsU.js +0 -1
  198. package/dist/exec-approvals-allowlist-CGjRWREs.js +0 -1
  199. package/dist/exec-approvals-cli-BokGzWFo.js +0 -1
  200. package/dist/exec-approvals-cli-CsUGu6m3.js +0 -1
  201. package/dist/exec-safe-bin-runtime-policy-CRPHdPbF.js +0 -1
  202. package/dist/exec-safe-bin-runtime-policy-v44u39fl.js +0 -1
  203. package/dist/fetch-B4bz67_N.js +0 -1
  204. package/dist/fetch-BJT3BrkJ.js +0 -1
  205. package/dist/fetch-Bn0mWg6a.js +0 -1
  206. package/dist/fetch-Ce-scEU-.js +0 -1
  207. package/dist/fetch-D0rZDHKO.js +0 -1
  208. package/dist/fetch-D5wrJ0AX.js +0 -1
  209. package/dist/fetch-DBat25iG.js +0 -1
  210. package/dist/fetch-DHo17YmK.js +0 -1
  211. package/dist/fetch-Dh-apy46.js +0 -1
  212. package/dist/fetch-Dikjvc5M.js +0 -1
  213. package/dist/fetch-DsjPfQlp.js +0 -1
  214. package/dist/fetch-_g8lZ8K8.js +0 -1
  215. package/dist/fetch-guard-7BAwnP4a.js +0 -1
  216. package/dist/fetch-guard-DaZmvp-L.js +0 -1
  217. package/dist/fetch-guard-DvaNcypz.js +0 -1
  218. package/dist/fetch-guard-oWKGrwV4.js +0 -1
  219. package/dist/fetch-hy0JKSsm.js +0 -1
  220. package/dist/fetch-timeout-CdYxWG9w.js +0 -1
  221. package/dist/fetch-timeout-Cj8_oAls.js +0 -1
  222. package/dist/fetch-timeout-DoOI_izT.js +0 -1
  223. package/dist/fetch-timeout-u8g99Ax0.js +0 -1
  224. package/dist/format-Bn1bwJKX.js +0 -1
  225. package/dist/format-Ce7I7s-k.js +0 -1
  226. package/dist/format-duration-C8AzNqKh.js +0 -1
  227. package/dist/format-duration-D5AMtmHa.js +0 -1
  228. package/dist/format-relative-B9pSIdGe.js +0 -1
  229. package/dist/format-relative-DkMjYy7z.js +0 -1
  230. package/dist/frontmatter-BkZkwkVO.js +0 -1
  231. package/dist/frontmatter-C7mzDNxd.js +0 -1
  232. package/dist/frontmatter-CzpfPBFl.js +0 -1
  233. package/dist/{gateway-cli-DBjTjdhJ.js → gateway-cli-BMmU2dsG.js} +1 -2
  234. package/dist/{gateway-cli-B-AX4-uD.js → gateway-cli-Kp-caOwI.js} +1 -2
  235. package/dist/gateway-install-token-Dt7hDXoR.js +0 -1
  236. package/dist/gateway-install-token-cSJrfU_1.js +0 -1
  237. package/dist/gateway-rpc-C78PzdZR.js +0 -1
  238. package/dist/gateway-rpc-CecloWA1.js +0 -1
  239. package/dist/github-copilot-token-C79yeDKS.js +0 -1
  240. package/dist/github-copilot-token-DGYAlOmV.js +0 -1
  241. package/dist/github-copilot-token-DePP-lIf.js +0 -1
  242. package/dist/github-copilot-token-wm6mbypz.js +0 -1
  243. package/dist/gmail-setup-utils-CYOH3zzx.js +0 -1
  244. package/dist/gmail-setup-utils-S-MyEGuj.js +0 -1
  245. package/dist/group-access-BHKVOhrj.js +0 -1
  246. package/dist/group-access-D2DOYMfr.js +0 -1
  247. package/dist/health-B_-ZE5FK.js +0 -1
  248. package/dist/health-CIZFVJEG.js +0 -1
  249. package/dist/health-format-B1nj3Wfn.js +0 -1
  250. package/dist/health-format-VBr6LEpt.js +0 -1
  251. package/dist/heartbeat-visibility-BQ_esv2m.js +0 -1
  252. package/dist/heartbeat-visibility-q74UdY8O.js +0 -1
  253. package/dist/help-format-B4aEI7V9.js +0 -1
  254. package/dist/help-format-BRbF_INg.js +0 -1
  255. package/dist/helpers-COz1ghcB.js +0 -1
  256. package/dist/helpers-Cp8gcO6u.js +0 -1
  257. package/dist/hooks-cli-BoxAnC-E.js +0 -1
  258. package/dist/hooks-cli-CnCOjVv0.js +0 -1
  259. package/dist/hooks-status-BHt-Xvh4.js +0 -1
  260. package/dist/hooks-status-CRJ4J0ZW.js +0 -1
  261. package/dist/image-BBO-0uLG.js +0 -1
  262. package/dist/image-BP1cfEh1.js +0 -1
  263. package/dist/image-BVbOr9yV.js +0 -1
  264. package/dist/image-CcsuUB1B.js +0 -1
  265. package/dist/index.js +1 -2
  266. package/dist/inspect-BKV-I1UE.js +0 -1
  267. package/dist/inspect-z59cgmYc.js +0 -1
  268. package/dist/install-safe-path-C6kc_8NW.js +0 -1
  269. package/dist/install-safe-path-iesxijn2.js +0 -1
  270. package/dist/installs-CKzq-YqL.js +0 -1
  271. package/dist/installs-DzSskdtJ.js +0 -1
  272. package/dist/ipv4-B05QVStj.js +0 -1
  273. package/dist/ipv4-SeeyR-DH.js +0 -1
  274. package/dist/ir-B7mdG27k.js +0 -1
  275. package/dist/ir-BTfsA9Dd.js +0 -1
  276. package/dist/ir-CNTx85qV.js +0 -1
  277. package/dist/ir-DdjufzKF.js +0 -1
  278. package/dist/is-main-DG5ueqhF.js +0 -1
  279. package/dist/issue-format-BtMzMXtZ.js +0 -1
  280. package/dist/issue-format-CN9PHzXY.js +0 -1
  281. package/dist/kill-tree-D6nPx1_o.js +0 -1
  282. package/dist/lifecycle-core-B1nrgJCw.js +0 -1
  283. package/dist/lifecycle-core-D_LWJeD_.js +0 -1
  284. package/dist/line/accounts.js +0 -1
  285. package/dist/line/send.js +0 -1
  286. package/dist/line/template-messages.js +0 -1
  287. package/dist/links-CBnmRP9D.js +0 -1
  288. package/dist/links-CySwdMcF.js +0 -1
  289. package/dist/llm-slug-generator.js +0 -1
  290. package/dist/load-options-BsOW74dp.js +0 -1
  291. package/dist/load-options-C7dLuybp.js +0 -1
  292. package/dist/load-options-DV4j6Aqb.js +0 -1
  293. package/dist/load-options-Dwt0CeEg.js +0 -1
  294. package/dist/local-roots-aA-4ohTq.js +0 -1
  295. package/dist/logger-5W0OocJW.js +0 -1
  296. package/dist/logger-Bl8URnrW.js +0 -1
  297. package/dist/logger-DwWqfo66.js +0 -1
  298. package/dist/logger-kQAOe3qp.js +0 -1
  299. package/dist/logging-B7XHbCNn.js +0 -1
  300. package/dist/logging-CbMVr2MA.js +0 -1
  301. package/dist/login-BGLWiksP.js +0 -1
  302. package/dist/login-CcYeF5T_.js +0 -1
  303. package/dist/login-DSZdCiDx.js +0 -1
  304. package/dist/login-DWZzj-P1.js +0 -1
  305. package/dist/login-qr-BGpGVMES.js +0 -1
  306. package/dist/login-qr-BUdgvi3v.js +0 -1
  307. package/dist/login-qr-Bx8skPB-.js +0 -1
  308. package/dist/login-qr-DYUCmP-W.js +0 -1
  309. package/dist/login-qr-_79eoRb4.js +0 -1
  310. package/dist/logs-cli-C52caOop.js +0 -1
  311. package/dist/logs-cli-Ch50TE-J.js +0 -1
  312. package/dist/manager-CI6O4QH6.js +0 -1
  313. package/dist/manager-CN_rQm1L.js +0 -1
  314. package/dist/manager-CxZRoQkE.js +0 -1
  315. package/dist/manager-iFi--Fru.js +0 -1
  316. package/dist/memory-cli-BouV_wyL.js +0 -1
  317. package/dist/memory-cli-C8fBBPgv.js +0 -1
  318. package/dist/model-catalog-D-hkNWin.js +0 -1
  319. package/dist/model-catalog-mt0IcDfR.js +0 -1
  320. package/dist/model-param-b-B0r2cPDw.js +0 -1
  321. package/dist/model-param-b-BqIr5rY5.js +0 -1
  322. package/dist/model-picker-BB0Zdvyu.js +0 -1
  323. package/dist/model-picker-DeiWyW0N.js +0 -1
  324. package/dist/model-selection-BLbnMb5E.js +0 -1
  325. package/dist/model-selection-D7mdJmGK.js +0 -1
  326. package/dist/model-selection-DvekK9rZ.js +0 -1
  327. package/dist/models-BBYqej07.js +0 -1
  328. package/dist/models-cli-CMMhnlHo.js +0 -1
  329. package/dist/models-cli-CqbDyDn2.js +0 -1
  330. package/dist/models-config-BlQ39qlq.js +0 -1
  331. package/dist/models-config-DZzS67GS.js +0 -1
  332. package/dist/mutable-allowlist-detectors-C4rNVag8.js +0 -1
  333. package/dist/mutable-allowlist-detectors-CL0qe54J.js +0 -1
  334. package/dist/node-cli-Bzu1efMB.js +0 -1
  335. package/dist/node-cli-Dv-Eib4o.js +0 -1
  336. package/dist/node-command-policy-D9yZu9zq.js +0 -1
  337. package/dist/node-command-policy-DyWp3Bjz.js +0 -1
  338. package/dist/node-commands-8GBOiktk.js +0 -1
  339. package/dist/node-commands-DdkziOTx.js +0 -1
  340. package/dist/node-resolve-B3BJbmQX.js +0 -1
  341. package/dist/node-resolve-DLZf3-1V.js +0 -1
  342. package/dist/node-service-BRfrNp8l.js +0 -1
  343. package/dist/node-service-C0bl7jcZ.js +0 -1
  344. package/dist/node-shell-BVZylVP6.js +0 -1
  345. package/dist/nodes-cli-B3aNQG30.js +0 -1
  346. package/dist/nodes-cli-DzO6PSFw.js +0 -1
  347. package/dist/nodes-screen-8nRBsfID.js +0 -1
  348. package/dist/note-D4GAwgha.js +0 -1
  349. package/dist/note-Dp-d_utk.js +0 -1
  350. package/dist/npm-pack-install-B23L-AtF.js +0 -1
  351. package/dist/npm-pack-install-C0te3Oap.js +0 -1
  352. package/dist/npm-resolution--_-0q2ks.js +0 -1
  353. package/dist/npm-resolution-CBlwQq3a.js +0 -1
  354. package/dist/oauth-env-DAamJ1oz.js +0 -1
  355. package/dist/oauth-env-DSLBTWb1.js +0 -1
  356. package/dist/oauth-tls-preflight-BSBRDIfC.js +0 -1
  357. package/dist/oauth-tls-preflight-ByNjbUR5.js +0 -1
  358. package/dist/ollama-setup-CGuyH3Ey.js +0 -1
  359. package/dist/ollama-setup-LVRPefmV.js +0 -1
  360. package/dist/{onboard-DMmLqys5.js → onboard-DZG0HnuP.js} +1 -2
  361. package/dist/{onboard-C2Ofvb_A.js → onboard-DlCEww7K.js} +1 -2
  362. package/dist/onboard-channels-BDMtq3ex.js +0 -1
  363. package/dist/onboard-channels-BO3AN_eA.js +0 -1
  364. package/dist/onboard-config-B7U20YRw.js +0 -1
  365. package/dist/onboard-config-DS9dUv8M.js +0 -1
  366. package/dist/onboard-custom--OylwoHQ.js +0 -1
  367. package/dist/onboard-custom-_Df_ciX2.js +0 -1
  368. package/dist/onboard-helpers-D90u4wVK.js +0 -1
  369. package/dist/onboard-helpers-DOlI17Ac.js +0 -1
  370. package/dist/onboard-hooks-CERzXObm.js +0 -1
  371. package/dist/onboard-hooks-gQ3sxBNi.js +0 -1
  372. package/dist/onboard-provider-auth-flags-CqbipO7D.js +0 -1
  373. package/dist/onboard-provider-auth-flags-Dvwzdz37.js +0 -1
  374. package/dist/onboard-remote-B1-SlmUN.js +0 -1
  375. package/dist/onboard-remote-C7Eg49Uf.js +0 -1
  376. package/dist/onboard-search-f2tJD4hg.js +0 -1
  377. package/dist/onboard-search-fslKKhyg.js +0 -1
  378. package/dist/onboard-skills-DCgTr6hW.js +0 -1
  379. package/dist/onboard-skills-_TBzISd2.js +0 -1
  380. package/dist/{onboarding-C82cKKNI.js → onboarding-CxRTJCBM.js} +1 -2
  381. package/dist/{onboarding-M80apW9t.js → onboarding-m-m__16h.js} +1 -2
  382. package/dist/{onboarding.finalize-D9nrrI1J.js → onboarding.finalize-BJxMhYUa.js} +1 -2
  383. package/dist/{onboarding.finalize-CVvwI1Qg.js → onboarding.finalize-UiX3YmbI.js} +1 -2
  384. package/dist/onboarding.gateway-config-CXjzrfwL.js +0 -1
  385. package/dist/onboarding.gateway-config-TSq70E-S.js +0 -1
  386. package/dist/onboarding.secret-input-BSmFS1Px.js +0 -1
  387. package/dist/onboarding.secret-input-CUD0t7Pk.js +0 -1
  388. package/dist/openai-codex-model-default-Bx8i3bOg.js +0 -1
  389. package/dist/openai-codex-model-default-DuRfnfUm.js +0 -1
  390. package/dist/openai-model-default-Bm9b0oR0.js +0 -1
  391. package/dist/openai-model-default-KMCphvoO.js +0 -1
  392. package/dist/openclaw-exec-env-BWbOu_YC.js +0 -1
  393. package/dist/openclaw-root-CnsBf6ZU.js +0 -1
  394. package/dist/openclaw-root-D_0Q6--h.js +0 -1
  395. package/dist/outbound-BevYwvMh.js +0 -1
  396. package/dist/outbound-CqDxMWLZ.js +0 -1
  397. package/dist/outbound-DmwQEFu0.js +0 -1
  398. package/dist/outbound-attachment-9-8VNvRG.js +0 -1
  399. package/dist/outbound-attachment-Bah4dvuM.js +0 -1
  400. package/dist/outbound-attachment-CVcDBkAD.js +0 -1
  401. package/dist/outbound-attachment-E89zumcH.js +0 -1
  402. package/dist/outbound-xlG_RqEu.js +0 -1
  403. package/dist/pairing-cli-ByPhOBWo.js +0 -1
  404. package/dist/pairing-cli-CxJy8LPo.js +0 -1
  405. package/dist/pairing-labels-CZ-aX-up.js +0 -1
  406. package/dist/pairing-labels-PIuZfthz.js +0 -1
  407. package/dist/pairing-store-BaaVy1zB.js +0 -1
  408. package/dist/pairing-store-EmfFQVcs.js +0 -1
  409. package/dist/pairing-token-B8RdfK2y.js +0 -1
  410. package/dist/pairing-token-zdbQ951y.js +0 -1
  411. package/dist/parse-duration-XTjMKl8s.js +0 -1
  412. package/dist/parse-finite-number-DqzUM-_s.js +0 -1
  413. package/dist/parse-finite-number-dBmDLLKL.js +0 -1
  414. package/dist/parse-log-line-CsYLg7Qu.js +0 -1
  415. package/dist/parse-log-line-NV-cipB_.js +0 -1
  416. package/dist/parse-port-Bv1Y9Wk5.js +0 -1
  417. package/dist/parse-port-JVwkxcZ8.js +0 -1
  418. package/dist/parse-timeout-DWSGfCkQ.js +0 -1
  419. package/dist/parse-timeout-Dx4QnVzo.js +0 -1
  420. package/dist/path-alias-guards-kY_ZbWs-.js +0 -1
  421. package/dist/path-alias-guards-mvyLCPlN.js +0 -1
  422. package/dist/path-env-BPd1Yd-i.js +0 -1
  423. package/dist/path-env-emdAQejM.js +0 -1
  424. package/dist/path-safety-BukYK8Kd.js +0 -1
  425. package/dist/path-safety-DaaMJFdt.js +0 -1
  426. package/dist/paths-B4IRk3wi.js +0 -1
  427. package/dist/paths-BfjJY2VL.js +0 -1
  428. package/dist/paths-BjD3T_xq.js +0 -1
  429. package/dist/paths-BpQOWYiT.js +0 -1
  430. package/dist/paths-CChBdtE8.js +0 -1
  431. package/dist/paths-CrCoPIVK.js +0 -1
  432. package/dist/paths-piJASC5k.js +0 -1
  433. package/dist/paths-yLEk_25I.js +0 -1
  434. package/dist/pi-embedded-6yGEd2xd.js +0 -1
  435. package/dist/pi-embedded-X_Svd4Wi.js +0 -1
  436. package/dist/pi-model-discovery-BPkhPDMr.js +0 -1
  437. package/dist/pi-model-discovery-BonZ1N3x.js +0 -1
  438. package/dist/pi-model-discovery-DVKXkQTR.js +0 -1
  439. package/dist/pi-model-discovery-DnJkNRc-.js +0 -1
  440. package/dist/pi-tools.before-tool-call.runtime-2-IJ8xox.js +0 -1
  441. package/dist/pi-tools.before-tool-call.runtime-CNesNgq0.js +0 -1
  442. package/dist/pi-tools.before-tool-call.runtime-CmtITCPP.js +0 -1
  443. package/dist/pi-tools.before-tool-call.runtime-VUjwIYJ7.js +0 -1
  444. package/dist/pi-tools.policy-B6q8YOfg.js +0 -1
  445. package/dist/plugin-auto-enable-CTgkkJK7.js +0 -1
  446. package/dist/plugin-auto-enable-adba5Evb.js +0 -1
  447. package/dist/plugin-install-plan-BmyB3dR1.js +0 -1
  448. package/dist/plugin-install-plan-sIOiMBS1.js +0 -1
  449. package/dist/plugin-registry-CN2aCPP7.js +0 -1
  450. package/dist/plugin-registry-DYwEy5eM.js +0 -1
  451. package/dist/plugin-sdk/account-id.cjs +0 -1
  452. package/dist/plugin-sdk/account-id.js +0 -1
  453. package/dist/plugin-sdk/acpx.cjs +0 -1
  454. package/dist/plugin-sdk/acpx.js +0 -1
  455. package/dist/plugin-sdk/active-listener-B1sd5Yrr.cjs +0 -1
  456. package/dist/plugin-sdk/active-listener-CVvtj4nc.cjs +0 -1
  457. package/dist/plugin-sdk/active-listener-D0Pag-jN.js +0 -1
  458. package/dist/plugin-sdk/active-listener-DIzG1nGC.js +0 -1
  459. package/dist/plugin-sdk/active-listener-DUT4_v5r.cjs +0 -1
  460. package/dist/plugin-sdk/active-listener-D_Cq4Tuy.cjs +0 -1
  461. package/dist/plugin-sdk/active-listener-HBuXCjdG.js +0 -1
  462. package/dist/plugin-sdk/active-listener-V7whA3d_.js +0 -1
  463. package/dist/plugin-sdk/active-listener-YOWDFFGG.js +0 -1
  464. package/dist/plugin-sdk/active-listener-kJidH-KZ.js +0 -1
  465. package/dist/plugin-sdk/active-listener-kmJHqUWY.cjs +0 -1
  466. package/dist/plugin-sdk/active-listener-vpxSd-kW.cjs +0 -1
  467. package/dist/plugin-sdk/api-key-rotation-BEhJdmXN.cjs +0 -1
  468. package/dist/plugin-sdk/api-key-rotation-BcDAQISn.js +0 -1
  469. package/dist/plugin-sdk/api-key-rotation-Bua813IH.cjs +0 -1
  470. package/dist/plugin-sdk/api-key-rotation-C7_ooC3N.js +0 -1
  471. package/dist/plugin-sdk/api-key-rotation-CiFfWYgL.js +0 -1
  472. package/dist/plugin-sdk/api-key-rotation-CrVpqlS6.cjs +0 -1
  473. package/dist/plugin-sdk/api-key-rotation-D-zSLAf_.cjs +0 -1
  474. package/dist/plugin-sdk/api-key-rotation-DInDOH-A.js +0 -1
  475. package/dist/plugin-sdk/api-key-rotation-DKp72Rw4.cjs +0 -1
  476. package/dist/plugin-sdk/api-key-rotation-YRRtbk9Y.cjs +0 -1
  477. package/dist/plugin-sdk/api-key-rotation-tVSHRH8D.js +0 -1
  478. package/dist/plugin-sdk/api-key-rotation-ta953lKF.js +0 -1
  479. package/dist/plugin-sdk/audio-preflight-5ZbcO1qy.js +0 -1
  480. package/dist/plugin-sdk/audio-preflight-BrAX9j6r.js +0 -1
  481. package/dist/plugin-sdk/audio-preflight-C2NpU5hR.cjs +0 -1
  482. package/dist/plugin-sdk/audio-preflight-CtWGsCje.js +0 -1
  483. package/dist/plugin-sdk/audio-preflight-CwjNHDro.cjs +0 -1
  484. package/dist/plugin-sdk/audio-preflight-D22cCCmn.js +0 -1
  485. package/dist/plugin-sdk/audio-preflight-DyK2q8OQ.cjs +0 -1
  486. package/dist/plugin-sdk/audio-preflight-F7lfchEO.cjs +0 -1
  487. package/dist/plugin-sdk/audio-preflight-ItHD-3bi.js +0 -1
  488. package/dist/plugin-sdk/audio-preflight-QWsN9gcK.cjs +0 -1
  489. package/dist/plugin-sdk/audio-preflight-k7Qt2rDs.cjs +0 -1
  490. package/dist/plugin-sdk/audio-preflight-wcMT_iUA.js +0 -1
  491. package/dist/plugin-sdk/audio-transcription-runner-B3bLoVvU.js +0 -1
  492. package/dist/plugin-sdk/audio-transcription-runner-BDfW3xeJ.cjs +0 -1
  493. package/dist/plugin-sdk/audio-transcription-runner-BZLASCWO.cjs +0 -1
  494. package/dist/plugin-sdk/audio-transcription-runner-CiRKTRED.cjs +0 -1
  495. package/dist/plugin-sdk/audio-transcription-runner-Cxs7u0B3.cjs +0 -1
  496. package/dist/plugin-sdk/audio-transcription-runner-D2IxJCfd.cjs +0 -1
  497. package/dist/plugin-sdk/audio-transcription-runner-DA6TwXrV.cjs +0 -1
  498. package/dist/plugin-sdk/audio-transcription-runner-DZIEX1Rl.js +0 -1
  499. package/dist/plugin-sdk/audio-transcription-runner-DZRGn6-f.js +0 -1
  500. package/dist/plugin-sdk/audio-transcription-runner-Dc-WF6zu.js +0 -1
  501. package/dist/plugin-sdk/audio-transcription-runner-DuBgVmcT.js +0 -1
  502. package/dist/plugin-sdk/audio-transcription-runner-nKI1rQ0R.js +0 -1
  503. package/dist/plugin-sdk/audit-membership-runtime-7LqcvqFo.js +0 -1
  504. package/dist/plugin-sdk/audit-membership-runtime-BQFUzFc0.cjs +0 -1
  505. package/dist/plugin-sdk/audit-membership-runtime-BYtdDX9G.cjs +0 -1
  506. package/dist/plugin-sdk/audit-membership-runtime-BzEtBUX6.cjs +0 -1
  507. package/dist/plugin-sdk/audit-membership-runtime-CBUmGrl4.js +0 -1
  508. package/dist/plugin-sdk/audit-membership-runtime-ChlVgt2y.js +0 -1
  509. package/dist/plugin-sdk/audit-membership-runtime-DLRX7LR0.js +0 -1
  510. package/dist/plugin-sdk/audit-membership-runtime-DbJW5X3L.cjs +0 -1
  511. package/dist/plugin-sdk/audit-membership-runtime-Du9LAxDa.cjs +0 -1
  512. package/dist/plugin-sdk/audit-membership-runtime-DylNnj1m.js +0 -1
  513. package/dist/plugin-sdk/audit-membership-runtime-voi5sPwF.js +0 -1
  514. package/dist/plugin-sdk/audit-membership-runtime-yWYvSpgZ.cjs +0 -1
  515. package/dist/plugin-sdk/bluebubbles.cjs +0 -1
  516. package/dist/plugin-sdk/bluebubbles.js +0 -1
  517. package/dist/plugin-sdk/channel-activity--Ax2m0qQ.js +0 -1
  518. package/dist/plugin-sdk/channel-activity-BCsNxxNa.js +0 -1
  519. package/dist/plugin-sdk/channel-activity-BUieXBdg.cjs +0 -1
  520. package/dist/plugin-sdk/channel-activity-BXffAklf.js +0 -1
  521. package/dist/plugin-sdk/channel-activity-BlYTUiU4.js +0 -1
  522. package/dist/plugin-sdk/channel-activity-Bm-pvlXw.cjs +0 -1
  523. package/dist/plugin-sdk/channel-activity-Bnai3H2M.js +0 -1
  524. package/dist/plugin-sdk/channel-activity-CC3JLAxD.cjs +0 -1
  525. package/dist/plugin-sdk/channel-activity-CTmfXwYn.cjs +0 -1
  526. package/dist/plugin-sdk/channel-activity-D98aY9ZF.js +0 -1
  527. package/dist/plugin-sdk/channel-activity-DymcGybX.cjs +0 -1
  528. package/dist/plugin-sdk/channel-activity-gZBQEyOK.cjs +0 -1
  529. package/dist/plugin-sdk/channel-web-B795Ild9.cjs +0 -1
  530. package/dist/plugin-sdk/channel-web-Bg8DNyeb.js +0 -1
  531. package/dist/plugin-sdk/channel-web-CW42ALB5.cjs +0 -1
  532. package/dist/plugin-sdk/channel-web-D5zxPW-x.js +0 -1
  533. package/dist/plugin-sdk/command-poll-backoff-4910Mpwp.js +0 -1
  534. package/dist/plugin-sdk/command-poll-backoff-BLJZzV5W.cjs +0 -1
  535. package/dist/plugin-sdk/command-poll-backoff-CUNcN0dv.cjs +0 -1
  536. package/dist/plugin-sdk/command-poll-backoff-Cww_r-24.js +0 -1
  537. package/dist/plugin-sdk/command-poll-backoff-D0lJhquZ.js +0 -1
  538. package/dist/plugin-sdk/command-poll-backoff-Glwt3wHa.cjs +0 -1
  539. package/dist/plugin-sdk/commands-registry-BIGWymiv.cjs +0 -1
  540. package/dist/plugin-sdk/commands-registry-Bnadsir-.cjs +0 -1
  541. package/dist/plugin-sdk/commands-registry-C1Gb98lg.js +0 -1
  542. package/dist/plugin-sdk/commands-registry-CZcNTwNs.js +0 -1
  543. package/dist/plugin-sdk/commands-registry-CeJQPXIR.js +0 -1
  544. package/dist/plugin-sdk/commands-registry-CehvtLBA.js +0 -1
  545. package/dist/plugin-sdk/commands-registry-Cf8DaBmw.js +0 -1
  546. package/dist/plugin-sdk/commands-registry-Cfv6gDoQ.cjs +0 -1
  547. package/dist/plugin-sdk/commands-registry-D734s8r7.js +0 -1
  548. package/dist/plugin-sdk/commands-registry-DWx89vtR.cjs +0 -1
  549. package/dist/plugin-sdk/commands-registry-DviWu8J8.cjs +0 -1
  550. package/dist/plugin-sdk/commands-registry-wA0CkHGk.cjs +0 -1
  551. package/dist/plugin-sdk/common-BJ0tHoNJ.cjs +0 -1
  552. package/dist/plugin-sdk/common-CxLmdAIn.js +0 -1
  553. package/dist/plugin-sdk/compat.cjs +0 -1
  554. package/dist/plugin-sdk/compat.js +0 -1
  555. package/dist/plugin-sdk/config-C2-9m5-M.cjs +0 -1
  556. package/dist/plugin-sdk/config-Cx3SFBFW.js +0 -1
  557. package/dist/plugin-sdk/copilot-proxy.cjs +0 -1
  558. package/dist/plugin-sdk/copilot-proxy.js +0 -1
  559. package/dist/plugin-sdk/core.cjs +0 -1
  560. package/dist/plugin-sdk/core.js +0 -1
  561. package/dist/plugin-sdk/deliver--pOntbRC.cjs +0 -1
  562. package/dist/plugin-sdk/deliver-BLMe2eBS.js +0 -1
  563. package/dist/plugin-sdk/deliver-BcHzZPc2.js +0 -1
  564. package/dist/plugin-sdk/deliver-CSGTRHt1.js +0 -1
  565. package/dist/plugin-sdk/deliver-Cm8yUsWK.cjs +0 -1
  566. package/dist/plugin-sdk/deliver-DQDZRjZ0.js +0 -1
  567. package/dist/plugin-sdk/deliver-DRintVMn.js +0 -1
  568. package/dist/plugin-sdk/deliver-DehGdLxT.js +0 -1
  569. package/dist/plugin-sdk/deliver-EThzALwn.cjs +0 -1
  570. package/dist/plugin-sdk/deliver-d7VfVmTa.cjs +0 -1
  571. package/dist/plugin-sdk/deliver-rACJj8E9.cjs +0 -1
  572. package/dist/plugin-sdk/deliver-wteCze09.cjs +0 -1
  573. package/dist/plugin-sdk/device-pair.cjs +0 -1
  574. package/dist/plugin-sdk/device-pair.js +0 -1
  575. package/dist/plugin-sdk/diagnostic-BcBlExSy.cjs +0 -1
  576. package/dist/plugin-sdk/diagnostic-Bmp3zWQp.cjs +0 -1
  577. package/dist/plugin-sdk/diagnostic-BvrdTMl3.js +0 -1
  578. package/dist/plugin-sdk/diagnostic-C2jKFixS.cjs +0 -1
  579. package/dist/plugin-sdk/diagnostic-CSfBcIOI.js +0 -1
  580. package/dist/plugin-sdk/diagnostic-CYR5dxDE.cjs +0 -1
  581. package/dist/plugin-sdk/diagnostic-CdNZNyNv.cjs +0 -1
  582. package/dist/plugin-sdk/diagnostic-DE5k6C1E.js +0 -1
  583. package/dist/plugin-sdk/diagnostic-DMpxa640.cjs +0 -1
  584. package/dist/plugin-sdk/diagnostic-DSgf5Z4H.js +0 -1
  585. package/dist/plugin-sdk/diagnostic-DbRdunVt.js +0 -1
  586. package/dist/plugin-sdk/diagnostic-zCrcFAbJ.js +0 -1
  587. package/dist/plugin-sdk/diagnostics-otel.cjs +0 -1
  588. package/dist/plugin-sdk/diagnostics-otel.js +0 -1
  589. package/dist/plugin-sdk/diffs.cjs +0 -1
  590. package/dist/plugin-sdk/diffs.js +0 -1
  591. package/dist/plugin-sdk/discord.cjs +0 -1
  592. package/dist/plugin-sdk/discord.js +0 -1
  593. package/dist/plugin-sdk/dispatch-B13B2T1k.js +0 -1
  594. package/dist/plugin-sdk/dispatch-BaBcLOry.js +0 -1
  595. package/dist/plugin-sdk/dispatch-BlOkbw2U.js +0 -1
  596. package/dist/plugin-sdk/dispatch-D2Km7gvG.cjs +0 -1
  597. package/dist/plugin-sdk/dispatch-DAaOM5c1.cjs +0 -1
  598. package/dist/plugin-sdk/dispatch-DYRrW05S.js +0 -1
  599. package/dist/plugin-sdk/dispatch-Dap2ZPC9.js +0 -1
  600. package/dist/plugin-sdk/dispatch-Dl0eaYcY.cjs +0 -1
  601. package/dist/plugin-sdk/dispatch-_tJF5hSh.cjs +0 -1
  602. package/dist/plugin-sdk/dispatch-cPg1rBWu.cjs +0 -1
  603. package/dist/plugin-sdk/feishu.cjs +0 -1
  604. package/dist/plugin-sdk/feishu.js +0 -1
  605. package/dist/plugin-sdk/fetch-7Iq9POda.js +0 -1
  606. package/dist/plugin-sdk/fetch-B1GR6-u4.js +0 -1
  607. package/dist/plugin-sdk/fetch-B27H-XCf.js +0 -1
  608. package/dist/plugin-sdk/fetch-BMYDLRWo.js +0 -1
  609. package/dist/plugin-sdk/fetch-BN9y3kTg.cjs +0 -1
  610. package/dist/plugin-sdk/fetch-BVEVk5YF.js +0 -1
  611. package/dist/plugin-sdk/fetch-BY6lVRlY.cjs +0 -1
  612. package/dist/plugin-sdk/fetch-Bi8krAaT.cjs +0 -1
  613. package/dist/plugin-sdk/fetch-BjXhwqrE.cjs +0 -1
  614. package/dist/plugin-sdk/fetch-BtZY623f.js +0 -1
  615. package/dist/plugin-sdk/fetch-C-HRWp5R.js +0 -1
  616. package/dist/plugin-sdk/fetch-C3LEMysf.js +0 -1
  617. package/dist/plugin-sdk/fetch-CCLWsYaQ.js +0 -1
  618. package/dist/plugin-sdk/fetch-CZewCAvu.cjs +0 -1
  619. package/dist/plugin-sdk/fetch-ClKErpni.cjs +0 -1
  620. package/dist/plugin-sdk/fetch-DBRI0sKI.js +0 -1
  621. package/dist/plugin-sdk/fetch-DQxuOB8o.cjs +0 -1
  622. package/dist/plugin-sdk/fetch-DUMEaqum.cjs +0 -1
  623. package/dist/plugin-sdk/fetch-DpwR_cJU.cjs +0 -1
  624. package/dist/plugin-sdk/fetch-J0IzopiJ.js +0 -1
  625. package/dist/plugin-sdk/fetch-guard-7tObWdgY.cjs +0 -1
  626. package/dist/plugin-sdk/fetch-guard-ACKeLHgB.js +0 -1
  627. package/dist/plugin-sdk/fetch-guard-BI5z5sCg.cjs +0 -1
  628. package/dist/plugin-sdk/fetch-guard-BUOtcki7.cjs +0 -1
  629. package/dist/plugin-sdk/fetch-guard-BZi5e63X.js +0 -1
  630. package/dist/plugin-sdk/fetch-guard-CVnIQ0nI.cjs +0 -1
  631. package/dist/plugin-sdk/fetch-guard-DKS4LY4o.js +0 -1
  632. package/dist/plugin-sdk/fetch-guard-DcAQBHbg.cjs +0 -1
  633. package/dist/plugin-sdk/fetch-guard-Dj-DlPBS.cjs +0 -1
  634. package/dist/plugin-sdk/fetch-guard-Dm1nAvhl.js +0 -1
  635. package/dist/plugin-sdk/fetch-guard-GfhPo1Fa.js +0 -1
  636. package/dist/plugin-sdk/fetch-guard-nFWUH1s9.js +0 -1
  637. package/dist/plugin-sdk/fetch-lw-aF17e.cjs +0 -1
  638. package/dist/plugin-sdk/fetch-timeout-6oZsqWxA.js +0 -1
  639. package/dist/plugin-sdk/fetch-timeout-BygUD0rd.cjs +0 -1
  640. package/dist/plugin-sdk/fetch-timeout-CLw1U7VS.js +0 -1
  641. package/dist/plugin-sdk/fetch-timeout-CX1w-9p4.cjs +0 -1
  642. package/dist/plugin-sdk/fetch-timeout-Coc9xyC3.cjs +0 -1
  643. package/dist/plugin-sdk/fetch-timeout-Cz6GuU_c.js +0 -1
  644. package/dist/plugin-sdk/fetch-timeout-DC8T2JCr.js +0 -1
  645. package/dist/plugin-sdk/fetch-timeout-DFDmks9T.cjs +0 -1
  646. package/dist/plugin-sdk/fetch-timeout-DkYpp08Q.js +0 -1
  647. package/dist/plugin-sdk/github-copilot-token-BHdMLLqf.cjs +0 -1
  648. package/dist/plugin-sdk/github-copilot-token-Bt4PduRB.js +0 -1
  649. package/dist/plugin-sdk/github-copilot-token-C1O2cBqk.cjs +0 -1
  650. package/dist/plugin-sdk/github-copilot-token-C1hiDugd.js +0 -1
  651. package/dist/plugin-sdk/github-copilot-token-C8j8_NjX.js +0 -1
  652. package/dist/plugin-sdk/github-copilot-token-CCrgp2py.cjs +0 -1
  653. package/dist/plugin-sdk/github-copilot-token-DoHgkI2r.cjs +0 -1
  654. package/dist/plugin-sdk/github-copilot-token-N8vnLZPw.js +0 -1
  655. package/dist/plugin-sdk/github-copilot-token-TMkfxxD2.cjs +0 -1
  656. package/dist/plugin-sdk/github-copilot-token-vKAKX6iE.js +0 -1
  657. package/dist/plugin-sdk/github-copilot-token-ylX_gawo.js +0 -1
  658. package/dist/plugin-sdk/github-copilot-token-zskwAEpd.cjs +0 -1
  659. package/dist/plugin-sdk/google-gemini-cli-auth.cjs +0 -1
  660. package/dist/plugin-sdk/google-gemini-cli-auth.js +0 -1
  661. package/dist/plugin-sdk/googlechat.cjs +0 -1
  662. package/dist/plugin-sdk/googlechat.js +0 -1
  663. package/dist/plugin-sdk/image-BLG2OrjE.cjs +0 -1
  664. package/dist/plugin-sdk/image-BPUmI-kx.cjs +0 -1
  665. package/dist/plugin-sdk/image-Bt_w0o87.js +0 -1
  666. package/dist/plugin-sdk/image-CMeyJO2-.js +0 -1
  667. package/dist/plugin-sdk/image-CMiT6Fvk.cjs +0 -1
  668. package/dist/plugin-sdk/image-CNMuTe0Z.js +0 -1
  669. package/dist/plugin-sdk/image-CO9zxV0G.js +0 -1
  670. package/dist/plugin-sdk/image-CjVyB61p.cjs +0 -1
  671. package/dist/plugin-sdk/image-CkWikcPf.cjs +0 -1
  672. package/dist/plugin-sdk/image-Dk2gzO1U.js +0 -1
  673. package/dist/plugin-sdk/image-Jmj-a1pv.js +0 -1
  674. package/dist/plugin-sdk/image-UKq4Bn2r.cjs +0 -1
  675. package/dist/plugin-sdk/imessage.cjs +0 -1
  676. package/dist/plugin-sdk/imessage.js +0 -1
  677. package/dist/plugin-sdk/index.cjs +0 -1
  678. package/dist/plugin-sdk/index.js +0 -1
  679. package/dist/plugin-sdk/ir-Bg_avpt0.cjs +0 -1
  680. package/dist/plugin-sdk/ir-BiiaNbB9.cjs +0 -1
  681. package/dist/plugin-sdk/ir-CYJPM1_I.cjs +0 -1
  682. package/dist/plugin-sdk/ir-Ca3EdqFl.js +0 -1
  683. package/dist/plugin-sdk/ir-Cl_S_VBR.cjs +0 -1
  684. package/dist/plugin-sdk/ir-Cq7b_9v8.cjs +0 -1
  685. package/dist/plugin-sdk/ir-DcWa7gsX.cjs +0 -1
  686. package/dist/plugin-sdk/ir-DdA08iXJ.js +0 -1
  687. package/dist/plugin-sdk/ir-DqBwrJJd.js +0 -1
  688. package/dist/plugin-sdk/ir-EUD0qDem.js +0 -1
  689. package/dist/plugin-sdk/ir-c1MS26Ci.js +0 -1
  690. package/dist/plugin-sdk/ir-vhCxHELh.js +0 -1
  691. package/dist/plugin-sdk/irc.cjs +0 -1
  692. package/dist/plugin-sdk/irc.js +0 -1
  693. package/dist/plugin-sdk/keyed-async-queue.cjs +0 -1
  694. package/dist/plugin-sdk/keyed-async-queue.js +0 -1
  695. package/dist/plugin-sdk/line.cjs +0 -1
  696. package/dist/plugin-sdk/line.js +0 -1
  697. package/dist/plugin-sdk/llm-task.cjs +0 -1
  698. package/dist/plugin-sdk/llm-task.js +0 -1
  699. package/dist/plugin-sdk/load-options-B9Ss5YOO.js +0 -1
  700. package/dist/plugin-sdk/load-options-BOfn6Zgo.cjs +0 -1
  701. package/dist/plugin-sdk/load-options-BXvm8HVv.js +0 -1
  702. package/dist/plugin-sdk/load-options-Bb7u8yZz.cjs +0 -1
  703. package/dist/plugin-sdk/load-options-BcSg1ODN.js +0 -1
  704. package/dist/plugin-sdk/load-options-NqnXJ-Nh.cjs +0 -1
  705. package/dist/plugin-sdk/lobster.cjs +0 -1
  706. package/dist/plugin-sdk/lobster.js +0 -1
  707. package/dist/plugin-sdk/local-roots-2OcKjfzk.js +0 -1
  708. package/dist/plugin-sdk/local-roots-ByrRvVBc.cjs +0 -1
  709. package/dist/plugin-sdk/local-roots-CXPxvx0J.js +0 -1
  710. package/dist/plugin-sdk/local-roots-CzbssMW1.cjs +0 -1
  711. package/dist/plugin-sdk/local-roots-DIijr8mK.cjs +0 -1
  712. package/dist/plugin-sdk/local-roots-DRv9Y_41.cjs +0 -1
  713. package/dist/plugin-sdk/local-roots-DTC7BJct.js +0 -1
  714. package/dist/plugin-sdk/local-roots-DU8RuiRi.js +0 -1
  715. package/dist/plugin-sdk/local-roots-DprQ5M3b.js +0 -1
  716. package/dist/plugin-sdk/local-roots-GqNj3vMl.cjs +0 -1
  717. package/dist/plugin-sdk/local-roots-I2icTm2P.cjs +0 -1
  718. package/dist/plugin-sdk/local-roots-qEhx-D42.js +0 -1
  719. package/dist/plugin-sdk/logger-6O6OsYBL.cjs +0 -1
  720. package/dist/plugin-sdk/logger-BlddiV_d.cjs +0 -1
  721. package/dist/plugin-sdk/logger-Bm93ZKOk.cjs +0 -1
  722. package/dist/plugin-sdk/logger-BtrWb0dj.js +0 -1
  723. package/dist/plugin-sdk/logger-C210xuWx.js +0 -1
  724. package/dist/plugin-sdk/logger-DJGHvDbX.js +0 -1
  725. package/dist/plugin-sdk/logger-DPlqYkRm.cjs +0 -1
  726. package/dist/plugin-sdk/logger-DUYnS-W3.cjs +0 -1
  727. package/dist/plugin-sdk/logger-DwWqfo66.js +0 -1
  728. package/dist/plugin-sdk/logger-vBDTZWl3.js +0 -1
  729. package/dist/plugin-sdk/login-0ui1gfZM.cjs +0 -1
  730. package/dist/plugin-sdk/login-B0lIdwss.cjs +0 -1
  731. package/dist/plugin-sdk/login-B43p990Y.cjs +0 -1
  732. package/dist/plugin-sdk/login-DHBcWg4R.cjs +0 -1
  733. package/dist/plugin-sdk/login-DUCNg4lV.js +0 -1
  734. package/dist/plugin-sdk/login-DqVo92p1.js +0 -1
  735. package/dist/plugin-sdk/login-Dt4KiLgP.js +0 -1
  736. package/dist/plugin-sdk/login-IVBk3GwG.cjs +0 -1
  737. package/dist/plugin-sdk/login-T6tSC1Xl.js +0 -1
  738. package/dist/plugin-sdk/login-XruRHZe5.js +0 -1
  739. package/dist/plugin-sdk/login-p9hWVYO6.cjs +0 -1
  740. package/dist/plugin-sdk/login-qr-B4wf-15u.js +0 -1
  741. package/dist/plugin-sdk/login-qr-BQMm3yV_.cjs +0 -1
  742. package/dist/plugin-sdk/login-qr-BreyhXFQ.cjs +0 -1
  743. package/dist/plugin-sdk/login-qr-C6RPK8ld.js +0 -1
  744. package/dist/plugin-sdk/login-qr-C6cQueYq.js +0 -1
  745. package/dist/plugin-sdk/login-qr-CxznBK7s.cjs +0 -1
  746. package/dist/plugin-sdk/login-qr-D0dmb3Gr.js +0 -1
  747. package/dist/plugin-sdk/login-qr-DWW1FC-n.cjs +0 -1
  748. package/dist/plugin-sdk/login-qr-DjC-P7Vy.cjs +0 -1
  749. package/dist/plugin-sdk/login-qr-KeBTY1Mb.js +0 -1
  750. package/dist/plugin-sdk/login-qr-gQsVZ8en.js +0 -1
  751. package/dist/plugin-sdk/login-qr-xkqmSKC8.cjs +0 -1
  752. package/dist/plugin-sdk/login-x9vN5UnR.js +0 -1
  753. package/dist/plugin-sdk/manager-B38IH03I.cjs +0 -1
  754. package/dist/plugin-sdk/manager-BZVFXygg.cjs +0 -1
  755. package/dist/plugin-sdk/manager-BuNveORY.cjs +0 -1
  756. package/dist/plugin-sdk/manager-C4FEmxjq.cjs +0 -1
  757. package/dist/plugin-sdk/manager-CHnzSMNG.js +0 -1
  758. package/dist/plugin-sdk/manager-CN4wiVFz.js +0 -1
  759. package/dist/plugin-sdk/manager-D9RwKYCX.js +0 -1
  760. package/dist/plugin-sdk/manager-DAmjm61U.cjs +0 -1
  761. package/dist/plugin-sdk/manager-DJSpJkev.js +0 -1
  762. package/dist/plugin-sdk/manager-EO7deQzm.js +0 -1
  763. package/dist/plugin-sdk/manager-vyHAgafh.cjs +0 -1
  764. package/dist/plugin-sdk/manager-zyDhj7B-.js +0 -1
  765. package/dist/plugin-sdk/matrix.cjs +0 -1
  766. package/dist/plugin-sdk/matrix.js +0 -1
  767. package/dist/plugin-sdk/mattermost.cjs +0 -1
  768. package/dist/plugin-sdk/mattermost.js +0 -1
  769. package/dist/plugin-sdk/memory-core.cjs +0 -1
  770. package/dist/plugin-sdk/memory-core.js +0 -1
  771. package/dist/plugin-sdk/minimax-portal-auth.cjs +0 -1
  772. package/dist/plugin-sdk/minimax-portal-auth.js +0 -1
  773. package/dist/plugin-sdk/model-auth-1RA9nkQH.js +0 -1
  774. package/dist/plugin-sdk/model-auth-Cgqd2_sP.cjs +0 -1
  775. package/dist/plugin-sdk/model-auth-Cp2GSJwZ.js +0 -1
  776. package/dist/plugin-sdk/model-auth-Lv74A-Si.cjs +0 -1
  777. package/dist/plugin-sdk/model-auth-RI6NYvTO.js +0 -1
  778. package/dist/plugin-sdk/model-auth-exDkzEDR.js +0 -1
  779. package/dist/plugin-sdk/model-auth-igOM3blS.cjs +0 -1
  780. package/dist/plugin-sdk/model-auth-sjKLUCCz.cjs +0 -1
  781. package/dist/plugin-sdk/model-selection-C9HlFaXF.js +0 -1
  782. package/dist/plugin-sdk/model-selection-DpGE9eNM.cjs +0 -1
  783. package/dist/plugin-sdk/msteams.cjs +0 -1
  784. package/dist/plugin-sdk/msteams.js +0 -1
  785. package/dist/plugin-sdk/nextcloud-talk.cjs +0 -1
  786. package/dist/plugin-sdk/nextcloud-talk.js +0 -1
  787. package/dist/plugin-sdk/nostr.cjs +0 -1
  788. package/dist/plugin-sdk/nostr.js +0 -1
  789. package/dist/plugin-sdk/outbound-BO0tyeUH.js +0 -1
  790. package/dist/plugin-sdk/outbound-BYU5HTrX.js +0 -1
  791. package/dist/plugin-sdk/outbound-CBVlxGRf.cjs +0 -1
  792. package/dist/plugin-sdk/outbound-CTyu_gZh.js +0 -1
  793. package/dist/plugin-sdk/outbound-CwWXHNwp.cjs +0 -1
  794. package/dist/plugin-sdk/outbound-CySyQcmE.js +0 -1
  795. package/dist/plugin-sdk/outbound-DDPxEpHH.cjs +0 -1
  796. package/dist/plugin-sdk/outbound-DZhl7sHt.cjs +0 -1
  797. package/dist/plugin-sdk/outbound-DmeUAXdA.js +0 -1
  798. package/dist/plugin-sdk/outbound-DvFQ_6wQ.cjs +0 -1
  799. package/dist/plugin-sdk/outbound-Dy87UlCV.cjs +0 -1
  800. package/dist/plugin-sdk/outbound-attachment-5H1iYkTb.js +0 -1
  801. package/dist/plugin-sdk/outbound-attachment-BAHrn3r7.cjs +0 -1
  802. package/dist/plugin-sdk/outbound-attachment-BBJPbiLF.cjs +0 -1
  803. package/dist/plugin-sdk/outbound-attachment-BIGvZREF.cjs +0 -1
  804. package/dist/plugin-sdk/outbound-attachment-B_OTB3A8.js +0 -1
  805. package/dist/plugin-sdk/outbound-attachment-C94-r948.js +0 -1
  806. package/dist/plugin-sdk/outbound-attachment-CJatgPbm.js +0 -1
  807. package/dist/plugin-sdk/outbound-attachment-CLUVyl5e.js +0 -1
  808. package/dist/plugin-sdk/outbound-attachment-CTR1-VEH.js +0 -1
  809. package/dist/plugin-sdk/outbound-attachment-CmQ0SNgK.cjs +0 -1
  810. package/dist/plugin-sdk/outbound-attachment-Dbja7LQF.cjs +0 -1
  811. package/dist/plugin-sdk/outbound-attachment-DwzJ2l3T.cjs +0 -1
  812. package/dist/plugin-sdk/outbound-xMr8Xsxe.js +0 -1
  813. package/dist/plugin-sdk/paths-BPlgbwrb.cjs +0 -1
  814. package/dist/plugin-sdk/paths-Bcdg3ma0.cjs +0 -1
  815. package/dist/plugin-sdk/paths-BpQOWYiT.js +0 -1
  816. package/dist/plugin-sdk/paths-BvlJvmRS.cjs +0 -1
  817. package/dist/plugin-sdk/paths-CIcxeNL-.cjs +0 -1
  818. package/dist/plugin-sdk/paths-CXgWvWAM.js +0 -1
  819. package/dist/plugin-sdk/paths-Chp3zwtq.cjs +0 -1
  820. package/dist/plugin-sdk/paths-CnHSNSeR.js +0 -1
  821. package/dist/plugin-sdk/paths-Cqca1YmF.cjs +0 -1
  822. package/dist/plugin-sdk/paths-CtrEseGU.js +0 -1
  823. package/dist/plugin-sdk/paths-D55o_j8-.js +0 -1
  824. package/dist/plugin-sdk/paths-D90l3h_o.cjs +0 -1
  825. package/dist/plugin-sdk/paths-DaRoqzBQ.js +0 -1
  826. package/dist/plugin-sdk/paths-Dd7r1qlB.cjs +0 -1
  827. package/dist/plugin-sdk/paths-DhSjTRMz.js +0 -1
  828. package/dist/plugin-sdk/paths-Do0djuaj.js +0 -1
  829. package/dist/plugin-sdk/paths-J4JUiRsa.js +0 -1
  830. package/dist/plugin-sdk/paths-cBAF6Bj0.js +0 -1
  831. package/dist/plugin-sdk/paths-piJASC5k.js +0 -1
  832. package/dist/plugin-sdk/paths-rO4ehkyU.js +0 -1
  833. package/dist/plugin-sdk/pi-model-discovery-5wc5qlmB.cjs +0 -1
  834. package/dist/plugin-sdk/pi-model-discovery-BQiHbl8F.js +0 -1
  835. package/dist/plugin-sdk/pi-model-discovery-BZZVGcJl.js +0 -1
  836. package/dist/plugin-sdk/pi-model-discovery-Ba70onAm.js +0 -1
  837. package/dist/plugin-sdk/pi-model-discovery-BfuqD_Rv.cjs +0 -1
  838. package/dist/plugin-sdk/pi-model-discovery-BsdlRK-w.js +0 -1
  839. package/dist/plugin-sdk/pi-model-discovery-CAYSx-Lw.cjs +0 -1
  840. package/dist/plugin-sdk/pi-model-discovery-CyBFRafV.cjs +0 -1
  841. package/dist/plugin-sdk/pi-model-discovery-D1WW5m-Q.js +0 -1
  842. package/dist/plugin-sdk/pi-model-discovery-DRYpUnOa.cjs +0 -1
  843. package/dist/plugin-sdk/pi-model-discovery-DUbDLlc7.cjs +0 -1
  844. package/dist/plugin-sdk/pi-model-discovery-DcUDwgMg.cjs +0 -1
  845. package/dist/plugin-sdk/pi-model-discovery-DrZsxLaJ.js +0 -1
  846. package/dist/plugin-sdk/pi-model-discovery-gaVoL7I2.js +0 -1
  847. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BWmteuHS.js +0 -1
  848. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BmznXclG.cjs +0 -1
  849. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BzTifHML.cjs +0 -1
  850. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CEPsGtJk.cjs +0 -1
  851. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CYleOK1-.cjs +0 -1
  852. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Ctbk1Pq8.js +0 -1
  853. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-D-hwiLUl.js +0 -1
  854. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DDuUTLh8.js +0 -1
  855. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DLfogXKU.cjs +0 -1
  856. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Dd-VFim_.js +0 -1
  857. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Dvmcwf-j.cjs +0 -1
  858. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-i-IGFbqI.js +0 -1
  859. package/dist/plugin-sdk/polls-BuaJuIpV.cjs +0 -1
  860. package/dist/plugin-sdk/polls-CBAGZuJ6.js +0 -1
  861. package/dist/plugin-sdk/polls-CSKMbBIS.js +0 -1
  862. package/dist/plugin-sdk/polls-D0wY0FvT.cjs +0 -1
  863. package/dist/plugin-sdk/polls-PGxiE05J.js +0 -1
  864. package/dist/plugin-sdk/polls-yWqSCEP0.cjs +0 -1
  865. package/dist/plugin-sdk/proxy-env-B765haXA.js +0 -1
  866. package/dist/plugin-sdk/proxy-env-Bcl14j2_.cjs +0 -1
  867. package/dist/plugin-sdk/proxy-env-BlrHtJWH.js +0 -1
  868. package/dist/plugin-sdk/proxy-env-D48qBPAr.cjs +0 -1
  869. package/dist/plugin-sdk/proxy-env-DGzNnnJh.js +0 -1
  870. package/dist/plugin-sdk/proxy-env-DQoJjkWE.cjs +0 -1
  871. package/dist/plugin-sdk/proxy-env-DWw9TnOj.cjs +0 -1
  872. package/dist/plugin-sdk/proxy-env-MEjSyzTr.js +0 -1
  873. package/dist/plugin-sdk/proxy-env-a590sPAz.cjs +0 -1
  874. package/dist/plugin-sdk/proxy-env-k93igu7v.cjs +0 -1
  875. package/dist/plugin-sdk/proxy-env-m9eG3uZN.js +0 -1
  876. package/dist/plugin-sdk/proxy-env-t6hcaFqC.js +0 -1
  877. package/dist/plugin-sdk/proxy-fetch-B9aXJVe-.js +0 -1
  878. package/dist/plugin-sdk/proxy-fetch-BaA3JYgW.cjs +0 -1
  879. package/dist/plugin-sdk/proxy-fetch-BwXFVsHE.cjs +0 -1
  880. package/dist/plugin-sdk/proxy-fetch-BzcKzknk.cjs +0 -1
  881. package/dist/plugin-sdk/proxy-fetch-CYVChsKE.js +0 -1
  882. package/dist/plugin-sdk/proxy-fetch-ClOb2LUH.js +0 -1
  883. package/dist/plugin-sdk/proxy-fetch-DH7VIiBH.cjs +0 -1
  884. package/dist/plugin-sdk/proxy-fetch-DPOhfrou.cjs +0 -1
  885. package/dist/plugin-sdk/proxy-fetch-DXt2R_Z5.js +0 -1
  886. package/dist/plugin-sdk/proxy-fetch-Del551nu.js +0 -1
  887. package/dist/plugin-sdk/proxy-fetch-YCVHz7Rl.js +0 -1
  888. package/dist/plugin-sdk/proxy-fetch-qbrYAz8k.cjs +0 -1
  889. package/dist/plugin-sdk/pw-ai-B9PkuA_R.cjs +0 -1
  890. package/dist/plugin-sdk/pw-ai-BMJV0Hqt.cjs +0 -1
  891. package/dist/plugin-sdk/pw-ai-BRasSDsB.js +0 -1
  892. package/dist/plugin-sdk/pw-ai-BY57aH_o.js +0 -1
  893. package/dist/plugin-sdk/pw-ai-BbpImC35.cjs +0 -1
  894. package/dist/plugin-sdk/pw-ai-D7d16RB-.cjs +0 -1
  895. package/dist/plugin-sdk/pw-ai-DF7TX5Lc.cjs +0 -1
  896. package/dist/plugin-sdk/pw-ai-DHN1pktj.js +0 -1
  897. package/dist/plugin-sdk/pw-ai-QzImh8G0.cjs +0 -1
  898. package/dist/plugin-sdk/pw-ai-V1CVJi48.js +0 -1
  899. package/dist/plugin-sdk/pw-ai-mvXkpTxf.js +0 -1
  900. package/dist/plugin-sdk/pw-ai-tdgA-KlG.js +0 -1
  901. package/dist/plugin-sdk/qmd-manager-B3xNbdye.cjs +0 -1
  902. package/dist/plugin-sdk/qmd-manager-BMyDNBPi.js +0 -1
  903. package/dist/plugin-sdk/qmd-manager-BZhiv_zq.cjs +0 -1
  904. package/dist/plugin-sdk/qmd-manager-C3uVDbhW.js +0 -1
  905. package/dist/plugin-sdk/qmd-manager-CW46NrS-.cjs +0 -1
  906. package/dist/plugin-sdk/qmd-manager-C_e04BNg.js +0 -1
  907. package/dist/plugin-sdk/qmd-manager-CczVoslK.cjs +0 -1
  908. package/dist/plugin-sdk/qmd-manager-CzLKqPmR.js +0 -1
  909. package/dist/plugin-sdk/qmd-manager-DFh8b5N-.cjs +0 -1
  910. package/dist/plugin-sdk/qmd-manager-DXLfZZMI.js +0 -1
  911. package/dist/plugin-sdk/qmd-manager-FL9fAfNo.cjs +0 -1
  912. package/dist/plugin-sdk/qmd-manager-fWxbGqzk.js +0 -1
  913. package/dist/plugin-sdk/query-expansion-0zYzKrrd.cjs +0 -1
  914. package/dist/plugin-sdk/query-expansion-BYSjmpkV.cjs +0 -1
  915. package/dist/plugin-sdk/query-expansion-CAboqtWr.js +0 -1
  916. package/dist/plugin-sdk/query-expansion-C_DnhmUy.js +0 -1
  917. package/dist/plugin-sdk/query-expansion-Cb2vnF6y.js +0 -1
  918. package/dist/plugin-sdk/query-expansion-DCeqywxh.cjs +0 -1
  919. package/dist/plugin-sdk/query-expansion-DF4LMxRQ.js +0 -1
  920. package/dist/plugin-sdk/query-expansion-DKJkqmNM.cjs +0 -1
  921. package/dist/plugin-sdk/query-expansion-DO2CFW4z.cjs +0 -1
  922. package/dist/plugin-sdk/query-expansion-DyCDaZbL.js +0 -1
  923. package/dist/plugin-sdk/query-expansion-cpXCyoDy.cjs +0 -1
  924. package/dist/plugin-sdk/query-expansion-r_iXkNzt.js +0 -1
  925. package/dist/plugin-sdk/qwen-portal-auth.cjs +0 -1
  926. package/dist/plugin-sdk/qwen-portal-auth.js +0 -1
  927. package/dist/plugin-sdk/render-6fCdtAr6.cjs +0 -1
  928. package/dist/plugin-sdk/render-CBsnn-2A.js +0 -1
  929. package/dist/plugin-sdk/render-CzHaQB0d.cjs +0 -1
  930. package/dist/plugin-sdk/render-DGmfCIRG.js +0 -1
  931. package/dist/plugin-sdk/render-DhTJXP1U.js +0 -1
  932. package/dist/plugin-sdk/render-Djx15dPh.js +0 -1
  933. package/dist/plugin-sdk/render-DxBO2Blp.cjs +0 -1
  934. package/dist/plugin-sdk/render-g5VlmgpF.cjs +0 -1
  935. package/dist/plugin-sdk/reply-73PF8kN_.js +0 -1
  936. package/dist/plugin-sdk/reply-JD6VIW5N.cjs +0 -1
  937. package/dist/plugin-sdk/resolve-outbound-target-BNv_T3Bk.js +0 -1
  938. package/dist/plugin-sdk/resolve-outbound-target-CDM7_xfU.cjs +0 -1
  939. package/dist/plugin-sdk/resolve-outbound-target-CvKfootv.js +0 -1
  940. package/dist/plugin-sdk/resolve-outbound-target-Fq8une1d.cjs +0 -1
  941. package/dist/plugin-sdk/send-0TzQg7Eo.js +0 -1
  942. package/dist/plugin-sdk/send-AyV5r86J.js +0 -1
  943. package/dist/plugin-sdk/send-B-GqqrNy.js +0 -1
  944. package/dist/plugin-sdk/send-B03So6fs.cjs +0 -1
  945. package/dist/plugin-sdk/send-B0oV0qgS.js +0 -1
  946. package/dist/plugin-sdk/send-B31Tjl_I.cjs +0 -1
  947. package/dist/plugin-sdk/send-B4LTVhTd.cjs +0 -1
  948. package/dist/plugin-sdk/send-BGXPpAqy.cjs +0 -1
  949. package/dist/plugin-sdk/send-BJ957TYU.js +0 -1
  950. package/dist/plugin-sdk/send-BJmf3HVn.cjs +0 -1
  951. package/dist/plugin-sdk/send-BW3UECzm.js +0 -1
  952. package/dist/plugin-sdk/send-BWEZ_8nL.cjs +0 -1
  953. package/dist/plugin-sdk/send-BXrh73qh.cjs +0 -1
  954. package/dist/plugin-sdk/send-BbudHjUi.cjs +0 -1
  955. package/dist/plugin-sdk/send-BkjnUdWv.cjs +0 -1
  956. package/dist/plugin-sdk/send-BxIt-s7G.cjs +0 -1
  957. package/dist/plugin-sdk/send-ByKNfU2S.js +0 -1
  958. package/dist/plugin-sdk/send-Bz2Loz_Q.cjs +0 -1
  959. package/dist/plugin-sdk/send-CAreQYLU.cjs +0 -1
  960. package/dist/plugin-sdk/send-CGMqeSaY.cjs +0 -1
  961. package/dist/plugin-sdk/send-CJmor6eC.js +0 -1
  962. package/dist/plugin-sdk/send-CL2pl8br.cjs +0 -1
  963. package/dist/plugin-sdk/send-CMeGMLko.js +0 -1
  964. package/dist/plugin-sdk/send-CceHBxiK.js +0 -1
  965. package/dist/plugin-sdk/send-Cdx_KGYb.js +0 -1
  966. package/dist/plugin-sdk/send-Cer1bA2g.cjs +0 -1
  967. package/dist/plugin-sdk/send-CimU95QQ.cjs +0 -1
  968. package/dist/plugin-sdk/send-CoEAieJt.cjs +0 -1
  969. package/dist/plugin-sdk/send-Cob_bnT32.js +0 -1
  970. package/dist/plugin-sdk/send-Cyp5hOpt.js +0 -1
  971. package/dist/plugin-sdk/send-CzEFjTpi.js +0 -1
  972. package/dist/plugin-sdk/send-D2LjU2py.js +0 -1
  973. package/dist/plugin-sdk/send-D9Gbseeh.cjs +0 -1
  974. package/dist/plugin-sdk/send-DIjQ2vB4.js +0 -1
  975. package/dist/plugin-sdk/send-DJ419AIX.cjs +0 -1
  976. package/dist/plugin-sdk/send-DLtYxO1e.cjs +0 -1
  977. package/dist/plugin-sdk/send-DMk529J8.js +0 -1
  978. package/dist/plugin-sdk/send-DMxohaL_.cjs +0 -1
  979. package/dist/plugin-sdk/send-DQlKz6Bj.js +0 -1
  980. package/dist/plugin-sdk/send-DTUW-YBy.js +0 -1
  981. package/dist/plugin-sdk/send-Dc43nN-I.js +0 -1
  982. package/dist/plugin-sdk/send-DcRj8DUU.cjs +0 -1
  983. package/dist/plugin-sdk/send-DmxxJFZd.cjs +0 -1
  984. package/dist/plugin-sdk/send-DnwN1vBU.cjs +0 -1
  985. package/dist/plugin-sdk/send-DogBiU4n.cjs +0 -1
  986. package/dist/plugin-sdk/send-MEvv6c7w.js +0 -1
  987. package/dist/plugin-sdk/send-TRwokuAm.cjs +0 -1
  988. package/dist/plugin-sdk/send-VUSa_wkg.js +0 -1
  989. package/dist/plugin-sdk/send-X1b7Cj9U.cjs +0 -1
  990. package/dist/plugin-sdk/send-XX5rP5bI.js +0 -1
  991. package/dist/plugin-sdk/send-_ZGBA2sz.js +0 -1
  992. package/dist/plugin-sdk/send-d5RoIkxA.js +0 -1
  993. package/dist/plugin-sdk/send-dCbQnCLx.js +0 -1
  994. package/dist/plugin-sdk/send-gSV6SR6F.cjs +0 -1
  995. package/dist/plugin-sdk/send-pC6ctwfQ.cjs +0 -1
  996. package/dist/plugin-sdk/send-pq2hNOwv.cjs +0 -1
  997. package/dist/plugin-sdk/send-q6C-1cdJ.js +0 -1
  998. package/dist/plugin-sdk/send-vnIJSD5l.js +0 -1
  999. package/dist/plugin-sdk/send-vtYROJNd.js +0 -1
  1000. package/dist/plugin-sdk/send-wk_Y38Eq.js +0 -1
  1001. package/dist/plugin-sdk/session-BSLJWzVk.cjs +0 -1
  1002. package/dist/plugin-sdk/session-BfWC0c92.js +0 -1
  1003. package/dist/plugin-sdk/session-BjsaXe-G.js +0 -1
  1004. package/dist/plugin-sdk/session-C20nSfk5.cjs +0 -1
  1005. package/dist/plugin-sdk/session-CR8fsPgs.js +0 -1
  1006. package/dist/plugin-sdk/session-CwinrWG4.cjs +0 -1
  1007. package/dist/plugin-sdk/session-DAtRSLdw.cjs +0 -1
  1008. package/dist/plugin-sdk/session-Djo63EGV.cjs +0 -1
  1009. package/dist/plugin-sdk/session-EJZkCm6l.js +0 -1
  1010. package/dist/plugin-sdk/session-UIRgeq02.cjs +0 -1
  1011. package/dist/plugin-sdk/session-aOZKTEyZ.js +0 -1
  1012. package/dist/plugin-sdk/session-nUw21fi0.js +0 -1
  1013. package/dist/plugin-sdk/sessions-B06a3AKE.js +0 -1
  1014. package/dist/plugin-sdk/sessions-BmhjMXlm.cjs +0 -1
  1015. package/dist/plugin-sdk/signal.cjs +0 -1
  1016. package/dist/plugin-sdk/signal.js +0 -1
  1017. package/dist/plugin-sdk/skill-commands-2LXH0aZR.cjs +0 -1
  1018. package/dist/plugin-sdk/skill-commands-B4AbCkKe.cjs +0 -1
  1019. package/dist/plugin-sdk/skill-commands-B_xNpuH_.cjs +0 -1
  1020. package/dist/plugin-sdk/skill-commands-BbAfKA1R.js +0 -1
  1021. package/dist/plugin-sdk/skill-commands-BcKIgHAP.cjs +0 -1
  1022. package/dist/plugin-sdk/skill-commands-C9g2UiKr.cjs +0 -1
  1023. package/dist/plugin-sdk/skill-commands-CPZ9Jvbj.js +0 -1
  1024. package/dist/plugin-sdk/skill-commands-CgDUjb3J.js +0 -1
  1025. package/dist/plugin-sdk/skill-commands-D83BLBEG.js +0 -1
  1026. package/dist/plugin-sdk/skill-commands-DI1TMUxQ.js +0 -1
  1027. package/dist/plugin-sdk/skill-commands-DldIiKD1.js +0 -1
  1028. package/dist/plugin-sdk/skill-commands-LCW6nWWC.cjs +0 -1
  1029. package/dist/plugin-sdk/slack.cjs +0 -1
  1030. package/dist/plugin-sdk/slack.js +0 -1
  1031. package/dist/plugin-sdk/synology-chat.cjs +0 -1
  1032. package/dist/plugin-sdk/synology-chat.js +0 -1
  1033. package/dist/plugin-sdk/tables-BXY1ms0X.js +0 -1
  1034. package/dist/plugin-sdk/tables-BlhpY72l.cjs +0 -1
  1035. package/dist/plugin-sdk/tables-BltHUi44.cjs +0 -1
  1036. package/dist/plugin-sdk/tables-Bp6t_Jkb.js +0 -1
  1037. package/dist/plugin-sdk/tables-BszYJkqX.cjs +0 -1
  1038. package/dist/plugin-sdk/tables-CAZJt5bp.js +0 -1
  1039. package/dist/plugin-sdk/tables-CcuiVH-P.cjs +0 -1
  1040. package/dist/plugin-sdk/tables-CuSMtUxt.cjs +0 -1
  1041. package/dist/plugin-sdk/tables-DOLEnfD6.js +0 -1
  1042. package/dist/plugin-sdk/tables-DiiF7bbj.cjs +0 -1
  1043. package/dist/plugin-sdk/tables-aSJP6Sef.js +0 -1
  1044. package/dist/plugin-sdk/tables-ib4GZqYB.js +0 -1
  1045. package/dist/plugin-sdk/target-errors--anbEDnm.js +0 -1
  1046. package/dist/plugin-sdk/target-errors-4q9SUsM_.js +0 -1
  1047. package/dist/plugin-sdk/target-errors-BFOTHcjO.js +0 -1
  1048. package/dist/plugin-sdk/target-errors-Bw4tI2Lc.cjs +0 -1
  1049. package/dist/plugin-sdk/target-errors-CAgwWHUv.js +0 -1
  1050. package/dist/plugin-sdk/target-errors-CUDKM0z-.js +0 -1
  1051. package/dist/plugin-sdk/target-errors-DIOJ6Eun.cjs +0 -1
  1052. package/dist/plugin-sdk/target-errors-DnZq9h4B.cjs +0 -1
  1053. package/dist/plugin-sdk/target-errors-DwAKh8KU.cjs +0 -1
  1054. package/dist/plugin-sdk/target-errors-QGzfLvuU.cjs +0 -1
  1055. package/dist/plugin-sdk/targets-BSc11Uk8.cjs +0 -1
  1056. package/dist/plugin-sdk/targets-BSkiizml.js +0 -1
  1057. package/dist/plugin-sdk/targets-CBI0xqve.cjs +0 -1
  1058. package/dist/plugin-sdk/targets-CL5fYQi7.js +0 -1
  1059. package/dist/plugin-sdk/targets-CUZWrFrm.cjs +0 -1
  1060. package/dist/plugin-sdk/targets-CVEYTFPQ.js +0 -1
  1061. package/dist/plugin-sdk/targets-Co2R6K14.cjs +0 -1
  1062. package/dist/plugin-sdk/targets-CrkJkzil.js +0 -1
  1063. package/dist/plugin-sdk/targets-D-m7SV9x.cjs +0 -1
  1064. package/dist/plugin-sdk/targets-D8HTxbo4.js +0 -1
  1065. package/dist/plugin-sdk/targets-DcGNB9nk.cjs +0 -1
  1066. package/dist/plugin-sdk/targets-Dn9gDiEw.js +0 -1
  1067. package/dist/plugin-sdk/targets-X28mff4s.cjs +0 -1
  1068. package/dist/plugin-sdk/targets-uycXZ8vQ.js +0 -1
  1069. package/dist/plugin-sdk/telegram.cjs +0 -1
  1070. package/dist/plugin-sdk/telegram.js +0 -1
  1071. package/dist/plugin-sdk/test-utils.cjs +0 -1
  1072. package/dist/plugin-sdk/test-utils.js +0 -1
  1073. package/dist/plugin-sdk/tlon.cjs +0 -1
  1074. package/dist/plugin-sdk/tlon.js +0 -1
  1075. package/dist/plugin-sdk/tokens-AAdZjj0M.js +0 -1
  1076. package/dist/plugin-sdk/tokens-B20KNIDD.js +0 -1
  1077. package/dist/plugin-sdk/tokens-B8ys7Q2e.js +0 -1
  1078. package/dist/plugin-sdk/tokens-BPc1fcZ3.js +0 -1
  1079. package/dist/plugin-sdk/tokens-BqABmXSe.js +0 -1
  1080. package/dist/plugin-sdk/tokens-CXsPDJTr.cjs +0 -1
  1081. package/dist/plugin-sdk/tokens-CnB4dJmp.cjs +0 -1
  1082. package/dist/plugin-sdk/tokens-CytSl1X8.cjs +0 -1
  1083. package/dist/plugin-sdk/tokens-DgPZk2Uu.js +0 -1
  1084. package/dist/plugin-sdk/tokens-Dq2wDF3_.cjs +0 -1
  1085. package/dist/plugin-sdk/tokens-DtrljGtQ.cjs +0 -1
  1086. package/dist/plugin-sdk/tokens-g5KWvWhD.cjs +0 -1
  1087. package/dist/plugin-sdk/twitch.cjs +0 -1
  1088. package/dist/plugin-sdk/twitch.js +0 -1
  1089. package/dist/plugin-sdk/utils-BJtJR72k.js +0 -1
  1090. package/dist/plugin-sdk/utils-PPIvU9qw.cjs +0 -1
  1091. package/dist/plugin-sdk/voice-call.cjs +0 -1
  1092. package/dist/plugin-sdk/voice-call.js +0 -1
  1093. package/dist/plugin-sdk/web--8MBOleK.js +0 -1
  1094. package/dist/plugin-sdk/web-B7d3p3kx.cjs +0 -1
  1095. package/dist/plugin-sdk/web-BEuW8Yqw.js +0 -1
  1096. package/dist/plugin-sdk/web-Bg2LIMdb.cjs +0 -1
  1097. package/dist/plugin-sdk/web-DFDao2So.cjs +0 -1
  1098. package/dist/plugin-sdk/web-DjbeDvyv.js +0 -1
  1099. package/dist/plugin-sdk/web-JciOW43P.js +0 -1
  1100. package/dist/plugin-sdk/web-vSFigMHz.cjs +0 -1
  1101. package/dist/plugin-sdk/weixin.cjs +0 -1
  1102. package/dist/plugin-sdk/weixin.js +0 -1
  1103. package/dist/plugin-sdk/whatsapp-actions-B67oFfeq.js +0 -1
  1104. package/dist/plugin-sdk/whatsapp-actions-BB0eACkf.cjs +0 -1
  1105. package/dist/plugin-sdk/whatsapp-actions-BIgrB0j5.cjs +0 -1
  1106. package/dist/plugin-sdk/whatsapp-actions-CFve14ju.cjs +0 -1
  1107. package/dist/plugin-sdk/whatsapp-actions-CdRkPw-b.js +0 -1
  1108. package/dist/plugin-sdk/whatsapp-actions-CtIBOGpJ.cjs +0 -1
  1109. package/dist/plugin-sdk/whatsapp-actions-CwAU7FuE.js +0 -1
  1110. package/dist/plugin-sdk/whatsapp-actions-DQ1t5QTc.cjs +0 -1
  1111. package/dist/plugin-sdk/whatsapp-actions-DkrN4BcG.js +0 -1
  1112. package/dist/plugin-sdk/whatsapp-actions-DnkKzVrU.js +0 -1
  1113. package/dist/plugin-sdk/whatsapp-actions-YcBsDZ88.js +0 -1
  1114. package/dist/plugin-sdk/whatsapp-actions-wk1U2IVU.cjs +0 -1
  1115. package/dist/plugin-sdk/whatsapp.cjs +0 -1
  1116. package/dist/plugin-sdk/whatsapp.js +0 -1
  1117. package/dist/plugin-sdk/zalo.cjs +0 -1
  1118. package/dist/plugin-sdk/zalo.js +0 -1
  1119. package/dist/plugin-sdk/zalouser.cjs +0 -1
  1120. package/dist/plugin-sdk/zalouser.js +0 -1
  1121. package/dist/plugins-CYLrFT4h.js +0 -1
  1122. package/dist/plugins-DNlgeTTc.js +0 -1
  1123. package/dist/plugins-cli-CnXgwZzI.js +0 -1
  1124. package/dist/plugins-cli-PVHBZeb8.js +0 -1
  1125. package/dist/polls-BIVz6a4F.js +0 -1
  1126. package/dist/polls-Bh5wc9-6.js +0 -1
  1127. package/dist/polls-C_XSFz3d.js +0 -1
  1128. package/dist/polls-DKJOFSzJ.js +0 -1
  1129. package/dist/ports-BAaLOkJp.js +2 -0
  1130. package/dist/ports-DDWP1p0X.js +2 -0
  1131. package/dist/probe-auth-C5nWfMS9.js +0 -1
  1132. package/dist/probe-auth-x4OHS_wa.js +0 -1
  1133. package/dist/profile-utils-CWmra1aY.js +0 -1
  1134. package/dist/{program-ppBAyCNf.js → program-D53eGuSf.js} +1 -2
  1135. package/dist/program-context-CH9p6anW.js +0 -1
  1136. package/dist/{program-context-BXNpM3b4.js → program-context-n-ovYq69.js} +1 -2
  1137. package/dist/progress-LNttnI-y.js +0 -1
  1138. package/dist/progress-d1m2sqR1.js +0 -1
  1139. package/dist/{prompt-select-styled-947JghKF.js → prompt-select-styled-DZnefcrY.js} +1 -2
  1140. package/dist/{prompt-select-styled-1abs2MvK.js → prompt-select-styled-DolCW-_j.js} +1 -2
  1141. package/dist/prompt-style-BThRSQJR.js +0 -1
  1142. package/dist/prompt-style-CXKekIBY.js +0 -1
  1143. package/dist/prompts-CMzglboN.js +0 -1
  1144. package/dist/prompts-wv-lfVrJ.js +0 -1
  1145. package/dist/provider-auth-helpers-BLm2bdp5.js +0 -1
  1146. package/dist/provider-auth-helpers-DPz0vN_c.js +0 -1
  1147. package/dist/provider-env-vars-D8p6Ohpj.js +0 -1
  1148. package/dist/provider-env-vars-Dt0Q29Su.js +0 -1
  1149. package/dist/proxy-env-BNhTHkd_.js +0 -1
  1150. package/dist/proxy-env-DcmW_urA.js +0 -1
  1151. package/dist/proxy-env-DrC3TIGh.js +0 -1
  1152. package/dist/proxy-env-FJr5nlvs.js +0 -1
  1153. package/dist/proxy-fetch-BADsUK4d.js +0 -1
  1154. package/dist/proxy-fetch-BZ9O8Dvj.js +0 -1
  1155. package/dist/proxy-fetch-DnjU1fEB.js +0 -1
  1156. package/dist/proxy-fetch-gWETR3cl.js +0 -1
  1157. package/dist/push-apns-BBv62ncV.js +0 -1
  1158. package/dist/push-apns-DIV5dBPP.js +0 -1
  1159. package/dist/pw-ai-C0gM3d-6.js +0 -1
  1160. package/dist/pw-ai-CQd14BQa.js +0 -1
  1161. package/dist/pw-ai-DiQuOf4W.js +0 -1
  1162. package/dist/pw-ai-jlhIn-aA.js +0 -1
  1163. package/dist/qmd-manager-C_e04BNg.js +0 -1
  1164. package/dist/qmd-manager-DSQ_mDCl.js +0 -1
  1165. package/dist/qmd-manager-DcBYbt_V.js +0 -1
  1166. package/dist/qmd-manager-NLI0R6kp.js +0 -1
  1167. package/dist/qr-cli-D06YZurm.js +0 -1
  1168. package/dist/qr-cli-ZtDsXyLO.js +0 -1
  1169. package/dist/query-expansion-0OxEb1Io.js +0 -1
  1170. package/dist/query-expansion-BUUx_oWg.js +0 -1
  1171. package/dist/query-expansion-r_iXkNzt.js +0 -1
  1172. package/dist/reaction-level-DVPHL14p.js +0 -1
  1173. package/dist/reaction-message-id-BEEe7X3D.js +0 -1
  1174. package/dist/read-only-account-inspect-B0cm8yrv.js +0 -1
  1175. package/dist/redact-3_CiXMY6.js +0 -1
  1176. package/dist/redact-CnRxK70G.js +0 -1
  1177. package/dist/register.agent-DHOTtB8X.js +0 -1
  1178. package/dist/register.agent-DQdoMfmw.js +0 -1
  1179. package/dist/register.backup-BDO3V0so.js +0 -1
  1180. package/dist/register.backup-Vh8RK6fp.js +0 -1
  1181. package/dist/register.configure-C2N82brC.js +0 -1
  1182. package/dist/register.configure-C6zjzaEo.js +0 -1
  1183. package/dist/{register.maintenance-Br9uoFKo.js → register.maintenance-CStaPxaB.js} +1 -2
  1184. package/dist/{register.maintenance-Cm3wq9bt.js → register.maintenance-aKBTd9Zp.js} +1 -2
  1185. package/dist/register.message-DHDcOA8X.js +0 -1
  1186. package/dist/register.message-Dh72QHKA.js +0 -1
  1187. package/dist/{register.onboard-AjrSlfCb.js → register.onboard-Bu9gpFlA.js} +1 -2
  1188. package/dist/{register.onboard-zCG1PNWc.js → register.onboard-DB9FWAKT.js} +1 -2
  1189. package/dist/{register.setup-DN0y_pth.js → register.setup-CeG2ETmr.js} +1 -2
  1190. package/dist/{register.setup-Blyl_QsK.js → register.setup-D76IRs4s.js} +1 -2
  1191. package/dist/register.status-health-sessions-Dtpd1P2M.js +0 -1
  1192. package/dist/register.status-health-sessions-mPGKFjIz.js +0 -1
  1193. package/dist/{register.subclis-5Pb-uEHk.js → register.subclis-Drp2dGBe.js} +1 -2
  1194. package/dist/registry-BptzrW8D.js +0 -1
  1195. package/dist/registry-hFAtCSWG.js +0 -1
  1196. package/dist/render-BXEUPIHe.js +0 -1
  1197. package/dist/render-CBsnn-2A.js +0 -1
  1198. package/dist/render-D8OWO2hT.js +0 -1
  1199. package/dist/render-DrrPmnMI.js +0 -1
  1200. package/dist/reply-DwfVhea1.js +0 -1
  1201. package/dist/restart-BeJuoXCx.js +0 -1
  1202. package/dist/rpc-BBdeIvn0.js +0 -1
  1203. package/dist/rpc-f85A4Ib_.js +0 -1
  1204. package/dist/{run-main-DGwq5DIc.js → run-main-CjwjyWA6.js} +1 -2
  1205. package/dist/runtime-CK7gqwEF.js +0 -1
  1206. package/dist/runtime-DYttInEE.js +0 -1
  1207. package/dist/runtime-guard-DFYBaYZS.js +0 -1
  1208. package/dist/runtime-guard-DX2Ie4ri.js +0 -1
  1209. package/dist/runtime-status-CqFBmdRd.js +0 -1
  1210. package/dist/runtime-status-DszMjvJK.js +0 -1
  1211. package/dist/runtime-web-tools-BYhCkBV8.js +0 -1
  1212. package/dist/runtime-web-tools-C4F6aaRh.js +0 -1
  1213. package/dist/sandbox-cli-BR0Lsru-.js +0 -1
  1214. package/dist/sandbox-cli-Jo5nYeug.js +0 -1
  1215. package/dist/scan-paths-C13EseXp.js +0 -1
  1216. package/dist/scan-paths-CWtvWW40.js +0 -1
  1217. package/dist/search-manager-CV2YsAym.js +0 -1
  1218. package/dist/secret-file-C7JffiM_.js +0 -1
  1219. package/dist/secret-file-D60EFEOe.js +0 -1
  1220. package/dist/secret-file-DuWm26jS.js +0 -1
  1221. package/dist/secrets-cli-B8kwyZFo.js +0 -1
  1222. package/dist/secrets-cli-BstBe0UA.js +0 -1
  1223. package/dist/secure-random-D7JQgiK-.js +0 -1
  1224. package/dist/security-cli-C6t8OxaE.js +0 -1
  1225. package/dist/security-cli-Cuc8IQKB.js +0 -1
  1226. package/dist/send--9G8eXo4.js +0 -1
  1227. package/dist/send-4h1tQwX3.js +0 -1
  1228. package/dist/send-7qgAI0ap.js +0 -1
  1229. package/dist/send-AQ3CJLpI.js +0 -1
  1230. package/dist/send-BjrfjBn9.js +0 -1
  1231. package/dist/send-BwblpWbK.js +0 -1
  1232. package/dist/send-C4Lm4nmt.js +0 -1
  1233. package/dist/send-C7rOdjPO.js +0 -1
  1234. package/dist/send-COpehmAB.js +0 -1
  1235. package/dist/send-CWVTcDAW.js +0 -1
  1236. package/dist/send-CciNyaWL.js +0 -1
  1237. package/dist/send-ChILboDj.js +0 -1
  1238. package/dist/send-CyarIb2w.js +0 -1
  1239. package/dist/send-DiHS8tKf.js +0 -1
  1240. package/dist/send-Dj7NBAWg.js +0 -1
  1241. package/dist/send-DmHpf5Fz.js +0 -1
  1242. package/dist/send-NbU9-scF2.js +0 -1
  1243. package/dist/send-hlES-kRl2.js +0 -1
  1244. package/dist/send-swTiQAeK2.js +0 -1
  1245. package/dist/send-vNcod64S.js +0 -1
  1246. package/dist/server-C-lb98FO.js +0 -1
  1247. package/dist/server-DwSkpKgC.js +0 -1
  1248. package/dist/server-node-events-CL0pWoMa.js +0 -1
  1249. package/dist/server-node-events-ChPQ984b.js +0 -1
  1250. package/dist/service-BtB9epJk.js +0 -1
  1251. package/dist/service-DZ9EbS15.js +0 -1
  1252. package/dist/session-BSRnpwSq.js +0 -1
  1253. package/dist/session-CfHCnrXh.js +0 -1
  1254. package/dist/session-JqCxWBM8.js +0 -1
  1255. package/dist/session-bk3gFwO4.js +0 -1
  1256. package/dist/session-cost-usage-BgqKixv0.js +0 -1
  1257. package/dist/session-cost-usage-CHtVgnE8.js +0 -1
  1258. package/dist/session-key-C7F_iqYg.js +0 -1
  1259. package/dist/session-key-D3P0tf5P.js +0 -1
  1260. package/dist/session-utils-Bpdyx2A2.js +0 -1
  1261. package/dist/sessions-Ca6ozRCQ.js +0 -1
  1262. package/dist/shared-9x5sqYRb.js +0 -1
  1263. package/dist/shared-BKWhOp64.js +0 -1
  1264. package/dist/shared-Ca5BFwta.js +0 -1
  1265. package/dist/skill-commands-CPZcaV8-.js +0 -1
  1266. package/dist/skill-commands-CtprBvm0.js +0 -1
  1267. package/dist/skill-commands-DCqPy_Aa.js +0 -1
  1268. package/dist/skill-commands-DlHVddAk.js +0 -1
  1269. package/dist/skill-scanner-CUUF3Fvo.js +0 -1
  1270. package/dist/skill-scanner-CkxXNioD.js +0 -1
  1271. package/dist/skills-Bz_S4lPh.js +0 -1
  1272. package/dist/skills-CzUpDbU-.js +0 -1
  1273. package/dist/skills-cli-DK0QDfln.js +0 -1
  1274. package/dist/skills-cli-DLmqhAB-.js +0 -1
  1275. package/dist/skills-install-D3YB2C-S.js +0 -1
  1276. package/dist/skills-install-cEcqzaX8.js +0 -1
  1277. package/dist/skills-status-D4Y1BJYL.js +0 -1
  1278. package/dist/skills-status-DpSboPY1.js +0 -1
  1279. package/dist/sqlite-CILF3z9U.js +0 -1
  1280. package/dist/stagger-DmFYysrJ.js +0 -1
  1281. package/dist/stagger-DxzgG2jd.js +0 -1
  1282. package/dist/status-BAat65xo.js +0 -1
  1283. package/dist/status-BSHWBrg0.js +0 -1
  1284. package/dist/status-o3Gfr-6l.js +0 -1
  1285. package/dist/status-w4NsjW2R.js +0 -1
  1286. package/dist/status.update-B_8Gumuc.js +0 -1
  1287. package/dist/status.update-_2r0S6Re.js +0 -1
  1288. package/dist/string-normalization-BrUPaXaM.js +0 -1
  1289. package/dist/string-normalization-DJT5zuUF.js +0 -1
  1290. package/dist/subsystem-BLbY429l.js +0 -1
  1291. package/dist/subsystem-Bc2XrjUz.js +0 -1
  1292. package/dist/subsystem-C5XF2Fy5.js +0 -1
  1293. package/dist/system-cli-Ddixb0SQ.js +0 -1
  1294. package/dist/system-cli-NAH97F2s.js +0 -1
  1295. package/dist/system-run-command-DsWBVvSK.js +0 -1
  1296. package/dist/system-run-command-E8ymBXHh.js +0 -1
  1297. package/dist/systemd-D7odsu4K.js +0 -1
  1298. package/dist/systemd-DbevZh65.js +0 -1
  1299. package/dist/systemd-hints-CEQj6yrs.js +0 -1
  1300. package/dist/systemd-hints-lXpMy-kY.js +0 -1
  1301. package/dist/systemd-linger-C2MJD6KG.js +0 -1
  1302. package/dist/systemd-linger-cWKbFNpu.js +0 -1
  1303. package/dist/table-CR7TFMew.js +0 -1
  1304. package/dist/table-CY440fI1.js +0 -1
  1305. package/dist/tables-D6J-isob.js +0 -1
  1306. package/dist/tables-DENKrP-W.js +0 -1
  1307. package/dist/tables-_t5V36m9.js +0 -1
  1308. package/dist/tables-fl9iXahm.js +0 -1
  1309. package/dist/target-errors-CoEHv_2r.js +0 -1
  1310. package/dist/target-errors-D6wejRd6.js +0 -1
  1311. package/dist/target-errors-Dnkqss9y.js +0 -1
  1312. package/dist/target-errors-sMFXKeAY.js +0 -1
  1313. package/dist/targets-4EaxWBal.js +0 -1
  1314. package/dist/targets-BJTo7bqu.js +0 -1
  1315. package/dist/targets-BYVMrXDf.js +0 -1
  1316. package/dist/targets-Bq6rS6-Z.js +0 -1
  1317. package/dist/targets-CL5fYQi7.js +0 -1
  1318. package/dist/targets-fozeWOOg.js +0 -1
  1319. package/dist/targets-m_41k_Mv.js +0 -1
  1320. package/dist/telegram/audit.js +0 -1
  1321. package/dist/text-format-CvrvBBre.js +0 -1
  1322. package/dist/text-format-DEWK6oCT.js +0 -1
  1323. package/dist/token-DnTmiyJu.js +0 -1
  1324. package/dist/tokens-B2fq-rL6.js +0 -1
  1325. package/dist/tokens-CL2fSjGl.js +0 -1
  1326. package/dist/tokens-DRM8vzJx.js +0 -1
  1327. package/dist/tokens-XGbQGn67.js +0 -1
  1328. package/dist/tool-display-DJDtttQg.js +0 -1
  1329. package/dist/tool-display-DjuSUUbH.js +0 -1
  1330. package/dist/tui-5Znjl2Rb.js +0 -1
  1331. package/dist/tui-Tlww_AcE.js +0 -1
  1332. package/dist/tui-cli-C9QPsw50.js +0 -1
  1333. package/dist/tui-cli-FxvETbln.js +0 -1
  1334. package/dist/types.secrets-C-5U96pc.js +0 -1
  1335. package/dist/types.secrets-D4tbc3Wq.js +0 -1
  1336. package/dist/update-CMneH_48.js +0 -1
  1337. package/dist/update-D9EwPybG.js +0 -1
  1338. package/dist/{update-cli-BQGwMpHe.js → update-cli-CL_cUjuq.js} +1 -2
  1339. package/dist/{update-cli-C7pZTXS8.js → update-cli-DU5tRH3c.js} +1 -2
  1340. package/dist/update-runner-DABdlxfN.js +0 -1
  1341. package/dist/update-runner-DG-1TYYc.js +0 -1
  1342. package/dist/usage-format-BWD8FJFL.js +0 -1
  1343. package/dist/usage-format-yPwal8Iz.js +0 -1
  1344. package/dist/utils-CGdo13HV.js +0 -1
  1345. package/dist/utils-D3t-vPka.js +0 -1
  1346. package/dist/utils-R-mFyVJi.js +0 -1
  1347. package/dist/utils-UGOV_184.js +0 -1
  1348. package/dist/version-q3SkUw2K.js +0 -1
  1349. package/dist/warning-filter.js +0 -1
  1350. package/dist/web-Dfi2WjvN.js +0 -1
  1351. package/dist/web-u71NbOpT.js +0 -1
  1352. package/dist/webhooks-cli-DMTzhfTv.js +0 -1
  1353. package/dist/webhooks-cli-ICOwBPSv.js +0 -1
  1354. package/dist/whatsapp-actions-Bdf-3-ne.js +0 -1
  1355. package/dist/whatsapp-actions-D2qMOK3a.js +0 -1
  1356. package/dist/whatsapp-actions-f5CsM5EM.js +0 -1
  1357. package/dist/whatsapp-actions-t88tyNUT.js +0 -1
  1358. package/dist/widearea-dns-BDx7vkV2.js +0 -1
  1359. package/dist/widearea-dns-BFjqKXu_.js +0 -1
  1360. package/dist/windows-spawn-7oINn5ao.js +0 -1
  1361. package/dist/windows-spawn-AB7ItGAE.js +0 -1
  1362. package/dist/with-timeout-WveKxvFV.js +0 -1
  1363. package/dist/with-timeout-c1CzdShT.js +0 -1
  1364. package/dist/workspace-B0ZQeHXg.js +0 -1
  1365. package/dist/workspace-C45T1Cxg.js +0 -1
  1366. package/dist/workspace-dirs-A8Vib9_B.js +0 -1
  1367. package/dist/workspace-dirs-BhF1Dzxt.js +0 -1
  1368. package/dist/workspace-xNEpaJvu.js +0 -1
  1369. package/dist/wsl-DHxB2Ew_.js +0 -1
  1370. package/dist/wsl-Ok7GaSJ6.js +0 -1
  1371. package/extensions/qqbrowser-skill-control/index.js +1 -1
  1372. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
  1373. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  1374. package/node_modules/@google/genai/dist/index.cjs +341 -180
  1375. package/node_modules/@google/genai/dist/index.mjs +341 -180
  1376. package/node_modules/@google/genai/dist/node/index.cjs +341 -180
  1377. package/node_modules/@google/genai/dist/node/index.mjs +341 -180
  1378. package/node_modules/@google/genai/dist/tokenizer/node.cjs +100 -0
  1379. package/node_modules/@google/genai/dist/tokenizer/node.mjs +100 -0
  1380. package/node_modules/@google/genai/dist/vertex_internal/index.cjs +103 -2
  1381. package/node_modules/@google/genai/dist/vertex_internal/index.js +103 -2
  1382. package/node_modules/@google/genai/dist/web/index.mjs +342 -180
  1383. package/node_modules/@google/genai/package.json +1 -1
  1384. package/node_modules/@slack/web-api/dist/instrument.js +13 -1
  1385. package/node_modules/@slack/web-api/package.json +2 -2
  1386. package/node_modules/@smithy/config-resolver/package.json +2 -2
  1387. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  1388. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +154 -61
  1389. package/node_modules/@smithy/util-endpoints/dist-es/bdd/BinaryDecisionDiagram.js +15 -0
  1390. package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +41 -0
  1391. package/node_modules/@smithy/util-endpoints/dist-es/index.js +2 -0
  1392. package/node_modules/@smithy/util-endpoints/dist-es/lib/coalesce.js +8 -0
  1393. package/node_modules/@smithy/util-endpoints/dist-es/lib/index.js +3 -0
  1394. package/node_modules/@smithy/util-endpoints/dist-es/lib/ite.js +3 -0
  1395. package/node_modules/@smithy/util-endpoints/dist-es/lib/split.js +13 -0
  1396. package/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +1 -1
  1397. package/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +4 -1
  1398. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +20 -5
  1399. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +3 -6
  1400. package/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +1 -5
  1401. package/node_modules/@smithy/util-endpoints/package.json +1 -1
  1402. package/node_modules/discord-api-types/package.json +1 -1
  1403. package/node_modules/discord-api-types/payloads/index.mjs +3 -0
  1404. package/node_modules/discord-api-types/payloads/v10/index.mjs +3 -0
  1405. package/node_modules/discord-api-types/payloads/v10/message.js +55 -2
  1406. package/node_modules/discord-api-types/payloads/v10/user.js +2 -0
  1407. package/node_modules/discord-api-types/payloads/v9/index.mjs +3 -0
  1408. package/node_modules/discord-api-types/payloads/v9/message.js +55 -2
  1409. package/node_modules/discord-api-types/payloads/v9/user.js +2 -0
  1410. package/node_modules/discord-api-types/rest/v10/channel.js +6 -0
  1411. package/node_modules/discord-api-types/rest/v9/channel.js +6 -0
  1412. package/node_modules/discord-api-types/v10.mjs +3 -0
  1413. package/node_modules/discord-api-types/v9.mjs +3 -0
  1414. package/node_modules/undici/package.json +1 -1
  1415. package/package.json +2 -1
  1416. package/dist/ports-Dylc6TrH.js +0 -3
  1417. package/dist/ports-hkqQXSus.js +0 -3
  1418. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/LICENSE +0 -22
  1419. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/commander/Readme.md +0 -1157
  1420. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/LICENSE +0 -21
  1421. package/node_modules/@anthropic-ai/sandbox-runtime/node_modules/zod/README.md +0 -208
  1422. package/node_modules/@anthropic-ai/sdk/src/_vendor/partial-json-parser/README.md +0 -3
  1423. package/node_modules/@anthropic-ai/sdk/src/core/README.md +0 -3
  1424. package/node_modules/@anthropic-ai/sdk/src/internal/README.md +0 -3
  1425. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer/LICENSE +0 -201
  1426. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer/README.md +0 -10
  1427. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from/LICENSE +0 -201
  1428. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from/README.md +0 -10
  1429. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8/LICENSE +0 -201
  1430. package/node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8/README.md +0 -4
  1431. package/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/LICENSE +0 -201
  1432. package/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer/README.md +0 -10
  1433. package/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/LICENSE +0 -201
  1434. package/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from/README.md +0 -10
  1435. package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/LICENSE +0 -201
  1436. package/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8/README.md +0 -4
  1437. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +0 -201
  1438. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +0 -62
  1439. package/node_modules/@buape/carbon/node_modules/@discordjs/voice/LICENSE +0 -191
  1440. package/node_modules/@buape/carbon/node_modules/@discordjs/voice/README.md +0 -112
  1441. package/node_modules/@buape/carbon/node_modules/discord-api-types/LICENSE +0 -21
  1442. package/node_modules/@buape/carbon/node_modules/discord-api-types/README.md +0 -102
  1443. package/node_modules/@buape/carbon/node_modules/ws/LICENSE +0 -20
  1444. package/node_modules/@buape/carbon/node_modules/ws/README.md +0 -548
  1445. package/node_modules/@line/bot-sdk/node_modules/@types/node/LICENSE +0 -21
  1446. package/node_modules/@line/bot-sdk/node_modules/@types/node/README.md +0 -15
  1447. package/node_modules/@line/bot-sdk/node_modules/undici-types/LICENSE +0 -21
  1448. package/node_modules/@line/bot-sdk/node_modules/undici-types/README.md +0 -6
  1449. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1450. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/resources/README.md +0 -49
  1451. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-trace-base/LICENSE +0 -201
  1452. package/node_modules/@opentelemetry/exporter-logs-otlp-proto/node_modules/@opentelemetry/sdk-trace-base/README.md +0 -185
  1453. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1454. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/resources/README.md +0 -49
  1455. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/LICENSE +0 -201
  1456. package/node_modules/@opentelemetry/exporter-metrics-otlp-http/node_modules/@opentelemetry/sdk-metrics/README.md +0 -100
  1457. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1458. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/resources/README.md +0 -49
  1459. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-metrics/LICENSE +0 -201
  1460. package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/node_modules/@opentelemetry/sdk-metrics/README.md +0 -100
  1461. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1462. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/resources/README.md +0 -49
  1463. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base/LICENSE +0 -201
  1464. package/node_modules/@opentelemetry/exporter-trace-otlp-proto/node_modules/@opentelemetry/sdk-trace-base/README.md +0 -185
  1465. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1466. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/resources/README.md +0 -49
  1467. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics/LICENSE +0 -201
  1468. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-metrics/README.md +0 -100
  1469. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-trace-base/LICENSE +0 -201
  1470. package/node_modules/@opentelemetry/otlp-transformer/node_modules/@opentelemetry/sdk-trace-base/README.md +0 -185
  1471. package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/LICENSE +0 -201
  1472. package/node_modules/@opentelemetry/resources/node_modules/@opentelemetry/core/README.md +0 -73
  1473. package/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/LICENSE +0 -201
  1474. package/node_modules/@opentelemetry/sdk-logs/node_modules/@opentelemetry/resources/README.md +0 -49
  1475. package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/LICENSE +0 -201
  1476. package/node_modules/@opentelemetry/sdk-metrics/node_modules/@opentelemetry/core/README.md +0 -73
  1477. package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/LICENSE +0 -201
  1478. package/node_modules/@opentelemetry/sdk-trace-base/node_modules/@opentelemetry/core/README.md +0 -73
  1479. package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/LICENSE +0 -201
  1480. package/node_modules/@opentelemetry/sdk-trace-node/node_modules/@opentelemetry/core/README.md +0 -73
  1481. package/node_modules/@sinclair/typebox/license +0 -25
  1482. package/node_modules/@sinclair/typebox/readme.md +0 -1865
  1483. package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/license +0 -9
  1484. package/node_modules/@whiskeysockets/baileys/node_modules/p-queue/readme.md +0 -1077
  1485. package/node_modules/@whiskeysockets/baileys/node_modules/p-timeout/license +0 -9
  1486. package/node_modules/@whiskeysockets/baileys/node_modules/p-timeout/readme.md +0 -192
  1487. package/node_modules/ansi-regex/license +0 -9
  1488. package/node_modules/ansi-regex/readme.md +0 -66
  1489. package/node_modules/ansi-styles/license +0 -9
  1490. package/node_modules/ansi-styles/readme.md +0 -152
  1491. package/node_modules/atomic-sleep/readme.md +0 -58
  1492. package/node_modules/axios/lib/adapters/README.md +0 -36
  1493. package/node_modules/axios/lib/core/README.md +0 -8
  1494. package/node_modules/axios/lib/env/README.md +0 -3
  1495. package/node_modules/axios/lib/helpers/README.md +0 -7
  1496. package/node_modules/bytes/History.md +0 -97
  1497. package/node_modules/bytes/Readme.md +0 -152
  1498. package/node_modules/chalk/license +0 -9
  1499. package/node_modules/chalk/readme.md +0 -297
  1500. package/node_modules/cli-highlight/node_modules/chalk/license +0 -9
  1501. package/node_modules/cli-highlight/node_modules/chalk/readme.md +0 -341
  1502. package/node_modules/cliui/node_modules/ansi-regex/license +0 -9
  1503. package/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
  1504. package/node_modules/cliui/node_modules/strip-ansi/license +0 -9
  1505. package/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
  1506. package/node_modules/combined-stream/License +0 -19
  1507. package/node_modules/combined-stream/Readme.md +0 -138
  1508. package/node_modules/commander/Readme.md +0 -1176
  1509. package/node_modules/cookie-signature/History.md +0 -70
  1510. package/node_modules/cookie-signature/Readme.md +0 -23
  1511. package/node_modules/css-what/readme.md +0 -69
  1512. package/node_modules/delayed-stream/License +0 -19
  1513. package/node_modules/delayed-stream/Readme.md +0 -141
  1514. package/node_modules/depd/History.md +0 -103
  1515. package/node_modules/depd/Readme.md +0 -280
  1516. package/node_modules/domelementtype/readme.md +0 -1
  1517. package/node_modules/domhandler/readme.md +0 -92
  1518. package/node_modules/domutils/readme.md +0 -31
  1519. package/node_modules/entities/readme.md +0 -122
  1520. package/node_modules/escalade/license +0 -9
  1521. package/node_modules/escalade/readme.md +0 -211
  1522. package/node_modules/escape-html/Readme.md +0 -43
  1523. package/node_modules/express/Readme.md +0 -276
  1524. package/node_modules/express-rate-limit/license.md +0 -20
  1525. package/node_modules/express-rate-limit/readme.md +0 -136
  1526. package/node_modules/extract-zip/readme.md +0 -57
  1527. package/node_modules/fast-string-truncated-width/license +0 -21
  1528. package/node_modules/fast-string-truncated-width/readme.md +0 -60
  1529. package/node_modules/fast-string-width/license +0 -21
  1530. package/node_modules/fast-string-width/readme.md +0 -45
  1531. package/node_modules/file-type/license +0 -9
  1532. package/node_modules/file-type/readme.md +0 -667
  1533. package/node_modules/form-data/License +0 -19
  1534. package/node_modules/form-data/node_modules/mime-db/HISTORY.md +0 -507
  1535. package/node_modules/form-data/node_modules/mime-db/LICENSE +0 -23
  1536. package/node_modules/form-data/node_modules/mime-db/README.md +0 -100
  1537. package/node_modules/form-data/node_modules/mime-types/HISTORY.md +0 -397
  1538. package/node_modules/form-data/node_modules/mime-types/LICENSE +0 -23
  1539. package/node_modules/form-data/node_modules/mime-types/README.md +0 -113
  1540. package/node_modules/gaxios/node_modules/agent-base/LICENSE +0 -22
  1541. package/node_modules/gaxios/node_modules/agent-base/README.md +0 -69
  1542. package/node_modules/gaxios/node_modules/https-proxy-agent/LICENSE +0 -22
  1543. package/node_modules/gaxios/node_modules/https-proxy-agent/README.md +0 -70
  1544. package/node_modules/get-east-asian-width/license +0 -9
  1545. package/node_modules/get-east-asian-width/readme.md +0 -65
  1546. package/node_modules/get-stream/license +0 -9
  1547. package/node_modules/get-stream/readme.md +0 -124
  1548. package/node_modules/get-uri/node_modules/data-uri-to-buffer/LICENSE +0 -22
  1549. package/node_modules/get-uri/node_modules/data-uri-to-buffer/README.md +0 -61
  1550. package/node_modules/grammy/node_modules/node-fetch/LICENSE.md +0 -22
  1551. package/node_modules/grammy/node_modules/node-fetch/README.md +0 -634
  1552. package/node_modules/has-flag/license +0 -9
  1553. package/node_modules/has-flag/readme.md +0 -89
  1554. package/node_modules/htmlparser2/node_modules/entities/LICENSE +0 -11
  1555. package/node_modules/htmlparser2/node_modules/entities/readme.md +0 -143
  1556. package/node_modules/http-proxy-agent/node_modules/agent-base/LICENSE +0 -22
  1557. package/node_modules/http-proxy-agent/node_modules/agent-base/README.md +0 -69
  1558. package/node_modules/is-fullwidth-code-point/license +0 -9
  1559. package/node_modules/is-fullwidth-code-point/readme.md +0 -39
  1560. package/node_modules/is-stream/license +0 -9
  1561. package/node_modules/is-stream/readme.md +0 -60
  1562. package/node_modules/jws/readme.md +0 -255
  1563. package/node_modules/libsignal/native/ed25519/sha512/LICENSE.txt +0 -20
  1564. package/node_modules/libsignal/node_modules/@types/node/LICENSE +0 -21
  1565. package/node_modules/libsignal/node_modules/@types/node/README.md +0 -16
  1566. package/node_modules/libsignal/node_modules/long/LICENSE +0 -202
  1567. package/node_modules/libsignal/node_modules/long/README.md +0 -246
  1568. package/node_modules/libsignal/node_modules/protobufjs/LICENSE +0 -39
  1569. package/node_modules/libsignal/node_modules/protobufjs/README.md +0 -879
  1570. package/node_modules/libsignal/node_modules/protobufjs/cli/LICENSE +0 -33
  1571. package/node_modules/libsignal/node_modules/protobufjs/cli/README.md +0 -11
  1572. package/node_modules/libsignal/node_modules/protobufjs/cli/lib/tsd-jsdoc/LICENSE +0 -21
  1573. package/node_modules/libsignal/node_modules/protobufjs/cli/lib/tsd-jsdoc/README.md +0 -23
  1574. package/node_modules/libsignal/node_modules/protobufjs/cli/node_modules/os-tmpdir/license +0 -21
  1575. package/node_modules/libsignal/node_modules/protobufjs/cli/node_modules/os-tmpdir/readme.md +0 -32
  1576. package/node_modules/libsignal/node_modules/protobufjs/cli/node_modules/tmp/LICENSE +0 -21
  1577. package/node_modules/libsignal/node_modules/protobufjs/cli/node_modules/tmp/README.md +0 -314
  1578. package/node_modules/libsignal/node_modules/protobufjs/dist/README.md +0 -31
  1579. package/node_modules/libsignal/node_modules/protobufjs/dist/light/README.md +0 -31
  1580. package/node_modules/libsignal/node_modules/protobufjs/dist/minimal/README.md +0 -31
  1581. package/node_modules/libsignal/node_modules/protobufjs/ext/debug/README.md +0 -4
  1582. package/node_modules/libsignal/node_modules/protobufjs/ext/descriptor/README.md +0 -72
  1583. package/node_modules/libsignal/node_modules/protobufjs/google/LICENSE +0 -27
  1584. package/node_modules/libsignal/node_modules/protobufjs/google/README.md +0 -1
  1585. package/node_modules/lie/license.md +0 -7
  1586. package/node_modules/linkedom/node_modules/html-escaper/LICENSE.txt +0 -19
  1587. package/node_modules/linkedom/node_modules/html-escaper/README.md +0 -110
  1588. package/node_modules/merge-descriptors/license +0 -11
  1589. package/node_modules/merge-descriptors/readme.md +0 -55
  1590. package/node_modules/ms/license.md +0 -21
  1591. package/node_modules/ms/readme.md +0 -59
  1592. package/node_modules/node-edge-tts/node_modules/agent-base/LICENSE +0 -22
  1593. package/node_modules/node-edge-tts/node_modules/agent-base/README.md +0 -69
  1594. package/node_modules/node-edge-tts/node_modules/ansi-regex/license +0 -9
  1595. package/node_modules/node-edge-tts/node_modules/ansi-regex/readme.md +0 -78
  1596. package/node_modules/node-edge-tts/node_modules/cliui/LICENSE.txt +0 -14
  1597. package/node_modules/node-edge-tts/node_modules/cliui/README.md +0 -141
  1598. package/node_modules/node-edge-tts/node_modules/https-proxy-agent/LICENSE +0 -22
  1599. package/node_modules/node-edge-tts/node_modules/https-proxy-agent/README.md +0 -70
  1600. package/node_modules/node-edge-tts/node_modules/strip-ansi/license +0 -9
  1601. package/node_modules/node-edge-tts/node_modules/strip-ansi/readme.md +0 -46
  1602. package/node_modules/node-edge-tts/node_modules/yargs/LICENSE +0 -21
  1603. package/node_modules/node-edge-tts/node_modules/yargs/README.md +0 -204
  1604. package/node_modules/node-edge-tts/node_modules/yargs-parser/LICENSE.txt +0 -14
  1605. package/node_modules/node-edge-tts/node_modules/yargs-parser/README.md +0 -518
  1606. package/node_modules/object-assign/license +0 -21
  1607. package/node_modules/object-assign/readme.md +0 -61
  1608. package/node_modules/object-inspect/readme.markdown +0 -84
  1609. package/node_modules/openai/src/_vendor/partial-json-parser/README.md +0 -3
  1610. package/node_modules/openai/src/_vendor/zod-to-json-schema/LICENSE +0 -15
  1611. package/node_modules/openai/src/_vendor/zod-to-json-schema/README.md +0 -3
  1612. package/node_modules/openai/src/core/README.md +0 -3
  1613. package/node_modules/openai/src/internal/README.md +0 -3
  1614. package/node_modules/openai/src/internal/qs/LICENSE.md +0 -13
  1615. package/node_modules/openai/src/internal/qs/README.md +0 -3
  1616. package/node_modules/p-finally/license +0 -21
  1617. package/node_modules/p-finally/readme.md +0 -47
  1618. package/node_modules/p-queue/license +0 -9
  1619. package/node_modules/p-queue/node_modules/eventemitter3/LICENSE +0 -21
  1620. package/node_modules/p-queue/node_modules/eventemitter3/README.md +0 -94
  1621. package/node_modules/p-queue/readme.md +0 -400
  1622. package/node_modules/p-retry/license +0 -9
  1623. package/node_modules/p-retry/readme.md +0 -148
  1624. package/node_modules/p-timeout/license +0 -9
  1625. package/node_modules/p-timeout/readme.md +0 -87
  1626. package/node_modules/pac-proxy-agent/node_modules/agent-base/LICENSE +0 -22
  1627. package/node_modules/pac-proxy-agent/node_modules/agent-base/README.md +0 -69
  1628. package/node_modules/pac-proxy-agent/node_modules/https-proxy-agent/LICENSE +0 -22
  1629. package/node_modules/pac-proxy-agent/node_modules/https-proxy-agent/README.md +0 -70
  1630. package/node_modules/pako/lib/zlib/README +0 -59
  1631. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/LICENSE +0 -19
  1632. package/node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5/README.md +0 -38
  1633. package/node_modules/path-key/license +0 -9
  1634. package/node_modules/path-key/readme.md +0 -61
  1635. package/node_modules/path-to-regexp/Readme.md +0 -224
  1636. package/node_modules/pino-std-serializers/Readme.md +0 -182
  1637. package/node_modules/process-nextick-args/license.md +0 -19
  1638. package/node_modules/process-nextick-args/readme.md +0 -18
  1639. package/node_modules/proper-lockfile/node_modules/retry/License +0 -21
  1640. package/node_modules/proper-lockfile/node_modules/retry/README.md +0 -227
  1641. package/node_modules/protobufjs/ext/debug/README.md +0 -4
  1642. package/node_modules/protobufjs/ext/descriptor/README.md +0 -72
  1643. package/node_modules/proxy-addr/node_modules/ipaddr.js/LICENSE +0 -19
  1644. package/node_modules/proxy-addr/node_modules/ipaddr.js/README.md +0 -233
  1645. package/node_modules/proxy-agent/node_modules/agent-base/LICENSE +0 -22
  1646. package/node_modules/proxy-agent/node_modules/agent-base/README.md +0 -69
  1647. package/node_modules/proxy-agent/node_modules/https-proxy-agent/LICENSE +0 -22
  1648. package/node_modules/proxy-agent/node_modules/https-proxy-agent/README.md +0 -70
  1649. package/node_modules/proxy-agent/node_modules/lru-cache/LICENSE +0 -15
  1650. package/node_modules/proxy-agent/node_modules/lru-cache/README.md +0 -1117
  1651. package/node_modules/proxy-agent/node_modules/proxy-from-env/LICENSE +0 -20
  1652. package/node_modules/proxy-agent/node_modules/proxy-from-env/README.md +0 -131
  1653. package/node_modules/qified/node_modules/hookified/LICENSE +0 -19
  1654. package/node_modules/qified/node_modules/hookified/README.md +0 -1682
  1655. package/node_modules/quick-format-unescaped/readme.md +0 -66
  1656. package/node_modules/readable-stream/node_modules/safe-buffer/LICENSE +0 -21
  1657. package/node_modules/readable-stream/node_modules/safe-buffer/README.md +0 -584
  1658. package/node_modules/require-from-string/license +0 -21
  1659. package/node_modules/require-from-string/readme.md +0 -56
  1660. package/node_modules/retry/License +0 -21
  1661. package/node_modules/router/node_modules/is-promise/LICENSE +0 -19
  1662. package/node_modules/router/node_modules/is-promise/readme.md +0 -33
  1663. package/node_modules/safe-stable-stringify/readme.md +0 -179
  1664. package/node_modules/safer-buffer/Readme.md +0 -156
  1665. package/node_modules/shebang-command/license +0 -9
  1666. package/node_modules/shebang-command/readme.md +0 -34
  1667. package/node_modules/shebang-regex/license +0 -9
  1668. package/node_modules/shebang-regex/readme.md +0 -33
  1669. package/node_modules/sisteransi/license +0 -21
  1670. package/node_modules/sisteransi/readme.md +0 -113
  1671. package/node_modules/socks-proxy-agent/node_modules/agent-base/LICENSE +0 -22
  1672. package/node_modules/socks-proxy-agent/node_modules/agent-base/README.md +0 -69
  1673. package/node_modules/string-width/license +0 -9
  1674. package/node_modules/string-width/node_modules/ansi-regex/license +0 -9
  1675. package/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -78
  1676. package/node_modules/string-width/node_modules/strip-ansi/license +0 -9
  1677. package/node_modules/string-width/node_modules/strip-ansi/readme.md +0 -46
  1678. package/node_modules/string-width/readme.md +0 -50
  1679. package/node_modules/string_decoder/node_modules/safe-buffer/LICENSE +0 -21
  1680. package/node_modules/string_decoder/node_modules/safe-buffer/README.md +0 -584
  1681. package/node_modules/strip-ansi/license +0 -9
  1682. package/node_modules/strip-ansi/readme.md +0 -37
  1683. package/node_modules/supports-color/license +0 -9
  1684. package/node_modules/supports-color/readme.md +0 -76
  1685. package/node_modules/uint8array-extras/license +0 -9
  1686. package/node_modules/uint8array-extras/readme.md +0 -318
  1687. package/node_modules/undici/lib/web/fetch/LICENSE +0 -21
  1688. package/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
  1689. package/node_modules/util-deprecate/History.md +0 -16
  1690. package/node_modules/wrap-ansi/license +0 -9
  1691. package/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
  1692. package/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
  1693. package/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
  1694. package/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
  1695. package/node_modules/wrap-ansi/readme.md +0 -91
  1696. package/node_modules/yoctocolors/license +0 -9
  1697. package/node_modules/yoctocolors/readme.md +0 -138
  1698. package/node_modules/zod-to-json-schema/changelog.md +0 -83
@@ -1,2 +1 @@
1
1
  import{s as e}from"./call-JB-cGR9n.js";async function t(t){return await e({config:t.config,env:t.env,explicitAuth:t.explicitAuth,urlOverride:t.urlOverride,urlOverrideSource:t.urlOverrideSource,modeOverride:t.modeOverride,includeLegacyEnv:t.includeLegacyEnv,localTokenPrecedence:t.localTokenPrecedence,localPasswordPrecedence:t.localPasswordPrecedence,remoteTokenPrecedence:t.remoteTokenPrecedence,remotePasswordPrecedence:t.remotePasswordPrecedence,remoteTokenFallback:t.remoteTokenFallback,remotePasswordFallback:t.remotePasswordFallback})}export{t};
2
- //# sourceMappingURL=connection-auth-smZlFWxD.js.map
@@ -1,2 +1 @@
1
1
  const e=16e3,t=32e3;function n(e){if(typeof e!=`number`||!Number.isFinite(e))return null;let t=Math.floor(e);return t>0?t:null}function r(e){let t=(()=>{let t=e.cfg?.models?.providers?.[e.provider];return n((Array.isArray(t?.models)?t.models:[]).find(t=>t?.id===e.modelId)?.contextWindow)})(),r=n(e.modelContextWindow),i=t?{tokens:t,source:`modelsConfig`}:r?{tokens:r,source:`model`}:{tokens:Math.floor(e.defaultTokens),source:`default`},a=n(e.cfg?.agents?.defaults?.contextTokens);return a&&a<i.tokens?{tokens:a,source:`agentContextTokens`}:i}function i(e){let t=Math.max(1,Math.floor(e.warnBelowTokens??32e3)),n=Math.max(1,Math.floor(e.hardMinTokens??16e3)),r=Math.max(0,Math.floor(e.info.tokens));return{...e.info,tokens:r,shouldWarn:r>0&&r<t,shouldBlock:r>0&&r<n}}export{r as i,t as n,i as r,e as t};
2
- //# sourceMappingURL=context-window-guard-7crlatf9.js.map
@@ -1,2 +1 @@
1
1
  const e=16e3,t=32e3;function n(e){if(typeof e!=`number`||!Number.isFinite(e))return null;let t=Math.floor(e);return t>0?t:null}function r(e){let t=(()=>{let t=e.cfg?.models?.providers?.[e.provider];return n((Array.isArray(t?.models)?t.models:[]).find(t=>t?.id===e.modelId)?.contextWindow)})(),r=n(e.modelContextWindow),i=t?{tokens:t,source:`modelsConfig`}:r?{tokens:r,source:`model`}:{tokens:Math.floor(e.defaultTokens),source:`default`},a=n(e.cfg?.agents?.defaults?.contextTokens);return a&&a<i.tokens?{tokens:a,source:`agentContextTokens`}:i}function i(e){let t=Math.max(1,Math.floor(e.warnBelowTokens??32e3)),n=Math.max(1,Math.floor(e.hardMinTokens??16e3)),r=Math.max(0,Math.floor(e.info.tokens));return{...e.info,tokens:r,shouldWarn:r>0&&r<t,shouldBlock:r>0&&r<n}}export{r as i,t as n,i as r,e as t};
2
- //# sourceMappingURL=context-window-guard-CPChk363.js.map
@@ -1,2 +1 @@
1
1
  import{p as e}from"./subsystem-C5XF2Fy5.js";import{n as t,t as n}from"./openclaw-root-D_0Q6--h.js";import{t as r}from"./exec-DHqLtFYt.js";import{fileURLToPath as i}from"node:url";import a from"node:fs";import o from"node:path";const s=[`dist`,`control-ui`,`index.html`];function c(e){return o.join(e,...s)}async function l(e={}){let t=e.root?c(e.root):await d({argv1:e.argv1??process.argv[1],moduleUrl:e.moduleUrl});return{indexPath:t,exists:!!(t&&a.existsSync(t))}}function u(e=process.argv[1]){if(!e)return null;let t=o.resolve(e),n=t.split(o.sep),r=n.lastIndexOf(`src`);if(r!==-1){let e=n.slice(0,r).join(o.sep);if(a.existsSync(o.join(e,`ui`,`vite.config.ts`)))return e}let i=o.dirname(t);for(let e=0;e<8;e++){if(a.existsSync(o.join(i,`package.json`))&&a.existsSync(o.join(i,`ui`,`vite.config.ts`)))return i;let e=o.dirname(i);if(e===i)break;i=e}return null}async function d(e){let t=typeof e==`string`?e:e?.argv1??process.argv[1],r=typeof e==`object`?e?.moduleUrl:void 0;if(!t)return null;let i=o.resolve(t),s=[i];try{let e=a.realpathSync(i);e!==i&&s.push(e)}catch{}for(let e of s){let t=o.dirname(e);if(o.basename(t)===`dist`)return o.join(t,`control-ui`,`index.html`)}let c=await n({argv1:i,moduleUrl:r});if(c)return o.join(c,`dist`,`control-ui`,`index.html`);let l=new Set(s.map(e=>o.dirname(e)));for(let e of l){let t=e;for(let e=0;e<8;e++){let e=o.join(t,`package.json`),n=o.join(t,`dist`,`control-ui`,`index.html`);if(a.existsSync(e))try{let t=a.readFileSync(e,`utf-8`);if(JSON.parse(t).name===`openclaw`)return a.existsSync(n)?n:null;break}catch{break}let r=o.dirname(t);if(r===t)break;t=r}}return null}function f(e,t){let n,r;try{n=a.realpathSync(e)}catch{n=o.resolve(e)}try{r=a.realpathSync(t)}catch{r=o.resolve(t)}return n===r}function p(e,t){t&&e.add(o.resolve(t))}function m(e){let t=o.resolve(e);try{let e=a.statSync(t);if(e.isFile())return o.basename(t)===`index.html`?o.dirname(t):null;if(e.isDirectory()){let e=o.join(t,`index.html`);return a.existsSync(e)?t:null}}catch{return null}return null}function h(e={}){let n=new Set,r=e.argv1??process.argv[1],s=e.cwd??process.cwd(),c=e.moduleUrl?o.dirname(i(e.moduleUrl)):null,l=r?o.dirname(o.resolve(r)):null,u=(()=>{if(!r)return null;try{return o.dirname(a.realpathSync(o.resolve(r)))}catch{return null}})(),d=(()=>{try{let t=e.execPath??process.execPath;return o.dirname(a.realpathSync(t))}catch{return null}})(),f=t({argv1:r,moduleUrl:e.moduleUrl,cwd:s});p(n,d?o.join(d,`control-ui`):null),c&&(p(n,o.join(c,`control-ui`)),p(n,o.join(c,`../control-ui`)),p(n,o.join(c,`../../dist/control-ui`))),l&&(p(n,o.join(l,`dist`,`control-ui`)),p(n,o.join(l,`control-ui`))),u&&u!==l&&(p(n,o.join(u,`dist`,`control-ui`)),p(n,o.join(u,`control-ui`))),f&&p(n,o.join(f,`dist`,`control-ui`)),p(n,o.join(s,`dist`,`control-ui`));for(let e of n){let t=o.join(e,`index.html`);if(a.existsSync(t))return e}return null}function g(e,n={}){let r=n.argv1??process.argv[1],i=n.cwd??process.cwd(),a=t({argv1:r,moduleUrl:n.moduleUrl,cwd:i});return a?f(e,o.join(a,`dist`,`control-ui`)):!1}function _(e){let t=e.split(/\r?\n/g).map(e=>e.trim()).filter(Boolean);if(!t.length)return;let n=t.at(-1);if(n)return n.length>240?`${n.slice(0,239)}…`:n}async function v(t=e,n){let i=await l({argv1:process.argv[1]}),s=i.indexPath;if(i.exists)return{ok:!0,built:!1};let d=u(process.argv[1]);if(!d)return{ok:!1,built:!1,message:`${s?`Missing Control UI assets at ${s}`:`Missing Control UI assets`}. Build them with \`pnpm ui:build\` (auto-installs UI deps).`};let f=c(d);if(a.existsSync(f))return{ok:!0,built:!1};let p=o.join(d,`scripts`,`ui.js`);if(!a.existsSync(p))return{ok:!1,built:!1,message:`Control UI assets missing but ${p} is unavailable.`};t.log(`Control UI assets missing; building (ui:build, auto-installs UI deps)…`);let m=await r([process.execPath,p,`build`],{cwd:d,timeoutMs:n?.timeoutMs??10*6e4});return m.code===0?a.existsSync(f)?{ok:!0,built:!0}:{ok:!1,built:!0,message:`Control UI build completed but ${f} is still missing.`}:{ok:!1,built:!1,message:`Control UI build failed: ${_(m.stderr)??`exit ${m.code}`}`}}export{m as a,c as i,g as n,h as o,l as r,v as t};
2
- //# sourceMappingURL=control-ui-assets-BIa0GGDg.js.map
@@ -1,2 +1 @@
1
1
  import{p as e}from"./subsystem-BLbY429l.js";import{n as t,t as n}from"./openclaw-root-CnsBf6ZU.js";import{t as r}from"./exec-B3eleY5O.js";import{fileURLToPath as i}from"node:url";import a from"node:path";import o from"node:fs";const s=[`dist`,`control-ui`,`index.html`];function c(e){return a.join(e,...s)}async function l(e={}){let t=e.root?c(e.root):await d({argv1:e.argv1??process.argv[1],moduleUrl:e.moduleUrl});return{indexPath:t,exists:!!(t&&o.existsSync(t))}}function u(e=process.argv[1]){if(!e)return null;let t=a.resolve(e),n=t.split(a.sep),r=n.lastIndexOf(`src`);if(r!==-1){let e=n.slice(0,r).join(a.sep);if(o.existsSync(a.join(e,`ui`,`vite.config.ts`)))return e}let i=a.dirname(t);for(let e=0;e<8;e++){if(o.existsSync(a.join(i,`package.json`))&&o.existsSync(a.join(i,`ui`,`vite.config.ts`)))return i;let e=a.dirname(i);if(e===i)break;i=e}return null}async function d(e){let t=typeof e==`string`?e:e?.argv1??process.argv[1],r=typeof e==`object`?e?.moduleUrl:void 0;if(!t)return null;let i=a.resolve(t),s=[i];try{let e=o.realpathSync(i);e!==i&&s.push(e)}catch{}for(let e of s){let t=a.dirname(e);if(a.basename(t)===`dist`)return a.join(t,`control-ui`,`index.html`)}let c=await n({argv1:i,moduleUrl:r});if(c)return a.join(c,`dist`,`control-ui`,`index.html`);let l=new Set(s.map(e=>a.dirname(e)));for(let e of l){let t=e;for(let e=0;e<8;e++){let e=a.join(t,`package.json`),n=a.join(t,`dist`,`control-ui`,`index.html`);if(o.existsSync(e))try{let t=o.readFileSync(e,`utf-8`);if(JSON.parse(t).name===`openclaw`)return o.existsSync(n)?n:null;break}catch{break}let r=a.dirname(t);if(r===t)break;t=r}}return null}function f(e,t){let n,r;try{n=o.realpathSync(e)}catch{n=a.resolve(e)}try{r=o.realpathSync(t)}catch{r=a.resolve(t)}return n===r}function p(e,t){t&&e.add(a.resolve(t))}function m(e){let t=a.resolve(e);try{let e=o.statSync(t);if(e.isFile())return a.basename(t)===`index.html`?a.dirname(t):null;if(e.isDirectory()){let e=a.join(t,`index.html`);return o.existsSync(e)?t:null}}catch{return null}return null}function h(e={}){let n=new Set,r=e.argv1??process.argv[1],s=e.cwd??process.cwd(),c=e.moduleUrl?a.dirname(i(e.moduleUrl)):null,l=r?a.dirname(a.resolve(r)):null,u=(()=>{if(!r)return null;try{return a.dirname(o.realpathSync(a.resolve(r)))}catch{return null}})(),d=(()=>{try{let t=e.execPath??process.execPath;return a.dirname(o.realpathSync(t))}catch{return null}})(),f=t({argv1:r,moduleUrl:e.moduleUrl,cwd:s});p(n,d?a.join(d,`control-ui`):null),c&&(p(n,a.join(c,`control-ui`)),p(n,a.join(c,`../control-ui`)),p(n,a.join(c,`../../dist/control-ui`))),l&&(p(n,a.join(l,`dist`,`control-ui`)),p(n,a.join(l,`control-ui`))),u&&u!==l&&(p(n,a.join(u,`dist`,`control-ui`)),p(n,a.join(u,`control-ui`))),f&&p(n,a.join(f,`dist`,`control-ui`)),p(n,a.join(s,`dist`,`control-ui`));for(let e of n){let t=a.join(e,`index.html`);if(o.existsSync(t))return e}return null}function g(e,n={}){let r=n.argv1??process.argv[1],i=n.cwd??process.cwd(),o=t({argv1:r,moduleUrl:n.moduleUrl,cwd:i});return o?f(e,a.join(o,`dist`,`control-ui`)):!1}function _(e){let t=e.split(/\r?\n/g).map(e=>e.trim()).filter(Boolean);if(!t.length)return;let n=t.at(-1);if(n)return n.length>240?`${n.slice(0,239)}…`:n}async function v(t=e,n){let i=await l({argv1:process.argv[1]}),s=i.indexPath;if(i.exists)return{ok:!0,built:!1};let d=u(process.argv[1]);if(!d)return{ok:!1,built:!1,message:`${s?`Missing Control UI assets at ${s}`:`Missing Control UI assets`}. Build them with \`pnpm ui:build\` (auto-installs UI deps).`};let f=c(d);if(o.existsSync(f))return{ok:!0,built:!1};let p=a.join(d,`scripts`,`ui.js`);if(!o.existsSync(p))return{ok:!1,built:!1,message:`Control UI assets missing but ${p} is unavailable.`};t.log(`Control UI assets missing; building (ui:build, auto-installs UI deps)…`);let m=await r([process.execPath,p,`build`],{cwd:d,timeoutMs:n?.timeoutMs??10*6e4});return m.code===0?o.existsSync(f)?{ok:!0,built:!0}:{ok:!1,built:!0,message:`Control UI build completed but ${f} is still missing.`}:{ok:!1,built:!1,message:`Control UI build failed: ${_(m.stderr)??`exit ${m.code}`}`}}export{m as a,c as i,g as n,h as o,l as r,v as t};
2
- //# sourceMappingURL=control-ui-assets-CTHGGgaX.js.map
@@ -1,3 +1,2 @@
1
1
  import{A as e,O as t,k as n,p as r,v as i}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import"./auth-profiles-C8rZRS0X.js";import"./agent-scope-DAWJwFfl.js";import{f as a}from"./session-key-C7F_iqYg.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-Bz_S4lPh.js";import"./frontmatter-C7mzDNxd.js";import{n as o}from"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./call-BWx7hNtl.js";import{i as s,n as c}from"./stagger-DxzgG2jd.js";import{n as l}from"./format-duration-C8AzNqKh.js";import{t as u}from"./links-CBnmRP9D.js";import"./progress-d1m2sqR1.js";import{n as d,t as f}from"./gateway-rpc-C78PzdZR.js";import{n as p}from"./helpers-COz1ghcB.js";const m=()=>[`last`,...o().map(e=>e.id)].join(`|`);function h(e){r.log(JSON.stringify(e,null,2))}function g(e){r.error(i(String(e))),r.exit(1)}async function _(e){try{let t=await d(`cron.status`,e,{});if(t?.enabled===!0)return;let n=typeof t?.storePath==`string`?t.storePath:``;r.error([`warning: cron scheduler is disabled in the Gateway; jobs are saved but will not run automatically.`,"Re-enable with `cron.enabled: true` (or remove `cron.enabled: false`) and restart the Gateway.",n?`store: ${n}`:``].filter(Boolean).join(`
2
2
  `))}catch{}}function v(e){let t=e.trim();if(!t)return null;let n=t.match(/^(\d+(?:\.\d+)?)(ms|s|m|h|d)$/i);if(!n)return null;let r=Number.parseFloat(n[1]??``);if(!Number.isFinite(r)||r<=0)return null;let i=(n[2]??``).toLowerCase(),a=i===`ms`?1:i===`s`?1e3:i===`m`?6e4:i===`h`?36e5:864e5;return Math.floor(r*a)}function y(e){if(e.useExact)return 0;if(!e.staggerRaw)return;let t=v(e.staggerRaw);if(!t)throw Error(`Invalid --stagger; use e.g. 30s, 1m, 5m`);return t}function b(e){let t=e.trim();if(!t)return null;let n=s(t);if(n!==null)return new Date(n).toISOString();let r=v(t);return r===null?null:new Date(Date.now()+r).toISOString()}const x=(e,t)=>e.padEnd(t),S=(e,t)=>e.length<=t?e:t<=3?e.slice(0,t):`${e.slice(0,t-3)}...`,C=e=>{let t=s(e),n=new Date(t??NaN);if(Number.isNaN(n.getTime()))return`-`;let r=n.toISOString();return`${r.slice(0,10)} ${r.slice(11,16)}Z`},w=e=>e<6e4?`<1m`:e<36e5?`${Math.round(e/6e4)}m`:e<864e5?`${Math.round(e/36e5)}h`:`${Math.round(e/864e5)}d`,T=(e,t)=>{if(!e)return`-`;let n=e-t,r=w(Math.abs(n));return n>=0?`in ${r}`:`${r} ago`},E=e=>{if(e.kind===`at`)return`at ${C(e.at)}`;if(e.kind===`every`)return`every ${l(e.everyMs)}`;let t=e.tz?`cron ${e.expr} @ ${e.tz}`:`cron ${e.expr}`,n=c(e);return n<=0?`${t} (exact)`:`${t} (stagger ${l(n)})`},D=e=>e.enabled?e.state.runningAtMs?`running`:e.state.lastStatus??`idle`:`disabled`;function O(i,a=r){if(i.length===0){a.log(`No cron jobs.`);return}let o=n(),s=[x(`ID`,36),x(`Name`,24),x(`Schedule`,32),x(`Next`,10),x(`Last`,10),x(`Status`,9),x(`Target`,9),x(`Agent ID`,10),x(`Model`,20)].join(` `);a.log(o?e.heading(s):s);let c=Date.now();for(let n of i){let r=x(n.id,36),i=x(S(n.name,24),24),s=x(S(E(n.schedule),32),32),l=x(n.enabled?T(n.state.nextRunAtMs,c):`-`,10),u=x(T(n.state.lastRunAtMs,c),10),d=D(n),f=x(d,9),p=x(n.sessionTarget??`-`,9),m=x(S(n.agentId??`-`,10),10),h=x(S((n.payload.kind===`agentTurn`?n.payload.model:void 0)??`-`,20),20),g=d===`ok`?t(o,e.success,f):d===`error`?t(o,e.error,f):d===`running`?t(o,e.warn,f):t(o,e.muted,f),_=n.sessionTarget===`isolated`?t(o,e.accentBright,p):t(o,e.accent,p),v=n.agentId?t(o,e.info,m):t(o,e.muted,m),y=[t(o,e.accent,r),t(o,e.info,i),t(o,e.info,s),t(o,e.muted,l),t(o,e.muted,u),g,_,v,n.payload.kind===`agentTurn`&&n.payload.model?t(o,e.info,h):t(o,e.muted,h)].join(` `);a.log(y.trimEnd())}}function k(e){f(e.command(`status`).description(`Show cron scheduler status`).option(`--json`,`Output JSON`,!1).action(async e=>{try{h(await d(`cron.status`,e,{}))}catch(e){g(e)}}))}function A(e){f(e.command(`list`).description(`List cron jobs`).option(`--all`,`Include disabled jobs`,!1).option(`--json`,`Output JSON`,!1).action(async e=>{try{let t=await d(`cron.list`,e,{includeDisabled:!!e.all});if(e.json){h(t);return}O(t?.jobs??[],r)}catch(e){g(e)}}))}function j(e){f(e.command(`add`).alias(`create`).description(`Add a cron job`).requiredOption(`--name <name>`,`Job name`).option(`--description <text>`,`Optional description`).option(`--disabled`,`Create job disabled`,!1).option(`--delete-after-run`,`Delete one-shot job after it succeeds`,!1).option(`--keep-after-run`,`Keep one-shot job after it succeeds`,!1).option(`--agent <id>`,`Agent id for this job`).option(`--session <target>`,`Session target (main|isolated)`).option(`--session-key <key>`,`Session key for job routing (e.g. agent:my-agent:my-session)`).option(`--wake <mode>`,`Wake mode (now|next-heartbeat)`,`now`).option(`--at <when>`,`Run once at time (ISO) or +duration (e.g. 20m)`).option(`--every <duration>`,`Run every duration (e.g. 10m, 1h)`).option(`--cron <expr>`,`Cron expression (5-field or 6-field with seconds)`).option(`--tz <iana>`,`Timezone for cron expressions (IANA)`,``).option(`--stagger <duration>`,`Cron stagger window (e.g. 30s, 5m)`).option(`--exact`,`Disable cron staggering (set stagger to 0)`,!1).option(`--system-event <text>`,`System event payload (main session)`).option(`--message <text>`,`Agent message payload`).option(`--thinking <level>`,`Thinking level for agent jobs (off|minimal|low|medium|high)`).option(`--model <model>`,`Model override for agent jobs (provider/model or alias)`).option(`--timeout-seconds <n>`,`Timeout seconds for agent jobs`).option(`--light-context`,`Use lightweight bootstrap context for agent jobs`,!1).option(`--announce`,`Announce summary to a chat (subagent-style)`,!1).option(`--deliver`,`Deprecated (use --announce). Announces a summary to a chat.`).option(`--no-deliver`,`Disable announce delivery and skip main-session summary`).option(`--channel <channel>`,`Delivery channel (${m()})`,`last`).option(`--to <dest>`,`Delivery destination (E.164, Telegram chatId, or Discord channel/user)`).option(`--account <id>`,`Channel account id for delivery (multi-account setups)`).option(`--best-effort-deliver`,`Do not fail the job if delivery fails`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{try{let n=typeof e.stagger==`string`?e.stagger.trim():``,r=!!e.exact;if(n&&r)throw Error(`Choose either --stagger or --exact, not both`);let i=(()=>{let t=typeof e.at==`string`?e.at:``,i=typeof e.every==`string`?e.every:``,a=typeof e.cron==`string`?e.cron:``;if([!!t,!!i,!!a].filter(Boolean).length!==1)throw Error(`Choose exactly one schedule: --at, --every, or --cron`);if((r||n)&&!a)throw Error(`--stagger/--exact are only valid with --cron`);if(t){let e=b(t);if(!e)throw Error(`Invalid --at; use ISO time or duration like 20m`);return{kind:`at`,at:e}}if(i){let e=v(i);if(!e)throw Error(`Invalid --every; use e.g. 10m, 1h, 1d`);return{kind:`every`,everyMs:e}}let o=y({staggerRaw:n,useExact:r});return{kind:`cron`,expr:a,tz:typeof e.tz==`string`&&e.tz.trim()?e.tz.trim():void 0,staggerMs:o}})(),o=(typeof e.wake==`string`?e.wake:`now`).trim()||`now`;if(o!==`now`&&o!==`next-heartbeat`)throw Error(`--wake must be now or next-heartbeat`);let s=typeof e.agent==`string`&&e.agent.trim()?a(e.agent.trim()):void 0,c=!!e.announce||e.deliver===!0,l=e.deliver===!1;if([c,l].filter(Boolean).length>1)throw Error(`Choose at most one of --announce or --no-deliver`);let u=(()=>{let t=typeof e.systemEvent==`string`?e.systemEvent.trim():``,n=typeof e.message==`string`?e.message.trim():``;if([!!t,!!n].filter(Boolean).length!==1)throw Error(`Choose exactly one payload: --system-event or --message`);if(t)return{kind:`systemEvent`,text:t};let r=p(e.timeoutSeconds);return{kind:`agentTurn`,message:n,model:typeof e.model==`string`&&e.model.trim()?e.model.trim():void 0,thinking:typeof e.thinking==`string`&&e.thinking.trim()?e.thinking.trim():void 0,timeoutSeconds:r&&Number.isFinite(r)?r:void 0,lightContext:e.lightContext===!0?!0:void 0}})(),f=(typeof t?.getOptionValueSource==`function`?e=>t.getOptionValueSource(e):()=>void 0)(`session`),m=typeof e.session==`string`?e.session.trim():``,g=u.kind===`agentTurn`?`isolated`:`main`,x=f===`cli`?m||``:g;if(x!==`main`&&x!==`isolated`)throw Error(`--session must be main or isolated`);if(e.deleteAfterRun&&e.keepAfterRun)throw Error(`Choose --delete-after-run or --keep-after-run, not both`);if(x===`main`&&u.kind!==`systemEvent`)throw Error(`Main jobs require --system-event (systemEvent).`);if(x===`isolated`&&u.kind!==`agentTurn`)throw Error(`Isolated jobs require --message (agentTurn).`);if((e.announce||typeof e.deliver==`boolean`)&&(x!==`isolated`||u.kind!==`agentTurn`))throw Error(`--announce/--no-deliver require --session isolated.`);let S=typeof e.account==`string`&&e.account.trim()?e.account.trim():void 0;if(S&&(x!==`isolated`||u.kind!==`agentTurn`))throw Error(`--account requires an isolated agentTurn job with delivery.`);let C=x===`isolated`&&u.kind===`agentTurn`?c?`announce`:l?`none`:`announce`:void 0,w=(typeof e.name==`string`?e.name:``).trim();if(!w)throw Error(`--name is required`);let T=typeof e.description==`string`&&e.description.trim()?e.description.trim():void 0,E=typeof e.sessionKey==`string`&&e.sessionKey.trim()?e.sessionKey.trim():void 0;h(await d(`cron.add`,e,{name:w,description:T,enabled:!e.disabled,deleteAfterRun:e.deleteAfterRun?!0:e.keepAfterRun?!1:void 0,agentId:s,sessionKey:E,schedule:i,sessionTarget:x,wakeMode:o,payload:u,delivery:C?{mode:C,channel:typeof e.channel==`string`&&e.channel.trim()?e.channel.trim():void 0,to:typeof e.to==`string`&&e.to.trim()?e.to.trim():void 0,accountId:S,bestEffort:e.bestEffortDeliver?!0:void 0}:void 0})),await _(e)}catch(e){g(e)}}))}const M=(e,t,n,r)=>{r&&(e[t]=n)};function N(e){f(e.command(`edit`).description(`Edit a cron job (patch fields)`).argument(`<id>`,`Job id`).option(`--name <name>`,`Set name`).option(`--description <text>`,`Set description`).option(`--enable`,`Enable job`,!1).option(`--disable`,`Disable job`,!1).option(`--delete-after-run`,`Delete one-shot job after it succeeds`,!1).option(`--keep-after-run`,`Keep one-shot job after it succeeds`,!1).option(`--session <target>`,`Session target (main|isolated)`).option(`--agent <id>`,`Set agent id`).option(`--clear-agent`,`Unset agent and use default`,!1).option(`--session-key <key>`,`Set session key for job routing`).option(`--clear-session-key`,`Unset session key`,!1).option(`--wake <mode>`,`Wake mode (now|next-heartbeat)`).option(`--at <when>`,`Set one-shot time (ISO) or duration like 20m`).option(`--every <duration>`,`Set interval duration like 10m`).option(`--cron <expr>`,`Set cron expression`).option(`--tz <iana>`,`Timezone for cron expressions (IANA)`).option(`--stagger <duration>`,`Cron stagger window (e.g. 30s, 5m)`).option(`--exact`,`Disable cron staggering (set stagger to 0)`).option(`--system-event <text>`,`Set systemEvent payload`).option(`--message <text>`,`Set agentTurn payload message`).option(`--thinking <level>`,`Thinking level for agent jobs`).option(`--model <model>`,`Model override for agent jobs`).option(`--timeout-seconds <n>`,`Timeout seconds for agent jobs`).option(`--light-context`,`Enable lightweight bootstrap context for agent jobs`).option(`--no-light-context`,`Disable lightweight bootstrap context for agent jobs`).option(`--announce`,`Announce summary to a chat (subagent-style)`).option(`--deliver`,`Deprecated (use --announce). Announces a summary to a chat.`).option(`--no-deliver`,`Disable announce delivery`).option(`--channel <channel>`,`Delivery channel (${m()})`).option(`--to <dest>`,`Delivery destination (E.164, Telegram chatId, or Discord channel/user)`).option(`--account <id>`,`Channel account id for delivery (multi-account setups)`).option(`--best-effort-deliver`,`Do not fail job if delivery fails`).option(`--no-best-effort-deliver`,`Fail job when delivery fails`).option(`--failure-alert`,`Enable failure alerts for this job`).option(`--no-failure-alert`,`Disable failure alerts for this job`).option(`--failure-alert-after <n>`,`Alert after N consecutive job errors`).option(`--failure-alert-channel <channel>`,`Failure alert channel (${m()})`).option(`--failure-alert-to <dest>`,`Failure alert destination`).option(`--failure-alert-cooldown <duration>`,`Minimum time between alerts (e.g. 1h, 30m)`).option(`--failure-alert-mode <mode>`,`Failure alert delivery mode (announce or webhook)`).option(`--failure-alert-account-id <id>`,`Account ID for failure alert channel (multi-account setups)`).action(async(e,t)=>{try{if(t.session===`main`&&t.message)throw Error(`Main jobs cannot use --message; use --system-event or --session isolated.`);if(t.session===`isolated`&&t.systemEvent)throw Error(`Isolated jobs cannot use --system-event; use --message or --session main.`);if(t.announce&&typeof t.deliver==`boolean`)throw Error(`Choose --announce or --no-deliver (not multiple).`);let n=typeof t.stagger==`string`?t.stagger.trim():``,i=!!t.exact;if(n&&i)throw Error(`Choose either --stagger or --exact, not both`);let o=y({staggerRaw:n,useExact:i}),s={};if(typeof t.name==`string`&&(s.name=t.name),typeof t.description==`string`&&(s.description=t.description),t.enable&&t.disable)throw Error(`Choose --enable or --disable, not both`);if(t.enable&&(s.enabled=!0),t.disable&&(s.enabled=!1),t.deleteAfterRun&&t.keepAfterRun)throw Error(`Choose --delete-after-run or --keep-after-run, not both`);if(t.deleteAfterRun&&(s.deleteAfterRun=!0),t.keepAfterRun&&(s.deleteAfterRun=!1),typeof t.session==`string`&&(s.sessionTarget=t.session),typeof t.wake==`string`&&(s.wakeMode=t.wake),t.agent&&t.clearAgent)throw Error(`Use --agent or --clear-agent, not both`);if(typeof t.agent==`string`&&t.agent.trim()&&(s.agentId=a(t.agent.trim())),t.clearAgent&&(s.agentId=null),t.sessionKey&&t.clearSessionKey)throw Error(`Use --session-key or --clear-session-key, not both`);if(typeof t.sessionKey==`string`&&t.sessionKey.trim()&&(s.sessionKey=t.sessionKey.trim()),t.clearSessionKey&&(s.sessionKey=null),[t.at,t.every,t.cron].filter(Boolean).length>1)throw Error(`Choose at most one schedule change`);if((o!==void 0||typeof t.tz==`string`)&&(t.at||t.every))throw Error(`--stagger/--exact/--tz are only valid for cron schedules`);if(t.at){let e=b(String(t.at));if(!e)throw Error(`Invalid --at`);s.schedule={kind:`at`,at:e}}else if(t.every){let e=v(String(t.every));if(!e)throw Error(`Invalid --every`);s.schedule={kind:`every`,everyMs:e}}else if(t.cron)s.schedule={kind:`cron`,expr:String(t.cron),tz:typeof t.tz==`string`&&t.tz.trim()?t.tz.trim():void 0,staggerMs:o};else if(o!==void 0||typeof t.tz==`string`){let n=((await d(`cron.list`,t,{includeDisabled:!0}))?.jobs??[]).find(t=>t.id===e);if(!n)throw Error(`unknown cron job id: ${e}`);if(n.schedule.kind!==`cron`)throw Error(`Current job is not a cron schedule; use --cron to convert first`);let r=typeof t.tz==`string`?t.tz.trim()||void 0:n.schedule.tz;s.schedule={kind:`cron`,expr:n.schedule.expr,tz:r,staggerMs:o===void 0?n.schedule.staggerMs:o}}let c=typeof t.systemEvent==`string`,l=typeof t.model==`string`&&t.model.trim()?t.model.trim():void 0,u=typeof t.thinking==`string`&&t.thinking.trim()?t.thinking.trim():void 0,f=t.timeoutSeconds?Number.parseInt(String(t.timeoutSeconds),10):void 0,p=!!(f&&Number.isFinite(f)),m=t.announce||typeof t.deliver==`boolean`,h=typeof t.channel==`string`||typeof t.to==`string`,g=typeof t.account==`string`,x=typeof t.bestEffortDeliver==`boolean`,S=typeof t.message==`string`||!!l||!!u||p||typeof t.lightContext==`boolean`||m||h||g||x;if(c&&S)throw Error(`Choose at most one payload change`);if(c)s.payload={kind:`systemEvent`,text:String(t.systemEvent)};else if(S){let e={kind:`agentTurn`};M(e,`message`,String(t.message),typeof t.message==`string`),M(e,`model`,l,!!l),M(e,`thinking`,u,!!u),M(e,`timeoutSeconds`,f,p),M(e,`lightContext`,t.lightContext,typeof t.lightContext==`boolean`),s.payload=e}if(m||h||g||x){let e={};m?e.mode=t.announce||t.deliver===!0?`announce`:`none`:x&&(e.mode=`announce`),typeof t.channel==`string`&&(e.channel=t.channel.trim()||void 0),typeof t.to==`string`&&(e.to=t.to.trim()||void 0),typeof t.account==`string`&&(e.accountId=t.account.trim()||void 0),typeof t.bestEffortDeliver==`boolean`&&(e.bestEffort=t.bestEffortDeliver),s.delivery=e}let C=typeof t.failureAlertAfter==`string`,w=typeof t.failureAlertChannel==`string`,T=typeof t.failureAlertTo==`string`,E=typeof t.failureAlertCooldown==`string`,D=typeof t.failureAlertMode==`string`,O=typeof t.failureAlertAccountId==`string`,k=C||w||T||E||D||O,A=typeof t.failureAlert==`boolean`?t.failureAlert:void 0;if(A===!1&&k)throw Error(`Use --no-failure-alert alone (without failure-alert-* options).`);if(A===!1)s.failureAlert=!1;else if(A===!0||k){let e={};if(C){let n=Number.parseInt(String(t.failureAlertAfter),10);if(!Number.isFinite(n)||n<=0)throw Error(`Invalid --failure-alert-after (must be a positive integer).`);e.after=n}if(w&&(e.channel=String(t.failureAlertChannel).trim().toLowerCase()||void 0),T&&(e.to=String(t.failureAlertTo).trim()||void 0),E){let n=v(String(t.failureAlertCooldown));if(!n&&n!==0)throw Error(`Invalid --failure-alert-cooldown.`);e.cooldownMs=n}if(D){let n=String(t.failureAlertMode).trim().toLowerCase();if(n!==`announce`&&n!==`webhook`)throw Error(`Invalid --failure-alert-mode (must be 'announce' or 'webhook').`);e.mode=n}O&&(e.accountId=String(t.failureAlertAccountId).trim()||void 0),s.failureAlert=e}let j=await d(`cron.update`,t,{id:e,patch:s});r.log(JSON.stringify(j,null,2)),await _(t)}catch(e){r.error(i(String(e))),r.exit(1)}}))}function P(e){f(e.cron.command(e.name).description(e.description).argument(`<id>`,`Job id`).action(async(t,n)=>{try{h(await d(`cron.update`,n,{id:t,patch:{enabled:e.enabled}})),await _(n)}catch(e){g(e)}}))}function F(e){f(e.command(`rm`).alias(`remove`).alias(`delete`).description(`Remove a cron job`).argument(`<id>`,`Job id`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{try{h(await d(`cron.remove`,t,{id:e}))}catch(e){g(e)}})),P({cron:e,name:`enable`,description:`Enable a cron job`,enabled:!0}),P({cron:e,name:`disable`,description:`Disable a cron job`,enabled:!1}),f(e.command(`runs`).description(`Show cron run history (JSONL-backed)`).requiredOption(`--id <id>`,`Job id`).option(`--limit <n>`,`Max entries (default 50)`,`50`).action(async e=>{try{let t=Number.parseInt(String(e.limit??`50`),10),n=Number.isFinite(t)&&t>0?t:50;h(await d(`cron.runs`,e,{id:String(e.id),limit:n}))}catch(e){g(e)}})),f(e.command(`run`).description(`Run a cron job now (debug)`).argument(`<id>`,`Job id`).option(`--due`,`Run only when due (default behavior in older versions)`,!1).action(async(e,t,n)=>{try{n.getOptionValueSource(`timeout`)===`default`&&(t.timeout=`600000`);let i=await d(`cron.run`,t,{id:e,mode:t.due?`due`:`force`});h(i);let a=i;r.exit(a?.ok&&(a?.ran||a?.enqueued)?0:1)}catch(e){g(e)}}))}function I(t){let n=t.command(`cron`).description(`Manage cron jobs (via Gateway)`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${u(`/cli/cron`,`docs.openclaw.ai/cli/cron`)}\n${e.muted(`Upgrade tip:`)} run \`openclaw doctor --fix\` to normalize legacy cron job storage.\n`);k(n),A(n),j(n),F(n),N(n)}export{I as registerCronCli};
3
- //# sourceMappingURL=cron-cli-BKS4L-uW.js.map
@@ -1,3 +1,2 @@
1
1
  import"./paths-B4IRk3wi.js";import{A as e,O as t,k as n,p as r,v as i}from"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import"./model-selection-BLbnMb5E.js";import"./agent-scope-DXZc3eNT.js";import{f as a}from"./session-key-D3P0tf5P.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-CzUpDbU-.js";import"./frontmatter-BkZkwkVO.js";import{n as o}from"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./call-JB-cGR9n.js";import{n as s}from"./format-duration-D5AMtmHa.js";import{t as c}from"./links-CySwdMcF.js";import"./progress-LNttnI-y.js";import{i as l,n as u}from"./stagger-DmFYysrJ.js";import{n as d}from"./helpers-Cp8gcO6u.js";import{n as f,t as p}from"./gateway-rpc-CecloWA1.js";const m=()=>[`last`,...o().map(e=>e.id)].join(`|`);function h(e){r.log(JSON.stringify(e,null,2))}function g(e){r.error(i(String(e))),r.exit(1)}async function _(e){try{let t=await f(`cron.status`,e,{});if(t?.enabled===!0)return;let n=typeof t?.storePath==`string`?t.storePath:``;r.error([`warning: cron scheduler is disabled in the Gateway; jobs are saved but will not run automatically.`,"Re-enable with `cron.enabled: true` (or remove `cron.enabled: false`) and restart the Gateway.",n?`store: ${n}`:``].filter(Boolean).join(`
2
2
  `))}catch{}}function v(e){let t=e.trim();if(!t)return null;let n=t.match(/^(\d+(?:\.\d+)?)(ms|s|m|h|d)$/i);if(!n)return null;let r=Number.parseFloat(n[1]??``);if(!Number.isFinite(r)||r<=0)return null;let i=(n[2]??``).toLowerCase(),a=i===`ms`?1:i===`s`?1e3:i===`m`?6e4:i===`h`?36e5:864e5;return Math.floor(r*a)}function y(e){if(e.useExact)return 0;if(!e.staggerRaw)return;let t=v(e.staggerRaw);if(!t)throw Error(`Invalid --stagger; use e.g. 30s, 1m, 5m`);return t}function b(e){let t=e.trim();if(!t)return null;let n=l(t);if(n!==null)return new Date(n).toISOString();let r=v(t);return r===null?null:new Date(Date.now()+r).toISOString()}const x=(e,t)=>e.padEnd(t),S=(e,t)=>e.length<=t?e:t<=3?e.slice(0,t):`${e.slice(0,t-3)}...`,C=e=>{let t=l(e),n=new Date(t??NaN);if(Number.isNaN(n.getTime()))return`-`;let r=n.toISOString();return`${r.slice(0,10)} ${r.slice(11,16)}Z`},w=e=>e<6e4?`<1m`:e<36e5?`${Math.round(e/6e4)}m`:e<864e5?`${Math.round(e/36e5)}h`:`${Math.round(e/864e5)}d`,T=(e,t)=>{if(!e)return`-`;let n=e-t,r=w(Math.abs(n));return n>=0?`in ${r}`:`${r} ago`},E=e=>{if(e.kind===`at`)return`at ${C(e.at)}`;if(e.kind===`every`)return`every ${s(e.everyMs)}`;let t=e.tz?`cron ${e.expr} @ ${e.tz}`:`cron ${e.expr}`,n=u(e);return n<=0?`${t} (exact)`:`${t} (stagger ${s(n)})`},D=e=>e.enabled?e.state.runningAtMs?`running`:e.state.lastStatus??`idle`:`disabled`;function O(i,a=r){if(i.length===0){a.log(`No cron jobs.`);return}let o=n(),s=[x(`ID`,36),x(`Name`,24),x(`Schedule`,32),x(`Next`,10),x(`Last`,10),x(`Status`,9),x(`Target`,9),x(`Agent ID`,10),x(`Model`,20)].join(` `);a.log(o?e.heading(s):s);let c=Date.now();for(let n of i){let r=x(n.id,36),i=x(S(n.name,24),24),s=x(S(E(n.schedule),32),32),l=x(n.enabled?T(n.state.nextRunAtMs,c):`-`,10),u=x(T(n.state.lastRunAtMs,c),10),d=D(n),f=x(d,9),p=x(n.sessionTarget??`-`,9),m=x(S(n.agentId??`-`,10),10),h=x(S((n.payload.kind===`agentTurn`?n.payload.model:void 0)??`-`,20),20),g=d===`ok`?t(o,e.success,f):d===`error`?t(o,e.error,f):d===`running`?t(o,e.warn,f):t(o,e.muted,f),_=n.sessionTarget===`isolated`?t(o,e.accentBright,p):t(o,e.accent,p),v=n.agentId?t(o,e.info,m):t(o,e.muted,m),y=[t(o,e.accent,r),t(o,e.info,i),t(o,e.info,s),t(o,e.muted,l),t(o,e.muted,u),g,_,v,n.payload.kind===`agentTurn`&&n.payload.model?t(o,e.info,h):t(o,e.muted,h)].join(` `);a.log(y.trimEnd())}}function k(e){p(e.command(`status`).description(`Show cron scheduler status`).option(`--json`,`Output JSON`,!1).action(async e=>{try{h(await f(`cron.status`,e,{}))}catch(e){g(e)}}))}function A(e){p(e.command(`list`).description(`List cron jobs`).option(`--all`,`Include disabled jobs`,!1).option(`--json`,`Output JSON`,!1).action(async e=>{try{let t=await f(`cron.list`,e,{includeDisabled:!!e.all});if(e.json){h(t);return}O(t?.jobs??[],r)}catch(e){g(e)}}))}function j(e){p(e.command(`add`).alias(`create`).description(`Add a cron job`).requiredOption(`--name <name>`,`Job name`).option(`--description <text>`,`Optional description`).option(`--disabled`,`Create job disabled`,!1).option(`--delete-after-run`,`Delete one-shot job after it succeeds`,!1).option(`--keep-after-run`,`Keep one-shot job after it succeeds`,!1).option(`--agent <id>`,`Agent id for this job`).option(`--session <target>`,`Session target (main|isolated)`).option(`--session-key <key>`,`Session key for job routing (e.g. agent:my-agent:my-session)`).option(`--wake <mode>`,`Wake mode (now|next-heartbeat)`,`now`).option(`--at <when>`,`Run once at time (ISO) or +duration (e.g. 20m)`).option(`--every <duration>`,`Run every duration (e.g. 10m, 1h)`).option(`--cron <expr>`,`Cron expression (5-field or 6-field with seconds)`).option(`--tz <iana>`,`Timezone for cron expressions (IANA)`,``).option(`--stagger <duration>`,`Cron stagger window (e.g. 30s, 5m)`).option(`--exact`,`Disable cron staggering (set stagger to 0)`,!1).option(`--system-event <text>`,`System event payload (main session)`).option(`--message <text>`,`Agent message payload`).option(`--thinking <level>`,`Thinking level for agent jobs (off|minimal|low|medium|high)`).option(`--model <model>`,`Model override for agent jobs (provider/model or alias)`).option(`--timeout-seconds <n>`,`Timeout seconds for agent jobs`).option(`--light-context`,`Use lightweight bootstrap context for agent jobs`,!1).option(`--announce`,`Announce summary to a chat (subagent-style)`,!1).option(`--deliver`,`Deprecated (use --announce). Announces a summary to a chat.`).option(`--no-deliver`,`Disable announce delivery and skip main-session summary`).option(`--channel <channel>`,`Delivery channel (${m()})`,`last`).option(`--to <dest>`,`Delivery destination (E.164, Telegram chatId, or Discord channel/user)`).option(`--account <id>`,`Channel account id for delivery (multi-account setups)`).option(`--best-effort-deliver`,`Do not fail the job if delivery fails`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{try{let n=typeof e.stagger==`string`?e.stagger.trim():``,r=!!e.exact;if(n&&r)throw Error(`Choose either --stagger or --exact, not both`);let i=(()=>{let t=typeof e.at==`string`?e.at:``,i=typeof e.every==`string`?e.every:``,a=typeof e.cron==`string`?e.cron:``;if([!!t,!!i,!!a].filter(Boolean).length!==1)throw Error(`Choose exactly one schedule: --at, --every, or --cron`);if((r||n)&&!a)throw Error(`--stagger/--exact are only valid with --cron`);if(t){let e=b(t);if(!e)throw Error(`Invalid --at; use ISO time or duration like 20m`);return{kind:`at`,at:e}}if(i){let e=v(i);if(!e)throw Error(`Invalid --every; use e.g. 10m, 1h, 1d`);return{kind:`every`,everyMs:e}}let o=y({staggerRaw:n,useExact:r});return{kind:`cron`,expr:a,tz:typeof e.tz==`string`&&e.tz.trim()?e.tz.trim():void 0,staggerMs:o}})(),o=(typeof e.wake==`string`?e.wake:`now`).trim()||`now`;if(o!==`now`&&o!==`next-heartbeat`)throw Error(`--wake must be now or next-heartbeat`);let s=typeof e.agent==`string`&&e.agent.trim()?a(e.agent.trim()):void 0,c=!!e.announce||e.deliver===!0,l=e.deliver===!1;if([c,l].filter(Boolean).length>1)throw Error(`Choose at most one of --announce or --no-deliver`);let u=(()=>{let t=typeof e.systemEvent==`string`?e.systemEvent.trim():``,n=typeof e.message==`string`?e.message.trim():``;if([!!t,!!n].filter(Boolean).length!==1)throw Error(`Choose exactly one payload: --system-event or --message`);if(t)return{kind:`systemEvent`,text:t};let r=d(e.timeoutSeconds);return{kind:`agentTurn`,message:n,model:typeof e.model==`string`&&e.model.trim()?e.model.trim():void 0,thinking:typeof e.thinking==`string`&&e.thinking.trim()?e.thinking.trim():void 0,timeoutSeconds:r&&Number.isFinite(r)?r:void 0,lightContext:e.lightContext===!0?!0:void 0}})(),p=(typeof t?.getOptionValueSource==`function`?e=>t.getOptionValueSource(e):()=>void 0)(`session`),m=typeof e.session==`string`?e.session.trim():``,g=u.kind===`agentTurn`?`isolated`:`main`,x=p===`cli`?m||``:g;if(x!==`main`&&x!==`isolated`)throw Error(`--session must be main or isolated`);if(e.deleteAfterRun&&e.keepAfterRun)throw Error(`Choose --delete-after-run or --keep-after-run, not both`);if(x===`main`&&u.kind!==`systemEvent`)throw Error(`Main jobs require --system-event (systemEvent).`);if(x===`isolated`&&u.kind!==`agentTurn`)throw Error(`Isolated jobs require --message (agentTurn).`);if((e.announce||typeof e.deliver==`boolean`)&&(x!==`isolated`||u.kind!==`agentTurn`))throw Error(`--announce/--no-deliver require --session isolated.`);let S=typeof e.account==`string`&&e.account.trim()?e.account.trim():void 0;if(S&&(x!==`isolated`||u.kind!==`agentTurn`))throw Error(`--account requires an isolated agentTurn job with delivery.`);let C=x===`isolated`&&u.kind===`agentTurn`?c?`announce`:l?`none`:`announce`:void 0,w=(typeof e.name==`string`?e.name:``).trim();if(!w)throw Error(`--name is required`);let T=typeof e.description==`string`&&e.description.trim()?e.description.trim():void 0,E=typeof e.sessionKey==`string`&&e.sessionKey.trim()?e.sessionKey.trim():void 0;h(await f(`cron.add`,e,{name:w,description:T,enabled:!e.disabled,deleteAfterRun:e.deleteAfterRun?!0:e.keepAfterRun?!1:void 0,agentId:s,sessionKey:E,schedule:i,sessionTarget:x,wakeMode:o,payload:u,delivery:C?{mode:C,channel:typeof e.channel==`string`&&e.channel.trim()?e.channel.trim():void 0,to:typeof e.to==`string`&&e.to.trim()?e.to.trim():void 0,accountId:S,bestEffort:e.bestEffortDeliver?!0:void 0}:void 0})),await _(e)}catch(e){g(e)}}))}const M=(e,t,n,r)=>{r&&(e[t]=n)};function N(e){p(e.command(`edit`).description(`Edit a cron job (patch fields)`).argument(`<id>`,`Job id`).option(`--name <name>`,`Set name`).option(`--description <text>`,`Set description`).option(`--enable`,`Enable job`,!1).option(`--disable`,`Disable job`,!1).option(`--delete-after-run`,`Delete one-shot job after it succeeds`,!1).option(`--keep-after-run`,`Keep one-shot job after it succeeds`,!1).option(`--session <target>`,`Session target (main|isolated)`).option(`--agent <id>`,`Set agent id`).option(`--clear-agent`,`Unset agent and use default`,!1).option(`--session-key <key>`,`Set session key for job routing`).option(`--clear-session-key`,`Unset session key`,!1).option(`--wake <mode>`,`Wake mode (now|next-heartbeat)`).option(`--at <when>`,`Set one-shot time (ISO) or duration like 20m`).option(`--every <duration>`,`Set interval duration like 10m`).option(`--cron <expr>`,`Set cron expression`).option(`--tz <iana>`,`Timezone for cron expressions (IANA)`).option(`--stagger <duration>`,`Cron stagger window (e.g. 30s, 5m)`).option(`--exact`,`Disable cron staggering (set stagger to 0)`).option(`--system-event <text>`,`Set systemEvent payload`).option(`--message <text>`,`Set agentTurn payload message`).option(`--thinking <level>`,`Thinking level for agent jobs`).option(`--model <model>`,`Model override for agent jobs`).option(`--timeout-seconds <n>`,`Timeout seconds for agent jobs`).option(`--light-context`,`Enable lightweight bootstrap context for agent jobs`).option(`--no-light-context`,`Disable lightweight bootstrap context for agent jobs`).option(`--announce`,`Announce summary to a chat (subagent-style)`).option(`--deliver`,`Deprecated (use --announce). Announces a summary to a chat.`).option(`--no-deliver`,`Disable announce delivery`).option(`--channel <channel>`,`Delivery channel (${m()})`).option(`--to <dest>`,`Delivery destination (E.164, Telegram chatId, or Discord channel/user)`).option(`--account <id>`,`Channel account id for delivery (multi-account setups)`).option(`--best-effort-deliver`,`Do not fail job if delivery fails`).option(`--no-best-effort-deliver`,`Fail job when delivery fails`).option(`--failure-alert`,`Enable failure alerts for this job`).option(`--no-failure-alert`,`Disable failure alerts for this job`).option(`--failure-alert-after <n>`,`Alert after N consecutive job errors`).option(`--failure-alert-channel <channel>`,`Failure alert channel (${m()})`).option(`--failure-alert-to <dest>`,`Failure alert destination`).option(`--failure-alert-cooldown <duration>`,`Minimum time between alerts (e.g. 1h, 30m)`).option(`--failure-alert-mode <mode>`,`Failure alert delivery mode (announce or webhook)`).option(`--failure-alert-account-id <id>`,`Account ID for failure alert channel (multi-account setups)`).action(async(e,t)=>{try{if(t.session===`main`&&t.message)throw Error(`Main jobs cannot use --message; use --system-event or --session isolated.`);if(t.session===`isolated`&&t.systemEvent)throw Error(`Isolated jobs cannot use --system-event; use --message or --session main.`);if(t.announce&&typeof t.deliver==`boolean`)throw Error(`Choose --announce or --no-deliver (not multiple).`);let n=typeof t.stagger==`string`?t.stagger.trim():``,i=!!t.exact;if(n&&i)throw Error(`Choose either --stagger or --exact, not both`);let o=y({staggerRaw:n,useExact:i}),s={};if(typeof t.name==`string`&&(s.name=t.name),typeof t.description==`string`&&(s.description=t.description),t.enable&&t.disable)throw Error(`Choose --enable or --disable, not both`);if(t.enable&&(s.enabled=!0),t.disable&&(s.enabled=!1),t.deleteAfterRun&&t.keepAfterRun)throw Error(`Choose --delete-after-run or --keep-after-run, not both`);if(t.deleteAfterRun&&(s.deleteAfterRun=!0),t.keepAfterRun&&(s.deleteAfterRun=!1),typeof t.session==`string`&&(s.sessionTarget=t.session),typeof t.wake==`string`&&(s.wakeMode=t.wake),t.agent&&t.clearAgent)throw Error(`Use --agent or --clear-agent, not both`);if(typeof t.agent==`string`&&t.agent.trim()&&(s.agentId=a(t.agent.trim())),t.clearAgent&&(s.agentId=null),t.sessionKey&&t.clearSessionKey)throw Error(`Use --session-key or --clear-session-key, not both`);if(typeof t.sessionKey==`string`&&t.sessionKey.trim()&&(s.sessionKey=t.sessionKey.trim()),t.clearSessionKey&&(s.sessionKey=null),[t.at,t.every,t.cron].filter(Boolean).length>1)throw Error(`Choose at most one schedule change`);if((o!==void 0||typeof t.tz==`string`)&&(t.at||t.every))throw Error(`--stagger/--exact/--tz are only valid for cron schedules`);if(t.at){let e=b(String(t.at));if(!e)throw Error(`Invalid --at`);s.schedule={kind:`at`,at:e}}else if(t.every){let e=v(String(t.every));if(!e)throw Error(`Invalid --every`);s.schedule={kind:`every`,everyMs:e}}else if(t.cron)s.schedule={kind:`cron`,expr:String(t.cron),tz:typeof t.tz==`string`&&t.tz.trim()?t.tz.trim():void 0,staggerMs:o};else if(o!==void 0||typeof t.tz==`string`){let n=((await f(`cron.list`,t,{includeDisabled:!0}))?.jobs??[]).find(t=>t.id===e);if(!n)throw Error(`unknown cron job id: ${e}`);if(n.schedule.kind!==`cron`)throw Error(`Current job is not a cron schedule; use --cron to convert first`);let r=typeof t.tz==`string`?t.tz.trim()||void 0:n.schedule.tz;s.schedule={kind:`cron`,expr:n.schedule.expr,tz:r,staggerMs:o===void 0?n.schedule.staggerMs:o}}let c=typeof t.systemEvent==`string`,l=typeof t.model==`string`&&t.model.trim()?t.model.trim():void 0,u=typeof t.thinking==`string`&&t.thinking.trim()?t.thinking.trim():void 0,d=t.timeoutSeconds?Number.parseInt(String(t.timeoutSeconds),10):void 0,p=!!(d&&Number.isFinite(d)),m=t.announce||typeof t.deliver==`boolean`,h=typeof t.channel==`string`||typeof t.to==`string`,g=typeof t.account==`string`,x=typeof t.bestEffortDeliver==`boolean`,S=typeof t.message==`string`||!!l||!!u||p||typeof t.lightContext==`boolean`||m||h||g||x;if(c&&S)throw Error(`Choose at most one payload change`);if(c)s.payload={kind:`systemEvent`,text:String(t.systemEvent)};else if(S){let e={kind:`agentTurn`};M(e,`message`,String(t.message),typeof t.message==`string`),M(e,`model`,l,!!l),M(e,`thinking`,u,!!u),M(e,`timeoutSeconds`,d,p),M(e,`lightContext`,t.lightContext,typeof t.lightContext==`boolean`),s.payload=e}if(m||h||g||x){let e={};m?e.mode=t.announce||t.deliver===!0?`announce`:`none`:x&&(e.mode=`announce`),typeof t.channel==`string`&&(e.channel=t.channel.trim()||void 0),typeof t.to==`string`&&(e.to=t.to.trim()||void 0),typeof t.account==`string`&&(e.accountId=t.account.trim()||void 0),typeof t.bestEffortDeliver==`boolean`&&(e.bestEffort=t.bestEffortDeliver),s.delivery=e}let C=typeof t.failureAlertAfter==`string`,w=typeof t.failureAlertChannel==`string`,T=typeof t.failureAlertTo==`string`,E=typeof t.failureAlertCooldown==`string`,D=typeof t.failureAlertMode==`string`,O=typeof t.failureAlertAccountId==`string`,k=C||w||T||E||D||O,A=typeof t.failureAlert==`boolean`?t.failureAlert:void 0;if(A===!1&&k)throw Error(`Use --no-failure-alert alone (without failure-alert-* options).`);if(A===!1)s.failureAlert=!1;else if(A===!0||k){let e={};if(C){let n=Number.parseInt(String(t.failureAlertAfter),10);if(!Number.isFinite(n)||n<=0)throw Error(`Invalid --failure-alert-after (must be a positive integer).`);e.after=n}if(w&&(e.channel=String(t.failureAlertChannel).trim().toLowerCase()||void 0),T&&(e.to=String(t.failureAlertTo).trim()||void 0),E){let n=v(String(t.failureAlertCooldown));if(!n&&n!==0)throw Error(`Invalid --failure-alert-cooldown.`);e.cooldownMs=n}if(D){let n=String(t.failureAlertMode).trim().toLowerCase();if(n!==`announce`&&n!==`webhook`)throw Error(`Invalid --failure-alert-mode (must be 'announce' or 'webhook').`);e.mode=n}O&&(e.accountId=String(t.failureAlertAccountId).trim()||void 0),s.failureAlert=e}let j=await f(`cron.update`,t,{id:e,patch:s});r.log(JSON.stringify(j,null,2)),await _(t)}catch(e){r.error(i(String(e))),r.exit(1)}}))}function P(e){p(e.cron.command(e.name).description(e.description).argument(`<id>`,`Job id`).action(async(t,n)=>{try{h(await f(`cron.update`,n,{id:t,patch:{enabled:e.enabled}})),await _(n)}catch(e){g(e)}}))}function F(e){p(e.command(`rm`).alias(`remove`).alias(`delete`).description(`Remove a cron job`).argument(`<id>`,`Job id`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{try{h(await f(`cron.remove`,t,{id:e}))}catch(e){g(e)}})),P({cron:e,name:`enable`,description:`Enable a cron job`,enabled:!0}),P({cron:e,name:`disable`,description:`Disable a cron job`,enabled:!1}),p(e.command(`runs`).description(`Show cron run history (JSONL-backed)`).requiredOption(`--id <id>`,`Job id`).option(`--limit <n>`,`Max entries (default 50)`,`50`).action(async e=>{try{let t=Number.parseInt(String(e.limit??`50`),10),n=Number.isFinite(t)&&t>0?t:50;h(await f(`cron.runs`,e,{id:String(e.id),limit:n}))}catch(e){g(e)}})),p(e.command(`run`).description(`Run a cron job now (debug)`).argument(`<id>`,`Job id`).option(`--due`,`Run only when due (default behavior in older versions)`,!1).action(async(e,t,n)=>{try{n.getOptionValueSource(`timeout`)===`default`&&(t.timeout=`600000`);let i=await f(`cron.run`,t,{id:e,mode:t.due?`due`:`force`});h(i);let a=i;r.exit(a?.ok&&(a?.ran||a?.enqueued)?0:1)}catch(e){g(e)}}))}function I(t){let n=t.command(`cron`).description(`Manage cron jobs (via Gateway)`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${c(`/cli/cron`,`docs.openclaw.ai/cli/cron`)}\n${e.muted(`Upgrade tip:`)} run \`openclaw doctor --fix\` to normalize legacy cron job storage.\n`);k(n),A(n),j(n),F(n),N(n)}export{I as registerCronCli};
3
- //# sourceMappingURL=cron-cli-L9wLLocl.js.map
@@ -1,2 +1 @@
1
1
  import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{d as t,g as n,o as r,u as i}from"./paths-B4IRk3wi.js";import{A as a,N as o,O as s,k as c,p as l}from"./subsystem-C5XF2Fy5.js";import{C as u,S as d}from"./utils-UGOV_184.js";import{Co as f,Eo as p,Si as m,Ws as h,Xs as g,co as _,da as v,sa as y,ua as b,xi as x}from"./model-selection-BLbnMb5E.js";import{t as S}from"./command-format-BbDT1tlm.js";import{i as ee}from"./parse-finite-number-DqzUM-_s.js";import{r as C}from"./commands-CGpM84iR.js";import{ln as te,n as w}from"./call-JB-cGR9n.js";import{r as T}from"./wsl-Ok7GaSJ6.js";import{d as ne,f as re}from"./restart-BeJuoXCx.js";import{g as ie}from"./onboard-helpers-D90u4wVK.js";import{t as ae}from"./links-CySwdMcF.js";import{n as oe}from"./progress-LNttnI-y.js";import{p as se,u as ce}from"./arg-split-DE5RqDHq.js";import{t as le}from"./cmd-argv-BBT5l8AV.js";import{n as E}from"./command-options-Bq5nQxz6.js";import{t as D}from"./issue-format-BtMzMXtZ.js";import{n as ue,t as de}from"./gateway-install-token-Dt7hDXoR.js";import{r as fe,t as pe}from"./daemon-runtime-DHiDbRuC.js";import{n as me}from"./systemd-D7odsu4K.js";import{c as he,n as O}from"./service-BtB9epJk.js";import{a as ge,c as k,d as A,f as _e,g as ve,h as ye,i as be,l as xe,m as Se,n as Ce,o as we,p as Te,r as Ee,s as De,t as Oe,u as j}from"./lifecycle-core-B1nrgJCw.js";import{i as ke,n as Ae,t as je,u as Me}from"./systemd-hints-CEQj6yrs.js";import{t as Ne}from"./parse-port-Bv1Y9Wk5.js";import{n as Pe,r as M}from"./probe-auth-x4OHS_wa.js";import{t as Fe}from"./diagnostics-BgbeL9KE.js";import{n as Ie,t as Le}from"./inspect-BKV-I1UE.js";import Re from"node:fs";import{spawnSync as N}from"node:child_process";async function P(e){let n=!!e.json,{stdout:r,warnings:a,emit:o,fail:s}=ye({action:`install`,json:n});if(t(process.env)){s(`Nix mode detected; service install is disabled.`);return}let c=await g(),u=Ne(e.port);if(e.port!==void 0&&u===null){s(`Invalid port`);return}let d=u??i(c);if(!Number.isFinite(d)||d<=0){s(`Invalid port`);return}let f=e.runtime?String(e.runtime):pe;if(!fe(f)){s(`Invalid --runtime (use "node" or "bun")`);return}let p=O(),m=!1;try{m=await p.isLoaded({env:process.env})}catch(e){if(me(e))m=!1;else{s(`Gateway service check failed: ${String(e)}`);return}}if(m&&!e.force){o({ok:!0,result:`already-installed`,message:`Gateway service already ${p.loadedText}.`,service:Se(p,m)}),n||(l.log(`Gateway service already ${p.loadedText}.`),l.log(`Reinstall with: ${S(`openclaw gateway install --force`)}`));return}let h=await de({config:c,env:process.env,explicitToken:e.token,autoGenerateWhenMissing:!0,persistGeneratedToken:!0});if(h.unavailableReason){s(`Gateway install blocked: ${h.unavailableReason}`);return}for(let e of h.warnings)n?a.push(e):l.log(e);let{programArguments:_,workingDirectory:v,environment:y}=await ue({env:process.env,port:d,runtime:f,warn:e=>{n?a.push(e):l.log(e)},config:c});await ve({serviceNoun:`Gateway`,service:p,warnings:a,emit:o,fail:s,install:async()=>{await p.install({env:process.env,stdout:r,programArguments:_,workingDirectory:v,environment:y})}})}function ze(e){return e.replaceAll(`\\`,`/`).toLowerCase()}function F(e){return e.split(`\0`).map(e=>e.trim()).filter(Boolean)}function I(e,t){let n=e.map(ze);if(!n.includes(`gateway`))return!1;let r=[`dist/index.js`,`dist/entry.js`,`openclaw.mjs`,`scripts/run-node.mjs`,`src/index.ts`];if(n.some(e=>r.some(t=>e.endsWith(t))))return!0;let i=(n[0]??``).replace(/\.(bat|cmd|exe)$/i,``);return i.endsWith(`/openclaw`)||i===`openclaw`||t?.allowGatewayBinary===!0&&i.endsWith(`/openclaw-gateway`)}function Be(e){return e.status!==`busy`||e.listeners.length>0?!1:e.errors?.length?!0:e.hints.some(e=>e.includes(`process details are unavailable`))}function L(e){return e.listener.pid===e.runtimePid||e.listener.ppid===e.runtimePid}function Ve(e,t){if(e!==1008)return!1;let n=(t??``).toLowerCase();return n.includes(`auth`)||n.includes(`token`)||n.includes(`password`)||n.includes(`scope`)||n.includes(`role`)}async function R(e){let t=process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,n=process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0,r=await M({url:`ws://127.0.0.1:${e}`,auth:t||n?{token:t,password:n}:void 0,timeoutMs:1e3});return r.ok||Ve(r.close?.code,r.close?.reason)}async function z(e){let t;try{t=await y(e)}catch(n){t={port:e,status:`unknown`,listeners:[],hints:[],errors:[String(n)]}}let n=!1;if(t.status===`busy`)try{n=await R(e)}catch{}return{portUsage:t,healthy:n}}async function B(e){let t=e.env??process.env,n={status:`unknown`};try{n=await e.service.readRuntime(t)}catch(e){n={status:`unknown`,detail:String(e)}}let r;try{r=await y(e.port)}catch(t){r={port:e.port,status:`unknown`,listeners:[],hints:[],errors:[String(t)]}}let i=r.status===`busy`?r.listeners.filter(t=>b(t,e.port)===`gateway`):[],a=e.includeUnknownListenersAsStale&&process.platform===`win32`&&n.status!==`running`&&r.status===`busy`?r.listeners.filter(t=>b(t,e.port)===`unknown`).map(e=>e.pid).filter(e=>Number.isFinite(e)):[],o=n.status===`running`,s=n.pid,c=Be(r),l=s==null?i.length>0||c:r.listeners.some(e=>L({listener:e,runtimePid:s}))||c,u=o&&l;if(!u&&o&&r.status===`busy`)try{u=await R(e.port)}catch{}let d=Array.from(new Set([...i.filter(e=>Number.isFinite(e.pid)).filter(e=>!o||s==null?!0:!L({listener:e,runtimePid:s})).map(e=>e.pid),...a.filter(e=>n.pid==null||e!==n.pid||!o)]));return{runtime:n,portUsage:r,healthy:u,staleGatewayPids:d}}async function V(e){let t=e.attempts??120,n=e.delayMs??500,r=await B({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale});for(let i=0;i<t;i+=1){if(r.healthy||r.staleGatewayPids.length>0&&r.runtime.status!==`running`)return r;await u(n),r=await B({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale})}return r}async function He(e){let t=e.attempts??120,n=e.delayMs??500,r=await z(e.port);for(let i=0;i<t;i+=1){if(r.healthy)return r;await u(n),r=await z(e.port)}return r}function H(e){let t=[];return e.portUsage.status===`busy`?t.push(...v(e.portUsage)):t.push(`Gateway port ${e.portUsage.port} status: ${e.portUsage.status}.`),e.portUsage.errors?.length&&t.push(`Port diagnostics errors: ${e.portUsage.errors.join(`; `)}`),t}function U(e){let t=[],n=[e.runtime.status?`status=${e.runtime.status}`:null,e.runtime.state?`state=${e.runtime.state}`:null,e.runtime.pid==null?null:`pid=${e.runtime.pid}`,e.runtime.lastExitStatus==null?null:`lastExit=${e.runtime.lastExitStatus}`].filter(Boolean).join(`, `);return n&&t.push(`Service runtime: ${n}`),t.push(...H(e)),t}function Ue(e){return H(e)}async function W(e){let t=Array.from(new Set(e.filter(e=>Number.isFinite(e)&&e>0)));for(let e of t)re(e,{graceMs:300});return t.length>0&&await u(500),t}async function G(e=O()){let t=await e.readCommand(process.env).catch(()=>null),n=t?.environment??void 0,r={...process.env,...n??void 0};return k(t?.programArguments)??i(await g(),r)}function We(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);for(let e of t)if(e.toLowerCase().startsWith(`commandline=`))return e.slice(12).trim()||null;return t.find(e=>e.toLowerCase()!==`commandline`)??null}function K(e){if(process.platform===`linux`)try{return F(Re.readFileSync(`/proc/${e}/cmdline`,`utf8`))}catch{return null}if(process.platform===`darwin`){let t=N(`ps`,[`-o`,`command=`,`-p`,String(e)],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=t.stdout.trim();return n?n.split(/\s+/):null}if(process.platform===`win32`){let t=N(`wmic`,[`process`,`where`,`ProcessId=${e}`,`get`,`CommandLine`,`/value`],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=We(t.stdout);return n?le(n):null}return null}function Ge(e){return Array.from(new Set(ne(e))).filter(e=>Number.isFinite(e)&&e>0).filter(e=>{let t=K(e);return t!=null&&I(t,{allowGatewayBinary:!0})})}function q(){return g().then(e=>i(e,process.env)).catch(()=>i(void 0,process.env))}function J(e,t){let n=K(e);if(!n||!I(n,{allowGatewayBinary:!0}))throw Error(`refusing to signal non-gateway process pid ${e}`);process.kill(e,t)}function Y(e){return e.join(`, `)}async function Ke(e){let t=await M({url:`ws://127.0.0.1:${e}`,auth:{token:process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,password:process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0},timeoutMs:1e3}).catch(()=>null);if(t?.ok&&!C(t.configSnapshot))throw Error(`Gateway restart is disabled in the running gateway config (commands.restart=false); unmanaged SIGUSR1 restart would be ignored`)}function X(e){return Ge(e).filter(e=>Number.isFinite(e)&&e>0)}async function qe(e){let t=X(e);if(t.length===0)return null;for(let e of t)J(e,`SIGTERM`);return{result:`stopped`,message:`Gateway stop signal sent to unmanaged process${t.length===1?``:`es`} on port ${e}: ${Y(t)}.`}}async function Je(e){await Ke(e);let t=X(e);if(t.length===0)return null;if(t.length>1)throw Error(`multiple gateway processes are listening on port ${e}: ${Y(t)}; use "openclaw gateway status --deep" before retrying restart`);return J(t[0],`SIGUSR1`),{result:`restarted`,message:`Gateway restart signal sent to unmanaged process on port ${e}: ${t[0]}.`}}async function Ye(e={}){return await be({serviceNoun:`Gateway`,service:O(),opts:e,stopBeforeUninstall:!0,assertNotLoadedAfterUninstall:!0})}async function Xe(e={}){return await Ce({serviceNoun:`Gateway`,service:O(),renderStartHints:j,opts:e})}async function Ze(e={}){let t=O(),n=await G(t).catch(()=>q());return await Ee({serviceNoun:`Gateway`,service:t,opts:e,onNotLoaded:async()=>qe(n)})}async function Z(e={}){let t=!!e.json,n=O(),r=!1,i=await G(n).catch(()=>q());return await Oe({serviceNoun:`Gateway`,service:n,renderStartHints:j,opts:e,checkTokenDrift:!0,onNotLoaded:async()=>{let e=await Je(i);return e&&(r=!0),e},postRestartCheck:async({warnings:e,fail:o,stdout:s})=>{if(r){let n=await He({port:i,attempts:120,delayMs:500});if(n.healthy)return;let r=Ue(n),s=`Timed out after 60s waiting for gateway port ${i} to become healthy.`;if(t)e.push(s),e.push(...r);else{l.log(a.warn(s));for(let e of r)l.log(a.muted(e))}o(`Gateway restart timed out after 60s waiting for health checks.`,[S(`openclaw gateway status --deep`),S(`openclaw doctor`)])}let c=await V({service:n,port:i,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`});if(!c.healthy&&c.staleGatewayPids.length>0){let r=`Found stale gateway process(es): ${c.staleGatewayPids.join(`, `)}.`;e.push(r),t||(l.log(a.warn(r)),l.log(a.muted(`Stopping stale process(es) and retrying restart...`))),await W(c.staleGatewayPids);let o=await n.restart({env:process.env,stdout:s});if(o.outcome===`scheduled`)return o;c=await V({service:n,port:i,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`})}if(c.healthy)return;let u=U(c),d=`Timed out after 60s waiting for gateway port ${i} to become healthy.`,f=c.runtime.status===`running`&&c.portUsage.status===`free`?`Gateway process is running but port ${i} is still free (startup hang/crash loop or very slow VM startup).`:null;if(t)e.push(d),f&&e.push(f),e.push(...u);else{l.log(a.warn(d)),f&&l.log(a.warn(f));for(let e of u)l.log(a.muted(e))}o(`Gateway restart timed out after 60s waiting for health checks.`,[S(`openclaw gateway status --deep`),S(`openclaw doctor`)])}})}async function Qe(e){try{return await oe({label:`Checking gateway status...`,indeterminate:!0,enabled:e.json!==!0},async()=>await w({url:e.url,token:e.token,password:e.password,tlsFingerprint:e.tlsFingerprint,method:`status`,timeoutMs:e.timeoutMs,clientName:m.CLI,mode:x.CLI,...e.configPath?{configPath:e.configPath}:{}})),{ok:!0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function $e(e,t){return!(e!==`busy`||t===!0)}async function et(e){let t={...process.env,...e??void 0},i=r(process.env,n(process.env)),a=r(t,n(t)),o=h({env:process.env,configPath:i}),s=h({env:t,configPath:a}),[c,l]=await Promise.all([o.readConfigFileSnapshot().catch(()=>null),s.readConfigFileSnapshot().catch(()=>null)]),u=o.loadConfig(),d=s.loadConfig(),f={path:c?.path??i,exists:c?.exists??!1,valid:c?.valid??!0,...c?.issues?.length?{issues:c.issues}:{},controlUi:u.gateway?.controlUi},p={path:l?.path??a,exists:l?.exists??!1,valid:l?.valid??!0,...l?.issues?.length?{issues:l.issues}:{},controlUi:d.gateway?.controlUi};return{mergedDaemonEnv:t,cliCfg:u,daemonCfg:d,cliConfigSummary:f,daemonConfigSummary:p,configMismatch:f.path!==p.path}}async function tt(e){let t=k(e.commandProgramArguments),n=t??i(e.daemonCfg,e.mergedDaemonEnv),r=t?`service args`:`env/config`,a=e.daemonCfg.gateway?.bind??`loopback`,o=e.daemonCfg.gateway?.customBindHost,s=await f(a,o),c=xe(a,p(),o),l=_(e.rpcUrlOverride)??null,u=e.daemonCfg.gateway?.tls?.enabled===!0?`wss`:`ws`,d=l??`${u}://${c}:${n}`,m=!l&&a===`lan`?`bind=lan listens on 0.0.0.0 (all interfaces); probing via ${c}.`:!l&&a===`loopback`?`Loopback-only gateway; only local clients can connect.`:void 0;return{gateway:{bindMode:a,bindHost:s,customBindHost:o,port:n,portSource:r,probeUrl:d,...m?{probeNote:m}:{}},daemonPort:n,cliPort:i(e.cliCfg,process.env),probeUrlOverride:l}}function Q(e){if(e)return{port:e.port,status:e.status,listeners:e.listeners,hints:e.hints}}async function nt(e){let[t,n]=await Promise.all([y(e.daemonPort).catch(()=>null),e.cliPort===e.daemonPort?null:y(e.cliPort).catch(()=>null)]);return{portStatus:Q(t),portCliStatus:Q(n)}}async function rt(e){let t=O(),[n,r,i]=await Promise.all([t.isLoaded({env:process.env}).catch(()=>!1),t.readCommand(process.env).catch(()=>null),t.readRuntime(process.env).catch(e=>({status:`unknown`,detail:String(e)}))]),a=await ke({env:process.env,command:r}),{mergedDaemonEnv:o,cliCfg:s,daemonCfg:c,cliConfigSummary:l,daemonConfigSummary:u,configMismatch:d}=await et(r?.environment??void 0),{gateway:f,daemonPort:p,cliPort:m,probeUrlOverride:h}=await tt({cliCfg:s,daemonCfg:c,mergedDaemonEnv:o,commandProgramArguments:r?.programArguments,rpcUrlOverride:e.rpc.url}),{portStatus:g,portCliStatus:_}=await nt({daemonPort:p,cliPort:m}),v=await Le(process.env,{deep:!!e.deep}).catch(()=>[]),y=ee(e.rpc.timeout??`10000`)??1e4,b=c.gateway?.tls?.enabled===!0,x=e.probe&&!h&&b,S=x?await te(c.gateway?.tls):void 0,C=e.probe?await Pe({cfg:c,mode:c.gateway?.mode===`remote`?`remote`:`local`,env:o,explicitAuth:{token:e.rpc.token,password:e.rpc.password}}):void 0,w=e.probe?await Qe({url:f.probeUrl,token:C?.token,password:C?.password,tlsFingerprint:x&&S?.enabled?S.fingerprintSha256:void 0,timeoutMs:y,json:e.rpc.json,configPath:u.path}):void 0,T;return n&&i?.status===`running`&&g&&g.status!==`busy`&&(T=await Fe(o)??void 0),{service:{label:t.label,loaded:n,loadedText:t.loadedText,notLoadedText:t.notLoadedText,command:r,runtime:i,configAudit:a},config:{cli:l,daemon:u,...d?{mismatch:!0}:{}},gateway:f,port:g,..._?{portCli:_}:{},lastError:T,...w?{rpc:{...w,url:f.probeUrl}}:{},extraServices:v}}function it(e,t){return!e.port||!$e(e.port.status,t)?[]:v({port:e.port.port,status:e.port.status,listeners:e.port.listeners,hints:e.port.hints})}function at(e){return Array.from(new Set(e.port?.listeners?.map(e=>e.address?De(e.address):``).filter(e=>!!e)??[]))}function ot(e){let t=e.service.command;if(!t?.environment)return e;let n=we(t.environment),r={...t,environment:Object.keys(n).length>0?n:void 0};return{...e,service:{...e.service,command:r}}}function st(e,t){if(t.json){let t=ot(e);l.log(JSON.stringify(t,null,2));return}let{rich:n,label:r,accent:i,infoText:a,okText:c,warnText:u,errorText:f}=ge(),p=()=>l.log(``),{service:m,rpc:h,extraServices:g}=e,_=m.loaded?c(m.loadedText):u(m.notLoadedText);l.log(`${r(`Service:`)} ${i(m.label)} (${_})`);try{let e=o().file;l.log(`${r(`File logs:`)} ${a(d(e))}`)}catch{}m.command?.programArguments?.length&&l.log(`${r(`Command:`)} ${a(m.command.programArguments.join(` `))}`),m.command?.sourcePath&&l.log(`${r(`Service file:`)} ${a(d(m.command.sourcePath))}`),m.command?.workingDirectory&&l.log(`${r(`Working dir:`)} ${a(d(m.command.workingDirectory))}`);let v=Te(m.command?.environment);if(v.length>0&&l.log(`${r(`Service env:`)} ${v.join(` `)}`),p(),m.configAudit?.issues.length){l.error(u(`Service config looks out of date or non-standard.`));for(let e of m.configAudit.issues){let t=e.detail?` (${e.detail})`:``;l.error(`${u(`Service config issue:`)} ${e.message}${t}`)}l.error(u(`Recommendation: run "${S(`openclaw doctor`)}" (or "${S(`openclaw doctor --repair`)}").`))}if(e.config){let t=`${d(e.config.cli.path)}${e.config.cli.exists?``:` (missing)`}${e.config.cli.valid?``:` (invalid)`}`;if(l.log(`${r(`Config (cli):`)} ${a(t)}`),!e.config.cli.valid&&e.config.cli.issues?.length)for(let t of e.config.cli.issues.slice(0,5))l.error(`${f(`Config issue:`)} ${D(t,``,{normalizeRoot:!0})}`);if(e.config.daemon){let t=`${d(e.config.daemon.path)}${e.config.daemon.exists?``:` (missing)`}${e.config.daemon.valid?``:` (invalid)`}`;if(l.log(`${r(`Config (service):`)} ${a(t)}`),!e.config.daemon.valid&&e.config.daemon.issues?.length)for(let t of e.config.daemon.issues.slice(0,5))l.error(`${f(`Service config issue:`)} ${D(t,``,{normalizeRoot:!0})}`)}e.config.mismatch&&(l.error(f(`Root cause: CLI and service are using different config paths (likely a profile/state-dir mismatch).`)),l.error(f(`Fix: rerun \`${S(`openclaw gateway install --force`)}\` from the same --profile / OPENCLAW_STATE_DIR you expect.`))),p()}if(e.gateway){let t=e.gateway.bindHost??`n/a`;if(l.log(`${r(`Gateway:`)} bind=${a(e.gateway.bindMode)} (${a(t)}), port=${a(String(e.gateway.port))} (${a(e.gateway.portSource)})`),l.log(`${r(`Probe target:`)} ${a(e.gateway.probeUrl)}`),!(e.config?.daemon?.controlUi?.enabled??!0))l.log(`${r(`Dashboard:`)} ${u(`disabled`)}`);else{let t=ie({port:e.gateway.port,bind:e.gateway.bindMode,customBindHost:e.gateway.customBindHost,basePath:e.config?.daemon?.controlUi?.basePath});l.log(`${r(`Dashboard:`)} ${a(t.httpUrl)}`)}e.gateway.probeNote&&l.log(`${r(`Probe note:`)} ${a(e.gateway.probeNote)}`),p()}let y=Me(m.runtime);if(y){let e=_e(m.runtime?.status);l.log(`${r(`Runtime:`)} ${s(n,e,y)}`)}if(h&&!h.ok&&m.loaded&&m.runtime?.status===`running`&&l.log(u(`Warm-up: launch agents can take a few seconds. Try again shortly.`)),h){if(h.ok)l.log(`${r(`RPC probe:`)} ${c(`ok`)}`);else{l.error(`${r(`RPC probe:`)} ${f(`failed`)}`),h.url&&l.error(`${r(`RPC target:`)} ${h.url}`);let e=String(h.error??`unknown`).split(/\r?\n/).filter(Boolean);for(let t of e.slice(0,12))l.error(` ${f(t)}`)}p()}if(process.platform===`linux`&&je(m.runtime?.detail)){l.error(f(`systemd user services unavailable.`));for(let e of Ae({wsl:T()}))l.error(f(e));p()}if(m.runtime?.missingUnit){l.error(f(`Service unit not found.`));for(let e of A(m.runtime))l.error(f(e))}else if(m.loaded&&m.runtime?.status===`stopped`){l.error(f(`Service is loaded but not running (likely exited immediately).`));for(let e of A(m.runtime,m.command?.environment??process.env))l.error(f(e));p()}if(m.runtime?.cachedLabel){let e=ce((m.command?.environment??process.env).OPENCLAW_PROFILE);l.error(f(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${e}`)),l.error(f(`Then reinstall: ${S(`openclaw gateway install`)}`)),p()}for(let t of it(e,h?.ok))l.error(f(t));if(e.port){let t=at(e);t.length>0&&l.log(`${r(`Listening:`)} ${a(t.join(`, `))}`)}if(e.portCli&&e.portCli.port!==e.port?.port&&l.log(`${r(`Note:`)} CLI config resolves gateway port=${e.portCli.port} (${e.portCli.status}).`),m.loaded&&m.runtime?.status===`running`&&e.port&&e.port.status!==`busy`){if(l.error(f(`Gateway port ${e.port.port} is not listening (service appears running).`)),e.lastError&&l.error(`${f(`Last gateway error:`)} ${e.lastError}`),process.platform===`linux`){let e=se((m.command?.environment??process.env).OPENCLAW_PROFILE);l.error(f(`Logs: journalctl --user -u ${e}.service -n 200 --no-pager`))}else if(process.platform===`darwin`){let e=he(m.command?.environment??process.env);l.error(`${f(`Logs:`)} ${d(e.stdoutPath)}`),l.error(`${f(`Errors:`)} ${d(e.stderrPath)}`)}p()}if(g.length>0){l.error(f(`Other gateway-like services detected (best effort):`));for(let e of g)l.error(`- ${f(e.label)} (${e.scope}, ${e.detail})`);for(let e of Ie())l.error(`${f(`Cleanup hint:`)} ${e}`);p()}g.length>0&&(l.error(f(`Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).`)),l.error(f(`If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).`)),p()),l.log(`${r(`Troubles:`)} run ${S(`openclaw status`)}`),l.log(`${r(`Troubleshooting:`)} https://docs.openclaw.ai/troubleshooting`)}async function ct(e){try{st(await rt({rpc:e.rpc,probe:!!e.probe,deep:!!e.deep}),{json:!!e.json})}catch(e){let t=c();l.error(s(t,a.error,`Gateway status failed: ${String(e)}`)),l.exit(1)}}function lt(e,t){let n=E(t,`force`),r=E(t,`port`),i=E(t,`token`);return{...e,force:!!(e.force||n),port:e.port??r,token:e.token??i}}function ut(e,t){let n=E(t,`token`),r=E(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function $(e,t){e.command(`status`).description(t?.statusDescription??`Show gateway service status + probe the Gateway`).option(`--url <url>`,`Gateway WebSocket URL (defaults to config/remote/local)`).option(`--token <token>`,`Gateway token (if required)`).option(`--password <password>`,`Gateway password (password auth)`).option(`--timeout <ms>`,`Timeout in ms`,`10000`).option(`--no-probe`,`Skip RPC probe`).option(`--deep`,`Scan system-level services`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await ct({rpc:ut(e,t),probe:!!e.probe,deep:!!e.deep,json:!!e.json})}),e.command(`install`).description(`Install the Gateway service (launchd/systemd/schtasks)`).option(`--port <port>`,`Gateway port`).option(`--runtime <runtime>`,`Daemon runtime (node|bun). Default: node`).option(`--token <token>`,`Gateway token (token auth)`).option(`--force`,`Reinstall/overwrite if already installed`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await P(lt(e,t))}),e.command(`uninstall`).description(`Uninstall the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Ye(e)}),e.command(`start`).description(`Start the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Xe(e)}),e.command(`stop`).description(`Stop the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Ze(e)}),e.command(`restart`).description(`Restart the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Z(e)})}function dt(e){$(e.command(`daemon`).description(`Manage the Gateway service (launchd/systemd/schtasks)`).addHelpText(`after`,()=>`\n${a.muted(`Docs:`)} ${ae(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`),{statusDescription:`Show service install status + probe the Gateway`})}var ft=e({registerDaemonCli:()=>dt});export{W as a,F as c,U as i,P as l,$ as n,V as o,Z as r,I as s,ft as t};
2
- //# sourceMappingURL=daemon-cli-BdDHNRqp.js.map
@@ -1,2 +1 @@
1
1
  import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{A as t,N as n,O as r,k as i,p as a}from"./subsystem-BLbY429l.js";import{d as o,g as s,o as c,u as l}from"./paths-BjD3T_xq.js";import{Kr as u,Oo as d,Po as f,Xr as p,Yr as m,ca as h,da as g,lr as _,qi as v,ur as y}from"./auth-profiles-C8rZRS0X.js";import{t as b}from"./command-format-CLxIPuLR.js";import{S as x,x as S}from"./utils-CGdo13HV.js";import{i as ee}from"./parse-finite-number-dBmDLLKL.js";import{r as C}from"./commands-Dy7duWlt.js";import{ln as te,n as w}from"./call-BWx7hNtl.js";import{p as T,u as ne}from"./arg-split-BOqSMBuf.js";import{f as re,t as ie}from"./kill-tree-D6nPx1_o.js";import{t as ae}from"./cmd-argv-Bh-KpaZ0.js";import{r as oe}from"./wsl-DHxB2Ew_.js";import{g as se}from"./onboard-helpers-DOlI17Ac.js";import{t as ce}from"./links-CBnmRP9D.js";import{n as le}from"./progress-d1m2sqR1.js";import{n as E}from"./command-options-BpOUDl2S.js";import{t as D}from"./issue-format-CN9PHzXY.js";import{n as ue,t as de}from"./gateway-install-token-cSJrfU_1.js";import{r as fe,t as pe}from"./daemon-runtime-VcpeBRJV.js";import{n as me}from"./systemd-DbevZh65.js";import{c as he,n as O}from"./service-DZ9EbS15.js";import{a as ge,c as k,d as A,f as _e,g as ve,h as ye,i as be,l as xe,m as Se,n as Ce,o as we,p as Te,r as Ee,s as De,t as Oe,u as j}from"./lifecycle-core-D_LWJeD_.js";import{i as ke,n as Ae,t as je,u as Me}from"./systemd-hints-lXpMy-kY.js";import{t as Ne}from"./parse-port-JVwkxcZ8.js";import{n as Pe,r as M}from"./probe-auth-C5nWfMS9.js";import{t as Fe}from"./diagnostics-Cdctg9K_.js";import{n as Ie,t as Le}from"./inspect-z59cgmYc.js";import{spawnSync as N}from"node:child_process";import Re from"node:fs";async function P(e){let t=!!e.json,{stdout:n,warnings:r,emit:i,fail:s}=ye({action:`install`,json:t});if(o(process.env)){s(`Nix mode detected; service install is disabled.`);return}let c=await f(),u=Ne(e.port);if(e.port!==void 0&&u===null){s(`Invalid port`);return}let d=u??l(c);if(!Number.isFinite(d)||d<=0){s(`Invalid port`);return}let p=e.runtime?String(e.runtime):pe;if(!fe(p)){s(`Invalid --runtime (use "node" or "bun")`);return}let m=O(),h=!1;try{h=await m.isLoaded({env:process.env})}catch(e){if(me(e))h=!1;else{s(`Gateway service check failed: ${String(e)}`);return}}if(h&&!e.force){i({ok:!0,result:`already-installed`,message:`Gateway service already ${m.loadedText}.`,service:Se(m,h)}),t||(a.log(`Gateway service already ${m.loadedText}.`),a.log(`Reinstall with: ${b(`openclaw gateway install --force`)}`));return}let g=await de({config:c,env:process.env,explicitToken:e.token,autoGenerateWhenMissing:!0,persistGeneratedToken:!0});if(g.unavailableReason){s(`Gateway install blocked: ${g.unavailableReason}`);return}for(let e of g.warnings)t?r.push(e):a.log(e);let{programArguments:_,workingDirectory:v,environment:y}=await ue({env:process.env,port:d,runtime:p,warn:e=>{t?r.push(e):a.log(e)},config:c});await ve({serviceNoun:`Gateway`,service:m,warnings:r,emit:i,fail:s,install:async()=>{await m.install({env:process.env,stdout:n,programArguments:_,workingDirectory:v,environment:y})}})}function ze(e){return e.replaceAll(`\\`,`/`).toLowerCase()}function F(e){return e.split(`\0`).map(e=>e.trim()).filter(Boolean)}function I(e,t){let n=e.map(ze);if(!n.includes(`gateway`))return!1;let r=[`dist/index.js`,`dist/entry.js`,`openclaw.mjs`,`scripts/run-node.mjs`,`src/index.ts`];if(n.some(e=>r.some(t=>e.endsWith(t))))return!0;let i=(n[0]??``).replace(/\.(bat|cmd|exe)$/i,``);return i.endsWith(`/openclaw`)||i===`openclaw`||t?.allowGatewayBinary===!0&&i.endsWith(`/openclaw-gateway`)}function Be(e){return e.status!==`busy`||e.listeners.length>0?!1:e.errors?.length?!0:e.hints.some(e=>e.includes(`process details are unavailable`))}function L(e){return e.listener.pid===e.runtimePid||e.listener.ppid===e.runtimePid}function Ve(e,t){if(e!==1008)return!1;let n=(t??``).toLowerCase();return n.includes(`auth`)||n.includes(`token`)||n.includes(`password`)||n.includes(`scope`)||n.includes(`role`)}async function R(e){let t=process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,n=process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0,r=await M({url:`ws://127.0.0.1:${e}`,auth:t||n?{token:t,password:n}:void 0,timeoutMs:1e3});return r.ok||Ve(r.close?.code,r.close?.reason)}async function z(e){let t;try{t=await u(e)}catch(n){t={port:e,status:`unknown`,listeners:[],hints:[],errors:[String(n)]}}let n=!1;if(t.status===`busy`)try{n=await R(e)}catch{}return{portUsage:t,healthy:n}}async function B(e){let t=e.env??process.env,n={status:`unknown`};try{n=await e.service.readRuntime(t)}catch(e){n={status:`unknown`,detail:String(e)}}let r;try{r=await u(e.port)}catch(t){r={port:e.port,status:`unknown`,listeners:[],hints:[],errors:[String(t)]}}let i=r.status===`busy`?r.listeners.filter(t=>m(t,e.port)===`gateway`):[],a=e.includeUnknownListenersAsStale&&process.platform===`win32`&&n.status!==`running`&&r.status===`busy`?r.listeners.filter(t=>m(t,e.port)===`unknown`).map(e=>e.pid).filter(e=>Number.isFinite(e)):[],o=n.status===`running`,s=n.pid,c=Be(r),l=s==null?i.length>0||c:r.listeners.some(e=>L({listener:e,runtimePid:s}))||c,d=o&&l;if(!d&&o&&r.status===`busy`)try{d=await R(e.port)}catch{}let f=Array.from(new Set([...i.filter(e=>Number.isFinite(e.pid)).filter(e=>!o||s==null?!0:!L({listener:e,runtimePid:s})).map(e=>e.pid),...a.filter(e=>n.pid==null||e!==n.pid||!o)]));return{runtime:n,portUsage:r,healthy:d,staleGatewayPids:f}}async function V(e){let t=e.attempts??120,n=e.delayMs??500,r=await B({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale});for(let i=0;i<t;i+=1){if(r.healthy||r.staleGatewayPids.length>0&&r.runtime.status!==`running`)return r;await x(n),r=await B({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale})}return r}async function He(e){let t=e.attempts??120,n=e.delayMs??500,r=await z(e.port);for(let i=0;i<t;i+=1){if(r.healthy)return r;await x(n),r=await z(e.port)}return r}function H(e){let t=[];return e.portUsage.status===`busy`?t.push(...p(e.portUsage)):t.push(`Gateway port ${e.portUsage.port} status: ${e.portUsage.status}.`),e.portUsage.errors?.length&&t.push(`Port diagnostics errors: ${e.portUsage.errors.join(`; `)}`),t}function U(e){let t=[],n=[e.runtime.status?`status=${e.runtime.status}`:null,e.runtime.state?`state=${e.runtime.state}`:null,e.runtime.pid==null?null:`pid=${e.runtime.pid}`,e.runtime.lastExitStatus==null?null:`lastExit=${e.runtime.lastExitStatus}`].filter(Boolean).join(`, `);return n&&t.push(`Service runtime: ${n}`),t.push(...H(e)),t}function Ue(e){return H(e)}async function W(e){let t=Array.from(new Set(e.filter(e=>Number.isFinite(e)&&e>0)));for(let e of t)ie(e,{graceMs:300});return t.length>0&&await x(500),t}async function G(e=O()){let t=await e.readCommand(process.env).catch(()=>null),n=t?.environment??void 0,r={...process.env,...n??void 0};return k(t?.programArguments)??l(await f(),r)}function We(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);for(let e of t)if(e.toLowerCase().startsWith(`commandline=`))return e.slice(12).trim()||null;return t.find(e=>e.toLowerCase()!==`commandline`)??null}function K(e){if(process.platform===`linux`)try{return F(Re.readFileSync(`/proc/${e}/cmdline`,`utf8`))}catch{return null}if(process.platform===`darwin`){let t=N(`ps`,[`-o`,`command=`,`-p`,String(e)],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=t.stdout.trim();return n?n.split(/\s+/):null}if(process.platform===`win32`){let t=N(`wmic`,[`process`,`where`,`ProcessId=${e}`,`get`,`CommandLine`,`/value`],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=We(t.stdout);return n?ae(n):null}return null}function Ge(e){return Array.from(new Set(re(e))).filter(e=>Number.isFinite(e)&&e>0).filter(e=>{let t=K(e);return t!=null&&I(t,{allowGatewayBinary:!0})})}function q(){return f().then(e=>l(e,process.env)).catch(()=>l(void 0,process.env))}function J(e,t){let n=K(e);if(!n||!I(n,{allowGatewayBinary:!0}))throw Error(`refusing to signal non-gateway process pid ${e}`);process.kill(e,t)}function Y(e){return e.join(`, `)}async function Ke(e){let t=await M({url:`ws://127.0.0.1:${e}`,auth:{token:process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,password:process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0},timeoutMs:1e3}).catch(()=>null);if(t?.ok&&!C(t.configSnapshot))throw Error(`Gateway restart is disabled in the running gateway config (commands.restart=false); unmanaged SIGUSR1 restart would be ignored`)}function X(e){return Ge(e).filter(e=>Number.isFinite(e)&&e>0)}async function qe(e){let t=X(e);if(t.length===0)return null;for(let e of t)J(e,`SIGTERM`);return{result:`stopped`,message:`Gateway stop signal sent to unmanaged process${t.length===1?``:`es`} on port ${e}: ${Y(t)}.`}}async function Je(e){await Ke(e);let t=X(e);if(t.length===0)return null;if(t.length>1)throw Error(`multiple gateway processes are listening on port ${e}: ${Y(t)}; use "openclaw gateway status --deep" before retrying restart`);return J(t[0],`SIGUSR1`),{result:`restarted`,message:`Gateway restart signal sent to unmanaged process on port ${e}: ${t[0]}.`}}async function Ye(e={}){return await be({serviceNoun:`Gateway`,service:O(),opts:e,stopBeforeUninstall:!0,assertNotLoadedAfterUninstall:!0})}async function Xe(e={}){return await Ce({serviceNoun:`Gateway`,service:O(),renderStartHints:j,opts:e})}async function Ze(e={}){let t=O(),n=await G(t).catch(()=>q());return await Ee({serviceNoun:`Gateway`,service:t,opts:e,onNotLoaded:async()=>qe(n)})}async function Z(e={}){let n=!!e.json,r=O(),i=!1,o=await G(r).catch(()=>q());return await Oe({serviceNoun:`Gateway`,service:r,renderStartHints:j,opts:e,checkTokenDrift:!0,onNotLoaded:async()=>{let e=await Je(o);return e&&(i=!0),e},postRestartCheck:async({warnings:e,fail:s,stdout:c})=>{if(i){let r=await He({port:o,attempts:120,delayMs:500});if(r.healthy)return;let i=Ue(r),c=`Timed out after 60s waiting for gateway port ${o} to become healthy.`;if(n)e.push(c),e.push(...i);else{a.log(t.warn(c));for(let e of i)a.log(t.muted(e))}s(`Gateway restart timed out after 60s waiting for health checks.`,[b(`openclaw gateway status --deep`),b(`openclaw doctor`)])}let l=await V({service:r,port:o,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`});if(!l.healthy&&l.staleGatewayPids.length>0){let i=`Found stale gateway process(es): ${l.staleGatewayPids.join(`, `)}.`;e.push(i),n||(a.log(t.warn(i)),a.log(t.muted(`Stopping stale process(es) and retrying restart...`))),await W(l.staleGatewayPids);let s=await r.restart({env:process.env,stdout:c});if(s.outcome===`scheduled`)return s;l=await V({service:r,port:o,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`})}if(l.healthy)return;let u=U(l),d=`Timed out after 60s waiting for gateway port ${o} to become healthy.`,f=l.runtime.status===`running`&&l.portUsage.status===`free`?`Gateway process is running but port ${o} is still free (startup hang/crash loop or very slow VM startup).`:null;if(n)e.push(d),f&&e.push(f),e.push(...u);else{a.log(t.warn(d)),f&&a.log(t.warn(f));for(let e of u)a.log(t.muted(e))}s(`Gateway restart timed out after 60s waiting for health checks.`,[b(`openclaw gateway status --deep`),b(`openclaw doctor`)])}})}async function Qe(e){try{return await le({label:`Checking gateway status...`,indeterminate:!0,enabled:e.json!==!0},async()=>await w({url:e.url,token:e.token,password:e.password,tlsFingerprint:e.tlsFingerprint,method:`status`,timeoutMs:e.timeoutMs,clientName:y.CLI,mode:_.CLI,...e.configPath?{configPath:e.configPath}:{}})),{ok:!0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function $e(e,t){return!(e!==`busy`||t===!0)}async function et(e){let t={...process.env,...e??void 0},n=c(process.env,s(process.env)),r=c(t,s(t)),i=d({env:process.env,configPath:n}),a=d({env:t,configPath:r}),[o,l]=await Promise.all([i.readConfigFileSnapshot().catch(()=>null),a.readConfigFileSnapshot().catch(()=>null)]),u=i.loadConfig(),f=a.loadConfig(),p={path:o?.path??n,exists:o?.exists??!1,valid:o?.valid??!0,...o?.issues?.length?{issues:o.issues}:{},controlUi:u.gateway?.controlUi},m={path:l?.path??r,exists:l?.exists??!1,valid:l?.valid??!0,...l?.issues?.length?{issues:l.issues}:{},controlUi:f.gateway?.controlUi};return{mergedDaemonEnv:t,cliCfg:u,daemonCfg:f,cliConfigSummary:p,daemonConfigSummary:m,configMismatch:p.path!==m.path}}async function tt(e){let t=k(e.commandProgramArguments),n=t??l(e.daemonCfg,e.mergedDaemonEnv),r=t?`service args`:`env/config`,i=e.daemonCfg.gateway?.bind??`loopback`,a=e.daemonCfg.gateway?.customBindHost,o=await h(i,a),s=xe(i,g(),a),c=v(e.rpcUrlOverride)??null,u=e.daemonCfg.gateway?.tls?.enabled===!0?`wss`:`ws`,d=c??`${u}://${s}:${n}`,f=!c&&i===`lan`?`bind=lan listens on 0.0.0.0 (all interfaces); probing via ${s}.`:!c&&i===`loopback`?`Loopback-only gateway; only local clients can connect.`:void 0;return{gateway:{bindMode:i,bindHost:o,customBindHost:a,port:n,portSource:r,probeUrl:d,...f?{probeNote:f}:{}},daemonPort:n,cliPort:l(e.cliCfg,process.env),probeUrlOverride:c}}function Q(e){if(e)return{port:e.port,status:e.status,listeners:e.listeners,hints:e.hints}}async function nt(e){let[t,n]=await Promise.all([u(e.daemonPort).catch(()=>null),e.cliPort===e.daemonPort?null:u(e.cliPort).catch(()=>null)]);return{portStatus:Q(t),portCliStatus:Q(n)}}async function rt(e){let t=O(),[n,r,i]=await Promise.all([t.isLoaded({env:process.env}).catch(()=>!1),t.readCommand(process.env).catch(()=>null),t.readRuntime(process.env).catch(e=>({status:`unknown`,detail:String(e)}))]),a=await ke({env:process.env,command:r}),{mergedDaemonEnv:o,cliCfg:s,daemonCfg:c,cliConfigSummary:l,daemonConfigSummary:u,configMismatch:d}=await et(r?.environment??void 0),{gateway:f,daemonPort:p,cliPort:m,probeUrlOverride:h}=await tt({cliCfg:s,daemonCfg:c,mergedDaemonEnv:o,commandProgramArguments:r?.programArguments,rpcUrlOverride:e.rpc.url}),{portStatus:g,portCliStatus:_}=await nt({daemonPort:p,cliPort:m}),v=await Le(process.env,{deep:!!e.deep}).catch(()=>[]),y=ee(e.rpc.timeout??`10000`)??1e4,b=c.gateway?.tls?.enabled===!0,x=e.probe&&!h&&b,S=x?await te(c.gateway?.tls):void 0,C=e.probe?await Pe({cfg:c,mode:c.gateway?.mode===`remote`?`remote`:`local`,env:o,explicitAuth:{token:e.rpc.token,password:e.rpc.password}}):void 0,w=e.probe?await Qe({url:f.probeUrl,token:C?.token,password:C?.password,tlsFingerprint:x&&S?.enabled?S.fingerprintSha256:void 0,timeoutMs:y,json:e.rpc.json,configPath:u.path}):void 0,T;return n&&i?.status===`running`&&g&&g.status!==`busy`&&(T=await Fe(o)??void 0),{service:{label:t.label,loaded:n,loadedText:t.loadedText,notLoadedText:t.notLoadedText,command:r,runtime:i,configAudit:a},config:{cli:l,daemon:u,...d?{mismatch:!0}:{}},gateway:f,port:g,..._?{portCli:_}:{},lastError:T,...w?{rpc:{...w,url:f.probeUrl}}:{},extraServices:v}}function it(e,t){return!e.port||!$e(e.port.status,t)?[]:p({port:e.port.port,status:e.port.status,listeners:e.port.listeners,hints:e.port.hints})}function at(e){return Array.from(new Set(e.port?.listeners?.map(e=>e.address?De(e.address):``).filter(e=>!!e)??[]))}function ot(e){let t=e.service.command;if(!t?.environment)return e;let n=we(t.environment),r={...t,environment:Object.keys(n).length>0?n:void 0};return{...e,service:{...e.service,command:r}}}function st(e,t){if(t.json){let t=ot(e);a.log(JSON.stringify(t,null,2));return}let{rich:i,label:o,accent:s,infoText:c,okText:l,warnText:u,errorText:d}=ge(),f=()=>a.log(``),{service:p,rpc:m,extraServices:h}=e,g=p.loaded?l(p.loadedText):u(p.notLoadedText);a.log(`${o(`Service:`)} ${s(p.label)} (${g})`);try{let e=n().file;a.log(`${o(`File logs:`)} ${c(S(e))}`)}catch{}p.command?.programArguments?.length&&a.log(`${o(`Command:`)} ${c(p.command.programArguments.join(` `))}`),p.command?.sourcePath&&a.log(`${o(`Service file:`)} ${c(S(p.command.sourcePath))}`),p.command?.workingDirectory&&a.log(`${o(`Working dir:`)} ${c(S(p.command.workingDirectory))}`);let _=Te(p.command?.environment);if(_.length>0&&a.log(`${o(`Service env:`)} ${_.join(` `)}`),f(),p.configAudit?.issues.length){a.error(u(`Service config looks out of date or non-standard.`));for(let e of p.configAudit.issues){let t=e.detail?` (${e.detail})`:``;a.error(`${u(`Service config issue:`)} ${e.message}${t}`)}a.error(u(`Recommendation: run "${b(`openclaw doctor`)}" (or "${b(`openclaw doctor --repair`)}").`))}if(e.config){let t=`${S(e.config.cli.path)}${e.config.cli.exists?``:` (missing)`}${e.config.cli.valid?``:` (invalid)`}`;if(a.log(`${o(`Config (cli):`)} ${c(t)}`),!e.config.cli.valid&&e.config.cli.issues?.length)for(let t of e.config.cli.issues.slice(0,5))a.error(`${d(`Config issue:`)} ${D(t,``,{normalizeRoot:!0})}`);if(e.config.daemon){let t=`${S(e.config.daemon.path)}${e.config.daemon.exists?``:` (missing)`}${e.config.daemon.valid?``:` (invalid)`}`;if(a.log(`${o(`Config (service):`)} ${c(t)}`),!e.config.daemon.valid&&e.config.daemon.issues?.length)for(let t of e.config.daemon.issues.slice(0,5))a.error(`${d(`Service config issue:`)} ${D(t,``,{normalizeRoot:!0})}`)}e.config.mismatch&&(a.error(d(`Root cause: CLI and service are using different config paths (likely a profile/state-dir mismatch).`)),a.error(d(`Fix: rerun \`${b(`openclaw gateway install --force`)}\` from the same --profile / OPENCLAW_STATE_DIR you expect.`))),f()}if(e.gateway){let t=e.gateway.bindHost??`n/a`;if(a.log(`${o(`Gateway:`)} bind=${c(e.gateway.bindMode)} (${c(t)}), port=${c(String(e.gateway.port))} (${c(e.gateway.portSource)})`),a.log(`${o(`Probe target:`)} ${c(e.gateway.probeUrl)}`),!(e.config?.daemon?.controlUi?.enabled??!0))a.log(`${o(`Dashboard:`)} ${u(`disabled`)}`);else{let t=se({port:e.gateway.port,bind:e.gateway.bindMode,customBindHost:e.gateway.customBindHost,basePath:e.config?.daemon?.controlUi?.basePath});a.log(`${o(`Dashboard:`)} ${c(t.httpUrl)}`)}e.gateway.probeNote&&a.log(`${o(`Probe note:`)} ${c(e.gateway.probeNote)}`),f()}let v=Me(p.runtime);if(v){let e=_e(p.runtime?.status);a.log(`${o(`Runtime:`)} ${r(i,e,v)}`)}if(m&&!m.ok&&p.loaded&&p.runtime?.status===`running`&&a.log(u(`Warm-up: launch agents can take a few seconds. Try again shortly.`)),m){if(m.ok)a.log(`${o(`RPC probe:`)} ${l(`ok`)}`);else{a.error(`${o(`RPC probe:`)} ${d(`failed`)}`),m.url&&a.error(`${o(`RPC target:`)} ${m.url}`);let e=String(m.error??`unknown`).split(/\r?\n/).filter(Boolean);for(let t of e.slice(0,12))a.error(` ${d(t)}`)}f()}if(process.platform===`linux`&&je(p.runtime?.detail)){a.error(d(`systemd user services unavailable.`));for(let e of Ae({wsl:oe()}))a.error(d(e));f()}if(p.runtime?.missingUnit){a.error(d(`Service unit not found.`));for(let e of A(p.runtime))a.error(d(e))}else if(p.loaded&&p.runtime?.status===`stopped`){a.error(d(`Service is loaded but not running (likely exited immediately).`));for(let e of A(p.runtime,p.command?.environment??process.env))a.error(d(e));f()}if(p.runtime?.cachedLabel){let e=ne((p.command?.environment??process.env).OPENCLAW_PROFILE);a.error(d(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${e}`)),a.error(d(`Then reinstall: ${b(`openclaw gateway install`)}`)),f()}for(let t of it(e,m?.ok))a.error(d(t));if(e.port){let t=at(e);t.length>0&&a.log(`${o(`Listening:`)} ${c(t.join(`, `))}`)}if(e.portCli&&e.portCli.port!==e.port?.port&&a.log(`${o(`Note:`)} CLI config resolves gateway port=${e.portCli.port} (${e.portCli.status}).`),p.loaded&&p.runtime?.status===`running`&&e.port&&e.port.status!==`busy`){if(a.error(d(`Gateway port ${e.port.port} is not listening (service appears running).`)),e.lastError&&a.error(`${d(`Last gateway error:`)} ${e.lastError}`),process.platform===`linux`){let e=T((p.command?.environment??process.env).OPENCLAW_PROFILE);a.error(d(`Logs: journalctl --user -u ${e}.service -n 200 --no-pager`))}else if(process.platform===`darwin`){let e=he(p.command?.environment??process.env);a.error(`${d(`Logs:`)} ${S(e.stdoutPath)}`),a.error(`${d(`Errors:`)} ${S(e.stderrPath)}`)}f()}if(h.length>0){a.error(d(`Other gateway-like services detected (best effort):`));for(let e of h)a.error(`- ${d(e.label)} (${e.scope}, ${e.detail})`);for(let e of Ie())a.error(`${d(`Cleanup hint:`)} ${e}`);f()}h.length>0&&(a.error(d(`Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).`)),a.error(d(`If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).`)),f()),a.log(`${o(`Troubles:`)} run ${b(`openclaw status`)}`),a.log(`${o(`Troubleshooting:`)} https://docs.openclaw.ai/troubleshooting`)}async function ct(e){try{st(await rt({rpc:e.rpc,probe:!!e.probe,deep:!!e.deep}),{json:!!e.json})}catch(e){let n=i();a.error(r(n,t.error,`Gateway status failed: ${String(e)}`)),a.exit(1)}}function lt(e,t){let n=E(t,`force`),r=E(t,`port`),i=E(t,`token`);return{...e,force:!!(e.force||n),port:e.port??r,token:e.token??i}}function ut(e,t){let n=E(t,`token`),r=E(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function $(e,t){e.command(`status`).description(t?.statusDescription??`Show gateway service status + probe the Gateway`).option(`--url <url>`,`Gateway WebSocket URL (defaults to config/remote/local)`).option(`--token <token>`,`Gateway token (if required)`).option(`--password <password>`,`Gateway password (password auth)`).option(`--timeout <ms>`,`Timeout in ms`,`10000`).option(`--no-probe`,`Skip RPC probe`).option(`--deep`,`Scan system-level services`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await ct({rpc:ut(e,t),probe:!!e.probe,deep:!!e.deep,json:!!e.json})}),e.command(`install`).description(`Install the Gateway service (launchd/systemd/schtasks)`).option(`--port <port>`,`Gateway port`).option(`--runtime <runtime>`,`Daemon runtime (node|bun). Default: node`).option(`--token <token>`,`Gateway token (token auth)`).option(`--force`,`Reinstall/overwrite if already installed`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await P(lt(e,t))}),e.command(`uninstall`).description(`Uninstall the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Ye(e)}),e.command(`start`).description(`Start the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Xe(e)}),e.command(`stop`).description(`Stop the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Ze(e)}),e.command(`restart`).description(`Restart the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await Z(e)})}function dt(e){$(e.command(`daemon`).description(`Manage the Gateway service (launchd/systemd/schtasks)`).addHelpText(`after`,()=>`\n${t.muted(`Docs:`)} ${ce(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`),{statusDescription:`Show service install status + probe the Gateway`})}var ft=e({registerDaemonCli:()=>dt});export{W as a,F as c,U as i,P as l,$ as n,V as o,Z as r,I as s,ft as t};
2
- //# sourceMappingURL=daemon-cli-CEHkT-54.js.map
@@ -53,4 +53,3 @@ fi
53
53
  `)}function zE(e){return sE(e,{escapeMode:`backslash`})}function BE(e){let t=e.trim();if(!t)return null;let n=(()=>{if(!(t.startsWith(`"`)&&t.endsWith(`"`)))return t;let e=``,n=!1;for(let r of t.slice(1,-1)){if(n){e+=r,n=!1;continue}if(r===`\\\\`){n=!0;continue}e+=r}return e})(),r=n.indexOf(`=`);if(r<=0)return null;let i=n.slice(0,r).trim();return i?{key:i,value:n.slice(r+1)}:null}function VE(e,t){let n=FT(zT(e));return i.posix.join(n,`.config`,`systemd`,`user`,`${t}.service`)}function HE(e){let t=e.OPENCLAW_SYSTEMD_UNIT?.trim();return t?t.endsWith(`.service`)?t.slice(0,-8):t:In(e.OPENCLAW_PROFILE)}function UE(e){return VE(e,HE(e))}function WE(e){return UE(e)}async function GE(e){let t=UE(e);try{let n=await l.readFile(t,`utf8`),r=``,i=``,a={},o=[];for(let e of n.split(`
54
54
  `)){let t=e.trim();if(!(!t||t.startsWith(`#`))){if(t.startsWith(`ExecStart=`))r=t.slice(10).trim();else if(t.startsWith(`WorkingDirectory=`))i=t.slice(17).trim();else if(t.startsWith(`Environment=`)){let e=BE(t.slice(12).trim());e&&(a[e.key]=e.value)}else if(t.startsWith(`EnvironmentFile=`)){let e=t.slice(16).trim();e&&o.push(e)}}}if(!r)return null;let s=await ZE({environmentFileSpecs:o,env:e,unitPath:t}),c={...a,...s.environment},u={...KE(a,`inline`),...KE(s.environment,`file`)};return{programArguments:zE(r),...i?{workingDirectory:i}:{},...Object.keys(c).length>0?{environment:c}:{},...Object.keys(u).length>0?{environmentValueSources:u}:{},sourcePath:t}}catch{return null}}function KE(e,t){return Object.fromEntries(Object.keys(e).map(e=>[e,t]))}function qE(e,t){return e.replaceAll(`%h`,FT(zT(t)))}function JE(e){return sE(e,{escapeMode:`backslash`}).map(e=>e.trim()).filter(Boolean)}function YE(e){let t=e.trim();if(!t||t.startsWith(`#`)||t.startsWith(`;`))return null;let n=t.indexOf(`=`);if(n<=0)return null;let r=t.slice(0,n).trim();if(!r)return null;let i=t.slice(n+1).trim();return i.length>=2&&(i.startsWith(`"`)&&i.endsWith(`"`)||i.startsWith(`'`)&&i.endsWith(`'`))&&(i=i.slice(1,-1)),{key:r,value:i}}async function XE(e){let t={},n=await l.readFile(e,`utf8`);for(let e of n.split(/\r?\n/)){let n=YE(e);n&&(t[n.key]=n.value)}return t}async function ZE(e){let t={};if(e.environmentFileSpecs.length===0)return{environment:t};let n=i.posix.dirname(e.unitPath);for(let r of e.environmentFileSpecs)for(let a of JE(r)){let r=a.startsWith(`-`)?a.slice(1).trim():a;if(!r)continue;let o=qE(r,e.env),s=i.posix.isAbsolute(o)?o:i.posix.resolve(n,o);try{let e=await XE(s);Object.assign(t,e)}catch{continue}}return{environment:t}}function QE(e){let t=HT(e,`=`),n={},r=t.activestate;r&&(n.activeState=r);let i=t.substate;i&&(n.subState=i);let a=t.mainpid;if(a){let e=tf(a);e!==void 0&&(n.mainPid=e)}let o=t.execmainstatus;if(o){let e=ef(o);e!==void 0&&(n.execMainStatus=e)}let s=t.execmaincode;return s&&(n.execMainCode=s),n}async function $E(e){return await CT(`systemctl`,e)}function eD(e){return`${e.stderr} ${e.stdout}`.trim()}function tD(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`not found`)||t.includes(`no such file or directory`)||t.includes(`spawn systemctl enoent`)||t.includes(`spawn systemctl eacces`)}function nD(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`disabled`)||t.includes(`static`)||t.includes(`indirect`)||t.includes(`masked`)||t.includes(`not-found`)||t.includes(`could not be found`)||t.includes(`failed to get unit file state`)}function rD(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`failed to connect to bus`)||t.includes(`failed to connect to user scope bus`)||t.includes(`dbus_session_bus_address`)||t.includes(`xdg_runtime_dir`)||t.includes(`no medium found`)}function iD(e){if(!e)return!1;let t=e.toLowerCase();return tD(t)||rD(t)||t.includes(`not been booted`)||t.includes(`not supported`)}function aD(e){if(!e)return!1;let t=e.toLowerCase().trim();return t.startsWith(`command failed: systemctl`)&&t.includes(` is-enabled `)&&!t.includes(`permission denied`)&&!t.includes(`access denied`)&&!t.includes(`no space left`)&&!t.includes(`read-only file system`)&&!t.includes(`out of memory`)&&!t.includes(`cannot allocate memory`)}function oD(e){let t=e instanceof Error?e.message:typeof e==`string`?e:``;if(!t)return!1;let n=t.toLowerCase();return rD(n)||aD(n)}function sD(){return[`--user`]}function cD(e){let t=e.SUDO_USER?.trim();if(t&&t!==`root`)return t;let n=e.USER?.trim()||e.LOGNAME?.trim();if(n)return n;try{return r.userInfo().username}catch{return null}}function lD(e){let t=e.trim();return t?[`--machine`,`${t}@`,`--user`]:[]}function uD(e){let t=e.toLowerCase();return t.includes(`failed to connect to bus`)||t.includes(`failed to connect to user scope bus`)||t.includes(`dbus_session_bus_address`)||t.includes(`xdg_runtime_dir`)}async function dD(e,t){let n=cD(e),r=e.SUDO_USER?.trim();if(r&&r!==`root`&&n){let e=lD(n);if(e.length>0)return await $E([...e,...t])}let i=await $E([...sD(),...t]);if(i.code===0)return i;let a=`${i.stderr} ${i.stdout}`.trim();if(!n||!uD(a))return i;let o=lD(n);return o.length===0?i:await $E([...o,...t])}async function fD(e=process.env){let t=await dD(e,[`status`]);if(t.code===0)return!0;let n=`${t.stderr} ${t.stdout}`.trim();return n?!iD(n):!1}async function pD(e=process.env){let t=await dD(e,[`status`]);if(t.code===0)return;let n=eD(t);if(tD(n))throw Error(`systemctl not available; systemd user services are required on Linux.`);if(!n)throw Error(`systemctl --user unavailable: unknown error`);if(iD(n))throw Error(`systemctl --user unavailable: ${n||`unknown error`}`.trim())}async function mD({env:e,stdout:t,programArguments:n,workingDirectory:r,environment:a,description:o}){await pD(e);let s=UE(e);await l.mkdir(i.dirname(s),{recursive:!0});let c=!1;try{await l.access(s);let e=`${s}.bak`;await l.copyFile(s,e),c=!0}catch{}let u=RE({description:zn({env:e,environment:a,description:o}),programArguments:n,workingDirectory:r,environment:a});await l.writeFile(s,u,`utf8`);let d=`${In(e.OPENCLAW_PROFILE)}.service`,f=await dD(e,[`daemon-reload`]);if(f.code!==0)throw Error(`systemctl daemon-reload failed: ${f.stderr||f.stdout}`.trim());let p=await dD(e,[`enable`,d]);if(p.code!==0)throw Error(`systemctl enable failed: ${p.stderr||p.stdout}`.trim());let m=await dD(e,[`restart`,d]);if(m.code!==0)throw Error(`systemctl restart failed: ${m.stderr||m.stdout}`.trim());return IT(t,[{label:`Installed systemd service`,value:s},...c?[{label:`Previous unit backed up to`,value:`${s}.bak`}]:[]],{leadingBlankLine:!0}),{unitPath:s}}async function hD({env:e,stdout:t}){await pD(e),await dD(e,[`disable`,`--now`,`${In(e.OPENCLAW_PROFILE)}.service`]);let n=UE(e);try{await l.unlink(n),t.write(`${Y(`Removed systemd service`,n)}\n`)}catch{t.write(`Systemd service not found at ${n}\n`)}}async function gD(e){let t=e.env??process.env;await pD(t);let n=`${HE(t)}.service`,r=await dD(t,[e.action,n]);if(r.code!==0)throw Error(`systemctl ${e.action} failed: ${r.stderr||r.stdout}`.trim());e.stdout.write(`${Y(e.label,n)}\n`)}async function _D({stdout:e,env:t}){await gD({stdout:e,env:t,action:`stop`,label:`Stopped systemd service`})}async function vD({stdout:e,env:t}){return await gD({stdout:e,env:t,action:`restart`,label:`Restarted systemd service`}),{outcome:`completed`}}async function yD(e){let t=e.env??process.env;try{await l.access(UE(t))}catch(e){if(e.code===`ENOENT`)return!1;throw e}let n=await dD(t,[`is-enabled`,`${HE(t)}.service`]);if(n.code===0)return!0;let r=eD(n);if(tD(r)||nD(r))return!1;throw Error(`systemctl is-enabled unavailable: ${r||`unknown error`}`.trim())}async function bD(e=process.env){try{await pD(e)}catch(e){return{status:`unknown`,detail:e instanceof Error?e.message:String(e)}}let t=await dD(e,[`show`,`${HE(e)}.service`,`--no-page`,`--property`,`ActiveState,SubState,MainPID,ExecMainStatus,ExecMainCode`]);if(t.code!==0){let e=(t.stderr||t.stdout).trim(),n=e.toLowerCase().includes(`not found`);return{status:n?`stopped`:`unknown`,detail:e||void 0,missingUnit:n}}let n=QE(t.stdout||``),r=n.activeState?.toLowerCase();return{status:r===`active`?`running`:r?`stopped`:`unknown`,state:n.activeState,subState:n.subState,pid:n.mainPid,lastExitStatus:n.execMainStatus,lastExitReason:n.execMainCode}}function xD(e){return async t=>{await e(t)}}function SD(e,t){return t.outcome===`scheduled`?{scheduled:!0,daemonActionResult:`scheduled`,message:`restart scheduled, ${e.toLowerCase()} will restart momentarily`,progressMessage:`${e} service restart scheduled.`}:{scheduled:!1,daemonActionResult:`restarted`,message:`${e} service restarted.`,progressMessage:`${e} service restarted.`}}const CD={darwin:{label:`LaunchAgent`,loadedText:`loaded`,notLoadedText:`not loaded`,install:xD(aE),uninstall:tE,stop:iE,restart:oE,isLoaded:QT,readCommand:qT,readRuntime:eE},linux:{label:`systemd`,loadedText:`enabled`,notLoadedText:`disabled`,install:xD(mD),uninstall:hD,stop:_D,restart:vD,isLoaded:yD,readCommand:GE,readRuntime:bD},win32:{label:`Scheduled Task`,loadedText:`registered`,notLoadedText:`missing`,install:xD(DE),uninstall:OE,stop:AE,restart:jE,isLoaded:ME,readCommand:bE,readRuntime:NE}};function wD(e){return Object.hasOwn(CD,e)}function TD(){if(wD(process.platform))return CD[process.platform];throw Error(`Gateway service install not supported on ${process.platform}`)}function ED(e){M.log(JSON.stringify(e,null,2))}function Q(e,t){return{label:e.label,loaded:t,loadedText:e.loadedText,notLoadedText:e.notLoadedText}}function DD(){return new ce({write(e,t,n){n()}})}function OD(e){let t=[],n=e.json?DD():process.stdout,r=n=>{e.json&&ED({action:e.action,...n,warnings:n.warnings??(t.length?t:void 0)})};return{stdout:n,warnings:t,emit:r,fail:(t,n)=>{if(e.json)r({ok:!1,error:t,hints:n});else if(M.error(t),n?.length)for(let e of n)M.log(`Tip: ${e}`);M.exit(1)}}}async function kD(e){try{await e.install()}catch(t){e.fail(`${e.serviceNoun} install failed: ${String(t)}`);return}let t=!0;try{t=await e.service.isLoaded({env:process.env})}catch{t=!0}e.emit({ok:!0,result:`installed`,service:Q(e.service,t),warnings:e.warnings.length?e.warnings:void 0})}function AD({status:e,pid:t,state:n,details:r=[]}){let i=e??`unknown`,a=[];t&&a.push(`pid ${t}`),n&&n.toLowerCase()!==i&&a.push(`state ${n}`);for(let e of r)e&&a.push(e);return a.length>0?`${i} (${a.join(`, `)})`:i}function jD(e){if(!e)return null;let t=[];return e.subState&&t.push(`sub ${e.subState}`),e.lastExitStatus!==void 0&&t.push(`last exit ${e.lastExitStatus}`),e.lastExitReason&&t.push(`reason ${e.lastExitReason}`),e.lastRunResult&&t.push(`last run ${e.lastRunResult}`),e.lastRunTime&&t.push(`last run time ${e.lastRunTime}`),e.detail&&t.push(e.detail),AD({status:e.status,pid:e.pid,state:e.state,details:t})}function MD(e){return FT(e).replace(/^[A-Za-z]:/,``)}function ND(e){let t=e.platform??process.platform,n=e.env??process.env;if(t===`darwin`){let e=KT(n);return[`Launchd stdout (if installed): ${MD(e.stdoutPath)}`,`Launchd stderr (if installed): ${MD(e.stderrPath)}`]}return t===`linux`?[`Logs: journalctl --user -u ${e.systemdServiceName}.service -n 200 --no-pager`]:t===`win32`?[`Logs: schtasks /Query /TN "${e.windowsTaskName}" /V /FO LIST`]:[]}function PD(e){let t=e.platform??process.platform,n=[e.installCommand,e.startCommand];switch(t){case`darwin`:return[...n,`launchctl bootstrap gui/$UID ${e.launchAgentPlistPath}`];case`linux`:return[...n,`systemctl --user start ${e.systemdServiceName}.service`];case`win32`:return[...n,`schtasks /Run /TN "${e.windowsTaskName}"`];default:return n}}function FD(e){return e==null?null:tf(e)??null}function ID(){let e=At();return{rich:e,label:t=>jt(e,D.muted,t),accent:t=>jt(e,D.accent,t),infoText:t=>jt(e,D.info,t),okText:t=>jt(e,D.success,t),warnText:t=>jt(e,D.warn,t),errorText:t=>jt(e,D.error,t)}}function LD(e){let t=e??`unknown`;return t===`running`?D.success:t===`stopped`?D.error:t===`unknown`?D.muted:D.warn}function RD(e){if(!e?.length)return null;for(let t=0;t<e.length;t+=1){let n=e[t];if(n===`--port`){let n=e[t+1],r=FD(n);if(r)return r}if(n?.startsWith(`--port=`)){let e=FD(n.split(`=`,2)[1]);if(e)return e}}return null}function zD(e,t,n){return e===`custom`&&n?.trim()?n.trim():e===`tailnet`?t??`127.0.0.1`:`127.0.0.1`}const BD=[`OPENCLAW_PROFILE`,`OPENCLAW_STATE_DIR`,`OPENCLAW_CONFIG_PATH`,`OPENCLAW_GATEWAY_PORT`,`OPENCLAW_NIX_MODE`];function VD(e){if(!e)return{};let t={};for(let n of BD){let r=e[n];r?.trim()&&(t[n]=r.trim())}return t}function HD(e){let t=VD(e);return Object.entries(t).map(([e,t])=>`${e}=${t}`)}function UD(e){let t=e.trim();return t&&(t=t.replace(/^TCP\s+/i,``),t=t.replace(/\s+\(LISTEN\)\s*$/i,``),t.trim())}function WD(e,t=process.env){if(!e)return[];let n=[],r=(()=>{try{return xt().file}catch{return null}})();return e.missingUnit?(n.push(`Service not installed. Run: ${j(`openclaw gateway install`,t)}`),r&&n.push(`File logs: ${r}`),n):(e.status===`stopped`&&(r&&n.push(`File logs: ${r}`),n.push(...ND({env:t,systemdServiceName:In(t.OPENCLAW_PROFILE),windowsTaskName:Ln(t.OPENCLAW_PROFILE)}))),n)}function GD(e=process.env){let t=e.OPENCLAW_PROFILE;return PD({installCommand:j(`openclaw gateway install`,e),startCommand:j(`openclaw gateway`,e),launchAgentPlistPath:`~/Library/LaunchAgents/${Pn(t)}.plist`,systemdServiceName:In(t),windowsTaskName:Ln(t)})}async function KD(e){let t=!!e.json,{stdout:n,warnings:r,emit:i,fail:a}=OD({action:`install`,json:t});if(_e(process.env)){a(`Nix mode detected; service install is disabled.`);return}let o=await jb(),s=FD(e.port);if(e.port!==void 0&&s===null){a(`Invalid port`);return}let c=s??Ne(o);if(!Number.isFinite(c)||c<=0){a(`Invalid port`);return}let l=e.runtime?String(e.runtime):`node`;if(!qr(l)){a(`Invalid --runtime (use "node" or "bun")`);return}let u=TD(),d=!1;try{d=await u.isLoaded({env:process.env})}catch(e){if(oD(e))d=!1;else{a(`Gateway service check failed: ${String(e)}`);return}}if(d&&!e.force){i({ok:!0,result:`already-installed`,message:`Gateway service already ${u.loadedText}.`,service:Q(u,d)}),t||(M.log(`Gateway service already ${u.loadedText}.`),M.log(`Reinstall with: ${j(`openclaw gateway install --force`)}`));return}let f=await ST({config:o,env:process.env,explicitToken:e.token,autoGenerateWhenMissing:!0,persistGeneratedToken:!0});if(f.unavailableReason){a(`Gateway install blocked: ${f.unavailableReason}`);return}for(let e of f.warnings)t?r.push(e):M.log(e);let{programArguments:p,workingDirectory:m,environment:h}=await Kr({env:process.env,port:c,runtime:l,warn:e=>{t?r.push(e):M.log(e)},config:o});await kD({serviceNoun:`Gateway`,service:u,warnings:r,emit:i,fail:a,install:async()=>{await u.install({env:process.env,stdout:n,programArguments:p,workingDirectory:m,environment:h})}})}function qD(e,t){let{commands:n}=e??{};if(!(!O(n)||!Object.hasOwn(n,t)))return n[t]}function JD(e){return qD(e,`restart`)!==!1}async function YD(e){let t=Date.now(),n=y(),r=null,i=null,a=null;return await new Promise(o=>{let s=!1,c=t=>{s||(s=!0,clearTimeout(u),l.stop(),o({url:e.url,...t}))},l=new Tw({url:e.url,token:e.auth?.token,password:e.auth?.password,scopes:[Dw],clientName:Ld.CLI,clientVersion:`dev`,mode:Rd.PROBE,instanceId:n,onConnectError:e=>{i=td(e)},onClose:(e,t)=>{a={code:e,reason:t}},onHelloOk:async()=>{r=Date.now()-t;try{let[e,t,n,i]=await Promise.all([l.request(`health`),l.request(`status`),l.request(`system-presence`),l.request(`config.get`,{})]);c({ok:!0,connectLatencyMs:r,error:null,close:a,health:e,status:t,presence:Array.isArray(n)?n:null,configSnapshot:i})}catch(e){c({ok:!1,connectLatencyMs:r,error:td(e),close:a,health:null,status:null,presence:null,configSnapshot:null})}}}),u=setTimeout(()=>{c({ok:!1,connectLatencyMs:r,error:i?`connect failed: ${i}`:`timeout`,close:a,health:null,status:null,presence:null,configSnapshot:null})},Math.max(250,e.timeoutMs));l.start()})}function XD(e){return e.replaceAll(`\\`,`/`).toLowerCase()}function ZD(e){return e.split(`\0`).map(e=>e.trim()).filter(Boolean)}function QD(e,t){let n=e.map(XD);if(!n.includes(`gateway`))return!1;let r=[`dist/index.js`,`dist/entry.js`,`openclaw.mjs`,`scripts/run-node.mjs`,`src/index.ts`];if(n.some(e=>r.some(t=>e.endsWith(t))))return!0;let i=(n[0]??``).replace(/\.(bat|cmd|exe)$/i,``);return i.endsWith(`/openclaw`)||i===`openclaw`||t?.allowGatewayBinary===!0&&i.endsWith(`/openclaw-gateway`)}const $D=wi(`restart`);function eO(e){let t=[],n,r;for(let i of e.split(/\r?\n/).filter(Boolean))if(i.startsWith(`p`)){n!=null&&r&&r.toLowerCase().includes(`openclaw`)&&t.push(n);let e=Number.parseInt(i.slice(1),10);n=Number.isFinite(e)&&e>0?e:void 0,r=void 0}else i.startsWith(`c`)&&(r=i.slice(1));return n!=null&&r&&r.toLowerCase().includes(`openclaw`)&&t.push(n),[...new Set(t)].filter(e=>e!==process.pid)}function tO(e,t=2e3){if(process.platform===`win32`)return[];let n=p(gd(),[`-nP`,`-iTCP:${e}`,`-sTCP:LISTEN`,`-Fpc`],{encoding:`utf8`,timeout:t});if(n.error){let t=n.error.code,r=t&&t.trim().length>0?t:n.error instanceof Error?n.error.message:`unknown error`;return $D.warn(`lsof failed during initial stale-pid scan for port ${e}: ${r}`),[]}return n.status===1?[]:n.status===0?eO(n.stdout):($D.warn(`lsof exited with status ${n.status} during initial stale-pid scan for port ${e}; skipping stale pid check`),[])}function nO(e){return typeof e==`string`&&e.trim()||`<root>`}function rO(e,t){return t?.normalizeRoot?nO(e):typeof e==`string`?e:``}function iO(e,t=`-`,n){return`${t?`${t} `:``}${Gi(rO(e.path,n))}: ${Gi(e.message)}`}function aO(e,t=`-`,n){return e.map(e=>iO(e,t,n))}const $={gatewayCommandMissing:`gateway-command-missing`,gatewayEntrypointMismatch:`gateway-entrypoint-mismatch`,gatewayPathMissing:`gateway-path-missing`,gatewayPathMissingDirs:`gateway-path-missing-dirs`,gatewayPathNonMinimal:`gateway-path-nonminimal`,gatewayTokenEmbedded:`gateway-token-embedded`,gatewayTokenMismatch:`gateway-token-mismatch`,gatewayRuntimeBun:`gateway-runtime-bun`,gatewayRuntimeNodeVersionManager:`gateway-runtime-node-version-manager`,gatewayRuntimeNodeSystemMissing:`gateway-runtime-node-system-missing`,gatewayTokenDrift:`gateway-token-drift`,launchdKeepAlive:`launchd-keep-alive`,launchdRunAtLoad:`launchd-run-at-load`,systemdAfterNetworkOnline:`systemd-after-network-online`,systemdRestartSec:`systemd-restart-sec`,systemdWantsNetworkOnline:`systemd-wants-network-online`};function oO(e){return!!e?.some(e=>e===`gateway`)}function sO(e){let t=new Set,n=new Set,r;for(let i of e.split(/\r?\n/)){let e=i.trim();if(!e||e.startsWith(`#`)||e.startsWith(`;`)||e.startsWith(`[`))continue;let a=e.indexOf(`=`);if(a<=0)continue;let o=e.slice(0,a).trim(),s=e.slice(a+1).trim();if(s)if(o===`After`)for(let e of s.split(/\s+/))e&&t.add(e);else if(o===`Wants`)for(let e of s.split(/\s+/))e&&n.add(e);else o===`RestartSec`&&(r=s)}return{after:t,wants:n,restartSec:r}}function cO(e){if(!e)return!1;let t=Number.parseFloat(e);return Number.isFinite(t)?Math.abs(t-5)<.01:!1}async function lO(e,t){let n=WE(e),r=``;try{r=await l.readFile(n,`utf8`)}catch{return}let i=sO(r);i.after.has(`network-online.target`)||t.push({code:$.systemdAfterNetworkOnline,message:`Missing systemd After=network-online.target`,detail:n,level:`recommended`}),i.wants.has(`network-online.target`)||t.push({code:$.systemdWantsNetworkOnline,message:`Missing systemd Wants=network-online.target`,detail:n,level:`recommended`}),cO(i.restartSec)||t.push({code:$.systemdRestartSec,message:`RestartSec does not match the recommended 5s`,detail:n,level:`recommended`})}async function uO(e,t){let n=GT(e),r=``;try{r=await l.readFile(n,`utf8`)}catch{return}let i=/<key>RunAtLoad<\/key>\s*<true\s*\/>/i.test(r),a=/<key>KeepAlive<\/key>\s*<true\s*\/>/i.test(r);i||t.push({code:$.launchdRunAtLoad,message:`LaunchAgent is missing RunAtLoad=true`,detail:n,level:`recommended`}),a||t.push({code:$.launchdKeepAlive,message:`LaunchAgent is missing KeepAlive=true`,detail:n,level:`recommended`})}function dO(e,t){!e||e.length===0||oO(e)||t.push({code:$.gatewayCommandMissing,message:`Service command does not include the gateway subcommand`,level:`aggressive`})}function fO(e,t,n){let r=pO(e);if(!r)return;t.push({code:$.gatewayTokenEmbedded,message:`Gateway service embeds OPENCLAW_GATEWAY_TOKEN and should be reinstalled.`,detail:"Run `openclaw gateway install --force` to remove embedded service token.",level:`recommended`});let i=n?.trim();!i||r===i||t.push({code:$.gatewayTokenMismatch,message:`Gateway service OPENCLAW_GATEWAY_TOKEN does not match gateway.auth.token in openclaw.json`,detail:`service token is stale`,level:`recommended`})}function pO(e){if(e&&e.environmentValueSources?.OPENCLAW_GATEWAY_TOKEN!==`file`)return e.environment?.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0}function mO(e){return e===`win32`?i.win32:i.posix}function hO(e,t){let n=mO(t).normalize(e).replaceAll(`\\`,`/`);return t===`win32`?n.toLowerCase():n}function gO(e,t,n,r){if(r===`win32`)return;let i=e?.environment?.PATH;if(!i){t.push({code:$.gatewayPathMissing,message:`Gateway service PATH is not set; the daemon should use a minimal PATH.`,level:`recommended`});return}let a=ur({platform:r,env:n}),o=i.split(mO(r).delimiter).map(e=>e.trim()).filter(Boolean),s=new Set(o.map(e=>hO(e,r))),c=new Set(a.map(e=>hO(e,r))),l=a.filter(e=>{let t=hO(e,r);return!s.has(t)});l.length>0&&t.push({code:$.gatewayPathMissingDirs,message:`Gateway service PATH missing required dirs: ${l.join(`, `)}`,level:`recommended`});let u=o.filter(e=>{let t=hO(e,r);return c.has(t)?!1:t.includes(`/.nvm/`)||t.includes(`/.fnm/`)||t.includes(`/.volta/`)||t.includes(`/.asdf/`)||t.includes(`/.n/`)||t.includes(`/.nodenv/`)||t.includes(`/.nodebrew/`)||t.includes(`/nvs/`)||t.includes(`/.local/share/pnpm/`)||t.includes(`/pnpm/`)||t.endsWith(`/pnpm`)});u.length>0&&t.push({code:$.gatewayPathNonMinimal,message:`Gateway service PATH includes version managers or package managers; recommend a minimal PATH.`,detail:u.join(`, `),level:`recommended`})}async function _O(e,t,n,r){let i=t?.programArguments?.[0];if(i){if(Le(i)){n.push({code:$.gatewayRuntimeBun,message:`Gateway service uses Bun; Bun is incompatible with WhatsApp + Telegram channels.`,detail:i,level:`recommended`});return}Ie(i)&&Ir(i,r)&&(n.push({code:$.gatewayRuntimeNodeVersionManager,message:`Gateway service uses Node from a version manager; it can break after upgrades.`,detail:i,level:`recommended`}),Lr(i,e,r)||await Rr(e,r)||n.push({code:$.gatewayRuntimeNodeSystemMissing,message:`System Node 22+ not found; install it before migrating away from version managers.`,level:`recommended`}))}}function vO(e){let t=e.serviceToken?.trim()||void 0,n=e.configToken?.trim()||void 0;return t&&n&&t!==n?{code:$.gatewayTokenDrift,message:`Config token differs from service token. The daemon will use the old token after restart.`,detail:"Run `openclaw gateway install --force` to sync the token.",level:`recommended`}:null}async function yO(e){let t=[],n=e.platform??process.platform;return dO(e.command?.programArguments,t),fO(e.command,t,e.expectedGatewayToken),gO(e.command,t,e.env,n),await _O(e.env,e.command,t,n),n===`linux`?await lO(e.env,t):n===`darwin`&&await uO(e.env,t),{ok:t.length===0,issues:t}}function bO(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`systemctl --user unavailable`)||t.includes(`systemctl not available`)||t.includes(`not been booted with systemd`)||t.includes(`failed to connect to bus`)||t.includes(`systemd user services are required`)}function xO(e={}){return e.wsl?[`WSL2 needs systemd enabled: edit /etc/wsl.conf with [boot]\\nsystemd=true`,`Then run: wsl --shutdown (from PowerShell) and reopen your distro.`,`Verify: systemctl --user status`]:[`systemd user services are unavailable; install/enable systemd or run the gateway under your supervisor.`,`If you're in a container, run the gateway in the foreground instead of \`${j(`openclaw gateway`)}\`.`]}function SO(e){return e.env,Xl({cfg:e.cfg}).token}async function CO(e){return process.platform!==`linux`||await fD().catch(()=>!1)?e:[...e,...xO({wsl:await vT()})]}function wO(e){let t=e.json?DD():process.stdout,n=t=>{e.json&&ED({action:e.action,...t})};return{stdout:t,emit:n,fail:(t,r)=>{e.json?n({ok:!1,error:t,hints:r}):M.error(t),M.exit(1)}}}async function TO(e){let t=await CO(e.renderStartHints());if(e.emit({ok:!0,result:`not-loaded`,message:`${e.serviceNoun} service ${e.service.notLoadedText}.`,hints:t,service:Q(e.service,e.loaded)}),!e.json){M.log(`${e.serviceNoun} service ${e.service.notLoadedText}.`);for(let e of t)M.log(`Start with: ${e}`)}}async function EO(e){try{return await e.service.isLoaded({env:process.env})}catch(t){return e.fail(`${e.serviceNoun} service check failed: ${String(t)}`),null}}async function DO(){try{let e=await Mb();return!e.exists||e.valid?null:e.issues.length>0?aO(e.issues,``,{normalizeRoot:!0}).join(`
55
55
  `):`Unknown validation issue.`}catch{return null}}async function OO(e){let{stdout:t,emit:n,fail:r}=wO({action:`uninstall`,json:!!e.opts?.json});if(_e(process.env)){r(`Nix mode detected; service uninstall is disabled.`);return}let i=!1;try{i=await e.service.isLoaded({env:process.env})}catch{i=!1}if(i&&e.stopBeforeUninstall)try{await e.service.stop({env:process.env,stdout:t})}catch{}try{await e.service.uninstall({env:process.env,stdout:t})}catch(t){r(`${e.serviceNoun} uninstall failed: ${String(t)}`);return}i=!1;try{i=await e.service.isLoaded({env:process.env})}catch{i=!1}if(i&&e.assertNotLoadedAfterUninstall){r(`${e.serviceNoun} service still loaded after uninstall.`);return}n({ok:!0,result:`uninstalled`,service:Q(e.service,i)})}async function kO(e){let t=!!e.opts?.json,{stdout:n,emit:r,fail:i}=wO({action:`start`,json:t}),a=await EO({serviceNoun:e.serviceNoun,service:e.service,fail:i});if(a===null)return;if(!a){await TO({serviceNoun:e.serviceNoun,service:e.service,loaded:a,renderStartHints:e.renderStartHints,json:t,emit:r});return}{let t=await DO();if(t){i(`${e.serviceNoun} aborted: config is invalid.\n${t}\nFix the config and retry, or run "openclaw doctor" to repair.`);return}}try{let i=await e.service.restart({env:process.env,stdout:n}),o=SD(e.serviceNoun,i);if(o.scheduled){r({ok:!0,result:o.daemonActionResult,message:o.message,service:Q(e.service,a)}),t||M.log(o.message);return}}catch(t){let n=e.renderStartHints();i(`${e.serviceNoun} start failed: ${String(t)}`,n);return}let o=!0;try{o=await e.service.isLoaded({env:process.env})}catch{o=!0}r({ok:!0,result:`started`,service:Q(e.service,o)})}async function AO(e){let t=!!e.opts?.json,{stdout:n,emit:r,fail:i}=wO({action:`stop`,json:t}),a=await EO({serviceNoun:e.serviceNoun,service:e.service,fail:i});if(a===null)return;if(!a){try{let a=await e.onNotLoaded?.({json:t,stdout:n,fail:i});if(a){r({ok:!0,result:a.result,message:a.message,warnings:a.warnings,service:Q(e.service,!1)}),!t&&a.message&&M.log(a.message);return}}catch(t){i(`${e.serviceNoun} stop failed: ${String(t)}`);return}r({ok:!0,result:`not-loaded`,message:`${e.serviceNoun} service ${e.service.notLoadedText}.`,service:Q(e.service,a)}),t||M.log(`${e.serviceNoun} service ${e.service.notLoadedText}.`);return}try{await e.service.stop({env:process.env,stdout:n})}catch(t){i(`${e.serviceNoun} stop failed: ${String(t)}`);return}let o=!1;try{o=await e.service.isLoaded({env:process.env})}catch{o=!1}r({ok:!0,result:`stopped`,service:Q(e.service,o)})}async function jO(e){let t=!!e.opts?.json,{stdout:n,emit:r,fail:i}=wO({action:`restart`,json:t}),a=[],o=null,s=await EO({serviceNoun:e.serviceNoun,service:e.service,fail:i});if(s===null)return!1;{let t=await DO();if(t)return i(`${e.serviceNoun} aborted: config is invalid.\n${t}\nFix the config and retry, or run "openclaw doctor" to repair.`),!1}if(!s){try{o=await e.onNotLoaded?.({json:t,stdout:n,fail:i})??null}catch(t){return i(`${e.serviceNoun} restart failed: ${String(t)}`),!1}if(!o)return await TO({serviceNoun:e.serviceNoun,service:e.service,loaded:s,renderStartHints:e.renderStartHints,json:t,emit:r}),!1;o.warnings?.length&&a.push(...o.warnings)}if(s&&e.checkTokenDrift)try{let n=(await e.service.readCommand(process.env))?.environment?.OPENCLAW_GATEWAY_TOKEN,r=vO({serviceToken:n,configToken:SO({cfg:await jb(),env:process.env})});if(r){let e=r.detail?`${r.message} ${r.detail}`:r.message;a.push(e),t||(M.log(`\n⚠️ ${r.message}`),r.detail&&M.log(` ${r.detail}\n`))}}catch(e){if(Ul(e,`gateway.auth.token`)){let e=`Unable to verify gateway token drift: gateway.auth.token SecretRef is configured but unavailable in this command path.`;a.push(e),t||M.log(`\n⚠️ ${e}\n`)}}try{let c={outcome:`completed`};s&&(c=await e.service.restart({env:process.env,stdout:n}));let l=SD(e.serviceNoun,c);if(l.scheduled)return r({ok:!0,result:l.daemonActionResult,message:l.message,service:Q(e.service,s),warnings:a.length?a:void 0}),t||M.log(l.message),!0;if(e.postRestartCheck){let o=await e.postRestartCheck({json:t,stdout:n,warnings:a,fail:i});if(o&&(l=SD(e.serviceNoun,o),l.scheduled))return r({ok:!0,result:l.daemonActionResult,message:l.message,service:Q(e.service,s),warnings:a.length?a:void 0}),t||M.log(l.message),!0}let u=s;if(s)try{u=await e.service.isLoaded({env:process.env})}catch{u=!0}return r({ok:!0,result:`restarted`,message:o?.message,service:Q(e.service,u),warnings:a.length?a:void 0}),!t&&o?.message&&M.log(o.message),!0}catch(t){let n=e.renderStartHints();return i(`${e.serviceNoun} restart failed: ${String(t)}`,n),!1}}function MO(e,t){if(!Number.isFinite(e)||e<=0)return;let n=NO(t?.graceMs);if(process.platform===`win32`){LO(e,n);return}FO(e,n)}function NO(e){return typeof e!=`number`||!Number.isFinite(e)?3e3:Math.max(0,Math.min(6e4,Math.floor(e)))}function PO(e){try{return process.kill(e,0),!0}catch{return!1}}function FO(e,t){try{process.kill(-e,`SIGTERM`)}catch{try{process.kill(e,`SIGTERM`)}catch{return}}setTimeout(()=>{if(PO(-e))try{process.kill(-e,`SIGKILL`);return}catch{}if(PO(e))try{process.kill(e,`SIGKILL`)}catch{}},t).unref()}function IO(e){try{f(`taskkill`,e,{stdio:`ignore`,detached:!0})}catch{}}function LO(e,t){IO([`/T`,`/PID`,String(e)]),setTimeout(()=>{PO(e)&&IO([`/F`,`/T`,`/PID`,String(e)])},t).unref()}function RO(e){return e.status!==`busy`||e.listeners.length>0?!1:e.errors?.length?!0:e.hints.some(e=>e.includes(`process details are unavailable`))}function zO(e){return e.listener.pid===e.runtimePid||e.listener.ppid===e.runtimePid}function BO(e,t){if(e!==1008)return!1;let n=(t??``).toLowerCase();return n.includes(`auth`)||n.includes(`token`)||n.includes(`password`)||n.includes(`scope`)||n.includes(`role`)}async function VO(e){let t=process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,n=process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0,r=await YD({url:`ws://127.0.0.1:${e}`,auth:t||n?{token:t,password:n}:void 0,timeoutMs:1e3});return r.ok||BO(r.close?.code,r.close?.reason)}async function HO(e){let t;try{t=await Nd(e)}catch(n){t={port:e,status:`unknown`,listeners:[],hints:[],errors:[String(n)]}}let n=!1;if(t.status===`busy`)try{n=await VO(e)}catch{}return{portUsage:t,healthy:n}}async function UO(e){let t=e.env??process.env,n={status:`unknown`};try{n=await e.service.readRuntime(t)}catch(e){n={status:`unknown`,detail:String(e)}}let r;try{r=await Nd(e.port)}catch(t){r={port:e.port,status:`unknown`,listeners:[],hints:[],errors:[String(t)]}}let i=r.status===`busy`?r.listeners.filter(t=>ld(t,e.port)===`gateway`):[],a=e.includeUnknownListenersAsStale&&process.platform===`win32`&&n.status!==`running`&&r.status===`busy`?r.listeners.filter(t=>ld(t,e.port)===`unknown`).map(e=>e.pid).filter(e=>Number.isFinite(e)):[],o=n.status===`running`,s=n.pid,c=RO(r),l=s==null?i.length>0||c:r.listeners.some(e=>zO({listener:e,runtimePid:s}))||c,u=o&&l;if(!u&&o&&r.status===`busy`)try{u=await VO(e.port)}catch{}let d=Array.from(new Set([...i.filter(e=>Number.isFinite(e.pid)).filter(e=>!o||s==null?!0:!zO({listener:e,runtimePid:s})).map(e=>e.pid),...a.filter(e=>n.pid==null||e!==n.pid||!o)]));return{runtime:n,portUsage:r,healthy:u,staleGatewayPids:d}}async function WO(e){let t=e.attempts??120,n=e.delayMs??500,r=await UO({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale});for(let i=0;i<t;i+=1){if(r.healthy||r.staleGatewayPids.length>0&&r.runtime.status!==`running`)return r;await It(n),r=await UO({service:e.service,port:e.port,env:e.env,includeUnknownListenersAsStale:e.includeUnknownListenersAsStale})}return r}async function GO(e){let t=e.attempts??120,n=e.delayMs??500,r=await HO(e.port);for(let i=0;i<t;i+=1){if(r.healthy)return r;await It(n),r=await HO(e.port)}return r}function KO(e){let t=[];return e.portUsage.status===`busy`?t.push(...fd(e.portUsage)):t.push(`Gateway port ${e.portUsage.port} status: ${e.portUsage.status}.`),e.portUsage.errors?.length&&t.push(`Port diagnostics errors: ${e.portUsage.errors.join(`; `)}`),t}function qO(e){let t=[],n=[e.runtime.status?`status=${e.runtime.status}`:null,e.runtime.state?`state=${e.runtime.state}`:null,e.runtime.pid==null?null:`pid=${e.runtime.pid}`,e.runtime.lastExitStatus==null?null:`lastExit=${e.runtime.lastExitStatus}`].filter(Boolean).join(`, `);return n&&t.push(`Service runtime: ${n}`),t.push(...KO(e)),t}function JO(e){return KO(e)}async function YO(e){let t=Array.from(new Set(e.filter(e=>Number.isFinite(e)&&e>0)));for(let e of t)MO(e,{graceMs:300});return t.length>0&&await It(500),t}async function XO(e=TD()){let t=await e.readCommand(process.env).catch(()=>null),n=t?.environment??void 0,r={...process.env,...n??void 0};return RD(t?.programArguments)??Ne(await jb(),r)}function ZO(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);for(let e of t)if(e.toLowerCase().startsWith(`commandline=`))return e.slice(12).trim()||null;return t.find(e=>e.toLowerCase()!==`commandline`)??null}function QO(e){if(process.platform===`linux`)try{return ZD(t.readFileSync(`/proc/${e}/cmdline`,`utf8`))}catch{return null}if(process.platform===`darwin`){let t=p(`ps`,[`-o`,`command=`,`-p`,String(e)],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=t.stdout.trim();return n?n.split(/\s+/):null}if(process.platform===`win32`){let t=p(`wmic`,[`process`,`where`,`ProcessId=${e}`,`get`,`CommandLine`,`/value`],{encoding:`utf8`,timeout:1e3});if(t.error||t.status!==0)return null;let n=ZO(t.stdout);return n?hE(n):null}return null}function $O(e){return Array.from(new Set(tO(e))).filter(e=>Number.isFinite(e)&&e>0).filter(e=>{let t=QO(e);return t!=null&&QD(t,{allowGatewayBinary:!0})})}function ek(){return jb().then(e=>Ne(e,process.env)).catch(()=>Ne(void 0,process.env))}function tk(e,t){let n=QO(e);if(!n||!QD(n,{allowGatewayBinary:!0}))throw Error(`refusing to signal non-gateway process pid ${e}`);process.kill(e,t)}function nk(e){return e.join(`, `)}async function rk(e){let t=await YD({url:`ws://127.0.0.1:${e}`,auth:{token:process.env.OPENCLAW_GATEWAY_TOKEN?.trim()||void 0,password:process.env.OPENCLAW_GATEWAY_PASSWORD?.trim()||void 0},timeoutMs:1e3}).catch(()=>null);if(t?.ok&&!JD(t.configSnapshot))throw Error(`Gateway restart is disabled in the running gateway config (commands.restart=false); unmanaged SIGUSR1 restart would be ignored`)}function ik(e){return $O(e).filter(e=>Number.isFinite(e)&&e>0)}async function ak(e){let t=ik(e);if(t.length===0)return null;for(let e of t)tk(e,`SIGTERM`);return{result:`stopped`,message:`Gateway stop signal sent to unmanaged process${t.length===1?``:`es`} on port ${e}: ${nk(t)}.`}}async function ok(e){await rk(e);let t=ik(e);if(t.length===0)return null;if(t.length>1)throw Error(`multiple gateway processes are listening on port ${e}: ${nk(t)}; use "openclaw gateway status --deep" before retrying restart`);return tk(t[0],`SIGUSR1`),{result:`restarted`,message:`Gateway restart signal sent to unmanaged process on port ${e}: ${t[0]}.`}}async function sk(e={}){return await OO({serviceNoun:`Gateway`,service:TD(),opts:e,stopBeforeUninstall:!0,assertNotLoadedAfterUninstall:!0})}async function ck(e={}){return await kO({serviceNoun:`Gateway`,service:TD(),renderStartHints:GD,opts:e})}async function lk(e={}){let t=TD(),n=await XO(t).catch(()=>ek());return await AO({serviceNoun:`Gateway`,service:t,opts:e,onNotLoaded:async()=>ak(n)})}async function uk(e={}){let t=!!e.json,n=TD(),r=!1,i=await XO(n).catch(()=>ek());return await jO({serviceNoun:`Gateway`,service:n,renderStartHints:GD,opts:e,checkTokenDrift:!0,onNotLoaded:async()=>{let e=await ok(i);return e&&(r=!0),e},postRestartCheck:async({warnings:e,fail:a,stdout:o})=>{if(r){let n=await GO({port:i,attempts:120,delayMs:500});if(n.healthy)return;let r=JO(n),o=`Timed out after 60s waiting for gateway port ${i} to become healthy.`;if(t)e.push(o),e.push(...r);else{M.log(D.warn(o));for(let e of r)M.log(D.muted(e))}a(`Gateway restart timed out after 60s waiting for health checks.`,[j(`openclaw gateway status --deep`),j(`openclaw doctor`)])}let s=await WO({service:n,port:i,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`});if(!s.healthy&&s.staleGatewayPids.length>0){let r=`Found stale gateway process(es): ${s.staleGatewayPids.join(`, `)}.`;e.push(r),t||(M.log(D.warn(r)),M.log(D.muted(`Stopping stale process(es) and retrying restart...`))),await YO(s.staleGatewayPids);let a=await n.restart({env:process.env,stdout:o});if(a.outcome===`scheduled`)return a;s=await WO({service:n,port:i,attempts:120,delayMs:500,includeUnknownListenersAsStale:process.platform===`win32`})}if(s.healthy)return;let c=qO(s),l=`Timed out after 60s waiting for gateway port ${i} to become healthy.`,u=s.runtime.status===`running`&&s.portUsage.status===`free`?`Gateway process is running but port ${i} is still free (startup hang/crash loop or very slow VM startup).`:null;if(t)e.push(l),u&&e.push(u),e.push(...c);else{M.log(D.warn(l)),u&&M.log(D.warn(u));for(let e of c)M.log(D.muted(e))}a(`Gateway restart timed out after 60s waiting for health checks.`,[j(`openclaw gateway status --deep`),j(`openclaw doctor`)])}})}const dk=[/refusing to bind gateway/i,/gateway auth mode/i,/gateway start blocked/i,/failed to bind gateway socket/i,/tailscale .* requires/i];async function fk(e){try{let t=(await l.readFile(e,`utf8`)).split(/\r?\n/).map(e=>e.trim());for(let e=t.length-1;e>=0;--e)if(t[e])return t[e];return null}catch{return null}}async function pk(e){let{stdoutPath:t,stderrPath:n}=KT(e),r=await l.readFile(n,`utf8`).catch(()=>``),i=await l.readFile(t,`utf8`).catch(()=>``),a=[...r.split(/\r?\n/),...i.split(/\r?\n/)].map(e=>e.trim());for(let e=a.length-1;e>=0;--e){let t=a[e];if(t&&dk.some(e=>e.test(t)))return t}return await fk(n)??await fk(t)}const mk=[`openclaw`,`clawdbot`,`moltbot`];function hk(e=process.env){let t=e.OPENCLAW_PROFILE;switch(process.platform){case`darwin`:{let e=Pn(t);return[`launchctl bootout gui/$UID/${e}`,`rm ~/Library/LaunchAgents/${e}.plist`]}case`linux`:{let e=In(t);return[`systemctl --user disable --now ${e}.service`,`rm ~/.config/systemd/user/${e}.service`]}case`win32`:return[`schtasks /Delete /TN "${Ln(t)}" /F`];default:return[]}}function gk(e){let t=e.HOME?.trim()||e.USERPROFILE?.trim();if(!t)throw Error(`Missing HOME`);return t}function _k(e){let t=e.toLowerCase();for(let e of mk)if(t.includes(e))return e;return null}function vk(e){let t=e.toLowerCase(),n=[`openclaw_service_marker`],r=[`openclaw_service_kind`],i=[`openclaw`],a=n.some(e=>t.includes(e)),o=r.some(e=>t.includes(e)),s=i.some(e=>t.includes(e));return a&&o&&s&&t.includes(`gateway`)}function yk(e,t){return vk(t)?!0:t.toLowerCase().includes(`gateway`)?e.startsWith(`ai.openclaw.`):!1}function bk(e,t){return vk(t)?!0:e.startsWith(`openclaw-gateway`)?t.toLowerCase().includes(`gateway`):!1}function xk(e){let t=e.trim().toLowerCase();return t?t===Ln().toLowerCase()||t.startsWith(`openclaw gateway`):!1}function Sk(e){let t=e.match(/<key>Label<\/key>\s*<string>([\s\S]*?)<\/string>/i);return t&&t[1]?.trim()||null}function Ck(e){return e===Pn()}function wk(e){return e===In()}function Tk(e){let t=e.toLowerCase();return t.includes(`clawdbot`)||t.includes(`moltbot`)}async function Ek(e){try{return await l.readdir(e)}catch{return[]}}async function Dk(e){try{return await l.readFile(e,`utf8`)}catch{return null}}async function Ok(e){let t=[],n=await Ek(e.dir);for(let r of n){if(!r.endsWith(e.extension))continue;let n=r.slice(0,-e.extension.length);if(e.isIgnoredName(n))continue;let a=i.join(e.dir,r),o=await Dk(a);o!==null&&t.push({entry:r,name:n,fullPath:a,contents:o})}return t}async function kk(e){let t=[],n=await Ok({dir:e.dir,extension:`.plist`,isIgnoredName:Ck});for(let{name:r,fullPath:i,contents:a}of n){let n=_k(a),o=Sk(a)??r;if(!n){if(!(Tk(r)||Tk(o)))continue;t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:Tk(o)?`clawdbot`:`moltbot`,legacy:!0});continue}Ck(o)||n===`openclaw`&&yk(o,a)||t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:n,legacy:n!==`openclaw`||Tk(o)})}return t}async function Ak(e){let t=[],n=await Ok({dir:e.dir,extension:`.service`,isIgnoredName:wk});for(let{entry:r,name:i,fullPath:a,contents:o}of n){let n=_k(o);n&&(n===`openclaw`&&bk(i,o)||t.push({platform:`linux`,label:r,detail:`unit: ${a}`,scope:e.scope,marker:n,legacy:n!==`openclaw`}))}return t}function jk(e){let t=[],n=null;for(let r of e.split(/\r?\n/)){let e=r.trim();if(!e){n&&=(t.push(n),null);continue}let i=e.indexOf(`:`);if(i<=0)continue;let a=e.slice(0,i).trim().toLowerCase(),o=e.slice(i+1).trim();if(o){if(a===`taskname`){n&&t.push(n),n={name:o};continue}n&&a===`task to run`&&(n.taskToRun=o)}}return n&&t.push(n),t}async function Mk(e,t={}){let n=[],r=new Set,a=e=>{let t=`${e.platform}:${e.label}:${e.detail}:${e.scope}`;r.has(t)||(r.add(t),n.push(e))};if(process.platform===`darwin`){try{let n=gk(e),r=i.join(n,`Library`,`LaunchAgents`);for(let e of await kk({dir:r,scope:`user`}))a(e);if(t.deep){for(let e of await kk({dir:i.join(i.sep,`Library`,`LaunchAgents`),scope:`system`}))a(e);for(let e of await kk({dir:i.join(i.sep,`Library`,`LaunchDaemons`),scope:`system`}))a(e)}}catch{return n}return n}if(process.platform===`linux`){try{let n=gk(e),r=i.join(n,`.config`,`systemd`,`user`);for(let e of await Ak({dir:r,scope:`user`}))a(e);if(t.deep)for(let e of[`/etc/systemd/system`,`/usr/lib/systemd/system`,`/lib/systemd/system`])for(let t of await Ak({dir:e,scope:`system`}))a(t)}catch{return n}return n}if(process.platform===`win32`){if(!t.deep)return n;let e=await Z([`/Query`,`/FO`,`LIST`,`/V`]);if(e.code!==0)return n;let r=jk(e.stdout);for(let e of r){let t=e.name.trim();if(!t||xk(t))continue;let n=t.toLowerCase(),r=e.taskToRun?.toLowerCase()??``,i=null;for(let e of mk)if(n.includes(e)||r.includes(e)){i=e;break}i&&a({platform:`win32`,label:t,detail:e.taskToRun?`task: ${t}, run: ${e.taskToRun}`:t,scope:`system`,marker:i,legacy:i!==`openclaw`})}return n}return n}function Nk(e){return{config:e.cfg,cfg:e.cfg,env:e.env,explicitAuth:e.explicitAuth,modeOverride:e.mode,mode:e.mode,includeLegacyEnv:!1,remoteTokenFallback:`remote-only`}}async function Pk(e){let t=Nk(e);return await aT({config:t.config,env:t.env,explicitAuth:t.explicitAuth,modeOverride:t.modeOverride,includeLegacyEnv:t.includeLegacyEnv,remoteTokenFallback:t.remoteTokenFallback})}let Fk=0;const Ik={setLabel:()=>{},setPercent:()=>{},tick:()=>{},done:()=>{}};function Lk(e){if(e.enabled===!1||Fk>0)return Ik;let t=e.stream??process.stderr,n=t.isTTY,r=!n&&e.fallback===`log`;if(!n&&!r)return Ik;let i=typeof e.delayMs==`number`?e.delayMs:0,a=n&&ue(process.env,n),o=n&&(e.fallback===void 0||e.fallback===`spinner`),s=n&&e.fallback===`line`,c=!1,l=e.label,u=e.total??null,d=0,f=0,p=e.indeterminate??(e.total===void 0||e.total===null);Fk+=1,n&&gr(t);let m=a?le({env:process.env,isTty:t.isTTY,write:e=>t.write(e)}):null,h=o?oe():null,g=s?()=>{if(!c)return;let e=p?``:` ${f}%`;_r(),t.write(`${D.accent(l)}${e}`)}:null,_=r?(()=>{let e=``,n=0;return()=>{if(!c)return;let r=p?``:` ${f}%`,i=`${l}${r}`,a=Date.now();i===e&&a-n<250||(e=i,n=a,t.write(`${i}\n`))}})():null,v=null,y=()=>{c&&(m&&(p?m.setIndeterminate(l):m.setPercent(l,f)),h&&h.message(D.accent(l)),g&&g(),_&&_())},b=()=>{c||(c=!0,h&&h.start(D.accent(l)),y())};i===0?b():v=setTimeout(b,i);let ee=e=>{l=e,y()},te=e=>{f=Math.max(0,Math.min(100,Math.round(e))),p=!1,y()};return{setLabel:ee,setPercent:te,tick:(e=1)=>{u&&(d=Math.min(u,d+e),te(u>0?Math.round(d/u*100):0))},done:()=>{if(v&&=(clearTimeout(v),null),!c){Fk=Math.max(0,Fk-1);return}m&&m.clear(),h&&h.stop(),_r(),n&&vr(t),Fk=Math.max(0,Fk-1)}}}async function Rk(e,t){let n=Lk(e);try{return await t(n)}finally{n.done()}}async function zk(e){try{return await Rk({label:`Checking gateway status...`,indeterminate:!0,enabled:e.json!==!0},async()=>await mT({url:e.url,token:e.token,password:e.password,tlsFingerprint:e.tlsFingerprint,method:`status`,timeoutMs:e.timeoutMs,clientName:Ld.CLI,mode:Rd.CLI,...e.configPath?{configPath:e.configPath}:{}})),{ok:!0}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}function Bk(e,t){return!(e!==`busy`||t===!0)}async function Vk(e){let t={...process.env,...e??void 0},n=ke(process.env,T(process.env)),r=ke(t,T(t)),i=vb({env:process.env,configPath:n}),a=vb({env:t,configPath:r}),[o,s]=await Promise.all([i.readConfigFileSnapshot().catch(()=>null),a.readConfigFileSnapshot().catch(()=>null)]),c=i.loadConfig(),l=a.loadConfig(),u={path:o?.path??n,exists:o?.exists??!1,valid:o?.valid??!0,...o?.issues?.length?{issues:o.issues}:{},controlUi:c.gateway?.controlUi},d={path:s?.path??r,exists:s?.exists??!1,valid:s?.valid??!0,...s?.issues?.length?{issues:s.issues}:{},controlUi:l.gateway?.controlUi};return{mergedDaemonEnv:t,cliCfg:c,daemonCfg:l,cliConfigSummary:u,daemonConfigSummary:d,configMismatch:u.path!==d.path}}async function Hk(e){let t=RD(e.commandProgramArguments),n=t??Ne(e.daemonCfg,e.mergedDaemonEnv),r=t?`service args`:`env/config`,i=e.daemonCfg.gateway?.bind??`loopback`,a=e.daemonCfg.gateway?.customBindHost,o=await kl(i,a),s=zD(i,wl(),a),c=P(e.rpcUrlOverride)??null,l=e.daemonCfg.gateway?.tls?.enabled===!0?`wss`:`ws`,u=c??`${l}://${s}:${n}`,d=!c&&i===`lan`?`bind=lan listens on 0.0.0.0 (all interfaces); probing via ${s}.`:!c&&i===`loopback`?`Loopback-only gateway; only local clients can connect.`:void 0;return{gateway:{bindMode:i,bindHost:o,customBindHost:a,port:n,portSource:r,probeUrl:u,...d?{probeNote:d}:{}},daemonPort:n,cliPort:Ne(e.cliCfg,process.env),probeUrlOverride:c}}function Uk(e){if(e)return{port:e.port,status:e.status,listeners:e.listeners,hints:e.hints}}async function Wk(e){let[t,n]=await Promise.all([Nd(e.daemonPort).catch(()=>null),e.cliPort===e.daemonPort?null:Nd(e.cliPort).catch(()=>null)]);return{portStatus:Uk(t),portCliStatus:Uk(n)}}async function Gk(e){let t=TD(),[n,r,i]=await Promise.all([t.isLoaded({env:process.env}).catch(()=>!1),t.readCommand(process.env).catch(()=>null),t.readRuntime(process.env).catch(e=>({status:`unknown`,detail:String(e)}))]),a=await yO({env:process.env,command:r}),{mergedDaemonEnv:o,cliCfg:s,daemonCfg:c,cliConfigSummary:l,daemonConfigSummary:u,configMismatch:d}=await Vk(r?.environment??void 0),{gateway:f,daemonPort:p,cliPort:m,probeUrlOverride:h}=await Hk({cliCfg:s,daemonCfg:c,mergedDaemonEnv:o,commandProgramArguments:r?.programArguments,rpcUrlOverride:e.rpc.url}),{portStatus:g,portCliStatus:_}=await Wk({daemonPort:p,cliPort:m}),v=await Mk(process.env,{deep:!!e.deep}).catch(()=>[]),y=tf(e.rpc.timeout??`10000`)??1e4,b=c.gateway?.tls?.enabled===!0,ee=e.probe&&!h&&b,te=ee?await Yb(c.gateway?.tls):void 0,x=e.probe?await Pk({cfg:c,mode:c.gateway?.mode===`remote`?`remote`:`local`,env:o,explicitAuth:{token:e.rpc.token,password:e.rpc.password}}):void 0,S=e.probe?await zk({url:f.probeUrl,token:x?.token,password:x?.password,tlsFingerprint:ee&&te?.enabled?te.fingerprintSha256:void 0,timeoutMs:y,json:e.rpc.json,configPath:u.path}):void 0,ne;return n&&i?.status===`running`&&g&&g.status!==`busy`&&(ne=await pk(o)??void 0),{service:{label:t.label,loaded:n,loadedText:t.loadedText,notLoadedText:t.notLoadedText,command:r,runtime:i,configAudit:a},config:{cli:l,daemon:u,...d?{mismatch:!0}:{}},gateway:f,port:g,..._?{portCli:_}:{},lastError:ne,...S?{rpc:{...S,url:f.probeUrl}}:{},extraServices:v}}function Kk(e,t){return!e.port||!Bk(e.port.status,t)?[]:fd({port:e.port.port,status:e.port.status,listeners:e.port.listeners,hints:e.port.hints})}function qk(e){return Array.from(new Set(e.port?.listeners?.map(e=>e.address?UD(e.address):``).filter(e=>!!e)??[]))}function Jk(e){let t=e.service.command;if(!t?.environment)return e;let n=VD(t.environment),r={...t,environment:Object.keys(n).length>0?n:void 0};return{...e,service:{...e.service,command:r}}}function Yk(e,t){if(t.json){let t=Jk(e);M.log(JSON.stringify(t,null,2));return}let{rich:n,label:r,accent:i,infoText:a,okText:o,warnText:s,errorText:c}=ID(),l=()=>M.log(``),{service:u,rpc:d,extraServices:f}=e,p=u.loaded?o(u.loadedText):s(u.notLoadedText);M.log(`${r(`Service:`)} ${i(u.label)} (${p})`);try{let e=xt().file;M.log(`${r(`File logs:`)} ${a(Bt(e))}`)}catch{}u.command?.programArguments?.length&&M.log(`${r(`Command:`)} ${a(u.command.programArguments.join(` `))}`),u.command?.sourcePath&&M.log(`${r(`Service file:`)} ${a(Bt(u.command.sourcePath))}`),u.command?.workingDirectory&&M.log(`${r(`Working dir:`)} ${a(Bt(u.command.workingDirectory))}`);let m=HD(u.command?.environment);if(m.length>0&&M.log(`${r(`Service env:`)} ${m.join(` `)}`),l(),u.configAudit?.issues.length){M.error(s(`Service config looks out of date or non-standard.`));for(let e of u.configAudit.issues){let t=e.detail?` (${e.detail})`:``;M.error(`${s(`Service config issue:`)} ${e.message}${t}`)}M.error(s(`Recommendation: run "${j(`openclaw doctor`)}" (or "${j(`openclaw doctor --repair`)}").`))}if(e.config){let t=`${Bt(e.config.cli.path)}${e.config.cli.exists?``:` (missing)`}${e.config.cli.valid?``:` (invalid)`}`;if(M.log(`${r(`Config (cli):`)} ${a(t)}`),!e.config.cli.valid&&e.config.cli.issues?.length)for(let t of e.config.cli.issues.slice(0,5))M.error(`${c(`Config issue:`)} ${iO(t,``,{normalizeRoot:!0})}`);if(e.config.daemon){let t=`${Bt(e.config.daemon.path)}${e.config.daemon.exists?``:` (missing)`}${e.config.daemon.valid?``:` (invalid)`}`;if(M.log(`${r(`Config (service):`)} ${a(t)}`),!e.config.daemon.valid&&e.config.daemon.issues?.length)for(let t of e.config.daemon.issues.slice(0,5))M.error(`${c(`Service config issue:`)} ${iO(t,``,{normalizeRoot:!0})}`)}e.config.mismatch&&(M.error(c(`Root cause: CLI and service are using different config paths (likely a profile/state-dir mismatch).`)),M.error(c(`Fix: rerun \`${j(`openclaw gateway install --force`)}\` from the same --profile / OPENCLAW_STATE_DIR you expect.`))),l()}if(e.gateway){let t=e.gateway.bindHost??`n/a`;if(M.log(`${r(`Gateway:`)} bind=${a(e.gateway.bindMode)} (${a(t)}), port=${a(String(e.gateway.port))} (${a(e.gateway.portSource)})`),M.log(`${r(`Probe target:`)} ${a(e.gateway.probeUrl)}`),!(e.config?.daemon?.controlUi?.enabled??!0))M.log(`${r(`Dashboard:`)} ${s(`disabled`)}`);else{let t=bT({port:e.gateway.port,bind:e.gateway.bindMode,customBindHost:e.gateway.customBindHost,basePath:e.config?.daemon?.controlUi?.basePath});M.log(`${r(`Dashboard:`)} ${a(t.httpUrl)}`)}e.gateway.probeNote&&M.log(`${r(`Probe note:`)} ${a(e.gateway.probeNote)}`),l()}let h=jD(u.runtime);if(h){let e=LD(u.runtime?.status);M.log(`${r(`Runtime:`)} ${jt(n,e,h)}`)}if(d&&!d.ok&&u.loaded&&u.runtime?.status===`running`&&M.log(s(`Warm-up: launch agents can take a few seconds. Try again shortly.`)),d){if(d.ok)M.log(`${r(`RPC probe:`)} ${o(`ok`)}`);else{M.error(`${r(`RPC probe:`)} ${c(`failed`)}`),d.url&&M.error(`${r(`RPC target:`)} ${d.url}`);let e=String(d.error??`unknown`).split(/\r?\n/).filter(Boolean);for(let t of e.slice(0,12))M.error(` ${c(t)}`)}l()}if(process.platform===`linux`&&bO(u.runtime?.detail)){M.error(c(`systemd user services unavailable.`));for(let e of xO({wsl:_T()}))M.error(c(e));l()}if(u.runtime?.missingUnit){M.error(c(`Service unit not found.`));for(let e of WD(u.runtime))M.error(c(e))}else if(u.loaded&&u.runtime?.status===`stopped`){M.error(c(`Service is loaded but not running (likely exited immediately).`));for(let e of WD(u.runtime,u.command?.environment??process.env))M.error(c(e));l()}if(u.runtime?.cachedLabel){let e=Pn((u.command?.environment??process.env).OPENCLAW_PROFILE);M.error(c(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${e}`)),M.error(c(`Then reinstall: ${j(`openclaw gateway install`)}`)),l()}for(let t of Kk(e,d?.ok))M.error(c(t));if(e.port){let t=qk(e);t.length>0&&M.log(`${r(`Listening:`)} ${a(t.join(`, `))}`)}if(e.portCli&&e.portCli.port!==e.port?.port&&M.log(`${r(`Note:`)} CLI config resolves gateway port=${e.portCli.port} (${e.portCli.status}).`),u.loaded&&u.runtime?.status===`running`&&e.port&&e.port.status!==`busy`){if(M.error(c(`Gateway port ${e.port.port} is not listening (service appears running).`)),e.lastError&&M.error(`${c(`Last gateway error:`)} ${e.lastError}`),process.platform===`linux`){let e=In((u.command?.environment??process.env).OPENCLAW_PROFILE);M.error(c(`Logs: journalctl --user -u ${e}.service -n 200 --no-pager`))}else if(process.platform===`darwin`){let e=KT(u.command?.environment??process.env);M.error(`${c(`Logs:`)} ${Bt(e.stdoutPath)}`),M.error(`${c(`Errors:`)} ${Bt(e.stderrPath)}`)}l()}if(f.length>0){M.error(c(`Other gateway-like services detected (best effort):`));for(let e of f)M.error(`- ${c(e.label)} (${e.scope}, ${e.detail})`);for(let e of hk())M.error(`${c(`Cleanup hint:`)} ${e}`);l()}f.length>0&&(M.error(c(`Recommendation: run a single gateway per machine for most setups. One gateway supports multiple agents (see docs: /gateway#multiple-gateways-same-host).`)),M.error(c(`If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host).`)),l()),M.log(`${r(`Troubles:`)} run ${j(`openclaw status`)}`),M.log(`${r(`Troubleshooting:`)} https://docs.openclaw.ai/troubleshooting`)}async function Xk(e){try{Yk(await Gk({rpc:e.rpc,probe:!!e.probe,deep:!!e.deep}),{json:!!e.json})}catch(e){let t=At();M.error(jt(t,D.error,`Gateway status failed: ${String(e)}`)),M.exit(1)}}function Zk(e,t){let n=Kt(t,`force`),r=Kt(t,`port`),i=Kt(t,`token`);return{...e,force:!!(e.force||n),port:e.port??r,token:e.token??i}}function Qk(e,t){let n=Kt(t,`token`),r=Kt(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function $k(e,t){e.command(`status`).description(t?.statusDescription??`Show gateway service status + probe the Gateway`).option(`--url <url>`,`Gateway WebSocket URL (defaults to config/remote/local)`).option(`--token <token>`,`Gateway token (if required)`).option(`--password <password>`,`Gateway password (password auth)`).option(`--timeout <ms>`,`Timeout in ms`,`10000`).option(`--no-probe`,`Skip RPC probe`).option(`--deep`,`Scan system-level services`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await Xk({rpc:Qk(e,t),probe:!!e.probe,deep:!!e.deep,json:!!e.json})}),e.command(`install`).description(`Install the Gateway service (launchd/systemd/schtasks)`).option(`--port <port>`,`Gateway port`).option(`--runtime <runtime>`,`Daemon runtime (node|bun). Default: node`).option(`--token <token>`,`Gateway token (token auth)`).option(`--force`,`Reinstall/overwrite if already installed`,!1).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await KD(Zk(e,t))}),e.command(`uninstall`).description(`Uninstall the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await sk(e)}),e.command(`start`).description(`Start the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await ck(e)}),e.command(`stop`).description(`Stop the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await lk(e)}),e.command(`restart`).description(`Restart the Gateway service (launchd/systemd/schtasks)`).option(`--json`,`Output JSON`,!1).action(async e=>{await uk(e)})}function eA(e){$k(e.command(`daemon`).description(`Manage the Gateway service (launchd/systemd/schtasks)`).addHelpText(`after`,()=>`\n${D.muted(`Docs:`)} ${Wt(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`),{statusDescription:`Show service install status + probe the Gateway`})}export{$k as addGatewayServiceCommands,eA as registerDaemonCli,KD as runDaemonInstall,uk as runDaemonRestart,ck as runDaemonStart,Xk as runDaemonStatus,lk as runDaemonStop,sk as runDaemonUninstall};
56
- //# sourceMappingURL=daemon-cli.js.map
@@ -1,2 +1 @@
1
1
  import"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import"./auth-profiles-C8rZRS0X.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-Bz_S4lPh.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./call-BWx7hNtl.js";import"./onboard-helpers-DOlI17Ac.js";import"./prompt-style-BThRSQJR.js";import"./note-Dp-d_utk.js";import"./daemon-install-plan.shared-Dx3DBXCG.js";import"./runtime-guard-DX2Ie4ri.js";import{n as e,r as t,t as n}from"./gateway-install-token-cSJrfU_1.js";import{r}from"./daemon-runtime-VcpeBRJV.js";import{i}from"./systemd-DbevZh65.js";import{n as a}from"./service-DZ9EbS15.js";import{n as o}from"./systemd-linger-cWKbFNpu.js";async function s(s){let{opts:c,runtime:l,port:u}=s;if(!c.installDaemon)return;let d=c.daemonRuntime??`node`,f=process.platform===`linux`?await i():!0;if(process.platform===`linux`&&!f){l.log(`Systemd user services are unavailable; skipping service install.`);return}if(!r(d)){l.error(`Invalid --daemon-runtime (use node or bun)`),l.exit(1);return}let p=a(),m=await n({config:s.nextConfig,env:process.env});for(let e of m.warnings)l.log(e);if(m.unavailableReason){l.error([`Gateway install blocked:`,m.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `)),l.exit(1);return}let{programArguments:h,workingDirectory:g,environment:_}=await e({env:process.env,port:u,runtime:d,warn:e=>l.log(e),config:s.nextConfig});try{await p.install({env:process.env,stdout:process.stdout,programArguments:h,workingDirectory:g,environment:_})}catch(e){l.error(`Gateway service install failed: ${String(e)}`),l.log(t());return}await o({runtime:l})}export{s as installGatewayDaemonNonInteractive};
2
- //# sourceMappingURL=daemon-install-CMNtsW5o.js.map
@@ -1,2 +1 @@
1
1
  import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import"./model-selection-BLbnMb5E.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-CzUpDbU-.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./call-JB-cGR9n.js";import"./onboard-helpers-D90u4wVK.js";import"./prompt-style-CXKekIBY.js";import"./runtime-guard-DFYBaYZS.js";import"./note-D4GAwgha.js";import"./daemon-install-plan.shared-BkwZgIAY.js";import{n as e,r as t,t as n}from"./gateway-install-token-Dt7hDXoR.js";import{r}from"./daemon-runtime-DHiDbRuC.js";import{i}from"./systemd-D7odsu4K.js";import{n as a}from"./service-BtB9epJk.js";import{n as o}from"./systemd-linger-C2MJD6KG.js";async function s(s){let{opts:c,runtime:l,port:u}=s;if(!c.installDaemon)return;let d=c.daemonRuntime??`node`,f=process.platform===`linux`?await i():!0;if(process.platform===`linux`&&!f){l.log(`Systemd user services are unavailable; skipping service install.`);return}if(!r(d)){l.error(`Invalid --daemon-runtime (use node or bun)`),l.exit(1);return}let p=a(),m=await n({config:s.nextConfig,env:process.env});for(let e of m.warnings)l.log(e);if(m.unavailableReason){l.error([`Gateway install blocked:`,m.unavailableReason,`Fix gateway auth config/token input and rerun onboarding.`].join(` `)),l.exit(1);return}let{programArguments:h,workingDirectory:g,environment:_}=await e({env:process.env,port:u,runtime:d,warn:e=>l.log(e),config:s.nextConfig});try{await p.install({env:process.env,stdout:process.stdout,programArguments:h,workingDirectory:g,environment:_})}catch(e){l.error(`Gateway service install failed: ${String(e)}`),l.log(t());return}await o({runtime:l})}export{s as installGatewayDaemonNonInteractive};
2
- //# sourceMappingURL=daemon-install-D2gMiA0p.js.map
@@ -1,2 +1 @@
1
1
  import{$ as e,Q as t}from"./subsystem-C5XF2Fy5.js";import{Ml as n}from"./model-selection-BLbnMb5E.js";import{_ as r,c as i,g as a,i as o,m as s,o as c,p as ee,r as l,s as u,u as d,v as f}from"./arg-split-DE5RqDHq.js";import{n as p}from"./runtime-guard-DFYBaYZS.js";import m from"node:os";import h from"node:path";import{promisify as g}from"node:util";import _ from"node:fs/promises";import{execFile as v}from"node:child_process";async function y(){let e=process.argv[1];if(!e)throw Error(`Unable to resolve CLI entrypoint path`);let t=h.resolve(e),n=await te(t);if(/[/\\]dist[/\\].+\.(cjs|js|mjs)$/.test(n)){if(await _.access(n),/[/\\]dist[/\\].+\.(cjs|js|mjs)$/.test(t)&&t!==n)try{return await _.access(t),t}catch{}return n}let r=ne(n,t);for(let e of r)try{return await _.access(e),e}catch{}throw Error(`Cannot find built CLI at ${r.join(` or `)}. Run "pnpm build" first, or use dev mode.`)}async function te(e){try{return await _.realpath(e)}catch{return e}}function ne(...e){let t=[],n=new Set;for(let r of e){if(!r)continue;let e=h.dirname(r);b(t,n,h.resolve(e,`..`)),b(t,n,e),x(t,n,r)}return t}function b(e,t,n){let r=h.resolve(n,`dist`),i=[h.join(r,`index.js`),h.join(r,`index.mjs`),h.join(r,`entry.js`),h.join(r,`entry.mjs`)];for(let n of i)t.has(n)||(t.add(n),e.push(n))}function x(e,t,n){let r=n.split(h.sep),i=r.lastIndexOf(`.bin`);if(i<=0||r[i-1]!==`node_modules`)return;let a=h.basename(n),o=r.slice(0,i).join(h.sep);b(e,t,h.join(o,a))}function S(){let e=process.argv[1];if(!e)throw Error(`Unable to resolve repo root`);let t=h.resolve(e).split(h.sep),n=t.lastIndexOf(`src`);if(n===-1)throw Error(`Dev mode requires running from repo (src/index.ts)`);return t.slice(0,n).join(h.sep)}async function C(){return await T(`bun`)}async function w(){return await T(`node`)}async function T(e){let{execFileSync:t}=await import(`node:child_process`),n=process.platform===`win32`?`where`:`which`;try{let r=t(n,[e],{encoding:`utf8`}).trim().split(/\r?\n/)[0]?.trim();if(!r)throw Error(`empty`);return await _.access(r),r}catch{throw e===`bun`?Error(`Bun not found in PATH. Install bun: https://bun.sh`):Error(`Node not found in PATH. Install Node 22+.`)}}async function E(n){let r=process.execPath,i=n.runtime??`auto`;if(i===`node`)return{programArguments:[n.nodePath??(e(r)?r:await w()),await y(),...n.args]};if(i===`bun`){if(n.dev){let e=S(),i=h.join(e,`src`,`index.ts`);return await _.access(i),{programArguments:[t(r)?r:await C(),i,...n.args],workingDirectory:e}}return{programArguments:[t(r)?r:await C(),await y(),...n.args]}}if(!n.dev)try{return{programArguments:[r,await y(),...n.args]}}catch(t){if(!e(r))return{programArguments:[r,...n.args]};throw t}let a=S(),o=h.join(a,`src`,`index.ts`);return await _.access(o),t(r)?{programArguments:[r,o,...n.args],workingDirectory:a}:{programArguments:[await C(),o,...n.args],workingDirectory:a}}async function D(e){return E({args:[`gateway`,`--port`,String(e.port)],dev:e.dev,runtime:e.runtime,nodePath:e.nodePath})}async function re(e){let t=[`node`,`run`,`--host`,e.host,`--port`,String(e.port)];return(e.tls||e.tlsFingerprint)&&t.push(`--tls`),e.tlsFingerprint&&t.push(`--tls-fingerprint`,e.tlsFingerprint),e.nodeId&&t.push(`--node-id`,e.nodeId),e.displayName&&t.push(`--display-name`,e.displayName),E({args:t,dev:e.dev,runtime:e.runtime,nodePath:e.nodePath})}const ie=[`HTTP_PROXY`,`HTTPS_PROXY`,`NO_PROXY`,`ALL_PROXY`,`http_proxy`,`https_proxy`,`no_proxy`,`all_proxy`];function ae(e){let t={};for(let n of ie){let r=e[n];if(typeof r!=`string`)continue;let i=r.trim();i&&(t[n]=i)}return t}function O(e,t){t&&e.push(t)}function k(e,t){if(e)return e.endsWith(`/${t}`)?e:h.posix.join(e,t)}function A(e,t){e.push(`${t}/.local/bin`),e.push(`${t}/.npm-global/bin`),e.push(`${t}/bin`),e.push(`${t}/.volta/bin`),e.push(`${t}/.asdf/shims`),e.push(`${t}/.bun/bin`)}function j(e,t){O(e,t?.PNPM_HOME),O(e,k(t?.NPM_CONFIG_PREFIX,`bin`)),O(e,k(t?.BUN_INSTALL,`bin`)),O(e,k(t?.VOLTA_HOME,`bin`)),O(e,k(t?.ASDF_DATA_DIR,`shims`))}function M(e){return e===`darwin`?[`/opt/homebrew/bin`,`/usr/local/bin`,`/usr/bin`,`/bin`]:e===`linux`?[`/usr/local/bin`,`/usr/bin`,`/bin`]:[]}function N(e,t){if(!e)return[];let n=[];return j(n,t),O(n,t?.NVM_DIR),O(n,k(t?.FNM_DIR,`aliases/default/bin`)),A(n,e),n.push(`${e}/Library/Application Support/fnm/aliases/default/bin`),n.push(`${e}/.fnm/aliases/default/bin`),n.push(`${e}/Library/pnpm`),n.push(`${e}/.local/share/pnpm`),n}function P(e,t){if(!e)return[];let n=[];return j(n,t),O(n,k(t?.NVM_DIR,`current/bin`)),O(n,k(t?.FNM_DIR,`current/bin`)),A(n,e),n.push(`${e}/.nvm/current/bin`),n.push(`${e}/.fnm/current/bin`),n.push(`${e}/.local/share/pnpm`),n}function F(e={}){let t=e.platform??process.platform;if(t===`win32`)return[];let n=[],r=e.extraDirs??[],i=M(t),a=t===`linux`?P(e.home,e.env):t===`darwin`?N(e.home,e.env):[],o=e=>{e&&(n.includes(e)||n.push(e))};for(let e of r)o(e);for(let e of a)o(e);for(let e of i)o(e);return n}function I(e={}){let t=e.env??process.env;return F({...e,home:e.home??t.HOME,env:t})}function L(e={}){let t=e.env??process.env;return(e.platform??process.platform)===`win32`?t.PATH??``:I({...e,env:t}).join(h.posix.delimiter)}function R(e){let{env:t,port:r,launchdLabel:i}=e,a=e.platform??process.platform,c=V(t,a),u=t.OPENCLAW_PROFILE,f=i||(a===`darwin`?d(u):void 0),p=`${ee(u)}.service`;return{...B(t,c),OPENCLAW_PROFILE:u,OPENCLAW_GATEWAY_PORT:String(r),OPENCLAW_LAUNCHD_LABEL:f,OPENCLAW_SYSTEMD_UNIT:p,OPENCLAW_WINDOWS_TASK_NAME:s(u),OPENCLAW_SERVICE_MARKER:o,OPENCLAW_SERVICE_KIND:l,OPENCLAW_SERVICE_VERSION:n}}function z(e){let{env:t}=e,o=V(t,e.platform??process.platform),s=t.OPENCLAW_GATEWAY_TOKEN?.trim()||t.CLAWDBOT_GATEWAY_TOKEN?.trim()||void 0;return{...B(t,o),OPENCLAW_GATEWAY_TOKEN:s,OPENCLAW_LAUNCHD_LABEL:a(),OPENCLAW_SYSTEMD_UNIT:r(),OPENCLAW_WINDOWS_TASK_NAME:f(),OPENCLAW_TASK_SCRIPT_NAME:i,OPENCLAW_LOG_PREFIX:`node`,OPENCLAW_SERVICE_MARKER:u,OPENCLAW_SERVICE_KIND:c,OPENCLAW_SERVICE_VERSION:n}}function B(e,t){let n={HOME:e.HOME,TMPDIR:t.tmpDir,...t.proxyEnv,NODE_EXTRA_CA_CERTS:t.nodeCaCerts,NODE_USE_SYSTEM_CA:t.nodeUseSystemCa,OPENCLAW_STATE_DIR:t.stateDir,OPENCLAW_CONFIG_PATH:t.configPath};return t.minimalPath&&(n.PATH=t.minimalPath),n}function V(e,t){let n=e.OPENCLAW_STATE_DIR,r=e.OPENCLAW_CONFIG_PATH,i=e.TMPDIR?.trim()||m.tmpdir(),a=ae(e),o=e.NODE_EXTRA_CA_CERTS??(t===`darwin`?`/etc/ssl/cert.pem`:void 0),s=e.NODE_USE_SYSTEM_CA??(t===`darwin`?`1`:void 0);return{stateDir:n,configPath:r,tmpDir:i,minimalPath:t===`win32`?void 0:L({env:e,platform:t}),proxyEnv:a,nodeCaCerts:o,nodeUseSystemCa:s}}async function H(e){let t=e.match(/^(.+?)\/Cellar\/([^/]+)\/[^/]+\/bin\/node$/);if(!t)return e;let n=t[1],r=t[2],i=`${n}/opt/${r}/bin/node`;try{return await _.access(i),i}catch{}if(r===`node`){let e=`${n}/bin/node`;try{return await _.access(e),e}catch{}}return e}const U=[`/.nvm/`,`/.fnm/`,`/.volta/`,`/.asdf/`,`/.n/`,`/.nodenv/`,`/.nodebrew/`,`/nvs/`];function W(e){return e===`win32`?h.win32:h.posix}function G(e,t){let n=W(t).basename(e).toLowerCase();return n===`node`||n===`node.exe`}function K(e,t){let n=W(t).normalize(e).replaceAll(`\\`,`/`);return t===`win32`?n.toLowerCase():n}function q(e,t){if(t===`darwin`)return[`/opt/homebrew/bin/node`,`/usr/local/bin/node`,`/usr/bin/node`];if(t===`linux`)return[`/usr/local/bin/node`,`/usr/bin/node`];if(t===`win32`){let n=W(t),r=e.ProgramFiles??`C:\\Program Files`,i=e[`ProgramFiles(x86)`]??`C:\\Program Files (x86)`;return[n.join(r,`nodejs`,`node.exe`),n.join(i,`nodejs`,`node.exe`)]}return[]}const J=g(v);async function Y(e,t){try{let{stdout:n}=await t(e,[`-p`,`process.versions.node`],{encoding:`utf8`});return n.trim()||null}catch{return null}}function oe(e,t=process.platform){let n=K(e,t);return U.some(e=>n.includes(e))}function se(e,t=process.env,n=process.platform){let r=K(e,n);return q(t,n).some(e=>r===K(e,n))}async function X(e=process.env,t=process.platform){let n=q(e,t);for(let e of n)try{return await _.access(e),e}catch{}return null}async function Z(e){let t=await X(e.env??process.env,e.platform??process.platform);if(!t)return null;let n=await Y(t,e.execFile??J);return{path:t,version:n,supported:p(n)}}function Q(e,t){if(!e||e.supported)return null;let n=e.version??`unknown`,r=t?` Using ${t} for the daemon.`:``;return`System Node ${n} at ${e.path} is below the required Node 22+.${r} Install Node 22+ from nodejs.org or Homebrew.`}async function ce(e){if(e.runtime!==`node`)return;let t=e.platform??process.platform,n=e.execPath??process.execPath;if(n&&G(n,t)&&p(await Y(n,e.execFile??J)))return H(n);let r=await Z(e);if(r?.supported)return r.path}async function le(e){if(e.runtime!==`node`)return;let t=Q(await Z({env:e.env}),e.nodeProgram);t&&e.warn?.(t,e.title)}function $(e=process.argv){let t=e[1]?.replaceAll(`\\`,`/`);return!!(t?.includes(`/src/`)&&t.endsWith(`.ts`))}async function ue(e){return{devMode:e.devMode??$(),nodePath:e.nodePath??await ce({env:e.env,runtime:e.runtime})}}async function de(e){await le({env:e.env,runtime:e.runtime,nodeProgram:e.programArguments[0],warn:e.warn,title:e.title})}export{Q as a,H as c,I as d,D as f,oe as i,z as l,ue as n,Z as o,re as p,se as r,X as s,de as t,R as u};
2
- //# sourceMappingURL=daemon-install-plan.shared-BkwZgIAY.js.map
@@ -1,2 +1 @@
1
1
  import{at as e,it as t}from"./subsystem-BLbY429l.js";import{t as n}from"./version-q3SkUw2K.js";import{_ as r,c as i,g as a,i as o,m as s,o as c,p as ee,r as l,s as u,u as d,v as f}from"./arg-split-BOqSMBuf.js";import{n as p}from"./runtime-guard-DX2Ie4ri.js";import{execFile as m}from"node:child_process";import h from"node:os";import g from"node:path";import{promisify as _}from"node:util";import v from"node:fs/promises";async function y(){let e=process.argv[1];if(!e)throw Error(`Unable to resolve CLI entrypoint path`);let t=g.resolve(e),n=await te(t);if(/[/\\]dist[/\\].+\.(cjs|js|mjs)$/.test(n)){if(await v.access(n),/[/\\]dist[/\\].+\.(cjs|js|mjs)$/.test(t)&&t!==n)try{return await v.access(t),t}catch{}return n}let r=ne(n,t);for(let e of r)try{return await v.access(e),e}catch{}throw Error(`Cannot find built CLI at ${r.join(` or `)}. Run "pnpm build" first, or use dev mode.`)}async function te(e){try{return await v.realpath(e)}catch{return e}}function ne(...e){let t=[],n=new Set;for(let r of e){if(!r)continue;let e=g.dirname(r);b(t,n,g.resolve(e,`..`)),b(t,n,e),x(t,n,r)}return t}function b(e,t,n){let r=g.resolve(n,`dist`),i=[g.join(r,`index.js`),g.join(r,`index.mjs`),g.join(r,`entry.js`),g.join(r,`entry.mjs`)];for(let n of i)t.has(n)||(t.add(n),e.push(n))}function x(e,t,n){let r=n.split(g.sep),i=r.lastIndexOf(`.bin`);if(i<=0||r[i-1]!==`node_modules`)return;let a=g.basename(n),o=r.slice(0,i).join(g.sep);b(e,t,g.join(o,a))}function S(){let e=process.argv[1];if(!e)throw Error(`Unable to resolve repo root`);let t=g.resolve(e).split(g.sep),n=t.lastIndexOf(`src`);if(n===-1)throw Error(`Dev mode requires running from repo (src/index.ts)`);return t.slice(0,n).join(g.sep)}async function C(){return await T(`bun`)}async function w(){return await T(`node`)}async function T(e){let{execFileSync:t}=await import(`node:child_process`),n=process.platform===`win32`?`where`:`which`;try{let r=t(n,[e],{encoding:`utf8`}).trim().split(/\r?\n/)[0]?.trim();if(!r)throw Error(`empty`);return await v.access(r),r}catch{throw e===`bun`?Error(`Bun not found in PATH. Install bun: https://bun.sh`):Error(`Node not found in PATH. Install Node 22+.`)}}async function E(n){let r=process.execPath,i=n.runtime??`auto`;if(i===`node`)return{programArguments:[n.nodePath??(e(r)?r:await w()),await y(),...n.args]};if(i===`bun`){if(n.dev){let e=S(),i=g.join(e,`src`,`index.ts`);return await v.access(i),{programArguments:[t(r)?r:await C(),i,...n.args],workingDirectory:e}}return{programArguments:[t(r)?r:await C(),await y(),...n.args]}}if(!n.dev)try{return{programArguments:[r,await y(),...n.args]}}catch(t){if(!e(r))return{programArguments:[r,...n.args]};throw t}let a=S(),o=g.join(a,`src`,`index.ts`);return await v.access(o),t(r)?{programArguments:[r,o,...n.args],workingDirectory:a}:{programArguments:[await C(),o,...n.args],workingDirectory:a}}async function D(e){return E({args:[`gateway`,`--port`,String(e.port)],dev:e.dev,runtime:e.runtime,nodePath:e.nodePath})}async function re(e){let t=[`node`,`run`,`--host`,e.host,`--port`,String(e.port)];return(e.tls||e.tlsFingerprint)&&t.push(`--tls`),e.tlsFingerprint&&t.push(`--tls-fingerprint`,e.tlsFingerprint),e.nodeId&&t.push(`--node-id`,e.nodeId),e.displayName&&t.push(`--display-name`,e.displayName),E({args:t,dev:e.dev,runtime:e.runtime,nodePath:e.nodePath})}const ie=[`HTTP_PROXY`,`HTTPS_PROXY`,`NO_PROXY`,`ALL_PROXY`,`http_proxy`,`https_proxy`,`no_proxy`,`all_proxy`];function ae(e){let t={};for(let n of ie){let r=e[n];if(typeof r!=`string`)continue;let i=r.trim();i&&(t[n]=i)}return t}function O(e,t){t&&e.push(t)}function k(e,t){if(e)return e.endsWith(`/${t}`)?e:g.posix.join(e,t)}function A(e,t){e.push(`${t}/.local/bin`),e.push(`${t}/.npm-global/bin`),e.push(`${t}/bin`),e.push(`${t}/.volta/bin`),e.push(`${t}/.asdf/shims`),e.push(`${t}/.bun/bin`)}function j(e,t){O(e,t?.PNPM_HOME),O(e,k(t?.NPM_CONFIG_PREFIX,`bin`)),O(e,k(t?.BUN_INSTALL,`bin`)),O(e,k(t?.VOLTA_HOME,`bin`)),O(e,k(t?.ASDF_DATA_DIR,`shims`))}function M(e){return e===`darwin`?[`/opt/homebrew/bin`,`/usr/local/bin`,`/usr/bin`,`/bin`]:e===`linux`?[`/usr/local/bin`,`/usr/bin`,`/bin`]:[]}function N(e,t){if(!e)return[];let n=[];return j(n,t),O(n,t?.NVM_DIR),O(n,k(t?.FNM_DIR,`aliases/default/bin`)),A(n,e),n.push(`${e}/Library/Application Support/fnm/aliases/default/bin`),n.push(`${e}/.fnm/aliases/default/bin`),n.push(`${e}/Library/pnpm`),n.push(`${e}/.local/share/pnpm`),n}function P(e,t){if(!e)return[];let n=[];return j(n,t),O(n,k(t?.NVM_DIR,`current/bin`)),O(n,k(t?.FNM_DIR,`current/bin`)),A(n,e),n.push(`${e}/.nvm/current/bin`),n.push(`${e}/.fnm/current/bin`),n.push(`${e}/.local/share/pnpm`),n}function F(e={}){let t=e.platform??process.platform;if(t===`win32`)return[];let n=[],r=e.extraDirs??[],i=M(t),a=t===`linux`?P(e.home,e.env):t===`darwin`?N(e.home,e.env):[],o=e=>{e&&(n.includes(e)||n.push(e))};for(let e of r)o(e);for(let e of a)o(e);for(let e of i)o(e);return n}function I(e={}){let t=e.env??process.env;return F({...e,home:e.home??t.HOME,env:t})}function L(e={}){let t=e.env??process.env;return(e.platform??process.platform)===`win32`?t.PATH??``:I({...e,env:t}).join(g.posix.delimiter)}function R(e){let{env:t,port:r,launchdLabel:i}=e,a=e.platform??process.platform,c=V(t,a),u=t.OPENCLAW_PROFILE,f=i||(a===`darwin`?d(u):void 0),p=`${ee(u)}.service`;return{...B(t,c),OPENCLAW_PROFILE:u,OPENCLAW_GATEWAY_PORT:String(r),OPENCLAW_LAUNCHD_LABEL:f,OPENCLAW_SYSTEMD_UNIT:p,OPENCLAW_WINDOWS_TASK_NAME:s(u),OPENCLAW_SERVICE_MARKER:o,OPENCLAW_SERVICE_KIND:l,OPENCLAW_SERVICE_VERSION:n}}function z(e){let{env:t}=e,o=V(t,e.platform??process.platform),s=t.OPENCLAW_GATEWAY_TOKEN?.trim()||t.CLAWDBOT_GATEWAY_TOKEN?.trim()||void 0;return{...B(t,o),OPENCLAW_GATEWAY_TOKEN:s,OPENCLAW_LAUNCHD_LABEL:a(),OPENCLAW_SYSTEMD_UNIT:r(),OPENCLAW_WINDOWS_TASK_NAME:f(),OPENCLAW_TASK_SCRIPT_NAME:i,OPENCLAW_LOG_PREFIX:`node`,OPENCLAW_SERVICE_MARKER:u,OPENCLAW_SERVICE_KIND:c,OPENCLAW_SERVICE_VERSION:n}}function B(e,t){let n={HOME:e.HOME,TMPDIR:t.tmpDir,...t.proxyEnv,NODE_EXTRA_CA_CERTS:t.nodeCaCerts,NODE_USE_SYSTEM_CA:t.nodeUseSystemCa,OPENCLAW_STATE_DIR:t.stateDir,OPENCLAW_CONFIG_PATH:t.configPath};return t.minimalPath&&(n.PATH=t.minimalPath),n}function V(e,t){let n=e.OPENCLAW_STATE_DIR,r=e.OPENCLAW_CONFIG_PATH,i=e.TMPDIR?.trim()||h.tmpdir(),a=ae(e),o=e.NODE_EXTRA_CA_CERTS??(t===`darwin`?`/etc/ssl/cert.pem`:void 0),s=e.NODE_USE_SYSTEM_CA??(t===`darwin`?`1`:void 0);return{stateDir:n,configPath:r,tmpDir:i,minimalPath:t===`win32`?void 0:L({env:e,platform:t}),proxyEnv:a,nodeCaCerts:o,nodeUseSystemCa:s}}async function H(e){let t=e.match(/^(.+?)\/Cellar\/([^/]+)\/[^/]+\/bin\/node$/);if(!t)return e;let n=t[1],r=t[2],i=`${n}/opt/${r}/bin/node`;try{return await v.access(i),i}catch{}if(r===`node`){let e=`${n}/bin/node`;try{return await v.access(e),e}catch{}}return e}const U=[`/.nvm/`,`/.fnm/`,`/.volta/`,`/.asdf/`,`/.n/`,`/.nodenv/`,`/.nodebrew/`,`/nvs/`];function W(e){return e===`win32`?g.win32:g.posix}function G(e,t){let n=W(t).basename(e).toLowerCase();return n===`node`||n===`node.exe`}function K(e,t){let n=W(t).normalize(e).replaceAll(`\\`,`/`);return t===`win32`?n.toLowerCase():n}function q(e,t){if(t===`darwin`)return[`/opt/homebrew/bin/node`,`/usr/local/bin/node`,`/usr/bin/node`];if(t===`linux`)return[`/usr/local/bin/node`,`/usr/bin/node`];if(t===`win32`){let n=W(t),r=e.ProgramFiles??`C:\\Program Files`,i=e[`ProgramFiles(x86)`]??`C:\\Program Files (x86)`;return[n.join(r,`nodejs`,`node.exe`),n.join(i,`nodejs`,`node.exe`)]}return[]}const J=_(m);async function Y(e,t){try{let{stdout:n}=await t(e,[`-p`,`process.versions.node`],{encoding:`utf8`});return n.trim()||null}catch{return null}}function oe(e,t=process.platform){let n=K(e,t);return U.some(e=>n.includes(e))}function se(e,t=process.env,n=process.platform){let r=K(e,n);return q(t,n).some(e=>r===K(e,n))}async function X(e=process.env,t=process.platform){let n=q(e,t);for(let e of n)try{return await v.access(e),e}catch{}return null}async function Z(e){let t=await X(e.env??process.env,e.platform??process.platform);if(!t)return null;let n=await Y(t,e.execFile??J);return{path:t,version:n,supported:p(n)}}function Q(e,t){if(!e||e.supported)return null;let n=e.version??`unknown`,r=t?` Using ${t} for the daemon.`:``;return`System Node ${n} at ${e.path} is below the required Node 22+.${r} Install Node 22+ from nodejs.org or Homebrew.`}async function ce(e){if(e.runtime!==`node`)return;let t=e.platform??process.platform,n=e.execPath??process.execPath;if(n&&G(n,t)&&p(await Y(n,e.execFile??J)))return H(n);let r=await Z(e);if(r?.supported)return r.path}async function le(e){if(e.runtime!==`node`)return;let t=Q(await Z({env:e.env}),e.nodeProgram);t&&e.warn?.(t,e.title)}function $(e=process.argv){let t=e[1]?.replaceAll(`\\`,`/`);return!!(t?.includes(`/src/`)&&t.endsWith(`.ts`))}async function ue(e){return{devMode:e.devMode??$(),nodePath:e.nodePath??await ce({env:e.env,runtime:e.runtime})}}async function de(e){await le({env:e.env,runtime:e.runtime,nodeProgram:e.programArguments[0],warn:e.warn,title:e.title})}export{Q as a,H as c,I as d,D as f,oe as i,z as l,ue as n,Z as o,re as p,se as r,X as s,de as t,R as u};
2
- //# sourceMappingURL=daemon-install-plan.shared-Dx3DBXCG.js.map
@@ -1,2 +1 @@
1
1
  const e=`node`,t=[{value:`node`,label:`Node (recommended)`,hint:`Required for WhatsApp + Telegram. Bun can corrupt memory on reconnect.`}];function n(e){return e===`node`||e===`bun`}export{t as n,n as r,e as t};
2
- //# sourceMappingURL=daemon-runtime-DHiDbRuC.js.map
@@ -1,2 +1 @@
1
1
  const e=`node`,t=[{value:`node`,label:`Node (recommended)`,hint:`Required for WhatsApp + Telegram. Bun can corrupt memory on reconnect.`}];function n(e){return e===`node`||e===`bun`}export{t as n,n as r,e as t};
2
- //# sourceMappingURL=daemon-runtime-VcpeBRJV.js.map
@@ -1,2 +1 @@
1
1
  function e(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function t(e){return typeof e==`boolean`?e:void 0}function n(e){return e?.dangerouslyAllowNameMatching===!0}function r(r,i){let a=[],o=e(r.channels);if(!o)return a;let s=e(o[i]);if(!s)return a;let c=`channels.${i}`,l=`${c}.dangerouslyAllowNameMatching`,u=n(s);a.push({prefix:c,account:s,dangerousNameMatchingEnabled:u,dangerousFlagPath:l});let d=e(s.accounts);if(!d)return a;for(let n of Object.keys(d)){let r=e(d[n]);if(!r)continue;let i=`${c}.accounts.${n}`,o=t(r.dangerouslyAllowNameMatching);a.push({prefix:i,account:r,dangerousNameMatchingEnabled:o??u,dangerousFlagPath:o==null?l:`${i}.dangerouslyAllowNameMatching`})}return a}export{n,r as t};
2
- //# sourceMappingURL=dangerous-name-matching-BOmvAibz.js.map
@@ -1,2 +1 @@
1
1
  function e(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function t(e){return typeof e==`boolean`?e:void 0}function n(e){return e?.dangerouslyAllowNameMatching===!0}function r(r,i){let a=[],o=e(r.channels);if(!o)return a;let s=e(o[i]);if(!s)return a;let c=`channels.${i}`,l=`${c}.dangerouslyAllowNameMatching`,u=n(s);a.push({prefix:c,account:s,dangerousNameMatchingEnabled:u,dangerousFlagPath:l});let d=e(s.accounts);if(!d)return a;for(let n of Object.keys(d)){let r=e(d[n]);if(!r)continue;let i=`${c}.accounts.${n}`,o=t(r.dangerouslyAllowNameMatching);a.push({prefix:i,account:r,dangerousNameMatchingEnabled:o??u,dangerousFlagPath:o==null?l:`${i}.dangerouslyAllowNameMatching`})}return a}export{n,r as t};
2
- //# sourceMappingURL=dangerous-name-matching-DtllRqBD.js.map
@@ -1,2 +1 @@
1
1
  const e=[`sessions_spawn`,`sessions_send`,`cron`,`gateway`,`whatsapp_login`],t=new Set([`exec`,`spawn`,`shell`,`sessions_spawn`,`sessions_send`,`gateway`,`fs_write`,`fs_delete`,`fs_move`,`apply_patch`]);export{e as n,t};
2
- //# sourceMappingURL=dangerous-tools-CFRYQJ6V.js.map
@@ -1,2 +1 @@
1
1
  const e=[`sessions_spawn`,`sessions_send`,`cron`,`gateway`,`whatsapp_login`],t=new Set([`exec`,`spawn`,`shell`,`sessions_spawn`,`sessions_send`,`gateway`,`fs_write`,`fs_delete`,`fs_move`,`apply_patch`]);export{e as n,t};
2
- //# sourceMappingURL=dangerous-tools-oYCu5wfC.js.map
@@ -16,4 +16,3 @@ import{It as e,Lt as t}from"./paths-piJASC5k.js";import{c as n}from"./paths-BpQO
16
16
  `).replace(/<\/?[a-z][a-z0-9]*\b[^>]*>/gi,``).replace(/\n{3,}/g,`
17
17
 
18
18
  `)}const $=r(`outbound/deliver`);async function rt(e){let t=await Ve(e.channel),n=it({...e,outbound:t});if(!n)throw Error(`Outbound not configured for channel: ${e.channel}`);return n}function it(e){let t=e.outbound;if(!t?.sendText)return null;let n=at(e),r=t.sendText,i=t.sendMedia,a=t.chunker??null,o=t.chunkerMode,s=e=>({...n,replyToId:e?.replyToId??n.replyToId,threadId:e?.threadId??n.threadId});return{chunker:a,chunkerMode:o,textChunkLimit:t.textChunkLimit,supportsMedia:!!i,sendPayload:t.sendPayload?async(e,n)=>t.sendPayload({...s(n),text:e.text??``,mediaUrl:e.mediaUrl,payload:e}):void 0,sendText:async(e,t)=>r({...s(t),text:e}),sendMedia:async(e,t,n)=>i?i({...s(n),text:e,mediaUrl:t}):r({...s(n),text:e})}}function at(e){return{cfg:e.cfg,to:e.to,accountId:e.accountId,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,deps:e.deps,silent:e.silent,mediaLocalRoots:e.mediaLocalRoots}}const ot=e=>e instanceof Error&&e.name===`AbortError`;function st(e){return!!e.mediaUrl||(e.mediaUrls?.length??0)>0}function ct(e){return!!(e.channelData&&Object.keys(e.channelData).length>0)}function lt(e,t){let n=st(e),r=ct(e),i=typeof e.text==`string`?e.text:``,a=t===`whatsapp`?i.replace(/^(?:[ \t]*\r?\n)+/,``):i;return a.trim()?a===i?e:{...e,text:a}:!n&&!r?null:{...e,text:``}}function ut(e,t,n,r,i){let a=[];for(let n of Q(e)){let e=n;tt(t)&&e.text&&(t===`telegram`&&e.channelData||(e={...e,text:nt(e.text)}));let r=lt(e,t);r&&a.push(r)}return a}function dt(e){return{text:e.text??``,mediaUrls:e.mediaUrls??(e.mediaUrl?[e.mediaUrl]:[]),channelData:e.channelData}}function ft(e){let t=e.hookRunner?.hasHooks(`message_sent`)??!1,n=!!e.sessionKeyForInternalHooks;return{emitMessageSent:r=>{if(!t&&!n)return;let i=W({to:e.to,content:r.content,success:r.success,error:r.error,channelId:e.channel,accountId:e.accountId??void 0,conversationId:e.to,messageId:r.messageId,isGroup:e.mirrorIsGroup,groupId:e.mirrorGroupId});t&&U(e.hookRunner.runMessageSent(K(i),G(i)),`deliverOutboundPayloads: message_sent plugin hook failed`,e=>{$.warn(e)}),n&&U(h(p(`message`,`sent`,e.sessionKeyForInternalHooks,Te(i))),`deliverOutboundPayloads: message:sent internal hook failed`,e=>{$.warn(e)})},hasMessageSentHooks:t}}async function pt(e){if(!e.enabled)return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary};try{let t=await e.hookRunner.runMessageSending({to:e.to,content:e.payloadSummary.text,metadata:{channel:e.channel,accountId:e.accountId,mediaUrls:e.payloadSummary.mediaUrls}},{channelId:e.channel,accountId:e.accountId??void 0});return t?.cancel?{cancelled:!0,payload:e.payload,payloadSummary:e.payloadSummary}:t?.content==null?{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}:{cancelled:!1,payload:{...e.payload,text:t.content},payloadSummary:{...e.payloadSummary,text:t.content}}}catch{return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}}}async function mt(e){let{channel:t,to:n,payloads:r}=e,i=e.skipQueue?null:await qe({channel:t,to:n,accountId:e.accountId,payloads:r,threadId:e.threadId,replyToId:e.replyToId,bestEffort:e.bestEffort,gifPlayback:e.gifPlayback,silent:e.silent,mirror:e.mirror}).catch(()=>null),a=!1,o=e.onError?{...e,onError:(t,n)=>{a=!0,e.onError(t,n)}}:e;try{let e=await ht(o);return i&&(a?await Ye(i,`partial delivery failure (bestEffort)`).catch(()=>{}):await Je(i).catch(()=>{})),e}catch(e){throw i&&(ot(e)?await Je(i).catch(()=>{}):await Ye(i,e instanceof Error?e.message:String(e)).catch(()=>{})),e}}async function ht(e){let{cfg:t,channel:n,to:r,payloads:i}=e,a=e.accountId,o=e.deps,c=e.abortSignal,l=e.deps?.sendSignal??w,u=ee(t,e.session?.agentId??e.mirror?.agentId),d=[],p=await rt({cfg:t,channel:n,to:r,deps:o,accountId:a,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,silent:e.silent,mediaLocalRoots:u}),m=p.chunker?b(t,n,a,{fallbackLimit:p.textChunkLimit}):void 0,h=n===`telegram`&&typeof m==`number`?Math.min(m,4096):m,g=p.chunker?te(t,n,a):`length`,_=n===`signal`,v=_?ne({cfg:t,channel:`signal`,accountId:a}):`code`,S=_?Re({cfg:t,resolveChannelLimitMb:({cfg:e,accountId:t})=>e.channels?.signal?.accounts?.[t]?.mediaMaxMb??e.channels?.signal?.mediaMaxMb,accountId:a}):void 0,T=async(e,t)=>{if(X(c),!p.chunker||h===void 0){d.push(await p.sendText(e,t));return}if(g===`newline`){let n=(p.chunkerMode??`text`)===`markdown`?y(e,h,`newline`):x(e,h);!n.length&&e&&n.push(e);for(let e of n){let n=p.chunker(e,h);!n.length&&e&&n.push(e);for(let e of n)X(c),d.push(await p.sendText(e,t))}return}let n=p.chunker(e,h);for(let e of n)X(c),d.push(await p.sendText(e,t))},E=async(e,n)=>(X(c),{channel:`signal`,...await l(r,e,{cfg:t,maxBytes:S,accountId:a??void 0,textMode:`plain`,textStyles:n})}),D=async e=>{X(c);let t=h===void 0?C(e,1/0,{tableMode:v}):C(e,h,{tableMode:v});t.length===0&&e&&(t=[{text:e,styles:[]}]);for(let e of t)X(c),d.push(await E(e.text,e.styles))},O=async(e,n)=>{X(c);let i=C(e,1/0,{tableMode:v})[0]??{text:e,styles:[]};return{channel:`signal`,...await l(r,i.text,{cfg:t,mediaUrl:n,maxBytes:S,accountId:a??void 0,textMode:`plain`,textStyles:i.styles,mediaLocalRoots:u})}},k=ut(i,n,t,r,a),A=F(),j=e.mirror?.sessionKey??e.session?.key,M=e.mirror?.isGroup,N=e.mirror?.groupId,{emitMessageSent:P,hasMessageSentHooks:re}=ft({hookRunner:A,channel:n,to:r,accountId:a,sessionKeyForInternalHooks:j,mirrorIsGroup:M,mirrorGroupId:N}),I=A?.hasHooks(`message_sending`)??!1;re&&e.session?.agentId&&!j&&$.warn(`deliverOutboundPayloads: session.agentId present without session key; internal message:sent hook will be skipped`,{channel:n,to:r,agentId:e.session.agentId});for(let t of k){let i=dt(t);try{X(c);let o=await pt({hookRunner:A,enabled:I,payload:t,payloadSummary:i,to:r,channel:n,accountId:a});if(o.cancelled)continue;let s=o.payload;i=o.payloadSummary,e.onPayload?.(i);let l={replyToId:s.replyToId??e.replyToId??void 0,threadId:e.threadId??void 0};if(p.sendPayload&&s.channelData){let e=await p.sendPayload(s,l);d.push(e),P({success:!0,content:i.text,messageId:e.messageId});continue}if(i.mediaUrls.length===0){let e=d.length;_?await D(i.text):await T(i.text,l);let t=d.at(-1)?.messageId;P({success:d.length>e,content:i.text,messageId:t});continue}if(!p.supportsMedia){$.warn(`Plugin outbound adapter does not implement sendMedia; media URLs will be dropped and text fallback will be used`,{channel:n,to:r,mediaCount:i.mediaUrls.length});let e=i.text.trim();if(!e)throw Error(`Plugin outbound adapter does not implement sendMedia and no text fallback is available for media payload`);let t=d.length;await T(e,l);let a=d.at(-1)?.messageId;P({success:d.length>t,content:i.text,messageId:a});continue}let u=!0,f;for(let e of i.mediaUrls){X(c);let t=u?i.text:``;if(u=!1,_){let n=await O(t,e);d.push(n),f=n.messageId}else{let n=await p.sendMedia(t,e,l);d.push(n),f=n.messageId}}P({success:!0,content:i.text,messageId:f})}catch(t){if(P({success:!1,content:i.text,error:t instanceof Error?t.message:String(t)}),!e.bestEffort)throw t;e.onError?.(t,i)}}if(e.mirror&&d.length>0){let t=f({text:e.mirror.text,mediaUrls:e.mirror.mediaUrls});t&&await s({agentId:e.mirror.agentId,sessionKey:e.mirror.sessionKey,text:t})}return d}export{L as A,B as C,ce as D,R as E,P as M,O as N,ae as O,pe as S,V as T,K as _,Q as a,de as b,Fe as c,Ce as d,xe as f,be as g,G as h,Qe as i,F as j,re as k,W as l,Se as m,$e as n,X as o,Te as p,Ze as r,Ie as s,mt as t,ye as u,U as v,ve as w,fe as x,ue as y};
19
- //# sourceMappingURL=deliver-AM3FP5rj.js.map
@@ -16,4 +16,3 @@ import{c as e}from"./paths-CChBdtE8.js";import{d as t,t as n}from"./subsystem-Bc
16
16
  `).replace(/<\/?[a-z][a-z0-9]*\b[^>]*>/gi,``).replace(/\n{3,}/g,`
17
17
 
18
18
  `)}const $=n(`outbound/deliver`);async function rt(e){let t=await Ve(e.channel),n=it({...e,outbound:t});if(!n)throw Error(`Outbound not configured for channel: ${e.channel}`);return n}function it(e){let t=e.outbound;if(!t?.sendText)return null;let n=at(e),r=t.sendText,i=t.sendMedia,a=t.chunker??null,o=t.chunkerMode,s=e=>({...n,replyToId:e?.replyToId??n.replyToId,threadId:e?.threadId??n.threadId});return{chunker:a,chunkerMode:o,textChunkLimit:t.textChunkLimit,supportsMedia:!!i,sendPayload:t.sendPayload?async(e,n)=>t.sendPayload({...s(n),text:e.text??``,mediaUrl:e.mediaUrl,payload:e}):void 0,sendText:async(e,t)=>r({...s(t),text:e}),sendMedia:async(e,t,n)=>i?i({...s(n),text:e,mediaUrl:t}):r({...s(n),text:e})}}function at(e){return{cfg:e.cfg,to:e.to,accountId:e.accountId,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,deps:e.deps,silent:e.silent,mediaLocalRoots:e.mediaLocalRoots}}const ot=e=>e instanceof Error&&e.name===`AbortError`;function st(e){return!!e.mediaUrl||(e.mediaUrls?.length??0)>0}function ct(e){return!!(e.channelData&&Object.keys(e.channelData).length>0)}function lt(e,t){let n=st(e),r=ct(e),i=typeof e.text==`string`?e.text:``,a=t===`whatsapp`?i.replace(/^(?:[ \t]*\r?\n)+/,``):i;return a.trim()?a===i?e:{...e,text:a}:!n&&!r?null:{...e,text:``}}function ut(e,t,n,r,i){let a=[];for(let n of Q(e)){let e=n;tt(t)&&e.text&&(t===`telegram`&&e.channelData||(e={...e,text:nt(e.text)}));let r=lt(e,t);r&&a.push(r)}return a}function dt(e){return{text:e.text??``,mediaUrls:e.mediaUrls??(e.mediaUrl?[e.mediaUrl]:[]),channelData:e.channelData}}function ft(e){let t=e.hookRunner?.hasHooks(`message_sent`)??!1,n=!!e.sessionKeyForInternalHooks;return{emitMessageSent:r=>{if(!t&&!n)return;let i=W({to:e.to,content:r.content,success:r.success,error:r.error,channelId:e.channel,accountId:e.accountId??void 0,conversationId:e.to,messageId:r.messageId,isGroup:e.mirrorIsGroup,groupId:e.mirrorGroupId});t&&U(e.hookRunner.runMessageSent(K(i),G(i)),`deliverOutboundPayloads: message_sent plugin hook failed`,e=>{$.warn(e)}),n&&U(g(h(`message`,`sent`,e.sessionKeyForInternalHooks,Te(i))),`deliverOutboundPayloads: message:sent internal hook failed`,e=>{$.warn(e)})},hasMessageSentHooks:t}}async function pt(e){if(!e.enabled)return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary};try{let t=await e.hookRunner.runMessageSending({to:e.to,content:e.payloadSummary.text,metadata:{channel:e.channel,accountId:e.accountId,mediaUrls:e.payloadSummary.mediaUrls}},{channelId:e.channel,accountId:e.accountId??void 0});return t?.cancel?{cancelled:!0,payload:e.payload,payloadSummary:e.payloadSummary}:t?.content==null?{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}:{cancelled:!1,payload:{...e.payload,text:t.content},payloadSummary:{...e.payloadSummary,text:t.content}}}catch{return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}}}async function mt(e){let{channel:t,to:n,payloads:r}=e,i=e.skipQueue?null:await qe({channel:t,to:n,accountId:e.accountId,payloads:r,threadId:e.threadId,replyToId:e.replyToId,bestEffort:e.bestEffort,gifPlayback:e.gifPlayback,silent:e.silent,mirror:e.mirror}).catch(()=>null),a=!1,o=e.onError?{...e,onError:(t,n)=>{a=!0,e.onError(t,n)}}:e;try{let e=await ht(o);return i&&(a?await Ye(i,`partial delivery failure (bestEffort)`).catch(()=>{}):await Je(i).catch(()=>{})),e}catch(e){throw i&&(ot(e)?await Je(i).catch(()=>{}):await Ye(i,e instanceof Error?e.message:String(e)).catch(()=>{})),e}}async function ht(e){let{cfg:t,channel:n,to:r,payloads:i}=e,a=e.accountId,o=e.deps,s=e.abortSignal,c=e.deps?.sendSignal??w,l=ee(t,e.session?.agentId??e.mirror?.agentId),u=[],p=await rt({cfg:t,channel:n,to:r,deps:o,accountId:a,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,silent:e.silent,mediaLocalRoots:l}),m=p.chunker?b(t,n,a,{fallbackLimit:p.textChunkLimit}):void 0,h=n===`telegram`&&typeof m==`number`?Math.min(m,4096):m,g=p.chunker?te(t,n,a):`length`,_=n===`signal`,v=_?ne({cfg:t,channel:`signal`,accountId:a}):`code`,S=_?Re({cfg:t,resolveChannelLimitMb:({cfg:e,accountId:t})=>e.channels?.signal?.accounts?.[t]?.mediaMaxMb??e.channels?.signal?.mediaMaxMb,accountId:a}):void 0,T=async(e,t)=>{if(X(s),!p.chunker||h===void 0){u.push(await p.sendText(e,t));return}if(g===`newline`){let n=(p.chunkerMode??`text`)===`markdown`?y(e,h,`newline`):x(e,h);!n.length&&e&&n.push(e);for(let e of n){let n=p.chunker(e,h);!n.length&&e&&n.push(e);for(let e of n)X(s),u.push(await p.sendText(e,t))}return}let n=p.chunker(e,h);for(let e of n)X(s),u.push(await p.sendText(e,t))},E=async(e,n)=>(X(s),{channel:`signal`,...await c(r,e,{cfg:t,maxBytes:S,accountId:a??void 0,textMode:`plain`,textStyles:n})}),D=async e=>{X(s);let t=h===void 0?C(e,1/0,{tableMode:v}):C(e,h,{tableMode:v});t.length===0&&e&&(t=[{text:e,styles:[]}]);for(let e of t)X(s),u.push(await E(e.text,e.styles))},O=async(e,n)=>{X(s);let i=C(e,1/0,{tableMode:v})[0]??{text:e,styles:[]};return{channel:`signal`,...await c(r,i.text,{cfg:t,mediaUrl:n,maxBytes:S,accountId:a??void 0,textMode:`plain`,textStyles:i.styles,mediaLocalRoots:l})}},k=ut(i,n,t,r,a),A=F(),j=e.mirror?.sessionKey??e.session?.key,M=e.mirror?.isGroup,N=e.mirror?.groupId,{emitMessageSent:P,hasMessageSentHooks:re}=ft({hookRunner:A,channel:n,to:r,accountId:a,sessionKeyForInternalHooks:j,mirrorIsGroup:M,mirrorGroupId:N}),I=A?.hasHooks(`message_sending`)??!1;re&&e.session?.agentId&&!j&&$.warn(`deliverOutboundPayloads: session.agentId present without session key; internal message:sent hook will be skipped`,{channel:n,to:r,agentId:e.session.agentId});for(let t of k){let i=dt(t);try{X(s);let o=await pt({hookRunner:A,enabled:I,payload:t,payloadSummary:i,to:r,channel:n,accountId:a});if(o.cancelled)continue;let c=o.payload;i=o.payloadSummary,e.onPayload?.(i);let l={replyToId:c.replyToId??e.replyToId??void 0,threadId:e.threadId??void 0};if(p.sendPayload&&c.channelData){let e=await p.sendPayload(c,l);u.push(e),P({success:!0,content:i.text,messageId:e.messageId});continue}if(i.mediaUrls.length===0){let e=u.length;_?await D(i.text):await T(i.text,l);let t=u.at(-1)?.messageId;P({success:u.length>e,content:i.text,messageId:t});continue}if(!p.supportsMedia){$.warn(`Plugin outbound adapter does not implement sendMedia; media URLs will be dropped and text fallback will be used`,{channel:n,to:r,mediaCount:i.mediaUrls.length});let e=i.text.trim();if(!e)throw Error(`Plugin outbound adapter does not implement sendMedia and no text fallback is available for media payload`);let t=u.length;await T(e,l);let a=u.at(-1)?.messageId;P({success:u.length>t,content:i.text,messageId:a});continue}let d=!0,f;for(let e of i.mediaUrls){X(s);let t=d?i.text:``;if(d=!1,_){let n=await O(t,e);u.push(n),f=n.messageId}else{let n=await p.sendMedia(t,e,l);u.push(n),f=n.messageId}}P({success:!0,content:i.text,messageId:f})}catch(t){if(P({success:!1,content:i.text,error:t instanceof Error?t.message:String(t)}),!e.bestEffort)throw t;e.onError?.(t,i)}}if(e.mirror&&u.length>0){let t=d({text:e.mirror.text,mediaUrls:e.mirror.mediaUrls});t&&await f({agentId:e.mirror.agentId,sessionKey:e.mirror.sessionKey,text:t})}return u}export{L as A,B as C,ce as D,R as E,P as M,O as N,ae as O,pe as S,V as T,K as _,Q as a,de as b,Fe as c,Ce as d,xe as f,be as g,G as h,Qe as i,F as j,re as k,W as l,Se as m,$e as n,X as o,Te as p,Ze as r,Ie as s,mt as t,ye as u,U as v,ve as w,fe as x,ue as y};
19
- //# sourceMappingURL=deliver-BhWhLvQO.js.map
@@ -16,4 +16,3 @@ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{S as t,t as n}from"./s
16
16
  `).replace(/<\/?[a-z][a-z0-9]*\b[^>]*>/gi,``).replace(/\n{3,}/g,`
17
17
 
18
18
  `)}var Ye=e({deliverOutboundPayloads:()=>st});const $=n(`outbound/deliver`);async function Xe(e){let t=await Ve(e.channel),n=Ze({...e,outbound:t});if(!n)throw Error(`Outbound not configured for channel: ${e.channel}`);return n}function Ze(e){let t=e.outbound;if(!t?.sendText)return null;let n=Qe(e),r=t.sendText,i=t.sendMedia,a=t.chunker??null,o=t.chunkerMode,s=e=>({...n,replyToId:e?.replyToId??n.replyToId,threadId:e?.threadId??n.threadId});return{chunker:a,chunkerMode:o,textChunkLimit:t.textChunkLimit,supportsMedia:!!i,sendPayload:t.sendPayload?async(e,n)=>t.sendPayload({...s(n),text:e.text??``,mediaUrl:e.mediaUrl,payload:e}):void 0,sendText:async(e,t)=>r({...s(t),text:e}),sendMedia:async(e,t,n)=>i?i({...s(n),text:e,mediaUrl:t}):r({...s(n),text:e})}}function Qe(e){return{cfg:e.cfg,to:e.to,accountId:e.accountId,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,deps:e.deps,silent:e.silent,mediaLocalRoots:e.mediaLocalRoots}}const $e=e=>e instanceof Error&&e.name===`AbortError`;function et(e){return!!e.mediaUrl||(e.mediaUrls?.length??0)>0}function tt(e){return!!(e.channelData&&Object.keys(e.channelData).length>0)}function nt(e,t){let n=et(e),r=tt(e),i=typeof e.text==`string`?e.text:``,a=t===`whatsapp`?i.replace(/^(?:[ \t]*\r?\n)+/,``):i;return a.trim()?a===i?e:{...e,text:a}:!n&&!r?null:{...e,text:``}}function rt(e,t,n,r,i){let a=[];for(let n of Q(e)){let e=n;qe(t)&&e.text&&(t===`telegram`&&e.channelData||(e={...e,text:Je(e.text)}));let r=nt(e,t);r&&a.push(r)}return a}function it(e){return{text:e.text??``,mediaUrls:e.mediaUrls??(e.mediaUrl?[e.mediaUrl]:[]),channelData:e.channelData}}function at(e){let t=e.hookRunner?.hasHooks(`message_sent`)??!1,n=!!e.sessionKeyForInternalHooks;return{emitMessageSent:r=>{if(!t&&!n)return;let i=q({to:e.to,content:r.content,success:r.success,error:r.error,channelId:e.channel,accountId:e.accountId??void 0,conversationId:e.to,messageId:r.messageId,isGroup:e.mirrorIsGroup,groupId:e.mirrorGroupId});t&&K(e.hookRunner.runMessageSent(be(i),ve(i)),`deliverOutboundPayloads: message_sent plugin hook failed`,e=>{$.warn(e)}),n&&K(u(d(`message`,`sent`,e.sessionKeyForInternalHooks,Te(i))),`deliverOutboundPayloads: message:sent internal hook failed`,e=>{$.warn(e)})},hasMessageSentHooks:t}}async function ot(e){if(!e.enabled)return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary};try{let t=await e.hookRunner.runMessageSending({to:e.to,content:e.payloadSummary.text,metadata:{channel:e.channel,accountId:e.accountId,mediaUrls:e.payloadSummary.mediaUrls}},{channelId:e.channel,accountId:e.accountId??void 0});return t?.cancel?{cancelled:!0,payload:e.payload,payloadSummary:e.payloadSummary}:t?.content==null?{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}:{cancelled:!1,payload:{...e.payload,text:t.content},payloadSummary:{...e.payloadSummary,text:t.content}}}catch{return{cancelled:!1,payload:e.payload,payloadSummary:e.payloadSummary}}}async function st(e){let{channel:t,to:n,payloads:r}=e,i=e.skipQueue?null:await E({channel:t,to:n,accountId:e.accountId,payloads:r,threadId:e.threadId,replyToId:e.replyToId,bestEffort:e.bestEffort,gifPlayback:e.gifPlayback,silent:e.silent,mirror:e.mirror}).catch(()=>null),a=!1,o=e.onError?{...e,onError:(t,n)=>{a=!0,e.onError(t,n)}}:e;try{let e=await ct(o);return i&&(a?await T(i,`partial delivery failure (bestEffort)`).catch(()=>{}):await D(i).catch(()=>{})),e}catch(e){throw i&&($e(e)?await D(i).catch(()=>{}):await T(i,e instanceof Error?e.message:String(e)).catch(()=>{})),e}}async function ct(e){let{cfg:t,channel:n,to:a,payloads:o}=e,s=e.accountId,c=e.deps,l=e.abortSignal,u=e.deps?.sendSignal??w,d=g(t,e.session?.agentId??e.mirror?.agentId),f=[],p=await Xe({cfg:t,channel:n,to:a,deps:c,accountId:s,replyToId:e.replyToId,threadId:e.threadId,identity:e.identity,gifPlayback:e.gifPlayback,silent:e.silent,mediaLocalRoots:d}),m=p.chunker?b(t,n,s,{fallbackLimit:p.textChunkLimit}):void 0,h=n===`telegram`&&typeof m==`number`?Math.min(m,4096):m,_=p.chunker?ee(t,n,s):`length`,v=n===`signal`,S=v?te({cfg:t,channel:`signal`,accountId:s}):`code`,T=v?Re({cfg:t,resolveChannelLimitMb:({cfg:e,accountId:t})=>e.channels?.signal?.accounts?.[t]?.mediaMaxMb??e.channels?.signal?.mediaMaxMb,accountId:s}):void 0,E=async(e,t)=>{if(Z(l),!p.chunker||h===void 0){f.push(await p.sendText(e,t));return}if(_===`newline`){let n=(p.chunkerMode??`text`)===`markdown`?y(e,h,`newline`):x(e,h);!n.length&&e&&n.push(e);for(let e of n){let n=p.chunker(e,h);!n.length&&e&&n.push(e);for(let e of n)Z(l),f.push(await p.sendText(e,t))}return}let n=p.chunker(e,h);for(let e of n)Z(l),f.push(await p.sendText(e,t))},D=async(e,n)=>(Z(l),{channel:`signal`,...await u(a,e,{cfg:t,maxBytes:T,accountId:s??void 0,textMode:`plain`,textStyles:n})}),O=async e=>{Z(l);let t=h===void 0?C(e,1/0,{tableMode:S}):C(e,h,{tableMode:S});t.length===0&&e&&(t=[{text:e,styles:[]}]);for(let e of t)Z(l),f.push(await D(e.text,e.styles))},k=async(e,n)=>{Z(l);let r=C(e,1/0,{tableMode:S})[0]??{text:e,styles:[]};return{channel:`signal`,...await u(a,r.text,{cfg:t,mediaUrl:n,maxBytes:T,accountId:s??void 0,textMode:`plain`,textStyles:r.styles,mediaLocalRoots:d})}},A=rt(o,n,t,a,s),j=I(),M=e.mirror?.sessionKey??e.session?.key,N=e.mirror?.isGroup,P=e.mirror?.groupId,{emitMessageSent:F,hasMessageSentHooks:L}=at({hookRunner:j,channel:n,to:a,accountId:s,sessionKeyForInternalHooks:M,mirrorIsGroup:N,mirrorGroupId:P}),R=j?.hasHooks(`message_sending`)??!1;L&&e.session?.agentId&&!M&&$.warn(`deliverOutboundPayloads: session.agentId present without session key; internal message:sent hook will be skipped`,{channel:n,to:a,agentId:e.session.agentId});for(let t of A){let r=it(t);try{Z(l);let i=await ot({hookRunner:j,enabled:R,payload:t,payloadSummary:r,to:a,channel:n,accountId:s});if(i.cancelled)continue;let o=i.payload;r=i.payloadSummary,e.onPayload?.(r);let c={replyToId:o.replyToId??e.replyToId??void 0,threadId:e.threadId??void 0};if(p.sendPayload&&o.channelData){let e=await p.sendPayload(o,c);f.push(e),F({success:!0,content:r.text,messageId:e.messageId});continue}if(r.mediaUrls.length===0){let e=f.length;v?await O(r.text):await E(r.text,c);let t=f.at(-1)?.messageId;F({success:f.length>e,content:r.text,messageId:t});continue}if(!p.supportsMedia){$.warn(`Plugin outbound adapter does not implement sendMedia; media URLs will be dropped and text fallback will be used`,{channel:n,to:a,mediaCount:r.mediaUrls.length});let e=r.text.trim();if(!e)throw Error(`Plugin outbound adapter does not implement sendMedia and no text fallback is available for media payload`);let t=f.length;await E(e,c);let i=f.at(-1)?.messageId;F({success:f.length>t,content:r.text,messageId:i});continue}let u=!0,d;for(let e of r.mediaUrls){Z(l);let t=u?r.text:``;if(u=!1,v){let n=await k(t,e);f.push(n),d=n.messageId}else{let n=await p.sendMedia(t,e,c);f.push(n),d=n.messageId}}F({success:!0,content:r.text,messageId:d})}catch(t){if(F({success:!1,content:r.text,error:t instanceof Error?t.message:String(t)}),!e.bestEffort)throw t;e.onError?.(t,r)}}if(e.mirror&&f.length>0){let t=i({text:e.mirror.text,mediaUrls:e.mirror.mediaUrls});t&&await r({agentId:e.mirror.agentId,sessionKey:e.mirror.sessionKey,text:t})}return f}export{R as A,de as C,V as D,W as E,k as F,I as M,F as N,oe as O,L as P,ue as S,ge as T,ye as _,We as a,ce as b,Ie as c,_e as d,Ce as f,ve as g,Se as h,Ue as i,B as j,re as k,Fe as l,Te as m,Ye as n,Q as o,xe as p,Ge as r,Z as s,st as t,q as u,be as v,U as w,le as x,K as y};
19
- //# sourceMappingURL=deliver-DUNkj4hy.js.map