@agent-our/openclaw 2026.2.6-3

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 (2759) hide show
  1. package/CHANGELOG.md +1596 -0
  2. package/LICENSE +21 -0
  3. package/README-header.png +0 -0
  4. package/README.md +545 -0
  5. package/assets/avatar-placeholder.svg +19 -0
  6. package/assets/chrome-extension/README.md +22 -0
  7. package/assets/chrome-extension/background.js +438 -0
  8. package/assets/chrome-extension/icons/icon128.png +0 -0
  9. package/assets/chrome-extension/icons/icon16.png +0 -0
  10. package/assets/chrome-extension/icons/icon32.png +0 -0
  11. package/assets/chrome-extension/icons/icon48.png +0 -0
  12. package/assets/chrome-extension/manifest.json +25 -0
  13. package/assets/chrome-extension/options.html +196 -0
  14. package/assets/chrome-extension/options.js +59 -0
  15. package/assets/dmg-background-small.png +0 -0
  16. package/assets/dmg-background.png +0 -0
  17. package/dist/accounts-B9umzy_R.js +250 -0
  18. package/dist/accounts-DkUtJa-O.js +251 -0
  19. package/dist/acp-cli-BBglTQii.js +923 -0
  20. package/dist/acp-cli-DrYibaVx.js +926 -0
  21. package/dist/agent-CbM7AbvV.js +704 -0
  22. package/dist/agent-DlzdY95q.js +704 -0
  23. package/dist/agent-scope-CB4YNu1h.js +613 -0
  24. package/dist/agent-scope-jAWKj2TP.js +371 -0
  25. package/dist/agent-scope-sKVRNONG.js +371 -0
  26. package/dist/archive-Dy3Ezb-5.js +85 -0
  27. package/dist/archive-ccN9aDgq.js +85 -0
  28. package/dist/audit-B2D3VRh8.js +1853 -0
  29. package/dist/audit-BdNhDEyo.js +1853 -0
  30. package/dist/auth-CMKwNo-f.js +192 -0
  31. package/dist/auth-DuZNzAAH.js +192 -0
  32. package/dist/auth-health-BNW1lZ8k.js +149 -0
  33. package/dist/auth-health-C3HJKHJi.js +149 -0
  34. package/dist/auth-profiles-DYdLc1cj.js +2981 -0
  35. package/dist/boolean-BgXe2hyu.js +30 -0
  36. package/dist/brew-CAcErcKz.js +46 -0
  37. package/dist/brew-CcZV0dSS.js +46 -0
  38. package/dist/build-info.json +5 -0
  39. package/dist/call-YdaudqMl.js +280 -0
  40. package/dist/call-wfwuMJe-.js +280 -0
  41. package/dist/canvas-host/a2ui/.bundle.hash +1 -0
  42. package/dist/canvas-host/a2ui/a2ui.bundle.js +17765 -0
  43. package/dist/canvas-host/a2ui/index.html +307 -0
  44. package/dist/channel-options-B-G7tzkB.js +32 -0
  45. package/dist/channel-options-jfcr7ChQ.js +62 -0
  46. package/dist/channel-selection-C5KQyVUF.js +51 -0
  47. package/dist/channel-selection-DXVHNo3U.js +51 -0
  48. package/dist/channel-summary-CFZImIiG.js +1120 -0
  49. package/dist/channel-summary-CoLmo1EU.js +1120 -0
  50. package/dist/channels-cli-Cc3MY52X.js +1413 -0
  51. package/dist/channels-cli-D2lTE59V.js +1415 -0
  52. package/dist/channels-status-issues-Dln8njuR.js +18 -0
  53. package/dist/channels-status-issues-ptsVdM7G.js +18 -0
  54. package/dist/chrome-B3IuUad-.js +1953 -0
  55. package/dist/chrome-BNSd7Bie.js +1973 -0
  56. package/dist/clack-prompter-B9yLhyOm.js +92 -0
  57. package/dist/clack-prompter-CEKDd_Vg.js +92 -0
  58. package/dist/cli/daemon-cli.js +2 -0
  59. package/dist/cli-Fq054ApO.js +89 -0
  60. package/dist/cli-rd9P_S1u.js +86 -0
  61. package/dist/cli-utils-BkRQdAoC.js +43 -0
  62. package/dist/cli-utils-DzrdzskQ.js +43 -0
  63. package/dist/client-DvWPgCi6.js +1815 -0
  64. package/dist/command-format-CFzL448l.js +52 -0
  65. package/dist/command-format-ChfKqObn.js +52 -0
  66. package/dist/command-format-ayFsmwwz.js +38 -0
  67. package/dist/command-options-qBrt237S.js +33 -0
  68. package/dist/commands-CQNsJDTA.js +230 -0
  69. package/dist/completion-cli-C5BH1XDk.js +773 -0
  70. package/dist/completion-cli-CNKrO4o0.js +434 -0
  71. package/dist/config-BEUgkMYH.js +4922 -0
  72. package/dist/config-BM_g3TBU.js +4921 -0
  73. package/dist/config-Ct91v0JZ.js +5662 -0
  74. package/dist/config-guard-C-ACw81n.js +5774 -0
  75. package/dist/configure-CcXcdOUM.js +896 -0
  76. package/dist/configure-DWMokcXD.js +895 -0
  77. package/dist/constants-CNTiY-ZN.js +65 -0
  78. package/dist/constants-HPrOsATF.js +65 -0
  79. package/dist/control-service-B3g4oucx.js +61 -0
  80. package/dist/control-service-Dh4DKu3S.js +61 -0
  81. package/dist/control-ui/apple-touch-icon.png +0 -0
  82. package/dist/control-ui/assets/index-Dm8pMa9P.js +11534 -0
  83. package/dist/control-ui/assets/index-Dm8pMa9P.js.map +1 -0
  84. package/dist/control-ui/assets/index-eofFRbdc.css +1 -0
  85. package/dist/control-ui/favicon-32.png +0 -0
  86. package/dist/control-ui/favicon.ico +0 -0
  87. package/dist/control-ui/favicon.svg +22 -0
  88. package/dist/control-ui/index.html +17 -0
  89. package/dist/cron-cli-Bx6joqjI.js +454 -0
  90. package/dist/cron-cli-C5k_pz71.js +457 -0
  91. package/dist/daemon-cli-D-Gm28gZ.js +758 -0
  92. package/dist/daemon-cli-DQ5dlrIR.js +757 -0
  93. package/dist/daemon-runtime-C648Lhju.js +517 -0
  94. package/dist/daemon-runtime-Chcfufn1.js +517 -0
  95. package/dist/deliver-DBiz1Usy.js +2557 -0
  96. package/dist/deliver-DmpRwa2w.js +2587 -0
  97. package/dist/deliver-X5yjr56P.js +2587 -0
  98. package/dist/deps-DlFoECb7.js +27 -0
  99. package/dist/deps-UZ0CMWoo.js +27 -0
  100. package/dist/devices-cli-CpGSCere.js +207 -0
  101. package/dist/devices-cli-DIZJXWIY.js +204 -0
  102. package/dist/directory-cli-DhC1uA2S.js +247 -0
  103. package/dist/directory-cli-ZDXb1dmk.js +244 -0
  104. package/dist/dispatcher-DLhpc7HC.js +160 -0
  105. package/dist/dns-cli-B7Xi-izZ.js +198 -0
  106. package/dist/dns-cli-BsvKw0iq.js +201 -0
  107. package/dist/docs-cli-Bi5BtLfY.js +161 -0
  108. package/dist/docs-cli-CkczsV22.js +159 -0
  109. package/dist/doctor-CN9WxbwV.js +2586 -0
  110. package/dist/doctor-ClCw8y0M.js +2588 -0
  111. package/dist/entry.js +1330 -0
  112. package/dist/env-0_mKbEWW.js +32 -0
  113. package/dist/errors-CZ9opC6L.js +1952 -0
  114. package/dist/exec-B8JKbXKW.js +246 -0
  115. package/dist/exec-BMnoMcZW.js +1099 -0
  116. package/dist/exec-HEWTMJ7j.js +246 -0
  117. package/dist/exec-approvals-D4ny1TmX.js +1043 -0
  118. package/dist/exec-approvals-DmzWB9Zy.js +1043 -0
  119. package/dist/exec-approvals-cli-DPD2Z2Cg.js +385 -0
  120. package/dist/exec-approvals-cli-Dl4Y4IqE.js +388 -0
  121. package/dist/extensionAPI.js +68146 -0
  122. package/dist/format-8citvr_1.js +34 -0
  123. package/dist/format-tlvh4-cQ.js +34 -0
  124. package/dist/gateway-cli-B_lqsPIR.js +18017 -0
  125. package/dist/gateway-cli-D1Jvi6Ab.js +18016 -0
  126. package/dist/gateway-rpc-CYPgf43u.js +28 -0
  127. package/dist/gateway-rpc-CzWTXOHS.js +28 -0
  128. package/dist/github-copilot-auth-BcnJgC7r.js +1256 -0
  129. package/dist/github-copilot-auth-OEOMPahq.js +1256 -0
  130. package/dist/github-copilot-token-B3SA95yo.js +103 -0
  131. package/dist/github-copilot-token-SLWintYd.js +103 -0
  132. package/dist/github-copilot-token-pGSmVaW-.js +103 -0
  133. package/dist/gmail-setup-utils-CwS9GsIM.js +428 -0
  134. package/dist/gmail-setup-utils-D3Wa2Tx_.js +428 -0
  135. package/dist/health-format-CbDB25L0.js +1388 -0
  136. package/dist/health-format-DIJjpCDL.js +1389 -0
  137. package/dist/help-format-BlaVZH29.js +17 -0
  138. package/dist/help-format-DuMTLWZ-.js +17 -0
  139. package/dist/helpers-BiyEksaK.js +25 -0
  140. package/dist/helpers-CSZtxHTa.js +10 -0
  141. package/dist/helpers-CxHtCvId.js +10 -0
  142. package/dist/helpers-azbX_hrI.js +25 -0
  143. package/dist/hooks/bundled/boot-md/HOOK.md +19 -0
  144. package/dist/hooks/bundled/command-logger/HOOK.md +122 -0
  145. package/dist/hooks/bundled/session-memory/HOOK.md +109 -0
  146. package/dist/hooks/bundled/soul-evil/HOOK.md +71 -0
  147. package/dist/hooks-cli-BuNzxQ-L.js +1058 -0
  148. package/dist/hooks-cli-D-QCmmC9.js +1061 -0
  149. package/dist/hooks-status-BvbcN-ho.js +443 -0
  150. package/dist/hooks-status-CH1ZdZs5.js +443 -0
  151. package/dist/image-BP1mAJzN.js +1421 -0
  152. package/dist/image-DMNGdVWb.js +629 -0
  153. package/dist/image-E_i8K6Vq.js +629 -0
  154. package/dist/index.js +5957 -0
  155. package/dist/installs-BcBaI60O.js +425 -0
  156. package/dist/installs-BhEjOqPy.js +425 -0
  157. package/dist/is-main-B6kCyqsv.js +25 -0
  158. package/dist/is-main-PYGa3tDA.js +25 -0
  159. package/dist/links-B4nk2iDf.js +15 -0
  160. package/dist/links-B5pRdmo1.js +15 -0
  161. package/dist/loader-DqiCudFO.js +64754 -0
  162. package/dist/logging-6zx7VGt-.js +15 -0
  163. package/dist/logging-BWRYHvLp.js +1 -0
  164. package/dist/logging-TXWhN8jG.js +15 -0
  165. package/dist/logging-pqyrk15z.js +1 -0
  166. package/dist/login-qr-Bo7zzLWd.js +478 -0
  167. package/dist/login-qr-CFw3hF2h.js +478 -0
  168. package/dist/login-qr-UmMP2m6M.js +475 -0
  169. package/dist/logs-cli-BBPaaFhF.js +230 -0
  170. package/dist/logs-cli-DTo-7DxM.js +227 -0
  171. package/dist/manager-B365Xcjg.js +3218 -0
  172. package/dist/manager-BtFI9Zdc.js +3216 -0
  173. package/dist/manager-Bwpep10z.js +3216 -0
  174. package/dist/manifest-registry-C69Z-I4v.js +668 -0
  175. package/dist/manifest-registry-DHaa1SJb.js +668 -0
  176. package/dist/message-channel-Bpfe5l5f.js +110 -0
  177. package/dist/message-channel-CQ6DgRUw.js +110 -0
  178. package/dist/model-selection-BXhwukLK.js +2734 -0
  179. package/dist/model-selection-CjiXwYEH.js +2983 -0
  180. package/dist/models-cli-DQKO_tWR.js +2542 -0
  181. package/dist/models-cli-k41kE3Yo.js +2545 -0
  182. package/dist/net-5DEH6AJK.js +1815 -0
  183. package/dist/node-cli-BXYXe5FE.js +1456 -0
  184. package/dist/node-cli-D7W69MZm.js +1459 -0
  185. package/dist/node-service-BTKxbzYo.js +67 -0
  186. package/dist/node-service-BoC2MKaK.js +67 -0
  187. package/dist/nodes-cli-MDb6jux3.js +1210 -0
  188. package/dist/nodes-cli-q-rHzVBz.js +1207 -0
  189. package/dist/nodes-screen-DT5HvhJV.js +157 -0
  190. package/dist/nodes-screen-DtXuFQdk.js +157 -0
  191. package/dist/note-B5HnoeZX.js +73 -0
  192. package/dist/note-_C44YfAQ.js +73 -0
  193. package/dist/onboard-channels-CKzF9fxT.js +671 -0
  194. package/dist/onboard-channels-Dr4FB1Sm.js +671 -0
  195. package/dist/onboard-skills-F6Kw1jrV.js +3452 -0
  196. package/dist/onboard-skills-aY4SkANg.js +3452 -0
  197. package/dist/onboarding-Do6ghpyS.js +3269 -0
  198. package/dist/openclaw-root-9ILYSmJ9.js +84 -0
  199. package/dist/openclaw-root-Cvotktkd.js +84 -0
  200. package/dist/pairing-cli-BUGQkncg.js +114 -0
  201. package/dist/pairing-cli-C63BXADO.js +117 -0
  202. package/dist/pairing-labels-DERlP-Wr.js +9 -0
  203. package/dist/pairing-labels-DhY2DQey.js +9 -0
  204. package/dist/pairing-store-D9vodPRR.js +391 -0
  205. package/dist/pairing-store-DWX2hYou.js +391 -0
  206. package/dist/parse-BZz5lHzQ.js +23 -0
  207. package/dist/parse-DqAvJRIf.js +23 -0
  208. package/dist/parse-log-line-BnB7770k.js +44 -0
  209. package/dist/parse-log-line-DSvJi17i.js +44 -0
  210. package/dist/parse-timeout-DV8NQQWk.js +16 -0
  211. package/dist/parse-timeout-Du-wHHNi.js +16 -0
  212. package/dist/path-env-DP3DsVge.js +77 -0
  213. package/dist/path-env-h3xp5PqO.js +77 -0
  214. package/dist/paths-B1kfl4h5.js +164 -0
  215. package/dist/paths-BT8VDsrj.js +43 -0
  216. package/dist/paths-BveE45t9.js +40 -0
  217. package/dist/paths-CR6bsrfc.js +43 -0
  218. package/dist/paths-scjhy7N2.js +180 -0
  219. package/dist/pi-embedded-helpers-BBIlv_VS.js +1303 -0
  220. package/dist/pi-embedded-helpers-CgGWSZV9.js +8480 -0
  221. package/dist/pi-embedded-helpers-CvujKXfr.js +1303 -0
  222. package/dist/pi-model-discovery-CV2V1HHz.js +20 -0
  223. package/dist/pi-model-discovery-DzEIEgHL.js +20 -0
  224. package/dist/pi-model-discovery-EhM2JAQo.js +20 -0
  225. package/dist/pi-tools.policy-JNsnW6cw.js +230 -0
  226. package/dist/plugin-auto-enable-CKBWhy8V.js +460 -0
  227. package/dist/plugin-auto-enable-D7FGzrWo.js +460 -0
  228. package/dist/plugin-sdk/agents/agent-paths.d.ts +2 -0
  229. package/dist/plugin-sdk/agents/agent-scope.d.ts +37 -0
  230. package/dist/plugin-sdk/agents/anthropic-payload-log.d.ts +16 -0
  231. package/dist/plugin-sdk/agents/apply-patch-update.d.ts +8 -0
  232. package/dist/plugin-sdk/agents/apply-patch.d.ts +24 -0
  233. package/dist/plugin-sdk/agents/auth-profiles/constants.d.ts +20 -0
  234. package/dist/plugin-sdk/agents/auth-profiles/display.d.ts +7 -0
  235. package/dist/plugin-sdk/agents/auth-profiles/doctor.d.ts +8 -0
  236. package/dist/plugin-sdk/agents/auth-profiles/external-cli-sync.d.ts +7 -0
  237. package/dist/plugin-sdk/agents/auth-profiles/oauth.d.ts +12 -0
  238. package/dist/plugin-sdk/agents/auth-profiles/order.d.ts +8 -0
  239. package/dist/plugin-sdk/agents/auth-profiles/paths.d.ts +4 -0
  240. package/dist/plugin-sdk/agents/auth-profiles/profiles.d.ts +18 -0
  241. package/dist/plugin-sdk/agents/auth-profiles/repair.d.ts +14 -0
  242. package/dist/plugin-sdk/agents/auth-profiles/session-override.d.ts +18 -0
  243. package/dist/plugin-sdk/agents/auth-profiles/store.d.ts +10 -0
  244. package/dist/plugin-sdk/agents/auth-profiles/types.d.ts +60 -0
  245. package/dist/plugin-sdk/agents/auth-profiles/usage.d.ts +47 -0
  246. package/dist/plugin-sdk/agents/auth-profiles.d.ts +11 -0
  247. package/dist/plugin-sdk/agents/bash-process-registry.d.ts +68 -0
  248. package/dist/plugin-sdk/agents/bash-tools.d.ts +4 -0
  249. package/dist/plugin-sdk/agents/bash-tools.exec.d.ts +54 -0
  250. package/dist/plugin-sdk/agents/bash-tools.process.d.ts +7 -0
  251. package/dist/plugin-sdk/agents/bash-tools.shared.d.ts +46 -0
  252. package/dist/plugin-sdk/agents/bedrock-discovery.d.ts +9 -0
  253. package/dist/plugin-sdk/agents/bootstrap-files.d.ts +25 -0
  254. package/dist/plugin-sdk/agents/bootstrap-hooks.d.ts +10 -0
  255. package/dist/plugin-sdk/agents/cache-trace.d.ts +51 -0
  256. package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
  257. package/dist/plugin-sdk/agents/chutes-oauth.d.ts +46 -0
  258. package/dist/plugin-sdk/agents/cli-backends.d.ts +8 -0
  259. package/dist/plugin-sdk/agents/cli-credentials.d.ts +82 -0
  260. package/dist/plugin-sdk/agents/cli-runner/helpers.d.ts +76 -0
  261. package/dist/plugin-sdk/agents/cli-runner.d.ts +41 -0
  262. package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
  263. package/dist/plugin-sdk/agents/cloudflare-ai-gateway.d.ts +22 -0
  264. package/dist/plugin-sdk/agents/context-window-guard.d.ts +24 -0
  265. package/dist/plugin-sdk/agents/context.d.ts +1 -0
  266. package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
  267. package/dist/plugin-sdk/agents/defaults.d.ts +3 -0
  268. package/dist/plugin-sdk/agents/docs-path.d.ts +6 -0
  269. package/dist/plugin-sdk/agents/failover-error.d.ts +33 -0
  270. package/dist/plugin-sdk/agents/identity.d.ts +25 -0
  271. package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
  272. package/dist/plugin-sdk/agents/memory-search.d.ts +66 -0
  273. package/dist/plugin-sdk/agents/minimax-vlm.d.ts +7 -0
  274. package/dist/plugin-sdk/agents/model-auth.d.ts +36 -0
  275. package/dist/plugin-sdk/agents/model-catalog.d.ts +25 -0
  276. package/dist/plugin-sdk/agents/model-compat.d.ts +2 -0
  277. package/dist/plugin-sdk/agents/model-fallback.d.ts +49 -0
  278. package/dist/plugin-sdk/agents/model-selection.d.ts +93 -0
  279. package/dist/plugin-sdk/agents/models-config.d.ts +5 -0
  280. package/dist/plugin-sdk/agents/models-config.providers.d.ts +26 -0
  281. package/dist/plugin-sdk/agents/openclaw-tools.d.ts +44 -0
  282. package/dist/plugin-sdk/agents/pi-embedded-block-chunker.d.ts +19 -0
  283. package/dist/plugin-sdk/agents/pi-embedded-helpers/bootstrap.d.ts +28 -0
  284. package/dist/plugin-sdk/agents/pi-embedded-helpers/errors.d.ts +47 -0
  285. package/dist/plugin-sdk/agents/pi-embedded-helpers/google.d.ts +8 -0
  286. package/dist/plugin-sdk/agents/pi-embedded-helpers/images.d.ts +20 -0
  287. package/dist/plugin-sdk/agents/pi-embedded-helpers/messaging-dedupe.d.ts +10 -0
  288. package/dist/plugin-sdk/agents/pi-embedded-helpers/openai.d.ts +9 -0
  289. package/dist/plugin-sdk/agents/pi-embedded-helpers/thinking.d.ts +5 -0
  290. package/dist/plugin-sdk/agents/pi-embedded-helpers/turns.d.ts +20 -0
  291. package/dist/plugin-sdk/agents/pi-embedded-helpers/types.d.ts +5 -0
  292. package/dist/plugin-sdk/agents/pi-embedded-helpers.d.ts +11 -0
  293. package/dist/plugin-sdk/agents/pi-embedded-messaging.d.ts +8 -0
  294. package/dist/plugin-sdk/agents/pi-embedded-runner/abort.d.ts +1 -0
  295. package/dist/plugin-sdk/agents/pi-embedded-runner/cache-ttl.d.ts +9 -0
  296. package/dist/plugin-sdk/agents/pi-embedded-runner/compact.d.ts +50 -0
  297. package/dist/plugin-sdk/agents/pi-embedded-runner/extensions.d.ts +12 -0
  298. package/dist/plugin-sdk/agents/pi-embedded-runner/extra-params.d.ts +22 -0
  299. package/dist/plugin-sdk/agents/pi-embedded-runner/google.d.ts +39 -0
  300. package/dist/plugin-sdk/agents/pi-embedded-runner/history.d.ts +12 -0
  301. package/dist/plugin-sdk/agents/pi-embedded-runner/lanes.d.ts +3 -0
  302. package/dist/plugin-sdk/agents/pi-embedded-runner/logger.d.ts +1 -0
  303. package/dist/plugin-sdk/agents/pi-embedded-runner/model.d.ts +22 -0
  304. package/dist/plugin-sdk/agents/pi-embedded-runner/run/attempt.d.ts +5 -0
  305. package/dist/plugin-sdk/agents/pi-embedded-runner/run/images.d.ts +83 -0
  306. package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +116 -0
  307. package/dist/plugin-sdk/agents/pi-embedded-runner/run/payloads.d.ts +34 -0
  308. package/dist/plugin-sdk/agents/pi-embedded-runner/run/types.d.ts +133 -0
  309. package/dist/plugin-sdk/agents/pi-embedded-runner/run.d.ts +3 -0
  310. package/dist/plugin-sdk/agents/pi-embedded-runner/runs.d.ts +14 -0
  311. package/dist/plugin-sdk/agents/pi-embedded-runner/sandbox-info.d.ts +4 -0
  312. package/dist/plugin-sdk/agents/pi-embedded-runner/session-manager-cache.d.ts +2 -0
  313. package/dist/plugin-sdk/agents/pi-embedded-runner/session-manager-init.d.ts +17 -0
  314. package/dist/plugin-sdk/agents/pi-embedded-runner/system-prompt.d.ts +51 -0
  315. package/dist/plugin-sdk/agents/pi-embedded-runner/tool-result-truncation.d.ts +65 -0
  316. package/dist/plugin-sdk/agents/pi-embedded-runner/tool-split.d.ts +11 -0
  317. package/dist/plugin-sdk/agents/pi-embedded-runner/types.d.ts +70 -0
  318. package/dist/plugin-sdk/agents/pi-embedded-runner/utils.d.ts +8 -0
  319. package/dist/plugin-sdk/agents/pi-embedded-runner.d.ts +12 -0
  320. package/dist/plugin-sdk/agents/pi-embedded-subscribe.d.ts +20 -0
  321. package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.d.ts +2 -0
  322. package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.lifecycle.d.ts +8 -0
  323. package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.messages.d.ts +12 -0
  324. package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.tools.d.ts +18 -0
  325. package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.types.d.ts +108 -0
  326. package/dist/plugin-sdk/agents/pi-embedded-subscribe.raw-stream.d.ts +1 -0
  327. package/dist/plugin-sdk/agents/pi-embedded-subscribe.tools.d.ts +6 -0
  328. package/dist/plugin-sdk/agents/pi-embedded-subscribe.types.d.ts +44 -0
  329. package/dist/plugin-sdk/agents/pi-embedded-utils.d.ts +38 -0
  330. package/dist/plugin-sdk/agents/pi-embedded.d.ts +2 -0
  331. package/dist/plugin-sdk/agents/pi-extensions/compaction-safeguard-runtime.d.ts +6 -0
  332. package/dist/plugin-sdk/agents/pi-extensions/context-pruning/runtime.d.ts +9 -0
  333. package/dist/plugin-sdk/agents/pi-extensions/context-pruning/settings.d.ts +44 -0
  334. package/dist/plugin-sdk/agents/pi-extensions/context-pruning/tools.d.ts +2 -0
  335. package/dist/plugin-sdk/agents/pi-model-discovery.d.ts +4 -0
  336. package/dist/plugin-sdk/agents/pi-settings.d.ts +19 -0
  337. package/dist/plugin-sdk/agents/pi-tool-definition-adapter.d.ts +10 -0
  338. package/dist/plugin-sdk/agents/pi-tools.abort.d.ts +2 -0
  339. package/dist/plugin-sdk/agents/pi-tools.before-tool-call.d.ts +25 -0
  340. package/dist/plugin-sdk/agents/pi-tools.d.ts +69 -0
  341. package/dist/plugin-sdk/agents/pi-tools.policy.d.ts +37 -0
  342. package/dist/plugin-sdk/agents/pi-tools.read.d.ts +35 -0
  343. package/dist/plugin-sdk/agents/pi-tools.schema.d.ts +3 -0
  344. package/dist/plugin-sdk/agents/pi-tools.types.d.ts +2 -0
  345. package/dist/plugin-sdk/agents/pty-dsr.d.ts +5 -0
  346. package/dist/plugin-sdk/agents/pty-keys.d.ts +13 -0
  347. package/dist/plugin-sdk/agents/sandbox/browser-bridges.d.ts +5 -0
  348. package/dist/plugin-sdk/agents/sandbox/browser.d.ts +8 -0
  349. package/dist/plugin-sdk/agents/sandbox/config-hash.d.ts +9 -0
  350. package/dist/plugin-sdk/agents/sandbox/config.d.ts +22 -0
  351. package/dist/plugin-sdk/agents/sandbox/constants.d.ts +19 -0
  352. package/dist/plugin-sdk/agents/sandbox/context.d.ts +12 -0
  353. package/dist/plugin-sdk/agents/sandbox/docker.d.ts +28 -0
  354. package/dist/plugin-sdk/agents/sandbox/manage.d.ts +13 -0
  355. package/dist/plugin-sdk/agents/sandbox/prune.d.ts +3 -0
  356. package/dist/plugin-sdk/agents/sandbox/registry.d.ts +30 -0
  357. package/dist/plugin-sdk/agents/sandbox/runtime-status.d.ts +18 -0
  358. package/dist/plugin-sdk/agents/sandbox/shared.d.ts +4 -0
  359. package/dist/plugin-sdk/agents/sandbox/tool-policy.d.ts +4 -0
  360. package/dist/plugin-sdk/agents/sandbox/types.d.ts +73 -0
  361. package/dist/plugin-sdk/agents/sandbox/types.docker.d.ts +25 -0
  362. package/dist/plugin-sdk/agents/sandbox/workspace.d.ts +1 -0
  363. package/dist/plugin-sdk/agents/sandbox-paths.d.ts +21 -0
  364. package/dist/plugin-sdk/agents/sandbox.d.ts +8 -0
  365. package/dist/plugin-sdk/agents/schema/clean-for-gemini.d.ts +2 -0
  366. package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
  367. package/dist/plugin-sdk/agents/session-file-repair.d.ts +11 -0
  368. package/dist/plugin-sdk/agents/session-slug.d.ts +1 -0
  369. package/dist/plugin-sdk/agents/session-tool-result-guard-wrapper.d.ts +14 -0
  370. package/dist/plugin-sdk/agents/session-tool-result-guard.d.ts +21 -0
  371. package/dist/plugin-sdk/agents/session-transcript-repair.d.ts +26 -0
  372. package/dist/plugin-sdk/agents/session-write-lock.d.ts +21 -0
  373. package/dist/plugin-sdk/agents/shell-utils.d.ts +7 -0
  374. package/dist/plugin-sdk/agents/skills/bundled-dir.d.ts +7 -0
  375. package/dist/plugin-sdk/agents/skills/config.d.ts +14 -0
  376. package/dist/plugin-sdk/agents/skills/env-overrides.d.ts +10 -0
  377. package/dist/plugin-sdk/agents/skills/frontmatter.d.ts +6 -0
  378. package/dist/plugin-sdk/agents/skills/plugin-skills.d.ts +5 -0
  379. package/dist/plugin-sdk/agents/skills/refresh.d.ts +19 -0
  380. package/dist/plugin-sdk/agents/skills/serialize.d.ts +1 -0
  381. package/dist/plugin-sdk/agents/skills/types.d.ts +80 -0
  382. package/dist/plugin-sdk/agents/skills/workspace.d.ts +49 -0
  383. package/dist/plugin-sdk/agents/skills.d.ts +7 -0
  384. package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +22 -0
  385. package/dist/plugin-sdk/agents/subagent-announce.d.ts +30 -0
  386. package/dist/plugin-sdk/agents/subagent-registry.d.ts +35 -0
  387. package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +5 -0
  388. package/dist/plugin-sdk/agents/synthetic-models.d.ts +153 -0
  389. package/dist/plugin-sdk/agents/system-prompt-params.d.ts +30 -0
  390. package/dist/plugin-sdk/agents/system-prompt-report.d.ts +20 -0
  391. package/dist/plugin-sdk/agents/system-prompt.d.ts +77 -0
  392. package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
  393. package/dist/plugin-sdk/agents/tool-call-id.d.ts +17 -0
  394. package/dist/plugin-sdk/agents/tool-display.d.ts +15 -0
  395. package/dist/plugin-sdk/agents/tool-images.d.ts +19 -0
  396. package/dist/plugin-sdk/agents/tool-policy.d.ts +39 -0
  397. package/dist/plugin-sdk/agents/tool-summaries.d.ts +2 -0
  398. package/dist/plugin-sdk/agents/tools/agent-step.d.ts +12 -0
  399. package/dist/plugin-sdk/agents/tools/agents-list-tool.d.ts +6 -0
  400. package/dist/plugin-sdk/agents/tools/browser-tool.d.ts +5 -0
  401. package/dist/plugin-sdk/agents/tools/browser-tool.schema.d.ts +50 -0
  402. package/dist/plugin-sdk/agents/tools/canvas-tool.d.ts +2 -0
  403. package/dist/plugin-sdk/agents/tools/common.d.ts +52 -0
  404. package/dist/plugin-sdk/agents/tools/cron-tool.d.ts +6 -0
  405. package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
  406. package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +4 -0
  407. package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
  408. package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
  409. package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +3 -0
  410. package/dist/plugin-sdk/agents/tools/gateway-tool.d.ts +6 -0
  411. package/dist/plugin-sdk/agents/tools/gateway.d.ts +14 -0
  412. package/dist/plugin-sdk/agents/tools/image-tool.d.ts +26 -0
  413. package/dist/plugin-sdk/agents/tools/image-tool.helpers.d.ts +21 -0
  414. package/dist/plugin-sdk/agents/tools/memory-tool.d.ts +10 -0
  415. package/dist/plugin-sdk/agents/tools/message-tool.d.ts +18 -0
  416. package/dist/plugin-sdk/agents/tools/nodes-tool.d.ts +6 -0
  417. package/dist/plugin-sdk/agents/tools/nodes-utils.d.ts +20 -0
  418. package/dist/plugin-sdk/agents/tools/session-status-tool.d.ts +6 -0
  419. package/dist/plugin-sdk/agents/tools/sessions-announce-target.d.ts +5 -0
  420. package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +90 -0
  421. package/dist/plugin-sdk/agents/tools/sessions-history-tool.d.ts +5 -0
  422. package/dist/plugin-sdk/agents/tools/sessions-list-tool.d.ts +5 -0
  423. package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
  424. package/dist/plugin-sdk/agents/tools/sessions-send-tool.a2a.d.ts +12 -0
  425. package/dist/plugin-sdk/agents/tools/sessions-send-tool.d.ts +7 -0
  426. package/dist/plugin-sdk/agents/tools/sessions-spawn-tool.d.ts +15 -0
  427. package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
  428. package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +9 -0
  429. package/dist/plugin-sdk/agents/tools/tts-tool.d.ts +7 -0
  430. package/dist/plugin-sdk/agents/tools/web-fetch-utils.d.ts +18 -0
  431. package/dist/plugin-sdk/agents/tools/web-fetch.d.ts +25 -0
  432. package/dist/plugin-sdk/agents/tools/web-search.d.ts +22 -0
  433. package/dist/plugin-sdk/agents/tools/web-shared.d.ts +17 -0
  434. package/dist/plugin-sdk/agents/tools/web-tools.d.ts +2 -0
  435. package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
  436. package/dist/plugin-sdk/agents/transcript-policy.d.ts +23 -0
  437. package/dist/plugin-sdk/agents/usage.d.ts +35 -0
  438. package/dist/plugin-sdk/agents/venice-models.d.ts +238 -0
  439. package/dist/plugin-sdk/agents/workspace-run.d.ts +18 -0
  440. package/dist/plugin-sdk/agents/workspace-templates.d.ts +6 -0
  441. package/dist/plugin-sdk/agents/workspace.d.ts +33 -0
  442. package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
  443. package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
  444. package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
  445. package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
  446. package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +54 -0
  447. package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
  448. package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
  449. package/dist/plugin-sdk/auto-reply/dispatch.d.ts +27 -0
  450. package/dist/plugin-sdk/auto-reply/envelope.d.ts +59 -0
  451. package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
  452. package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +26 -0
  453. package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +16 -0
  454. package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
  455. package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
  456. package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +20 -0
  457. package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +49 -0
  458. package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +17 -0
  459. package/dist/plugin-sdk/auto-reply/reply/agent-runner-memory.d.ts +20 -0
  460. package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +25 -0
  461. package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +30 -0
  462. package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +38 -0
  463. package/dist/plugin-sdk/auto-reply/reply/bash-command.d.ts +19 -0
  464. package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
  465. package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
  466. package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
  467. package/dist/plugin-sdk/auto-reply/reply/body.d.ts +11 -0
  468. package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
  469. package/dist/plugin-sdk/auto-reply/reply/commands-approve.d.ts +2 -0
  470. package/dist/plugin-sdk/auto-reply/reply/commands-bash.d.ts +2 -0
  471. package/dist/plugin-sdk/auto-reply/reply/commands-compact.d.ts +2 -0
  472. package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
  473. package/dist/plugin-sdk/auto-reply/reply/commands-context-report.d.ts +3 -0
  474. package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
  475. package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +2 -0
  476. package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +10 -0
  477. package/dist/plugin-sdk/auto-reply/reply/commands-models.d.ts +23 -0
  478. package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
  479. package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +7 -0
  480. package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +24 -0
  481. package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +13 -0
  482. package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
  483. package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +60 -0
  484. package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
  485. package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
  486. package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
  487. package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
  488. package/dist/plugin-sdk/auto-reply/reply/directive-handling.auth.d.ts +19 -0
  489. package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
  490. package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +47 -0
  491. package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +36 -0
  492. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model-picker.d.ts +13 -0
  493. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model.d.ts +42 -0
  494. package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +62 -0
  495. package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +37 -0
  496. package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
  497. package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +16 -0
  498. package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +38 -0
  499. package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
  500. package/dist/plugin-sdk/auto-reply/reply/exec/directive.d.ts +20 -0
  501. package/dist/plugin-sdk/auto-reply/reply/exec.d.ts +1 -0
  502. package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
  503. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +64 -0
  504. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
  505. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +91 -0
  506. package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +59 -0
  507. package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +69 -0
  508. package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
  509. package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +16 -0
  510. package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
  511. package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
  512. package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
  513. package/dist/plugin-sdk/auto-reply/reply/inbound-sender-meta.d.ts +5 -0
  514. package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
  515. package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
  516. package/dist/plugin-sdk/auto-reply/reply/memory-flush.d.ts +23 -0
  517. package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +18 -0
  518. package/dist/plugin-sdk/auto-reply/reply/model-selection.d.ts +61 -0
  519. package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +13 -0
  520. package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
  521. package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
  522. package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
  523. package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
  524. package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
  525. package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
  526. package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
  527. package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +19 -0
  528. package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +84 -0
  529. package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
  530. package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
  531. package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +51 -0
  532. package/dist/plugin-sdk/auto-reply/reply/reply-elevated.d.ts +23 -0
  533. package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
  534. package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +22 -0
  535. package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +20 -0
  536. package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
  537. package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
  538. package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +51 -0
  539. package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
  540. package/dist/plugin-sdk/auto-reply/reply/session-reset-model.d.ts +24 -0
  541. package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +34 -0
  542. package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +13 -0
  543. package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
  544. package/dist/plugin-sdk/auto-reply/reply/stage-sandbox-media.d.ts +9 -0
  545. package/dist/plugin-sdk/auto-reply/reply/streaming-directives.d.ts +10 -0
  546. package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +9 -0
  547. package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
  548. package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
  549. package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
  550. package/dist/plugin-sdk/auto-reply/reply.d.ts +6 -0
  551. package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
  552. package/dist/plugin-sdk/auto-reply/skill-commands.d.ts +18 -0
  553. package/dist/plugin-sdk/auto-reply/status.d.ts +53 -0
  554. package/dist/plugin-sdk/auto-reply/templating.d.ts +140 -0
  555. package/dist/plugin-sdk/auto-reply/thinking.d.ts +22 -0
  556. package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
  557. package/dist/plugin-sdk/auto-reply/tool-meta.d.ts +8 -0
  558. package/dist/plugin-sdk/auto-reply/types.d.ts +57 -0
  559. package/dist/plugin-sdk/browser/bridge-server.d.ts +17 -0
  560. package/dist/plugin-sdk/browser/cdp.d.ts +123 -0
  561. package/dist/plugin-sdk/browser/cdp.helpers.d.ts +11 -0
  562. package/dist/plugin-sdk/browser/chrome.d.ts +20 -0
  563. package/dist/plugin-sdk/browser/chrome.executables.d.ts +9 -0
  564. package/dist/plugin-sdk/browser/chrome.profile-decoration.d.ts +10 -0
  565. package/dist/plugin-sdk/browser/client-actions-core.d.ts +143 -0
  566. package/dist/plugin-sdk/browser/client-actions-observe.d.ts +68 -0
  567. package/dist/plugin-sdk/browser/client-actions-state.d.ts +90 -0
  568. package/dist/plugin-sdk/browser/client-actions-types.d.ts +18 -0
  569. package/dist/plugin-sdk/browser/client-actions.d.ts +4 -0
  570. package/dist/plugin-sdk/browser/client-fetch.d.ts +3 -0
  571. package/dist/plugin-sdk/browser/client.d.ts +147 -0
  572. package/dist/plugin-sdk/browser/config.d.ts +39 -0
  573. package/dist/plugin-sdk/browser/constants.d.ts +8 -0
  574. package/dist/plugin-sdk/browser/control-service.d.ts +5 -0
  575. package/dist/plugin-sdk/browser/extension-relay.d.ts +15 -0
  576. package/dist/plugin-sdk/browser/profiles-service.d.ts +25 -0
  577. package/dist/plugin-sdk/browser/profiles.d.ts +30 -0
  578. package/dist/plugin-sdk/browser/pw-ai-module.d.ts +6 -0
  579. package/dist/plugin-sdk/browser/pw-ai.d.ts +2 -0
  580. package/dist/plugin-sdk/browser/pw-role-snapshot.d.ts +35 -0
  581. package/dist/plugin-sdk/browser/pw-session.d.ts +135 -0
  582. package/dist/plugin-sdk/browser/pw-tools-core.activity.d.ts +21 -0
  583. package/dist/plugin-sdk/browser/pw-tools-core.d.ts +8 -0
  584. package/dist/plugin-sdk/browser/pw-tools-core.downloads.d.ts +34 -0
  585. package/dist/plugin-sdk/browser/pw-tools-core.interactions.d.ts +112 -0
  586. package/dist/plugin-sdk/browser/pw-tools-core.responses.d.ts +13 -0
  587. package/dist/plugin-sdk/browser/pw-tools-core.shared.d.ts +6 -0
  588. package/dist/plugin-sdk/browser/pw-tools-core.snapshot.d.ts +64 -0
  589. package/dist/plugin-sdk/browser/pw-tools-core.state.d.ts +46 -0
  590. package/dist/plugin-sdk/browser/pw-tools-core.storage.d.ts +47 -0
  591. package/dist/plugin-sdk/browser/pw-tools-core.trace.d.ts +12 -0
  592. package/dist/plugin-sdk/browser/routes/agent.act.d.ts +3 -0
  593. package/dist/plugin-sdk/browser/routes/agent.act.shared.d.ts +10 -0
  594. package/dist/plugin-sdk/browser/routes/agent.d.ts +3 -0
  595. package/dist/plugin-sdk/browser/routes/agent.debug.d.ts +3 -0
  596. package/dist/plugin-sdk/browser/routes/agent.shared.d.ts +9 -0
  597. package/dist/plugin-sdk/browser/routes/agent.snapshot.d.ts +3 -0
  598. package/dist/plugin-sdk/browser/routes/agent.storage.d.ts +3 -0
  599. package/dist/plugin-sdk/browser/routes/basic.d.ts +3 -0
  600. package/dist/plugin-sdk/browser/routes/dispatcher.d.ts +15 -0
  601. package/dist/plugin-sdk/browser/routes/index.d.ts +3 -0
  602. package/dist/plugin-sdk/browser/routes/tabs.d.ts +3 -0
  603. package/dist/plugin-sdk/browser/routes/types.d.ts +15 -0
  604. package/dist/plugin-sdk/browser/routes/utils.d.ts +15 -0
  605. package/dist/plugin-sdk/browser/screenshot.d.ts +9 -0
  606. package/dist/plugin-sdk/browser/server-context.d.ts +3 -0
  607. package/dist/plugin-sdk/browser/server-context.types.d.ts +78 -0
  608. package/dist/plugin-sdk/browser/target-id.d.ts +11 -0
  609. package/dist/plugin-sdk/browser/trash.d.ts +1 -0
  610. package/dist/plugin-sdk/channel-web.d.ts +6 -0
  611. package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
  612. package/dist/plugin-sdk/channels/allowlist-match.d.ts +10 -0
  613. package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +6 -0
  614. package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
  615. package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
  616. package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
  617. package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
  618. package/dist/plugin-sdk/channels/dock.d.ts +36 -0
  619. package/dist/plugin-sdk/channels/location.d.ts +21 -0
  620. package/dist/plugin-sdk/channels/logging.d.ts +20 -0
  621. package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
  622. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
  623. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
  624. package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
  625. package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
  626. package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
  627. package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
  628. package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
  629. package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
  630. package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
  631. package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
  632. package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
  633. package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
  634. package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
  635. package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +28 -0
  636. package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
  637. package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
  638. package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
  639. package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
  640. package/dist/plugin-sdk/channels/plugins/message-actions.d.ts +7 -0
  641. package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +2 -0
  642. package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
  643. package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
  644. package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
  645. package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
  646. package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +2 -0
  647. package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
  648. package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
  649. package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +3 -0
  650. package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +2 -0
  651. package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +2 -0
  652. package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
  653. package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +2 -0
  654. package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
  655. package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
  656. package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
  657. package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
  658. package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
  659. package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
  660. package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
  661. package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
  662. package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +10 -0
  663. package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
  664. package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
  665. package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +294 -0
  666. package/dist/plugin-sdk/channels/plugins/types.core.d.ts +311 -0
  667. package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
  668. package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
  669. package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
  670. package/dist/plugin-sdk/channels/registry.d.ts +16 -0
  671. package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
  672. package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
  673. package/dist/plugin-sdk/channels/session.d.ts +18 -0
  674. package/dist/plugin-sdk/channels/targets.d.ts +25 -0
  675. package/dist/plugin-sdk/channels/typing.d.ts +12 -0
  676. package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
  677. package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
  678. package/dist/plugin-sdk/cli/cli-utils.d.ts +18 -0
  679. package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
  680. package/dist/plugin-sdk/cli/deps.d.ts +18 -0
  681. package/dist/plugin-sdk/cli/memory-cli.d.ts +12 -0
  682. package/dist/plugin-sdk/cli/nodes-camera.d.ts +26 -0
  683. package/dist/plugin-sdk/cli/nodes-canvas.d.ts +10 -0
  684. package/dist/plugin-sdk/cli/nodes-run.d.ts +3 -0
  685. package/dist/plugin-sdk/cli/nodes-screen.d.ts +18 -0
  686. package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
  687. package/dist/plugin-sdk/cli/parse-timeout.d.ts +1 -0
  688. package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
  689. package/dist/plugin-sdk/cli/progress.d.ts +24 -0
  690. package/dist/plugin-sdk/cli/wait.d.ts +1 -0
  691. package/dist/plugin-sdk/commands/agent/types.d.ts +75 -0
  692. package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
  693. package/dist/plugin-sdk/commands/health.d.ts +63 -0
  694. package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
  695. package/dist/plugin-sdk/commands/onboard-helpers.d.ts +81 -0
  696. package/dist/plugin-sdk/commands/onboard-types.d.ts +67 -0
  697. package/dist/plugin-sdk/commands/signal-install.d.ts +8 -0
  698. package/dist/plugin-sdk/compat/legacy-names.d.ts +8 -0
  699. package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
  700. package/dist/plugin-sdk/config/agent-limits.d.ts +5 -0
  701. package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
  702. package/dist/plugin-sdk/config/channel-capabilities.d.ts +6 -0
  703. package/dist/plugin-sdk/config/commands.d.ts +16 -0
  704. package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
  705. package/dist/plugin-sdk/config/config.d.ts +7 -0
  706. package/dist/plugin-sdk/config/defaults.d.ts +18 -0
  707. package/dist/plugin-sdk/config/env-substitution.d.ts +35 -0
  708. package/dist/plugin-sdk/config/env-vars.d.ts +2 -0
  709. package/dist/plugin-sdk/config/group-policy.d.ts +44 -0
  710. package/dist/plugin-sdk/config/includes.d.ts +32 -0
  711. package/dist/plugin-sdk/config/io.d.ts +36 -0
  712. package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
  713. package/dist/plugin-sdk/config/legacy.d.ts +6 -0
  714. package/dist/plugin-sdk/config/legacy.migrations.d.ts +1 -0
  715. package/dist/plugin-sdk/config/legacy.migrations.part-1.d.ts +2 -0
  716. package/dist/plugin-sdk/config/legacy.migrations.part-2.d.ts +2 -0
  717. package/dist/plugin-sdk/config/legacy.migrations.part-3.d.ts +2 -0
  718. package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
  719. package/dist/plugin-sdk/config/legacy.shared.d.ts +18 -0
  720. package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
  721. package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
  722. package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
  723. package/dist/plugin-sdk/config/paths.d.ts +57 -0
  724. package/dist/plugin-sdk/config/port-defaults.d.ts +13 -0
  725. package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
  726. package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
  727. package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
  728. package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
  729. package/dist/plugin-sdk/config/sessions/paths.d.ts +11 -0
  730. package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
  731. package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
  732. package/dist/plugin-sdk/config/sessions/store.d.ts +38 -0
  733. package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
  734. package/dist/plugin-sdk/config/sessions/types.d.ts +146 -0
  735. package/dist/plugin-sdk/config/sessions.d.ts +9 -0
  736. package/dist/plugin-sdk/config/talk.d.ts +11 -0
  737. package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
  738. package/dist/plugin-sdk/config/types.agent-defaults.d.ts +254 -0
  739. package/dist/plugin-sdk/config/types.agents.d.ts +77 -0
  740. package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
  741. package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
  742. package/dist/plugin-sdk/config/types.base.d.ts +149 -0
  743. package/dist/plugin-sdk/config/types.browser.d.ts +41 -0
  744. package/dist/plugin-sdk/config/types.channels.d.ts +34 -0
  745. package/dist/plugin-sdk/config/types.cron.d.ts +5 -0
  746. package/dist/plugin-sdk/config/types.d.ts +29 -0
  747. package/dist/plugin-sdk/config/types.discord.d.ts +151 -0
  748. package/dist/plugin-sdk/config/types.gateway.d.ts +224 -0
  749. package/dist/plugin-sdk/config/types.googlechat.d.ts +100 -0
  750. package/dist/plugin-sdk/config/types.hooks.d.ts +106 -0
  751. package/dist/plugin-sdk/config/types.imessage.d.ts +71 -0
  752. package/dist/plugin-sdk/config/types.memory.d.ts +43 -0
  753. package/dist/plugin-sdk/config/types.messages.d.ts +106 -0
  754. package/dist/plugin-sdk/config/types.models.d.ts +47 -0
  755. package/dist/plugin-sdk/config/types.msteams.d.ts +101 -0
  756. package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
  757. package/dist/plugin-sdk/config/types.openclaw.d.ts +108 -0
  758. package/dist/plugin-sdk/config/types.plugins.d.ts +32 -0
  759. package/dist/plugin-sdk/config/types.queue.d.ts +13 -0
  760. package/dist/plugin-sdk/config/types.sandbox.d.ts +76 -0
  761. package/dist/plugin-sdk/config/types.signal.d.ts +86 -0
  762. package/dist/plugin-sdk/config/types.skills.d.ts +28 -0
  763. package/dist/plugin-sdk/config/types.slack.d.ts +138 -0
  764. package/dist/plugin-sdk/config/types.telegram.d.ts +160 -0
  765. package/dist/plugin-sdk/config/types.tools.d.ts +437 -0
  766. package/dist/plugin-sdk/config/types.tts.d.ts +78 -0
  767. package/dist/plugin-sdk/config/types.whatsapp.d.ts +157 -0
  768. package/dist/plugin-sdk/config/validation.d.ts +17 -0
  769. package/dist/plugin-sdk/config/version.d.ts +8 -0
  770. package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +245 -0
  771. package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +819 -0
  772. package/dist/plugin-sdk/config/zod-schema.agents.d.ts +493 -0
  773. package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
  774. package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
  775. package/dist/plugin-sdk/config/zod-schema.core.d.ts +647 -0
  776. package/dist/plugin-sdk/config/zod-schema.d.ts +3085 -0
  777. package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +78 -0
  778. package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +2761 -0
  779. package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +231 -0
  780. package/dist/plugin-sdk/config/zod-schema.providers.d.ts +1662 -0
  781. package/dist/plugin-sdk/config/zod-schema.session.d.ts +183 -0
  782. package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
  783. package/dist/plugin-sdk/cron/normalize.d.ts +9 -0
  784. package/dist/plugin-sdk/cron/parse.d.ts +1 -0
  785. package/dist/plugin-sdk/cron/payload-migration.d.ts +3 -0
  786. package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
  787. package/dist/plugin-sdk/cron/service/jobs.d.ts +13 -0
  788. package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
  789. package/dist/plugin-sdk/cron/service/normalize.d.ts +17 -0
  790. package/dist/plugin-sdk/cron/service/ops.d.ts +43 -0
  791. package/dist/plugin-sdk/cron/service/state.d.ts +96 -0
  792. package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
  793. package/dist/plugin-sdk/cron/service/timer.d.ts +23 -0
  794. package/dist/plugin-sdk/cron/service.d.ts +48 -0
  795. package/dist/plugin-sdk/cron/store.d.ts +6 -0
  796. package/dist/plugin-sdk/cron/types.d.ts +93 -0
  797. package/dist/plugin-sdk/daemon/constants.d.ts +30 -0
  798. package/dist/plugin-sdk/discord/accounts.d.ts +17 -0
  799. package/dist/plugin-sdk/discord/api.d.ts +11 -0
  800. package/dist/plugin-sdk/discord/audit.d.ts +29 -0
  801. package/dist/plugin-sdk/discord/chunk.d.ts +20 -0
  802. package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
  803. package/dist/plugin-sdk/discord/gateway-logging.d.ts +8 -0
  804. package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +137 -0
  805. package/dist/plugin-sdk/discord/monitor/exec-approvals.d.ts +70 -0
  806. package/dist/plugin-sdk/discord/monitor/format.d.ts +13 -0
  807. package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +9 -0
  808. package/dist/plugin-sdk/discord/monitor/listeners.d.ts +49 -0
  809. package/dist/plugin-sdk/discord/monitor/message-handler.d.ts +26 -0
  810. package/dist/plugin-sdk/discord/monitor/message-handler.preflight.d.ts +3 -0
  811. package/dist/plugin-sdk/discord/monitor/message-handler.preflight.types.d.ts +86 -0
  812. package/dist/plugin-sdk/discord/monitor/message-handler.process.d.ts +2 -0
  813. package/dist/plugin-sdk/discord/monitor/message-utils.d.ts +31 -0
  814. package/dist/plugin-sdk/discord/monitor/native-command.d.ts +20 -0
  815. package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +9 -0
  816. package/dist/plugin-sdk/discord/monitor/provider.d.ts +13 -0
  817. package/dist/plugin-sdk/discord/monitor/reply-context.d.ts +13 -0
  818. package/dist/plugin-sdk/discord/monitor/reply-delivery.d.ts +18 -0
  819. package/dist/plugin-sdk/discord/monitor/sender-identity.d.ts +31 -0
  820. package/dist/plugin-sdk/discord/monitor/system-events.d.ts +2 -0
  821. package/dist/plugin-sdk/discord/monitor/threading.d.ts +101 -0
  822. package/dist/plugin-sdk/discord/monitor/typing.d.ts +5 -0
  823. package/dist/plugin-sdk/discord/monitor.d.ts +10 -0
  824. package/dist/plugin-sdk/discord/monitor.gateway.d.ts +12 -0
  825. package/dist/plugin-sdk/discord/pluralkit.d.ts +26 -0
  826. package/dist/plugin-sdk/discord/probe.d.ts +29 -0
  827. package/dist/plugin-sdk/discord/resolve-channels.d.ts +15 -0
  828. package/dist/plugin-sdk/discord/resolve-users.d.ts +14 -0
  829. package/dist/plugin-sdk/discord/send.channels.d.ts +17 -0
  830. package/dist/plugin-sdk/discord/send.d.ts +8 -0
  831. package/dist/plugin-sdk/discord/send.emojis-stickers.d.ts +4 -0
  832. package/dist/plugin-sdk/discord/send.guild.d.ts +24 -0
  833. package/dist/plugin-sdk/discord/send.messages.d.ts +18 -0
  834. package/dist/plugin-sdk/discord/send.outbound.d.ts +22 -0
  835. package/dist/plugin-sdk/discord/send.permissions.d.ts +4 -0
  836. package/dist/plugin-sdk/discord/send.reactions.d.ts +15 -0
  837. package/dist/plugin-sdk/discord/send.shared.d.ts +69 -0
  838. package/dist/plugin-sdk/discord/send.types.d.ts +130 -0
  839. package/dist/plugin-sdk/discord/targets.d.ts +18 -0
  840. package/dist/plugin-sdk/discord/token.d.ts +11 -0
  841. package/dist/plugin-sdk/gateway/call.d.ts +51 -0
  842. package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
  843. package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +3 -0
  844. package/dist/plugin-sdk/gateway/client.d.ts +61 -0
  845. package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
  846. package/dist/plugin-sdk/gateway/device-auth.d.ts +12 -0
  847. package/dist/plugin-sdk/gateway/net.d.ts +40 -0
  848. package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
  849. package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
  850. package/dist/plugin-sdk/gateway/protocol/index.d.ts +654 -0
  851. package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +72 -0
  852. package/dist/plugin-sdk/gateway/protocol/schema/agents-models-skills.d.ts +152 -0
  853. package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +105 -0
  854. package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +51 -0
  855. package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +353 -0
  856. package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +38 -0
  857. package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
  858. package/dist/plugin-sdk/gateway/protocol/schema/exec-approvals.d.ts +162 -0
  859. package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +163 -0
  860. package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
  861. package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
  862. package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
  863. package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
  864. package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +74 -0
  865. package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +63 -0
  866. package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +122 -0
  867. package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
  868. package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
  869. package/dist/plugin-sdk/gateway/server/ws-types.d.ts +9 -0
  870. package/dist/plugin-sdk/gateway/server-channels.d.ts +24 -0
  871. package/dist/plugin-sdk/gateway/server-methods/types.d.ts +96 -0
  872. package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
  873. package/dist/plugin-sdk/gateway/session-utils.d.ts +53 -0
  874. package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +11 -0
  875. package/dist/plugin-sdk/gateway/session-utils.types.d.ts +83 -0
  876. package/dist/plugin-sdk/globals.d.ts +11 -0
  877. package/dist/plugin-sdk/hooks/internal-hooks.d.ts +95 -0
  878. package/dist/plugin-sdk/hooks/types.d.ts +62 -0
  879. package/dist/plugin-sdk/imessage/accounts.d.ts +16 -0
  880. package/dist/plugin-sdk/imessage/client.d.ts +46 -0
  881. package/dist/plugin-sdk/imessage/constants.d.ts +2 -0
  882. package/dist/plugin-sdk/imessage/monitor/deliver.d.ts +17 -0
  883. package/dist/plugin-sdk/imessage/monitor/monitor-provider.d.ts +2 -0
  884. package/dist/plugin-sdk/imessage/monitor/runtime.d.ts +4 -0
  885. package/dist/plugin-sdk/imessage/monitor/types.d.ts +37 -0
  886. package/dist/plugin-sdk/imessage/monitor.d.ts +2 -0
  887. package/dist/plugin-sdk/imessage/probe.d.ts +18 -0
  888. package/dist/plugin-sdk/imessage/send.d.ts +18 -0
  889. package/dist/plugin-sdk/imessage/targets.d.ts +39 -0
  890. package/dist/plugin-sdk/index.d.ts +1 -0
  891. package/dist/plugin-sdk/index.js +24446 -0
  892. package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
  893. package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
  894. package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
  895. package/dist/plugin-sdk/infra/channel-summary.d.ts +7 -0
  896. package/dist/plugin-sdk/infra/dedupe.d.ts +11 -0
  897. package/dist/plugin-sdk/infra/device-auth-store.d.ts +23 -0
  898. package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
  899. package/dist/plugin-sdk/infra/diagnostic-events.d.ts +121 -0
  900. package/dist/plugin-sdk/infra/diagnostic-flags.d.ts +4 -0
  901. package/dist/plugin-sdk/infra/env.d.ts +11 -0
  902. package/dist/plugin-sdk/infra/errors.d.ts +3 -0
  903. package/dist/plugin-sdk/infra/exec-approvals.d.ts +155 -0
  904. package/dist/plugin-sdk/infra/exec-safety.d.ts +1 -0
  905. package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
  906. package/dist/plugin-sdk/infra/format-duration.d.ts +10 -0
  907. package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
  908. package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
  909. package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +44 -0
  910. package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
  911. package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +20 -0
  912. package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
  913. package/dist/plugin-sdk/infra/machine-name.d.ts +1 -0
  914. package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +20 -0
  915. package/dist/plugin-sdk/infra/net/ssrf.d.ts +31 -0
  916. package/dist/plugin-sdk/infra/node-pairing.d.ts +62 -0
  917. package/dist/plugin-sdk/infra/node-shell.d.ts +1 -0
  918. package/dist/plugin-sdk/infra/openclaw-root.d.ts +10 -0
  919. package/dist/plugin-sdk/infra/outbound/channel-adapters.d.ts +6 -0
  920. package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
  921. package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
  922. package/dist/plugin-sdk/infra/outbound/deliver.d.ts +69 -0
  923. package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +21 -0
  924. package/dist/plugin-sdk/infra/outbound/message-action-runner.d.ts +74 -0
  925. package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
  926. package/dist/plugin-sdk/infra/outbound/message.d.ts +76 -0
  927. package/dist/plugin-sdk/infra/outbound/outbound-policy.d.ts +31 -0
  928. package/dist/plugin-sdk/infra/outbound/outbound-send-service.d.ts +58 -0
  929. package/dist/plugin-sdk/infra/outbound/outbound-session.d.ts +31 -0
  930. package/dist/plugin-sdk/infra/outbound/payloads.d.ts +16 -0
  931. package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
  932. package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
  933. package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
  934. package/dist/plugin-sdk/infra/outbound/targets.d.ts +65 -0
  935. package/dist/plugin-sdk/infra/ports-format.d.ts +5 -0
  936. package/dist/plugin-sdk/infra/ports-inspect.d.ts +2 -0
  937. package/dist/plugin-sdk/infra/ports-lsof.d.ts +2 -0
  938. package/dist/plugin-sdk/infra/ports-types.d.ts +17 -0
  939. package/dist/plugin-sdk/infra/ports.d.ts +14 -0
  940. package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +11 -0
  941. package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
  942. package/dist/plugin-sdk/infra/provider-usage.fetch.antigravity.d.ts +2 -0
  943. package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
  944. package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
  945. package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
  946. package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +7 -0
  947. package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
  948. package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
  949. package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +1 -0
  950. package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
  951. package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
  952. package/dist/plugin-sdk/infra/provider-usage.load.d.ts +12 -0
  953. package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
  954. package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
  955. package/dist/plugin-sdk/infra/restart-sentinel.d.ts +50 -0
  956. package/dist/plugin-sdk/infra/restart.d.ts +28 -0
  957. package/dist/plugin-sdk/infra/retry-policy.d.ts +25 -0
  958. package/dist/plugin-sdk/infra/retry.d.ts +21 -0
  959. package/dist/plugin-sdk/infra/session-cost-usage.d.ts +160 -0
  960. package/dist/plugin-sdk/infra/shell-env.d.ts +33 -0
  961. package/dist/plugin-sdk/infra/skills-remote.d.ts +24 -0
  962. package/dist/plugin-sdk/infra/system-events.d.ts +16 -0
  963. package/dist/plugin-sdk/infra/tailnet.d.ts +7 -0
  964. package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
  965. package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
  966. package/dist/plugin-sdk/infra/transport-ready.d.ts +16 -0
  967. package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
  968. package/dist/plugin-sdk/infra/warnings.d.ts +1 -0
  969. package/dist/plugin-sdk/infra/ws.d.ts +2 -0
  970. package/dist/plugin-sdk/infra/wsl.d.ts +2 -0
  971. package/dist/plugin-sdk/line/accounts.d.ts +10 -0
  972. package/dist/plugin-sdk/line/auto-reply-delivery.d.ts +49 -0
  973. package/dist/plugin-sdk/line/bot-access.d.ts +15 -0
  974. package/dist/plugin-sdk/line/bot-handlers.d.ts +13 -0
  975. package/dist/plugin-sdk/line/bot-message-context.d.ts +102 -0
  976. package/dist/plugin-sdk/line/bot.d.ts +24 -0
  977. package/dist/plugin-sdk/line/config-schema.d.ts +64 -0
  978. package/dist/plugin-sdk/line/download.d.ts +7 -0
  979. package/dist/plugin-sdk/line/flex-templates.d.ts +195 -0
  980. package/dist/plugin-sdk/line/markdown-to-line.d.ts +72 -0
  981. package/dist/plugin-sdk/line/monitor.d.ts +28 -0
  982. package/dist/plugin-sdk/line/probe.d.ts +2 -0
  983. package/dist/plugin-sdk/line/reply-chunks.d.ts +24 -0
  984. package/dist/plugin-sdk/line/send.d.ts +118 -0
  985. package/dist/plugin-sdk/line/signature.d.ts +1 -0
  986. package/dist/plugin-sdk/line/template-messages.d.ts +119 -0
  987. package/dist/plugin-sdk/line/types.d.ts +125 -0
  988. package/dist/plugin-sdk/line/webhook.d.ts +19 -0
  989. package/dist/plugin-sdk/link-understanding/apply.d.ts +10 -0
  990. package/dist/plugin-sdk/link-understanding/defaults.d.ts +2 -0
  991. package/dist/plugin-sdk/link-understanding/detect.d.ts +3 -0
  992. package/dist/plugin-sdk/link-understanding/format.d.ts +4 -0
  993. package/dist/plugin-sdk/link-understanding/runner.d.ts +11 -0
  994. package/dist/plugin-sdk/logger.d.ts +6 -0
  995. package/dist/plugin-sdk/logging/config.d.ts +4 -0
  996. package/dist/plugin-sdk/logging/console.d.ts +19 -0
  997. package/dist/plugin-sdk/logging/diagnostic.d.ts +58 -0
  998. package/dist/plugin-sdk/logging/levels.d.ts +4 -0
  999. package/dist/plugin-sdk/logging/logger.d.ts +42 -0
  1000. package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
  1001. package/dist/plugin-sdk/logging/redact.d.ts +9 -0
  1002. package/dist/plugin-sdk/logging/state.d.ts +17 -0
  1003. package/dist/plugin-sdk/logging/subsystem.d.ts +16 -0
  1004. package/dist/plugin-sdk/logging.d.ts +10 -0
  1005. package/dist/plugin-sdk/markdown/code-spans.d.ts +10 -0
  1006. package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
  1007. package/dist/plugin-sdk/markdown/frontmatter.d.ts +2 -0
  1008. package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
  1009. package/dist/plugin-sdk/markdown/render.d.ts +18 -0
  1010. package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
  1011. package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
  1012. package/dist/plugin-sdk/media/audio.d.ts +4 -0
  1013. package/dist/plugin-sdk/media/constants.d.ts +7 -0
  1014. package/dist/plugin-sdk/media/fetch.d.ts +23 -0
  1015. package/dist/plugin-sdk/media/image-ops.d.ts +39 -0
  1016. package/dist/plugin-sdk/media/input-files.d.ts +76 -0
  1017. package/dist/plugin-sdk/media/mime.d.ts +15 -0
  1018. package/dist/plugin-sdk/media/parse.d.ts +8 -0
  1019. package/dist/plugin-sdk/media/store.d.ts +18 -0
  1020. package/dist/plugin-sdk/media-understanding/apply.d.ts +19 -0
  1021. package/dist/plugin-sdk/media-understanding/attachments.d.ts +43 -0
  1022. package/dist/plugin-sdk/media-understanding/concurrency.d.ts +1 -0
  1023. package/dist/plugin-sdk/media-understanding/defaults.d.ts +10 -0
  1024. package/dist/plugin-sdk/media-understanding/errors.d.ts +6 -0
  1025. package/dist/plugin-sdk/media-understanding/format.d.ts +7 -0
  1026. package/dist/plugin-sdk/media-understanding/providers/anthropic/index.d.ts +2 -0
  1027. package/dist/plugin-sdk/media-understanding/providers/deepgram/audio.d.ts +4 -0
  1028. package/dist/plugin-sdk/media-understanding/providers/deepgram/index.d.ts +2 -0
  1029. package/dist/plugin-sdk/media-understanding/providers/google/audio.d.ts +3 -0
  1030. package/dist/plugin-sdk/media-understanding/providers/google/index.d.ts +2 -0
  1031. package/dist/plugin-sdk/media-understanding/providers/google/video.d.ts +3 -0
  1032. package/dist/plugin-sdk/media-understanding/providers/groq/index.d.ts +2 -0
  1033. package/dist/plugin-sdk/media-understanding/providers/image.d.ts +2 -0
  1034. package/dist/plugin-sdk/media-understanding/providers/index.d.ts +4 -0
  1035. package/dist/plugin-sdk/media-understanding/providers/minimax/index.d.ts +2 -0
  1036. package/dist/plugin-sdk/media-understanding/providers/openai/audio.d.ts +3 -0
  1037. package/dist/plugin-sdk/media-understanding/providers/openai/index.d.ts +2 -0
  1038. package/dist/plugin-sdk/media-understanding/providers/shared.d.ts +10 -0
  1039. package/dist/plugin-sdk/media-understanding/resolve.d.ts +44 -0
  1040. package/dist/plugin-sdk/media-understanding/runner.d.ts +34 -0
  1041. package/dist/plugin-sdk/media-understanding/scope.d.ts +9 -0
  1042. package/dist/plugin-sdk/media-understanding/types.d.ts +92 -0
  1043. package/dist/plugin-sdk/media-understanding/video.d.ts +2 -0
  1044. package/dist/plugin-sdk/memory/backend-config.d.ts +48 -0
  1045. package/dist/plugin-sdk/memory/batch-gemini.d.ts +55 -0
  1046. package/dist/plugin-sdk/memory/batch-openai.d.ts +45 -0
  1047. package/dist/plugin-sdk/memory/batch-voyage.d.ts +46 -0
  1048. package/dist/plugin-sdk/memory/embeddings-gemini.d.ts +13 -0
  1049. package/dist/plugin-sdk/memory/embeddings-openai.d.ts +13 -0
  1050. package/dist/plugin-sdk/memory/embeddings-voyage.d.ts +13 -0
  1051. package/dist/plugin-sdk/memory/embeddings.d.ts +39 -0
  1052. package/dist/plugin-sdk/memory/hybrid.d.ts +34 -0
  1053. package/dist/plugin-sdk/memory/index.d.ts +3 -0
  1054. package/dist/plugin-sdk/memory/internal.d.ts +27 -0
  1055. package/dist/plugin-sdk/memory/manager-search.d.ts +60 -0
  1056. package/dist/plugin-sdk/memory/manager.d.ts +136 -0
  1057. package/dist/plugin-sdk/memory/memory-schema.d.ts +10 -0
  1058. package/dist/plugin-sdk/memory/node-llama.d.ts +8 -0
  1059. package/dist/plugin-sdk/memory/qmd-manager.d.ts +85 -0
  1060. package/dist/plugin-sdk/memory/search-manager.d.ts +10 -0
  1061. package/dist/plugin-sdk/memory/session-files.d.ts +12 -0
  1062. package/dist/plugin-sdk/memory/sqlite-vec.d.ts +9 -0
  1063. package/dist/plugin-sdk/memory/sqlite.d.ts +1 -0
  1064. package/dist/plugin-sdk/memory/types.d.ts +94 -0
  1065. package/dist/plugin-sdk/pairing/pairing-labels.d.ts +2 -0
  1066. package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
  1067. package/dist/plugin-sdk/pairing/pairing-store.d.ts +46 -0
  1068. package/dist/plugin-sdk/pi-model-discovery-Dw3A6oXH.js +37 -0
  1069. package/dist/plugin-sdk/plugin-sdk/index.d.ts +100 -0
  1070. package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
  1071. package/dist/plugin-sdk/plugins/commands.d.ts +78 -0
  1072. package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
  1073. package/dist/plugin-sdk/plugins/config-state.d.ts +33 -0
  1074. package/dist/plugin-sdk/plugins/discovery.d.ts +22 -0
  1075. package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +31 -0
  1076. package/dist/plugin-sdk/plugins/hooks.d.ts +41 -0
  1077. package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
  1078. package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
  1079. package/dist/plugin-sdk/plugins/loader.d.ts +14 -0
  1080. package/dist/plugin-sdk/plugins/manifest-registry.d.ts +33 -0
  1081. package/dist/plugin-sdk/plugins/manifest.d.ts +64 -0
  1082. package/dist/plugin-sdk/plugins/registry.d.ts +130 -0
  1083. package/dist/plugin-sdk/plugins/runtime/index.d.ts +3 -0
  1084. package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
  1085. package/dist/plugin-sdk/plugins/runtime/types.d.ts +314 -0
  1086. package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
  1087. package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
  1088. package/dist/plugin-sdk/plugins/slots.d.ts +24 -0
  1089. package/dist/plugin-sdk/plugins/tools.d.ts +13 -0
  1090. package/dist/plugin-sdk/plugins/types.d.ts +381 -0
  1091. package/dist/plugin-sdk/polls.d.ts +21 -0
  1092. package/dist/plugin-sdk/process/command-queue.d.ts +12 -0
  1093. package/dist/plugin-sdk/process/exec.d.ts +22 -0
  1094. package/dist/plugin-sdk/process/lanes.d.ts +6 -0
  1095. package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
  1096. package/dist/plugin-sdk/providers/github-copilot-token.d.ts +19 -0
  1097. package/dist/plugin-sdk/providers/qwen-portal-oauth.d.ts +2 -0
  1098. package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
  1099. package/dist/plugin-sdk/routing/resolve-route.d.ts +38 -0
  1100. package/dist/plugin-sdk/routing/session-key.d.ts +47 -0
  1101. package/dist/plugin-sdk/runtime.d.ts +6 -0
  1102. package/dist/plugin-sdk/security/channel-metadata.d.ts +6 -0
  1103. package/dist/plugin-sdk/security/external-content.d.ts +67 -0
  1104. package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
  1105. package/dist/plugin-sdk/sessions/model-overrides.d.ts +14 -0
  1106. package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
  1107. package/dist/plugin-sdk/sessions/session-key-utils.d.ts +8 -0
  1108. package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
  1109. package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
  1110. package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
  1111. package/dist/plugin-sdk/signal/accounts.d.ts +17 -0
  1112. package/dist/plugin-sdk/signal/client.d.ts +32 -0
  1113. package/dist/plugin-sdk/signal/daemon.d.ts +18 -0
  1114. package/dist/plugin-sdk/signal/format.d.ts +17 -0
  1115. package/dist/plugin-sdk/signal/identity.d.ts +23 -0
  1116. package/dist/plugin-sdk/signal/index.d.ts +5 -0
  1117. package/dist/plugin-sdk/signal/monitor/event-handler.d.ts +5 -0
  1118. package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +117 -0
  1119. package/dist/plugin-sdk/signal/monitor.d.ts +23 -0
  1120. package/dist/plugin-sdk/signal/probe.d.ts +8 -0
  1121. package/dist/plugin-sdk/signal/reaction-level.d.ts +24 -0
  1122. package/dist/plugin-sdk/signal/send-reactions.d.ts +32 -0
  1123. package/dist/plugin-sdk/signal/send.d.ts +24 -0
  1124. package/dist/plugin-sdk/signal/sse-reconnect.d.ts +13 -0
  1125. package/dist/plugin-sdk/slack/accounts.d.ts +32 -0
  1126. package/dist/plugin-sdk/slack/actions.d.ts +53 -0
  1127. package/dist/plugin-sdk/slack/channel-migration.d.ts +20 -0
  1128. package/dist/plugin-sdk/slack/client.d.ts +4 -0
  1129. package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
  1130. package/dist/plugin-sdk/slack/format.d.ts +7 -0
  1131. package/dist/plugin-sdk/slack/http/index.d.ts +1 -0
  1132. package/dist/plugin-sdk/slack/http/registry.d.ts +12 -0
  1133. package/dist/plugin-sdk/slack/index.d.ts +6 -0
  1134. package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +20 -0
  1135. package/dist/plugin-sdk/slack/monitor/auth.d.ts +10 -0
  1136. package/dist/plugin-sdk/slack/monitor/channel-config.d.ts +40 -0
  1137. package/dist/plugin-sdk/slack/monitor/commands.d.ts +4 -0
  1138. package/dist/plugin-sdk/slack/monitor/context.d.ts +109 -0
  1139. package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +4 -0
  1140. package/dist/plugin-sdk/slack/monitor/events/members.d.ts +4 -0
  1141. package/dist/plugin-sdk/slack/monitor/events/messages.d.ts +6 -0
  1142. package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +4 -0
  1143. package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +4 -0
  1144. package/dist/plugin-sdk/slack/monitor/events.d.ts +8 -0
  1145. package/dist/plugin-sdk/slack/monitor/media.d.ts +29 -0
  1146. package/dist/plugin-sdk/slack/monitor/message-handler/dispatch.d.ts +2 -0
  1147. package/dist/plugin-sdk/slack/monitor/message-handler/prepare.d.ts +13 -0
  1148. package/dist/plugin-sdk/slack/monitor/message-handler/types.d.ts +22 -0
  1149. package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +11 -0
  1150. package/dist/plugin-sdk/slack/monitor/policy.d.ts +5 -0
  1151. package/dist/plugin-sdk/slack/monitor/provider.d.ts +2 -0
  1152. package/dist/plugin-sdk/slack/monitor/replies.d.ts +50 -0
  1153. package/dist/plugin-sdk/slack/monitor/slash.d.ts +6 -0
  1154. package/dist/plugin-sdk/slack/monitor/thread-resolution.d.ts +12 -0
  1155. package/dist/plugin-sdk/slack/monitor/types.d.ts +97 -0
  1156. package/dist/plugin-sdk/slack/monitor.d.ts +5 -0
  1157. package/dist/plugin-sdk/slack/probe.d.ts +15 -0
  1158. package/dist/plugin-sdk/slack/resolve-channels.d.ts +19 -0
  1159. package/dist/plugin-sdk/slack/resolve-users.d.ts +26 -0
  1160. package/dist/plugin-sdk/slack/send.d.ts +14 -0
  1161. package/dist/plugin-sdk/slack/targets.d.ts +7 -0
  1162. package/dist/plugin-sdk/slack/threading-tool-context.d.ts +10 -0
  1163. package/dist/plugin-sdk/slack/threading.d.ts +20 -0
  1164. package/dist/plugin-sdk/slack/token.d.ts +3 -0
  1165. package/dist/plugin-sdk/slack/types.d.ts +36 -0
  1166. package/dist/plugin-sdk/telegram/accounts.d.ts +17 -0
  1167. package/dist/plugin-sdk/telegram/allowed-updates.d.ts +4 -0
  1168. package/dist/plugin-sdk/telegram/api-logging.d.ts +11 -0
  1169. package/dist/plugin-sdk/telegram/audit.d.ts +29 -0
  1170. package/dist/plugin-sdk/telegram/bot/delivery.d.ts +34 -0
  1171. package/dist/plugin-sdk/telegram/bot/helpers.d.ts +93 -0
  1172. package/dist/plugin-sdk/telegram/bot/types.d.ts +28 -0
  1173. package/dist/plugin-sdk/telegram/bot-access.d.ts +24 -0
  1174. package/dist/plugin-sdk/telegram/bot-handlers.d.ts +2 -0
  1175. package/dist/plugin-sdk/telegram/bot-message-context.d.ts +130 -0
  1176. package/dist/plugin-sdk/telegram/bot-message-dispatch.d.ts +21 -0
  1177. package/dist/plugin-sdk/telegram/bot-message.d.ts +21 -0
  1178. package/dist/plugin-sdk/telegram/bot-native-commands.d.ts +59 -0
  1179. package/dist/plugin-sdk/telegram/bot-updates.d.ts +27 -0
  1180. package/dist/plugin-sdk/telegram/bot.d.ts +54 -0
  1181. package/dist/plugin-sdk/telegram/caption.d.ts +5 -0
  1182. package/dist/plugin-sdk/telegram/draft-chunking.d.ts +6 -0
  1183. package/dist/plugin-sdk/telegram/draft-stream.d.ts +17 -0
  1184. package/dist/plugin-sdk/telegram/fetch.d.ts +4 -0
  1185. package/dist/plugin-sdk/telegram/format.d.ts +16 -0
  1186. package/dist/plugin-sdk/telegram/group-migration.d.ts +20 -0
  1187. package/dist/plugin-sdk/telegram/inline-buttons.d.ts +11 -0
  1188. package/dist/plugin-sdk/telegram/model-buttons.d.ts +63 -0
  1189. package/dist/plugin-sdk/telegram/monitor.d.ts +18 -0
  1190. package/dist/plugin-sdk/telegram/network-config.d.ts +12 -0
  1191. package/dist/plugin-sdk/telegram/network-errors.d.ts +5 -0
  1192. package/dist/plugin-sdk/telegram/probe.d.ts +18 -0
  1193. package/dist/plugin-sdk/telegram/proxy.d.ts +1 -0
  1194. package/dist/plugin-sdk/telegram/reaction-level.d.ts +18 -0
  1195. package/dist/plugin-sdk/telegram/send.d.ts +96 -0
  1196. package/dist/plugin-sdk/telegram/sent-message-cache.d.ts +16 -0
  1197. package/dist/plugin-sdk/telegram/sticker-cache.d.ts +46 -0
  1198. package/dist/plugin-sdk/telegram/targets.d.ts +14 -0
  1199. package/dist/plugin-sdk/telegram/token.d.ts +13 -0
  1200. package/dist/plugin-sdk/telegram/update-offset-store.d.ts +9 -0
  1201. package/dist/plugin-sdk/telegram/voice.d.ts +20 -0
  1202. package/dist/plugin-sdk/telegram/webhook.d.ts +20 -0
  1203. package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
  1204. package/dist/plugin-sdk/terminal/links.d.ts +6 -0
  1205. package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
  1206. package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
  1207. package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
  1208. package/dist/plugin-sdk/terminal/restore.d.ts +1 -0
  1209. package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
  1210. package/dist/plugin-sdk/tts/tts.d.ts +198 -0
  1211. package/dist/plugin-sdk/tui/tui-formatters.d.ts +31 -0
  1212. package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
  1213. package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
  1214. package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
  1215. package/dist/plugin-sdk/utils/directive-tags.d.ts +16 -0
  1216. package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
  1217. package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
  1218. package/dist/plugin-sdk/utils/queue-helpers.d.ts +41 -0
  1219. package/dist/plugin-sdk/utils/shell-argv.d.ts +1 -0
  1220. package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
  1221. package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
  1222. package/dist/plugin-sdk/utils.d.ts +43 -0
  1223. package/dist/plugin-sdk/version.d.ts +4 -0
  1224. package/dist/plugin-sdk/web/accounts.d.ts +39 -0
  1225. package/dist/plugin-sdk/web/active-listener.d.ts +24 -0
  1226. package/dist/plugin-sdk/web/auth-store.d.ts +25 -0
  1227. package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
  1228. package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +18 -0
  1229. package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
  1230. package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
  1231. package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
  1232. package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
  1233. package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
  1234. package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
  1235. package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
  1236. package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
  1237. package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +29 -0
  1238. package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
  1239. package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
  1240. package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
  1241. package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
  1242. package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
  1243. package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
  1244. package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
  1245. package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
  1246. package/dist/plugin-sdk/web/auto-reply/types.d.ts +28 -0
  1247. package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
  1248. package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
  1249. package/dist/plugin-sdk/web/auto-reply.impl.d.ts +6 -0
  1250. package/dist/plugin-sdk/web/inbound/access-control.d.ts +24 -0
  1251. package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
  1252. package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
  1253. package/dist/plugin-sdk/web/inbound/media.d.ts +6 -0
  1254. package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
  1255. package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
  1256. package/dist/plugin-sdk/web/inbound/types.d.ts +40 -0
  1257. package/dist/plugin-sdk/web/inbound.d.ts +4 -0
  1258. package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
  1259. package/dist/plugin-sdk/web/login.d.ts +3 -0
  1260. package/dist/plugin-sdk/web/media.d.ts +25 -0
  1261. package/dist/plugin-sdk/web/outbound.d.ts +23 -0
  1262. package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
  1263. package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
  1264. package/dist/plugin-sdk/web/session.d.ts +14 -0
  1265. package/dist/plugin-sdk/web/vcard.d.ts +6 -0
  1266. package/dist/plugin-sdk/whatsapp/normalize.d.ts +6 -0
  1267. package/dist/plugin-sdk/wizard/prompts.d.ts +42 -0
  1268. package/dist/plugin-sdk/wizard/session.d.ts +42 -0
  1269. package/dist/plugins-DWuabtET.js +495 -0
  1270. package/dist/plugins-DrjfSaQw.js +496 -0
  1271. package/dist/plugins-cli-BEi_3gUD.js +444 -0
  1272. package/dist/plugins-cli-DOE3sFNh.js +441 -0
  1273. package/dist/ports-LFe1-ds4.js +96 -0
  1274. package/dist/program-Mm9gwxgw.js +191 -0
  1275. package/dist/progress-Bcjniu7m.js +133 -0
  1276. package/dist/progress-xpLtQsNY.js +133 -0
  1277. package/dist/prompt-style-CFsleyxV.js +9 -0
  1278. package/dist/prompt-style-vzh0MGHs.js +9 -0
  1279. package/dist/prompts-CudpZgTI.js +10 -0
  1280. package/dist/prompts-FbZThK8w.js +10 -0
  1281. package/dist/pw-ai-B7Fvw8DW.js +1649 -0
  1282. package/dist/pw-ai-BpFK57Lc.js +1651 -0
  1283. package/dist/pw-ai-tNPuRNn3.js +1649 -0
  1284. package/dist/qmd-manager-CazydCuO.js +676 -0
  1285. package/dist/qmd-manager-D13fgvkg.js +677 -0
  1286. package/dist/qmd-manager-QixCK9Sh.js +674 -0
  1287. package/dist/redact-BIMJ3ntQ.js +94 -0
  1288. package/dist/redact-Bt-krp_b.js +97 -0
  1289. package/dist/redact-DJCFY628.js +97 -0
  1290. package/dist/register.subclis-DpdKOrqR.js +348 -0
  1291. package/dist/reply-Nagr9G73.js +64757 -0
  1292. package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
  1293. package/dist/routes-B5LAoQFO.js +2411 -0
  1294. package/dist/routes-B9mYGJET.js +2411 -0
  1295. package/dist/rpc-70nwvcmj.js +95 -0
  1296. package/dist/rpc-zvkrerfj.js +95 -0
  1297. package/dist/run-main-Y7DVYcUu.js +194 -0
  1298. package/dist/sandbox-BwaFbMul.js +2943 -0
  1299. package/dist/sandbox-CFJ-0soL.js +2942 -0
  1300. package/dist/sandbox-cli-35JWqRj-.js +460 -0
  1301. package/dist/sandbox-cli-DcGwU3Oa.js +463 -0
  1302. package/dist/security-cli-D-EgVOaA.js +505 -0
  1303. package/dist/security-cli-VON7qTOf.js +508 -0
  1304. package/dist/server-context-C8xKLc0L.js +740 -0
  1305. package/dist/server-context-yKyxyxOJ.js +740 -0
  1306. package/dist/server-node-events-CK-3iTzR.js +219 -0
  1307. package/dist/server-node-events-D0VSL_HV.js +216 -0
  1308. package/dist/service-DMUKaGTV.js +680 -0
  1309. package/dist/service-W6pWyB7g.js +680 -0
  1310. package/dist/service-audit-BTHjbAs2.js +542 -0
  1311. package/dist/service-audit-GvE18NCt.js +542 -0
  1312. package/dist/session-cost-usage-C5MMXOZi.js +692 -0
  1313. package/dist/session-cost-usage-CTuGqn7n.js +692 -0
  1314. package/dist/session-key-Dk6vSAOv.js +183 -0
  1315. package/dist/session-key-ezJ78bLC.js +183 -0
  1316. package/dist/shared-BG2E-mTe.js +74 -0
  1317. package/dist/shared-Boip_I0l.js +152 -0
  1318. package/dist/shared-C-yRLI1r.js +74 -0
  1319. package/dist/shared-CF5YSjfr.js +152 -0
  1320. package/dist/skill-scanner-BoGjHXUZ.js +255 -0
  1321. package/dist/skill-scanner-COatt01v.js +255 -0
  1322. package/dist/skills-B7bCWSck.js +693 -0
  1323. package/dist/skills-D5JDj3TR.js +694 -0
  1324. package/dist/skills-cli-D8i8lW-Y.js +290 -0
  1325. package/dist/skills-cli-OwKnGglX.js +287 -0
  1326. package/dist/skills-status-D83jBWaq.js +187 -0
  1327. package/dist/skills-status-DPwsDMVS.js +187 -0
  1328. package/dist/sqlite-BW8p11HW.js +239 -0
  1329. package/dist/sqlite-BjhYBODp.js +221 -0
  1330. package/dist/sqlite-D1XZ7Oej.js +239 -0
  1331. package/dist/status-BF8IVV7c.js +21 -0
  1332. package/dist/status-CWDof7Cn.js +21 -0
  1333. package/dist/status-CgdwqWHT.js +3177 -0
  1334. package/dist/status-DqF0Asv5.js +27 -0
  1335. package/dist/status-Dqs6r0p6.js +27 -0
  1336. package/dist/subsystem-CAq3uyo7.js +834 -0
  1337. package/dist/system-cli-Bv347a4x.js +83 -0
  1338. package/dist/system-cli-CV1yMDPJ.js +80 -0
  1339. package/dist/systemd-D5s01yMo.js +438 -0
  1340. package/dist/systemd-LmtH96vm.js +438 -0
  1341. package/dist/systemd-hints-3-E4ndGf.js +19 -0
  1342. package/dist/systemd-hints-D3nZ6-tA.js +19 -0
  1343. package/dist/systemd-linger-D4Z0ePWs.js +75 -0
  1344. package/dist/systemd-linger-DFHJcGck.js +75 -0
  1345. package/dist/table-BGYjbJbA.js +279 -0
  1346. package/dist/table-CM9lV0GA.js +279 -0
  1347. package/dist/tailnet-Byp3obcc.js +42 -0
  1348. package/dist/tailnet-DLDGNuH2.js +42 -0
  1349. package/dist/tailscale-9MusRvOi.js +225 -0
  1350. package/dist/tailscale-BVGD9gSD.js +252 -0
  1351. package/dist/tool-display-BxZG0o1b.js +795 -0
  1352. package/dist/tool-display-PgbqPY5M.js +795 -0
  1353. package/dist/transcript-events-Bv_eRVym.js +17 -0
  1354. package/dist/transcript-events-ChU6IQwp.js +17 -0
  1355. package/dist/transcript-events-JLH5W4He.js +17 -0
  1356. package/dist/tui-CSu3OIP_.js +2671 -0
  1357. package/dist/tui-DhzN4YmH.js +2672 -0
  1358. package/dist/tui-cli-Do9zFynn.js +55 -0
  1359. package/dist/tui-cli-awwGCxKR.js +58 -0
  1360. package/dist/update-DBMfgR7g.js +317 -0
  1361. package/dist/update-Nc1UGXeU.js +317 -0
  1362. package/dist/update-cli-DKJswr-w.js +1035 -0
  1363. package/dist/update-cli-LmAKEOiJ.js +1033 -0
  1364. package/dist/update-runner-DQwdSxkJ.js +1458 -0
  1365. package/dist/update-runner-kfvB4_XO.js +1458 -0
  1366. package/dist/usage-format-BcU1flOY.js +36 -0
  1367. package/dist/usage-format-DvowRSs-.js +36 -0
  1368. package/dist/utils-CKSrBNwq.js +192 -0
  1369. package/dist/utils-DX85MiPR.js +188 -0
  1370. package/dist/webhooks-cli--t1jf_uP.js +309 -0
  1371. package/dist/webhooks-cli-DAMZGMPC.js +312 -0
  1372. package/dist/widearea-dns-Bf5ongWC.js +127 -0
  1373. package/dist/widearea-dns-DDNQMGyz.js +127 -0
  1374. package/dist/ws-CEcdsnN9.js +13 -0
  1375. package/dist/ws-D091yo4M.js +13 -0
  1376. package/dist/ws-log-B0dVho23.js +267 -0
  1377. package/dist/ws-log-CBrAJIdp.js +267 -0
  1378. package/dist/wsl-D4fz-38s.js +160 -0
  1379. package/docs/.i18n/README.md +31 -0
  1380. package/docs/.i18n/glossary.zh-CN.json +210 -0
  1381. package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
  1382. package/docs/CNAME +1 -0
  1383. package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
  1384. package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
  1385. package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
  1386. package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
  1387. package/docs/assets/macos-onboarding/05-permissions.png +0 -0
  1388. package/docs/assets/openclaw-logo-text-dark.png +0 -0
  1389. package/docs/assets/openclaw-logo-text.png +0 -0
  1390. package/docs/assets/pixel-lobster.svg +60 -0
  1391. package/docs/assets/showcase/agents-ui.jpg +0 -0
  1392. package/docs/assets/showcase/bambu-cli.png +0 -0
  1393. package/docs/assets/showcase/codexmonitor.png +0 -0
  1394. package/docs/assets/showcase/gohome-grafana.png +0 -0
  1395. package/docs/assets/showcase/ios-testflight.jpg +0 -0
  1396. package/docs/assets/showcase/oura-health.png +0 -0
  1397. package/docs/assets/showcase/padel-cli.svg +11 -0
  1398. package/docs/assets/showcase/padel-screenshot.jpg +0 -0
  1399. package/docs/assets/showcase/papla-tts.jpg +0 -0
  1400. package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
  1401. package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
  1402. package/docs/assets/showcase/roborock-status.svg +13 -0
  1403. package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
  1404. package/docs/assets/showcase/snag.png +0 -0
  1405. package/docs/assets/showcase/tesco-shop.jpg +0 -0
  1406. package/docs/assets/showcase/wienerlinien.png +0 -0
  1407. package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
  1408. package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
  1409. package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
  1410. package/docs/automation/auth-monitoring.md +44 -0
  1411. package/docs/automation/cron-jobs.md +478 -0
  1412. package/docs/automation/cron-vs-heartbeat.md +282 -0
  1413. package/docs/automation/gmail-pubsub.md +256 -0
  1414. package/docs/automation/hooks.md +916 -0
  1415. package/docs/automation/poll.md +69 -0
  1416. package/docs/automation/troubleshooting.md +122 -0
  1417. package/docs/automation/webhook.md +163 -0
  1418. package/docs/brave-search.md +41 -0
  1419. package/docs/channels/bluebubbles.md +340 -0
  1420. package/docs/channels/broadcast-groups.md +442 -0
  1421. package/docs/channels/channel-routing.md +114 -0
  1422. package/docs/channels/discord.md +476 -0
  1423. package/docs/channels/feishu.md +579 -0
  1424. package/docs/channels/googlechat.md +252 -0
  1425. package/docs/channels/grammy.md +31 -0
  1426. package/docs/channels/group-messages.md +84 -0
  1427. package/docs/channels/groups.md +374 -0
  1428. package/docs/channels/imessage.md +321 -0
  1429. package/docs/channels/index.md +46 -0
  1430. package/docs/channels/line.md +186 -0
  1431. package/docs/channels/location.md +56 -0
  1432. package/docs/channels/matrix.md +259 -0
  1433. package/docs/channels/mattermost.md +138 -0
  1434. package/docs/channels/msteams.md +769 -0
  1435. package/docs/channels/nextcloud-talk.md +138 -0
  1436. package/docs/channels/nostr.md +233 -0
  1437. package/docs/channels/pairing.md +86 -0
  1438. package/docs/channels/signal.md +228 -0
  1439. package/docs/channels/slack.md +574 -0
  1440. package/docs/channels/telegram.md +770 -0
  1441. package/docs/channels/tlon.md +132 -0
  1442. package/docs/channels/troubleshooting.md +116 -0
  1443. package/docs/channels/twitch.md +379 -0
  1444. package/docs/channels/whatsapp.md +406 -0
  1445. package/docs/channels/zalo.md +189 -0
  1446. package/docs/channels/zalouser.md +140 -0
  1447. package/docs/cli/acp.md +170 -0
  1448. package/docs/cli/agent.md +24 -0
  1449. package/docs/cli/agents.md +75 -0
  1450. package/docs/cli/approvals.md +50 -0
  1451. package/docs/cli/browser.md +107 -0
  1452. package/docs/cli/channels.md +79 -0
  1453. package/docs/cli/config.md +50 -0
  1454. package/docs/cli/configure.md +33 -0
  1455. package/docs/cli/cron.md +44 -0
  1456. package/docs/cli/dashboard.md +16 -0
  1457. package/docs/cli/devices.md +70 -0
  1458. package/docs/cli/directory.md +63 -0
  1459. package/docs/cli/dns.md +23 -0
  1460. package/docs/cli/docs.md +15 -0
  1461. package/docs/cli/doctor.md +41 -0
  1462. package/docs/cli/gateway.md +202 -0
  1463. package/docs/cli/health.md +21 -0
  1464. package/docs/cli/hooks.md +304 -0
  1465. package/docs/cli/index.md +1031 -0
  1466. package/docs/cli/logs.md +24 -0
  1467. package/docs/cli/memory.md +45 -0
  1468. package/docs/cli/message.md +239 -0
  1469. package/docs/cli/models.md +79 -0
  1470. package/docs/cli/node.md +112 -0
  1471. package/docs/cli/nodes.md +73 -0
  1472. package/docs/cli/onboard.md +43 -0
  1473. package/docs/cli/pairing.md +21 -0
  1474. package/docs/cli/plugins.md +62 -0
  1475. package/docs/cli/reset.md +17 -0
  1476. package/docs/cli/sandbox.md +152 -0
  1477. package/docs/cli/security.md +26 -0
  1478. package/docs/cli/sessions.md +16 -0
  1479. package/docs/cli/setup.md +29 -0
  1480. package/docs/cli/skills.md +26 -0
  1481. package/docs/cli/status.md +26 -0
  1482. package/docs/cli/system.md +60 -0
  1483. package/docs/cli/tui.md +23 -0
  1484. package/docs/cli/uninstall.md +17 -0
  1485. package/docs/cli/update.md +98 -0
  1486. package/docs/cli/voicecall.md +34 -0
  1487. package/docs/cli/webhooks.md +25 -0
  1488. package/docs/concepts/agent-loop.md +146 -0
  1489. package/docs/concepts/agent-workspace.md +233 -0
  1490. package/docs/concepts/agent.md +123 -0
  1491. package/docs/concepts/architecture.md +131 -0
  1492. package/docs/concepts/compaction.md +61 -0
  1493. package/docs/concepts/context.md +161 -0
  1494. package/docs/concepts/features.md +53 -0
  1495. package/docs/concepts/markdown-formatting.md +130 -0
  1496. package/docs/concepts/memory.md +556 -0
  1497. package/docs/concepts/messages.md +154 -0
  1498. package/docs/concepts/model-failover.md +149 -0
  1499. package/docs/concepts/model-providers.md +316 -0
  1500. package/docs/concepts/models.md +208 -0
  1501. package/docs/concepts/multi-agent.md +376 -0
  1502. package/docs/concepts/oauth.md +145 -0
  1503. package/docs/concepts/presence.md +102 -0
  1504. package/docs/concepts/queue.md +89 -0
  1505. package/docs/concepts/retry.md +69 -0
  1506. package/docs/concepts/session-pruning.md +122 -0
  1507. package/docs/concepts/session-tool.md +193 -0
  1508. package/docs/concepts/session.md +204 -0
  1509. package/docs/concepts/sessions.md +10 -0
  1510. package/docs/concepts/streaming.md +135 -0
  1511. package/docs/concepts/system-prompt.md +115 -0
  1512. package/docs/concepts/timezone.md +91 -0
  1513. package/docs/concepts/typebox.md +289 -0
  1514. package/docs/concepts/typing-indicators.md +68 -0
  1515. package/docs/concepts/usage-tracking.md +35 -0
  1516. package/docs/date-time.md +128 -0
  1517. package/docs/debug/node-issue.md +85 -0
  1518. package/docs/diagnostics/flags.md +91 -0
  1519. package/docs/docs.json +1802 -0
  1520. package/docs/experiments/onboarding-config-protocol.md +40 -0
  1521. package/docs/experiments/plans/cron-add-hardening.md +63 -0
  1522. package/docs/experiments/plans/group-policy-hardening.md +40 -0
  1523. package/docs/experiments/plans/openresponses-gateway.md +123 -0
  1524. package/docs/experiments/proposals/model-config.md +36 -0
  1525. package/docs/experiments/research/memory.md +228 -0
  1526. package/docs/gateway/authentication.md +145 -0
  1527. package/docs/gateway/background-process.md +93 -0
  1528. package/docs/gateway/bonjour.md +170 -0
  1529. package/docs/gateway/bridge-protocol.md +89 -0
  1530. package/docs/gateway/cli-backends.md +225 -0
  1531. package/docs/gateway/configuration-examples.md +606 -0
  1532. package/docs/gateway/configuration.md +3416 -0
  1533. package/docs/gateway/discovery.md +116 -0
  1534. package/docs/gateway/doctor.md +282 -0
  1535. package/docs/gateway/gateway-lock.md +34 -0
  1536. package/docs/gateway/health.md +35 -0
  1537. package/docs/gateway/heartbeat.md +364 -0
  1538. package/docs/gateway/index.md +330 -0
  1539. package/docs/gateway/local-models.md +150 -0
  1540. package/docs/gateway/logging.md +113 -0
  1541. package/docs/gateway/multiple-gateways.md +112 -0
  1542. package/docs/gateway/network-model.md +17 -0
  1543. package/docs/gateway/openai-http-api.md +118 -0
  1544. package/docs/gateway/openresponses-http-api.md +317 -0
  1545. package/docs/gateway/pairing.md +99 -0
  1546. package/docs/gateway/protocol.md +221 -0
  1547. package/docs/gateway/remote-gateway-readme.md +157 -0
  1548. package/docs/gateway/remote.md +129 -0
  1549. package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +128 -0
  1550. package/docs/gateway/sandboxing.md +193 -0
  1551. package/docs/gateway/security/index.md +829 -0
  1552. package/docs/gateway/tailscale.md +127 -0
  1553. package/docs/gateway/tools-invoke-http-api.md +85 -0
  1554. package/docs/gateway/troubleshooting.md +318 -0
  1555. package/docs/help/debugging.md +162 -0
  1556. package/docs/help/environment.md +81 -0
  1557. package/docs/help/faq.md +2848 -0
  1558. package/docs/help/index.md +21 -0
  1559. package/docs/help/scripts.md +28 -0
  1560. package/docs/help/submitting-a-pr.md +398 -0
  1561. package/docs/help/submitting-an-issue.md +152 -0
  1562. package/docs/help/testing.md +368 -0
  1563. package/docs/help/troubleshooting.md +265 -0
  1564. package/docs/hooks/soul-evil.md +69 -0
  1565. package/docs/images/feishu-step2-create-app.png +0 -0
  1566. package/docs/images/feishu-step3-credentials.png +0 -0
  1567. package/docs/images/feishu-step4-permissions.png +0 -0
  1568. package/docs/images/feishu-step5-bot-capability.png +0 -0
  1569. package/docs/images/feishu-step6-event-subscription.png +0 -0
  1570. package/docs/images/groups-flow.svg +52 -0
  1571. package/docs/images/mobile-ui-screenshot.png +0 -0
  1572. package/docs/index.md +192 -0
  1573. package/docs/install/ansible.md +208 -0
  1574. package/docs/install/bun.md +59 -0
  1575. package/docs/install/development-channels.md +75 -0
  1576. package/docs/install/docker.md +567 -0
  1577. package/docs/install/exe-dev.md +126 -0
  1578. package/docs/install/fly.md +486 -0
  1579. package/docs/install/gcp.md +504 -0
  1580. package/docs/install/hetzner.md +330 -0
  1581. package/docs/install/index.md +203 -0
  1582. package/docs/install/installer.md +385 -0
  1583. package/docs/install/macos-vm.md +281 -0
  1584. package/docs/install/migrating.md +192 -0
  1585. package/docs/install/nix.md +96 -0
  1586. package/docs/install/node.md +138 -0
  1587. package/docs/install/northflank.mdx +53 -0
  1588. package/docs/install/railway.mdx +99 -0
  1589. package/docs/install/render.mdx +159 -0
  1590. package/docs/install/uninstall.md +128 -0
  1591. package/docs/install/updating.md +231 -0
  1592. package/docs/logging.md +350 -0
  1593. package/docs/network.md +54 -0
  1594. package/docs/nodes/audio.md +114 -0
  1595. package/docs/nodes/camera.md +156 -0
  1596. package/docs/nodes/images.md +72 -0
  1597. package/docs/nodes/index.md +342 -0
  1598. package/docs/nodes/location-command.md +113 -0
  1599. package/docs/nodes/media-understanding.md +379 -0
  1600. package/docs/nodes/talk.md +90 -0
  1601. package/docs/nodes/troubleshooting.md +112 -0
  1602. package/docs/nodes/voicewake.md +65 -0
  1603. package/docs/perplexity.md +80 -0
  1604. package/docs/pi-dev.md +70 -0
  1605. package/docs/pi.md +612 -0
  1606. package/docs/platforms/android.md +151 -0
  1607. package/docs/platforms/digitalocean.md +262 -0
  1608. package/docs/platforms/index.md +53 -0
  1609. package/docs/platforms/ios.md +107 -0
  1610. package/docs/platforms/linux.md +94 -0
  1611. package/docs/platforms/mac/bundled-gateway.md +73 -0
  1612. package/docs/platforms/mac/canvas.md +125 -0
  1613. package/docs/platforms/mac/child-process.md +69 -0
  1614. package/docs/platforms/mac/dev-setup.md +104 -0
  1615. package/docs/platforms/mac/health.md +34 -0
  1616. package/docs/platforms/mac/icon.md +31 -0
  1617. package/docs/platforms/mac/logging.md +57 -0
  1618. package/docs/platforms/mac/menu-bar.md +81 -0
  1619. package/docs/platforms/mac/peekaboo.md +65 -0
  1620. package/docs/platforms/mac/permissions.md +50 -0
  1621. package/docs/platforms/mac/release.md +85 -0
  1622. package/docs/platforms/mac/remote.md +83 -0
  1623. package/docs/platforms/mac/signing.md +47 -0
  1624. package/docs/platforms/mac/skills.md +33 -0
  1625. package/docs/platforms/mac/voice-overlay.md +60 -0
  1626. package/docs/platforms/mac/voicewake.md +67 -0
  1627. package/docs/platforms/mac/webchat.md +43 -0
  1628. package/docs/platforms/mac/xpc.md +61 -0
  1629. package/docs/platforms/macos.md +203 -0
  1630. package/docs/platforms/oracle.md +303 -0
  1631. package/docs/platforms/raspberry-pi.md +358 -0
  1632. package/docs/platforms/windows.md +159 -0
  1633. package/docs/plugins/agent-tools.md +99 -0
  1634. package/docs/plugins/manifest.md +71 -0
  1635. package/docs/plugins/voice-call.md +284 -0
  1636. package/docs/plugins/zalouser.md +81 -0
  1637. package/docs/prose.md +134 -0
  1638. package/docs/providers/anthropic.md +152 -0
  1639. package/docs/providers/bedrock.md +176 -0
  1640. package/docs/providers/claude-max-api-proxy.md +148 -0
  1641. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  1642. package/docs/providers/deepgram.md +93 -0
  1643. package/docs/providers/github-copilot.md +72 -0
  1644. package/docs/providers/glm.md +33 -0
  1645. package/docs/providers/index.md +64 -0
  1646. package/docs/providers/minimax.md +208 -0
  1647. package/docs/providers/models.md +52 -0
  1648. package/docs/providers/moonshot.md +142 -0
  1649. package/docs/providers/ollama.md +277 -0
  1650. package/docs/providers/openai.md +62 -0
  1651. package/docs/providers/opencode.md +36 -0
  1652. package/docs/providers/openrouter.md +37 -0
  1653. package/docs/providers/qianfan.md +38 -0
  1654. package/docs/providers/qwen.md +53 -0
  1655. package/docs/providers/synthetic.md +99 -0
  1656. package/docs/providers/venice.md +267 -0
  1657. package/docs/providers/vercel-ai-gateway.md +50 -0
  1658. package/docs/providers/xiaomi.md +64 -0
  1659. package/docs/providers/zai.md +36 -0
  1660. package/docs/refactor/clawnet.md +417 -0
  1661. package/docs/refactor/exec-host.md +316 -0
  1662. package/docs/refactor/outbound-session-mirroring.md +85 -0
  1663. package/docs/refactor/plugin-sdk.md +214 -0
  1664. package/docs/refactor/strict-config.md +93 -0
  1665. package/docs/reference/AGENTS.default.md +123 -0
  1666. package/docs/reference/RELEASING.md +120 -0
  1667. package/docs/reference/api-usage-costs.md +138 -0
  1668. package/docs/reference/credits.md +27 -0
  1669. package/docs/reference/device-models.md +47 -0
  1670. package/docs/reference/rpc.md +43 -0
  1671. package/docs/reference/session-management-compaction.md +285 -0
  1672. package/docs/reference/templates/AGENTS.dev.md +83 -0
  1673. package/docs/reference/templates/AGENTS.md +218 -0
  1674. package/docs/reference/templates/BOOT.md +10 -0
  1675. package/docs/reference/templates/BOOTSTRAP.md +61 -0
  1676. package/docs/reference/templates/HEARTBEAT.md +11 -0
  1677. package/docs/reference/templates/IDENTITY.dev.md +47 -0
  1678. package/docs/reference/templates/IDENTITY.md +29 -0
  1679. package/docs/reference/templates/SOUL.dev.md +76 -0
  1680. package/docs/reference/templates/SOUL.md +42 -0
  1681. package/docs/reference/templates/TOOLS.dev.md +24 -0
  1682. package/docs/reference/templates/TOOLS.md +46 -0
  1683. package/docs/reference/templates/USER.dev.md +18 -0
  1684. package/docs/reference/templates/USER.md +23 -0
  1685. package/docs/reference/test.md +50 -0
  1686. package/docs/reference/token-use.md +112 -0
  1687. package/docs/reference/transcript-hygiene.md +129 -0
  1688. package/docs/reference/wizard.md +269 -0
  1689. package/docs/security/formal-verification.md +164 -0
  1690. package/docs/start/bootstrapping.md +41 -0
  1691. package/docs/start/docs-directory.md +64 -0
  1692. package/docs/start/getting-started.md +120 -0
  1693. package/docs/start/hubs.md +197 -0
  1694. package/docs/start/lore.md +219 -0
  1695. package/docs/start/onboarding.md +80 -0
  1696. package/docs/start/openclaw.md +224 -0
  1697. package/docs/start/quickstart.md +22 -0
  1698. package/docs/start/setup.md +162 -0
  1699. package/docs/start/showcase.md +416 -0
  1700. package/docs/start/wizard-cli-automation.md +141 -0
  1701. package/docs/start/wizard-cli-reference.md +247 -0
  1702. package/docs/start/wizard.md +108 -0
  1703. package/docs/style.css +3 -0
  1704. package/docs/tools/agent-send.md +53 -0
  1705. package/docs/tools/apply-patch.md +50 -0
  1706. package/docs/tools/browser-linux-troubleshooting.md +139 -0
  1707. package/docs/tools/browser-login.md +67 -0
  1708. package/docs/tools/browser.md +576 -0
  1709. package/docs/tools/chrome-extension.md +178 -0
  1710. package/docs/tools/clawhub.md +257 -0
  1711. package/docs/tools/creating-skills.md +54 -0
  1712. package/docs/tools/elevated.md +57 -0
  1713. package/docs/tools/exec-approvals.md +246 -0
  1714. package/docs/tools/exec.md +179 -0
  1715. package/docs/tools/firecrawl.md +61 -0
  1716. package/docs/tools/index.md +512 -0
  1717. package/docs/tools/llm-task.md +115 -0
  1718. package/docs/tools/lobster.md +342 -0
  1719. package/docs/tools/multi-agent-sandbox-tools.md +396 -0
  1720. package/docs/tools/plugin.md +664 -0
  1721. package/docs/tools/reactions.md +22 -0
  1722. package/docs/tools/skills-config.md +76 -0
  1723. package/docs/tools/skills.md +300 -0
  1724. package/docs/tools/slash-commands.md +198 -0
  1725. package/docs/tools/subagents.md +151 -0
  1726. package/docs/tools/thinking.md +74 -0
  1727. package/docs/tools/web.md +261 -0
  1728. package/docs/tts.md +396 -0
  1729. package/docs/vps.md +43 -0
  1730. package/docs/web/control-ui.md +223 -0
  1731. package/docs/web/dashboard.md +46 -0
  1732. package/docs/web/index.md +116 -0
  1733. package/docs/web/tui.md +162 -0
  1734. package/docs/web/webchat.md +49 -0
  1735. package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
  1736. package/docs/whatsapp-openclaw.jpg +0 -0
  1737. package/docs/zh-CN/AGENTS.md +59 -0
  1738. package/docs/zh-CN/automation/auth-monitoring.md +47 -0
  1739. package/docs/zh-CN/automation/cron-jobs.md +424 -0
  1740. package/docs/zh-CN/automation/cron-vs-heartbeat.md +286 -0
  1741. package/docs/zh-CN/automation/gmail-pubsub.md +249 -0
  1742. package/docs/zh-CN/automation/hooks.md +919 -0
  1743. package/docs/zh-CN/automation/poll.md +76 -0
  1744. package/docs/zh-CN/automation/troubleshooting.md +8 -0
  1745. package/docs/zh-CN/automation/webhook.md +163 -0
  1746. package/docs/zh-CN/brave-search.md +48 -0
  1747. package/docs/zh-CN/channels/bluebubbles.md +271 -0
  1748. package/docs/zh-CN/channels/broadcast-groups.md +449 -0
  1749. package/docs/zh-CN/channels/channel-routing.md +117 -0
  1750. package/docs/zh-CN/channels/discord.md +468 -0
  1751. package/docs/zh-CN/channels/feishu.md +629 -0
  1752. package/docs/zh-CN/channels/googlechat.md +257 -0
  1753. package/docs/zh-CN/channels/grammy.md +38 -0
  1754. package/docs/zh-CN/channels/group-messages.md +91 -0
  1755. package/docs/zh-CN/channels/groups.md +379 -0
  1756. package/docs/zh-CN/channels/imessage.md +302 -0
  1757. package/docs/zh-CN/channels/index.md +53 -0
  1758. package/docs/zh-CN/channels/line.md +180 -0
  1759. package/docs/zh-CN/channels/location.md +63 -0
  1760. package/docs/zh-CN/channels/matrix.md +221 -0
  1761. package/docs/zh-CN/channels/mattermost.md +144 -0
  1762. package/docs/zh-CN/channels/msteams.md +775 -0
  1763. package/docs/zh-CN/channels/nextcloud-talk.md +142 -0
  1764. package/docs/zh-CN/channels/nostr.md +240 -0
  1765. package/docs/zh-CN/channels/pairing.md +89 -0
  1766. package/docs/zh-CN/channels/signal.md +209 -0
  1767. package/docs/zh-CN/channels/slack.md +531 -0
  1768. package/docs/zh-CN/channels/telegram.md +751 -0
  1769. package/docs/zh-CN/channels/tlon.md +136 -0
  1770. package/docs/zh-CN/channels/troubleshooting.md +36 -0
  1771. package/docs/zh-CN/channels/twitch.md +385 -0
  1772. package/docs/zh-CN/channels/whatsapp.md +411 -0
  1773. package/docs/zh-CN/channels/zalo.md +196 -0
  1774. package/docs/zh-CN/channels/zalouser.md +147 -0
  1775. package/docs/zh-CN/cli/acp.md +173 -0
  1776. package/docs/zh-CN/cli/agent.md +30 -0
  1777. package/docs/zh-CN/cli/agents.md +82 -0
  1778. package/docs/zh-CN/cli/approvals.md +57 -0
  1779. package/docs/zh-CN/cli/browser.md +114 -0
  1780. package/docs/zh-CN/cli/channels.md +86 -0
  1781. package/docs/zh-CN/cli/config.md +57 -0
  1782. package/docs/zh-CN/cli/configure.md +38 -0
  1783. package/docs/zh-CN/cli/cron.md +43 -0
  1784. package/docs/zh-CN/cli/dashboard.md +23 -0
  1785. package/docs/zh-CN/cli/devices.md +74 -0
  1786. package/docs/zh-CN/cli/directory.md +70 -0
  1787. package/docs/zh-CN/cli/dns.md +30 -0
  1788. package/docs/zh-CN/cli/docs.md +22 -0
  1789. package/docs/zh-CN/cli/doctor.md +48 -0
  1790. package/docs/zh-CN/cli/gateway.md +206 -0
  1791. package/docs/zh-CN/cli/health.md +28 -0
  1792. package/docs/zh-CN/cli/hooks.md +311 -0
  1793. package/docs/zh-CN/cli/index.md +1032 -0
  1794. package/docs/zh-CN/cli/logs.md +31 -0
  1795. package/docs/zh-CN/cli/memory.md +52 -0
  1796. package/docs/zh-CN/cli/message.md +246 -0
  1797. package/docs/zh-CN/cli/models.md +85 -0
  1798. package/docs/zh-CN/cli/node.md +115 -0
  1799. package/docs/zh-CN/cli/nodes.md +80 -0
  1800. package/docs/zh-CN/cli/onboard.md +36 -0
  1801. package/docs/zh-CN/cli/pairing.md +28 -0
  1802. package/docs/zh-CN/cli/plugins.md +66 -0
  1803. package/docs/zh-CN/cli/reset.md +24 -0
  1804. package/docs/zh-CN/cli/sandbox.md +158 -0
  1805. package/docs/zh-CN/cli/security.md +33 -0
  1806. package/docs/zh-CN/cli/sessions.md +23 -0
  1807. package/docs/zh-CN/cli/setup.md +36 -0
  1808. package/docs/zh-CN/cli/skills.md +33 -0
  1809. package/docs/zh-CN/cli/status.md +33 -0
  1810. package/docs/zh-CN/cli/system.md +63 -0
  1811. package/docs/zh-CN/cli/tui.md +30 -0
  1812. package/docs/zh-CN/cli/uninstall.md +24 -0
  1813. package/docs/zh-CN/cli/update.md +101 -0
  1814. package/docs/zh-CN/cli/voicecall.md +41 -0
  1815. package/docs/zh-CN/cli/webhooks.md +32 -0
  1816. package/docs/zh-CN/concepts/agent-loop.md +146 -0
  1817. package/docs/zh-CN/concepts/agent-workspace.md +219 -0
  1818. package/docs/zh-CN/concepts/agent.md +115 -0
  1819. package/docs/zh-CN/concepts/architecture.md +123 -0
  1820. package/docs/zh-CN/concepts/compaction.md +67 -0
  1821. package/docs/zh-CN/concepts/context.md +168 -0
  1822. package/docs/zh-CN/concepts/features.md +59 -0
  1823. package/docs/zh-CN/concepts/markdown-formatting.md +117 -0
  1824. package/docs/zh-CN/concepts/memory.md +412 -0
  1825. package/docs/zh-CN/concepts/messages.md +141 -0
  1826. package/docs/zh-CN/concepts/model-failover.md +145 -0
  1827. package/docs/zh-CN/concepts/model-providers.md +320 -0
  1828. package/docs/zh-CN/concepts/models.md +196 -0
  1829. package/docs/zh-CN/concepts/multi-agent.md +372 -0
  1830. package/docs/zh-CN/concepts/oauth.md +151 -0
  1831. package/docs/zh-CN/concepts/presence.md +99 -0
  1832. package/docs/zh-CN/concepts/queue.md +94 -0
  1833. package/docs/zh-CN/concepts/retry.md +76 -0
  1834. package/docs/zh-CN/concepts/session-pruning.md +129 -0
  1835. package/docs/zh-CN/concepts/session-tool.md +200 -0
  1836. package/docs/zh-CN/concepts/session.md +166 -0
  1837. package/docs/zh-CN/concepts/sessions.md +17 -0
  1838. package/docs/zh-CN/concepts/streaming.md +133 -0
  1839. package/docs/zh-CN/concepts/system-prompt.md +101 -0
  1840. package/docs/zh-CN/concepts/timezone.md +96 -0
  1841. package/docs/zh-CN/concepts/typebox.md +284 -0
  1842. package/docs/zh-CN/concepts/typing-indicators.md +74 -0
  1843. package/docs/zh-CN/concepts/usage-tracking.md +42 -0
  1844. package/docs/zh-CN/date-time.md +129 -0
  1845. package/docs/zh-CN/debug/node-issue.md +90 -0
  1846. package/docs/zh-CN/diagnostics/flags.md +98 -0
  1847. package/docs/zh-CN/experiments/onboarding-config-protocol.md +47 -0
  1848. package/docs/zh-CN/experiments/plans/cron-add-hardening.md +70 -0
  1849. package/docs/zh-CN/experiments/plans/group-policy-hardening.md +45 -0
  1850. package/docs/zh-CN/experiments/plans/openresponses-gateway.md +121 -0
  1851. package/docs/zh-CN/experiments/proposals/model-config.md +42 -0
  1852. package/docs/zh-CN/experiments/research/memory.md +235 -0
  1853. package/docs/zh-CN/gateway/authentication.md +142 -0
  1854. package/docs/zh-CN/gateway/background-process.md +100 -0
  1855. package/docs/zh-CN/gateway/bonjour.md +174 -0
  1856. package/docs/zh-CN/gateway/bridge-protocol.md +86 -0
  1857. package/docs/zh-CN/gateway/cli-backends.md +213 -0
  1858. package/docs/zh-CN/gateway/configuration-examples.md +587 -0
  1859. package/docs/zh-CN/gateway/configuration.md +3332 -0
  1860. package/docs/zh-CN/gateway/discovery.md +123 -0
  1861. package/docs/zh-CN/gateway/doctor.md +238 -0
  1862. package/docs/zh-CN/gateway/gateway-lock.md +41 -0
  1863. package/docs/zh-CN/gateway/health.md +42 -0
  1864. package/docs/zh-CN/gateway/heartbeat.md +274 -0
  1865. package/docs/zh-CN/gateway/index.md +335 -0
  1866. package/docs/zh-CN/gateway/local-models.md +157 -0
  1867. package/docs/zh-CN/gateway/logging.md +114 -0
  1868. package/docs/zh-CN/gateway/multiple-gateways.md +119 -0
  1869. package/docs/zh-CN/gateway/network-model.md +23 -0
  1870. package/docs/zh-CN/gateway/openai-http-api.md +125 -0
  1871. package/docs/zh-CN/gateway/openresponses-http-api.md +317 -0
  1872. package/docs/zh-CN/gateway/pairing.md +99 -0
  1873. package/docs/zh-CN/gateway/protocol.md +220 -0
  1874. package/docs/zh-CN/gateway/remote-gateway-readme.md +164 -0
  1875. package/docs/zh-CN/gateway/remote.md +133 -0
  1876. package/docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md +135 -0
  1877. package/docs/zh-CN/gateway/sandboxing.md +188 -0
  1878. package/docs/zh-CN/gateway/security/index.md +777 -0
  1879. package/docs/zh-CN/gateway/tailscale.md +124 -0
  1880. package/docs/zh-CN/gateway/tools-invoke-http-api.md +92 -0
  1881. package/docs/zh-CN/gateway/troubleshooting.md +771 -0
  1882. package/docs/zh-CN/help/debugging.md +160 -0
  1883. package/docs/zh-CN/help/environment.md +88 -0
  1884. package/docs/zh-CN/help/faq.md +2628 -0
  1885. package/docs/zh-CN/help/index.md +28 -0
  1886. package/docs/zh-CN/help/scripts.md +35 -0
  1887. package/docs/zh-CN/help/submitting-a-pr.md +8 -0
  1888. package/docs/zh-CN/help/submitting-an-issue.md +8 -0
  1889. package/docs/zh-CN/help/testing.md +375 -0
  1890. package/docs/zh-CN/help/troubleshooting.md +104 -0
  1891. package/docs/zh-CN/hooks/soul-evil.md +72 -0
  1892. package/docs/zh-CN/index.md +186 -0
  1893. package/docs/zh-CN/install/ansible.md +215 -0
  1894. package/docs/zh-CN/install/bun.md +65 -0
  1895. package/docs/zh-CN/install/development-channels.md +81 -0
  1896. package/docs/zh-CN/install/docker.md +532 -0
  1897. package/docs/zh-CN/install/exe-dev.md +127 -0
  1898. package/docs/zh-CN/install/fly.md +490 -0
  1899. package/docs/zh-CN/install/gcp.md +510 -0
  1900. package/docs/zh-CN/install/hetzner.md +337 -0
  1901. package/docs/zh-CN/install/index.md +193 -0
  1902. package/docs/zh-CN/install/installer.md +128 -0
  1903. package/docs/zh-CN/install/macos-vm.md +288 -0
  1904. package/docs/zh-CN/install/migrating.md +199 -0
  1905. package/docs/zh-CN/install/nix.md +99 -0
  1906. package/docs/zh-CN/install/node.md +8 -0
  1907. package/docs/zh-CN/install/northflank.mdx +60 -0
  1908. package/docs/zh-CN/install/railway.mdx +106 -0
  1909. package/docs/zh-CN/install/render.mdx +169 -0
  1910. package/docs/zh-CN/install/uninstall.md +135 -0
  1911. package/docs/zh-CN/install/updating.md +233 -0
  1912. package/docs/zh-CN/logging.md +329 -0
  1913. package/docs/zh-CN/network.md +59 -0
  1914. package/docs/zh-CN/nodes/audio.md +120 -0
  1915. package/docs/zh-CN/nodes/camera.md +162 -0
  1916. package/docs/zh-CN/nodes/images.md +79 -0
  1917. package/docs/zh-CN/nodes/index.md +348 -0
  1918. package/docs/zh-CN/nodes/location-command.md +120 -0
  1919. package/docs/zh-CN/nodes/media-understanding.md +380 -0
  1920. package/docs/zh-CN/nodes/talk.md +97 -0
  1921. package/docs/zh-CN/nodes/troubleshooting.md +8 -0
  1922. package/docs/zh-CN/nodes/voicewake.md +72 -0
  1923. package/docs/zh-CN/perplexity.md +84 -0
  1924. package/docs/zh-CN/pi-dev.md +77 -0
  1925. package/docs/zh-CN/pi.md +619 -0
  1926. package/docs/zh-CN/platforms/android.md +155 -0
  1927. package/docs/zh-CN/platforms/digitalocean.md +269 -0
  1928. package/docs/zh-CN/platforms/index.md +60 -0
  1929. package/docs/zh-CN/platforms/ios.md +114 -0
  1930. package/docs/zh-CN/platforms/linux.md +101 -0
  1931. package/docs/zh-CN/platforms/mac/bundled-gateway.md +75 -0
  1932. package/docs/zh-CN/platforms/mac/canvas.md +128 -0
  1933. package/docs/zh-CN/platforms/mac/child-process.md +73 -0
  1934. package/docs/zh-CN/platforms/mac/dev-setup.md +109 -0
  1935. package/docs/zh-CN/platforms/mac/health.md +41 -0
  1936. package/docs/zh-CN/platforms/mac/icon.md +38 -0
  1937. package/docs/zh-CN/platforms/mac/logging.md +64 -0
  1938. package/docs/zh-CN/platforms/mac/menu-bar.md +88 -0
  1939. package/docs/zh-CN/platforms/mac/peekaboo.md +62 -0
  1940. package/docs/zh-CN/platforms/mac/permissions.md +46 -0
  1941. package/docs/zh-CN/platforms/mac/release.md +92 -0
  1942. package/docs/zh-CN/platforms/mac/remote.md +90 -0
  1943. package/docs/zh-CN/platforms/mac/signing.md +54 -0
  1944. package/docs/zh-CN/platforms/mac/skills.md +40 -0
  1945. package/docs/zh-CN/platforms/mac/voice-overlay.md +67 -0
  1946. package/docs/zh-CN/platforms/mac/voicewake.md +74 -0
  1947. package/docs/zh-CN/platforms/mac/webchat.md +43 -0
  1948. package/docs/zh-CN/platforms/mac/xpc.md +68 -0
  1949. package/docs/zh-CN/platforms/macos.md +193 -0
  1950. package/docs/zh-CN/platforms/oracle.md +310 -0
  1951. package/docs/zh-CN/platforms/raspberry-pi.md +365 -0
  1952. package/docs/zh-CN/platforms/windows.md +156 -0
  1953. package/docs/zh-CN/plugins/agent-tools.md +99 -0
  1954. package/docs/zh-CN/plugins/manifest.md +68 -0
  1955. package/docs/zh-CN/plugins/voice-call.md +250 -0
  1956. package/docs/zh-CN/plugins/zalouser.md +88 -0
  1957. package/docs/zh-CN/prose.md +141 -0
  1958. package/docs/zh-CN/providers/anthropic.md +159 -0
  1959. package/docs/zh-CN/providers/bedrock.md +170 -0
  1960. package/docs/zh-CN/providers/claude-max-api-proxy.md +155 -0
  1961. package/docs/zh-CN/providers/deepgram.md +97 -0
  1962. package/docs/zh-CN/providers/github-copilot.md +67 -0
  1963. package/docs/zh-CN/providers/glm.md +39 -0
  1964. package/docs/zh-CN/providers/index.md +68 -0
  1965. package/docs/zh-CN/providers/minimax.md +206 -0
  1966. package/docs/zh-CN/providers/models.md +55 -0
  1967. package/docs/zh-CN/providers/moonshot.md +145 -0
  1968. package/docs/zh-CN/providers/ollama.md +230 -0
  1969. package/docs/zh-CN/providers/openai.md +68 -0
  1970. package/docs/zh-CN/providers/opencode.md +41 -0
  1971. package/docs/zh-CN/providers/openrouter.md +43 -0
  1972. package/docs/zh-CN/providers/qianfan.md +8 -0
  1973. package/docs/zh-CN/providers/qwen.md +55 -0
  1974. package/docs/zh-CN/providers/synthetic.md +102 -0
  1975. package/docs/zh-CN/providers/venice.md +274 -0
  1976. package/docs/zh-CN/providers/vercel-ai-gateway.md +57 -0
  1977. package/docs/zh-CN/providers/xiaomi.md +68 -0
  1978. package/docs/zh-CN/providers/zai.md +41 -0
  1979. package/docs/zh-CN/refactor/clawnet.md +424 -0
  1980. package/docs/zh-CN/refactor/exec-host.md +323 -0
  1981. package/docs/zh-CN/refactor/outbound-session-mirroring.md +92 -0
  1982. package/docs/zh-CN/refactor/plugin-sdk.md +221 -0
  1983. package/docs/zh-CN/refactor/strict-config.md +100 -0
  1984. package/docs/zh-CN/reference/AGENTS.default.md +131 -0
  1985. package/docs/zh-CN/reference/RELEASING.md +123 -0
  1986. package/docs/zh-CN/reference/api-usage-costs.md +136 -0
  1987. package/docs/zh-CN/reference/credits.md +34 -0
  1988. package/docs/zh-CN/reference/device-models.md +54 -0
  1989. package/docs/zh-CN/reference/rpc.md +48 -0
  1990. package/docs/zh-CN/reference/session-management-compaction.md +287 -0
  1991. package/docs/zh-CN/reference/templates/AGENTS.dev.md +89 -0
  1992. package/docs/zh-CN/reference/templates/AGENTS.md +225 -0
  1993. package/docs/zh-CN/reference/templates/BOOT.md +17 -0
  1994. package/docs/zh-CN/reference/templates/BOOTSTRAP.md +68 -0
  1995. package/docs/zh-CN/reference/templates/HEARTBEAT.md +18 -0
  1996. package/docs/zh-CN/reference/templates/IDENTITY.dev.md +54 -0
  1997. package/docs/zh-CN/reference/templates/IDENTITY.md +36 -0
  1998. package/docs/zh-CN/reference/templates/SOUL.dev.md +83 -0
  1999. package/docs/zh-CN/reference/templates/SOUL.md +49 -0
  2000. package/docs/zh-CN/reference/templates/TOOLS.dev.md +31 -0
  2001. package/docs/zh-CN/reference/templates/TOOLS.md +53 -0
  2002. package/docs/zh-CN/reference/templates/USER.dev.md +25 -0
  2003. package/docs/zh-CN/reference/templates/USER.md +30 -0
  2004. package/docs/zh-CN/reference/test.md +57 -0
  2005. package/docs/zh-CN/reference/token-use.md +119 -0
  2006. package/docs/zh-CN/reference/transcript-hygiene.md +109 -0
  2007. package/docs/zh-CN/reference/wizard.md +9 -0
  2008. package/docs/zh-CN/security/formal-verification.md +171 -0
  2009. package/docs/zh-CN/start/bootstrapping.md +9 -0
  2010. package/docs/zh-CN/start/docs-directory.md +70 -0
  2011. package/docs/zh-CN/start/getting-started.md +206 -0
  2012. package/docs/zh-CN/start/hubs.md +200 -0
  2013. package/docs/zh-CN/start/lore.md +226 -0
  2014. package/docs/zh-CN/start/onboarding.md +105 -0
  2015. package/docs/zh-CN/start/openclaw.md +248 -0
  2016. package/docs/zh-CN/start/quickstart.md +88 -0
  2017. package/docs/zh-CN/start/setup.md +153 -0
  2018. package/docs/zh-CN/start/showcase.md +423 -0
  2019. package/docs/zh-CN/start/wizard.md +331 -0
  2020. package/docs/zh-CN/tools/agent-send.md +59 -0
  2021. package/docs/zh-CN/tools/apply-patch.md +57 -0
  2022. package/docs/zh-CN/tools/browser-linux-troubleshooting.md +144 -0
  2023. package/docs/zh-CN/tools/browser-login.md +75 -0
  2024. package/docs/zh-CN/tools/browser.md +553 -0
  2025. package/docs/zh-CN/tools/chrome-extension.md +183 -0
  2026. package/docs/zh-CN/tools/clawhub.md +209 -0
  2027. package/docs/zh-CN/tools/creating-skills.md +61 -0
  2028. package/docs/zh-CN/tools/elevated.md +64 -0
  2029. package/docs/zh-CN/tools/exec-approvals.md +234 -0
  2030. package/docs/zh-CN/tools/exec.md +169 -0
  2031. package/docs/zh-CN/tools/firecrawl.md +68 -0
  2032. package/docs/zh-CN/tools/index.md +515 -0
  2033. package/docs/zh-CN/tools/llm-task.md +117 -0
  2034. package/docs/zh-CN/tools/lobster.md +349 -0
  2035. package/docs/zh-CN/tools/multi-agent-sandbox-tools.md +401 -0
  2036. package/docs/zh-CN/tools/plugin.md +639 -0
  2037. package/docs/zh-CN/tools/reactions.md +29 -0
  2038. package/docs/zh-CN/tools/skills-config.md +78 -0
  2039. package/docs/zh-CN/tools/skills.md +279 -0
  2040. package/docs/zh-CN/tools/slash-commands.md +205 -0
  2041. package/docs/zh-CN/tools/subagents.md +156 -0
  2042. package/docs/zh-CN/tools/thinking.md +80 -0
  2043. package/docs/zh-CN/tools/web.md +257 -0
  2044. package/docs/zh-CN/tts.md +375 -0
  2045. package/docs/zh-CN/vps.md +47 -0
  2046. package/docs/zh-CN/web/control-ui.md +191 -0
  2047. package/docs/zh-CN/web/dashboard.md +53 -0
  2048. package/docs/zh-CN/web/index.md +118 -0
  2049. package/docs/zh-CN/web/tui.md +166 -0
  2050. package/docs/zh-CN/web/webchat.md +56 -0
  2051. package/extensions/bluebubbles/README.md +45 -0
  2052. package/extensions/bluebubbles/index.ts +19 -0
  2053. package/extensions/bluebubbles/node_modules/.bin/openclaw +21 -0
  2054. package/extensions/bluebubbles/openclaw.plugin.json +9 -0
  2055. package/extensions/bluebubbles/package.json +36 -0
  2056. package/extensions/bluebubbles/src/accounts.ts +88 -0
  2057. package/extensions/bluebubbles/src/actions.test.ts +650 -0
  2058. package/extensions/bluebubbles/src/actions.ts +438 -0
  2059. package/extensions/bluebubbles/src/attachments.test.ts +345 -0
  2060. package/extensions/bluebubbles/src/attachments.ts +302 -0
  2061. package/extensions/bluebubbles/src/channel.ts +414 -0
  2062. package/extensions/bluebubbles/src/chat.test.ts +461 -0
  2063. package/extensions/bluebubbles/src/chat.ts +382 -0
  2064. package/extensions/bluebubbles/src/config-schema.ts +51 -0
  2065. package/extensions/bluebubbles/src/media-send.ts +174 -0
  2066. package/extensions/bluebubbles/src/monitor.test.ts +2384 -0
  2067. package/extensions/bluebubbles/src/monitor.ts +2517 -0
  2068. package/extensions/bluebubbles/src/onboarding.ts +352 -0
  2069. package/extensions/bluebubbles/src/probe.ts +144 -0
  2070. package/extensions/bluebubbles/src/reactions.test.ts +392 -0
  2071. package/extensions/bluebubbles/src/reactions.ts +188 -0
  2072. package/extensions/bluebubbles/src/runtime.ts +14 -0
  2073. package/extensions/bluebubbles/src/send.test.ts +889 -0
  2074. package/extensions/bluebubbles/src/send.ts +474 -0
  2075. package/extensions/bluebubbles/src/targets.test.ts +183 -0
  2076. package/extensions/bluebubbles/src/targets.ts +422 -0
  2077. package/extensions/bluebubbles/src/types.ts +127 -0
  2078. package/extensions/copilot-proxy/README.md +24 -0
  2079. package/extensions/copilot-proxy/index.ts +149 -0
  2080. package/extensions/copilot-proxy/node_modules/.bin/openclaw +21 -0
  2081. package/extensions/copilot-proxy/openclaw.plugin.json +9 -0
  2082. package/extensions/copilot-proxy/package.json +14 -0
  2083. package/extensions/diagnostics-otel/index.ts +15 -0
  2084. package/extensions/diagnostics-otel/node_modules/.bin/acorn +21 -0
  2085. package/extensions/diagnostics-otel/node_modules/.bin/openclaw +21 -0
  2086. package/extensions/diagnostics-otel/openclaw.plugin.json +8 -0
  2087. package/extensions/diagnostics-otel/package.json +27 -0
  2088. package/extensions/diagnostics-otel/src/service.test.ts +226 -0
  2089. package/extensions/diagnostics-otel/src/service.ts +635 -0
  2090. package/extensions/discord/index.ts +17 -0
  2091. package/extensions/discord/node_modules/.bin/openclaw +21 -0
  2092. package/extensions/discord/openclaw.plugin.json +9 -0
  2093. package/extensions/discord/package.json +14 -0
  2094. package/extensions/discord/src/channel.ts +422 -0
  2095. package/extensions/discord/src/runtime.ts +14 -0
  2096. package/extensions/feishu/index.ts +63 -0
  2097. package/extensions/feishu/node_modules/.bin/openclaw +21 -0
  2098. package/extensions/feishu/openclaw.plugin.json +10 -0
  2099. package/extensions/feishu/package.json +37 -0
  2100. package/extensions/feishu/skills/feishu-doc/SKILL.md +105 -0
  2101. package/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
  2102. package/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
  2103. package/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
  2104. package/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
  2105. package/extensions/feishu/src/accounts.ts +144 -0
  2106. package/extensions/feishu/src/bitable.ts +459 -0
  2107. package/extensions/feishu/src/bot.ts +871 -0
  2108. package/extensions/feishu/src/channel.ts +341 -0
  2109. package/extensions/feishu/src/client.ts +118 -0
  2110. package/extensions/feishu/src/config-schema.ts +172 -0
  2111. package/extensions/feishu/src/directory.ts +177 -0
  2112. package/extensions/feishu/src/doc-schema.ts +47 -0
  2113. package/extensions/feishu/src/docx.ts +521 -0
  2114. package/extensions/feishu/src/drive-schema.ts +46 -0
  2115. package/extensions/feishu/src/drive.ts +227 -0
  2116. package/extensions/feishu/src/media.ts +527 -0
  2117. package/extensions/feishu/src/mention.ts +126 -0
  2118. package/extensions/feishu/src/monitor.ts +190 -0
  2119. package/extensions/feishu/src/onboarding.ts +356 -0
  2120. package/extensions/feishu/src/outbound.ts +40 -0
  2121. package/extensions/feishu/src/perm-schema.ts +52 -0
  2122. package/extensions/feishu/src/perm.ts +173 -0
  2123. package/extensions/feishu/src/policy.ts +104 -0
  2124. package/extensions/feishu/src/probe.ts +44 -0
  2125. package/extensions/feishu/src/reactions.ts +160 -0
  2126. package/extensions/feishu/src/reply-dispatcher.ts +184 -0
  2127. package/extensions/feishu/src/runtime.ts +14 -0
  2128. package/extensions/feishu/src/send.ts +358 -0
  2129. package/extensions/feishu/src/targets.ts +78 -0
  2130. package/extensions/feishu/src/tools-config.ts +21 -0
  2131. package/extensions/feishu/src/types.ts +75 -0
  2132. package/extensions/feishu/src/typing.ts +80 -0
  2133. package/extensions/feishu/src/wiki-schema.ts +55 -0
  2134. package/extensions/feishu/src/wiki.ts +232 -0
  2135. package/extensions/google-antigravity-auth/README.md +24 -0
  2136. package/extensions/google-antigravity-auth/index.ts +461 -0
  2137. package/extensions/google-antigravity-auth/node_modules/.bin/openclaw +21 -0
  2138. package/extensions/google-antigravity-auth/openclaw.plugin.json +9 -0
  2139. package/extensions/google-antigravity-auth/package.json +14 -0
  2140. package/extensions/google-gemini-cli-auth/README.md +35 -0
  2141. package/extensions/google-gemini-cli-auth/index.ts +88 -0
  2142. package/extensions/google-gemini-cli-auth/node_modules/.bin/openclaw +21 -0
  2143. package/extensions/google-gemini-cli-auth/oauth.test.ts +240 -0
  2144. package/extensions/google-gemini-cli-auth/oauth.ts +662 -0
  2145. package/extensions/google-gemini-cli-auth/openclaw.plugin.json +9 -0
  2146. package/extensions/google-gemini-cli-auth/package.json +14 -0
  2147. package/extensions/googlechat/index.ts +19 -0
  2148. package/extensions/googlechat/node_modules/.bin/openclaw +21 -0
  2149. package/extensions/googlechat/openclaw.plugin.json +9 -0
  2150. package/extensions/googlechat/package.json +39 -0
  2151. package/extensions/googlechat/src/accounts.ts +147 -0
  2152. package/extensions/googlechat/src/actions.ts +181 -0
  2153. package/extensions/googlechat/src/api.test.ts +61 -0
  2154. package/extensions/googlechat/src/api.ts +282 -0
  2155. package/extensions/googlechat/src/auth.ts +137 -0
  2156. package/extensions/googlechat/src/channel.ts +583 -0
  2157. package/extensions/googlechat/src/monitor.test.ts +22 -0
  2158. package/extensions/googlechat/src/monitor.ts +960 -0
  2159. package/extensions/googlechat/src/onboarding.ts +269 -0
  2160. package/extensions/googlechat/src/runtime.ts +14 -0
  2161. package/extensions/googlechat/src/targets.test.ts +32 -0
  2162. package/extensions/googlechat/src/targets.ts +65 -0
  2163. package/extensions/googlechat/src/types.config.ts +3 -0
  2164. package/extensions/googlechat/src/types.ts +73 -0
  2165. package/extensions/imessage/index.ts +17 -0
  2166. package/extensions/imessage/node_modules/.bin/openclaw +21 -0
  2167. package/extensions/imessage/openclaw.plugin.json +9 -0
  2168. package/extensions/imessage/package.json +14 -0
  2169. package/extensions/imessage/src/channel.ts +294 -0
  2170. package/extensions/imessage/src/runtime.ts +14 -0
  2171. package/extensions/line/index.ts +19 -0
  2172. package/extensions/line/node_modules/.bin/openclaw +21 -0
  2173. package/extensions/line/openclaw.plugin.json +9 -0
  2174. package/extensions/line/package.json +29 -0
  2175. package/extensions/line/src/card-command.ts +344 -0
  2176. package/extensions/line/src/channel.logout.test.ts +99 -0
  2177. package/extensions/line/src/channel.sendPayload.test.ts +306 -0
  2178. package/extensions/line/src/channel.ts +780 -0
  2179. package/extensions/line/src/runtime.ts +14 -0
  2180. package/extensions/llm-task/README.md +97 -0
  2181. package/extensions/llm-task/index.ts +6 -0
  2182. package/extensions/llm-task/node_modules/.bin/openclaw +21 -0
  2183. package/extensions/llm-task/openclaw.plugin.json +21 -0
  2184. package/extensions/llm-task/package.json +14 -0
  2185. package/extensions/llm-task/src/llm-task-tool.test.ts +138 -0
  2186. package/extensions/llm-task/src/llm-task-tool.ts +245 -0
  2187. package/extensions/lobster/README.md +75 -0
  2188. package/extensions/lobster/SKILL.md +97 -0
  2189. package/extensions/lobster/index.ts +14 -0
  2190. package/extensions/lobster/node_modules/.bin/openclaw +21 -0
  2191. package/extensions/lobster/openclaw.plugin.json +10 -0
  2192. package/extensions/lobster/package.json +14 -0
  2193. package/extensions/lobster/src/lobster-tool.test.ts +247 -0
  2194. package/extensions/lobster/src/lobster-tool.ts +328 -0
  2195. package/extensions/matrix/CHANGELOG.md +111 -0
  2196. package/extensions/matrix/index.ts +17 -0
  2197. package/extensions/matrix/node_modules/.bin/markdown-it +21 -0
  2198. package/extensions/matrix/node_modules/.bin/openclaw +21 -0
  2199. package/extensions/matrix/openclaw.plugin.json +9 -0
  2200. package/extensions/matrix/package.json +36 -0
  2201. package/extensions/matrix/src/actions.ts +195 -0
  2202. package/extensions/matrix/src/channel.directory.test.ts +64 -0
  2203. package/extensions/matrix/src/channel.ts +439 -0
  2204. package/extensions/matrix/src/config-schema.ts +63 -0
  2205. package/extensions/matrix/src/directory-live.ts +188 -0
  2206. package/extensions/matrix/src/group-mentions.ts +66 -0
  2207. package/extensions/matrix/src/matrix/accounts.test.ts +82 -0
  2208. package/extensions/matrix/src/matrix/accounts.ts +65 -0
  2209. package/extensions/matrix/src/matrix/actions/client.ts +57 -0
  2210. package/extensions/matrix/src/matrix/actions/messages.ts +128 -0
  2211. package/extensions/matrix/src/matrix/actions/pins.ts +76 -0
  2212. package/extensions/matrix/src/matrix/actions/reactions.ts +96 -0
  2213. package/extensions/matrix/src/matrix/actions/room.ts +85 -0
  2214. package/extensions/matrix/src/matrix/actions/summary.ts +75 -0
  2215. package/extensions/matrix/src/matrix/actions/types.ts +84 -0
  2216. package/extensions/matrix/src/matrix/actions.ts +15 -0
  2217. package/extensions/matrix/src/matrix/active-client.ts +11 -0
  2218. package/extensions/matrix/src/matrix/client/config.ts +160 -0
  2219. package/extensions/matrix/src/matrix/client/create-client.ts +123 -0
  2220. package/extensions/matrix/src/matrix/client/logging.ts +36 -0
  2221. package/extensions/matrix/src/matrix/client/runtime.ts +4 -0
  2222. package/extensions/matrix/src/matrix/client/shared.ts +170 -0
  2223. package/extensions/matrix/src/matrix/client/storage.ts +131 -0
  2224. package/extensions/matrix/src/matrix/client/types.ts +34 -0
  2225. package/extensions/matrix/src/matrix/client.test.ts +56 -0
  2226. package/extensions/matrix/src/matrix/client.ts +5 -0
  2227. package/extensions/matrix/src/matrix/credentials.ts +105 -0
  2228. package/extensions/matrix/src/matrix/deps.ts +60 -0
  2229. package/extensions/matrix/src/matrix/format.test.ts +33 -0
  2230. package/extensions/matrix/src/matrix/format.ts +22 -0
  2231. package/extensions/matrix/src/matrix/index.ts +11 -0
  2232. package/extensions/matrix/src/matrix/monitor/allowlist.test.ts +45 -0
  2233. package/extensions/matrix/src/matrix/monitor/allowlist.ts +103 -0
  2234. package/extensions/matrix/src/matrix/monitor/auto-join.ts +71 -0
  2235. package/extensions/matrix/src/matrix/monitor/direct.ts +104 -0
  2236. package/extensions/matrix/src/matrix/monitor/events.ts +101 -0
  2237. package/extensions/matrix/src/matrix/monitor/handler.ts +665 -0
  2238. package/extensions/matrix/src/matrix/monitor/index.ts +338 -0
  2239. package/extensions/matrix/src/matrix/monitor/location.ts +100 -0
  2240. package/extensions/matrix/src/matrix/monitor/media.test.ts +102 -0
  2241. package/extensions/matrix/src/matrix/monitor/media.ts +113 -0
  2242. package/extensions/matrix/src/matrix/monitor/mentions.ts +31 -0
  2243. package/extensions/matrix/src/matrix/monitor/replies.ts +97 -0
  2244. package/extensions/matrix/src/matrix/monitor/room-info.ts +55 -0
  2245. package/extensions/matrix/src/matrix/monitor/rooms.test.ts +39 -0
  2246. package/extensions/matrix/src/matrix/monitor/rooms.ts +47 -0
  2247. package/extensions/matrix/src/matrix/monitor/threads.ts +68 -0
  2248. package/extensions/matrix/src/matrix/monitor/types.ts +39 -0
  2249. package/extensions/matrix/src/matrix/poll-types.test.ts +21 -0
  2250. package/extensions/matrix/src/matrix/poll-types.ts +166 -0
  2251. package/extensions/matrix/src/matrix/probe.ts +70 -0
  2252. package/extensions/matrix/src/matrix/send/client.ts +66 -0
  2253. package/extensions/matrix/src/matrix/send/formatting.ts +89 -0
  2254. package/extensions/matrix/src/matrix/send/media.ts +229 -0
  2255. package/extensions/matrix/src/matrix/send/targets.test.ts +98 -0
  2256. package/extensions/matrix/src/matrix/send/targets.ts +147 -0
  2257. package/extensions/matrix/src/matrix/send/types.ts +109 -0
  2258. package/extensions/matrix/src/matrix/send.test.ts +171 -0
  2259. package/extensions/matrix/src/matrix/send.ts +260 -0
  2260. package/extensions/matrix/src/onboarding.ts +449 -0
  2261. package/extensions/matrix/src/outbound.ts +52 -0
  2262. package/extensions/matrix/src/resolve-targets.test.ts +48 -0
  2263. package/extensions/matrix/src/resolve-targets.ts +135 -0
  2264. package/extensions/matrix/src/runtime.ts +14 -0
  2265. package/extensions/matrix/src/tool-actions.ts +164 -0
  2266. package/extensions/matrix/src/types.ts +97 -0
  2267. package/extensions/mattermost/index.ts +17 -0
  2268. package/extensions/mattermost/node_modules/.bin/openclaw +21 -0
  2269. package/extensions/mattermost/openclaw.plugin.json +9 -0
  2270. package/extensions/mattermost/package.json +28 -0
  2271. package/extensions/mattermost/src/channel.test.ts +72 -0
  2272. package/extensions/mattermost/src/channel.ts +337 -0
  2273. package/extensions/mattermost/src/config-schema.ts +56 -0
  2274. package/extensions/mattermost/src/group-mentions.ts +15 -0
  2275. package/extensions/mattermost/src/mattermost/accounts.ts +128 -0
  2276. package/extensions/mattermost/src/mattermost/client.ts +220 -0
  2277. package/extensions/mattermost/src/mattermost/index.ts +9 -0
  2278. package/extensions/mattermost/src/mattermost/monitor-helpers.ts +166 -0
  2279. package/extensions/mattermost/src/mattermost/monitor.ts +991 -0
  2280. package/extensions/mattermost/src/mattermost/probe.ts +74 -0
  2281. package/extensions/mattermost/src/mattermost/send.ts +231 -0
  2282. package/extensions/mattermost/src/normalize.ts +46 -0
  2283. package/extensions/mattermost/src/onboarding-helpers.ts +44 -0
  2284. package/extensions/mattermost/src/onboarding.ts +186 -0
  2285. package/extensions/mattermost/src/runtime.ts +14 -0
  2286. package/extensions/mattermost/src/types.ts +52 -0
  2287. package/extensions/memory-core/index.ts +38 -0
  2288. package/extensions/memory-core/node_modules/.bin/openclaw +21 -0
  2289. package/extensions/memory-core/openclaw.plugin.json +9 -0
  2290. package/extensions/memory-core/package.json +17 -0
  2291. package/extensions/memory-lancedb/config.ts +139 -0
  2292. package/extensions/memory-lancedb/index.test.ts +253 -0
  2293. package/extensions/memory-lancedb/index.ts +622 -0
  2294. package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +21 -0
  2295. package/extensions/memory-lancedb/node_modules/.bin/openai +21 -0
  2296. package/extensions/memory-lancedb/node_modules/.bin/openclaw +21 -0
  2297. package/extensions/memory-lancedb/openclaw.plugin.json +60 -0
  2298. package/extensions/memory-lancedb/package.json +19 -0
  2299. package/extensions/minimax-portal-auth/README.md +33 -0
  2300. package/extensions/minimax-portal-auth/index.ts +155 -0
  2301. package/extensions/minimax-portal-auth/node_modules/.bin/openclaw +21 -0
  2302. package/extensions/minimax-portal-auth/oauth.ts +247 -0
  2303. package/extensions/minimax-portal-auth/openclaw.plugin.json +9 -0
  2304. package/extensions/minimax-portal-auth/package.json +14 -0
  2305. package/extensions/msteams/CHANGELOG.md +107 -0
  2306. package/extensions/msteams/index.ts +17 -0
  2307. package/extensions/msteams/node_modules/.bin/openclaw +21 -0
  2308. package/extensions/msteams/openclaw.plugin.json +9 -0
  2309. package/extensions/msteams/package.json +39 -0
  2310. package/extensions/msteams/src/attachments/download.ts +283 -0
  2311. package/extensions/msteams/src/attachments/graph.ts +353 -0
  2312. package/extensions/msteams/src/attachments/html.ts +90 -0
  2313. package/extensions/msteams/src/attachments/payload.ts +22 -0
  2314. package/extensions/msteams/src/attachments/shared.ts +291 -0
  2315. package/extensions/msteams/src/attachments/types.ts +37 -0
  2316. package/extensions/msteams/src/attachments.test.ts +459 -0
  2317. package/extensions/msteams/src/attachments.ts +18 -0
  2318. package/extensions/msteams/src/channel.directory.test.ts +48 -0
  2319. package/extensions/msteams/src/channel.ts +459 -0
  2320. package/extensions/msteams/src/conversation-store-fs.test.ts +88 -0
  2321. package/extensions/msteams/src/conversation-store-fs.ts +165 -0
  2322. package/extensions/msteams/src/conversation-store-memory.ts +47 -0
  2323. package/extensions/msteams/src/conversation-store.ts +41 -0
  2324. package/extensions/msteams/src/directory-live.ts +205 -0
  2325. package/extensions/msteams/src/errors.test.ts +45 -0
  2326. package/extensions/msteams/src/errors.ts +190 -0
  2327. package/extensions/msteams/src/file-consent-helpers.test.ts +243 -0
  2328. package/extensions/msteams/src/file-consent-helpers.ts +73 -0
  2329. package/extensions/msteams/src/file-consent.ts +126 -0
  2330. package/extensions/msteams/src/graph-chat.ts +53 -0
  2331. package/extensions/msteams/src/graph-upload.ts +453 -0
  2332. package/extensions/msteams/src/inbound.test.ts +66 -0
  2333. package/extensions/msteams/src/inbound.ts +48 -0
  2334. package/extensions/msteams/src/index.ts +4 -0
  2335. package/extensions/msteams/src/media-helpers.test.ts +189 -0
  2336. package/extensions/msteams/src/media-helpers.ts +86 -0
  2337. package/extensions/msteams/src/messenger.test.ts +248 -0
  2338. package/extensions/msteams/src/messenger.ts +495 -0
  2339. package/extensions/msteams/src/monitor-handler/inbound-media.ts +128 -0
  2340. package/extensions/msteams/src/monitor-handler/message-handler.ts +641 -0
  2341. package/extensions/msteams/src/monitor-handler.ts +162 -0
  2342. package/extensions/msteams/src/monitor-types.ts +5 -0
  2343. package/extensions/msteams/src/monitor.ts +295 -0
  2344. package/extensions/msteams/src/onboarding.ts +431 -0
  2345. package/extensions/msteams/src/outbound.ts +46 -0
  2346. package/extensions/msteams/src/pending-uploads.ts +89 -0
  2347. package/extensions/msteams/src/policy.test.ts +209 -0
  2348. package/extensions/msteams/src/policy.ts +273 -0
  2349. package/extensions/msteams/src/polls-store-memory.ts +32 -0
  2350. package/extensions/msteams/src/polls-store.test.ts +38 -0
  2351. package/extensions/msteams/src/polls.test.ts +72 -0
  2352. package/extensions/msteams/src/polls.ts +315 -0
  2353. package/extensions/msteams/src/probe.test.ts +58 -0
  2354. package/extensions/msteams/src/probe.ts +107 -0
  2355. package/extensions/msteams/src/reply-dispatcher.ts +132 -0
  2356. package/extensions/msteams/src/resolve-allowlist.ts +297 -0
  2357. package/extensions/msteams/src/runtime.ts +14 -0
  2358. package/extensions/msteams/src/sdk-types.ts +19 -0
  2359. package/extensions/msteams/src/sdk.ts +33 -0
  2360. package/extensions/msteams/src/send-context.ts +164 -0
  2361. package/extensions/msteams/src/send.ts +519 -0
  2362. package/extensions/msteams/src/sent-message-cache.test.ts +15 -0
  2363. package/extensions/msteams/src/sent-message-cache.ts +47 -0
  2364. package/extensions/msteams/src/storage.ts +25 -0
  2365. package/extensions/msteams/src/store-fs.ts +83 -0
  2366. package/extensions/msteams/src/token.ts +19 -0
  2367. package/extensions/nextcloud-talk/index.ts +17 -0
  2368. package/extensions/nextcloud-talk/node_modules/.bin/openclaw +21 -0
  2369. package/extensions/nextcloud-talk/openclaw.plugin.json +9 -0
  2370. package/extensions/nextcloud-talk/package.json +33 -0
  2371. package/extensions/nextcloud-talk/src/accounts.ts +174 -0
  2372. package/extensions/nextcloud-talk/src/channel.ts +409 -0
  2373. package/extensions/nextcloud-talk/src/config-schema.ts +79 -0
  2374. package/extensions/nextcloud-talk/src/format.ts +79 -0
  2375. package/extensions/nextcloud-talk/src/inbound.ts +327 -0
  2376. package/extensions/nextcloud-talk/src/monitor.ts +246 -0
  2377. package/extensions/nextcloud-talk/src/normalize.ts +39 -0
  2378. package/extensions/nextcloud-talk/src/onboarding.ts +343 -0
  2379. package/extensions/nextcloud-talk/src/policy.test.ts +33 -0
  2380. package/extensions/nextcloud-talk/src/policy.ts +180 -0
  2381. package/extensions/nextcloud-talk/src/room-info.ts +125 -0
  2382. package/extensions/nextcloud-talk/src/runtime.ts +14 -0
  2383. package/extensions/nextcloud-talk/src/send.ts +215 -0
  2384. package/extensions/nextcloud-talk/src/signature.ts +72 -0
  2385. package/extensions/nextcloud-talk/src/types.ts +181 -0
  2386. package/extensions/nostr/CHANGELOG.md +98 -0
  2387. package/extensions/nostr/README.md +136 -0
  2388. package/extensions/nostr/index.ts +68 -0
  2389. package/extensions/nostr/node_modules/.bin/openclaw +21 -0
  2390. package/extensions/nostr/node_modules/.bin/tsc +21 -0
  2391. package/extensions/nostr/node_modules/.bin/tsserver +21 -0
  2392. package/extensions/nostr/openclaw.plugin.json +9 -0
  2393. package/extensions/nostr/package.json +34 -0
  2394. package/extensions/nostr/src/channel.test.ts +151 -0
  2395. package/extensions/nostr/src/channel.ts +353 -0
  2396. package/extensions/nostr/src/config-schema.ts +90 -0
  2397. package/extensions/nostr/src/metrics.ts +478 -0
  2398. package/extensions/nostr/src/nostr-bus.fuzz.test.ts +533 -0
  2399. package/extensions/nostr/src/nostr-bus.integration.test.ts +448 -0
  2400. package/extensions/nostr/src/nostr-bus.test.ts +199 -0
  2401. package/extensions/nostr/src/nostr-bus.ts +715 -0
  2402. package/extensions/nostr/src/nostr-profile-http.test.ts +378 -0
  2403. package/extensions/nostr/src/nostr-profile-http.ts +546 -0
  2404. package/extensions/nostr/src/nostr-profile-import.test.ts +119 -0
  2405. package/extensions/nostr/src/nostr-profile-import.ts +262 -0
  2406. package/extensions/nostr/src/nostr-profile.fuzz.test.ts +477 -0
  2407. package/extensions/nostr/src/nostr-profile.test.ts +410 -0
  2408. package/extensions/nostr/src/nostr-profile.ts +277 -0
  2409. package/extensions/nostr/src/nostr-state-store.test.ts +131 -0
  2410. package/extensions/nostr/src/nostr-state-store.ts +226 -0
  2411. package/extensions/nostr/src/runtime.ts +14 -0
  2412. package/extensions/nostr/src/seen-tracker.ts +303 -0
  2413. package/extensions/nostr/src/types.test.ts +157 -0
  2414. package/extensions/nostr/src/types.ts +101 -0
  2415. package/extensions/nostr/test/setup.ts +5 -0
  2416. package/extensions/open-prose/README.md +25 -0
  2417. package/extensions/open-prose/index.ts +5 -0
  2418. package/extensions/open-prose/node_modules/.bin/openclaw +21 -0
  2419. package/extensions/open-prose/openclaw.plugin.json +11 -0
  2420. package/extensions/open-prose/package.json +14 -0
  2421. package/extensions/open-prose/skills/prose/LICENSE +21 -0
  2422. package/extensions/open-prose/skills/prose/SKILL.md +323 -0
  2423. package/extensions/open-prose/skills/prose/alt-borges.md +141 -0
  2424. package/extensions/open-prose/skills/prose/alts/arabian-nights.md +358 -0
  2425. package/extensions/open-prose/skills/prose/alts/borges.md +360 -0
  2426. package/extensions/open-prose/skills/prose/alts/folk.md +322 -0
  2427. package/extensions/open-prose/skills/prose/alts/homer.md +346 -0
  2428. package/extensions/open-prose/skills/prose/alts/kafka.md +373 -0
  2429. package/extensions/open-prose/skills/prose/compiler.md +2971 -0
  2430. package/extensions/open-prose/skills/prose/examples/01-hello-world.prose +4 -0
  2431. package/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +6 -0
  2432. package/extensions/open-prose/skills/prose/examples/03-code-review.prose +17 -0
  2433. package/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +14 -0
  2434. package/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +20 -0
  2435. package/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +17 -0
  2436. package/extensions/open-prose/skills/prose/examples/07-refactor.prose +20 -0
  2437. package/extensions/open-prose/skills/prose/examples/08-blog-post.prose +20 -0
  2438. package/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +25 -0
  2439. package/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +32 -0
  2440. package/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +27 -0
  2441. package/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +43 -0
  2442. package/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +51 -0
  2443. package/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +48 -0
  2444. package/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +23 -0
  2445. package/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +19 -0
  2446. package/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +19 -0
  2447. package/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +36 -0
  2448. package/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +71 -0
  2449. package/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +20 -0
  2450. package/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +35 -0
  2451. package/extensions/open-prose/skills/prose/examples/22-error-handling.prose +51 -0
  2452. package/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +63 -0
  2453. package/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +86 -0
  2454. package/extensions/open-prose/skills/prose/examples/25-conditionals.prose +114 -0
  2455. package/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +100 -0
  2456. package/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +105 -0
  2457. package/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +37 -0
  2458. package/extensions/open-prose/skills/prose/examples/28-gas-town.prose +1572 -0
  2459. package/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +218 -0
  2460. package/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +42 -0
  2461. package/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +145 -0
  2462. package/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +168 -0
  2463. package/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +204 -0
  2464. package/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +296 -0
  2465. package/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +237 -0
  2466. package/extensions/open-prose/skills/prose/examples/37-the-forge.prose +1474 -0
  2467. package/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +455 -0
  2468. package/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +277 -0
  2469. package/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +32 -0
  2470. package/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +38 -0
  2471. package/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +46 -0
  2472. package/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +50 -0
  2473. package/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +261 -0
  2474. package/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +159 -0
  2475. package/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +637 -0
  2476. package/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +148 -0
  2477. package/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +225 -0
  2478. package/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +356 -0
  2479. package/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +445 -0
  2480. package/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +210 -0
  2481. package/extensions/open-prose/skills/prose/examples/README.md +391 -0
  2482. package/extensions/open-prose/skills/prose/examples/roadmap/README.md +22 -0
  2483. package/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +20 -0
  2484. package/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +18 -0
  2485. package/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +17 -0
  2486. package/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +223 -0
  2487. package/extensions/open-prose/skills/prose/guidance/antipatterns.md +951 -0
  2488. package/extensions/open-prose/skills/prose/guidance/patterns.md +700 -0
  2489. package/extensions/open-prose/skills/prose/guidance/system-prompt.md +180 -0
  2490. package/extensions/open-prose/skills/prose/help.md +144 -0
  2491. package/extensions/open-prose/skills/prose/lib/README.md +108 -0
  2492. package/extensions/open-prose/skills/prose/lib/calibrator.prose +215 -0
  2493. package/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +174 -0
  2494. package/extensions/open-prose/skills/prose/lib/error-forensics.prose +250 -0
  2495. package/extensions/open-prose/skills/prose/lib/inspector.prose +196 -0
  2496. package/extensions/open-prose/skills/prose/lib/profiler.prose +460 -0
  2497. package/extensions/open-prose/skills/prose/lib/program-improver.prose +275 -0
  2498. package/extensions/open-prose/skills/prose/lib/project-memory.prose +118 -0
  2499. package/extensions/open-prose/skills/prose/lib/user-memory.prose +93 -0
  2500. package/extensions/open-prose/skills/prose/lib/vm-improver.prose +243 -0
  2501. package/extensions/open-prose/skills/prose/primitives/session.md +593 -0
  2502. package/extensions/open-prose/skills/prose/prose.md +1237 -0
  2503. package/extensions/open-prose/skills/prose/state/filesystem.md +498 -0
  2504. package/extensions/open-prose/skills/prose/state/in-context.md +384 -0
  2505. package/extensions/open-prose/skills/prose/state/postgres.md +880 -0
  2506. package/extensions/open-prose/skills/prose/state/sqlite.md +574 -0
  2507. package/extensions/qwen-portal-auth/README.md +24 -0
  2508. package/extensions/qwen-portal-auth/index.ts +130 -0
  2509. package/extensions/qwen-portal-auth/oauth.ts +190 -0
  2510. package/extensions/qwen-portal-auth/openclaw.plugin.json +9 -0
  2511. package/extensions/signal/index.ts +17 -0
  2512. package/extensions/signal/node_modules/.bin/openclaw +21 -0
  2513. package/extensions/signal/openclaw.plugin.json +9 -0
  2514. package/extensions/signal/package.json +14 -0
  2515. package/extensions/signal/src/channel.ts +315 -0
  2516. package/extensions/signal/src/runtime.ts +14 -0
  2517. package/extensions/slack/index.ts +17 -0
  2518. package/extensions/slack/node_modules/.bin/openclaw +21 -0
  2519. package/extensions/slack/openclaw.plugin.json +9 -0
  2520. package/extensions/slack/package.json +14 -0
  2521. package/extensions/slack/src/channel.ts +604 -0
  2522. package/extensions/slack/src/runtime.ts +14 -0
  2523. package/extensions/telegram/index.ts +17 -0
  2524. package/extensions/telegram/node_modules/.bin/openclaw +21 -0
  2525. package/extensions/telegram/openclaw.plugin.json +9 -0
  2526. package/extensions/telegram/package.json +14 -0
  2527. package/extensions/telegram/src/channel.ts +482 -0
  2528. package/extensions/telegram/src/runtime.ts +14 -0
  2529. package/extensions/tlon/README.md +5 -0
  2530. package/extensions/tlon/index.ts +17 -0
  2531. package/extensions/tlon/node_modules/.bin/openclaw +21 -0
  2532. package/extensions/tlon/openclaw.plugin.json +9 -0
  2533. package/extensions/tlon/package.json +33 -0
  2534. package/extensions/tlon/src/channel.ts +392 -0
  2535. package/extensions/tlon/src/config-schema.test.ts +31 -0
  2536. package/extensions/tlon/src/config-schema.ts +45 -0
  2537. package/extensions/tlon/src/monitor/discovery.ts +76 -0
  2538. package/extensions/tlon/src/monitor/history.ts +90 -0
  2539. package/extensions/tlon/src/monitor/index.ts +580 -0
  2540. package/extensions/tlon/src/monitor/processed-messages.test.ts +23 -0
  2541. package/extensions/tlon/src/monitor/processed-messages.ts +46 -0
  2542. package/extensions/tlon/src/monitor/utils.ts +106 -0
  2543. package/extensions/tlon/src/onboarding.ts +214 -0
  2544. package/extensions/tlon/src/runtime.ts +14 -0
  2545. package/extensions/tlon/src/targets.ts +89 -0
  2546. package/extensions/tlon/src/types.ts +92 -0
  2547. package/extensions/tlon/src/urbit/auth.ts +18 -0
  2548. package/extensions/tlon/src/urbit/http-api.ts +38 -0
  2549. package/extensions/tlon/src/urbit/send.test.ts +38 -0
  2550. package/extensions/tlon/src/urbit/send.ts +131 -0
  2551. package/extensions/tlon/src/urbit/sse-client.test.ts +40 -0
  2552. package/extensions/tlon/src/urbit/sse-client.ts +395 -0
  2553. package/extensions/twitch/CHANGELOG.md +69 -0
  2554. package/extensions/twitch/README.md +89 -0
  2555. package/extensions/twitch/index.ts +20 -0
  2556. package/extensions/twitch/node_modules/.bin/openclaw +21 -0
  2557. package/extensions/twitch/openclaw.plugin.json +9 -0
  2558. package/extensions/twitch/package.json +20 -0
  2559. package/extensions/twitch/src/access-control.test.ts +489 -0
  2560. package/extensions/twitch/src/access-control.ts +166 -0
  2561. package/extensions/twitch/src/actions.ts +173 -0
  2562. package/extensions/twitch/src/client-manager-registry.ts +115 -0
  2563. package/extensions/twitch/src/config-schema.ts +84 -0
  2564. package/extensions/twitch/src/config.test.ts +87 -0
  2565. package/extensions/twitch/src/config.ts +116 -0
  2566. package/extensions/twitch/src/monitor.ts +272 -0
  2567. package/extensions/twitch/src/onboarding.test.ts +311 -0
  2568. package/extensions/twitch/src/onboarding.ts +417 -0
  2569. package/extensions/twitch/src/outbound.test.ts +373 -0
  2570. package/extensions/twitch/src/outbound.ts +184 -0
  2571. package/extensions/twitch/src/plugin.test.ts +39 -0
  2572. package/extensions/twitch/src/plugin.ts +274 -0
  2573. package/extensions/twitch/src/probe.test.ts +195 -0
  2574. package/extensions/twitch/src/probe.ts +120 -0
  2575. package/extensions/twitch/src/resolver.ts +137 -0
  2576. package/extensions/twitch/src/runtime.ts +14 -0
  2577. package/extensions/twitch/src/send.test.ts +289 -0
  2578. package/extensions/twitch/src/send.ts +136 -0
  2579. package/extensions/twitch/src/status.test.ts +270 -0
  2580. package/extensions/twitch/src/status.ts +178 -0
  2581. package/extensions/twitch/src/token.test.ts +171 -0
  2582. package/extensions/twitch/src/token.ts +91 -0
  2583. package/extensions/twitch/src/twitch-client.test.ts +589 -0
  2584. package/extensions/twitch/src/twitch-client.ts +277 -0
  2585. package/extensions/twitch/src/types.ts +143 -0
  2586. package/extensions/twitch/src/utils/markdown.ts +98 -0
  2587. package/extensions/twitch/src/utils/twitch.ts +78 -0
  2588. package/extensions/twitch/test/setup.ts +7 -0
  2589. package/extensions/voice-call/CHANGELOG.md +133 -0
  2590. package/extensions/voice-call/README.md +139 -0
  2591. package/extensions/voice-call/index.ts +493 -0
  2592. package/extensions/voice-call/node_modules/.bin/openclaw +21 -0
  2593. package/extensions/voice-call/openclaw.plugin.json +559 -0
  2594. package/extensions/voice-call/package.json +19 -0
  2595. package/extensions/voice-call/src/allowlist.ts +19 -0
  2596. package/extensions/voice-call/src/cli.ts +279 -0
  2597. package/extensions/voice-call/src/config.test.ts +234 -0
  2598. package/extensions/voice-call/src/config.ts +523 -0
  2599. package/extensions/voice-call/src/core-bridge.ts +159 -0
  2600. package/extensions/voice-call/src/manager/context.ts +21 -0
  2601. package/extensions/voice-call/src/manager/events.ts +188 -0
  2602. package/extensions/voice-call/src/manager/lookup.ts +35 -0
  2603. package/extensions/voice-call/src/manager/outbound.ts +275 -0
  2604. package/extensions/voice-call/src/manager/state.ts +48 -0
  2605. package/extensions/voice-call/src/manager/store.ts +91 -0
  2606. package/extensions/voice-call/src/manager/timers.ts +89 -0
  2607. package/extensions/voice-call/src/manager/twiml.ts +9 -0
  2608. package/extensions/voice-call/src/manager.test.ts +224 -0
  2609. package/extensions/voice-call/src/manager.ts +887 -0
  2610. package/extensions/voice-call/src/media-stream.test.ts +96 -0
  2611. package/extensions/voice-call/src/media-stream.ts +411 -0
  2612. package/extensions/voice-call/src/providers/base.ts +67 -0
  2613. package/extensions/voice-call/src/providers/index.ts +10 -0
  2614. package/extensions/voice-call/src/providers/mock.ts +165 -0
  2615. package/extensions/voice-call/src/providers/plivo.test.ts +27 -0
  2616. package/extensions/voice-call/src/providers/plivo.ts +515 -0
  2617. package/extensions/voice-call/src/providers/stt-openai-realtime.ts +311 -0
  2618. package/extensions/voice-call/src/providers/telnyx.ts +371 -0
  2619. package/extensions/voice-call/src/providers/tts-openai.ts +259 -0
  2620. package/extensions/voice-call/src/providers/twilio/api.ts +42 -0
  2621. package/extensions/voice-call/src/providers/twilio/webhook.ts +32 -0
  2622. package/extensions/voice-call/src/providers/twilio.test.ts +60 -0
  2623. package/extensions/voice-call/src/providers/twilio.ts +626 -0
  2624. package/extensions/voice-call/src/response-generator.ts +158 -0
  2625. package/extensions/voice-call/src/runtime.ts +212 -0
  2626. package/extensions/voice-call/src/telephony-audio.ts +90 -0
  2627. package/extensions/voice-call/src/telephony-tts.ts +104 -0
  2628. package/extensions/voice-call/src/tunnel.ts +314 -0
  2629. package/extensions/voice-call/src/types.ts +272 -0
  2630. package/extensions/voice-call/src/utils.ts +14 -0
  2631. package/extensions/voice-call/src/voice-mapping.ts +67 -0
  2632. package/extensions/voice-call/src/webhook-security.test.ts +377 -0
  2633. package/extensions/voice-call/src/webhook-security.ts +689 -0
  2634. package/extensions/voice-call/src/webhook.ts +516 -0
  2635. package/extensions/whatsapp/index.ts +17 -0
  2636. package/extensions/whatsapp/node_modules/.bin/openclaw +21 -0
  2637. package/extensions/whatsapp/openclaw.plugin.json +9 -0
  2638. package/extensions/whatsapp/package.json +14 -0
  2639. package/extensions/whatsapp/src/channel.ts +508 -0
  2640. package/extensions/whatsapp/src/runtime.ts +14 -0
  2641. package/extensions/zalo/CHANGELOG.md +113 -0
  2642. package/extensions/zalo/README.md +50 -0
  2643. package/extensions/zalo/index.ts +19 -0
  2644. package/extensions/zalo/node_modules/.bin/openclaw +21 -0
  2645. package/extensions/zalo/openclaw.plugin.json +9 -0
  2646. package/extensions/zalo/package.json +36 -0
  2647. package/extensions/zalo/src/accounts.ts +80 -0
  2648. package/extensions/zalo/src/actions.ts +67 -0
  2649. package/extensions/zalo/src/api.ts +208 -0
  2650. package/extensions/zalo/src/channel.directory.test.ts +43 -0
  2651. package/extensions/zalo/src/channel.ts +414 -0
  2652. package/extensions/zalo/src/config-schema.ts +25 -0
  2653. package/extensions/zalo/src/monitor.ts +764 -0
  2654. package/extensions/zalo/src/monitor.webhook.test.ts +73 -0
  2655. package/extensions/zalo/src/onboarding.ts +401 -0
  2656. package/extensions/zalo/src/probe.ts +46 -0
  2657. package/extensions/zalo/src/proxy.ts +21 -0
  2658. package/extensions/zalo/src/runtime.ts +14 -0
  2659. package/extensions/zalo/src/send.ts +124 -0
  2660. package/extensions/zalo/src/status-issues.ts +53 -0
  2661. package/extensions/zalo/src/token.ts +63 -0
  2662. package/extensions/zalo/src/types.ts +44 -0
  2663. package/extensions/zalouser/CHANGELOG.md +85 -0
  2664. package/extensions/zalouser/README.md +225 -0
  2665. package/extensions/zalouser/index.ts +31 -0
  2666. package/extensions/zalouser/node_modules/.bin/openclaw +21 -0
  2667. package/extensions/zalouser/openclaw.plugin.json +9 -0
  2668. package/extensions/zalouser/package.json +36 -0
  2669. package/extensions/zalouser/src/accounts.ts +135 -0
  2670. package/extensions/zalouser/src/channel.test.ts +18 -0
  2671. package/extensions/zalouser/src/channel.ts +686 -0
  2672. package/extensions/zalouser/src/config-schema.ts +28 -0
  2673. package/extensions/zalouser/src/monitor.ts +601 -0
  2674. package/extensions/zalouser/src/onboarding.ts +504 -0
  2675. package/extensions/zalouser/src/probe.ts +28 -0
  2676. package/extensions/zalouser/src/runtime.ts +14 -0
  2677. package/extensions/zalouser/src/send.ts +160 -0
  2678. package/extensions/zalouser/src/status-issues.test.ts +57 -0
  2679. package/extensions/zalouser/src/status-issues.ts +89 -0
  2680. package/extensions/zalouser/src/tool.ts +164 -0
  2681. package/extensions/zalouser/src/types.ts +110 -0
  2682. package/extensions/zalouser/src/zca.ts +202 -0
  2683. package/openclaw.mjs +33 -0
  2684. package/package.json +234 -0
  2685. package/skills/1password/SKILL.md +70 -0
  2686. package/skills/1password/references/cli-examples.md +29 -0
  2687. package/skills/1password/references/get-started.md +17 -0
  2688. package/skills/apple-notes/SKILL.md +77 -0
  2689. package/skills/apple-reminders/SKILL.md +96 -0
  2690. package/skills/bear-notes/SKILL.md +107 -0
  2691. package/skills/blogwatcher/SKILL.md +69 -0
  2692. package/skills/blucli/SKILL.md +47 -0
  2693. package/skills/bluebubbles/SKILL.md +131 -0
  2694. package/skills/camsnap/SKILL.md +45 -0
  2695. package/skills/canvas/SKILL.md +198 -0
  2696. package/skills/clawhub/SKILL.md +77 -0
  2697. package/skills/coding-agent/SKILL.md +284 -0
  2698. package/skills/discord/SKILL.md +578 -0
  2699. package/skills/eightctl/SKILL.md +50 -0
  2700. package/skills/food-order/SKILL.md +48 -0
  2701. package/skills/gemini/SKILL.md +43 -0
  2702. package/skills/gifgrep/SKILL.md +79 -0
  2703. package/skills/github/SKILL.md +77 -0
  2704. package/skills/gog/SKILL.md +116 -0
  2705. package/skills/goplaces/SKILL.md +52 -0
  2706. package/skills/healthcheck/SKILL.md +245 -0
  2707. package/skills/himalaya/SKILL.md +257 -0
  2708. package/skills/himalaya/references/configuration.md +184 -0
  2709. package/skills/himalaya/references/message-composition.md +199 -0
  2710. package/skills/imsg/SKILL.md +74 -0
  2711. package/skills/local-places/SERVER_README.md +101 -0
  2712. package/skills/local-places/SKILL.md +102 -0
  2713. package/skills/local-places/pyproject.toml +21 -0
  2714. package/skills/local-places/src/local_places/__init__.py +2 -0
  2715. package/skills/local-places/src/local_places/google_places.py +314 -0
  2716. package/skills/local-places/src/local_places/main.py +65 -0
  2717. package/skills/local-places/src/local_places/schemas.py +107 -0
  2718. package/skills/mcporter/SKILL.md +61 -0
  2719. package/skills/model-usage/SKILL.md +69 -0
  2720. package/skills/model-usage/references/codexbar-cli.md +33 -0
  2721. package/skills/model-usage/scripts/model_usage.py +310 -0
  2722. package/skills/nano-banana-pro/SKILL.md +58 -0
  2723. package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
  2724. package/skills/nano-pdf/SKILL.md +38 -0
  2725. package/skills/notion/SKILL.md +172 -0
  2726. package/skills/obsidian/SKILL.md +81 -0
  2727. package/skills/openai-image-gen/SKILL.md +89 -0
  2728. package/skills/openai-image-gen/scripts/gen.py +240 -0
  2729. package/skills/openai-whisper/SKILL.md +38 -0
  2730. package/skills/openai-whisper-api/SKILL.md +52 -0
  2731. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  2732. package/skills/openhue/SKILL.md +51 -0
  2733. package/skills/oracle/SKILL.md +125 -0
  2734. package/skills/ordercli/SKILL.md +78 -0
  2735. package/skills/peekaboo/SKILL.md +190 -0
  2736. package/skills/sag/SKILL.md +87 -0
  2737. package/skills/session-logs/SKILL.md +115 -0
  2738. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  2739. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  2740. package/skills/skill-creator/SKILL.md +370 -0
  2741. package/skills/skill-creator/license.txt +202 -0
  2742. package/skills/skill-creator/scripts/init_skill.py +378 -0
  2743. package/skills/skill-creator/scripts/package_skill.py +111 -0
  2744. package/skills/skill-creator/scripts/quick_validate.py +101 -0
  2745. package/skills/slack/SKILL.md +144 -0
  2746. package/skills/songsee/SKILL.md +49 -0
  2747. package/skills/sonoscli/SKILL.md +46 -0
  2748. package/skills/spotify-player/SKILL.md +64 -0
  2749. package/skills/summarize/SKILL.md +87 -0
  2750. package/skills/things-mac/SKILL.md +86 -0
  2751. package/skills/tmux/SKILL.md +135 -0
  2752. package/skills/tmux/scripts/find-sessions.sh +112 -0
  2753. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  2754. package/skills/trello/SKILL.md +95 -0
  2755. package/skills/video-frames/SKILL.md +46 -0
  2756. package/skills/video-frames/scripts/frame.sh +81 -0
  2757. package/skills/voice-call/SKILL.md +45 -0
  2758. package/skills/wacli/SKILL.md +72 -0
  2759. package/skills/weather/SKILL.md +54 -0
@@ -0,0 +1,3269 @@
1
+ import { At as randomToken, Bn as getMemorySearchManager, Dr as peekSystemEvents, Dt as openUrl, Et as normalizeGatewayTokenInput, K as readRestartSentinel, Lt as normalizeControlUiBasePath, Nt as summarizeExistingConfig, Ot as printWizardHeader, Pt as waitForGatewayReachable, St as formatControlUiSshHint, _t as DEFAULT_WORKSPACE, br as lookupContextTokens, bt as detectBrowserOpenSupport, d as sha256HexPrefix, dt as formatUsageReportLines, jt as resolveControlUiLinks, kt as probeGatewayReachable, m as listAgentsForGateway, q as summarizeRestartSentinel, ut as loadProviderUsageSummary, vt as applyWizardMetadata, wt as handleReset, xt as ensureWorkspaceAndSessions, zt as getRemoteSkillEligibility } from "./reply-Nagr9G73.js";
2
+ import { n as DEFAULT_GATEWAY_PORT, u as resolveGatewayPort } from "./paths-scjhy7N2.js";
3
+ import { l as normalizeAgentId, v as parseAgentSessionKey } from "./session-key-ezJ78bLC.js";
4
+ import { D as info, L as isRich, R as theme, c as defaultRuntime, l as restoreTerminalState } from "./subsystem-CAq3uyo7.js";
5
+ import { h as resolveUserPath, v as sleep } from "./utils-CKSrBNwq.js";
6
+ import { n as runExec } from "./exec-HEWTMJ7j.js";
7
+ import { t as resolveOpenClawPackageRoot } from "./openclaw-root-Cvotktkd.js";
8
+ import { c as resolveDefaultAgentId, h as DEFAULT_IDENTITY_FILENAME, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir } from "./agent-scope-sKVRNONG.js";
9
+ import { Ct as DEFAULT_PROVIDER, St as DEFAULT_MODEL, d as resolveConfiguredModelRef, ft as ensureAuthProfileStore, xt as DEFAULT_CONTEXT_TOKENS } from "./model-selection-CjiXwYEH.js";
10
+ import { r as resolveCliName, t as formatCliCommand } from "./command-format-ChfKqObn.js";
11
+ import { c as writeConfigFile, i as loadConfig, j as VERSION, o as readConfigFileSnapshot } from "./config-BEUgkMYH.js";
12
+ import { n as listChannelPlugins } from "./plugins-DrjfSaQw.js";
13
+ import { L as resolveMainSessionKey, d as loadSessionStore } from "./sandbox-BwaFbMul.js";
14
+ import { d as inspectPortUsage, f as resolveLsofCommandSync, p as formatPortDiagnostics } from "./chrome-BNSd7Bie.js";
15
+ import { o as resolveStorePath } from "./paths-CR6bsrfc.js";
16
+ import { t as buildChannelSummary } from "./channel-summary-CFZImIiG.js";
17
+ import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-YdaudqMl.js";
18
+ import { n as withProgress } from "./progress-xpLtQsNY.js";
19
+ import { a as findTailscaleBinary, o as getTailnetHostname, s as readTailscaleStatusJson } from "./tailscale-BVGD9gSD.js";
20
+ import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-C648Lhju.js";
21
+ import { t as resolveChannelDefaultAccountId } from "./helpers-CSZtxHTa.js";
22
+ import { n as logConfigUpdated } from "./logging-TXWhN8jG.js";
23
+ import { t as WizardCancelledError } from "./prompts-FbZThK8w.js";
24
+ import { c as promptDefaultModel, d as warnIfModelConfigLooksOff, f as applyAuthChoice, g as promptAuthChoiceGrouped, r as promptRemoteGatewayConfig, s as applyPrimaryModel, t as setupSkills, u as resolvePreferredProviderForAuthChoice } from "./onboard-skills-aY4SkANg.js";
25
+ import { n as setupChannels } from "./onboard-channels-CKzF9fxT.js";
26
+ import { l as healthCommand, n as ensureControlUiAssetsBuilt, s as formatHealthChannelLines, t as formatHealthCheckFailure, u as resolveHeartbeatSummaryForAgent } from "./health-format-DIJjpCDL.js";
27
+ import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, d as formatUpdateOneLiner, f as getUpdateCheckResult, h as compareSemverStrings, l as ensureCompletionCacheExists, m as checkUpdateStatus, p as resolveUpdateAvailability, s as checkShellCompletionStatus, u as formatUpdateAvailableHint, x as formatUpdateChannelLabel } from "./update-runner-DQwdSxkJ.js";
28
+ import { i as probeGateway, t as runSecurityAudit } from "./audit-B2D3VRh8.js";
29
+ import { t as renderTable } from "./table-CM9lV0GA.js";
30
+ import { t as buildWorkspaceSkillStatus } from "./skills-status-DPwsDMVS.js";
31
+ import { o as resolveGatewayLogPaths, t as resolveGatewayService } from "./service-DMUKaGTV.js";
32
+ import { r as isSystemdUserServiceAvailable } from "./systemd-D5s01yMo.js";
33
+ import { o as readLastGatewayErrorLine } from "./service-audit-GvE18NCt.js";
34
+ import { t as resolveNodeService } from "./node-service-BTKxbzYo.js";
35
+ import { t as collectChannelStatusIssues } from "./channels-status-issues-ptsVdM7G.js";
36
+ import { i as redactSecrets, n as formatDuration$1, r as formatGatewayAuthUsed, t as formatAge$1 } from "./format-8citvr_1.js";
37
+ import { r as installCompletion } from "./completion-cli-C5BH1XDk.js";
38
+ import { t as buildWorkspaceHookStatus } from "./hooks-status-BvbcN-ho.js";
39
+ import { t as runTui } from "./tui-DhzN4YmH.js";
40
+ import os from "node:os";
41
+ import path from "node:path";
42
+ import fs from "node:fs";
43
+ import fs$1 from "node:fs/promises";
44
+ import { execFileSync, spawnSync } from "node:child_process";
45
+
46
+ //#region src/cli/ports.ts
47
+ function parseLsofOutput(output) {
48
+ const lines = output.split(/\r?\n/).filter(Boolean);
49
+ const results = [];
50
+ let current = {};
51
+ for (const line of lines) if (line.startsWith("p")) {
52
+ if (current.pid) results.push(current);
53
+ current = { pid: Number.parseInt(line.slice(1), 10) };
54
+ } else if (line.startsWith("c")) current.command = line.slice(1);
55
+ if (current.pid) results.push(current);
56
+ return results;
57
+ }
58
+ function listPortListeners(port) {
59
+ try {
60
+ return parseLsofOutput(execFileSync(resolveLsofCommandSync(), [
61
+ "-nP",
62
+ `-iTCP:${port}`,
63
+ "-sTCP:LISTEN",
64
+ "-FpFc"
65
+ ], { encoding: "utf-8" }));
66
+ } catch (err) {
67
+ const status = err.status;
68
+ if (err.code === "ENOENT") throw new Error("lsof not found; required for --force", { cause: err });
69
+ if (status === 1) return [];
70
+ throw err instanceof Error ? err : new Error(String(err));
71
+ }
72
+ }
73
+ function forceFreePort(port) {
74
+ const listeners = listPortListeners(port);
75
+ for (const proc of listeners) try {
76
+ process.kill(proc.pid, "SIGTERM");
77
+ } catch (err) {
78
+ throw new Error(`failed to kill pid ${proc.pid}${proc.command ? ` (${proc.command})` : ""}: ${String(err)}`, { cause: err });
79
+ }
80
+ return listeners;
81
+ }
82
+ function killPids(listeners, signal) {
83
+ for (const proc of listeners) try {
84
+ process.kill(proc.pid, signal);
85
+ } catch (err) {
86
+ throw new Error(`failed to kill pid ${proc.pid}${proc.command ? ` (${proc.command})` : ""}: ${String(err)}`, { cause: err });
87
+ }
88
+ }
89
+ async function forceFreePortAndWait(port, opts = {}) {
90
+ const timeoutMs = Math.max(opts.timeoutMs ?? 1500, 0);
91
+ const intervalMs = Math.max(opts.intervalMs ?? 100, 1);
92
+ const sigtermTimeoutMs = Math.min(Math.max(opts.sigtermTimeoutMs ?? 600, 0), timeoutMs);
93
+ const killed = forceFreePort(port);
94
+ if (killed.length === 0) return {
95
+ killed,
96
+ waitedMs: 0,
97
+ escalatedToSigkill: false
98
+ };
99
+ let waitedMs = 0;
100
+ const triesSigterm = intervalMs > 0 ? Math.ceil(sigtermTimeoutMs / intervalMs) : 0;
101
+ for (let i = 0; i < triesSigterm; i++) {
102
+ if (listPortListeners(port).length === 0) return {
103
+ killed,
104
+ waitedMs,
105
+ escalatedToSigkill: false
106
+ };
107
+ await sleep(intervalMs);
108
+ waitedMs += intervalMs;
109
+ }
110
+ if (listPortListeners(port).length === 0) return {
111
+ killed,
112
+ waitedMs,
113
+ escalatedToSigkill: false
114
+ };
115
+ killPids(listPortListeners(port), "SIGKILL");
116
+ const remainingBudget = Math.max(timeoutMs - waitedMs, 0);
117
+ const triesSigkill = intervalMs > 0 ? Math.ceil(remainingBudget / intervalMs) : 0;
118
+ for (let i = 0; i < triesSigkill; i++) {
119
+ if (listPortListeners(port).length === 0) return {
120
+ killed,
121
+ waitedMs,
122
+ escalatedToSigkill: true
123
+ };
124
+ await sleep(intervalMs);
125
+ waitedMs += intervalMs;
126
+ }
127
+ const still = listPortListeners(port);
128
+ if (still.length === 0) return {
129
+ killed,
130
+ waitedMs,
131
+ escalatedToSigkill: true
132
+ };
133
+ throw new Error(`port ${port} still has listeners after --force: ${still.map((p) => p.pid).join(", ")}`);
134
+ }
135
+
136
+ //#endregion
137
+ //#region src/agents/identity-file.ts
138
+ const IDENTITY_PLACEHOLDER_VALUES = new Set([
139
+ "pick something you like",
140
+ "ai? robot? familiar? ghost in the machine? something weirder?",
141
+ "how do you come across? sharp? warm? chaotic? calm?",
142
+ "your signature - pick one that feels right",
143
+ "workspace-relative path, http(s) url, or data uri"
144
+ ]);
145
+ function normalizeIdentityValue(value) {
146
+ let normalized = value.trim();
147
+ normalized = normalized.replace(/^[*_]+|[*_]+$/g, "").trim();
148
+ if (normalized.startsWith("(") && normalized.endsWith(")")) normalized = normalized.slice(1, -1).trim();
149
+ normalized = normalized.replace(/[\u2013\u2014]/g, "-");
150
+ normalized = normalized.replace(/\s+/g, " ").toLowerCase();
151
+ return normalized;
152
+ }
153
+ function isIdentityPlaceholder(value) {
154
+ const normalized = normalizeIdentityValue(value);
155
+ return IDENTITY_PLACEHOLDER_VALUES.has(normalized);
156
+ }
157
+ function parseIdentityMarkdown(content) {
158
+ const identity = {};
159
+ const lines = content.split(/\r?\n/);
160
+ for (const line of lines) {
161
+ const cleaned = line.trim().replace(/^\s*-\s*/, "");
162
+ const colonIndex = cleaned.indexOf(":");
163
+ if (colonIndex === -1) continue;
164
+ const label = cleaned.slice(0, colonIndex).replace(/[*_]/g, "").trim().toLowerCase();
165
+ const value = cleaned.slice(colonIndex + 1).replace(/^[*_]+|[*_]+$/g, "").trim();
166
+ if (!value) continue;
167
+ if (isIdentityPlaceholder(value)) continue;
168
+ if (label === "name") identity.name = value;
169
+ if (label === "emoji") identity.emoji = value;
170
+ if (label === "creature") identity.creature = value;
171
+ if (label === "vibe") identity.vibe = value;
172
+ if (label === "theme") identity.theme = value;
173
+ if (label === "avatar") identity.avatar = value;
174
+ }
175
+ return identity;
176
+ }
177
+ function identityHasValues(identity) {
178
+ return Boolean(identity.name || identity.emoji || identity.theme || identity.creature || identity.vibe || identity.avatar);
179
+ }
180
+ function loadIdentityFromFile(identityPath) {
181
+ try {
182
+ const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
183
+ if (!identityHasValues(parsed)) return null;
184
+ return parsed;
185
+ } catch {
186
+ return null;
187
+ }
188
+ }
189
+ function loadAgentIdentityFromWorkspace(workspace) {
190
+ return loadIdentityFromFile(path.join(workspace, DEFAULT_IDENTITY_FILENAME));
191
+ }
192
+
193
+ //#endregion
194
+ //#region src/commands/agents.config.ts
195
+ function listAgentEntries(cfg) {
196
+ const list = cfg.agents?.list;
197
+ if (!Array.isArray(list)) return [];
198
+ return list.filter((entry) => Boolean(entry && typeof entry === "object"));
199
+ }
200
+ function findAgentEntryIndex(list, agentId) {
201
+ const id = normalizeAgentId(agentId);
202
+ return list.findIndex((entry) => normalizeAgentId(entry.id) === id);
203
+ }
204
+ function resolveAgentName(cfg, agentId) {
205
+ return listAgentEntries(cfg).find((agent) => normalizeAgentId(agent.id) === normalizeAgentId(agentId))?.name?.trim() || void 0;
206
+ }
207
+ function resolveAgentModel(cfg, agentId) {
208
+ const entry = listAgentEntries(cfg).find((agent) => normalizeAgentId(agent.id) === normalizeAgentId(agentId));
209
+ if (entry?.model) {
210
+ if (typeof entry.model === "string" && entry.model.trim()) return entry.model.trim();
211
+ if (typeof entry.model === "object") {
212
+ const primary = entry.model.primary?.trim();
213
+ if (primary) return primary;
214
+ }
215
+ }
216
+ const raw = cfg.agents?.defaults?.model;
217
+ if (typeof raw === "string") return raw;
218
+ return raw?.primary?.trim() || void 0;
219
+ }
220
+ function loadAgentIdentity(workspace) {
221
+ const parsed = loadAgentIdentityFromWorkspace(workspace);
222
+ if (!parsed) return null;
223
+ return identityHasValues(parsed) ? parsed : null;
224
+ }
225
+ function buildAgentSummaries(cfg) {
226
+ const defaultAgentId = normalizeAgentId(resolveDefaultAgentId(cfg));
227
+ const configuredAgents = listAgentEntries(cfg);
228
+ const orderedIds = configuredAgents.length > 0 ? configuredAgents.map((agent) => normalizeAgentId(agent.id)) : [defaultAgentId];
229
+ const bindingCounts = /* @__PURE__ */ new Map();
230
+ for (const binding of cfg.bindings ?? []) {
231
+ const agentId = normalizeAgentId(binding.agentId);
232
+ bindingCounts.set(agentId, (bindingCounts.get(agentId) ?? 0) + 1);
233
+ }
234
+ return orderedIds.filter((id, index) => orderedIds.indexOf(id) === index).map((id) => {
235
+ const workspace = resolveAgentWorkspaceDir(cfg, id);
236
+ const identity = loadAgentIdentity(workspace);
237
+ const configIdentity = configuredAgents.find((agent) => normalizeAgentId(agent.id) === id)?.identity;
238
+ const identityName = identity?.name ?? configIdentity?.name?.trim();
239
+ const identityEmoji = identity?.emoji ?? configIdentity?.emoji?.trim();
240
+ const identitySource = identity ? "identity" : configIdentity && (identityName || identityEmoji) ? "config" : void 0;
241
+ return {
242
+ id,
243
+ name: resolveAgentName(cfg, id),
244
+ identityName,
245
+ identityEmoji,
246
+ identitySource,
247
+ workspace,
248
+ agentDir: resolveAgentDir(cfg, id),
249
+ model: resolveAgentModel(cfg, id),
250
+ bindings: bindingCounts.get(id) ?? 0,
251
+ isDefault: id === defaultAgentId
252
+ };
253
+ });
254
+ }
255
+ function applyAgentConfig(cfg, params) {
256
+ const agentId = normalizeAgentId(params.agentId);
257
+ const name = params.name?.trim();
258
+ const list = listAgentEntries(cfg);
259
+ const index = findAgentEntryIndex(list, agentId);
260
+ const nextEntry = {
261
+ ...index >= 0 ? list[index] : { id: agentId },
262
+ ...name ? { name } : {},
263
+ ...params.workspace ? { workspace: params.workspace } : {},
264
+ ...params.agentDir ? { agentDir: params.agentDir } : {},
265
+ ...params.model ? { model: params.model } : {}
266
+ };
267
+ const nextList = [...list];
268
+ if (index >= 0) nextList[index] = nextEntry;
269
+ else {
270
+ if (nextList.length === 0 && agentId !== normalizeAgentId(resolveDefaultAgentId(cfg))) nextList.push({ id: resolveDefaultAgentId(cfg) });
271
+ nextList.push(nextEntry);
272
+ }
273
+ return {
274
+ ...cfg,
275
+ agents: {
276
+ ...cfg.agents,
277
+ list: nextList
278
+ }
279
+ };
280
+ }
281
+ function pruneAgentConfig(cfg, agentId) {
282
+ const id = normalizeAgentId(agentId);
283
+ const nextAgentsList = listAgentEntries(cfg).filter((entry) => normalizeAgentId(entry.id) !== id);
284
+ const nextAgents = nextAgentsList.length > 0 ? nextAgentsList : void 0;
285
+ const bindings = cfg.bindings ?? [];
286
+ const filteredBindings = bindings.filter((binding) => normalizeAgentId(binding.agentId) !== id);
287
+ const allow = cfg.tools?.agentToAgent?.allow ?? [];
288
+ const filteredAllow = allow.filter((entry) => entry !== id);
289
+ const nextAgentsConfig = cfg.agents ? {
290
+ ...cfg.agents,
291
+ list: nextAgents
292
+ } : nextAgents ? { list: nextAgents } : void 0;
293
+ const nextTools = cfg.tools?.agentToAgent ? {
294
+ ...cfg.tools,
295
+ agentToAgent: {
296
+ ...cfg.tools.agentToAgent,
297
+ allow: filteredAllow.length > 0 ? filteredAllow : void 0
298
+ }
299
+ } : cfg.tools;
300
+ return {
301
+ config: {
302
+ ...cfg,
303
+ agents: nextAgentsConfig,
304
+ bindings: filteredBindings.length > 0 ? filteredBindings : void 0,
305
+ tools: nextTools
306
+ },
307
+ removedBindings: bindings.length - filteredBindings.length,
308
+ removedAllow: allow.length - filteredAllow.length
309
+ };
310
+ }
311
+
312
+ //#endregion
313
+ //#region src/memory/status-format.ts
314
+ function resolveMemoryVectorState(vector) {
315
+ if (!vector.enabled) return {
316
+ tone: "muted",
317
+ state: "disabled"
318
+ };
319
+ if (vector.available === true) return {
320
+ tone: "ok",
321
+ state: "ready"
322
+ };
323
+ if (vector.available === false) return {
324
+ tone: "warn",
325
+ state: "unavailable"
326
+ };
327
+ return {
328
+ tone: "muted",
329
+ state: "unknown"
330
+ };
331
+ }
332
+ function resolveMemoryFtsState(fts) {
333
+ if (!fts.enabled) return {
334
+ tone: "muted",
335
+ state: "disabled"
336
+ };
337
+ return fts.available ? {
338
+ tone: "ok",
339
+ state: "ready"
340
+ } : {
341
+ tone: "warn",
342
+ state: "unavailable"
343
+ };
344
+ }
345
+ function resolveMemoryCacheSummary(cache) {
346
+ if (!cache.enabled) return {
347
+ tone: "muted",
348
+ text: "cache off"
349
+ };
350
+ return {
351
+ tone: "ok",
352
+ text: `cache on${typeof cache.entries === "number" ? ` (${cache.entries})` : ""}`
353
+ };
354
+ }
355
+
356
+ //#endregion
357
+ //#region src/infra/os-summary.ts
358
+ function safeTrim(value) {
359
+ return typeof value === "string" ? value.trim() : "";
360
+ }
361
+ function macosVersion() {
362
+ return safeTrim(spawnSync("sw_vers", ["-productVersion"], { encoding: "utf-8" }).stdout) || os.release();
363
+ }
364
+ function resolveOsSummary() {
365
+ const platform = os.platform();
366
+ const release = os.release();
367
+ const arch = os.arch();
368
+ return {
369
+ platform,
370
+ arch,
371
+ release,
372
+ label: (() => {
373
+ if (platform === "darwin") return `macos ${macosVersion()} (${arch})`;
374
+ if (platform === "win32") return `windows ${release} (${arch})`;
375
+ return `${platform} ${release} (${arch})`;
376
+ })()
377
+ };
378
+ }
379
+
380
+ //#endregion
381
+ //#region src/commands/status-all/agents.ts
382
+ async function fileExists$1(p) {
383
+ try {
384
+ await fs$1.access(p);
385
+ return true;
386
+ } catch {
387
+ return false;
388
+ }
389
+ }
390
+ async function getAgentLocalStatuses$1(cfg) {
391
+ const agentList = listAgentsForGateway(cfg);
392
+ const now = Date.now();
393
+ const agents = await Promise.all(agentList.agents.map(async (agent) => {
394
+ const workspaceDir = (() => {
395
+ try {
396
+ return resolveAgentWorkspaceDir(cfg, agent.id);
397
+ } catch {
398
+ return null;
399
+ }
400
+ })();
401
+ const bootstrapPending = workspaceDir != null ? await fileExists$1(path.join(workspaceDir, "BOOTSTRAP.md")) : null;
402
+ const sessionsPath = resolveStorePath(cfg.session?.store, { agentId: agent.id });
403
+ const store = (() => {
404
+ try {
405
+ return loadSessionStore(sessionsPath);
406
+ } catch {
407
+ return {};
408
+ }
409
+ })();
410
+ const updatedAt = Object.values(store).reduce((max, entry) => Math.max(max, entry?.updatedAt ?? 0), 0);
411
+ const lastUpdatedAt = updatedAt > 0 ? updatedAt : null;
412
+ const lastActiveAgeMs = lastUpdatedAt ? now - lastUpdatedAt : null;
413
+ const sessionsCount = Object.keys(store).filter((k) => k !== "global" && k !== "unknown").length;
414
+ return {
415
+ id: agent.id,
416
+ name: agent.name,
417
+ workspaceDir,
418
+ bootstrapPending,
419
+ sessionsPath,
420
+ sessionsCount,
421
+ lastUpdatedAt,
422
+ lastActiveAgeMs
423
+ };
424
+ }));
425
+ const totalSessions = agents.reduce((sum, a) => sum + a.sessionsCount, 0);
426
+ const bootstrapPendingCount = agents.reduce((sum, a) => sum + (a.bootstrapPending ? 1 : 0), 0);
427
+ return {
428
+ defaultId: agentList.defaultId,
429
+ agents,
430
+ totalSessions,
431
+ bootstrapPendingCount
432
+ };
433
+ }
434
+
435
+ //#endregion
436
+ //#region src/commands/status-all/channels.ts
437
+ const asRecord = (value) => value && typeof value === "object" ? value : {};
438
+ function summarizeSources(sources) {
439
+ const counts = /* @__PURE__ */ new Map();
440
+ for (const s of sources) {
441
+ const key = s?.trim() ? s.trim() : "unknown";
442
+ counts.set(key, (counts.get(key) ?? 0) + 1);
443
+ }
444
+ const parts = [...counts.entries()].toSorted((a, b) => b[1] - a[1]).map(([key, n]) => `${key}${n > 1 ? `×${n}` : ""}`);
445
+ return {
446
+ label: parts.length > 0 ? parts.join("+") : "unknown",
447
+ parts
448
+ };
449
+ }
450
+ function existsSyncMaybe(p) {
451
+ const path = p?.trim() || "";
452
+ if (!path) return null;
453
+ try {
454
+ return fs.existsSync(path);
455
+ } catch {
456
+ return null;
457
+ }
458
+ }
459
+ function formatTokenHint(token, opts) {
460
+ const t = token.trim();
461
+ if (!t) return "empty";
462
+ if (!opts.showSecrets) return `sha256:${sha256HexPrefix(t, 8)} · len ${t.length}`;
463
+ const head = t.slice(0, 4);
464
+ const tail = t.slice(-4);
465
+ if (t.length <= 10) return `${t} · len ${t.length}`;
466
+ return `${head}…${tail} · len ${t.length}`;
467
+ }
468
+ const formatAccountLabel = (params) => {
469
+ const base = params.accountId || "default";
470
+ if (params.name?.trim()) return `${base} (${params.name.trim()})`;
471
+ return base;
472
+ };
473
+ const resolveAccountEnabled = (plugin, account, cfg) => {
474
+ if (plugin.config.isEnabled) return plugin.config.isEnabled(account, cfg);
475
+ return asRecord(account).enabled !== false;
476
+ };
477
+ const resolveAccountConfigured = async (plugin, account, cfg) => {
478
+ if (plugin.config.isConfigured) return await plugin.config.isConfigured(account, cfg);
479
+ return asRecord(account).configured !== false;
480
+ };
481
+ const buildAccountSnapshot = (params) => {
482
+ const described = params.plugin.config.describeAccount?.(params.account, params.cfg);
483
+ return {
484
+ enabled: params.enabled,
485
+ configured: params.configured,
486
+ ...described,
487
+ accountId: params.accountId
488
+ };
489
+ };
490
+ const formatAllowFrom = (params) => {
491
+ if (params.plugin.config.formatAllowFrom) return params.plugin.config.formatAllowFrom({
492
+ cfg: params.cfg,
493
+ accountId: params.accountId,
494
+ allowFrom: params.allowFrom
495
+ });
496
+ return params.allowFrom.map((entry) => String(entry).trim()).filter(Boolean);
497
+ };
498
+ const buildAccountNotes = (params) => {
499
+ const { plugin, cfg, entry } = params;
500
+ const notes = [];
501
+ const snapshot = entry.snapshot;
502
+ if (snapshot.enabled === false) notes.push("disabled");
503
+ if (snapshot.dmPolicy) notes.push(`dm:${snapshot.dmPolicy}`);
504
+ if (snapshot.tokenSource && snapshot.tokenSource !== "none") notes.push(`token:${snapshot.tokenSource}`);
505
+ if (snapshot.botTokenSource && snapshot.botTokenSource !== "none") notes.push(`bot:${snapshot.botTokenSource}`);
506
+ if (snapshot.appTokenSource && snapshot.appTokenSource !== "none") notes.push(`app:${snapshot.appTokenSource}`);
507
+ if (snapshot.baseUrl) notes.push(snapshot.baseUrl);
508
+ if (snapshot.port != null) notes.push(`port:${snapshot.port}`);
509
+ if (snapshot.cliPath) notes.push(`cli:${snapshot.cliPath}`);
510
+ if (snapshot.dbPath) notes.push(`db:${snapshot.dbPath}`);
511
+ const allowFrom = plugin.config.resolveAllowFrom?.({
512
+ cfg,
513
+ accountId: snapshot.accountId
514
+ }) ?? snapshot.allowFrom;
515
+ if (allowFrom?.length) {
516
+ const formatted = formatAllowFrom({
517
+ plugin,
518
+ cfg,
519
+ accountId: snapshot.accountId,
520
+ allowFrom
521
+ }).slice(0, 3);
522
+ if (formatted.length > 0) notes.push(`allow:${formatted.join(",")}`);
523
+ }
524
+ return notes;
525
+ };
526
+ function resolveLinkFields(summary) {
527
+ const rec = asRecord(summary);
528
+ const linked = typeof rec.linked === "boolean" ? rec.linked : null;
529
+ const authAgeMs = typeof rec.authAgeMs === "number" ? rec.authAgeMs : null;
530
+ const self = asRecord(rec.self);
531
+ return {
532
+ linked,
533
+ authAgeMs,
534
+ selfE164: typeof self.e164 === "string" && self.e164.trim() ? self.e164.trim() : null
535
+ };
536
+ }
537
+ function collectMissingPaths(accounts) {
538
+ const missing = [];
539
+ for (const entry of accounts) {
540
+ const accountRec = asRecord(entry.account);
541
+ const snapshotRec = asRecord(entry.snapshot);
542
+ for (const key of [
543
+ "tokenFile",
544
+ "botTokenFile",
545
+ "appTokenFile",
546
+ "cliPath",
547
+ "dbPath",
548
+ "authDir"
549
+ ]) {
550
+ const raw = accountRec[key] ?? snapshotRec[key];
551
+ if (existsSyncMaybe(raw) === false) missing.push(String(raw));
552
+ }
553
+ }
554
+ return missing;
555
+ }
556
+ function summarizeTokenConfig(params) {
557
+ const enabled = params.accounts.filter((a) => a.enabled);
558
+ if (enabled.length === 0) return {
559
+ state: null,
560
+ detail: null
561
+ };
562
+ const accountRecs = enabled.map((a) => asRecord(a.account));
563
+ const hasBotOrAppTokenFields = accountRecs.some((r) => "botToken" in r || "appToken" in r);
564
+ const hasTokenField = accountRecs.some((r) => "token" in r);
565
+ if (!hasBotOrAppTokenFields && !hasTokenField) return {
566
+ state: null,
567
+ detail: null
568
+ };
569
+ if (hasBotOrAppTokenFields) {
570
+ const ready = enabled.filter((a) => {
571
+ const rec = asRecord(a.account);
572
+ const bot = typeof rec.botToken === "string" ? rec.botToken.trim() : "";
573
+ const app = typeof rec.appToken === "string" ? rec.appToken.trim() : "";
574
+ return Boolean(bot) && Boolean(app);
575
+ });
576
+ const partial = enabled.filter((a) => {
577
+ const rec = asRecord(a.account);
578
+ const bot = typeof rec.botToken === "string" ? rec.botToken.trim() : "";
579
+ const app = typeof rec.appToken === "string" ? rec.appToken.trim() : "";
580
+ const hasBot = Boolean(bot);
581
+ const hasApp = Boolean(app);
582
+ return hasBot && !hasApp || !hasBot && hasApp;
583
+ });
584
+ if (partial.length > 0) return {
585
+ state: "warn",
586
+ detail: `partial tokens (need bot+app) · accounts ${partial.length}`
587
+ };
588
+ if (ready.length === 0) return {
589
+ state: "setup",
590
+ detail: "no tokens (need bot+app)"
591
+ };
592
+ const botSources = summarizeSources(ready.map((a) => a.snapshot.botTokenSource ?? "none"));
593
+ const appSources = summarizeSources(ready.map((a) => a.snapshot.appTokenSource ?? "none"));
594
+ const sample = ready[0]?.account ? asRecord(ready[0].account) : {};
595
+ const botToken = typeof sample.botToken === "string" ? sample.botToken : "";
596
+ const appToken = typeof sample.appToken === "string" ? sample.appToken : "";
597
+ const botHint = botToken.trim() ? formatTokenHint(botToken, { showSecrets: params.showSecrets }) : "";
598
+ const appHint = appToken.trim() ? formatTokenHint(appToken, { showSecrets: params.showSecrets }) : "";
599
+ const hint = botHint || appHint ? ` (bot ${botHint || "?"}, app ${appHint || "?"})` : "";
600
+ return {
601
+ state: "ok",
602
+ detail: `tokens ok (bot ${botSources.label}, app ${appSources.label})${hint} · accounts ${ready.length}/${enabled.length || 1}`
603
+ };
604
+ }
605
+ const ready = enabled.filter((a) => {
606
+ const rec = asRecord(a.account);
607
+ return typeof rec.token === "string" ? Boolean(rec.token.trim()) : false;
608
+ });
609
+ if (ready.length === 0) return {
610
+ state: "setup",
611
+ detail: "no token"
612
+ };
613
+ const sources = summarizeSources(ready.map((a) => a.snapshot.tokenSource));
614
+ const sample = ready[0]?.account ? asRecord(ready[0].account) : {};
615
+ const token = typeof sample.token === "string" ? sample.token : "";
616
+ const hint = token.trim() ? ` (${formatTokenHint(token, { showSecrets: params.showSecrets })})` : "";
617
+ return {
618
+ state: "ok",
619
+ detail: `token ${sources.label}${hint} · accounts ${ready.length}/${enabled.length || 1}`
620
+ };
621
+ }
622
+ async function buildChannelsTable(cfg, opts) {
623
+ const showSecrets = opts?.showSecrets === true;
624
+ const rows = [];
625
+ const details = [];
626
+ for (const plugin of listChannelPlugins()) {
627
+ const accountIds = plugin.config.listAccountIds(cfg);
628
+ const defaultAccountId = resolveChannelDefaultAccountId({
629
+ plugin,
630
+ cfg,
631
+ accountIds
632
+ });
633
+ const resolvedAccountIds = accountIds.length > 0 ? accountIds : [defaultAccountId];
634
+ const accounts = [];
635
+ for (const accountId of resolvedAccountIds) {
636
+ const account = plugin.config.resolveAccount(cfg, accountId);
637
+ const enabled = resolveAccountEnabled(plugin, account, cfg);
638
+ const configured = await resolveAccountConfigured(plugin, account, cfg);
639
+ const snapshot = buildAccountSnapshot({
640
+ plugin,
641
+ cfg,
642
+ accountId,
643
+ account,
644
+ enabled,
645
+ configured
646
+ });
647
+ accounts.push({
648
+ accountId,
649
+ account,
650
+ enabled,
651
+ configured,
652
+ snapshot
653
+ });
654
+ }
655
+ const anyEnabled = accounts.some((a) => a.enabled);
656
+ const enabledAccounts = accounts.filter((a) => a.enabled);
657
+ const configuredAccounts = enabledAccounts.filter((a) => a.configured);
658
+ const defaultEntry = accounts.find((a) => a.accountId === defaultAccountId) ?? accounts[0];
659
+ const link = resolveLinkFields(plugin.status?.buildChannelSummary ? await plugin.status.buildChannelSummary({
660
+ account: defaultEntry?.account ?? {},
661
+ cfg,
662
+ defaultAccountId,
663
+ snapshot: defaultEntry?.snapshot ?? { accountId: defaultAccountId }
664
+ }) : void 0);
665
+ const missingPaths = collectMissingPaths(enabledAccounts);
666
+ const tokenSummary = summarizeTokenConfig({
667
+ plugin,
668
+ cfg,
669
+ accounts,
670
+ showSecrets
671
+ });
672
+ const issues = plugin.status?.collectStatusIssues ? plugin.status.collectStatusIssues(accounts.map((a) => a.snapshot)) : [];
673
+ const label = plugin.meta.label ?? plugin.id;
674
+ const state = (() => {
675
+ if (!anyEnabled) return "off";
676
+ if (missingPaths.length > 0) return "warn";
677
+ if (issues.length > 0) return "warn";
678
+ if (link.linked === false) return "setup";
679
+ if (tokenSummary.state) return tokenSummary.state;
680
+ if (link.linked === true) return "ok";
681
+ if (configuredAccounts.length > 0) return "ok";
682
+ return "setup";
683
+ })();
684
+ const detail = (() => {
685
+ if (!anyEnabled) {
686
+ if (!defaultEntry) return "disabled";
687
+ return plugin.config.disabledReason?.(defaultEntry.account, cfg) ?? "disabled";
688
+ }
689
+ if (missingPaths.length > 0) return `missing file (${missingPaths[0]})`;
690
+ if (issues.length > 0) return issues[0]?.message ?? "misconfigured";
691
+ if (link.linked !== null) {
692
+ const base = link.linked ? "linked" : "not linked";
693
+ const extra = [];
694
+ if (link.linked && link.selfE164) extra.push(link.selfE164);
695
+ if (link.linked && link.authAgeMs != null && link.authAgeMs >= 0) extra.push(`auth ${formatAge$1(link.authAgeMs)}`);
696
+ if (accounts.length > 1 || plugin.meta.forceAccountBinding) extra.push(`accounts ${accounts.length || 1}`);
697
+ return extra.length > 0 ? `${base} · ${extra.join(" · ")}` : base;
698
+ }
699
+ if (tokenSummary.detail) return tokenSummary.detail;
700
+ if (configuredAccounts.length > 0) {
701
+ const head = "configured";
702
+ if (accounts.length <= 1 && !plugin.meta.forceAccountBinding) return head;
703
+ return `${head} · accounts ${configuredAccounts.length}/${enabledAccounts.length || 1}`;
704
+ }
705
+ return (defaultEntry && plugin.config.unconfiguredReason ? plugin.config.unconfiguredReason(defaultEntry.account, cfg) : null) ?? "not configured";
706
+ })();
707
+ rows.push({
708
+ id: plugin.id,
709
+ label,
710
+ enabled: anyEnabled,
711
+ state,
712
+ detail
713
+ });
714
+ if (configuredAccounts.length > 0) details.push({
715
+ title: `${label} accounts`,
716
+ columns: [
717
+ "Account",
718
+ "Status",
719
+ "Notes"
720
+ ],
721
+ rows: configuredAccounts.map((entry) => {
722
+ const notes = buildAccountNotes({
723
+ plugin,
724
+ cfg,
725
+ entry
726
+ });
727
+ return {
728
+ Account: formatAccountLabel({
729
+ accountId: entry.accountId,
730
+ name: entry.snapshot.name
731
+ }),
732
+ Status: entry.enabled ? "OK" : "WARN",
733
+ Notes: notes.join(" · ")
734
+ };
735
+ })
736
+ });
737
+ }
738
+ return {
739
+ rows,
740
+ details
741
+ };
742
+ }
743
+
744
+ //#endregion
745
+ //#region src/commands/status-all/gateway.ts
746
+ async function readFileTailLines(filePath, maxLines) {
747
+ const raw = await fs$1.readFile(filePath, "utf8").catch(() => "");
748
+ if (!raw.trim()) return [];
749
+ const lines = raw.replace(/\r/g, "").split("\n");
750
+ return lines.slice(Math.max(0, lines.length - maxLines)).map((line) => line.trimEnd()).filter((line) => line.trim().length > 0);
751
+ }
752
+ function countMatches(haystack, needle) {
753
+ if (!haystack || !needle) return 0;
754
+ return haystack.split(needle).length - 1;
755
+ }
756
+ function shorten(message, maxLen) {
757
+ const cleaned = message.replace(/\s+/g, " ").trim();
758
+ if (cleaned.length <= maxLen) return cleaned;
759
+ return `${cleaned.slice(0, Math.max(0, maxLen - 1))}…`;
760
+ }
761
+ function normalizeGwsLine(line) {
762
+ return line.replace(/\s+runId=[^\s]+/g, "").replace(/\s+conn=[^\s]+/g, "").replace(/\s+id=[^\s]+/g, "").replace(/\s+error=Error:.*$/g, "").trim();
763
+ }
764
+ function consumeJsonBlock(lines, startIndex) {
765
+ const startLine = lines[startIndex] ?? "";
766
+ const braceAt = startLine.indexOf("{");
767
+ if (braceAt < 0) return null;
768
+ const parts = [startLine.slice(braceAt)];
769
+ let depth = countMatches(parts[0] ?? "", "{") - countMatches(parts[0] ?? "", "}");
770
+ let i = startIndex;
771
+ while (depth > 0 && i + 1 < lines.length) {
772
+ i += 1;
773
+ const next = lines[i] ?? "";
774
+ parts.push(next);
775
+ depth += countMatches(next, "{") - countMatches(next, "}");
776
+ }
777
+ return {
778
+ json: parts.join("\n"),
779
+ endIndex: i
780
+ };
781
+ }
782
+ function summarizeLogTail(rawLines, opts) {
783
+ const maxLines = Math.max(6, opts?.maxLines ?? 26);
784
+ const out = [];
785
+ const groups = /* @__PURE__ */ new Map();
786
+ const addGroup = (key, base) => {
787
+ const existing = groups.get(key);
788
+ if (existing) {
789
+ existing.count += 1;
790
+ return;
791
+ }
792
+ groups.set(key, {
793
+ count: 1,
794
+ index: out.length,
795
+ base
796
+ });
797
+ out.push(base);
798
+ };
799
+ const addLine = (line) => {
800
+ const trimmed = line.trimEnd();
801
+ if (!trimmed) return;
802
+ out.push(trimmed);
803
+ };
804
+ const lines = rawLines.map((line) => line.trimEnd()).filter(Boolean);
805
+ for (let i = 0; i < lines.length; i += 1) {
806
+ const line = lines[i] ?? "";
807
+ const trimmedStart = line.trimStart();
808
+ if ((trimmedStart.startsWith("\"") || trimmedStart === "}" || trimmedStart === "{" || trimmedStart.startsWith("}") || trimmedStart.startsWith("{")) && !trimmedStart.startsWith("[") && !trimmedStart.startsWith("#")) continue;
809
+ const tokenRefresh = line.match(/^\[([^\]]+)\]\s+Token refresh failed:\s*(\d+)\s*(\{)?\s*$/);
810
+ if (tokenRefresh) {
811
+ const tag = tokenRefresh[1] ?? "unknown";
812
+ const status = tokenRefresh[2] ?? "unknown";
813
+ const block = consumeJsonBlock(lines, i);
814
+ if (block) {
815
+ i = block.endIndex;
816
+ const parsed = (() => {
817
+ try {
818
+ return JSON.parse(block.json);
819
+ } catch {
820
+ return null;
821
+ }
822
+ })();
823
+ const code = parsed?.error?.code?.trim() || null;
824
+ const msg = parsed?.error?.message?.trim() || null;
825
+ const msgShort = msg ? msg.toLowerCase().includes("signing in again") ? "re-auth required" : shorten(msg, 52) : null;
826
+ const base = `[${tag}] token refresh ${status}${code ? ` ${code}` : ""}${msgShort ? ` · ${msgShort}` : ""}`;
827
+ addGroup(`token:${tag}:${status}:${code ?? ""}:${msgShort ?? ""}`, base);
828
+ continue;
829
+ }
830
+ }
831
+ const embedded = line.match(/^Embedded agent failed before reply:\s+OAuth token refresh failed for ([^:]+):/);
832
+ if (embedded) {
833
+ const provider = embedded[1]?.trim() || "unknown";
834
+ addGroup(`embedded:${provider}`, `Embedded agent: OAuth token refresh failed (${provider})`);
835
+ continue;
836
+ }
837
+ if (line.startsWith("[gws]") && line.includes("errorCode=UNAVAILABLE") && line.includes("OAuth token refresh failed")) {
838
+ const normalized = normalizeGwsLine(line);
839
+ addGroup(`gws:${normalized}`, normalized);
840
+ continue;
841
+ }
842
+ addLine(line);
843
+ }
844
+ for (const g of groups.values()) {
845
+ if (g.count <= 1) continue;
846
+ out[g.index] = `${g.base} ×${g.count}`;
847
+ }
848
+ const deduped = [];
849
+ for (const line of out) {
850
+ if (deduped[deduped.length - 1] === line) continue;
851
+ deduped.push(line);
852
+ }
853
+ if (deduped.length <= maxLines) return deduped;
854
+ const head = Math.min(6, Math.floor(maxLines / 3));
855
+ const tail = Math.max(1, maxLines - head - 1);
856
+ return [
857
+ ...deduped.slice(0, head),
858
+ `… ${deduped.length - head - tail} lines omitted …`,
859
+ ...deduped.slice(-tail)
860
+ ];
861
+ }
862
+ function pickGatewaySelfPresence$1(presence) {
863
+ if (!Array.isArray(presence)) return null;
864
+ const self = presence.find((e) => e.mode === "gateway" && e.reason === "self") ?? null;
865
+ if (!self) return null;
866
+ return {
867
+ host: typeof self.host === "string" ? self.host : void 0,
868
+ ip: typeof self.ip === "string" ? self.ip : void 0,
869
+ version: typeof self.version === "string" ? self.version : void 0,
870
+ platform: typeof self.platform === "string" ? self.platform : void 0
871
+ };
872
+ }
873
+
874
+ //#endregion
875
+ //#region src/commands/status-all/diagnosis.ts
876
+ async function appendStatusAllDiagnosis(params) {
877
+ const { lines, muted, ok, warn, fail } = params;
878
+ const emitCheck = (label, status) => {
879
+ const icon = status === "ok" ? ok("✓") : status === "warn" ? warn("!") : fail("✗");
880
+ const colored = status === "ok" ? ok(label) : status === "warn" ? warn(label) : fail(label);
881
+ lines.push(`${icon} ${colored}`);
882
+ };
883
+ lines.push("");
884
+ lines.push(muted("Gateway connection details:"));
885
+ for (const line of redactSecrets(params.connectionDetailsForReport).split("\n").map((l) => l.trimEnd())) lines.push(` ${muted(line)}`);
886
+ lines.push("");
887
+ if (params.snap) {
888
+ const status = !params.snap.exists ? "fail" : params.snap.valid ? "ok" : "warn";
889
+ emitCheck(`Config: ${params.snap.path ?? "(unknown)"}`, status);
890
+ const issues = [...params.snap.legacyIssues ?? [], ...params.snap.issues ?? []];
891
+ const uniqueIssues = issues.filter((issue, index) => issues.findIndex((x) => x.path === issue.path && x.message === issue.message) === index);
892
+ for (const issue of uniqueIssues.slice(0, 12)) lines.push(` - ${issue.path}: ${issue.message}`);
893
+ if (uniqueIssues.length > 12) lines.push(` ${muted(`… +${uniqueIssues.length - 12} more`)}`);
894
+ } else emitCheck("Config: read failed", "warn");
895
+ if (params.remoteUrlMissing) {
896
+ lines.push("");
897
+ emitCheck("Gateway remote mode misconfigured (gateway.remote.url missing)", "warn");
898
+ lines.push(` ${muted("Fix: set gateway.remote.url, or set gateway.mode=local.")}`);
899
+ }
900
+ if (params.sentinel?.payload) {
901
+ emitCheck("Restart sentinel present", "warn");
902
+ lines.push(` ${muted(`${summarizeRestartSentinel(params.sentinel.payload)} · ${formatAge$1(Date.now() - params.sentinel.payload.ts)}`)}`);
903
+ } else emitCheck("Restart sentinel: none", "ok");
904
+ const lastErrClean = params.lastErr?.trim() ?? "";
905
+ const isTrivialLastErr = lastErrClean.length < 8 || lastErrClean === "}" || lastErrClean === "{";
906
+ if (lastErrClean && !isTrivialLastErr) {
907
+ lines.push("");
908
+ lines.push(muted("Gateway last log line:"));
909
+ lines.push(` ${muted(redactSecrets(lastErrClean))}`);
910
+ }
911
+ if (params.portUsage) {
912
+ const portOk = params.portUsage.listeners.length === 0;
913
+ emitCheck(`Port ${params.port}`, portOk ? "ok" : "warn");
914
+ if (!portOk) for (const line of formatPortDiagnostics(params.portUsage)) lines.push(` ${muted(line)}`);
915
+ }
916
+ {
917
+ const backend = params.tailscale.backendState ?? "unknown";
918
+ const okBackend = backend === "Running";
919
+ const hasDns = Boolean(params.tailscale.dnsName);
920
+ emitCheck(params.tailscaleMode === "off" ? `Tailscale: off · ${backend}${params.tailscale.dnsName ? ` · ${params.tailscale.dnsName}` : ""}` : `Tailscale: ${params.tailscaleMode} · ${backend}${params.tailscale.dnsName ? ` · ${params.tailscale.dnsName}` : ""}`, okBackend && (params.tailscaleMode === "off" || hasDns) ? "ok" : "warn");
921
+ if (params.tailscale.error) lines.push(` ${muted(`error: ${params.tailscale.error}`)}`);
922
+ if (params.tailscale.ips.length > 0) lines.push(` ${muted(`ips: ${params.tailscale.ips.slice(0, 3).join(", ")}${params.tailscale.ips.length > 3 ? "…" : ""}`)}`);
923
+ if (params.tailscaleHttpsUrl) lines.push(` ${muted(`https: ${params.tailscaleHttpsUrl}`)}`);
924
+ }
925
+ if (params.skillStatus) {
926
+ const eligible = params.skillStatus.skills.filter((s) => s.eligible).length;
927
+ const missing = params.skillStatus.skills.filter((s) => s.eligible && Object.values(s.missing).some((arr) => arr.length)).length;
928
+ emitCheck(`Skills: ${eligible} eligible · ${missing} missing · ${params.skillStatus.workspaceDir}`, missing === 0 ? "ok" : "warn");
929
+ }
930
+ params.progress.setLabel("Reading logs…");
931
+ const logPaths = (() => {
932
+ try {
933
+ return resolveGatewayLogPaths(process.env);
934
+ } catch {
935
+ return null;
936
+ }
937
+ })();
938
+ if (logPaths) {
939
+ params.progress.setLabel("Reading logs…");
940
+ const [stderrTail, stdoutTail] = await Promise.all([readFileTailLines(logPaths.stderrPath, 40).catch(() => []), readFileTailLines(logPaths.stdoutPath, 40).catch(() => [])]);
941
+ if (stderrTail.length > 0 || stdoutTail.length > 0) {
942
+ lines.push("");
943
+ lines.push(muted(`Gateway logs (tail, summarized): ${logPaths.logDir}`));
944
+ lines.push(` ${muted(`# stderr: ${logPaths.stderrPath}`)}`);
945
+ for (const line of summarizeLogTail(stderrTail, { maxLines: 22 }).map(redactSecrets)) lines.push(` ${muted(line)}`);
946
+ lines.push(` ${muted(`# stdout: ${logPaths.stdoutPath}`)}`);
947
+ for (const line of summarizeLogTail(stdoutTail, { maxLines: 22 }).map(redactSecrets)) lines.push(` ${muted(line)}`);
948
+ }
949
+ }
950
+ params.progress.tick();
951
+ if (params.channelsStatus) {
952
+ emitCheck(`Channel issues (${params.channelIssues.length || "none"})`, params.channelIssues.length === 0 ? "ok" : "warn");
953
+ for (const issue of params.channelIssues.slice(0, 12)) {
954
+ const fixText = issue.fix ? ` · fix: ${issue.fix}` : "";
955
+ lines.push(` - ${issue.channel}[${issue.accountId}] ${issue.kind}: ${issue.message}${fixText}`);
956
+ }
957
+ if (params.channelIssues.length > 12) lines.push(` ${muted(`… +${params.channelIssues.length - 12} more`)}`);
958
+ } else emitCheck(`Channel issues skipped (gateway ${params.gatewayReachable ? "query failed" : "unreachable"})`, "warn");
959
+ const healthErr = (() => {
960
+ if (!params.health || typeof params.health !== "object") return "";
961
+ const record = params.health;
962
+ if (!("error" in record)) return "";
963
+ const value = record.error;
964
+ if (!value) return "";
965
+ if (typeof value === "string") return value;
966
+ try {
967
+ return JSON.stringify(value, null, 2);
968
+ } catch {
969
+ return "[unserializable error]";
970
+ }
971
+ })();
972
+ if (healthErr) {
973
+ lines.push("");
974
+ lines.push(muted("Gateway health:"));
975
+ lines.push(` ${muted(redactSecrets(healthErr))}`);
976
+ }
977
+ lines.push("");
978
+ lines.push(muted("Pasteable debug report. Auth tokens redacted."));
979
+ lines.push("Troubleshooting: https://docs.openclaw.ai/troubleshooting");
980
+ lines.push("");
981
+ }
982
+
983
+ //#endregion
984
+ //#region src/commands/status-all/report-lines.ts
985
+ async function buildStatusAllReportLines(params) {
986
+ const rich = isRich();
987
+ const heading = (text) => rich ? theme.heading(text) : text;
988
+ const ok = (text) => rich ? theme.success(text) : text;
989
+ const warn = (text) => rich ? theme.warn(text) : text;
990
+ const fail = (text) => rich ? theme.error(text) : text;
991
+ const muted = (text) => rich ? theme.muted(text) : text;
992
+ const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
993
+ const overview = renderTable({
994
+ width: tableWidth,
995
+ columns: [{
996
+ key: "Item",
997
+ header: "Item",
998
+ minWidth: 10
999
+ }, {
1000
+ key: "Value",
1001
+ header: "Value",
1002
+ flex: true,
1003
+ minWidth: 24
1004
+ }],
1005
+ rows: params.overviewRows
1006
+ });
1007
+ const channelRows = params.channels.rows.map((row) => ({
1008
+ channelId: row.id,
1009
+ Channel: row.label,
1010
+ Enabled: row.enabled ? ok("ON") : muted("OFF"),
1011
+ State: row.state === "ok" ? ok("OK") : row.state === "warn" ? warn("WARN") : row.state === "off" ? muted("OFF") : theme.accentDim("SETUP"),
1012
+ Detail: row.detail
1013
+ }));
1014
+ const channelIssuesByChannel = (() => {
1015
+ const map = /* @__PURE__ */ new Map();
1016
+ for (const issue of params.channelIssues) {
1017
+ const key = issue.channel;
1018
+ const list = map.get(key);
1019
+ if (list) list.push(issue);
1020
+ else map.set(key, [issue]);
1021
+ }
1022
+ return map;
1023
+ })();
1024
+ const channelsTable = renderTable({
1025
+ width: tableWidth,
1026
+ columns: [
1027
+ {
1028
+ key: "Channel",
1029
+ header: "Channel",
1030
+ minWidth: 10
1031
+ },
1032
+ {
1033
+ key: "Enabled",
1034
+ header: "Enabled",
1035
+ minWidth: 7
1036
+ },
1037
+ {
1038
+ key: "State",
1039
+ header: "State",
1040
+ minWidth: 8
1041
+ },
1042
+ {
1043
+ key: "Detail",
1044
+ header: "Detail",
1045
+ flex: true,
1046
+ minWidth: 28
1047
+ }
1048
+ ],
1049
+ rows: channelRows.map((row) => {
1050
+ const issues = channelIssuesByChannel.get(row.channelId) ?? [];
1051
+ if (issues.length === 0) return row;
1052
+ const issue = issues[0];
1053
+ const suffix = ` · ${warn(`gateway: ${String(issue.message).slice(0, 90)}`)}`;
1054
+ return {
1055
+ ...row,
1056
+ State: warn("WARN"),
1057
+ Detail: `${row.Detail}${suffix}`
1058
+ };
1059
+ })
1060
+ });
1061
+ const agentsTable = renderTable({
1062
+ width: tableWidth,
1063
+ columns: [
1064
+ {
1065
+ key: "Agent",
1066
+ header: "Agent",
1067
+ minWidth: 12
1068
+ },
1069
+ {
1070
+ key: "Bootstrap",
1071
+ header: "Bootstrap",
1072
+ minWidth: 10
1073
+ },
1074
+ {
1075
+ key: "Sessions",
1076
+ header: "Sessions",
1077
+ align: "right",
1078
+ minWidth: 8
1079
+ },
1080
+ {
1081
+ key: "Active",
1082
+ header: "Active",
1083
+ minWidth: 10
1084
+ },
1085
+ {
1086
+ key: "Store",
1087
+ header: "Store",
1088
+ flex: true,
1089
+ minWidth: 34
1090
+ }
1091
+ ],
1092
+ rows: params.agentStatus.agents.map((a) => ({
1093
+ Agent: a.name?.trim() ? `${a.id} (${a.name.trim()})` : a.id,
1094
+ Bootstrap: a.bootstrapPending === true ? warn("PENDING") : a.bootstrapPending === false ? ok("OK") : "unknown",
1095
+ Sessions: String(a.sessionsCount),
1096
+ Active: a.lastActiveAgeMs != null ? formatAge$1(a.lastActiveAgeMs) : "unknown",
1097
+ Store: a.sessionsPath
1098
+ }))
1099
+ });
1100
+ const lines = [];
1101
+ lines.push(heading("OpenClaw status --all"));
1102
+ lines.push("");
1103
+ lines.push(heading("Overview"));
1104
+ lines.push(overview.trimEnd());
1105
+ lines.push("");
1106
+ lines.push(heading("Channels"));
1107
+ lines.push(channelsTable.trimEnd());
1108
+ for (const detail of params.channels.details) {
1109
+ lines.push("");
1110
+ lines.push(heading(detail.title));
1111
+ lines.push(renderTable({
1112
+ width: tableWidth,
1113
+ columns: detail.columns.map((c) => ({
1114
+ key: c,
1115
+ header: c,
1116
+ flex: c === "Notes",
1117
+ minWidth: c === "Notes" ? 28 : 10
1118
+ })),
1119
+ rows: detail.rows.map((r) => ({
1120
+ ...r,
1121
+ ...r.Status === "OK" ? { Status: ok("OK") } : r.Status === "WARN" ? { Status: warn("WARN") } : {}
1122
+ }))
1123
+ }).trimEnd());
1124
+ }
1125
+ lines.push("");
1126
+ lines.push(heading("Agents"));
1127
+ lines.push(agentsTable.trimEnd());
1128
+ lines.push("");
1129
+ lines.push(heading("Diagnosis (read-only)"));
1130
+ await appendStatusAllDiagnosis({
1131
+ lines,
1132
+ progress: params.progress,
1133
+ muted,
1134
+ ok,
1135
+ warn,
1136
+ fail,
1137
+ connectionDetailsForReport: params.connectionDetailsForReport,
1138
+ ...params.diagnosis
1139
+ });
1140
+ return lines;
1141
+ }
1142
+
1143
+ //#endregion
1144
+ //#region src/commands/status-all.ts
1145
+ async function statusAllCommand(runtime, opts) {
1146
+ await withProgress({
1147
+ label: "Scanning status --all…",
1148
+ total: 11
1149
+ }, async (progress) => {
1150
+ progress.setLabel("Loading config…");
1151
+ const cfg = loadConfig();
1152
+ const osSummary = resolveOsSummary();
1153
+ const snap = await readConfigFileSnapshot().catch(() => null);
1154
+ progress.tick();
1155
+ progress.setLabel("Checking Tailscale…");
1156
+ const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
1157
+ const tailscale = await (async () => {
1158
+ try {
1159
+ const parsed = await readTailscaleStatusJson(runExec, { timeoutMs: 1200 });
1160
+ const backendState = typeof parsed.BackendState === "string" ? parsed.BackendState : null;
1161
+ const self = typeof parsed.Self === "object" && parsed.Self !== null ? parsed.Self : null;
1162
+ const dnsNameRaw = self && typeof self.DNSName === "string" ? self.DNSName : null;
1163
+ return {
1164
+ ok: true,
1165
+ backendState,
1166
+ dnsName: dnsNameRaw ? dnsNameRaw.replace(/\.$/, "") : null,
1167
+ ips: self && Array.isArray(self.TailscaleIPs) ? self.TailscaleIPs.filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim()) : [],
1168
+ error: null
1169
+ };
1170
+ } catch (err) {
1171
+ return {
1172
+ ok: false,
1173
+ backendState: null,
1174
+ dnsName: null,
1175
+ ips: [],
1176
+ error: String(err)
1177
+ };
1178
+ }
1179
+ })();
1180
+ const tailscaleHttpsUrl = tailscaleMode !== "off" && tailscale.dnsName ? `https://${tailscale.dnsName}${normalizeControlUiBasePath(cfg.gateway?.controlUi?.basePath)}` : null;
1181
+ progress.tick();
1182
+ progress.setLabel("Checking for updates…");
1183
+ const update = await checkUpdateStatus({
1184
+ root: await resolveOpenClawPackageRoot({
1185
+ moduleUrl: import.meta.url,
1186
+ argv1: process.argv[1],
1187
+ cwd: process.cwd()
1188
+ }),
1189
+ timeoutMs: 6500,
1190
+ fetchGit: true,
1191
+ includeRegistry: true
1192
+ });
1193
+ const channelInfo = resolveEffectiveUpdateChannel({
1194
+ configChannel: normalizeUpdateChannel(cfg.update?.channel),
1195
+ installKind: update.installKind,
1196
+ git: update.git ? {
1197
+ tag: update.git.tag,
1198
+ branch: update.git.branch
1199
+ } : void 0
1200
+ });
1201
+ const channelLabel = formatUpdateChannelLabel({
1202
+ channel: channelInfo.channel,
1203
+ source: channelInfo.source,
1204
+ gitTag: update.git?.tag ?? null,
1205
+ gitBranch: update.git?.branch ?? null
1206
+ });
1207
+ const gitLabel = update.installKind === "git" ? (() => {
1208
+ const shortSha = update.git?.sha ? update.git.sha.slice(0, 8) : null;
1209
+ const branch = update.git?.branch && update.git.branch !== "HEAD" ? update.git.branch : null;
1210
+ const tag = update.git?.tag ?? null;
1211
+ return [
1212
+ branch ?? (tag ? "detached" : "git"),
1213
+ tag ? `tag ${tag}` : null,
1214
+ shortSha ? `@ ${shortSha}` : null
1215
+ ].filter(Boolean).join(" · ");
1216
+ })() : null;
1217
+ progress.tick();
1218
+ progress.setLabel("Probing gateway…");
1219
+ const connection = buildGatewayConnectionDetails({ config: cfg });
1220
+ const isRemoteMode = cfg.gateway?.mode === "remote";
1221
+ const remoteUrlRaw = typeof cfg.gateway?.remote?.url === "string" ? cfg.gateway.remote.url.trim() : "";
1222
+ const remoteUrlMissing = isRemoteMode && !remoteUrlRaw;
1223
+ const gatewayMode = isRemoteMode ? "remote" : "local";
1224
+ const resolveProbeAuth = (mode) => {
1225
+ const authToken = cfg.gateway?.auth?.token;
1226
+ const authPassword = cfg.gateway?.auth?.password;
1227
+ const remote = cfg.gateway?.remote;
1228
+ return {
1229
+ token: mode === "remote" ? typeof remote?.token === "string" && remote.token.trim() ? remote.token.trim() : void 0 : process.env.OPENCLAW_GATEWAY_TOKEN?.trim() || (typeof authToken === "string" && authToken.trim() ? authToken.trim() : void 0),
1230
+ password: process.env.OPENCLAW_GATEWAY_PASSWORD?.trim() || (mode === "remote" ? typeof remote?.password === "string" && remote.password.trim() ? remote.password.trim() : void 0 : typeof authPassword === "string" && authPassword.trim() ? authPassword.trim() : void 0)
1231
+ };
1232
+ };
1233
+ const localFallbackAuth = resolveProbeAuth("local");
1234
+ const remoteAuth = resolveProbeAuth("remote");
1235
+ const probeAuth = isRemoteMode && !remoteUrlMissing ? remoteAuth : localFallbackAuth;
1236
+ const gatewayProbe = await probeGateway({
1237
+ url: connection.url,
1238
+ auth: probeAuth,
1239
+ timeoutMs: Math.min(5e3, opts?.timeoutMs ?? 1e4)
1240
+ }).catch(() => null);
1241
+ const gatewayReachable = gatewayProbe?.ok === true;
1242
+ const gatewaySelf = pickGatewaySelfPresence$1(gatewayProbe?.presence ?? null);
1243
+ progress.tick();
1244
+ progress.setLabel("Checking services…");
1245
+ const readServiceSummary = async (service) => {
1246
+ try {
1247
+ const [loaded, runtimeInfo, command] = await Promise.all([
1248
+ service.isLoaded({ env: process.env }).catch(() => false),
1249
+ service.readRuntime(process.env).catch(() => void 0),
1250
+ service.readCommand(process.env).catch(() => null)
1251
+ ]);
1252
+ const installed = command != null;
1253
+ return {
1254
+ label: service.label,
1255
+ installed,
1256
+ loaded,
1257
+ loadedText: loaded ? service.loadedText : service.notLoadedText,
1258
+ runtime: runtimeInfo
1259
+ };
1260
+ } catch {
1261
+ return null;
1262
+ }
1263
+ };
1264
+ const daemon = await readServiceSummary(resolveGatewayService());
1265
+ const nodeService = await readServiceSummary(resolveNodeService());
1266
+ progress.tick();
1267
+ progress.setLabel("Scanning agents…");
1268
+ const agentStatus = await getAgentLocalStatuses$1(cfg);
1269
+ progress.tick();
1270
+ progress.setLabel("Summarizing channels…");
1271
+ const channels = await buildChannelsTable(cfg, { showSecrets: false });
1272
+ progress.tick();
1273
+ const connectionDetailsForReport = (() => {
1274
+ if (!remoteUrlMissing) return connection.message;
1275
+ const bindMode = cfg.gateway?.bind ?? "loopback";
1276
+ return [
1277
+ "Gateway mode: remote",
1278
+ "Gateway target: (missing gateway.remote.url)",
1279
+ `Config: ${snap?.path?.trim() ? snap.path.trim() : "(unknown config path)"}`,
1280
+ `Bind: ${bindMode}`,
1281
+ `Local fallback (used for probes): ${connection.url}`,
1282
+ "Fix: set gateway.remote.url, or set gateway.mode=local."
1283
+ ].join("\n");
1284
+ })();
1285
+ const callOverrides = remoteUrlMissing ? {
1286
+ url: connection.url,
1287
+ token: localFallbackAuth.token,
1288
+ password: localFallbackAuth.password
1289
+ } : {};
1290
+ progress.setLabel("Querying gateway…");
1291
+ const health = gatewayReachable ? await callGateway({
1292
+ method: "health",
1293
+ timeoutMs: Math.min(8e3, opts?.timeoutMs ?? 1e4),
1294
+ ...callOverrides
1295
+ }).catch((err) => ({ error: String(err) })) : { error: gatewayProbe?.error ?? "gateway unreachable" };
1296
+ const channelsStatus = gatewayReachable ? await callGateway({
1297
+ method: "channels.status",
1298
+ params: {
1299
+ probe: false,
1300
+ timeoutMs: opts?.timeoutMs ?? 1e4
1301
+ },
1302
+ timeoutMs: Math.min(8e3, opts?.timeoutMs ?? 1e4),
1303
+ ...callOverrides
1304
+ }).catch(() => null) : null;
1305
+ const channelIssues = channelsStatus ? collectChannelStatusIssues(channelsStatus) : [];
1306
+ progress.tick();
1307
+ progress.setLabel("Checking local state…");
1308
+ const sentinel = await readRestartSentinel().catch(() => null);
1309
+ const lastErr = await readLastGatewayErrorLine(process.env).catch(() => null);
1310
+ const port = resolveGatewayPort(cfg);
1311
+ const portUsage = await inspectPortUsage(port).catch(() => null);
1312
+ progress.tick();
1313
+ const defaultWorkspace = agentStatus.agents.find((a) => a.id === agentStatus.defaultId)?.workspaceDir ?? agentStatus.agents[0]?.workspaceDir ?? null;
1314
+ const skillStatus = defaultWorkspace != null ? (() => {
1315
+ try {
1316
+ return buildWorkspaceSkillStatus(defaultWorkspace, {
1317
+ config: cfg,
1318
+ eligibility: { remote: getRemoteSkillEligibility() }
1319
+ });
1320
+ } catch {
1321
+ return null;
1322
+ }
1323
+ })() : null;
1324
+ const dashboard = cfg.gateway?.controlUi?.enabled ?? true ? resolveControlUiLinks({
1325
+ port,
1326
+ bind: cfg.gateway?.bind,
1327
+ customBindHost: cfg.gateway?.customBindHost,
1328
+ basePath: cfg.gateway?.controlUi?.basePath
1329
+ }).httpUrl : null;
1330
+ const updateLine = (() => {
1331
+ if (update.installKind === "git" && update.git) {
1332
+ const parts = [];
1333
+ parts.push(update.git.branch ? `git ${update.git.branch}` : "git");
1334
+ if (update.git.upstream) parts.push(`↔ ${update.git.upstream}`);
1335
+ if (update.git.dirty) parts.push("dirty");
1336
+ if (update.git.behind != null && update.git.ahead != null) if (update.git.behind === 0 && update.git.ahead === 0) parts.push("up to date");
1337
+ else if (update.git.behind > 0 && update.git.ahead === 0) parts.push(`behind ${update.git.behind}`);
1338
+ else if (update.git.behind === 0 && update.git.ahead > 0) parts.push(`ahead ${update.git.ahead}`);
1339
+ else parts.push(`diverged (ahead ${update.git.ahead}, behind ${update.git.behind})`);
1340
+ if (update.git.fetchOk === false) parts.push("fetch failed");
1341
+ const latest = update.registry?.latestVersion;
1342
+ if (latest) {
1343
+ const cmp = compareSemverStrings(VERSION, latest);
1344
+ if (cmp === 0) parts.push(`npm latest ${latest}`);
1345
+ else if (cmp != null && cmp < 0) parts.push(`npm update ${latest}`);
1346
+ else parts.push(`npm latest ${latest} (local newer)`);
1347
+ } else if (update.registry?.error) parts.push("npm latest unknown");
1348
+ if (update.deps?.status === "ok") parts.push("deps ok");
1349
+ if (update.deps?.status === "stale") parts.push("deps stale");
1350
+ if (update.deps?.status === "missing") parts.push("deps missing");
1351
+ return parts.join(" · ");
1352
+ }
1353
+ const parts = [];
1354
+ parts.push(update.packageManager !== "unknown" ? update.packageManager : "pkg");
1355
+ const latest = update.registry?.latestVersion;
1356
+ if (latest) {
1357
+ const cmp = compareSemverStrings(VERSION, latest);
1358
+ if (cmp === 0) parts.push(`npm latest ${latest}`);
1359
+ else if (cmp != null && cmp < 0) parts.push(`npm update ${latest}`);
1360
+ else parts.push(`npm latest ${latest} (local newer)`);
1361
+ } else if (update.registry?.error) parts.push("npm latest unknown");
1362
+ if (update.deps?.status === "ok") parts.push("deps ok");
1363
+ if (update.deps?.status === "stale") parts.push("deps stale");
1364
+ if (update.deps?.status === "missing") parts.push("deps missing");
1365
+ return parts.join(" · ");
1366
+ })();
1367
+ const gatewayTarget = remoteUrlMissing ? `fallback ${connection.url}` : connection.url;
1368
+ const gatewayStatus = gatewayReachable ? `reachable ${formatDuration$1(gatewayProbe?.connectLatencyMs)}` : gatewayProbe?.error ? `unreachable (${gatewayProbe.error})` : "unreachable";
1369
+ const gatewayAuth = gatewayReachable ? ` · auth ${formatGatewayAuthUsed(probeAuth)}` : "";
1370
+ const gatewaySelfLine = gatewaySelf?.host || gatewaySelf?.ip || gatewaySelf?.version || gatewaySelf?.platform ? [
1371
+ gatewaySelf.host ? gatewaySelf.host : null,
1372
+ gatewaySelf.ip ? `(${gatewaySelf.ip})` : null,
1373
+ gatewaySelf.version ? `app ${gatewaySelf.version}` : null,
1374
+ gatewaySelf.platform ? gatewaySelf.platform : null
1375
+ ].filter(Boolean).join(" ") : null;
1376
+ const aliveThresholdMs = 10 * 6e4;
1377
+ const aliveAgents = agentStatus.agents.filter((a) => a.lastActiveAgeMs != null && a.lastActiveAgeMs <= aliveThresholdMs).length;
1378
+ const lines = await buildStatusAllReportLines({
1379
+ progress,
1380
+ overviewRows: [
1381
+ {
1382
+ Item: "Version",
1383
+ Value: VERSION
1384
+ },
1385
+ {
1386
+ Item: "OS",
1387
+ Value: osSummary.label
1388
+ },
1389
+ {
1390
+ Item: "Node",
1391
+ Value: process.versions.node
1392
+ },
1393
+ {
1394
+ Item: "Config",
1395
+ Value: snap?.path?.trim() ? snap.path.trim() : "(unknown config path)"
1396
+ },
1397
+ dashboard ? {
1398
+ Item: "Dashboard",
1399
+ Value: dashboard
1400
+ } : {
1401
+ Item: "Dashboard",
1402
+ Value: "disabled"
1403
+ },
1404
+ {
1405
+ Item: "Tailscale",
1406
+ Value: tailscaleMode === "off" ? `off${tailscale.backendState ? ` · ${tailscale.backendState}` : ""}${tailscale.dnsName ? ` · ${tailscale.dnsName}` : ""}` : tailscale.dnsName && tailscaleHttpsUrl ? `${tailscaleMode} · ${tailscale.backendState ?? "unknown"} · ${tailscale.dnsName} · ${tailscaleHttpsUrl}` : `${tailscaleMode} · ${tailscale.backendState ?? "unknown"} · magicdns unknown`
1407
+ },
1408
+ {
1409
+ Item: "Channel",
1410
+ Value: channelLabel
1411
+ },
1412
+ ...gitLabel ? [{
1413
+ Item: "Git",
1414
+ Value: gitLabel
1415
+ }] : [],
1416
+ {
1417
+ Item: "Update",
1418
+ Value: updateLine
1419
+ },
1420
+ {
1421
+ Item: "Gateway",
1422
+ Value: `${gatewayMode}${remoteUrlMissing ? " (remote.url missing)" : ""} · ${gatewayTarget} (${connection.urlSource}) · ${gatewayStatus}${gatewayAuth}`
1423
+ },
1424
+ {
1425
+ Item: "Security",
1426
+ Value: `Run: ${formatCliCommand("openclaw security audit --deep")}`
1427
+ },
1428
+ gatewaySelfLine ? {
1429
+ Item: "Gateway self",
1430
+ Value: gatewaySelfLine
1431
+ } : {
1432
+ Item: "Gateway self",
1433
+ Value: "unknown"
1434
+ },
1435
+ daemon ? {
1436
+ Item: "Gateway service",
1437
+ Value: !daemon.installed ? `${daemon.label} not installed` : `${daemon.label} ${daemon.installed ? "installed · " : ""}${daemon.loadedText}${daemon.runtime?.status ? ` · ${daemon.runtime.status}` : ""}${daemon.runtime?.pid ? ` (pid ${daemon.runtime.pid})` : ""}`
1438
+ } : {
1439
+ Item: "Gateway service",
1440
+ Value: "unknown"
1441
+ },
1442
+ nodeService ? {
1443
+ Item: "Node service",
1444
+ Value: !nodeService.installed ? `${nodeService.label} not installed` : `${nodeService.label} ${nodeService.installed ? "installed · " : ""}${nodeService.loadedText}${nodeService.runtime?.status ? ` · ${nodeService.runtime.status}` : ""}${nodeService.runtime?.pid ? ` (pid ${nodeService.runtime.pid})` : ""}`
1445
+ } : {
1446
+ Item: "Node service",
1447
+ Value: "unknown"
1448
+ },
1449
+ {
1450
+ Item: "Agents",
1451
+ Value: `${agentStatus.agents.length} total · ${agentStatus.bootstrapPendingCount} bootstrapping · ${aliveAgents} active · ${agentStatus.totalSessions} sessions`
1452
+ }
1453
+ ],
1454
+ channels,
1455
+ channelIssues: channelIssues.map((issue) => ({
1456
+ channel: issue.channel,
1457
+ message: issue.message
1458
+ })),
1459
+ agentStatus,
1460
+ connectionDetailsForReport,
1461
+ diagnosis: {
1462
+ snap,
1463
+ remoteUrlMissing,
1464
+ sentinel,
1465
+ lastErr,
1466
+ port,
1467
+ portUsage,
1468
+ tailscaleMode,
1469
+ tailscale,
1470
+ tailscaleHttpsUrl,
1471
+ skillStatus,
1472
+ channelsStatus,
1473
+ channelIssues,
1474
+ gatewayReachable,
1475
+ health
1476
+ }
1477
+ });
1478
+ progress.setLabel("Rendering…");
1479
+ runtime.log(lines.join("\n"));
1480
+ progress.tick();
1481
+ });
1482
+ }
1483
+
1484
+ //#endregion
1485
+ //#region src/commands/status.format.ts
1486
+ const formatKTokens = (value) => `${(value / 1e3).toFixed(value >= 1e4 ? 0 : 1)}k`;
1487
+ const formatAge = (ms) => {
1488
+ if (!ms || ms < 0) return "unknown";
1489
+ const minutes = Math.round(ms / 6e4);
1490
+ if (minutes < 1) return "just now";
1491
+ if (minutes < 60) return `${minutes}m ago`;
1492
+ const hours = Math.round(minutes / 60);
1493
+ if (hours < 48) return `${hours}h ago`;
1494
+ return `${Math.round(hours / 24)}d ago`;
1495
+ };
1496
+ const formatDuration = (ms) => {
1497
+ if (ms == null || !Number.isFinite(ms)) return "unknown";
1498
+ if (ms < 1e3) return `${Math.round(ms)}ms`;
1499
+ return `${(ms / 1e3).toFixed(1)}s`;
1500
+ };
1501
+ const shortenText = (value, maxLen) => {
1502
+ const chars = Array.from(value);
1503
+ if (chars.length <= maxLen) return value;
1504
+ return `${chars.slice(0, Math.max(0, maxLen - 1)).join("")}…`;
1505
+ };
1506
+ const formatTokensCompact = (sess) => {
1507
+ const used = sess.totalTokens ?? 0;
1508
+ const ctx = sess.contextTokens;
1509
+ if (!ctx) return `${formatKTokens(used)} used`;
1510
+ const pctLabel = sess.percentUsed != null ? `${sess.percentUsed}%` : "?%";
1511
+ return `${formatKTokens(used)}/${formatKTokens(ctx)} (${pctLabel})`;
1512
+ };
1513
+ const formatDaemonRuntimeShort = (runtime) => {
1514
+ if (!runtime) return null;
1515
+ const status = runtime.status ?? "unknown";
1516
+ const details = [];
1517
+ if (runtime.pid) details.push(`pid ${runtime.pid}`);
1518
+ if (runtime.state && runtime.state.toLowerCase() !== status) details.push(`state ${runtime.state}`);
1519
+ const detail = runtime.detail?.replace(/\s+/g, " ").trim() || "";
1520
+ const noisyLaunchctlDetail = runtime.missingUnit === true && detail.toLowerCase().includes("could not find service");
1521
+ if (detail && !noisyLaunchctlDetail) details.push(detail);
1522
+ return details.length > 0 ? `${status} (${details.join(", ")})` : status;
1523
+ };
1524
+
1525
+ //#endregion
1526
+ //#region src/commands/status.daemon.ts
1527
+ async function buildDaemonStatusSummary(service, fallbackLabel) {
1528
+ try {
1529
+ const [loaded, runtime, command] = await Promise.all([
1530
+ service.isLoaded({ env: process.env }).catch(() => false),
1531
+ service.readRuntime(process.env).catch(() => void 0),
1532
+ service.readCommand(process.env).catch(() => null)
1533
+ ]);
1534
+ const installed = command != null;
1535
+ const loadedText = loaded ? service.loadedText : service.notLoadedText;
1536
+ const runtimeShort = formatDaemonRuntimeShort(runtime);
1537
+ return {
1538
+ label: service.label,
1539
+ installed,
1540
+ loadedText,
1541
+ runtimeShort
1542
+ };
1543
+ } catch {
1544
+ return {
1545
+ label: fallbackLabel,
1546
+ installed: null,
1547
+ loadedText: "unknown",
1548
+ runtimeShort: null
1549
+ };
1550
+ }
1551
+ }
1552
+ async function getDaemonStatusSummary() {
1553
+ return await buildDaemonStatusSummary(resolveGatewayService(), "Daemon");
1554
+ }
1555
+ async function getNodeDaemonStatusSummary() {
1556
+ return await buildDaemonStatusSummary(resolveNodeService(), "Node");
1557
+ }
1558
+
1559
+ //#endregion
1560
+ //#region src/commands/status.gateway-probe.ts
1561
+ function resolveGatewayProbeAuth(cfg) {
1562
+ const isRemoteMode = cfg.gateway?.mode === "remote";
1563
+ const remote = isRemoteMode ? cfg.gateway?.remote : void 0;
1564
+ const authToken = cfg.gateway?.auth?.token;
1565
+ const authPassword = cfg.gateway?.auth?.password;
1566
+ return {
1567
+ token: isRemoteMode ? typeof remote?.token === "string" && remote.token.trim().length > 0 ? remote.token.trim() : void 0 : process.env.OPENCLAW_GATEWAY_TOKEN?.trim() || (typeof authToken === "string" && authToken.trim().length > 0 ? authToken.trim() : void 0),
1568
+ password: process.env.OPENCLAW_GATEWAY_PASSWORD?.trim() || (isRemoteMode ? typeof remote?.password === "string" && remote.password.trim().length > 0 ? remote.password.trim() : void 0 : typeof authPassword === "string" && authPassword.trim().length > 0 ? authPassword.trim() : void 0)
1569
+ };
1570
+ }
1571
+ function pickGatewaySelfPresence(presence) {
1572
+ if (!Array.isArray(presence)) return null;
1573
+ const self = presence.find((e) => e.mode === "gateway" && e.reason === "self") ?? null;
1574
+ if (!self) return null;
1575
+ return {
1576
+ host: typeof self.host === "string" ? self.host : void 0,
1577
+ ip: typeof self.ip === "string" ? self.ip : void 0,
1578
+ version: typeof self.version === "string" ? self.version : void 0,
1579
+ platform: typeof self.platform === "string" ? self.platform : void 0
1580
+ };
1581
+ }
1582
+
1583
+ //#endregion
1584
+ //#region src/commands/status.agent-local.ts
1585
+ async function fileExists(p) {
1586
+ try {
1587
+ await fs$1.access(p);
1588
+ return true;
1589
+ } catch {
1590
+ return false;
1591
+ }
1592
+ }
1593
+ async function getAgentLocalStatuses() {
1594
+ const cfg = loadConfig();
1595
+ const agentList = listAgentsForGateway(cfg);
1596
+ const now = Date.now();
1597
+ const statuses = [];
1598
+ for (const agent of agentList.agents) {
1599
+ const agentId = agent.id;
1600
+ const workspaceDir = (() => {
1601
+ try {
1602
+ return resolveAgentWorkspaceDir(cfg, agentId);
1603
+ } catch {
1604
+ return null;
1605
+ }
1606
+ })();
1607
+ const bootstrapPath = workspaceDir != null ? path.join(workspaceDir, "BOOTSTRAP.md") : null;
1608
+ const bootstrapPending = bootstrapPath != null ? await fileExists(bootstrapPath) : null;
1609
+ const sessionsPath = resolveStorePath(cfg.session?.store, { agentId });
1610
+ const store = (() => {
1611
+ try {
1612
+ return loadSessionStore(sessionsPath);
1613
+ } catch {
1614
+ return {};
1615
+ }
1616
+ })();
1617
+ const sessions = Object.entries(store).filter(([key]) => key !== "global" && key !== "unknown").map(([, entry]) => entry);
1618
+ const sessionsCount = sessions.length;
1619
+ const lastUpdatedAt = sessions.reduce((max, e) => Math.max(max, e?.updatedAt ?? 0), 0);
1620
+ const resolvedLastUpdatedAt = lastUpdatedAt > 0 ? lastUpdatedAt : null;
1621
+ const lastActiveAgeMs = resolvedLastUpdatedAt ? now - resolvedLastUpdatedAt : null;
1622
+ statuses.push({
1623
+ id: agentId,
1624
+ name: agent.name,
1625
+ workspaceDir,
1626
+ bootstrapPending,
1627
+ sessionsPath,
1628
+ sessionsCount,
1629
+ lastUpdatedAt: resolvedLastUpdatedAt,
1630
+ lastActiveAgeMs
1631
+ });
1632
+ }
1633
+ const totalSessions = statuses.reduce((sum, s) => sum + s.sessionsCount, 0);
1634
+ const bootstrapPendingCount = statuses.reduce((sum, s) => sum + (s.bootstrapPending ? 1 : 0), 0);
1635
+ return {
1636
+ defaultId: agentList.defaultId,
1637
+ agents: statuses,
1638
+ totalSessions,
1639
+ bootstrapPendingCount
1640
+ };
1641
+ }
1642
+
1643
+ //#endregion
1644
+ //#region src/commands/status.link-channel.ts
1645
+ async function resolveLinkChannelContext(cfg) {
1646
+ for (const plugin of listChannelPlugins()) {
1647
+ const defaultAccountId = resolveChannelDefaultAccountId({
1648
+ plugin,
1649
+ cfg,
1650
+ accountIds: plugin.config.listAccountIds(cfg)
1651
+ });
1652
+ const account = plugin.config.resolveAccount(cfg, defaultAccountId);
1653
+ const enabled = plugin.config.isEnabled ? plugin.config.isEnabled(account, cfg) : true;
1654
+ const configured = plugin.config.isConfigured ? await plugin.config.isConfigured(account, cfg) : true;
1655
+ const snapshot = plugin.config.describeAccount ? plugin.config.describeAccount(account, cfg) : {
1656
+ accountId: defaultAccountId,
1657
+ enabled,
1658
+ configured
1659
+ };
1660
+ const summaryRecord = plugin.status?.buildChannelSummary ? await plugin.status.buildChannelSummary({
1661
+ account,
1662
+ cfg,
1663
+ defaultAccountId,
1664
+ snapshot
1665
+ }) : void 0;
1666
+ const linked = summaryRecord && typeof summaryRecord.linked === "boolean" ? summaryRecord.linked : null;
1667
+ if (linked === null) continue;
1668
+ return {
1669
+ linked,
1670
+ authAgeMs: summaryRecord && typeof summaryRecord.authAgeMs === "number" ? summaryRecord.authAgeMs : null,
1671
+ account,
1672
+ accountId: defaultAccountId,
1673
+ plugin
1674
+ };
1675
+ }
1676
+ return null;
1677
+ }
1678
+
1679
+ //#endregion
1680
+ //#region src/commands/status.summary.ts
1681
+ const classifyKey = (key, entry) => {
1682
+ if (key === "global") return "global";
1683
+ if (key === "unknown") return "unknown";
1684
+ if (entry?.chatType === "group" || entry?.chatType === "channel") return "group";
1685
+ if (key.includes(":group:") || key.includes(":channel:")) return "group";
1686
+ return "direct";
1687
+ };
1688
+ const buildFlags = (entry) => {
1689
+ if (!entry) return [];
1690
+ const flags = [];
1691
+ const think = entry?.thinkingLevel;
1692
+ if (typeof think === "string" && think.length > 0) flags.push(`think:${think}`);
1693
+ const verbose = entry?.verboseLevel;
1694
+ if (typeof verbose === "string" && verbose.length > 0) flags.push(`verbose:${verbose}`);
1695
+ const reasoning = entry?.reasoningLevel;
1696
+ if (typeof reasoning === "string" && reasoning.length > 0) flags.push(`reasoning:${reasoning}`);
1697
+ const elevated = entry?.elevatedLevel;
1698
+ if (typeof elevated === "string" && elevated.length > 0) flags.push(`elevated:${elevated}`);
1699
+ if (entry?.systemSent) flags.push("system");
1700
+ if (entry?.abortedLastRun) flags.push("aborted");
1701
+ const sessionId = entry?.sessionId;
1702
+ if (typeof sessionId === "string" && sessionId.length > 0) flags.push(`id:${sessionId}`);
1703
+ return flags;
1704
+ };
1705
+ async function getStatusSummary() {
1706
+ const cfg = loadConfig();
1707
+ const linkContext = await resolveLinkChannelContext(cfg);
1708
+ const agentList = listAgentsForGateway(cfg);
1709
+ const heartbeatAgents = agentList.agents.map((agent) => {
1710
+ const summary = resolveHeartbeatSummaryForAgent(cfg, agent.id);
1711
+ return {
1712
+ agentId: agent.id,
1713
+ enabled: summary.enabled,
1714
+ every: summary.every,
1715
+ everyMs: summary.everyMs
1716
+ };
1717
+ });
1718
+ const channelSummary = await buildChannelSummary(cfg, {
1719
+ colorize: true,
1720
+ includeAllowFrom: true
1721
+ });
1722
+ const queuedSystemEvents = peekSystemEvents(resolveMainSessionKey(cfg));
1723
+ const configModel = resolveConfiguredModelRef({
1724
+ cfg,
1725
+ defaultProvider: DEFAULT_PROVIDER,
1726
+ defaultModel: DEFAULT_MODEL
1727
+ }).model ?? DEFAULT_MODEL;
1728
+ const configContextTokens = cfg.agents?.defaults?.contextTokens ?? lookupContextTokens(configModel) ?? DEFAULT_CONTEXT_TOKENS;
1729
+ const now = Date.now();
1730
+ const storeCache = /* @__PURE__ */ new Map();
1731
+ const loadStore = (storePath) => {
1732
+ const cached = storeCache.get(storePath);
1733
+ if (cached) return cached;
1734
+ const store = loadSessionStore(storePath);
1735
+ storeCache.set(storePath, store);
1736
+ return store;
1737
+ };
1738
+ const buildSessionRows = (store, opts = {}) => Object.entries(store).filter(([key]) => key !== "global" && key !== "unknown").map(([key, entry]) => {
1739
+ const updatedAt = entry?.updatedAt ?? null;
1740
+ const age = updatedAt ? now - updatedAt : null;
1741
+ const model = entry?.model ?? configModel ?? null;
1742
+ const contextTokens = entry?.contextTokens ?? lookupContextTokens(model) ?? configContextTokens ?? null;
1743
+ const input = entry?.inputTokens ?? 0;
1744
+ const output = entry?.outputTokens ?? 0;
1745
+ const total = entry?.totalTokens ?? input + output;
1746
+ const remaining = contextTokens != null ? Math.max(0, contextTokens - total) : null;
1747
+ const pct = contextTokens && contextTokens > 0 ? Math.min(999, Math.round(total / contextTokens * 100)) : null;
1748
+ const parsedAgentId = parseAgentSessionKey(key)?.agentId;
1749
+ return {
1750
+ agentId: opts.agentIdOverride ?? parsedAgentId,
1751
+ key,
1752
+ kind: classifyKey(key, entry),
1753
+ sessionId: entry?.sessionId,
1754
+ updatedAt,
1755
+ age,
1756
+ thinkingLevel: entry?.thinkingLevel,
1757
+ verboseLevel: entry?.verboseLevel,
1758
+ reasoningLevel: entry?.reasoningLevel,
1759
+ elevatedLevel: entry?.elevatedLevel,
1760
+ systemSent: entry?.systemSent,
1761
+ abortedLastRun: entry?.abortedLastRun,
1762
+ inputTokens: entry?.inputTokens,
1763
+ outputTokens: entry?.outputTokens,
1764
+ totalTokens: total ?? null,
1765
+ remainingTokens: remaining,
1766
+ percentUsed: pct,
1767
+ model,
1768
+ contextTokens,
1769
+ flags: buildFlags(entry)
1770
+ };
1771
+ }).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
1772
+ const paths = /* @__PURE__ */ new Set();
1773
+ const byAgent = agentList.agents.map((agent) => {
1774
+ const storePath = resolveStorePath(cfg.session?.store, { agentId: agent.id });
1775
+ paths.add(storePath);
1776
+ const sessions = buildSessionRows(loadStore(storePath), { agentIdOverride: agent.id });
1777
+ return {
1778
+ agentId: agent.id,
1779
+ path: storePath,
1780
+ count: sessions.length,
1781
+ recent: sessions.slice(0, 10)
1782
+ };
1783
+ });
1784
+ const allSessions = Array.from(paths).flatMap((storePath) => buildSessionRows(loadStore(storePath))).toSorted((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
1785
+ const recent = allSessions.slice(0, 10);
1786
+ const totalSessions = allSessions.length;
1787
+ return {
1788
+ linkChannel: linkContext ? {
1789
+ id: linkContext.plugin.id,
1790
+ label: linkContext.plugin.meta.label ?? "Channel",
1791
+ linked: linkContext.linked,
1792
+ authAgeMs: linkContext.authAgeMs
1793
+ } : void 0,
1794
+ heartbeat: {
1795
+ defaultAgentId: agentList.defaultId,
1796
+ agents: heartbeatAgents
1797
+ },
1798
+ channelSummary,
1799
+ queuedSystemEvents,
1800
+ sessions: {
1801
+ paths: Array.from(paths),
1802
+ count: totalSessions,
1803
+ defaults: {
1804
+ model: configModel ?? null,
1805
+ contextTokens: configContextTokens ?? null
1806
+ },
1807
+ recent,
1808
+ byAgent
1809
+ }
1810
+ };
1811
+ }
1812
+
1813
+ //#endregion
1814
+ //#region src/commands/status.scan.ts
1815
+ function resolveMemoryPluginStatus(cfg) {
1816
+ if (!(cfg.plugins?.enabled !== false)) return {
1817
+ enabled: false,
1818
+ slot: null,
1819
+ reason: "plugins disabled"
1820
+ };
1821
+ const raw = typeof cfg.plugins?.slots?.memory === "string" ? cfg.plugins.slots.memory.trim() : "";
1822
+ if (raw && raw.toLowerCase() === "none") return {
1823
+ enabled: false,
1824
+ slot: null,
1825
+ reason: "plugins.slots.memory=\"none\""
1826
+ };
1827
+ return {
1828
+ enabled: true,
1829
+ slot: raw || "memory-core"
1830
+ };
1831
+ }
1832
+ async function scanStatus(opts, _runtime) {
1833
+ return await withProgress({
1834
+ label: "Scanning status…",
1835
+ total: 10,
1836
+ enabled: opts.json !== true
1837
+ }, async (progress) => {
1838
+ progress.setLabel("Loading config…");
1839
+ const cfg = loadConfig();
1840
+ const osSummary = resolveOsSummary();
1841
+ progress.tick();
1842
+ progress.setLabel("Checking Tailscale…");
1843
+ const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
1844
+ const tailscaleDns = tailscaleMode === "off" ? null : await getTailnetHostname((cmd, args) => runExec(cmd, args, {
1845
+ timeoutMs: 1200,
1846
+ maxBuffer: 2e5
1847
+ })).catch(() => null);
1848
+ const tailscaleHttpsUrl = tailscaleMode !== "off" && tailscaleDns ? `https://${tailscaleDns}${normalizeControlUiBasePath(cfg.gateway?.controlUi?.basePath)}` : null;
1849
+ progress.tick();
1850
+ progress.setLabel("Checking for updates…");
1851
+ const update = await getUpdateCheckResult({
1852
+ timeoutMs: opts.all ? 6500 : 2500,
1853
+ fetchGit: true,
1854
+ includeRegistry: true
1855
+ });
1856
+ progress.tick();
1857
+ progress.setLabel("Resolving agents…");
1858
+ const agentStatus = await getAgentLocalStatuses();
1859
+ progress.tick();
1860
+ progress.setLabel("Probing gateway…");
1861
+ const gatewayConnection = buildGatewayConnectionDetails();
1862
+ const isRemoteMode = cfg.gateway?.mode === "remote";
1863
+ const remoteUrlRaw = typeof cfg.gateway?.remote?.url === "string" ? cfg.gateway.remote.url : "";
1864
+ const remoteUrlMissing = isRemoteMode && !remoteUrlRaw.trim();
1865
+ const gatewayMode = isRemoteMode ? "remote" : "local";
1866
+ const gatewayProbe = remoteUrlMissing ? null : await probeGateway({
1867
+ url: gatewayConnection.url,
1868
+ auth: resolveGatewayProbeAuth(cfg),
1869
+ timeoutMs: Math.min(opts.all ? 5e3 : 2500, opts.timeoutMs ?? 1e4)
1870
+ }).catch(() => null);
1871
+ const gatewayReachable = gatewayProbe?.ok === true;
1872
+ const gatewaySelf = gatewayProbe?.presence ? pickGatewaySelfPresence(gatewayProbe.presence) : null;
1873
+ progress.tick();
1874
+ progress.setLabel("Querying channel status…");
1875
+ const channelsStatus = gatewayReachable ? await callGateway({
1876
+ method: "channels.status",
1877
+ params: {
1878
+ probe: false,
1879
+ timeoutMs: Math.min(8e3, opts.timeoutMs ?? 1e4)
1880
+ },
1881
+ timeoutMs: Math.min(opts.all ? 5e3 : 2500, opts.timeoutMs ?? 1e4)
1882
+ }).catch(() => null) : null;
1883
+ const channelIssues = channelsStatus ? collectChannelStatusIssues(channelsStatus) : [];
1884
+ progress.tick();
1885
+ progress.setLabel("Summarizing channels…");
1886
+ const channels = await buildChannelsTable(cfg, { showSecrets: process.env.CLAWDBOT_SHOW_SECRETS?.trim() !== "0" });
1887
+ progress.tick();
1888
+ progress.setLabel("Checking memory…");
1889
+ const memoryPlugin = resolveMemoryPluginStatus(cfg);
1890
+ const memory = await (async () => {
1891
+ if (!memoryPlugin.enabled) return null;
1892
+ if (memoryPlugin.slot !== "memory-core") return null;
1893
+ const agentId = agentStatus.defaultId ?? "main";
1894
+ const { manager } = await getMemorySearchManager({
1895
+ cfg,
1896
+ agentId
1897
+ });
1898
+ if (!manager) return null;
1899
+ try {
1900
+ await manager.probeVectorAvailability();
1901
+ } catch {}
1902
+ const status = manager.status();
1903
+ await manager.close?.().catch(() => {});
1904
+ return {
1905
+ agentId,
1906
+ ...status
1907
+ };
1908
+ })();
1909
+ progress.tick();
1910
+ progress.setLabel("Reading sessions…");
1911
+ const summary = await getStatusSummary();
1912
+ progress.tick();
1913
+ progress.setLabel("Rendering…");
1914
+ progress.tick();
1915
+ return {
1916
+ cfg,
1917
+ osSummary,
1918
+ tailscaleMode,
1919
+ tailscaleDns,
1920
+ tailscaleHttpsUrl,
1921
+ update,
1922
+ gatewayConnection,
1923
+ remoteUrlMissing,
1924
+ gatewayMode,
1925
+ gatewayProbe,
1926
+ gatewayReachable,
1927
+ gatewaySelf,
1928
+ channelIssues,
1929
+ agentStatus,
1930
+ channels,
1931
+ summary,
1932
+ memory,
1933
+ memoryPlugin
1934
+ };
1935
+ });
1936
+ }
1937
+
1938
+ //#endregion
1939
+ //#region src/commands/status.command.ts
1940
+ async function statusCommand(opts, runtime) {
1941
+ if (opts.all && !opts.json) {
1942
+ await statusAllCommand(runtime, { timeoutMs: opts.timeoutMs });
1943
+ return;
1944
+ }
1945
+ const { cfg, osSummary, tailscaleMode, tailscaleDns, tailscaleHttpsUrl, update, gatewayConnection, remoteUrlMissing, gatewayMode, gatewayProbe, gatewayReachable, gatewaySelf, channelIssues, agentStatus, channels, summary, memory, memoryPlugin } = await scanStatus({
1946
+ json: opts.json,
1947
+ timeoutMs: opts.timeoutMs,
1948
+ all: opts.all
1949
+ }, runtime);
1950
+ const securityAudit = await withProgress({
1951
+ label: "Running security audit…",
1952
+ indeterminate: true,
1953
+ enabled: opts.json !== true
1954
+ }, async () => await runSecurityAudit({
1955
+ config: cfg,
1956
+ deep: false,
1957
+ includeFilesystem: true,
1958
+ includeChannelSecurity: true
1959
+ }));
1960
+ const usage = opts.usage ? await withProgress({
1961
+ label: "Fetching usage snapshot…",
1962
+ indeterminate: true,
1963
+ enabled: opts.json !== true
1964
+ }, async () => await loadProviderUsageSummary({ timeoutMs: opts.timeoutMs })) : void 0;
1965
+ const health = opts.deep ? await withProgress({
1966
+ label: "Checking gateway health…",
1967
+ indeterminate: true,
1968
+ enabled: opts.json !== true
1969
+ }, async () => await callGateway({
1970
+ method: "health",
1971
+ params: { probe: true },
1972
+ timeoutMs: opts.timeoutMs
1973
+ })) : void 0;
1974
+ const lastHeartbeat = opts.deep && gatewayReachable ? await callGateway({
1975
+ method: "last-heartbeat",
1976
+ params: {},
1977
+ timeoutMs: opts.timeoutMs
1978
+ }).catch(() => null) : null;
1979
+ const channelInfo = resolveEffectiveUpdateChannel({
1980
+ configChannel: normalizeUpdateChannel(cfg.update?.channel),
1981
+ installKind: update.installKind,
1982
+ git: update.git ? {
1983
+ tag: update.git.tag,
1984
+ branch: update.git.branch
1985
+ } : void 0
1986
+ });
1987
+ if (opts.json) {
1988
+ const [daemon, nodeDaemon] = await Promise.all([getDaemonStatusSummary(), getNodeDaemonStatusSummary()]);
1989
+ runtime.log(JSON.stringify({
1990
+ ...summary,
1991
+ os: osSummary,
1992
+ update,
1993
+ updateChannel: channelInfo.channel,
1994
+ updateChannelSource: channelInfo.source,
1995
+ memory,
1996
+ memoryPlugin,
1997
+ gateway: {
1998
+ mode: gatewayMode,
1999
+ url: gatewayConnection.url,
2000
+ urlSource: gatewayConnection.urlSource,
2001
+ misconfigured: remoteUrlMissing,
2002
+ reachable: gatewayReachable,
2003
+ connectLatencyMs: gatewayProbe?.connectLatencyMs ?? null,
2004
+ self: gatewaySelf,
2005
+ error: gatewayProbe?.error ?? null
2006
+ },
2007
+ gatewayService: daemon,
2008
+ nodeService: nodeDaemon,
2009
+ agents: agentStatus,
2010
+ securityAudit,
2011
+ ...health || usage || lastHeartbeat ? {
2012
+ health,
2013
+ usage,
2014
+ lastHeartbeat
2015
+ } : {}
2016
+ }, null, 2));
2017
+ return;
2018
+ }
2019
+ const muted = (value) => theme.muted(value);
2020
+ const ok = (value) => theme.success(value);
2021
+ const warn = (value) => theme.warn(value);
2022
+ if (opts.verbose) {
2023
+ const details = buildGatewayConnectionDetails();
2024
+ runtime.log(info("Gateway connection:"));
2025
+ for (const line of details.message.split("\n")) runtime.log(` ${line}`);
2026
+ runtime.log("");
2027
+ }
2028
+ const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
2029
+ const dashboard = (() => {
2030
+ if (!(cfg.gateway?.controlUi?.enabled ?? true)) return "disabled";
2031
+ return resolveControlUiLinks({
2032
+ port: resolveGatewayPort(cfg),
2033
+ bind: cfg.gateway?.bind,
2034
+ customBindHost: cfg.gateway?.customBindHost,
2035
+ basePath: cfg.gateway?.controlUi?.basePath
2036
+ }).httpUrl;
2037
+ })();
2038
+ const gatewayValue = (() => {
2039
+ const target = remoteUrlMissing ? `fallback ${gatewayConnection.url}` : `${gatewayConnection.url}${gatewayConnection.urlSource ? ` (${gatewayConnection.urlSource})` : ""}`;
2040
+ const reach = remoteUrlMissing ? warn("misconfigured (remote.url missing)") : gatewayReachable ? ok(`reachable ${formatDuration(gatewayProbe?.connectLatencyMs)}`) : warn(gatewayProbe?.error ? `unreachable (${gatewayProbe.error})` : "unreachable");
2041
+ const auth = gatewayReachable && !remoteUrlMissing ? ` · auth ${formatGatewayAuthUsed(resolveGatewayProbeAuth(cfg))}` : "";
2042
+ const self = gatewaySelf?.host || gatewaySelf?.version || gatewaySelf?.platform ? [
2043
+ gatewaySelf?.host ? gatewaySelf.host : null,
2044
+ gatewaySelf?.ip ? `(${gatewaySelf.ip})` : null,
2045
+ gatewaySelf?.version ? `app ${gatewaySelf.version}` : null,
2046
+ gatewaySelf?.platform ? gatewaySelf.platform : null
2047
+ ].filter(Boolean).join(" ") : null;
2048
+ return `${gatewayMode} · ${target} · ${reach}${auth}${self ? ` · ${self}` : ""}`;
2049
+ })();
2050
+ const agentsValue = (() => {
2051
+ const pending = agentStatus.bootstrapPendingCount > 0 ? `${agentStatus.bootstrapPendingCount} bootstrapping` : "no bootstraps";
2052
+ const def = agentStatus.agents.find((a) => a.id === agentStatus.defaultId);
2053
+ const defActive = def?.lastActiveAgeMs != null ? formatAge(def.lastActiveAgeMs) : "unknown";
2054
+ const defSuffix = def ? ` · default ${def.id} active ${defActive}` : "";
2055
+ return `${agentStatus.agents.length} · ${pending} · sessions ${agentStatus.totalSessions}${defSuffix}`;
2056
+ })();
2057
+ const [daemon, nodeDaemon] = await Promise.all([getDaemonStatusSummary(), getNodeDaemonStatusSummary()]);
2058
+ const daemonValue = (() => {
2059
+ if (daemon.installed === false) return `${daemon.label} not installed`;
2060
+ const installedPrefix = daemon.installed === true ? "installed · " : "";
2061
+ return `${daemon.label} ${installedPrefix}${daemon.loadedText}${daemon.runtimeShort ? ` · ${daemon.runtimeShort}` : ""}`;
2062
+ })();
2063
+ const nodeDaemonValue = (() => {
2064
+ if (nodeDaemon.installed === false) return `${nodeDaemon.label} not installed`;
2065
+ const installedPrefix = nodeDaemon.installed === true ? "installed · " : "";
2066
+ return `${nodeDaemon.label} ${installedPrefix}${nodeDaemon.loadedText}${nodeDaemon.runtimeShort ? ` · ${nodeDaemon.runtimeShort}` : ""}`;
2067
+ })();
2068
+ const defaults = summary.sessions.defaults;
2069
+ const defaultCtx = defaults.contextTokens ? ` (${formatKTokens(defaults.contextTokens)} ctx)` : "";
2070
+ const eventsValue = summary.queuedSystemEvents.length > 0 ? `${summary.queuedSystemEvents.length} queued` : "none";
2071
+ const probesValue = health ? ok("enabled") : muted("skipped (use --deep)");
2072
+ const heartbeatValue = (() => {
2073
+ const parts = summary.heartbeat.agents.map((agent) => {
2074
+ if (!agent.enabled || !agent.everyMs) return `disabled (${agent.agentId})`;
2075
+ return `${agent.every} (${agent.agentId})`;
2076
+ }).filter(Boolean);
2077
+ return parts.length > 0 ? parts.join(", ") : "disabled";
2078
+ })();
2079
+ const lastHeartbeatValue = (() => {
2080
+ if (!opts.deep) return null;
2081
+ if (!gatewayReachable) return warn("unavailable");
2082
+ if (!lastHeartbeat) return muted("none");
2083
+ const age = formatAge(Date.now() - lastHeartbeat.ts);
2084
+ const channel = lastHeartbeat.channel ?? "unknown";
2085
+ const accountLabel = lastHeartbeat.accountId ? `account ${lastHeartbeat.accountId}` : null;
2086
+ return [
2087
+ lastHeartbeat.status,
2088
+ `${age} ago`,
2089
+ channel,
2090
+ accountLabel
2091
+ ].filter(Boolean).join(" · ");
2092
+ })();
2093
+ const storeLabel = summary.sessions.paths.length > 1 ? `${summary.sessions.paths.length} stores` : summary.sessions.paths[0] ?? "unknown";
2094
+ const memoryValue = (() => {
2095
+ if (!memoryPlugin.enabled) return muted(`disabled${memoryPlugin.reason ? ` (${memoryPlugin.reason})` : ""}`);
2096
+ if (!memory) return muted(`enabled (${memoryPlugin.slot ? `plugin ${memoryPlugin.slot}` : "plugin"}) · unavailable`);
2097
+ const parts = [];
2098
+ const dirtySuffix = memory.dirty ? ` · ${warn("dirty")}` : "";
2099
+ parts.push(`${memory.files} files · ${memory.chunks} chunks${dirtySuffix}`);
2100
+ if (memory.sources?.length) parts.push(`sources ${memory.sources.join(", ")}`);
2101
+ if (memoryPlugin.slot) parts.push(`plugin ${memoryPlugin.slot}`);
2102
+ const colorByTone = (tone, text) => tone === "ok" ? ok(text) : tone === "warn" ? warn(text) : muted(text);
2103
+ const vector = memory.vector;
2104
+ if (vector) {
2105
+ const state = resolveMemoryVectorState(vector);
2106
+ const label = state.state === "disabled" ? "vector off" : `vector ${state.state}`;
2107
+ parts.push(colorByTone(state.tone, label));
2108
+ }
2109
+ const fts = memory.fts;
2110
+ if (fts) {
2111
+ const state = resolveMemoryFtsState(fts);
2112
+ const label = state.state === "disabled" ? "fts off" : `fts ${state.state}`;
2113
+ parts.push(colorByTone(state.tone, label));
2114
+ }
2115
+ const cache = memory.cache;
2116
+ if (cache) {
2117
+ const summary = resolveMemoryCacheSummary(cache);
2118
+ parts.push(colorByTone(summary.tone, summary.text));
2119
+ }
2120
+ return parts.join(" · ");
2121
+ })();
2122
+ const updateAvailability = resolveUpdateAvailability(update);
2123
+ const updateLine = formatUpdateOneLiner(update).replace(/^Update:\s*/i, "");
2124
+ const channelLabel = formatUpdateChannelLabel({
2125
+ channel: channelInfo.channel,
2126
+ source: channelInfo.source,
2127
+ gitTag: update.git?.tag ?? null,
2128
+ gitBranch: update.git?.branch ?? null
2129
+ });
2130
+ const gitLabel = update.installKind === "git" ? (() => {
2131
+ const shortSha = update.git?.sha ? update.git.sha.slice(0, 8) : null;
2132
+ const branch = update.git?.branch && update.git.branch !== "HEAD" ? update.git.branch : null;
2133
+ const tag = update.git?.tag ?? null;
2134
+ return [
2135
+ branch ?? (tag ? "detached" : "git"),
2136
+ tag ? `tag ${tag}` : null,
2137
+ shortSha ? `@ ${shortSha}` : null
2138
+ ].filter(Boolean).join(" · ");
2139
+ })() : null;
2140
+ const overviewRows = [
2141
+ {
2142
+ Item: "Dashboard",
2143
+ Value: dashboard
2144
+ },
2145
+ {
2146
+ Item: "OS",
2147
+ Value: `${osSummary.label} · node ${process.versions.node}`
2148
+ },
2149
+ {
2150
+ Item: "Tailscale",
2151
+ Value: tailscaleMode === "off" ? muted("off") : tailscaleDns && tailscaleHttpsUrl ? `${tailscaleMode} · ${tailscaleDns} · ${tailscaleHttpsUrl}` : warn(`${tailscaleMode} · magicdns unknown`)
2152
+ },
2153
+ {
2154
+ Item: "Channel",
2155
+ Value: channelLabel
2156
+ },
2157
+ ...gitLabel ? [{
2158
+ Item: "Git",
2159
+ Value: gitLabel
2160
+ }] : [],
2161
+ {
2162
+ Item: "Update",
2163
+ Value: updateAvailability.available ? warn(`available · ${updateLine}`) : updateLine
2164
+ },
2165
+ {
2166
+ Item: "Gateway",
2167
+ Value: gatewayValue
2168
+ },
2169
+ {
2170
+ Item: "Gateway service",
2171
+ Value: daemonValue
2172
+ },
2173
+ {
2174
+ Item: "Node service",
2175
+ Value: nodeDaemonValue
2176
+ },
2177
+ {
2178
+ Item: "Agents",
2179
+ Value: agentsValue
2180
+ },
2181
+ {
2182
+ Item: "Memory",
2183
+ Value: memoryValue
2184
+ },
2185
+ {
2186
+ Item: "Probes",
2187
+ Value: probesValue
2188
+ },
2189
+ {
2190
+ Item: "Events",
2191
+ Value: eventsValue
2192
+ },
2193
+ {
2194
+ Item: "Heartbeat",
2195
+ Value: heartbeatValue
2196
+ },
2197
+ ...lastHeartbeatValue ? [{
2198
+ Item: "Last heartbeat",
2199
+ Value: lastHeartbeatValue
2200
+ }] : [],
2201
+ {
2202
+ Item: "Sessions",
2203
+ Value: `${summary.sessions.count} active · default ${defaults.model ?? "unknown"}${defaultCtx} · ${storeLabel}`
2204
+ }
2205
+ ];
2206
+ runtime.log(theme.heading("OpenClaw status"));
2207
+ runtime.log("");
2208
+ runtime.log(theme.heading("Overview"));
2209
+ runtime.log(renderTable({
2210
+ width: tableWidth,
2211
+ columns: [{
2212
+ key: "Item",
2213
+ header: "Item",
2214
+ minWidth: 12
2215
+ }, {
2216
+ key: "Value",
2217
+ header: "Value",
2218
+ flex: true,
2219
+ minWidth: 32
2220
+ }],
2221
+ rows: overviewRows
2222
+ }).trimEnd());
2223
+ runtime.log("");
2224
+ runtime.log(theme.heading("Security audit"));
2225
+ const fmtSummary = (value) => {
2226
+ return [
2227
+ theme.error(`${value.critical} critical`),
2228
+ theme.warn(`${value.warn} warn`),
2229
+ theme.muted(`${value.info} info`)
2230
+ ].join(" · ");
2231
+ };
2232
+ runtime.log(theme.muted(`Summary: ${fmtSummary(securityAudit.summary)}`));
2233
+ const importantFindings = securityAudit.findings.filter((f) => f.severity === "critical" || f.severity === "warn");
2234
+ if (importantFindings.length === 0) runtime.log(theme.muted("No critical or warn findings detected."));
2235
+ else {
2236
+ const severityLabel = (sev) => {
2237
+ if (sev === "critical") return theme.error("CRITICAL");
2238
+ if (sev === "warn") return theme.warn("WARN");
2239
+ return theme.muted("INFO");
2240
+ };
2241
+ const sevRank = (sev) => sev === "critical" ? 0 : sev === "warn" ? 1 : 2;
2242
+ const sorted = [...importantFindings].toSorted((a, b) => sevRank(a.severity) - sevRank(b.severity));
2243
+ const shown = sorted.slice(0, 6);
2244
+ for (const f of shown) {
2245
+ runtime.log(` ${severityLabel(f.severity)} ${f.title}`);
2246
+ runtime.log(` ${shortenText(f.detail.replaceAll("\n", " "), 160)}`);
2247
+ if (f.remediation?.trim()) runtime.log(` ${theme.muted(`Fix: ${f.remediation.trim()}`)}`);
2248
+ }
2249
+ if (sorted.length > shown.length) runtime.log(theme.muted(`… +${sorted.length - shown.length} more`));
2250
+ }
2251
+ runtime.log(theme.muted(`Full report: ${formatCliCommand("openclaw security audit")}`));
2252
+ runtime.log(theme.muted(`Deep probe: ${formatCliCommand("openclaw security audit --deep")}`));
2253
+ runtime.log("");
2254
+ runtime.log(theme.heading("Channels"));
2255
+ const channelIssuesByChannel = (() => {
2256
+ const map = /* @__PURE__ */ new Map();
2257
+ for (const issue of channelIssues) {
2258
+ const key = issue.channel;
2259
+ const list = map.get(key);
2260
+ if (list) list.push(issue);
2261
+ else map.set(key, [issue]);
2262
+ }
2263
+ return map;
2264
+ })();
2265
+ runtime.log(renderTable({
2266
+ width: tableWidth,
2267
+ columns: [
2268
+ {
2269
+ key: "Channel",
2270
+ header: "Channel",
2271
+ minWidth: 10
2272
+ },
2273
+ {
2274
+ key: "Enabled",
2275
+ header: "Enabled",
2276
+ minWidth: 7
2277
+ },
2278
+ {
2279
+ key: "State",
2280
+ header: "State",
2281
+ minWidth: 8
2282
+ },
2283
+ {
2284
+ key: "Detail",
2285
+ header: "Detail",
2286
+ flex: true,
2287
+ minWidth: 24
2288
+ }
2289
+ ],
2290
+ rows: channels.rows.map((row) => {
2291
+ const issues = channelIssuesByChannel.get(row.id) ?? [];
2292
+ const effectiveState = row.state === "off" ? "off" : issues.length > 0 ? "warn" : row.state;
2293
+ const issueSuffix = issues.length > 0 ? ` · ${warn(`gateway: ${shortenText(issues[0]?.message ?? "issue", 84)}`)}` : "";
2294
+ return {
2295
+ Channel: row.label,
2296
+ Enabled: row.enabled ? ok("ON") : muted("OFF"),
2297
+ State: effectiveState === "ok" ? ok("OK") : effectiveState === "warn" ? warn("WARN") : effectiveState === "off" ? muted("OFF") : theme.accentDim("SETUP"),
2298
+ Detail: `${row.detail}${issueSuffix}`
2299
+ };
2300
+ })
2301
+ }).trimEnd());
2302
+ runtime.log("");
2303
+ runtime.log(theme.heading("Sessions"));
2304
+ runtime.log(renderTable({
2305
+ width: tableWidth,
2306
+ columns: [
2307
+ {
2308
+ key: "Key",
2309
+ header: "Key",
2310
+ minWidth: 20,
2311
+ flex: true
2312
+ },
2313
+ {
2314
+ key: "Kind",
2315
+ header: "Kind",
2316
+ minWidth: 6
2317
+ },
2318
+ {
2319
+ key: "Age",
2320
+ header: "Age",
2321
+ minWidth: 9
2322
+ },
2323
+ {
2324
+ key: "Model",
2325
+ header: "Model",
2326
+ minWidth: 14
2327
+ },
2328
+ {
2329
+ key: "Tokens",
2330
+ header: "Tokens",
2331
+ minWidth: 16
2332
+ }
2333
+ ],
2334
+ rows: summary.sessions.recent.length > 0 ? summary.sessions.recent.map((sess) => ({
2335
+ Key: shortenText(sess.key, 32),
2336
+ Kind: sess.kind,
2337
+ Age: sess.updatedAt ? formatAge(sess.age) : "no activity",
2338
+ Model: sess.model ?? "unknown",
2339
+ Tokens: formatTokensCompact(sess)
2340
+ })) : [{
2341
+ Key: muted("no sessions yet"),
2342
+ Kind: "",
2343
+ Age: "",
2344
+ Model: "",
2345
+ Tokens: ""
2346
+ }]
2347
+ }).trimEnd());
2348
+ if (summary.queuedSystemEvents.length > 0) {
2349
+ runtime.log("");
2350
+ runtime.log(theme.heading("System events"));
2351
+ runtime.log(renderTable({
2352
+ width: tableWidth,
2353
+ columns: [{
2354
+ key: "Event",
2355
+ header: "Event",
2356
+ flex: true,
2357
+ minWidth: 24
2358
+ }],
2359
+ rows: summary.queuedSystemEvents.slice(0, 5).map((event) => ({ Event: event }))
2360
+ }).trimEnd());
2361
+ if (summary.queuedSystemEvents.length > 5) runtime.log(muted(`… +${summary.queuedSystemEvents.length - 5} more`));
2362
+ }
2363
+ if (health) {
2364
+ runtime.log("");
2365
+ runtime.log(theme.heading("Health"));
2366
+ const rows = [];
2367
+ rows.push({
2368
+ Item: "Gateway",
2369
+ Status: ok("reachable"),
2370
+ Detail: `${health.durationMs}ms`
2371
+ });
2372
+ for (const line of formatHealthChannelLines(health, { accountMode: "all" })) {
2373
+ const colon = line.indexOf(":");
2374
+ if (colon === -1) continue;
2375
+ const item = line.slice(0, colon).trim();
2376
+ const detail = line.slice(colon + 1).trim();
2377
+ const normalized = detail.toLowerCase();
2378
+ const status = (() => {
2379
+ if (normalized.startsWith("ok")) return ok("OK");
2380
+ if (normalized.startsWith("failed")) return warn("WARN");
2381
+ if (normalized.startsWith("not configured")) return muted("OFF");
2382
+ if (normalized.startsWith("configured")) return ok("OK");
2383
+ if (normalized.startsWith("linked")) return ok("LINKED");
2384
+ if (normalized.startsWith("not linked")) return warn("UNLINKED");
2385
+ return warn("WARN");
2386
+ })();
2387
+ rows.push({
2388
+ Item: item,
2389
+ Status: status,
2390
+ Detail: detail
2391
+ });
2392
+ }
2393
+ runtime.log(renderTable({
2394
+ width: tableWidth,
2395
+ columns: [
2396
+ {
2397
+ key: "Item",
2398
+ header: "Item",
2399
+ minWidth: 10
2400
+ },
2401
+ {
2402
+ key: "Status",
2403
+ header: "Status",
2404
+ minWidth: 8
2405
+ },
2406
+ {
2407
+ key: "Detail",
2408
+ header: "Detail",
2409
+ flex: true,
2410
+ minWidth: 28
2411
+ }
2412
+ ],
2413
+ rows
2414
+ }).trimEnd());
2415
+ }
2416
+ if (usage) {
2417
+ runtime.log("");
2418
+ runtime.log(theme.heading("Usage"));
2419
+ for (const line of formatUsageReportLines(usage)) runtime.log(line);
2420
+ }
2421
+ runtime.log("");
2422
+ runtime.log("FAQ: https://docs.openclaw.ai/faq");
2423
+ runtime.log("Troubleshooting: https://docs.openclaw.ai/troubleshooting");
2424
+ runtime.log("");
2425
+ const updateHint = formatUpdateAvailableHint(update);
2426
+ if (updateHint) {
2427
+ runtime.log(theme.warn(updateHint));
2428
+ runtime.log("");
2429
+ }
2430
+ runtime.log("Next steps:");
2431
+ runtime.log(` Need to share? ${formatCliCommand("openclaw status --all")}`);
2432
+ runtime.log(` Need to debug live? ${formatCliCommand("openclaw logs --follow")}`);
2433
+ if (gatewayReachable) runtime.log(` Need to test channels? ${formatCliCommand("openclaw status --deep")}`);
2434
+ else runtime.log(` Fix reachability first: ${formatCliCommand("openclaw gateway probe")}`);
2435
+ }
2436
+
2437
+ //#endregion
2438
+ //#region src/commands/onboard-hooks.ts
2439
+ async function setupInternalHooks(cfg, runtime, prompter) {
2440
+ await prompter.note([
2441
+ "Hooks let you automate actions when agent commands are issued.",
2442
+ "Example: Save session context to memory when you issue /new.",
2443
+ "",
2444
+ "Learn more: https://docs.openclaw.ai/hooks"
2445
+ ].join("\n"), "Hooks");
2446
+ const eligibleHooks = buildWorkspaceHookStatus(resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)), { config: cfg }).hooks.filter((h) => h.eligible);
2447
+ if (eligibleHooks.length === 0) {
2448
+ await prompter.note("No eligible hooks found. You can configure hooks later in your config.", "No Hooks Available");
2449
+ return cfg;
2450
+ }
2451
+ const selected = (await prompter.multiselect({
2452
+ message: "Enable hooks?",
2453
+ options: [{
2454
+ value: "__skip__",
2455
+ label: "Skip for now"
2456
+ }, ...eligibleHooks.map((hook) => ({
2457
+ value: hook.name,
2458
+ label: `${hook.emoji ?? "🔗"} ${hook.name}`,
2459
+ hint: hook.description
2460
+ }))]
2461
+ })).filter((name) => name !== "__skip__");
2462
+ if (selected.length === 0) return cfg;
2463
+ const entries = { ...cfg.hooks?.internal?.entries };
2464
+ for (const name of selected) entries[name] = { enabled: true };
2465
+ const next = {
2466
+ ...cfg,
2467
+ hooks: {
2468
+ ...cfg.hooks,
2469
+ internal: {
2470
+ enabled: true,
2471
+ entries
2472
+ }
2473
+ }
2474
+ };
2475
+ await prompter.note([
2476
+ `Enabled ${selected.length} hook${selected.length > 1 ? "s" : ""}: ${selected.join(", ")}`,
2477
+ "",
2478
+ "You can manage hooks later with:",
2479
+ ` ${formatCliCommand("openclaw hooks list")}`,
2480
+ ` ${formatCliCommand("openclaw hooks enable <name>")}`,
2481
+ ` ${formatCliCommand("openclaw hooks disable <name>")}`
2482
+ ].join("\n"), "Hooks Configured");
2483
+ return next;
2484
+ }
2485
+
2486
+ //#endregion
2487
+ //#region src/wizard/onboarding.finalize.ts
2488
+ async function finalizeOnboardingWizard(options) {
2489
+ const { flow, opts, baseConfig, nextConfig, settings, prompter, runtime } = options;
2490
+ const withWizardProgress = async (label, options, work) => {
2491
+ const progress = prompter.progress(label);
2492
+ try {
2493
+ return await work(progress);
2494
+ } finally {
2495
+ progress.stop(options.doneMessage);
2496
+ }
2497
+ };
2498
+ const systemdAvailable = process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
2499
+ if (process.platform === "linux" && !systemdAvailable) await prompter.note("Systemd user services are unavailable. Skipping lingering checks and service install.", "Systemd");
2500
+ if (process.platform === "linux" && systemdAvailable) {
2501
+ const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-DFHJcGck.js").then((n) => n.r);
2502
+ await ensureSystemdUserLingerInteractive({
2503
+ runtime,
2504
+ prompter: {
2505
+ confirm: prompter.confirm,
2506
+ note: prompter.note
2507
+ },
2508
+ reason: "Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.",
2509
+ requireConfirm: false
2510
+ });
2511
+ }
2512
+ const explicitInstallDaemon = typeof opts.installDaemon === "boolean" ? opts.installDaemon : void 0;
2513
+ let installDaemon;
2514
+ if (explicitInstallDaemon !== void 0) installDaemon = explicitInstallDaemon;
2515
+ else if (process.platform === "linux" && !systemdAvailable) installDaemon = false;
2516
+ else if (flow === "quickstart") installDaemon = true;
2517
+ else installDaemon = await prompter.confirm({
2518
+ message: "Install Gateway service (recommended)",
2519
+ initialValue: true
2520
+ });
2521
+ if (process.platform === "linux" && !systemdAvailable && installDaemon) {
2522
+ await prompter.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.", "Gateway service");
2523
+ installDaemon = false;
2524
+ }
2525
+ if (installDaemon) {
2526
+ const daemonRuntime = flow === "quickstart" ? DEFAULT_GATEWAY_DAEMON_RUNTIME : await prompter.select({
2527
+ message: "Gateway service runtime",
2528
+ options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
2529
+ initialValue: opts.daemonRuntime ?? DEFAULT_GATEWAY_DAEMON_RUNTIME
2530
+ });
2531
+ if (flow === "quickstart") await prompter.note("QuickStart uses Node for the Gateway service (stable + supported).", "Gateway service runtime");
2532
+ const service = resolveGatewayService();
2533
+ const loaded = await service.isLoaded({ env: process.env });
2534
+ if (loaded) {
2535
+ const action = await prompter.select({
2536
+ message: "Gateway service already installed",
2537
+ options: [
2538
+ {
2539
+ value: "restart",
2540
+ label: "Restart"
2541
+ },
2542
+ {
2543
+ value: "reinstall",
2544
+ label: "Reinstall"
2545
+ },
2546
+ {
2547
+ value: "skip",
2548
+ label: "Skip"
2549
+ }
2550
+ ]
2551
+ });
2552
+ if (action === "restart") await withWizardProgress("Gateway service", { doneMessage: "Gateway service restarted." }, async (progress) => {
2553
+ progress.update("Restarting Gateway service…");
2554
+ await service.restart({
2555
+ env: process.env,
2556
+ stdout: process.stdout
2557
+ });
2558
+ });
2559
+ else if (action === "reinstall") await withWizardProgress("Gateway service", { doneMessage: "Gateway service uninstalled." }, async (progress) => {
2560
+ progress.update("Uninstalling Gateway service…");
2561
+ await service.uninstall({
2562
+ env: process.env,
2563
+ stdout: process.stdout
2564
+ });
2565
+ });
2566
+ }
2567
+ if (!loaded || loaded && !await service.isLoaded({ env: process.env })) {
2568
+ const progress = prompter.progress("Gateway service");
2569
+ let installError = null;
2570
+ try {
2571
+ progress.update("Preparing Gateway service…");
2572
+ const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
2573
+ env: process.env,
2574
+ port: settings.port,
2575
+ token: settings.gatewayToken,
2576
+ runtime: daemonRuntime,
2577
+ warn: (message, title) => prompter.note(message, title),
2578
+ config: nextConfig
2579
+ });
2580
+ progress.update("Installing Gateway service…");
2581
+ await service.install({
2582
+ env: process.env,
2583
+ stdout: process.stdout,
2584
+ programArguments,
2585
+ workingDirectory,
2586
+ environment
2587
+ });
2588
+ } catch (err) {
2589
+ installError = err instanceof Error ? err.message : String(err);
2590
+ } finally {
2591
+ progress.stop(installError ? "Gateway service install failed." : "Gateway service installed.");
2592
+ }
2593
+ if (installError) {
2594
+ await prompter.note(`Gateway service install failed: ${installError}`, "Gateway");
2595
+ await prompter.note(gatewayInstallErrorHint(), "Gateway");
2596
+ }
2597
+ }
2598
+ }
2599
+ if (!opts.skipHealth) {
2600
+ await waitForGatewayReachable({
2601
+ url: resolveControlUiLinks({
2602
+ bind: nextConfig.gateway?.bind ?? "loopback",
2603
+ port: settings.port,
2604
+ customBindHost: nextConfig.gateway?.customBindHost,
2605
+ basePath: void 0
2606
+ }).wsUrl,
2607
+ token: settings.gatewayToken,
2608
+ deadlineMs: 15e3
2609
+ });
2610
+ try {
2611
+ await healthCommand({
2612
+ json: false,
2613
+ timeoutMs: 1e4
2614
+ }, runtime);
2615
+ } catch (err) {
2616
+ runtime.error(formatHealthCheckFailure(err));
2617
+ await prompter.note([
2618
+ "Docs:",
2619
+ "https://docs.openclaw.ai/gateway/health",
2620
+ "https://docs.openclaw.ai/gateway/troubleshooting"
2621
+ ].join("\n"), "Health check help");
2622
+ }
2623
+ }
2624
+ const controlUiEnabled = nextConfig.gateway?.controlUi?.enabled ?? baseConfig.gateway?.controlUi?.enabled ?? true;
2625
+ if (!opts.skipUi && controlUiEnabled) {
2626
+ const controlUiAssets = await ensureControlUiAssetsBuilt(runtime);
2627
+ if (!controlUiAssets.ok && controlUiAssets.message) runtime.error(controlUiAssets.message);
2628
+ }
2629
+ await prompter.note([
2630
+ "Add nodes for extra features:",
2631
+ "- macOS app (system + notifications)",
2632
+ "- iOS app (camera/canvas)",
2633
+ "- Android app (camera/canvas)"
2634
+ ].join("\n"), "Optional apps");
2635
+ const controlUiBasePath = nextConfig.gateway?.controlUi?.basePath ?? baseConfig.gateway?.controlUi?.basePath;
2636
+ const links = resolveControlUiLinks({
2637
+ bind: settings.bind,
2638
+ port: settings.port,
2639
+ customBindHost: settings.customBindHost,
2640
+ basePath: controlUiBasePath
2641
+ });
2642
+ const authedUrl = settings.authMode === "token" && settings.gatewayToken ? `${links.httpUrl}#token=${encodeURIComponent(settings.gatewayToken)}` : links.httpUrl;
2643
+ const gatewayProbe = await probeGatewayReachable({
2644
+ url: links.wsUrl,
2645
+ token: settings.authMode === "token" ? settings.gatewayToken : void 0,
2646
+ password: settings.authMode === "password" ? nextConfig.gateway?.auth?.password : ""
2647
+ });
2648
+ const gatewayStatusLine = gatewayProbe.ok ? "Gateway: reachable" : `Gateway: not detected${gatewayProbe.detail ? ` (${gatewayProbe.detail})` : ""}`;
2649
+ const bootstrapPath = path.join(resolveUserPath(options.workspaceDir), DEFAULT_BOOTSTRAP_FILENAME);
2650
+ const hasBootstrap = await fs$1.access(bootstrapPath).then(() => true).catch(() => false);
2651
+ await prompter.note([
2652
+ `Web UI: ${links.httpUrl}`,
2653
+ settings.authMode === "token" && settings.gatewayToken ? `Web UI (with token): ${authedUrl}` : void 0,
2654
+ `Gateway WS: ${links.wsUrl}`,
2655
+ gatewayStatusLine,
2656
+ "Docs: https://docs.openclaw.ai/web/control-ui"
2657
+ ].filter(Boolean).join("\n"), "Control UI");
2658
+ let controlUiOpened = false;
2659
+ let controlUiOpenHint;
2660
+ let hatchChoice = null;
2661
+ let launchedTui = false;
2662
+ if (!opts.skipUi && gatewayProbe.ok) {
2663
+ if (hasBootstrap) await prompter.note([
2664
+ "This is the defining action that makes your agent you.",
2665
+ "Please take your time.",
2666
+ "The more you tell it, the better the experience will be.",
2667
+ "We will send: \"Wake up, my friend!\""
2668
+ ].join("\n"), "Start TUI (best option!)");
2669
+ await prompter.note([
2670
+ "Gateway token: shared auth for the Gateway + Control UI.",
2671
+ "Stored in: ~/.openclaw/openclaw.json (gateway.auth.token) or OPENCLAW_GATEWAY_TOKEN.",
2672
+ `View token: ${formatCliCommand("openclaw config get gateway.auth.token")}`,
2673
+ `Generate token: ${formatCliCommand("openclaw doctor --generate-gateway-token")}`,
2674
+ "Web UI stores a copy in this browser's localStorage (openclaw.control.settings.v1).",
2675
+ `Open the dashboard anytime: ${formatCliCommand("openclaw dashboard --no-open")}`,
2676
+ "If prompted: paste the token into Control UI settings (or use the tokenized dashboard URL)."
2677
+ ].join("\n"), "Token");
2678
+ hatchChoice = await prompter.select({
2679
+ message: "How do you want to hatch your bot?",
2680
+ options: [
2681
+ {
2682
+ value: "tui",
2683
+ label: "Hatch in TUI (recommended)"
2684
+ },
2685
+ {
2686
+ value: "web",
2687
+ label: "Open the Web UI"
2688
+ },
2689
+ {
2690
+ value: "later",
2691
+ label: "Do this later"
2692
+ }
2693
+ ],
2694
+ initialValue: "tui"
2695
+ });
2696
+ if (hatchChoice === "tui") {
2697
+ restoreTerminalState("pre-onboarding tui");
2698
+ await runTui({
2699
+ url: links.wsUrl,
2700
+ token: settings.authMode === "token" ? settings.gatewayToken : void 0,
2701
+ password: settings.authMode === "password" ? nextConfig.gateway?.auth?.password : "",
2702
+ deliver: false,
2703
+ message: hasBootstrap ? "Wake up, my friend!" : void 0
2704
+ });
2705
+ launchedTui = true;
2706
+ } else if (hatchChoice === "web") {
2707
+ if ((await detectBrowserOpenSupport()).ok) {
2708
+ controlUiOpened = await openUrl(authedUrl);
2709
+ if (!controlUiOpened) controlUiOpenHint = formatControlUiSshHint({
2710
+ port: settings.port,
2711
+ basePath: controlUiBasePath,
2712
+ token: settings.authMode === "token" ? settings.gatewayToken : void 0
2713
+ });
2714
+ } else controlUiOpenHint = formatControlUiSshHint({
2715
+ port: settings.port,
2716
+ basePath: controlUiBasePath,
2717
+ token: settings.authMode === "token" ? settings.gatewayToken : void 0
2718
+ });
2719
+ await prompter.note([
2720
+ `Dashboard link (with token): ${authedUrl}`,
2721
+ controlUiOpened ? "Opened in your browser. Keep that tab to control OpenClaw." : "Copy/paste this URL in a browser on this machine to control OpenClaw.",
2722
+ controlUiOpenHint
2723
+ ].filter(Boolean).join("\n"), "Dashboard ready");
2724
+ } else await prompter.note(`When you're ready: ${formatCliCommand("openclaw dashboard --no-open")}`, "Later");
2725
+ } else if (opts.skipUi) await prompter.note("Skipping Control UI/TUI prompts.", "Control UI");
2726
+ await prompter.note(["Back up your agent workspace.", "Docs: https://docs.openclaw.ai/concepts/agent-workspace"].join("\n"), "Workspace backup");
2727
+ await prompter.note("Running agents on your computer is risky — harden your setup: https://docs.openclaw.ai/security", "Security");
2728
+ const cliName = resolveCliName();
2729
+ const completionStatus = await checkShellCompletionStatus(cliName);
2730
+ if (completionStatus.usesSlowPattern) {
2731
+ if (await ensureCompletionCacheExists(cliName)) await installCompletion(completionStatus.shell, true, cliName);
2732
+ } else if (completionStatus.profileInstalled && !completionStatus.cacheExists) await ensureCompletionCacheExists(cliName);
2733
+ else if (!completionStatus.profileInstalled) {
2734
+ if (await prompter.confirm({
2735
+ message: `Enable ${completionStatus.shell} shell completion for ${cliName}?`,
2736
+ initialValue: true
2737
+ })) if (await ensureCompletionCacheExists(cliName)) {
2738
+ await installCompletion(completionStatus.shell, true, cliName);
2739
+ const profileHint = completionStatus.shell === "zsh" ? "~/.zshrc" : completionStatus.shell === "bash" ? "~/.bashrc" : "~/.config/fish/config.fish";
2740
+ await prompter.note(`Shell completion installed. Restart your shell or run: source ${profileHint}`, "Shell completion");
2741
+ } else await prompter.note(`Failed to generate completion cache. Run \`${cliName} completion --install\` later.`, "Shell completion");
2742
+ }
2743
+ if (!opts.skipUi && settings.authMode === "token" && Boolean(settings.gatewayToken) && hatchChoice === null) {
2744
+ if ((await detectBrowserOpenSupport()).ok) {
2745
+ controlUiOpened = await openUrl(authedUrl);
2746
+ if (!controlUiOpened) controlUiOpenHint = formatControlUiSshHint({
2747
+ port: settings.port,
2748
+ basePath: controlUiBasePath,
2749
+ token: settings.gatewayToken
2750
+ });
2751
+ } else controlUiOpenHint = formatControlUiSshHint({
2752
+ port: settings.port,
2753
+ basePath: controlUiBasePath,
2754
+ token: settings.gatewayToken
2755
+ });
2756
+ await prompter.note([
2757
+ `Dashboard link (with token): ${authedUrl}`,
2758
+ controlUiOpened ? "Opened in your browser. Keep that tab to control OpenClaw." : "Copy/paste this URL in a browser on this machine to control OpenClaw.",
2759
+ controlUiOpenHint
2760
+ ].filter(Boolean).join("\n"), "Dashboard ready");
2761
+ }
2762
+ const webSearchKey = (nextConfig.tools?.web?.search?.apiKey ?? "").trim();
2763
+ const webSearchEnv = (process.env.BRAVE_API_KEY ?? "").trim();
2764
+ const hasWebSearchKey = Boolean(webSearchKey || webSearchEnv);
2765
+ await prompter.note(hasWebSearchKey ? [
2766
+ "Web search is enabled, so your agent can look things up online when needed.",
2767
+ "",
2768
+ webSearchKey ? "API key: stored in config (tools.web.search.apiKey)." : "API key: provided via BRAVE_API_KEY env var (Gateway environment).",
2769
+ "Docs: https://docs.openclaw.ai/tools/web"
2770
+ ].join("\n") : [
2771
+ "If you want your agent to be able to search the web, you’ll need an API key.",
2772
+ "",
2773
+ "OpenClaw uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search won’t work.",
2774
+ "",
2775
+ "Set it up interactively:",
2776
+ `- Run: ${formatCliCommand("openclaw configure --section web")}`,
2777
+ "- Enable web_search and paste your Brave Search API key",
2778
+ "",
2779
+ "Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes).",
2780
+ "Docs: https://docs.openclaw.ai/tools/web"
2781
+ ].join("\n"), "Web search (optional)");
2782
+ await prompter.note("What now: https://openclaw.ai/showcase (\"What People Are Building\").", "What now");
2783
+ await prompter.outro(controlUiOpened ? "Onboarding complete. Dashboard opened; keep that tab to control OpenClaw." : "Onboarding complete. Use the dashboard link above to control OpenClaw.");
2784
+ return { launchedTui };
2785
+ }
2786
+
2787
+ //#endregion
2788
+ //#region src/wizard/onboarding.gateway-config.ts
2789
+ async function configureGatewayForOnboarding(opts) {
2790
+ const { flow, localPort, quickstartGateway, prompter } = opts;
2791
+ let { nextConfig } = opts;
2792
+ const port = flow === "quickstart" ? quickstartGateway.port : Number.parseInt(String(await prompter.text({
2793
+ message: "Gateway port",
2794
+ initialValue: String(localPort),
2795
+ validate: (value) => Number.isFinite(Number(value)) ? void 0 : "Invalid port"
2796
+ })), 10);
2797
+ let bind = flow === "quickstart" ? quickstartGateway.bind : await prompter.select({
2798
+ message: "Gateway bind",
2799
+ options: [
2800
+ {
2801
+ value: "loopback",
2802
+ label: "Loopback (127.0.0.1)"
2803
+ },
2804
+ {
2805
+ value: "lan",
2806
+ label: "LAN (0.0.0.0)"
2807
+ },
2808
+ {
2809
+ value: "tailnet",
2810
+ label: "Tailnet (Tailscale IP)"
2811
+ },
2812
+ {
2813
+ value: "auto",
2814
+ label: "Auto (Loopback → LAN)"
2815
+ },
2816
+ {
2817
+ value: "custom",
2818
+ label: "Custom IP"
2819
+ }
2820
+ ]
2821
+ });
2822
+ let customBindHost = quickstartGateway.customBindHost;
2823
+ if (bind === "custom") {
2824
+ if (flow !== "quickstart" || !customBindHost) {
2825
+ const input = await prompter.text({
2826
+ message: "Custom IP address",
2827
+ placeholder: "192.168.1.100",
2828
+ initialValue: customBindHost ?? "",
2829
+ validate: (value) => {
2830
+ if (!value) return "IP address is required for custom bind mode";
2831
+ const parts = value.trim().split(".");
2832
+ if (parts.length !== 4) return "Invalid IPv4 address (e.g., 192.168.1.100)";
2833
+ if (parts.every((part) => {
2834
+ const n = parseInt(part, 10);
2835
+ return !Number.isNaN(n) && n >= 0 && n <= 255 && part === String(n);
2836
+ })) return;
2837
+ return "Invalid IPv4 address (each octet must be 0-255)";
2838
+ }
2839
+ });
2840
+ customBindHost = typeof input === "string" ? input.trim() : void 0;
2841
+ }
2842
+ }
2843
+ let authMode = flow === "quickstart" ? quickstartGateway.authMode : await prompter.select({
2844
+ message: "Gateway auth",
2845
+ options: [{
2846
+ value: "token",
2847
+ label: "Token",
2848
+ hint: "Recommended default (local + remote)"
2849
+ }, {
2850
+ value: "password",
2851
+ label: "Password"
2852
+ }],
2853
+ initialValue: "token"
2854
+ });
2855
+ const tailscaleMode = flow === "quickstart" ? quickstartGateway.tailscaleMode : await prompter.select({
2856
+ message: "Tailscale exposure",
2857
+ options: [
2858
+ {
2859
+ value: "off",
2860
+ label: "Off",
2861
+ hint: "No Tailscale exposure"
2862
+ },
2863
+ {
2864
+ value: "serve",
2865
+ label: "Serve",
2866
+ hint: "Private HTTPS for your tailnet (devices on Tailscale)"
2867
+ },
2868
+ {
2869
+ value: "funnel",
2870
+ label: "Funnel",
2871
+ hint: "Public HTTPS via Tailscale Funnel (internet)"
2872
+ }
2873
+ ]
2874
+ });
2875
+ if (tailscaleMode !== "off") {
2876
+ if (!await findTailscaleBinary()) await prompter.note([
2877
+ "Tailscale binary not found in PATH or /Applications.",
2878
+ "Ensure Tailscale is installed from:",
2879
+ " https://tailscale.com/download/mac",
2880
+ "",
2881
+ "You can continue setup, but serve/funnel will fail at runtime."
2882
+ ].join("\n"), "Tailscale Warning");
2883
+ }
2884
+ let tailscaleResetOnExit = flow === "quickstart" ? quickstartGateway.tailscaleResetOnExit : false;
2885
+ if (tailscaleMode !== "off" && flow !== "quickstart") {
2886
+ await prompter.note([
2887
+ "Docs:",
2888
+ "https://docs.openclaw.ai/gateway/tailscale",
2889
+ "https://docs.openclaw.ai/web"
2890
+ ].join("\n"), "Tailscale");
2891
+ tailscaleResetOnExit = Boolean(await prompter.confirm({
2892
+ message: "Reset Tailscale serve/funnel on exit?",
2893
+ initialValue: false
2894
+ }));
2895
+ }
2896
+ if (tailscaleMode !== "off" && bind !== "loopback") {
2897
+ await prompter.note("Tailscale requires bind=loopback. Adjusting bind to loopback.", "Note");
2898
+ bind = "loopback";
2899
+ customBindHost = void 0;
2900
+ }
2901
+ if (tailscaleMode === "funnel" && authMode !== "password") {
2902
+ await prompter.note("Tailscale funnel requires password auth.", "Note");
2903
+ authMode = "password";
2904
+ }
2905
+ let gatewayToken;
2906
+ if (authMode === "token") if (flow === "quickstart") gatewayToken = quickstartGateway.token ?? randomToken();
2907
+ else gatewayToken = normalizeGatewayTokenInput(await prompter.text({
2908
+ message: "Gateway token (blank to generate)",
2909
+ placeholder: "Needed for multi-machine or non-loopback access",
2910
+ initialValue: quickstartGateway.token ?? ""
2911
+ })) || randomToken();
2912
+ if (authMode === "password") {
2913
+ const password = flow === "quickstart" && quickstartGateway.password ? quickstartGateway.password : await prompter.text({
2914
+ message: "Gateway password",
2915
+ validate: (value) => value?.trim() ? void 0 : "Required"
2916
+ });
2917
+ nextConfig = {
2918
+ ...nextConfig,
2919
+ gateway: {
2920
+ ...nextConfig.gateway,
2921
+ auth: {
2922
+ ...nextConfig.gateway?.auth,
2923
+ mode: "password",
2924
+ password: String(password).trim()
2925
+ }
2926
+ }
2927
+ };
2928
+ } else if (authMode === "token") nextConfig = {
2929
+ ...nextConfig,
2930
+ gateway: {
2931
+ ...nextConfig.gateway,
2932
+ auth: {
2933
+ ...nextConfig.gateway?.auth,
2934
+ mode: "token",
2935
+ token: gatewayToken
2936
+ }
2937
+ }
2938
+ };
2939
+ nextConfig = {
2940
+ ...nextConfig,
2941
+ gateway: {
2942
+ ...nextConfig.gateway,
2943
+ port,
2944
+ bind,
2945
+ ...bind === "custom" && customBindHost ? { customBindHost } : {},
2946
+ tailscale: {
2947
+ ...nextConfig.gateway?.tailscale,
2948
+ mode: tailscaleMode,
2949
+ resetOnExit: tailscaleResetOnExit
2950
+ }
2951
+ }
2952
+ };
2953
+ return {
2954
+ nextConfig,
2955
+ settings: {
2956
+ port,
2957
+ bind,
2958
+ customBindHost: bind === "custom" ? customBindHost : void 0,
2959
+ authMode,
2960
+ gatewayToken,
2961
+ tailscaleMode,
2962
+ tailscaleResetOnExit
2963
+ }
2964
+ };
2965
+ }
2966
+
2967
+ //#endregion
2968
+ //#region src/wizard/onboarding.ts
2969
+ async function requireRiskAcknowledgement(params) {
2970
+ if (params.opts.acceptRisk === true) return;
2971
+ await params.prompter.note([
2972
+ "Security warning — please read.",
2973
+ "",
2974
+ "OpenClaw is a hobby project and still in beta. Expect sharp edges.",
2975
+ "This bot can read files and run actions if tools are enabled.",
2976
+ "A bad prompt can trick it into doing unsafe things.",
2977
+ "",
2978
+ "If you’re not comfortable with basic security and access control, don’t run OpenClaw.",
2979
+ "Ask someone experienced to help before enabling tools or exposing it to the internet.",
2980
+ "",
2981
+ "Recommended baseline:",
2982
+ "- Pairing/allowlists + mention gating.",
2983
+ "- Sandbox + least-privilege tools.",
2984
+ "- Keep secrets out of the agent’s reachable filesystem.",
2985
+ "- Use the strongest available model for any bot with tools or untrusted inboxes.",
2986
+ "",
2987
+ "Run regularly:",
2988
+ "openclaw security audit --deep",
2989
+ "openclaw security audit --fix",
2990
+ "",
2991
+ "Must read: https://docs.openclaw.ai/gateway/security"
2992
+ ].join("\n"), "Security");
2993
+ if (!await params.prompter.confirm({
2994
+ message: "I understand this is powerful and inherently risky. Continue?",
2995
+ initialValue: false
2996
+ })) throw new WizardCancelledError("risk not accepted");
2997
+ }
2998
+ async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
2999
+ printWizardHeader(runtime);
3000
+ await prompter.intro("OpenClaw onboarding");
3001
+ await requireRiskAcknowledgement({
3002
+ opts,
3003
+ prompter
3004
+ });
3005
+ const snapshot = await readConfigFileSnapshot();
3006
+ let baseConfig = snapshot.valid ? snapshot.config : {};
3007
+ if (snapshot.exists && !snapshot.valid) {
3008
+ await prompter.note(summarizeExistingConfig(baseConfig), "Invalid config");
3009
+ if (snapshot.issues.length > 0) await prompter.note([
3010
+ ...snapshot.issues.map((iss) => `- ${iss.path}: ${iss.message}`),
3011
+ "",
3012
+ "Docs: https://docs.openclaw.ai/gateway/configuration"
3013
+ ].join("\n"), "Config issues");
3014
+ await prompter.outro(`Config invalid. Run \`${formatCliCommand("openclaw doctor")}\` to repair it, then re-run onboarding.`);
3015
+ runtime.exit(1);
3016
+ return;
3017
+ }
3018
+ const quickstartHint = `Configure details later via ${formatCliCommand("openclaw configure")}.`;
3019
+ const manualHint = "Configure port, network, Tailscale, and auth options.";
3020
+ const explicitFlowRaw = opts.flow?.trim();
3021
+ const normalizedExplicitFlow = explicitFlowRaw === "manual" ? "advanced" : explicitFlowRaw;
3022
+ if (normalizedExplicitFlow && normalizedExplicitFlow !== "quickstart" && normalizedExplicitFlow !== "advanced") {
3023
+ runtime.error("Invalid --flow (use quickstart, manual, or advanced).");
3024
+ runtime.exit(1);
3025
+ return;
3026
+ }
3027
+ let flow = (normalizedExplicitFlow === "quickstart" || normalizedExplicitFlow === "advanced" ? normalizedExplicitFlow : void 0) ?? await prompter.select({
3028
+ message: "Onboarding mode",
3029
+ options: [{
3030
+ value: "quickstart",
3031
+ label: "QuickStart",
3032
+ hint: quickstartHint
3033
+ }, {
3034
+ value: "advanced",
3035
+ label: "Manual",
3036
+ hint: manualHint
3037
+ }],
3038
+ initialValue: "quickstart"
3039
+ });
3040
+ if (opts.mode === "remote" && flow === "quickstart") {
3041
+ await prompter.note("QuickStart only supports local gateways. Switching to Manual mode.", "QuickStart");
3042
+ flow = "advanced";
3043
+ }
3044
+ if (snapshot.exists) {
3045
+ await prompter.note(summarizeExistingConfig(baseConfig), "Existing config detected");
3046
+ if (await prompter.select({
3047
+ message: "Config handling",
3048
+ options: [
3049
+ {
3050
+ value: "keep",
3051
+ label: "Use existing values"
3052
+ },
3053
+ {
3054
+ value: "modify",
3055
+ label: "Update values"
3056
+ },
3057
+ {
3058
+ value: "reset",
3059
+ label: "Reset"
3060
+ }
3061
+ ]
3062
+ }) === "reset") {
3063
+ const workspaceDefault = baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE;
3064
+ await handleReset(await prompter.select({
3065
+ message: "Reset scope",
3066
+ options: [
3067
+ {
3068
+ value: "config",
3069
+ label: "Config only"
3070
+ },
3071
+ {
3072
+ value: "config+creds+sessions",
3073
+ label: "Config + creds + sessions"
3074
+ },
3075
+ {
3076
+ value: "full",
3077
+ label: "Full reset (config + creds + sessions + workspace)"
3078
+ }
3079
+ ]
3080
+ }), resolveUserPath(workspaceDefault), runtime);
3081
+ baseConfig = {};
3082
+ }
3083
+ }
3084
+ const quickstartGateway = (() => {
3085
+ const hasExisting = typeof baseConfig.gateway?.port === "number" || baseConfig.gateway?.bind !== void 0 || baseConfig.gateway?.auth?.mode !== void 0 || baseConfig.gateway?.auth?.token !== void 0 || baseConfig.gateway?.auth?.password !== void 0 || baseConfig.gateway?.customBindHost !== void 0 || baseConfig.gateway?.tailscale?.mode !== void 0;
3086
+ const bindRaw = baseConfig.gateway?.bind;
3087
+ const bind = bindRaw === "loopback" || bindRaw === "lan" || bindRaw === "auto" || bindRaw === "custom" || bindRaw === "tailnet" ? bindRaw : "loopback";
3088
+ let authMode = "token";
3089
+ if (baseConfig.gateway?.auth?.mode === "token" || baseConfig.gateway?.auth?.mode === "password") authMode = baseConfig.gateway.auth.mode;
3090
+ else if (baseConfig.gateway?.auth?.token) authMode = "token";
3091
+ else if (baseConfig.gateway?.auth?.password) authMode = "password";
3092
+ const tailscaleRaw = baseConfig.gateway?.tailscale?.mode;
3093
+ const tailscaleMode = tailscaleRaw === "off" || tailscaleRaw === "serve" || tailscaleRaw === "funnel" ? tailscaleRaw : "off";
3094
+ return {
3095
+ hasExisting,
3096
+ port: resolveGatewayPort(baseConfig),
3097
+ bind,
3098
+ authMode,
3099
+ tailscaleMode,
3100
+ token: baseConfig.gateway?.auth?.token,
3101
+ password: baseConfig.gateway?.auth?.password,
3102
+ customBindHost: baseConfig.gateway?.customBindHost,
3103
+ tailscaleResetOnExit: baseConfig.gateway?.tailscale?.resetOnExit ?? false
3104
+ };
3105
+ })();
3106
+ if (flow === "quickstart") {
3107
+ const formatBind = (value) => {
3108
+ if (value === "loopback") return "Loopback (127.0.0.1)";
3109
+ if (value === "lan") return "LAN";
3110
+ if (value === "custom") return "Custom IP";
3111
+ if (value === "tailnet") return "Tailnet (Tailscale IP)";
3112
+ return "Auto";
3113
+ };
3114
+ const formatAuth = (value) => {
3115
+ if (value === "token") return "Token (default)";
3116
+ return "Password";
3117
+ };
3118
+ const formatTailscale = (value) => {
3119
+ if (value === "off") return "Off";
3120
+ if (value === "serve") return "Serve";
3121
+ return "Funnel";
3122
+ };
3123
+ const quickstartLines = quickstartGateway.hasExisting ? [
3124
+ "Keeping your current gateway settings:",
3125
+ `Gateway port: ${quickstartGateway.port}`,
3126
+ `Gateway bind: ${formatBind(quickstartGateway.bind)}`,
3127
+ ...quickstartGateway.bind === "custom" && quickstartGateway.customBindHost ? [`Gateway custom IP: ${quickstartGateway.customBindHost}`] : [],
3128
+ `Gateway auth: ${formatAuth(quickstartGateway.authMode)}`,
3129
+ `Tailscale exposure: ${formatTailscale(quickstartGateway.tailscaleMode)}`,
3130
+ "Direct to chat channels."
3131
+ ] : [
3132
+ `Gateway port: ${DEFAULT_GATEWAY_PORT}`,
3133
+ "Gateway bind: Loopback (127.0.0.1)",
3134
+ "Gateway auth: Token (default)",
3135
+ "Tailscale exposure: Off",
3136
+ "Direct to chat channels."
3137
+ ];
3138
+ await prompter.note(quickstartLines.join("\n"), "QuickStart");
3139
+ }
3140
+ const localPort = resolveGatewayPort(baseConfig);
3141
+ const localUrl = `ws://127.0.0.1:${localPort}`;
3142
+ const localProbe = await probeGatewayReachable({
3143
+ url: localUrl,
3144
+ token: baseConfig.gateway?.auth?.token ?? process.env.OPENCLAW_GATEWAY_TOKEN,
3145
+ password: baseConfig.gateway?.auth?.password ?? process.env.OPENCLAW_GATEWAY_PASSWORD
3146
+ });
3147
+ const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
3148
+ const remoteProbe = remoteUrl ? await probeGatewayReachable({
3149
+ url: remoteUrl,
3150
+ token: baseConfig.gateway?.remote?.token
3151
+ }) : null;
3152
+ const mode = opts.mode ?? (flow === "quickstart" ? "local" : await prompter.select({
3153
+ message: "What do you want to set up?",
3154
+ options: [{
3155
+ value: "local",
3156
+ label: "Local gateway (this machine)",
3157
+ hint: localProbe.ok ? `Gateway reachable (${localUrl})` : `No gateway detected (${localUrl})`
3158
+ }, {
3159
+ value: "remote",
3160
+ label: "Remote gateway (info-only)",
3161
+ hint: !remoteUrl ? "No remote URL configured yet" : remoteProbe?.ok ? `Gateway reachable (${remoteUrl})` : `Configured but unreachable (${remoteUrl})`
3162
+ }]
3163
+ }));
3164
+ if (mode === "remote") {
3165
+ let nextConfig = await promptRemoteGatewayConfig(baseConfig, prompter);
3166
+ nextConfig = applyWizardMetadata(nextConfig, {
3167
+ command: "onboard",
3168
+ mode
3169
+ });
3170
+ await writeConfigFile(nextConfig);
3171
+ logConfigUpdated(runtime);
3172
+ await prompter.outro("Remote gateway configured.");
3173
+ return;
3174
+ }
3175
+ const workspaceDir = resolveUserPath((opts.workspace ?? (flow === "quickstart" ? baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE : await prompter.text({
3176
+ message: "Workspace directory",
3177
+ initialValue: baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE
3178
+ }))).trim() || DEFAULT_WORKSPACE);
3179
+ let nextConfig = {
3180
+ ...baseConfig,
3181
+ agents: {
3182
+ ...baseConfig.agents,
3183
+ defaults: {
3184
+ ...baseConfig.agents?.defaults,
3185
+ workspace: workspaceDir
3186
+ }
3187
+ },
3188
+ gateway: {
3189
+ ...baseConfig.gateway,
3190
+ mode: "local"
3191
+ }
3192
+ };
3193
+ const authStore = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
3194
+ const authChoiceFromPrompt = opts.authChoice === void 0;
3195
+ const authChoice = opts.authChoice ?? await promptAuthChoiceGrouped({
3196
+ prompter,
3197
+ store: authStore,
3198
+ includeSkip: true
3199
+ });
3200
+ nextConfig = (await applyAuthChoice({
3201
+ authChoice,
3202
+ config: nextConfig,
3203
+ prompter,
3204
+ runtime,
3205
+ setDefaultModel: true,
3206
+ opts: {
3207
+ tokenProvider: opts.tokenProvider,
3208
+ token: opts.authChoice === "apiKey" && opts.token ? opts.token : void 0
3209
+ }
3210
+ })).config;
3211
+ if (authChoiceFromPrompt) {
3212
+ const modelSelection = await promptDefaultModel({
3213
+ config: nextConfig,
3214
+ prompter,
3215
+ allowKeep: true,
3216
+ ignoreAllowlist: true,
3217
+ preferredProvider: resolvePreferredProviderForAuthChoice(authChoice)
3218
+ });
3219
+ if (modelSelection.model) nextConfig = applyPrimaryModel(nextConfig, modelSelection.model);
3220
+ }
3221
+ await warnIfModelConfigLooksOff(nextConfig, prompter);
3222
+ const gateway = await configureGatewayForOnboarding({
3223
+ flow,
3224
+ baseConfig,
3225
+ nextConfig,
3226
+ localPort,
3227
+ quickstartGateway,
3228
+ prompter,
3229
+ runtime
3230
+ });
3231
+ nextConfig = gateway.nextConfig;
3232
+ const settings = gateway.settings;
3233
+ if (opts.skipChannels ?? opts.skipProviders) await prompter.note("Skipping channel setup.", "Channels");
3234
+ else {
3235
+ const quickstartAllowFromChannels = flow === "quickstart" ? listChannelPlugins().filter((plugin) => plugin.meta.quickstartAllowFrom).map((plugin) => plugin.id) : [];
3236
+ nextConfig = await setupChannels(nextConfig, runtime, prompter, {
3237
+ allowSignalInstall: true,
3238
+ forceAllowFromChannels: quickstartAllowFromChannels,
3239
+ skipDmPolicyPrompt: flow === "quickstart",
3240
+ skipConfirm: flow === "quickstart",
3241
+ quickstartDefaults: flow === "quickstart"
3242
+ });
3243
+ }
3244
+ await writeConfigFile(nextConfig);
3245
+ logConfigUpdated(runtime);
3246
+ await ensureWorkspaceAndSessions(workspaceDir, runtime, { skipBootstrap: Boolean(nextConfig.agents?.defaults?.skipBootstrap) });
3247
+ if (opts.skipSkills) await prompter.note("Skipping skills setup.", "Skills");
3248
+ else nextConfig = await setupSkills(nextConfig, workspaceDir, runtime, prompter);
3249
+ nextConfig = await setupInternalHooks(nextConfig, runtime, prompter);
3250
+ nextConfig = applyWizardMetadata(nextConfig, {
3251
+ command: "onboard",
3252
+ mode
3253
+ });
3254
+ await writeConfigFile(nextConfig);
3255
+ const { launchedTui } = await finalizeOnboardingWizard({
3256
+ flow,
3257
+ opts,
3258
+ baseConfig,
3259
+ nextConfig,
3260
+ workspaceDir,
3261
+ settings,
3262
+ prompter,
3263
+ runtime
3264
+ });
3265
+ if (launchedTui) return;
3266
+ }
3267
+
3268
+ //#endregion
3269
+ export { buildAgentSummaries as a, loadAgentIdentity as c, loadAgentIdentityFromWorkspace as d, parseIdentityMarkdown as f, applyAgentConfig as i, pruneAgentConfig as l, statusCommand as n, findAgentEntryIndex as o, forceFreePortAndWait as p, getStatusSummary as r, listAgentEntries as s, runOnboardingWizard as t, identityHasValues as u };