silentlake 3.0.0

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 (4151) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +205 -0
  3. package/dist/APEv2Parser-BZv_dP9t.js +269 -0
  4. package/dist/APEv2Parser-CPzxFNBB.js +5 -0
  5. package/dist/AbstractID3Parser-mvDFcjYV.js +47 -0
  6. package/dist/AiffParser-BXQ9SRZk.js +145 -0
  7. package/dist/AsfParser-CmBDUlZE.js +631 -0
  8. package/dist/BasicParser-DhmXREDo.js +853 -0
  9. package/dist/DsdiffParser-CTKKGyZg.js +150 -0
  10. package/dist/DsfParser-Ds-YQe4Z.js +101 -0
  11. package/dist/FlacParser-B1XVPgXF.js +5 -0
  12. package/dist/FlacParser-DMPyL1y4.js +367 -0
  13. package/dist/ID3v1Parser-BICWWVDG.js +289 -0
  14. package/dist/ID3v2Parser-BmZHSUqs.js +650 -0
  15. package/dist/ID3v2Token-DeJf4tYQ.js +145 -0
  16. package/dist/MP4Parser-Cjf-Zs8T.js +1061 -0
  17. package/dist/MatroskaParser-DgBzBe8t.js +909 -0
  18. package/dist/MpegParser-D5swTpA1.js +744 -0
  19. package/dist/MusepackParser-D8EQXnpK.js +285 -0
  20. package/dist/OggParser-BcIYPHwP.js +390 -0
  21. package/dist/Util-D_zGsr97.js +170 -0
  22. package/dist/WavPackParser-hosU8gfo.js +166 -0
  23. package/dist/WaveParser-CA00FZrC.js +273 -0
  24. package/dist/abort-cutoff-CERmtgZI.js +56 -0
  25. package/dist/abort-cutoff.runtime-BuaoE5Si.js +61 -0
  26. package/dist/abort-signal-CsrBEr94.js +13 -0
  27. package/dist/account-helpers-D3c_eI7c.js +37 -0
  28. package/dist/account-helpers-ru3jdZSV.js +12 -0
  29. package/dist/account-id-DZnNZg8x.js +1 -0
  30. package/dist/account-id-ZCrgXl7Z.js +44 -0
  31. package/dist/account-lookup-nkoa-foB.js +10 -0
  32. package/dist/account-snapshot-fields-Cvq7803C.js +116 -0
  33. package/dist/account-summary-B5Xzvntm.js +36 -0
  34. package/dist/accounts-CYgFhv2o.js +105 -0
  35. package/dist/accounts-ChlyF7cx.js +112 -0
  36. package/dist/accounts-Fyrhtztr.js +212 -0
  37. package/dist/ack-reactions-CNVwfOBj.js +43 -0
  38. package/dist/acp-cli-BIcgXTaP.js +2033 -0
  39. package/dist/acp-runtime-BdLdT-QY.js +1 -0
  40. package/dist/actions.runtime-BBPvLwDK.js +236 -0
  41. package/dist/actions.runtime-MrkZQbUZ.js +217 -0
  42. package/dist/agent-CBOdzEvR.js +1 -0
  43. package/dist/agent-scope-BLhzf-o0.js +17 -0
  44. package/dist/agent-scope-DPP4Z_UU.js +193 -0
  45. package/dist/agents-DGJIvby1.js +323 -0
  46. package/dist/agents-DbUUarGq.js +855 -0
  47. package/dist/agents.config-C_lrnc9J.js +18 -0
  48. package/dist/agents.config-D1VqC78r.js +121 -0
  49. package/dist/allow-from-BPSBITdd.js +9 -0
  50. package/dist/allow-from-BwTLpvhp.js +20 -0
  51. package/dist/allow-from-C4iBpqFI.js +62 -0
  52. package/dist/allowlist-config-edit-CKbnMmwS.js +279 -0
  53. package/dist/allowlist-match-CYmPgg1K.js +63 -0
  54. package/dist/ansi-BEJF8NKS.js +54 -0
  55. package/dist/anthropic-vertex-provider-Dd5agCN9.js +60 -0
  56. package/dist/apply.runtime-BO_W7UsB.js +211 -0
  57. package/dist/apply.runtime-BeYLuuGy.js +370 -0
  58. package/dist/archive-Tr0wIUO-.js +532 -0
  59. package/dist/arg-split-Dtda0YDl.js +38 -0
  60. package/dist/artifacts-C_4LekPC.js +39 -0
  61. package/dist/audit-COaaGhfd.js +788 -0
  62. package/dist/audit-OWBlbPvC.js +54 -0
  63. package/dist/audit-channel.allow-from.runtime-B7BHNblL.js +17 -0
  64. package/dist/audit-channel.collect.runtime-BjAagjy5.js +521 -0
  65. package/dist/audit-channel.discord.runtime-BBY6S9lg.js +5 -0
  66. package/dist/audit-channel.telegram.runtime-SJnxOJH2.js +8 -0
  67. package/dist/audit-channel.zalouser.runtime-SGRWvHxT.js +5 -0
  68. package/dist/audit-extra.async-Brlm785b.js +817 -0
  69. package/dist/audit-fs-oDMUa5N_.js +375 -0
  70. package/dist/audit-membership-runtime-BV4yo8s2.js +261 -0
  71. package/dist/audit.deep.runtime-C4qycPyC.js +31 -0
  72. package/dist/audit.nondeep.runtime-BKadRetL.js +842 -0
  73. package/dist/audit.runtime-n3hTkevZ.js +74 -0
  74. package/dist/auth-O6LQFLHJ.js +416 -0
  75. package/dist/auth-choice-D-8Ti3vA.js +219 -0
  76. package/dist/auth-choice-DN87_4lW.js +610 -0
  77. package/dist/auth-choice-in4GYJhH.js +64 -0
  78. package/dist/auth-choice-legacy-Clyw2lVc.js +17 -0
  79. package/dist/auth-choice-options-Bu05kzZL.js +127 -0
  80. package/dist/auth-choice-prompt-BCN6pEXi.js +215 -0
  81. package/dist/auth-choice-prompt-CtrY5wqR.js +36 -0
  82. package/dist/auth-choice.apply-helpers-BibBSEl9.js +66 -0
  83. package/dist/auth-choice.plugin-providers.runtime-T3IBLR0k.js +219 -0
  84. package/dist/auth-health-BKOrx-5O.js +166 -0
  85. package/dist/auth-mode-policy-DywddkT-.js +18 -0
  86. package/dist/auth-profiles-CDiIWpd-.js +1047 -0
  87. package/dist/auth-profiles.runtime-SDKdG_z_.js +48 -0
  88. package/dist/avatar-policy-Ds9e6uHI.js +67 -0
  89. package/dist/backup-create-CwfGrmvZ.js +461 -0
  90. package/dist/banner-TF-M94dP.js +351 -0
  91. package/dist/base-session-key-Cf2rkwag.js +14 -0
  92. package/dist/bindings-BV4AtNSY.js +21 -0
  93. package/dist/bindings-kjwuC11Q.js +69 -0
  94. package/dist/bluebubbles-C1M3Geg0.js +87 -0
  95. package/dist/bluebubbles-CahJ717x.js +603 -0
  96. package/dist/bluebubbles-dEl4QpYz.js +37 -0
  97. package/dist/bonjour-discovery-C2oY96BG.js +376 -0
  98. package/dist/boolean-DKtCJu_W.js +29 -0
  99. package/dist/boolean-param-xAGXUSSN.js +13 -0
  100. package/dist/boundary-file-read-BP6VMpqH.js +106 -0
  101. package/dist/boundary-path-B3FFLYNx.js +557 -0
  102. package/dist/brave--q9r6diS.js +405 -0
  103. package/dist/brew-DSwWqzLd.js +44 -0
  104. package/dist/browser-cli-BLE-cZxz.js +1502 -0
  105. package/dist/build-info.json +5 -0
  106. package/dist/bundled/boot-md/HOOK.md +20 -0
  107. package/dist/bundled/boot-md/handler.js +381 -0
  108. package/dist/bundled/bootstrap-extra-files/HOOK.md +53 -0
  109. package/dist/bundled/bootstrap-extra-files/handler.js +56 -0
  110. package/dist/bundled/command-logger/HOOK.md +122 -0
  111. package/dist/bundled/command-logger/handler.js +62 -0
  112. package/dist/bundled/session-memory/HOOK.md +109 -0
  113. package/dist/bundled/session-memory/handler.js +401 -0
  114. package/dist/call-6gyz3vtP.js +44 -0
  115. package/dist/call-I0SGvyU7.js +639 -0
  116. package/dist/canvas-host/a2ui/.bundle.hash +1 -0
  117. package/dist/canvas-host/a2ui/a2ui.bundle.js +1 -0
  118. package/dist/canvas-host/a2ui/index.html +307 -0
  119. package/dist/catalog-BwAYUfL7.js +240 -0
  120. package/dist/channel-5NZHO7iU.js +4945 -0
  121. package/dist/channel-BJK4S8ZH.js +1006 -0
  122. package/dist/channel-CNodzoey.js +321 -0
  123. package/dist/channel-UyhyMj09.js +1077 -0
  124. package/dist/channel-account-context-DXI4NQFD.js +104 -0
  125. package/dist/channel-actions-DU2CR3xW.js +37 -0
  126. package/dist/channel-activity-B8aReQoE.js +35 -0
  127. package/dist/channel-config-3Uv6ve2_.js +115 -0
  128. package/dist/channel-config-helpers-ChUYvBB0.js +377 -0
  129. package/dist/channel-config-schema-DEVsCZpj.js +1 -0
  130. package/dist/channel-feedback-G6zh8efr.js +245 -0
  131. package/dist/channel-inbound-3L_8TOZ0.js +395 -0
  132. package/dist/channel-lifecycle-CpU1dRbh.js +354 -0
  133. package/dist/channel-options-DJaIP4Dv.js +38 -0
  134. package/dist/channel-pairing-rNA4qQPY.js +66 -0
  135. package/dist/channel-pb3INhpi.js +1284 -0
  136. package/dist/channel-plugin-common-BhTxCE5t.js +1 -0
  137. package/dist/channel-plugin-ids-CFeS3qir.js +26 -0
  138. package/dist/channel-plugin-resolution-BSK2VmVJ.js +112 -0
  139. package/dist/channel-policy-C4GKHvhz.js +1 -0
  140. package/dist/channel-reply-pipeline-CPTuaW8n.js +15 -0
  141. package/dist/channel-send-result-By8EpCPw.js +40 -0
  142. package/dist/channel-setup-BiFBGGLd.js +49 -0
  143. package/dist/channel-shared-B7nVL6s_.js +308 -0
  144. package/dist/channel-summary-BDcfGPTZ.js +137 -0
  145. package/dist/channel-summary-rf4JbM-W.js +41 -0
  146. package/dist/channel-targets-DfnKGXez.js +87 -0
  147. package/dist/channel-xTzNVpmF.js +1602 -0
  148. package/dist/channel.runtime-BgaUUB7d.js +268 -0
  149. package/dist/channel.runtime-C3f_klCw.js +324 -0
  150. package/dist/channel.runtime-CdJxCNlJ.js +512 -0
  151. package/dist/channel.runtime-CzzQWPgu.js +35 -0
  152. package/dist/channel.runtime-PVCKVe5x.js +288 -0
  153. package/dist/channel.runtime-jBXnZL1S.js +230 -0
  154. package/dist/channels-CRtKc7T_.js +1393 -0
  155. package/dist/channels-XmRcwHO_.js +408 -0
  156. package/dist/channels-cli-BgTInHdf.js +412 -0
  157. package/dist/channels-status-issues-C_U44M8Y.js +16 -0
  158. package/dist/chat-type-C-n03mQY.js +10 -0
  159. package/dist/clack-prompter-DuzDnaLi.js +112 -0
  160. package/dist/clawbot-cli-lS6Ntjly.js +218 -0
  161. package/dist/cli/daemon-cli.js +9 -0
  162. package/dist/cli-DBYk4h7a.js +254 -0
  163. package/dist/cli-name-Daok7A7-.js +25 -0
  164. package/dist/cli-runtime-aAVwbEYy.js +7 -0
  165. package/dist/cli-startup-metadata.json +26 -0
  166. package/dist/cli-utils-Np4NAAtt.js +39 -0
  167. package/dist/command-format-CjE6bLiz.js +21 -0
  168. package/dist/command-format-D7pz5AcU.js +2 -0
  169. package/dist/command-gating-BQXGSqc9.js +40 -0
  170. package/dist/command-options-5coRiipK.js +25 -0
  171. package/dist/command-poll-backoff-CpkSns-6.js +56 -0
  172. package/dist/command-poll-backoff.runtime-YT6EGcLN.js +7 -0
  173. package/dist/command-registry-BYuNrgu_.js +14 -0
  174. package/dist/command-registry-Dkr1-w1Q.js +242 -0
  175. package/dist/command-secret-gateway-u-EjduIr.js +211 -0
  176. package/dist/command-secret-targets-COcwhn-D.js +88 -0
  177. package/dist/command-secret-targets-CQJT3viO.js +3 -0
  178. package/dist/commands-Bb9xUwz9.js +42 -0
  179. package/dist/commands-core-CD6RD8UX.js +4923 -0
  180. package/dist/commands-core.runtime-DhRG5rok.js +232 -0
  181. package/dist/commands-registry-ChCep1KJ.js +295 -0
  182. package/dist/commands-registry.data-XyUTELK9.js +904 -0
  183. package/dist/commands-registry.runtime-m5WTxFtv.js +25 -0
  184. package/dist/commands-status.runtime-DZwdZgLZ.js +211 -0
  185. package/dist/commands.runtime-BbpkbBbI.js +232 -0
  186. package/dist/common-CUBlLRXB.js +457 -0
  187. package/dist/compact.runtime-DwG4Ix3B.js +216 -0
  188. package/dist/completion-cli-CYjSNenV.js +17 -0
  189. package/dist/completion-cli-CuQ2VNX5.js +445 -0
  190. package/dist/config-6sZwvXJD.js +88 -0
  191. package/dist/config-C-Ef7QhH.js +23 -0
  192. package/dist/config-DdDLrP_v.js +273 -0
  193. package/dist/config-Dgkla4O3.js +38 -0
  194. package/dist/config-cli-BV16bUmI.js +945 -0
  195. package/dist/config-guard-BcYEe-kl.js +126 -0
  196. package/dist/config-helpers-3u5wfLBu.js +117 -0
  197. package/dist/config-presence-BmUF_5K9.js +79 -0
  198. package/dist/config-regex-CvZFnWkO.js +39 -0
  199. package/dist/config-runtime-CstET7fq.js +142 -0
  200. package/dist/config-schema-5YkIW1xw.js +270 -0
  201. package/dist/config-schema-B1UGMwZ8.js +31 -0
  202. package/dist/config-schema-DzlnsY3D.js +33 -0
  203. package/dist/config-state-CE0CGjey.js +288 -0
  204. package/dist/config-validation-BEVsnUBu.js +272 -0
  205. package/dist/config-value-DgJrpclm.js +25 -0
  206. package/dist/configure-CRx5OThC.js +1126 -0
  207. package/dist/configure-D4Lh7bhs.js +344 -0
  208. package/dist/connection-auth-CB_IINnP.js +30 -0
  209. package/dist/constants-C_Scc680.js +71 -0
  210. package/dist/control-ui/apple-touch-icon.png +0 -0
  211. package/dist/control-ui/assets/index-BS0un8Wb.js +18 -0
  212. package/dist/control-ui/assets/index-DkMftoEy.css +1 -0
  213. package/dist/control-ui/favicon-32.png +0 -0
  214. package/dist/control-ui/favicon.ico +0 -0
  215. package/dist/control-ui/favicon.svg +22 -0
  216. package/dist/control-ui/index.html +17 -0
  217. package/dist/control-ui-assets-DjqeIg6A.js +232 -0
  218. package/dist/control-ui-shared-DP000Pxd.js +29 -0
  219. package/dist/conversation-runtime-zmG5YBsE.js +1458 -0
  220. package/dist/core-BV7ewUK4.js +187 -0
  221. package/dist/core-command-descriptors-CuKGKQIe.js +96 -0
  222. package/dist/credentials-BPwBlm1X.js +265 -0
  223. package/dist/cron-cli-CQlFbxlu.js +579 -0
  224. package/dist/daemon-cli-COhDevTB.js +354 -0
  225. package/dist/daemon-install-Ma4HdDtf.js +134 -0
  226. package/dist/daemon-install-plan.shared-cFfBUeV2.js +222 -0
  227. package/dist/daemon-runtime-CbClrCwc.js +12 -0
  228. package/dist/dangerous-config-flags-BJtLWIk7.js +15 -0
  229. package/dist/dangerous-name-matching-DZa_t0RM.js +44 -0
  230. package/dist/dangerous-tools-yGPDFTHh.js +27 -0
  231. package/dist/date-time-DCAyaBop.js +118 -0
  232. package/dist/dedupe-Cgnk5BbX.js +55 -0
  233. package/dist/defaults-CEdZhIIb.js +6 -0
  234. package/dist/delegate-DTiRmxH5.js +43 -0
  235. package/dist/deliver-BUIGBDbK.js +212 -0
  236. package/dist/deliver-runtime-BY7Zrac7.js +211 -0
  237. package/dist/delivery-queue-B19wDCjT.js +3 -0
  238. package/dist/delivery-queue-DrrqB4Hi.js +299 -0
  239. package/dist/device-auth-GEXe9vqR.js +15 -0
  240. package/dist/device-bootstrap-CwwokLEY.js +96 -0
  241. package/dist/device-bootstrap-Dbhe6oe8.js +1 -0
  242. package/dist/device-metadata-normalization-BDSQ_eA7.js +21 -0
  243. package/dist/device-pairing-CeI55dBv.js +560 -0
  244. package/dist/devices-cli-BXm0dkB2.js +366 -0
  245. package/dist/diagnostic-DBAi0Q5B.js +310 -0
  246. package/dist/diagnostic-events-ktCoG8Br.js +48 -0
  247. package/dist/diagnostics-QM3vI6rj.js +14 -0
  248. package/dist/diagnostics-XVyUA90d.js +33 -0
  249. package/dist/directive-handling.fast-lane-C7se5K_I.js +273 -0
  250. package/dist/directive-handling.impl-DMqj3m0-.js +638 -0
  251. package/dist/directive-handling.impl-aong_bNF.js +214 -0
  252. package/dist/directive-handling.levels-8vnMeuGX.js +2 -0
  253. package/dist/directive-handling.levels-CoruY1AA.js +13 -0
  254. package/dist/directive-handling.persist.runtime-ZWDdE5tG.js +170 -0
  255. package/dist/directive-handling.shared-B0RjHp7h.js +147 -0
  256. package/dist/directory-cli-I6eodbBS.js +437 -0
  257. package/dist/directory-config-helpers-CURJ8mj7.js +129 -0
  258. package/dist/directory-runtime-DhC8QkMq.js +19 -0
  259. package/dist/directory.static-B4VBitVO.js +44 -0
  260. package/dist/discord-Cu5CoXrA.js +214 -0
  261. package/dist/discord-core-5tkl-BzP.js +1 -0
  262. package/dist/discord-dOQ4uo2e.js +635 -0
  263. package/dist/dm-policy-shared-6bCJzHOS.js +188 -0
  264. package/dist/dns-cli-Dr0_Afcp.js +223 -0
  265. package/dist/docker-COe8Snwj.js +1254 -0
  266. package/dist/docs-cli-BkY5rqBi.js +176 -0
  267. package/dist/doctor-completion-CU7jR9vY.js +90 -0
  268. package/dist/doctor-config-preflight-Bj70HRt3.js +150 -0
  269. package/dist/doctor-config-preflight-C5h-tgtM.js +40 -0
  270. package/dist/doctor-state-migrations-CW1v5V4y.js +212 -0
  271. package/dist/doctor-state-migrations-ElD0NFmv.js +732 -0
  272. package/dist/entry-status-B2OWAf0s.js +172 -0
  273. package/dist/entry.js +219 -0
  274. package/dist/env-BP70DGuy.js +30 -0
  275. package/dist/env-overrides-JneV60sd.js +434 -0
  276. package/dist/env-overrides.runtime-DLrwions.js +18 -0
  277. package/dist/env-substitution-D6t_sLS_.js +136 -0
  278. package/dist/errors-BxyFnvP3.js +58 -0
  279. package/dist/exec-Dmex2w_d.js +310 -0
  280. package/dist/exec-approvals-BJhuySBz.js +386 -0
  281. package/dist/exec-approvals-allowlist-BboWC4n9.js +384 -0
  282. package/dist/exec-approvals-cli-rer7oVfh.js +427 -0
  283. package/dist/exec-safe-bin-runtime-policy-BL5_Z-KU.js +89 -0
  284. package/dist/exec-safety-CaaBy-Zw.js +24 -0
  285. package/dist/export-html/template.css +1060 -0
  286. package/dist/export-html/template.html +88 -0
  287. package/dist/export-html/template.js +1875 -0
  288. package/dist/extension-shared-5txN7IXK.js +74 -0
  289. package/dist/extensionAPI.js +218 -0
  290. package/dist/extensions/acpx/openclaw.plugin.json +120 -0
  291. package/dist/extensions/acpx/package.json +14 -0
  292. package/dist/extensions/acpx/skills/acp-router/SKILL.md +219 -0
  293. package/dist/extensions/amazon-bedrock/index.js +231 -0
  294. package/dist/extensions/amazon-bedrock/openclaw.plugin.json +11 -0
  295. package/dist/extensions/amazon-bedrock/package.json +12 -0
  296. package/dist/extensions/anthropic/index.js +330 -0
  297. package/dist/extensions/anthropic/openclaw.plugin.json +42 -0
  298. package/dist/extensions/anthropic/package.json +12 -0
  299. package/dist/extensions/bluebubbles/index.js +224 -0
  300. package/dist/extensions/bluebubbles/openclaw.plugin.json +11 -0
  301. package/dist/extensions/bluebubbles/package.json +51 -0
  302. package/dist/extensions/bluebubbles/setup-entry.js +289 -0
  303. package/dist/extensions/brave/index.js +23 -0
  304. package/dist/extensions/brave/openclaw.plugin.json +45 -0
  305. package/dist/extensions/brave/package.json +12 -0
  306. package/dist/extensions/byteplus/index.js +112 -0
  307. package/dist/extensions/byteplus/openclaw.plugin.json +32 -0
  308. package/dist/extensions/byteplus/package.json +12 -0
  309. package/dist/extensions/chutes/index.js +221 -0
  310. package/dist/extensions/chutes/openclaw.plugin.json +44 -0
  311. package/dist/extensions/chutes/package.json +12 -0
  312. package/dist/extensions/cloudflare-ai-gateway/index.js +218 -0
  313. package/dist/extensions/cloudflare-ai-gateway/openclaw.plugin.json +32 -0
  314. package/dist/extensions/cloudflare-ai-gateway/package.json +12 -0
  315. package/dist/extensions/copilot-proxy/index.js +125 -0
  316. package/dist/extensions/copilot-proxy/openclaw.plugin.json +23 -0
  317. package/dist/extensions/copilot-proxy/package.json +12 -0
  318. package/dist/extensions/device-pair/index.js +1040 -0
  319. package/dist/extensions/device-pair/openclaw.plugin.json +20 -0
  320. package/dist/extensions/diagnostics-otel/openclaw.plugin.json +8 -0
  321. package/dist/extensions/diagnostics-otel/package.json +27 -0
  322. package/dist/extensions/diffs/openclaw.plugin.json +216 -0
  323. package/dist/extensions/diffs/package.json +20 -0
  324. package/dist/extensions/diffs/skills/diffs/SKILL.md +22 -0
  325. package/dist/extensions/discord/index.js +215 -0
  326. package/dist/extensions/discord/openclaw.plugin.json +11 -0
  327. package/dist/extensions/discord/package.json +40 -0
  328. package/dist/extensions/discord/setup-entry.js +215 -0
  329. package/dist/extensions/elevenlabs/index.js +223 -0
  330. package/dist/extensions/elevenlabs/openclaw.plugin.json +8 -0
  331. package/dist/extensions/elevenlabs/package.json +12 -0
  332. package/dist/extensions/fal/index.js +112 -0
  333. package/dist/extensions/fal/openclaw.plugin.json +34 -0
  334. package/dist/extensions/fal/package.json +12 -0
  335. package/dist/extensions/feishu/index.js +227 -0
  336. package/dist/extensions/feishu/openclaw.plugin.json +14 -0
  337. package/dist/extensions/feishu/package.json +42 -0
  338. package/dist/extensions/feishu/setup-entry.js +112 -0
  339. package/dist/extensions/feishu/skills/feishu-doc/SKILL.md +211 -0
  340. package/dist/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
  341. package/dist/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
  342. package/dist/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
  343. package/dist/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
  344. package/dist/extensions/firecrawl/index.js +211 -0
  345. package/dist/extensions/firecrawl/openclaw.plugin.json +41 -0
  346. package/dist/extensions/firecrawl/package.json +12 -0
  347. package/dist/extensions/github-copilot/index.js +490 -0
  348. package/dist/extensions/github-copilot/openclaw.plugin.json +30 -0
  349. package/dist/extensions/github-copilot/package.json +12 -0
  350. package/dist/extensions/google/index.js +211 -0
  351. package/dist/extensions/google/openclaw.plugin.json +71 -0
  352. package/dist/extensions/google/package.json +12 -0
  353. package/dist/extensions/googlechat/openclaw.plugin.json +11 -0
  354. package/dist/extensions/googlechat/package.json +46 -0
  355. package/dist/extensions/huggingface/index.js +108 -0
  356. package/dist/extensions/huggingface/openclaw.plugin.json +33 -0
  357. package/dist/extensions/huggingface/package.json +12 -0
  358. package/dist/extensions/imessage/index.js +223 -0
  359. package/dist/extensions/imessage/openclaw.plugin.json +11 -0
  360. package/dist/extensions/imessage/package.json +26 -0
  361. package/dist/extensions/imessage/setup-entry.js +220 -0
  362. package/dist/extensions/irc/index.js +220 -0
  363. package/dist/extensions/irc/openclaw.plugin.json +11 -0
  364. package/dist/extensions/irc/package.json +25 -0
  365. package/dist/extensions/irc/setup-entry.js +222 -0
  366. package/dist/extensions/kilocode/index.js +282 -0
  367. package/dist/extensions/kilocode/openclaw.plugin.json +32 -0
  368. package/dist/extensions/kilocode/package.json +12 -0
  369. package/dist/extensions/kimi-coding/index.js +148 -0
  370. package/dist/extensions/kimi-coding/openclaw.plugin.json +37 -0
  371. package/dist/extensions/kimi-coding/package.json +12 -0
  372. package/dist/extensions/line/index.js +57 -0
  373. package/dist/extensions/line/openclaw.plugin.json +11 -0
  374. package/dist/extensions/line/package.json +39 -0
  375. package/dist/extensions/line/setup-entry.js +49 -0
  376. package/dist/extensions/llm-task/index.js +157 -0
  377. package/dist/extensions/llm-task/openclaw.plugin.json +33 -0
  378. package/dist/extensions/llm-task/package.json +16 -0
  379. package/dist/extensions/lobster/index.js +261 -0
  380. package/dist/extensions/lobster/openclaw.plugin.json +10 -0
  381. package/dist/extensions/lobster/package.json +17 -0
  382. package/dist/extensions/matrix/openclaw.plugin.json +11 -0
  383. package/dist/extensions/matrix/package.json +53 -0
  384. package/dist/extensions/mattermost/index.js +220 -0
  385. package/dist/extensions/mattermost/openclaw.plugin.json +11 -0
  386. package/dist/extensions/mattermost/package.json +41 -0
  387. package/dist/extensions/mattermost/setup-entry.js +222 -0
  388. package/dist/extensions/memory-core/index.js +36 -0
  389. package/dist/extensions/memory-core/openclaw.plugin.json +9 -0
  390. package/dist/extensions/memory-core/package.json +20 -0
  391. package/dist/extensions/memory-lancedb/openclaw.plugin.json +92 -0
  392. package/dist/extensions/memory-lancedb/package.json +24 -0
  393. package/dist/extensions/microsoft/index.js +223 -0
  394. package/dist/extensions/microsoft/openclaw.plugin.json +8 -0
  395. package/dist/extensions/microsoft/package.json +12 -0
  396. package/dist/extensions/minimax/index.js +437 -0
  397. package/dist/extensions/minimax/openclaw.plugin.json +71 -0
  398. package/dist/extensions/minimax/package.json +12 -0
  399. package/dist/extensions/mistral/index.js +149 -0
  400. package/dist/extensions/mistral/openclaw.plugin.json +31 -0
  401. package/dist/extensions/mistral/package.json +12 -0
  402. package/dist/extensions/modelstudio/index.js +144 -0
  403. package/dist/extensions/modelstudio/openclaw.plugin.json +46 -0
  404. package/dist/extensions/modelstudio/package.json +12 -0
  405. package/dist/extensions/moonshot/index.js +211 -0
  406. package/dist/extensions/moonshot/openclaw.plugin.json +78 -0
  407. package/dist/extensions/moonshot/package.json +12 -0
  408. package/dist/extensions/msteams/openclaw.plugin.json +11 -0
  409. package/dist/extensions/msteams/package.json +48 -0
  410. package/dist/extensions/nextcloud-talk/index.js +221 -0
  411. package/dist/extensions/nextcloud-talk/openclaw.plugin.json +11 -0
  412. package/dist/extensions/nextcloud-talk/package.json +48 -0
  413. package/dist/extensions/nextcloud-talk/setup-entry.js +223 -0
  414. package/dist/extensions/nostr/openclaw.plugin.json +11 -0
  415. package/dist/extensions/nostr/package.json +45 -0
  416. package/dist/extensions/nvidia/index.js +29 -0
  417. package/dist/extensions/nvidia/openclaw.plugin.json +16 -0
  418. package/dist/extensions/nvidia/package.json +12 -0
  419. package/dist/extensions/ollama/index.js +118 -0
  420. package/dist/extensions/ollama/openclaw.plugin.json +28 -0
  421. package/dist/extensions/ollama/package.json +12 -0
  422. package/dist/extensions/open-prose/index.js +10 -0
  423. package/dist/extensions/open-prose/openclaw.plugin.json +13 -0
  424. package/dist/extensions/open-prose/package.json +12 -0
  425. package/dist/extensions/open-prose/skills/prose/LICENSE +21 -0
  426. package/dist/extensions/open-prose/skills/prose/SKILL.md +323 -0
  427. package/dist/extensions/open-prose/skills/prose/alt-borges.md +141 -0
  428. package/dist/extensions/open-prose/skills/prose/alts/arabian-nights.md +229 -0
  429. package/dist/extensions/open-prose/skills/prose/alts/borges.md +360 -0
  430. package/dist/extensions/open-prose/skills/prose/alts/folk.md +322 -0
  431. package/dist/extensions/open-prose/skills/prose/alts/homer.md +217 -0
  432. package/dist/extensions/open-prose/skills/prose/alts/kafka.md +373 -0
  433. package/dist/extensions/open-prose/skills/prose/alts/shared-appendix.md +35 -0
  434. package/dist/extensions/open-prose/skills/prose/compiler.md +2971 -0
  435. package/dist/extensions/open-prose/skills/prose/examples/01-hello-world.prose +4 -0
  436. package/dist/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +6 -0
  437. package/dist/extensions/open-prose/skills/prose/examples/03-code-review.prose +17 -0
  438. package/dist/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +14 -0
  439. package/dist/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +20 -0
  440. package/dist/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +17 -0
  441. package/dist/extensions/open-prose/skills/prose/examples/07-refactor.prose +20 -0
  442. package/dist/extensions/open-prose/skills/prose/examples/08-blog-post.prose +20 -0
  443. package/dist/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +25 -0
  444. package/dist/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +32 -0
  445. package/dist/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +27 -0
  446. package/dist/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +43 -0
  447. package/dist/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +51 -0
  448. package/dist/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +48 -0
  449. package/dist/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +23 -0
  450. package/dist/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +19 -0
  451. package/dist/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +19 -0
  452. package/dist/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +36 -0
  453. package/dist/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +71 -0
  454. package/dist/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +20 -0
  455. package/dist/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +35 -0
  456. package/dist/extensions/open-prose/skills/prose/examples/22-error-handling.prose +51 -0
  457. package/dist/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +63 -0
  458. package/dist/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +86 -0
  459. package/dist/extensions/open-prose/skills/prose/examples/25-conditionals.prose +114 -0
  460. package/dist/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +100 -0
  461. package/dist/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +105 -0
  462. package/dist/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +37 -0
  463. package/dist/extensions/open-prose/skills/prose/examples/28-gas-town.prose +1572 -0
  464. package/dist/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +218 -0
  465. package/dist/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +42 -0
  466. package/dist/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +145 -0
  467. package/dist/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +168 -0
  468. package/dist/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +204 -0
  469. package/dist/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +296 -0
  470. package/dist/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +237 -0
  471. package/dist/extensions/open-prose/skills/prose/examples/37-the-forge.prose +1474 -0
  472. package/dist/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +455 -0
  473. package/dist/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +277 -0
  474. package/dist/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +32 -0
  475. package/dist/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +38 -0
  476. package/dist/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +46 -0
  477. package/dist/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +50 -0
  478. package/dist/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +261 -0
  479. package/dist/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +159 -0
  480. package/dist/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +637 -0
  481. package/dist/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +148 -0
  482. package/dist/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +225 -0
  483. package/dist/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +356 -0
  484. package/dist/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +445 -0
  485. package/dist/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +210 -0
  486. package/dist/extensions/open-prose/skills/prose/examples/README.md +391 -0
  487. package/dist/extensions/open-prose/skills/prose/examples/roadmap/README.md +22 -0
  488. package/dist/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +20 -0
  489. package/dist/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +18 -0
  490. package/dist/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +17 -0
  491. package/dist/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +223 -0
  492. package/dist/extensions/open-prose/skills/prose/guidance/antipatterns.md +951 -0
  493. package/dist/extensions/open-prose/skills/prose/guidance/patterns.md +700 -0
  494. package/dist/extensions/open-prose/skills/prose/guidance/system-prompt.md +180 -0
  495. package/dist/extensions/open-prose/skills/prose/help.md +144 -0
  496. package/dist/extensions/open-prose/skills/prose/lib/README.md +108 -0
  497. package/dist/extensions/open-prose/skills/prose/lib/calibrator.prose +215 -0
  498. package/dist/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +174 -0
  499. package/dist/extensions/open-prose/skills/prose/lib/error-forensics.prose +250 -0
  500. package/dist/extensions/open-prose/skills/prose/lib/inspector.prose +196 -0
  501. package/dist/extensions/open-prose/skills/prose/lib/profiler.prose +460 -0
  502. package/dist/extensions/open-prose/skills/prose/lib/program-improver.prose +275 -0
  503. package/dist/extensions/open-prose/skills/prose/lib/project-memory.prose +118 -0
  504. package/dist/extensions/open-prose/skills/prose/lib/user-memory.prose +93 -0
  505. package/dist/extensions/open-prose/skills/prose/lib/vm-improver.prose +243 -0
  506. package/dist/extensions/open-prose/skills/prose/primitives/session.md +593 -0
  507. package/dist/extensions/open-prose/skills/prose/prose.md +1237 -0
  508. package/dist/extensions/open-prose/skills/prose/state/filesystem.md +498 -0
  509. package/dist/extensions/open-prose/skills/prose/state/in-context.md +384 -0
  510. package/dist/extensions/open-prose/skills/prose/state/postgres.md +880 -0
  511. package/dist/extensions/open-prose/skills/prose/state/sqlite.md +531 -0
  512. package/dist/extensions/openai/index.js +677 -0
  513. package/dist/extensions/openai/openclaw.plugin.json +42 -0
  514. package/dist/extensions/openai/package.json +12 -0
  515. package/dist/extensions/opencode/index.js +116 -0
  516. package/dist/extensions/opencode/openclaw.plugin.json +32 -0
  517. package/dist/extensions/opencode/package.json +12 -0
  518. package/dist/extensions/opencode-go/index.js +114 -0
  519. package/dist/extensions/opencode-go/openclaw.plugin.json +32 -0
  520. package/dist/extensions/opencode-go/package.json +12 -0
  521. package/dist/extensions/openrouter/index.js +398 -0
  522. package/dist/extensions/openrouter/openclaw.plugin.json +31 -0
  523. package/dist/extensions/openrouter/package.json +12 -0
  524. package/dist/extensions/openshell/index.js +923 -0
  525. package/dist/extensions/openshell/openclaw.plugin.json +99 -0
  526. package/dist/extensions/openshell/package.json +12 -0
  527. package/dist/extensions/perplexity/index.js +23 -0
  528. package/dist/extensions/perplexity/openclaw.plugin.json +49 -0
  529. package/dist/extensions/perplexity/package.json +12 -0
  530. package/dist/extensions/phone-control/index.js +276 -0
  531. package/dist/extensions/phone-control/openclaw.plugin.json +10 -0
  532. package/dist/extensions/qianfan/index.js +114 -0
  533. package/dist/extensions/qianfan/openclaw.plugin.json +31 -0
  534. package/dist/extensions/qianfan/package.json +12 -0
  535. package/dist/extensions/qwen-portal-auth/index.js +350 -0
  536. package/dist/extensions/qwen-portal-auth/openclaw.plugin.json +29 -0
  537. package/dist/extensions/sglang/index.js +285 -0
  538. package/dist/extensions/sglang/openclaw.plugin.json +28 -0
  539. package/dist/extensions/sglang/package.json +12 -0
  540. package/dist/extensions/signal/index.js +218 -0
  541. package/dist/extensions/signal/openclaw.plugin.json +11 -0
  542. package/dist/extensions/signal/package.json +23 -0
  543. package/dist/extensions/signal/setup-entry.js +218 -0
  544. package/dist/extensions/slack/index.js +222 -0
  545. package/dist/extensions/slack/openclaw.plugin.json +11 -0
  546. package/dist/extensions/slack/package.json +30 -0
  547. package/dist/extensions/slack/setup-entry.js +220 -0
  548. package/dist/extensions/synology-chat/index.js +56 -0
  549. package/dist/extensions/synology-chat/openclaw.plugin.json +11 -0
  550. package/dist/extensions/synology-chat/package.json +29 -0
  551. package/dist/extensions/synology-chat/setup-entry.js +58 -0
  552. package/dist/extensions/synthetic/index.js +112 -0
  553. package/dist/extensions/synthetic/openclaw.plugin.json +31 -0
  554. package/dist/extensions/synthetic/package.json +12 -0
  555. package/dist/extensions/talk-voice/index.js +197 -0
  556. package/dist/extensions/talk-voice/openclaw.plugin.json +10 -0
  557. package/dist/extensions/tavily/index.js +211 -0
  558. package/dist/extensions/tavily/openclaw.plugin.json +44 -0
  559. package/dist/extensions/tavily/package.json +12 -0
  560. package/dist/extensions/tavily/skills/tavily/SKILL.md +94 -0
  561. package/dist/extensions/telegram/index.js +221 -0
  562. package/dist/extensions/telegram/openclaw.plugin.json +11 -0
  563. package/dist/extensions/telegram/package.json +31 -0
  564. package/dist/extensions/telegram/setup-entry.js +221 -0
  565. package/dist/extensions/thread-ownership/index.js +70 -0
  566. package/dist/extensions/thread-ownership/openclaw.plugin.json +30 -0
  567. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/README.md +143 -0
  568. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/SKILL.md +375 -0
  569. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/bin/tlon.js +96 -0
  570. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/package.json +40 -0
  571. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/references/hooks-examples/auto-react.hoon +24 -0
  572. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/references/hooks-examples/delete-old-posts.hoon +18 -0
  573. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/references/hooks-examples/word-filter.hoon +52 -0
  574. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/references/hooks.md +366 -0
  575. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/references/urbit-api.md +113 -0
  576. package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/scripts/postinstall.js +74 -0
  577. package/dist/extensions/tlon/openclaw.plugin.json +14 -0
  578. package/dist/extensions/tlon/package.json +45 -0
  579. package/dist/extensions/together/index.js +113 -0
  580. package/dist/extensions/together/openclaw.plugin.json +31 -0
  581. package/dist/extensions/together/package.json +12 -0
  582. package/dist/extensions/twitch/openclaw.plugin.json +11 -0
  583. package/dist/extensions/twitch/package.json +27 -0
  584. package/dist/extensions/venice/index.js +132 -0
  585. package/dist/extensions/venice/openclaw.plugin.json +31 -0
  586. package/dist/extensions/venice/package.json +12 -0
  587. package/dist/extensions/vercel-ai-gateway/index.js +86 -0
  588. package/dist/extensions/vercel-ai-gateway/openclaw.plugin.json +31 -0
  589. package/dist/extensions/vercel-ai-gateway/package.json +12 -0
  590. package/dist/extensions/vllm/index.js +285 -0
  591. package/dist/extensions/vllm/openclaw.plugin.json +28 -0
  592. package/dist/extensions/vllm/package.json +12 -0
  593. package/dist/extensions/voice-call/index.js +5715 -0
  594. package/dist/extensions/voice-call/openclaw.plugin.json +648 -0
  595. package/dist/extensions/voice-call/package.json +31 -0
  596. package/dist/extensions/volcengine/index.js +112 -0
  597. package/dist/extensions/volcengine/openclaw.plugin.json +32 -0
  598. package/dist/extensions/volcengine/package.json +12 -0
  599. package/dist/extensions/whatsapp/openclaw.plugin.json +11 -0
  600. package/dist/extensions/whatsapp/package.json +44 -0
  601. package/dist/extensions/xai/index.js +211 -0
  602. package/dist/extensions/xai/openclaw.plugin.json +65 -0
  603. package/dist/extensions/xai/package.json +12 -0
  604. package/dist/extensions/xiaomi/index.js +115 -0
  605. package/dist/extensions/xiaomi/openclaw.plugin.json +31 -0
  606. package/dist/extensions/xiaomi/package.json +12 -0
  607. package/dist/extensions/zai/index.js +559 -0
  608. package/dist/extensions/zai/openclaw.plugin.json +88 -0
  609. package/dist/extensions/zai/package.json +12 -0
  610. package/dist/extensions/zalo/index.js +225 -0
  611. package/dist/extensions/zalo/openclaw.plugin.json +11 -0
  612. package/dist/extensions/zalo/package.json +48 -0
  613. package/dist/extensions/zalo/setup-entry.js +226 -0
  614. package/dist/extensions/zalouser/openclaw.plugin.json +11 -0
  615. package/dist/extensions/zalouser/package.json +49 -0
  616. package/dist/external-content-BUdUOqkv.js +238 -0
  617. package/dist/feishu-CiuVx86p.js +62821 -0
  618. package/dist/feishu-DKboNv0e.js +2664 -0
  619. package/dist/fetch-guard-DIyN1HW5.js +165 -0
  620. package/dist/fetch-timeout-C5xpMuGd.js +36 -0
  621. package/dist/file-identity-Cw0fQxYY.js +11 -0
  622. package/dist/file-lock-WbEmczmY.js +107 -0
  623. package/dist/filter-oMGaNOM1.js +20 -0
  624. package/dist/follow-redirects-BPQ_NgUo.js +9143 -0
  625. package/dist/format-DH8ysi7s.js +19 -0
  626. package/dist/format-datetime-BGS6tLDE.js +73 -0
  627. package/dist/format-duration-CO0BGWB0.js +57 -0
  628. package/dist/format-relative-C3nDxnXz.js +54 -0
  629. package/dist/frontmatter-S5vS-I4a.js +309 -0
  630. package/dist/fs-safe-D3qzH-ab.js +731 -0
  631. package/dist/gateway-cli-CPLQ73W9.js +28403 -0
  632. package/dist/gateway-install-token-CKAQVM8-.js +164 -0
  633. package/dist/gateway-rpc-BsgPg6MU.js +26 -0
  634. package/dist/gateway-runtime-B5HHmFvN.js +42 -0
  635. package/dist/gaxios-fetch-compat-KX6bsqFm.js +165 -0
  636. package/dist/gemini-auth-B5ljg7jr.js +29 -0
  637. package/dist/git-commit-BIdLubm5.js +2 -0
  638. package/dist/git-commit-OvUvjri2.js +177 -0
  639. package/dist/github-copilot-auth-BBn03354.js +104 -0
  640. package/dist/global-singleton-4KwY5RvX.js +13 -0
  641. package/dist/globals-41sdSaKv.js +38 -0
  642. package/dist/gmail-setup-utils-BX68dZla.js +419 -0
  643. package/dist/group-access-DJZrYPx1.js +113 -0
  644. package/dist/group-keys-BD_IYSMs.js +44 -0
  645. package/dist/group-policy-CWFxv3iB.js +201 -0
  646. package/dist/group-policy-warnings-Ddu6lBkh.js +175 -0
  647. package/dist/health-BW_d3hKj.js +573 -0
  648. package/dist/health-format-B5XfOTuJ.js +26 -0
  649. package/dist/health-o6N--_xj.js +59 -0
  650. package/dist/heartbeat-7aHh0m3d.js +169 -0
  651. package/dist/heartbeat-summary-Das49TYq.js +57 -0
  652. package/dist/help-Cr5cdpTF.js +81 -0
  653. package/dist/help-format-Dv45FpYu.js +15 -0
  654. package/dist/helpers-CLNycoI8.js +32 -0
  655. package/dist/helpers-DJ-5HEbE.js +24 -0
  656. package/dist/history-CHjo8B5W.js +102 -0
  657. package/dist/hook-runtime-BnNBi_q4.js +1 -0
  658. package/dist/hooks-cli-Bj8_UM2C.js +1102 -0
  659. package/dist/hooks-policy-BL6HDLUn.js +20 -0
  660. package/dist/hooks-status-gzNmo3li.js +78 -0
  661. package/dist/host-env-security-BogNN146.js +223 -0
  662. package/dist/http-body-CCiSfloA.js +237 -0
  663. package/dist/http-registry-WFFbLYRd.js +153 -0
  664. package/dist/identity-DovQV4zD.js +112 -0
  665. package/dist/identity-cyBYcoXS.js +84 -0
  666. package/dist/identity-file-EndG1nfc.js +60 -0
  667. package/dist/image-DWkjd9ze.js +211 -0
  668. package/dist/image-generation-CsblUROw.js +441 -0
  669. package/dist/image-ops-j01UkxEv.js +371 -0
  670. package/dist/imessage-Bb83msoJ.js +219 -0
  671. package/dist/imessage-CsiCgRcg.js +190 -0
  672. package/dist/imessage-CytlwbMq.js +1451 -0
  673. package/dist/imessage-core-CsYJuaRZ.js +1 -0
  674. package/dist/inbound-envelope-4P3IIJc3.js +61 -0
  675. package/dist/inbound-reply-dispatch-B6JDKPpf.js +72 -0
  676. package/dist/includes-7XyL3p1c.js +188 -0
  677. package/dist/includes-scan-y-rS6tTw.js +55 -0
  678. package/dist/index.js +57 -0
  679. package/dist/infra/warning-filter.js +2 -0
  680. package/dist/inspect-TkOiUCgp.js +279 -0
  681. package/dist/install-safe-path-Rwbw1XCZ.js +62 -0
  682. package/dist/installs-CShDWoiR.js +532 -0
  683. package/dist/interactive-F7iY0yED.js +8 -0
  684. package/dist/interactive-runtime-OweOj_Vv.js +90 -0
  685. package/dist/internal-hooks-0uipqzRY.js +156 -0
  686. package/dist/io-BYmuc7ha.js +35 -0
  687. package/dist/io-BjKpaXU3.js +7161 -0
  688. package/dist/ip-C8vmzVu0.js +203 -0
  689. package/dist/ipv4-CJCNv_K7.js +82 -0
  690. package/dist/irc-BSHd6-tL.js +12 -0
  691. package/dist/irc-CO-H7Npu.js +660 -0
  692. package/dist/is-main-YViS6wOn.js +27 -0
  693. package/dist/issue-format-CBEXVico.js +31 -0
  694. package/dist/issue-format-D3HehoKZ.js +4 -0
  695. package/dist/json-file-C2zjA0Gv.js +23 -0
  696. package/dist/json-files-WW-H_psG.js +60 -0
  697. package/dist/json-pointer-f9dEnBoR.js +43 -0
  698. package/dist/json-store-O1LwpnBH.js +37 -0
  699. package/dist/kb-cli-DMZs6PCu.js +65 -0
  700. package/dist/keyed-async-queue-CPUWV5Pm.js +32 -0
  701. package/dist/kill-tree-CbjXBw3z.js +149 -0
  702. package/dist/kilocode-shared-DS7_0IMs.js +29 -0
  703. package/dist/launchd-DowEtzjr.js +491 -0
  704. package/dist/lazy-runtime-BcXbyAaC.js +1 -0
  705. package/dist/lazy-runtime-bWkd2cs3.js +29 -0
  706. package/dist/legacy-names-CUNZ4vHN.js +7 -0
  707. package/dist/legacy-web-search-BgZjNG2h.js +222 -0
  708. package/dist/lib-CERS7N4b.js +503 -0
  709. package/dist/lib-PPICrHv1.js +1938 -0
  710. package/dist/library-DJriL3ed.js +211 -0
  711. package/dist/lifecycle-core-D08nRlzW.js +382 -0
  712. package/dist/line/accounts.js +10 -0
  713. package/dist/line/send.js +39 -0
  714. package/dist/line/template-messages.js +2 -0
  715. package/dist/line-BX_d0Jwk.js +688 -0
  716. package/dist/line-CJSvwApm.js +1 -0
  717. package/dist/line-core-BOIxkjgu.js +1 -0
  718. package/dist/links-CKahSp5K.js +13 -0
  719. package/dist/llm-slug-generator-X_rlkFDe.js +68 -0
  720. package/dist/llm-slug-generator.js +212 -0
  721. package/dist/llm-task-Dx8ymRFr.js +1 -0
  722. package/dist/local-roots-DAzCjWbC.js +34 -0
  723. package/dist/location-DefAH9WS.js +42 -0
  724. package/dist/logger-CoEtkjhn.js +550 -0
  725. package/dist/logger-Cqy7-Maj.js +70 -0
  726. package/dist/logging-Bz1qZDPg.js +16 -0
  727. package/dist/logging-CS185p8Q.js +13 -0
  728. package/dist/logging-CbTTfADU.js +1 -0
  729. package/dist/logging-CrGwCjML.js +36 -0
  730. package/dist/logs-cli-C3x0gsGh.js +261 -0
  731. package/dist/magic-string.es-DJPWMt-n.js +1011 -0
  732. package/dist/main-session-DKr0lBVk.js +36 -0
  733. package/dist/manager-BF-xRVUt.js +2005 -0
  734. package/dist/manager-DjPRm0yC.js +4226 -0
  735. package/dist/manager-runtime-DoKa4efG.js +59 -0
  736. package/dist/manager.runtime-CdPdh296.js +827 -0
  737. package/dist/manifest-registry-B90TyTWl.js +1350 -0
  738. package/dist/map-size-CMTQVKUV.js +15 -0
  739. package/dist/markdown-to-line-BWwaRx5F.js +640 -0
  740. package/dist/mask-api-key-CprzEe7l.js +10 -0
  741. package/dist/matrix-CMi2y980.js +228 -0
  742. package/dist/matrix-migration-snapshot-NMxdum7C.js +702 -0
  743. package/dist/mattermost-Cduscjlj.js +15 -0
  744. package/dist/mattermost-DO0BCfF3.js +1 -0
  745. package/dist/mcp-cli-D0PqoKGl.js +94 -0
  746. package/dist/mcp-config-BcFTambR.js +108 -0
  747. package/dist/media-limits-Cuvmmhop.js +14 -0
  748. package/dist/media-understanding-DptzemF7.js +48 -0
  749. package/dist/media-understanding.runtime-w4DWJMEQ.js +216 -0
  750. package/dist/memory-DBjQ0TPd.js +1 -0
  751. package/dist/memory-cli-D2AtVbYN.js +215 -0
  752. package/dist/memory-cli-DNq4q-b4.js +541 -0
  753. package/dist/memory-search-Das1tiuB.js +204 -0
  754. package/dist/memory-search-DxmSTjHq.js +18 -0
  755. package/dist/mention-gating-B_q-EHFx.js +25 -0
  756. package/dist/mentions-Bxys_va0.js +154 -0
  757. package/dist/message-channel-Cy-gN4K2.js +106 -0
  758. package/dist/message-hook-mappers-BBTV3JRQ.js +249 -0
  759. package/dist/method-scopes-ChbR5hu0.js +2650 -0
  760. package/dist/mime-C4vVTBso.js +150 -0
  761. package/dist/minimal-C5yUxtHy.js +2120 -0
  762. package/dist/model-auth-Blh0xL9g.js +309 -0
  763. package/dist/model-auth-env-CF9ts7Th.js +111 -0
  764. package/dist/model-catalog.runtime-Bq_DOgMs.js +211 -0
  765. package/dist/model-id-normalization-Y-MIsyK_.js +16 -0
  766. package/dist/model-input-BB2wSAHb.js +20 -0
  767. package/dist/model-overrides-sIzKU2wo.js +84 -0
  768. package/dist/model-param-b-DIFEhICm.js +15 -0
  769. package/dist/model-picker-CCcVTPVs.js +400 -0
  770. package/dist/model-picker-DbqaKTMq.js +215 -0
  771. package/dist/model-picker.runtime-CkLp1x9k.js +224 -0
  772. package/dist/model-selection-BTpJnslv.js +437 -0
  773. package/dist/model-selection-slZyRw2d.js +765 -0
  774. package/dist/model-suppression.runtime-DaobH5cQ.js +216 -0
  775. package/dist/models-BN_CtDV3.js +2536 -0
  776. package/dist/models-Dp5Lga_a.js +226 -0
  777. package/dist/models-cli-Cd_3pVLS.js +418 -0
  778. package/dist/models-config-jp2ZYjgH.js +211 -0
  779. package/dist/models-config.providers.discovery-BaIk1NKL.js +141 -0
  780. package/dist/models-config.runtime-CYpoeHa4.js +211 -0
  781. package/dist/monitor-Bbfus89A.js +3145 -0
  782. package/dist/monitor-D63iuNTd.js +3272 -0
  783. package/dist/monitor-DAPxJ4Fy.js +878 -0
  784. package/dist/monitor-DlFPue4X.js +223 -0
  785. package/dist/multimodal-DC43jYNv.js +75 -0
  786. package/dist/mutable-allowlist-detectors-C6EAzWYE.js +62 -0
  787. package/dist/net-DlJFp95v.js +270 -0
  788. package/dist/network-mode-DOgvmom4.js +17 -0
  789. package/dist/nextcloud-talk-4niIjhpY.js +12 -0
  790. package/dist/nextcloud-talk-CwnkUy8E.js +1 -0
  791. package/dist/node-cli-BQ0uYRRJ.js +2484 -0
  792. package/dist/node-command-policy-Bg2g6Xjp.js +192 -0
  793. package/dist/node-commands-B6W6Eo0b.js +11 -0
  794. package/dist/node-require-BgDD9bTi.js +14 -0
  795. package/dist/node-resolve-BunMro3f.js +69 -0
  796. package/dist/node-service-DEZvLQRW.js +65 -0
  797. package/dist/node-startup-env-Gz8ZQniA.js +50 -0
  798. package/dist/nodes-cli-Dvhiks4b.js +1330 -0
  799. package/dist/nodes-screen-DkGtEg3m.js +401 -0
  800. package/dist/normalize-secret-input-_PgpexOG.js +32 -0
  801. package/dist/note-dfjacCV8.js +109 -0
  802. package/dist/npm-pack-install-DFT7_ufP.js +574 -0
  803. package/dist/npm-resolution-O8ezGXjk.js +60 -0
  804. package/dist/oauth.runtime-Dn3J7wCH.js +318 -0
  805. package/dist/oauth.runtime-qCkidk8J.js +180 -0
  806. package/dist/oauth.runtime-y9sB_ut5.js +687 -0
  807. package/dist/ollama-defaults-asNuGW4_.js +4 -0
  808. package/dist/onboard-D9IU-7uw.js +48 -0
  809. package/dist/onboard-DQaHGPRm.js +25 -0
  810. package/dist/onboard-DXqBeqiM.js +589 -0
  811. package/dist/onboard-channels-CfZTqyJW.js +300 -0
  812. package/dist/onboard-channels-Cl8Z603m.js +1257 -0
  813. package/dist/onboard-config-DFKb-0sE.js +29 -0
  814. package/dist/onboard-config-DYykzJhx.js +2 -0
  815. package/dist/onboard-custom-BH3efE8p.js +216 -0
  816. package/dist/onboard-custom-z5zb42R-.js +644 -0
  817. package/dist/onboard-helpers-BN19CLP5.js +335 -0
  818. package/dist/onboard-helpers-Ddb9wkxO.js +54 -0
  819. package/dist/onboard-hooks-Hiw3_8VL.js +73 -0
  820. package/dist/onboard-remote-Bdqyy2tX.js +59 -0
  821. package/dist/onboard-remote-DZ1c3za2.js +182 -0
  822. package/dist/onboard-search-8Xnnh8SX.js +446 -0
  823. package/dist/onboard-skills-BTVz6kVV.js +69 -0
  824. package/dist/onboard-skills-BskXWJGU.js +133 -0
  825. package/dist/openai-codex-provider.runtime-BFsopDHI.js +2 -0
  826. package/dist/openai-defaults-B7FUywsh.js +10 -0
  827. package/dist/openclaw-exec-env-AcZ9we1N.js +14 -0
  828. package/dist/openclaw-root-TUHYdr9B.js +88 -0
  829. package/dist/openclaw-tools.runtime-BI4ZZ6Ie.js +211 -0
  830. package/dist/outbound-media-69yrWRDt.js +11 -0
  831. package/dist/outbound-runtime-ic_7ulJJ.js +1 -0
  832. package/dist/pairing-challenge-pdOQqb2j.js +48 -0
  833. package/dist/pairing-cli-DXxrNtvB.js +150 -0
  834. package/dist/pairing-labels-CNKCSmBK.js +7 -0
  835. package/dist/pairing-message-CBv2njJT.js +4 -0
  836. package/dist/pairing-store-C4lsd4pO.js +590 -0
  837. package/dist/pairing-token-gKj4SNFJ.js +55 -0
  838. package/dist/parse-duration-BBGYkY0S.js +41 -0
  839. package/dist/parse-finite-number-CP4MQF_w.js +30 -0
  840. package/dist/parse-log-line-CVh9zu3Q.js +43 -0
  841. package/dist/parse-port-COyt3COn.js +8 -0
  842. package/dist/path-alias-guards-ZTKqurNH.js +40 -0
  843. package/dist/path-env-CPkz6U0Y.js +87 -0
  844. package/dist/paths-CTjJI9l0.js +179 -0
  845. package/dist/paths-GHJ97ebE.js +268 -0
  846. package/dist/paths-nCHyK08H.js +56 -0
  847. package/dist/perplexity-kYSLNo8o.js +422 -0
  848. package/dist/persistent-dedupe-bjKjVI5u.js +116 -0
  849. package/dist/pi-embedded-CDH9LrEg.js +172586 -0
  850. package/dist/pi-model-discovery-CuX5CDyZ.js +125 -0
  851. package/dist/pi-model-discovery-runtime-DUWeqjUv.js +44 -0
  852. package/dist/pi-tools.before-tool-call.runtime-D9NV63QP.js +387 -0
  853. package/dist/platform-launcher-CqGy6UhP.js +83 -0
  854. package/dist/plugin-entry-CwuwM1jC.js +17 -0
  855. package/dist/plugin-install-CpMYi2tB.js +184 -0
  856. package/dist/plugin-install-aDvFMLBT.js +216 -0
  857. package/dist/plugin-install-plan-B_2cLkDP.js +49 -0
  858. package/dist/plugin-registry-C7Z7CkLP.js +213 -0
  859. package/dist/plugin-registry-C8bgJflP.js +51 -0
  860. package/dist/plugin-sdk/account-helpers.d.ts +1 -0
  861. package/dist/plugin-sdk/account-helpers.js +3 -0
  862. package/dist/plugin-sdk/account-id.d.ts +1 -0
  863. package/dist/plugin-sdk/account-id.js +2 -0
  864. package/dist/plugin-sdk/account-resolution.d.ts +1 -0
  865. package/dist/plugin-sdk/account-resolution.js +216 -0
  866. package/dist/plugin-sdk/acp-runtime.d.ts +1 -0
  867. package/dist/plugin-sdk/acp-runtime.js +46 -0
  868. package/dist/plugin-sdk/agent-runtime.d.ts +1 -0
  869. package/dist/plugin-sdk/agent-runtime.js +215 -0
  870. package/dist/plugin-sdk/allow-from.d.ts +1 -0
  871. package/dist/plugin-sdk/allow-from.js +17 -0
  872. package/dist/plugin-sdk/allowlist-config-edit.d.ts +1 -0
  873. package/dist/plugin-sdk/allowlist-config-edit.js +2 -0
  874. package/dist/plugin-sdk/bluebubbles.d.ts +1 -0
  875. package/dist/plugin-sdk/bluebubbles.js +232 -0
  876. package/dist/plugin-sdk/boolean-param.d.ts +1 -0
  877. package/dist/plugin-sdk/boolean-param.js +2 -0
  878. package/dist/plugin-sdk/channel-actions.d.ts +1 -0
  879. package/dist/plugin-sdk/channel-actions.js +16 -0
  880. package/dist/plugin-sdk/channel-config-helpers.d.ts +1 -0
  881. package/dist/plugin-sdk/channel-config-helpers.js +15 -0
  882. package/dist/plugin-sdk/channel-config-schema.d.ts +1 -0
  883. package/dist/plugin-sdk/channel-config-schema.js +5 -0
  884. package/dist/plugin-sdk/channel-contract.d.ts +1 -0
  885. package/dist/plugin-sdk/channel-contract.js +1 -0
  886. package/dist/plugin-sdk/channel-feedback.d.ts +1 -0
  887. package/dist/plugin-sdk/channel-feedback.js +4 -0
  888. package/dist/plugin-sdk/channel-inbound.d.ts +1 -0
  889. package/dist/plugin-sdk/channel-inbound.js +53 -0
  890. package/dist/plugin-sdk/channel-lifecycle.d.ts +1 -0
  891. package/dist/plugin-sdk/channel-lifecycle.js +2 -0
  892. package/dist/plugin-sdk/channel-pairing.d.ts +1 -0
  893. package/dist/plugin-sdk/channel-pairing.js +2 -0
  894. package/dist/plugin-sdk/channel-policy.d.ts +1 -0
  895. package/dist/plugin-sdk/channel-policy.js +19 -0
  896. package/dist/plugin-sdk/channel-reply-pipeline.d.ts +1 -0
  897. package/dist/plugin-sdk/channel-reply-pipeline.js +23 -0
  898. package/dist/plugin-sdk/channel-runtime.d.ts +1 -0
  899. package/dist/plugin-sdk/channel-runtime.js +33 -0
  900. package/dist/plugin-sdk/channel-send-result.d.ts +1 -0
  901. package/dist/plugin-sdk/channel-send-result.js +2 -0
  902. package/dist/plugin-sdk/channel-setup.d.ts +1 -0
  903. package/dist/plugin-sdk/channel-setup.js +24 -0
  904. package/dist/plugin-sdk/channel-targets.d.ts +1 -0
  905. package/dist/plugin-sdk/channel-targets.js +3 -0
  906. package/dist/plugin-sdk/cli-runtime.d.ts +1 -0
  907. package/dist/plugin-sdk/cli-runtime.js +5 -0
  908. package/dist/plugin-sdk/command-auth.d.ts +1 -0
  909. package/dist/plugin-sdk/command-auth.js +212 -0
  910. package/dist/plugin-sdk/compat.js +59 -0
  911. package/dist/plugin-sdk/config-runtime.d.ts +1 -0
  912. package/dist/plugin-sdk/config-runtime.js +51 -0
  913. package/dist/plugin-sdk/conversation-runtime.d.ts +1 -0
  914. package/dist/plugin-sdk/conversation-runtime.js +55 -0
  915. package/dist/plugin-sdk/core.d.ts +1 -0
  916. package/dist/plugin-sdk/core.js +40 -0
  917. package/dist/plugin-sdk/device-bootstrap.d.ts +1 -0
  918. package/dist/plugin-sdk/device-bootstrap.js +6 -0
  919. package/dist/plugin-sdk/diagnostics-otel.d.ts +1 -0
  920. package/dist/plugin-sdk/diagnostics-otel.js +7 -0
  921. package/dist/plugin-sdk/diffs.d.ts +1 -0
  922. package/dist/plugin-sdk/diffs.js +3 -0
  923. package/dist/plugin-sdk/directory-runtime.d.ts +1 -0
  924. package/dist/plugin-sdk/directory-runtime.js +5 -0
  925. package/dist/plugin-sdk/discord-core.d.ts +1 -0
  926. package/dist/plugin-sdk/discord-core.js +26 -0
  927. package/dist/plugin-sdk/discord.d.ts +1 -0
  928. package/dist/plugin-sdk/discord.js +219 -0
  929. package/dist/plugin-sdk/extension-shared.d.ts +1 -0
  930. package/dist/plugin-sdk/extension-shared.js +15 -0
  931. package/dist/plugin-sdk/extensions/anthropic-vertex/provider-catalog.d.ts +5 -0
  932. package/dist/plugin-sdk/extensions/bluebubbles/runtime-api.d.ts +1 -0
  933. package/dist/plugin-sdk/extensions/bluebubbles/src/group-policy.d.ts +14 -0
  934. package/dist/plugin-sdk/extensions/brave/index.d.ts +8 -0
  935. package/dist/plugin-sdk/extensions/brave/src/brave-web-search-provider.d.ts +42 -0
  936. package/dist/plugin-sdk/extensions/discord/api.d.ts +14 -0
  937. package/dist/plugin-sdk/extensions/discord/runtime-api.d.ts +17 -0
  938. package/dist/plugin-sdk/extensions/discord/session-key-api.d.ts +1 -0
  939. package/dist/plugin-sdk/extensions/discord/src/account-inspect.d.ts +17 -0
  940. package/dist/plugin-sdk/extensions/discord/src/accounts.d.ts +27 -0
  941. package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.d.ts +3 -0
  942. package/dist/plugin-sdk/extensions/discord/src/actions/handle-action.guild-admin.d.ts +9 -0
  943. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.d.ts +5 -0
  944. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.guild.d.ts +24 -0
  945. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.messaging.d.ts +32 -0
  946. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation-shared.d.ts +13 -0
  947. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.moderation.d.ts +10 -0
  948. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.presence.d.ts +3 -0
  949. package/dist/plugin-sdk/extensions/discord/src/actions/runtime.shared.d.ts +1 -0
  950. package/dist/plugin-sdk/extensions/discord/src/api.d.ts +11 -0
  951. package/dist/plugin-sdk/extensions/discord/src/audit.d.ts +29 -0
  952. package/dist/plugin-sdk/extensions/discord/src/channel-actions.d.ts +2 -0
  953. package/dist/plugin-sdk/extensions/discord/src/chunk.d.ts +20 -0
  954. package/dist/plugin-sdk/extensions/discord/src/client.d.ts +24 -0
  955. package/dist/plugin-sdk/extensions/discord/src/components-registry.d.ts +16 -0
  956. package/dist/plugin-sdk/extensions/discord/src/components.d.ts +204 -0
  957. package/dist/plugin-sdk/extensions/discord/src/directory-cache.d.ts +10 -0
  958. package/dist/plugin-sdk/extensions/discord/src/directory-config.d.ts +3 -0
  959. package/dist/plugin-sdk/extensions/discord/src/directory-live.d.ts +3 -0
  960. package/dist/plugin-sdk/extensions/discord/src/draft-chunking.d.ts +6 -0
  961. package/dist/plugin-sdk/extensions/discord/src/draft-stream.d.ts +21 -0
  962. package/dist/plugin-sdk/extensions/discord/src/gateway-logging.d.ts +8 -0
  963. package/dist/plugin-sdk/extensions/discord/src/group-policy.d.ts +4 -0
  964. package/dist/plugin-sdk/extensions/discord/src/guilds.d.ts +6 -0
  965. package/dist/plugin-sdk/extensions/discord/src/mentions.d.ts +8 -0
  966. package/dist/plugin-sdk/extensions/discord/src/message-tool-schema.d.ts +96 -0
  967. package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components-helpers.d.ts +155 -0
  968. package/dist/plugin-sdk/extensions/discord/src/monitor/agent-components.d.ts +28 -0
  969. package/dist/plugin-sdk/extensions/discord/src/monitor/allow-list.d.ts +189 -0
  970. package/dist/plugin-sdk/extensions/discord/src/monitor/auto-presence.d.ts +59 -0
  971. package/dist/plugin-sdk/extensions/discord/src/monitor/commands.d.ts +2 -0
  972. package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-auth.d.ts +24 -0
  973. package/dist/plugin-sdk/extensions/discord/src/monitor/dm-command-decision.d.ts +14 -0
  974. package/dist/plugin-sdk/extensions/discord/src/monitor/exec-approvals.d.ts +55 -0
  975. package/dist/plugin-sdk/extensions/discord/src/monitor/format.d.ts +13 -0
  976. package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-error-guard.d.ts +6 -0
  977. package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-plugin.d.ts +8 -0
  978. package/dist/plugin-sdk/extensions/discord/src/monitor/gateway-registry.d.ts +9 -0
  979. package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-context.d.ts +22 -0
  980. package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-job.d.ts +13 -0
  981. package/dist/plugin-sdk/extensions/discord/src/monitor/inbound-worker.d.ts +15 -0
  982. package/dist/plugin-sdk/extensions/discord/src/monitor/listeners.d.ts +67 -0
  983. package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.d.ts +13 -0
  984. package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.d.ts +14 -0
  985. package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.preflight.types.d.ts +88 -0
  986. package/dist/plugin-sdk/extensions/discord/src/monitor/message-handler.process.d.ts +2 -0
  987. package/dist/plugin-sdk/extensions/discord/src/monitor/message-utils.d.ts +45 -0
  988. package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker-preferences.d.ts +18 -0
  989. package/dist/plugin-sdk/extensions/discord/src/monitor/model-picker.d.ts +117 -0
  990. package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-context.d.ts +68 -0
  991. package/dist/plugin-sdk/extensions/discord/src/monitor/native-command-ui.d.ts +97 -0
  992. package/dist/plugin-sdk/extensions/discord/src/monitor/native-command.d.ts +19 -0
  993. package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.d.ts +21 -0
  994. package/dist/plugin-sdk/extensions/discord/src/monitor/preflight-audio.runtime.d.ts +3 -0
  995. package/dist/plugin-sdk/extensions/discord/src/monitor/presence-cache.d.ts +9 -0
  996. package/dist/plugin-sdk/extensions/discord/src/monitor/presence.d.ts +5 -0
  997. package/dist/plugin-sdk/extensions/discord/src/monitor/provider.allowlist.d.ts +14 -0
  998. package/dist/plugin-sdk/extensions/discord/src/monitor/provider.d.ts +26 -0
  999. package/dist/plugin-sdk/extensions/discord/src/monitor/provider.lifecycle.d.ts +27 -0
  1000. package/dist/plugin-sdk/extensions/discord/src/monitor/reply-context.d.ts +17 -0
  1001. package/dist/plugin-sdk/extensions/discord/src/monitor/reply-delivery.d.ts +40 -0
  1002. package/dist/plugin-sdk/extensions/discord/src/monitor/rest-fetch.d.ts +2 -0
  1003. package/dist/plugin-sdk/extensions/discord/src/monitor/route-resolution.d.ts +40 -0
  1004. package/dist/plugin-sdk/extensions/discord/src/monitor/sender-identity.d.ts +31 -0
  1005. package/dist/plugin-sdk/extensions/discord/src/monitor/startup-status.d.ts +4 -0
  1006. package/dist/plugin-sdk/extensions/discord/src/monitor/status.d.ts +17 -0
  1007. package/dist/plugin-sdk/extensions/discord/src/monitor/system-events.d.ts +2 -0
  1008. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.config.d.ts +11 -0
  1009. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.d.ts +8 -0
  1010. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.discord-api.d.ts +41 -0
  1011. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.lifecycle.d.ts +60 -0
  1012. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.manager.d.ts +21 -0
  1013. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.messages.d.ts +1 -0
  1014. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.persona.d.ts +6 -0
  1015. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.state.d.ts +79 -0
  1016. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-bindings.types.d.ts +79 -0
  1017. package/dist/plugin-sdk/extensions/discord/src/monitor/thread-session-close.d.ts +15 -0
  1018. package/dist/plugin-sdk/extensions/discord/src/monitor/threading.d.ts +98 -0
  1019. package/dist/plugin-sdk/extensions/discord/src/monitor/timeouts.d.ts +14 -0
  1020. package/dist/plugin-sdk/extensions/discord/src/monitor/typing.d.ts +5 -0
  1021. package/dist/plugin-sdk/extensions/discord/src/monitor.d.ts +10 -0
  1022. package/dist/plugin-sdk/extensions/discord/src/monitor.gateway.d.ts +14 -0
  1023. package/dist/plugin-sdk/extensions/discord/src/normalize.d.ts +14 -0
  1024. package/dist/plugin-sdk/extensions/discord/src/outbound-adapter.d.ts +3 -0
  1025. package/dist/plugin-sdk/extensions/discord/src/pluralkit.d.ts +26 -0
  1026. package/dist/plugin-sdk/extensions/discord/src/probe.d.ts +37 -0
  1027. package/dist/plugin-sdk/extensions/discord/src/resolve-allowlist-common.d.ts +11 -0
  1028. package/dist/plugin-sdk/extensions/discord/src/resolve-channels.d.ts +15 -0
  1029. package/dist/plugin-sdk/extensions/discord/src/resolve-users.d.ts +14 -0
  1030. package/dist/plugin-sdk/extensions/discord/src/retry.d.ts +12 -0
  1031. package/dist/plugin-sdk/extensions/discord/src/runtime-api.d.ts +11 -0
  1032. package/dist/plugin-sdk/extensions/discord/src/send.channels.d.ts +17 -0
  1033. package/dist/plugin-sdk/extensions/discord/src/send.components.d.ts +24 -0
  1034. package/dist/plugin-sdk/extensions/discord/src/send.d.ts +11 -0
  1035. package/dist/plugin-sdk/extensions/discord/src/send.emojis-stickers.d.ts +4 -0
  1036. package/dist/plugin-sdk/extensions/discord/src/send.guild.d.ts +24 -0
  1037. package/dist/plugin-sdk/extensions/discord/src/send.messages.d.ts +20 -0
  1038. package/dist/plugin-sdk/extensions/discord/src/send.outbound.d.ts +61 -0
  1039. package/dist/plugin-sdk/extensions/discord/src/send.permissions.d.ts +20 -0
  1040. package/dist/plugin-sdk/extensions/discord/src/send.reactions.d.ts +15 -0
  1041. package/dist/plugin-sdk/extensions/discord/src/send.shared.d.ts +86 -0
  1042. package/dist/plugin-sdk/extensions/discord/src/send.types.d.ts +148 -0
  1043. package/dist/plugin-sdk/extensions/discord/src/send.typing.d.ts +5 -0
  1044. package/dist/plugin-sdk/extensions/discord/src/session-key-normalization.d.ts +7 -0
  1045. package/dist/plugin-sdk/extensions/discord/src/shared-interactive.d.ts +3 -0
  1046. package/dist/plugin-sdk/extensions/discord/src/status-issues.d.ts +2 -0
  1047. package/dist/plugin-sdk/extensions/discord/src/targets.d.ts +18 -0
  1048. package/dist/plugin-sdk/extensions/discord/src/token.d.ts +11 -0
  1049. package/dist/plugin-sdk/extensions/discord/src/ui.d.ts +19 -0
  1050. package/dist/plugin-sdk/extensions/discord/src/voice/command.d.ts +15 -0
  1051. package/dist/plugin-sdk/extensions/discord/src/voice/manager.d.ts +60 -0
  1052. package/dist/plugin-sdk/extensions/discord/src/voice/manager.runtime.d.ts +5 -0
  1053. package/dist/plugin-sdk/extensions/discord/src/voice/sdk-runtime.d.ts +3 -0
  1054. package/dist/plugin-sdk/extensions/discord/src/voice-message.d.ts +50 -0
  1055. package/dist/plugin-sdk/extensions/discord/timeouts.d.ts +1 -0
  1056. package/dist/plugin-sdk/extensions/feishu/api.d.ts +4 -0
  1057. package/dist/plugin-sdk/extensions/feishu/runtime-api.d.ts +1 -0
  1058. package/dist/plugin-sdk/extensions/feishu/setup-api.d.ts +2 -0
  1059. package/dist/plugin-sdk/extensions/feishu/src/accounts.d.ts +48 -0
  1060. package/dist/plugin-sdk/extensions/feishu/src/async.d.ts +12 -0
  1061. package/dist/plugin-sdk/extensions/feishu/src/bot-content.d.ts +82 -0
  1062. package/dist/plugin-sdk/extensions/feishu/src/bot-sender-name.d.ts +16 -0
  1063. package/dist/plugin-sdk/extensions/feishu/src/bot.d.ts +70 -0
  1064. package/dist/plugin-sdk/extensions/feishu/src/client.d.ts +47 -0
  1065. package/dist/plugin-sdk/extensions/feishu/src/config-schema.d.ts +550 -0
  1066. package/dist/plugin-sdk/extensions/feishu/src/conversation-id.d.ts +17 -0
  1067. package/dist/plugin-sdk/extensions/feishu/src/dedup.d.ts +19 -0
  1068. package/dist/plugin-sdk/extensions/feishu/src/dynamic-agent.d.ts +18 -0
  1069. package/dist/plugin-sdk/extensions/feishu/src/external-keys.d.ts +1 -0
  1070. package/dist/plugin-sdk/extensions/feishu/src/media.d.ts +118 -0
  1071. package/dist/plugin-sdk/extensions/feishu/src/mention.d.ts +52 -0
  1072. package/dist/plugin-sdk/extensions/feishu/src/policy.d.ts +28 -0
  1073. package/dist/plugin-sdk/extensions/feishu/src/post.d.ts +11 -0
  1074. package/dist/plugin-sdk/extensions/feishu/src/probe.d.ts +10 -0
  1075. package/dist/plugin-sdk/extensions/feishu/src/reply-dispatcher.d.ts +35 -0
  1076. package/dist/plugin-sdk/extensions/feishu/src/runtime.d.ts +3 -0
  1077. package/dist/plugin-sdk/extensions/feishu/src/secret-input.d.ts +1 -0
  1078. package/dist/plugin-sdk/extensions/feishu/src/send-result.d.ts +12 -0
  1079. package/dist/plugin-sdk/extensions/feishu/src/send-target.d.ts +10 -0
  1080. package/dist/plugin-sdk/extensions/feishu/src/send.d.ts +131 -0
  1081. package/dist/plugin-sdk/extensions/feishu/src/setup-core.d.ts +3 -0
  1082. package/dist/plugin-sdk/extensions/feishu/src/setup-surface.d.ts +3 -0
  1083. package/dist/plugin-sdk/extensions/feishu/src/streaming-card.d.ts +55 -0
  1084. package/dist/plugin-sdk/extensions/feishu/src/targets.d.ts +6 -0
  1085. package/dist/plugin-sdk/extensions/feishu/src/thread-bindings.d.ts +42 -0
  1086. package/dist/plugin-sdk/extensions/feishu/src/types.d.ts +84 -0
  1087. package/dist/plugin-sdk/extensions/feishu/src/typing.d.ts +57 -0
  1088. package/dist/plugin-sdk/extensions/firecrawl/index.d.ts +8 -0
  1089. package/dist/plugin-sdk/extensions/firecrawl/src/config.d.ts +25 -0
  1090. package/dist/plugin-sdk/extensions/firecrawl/src/firecrawl-client.d.ts +43 -0
  1091. package/dist/plugin-sdk/extensions/firecrawl/src/firecrawl-scrape-tool.d.ts +17 -0
  1092. package/dist/plugin-sdk/extensions/firecrawl/src/firecrawl-search-provider.d.ts +2 -0
  1093. package/dist/plugin-sdk/extensions/firecrawl/src/firecrawl-search-tool.d.ts +15 -0
  1094. package/dist/plugin-sdk/extensions/google/gemini-cli-provider.d.ts +2 -0
  1095. package/dist/plugin-sdk/extensions/google/index.d.ts +8 -0
  1096. package/dist/plugin-sdk/extensions/google/media-understanding-provider.d.ts +6 -0
  1097. package/dist/plugin-sdk/extensions/google/oauth.credentials.d.ts +21 -0
  1098. package/dist/plugin-sdk/extensions/google/oauth.d.ts +5 -0
  1099. package/dist/plugin-sdk/extensions/google/oauth.flow.d.ts +20 -0
  1100. package/dist/plugin-sdk/extensions/google/oauth.http.d.ts +1 -0
  1101. package/dist/plugin-sdk/extensions/google/oauth.project.d.ts +4 -0
  1102. package/dist/plugin-sdk/extensions/google/oauth.runtime.d.ts +1 -0
  1103. package/dist/plugin-sdk/extensions/google/oauth.shared.d.ts +33 -0
  1104. package/dist/plugin-sdk/extensions/google/oauth.token.d.ts +2 -0
  1105. package/dist/plugin-sdk/extensions/google/provider-models.d.ts +6 -0
  1106. package/dist/plugin-sdk/extensions/google/runtime-api.d.ts +1 -0
  1107. package/dist/plugin-sdk/extensions/google/src/gemini-web-search-provider.d.ts +13 -0
  1108. package/dist/plugin-sdk/extensions/huggingface/provider-catalog.d.ts +2 -0
  1109. package/dist/plugin-sdk/extensions/imessage/api.d.ts +4 -0
  1110. package/dist/plugin-sdk/extensions/imessage/runtime-api.d.ts +6 -0
  1111. package/dist/plugin-sdk/extensions/imessage/src/accounts.d.ts +16 -0
  1112. package/dist/plugin-sdk/extensions/imessage/src/client.d.ts +46 -0
  1113. package/dist/plugin-sdk/extensions/imessage/src/constants.d.ts +2 -0
  1114. package/dist/plugin-sdk/extensions/imessage/src/group-policy.d.ts +14 -0
  1115. package/dist/plugin-sdk/extensions/imessage/src/monitor/abort-handler.d.ts +9 -0
  1116. package/dist/plugin-sdk/extensions/imessage/src/monitor/deliver.d.ts +14 -0
  1117. package/dist/plugin-sdk/extensions/imessage/src/monitor/echo-cache.d.ts +9 -0
  1118. package/dist/plugin-sdk/extensions/imessage/src/monitor/inbound-processing.d.ts +98 -0
  1119. package/dist/plugin-sdk/extensions/imessage/src/monitor/loop-rate-limiter.d.ts +14 -0
  1120. package/dist/plugin-sdk/extensions/imessage/src/monitor/monitor-provider.d.ts +7 -0
  1121. package/dist/plugin-sdk/extensions/imessage/src/monitor/parse-notification.d.ts +2 -0
  1122. package/dist/plugin-sdk/extensions/imessage/src/monitor/reflection-guard.d.ts +14 -0
  1123. package/dist/plugin-sdk/extensions/imessage/src/monitor/runtime.d.ts +4 -0
  1124. package/dist/plugin-sdk/extensions/imessage/src/monitor/sanitize-outbound.d.ts +6 -0
  1125. package/dist/plugin-sdk/extensions/imessage/src/monitor/self-chat-cache.d.ts +16 -0
  1126. package/dist/plugin-sdk/extensions/imessage/src/monitor/types.d.ts +37 -0
  1127. package/dist/plugin-sdk/extensions/imessage/src/monitor.d.ts +2 -0
  1128. package/dist/plugin-sdk/extensions/imessage/src/probe.d.ts +17 -0
  1129. package/dist/plugin-sdk/extensions/imessage/src/send.d.ts +34 -0
  1130. package/dist/plugin-sdk/extensions/imessage/src/target-parsing-helpers.d.ts +85 -0
  1131. package/dist/plugin-sdk/extensions/imessage/src/targets.d.ts +27 -0
  1132. package/dist/plugin-sdk/extensions/irc/api.d.ts +2 -0
  1133. package/dist/plugin-sdk/extensions/irc/src/accounts.d.ts +23 -0
  1134. package/dist/plugin-sdk/extensions/irc/src/control-chars.d.ts +3 -0
  1135. package/dist/plugin-sdk/extensions/irc/src/normalize.d.ts +18 -0
  1136. package/dist/plugin-sdk/extensions/irc/src/runtime-api.d.ts +1 -0
  1137. package/dist/plugin-sdk/extensions/irc/src/setup-core.d.ts +10 -0
  1138. package/dist/plugin-sdk/extensions/irc/src/setup-surface.d.ts +4 -0
  1139. package/dist/plugin-sdk/extensions/irc/src/types.d.ts +83 -0
  1140. package/dist/plugin-sdk/extensions/kilocode/provider-catalog.d.ts +3 -0
  1141. package/dist/plugin-sdk/extensions/kimi-coding/provider-catalog.d.ts +10 -0
  1142. package/dist/plugin-sdk/extensions/matrix/helper-api.d.ts +3 -0
  1143. package/dist/plugin-sdk/extensions/matrix/runtime-api.d.ts +7 -0
  1144. package/dist/plugin-sdk/extensions/matrix/src/account-selection.d.ts +6 -0
  1145. package/dist/plugin-sdk/extensions/matrix/src/auth-precedence.d.ts +11 -0
  1146. package/dist/plugin-sdk/extensions/matrix/src/env-vars.d.ts +10 -0
  1147. package/dist/plugin-sdk/extensions/matrix/src/matrix/thread-bindings-shared.d.ts +77 -0
  1148. package/dist/plugin-sdk/extensions/matrix/src/storage-paths.d.ts +26 -0
  1149. package/dist/plugin-sdk/extensions/matrix/thread-bindings-runtime.d.ts +1 -0
  1150. package/dist/plugin-sdk/extensions/modelstudio/provider-catalog.d.ts +4 -0
  1151. package/dist/plugin-sdk/extensions/moonshot/index.d.ts +8 -0
  1152. package/dist/plugin-sdk/extensions/moonshot/media-understanding-provider.d.ts +4 -0
  1153. package/dist/plugin-sdk/extensions/moonshot/onboard.d.ts +7 -0
  1154. package/dist/plugin-sdk/extensions/moonshot/provider-catalog.d.ts +4 -0
  1155. package/dist/plugin-sdk/extensions/moonshot/src/kimi-web-search-provider.d.ts +43 -0
  1156. package/dist/plugin-sdk/extensions/nvidia/provider-catalog.d.ts +2 -0
  1157. package/dist/plugin-sdk/extensions/perplexity/index.d.ts +8 -0
  1158. package/dist/plugin-sdk/extensions/perplexity/src/perplexity-web-search-provider.d.ts +37 -0
  1159. package/dist/plugin-sdk/extensions/qianfan/provider-catalog.d.ts +4 -0
  1160. package/dist/plugin-sdk/extensions/signal/api.d.ts +8 -0
  1161. package/dist/plugin-sdk/extensions/signal/src/accounts.d.ts +17 -0
  1162. package/dist/plugin-sdk/extensions/signal/src/client.d.ts +32 -0
  1163. package/dist/plugin-sdk/extensions/signal/src/daemon.d.ts +26 -0
  1164. package/dist/plugin-sdk/extensions/signal/src/format.d.ts +17 -0
  1165. package/dist/plugin-sdk/extensions/signal/src/identity.d.ts +25 -0
  1166. package/dist/plugin-sdk/extensions/signal/src/message-actions.d.ts +2 -0
  1167. package/dist/plugin-sdk/extensions/signal/src/monitor/access-policy.d.ts +40 -0
  1168. package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.d.ts +5 -0
  1169. package/dist/plugin-sdk/extensions/signal/src/monitor/event-handler.types.d.ts +126 -0
  1170. package/dist/plugin-sdk/extensions/signal/src/monitor/mentions.d.ts +2 -0
  1171. package/dist/plugin-sdk/extensions/signal/src/monitor.d.ts +27 -0
  1172. package/dist/plugin-sdk/extensions/signal/src/probe.d.ts +7 -0
  1173. package/dist/plugin-sdk/extensions/signal/src/reaction-level.d.ts +17 -0
  1174. package/dist/plugin-sdk/extensions/signal/src/rpc-context.d.ts +9 -0
  1175. package/dist/plugin-sdk/extensions/signal/src/runtime-api.d.ts +1 -0
  1176. package/dist/plugin-sdk/extensions/signal/src/send-reactions.d.ts +34 -0
  1177. package/dist/plugin-sdk/extensions/signal/src/send.d.ts +27 -0
  1178. package/dist/plugin-sdk/extensions/signal/src/sse-reconnect.d.ts +13 -0
  1179. package/dist/plugin-sdk/extensions/slack/api.d.ts +15 -0
  1180. package/dist/plugin-sdk/extensions/slack/runtime-api.d.ts +5 -0
  1181. package/dist/plugin-sdk/extensions/slack/src/account-inspect.d.ts +32 -0
  1182. package/dist/plugin-sdk/extensions/slack/src/account-surface-fields.d.ts +14 -0
  1183. package/dist/plugin-sdk/extensions/slack/src/accounts.d.ts +25 -0
  1184. package/dist/plugin-sdk/extensions/slack/src/action-runtime.d.ts +38 -0
  1185. package/dist/plugin-sdk/extensions/slack/src/actions.d.ts +74 -0
  1186. package/dist/plugin-sdk/extensions/slack/src/blocks-fallback.d.ts +2 -0
  1187. package/dist/plugin-sdk/extensions/slack/src/blocks-input.d.ts +3 -0
  1188. package/dist/plugin-sdk/extensions/slack/src/blocks-render.d.ts +6 -0
  1189. package/dist/plugin-sdk/extensions/slack/src/channel-migration.d.ts +20 -0
  1190. package/dist/plugin-sdk/extensions/slack/src/client.d.ts +4 -0
  1191. package/dist/plugin-sdk/extensions/slack/src/directory-config.d.ts +3 -0
  1192. package/dist/plugin-sdk/extensions/slack/src/directory-live.d.ts +3 -0
  1193. package/dist/plugin-sdk/extensions/slack/src/draft-stream.d.ts +25 -0
  1194. package/dist/plugin-sdk/extensions/slack/src/format.d.ts +8 -0
  1195. package/dist/plugin-sdk/extensions/slack/src/group-policy.d.ts +4 -0
  1196. package/dist/plugin-sdk/extensions/slack/src/http/index.d.ts +1 -0
  1197. package/dist/plugin-sdk/extensions/slack/src/http/registry.d.ts +12 -0
  1198. package/dist/plugin-sdk/extensions/slack/src/index.d.ts +7 -0
  1199. package/dist/plugin-sdk/extensions/slack/src/interactive-replies.d.ts +5 -0
  1200. package/dist/plugin-sdk/extensions/slack/src/message-actions.d.ts +5 -0
  1201. package/dist/plugin-sdk/extensions/slack/src/modal-metadata.d.ts +8 -0
  1202. package/dist/plugin-sdk/extensions/slack/src/monitor/allow-list.d.ts +24 -0
  1203. package/dist/plugin-sdk/extensions/slack/src/monitor/auth.d.ts +29 -0
  1204. package/dist/plugin-sdk/extensions/slack/src/monitor/channel-config.d.ts +45 -0
  1205. package/dist/plugin-sdk/extensions/slack/src/monitor/channel-type.d.ts +3 -0
  1206. package/dist/plugin-sdk/extensions/slack/src/monitor/commands.d.ts +9 -0
  1207. package/dist/plugin-sdk/extensions/slack/src/monitor/context.d.ts +107 -0
  1208. package/dist/plugin-sdk/extensions/slack/src/monitor/dm-auth.d.ts +17 -0
  1209. package/dist/plugin-sdk/extensions/slack/src/monitor/events/channels.d.ts +5 -0
  1210. package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.block-actions.d.ts +49 -0
  1211. package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.d.ts +4 -0
  1212. package/dist/plugin-sdk/extensions/slack/src/monitor/events/interactions.modal.d.ts +68 -0
  1213. package/dist/plugin-sdk/extensions/slack/src/monitor/events/members.d.ts +5 -0
  1214. package/dist/plugin-sdk/extensions/slack/src/monitor/events/message-subtype-handlers.d.ts +13 -0
  1215. package/dist/plugin-sdk/extensions/slack/src/monitor/events/messages.d.ts +6 -0
  1216. package/dist/plugin-sdk/extensions/slack/src/monitor/events/pins.d.ts +5 -0
  1217. package/dist/plugin-sdk/extensions/slack/src/monitor/events/reactions.d.ts +5 -0
  1218. package/dist/plugin-sdk/extensions/slack/src/monitor/events/system-event-context.d.ts +12 -0
  1219. package/dist/plugin-sdk/extensions/slack/src/monitor/events.d.ts +10 -0
  1220. package/dist/plugin-sdk/extensions/slack/src/monitor/external-arg-menu-store.d.ts +18 -0
  1221. package/dist/plugin-sdk/extensions/slack/src/monitor/media.d.ts +66 -0
  1222. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/dispatch.d.ts +12 -0
  1223. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-content.d.ts +14 -0
  1224. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare-thread-context.d.ts +24 -0
  1225. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/prepare.d.ts +13 -0
  1226. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler/types.d.ts +23 -0
  1227. package/dist/plugin-sdk/extensions/slack/src/monitor/message-handler.d.ts +22 -0
  1228. package/dist/plugin-sdk/extensions/slack/src/monitor/mrkdwn.d.ts +1 -0
  1229. package/dist/plugin-sdk/extensions/slack/src/monitor/policy.d.ts +5 -0
  1230. package/dist/plugin-sdk/extensions/slack/src/monitor/provider.d.ts +26 -0
  1231. package/dist/plugin-sdk/extensions/slack/src/monitor/reconnect-policy.d.ts +25 -0
  1232. package/dist/plugin-sdk/extensions/slack/src/monitor/replies.d.ts +56 -0
  1233. package/dist/plugin-sdk/extensions/slack/src/monitor/room-context.d.ts +14 -0
  1234. package/dist/plugin-sdk/extensions/slack/src/monitor/slash-commands.runtime.d.ts +11 -0
  1235. package/dist/plugin-sdk/extensions/slack/src/monitor/slash-dispatch.runtime.d.ts +17 -0
  1236. package/dist/plugin-sdk/extensions/slack/src/monitor/slash-skill-commands.runtime.d.ts +3 -0
  1237. package/dist/plugin-sdk/extensions/slack/src/monitor/slash.d.ts +6 -0
  1238. package/dist/plugin-sdk/extensions/slack/src/monitor/thread-resolution.d.ts +12 -0
  1239. package/dist/plugin-sdk/extensions/slack/src/monitor/types.d.ts +113 -0
  1240. package/dist/plugin-sdk/extensions/slack/src/monitor.d.ts +5 -0
  1241. package/dist/plugin-sdk/extensions/slack/src/probe.d.ts +14 -0
  1242. package/dist/plugin-sdk/extensions/slack/src/resolve-allowlist-common.d.ts +29 -0
  1243. package/dist/plugin-sdk/extensions/slack/src/resolve-channels.d.ts +19 -0
  1244. package/dist/plugin-sdk/extensions/slack/src/resolve-users.d.ts +26 -0
  1245. package/dist/plugin-sdk/extensions/slack/src/runtime-api.d.ts +4 -0
  1246. package/dist/plugin-sdk/extensions/slack/src/send.d.ts +24 -0
  1247. package/dist/plugin-sdk/extensions/slack/src/sent-thread-cache.d.ts +3 -0
  1248. package/dist/plugin-sdk/extensions/slack/src/stream-mode.d.ts +23 -0
  1249. package/dist/plugin-sdk/extensions/slack/src/streaming.d.ts +72 -0
  1250. package/dist/plugin-sdk/extensions/slack/src/targets.d.ts +7 -0
  1251. package/dist/plugin-sdk/extensions/slack/src/threading-tool-context.d.ts +10 -0
  1252. package/dist/plugin-sdk/extensions/slack/src/threading.d.ts +29 -0
  1253. package/dist/plugin-sdk/extensions/slack/src/token.d.ts +4 -0
  1254. package/dist/plugin-sdk/extensions/slack/src/truncate.d.ts +1 -0
  1255. package/dist/plugin-sdk/extensions/slack/src/types.d.ts +58 -0
  1256. package/dist/plugin-sdk/extensions/tavily/index.d.ts +8 -0
  1257. package/dist/plugin-sdk/extensions/tavily/src/config.d.ts +14 -0
  1258. package/dist/plugin-sdk/extensions/tavily/src/tavily-client.d.ts +29 -0
  1259. package/dist/plugin-sdk/extensions/tavily/src/tavily-extract-tool.d.ts +14 -0
  1260. package/dist/plugin-sdk/extensions/tavily/src/tavily-search-provider.d.ts +2 -0
  1261. package/dist/plugin-sdk/extensions/tavily/src/tavily-search-tool.d.ts +17 -0
  1262. package/dist/plugin-sdk/extensions/telegram/allow-from.d.ts +1 -0
  1263. package/dist/plugin-sdk/extensions/telegram/api.d.ts +20 -0
  1264. package/dist/plugin-sdk/extensions/telegram/runtime-api.d.ts +14 -0
  1265. package/dist/plugin-sdk/extensions/telegram/src/account-inspect.d.ts +18 -0
  1266. package/dist/plugin-sdk/extensions/telegram/src/accounts.d.ts +31 -0
  1267. package/dist/plugin-sdk/extensions/telegram/src/action-runtime.d.ts +21 -0
  1268. package/dist/plugin-sdk/extensions/telegram/src/allow-from.d.ts +2 -0
  1269. package/dist/plugin-sdk/extensions/telegram/src/allowed-updates.d.ts +4 -0
  1270. package/dist/plugin-sdk/extensions/telegram/src/api-fetch.d.ts +20 -0
  1271. package/dist/plugin-sdk/extensions/telegram/src/api-logging.d.ts +11 -0
  1272. package/dist/plugin-sdk/extensions/telegram/src/approval-buttons.d.ts +2 -0
  1273. package/dist/plugin-sdk/extensions/telegram/src/audit-membership-runtime.d.ts +4 -0
  1274. package/dist/plugin-sdk/extensions/telegram/src/audit.d.ts +33 -0
  1275. package/dist/plugin-sdk/extensions/telegram/src/bot/delivery.d.ts +2 -0
  1276. package/dist/plugin-sdk/extensions/telegram/src/bot/delivery.replies.d.ts +50 -0
  1277. package/dist/plugin-sdk/extensions/telegram/src/bot/delivery.resolve-media.d.ts +8 -0
  1278. package/dist/plugin-sdk/extensions/telegram/src/bot/delivery.send.d.ts +27 -0
  1279. package/dist/plugin-sdk/extensions/telegram/src/bot/helpers.d.ts +147 -0
  1280. package/dist/plugin-sdk/extensions/telegram/src/bot/reply-threading.d.ts +30 -0
  1281. package/dist/plugin-sdk/extensions/telegram/src/bot/types.d.ts +28 -0
  1282. package/dist/plugin-sdk/extensions/telegram/src/bot-access.d.ts +25 -0
  1283. package/dist/plugin-sdk/extensions/telegram/src/bot-deps.d.ts +19 -0
  1284. package/dist/plugin-sdk/extensions/telegram/src/bot-handlers.d.ts +1 -0
  1285. package/dist/plugin-sdk/extensions/telegram/src/bot-handlers.media.d.ts +7 -0
  1286. package/dist/plugin-sdk/extensions/telegram/src/bot-handlers.runtime.d.ts +2 -0
  1287. package/dist/plugin-sdk/extensions/telegram/src/bot-message-context.body.d.ts +39 -0
  1288. package/dist/plugin-sdk/extensions/telegram/src/bot-message-context.d.ts +34 -0
  1289. package/dist/plugin-sdk/extensions/telegram/src/bot-message-context.session.d.ts +41 -0
  1290. package/dist/plugin-sdk/extensions/telegram/src/bot-message-context.types.d.ts +56 -0
  1291. package/dist/plugin-sdk/extensions/telegram/src/bot-message-dispatch.d.ts +31 -0
  1292. package/dist/plugin-sdk/extensions/telegram/src/bot-message.d.ts +20 -0
  1293. package/dist/plugin-sdk/extensions/telegram/src/bot-native-command-menu.d.ts +37 -0
  1294. package/dist/plugin-sdk/extensions/telegram/src/bot-native-commands.d.ts +60 -0
  1295. package/dist/plugin-sdk/extensions/telegram/src/bot-updates.d.ts +31 -0
  1296. package/dist/plugin-sdk/extensions/telegram/src/bot.d.ts +39 -0
  1297. package/dist/plugin-sdk/extensions/telegram/src/bot.runtime.d.ts +4 -0
  1298. package/dist/plugin-sdk/extensions/telegram/src/button-types.d.ts +13 -0
  1299. package/dist/plugin-sdk/extensions/telegram/src/caption.d.ts +5 -0
  1300. package/dist/plugin-sdk/extensions/telegram/src/channel-actions.d.ts +6 -0
  1301. package/dist/plugin-sdk/extensions/telegram/src/conversation-route.d.ts +24 -0
  1302. package/dist/plugin-sdk/extensions/telegram/src/directory-config.d.ts +3 -0
  1303. package/dist/plugin-sdk/extensions/telegram/src/dm-access.d.ts +20 -0
  1304. package/dist/plugin-sdk/extensions/telegram/src/draft-stream.d.ts +48 -0
  1305. package/dist/plugin-sdk/extensions/telegram/src/exec-approvals-handler.d.ts +34 -0
  1306. package/dist/plugin-sdk/extensions/telegram/src/exec-approvals.d.ts +39 -0
  1307. package/dist/plugin-sdk/extensions/telegram/src/fetch.d.ts +23 -0
  1308. package/dist/plugin-sdk/extensions/telegram/src/format.d.ts +19 -0
  1309. package/dist/plugin-sdk/extensions/telegram/src/forum-service-message.d.ts +9 -0
  1310. package/dist/plugin-sdk/extensions/telegram/src/group-access.d.ts +54 -0
  1311. package/dist/plugin-sdk/extensions/telegram/src/group-config-helpers.d.ts +8 -0
  1312. package/dist/plugin-sdk/extensions/telegram/src/group-migration.d.ts +20 -0
  1313. package/dist/plugin-sdk/extensions/telegram/src/group-policy.d.ts +4 -0
  1314. package/dist/plugin-sdk/extensions/telegram/src/inline-buttons.d.ts +11 -0
  1315. package/dist/plugin-sdk/extensions/telegram/src/lane-delivery-state.d.ts +12 -0
  1316. package/dist/plugin-sdk/extensions/telegram/src/lane-delivery-text-deliverer.d.ts +55 -0
  1317. package/dist/plugin-sdk/extensions/telegram/src/lane-delivery.d.ts +2 -0
  1318. package/dist/plugin-sdk/extensions/telegram/src/media-understanding.runtime.d.ts +5 -0
  1319. package/dist/plugin-sdk/extensions/telegram/src/message-tool-schema.d.ts +5 -0
  1320. package/dist/plugin-sdk/extensions/telegram/src/model-buttons.d.ts +84 -0
  1321. package/dist/plugin-sdk/extensions/telegram/src/monitor.d.ts +20 -0
  1322. package/dist/plugin-sdk/extensions/telegram/src/network-config.d.ts +33 -0
  1323. package/dist/plugin-sdk/extensions/telegram/src/network-errors.d.ts +25 -0
  1324. package/dist/plugin-sdk/extensions/telegram/src/normalize.d.ts +2 -0
  1325. package/dist/plugin-sdk/extensions/telegram/src/outbound-adapter.d.ts +14 -0
  1326. package/dist/plugin-sdk/extensions/telegram/src/outbound-params.d.ts +2 -0
  1327. package/dist/plugin-sdk/extensions/telegram/src/polling-session.d.ts +27 -0
  1328. package/dist/plugin-sdk/extensions/telegram/src/probe.d.ts +25 -0
  1329. package/dist/plugin-sdk/extensions/telegram/src/proxy.d.ts +1 -0
  1330. package/dist/plugin-sdk/extensions/telegram/src/reaction-level.d.ts +11 -0
  1331. package/dist/plugin-sdk/extensions/telegram/src/reasoning-lane-coordinator.d.ts +18 -0
  1332. package/dist/plugin-sdk/extensions/telegram/src/send.d.ts +217 -0
  1333. package/dist/plugin-sdk/extensions/telegram/src/sendchataction-401-backoff.d.ts +28 -0
  1334. package/dist/plugin-sdk/extensions/telegram/src/sent-message-cache.d.ts +12 -0
  1335. package/dist/plugin-sdk/extensions/telegram/src/sequential-key.d.ts +25 -0
  1336. package/dist/plugin-sdk/extensions/telegram/src/status-issues.d.ts +2 -0
  1337. package/dist/plugin-sdk/extensions/telegram/src/status-reaction-variants.d.ts +21 -0
  1338. package/dist/plugin-sdk/extensions/telegram/src/sticker-cache.d.ts +46 -0
  1339. package/dist/plugin-sdk/extensions/telegram/src/target-writeback.d.ts +7 -0
  1340. package/dist/plugin-sdk/extensions/telegram/src/targets.d.ts +11 -0
  1341. package/dist/plugin-sdk/extensions/telegram/src/thread-bindings.d.ts +58 -0
  1342. package/dist/plugin-sdk/extensions/telegram/src/token.d.ts +13 -0
  1343. package/dist/plugin-sdk/extensions/telegram/src/update-offset-store.d.ts +15 -0
  1344. package/dist/plugin-sdk/extensions/telegram/src/voice.d.ts +16 -0
  1345. package/dist/plugin-sdk/extensions/telegram/src/webhook.d.ts +21 -0
  1346. package/dist/plugin-sdk/extensions/venice/provider-catalog.d.ts +2 -0
  1347. package/dist/plugin-sdk/extensions/vercel-ai-gateway/provider-catalog.d.ts +2 -0
  1348. package/dist/plugin-sdk/extensions/whatsapp/api.d.ts +7 -0
  1349. package/dist/plugin-sdk/extensions/whatsapp/auth-presence.d.ts +1 -0
  1350. package/dist/plugin-sdk/extensions/whatsapp/light-runtime-api.d.ts +4 -0
  1351. package/dist/plugin-sdk/extensions/whatsapp/login-qr-api.d.ts +1 -0
  1352. package/dist/plugin-sdk/extensions/whatsapp/runtime-api.d.ts +11 -0
  1353. package/dist/plugin-sdk/extensions/whatsapp/src/accounts.d.ts +42 -0
  1354. package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime-target-auth.d.ts +10 -0
  1355. package/dist/plugin-sdk/extensions/whatsapp/src/action-runtime.d.ts +9 -0
  1356. package/dist/plugin-sdk/extensions/whatsapp/src/active-listener.d.ts +25 -0
  1357. package/dist/plugin-sdk/extensions/whatsapp/src/agent-tools-login.d.ts +2 -0
  1358. package/dist/plugin-sdk/extensions/whatsapp/src/auth-store.d.ts +26 -0
  1359. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/constants.d.ts +1 -0
  1360. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/deliver-reply.d.ts +19 -0
  1361. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/heartbeat-runner.d.ts +20 -0
  1362. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/loggers.d.ts +4 -0
  1363. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/mentions.d.ts +19 -0
  1364. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.d.ts +13 -0
  1365. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/broadcast.d.ts +16 -0
  1366. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/commands.d.ts +2 -0
  1367. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/echo.d.ts +17 -0
  1368. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-activation.d.ts +9 -0
  1369. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-gating.d.ts +33 -0
  1370. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/group-members.d.ts +6 -0
  1371. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/last-route.d.ts +15 -0
  1372. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/message-line.d.ts +11 -0
  1373. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/on-message.d.ts +24 -0
  1374. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/peer.d.ts +2 -0
  1375. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor/process-message.d.ts +40 -0
  1376. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/monitor.d.ts +5 -0
  1377. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/session-snapshot.d.ts +17 -0
  1378. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/types.d.ts +30 -0
  1379. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply/util.d.ts +2 -0
  1380. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.d.ts +1 -0
  1381. package/dist/plugin-sdk/extensions/whatsapp/src/auto-reply.impl.d.ts +6 -0
  1382. package/dist/plugin-sdk/extensions/whatsapp/src/channel.runtime.d.ts +23 -0
  1383. package/dist/plugin-sdk/extensions/whatsapp/src/directory-config.d.ts +3 -0
  1384. package/dist/plugin-sdk/extensions/whatsapp/src/group-policy.d.ts +14 -0
  1385. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/access-control.d.ts +36 -0
  1386. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/dedupe.d.ts +2 -0
  1387. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/extract.d.ts +13 -0
  1388. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/media.d.ts +7 -0
  1389. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/monitor.d.ts +30 -0
  1390. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/send-api.d.ts +22 -0
  1391. package/dist/plugin-sdk/extensions/whatsapp/src/inbound/types.d.ts +42 -0
  1392. package/dist/plugin-sdk/extensions/whatsapp/src/inbound.d.ts +4 -0
  1393. package/dist/plugin-sdk/extensions/whatsapp/src/login-qr.d.ts +19 -0
  1394. package/dist/plugin-sdk/extensions/whatsapp/src/login.d.ts +3 -0
  1395. package/dist/plugin-sdk/extensions/whatsapp/src/media.d.ts +43 -0
  1396. package/dist/plugin-sdk/extensions/whatsapp/src/normalize.d.ts +1 -0
  1397. package/dist/plugin-sdk/extensions/whatsapp/src/qr-image.d.ts +4 -0
  1398. package/dist/plugin-sdk/extensions/whatsapp/src/reconnect.d.ts +12 -0
  1399. package/dist/plugin-sdk/extensions/whatsapp/src/runtime-api.d.ts +3 -0
  1400. package/dist/plugin-sdk/extensions/whatsapp/src/send.d.ts +27 -0
  1401. package/dist/plugin-sdk/extensions/whatsapp/src/session-errors.d.ts +2 -0
  1402. package/dist/plugin-sdk/extensions/whatsapp/src/session.d.ts +17 -0
  1403. package/dist/plugin-sdk/extensions/whatsapp/src/setup-core.d.ts +2 -0
  1404. package/dist/plugin-sdk/extensions/whatsapp/src/setup-surface.d.ts +2 -0
  1405. package/dist/plugin-sdk/extensions/whatsapp/src/vcard.d.ts +6 -0
  1406. package/dist/plugin-sdk/extensions/xai/index.d.ts +8 -0
  1407. package/dist/plugin-sdk/extensions/xai/model-definitions.d.ts +17 -0
  1408. package/dist/plugin-sdk/extensions/xai/onboard.d.ts +5 -0
  1409. package/dist/plugin-sdk/extensions/xai/provider-catalog.d.ts +2 -0
  1410. package/dist/plugin-sdk/extensions/xai/provider-models.d.ts +6 -0
  1411. package/dist/plugin-sdk/extensions/xai/src/web-search-shared.d.ts +69 -0
  1412. package/dist/plugin-sdk/extensions/xai/stream.d.ts +3 -0
  1413. package/dist/plugin-sdk/extensions/xai/web-search.d.ts +10 -0
  1414. package/dist/plugin-sdk/extensions/xiaomi/provider-catalog.d.ts +3 -0
  1415. package/dist/plugin-sdk/extensions/zalo/api.d.ts +2 -0
  1416. package/dist/plugin-sdk/extensions/zalo/runtime-api.d.ts +1 -0
  1417. package/dist/plugin-sdk/extensions/zalo/src/accounts.d.ts +11 -0
  1418. package/dist/plugin-sdk/extensions/zalo/src/runtime-api.d.ts +1 -0
  1419. package/dist/plugin-sdk/extensions/zalo/src/secret-input.d.ts +1 -0
  1420. package/dist/plugin-sdk/extensions/zalo/src/setup-core.d.ts +1 -0
  1421. package/dist/plugin-sdk/extensions/zalo/src/setup-surface.d.ts +3 -0
  1422. package/dist/plugin-sdk/extensions/zalo/src/token.d.ts +8 -0
  1423. package/dist/plugin-sdk/extensions/zalo/src/types.d.ts +46 -0
  1424. package/dist/plugin-sdk/feishu.d.ts +1 -0
  1425. package/dist/plugin-sdk/feishu.js +101 -0
  1426. package/dist/plugin-sdk/gateway-runtime.d.ts +1 -0
  1427. package/dist/plugin-sdk/gateway-runtime.js +46 -0
  1428. package/dist/plugin-sdk/googlechat.d.ts +1 -0
  1429. package/dist/plugin-sdk/googlechat.js +93 -0
  1430. package/dist/plugin-sdk/group-access.d.ts +1 -0
  1431. package/dist/plugin-sdk/group-access.js +2 -0
  1432. package/dist/plugin-sdk/hook-runtime.d.ts +1 -0
  1433. package/dist/plugin-sdk/hook-runtime.js +12 -0
  1434. package/dist/plugin-sdk/image-generation.d.ts +1 -0
  1435. package/dist/plugin-sdk/image-generation.js +51 -0
  1436. package/dist/plugin-sdk/imessage-core.d.ts +1 -0
  1437. package/dist/plugin-sdk/imessage-core.js +214 -0
  1438. package/dist/plugin-sdk/imessage.d.ts +1 -0
  1439. package/dist/plugin-sdk/imessage.js +223 -0
  1440. package/dist/plugin-sdk/index.d.ts +1 -0
  1441. package/dist/plugin-sdk/index.js +55 -0
  1442. package/dist/plugin-sdk/infra-runtime.d.ts +1 -0
  1443. package/dist/plugin-sdk/infra-runtime.js +223 -0
  1444. package/dist/plugin-sdk/interactive-runtime.d.ts +1 -0
  1445. package/dist/plugin-sdk/interactive-runtime.js +3 -0
  1446. package/dist/plugin-sdk/irc.d.ts +1 -0
  1447. package/dist/plugin-sdk/irc.js +232 -0
  1448. package/dist/plugin-sdk/json-store.d.ts +1 -0
  1449. package/dist/plugin-sdk/json-store.js +9 -0
  1450. package/dist/plugin-sdk/keyed-async-queue.d.ts +1 -0
  1451. package/dist/plugin-sdk/keyed-async-queue.js +2 -0
  1452. package/dist/plugin-sdk/lazy-runtime.d.ts +1 -0
  1453. package/dist/plugin-sdk/lazy-runtime.js +2 -0
  1454. package/dist/plugin-sdk/line-core.d.ts +1 -0
  1455. package/dist/plugin-sdk/line-core.js +29 -0
  1456. package/dist/plugin-sdk/line.d.ts +1 -0
  1457. package/dist/plugin-sdk/line.js +22 -0
  1458. package/dist/plugin-sdk/llm-task.d.ts +1 -0
  1459. package/dist/plugin-sdk/llm-task.js +7 -0
  1460. package/dist/plugin-sdk/matrix-runtime-heavy.d.ts +1 -0
  1461. package/dist/plugin-sdk/matrix-runtime-heavy.js +223 -0
  1462. package/dist/plugin-sdk/matrix-runtime-shared.d.ts +1 -0
  1463. package/dist/plugin-sdk/matrix-runtime-shared.js +2 -0
  1464. package/dist/plugin-sdk/matrix.d.ts +1 -0
  1465. package/dist/plugin-sdk/matrix.js +84 -0
  1466. package/dist/plugin-sdk/mattermost.d.ts +1 -0
  1467. package/dist/plugin-sdk/mattermost.js +233 -0
  1468. package/dist/plugin-sdk/media-runtime.d.ts +1 -0
  1469. package/dist/plugin-sdk/media-runtime.js +212 -0
  1470. package/dist/plugin-sdk/media-understanding-runtime.d.ts +1 -0
  1471. package/dist/plugin-sdk/media-understanding-runtime.js +211 -0
  1472. package/dist/plugin-sdk/media-understanding.d.ts +1 -0
  1473. package/dist/plugin-sdk/media-understanding.js +15 -0
  1474. package/dist/plugin-sdk/memory-core.d.ts +1 -0
  1475. package/dist/plugin-sdk/memory-core.js +2 -0
  1476. package/dist/plugin-sdk/memory-lancedb.d.ts +1 -0
  1477. package/dist/plugin-sdk/memory-lancedb.js +2 -0
  1478. package/dist/plugin-sdk/msteams.d.ts +1 -0
  1479. package/dist/plugin-sdk/msteams.js +244 -0
  1480. package/dist/plugin-sdk/nextcloud-talk.d.ts +1 -0
  1481. package/dist/plugin-sdk/nextcloud-talk.js +231 -0
  1482. package/dist/plugin-sdk/nostr.d.ts +1 -0
  1483. package/dist/plugin-sdk/nostr.js +50 -0
  1484. package/dist/plugin-sdk/ollama-setup.d.ts +1 -0
  1485. package/dist/plugin-sdk/ollama-setup.js +33 -0
  1486. package/dist/plugin-sdk/outbound-runtime.d.ts +1 -0
  1487. package/dist/plugin-sdk/outbound-runtime.js +23 -0
  1488. package/dist/plugin-sdk/plugin-entry.d.ts +1 -0
  1489. package/dist/plugin-sdk/plugin-entry.js +3 -0
  1490. package/dist/plugin-sdk/plugin-runtime.d.ts +1 -0
  1491. package/dist/plugin-sdk/plugin-runtime.js +211 -0
  1492. package/dist/plugin-sdk/process-runtime.d.ts +1 -0
  1493. package/dist/plugin-sdk/process-runtime.js +12 -0
  1494. package/dist/plugin-sdk/provider-auth-api-key.d.ts +1 -0
  1495. package/dist/plugin-sdk/provider-auth-api-key.js +53 -0
  1496. package/dist/plugin-sdk/provider-auth-login.d.ts +1 -0
  1497. package/dist/plugin-sdk/provider-auth-login.js +2 -0
  1498. package/dist/plugin-sdk/provider-auth.d.ts +1 -0
  1499. package/dist/plugin-sdk/provider-auth.js +37 -0
  1500. package/dist/plugin-sdk/provider-catalog.d.ts +1 -0
  1501. package/dist/plugin-sdk/provider-catalog.js +2 -0
  1502. package/dist/plugin-sdk/provider-env-vars.d.ts +1 -0
  1503. package/dist/plugin-sdk/provider-env-vars.js +2 -0
  1504. package/dist/plugin-sdk/provider-google.d.ts +1 -0
  1505. package/dist/plugin-sdk/provider-google.js +3 -0
  1506. package/dist/plugin-sdk/provider-models.d.ts +1 -0
  1507. package/dist/plugin-sdk/provider-models.js +27 -0
  1508. package/dist/plugin-sdk/provider-onboard.d.ts +1 -0
  1509. package/dist/plugin-sdk/provider-onboard.js +20 -0
  1510. package/dist/plugin-sdk/provider-setup.d.ts +1 -0
  1511. package/dist/plugin-sdk/provider-setup.js +58 -0
  1512. package/dist/plugin-sdk/provider-stream.d.ts +1 -0
  1513. package/dist/plugin-sdk/provider-stream.js +211 -0
  1514. package/dist/plugin-sdk/provider-usage.d.ts +1 -0
  1515. package/dist/plugin-sdk/provider-usage.js +18 -0
  1516. package/dist/plugin-sdk/provider-web-search.d.ts +1 -0
  1517. package/dist/plugin-sdk/provider-web-search.js +23 -0
  1518. package/dist/plugin-sdk/provider-zai-endpoint.d.ts +1 -0
  1519. package/dist/plugin-sdk/provider-zai-endpoint.js +3 -0
  1520. package/dist/plugin-sdk/reply-history.d.ts +1 -0
  1521. package/dist/plugin-sdk/reply-history.js +23 -0
  1522. package/dist/plugin-sdk/reply-payload.d.ts +1 -0
  1523. package/dist/plugin-sdk/reply-payload.js +2 -0
  1524. package/dist/plugin-sdk/reply-runtime.d.ts +1 -0
  1525. package/dist/plugin-sdk/reply-runtime.js +211 -0
  1526. package/dist/plugin-sdk/request-url.d.ts +1 -0
  1527. package/dist/plugin-sdk/request-url.js +2 -0
  1528. package/dist/plugin-sdk/root-alias.cjs +272 -0
  1529. package/dist/plugin-sdk/routing.d.ts +1 -0
  1530. package/dist/plugin-sdk/routing.js +25 -0
  1531. package/dist/plugin-sdk/runtime-env.d.ts +1 -0
  1532. package/dist/plugin-sdk/runtime-env.js +15 -0
  1533. package/dist/plugin-sdk/runtime-store.d.ts +1 -0
  1534. package/dist/plugin-sdk/runtime-store.js +2 -0
  1535. package/dist/plugin-sdk/runtime.d.ts +1 -0
  1536. package/dist/plugin-sdk/runtime.js +15 -0
  1537. package/dist/plugin-sdk/sandbox.d.ts +1 -0
  1538. package/dist/plugin-sdk/sandbox.js +66 -0
  1539. package/dist/plugin-sdk/secret-input.d.ts +1 -0
  1540. package/dist/plugin-sdk/secret-input.js +3 -0
  1541. package/dist/plugin-sdk/security-runtime.d.ts +1 -0
  1542. package/dist/plugin-sdk/security-runtime.js +18 -0
  1543. package/dist/plugin-sdk/self-hosted-provider-setup.d.ts +1 -0
  1544. package/dist/plugin-sdk/self-hosted-provider-setup.js +33 -0
  1545. package/dist/plugin-sdk/setup-adapter-runtime.d.ts +1 -0
  1546. package/dist/plugin-sdk/setup-adapter-runtime.js +2 -0
  1547. package/dist/plugin-sdk/setup-runtime.d.ts +1 -0
  1548. package/dist/plugin-sdk/setup-runtime.js +17 -0
  1549. package/dist/plugin-sdk/setup-tools.d.ts +1 -0
  1550. package/dist/plugin-sdk/setup-tools.js +21 -0
  1551. package/dist/plugin-sdk/setup.d.ts +1 -0
  1552. package/dist/plugin-sdk/setup.js +26 -0
  1553. package/dist/plugin-sdk/signal.d.ts +1 -0
  1554. package/dist/plugin-sdk/signal.js +220 -0
  1555. package/dist/plugin-sdk/slack-core.d.ts +1 -0
  1556. package/dist/plugin-sdk/slack-core.js +22 -0
  1557. package/dist/plugin-sdk/slack.d.ts +1 -0
  1558. package/dist/plugin-sdk/slack.js +223 -0
  1559. package/dist/plugin-sdk/speech-runtime.d.ts +1 -0
  1560. package/dist/plugin-sdk/speech-runtime.js +213 -0
  1561. package/dist/plugin-sdk/speech.d.ts +1 -0
  1562. package/dist/plugin-sdk/speech.js +212 -0
  1563. package/dist/plugin-sdk/src/acp/control-plane/manager.core.d.ts +86 -0
  1564. package/dist/plugin-sdk/src/acp/control-plane/manager.d.ts +7 -0
  1565. package/dist/plugin-sdk/src/acp/control-plane/manager.identity-reconcile.d.ts +23 -0
  1566. package/dist/plugin-sdk/src/acp/control-plane/manager.runtime-controls.d.ts +14 -0
  1567. package/dist/plugin-sdk/src/acp/control-plane/manager.types.d.ts +109 -0
  1568. package/dist/plugin-sdk/src/acp/control-plane/manager.utils.d.ts +21 -0
  1569. package/dist/plugin-sdk/src/acp/control-plane/runtime-cache.d.ts +38 -0
  1570. package/dist/plugin-sdk/src/acp/control-plane/runtime-options.d.ts +23 -0
  1571. package/dist/plugin-sdk/src/acp/control-plane/session-actor-queue.d.ts +8 -0
  1572. package/dist/plugin-sdk/src/acp/control-plane/spawn.d.ts +25 -0
  1573. package/dist/plugin-sdk/src/acp/conversation-id.d.ts +15 -0
  1574. package/dist/plugin-sdk/src/acp/persistent-bindings.lifecycle.d.ts +33 -0
  1575. package/dist/plugin-sdk/src/acp/persistent-bindings.resolve.d.ts +18 -0
  1576. package/dist/plugin-sdk/src/acp/persistent-bindings.types.d.ts +39 -0
  1577. package/dist/plugin-sdk/src/acp/policy.d.ts +10 -0
  1578. package/dist/plugin-sdk/src/acp/runtime/error-text.d.ts +7 -0
  1579. package/dist/plugin-sdk/src/acp/runtime/errors.d.ts +20 -0
  1580. package/dist/plugin-sdk/src/acp/runtime/registry.d.ts +18 -0
  1581. package/dist/plugin-sdk/src/acp/runtime/session-identifiers.d.ts +17 -0
  1582. package/dist/plugin-sdk/src/acp/runtime/session-identity.d.ts +24 -0
  1583. package/dist/plugin-sdk/src/acp/runtime/session-meta.d.ts +31 -0
  1584. package/dist/plugin-sdk/src/acp/runtime/types.d.ts +118 -0
  1585. package/dist/plugin-sdk/src/agents/acp-spawn-parent-stream.d.ts +19 -0
  1586. package/dist/plugin-sdk/src/agents/acp-spawn.d.ts +44 -0
  1587. package/dist/plugin-sdk/src/agents/agent-command.d.ts +11 -0
  1588. package/dist/plugin-sdk/src/agents/agent-paths.d.ts +2 -0
  1589. package/dist/plugin-sdk/src/agents/agent-scope.d.ts +66 -0
  1590. package/dist/plugin-sdk/src/agents/announce-idempotency.d.ts +11 -0
  1591. package/dist/plugin-sdk/src/agents/anthropic-payload-log.d.ts +20 -0
  1592. package/dist/plugin-sdk/src/agents/anthropic-vertex-provider.d.ts +9 -0
  1593. package/dist/plugin-sdk/src/agents/anthropic-vertex-stream.d.ts +11 -0
  1594. package/dist/plugin-sdk/src/agents/api-key-rotation.d.ts +22 -0
  1595. package/dist/plugin-sdk/src/agents/apply-patch-update.d.ts +10 -0
  1596. package/dist/plugin-sdk/src/agents/apply-patch.d.ts +35 -0
  1597. package/dist/plugin-sdk/src/agents/auth-health.d.ts +40 -0
  1598. package/dist/plugin-sdk/src/agents/auth-profiles/constants.d.ts +20 -0
  1599. package/dist/plugin-sdk/src/agents/auth-profiles/credential-state.d.ts +11 -0
  1600. package/dist/plugin-sdk/src/agents/auth-profiles/display.d.ts +7 -0
  1601. package/dist/plugin-sdk/src/agents/auth-profiles/doctor.d.ts +8 -0
  1602. package/dist/plugin-sdk/src/agents/auth-profiles/external-cli-sync.d.ts +12 -0
  1603. package/dist/plugin-sdk/src/agents/auth-profiles/oauth.d.ts +14 -0
  1604. package/dist/plugin-sdk/src/agents/auth-profiles/order.d.ts +21 -0
  1605. package/dist/plugin-sdk/src/agents/auth-profiles/paths.d.ts +4 -0
  1606. package/dist/plugin-sdk/src/agents/auth-profiles/profiles.d.ts +24 -0
  1607. package/dist/plugin-sdk/src/agents/auth-profiles/repair.d.ts +14 -0
  1608. package/dist/plugin-sdk/src/agents/auth-profiles/session-override.d.ts +18 -0
  1609. package/dist/plugin-sdk/src/agents/auth-profiles/state-observation.d.ts +10 -0
  1610. package/dist/plugin-sdk/src/agents/auth-profiles/store.d.ts +22 -0
  1611. package/dist/plugin-sdk/src/agents/auth-profiles/types.d.ts +63 -0
  1612. package/dist/plugin-sdk/src/agents/auth-profiles/upsert-with-lock.d.ts +6 -0
  1613. package/dist/plugin-sdk/src/agents/auth-profiles/usage.d.ts +87 -0
  1614. package/dist/plugin-sdk/src/agents/auth-profiles.d.ts +13 -0
  1615. package/dist/plugin-sdk/src/agents/auth-profiles.runtime.d.ts +3 -0
  1616. package/dist/plugin-sdk/src/agents/bash-process-registry.d.ts +70 -0
  1617. package/dist/plugin-sdk/src/agents/bash-tools.d.ts +4 -0
  1618. package/dist/plugin-sdk/src/agents/bash-tools.exec-approval-followup.d.ts +12 -0
  1619. package/dist/plugin-sdk/src/agents/bash-tools.exec-approval-request.d.ts +70 -0
  1620. package/dist/plugin-sdk/src/agents/bash-tools.exec-host-gateway.d.ts +35 -0
  1621. package/dist/plugin-sdk/src/agents/bash-tools.exec-host-node.d.ts +26 -0
  1622. package/dist/plugin-sdk/src/agents/bash-tools.exec-host-shared.d.ts +143 -0
  1623. package/dist/plugin-sdk/src/agents/bash-tools.exec-runtime.d.ts +81 -0
  1624. package/dist/plugin-sdk/src/agents/bash-tools.exec-types.d.ts +68 -0
  1625. package/dist/plugin-sdk/src/agents/bash-tools.exec.d.ts +6 -0
  1626. package/dist/plugin-sdk/src/agents/bash-tools.process.d.ts +7 -0
  1627. package/dist/plugin-sdk/src/agents/bash-tools.shared.d.ts +56 -0
  1628. package/dist/plugin-sdk/src/agents/bedrock-discovery.d.ts +9 -0
  1629. package/dist/plugin-sdk/src/agents/bootstrap-budget.d.ts +87 -0
  1630. package/dist/plugin-sdk/src/agents/bootstrap-cache.d.ts +11 -0
  1631. package/dist/plugin-sdk/src/agents/bootstrap-files.d.ts +32 -0
  1632. package/dist/plugin-sdk/src/agents/bootstrap-hooks.d.ts +10 -0
  1633. package/dist/plugin-sdk/src/agents/btw.d.ts +24 -0
  1634. package/dist/plugin-sdk/src/agents/byteplus-models.d.ts +79 -0
  1635. package/dist/plugin-sdk/src/agents/cache-trace.d.ts +49 -0
  1636. package/dist/plugin-sdk/src/agents/channel-tools.d.ts +43 -0
  1637. package/dist/plugin-sdk/src/agents/chutes-models.d.ts +25 -0
  1638. package/dist/plugin-sdk/src/agents/chutes-oauth.d.ts +46 -0
  1639. package/dist/plugin-sdk/src/agents/cli-backends.d.ts +8 -0
  1640. package/dist/plugin-sdk/src/agents/cli-credentials.d.ts +83 -0
  1641. package/dist/plugin-sdk/src/agents/cli-runner/bundle-mcp.d.ts +14 -0
  1642. package/dist/plugin-sdk/src/agents/cli-runner/helpers.d.ts +70 -0
  1643. package/dist/plugin-sdk/src/agents/cli-runner/reliability.d.ts +11 -0
  1644. package/dist/plugin-sdk/src/agents/cli-runner.d.ts +44 -0
  1645. package/dist/plugin-sdk/src/agents/cli-session.d.ts +3 -0
  1646. package/dist/plugin-sdk/src/agents/cli-watchdog-defaults.d.ts +11 -0
  1647. package/dist/plugin-sdk/src/agents/cloudflare-ai-gateway.d.ts +22 -0
  1648. package/dist/plugin-sdk/src/agents/command/delivery.d.ts +21 -0
  1649. package/dist/plugin-sdk/src/agents/command/run-context.d.ts +2 -0
  1650. package/dist/plugin-sdk/src/agents/command/session-store.d.ts +17 -0
  1651. package/dist/plugin-sdk/src/agents/command/session.d.ts +33 -0
  1652. package/dist/plugin-sdk/src/agents/command/types.d.ts +95 -0
  1653. package/dist/plugin-sdk/src/agents/command-poll-backoff.d.ts +28 -0
  1654. package/dist/plugin-sdk/src/agents/command-poll-backoff.runtime.d.ts +3 -0
  1655. package/dist/plugin-sdk/src/agents/compaction-real-conversation.d.ts +4 -0
  1656. package/dist/plugin-sdk/src/agents/compaction.d.ts +70 -0
  1657. package/dist/plugin-sdk/src/agents/console-sanitize.d.ts +1 -0
  1658. package/dist/plugin-sdk/src/agents/content-blocks.d.ts +1 -0
  1659. package/dist/plugin-sdk/src/agents/context-cache.d.ts +2 -0
  1660. package/dist/plugin-sdk/src/agents/context-window-guard.d.ts +24 -0
  1661. package/dist/plugin-sdk/src/agents/context.d.ts +37 -0
  1662. package/dist/plugin-sdk/src/agents/current-time.d.ts +17 -0
  1663. package/dist/plugin-sdk/src/agents/custom-api-registry.d.ts +4 -0
  1664. package/dist/plugin-sdk/src/agents/date-time.d.ts +13 -0
  1665. package/dist/plugin-sdk/src/agents/defaults.d.ts +3 -0
  1666. package/dist/plugin-sdk/src/agents/docs-path.d.ts +6 -0
  1667. package/dist/plugin-sdk/src/agents/doubao-models.d.ts +100 -0
  1668. package/dist/plugin-sdk/src/agents/embedded-pi-lsp.d.ts +13 -0
  1669. package/dist/plugin-sdk/src/agents/embedded-pi-mcp.d.ts +10 -0
  1670. package/dist/plugin-sdk/src/agents/failover-error.d.ts +33 -0
  1671. package/dist/plugin-sdk/src/agents/fast-mode.d.ts +19 -0
  1672. package/dist/plugin-sdk/src/agents/glob-pattern.d.ts +18 -0
  1673. package/dist/plugin-sdk/src/agents/huggingface-models.d.ts +17 -0
  1674. package/dist/plugin-sdk/src/agents/identity-avatar.d.ts +15 -0
  1675. package/dist/plugin-sdk/src/agents/identity-file.d.ts +12 -0
  1676. package/dist/plugin-sdk/src/agents/identity.d.ts +28 -0
  1677. package/dist/plugin-sdk/src/agents/image-sanitization.d.ts +8 -0
  1678. package/dist/plugin-sdk/src/agents/internal-events.d.ts +16 -0
  1679. package/dist/plugin-sdk/src/agents/kilocode-models.d.ts +7 -0
  1680. package/dist/plugin-sdk/src/agents/lanes.d.ts +4 -0
  1681. package/dist/plugin-sdk/src/agents/live-auth-keys.d.ts +6 -0
  1682. package/dist/plugin-sdk/src/agents/mcp-stdio.d.ts +16 -0
  1683. package/dist/plugin-sdk/src/agents/memory-search.d.ts +79 -0
  1684. package/dist/plugin-sdk/src/agents/minimax-vlm.d.ts +9 -0
  1685. package/dist/plugin-sdk/src/agents/model-alias-lines.d.ts +2 -0
  1686. package/dist/plugin-sdk/src/agents/model-auth-env-vars.d.ts +2 -0
  1687. package/dist/plugin-sdk/src/agents/model-auth-env.d.ts +5 -0
  1688. package/dist/plugin-sdk/src/agents/model-auth-label.d.ts +8 -0
  1689. package/dist/plugin-sdk/src/agents/model-auth-markers.d.ts +20 -0
  1690. package/dist/plugin-sdk/src/agents/model-auth.d.ts +51 -0
  1691. package/dist/plugin-sdk/src/agents/model-catalog.d.ts +30 -0
  1692. package/dist/plugin-sdk/src/agents/model-catalog.runtime.d.ts +1 -0
  1693. package/dist/plugin-sdk/src/agents/model-compat.d.ts +20 -0
  1694. package/dist/plugin-sdk/src/agents/model-fallback-observation.d.ts +22 -0
  1695. package/dist/plugin-sdk/src/agents/model-fallback.d.ts +53 -0
  1696. package/dist/plugin-sdk/src/agents/model-fallback.types.d.ts +13 -0
  1697. package/dist/plugin-sdk/src/agents/model-id-normalization.d.ts +2 -0
  1698. package/dist/plugin-sdk/src/agents/model-ref-profile.d.ts +4 -0
  1699. package/dist/plugin-sdk/src/agents/model-selection.d.ts +125 -0
  1700. package/dist/plugin-sdk/src/agents/model-suppression.d.ts +8 -0
  1701. package/dist/plugin-sdk/src/agents/model-suppression.runtime.d.ts +3 -0
  1702. package/dist/plugin-sdk/src/agents/model-tool-support.d.ts +3 -0
  1703. package/dist/plugin-sdk/src/agents/models-config.d.ts +6 -0
  1704. package/dist/plugin-sdk/src/agents/models-config.merge.d.ts +17 -0
  1705. package/dist/plugin-sdk/src/agents/models-config.plan.d.ts +17 -0
  1706. package/dist/plugin-sdk/src/agents/models-config.providers.d.ts +50 -0
  1707. package/dist/plugin-sdk/src/agents/models-config.providers.discovery.d.ts +19 -0
  1708. package/dist/plugin-sdk/src/agents/models-config.runtime.d.ts +1 -0
  1709. package/dist/plugin-sdk/src/agents/ollama-defaults.d.ts +1 -0
  1710. package/dist/plugin-sdk/src/agents/ollama-models.d.ts +48 -0
  1711. package/dist/plugin-sdk/src/agents/ollama-stream.d.ts +58 -0
  1712. package/dist/plugin-sdk/src/agents/openai-ws-connection.d.ts +323 -0
  1713. package/dist/plugin-sdk/src/agents/openai-ws-stream.d.ts +70 -0
  1714. package/dist/plugin-sdk/src/agents/openclaw-tools.d.ts +63 -0
  1715. package/dist/plugin-sdk/src/agents/openclaw-tools.runtime.d.ts +1 -0
  1716. package/dist/plugin-sdk/src/agents/opencode-zen-models.d.ts +46 -0
  1717. package/dist/plugin-sdk/src/agents/owner-display.d.ts +19 -0
  1718. package/dist/plugin-sdk/src/agents/path-policy.d.ts +10 -0
  1719. package/dist/plugin-sdk/src/agents/payload-redaction.d.ts +5 -0
  1720. package/dist/plugin-sdk/src/agents/pi-auth-credentials.d.ts +16 -0
  1721. package/dist/plugin-sdk/src/agents/pi-bundle-lsp-runtime.d.ts +24 -0
  1722. package/dist/plugin-sdk/src/agents/pi-bundle-mcp-tools.d.ts +12 -0
  1723. package/dist/plugin-sdk/src/agents/pi-embedded-block-chunker.d.ts +19 -0
  1724. package/dist/plugin-sdk/src/agents/pi-embedded-error-observation.d.ts +19 -0
  1725. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/bootstrap.d.ts +33 -0
  1726. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/errors.d.ts +45 -0
  1727. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/failover-matches.d.ts +8 -0
  1728. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/google.d.ts +3 -0
  1729. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/images.d.ts +21 -0
  1730. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/messaging-dedupe.d.ts +10 -0
  1731. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/openai.d.ts +17 -0
  1732. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/thinking.d.ts +5 -0
  1733. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/turns.d.ts +21 -0
  1734. package/dist/plugin-sdk/src/agents/pi-embedded-helpers/types.d.ts +5 -0
  1735. package/dist/plugin-sdk/src/agents/pi-embedded-helpers.d.ts +11 -0
  1736. package/dist/plugin-sdk/src/agents/pi-embedded-messaging.d.ts +9 -0
  1737. package/dist/plugin-sdk/src/agents/pi-embedded-payloads.d.ts +9 -0
  1738. package/dist/plugin-sdk/src/agents/pi-embedded-runner/abort.d.ts +6 -0
  1739. package/dist/plugin-sdk/src/agents/pi-embedded-runner/anthropic-stream-wrappers.d.ts +16 -0
  1740. package/dist/plugin-sdk/src/agents/pi-embedded-runner/cache-ttl.d.ts +9 -0
  1741. package/dist/plugin-sdk/src/agents/pi-embedded-runner/compact.d.ts +75 -0
  1742. package/dist/plugin-sdk/src/agents/pi-embedded-runner/compact.runtime.d.ts +3 -0
  1743. package/dist/plugin-sdk/src/agents/pi-embedded-runner/compaction-runtime-context.d.ts +50 -0
  1744. package/dist/plugin-sdk/src/agents/pi-embedded-runner/compaction-safety-timeout.d.ts +7 -0
  1745. package/dist/plugin-sdk/src/agents/pi-embedded-runner/context-engine-maintenance.d.ts +25 -0
  1746. package/dist/plugin-sdk/src/agents/pi-embedded-runner/extensions.d.ts +12 -0
  1747. package/dist/plugin-sdk/src/agents/pi-embedded-runner/extra-params.d.ts +24 -0
  1748. package/dist/plugin-sdk/src/agents/pi-embedded-runner/google-stream-wrappers.d.ts +8 -0
  1749. package/dist/plugin-sdk/src/agents/pi-embedded-runner/google.d.ts +43 -0
  1750. package/dist/plugin-sdk/src/agents/pi-embedded-runner/history.d.ts +18 -0
  1751. package/dist/plugin-sdk/src/agents/pi-embedded-runner/lanes.d.ts +3 -0
  1752. package/dist/plugin-sdk/src/agents/pi-embedded-runner/logger.d.ts +1 -0
  1753. package/dist/plugin-sdk/src/agents/pi-embedded-runner/message-action-discovery-input.d.ts +24 -0
  1754. package/dist/plugin-sdk/src/agents/pi-embedded-runner/model.d.ts +37 -0
  1755. package/dist/plugin-sdk/src/agents/pi-embedded-runner/model.provider-normalization.d.ts +9 -0
  1756. package/dist/plugin-sdk/src/agents/pi-embedded-runner/moonshot-stream-wrappers.d.ts +19 -0
  1757. package/dist/plugin-sdk/src/agents/pi-embedded-runner/openai-stream-wrappers.d.ts +11 -0
  1758. package/dist/plugin-sdk/src/agents/pi-embedded-runner/openrouter-model-capabilities.d.ts +53 -0
  1759. package/dist/plugin-sdk/src/agents/pi-embedded-runner/proxy-stream-wrappers.d.ts +6 -0
  1760. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/attempt.d.ts +69 -0
  1761. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.d.ts +13 -0
  1762. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/compaction-timeout.d.ts +29 -0
  1763. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/failover-observation.d.ts +20 -0
  1764. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/history-image-prune.d.ts +7 -0
  1765. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/images.d.ts +83 -0
  1766. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/params.d.ts +138 -0
  1767. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/payloads.d.ts +43 -0
  1768. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run/types.d.ts +70 -0
  1769. package/dist/plugin-sdk/src/agents/pi-embedded-runner/run.d.ts +3 -0
  1770. package/dist/plugin-sdk/src/agents/pi-embedded-runner/runs.d.ts +51 -0
  1771. package/dist/plugin-sdk/src/agents/pi-embedded-runner/sandbox-info.d.ts +4 -0
  1772. package/dist/plugin-sdk/src/agents/pi-embedded-runner/session-manager-cache.d.ts +2 -0
  1773. package/dist/plugin-sdk/src/agents/pi-embedded-runner/session-manager-init.d.ts +17 -0
  1774. package/dist/plugin-sdk/src/agents/pi-embedded-runner/session-truncation.d.ts +38 -0
  1775. package/dist/plugin-sdk/src/agents/pi-embedded-runner/skills-runtime.d.ts +10 -0
  1776. package/dist/plugin-sdk/src/agents/pi-embedded-runner/stream-payload-utils.d.ts +2 -0
  1777. package/dist/plugin-sdk/src/agents/pi-embedded-runner/system-prompt.d.ts +55 -0
  1778. package/dist/plugin-sdk/src/agents/pi-embedded-runner/thinking.d.ts +17 -0
  1779. package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-name-allowlist.d.ts +6 -0
  1780. package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-result-char-estimator.d.ts +10 -0
  1781. package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-result-context-guard.d.ts +9 -0
  1782. package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-result-truncation.d.ts +84 -0
  1783. package/dist/plugin-sdk/src/agents/pi-embedded-runner/tool-split.d.ts +11 -0
  1784. package/dist/plugin-sdk/src/agents/pi-embedded-runner/transcript-rewrite.d.ts +22 -0
  1785. package/dist/plugin-sdk/src/agents/pi-embedded-runner/types.d.ts +89 -0
  1786. package/dist/plugin-sdk/src/agents/pi-embedded-runner/utils.d.ts +5 -0
  1787. package/dist/plugin-sdk/src/agents/pi-embedded-runner/wait-for-idle-before-flush.d.ts +15 -0
  1788. package/dist/plugin-sdk/src/agents/pi-embedded-runner/zai-stream-wrappers.d.ts +7 -0
  1789. package/dist/plugin-sdk/src/agents/pi-embedded-runner.d.ts +12 -0
  1790. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.d.ts +34 -0
  1791. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.compaction.d.ts +8 -0
  1792. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.d.ts +2 -0
  1793. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.lifecycle.d.ts +4 -0
  1794. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.messages.d.ts +35 -0
  1795. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.tools.d.ts +18 -0
  1796. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.handlers.types.d.ts +154 -0
  1797. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.raw-stream.d.ts +1 -0
  1798. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.tools.d.ts +26 -0
  1799. package/dist/plugin-sdk/src/agents/pi-embedded-subscribe.types.d.ts +47 -0
  1800. package/dist/plugin-sdk/src/agents/pi-embedded-utils.d.ts +41 -0
  1801. package/dist/plugin-sdk/src/agents/pi-embedded.d.ts +2 -0
  1802. package/dist/plugin-sdk/src/agents/pi-extensions/compaction-instructions.d.ts +25 -0
  1803. package/dist/plugin-sdk/src/agents/pi-extensions/compaction-safeguard-runtime.d.ts +20 -0
  1804. package/dist/plugin-sdk/src/agents/pi-extensions/compaction-safeguard.d.ts +75 -0
  1805. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/extension.d.ts +2 -0
  1806. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/pruner.d.ts +10 -0
  1807. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/runtime.d.ts +9 -0
  1808. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/settings.d.ts +44 -0
  1809. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning/tools.d.ts +2 -0
  1810. package/dist/plugin-sdk/src/agents/pi-extensions/context-pruning.d.ts +10 -0
  1811. package/dist/plugin-sdk/src/agents/pi-extensions/session-manager-runtime-registry.d.ts +4 -0
  1812. package/dist/plugin-sdk/src/agents/pi-model-discovery-runtime.d.ts +1 -0
  1813. package/dist/plugin-sdk/src/agents/pi-model-discovery.d.ts +7 -0
  1814. package/dist/plugin-sdk/src/agents/pi-project-settings.d.ts +31 -0
  1815. package/dist/plugin-sdk/src/agents/pi-settings.d.ts +45 -0
  1816. package/dist/plugin-sdk/src/agents/pi-tool-definition-adapter.d.ts +8 -0
  1817. package/dist/plugin-sdk/src/agents/pi-tools.abort.d.ts +2 -0
  1818. package/dist/plugin-sdk/src/agents/pi-tools.before-tool-call.d.ts +39 -0
  1819. package/dist/plugin-sdk/src/agents/pi-tools.before-tool-call.runtime.d.ts +10 -0
  1820. package/dist/plugin-sdk/src/agents/pi-tools.d.ts +106 -0
  1821. package/dist/plugin-sdk/src/agents/pi-tools.host-edit.d.ts +8 -0
  1822. package/dist/plugin-sdk/src/agents/pi-tools.params.d.ts +34 -0
  1823. package/dist/plugin-sdk/src/agents/pi-tools.policy.d.ts +38 -0
  1824. package/dist/plugin-sdk/src/agents/pi-tools.read.d.ts +43 -0
  1825. package/dist/plugin-sdk/src/agents/pi-tools.schema.d.ts +12 -0
  1826. package/dist/plugin-sdk/src/agents/pi-tools.types.d.ts +2 -0
  1827. package/dist/plugin-sdk/src/agents/provider-attribution.d.ts +19 -0
  1828. package/dist/plugin-sdk/src/agents/provider-capabilities.d.ts +42 -0
  1829. package/dist/plugin-sdk/src/agents/provider-id.d.ts +5 -0
  1830. package/dist/plugin-sdk/src/agents/pty-dsr.d.ts +5 -0
  1831. package/dist/plugin-sdk/src/agents/pty-keys.d.ts +13 -0
  1832. package/dist/plugin-sdk/src/agents/queued-file-writer.d.ts +5 -0
  1833. package/dist/plugin-sdk/src/agents/runtime-plugins.d.ts +6 -0
  1834. package/dist/plugin-sdk/src/agents/sandbox/backend.d.ts +84 -0
  1835. package/dist/plugin-sdk/src/agents/sandbox/bind-spec.d.ts +7 -0
  1836. package/dist/plugin-sdk/src/agents/sandbox/browser-bridges.d.ts +7 -0
  1837. package/dist/plugin-sdk/src/agents/sandbox/browser.d.ts +12 -0
  1838. package/dist/plugin-sdk/src/agents/sandbox/config-hash.d.ts +18 -0
  1839. package/dist/plugin-sdk/src/agents/sandbox/config.d.ts +33 -0
  1840. package/dist/plugin-sdk/src/agents/sandbox/constants.d.ts +21 -0
  1841. package/dist/plugin-sdk/src/agents/sandbox/context.d.ts +20 -0
  1842. package/dist/plugin-sdk/src/agents/sandbox/docker-backend.d.ts +12 -0
  1843. package/dist/plugin-sdk/src/agents/sandbox/docker.d.ts +59 -0
  1844. package/dist/plugin-sdk/src/agents/sandbox/fs-bridge-mutation-helper.d.ts +24 -0
  1845. package/dist/plugin-sdk/src/agents/sandbox/fs-bridge-path-safety.d.ts +60 -0
  1846. package/dist/plugin-sdk/src/agents/sandbox/fs-bridge-shell-command-plans.d.ts +11 -0
  1847. package/dist/plugin-sdk/src/agents/sandbox/fs-bridge.d.ts +56 -0
  1848. package/dist/plugin-sdk/src/agents/sandbox/fs-paths.d.ts +28 -0
  1849. package/dist/plugin-sdk/src/agents/sandbox/hash.d.ts +1 -0
  1850. package/dist/plugin-sdk/src/agents/sandbox/host-paths.d.ts +9 -0
  1851. package/dist/plugin-sdk/src/agents/sandbox/manage.d.ts +13 -0
  1852. package/dist/plugin-sdk/src/agents/sandbox/network-mode.d.ts +7 -0
  1853. package/dist/plugin-sdk/src/agents/sandbox/novnc-auth.d.ts +24 -0
  1854. package/dist/plugin-sdk/src/agents/sandbox/path-utils.d.ts +2 -0
  1855. package/dist/plugin-sdk/src/agents/sandbox/prune.d.ts +2 -0
  1856. package/dist/plugin-sdk/src/agents/sandbox/registry.d.ts +34 -0
  1857. package/dist/plugin-sdk/src/agents/sandbox/remote-fs-bridge.d.ts +12 -0
  1858. package/dist/plugin-sdk/src/agents/sandbox/runtime-status.d.ts +18 -0
  1859. package/dist/plugin-sdk/src/agents/sandbox/sanitize-env-vars.d.ts +14 -0
  1860. package/dist/plugin-sdk/src/agents/sandbox/shared.d.ts +4 -0
  1861. package/dist/plugin-sdk/src/agents/sandbox/ssh-backend.d.ts +3 -0
  1862. package/dist/plugin-sdk/src/agents/sandbox/ssh.d.ts +52 -0
  1863. package/dist/plugin-sdk/src/agents/sandbox/tool-policy.d.ts +4 -0
  1864. package/dist/plugin-sdk/src/agents/sandbox/types.d.ts +98 -0
  1865. package/dist/plugin-sdk/src/agents/sandbox/types.docker.d.ts +4 -0
  1866. package/dist/plugin-sdk/src/agents/sandbox/validate-sandbox-security.d.ts +68 -0
  1867. package/dist/plugin-sdk/src/agents/sandbox/workspace-mounts.d.ts +8 -0
  1868. package/dist/plugin-sdk/src/agents/sandbox/workspace.d.ts +1 -0
  1869. package/dist/plugin-sdk/src/agents/sandbox-media-paths.d.ts +17 -0
  1870. package/dist/plugin-sdk/src/agents/sandbox-paths.d.ts +24 -0
  1871. package/dist/plugin-sdk/src/agents/sandbox-tool-policy.d.ts +8 -0
  1872. package/dist/plugin-sdk/src/agents/sandbox.d.ts +15 -0
  1873. package/dist/plugin-sdk/src/agents/sanitize-for-prompt.d.ts +21 -0
  1874. package/dist/plugin-sdk/src/agents/schema/clean-for-gemini.d.ts +2 -0
  1875. package/dist/plugin-sdk/src/agents/schema/clean-for-xai.d.ts +2 -0
  1876. package/dist/plugin-sdk/src/agents/schema/typebox.d.ts +14 -0
  1877. package/dist/plugin-sdk/src/agents/self-hosted-provider-defaults.d.ts +8 -0
  1878. package/dist/plugin-sdk/src/agents/session-dirs.d.ts +3 -0
  1879. package/dist/plugin-sdk/src/agents/session-file-repair.d.ts +11 -0
  1880. package/dist/plugin-sdk/src/agents/session-slug.d.ts +1 -0
  1881. package/dist/plugin-sdk/src/agents/session-tool-result-guard-wrapper.d.ts +19 -0
  1882. package/dist/plugin-sdk/src/agents/session-tool-result-guard.d.ts +44 -0
  1883. package/dist/plugin-sdk/src/agents/session-tool-result-state.d.ts +17 -0
  1884. package/dist/plugin-sdk/src/agents/session-transcript-repair.d.ts +33 -0
  1885. package/dist/plugin-sdk/src/agents/session-write-lock.d.ts +53 -0
  1886. package/dist/plugin-sdk/src/agents/sglang-defaults.d.ts +4 -0
  1887. package/dist/plugin-sdk/src/agents/shell-utils.d.ts +9 -0
  1888. package/dist/plugin-sdk/src/agents/simple-completion-transport.d.ts +6 -0
  1889. package/dist/plugin-sdk/src/agents/skills/bundled-dir.d.ts +7 -0
  1890. package/dist/plugin-sdk/src/agents/skills/config.d.ts +13 -0
  1891. package/dist/plugin-sdk/src/agents/skills/env-overrides.d.ts +12 -0
  1892. package/dist/plugin-sdk/src/agents/skills/filter.d.ts +3 -0
  1893. package/dist/plugin-sdk/src/agents/skills/frontmatter.d.ts +6 -0
  1894. package/dist/plugin-sdk/src/agents/skills/plugin-skills.d.ts +5 -0
  1895. package/dist/plugin-sdk/src/agents/skills/refresh.d.ts +19 -0
  1896. package/dist/plugin-sdk/src/agents/skills/serialize.d.ts +1 -0
  1897. package/dist/plugin-sdk/src/agents/skills/types.d.ts +87 -0
  1898. package/dist/plugin-sdk/src/agents/skills/workspace.d.ts +51 -0
  1899. package/dist/plugin-sdk/src/agents/skills.d.ts +7 -0
  1900. package/dist/plugin-sdk/src/agents/spawned-context.d.ts +30 -0
  1901. package/dist/plugin-sdk/src/agents/stable-stringify.d.ts +1 -0
  1902. package/dist/plugin-sdk/src/agents/stream-message-shared.d.ts +35 -0
  1903. package/dist/plugin-sdk/src/agents/subagent-announce-dispatch.d.ts +22 -0
  1904. package/dist/plugin-sdk/src/agents/subagent-announce-queue.d.ts +29 -0
  1905. package/dist/plugin-sdk/src/agents/subagent-announce.d.ts +48 -0
  1906. package/dist/plugin-sdk/src/agents/subagent-attachments.d.ts +39 -0
  1907. package/dist/plugin-sdk/src/agents/subagent-capabilities.d.ts +37 -0
  1908. package/dist/plugin-sdk/src/agents/subagent-control.d.ts +176 -0
  1909. package/dist/plugin-sdk/src/agents/subagent-depth.d.ts +11 -0
  1910. package/dist/plugin-sdk/src/agents/subagent-lifecycle-events.d.ts +18 -0
  1911. package/dist/plugin-sdk/src/agents/subagent-orphan-recovery.d.ts +41 -0
  1912. package/dist/plugin-sdk/src/agents/subagent-registry-cleanup.d.ts +25 -0
  1913. package/dist/plugin-sdk/src/agents/subagent-registry-completion.d.ts +15 -0
  1914. package/dist/plugin-sdk/src/agents/subagent-registry-queries.d.ts +17 -0
  1915. package/dist/plugin-sdk/src/agents/subagent-registry-runtime.d.ts +1 -0
  1916. package/dist/plugin-sdk/src/agents/subagent-registry-state.d.ts +7 -0
  1917. package/dist/plugin-sdk/src/agents/subagent-registry.d.ts +62 -0
  1918. package/dist/plugin-sdk/src/agents/subagent-registry.store.d.ts +5 -0
  1919. package/dist/plugin-sdk/src/agents/subagent-registry.types.d.ts +62 -0
  1920. package/dist/plugin-sdk/src/agents/subagent-spawn.d.ts +71 -0
  1921. package/dist/plugin-sdk/src/agents/synthetic-models.d.ts +160 -0
  1922. package/dist/plugin-sdk/src/agents/system-prompt-params.d.ts +30 -0
  1923. package/dist/plugin-sdk/src/agents/system-prompt-report.d.ts +22 -0
  1924. package/dist/plugin-sdk/src/agents/system-prompt.d.ts +72 -0
  1925. package/dist/plugin-sdk/src/agents/timeout.d.ts +8 -0
  1926. package/dist/plugin-sdk/src/agents/together-models.d.ts +4 -0
  1927. package/dist/plugin-sdk/src/agents/tool-call-id.d.ts +27 -0
  1928. package/dist/plugin-sdk/src/agents/tool-catalog.d.ts +35 -0
  1929. package/dist/plugin-sdk/src/agents/tool-display-common.d.ts +69 -0
  1930. package/dist/plugin-sdk/src/agents/tool-display.d.ts +15 -0
  1931. package/dist/plugin-sdk/src/agents/tool-fs-policy.d.ts +17 -0
  1932. package/dist/plugin-sdk/src/agents/tool-images.d.ts +11 -0
  1933. package/dist/plugin-sdk/src/agents/tool-loop-detection.d.ts +55 -0
  1934. package/dist/plugin-sdk/src/agents/tool-mutation.d.ts +14 -0
  1935. package/dist/plugin-sdk/src/agents/tool-policy-match.d.ts +3 -0
  1936. package/dist/plugin-sdk/src/agents/tool-policy-pipeline.d.ts +27 -0
  1937. package/dist/plugin-sdk/src/agents/tool-policy-shared.d.ts +11 -0
  1938. package/dist/plugin-sdk/src/agents/tool-policy.d.ts +33 -0
  1939. package/dist/plugin-sdk/src/agents/tool-summaries.d.ts +2 -0
  1940. package/dist/plugin-sdk/src/agents/tools/agent-step.d.ts +15 -0
  1941. package/dist/plugin-sdk/src/agents/tools/agents-list-tool.d.ts +6 -0
  1942. package/dist/plugin-sdk/src/agents/tools/browser-tool.actions.d.ts +34 -0
  1943. package/dist/plugin-sdk/src/agents/tools/browser-tool.d.ts +6 -0
  1944. package/dist/plugin-sdk/src/agents/tools/browser-tool.schema.d.ts +75 -0
  1945. package/dist/plugin-sdk/src/agents/tools/canvas-tool.d.ts +5 -0
  1946. package/dist/plugin-sdk/src/agents/tools/common.d.ts +81 -0
  1947. package/dist/plugin-sdk/src/agents/tools/cron-tool.d.ts +11 -0
  1948. package/dist/plugin-sdk/src/agents/tools/gateway-tool.d.ts +6 -0
  1949. package/dist/plugin-sdk/src/agents/tools/gateway.d.ts +15 -0
  1950. package/dist/plugin-sdk/src/agents/tools/image-generate-tool.d.ts +19 -0
  1951. package/dist/plugin-sdk/src/agents/tools/image-tool.d.ts +35 -0
  1952. package/dist/plugin-sdk/src/agents/tools/image-tool.helpers.d.ts +19 -0
  1953. package/dist/plugin-sdk/src/agents/tools/media-tool-shared.d.ts +47 -0
  1954. package/dist/plugin-sdk/src/agents/tools/memory-tool.d.ts +10 -0
  1955. package/dist/plugin-sdk/src/agents/tools/message-tool.d.ts +21 -0
  1956. package/dist/plugin-sdk/src/agents/tools/model-config.helpers.d.ts +21 -0
  1957. package/dist/plugin-sdk/src/agents/tools/nodes-tool.d.ts +13 -0
  1958. package/dist/plugin-sdk/src/agents/tools/nodes-utils.d.ts +14 -0
  1959. package/dist/plugin-sdk/src/agents/tools/pdf-native-providers.d.ts +24 -0
  1960. package/dist/plugin-sdk/src/agents/tools/pdf-tool.d.ts +23 -0
  1961. package/dist/plugin-sdk/src/agents/tools/pdf-tool.helpers.d.ts +27 -0
  1962. package/dist/plugin-sdk/src/agents/tools/session-status-tool.d.ts +7 -0
  1963. package/dist/plugin-sdk/src/agents/tools/sessions-access.d.ts +42 -0
  1964. package/dist/plugin-sdk/src/agents/tools/sessions-announce-target.d.ts +5 -0
  1965. package/dist/plugin-sdk/src/agents/tools/sessions-helpers.d.ts +73 -0
  1966. package/dist/plugin-sdk/src/agents/tools/sessions-history-tool.d.ts +7 -0
  1967. package/dist/plugin-sdk/src/agents/tools/sessions-list-tool.d.ts +7 -0
  1968. package/dist/plugin-sdk/src/agents/tools/sessions-resolution.d.ts +79 -0
  1969. package/dist/plugin-sdk/src/agents/tools/sessions-send-helpers.d.ts +34 -0
  1970. package/dist/plugin-sdk/src/agents/tools/sessions-send-tool.a2a.d.ts +12 -0
  1971. package/dist/plugin-sdk/src/agents/tools/sessions-send-tool.d.ts +9 -0
  1972. package/dist/plugin-sdk/src/agents/tools/sessions-spawn-tool.d.ts +13 -0
  1973. package/dist/plugin-sdk/src/agents/tools/sessions-yield-tool.d.ts +5 -0
  1974. package/dist/plugin-sdk/src/agents/tools/subagents-tool.d.ts +4 -0
  1975. package/dist/plugin-sdk/src/agents/tools/tool-runtime.helpers.d.ts +9 -0
  1976. package/dist/plugin-sdk/src/agents/tools/tts-tool.d.ts +7 -0
  1977. package/dist/plugin-sdk/src/agents/tools/web-fetch-utils.d.ts +25 -0
  1978. package/dist/plugin-sdk/src/agents/tools/web-fetch-visibility.d.ts +2 -0
  1979. package/dist/plugin-sdk/src/agents/tools/web-fetch.d.ts +39 -0
  1980. package/dist/plugin-sdk/src/agents/tools/web-guarded-fetch.d.ts +16 -0
  1981. package/dist/plugin-sdk/src/agents/tools/web-search-citation-redirect.d.ts +5 -0
  1982. package/dist/plugin-sdk/src/agents/tools/web-search-provider-common.d.ts +41 -0
  1983. package/dist/plugin-sdk/src/agents/tools/web-search-provider-config.d.ts +21 -0
  1984. package/dist/plugin-sdk/src/agents/tools/web-search-provider-credentials.d.ts +5 -0
  1985. package/dist/plugin-sdk/src/agents/tools/web-search.d.ts +13 -0
  1986. package/dist/plugin-sdk/src/agents/tools/web-shared.d.ts +24 -0
  1987. package/dist/plugin-sdk/src/agents/tools/web-tools.d.ts +2 -0
  1988. package/dist/plugin-sdk/src/agents/trace-base.d.ts +10 -0
  1989. package/dist/plugin-sdk/src/agents/transcript-policy.d.ts +24 -0
  1990. package/dist/plugin-sdk/src/agents/usage.d.ts +65 -0
  1991. package/dist/plugin-sdk/src/agents/venice-models.d.ts +369 -0
  1992. package/dist/plugin-sdk/src/agents/vercel-ai-gateway.d.ts +15 -0
  1993. package/dist/plugin-sdk/src/agents/vllm-defaults.d.ts +4 -0
  1994. package/dist/plugin-sdk/src/agents/volc-models.shared.d.ts +62 -0
  1995. package/dist/plugin-sdk/src/agents/workspace-dir.d.ts +2 -0
  1996. package/dist/plugin-sdk/src/agents/workspace-dirs.d.ts +2 -0
  1997. package/dist/plugin-sdk/src/agents/workspace-run.d.ts +18 -0
  1998. package/dist/plugin-sdk/src/agents/workspace-templates.d.ts +6 -0
  1999. package/dist/plugin-sdk/src/agents/workspace.d.ts +45 -0
  2000. package/dist/plugin-sdk/src/auto-reply/chunk.d.ts +45 -0
  2001. package/dist/plugin-sdk/src/auto-reply/command-auth.d.ts +17 -0
  2002. package/dist/plugin-sdk/src/auto-reply/command-detection.d.ts +13 -0
  2003. package/dist/plugin-sdk/src/auto-reply/commands-args.d.ts +3 -0
  2004. package/dist/plugin-sdk/src/auto-reply/commands-registry.d.ts +54 -0
  2005. package/dist/plugin-sdk/src/auto-reply/commands-registry.data.d.ts +3 -0
  2006. package/dist/plugin-sdk/src/auto-reply/commands-registry.runtime.d.ts +1 -0
  2007. package/dist/plugin-sdk/src/auto-reply/commands-registry.types.d.ts +67 -0
  2008. package/dist/plugin-sdk/src/auto-reply/commands-text-routing.d.ts +3 -0
  2009. package/dist/plugin-sdk/src/auto-reply/dispatch.d.ts +32 -0
  2010. package/dist/plugin-sdk/src/auto-reply/envelope.d.ts +60 -0
  2011. package/dist/plugin-sdk/src/auto-reply/fallback-state.d.ts +55 -0
  2012. package/dist/plugin-sdk/src/auto-reply/group-activation.d.ts +6 -0
  2013. package/dist/plugin-sdk/src/auto-reply/heartbeat-reply-payload.d.ts +2 -0
  2014. package/dist/plugin-sdk/src/auto-reply/heartbeat.d.ts +26 -0
  2015. package/dist/plugin-sdk/src/auto-reply/inbound-debounce.d.ts +18 -0
  2016. package/dist/plugin-sdk/src/auto-reply/media-note.d.ts +2 -0
  2017. package/dist/plugin-sdk/src/auto-reply/model-runtime.d.ts +17 -0
  2018. package/dist/plugin-sdk/src/auto-reply/model.d.ts +8 -0
  2019. package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.d.ts +22 -0
  2020. package/dist/plugin-sdk/src/auto-reply/reply/abort-cutoff.runtime.d.ts +7 -0
  2021. package/dist/plugin-sdk/src/auto-reply/reply/abort-primitives.d.ts +7 -0
  2022. package/dist/plugin-sdk/src/auto-reply/reply/abort.d.ts +26 -0
  2023. package/dist/plugin-sdk/src/auto-reply/reply/acp-projector.d.ts +21 -0
  2024. package/dist/plugin-sdk/src/auto-reply/reply/acp-reset-target.d.ts +12 -0
  2025. package/dist/plugin-sdk/src/auto-reply/reply/acp-stream-settings.d.ts +24 -0
  2026. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-execution.d.ts +59 -0
  2027. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-helpers.d.ts +15 -0
  2028. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-memory.d.ts +30 -0
  2029. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-payloads.d.ts +28 -0
  2030. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-reminder-guard.d.ts +13 -0
  2031. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner-utils.d.ts +214 -0
  2032. package/dist/plugin-sdk/src/auto-reply/reply/agent-runner.d.ts +38 -0
  2033. package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label-config.d.ts +14 -0
  2034. package/dist/plugin-sdk/src/auto-reply/reply/auto-topic-label.d.ts +26 -0
  2035. package/dist/plugin-sdk/src/auto-reply/reply/bash-command.d.ts +19 -0
  2036. package/dist/plugin-sdk/src/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
  2037. package/dist/plugin-sdk/src/auto-reply/reply/block-reply-pipeline.d.ts +32 -0
  2038. package/dist/plugin-sdk/src/auto-reply/reply/block-streaming.d.ts +38 -0
  2039. package/dist/plugin-sdk/src/auto-reply/reply/body.d.ts +10 -0
  2040. package/dist/plugin-sdk/src/auto-reply/reply/btw-command.d.ts +3 -0
  2041. package/dist/plugin-sdk/src/auto-reply/reply/channel-context.d.ts +23 -0
  2042. package/dist/plugin-sdk/src/auto-reply/reply/command-gates.d.ts +24 -0
  2043. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/context.d.ts +14 -0
  2044. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/diagnostics.d.ts +4 -0
  2045. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/install-hints.d.ts +3 -0
  2046. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/lifecycle.d.ts +5 -0
  2047. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/runtime-options.d.ts +9 -0
  2048. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/shared.d.ts +95 -0
  2049. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp/targets.d.ts +12 -0
  2050. package/dist/plugin-sdk/src/auto-reply/reply/commands-acp.d.ts +2 -0
  2051. package/dist/plugin-sdk/src/auto-reply/reply/commands-allowlist.d.ts +2 -0
  2052. package/dist/plugin-sdk/src/auto-reply/reply/commands-approve.d.ts +2 -0
  2053. package/dist/plugin-sdk/src/auto-reply/reply/commands-bash.d.ts +2 -0
  2054. package/dist/plugin-sdk/src/auto-reply/reply/commands-btw.d.ts +2 -0
  2055. package/dist/plugin-sdk/src/auto-reply/reply/commands-compact.d.ts +2 -0
  2056. package/dist/plugin-sdk/src/auto-reply/reply/commands-config.d.ts +3 -0
  2057. package/dist/plugin-sdk/src/auto-reply/reply/commands-context-report.d.ts +3 -0
  2058. package/dist/plugin-sdk/src/auto-reply/reply/commands-context.d.ts +12 -0
  2059. package/dist/plugin-sdk/src/auto-reply/reply/commands-core.d.ts +13 -0
  2060. package/dist/plugin-sdk/src/auto-reply/reply/commands-core.runtime.d.ts +1 -0
  2061. package/dist/plugin-sdk/src/auto-reply/reply/commands-export-session.d.ts +3 -0
  2062. package/dist/plugin-sdk/src/auto-reply/reply/commands-info.d.ts +11 -0
  2063. package/dist/plugin-sdk/src/auto-reply/reply/commands-mcp.d.ts +2 -0
  2064. package/dist/plugin-sdk/src/auto-reply/reply/commands-models.d.ts +34 -0
  2065. package/dist/plugin-sdk/src/auto-reply/reply/commands-plugin.d.ts +13 -0
  2066. package/dist/plugin-sdk/src/auto-reply/reply/commands-plugins.d.ts +2 -0
  2067. package/dist/plugin-sdk/src/auto-reply/reply/commands-session-abort.d.ts +3 -0
  2068. package/dist/plugin-sdk/src/auto-reply/reply/commands-session-store.d.ts +13 -0
  2069. package/dist/plugin-sdk/src/auto-reply/reply/commands-session.d.ts +9 -0
  2070. package/dist/plugin-sdk/src/auto-reply/reply/commands-setunset-standard.d.ts +10 -0
  2071. package/dist/plugin-sdk/src/auto-reply/reply/commands-setunset.d.ts +34 -0
  2072. package/dist/plugin-sdk/src/auto-reply/reply/commands-slash-parse.d.ts +24 -0
  2073. package/dist/plugin-sdk/src/auto-reply/reply/commands-status.d.ts +27 -0
  2074. package/dist/plugin-sdk/src/auto-reply/reply/commands-status.runtime.d.ts +1 -0
  2075. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-agents.d.ts +3 -0
  2076. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-focus.d.ts +3 -0
  2077. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-help.d.ts +2 -0
  2078. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-info.d.ts +3 -0
  2079. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-kill.d.ts +3 -0
  2080. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-list.d.ts +3 -0
  2081. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-log.d.ts +3 -0
  2082. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-send.d.ts +3 -0
  2083. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-spawn.d.ts +3 -0
  2084. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/action-unfocus.d.ts +3 -0
  2085. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents/shared.d.ts +87 -0
  2086. package/dist/plugin-sdk/src/auto-reply/reply/commands-subagents.d.ts +4 -0
  2087. package/dist/plugin-sdk/src/auto-reply/reply/commands-system-prompt.d.ts +14 -0
  2088. package/dist/plugin-sdk/src/auto-reply/reply/commands-tts.d.ts +2 -0
  2089. package/dist/plugin-sdk/src/auto-reply/reply/commands-types.d.ts +70 -0
  2090. package/dist/plugin-sdk/src/auto-reply/reply/commands.d.ts +4 -0
  2091. package/dist/plugin-sdk/src/auto-reply/reply/commands.runtime.d.ts +1 -0
  2092. package/dist/plugin-sdk/src/auto-reply/reply/config-commands.d.ts +15 -0
  2093. package/dist/plugin-sdk/src/auto-reply/reply/config-value.d.ts +4 -0
  2094. package/dist/plugin-sdk/src/auto-reply/reply/config-write-authorization.d.ts +11 -0
  2095. package/dist/plugin-sdk/src/auto-reply/reply/debug-commands.d.ts +16 -0
  2096. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.auth-profile.d.ts +10 -0
  2097. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.auth.d.ts +11 -0
  2098. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.d.ts +7 -0
  2099. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.defaults.d.ts +10 -0
  2100. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.fast-lane.d.ts +7 -0
  2101. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.impl.d.ts +3 -0
  2102. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.levels.d.ts +26 -0
  2103. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.model-picker.d.ts +13 -0
  2104. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.model-selection.d.ts +23 -0
  2105. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.model.d.ts +44 -0
  2106. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.params.d.ts +52 -0
  2107. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.parse.d.ts +65 -0
  2108. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.persist.d.ts +29 -0
  2109. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.persist.runtime.d.ts +1 -0
  2110. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
  2111. package/dist/plugin-sdk/src/auto-reply/reply/directive-handling.shared.d.ts +28 -0
  2112. package/dist/plugin-sdk/src/auto-reply/reply/directive-parsing.d.ts +5 -0
  2113. package/dist/plugin-sdk/src/auto-reply/reply/directives.d.ts +44 -0
  2114. package/dist/plugin-sdk/src/auto-reply/reply/discord-parent-channel.d.ts +1 -0
  2115. package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp-delivery.d.ts +29 -0
  2116. package/dist/plugin-sdk/src/auto-reply/reply/dispatch-acp.d.ts +32 -0
  2117. package/dist/plugin-sdk/src/auto-reply/reply/dispatch-from-config.d.ts +16 -0
  2118. package/dist/plugin-sdk/src/auto-reply/reply/dispatcher-registry.d.ts +24 -0
  2119. package/dist/plugin-sdk/src/auto-reply/reply/elevated-allowlist-matcher.d.ts +20 -0
  2120. package/dist/plugin-sdk/src/auto-reply/reply/elevated-unavailable.d.ts +8 -0
  2121. package/dist/plugin-sdk/src/auto-reply/reply/exec/directive.d.ts +20 -0
  2122. package/dist/plugin-sdk/src/auto-reply/reply/exec.d.ts +1 -0
  2123. package/dist/plugin-sdk/src/auto-reply/reply/followup-runner.d.ts +16 -0
  2124. package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives-apply.d.ts +67 -0
  2125. package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives-utils.d.ts +3 -0
  2126. package/dist/plugin-sdk/src/auto-reply/reply/get-reply-directives.d.ts +93 -0
  2127. package/dist/plugin-sdk/src/auto-reply/reply/get-reply-inline-actions.d.ts +62 -0
  2128. package/dist/plugin-sdk/src/auto-reply/reply/get-reply-run.d.ts +69 -0
  2129. package/dist/plugin-sdk/src/auto-reply/reply/get-reply.d.ts +7 -0
  2130. package/dist/plugin-sdk/src/auto-reply/reply/groups.d.ts +26 -0
  2131. package/dist/plugin-sdk/src/auto-reply/reply/history.d.ts +72 -0
  2132. package/dist/plugin-sdk/src/auto-reply/reply/inbound-context.d.ts +8 -0
  2133. package/dist/plugin-sdk/src/auto-reply/reply/inbound-dedupe.d.ts +8 -0
  2134. package/dist/plugin-sdk/src/auto-reply/reply/inbound-meta.d.ts +4 -0
  2135. package/dist/plugin-sdk/src/auto-reply/reply/inbound-text.d.ts +5 -0
  2136. package/dist/plugin-sdk/src/auto-reply/reply/line-directives.d.ts +22 -0
  2137. package/dist/plugin-sdk/src/auto-reply/reply/matrix-context.d.ts +13 -0
  2138. package/dist/plugin-sdk/src/auto-reply/reply/mcp-commands.d.ts +15 -0
  2139. package/dist/plugin-sdk/src/auto-reply/reply/memory-flush.d.ts +63 -0
  2140. package/dist/plugin-sdk/src/auto-reply/reply/mentions.d.ts +19 -0
  2141. package/dist/plugin-sdk/src/auto-reply/reply/message-preprocess-hooks.d.ts +7 -0
  2142. package/dist/plugin-sdk/src/auto-reply/reply/model-selection.d.ts +67 -0
  2143. package/dist/plugin-sdk/src/auto-reply/reply/normalize-reply.d.ts +14 -0
  2144. package/dist/plugin-sdk/src/auto-reply/reply/origin-routing.d.ts +13 -0
  2145. package/dist/plugin-sdk/src/auto-reply/reply/plugins-commands.d.ts +16 -0
  2146. package/dist/plugin-sdk/src/auto-reply/reply/post-compaction-context.d.ts +15 -0
  2147. package/dist/plugin-sdk/src/auto-reply/reply/provider-dispatcher.d.ts +19 -0
  2148. package/dist/plugin-sdk/src/auto-reply/reply/queue/cleanup.d.ts +6 -0
  2149. package/dist/plugin-sdk/src/auto-reply/reply/queue/directive.d.ts +15 -0
  2150. package/dist/plugin-sdk/src/auto-reply/reply/queue/drain.d.ts +5 -0
  2151. package/dist/plugin-sdk/src/auto-reply/reply/queue/enqueue.d.ts +4 -0
  2152. package/dist/plugin-sdk/src/auto-reply/reply/queue/normalize.d.ts +3 -0
  2153. package/dist/plugin-sdk/src/auto-reply/reply/queue/settings.d.ts +2 -0
  2154. package/dist/plugin-sdk/src/auto-reply/reply/queue/state.d.ts +20 -0
  2155. package/dist/plugin-sdk/src/auto-reply/reply/queue/types.d.ts +87 -0
  2156. package/dist/plugin-sdk/src/auto-reply/reply/queue-policy.d.ts +8 -0
  2157. package/dist/plugin-sdk/src/auto-reply/reply/queue.d.ts +8 -0
  2158. package/dist/plugin-sdk/src/auto-reply/reply/reply-delivery.d.ts +28 -0
  2159. package/dist/plugin-sdk/src/auto-reply/reply/reply-directives.d.ts +14 -0
  2160. package/dist/plugin-sdk/src/auto-reply/reply/reply-dispatcher.d.ts +57 -0
  2161. package/dist/plugin-sdk/src/auto-reply/reply/reply-elevated.d.ts +16 -0
  2162. package/dist/plugin-sdk/src/auto-reply/reply/reply-inline-whitespace.d.ts +1 -0
  2163. package/dist/plugin-sdk/src/auto-reply/reply/reply-inline.d.ts +8 -0
  2164. package/dist/plugin-sdk/src/auto-reply/reply/reply-media-paths.d.ts +7 -0
  2165. package/dist/plugin-sdk/src/auto-reply/reply/reply-payloads.d.ts +28 -0
  2166. package/dist/plugin-sdk/src/auto-reply/reply/reply-reference.d.ts +20 -0
  2167. package/dist/plugin-sdk/src/auto-reply/reply/reply-tags.d.ts +6 -0
  2168. package/dist/plugin-sdk/src/auto-reply/reply/reply-threading.d.ts +9 -0
  2169. package/dist/plugin-sdk/src/auto-reply/reply/response-prefix-template.d.ts +51 -0
  2170. package/dist/plugin-sdk/src/auto-reply/reply/route-reply.d.ts +60 -0
  2171. package/dist/plugin-sdk/src/auto-reply/reply/session-delivery.d.ts +30 -0
  2172. package/dist/plugin-sdk/src/auto-reply/reply/session-fork.d.ts +11 -0
  2173. package/dist/plugin-sdk/src/auto-reply/reply/session-fork.runtime.d.ts +9 -0
  2174. package/dist/plugin-sdk/src/auto-reply/reply/session-hooks.d.ts +32 -0
  2175. package/dist/plugin-sdk/src/auto-reply/reply/session-reset-model.d.ts +25 -0
  2176. package/dist/plugin-sdk/src/auto-reply/reply/session-reset-prompt.d.ts +9 -0
  2177. package/dist/plugin-sdk/src/auto-reply/reply/session-run-accounting.d.ts +12 -0
  2178. package/dist/plugin-sdk/src/auto-reply/reply/session-updates.d.ts +35 -0
  2179. package/dist/plugin-sdk/src/auto-reply/reply/session-usage.d.ts +23 -0
  2180. package/dist/plugin-sdk/src/auto-reply/reply/session.d.ts +26 -0
  2181. package/dist/plugin-sdk/src/auto-reply/reply/slack-directives.d.ts +3 -0
  2182. package/dist/plugin-sdk/src/auto-reply/reply/stage-sandbox-media.d.ts +9 -0
  2183. package/dist/plugin-sdk/src/auto-reply/reply/streaming-directives.d.ts +10 -0
  2184. package/dist/plugin-sdk/src/auto-reply/reply/strip-inbound-meta.d.ts +31 -0
  2185. package/dist/plugin-sdk/src/auto-reply/reply/subagents-utils.d.ts +27 -0
  2186. package/dist/plugin-sdk/src/auto-reply/reply/telegram-context.d.ts +12 -0
  2187. package/dist/plugin-sdk/src/auto-reply/reply/typing-mode.d.ts +30 -0
  2188. package/dist/plugin-sdk/src/auto-reply/reply/typing-policy.d.ts +13 -0
  2189. package/dist/plugin-sdk/src/auto-reply/reply/typing.d.ts +18 -0
  2190. package/dist/plugin-sdk/src/auto-reply/reply/untrusted-context.d.ts +1 -0
  2191. package/dist/plugin-sdk/src/auto-reply/reply.d.ts +6 -0
  2192. package/dist/plugin-sdk/src/auto-reply/send-policy.d.ts +6 -0
  2193. package/dist/plugin-sdk/src/auto-reply/skill-commands-base.d.ts +9 -0
  2194. package/dist/plugin-sdk/src/auto-reply/skill-commands.d.ts +16 -0
  2195. package/dist/plugin-sdk/src/auto-reply/skill-commands.runtime.d.ts +1 -0
  2196. package/dist/plugin-sdk/src/auto-reply/status.d.ts +61 -0
  2197. package/dist/plugin-sdk/src/auto-reply/templating.d.ts +190 -0
  2198. package/dist/plugin-sdk/src/auto-reply/thinking.d.ts +13 -0
  2199. package/dist/plugin-sdk/src/auto-reply/thinking.shared.d.ts +33 -0
  2200. package/dist/plugin-sdk/src/auto-reply/tokens.d.ts +10 -0
  2201. package/dist/plugin-sdk/src/auto-reply/tool-meta.d.ts +8 -0
  2202. package/dist/plugin-sdk/src/auto-reply/types.d.ts +95 -0
  2203. package/dist/plugin-sdk/src/bindings/records.d.ts +10 -0
  2204. package/dist/plugin-sdk/src/browser/bridge-auth-registry.d.ts +8 -0
  2205. package/dist/plugin-sdk/src/browser/bridge-server.d.ts +24 -0
  2206. package/dist/plugin-sdk/src/browser/cdp-proxy-bypass.d.ts +31 -0
  2207. package/dist/plugin-sdk/src/browser/cdp-timeouts.d.ts +26 -0
  2208. package/dist/plugin-sdk/src/browser/cdp.d.ts +125 -0
  2209. package/dist/plugin-sdk/src/browser/cdp.helpers.d.ts +29 -0
  2210. package/dist/plugin-sdk/src/browser/chrome-mcp.d.ts +127 -0
  2211. package/dist/plugin-sdk/src/browser/chrome-mcp.snapshot.d.ts +26 -0
  2212. package/dist/plugin-sdk/src/browser/chrome.d.ts +21 -0
  2213. package/dist/plugin-sdk/src/browser/chrome.executables.d.ts +15 -0
  2214. package/dist/plugin-sdk/src/browser/chrome.profile-decoration.d.ts +10 -0
  2215. package/dist/plugin-sdk/src/browser/client-actions-core.d.ts +159 -0
  2216. package/dist/plugin-sdk/src/browser/client-actions-observe.d.ts +68 -0
  2217. package/dist/plugin-sdk/src/browser/client-actions-state.d.ts +93 -0
  2218. package/dist/plugin-sdk/src/browser/client-actions-types.d.ts +18 -0
  2219. package/dist/plugin-sdk/src/browser/client-actions-url.d.ts +2 -0
  2220. package/dist/plugin-sdk/src/browser/client-actions.d.ts +4 -0
  2221. package/dist/plugin-sdk/src/browser/client-fetch.d.ts +21 -0
  2222. package/dist/plugin-sdk/src/browser/client.d.ts +157 -0
  2223. package/dist/plugin-sdk/src/browser/config.d.ts +46 -0
  2224. package/dist/plugin-sdk/src/browser/constants.d.ts +8 -0
  2225. package/dist/plugin-sdk/src/browser/control-auth.d.ts +13 -0
  2226. package/dist/plugin-sdk/src/browser/control-service.d.ts +5 -0
  2227. package/dist/plugin-sdk/src/browser/csrf.d.ts +8 -0
  2228. package/dist/plugin-sdk/src/browser/errors.d.ts +35 -0
  2229. package/dist/plugin-sdk/src/browser/form-fields.d.ts +8 -0
  2230. package/dist/plugin-sdk/src/browser/http-auth.d.ts +5 -0
  2231. package/dist/plugin-sdk/src/browser/navigation-guard.d.ts +30 -0
  2232. package/dist/plugin-sdk/src/browser/output-atomic.d.ts +5 -0
  2233. package/dist/plugin-sdk/src/browser/paths.d.ts +61 -0
  2234. package/dist/plugin-sdk/src/browser/profile-capabilities.d.ts +30 -0
  2235. package/dist/plugin-sdk/src/browser/profiles-service.d.ts +28 -0
  2236. package/dist/plugin-sdk/src/browser/profiles.d.ts +30 -0
  2237. package/dist/plugin-sdk/src/browser/proxy-files.d.ts +7 -0
  2238. package/dist/plugin-sdk/src/browser/pw-ai-module.d.ts +6 -0
  2239. package/dist/plugin-sdk/src/browser/pw-ai-state.d.ts +2 -0
  2240. package/dist/plugin-sdk/src/browser/pw-ai.d.ts +2 -0
  2241. package/dist/plugin-sdk/src/browser/pw-role-snapshot.d.ts +35 -0
  2242. package/dist/plugin-sdk/src/browser/pw-session.d.ts +164 -0
  2243. package/dist/plugin-sdk/src/browser/pw-session.page-cdp.d.ts +9 -0
  2244. package/dist/plugin-sdk/src/browser/pw-tools-core.activity.d.ts +21 -0
  2245. package/dist/plugin-sdk/src/browser/pw-tools-core.d.ts +8 -0
  2246. package/dist/plugin-sdk/src/browser/pw-tools-core.downloads.d.ts +34 -0
  2247. package/dist/plugin-sdk/src/browser/pw-tools-core.interactions.d.ts +135 -0
  2248. package/dist/plugin-sdk/src/browser/pw-tools-core.responses.d.ts +13 -0
  2249. package/dist/plugin-sdk/src/browser/pw-tools-core.shared.d.ts +10 -0
  2250. package/dist/plugin-sdk/src/browser/pw-tools-core.snapshot.d.ts +66 -0
  2251. package/dist/plugin-sdk/src/browser/pw-tools-core.state.d.ts +46 -0
  2252. package/dist/plugin-sdk/src/browser/pw-tools-core.storage.d.ts +47 -0
  2253. package/dist/plugin-sdk/src/browser/pw-tools-core.trace.d.ts +12 -0
  2254. package/dist/plugin-sdk/src/browser/resolved-config-refresh.d.ts +12 -0
  2255. package/dist/plugin-sdk/src/browser/routes/agent.act.d.ts +3 -0
  2256. package/dist/plugin-sdk/src/browser/routes/agent.act.download.d.ts +3 -0
  2257. package/dist/plugin-sdk/src/browser/routes/agent.act.hooks.d.ts +3 -0
  2258. package/dist/plugin-sdk/src/browser/routes/agent.act.shared.d.ts +10 -0
  2259. package/dist/plugin-sdk/src/browser/routes/agent.d.ts +3 -0
  2260. package/dist/plugin-sdk/src/browser/routes/agent.debug.d.ts +3 -0
  2261. package/dist/plugin-sdk/src/browser/routes/agent.shared.d.ts +37 -0
  2262. package/dist/plugin-sdk/src/browser/routes/agent.snapshot.d.ts +12 -0
  2263. package/dist/plugin-sdk/src/browser/routes/agent.snapshot.plan.d.ts +22 -0
  2264. package/dist/plugin-sdk/src/browser/routes/agent.storage.d.ts +14 -0
  2265. package/dist/plugin-sdk/src/browser/routes/basic.d.ts +3 -0
  2266. package/dist/plugin-sdk/src/browser/routes/dispatcher.d.ts +16 -0
  2267. package/dist/plugin-sdk/src/browser/routes/index.d.ts +3 -0
  2268. package/dist/plugin-sdk/src/browser/routes/output-paths.d.ts +10 -0
  2269. package/dist/plugin-sdk/src/browser/routes/path-output.d.ts +1 -0
  2270. package/dist/plugin-sdk/src/browser/routes/tabs.d.ts +3 -0
  2271. package/dist/plugin-sdk/src/browser/routes/types.d.ts +20 -0
  2272. package/dist/plugin-sdk/src/browser/routes/utils.d.ts +15 -0
  2273. package/dist/plugin-sdk/src/browser/runtime-lifecycle.d.ts +15 -0
  2274. package/dist/plugin-sdk/src/browser/safe-filename.d.ts +1 -0
  2275. package/dist/plugin-sdk/src/browser/screenshot.d.ts +9 -0
  2276. package/dist/plugin-sdk/src/browser/server-context.availability.d.ts +19 -0
  2277. package/dist/plugin-sdk/src/browser/server-context.constants.d.ts +7 -0
  2278. package/dist/plugin-sdk/src/browser/server-context.d.ts +4 -0
  2279. package/dist/plugin-sdk/src/browser/server-context.reset.d.ts +20 -0
  2280. package/dist/plugin-sdk/src/browser/server-context.selection.d.ts +16 -0
  2281. package/dist/plugin-sdk/src/browser/server-context.tab-ops.d.ts +13 -0
  2282. package/dist/plugin-sdk/src/browser/server-context.types.d.ts +74 -0
  2283. package/dist/plugin-sdk/src/browser/server-lifecycle.d.ts +10 -0
  2284. package/dist/plugin-sdk/src/browser/server-middleware.d.ts +6 -0
  2285. package/dist/plugin-sdk/src/browser/session-tab-registry.d.ts +30 -0
  2286. package/dist/plugin-sdk/src/browser/snapshot-roles.d.ts +11 -0
  2287. package/dist/plugin-sdk/src/browser/target-id.d.ts +11 -0
  2288. package/dist/plugin-sdk/src/browser/trash.d.ts +1 -0
  2289. package/dist/plugin-sdk/src/browser/url-pattern.d.ts +1 -0
  2290. package/dist/plugin-sdk/src/bundled-web-search-registry.d.ts +10 -0
  2291. package/dist/plugin-sdk/src/channel-web.d.ts +5 -0
  2292. package/dist/plugin-sdk/src/channels/account-snapshot-fields.d.ts +10 -0
  2293. package/dist/plugin-sdk/src/channels/account-summary.d.ts +28 -0
  2294. package/dist/plugin-sdk/src/channels/ack-reactions.d.ts +29 -0
  2295. package/dist/plugin-sdk/src/channels/allow-from.d.ts +16 -0
  2296. package/dist/plugin-sdk/src/channels/allowlist-match.d.ts +42 -0
  2297. package/dist/plugin-sdk/src/channels/allowlists/resolve-utils.d.ts +34 -0
  2298. package/dist/plugin-sdk/src/channels/channel-config.d.ts +39 -0
  2299. package/dist/plugin-sdk/src/channels/chat-type.d.ts +2 -0
  2300. package/dist/plugin-sdk/src/channels/command-gating.d.ts +32 -0
  2301. package/dist/plugin-sdk/src/channels/config-presence.d.ts +4 -0
  2302. package/dist/plugin-sdk/src/channels/conversation-label.d.ts +2 -0
  2303. package/dist/plugin-sdk/src/channels/draft-stream-controls.d.ts +54 -0
  2304. package/dist/plugin-sdk/src/channels/draft-stream-loop.d.ts +13 -0
  2305. package/dist/plugin-sdk/src/channels/ids.d.ts +3 -0
  2306. package/dist/plugin-sdk/src/channels/inbound-debounce-policy.d.ts +18 -0
  2307. package/dist/plugin-sdk/src/channels/location.d.ts +21 -0
  2308. package/dist/plugin-sdk/src/channels/logging.d.ts +20 -0
  2309. package/dist/plugin-sdk/src/channels/mention-gating.d.ts +27 -0
  2310. package/dist/plugin-sdk/src/channels/model-overrides.d.ts +18 -0
  2311. package/dist/plugin-sdk/src/channels/native-command-session-targets.d.ts +12 -0
  2312. package/dist/plugin-sdk/src/channels/plugins/account-action-gate.d.ts +5 -0
  2313. package/dist/plugin-sdk/src/channels/plugins/account-helpers.d.ts +8 -0
  2314. package/dist/plugin-sdk/src/channels/plugins/acp-configured-binding-consumer.d.ts +2 -0
  2315. package/dist/plugin-sdk/src/channels/plugins/acp-stateful-target-driver.d.ts +2 -0
  2316. package/dist/plugin-sdk/src/channels/plugins/actions/reaction-message-id.d.ts +8 -0
  2317. package/dist/plugin-sdk/src/channels/plugins/actions/shared.d.ts +7 -0
  2318. package/dist/plugin-sdk/src/channels/plugins/allowlist-match.d.ts +2 -0
  2319. package/dist/plugin-sdk/src/channels/plugins/binding-provider.d.ts +5 -0
  2320. package/dist/plugin-sdk/src/channels/plugins/binding-registry.d.ts +6 -0
  2321. package/dist/plugin-sdk/src/channels/plugins/binding-routing.d.ts +32 -0
  2322. package/dist/plugin-sdk/src/channels/plugins/binding-targets.d.ts +33 -0
  2323. package/dist/plugin-sdk/src/channels/plugins/binding-types.d.ts +40 -0
  2324. package/dist/plugin-sdk/src/channels/plugins/bluebubbles-actions.d.ts +48 -0
  2325. package/dist/plugin-sdk/src/channels/plugins/channel-config.d.ts +2 -0
  2326. package/dist/plugin-sdk/src/channels/plugins/config-helpers.d.ts +25 -0
  2327. package/dist/plugin-sdk/src/channels/plugins/config-schema.d.ts +20 -0
  2328. package/dist/plugin-sdk/src/channels/plugins/config-writes.d.ts +56 -0
  2329. package/dist/plugin-sdk/src/channels/plugins/configured-binding-builtins.d.ts +2 -0
  2330. package/dist/plugin-sdk/src/channels/plugins/configured-binding-compiler.d.ts +11 -0
  2331. package/dist/plugin-sdk/src/channels/plugins/configured-binding-consumers.d.ts +32 -0
  2332. package/dist/plugin-sdk/src/channels/plugins/configured-binding-match.d.ts +23 -0
  2333. package/dist/plugin-sdk/src/channels/plugins/configured-binding-registry.d.ts +28 -0
  2334. package/dist/plugin-sdk/src/channels/plugins/configured-binding-session-lookup.d.ts +6 -0
  2335. package/dist/plugin-sdk/src/channels/plugins/directory-adapters.d.ts +9 -0
  2336. package/dist/plugin-sdk/src/channels/plugins/directory-config-helpers.d.ts +69 -0
  2337. package/dist/plugin-sdk/src/channels/plugins/directory-types.d.ts +7 -0
  2338. package/dist/plugin-sdk/src/channels/plugins/exec-approval-local.d.ts +8 -0
  2339. package/dist/plugin-sdk/src/channels/plugins/group-policy-warnings.d.ts +126 -0
  2340. package/dist/plugin-sdk/src/channels/plugins/helpers.d.ts +24 -0
  2341. package/dist/plugin-sdk/src/channels/plugins/index.d.ts +4 -0
  2342. package/dist/plugin-sdk/src/channels/plugins/media-limits.d.ts +9 -0
  2343. package/dist/plugin-sdk/src/channels/plugins/media-payload.d.ts +15 -0
  2344. package/dist/plugin-sdk/src/channels/plugins/message-action-discovery.d.ts +77 -0
  2345. package/dist/plugin-sdk/src/channels/plugins/message-action-dispatch.d.ts +3 -0
  2346. package/dist/plugin-sdk/src/channels/plugins/message-action-names.d.ts +2 -0
  2347. package/dist/plugin-sdk/src/channels/plugins/message-capabilities.d.ts +2 -0
  2348. package/dist/plugin-sdk/src/channels/plugins/normalize/imessage.d.ts +2 -0
  2349. package/dist/plugin-sdk/src/channels/plugins/normalize/shared.d.ts +6 -0
  2350. package/dist/plugin-sdk/src/channels/plugins/normalize/signal.d.ts +2 -0
  2351. package/dist/plugin-sdk/src/channels/plugins/normalize/slack.d.ts +2 -0
  2352. package/dist/plugin-sdk/src/channels/plugins/normalize/whatsapp.d.ts +3 -0
  2353. package/dist/plugin-sdk/src/channels/plugins/outbound/direct-text-media.d.ts +39 -0
  2354. package/dist/plugin-sdk/src/channels/plugins/outbound/interactive.d.ts +2 -0
  2355. package/dist/plugin-sdk/src/channels/plugins/outbound/load.d.ts +2 -0
  2356. package/dist/plugin-sdk/src/channels/plugins/pairing-adapters.d.ts +13 -0
  2357. package/dist/plugin-sdk/src/channels/plugins/pairing-message.d.ts +1 -0
  2358. package/dist/plugin-sdk/src/channels/plugins/pairing.d.ts +16 -0
  2359. package/dist/plugin-sdk/src/channels/plugins/registry-loader.d.ts +5 -0
  2360. package/dist/plugin-sdk/src/channels/plugins/registry.d.ts +4 -0
  2361. package/dist/plugin-sdk/src/channels/plugins/runtime-forwarders.d.ts +26 -0
  2362. package/dist/plugin-sdk/src/channels/plugins/setup-group-access-configure.d.ts +22 -0
  2363. package/dist/plugin-sdk/src/channels/plugins/setup-group-access.d.ts +32 -0
  2364. package/dist/plugin-sdk/src/channels/plugins/setup-helpers.d.ts +81 -0
  2365. package/dist/plugin-sdk/src/channels/plugins/setup-wizard-binary.d.ts +34 -0
  2366. package/dist/plugin-sdk/src/channels/plugins/setup-wizard-helpers.d.ts +441 -0
  2367. package/dist/plugin-sdk/src/channels/plugins/setup-wizard-proxy.d.ts +48 -0
  2368. package/dist/plugin-sdk/src/channels/plugins/setup-wizard-types.d.ts +107 -0
  2369. package/dist/plugin-sdk/src/channels/plugins/setup-wizard.d.ts +267 -0
  2370. package/dist/plugin-sdk/src/channels/plugins/stateful-target-builtins.d.ts +2 -0
  2371. package/dist/plugin-sdk/src/channels/plugins/stateful-target-drivers.d.ts +54 -0
  2372. package/dist/plugin-sdk/src/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
  2373. package/dist/plugin-sdk/src/channels/plugins/status-issues/shared.d.ts +29 -0
  2374. package/dist/plugin-sdk/src/channels/plugins/target-parsing.d.ts +7 -0
  2375. package/dist/plugin-sdk/src/channels/plugins/target-resolvers.d.ts +12 -0
  2376. package/dist/plugin-sdk/src/channels/plugins/threading-helpers.d.ts +12 -0
  2377. package/dist/plugin-sdk/src/channels/plugins/types.adapters.d.ts +557 -0
  2378. package/dist/plugin-sdk/src/channels/plugins/types.core.d.ts +522 -0
  2379. package/dist/plugin-sdk/src/channels/plugins/types.d.ts +8 -0
  2380. package/dist/plugin-sdk/src/channels/plugins/types.plugin.d.ts +58 -0
  2381. package/dist/plugin-sdk/src/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
  2382. package/dist/plugin-sdk/src/channels/plugins/whatsapp-shared.d.ts +21 -0
  2383. package/dist/plugin-sdk/src/channels/read-only-account-inspect.d.ts +12 -0
  2384. package/dist/plugin-sdk/src/channels/read-only-account-inspect.discord.runtime.d.ts +3 -0
  2385. package/dist/plugin-sdk/src/channels/read-only-account-inspect.slack.runtime.d.ts +3 -0
  2386. package/dist/plugin-sdk/src/channels/read-only-account-inspect.telegram.runtime.d.ts +3 -0
  2387. package/dist/plugin-sdk/src/channels/registry.d.ts +15 -0
  2388. package/dist/plugin-sdk/src/channels/reply-prefix.d.ts +25 -0
  2389. package/dist/plugin-sdk/src/channels/run-state-machine.d.ts +19 -0
  2390. package/dist/plugin-sdk/src/channels/sender-label.d.ts +9 -0
  2391. package/dist/plugin-sdk/src/channels/session-envelope.d.ts +10 -0
  2392. package/dist/plugin-sdk/src/channels/session-meta.d.ts +9 -0
  2393. package/dist/plugin-sdk/src/channels/session.d.ts +26 -0
  2394. package/dist/plugin-sdk/src/channels/status-reactions.d.ts +66 -0
  2395. package/dist/plugin-sdk/src/channels/targets.d.ts +57 -0
  2396. package/dist/plugin-sdk/src/channels/thread-binding-id.d.ts +4 -0
  2397. package/dist/plugin-sdk/src/channels/thread-bindings-messages.d.ts +19 -0
  2398. package/dist/plugin-sdk/src/channels/thread-bindings-policy.d.ts +68 -0
  2399. package/dist/plugin-sdk/src/channels/transport/stall-watchdog.d.ts +20 -0
  2400. package/dist/plugin-sdk/src/channels/typing-lifecycle.d.ts +12 -0
  2401. package/dist/plugin-sdk/src/channels/typing-start-guard.d.ts +13 -0
  2402. package/dist/plugin-sdk/src/channels/typing.d.ts +18 -0
  2403. package/dist/plugin-sdk/src/cli/argv.d.ts +27 -0
  2404. package/dist/plugin-sdk/src/cli/cli-name.d.ts +3 -0
  2405. package/dist/plugin-sdk/src/cli/cli-utils.d.ts +19 -0
  2406. package/dist/plugin-sdk/src/cli/command-format.d.ts +1 -0
  2407. package/dist/plugin-sdk/src/cli/command-secret-gateway.d.ts +19 -0
  2408. package/dist/plugin-sdk/src/cli/command-secret-targets.d.ts +16 -0
  2409. package/dist/plugin-sdk/src/cli/deps.d.ts +11 -0
  2410. package/dist/plugin-sdk/src/cli/help-format.d.ts +5 -0
  2411. package/dist/plugin-sdk/src/cli/memory-cli.d.ts +12 -0
  2412. package/dist/plugin-sdk/src/cli/message-secret-scope.d.ts +11 -0
  2413. package/dist/plugin-sdk/src/cli/nodes-camera.d.ts +51 -0
  2414. package/dist/plugin-sdk/src/cli/nodes-canvas.d.ts +10 -0
  2415. package/dist/plugin-sdk/src/cli/nodes-media-utils.d.ts +13 -0
  2416. package/dist/plugin-sdk/src/cli/nodes-run.d.ts +3 -0
  2417. package/dist/plugin-sdk/src/cli/nodes-screen.d.ts +18 -0
  2418. package/dist/plugin-sdk/src/cli/outbound-send-deps.d.ts +4 -0
  2419. package/dist/plugin-sdk/src/cli/outbound-send-mapping.d.ts +13 -0
  2420. package/dist/plugin-sdk/src/cli/parse-bytes.d.ts +4 -0
  2421. package/dist/plugin-sdk/src/cli/parse-duration.d.ts +4 -0
  2422. package/dist/plugin-sdk/src/cli/parse-timeout.d.ts +4 -0
  2423. package/dist/plugin-sdk/src/cli/profile-utils.d.ts +2 -0
  2424. package/dist/plugin-sdk/src/cli/progress.d.ts +24 -0
  2425. package/dist/plugin-sdk/src/cli/prompt.d.ts +1 -0
  2426. package/dist/plugin-sdk/src/cli/send-runtime/discord.d.ts +4 -0
  2427. package/dist/plugin-sdk/src/cli/send-runtime/imessage.d.ts +4 -0
  2428. package/dist/plugin-sdk/src/cli/send-runtime/signal.d.ts +4 -0
  2429. package/dist/plugin-sdk/src/cli/send-runtime/slack.d.ts +4 -0
  2430. package/dist/plugin-sdk/src/cli/send-runtime/telegram.d.ts +4 -0
  2431. package/dist/plugin-sdk/src/cli/send-runtime/whatsapp.d.ts +4 -0
  2432. package/dist/plugin-sdk/src/cli/wait.d.ts +1 -0
  2433. package/dist/plugin-sdk/src/commands/backup-shared.d.ts +32 -0
  2434. package/dist/plugin-sdk/src/commands/chutes-oauth.d.ts +21 -0
  2435. package/dist/plugin-sdk/src/commands/cleanup-utils.d.ts +36 -0
  2436. package/dist/plugin-sdk/src/commands/daemon-runtime.d.ts +8 -0
  2437. package/dist/plugin-sdk/src/commands/health.d.ts +63 -0
  2438. package/dist/plugin-sdk/src/commands/models/shared.d.ts +58 -0
  2439. package/dist/plugin-sdk/src/commands/onboard-types.d.ts +92 -0
  2440. package/dist/plugin-sdk/src/compat/legacy-names.d.ts +8 -0
  2441. package/dist/plugin-sdk/src/config/agent-dirs.d.ts +14 -0
  2442. package/dist/plugin-sdk/src/config/agent-limits.d.ts +6 -0
  2443. package/dist/plugin-sdk/src/config/allowed-values.d.ts +7 -0
  2444. package/dist/plugin-sdk/src/config/backup-rotation.d.ts +32 -0
  2445. package/dist/plugin-sdk/src/config/bindings.d.ts +8 -0
  2446. package/dist/plugin-sdk/src/config/byte-size.d.ts +6 -0
  2447. package/dist/plugin-sdk/src/config/cache-utils.d.ts +10 -0
  2448. package/dist/plugin-sdk/src/config/channel-capabilities.d.ts +6 -0
  2449. package/dist/plugin-sdk/src/config/channel-configured.d.ts +2 -0
  2450. package/dist/plugin-sdk/src/config/commands.d.ts +25 -0
  2451. package/dist/plugin-sdk/src/config/config-paths.d.ts +10 -0
  2452. package/dist/plugin-sdk/src/config/config.d.ts +6 -0
  2453. package/dist/plugin-sdk/src/config/dangerous-name-matching.d.ts +12 -0
  2454. package/dist/plugin-sdk/src/config/defaults.d.ts +18 -0
  2455. package/dist/plugin-sdk/src/config/discord-preview-streaming.d.ts +27 -0
  2456. package/dist/plugin-sdk/src/config/env-preserve.d.ts +10 -0
  2457. package/dist/plugin-sdk/src/config/env-substitution.d.ts +45 -0
  2458. package/dist/plugin-sdk/src/config/env-vars.d.ts +7 -0
  2459. package/dist/plugin-sdk/src/config/gateway-control-ui-origins.d.ts +21 -0
  2460. package/dist/plugin-sdk/src/config/group-policy.d.ts +49 -0
  2461. package/dist/plugin-sdk/src/config/includes.d.ts +43 -0
  2462. package/dist/plugin-sdk/src/config/io.d.ts +79 -0
  2463. package/dist/plugin-sdk/src/config/issue-format.d.ts +14 -0
  2464. package/dist/plugin-sdk/src/config/legacy-migrate.d.ts +5 -0
  2465. package/dist/plugin-sdk/src/config/legacy-web-search.d.ts +8 -0
  2466. package/dist/plugin-sdk/src/config/legacy.d.ts +6 -0
  2467. package/dist/plugin-sdk/src/config/legacy.migrations.d.ts +1 -0
  2468. package/dist/plugin-sdk/src/config/legacy.migrations.part-1.d.ts +2 -0
  2469. package/dist/plugin-sdk/src/config/legacy.migrations.part-2.d.ts +2 -0
  2470. package/dist/plugin-sdk/src/config/legacy.migrations.part-3.d.ts +2 -0
  2471. package/dist/plugin-sdk/src/config/legacy.rules.d.ts +2 -0
  2472. package/dist/plugin-sdk/src/config/legacy.shared.d.ts +20 -0
  2473. package/dist/plugin-sdk/src/config/logging.d.ts +8 -0
  2474. package/dist/plugin-sdk/src/config/markdown-tables.d.ts +8 -0
  2475. package/dist/plugin-sdk/src/config/mcp-config.d.ts +33 -0
  2476. package/dist/plugin-sdk/src/config/merge-patch.d.ts +5 -0
  2477. package/dist/plugin-sdk/src/config/model-input.d.ts +9 -0
  2478. package/dist/plugin-sdk/src/config/normalize-exec-safe-bin.d.ts +2 -0
  2479. package/dist/plugin-sdk/src/config/normalize-paths.d.ts +8 -0
  2480. package/dist/plugin-sdk/src/config/paths.d.ts +57 -0
  2481. package/dist/plugin-sdk/src/config/plugin-auto-enable.d.ts +14 -0
  2482. package/dist/plugin-sdk/src/config/plugins-allowlist.d.ts +2 -0
  2483. package/dist/plugin-sdk/src/config/port-defaults.d.ts +13 -0
  2484. package/dist/plugin-sdk/src/config/prototype-keys.d.ts +1 -0
  2485. package/dist/plugin-sdk/src/config/runtime-group-policy.d.ts +56 -0
  2486. package/dist/plugin-sdk/src/config/runtime-overrides.d.ts +15 -0
  2487. package/dist/plugin-sdk/src/config/sessions/artifacts.d.ts +5 -0
  2488. package/dist/plugin-sdk/src/config/sessions/delivery-info.d.ts +16 -0
  2489. package/dist/plugin-sdk/src/config/sessions/disk-budget.d.ts +28 -0
  2490. package/dist/plugin-sdk/src/config/sessions/explicit-session-key-normalization.d.ts +2 -0
  2491. package/dist/plugin-sdk/src/config/sessions/group.d.ts +11 -0
  2492. package/dist/plugin-sdk/src/config/sessions/main-session.d.ts +42 -0
  2493. package/dist/plugin-sdk/src/config/sessions/main-session.runtime.d.ts +1 -0
  2494. package/dist/plugin-sdk/src/config/sessions/metadata.d.ts +16 -0
  2495. package/dist/plugin-sdk/src/config/sessions/paths.d.ts +23 -0
  2496. package/dist/plugin-sdk/src/config/sessions/reset.d.ts +43 -0
  2497. package/dist/plugin-sdk/src/config/sessions/session-file.d.ts +15 -0
  2498. package/dist/plugin-sdk/src/config/sessions/session-key.d.ts +8 -0
  2499. package/dist/plugin-sdk/src/config/sessions/store-cache.d.ts +19 -0
  2500. package/dist/plugin-sdk/src/config/sessions/store-maintenance.d.ts +62 -0
  2501. package/dist/plugin-sdk/src/config/sessions/store-migrations.d.ts +2 -0
  2502. package/dist/plugin-sdk/src/config/sessions/store-summary.d.ts +6 -0
  2503. package/dist/plugin-sdk/src/config/sessions/store.d.ts +91 -0
  2504. package/dist/plugin-sdk/src/config/sessions/store.runtime.d.ts +1 -0
  2505. package/dist/plugin-sdk/src/config/sessions/targets.d.ts +19 -0
  2506. package/dist/plugin-sdk/src/config/sessions/transcript.d.ts +33 -0
  2507. package/dist/plugin-sdk/src/config/sessions/types.d.ts +259 -0
  2508. package/dist/plugin-sdk/src/config/sessions.d.ts +15 -0
  2509. package/dist/plugin-sdk/src/config/talk.d.ts +18 -0
  2510. package/dist/plugin-sdk/src/config/telegram-custom-commands.d.ts +24 -0
  2511. package/dist/plugin-sdk/src/config/types.acp.d.ts +44 -0
  2512. package/dist/plugin-sdk/src/config/types.agent-defaults.d.ts +354 -0
  2513. package/dist/plugin-sdk/src/config/types.agents-shared.d.ts +33 -0
  2514. package/dist/plugin-sdk/src/config/types.agents.d.ts +94 -0
  2515. package/dist/plugin-sdk/src/config/types.approvals.d.ts +26 -0
  2516. package/dist/plugin-sdk/src/config/types.auth.d.ts +28 -0
  2517. package/dist/plugin-sdk/src/config/types.base.d.ts +216 -0
  2518. package/dist/plugin-sdk/src/config/types.browser.d.ts +71 -0
  2519. package/dist/plugin-sdk/src/config/types.channel-messaging-common.d.ts +46 -0
  2520. package/dist/plugin-sdk/src/config/types.channels.d.ts +63 -0
  2521. package/dist/plugin-sdk/src/config/types.cli.d.ts +12 -0
  2522. package/dist/plugin-sdk/src/config/types.cron.d.ts +55 -0
  2523. package/dist/plugin-sdk/src/config/types.d.ts +34 -0
  2524. package/dist/plugin-sdk/src/config/types.discord.d.ts +345 -0
  2525. package/dist/plugin-sdk/src/config/types.gateway.d.ts +416 -0
  2526. package/dist/plugin-sdk/src/config/types.googlechat.d.ts +115 -0
  2527. package/dist/plugin-sdk/src/config/types.hooks.d.ts +123 -0
  2528. package/dist/plugin-sdk/src/config/types.imessage.d.ts +81 -0
  2529. package/dist/plugin-sdk/src/config/types.installs.d.ts +14 -0
  2530. package/dist/plugin-sdk/src/config/types.irc.d.ts +56 -0
  2531. package/dist/plugin-sdk/src/config/types.mcp.d.ts +13 -0
  2532. package/dist/plugin-sdk/src/config/types.memory.d.ts +59 -0
  2533. package/dist/plugin-sdk/src/config/types.messages.d.ts +163 -0
  2534. package/dist/plugin-sdk/src/config/types.models.d.ts +57 -0
  2535. package/dist/plugin-sdk/src/config/types.msteams.d.ts +111 -0
  2536. package/dist/plugin-sdk/src/config/types.node-host.d.ts +10 -0
  2537. package/dist/plugin-sdk/src/config/types.openclaw.d.ts +141 -0
  2538. package/dist/plugin-sdk/src/config/types.plugins.d.ts +46 -0
  2539. package/dist/plugin-sdk/src/config/types.queue.d.ts +14 -0
  2540. package/dist/plugin-sdk/src/config/types.sandbox.d.ts +122 -0
  2541. package/dist/plugin-sdk/src/config/types.secrets.d.ts +90 -0
  2542. package/dist/plugin-sdk/src/config/types.signal.d.ts +58 -0
  2543. package/dist/plugin-sdk/src/config/types.skills.d.ts +42 -0
  2544. package/dist/plugin-sdk/src/config/types.slack.d.ts +190 -0
  2545. package/dist/plugin-sdk/src/config/types.telegram.d.ts +271 -0
  2546. package/dist/plugin-sdk/src/config/types.tools.d.ts +567 -0
  2547. package/dist/plugin-sdk/src/config/types.tts.d.ts +97 -0
  2548. package/dist/plugin-sdk/src/config/types.whatsapp.d.ts +105 -0
  2549. package/dist/plugin-sdk/src/config/validation.d.ts +35 -0
  2550. package/dist/plugin-sdk/src/config/version.d.ts +8 -0
  2551. package/dist/plugin-sdk/src/config/zod-schema.agent-defaults.d.ts +387 -0
  2552. package/dist/plugin-sdk/src/config/zod-schema.agent-model.d.ts +5 -0
  2553. package/dist/plugin-sdk/src/config/zod-schema.agent-runtime.d.ts +1571 -0
  2554. package/dist/plugin-sdk/src/config/zod-schema.agents.d.ts +803 -0
  2555. package/dist/plugin-sdk/src/config/zod-schema.allowdeny.d.ts +13 -0
  2556. package/dist/plugin-sdk/src/config/zod-schema.approvals.d.ts +15 -0
  2557. package/dist/plugin-sdk/src/config/zod-schema.channels.d.ts +9 -0
  2558. package/dist/plugin-sdk/src/config/zod-schema.core.d.ts +979 -0
  2559. package/dist/plugin-sdk/src/config/zod-schema.d.ts +5313 -0
  2560. package/dist/plugin-sdk/src/config/zod-schema.hooks.d.ts +85 -0
  2561. package/dist/plugin-sdk/src/config/zod-schema.installs.d.ts +34 -0
  2562. package/dist/plugin-sdk/src/config/zod-schema.providers-core.d.ts +4992 -0
  2563. package/dist/plugin-sdk/src/config/zod-schema.providers-whatsapp.d.ts +245 -0
  2564. package/dist/plugin-sdk/src/config/zod-schema.providers.d.ts +2923 -0
  2565. package/dist/plugin-sdk/src/config/zod-schema.secret-input-validation.d.ts +24 -0
  2566. package/dist/plugin-sdk/src/config/zod-schema.sensitive.d.ts +2 -0
  2567. package/dist/plugin-sdk/src/config/zod-schema.session.d.ts +277 -0
  2568. package/dist/plugin-sdk/src/context-engine/delegate.d.ts +15 -0
  2569. package/dist/plugin-sdk/src/context-engine/index.d.ts +6 -0
  2570. package/dist/plugin-sdk/src/context-engine/init.d.ts +1 -0
  2571. package/dist/plugin-sdk/src/context-engine/legacy.d.ts +50 -0
  2572. package/dist/plugin-sdk/src/context-engine/registry.d.ts +47 -0
  2573. package/dist/plugin-sdk/src/context-engine/types.d.ts +206 -0
  2574. package/dist/plugin-sdk/src/cron/delivery.d.ts +32 -0
  2575. package/dist/plugin-sdk/src/cron/isolated-agent/delivery-target.d.ts +26 -0
  2576. package/dist/plugin-sdk/src/cron/legacy-delivery.d.ts +15 -0
  2577. package/dist/plugin-sdk/src/cron/normalize.d.ts +13 -0
  2578. package/dist/plugin-sdk/src/cron/parse.d.ts +1 -0
  2579. package/dist/plugin-sdk/src/cron/payload-migration.d.ts +3 -0
  2580. package/dist/plugin-sdk/src/cron/schedule.d.ts +6 -0
  2581. package/dist/plugin-sdk/src/cron/service/initial-delivery.d.ts +3 -0
  2582. package/dist/plugin-sdk/src/cron/service/jobs.d.ts +32 -0
  2583. package/dist/plugin-sdk/src/cron/service/locked.d.ts +2 -0
  2584. package/dist/plugin-sdk/src/cron/service/normalize.d.ts +18 -0
  2585. package/dist/plugin-sdk/src/cron/service/ops.d.ts +84 -0
  2586. package/dist/plugin-sdk/src/cron/service/state.d.ts +158 -0
  2587. package/dist/plugin-sdk/src/cron/service/store.d.ts +11 -0
  2588. package/dist/plugin-sdk/src/cron/service/timeout-policy.d.ts +13 -0
  2589. package/dist/plugin-sdk/src/cron/service/timer.d.ts +45 -0
  2590. package/dist/plugin-sdk/src/cron/service.d.ts +69 -0
  2591. package/dist/plugin-sdk/src/cron/session-reaper.d.ts +35 -0
  2592. package/dist/plugin-sdk/src/cron/stagger.d.ts +8 -0
  2593. package/dist/plugin-sdk/src/cron/store-migration.d.ts +9 -0
  2594. package/dist/plugin-sdk/src/cron/store.d.ts +10 -0
  2595. package/dist/plugin-sdk/src/cron/types-shared.d.ts +17 -0
  2596. package/dist/plugin-sdk/src/cron/types.d.ts +142 -0
  2597. package/dist/plugin-sdk/src/cron/webhook-url.d.ts +1 -0
  2598. package/dist/plugin-sdk/src/daemon/arg-split.d.ts +4 -0
  2599. package/dist/plugin-sdk/src/daemon/cmd-argv.d.ts +3 -0
  2600. package/dist/plugin-sdk/src/daemon/cmd-set.d.ts +7 -0
  2601. package/dist/plugin-sdk/src/daemon/constants.d.ts +35 -0
  2602. package/dist/plugin-sdk/src/daemon/runtime-binary.d.ts +2 -0
  2603. package/dist/plugin-sdk/src/gateway/auth-mode-policy.d.ts +4 -0
  2604. package/dist/plugin-sdk/src/gateway/auth-rate-limit.d.ts +67 -0
  2605. package/dist/plugin-sdk/src/gateway/auth.d.ts +62 -0
  2606. package/dist/plugin-sdk/src/gateway/call.d.ts +88 -0
  2607. package/dist/plugin-sdk/src/gateway/channel-status-patches.d.ts +6 -0
  2608. package/dist/plugin-sdk/src/gateway/chat-abort.d.ts +46 -0
  2609. package/dist/plugin-sdk/src/gateway/chat-sanitize.d.ts +4 -0
  2610. package/dist/plugin-sdk/src/gateway/client.d.ts +83 -0
  2611. package/dist/plugin-sdk/src/gateway/connection-auth.d.ts +28 -0
  2612. package/dist/plugin-sdk/src/gateway/credential-planner.d.ts +53 -0
  2613. package/dist/plugin-sdk/src/gateway/credentials.d.ts +52 -0
  2614. package/dist/plugin-sdk/src/gateway/device-auth.d.ts +18 -0
  2615. package/dist/plugin-sdk/src/gateway/device-metadata-normalization.d.ts +2 -0
  2616. package/dist/plugin-sdk/src/gateway/exec-approval-manager.d.ts +47 -0
  2617. package/dist/plugin-sdk/src/gateway/method-scopes.d.ts +22 -0
  2618. package/dist/plugin-sdk/src/gateway/model-pricing-cache.d.ts +32 -0
  2619. package/dist/plugin-sdk/src/gateway/net.d.ts +88 -0
  2620. package/dist/plugin-sdk/src/gateway/node-registry.d.ts +60 -0
  2621. package/dist/plugin-sdk/src/gateway/operator-approvals-client.d.ts +6 -0
  2622. package/dist/plugin-sdk/src/gateway/protocol/client-info.d.ts +58 -0
  2623. package/dist/plugin-sdk/src/gateway/protocol/connect-error-details.d.ts +38 -0
  2624. package/dist/plugin-sdk/src/gateway/protocol/index.d.ts +874 -0
  2625. package/dist/plugin-sdk/src/gateway/protocol/schema/agent.d.ts +119 -0
  2626. package/dist/plugin-sdk/src/gateway/protocol/schema/agents-models-skills.d.ts +206 -0
  2627. package/dist/plugin-sdk/src/gateway/protocol/schema/channels.d.ts +229 -0
  2628. package/dist/plugin-sdk/src/gateway/protocol/schema/config.d.ts +110 -0
  2629. package/dist/plugin-sdk/src/gateway/protocol/schema/cron.d.ts +455 -0
  2630. package/dist/plugin-sdk/src/gateway/protocol/schema/devices.d.ts +42 -0
  2631. package/dist/plugin-sdk/src/gateway/protocol/schema/error-codes.d.ts +14 -0
  2632. package/dist/plugin-sdk/src/gateway/protocol/schema/exec-approvals.d.ts +184 -0
  2633. package/dist/plugin-sdk/src/gateway/protocol/schema/frames.d.ts +169 -0
  2634. package/dist/plugin-sdk/src/gateway/protocol/schema/logs-chat.d.ts +53 -0
  2635. package/dist/plugin-sdk/src/gateway/protocol/schema/nodes.d.ts +111 -0
  2636. package/dist/plugin-sdk/src/gateway/protocol/schema/primitives.d.ts +40 -0
  2637. package/dist/plugin-sdk/src/gateway/protocol/schema/protocol-schemas.d.ts +1601 -0
  2638. package/dist/plugin-sdk/src/gateway/protocol/schema/push.d.ts +16 -0
  2639. package/dist/plugin-sdk/src/gateway/protocol/schema/secrets.d.ts +23 -0
  2640. package/dist/plugin-sdk/src/gateway/protocol/schema/sessions.d.ts +112 -0
  2641. package/dist/plugin-sdk/src/gateway/protocol/schema/snapshot.d.ts +69 -0
  2642. package/dist/plugin-sdk/src/gateway/protocol/schema/types.d.ts +137 -0
  2643. package/dist/plugin-sdk/src/gateway/protocol/schema/wizard.d.ts +86 -0
  2644. package/dist/plugin-sdk/src/gateway/protocol/schema.d.ts +18 -0
  2645. package/dist/plugin-sdk/src/gateway/resolve-configured-secret-input-string.d.ts +33 -0
  2646. package/dist/plugin-sdk/src/gateway/security-path.d.ts +20 -0
  2647. package/dist/plugin-sdk/src/gateway/server/ws-types.d.ts +12 -0
  2648. package/dist/plugin-sdk/src/gateway/server-broadcast.d.ts +17 -0
  2649. package/dist/plugin-sdk/src/gateway/server-channels.d.ts +66 -0
  2650. package/dist/plugin-sdk/src/gateway/server-constants.d.ts +11 -0
  2651. package/dist/plugin-sdk/src/gateway/server-methods/types.d.ts +102 -0
  2652. package/dist/plugin-sdk/src/gateway/server-shared.d.ts +7 -0
  2653. package/dist/plugin-sdk/src/gateway/session-archive.fs.d.ts +20 -0
  2654. package/dist/plugin-sdk/src/gateway/session-utils.d.ts +108 -0
  2655. package/dist/plugin-sdk/src/gateway/session-utils.fs.d.ts +33 -0
  2656. package/dist/plugin-sdk/src/gateway/session-utils.types.d.ts +76 -0
  2657. package/dist/plugin-sdk/src/gateway/startup-auth.d.ts +20 -0
  2658. package/dist/plugin-sdk/src/gateway/ws-log.d.ts +5 -0
  2659. package/dist/plugin-sdk/src/gateway/ws-logging.d.ts +4 -0
  2660. package/dist/plugin-sdk/src/globals.d.ts +11 -0
  2661. package/dist/plugin-sdk/src/hooks/fire-and-forget.d.ts +1 -0
  2662. package/dist/plugin-sdk/src/hooks/internal-hooks.d.ts +216 -0
  2663. package/dist/plugin-sdk/src/hooks/message-hook-mappers.d.ts +76 -0
  2664. package/dist/plugin-sdk/src/hooks/types.d.ts +62 -0
  2665. package/dist/plugin-sdk/src/image-generation/provider-registry.d.ts +4 -0
  2666. package/dist/plugin-sdk/src/image-generation/providers/fal.d.ts +2 -0
  2667. package/dist/plugin-sdk/src/image-generation/providers/google.d.ts +2 -0
  2668. package/dist/plugin-sdk/src/image-generation/providers/openai.d.ts +2 -0
  2669. package/dist/plugin-sdk/src/image-generation/runtime.d.ts +27 -0
  2670. package/dist/plugin-sdk/src/image-generation/types.d.ts +64 -0
  2671. package/dist/plugin-sdk/src/infra/abort-signal.d.ts +1 -0
  2672. package/dist/plugin-sdk/src/infra/agent-events.d.ts +24 -0
  2673. package/dist/plugin-sdk/src/infra/archive-path.d.ts +12 -0
  2674. package/dist/plugin-sdk/src/infra/archive-staging.d.ts +24 -0
  2675. package/dist/plugin-sdk/src/infra/archive.d.ts +53 -0
  2676. package/dist/plugin-sdk/src/infra/backoff.d.ts +8 -0
  2677. package/dist/plugin-sdk/src/infra/backup-create.d.ts +29 -0
  2678. package/dist/plugin-sdk/src/infra/binaries.d.ts +3 -0
  2679. package/dist/plugin-sdk/src/infra/boundary-file-read.d.ts +34 -0
  2680. package/dist/plugin-sdk/src/infra/boundary-path.d.ts +38 -0
  2681. package/dist/plugin-sdk/src/infra/brew.d.ts +8 -0
  2682. package/dist/plugin-sdk/src/infra/channel-activity.d.ts +18 -0
  2683. package/dist/plugin-sdk/src/infra/channel-summary.d.ts +7 -0
  2684. package/dist/plugin-sdk/src/infra/cli-root-options.d.ts +3 -0
  2685. package/dist/plugin-sdk/src/infra/dedupe.d.ts +13 -0
  2686. package/dist/plugin-sdk/src/infra/device-auth-store.d.ts +18 -0
  2687. package/dist/plugin-sdk/src/infra/device-bootstrap.d.ts +41 -0
  2688. package/dist/plugin-sdk/src/infra/device-identity.d.ts +11 -0
  2689. package/dist/plugin-sdk/src/infra/device-pairing.d.ts +126 -0
  2690. package/dist/plugin-sdk/src/infra/diagnostic-events.d.ts +140 -0
  2691. package/dist/plugin-sdk/src/infra/diagnostic-flags.d.ts +4 -0
  2692. package/dist/plugin-sdk/src/infra/dotenv.d.ts +3 -0
  2693. package/dist/plugin-sdk/src/infra/env.d.ts +11 -0
  2694. package/dist/plugin-sdk/src/infra/errors.d.ts +13 -0
  2695. package/dist/plugin-sdk/src/infra/exec-allowlist-pattern.d.ts +1 -0
  2696. package/dist/plugin-sdk/src/infra/exec-approval-command-display.d.ts +6 -0
  2697. package/dist/plugin-sdk/src/infra/exec-approval-reply.d.ts +31 -0
  2698. package/dist/plugin-sdk/src/infra/exec-approval-session-target.d.ts +16 -0
  2699. package/dist/plugin-sdk/src/infra/exec-approval-surface.d.ts +20 -0
  2700. package/dist/plugin-sdk/src/infra/exec-approvals-allowlist.d.ts +64 -0
  2701. package/dist/plugin-sdk/src/infra/exec-approvals-analysis.d.ts +79 -0
  2702. package/dist/plugin-sdk/src/infra/exec-approvals.d.ts +147 -0
  2703. package/dist/plugin-sdk/src/infra/exec-command-resolution.d.ts +46 -0
  2704. package/dist/plugin-sdk/src/infra/exec-obfuscation-detect.d.ts +12 -0
  2705. package/dist/plugin-sdk/src/infra/exec-safe-bin-policy-profiles.d.ts +24 -0
  2706. package/dist/plugin-sdk/src/infra/exec-safe-bin-policy-validator.d.ts +2 -0
  2707. package/dist/plugin-sdk/src/infra/exec-safe-bin-policy.d.ts +2 -0
  2708. package/dist/plugin-sdk/src/infra/exec-safe-bin-runtime-policy.d.ts +25 -0
  2709. package/dist/plugin-sdk/src/infra/exec-safe-bin-trust.d.ts +23 -0
  2710. package/dist/plugin-sdk/src/infra/exec-safety.d.ts +1 -0
  2711. package/dist/plugin-sdk/src/infra/exec-wrapper-resolution.d.ts +48 -0
  2712. package/dist/plugin-sdk/src/infra/executable-path.d.ts +6 -0
  2713. package/dist/plugin-sdk/src/infra/fetch.d.ts +2 -0
  2714. package/dist/plugin-sdk/src/infra/file-identity.d.ts +5 -0
  2715. package/dist/plugin-sdk/src/infra/file-lock.d.ts +2 -0
  2716. package/dist/plugin-sdk/src/infra/format-time/format-datetime.d.ts +35 -0
  2717. package/dist/plugin-sdk/src/infra/format-time/format-duration.d.ts +23 -0
  2718. package/dist/plugin-sdk/src/infra/format-time/format-relative.d.ts +39 -0
  2719. package/dist/plugin-sdk/src/infra/fs-pinned-write-helper.d.ts +18 -0
  2720. package/dist/plugin-sdk/src/infra/fs-safe.d.ts +87 -0
  2721. package/dist/plugin-sdk/src/infra/gemini-auth.d.ts +16 -0
  2722. package/dist/plugin-sdk/src/infra/git-commit.d.ts +14 -0
  2723. package/dist/plugin-sdk/src/infra/git-root.d.ts +7 -0
  2724. package/dist/plugin-sdk/src/infra/hardlink-guards.d.ts +6 -0
  2725. package/dist/plugin-sdk/src/infra/heartbeat-events.d.ts +22 -0
  2726. package/dist/plugin-sdk/src/infra/heartbeat-reason.d.ts +5 -0
  2727. package/dist/plugin-sdk/src/infra/heartbeat-summary.d.ts +16 -0
  2728. package/dist/plugin-sdk/src/infra/heartbeat-visibility.d.ts +17 -0
  2729. package/dist/plugin-sdk/src/infra/heartbeat-wake.d.ts +33 -0
  2730. package/dist/plugin-sdk/src/infra/home-dir.d.ts +17 -0
  2731. package/dist/plugin-sdk/src/infra/host-env-security.d.ts +40 -0
  2732. package/dist/plugin-sdk/src/infra/http-body.d.ts +46 -0
  2733. package/dist/plugin-sdk/src/infra/json-file.d.ts +2 -0
  2734. package/dist/plugin-sdk/src/infra/json-files.d.ts +12 -0
  2735. package/dist/plugin-sdk/src/infra/json-utf8-bytes.d.ts +1 -0
  2736. package/dist/plugin-sdk/src/infra/jsonl-socket.d.ts +6 -0
  2737. package/dist/plugin-sdk/src/infra/machine-name.d.ts +1 -0
  2738. package/dist/plugin-sdk/src/infra/map-size.d.ts +1 -0
  2739. package/dist/plugin-sdk/src/infra/matrix-legacy-crypto.d.ts +41 -0
  2740. package/dist/plugin-sdk/src/infra/matrix-legacy-state.d.ts +30 -0
  2741. package/dist/plugin-sdk/src/infra/matrix-migration-config.d.ts +48 -0
  2742. package/dist/plugin-sdk/src/infra/matrix-migration-snapshot.d.ts +25 -0
  2743. package/dist/plugin-sdk/src/infra/matrix-plugin-helper.d.ts +29 -0
  2744. package/dist/plugin-sdk/src/infra/net/fetch-guard.d.ts +37 -0
  2745. package/dist/plugin-sdk/src/infra/net/hostname.d.ts +1 -0
  2746. package/dist/plugin-sdk/src/infra/net/proxy-env.d.ts +10 -0
  2747. package/dist/plugin-sdk/src/infra/net/proxy-fetch.d.ts +15 -0
  2748. package/dist/plugin-sdk/src/infra/net/ssrf.d.ts +55 -0
  2749. package/dist/plugin-sdk/src/infra/net/undici-global-dispatcher.d.ts +6 -0
  2750. package/dist/plugin-sdk/src/infra/node-pairing.d.ts +53 -0
  2751. package/dist/plugin-sdk/src/infra/node-shell.d.ts +1 -0
  2752. package/dist/plugin-sdk/src/infra/npm-registry-spec.d.ts +19 -0
  2753. package/dist/plugin-sdk/src/infra/openclaw-exec-env.d.ts +4 -0
  2754. package/dist/plugin-sdk/src/infra/openclaw-root.d.ts +10 -0
  2755. package/dist/plugin-sdk/src/infra/outbound/abort.d.ts +8 -0
  2756. package/dist/plugin-sdk/src/infra/outbound/agent-delivery.d.ts +46 -0
  2757. package/dist/plugin-sdk/src/infra/outbound/base-session-key.d.ts +9 -0
  2758. package/dist/plugin-sdk/src/infra/outbound/bound-delivery-router.d.ts +16 -0
  2759. package/dist/plugin-sdk/src/infra/outbound/channel-adapters.d.ts +14 -0
  2760. package/dist/plugin-sdk/src/infra/outbound/channel-resolution.d.ts +8 -0
  2761. package/dist/plugin-sdk/src/infra/outbound/channel-selection.d.ts +17 -0
  2762. package/dist/plugin-sdk/src/infra/outbound/channel-target.d.ts +6 -0
  2763. package/dist/plugin-sdk/src/infra/outbound/conversation-id.d.ts +4 -0
  2764. package/dist/plugin-sdk/src/infra/outbound/deliver-runtime.d.ts +1 -0
  2765. package/dist/plugin-sdk/src/infra/outbound/deliver.d.ts +49 -0
  2766. package/dist/plugin-sdk/src/infra/outbound/delivery-queue.d.ts +89 -0
  2767. package/dist/plugin-sdk/src/infra/outbound/directory-cache.d.ts +24 -0
  2768. package/dist/plugin-sdk/src/infra/outbound/envelope.d.ts +16 -0
  2769. package/dist/plugin-sdk/src/infra/outbound/format.d.ts +39 -0
  2770. package/dist/plugin-sdk/src/infra/outbound/identity.d.ts +9 -0
  2771. package/dist/plugin-sdk/src/infra/outbound/message-action-normalization.d.ts +6 -0
  2772. package/dist/plugin-sdk/src/infra/outbound/message-action-params.d.ts +36 -0
  2773. package/dist/plugin-sdk/src/infra/outbound/message-action-runner.d.ts +76 -0
  2774. package/dist/plugin-sdk/src/infra/outbound/message-action-spec.d.ts +7 -0
  2775. package/dist/plugin-sdk/src/infra/outbound/message.d.ts +84 -0
  2776. package/dist/plugin-sdk/src/infra/outbound/mirror.d.ts +13 -0
  2777. package/dist/plugin-sdk/src/infra/outbound/outbound-policy.d.ts +32 -0
  2778. package/dist/plugin-sdk/src/infra/outbound/outbound-send-service.d.ts +65 -0
  2779. package/dist/plugin-sdk/src/infra/outbound/outbound-session.d.ts +31 -0
  2780. package/dist/plugin-sdk/src/infra/outbound/payloads.d.ts +23 -0
  2781. package/dist/plugin-sdk/src/infra/outbound/sanitize-text.d.ts +23 -0
  2782. package/dist/plugin-sdk/src/infra/outbound/send-deps.d.ts +30 -0
  2783. package/dist/plugin-sdk/src/infra/outbound/session-binding-service.d.ts +90 -0
  2784. package/dist/plugin-sdk/src/infra/outbound/session-context.d.ts +12 -0
  2785. package/dist/plugin-sdk/src/infra/outbound/target-errors.d.ts +6 -0
  2786. package/dist/plugin-sdk/src/infra/outbound/target-normalization.d.ts +4 -0
  2787. package/dist/plugin-sdk/src/infra/outbound/target-resolver.d.ts +60 -0
  2788. package/dist/plugin-sdk/src/infra/outbound/targets.d.ts +87 -0
  2789. package/dist/plugin-sdk/src/infra/outbound/thread-id.d.ts +1 -0
  2790. package/dist/plugin-sdk/src/infra/outbound/tool-payload.d.ts +2 -0
  2791. package/dist/plugin-sdk/src/infra/pairing-files.d.ts +23 -0
  2792. package/dist/plugin-sdk/src/infra/pairing-pending.d.ts +13 -0
  2793. package/dist/plugin-sdk/src/infra/pairing-token.d.ts +3 -0
  2794. package/dist/plugin-sdk/src/infra/parse-finite-number.d.ts +4 -0
  2795. package/dist/plugin-sdk/src/infra/path-alias-guards.d.ts +18 -0
  2796. package/dist/plugin-sdk/src/infra/path-guards.d.ts +6 -0
  2797. package/dist/plugin-sdk/src/infra/path-prepend.d.ts +11 -0
  2798. package/dist/plugin-sdk/src/infra/path-safety.d.ts +2 -0
  2799. package/dist/plugin-sdk/src/infra/plain-object.d.ts +4 -0
  2800. package/dist/plugin-sdk/src/infra/ports-format.d.ts +5 -0
  2801. package/dist/plugin-sdk/src/infra/ports-inspect.d.ts +2 -0
  2802. package/dist/plugin-sdk/src/infra/ports-lsof.d.ts +2 -0
  2803. package/dist/plugin-sdk/src/infra/ports-probe.d.ts +5 -0
  2804. package/dist/plugin-sdk/src/infra/ports-types.d.ts +18 -0
  2805. package/dist/plugin-sdk/src/infra/ports.d.ts +14 -0
  2806. package/dist/plugin-sdk/src/infra/prototype-keys.d.ts +1 -0
  2807. package/dist/plugin-sdk/src/infra/provider-usage.auth.d.ts +14 -0
  2808. package/dist/plugin-sdk/src/infra/provider-usage.d.ts +4 -0
  2809. package/dist/plugin-sdk/src/infra/provider-usage.fetch.claude.d.ts +2 -0
  2810. package/dist/plugin-sdk/src/infra/provider-usage.fetch.codex.d.ts +2 -0
  2811. package/dist/plugin-sdk/src/infra/provider-usage.fetch.d.ts +5 -0
  2812. package/dist/plugin-sdk/src/infra/provider-usage.fetch.gemini.d.ts +2 -0
  2813. package/dist/plugin-sdk/src/infra/provider-usage.fetch.minimax.d.ts +2 -0
  2814. package/dist/plugin-sdk/src/infra/provider-usage.fetch.shared.d.ts +12 -0
  2815. package/dist/plugin-sdk/src/infra/provider-usage.fetch.zai.d.ts +2 -0
  2816. package/dist/plugin-sdk/src/infra/provider-usage.format.d.ts +13 -0
  2817. package/dist/plugin-sdk/src/infra/provider-usage.load.d.ts +16 -0
  2818. package/dist/plugin-sdk/src/infra/provider-usage.shared.d.ts +9 -0
  2819. package/dist/plugin-sdk/src/infra/provider-usage.types.d.ts +17 -0
  2820. package/dist/plugin-sdk/src/infra/restart-sentinel.d.ts +50 -0
  2821. package/dist/plugin-sdk/src/infra/restart-stale-pids.d.ts +22 -0
  2822. package/dist/plugin-sdk/src/infra/restart.d.ts +72 -0
  2823. package/dist/plugin-sdk/src/infra/retry-policy.d.ts +30 -0
  2824. package/dist/plugin-sdk/src/infra/retry.d.ts +21 -0
  2825. package/dist/plugin-sdk/src/infra/safe-open-sync.d.ts +25 -0
  2826. package/dist/plugin-sdk/src/infra/scp-host.d.ts +4 -0
  2827. package/dist/plugin-sdk/src/infra/secret-file.d.ts +18 -0
  2828. package/dist/plugin-sdk/src/infra/secure-random.d.ts +2 -0
  2829. package/dist/plugin-sdk/src/infra/session-cost-usage.d.ts +45 -0
  2830. package/dist/plugin-sdk/src/infra/session-cost-usage.types.d.ts +141 -0
  2831. package/dist/plugin-sdk/src/infra/session-maintenance-warning.d.ts +11 -0
  2832. package/dist/plugin-sdk/src/infra/shell-env.d.ts +34 -0
  2833. package/dist/plugin-sdk/src/infra/shell-inline-command.d.ts +8 -0
  2834. package/dist/plugin-sdk/src/infra/skills-remote.d.ts +25 -0
  2835. package/dist/plugin-sdk/src/infra/ssh-tunnel.d.ts +21 -0
  2836. package/dist/plugin-sdk/src/infra/system-events.d.ts +18 -0
  2837. package/dist/plugin-sdk/src/infra/system-message.d.ts +3 -0
  2838. package/dist/plugin-sdk/src/infra/system-run-approval-binding.d.ts +49 -0
  2839. package/dist/plugin-sdk/src/infra/system-run-approval-context.d.ts +45 -0
  2840. package/dist/plugin-sdk/src/infra/system-run-command.d.ts +36 -0
  2841. package/dist/plugin-sdk/src/infra/system-run-normalize.d.ts +2 -0
  2842. package/dist/plugin-sdk/src/infra/tailnet.d.ts +8 -0
  2843. package/dist/plugin-sdk/src/infra/tailscale.d.ts +34 -0
  2844. package/dist/plugin-sdk/src/infra/tls/fingerprint.d.ts +1 -0
  2845. package/dist/plugin-sdk/src/infra/tls/gateway.d.ts +16 -0
  2846. package/dist/plugin-sdk/src/infra/tmp-openclaw-dir.d.ts +20 -0
  2847. package/dist/plugin-sdk/src/infra/transport-ready.d.ts +16 -0
  2848. package/dist/plugin-sdk/src/infra/unhandled-rejections.d.ts +15 -0
  2849. package/dist/plugin-sdk/src/infra/warning-filter.d.ts +7 -0
  2850. package/dist/plugin-sdk/src/infra/windows-task-restart.d.ts +2 -0
  2851. package/dist/plugin-sdk/src/infra/ws.d.ts +2 -0
  2852. package/dist/plugin-sdk/src/infra/wsl.d.ts +12 -0
  2853. package/dist/plugin-sdk/src/interactive/payload.d.ts +53 -0
  2854. package/dist/plugin-sdk/src/line/accounts.d.ts +10 -0
  2855. package/dist/plugin-sdk/src/line/actions.d.ts +22 -0
  2856. package/dist/plugin-sdk/src/line/auto-reply-delivery.d.ts +38 -0
  2857. package/dist/plugin-sdk/src/line/bot-access.d.ts +17 -0
  2858. package/dist/plugin-sdk/src/line/bot-handlers.d.ts +23 -0
  2859. package/dist/plugin-sdk/src/line/bot-message-context.d.ts +129 -0
  2860. package/dist/plugin-sdk/src/line/bot.d.ts +24 -0
  2861. package/dist/plugin-sdk/src/line/channel-access-token.d.ts +4 -0
  2862. package/dist/plugin-sdk/src/line/config-schema.d.ts +65 -0
  2863. package/dist/plugin-sdk/src/line/download.d.ts +7 -0
  2864. package/dist/plugin-sdk/src/line/flex-templates/basic-cards.d.ts +46 -0
  2865. package/dist/plugin-sdk/src/line/flex-templates/common.d.ts +2 -0
  2866. package/dist/plugin-sdk/src/line/flex-templates/media-control-cards.d.ts +73 -0
  2867. package/dist/plugin-sdk/src/line/flex-templates/message.d.ts +6 -0
  2868. package/dist/plugin-sdk/src/line/flex-templates/schedule-cards.d.ts +55 -0
  2869. package/dist/plugin-sdk/src/line/flex-templates/types.d.ts +19 -0
  2870. package/dist/plugin-sdk/src/line/flex-templates.d.ts +5 -0
  2871. package/dist/plugin-sdk/src/line/group-keys.d.ts +17 -0
  2872. package/dist/plugin-sdk/src/line/markdown-to-line.d.ts +72 -0
  2873. package/dist/plugin-sdk/src/line/monitor.d.ts +28 -0
  2874. package/dist/plugin-sdk/src/line/probe.d.ts +2 -0
  2875. package/dist/plugin-sdk/src/line/reply-chunks.d.ts +24 -0
  2876. package/dist/plugin-sdk/src/line/send.d.ts +93 -0
  2877. package/dist/plugin-sdk/src/line/signature.d.ts +1 -0
  2878. package/dist/plugin-sdk/src/line/template-messages.d.ts +100 -0
  2879. package/dist/plugin-sdk/src/line/types.d.ts +115 -0
  2880. package/dist/plugin-sdk/src/line/webhook-node.d.ts +15 -0
  2881. package/dist/plugin-sdk/src/line/webhook-utils.d.ts +2 -0
  2882. package/dist/plugin-sdk/src/line/webhook.d.ts +19 -0
  2883. package/dist/plugin-sdk/src/link-understanding/apply.d.ts +10 -0
  2884. package/dist/plugin-sdk/src/link-understanding/apply.runtime.d.ts +1 -0
  2885. package/dist/plugin-sdk/src/link-understanding/defaults.d.ts +2 -0
  2886. package/dist/plugin-sdk/src/link-understanding/detect.d.ts +3 -0
  2887. package/dist/plugin-sdk/src/link-understanding/format.d.ts +4 -0
  2888. package/dist/plugin-sdk/src/link-understanding/runner.d.ts +11 -0
  2889. package/dist/plugin-sdk/src/logger.d.ts +6 -0
  2890. package/dist/plugin-sdk/src/logging/config.d.ts +4 -0
  2891. package/dist/plugin-sdk/src/logging/console.d.ts +23 -0
  2892. package/dist/plugin-sdk/src/logging/diagnostic-session-state.d.ts +30 -0
  2893. package/dist/plugin-sdk/src/logging/diagnostic.d.ts +67 -0
  2894. package/dist/plugin-sdk/src/logging/env-log-level.d.ts +2 -0
  2895. package/dist/plugin-sdk/src/logging/levels.d.ts +5 -0
  2896. package/dist/plugin-sdk/src/logging/logger.d.ts +48 -0
  2897. package/dist/plugin-sdk/src/logging/node-require.d.ts +1 -0
  2898. package/dist/plugin-sdk/src/logging/redact-bounded.d.ts +8 -0
  2899. package/dist/plugin-sdk/src/logging/redact-identifier.d.ts +4 -0
  2900. package/dist/plugin-sdk/src/logging/redact.d.ts +9 -0
  2901. package/dist/plugin-sdk/src/logging/state.d.ts +19 -0
  2902. package/dist/plugin-sdk/src/logging/subsystem.d.ts +18 -0
  2903. package/dist/plugin-sdk/src/logging/timestamps.d.ts +2 -0
  2904. package/dist/plugin-sdk/src/logging.d.ts +10 -0
  2905. package/dist/plugin-sdk/src/markdown/code-spans.d.ts +10 -0
  2906. package/dist/plugin-sdk/src/markdown/fences.d.ts +10 -0
  2907. package/dist/plugin-sdk/src/markdown/frontmatter.d.ts +2 -0
  2908. package/dist/plugin-sdk/src/markdown/ir.d.ts +32 -0
  2909. package/dist/plugin-sdk/src/markdown/render.d.ts +18 -0
  2910. package/dist/plugin-sdk/src/markdown/tables.d.ts +2 -0
  2911. package/dist/plugin-sdk/src/markdown/whatsapp.d.ts +14 -0
  2912. package/dist/plugin-sdk/src/media/audio-tags.d.ts +10 -0
  2913. package/dist/plugin-sdk/src/media/audio.d.ts +19 -0
  2914. package/dist/plugin-sdk/src/media/base64.d.ts +6 -0
  2915. package/dist/plugin-sdk/src/media/constants.d.ts +7 -0
  2916. package/dist/plugin-sdk/src/media/fetch.d.ts +34 -0
  2917. package/dist/plugin-sdk/src/media/ffmpeg-exec.d.ts +11 -0
  2918. package/dist/plugin-sdk/src/media/ffmpeg-limits.d.ts +4 -0
  2919. package/dist/plugin-sdk/src/media/file-context.d.ts +7 -0
  2920. package/dist/plugin-sdk/src/media/image-ops.d.ts +41 -0
  2921. package/dist/plugin-sdk/src/media/inbound-path-policy.d.ts +18 -0
  2922. package/dist/plugin-sdk/src/media/input-files.d.ts +99 -0
  2923. package/dist/plugin-sdk/src/media/load-options.d.ts +12 -0
  2924. package/dist/plugin-sdk/src/media/local-roots.d.ts +3 -0
  2925. package/dist/plugin-sdk/src/media/mime.d.ts +16 -0
  2926. package/dist/plugin-sdk/src/media/outbound-attachment.d.ts +6 -0
  2927. package/dist/plugin-sdk/src/media/parse.d.ts +8 -0
  2928. package/dist/plugin-sdk/src/media/pdf-extract.d.ts +17 -0
  2929. package/dist/plugin-sdk/src/media/png-encode.d.ts +8 -0
  2930. package/dist/plugin-sdk/src/media/read-response-with-limit.d.ts +8 -0
  2931. package/dist/plugin-sdk/src/media/sniff-mime-from-base64.d.ts +1 -0
  2932. package/dist/plugin-sdk/src/media/store.d.ts +37 -0
  2933. package/dist/plugin-sdk/src/media/temp-files.d.ts +1 -0
  2934. package/dist/plugin-sdk/src/media/web-media.d.ts +43 -0
  2935. package/dist/plugin-sdk/src/media-understanding/apply.d.ts +19 -0
  2936. package/dist/plugin-sdk/src/media-understanding/apply.runtime.d.ts +1 -0
  2937. package/dist/plugin-sdk/src/media-understanding/attachments.cache.d.ts +37 -0
  2938. package/dist/plugin-sdk/src/media-understanding/attachments.d.ts +3 -0
  2939. package/dist/plugin-sdk/src/media-understanding/attachments.normalize.d.ts +8 -0
  2940. package/dist/plugin-sdk/src/media-understanding/attachments.select.d.ts +7 -0
  2941. package/dist/plugin-sdk/src/media-understanding/audio-preflight.d.ts +16 -0
  2942. package/dist/plugin-sdk/src/media-understanding/audio-transcription-runner.d.ts +16 -0
  2943. package/dist/plugin-sdk/src/media-understanding/concurrency.d.ts +1 -0
  2944. package/dist/plugin-sdk/src/media-understanding/defaults.d.ts +20 -0
  2945. package/dist/plugin-sdk/src/media-understanding/echo-transcript.d.ts +13 -0
  2946. package/dist/plugin-sdk/src/media-understanding/errors.d.ts +6 -0
  2947. package/dist/plugin-sdk/src/media-understanding/format.d.ts +7 -0
  2948. package/dist/plugin-sdk/src/media-understanding/fs.d.ts +1 -0
  2949. package/dist/plugin-sdk/src/media-understanding/output-extract.d.ts +2 -0
  2950. package/dist/plugin-sdk/src/media-understanding/providers/deepgram/audio.d.ts +4 -0
  2951. package/dist/plugin-sdk/src/media-understanding/providers/deepgram/index.d.ts +2 -0
  2952. package/dist/plugin-sdk/src/media-understanding/providers/groq/index.d.ts +2 -0
  2953. package/dist/plugin-sdk/src/media-understanding/providers/image-runtime.d.ts +2 -0
  2954. package/dist/plugin-sdk/src/media-understanding/providers/image.d.ts +3 -0
  2955. package/dist/plugin-sdk/src/media-understanding/providers/index.d.ts +5 -0
  2956. package/dist/plugin-sdk/src/media-understanding/providers/openai-compatible-audio.d.ts +7 -0
  2957. package/dist/plugin-sdk/src/media-understanding/providers/shared.d.ts +28 -0
  2958. package/dist/plugin-sdk/src/media-understanding/resolve.d.ts +44 -0
  2959. package/dist/plugin-sdk/src/media-understanding/runner.d.ts +39 -0
  2960. package/dist/plugin-sdk/src/media-understanding/runner.entries.d.ts +33 -0
  2961. package/dist/plugin-sdk/src/media-understanding/runtime.d.ts +52 -0
  2962. package/dist/plugin-sdk/src/media-understanding/scope.d.ts +9 -0
  2963. package/dist/plugin-sdk/src/media-understanding/transcribe-audio.d.ts +1 -0
  2964. package/dist/plugin-sdk/src/media-understanding/types.d.ts +115 -0
  2965. package/dist/plugin-sdk/src/media-understanding/video.d.ts +2 -0
  2966. package/dist/plugin-sdk/src/memory/backend-config.d.ts +55 -0
  2967. package/dist/plugin-sdk/src/memory/batch-embedding-common.d.ts +9 -0
  2968. package/dist/plugin-sdk/src/memory/batch-error-utils.d.ts +15 -0
  2969. package/dist/plugin-sdk/src/memory/batch-gemini.d.ts +46 -0
  2970. package/dist/plugin-sdk/src/memory/batch-http.d.ts +8 -0
  2971. package/dist/plugin-sdk/src/memory/batch-openai.d.ts +19 -0
  2972. package/dist/plugin-sdk/src/memory/batch-output.d.ts +23 -0
  2973. package/dist/plugin-sdk/src/memory/batch-provider-common.d.ts +9 -0
  2974. package/dist/plugin-sdk/src/memory/batch-runner.d.ts +38 -0
  2975. package/dist/plugin-sdk/src/memory/batch-status.d.ts +27 -0
  2976. package/dist/plugin-sdk/src/memory/batch-upload.d.ts +6 -0
  2977. package/dist/plugin-sdk/src/memory/batch-utils.d.ts +11 -0
  2978. package/dist/plugin-sdk/src/memory/batch-voyage.d.ts +20 -0
  2979. package/dist/plugin-sdk/src/memory/embedding-chunk-limits.d.ts +3 -0
  2980. package/dist/plugin-sdk/src/memory/embedding-input-limits.d.ts +4 -0
  2981. package/dist/plugin-sdk/src/memory/embedding-inputs.d.ts +17 -0
  2982. package/dist/plugin-sdk/src/memory/embedding-model-limits.d.ts +2 -0
  2983. package/dist/plugin-sdk/src/memory/embedding-vectors.d.ts +1 -0
  2984. package/dist/plugin-sdk/src/memory/embeddings-debug.d.ts +1 -0
  2985. package/dist/plugin-sdk/src/memory/embeddings-gemini.d.ts +63 -0
  2986. package/dist/plugin-sdk/src/memory/embeddings-mistral.d.ts +15 -0
  2987. package/dist/plugin-sdk/src/memory/embeddings-model-normalize.d.ts +5 -0
  2988. package/dist/plugin-sdk/src/memory/embeddings-ollama.d.ts +14 -0
  2989. package/dist/plugin-sdk/src/memory/embeddings-openai.d.ts +15 -0
  2990. package/dist/plugin-sdk/src/memory/embeddings-remote-client.d.ts +12 -0
  2991. package/dist/plugin-sdk/src/memory/embeddings-remote-fetch.d.ts +8 -0
  2992. package/dist/plugin-sdk/src/memory/embeddings-remote-provider.d.ts +21 -0
  2993. package/dist/plugin-sdk/src/memory/embeddings-voyage.d.ts +15 -0
  2994. package/dist/plugin-sdk/src/memory/embeddings.d.ts +58 -0
  2995. package/dist/plugin-sdk/src/memory/fs-utils.d.ts +11 -0
  2996. package/dist/plugin-sdk/src/memory/hybrid.d.ts +45 -0
  2997. package/dist/plugin-sdk/src/memory/index.d.ts +3 -0
  2998. package/dist/plugin-sdk/src/memory/internal.d.ts +51 -0
  2999. package/dist/plugin-sdk/src/memory/manager-embedding-ops.d.ts +49 -0
  3000. package/dist/plugin-sdk/src/memory/manager-runtime.d.ts +1 -0
  3001. package/dist/plugin-sdk/src/memory/manager-search.d.ts +60 -0
  3002. package/dist/plugin-sdk/src/memory/manager-sync-ops.d.ts +147 -0
  3003. package/dist/plugin-sdk/src/memory/manager.d.ts +122 -0
  3004. package/dist/plugin-sdk/src/memory/memory-schema.d.ts +11 -0
  3005. package/dist/plugin-sdk/src/memory/mmr.d.ts +62 -0
  3006. package/dist/plugin-sdk/src/memory/multimodal.d.ts +36 -0
  3007. package/dist/plugin-sdk/src/memory/node-llama.d.ts +8 -0
  3008. package/dist/plugin-sdk/src/memory/post-json.d.ts +10 -0
  3009. package/dist/plugin-sdk/src/memory/prompt-section.d.ts +22 -0
  3010. package/dist/plugin-sdk/src/memory/qmd-manager.d.ts +149 -0
  3011. package/dist/plugin-sdk/src/memory/qmd-process.d.ts +24 -0
  3012. package/dist/plugin-sdk/src/memory/qmd-query-parser.d.ts +9 -0
  3013. package/dist/plugin-sdk/src/memory/qmd-scope.d.ts +4 -0
  3014. package/dist/plugin-sdk/src/memory/query-expansion.d.ts +41 -0
  3015. package/dist/plugin-sdk/src/memory/read-file.d.ts +21 -0
  3016. package/dist/plugin-sdk/src/memory/remote-http.d.ts +9 -0
  3017. package/dist/plugin-sdk/src/memory/search-manager.d.ts +12 -0
  3018. package/dist/plugin-sdk/src/memory/secret-input.d.ts +5 -0
  3019. package/dist/plugin-sdk/src/memory/session-files.d.ts +14 -0
  3020. package/dist/plugin-sdk/src/memory/sqlite-vec.d.ts +9 -0
  3021. package/dist/plugin-sdk/src/memory/sqlite.d.ts +1 -0
  3022. package/dist/plugin-sdk/src/memory/temporal-decay.d.ts +25 -0
  3023. package/dist/plugin-sdk/src/memory/types.d.ts +95 -0
  3024. package/dist/plugin-sdk/src/node-host/with-timeout.d.ts +1 -0
  3025. package/dist/plugin-sdk/src/pairing/pairing-challenge.d.ts +32 -0
  3026. package/dist/plugin-sdk/src/pairing/pairing-labels.d.ts +2 -0
  3027. package/dist/plugin-sdk/src/pairing/pairing-messages.d.ts +6 -0
  3028. package/dist/plugin-sdk/src/pairing/pairing-store.d.ts +52 -0
  3029. package/dist/plugin-sdk/src/param-key.d.ts +2 -0
  3030. package/dist/plugin-sdk/src/plugin-sdk/account-helpers.d.ts +2 -0
  3031. package/dist/plugin-sdk/src/plugin-sdk/account-id.d.ts +1 -0
  3032. package/dist/plugin-sdk/src/plugin-sdk/account-resolution.d.ts +24 -0
  3033. package/dist/plugin-sdk/src/plugin-sdk/acp-runtime.d.ts +7 -0
  3034. package/dist/plugin-sdk/src/plugin-sdk/acpx.d.ts +8 -0
  3035. package/dist/plugin-sdk/src/plugin-sdk/agent-media-payload.d.ts +13 -0
  3036. package/dist/plugin-sdk/src/plugin-sdk/agent-runtime.d.ts +25 -0
  3037. package/dist/plugin-sdk/src/plugin-sdk/allow-from.d.ts +58 -0
  3038. package/dist/plugin-sdk/src/plugin-sdk/allowlist-config-edit.d.ts +99 -0
  3039. package/dist/plugin-sdk/src/plugin-sdk/bluebubbles.d.ts +43 -0
  3040. package/dist/plugin-sdk/src/plugin-sdk/boolean-param.d.ts +2 -0
  3041. package/dist/plugin-sdk/src/plugin-sdk/channel-actions.d.ts +5 -0
  3042. package/dist/plugin-sdk/src/plugin-sdk/channel-config-helpers.d.ts +147 -0
  3043. package/dist/plugin-sdk/src/plugin-sdk/channel-config-schema.d.ts +4 -0
  3044. package/dist/plugin-sdk/src/plugin-sdk/channel-contract.d.ts +1 -0
  3045. package/dist/plugin-sdk/src/plugin-sdk/channel-feedback.d.ts +3 -0
  3046. package/dist/plugin-sdk/src/plugin-sdk/channel-inbound.d.ts +11 -0
  3047. package/dist/plugin-sdk/src/plugin-sdk/channel-lifecycle.d.ts +41 -0
  3048. package/dist/plugin-sdk/src/plugin-sdk/channel-pairing.d.ts +21 -0
  3049. package/dist/plugin-sdk/src/plugin-sdk/channel-plugin-common.d.ts +12 -0
  3050. package/dist/plugin-sdk/src/plugin-sdk/channel-policy.d.ts +6 -0
  3051. package/dist/plugin-sdk/src/plugin-sdk/channel-reply-pipeline.d.ts +16 -0
  3052. package/dist/plugin-sdk/src/plugin-sdk/channel-runtime.d.ts +11 -0
  3053. package/dist/plugin-sdk/src/plugin-sdk/channel-send-result.d.ts +39 -0
  3054. package/dist/plugin-sdk/src/plugin-sdk/channel-setup.d.ts +18 -0
  3055. package/dist/plugin-sdk/src/plugin-sdk/channel-targets.d.ts +3 -0
  3056. package/dist/plugin-sdk/src/plugin-sdk/cli-runtime.d.ts +4 -0
  3057. package/dist/plugin-sdk/src/plugin-sdk/command-auth.d.ts +62 -0
  3058. package/dist/plugin-sdk/src/plugin-sdk/compat.d.ts +17 -0
  3059. package/dist/plugin-sdk/src/plugin-sdk/config-paths.d.ts +7 -0
  3060. package/dist/plugin-sdk/src/plugin-sdk/config-runtime.d.ts +18 -0
  3061. package/dist/plugin-sdk/src/plugin-sdk/conversation-runtime.d.ts +18 -0
  3062. package/dist/plugin-sdk/src/plugin-sdk/copilot-proxy.d.ts +2 -0
  3063. package/dist/plugin-sdk/src/plugin-sdk/core.d.ts +142 -0
  3064. package/dist/plugin-sdk/src/plugin-sdk/device-bootstrap.d.ts +2 -0
  3065. package/dist/plugin-sdk/src/plugin-sdk/diagnostics-otel.d.ts +6 -0
  3066. package/dist/plugin-sdk/src/plugin-sdk/diffs.d.ts +4 -0
  3067. package/dist/plugin-sdk/src/plugin-sdk/directory-runtime.d.ts +8 -0
  3068. package/dist/plugin-sdk/src/plugin-sdk/discord-core.d.ts +10 -0
  3069. package/dist/plugin-sdk/src/plugin-sdk/discord-send.d.ts +31 -0
  3070. package/dist/plugin-sdk/src/plugin-sdk/discord.d.ts +33 -0
  3071. package/dist/plugin-sdk/src/plugin-sdk/entrypoints.d.ts +17 -0
  3072. package/dist/plugin-sdk/src/plugin-sdk/extension-shared.d.ts +67 -0
  3073. package/dist/plugin-sdk/src/plugin-sdk/feishu.d.ts +42 -0
  3074. package/dist/plugin-sdk/src/plugin-sdk/fetch-auth.d.ts +14 -0
  3075. package/dist/plugin-sdk/src/plugin-sdk/file-lock.d.ts +18 -0
  3076. package/dist/plugin-sdk/src/plugin-sdk/gateway-runtime.d.ts +4 -0
  3077. package/dist/plugin-sdk/src/plugin-sdk/google.d.ts +2 -0
  3078. package/dist/plugin-sdk/src/plugin-sdk/googlechat.d.ts +45 -0
  3079. package/dist/plugin-sdk/src/plugin-sdk/group-access.d.ts +57 -0
  3080. package/dist/plugin-sdk/src/plugin-sdk/hook-runtime.d.ts +3 -0
  3081. package/dist/plugin-sdk/src/plugin-sdk/image-generation-runtime.d.ts +1 -0
  3082. package/dist/plugin-sdk/src/plugin-sdk/image-generation.d.ts +4 -0
  3083. package/dist/plugin-sdk/src/plugin-sdk/imessage-core.d.ts +6 -0
  3084. package/dist/plugin-sdk/src/plugin-sdk/imessage-targets.d.ts +1 -0
  3085. package/dist/plugin-sdk/src/plugin-sdk/imessage.d.ts +14 -0
  3086. package/dist/plugin-sdk/src/plugin-sdk/inbound-envelope.d.ts +97 -0
  3087. package/dist/plugin-sdk/src/plugin-sdk/inbound-reply-dispatch.d.ts +73 -0
  3088. package/dist/plugin-sdk/src/plugin-sdk/index.d.ts +25 -0
  3089. package/dist/plugin-sdk/src/plugin-sdk/infra-runtime.d.ts +40 -0
  3090. package/dist/plugin-sdk/src/plugin-sdk/interactive-runtime.d.ts +3 -0
  3091. package/dist/plugin-sdk/src/plugin-sdk/irc.d.ts +37 -0
  3092. package/dist/plugin-sdk/src/plugin-sdk/json-store.d.ts +12 -0
  3093. package/dist/plugin-sdk/src/plugin-sdk/keyed-async-queue.d.ts +16 -0
  3094. package/dist/plugin-sdk/src/plugin-sdk/lazy-runtime.d.ts +1 -0
  3095. package/dist/plugin-sdk/src/plugin-sdk/line-core.d.ts +11 -0
  3096. package/dist/plugin-sdk/src/plugin-sdk/line.d.ts +15 -0
  3097. package/dist/plugin-sdk/src/plugin-sdk/llm-task.d.ts +4 -0
  3098. package/dist/plugin-sdk/src/plugin-sdk/lobster.d.ts +3 -0
  3099. package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-heavy.d.ts +4 -0
  3100. package/dist/plugin-sdk/src/plugin-sdk/matrix-runtime-shared.d.ts +6 -0
  3101. package/dist/plugin-sdk/src/plugin-sdk/matrix.d.ts +65 -0
  3102. package/dist/plugin-sdk/src/plugin-sdk/mattermost.d.ts +49 -0
  3103. package/dist/plugin-sdk/src/plugin-sdk/media-runtime.d.ts +22 -0
  3104. package/dist/plugin-sdk/src/plugin-sdk/media-understanding-runtime.d.ts +1 -0
  3105. package/dist/plugin-sdk/src/plugin-sdk/media-understanding.d.ts +4 -0
  3106. package/dist/plugin-sdk/src/plugin-sdk/memory-core.d.ts +3 -0
  3107. package/dist/plugin-sdk/src/plugin-sdk/memory-lancedb.d.ts +2 -0
  3108. package/dist/plugin-sdk/src/plugin-sdk/msteams.d.ts +57 -0
  3109. package/dist/plugin-sdk/src/plugin-sdk/nextcloud-talk.d.ts +41 -0
  3110. package/dist/plugin-sdk/src/plugin-sdk/nostr.d.ts +17 -0
  3111. package/dist/plugin-sdk/src/plugin-sdk/oauth-utils.d.ts +7 -0
  3112. package/dist/plugin-sdk/src/plugin-sdk/ollama-setup.d.ts +3 -0
  3113. package/dist/plugin-sdk/src/plugin-sdk/open-prose.d.ts +2 -0
  3114. package/dist/plugin-sdk/src/plugin-sdk/optional-channel-setup.d.ts +11 -0
  3115. package/dist/plugin-sdk/src/plugin-sdk/outbound-media.d.ts +6 -0
  3116. package/dist/plugin-sdk/src/plugin-sdk/outbound-runtime.d.ts +3 -0
  3117. package/dist/plugin-sdk/src/plugin-sdk/pairing-access.d.ts +19 -0
  3118. package/dist/plugin-sdk/src/plugin-sdk/persistent-dedupe.d.ts +22 -0
  3119. package/dist/plugin-sdk/src/plugin-sdk/phone-control.d.ts +2 -0
  3120. package/dist/plugin-sdk/src/plugin-sdk/plugin-entry.d.ts +20 -0
  3121. package/dist/plugin-sdk/src/plugin-sdk/plugin-runtime.d.ts +7 -0
  3122. package/dist/plugin-sdk/src/plugin-sdk/process-runtime.d.ts +1 -0
  3123. package/dist/plugin-sdk/src/plugin-sdk/provider-auth-api-key.d.ts +7 -0
  3124. package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.d.ts +27 -0
  3125. package/dist/plugin-sdk/src/plugin-sdk/provider-auth-login.runtime.d.ts +3 -0
  3126. package/dist/plugin-sdk/src/plugin-sdk/provider-auth-result.d.ts +15 -0
  3127. package/dist/plugin-sdk/src/plugin-sdk/provider-auth.d.ts +22 -0
  3128. package/dist/plugin-sdk/src/plugin-sdk/provider-catalog.d.ts +2 -0
  3129. package/dist/plugin-sdk/src/plugin-sdk/provider-env-vars.d.ts +1 -0
  3130. package/dist/plugin-sdk/src/plugin-sdk/provider-google.d.ts +2 -0
  3131. package/dist/plugin-sdk/src/plugin-sdk/provider-models.d.ts +31 -0
  3132. package/dist/plugin-sdk/src/plugin-sdk/provider-onboard.d.ts +5 -0
  3133. package/dist/plugin-sdk/src/plugin-sdk/provider-setup.d.ts +5 -0
  3134. package/dist/plugin-sdk/src/plugin-sdk/provider-stream.d.ts +7 -0
  3135. package/dist/plugin-sdk/src/plugin-sdk/provider-tools.d.ts +3 -0
  3136. package/dist/plugin-sdk/src/plugin-sdk/provider-usage.d.ts +4 -0
  3137. package/dist/plugin-sdk/src/plugin-sdk/provider-web-search.d.ts +18 -0
  3138. package/dist/plugin-sdk/src/plugin-sdk/provider-zai-endpoint.d.ts +1 -0
  3139. package/dist/plugin-sdk/src/plugin-sdk/reply-history.d.ts +3 -0
  3140. package/dist/plugin-sdk/src/plugin-sdk/reply-payload.d.ts +164 -0
  3141. package/dist/plugin-sdk/src/plugin-sdk/reply-runtime.d.ts +20 -0
  3142. package/dist/plugin-sdk/src/plugin-sdk/request-url.d.ts +2 -0
  3143. package/dist/plugin-sdk/src/plugin-sdk/resolution-notes.d.ts +5 -0
  3144. package/dist/plugin-sdk/src/plugin-sdk/routing.d.ts +8 -0
  3145. package/dist/plugin-sdk/src/plugin-sdk/run-command.d.ts +13 -0
  3146. package/dist/plugin-sdk/src/plugin-sdk/runtime-env.d.ts +6 -0
  3147. package/dist/plugin-sdk/src/plugin-sdk/runtime-store.d.ts +8 -0
  3148. package/dist/plugin-sdk/src/plugin-sdk/runtime.d.ts +28 -0
  3149. package/dist/plugin-sdk/src/plugin-sdk/sandbox.d.ts +5 -0
  3150. package/dist/plugin-sdk/src/plugin-sdk/secret-input-runtime.d.ts +1 -0
  3151. package/dist/plugin-sdk/src/plugin-sdk/secret-input-schema.d.ts +15 -0
  3152. package/dist/plugin-sdk/src/plugin-sdk/secret-input.d.ts +31 -0
  3153. package/dist/plugin-sdk/src/plugin-sdk/security-runtime.d.ts +4 -0
  3154. package/dist/plugin-sdk/src/plugin-sdk/self-hosted-provider-setup.d.ts +3 -0
  3155. package/dist/plugin-sdk/src/plugin-sdk/setup-adapter-runtime.d.ts +1 -0
  3156. package/dist/plugin-sdk/src/plugin-sdk/setup-runtime.d.ts +9 -0
  3157. package/dist/plugin-sdk/src/plugin-sdk/setup-tools.d.ts +4 -0
  3158. package/dist/plugin-sdk/src/plugin-sdk/setup.d.ts +21 -0
  3159. package/dist/plugin-sdk/src/plugin-sdk/signal-core.d.ts +8 -0
  3160. package/dist/plugin-sdk/src/plugin-sdk/signal.d.ts +23 -0
  3161. package/dist/plugin-sdk/src/plugin-sdk/slack-core.d.ts +6 -0
  3162. package/dist/plugin-sdk/src/plugin-sdk/slack-targets.d.ts +1 -0
  3163. package/dist/plugin-sdk/src/plugin-sdk/slack.d.ts +26 -0
  3164. package/dist/plugin-sdk/src/plugin-sdk/speech-runtime.d.ts +1 -0
  3165. package/dist/plugin-sdk/src/plugin-sdk/speech.d.ts +5 -0
  3166. package/dist/plugin-sdk/src/plugin-sdk/ssrf-policy.d.ts +20 -0
  3167. package/dist/plugin-sdk/src/plugin-sdk/ssrf-runtime.d.ts +2 -0
  3168. package/dist/plugin-sdk/src/plugin-sdk/state-paths.d.ts +1 -0
  3169. package/dist/plugin-sdk/src/plugin-sdk/status-helpers.d.ts +145 -0
  3170. package/dist/plugin-sdk/src/plugin-sdk/talk-voice.d.ts +2 -0
  3171. package/dist/plugin-sdk/src/plugin-sdk/telegram-core.d.ts +8 -0
  3172. package/dist/plugin-sdk/src/plugin-sdk/telegram.d.ts +1 -0
  3173. package/dist/plugin-sdk/src/plugin-sdk/temp-path.d.ts +14 -0
  3174. package/dist/plugin-sdk/src/plugin-sdk/test-utils.d.ts +1 -0
  3175. package/dist/plugin-sdk/src/plugin-sdk/testing.d.ts +26 -0
  3176. package/dist/plugin-sdk/src/plugin-sdk/text-chunking.d.ts +2 -0
  3177. package/dist/plugin-sdk/src/plugin-sdk/text-runtime.d.ts +22 -0
  3178. package/dist/plugin-sdk/src/plugin-sdk/thread-bindings-runtime.d.ts +2 -0
  3179. package/dist/plugin-sdk/src/plugin-sdk/thread-ownership.d.ts +3 -0
  3180. package/dist/plugin-sdk/src/plugin-sdk/tlon.d.ts +21 -0
  3181. package/dist/plugin-sdk/src/plugin-sdk/tool-send.d.ts +7 -0
  3182. package/dist/plugin-sdk/src/plugin-sdk/twitch.d.ts +18 -0
  3183. package/dist/plugin-sdk/src/plugin-sdk/voice-call.d.ts +9 -0
  3184. package/dist/plugin-sdk/src/plugin-sdk/web-media.d.ts +1 -0
  3185. package/dist/plugin-sdk/src/plugin-sdk/webhook-ingress.d.ts +4 -0
  3186. package/dist/plugin-sdk/src/plugin-sdk/webhook-memory-guards.d.ts +52 -0
  3187. package/dist/plugin-sdk/src/plugin-sdk/webhook-path.d.ts +8 -0
  3188. package/dist/plugin-sdk/src/plugin-sdk/webhook-request-guards.d.ts +89 -0
  3189. package/dist/plugin-sdk/src/plugin-sdk/webhook-targets.d.ts +97 -0
  3190. package/dist/plugin-sdk/src/plugin-sdk/whatsapp-action-runtime.d.ts +1 -0
  3191. package/dist/plugin-sdk/src/plugin-sdk/whatsapp-core.d.ts +10 -0
  3192. package/dist/plugin-sdk/src/plugin-sdk/whatsapp-login-qr.d.ts +1 -0
  3193. package/dist/plugin-sdk/src/plugin-sdk/whatsapp-shared.d.ts +6 -0
  3194. package/dist/plugin-sdk/src/plugin-sdk/whatsapp.d.ts +31 -0
  3195. package/dist/plugin-sdk/src/plugin-sdk/windows-spawn.d.ts +44 -0
  3196. package/dist/plugin-sdk/src/plugin-sdk/zai.d.ts +1 -0
  3197. package/dist/plugin-sdk/src/plugin-sdk/zalo.d.ts +46 -0
  3198. package/dist/plugin-sdk/src/plugin-sdk/zalouser.d.ts +39 -0
  3199. package/dist/plugin-sdk/src/plugins/bundle-commands.d.ts +12 -0
  3200. package/dist/plugin-sdk/src/plugins/bundle-lsp.d.ts +27 -0
  3201. package/dist/plugin-sdk/src/plugins/bundle-manifest.d.ts +32 -0
  3202. package/dist/plugin-sdk/src/plugins/bundle-mcp.d.ts +30 -0
  3203. package/dist/plugin-sdk/src/plugins/bundled-compat.d.ts +9 -0
  3204. package/dist/plugin-sdk/src/plugins/bundled-dir.d.ts +1 -0
  3205. package/dist/plugin-sdk/src/plugins/bundled-provider-auth-env-vars.d.ts +1 -0
  3206. package/dist/plugin-sdk/src/plugins/bundled-provider-auth-env-vars.generated.d.ts +40 -0
  3207. package/dist/plugin-sdk/src/plugins/bundled-web-search-ids.d.ts +2 -0
  3208. package/dist/plugin-sdk/src/plugins/bundled-web-search.d.ts +10 -0
  3209. package/dist/plugin-sdk/src/plugins/captured-registration.d.ts +14 -0
  3210. package/dist/plugin-sdk/src/plugins/commands.d.ts +111 -0
  3211. package/dist/plugin-sdk/src/plugins/config-schema.d.ts +2 -0
  3212. package/dist/plugin-sdk/src/plugins/config-state.d.ts +53 -0
  3213. package/dist/plugin-sdk/src/plugins/conversation-binding.d.ts +89 -0
  3214. package/dist/plugin-sdk/src/plugins/discovery.d.ts +30 -0
  3215. package/dist/plugin-sdk/src/plugins/enable.d.ts +7 -0
  3216. package/dist/plugin-sdk/src/plugins/hook-runner-global.d.ts +37 -0
  3217. package/dist/plugin-sdk/src/plugins/hooks.d.ts +70 -0
  3218. package/dist/plugin-sdk/src/plugins/http-path.d.ts +1 -0
  3219. package/dist/plugin-sdk/src/plugins/http-registry.d.ts +16 -0
  3220. package/dist/plugin-sdk/src/plugins/http-route-overlap.d.ts +11 -0
  3221. package/dist/plugin-sdk/src/plugins/interactive-dispatch-adapters.d.ts +44 -0
  3222. package/dist/plugin-sdk/src/plugins/interactive.d.ts +60 -0
  3223. package/dist/plugin-sdk/src/plugins/loader.d.ts +47 -0
  3224. package/dist/plugin-sdk/src/plugins/logger.d.ts +9 -0
  3225. package/dist/plugin-sdk/src/plugins/manifest-registry.d.ts +49 -0
  3226. package/dist/plugin-sdk/src/plugins/manifest.d.ts +119 -0
  3227. package/dist/plugin-sdk/src/plugins/path-safety.d.ts +5 -0
  3228. package/dist/plugin-sdk/src/plugins/provider-api-key-auth.d.ts +24 -0
  3229. package/dist/plugin-sdk/src/plugins/provider-api-key-auth.runtime.d.ts +11 -0
  3230. package/dist/plugin-sdk/src/plugins/provider-auth-helpers.d.ts +25 -0
  3231. package/dist/plugin-sdk/src/plugins/provider-auth-input.d.ts +49 -0
  3232. package/dist/plugin-sdk/src/plugins/provider-auth-mode.d.ts +14 -0
  3233. package/dist/plugin-sdk/src/plugins/provider-auth-ref.d.ts +32 -0
  3234. package/dist/plugin-sdk/src/plugins/provider-auth-token.d.ts +9 -0
  3235. package/dist/plugin-sdk/src/plugins/provider-auth-types.d.ts +1 -0
  3236. package/dist/plugin-sdk/src/plugins/provider-catalog-metadata.d.ts +6 -0
  3237. package/dist/plugin-sdk/src/plugins/provider-catalog.d.ts +24 -0
  3238. package/dist/plugin-sdk/src/plugins/provider-discovery.d.ts +37 -0
  3239. package/dist/plugin-sdk/src/plugins/provider-model-allowlist.d.ts +6 -0
  3240. package/dist/plugin-sdk/src/plugins/provider-model-defaults.d.ts +19 -0
  3241. package/dist/plugin-sdk/src/plugins/provider-model-definitions.d.ts +107 -0
  3242. package/dist/plugin-sdk/src/plugins/provider-model-helpers.d.ts +8 -0
  3243. package/dist/plugin-sdk/src/plugins/provider-model-primary.d.ts +12 -0
  3244. package/dist/plugin-sdk/src/plugins/provider-oauth-flow.d.ts +20 -0
  3245. package/dist/plugin-sdk/src/plugins/provider-ollama-setup.d.ts +32 -0
  3246. package/dist/plugin-sdk/src/plugins/provider-onboarding-config.d.ts +62 -0
  3247. package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth-tls.d.ts +22 -0
  3248. package/dist/plugin-sdk/src/plugins/provider-openai-codex-oauth.d.ts +10 -0
  3249. package/dist/plugin-sdk/src/plugins/provider-runtime.d.ts +154 -0
  3250. package/dist/plugin-sdk/src/plugins/provider-runtime.runtime.d.ts +1 -0
  3251. package/dist/plugin-sdk/src/plugins/provider-self-hosted-setup.d.ts +51 -0
  3252. package/dist/plugin-sdk/src/plugins/provider-thinking.d.ts +9 -0
  3253. package/dist/plugin-sdk/src/plugins/provider-validation.d.ts +7 -0
  3254. package/dist/plugin-sdk/src/plugins/provider-vllm-setup.d.ts +21 -0
  3255. package/dist/plugin-sdk/src/plugins/provider-zai-endpoint.d.ts +16 -0
  3256. package/dist/plugin-sdk/src/plugins/providers.d.ts +40 -0
  3257. package/dist/plugin-sdk/src/plugins/registry-empty.d.ts +2 -0
  3258. package/dist/plugin-sdk/src/plugins/registry.d.ts +191 -0
  3259. package/dist/plugin-sdk/src/plugins/roots.d.ts +18 -0
  3260. package/dist/plugin-sdk/src/plugins/runtime/gateway-request-scope.d.ts +19 -0
  3261. package/dist/plugin-sdk/src/plugins/runtime/index.d.ts +19 -0
  3262. package/dist/plugin-sdk/src/plugins/runtime/native-deps.d.ts +8 -0
  3263. package/dist/plugin-sdk/src/plugins/runtime/runtime-agent.d.ts +2 -0
  3264. package/dist/plugin-sdk/src/plugins/runtime/runtime-channel.d.ts +2 -0
  3265. package/dist/plugin-sdk/src/plugins/runtime/runtime-config.d.ts +2 -0
  3266. package/dist/plugin-sdk/src/plugins/runtime/runtime-discord-ops.runtime.d.ts +25 -0
  3267. package/dist/plugin-sdk/src/plugins/runtime/runtime-discord-typing.d.ts +15 -0
  3268. package/dist/plugin-sdk/src/plugins/runtime/runtime-discord.d.ts +2 -0
  3269. package/dist/plugin-sdk/src/plugins/runtime/runtime-events.d.ts +2 -0
  3270. package/dist/plugin-sdk/src/plugins/runtime/runtime-imessage.d.ts +2 -0
  3271. package/dist/plugin-sdk/src/plugins/runtime/runtime-logging.d.ts +2 -0
  3272. package/dist/plugin-sdk/src/plugins/runtime/runtime-matrix-boundary.d.ts +4 -0
  3273. package/dist/plugin-sdk/src/plugins/runtime/runtime-matrix.d.ts +2 -0
  3274. package/dist/plugin-sdk/src/plugins/runtime/runtime-media.d.ts +2 -0
  3275. package/dist/plugin-sdk/src/plugins/runtime/runtime-signal.d.ts +2 -0
  3276. package/dist/plugin-sdk/src/plugins/runtime/runtime-slack-ops.runtime.d.ts +11 -0
  3277. package/dist/plugin-sdk/src/plugins/runtime/runtime-slack.d.ts +2 -0
  3278. package/dist/plugin-sdk/src/plugins/runtime/runtime-system.d.ts +2 -0
  3279. package/dist/plugin-sdk/src/plugins/runtime/runtime-telegram-contract.d.ts +41 -0
  3280. package/dist/plugin-sdk/src/plugins/runtime/runtime-telegram-ops.runtime.d.ts +20 -0
  3281. package/dist/plugin-sdk/src/plugins/runtime/runtime-telegram-typing.d.ts +18 -0
  3282. package/dist/plugin-sdk/src/plugins/runtime/runtime-telegram.d.ts +2 -0
  3283. package/dist/plugin-sdk/src/plugins/runtime/runtime-tools.d.ts +2 -0
  3284. package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp-boundary.d.ts +35 -0
  3285. package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp-login-tool.d.ts +1 -0
  3286. package/dist/plugin-sdk/src/plugins/runtime/runtime-whatsapp.d.ts +2 -0
  3287. package/dist/plugin-sdk/src/plugins/runtime/types-channel.d.ts +242 -0
  3288. package/dist/plugin-sdk/src/plugins/runtime/types-core.d.ts +100 -0
  3289. package/dist/plugin-sdk/src/plugins/runtime/types.d.ts +50 -0
  3290. package/dist/plugin-sdk/src/plugins/runtime.d.ts +12 -0
  3291. package/dist/plugin-sdk/src/plugins/schema-validator.d.ts +17 -0
  3292. package/dist/plugin-sdk/src/plugins/sdk-alias.d.ts +47 -0
  3293. package/dist/plugin-sdk/src/plugins/setup-binary.d.ts +1 -0
  3294. package/dist/plugin-sdk/src/plugins/setup-browser.d.ts +2 -0
  3295. package/dist/plugin-sdk/src/plugins/signal-cli-install.d.ts +30 -0
  3296. package/dist/plugin-sdk/src/plugins/slots.d.ts +24 -0
  3297. package/dist/plugin-sdk/src/plugins/status.d.ts +97 -0
  3298. package/dist/plugin-sdk/src/plugins/toggle-config.d.ts +2 -0
  3299. package/dist/plugin-sdk/src/plugins/tools.d.ts +16 -0
  3300. package/dist/plugin-sdk/src/plugins/types.d.ts +1566 -0
  3301. package/dist/plugin-sdk/src/plugins/web-search-providers.d.ts +9 -0
  3302. package/dist/plugin-sdk/src/plugins/web-search-providers.runtime.d.ts +16 -0
  3303. package/dist/plugin-sdk/src/plugins/web-search-providers.shared.d.ts +13 -0
  3304. package/dist/plugin-sdk/src/poll-params.d.ts +42 -0
  3305. package/dist/plugin-sdk/src/polls.d.ts +32 -0
  3306. package/dist/plugin-sdk/src/process/command-queue.d.ts +63 -0
  3307. package/dist/plugin-sdk/src/process/exec.d.ts +36 -0
  3308. package/dist/plugin-sdk/src/process/kill-tree.d.ts +12 -0
  3309. package/dist/plugin-sdk/src/process/lanes.d.ts +6 -0
  3310. package/dist/plugin-sdk/src/process/spawn-utils.d.ts +26 -0
  3311. package/dist/plugin-sdk/src/process/supervisor/adapters/child.d.ts +10 -0
  3312. package/dist/plugin-sdk/src/process/supervisor/adapters/env.d.ts +1 -0
  3313. package/dist/plugin-sdk/src/process/supervisor/adapters/pty.d.ts +11 -0
  3314. package/dist/plugin-sdk/src/process/supervisor/index.d.ts +4 -0
  3315. package/dist/plugin-sdk/src/process/supervisor/registry.d.ts +21 -0
  3316. package/dist/plugin-sdk/src/process/supervisor/supervisor.d.ts +2 -0
  3317. package/dist/plugin-sdk/src/process/supervisor/types.d.ts +92 -0
  3318. package/dist/plugin-sdk/src/process/windows-command.d.ts +5 -0
  3319. package/dist/plugin-sdk/src/providers/github-copilot-auth.d.ts +5 -0
  3320. package/dist/plugin-sdk/src/providers/kilocode-shared.d.ts +27 -0
  3321. package/dist/plugin-sdk/src/providers/openai-defaults.d.ts +7 -0
  3322. package/dist/plugin-sdk/src/routing/account-id.d.ts +3 -0
  3323. package/dist/plugin-sdk/src/routing/account-lookup.d.ts +1 -0
  3324. package/dist/plugin-sdk/src/routing/bindings.d.ts +11 -0
  3325. package/dist/plugin-sdk/src/routing/default-account-warnings.d.ts +6 -0
  3326. package/dist/plugin-sdk/src/routing/resolve-route.d.ts +53 -0
  3327. package/dist/plugin-sdk/src/routing/session-key.d.ts +52 -0
  3328. package/dist/plugin-sdk/src/runtime.d.ts +7 -0
  3329. package/dist/plugin-sdk/src/secrets/command-config.d.ts +35 -0
  3330. package/dist/plugin-sdk/src/secrets/json-pointer.d.ts +6 -0
  3331. package/dist/plugin-sdk/src/secrets/path-utils.d.ts +5 -0
  3332. package/dist/plugin-sdk/src/secrets/provider-env-vars.d.ts +21 -0
  3333. package/dist/plugin-sdk/src/secrets/ref-contract.d.ts +33 -0
  3334. package/dist/plugin-sdk/src/secrets/resolve-secret-input-string.d.ts +12 -0
  3335. package/dist/plugin-sdk/src/secrets/resolve.d.ts +40 -0
  3336. package/dist/plugin-sdk/src/secrets/runtime-auth-collectors.d.ts +7 -0
  3337. package/dist/plugin-sdk/src/secrets/runtime-config-collectors-channels.d.ts +7 -0
  3338. package/dist/plugin-sdk/src/secrets/runtime-config-collectors-core.d.ts +7 -0
  3339. package/dist/plugin-sdk/src/secrets/runtime-config-collectors-tts.d.ts +9 -0
  3340. package/dist/plugin-sdk/src/secrets/runtime-config-collectors.d.ts +6 -0
  3341. package/dist/plugin-sdk/src/secrets/runtime-gateway-auth-surfaces.d.ts +16 -0
  3342. package/dist/plugin-sdk/src/secrets/runtime-shared.d.ts +52 -0
  3343. package/dist/plugin-sdk/src/secrets/runtime-web-tools.d.ts +9 -0
  3344. package/dist/plugin-sdk/src/secrets/runtime-web-tools.types.d.ts +26 -0
  3345. package/dist/plugin-sdk/src/secrets/runtime.d.ts +34 -0
  3346. package/dist/plugin-sdk/src/secrets/secret-value.d.ts +8 -0
  3347. package/dist/plugin-sdk/src/secrets/shared.d.ts +11 -0
  3348. package/dist/plugin-sdk/src/secrets/target-registry-data.d.ts +3 -0
  3349. package/dist/plugin-sdk/src/secrets/target-registry-pattern.d.ts +28 -0
  3350. package/dist/plugin-sdk/src/secrets/target-registry-query.d.ts +18 -0
  3351. package/dist/plugin-sdk/src/secrets/target-registry-types.d.ts +39 -0
  3352. package/dist/plugin-sdk/src/secrets/target-registry.d.ts +1 -0
  3353. package/dist/plugin-sdk/src/security/audit-fs.d.ts +44 -0
  3354. package/dist/plugin-sdk/src/security/channel-metadata.d.ts +6 -0
  3355. package/dist/plugin-sdk/src/security/config-regex.d.ts +22 -0
  3356. package/dist/plugin-sdk/src/security/dm-policy-shared.d.ts +92 -0
  3357. package/dist/plugin-sdk/src/security/external-content.d.ts +58 -0
  3358. package/dist/plugin-sdk/src/security/safe-regex.d.ts +16 -0
  3359. package/dist/plugin-sdk/src/security/scan-paths.d.ts +5 -0
  3360. package/dist/plugin-sdk/src/security/secret-equal.d.ts +1 -0
  3361. package/dist/plugin-sdk/src/security/windows-acl.d.ts +37 -0
  3362. package/dist/plugin-sdk/src/sessions/input-provenance.d.ts +17 -0
  3363. package/dist/plugin-sdk/src/sessions/level-overrides.d.ts +10 -0
  3364. package/dist/plugin-sdk/src/sessions/model-overrides.d.ts +14 -0
  3365. package/dist/plugin-sdk/src/sessions/send-policy.d.ts +11 -0
  3366. package/dist/plugin-sdk/src/sessions/session-id-resolution.d.ts +2 -0
  3367. package/dist/plugin-sdk/src/sessions/session-id.d.ts +2 -0
  3368. package/dist/plugin-sdk/src/sessions/session-key-utils.d.ts +20 -0
  3369. package/dist/plugin-sdk/src/sessions/session-label.d.ts +9 -0
  3370. package/dist/plugin-sdk/src/sessions/session-lifecycle-events.d.ts +11 -0
  3371. package/dist/plugin-sdk/src/sessions/transcript-events.d.ts +10 -0
  3372. package/dist/plugin-sdk/src/shared/assistant-error-format.d.ts +16 -0
  3373. package/dist/plugin-sdk/src/shared/avatar-policy.d.ts +16 -0
  3374. package/dist/plugin-sdk/src/shared/chat-content.d.ts +5 -0
  3375. package/dist/plugin-sdk/src/shared/chat-envelope.d.ts +2 -0
  3376. package/dist/plugin-sdk/src/shared/config-eval.d.ts +26 -0
  3377. package/dist/plugin-sdk/src/shared/device-auth-store.d.ts +23 -0
  3378. package/dist/plugin-sdk/src/shared/device-auth.d.ts +13 -0
  3379. package/dist/plugin-sdk/src/shared/frontmatter.d.ts +29 -0
  3380. package/dist/plugin-sdk/src/shared/gateway-bind-url.d.ts +14 -0
  3381. package/dist/plugin-sdk/src/shared/global-singleton.d.ts +2 -0
  3382. package/dist/plugin-sdk/src/shared/lazy-runtime.d.ts +7 -0
  3383. package/dist/plugin-sdk/src/shared/net/ip.d.ts +20 -0
  3384. package/dist/plugin-sdk/src/shared/net/url-userinfo.d.ts +1 -0
  3385. package/dist/plugin-sdk/src/shared/node-list-parse.d.ts +3 -0
  3386. package/dist/plugin-sdk/src/shared/node-list-types.d.ts +48 -0
  3387. package/dist/plugin-sdk/src/shared/node-match.d.ts +9 -0
  3388. package/dist/plugin-sdk/src/shared/node-resolve.d.ts +8 -0
  3389. package/dist/plugin-sdk/src/shared/operator-scope-compat.d.ts +10 -0
  3390. package/dist/plugin-sdk/src/shared/pid-alive.d.ts +10 -0
  3391. package/dist/plugin-sdk/src/shared/process-scoped-map.d.ts +1 -0
  3392. package/dist/plugin-sdk/src/shared/session-types.d.ts +25 -0
  3393. package/dist/plugin-sdk/src/shared/session-usage-timeseries-types.d.ts +15 -0
  3394. package/dist/plugin-sdk/src/shared/string-normalization.d.ts +4 -0
  3395. package/dist/plugin-sdk/src/shared/string-sample.d.ts +5 -0
  3396. package/dist/plugin-sdk/src/shared/subagents-format.d.ts +15 -0
  3397. package/dist/plugin-sdk/src/shared/tailscale-status.d.ts +8 -0
  3398. package/dist/plugin-sdk/src/shared/text/assistant-visible-text.d.ts +1 -0
  3399. package/dist/plugin-sdk/src/shared/text/auto-linked-file-ref.d.ts +2 -0
  3400. package/dist/plugin-sdk/src/shared/text/code-regions.d.ts +6 -0
  3401. package/dist/plugin-sdk/src/shared/text/join-segments.d.ts +9 -0
  3402. package/dist/plugin-sdk/src/shared/text/reasoning-tags.d.ts +6 -0
  3403. package/dist/plugin-sdk/src/shared/text-chunking.d.ts +1 -0
  3404. package/dist/plugin-sdk/src/terminal/ansi.d.ts +9 -0
  3405. package/dist/plugin-sdk/src/terminal/health-style.d.ts +1 -0
  3406. package/dist/plugin-sdk/src/terminal/links.d.ts +6 -0
  3407. package/dist/plugin-sdk/src/terminal/note.d.ts +5 -0
  3408. package/dist/plugin-sdk/src/terminal/palette.d.ts +10 -0
  3409. package/dist/plugin-sdk/src/terminal/progress-line.d.ts +3 -0
  3410. package/dist/plugin-sdk/src/terminal/prompt-style.d.ts +3 -0
  3411. package/dist/plugin-sdk/src/terminal/restore.d.ts +17 -0
  3412. package/dist/plugin-sdk/src/terminal/safe-text.d.ts +4 -0
  3413. package/dist/plugin-sdk/src/terminal/theme.d.ts +15 -0
  3414. package/dist/plugin-sdk/src/test-utils/vitest-mock-fn.d.ts +1 -0
  3415. package/dist/plugin-sdk/src/tts/provider-registry.d.ts +6 -0
  3416. package/dist/plugin-sdk/src/tts/provider-types.d.ts +46 -0
  3417. package/dist/plugin-sdk/src/tts/providers/elevenlabs.d.ts +7 -0
  3418. package/dist/plugin-sdk/src/tts/providers/microsoft.d.ts +4 -0
  3419. package/dist/plugin-sdk/src/tts/providers/openai.d.ts +2 -0
  3420. package/dist/plugin-sdk/src/tts/runtime.d.ts +1 -0
  3421. package/dist/plugin-sdk/src/tts/tts-core.d.ts +57 -0
  3422. package/dist/plugin-sdk/src/tts/tts.d.ts +216 -0
  3423. package/dist/plugin-sdk/src/utils/account-id.d.ts +1 -0
  3424. package/dist/plugin-sdk/src/utils/boolean.d.ts +5 -0
  3425. package/dist/plugin-sdk/src/utils/chunk-items.d.ts +1 -0
  3426. package/dist/plugin-sdk/src/utils/delivery-context.d.ts +42 -0
  3427. package/dist/plugin-sdk/src/utils/directive-tags.d.ts +29 -0
  3428. package/dist/plugin-sdk/src/utils/fetch-timeout.d.ts +13 -0
  3429. package/dist/plugin-sdk/src/utils/mask-api-key.d.ts +1 -0
  3430. package/dist/plugin-sdk/src/utils/message-channel.d.ts +27 -0
  3431. package/dist/plugin-sdk/src/utils/normalize-secret-input.d.ts +17 -0
  3432. package/dist/plugin-sdk/src/utils/parse-json-compat.d.ts +1 -0
  3433. package/dist/plugin-sdk/src/utils/provider-utils.d.ts +9 -0
  3434. package/dist/plugin-sdk/src/utils/queue-helpers.d.ts +80 -0
  3435. package/dist/plugin-sdk/src/utils/reaction-level.d.ts +15 -0
  3436. package/dist/plugin-sdk/src/utils/run-with-concurrency.d.ts +11 -0
  3437. package/dist/plugin-sdk/src/utils/safe-json.d.ts +1 -0
  3438. package/dist/plugin-sdk/src/utils/shell-argv.d.ts +1 -0
  3439. package/dist/plugin-sdk/src/utils/transcript-tools.d.ts +8 -0
  3440. package/dist/plugin-sdk/src/utils/usage-format.d.ts +27 -0
  3441. package/dist/plugin-sdk/src/utils/with-timeout.d.ts +1 -0
  3442. package/dist/plugin-sdk/src/utils.d.ts +61 -0
  3443. package/dist/plugin-sdk/src/version.d.ts +16 -0
  3444. package/dist/plugin-sdk/src/web-search/runtime.d.ts +46 -0
  3445. package/dist/plugin-sdk/src/whatsapp/normalize.d.ts +6 -0
  3446. package/dist/plugin-sdk/src/whatsapp/resolve-outbound-target.d.ts +12 -0
  3447. package/dist/plugin-sdk/src/wizard/prompts.d.ts +43 -0
  3448. package/dist/plugin-sdk/src/wizard/session.d.ts +42 -0
  3449. package/dist/plugin-sdk/ssrf-runtime.d.ts +1 -0
  3450. package/dist/plugin-sdk/ssrf-runtime.js +5 -0
  3451. package/dist/plugin-sdk/state-paths.d.ts +1 -0
  3452. package/dist/plugin-sdk/state-paths.js +3 -0
  3453. package/dist/plugin-sdk/status-helpers.d.ts +1 -0
  3454. package/dist/plugin-sdk/status-helpers.js +9 -0
  3455. package/dist/plugin-sdk/telegram-core.d.ts +1 -0
  3456. package/dist/plugin-sdk/telegram-core.js +23 -0
  3457. package/dist/plugin-sdk/telegram.d.ts +1 -0
  3458. package/dist/plugin-sdk/telegram.js +224 -0
  3459. package/dist/plugin-sdk/testing.d.ts +1 -0
  3460. package/dist/plugin-sdk/testing.js +13174 -0
  3461. package/dist/plugin-sdk/text-runtime.d.ts +1 -0
  3462. package/dist/plugin-sdk/text-runtime.js +45 -0
  3463. package/dist/plugin-sdk/thread-bindings-runtime.d.ts +1 -0
  3464. package/dist/plugin-sdk/thread-bindings-runtime.js +2 -0
  3465. package/dist/plugin-sdk/thread-ownership.d.ts +1 -0
  3466. package/dist/plugin-sdk/thread-ownership.js +2 -0
  3467. package/dist/plugin-sdk/tlon.d.ts +1 -0
  3468. package/dist/plugin-sdk/tlon.js +57 -0
  3469. package/dist/plugin-sdk/tool-send.d.ts +1 -0
  3470. package/dist/plugin-sdk/tool-send.js +2 -0
  3471. package/dist/plugin-sdk/twitch.d.ts +1 -0
  3472. package/dist/plugin-sdk/twitch.js +46 -0
  3473. package/dist/plugin-sdk/voice-call.d.ts +1 -0
  3474. package/dist/plugin-sdk/voice-call.js +213 -0
  3475. package/dist/plugin-sdk/web-media.d.ts +1 -0
  3476. package/dist/plugin-sdk/web-media.js +28 -0
  3477. package/dist/plugin-sdk/webhook-ingress.d.ts +1 -0
  3478. package/dist/plugin-sdk/webhook-ingress.js +7 -0
  3479. package/dist/plugin-sdk/webhook-path.d.ts +1 -0
  3480. package/dist/plugin-sdk/webhook-path.js +29 -0
  3481. package/dist/plugin-sdk/whatsapp-core.d.ts +1 -0
  3482. package/dist/plugin-sdk/whatsapp-core.js +219 -0
  3483. package/dist/plugin-sdk/whatsapp-shared.d.ts +1 -0
  3484. package/dist/plugin-sdk/whatsapp-shared.js +18 -0
  3485. package/dist/plugin-sdk/windows-spawn.d.ts +1 -0
  3486. package/dist/plugin-sdk/windows-spawn.js +2 -0
  3487. package/dist/plugin-sdk/zalo.d.ts +1 -0
  3488. package/dist/plugin-sdk/zalo.js +239 -0
  3489. package/dist/plugin-sdk/zalouser.d.ts +1 -0
  3490. package/dist/plugin-sdk/zalouser.js +240 -0
  3491. package/dist/plugins/build-smoke-entry.js +211 -0
  3492. package/dist/plugins/runtime/index.js +229 -0
  3493. package/dist/plugins-1Z50ecJ6.js +1 -0
  3494. package/dist/plugins-C6fKmNuA.js +7 -0
  3495. package/dist/plugins-cli-C9F7LFai.js +1192 -0
  3496. package/dist/policy-CpkbSAfm.js +60 -0
  3497. package/dist/polls-B2VH7SN9.js +35 -0
  3498. package/dist/ports-BjWuIIQw.js +262 -0
  3499. package/dist/ports-bjxjgHBT.js +385 -0
  3500. package/dist/ports-lsof-DtJqhFOr.js +25 -0
  3501. package/dist/ports-probe-BQqp8l8E.js +14 -0
  3502. package/dist/preflight-audio.runtime-CHKtYFCD.js +216 -0
  3503. package/dist/probe-B4addlGb.js +20 -0
  3504. package/dist/probe-DEHTy47Q.js +134 -0
  3505. package/dist/probe-auth-f8H5asG2.js +45 -0
  3506. package/dist/probe-auth-w1LTAARt.js +48 -0
  3507. package/dist/process-runtime-C7el-Ri4.js +1 -0
  3508. package/dist/process-scoped-map-C4gOa-gv.js +61 -0
  3509. package/dist/profile-utils-BcMYGFPT.js +15 -0
  3510. package/dist/profiles-D17eMKQZ.js +683 -0
  3511. package/dist/program-7yuBUzsM.js +155 -0
  3512. package/dist/program-context-BMWNUfqL.js +10 -0
  3513. package/dist/program-context-CD_RvRYh.js +2 -0
  3514. package/dist/progress-D1r9bZU1.js +132 -0
  3515. package/dist/prompt-select-styled-nNVADeGF.js +4879 -0
  3516. package/dist/prompt-style-BvciNCqy.js +7 -0
  3517. package/dist/prompts-NtuylUyl.js +9 -0
  3518. package/dist/prototype-keys-Cm_8mWvq.js +11 -0
  3519. package/dist/provider-api-key-auth-BE0taXiB.js +108 -0
  3520. package/dist/provider-api-key-auth.runtime-jDZZUAMX.js +34 -0
  3521. package/dist/provider-auth-Bw8x1a3o.js +58 -0
  3522. package/dist/provider-auth-api-key-BrQYvdxi.js +1 -0
  3523. package/dist/provider-auth-choice-CHLyhQwI.js +128 -0
  3524. package/dist/provider-auth-choice-helpers-Bj1GkOSn.js +48 -0
  3525. package/dist/provider-auth-choice-preference-DlolknHt.js +192 -0
  3526. package/dist/provider-auth-choice.runtime-unOg_4AL.js +223 -0
  3527. package/dist/provider-auth-choices-QSilukI1.js +58 -0
  3528. package/dist/provider-auth-guidance-7WCTw6mb.js +34 -0
  3529. package/dist/provider-auth-helpers-B0dS-1WK.js +86 -0
  3530. package/dist/provider-auth-input-BftBdgvW.js +112 -0
  3531. package/dist/provider-auth-login-MdVTo3EF.js +8 -0
  3532. package/dist/provider-auth-login.runtime-CmHgk5FU.js +243 -0
  3533. package/dist/provider-auth-mode-sTdccIKL.js +20 -0
  3534. package/dist/provider-auth-ref-BS3gwrNr.js +168 -0
  3535. package/dist/provider-auth-ref-BmEcEN7K.js +3 -0
  3536. package/dist/provider-catalog--18-pW5t.js +11 -0
  3537. package/dist/provider-catalog-2P2hel74.js +48 -0
  3538. package/dist/provider-catalog-B0FqWSwe.js +48 -0
  3539. package/dist/provider-catalog-BvORKzzD.js +91 -0
  3540. package/dist/provider-catalog-C34j1_or.js +26 -0
  3541. package/dist/provider-catalog-C5vmXjmb.js +11 -0
  3542. package/dist/provider-catalog-CBufm2Dr.js +36 -0
  3543. package/dist/provider-catalog-D7QvsUXS.js +12 -0
  3544. package/dist/provider-catalog-DKy_dzQZ.js +41 -0
  3545. package/dist/provider-env-vars-CsQlY7bF.js +110 -0
  3546. package/dist/provider-id-BpXo5t6v.js +31 -0
  3547. package/dist/provider-model-allowlist-4HSOnlX-.js +24 -0
  3548. package/dist/provider-model-primary-NJ-xlhec.js +53 -0
  3549. package/dist/provider-models-C2EjYMwW.js +2416 -0
  3550. package/dist/provider-oauth-flow-BQN6F6EC.js +33 -0
  3551. package/dist/provider-ollama-setup-DhQvDwAj.js +309 -0
  3552. package/dist/provider-onboard-CjOfyeQG.js +1 -0
  3553. package/dist/provider-onboarding-config-DOZ3pFA6.js +165 -0
  3554. package/dist/provider-openai-codex-oauth-tls-CciH-ElI.js +101 -0
  3555. package/dist/provider-runtime.runtime-CqLlOpNN.js +211 -0
  3556. package/dist/provider-self-hosted-setup-CUrmsugW.js +182 -0
  3557. package/dist/provider-usage-ClDVmkhl.js +633 -0
  3558. package/dist/provider-usage-Da21nLuJ.js +211 -0
  3559. package/dist/provider-web-search-D2JPMqCP.js +507 -0
  3560. package/dist/provider-wizard-DLQlOsRE.js +236 -0
  3561. package/dist/provider-zai-endpoint-DeDABzT4.js +106 -0
  3562. package/dist/proxy-H5O2p6AP.js +121 -0
  3563. package/dist/proxy-env-DG2u55RW.js +40 -0
  3564. package/dist/push-apns-DthmTY-D.js +1050 -0
  3565. package/dist/pw-ai-S7kXHa5n.js +1876 -0
  3566. package/dist/qmd-manager-BpygGMW9.js +1571 -0
  3567. package/dist/qr-cli-BujxPQbh.js +370 -0
  3568. package/dist/qr-cli-DVmW5mdc.js +213 -0
  3569. package/dist/query-expansion-Do45hILP.js +1114 -0
  3570. package/dist/reactions-BlWPBR0l.js +281 -0
  3571. package/dist/read-only-account-inspect-CuuTbX8x.js +42 -0
  3572. package/dist/read-only-account-inspect.discord.runtime-BNqMWV41.js +216 -0
  3573. package/dist/read-only-account-inspect.slack.runtime-CNRAytxm.js +216 -0
  3574. package/dist/read-only-account-inspect.telegram.runtime-byPPLnsZ.js +216 -0
  3575. package/dist/redact-BDinS1q9.js +102 -0
  3576. package/dist/redact-identifier-FUiWQxv5.js +13 -0
  3577. package/dist/redact-snapshot-DBPmeYy2.js +2654 -0
  3578. package/dist/ref-contract-CCBBbf1r.js +53 -0
  3579. package/dist/register-CppP7Ddc.js +43 -0
  3580. package/dist/register.agent-Cy1pvUnS.js +546 -0
  3581. package/dist/register.backup-Dxsn-Yi4.js +269 -0
  3582. package/dist/register.configure-BOONWPZN.js +354 -0
  3583. package/dist/register.maintenance-C_E5F3xW.js +694 -0
  3584. package/dist/register.message-BwmuEJ7n.js +812 -0
  3585. package/dist/register.onboard-D4Fu6BPi.js +298 -0
  3586. package/dist/register.setup-DJYgl_5E.js +318 -0
  3587. package/dist/register.status-health-sessions-B0KtOOEc.js +604 -0
  3588. package/dist/register.subclis-CKJ5Qvch.js +315 -0
  3589. package/dist/register.subclis-CcdM_H8W.js +13 -0
  3590. package/dist/registry-C3q59Qj0.js +55 -0
  3591. package/dist/registry-CPsHw6xU.js +219 -0
  3592. package/dist/registry-CxgtJ09C.js +28 -0
  3593. package/dist/registry-rgYi7KoO.js +160 -0
  3594. package/dist/repair-qXnOAvDy.js +105 -0
  3595. package/dist/replies-MyUi4VUF.js +122 -0
  3596. package/dist/reply-history-CVCD5oE9.js +1 -0
  3597. package/dist/reply-payload-DBGc074f.js +232 -0
  3598. package/dist/report-cli-DB1jQx32.js +42 -0
  3599. package/dist/request-url-BKfWAQx8.js +10 -0
  3600. package/dist/resolve-Ckjd8TAk.js +14 -0
  3601. package/dist/resolve-T2q_0ARF.js +619 -0
  3602. package/dist/resolve-route-vEY3ONZ2.js +466 -0
  3603. package/dist/resolve-utils-CF8cU9WO.js +102 -0
  3604. package/dist/response-generator-VdoCcQ3y.js +153 -0
  3605. package/dist/restart-stale-pids-CLGiqU2E.js +187 -0
  3606. package/dist/retry-D15TD1S3.js +168 -0
  3607. package/dist/root-help-2Fvs2dP7.js +32 -0
  3608. package/dist/routes-LnFKW9Eh.js +7084 -0
  3609. package/dist/routing-Y3m0o-kB.js +26 -0
  3610. package/dist/rpc-lnQaxoYH.js +67 -0
  3611. package/dist/run-command-DRKv5Lj6.js +32 -0
  3612. package/dist/run-main-XmwwulYd.js +425 -0
  3613. package/dist/run-with-concurrency-BrSjWzpg.js +41 -0
  3614. package/dist/runtime-B66W9flm.js +43 -0
  3615. package/dist/runtime-CT2LIJZu.js +91 -0
  3616. package/dist/runtime-Cl6sSlDG.js +143 -0
  3617. package/dist/runtime-CuvWMN7E.js +89 -0
  3618. package/dist/runtime-D4_OpzA1.js +5 -0
  3619. package/dist/runtime-DP-4DZja.js +5 -0
  3620. package/dist/runtime-Dl17x_cV.js +1 -0
  3621. package/dist/runtime-Dwejo3y0.js +2338 -0
  3622. package/dist/runtime-Z35JoYPC.js +30 -0
  3623. package/dist/runtime-api-AQf4CGN0.js +39 -0
  3624. package/dist/runtime-api-D79M0lQN.js +1 -0
  3625. package/dist/runtime-discord-ops.runtime-CvmUbfVm.js +234 -0
  3626. package/dist/runtime-env-a_iwdJIv.js +1 -0
  3627. package/dist/runtime-forwarders-DtMc8rBP.js +44 -0
  3628. package/dist/runtime-group-policy-B7irU4eu.js +59 -0
  3629. package/dist/runtime-guard-y62lPDGY.js +58 -0
  3630. package/dist/runtime-parse-CeqXmZHJ.js +84 -0
  3631. package/dist/runtime-paths-2jrzlMjr.js +334 -0
  3632. package/dist/runtime-slack-ops.runtime-D7IhY8CD.js +226 -0
  3633. package/dist/runtime-status-CgL02wYX.js +15 -0
  3634. package/dist/runtime-store-Bt3Sdbrn.js +22 -0
  3635. package/dist/runtime-telegram-ops.runtime-DMM0_L8z.js +233 -0
  3636. package/dist/runtime-whatsapp-boundary-BE-h0Dkz.js +371 -0
  3637. package/dist/safe-open-sync-Bt9R1Mnf.js +83 -0
  3638. package/dist/safe-regex-tLlDZYfM.js +244 -0
  3639. package/dist/safe-text-B_CQuica.js +16 -0
  3640. package/dist/sandbox-Ceruxpo4.js +2795 -0
  3641. package/dist/sandbox-cli-Bj_FeUbQ.js +499 -0
  3642. package/dist/sandbox-paths-fqp_TZdO.js +144 -0
  3643. package/dist/sandbox-qSs4h3sk.js +1 -0
  3644. package/dist/sanitize-env-vars-vNSNqm0y.js +74 -0
  3645. package/dist/scan-paths-BJmvUZ1E.js +28 -0
  3646. package/dist/search-manager-5CMnrJiG.js +392 -0
  3647. package/dist/search-manager-mbopau6D.js +17 -0
  3648. package/dist/secret-equal-ObQfyZGa.js +9 -0
  3649. package/dist/secret-file-Ch0yuOXR.js +11 -0
  3650. package/dist/secret-file-DYJtH6kf.js +92 -0
  3651. package/dist/secret-input-4REZ4sHo.js +35 -0
  3652. package/dist/secrets-cli-CDAAxiLx.js +2304 -0
  3653. package/dist/secure-random-Cs8tw_HQ.js +10 -0
  3654. package/dist/security-cli-73x8ZrPY.js +676 -0
  3655. package/dist/security-runtime-BuEhpJVE.js +23 -0
  3656. package/dist/send-3tabvle6.js +100 -0
  3657. package/dist/send-CK2mTZ2A.js +1026 -0
  3658. package/dist/send-CoghdDtC.js +250 -0
  3659. package/dist/send-deps-CrFMNvqO.js +19 -0
  3660. package/dist/server-DsQSJw3K.js +116 -0
  3661. package/dist/server-middleware-CCqKhKUb.js +106 -0
  3662. package/dist/server-node-events-ByKRzTEW.js +611 -0
  3663. package/dist/server-startup-matrix-migration-DXgvClaj.js +1595 -0
  3664. package/dist/service-CCEFa-Yp.js +21 -0
  3665. package/dist/service-DsLjWzXO.js +774 -0
  3666. package/dist/session-cost-usage-Bcu2puh5.js +615 -0
  3667. package/dist/session-cost-usage-CqAjBtg1.js +212 -0
  3668. package/dist/session-fork.runtime-BZfcC1Nc.js +51 -0
  3669. package/dist/session-key-gFFk3uv9.js +216 -0
  3670. package/dist/session-write-lock-DNKvpjKf.js +324 -0
  3671. package/dist/sessions-BjptmD-t.js +669 -0
  3672. package/dist/sessions-CcXbjCp-.js +212 -0
  3673. package/dist/sessions-DzQPJoHb.js +222 -0
  3674. package/dist/setup-CN-teRpz.js +8 -0
  3675. package/dist/setup-adapter-runtime-Bjv2adwG.js +1 -0
  3676. package/dist/setup-binary-BOJA7zdN.js +30 -0
  3677. package/dist/setup-browser-BhNPCUtK.js +71 -0
  3678. package/dist/setup-core-7tpbsHoe.js +510 -0
  3679. package/dist/setup-core-DsGvW4Oh.js +149 -0
  3680. package/dist/setup-core-m6QfoAWl.js +162 -0
  3681. package/dist/setup-entry-BgrHdl35.js +13 -0
  3682. package/dist/setup-entry-DKV-8VNp.js +13 -0
  3683. package/dist/setup-entry-Df-K2RuZ.js +12 -0
  3684. package/dist/setup-entry-DxtbuNKQ.js +12 -0
  3685. package/dist/setup-entry-Dzn7A8q7.js +10 -0
  3686. package/dist/setup-entry-bSF8R2r8.js +14 -0
  3687. package/dist/setup-group-access-BtPApRvE.js +70 -0
  3688. package/dist/setup-helpers-B62Ecg9r.js +362 -0
  3689. package/dist/setup-saJ2s_47.js +397 -0
  3690. package/dist/setup-surface-BGYo0Juy.js +452 -0
  3691. package/dist/setup-surface-Cx1YVfWw.js +298 -0
  3692. package/dist/setup-surface-DF1wiFx2.js +380 -0
  3693. package/dist/setup-tools-BPiMjAN7.js +1 -0
  3694. package/dist/setup-wizard-helpers-COZ1UAdX.js +770 -0
  3695. package/dist/setup-wizard-proxy-Slwi-1gX.js +116 -0
  3696. package/dist/setup.finalize-BEoLI29h.js +633 -0
  3697. package/dist/setup.gateway-config-6ACjCQcc.js +288 -0
  3698. package/dist/setup.secret-input-BL-bqJpt.js +25 -0
  3699. package/dist/shared-AygSbeCK.js +50 -0
  3700. package/dist/shared-BEtSbYbS.js +70 -0
  3701. package/dist/shared-BU0QgVMZ.js +36 -0
  3702. package/dist/shared-B_i-s5Yg.js +127 -0
  3703. package/dist/shared-CsOwQtm1.js +82 -0
  3704. package/dist/shared-DA95aWfS.js +196 -0
  3705. package/dist/shared-DsbqCNFQ.js +64 -0
  3706. package/dist/shared-LeP8iUTz.js +54 -0
  3707. package/dist/shared-N35AUgZI.js +351 -0
  3708. package/dist/shared-qmfOl6pa.js +87 -0
  3709. package/dist/shell-argv-DWV43Vya.js +72 -0
  3710. package/dist/shell-env-cD92jEyV.js +181 -0
  3711. package/dist/signal-8EYn_jCw.js +214 -0
  3712. package/dist/signal-Ca7y47bM.js +46 -0
  3713. package/dist/signal-CdndhLSx.js +315 -0
  3714. package/dist/signal-cli-install-DxoL8CgF.js +188 -0
  3715. package/dist/skill-commands-CiSwTFBQ.js +652 -0
  3716. package/dist/skill-commands.runtime-CEwlWT4j.js +34 -0
  3717. package/dist/skill-scanner-DG7MT7pu.js +354 -0
  3718. package/dist/skills-BC8GJ9Rp.js +22 -0
  3719. package/dist/skills-CCgKs_NJ.js +863 -0
  3720. package/dist/skills-cli-Xqm4TQ_x.js +339 -0
  3721. package/dist/skills-install-DiriUXJd.js +763 -0
  3722. package/dist/skills-status-BmQTn4jL.js +23 -0
  3723. package/dist/skills-status-a9b899Y3.js +169 -0
  3724. package/dist/slack-C3ZawHgc.js +217 -0
  3725. package/dist/slack-DnTAFEmr.js +730 -0
  3726. package/dist/slack-UD0yJzLR.js +24536 -0
  3727. package/dist/slack-core-DcsbATUs.js +1 -0
  3728. package/dist/slash-commands.runtime-sOpKLp0F.js +228 -0
  3729. package/dist/slash-dispatch.runtime-CbC_hoS7.js +238 -0
  3730. package/dist/slash-skill-commands.runtime-CXNUQJQR.js +216 -0
  3731. package/dist/speech-bSreRuDH.js +1 -0
  3732. package/dist/speech-runtime-y1FcnGVA.js +1 -0
  3733. package/dist/src-CmXHIz5f.js +846 -0
  3734. package/dist/ssh-config-ChqR6ijV.js +77 -0
  3735. package/dist/ssh-tunnel-BWqSNkJo.js +159 -0
  3736. package/dist/ssh-tunnel-DXVCvSif.js +16 -0
  3737. package/dist/ssrf-Dk9XaoKN.js +220 -0
  3738. package/dist/ssrf-policy-Dk6oMa20.js +69 -0
  3739. package/dist/ssrf-runtime-C-mAQLVA.js +1 -0
  3740. package/dist/stagger-DU7FjHYo.js +54 -0
  3741. package/dist/state-paths-DJIGEFq_.js +1 -0
  3742. package/dist/status-1dN68Nry.js +212 -0
  3743. package/dist/status-B5jKN_AU.js +606 -0
  3744. package/dist/status-BQWWxkTB.js +235 -0
  3745. package/dist/status-By03N6J2.js +44 -0
  3746. package/dist/status-COGoXc70.js +202 -0
  3747. package/dist/status-ClMSSlfZ.js +1665 -0
  3748. package/dist/status-Dl_kHCzm.js +75 -0
  3749. package/dist/status-helpers-Cda-rGLX.js +101 -0
  3750. package/dist/status-json-DXiuJMkM.js +322 -0
  3751. package/dist/status.link-channel-DVXC4ITW.js +40 -0
  3752. package/dist/status.scan.deps.runtime-BklcI9d4.js +77 -0
  3753. package/dist/status.scan.runtime-Bz0f5qUW.js +14 -0
  3754. package/dist/status.summary-D8-ms-9P.js +600 -0
  3755. package/dist/status.summary.runtime-Cng6MzRU.js +151 -0
  3756. package/dist/status.update-CjoH4lVV.js +79 -0
  3757. package/dist/store-AMSZUI0p.js +1446 -0
  3758. package/dist/store.runtime-B0dFf2pa.js +43 -0
  3759. package/dist/string-normalization-CvzuCAZv.js +19 -0
  3760. package/dist/string-sample-BOLqzr4Y.js +11 -0
  3761. package/dist/subagent-orphan-recovery-CDTomicF.js +407 -0
  3762. package/dist/subagent-registry-runtime-kD87ylaJ.js +211 -0
  3763. package/dist/subcli-descriptors-CteQXLPG.js +151 -0
  3764. package/dist/subsystem-CUp-6QQf.js +421 -0
  3765. package/dist/synology-chat-CFiJEDRu.js +12 -0
  3766. package/dist/system-cli-D2pMYxTX.js +99 -0
  3767. package/dist/system-events-mAu6Ap6K.js +75 -0
  3768. package/dist/system-message-DA9eUYzB.js +16 -0
  3769. package/dist/system-run-command-BV7UnYxn.js +258 -0
  3770. package/dist/systemd-CrxZBFae.js +557 -0
  3771. package/dist/systemd-hints-BLAoAquw.js +315 -0
  3772. package/dist/systemd-linger-BdklDcLg.js +16 -0
  3773. package/dist/systemd-linger-DLrbG9_d.js +68 -0
  3774. package/dist/table-DFMOhmNZ.js +305 -0
  3775. package/dist/tailnet-ofqBrXzu.js +38 -0
  3776. package/dist/tailscale-Cbsx-2HB.js +254 -0
  3777. package/dist/target-errors-ksphhzJg.js +26 -0
  3778. package/dist/target-registry-krAVlXi_.js +1321 -0
  3779. package/dist/telegram/audit.js +2 -0
  3780. package/dist/telegram/token.js +211 -0
  3781. package/dist/telegram--sUKZkSQ.js +218 -0
  3782. package/dist/telegram-T7TInjDG.js +575 -0
  3783. package/dist/telegram-core-B4Jo-uko.js +1 -0
  3784. package/dist/telegram-gE5VPMy9.js +10910 -0
  3785. package/dist/template-messages-kh7VfgOb.js +214 -0
  3786. package/dist/text-chunking-CUf5WgqG.js +19 -0
  3787. package/dist/text-format-sFXlJfHH.js +8 -0
  3788. package/dist/text-runtime-C_Roi_Je.js +1418 -0
  3789. package/dist/theme-B5HDbQfl.js +2 -0
  3790. package/dist/theme-CdOoMzRk.js +34 -0
  3791. package/dist/thinking-BBD_0HSp.js +68 -0
  3792. package/dist/thinking.shared-CncvRHts.js +246 -0
  3793. package/dist/thread-bindings-messages-Cdo8jSa9.js +229 -0
  3794. package/dist/thread-bindings-policy-DMjOaNyR.js +119 -0
  3795. package/dist/thread-bindings-runtime-Ckwk3Uuz.js +1 -0
  3796. package/dist/threading-helpers-Cq55SUtb.js +14 -0
  3797. package/dist/timeouts-BwR1sGom.js +72 -0
  3798. package/dist/tmp-openclaw-dir-idKIOMmb.js +102 -0
  3799. package/dist/token-Bgv8XEsC.js +50 -0
  3800. package/dist/tool-catalog-BV6FcEWS.js +337 -0
  3801. package/dist/tool-policy-match-hui3aCeL.js +46 -0
  3802. package/dist/tool-send-9LXKcrda.js +16 -0
  3803. package/dist/topology-cli-BhUXVViF.js +43 -0
  3804. package/dist/transcript-events-B1V6z5ct.js +29 -0
  3805. package/dist/tui-DPFSXSKf.js +3838 -0
  3806. package/dist/tui-cli-ARm2kBar.js +237 -0
  3807. package/dist/typebox-D0SHDJST.js +175 -0
  3808. package/dist/types-BCKGVVld.js +83 -0
  3809. package/dist/types-CtpUGsDP.js +30 -0
  3810. package/dist/types.secrets-BWSeXrF4.js +80 -0
  3811. package/dist/types.tools-BBO8HCi6.js +22 -0
  3812. package/dist/typing-DG_YqWJ7.js +224 -0
  3813. package/dist/unhandled-rejections-CDJ8dOVP.js +170 -0
  3814. package/dist/unhandled-rejections-O6cVOz2D.js +4 -0
  3815. package/dist/update-check-C3TeQaWg.js +464 -0
  3816. package/dist/update-cli-d9OEgooM.js +1625 -0
  3817. package/dist/update-offset-store-DxnWyB1g.js +211 -0
  3818. package/dist/update-yEO8OZ1B.js +1039 -0
  3819. package/dist/upsert-with-lock-Bb96JHpb.js +34 -0
  3820. package/dist/url-userinfo-Db63ng4y.js +14 -0
  3821. package/dist/utils-Bxk6BLTg.js +236 -0
  3822. package/dist/utils-vDeUf98G.js +7 -0
  3823. package/dist/version-BQotbaVq.js +65 -0
  3824. package/dist/version-riajrkRq.js +2 -0
  3825. package/dist/voice-call-D4fgwZNO.js +1 -0
  3826. package/dist/warning-filter-CgvLQB4Y.js +56 -0
  3827. package/dist/web-media-BfBb8i48.js +1 -0
  3828. package/dist/web-media-CtU6jM5V.js +498 -0
  3829. package/dist/webhook-ingress-CupqYpKM.js +338 -0
  3830. package/dist/webhook-memory-guards-BHrFZ4yq.js +129 -0
  3831. package/dist/webhook-path-BGFZ55ML.js +22 -0
  3832. package/dist/webhook-shared-DPtckp_I.js +349 -0
  3833. package/dist/webhooks-cli-DXesU9a9.js +357 -0
  3834. package/dist/whatsapp-Ba6KkyUx.js +58 -0
  3835. package/dist/whatsapp-DXbWlm3A.js +82 -0
  3836. package/dist/whatsapp-core-Ca4IJFs0.js +89490 -0
  3837. package/dist/whatsapp-heartbeat-CSWnPQ7q.js +84 -0
  3838. package/dist/whatsapp-shared-BmHKqTtR.js +95 -0
  3839. package/dist/widearea-dns-CXimgJzu.js +125 -0
  3840. package/dist/windows-argv-IXrdWrJj.js +145 -0
  3841. package/dist/windows-spawn-vMJGZo89.js +154 -0
  3842. package/dist/with-timeout-2AKTISee.js +58 -0
  3843. package/dist/workspace-BH7CXmrr.js +479 -0
  3844. package/dist/workspace-dirs-_O4V3xCR.js +13 -0
  3845. package/dist/workspace-v5XppK5M.js +302 -0
  3846. package/dist/ws-By-QcLjg.js +11 -0
  3847. package/dist/wsl-BV3Cb66X.js +57 -0
  3848. package/dist/zalo-Ca9sr4FS.js +301 -0
  3849. package/dist/zalo-x6b0tYi0.js +13 -0
  3850. package/dist/zod-schema.agent-runtime-T_EC_6fg.js +600 -0
  3851. package/dist/zod-schema.core-BdgRr-F1.js +545 -0
  3852. package/dist/zod-schema.providers-core-Dgq7MTqU.js +1613 -0
  3853. package/dist-runtime/extensions/acpx/openclaw.plugin.json +120 -0
  3854. package/dist-runtime/extensions/acpx/package.json +14 -0
  3855. package/dist-runtime/extensions/amazon-bedrock/index.js +3 -0
  3856. package/dist-runtime/extensions/amazon-bedrock/openclaw.plugin.json +11 -0
  3857. package/dist-runtime/extensions/amazon-bedrock/package.json +12 -0
  3858. package/dist-runtime/extensions/anthropic/index.js +3 -0
  3859. package/dist-runtime/extensions/anthropic/openclaw.plugin.json +42 -0
  3860. package/dist-runtime/extensions/anthropic/package.json +12 -0
  3861. package/dist-runtime/extensions/bluebubbles/index.js +3 -0
  3862. package/dist-runtime/extensions/bluebubbles/openclaw.plugin.json +11 -0
  3863. package/dist-runtime/extensions/bluebubbles/package.json +51 -0
  3864. package/dist-runtime/extensions/bluebubbles/setup-entry.js +3 -0
  3865. package/dist-runtime/extensions/brave/index.js +3 -0
  3866. package/dist-runtime/extensions/brave/openclaw.plugin.json +45 -0
  3867. package/dist-runtime/extensions/brave/package.json +12 -0
  3868. package/dist-runtime/extensions/byteplus/index.js +3 -0
  3869. package/dist-runtime/extensions/byteplus/openclaw.plugin.json +32 -0
  3870. package/dist-runtime/extensions/byteplus/package.json +12 -0
  3871. package/dist-runtime/extensions/chutes/index.js +3 -0
  3872. package/dist-runtime/extensions/chutes/openclaw.plugin.json +44 -0
  3873. package/dist-runtime/extensions/chutes/package.json +12 -0
  3874. package/dist-runtime/extensions/cloudflare-ai-gateway/index.js +3 -0
  3875. package/dist-runtime/extensions/cloudflare-ai-gateway/openclaw.plugin.json +32 -0
  3876. package/dist-runtime/extensions/cloudflare-ai-gateway/package.json +12 -0
  3877. package/dist-runtime/extensions/copilot-proxy/index.js +3 -0
  3878. package/dist-runtime/extensions/copilot-proxy/openclaw.plugin.json +23 -0
  3879. package/dist-runtime/extensions/copilot-proxy/package.json +12 -0
  3880. package/dist-runtime/extensions/device-pair/index.js +3 -0
  3881. package/dist-runtime/extensions/device-pair/openclaw.plugin.json +20 -0
  3882. package/dist-runtime/extensions/diagnostics-otel/openclaw.plugin.json +8 -0
  3883. package/dist-runtime/extensions/diagnostics-otel/package.json +27 -0
  3884. package/dist-runtime/extensions/diffs/openclaw.plugin.json +216 -0
  3885. package/dist-runtime/extensions/diffs/package.json +20 -0
  3886. package/dist-runtime/extensions/discord/index.js +3 -0
  3887. package/dist-runtime/extensions/discord/openclaw.plugin.json +11 -0
  3888. package/dist-runtime/extensions/discord/package.json +40 -0
  3889. package/dist-runtime/extensions/discord/setup-entry.js +3 -0
  3890. package/dist-runtime/extensions/elevenlabs/index.js +3 -0
  3891. package/dist-runtime/extensions/elevenlabs/openclaw.plugin.json +8 -0
  3892. package/dist-runtime/extensions/elevenlabs/package.json +12 -0
  3893. package/dist-runtime/extensions/fal/index.js +3 -0
  3894. package/dist-runtime/extensions/fal/openclaw.plugin.json +34 -0
  3895. package/dist-runtime/extensions/fal/package.json +12 -0
  3896. package/dist-runtime/extensions/feishu/index.js +3 -0
  3897. package/dist-runtime/extensions/feishu/openclaw.plugin.json +14 -0
  3898. package/dist-runtime/extensions/feishu/package.json +42 -0
  3899. package/dist-runtime/extensions/feishu/setup-entry.js +3 -0
  3900. package/dist-runtime/extensions/firecrawl/index.js +3 -0
  3901. package/dist-runtime/extensions/firecrawl/openclaw.plugin.json +41 -0
  3902. package/dist-runtime/extensions/firecrawl/package.json +12 -0
  3903. package/dist-runtime/extensions/github-copilot/index.js +3 -0
  3904. package/dist-runtime/extensions/github-copilot/openclaw.plugin.json +30 -0
  3905. package/dist-runtime/extensions/github-copilot/package.json +12 -0
  3906. package/dist-runtime/extensions/google/index.js +3 -0
  3907. package/dist-runtime/extensions/google/openclaw.plugin.json +71 -0
  3908. package/dist-runtime/extensions/google/package.json +12 -0
  3909. package/dist-runtime/extensions/googlechat/openclaw.plugin.json +11 -0
  3910. package/dist-runtime/extensions/googlechat/package.json +46 -0
  3911. package/dist-runtime/extensions/huggingface/index.js +3 -0
  3912. package/dist-runtime/extensions/huggingface/openclaw.plugin.json +33 -0
  3913. package/dist-runtime/extensions/huggingface/package.json +12 -0
  3914. package/dist-runtime/extensions/imessage/index.js +3 -0
  3915. package/dist-runtime/extensions/imessage/openclaw.plugin.json +11 -0
  3916. package/dist-runtime/extensions/imessage/package.json +26 -0
  3917. package/dist-runtime/extensions/imessage/setup-entry.js +3 -0
  3918. package/dist-runtime/extensions/irc/index.js +3 -0
  3919. package/dist-runtime/extensions/irc/openclaw.plugin.json +11 -0
  3920. package/dist-runtime/extensions/irc/package.json +25 -0
  3921. package/dist-runtime/extensions/irc/setup-entry.js +3 -0
  3922. package/dist-runtime/extensions/kilocode/index.js +3 -0
  3923. package/dist-runtime/extensions/kilocode/openclaw.plugin.json +32 -0
  3924. package/dist-runtime/extensions/kilocode/package.json +12 -0
  3925. package/dist-runtime/extensions/kimi-coding/index.js +3 -0
  3926. package/dist-runtime/extensions/kimi-coding/openclaw.plugin.json +37 -0
  3927. package/dist-runtime/extensions/kimi-coding/package.json +12 -0
  3928. package/dist-runtime/extensions/line/index.js +3 -0
  3929. package/dist-runtime/extensions/line/openclaw.plugin.json +11 -0
  3930. package/dist-runtime/extensions/line/package.json +39 -0
  3931. package/dist-runtime/extensions/line/setup-entry.js +3 -0
  3932. package/dist-runtime/extensions/llm-task/index.js +3 -0
  3933. package/dist-runtime/extensions/llm-task/openclaw.plugin.json +33 -0
  3934. package/dist-runtime/extensions/llm-task/package.json +16 -0
  3935. package/dist-runtime/extensions/lobster/index.js +3 -0
  3936. package/dist-runtime/extensions/lobster/openclaw.plugin.json +10 -0
  3937. package/dist-runtime/extensions/lobster/package.json +17 -0
  3938. package/dist-runtime/extensions/matrix/openclaw.plugin.json +11 -0
  3939. package/dist-runtime/extensions/matrix/package.json +53 -0
  3940. package/dist-runtime/extensions/mattermost/index.js +3 -0
  3941. package/dist-runtime/extensions/mattermost/openclaw.plugin.json +11 -0
  3942. package/dist-runtime/extensions/mattermost/package.json +41 -0
  3943. package/dist-runtime/extensions/mattermost/setup-entry.js +3 -0
  3944. package/dist-runtime/extensions/memory-core/index.js +3 -0
  3945. package/dist-runtime/extensions/memory-core/openclaw.plugin.json +9 -0
  3946. package/dist-runtime/extensions/memory-core/package.json +20 -0
  3947. package/dist-runtime/extensions/memory-lancedb/openclaw.plugin.json +92 -0
  3948. package/dist-runtime/extensions/memory-lancedb/package.json +24 -0
  3949. package/dist-runtime/extensions/microsoft/index.js +3 -0
  3950. package/dist-runtime/extensions/microsoft/openclaw.plugin.json +8 -0
  3951. package/dist-runtime/extensions/microsoft/package.json +12 -0
  3952. package/dist-runtime/extensions/minimax/index.js +3 -0
  3953. package/dist-runtime/extensions/minimax/openclaw.plugin.json +71 -0
  3954. package/dist-runtime/extensions/minimax/package.json +12 -0
  3955. package/dist-runtime/extensions/mistral/index.js +3 -0
  3956. package/dist-runtime/extensions/mistral/openclaw.plugin.json +31 -0
  3957. package/dist-runtime/extensions/mistral/package.json +12 -0
  3958. package/dist-runtime/extensions/modelstudio/index.js +3 -0
  3959. package/dist-runtime/extensions/modelstudio/openclaw.plugin.json +46 -0
  3960. package/dist-runtime/extensions/modelstudio/package.json +12 -0
  3961. package/dist-runtime/extensions/moonshot/index.js +3 -0
  3962. package/dist-runtime/extensions/moonshot/openclaw.plugin.json +78 -0
  3963. package/dist-runtime/extensions/moonshot/package.json +12 -0
  3964. package/dist-runtime/extensions/msteams/openclaw.plugin.json +11 -0
  3965. package/dist-runtime/extensions/msteams/package.json +48 -0
  3966. package/dist-runtime/extensions/nextcloud-talk/index.js +3 -0
  3967. package/dist-runtime/extensions/nextcloud-talk/openclaw.plugin.json +11 -0
  3968. package/dist-runtime/extensions/nextcloud-talk/package.json +48 -0
  3969. package/dist-runtime/extensions/nextcloud-talk/setup-entry.js +3 -0
  3970. package/dist-runtime/extensions/nostr/openclaw.plugin.json +11 -0
  3971. package/dist-runtime/extensions/nostr/package.json +45 -0
  3972. package/dist-runtime/extensions/nvidia/index.js +3 -0
  3973. package/dist-runtime/extensions/nvidia/openclaw.plugin.json +16 -0
  3974. package/dist-runtime/extensions/nvidia/package.json +12 -0
  3975. package/dist-runtime/extensions/ollama/index.js +3 -0
  3976. package/dist-runtime/extensions/ollama/openclaw.plugin.json +28 -0
  3977. package/dist-runtime/extensions/ollama/package.json +12 -0
  3978. package/dist-runtime/extensions/open-prose/index.js +3 -0
  3979. package/dist-runtime/extensions/open-prose/openclaw.plugin.json +13 -0
  3980. package/dist-runtime/extensions/open-prose/package.json +12 -0
  3981. package/dist-runtime/extensions/openai/index.js +3 -0
  3982. package/dist-runtime/extensions/openai/openclaw.plugin.json +42 -0
  3983. package/dist-runtime/extensions/openai/package.json +12 -0
  3984. package/dist-runtime/extensions/opencode/index.js +3 -0
  3985. package/dist-runtime/extensions/opencode/openclaw.plugin.json +32 -0
  3986. package/dist-runtime/extensions/opencode/package.json +12 -0
  3987. package/dist-runtime/extensions/opencode-go/index.js +3 -0
  3988. package/dist-runtime/extensions/opencode-go/openclaw.plugin.json +32 -0
  3989. package/dist-runtime/extensions/opencode-go/package.json +12 -0
  3990. package/dist-runtime/extensions/openrouter/index.js +3 -0
  3991. package/dist-runtime/extensions/openrouter/openclaw.plugin.json +31 -0
  3992. package/dist-runtime/extensions/openrouter/package.json +12 -0
  3993. package/dist-runtime/extensions/openshell/index.js +3 -0
  3994. package/dist-runtime/extensions/openshell/openclaw.plugin.json +99 -0
  3995. package/dist-runtime/extensions/openshell/package.json +12 -0
  3996. package/dist-runtime/extensions/perplexity/index.js +3 -0
  3997. package/dist-runtime/extensions/perplexity/openclaw.plugin.json +49 -0
  3998. package/dist-runtime/extensions/perplexity/package.json +12 -0
  3999. package/dist-runtime/extensions/phone-control/index.js +3 -0
  4000. package/dist-runtime/extensions/phone-control/openclaw.plugin.json +10 -0
  4001. package/dist-runtime/extensions/qianfan/index.js +3 -0
  4002. package/dist-runtime/extensions/qianfan/openclaw.plugin.json +31 -0
  4003. package/dist-runtime/extensions/qianfan/package.json +12 -0
  4004. package/dist-runtime/extensions/qwen-portal-auth/index.js +3 -0
  4005. package/dist-runtime/extensions/qwen-portal-auth/openclaw.plugin.json +29 -0
  4006. package/dist-runtime/extensions/sglang/index.js +3 -0
  4007. package/dist-runtime/extensions/sglang/openclaw.plugin.json +28 -0
  4008. package/dist-runtime/extensions/sglang/package.json +12 -0
  4009. package/dist-runtime/extensions/signal/index.js +3 -0
  4010. package/dist-runtime/extensions/signal/openclaw.plugin.json +11 -0
  4011. package/dist-runtime/extensions/signal/package.json +23 -0
  4012. package/dist-runtime/extensions/signal/setup-entry.js +3 -0
  4013. package/dist-runtime/extensions/slack/index.js +3 -0
  4014. package/dist-runtime/extensions/slack/openclaw.plugin.json +11 -0
  4015. package/dist-runtime/extensions/slack/package.json +30 -0
  4016. package/dist-runtime/extensions/slack/setup-entry.js +3 -0
  4017. package/dist-runtime/extensions/synology-chat/index.js +3 -0
  4018. package/dist-runtime/extensions/synology-chat/openclaw.plugin.json +11 -0
  4019. package/dist-runtime/extensions/synology-chat/package.json +29 -0
  4020. package/dist-runtime/extensions/synology-chat/setup-entry.js +3 -0
  4021. package/dist-runtime/extensions/synthetic/index.js +3 -0
  4022. package/dist-runtime/extensions/synthetic/openclaw.plugin.json +31 -0
  4023. package/dist-runtime/extensions/synthetic/package.json +12 -0
  4024. package/dist-runtime/extensions/talk-voice/index.js +3 -0
  4025. package/dist-runtime/extensions/talk-voice/openclaw.plugin.json +10 -0
  4026. package/dist-runtime/extensions/tavily/index.js +3 -0
  4027. package/dist-runtime/extensions/tavily/openclaw.plugin.json +44 -0
  4028. package/dist-runtime/extensions/tavily/package.json +12 -0
  4029. package/dist-runtime/extensions/telegram/index.js +3 -0
  4030. package/dist-runtime/extensions/telegram/openclaw.plugin.json +11 -0
  4031. package/dist-runtime/extensions/telegram/package.json +31 -0
  4032. package/dist-runtime/extensions/telegram/setup-entry.js +3 -0
  4033. package/dist-runtime/extensions/thread-ownership/index.js +3 -0
  4034. package/dist-runtime/extensions/thread-ownership/openclaw.plugin.json +30 -0
  4035. package/dist-runtime/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/bin/tlon.js +3 -0
  4036. package/dist-runtime/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/package.json +40 -0
  4037. package/dist-runtime/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/scripts/postinstall.js +3 -0
  4038. package/dist-runtime/extensions/tlon/openclaw.plugin.json +14 -0
  4039. package/dist-runtime/extensions/tlon/package.json +45 -0
  4040. package/dist-runtime/extensions/together/index.js +3 -0
  4041. package/dist-runtime/extensions/together/openclaw.plugin.json +31 -0
  4042. package/dist-runtime/extensions/together/package.json +12 -0
  4043. package/dist-runtime/extensions/twitch/openclaw.plugin.json +11 -0
  4044. package/dist-runtime/extensions/twitch/package.json +27 -0
  4045. package/dist-runtime/extensions/venice/index.js +3 -0
  4046. package/dist-runtime/extensions/venice/openclaw.plugin.json +31 -0
  4047. package/dist-runtime/extensions/venice/package.json +12 -0
  4048. package/dist-runtime/extensions/vercel-ai-gateway/index.js +3 -0
  4049. package/dist-runtime/extensions/vercel-ai-gateway/openclaw.plugin.json +31 -0
  4050. package/dist-runtime/extensions/vercel-ai-gateway/package.json +12 -0
  4051. package/dist-runtime/extensions/vllm/index.js +3 -0
  4052. package/dist-runtime/extensions/vllm/openclaw.plugin.json +28 -0
  4053. package/dist-runtime/extensions/vllm/package.json +12 -0
  4054. package/dist-runtime/extensions/voice-call/index.js +3 -0
  4055. package/dist-runtime/extensions/voice-call/openclaw.plugin.json +648 -0
  4056. package/dist-runtime/extensions/voice-call/package.json +31 -0
  4057. package/dist-runtime/extensions/volcengine/index.js +3 -0
  4058. package/dist-runtime/extensions/volcengine/openclaw.plugin.json +32 -0
  4059. package/dist-runtime/extensions/volcengine/package.json +12 -0
  4060. package/dist-runtime/extensions/whatsapp/openclaw.plugin.json +11 -0
  4061. package/dist-runtime/extensions/whatsapp/package.json +44 -0
  4062. package/dist-runtime/extensions/xai/index.js +3 -0
  4063. package/dist-runtime/extensions/xai/openclaw.plugin.json +65 -0
  4064. package/dist-runtime/extensions/xai/package.json +12 -0
  4065. package/dist-runtime/extensions/xiaomi/index.js +3 -0
  4066. package/dist-runtime/extensions/xiaomi/openclaw.plugin.json +31 -0
  4067. package/dist-runtime/extensions/xiaomi/package.json +12 -0
  4068. package/dist-runtime/extensions/zai/index.js +3 -0
  4069. package/dist-runtime/extensions/zai/openclaw.plugin.json +88 -0
  4070. package/dist-runtime/extensions/zai/package.json +12 -0
  4071. package/dist-runtime/extensions/zalo/index.js +3 -0
  4072. package/dist-runtime/extensions/zalo/openclaw.plugin.json +11 -0
  4073. package/dist-runtime/extensions/zalo/package.json +48 -0
  4074. package/dist-runtime/extensions/zalo/setup-entry.js +3 -0
  4075. package/dist-runtime/extensions/zalouser/openclaw.plugin.json +11 -0
  4076. package/dist-runtime/extensions/zalouser/package.json +49 -0
  4077. package/openclaw.mjs +135 -0
  4078. package/package.json +673 -0
  4079. package/skills/1password/SKILL.md +70 -0
  4080. package/skills/1password/references/cli-examples.md +29 -0
  4081. package/skills/1password/references/get-started.md +17 -0
  4082. package/skills/apple-notes/SKILL.md +77 -0
  4083. package/skills/apple-reminders/SKILL.md +118 -0
  4084. package/skills/bear-notes/SKILL.md +107 -0
  4085. package/skills/blogwatcher/SKILL.md +69 -0
  4086. package/skills/blucli/SKILL.md +47 -0
  4087. package/skills/bluebubbles/SKILL.md +131 -0
  4088. package/skills/camsnap/SKILL.md +45 -0
  4089. package/skills/canvas/SKILL.md +198 -0
  4090. package/skills/clawhub/SKILL.md +77 -0
  4091. package/skills/coding-agent/SKILL.md +295 -0
  4092. package/skills/discord/SKILL.md +197 -0
  4093. package/skills/doubao-code/SKILL.md +43 -0
  4094. package/skills/eightctl/SKILL.md +50 -0
  4095. package/skills/gemini/SKILL.md +43 -0
  4096. package/skills/gh-issues/SKILL.md +865 -0
  4097. package/skills/gifgrep/SKILL.md +79 -0
  4098. package/skills/github/SKILL.md +163 -0
  4099. package/skills/gog/SKILL.md +116 -0
  4100. package/skills/goplaces/SKILL.md +52 -0
  4101. package/skills/healthcheck/SKILL.md +245 -0
  4102. package/skills/himalaya/SKILL.md +257 -0
  4103. package/skills/himalaya/references/configuration.md +184 -0
  4104. package/skills/himalaya/references/message-composition.md +199 -0
  4105. package/skills/imsg/SKILL.md +122 -0
  4106. package/skills/kimi-code/SKILL.md +42 -0
  4107. package/skills/mcporter/SKILL.md +61 -0
  4108. package/skills/model-usage/SKILL.md +69 -0
  4109. package/skills/model-usage/references/codexbar-cli.md +33 -0
  4110. package/skills/model-usage/scripts/model_usage.py +320 -0
  4111. package/skills/model-usage/scripts/test_model_usage.py +40 -0
  4112. package/skills/nano-pdf/SKILL.md +38 -0
  4113. package/skills/node-connect/SKILL.md +142 -0
  4114. package/skills/notion/SKILL.md +174 -0
  4115. package/skills/obsidian/SKILL.md +81 -0
  4116. package/skills/openai-image-gen/SKILL.md +92 -0
  4117. package/skills/openai-image-gen/scripts/gen.py +328 -0
  4118. package/skills/openai-image-gen/scripts/test_gen.py +140 -0
  4119. package/skills/openai-whisper/SKILL.md +38 -0
  4120. package/skills/openai-whisper-api/SKILL.md +52 -0
  4121. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  4122. package/skills/openhue/SKILL.md +112 -0
  4123. package/skills/oracle/SKILL.md +125 -0
  4124. package/skills/ordercli/SKILL.md +78 -0
  4125. package/skills/peekaboo/SKILL.md +190 -0
  4126. package/skills/sag/SKILL.md +87 -0
  4127. package/skills/session-logs/SKILL.md +115 -0
  4128. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  4129. package/skills/skill-creator/SKILL.md +372 -0
  4130. package/skills/skill-creator/license.txt +202 -0
  4131. package/skills/skill-creator/scripts/init_skill.py +378 -0
  4132. package/skills/skill-creator/scripts/package_skill.py +139 -0
  4133. package/skills/skill-creator/scripts/quick_validate.py +159 -0
  4134. package/skills/skill-creator/scripts/test_package_skill.py +160 -0
  4135. package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
  4136. package/skills/slack/SKILL.md +144 -0
  4137. package/skills/songsee/SKILL.md +49 -0
  4138. package/skills/sonoscli/SKILL.md +65 -0
  4139. package/skills/spotify-player/SKILL.md +64 -0
  4140. package/skills/summarize/SKILL.md +87 -0
  4141. package/skills/things-mac/SKILL.md +86 -0
  4142. package/skills/tmux/SKILL.md +153 -0
  4143. package/skills/tmux/scripts/find-sessions.sh +112 -0
  4144. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  4145. package/skills/trello/SKILL.md +95 -0
  4146. package/skills/video-frames/SKILL.md +46 -0
  4147. package/skills/video-frames/scripts/frame.sh +81 -0
  4148. package/skills/voice-call/SKILL.md +45 -0
  4149. package/skills/wacli/SKILL.md +72 -0
  4150. package/skills/weather/SKILL.md +112 -0
  4151. package/skills/xurl/SKILL.md +461 -0
@@ -0,0 +1,4879 @@
1
+ import { o as getResolvedLoggerSettings } from "./logger-CoEtkjhn.js";
2
+ import { C as resolveRequiredHomeDir, _ as resolveStateDir, d as resolveIsNixMode, h as resolveOAuthDir, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-GHJ97ebE.js";
3
+ import { n as defaultRuntime } from "./runtime-CT2LIJZu.js";
4
+ import { t as sanitizeForLog } from "./ansi-BEJF8NKS.js";
5
+ import { t as isTruthyEnvValue$1 } from "./env-BP70DGuy.js";
6
+ import { C as sleep, S as shortenHomePath, y as resolveUserPath } from "./utils-Bxk6BLTg.js";
7
+ import "./paths-nCHyK08H.js";
8
+ import { d as resolveProfileUnusableUntilForDisplay, m as resolveApiKeyForProfile } from "./auth-profiles-CDiIWpd-.js";
9
+ import { S as parseAgentSessionKey } from "./session-key-gFFk3uv9.js";
10
+ import { n as normalizeAccountId, r as normalizeOptionalAccountId, t as DEFAULT_ACCOUNT_ID } from "./account-id-ZCrgXl7Z.js";
11
+ import { n as runCommandWithTimeout, r as runExec } from "./exec-Dmex2w_d.js";
12
+ import { t as resolveOpenClawPackageRoot } from "./openclaw-root-TUHYdr9B.js";
13
+ import { t as DEFAULT_AGENTS_FILENAME } from "./workspace-BH7CXmrr.js";
14
+ import { a as resolveAgentDir, m as resolveDefaultAgentId, p as resolveAgentWorkspaceDir } from "./agent-scope-DPP4Z_UU.js";
15
+ import { n as DEFAULT_MODEL, r as DEFAULT_PROVIDER } from "./defaults-CEdZhIIb.js";
16
+ import { _ as resolveHooksGmailModel, a as getModelRefStatus, h as resolveConfiguredModelRef } from "./model-selection-BTpJnslv.js";
17
+ import { Et as DEFAULT_TALK_PROVIDER, Ot as normalizeTalkSection, R as getTrustedSafeBinDirs, V as normalizeTrustedSafeBinDirs, d as readConfigFileSnapshot, g as writeConfigFile, rt as resolveCommandResolutionFromArgv, z as isTrustedSafeBinPath } from "./io-BjKpaXU3.js";
18
+ import { a as hasConfiguredSecretInput, d as resolveSecretInputRef } from "./types.secrets-BWSeXrF4.js";
19
+ import { A as resolveSlackNativeStreaming, D as formatSlackStreamingBooleanMigrationMessage, E as formatSlackStreamModeMigrationMessage, M as resolveTelegramPreviewStreamMode, j as resolveSlackStreamingMode, k as resolveDiscordPreviewStreamMode } from "./zod-schema.providers-core-Dgq7MTqU.js";
20
+ import { n as migrateLegacyWebSearchConfig } from "./legacy-web-search-BgZjNG2h.js";
21
+ import { s as normalizeChatChannelId } from "./registry-rgYi7KoO.js";
22
+ import { t as migrateLegacyConfig } from "./config-C-Ef7QhH.js";
23
+ import { n as parseToolsBySenderTypedKey } from "./types.tools-BBO8HCi6.js";
24
+ import { t as describeUnknownError } from "./shared-AygSbeCK.js";
25
+ import { c as ensureAuthProfileStore, m as updateAuthProfileStoreWithLock } from "./profiles-D17eMKQZ.js";
26
+ import { t as repairOAuthProfileIdMismatch } from "./repair-qXnOAvDy.js";
27
+ import { t as formatCliCommand } from "./command-format-CjE6bLiz.js";
28
+ import { f as resolveGatewaySystemdServiceName, h as resolveNodeLaunchAgentLabel, l as resolveGatewayLaunchAgentLabel, p as resolveGatewayWindowsTaskName } from "./constants-C_Scc680.js";
29
+ import { a as resolveSystemNodeInfo, r as renderSystemNodeWarning } from "./runtime-paths-2jrzlMjr.js";
30
+ import { n as buildGatewayInstallPlan, r as gatewayInstallErrorHint, t as resolveGatewayInstallToken } from "./gateway-install-token-CKAQVM8-.js";
31
+ import { n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CbClrCwc.js";
32
+ import { n as hasAmbiguousGatewayAuthModeConfig } from "./auth-mode-policy-DywddkT-.js";
33
+ import { d as resolveGatewayBindHost, r as isLoopbackHost } from "./net-DlJFp95v.js";
34
+ import { a as resolveGatewayAuth } from "./auth-O6LQFLHJ.js";
35
+ import { d as readGatewayTokenEnv } from "./credentials-BPwBlm1X.js";
36
+ import { n as loadSessionStore } from "./store-AMSZUI0p.js";
37
+ import { n as isPrimarySessionTranscriptFileName, t as formatSessionArchiveTimestamp } from "./artifacts-C_4LekPC.js";
38
+ import { n as listChannelPlugins } from "./registry-C3q59Qj0.js";
39
+ import { i as resolveMainSessionKey } from "./main-session-DKr0lBVk.js";
40
+ import { i as resolveAgentSessionDirs } from "./sessions-BjptmD-t.js";
41
+ import { c as resolveSessionTranscriptsDirForAgent, i as resolveSessionFilePathOptions, l as resolveStorePath, r as resolveSessionFilePath } from "./paths-CTjJI9l0.js";
42
+ import { n as cleanStaleLockFiles } from "./session-write-lock-DNKvpjKf.js";
43
+ import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-I0SGvyU7.js";
44
+ import { r as isWSLEnv, t as isWSL } from "./wsl-BV3Cb66X.js";
45
+ import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint } from "./prompt-style-BvciNCqy.js";
46
+ import { f as printWizardHeader, m as randomToken, n as applyWizardMetadata, s as guardCancel } from "./onboard-helpers-BN19CLP5.js";
47
+ import { i as launchAgentPlistExists, n as isLaunchAgentListed, r as isLaunchAgentLoaded, s as repairLaunchAgentBootstrap } from "./launchd-DowEtzjr.js";
48
+ import { n as resolveGatewayService, t as describeGatewayServiceRestart } from "./service-DsLjWzXO.js";
49
+ import { a as inspectPortUsage, s as formatPortDiagnostics } from "./ports-bjxjgHBT.js";
50
+ import { i as isSystemdUserServiceAvailable, u as uninstallLegacySystemdUnits } from "./systemd-CrxZBFae.js";
51
+ import { c as buildPlatformRuntimeLogHints, i as auditGatewayServiceConfig, n as renderSystemdUnavailableHints, o as needsNodeRuntimeMigration, r as SERVICE_AUDIT_CODES, s as readEmbeddedGatewayToken, t as isSystemdUnavailableDetail, u as formatRuntimeStatus } from "./systemd-hints-BLAoAquw.js";
52
+ import { n as formatConfigIssueLines } from "./issue-format-CBEXVico.js";
53
+ import { t as readLastGatewayErrorLine } from "./diagnostics-XVyUA90d.js";
54
+ import { n as renderGatewayServiceCleanupHints, t as findExtraGatewayServices } from "./inspect-TkOiUCgp.js";
55
+ import { i as listRouteBindings } from "./bindings-BV4AtNSY.js";
56
+ import { i as formatSetExplicitDefaultToConfiguredInstruction, n as formatChannelAccountsDefaultPath, r as formatSetExplicitDefaultInstruction } from "./routing-Y3m0o-kB.js";
57
+ import { Cf as resolveBootstrapContextForRun, Gf as resolveCommandSecretRefsViaGateway, Mf as analyzeBootstrapBudget, Nf as buildBootstrapInjectionStats, _m as resolvePluginProviders, am as resolveBootstrapMaxChars, dm as loadModelCatalog, fn as listTelegramAccountIds, hn as resolveTelegramAccount, in as lookupTelegramChatId, kd as applyPluginAutoEnable, ln as inspectTelegramAccount, om as resolveBootstrapTotalMaxChars, ym as loadOpenClawPlugins } from "./pi-embedded-CDH9LrEg.js";
58
+ import { s as resolveApiKeyForProvider } from "./model-auth-Blh0xL9g.js";
59
+ import { D as resolveSandboxScope, M as DEFAULT_SANDBOX_BROWSER_IMAGE, P as DEFAULT_SANDBOX_IMAGE } from "./docker-COe8Snwj.js";
60
+ import { l as shouldMoveSingleAccountChannelKey } from "./setup-helpers-B62Ecg9r.js";
61
+ import { a as readChannelAllowFromStore } from "./pairing-store-C4lsd4pO.js";
62
+ import { r as resolveDmAllowState } from "./dm-policy-shared-6bCJzHOS.js";
63
+ import { n as getChannelsCommandSecretTargetIds } from "./command-secret-targets-COcwhn-D.js";
64
+ import { n as resolveCronStorePath, r as saveCronStore, t as loadCronStore } from "./config-runtime-CstET7fq.js";
65
+ import { t as collectProviderDangerousNameMatchingScopes } from "./dangerous-name-matching-DZa_t0RM.js";
66
+ import { C as parseBrowserMajorVersion, T as resolveGoogleChromeExecutableForPlatform, X as resolveConfiguredSecretInputWithFallback, w as readBrowserVersion } from "./routes-LnFKW9Eh.js";
67
+ import { a as hasConfiguredMemorySecretInput } from "./manager-DjPRm0yC.js";
68
+ import { i as resolveMergedSafeBinProfileFixtures, n as listInterpreterLikeSafeBins } from "./exec-safe-bin-runtime-policy-BL5_Z-KU.js";
69
+ import { n as normalizeTelegramAllowFromEntry, t as isNumericTelegramUserId } from "./allow-from-BPSBITdd.js";
70
+ import { t as resolveMemorySearchConfig } from "./memory-search-Das1tiuB.js";
71
+ import { r as resolveMemoryBackendConfig } from "./search-manager-5CMnrJiG.js";
72
+ import { a as detectLegacyMatrixState, i as autoMigrateLegacyMatrixState, n as hasPendingMatrixMigration, o as autoPrepareLegacyMatrixCrypto, r as maybeCreateMatrixMigrationSnapshot, s as detectLegacyMatrixCrypto, t as hasActionableMatrixMigration } from "./matrix-migration-snapshot-NMxdum7C.js";
73
+ import { t as buildWorkspaceSkillStatus } from "./skills-status-a9b899Y3.js";
74
+ import { r as buildPluginCompatibilityWarnings } from "./status-COGoXc70.js";
75
+ import { n as buildAuthHealthSummary, r as formatRemainingShort, t as DEFAULT_OAUTH_WARN_MS } from "./auth-health-BKOrx-5O.js";
76
+ import { t as note$1 } from "./note-dfjacCV8.js";
77
+ import { r as healthCommand } from "./health-BW_d3hKj.js";
78
+ import { i as resolveControlUiDistIndexPathForRoot, r as resolveControlUiDistIndexHealth } from "./control-ui-assets-DjqeIg6A.js";
79
+ import { m as normalizeStoredCronJobs, n as runGatewayUpdate, t as runStartupMatrixMigration, v as detectPluginInstallPathIssue, y as formatPluginInstallPathIssue } from "./server-startup-matrix-migration-DXgvClaj.js";
80
+ import { t as collectChannelStatusIssues } from "./channels-status-issues-C_U44M8Y.js";
81
+ import { n as logConfigUpdated } from "./logging-CS185p8Q.js";
82
+ import { n as resolveProviderAuthLoginCommand, t as buildProviderAuthRecoveryHint } from "./provider-auth-guidance-7WCTw6mb.js";
83
+ import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-DLrbG9_d.js";
84
+ import { t as formatHealthCheckFailure } from "./health-format-B5XfOTuJ.js";
85
+ import { n as doctorShellCompletion } from "./doctor-completion-CU7jR9vY.js";
86
+ import { a as stripUnknownConfigKeys, i as resolveConfigPathTarget, n as formatConfigPath, r as noteOpencodeProviderOverrides, t as runDoctorConfigPreflight } from "./doctor-config-preflight-Bj70HRt3.js";
87
+ import { a as isMattermostMutableAllowEntry, i as isMSTeamsMutableAllowEntry, n as isGoogleChatMutableAllowEntry, o as isSlackMutableAllowEntry, r as isIrcMutableAllowEntry, s as isZalouserMutableGroupEntry, t as isDiscordMutableAllowEntry } from "./mutable-allowlist-detectors-C6EAzWYE.js";
88
+ import { t as resolveDefaultChannelAccountContext } from "./channel-account-context-DXI4NQFD.js";
89
+ import { i as runLegacyStateMigrations, n as detectLegacyStateMigrations } from "./doctor-state-migrations-ElD0NFmv.js";
90
+ import { n as noteOpenAIOAuthTlsPrerequisites } from "./provider-openai-codex-oauth-tls-CciH-ElI.js";
91
+ import fs from "node:fs";
92
+ import path from "node:path";
93
+ import { execFile } from "node:child_process";
94
+ import os from "node:os";
95
+ import { promisify } from "node:util";
96
+ import fs$1 from "node:fs/promises";
97
+ import { confirm, intro, outro, select } from "@clack/prompts";
98
+ //#region src/commands/doctor-auth.ts
99
+ async function maybeRepairAnthropicOAuthProfileId(cfg, prompter) {
100
+ const repair = repairOAuthProfileIdMismatch({
101
+ cfg,
102
+ store: ensureAuthProfileStore(),
103
+ provider: "anthropic",
104
+ legacyProfileId: "anthropic:default"
105
+ });
106
+ if (!repair.migrated || repair.changes.length === 0) return cfg;
107
+ note$1(repair.changes.map((c) => `- ${c}`).join("\n"), "Auth profiles");
108
+ if (!await prompter.confirm({
109
+ message: "Update Anthropic OAuth profile id in config now?",
110
+ initialValue: true
111
+ })) return cfg;
112
+ return repair.config;
113
+ }
114
+ function pruneAuthOrder(order, profileIds) {
115
+ if (!order) return {
116
+ next: order,
117
+ changed: false
118
+ };
119
+ let changed = false;
120
+ const next = {};
121
+ for (const [provider, list] of Object.entries(order)) {
122
+ const filtered = list.filter((id) => !profileIds.has(id));
123
+ if (filtered.length !== list.length) changed = true;
124
+ if (filtered.length > 0) next[provider] = filtered;
125
+ }
126
+ return {
127
+ next: Object.keys(next).length > 0 ? next : void 0,
128
+ changed
129
+ };
130
+ }
131
+ function pruneAuthProfiles(cfg, profileIds) {
132
+ const profiles = cfg.auth?.profiles;
133
+ const order = cfg.auth?.order;
134
+ const nextProfiles = profiles ? { ...profiles } : void 0;
135
+ let changed = false;
136
+ if (nextProfiles) {
137
+ for (const id of profileIds) if (id in nextProfiles) {
138
+ delete nextProfiles[id];
139
+ changed = true;
140
+ }
141
+ }
142
+ const prunedOrder = pruneAuthOrder(order, profileIds);
143
+ if (prunedOrder.changed) changed = true;
144
+ if (!changed) return {
145
+ next: cfg,
146
+ changed: false
147
+ };
148
+ const nextAuth = nextProfiles || prunedOrder.next ? {
149
+ ...cfg.auth,
150
+ profiles: nextProfiles && Object.keys(nextProfiles).length > 0 ? nextProfiles : void 0,
151
+ order: prunedOrder.next
152
+ } : void 0;
153
+ return {
154
+ next: {
155
+ ...cfg,
156
+ auth: nextAuth
157
+ },
158
+ changed: true
159
+ };
160
+ }
161
+ async function maybeRemoveDeprecatedCliAuthProfiles(cfg, prompter) {
162
+ const store = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
163
+ const deprecatedEntries = resolvePluginProviders({
164
+ config: cfg,
165
+ env: process.env,
166
+ bundledProviderAllowlistCompat: true,
167
+ bundledProviderVitestCompat: true
168
+ }).flatMap((provider) => (provider.deprecatedProfileIds ?? []).filter((profileId) => store.profiles[profileId] || cfg.auth?.profiles?.[profileId]).map((profileId) => ({
169
+ profileId,
170
+ providerId: provider.id,
171
+ providerLabel: provider.label
172
+ })));
173
+ const deprecated = new Set(deprecatedEntries.map((entry) => entry.profileId));
174
+ if (deprecated.size === 0) return cfg;
175
+ const lines = ["Deprecated external CLI auth profiles detected (no longer supported):"];
176
+ for (const entry of deprecatedEntries) {
177
+ const authCommand = resolveProviderAuthLoginCommand({
178
+ provider: entry.providerId,
179
+ config: cfg,
180
+ env: process.env
181
+ }) ?? formatCliCommand("openclaw configure");
182
+ lines.push(`- ${entry.profileId} (${entry.providerLabel}): use ${authCommand}`);
183
+ }
184
+ note$1(lines.join("\n"), "Auth profiles");
185
+ if (!await prompter.confirmRepair({
186
+ message: "Remove deprecated CLI auth profiles now?",
187
+ initialValue: true
188
+ })) return cfg;
189
+ await updateAuthProfileStoreWithLock({ updater: (nextStore) => {
190
+ let mutated = false;
191
+ for (const id of deprecated) {
192
+ if (nextStore.profiles[id]) {
193
+ delete nextStore.profiles[id];
194
+ mutated = true;
195
+ }
196
+ if (nextStore.usageStats?.[id]) {
197
+ delete nextStore.usageStats[id];
198
+ mutated = true;
199
+ }
200
+ }
201
+ if (nextStore.order) for (const [provider, list] of Object.entries(nextStore.order)) {
202
+ const filtered = list.filter((id) => !deprecated.has(id));
203
+ if (filtered.length !== list.length) {
204
+ mutated = true;
205
+ if (filtered.length > 0) nextStore.order[provider] = filtered;
206
+ else delete nextStore.order[provider];
207
+ }
208
+ }
209
+ if (nextStore.lastGood) {
210
+ for (const [provider, profileId] of Object.entries(nextStore.lastGood)) if (deprecated.has(profileId)) {
211
+ delete nextStore.lastGood[provider];
212
+ mutated = true;
213
+ }
214
+ }
215
+ return mutated;
216
+ } });
217
+ const pruned = pruneAuthProfiles(cfg, deprecated);
218
+ if (pruned.changed) note$1(Array.from(deprecated.values()).map((id) => `- removed ${id} from config`).join("\n"), "Doctor changes");
219
+ return pruned.next;
220
+ }
221
+ function resolveUnusableProfileHint(params) {
222
+ if (params.kind === "disabled") {
223
+ if (params.reason === "billing") return "Top up credits (provider billing) or switch provider.";
224
+ if (params.reason === "auth_permanent" || params.reason === "auth") return "Refresh or replace credentials, then retry.";
225
+ }
226
+ return "Wait for cooldown or switch provider.";
227
+ }
228
+ function formatAuthIssueHint(issue) {
229
+ if (issue.reasonCode === "invalid_expires") return "Invalid token expires metadata. Set a future Unix ms timestamp or remove expires.";
230
+ if (issue.provider === "anthropic" && issue.profileId === "anthropic:claude-cli") return `Deprecated profile. ${buildProviderAuthRecoveryHint({ provider: "anthropic" })}`;
231
+ if (issue.provider === "openai-codex" && issue.profileId === "openai-codex:codex-cli") return `Deprecated profile. ${buildProviderAuthRecoveryHint({ provider: "openai-codex" })}`;
232
+ return buildProviderAuthRecoveryHint({ provider: issue.provider }).replace(/^Run /, "Re-auth via ");
233
+ }
234
+ function formatAuthIssueLine(issue) {
235
+ const remaining = issue.remainingMs !== void 0 ? ` (${formatRemainingShort(issue.remainingMs)})` : "";
236
+ const hint = formatAuthIssueHint(issue);
237
+ const reason = issue.reasonCode ? ` [${issue.reasonCode}]` : "";
238
+ return `- ${issue.profileId}: ${issue.status}${reason}${remaining}${hint ? ` — ${hint}` : ""}`;
239
+ }
240
+ async function noteAuthProfileHealth(params) {
241
+ const store = ensureAuthProfileStore(void 0, { allowKeychainPrompt: params.allowKeychainPrompt });
242
+ const unusable = (() => {
243
+ const now = Date.now();
244
+ const out = [];
245
+ for (const profileId of Object.keys(store.usageStats ?? {})) {
246
+ const until = resolveProfileUnusableUntilForDisplay(store, profileId);
247
+ if (!until || now >= until) continue;
248
+ const stats = store.usageStats?.[profileId];
249
+ const remaining = formatRemainingShort(until - now);
250
+ const disabledActive = typeof stats?.disabledUntil === "number" && now < stats.disabledUntil;
251
+ const kind = disabledActive ? `disabled${stats.disabledReason ? `:${stats.disabledReason}` : ""}` : "cooldown";
252
+ const hint = resolveUnusableProfileHint({
253
+ kind: disabledActive ? "disabled" : "cooldown",
254
+ reason: stats?.disabledReason
255
+ });
256
+ out.push(`- ${profileId}: ${kind} (${remaining})${hint ? ` — ${hint}` : ""}`);
257
+ }
258
+ return out;
259
+ })();
260
+ if (unusable.length > 0) note$1(unusable.join("\n"), "Auth profile cooldowns");
261
+ let summary = buildAuthHealthSummary({
262
+ store,
263
+ cfg: params.cfg,
264
+ warnAfterMs: DEFAULT_OAUTH_WARN_MS
265
+ });
266
+ const findIssues = () => summary.profiles.filter((profile) => (profile.type === "oauth" || profile.type === "token") && (profile.status === "expired" || profile.status === "expiring" || profile.status === "missing"));
267
+ let issues = findIssues();
268
+ if (issues.length === 0) return;
269
+ if (await params.prompter.confirmRepair({
270
+ message: "Refresh expiring OAuth tokens now? (static tokens need re-auth)",
271
+ initialValue: true
272
+ })) {
273
+ const refreshTargets = issues.filter((issue) => issue.type === "oauth" && [
274
+ "expired",
275
+ "expiring",
276
+ "missing"
277
+ ].includes(issue.status));
278
+ const errors = [];
279
+ for (const profile of refreshTargets) try {
280
+ await resolveApiKeyForProfile({
281
+ cfg: params.cfg,
282
+ store,
283
+ profileId: profile.profileId
284
+ });
285
+ } catch (err) {
286
+ errors.push(`- ${profile.profileId}: ${err instanceof Error ? err.message : String(err)}`);
287
+ }
288
+ if (errors.length > 0) note$1(errors.join("\n"), "OAuth refresh errors");
289
+ summary = buildAuthHealthSummary({
290
+ store: ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }),
291
+ cfg: params.cfg,
292
+ warnAfterMs: DEFAULT_OAUTH_WARN_MS
293
+ });
294
+ issues = findIssues();
295
+ }
296
+ if (issues.length > 0) note$1(issues.map((issue) => formatAuthIssueLine({
297
+ profileId: issue.profileId,
298
+ provider: issue.provider,
299
+ status: issue.status,
300
+ reasonCode: issue.reasonCode,
301
+ remainingMs: issue.remainingMs
302
+ })).join("\n"), "Model auth");
303
+ }
304
+ //#endregion
305
+ //#region src/commands/doctor-bootstrap-size.ts
306
+ function formatInt(value) {
307
+ return new Intl.NumberFormat("en-US").format(Math.max(0, Math.floor(value)));
308
+ }
309
+ function formatPercent(numerator, denominator) {
310
+ if (!Number.isFinite(denominator) || denominator <= 0) return "0%";
311
+ return `${Math.min(100, Math.max(0, Math.round(numerator / denominator * 100)))}%`;
312
+ }
313
+ function formatCauses(causes) {
314
+ if (causes.length === 0) return "unknown";
315
+ return causes.map((cause) => cause === "per-file-limit" ? "max/file" : "max/total").join(", ");
316
+ }
317
+ async function noteBootstrapFileSize(cfg) {
318
+ const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
319
+ const bootstrapMaxChars = resolveBootstrapMaxChars(cfg);
320
+ const bootstrapTotalMaxChars = resolveBootstrapTotalMaxChars(cfg);
321
+ const { bootstrapFiles, contextFiles } = await resolveBootstrapContextForRun({
322
+ workspaceDir,
323
+ config: cfg
324
+ });
325
+ const analysis = analyzeBootstrapBudget({
326
+ files: buildBootstrapInjectionStats({
327
+ bootstrapFiles,
328
+ injectedFiles: contextFiles
329
+ }),
330
+ bootstrapMaxChars,
331
+ bootstrapTotalMaxChars
332
+ });
333
+ if (!analysis.hasTruncation && analysis.nearLimitFiles.length === 0 && !analysis.totalNearLimit) return analysis;
334
+ const lines = [];
335
+ if (analysis.hasTruncation) {
336
+ lines.push("Workspace bootstrap files exceed limits and will be truncated:");
337
+ for (const file of analysis.truncatedFiles) {
338
+ const truncatedChars = Math.max(0, file.rawChars - file.injectedChars);
339
+ lines.push(`- ${file.name}: ${formatInt(file.rawChars)} raw / ${formatInt(file.injectedChars)} injected (${formatPercent(truncatedChars, file.rawChars)} truncated; ${formatCauses(file.causes)})`);
340
+ }
341
+ } else lines.push("Workspace bootstrap files are near configured limits:");
342
+ const nonTruncatedNearLimit = analysis.nearLimitFiles.filter((file) => !file.truncated);
343
+ if (nonTruncatedNearLimit.length > 0) for (const file of nonTruncatedNearLimit) lines.push(`- ${file.name}: ${formatInt(file.rawChars)} chars (${formatPercent(file.rawChars, bootstrapMaxChars)} of max/file ${formatInt(bootstrapMaxChars)})`);
344
+ lines.push(`Total bootstrap injected chars: ${formatInt(analysis.totals.injectedChars)} (${formatPercent(analysis.totals.injectedChars, bootstrapTotalMaxChars)} of max/total ${formatInt(bootstrapTotalMaxChars)}).`);
345
+ lines.push(`Total bootstrap raw chars (before truncation): ${formatInt(analysis.totals.rawChars)}.`);
346
+ const needsPerFileTip = analysis.truncatedFiles.some((file) => file.causes.includes("per-file-limit")) || analysis.nearLimitFiles.length > 0;
347
+ const needsTotalTip = analysis.truncatedFiles.some((file) => file.causes.includes("total-limit")) || analysis.totalNearLimit;
348
+ if (needsPerFileTip || needsTotalTip) lines.push("");
349
+ if (needsPerFileTip) lines.push("- Tip: tune `agents.defaults.bootstrapMaxChars` for per-file limits.");
350
+ if (needsTotalTip) lines.push("- Tip: tune `agents.defaults.bootstrapTotalMaxChars` for total-budget limits.");
351
+ note$1(lines.join("\n"), "Bootstrap file size");
352
+ return analysis;
353
+ }
354
+ //#endregion
355
+ //#region src/commands/doctor-browser.ts
356
+ const CHROME_MCP_MIN_MAJOR = 144;
357
+ const REMOTE_DEBUGGING_PAGES = [
358
+ "chrome://inspect/#remote-debugging",
359
+ "brave://inspect/#remote-debugging",
360
+ "edge://inspect/#remote-debugging"
361
+ ].join(", ");
362
+ function asRecord(value) {
363
+ return value && typeof value === "object" && !Array.isArray(value) ? value : null;
364
+ }
365
+ function collectChromeMcpProfiles(cfg) {
366
+ const browser = asRecord(cfg.browser);
367
+ if (!browser) return [];
368
+ const profiles = /* @__PURE__ */ new Map();
369
+ if ((typeof browser.defaultProfile === "string" ? browser.defaultProfile.trim() : "") === "user") profiles.set("user", { name: "user" });
370
+ const configuredProfiles = asRecord(browser.profiles);
371
+ if (!configuredProfiles) return [...profiles.values()].toSorted((a, b) => a.name.localeCompare(b.name));
372
+ for (const [profileName, rawProfile] of Object.entries(configuredProfiles)) {
373
+ const profile = asRecord(rawProfile);
374
+ if ((typeof profile?.driver === "string" ? profile.driver.trim() : "") === "existing-session") {
375
+ const userDataDir = typeof profile?.userDataDir === "string" ? profile.userDataDir.trim() : void 0;
376
+ profiles.set(profileName, {
377
+ name: profileName,
378
+ userDataDir: userDataDir || void 0
379
+ });
380
+ }
381
+ }
382
+ return [...profiles.values()].toSorted((a, b) => a.name.localeCompare(b.name));
383
+ }
384
+ async function noteChromeMcpBrowserReadiness(cfg, deps) {
385
+ const profiles = collectChromeMcpProfiles(cfg);
386
+ if (profiles.length === 0) return;
387
+ const noteFn = deps?.noteFn ?? note$1;
388
+ const platform = deps?.platform ?? process.platform;
389
+ const resolveChromeExecutable = deps?.resolveChromeExecutable ?? resolveGoogleChromeExecutableForPlatform;
390
+ const readVersion = deps?.readVersion ?? readBrowserVersion;
391
+ const explicitProfiles = profiles.filter((profile) => profile.userDataDir);
392
+ const autoConnectProfiles = profiles.filter((profile) => !profile.userDataDir);
393
+ const profileLabel = profiles.map((profile) => profile.name).join(", ");
394
+ if (autoConnectProfiles.length === 0) {
395
+ noteFn([
396
+ `- Chrome MCP existing-session is configured for profile(s): ${profileLabel}.`,
397
+ "- These profiles use an explicit Chromium user data directory instead of Chrome's default auto-connect path.",
398
+ `- Verify the matching Chromium-based browser is version ${CHROME_MCP_MIN_MAJOR}+ on the same host as the Gateway or node.`,
399
+ `- Enable remote debugging in that browser's inspect page (${REMOTE_DEBUGGING_PAGES}).`,
400
+ "- Keep the browser running and accept the attach consent prompt the first time OpenClaw connects."
401
+ ].join("\n"), "Browser");
402
+ return;
403
+ }
404
+ const chrome = resolveChromeExecutable(platform);
405
+ const autoProfileLabel = autoConnectProfiles.map((profile) => profile.name).join(", ");
406
+ if (!chrome) {
407
+ const lines = [
408
+ `- Chrome MCP existing-session is configured for profile(s): ${profileLabel}.`,
409
+ `- Google Chrome was not found on this host for auto-connect profile(s): ${autoProfileLabel}. OpenClaw does not bundle Chrome.`,
410
+ `- Install Google Chrome ${CHROME_MCP_MIN_MAJOR}+ on the same host as the Gateway or node, or set browser.profiles.<name>.userDataDir for a different Chromium-based browser.`,
411
+ `- Enable remote debugging in the browser inspect page (${REMOTE_DEBUGGING_PAGES}).`,
412
+ "- Keep the browser running and accept the attach consent prompt the first time OpenClaw connects.",
413
+ "- Docker, headless, and sandbox browser flows stay on raw CDP; this check only applies to host-local Chrome MCP attach."
414
+ ];
415
+ if (explicitProfiles.length > 0) lines.push(`- Profiles with explicit userDataDir skip Chrome auto-detection: ${explicitProfiles.map((profile) => profile.name).join(", ")}.`);
416
+ noteFn(lines.join("\n"), "Browser");
417
+ return;
418
+ }
419
+ const versionRaw = readVersion(chrome.path);
420
+ const major = parseBrowserMajorVersion(versionRaw);
421
+ const lines = [`- Chrome MCP existing-session is configured for profile(s): ${profileLabel}.`, `- Chrome path: ${chrome.path}`];
422
+ if (!versionRaw || major === null) lines.push(`- Could not determine the installed Chrome version. Chrome MCP requires Google Chrome ${CHROME_MCP_MIN_MAJOR}+ on this host.`);
423
+ else if (major < CHROME_MCP_MIN_MAJOR) lines.push(`- Detected Chrome ${versionRaw}, which is too old for Chrome MCP existing-session attach. Upgrade to Chrome ${CHROME_MCP_MIN_MAJOR}+.`);
424
+ else lines.push(`- Detected Chrome ${versionRaw}.`);
425
+ lines.push(`- Enable remote debugging in the browser inspect page (${REMOTE_DEBUGGING_PAGES}).`);
426
+ lines.push("- Keep the browser running and accept the attach consent prompt the first time OpenClaw connects.");
427
+ if (explicitProfiles.length > 0) lines.push(`- Profiles with explicit userDataDir still need manual validation of the matching Chromium-based browser: ${explicitProfiles.map((profile) => profile.name).join(", ")}.`);
428
+ noteFn(lines.join("\n"), "Browser");
429
+ }
430
+ //#endregion
431
+ //#region src/commands/doctor-legacy-config.ts
432
+ function normalizeCompatibilityConfigValues(cfg) {
433
+ const changes = [];
434
+ const NANO_BANANA_SKILL_KEY = "nano-banana-pro";
435
+ const NANO_BANANA_MODEL = "google/gemini-3-pro-image-preview";
436
+ let next = cfg;
437
+ const isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
438
+ const normalizeDmAliases = (params) => {
439
+ let changed = false;
440
+ let updated = params.entry;
441
+ const rawDm = updated.dm;
442
+ const dm = isRecord(rawDm) ? structuredClone(rawDm) : null;
443
+ let dmChanged = false;
444
+ const allowFromEqual = (a, b) => {
445
+ if (!Array.isArray(a) || !Array.isArray(b)) return false;
446
+ const na = a.map((v) => String(v).trim()).filter(Boolean);
447
+ const nb = b.map((v) => String(v).trim()).filter(Boolean);
448
+ if (na.length !== nb.length) return false;
449
+ return na.every((v, i) => v === nb[i]);
450
+ };
451
+ const topDmPolicy = updated.dmPolicy;
452
+ const legacyDmPolicy = dm?.policy;
453
+ if (topDmPolicy === void 0 && legacyDmPolicy !== void 0) {
454
+ updated = {
455
+ ...updated,
456
+ dmPolicy: legacyDmPolicy
457
+ };
458
+ changed = true;
459
+ if (dm) {
460
+ delete dm.policy;
461
+ dmChanged = true;
462
+ }
463
+ changes.push(`Moved ${params.pathPrefix}.dm.policy → ${params.pathPrefix}.dmPolicy.`);
464
+ } else if (topDmPolicy !== void 0 && legacyDmPolicy !== void 0) {
465
+ if (topDmPolicy === legacyDmPolicy) {
466
+ if (dm) {
467
+ delete dm.policy;
468
+ dmChanged = true;
469
+ changes.push(`Removed ${params.pathPrefix}.dm.policy (dmPolicy already set).`);
470
+ }
471
+ }
472
+ }
473
+ const topAllowFrom = updated.allowFrom;
474
+ const legacyAllowFrom = dm?.allowFrom;
475
+ if (topAllowFrom === void 0 && legacyAllowFrom !== void 0) {
476
+ updated = {
477
+ ...updated,
478
+ allowFrom: legacyAllowFrom
479
+ };
480
+ changed = true;
481
+ if (dm) {
482
+ delete dm.allowFrom;
483
+ dmChanged = true;
484
+ }
485
+ changes.push(`Moved ${params.pathPrefix}.dm.allowFrom → ${params.pathPrefix}.allowFrom.`);
486
+ } else if (topAllowFrom !== void 0 && legacyAllowFrom !== void 0) {
487
+ if (allowFromEqual(topAllowFrom, legacyAllowFrom)) {
488
+ if (dm) {
489
+ delete dm.allowFrom;
490
+ dmChanged = true;
491
+ changes.push(`Removed ${params.pathPrefix}.dm.allowFrom (allowFrom already set).`);
492
+ }
493
+ }
494
+ }
495
+ if (dm && isRecord(rawDm) && dmChanged) if (Object.keys(dm).length === 0) {
496
+ if (updated.dm !== void 0) {
497
+ const { dm: _ignored, ...rest } = updated;
498
+ updated = rest;
499
+ changed = true;
500
+ changes.push(`Removed empty ${params.pathPrefix}.dm after migration.`);
501
+ }
502
+ } else {
503
+ updated = {
504
+ ...updated,
505
+ dm
506
+ };
507
+ changed = true;
508
+ }
509
+ return {
510
+ entry: updated,
511
+ changed
512
+ };
513
+ };
514
+ const normalizePreviewStreamingAliases = (params) => {
515
+ let updated = params.entry;
516
+ const hadLegacyStreamMode = updated.streamMode !== void 0;
517
+ const beforeStreaming = updated.streaming;
518
+ const resolved = params.resolveStreaming(updated);
519
+ if (!(hadLegacyStreamMode || typeof beforeStreaming === "boolean" || typeof beforeStreaming === "string" && beforeStreaming !== resolved)) return {
520
+ entry: updated,
521
+ changed: false
522
+ };
523
+ let changed = false;
524
+ if (beforeStreaming !== resolved) {
525
+ updated = {
526
+ ...updated,
527
+ streaming: resolved
528
+ };
529
+ changed = true;
530
+ }
531
+ if (hadLegacyStreamMode) {
532
+ const { streamMode: _ignored, ...rest } = updated;
533
+ updated = rest;
534
+ changed = true;
535
+ changes.push(`Moved ${params.pathPrefix}.streamMode → ${params.pathPrefix}.streaming (${resolved}).`);
536
+ }
537
+ if (typeof beforeStreaming === "boolean") changes.push(`Normalized ${params.pathPrefix}.streaming boolean → enum (${resolved}).`);
538
+ else if (typeof beforeStreaming === "string" && beforeStreaming !== resolved) changes.push(`Normalized ${params.pathPrefix}.streaming (${beforeStreaming}) → (${resolved}).`);
539
+ return {
540
+ entry: updated,
541
+ changed
542
+ };
543
+ };
544
+ const normalizeSlackStreamingAliases = (params) => {
545
+ let updated = params.entry;
546
+ const hadLegacyStreamMode = updated.streamMode !== void 0;
547
+ const legacyStreaming = updated.streaming;
548
+ const beforeStreaming = updated.streaming;
549
+ const beforeNativeStreaming = updated.nativeStreaming;
550
+ const resolvedStreaming = resolveSlackStreamingMode(updated);
551
+ const resolvedNativeStreaming = resolveSlackNativeStreaming(updated);
552
+ if (!(hadLegacyStreamMode || typeof legacyStreaming === "boolean" || typeof legacyStreaming === "string" && legacyStreaming !== resolvedStreaming)) return {
553
+ entry: updated,
554
+ changed: false
555
+ };
556
+ let changed = false;
557
+ if (beforeStreaming !== resolvedStreaming) {
558
+ updated = {
559
+ ...updated,
560
+ streaming: resolvedStreaming
561
+ };
562
+ changed = true;
563
+ }
564
+ if (typeof beforeNativeStreaming !== "boolean" || beforeNativeStreaming !== resolvedNativeStreaming) {
565
+ updated = {
566
+ ...updated,
567
+ nativeStreaming: resolvedNativeStreaming
568
+ };
569
+ changed = true;
570
+ }
571
+ if (hadLegacyStreamMode) {
572
+ const { streamMode: _ignored, ...rest } = updated;
573
+ updated = rest;
574
+ changed = true;
575
+ changes.push(formatSlackStreamModeMigrationMessage(params.pathPrefix, resolvedStreaming));
576
+ }
577
+ if (typeof legacyStreaming === "boolean") changes.push(formatSlackStreamingBooleanMigrationMessage(params.pathPrefix, resolvedNativeStreaming));
578
+ else if (typeof legacyStreaming === "string" && legacyStreaming !== resolvedStreaming) changes.push(`Normalized ${params.pathPrefix}.streaming (${legacyStreaming}) → (${resolvedStreaming}).`);
579
+ return {
580
+ entry: updated,
581
+ changed
582
+ };
583
+ };
584
+ const normalizeStreamingAliasesForProvider = (params) => {
585
+ if (params.provider === "telegram") return normalizePreviewStreamingAliases({
586
+ entry: params.entry,
587
+ pathPrefix: params.pathPrefix,
588
+ resolveStreaming: resolveTelegramPreviewStreamMode
589
+ });
590
+ if (params.provider === "discord") return normalizePreviewStreamingAliases({
591
+ entry: params.entry,
592
+ pathPrefix: params.pathPrefix,
593
+ resolveStreaming: resolveDiscordPreviewStreamMode
594
+ });
595
+ return normalizeSlackStreamingAliases({
596
+ entry: params.entry,
597
+ pathPrefix: params.pathPrefix
598
+ });
599
+ };
600
+ const normalizeProvider = (provider) => {
601
+ const rawEntry = next.channels?.[provider];
602
+ if (!isRecord(rawEntry)) return;
603
+ let updated = rawEntry;
604
+ let changed = false;
605
+ if (provider !== "telegram") {
606
+ const base = normalizeDmAliases({
607
+ provider,
608
+ entry: rawEntry,
609
+ pathPrefix: `channels.${provider}`
610
+ });
611
+ updated = base.entry;
612
+ changed = base.changed;
613
+ }
614
+ const providerStreaming = normalizeStreamingAliasesForProvider({
615
+ provider,
616
+ entry: updated,
617
+ pathPrefix: `channels.${provider}`
618
+ });
619
+ updated = providerStreaming.entry;
620
+ changed = changed || providerStreaming.changed;
621
+ const rawAccounts = updated.accounts;
622
+ if (isRecord(rawAccounts)) {
623
+ let accountsChanged = false;
624
+ const accounts = { ...rawAccounts };
625
+ for (const [accountId, rawAccount] of Object.entries(rawAccounts)) {
626
+ if (!isRecord(rawAccount)) continue;
627
+ let accountEntry = rawAccount;
628
+ let accountChanged = false;
629
+ if (provider !== "telegram") {
630
+ const res = normalizeDmAliases({
631
+ provider,
632
+ entry: rawAccount,
633
+ pathPrefix: `channels.${provider}.accounts.${accountId}`
634
+ });
635
+ accountEntry = res.entry;
636
+ accountChanged = res.changed;
637
+ }
638
+ const accountStreaming = normalizeStreamingAliasesForProvider({
639
+ provider,
640
+ entry: accountEntry,
641
+ pathPrefix: `channels.${provider}.accounts.${accountId}`
642
+ });
643
+ accountEntry = accountStreaming.entry;
644
+ accountChanged = accountChanged || accountStreaming.changed;
645
+ if (accountChanged) {
646
+ accounts[accountId] = accountEntry;
647
+ accountsChanged = true;
648
+ }
649
+ }
650
+ if (accountsChanged) {
651
+ updated = {
652
+ ...updated,
653
+ accounts
654
+ };
655
+ changed = true;
656
+ }
657
+ }
658
+ if (changed) next = {
659
+ ...next,
660
+ channels: {
661
+ ...next.channels,
662
+ [provider]: updated
663
+ }
664
+ };
665
+ };
666
+ const normalizeLegacyBrowserProfiles = () => {
667
+ const rawBrowser = next.browser;
668
+ if (!isRecord(rawBrowser)) return;
669
+ const browser = structuredClone(rawBrowser);
670
+ let browserChanged = false;
671
+ if ("relayBindHost" in browser) {
672
+ delete browser.relayBindHost;
673
+ browserChanged = true;
674
+ changes.push("Removed browser.relayBindHost (legacy Chrome extension relay setting; host-local Chrome now uses Chrome MCP existing-session attach).");
675
+ }
676
+ const rawProfiles = browser.profiles;
677
+ if (!isRecord(rawProfiles)) {
678
+ if (!browserChanged) return;
679
+ next = {
680
+ ...next,
681
+ browser
682
+ };
683
+ return;
684
+ }
685
+ const profiles = { ...rawProfiles };
686
+ let profilesChanged = false;
687
+ for (const [profileName, rawProfile] of Object.entries(rawProfiles)) {
688
+ if (!isRecord(rawProfile)) continue;
689
+ if ((typeof rawProfile.driver === "string" ? rawProfile.driver.trim() : "") !== "extension") continue;
690
+ profiles[profileName] = {
691
+ ...rawProfile,
692
+ driver: "existing-session"
693
+ };
694
+ profilesChanged = true;
695
+ changes.push(`Moved browser.profiles.${profileName}.driver "extension" → "existing-session" (Chrome MCP attach).`);
696
+ }
697
+ if (profilesChanged) {
698
+ browser.profiles = profiles;
699
+ browserChanged = true;
700
+ }
701
+ if (!browserChanged) return;
702
+ next = {
703
+ ...next,
704
+ browser
705
+ };
706
+ };
707
+ const seedMissingDefaultAccountsFromSingleAccountBase = () => {
708
+ const channels = next.channels;
709
+ if (!channels) return;
710
+ let channelsChanged = false;
711
+ const nextChannels = { ...channels };
712
+ for (const [channelId, rawChannel] of Object.entries(channels)) {
713
+ if (!isRecord(rawChannel)) continue;
714
+ const rawAccounts = rawChannel.accounts;
715
+ if (!isRecord(rawAccounts)) continue;
716
+ const accountKeys = Object.keys(rawAccounts);
717
+ if (accountKeys.length === 0) continue;
718
+ if (accountKeys.some((key) => key.trim().toLowerCase() === "default")) continue;
719
+ const keysToMove = Object.entries(rawChannel).filter(([key, value]) => key !== "accounts" && key !== "enabled" && value !== void 0 && shouldMoveSingleAccountChannelKey({
720
+ channelKey: channelId,
721
+ key
722
+ })).map(([key]) => key);
723
+ if (keysToMove.length === 0) continue;
724
+ const defaultAccount = {};
725
+ for (const key of keysToMove) {
726
+ const value = rawChannel[key];
727
+ defaultAccount[key] = value && typeof value === "object" ? structuredClone(value) : value;
728
+ }
729
+ const nextChannel = { ...rawChannel };
730
+ for (const key of keysToMove) delete nextChannel[key];
731
+ nextChannel.accounts = {
732
+ ...rawAccounts,
733
+ [DEFAULT_ACCOUNT_ID]: defaultAccount
734
+ };
735
+ nextChannels[channelId] = nextChannel;
736
+ channelsChanged = true;
737
+ changes.push(`Moved channels.${channelId} single-account top-level values into channels.${channelId}.accounts.default.`);
738
+ }
739
+ if (!channelsChanged) return;
740
+ next = {
741
+ ...next,
742
+ channels: nextChannels
743
+ };
744
+ };
745
+ normalizeProvider("telegram");
746
+ normalizeProvider("slack");
747
+ normalizeProvider("discord");
748
+ seedMissingDefaultAccountsFromSingleAccountBase();
749
+ normalizeLegacyBrowserProfiles();
750
+ const webSearchMigration = migrateLegacyWebSearchConfig(next);
751
+ if (webSearchMigration.changes.length > 0) {
752
+ next = webSearchMigration.config;
753
+ changes.push(...webSearchMigration.changes);
754
+ }
755
+ const normalizeBrowserSsrFPolicyAlias = () => {
756
+ const rawBrowser = next.browser;
757
+ if (!isRecord(rawBrowser)) return;
758
+ const rawSsrFPolicy = rawBrowser.ssrfPolicy;
759
+ if (!isRecord(rawSsrFPolicy) || !("allowPrivateNetwork" in rawSsrFPolicy)) return;
760
+ const legacyAllowPrivateNetwork = rawSsrFPolicy.allowPrivateNetwork;
761
+ const currentDangerousAllowPrivateNetwork = rawSsrFPolicy.dangerouslyAllowPrivateNetwork;
762
+ let resolvedDangerousAllowPrivateNetwork = currentDangerousAllowPrivateNetwork;
763
+ if (typeof legacyAllowPrivateNetwork === "boolean" || typeof currentDangerousAllowPrivateNetwork === "boolean") resolvedDangerousAllowPrivateNetwork = legacyAllowPrivateNetwork === true || currentDangerousAllowPrivateNetwork === true;
764
+ else if (currentDangerousAllowPrivateNetwork === void 0) resolvedDangerousAllowPrivateNetwork = legacyAllowPrivateNetwork;
765
+ const nextSsrFPolicy = { ...rawSsrFPolicy };
766
+ delete nextSsrFPolicy.allowPrivateNetwork;
767
+ if (resolvedDangerousAllowPrivateNetwork !== void 0) nextSsrFPolicy.dangerouslyAllowPrivateNetwork = resolvedDangerousAllowPrivateNetwork;
768
+ const migratedBrowser = { ...next.browser };
769
+ migratedBrowser.ssrfPolicy = nextSsrFPolicy;
770
+ next = {
771
+ ...next,
772
+ browser: migratedBrowser
773
+ };
774
+ changes.push(`Moved browser.ssrfPolicy.allowPrivateNetwork → browser.ssrfPolicy.dangerouslyAllowPrivateNetwork (${String(resolvedDangerousAllowPrivateNetwork)}).`);
775
+ };
776
+ const normalizeLegacyNanoBananaSkill = () => {
777
+ const rawSkills = next.skills;
778
+ if (!isRecord(rawSkills)) return;
779
+ let skillsChanged = false;
780
+ let skills = structuredClone(rawSkills);
781
+ if (Array.isArray(skills.allowBundled)) {
782
+ const allowBundled = skills.allowBundled.filter((value) => typeof value !== "string" || value.trim() !== NANO_BANANA_SKILL_KEY);
783
+ if (allowBundled.length !== skills.allowBundled.length) {
784
+ if (allowBundled.length === 0) {
785
+ delete skills.allowBundled;
786
+ changes.push(`Removed skills.allowBundled entry for ${NANO_BANANA_SKILL_KEY}.`);
787
+ } else {
788
+ skills.allowBundled = allowBundled;
789
+ changes.push(`Removed ${NANO_BANANA_SKILL_KEY} from skills.allowBundled.`);
790
+ }
791
+ skillsChanged = true;
792
+ }
793
+ }
794
+ const rawEntries = skills.entries;
795
+ if (!isRecord(rawEntries)) {
796
+ if (skillsChanged) next = {
797
+ ...next,
798
+ skills
799
+ };
800
+ return;
801
+ }
802
+ const rawLegacyEntry = rawEntries[NANO_BANANA_SKILL_KEY];
803
+ if (!isRecord(rawLegacyEntry)) {
804
+ if (skillsChanged) next = {
805
+ ...next,
806
+ skills
807
+ };
808
+ return;
809
+ }
810
+ if (next.agents?.defaults?.imageGenerationModel === void 0) {
811
+ next = {
812
+ ...next,
813
+ agents: {
814
+ ...next.agents,
815
+ defaults: {
816
+ ...next.agents?.defaults,
817
+ imageGenerationModel: { primary: NANO_BANANA_MODEL }
818
+ }
819
+ }
820
+ };
821
+ changes.push(`Moved skills.entries.${NANO_BANANA_SKILL_KEY} → agents.defaults.imageGenerationModel.primary (${NANO_BANANA_MODEL}).`);
822
+ }
823
+ const legacyEnv = isRecord(rawLegacyEntry.env) ? rawLegacyEntry.env : void 0;
824
+ const legacyEnvApiKey = typeof legacyEnv?.GEMINI_API_KEY === "string" ? legacyEnv.GEMINI_API_KEY.trim() : "";
825
+ const legacyApiKey = legacyEnvApiKey || (typeof rawLegacyEntry.apiKey === "string" ? rawLegacyEntry.apiKey.trim() : rawLegacyEntry.apiKey && isRecord(rawLegacyEntry.apiKey) ? structuredClone(rawLegacyEntry.apiKey) : void 0);
826
+ const rawModels = isRecord(next.models) ? structuredClone(next.models) : {};
827
+ const rawProviders = isRecord(rawModels.providers) ? { ...rawModels.providers } : {};
828
+ const rawGoogle = isRecord(rawProviders.google) ? { ...rawProviders.google } : {};
829
+ if (!(rawGoogle.apiKey !== void 0) && legacyApiKey) {
830
+ rawGoogle.apiKey = legacyApiKey;
831
+ rawProviders.google = rawGoogle;
832
+ rawModels.providers = rawProviders;
833
+ next = {
834
+ ...next,
835
+ models: rawModels
836
+ };
837
+ changes.push(`Moved skills.entries.${NANO_BANANA_SKILL_KEY}.${legacyEnvApiKey ? "env.GEMINI_API_KEY" : "apiKey"} → models.providers.google.apiKey.`);
838
+ }
839
+ const entries = { ...rawEntries };
840
+ delete entries[NANO_BANANA_SKILL_KEY];
841
+ if (Object.keys(entries).length === 0) {
842
+ delete skills.entries;
843
+ changes.push(`Removed legacy skills.entries.${NANO_BANANA_SKILL_KEY}.`);
844
+ } else {
845
+ skills.entries = entries;
846
+ changes.push(`Removed legacy skills.entries.${NANO_BANANA_SKILL_KEY}.`);
847
+ }
848
+ skillsChanged = true;
849
+ if (Object.keys(skills).length === 0) {
850
+ const { skills: _ignored, ...rest } = next;
851
+ next = rest;
852
+ return;
853
+ }
854
+ if (skillsChanged) next = {
855
+ ...next,
856
+ skills
857
+ };
858
+ };
859
+ const normalizeLegacyTalkConfig = () => {
860
+ const rawTalk = next.talk;
861
+ if (!isRecord(rawTalk)) return;
862
+ const normalizedTalk = normalizeTalkSection(rawTalk);
863
+ if (!normalizedTalk) return;
864
+ if (JSON.stringify(normalizedTalk) === JSON.stringify(rawTalk)) return;
865
+ const hasProviderShape = typeof rawTalk.provider === "string" || isRecord(rawTalk.providers);
866
+ next = {
867
+ ...next,
868
+ talk: normalizedTalk
869
+ };
870
+ if (hasProviderShape) {
871
+ changes.push("Normalized talk.provider/providers shape (trimmed provider ids and merged missing compatibility fields).");
872
+ return;
873
+ }
874
+ changes.push(`Moved legacy talk flat fields → talk.provider/talk.providers.${DEFAULT_TALK_PROVIDER}.`);
875
+ };
876
+ const normalizeLegacyCrossContextMessageConfig = () => {
877
+ const rawTools = next.tools;
878
+ if (!isRecord(rawTools)) return;
879
+ const rawMessage = rawTools.message;
880
+ if (!isRecord(rawMessage) || !("allowCrossContextSend" in rawMessage)) return;
881
+ const legacyAllowCrossContextSend = rawMessage.allowCrossContextSend;
882
+ if (typeof legacyAllowCrossContextSend !== "boolean") return;
883
+ const nextMessage = { ...rawMessage };
884
+ delete nextMessage.allowCrossContextSend;
885
+ if (legacyAllowCrossContextSend) {
886
+ const rawCrossContext = isRecord(nextMessage.crossContext) ? structuredClone(nextMessage.crossContext) : {};
887
+ rawCrossContext.allowWithinProvider = true;
888
+ rawCrossContext.allowAcrossProviders = true;
889
+ nextMessage.crossContext = rawCrossContext;
890
+ changes.push("Moved tools.message.allowCrossContextSend → tools.message.crossContext.allowWithinProvider/allowAcrossProviders (true).");
891
+ } else changes.push("Removed tools.message.allowCrossContextSend=false (default cross-context policy already matches canonical settings).");
892
+ next = {
893
+ ...next,
894
+ tools: {
895
+ ...next.tools,
896
+ message: nextMessage
897
+ }
898
+ };
899
+ };
900
+ const mapDeepgramCompatToProviderOptions = (rawCompat) => {
901
+ const providerOptions = {};
902
+ if (typeof rawCompat.detectLanguage === "boolean") providerOptions.detect_language = rawCompat.detectLanguage;
903
+ if (typeof rawCompat.punctuate === "boolean") providerOptions.punctuate = rawCompat.punctuate;
904
+ if (typeof rawCompat.smartFormat === "boolean") providerOptions.smart_format = rawCompat.smartFormat;
905
+ return providerOptions;
906
+ };
907
+ const migrateLegacyDeepgramCompat = (params) => {
908
+ const rawCompat = isRecord(params.owner.deepgram) ? structuredClone(params.owner.deepgram) : null;
909
+ if (!rawCompat) return false;
910
+ const compatProviderOptions = mapDeepgramCompatToProviderOptions(rawCompat);
911
+ const currentProviderOptions = isRecord(params.owner.providerOptions) ? structuredClone(params.owner.providerOptions) : {};
912
+ const currentDeepgram = isRecord(currentProviderOptions.deepgram) ? structuredClone(currentProviderOptions.deepgram) : {};
913
+ const mergedDeepgram = {
914
+ ...compatProviderOptions,
915
+ ...currentDeepgram
916
+ };
917
+ delete params.owner.deepgram;
918
+ currentProviderOptions.deepgram = mergedDeepgram;
919
+ params.owner.providerOptions = currentProviderOptions;
920
+ const hadCanonicalDeepgram = Object.keys(currentDeepgram).length > 0;
921
+ changes.push(hadCanonicalDeepgram ? `Merged ${params.pathPrefix}.deepgram → ${params.pathPrefix}.providerOptions.deepgram (filled missing canonical fields from legacy).` : `Moved ${params.pathPrefix}.deepgram → ${params.pathPrefix}.providerOptions.deepgram.`);
922
+ return true;
923
+ };
924
+ const normalizeLegacyMediaProviderOptions = () => {
925
+ const rawTools = next.tools;
926
+ if (!isRecord(rawTools)) return;
927
+ const rawMedia = rawTools.media;
928
+ if (!isRecord(rawMedia)) return;
929
+ let mediaChanged = false;
930
+ const nextMedia = structuredClone(rawMedia);
931
+ const migrateModelList = (models, pathPrefix) => {
932
+ if (!Array.isArray(models)) return false;
933
+ let changed = false;
934
+ for (const [index, entry] of models.entries()) {
935
+ if (!isRecord(entry)) continue;
936
+ if (migrateLegacyDeepgramCompat({
937
+ owner: entry,
938
+ pathPrefix: `${pathPrefix}[${index}]`
939
+ })) changed = true;
940
+ }
941
+ return changed;
942
+ };
943
+ for (const capability of [
944
+ "audio",
945
+ "image",
946
+ "video"
947
+ ]) {
948
+ const config = isRecord(nextMedia[capability]) ? structuredClone(nextMedia[capability]) : null;
949
+ if (!config) continue;
950
+ let configChanged = false;
951
+ if (migrateLegacyDeepgramCompat({
952
+ owner: config,
953
+ pathPrefix: `tools.media.${capability}`
954
+ })) configChanged = true;
955
+ if (migrateModelList(config.models, `tools.media.${capability}.models`)) configChanged = true;
956
+ if (configChanged) {
957
+ nextMedia[capability] = config;
958
+ mediaChanged = true;
959
+ }
960
+ }
961
+ if (migrateModelList(nextMedia.models, "tools.media.models")) mediaChanged = true;
962
+ if (!mediaChanged) return;
963
+ next = {
964
+ ...next,
965
+ tools: {
966
+ ...next.tools,
967
+ media: nextMedia
968
+ }
969
+ };
970
+ };
971
+ normalizeBrowserSsrFPolicyAlias();
972
+ normalizeLegacyNanoBananaSkill();
973
+ normalizeLegacyTalkConfig();
974
+ normalizeLegacyCrossContextMessageConfig();
975
+ normalizeLegacyMediaProviderOptions();
976
+ const legacyAckReaction = cfg.messages?.ackReaction?.trim();
977
+ const hasWhatsAppConfig = cfg.channels?.whatsapp !== void 0;
978
+ if (legacyAckReaction && hasWhatsAppConfig) {
979
+ if (!(cfg.channels?.whatsapp?.ackReaction !== void 0)) {
980
+ const legacyScope = cfg.messages?.ackReactionScope ?? "group-mentions";
981
+ let direct = true;
982
+ let group = "mentions";
983
+ if (legacyScope === "all") {
984
+ direct = true;
985
+ group = "always";
986
+ } else if (legacyScope === "direct") {
987
+ direct = true;
988
+ group = "never";
989
+ } else if (legacyScope === "group-all") {
990
+ direct = false;
991
+ group = "always";
992
+ } else if (legacyScope === "group-mentions") {
993
+ direct = false;
994
+ group = "mentions";
995
+ }
996
+ next = {
997
+ ...next,
998
+ channels: {
999
+ ...next.channels,
1000
+ whatsapp: {
1001
+ ...next.channels?.whatsapp,
1002
+ ackReaction: {
1003
+ emoji: legacyAckReaction,
1004
+ direct,
1005
+ group
1006
+ }
1007
+ }
1008
+ }
1009
+ };
1010
+ changes.push(`Copied messages.ackReaction → channels.whatsapp.ackReaction (scope: ${legacyScope}).`);
1011
+ }
1012
+ }
1013
+ return {
1014
+ config: next,
1015
+ changes
1016
+ };
1017
+ }
1018
+ //#endregion
1019
+ //#region src/commands/doctor/emit-notes.ts
1020
+ function emitDoctorNotes(params) {
1021
+ for (const change of params.changeNotes ?? []) params.note(change, "Doctor changes");
1022
+ for (const warning of params.warningNotes ?? []) params.note(warning, "Doctor warnings");
1023
+ }
1024
+ //#endregion
1025
+ //#region src/commands/doctor/finalize-config-flow.ts
1026
+ async function finalizeDoctorConfigFlow(params) {
1027
+ if (!params.shouldRepair && params.pendingChanges) {
1028
+ if (await params.confirm({
1029
+ message: "Apply recommended config repairs now?",
1030
+ initialValue: true
1031
+ })) return {
1032
+ cfg: params.candidate,
1033
+ shouldWriteConfig: true
1034
+ };
1035
+ if (params.fixHints.length > 0) params.note(params.fixHints.join("\n"), "Doctor");
1036
+ return {
1037
+ cfg: params.cfg,
1038
+ shouldWriteConfig: false
1039
+ };
1040
+ }
1041
+ if (params.shouldRepair && params.pendingChanges) return {
1042
+ cfg: params.cfg,
1043
+ shouldWriteConfig: true
1044
+ };
1045
+ return {
1046
+ cfg: params.cfg,
1047
+ shouldWriteConfig: false
1048
+ };
1049
+ }
1050
+ //#endregion
1051
+ //#region src/commands/doctor/providers/matrix.ts
1052
+ function formatMatrixLegacyStatePreview(detection) {
1053
+ return [
1054
+ "- Matrix plugin upgraded in place.",
1055
+ `- Legacy sync store: ${detection.legacyStoragePath} -> ${detection.targetStoragePath}`,
1056
+ `- Legacy crypto store: ${detection.legacyCryptoPath} -> ${detection.targetCryptoPath}`,
1057
+ ...detection.selectionNote ? [`- ${detection.selectionNote}`] : [],
1058
+ "- Run \"openclaw doctor --fix\" to migrate this Matrix state now."
1059
+ ].join("\n");
1060
+ }
1061
+ function formatMatrixLegacyCryptoPreview(detection) {
1062
+ const notes = [];
1063
+ for (const warning of detection.warnings) notes.push(`- ${warning}`);
1064
+ for (const plan of detection.plans) notes.push([
1065
+ `- Matrix encrypted-state migration is pending for account "${plan.accountId}".`,
1066
+ `- Legacy crypto store: ${plan.legacyCryptoPath}`,
1067
+ `- New recovery key file: ${plan.recoveryKeyPath}`,
1068
+ `- Migration state file: ${plan.statePath}`,
1069
+ "- Run \"openclaw doctor --fix\" to extract any saved backup key now. Backed-up room keys will restore automatically on next gateway start."
1070
+ ].join("\n"));
1071
+ return notes;
1072
+ }
1073
+ async function collectMatrixInstallPathWarnings(cfg) {
1074
+ const issue = await detectPluginInstallPathIssue({
1075
+ pluginId: "matrix",
1076
+ install: cfg.plugins?.installs?.matrix
1077
+ });
1078
+ if (!issue) return [];
1079
+ return formatPluginInstallPathIssue({
1080
+ issue,
1081
+ pluginLabel: "Matrix",
1082
+ defaultInstallCommand: "openclaw plugins install @openclaw/matrix",
1083
+ repoInstallCommand: "openclaw plugins install ./extensions/matrix",
1084
+ formatCommand: formatCliCommand
1085
+ }).map((entry) => `- ${entry}`);
1086
+ }
1087
+ async function applyMatrixDoctorRepair(params) {
1088
+ const changes = [];
1089
+ const warnings = [];
1090
+ const pendingMatrixMigration = hasPendingMatrixMigration({
1091
+ cfg: params.cfg,
1092
+ env: params.env
1093
+ });
1094
+ const actionableMatrixMigration = hasActionableMatrixMigration({
1095
+ cfg: params.cfg,
1096
+ env: params.env
1097
+ });
1098
+ let matrixSnapshotReady = true;
1099
+ if (actionableMatrixMigration) try {
1100
+ const snapshot = await maybeCreateMatrixMigrationSnapshot({
1101
+ trigger: "doctor-fix",
1102
+ env: params.env
1103
+ });
1104
+ changes.push(`Matrix migration snapshot ${snapshot.created ? "created" : "reused"} before applying Matrix upgrades.\n- ${snapshot.archivePath}`);
1105
+ } catch (err) {
1106
+ matrixSnapshotReady = false;
1107
+ warnings.push(`- Failed creating a Matrix migration snapshot before repair: ${String(err)}`);
1108
+ warnings.push("- Skipping Matrix migration changes for now. Resolve the snapshot failure, then rerun \"openclaw doctor --fix\".");
1109
+ }
1110
+ else if (pendingMatrixMigration) warnings.push("- Matrix migration warnings are present, but no on-disk Matrix mutation is actionable yet. No pre-migration snapshot was needed.");
1111
+ if (!matrixSnapshotReady) return {
1112
+ changes,
1113
+ warnings
1114
+ };
1115
+ const matrixStateRepair = await autoMigrateLegacyMatrixState({
1116
+ cfg: params.cfg,
1117
+ env: params.env
1118
+ });
1119
+ if (matrixStateRepair.changes.length > 0) changes.push([
1120
+ "Matrix plugin upgraded in place.",
1121
+ ...matrixStateRepair.changes.map((entry) => `- ${entry}`),
1122
+ "- No user action required."
1123
+ ].join("\n"));
1124
+ if (matrixStateRepair.warnings.length > 0) warnings.push(matrixStateRepair.warnings.map((entry) => `- ${entry}`).join("\n"));
1125
+ const matrixCryptoRepair = await autoPrepareLegacyMatrixCrypto({
1126
+ cfg: params.cfg,
1127
+ env: params.env
1128
+ });
1129
+ if (matrixCryptoRepair.changes.length > 0) changes.push(["Matrix encrypted-state migration prepared.", ...matrixCryptoRepair.changes.map((entry) => `- ${entry}`)].join("\n"));
1130
+ if (matrixCryptoRepair.warnings.length > 0) warnings.push(matrixCryptoRepair.warnings.map((entry) => `- ${entry}`).join("\n"));
1131
+ return {
1132
+ changes,
1133
+ warnings
1134
+ };
1135
+ }
1136
+ async function runMatrixDoctorSequence(params) {
1137
+ const matrixLegacyState = detectLegacyMatrixState({
1138
+ cfg: params.cfg,
1139
+ env: params.env
1140
+ });
1141
+ const matrixLegacyCrypto = detectLegacyMatrixCrypto({
1142
+ cfg: params.cfg,
1143
+ env: params.env
1144
+ });
1145
+ const warningNotes = [];
1146
+ const changeNotes = [];
1147
+ if (params.shouldRepair) {
1148
+ const matrixRepair = await applyMatrixDoctorRepair({
1149
+ cfg: params.cfg,
1150
+ env: params.env
1151
+ });
1152
+ changeNotes.push(...matrixRepair.changes);
1153
+ warningNotes.push(...matrixRepair.warnings);
1154
+ } else if (matrixLegacyState) if ("warning" in matrixLegacyState) warningNotes.push(`- ${matrixLegacyState.warning}`);
1155
+ else warningNotes.push(formatMatrixLegacyStatePreview(matrixLegacyState));
1156
+ if (!params.shouldRepair && (matrixLegacyCrypto.warnings.length > 0 || matrixLegacyCrypto.plans.length > 0)) warningNotes.push(...formatMatrixLegacyCryptoPreview(matrixLegacyCrypto));
1157
+ const matrixInstallWarnings = await collectMatrixInstallPathWarnings(params.cfg);
1158
+ if (matrixInstallWarnings.length > 0) warningNotes.push(matrixInstallWarnings.join("\n"));
1159
+ return {
1160
+ changeNotes,
1161
+ warningNotes
1162
+ };
1163
+ }
1164
+ //#endregion
1165
+ //#region src/commands/doctor/shared/object.ts
1166
+ function asObjectRecord(value) {
1167
+ if (!value || typeof value !== "object" || Array.isArray(value)) return null;
1168
+ return value;
1169
+ }
1170
+ //#endregion
1171
+ //#region src/commands/doctor/providers/discord.ts
1172
+ function collectDiscordAccountScopes(cfg) {
1173
+ const scopes = [];
1174
+ const discord = asObjectRecord(cfg.channels?.discord);
1175
+ if (!discord) return scopes;
1176
+ scopes.push({
1177
+ prefix: "channels.discord",
1178
+ account: discord
1179
+ });
1180
+ const accounts = asObjectRecord(discord.accounts);
1181
+ if (!accounts) return scopes;
1182
+ for (const key of Object.keys(accounts)) {
1183
+ const account = asObjectRecord(accounts[key]);
1184
+ if (!account) continue;
1185
+ scopes.push({
1186
+ prefix: `channels.discord.accounts.${key}`,
1187
+ account
1188
+ });
1189
+ }
1190
+ return scopes;
1191
+ }
1192
+ function collectDiscordIdLists(prefix, account) {
1193
+ const refs = [{
1194
+ pathLabel: `${prefix}.allowFrom`,
1195
+ holder: account,
1196
+ key: "allowFrom"
1197
+ }];
1198
+ const dm = asObjectRecord(account.dm);
1199
+ if (dm) {
1200
+ refs.push({
1201
+ pathLabel: `${prefix}.dm.allowFrom`,
1202
+ holder: dm,
1203
+ key: "allowFrom"
1204
+ });
1205
+ refs.push({
1206
+ pathLabel: `${prefix}.dm.groupChannels`,
1207
+ holder: dm,
1208
+ key: "groupChannels"
1209
+ });
1210
+ }
1211
+ const execApprovals = asObjectRecord(account.execApprovals);
1212
+ if (execApprovals) refs.push({
1213
+ pathLabel: `${prefix}.execApprovals.approvers`,
1214
+ holder: execApprovals,
1215
+ key: "approvers"
1216
+ });
1217
+ const guilds = asObjectRecord(account.guilds);
1218
+ if (!guilds) return refs;
1219
+ for (const guildId of Object.keys(guilds)) {
1220
+ const guild = asObjectRecord(guilds[guildId]);
1221
+ if (!guild) continue;
1222
+ refs.push({
1223
+ pathLabel: `${prefix}.guilds.${guildId}.users`,
1224
+ holder: guild,
1225
+ key: "users"
1226
+ });
1227
+ refs.push({
1228
+ pathLabel: `${prefix}.guilds.${guildId}.roles`,
1229
+ holder: guild,
1230
+ key: "roles"
1231
+ });
1232
+ const channels = asObjectRecord(guild.channels);
1233
+ if (!channels) continue;
1234
+ for (const channelId of Object.keys(channels)) {
1235
+ const channel = asObjectRecord(channels[channelId]);
1236
+ if (!channel) continue;
1237
+ refs.push({
1238
+ pathLabel: `${prefix}.guilds.${guildId}.channels.${channelId}.users`,
1239
+ holder: channel,
1240
+ key: "users"
1241
+ });
1242
+ refs.push({
1243
+ pathLabel: `${prefix}.guilds.${guildId}.channels.${channelId}.roles`,
1244
+ holder: channel,
1245
+ key: "roles"
1246
+ });
1247
+ }
1248
+ }
1249
+ return refs;
1250
+ }
1251
+ function scanDiscordNumericIdEntries(cfg) {
1252
+ const hits = [];
1253
+ const scanList = (pathLabel, list) => {
1254
+ if (!Array.isArray(list)) return;
1255
+ for (const [index, entry] of list.entries()) {
1256
+ if (typeof entry !== "number") continue;
1257
+ hits.push({
1258
+ path: `${pathLabel}[${index}]`,
1259
+ entry
1260
+ });
1261
+ }
1262
+ };
1263
+ for (const scope of collectDiscordAccountScopes(cfg)) for (const ref of collectDiscordIdLists(scope.prefix, scope.account)) scanList(ref.pathLabel, ref.holder[ref.key]);
1264
+ return hits;
1265
+ }
1266
+ function collectDiscordNumericIdWarnings(params) {
1267
+ if (params.hits.length === 0) return [];
1268
+ const samplePath = sanitizeForLog(params.hits[0]?.path ?? "channels.discord.allowFrom");
1269
+ const sampleEntry = sanitizeForLog(String(params.hits[0]?.entry ?? ""));
1270
+ return [`- Discord allowlists contain ${params.hits.length} numeric entries (e.g. ${samplePath}=${sampleEntry}).`, `- Discord IDs must be strings; run "${params.doctorFixCommand}" to convert numeric IDs to quoted strings.`];
1271
+ }
1272
+ function maybeRepairDiscordNumericIds(cfg) {
1273
+ if (scanDiscordNumericIdEntries(cfg).length === 0) return {
1274
+ config: cfg,
1275
+ changes: []
1276
+ };
1277
+ const next = structuredClone(cfg);
1278
+ const changes = [];
1279
+ const repairList = (pathLabel, holder, key) => {
1280
+ const raw = holder[key];
1281
+ if (!Array.isArray(raw)) return;
1282
+ let converted = 0;
1283
+ const updated = raw.map((entry) => {
1284
+ if (typeof entry === "number") {
1285
+ converted += 1;
1286
+ return String(entry);
1287
+ }
1288
+ return entry;
1289
+ });
1290
+ if (converted === 0) return;
1291
+ holder[key] = updated;
1292
+ changes.push(`- ${pathLabel}: converted ${converted} numeric ${converted === 1 ? "entry" : "entries"} to strings`);
1293
+ };
1294
+ for (const scope of collectDiscordAccountScopes(next)) for (const ref of collectDiscordIdLists(scope.prefix, scope.account)) repairList(ref.pathLabel, ref.holder, ref.key);
1295
+ if (changes.length === 0) return {
1296
+ config: cfg,
1297
+ changes: []
1298
+ };
1299
+ return {
1300
+ config: next,
1301
+ changes
1302
+ };
1303
+ }
1304
+ //#endregion
1305
+ //#region src/commands/doctor/shared/allowlist.ts
1306
+ function hasAllowFromEntries(list) {
1307
+ return Array.isArray(list) && list.map((v) => String(v).trim()).filter(Boolean).length > 0;
1308
+ }
1309
+ //#endregion
1310
+ //#region src/commands/doctor/providers/telegram.ts
1311
+ function collectTelegramAccountScopes(cfg) {
1312
+ const scopes = [];
1313
+ const telegram = asObjectRecord(cfg.channels?.telegram);
1314
+ if (!telegram) return scopes;
1315
+ scopes.push({
1316
+ prefix: "channels.telegram",
1317
+ account: telegram
1318
+ });
1319
+ const accounts = asObjectRecord(telegram.accounts);
1320
+ if (!accounts) return scopes;
1321
+ for (const key of Object.keys(accounts)) {
1322
+ const account = asObjectRecord(accounts[key]);
1323
+ if (!account) continue;
1324
+ scopes.push({
1325
+ prefix: `channels.telegram.accounts.${key}`,
1326
+ account
1327
+ });
1328
+ }
1329
+ return scopes;
1330
+ }
1331
+ function collectTelegramAllowFromLists(prefix, account) {
1332
+ const refs = [{
1333
+ pathLabel: `${prefix}.allowFrom`,
1334
+ holder: account,
1335
+ key: "allowFrom"
1336
+ }, {
1337
+ pathLabel: `${prefix}.groupAllowFrom`,
1338
+ holder: account,
1339
+ key: "groupAllowFrom"
1340
+ }];
1341
+ const groups = asObjectRecord(account.groups);
1342
+ if (!groups) return refs;
1343
+ for (const groupId of Object.keys(groups)) {
1344
+ const group = asObjectRecord(groups[groupId]);
1345
+ if (!group) continue;
1346
+ refs.push({
1347
+ pathLabel: `${prefix}.groups.${groupId}.allowFrom`,
1348
+ holder: group,
1349
+ key: "allowFrom"
1350
+ });
1351
+ const topics = asObjectRecord(group.topics);
1352
+ if (!topics) continue;
1353
+ for (const topicId of Object.keys(topics)) {
1354
+ const topic = asObjectRecord(topics[topicId]);
1355
+ if (!topic) continue;
1356
+ refs.push({
1357
+ pathLabel: `${prefix}.groups.${groupId}.topics.${topicId}.allowFrom`,
1358
+ holder: topic,
1359
+ key: "allowFrom"
1360
+ });
1361
+ }
1362
+ }
1363
+ return refs;
1364
+ }
1365
+ function scanTelegramAllowFromUsernameEntries(cfg) {
1366
+ const hits = [];
1367
+ const scanList = (pathLabel, list) => {
1368
+ if (!Array.isArray(list)) return;
1369
+ for (const entry of list) {
1370
+ const normalized = normalizeTelegramAllowFromEntry(entry);
1371
+ if (!normalized || normalized === "*") continue;
1372
+ if (isNumericTelegramUserId(normalized)) continue;
1373
+ hits.push({
1374
+ path: pathLabel,
1375
+ entry: String(entry).trim()
1376
+ });
1377
+ }
1378
+ };
1379
+ for (const scope of collectTelegramAccountScopes(cfg)) for (const ref of collectTelegramAllowFromLists(scope.prefix, scope.account)) scanList(ref.pathLabel, ref.holder[ref.key]);
1380
+ return hits;
1381
+ }
1382
+ function collectTelegramAllowFromUsernameWarnings(params) {
1383
+ if (params.hits.length === 0) return [];
1384
+ const sampleEntry = sanitizeForLog(params.hits[0]?.entry ?? "@");
1385
+ return [`- Telegram allowFrom contains ${params.hits.length} non-numeric entries (e.g. ${sampleEntry}); Telegram authorization requires numeric sender IDs.`, `- Run "${params.doctorFixCommand}" to auto-resolve @username entries to numeric IDs (requires a Telegram bot token).`];
1386
+ }
1387
+ async function maybeRepairTelegramAllowFromUsernames(cfg) {
1388
+ if (scanTelegramAllowFromUsernameEntries(cfg).length === 0) return {
1389
+ config: cfg,
1390
+ changes: []
1391
+ };
1392
+ const { resolvedConfig } = await resolveCommandSecretRefsViaGateway({
1393
+ config: cfg,
1394
+ commandName: "doctor --fix",
1395
+ targetIds: getChannelsCommandSecretTargetIds(),
1396
+ mode: "read_only_status"
1397
+ });
1398
+ const hasConfiguredUnavailableToken = listTelegramAccountIds(cfg).some((accountId) => {
1399
+ const inspected = inspectTelegramAccount({
1400
+ cfg,
1401
+ accountId
1402
+ });
1403
+ return inspected.enabled && inspected.tokenStatus === "configured_unavailable";
1404
+ });
1405
+ const tokenResolutionWarnings = [];
1406
+ const lookupAccounts = [];
1407
+ const seenLookupAccounts = /* @__PURE__ */ new Set();
1408
+ for (const accountId of listTelegramAccountIds(resolvedConfig)) {
1409
+ let account;
1410
+ try {
1411
+ account = resolveTelegramAccount({
1412
+ cfg: resolvedConfig,
1413
+ accountId
1414
+ });
1415
+ } catch (error) {
1416
+ tokenResolutionWarnings.push(`- Telegram account ${accountId}: failed to inspect bot token (${describeUnknownError(error)}).`);
1417
+ continue;
1418
+ }
1419
+ const token = account.tokenSource === "none" ? "" : account.token.trim();
1420
+ if (!token) continue;
1421
+ const network = account.config.network;
1422
+ const cacheKey = `${token}::${JSON.stringify(network ?? {})}`;
1423
+ if (seenLookupAccounts.has(cacheKey)) continue;
1424
+ seenLookupAccounts.add(cacheKey);
1425
+ lookupAccounts.push({
1426
+ token,
1427
+ network
1428
+ });
1429
+ }
1430
+ if (lookupAccounts.length === 0) return {
1431
+ config: cfg,
1432
+ changes: [...tokenResolutionWarnings, hasConfiguredUnavailableToken ? `- Telegram allowFrom contains @username entries, but configured Telegram bot credentials are unavailable in this command path; cannot auto-resolve (start the gateway or make the secret source available, then rerun doctor --fix).` : `- Telegram allowFrom contains @username entries, but no Telegram bot token is configured; cannot auto-resolve (run setup or replace with numeric sender IDs).`]
1433
+ };
1434
+ const resolveUserId = async (raw) => {
1435
+ const trimmed = raw.trim();
1436
+ if (!trimmed) return null;
1437
+ const stripped = normalizeTelegramAllowFromEntry(trimmed);
1438
+ if (!stripped || stripped === "*") return null;
1439
+ if (isNumericTelegramUserId(stripped)) return stripped;
1440
+ if (/\s/.test(stripped)) return null;
1441
+ const username = stripped.startsWith("@") ? stripped : `@${stripped}`;
1442
+ for (const account of lookupAccounts) {
1443
+ const controller = new AbortController();
1444
+ const timeout = setTimeout(() => controller.abort(), 4e3);
1445
+ try {
1446
+ const id = await lookupTelegramChatId({
1447
+ token: account.token,
1448
+ chatId: username,
1449
+ signal: controller.signal,
1450
+ network: account.network
1451
+ });
1452
+ if (id) return id;
1453
+ } catch {} finally {
1454
+ clearTimeout(timeout);
1455
+ }
1456
+ }
1457
+ return null;
1458
+ };
1459
+ const changes = [];
1460
+ const next = structuredClone(cfg);
1461
+ const repairList = async (pathLabel, holder, key) => {
1462
+ const raw = holder[key];
1463
+ if (!Array.isArray(raw)) return;
1464
+ const out = [];
1465
+ const replaced = [];
1466
+ for (const entry of raw) {
1467
+ const normalized = normalizeTelegramAllowFromEntry(entry);
1468
+ if (!normalized) continue;
1469
+ if (normalized === "*") {
1470
+ out.push("*");
1471
+ continue;
1472
+ }
1473
+ if (isNumericTelegramUserId(normalized)) {
1474
+ out.push(normalized);
1475
+ continue;
1476
+ }
1477
+ const resolved = await resolveUserId(String(entry));
1478
+ if (resolved) {
1479
+ out.push(resolved);
1480
+ replaced.push({
1481
+ from: String(entry).trim(),
1482
+ to: resolved
1483
+ });
1484
+ } else out.push(String(entry).trim());
1485
+ }
1486
+ const deduped = [];
1487
+ const seen = /* @__PURE__ */ new Set();
1488
+ for (const entry of out) {
1489
+ const keyValue = String(entry).trim();
1490
+ if (!keyValue || seen.has(keyValue)) continue;
1491
+ seen.add(keyValue);
1492
+ deduped.push(entry);
1493
+ }
1494
+ holder[key] = deduped;
1495
+ if (replaced.length > 0) {
1496
+ for (const rep of replaced.slice(0, 5)) changes.push(`- ${sanitizeForLog(pathLabel)}: resolved ${sanitizeForLog(rep.from)} -> ${sanitizeForLog(rep.to)}`);
1497
+ if (replaced.length > 5) changes.push(`- ${sanitizeForLog(pathLabel)}: resolved ${replaced.length - 5} more @username entries`);
1498
+ }
1499
+ };
1500
+ for (const scope of collectTelegramAccountScopes(next)) for (const ref of collectTelegramAllowFromLists(scope.prefix, scope.account)) await repairList(ref.pathLabel, ref.holder, ref.key);
1501
+ if (changes.length === 0) return {
1502
+ config: cfg,
1503
+ changes: []
1504
+ };
1505
+ return {
1506
+ config: next,
1507
+ changes
1508
+ };
1509
+ }
1510
+ function hasConfiguredGroups(account, parent) {
1511
+ const groups = account.groups ?? parent?.groups;
1512
+ return Boolean(groups) && Object.keys(groups ?? {}).length > 0;
1513
+ }
1514
+ function collectTelegramGroupPolicyWarnings(params) {
1515
+ if (!hasConfiguredGroups(params.account, params.parent)) {
1516
+ const effectiveDmPolicy = params.dmPolicy ?? "pairing";
1517
+ const dmSetupLine = effectiveDmPolicy === "pairing" ? "DMs use pairing mode, so new senders must start a chat and be approved before regular messages are accepted." : effectiveDmPolicy === "allowlist" ? `DMs use allowlist mode, so only sender IDs in ${params.prefix}.allowFrom are accepted.` : effectiveDmPolicy === "open" ? "DMs are open." : "DMs are disabled.";
1518
+ return [`- ${params.prefix}: Telegram is in first-time setup mode. ${dmSetupLine} Group messages stay blocked until you add allowed chats under ${params.prefix}.groups (and optional sender IDs under ${params.prefix}.groupAllowFrom), or set ${params.prefix}.groupPolicy to "open" if you want broad group access.`];
1519
+ }
1520
+ const rawGroupAllowFrom = params.account.groupAllowFrom ?? params.parent?.groupAllowFrom;
1521
+ if (hasAllowFromEntries((hasAllowFromEntries(rawGroupAllowFrom) ? rawGroupAllowFrom : void 0) ?? params.effectiveAllowFrom)) return [];
1522
+ return [`- ${params.prefix}.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to ${params.prefix}.groupAllowFrom or ${params.prefix}.allowFrom, or set ${params.prefix}.groupPolicy to "open".`];
1523
+ }
1524
+ function collectTelegramEmptyAllowlistExtraWarnings(params) {
1525
+ return params.channelName === "telegram" && (params.account.groupPolicy ?? params.parent?.groupPolicy ?? void 0) === "allowlist" ? collectTelegramGroupPolicyWarnings({
1526
+ account: params.account,
1527
+ dmPolicy: params.dmPolicy,
1528
+ effectiveAllowFrom: params.effectiveAllowFrom,
1529
+ parent: params.parent,
1530
+ prefix: params.prefix
1531
+ }) : [];
1532
+ }
1533
+ //#endregion
1534
+ //#region src/commands/doctor/shared/allow-from-mode.ts
1535
+ function resolveAllowFromMode(channelName) {
1536
+ if (channelName === "googlechat") return "nestedOnly";
1537
+ if (channelName === "discord" || channelName === "slack") return "topOrNested";
1538
+ return "topOnly";
1539
+ }
1540
+ //#endregion
1541
+ //#region src/commands/doctor/shared/allowlist-policy-repair.ts
1542
+ async function maybeRepairAllowlistPolicyAllowFrom(cfg) {
1543
+ const channels = cfg.channels;
1544
+ if (!channels || typeof channels !== "object") return {
1545
+ config: cfg,
1546
+ changes: []
1547
+ };
1548
+ const next = structuredClone(cfg);
1549
+ const changes = [];
1550
+ const applyRecoveredAllowFrom = (params) => {
1551
+ const count = params.allowFrom.length;
1552
+ const noun = count === 1 ? "entry" : "entries";
1553
+ if (params.mode === "nestedOnly") {
1554
+ const dmEntry = params.account.dm;
1555
+ const dm = dmEntry && typeof dmEntry === "object" && !Array.isArray(dmEntry) ? dmEntry : {};
1556
+ dm.allowFrom = params.allowFrom;
1557
+ params.account.dm = dm;
1558
+ changes.push(`- ${params.prefix}.dm.allowFrom: restored ${count} sender ${noun} from pairing store (dmPolicy="allowlist").`);
1559
+ return;
1560
+ }
1561
+ if (params.mode === "topOrNested") {
1562
+ const dmEntry = params.account.dm;
1563
+ const dm = dmEntry && typeof dmEntry === "object" && !Array.isArray(dmEntry) ? dmEntry : void 0;
1564
+ const nestedAllowFrom = dm?.allowFrom;
1565
+ if (dm && !Array.isArray(params.account.allowFrom) && Array.isArray(nestedAllowFrom)) {
1566
+ dm.allowFrom = params.allowFrom;
1567
+ changes.push(`- ${params.prefix}.dm.allowFrom: restored ${count} sender ${noun} from pairing store (dmPolicy="allowlist").`);
1568
+ return;
1569
+ }
1570
+ }
1571
+ params.account.allowFrom = params.allowFrom;
1572
+ changes.push(`- ${params.prefix}.allowFrom: restored ${count} sender ${noun} from pairing store (dmPolicy="allowlist").`);
1573
+ };
1574
+ const recoverAllowFromForAccount = async (params) => {
1575
+ const dmEntry = params.account.dm;
1576
+ const dm = dmEntry && typeof dmEntry === "object" && !Array.isArray(dmEntry) ? dmEntry : void 0;
1577
+ if ((params.account.dmPolicy ?? dm?.policy) !== "allowlist") return;
1578
+ const topAllowFrom = params.account.allowFrom;
1579
+ const nestedAllowFrom = dm?.allowFrom;
1580
+ if (hasAllowFromEntries(topAllowFrom) || hasAllowFromEntries(nestedAllowFrom)) return;
1581
+ const normalizedChannelId = (normalizeChatChannelId(params.channelName) ?? params.channelName).trim().toLowerCase();
1582
+ if (!normalizedChannelId) return;
1583
+ const normalizedAccountId = normalizeAccountId(params.accountId) || "default";
1584
+ const fromStore = await readChannelAllowFromStore(normalizedChannelId, process.env, normalizedAccountId).catch(() => []);
1585
+ const recovered = Array.from(new Set(fromStore.map((entry) => String(entry).trim()))).filter(Boolean);
1586
+ if (recovered.length === 0) return;
1587
+ applyRecoveredAllowFrom({
1588
+ account: params.account,
1589
+ allowFrom: recovered,
1590
+ mode: resolveAllowFromMode(params.channelName),
1591
+ prefix: params.prefix
1592
+ });
1593
+ };
1594
+ const nextChannels = next.channels;
1595
+ for (const [channelName, channelConfig] of Object.entries(nextChannels)) {
1596
+ if (!channelConfig || typeof channelConfig !== "object") continue;
1597
+ await recoverAllowFromForAccount({
1598
+ channelName,
1599
+ account: channelConfig,
1600
+ prefix: `channels.${channelName}`
1601
+ });
1602
+ const accounts = asObjectRecord(channelConfig.accounts);
1603
+ if (!accounts) continue;
1604
+ for (const [accountId, accountConfig] of Object.entries(accounts)) {
1605
+ if (!accountConfig || typeof accountConfig !== "object") continue;
1606
+ await recoverAllowFromForAccount({
1607
+ channelName,
1608
+ account: accountConfig,
1609
+ accountId,
1610
+ prefix: `channels.${channelName}.accounts.${accountId}`
1611
+ });
1612
+ }
1613
+ }
1614
+ if (changes.length === 0) return {
1615
+ config: cfg,
1616
+ changes: []
1617
+ };
1618
+ return {
1619
+ config: next,
1620
+ changes
1621
+ };
1622
+ }
1623
+ //#endregion
1624
+ //#region src/commands/doctor/shared/config-mutation-state.ts
1625
+ function applyDoctorConfigMutation(params) {
1626
+ if (params.mutation.changes.length === 0) return params.state;
1627
+ return {
1628
+ cfg: params.shouldRepair ? params.mutation.config : params.state.cfg,
1629
+ candidate: params.mutation.config,
1630
+ pendingChanges: true,
1631
+ fixHints: !params.shouldRepair && params.fixHint ? [...params.state.fixHints, params.fixHint] : params.state.fixHints
1632
+ };
1633
+ }
1634
+ //#endregion
1635
+ //#region src/commands/doctor/shared/empty-allowlist-policy.ts
1636
+ function usesSenderBasedGroupAllowlist(channelName) {
1637
+ if (!channelName) return true;
1638
+ return !(channelName === "discord" || channelName === "slack" || channelName === "googlechat");
1639
+ }
1640
+ function allowsGroupAllowFromFallback(channelName) {
1641
+ if (!channelName) return true;
1642
+ return !(channelName === "googlechat" || channelName === "imessage" || channelName === "matrix" || channelName === "msteams" || channelName === "irc");
1643
+ }
1644
+ function collectEmptyAllowlistPolicyWarningsForAccount(params) {
1645
+ const warnings = [];
1646
+ const dmEntry = params.account.dm;
1647
+ const dm = dmEntry && typeof dmEntry === "object" && !Array.isArray(dmEntry) ? dmEntry : void 0;
1648
+ const parentDmEntry = params.parent?.dm;
1649
+ const parentDm = parentDmEntry && typeof parentDmEntry === "object" && !Array.isArray(parentDmEntry) ? parentDmEntry : void 0;
1650
+ const dmPolicy = params.account.dmPolicy ?? dm?.policy ?? params.parent?.dmPolicy ?? parentDm?.policy ?? void 0;
1651
+ const topAllowFrom = params.account.allowFrom ?? params.parent?.allowFrom;
1652
+ const nestedAllowFrom = dm?.allowFrom;
1653
+ const parentNestedAllowFrom = parentDm?.allowFrom;
1654
+ const effectiveAllowFrom = topAllowFrom ?? nestedAllowFrom ?? parentNestedAllowFrom;
1655
+ if (dmPolicy === "allowlist" && !hasAllowFromEntries(effectiveAllowFrom)) warnings.push(`- ${params.prefix}.dmPolicy is "allowlist" but allowFrom is empty — all DMs will be blocked. Add sender IDs to ${params.prefix}.allowFrom, or run "${params.doctorFixCommand}" to auto-migrate from pairing store when entries exist.`);
1656
+ if ((params.account.groupPolicy ?? params.parent?.groupPolicy ?? void 0) !== "allowlist" || !usesSenderBasedGroupAllowlist(params.channelName)) return warnings;
1657
+ if (params.channelName === "telegram") return warnings;
1658
+ const rawGroupAllowFrom = params.account.groupAllowFrom ?? params.parent?.groupAllowFrom;
1659
+ const groupAllowFrom = hasAllowFromEntries(rawGroupAllowFrom) ? rawGroupAllowFrom : void 0;
1660
+ const fallbackToAllowFrom = allowsGroupAllowFromFallback(params.channelName);
1661
+ if (hasAllowFromEntries(groupAllowFrom ?? (fallbackToAllowFrom ? effectiveAllowFrom : void 0))) return warnings;
1662
+ if (fallbackToAllowFrom) warnings.push(`- ${params.prefix}.groupPolicy is "allowlist" but groupAllowFrom (and allowFrom) is empty — all group messages will be silently dropped. Add sender IDs to ${params.prefix}.groupAllowFrom or ${params.prefix}.allowFrom, or set groupPolicy to "open".`);
1663
+ else warnings.push(`- ${params.prefix}.groupPolicy is "allowlist" but groupAllowFrom is empty — this channel does not fall back to allowFrom, so all group messages will be silently dropped. Add sender IDs to ${params.prefix}.groupAllowFrom, or set groupPolicy to "open".`);
1664
+ return warnings;
1665
+ }
1666
+ //#endregion
1667
+ //#region src/commands/doctor/shared/empty-allowlist-scan.ts
1668
+ function scanEmptyAllowlistPolicyWarnings(cfg, params) {
1669
+ const channels = cfg.channels;
1670
+ if (!channels || typeof channels !== "object") return [];
1671
+ const warnings = [];
1672
+ const checkAccount = (account, prefix, channelName, parent) => {
1673
+ const accountDm = asObjectRecord(account.dm);
1674
+ const parentDm = asObjectRecord(parent?.dm);
1675
+ const dmPolicy = account.dmPolicy ?? accountDm?.policy ?? parent?.dmPolicy ?? parentDm?.policy ?? void 0;
1676
+ const effectiveAllowFrom = account.allowFrom ?? parent?.allowFrom ?? accountDm?.allowFrom ?? parentDm?.allowFrom ?? void 0;
1677
+ warnings.push(...collectEmptyAllowlistPolicyWarningsForAccount({
1678
+ account,
1679
+ channelName,
1680
+ doctorFixCommand: params.doctorFixCommand,
1681
+ parent,
1682
+ prefix
1683
+ }));
1684
+ if (params.extraWarningsForAccount) warnings.push(...params.extraWarningsForAccount({
1685
+ account,
1686
+ channelName,
1687
+ dmPolicy,
1688
+ effectiveAllowFrom,
1689
+ parent,
1690
+ prefix
1691
+ }));
1692
+ };
1693
+ for (const [channelName, channelConfig] of Object.entries(channels)) {
1694
+ if (!channelConfig || typeof channelConfig !== "object") continue;
1695
+ checkAccount(channelConfig, `channels.${channelName}`, channelName);
1696
+ const accounts = asObjectRecord(channelConfig.accounts);
1697
+ if (!accounts) continue;
1698
+ for (const [accountId, account] of Object.entries(accounts)) {
1699
+ if (!account || typeof account !== "object") continue;
1700
+ checkAccount(account, `channels.${channelName}.accounts.${accountId}`, channelName, channelConfig);
1701
+ }
1702
+ }
1703
+ return warnings;
1704
+ }
1705
+ //#endregion
1706
+ //#region src/commands/doctor/shared/exec-safe-bins.ts
1707
+ function normalizeConfiguredSafeBins(entries) {
1708
+ if (!Array.isArray(entries)) return [];
1709
+ return Array.from(new Set(entries.map((entry) => typeof entry === "string" ? entry.trim().toLowerCase() : "").filter((entry) => entry.length > 0))).toSorted();
1710
+ }
1711
+ function normalizeConfiguredTrustedSafeBinDirs(entries) {
1712
+ if (!Array.isArray(entries)) return [];
1713
+ return normalizeTrustedSafeBinDirs(entries.filter((entry) => typeof entry === "string"));
1714
+ }
1715
+ function collectExecSafeBinScopes(cfg) {
1716
+ const scopes = [];
1717
+ const globalExec = asObjectRecord(cfg.tools?.exec);
1718
+ const globalTrustedDirs = normalizeConfiguredTrustedSafeBinDirs(globalExec?.safeBinTrustedDirs);
1719
+ if (globalExec) {
1720
+ const safeBins = normalizeConfiguredSafeBins(globalExec.safeBins);
1721
+ if (safeBins.length > 0) scopes.push({
1722
+ scopePath: "tools.exec",
1723
+ safeBins,
1724
+ exec: globalExec,
1725
+ mergedProfiles: resolveMergedSafeBinProfileFixtures({ global: globalExec }) ?? {},
1726
+ trustedSafeBinDirs: getTrustedSafeBinDirs({ extraDirs: globalTrustedDirs })
1727
+ });
1728
+ }
1729
+ const agents = Array.isArray(cfg.agents?.list) ? cfg.agents.list : [];
1730
+ for (const agent of agents) {
1731
+ if (!agent || typeof agent !== "object" || typeof agent.id !== "string") continue;
1732
+ const agentExec = asObjectRecord(agent.tools?.exec);
1733
+ if (!agentExec) continue;
1734
+ const safeBins = normalizeConfiguredSafeBins(agentExec.safeBins);
1735
+ if (safeBins.length === 0) continue;
1736
+ scopes.push({
1737
+ scopePath: `agents.list.${agent.id}.tools.exec`,
1738
+ safeBins,
1739
+ exec: agentExec,
1740
+ mergedProfiles: resolveMergedSafeBinProfileFixtures({
1741
+ global: globalExec,
1742
+ local: agentExec
1743
+ }) ?? {},
1744
+ trustedSafeBinDirs: getTrustedSafeBinDirs({ extraDirs: [...globalTrustedDirs, ...normalizeConfiguredTrustedSafeBinDirs(agentExec.safeBinTrustedDirs)] })
1745
+ });
1746
+ }
1747
+ return scopes;
1748
+ }
1749
+ function scanExecSafeBinCoverage(cfg) {
1750
+ const hits = [];
1751
+ for (const scope of collectExecSafeBinScopes(cfg)) {
1752
+ const interpreterBins = new Set(listInterpreterLikeSafeBins(scope.safeBins));
1753
+ for (const bin of scope.safeBins) {
1754
+ if (scope.mergedProfiles[bin]) continue;
1755
+ hits.push({
1756
+ scopePath: scope.scopePath,
1757
+ bin,
1758
+ isInterpreter: interpreterBins.has(bin)
1759
+ });
1760
+ }
1761
+ }
1762
+ return hits;
1763
+ }
1764
+ function scanExecSafeBinTrustedDirHints(cfg) {
1765
+ const hits = [];
1766
+ for (const scope of collectExecSafeBinScopes(cfg)) for (const bin of scope.safeBins) {
1767
+ const resolution = resolveCommandResolutionFromArgv([bin]);
1768
+ if (!resolution?.resolvedPath) continue;
1769
+ if (isTrustedSafeBinPath({
1770
+ resolvedPath: resolution.resolvedPath,
1771
+ trustedDirs: scope.trustedSafeBinDirs
1772
+ })) continue;
1773
+ hits.push({
1774
+ scopePath: scope.scopePath,
1775
+ bin,
1776
+ resolvedPath: resolution.resolvedPath
1777
+ });
1778
+ }
1779
+ return hits;
1780
+ }
1781
+ function collectExecSafeBinCoverageWarnings(params) {
1782
+ if (params.hits.length === 0) return [];
1783
+ const interpreterHits = params.hits.filter((hit) => hit.isInterpreter);
1784
+ const customHits = params.hits.filter((hit) => !hit.isInterpreter);
1785
+ const lines = [];
1786
+ if (interpreterHits.length > 0) {
1787
+ for (const hit of interpreterHits.slice(0, 5)) lines.push(`- ${sanitizeForLog(hit.scopePath)}.safeBins includes interpreter/runtime '${sanitizeForLog(hit.bin)}' without profile.`);
1788
+ if (interpreterHits.length > 5) lines.push(`- ${interpreterHits.length - 5} more interpreter/runtime safeBins entries are missing profiles.`);
1789
+ }
1790
+ if (customHits.length > 0) {
1791
+ for (const hit of customHits.slice(0, 5)) lines.push(`- ${sanitizeForLog(hit.scopePath)}.safeBins entry '${sanitizeForLog(hit.bin)}' is missing safeBinProfiles.${sanitizeForLog(hit.bin)}.`);
1792
+ if (customHits.length > 5) lines.push(`- ${customHits.length - 5} more custom safeBins entries are missing profiles.`);
1793
+ }
1794
+ lines.push(`- Run "${params.doctorFixCommand}" to scaffold missing custom safeBinProfiles entries.`);
1795
+ return lines;
1796
+ }
1797
+ function collectExecSafeBinTrustedDirHintWarnings(hits) {
1798
+ if (hits.length === 0) return [];
1799
+ const lines = hits.slice(0, 5).map((hit) => `- ${sanitizeForLog(hit.scopePath)}.safeBins entry '${sanitizeForLog(hit.bin)}' resolves to '${sanitizeForLog(hit.resolvedPath)}' outside trusted safe-bin dirs.`);
1800
+ if (hits.length > 5) lines.push(`- ${hits.length - 5} more safeBins entries resolve outside trusted safe-bin dirs.`);
1801
+ lines.push("- If intentional, add the binary directory to tools.exec.safeBinTrustedDirs (global or agent scope).");
1802
+ return lines;
1803
+ }
1804
+ function maybeRepairExecSafeBinProfiles(cfg) {
1805
+ const next = structuredClone(cfg);
1806
+ const changes = [];
1807
+ const warnings = [];
1808
+ for (const scope of collectExecSafeBinScopes(next)) {
1809
+ const interpreterBins = new Set(listInterpreterLikeSafeBins(scope.safeBins));
1810
+ const missingBins = scope.safeBins.filter((bin) => !scope.mergedProfiles[bin]);
1811
+ if (missingBins.length === 0) continue;
1812
+ const profileHolder = asObjectRecord(scope.exec.safeBinProfiles) ?? (scope.exec.safeBinProfiles = {});
1813
+ for (const bin of missingBins) {
1814
+ if (interpreterBins.has(bin)) {
1815
+ warnings.push(`- ${scope.scopePath}.safeBins includes interpreter/runtime '${bin}' without profile; remove it from safeBins or use explicit allowlist entries.`);
1816
+ continue;
1817
+ }
1818
+ if (profileHolder[bin] !== void 0) continue;
1819
+ profileHolder[bin] = {};
1820
+ changes.push(`- ${scope.scopePath}.safeBinProfiles.${bin}: added scaffold profile {} (review and tighten flags/positionals).`);
1821
+ }
1822
+ }
1823
+ if (changes.length === 0 && warnings.length === 0) return {
1824
+ config: cfg,
1825
+ changes: [],
1826
+ warnings: []
1827
+ };
1828
+ return {
1829
+ config: next,
1830
+ changes,
1831
+ warnings
1832
+ };
1833
+ }
1834
+ //#endregion
1835
+ //#region src/commands/doctor/shared/legacy-tools-by-sender.ts
1836
+ function collectLegacyToolsBySenderKeyHits(value, pathParts, hits) {
1837
+ if (Array.isArray(value)) {
1838
+ for (const [index, entry] of value.entries()) collectLegacyToolsBySenderKeyHits(entry, [...pathParts, index], hits);
1839
+ return;
1840
+ }
1841
+ const record = asObjectRecord(value);
1842
+ if (!record) return;
1843
+ const toolsBySender = asObjectRecord(record.toolsBySender);
1844
+ if (toolsBySender) {
1845
+ const path = [...pathParts, "toolsBySender"];
1846
+ const pathLabel = formatConfigPath(path);
1847
+ for (const rawKey of Object.keys(toolsBySender)) {
1848
+ const trimmed = rawKey.trim();
1849
+ if (!trimmed || trimmed === "*" || parseToolsBySenderTypedKey(trimmed)) continue;
1850
+ hits.push({
1851
+ toolsBySenderPath: path,
1852
+ pathLabel,
1853
+ key: rawKey,
1854
+ targetKey: `id:${trimmed}`
1855
+ });
1856
+ }
1857
+ }
1858
+ for (const [key, nested] of Object.entries(record)) {
1859
+ if (key === "toolsBySender") continue;
1860
+ collectLegacyToolsBySenderKeyHits(nested, [...pathParts, key], hits);
1861
+ }
1862
+ }
1863
+ function scanLegacyToolsBySenderKeys(cfg) {
1864
+ const hits = [];
1865
+ collectLegacyToolsBySenderKeyHits(cfg, [], hits);
1866
+ return hits;
1867
+ }
1868
+ function collectLegacyToolsBySenderWarnings(params) {
1869
+ if (params.hits.length === 0) return [];
1870
+ const sample = params.hits[0];
1871
+ const sampleLabel = sanitizeForLog(sample ? `${sample.pathLabel}.${sample.key}` : "toolsBySender");
1872
+ return [
1873
+ `- Found ${params.hits.length} legacy untyped toolsBySender key${params.hits.length === 1 ? "" : "s"} (for example ${sampleLabel}).`,
1874
+ "- Untyped sender keys are deprecated; use explicit prefixes (id:, e164:, username:, name:).",
1875
+ `- Run "${params.doctorFixCommand}" to migrate legacy keys to typed id: entries.`
1876
+ ];
1877
+ }
1878
+ function maybeRepairLegacyToolsBySenderKeys(cfg) {
1879
+ const next = structuredClone(cfg);
1880
+ const hits = scanLegacyToolsBySenderKeys(next);
1881
+ if (hits.length === 0) return {
1882
+ config: cfg,
1883
+ changes: []
1884
+ };
1885
+ const summary = /* @__PURE__ */ new Map();
1886
+ let changed = false;
1887
+ for (const hit of hits) {
1888
+ const toolsBySender = asObjectRecord(resolveConfigPathTarget(next, hit.toolsBySenderPath));
1889
+ if (!toolsBySender || !(hit.key in toolsBySender)) continue;
1890
+ const row = summary.get(hit.pathLabel) ?? {
1891
+ migrated: 0,
1892
+ dropped: 0,
1893
+ examples: []
1894
+ };
1895
+ if (toolsBySender[hit.targetKey] === void 0) {
1896
+ toolsBySender[hit.targetKey] = toolsBySender[hit.key];
1897
+ row.migrated++;
1898
+ if (row.examples.length < 3) row.examples.push(`${hit.key} -> ${hit.targetKey}`);
1899
+ } else {
1900
+ row.dropped++;
1901
+ if (row.examples.length < 3) row.examples.push(`${hit.key} (kept existing ${hit.targetKey})`);
1902
+ }
1903
+ delete toolsBySender[hit.key];
1904
+ summary.set(hit.pathLabel, row);
1905
+ changed = true;
1906
+ }
1907
+ if (!changed) return {
1908
+ config: cfg,
1909
+ changes: []
1910
+ };
1911
+ const changes = [];
1912
+ for (const [pathLabel, row] of summary) {
1913
+ if (row.migrated > 0) {
1914
+ const suffix = row.examples.length > 0 ? ` (${row.examples.join(", ")})` : "";
1915
+ changes.push(`- ${pathLabel}: migrated ${row.migrated} legacy key${row.migrated === 1 ? "" : "s"} to typed id: entries${suffix}.`);
1916
+ }
1917
+ if (row.dropped > 0) changes.push(`- ${pathLabel}: removed ${row.dropped} legacy key${row.dropped === 1 ? "" : "s"} where typed id: entries already existed.`);
1918
+ }
1919
+ return {
1920
+ config: next,
1921
+ changes
1922
+ };
1923
+ }
1924
+ //#endregion
1925
+ //#region src/commands/doctor/shared/open-policy-allowfrom.ts
1926
+ function hasWildcard(list) {
1927
+ return list?.some((v) => String(v).trim() === "*") ?? false;
1928
+ }
1929
+ function collectOpenPolicyAllowFromWarnings(params) {
1930
+ if (params.changes.length === 0) return [];
1931
+ return [...params.changes.map((line) => sanitizeForLog(line)), `- Run "${params.doctorFixCommand}" to add missing allowFrom wildcards.`];
1932
+ }
1933
+ function maybeRepairOpenPolicyAllowFrom(cfg) {
1934
+ const channels = cfg.channels;
1935
+ if (!channels || typeof channels !== "object") return {
1936
+ config: cfg,
1937
+ changes: []
1938
+ };
1939
+ const next = structuredClone(cfg);
1940
+ const changes = [];
1941
+ const ensureWildcard = (account, prefix, mode) => {
1942
+ const dmEntry = account.dm;
1943
+ const dm = dmEntry && typeof dmEntry === "object" && !Array.isArray(dmEntry) ? dmEntry : void 0;
1944
+ if ((account.dmPolicy ?? dm?.policy ?? void 0) !== "open") return;
1945
+ const topAllowFrom = account.allowFrom;
1946
+ const nestedAllowFrom = dm?.allowFrom;
1947
+ if (mode === "nestedOnly") {
1948
+ if (hasWildcard(nestedAllowFrom)) return;
1949
+ if (dm && Array.isArray(nestedAllowFrom)) {
1950
+ dm.allowFrom = [...nestedAllowFrom, "*"];
1951
+ changes.push(`- ${prefix}.dm.allowFrom: added "*" (required by dmPolicy="open")`);
1952
+ } else {
1953
+ const nextDm = dm ?? {};
1954
+ nextDm.allowFrom = ["*"];
1955
+ account.dm = nextDm;
1956
+ changes.push(`- ${prefix}.dm.allowFrom: set to ["*"] (required by dmPolicy="open")`);
1957
+ }
1958
+ return;
1959
+ }
1960
+ if (mode === "topOrNested") {
1961
+ if (hasWildcard(topAllowFrom) || hasWildcard(nestedAllowFrom)) return;
1962
+ if (Array.isArray(topAllowFrom)) {
1963
+ account.allowFrom = [...topAllowFrom, "*"];
1964
+ changes.push(`- ${prefix}.allowFrom: added "*" (required by dmPolicy="open")`);
1965
+ } else if (dm && Array.isArray(nestedAllowFrom)) {
1966
+ dm.allowFrom = [...nestedAllowFrom, "*"];
1967
+ changes.push(`- ${prefix}.dm.allowFrom: added "*" (required by dmPolicy="open")`);
1968
+ } else {
1969
+ account.allowFrom = ["*"];
1970
+ changes.push(`- ${prefix}.allowFrom: set to ["*"] (required by dmPolicy="open")`);
1971
+ }
1972
+ return;
1973
+ }
1974
+ if (hasWildcard(topAllowFrom)) return;
1975
+ if (Array.isArray(topAllowFrom)) {
1976
+ account.allowFrom = [...topAllowFrom, "*"];
1977
+ changes.push(`- ${prefix}.allowFrom: added "*" (required by dmPolicy="open")`);
1978
+ } else {
1979
+ account.allowFrom = ["*"];
1980
+ changes.push(`- ${prefix}.allowFrom: set to ["*"] (required by dmPolicy="open")`);
1981
+ }
1982
+ };
1983
+ const nextChannels = next.channels;
1984
+ for (const [channelName, channelConfig] of Object.entries(nextChannels)) {
1985
+ if (!channelConfig || typeof channelConfig !== "object") continue;
1986
+ const allowFromMode = resolveAllowFromMode(channelName);
1987
+ ensureWildcard(channelConfig, `channels.${channelName}`, allowFromMode);
1988
+ const accounts = asObjectRecord(channelConfig.accounts);
1989
+ if (!accounts) continue;
1990
+ for (const [accountName, accountConfig] of Object.entries(accounts)) if (accountConfig && typeof accountConfig === "object") ensureWildcard(accountConfig, `channels.${channelName}.accounts.${accountName}`, allowFromMode);
1991
+ }
1992
+ if (changes.length === 0) return {
1993
+ config: cfg,
1994
+ changes: []
1995
+ };
1996
+ return {
1997
+ config: next,
1998
+ changes
1999
+ };
2000
+ }
2001
+ //#endregion
2002
+ //#region src/commands/doctor/repair-sequencing.ts
2003
+ async function runDoctorRepairSequence(params) {
2004
+ let state = params.state;
2005
+ const changeNotes = [];
2006
+ const warningNotes = [];
2007
+ const sanitizeLines = (lines) => lines.map((line) => sanitizeForLog(line)).join("\n");
2008
+ const applyMutation = (mutation) => {
2009
+ if (mutation.changes.length > 0) {
2010
+ changeNotes.push(sanitizeLines(mutation.changes));
2011
+ state = applyDoctorConfigMutation({
2012
+ state,
2013
+ mutation,
2014
+ shouldRepair: true
2015
+ });
2016
+ }
2017
+ if (mutation.warnings && mutation.warnings.length > 0) warningNotes.push(sanitizeLines(mutation.warnings));
2018
+ };
2019
+ applyMutation(await maybeRepairTelegramAllowFromUsernames(state.candidate));
2020
+ applyMutation(maybeRepairDiscordNumericIds(state.candidate));
2021
+ applyMutation(maybeRepairOpenPolicyAllowFrom(state.candidate));
2022
+ applyMutation(await maybeRepairAllowlistPolicyAllowFrom(state.candidate));
2023
+ const emptyAllowlistWarnings = scanEmptyAllowlistPolicyWarnings(state.candidate, {
2024
+ doctorFixCommand: params.doctorFixCommand,
2025
+ extraWarningsForAccount: collectTelegramEmptyAllowlistExtraWarnings
2026
+ });
2027
+ if (emptyAllowlistWarnings.length > 0) warningNotes.push(sanitizeLines(emptyAllowlistWarnings));
2028
+ applyMutation(maybeRepairLegacyToolsBySenderKeys(state.candidate));
2029
+ applyMutation(maybeRepairExecSafeBinProfiles(state.candidate));
2030
+ return {
2031
+ state,
2032
+ changeNotes,
2033
+ warningNotes
2034
+ };
2035
+ }
2036
+ //#endregion
2037
+ //#region src/commands/doctor/shared/config-flow-steps.ts
2038
+ function applyLegacyCompatibilityStep(params) {
2039
+ if (params.snapshot.legacyIssues.length === 0) return {
2040
+ state: params.state,
2041
+ issueLines: [],
2042
+ changeLines: []
2043
+ };
2044
+ const issueLines = formatConfigIssueLines(params.snapshot.legacyIssues, "-");
2045
+ const { config: migrated, changes } = migrateLegacyConfig(params.snapshot.parsed);
2046
+ if (!migrated) return {
2047
+ state: {
2048
+ ...params.state,
2049
+ fixHints: params.shouldRepair ? params.state.fixHints : [...params.state.fixHints, `Run "${params.doctorFixCommand}" to apply compatibility migrations.`]
2050
+ },
2051
+ issueLines,
2052
+ changeLines: changes
2053
+ };
2054
+ return {
2055
+ state: {
2056
+ cfg: params.shouldRepair ? migrated : params.state.cfg,
2057
+ candidate: migrated,
2058
+ pendingChanges: params.state.pendingChanges || changes.length > 0,
2059
+ fixHints: params.shouldRepair ? params.state.fixHints : [...params.state.fixHints, `Run "${params.doctorFixCommand}" to apply compatibility migrations.`]
2060
+ },
2061
+ issueLines,
2062
+ changeLines: changes
2063
+ };
2064
+ }
2065
+ function applyUnknownConfigKeyStep(params) {
2066
+ const unknown = stripUnknownConfigKeys(params.state.candidate);
2067
+ if (unknown.removed.length === 0) return {
2068
+ state: params.state,
2069
+ removed: []
2070
+ };
2071
+ return {
2072
+ state: {
2073
+ cfg: params.shouldRepair ? unknown.config : params.state.cfg,
2074
+ candidate: unknown.config,
2075
+ pendingChanges: true,
2076
+ fixHints: params.shouldRepair ? params.state.fixHints : [...params.state.fixHints, `Run "${params.doctorFixCommand}" to remove these keys.`]
2077
+ },
2078
+ removed: unknown.removed
2079
+ };
2080
+ }
2081
+ //#endregion
2082
+ //#region src/commands/doctor/shared/default-account-warnings.ts
2083
+ function normalizeBindingChannelKey(raw) {
2084
+ const normalized = normalizeChatChannelId(raw);
2085
+ if (normalized) return normalized;
2086
+ return (raw ?? "").trim().toLowerCase();
2087
+ }
2088
+ function collectChannelsMissingDefaultAccount(cfg) {
2089
+ const channels = asObjectRecord(cfg.channels);
2090
+ if (!channels) return [];
2091
+ const contexts = [];
2092
+ for (const [channelKey, rawChannel] of Object.entries(channels)) {
2093
+ const channel = asObjectRecord(rawChannel);
2094
+ if (!channel) continue;
2095
+ const accounts = asObjectRecord(channel.accounts);
2096
+ if (!accounts) continue;
2097
+ const normalizedAccountIds = Array.from(new Set(Object.keys(accounts).map((accountId) => normalizeAccountId(accountId)).filter(Boolean))).toSorted((a, b) => a.localeCompare(b));
2098
+ if (normalizedAccountIds.length === 0 || normalizedAccountIds.includes("default")) continue;
2099
+ contexts.push({
2100
+ channelKey,
2101
+ channel,
2102
+ normalizedAccountIds
2103
+ });
2104
+ }
2105
+ return contexts;
2106
+ }
2107
+ function collectMissingDefaultAccountBindingWarnings(cfg) {
2108
+ const bindings = listRouteBindings(cfg);
2109
+ const warnings = [];
2110
+ for (const { channelKey, normalizedAccountIds } of collectChannelsMissingDefaultAccount(cfg)) {
2111
+ const accountIdSet = new Set(normalizedAccountIds);
2112
+ const channelPattern = normalizeBindingChannelKey(channelKey);
2113
+ let hasWildcardBinding = false;
2114
+ const coveredAccountIds = /* @__PURE__ */ new Set();
2115
+ for (const binding of bindings) {
2116
+ const bindingRecord = asObjectRecord(binding);
2117
+ if (!bindingRecord) continue;
2118
+ const match = asObjectRecord(bindingRecord.match);
2119
+ if (!match) continue;
2120
+ const matchChannel = typeof match.channel === "string" ? normalizeBindingChannelKey(match.channel) : "";
2121
+ if (!matchChannel || matchChannel !== channelPattern) continue;
2122
+ const rawAccountId = typeof match.accountId === "string" ? match.accountId.trim() : "";
2123
+ if (!rawAccountId) continue;
2124
+ if (rawAccountId === "*") {
2125
+ hasWildcardBinding = true;
2126
+ continue;
2127
+ }
2128
+ const normalizedBindingAccountId = normalizeAccountId(rawAccountId);
2129
+ if (accountIdSet.has(normalizedBindingAccountId)) coveredAccountIds.add(normalizedBindingAccountId);
2130
+ }
2131
+ if (hasWildcardBinding) continue;
2132
+ const uncoveredAccountIds = normalizedAccountIds.filter((accountId) => !coveredAccountIds.has(accountId));
2133
+ if (uncoveredAccountIds.length === 0) continue;
2134
+ if (coveredAccountIds.size > 0) {
2135
+ warnings.push(`- channels.${channelKey}: accounts.default is missing and account bindings only cover a subset of configured accounts. Uncovered accounts: ${uncoveredAccountIds.join(", ")}. Add bindings[].match.accountId for uncovered accounts (or "*"), or add ${formatChannelAccountsDefaultPath(channelKey)}.`);
2136
+ continue;
2137
+ }
2138
+ warnings.push(`- channels.${channelKey}: accounts.default is missing and no valid account-scoped binding exists for configured accounts (${normalizedAccountIds.join(", ")}). Channel-only bindings (no accountId) match only default. Add bindings[].match.accountId for one of these accounts (or "*"), or add ${formatChannelAccountsDefaultPath(channelKey)}.`);
2139
+ }
2140
+ return warnings;
2141
+ }
2142
+ function collectMissingExplicitDefaultAccountWarnings(cfg) {
2143
+ const warnings = [];
2144
+ for (const { channelKey, channel, normalizedAccountIds } of collectChannelsMissingDefaultAccount(cfg)) {
2145
+ if (normalizedAccountIds.length < 2) continue;
2146
+ const preferredDefault = normalizeOptionalAccountId(typeof channel.defaultAccount === "string" ? channel.defaultAccount : void 0);
2147
+ if (preferredDefault) {
2148
+ if (normalizedAccountIds.includes(preferredDefault)) continue;
2149
+ warnings.push(`- channels.${channelKey}: defaultAccount is set to "${preferredDefault}" but does not match configured accounts (${normalizedAccountIds.join(", ")}). ${formatSetExplicitDefaultToConfiguredInstruction({ channelKey })} to avoid fallback routing.`);
2150
+ continue;
2151
+ }
2152
+ warnings.push(`- channels.${channelKey}: multiple accounts are configured but no explicit default is set. ${formatSetExplicitDefaultInstruction(channelKey)} to avoid fallback routing.`);
2153
+ }
2154
+ return warnings;
2155
+ }
2156
+ //#endregion
2157
+ //#region src/commands/doctor/shared/mutable-allowlist.ts
2158
+ function addMutableAllowlistHits(params) {
2159
+ if (!Array.isArray(params.list)) return;
2160
+ for (const entry of params.list) {
2161
+ const text = String(entry).trim();
2162
+ if (!text || text === "*") continue;
2163
+ if (!params.detector(text)) continue;
2164
+ params.hits.push({
2165
+ channel: params.channel,
2166
+ path: params.pathLabel,
2167
+ entry: text,
2168
+ dangerousFlagPath: params.dangerousFlagPath
2169
+ });
2170
+ }
2171
+ }
2172
+ function scanMutableAllowlistEntries(cfg) {
2173
+ const hits = [];
2174
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "discord")) {
2175
+ if (scope.dangerousNameMatchingEnabled) continue;
2176
+ addMutableAllowlistHits({
2177
+ hits,
2178
+ pathLabel: `${scope.prefix}.allowFrom`,
2179
+ list: scope.account.allowFrom,
2180
+ detector: isDiscordMutableAllowEntry,
2181
+ channel: "discord",
2182
+ dangerousFlagPath: scope.dangerousFlagPath
2183
+ });
2184
+ const dm = asObjectRecord(scope.account.dm);
2185
+ if (dm) addMutableAllowlistHits({
2186
+ hits,
2187
+ pathLabel: `${scope.prefix}.dm.allowFrom`,
2188
+ list: dm.allowFrom,
2189
+ detector: isDiscordMutableAllowEntry,
2190
+ channel: "discord",
2191
+ dangerousFlagPath: scope.dangerousFlagPath
2192
+ });
2193
+ const guilds = asObjectRecord(scope.account.guilds);
2194
+ if (!guilds) continue;
2195
+ for (const [guildId, guildRaw] of Object.entries(guilds)) {
2196
+ const guild = asObjectRecord(guildRaw);
2197
+ if (!guild) continue;
2198
+ addMutableAllowlistHits({
2199
+ hits,
2200
+ pathLabel: `${scope.prefix}.guilds.${guildId}.users`,
2201
+ list: guild.users,
2202
+ detector: isDiscordMutableAllowEntry,
2203
+ channel: "discord",
2204
+ dangerousFlagPath: scope.dangerousFlagPath
2205
+ });
2206
+ const channels = asObjectRecord(guild.channels);
2207
+ if (!channels) continue;
2208
+ for (const [channelId, channelRaw] of Object.entries(channels)) {
2209
+ const channel = asObjectRecord(channelRaw);
2210
+ if (!channel) continue;
2211
+ addMutableAllowlistHits({
2212
+ hits,
2213
+ pathLabel: `${scope.prefix}.guilds.${guildId}.channels.${channelId}.users`,
2214
+ list: channel.users,
2215
+ detector: isDiscordMutableAllowEntry,
2216
+ channel: "discord",
2217
+ dangerousFlagPath: scope.dangerousFlagPath
2218
+ });
2219
+ }
2220
+ }
2221
+ }
2222
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "slack")) {
2223
+ if (scope.dangerousNameMatchingEnabled) continue;
2224
+ addMutableAllowlistHits({
2225
+ hits,
2226
+ pathLabel: `${scope.prefix}.allowFrom`,
2227
+ list: scope.account.allowFrom,
2228
+ detector: isSlackMutableAllowEntry,
2229
+ channel: "slack",
2230
+ dangerousFlagPath: scope.dangerousFlagPath
2231
+ });
2232
+ const dm = asObjectRecord(scope.account.dm);
2233
+ if (dm) addMutableAllowlistHits({
2234
+ hits,
2235
+ pathLabel: `${scope.prefix}.dm.allowFrom`,
2236
+ list: dm.allowFrom,
2237
+ detector: isSlackMutableAllowEntry,
2238
+ channel: "slack",
2239
+ dangerousFlagPath: scope.dangerousFlagPath
2240
+ });
2241
+ const channels = asObjectRecord(scope.account.channels);
2242
+ if (!channels) continue;
2243
+ for (const [channelKey, channelRaw] of Object.entries(channels)) {
2244
+ const channel = asObjectRecord(channelRaw);
2245
+ if (!channel) continue;
2246
+ addMutableAllowlistHits({
2247
+ hits,
2248
+ pathLabel: `${scope.prefix}.channels.${channelKey}.users`,
2249
+ list: channel.users,
2250
+ detector: isSlackMutableAllowEntry,
2251
+ channel: "slack",
2252
+ dangerousFlagPath: scope.dangerousFlagPath
2253
+ });
2254
+ }
2255
+ }
2256
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "googlechat")) {
2257
+ if (scope.dangerousNameMatchingEnabled) continue;
2258
+ addMutableAllowlistHits({
2259
+ hits,
2260
+ pathLabel: `${scope.prefix}.groupAllowFrom`,
2261
+ list: scope.account.groupAllowFrom,
2262
+ detector: isGoogleChatMutableAllowEntry,
2263
+ channel: "googlechat",
2264
+ dangerousFlagPath: scope.dangerousFlagPath
2265
+ });
2266
+ const dm = asObjectRecord(scope.account.dm);
2267
+ if (dm) addMutableAllowlistHits({
2268
+ hits,
2269
+ pathLabel: `${scope.prefix}.dm.allowFrom`,
2270
+ list: dm.allowFrom,
2271
+ detector: isGoogleChatMutableAllowEntry,
2272
+ channel: "googlechat",
2273
+ dangerousFlagPath: scope.dangerousFlagPath
2274
+ });
2275
+ const groups = asObjectRecord(scope.account.groups);
2276
+ if (!groups) continue;
2277
+ for (const [groupKey, groupRaw] of Object.entries(groups)) {
2278
+ const group = asObjectRecord(groupRaw);
2279
+ if (!group) continue;
2280
+ addMutableAllowlistHits({
2281
+ hits,
2282
+ pathLabel: `${scope.prefix}.groups.${groupKey}.users`,
2283
+ list: group.users,
2284
+ detector: isGoogleChatMutableAllowEntry,
2285
+ channel: "googlechat",
2286
+ dangerousFlagPath: scope.dangerousFlagPath
2287
+ });
2288
+ }
2289
+ }
2290
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "msteams")) {
2291
+ if (scope.dangerousNameMatchingEnabled) continue;
2292
+ addMutableAllowlistHits({
2293
+ hits,
2294
+ pathLabel: `${scope.prefix}.allowFrom`,
2295
+ list: scope.account.allowFrom,
2296
+ detector: isMSTeamsMutableAllowEntry,
2297
+ channel: "msteams",
2298
+ dangerousFlagPath: scope.dangerousFlagPath
2299
+ });
2300
+ addMutableAllowlistHits({
2301
+ hits,
2302
+ pathLabel: `${scope.prefix}.groupAllowFrom`,
2303
+ list: scope.account.groupAllowFrom,
2304
+ detector: isMSTeamsMutableAllowEntry,
2305
+ channel: "msteams",
2306
+ dangerousFlagPath: scope.dangerousFlagPath
2307
+ });
2308
+ }
2309
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "mattermost")) {
2310
+ if (scope.dangerousNameMatchingEnabled) continue;
2311
+ addMutableAllowlistHits({
2312
+ hits,
2313
+ pathLabel: `${scope.prefix}.allowFrom`,
2314
+ list: scope.account.allowFrom,
2315
+ detector: isMattermostMutableAllowEntry,
2316
+ channel: "mattermost",
2317
+ dangerousFlagPath: scope.dangerousFlagPath
2318
+ });
2319
+ addMutableAllowlistHits({
2320
+ hits,
2321
+ pathLabel: `${scope.prefix}.groupAllowFrom`,
2322
+ list: scope.account.groupAllowFrom,
2323
+ detector: isMattermostMutableAllowEntry,
2324
+ channel: "mattermost",
2325
+ dangerousFlagPath: scope.dangerousFlagPath
2326
+ });
2327
+ }
2328
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "irc")) {
2329
+ if (scope.dangerousNameMatchingEnabled) continue;
2330
+ addMutableAllowlistHits({
2331
+ hits,
2332
+ pathLabel: `${scope.prefix}.allowFrom`,
2333
+ list: scope.account.allowFrom,
2334
+ detector: isIrcMutableAllowEntry,
2335
+ channel: "irc",
2336
+ dangerousFlagPath: scope.dangerousFlagPath
2337
+ });
2338
+ addMutableAllowlistHits({
2339
+ hits,
2340
+ pathLabel: `${scope.prefix}.groupAllowFrom`,
2341
+ list: scope.account.groupAllowFrom,
2342
+ detector: isIrcMutableAllowEntry,
2343
+ channel: "irc",
2344
+ dangerousFlagPath: scope.dangerousFlagPath
2345
+ });
2346
+ const groups = asObjectRecord(scope.account.groups);
2347
+ if (!groups) continue;
2348
+ for (const [groupKey, groupRaw] of Object.entries(groups)) {
2349
+ const group = asObjectRecord(groupRaw);
2350
+ if (!group) continue;
2351
+ addMutableAllowlistHits({
2352
+ hits,
2353
+ pathLabel: `${scope.prefix}.groups.${groupKey}.allowFrom`,
2354
+ list: group.allowFrom,
2355
+ detector: isIrcMutableAllowEntry,
2356
+ channel: "irc",
2357
+ dangerousFlagPath: scope.dangerousFlagPath
2358
+ });
2359
+ }
2360
+ }
2361
+ for (const scope of collectProviderDangerousNameMatchingScopes(cfg, "zalouser")) {
2362
+ if (scope.dangerousNameMatchingEnabled) continue;
2363
+ const groups = asObjectRecord(scope.account.groups);
2364
+ if (!groups) continue;
2365
+ for (const entry of Object.keys(groups)) {
2366
+ if (!isZalouserMutableGroupEntry(entry)) continue;
2367
+ hits.push({
2368
+ channel: "zalouser",
2369
+ path: `${scope.prefix}.groups`,
2370
+ entry,
2371
+ dangerousFlagPath: scope.dangerousFlagPath
2372
+ });
2373
+ }
2374
+ }
2375
+ return hits;
2376
+ }
2377
+ function collectMutableAllowlistWarnings(hits) {
2378
+ if (hits.length === 0) return [];
2379
+ const channels = Array.from(new Set(hits.map((hit) => hit.channel))).toSorted();
2380
+ const exampleLines = hits.slice(0, 8).map((hit) => `- ${sanitizeForLog(hit.path)}: ${sanitizeForLog(hit.entry)}`);
2381
+ const remaining = hits.length > 8 ? `- +${hits.length - 8} more mutable allowlist entries.` : null;
2382
+ const flagPaths = Array.from(new Set(hits.map((hit) => hit.dangerousFlagPath)));
2383
+ const flagHint = flagPaths.length === 1 ? sanitizeForLog(flagPaths[0] ?? "") : `${sanitizeForLog(flagPaths[0] ?? "")} (and ${flagPaths.length - 1} other scope flags)`;
2384
+ return [
2385
+ `- Found ${hits.length} mutable allowlist ${hits.length === 1 ? "entry" : "entries"} across ${channels.join(", ")} while name matching is disabled by default.`,
2386
+ ...exampleLines,
2387
+ ...remaining ? [remaining] : [],
2388
+ `- Option A (break-glass): enable ${flagHint}=true to keep name/email/nick matching.`,
2389
+ "- Option B (recommended): resolve names/emails/nicks to stable sender IDs and rewrite the allowlist entries."
2390
+ ];
2391
+ }
2392
+ //#endregion
2393
+ //#region src/commands/doctor/shared/preview-warnings.ts
2394
+ function collectDoctorPreviewWarnings(params) {
2395
+ const warnings = [];
2396
+ const telegramHits = scanTelegramAllowFromUsernameEntries(params.cfg);
2397
+ if (telegramHits.length > 0) warnings.push(collectTelegramAllowFromUsernameWarnings({
2398
+ hits: telegramHits,
2399
+ doctorFixCommand: params.doctorFixCommand
2400
+ }).join("\n"));
2401
+ const discordHits = scanDiscordNumericIdEntries(params.cfg);
2402
+ if (discordHits.length > 0) warnings.push(collectDiscordNumericIdWarnings({
2403
+ hits: discordHits,
2404
+ doctorFixCommand: params.doctorFixCommand
2405
+ }).join("\n"));
2406
+ const allowFromScan = maybeRepairOpenPolicyAllowFrom(params.cfg);
2407
+ if (allowFromScan.changes.length > 0) warnings.push(collectOpenPolicyAllowFromWarnings({
2408
+ changes: allowFromScan.changes,
2409
+ doctorFixCommand: params.doctorFixCommand
2410
+ }).join("\n"));
2411
+ const emptyAllowlistWarnings = scanEmptyAllowlistPolicyWarnings(params.cfg, {
2412
+ doctorFixCommand: params.doctorFixCommand,
2413
+ extraWarningsForAccount: collectTelegramEmptyAllowlistExtraWarnings
2414
+ });
2415
+ if (emptyAllowlistWarnings.length > 0) warnings.push(emptyAllowlistWarnings.map((line) => sanitizeForLog(line)).join("\n"));
2416
+ const toolsBySenderHits = scanLegacyToolsBySenderKeys(params.cfg);
2417
+ if (toolsBySenderHits.length > 0) warnings.push(collectLegacyToolsBySenderWarnings({
2418
+ hits: toolsBySenderHits,
2419
+ doctorFixCommand: params.doctorFixCommand
2420
+ }).join("\n"));
2421
+ const safeBinCoverage = scanExecSafeBinCoverage(params.cfg);
2422
+ if (safeBinCoverage.length > 0) warnings.push(collectExecSafeBinCoverageWarnings({
2423
+ hits: safeBinCoverage,
2424
+ doctorFixCommand: params.doctorFixCommand
2425
+ }).join("\n"));
2426
+ const safeBinTrustedDirHints = scanExecSafeBinTrustedDirHints(params.cfg);
2427
+ if (safeBinTrustedDirHints.length > 0) warnings.push(collectExecSafeBinTrustedDirHintWarnings(safeBinTrustedDirHints).join("\n"));
2428
+ return warnings;
2429
+ }
2430
+ //#endregion
2431
+ //#region src/commands/doctor-config-flow.ts
2432
+ async function loadAndMaybeMigrateDoctorConfig(params) {
2433
+ const shouldRepair = params.options.repair === true || params.options.yes === true;
2434
+ const preflight = await runDoctorConfigPreflight();
2435
+ let snapshot = preflight.snapshot;
2436
+ const baseCfg = preflight.baseConfig;
2437
+ let cfg = baseCfg;
2438
+ let candidate = structuredClone(baseCfg);
2439
+ let pendingChanges = false;
2440
+ let fixHints = [];
2441
+ const doctorFixCommand = formatCliCommand("openclaw doctor --fix");
2442
+ const legacyStep = applyLegacyCompatibilityStep({
2443
+ snapshot,
2444
+ state: {
2445
+ cfg,
2446
+ candidate,
2447
+ pendingChanges,
2448
+ fixHints
2449
+ },
2450
+ shouldRepair,
2451
+ doctorFixCommand
2452
+ });
2453
+ ({cfg, candidate, pendingChanges, fixHints} = legacyStep.state);
2454
+ if (legacyStep.issueLines.length > 0) note$1(legacyStep.issueLines.join("\n"), "Compatibility config keys detected");
2455
+ if (legacyStep.changeLines.length > 0) note$1(legacyStep.changeLines.join("\n"), "Doctor changes");
2456
+ const normalized = normalizeCompatibilityConfigValues(candidate);
2457
+ if (normalized.changes.length > 0) {
2458
+ note$1(normalized.changes.join("\n"), "Doctor changes");
2459
+ ({cfg, candidate, pendingChanges, fixHints} = applyDoctorConfigMutation({
2460
+ state: {
2461
+ cfg,
2462
+ candidate,
2463
+ pendingChanges,
2464
+ fixHints
2465
+ },
2466
+ mutation: normalized,
2467
+ shouldRepair,
2468
+ fixHint: `Run "${doctorFixCommand}" to apply these changes.`
2469
+ }));
2470
+ }
2471
+ const autoEnable = applyPluginAutoEnable({
2472
+ config: candidate,
2473
+ env: process.env
2474
+ });
2475
+ if (autoEnable.changes.length > 0) {
2476
+ note$1(autoEnable.changes.join("\n"), "Doctor changes");
2477
+ ({cfg, candidate, pendingChanges, fixHints} = applyDoctorConfigMutation({
2478
+ state: {
2479
+ cfg,
2480
+ candidate,
2481
+ pendingChanges,
2482
+ fixHints
2483
+ },
2484
+ mutation: autoEnable,
2485
+ shouldRepair,
2486
+ fixHint: `Run "${doctorFixCommand}" to apply these changes.`
2487
+ }));
2488
+ }
2489
+ const matrixSequence = await runMatrixDoctorSequence({
2490
+ cfg: candidate,
2491
+ env: process.env,
2492
+ shouldRepair
2493
+ });
2494
+ emitDoctorNotes({
2495
+ note: note$1,
2496
+ changeNotes: matrixSequence.changeNotes,
2497
+ warningNotes: matrixSequence.warningNotes
2498
+ });
2499
+ const missingDefaultAccountBindingWarnings = collectMissingDefaultAccountBindingWarnings(candidate);
2500
+ if (missingDefaultAccountBindingWarnings.length > 0) note$1(missingDefaultAccountBindingWarnings.join("\n"), "Doctor warnings");
2501
+ const missingExplicitDefaultWarnings = collectMissingExplicitDefaultAccountWarnings(candidate);
2502
+ if (missingExplicitDefaultWarnings.length > 0) note$1(missingExplicitDefaultWarnings.join("\n"), "Doctor warnings");
2503
+ if (shouldRepair) {
2504
+ const repairSequence = await runDoctorRepairSequence({
2505
+ state: {
2506
+ cfg,
2507
+ candidate,
2508
+ pendingChanges,
2509
+ fixHints
2510
+ },
2511
+ doctorFixCommand
2512
+ });
2513
+ ({cfg, candidate, pendingChanges, fixHints} = repairSequence.state);
2514
+ emitDoctorNotes({
2515
+ note: note$1,
2516
+ changeNotes: repairSequence.changeNotes,
2517
+ warningNotes: repairSequence.warningNotes
2518
+ });
2519
+ } else emitDoctorNotes({
2520
+ note: note$1,
2521
+ warningNotes: collectDoctorPreviewWarnings({
2522
+ cfg: candidate,
2523
+ doctorFixCommand
2524
+ })
2525
+ });
2526
+ const mutableAllowlistHits = scanMutableAllowlistEntries(candidate);
2527
+ if (mutableAllowlistHits.length > 0) note$1(collectMutableAllowlistWarnings(mutableAllowlistHits).join("\n"), "Doctor warnings");
2528
+ const unknownStep = applyUnknownConfigKeyStep({
2529
+ state: {
2530
+ cfg,
2531
+ candidate,
2532
+ pendingChanges,
2533
+ fixHints
2534
+ },
2535
+ shouldRepair,
2536
+ doctorFixCommand
2537
+ });
2538
+ ({cfg, candidate, pendingChanges, fixHints} = unknownStep.state);
2539
+ if (unknownStep.removed.length > 0) note$1(unknownStep.removed.map((path) => `- ${path}`).join("\n"), shouldRepair ? "Doctor changes" : "Unknown config keys");
2540
+ const finalized = await finalizeDoctorConfigFlow({
2541
+ cfg,
2542
+ candidate,
2543
+ pendingChanges,
2544
+ shouldRepair,
2545
+ fixHints,
2546
+ confirm: params.confirm,
2547
+ note: note$1
2548
+ });
2549
+ cfg = finalized.cfg;
2550
+ noteOpencodeProviderOverrides(cfg);
2551
+ return {
2552
+ cfg,
2553
+ path: snapshot.path ?? CONFIG_PATH,
2554
+ shouldWriteConfig: finalized.shouldWriteConfig,
2555
+ sourceConfigValid: snapshot.valid
2556
+ };
2557
+ }
2558
+ //#endregion
2559
+ //#region src/commands/doctor-cron.ts
2560
+ function pluralize(count, noun) {
2561
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
2562
+ }
2563
+ function formatLegacyIssuePreview(issues) {
2564
+ const lines = [];
2565
+ if (issues.jobId) lines.push(`- ${pluralize(issues.jobId, "job")} still uses legacy \`jobId\``);
2566
+ if (issues.legacyScheduleString) lines.push(`- ${pluralize(issues.legacyScheduleString, "job")} stores schedule as a bare string`);
2567
+ if (issues.legacyScheduleCron) lines.push(`- ${pluralize(issues.legacyScheduleCron, "job")} still uses \`schedule.cron\``);
2568
+ if (issues.legacyPayloadKind) lines.push(`- ${pluralize(issues.legacyPayloadKind, "job")} needs payload kind normalization`);
2569
+ if (issues.legacyPayloadProvider) lines.push(`- ${pluralize(issues.legacyPayloadProvider, "job")} still uses payload \`provider\` as a delivery alias`);
2570
+ if (issues.legacyTopLevelPayloadFields) lines.push(`- ${pluralize(issues.legacyTopLevelPayloadFields, "job")} still uses top-level payload fields`);
2571
+ if (issues.legacyTopLevelDeliveryFields) lines.push(`- ${pluralize(issues.legacyTopLevelDeliveryFields, "job")} still uses top-level delivery fields`);
2572
+ if (issues.legacyDeliveryMode) lines.push(`- ${pluralize(issues.legacyDeliveryMode, "job")} still uses delivery mode \`deliver\``);
2573
+ return lines;
2574
+ }
2575
+ function trimString(value) {
2576
+ return typeof value === "string" && value.trim() ? value.trim() : void 0;
2577
+ }
2578
+ function migrateLegacyNotifyFallback(params) {
2579
+ let changed = false;
2580
+ const warnings = [];
2581
+ for (const raw of params.jobs) {
2582
+ if (!("notify" in raw)) continue;
2583
+ const jobName = trimString(raw.name) ?? trimString(raw.id) ?? "<unnamed>";
2584
+ if (!(raw.notify === true)) {
2585
+ delete raw.notify;
2586
+ changed = true;
2587
+ continue;
2588
+ }
2589
+ const delivery = raw.delivery && typeof raw.delivery === "object" && !Array.isArray(raw.delivery) ? raw.delivery : null;
2590
+ const mode = trimString(delivery?.mode)?.toLowerCase();
2591
+ const to = trimString(delivery?.to);
2592
+ if (mode === "webhook" && to) {
2593
+ delete raw.notify;
2594
+ changed = true;
2595
+ continue;
2596
+ }
2597
+ if ((mode === void 0 || mode === "none" || mode === "webhook") && params.legacyWebhook) {
2598
+ raw.delivery = {
2599
+ ...delivery,
2600
+ mode: "webhook",
2601
+ to: mode === "none" ? params.legacyWebhook : to ?? params.legacyWebhook
2602
+ };
2603
+ delete raw.notify;
2604
+ changed = true;
2605
+ continue;
2606
+ }
2607
+ if (!params.legacyWebhook) {
2608
+ warnings.push(`Cron job "${jobName}" still uses legacy notify fallback, but cron.webhook is unset so doctor cannot migrate it automatically.`);
2609
+ continue;
2610
+ }
2611
+ warnings.push(`Cron job "${jobName}" uses legacy notify fallback alongside delivery mode "${mode}". Migrate it manually so webhook delivery does not replace existing announce behavior.`);
2612
+ }
2613
+ return {
2614
+ changed,
2615
+ warnings
2616
+ };
2617
+ }
2618
+ async function maybeRepairLegacyCronStore(params) {
2619
+ const storePath = resolveCronStorePath(params.cfg.cron?.store);
2620
+ const rawJobs = (await loadCronStore(storePath)).jobs ?? [];
2621
+ if (rawJobs.length === 0) return;
2622
+ const normalized = normalizeStoredCronJobs(rawJobs);
2623
+ const legacyWebhook = trimString(params.cfg.cron?.webhook);
2624
+ const notifyCount = rawJobs.filter((job) => job.notify === true).length;
2625
+ const previewLines = formatLegacyIssuePreview(normalized.issues);
2626
+ if (notifyCount > 0) previewLines.push(`- ${pluralize(notifyCount, "job")} still uses legacy \`notify: true\` webhook fallback`);
2627
+ if (previewLines.length === 0) return;
2628
+ note$1([
2629
+ `Legacy cron job storage detected at ${shortenHomePath(storePath)}.`,
2630
+ ...previewLines,
2631
+ `Repair with ${formatCliCommand("openclaw doctor --fix")} to normalize the store before the next scheduler run.`
2632
+ ].join("\n"), "Cron");
2633
+ if (!await params.prompter.confirm({
2634
+ message: "Repair legacy cron jobs now?",
2635
+ initialValue: true
2636
+ })) return;
2637
+ const notifyMigration = migrateLegacyNotifyFallback({
2638
+ jobs: rawJobs,
2639
+ legacyWebhook
2640
+ });
2641
+ const changed = normalized.mutated || notifyMigration.changed;
2642
+ if (!changed && notifyMigration.warnings.length === 0) return;
2643
+ if (changed) {
2644
+ await saveCronStore(storePath, {
2645
+ version: 1,
2646
+ jobs: rawJobs
2647
+ });
2648
+ note$1(`Cron store normalized at ${shortenHomePath(storePath)}.`, "Doctor changes");
2649
+ }
2650
+ if (notifyMigration.warnings.length > 0) note$1(notifyMigration.warnings.join("\n"), "Doctor warnings");
2651
+ }
2652
+ //#endregion
2653
+ //#region src/commands/doctor-format.ts
2654
+ function formatGatewayRuntimeSummary(runtime) {
2655
+ return formatRuntimeStatus(runtime);
2656
+ }
2657
+ function buildGatewayRuntimeHints(runtime, options = {}) {
2658
+ const hints = [];
2659
+ if (!runtime) return hints;
2660
+ const platform = options.platform ?? process.platform;
2661
+ const env = options.env ?? process.env;
2662
+ const fileLog = (() => {
2663
+ try {
2664
+ return getResolvedLoggerSettings().file;
2665
+ } catch {
2666
+ return null;
2667
+ }
2668
+ })();
2669
+ if (platform === "linux" && isSystemdUnavailableDetail(runtime.detail)) {
2670
+ hints.push(...renderSystemdUnavailableHints({ wsl: isWSLEnv() }));
2671
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
2672
+ return hints;
2673
+ }
2674
+ if (runtime.cachedLabel && platform === "darwin") {
2675
+ const label = resolveGatewayLaunchAgentLabel(env.OPENCLAW_PROFILE);
2676
+ hints.push(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${label}`);
2677
+ hints.push(`Then reinstall: ${formatCliCommand("openclaw gateway install", env)}`);
2678
+ }
2679
+ if (runtime.missingUnit) {
2680
+ hints.push(`Service not installed. Run: ${formatCliCommand("openclaw gateway install", env)}`);
2681
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
2682
+ return hints;
2683
+ }
2684
+ if (runtime.status === "stopped") {
2685
+ hints.push("Service is loaded but not running (likely exited immediately).");
2686
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
2687
+ hints.push(...buildPlatformRuntimeLogHints({
2688
+ platform,
2689
+ env,
2690
+ systemdServiceName: resolveGatewaySystemdServiceName(env.OPENCLAW_PROFILE),
2691
+ windowsTaskName: resolveGatewayWindowsTaskName(env.OPENCLAW_PROFILE)
2692
+ }));
2693
+ }
2694
+ return hints;
2695
+ }
2696
+ //#endregion
2697
+ //#region src/commands/doctor-gateway-daemon-flow.ts
2698
+ async function maybeRepairLaunchAgentBootstrap(params) {
2699
+ if (process.platform !== "darwin") return false;
2700
+ if (!await isLaunchAgentListed({ env: params.env })) return false;
2701
+ if (await isLaunchAgentLoaded({ env: params.env })) return false;
2702
+ if (!await launchAgentPlistExists(params.env)) return false;
2703
+ note$1("LaunchAgent is listed but not loaded in launchd.", `${params.title} LaunchAgent`);
2704
+ if (!await params.prompter.confirmSkipInNonInteractive({
2705
+ message: `Repair ${params.title} LaunchAgent bootstrap now?`,
2706
+ initialValue: true
2707
+ })) return false;
2708
+ params.runtime.log(`Bootstrapping ${params.title} LaunchAgent...`);
2709
+ const repair = await repairLaunchAgentBootstrap({ env: params.env });
2710
+ if (!repair.ok) {
2711
+ params.runtime.error(`${params.title} LaunchAgent bootstrap failed: ${repair.detail ?? "unknown error"}`);
2712
+ return false;
2713
+ }
2714
+ if (!await isLaunchAgentLoaded({ env: params.env })) {
2715
+ params.runtime.error(`${params.title} LaunchAgent still not loaded after repair.`);
2716
+ return false;
2717
+ }
2718
+ note$1(`${params.title} LaunchAgent repaired.`, `${params.title} LaunchAgent`);
2719
+ return true;
2720
+ }
2721
+ async function maybeRepairGatewayDaemon(params) {
2722
+ if (params.healthOk) return;
2723
+ const service = resolveGatewayService();
2724
+ let loaded = false;
2725
+ try {
2726
+ loaded = await service.isLoaded({ env: process.env });
2727
+ } catch {
2728
+ loaded = false;
2729
+ }
2730
+ let serviceRuntime;
2731
+ if (loaded) serviceRuntime = await service.readRuntime(process.env).catch(() => void 0);
2732
+ if (process.platform === "darwin" && params.cfg.gateway?.mode !== "remote") {
2733
+ const gatewayRepaired = await maybeRepairLaunchAgentBootstrap({
2734
+ env: process.env,
2735
+ title: "Gateway",
2736
+ runtime: params.runtime,
2737
+ prompter: params.prompter
2738
+ });
2739
+ await maybeRepairLaunchAgentBootstrap({
2740
+ env: {
2741
+ ...process.env,
2742
+ OPENCLAW_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel()
2743
+ },
2744
+ title: "Node",
2745
+ runtime: params.runtime,
2746
+ prompter: params.prompter
2747
+ });
2748
+ if (gatewayRepaired) {
2749
+ loaded = await service.isLoaded({ env: process.env });
2750
+ if (loaded) serviceRuntime = await service.readRuntime(process.env).catch(() => void 0);
2751
+ }
2752
+ }
2753
+ if (params.cfg.gateway?.mode !== "remote") {
2754
+ const diagnostics = await inspectPortUsage(resolveGatewayPort(params.cfg, process.env));
2755
+ if (diagnostics.status === "busy") note$1(formatPortDiagnostics(diagnostics).join("\n"), "Gateway port");
2756
+ else if (loaded && serviceRuntime?.status === "running") {
2757
+ const lastError = await readLastGatewayErrorLine(process.env);
2758
+ if (lastError) note$1(`Last gateway error: ${lastError}`, "Gateway");
2759
+ }
2760
+ }
2761
+ if (!loaded) {
2762
+ if (process.platform === "linux") {
2763
+ if (!await isSystemdUserServiceAvailable().catch(() => false)) {
2764
+ note$1(renderSystemdUnavailableHints({ wsl: await isWSL() }).join("\n"), "Gateway");
2765
+ return;
2766
+ }
2767
+ }
2768
+ note$1("Gateway service not installed.", "Gateway");
2769
+ if (params.cfg.gateway?.mode !== "remote") {
2770
+ if (await params.prompter.confirmSkipInNonInteractive({
2771
+ message: "Install gateway service now?",
2772
+ initialValue: true
2773
+ })) {
2774
+ const daemonRuntime = await params.prompter.select({
2775
+ message: "Gateway service runtime",
2776
+ options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
2777
+ initialValue: DEFAULT_GATEWAY_DAEMON_RUNTIME
2778
+ }, DEFAULT_GATEWAY_DAEMON_RUNTIME);
2779
+ const tokenResolution = await resolveGatewayInstallToken({
2780
+ config: params.cfg,
2781
+ env: process.env
2782
+ });
2783
+ for (const warning of tokenResolution.warnings) note$1(warning, "Gateway");
2784
+ if (tokenResolution.unavailableReason) {
2785
+ note$1([
2786
+ "Gateway service install aborted.",
2787
+ tokenResolution.unavailableReason,
2788
+ "Fix gateway auth config/token input and rerun doctor."
2789
+ ].join("\n"), "Gateway");
2790
+ return;
2791
+ }
2792
+ const port = resolveGatewayPort(params.cfg, process.env);
2793
+ const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
2794
+ env: process.env,
2795
+ port,
2796
+ runtime: daemonRuntime,
2797
+ warn: (message, title) => note$1(message, title),
2798
+ config: params.cfg
2799
+ });
2800
+ try {
2801
+ await service.install({
2802
+ env: process.env,
2803
+ stdout: process.stdout,
2804
+ programArguments,
2805
+ workingDirectory,
2806
+ environment
2807
+ });
2808
+ } catch (err) {
2809
+ note$1(`Gateway service install failed: ${String(err)}`, "Gateway");
2810
+ note$1(gatewayInstallErrorHint(), "Gateway");
2811
+ }
2812
+ }
2813
+ }
2814
+ return;
2815
+ }
2816
+ const summary = formatGatewayRuntimeSummary(serviceRuntime);
2817
+ const hints = buildGatewayRuntimeHints(serviceRuntime, {
2818
+ platform: process.platform,
2819
+ env: process.env
2820
+ });
2821
+ if (summary || hints.length > 0) {
2822
+ const lines = [];
2823
+ if (summary) lines.push(`Runtime: ${summary}`);
2824
+ lines.push(...hints);
2825
+ note$1(lines.join("\n"), "Gateway");
2826
+ }
2827
+ if (serviceRuntime?.status !== "running") {
2828
+ if (await params.prompter.confirmSkipInNonInteractive({
2829
+ message: "Start gateway service now?",
2830
+ initialValue: true
2831
+ })) {
2832
+ const restartStatus = describeGatewayServiceRestart("Gateway", await service.restart({
2833
+ env: process.env,
2834
+ stdout: process.stdout
2835
+ }));
2836
+ if (!restartStatus.scheduled) await sleep(1500);
2837
+ else note$1(restartStatus.message, "Gateway");
2838
+ }
2839
+ }
2840
+ if (process.platform === "darwin") {
2841
+ const label = resolveGatewayLaunchAgentLabel(process.env.OPENCLAW_PROFILE);
2842
+ note$1(`LaunchAgent loaded; stopping requires "${formatCliCommand("openclaw gateway stop")}" or launchctl bootout gui/$UID/${label}.`, "Gateway");
2843
+ }
2844
+ if (serviceRuntime?.status === "running") {
2845
+ if (await params.prompter.confirmSkipInNonInteractive({
2846
+ message: "Restart gateway service now?",
2847
+ initialValue: true
2848
+ })) {
2849
+ const restartStatus = describeGatewayServiceRestart("Gateway", await service.restart({
2850
+ env: process.env,
2851
+ stdout: process.stdout
2852
+ }));
2853
+ if (restartStatus.scheduled) {
2854
+ note$1(restartStatus.message, "Gateway");
2855
+ return;
2856
+ }
2857
+ await sleep(1500);
2858
+ try {
2859
+ await healthCommand({
2860
+ json: false,
2861
+ timeoutMs: 1e4
2862
+ }, params.runtime);
2863
+ } catch (err) {
2864
+ if (String(err).includes("gateway closed")) {
2865
+ note$1("Gateway not running.", "Gateway");
2866
+ note$1(params.gatewayDetailsMessage, "Gateway connection");
2867
+ } else params.runtime.error(formatHealthCheckFailure(err));
2868
+ }
2869
+ }
2870
+ }
2871
+ }
2872
+ //#endregion
2873
+ //#region src/commands/doctor-gateway-health.ts
2874
+ async function checkGatewayHealth(params) {
2875
+ const gatewayDetails = buildGatewayConnectionDetails({ config: params.cfg });
2876
+ const timeoutMs = typeof params.timeoutMs === "number" && params.timeoutMs > 0 ? params.timeoutMs : 1e4;
2877
+ let healthOk = false;
2878
+ try {
2879
+ await healthCommand({
2880
+ json: false,
2881
+ timeoutMs,
2882
+ config: params.cfg
2883
+ }, params.runtime);
2884
+ healthOk = true;
2885
+ } catch (err) {
2886
+ if (String(err).includes("gateway closed")) {
2887
+ note$1("Gateway not running.", "Gateway");
2888
+ note$1(gatewayDetails.message, "Gateway connection");
2889
+ } else params.runtime.error(formatHealthCheckFailure(err));
2890
+ }
2891
+ if (healthOk) try {
2892
+ const issues = collectChannelStatusIssues(await callGateway({
2893
+ method: "channels.status",
2894
+ params: {
2895
+ probe: true,
2896
+ timeoutMs: 5e3
2897
+ },
2898
+ timeoutMs: 6e3
2899
+ }));
2900
+ if (issues.length > 0) note$1(issues.map((issue) => `- ${issue.channel} ${issue.accountId}: ${issue.message}${issue.fix ? ` (${issue.fix})` : ""}`).join("\n"), "Channel warnings");
2901
+ } catch {}
2902
+ return { healthOk };
2903
+ }
2904
+ async function probeGatewayMemoryStatus(params) {
2905
+ const timeoutMs = typeof params.timeoutMs === "number" && params.timeoutMs > 0 ? params.timeoutMs : 8e3;
2906
+ try {
2907
+ const payload = await callGateway({
2908
+ method: "doctor.memory.status",
2909
+ timeoutMs,
2910
+ config: params.cfg
2911
+ });
2912
+ return {
2913
+ checked: true,
2914
+ ready: payload.embedding.ok,
2915
+ error: payload.embedding.error
2916
+ };
2917
+ } catch (err) {
2918
+ return {
2919
+ checked: true,
2920
+ ready: false,
2921
+ error: `gateway memory probe unavailable: ${err instanceof Error ? err.message : String(err)}`
2922
+ };
2923
+ }
2924
+ }
2925
+ //#endregion
2926
+ //#region src/commands/doctor-gateway-auth-token.ts
2927
+ async function resolveGatewayAuthTokenForService(cfg, env) {
2928
+ const resolved = await resolveConfiguredSecretInputWithFallback({
2929
+ config: cfg,
2930
+ env,
2931
+ value: cfg.gateway?.auth?.token,
2932
+ path: "gateway.auth.token",
2933
+ unresolvedReasonStyle: "detailed",
2934
+ readFallback: () => readGatewayTokenEnv(env)
2935
+ });
2936
+ if (resolved.value) return { token: resolved.value };
2937
+ if (!resolved.secretRefConfigured) return {};
2938
+ if (resolved.unresolvedRefReason?.includes("resolved to an empty value")) return { unavailableReason: resolved.unresolvedRefReason };
2939
+ return { unavailableReason: `gateway.auth.token SecretRef is configured but unresolved (${resolved.unresolvedRefReason ?? "unknown reason"}).` };
2940
+ }
2941
+ //#endregion
2942
+ //#region src/commands/doctor-gateway-services.ts
2943
+ const execFileAsync$1 = promisify(execFile);
2944
+ function detectGatewayRuntime(programArguments) {
2945
+ const first = programArguments?.[0];
2946
+ if (first) {
2947
+ const base = path.basename(first).toLowerCase();
2948
+ if (base === "bun" || base === "bun.exe") return "bun";
2949
+ if (base === "node" || base === "node.exe") return "node";
2950
+ }
2951
+ return DEFAULT_GATEWAY_DAEMON_RUNTIME;
2952
+ }
2953
+ function findGatewayEntrypoint(programArguments) {
2954
+ if (!programArguments || programArguments.length === 0) return null;
2955
+ const gatewayIndex = programArguments.indexOf("gateway");
2956
+ if (gatewayIndex <= 0) return null;
2957
+ return programArguments[gatewayIndex - 1] ?? null;
2958
+ }
2959
+ async function normalizeExecutablePath(value) {
2960
+ const resolvedPath = path.resolve(value);
2961
+ try {
2962
+ return await fs$1.realpath(resolvedPath);
2963
+ } catch {
2964
+ return resolvedPath;
2965
+ }
2966
+ }
2967
+ function extractDetailPath(detail, prefix) {
2968
+ if (!detail.startsWith(prefix)) return null;
2969
+ const value = detail.slice(prefix.length).trim();
2970
+ return value.length > 0 ? value : null;
2971
+ }
2972
+ async function cleanupLegacyLaunchdService(params) {
2973
+ await execFileAsync$1("launchctl", [
2974
+ "bootout",
2975
+ typeof process.getuid === "function" ? `gui/${process.getuid()}` : "gui/501",
2976
+ params.plistPath
2977
+ ]).catch(() => void 0);
2978
+ await execFileAsync$1("launchctl", ["unload", params.plistPath]).catch(() => void 0);
2979
+ const trashDir = path.join(os.homedir(), ".Trash");
2980
+ try {
2981
+ await fs$1.mkdir(trashDir, { recursive: true });
2982
+ } catch {}
2983
+ try {
2984
+ await fs$1.access(params.plistPath);
2985
+ } catch {
2986
+ return null;
2987
+ }
2988
+ const dest = path.join(trashDir, `${params.label}-${Date.now()}.plist`);
2989
+ try {
2990
+ await fs$1.rename(params.plistPath, dest);
2991
+ return dest;
2992
+ } catch {
2993
+ return null;
2994
+ }
2995
+ }
2996
+ function classifyLegacyServices(legacyServices) {
2997
+ const darwinUserServices = [];
2998
+ const linuxUserServices = [];
2999
+ const failed = [];
3000
+ for (const svc of legacyServices) {
3001
+ if (svc.platform === "darwin") {
3002
+ if (svc.scope === "user") darwinUserServices.push(svc);
3003
+ else failed.push(`${svc.label} (${svc.scope})`);
3004
+ continue;
3005
+ }
3006
+ if (svc.platform === "linux") {
3007
+ if (svc.scope === "user") linuxUserServices.push(svc);
3008
+ else failed.push(`${svc.label} (${svc.scope})`);
3009
+ continue;
3010
+ }
3011
+ failed.push(`${svc.label} (${svc.platform})`);
3012
+ }
3013
+ return {
3014
+ darwinUserServices,
3015
+ linuxUserServices,
3016
+ failed
3017
+ };
3018
+ }
3019
+ async function cleanupLegacyDarwinServices(services) {
3020
+ const removed = [];
3021
+ const failed = [];
3022
+ for (const svc of services) {
3023
+ const plistPath = extractDetailPath(svc.detail, "plist:");
3024
+ if (!plistPath) {
3025
+ failed.push(`${svc.label} (missing plist path)`);
3026
+ continue;
3027
+ }
3028
+ const dest = await cleanupLegacyLaunchdService({
3029
+ label: svc.label,
3030
+ plistPath
3031
+ });
3032
+ removed.push(dest ? `${svc.label} -> ${dest}` : svc.label);
3033
+ }
3034
+ return {
3035
+ removed,
3036
+ failed
3037
+ };
3038
+ }
3039
+ async function cleanupLegacyLinuxUserServices(services, runtime) {
3040
+ const removed = [];
3041
+ const failed = [];
3042
+ try {
3043
+ const removedUnits = await uninstallLegacySystemdUnits({
3044
+ env: process.env,
3045
+ stdout: process.stdout
3046
+ });
3047
+ const removedByLabel = new Map(removedUnits.map((unit) => [`${unit.name}.service`, unit]));
3048
+ for (const svc of services) {
3049
+ const removedUnit = removedByLabel.get(svc.label);
3050
+ if (!removedUnit) {
3051
+ failed.push(`${svc.label} (legacy unit name not recognized)`);
3052
+ continue;
3053
+ }
3054
+ removed.push(`${svc.label} -> ${removedUnit.unitPath}`);
3055
+ }
3056
+ } catch (err) {
3057
+ runtime.error(`Legacy Linux gateway cleanup failed: ${String(err)}`);
3058
+ for (const svc of services) failed.push(`${svc.label} (linux cleanup failed)`);
3059
+ }
3060
+ return {
3061
+ removed,
3062
+ failed
3063
+ };
3064
+ }
3065
+ async function maybeRepairGatewayServiceConfig(cfg, mode, runtime, prompter) {
3066
+ if (resolveIsNixMode(process.env)) {
3067
+ note$1("Nix mode detected; skip service updates.", "Gateway");
3068
+ return;
3069
+ }
3070
+ if (mode === "remote") {
3071
+ note$1("Gateway mode is remote; skipped local service audit.", "Gateway");
3072
+ return;
3073
+ }
3074
+ const service = resolveGatewayService();
3075
+ let command = null;
3076
+ try {
3077
+ command = await service.readCommand(process.env);
3078
+ } catch {
3079
+ command = null;
3080
+ }
3081
+ if (!command) return;
3082
+ const tokenRefConfigured = Boolean(resolveSecretInputRef({
3083
+ value: cfg.gateway?.auth?.token,
3084
+ defaults: cfg.secrets?.defaults
3085
+ }).ref);
3086
+ const gatewayTokenResolution = await resolveGatewayAuthTokenForService(cfg, process.env);
3087
+ if (gatewayTokenResolution.unavailableReason) note$1(`Unable to verify gateway service token drift: ${gatewayTokenResolution.unavailableReason}`, "Gateway service config");
3088
+ const expectedGatewayToken = tokenRefConfigured ? void 0 : gatewayTokenResolution.token;
3089
+ const audit = await auditGatewayServiceConfig({
3090
+ env: process.env,
3091
+ command,
3092
+ expectedGatewayToken
3093
+ });
3094
+ const serviceToken = readEmbeddedGatewayToken(command);
3095
+ if (tokenRefConfigured && serviceToken) audit.issues.push({
3096
+ code: SERVICE_AUDIT_CODES.gatewayTokenMismatch,
3097
+ message: "Gateway service OPENCLAW_GATEWAY_TOKEN should be unset when gateway.auth.token is SecretRef-managed",
3098
+ detail: "service token is stale",
3099
+ level: "recommended"
3100
+ });
3101
+ const needsNodeRuntime = needsNodeRuntimeMigration(audit.issues);
3102
+ const systemNodeInfo = needsNodeRuntime ? await resolveSystemNodeInfo({ env: process.env }) : null;
3103
+ const systemNodePath = systemNodeInfo?.supported ? systemNodeInfo.path : null;
3104
+ if (needsNodeRuntime && !systemNodePath) {
3105
+ const warning = renderSystemNodeWarning(systemNodeInfo);
3106
+ if (warning) note$1(warning, "Gateway runtime");
3107
+ note$1("System Node 22 LTS (22.16+) or Node 24 not found. Install via Homebrew/apt/choco and rerun doctor to migrate off Bun/version managers.", "Gateway runtime");
3108
+ }
3109
+ const port = resolveGatewayPort(cfg, process.env);
3110
+ const runtimeChoice = detectGatewayRuntime(command.programArguments);
3111
+ const { programArguments } = await buildGatewayInstallPlan({
3112
+ env: process.env,
3113
+ port,
3114
+ runtime: needsNodeRuntime && systemNodePath ? "node" : runtimeChoice,
3115
+ nodePath: systemNodePath ?? void 0,
3116
+ warn: (message, title) => note$1(message, title),
3117
+ config: cfg
3118
+ });
3119
+ const expectedEntrypoint = findGatewayEntrypoint(programArguments);
3120
+ const currentEntrypoint = findGatewayEntrypoint(command.programArguments);
3121
+ const normalizedExpectedEntrypoint = expectedEntrypoint ? await normalizeExecutablePath(expectedEntrypoint) : null;
3122
+ const normalizedCurrentEntrypoint = currentEntrypoint ? await normalizeExecutablePath(currentEntrypoint) : null;
3123
+ if (normalizedExpectedEntrypoint && normalizedCurrentEntrypoint && normalizedExpectedEntrypoint !== normalizedCurrentEntrypoint) audit.issues.push({
3124
+ code: SERVICE_AUDIT_CODES.gatewayEntrypointMismatch,
3125
+ message: "Gateway service entrypoint does not match the current install.",
3126
+ detail: `${currentEntrypoint} -> ${expectedEntrypoint}`,
3127
+ level: "recommended"
3128
+ });
3129
+ if (audit.issues.length === 0) return;
3130
+ note$1(audit.issues.map((issue) => issue.detail ? `- ${issue.message} (${issue.detail})` : `- ${issue.message}`).join("\n"), "Gateway service config");
3131
+ const needsAggressive = audit.issues.filter((issue) => issue.level === "aggressive").length > 0;
3132
+ if (needsAggressive && !prompter.shouldForce) note$1("Custom or unexpected service edits detected. Rerun with --force to overwrite.", "Gateway service config");
3133
+ if (!(needsAggressive ? await prompter.confirmAggressive({
3134
+ message: "Overwrite gateway service config with current defaults now?",
3135
+ initialValue: Boolean(prompter.shouldForce)
3136
+ }) : await prompter.confirmRepair({
3137
+ message: "Update gateway service config to the recommended defaults now?",
3138
+ initialValue: true
3139
+ }))) return;
3140
+ const serviceEmbeddedToken = readEmbeddedGatewayToken(command);
3141
+ const gatewayTokenForRepair = expectedGatewayToken ?? serviceEmbeddedToken;
3142
+ const configuredGatewayToken = typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway.auth.token.trim() || void 0 : void 0;
3143
+ let cfgForServiceInstall = cfg;
3144
+ if (!tokenRefConfigured && !configuredGatewayToken && gatewayTokenForRepair) {
3145
+ const nextCfg = {
3146
+ ...cfg,
3147
+ gateway: {
3148
+ ...cfg.gateway,
3149
+ auth: {
3150
+ ...cfg.gateway?.auth,
3151
+ mode: cfg.gateway?.auth?.mode ?? "token",
3152
+ token: gatewayTokenForRepair
3153
+ }
3154
+ }
3155
+ };
3156
+ try {
3157
+ await writeConfigFile(nextCfg);
3158
+ cfgForServiceInstall = nextCfg;
3159
+ note$1(expectedGatewayToken ? "Persisted gateway.auth.token from environment before reinstalling service." : "Persisted gateway.auth.token from existing service definition before reinstalling service.", "Gateway");
3160
+ } catch (err) {
3161
+ runtime.error(`Failed to persist gateway.auth.token before service repair: ${String(err)}`);
3162
+ return;
3163
+ }
3164
+ }
3165
+ const updatedPort = resolveGatewayPort(cfgForServiceInstall, process.env);
3166
+ const updatedPlan = await buildGatewayInstallPlan({
3167
+ env: process.env,
3168
+ port: updatedPort,
3169
+ runtime: needsNodeRuntime && systemNodePath ? "node" : runtimeChoice,
3170
+ nodePath: systemNodePath ?? void 0,
3171
+ warn: (message, title) => note$1(message, title),
3172
+ config: cfgForServiceInstall
3173
+ });
3174
+ try {
3175
+ await service.install({
3176
+ env: process.env,
3177
+ stdout: process.stdout,
3178
+ programArguments: updatedPlan.programArguments,
3179
+ workingDirectory: updatedPlan.workingDirectory,
3180
+ environment: updatedPlan.environment
3181
+ });
3182
+ } catch (err) {
3183
+ runtime.error(`Gateway service update failed: ${String(err)}`);
3184
+ }
3185
+ }
3186
+ async function maybeScanExtraGatewayServices(options, runtime, prompter) {
3187
+ const extraServices = await findExtraGatewayServices(process.env, { deep: options.deep });
3188
+ if (extraServices.length === 0) return;
3189
+ note$1(extraServices.map((svc) => `- ${svc.label} (${svc.scope}, ${svc.detail})`).join("\n"), "Other gateway-like services detected");
3190
+ const legacyServices = extraServices.filter((svc) => svc.legacy === true);
3191
+ if (legacyServices.length > 0) {
3192
+ if (await prompter.confirmSkipInNonInteractive({
3193
+ message: "Remove legacy gateway services (clawdbot/moltbot) now?",
3194
+ initialValue: true
3195
+ })) {
3196
+ const removed = [];
3197
+ const { darwinUserServices, linuxUserServices, failed } = classifyLegacyServices(legacyServices);
3198
+ if (darwinUserServices.length > 0) {
3199
+ const result = await cleanupLegacyDarwinServices(darwinUserServices);
3200
+ removed.push(...result.removed);
3201
+ failed.push(...result.failed);
3202
+ }
3203
+ if (linuxUserServices.length > 0) {
3204
+ const result = await cleanupLegacyLinuxUserServices(linuxUserServices, runtime);
3205
+ removed.push(...result.removed);
3206
+ failed.push(...result.failed);
3207
+ }
3208
+ if (removed.length > 0) note$1(removed.map((line) => `- ${line}`).join("\n"), "Legacy gateway removed");
3209
+ if (failed.length > 0) note$1(failed.map((line) => `- ${line}`).join("\n"), "Legacy gateway cleanup skipped");
3210
+ if (removed.length > 0) runtime.log("Legacy gateway services removed. Installing OpenClaw gateway next.");
3211
+ }
3212
+ }
3213
+ const cleanupHints = renderGatewayServiceCleanupHints();
3214
+ if (cleanupHints.length > 0) note$1(cleanupHints.map((hint) => `- ${hint}`).join("\n"), "Cleanup hints");
3215
+ note$1([
3216
+ "Recommendation: run a single gateway per machine for most setups.",
3217
+ "One gateway supports multiple agents.",
3218
+ "If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host)."
3219
+ ].join("\n"), "Gateway recommendation");
3220
+ }
3221
+ //#endregion
3222
+ //#region src/commands/doctor-install.ts
3223
+ function noteSourceInstallIssues(root) {
3224
+ if (!root) return;
3225
+ const workspaceMarker = path.join(root, "pnpm-workspace.yaml");
3226
+ if (!fs.existsSync(workspaceMarker)) return;
3227
+ const warnings = [];
3228
+ const nodeModules = path.join(root, "node_modules");
3229
+ const pnpmStore = path.join(nodeModules, ".pnpm");
3230
+ const tsxBin = path.join(nodeModules, ".bin", "tsx");
3231
+ const srcEntry = path.join(root, "src", "entry.ts");
3232
+ if (fs.existsSync(nodeModules) && !fs.existsSync(pnpmStore)) warnings.push("- node_modules was not installed by pnpm (missing node_modules/.pnpm). Run: pnpm install");
3233
+ if (fs.existsSync(path.join(root, "package-lock.json"))) warnings.push("- package-lock.json present in a pnpm workspace. If you ran npm install, remove it and reinstall with pnpm.");
3234
+ if (fs.existsSync(srcEntry) && !fs.existsSync(tsxBin)) warnings.push("- tsx binary is missing for source runs. Run: pnpm install");
3235
+ if (warnings.length > 0) note$1(warnings.join("\n"), "Install");
3236
+ }
3237
+ //#endregion
3238
+ //#region src/commands/doctor-memory-search.ts
3239
+ /**
3240
+ * Check whether memory search has a usable embedding provider.
3241
+ * Runs as part of `openclaw doctor` — config-only, no network calls.
3242
+ */
3243
+ async function noteMemorySearchHealth(cfg, opts) {
3244
+ const agentId = resolveDefaultAgentId(cfg);
3245
+ const agentDir = resolveAgentDir(cfg, agentId);
3246
+ const resolved = resolveMemorySearchConfig(cfg, agentId);
3247
+ const hasRemoteApiKey = hasConfiguredMemorySecretInput(resolved?.remote?.apiKey);
3248
+ if (!resolved) {
3249
+ note$1("Memory search is explicitly disabled (enabled: false).", "Memory search");
3250
+ return;
3251
+ }
3252
+ if (resolveMemoryBackendConfig({
3253
+ cfg,
3254
+ agentId
3255
+ }).backend === "qmd") return;
3256
+ if (resolved.provider !== "auto") {
3257
+ if (resolved.provider === "local") {
3258
+ if (hasLocalEmbeddings(resolved.local, true)) {
3259
+ if (opts?.gatewayMemoryProbe?.checked && !opts.gatewayMemoryProbe.ready) {
3260
+ const detail = opts.gatewayMemoryProbe.error?.trim();
3261
+ note$1([
3262
+ "Memory search provider is set to \"local\" and a model path is configured,",
3263
+ "but the gateway reports local embeddings are not ready.",
3264
+ detail ? `Gateway probe: ${detail}` : null,
3265
+ "",
3266
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3267
+ ].filter(Boolean).join("\n"), "Memory search");
3268
+ }
3269
+ return;
3270
+ }
3271
+ note$1([
3272
+ "Memory search provider is set to \"local\" but no local model file was found.",
3273
+ "",
3274
+ "Fix (pick one):",
3275
+ `- Install node-llama-cpp and set a local model path in config`,
3276
+ `- Switch to a remote provider: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.provider openai")}`,
3277
+ "",
3278
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3279
+ ].join("\n"), "Memory search");
3280
+ return;
3281
+ }
3282
+ if (hasRemoteApiKey || await hasApiKeyForProvider(resolved.provider, cfg, agentDir)) return;
3283
+ if (opts?.gatewayMemoryProbe?.checked && opts.gatewayMemoryProbe.ready) {
3284
+ note$1([
3285
+ `Memory search provider is set to "${resolved.provider}" but the API key was not found in the CLI environment.`,
3286
+ "The running gateway reports memory embeddings are ready for the default agent.",
3287
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3288
+ ].join("\n"), "Memory search");
3289
+ return;
3290
+ }
3291
+ const gatewayProbeWarning = buildGatewayProbeWarning(opts?.gatewayMemoryProbe);
3292
+ const envVar = providerEnvVar(resolved.provider);
3293
+ note$1([
3294
+ `Memory search provider is set to "${resolved.provider}" but no API key was found.`,
3295
+ `Semantic recall will not work without a valid API key.`,
3296
+ gatewayProbeWarning ? gatewayProbeWarning : null,
3297
+ "",
3298
+ "Fix (pick one):",
3299
+ `- Set ${envVar} in your environment`,
3300
+ `- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
3301
+ `- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
3302
+ "",
3303
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3304
+ ].join("\n"), "Memory search");
3305
+ return;
3306
+ }
3307
+ if (hasLocalEmbeddings(resolved.local)) return;
3308
+ for (const provider of [
3309
+ "openai",
3310
+ "gemini",
3311
+ "voyage",
3312
+ "mistral"
3313
+ ]) if (hasRemoteApiKey || await hasApiKeyForProvider(provider, cfg, agentDir)) return;
3314
+ if (opts?.gatewayMemoryProbe?.checked && opts.gatewayMemoryProbe.ready) {
3315
+ note$1([
3316
+ "Memory search provider is set to \"auto\" but the API key was not found in the CLI environment.",
3317
+ "The running gateway reports memory embeddings are ready for the default agent.",
3318
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3319
+ ].join("\n"), "Memory search");
3320
+ return;
3321
+ }
3322
+ const gatewayProbeWarning = buildGatewayProbeWarning(opts?.gatewayMemoryProbe);
3323
+ note$1([
3324
+ "Memory search is enabled, but no embedding provider is ready.",
3325
+ "Semantic recall needs at least one embedding provider.",
3326
+ gatewayProbeWarning ? gatewayProbeWarning : null,
3327
+ "",
3328
+ "Fix (pick one):",
3329
+ "- Set OPENAI_API_KEY, GEMINI_API_KEY, VOYAGE_API_KEY, or MISTRAL_API_KEY in your environment",
3330
+ `- Configure credentials: ${formatCliCommand("openclaw configure --section model")}`,
3331
+ `- For local embeddings: configure agents.defaults.memorySearch.provider and local model path`,
3332
+ `- To disable: ${formatCliCommand("openclaw config set agents.defaults.memorySearch.enabled false")}`,
3333
+ "",
3334
+ `Verify: ${formatCliCommand("openclaw memory status --deep")}`
3335
+ ].join("\n"), "Memory search");
3336
+ }
3337
+ /**
3338
+ * Check whether local embeddings are available.
3339
+ *
3340
+ * When `useDefaultFallback` is true (explicit `provider: "local"`), an empty
3341
+ * modelPath is treated as available because the runtime falls back to
3342
+ * DEFAULT_LOCAL_MODEL (an auto-downloaded HuggingFace model).
3343
+ *
3344
+ * When false (provider: "auto"), we only consider local available if the user
3345
+ * explicitly configured a local file path — matching `canAutoSelectLocal()`
3346
+ * in the runtime, which skips local for empty/hf: model paths.
3347
+ */
3348
+ function hasLocalEmbeddings(local, useDefaultFallback = false) {
3349
+ const modelPath = local.modelPath?.trim() || (useDefaultFallback ? "hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf" : void 0);
3350
+ if (!modelPath) return false;
3351
+ if (/^(hf:|https?:)/i.test(modelPath)) return true;
3352
+ const resolved = resolveUserPath(modelPath);
3353
+ try {
3354
+ return fs.statSync(resolved).isFile();
3355
+ } catch {
3356
+ return false;
3357
+ }
3358
+ }
3359
+ async function hasApiKeyForProvider(provider, cfg, agentDir) {
3360
+ const authProvider = provider === "gemini" ? "google" : provider;
3361
+ try {
3362
+ await resolveApiKeyForProvider({
3363
+ provider: authProvider,
3364
+ cfg,
3365
+ agentDir
3366
+ });
3367
+ return true;
3368
+ } catch {
3369
+ return false;
3370
+ }
3371
+ }
3372
+ function providerEnvVar(provider) {
3373
+ switch (provider) {
3374
+ case "openai": return "OPENAI_API_KEY";
3375
+ case "gemini": return "GEMINI_API_KEY";
3376
+ case "voyage": return "VOYAGE_API_KEY";
3377
+ default: return `${provider.toUpperCase()}_API_KEY`;
3378
+ }
3379
+ }
3380
+ function buildGatewayProbeWarning(probe) {
3381
+ if (!probe?.checked || probe.ready) return null;
3382
+ const detail = probe.error?.trim();
3383
+ return detail ? `Gateway memory probe for default agent is not ready: ${detail}` : "Gateway memory probe for default agent is not ready.";
3384
+ }
3385
+ //#endregion
3386
+ //#region src/commands/doctor-platform-notes.ts
3387
+ const execFileAsync = promisify(execFile);
3388
+ function resolveHomeDir() {
3389
+ return process.env.HOME ?? os.homedir();
3390
+ }
3391
+ async function noteMacLaunchAgentOverrides() {
3392
+ if (process.platform !== "darwin") return;
3393
+ const home = resolveHomeDir();
3394
+ const markerPath = [path.join(home, ".openclaw", "disable-launchagent")].find((candidate) => fs.existsSync(candidate));
3395
+ if (!markerPath) return;
3396
+ const displayMarkerPath = shortenHomePath(markerPath);
3397
+ note$1([
3398
+ `- LaunchAgent writes are disabled via ${displayMarkerPath}.`,
3399
+ "- To restore default behavior:",
3400
+ ` rm ${displayMarkerPath}`
3401
+ ].filter((line) => Boolean(line)).join("\n"), "Gateway (macOS)");
3402
+ }
3403
+ async function launchctlGetenv(name) {
3404
+ try {
3405
+ const result = await execFileAsync("/bin/launchctl", ["getenv", name], { encoding: "utf8" });
3406
+ const value = String(result.stdout ?? "").trim();
3407
+ return value.length > 0 ? value : void 0;
3408
+ } catch {
3409
+ return;
3410
+ }
3411
+ }
3412
+ function hasConfigGatewayCreds(cfg) {
3413
+ const localPassword = cfg.gateway?.auth?.password;
3414
+ const remoteToken = cfg.gateway?.remote?.token;
3415
+ const remotePassword = cfg.gateway?.remote?.password;
3416
+ return Boolean(hasConfiguredSecretInput(cfg.gateway?.auth?.token, cfg.secrets?.defaults) || hasConfiguredSecretInput(localPassword, cfg.secrets?.defaults) || hasConfiguredSecretInput(remoteToken, cfg.secrets?.defaults) || hasConfiguredSecretInput(remotePassword, cfg.secrets?.defaults));
3417
+ }
3418
+ async function noteMacLaunchctlGatewayEnvOverrides(cfg, deps) {
3419
+ if ((deps?.platform ?? process.platform) !== "darwin") return;
3420
+ if (!hasConfigGatewayCreds(cfg)) return;
3421
+ const getenv = deps?.getenv ?? launchctlGetenv;
3422
+ const deprecatedLaunchctlEntries = [["CLAWDBOT_GATEWAY_TOKEN", await getenv("CLAWDBOT_GATEWAY_TOKEN")], ["CLAWDBOT_GATEWAY_PASSWORD", await getenv("CLAWDBOT_GATEWAY_PASSWORD")]].filter((entry) => Boolean(entry[1]?.trim()));
3423
+ if (deprecatedLaunchctlEntries.length > 0) {
3424
+ const lines = ["- Deprecated launchctl environment variables detected (ignored).", ...deprecatedLaunchctlEntries.map(([key]) => `- \`${key}\` is set; use \`OPENCLAW_${key.slice(key.indexOf("_") + 1)}\` instead.`)];
3425
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Gateway (macOS)");
3426
+ }
3427
+ const tokenEntries = [["OPENCLAW_GATEWAY_TOKEN", await getenv("OPENCLAW_GATEWAY_TOKEN")]];
3428
+ const passwordEntries = [["OPENCLAW_GATEWAY_PASSWORD", await getenv("OPENCLAW_GATEWAY_PASSWORD")]];
3429
+ const tokenEntry = tokenEntries.find(([, value]) => value?.trim());
3430
+ const passwordEntry = passwordEntries.find(([, value]) => value?.trim());
3431
+ const envToken = tokenEntry?.[1]?.trim() ?? "";
3432
+ const envPassword = passwordEntry?.[1]?.trim() ?? "";
3433
+ const envTokenKey = tokenEntry?.[0];
3434
+ const envPasswordKey = passwordEntry?.[0];
3435
+ if (!envToken && !envPassword) return;
3436
+ const lines = [
3437
+ "- launchctl environment overrides detected (can cause confusing unauthorized errors).",
3438
+ envToken && envTokenKey ? `- \`${envTokenKey}\` is set; it overrides config tokens.` : void 0,
3439
+ envPassword ? `- \`${envPasswordKey ?? "OPENCLAW_GATEWAY_PASSWORD"}\` is set; it overrides config passwords.` : void 0,
3440
+ "- Clear overrides and restart the app/gateway:",
3441
+ envTokenKey ? ` launchctl unsetenv ${envTokenKey}` : void 0,
3442
+ envPasswordKey ? ` launchctl unsetenv ${envPasswordKey}` : void 0
3443
+ ].filter((line) => Boolean(line));
3444
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Gateway (macOS)");
3445
+ }
3446
+ function noteDeprecatedLegacyEnvVars(env = process.env, deps) {
3447
+ const entries = Object.entries(env).filter(([key, value]) => key.startsWith("CLAWDBOT_") && value?.trim()).map(([key]) => key);
3448
+ if (entries.length === 0) return;
3449
+ const lines = [
3450
+ "- Deprecated legacy environment variables detected (ignored).",
3451
+ "- Use OPENCLAW_* equivalents instead:",
3452
+ ...entries.map((key) => {
3453
+ return ` ${key} -> OPENCLAW_${key.slice(key.indexOf("_") + 1)}`;
3454
+ })
3455
+ ];
3456
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Environment");
3457
+ }
3458
+ function isTruthyEnvValue(value) {
3459
+ return typeof value === "string" && value.trim().length > 0;
3460
+ }
3461
+ function isTmpCompileCachePath(cachePath) {
3462
+ const normalized = cachePath.trim().replace(/\/+$/, "");
3463
+ return normalized === "/tmp" || normalized.startsWith("/tmp/") || normalized === "/private/tmp" || normalized.startsWith("/private/tmp/");
3464
+ }
3465
+ function noteStartupOptimizationHints(env = process.env, deps) {
3466
+ const platform = deps?.platform ?? process.platform;
3467
+ if (platform === "win32") return;
3468
+ const arch = deps?.arch ?? os.arch();
3469
+ const totalMemBytes = deps?.totalMemBytes ?? os.totalmem();
3470
+ if (!(platform === "linux" && (arch === "arm" || arch === "arm64" || platform === "linux" && totalMemBytes > 0 && totalMemBytes <= 8 * 1024 ** 3))) return;
3471
+ const noteFn = deps?.noteFn ?? note$1;
3472
+ const compileCache = env.NODE_COMPILE_CACHE?.trim() ?? "";
3473
+ const disableCompileCache = env.NODE_DISABLE_COMPILE_CACHE?.trim() ?? "";
3474
+ const noRespawn = env.OPENCLAW_NO_RESPAWN?.trim() ?? "";
3475
+ const lines = [];
3476
+ if (!compileCache) lines.push("- NODE_COMPILE_CACHE is not set; repeated CLI runs can be slower on small hosts (Pi/VM).");
3477
+ else if (isTmpCompileCachePath(compileCache)) lines.push("- NODE_COMPILE_CACHE points to /tmp; use /var/tmp so cache survives reboots and warms startup reliably.");
3478
+ if (isTruthyEnvValue(disableCompileCache)) lines.push("- NODE_DISABLE_COMPILE_CACHE is set; startup compile cache is disabled.");
3479
+ if (noRespawn !== "1") lines.push("- OPENCLAW_NO_RESPAWN is not set to 1; set it to avoid extra startup overhead from self-respawn.");
3480
+ if (lines.length === 0) return;
3481
+ const suggestions = [
3482
+ "- Suggested env for low-power hosts:",
3483
+ " export NODE_COMPILE_CACHE=/var/tmp/openclaw-compile-cache",
3484
+ " mkdir -p /var/tmp/openclaw-compile-cache",
3485
+ " export OPENCLAW_NO_RESPAWN=1",
3486
+ isTruthyEnvValue(disableCompileCache) ? " unset NODE_DISABLE_COMPILE_CACHE" : void 0
3487
+ ].filter((line) => Boolean(line));
3488
+ noteFn([...lines, ...suggestions].join("\n"), "Startup optimization");
3489
+ }
3490
+ //#endregion
3491
+ //#region src/commands/doctor-prompter.ts
3492
+ function createDoctorPrompter(params) {
3493
+ const yes = params.options.yes === true;
3494
+ const requestedNonInteractive = params.options.nonInteractive === true;
3495
+ const shouldRepair = params.options.repair === true || yes;
3496
+ const shouldForce = params.options.force === true;
3497
+ const isTty = Boolean(process.stdin.isTTY);
3498
+ const nonInteractive = requestedNonInteractive || !isTty && !yes;
3499
+ const canPrompt = isTty && !yes && !nonInteractive;
3500
+ const confirmDefault = async (p) => {
3501
+ if (nonInteractive) return false;
3502
+ if (shouldRepair) return true;
3503
+ if (!canPrompt) return Boolean(p.initialValue ?? false);
3504
+ return guardCancel(await confirm({
3505
+ ...p,
3506
+ message: stylePromptMessage(p.message)
3507
+ }), params.runtime);
3508
+ };
3509
+ return {
3510
+ confirm: confirmDefault,
3511
+ confirmRepair: async (p) => {
3512
+ if (nonInteractive) return false;
3513
+ return confirmDefault(p);
3514
+ },
3515
+ confirmAggressive: async (p) => {
3516
+ if (nonInteractive) return false;
3517
+ if (shouldRepair && shouldForce) return true;
3518
+ if (shouldRepair && !shouldForce) return false;
3519
+ if (!canPrompt) return Boolean(p.initialValue ?? false);
3520
+ return guardCancel(await confirm({
3521
+ ...p,
3522
+ message: stylePromptMessage(p.message)
3523
+ }), params.runtime);
3524
+ },
3525
+ confirmSkipInNonInteractive: async (p) => {
3526
+ if (nonInteractive) return false;
3527
+ if (shouldRepair) return true;
3528
+ return confirmDefault(p);
3529
+ },
3530
+ select: async (p, fallback) => {
3531
+ if (!canPrompt || shouldRepair) return fallback;
3532
+ return guardCancel(await select({
3533
+ ...p,
3534
+ message: stylePromptMessage(p.message),
3535
+ options: p.options.map((opt) => opt.hint === void 0 ? opt : {
3536
+ ...opt,
3537
+ hint: stylePromptHint(opt.hint)
3538
+ })
3539
+ }), params.runtime);
3540
+ },
3541
+ shouldRepair,
3542
+ shouldForce
3543
+ };
3544
+ }
3545
+ //#endregion
3546
+ //#region src/commands/doctor-sandbox.ts
3547
+ function resolveSandboxScript(scriptRel) {
3548
+ const candidates = /* @__PURE__ */ new Set();
3549
+ candidates.add(process.cwd());
3550
+ const argv1 = process.argv[1];
3551
+ if (argv1) {
3552
+ const normalized = path.resolve(argv1);
3553
+ candidates.add(path.resolve(path.dirname(normalized), ".."));
3554
+ candidates.add(path.resolve(path.dirname(normalized)));
3555
+ }
3556
+ for (const root of candidates) {
3557
+ const scriptPath = path.join(root, scriptRel);
3558
+ if (fs.existsSync(scriptPath)) return {
3559
+ scriptPath,
3560
+ cwd: root
3561
+ };
3562
+ }
3563
+ return null;
3564
+ }
3565
+ async function runSandboxScript(scriptRel, runtime) {
3566
+ const script = resolveSandboxScript(scriptRel);
3567
+ if (!script) {
3568
+ note$1(`Unable to locate ${scriptRel}. Run it from the repo root.`, "Sandbox");
3569
+ return false;
3570
+ }
3571
+ runtime.log(`Running ${scriptRel}...`);
3572
+ const result = await runCommandWithTimeout(["bash", script.scriptPath], {
3573
+ timeoutMs: 1200 * 1e3,
3574
+ cwd: script.cwd
3575
+ });
3576
+ if (result.code !== 0) {
3577
+ runtime.error(`Failed running ${scriptRel}: ${result.stderr.trim() || result.stdout.trim() || "unknown error"}`);
3578
+ return false;
3579
+ }
3580
+ runtime.log(`Completed ${scriptRel}.`);
3581
+ return true;
3582
+ }
3583
+ async function isDockerAvailable() {
3584
+ try {
3585
+ await runExec("docker", [
3586
+ "version",
3587
+ "--format",
3588
+ "{{.Server.Version}}"
3589
+ ], { timeoutMs: 5e3 });
3590
+ return true;
3591
+ } catch {
3592
+ return false;
3593
+ }
3594
+ }
3595
+ async function dockerImageExists(image) {
3596
+ try {
3597
+ await runExec("docker", [
3598
+ "image",
3599
+ "inspect",
3600
+ image
3601
+ ], { timeoutMs: 5e3 });
3602
+ return true;
3603
+ } catch (error) {
3604
+ const stderr = error?.stderr || error?.message || "";
3605
+ if (String(stderr).includes("No such image")) return false;
3606
+ throw error;
3607
+ }
3608
+ }
3609
+ function resolveSandboxDockerImage(cfg) {
3610
+ const image = cfg.agents?.defaults?.sandbox?.docker?.image?.trim();
3611
+ return image ? image : DEFAULT_SANDBOX_IMAGE;
3612
+ }
3613
+ function resolveSandboxBackend(cfg) {
3614
+ return cfg.agents?.defaults?.sandbox?.backend?.trim() || "docker";
3615
+ }
3616
+ function resolveSandboxBrowserImage(cfg) {
3617
+ const image = cfg.agents?.defaults?.sandbox?.browser?.image?.trim();
3618
+ return image ? image : DEFAULT_SANDBOX_BROWSER_IMAGE;
3619
+ }
3620
+ function updateSandboxDockerImage(cfg, image) {
3621
+ return {
3622
+ ...cfg,
3623
+ agents: {
3624
+ ...cfg.agents,
3625
+ defaults: {
3626
+ ...cfg.agents?.defaults,
3627
+ sandbox: {
3628
+ ...cfg.agents?.defaults?.sandbox,
3629
+ docker: {
3630
+ ...cfg.agents?.defaults?.sandbox?.docker,
3631
+ image
3632
+ }
3633
+ }
3634
+ }
3635
+ }
3636
+ };
3637
+ }
3638
+ function updateSandboxBrowserImage(cfg, image) {
3639
+ return {
3640
+ ...cfg,
3641
+ agents: {
3642
+ ...cfg.agents,
3643
+ defaults: {
3644
+ ...cfg.agents?.defaults,
3645
+ sandbox: {
3646
+ ...cfg.agents?.defaults?.sandbox,
3647
+ browser: {
3648
+ ...cfg.agents?.defaults?.sandbox?.browser,
3649
+ image
3650
+ }
3651
+ }
3652
+ }
3653
+ }
3654
+ };
3655
+ }
3656
+ async function handleMissingSandboxImage(params, runtime, prompter) {
3657
+ if (await dockerImageExists(params.image)) return;
3658
+ const buildHint = params.buildScript ? `Build it with ${params.buildScript}.` : "Build or pull it first.";
3659
+ note$1(`Sandbox ${params.kind} image missing: ${params.image}. ${buildHint}`, "Sandbox");
3660
+ let built = false;
3661
+ if (params.buildScript) {
3662
+ if (await prompter.confirmSkipInNonInteractive({
3663
+ message: `Build ${params.kind} sandbox image now?`,
3664
+ initialValue: true
3665
+ })) built = await runSandboxScript(params.buildScript, runtime);
3666
+ }
3667
+ if (built) return;
3668
+ }
3669
+ async function maybeRepairSandboxImages(cfg, runtime, prompter) {
3670
+ const sandbox = cfg.agents?.defaults?.sandbox;
3671
+ const mode = sandbox?.mode ?? "off";
3672
+ if (!sandbox || mode === "off") return cfg;
3673
+ const backend = resolveSandboxBackend(cfg);
3674
+ if (backend !== "docker") {
3675
+ if (sandbox.browser?.enabled) note$1(`Sandbox backend "${backend}" selected. Docker browser health checks are skipped; browser sandbox currently requires the docker backend.`, "Sandbox");
3676
+ return cfg;
3677
+ }
3678
+ if (!await isDockerAvailable()) {
3679
+ note$1([
3680
+ `Sandbox mode is enabled (mode: "${mode}") but Docker is not available.`,
3681
+ "Docker is required for sandbox mode to function.",
3682
+ "Isolated sessions (cron jobs, sub-agents) will fail without Docker.",
3683
+ "",
3684
+ "Options:",
3685
+ "- Install Docker and restart the gateway",
3686
+ "- Disable sandbox mode: openclaw config set agents.defaults.sandbox.mode off"
3687
+ ].join("\n"), "Sandbox");
3688
+ return cfg;
3689
+ }
3690
+ let next = cfg;
3691
+ const changes = [];
3692
+ const dockerImage = resolveSandboxDockerImage(cfg);
3693
+ await handleMissingSandboxImage({
3694
+ kind: "base",
3695
+ image: dockerImage,
3696
+ buildScript: dockerImage === "openclaw-sandbox-common:bookworm-slim" ? "scripts/sandbox-common-setup.sh" : dockerImage === "openclaw-sandbox:bookworm-slim" ? "scripts/sandbox-setup.sh" : void 0,
3697
+ updateConfig: (image) => {
3698
+ next = updateSandboxDockerImage(next, image);
3699
+ changes.push(`Updated agents.defaults.sandbox.docker.image → ${image}`);
3700
+ }
3701
+ }, runtime, prompter);
3702
+ if (sandbox.browser?.enabled) await handleMissingSandboxImage({
3703
+ kind: "browser",
3704
+ image: resolveSandboxBrowserImage(cfg),
3705
+ buildScript: "scripts/sandbox-browser-setup.sh",
3706
+ updateConfig: (image) => {
3707
+ next = updateSandboxBrowserImage(next, image);
3708
+ changes.push(`Updated agents.defaults.sandbox.browser.image → ${image}`);
3709
+ }
3710
+ }, runtime, prompter);
3711
+ if (changes.length > 0) note$1(changes.join("\n"), "Doctor changes");
3712
+ return next;
3713
+ }
3714
+ function noteSandboxScopeWarnings(cfg) {
3715
+ const globalSandbox = cfg.agents?.defaults?.sandbox;
3716
+ const agents = Array.isArray(cfg.agents?.list) ? cfg.agents.list : [];
3717
+ const warnings = [];
3718
+ for (const agent of agents) {
3719
+ const agentId = agent.id;
3720
+ const agentSandbox = agent.sandbox;
3721
+ if (!agentSandbox) continue;
3722
+ if (resolveSandboxScope({
3723
+ scope: agentSandbox.scope ?? globalSandbox?.scope,
3724
+ perSession: agentSandbox.perSession ?? globalSandbox?.perSession
3725
+ }) !== "shared") continue;
3726
+ const overrides = [];
3727
+ if (agentSandbox.docker && Object.keys(agentSandbox.docker).length > 0) overrides.push("docker");
3728
+ if (agentSandbox.browser && Object.keys(agentSandbox.browser).length > 0) overrides.push("browser");
3729
+ if (agentSandbox.prune && Object.keys(agentSandbox.prune).length > 0) overrides.push("prune");
3730
+ if (overrides.length === 0) continue;
3731
+ warnings.push([`- agents.list (id "${agentId}") sandbox ${overrides.join("/")} overrides ignored.`, ` scope resolves to "shared".`].join("\n"));
3732
+ }
3733
+ if (warnings.length > 0) note$1(warnings.join("\n"), "Sandbox");
3734
+ }
3735
+ //#endregion
3736
+ //#region src/commands/doctor-security.ts
3737
+ function collectImplicitHeartbeatDirectPolicyWarnings(cfg) {
3738
+ const warnings = [];
3739
+ const maybeWarn = (params) => {
3740
+ const heartbeat = params.heartbeat;
3741
+ if (!heartbeat || heartbeat.target === void 0 || heartbeat.target === "none") return;
3742
+ if (heartbeat.directPolicy !== void 0) return;
3743
+ warnings.push(`- ${params.label}: heartbeat delivery is configured while ${params.pathHint} is unset.`, " Heartbeat now allows direct/DM targets by default. Set it explicitly to \"allow\" or \"block\" to pin upgrade behavior.");
3744
+ };
3745
+ maybeWarn({
3746
+ label: "Heartbeat defaults",
3747
+ heartbeat: cfg.agents?.defaults?.heartbeat,
3748
+ pathHint: "agents.defaults.heartbeat.directPolicy"
3749
+ });
3750
+ for (const agent of cfg.agents?.list ?? []) maybeWarn({
3751
+ label: `Heartbeat agent "${agent.id}"`,
3752
+ heartbeat: agent.heartbeat,
3753
+ pathHint: `heartbeat.directPolicy for agent "${agent.id}"`
3754
+ });
3755
+ return warnings;
3756
+ }
3757
+ async function noteSecurityWarnings(cfg) {
3758
+ const warnings = [];
3759
+ const auditHint = `- Run: ${formatCliCommand("openclaw security audit --deep")}`;
3760
+ if (cfg.approvals?.exec?.enabled === false) warnings.push("- Note: approvals.exec.enabled=false disables approval forwarding only.", " Host exec gating still comes from ~/.openclaw/exec-approvals.json.", ` Check local policy with: ${formatCliCommand("openclaw approvals get --gateway")}`);
3761
+ warnings.push(...collectImplicitHeartbeatDirectPolicyWarnings(cfg));
3762
+ const gatewayBind = cfg.gateway?.bind ?? "loopback";
3763
+ const customBindHost = cfg.gateway?.customBindHost?.trim();
3764
+ const bindMode = [
3765
+ "auto",
3766
+ "lan",
3767
+ "loopback",
3768
+ "custom",
3769
+ "tailnet"
3770
+ ].includes(gatewayBind) ? gatewayBind : void 0;
3771
+ const resolvedBindHost = bindMode ? await resolveGatewayBindHost(bindMode, customBindHost) : "0.0.0.0";
3772
+ const isExposed = !isLoopbackHost(resolvedBindHost);
3773
+ const resolvedAuth = resolveGatewayAuth({
3774
+ authConfig: cfg.gateway?.auth,
3775
+ env: process.env,
3776
+ tailscaleMode: cfg.gateway?.tailscale?.mode ?? "off"
3777
+ });
3778
+ const authToken = resolvedAuth.token?.trim() ?? "";
3779
+ const authPassword = resolvedAuth.password?.trim() ?? "";
3780
+ const hasToken = authToken.length > 0 || hasConfiguredSecretInput(cfg.gateway?.auth?.token, cfg.secrets?.defaults);
3781
+ const hasPassword = authPassword.length > 0 || hasConfiguredSecretInput(cfg.gateway?.auth?.password, cfg.secrets?.defaults);
3782
+ const hasSharedSecret = resolvedAuth.mode === "token" && hasToken || resolvedAuth.mode === "password" && hasPassword;
3783
+ const bindDescriptor = `"${gatewayBind}" (${resolvedBindHost})`;
3784
+ const saferRemoteAccessLines = [
3785
+ " Safer remote access: keep bind loopback and use Tailscale Serve/Funnel or an SSH tunnel.",
3786
+ " Example tunnel: ssh -N -L 18789:127.0.0.1:18789 user@gateway-host",
3787
+ " Docs: https://github.com/SlientLake/SlientLakeAgent/tree/main/docs/gateway/remote"
3788
+ ];
3789
+ if (isExposed) if (!hasSharedSecret) {
3790
+ const authFixLines = resolvedAuth.mode === "password" ? [` Fix: ${formatCliCommand("openclaw configure")} to set a password`, ` Or switch to token: ${formatCliCommand("openclaw config set gateway.auth.mode token")}`] : [` Fix: ${formatCliCommand("openclaw doctor --fix")} to generate a token`, ` Or set token directly: ${formatCliCommand("openclaw config set gateway.auth.mode token")}`];
3791
+ warnings.push(`- CRITICAL: Gateway bound to ${bindDescriptor} without authentication.`, ` Anyone on your network (or internet if port-forwarded) can fully control your agent.`, ` Fix: ${formatCliCommand("openclaw config set gateway.bind loopback")}`, ...saferRemoteAccessLines, ...authFixLines);
3792
+ } else warnings.push(`- WARNING: Gateway bound to ${bindDescriptor} (network-accessible).`, ` Ensure your auth credentials are strong and not exposed.`, ...saferRemoteAccessLines);
3793
+ const warnDmPolicy = async (params) => {
3794
+ const dmPolicy = params.dmPolicy;
3795
+ const policyPath = params.policyPath ?? `${params.allowFromPath}policy`;
3796
+ const { hasWildcard, allowCount, isMultiUserDm } = await resolveDmAllowState({
3797
+ provider: params.provider,
3798
+ accountId: params.accountId,
3799
+ allowFrom: params.allowFrom,
3800
+ normalizeEntry: params.normalizeEntry
3801
+ });
3802
+ const dmScope = cfg.session?.dmScope ?? "main";
3803
+ if (dmPolicy === "open") {
3804
+ const allowFromPath = `${params.allowFromPath}allowFrom`;
3805
+ warnings.push(`- ${params.label} DMs: OPEN (${policyPath}="open"). Anyone can DM it.`);
3806
+ if (!hasWildcard) warnings.push(`- ${params.label} DMs: config invalid — "open" requires ${allowFromPath} to include "*".`);
3807
+ }
3808
+ if (dmPolicy === "disabled") {
3809
+ warnings.push(`- ${params.label} DMs: disabled (${policyPath}="disabled").`);
3810
+ return;
3811
+ }
3812
+ if (dmPolicy !== "open" && allowCount === 0) {
3813
+ warnings.push(`- ${params.label} DMs: locked (${policyPath}="${dmPolicy}") with no allowlist; unknown senders will be blocked / get a pairing code.`);
3814
+ warnings.push(` ${params.approveHint}`);
3815
+ }
3816
+ if (dmScope === "main" && isMultiUserDm) warnings.push(`- ${params.label} DMs: multiple senders share the main session; run: ` + formatCliCommand("openclaw config set session.dmScope \"per-channel-peer\"") + " (or \"per-account-channel-peer\" for multi-account channels) to isolate sessions.");
3817
+ };
3818
+ for (const plugin of listChannelPlugins()) {
3819
+ if (!plugin.security) continue;
3820
+ const { defaultAccountId, account, enabled, configured, diagnostics } = await resolveDefaultChannelAccountContext(plugin, cfg, {
3821
+ mode: "read_only",
3822
+ commandName: "doctor"
3823
+ });
3824
+ for (const diagnostic of diagnostics) warnings.push(`- [secrets] ${diagnostic}`);
3825
+ if (!enabled) continue;
3826
+ if (!configured) continue;
3827
+ const dmPolicy = plugin.security.resolveDmPolicy?.({
3828
+ cfg,
3829
+ accountId: defaultAccountId,
3830
+ account
3831
+ });
3832
+ if (dmPolicy) await warnDmPolicy({
3833
+ label: plugin.meta.label ?? plugin.id,
3834
+ provider: plugin.id,
3835
+ accountId: defaultAccountId,
3836
+ dmPolicy: dmPolicy.policy,
3837
+ allowFrom: dmPolicy.allowFrom,
3838
+ policyPath: dmPolicy.policyPath,
3839
+ allowFromPath: dmPolicy.allowFromPath,
3840
+ approveHint: dmPolicy.approveHint,
3841
+ normalizeEntry: dmPolicy.normalizeEntry
3842
+ });
3843
+ if (plugin.security.collectWarnings) {
3844
+ const extra = await plugin.security.collectWarnings({
3845
+ cfg,
3846
+ accountId: defaultAccountId,
3847
+ account
3848
+ });
3849
+ if (extra?.length) warnings.push(...extra);
3850
+ }
3851
+ }
3852
+ const lines = warnings.length > 0 ? warnings : ["- No channel security warnings detected."];
3853
+ lines.push(auditHint);
3854
+ note$1(lines.join("\n"), "Security");
3855
+ }
3856
+ //#endregion
3857
+ //#region src/commands/doctor-session-locks.ts
3858
+ const DEFAULT_STALE_MS = 1800 * 1e3;
3859
+ function formatAge(ageMs) {
3860
+ if (ageMs === null) return "unknown";
3861
+ const seconds = Math.floor(ageMs / 1e3);
3862
+ if (seconds < 60) return `${seconds}s`;
3863
+ const minutes = Math.floor(seconds / 60);
3864
+ const remainingSeconds = seconds % 60;
3865
+ if (minutes < 60) return `${minutes}m${remainingSeconds}s`;
3866
+ return `${Math.floor(minutes / 60)}h${minutes % 60}m`;
3867
+ }
3868
+ function formatLockLine(lock) {
3869
+ const pidStatus = lock.pid === null ? "pid=missing" : `pid=${lock.pid} (${lock.pidAlive ? "alive" : "dead"})`;
3870
+ const ageStatus = `age=${formatAge(lock.ageMs)}`;
3871
+ const staleStatus = lock.stale ? `stale=yes (${lock.staleReasons.join(", ") || "unknown"})` : "stale=no";
3872
+ const removedStatus = lock.removed ? " [removed]" : "";
3873
+ return `- ${shortenHomePath(lock.lockPath)} ${pidStatus} ${ageStatus} ${staleStatus}${removedStatus}`;
3874
+ }
3875
+ async function noteSessionLockHealth(params) {
3876
+ const shouldRepair = params?.shouldRepair === true;
3877
+ const staleMs = params?.staleMs ?? DEFAULT_STALE_MS;
3878
+ let sessionDirs = [];
3879
+ try {
3880
+ sessionDirs = await resolveAgentSessionDirs(resolveStateDir(process.env));
3881
+ } catch (err) {
3882
+ note$1(`- Failed to inspect session lock files: ${String(err)}`, "Session locks");
3883
+ return;
3884
+ }
3885
+ if (sessionDirs.length === 0) return;
3886
+ const allLocks = [];
3887
+ for (const sessionsDir of sessionDirs) {
3888
+ const result = await cleanStaleLockFiles({
3889
+ sessionsDir,
3890
+ staleMs,
3891
+ removeStale: shouldRepair
3892
+ });
3893
+ allLocks.push(...result.locks);
3894
+ }
3895
+ if (allLocks.length === 0) return;
3896
+ const staleCount = allLocks.filter((lock) => lock.stale).length;
3897
+ const removedCount = allLocks.filter((lock) => lock.removed).length;
3898
+ const lines = [`- Found ${allLocks.length} session lock file${allLocks.length === 1 ? "" : "s"}.`, ...allLocks.toSorted((a, b) => a.lockPath.localeCompare(b.lockPath)).map(formatLockLine)];
3899
+ if (staleCount > 0 && !shouldRepair) {
3900
+ lines.push(`- ${staleCount} lock file${staleCount === 1 ? " is" : "s are"} stale.`);
3901
+ lines.push("- Run \"openclaw doctor --fix\" to remove stale lock files automatically.");
3902
+ }
3903
+ if (shouldRepair && removedCount > 0) lines.push(`- Removed ${removedCount} stale session lock file${removedCount === 1 ? "" : "s"}.`);
3904
+ note$1(lines.join("\n"), "Session locks");
3905
+ }
3906
+ //#endregion
3907
+ //#region src/commands/doctor-state-integrity.ts
3908
+ function countLabel(count, singular, plural = `${singular}s`) {
3909
+ return `${count} ${count === 1 ? singular : plural}`;
3910
+ }
3911
+ function formatFilePreview(paths, limit = 3) {
3912
+ const names = paths.slice(0, limit).map((filePath) => path.basename(filePath));
3913
+ const remaining = paths.length - names.length;
3914
+ if (remaining > 0) return `${names.join(", ")}, and ${remaining} more`;
3915
+ return names.join(", ");
3916
+ }
3917
+ function existsDir(dir) {
3918
+ try {
3919
+ return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
3920
+ } catch {
3921
+ return false;
3922
+ }
3923
+ }
3924
+ function existsFile(filePath) {
3925
+ try {
3926
+ return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
3927
+ } catch {
3928
+ return false;
3929
+ }
3930
+ }
3931
+ function canWriteDir(dir) {
3932
+ try {
3933
+ fs.accessSync(dir, fs.constants.W_OK);
3934
+ return true;
3935
+ } catch {
3936
+ return false;
3937
+ }
3938
+ }
3939
+ function ensureDir(dir) {
3940
+ try {
3941
+ fs.mkdirSync(dir, { recursive: true });
3942
+ return { ok: true };
3943
+ } catch (err) {
3944
+ return {
3945
+ ok: false,
3946
+ error: String(err)
3947
+ };
3948
+ }
3949
+ }
3950
+ function dirPermissionHint(dir) {
3951
+ const uid = typeof process.getuid === "function" ? process.getuid() : null;
3952
+ const gid = typeof process.getgid === "function" ? process.getgid() : null;
3953
+ try {
3954
+ const stat = fs.statSync(dir);
3955
+ if (uid !== null && stat.uid !== uid) return `Owner mismatch (uid ${stat.uid}). Run: sudo chown -R $USER "${dir}"`;
3956
+ if (gid !== null && stat.gid !== gid) return `Group mismatch (gid ${stat.gid}). If access fails, run: sudo chown -R $USER "${dir}"`;
3957
+ } catch {
3958
+ return null;
3959
+ }
3960
+ return null;
3961
+ }
3962
+ function addUserRwx(mode) {
3963
+ return mode & 511 | 448;
3964
+ }
3965
+ function countJsonlLines(filePath) {
3966
+ try {
3967
+ const raw = fs.readFileSync(filePath, "utf-8");
3968
+ if (!raw) return 0;
3969
+ let count = 0;
3970
+ for (let i = 0; i < raw.length; i += 1) if (raw[i] === "\n") count += 1;
3971
+ if (!raw.endsWith("\n")) count += 1;
3972
+ return count;
3973
+ } catch {
3974
+ return 0;
3975
+ }
3976
+ }
3977
+ function findOtherStateDirs(stateDir) {
3978
+ const resolvedState = path.resolve(stateDir);
3979
+ const roots = process.platform === "darwin" ? ["/Users"] : process.platform === "linux" ? ["/home"] : [];
3980
+ const found = [];
3981
+ for (const root of roots) {
3982
+ let entries = [];
3983
+ try {
3984
+ entries = fs.readdirSync(root, { withFileTypes: true });
3985
+ } catch {
3986
+ continue;
3987
+ }
3988
+ for (const entry of entries) {
3989
+ if (!entry.isDirectory()) continue;
3990
+ if (entry.name.startsWith(".")) continue;
3991
+ const candidates = [".openclaw"].map((dir) => path.resolve(root, entry.name, dir));
3992
+ for (const candidate of candidates) {
3993
+ if (candidate === resolvedState) continue;
3994
+ if (existsDir(candidate)) found.push(candidate);
3995
+ }
3996
+ }
3997
+ }
3998
+ return found;
3999
+ }
4000
+ function isPathUnderRoot(targetPath, rootPath) {
4001
+ const normalizedTarget = path.resolve(targetPath);
4002
+ const normalizedRoot = path.resolve(rootPath);
4003
+ const rootToken = path.parse(normalizedRoot).root;
4004
+ if (normalizedRoot === rootToken) return normalizedTarget.startsWith(rootToken);
4005
+ return normalizedTarget === normalizedRoot || normalizedTarget.startsWith(`${normalizedRoot}${path.sep}`);
4006
+ }
4007
+ function tryResolveRealPath(targetPath) {
4008
+ try {
4009
+ return fs.realpathSync(targetPath);
4010
+ } catch {
4011
+ return null;
4012
+ }
4013
+ }
4014
+ function decodeMountInfoPath(value) {
4015
+ return value.replace(/\\([0-7]{3})/g, (_, octal) => String.fromCharCode(Number.parseInt(octal, 8)));
4016
+ }
4017
+ function escapeControlCharsForTerminal(value) {
4018
+ let escaped = "";
4019
+ for (const char of value) {
4020
+ if (char === "\x1B") {
4021
+ escaped += "\\x1b";
4022
+ continue;
4023
+ }
4024
+ if (char === "\r") {
4025
+ escaped += "\\r";
4026
+ continue;
4027
+ }
4028
+ if (char === "\n") {
4029
+ escaped += "\\n";
4030
+ continue;
4031
+ }
4032
+ if (char === " ") {
4033
+ escaped += "\\t";
4034
+ continue;
4035
+ }
4036
+ const code = char.charCodeAt(0);
4037
+ if (code >= 0 && code <= 8 || code === 11 || code === 12 || code >= 14 && code <= 31) {
4038
+ escaped += `\\x${code.toString(16).padStart(2, "0")}`;
4039
+ continue;
4040
+ }
4041
+ if (code === 127) {
4042
+ escaped += "\\x7f";
4043
+ continue;
4044
+ }
4045
+ escaped += char;
4046
+ }
4047
+ return escaped;
4048
+ }
4049
+ function parseLinuxMountInfo(rawMountInfo) {
4050
+ const entries = [];
4051
+ for (const line of rawMountInfo.split("\n")) {
4052
+ const trimmed = line.trim();
4053
+ if (!trimmed) continue;
4054
+ const separatorIndex = trimmed.indexOf(" - ");
4055
+ if (separatorIndex === -1) continue;
4056
+ const left = trimmed.slice(0, separatorIndex);
4057
+ const right = trimmed.slice(separatorIndex + 3);
4058
+ const leftFields = left.split(" ");
4059
+ const rightFields = right.split(" ");
4060
+ if (leftFields.length < 5 || rightFields.length < 2) continue;
4061
+ entries.push({
4062
+ mountPoint: decodeMountInfoPath(leftFields[4]),
4063
+ fsType: rightFields[0],
4064
+ source: decodeMountInfoPath(rightFields[1])
4065
+ });
4066
+ }
4067
+ return entries;
4068
+ }
4069
+ function isPathUnderRootWithPathOps(targetPath, rootPath, pathOps) {
4070
+ const normalizedTarget = pathOps.resolve(targetPath);
4071
+ const normalizedRoot = pathOps.resolve(rootPath);
4072
+ const rootToken = pathOps.parse(normalizedRoot).root;
4073
+ if (normalizedRoot === rootToken) return normalizedTarget.startsWith(rootToken);
4074
+ return normalizedTarget === normalizedRoot || normalizedTarget.startsWith(`${normalizedRoot}${pathOps.sep}`);
4075
+ }
4076
+ function findLinuxMountInfoEntryForPath(targetPath, entries, pathOps) {
4077
+ const normalizedTarget = pathOps.resolve(targetPath);
4078
+ let bestMatch = null;
4079
+ for (const entry of entries) {
4080
+ if (!isPathUnderRootWithPathOps(normalizedTarget, entry.mountPoint, pathOps)) continue;
4081
+ if (!bestMatch || pathOps.resolve(entry.mountPoint).length > pathOps.resolve(bestMatch.mountPoint).length) bestMatch = entry;
4082
+ }
4083
+ return bestMatch;
4084
+ }
4085
+ function isMmcDevicePath(devicePath, pathOps) {
4086
+ const name = pathOps.basename(devicePath);
4087
+ return /^mmcblk\d+(?:p\d+)?$/.test(name);
4088
+ }
4089
+ function tryReadLinuxMountInfo() {
4090
+ try {
4091
+ return fs.readFileSync("/proc/self/mountinfo", "utf8");
4092
+ } catch {
4093
+ return null;
4094
+ }
4095
+ }
4096
+ function detectLinuxSdBackedStateDir(stateDir, deps) {
4097
+ if ((deps?.platform ?? process.platform) !== "linux") return null;
4098
+ const linuxPath = path.posix;
4099
+ const resolvedStatePath = (deps?.resolveRealPath ?? tryResolveRealPath)(stateDir) ?? linuxPath.resolve(stateDir);
4100
+ const mountInfo = deps?.mountInfo ?? tryReadLinuxMountInfo();
4101
+ if (!mountInfo) return null;
4102
+ const mountEntry = findLinuxMountInfoEntryForPath(resolvedStatePath, parseLinuxMountInfo(mountInfo), linuxPath);
4103
+ if (!mountEntry) return null;
4104
+ const sourceCandidates = [mountEntry.source];
4105
+ if (mountEntry.source.startsWith("/dev/")) {
4106
+ const resolvedDevicePath = (deps?.resolveDeviceRealPath ?? tryResolveRealPath)(mountEntry.source);
4107
+ if (resolvedDevicePath) sourceCandidates.push(linuxPath.resolve(resolvedDevicePath));
4108
+ }
4109
+ if (!sourceCandidates.some((candidate) => isMmcDevicePath(candidate, linuxPath))) return null;
4110
+ return {
4111
+ path: linuxPath.resolve(resolvedStatePath),
4112
+ mountPoint: linuxPath.resolve(mountEntry.mountPoint),
4113
+ fsType: mountEntry.fsType,
4114
+ source: mountEntry.source
4115
+ };
4116
+ }
4117
+ function formatLinuxSdBackedStateDirWarning(displayStateDir, linuxSdBackedStateDir) {
4118
+ const displayMountPoint = linuxSdBackedStateDir.mountPoint === "/" ? "/" : shortenHomePath(linuxSdBackedStateDir.mountPoint);
4119
+ return [
4120
+ `- State directory appears to be on SD/eMMC storage (${displayStateDir}; device ${escapeControlCharsForTerminal(linuxSdBackedStateDir.source)}, fs ${escapeControlCharsForTerminal(linuxSdBackedStateDir.fsType)}, mount ${escapeControlCharsForTerminal(displayMountPoint)}).`,
4121
+ "- SD/eMMC media can be slower for random I/O and wear faster under session/log churn.",
4122
+ "- For better startup and state durability, prefer SSD/NVMe (or USB SSD on Raspberry Pi) for OPENCLAW_STATE_DIR."
4123
+ ].join("\n");
4124
+ }
4125
+ function detectMacCloudSyncedStateDir(stateDir, deps) {
4126
+ if ((deps?.platform ?? process.platform) !== "darwin") return null;
4127
+ const homedir = deps?.homedir ?? os.homedir();
4128
+ const roots = [{
4129
+ storage: "iCloud Drive",
4130
+ root: path.join(homedir, "Library", "Mobile Documents", "com~apple~CloudDocs")
4131
+ }, {
4132
+ storage: "CloudStorage provider",
4133
+ root: path.join(homedir, "Library", "CloudStorage")
4134
+ }];
4135
+ const realPath = (deps?.resolveRealPath ?? tryResolveRealPath)(stateDir);
4136
+ const candidates = realPath ? [path.resolve(realPath)] : [path.resolve(stateDir)];
4137
+ for (const candidate of candidates) for (const { storage, root } of roots) if (isPathUnderRoot(candidate, root)) return {
4138
+ path: candidate,
4139
+ storage
4140
+ };
4141
+ return null;
4142
+ }
4143
+ function isRecord(value) {
4144
+ return typeof value === "object" && value !== null;
4145
+ }
4146
+ function isPairingPolicy(value) {
4147
+ return typeof value === "string" && value.trim().toLowerCase() === "pairing";
4148
+ }
4149
+ function hasPairingPolicy(value) {
4150
+ if (!isRecord(value)) return false;
4151
+ if (isPairingPolicy(value.dmPolicy)) return true;
4152
+ if (isRecord(value.dm) && isPairingPolicy(value.dm.policy)) return true;
4153
+ if (!isRecord(value.accounts)) return false;
4154
+ for (const accountCfg of Object.values(value.accounts)) if (hasPairingPolicy(accountCfg)) return true;
4155
+ return false;
4156
+ }
4157
+ function isSlashRoutingSessionKey(sessionKey) {
4158
+ const raw = sessionKey.trim().toLowerCase();
4159
+ if (!raw) return false;
4160
+ const scoped = parseAgentSessionKey(raw)?.rest ?? raw;
4161
+ return /^[^:]+:slash:[^:]+(?:$|:)/.test(scoped);
4162
+ }
4163
+ function shouldRequireOAuthDir(cfg, env) {
4164
+ if (env.OPENCLAW_OAUTH_DIR?.trim()) return true;
4165
+ const channels = cfg.channels;
4166
+ if (!isRecord(channels)) return false;
4167
+ if (isRecord(channels.whatsapp)) return true;
4168
+ for (const [channelId, channelCfg] of Object.entries(channels)) {
4169
+ if (channelId === "defaults" || channelId === "modelByChannel") continue;
4170
+ if (hasPairingPolicy(channelCfg)) return true;
4171
+ }
4172
+ return false;
4173
+ }
4174
+ async function noteStateIntegrity(cfg, prompter, configPath) {
4175
+ const warnings = [];
4176
+ const changes = [];
4177
+ const env = process.env;
4178
+ const homedir = () => resolveRequiredHomeDir(env, os.homedir);
4179
+ const stateDir = resolveStateDir(env, homedir);
4180
+ const defaultStateDir = path.join(homedir(), ".openclaw");
4181
+ const oauthDir = resolveOAuthDir(env, stateDir);
4182
+ const agentId = resolveDefaultAgentId(cfg);
4183
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId, env, homedir);
4184
+ const storePath = resolveStorePath(cfg.session?.store, { agentId });
4185
+ const storeDir = path.dirname(storePath);
4186
+ const absoluteStorePath = path.resolve(storePath);
4187
+ const displayStateDir = shortenHomePath(stateDir);
4188
+ const displayOauthDir = shortenHomePath(oauthDir);
4189
+ const displaySessionsDir = shortenHomePath(sessionsDir);
4190
+ const displayStoreDir = shortenHomePath(storeDir);
4191
+ const displayConfigPath = configPath ? shortenHomePath(configPath) : void 0;
4192
+ const requireOAuthDir = shouldRequireOAuthDir(cfg, env);
4193
+ const cloudSyncedStateDir = detectMacCloudSyncedStateDir(stateDir);
4194
+ const linuxSdBackedStateDir = detectLinuxSdBackedStateDir(stateDir);
4195
+ if (cloudSyncedStateDir) warnings.push([
4196
+ `- State directory is under macOS cloud-synced storage (${displayStateDir}; ${cloudSyncedStateDir.storage}).`,
4197
+ "- This can cause slow I/O and sync/lock races for sessions and credentials.",
4198
+ "- Prefer a local non-synced state dir (for example: ~/.openclaw).",
4199
+ ` Set locally: OPENCLAW_STATE_DIR=~/.openclaw ${formatCliCommand("openclaw doctor")}`
4200
+ ].join("\n"));
4201
+ if (linuxSdBackedStateDir) warnings.push(formatLinuxSdBackedStateDirWarning(displayStateDir, linuxSdBackedStateDir));
4202
+ let stateDirExists = existsDir(stateDir);
4203
+ if (!stateDirExists) {
4204
+ warnings.push(`- CRITICAL: state directory missing (${displayStateDir}). Sessions, credentials, logs, and config are stored there.`);
4205
+ if (cfg.gateway?.mode === "remote") warnings.push("- Gateway is in remote mode; run doctor on the remote host where the gateway runs.");
4206
+ if (await prompter.confirmSkipInNonInteractive({
4207
+ message: `Create ${displayStateDir} now?`,
4208
+ initialValue: false
4209
+ })) {
4210
+ const created = ensureDir(stateDir);
4211
+ if (created.ok) {
4212
+ changes.push(`- Created ${displayStateDir}`);
4213
+ stateDirExists = true;
4214
+ } else warnings.push(`- Failed to create ${displayStateDir}: ${created.error}`);
4215
+ }
4216
+ }
4217
+ if (stateDirExists && !canWriteDir(stateDir)) {
4218
+ warnings.push(`- State directory not writable (${displayStateDir}).`);
4219
+ const hint = dirPermissionHint(stateDir);
4220
+ if (hint) warnings.push(` ${hint}`);
4221
+ if (await prompter.confirmSkipInNonInteractive({
4222
+ message: `Repair permissions on ${displayStateDir}?`,
4223
+ initialValue: true
4224
+ })) try {
4225
+ const target = addUserRwx(fs.statSync(stateDir).mode);
4226
+ fs.chmodSync(stateDir, target);
4227
+ changes.push(`- Repaired permissions on ${displayStateDir}`);
4228
+ } catch (err) {
4229
+ warnings.push(`- Failed to repair ${displayStateDir}: ${String(err)}`);
4230
+ }
4231
+ }
4232
+ if (stateDirExists && process.platform !== "win32") try {
4233
+ const dirLstat = fs.lstatSync(stateDir);
4234
+ const isDirSymlink = dirLstat.isSymbolicLink();
4235
+ const stat = isDirSymlink ? fs.statSync(stateDir) : dirLstat;
4236
+ if (!(isDirSymlink ? fs.realpathSync(stateDir) : stateDir).startsWith("/nix/store/") && (stat.mode & 63) !== 0) {
4237
+ warnings.push(`- State directory permissions are too open (${displayStateDir}). Recommend chmod 700.`);
4238
+ if (await prompter.confirmSkipInNonInteractive({
4239
+ message: `Tighten permissions on ${displayStateDir} to 700?`,
4240
+ initialValue: true
4241
+ })) {
4242
+ fs.chmodSync(stateDir, 448);
4243
+ changes.push(`- Tightened permissions on ${displayStateDir} to 700`);
4244
+ }
4245
+ }
4246
+ } catch (err) {
4247
+ warnings.push(`- Failed to read ${displayStateDir} permissions: ${String(err)}`);
4248
+ }
4249
+ if (configPath && existsFile(configPath) && process.platform !== "win32") try {
4250
+ const configLstat = fs.lstatSync(configPath);
4251
+ const isSymlink = configLstat.isSymbolicLink();
4252
+ const stat = isSymlink ? fs.statSync(configPath) : configLstat;
4253
+ if (!(isSymlink ? fs.realpathSync(configPath) : configPath).startsWith("/nix/store/") && (stat.mode & 63) !== 0) {
4254
+ warnings.push(`- Config file is group/world readable (${displayConfigPath ?? configPath}). Recommend chmod 600.`);
4255
+ if (await prompter.confirmSkipInNonInteractive({
4256
+ message: `Tighten permissions on ${displayConfigPath ?? configPath} to 600?`,
4257
+ initialValue: true
4258
+ })) {
4259
+ fs.chmodSync(configPath, 384);
4260
+ changes.push(`- Tightened permissions on ${displayConfigPath ?? configPath} to 600`);
4261
+ }
4262
+ }
4263
+ } catch (err) {
4264
+ warnings.push(`- Failed to read config permissions (${displayConfigPath ?? configPath}): ${String(err)}`);
4265
+ }
4266
+ if (stateDirExists) {
4267
+ const dirCandidates = /* @__PURE__ */ new Map();
4268
+ dirCandidates.set(sessionsDir, "Sessions dir");
4269
+ dirCandidates.set(storeDir, "Session store dir");
4270
+ if (requireOAuthDir) dirCandidates.set(oauthDir, "OAuth dir");
4271
+ else if (!existsDir(oauthDir)) warnings.push(`- OAuth dir not present (${displayOauthDir}). Skipping create because no WhatsApp/pairing channel config is active.`);
4272
+ const displayDirFor = (dir) => {
4273
+ if (dir === sessionsDir) return displaySessionsDir;
4274
+ if (dir === storeDir) return displayStoreDir;
4275
+ if (dir === oauthDir) return displayOauthDir;
4276
+ return shortenHomePath(dir);
4277
+ };
4278
+ for (const [dir, label] of dirCandidates) {
4279
+ const displayDir = displayDirFor(dir);
4280
+ if (!existsDir(dir)) {
4281
+ warnings.push(`- CRITICAL: ${label} missing (${displayDir}).`);
4282
+ if (await prompter.confirmSkipInNonInteractive({
4283
+ message: `Create ${label} at ${displayDir}?`,
4284
+ initialValue: true
4285
+ })) {
4286
+ const created = ensureDir(dir);
4287
+ if (created.ok) changes.push(`- Created ${label}: ${displayDir}`);
4288
+ else warnings.push(`- Failed to create ${displayDir}: ${created.error}`);
4289
+ }
4290
+ continue;
4291
+ }
4292
+ if (!canWriteDir(dir)) {
4293
+ warnings.push(`- ${label} not writable (${displayDir}).`);
4294
+ const hint = dirPermissionHint(dir);
4295
+ if (hint) warnings.push(` ${hint}`);
4296
+ if (await prompter.confirmSkipInNonInteractive({
4297
+ message: `Repair permissions on ${label}?`,
4298
+ initialValue: true
4299
+ })) try {
4300
+ const target = addUserRwx(fs.statSync(dir).mode);
4301
+ fs.chmodSync(dir, target);
4302
+ changes.push(`- Repaired permissions on ${label}: ${displayDir}`);
4303
+ } catch (err) {
4304
+ warnings.push(`- Failed to repair ${displayDir}: ${String(err)}`);
4305
+ }
4306
+ }
4307
+ }
4308
+ }
4309
+ const extraStateDirs = /* @__PURE__ */ new Set();
4310
+ if (path.resolve(stateDir) !== path.resolve(defaultStateDir)) {
4311
+ if (existsDir(defaultStateDir)) extraStateDirs.add(defaultStateDir);
4312
+ }
4313
+ for (const other of findOtherStateDirs(stateDir)) extraStateDirs.add(other);
4314
+ if (extraStateDirs.size > 0) warnings.push([
4315
+ "- Multiple state directories detected. This can split session history.",
4316
+ ...Array.from(extraStateDirs).map((dir) => ` - ${shortenHomePath(dir)}`),
4317
+ ` Active state dir: ${displayStateDir}`
4318
+ ].join("\n"));
4319
+ const store = loadSessionStore(storePath);
4320
+ const sessionPathOpts = resolveSessionFilePathOptions({
4321
+ agentId,
4322
+ storePath
4323
+ });
4324
+ const entries = Object.entries(store).filter(([, entry]) => entry && typeof entry === "object");
4325
+ if (entries.length > 0) {
4326
+ const recentTranscriptCandidates = entries.slice().toSorted((a, b) => {
4327
+ const aUpdated = typeof a[1].updatedAt === "number" ? a[1].updatedAt : 0;
4328
+ return (typeof b[1].updatedAt === "number" ? b[1].updatedAt : 0) - aUpdated;
4329
+ }).slice(0, 5).filter(([key]) => !isSlashRoutingSessionKey(key));
4330
+ const missing = recentTranscriptCandidates.filter(([, entry]) => {
4331
+ const sessionId = entry.sessionId;
4332
+ if (!sessionId) return false;
4333
+ return !existsFile(resolveSessionFilePath(sessionId, entry, sessionPathOpts));
4334
+ });
4335
+ if (missing.length > 0) warnings.push([
4336
+ `- ${missing.length}/${recentTranscriptCandidates.length} recent sessions are missing transcripts.`,
4337
+ ` Verify sessions in store: ${formatCliCommand(`openclaw sessions --store "${absoluteStorePath}"`)}`,
4338
+ ` Preview cleanup impact: ${formatCliCommand(`openclaw sessions cleanup --store "${absoluteStorePath}" --dry-run`)}`,
4339
+ ` Prune missing entries: ${formatCliCommand(`openclaw sessions cleanup --store "${absoluteStorePath}" --enforce --fix-missing`)}`
4340
+ ].join("\n"));
4341
+ const mainEntry = store[resolveMainSessionKey(cfg)];
4342
+ if (mainEntry?.sessionId) {
4343
+ const transcriptPath = resolveSessionFilePath(mainEntry.sessionId, mainEntry, sessionPathOpts);
4344
+ if (!existsFile(transcriptPath)) warnings.push(`- Main session transcript missing (${shortenHomePath(transcriptPath)}). History will appear to reset.`);
4345
+ else {
4346
+ const lineCount = countJsonlLines(transcriptPath);
4347
+ if (lineCount <= 1) warnings.push(`- Main session transcript has only ${lineCount} line. Session history may not be appending.`);
4348
+ }
4349
+ }
4350
+ }
4351
+ if (existsDir(sessionsDir)) {
4352
+ const referencedTranscriptPaths = /* @__PURE__ */ new Set();
4353
+ for (const [, entry] of entries) {
4354
+ if (!entry?.sessionId) continue;
4355
+ try {
4356
+ referencedTranscriptPaths.add(path.resolve(resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts)));
4357
+ } catch {}
4358
+ }
4359
+ const orphanTranscriptPaths = fs.readdirSync(sessionsDir, { withFileTypes: true }).filter((entry) => entry.isFile() && isPrimarySessionTranscriptFileName(entry.name)).map((entry) => path.resolve(path.join(sessionsDir, entry.name))).filter((filePath) => !referencedTranscriptPaths.has(filePath));
4360
+ if (orphanTranscriptPaths.length > 0) {
4361
+ const orphanCount = countLabel(orphanTranscriptPaths.length, "orphan transcript file");
4362
+ const orphanPreview = formatFilePreview(orphanTranscriptPaths);
4363
+ warnings.push([
4364
+ `- Found ${orphanCount} in ${displaySessionsDir}.`,
4365
+ " These .jsonl files are no longer referenced by sessions.json, so they are not part of any active session history.",
4366
+ " Doctor can archive them safely by renaming each file to *.deleted.<timestamp>.",
4367
+ ` Examples: ${orphanPreview}`
4368
+ ].join("\n"));
4369
+ if (await prompter.confirmSkipInNonInteractive({
4370
+ message: `Archive ${orphanCount} in ${displaySessionsDir}? This only renames them to *.deleted.<timestamp>.`,
4371
+ initialValue: false
4372
+ })) {
4373
+ let archived = 0;
4374
+ const archivedAt = formatSessionArchiveTimestamp();
4375
+ for (const orphanPath of orphanTranscriptPaths) {
4376
+ const archivedPath = `${orphanPath}.deleted.${archivedAt}`;
4377
+ try {
4378
+ fs.renameSync(orphanPath, archivedPath);
4379
+ archived += 1;
4380
+ } catch (err) {
4381
+ warnings.push(`- Failed to archive orphan transcript ${shortenHomePath(orphanPath)}: ${String(err)}`);
4382
+ }
4383
+ }
4384
+ if (archived > 0) changes.push(`- Archived ${countLabel(archived, "orphan transcript file")} in ${displaySessionsDir} as .deleted timestamped backups.`);
4385
+ }
4386
+ }
4387
+ }
4388
+ if (warnings.length > 0) note$1(warnings.join("\n"), "State integrity");
4389
+ if (changes.length > 0) note$1(changes.join("\n"), "Doctor changes");
4390
+ }
4391
+ function noteWorkspaceBackupTip(workspaceDir) {
4392
+ if (!existsDir(workspaceDir)) return;
4393
+ const gitMarker = path.join(workspaceDir, ".git");
4394
+ if (fs.existsSync(gitMarker)) return;
4395
+ note$1([
4396
+ "- Tip: back up the workspace in a private git repo (GitHub or GitLab).",
4397
+ "- Keep ~/.openclaw out of git; it contains credentials and session history.",
4398
+ "- Details: /concepts/agent-workspace#git-backup-recommended"
4399
+ ].join("\n"), "Workspace");
4400
+ }
4401
+ //#endregion
4402
+ //#region src/commands/doctor-ui.ts
4403
+ async function maybeRepairUiProtocolFreshness(_runtime, prompter) {
4404
+ const root = await resolveOpenClawPackageRoot({
4405
+ moduleUrl: import.meta.url,
4406
+ argv1: process.argv[1],
4407
+ cwd: process.cwd()
4408
+ });
4409
+ if (!root) return;
4410
+ const schemaPath = path.join(root, "src/gateway/protocol/schema.ts");
4411
+ const uiIndexPath = (await resolveControlUiDistIndexHealth({
4412
+ root,
4413
+ argv1: process.argv[1]
4414
+ })).indexPath ?? resolveControlUiDistIndexPathForRoot(root);
4415
+ try {
4416
+ const [schemaStats, uiStats] = await Promise.all([fs$1.stat(schemaPath).catch(() => null), fs$1.stat(uiIndexPath).catch(() => null)]);
4417
+ if (schemaStats && !uiStats) {
4418
+ note$1(["- Control UI assets are missing.", "- Run: pnpm ui:build"].join("\n"), "UI");
4419
+ const uiSourcesPath = path.join(root, "ui/package.json");
4420
+ if (!await fs$1.stat(uiSourcesPath).catch(() => null)) {
4421
+ note$1("Skipping UI build: ui/ sources not present.", "UI");
4422
+ return;
4423
+ }
4424
+ if (await prompter.confirmRepair({
4425
+ message: "Build Control UI assets now?",
4426
+ initialValue: true
4427
+ })) {
4428
+ note$1("Building Control UI assets... (this may take a moment)", "UI");
4429
+ const uiScriptPath = path.join(root, "scripts/ui.js");
4430
+ const buildResult = await runCommandWithTimeout([
4431
+ process.execPath,
4432
+ uiScriptPath,
4433
+ "build"
4434
+ ], {
4435
+ cwd: root,
4436
+ timeoutMs: 12e4,
4437
+ env: {
4438
+ ...process.env,
4439
+ FORCE_COLOR: "1"
4440
+ }
4441
+ });
4442
+ if (buildResult.code === 0) note$1("UI build complete.", "UI");
4443
+ else note$1([`UI build failed (exit ${buildResult.code ?? "unknown"}).`, buildResult.stderr.trim() ? buildResult.stderr.trim() : null].filter(Boolean).join("\n"), "UI");
4444
+ }
4445
+ return;
4446
+ }
4447
+ if (!schemaStats || !uiStats) return;
4448
+ if (schemaStats.mtime > uiStats.mtime) {
4449
+ const gitLog = await runCommandWithTimeout([
4450
+ "git",
4451
+ "-C",
4452
+ root,
4453
+ "log",
4454
+ `--since=${uiStats.mtime.toISOString()}`,
4455
+ "--format=%h %s",
4456
+ "src/gateway/protocol/schema.ts"
4457
+ ], { timeoutMs: 5e3 }).catch(() => null);
4458
+ if (gitLog && gitLog.code === 0 && gitLog.stdout.trim()) {
4459
+ note$1(`UI assets are older than the protocol schema.\nFunctional changes since last build:\n${gitLog.stdout.trim().split("\n").map((l) => `- ${l}`).join("\n")}`, "UI Freshness");
4460
+ if (await prompter.confirmAggressive({
4461
+ message: "Rebuild UI now? (Detected protocol mismatch requiring update)",
4462
+ initialValue: true
4463
+ })) {
4464
+ const uiSourcesPath = path.join(root, "ui/package.json");
4465
+ if (!await fs$1.stat(uiSourcesPath).catch(() => null)) {
4466
+ note$1("Skipping UI rebuild: ui/ sources not present.", "UI");
4467
+ return;
4468
+ }
4469
+ note$1("Rebuilding stale UI assets... (this may take a moment)", "UI");
4470
+ const uiScriptPath = path.join(root, "scripts/ui.js");
4471
+ const buildResult = await runCommandWithTimeout([
4472
+ process.execPath,
4473
+ uiScriptPath,
4474
+ "build"
4475
+ ], {
4476
+ cwd: root,
4477
+ timeoutMs: 12e4,
4478
+ env: {
4479
+ ...process.env,
4480
+ FORCE_COLOR: "1"
4481
+ }
4482
+ });
4483
+ if (buildResult.code === 0) note$1("UI rebuild complete.", "UI");
4484
+ else note$1([`UI rebuild failed (exit ${buildResult.code ?? "unknown"}).`, buildResult.stderr.trim() ? buildResult.stderr.trim() : null].filter(Boolean).join("\n"), "UI");
4485
+ }
4486
+ }
4487
+ }
4488
+ } catch {}
4489
+ }
4490
+ //#endregion
4491
+ //#region src/commands/doctor-update.ts
4492
+ async function detectOpenClawGitCheckout(root) {
4493
+ const res = await runCommandWithTimeout([
4494
+ "git",
4495
+ "-C",
4496
+ root,
4497
+ "rev-parse",
4498
+ "--show-toplevel"
4499
+ ], { timeoutMs: 5e3 }).catch(() => null);
4500
+ if (!res) return "unknown";
4501
+ if (res.code !== 0) {
4502
+ if (res.stderr.toLowerCase().includes("not a git repository")) return "not-git";
4503
+ return "unknown";
4504
+ }
4505
+ return res.stdout.trim() === root ? "git" : "not-git";
4506
+ }
4507
+ async function maybeOfferUpdateBeforeDoctor(params) {
4508
+ if (!(!isTruthyEnvValue$1(process.env.OPENCLAW_UPDATE_IN_PROGRESS) && params.options.nonInteractive !== true && params.options.yes !== true && params.options.repair !== true && Boolean(process.stdin.isTTY)) || !params.root) return { updated: false };
4509
+ const git = await detectOpenClawGitCheckout(params.root);
4510
+ if (git === "git") {
4511
+ if (!await params.confirm({
4512
+ message: "Update OpenClaw from git before running doctor?",
4513
+ initialValue: true
4514
+ })) return { updated: false };
4515
+ note$1("Running update (fetch/rebase/build/ui:build/doctor)…", "Update");
4516
+ const result = await runGatewayUpdate({
4517
+ cwd: params.root,
4518
+ argv1: process.argv[1]
4519
+ });
4520
+ note$1([
4521
+ `Status: ${result.status}`,
4522
+ `Mode: ${result.mode}`,
4523
+ result.root ? `Root: ${result.root}` : null,
4524
+ result.reason ? `Reason: ${result.reason}` : null
4525
+ ].filter(Boolean).join("\n"), "Update result");
4526
+ if (result.status === "ok") {
4527
+ params.outro("Update completed (doctor already ran as part of the update).");
4528
+ return {
4529
+ updated: true,
4530
+ handled: true
4531
+ };
4532
+ }
4533
+ return {
4534
+ updated: true,
4535
+ handled: false
4536
+ };
4537
+ }
4538
+ if (git === "not-git") note$1(["This install is not a git checkout.", `Run \`${formatCliCommand("openclaw update")}\` to update via your package manager (npm/pnpm), then rerun doctor.`].join("\n"), "Update");
4539
+ return { updated: false };
4540
+ }
4541
+ //#endregion
4542
+ //#region src/commands/doctor-workspace.ts
4543
+ const MEMORY_SYSTEM_PROMPT = [
4544
+ "Memory system not found in workspace.",
4545
+ "Paste this into your agent:",
4546
+ "",
4547
+ "Install the memory system by applying:",
4548
+ "https://github.com/openclaw/openclaw/commit/9ffea23f31ca1df5183b25668f8f814bee0fb34e",
4549
+ "https://github.com/openclaw/openclaw/commit/7d1fee70e76f2f634f1b41fca927ee663914183a"
4550
+ ].join("\n");
4551
+ async function shouldSuggestMemorySystem(workspaceDir) {
4552
+ const memoryPaths = [path.join(workspaceDir, "MEMORY.md"), path.join(workspaceDir, "memory.md")];
4553
+ for (const memoryPath of memoryPaths) try {
4554
+ await fs.promises.access(memoryPath);
4555
+ return false;
4556
+ } catch {}
4557
+ const agentsPath = path.join(workspaceDir, DEFAULT_AGENTS_FILENAME);
4558
+ try {
4559
+ const content = await fs.promises.readFile(agentsPath, "utf-8");
4560
+ if (/memory\.md/i.test(content)) return false;
4561
+ } catch {}
4562
+ return true;
4563
+ }
4564
+ function detectLegacyWorkspaceDirs(params) {
4565
+ return {
4566
+ activeWorkspace: path.resolve(params.workspaceDir),
4567
+ legacyDirs: []
4568
+ };
4569
+ }
4570
+ function formatLegacyWorkspaceWarning(detection) {
4571
+ return [
4572
+ "Extra workspace directories detected (may contain old agent files):",
4573
+ ...detection.legacyDirs.map((dir) => `- ${shortenHomePath(dir)}`),
4574
+ `Active workspace: ${shortenHomePath(detection.activeWorkspace)}`,
4575
+ "If unused, archive or move to Trash."
4576
+ ].join("\n");
4577
+ }
4578
+ //#endregion
4579
+ //#region src/commands/doctor-workspace-status.ts
4580
+ function noteWorkspaceStatus(cfg) {
4581
+ const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
4582
+ const legacyWorkspace = detectLegacyWorkspaceDirs({ workspaceDir });
4583
+ if (legacyWorkspace.legacyDirs.length > 0) note$1(formatLegacyWorkspaceWarning(legacyWorkspace), "Extra workspace");
4584
+ const skillsReport = buildWorkspaceSkillStatus(workspaceDir, { config: cfg });
4585
+ note$1([
4586
+ `Eligible: ${skillsReport.skills.filter((s) => s.eligible).length}`,
4587
+ `Missing requirements: ${skillsReport.skills.filter((s) => !s.eligible && !s.disabled && !s.blockedByAllowlist).length}`,
4588
+ `Blocked by allowlist: ${skillsReport.skills.filter((s) => s.blockedByAllowlist).length}`
4589
+ ].join("\n"), "Skills status");
4590
+ const pluginRegistry = loadOpenClawPlugins({
4591
+ config: cfg,
4592
+ workspaceDir,
4593
+ logger: {
4594
+ info: () => {},
4595
+ warn: () => {},
4596
+ error: () => {},
4597
+ debug: () => {}
4598
+ }
4599
+ });
4600
+ if (pluginRegistry.plugins.length > 0) {
4601
+ const loaded = pluginRegistry.plugins.filter((p) => p.status === "loaded");
4602
+ const disabled = pluginRegistry.plugins.filter((p) => p.status === "disabled");
4603
+ const errored = pluginRegistry.plugins.filter((p) => p.status === "error");
4604
+ const lines = [
4605
+ `Loaded: ${loaded.length}`,
4606
+ `Disabled: ${disabled.length}`,
4607
+ `Errors: ${errored.length}`,
4608
+ errored.length > 0 ? `- ${errored.slice(0, 10).map((p) => p.id).join("\n- ")}${errored.length > 10 ? "\n- ..." : ""}` : null
4609
+ ].filter((line) => Boolean(line));
4610
+ const bundlePlugins = loaded.filter((p) => p.format === "bundle" && (p.bundleCapabilities?.length ?? 0) > 0);
4611
+ if (bundlePlugins.length > 0) {
4612
+ const allCaps = new Set(bundlePlugins.flatMap((p) => p.bundleCapabilities ?? []));
4613
+ lines.push(`Bundle plugins: ${bundlePlugins.length} (${[...allCaps].toSorted().join(", ")})`);
4614
+ }
4615
+ note$1(lines.join("\n"), "Plugins");
4616
+ }
4617
+ const compatibilityWarnings = buildPluginCompatibilityWarnings({
4618
+ config: cfg,
4619
+ workspaceDir,
4620
+ report: {
4621
+ workspaceDir,
4622
+ ...pluginRegistry
4623
+ }
4624
+ });
4625
+ if (compatibilityWarnings.length > 0) note$1(compatibilityWarnings.map((line) => `- ${line}`).join("\n"), "Plugin compatibility");
4626
+ if (pluginRegistry.diagnostics.length > 0) note$1(pluginRegistry.diagnostics.map((diag) => {
4627
+ const prefix = diag.level.toUpperCase();
4628
+ const plugin = diag.pluginId ? ` ${diag.pluginId}` : "";
4629
+ const source = diag.source ? ` (${diag.source})` : "";
4630
+ return `- ${prefix}${plugin}: ${diag.message}${source}`;
4631
+ }).join("\n"), "Plugin diagnostics");
4632
+ return { workspaceDir };
4633
+ }
4634
+ //#endregion
4635
+ //#region src/commands/doctor.ts
4636
+ const intro$1 = (message) => intro(stylePromptTitle(message) ?? message);
4637
+ const outro$1 = (message) => outro(stylePromptTitle(message) ?? message);
4638
+ function resolveMode(cfg) {
4639
+ return cfg.gateway?.mode === "remote" ? "remote" : "local";
4640
+ }
4641
+ async function doctorCommand(runtime = defaultRuntime, options = {}) {
4642
+ const prompter = createDoctorPrompter({
4643
+ runtime,
4644
+ options
4645
+ });
4646
+ printWizardHeader(runtime);
4647
+ intro$1("OpenClaw doctor");
4648
+ const root = await resolveOpenClawPackageRoot({
4649
+ moduleUrl: import.meta.url,
4650
+ argv1: process.argv[1],
4651
+ cwd: process.cwd()
4652
+ });
4653
+ if ((await maybeOfferUpdateBeforeDoctor({
4654
+ runtime,
4655
+ options,
4656
+ root,
4657
+ confirm: (p) => prompter.confirm(p),
4658
+ outro: outro$1
4659
+ })).handled) return;
4660
+ await maybeRepairUiProtocolFreshness(runtime, prompter);
4661
+ noteSourceInstallIssues(root);
4662
+ noteDeprecatedLegacyEnvVars();
4663
+ noteStartupOptimizationHints();
4664
+ const configResult = await loadAndMaybeMigrateDoctorConfig({
4665
+ options,
4666
+ confirm: (p) => prompter.confirm(p)
4667
+ });
4668
+ let cfg = configResult.cfg;
4669
+ const cfgForPersistence = structuredClone(cfg);
4670
+ const sourceConfigValid = configResult.sourceConfigValid ?? true;
4671
+ const configPath = configResult.path ?? CONFIG_PATH;
4672
+ if (!cfg.gateway?.mode) {
4673
+ const lines = [
4674
+ "gateway.mode is unset; gateway start will be blocked.",
4675
+ `Fix: run ${formatCliCommand("openclaw configure")} and set Gateway mode (local/remote).`,
4676
+ `Or set directly: ${formatCliCommand("openclaw config set gateway.mode local")}`
4677
+ ];
4678
+ if (!fs.existsSync(configPath)) lines.push(`Missing config: run ${formatCliCommand("openclaw setup")} first.`);
4679
+ note$1(lines.join("\n"), "Gateway");
4680
+ }
4681
+ if (resolveMode(cfg) === "local" && hasAmbiguousGatewayAuthModeConfig(cfg)) note$1([
4682
+ "gateway.auth.token and gateway.auth.password are both configured while gateway.auth.mode is unset.",
4683
+ "Set an explicit mode to avoid ambiguous auth selection and startup/runtime failures.",
4684
+ `Set token mode: ${formatCliCommand("openclaw config set gateway.auth.mode token")}`,
4685
+ `Set password mode: ${formatCliCommand("openclaw config set gateway.auth.mode password")}`
4686
+ ].join("\n"), "Gateway auth");
4687
+ cfg = await maybeRepairAnthropicOAuthProfileId(cfg, prompter);
4688
+ cfg = await maybeRemoveDeprecatedCliAuthProfiles(cfg, prompter);
4689
+ await noteAuthProfileHealth({
4690
+ cfg,
4691
+ prompter,
4692
+ allowKeychainPrompt: options.nonInteractive !== true && Boolean(process.stdin.isTTY)
4693
+ });
4694
+ const gatewayDetails = buildGatewayConnectionDetails({ config: cfg });
4695
+ if (gatewayDetails.remoteFallbackNote) note$1(gatewayDetails.remoteFallbackNote, "Gateway");
4696
+ if (resolveMode(cfg) === "local" && sourceConfigValid) {
4697
+ const gatewayTokenRef = resolveSecretInputRef({
4698
+ value: cfg.gateway?.auth?.token,
4699
+ defaults: cfg.secrets?.defaults
4700
+ }).ref;
4701
+ const auth = resolveGatewayAuth({
4702
+ authConfig: cfg.gateway?.auth,
4703
+ tailscaleMode: cfg.gateway?.tailscale?.mode ?? "off"
4704
+ });
4705
+ if (auth.mode !== "password" && (auth.mode !== "token" || !auth.token)) if (gatewayTokenRef) note$1([
4706
+ "Gateway token is managed via SecretRef and is currently unavailable.",
4707
+ "Doctor will not overwrite gateway.auth.token with a plaintext value.",
4708
+ "Resolve/rotate the external secret source, then rerun doctor."
4709
+ ].join("\n"), "Gateway auth");
4710
+ else {
4711
+ note$1("Gateway auth is off or missing a token. Token auth is now the recommended default (including loopback).", "Gateway auth");
4712
+ if (options.generateGatewayToken === true ? true : options.nonInteractive === true ? false : await prompter.confirmRepair({
4713
+ message: "Generate and configure a gateway token now?",
4714
+ initialValue: true
4715
+ })) {
4716
+ const nextToken = randomToken();
4717
+ cfg = {
4718
+ ...cfg,
4719
+ gateway: {
4720
+ ...cfg.gateway,
4721
+ auth: {
4722
+ ...cfg.gateway?.auth,
4723
+ mode: "token",
4724
+ token: nextToken
4725
+ }
4726
+ }
4727
+ };
4728
+ note$1("Gateway token configured.", "Gateway auth");
4729
+ }
4730
+ }
4731
+ }
4732
+ const legacyState = await detectLegacyStateMigrations({ cfg });
4733
+ if (legacyState.preview.length > 0) {
4734
+ note$1(legacyState.preview.join("\n"), "Legacy state detected");
4735
+ if (options.nonInteractive === true ? true : await prompter.confirm({
4736
+ message: "Migrate legacy state (sessions/agent/WhatsApp auth) now?",
4737
+ initialValue: true
4738
+ })) {
4739
+ const migrated = await runLegacyStateMigrations({ detected: legacyState });
4740
+ if (migrated.changes.length > 0) note$1(migrated.changes.join("\n"), "Doctor changes");
4741
+ if (migrated.warnings.length > 0) note$1(migrated.warnings.join("\n"), "Doctor warnings");
4742
+ }
4743
+ }
4744
+ await noteStateIntegrity(cfg, prompter, configResult.path ?? CONFIG_PATH);
4745
+ await noteSessionLockHealth({ shouldRepair: prompter.shouldRepair });
4746
+ await maybeRepairLegacyCronStore({
4747
+ cfg,
4748
+ options,
4749
+ prompter
4750
+ });
4751
+ cfg = await maybeRepairSandboxImages(cfg, runtime, prompter);
4752
+ noteSandboxScopeWarnings(cfg);
4753
+ await maybeScanExtraGatewayServices(options, runtime, prompter);
4754
+ await maybeRepairGatewayServiceConfig(cfg, resolveMode(cfg), runtime, prompter);
4755
+ await noteMacLaunchAgentOverrides();
4756
+ await noteMacLaunchctlGatewayEnvOverrides(cfg);
4757
+ if (prompter.shouldRepair) await runStartupMatrixMigration({
4758
+ cfg,
4759
+ env: process.env,
4760
+ log: {
4761
+ info: (message) => runtime.log(message),
4762
+ warn: (message) => runtime.error(message)
4763
+ },
4764
+ trigger: "doctor-fix",
4765
+ logPrefix: "doctor"
4766
+ });
4767
+ await noteSecurityWarnings(cfg);
4768
+ await noteChromeMcpBrowserReadiness(cfg);
4769
+ await noteOpenAIOAuthTlsPrerequisites({
4770
+ cfg,
4771
+ deep: options.deep === true
4772
+ });
4773
+ if (cfg.hooks?.gmail?.model?.trim()) {
4774
+ const hooksModelRef = resolveHooksGmailModel({
4775
+ cfg,
4776
+ defaultProvider: DEFAULT_PROVIDER
4777
+ });
4778
+ if (!hooksModelRef) note$1(`- hooks.gmail.model "${cfg.hooks.gmail.model}" could not be resolved`, "Hooks");
4779
+ else {
4780
+ const { provider: defaultProvider, model: defaultModel } = resolveConfiguredModelRef({
4781
+ cfg,
4782
+ defaultProvider: DEFAULT_PROVIDER,
4783
+ defaultModel: DEFAULT_MODEL
4784
+ });
4785
+ const catalog = await loadModelCatalog({ config: cfg });
4786
+ const status = getModelRefStatus({
4787
+ cfg,
4788
+ catalog,
4789
+ ref: hooksModelRef,
4790
+ defaultProvider,
4791
+ defaultModel
4792
+ });
4793
+ const warnings = [];
4794
+ if (!status.allowed) warnings.push(`- hooks.gmail.model "${status.key}" not in agents.defaults.models allowlist (will use primary instead)`);
4795
+ if (!status.inCatalog) warnings.push(`- hooks.gmail.model "${status.key}" not in the model catalog (may fail at runtime)`);
4796
+ if (warnings.length > 0) note$1(warnings.join("\n"), "Hooks");
4797
+ }
4798
+ }
4799
+ if (options.nonInteractive !== true && process.platform === "linux" && resolveMode(cfg) === "local") {
4800
+ const service = resolveGatewayService();
4801
+ let loaded = false;
4802
+ try {
4803
+ loaded = await service.isLoaded({ env: process.env });
4804
+ } catch {
4805
+ loaded = false;
4806
+ }
4807
+ if (loaded) await ensureSystemdUserLingerInteractive({
4808
+ runtime,
4809
+ prompter: {
4810
+ confirm: async (p) => prompter.confirm(p),
4811
+ note: note$1
4812
+ },
4813
+ reason: "Gateway runs as a systemd user service. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.",
4814
+ requireConfirm: true
4815
+ });
4816
+ }
4817
+ noteWorkspaceStatus(cfg);
4818
+ await noteBootstrapFileSize(cfg);
4819
+ await doctorShellCompletion(runtime, prompter, { nonInteractive: options.nonInteractive });
4820
+ const { healthOk } = await checkGatewayHealth({
4821
+ runtime,
4822
+ cfg,
4823
+ timeoutMs: options.nonInteractive === true ? 3e3 : 1e4
4824
+ });
4825
+ const gatewayMemoryProbe = healthOk ? await probeGatewayMemoryStatus({
4826
+ cfg,
4827
+ timeoutMs: options.nonInteractive === true ? 3e3 : 1e4
4828
+ }) : {
4829
+ checked: false,
4830
+ ready: false
4831
+ };
4832
+ await noteMemorySearchHealth(cfg, { gatewayMemoryProbe });
4833
+ await maybeRepairGatewayDaemon({
4834
+ cfg,
4835
+ runtime,
4836
+ prompter,
4837
+ options,
4838
+ gatewayDetailsMessage: gatewayDetails.message,
4839
+ healthOk
4840
+ });
4841
+ if (configResult.shouldWriteConfig || JSON.stringify(cfg) !== JSON.stringify(cfgForPersistence)) {
4842
+ cfg = applyWizardMetadata(cfg, {
4843
+ command: "doctor",
4844
+ mode: resolveMode(cfg)
4845
+ });
4846
+ await writeConfigFile(cfg);
4847
+ logConfigUpdated(runtime);
4848
+ const backupPath = `${CONFIG_PATH}.bak`;
4849
+ if (fs.existsSync(backupPath)) runtime.log(`Backup: ${shortenHomePath(backupPath)}`);
4850
+ } else if (!prompter.shouldRepair) runtime.log(`Run "${formatCliCommand("openclaw doctor --fix")}" to apply changes.`);
4851
+ if (options.workspaceSuggestions !== false) {
4852
+ const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
4853
+ noteWorkspaceBackupTip(workspaceDir);
4854
+ if (await shouldSuggestMemorySystem(workspaceDir)) note$1(MEMORY_SYSTEM_PROMPT, "Workspace");
4855
+ }
4856
+ const finalSnapshot = await readConfigFileSnapshot();
4857
+ if (finalSnapshot.exists && !finalSnapshot.valid) {
4858
+ runtime.error("Invalid config:");
4859
+ for (const issue of finalSnapshot.issues) {
4860
+ const path = issue.path || "<root>";
4861
+ runtime.error(`- ${path}: ${issue.message}`);
4862
+ }
4863
+ }
4864
+ outro$1("Doctor complete.");
4865
+ }
4866
+ //#endregion
4867
+ //#region src/terminal/prompt-select-styled.ts
4868
+ function selectStyled(params) {
4869
+ return select({
4870
+ ...params,
4871
+ message: stylePromptMessage(params.message),
4872
+ options: params.options.map((opt) => opt.hint === void 0 ? opt : {
4873
+ ...opt,
4874
+ hint: stylePromptHint(opt.hint)
4875
+ })
4876
+ });
4877
+ }
4878
+ //#endregion
4879
+ export { doctorCommand as n, selectStyled as t };