silentlake 2026.3.24

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 (1893) hide show
  1. package/CHANGELOG.md +4587 -0
  2. package/LICENSE +21 -0
  3. package/README.md +248 -0
  4. package/assets/avatar-placeholder.svg +19 -0
  5. package/assets/chrome-extension/icons/icon128.png +0 -0
  6. package/assets/chrome-extension/icons/icon16.png +0 -0
  7. package/assets/chrome-extension/icons/icon32.png +0 -0
  8. package/assets/chrome-extension/icons/icon48.png +0 -0
  9. package/assets/dmg-background-small.png +0 -0
  10. package/assets/dmg-background.png +0 -0
  11. package/assets/silentlake-banner.png +0 -0
  12. package/dist/APEv2Parser-BZv_dP9t.js +269 -0
  13. package/dist/APEv2Parser-CPzxFNBB.js +5 -0
  14. package/dist/AbstractID3Parser-mvDFcjYV.js +47 -0
  15. package/dist/AiffParser-BXQ9SRZk.js +145 -0
  16. package/dist/AsfParser-CmBDUlZE.js +631 -0
  17. package/dist/BasicParser-DhmXREDo.js +853 -0
  18. package/dist/DsdiffParser-CTKKGyZg.js +150 -0
  19. package/dist/DsfParser-Ds-YQe4Z.js +101 -0
  20. package/dist/FlacParser-B1XVPgXF.js +5 -0
  21. package/dist/FlacParser-DMPyL1y4.js +367 -0
  22. package/dist/ID3v1Parser-BICWWVDG.js +289 -0
  23. package/dist/ID3v2Parser-BmZHSUqs.js +650 -0
  24. package/dist/ID3v2Token-DeJf4tYQ.js +145 -0
  25. package/dist/MP4Parser-Cjf-Zs8T.js +1061 -0
  26. package/dist/MatroskaParser-DgBzBe8t.js +909 -0
  27. package/dist/MpegParser-D5swTpA1.js +744 -0
  28. package/dist/MusepackParser-D8EQXnpK.js +285 -0
  29. package/dist/OggParser-BcIYPHwP.js +390 -0
  30. package/dist/Util-D_zGsr97.js +170 -0
  31. package/dist/WavPackParser-hosU8gfo.js +166 -0
  32. package/dist/WaveParser-CA00FZrC.js +273 -0
  33. package/dist/abort-cutoff-CERmtgZI.js +56 -0
  34. package/dist/abort-cutoff.runtime-DZkGKKzv.js +61 -0
  35. package/dist/abort-signal-CsrBEr94.js +13 -0
  36. package/dist/account-helpers-D3c_eI7c.js +37 -0
  37. package/dist/account-helpers-ru3jdZSV.js +12 -0
  38. package/dist/account-id-DZnNZg8x.js +1 -0
  39. package/dist/account-id-ZCrgXl7Z.js +44 -0
  40. package/dist/account-lookup-nkoa-foB.js +10 -0
  41. package/dist/account-snapshot-fields-Cvq7803C.js +116 -0
  42. package/dist/account-summary-B5Xzvntm.js +36 -0
  43. package/dist/accounts-43SvCDEA.js +212 -0
  44. package/dist/accounts-CYgFhv2o.js +105 -0
  45. package/dist/accounts-ChlyF7cx.js +112 -0
  46. package/dist/ack-reactions-CNVwfOBj.js +43 -0
  47. package/dist/acp-cli-B4Rv7-xU.js +2033 -0
  48. package/dist/acp-runtime-BdLdT-QY.js +1 -0
  49. package/dist/actions.runtime-CqnQssoB.js +217 -0
  50. package/dist/actions.runtime-FLmCvVRd.js +236 -0
  51. package/dist/agent-CBOdzEvR.js +1 -0
  52. package/dist/agent-scope-BLhzf-o0.js +17 -0
  53. package/dist/agent-scope-DPP4Z_UU.js +193 -0
  54. package/dist/agents-D8pBK0II.js +855 -0
  55. package/dist/agents-Dihz1Ihx.js +323 -0
  56. package/dist/agents.config-C_lrnc9J.js +18 -0
  57. package/dist/agents.config-D1VqC78r.js +121 -0
  58. package/dist/allow-from-BPSBITdd.js +9 -0
  59. package/dist/allow-from-BwTLpvhp.js +20 -0
  60. package/dist/allow-from-C4iBpqFI.js +62 -0
  61. package/dist/allowlist-config-edit-CKbnMmwS.js +279 -0
  62. package/dist/allowlist-match-CYmPgg1K.js +63 -0
  63. package/dist/ansi-BEJF8NKS.js +54 -0
  64. package/dist/anthropic-vertex-provider-Dd5agCN9.js +60 -0
  65. package/dist/apply.runtime-DhKxNSJE.js +370 -0
  66. package/dist/apply.runtime-ghlh-P6X.js +211 -0
  67. package/dist/archive-Tr0wIUO-.js +532 -0
  68. package/dist/arg-split-Dtda0YDl.js +38 -0
  69. package/dist/artifacts-C_4LekPC.js +39 -0
  70. package/dist/audit-BOPSQQtd.js +54 -0
  71. package/dist/audit-C5kdrCi_.js +788 -0
  72. package/dist/audit-channel.allow-from.runtime-B7BHNblL.js +17 -0
  73. package/dist/audit-channel.collect.runtime-CjAbXFBV.js +521 -0
  74. package/dist/audit-channel.discord.runtime-BBY6S9lg.js +5 -0
  75. package/dist/audit-channel.telegram.runtime-SJnxOJH2.js +8 -0
  76. package/dist/audit-channel.zalouser.runtime-SGRWvHxT.js +5 -0
  77. package/dist/audit-extra.async-DY8v7LXH.js +817 -0
  78. package/dist/audit-fs-oDMUa5N_.js +375 -0
  79. package/dist/audit-membership-runtime-BPjFryEx.js +261 -0
  80. package/dist/audit.deep.runtime-WFf-TpsD.js +31 -0
  81. package/dist/audit.nondeep.runtime-B4BaEaRU.js +842 -0
  82. package/dist/audit.runtime-rFjCrods.js +74 -0
  83. package/dist/auth-O6LQFLHJ.js +416 -0
  84. package/dist/auth-choice-DIBaxmAQ.js +219 -0
  85. package/dist/auth-choice-PrbpIjyg.js +610 -0
  86. package/dist/auth-choice-legacy-Clyw2lVc.js +17 -0
  87. package/dist/auth-choice-options-ohUw8QR-.js +127 -0
  88. package/dist/auth-choice-prompt-Cm0s-9Du.js +215 -0
  89. package/dist/auth-choice-prompt-DI-Xl1Nv.js +36 -0
  90. package/dist/auth-choice-rKBOd02a.js +64 -0
  91. package/dist/auth-choice.apply-helpers-BibBSEl9.js +66 -0
  92. package/dist/auth-choice.plugin-providers.runtime-gqF9NO7_.js +219 -0
  93. package/dist/auth-health-TWboMYA5.js +166 -0
  94. package/dist/auth-mode-policy-DywddkT-.js +18 -0
  95. package/dist/auth-profiles-CWEIQV77.js +1047 -0
  96. package/dist/auth-profiles.runtime-B98lwopF.js +48 -0
  97. package/dist/avatar-policy-Ds9e6uHI.js +67 -0
  98. package/dist/axios-xDDnM0KG.js +12831 -0
  99. package/dist/backup-create-B6JAR6jJ.js +461 -0
  100. package/dist/banner-bez5CpOK.js +351 -0
  101. package/dist/base-session-key-Cf2rkwag.js +14 -0
  102. package/dist/bindings-BV4AtNSY.js +21 -0
  103. package/dist/bindings-kjwuC11Q.js +69 -0
  104. package/dist/bluebubbles-C1M3Geg0.js +87 -0
  105. package/dist/bluebubbles-DRW3JdOY.js +603 -0
  106. package/dist/bluebubbles-dEl4QpYz.js +37 -0
  107. package/dist/bonjour-discovery-C2oY96BG.js +376 -0
  108. package/dist/boolean-DKtCJu_W.js +29 -0
  109. package/dist/boolean-param-xAGXUSSN.js +13 -0
  110. package/dist/boundary-file-read-BP6VMpqH.js +106 -0
  111. package/dist/boundary-path-B3FFLYNx.js +557 -0
  112. package/dist/brave-CkimJe4j.js +405 -0
  113. package/dist/brew-DSwWqzLd.js +44 -0
  114. package/dist/browser-cli-D3kBUBNc.js +1502 -0
  115. package/dist/bundled/boot-md/handler.js +381 -0
  116. package/dist/bundled/bootstrap-extra-files/handler.js +56 -0
  117. package/dist/bundled/command-logger/handler.js +62 -0
  118. package/dist/bundled/session-memory/handler.js +401 -0
  119. package/dist/call-BDvaXe4i.js +44 -0
  120. package/dist/call-BmLt3xO1.js +639 -0
  121. package/dist/catalog-BwAYUfL7.js +240 -0
  122. package/dist/channel-BBCuV5OT.js +4945 -0
  123. package/dist/channel-BDBXuqeg.js +321 -0
  124. package/dist/channel-C8h1Irxm.js +1284 -0
  125. package/dist/channel-CbGpFzo4.js +1602 -0
  126. package/dist/channel-Ci3K8fI9.js +1006 -0
  127. package/dist/channel-DGT5N1v7.js +1077 -0
  128. package/dist/channel-account-context-Bwa-YH_o.js +104 -0
  129. package/dist/channel-actions-DU2CR3xW.js +37 -0
  130. package/dist/channel-activity-B8aReQoE.js +35 -0
  131. package/dist/channel-config-3Uv6ve2_.js +115 -0
  132. package/dist/channel-config-helpers-CieQWILI.js +377 -0
  133. package/dist/channel-config-schema-DEVsCZpj.js +1 -0
  134. package/dist/channel-feedback-G6zh8efr.js +245 -0
  135. package/dist/channel-inbound-DwzVf2PK.js +395 -0
  136. package/dist/channel-lifecycle-CpU1dRbh.js +354 -0
  137. package/dist/channel-options-DJaIP4Dv.js +38 -0
  138. package/dist/channel-pairing-D54mn51y.js +66 -0
  139. package/dist/channel-plugin-common-BhTxCE5t.js +1 -0
  140. package/dist/channel-plugin-ids-CFeS3qir.js +26 -0
  141. package/dist/channel-plugin-resolution-DUngfdFj.js +112 -0
  142. package/dist/channel-policy-C4GKHvhz.js +1 -0
  143. package/dist/channel-reply-pipeline-CPTuaW8n.js +15 -0
  144. package/dist/channel-send-result-By8EpCPw.js +40 -0
  145. package/dist/channel-setup-Ck35g7zI.js +49 -0
  146. package/dist/channel-shared-LkXtTPXk.js +308 -0
  147. package/dist/channel-summary-CdYLGMVt.js +137 -0
  148. package/dist/channel-summary-D33z52ft.js +41 -0
  149. package/dist/channel-targets-DfnKGXez.js +87 -0
  150. package/dist/channel.runtime-DAyBR2A5.js +324 -0
  151. package/dist/channel.runtime-DVq5tC2D.js +35 -0
  152. package/dist/channel.runtime-DaLTDGtF.js +288 -0
  153. package/dist/channel.runtime-FKfTev2g.js +512 -0
  154. package/dist/channel.runtime-owqedh1t.js +268 -0
  155. package/dist/channel.runtime-wOTeiifp.js +230 -0
  156. package/dist/channels-CIHgkPea.js +408 -0
  157. package/dist/channels-ZXK6Jiuk.js +1393 -0
  158. package/dist/channels-cli-Bj6qSlkE.js +412 -0
  159. package/dist/channels-status-issues-C_U44M8Y.js +16 -0
  160. package/dist/chat-type-C-n03mQY.js +10 -0
  161. package/dist/clack-prompter-DuzDnaLi.js +112 -0
  162. package/dist/clawbot-cli-YNPuwmTB.js +218 -0
  163. package/dist/cli/daemon-cli.js +88 -0
  164. package/dist/cli-CW46WAZn.js +254 -0
  165. package/dist/cli-name-Daok7A7-.js +25 -0
  166. package/dist/cli-runtime-aAVwbEYy.js +7 -0
  167. package/dist/cli-utils-Np4NAAtt.js +39 -0
  168. package/dist/command-format-CYK9XiUC.js +16 -0
  169. package/dist/command-format-g8YUHNir.js +2 -0
  170. package/dist/command-gating-BQXGSqc9.js +40 -0
  171. package/dist/command-options-5coRiipK.js +25 -0
  172. package/dist/command-poll-backoff-CpkSns-6.js +56 -0
  173. package/dist/command-poll-backoff.runtime-YT6EGcLN.js +7 -0
  174. package/dist/command-registry-BI2MOs89.js +242 -0
  175. package/dist/command-registry-BMsxnuoC.js +14 -0
  176. package/dist/command-secret-gateway-ChXyZwos.js +211 -0
  177. package/dist/command-secret-targets-COcwhn-D.js +88 -0
  178. package/dist/command-secret-targets-CQJT3viO.js +3 -0
  179. package/dist/commands-Bb9xUwz9.js +42 -0
  180. package/dist/commands-core-C1usZXC2.js +4923 -0
  181. package/dist/commands-core.runtime-OTZivlO2.js +232 -0
  182. package/dist/commands-registry-ChCep1KJ.js +295 -0
  183. package/dist/commands-registry.data-XyUTELK9.js +904 -0
  184. package/dist/commands-registry.runtime-m5WTxFtv.js +25 -0
  185. package/dist/commands-status.runtime-C8_hpNgj.js +211 -0
  186. package/dist/commands.runtime-BZPnQKcW.js +232 -0
  187. package/dist/common-CUBlLRXB.js +457 -0
  188. package/dist/compact.runtime-Djmzpbn6.js +216 -0
  189. package/dist/completion-cli-D8tLgE5W.js +445 -0
  190. package/dist/completion-cli-Dz89naVA.js +17 -0
  191. package/dist/config-6sZwvXJD.js +88 -0
  192. package/dist/config-B7tPwoHZ.js +38 -0
  193. package/dist/config-DdDLrP_v.js +273 -0
  194. package/dist/config-cli-C10R8azD.js +945 -0
  195. package/dist/config-guard-B1c73BYQ.js +126 -0
  196. package/dist/config-helpers-3u5wfLBu.js +117 -0
  197. package/dist/config-pn7LKJdW.js +23 -0
  198. package/dist/config-presence-BmUF_5K9.js +79 -0
  199. package/dist/config-regex-CvZFnWkO.js +39 -0
  200. package/dist/config-runtime-CstET7fq.js +142 -0
  201. package/dist/config-schema-5YkIW1xw.js +270 -0
  202. package/dist/config-schema-B1UGMwZ8.js +31 -0
  203. package/dist/config-schema-DzlnsY3D.js +33 -0
  204. package/dist/config-state-CE0CGjey.js +288 -0
  205. package/dist/config-validation-CkVqgkHr.js +272 -0
  206. package/dist/config-value-DgJrpclm.js +25 -0
  207. package/dist/configure-DMkp7Sr4.js +1126 -0
  208. package/dist/configure-DOrQthLy.js +344 -0
  209. package/dist/connection-auth-BSQJeDOU.js +30 -0
  210. package/dist/constants-C_Scc680.js +71 -0
  211. package/dist/control-ui-assets-DjqeIg6A.js +232 -0
  212. package/dist/control-ui-shared-DP000Pxd.js +29 -0
  213. package/dist/conversation-runtime-1O0Aaolb.js +1458 -0
  214. package/dist/core-C7aHA4Aq.js +187 -0
  215. package/dist/core-command-descriptors-DCUYAEZd.js +96 -0
  216. package/dist/credentials-BPwBlm1X.js +265 -0
  217. package/dist/cron-cli-N2Hw_02d.js +579 -0
  218. package/dist/daemon-cli-DgfaF9xx.js +354 -0
  219. package/dist/daemon-install-CbclJo5M.js +134 -0
  220. package/dist/daemon-install-plan.shared-DK6BHlWI.js +222 -0
  221. package/dist/daemon-runtime-CbClrCwc.js +12 -0
  222. package/dist/dangerous-config-flags-BJtLWIk7.js +15 -0
  223. package/dist/dangerous-name-matching-DZa_t0RM.js +44 -0
  224. package/dist/dangerous-tools-yGPDFTHh.js +27 -0
  225. package/dist/date-time-DCAyaBop.js +118 -0
  226. package/dist/dedupe-Cgnk5BbX.js +55 -0
  227. package/dist/defaults-CEdZhIIb.js +6 -0
  228. package/dist/delegate-D4ql5N70.js +43 -0
  229. package/dist/deliver-B004w1Mv.js +212 -0
  230. package/dist/deliver-runtime-IYvc0giI.js +211 -0
  231. package/dist/delivery-queue-B19wDCjT.js +3 -0
  232. package/dist/delivery-queue-DrrqB4Hi.js +299 -0
  233. package/dist/device-auth-GEXe9vqR.js +15 -0
  234. package/dist/device-bootstrap-CwwokLEY.js +96 -0
  235. package/dist/device-bootstrap-Dbhe6oe8.js +1 -0
  236. package/dist/device-metadata-normalization-BDSQ_eA7.js +21 -0
  237. package/dist/device-pairing-cFWbBray.js +553 -0
  238. package/dist/devices-cli-DzycjFzS.js +366 -0
  239. package/dist/diagnostic-DqJXx_4Q.js +310 -0
  240. package/dist/diagnostic-events-ktCoG8Br.js +48 -0
  241. package/dist/diagnostics-CMhyGsPu.js +33 -0
  242. package/dist/diagnostics-DpLHpQ9c.js +14 -0
  243. package/dist/directive-handling.fast-lane-toP_ri_H.js +273 -0
  244. package/dist/directive-handling.impl-BRARyrsT.js +638 -0
  245. package/dist/directive-handling.impl-CUB4MOnK.js +214 -0
  246. package/dist/directive-handling.levels-8vnMeuGX.js +2 -0
  247. package/dist/directive-handling.levels-CoruY1AA.js +13 -0
  248. package/dist/directive-handling.persist.runtime-78Du6PgL.js +170 -0
  249. package/dist/directive-handling.shared-DCGUCHjn.js +147 -0
  250. package/dist/directory-cli-DVsDcgIU.js +437 -0
  251. package/dist/directory-config-helpers-CURJ8mj7.js +129 -0
  252. package/dist/directory-runtime-DhC8QkMq.js +19 -0
  253. package/dist/directory.static-DQaG9ohH.js +44 -0
  254. package/dist/discord-CYj8s73O.js +214 -0
  255. package/dist/discord-L9zvSHVn.js +635 -0
  256. package/dist/discord-core-5tkl-BzP.js +1 -0
  257. package/dist/dm-policy-shared-6bCJzHOS.js +188 -0
  258. package/dist/dns-cli-BMvHy265.js +223 -0
  259. package/dist/docker-XFNiArwM.js +1254 -0
  260. package/dist/docs-cli-BTaH94wD.js +176 -0
  261. package/dist/doctor-completion-DKx5m2UC.js +90 -0
  262. package/dist/doctor-config-preflight-BzQgc3_t.js +40 -0
  263. package/dist/doctor-config-preflight-DxVCut8L.js +150 -0
  264. package/dist/doctor-state-migrations-CTF66iAy.js +732 -0
  265. package/dist/doctor-state-migrations-D0VP4dUh.js +212 -0
  266. package/dist/entry-status-B2OWAf0s.js +172 -0
  267. package/dist/entry.js +210 -0
  268. package/dist/env-BP70DGuy.js +30 -0
  269. package/dist/env-overrides-JneV60sd.js +434 -0
  270. package/dist/env-overrides.runtime-DLrwions.js +18 -0
  271. package/dist/env-substitution-D6t_sLS_.js +136 -0
  272. package/dist/errors-BxyFnvP3.js +58 -0
  273. package/dist/exec-Dmex2w_d.js +310 -0
  274. package/dist/exec-approvals-BJhuySBz.js +386 -0
  275. package/dist/exec-approvals-allowlist-B_wPddCb.js +384 -0
  276. package/dist/exec-approvals-cli-C2dwhSkX.js +427 -0
  277. package/dist/exec-safe-bin-runtime-policy-BZkObC8r.js +89 -0
  278. package/dist/exec-safety-CaaBy-Zw.js +24 -0
  279. package/dist/extension-shared-5txN7IXK.js +74 -0
  280. package/dist/extensionAPI.js +218 -0
  281. package/dist/extensions/amazon-bedrock/index.js +231 -0
  282. package/dist/extensions/anthropic/index.js +330 -0
  283. package/dist/extensions/bluebubbles/index.js +224 -0
  284. package/dist/extensions/bluebubbles/setup-entry.js +289 -0
  285. package/dist/extensions/brave/index.js +23 -0
  286. package/dist/extensions/byteplus/index.js +112 -0
  287. package/dist/extensions/chutes/index.js +221 -0
  288. package/dist/extensions/cloudflare-ai-gateway/index.js +218 -0
  289. package/dist/extensions/copilot-proxy/index.js +125 -0
  290. package/dist/extensions/device-pair/index.js +1040 -0
  291. package/dist/extensions/discord/index.js +215 -0
  292. package/dist/extensions/discord/setup-entry.js +215 -0
  293. package/dist/extensions/elevenlabs/index.js +223 -0
  294. package/dist/extensions/fal/index.js +112 -0
  295. package/dist/extensions/feishu/index.js +227 -0
  296. package/dist/extensions/feishu/setup-entry.js +112 -0
  297. package/dist/extensions/firecrawl/index.js +211 -0
  298. package/dist/extensions/github-copilot/index.js +490 -0
  299. package/dist/extensions/google/index.js +211 -0
  300. package/dist/extensions/huggingface/index.js +108 -0
  301. package/dist/extensions/imessage/index.js +223 -0
  302. package/dist/extensions/imessage/setup-entry.js +220 -0
  303. package/dist/extensions/irc/index.js +220 -0
  304. package/dist/extensions/irc/setup-entry.js +222 -0
  305. package/dist/extensions/kilocode/index.js +282 -0
  306. package/dist/extensions/kimi-coding/index.js +148 -0
  307. package/dist/extensions/line/index.js +57 -0
  308. package/dist/extensions/line/setup-entry.js +49 -0
  309. package/dist/extensions/llm-task/index.js +157 -0
  310. package/dist/extensions/lobster/index.js +261 -0
  311. package/dist/extensions/mattermost/index.js +220 -0
  312. package/dist/extensions/mattermost/setup-entry.js +222 -0
  313. package/dist/extensions/memory-core/index.js +36 -0
  314. package/dist/extensions/microsoft/index.js +223 -0
  315. package/dist/extensions/minimax/index.js +437 -0
  316. package/dist/extensions/mistral/index.js +149 -0
  317. package/dist/extensions/modelstudio/index.js +144 -0
  318. package/dist/extensions/moonshot/index.js +211 -0
  319. package/dist/extensions/nextcloud-talk/index.js +221 -0
  320. package/dist/extensions/nextcloud-talk/setup-entry.js +223 -0
  321. package/dist/extensions/nvidia/index.js +29 -0
  322. package/dist/extensions/ollama/index.js +118 -0
  323. package/dist/extensions/open-prose/index.js +10 -0
  324. package/dist/extensions/openai/index.js +677 -0
  325. package/dist/extensions/opencode/index.js +116 -0
  326. package/dist/extensions/opencode-go/index.js +114 -0
  327. package/dist/extensions/openrouter/index.js +398 -0
  328. package/dist/extensions/openshell/index.js +923 -0
  329. package/dist/extensions/perplexity/index.js +23 -0
  330. package/dist/extensions/phone-control/index.js +276 -0
  331. package/dist/extensions/qianfan/index.js +114 -0
  332. package/dist/extensions/qwen-portal-auth/index.js +350 -0
  333. package/dist/extensions/sglang/index.js +285 -0
  334. package/dist/extensions/signal/index.js +218 -0
  335. package/dist/extensions/signal/setup-entry.js +218 -0
  336. package/dist/extensions/slack/index.js +222 -0
  337. package/dist/extensions/slack/setup-entry.js +220 -0
  338. package/dist/extensions/synology-chat/index.js +56 -0
  339. package/dist/extensions/synology-chat/setup-entry.js +58 -0
  340. package/dist/extensions/synthetic/index.js +112 -0
  341. package/dist/extensions/talk-voice/index.js +197 -0
  342. package/dist/extensions/tavily/index.js +211 -0
  343. package/dist/extensions/telegram/index.js +221 -0
  344. package/dist/extensions/telegram/setup-entry.js +221 -0
  345. package/dist/extensions/thread-ownership/index.js +70 -0
  346. package/dist/extensions/together/index.js +113 -0
  347. package/dist/extensions/venice/index.js +132 -0
  348. package/dist/extensions/vercel-ai-gateway/index.js +86 -0
  349. package/dist/extensions/vllm/index.js +285 -0
  350. package/dist/extensions/voice-call/index.js +5715 -0
  351. package/dist/extensions/volcengine/index.js +112 -0
  352. package/dist/extensions/xai/index.js +211 -0
  353. package/dist/extensions/xiaomi/index.js +115 -0
  354. package/dist/extensions/zai/index.js +559 -0
  355. package/dist/extensions/zalo/index.js +225 -0
  356. package/dist/extensions/zalo/setup-entry.js +226 -0
  357. package/dist/external-content-BUdUOqkv.js +238 -0
  358. package/dist/feishu-CgbwAF0e.js +2664 -0
  359. package/dist/feishu-Dh5fEbh5.js +59127 -0
  360. package/dist/fetch-guard-DIyN1HW5.js +165 -0
  361. package/dist/fetch-timeout-C5xpMuGd.js +36 -0
  362. package/dist/file-identity-Cw0fQxYY.js +11 -0
  363. package/dist/file-lock-WbEmczmY.js +107 -0
  364. package/dist/filter-oMGaNOM1.js +20 -0
  365. package/dist/format-DH8ysi7s.js +19 -0
  366. package/dist/format-datetime-BGS6tLDE.js +73 -0
  367. package/dist/format-duration-CO0BGWB0.js +57 -0
  368. package/dist/format-relative-C3nDxnXz.js +54 -0
  369. package/dist/frontmatter-S5vS-I4a.js +309 -0
  370. package/dist/fs-safe-D3qzH-ab.js +731 -0
  371. package/dist/gateway-cli-PQNp7o0j.js +28378 -0
  372. package/dist/gateway-install-token-DV5KjD4F.js +164 -0
  373. package/dist/gateway-rpc-C0Ey-rik.js +26 -0
  374. package/dist/gateway-runtime-ih2e7a2K.js +42 -0
  375. package/dist/gaxios-fetch-compat-KX6bsqFm.js +165 -0
  376. package/dist/gemini-auth-B5ljg7jr.js +29 -0
  377. package/dist/git-commit-BIdLubm5.js +2 -0
  378. package/dist/git-commit-OvUvjri2.js +177 -0
  379. package/dist/github-copilot-auth-Ccm-cBwy.js +104 -0
  380. package/dist/global-singleton-4KwY5RvX.js +13 -0
  381. package/dist/globals-41sdSaKv.js +38 -0
  382. package/dist/gmail-setup-utils-BX68dZla.js +419 -0
  383. package/dist/group-access-DJZrYPx1.js +113 -0
  384. package/dist/group-keys-BD_IYSMs.js +44 -0
  385. package/dist/group-policy-CWFxv3iB.js +201 -0
  386. package/dist/group-policy-warnings-Ddu6lBkh.js +175 -0
  387. package/dist/health-Bu1sbyYy.js +573 -0
  388. package/dist/health-Cbxc9Bn3.js +59 -0
  389. package/dist/health-format-B5XfOTuJ.js +26 -0
  390. package/dist/heartbeat-7aHh0m3d.js +169 -0
  391. package/dist/heartbeat-summary-Das49TYq.js +57 -0
  392. package/dist/help-CcbF7-ha.js +81 -0
  393. package/dist/help-format-Dv45FpYu.js +15 -0
  394. package/dist/helpers-DJ-5HEbE.js +24 -0
  395. package/dist/helpers-MxyaLZUk.js +32 -0
  396. package/dist/history-CHjo8B5W.js +102 -0
  397. package/dist/hook-runtime-BnNBi_q4.js +1 -0
  398. package/dist/hooks-cli-DUYK4RM1.js +1102 -0
  399. package/dist/hooks-policy-BL6HDLUn.js +20 -0
  400. package/dist/hooks-status-gzNmo3li.js +78 -0
  401. package/dist/host-env-security-BogNN146.js +223 -0
  402. package/dist/http-body-CCiSfloA.js +237 -0
  403. package/dist/http-registry-WFFbLYRd.js +153 -0
  404. package/dist/identity-DovQV4zD.js +112 -0
  405. package/dist/identity-cyBYcoXS.js +84 -0
  406. package/dist/identity-file-EndG1nfc.js +60 -0
  407. package/dist/image-generation-CNKc-mFK.js +441 -0
  408. package/dist/image-kJ7Tbov4.js +211 -0
  409. package/dist/image-ops-j01UkxEv.js +371 -0
  410. package/dist/imessage-B5pSMT47.js +219 -0
  411. package/dist/imessage-CoIuY1Ro.js +1451 -0
  412. package/dist/imessage-Cqjsq4VW.js +190 -0
  413. package/dist/imessage-core-CsYJuaRZ.js +1 -0
  414. package/dist/inbound-envelope-4P3IIJc3.js +61 -0
  415. package/dist/inbound-reply-dispatch-i2Vekqyy.js +72 -0
  416. package/dist/includes-7XyL3p1c.js +188 -0
  417. package/dist/includes-scan-y-rS6tTw.js +55 -0
  418. package/dist/index.js +57 -0
  419. package/dist/infra/warning-filter.js +2 -0
  420. package/dist/inspect-CcxlJ1ba.js +279 -0
  421. package/dist/install-safe-path-Rwbw1XCZ.js +62 -0
  422. package/dist/installs-iHi2aSjM.js +532 -0
  423. package/dist/interactive-F7iY0yED.js +8 -0
  424. package/dist/interactive-runtime-OweOj_Vv.js +90 -0
  425. package/dist/internal-hooks-0uipqzRY.js +156 -0
  426. package/dist/io-BX49DsSJ.js +35 -0
  427. package/dist/io-jOnQRia2.js +7178 -0
  428. package/dist/ip-C8vmzVu0.js +203 -0
  429. package/dist/ipv4-DAmsJVOV.js +82 -0
  430. package/dist/irc-AZ-Ec8be.js +12 -0
  431. package/dist/irc-CCSRuEC2.js +660 -0
  432. package/dist/is-main-YViS6wOn.js +27 -0
  433. package/dist/issue-format-CBEXVico.js +31 -0
  434. package/dist/issue-format-D3HehoKZ.js +4 -0
  435. package/dist/json-file-C2zjA0Gv.js +23 -0
  436. package/dist/json-files-WW-H_psG.js +60 -0
  437. package/dist/json-pointer-f9dEnBoR.js +43 -0
  438. package/dist/json-store-O1LwpnBH.js +37 -0
  439. package/dist/kb-cli-DMZs6PCu.js +65 -0
  440. package/dist/keyed-async-queue-CPUWV5Pm.js +32 -0
  441. package/dist/kill-tree-CbjXBw3z.js +149 -0
  442. package/dist/kilocode-shared-DS7_0IMs.js +29 -0
  443. package/dist/launchd-tyqGVx9U.js +491 -0
  444. package/dist/lazy-runtime-BcXbyAaC.js +1 -0
  445. package/dist/lazy-runtime-bWkd2cs3.js +29 -0
  446. package/dist/legacy-names-CUNZ4vHN.js +7 -0
  447. package/dist/legacy-web-search-BgZjNG2h.js +222 -0
  448. package/dist/lib-CERS7N4b.js +503 -0
  449. package/dist/lib-PPICrHv1.js +1938 -0
  450. package/dist/library-CZ461krl.js +211 -0
  451. package/dist/lifecycle-core-Dnxnw0oy.js +382 -0
  452. package/dist/line/accounts.js +10 -0
  453. package/dist/line/send.js +39 -0
  454. package/dist/line/template-messages.js +2 -0
  455. package/dist/line-CJSvwApm.js +1 -0
  456. package/dist/line-N9vL-2JB.js +688 -0
  457. package/dist/line-core-BOIxkjgu.js +1 -0
  458. package/dist/links-Bilm-v0z.js +13 -0
  459. package/dist/llm-slug-generator-BuAuQ5Ft.js +68 -0
  460. package/dist/llm-slug-generator.js +212 -0
  461. package/dist/llm-task-Dx8ymRFr.js +1 -0
  462. package/dist/local-roots-DAzCjWbC.js +34 -0
  463. package/dist/location-DefAH9WS.js +42 -0
  464. package/dist/logger-CoEtkjhn.js +550 -0
  465. package/dist/logger-Cqy7-Maj.js +70 -0
  466. package/dist/logging-B2wMcpWV.js +13 -0
  467. package/dist/logging-Bz1qZDPg.js +16 -0
  468. package/dist/logging-CArEWRgI.js +36 -0
  469. package/dist/logging-CbTTfADU.js +1 -0
  470. package/dist/logs-cli-BSjKwaur.js +261 -0
  471. package/dist/magic-string.es-DJPWMt-n.js +1011 -0
  472. package/dist/main-session-DKr0lBVk.js +36 -0
  473. package/dist/manager-ChTGDe87.js +2005 -0
  474. package/dist/manager-DuwFn87U.js +4226 -0
  475. package/dist/manager-runtime-E16jsvRe.js +59 -0
  476. package/dist/manager.runtime-F9F1eFiB.js +827 -0
  477. package/dist/manifest-registry-B90TyTWl.js +1350 -0
  478. package/dist/map-size-CMTQVKUV.js +15 -0
  479. package/dist/markdown-to-line-BWwaRx5F.js +640 -0
  480. package/dist/mask-api-key-CprzEe7l.js +10 -0
  481. package/dist/matrix-DzvdUw97.js +228 -0
  482. package/dist/matrix-migration-snapshot-adoDbNii.js +702 -0
  483. package/dist/mattermost-DO0BCfF3.js +1 -0
  484. package/dist/mattermost-SjOt4QDb.js +15 -0
  485. package/dist/mcp-cli-BC_VPl_o.js +94 -0
  486. package/dist/mcp-config-Coky4zS4.js +108 -0
  487. package/dist/media-limits-Cuvmmhop.js +14 -0
  488. package/dist/media-understanding-DD2uMjK8.js +48 -0
  489. package/dist/media-understanding.runtime-Kbb2bRmk.js +216 -0
  490. package/dist/memory-DBjQ0TPd.js +1 -0
  491. package/dist/memory-cli-Cm4Df0hJ.js +215 -0
  492. package/dist/memory-cli-yzqneSF8.js +541 -0
  493. package/dist/memory-search-Das1tiuB.js +204 -0
  494. package/dist/memory-search-DxmSTjHq.js +18 -0
  495. package/dist/mention-gating-B_q-EHFx.js +25 -0
  496. package/dist/mentions-Bxys_va0.js +154 -0
  497. package/dist/message-channel-Cy-gN4K2.js +106 -0
  498. package/dist/message-hook-mappers-BBTV3JRQ.js +249 -0
  499. package/dist/method-scopes-DgypDW23.js +2649 -0
  500. package/dist/mime-C4vVTBso.js +150 -0
  501. package/dist/minimal-C5yUxtHy.js +2120 -0
  502. package/dist/model-auth-B__TJTPw.js +309 -0
  503. package/dist/model-auth-env-CF9ts7Th.js +111 -0
  504. package/dist/model-catalog.runtime-CWh17vcc.js +211 -0
  505. package/dist/model-id-normalization-Y-MIsyK_.js +16 -0
  506. package/dist/model-input-BB2wSAHb.js +20 -0
  507. package/dist/model-overrides-sIzKU2wo.js +84 -0
  508. package/dist/model-param-b-DIFEhICm.js +15 -0
  509. package/dist/model-picker-CAPjetT3.js +400 -0
  510. package/dist/model-picker-DEw9viWc.js +215 -0
  511. package/dist/model-picker.runtime-ixYl7lB5.js +224 -0
  512. package/dist/model-selection-BTpJnslv.js +437 -0
  513. package/dist/model-selection-Ci9cPkL2.js +765 -0
  514. package/dist/model-suppression.runtime-D8cIb6Y5.js +216 -0
  515. package/dist/models-BQtc3khN.js +226 -0
  516. package/dist/models-CQgBV5dW.js +2536 -0
  517. package/dist/models-cli-DbQ-QpQk.js +418 -0
  518. package/dist/models-config-D2xK-G6c.js +211 -0
  519. package/dist/models-config.providers.discovery-BaIk1NKL.js +141 -0
  520. package/dist/models-config.runtime-Cf7q9uAQ.js +211 -0
  521. package/dist/monitor-B5QmKaD7.js +3272 -0
  522. package/dist/monitor-CL5OYLih.js +878 -0
  523. package/dist/monitor-CNZxrM4d.js +3145 -0
  524. package/dist/monitor-CyQVZdDh.js +223 -0
  525. package/dist/multimodal-DC43jYNv.js +75 -0
  526. package/dist/mutable-allowlist-detectors-C6EAzWYE.js +62 -0
  527. package/dist/net-DlJFp95v.js +270 -0
  528. package/dist/network-mode-DOgvmom4.js +17 -0
  529. package/dist/nextcloud-talk-ChMP88s-.js +12 -0
  530. package/dist/nextcloud-talk-CwnkUy8E.js +1 -0
  531. package/dist/node-cli-BZDC7rXg.js +2484 -0
  532. package/dist/node-command-policy-Bg2g6Xjp.js +192 -0
  533. package/dist/node-commands-B6W6Eo0b.js +11 -0
  534. package/dist/node-require-BgDD9bTi.js +14 -0
  535. package/dist/node-resolve-BunMro3f.js +69 -0
  536. package/dist/node-service-CEZZaqba.js +65 -0
  537. package/dist/node-startup-env-Gz8ZQniA.js +50 -0
  538. package/dist/nodes-cli-B4Jr9vct.js +1330 -0
  539. package/dist/nodes-screen-CQ7IvP62.js +401 -0
  540. package/dist/normalize-secret-input-_PgpexOG.js +32 -0
  541. package/dist/note-dfjacCV8.js +109 -0
  542. package/dist/npm-pack-install-CYNRv-vM.js +574 -0
  543. package/dist/npm-resolution-Ml2aA6Nu.js +60 -0
  544. package/dist/oauth.runtime-DA_48MPQ.js +687 -0
  545. package/dist/oauth.runtime-DS1ry5__.js +318 -0
  546. package/dist/oauth.runtime-qCkidk8J.js +180 -0
  547. package/dist/ollama-defaults-asNuGW4_.js +4 -0
  548. package/dist/onboard-BM6gO6Uw.js +589 -0
  549. package/dist/onboard-D9IU-7uw.js +48 -0
  550. package/dist/onboard-DQaHGPRm.js +25 -0
  551. package/dist/onboard-channels-BdQtLjYb.js +300 -0
  552. package/dist/onboard-channels-DIVUygs5.js +1257 -0
  553. package/dist/onboard-config-DFKb-0sE.js +29 -0
  554. package/dist/onboard-config-DYykzJhx.js +2 -0
  555. package/dist/onboard-custom-CDP4w1AT.js +216 -0
  556. package/dist/onboard-custom-DhJN13UV.js +644 -0
  557. package/dist/onboard-helpers-B7XTd4Pw.js +335 -0
  558. package/dist/onboard-helpers-BUKtx5Bq.js +54 -0
  559. package/dist/onboard-hooks-BHSSLAhI.js +73 -0
  560. package/dist/onboard-remote-BOzEPdHA.js +59 -0
  561. package/dist/onboard-remote-DVza19_k.js +182 -0
  562. package/dist/onboard-search-CrS-n9_3.js +446 -0
  563. package/dist/onboard-skills-BojzIPvk.js +133 -0
  564. package/dist/onboard-skills-D7HyCVjz.js +69 -0
  565. package/dist/openai-codex-provider.runtime-BFsopDHI.js +2 -0
  566. package/dist/openai-defaults-B7FUywsh.js +10 -0
  567. package/dist/openclaw-exec-env-AcZ9we1N.js +14 -0
  568. package/dist/openclaw-root-TUHYdr9B.js +88 -0
  569. package/dist/openclaw-tools.runtime-draZJo5r.js +211 -0
  570. package/dist/outbound-media-69yrWRDt.js +11 -0
  571. package/dist/outbound-runtime-ic_7ulJJ.js +1 -0
  572. package/dist/pairing-challenge-CNrPmmi9.js +48 -0
  573. package/dist/pairing-cli-BohXW2BK.js +150 -0
  574. package/dist/pairing-labels-CNKCSmBK.js +7 -0
  575. package/dist/pairing-message-CBv2njJT.js +4 -0
  576. package/dist/pairing-store-C4lsd4pO.js +590 -0
  577. package/dist/pairing-token-gKj4SNFJ.js +55 -0
  578. package/dist/parse-duration-BBGYkY0S.js +41 -0
  579. package/dist/parse-finite-number-CP4MQF_w.js +30 -0
  580. package/dist/parse-log-line-CVh9zu3Q.js +43 -0
  581. package/dist/parse-port-COyt3COn.js +8 -0
  582. package/dist/path-alias-guards-ZTKqurNH.js +40 -0
  583. package/dist/path-env-CPkz6U0Y.js +87 -0
  584. package/dist/paths-CTjJI9l0.js +179 -0
  585. package/dist/paths-GHJ97ebE.js +268 -0
  586. package/dist/paths-nCHyK08H.js +56 -0
  587. package/dist/perplexity-Beshd9zu.js +422 -0
  588. package/dist/persistent-dedupe-bjKjVI5u.js +116 -0
  589. package/dist/pi-embedded-CSQySvOV.js +168518 -0
  590. package/dist/pi-model-discovery-CuX5CDyZ.js +125 -0
  591. package/dist/pi-model-discovery-runtime-DNsMrX1n.js +44 -0
  592. package/dist/pi-tools.before-tool-call.runtime-DxVqzMVf.js +387 -0
  593. package/dist/platform-launcher-CqGy6UhP.js +83 -0
  594. package/dist/plugin-entry-CwuwM1jC.js +17 -0
  595. package/dist/plugin-install-JJwfOXtg.js +216 -0
  596. package/dist/plugin-install-plan-cixz1_W4.js +49 -0
  597. package/dist/plugin-install-vkpI1UNd.js +184 -0
  598. package/dist/plugin-registry-C3j_DUnj.js +51 -0
  599. package/dist/plugin-registry-DB_yxabS.js +213 -0
  600. package/dist/plugin-sdk/account-helpers.js +3 -0
  601. package/dist/plugin-sdk/account-id.js +2 -0
  602. package/dist/plugin-sdk/account-resolution.js +216 -0
  603. package/dist/plugin-sdk/acp-runtime.js +46 -0
  604. package/dist/plugin-sdk/agent-runtime.js +215 -0
  605. package/dist/plugin-sdk/allow-from.js +17 -0
  606. package/dist/plugin-sdk/allowlist-config-edit.js +2 -0
  607. package/dist/plugin-sdk/bluebubbles.js +232 -0
  608. package/dist/plugin-sdk/boolean-param.js +2 -0
  609. package/dist/plugin-sdk/channel-actions.js +16 -0
  610. package/dist/plugin-sdk/channel-config-helpers.js +15 -0
  611. package/dist/plugin-sdk/channel-config-schema.js +5 -0
  612. package/dist/plugin-sdk/channel-contract.js +1 -0
  613. package/dist/plugin-sdk/channel-feedback.js +4 -0
  614. package/dist/plugin-sdk/channel-inbound.js +53 -0
  615. package/dist/plugin-sdk/channel-lifecycle.js +2 -0
  616. package/dist/plugin-sdk/channel-pairing.js +2 -0
  617. package/dist/plugin-sdk/channel-policy.js +19 -0
  618. package/dist/plugin-sdk/channel-reply-pipeline.js +23 -0
  619. package/dist/plugin-sdk/channel-runtime.js +33 -0
  620. package/dist/plugin-sdk/channel-send-result.js +2 -0
  621. package/dist/plugin-sdk/channel-setup.js +24 -0
  622. package/dist/plugin-sdk/channel-targets.js +3 -0
  623. package/dist/plugin-sdk/cli-runtime.js +5 -0
  624. package/dist/plugin-sdk/command-auth.js +212 -0
  625. package/dist/plugin-sdk/compat.js +59 -0
  626. package/dist/plugin-sdk/config-runtime.js +51 -0
  627. package/dist/plugin-sdk/conversation-runtime.js +55 -0
  628. package/dist/plugin-sdk/core.js +40 -0
  629. package/dist/plugin-sdk/device-bootstrap.js +6 -0
  630. package/dist/plugin-sdk/diagnostics-otel.js +7 -0
  631. package/dist/plugin-sdk/diffs.js +3 -0
  632. package/dist/plugin-sdk/directory-runtime.js +5 -0
  633. package/dist/plugin-sdk/discord-core.js +26 -0
  634. package/dist/plugin-sdk/discord.js +219 -0
  635. package/dist/plugin-sdk/extension-shared.js +15 -0
  636. package/dist/plugin-sdk/feishu.js +101 -0
  637. package/dist/plugin-sdk/gateway-runtime.js +46 -0
  638. package/dist/plugin-sdk/googlechat.js +93 -0
  639. package/dist/plugin-sdk/group-access.js +2 -0
  640. package/dist/plugin-sdk/hook-runtime.js +12 -0
  641. package/dist/plugin-sdk/image-generation.js +51 -0
  642. package/dist/plugin-sdk/imessage-core.js +214 -0
  643. package/dist/plugin-sdk/imessage.js +223 -0
  644. package/dist/plugin-sdk/index.js +55 -0
  645. package/dist/plugin-sdk/infra-runtime.js +223 -0
  646. package/dist/plugin-sdk/interactive-runtime.js +3 -0
  647. package/dist/plugin-sdk/irc.js +232 -0
  648. package/dist/plugin-sdk/json-store.js +9 -0
  649. package/dist/plugin-sdk/keyed-async-queue.js +2 -0
  650. package/dist/plugin-sdk/lazy-runtime.js +2 -0
  651. package/dist/plugin-sdk/line-core.js +29 -0
  652. package/dist/plugin-sdk/line.js +22 -0
  653. package/dist/plugin-sdk/llm-task.js +7 -0
  654. package/dist/plugin-sdk/matrix-runtime-heavy.js +223 -0
  655. package/dist/plugin-sdk/matrix-runtime-shared.js +2 -0
  656. package/dist/plugin-sdk/matrix.js +84 -0
  657. package/dist/plugin-sdk/mattermost.js +233 -0
  658. package/dist/plugin-sdk/media-runtime.js +212 -0
  659. package/dist/plugin-sdk/media-understanding-runtime.js +211 -0
  660. package/dist/plugin-sdk/media-understanding.js +15 -0
  661. package/dist/plugin-sdk/memory-core.js +2 -0
  662. package/dist/plugin-sdk/memory-lancedb.js +2 -0
  663. package/dist/plugin-sdk/msteams.js +244 -0
  664. package/dist/plugin-sdk/nextcloud-talk.js +231 -0
  665. package/dist/plugin-sdk/nostr.js +50 -0
  666. package/dist/plugin-sdk/ollama-setup.js +33 -0
  667. package/dist/plugin-sdk/outbound-runtime.js +23 -0
  668. package/dist/plugin-sdk/plugin-entry.js +3 -0
  669. package/dist/plugin-sdk/plugin-runtime.js +211 -0
  670. package/dist/plugin-sdk/process-runtime.js +12 -0
  671. package/dist/plugin-sdk/provider-auth-api-key.js +53 -0
  672. package/dist/plugin-sdk/provider-auth-login.js +2 -0
  673. package/dist/plugin-sdk/provider-auth.js +37 -0
  674. package/dist/plugin-sdk/provider-catalog.js +2 -0
  675. package/dist/plugin-sdk/provider-env-vars.js +2 -0
  676. package/dist/plugin-sdk/provider-google.js +3 -0
  677. package/dist/plugin-sdk/provider-models.js +27 -0
  678. package/dist/plugin-sdk/provider-onboard.js +20 -0
  679. package/dist/plugin-sdk/provider-setup.js +58 -0
  680. package/dist/plugin-sdk/provider-stream.js +211 -0
  681. package/dist/plugin-sdk/provider-usage.js +18 -0
  682. package/dist/plugin-sdk/provider-web-search.js +23 -0
  683. package/dist/plugin-sdk/provider-zai-endpoint.js +3 -0
  684. package/dist/plugin-sdk/reply-history.js +23 -0
  685. package/dist/plugin-sdk/reply-payload.js +2 -0
  686. package/dist/plugin-sdk/reply-runtime.js +211 -0
  687. package/dist/plugin-sdk/request-url.js +2 -0
  688. package/dist/plugin-sdk/routing.js +25 -0
  689. package/dist/plugin-sdk/runtime-env.js +15 -0
  690. package/dist/plugin-sdk/runtime-store.js +2 -0
  691. package/dist/plugin-sdk/runtime.js +15 -0
  692. package/dist/plugin-sdk/sandbox.js +66 -0
  693. package/dist/plugin-sdk/secret-input.js +3 -0
  694. package/dist/plugin-sdk/security-runtime.js +18 -0
  695. package/dist/plugin-sdk/self-hosted-provider-setup.js +33 -0
  696. package/dist/plugin-sdk/setup-adapter-runtime.js +2 -0
  697. package/dist/plugin-sdk/setup-runtime.js +17 -0
  698. package/dist/plugin-sdk/setup-tools.js +21 -0
  699. package/dist/plugin-sdk/setup.js +26 -0
  700. package/dist/plugin-sdk/signal.js +220 -0
  701. package/dist/plugin-sdk/slack-core.js +22 -0
  702. package/dist/plugin-sdk/slack.js +223 -0
  703. package/dist/plugin-sdk/speech-runtime.js +213 -0
  704. package/dist/plugin-sdk/speech.js +212 -0
  705. package/dist/plugin-sdk/ssrf-runtime.js +5 -0
  706. package/dist/plugin-sdk/state-paths.js +3 -0
  707. package/dist/plugin-sdk/status-helpers.js +9 -0
  708. package/dist/plugin-sdk/telegram-core.js +23 -0
  709. package/dist/plugin-sdk/telegram.js +224 -0
  710. package/dist/plugin-sdk/testing.js +13174 -0
  711. package/dist/plugin-sdk/text-runtime.js +45 -0
  712. package/dist/plugin-sdk/thread-bindings-runtime.js +2 -0
  713. package/dist/plugin-sdk/thread-ownership.js +2 -0
  714. package/dist/plugin-sdk/tlon.js +57 -0
  715. package/dist/plugin-sdk/tool-send.js +2 -0
  716. package/dist/plugin-sdk/twitch.js +46 -0
  717. package/dist/plugin-sdk/voice-call.js +213 -0
  718. package/dist/plugin-sdk/web-media.js +28 -0
  719. package/dist/plugin-sdk/webhook-ingress.js +7 -0
  720. package/dist/plugin-sdk/webhook-path.js +2 -0
  721. package/dist/plugin-sdk/whatsapp-core.js +219 -0
  722. package/dist/plugin-sdk/whatsapp-shared.js +18 -0
  723. package/dist/plugin-sdk/windows-spawn.js +2 -0
  724. package/dist/plugin-sdk/zalo.js +239 -0
  725. package/dist/plugin-sdk/zalouser.js +240 -0
  726. package/dist/plugins/build-smoke-entry.js +211 -0
  727. package/dist/plugins/runtime/index.js +229 -0
  728. package/dist/plugins-1Z50ecJ6.js +1 -0
  729. package/dist/plugins-C6fKmNuA.js +7 -0
  730. package/dist/plugins-cli-BkgQkGaU.js +1192 -0
  731. package/dist/policy-CpkbSAfm.js +60 -0
  732. package/dist/polls-B2VH7SN9.js +35 -0
  733. package/dist/ports-BjWuIIQw.js +262 -0
  734. package/dist/ports-DFiK_Jc-.js +385 -0
  735. package/dist/ports-lsof-DtJqhFOr.js +25 -0
  736. package/dist/ports-probe-BQqp8l8E.js +14 -0
  737. package/dist/preflight-audio.runtime-Fi9mofpp.js +216 -0
  738. package/dist/probe-BM9sbCgS.js +20 -0
  739. package/dist/probe-DLBOZftS.js +134 -0
  740. package/dist/probe-auth-Bjp3G4CI.js +48 -0
  741. package/dist/probe-auth-DMSPTRRk.js +45 -0
  742. package/dist/process-runtime-C7el-Ri4.js +1 -0
  743. package/dist/process-scoped-map-C4gOa-gv.js +61 -0
  744. package/dist/profile-utils-BcMYGFPT.js +15 -0
  745. package/dist/profiles-D17eMKQZ.js +683 -0
  746. package/dist/program-Ch-76sgl.js +155 -0
  747. package/dist/program-context-BMWNUfqL.js +10 -0
  748. package/dist/program-context-CD_RvRYh.js +2 -0
  749. package/dist/progress-D1r9bZU1.js +132 -0
  750. package/dist/prompt-select-styled-NUKYS9QR.js +4879 -0
  751. package/dist/prompt-style-BvciNCqy.js +7 -0
  752. package/dist/prompts-NtuylUyl.js +9 -0
  753. package/dist/prototype-keys-Cm_8mWvq.js +11 -0
  754. package/dist/provider-api-key-auth-BE0taXiB.js +108 -0
  755. package/dist/provider-api-key-auth.runtime-jDZZUAMX.js +34 -0
  756. package/dist/provider-auth-Bw8x1a3o.js +58 -0
  757. package/dist/provider-auth-api-key-BrQYvdxi.js +1 -0
  758. package/dist/provider-auth-choice-BYbPq0eC.js +128 -0
  759. package/dist/provider-auth-choice-helpers-Bj1GkOSn.js +48 -0
  760. package/dist/provider-auth-choice-preference-tKq5gaJL.js +192 -0
  761. package/dist/provider-auth-choice.runtime-DegPpvRJ.js +223 -0
  762. package/dist/provider-auth-choices-QSilukI1.js +58 -0
  763. package/dist/provider-auth-guidance-gninjjq8.js +34 -0
  764. package/dist/provider-auth-helpers-B0dS-1WK.js +86 -0
  765. package/dist/provider-auth-input-BftBdgvW.js +112 -0
  766. package/dist/provider-auth-login-D0n0lMuc.js +8 -0
  767. package/dist/provider-auth-login.runtime-LvuBkQrc.js +243 -0
  768. package/dist/provider-auth-mode-sTdccIKL.js +20 -0
  769. package/dist/provider-auth-ref-BS3gwrNr.js +168 -0
  770. package/dist/provider-auth-ref-BmEcEN7K.js +3 -0
  771. package/dist/provider-catalog--18-pW5t.js +11 -0
  772. package/dist/provider-catalog-2P2hel74.js +48 -0
  773. package/dist/provider-catalog-B0FqWSwe.js +48 -0
  774. package/dist/provider-catalog-BvORKzzD.js +91 -0
  775. package/dist/provider-catalog-C34j1_or.js +26 -0
  776. package/dist/provider-catalog-C5vmXjmb.js +11 -0
  777. package/dist/provider-catalog-CBufm2Dr.js +36 -0
  778. package/dist/provider-catalog-D7QvsUXS.js +12 -0
  779. package/dist/provider-catalog-DKy_dzQZ.js +41 -0
  780. package/dist/provider-env-vars-CsQlY7bF.js +110 -0
  781. package/dist/provider-id-BpXo5t6v.js +31 -0
  782. package/dist/provider-model-allowlist-4HSOnlX-.js +24 -0
  783. package/dist/provider-model-primary-NJ-xlhec.js +53 -0
  784. package/dist/provider-models-C2EjYMwW.js +2416 -0
  785. package/dist/provider-oauth-flow-BQN6F6EC.js +33 -0
  786. package/dist/provider-ollama-setup-DhQvDwAj.js +309 -0
  787. package/dist/provider-onboard-CjOfyeQG.js +1 -0
  788. package/dist/provider-onboarding-config-DOZ3pFA6.js +165 -0
  789. package/dist/provider-openai-codex-oauth-tls-Bo8U4D3E.js +101 -0
  790. package/dist/provider-runtime.runtime-DnP2jpoM.js +211 -0
  791. package/dist/provider-self-hosted-setup-CUrmsugW.js +182 -0
  792. package/dist/provider-usage-ClDVmkhl.js +633 -0
  793. package/dist/provider-usage-DIC6cn-3.js +211 -0
  794. package/dist/provider-web-search-NzK8ep1E.js +507 -0
  795. package/dist/provider-wizard-C6jCuyQe.js +236 -0
  796. package/dist/provider-zai-endpoint-DeDABzT4.js +106 -0
  797. package/dist/proxy-H5O2p6AP.js +121 -0
  798. package/dist/proxy-env-DG2u55RW.js +40 -0
  799. package/dist/push-apns-D4zD2tmP.js +1050 -0
  800. package/dist/pw-ai-BuPUVeUK.js +1876 -0
  801. package/dist/qmd-manager-BpygGMW9.js +1571 -0
  802. package/dist/qr-cli-DnWHXcxh.js +370 -0
  803. package/dist/qr-cli-yaZ0FZ6z.js +213 -0
  804. package/dist/query-expansion-Do45hILP.js +1114 -0
  805. package/dist/reactions-BcC_XZqD.js +281 -0
  806. package/dist/read-only-account-inspect-DPJzadPo.js +42 -0
  807. package/dist/read-only-account-inspect.discord.runtime-CW9DDKH8.js +216 -0
  808. package/dist/read-only-account-inspect.slack.runtime-BcXBPyh3.js +216 -0
  809. package/dist/read-only-account-inspect.telegram.runtime-Y7h0Jbdj.js +216 -0
  810. package/dist/redact-BDinS1q9.js +102 -0
  811. package/dist/redact-identifier-FUiWQxv5.js +13 -0
  812. package/dist/redact-snapshot-DBPmeYy2.js +2654 -0
  813. package/dist/ref-contract-CCBBbf1r.js +53 -0
  814. package/dist/register-CppP7Ddc.js +43 -0
  815. package/dist/register.agent-BOD5ROGQ.js +546 -0
  816. package/dist/register.backup-Y2VGqcRu.js +269 -0
  817. package/dist/register.configure-1qiTINph.js +354 -0
  818. package/dist/register.maintenance-shn-zigv.js +694 -0
  819. package/dist/register.message-mR4CLSoo.js +812 -0
  820. package/dist/register.onboard-CkDryVid.js +298 -0
  821. package/dist/register.setup-B0xW5olD.js +318 -0
  822. package/dist/register.status-health-sessions-CuhWc03j.js +604 -0
  823. package/dist/register.subclis-BazXM5TW.js +315 -0
  824. package/dist/register.subclis-C2d8UDhH.js +13 -0
  825. package/dist/registry-C3q59Qj0.js +55 -0
  826. package/dist/registry-CPsHw6xU.js +219 -0
  827. package/dist/registry-CxgtJ09C.js +28 -0
  828. package/dist/registry-rgYi7KoO.js +160 -0
  829. package/dist/repair-qXnOAvDy.js +105 -0
  830. package/dist/replies-EiwmmZ_W.js +122 -0
  831. package/dist/reply-history-CVCD5oE9.js +1 -0
  832. package/dist/reply-payload-DBGc074f.js +232 -0
  833. package/dist/report-cli-DB1jQx32.js +42 -0
  834. package/dist/request-url-BKfWAQx8.js +10 -0
  835. package/dist/resolve-Ckjd8TAk.js +14 -0
  836. package/dist/resolve-T2q_0ARF.js +619 -0
  837. package/dist/resolve-route-vEY3ONZ2.js +466 -0
  838. package/dist/resolve-utils-CbqJY2bs.js +102 -0
  839. package/dist/response-generator-VdoCcQ3y.js +153 -0
  840. package/dist/restart-stale-pids-CLGiqU2E.js +187 -0
  841. package/dist/retry-D15TD1S3.js +168 -0
  842. package/dist/root-help-B9Aou4ho.js +32 -0
  843. package/dist/routes-TpLEcKO8.js +7084 -0
  844. package/dist/routing-Y3m0o-kB.js +26 -0
  845. package/dist/rpc-C6MN-nVc.js +67 -0
  846. package/dist/run-command-DRKv5Lj6.js +32 -0
  847. package/dist/run-main-YZSMdx0B.js +424 -0
  848. package/dist/run-with-concurrency-BrSjWzpg.js +41 -0
  849. package/dist/runtime-B66W9flm.js +43 -0
  850. package/dist/runtime-C9VaVKYZ.js +2338 -0
  851. package/dist/runtime-CT2LIJZu.js +91 -0
  852. package/dist/runtime-CqDQ81eY.js +143 -0
  853. package/dist/runtime-CuvWMN7E.js +89 -0
  854. package/dist/runtime-D4_OpzA1.js +5 -0
  855. package/dist/runtime-DP-4DZja.js +5 -0
  856. package/dist/runtime-Dl17x_cV.js +1 -0
  857. package/dist/runtime-Z35JoYPC.js +30 -0
  858. package/dist/runtime-api-D79M0lQN.js +1 -0
  859. package/dist/runtime-api-y3zfnQGK.js +39 -0
  860. package/dist/runtime-discord-ops.runtime-Bg5h5v9-.js +234 -0
  861. package/dist/runtime-env-a_iwdJIv.js +1 -0
  862. package/dist/runtime-forwarders-DtMc8rBP.js +44 -0
  863. package/dist/runtime-group-policy-B7irU4eu.js +59 -0
  864. package/dist/runtime-guard-y62lPDGY.js +58 -0
  865. package/dist/runtime-parse-CeqXmZHJ.js +84 -0
  866. package/dist/runtime-paths-CstaCCMi.js +334 -0
  867. package/dist/runtime-slack-ops.runtime-BumgKDhS.js +226 -0
  868. package/dist/runtime-status-CgL02wYX.js +15 -0
  869. package/dist/runtime-store-Bt3Sdbrn.js +22 -0
  870. package/dist/runtime-telegram-ops.runtime-rSLQ3KrE.js +233 -0
  871. package/dist/runtime-whatsapp-boundary-xZem0NyQ.js +364 -0
  872. package/dist/safe-open-sync-Bt9R1Mnf.js +83 -0
  873. package/dist/safe-regex-tLlDZYfM.js +244 -0
  874. package/dist/safe-text-B_CQuica.js +16 -0
  875. package/dist/sandbox-CUUouiKs.js +2795 -0
  876. package/dist/sandbox-cli-BN8y0Get.js +499 -0
  877. package/dist/sandbox-paths-fqp_TZdO.js +144 -0
  878. package/dist/sandbox-qSs4h3sk.js +1 -0
  879. package/dist/sanitize-env-vars-vNSNqm0y.js +74 -0
  880. package/dist/scan-paths-BJmvUZ1E.js +28 -0
  881. package/dist/search-manager-DWhFgwyp.js +17 -0
  882. package/dist/search-manager-r8Cw4ZRv.js +392 -0
  883. package/dist/secret-equal-ObQfyZGa.js +9 -0
  884. package/dist/secret-file-Ch0yuOXR.js +11 -0
  885. package/dist/secret-file-DYJtH6kf.js +92 -0
  886. package/dist/secret-input-4REZ4sHo.js +35 -0
  887. package/dist/secrets-cli-D1df8b0o.js +2304 -0
  888. package/dist/secure-random-Cs8tw_HQ.js +10 -0
  889. package/dist/security-cli-V66ESmdT.js +676 -0
  890. package/dist/security-runtime-BuEhpJVE.js +23 -0
  891. package/dist/send-3tabvle6.js +100 -0
  892. package/dist/send-CC5J3tyW.js +1026 -0
  893. package/dist/send-deps-CrFMNvqO.js +19 -0
  894. package/dist/send-i2-mdtiE.js +250 -0
  895. package/dist/server-BTOjmlyi.js +116 -0
  896. package/dist/server-middleware-CCqKhKUb.js +106 -0
  897. package/dist/server-node-events-D6y22Tt8.js +611 -0
  898. package/dist/server-startup-matrix-migration-DHWSoS73.js +1595 -0
  899. package/dist/service-Bxc9uL2e.js +774 -0
  900. package/dist/service-CBLajPZL.js +21 -0
  901. package/dist/session-cost-usage-BmbaBvk4.js +212 -0
  902. package/dist/session-cost-usage-C30Jl2SI.js +615 -0
  903. package/dist/session-fork.runtime-BZfcC1Nc.js +51 -0
  904. package/dist/session-key-gFFk3uv9.js +216 -0
  905. package/dist/session-write-lock-DNKvpjKf.js +324 -0
  906. package/dist/sessions-BIH_j_XS.js +222 -0
  907. package/dist/sessions-D5dWcxC_.js +212 -0
  908. package/dist/sessions-DaSBVNwD.js +669 -0
  909. package/dist/setup-C2XF1YH3.js +397 -0
  910. package/dist/setup-CN-teRpz.js +8 -0
  911. package/dist/setup-adapter-runtime-Bjv2adwG.js +1 -0
  912. package/dist/setup-binary-BOJA7zdN.js +30 -0
  913. package/dist/setup-browser-BhNPCUtK.js +71 -0
  914. package/dist/setup-core-BsG09DZH.js +149 -0
  915. package/dist/setup-core-D-O1GQax.js +162 -0
  916. package/dist/setup-core-Dtm54Rcq.js +510 -0
  917. package/dist/setup-entry-B1mTa7bU.js +10 -0
  918. package/dist/setup-entry-CTMgw-K5.js +13 -0
  919. package/dist/setup-entry-Cmd_cufO.js +13 -0
  920. package/dist/setup-entry-CybgA3zP.js +12 -0
  921. package/dist/setup-entry-DED_hL6i.js +12 -0
  922. package/dist/setup-entry-WCq9VMWx.js +14 -0
  923. package/dist/setup-group-access-BtPApRvE.js +70 -0
  924. package/dist/setup-helpers-B62Ecg9r.js +362 -0
  925. package/dist/setup-surface-B7A7qowY.js +452 -0
  926. package/dist/setup-surface-BBYJVRXc.js +380 -0
  927. package/dist/setup-surface-CFUz_BJi.js +298 -0
  928. package/dist/setup-tools-BPiMjAN7.js +1 -0
  929. package/dist/setup-wizard-helpers-COZ1UAdX.js +770 -0
  930. package/dist/setup-wizard-proxy-Slwi-1gX.js +116 -0
  931. package/dist/setup.finalize-B8O01nge.js +633 -0
  932. package/dist/setup.gateway-config-BPDIFk__.js +288 -0
  933. package/dist/setup.secret-input-BL-bqJpt.js +25 -0
  934. package/dist/shared-AygSbeCK.js +50 -0
  935. package/dist/shared-BHqDLkMG.js +127 -0
  936. package/dist/shared-BPtG8PgB.js +70 -0
  937. package/dist/shared-BU0QgVMZ.js +36 -0
  938. package/dist/shared-Bzr2UyEm.js +351 -0
  939. package/dist/shared-C_XXbGIF.js +87 -0
  940. package/dist/shared-Diw3KzwZ.js +82 -0
  941. package/dist/shared-DngjQumT.js +196 -0
  942. package/dist/shared-DzH3zmAy.js +64 -0
  943. package/dist/shared-LeP8iUTz.js +54 -0
  944. package/dist/shell-argv-DWV43Vya.js +72 -0
  945. package/dist/shell-env-cD92jEyV.js +181 -0
  946. package/dist/signal-BQd9f9dF.js +315 -0
  947. package/dist/signal-Ca7y47bM.js +46 -0
  948. package/dist/signal-Did9U_fa.js +214 -0
  949. package/dist/signal-cli-install-DxoL8CgF.js +188 -0
  950. package/dist/skill-commands-CiSwTFBQ.js +652 -0
  951. package/dist/skill-commands.runtime-CEwlWT4j.js +34 -0
  952. package/dist/skill-scanner-DG7MT7pu.js +354 -0
  953. package/dist/skills-BC8GJ9Rp.js +22 -0
  954. package/dist/skills-CCgKs_NJ.js +863 -0
  955. package/dist/skills-cli-dhYXJCuL.js +339 -0
  956. package/dist/skills-install-DiriUXJd.js +763 -0
  957. package/dist/skills-status-BmQTn4jL.js +23 -0
  958. package/dist/skills-status-a9b899Y3.js +169 -0
  959. package/dist/slack-CXgv7nu7.js +730 -0
  960. package/dist/slack-CcSByPzI.js +217 -0
  961. package/dist/slack-CtcCh0Lj.js +24537 -0
  962. package/dist/slack-core-DcsbATUs.js +1 -0
  963. package/dist/slash-commands.runtime-kO8EUKYW.js +228 -0
  964. package/dist/slash-dispatch.runtime-Bu2yMeFy.js +238 -0
  965. package/dist/slash-skill-commands.runtime-wwX3tF84.js +216 -0
  966. package/dist/speech-bSreRuDH.js +1 -0
  967. package/dist/speech-runtime-y1FcnGVA.js +1 -0
  968. package/dist/src-CmXHIz5f.js +846 -0
  969. package/dist/ssh-config-ChqR6ijV.js +77 -0
  970. package/dist/ssh-tunnel-Cz51VBAt.js +159 -0
  971. package/dist/ssh-tunnel-DWze2IQS.js +16 -0
  972. package/dist/ssrf-Dk9XaoKN.js +220 -0
  973. package/dist/ssrf-policy-Dk6oMa20.js +69 -0
  974. package/dist/ssrf-runtime-C-mAQLVA.js +1 -0
  975. package/dist/stagger-DU7FjHYo.js +54 -0
  976. package/dist/state-paths-DJIGEFq_.js +1 -0
  977. package/dist/status-69r8-Zey.js +75 -0
  978. package/dist/status-BdLTvZOL.js +44 -0
  979. package/dist/status-Bt7DQmRI.js +1665 -0
  980. package/dist/status-CoUFSBgt.js +202 -0
  981. package/dist/status-DbI3Kbh5.js +235 -0
  982. package/dist/status-DeKlzu_o.js +212 -0
  983. package/dist/status-Haie42Fc.js +606 -0
  984. package/dist/status-helpers-Cda-rGLX.js +101 -0
  985. package/dist/status-json-DS1M_MWJ.js +322 -0
  986. package/dist/status.link-channel-Cb8bZ_Od.js +40 -0
  987. package/dist/status.scan.deps.runtime-7_6VUs50.js +77 -0
  988. package/dist/status.scan.runtime-DtR8BIE9.js +14 -0
  989. package/dist/status.summary-l_Bi1buR.js +600 -0
  990. package/dist/status.summary.runtime-Cng6MzRU.js +151 -0
  991. package/dist/status.update-DtbnnPKx.js +79 -0
  992. package/dist/store-CvL8MPei.js +1446 -0
  993. package/dist/store.runtime-hgnvmZgO.js +43 -0
  994. package/dist/string-normalization-CvzuCAZv.js +19 -0
  995. package/dist/string-sample-BOLqzr4Y.js +11 -0
  996. package/dist/subagent-orphan-recovery-si1z2iBu.js +407 -0
  997. package/dist/subagent-registry-runtime-CXUDI8gL.js +211 -0
  998. package/dist/subcli-descriptors-CY_nHzpZ.js +151 -0
  999. package/dist/subsystem-CUp-6QQf.js +421 -0
  1000. package/dist/synology-chat-CdejNfs0.js +12 -0
  1001. package/dist/system-cli-DkOaXHkQ.js +99 -0
  1002. package/dist/system-events-mAu6Ap6K.js +75 -0
  1003. package/dist/system-message-DA9eUYzB.js +16 -0
  1004. package/dist/system-run-command-Cxq2F1MB.js +258 -0
  1005. package/dist/systemd-CrxZBFae.js +557 -0
  1006. package/dist/systemd-hints-y-zJ9aTm.js +315 -0
  1007. package/dist/systemd-linger-BdklDcLg.js +16 -0
  1008. package/dist/systemd-linger-DLrbG9_d.js +68 -0
  1009. package/dist/table-DFMOhmNZ.js +305 -0
  1010. package/dist/tailnet-ofqBrXzu.js +38 -0
  1011. package/dist/tailscale-Cbsx-2HB.js +254 -0
  1012. package/dist/target-errors-ksphhzJg.js +26 -0
  1013. package/dist/target-registry-krAVlXi_.js +1321 -0
  1014. package/dist/telegram/audit.js +2 -0
  1015. package/dist/telegram/token.js +211 -0
  1016. package/dist/telegram-BjDUP22F.js +10910 -0
  1017. package/dist/telegram-DMiNSGAJ.js +575 -0
  1018. package/dist/telegram-Dt11B3JL.js +218 -0
  1019. package/dist/telegram-core-B4Jo-uko.js +1 -0
  1020. package/dist/template-messages-kh7VfgOb.js +214 -0
  1021. package/dist/text-chunking-CUf5WgqG.js +19 -0
  1022. package/dist/text-format-sFXlJfHH.js +8 -0
  1023. package/dist/text-runtime-C_Roi_Je.js +1418 -0
  1024. package/dist/theme-B5HDbQfl.js +2 -0
  1025. package/dist/theme-CdOoMzRk.js +34 -0
  1026. package/dist/thinking-BBD_0HSp.js +68 -0
  1027. package/dist/thinking.shared-CncvRHts.js +246 -0
  1028. package/dist/thread-bindings-messages-Cdo8jSa9.js +229 -0
  1029. package/dist/thread-bindings-policy-DMjOaNyR.js +119 -0
  1030. package/dist/thread-bindings-runtime-Ckwk3Uuz.js +1 -0
  1031. package/dist/threading-helpers-Cq55SUtb.js +14 -0
  1032. package/dist/timeouts-BwR1sGom.js +72 -0
  1033. package/dist/tmp-openclaw-dir-idKIOMmb.js +102 -0
  1034. package/dist/token-Bgv8XEsC.js +50 -0
  1035. package/dist/tool-catalog-BV6FcEWS.js +337 -0
  1036. package/dist/tool-policy-match-CHqTCSdK.js +46 -0
  1037. package/dist/tool-send-9LXKcrda.js +16 -0
  1038. package/dist/topology-cli-BhUXVViF.js +43 -0
  1039. package/dist/transcript-events-B1V6z5ct.js +29 -0
  1040. package/dist/tui-DDJMGCFK.js +3838 -0
  1041. package/dist/tui-cli-ByN-ZH6y.js +237 -0
  1042. package/dist/typebox-D0SHDJST.js +175 -0
  1043. package/dist/types-BCKGVVld.js +83 -0
  1044. package/dist/types-CtpUGsDP.js +30 -0
  1045. package/dist/types.secrets-BWSeXrF4.js +80 -0
  1046. package/dist/types.tools-BBO8HCi6.js +22 -0
  1047. package/dist/typing-DG_YqWJ7.js +224 -0
  1048. package/dist/unhandled-rejections-CDJ8dOVP.js +170 -0
  1049. package/dist/unhandled-rejections-O6cVOz2D.js +4 -0
  1050. package/dist/update-Br8U-txJ.js +1039 -0
  1051. package/dist/update-check-C3TeQaWg.js +464 -0
  1052. package/dist/update-cli-XHfIntD0.js +1625 -0
  1053. package/dist/update-offset-store-36vzzZXw.js +211 -0
  1054. package/dist/upsert-with-lock-Bb96JHpb.js +34 -0
  1055. package/dist/url-userinfo-Db63ng4y.js +14 -0
  1056. package/dist/utils-Bxk6BLTg.js +236 -0
  1057. package/dist/utils-vDeUf98G.js +7 -0
  1058. package/dist/version-DCY9_obP.js +64 -0
  1059. package/dist/version-DRF-wKTV.js +2 -0
  1060. package/dist/voice-call-D4fgwZNO.js +1 -0
  1061. package/dist/warning-filter-CgvLQB4Y.js +56 -0
  1062. package/dist/web-media-BfBb8i48.js +1 -0
  1063. package/dist/web-media-CtU6jM5V.js +498 -0
  1064. package/dist/webhook-ingress-CupqYpKM.js +338 -0
  1065. package/dist/webhook-memory-guards-BHrFZ4yq.js +129 -0
  1066. package/dist/webhook-path-BGFZ55ML.js +22 -0
  1067. package/dist/webhook-shared-Cvk3b0ac.js +349 -0
  1068. package/dist/webhooks-cli-vOAoBF9b.js +357 -0
  1069. package/dist/whatsapp-D5nD0rGG.js +58 -0
  1070. package/dist/whatsapp-DXbWlm3A.js +82 -0
  1071. package/dist/whatsapp-core-C2WGMsaY.js +89451 -0
  1072. package/dist/whatsapp-heartbeat-CSWnPQ7q.js +84 -0
  1073. package/dist/whatsapp-shared-BmHKqTtR.js +95 -0
  1074. package/dist/widearea-dns-CXimgJzu.js +125 -0
  1075. package/dist/windows-argv-IXrdWrJj.js +145 -0
  1076. package/dist/windows-spawn-vMJGZo89.js +154 -0
  1077. package/dist/with-timeout-2AKTISee.js +58 -0
  1078. package/dist/workspace-BH7CXmrr.js +479 -0
  1079. package/dist/workspace-dirs-_O4V3xCR.js +13 -0
  1080. package/dist/workspace-v5XppK5M.js +302 -0
  1081. package/dist/ws-By-QcLjg.js +11 -0
  1082. package/dist/wsl-BV3Cb66X.js +57 -0
  1083. package/dist/zalo-CHQzsLhE.js +301 -0
  1084. package/dist/zalo-CcJ3J9f2.js +13 -0
  1085. package/dist/zod-schema.agent-runtime-T_EC_6fg.js +600 -0
  1086. package/dist/zod-schema.core-BdgRr-F1.js +545 -0
  1087. package/dist/zod-schema.providers-core-Dgq7MTqU.js +1613 -0
  1088. package/docs/.i18n/README.md +31 -0
  1089. package/docs/.i18n/glossary.ja-JP.json +14 -0
  1090. package/docs/.i18n/glossary.zh-CN.json +242 -0
  1091. package/docs/.i18n/ja-JP.tm.jsonl +0 -0
  1092. package/docs/assets/install-script.svg +1 -0
  1093. package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
  1094. package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
  1095. package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
  1096. package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
  1097. package/docs/assets/macos-onboarding/05-permissions.png +0 -0
  1098. package/docs/assets/openclaw-logo-text-dark.png +0 -0
  1099. package/docs/assets/openclaw-logo-text-dark.svg +418 -0
  1100. package/docs/assets/openclaw-logo-text.png +0 -0
  1101. package/docs/assets/openclaw-logo-text.svg +418 -0
  1102. package/docs/assets/pixel-lobster.svg +60 -0
  1103. package/docs/assets/showcase/agents-ui.jpg +0 -0
  1104. package/docs/assets/showcase/bambu-cli.png +0 -0
  1105. package/docs/assets/showcase/codexmonitor.png +0 -0
  1106. package/docs/assets/showcase/gohome-grafana.png +0 -0
  1107. package/docs/assets/showcase/ios-testflight.jpg +0 -0
  1108. package/docs/assets/showcase/oura-health.png +0 -0
  1109. package/docs/assets/showcase/padel-cli.svg +11 -0
  1110. package/docs/assets/showcase/padel-screenshot.jpg +0 -0
  1111. package/docs/assets/showcase/papla-tts.jpg +0 -0
  1112. package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
  1113. package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
  1114. package/docs/assets/showcase/roborock-status.svg +13 -0
  1115. package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
  1116. package/docs/assets/showcase/snag.png +0 -0
  1117. package/docs/assets/showcase/tesco-shop.jpg +0 -0
  1118. package/docs/assets/showcase/wienerlinien.png +0 -0
  1119. package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
  1120. package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
  1121. package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
  1122. package/docs/assets/sponsors/blacksmith.svg +14 -0
  1123. package/docs/assets/sponsors/convex.svg +16 -0
  1124. package/docs/assets/sponsors/openai.svg +3 -0
  1125. package/docs/assets/sponsors/vercel.svg +5 -0
  1126. package/docs/auth-credential-semantics.md +53 -0
  1127. package/docs/automation/auth-monitoring.md +44 -0
  1128. package/docs/automation/cron-jobs.md +727 -0
  1129. package/docs/automation/cron-vs-heartbeat.md +286 -0
  1130. package/docs/automation/gmail-pubsub.md +256 -0
  1131. package/docs/automation/hooks.md +1049 -0
  1132. package/docs/automation/poll.md +86 -0
  1133. package/docs/automation/standing-orders.md +251 -0
  1134. package/docs/automation/troubleshooting.md +122 -0
  1135. package/docs/automation/webhook.md +217 -0
  1136. package/docs/brave-search.md +93 -0
  1137. package/docs/channels/bluebubbles.md +347 -0
  1138. package/docs/channels/broadcast-groups.md +442 -0
  1139. package/docs/channels/channel-routing.md +139 -0
  1140. package/docs/channels/discord.md +1229 -0
  1141. package/docs/channels/feishu.md +747 -0
  1142. package/docs/channels/googlechat.md +261 -0
  1143. package/docs/channels/group-messages.md +84 -0
  1144. package/docs/channels/groups.md +379 -0
  1145. package/docs/channels/imessage.md +367 -0
  1146. package/docs/channels/index.md +47 -0
  1147. package/docs/channels/irc.md +242 -0
  1148. package/docs/channels/line.md +194 -0
  1149. package/docs/channels/location.md +56 -0
  1150. package/docs/channels/matrix.md +677 -0
  1151. package/docs/channels/mattermost.md +427 -0
  1152. package/docs/channels/msteams.md +780 -0
  1153. package/docs/channels/nextcloud-talk.md +138 -0
  1154. package/docs/channels/nostr.md +242 -0
  1155. package/docs/channels/pairing.md +114 -0
  1156. package/docs/channels/signal.md +329 -0
  1157. package/docs/channels/slack.md +603 -0
  1158. package/docs/channels/synology-chat.md +132 -0
  1159. package/docs/channels/telegram.md +987 -0
  1160. package/docs/channels/tlon.md +276 -0
  1161. package/docs/channels/troubleshooting.md +118 -0
  1162. package/docs/channels/twitch.md +379 -0
  1163. package/docs/channels/whatsapp.md +460 -0
  1164. package/docs/channels/zalo.md +243 -0
  1165. package/docs/channels/zalouser.md +181 -0
  1166. package/docs/ci.md +55 -0
  1167. package/docs/cli/acp.md +288 -0
  1168. package/docs/cli/agent.md +29 -0
  1169. package/docs/cli/agents.md +123 -0
  1170. package/docs/cli/approvals.md +50 -0
  1171. package/docs/cli/backup.md +76 -0
  1172. package/docs/cli/browser.md +106 -0
  1173. package/docs/cli/channels.md +102 -0
  1174. package/docs/cli/clawbot.md +21 -0
  1175. package/docs/cli/completion.md +35 -0
  1176. package/docs/cli/config.md +295 -0
  1177. package/docs/cli/configure.md +36 -0
  1178. package/docs/cli/cron.md +77 -0
  1179. package/docs/cli/daemon.md +53 -0
  1180. package/docs/cli/dashboard.md +22 -0
  1181. package/docs/cli/devices.md +139 -0
  1182. package/docs/cli/directory.md +63 -0
  1183. package/docs/cli/dns.md +23 -0
  1184. package/docs/cli/docs.md +15 -0
  1185. package/docs/cli/doctor.md +48 -0
  1186. package/docs/cli/gateway.md +235 -0
  1187. package/docs/cli/health.md +21 -0
  1188. package/docs/cli/hooks.md +318 -0
  1189. package/docs/cli/index.md +1147 -0
  1190. package/docs/cli/logs.md +28 -0
  1191. package/docs/cli/memory.md +66 -0
  1192. package/docs/cli/message.md +278 -0
  1193. package/docs/cli/models.md +81 -0
  1194. package/docs/cli/node.md +127 -0
  1195. package/docs/cli/nodes.md +75 -0
  1196. package/docs/cli/onboard.md +157 -0
  1197. package/docs/cli/pairing.md +32 -0
  1198. package/docs/cli/plugins.md +186 -0
  1199. package/docs/cli/qr.md +46 -0
  1200. package/docs/cli/reset.md +20 -0
  1201. package/docs/cli/sandbox.md +197 -0
  1202. package/docs/cli/secrets.md +188 -0
  1203. package/docs/cli/security.md +79 -0
  1204. package/docs/cli/sessions.md +110 -0
  1205. package/docs/cli/setup.md +29 -0
  1206. package/docs/cli/skills.md +26 -0
  1207. package/docs/cli/status.md +30 -0
  1208. package/docs/cli/system.md +60 -0
  1209. package/docs/cli/tui.md +30 -0
  1210. package/docs/cli/uninstall.md +20 -0
  1211. package/docs/cli/update.md +103 -0
  1212. package/docs/cli/voicecall.md +34 -0
  1213. package/docs/cli/webhooks.md +25 -0
  1214. package/docs/concepts/agent-loop.md +148 -0
  1215. package/docs/concepts/agent-workspace.md +236 -0
  1216. package/docs/concepts/agent.md +122 -0
  1217. package/docs/concepts/architecture.md +137 -0
  1218. package/docs/concepts/compaction.md +123 -0
  1219. package/docs/concepts/context-engine.md +268 -0
  1220. package/docs/concepts/context.md +172 -0
  1221. package/docs/concepts/delegate-architecture.md +296 -0
  1222. package/docs/concepts/features.md +73 -0
  1223. package/docs/concepts/markdown-formatting.md +130 -0
  1224. package/docs/concepts/memory.md +108 -0
  1225. package/docs/concepts/messages.md +154 -0
  1226. package/docs/concepts/model-failover.md +152 -0
  1227. package/docs/concepts/model-providers.md +607 -0
  1228. package/docs/concepts/models.md +225 -0
  1229. package/docs/concepts/multi-agent.md +552 -0
  1230. package/docs/concepts/oauth.md +158 -0
  1231. package/docs/concepts/presence.md +102 -0
  1232. package/docs/concepts/queue.md +89 -0
  1233. package/docs/concepts/retry.md +69 -0
  1234. package/docs/concepts/session-pruning.md +121 -0
  1235. package/docs/concepts/session-tool.md +242 -0
  1236. package/docs/concepts/session.md +310 -0
  1237. package/docs/concepts/streaming.md +155 -0
  1238. package/docs/concepts/system-prompt.md +132 -0
  1239. package/docs/concepts/timezone.md +91 -0
  1240. package/docs/concepts/typebox.md +291 -0
  1241. package/docs/concepts/typing-indicators.md +68 -0
  1242. package/docs/concepts/usage-tracking.md +35 -0
  1243. package/docs/date-time.md +128 -0
  1244. package/docs/debug/node-issue.md +85 -0
  1245. package/docs/diagnostics/flags.md +91 -0
  1246. package/docs/docs.json +2061 -0
  1247. package/docs/gateway/authentication.md +179 -0
  1248. package/docs/gateway/background-process.md +97 -0
  1249. package/docs/gateway/bonjour.md +177 -0
  1250. package/docs/gateway/bridge-protocol.md +91 -0
  1251. package/docs/gateway/cli-backends.md +225 -0
  1252. package/docs/gateway/configuration-examples.md +651 -0
  1253. package/docs/gateway/configuration-reference.md +3123 -0
  1254. package/docs/gateway/configuration.md +633 -0
  1255. package/docs/gateway/discovery.md +123 -0
  1256. package/docs/gateway/doctor.md +362 -0
  1257. package/docs/gateway/gateway-lock.md +34 -0
  1258. package/docs/gateway/health.md +44 -0
  1259. package/docs/gateway/heartbeat.md +393 -0
  1260. package/docs/gateway/index.md +261 -0
  1261. package/docs/gateway/local-models.md +152 -0
  1262. package/docs/gateway/logging.md +113 -0
  1263. package/docs/gateway/multiple-gateways.md +112 -0
  1264. package/docs/gateway/network-model.md +22 -0
  1265. package/docs/gateway/openai-http-api.md +132 -0
  1266. package/docs/gateway/openresponses-http-api.md +295 -0
  1267. package/docs/gateway/openshell.md +307 -0
  1268. package/docs/gateway/pairing.md +99 -0
  1269. package/docs/gateway/protocol.md +267 -0
  1270. package/docs/gateway/remote-gateway-readme.md +158 -0
  1271. package/docs/gateway/remote.md +153 -0
  1272. package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +134 -0
  1273. package/docs/gateway/sandboxing.md +469 -0
  1274. package/docs/gateway/secrets-plan-contract.md +116 -0
  1275. package/docs/gateway/secrets.md +503 -0
  1276. package/docs/gateway/security/index.md +1213 -0
  1277. package/docs/gateway/tailscale.md +132 -0
  1278. package/docs/gateway/tools-invoke-http-api.md +110 -0
  1279. package/docs/gateway/troubleshooting.md +378 -0
  1280. package/docs/gateway/trusted-proxy-auth.md +330 -0
  1281. package/docs/help/debugging.md +168 -0
  1282. package/docs/help/environment.md +163 -0
  1283. package/docs/help/faq.md +2999 -0
  1284. package/docs/help/index.md +28 -0
  1285. package/docs/help/scripts.md +28 -0
  1286. package/docs/help/testing.md +524 -0
  1287. package/docs/help/troubleshooting.md +297 -0
  1288. package/docs/images/configure-model-picker-unsearchable.png +0 -0
  1289. package/docs/images/feishu-step2-create-app.png +0 -0
  1290. package/docs/images/feishu-step3-credentials.png +0 -0
  1291. package/docs/images/feishu-step4-permissions.png +0 -0
  1292. package/docs/images/feishu-step5-bot-capability.png +0 -0
  1293. package/docs/images/feishu-step6-event-subscription.png +0 -0
  1294. package/docs/images/feishu-verification-token.png +0 -0
  1295. package/docs/images/groups-flow.svg +52 -0
  1296. package/docs/images/mobile-ui-screenshot.png +0 -0
  1297. package/docs/index.md +196 -0
  1298. package/docs/install/ansible.md +230 -0
  1299. package/docs/install/azure.md +311 -0
  1300. package/docs/install/bun.md +55 -0
  1301. package/docs/install/development-channels.md +120 -0
  1302. package/docs/install/digitalocean.md +129 -0
  1303. package/docs/install/docker-vm-runtime.md +142 -0
  1304. package/docs/install/docker.md +375 -0
  1305. package/docs/install/exe-dev.md +126 -0
  1306. package/docs/install/fly.md +501 -0
  1307. package/docs/install/gcp.md +402 -0
  1308. package/docs/install/hetzner.md +251 -0
  1309. package/docs/install/index.md +183 -0
  1310. package/docs/install/installer.md +415 -0
  1311. package/docs/install/kubernetes.md +191 -0
  1312. package/docs/install/macos-vm.md +281 -0
  1313. package/docs/install/migrating-matrix.md +346 -0
  1314. package/docs/install/migrating.md +110 -0
  1315. package/docs/install/nix.md +89 -0
  1316. package/docs/install/node.md +138 -0
  1317. package/docs/install/northflank.mdx +54 -0
  1318. package/docs/install/oracle.md +156 -0
  1319. package/docs/install/podman.md +133 -0
  1320. package/docs/install/railway.mdx +100 -0
  1321. package/docs/install/raspberry-pi.md +159 -0
  1322. package/docs/install/render.mdx +169 -0
  1323. package/docs/install/uninstall.md +128 -0
  1324. package/docs/install/updating.md +128 -0
  1325. package/docs/ja-JP/index.md +186 -0
  1326. package/docs/ja-JP/start/getting-started.md +125 -0
  1327. package/docs/ja-JP/start/wizard.md +77 -0
  1328. package/docs/logging.md +352 -0
  1329. package/docs/nav-tabs-underline.js +100 -0
  1330. package/docs/network.md +54 -0
  1331. package/docs/nodes/audio.md +187 -0
  1332. package/docs/nodes/camera.md +162 -0
  1333. package/docs/nodes/images.md +72 -0
  1334. package/docs/nodes/index.md +393 -0
  1335. package/docs/nodes/location-command.md +98 -0
  1336. package/docs/nodes/media-understanding.md +394 -0
  1337. package/docs/nodes/talk.md +92 -0
  1338. package/docs/nodes/troubleshooting.md +114 -0
  1339. package/docs/nodes/voicewake.md +66 -0
  1340. package/docs/perplexity.md +174 -0
  1341. package/docs/pi-dev.md +80 -0
  1342. package/docs/pi.md +567 -0
  1343. package/docs/platforms/android.md +168 -0
  1344. package/docs/platforms/digitalocean.md +266 -0
  1345. package/docs/platforms/index.md +54 -0
  1346. package/docs/platforms/ios.md +220 -0
  1347. package/docs/platforms/linux.md +94 -0
  1348. package/docs/platforms/mac/bundled-gateway.md +73 -0
  1349. package/docs/platforms/mac/canvas.md +125 -0
  1350. package/docs/platforms/mac/child-process.md +69 -0
  1351. package/docs/platforms/mac/dev-setup.md +104 -0
  1352. package/docs/platforms/mac/health.md +34 -0
  1353. package/docs/platforms/mac/icon.md +31 -0
  1354. package/docs/platforms/mac/logging.md +57 -0
  1355. package/docs/platforms/mac/menu-bar.md +81 -0
  1356. package/docs/platforms/mac/peekaboo.md +65 -0
  1357. package/docs/platforms/mac/permissions.md +50 -0
  1358. package/docs/platforms/mac/remote.md +84 -0
  1359. package/docs/platforms/mac/signing.md +47 -0
  1360. package/docs/platforms/mac/skills.md +33 -0
  1361. package/docs/platforms/mac/voice-overlay.md +60 -0
  1362. package/docs/platforms/mac/voicewake.md +67 -0
  1363. package/docs/platforms/mac/webchat.md +43 -0
  1364. package/docs/platforms/mac/xpc.md +61 -0
  1365. package/docs/platforms/macos.md +226 -0
  1366. package/docs/platforms/oracle.md +303 -0
  1367. package/docs/platforms/raspberry-pi.md +412 -0
  1368. package/docs/platforms/windows.md +241 -0
  1369. package/docs/plugins/agent-tools.md +10 -0
  1370. package/docs/plugins/architecture.md +1363 -0
  1371. package/docs/plugins/building-extensions.md +10 -0
  1372. package/docs/plugins/building-plugins.md +376 -0
  1373. package/docs/plugins/bundles.md +181 -0
  1374. package/docs/plugins/community.md +141 -0
  1375. package/docs/plugins/manifest.md +145 -0
  1376. package/docs/plugins/sdk-migration.md +169 -0
  1377. package/docs/plugins/voice-call.md +380 -0
  1378. package/docs/plugins/zalouser.md +77 -0
  1379. package/docs/prose.md +134 -0
  1380. package/docs/providers/anthropic.md +259 -0
  1381. package/docs/providers/bedrock.md +176 -0
  1382. package/docs/providers/claude-max-api-proxy.md +154 -0
  1383. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  1384. package/docs/providers/deepgram.md +93 -0
  1385. package/docs/providers/github-copilot.md +72 -0
  1386. package/docs/providers/glm.md +43 -0
  1387. package/docs/providers/google.md +78 -0
  1388. package/docs/providers/groq.md +96 -0
  1389. package/docs/providers/huggingface.md +209 -0
  1390. package/docs/providers/index.md +69 -0
  1391. package/docs/providers/kilocode.md +74 -0
  1392. package/docs/providers/litellm.md +154 -0
  1393. package/docs/providers/minimax.md +224 -0
  1394. package/docs/providers/mistral.md +54 -0
  1395. package/docs/providers/models.md +45 -0
  1396. package/docs/providers/modelstudio.md +66 -0
  1397. package/docs/providers/moonshot.md +175 -0
  1398. package/docs/providers/nvidia.md +55 -0
  1399. package/docs/providers/ollama.md +352 -0
  1400. package/docs/providers/openai.md +303 -0
  1401. package/docs/providers/opencode-go.md +45 -0
  1402. package/docs/providers/opencode.md +64 -0
  1403. package/docs/providers/openrouter.md +37 -0
  1404. package/docs/providers/perplexity-provider.md +62 -0
  1405. package/docs/providers/qianfan.md +38 -0
  1406. package/docs/providers/qwen.md +53 -0
  1407. package/docs/providers/sglang.md +104 -0
  1408. package/docs/providers/synthetic.md +99 -0
  1409. package/docs/providers/together.md +66 -0
  1410. package/docs/providers/venice.md +282 -0
  1411. package/docs/providers/vercel-ai-gateway.md +60 -0
  1412. package/docs/providers/vllm.md +92 -0
  1413. package/docs/providers/volcengine.md +74 -0
  1414. package/docs/providers/xai.md +60 -0
  1415. package/docs/providers/xiaomi.md +86 -0
  1416. package/docs/providers/zai.md +46 -0
  1417. package/docs/reference/AGENTS.default.md +126 -0
  1418. package/docs/reference/RELEASING.md +42 -0
  1419. package/docs/reference/api-usage-costs.md +144 -0
  1420. package/docs/reference/credits.md +30 -0
  1421. package/docs/reference/device-models.md +47 -0
  1422. package/docs/reference/memory-config.md +711 -0
  1423. package/docs/reference/prompt-caching.md +185 -0
  1424. package/docs/reference/rpc.md +43 -0
  1425. package/docs/reference/secretref-credential-surface.md +140 -0
  1426. package/docs/reference/secretref-user-supplied-credentials-matrix.json +563 -0
  1427. package/docs/reference/session-management-compaction.md +324 -0
  1428. package/docs/reference/templates/AGENTS.dev.md +83 -0
  1429. package/docs/reference/templates/AGENTS.md +219 -0
  1430. package/docs/reference/templates/BOOT.md +11 -0
  1431. package/docs/reference/templates/BOOTSTRAP.md +62 -0
  1432. package/docs/reference/templates/HEARTBEAT.md +14 -0
  1433. package/docs/reference/templates/IDENTITY.dev.md +47 -0
  1434. package/docs/reference/templates/IDENTITY.md +29 -0
  1435. package/docs/reference/templates/SOUL.dev.md +76 -0
  1436. package/docs/reference/templates/SOUL.md +43 -0
  1437. package/docs/reference/templates/TOOLS.dev.md +24 -0
  1438. package/docs/reference/templates/TOOLS.md +47 -0
  1439. package/docs/reference/templates/USER.dev.md +18 -0
  1440. package/docs/reference/templates/USER.md +23 -0
  1441. package/docs/reference/test.md +90 -0
  1442. package/docs/reference/token-use.md +175 -0
  1443. package/docs/reference/transcript-hygiene.md +151 -0
  1444. package/docs/reference/wizard.md +235 -0
  1445. package/docs/security/CONTRIBUTING-THREAT-MODEL.md +98 -0
  1446. package/docs/security/THREAT-MODEL-ATLAS.md +611 -0
  1447. package/docs/security/formal-verification.md +167 -0
  1448. package/docs/start/bootstrapping.md +41 -0
  1449. package/docs/start/docs-directory.md +66 -0
  1450. package/docs/start/getting-started.md +116 -0
  1451. package/docs/start/hubs.md +198 -0
  1452. package/docs/start/lore.md +219 -0
  1453. package/docs/start/onboarding-overview.md +67 -0
  1454. package/docs/start/onboarding.md +91 -0
  1455. package/docs/start/openclaw.md +216 -0
  1456. package/docs/start/quickstart.md +22 -0
  1457. package/docs/start/setup.md +164 -0
  1458. package/docs/start/showcase.md +418 -0
  1459. package/docs/start/wizard-cli-automation.md +215 -0
  1460. package/docs/start/wizard-cli-reference.md +299 -0
  1461. package/docs/start/wizard.md +125 -0
  1462. package/docs/style.css +37 -0
  1463. package/docs/tools/acp-agents.md +623 -0
  1464. package/docs/tools/agent-send.md +100 -0
  1465. package/docs/tools/apply-patch.md +51 -0
  1466. package/docs/tools/brave-search.md +93 -0
  1467. package/docs/tools/browser-linux-troubleshooting.md +138 -0
  1468. package/docs/tools/browser-login.md +73 -0
  1469. package/docs/tools/browser-wsl2-windows-remote-cdp-troubleshooting.md +211 -0
  1470. package/docs/tools/browser.md +731 -0
  1471. package/docs/tools/btw.md +142 -0
  1472. package/docs/tools/capability-cookbook.md +119 -0
  1473. package/docs/tools/clawhub.md +257 -0
  1474. package/docs/tools/creating-skills.md +117 -0
  1475. package/docs/tools/diffs.md +386 -0
  1476. package/docs/tools/elevated.md +114 -0
  1477. package/docs/tools/exec-approvals.md +400 -0
  1478. package/docs/tools/exec.md +204 -0
  1479. package/docs/tools/firecrawl.md +140 -0
  1480. package/docs/tools/index.md +137 -0
  1481. package/docs/tools/llm-task.md +119 -0
  1482. package/docs/tools/lobster.md +340 -0
  1483. package/docs/tools/loop-detection.md +100 -0
  1484. package/docs/tools/multi-agent-sandbox-tools.md +364 -0
  1485. package/docs/tools/pdf.md +156 -0
  1486. package/docs/tools/perplexity-search.md +174 -0
  1487. package/docs/tools/plugin.md +251 -0
  1488. package/docs/tools/reactions.md +64 -0
  1489. package/docs/tools/skills-config.md +86 -0
  1490. package/docs/tools/skills.md +306 -0
  1491. package/docs/tools/slash-commands.md +294 -0
  1492. package/docs/tools/subagents.md +295 -0
  1493. package/docs/tools/tavily.md +125 -0
  1494. package/docs/tools/thinking.md +96 -0
  1495. package/docs/tools/tts.md +406 -0
  1496. package/docs/tools/web.md +516 -0
  1497. package/docs/tts.md +406 -0
  1498. package/docs/vps.md +112 -0
  1499. package/docs/web/control-ui.md +275 -0
  1500. package/docs/web/dashboard.md +54 -0
  1501. package/docs/web/index.md +120 -0
  1502. package/docs/web/tui.md +170 -0
  1503. package/docs/web/webchat.md +61 -0
  1504. package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
  1505. package/docs/whatsapp-openclaw.jpg +0 -0
  1506. package/docs/zh-CN/AGENTS.md +61 -0
  1507. package/docs/zh-CN/automation/auth-monitoring.md +47 -0
  1508. package/docs/zh-CN/automation/cron-jobs.md +435 -0
  1509. package/docs/zh-CN/automation/cron-vs-heartbeat.md +286 -0
  1510. package/docs/zh-CN/automation/gmail-pubsub.md +249 -0
  1511. package/docs/zh-CN/automation/hooks.md +1051 -0
  1512. package/docs/zh-CN/automation/poll.md +76 -0
  1513. package/docs/zh-CN/automation/troubleshooting.md +8 -0
  1514. package/docs/zh-CN/automation/webhook.md +163 -0
  1515. package/docs/zh-CN/brave-search.md +60 -0
  1516. package/docs/zh-CN/channels/bluebubbles.md +354 -0
  1517. package/docs/zh-CN/channels/broadcast-groups.md +449 -0
  1518. package/docs/zh-CN/channels/channel-routing.md +117 -0
  1519. package/docs/zh-CN/channels/discord.md +468 -0
  1520. package/docs/zh-CN/channels/feishu.md +728 -0
  1521. package/docs/zh-CN/channels/googlechat.md +257 -0
  1522. package/docs/zh-CN/channels/grammy.md +38 -0
  1523. package/docs/zh-CN/channels/group-messages.md +91 -0
  1524. package/docs/zh-CN/channels/groups.md +379 -0
  1525. package/docs/zh-CN/channels/imessage.md +302 -0
  1526. package/docs/zh-CN/channels/index.md +53 -0
  1527. package/docs/zh-CN/channels/line.md +180 -0
  1528. package/docs/zh-CN/channels/location.md +63 -0
  1529. package/docs/zh-CN/channels/matrix.md +221 -0
  1530. package/docs/zh-CN/channels/mattermost.md +144 -0
  1531. package/docs/zh-CN/channels/msteams.md +775 -0
  1532. package/docs/zh-CN/channels/nextcloud-talk.md +142 -0
  1533. package/docs/zh-CN/channels/nostr.md +249 -0
  1534. package/docs/zh-CN/channels/pairing.md +89 -0
  1535. package/docs/zh-CN/channels/signal.md +209 -0
  1536. package/docs/zh-CN/channels/slack.md +531 -0
  1537. package/docs/zh-CN/channels/synology-chat.md +138 -0
  1538. package/docs/zh-CN/channels/telegram.md +751 -0
  1539. package/docs/zh-CN/channels/tlon.md +136 -0
  1540. package/docs/zh-CN/channels/troubleshooting.md +36 -0
  1541. package/docs/zh-CN/channels/twitch.md +385 -0
  1542. package/docs/zh-CN/channels/whatsapp.md +411 -0
  1543. package/docs/zh-CN/channels/zalo.md +196 -0
  1544. package/docs/zh-CN/channels/zalouser.md +147 -0
  1545. package/docs/zh-CN/cli/acp.md +173 -0
  1546. package/docs/zh-CN/cli/agent.md +30 -0
  1547. package/docs/zh-CN/cli/agents.md +82 -0
  1548. package/docs/zh-CN/cli/approvals.md +57 -0
  1549. package/docs/zh-CN/cli/browser.md +114 -0
  1550. package/docs/zh-CN/cli/channels.md +86 -0
  1551. package/docs/zh-CN/cli/config.md +57 -0
  1552. package/docs/zh-CN/cli/configure.md +38 -0
  1553. package/docs/zh-CN/cli/cron.md +43 -0
  1554. package/docs/zh-CN/cli/dashboard.md +23 -0
  1555. package/docs/zh-CN/cli/devices.md +74 -0
  1556. package/docs/zh-CN/cli/directory.md +70 -0
  1557. package/docs/zh-CN/cli/dns.md +30 -0
  1558. package/docs/zh-CN/cli/docs.md +22 -0
  1559. package/docs/zh-CN/cli/doctor.md +48 -0
  1560. package/docs/zh-CN/cli/gateway.md +206 -0
  1561. package/docs/zh-CN/cli/health.md +28 -0
  1562. package/docs/zh-CN/cli/hooks.md +298 -0
  1563. package/docs/zh-CN/cli/index.md +1143 -0
  1564. package/docs/zh-CN/cli/logs.md +31 -0
  1565. package/docs/zh-CN/cli/memory.md +52 -0
  1566. package/docs/zh-CN/cli/message.md +246 -0
  1567. package/docs/zh-CN/cli/models.md +85 -0
  1568. package/docs/zh-CN/cli/node.md +115 -0
  1569. package/docs/zh-CN/cli/nodes.md +80 -0
  1570. package/docs/zh-CN/cli/onboard.md +164 -0
  1571. package/docs/zh-CN/cli/pairing.md +28 -0
  1572. package/docs/zh-CN/cli/plugins.md +66 -0
  1573. package/docs/zh-CN/cli/reset.md +24 -0
  1574. package/docs/zh-CN/cli/sandbox.md +158 -0
  1575. package/docs/zh-CN/cli/security.md +33 -0
  1576. package/docs/zh-CN/cli/sessions.md +23 -0
  1577. package/docs/zh-CN/cli/setup.md +36 -0
  1578. package/docs/zh-CN/cli/skills.md +33 -0
  1579. package/docs/zh-CN/cli/status.md +33 -0
  1580. package/docs/zh-CN/cli/system.md +63 -0
  1581. package/docs/zh-CN/cli/tui.md +30 -0
  1582. package/docs/zh-CN/cli/uninstall.md +24 -0
  1583. package/docs/zh-CN/cli/update.md +101 -0
  1584. package/docs/zh-CN/cli/voicecall.md +41 -0
  1585. package/docs/zh-CN/cli/webhooks.md +32 -0
  1586. package/docs/zh-CN/concepts/agent-loop.md +146 -0
  1587. package/docs/zh-CN/concepts/agent-workspace.md +219 -0
  1588. package/docs/zh-CN/concepts/agent.md +115 -0
  1589. package/docs/zh-CN/concepts/architecture.md +123 -0
  1590. package/docs/zh-CN/concepts/compaction.md +67 -0
  1591. package/docs/zh-CN/concepts/context.md +168 -0
  1592. package/docs/zh-CN/concepts/features.md +59 -0
  1593. package/docs/zh-CN/concepts/markdown-formatting.md +117 -0
  1594. package/docs/zh-CN/concepts/memory.md +412 -0
  1595. package/docs/zh-CN/concepts/messages.md +141 -0
  1596. package/docs/zh-CN/concepts/model-failover.md +145 -0
  1597. package/docs/zh-CN/concepts/model-providers.md +606 -0
  1598. package/docs/zh-CN/concepts/models.md +225 -0
  1599. package/docs/zh-CN/concepts/multi-agent.md +372 -0
  1600. package/docs/zh-CN/concepts/oauth.md +164 -0
  1601. package/docs/zh-CN/concepts/presence.md +99 -0
  1602. package/docs/zh-CN/concepts/queue.md +94 -0
  1603. package/docs/zh-CN/concepts/retry.md +76 -0
  1604. package/docs/zh-CN/concepts/session-pruning.md +129 -0
  1605. package/docs/zh-CN/concepts/session-tool.md +200 -0
  1606. package/docs/zh-CN/concepts/session.md +166 -0
  1607. package/docs/zh-CN/concepts/streaming.md +133 -0
  1608. package/docs/zh-CN/concepts/system-prompt.md +101 -0
  1609. package/docs/zh-CN/concepts/timezone.md +96 -0
  1610. package/docs/zh-CN/concepts/typebox.md +284 -0
  1611. package/docs/zh-CN/concepts/typing-indicators.md +74 -0
  1612. package/docs/zh-CN/concepts/usage-tracking.md +42 -0
  1613. package/docs/zh-CN/date-time.md +129 -0
  1614. package/docs/zh-CN/debug/node-issue.md +90 -0
  1615. package/docs/zh-CN/diagnostics/flags.md +98 -0
  1616. package/docs/zh-CN/gateway/authentication.md +184 -0
  1617. package/docs/zh-CN/gateway/background-process.md +100 -0
  1618. package/docs/zh-CN/gateway/bonjour.md +174 -0
  1619. package/docs/zh-CN/gateway/bridge-protocol.md +86 -0
  1620. package/docs/zh-CN/gateway/cli-backends.md +213 -0
  1621. package/docs/zh-CN/gateway/configuration-examples.md +587 -0
  1622. package/docs/zh-CN/gateway/configuration-reference.md +3103 -0
  1623. package/docs/zh-CN/gateway/configuration.md +640 -0
  1624. package/docs/zh-CN/gateway/discovery.md +123 -0
  1625. package/docs/zh-CN/gateway/doctor.md +238 -0
  1626. package/docs/zh-CN/gateway/gateway-lock.md +41 -0
  1627. package/docs/zh-CN/gateway/health.md +42 -0
  1628. package/docs/zh-CN/gateway/heartbeat.md +274 -0
  1629. package/docs/zh-CN/gateway/index.md +335 -0
  1630. package/docs/zh-CN/gateway/local-models.md +159 -0
  1631. package/docs/zh-CN/gateway/logging.md +114 -0
  1632. package/docs/zh-CN/gateway/multiple-gateways.md +119 -0
  1633. package/docs/zh-CN/gateway/network-model.md +23 -0
  1634. package/docs/zh-CN/gateway/openai-http-api.md +125 -0
  1635. package/docs/zh-CN/gateway/openresponses-http-api.md +317 -0
  1636. package/docs/zh-CN/gateway/pairing.md +99 -0
  1637. package/docs/zh-CN/gateway/protocol.md +220 -0
  1638. package/docs/zh-CN/gateway/remote-gateway-readme.md +164 -0
  1639. package/docs/zh-CN/gateway/remote.md +133 -0
  1640. package/docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md +135 -0
  1641. package/docs/zh-CN/gateway/sandboxing.md +188 -0
  1642. package/docs/zh-CN/gateway/security/index.md +777 -0
  1643. package/docs/zh-CN/gateway/tailscale.md +124 -0
  1644. package/docs/zh-CN/gateway/tools-invoke-http-api.md +92 -0
  1645. package/docs/zh-CN/gateway/troubleshooting.md +771 -0
  1646. package/docs/zh-CN/help/debugging.md +160 -0
  1647. package/docs/zh-CN/help/environment.md +88 -0
  1648. package/docs/zh-CN/help/faq.md +2640 -0
  1649. package/docs/zh-CN/help/index.md +28 -0
  1650. package/docs/zh-CN/help/scripts.md +35 -0
  1651. package/docs/zh-CN/help/testing.md +375 -0
  1652. package/docs/zh-CN/help/troubleshooting.md +104 -0
  1653. package/docs/zh-CN/index.md +186 -0
  1654. package/docs/zh-CN/install/ansible.md +215 -0
  1655. package/docs/zh-CN/install/bun.md +65 -0
  1656. package/docs/zh-CN/install/development-channels.md +81 -0
  1657. package/docs/zh-CN/install/docker.md +532 -0
  1658. package/docs/zh-CN/install/exe-dev.md +133 -0
  1659. package/docs/zh-CN/install/fly.md +490 -0
  1660. package/docs/zh-CN/install/gcp.md +510 -0
  1661. package/docs/zh-CN/install/hetzner.md +337 -0
  1662. package/docs/zh-CN/install/index.md +235 -0
  1663. package/docs/zh-CN/install/installer.md +422 -0
  1664. package/docs/zh-CN/install/macos-vm.md +288 -0
  1665. package/docs/zh-CN/install/migrating.md +199 -0
  1666. package/docs/zh-CN/install/nix.md +99 -0
  1667. package/docs/zh-CN/install/node.md +8 -0
  1668. package/docs/zh-CN/install/northflank.mdx +60 -0
  1669. package/docs/zh-CN/install/railway.mdx +106 -0
  1670. package/docs/zh-CN/install/render.mdx +169 -0
  1671. package/docs/zh-CN/install/uninstall.md +135 -0
  1672. package/docs/zh-CN/install/updating.md +233 -0
  1673. package/docs/zh-CN/logging.md +329 -0
  1674. package/docs/zh-CN/network.md +59 -0
  1675. package/docs/zh-CN/nodes/audio.md +120 -0
  1676. package/docs/zh-CN/nodes/camera.md +162 -0
  1677. package/docs/zh-CN/nodes/images.md +79 -0
  1678. package/docs/zh-CN/nodes/index.md +348 -0
  1679. package/docs/zh-CN/nodes/location-command.md +120 -0
  1680. package/docs/zh-CN/nodes/media-understanding.md +380 -0
  1681. package/docs/zh-CN/nodes/talk.md +97 -0
  1682. package/docs/zh-CN/nodes/troubleshooting.md +8 -0
  1683. package/docs/zh-CN/nodes/voicewake.md +72 -0
  1684. package/docs/zh-CN/perplexity.md +102 -0
  1685. package/docs/zh-CN/pi-dev.md +77 -0
  1686. package/docs/zh-CN/pi.md +619 -0
  1687. package/docs/zh-CN/platforms/android.md +155 -0
  1688. package/docs/zh-CN/platforms/digitalocean.md +273 -0
  1689. package/docs/zh-CN/platforms/index.md +60 -0
  1690. package/docs/zh-CN/platforms/ios.md +114 -0
  1691. package/docs/zh-CN/platforms/linux.md +100 -0
  1692. package/docs/zh-CN/platforms/mac/bundled-gateway.md +75 -0
  1693. package/docs/zh-CN/platforms/mac/canvas.md +128 -0
  1694. package/docs/zh-CN/platforms/mac/child-process.md +73 -0
  1695. package/docs/zh-CN/platforms/mac/dev-setup.md +109 -0
  1696. package/docs/zh-CN/platforms/mac/health.md +41 -0
  1697. package/docs/zh-CN/platforms/mac/icon.md +38 -0
  1698. package/docs/zh-CN/platforms/mac/logging.md +64 -0
  1699. package/docs/zh-CN/platforms/mac/menu-bar.md +88 -0
  1700. package/docs/zh-CN/platforms/mac/peekaboo.md +62 -0
  1701. package/docs/zh-CN/platforms/mac/permissions.md +46 -0
  1702. package/docs/zh-CN/platforms/mac/remote.md +90 -0
  1703. package/docs/zh-CN/platforms/mac/signing.md +54 -0
  1704. package/docs/zh-CN/platforms/mac/skills.md +40 -0
  1705. package/docs/zh-CN/platforms/mac/voice-overlay.md +67 -0
  1706. package/docs/zh-CN/platforms/mac/voicewake.md +74 -0
  1707. package/docs/zh-CN/platforms/mac/webchat.md +43 -0
  1708. package/docs/zh-CN/platforms/mac/xpc.md +68 -0
  1709. package/docs/zh-CN/platforms/macos.md +193 -0
  1710. package/docs/zh-CN/platforms/oracle.md +310 -0
  1711. package/docs/zh-CN/platforms/raspberry-pi.md +416 -0
  1712. package/docs/zh-CN/platforms/windows.md +247 -0
  1713. package/docs/zh-CN/plugins/agent-tools.md +99 -0
  1714. package/docs/zh-CN/plugins/manifest.md +68 -0
  1715. package/docs/zh-CN/plugins/voice-call.md +250 -0
  1716. package/docs/zh-CN/plugins/zalouser.md +88 -0
  1717. package/docs/zh-CN/prose.md +141 -0
  1718. package/docs/zh-CN/providers/anthropic.md +265 -0
  1719. package/docs/zh-CN/providers/bedrock.md +170 -0
  1720. package/docs/zh-CN/providers/claude-max-api-proxy.md +155 -0
  1721. package/docs/zh-CN/providers/cloudflare-ai-gateway.md +78 -0
  1722. package/docs/zh-CN/providers/deepgram.md +97 -0
  1723. package/docs/zh-CN/providers/github-copilot.md +67 -0
  1724. package/docs/zh-CN/providers/glm.md +50 -0
  1725. package/docs/zh-CN/providers/huggingface.md +216 -0
  1726. package/docs/zh-CN/providers/index.md +69 -0
  1727. package/docs/zh-CN/providers/kilocode.md +80 -0
  1728. package/docs/zh-CN/providers/litellm.md +160 -0
  1729. package/docs/zh-CN/providers/minimax.md +222 -0
  1730. package/docs/zh-CN/providers/mistral.md +61 -0
  1731. package/docs/zh-CN/providers/models.md +51 -0
  1732. package/docs/zh-CN/providers/moonshot.md +182 -0
  1733. package/docs/zh-CN/providers/nvidia.md +62 -0
  1734. package/docs/zh-CN/providers/ollama.md +359 -0
  1735. package/docs/zh-CN/providers/openai.md +308 -0
  1736. package/docs/zh-CN/providers/opencode-go.md +52 -0
  1737. package/docs/zh-CN/providers/opencode.md +71 -0
  1738. package/docs/zh-CN/providers/openrouter.md +44 -0
  1739. package/docs/zh-CN/providers/qianfan.md +45 -0
  1740. package/docs/zh-CN/providers/qwen.md +55 -0
  1741. package/docs/zh-CN/providers/sglang.md +111 -0
  1742. package/docs/zh-CN/providers/synthetic.md +106 -0
  1743. package/docs/zh-CN/providers/together.md +72 -0
  1744. package/docs/zh-CN/providers/venice.md +289 -0
  1745. package/docs/zh-CN/providers/vercel-ai-gateway.md +66 -0
  1746. package/docs/zh-CN/providers/xiaomi.md +93 -0
  1747. package/docs/zh-CN/providers/zai.md +53 -0
  1748. package/docs/zh-CN/reference/AGENTS.default.md +131 -0
  1749. package/docs/zh-CN/reference/RELEASING.md +48 -0
  1750. package/docs/zh-CN/reference/api-usage-costs.md +141 -0
  1751. package/docs/zh-CN/reference/credits.md +34 -0
  1752. package/docs/zh-CN/reference/device-models.md +54 -0
  1753. package/docs/zh-CN/reference/rpc.md +48 -0
  1754. package/docs/zh-CN/reference/session-management-compaction.md +287 -0
  1755. package/docs/zh-CN/reference/templates/AGENTS.dev.md +89 -0
  1756. package/docs/zh-CN/reference/templates/AGENTS.md +225 -0
  1757. package/docs/zh-CN/reference/templates/BOOT.md +17 -0
  1758. package/docs/zh-CN/reference/templates/BOOTSTRAP.md +68 -0
  1759. package/docs/zh-CN/reference/templates/HEARTBEAT.md +18 -0
  1760. package/docs/zh-CN/reference/templates/IDENTITY.dev.md +54 -0
  1761. package/docs/zh-CN/reference/templates/IDENTITY.md +36 -0
  1762. package/docs/zh-CN/reference/templates/SOUL.dev.md +83 -0
  1763. package/docs/zh-CN/reference/templates/SOUL.md +49 -0
  1764. package/docs/zh-CN/reference/templates/TOOLS.dev.md +31 -0
  1765. package/docs/zh-CN/reference/templates/TOOLS.md +53 -0
  1766. package/docs/zh-CN/reference/templates/USER.dev.md +25 -0
  1767. package/docs/zh-CN/reference/templates/USER.md +30 -0
  1768. package/docs/zh-CN/reference/test.md +57 -0
  1769. package/docs/zh-CN/reference/token-use.md +119 -0
  1770. package/docs/zh-CN/reference/transcript-hygiene.md +109 -0
  1771. package/docs/zh-CN/reference/wizard.md +242 -0
  1772. package/docs/zh-CN/security/formal-verification.md +171 -0
  1773. package/docs/zh-CN/start/bootstrapping.md +9 -0
  1774. package/docs/zh-CN/start/docs-directory.md +70 -0
  1775. package/docs/zh-CN/start/getting-started.md +143 -0
  1776. package/docs/zh-CN/start/hubs.md +194 -0
  1777. package/docs/zh-CN/start/lore.md +226 -0
  1778. package/docs/zh-CN/start/onboarding-overview.md +58 -0
  1779. package/docs/zh-CN/start/onboarding.md +105 -0
  1780. package/docs/zh-CN/start/openclaw.md +248 -0
  1781. package/docs/zh-CN/start/quickstart.md +88 -0
  1782. package/docs/zh-CN/start/setup.md +153 -0
  1783. package/docs/zh-CN/start/showcase.md +423 -0
  1784. package/docs/zh-CN/start/wizard-cli-automation.md +222 -0
  1785. package/docs/zh-CN/start/wizard-cli-reference.md +306 -0
  1786. package/docs/zh-CN/start/wizard.md +132 -0
  1787. package/docs/zh-CN/tools/agent-send.md +59 -0
  1788. package/docs/zh-CN/tools/apply-patch.md +57 -0
  1789. package/docs/zh-CN/tools/browser-linux-troubleshooting.md +144 -0
  1790. package/docs/zh-CN/tools/browser-login.md +75 -0
  1791. package/docs/zh-CN/tools/browser.md +553 -0
  1792. package/docs/zh-CN/tools/chrome-extension.md +183 -0
  1793. package/docs/zh-CN/tools/clawhub.md +209 -0
  1794. package/docs/zh-CN/tools/creating-skills.md +61 -0
  1795. package/docs/zh-CN/tools/elevated.md +64 -0
  1796. package/docs/zh-CN/tools/exec-approvals.md +234 -0
  1797. package/docs/zh-CN/tools/exec.md +169 -0
  1798. package/docs/zh-CN/tools/firecrawl.md +68 -0
  1799. package/docs/zh-CN/tools/index.md +515 -0
  1800. package/docs/zh-CN/tools/llm-task.md +117 -0
  1801. package/docs/zh-CN/tools/lobster.md +349 -0
  1802. package/docs/zh-CN/tools/multi-agent-sandbox-tools.md +401 -0
  1803. package/docs/zh-CN/tools/plugin.md +1612 -0
  1804. package/docs/zh-CN/tools/reactions.md +29 -0
  1805. package/docs/zh-CN/tools/skills-config.md +78 -0
  1806. package/docs/zh-CN/tools/skills.md +279 -0
  1807. package/docs/zh-CN/tools/slash-commands.md +205 -0
  1808. package/docs/zh-CN/tools/subagents.md +167 -0
  1809. package/docs/zh-CN/tools/thinking.md +80 -0
  1810. package/docs/zh-CN/tools/web.md +289 -0
  1811. package/docs/zh-CN/tts.md +375 -0
  1812. package/docs/zh-CN/vps.md +47 -0
  1813. package/docs/zh-CN/web/control-ui.md +191 -0
  1814. package/docs/zh-CN/web/dashboard.md +53 -0
  1815. package/docs/zh-CN/web/index.md +118 -0
  1816. package/docs/zh-CN/web/tui.md +166 -0
  1817. package/docs/zh-CN/web/webchat.md +56 -0
  1818. package/openclaw.mjs +135 -0
  1819. package/package.json +835 -0
  1820. package/skills/1password/SKILL.md +70 -0
  1821. package/skills/1password/references/cli-examples.md +29 -0
  1822. package/skills/1password/references/get-started.md +17 -0
  1823. package/skills/apple-notes/SKILL.md +77 -0
  1824. package/skills/apple-reminders/SKILL.md +118 -0
  1825. package/skills/bear-notes/SKILL.md +107 -0
  1826. package/skills/blogwatcher/SKILL.md +69 -0
  1827. package/skills/blucli/SKILL.md +47 -0
  1828. package/skills/bluebubbles/SKILL.md +131 -0
  1829. package/skills/camsnap/SKILL.md +45 -0
  1830. package/skills/canvas/SKILL.md +198 -0
  1831. package/skills/clawhub/SKILL.md +77 -0
  1832. package/skills/coding-agent/SKILL.md +295 -0
  1833. package/skills/discord/SKILL.md +197 -0
  1834. package/skills/doubao-code/SKILL.md +43 -0
  1835. package/skills/eightctl/SKILL.md +50 -0
  1836. package/skills/gemini/SKILL.md +43 -0
  1837. package/skills/gh-issues/SKILL.md +865 -0
  1838. package/skills/gifgrep/SKILL.md +79 -0
  1839. package/skills/github/SKILL.md +163 -0
  1840. package/skills/gog/SKILL.md +116 -0
  1841. package/skills/goplaces/SKILL.md +52 -0
  1842. package/skills/healthcheck/SKILL.md +245 -0
  1843. package/skills/himalaya/SKILL.md +257 -0
  1844. package/skills/himalaya/references/configuration.md +184 -0
  1845. package/skills/himalaya/references/message-composition.md +199 -0
  1846. package/skills/imsg/SKILL.md +122 -0
  1847. package/skills/kimi-code/SKILL.md +42 -0
  1848. package/skills/mcporter/SKILL.md +61 -0
  1849. package/skills/model-usage/SKILL.md +69 -0
  1850. package/skills/model-usage/references/codexbar-cli.md +33 -0
  1851. package/skills/model-usage/scripts/model_usage.py +320 -0
  1852. package/skills/model-usage/scripts/test_model_usage.py +40 -0
  1853. package/skills/nano-pdf/SKILL.md +38 -0
  1854. package/skills/node-connect/SKILL.md +142 -0
  1855. package/skills/notion/SKILL.md +174 -0
  1856. package/skills/obsidian/SKILL.md +81 -0
  1857. package/skills/openai-image-gen/SKILL.md +92 -0
  1858. package/skills/openai-image-gen/scripts/gen.py +328 -0
  1859. package/skills/openai-image-gen/scripts/test_gen.py +140 -0
  1860. package/skills/openai-whisper/SKILL.md +38 -0
  1861. package/skills/openai-whisper-api/SKILL.md +52 -0
  1862. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  1863. package/skills/openhue/SKILL.md +112 -0
  1864. package/skills/oracle/SKILL.md +125 -0
  1865. package/skills/ordercli/SKILL.md +78 -0
  1866. package/skills/peekaboo/SKILL.md +190 -0
  1867. package/skills/sag/SKILL.md +87 -0
  1868. package/skills/session-logs/SKILL.md +115 -0
  1869. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  1870. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  1871. package/skills/skill-creator/SKILL.md +372 -0
  1872. package/skills/skill-creator/license.txt +202 -0
  1873. package/skills/skill-creator/scripts/init_skill.py +378 -0
  1874. package/skills/skill-creator/scripts/package_skill.py +139 -0
  1875. package/skills/skill-creator/scripts/quick_validate.py +159 -0
  1876. package/skills/skill-creator/scripts/test_package_skill.py +160 -0
  1877. package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
  1878. package/skills/slack/SKILL.md +144 -0
  1879. package/skills/songsee/SKILL.md +49 -0
  1880. package/skills/sonoscli/SKILL.md +65 -0
  1881. package/skills/spotify-player/SKILL.md +64 -0
  1882. package/skills/summarize/SKILL.md +87 -0
  1883. package/skills/things-mac/SKILL.md +86 -0
  1884. package/skills/tmux/SKILL.md +153 -0
  1885. package/skills/tmux/scripts/find-sessions.sh +112 -0
  1886. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  1887. package/skills/trello/SKILL.md +95 -0
  1888. package/skills/video-frames/SKILL.md +46 -0
  1889. package/skills/video-frames/scripts/frame.sh +81 -0
  1890. package/skills/voice-call/SKILL.md +45 -0
  1891. package/skills/wacli/SKILL.md +72 -0
  1892. package/skills/weather/SKILL.md +112 -0
  1893. package/skills/xurl/SKILL.md +461 -0
@@ -0,0 +1,2484 @@
1
+ import "./redact-BDinS1q9.js";
2
+ import "./errors-BxyFnvP3.js";
3
+ import "./logger-CoEtkjhn.js";
4
+ import { _ as resolveStateDir } from "./paths-GHJ97ebE.js";
5
+ import "./tmp-openclaw-dir-idKIOMmb.js";
6
+ import { r as theme, t as colorize } from "./theme-CdOoMzRk.js";
7
+ import "./globals-41sdSaKv.js";
8
+ import { n as defaultRuntime } from "./runtime-CT2LIJZu.js";
9
+ import "./ansi-BEJF8NKS.js";
10
+ import "./subsystem-CUp-6QQf.js";
11
+ import "./boolean-DKtCJu_W.js";
12
+ import "./env-BP70DGuy.js";
13
+ import "./utils-Bxk6BLTg.js";
14
+ import { t as formatDocsLink } from "./links-Bilm-v0z.js";
15
+ import "./boundary-path-B3FFLYNx.js";
16
+ import { t as sameFileIdentity } from "./file-identity-Cw0fQxYY.js";
17
+ import "./boundary-file-read-BP6VMpqH.js";
18
+ import { a as logWarn } from "./logger-Cqy7-Maj.js";
19
+ import "./exec-Dmex2w_d.js";
20
+ import "./workspace-BH7CXmrr.js";
21
+ import { i as resolveAgentConfig } from "./agent-scope-DPP4Z_UU.js";
22
+ import "./model-selection-BTpJnslv.js";
23
+ import { U as analyzeArgvCommand, Y as resolvePlannedSegmentArgv, _t as resolveInlineCommandMatch, at as POSIX_SHELL_WRAPPERS, dt as normalizeExecutableToken, ht as POSIX_INLINE_COMMAND_FLAGS, it as resolveExecutableFromPathEnv, mt as unwrapKnownShellMultiplexerInvocation, pt as unwrapKnownDispatchWrapperInvocation, rt as resolveCommandResolutionFromArgv, s as loadConfig } from "./io-jOnQRia2.js";
24
+ import { a as sanitizeHostExecEnv, s as sanitizeSystemRunEnvOverrides, t as inspectHostExecEnvOverrides } from "./host-env-security-BogNN146.js";
25
+ import "./shell-env-cD92jEyV.js";
26
+ import "./safe-text-B_CQuica.js";
27
+ import { n as VERSION } from "./version-DCY9_obP.js";
28
+ import "./env-substitution-D6t_sLS_.js";
29
+ import "./includes-7XyL3p1c.js";
30
+ import "./zod-schema.providers-core-Dgq7MTqU.js";
31
+ import "./legacy-web-search-BgZjNG2h.js";
32
+ import { t as splitShellArgs } from "./shell-argv-DWV43Vya.js";
33
+ import "./registry-rgYi7KoO.js";
34
+ import "./config-state-CE0CGjey.js";
35
+ import "./manifest-registry-B90TyTWl.js";
36
+ import "./avatar-policy-Ds9e6uHI.js";
37
+ import "./ip-C8vmzVu0.js";
38
+ import "./zod-schema.agent-runtime-T_EC_6fg.js";
39
+ import "./zod-schema.core-BdgRr-F1.js";
40
+ import "./config-pn7LKJdW.js";
41
+ import "./audit-fs-oDMUa5N_.js";
42
+ import "./resolve-T2q_0ARF.js";
43
+ import { t as formatCliCommand } from "./command-format-CYK9XiUC.js";
44
+ import { _ as resolveNodeWindowsTaskName, c as formatNodeServiceDescription, g as resolveNodeSystemdServiceName, h as resolveNodeLaunchAgentLabel } from "./constants-C_Scc680.js";
45
+ import { a as resolveNodeProgramArguments, n as resolveDaemonInstallRuntimeInputs, r as resolveDaemonNodeBinDir, t as emitDaemonInstallRuntimeWarning } from "./daemon-install-plan.shared-DK6BHlWI.js";
46
+ import { c as buildNodeServiceEnvironment } from "./runtime-paths-CstaCCMi.js";
47
+ import "./runtime-guard-y62lPDGY.js";
48
+ import { r as isGatewayDaemonRuntime, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CbClrCwc.js";
49
+ import "./tailscale-Cbsx-2HB.js";
50
+ import "./tailnet-ofqBrXzu.js";
51
+ import "./net-DlJFp95v.js";
52
+ import "./auth-O6LQFLHJ.js";
53
+ import "./credentials-BPwBlm1X.js";
54
+ import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-Cy-gN4K2.js";
55
+ import "./runtime-CuvWMN7E.js";
56
+ import "./registry-C3q59Qj0.js";
57
+ import { r as writeJsonAtomic } from "./json-files-WW-H_psG.js";
58
+ import { dn as loadOrCreateDeviceIdentity, u as GatewayClient } from "./method-scopes-DgypDW23.js";
59
+ import "./call-BmLt3xO1.js";
60
+ import "./ports-lsof-DtJqhFOr.js";
61
+ import "./restart-stale-pids-CLGiqU2E.js";
62
+ import "./runtime-parse-CeqXmZHJ.js";
63
+ import "./launchd-tyqGVx9U.js";
64
+ import "./service-Bxc9uL2e.js";
65
+ import "./ports-DFiK_Jc-.js";
66
+ import "./systemd-CrxZBFae.js";
67
+ import { f as buildDaemonServiceSnapshot, h as installDaemonServiceAndEmit, n as createDaemonInstallActionContext, r as failIfNixDaemonInstallMode, t as createCliStatusTextStyles, u as resolveRuntimeStatusColor } from "./shared-DngjQumT.js";
68
+ import { c as buildPlatformRuntimeLogHints, l as buildPlatformServiceStartHints, u as formatRuntimeStatus } from "./systemd-hints-y-zJ9aTm.js";
69
+ import "./logging-CbTTfADU.js";
70
+ import { t as parsePort } from "./parse-port-COyt3COn.js";
71
+ import "./issue-format-CBEXVico.js";
72
+ import { i as runServiceUninstall, r as runServiceStop, t as runServiceRestart } from "./lifecycle-core-Dnxnw0oy.js";
73
+ import "./image-ops-j01UkxEv.js";
74
+ import "./path-alias-guards-ZTKqurNH.js";
75
+ import { t as detectMime } from "./mime-C4vVTBso.js";
76
+ import "./ssrf-Dk9XaoKN.js";
77
+ import "./channel-config-helpers-CieQWILI.js";
78
+ import "./whatsapp-DXbWlm3A.js";
79
+ import "./fs-safe-D3qzH-ab.js";
80
+ import { _ as startBrowserControlServiceFromConfig, f as redactCdpUrl, g as createBrowserControlContext, h as createBrowserRouteDispatcher } from "./routes-TpLEcKO8.js";
81
+ import { n as resolveBrowserConfig } from "./config-DdDLrP_v.js";
82
+ import { b as saveExecApprovals, c as normalizeExecApprovals, f as readExecApprovalsSnapshot, g as resolveExecApprovals, h as requiresExecApproval, n as addAllowlistEntry, o as mergeExecApprovalsSocketDefaults, p as recordAllowlistUse, r as ensureExecApprovals, x as requestJsonlSocket } from "./exec-approvals-BJhuySBz.js";
83
+ import { a as resolveAllowAlwaysPatterns, n as evaluateShellAllowlist, t as evaluateExecAllowlist } from "./exec-approvals-allowlist-B_wPddCb.js";
84
+ import { r as resolveExecSafeBinRuntimePolicy, t as isInterpreterLikeSafeBin } from "./exec-safe-bin-runtime-policy-BZkObC8r.js";
85
+ import { n as resolveSystemRunCommandRequest, s as normalizeSystemRunApprovalPlan, t as formatExecCommand } from "./system-run-command-Cxq2F1MB.js";
86
+ import { t as resolveGatewayConnectionAuth } from "./connection-auth-BSQJeDOU.js";
87
+ import { n as getMachineDisplayName, t as withTimeout } from "./with-timeout-2AKTISee.js";
88
+ import { t as formatHelpExamples } from "./help-format-Dv45FpYu.js";
89
+ import { t as ensureOpenClawCliOnPath } from "./path-env-CPkz6U0Y.js";
90
+ import { i as NODE_SYSTEM_RUN_COMMANDS, n as NODE_EXEC_APPROVALS_COMMANDS, t as NODE_BROWSER_PROXY_COMMAND } from "./node-commands-B6W6Eo0b.js";
91
+ import { t as resolveNodeService } from "./node-service-CEZZaqba.js";
92
+ import fs from "node:fs";
93
+ import path from "node:path";
94
+ import { spawn, spawnSync } from "node:child_process";
95
+ import fs$1 from "node:fs/promises";
96
+ import crypto from "node:crypto";
97
+ //#region src/node-host/config.ts
98
+ const NODE_HOST_FILE = "node.json";
99
+ function resolveNodeHostConfigPath() {
100
+ return path.join(resolveStateDir(), NODE_HOST_FILE);
101
+ }
102
+ function normalizeConfig(config) {
103
+ const base = {
104
+ version: 1,
105
+ nodeId: "",
106
+ token: config?.token,
107
+ displayName: config?.displayName,
108
+ gateway: config?.gateway
109
+ };
110
+ if (config?.version === 1 && typeof config.nodeId === "string") base.nodeId = config.nodeId.trim();
111
+ if (!base.nodeId) base.nodeId = crypto.randomUUID();
112
+ return base;
113
+ }
114
+ async function loadNodeHostConfig() {
115
+ const filePath = resolveNodeHostConfigPath();
116
+ try {
117
+ const raw = await fs$1.readFile(filePath, "utf8");
118
+ return normalizeConfig(JSON.parse(raw));
119
+ } catch {
120
+ return null;
121
+ }
122
+ }
123
+ async function saveNodeHostConfig(config) {
124
+ await writeJsonAtomic(resolveNodeHostConfigPath(), config, { mode: 384 });
125
+ }
126
+ async function ensureNodeHostConfig() {
127
+ const normalized = normalizeConfig(await loadNodeHostConfig());
128
+ await saveNodeHostConfig(normalized);
129
+ return normalized;
130
+ }
131
+ //#endregion
132
+ //#region src/infra/exec-host.ts
133
+ async function requestExecHostViaSocket(params) {
134
+ const { socketPath, token, request } = params;
135
+ if (!socketPath || !token) return null;
136
+ const timeoutMs = params.timeoutMs ?? 2e4;
137
+ const requestJson = JSON.stringify(request);
138
+ const nonce = crypto.randomBytes(16).toString("hex");
139
+ const ts = Date.now();
140
+ const hmac = crypto.createHmac("sha256", token).update(`${nonce}:${ts}:${requestJson}`).digest("hex");
141
+ return await requestJsonlSocket({
142
+ socketPath,
143
+ payload: JSON.stringify({
144
+ type: "exec",
145
+ id: crypto.randomUUID(),
146
+ nonce,
147
+ ts,
148
+ hmac,
149
+ requestJson
150
+ }),
151
+ timeoutMs,
152
+ accept: (value) => {
153
+ const msg = value;
154
+ if (msg?.type !== "exec-res") return;
155
+ if (msg.ok === true && msg.payload) return {
156
+ ok: true,
157
+ payload: msg.payload
158
+ };
159
+ if (msg.ok === false && msg.error) return {
160
+ ok: false,
161
+ error: msg.error
162
+ };
163
+ return null;
164
+ }
165
+ });
166
+ }
167
+ //#endregion
168
+ //#region src/node-host/invoke-browser.ts
169
+ const BROWSER_PROXY_MAX_FILE_BYTES = 10 * 1024 * 1024;
170
+ const DEFAULT_BROWSER_PROXY_TIMEOUT_MS = 2e4;
171
+ const BROWSER_PROXY_STATUS_TIMEOUT_MS = 750;
172
+ function normalizeProfileAllowlist(raw) {
173
+ return Array.isArray(raw) ? raw.map((entry) => entry.trim()).filter(Boolean) : [];
174
+ }
175
+ function resolveBrowserProxyConfig() {
176
+ const proxy = loadConfig().nodeHost?.browserProxy;
177
+ const allowProfiles = normalizeProfileAllowlist(proxy?.allowProfiles);
178
+ return {
179
+ enabled: proxy?.enabled !== false,
180
+ allowProfiles
181
+ };
182
+ }
183
+ let browserControlReady = null;
184
+ async function ensureBrowserControlService() {
185
+ if (browserControlReady) return browserControlReady;
186
+ browserControlReady = (async () => {
187
+ const cfg = loadConfig();
188
+ if (!resolveBrowserConfig(cfg.browser, cfg).enabled) throw new Error("browser control disabled");
189
+ if (!await startBrowserControlServiceFromConfig()) throw new Error("browser control disabled");
190
+ })();
191
+ return browserControlReady;
192
+ }
193
+ function isProfileAllowed(params) {
194
+ const { allowProfiles, profile } = params;
195
+ if (!allowProfiles.length) return true;
196
+ if (!profile) return false;
197
+ return allowProfiles.includes(profile.trim());
198
+ }
199
+ function collectBrowserProxyPaths(payload) {
200
+ const paths = /* @__PURE__ */ new Set();
201
+ const obj = typeof payload === "object" && payload !== null ? payload : null;
202
+ if (!obj) return [];
203
+ if (typeof obj.path === "string" && obj.path.trim()) paths.add(obj.path.trim());
204
+ if (typeof obj.imagePath === "string" && obj.imagePath.trim()) paths.add(obj.imagePath.trim());
205
+ const download = obj.download;
206
+ if (download && typeof download === "object") {
207
+ const dlPath = download.path;
208
+ if (typeof dlPath === "string" && dlPath.trim()) paths.add(dlPath.trim());
209
+ }
210
+ return [...paths];
211
+ }
212
+ async function readBrowserProxyFile(filePath) {
213
+ const stat = await fs$1.stat(filePath).catch(() => null);
214
+ if (!stat || !stat.isFile()) return null;
215
+ if (stat.size > BROWSER_PROXY_MAX_FILE_BYTES) throw new Error(`browser proxy file exceeds ${Math.round(BROWSER_PROXY_MAX_FILE_BYTES / (1024 * 1024))}MB`);
216
+ const buffer = await fs$1.readFile(filePath);
217
+ const mimeType = await detectMime({
218
+ buffer,
219
+ filePath
220
+ });
221
+ return {
222
+ path: filePath,
223
+ base64: buffer.toString("base64"),
224
+ mimeType
225
+ };
226
+ }
227
+ function decodeParams$1(raw) {
228
+ if (!raw) throw new Error("INVALID_REQUEST: paramsJSON required");
229
+ return JSON.parse(raw);
230
+ }
231
+ function resolveBrowserProxyTimeout(timeoutMs) {
232
+ return typeof timeoutMs === "number" && Number.isFinite(timeoutMs) ? Math.max(1, Math.floor(timeoutMs)) : DEFAULT_BROWSER_PROXY_TIMEOUT_MS;
233
+ }
234
+ function isBrowserProxyTimeoutError(err) {
235
+ return String(err).includes("browser proxy request timed out");
236
+ }
237
+ function isWsBackedBrowserProxyPath(path) {
238
+ return path === "/act" || path === "/navigate" || path === "/pdf" || path === "/screenshot" || path === "/snapshot";
239
+ }
240
+ async function readBrowserProxyStatus(params) {
241
+ const query = params.profile ? { profile: params.profile } : {};
242
+ try {
243
+ const response = await withTimeout((signal) => params.dispatcher.dispatch({
244
+ method: "GET",
245
+ path: "/",
246
+ query,
247
+ signal
248
+ }), BROWSER_PROXY_STATUS_TIMEOUT_MS, "browser proxy status");
249
+ if (response.status >= 400 || !response.body || typeof response.body !== "object") return null;
250
+ const body = response.body;
251
+ return {
252
+ running: body.running,
253
+ transport: body.transport,
254
+ cdpHttp: body.cdpHttp,
255
+ cdpReady: body.cdpReady,
256
+ cdpUrl: body.cdpUrl
257
+ };
258
+ } catch {
259
+ return null;
260
+ }
261
+ }
262
+ function formatBrowserProxyTimeoutMessage(params) {
263
+ const parts = [`browser proxy timed out for ${params.method} ${params.path} after ${params.timeoutMs}ms`, params.wsBacked ? "ws-backed browser action" : "browser action"];
264
+ if (params.profile) parts.push(`profile=${params.profile}`);
265
+ if (params.status) {
266
+ const statusParts = [
267
+ `running=${String(params.status.running)}`,
268
+ `cdpHttp=${String(params.status.cdpHttp)}`,
269
+ `cdpReady=${String(params.status.cdpReady)}`
270
+ ];
271
+ if (typeof params.status.transport === "string" && params.status.transport.trim()) statusParts.push(`transport=${params.status.transport}`);
272
+ if (typeof params.status.cdpUrl === "string" && params.status.cdpUrl.trim()) statusParts.push(`cdpUrl=${redactCdpUrl(params.status.cdpUrl)}`);
273
+ parts.push(`status(${statusParts.join(", ")})`);
274
+ }
275
+ return parts.join("; ");
276
+ }
277
+ async function runBrowserProxyCommand(paramsJSON) {
278
+ const params = decodeParams$1(paramsJSON);
279
+ const pathValue = typeof params.path === "string" ? params.path.trim() : "";
280
+ if (!pathValue) throw new Error("INVALID_REQUEST: path required");
281
+ const proxyConfig = resolveBrowserProxyConfig();
282
+ if (!proxyConfig.enabled) throw new Error("UNAVAILABLE: node browser proxy disabled");
283
+ await ensureBrowserControlService();
284
+ const cfg = loadConfig();
285
+ const resolved = resolveBrowserConfig(cfg.browser, cfg);
286
+ const requestedProfile = typeof params.profile === "string" ? params.profile.trim() : "";
287
+ const allowedProfiles = proxyConfig.allowProfiles;
288
+ if (allowedProfiles.length > 0) {
289
+ if (pathValue !== "/profiles") {
290
+ if (!isProfileAllowed({
291
+ allowProfiles: allowedProfiles,
292
+ profile: requestedProfile || resolved.defaultProfile
293
+ })) throw new Error("INVALID_REQUEST: browser profile not allowed");
294
+ } else if (requestedProfile) {
295
+ if (!isProfileAllowed({
296
+ allowProfiles: allowedProfiles,
297
+ profile: requestedProfile
298
+ })) throw new Error("INVALID_REQUEST: browser profile not allowed");
299
+ }
300
+ }
301
+ const method = typeof params.method === "string" ? params.method.toUpperCase() : "GET";
302
+ const path = pathValue.startsWith("/") ? pathValue : `/${pathValue}`;
303
+ const body = params.body;
304
+ const timeoutMs = resolveBrowserProxyTimeout(params.timeoutMs);
305
+ const query = {};
306
+ if (requestedProfile) query.profile = requestedProfile;
307
+ const rawQuery = params.query ?? {};
308
+ for (const [key, value] of Object.entries(rawQuery)) {
309
+ if (value === void 0 || value === null) continue;
310
+ query[key] = typeof value === "string" ? value : String(value);
311
+ }
312
+ const dispatcher = createBrowserRouteDispatcher(createBrowserControlContext());
313
+ let response;
314
+ try {
315
+ response = await withTimeout((signal) => dispatcher.dispatch({
316
+ method: method === "DELETE" ? "DELETE" : method === "POST" ? "POST" : "GET",
317
+ path,
318
+ query,
319
+ body,
320
+ signal
321
+ }), timeoutMs, "browser proxy request");
322
+ } catch (err) {
323
+ if (!isBrowserProxyTimeoutError(err)) throw err;
324
+ const profileForStatus = requestedProfile || resolved.defaultProfile;
325
+ const status = await readBrowserProxyStatus({
326
+ dispatcher,
327
+ profile: path === "/profiles" ? void 0 : profileForStatus
328
+ });
329
+ throw new Error(formatBrowserProxyTimeoutMessage({
330
+ method,
331
+ path,
332
+ profile: path === "/profiles" ? void 0 : profileForStatus || void 0,
333
+ timeoutMs,
334
+ wsBacked: isWsBackedBrowserProxyPath(path),
335
+ status
336
+ }), { cause: err });
337
+ }
338
+ if (response.status >= 400) {
339
+ const message = response.body && typeof response.body === "object" && "error" in response.body ? String(response.body.error) : `HTTP ${response.status}`;
340
+ throw new Error(message);
341
+ }
342
+ const result = response.body;
343
+ if (allowedProfiles.length > 0 && path === "/profiles") {
344
+ const obj = typeof result === "object" && result !== null ? result : {};
345
+ obj.profiles = (Array.isArray(obj.profiles) ? obj.profiles : []).filter((entry) => {
346
+ if (!entry || typeof entry !== "object") return false;
347
+ const name = entry.name;
348
+ return typeof name === "string" && allowedProfiles.includes(name);
349
+ });
350
+ }
351
+ let files;
352
+ const paths = collectBrowserProxyPaths(result);
353
+ if (paths.length > 0) {
354
+ const loaded = await Promise.all(paths.map(async (p) => {
355
+ try {
356
+ const file = await readBrowserProxyFile(p);
357
+ if (!file) throw new Error("file not found");
358
+ return file;
359
+ } catch (err) {
360
+ throw new Error(`browser proxy file read failed for ${p}: ${String(err)}`, { cause: err });
361
+ }
362
+ }));
363
+ if (loaded.length > 0) files = loaded;
364
+ }
365
+ const payload = files ? {
366
+ result,
367
+ files
368
+ } : { result };
369
+ return JSON.stringify(payload);
370
+ }
371
+ //#endregion
372
+ //#region src/node-host/exec-policy.ts
373
+ function resolveExecApprovalDecision(value) {
374
+ if (value === "allow-once" || value === "allow-always") return value;
375
+ return null;
376
+ }
377
+ function formatSystemRunAllowlistMissMessage(params) {
378
+ if (params?.windowsShellWrapperBlocked) return "SYSTEM_RUN_DENIED: allowlist miss (Windows shell wrappers like cmd.exe /c require approval; approve once/always or run with --ask on-miss|always)";
379
+ if (params?.shellWrapperBlocked) return "SYSTEM_RUN_DENIED: allowlist miss (shell wrappers like sh/bash/zsh -c require approval; approve once/always or run with --ask on-miss|always)";
380
+ return "SYSTEM_RUN_DENIED: allowlist miss";
381
+ }
382
+ function evaluateSystemRunPolicy(params) {
383
+ const shellWrapperBlocked = params.security === "allowlist" && params.shellWrapperInvocation;
384
+ const windowsShellWrapperBlocked = shellWrapperBlocked && params.isWindows && params.cmdInvocation;
385
+ const analysisOk = shellWrapperBlocked ? false : params.analysisOk;
386
+ const allowlistSatisfied = shellWrapperBlocked ? false : params.allowlistSatisfied;
387
+ const approvedByAsk = params.approvalDecision !== null || params.approved === true;
388
+ if (params.security === "deny") return {
389
+ allowed: false,
390
+ eventReason: "security=deny",
391
+ errorMessage: "SYSTEM_RUN_DISABLED: security=deny",
392
+ analysisOk,
393
+ allowlistSatisfied,
394
+ shellWrapperBlocked,
395
+ windowsShellWrapperBlocked,
396
+ requiresAsk: false,
397
+ approvalDecision: params.approvalDecision,
398
+ approvedByAsk
399
+ };
400
+ const requiresAsk = requiresExecApproval({
401
+ ask: params.ask,
402
+ security: params.security,
403
+ analysisOk,
404
+ allowlistSatisfied
405
+ });
406
+ if (requiresAsk && !approvedByAsk) return {
407
+ allowed: false,
408
+ eventReason: "approval-required",
409
+ errorMessage: "SYSTEM_RUN_DENIED: approval required",
410
+ analysisOk,
411
+ allowlistSatisfied,
412
+ shellWrapperBlocked,
413
+ windowsShellWrapperBlocked,
414
+ requiresAsk,
415
+ approvalDecision: params.approvalDecision,
416
+ approvedByAsk
417
+ };
418
+ if (params.security === "allowlist" && (!analysisOk || !allowlistSatisfied) && !approvedByAsk) return {
419
+ allowed: false,
420
+ eventReason: "allowlist-miss",
421
+ errorMessage: formatSystemRunAllowlistMissMessage({
422
+ shellWrapperBlocked,
423
+ windowsShellWrapperBlocked
424
+ }),
425
+ analysisOk,
426
+ allowlistSatisfied,
427
+ shellWrapperBlocked,
428
+ windowsShellWrapperBlocked,
429
+ requiresAsk,
430
+ approvalDecision: params.approvalDecision,
431
+ approvedByAsk
432
+ };
433
+ return {
434
+ allowed: true,
435
+ analysisOk,
436
+ allowlistSatisfied,
437
+ shellWrapperBlocked,
438
+ windowsShellWrapperBlocked,
439
+ requiresAsk,
440
+ approvalDecision: params.approvalDecision,
441
+ approvedByAsk
442
+ };
443
+ }
444
+ //#endregion
445
+ //#region src/node-host/invoke-system-run-allowlist.ts
446
+ function evaluateSystemRunAllowlist(params) {
447
+ if (params.shellCommand) {
448
+ const allowlistEval = evaluateShellAllowlist({
449
+ command: params.shellCommand,
450
+ allowlist: params.approvals.allowlist,
451
+ safeBins: params.safeBins,
452
+ safeBinProfiles: params.safeBinProfiles,
453
+ cwd: params.cwd,
454
+ env: params.env,
455
+ trustedSafeBinDirs: params.trustedSafeBinDirs,
456
+ skillBins: params.skillBins,
457
+ autoAllowSkills: params.autoAllowSkills,
458
+ platform: process.platform
459
+ });
460
+ return {
461
+ analysisOk: allowlistEval.analysisOk,
462
+ allowlistMatches: allowlistEval.allowlistMatches,
463
+ allowlistSatisfied: params.security === "allowlist" && allowlistEval.analysisOk ? allowlistEval.allowlistSatisfied : false,
464
+ segments: allowlistEval.segments
465
+ };
466
+ }
467
+ const analysis = analyzeArgvCommand({
468
+ argv: params.argv,
469
+ cwd: params.cwd,
470
+ env: params.env
471
+ });
472
+ const allowlistEval = evaluateExecAllowlist({
473
+ analysis,
474
+ allowlist: params.approvals.allowlist,
475
+ safeBins: params.safeBins,
476
+ safeBinProfiles: params.safeBinProfiles,
477
+ cwd: params.cwd,
478
+ trustedSafeBinDirs: params.trustedSafeBinDirs,
479
+ skillBins: params.skillBins,
480
+ autoAllowSkills: params.autoAllowSkills
481
+ });
482
+ return {
483
+ analysisOk: analysis.ok,
484
+ allowlistMatches: allowlistEval.allowlistMatches,
485
+ allowlistSatisfied: params.security === "allowlist" && analysis.ok ? allowlistEval.allowlistSatisfied : false,
486
+ segments: analysis.segments
487
+ };
488
+ }
489
+ function resolvePlannedAllowlistArgv(params) {
490
+ if (params.security !== "allowlist" || params.policy.approvedByAsk || params.shellCommand || !params.policy.analysisOk || !params.policy.allowlistSatisfied || params.segments.length !== 1) return;
491
+ const plannedAllowlistArgv = resolvePlannedSegmentArgv(params.segments[0]);
492
+ return plannedAllowlistArgv && plannedAllowlistArgv.length > 0 ? plannedAllowlistArgv : null;
493
+ }
494
+ function resolveSystemRunExecArgv(params) {
495
+ let execArgv = params.plannedAllowlistArgv ?? params.argv;
496
+ if (params.security === "allowlist" && params.isWindows && !params.policy.approvedByAsk && params.shellCommand && params.policy.analysisOk && params.policy.allowlistSatisfied && params.segments.length === 1 && params.segments[0]?.argv.length > 0) execArgv = params.segments[0].argv;
497
+ return execArgv;
498
+ }
499
+ function applyOutputTruncation(result) {
500
+ if (!result.truncated) return;
501
+ const suffix = "... (truncated)";
502
+ if (result.stderr.trim().length > 0) result.stderr = `${result.stderr}\n${suffix}`;
503
+ else result.stdout = `${result.stdout}\n${suffix}`;
504
+ }
505
+ //#endregion
506
+ //#region src/node-host/invoke-system-run-plan.ts
507
+ const MUTABLE_ARGV1_INTERPRETER_PATTERNS = [
508
+ /^(?:node|nodejs)$/,
509
+ /^perl$/,
510
+ /^php$/,
511
+ /^python(?:\d+(?:\.\d+)*)?$/,
512
+ /^ruby$/
513
+ ];
514
+ const GENERIC_MUTABLE_SCRIPT_RUNNERS = new Set([
515
+ "esno",
516
+ "jiti",
517
+ "ts-node",
518
+ "ts-node-esm",
519
+ "tsx",
520
+ "vite-node"
521
+ ]);
522
+ const BUN_SUBCOMMANDS = new Set([
523
+ "add",
524
+ "audit",
525
+ "completions",
526
+ "create",
527
+ "exec",
528
+ "help",
529
+ "init",
530
+ "install",
531
+ "link",
532
+ "outdated",
533
+ "patch",
534
+ "pm",
535
+ "publish",
536
+ "remove",
537
+ "repl",
538
+ "run",
539
+ "test",
540
+ "unlink",
541
+ "update",
542
+ "upgrade",
543
+ "x"
544
+ ]);
545
+ const BUN_OPTIONS_WITH_VALUE = new Set([
546
+ "--backend",
547
+ "--bunfig",
548
+ "--conditions",
549
+ "--config",
550
+ "--console-depth",
551
+ "--cwd",
552
+ "--define",
553
+ "--elide-lines",
554
+ "--env-file",
555
+ "--extension-order",
556
+ "--filter",
557
+ "--hot",
558
+ "--inspect",
559
+ "--inspect-brk",
560
+ "--inspect-wait",
561
+ "--install",
562
+ "--jsx-factory",
563
+ "--jsx-fragment",
564
+ "--jsx-import-source",
565
+ "--loader",
566
+ "--origin",
567
+ "--port",
568
+ "--preload",
569
+ "--smol",
570
+ "--tsconfig-override",
571
+ "-c",
572
+ "-e",
573
+ "-p",
574
+ "-r"
575
+ ]);
576
+ const DENO_RUN_OPTIONS_WITH_VALUE = new Set([
577
+ "--cached-only",
578
+ "--cert",
579
+ "--config",
580
+ "--env-file",
581
+ "--ext",
582
+ "--harmony-import-attributes",
583
+ "--import-map",
584
+ "--inspect",
585
+ "--inspect-brk",
586
+ "--inspect-wait",
587
+ "--location",
588
+ "--log-level",
589
+ "--lock",
590
+ "--node-modules-dir",
591
+ "--no-check",
592
+ "--preload",
593
+ "--reload",
594
+ "--seed",
595
+ "--strace-ops",
596
+ "--unstable-bare-node-builtins",
597
+ "--v8-flags",
598
+ "--watch",
599
+ "--watch-exclude",
600
+ "-L"
601
+ ]);
602
+ const NODE_OPTIONS_WITH_FILE_VALUE = new Set([
603
+ "-r",
604
+ "--experimental-loader",
605
+ "--import",
606
+ "--loader",
607
+ "--require"
608
+ ]);
609
+ const RUBY_UNSAFE_APPROVAL_FLAGS = new Set([
610
+ "-I",
611
+ "-r",
612
+ "--require"
613
+ ]);
614
+ const PERL_UNSAFE_APPROVAL_FLAGS = new Set([
615
+ "-I",
616
+ "-M",
617
+ "-m"
618
+ ]);
619
+ const POSIX_SHELL_OPTIONS_WITH_VALUE = new Set([
620
+ "--init-file",
621
+ "--rcfile",
622
+ "--startup-script",
623
+ "-o"
624
+ ]);
625
+ const NPM_EXEC_OPTIONS_WITH_VALUE = new Set([
626
+ "--cache",
627
+ "--package",
628
+ "--prefix",
629
+ "--script-shell",
630
+ "--userconfig",
631
+ "--workspace",
632
+ "-p",
633
+ "-w"
634
+ ]);
635
+ const NPM_EXEC_FLAG_OPTIONS = new Set([
636
+ "--no",
637
+ "--quiet",
638
+ "--ws",
639
+ "--workspaces",
640
+ "--yes",
641
+ "-q",
642
+ "-y"
643
+ ]);
644
+ const PNPM_OPTIONS_WITH_VALUE = new Set([
645
+ "--config",
646
+ "--dir",
647
+ "--filter",
648
+ "--reporter",
649
+ "--stream",
650
+ "--test-pattern",
651
+ "--workspace-concurrency",
652
+ "-C"
653
+ ]);
654
+ const PNPM_FLAG_OPTIONS = new Set([
655
+ "--aggregate-output",
656
+ "--color",
657
+ "--recursive",
658
+ "--silent",
659
+ "--workspace-root",
660
+ "-r"
661
+ ]);
662
+ function normalizeString(value) {
663
+ if (typeof value !== "string") return null;
664
+ const trimmed = value.trim();
665
+ return trimmed ? trimmed : null;
666
+ }
667
+ function pathComponentsFromRootSync(targetPath) {
668
+ const absolute = path.resolve(targetPath);
669
+ const parts = [];
670
+ let cursor = absolute;
671
+ while (true) {
672
+ parts.unshift(cursor);
673
+ const parent = path.dirname(cursor);
674
+ if (parent === cursor) return parts;
675
+ cursor = parent;
676
+ }
677
+ }
678
+ function isWritableByCurrentProcessSync(candidate) {
679
+ try {
680
+ fs.accessSync(candidate, fs.constants.W_OK);
681
+ return true;
682
+ } catch {
683
+ return false;
684
+ }
685
+ }
686
+ function hasMutableSymlinkPathComponentSync(targetPath) {
687
+ for (const component of pathComponentsFromRootSync(targetPath)) try {
688
+ if (!fs.lstatSync(component).isSymbolicLink()) continue;
689
+ if (isWritableByCurrentProcessSync(path.dirname(component))) return true;
690
+ } catch {
691
+ return true;
692
+ }
693
+ return false;
694
+ }
695
+ function shouldPinExecutableForApproval(params) {
696
+ if (params.shellCommand !== null) return false;
697
+ return (params.wrapperChain?.length ?? 0) === 0;
698
+ }
699
+ function hashFileContentsSync(filePath) {
700
+ return crypto.createHash("sha256").update(fs.readFileSync(filePath)).digest("hex");
701
+ }
702
+ function looksLikePathToken(token) {
703
+ return token.startsWith(".") || token.startsWith("/") || token.startsWith("\\") || token.includes("/") || token.includes("\\") || path.extname(token).length > 0;
704
+ }
705
+ function resolvesToExistingFileSync(rawOperand, cwd) {
706
+ if (!rawOperand) return false;
707
+ try {
708
+ return fs.statSync(path.resolve(cwd ?? process.cwd(), rawOperand)).isFile();
709
+ } catch {
710
+ return false;
711
+ }
712
+ }
713
+ function unwrapArgvForMutableOperand(argv) {
714
+ let current = argv;
715
+ let baseIndex = 0;
716
+ while (true) {
717
+ const dispatchUnwrap = unwrapKnownDispatchWrapperInvocation(current);
718
+ if (dispatchUnwrap.kind === "unwrapped") {
719
+ baseIndex += current.length - dispatchUnwrap.argv.length;
720
+ current = dispatchUnwrap.argv;
721
+ continue;
722
+ }
723
+ const shellMultiplexerUnwrap = unwrapKnownShellMultiplexerInvocation(current);
724
+ if (shellMultiplexerUnwrap.kind === "unwrapped") {
725
+ baseIndex += current.length - shellMultiplexerUnwrap.argv.length;
726
+ current = shellMultiplexerUnwrap.argv;
727
+ continue;
728
+ }
729
+ const packageManagerUnwrap = unwrapKnownPackageManagerExecInvocation(current);
730
+ if (packageManagerUnwrap) {
731
+ baseIndex += current.length - packageManagerUnwrap.length;
732
+ current = packageManagerUnwrap;
733
+ continue;
734
+ }
735
+ return {
736
+ argv: current,
737
+ baseIndex
738
+ };
739
+ }
740
+ }
741
+ function unwrapKnownPackageManagerExecInvocation(argv) {
742
+ switch (normalizePackageManagerExecToken(argv[0] ?? "")) {
743
+ case "npm": return unwrapNpmExecInvocation(argv);
744
+ case "npx":
745
+ case "bunx": return unwrapDirectPackageExecInvocation(argv);
746
+ case "pnpm": return unwrapPnpmExecInvocation(argv);
747
+ default: return null;
748
+ }
749
+ }
750
+ function normalizePackageManagerExecToken(token) {
751
+ const normalized = normalizeExecutableToken(token);
752
+ if (!normalized) return normalized;
753
+ return normalized.replace(/\.(?:c|m)?js$/i, "");
754
+ }
755
+ function unwrapPnpmExecInvocation(argv) {
756
+ let idx = 1;
757
+ while (idx < argv.length) {
758
+ const token = argv[idx]?.trim() ?? "";
759
+ if (!token) {
760
+ idx += 1;
761
+ continue;
762
+ }
763
+ if (token === "--") {
764
+ idx += 1;
765
+ continue;
766
+ }
767
+ if (!token.startsWith("-")) {
768
+ if (token === "exec") {
769
+ if (idx + 1 >= argv.length) return null;
770
+ const tail = argv.slice(idx + 1);
771
+ return tail[0] === "--" ? tail.length > 1 ? tail.slice(1) : null : tail;
772
+ }
773
+ if (token === "node") {
774
+ const tail = argv.slice(idx + 1);
775
+ return ["node", ...tail[0] === "--" ? tail.slice(1) : tail];
776
+ }
777
+ return null;
778
+ }
779
+ const [flag] = token.toLowerCase().split("=", 2);
780
+ if (PNPM_OPTIONS_WITH_VALUE.has(flag)) {
781
+ idx += token.includes("=") ? 1 : 2;
782
+ continue;
783
+ }
784
+ if (PNPM_FLAG_OPTIONS.has(flag)) {
785
+ idx += 1;
786
+ continue;
787
+ }
788
+ return null;
789
+ }
790
+ return null;
791
+ }
792
+ function unwrapDirectPackageExecInvocation(argv) {
793
+ let idx = 1;
794
+ while (idx < argv.length) {
795
+ const token = argv[idx]?.trim() ?? "";
796
+ if (!token) {
797
+ idx += 1;
798
+ continue;
799
+ }
800
+ if (!token.startsWith("-")) return argv.slice(idx);
801
+ const [flag] = token.toLowerCase().split("=", 2);
802
+ if (flag === "-c" || flag === "--call") return null;
803
+ if (NPM_EXEC_OPTIONS_WITH_VALUE.has(flag)) {
804
+ idx += token.includes("=") ? 1 : 2;
805
+ continue;
806
+ }
807
+ if (NPM_EXEC_FLAG_OPTIONS.has(flag)) {
808
+ idx += 1;
809
+ continue;
810
+ }
811
+ return null;
812
+ }
813
+ return null;
814
+ }
815
+ function unwrapNpmExecInvocation(argv) {
816
+ let idx = 1;
817
+ while (idx < argv.length) {
818
+ const token = argv[idx]?.trim() ?? "";
819
+ if (!token) {
820
+ idx += 1;
821
+ continue;
822
+ }
823
+ if (!token.startsWith("-")) {
824
+ if (token !== "exec") return null;
825
+ idx += 1;
826
+ break;
827
+ }
828
+ if ((token === "-C" || token === "--prefix" || token === "--userconfig") && !token.includes("=")) {
829
+ idx += 2;
830
+ continue;
831
+ }
832
+ idx += 1;
833
+ }
834
+ if (idx >= argv.length) return null;
835
+ const tail = argv.slice(idx);
836
+ if (tail[0] === "--") return tail.length > 1 ? tail.slice(1) : null;
837
+ return unwrapDirectPackageExecInvocation(["npx", ...tail]);
838
+ }
839
+ function resolvePosixShellScriptOperandIndex(argv) {
840
+ if (resolveInlineCommandMatch(argv, POSIX_INLINE_COMMAND_FLAGS, { allowCombinedC: true }).valueTokenIndex !== null) return null;
841
+ let afterDoubleDash = false;
842
+ for (let i = 1; i < argv.length; i += 1) {
843
+ const token = argv[i]?.trim() ?? "";
844
+ if (!token) continue;
845
+ if (token === "-") return null;
846
+ if (!afterDoubleDash && token === "--") {
847
+ afterDoubleDash = true;
848
+ continue;
849
+ }
850
+ if (!afterDoubleDash && token === "-s") return null;
851
+ if (!afterDoubleDash && token.startsWith("-")) {
852
+ const [flag] = token.toLowerCase().split("=", 2);
853
+ if (POSIX_SHELL_OPTIONS_WITH_VALUE.has(flag)) {
854
+ if (!token.includes("=")) i += 1;
855
+ continue;
856
+ }
857
+ continue;
858
+ }
859
+ return i;
860
+ }
861
+ return null;
862
+ }
863
+ function resolveOptionFilteredFileOperandIndex(params) {
864
+ let afterDoubleDash = false;
865
+ for (let i = params.startIndex; i < params.argv.length; i += 1) {
866
+ const token = params.argv[i]?.trim() ?? "";
867
+ if (!token) continue;
868
+ if (afterDoubleDash) return resolvesToExistingFileSync(token, params.cwd) ? i : null;
869
+ if (token === "--") {
870
+ afterDoubleDash = true;
871
+ continue;
872
+ }
873
+ if (token === "-") return null;
874
+ if (token.startsWith("-")) {
875
+ if (!token.includes("=") && params.optionsWithValue?.has(token)) i += 1;
876
+ continue;
877
+ }
878
+ return resolvesToExistingFileSync(token, params.cwd) ? i : null;
879
+ }
880
+ return null;
881
+ }
882
+ function resolveOptionFilteredPositionalIndex(params) {
883
+ let afterDoubleDash = false;
884
+ for (let i = params.startIndex; i < params.argv.length; i += 1) {
885
+ const token = params.argv[i]?.trim() ?? "";
886
+ if (!token) continue;
887
+ if (afterDoubleDash) return i;
888
+ if (token === "--") {
889
+ afterDoubleDash = true;
890
+ continue;
891
+ }
892
+ if (token === "-") return null;
893
+ if (token.startsWith("-")) {
894
+ if (!token.includes("=") && params.optionsWithValue?.has(token)) i += 1;
895
+ continue;
896
+ }
897
+ return i;
898
+ }
899
+ return null;
900
+ }
901
+ function collectExistingFileOperandIndexes(params) {
902
+ let afterDoubleDash = false;
903
+ const hits = [];
904
+ for (let i = params.startIndex; i < params.argv.length; i += 1) {
905
+ const token = params.argv[i]?.trim() ?? "";
906
+ if (!token) continue;
907
+ if (afterDoubleDash) {
908
+ if (resolvesToExistingFileSync(token, params.cwd)) hits.push(i);
909
+ continue;
910
+ }
911
+ if (token === "--") {
912
+ afterDoubleDash = true;
913
+ continue;
914
+ }
915
+ if (token === "-") return {
916
+ hits: [],
917
+ sawOptionValueFile: false
918
+ };
919
+ if (token.startsWith("-")) {
920
+ const [flag, inlineValue] = token.split("=", 2);
921
+ if (params.optionsWithFileValue?.has(flag.toLowerCase())) {
922
+ if (inlineValue && resolvesToExistingFileSync(inlineValue, params.cwd)) {
923
+ hits.push(i);
924
+ return {
925
+ hits,
926
+ sawOptionValueFile: true
927
+ };
928
+ }
929
+ const nextToken = params.argv[i + 1]?.trim() ?? "";
930
+ if (!inlineValue && nextToken && resolvesToExistingFileSync(nextToken, params.cwd)) {
931
+ hits.push(i + 1);
932
+ return {
933
+ hits,
934
+ sawOptionValueFile: true
935
+ };
936
+ }
937
+ }
938
+ continue;
939
+ }
940
+ if (resolvesToExistingFileSync(token, params.cwd)) hits.push(i);
941
+ }
942
+ return {
943
+ hits,
944
+ sawOptionValueFile: false
945
+ };
946
+ }
947
+ function resolveGenericInterpreterScriptOperandIndex(params) {
948
+ const collection = collectExistingFileOperandIndexes({
949
+ argv: params.argv,
950
+ startIndex: 1,
951
+ cwd: params.cwd,
952
+ optionsWithFileValue: params.optionsWithFileValue
953
+ });
954
+ if (collection.sawOptionValueFile) return null;
955
+ return collection.hits.length === 1 ? collection.hits[0] : null;
956
+ }
957
+ function resolveBunScriptOperandIndex(params) {
958
+ const directIndex = resolveOptionFilteredPositionalIndex({
959
+ argv: params.argv,
960
+ startIndex: 1,
961
+ optionsWithValue: BUN_OPTIONS_WITH_VALUE
962
+ });
963
+ if (directIndex === null) return null;
964
+ const directToken = params.argv[directIndex]?.trim() ?? "";
965
+ if (directToken === "run") return resolveOptionFilteredFileOperandIndex({
966
+ argv: params.argv,
967
+ startIndex: directIndex + 1,
968
+ cwd: params.cwd,
969
+ optionsWithValue: BUN_OPTIONS_WITH_VALUE
970
+ });
971
+ if (BUN_SUBCOMMANDS.has(directToken)) return null;
972
+ if (!looksLikePathToken(directToken)) return null;
973
+ return directIndex;
974
+ }
975
+ function resolveDenoRunScriptOperandIndex(params) {
976
+ if ((params.argv[1]?.trim() ?? "") !== "run") return null;
977
+ return resolveOptionFilteredFileOperandIndex({
978
+ argv: params.argv,
979
+ startIndex: 2,
980
+ cwd: params.cwd,
981
+ optionsWithValue: DENO_RUN_OPTIONS_WITH_VALUE
982
+ });
983
+ }
984
+ function hasRubyUnsafeApprovalFlag(argv) {
985
+ let afterDoubleDash = false;
986
+ for (let i = 1; i < argv.length; i += 1) {
987
+ const token = argv[i]?.trim() ?? "";
988
+ if (!token) continue;
989
+ if (afterDoubleDash) return false;
990
+ if (token === "--") {
991
+ afterDoubleDash = true;
992
+ continue;
993
+ }
994
+ if (token === "-I" || token === "-r") return true;
995
+ if (token.startsWith("-I") || token.startsWith("-r")) return true;
996
+ if (RUBY_UNSAFE_APPROVAL_FLAGS.has(token.toLowerCase())) return true;
997
+ }
998
+ return false;
999
+ }
1000
+ function hasPerlUnsafeApprovalFlag(argv) {
1001
+ let afterDoubleDash = false;
1002
+ for (let i = 1; i < argv.length; i += 1) {
1003
+ const token = argv[i]?.trim() ?? "";
1004
+ if (!token) continue;
1005
+ if (afterDoubleDash) return false;
1006
+ if (token === "--") {
1007
+ afterDoubleDash = true;
1008
+ continue;
1009
+ }
1010
+ if (token === "-I" || token === "-M" || token === "-m") return true;
1011
+ if (token.startsWith("-I") || token.startsWith("-M") || token.startsWith("-m")) return true;
1012
+ if (PERL_UNSAFE_APPROVAL_FLAGS.has(token)) return true;
1013
+ }
1014
+ return false;
1015
+ }
1016
+ function isMutableScriptRunner(executable) {
1017
+ return GENERIC_MUTABLE_SCRIPT_RUNNERS.has(executable) || isInterpreterLikeSafeBin(executable);
1018
+ }
1019
+ function resolveMutableFileOperandIndex(argv, cwd) {
1020
+ const unwrapped = unwrapArgvForMutableOperand(argv);
1021
+ const executable = normalizeExecutableToken(unwrapped.argv[0] ?? "");
1022
+ if (!executable) return null;
1023
+ if (POSIX_SHELL_WRAPPERS.has(executable)) {
1024
+ const shellIndex = resolvePosixShellScriptOperandIndex(unwrapped.argv);
1025
+ return shellIndex === null ? null : unwrapped.baseIndex + shellIndex;
1026
+ }
1027
+ if (MUTABLE_ARGV1_INTERPRETER_PATTERNS.some((pattern) => pattern.test(executable))) {
1028
+ const operand = unwrapped.argv[1]?.trim() ?? "";
1029
+ if (operand && operand !== "-" && !operand.startsWith("-")) return unwrapped.baseIndex + 1;
1030
+ }
1031
+ if (executable === "bun") {
1032
+ const bunIndex = resolveBunScriptOperandIndex({
1033
+ argv: unwrapped.argv,
1034
+ cwd
1035
+ });
1036
+ if (bunIndex !== null) return unwrapped.baseIndex + bunIndex;
1037
+ }
1038
+ if (executable === "deno") {
1039
+ const denoIndex = resolveDenoRunScriptOperandIndex({
1040
+ argv: unwrapped.argv,
1041
+ cwd
1042
+ });
1043
+ if (denoIndex !== null) return unwrapped.baseIndex + denoIndex;
1044
+ }
1045
+ if (executable === "ruby" && hasRubyUnsafeApprovalFlag(unwrapped.argv)) return null;
1046
+ if (executable === "perl" && hasPerlUnsafeApprovalFlag(unwrapped.argv)) return null;
1047
+ if (!isMutableScriptRunner(executable)) return null;
1048
+ const genericIndex = resolveGenericInterpreterScriptOperandIndex({
1049
+ argv: unwrapped.argv,
1050
+ cwd,
1051
+ optionsWithFileValue: executable === "node" || executable === "nodejs" ? NODE_OPTIONS_WITH_FILE_VALUE : void 0
1052
+ });
1053
+ return genericIndex === null ? null : unwrapped.baseIndex + genericIndex;
1054
+ }
1055
+ function shellPayloadNeedsStableBinding(shellCommand, cwd) {
1056
+ const argv = splitShellArgs(shellCommand);
1057
+ if (!argv || argv.length === 0) return false;
1058
+ const snapshot = resolveMutableFileOperandSnapshotSync({
1059
+ argv,
1060
+ cwd,
1061
+ shellCommand: null
1062
+ });
1063
+ if (!snapshot.ok) return true;
1064
+ if (snapshot.snapshot) return true;
1065
+ return resolvesToExistingFileSync(argv[0]?.trim() ?? "", cwd);
1066
+ }
1067
+ function requiresStableInterpreterApprovalBindingWithShellCommand(params) {
1068
+ if (params.shellCommand !== null) return shellPayloadNeedsStableBinding(params.shellCommand, params.cwd);
1069
+ const executable = normalizeExecutableToken(unwrapArgvForMutableOperand(params.argv).argv[0] ?? "");
1070
+ if (!executable) return false;
1071
+ if (POSIX_SHELL_WRAPPERS.has(executable)) return false;
1072
+ return isMutableScriptRunner(executable);
1073
+ }
1074
+ function resolveMutableFileOperandSnapshotSync(params) {
1075
+ const argvIndex = resolveMutableFileOperandIndex(params.argv, params.cwd);
1076
+ if (argvIndex === null) {
1077
+ if (requiresStableInterpreterApprovalBindingWithShellCommand({
1078
+ argv: params.argv,
1079
+ shellCommand: params.shellCommand,
1080
+ cwd: params.cwd
1081
+ })) return {
1082
+ ok: false,
1083
+ message: "SYSTEM_RUN_DENIED: approval cannot safely bind this interpreter/runtime command"
1084
+ };
1085
+ return {
1086
+ ok: true,
1087
+ snapshot: null
1088
+ };
1089
+ }
1090
+ const rawOperand = params.argv[argvIndex]?.trim();
1091
+ if (!rawOperand) return {
1092
+ ok: false,
1093
+ message: "SYSTEM_RUN_DENIED: approval requires a stable script operand"
1094
+ };
1095
+ const resolvedPath = path.resolve(params.cwd ?? process.cwd(), rawOperand);
1096
+ let realPath;
1097
+ let stat;
1098
+ try {
1099
+ realPath = fs.realpathSync(resolvedPath);
1100
+ stat = fs.statSync(realPath);
1101
+ } catch {
1102
+ return {
1103
+ ok: false,
1104
+ message: "SYSTEM_RUN_DENIED: approval requires an existing script operand"
1105
+ };
1106
+ }
1107
+ if (!stat.isFile()) return {
1108
+ ok: false,
1109
+ message: "SYSTEM_RUN_DENIED: approval requires a file script operand"
1110
+ };
1111
+ return {
1112
+ ok: true,
1113
+ snapshot: {
1114
+ argvIndex,
1115
+ path: realPath,
1116
+ sha256: hashFileContentsSync(realPath)
1117
+ }
1118
+ };
1119
+ }
1120
+ function resolveCanonicalApprovalCwdSync(cwd) {
1121
+ const requestedCwd = path.resolve(cwd);
1122
+ let cwdLstat;
1123
+ let cwdStat;
1124
+ let cwdReal;
1125
+ let cwdRealStat;
1126
+ try {
1127
+ cwdLstat = fs.lstatSync(requestedCwd);
1128
+ cwdStat = fs.statSync(requestedCwd);
1129
+ cwdReal = fs.realpathSync(requestedCwd);
1130
+ cwdRealStat = fs.statSync(cwdReal);
1131
+ } catch {
1132
+ return {
1133
+ ok: false,
1134
+ message: "SYSTEM_RUN_DENIED: approval requires an existing canonical cwd"
1135
+ };
1136
+ }
1137
+ if (!cwdStat.isDirectory()) return {
1138
+ ok: false,
1139
+ message: "SYSTEM_RUN_DENIED: approval requires cwd to be a directory"
1140
+ };
1141
+ if (hasMutableSymlinkPathComponentSync(requestedCwd)) return {
1142
+ ok: false,
1143
+ message: "SYSTEM_RUN_DENIED: approval requires canonical cwd (no symlink path components)"
1144
+ };
1145
+ if (cwdLstat.isSymbolicLink()) return {
1146
+ ok: false,
1147
+ message: "SYSTEM_RUN_DENIED: approval requires canonical cwd (no symlink cwd)"
1148
+ };
1149
+ if (!sameFileIdentity(cwdStat, cwdLstat) || !sameFileIdentity(cwdStat, cwdRealStat) || !sameFileIdentity(cwdLstat, cwdRealStat)) return {
1150
+ ok: false,
1151
+ message: "SYSTEM_RUN_DENIED: approval cwd identity mismatch"
1152
+ };
1153
+ return {
1154
+ ok: true,
1155
+ snapshot: {
1156
+ cwd: cwdReal,
1157
+ stat: cwdStat
1158
+ }
1159
+ };
1160
+ }
1161
+ function revalidateApprovedCwdSnapshot(params) {
1162
+ const current = resolveCanonicalApprovalCwdSync(params.snapshot.cwd);
1163
+ if (!current.ok) return false;
1164
+ return sameFileIdentity(params.snapshot.stat, current.snapshot.stat);
1165
+ }
1166
+ function revalidateApprovedMutableFileOperand(params) {
1167
+ const operand = params.argv[params.snapshot.argvIndex]?.trim();
1168
+ if (!operand) return false;
1169
+ const resolvedPath = path.resolve(params.cwd ?? process.cwd(), operand);
1170
+ let realPath;
1171
+ try {
1172
+ realPath = fs.realpathSync(resolvedPath);
1173
+ } catch {
1174
+ return false;
1175
+ }
1176
+ if (realPath !== params.snapshot.path) return false;
1177
+ try {
1178
+ return hashFileContentsSync(realPath) === params.snapshot.sha256;
1179
+ } catch {
1180
+ return false;
1181
+ }
1182
+ }
1183
+ function hardenApprovedExecutionPaths(params) {
1184
+ if (!params.approvedByAsk) return {
1185
+ ok: true,
1186
+ argv: params.argv,
1187
+ argvChanged: false,
1188
+ cwd: params.cwd,
1189
+ approvedCwdSnapshot: void 0
1190
+ };
1191
+ let hardenedCwd = params.cwd;
1192
+ let approvedCwdSnapshot;
1193
+ if (hardenedCwd) {
1194
+ const canonicalCwd = resolveCanonicalApprovalCwdSync(hardenedCwd);
1195
+ if (!canonicalCwd.ok) return canonicalCwd;
1196
+ hardenedCwd = canonicalCwd.snapshot.cwd;
1197
+ approvedCwdSnapshot = canonicalCwd.snapshot;
1198
+ }
1199
+ if (params.argv.length === 0) return {
1200
+ ok: true,
1201
+ argv: params.argv,
1202
+ argvChanged: false,
1203
+ cwd: hardenedCwd,
1204
+ approvedCwdSnapshot
1205
+ };
1206
+ const resolution = resolveCommandResolutionFromArgv(params.argv, hardenedCwd);
1207
+ if (!shouldPinExecutableForApproval({
1208
+ shellCommand: params.shellCommand,
1209
+ wrapperChain: resolution?.wrapperChain
1210
+ })) return {
1211
+ ok: true,
1212
+ argv: params.argv,
1213
+ argvChanged: false,
1214
+ cwd: hardenedCwd,
1215
+ approvedCwdSnapshot
1216
+ };
1217
+ const pinnedExecutable = resolution?.resolvedRealPath ?? resolution?.resolvedPath;
1218
+ if (!pinnedExecutable) return {
1219
+ ok: false,
1220
+ message: "SYSTEM_RUN_DENIED: approval requires a stable executable path"
1221
+ };
1222
+ if (pinnedExecutable === params.argv[0]) return {
1223
+ ok: true,
1224
+ argv: params.argv,
1225
+ argvChanged: false,
1226
+ cwd: hardenedCwd,
1227
+ approvedCwdSnapshot
1228
+ };
1229
+ const argv = [...params.argv];
1230
+ argv[0] = pinnedExecutable;
1231
+ return {
1232
+ ok: true,
1233
+ argv,
1234
+ argvChanged: true,
1235
+ cwd: hardenedCwd,
1236
+ approvedCwdSnapshot
1237
+ };
1238
+ }
1239
+ function buildSystemRunApprovalPlan(params) {
1240
+ const command = resolveSystemRunCommandRequest({
1241
+ command: params.command,
1242
+ rawCommand: params.rawCommand
1243
+ });
1244
+ if (!command.ok) return {
1245
+ ok: false,
1246
+ message: command.message
1247
+ };
1248
+ if (command.argv.length === 0) return {
1249
+ ok: false,
1250
+ message: "command required"
1251
+ };
1252
+ const hardening = hardenApprovedExecutionPaths({
1253
+ approvedByAsk: true,
1254
+ argv: command.argv,
1255
+ shellCommand: command.shellPayload,
1256
+ cwd: normalizeString(params.cwd) ?? void 0
1257
+ });
1258
+ if (!hardening.ok) return {
1259
+ ok: false,
1260
+ message: hardening.message
1261
+ };
1262
+ const commandText = formatExecCommand(hardening.argv);
1263
+ const commandPreview = command.previewText?.trim() && command.previewText.trim() !== commandText ? command.previewText.trim() : null;
1264
+ const mutableFileOperand = resolveMutableFileOperandSnapshotSync({
1265
+ argv: hardening.argv,
1266
+ cwd: hardening.cwd,
1267
+ shellCommand: command.shellPayload
1268
+ });
1269
+ if (!mutableFileOperand.ok) return {
1270
+ ok: false,
1271
+ message: mutableFileOperand.message
1272
+ };
1273
+ return {
1274
+ ok: true,
1275
+ plan: {
1276
+ argv: hardening.argv,
1277
+ cwd: hardening.cwd ?? null,
1278
+ commandText,
1279
+ commandPreview,
1280
+ agentId: normalizeString(params.agentId),
1281
+ sessionKey: normalizeString(params.sessionKey),
1282
+ mutableFileOperand: mutableFileOperand.snapshot ?? void 0
1283
+ }
1284
+ };
1285
+ }
1286
+ //#endregion
1287
+ //#region src/node-host/invoke-system-run.ts
1288
+ const safeBinTrustedDirWarningCache = /* @__PURE__ */ new Set();
1289
+ const APPROVAL_CWD_DRIFT_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval cwd changed before execution";
1290
+ const APPROVAL_SCRIPT_OPERAND_BINDING_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval missing script operand binding";
1291
+ const APPROVAL_SCRIPT_OPERAND_DRIFT_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval script operand changed before execution";
1292
+ function warnWritableTrustedDirOnce(message) {
1293
+ if (safeBinTrustedDirWarningCache.has(message)) return;
1294
+ safeBinTrustedDirWarningCache.add(message);
1295
+ logWarn(message);
1296
+ }
1297
+ function normalizeDeniedReason(reason) {
1298
+ switch (reason) {
1299
+ case "security=deny":
1300
+ case "approval-required":
1301
+ case "allowlist-miss":
1302
+ case "execution-plan-miss":
1303
+ case "companion-unavailable":
1304
+ case "permission:screenRecording": return reason;
1305
+ default: return "approval-required";
1306
+ }
1307
+ }
1308
+ async function sendSystemRunDenied(opts, execution, params) {
1309
+ await opts.sendNodeEvent(opts.client, "exec.denied", opts.buildExecEventPayload({
1310
+ sessionKey: execution.sessionKey,
1311
+ runId: execution.runId,
1312
+ host: "node",
1313
+ command: execution.commandText,
1314
+ reason: params.reason,
1315
+ suppressNotifyOnExit: execution.suppressNotifyOnExit
1316
+ }));
1317
+ await opts.sendInvokeResult({
1318
+ ok: false,
1319
+ error: {
1320
+ code: "UNAVAILABLE",
1321
+ message: params.message
1322
+ }
1323
+ });
1324
+ }
1325
+ async function sendSystemRunCompleted(opts, execution, result, payloadJSON) {
1326
+ await opts.sendExecFinishedEvent({
1327
+ sessionKey: execution.sessionKey,
1328
+ runId: execution.runId,
1329
+ commandText: execution.commandText,
1330
+ result,
1331
+ suppressNotifyOnExit: execution.suppressNotifyOnExit
1332
+ });
1333
+ await opts.sendInvokeResult({
1334
+ ok: true,
1335
+ payloadJSON
1336
+ });
1337
+ }
1338
+ async function parseSystemRunPhase(opts) {
1339
+ const command = resolveSystemRunCommandRequest({
1340
+ command: opts.params.command,
1341
+ rawCommand: opts.params.rawCommand
1342
+ });
1343
+ if (!command.ok) {
1344
+ await opts.sendInvokeResult({
1345
+ ok: false,
1346
+ error: {
1347
+ code: "INVALID_REQUEST",
1348
+ message: command.message
1349
+ }
1350
+ });
1351
+ return null;
1352
+ }
1353
+ if (command.argv.length === 0) {
1354
+ await opts.sendInvokeResult({
1355
+ ok: false,
1356
+ error: {
1357
+ code: "INVALID_REQUEST",
1358
+ message: "command required"
1359
+ }
1360
+ });
1361
+ return null;
1362
+ }
1363
+ const shellPayload = command.shellPayload;
1364
+ const commandText = command.commandText;
1365
+ const approvalPlan = opts.params.systemRunPlan === void 0 ? null : normalizeSystemRunApprovalPlan(opts.params.systemRunPlan);
1366
+ if (opts.params.systemRunPlan !== void 0 && !approvalPlan) {
1367
+ await opts.sendInvokeResult({
1368
+ ok: false,
1369
+ error: {
1370
+ code: "INVALID_REQUEST",
1371
+ message: "systemRunPlan invalid"
1372
+ }
1373
+ });
1374
+ return null;
1375
+ }
1376
+ const agentId = opts.params.agentId?.trim() || void 0;
1377
+ const sessionKey = opts.params.sessionKey?.trim() || "node";
1378
+ const runId = opts.params.runId?.trim() || crypto.randomUUID();
1379
+ const suppressNotifyOnExit = opts.params.suppressNotifyOnExit === true;
1380
+ const envOverrideDiagnostics = inspectHostExecEnvOverrides({
1381
+ overrides: opts.params.env ?? void 0,
1382
+ blockPathOverrides: true
1383
+ });
1384
+ if (envOverrideDiagnostics.rejectedOverrideBlockedKeys.length > 0 || envOverrideDiagnostics.rejectedOverrideInvalidKeys.length > 0) {
1385
+ const details = [];
1386
+ if (envOverrideDiagnostics.rejectedOverrideBlockedKeys.length > 0) details.push(`blocked override keys: ${envOverrideDiagnostics.rejectedOverrideBlockedKeys.join(", ")}`);
1387
+ if (envOverrideDiagnostics.rejectedOverrideInvalidKeys.length > 0) details.push(`invalid non-portable override keys: ${envOverrideDiagnostics.rejectedOverrideInvalidKeys.join(", ")}`);
1388
+ await opts.sendInvokeResult({
1389
+ ok: false,
1390
+ error: {
1391
+ code: "INVALID_REQUEST",
1392
+ message: `SYSTEM_RUN_DENIED: environment override rejected (${details.join("; ")})`
1393
+ }
1394
+ });
1395
+ return null;
1396
+ }
1397
+ const envOverrides = sanitizeSystemRunEnvOverrides({
1398
+ overrides: opts.params.env ?? void 0,
1399
+ shellWrapper: shellPayload !== null
1400
+ });
1401
+ return {
1402
+ argv: command.argv,
1403
+ shellPayload,
1404
+ commandText,
1405
+ commandPreview: command.previewText,
1406
+ approvalPlan,
1407
+ agentId,
1408
+ sessionKey,
1409
+ runId,
1410
+ execution: {
1411
+ sessionKey,
1412
+ runId,
1413
+ commandText,
1414
+ suppressNotifyOnExit
1415
+ },
1416
+ approvalDecision: resolveExecApprovalDecision(opts.params.approvalDecision),
1417
+ envOverrides,
1418
+ env: opts.sanitizeEnv(envOverrides),
1419
+ cwd: opts.params.cwd?.trim() || void 0,
1420
+ timeoutMs: opts.params.timeoutMs ?? void 0,
1421
+ needsScreenRecording: opts.params.needsScreenRecording === true,
1422
+ approved: opts.params.approved === true,
1423
+ suppressNotifyOnExit
1424
+ };
1425
+ }
1426
+ async function evaluateSystemRunPolicyPhase(opts, parsed) {
1427
+ const cfg = loadConfig();
1428
+ const agentExec = parsed.agentId ? resolveAgentConfig(cfg, parsed.agentId)?.tools?.exec : void 0;
1429
+ const configuredSecurity = opts.resolveExecSecurity(agentExec?.security ?? cfg.tools?.exec?.security);
1430
+ const configuredAsk = opts.resolveExecAsk(agentExec?.ask ?? cfg.tools?.exec?.ask);
1431
+ const approvals = resolveExecApprovals(parsed.agentId, {
1432
+ security: configuredSecurity,
1433
+ ask: configuredAsk
1434
+ });
1435
+ const security = approvals.agent.security;
1436
+ const ask = approvals.agent.ask;
1437
+ const autoAllowSkills = approvals.agent.autoAllowSkills;
1438
+ const { safeBins, safeBinProfiles, trustedSafeBinDirs } = resolveExecSafeBinRuntimePolicy({
1439
+ global: cfg.tools?.exec,
1440
+ local: agentExec,
1441
+ onWarning: warnWritableTrustedDirOnce
1442
+ });
1443
+ const bins = autoAllowSkills ? await opts.skillBins.current() : [];
1444
+ let { analysisOk, allowlistMatches, allowlistSatisfied, segments } = evaluateSystemRunAllowlist({
1445
+ shellCommand: parsed.shellPayload,
1446
+ argv: parsed.argv,
1447
+ approvals,
1448
+ security,
1449
+ safeBins,
1450
+ safeBinProfiles,
1451
+ trustedSafeBinDirs,
1452
+ cwd: parsed.cwd,
1453
+ env: parsed.env,
1454
+ skillBins: bins,
1455
+ autoAllowSkills
1456
+ });
1457
+ const isWindows = process.platform === "win32";
1458
+ const cmdInvocation = parsed.shellPayload ? opts.isCmdExeInvocation(segments[0]?.argv ?? []) : opts.isCmdExeInvocation(parsed.argv);
1459
+ const policy = evaluateSystemRunPolicy({
1460
+ security,
1461
+ ask,
1462
+ analysisOk,
1463
+ allowlistSatisfied,
1464
+ approvalDecision: parsed.approvalDecision,
1465
+ approved: parsed.approved,
1466
+ isWindows,
1467
+ cmdInvocation,
1468
+ shellWrapperInvocation: parsed.shellPayload !== null
1469
+ });
1470
+ analysisOk = policy.analysisOk;
1471
+ allowlistSatisfied = policy.allowlistSatisfied;
1472
+ if (!policy.allowed) {
1473
+ await sendSystemRunDenied(opts, parsed.execution, {
1474
+ reason: policy.eventReason,
1475
+ message: policy.errorMessage
1476
+ });
1477
+ return null;
1478
+ }
1479
+ if (security === "allowlist" && parsed.shellPayload && !policy.approvedByAsk) {
1480
+ await sendSystemRunDenied(opts, parsed.execution, {
1481
+ reason: "approval-required",
1482
+ message: "SYSTEM_RUN_DENIED: approval required"
1483
+ });
1484
+ return null;
1485
+ }
1486
+ const hardenedPaths = hardenApprovedExecutionPaths({
1487
+ approvedByAsk: policy.approvedByAsk,
1488
+ argv: parsed.argv,
1489
+ shellCommand: parsed.shellPayload,
1490
+ cwd: parsed.cwd
1491
+ });
1492
+ if (!hardenedPaths.ok) {
1493
+ await sendSystemRunDenied(opts, parsed.execution, {
1494
+ reason: "approval-required",
1495
+ message: hardenedPaths.message
1496
+ });
1497
+ return null;
1498
+ }
1499
+ const approvedCwdSnapshot = policy.approvedByAsk ? hardenedPaths.approvedCwdSnapshot : void 0;
1500
+ if (policy.approvedByAsk && hardenedPaths.cwd && !approvedCwdSnapshot) {
1501
+ await sendSystemRunDenied(opts, parsed.execution, {
1502
+ reason: "approval-required",
1503
+ message: APPROVAL_CWD_DRIFT_DENIED_MESSAGE
1504
+ });
1505
+ return null;
1506
+ }
1507
+ const plannedAllowlistArgv = resolvePlannedAllowlistArgv({
1508
+ security,
1509
+ shellCommand: parsed.shellPayload,
1510
+ policy,
1511
+ segments
1512
+ });
1513
+ if (plannedAllowlistArgv === null) {
1514
+ await sendSystemRunDenied(opts, parsed.execution, {
1515
+ reason: "execution-plan-miss",
1516
+ message: "SYSTEM_RUN_DENIED: execution plan mismatch"
1517
+ });
1518
+ return null;
1519
+ }
1520
+ return {
1521
+ ...parsed,
1522
+ argv: hardenedPaths.argv,
1523
+ cwd: hardenedPaths.cwd,
1524
+ approvals,
1525
+ security,
1526
+ policy,
1527
+ allowlistMatches,
1528
+ analysisOk,
1529
+ allowlistSatisfied,
1530
+ segments,
1531
+ plannedAllowlistArgv: plannedAllowlistArgv ?? void 0,
1532
+ isWindows,
1533
+ approvedCwdSnapshot
1534
+ };
1535
+ }
1536
+ async function executeSystemRunPhase(opts, phase) {
1537
+ if (phase.approvedCwdSnapshot && !revalidateApprovedCwdSnapshot({ snapshot: phase.approvedCwdSnapshot })) {
1538
+ logWarn(`security: system.run approval cwd drift blocked (runId=${phase.runId})`);
1539
+ await sendSystemRunDenied(opts, phase.execution, {
1540
+ reason: "approval-required",
1541
+ message: APPROVAL_CWD_DRIFT_DENIED_MESSAGE
1542
+ });
1543
+ return;
1544
+ }
1545
+ const expectedMutableFileOperand = phase.approvalPlan ? resolveMutableFileOperandSnapshotSync({
1546
+ argv: phase.argv,
1547
+ cwd: phase.cwd,
1548
+ shellCommand: phase.shellPayload
1549
+ }) : null;
1550
+ if (expectedMutableFileOperand && !expectedMutableFileOperand.ok) {
1551
+ logWarn(`security: system.run approval script binding blocked (runId=${phase.runId})`);
1552
+ await sendSystemRunDenied(opts, phase.execution, {
1553
+ reason: "approval-required",
1554
+ message: expectedMutableFileOperand.message
1555
+ });
1556
+ return;
1557
+ }
1558
+ if (expectedMutableFileOperand?.snapshot && !phase.approvalPlan?.mutableFileOperand) {
1559
+ logWarn(`security: system.run approval script binding missing (runId=${phase.runId})`);
1560
+ await sendSystemRunDenied(opts, phase.execution, {
1561
+ reason: "approval-required",
1562
+ message: APPROVAL_SCRIPT_OPERAND_BINDING_DENIED_MESSAGE
1563
+ });
1564
+ return;
1565
+ }
1566
+ if (phase.approvalPlan?.mutableFileOperand && !revalidateApprovedMutableFileOperand({
1567
+ snapshot: phase.approvalPlan.mutableFileOperand,
1568
+ argv: phase.argv,
1569
+ cwd: phase.cwd
1570
+ })) {
1571
+ logWarn(`security: system.run approval script drift blocked (runId=${phase.runId})`);
1572
+ await sendSystemRunDenied(opts, phase.execution, {
1573
+ reason: "approval-required",
1574
+ message: APPROVAL_SCRIPT_OPERAND_DRIFT_DENIED_MESSAGE
1575
+ });
1576
+ return;
1577
+ }
1578
+ if (opts.preferMacAppExecHost) {
1579
+ const execRequest = {
1580
+ command: phase.plannedAllowlistArgv ?? phase.argv,
1581
+ rawCommand: phase.commandText || null,
1582
+ cwd: phase.cwd ?? null,
1583
+ env: phase.envOverrides ?? null,
1584
+ timeoutMs: phase.timeoutMs ?? null,
1585
+ needsScreenRecording: phase.needsScreenRecording,
1586
+ agentId: phase.agentId ?? null,
1587
+ sessionKey: phase.sessionKey ?? null,
1588
+ approvalDecision: phase.approvalDecision
1589
+ };
1590
+ const response = await opts.runViaMacAppExecHost({
1591
+ approvals: phase.approvals,
1592
+ request: execRequest
1593
+ });
1594
+ if (!response) {
1595
+ if (opts.execHostEnforced || !opts.execHostFallbackAllowed) {
1596
+ await sendSystemRunDenied(opts, phase.execution, {
1597
+ reason: "companion-unavailable",
1598
+ message: "COMPANION_APP_UNAVAILABLE: macOS app exec host unreachable"
1599
+ });
1600
+ return;
1601
+ }
1602
+ } else if (!response.ok) {
1603
+ await sendSystemRunDenied(opts, phase.execution, {
1604
+ reason: normalizeDeniedReason(response.error.reason),
1605
+ message: response.error.message
1606
+ });
1607
+ return;
1608
+ } else {
1609
+ const result = response.payload;
1610
+ await sendSystemRunCompleted(opts, phase.execution, result, JSON.stringify(result));
1611
+ return;
1612
+ }
1613
+ }
1614
+ if (phase.policy.approvalDecision === "allow-always" && phase.security === "allowlist") {
1615
+ if (phase.policy.analysisOk) {
1616
+ const patterns = resolveAllowAlwaysPatterns({
1617
+ segments: phase.segments,
1618
+ cwd: phase.cwd,
1619
+ env: phase.env,
1620
+ platform: process.platform
1621
+ });
1622
+ for (const pattern of patterns) if (pattern) addAllowlistEntry(phase.approvals.file, phase.agentId, pattern);
1623
+ }
1624
+ }
1625
+ if (phase.allowlistMatches.length > 0) {
1626
+ const seen = /* @__PURE__ */ new Set();
1627
+ for (const match of phase.allowlistMatches) {
1628
+ if (!match?.pattern || seen.has(match.pattern)) continue;
1629
+ seen.add(match.pattern);
1630
+ recordAllowlistUse(phase.approvals.file, phase.agentId, match, phase.commandText, phase.segments[0]?.resolution?.resolvedPath);
1631
+ }
1632
+ }
1633
+ if (phase.needsScreenRecording) {
1634
+ await sendSystemRunDenied(opts, phase.execution, {
1635
+ reason: "permission:screenRecording",
1636
+ message: "PERMISSION_MISSING: screenRecording"
1637
+ });
1638
+ return;
1639
+ }
1640
+ const execArgv = resolveSystemRunExecArgv({
1641
+ plannedAllowlistArgv: phase.plannedAllowlistArgv,
1642
+ argv: phase.argv,
1643
+ security: phase.security,
1644
+ isWindows: phase.isWindows,
1645
+ policy: phase.policy,
1646
+ shellCommand: phase.shellPayload,
1647
+ segments: phase.segments
1648
+ });
1649
+ const result = await opts.runCommand(execArgv, phase.cwd, phase.env, phase.timeoutMs);
1650
+ applyOutputTruncation(result);
1651
+ await sendSystemRunCompleted(opts, phase.execution, result, JSON.stringify({
1652
+ exitCode: result.exitCode,
1653
+ timedOut: result.timedOut,
1654
+ success: result.success,
1655
+ stdout: result.stdout,
1656
+ stderr: result.stderr,
1657
+ error: result.error ?? null
1658
+ }));
1659
+ }
1660
+ async function handleSystemRunInvoke(opts) {
1661
+ const parsed = await parseSystemRunPhase(opts);
1662
+ if (!parsed) return;
1663
+ const policyPhase = await evaluateSystemRunPolicyPhase(opts, parsed);
1664
+ if (!policyPhase) return;
1665
+ await executeSystemRunPhase(opts, policyPhase);
1666
+ }
1667
+ //#endregion
1668
+ //#region src/node-host/invoke.ts
1669
+ const OUTPUT_CAP = 2e5;
1670
+ const OUTPUT_EVENT_TAIL = 2e4;
1671
+ const DEFAULT_NODE_PATH$1 = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
1672
+ const WINDOWS_CODEPAGE_ENCODING_MAP = {
1673
+ 65001: "utf-8",
1674
+ 54936: "gb18030",
1675
+ 936: "gbk",
1676
+ 950: "big5",
1677
+ 932: "shift_jis",
1678
+ 949: "euc-kr",
1679
+ 1252: "windows-1252"
1680
+ };
1681
+ let cachedWindowsConsoleEncoding;
1682
+ const execHostEnforced = process.env.OPENCLAW_NODE_EXEC_HOST?.trim().toLowerCase() === "app";
1683
+ const execHostFallbackAllowed = process.env.OPENCLAW_NODE_EXEC_FALLBACK?.trim().toLowerCase() !== "0";
1684
+ const preferMacAppExecHost = process.platform === "darwin" && execHostEnforced;
1685
+ function resolveExecSecurity(value) {
1686
+ return value === "deny" || value === "allowlist" || value === "full" ? value : "allowlist";
1687
+ }
1688
+ function isCmdExeInvocation(argv) {
1689
+ const token = argv[0]?.trim();
1690
+ if (!token) return false;
1691
+ const base = path.win32.basename(token).toLowerCase();
1692
+ return base === "cmd.exe" || base === "cmd";
1693
+ }
1694
+ function resolveExecAsk(value) {
1695
+ return value === "off" || value === "on-miss" || value === "always" ? value : "on-miss";
1696
+ }
1697
+ function sanitizeEnv(overrides) {
1698
+ return sanitizeHostExecEnv({
1699
+ overrides,
1700
+ blockPathOverrides: true
1701
+ });
1702
+ }
1703
+ function truncateOutput(raw, maxChars) {
1704
+ if (raw.length <= maxChars) return {
1705
+ text: raw,
1706
+ truncated: false
1707
+ };
1708
+ return {
1709
+ text: `... (truncated) ${raw.slice(raw.length - maxChars)}`,
1710
+ truncated: true
1711
+ };
1712
+ }
1713
+ function parseWindowsCodePage(raw) {
1714
+ if (!raw) return null;
1715
+ const match = raw.match(/\b(\d{3,5})\b/);
1716
+ if (!match?.[1]) return null;
1717
+ const codePage = Number.parseInt(match[1], 10);
1718
+ if (!Number.isFinite(codePage) || codePage <= 0) return null;
1719
+ return codePage;
1720
+ }
1721
+ function resolveWindowsConsoleEncoding() {
1722
+ if (process.platform !== "win32") return null;
1723
+ if (cachedWindowsConsoleEncoding !== void 0) return cachedWindowsConsoleEncoding;
1724
+ try {
1725
+ const result = spawnSync("cmd.exe", [
1726
+ "/d",
1727
+ "/s",
1728
+ "/c",
1729
+ "chcp"
1730
+ ], {
1731
+ windowsHide: true,
1732
+ encoding: "utf8",
1733
+ stdio: [
1734
+ "ignore",
1735
+ "pipe",
1736
+ "pipe"
1737
+ ]
1738
+ });
1739
+ const codePage = parseWindowsCodePage(`${result.stdout ?? ""}\n${result.stderr ?? ""}`);
1740
+ cachedWindowsConsoleEncoding = codePage !== null ? WINDOWS_CODEPAGE_ENCODING_MAP[codePage] ?? null : null;
1741
+ } catch {
1742
+ cachedWindowsConsoleEncoding = null;
1743
+ }
1744
+ return cachedWindowsConsoleEncoding;
1745
+ }
1746
+ function decodeCapturedOutputBuffer(params) {
1747
+ const utf8 = params.buffer.toString("utf8");
1748
+ if ((params.platform ?? process.platform) !== "win32") return utf8;
1749
+ const encoding = params.windowsEncoding ?? resolveWindowsConsoleEncoding();
1750
+ if (!encoding || encoding.toLowerCase() === "utf-8") return utf8;
1751
+ try {
1752
+ return new TextDecoder(encoding).decode(params.buffer);
1753
+ } catch {
1754
+ return utf8;
1755
+ }
1756
+ }
1757
+ function redactExecApprovals(file) {
1758
+ const socketPath = file.socket?.path?.trim();
1759
+ return {
1760
+ ...file,
1761
+ socket: socketPath ? { path: socketPath } : void 0
1762
+ };
1763
+ }
1764
+ function requireExecApprovalsBaseHash(params, snapshot) {
1765
+ if (!snapshot.exists) return;
1766
+ if (!snapshot.hash) throw new Error("INVALID_REQUEST: exec approvals base hash unavailable; reload and retry");
1767
+ const baseHash = typeof params.baseHash === "string" ? params.baseHash.trim() : "";
1768
+ if (!baseHash) throw new Error("INVALID_REQUEST: exec approvals base hash required; reload and retry");
1769
+ if (baseHash !== snapshot.hash) throw new Error("INVALID_REQUEST: exec approvals changed; reload and retry");
1770
+ }
1771
+ async function runCommand(argv, cwd, env, timeoutMs) {
1772
+ return await new Promise((resolve) => {
1773
+ const stdoutChunks = [];
1774
+ const stderrChunks = [];
1775
+ let outputLen = 0;
1776
+ let truncated = false;
1777
+ let timedOut = false;
1778
+ let settled = false;
1779
+ const windowsEncoding = resolveWindowsConsoleEncoding();
1780
+ const child = spawn(argv[0], argv.slice(1), {
1781
+ cwd,
1782
+ env,
1783
+ stdio: [
1784
+ "ignore",
1785
+ "pipe",
1786
+ "pipe"
1787
+ ],
1788
+ windowsHide: true
1789
+ });
1790
+ const onChunk = (chunk, target) => {
1791
+ if (outputLen >= OUTPUT_CAP) {
1792
+ truncated = true;
1793
+ return;
1794
+ }
1795
+ const remaining = OUTPUT_CAP - outputLen;
1796
+ const slice = chunk.length > remaining ? chunk.subarray(0, remaining) : chunk;
1797
+ outputLen += slice.length;
1798
+ if (target === "stdout") stdoutChunks.push(slice);
1799
+ else stderrChunks.push(slice);
1800
+ if (chunk.length > remaining) truncated = true;
1801
+ };
1802
+ child.stdout?.on("data", (chunk) => onChunk(chunk, "stdout"));
1803
+ child.stderr?.on("data", (chunk) => onChunk(chunk, "stderr"));
1804
+ let timer;
1805
+ if (timeoutMs && timeoutMs > 0) timer = setTimeout(() => {
1806
+ timedOut = true;
1807
+ try {
1808
+ child.kill("SIGKILL");
1809
+ } catch {}
1810
+ }, timeoutMs);
1811
+ const finalize = (exitCode, error) => {
1812
+ if (settled) return;
1813
+ settled = true;
1814
+ if (timer) clearTimeout(timer);
1815
+ const stdout = decodeCapturedOutputBuffer({
1816
+ buffer: Buffer.concat(stdoutChunks),
1817
+ windowsEncoding
1818
+ });
1819
+ const stderr = decodeCapturedOutputBuffer({
1820
+ buffer: Buffer.concat(stderrChunks),
1821
+ windowsEncoding
1822
+ });
1823
+ resolve({
1824
+ exitCode,
1825
+ timedOut,
1826
+ success: exitCode === 0 && !timedOut && !error,
1827
+ stdout,
1828
+ stderr,
1829
+ error: error ?? null,
1830
+ truncated
1831
+ });
1832
+ };
1833
+ child.on("error", (err) => {
1834
+ finalize(void 0, err.message);
1835
+ });
1836
+ child.on("exit", (code) => {
1837
+ finalize(code === null ? void 0 : code, null);
1838
+ });
1839
+ });
1840
+ }
1841
+ function resolveEnvPath(env) {
1842
+ return (env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? DEFAULT_NODE_PATH$1).split(path.delimiter).filter(Boolean);
1843
+ }
1844
+ function resolveExecutable(bin, env) {
1845
+ if (bin.includes("/") || bin.includes("\\")) return null;
1846
+ const extensions = process.platform === "win32" ? (process.env.PATHEXT ?? process.env.PathExt ?? ".EXE;.CMD;.BAT;.COM").split(";").map((ext) => ext.toLowerCase()) : [""];
1847
+ for (const dir of resolveEnvPath(env)) for (const ext of extensions) {
1848
+ const candidate = path.join(dir, bin + ext);
1849
+ if (fs.existsSync(candidate)) return candidate;
1850
+ }
1851
+ return null;
1852
+ }
1853
+ async function handleSystemWhich(params, env) {
1854
+ const bins = params.bins.map((bin) => bin.trim()).filter(Boolean);
1855
+ const found = {};
1856
+ for (const bin of bins) {
1857
+ const path = resolveExecutable(bin, env);
1858
+ if (path) found[bin] = path;
1859
+ }
1860
+ return { bins: found };
1861
+ }
1862
+ function buildExecEventPayload(payload) {
1863
+ if (!payload.output) return payload;
1864
+ const trimmed = payload.output.trim();
1865
+ if (!trimmed) return payload;
1866
+ const { text } = truncateOutput(trimmed, OUTPUT_EVENT_TAIL);
1867
+ return {
1868
+ ...payload,
1869
+ output: text
1870
+ };
1871
+ }
1872
+ async function sendExecFinishedEvent(params) {
1873
+ const combined = [
1874
+ params.result.stdout,
1875
+ params.result.stderr,
1876
+ params.result.error
1877
+ ].filter(Boolean).join("\n");
1878
+ await sendNodeEvent(params.client, "exec.finished", buildExecEventPayload({
1879
+ sessionKey: params.sessionKey,
1880
+ runId: params.runId,
1881
+ host: "node",
1882
+ command: params.commandText,
1883
+ exitCode: params.result.exitCode ?? void 0,
1884
+ timedOut: params.result.timedOut,
1885
+ success: params.result.success,
1886
+ output: combined,
1887
+ suppressNotifyOnExit: params.suppressNotifyOnExit
1888
+ }));
1889
+ }
1890
+ async function runViaMacAppExecHost(params) {
1891
+ const { approvals, request } = params;
1892
+ return await requestExecHostViaSocket({
1893
+ socketPath: approvals.socketPath,
1894
+ token: approvals.token,
1895
+ request
1896
+ });
1897
+ }
1898
+ async function sendJsonPayloadResult(client, frame, payload) {
1899
+ await sendInvokeResult(client, frame, {
1900
+ ok: true,
1901
+ payloadJSON: JSON.stringify(payload)
1902
+ });
1903
+ }
1904
+ async function sendRawPayloadResult(client, frame, payloadJSON) {
1905
+ await sendInvokeResult(client, frame, {
1906
+ ok: true,
1907
+ payloadJSON
1908
+ });
1909
+ }
1910
+ async function sendErrorResult(client, frame, code, message) {
1911
+ await sendInvokeResult(client, frame, {
1912
+ ok: false,
1913
+ error: {
1914
+ code,
1915
+ message
1916
+ }
1917
+ });
1918
+ }
1919
+ async function sendInvalidRequestResult(client, frame, err) {
1920
+ await sendErrorResult(client, frame, "INVALID_REQUEST", String(err));
1921
+ }
1922
+ async function handleInvoke(frame, client, skillBins) {
1923
+ const command = String(frame.command ?? "");
1924
+ if (command === "system.execApprovals.get") {
1925
+ try {
1926
+ ensureExecApprovals();
1927
+ const snapshot = readExecApprovalsSnapshot();
1928
+ await sendJsonPayloadResult(client, frame, {
1929
+ path: snapshot.path,
1930
+ exists: snapshot.exists,
1931
+ hash: snapshot.hash,
1932
+ file: redactExecApprovals(snapshot.file)
1933
+ });
1934
+ } catch (err) {
1935
+ const message = String(err);
1936
+ await sendErrorResult(client, frame, message.toLowerCase().includes("timed out") ? "TIMEOUT" : "INVALID_REQUEST", message);
1937
+ }
1938
+ return;
1939
+ }
1940
+ if (command === "system.execApprovals.set") {
1941
+ try {
1942
+ const params = decodeParams(frame.paramsJSON);
1943
+ if (!params.file || typeof params.file !== "object") throw new Error("INVALID_REQUEST: exec approvals file required");
1944
+ ensureExecApprovals();
1945
+ const snapshot = readExecApprovalsSnapshot();
1946
+ requireExecApprovalsBaseHash(params, snapshot);
1947
+ saveExecApprovals(mergeExecApprovalsSocketDefaults({
1948
+ normalized: normalizeExecApprovals(params.file),
1949
+ current: snapshot.file
1950
+ }));
1951
+ const nextSnapshot = readExecApprovalsSnapshot();
1952
+ await sendJsonPayloadResult(client, frame, {
1953
+ path: nextSnapshot.path,
1954
+ exists: nextSnapshot.exists,
1955
+ hash: nextSnapshot.hash,
1956
+ file: redactExecApprovals(nextSnapshot.file)
1957
+ });
1958
+ } catch (err) {
1959
+ await sendInvalidRequestResult(client, frame, err);
1960
+ }
1961
+ return;
1962
+ }
1963
+ if (command === "system.which") {
1964
+ try {
1965
+ const params = decodeParams(frame.paramsJSON);
1966
+ if (!Array.isArray(params.bins)) throw new Error("INVALID_REQUEST: bins required");
1967
+ await sendJsonPayloadResult(client, frame, await handleSystemWhich(params, sanitizeEnv(void 0)));
1968
+ } catch (err) {
1969
+ await sendInvalidRequestResult(client, frame, err);
1970
+ }
1971
+ return;
1972
+ }
1973
+ if (command === "browser.proxy") {
1974
+ try {
1975
+ await sendRawPayloadResult(client, frame, await runBrowserProxyCommand(frame.paramsJSON));
1976
+ } catch (err) {
1977
+ await sendInvalidRequestResult(client, frame, err);
1978
+ }
1979
+ return;
1980
+ }
1981
+ if (command === "system.run.prepare") {
1982
+ try {
1983
+ const prepared = buildSystemRunApprovalPlan(decodeParams(frame.paramsJSON));
1984
+ if (!prepared.ok) {
1985
+ await sendErrorResult(client, frame, "INVALID_REQUEST", prepared.message);
1986
+ return;
1987
+ }
1988
+ await sendJsonPayloadResult(client, frame, { plan: prepared.plan });
1989
+ } catch (err) {
1990
+ await sendInvalidRequestResult(client, frame, err);
1991
+ }
1992
+ return;
1993
+ }
1994
+ if (command !== "system.run") {
1995
+ await sendErrorResult(client, frame, "UNAVAILABLE", "command not supported");
1996
+ return;
1997
+ }
1998
+ let params;
1999
+ try {
2000
+ params = decodeParams(frame.paramsJSON);
2001
+ } catch (err) {
2002
+ await sendInvalidRequestResult(client, frame, err);
2003
+ return;
2004
+ }
2005
+ if (!Array.isArray(params.command) || params.command.length === 0) {
2006
+ await sendErrorResult(client, frame, "INVALID_REQUEST", "command required");
2007
+ return;
2008
+ }
2009
+ await handleSystemRunInvoke({
2010
+ client,
2011
+ params,
2012
+ skillBins,
2013
+ execHostEnforced,
2014
+ execHostFallbackAllowed,
2015
+ resolveExecSecurity,
2016
+ resolveExecAsk,
2017
+ isCmdExeInvocation,
2018
+ sanitizeEnv,
2019
+ runCommand,
2020
+ runViaMacAppExecHost,
2021
+ sendNodeEvent,
2022
+ buildExecEventPayload,
2023
+ sendInvokeResult: async (result) => {
2024
+ await sendInvokeResult(client, frame, result);
2025
+ },
2026
+ sendExecFinishedEvent: async ({ sessionKey, runId, commandText, result }) => {
2027
+ await sendExecFinishedEvent({
2028
+ client,
2029
+ sessionKey,
2030
+ runId,
2031
+ commandText,
2032
+ result
2033
+ });
2034
+ },
2035
+ preferMacAppExecHost
2036
+ });
2037
+ }
2038
+ function decodeParams(raw) {
2039
+ if (!raw) throw new Error("INVALID_REQUEST: paramsJSON required");
2040
+ return JSON.parse(raw);
2041
+ }
2042
+ function coerceNodeInvokePayload(payload) {
2043
+ if (!payload || typeof payload !== "object") return null;
2044
+ const obj = payload;
2045
+ const id = typeof obj.id === "string" ? obj.id.trim() : "";
2046
+ const nodeId = typeof obj.nodeId === "string" ? obj.nodeId.trim() : "";
2047
+ const command = typeof obj.command === "string" ? obj.command.trim() : "";
2048
+ if (!id || !nodeId || !command) return null;
2049
+ return {
2050
+ id,
2051
+ nodeId,
2052
+ command,
2053
+ paramsJSON: typeof obj.paramsJSON === "string" ? obj.paramsJSON : obj.params !== void 0 ? JSON.stringify(obj.params) : null,
2054
+ timeoutMs: typeof obj.timeoutMs === "number" ? obj.timeoutMs : null,
2055
+ idempotencyKey: typeof obj.idempotencyKey === "string" ? obj.idempotencyKey : null
2056
+ };
2057
+ }
2058
+ async function sendInvokeResult(client, frame, result) {
2059
+ try {
2060
+ await client.request("node.invoke.result", buildNodeInvokeResultParams(frame, result));
2061
+ } catch {}
2062
+ }
2063
+ function buildNodeInvokeResultParams(frame, result) {
2064
+ const params = {
2065
+ id: frame.id,
2066
+ nodeId: frame.nodeId,
2067
+ ok: result.ok
2068
+ };
2069
+ if (result.payload !== void 0) params.payload = result.payload;
2070
+ if (typeof result.payloadJSON === "string") params.payloadJSON = result.payloadJSON;
2071
+ if (result.error) params.error = result.error;
2072
+ return params;
2073
+ }
2074
+ async function sendNodeEvent(client, event, payload) {
2075
+ try {
2076
+ await client.request("node.event", {
2077
+ event,
2078
+ payloadJSON: payload ? JSON.stringify(payload) : null
2079
+ });
2080
+ } catch {}
2081
+ }
2082
+ //#endregion
2083
+ //#region src/node-host/runner.ts
2084
+ const DEFAULT_NODE_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
2085
+ function resolveExecutablePathFromEnv(bin, pathEnv) {
2086
+ if (bin.includes("/") || bin.includes("\\")) return null;
2087
+ return resolveExecutableFromPathEnv(bin, pathEnv) ?? null;
2088
+ }
2089
+ function resolveSkillBinTrustEntries(bins, pathEnv) {
2090
+ const trustEntries = [];
2091
+ const seen = /* @__PURE__ */ new Set();
2092
+ for (const bin of bins) {
2093
+ const name = bin.trim();
2094
+ if (!name) continue;
2095
+ const resolvedPath = resolveExecutablePathFromEnv(name, pathEnv);
2096
+ if (!resolvedPath) continue;
2097
+ const key = `${name}\u0000${resolvedPath}`;
2098
+ if (seen.has(key)) continue;
2099
+ seen.add(key);
2100
+ trustEntries.push({
2101
+ name,
2102
+ resolvedPath
2103
+ });
2104
+ }
2105
+ return trustEntries.toSorted((left, right) => left.name.localeCompare(right.name) || left.resolvedPath.localeCompare(right.resolvedPath));
2106
+ }
2107
+ var SkillBinsCache = class {
2108
+ constructor(fetch, pathEnv) {
2109
+ this.bins = [];
2110
+ this.lastRefresh = 0;
2111
+ this.ttlMs = 9e4;
2112
+ this.fetch = fetch;
2113
+ this.pathEnv = pathEnv;
2114
+ }
2115
+ async current(force = false) {
2116
+ if (force || Date.now() - this.lastRefresh > this.ttlMs) await this.refresh();
2117
+ return this.bins;
2118
+ }
2119
+ async refresh() {
2120
+ try {
2121
+ this.bins = resolveSkillBinTrustEntries(await this.fetch(), this.pathEnv);
2122
+ this.lastRefresh = Date.now();
2123
+ } catch {
2124
+ if (!this.lastRefresh) this.bins = [];
2125
+ }
2126
+ }
2127
+ };
2128
+ function ensureNodePathEnv() {
2129
+ ensureOpenClawCliOnPath({ pathEnv: process.env.PATH ?? "" });
2130
+ const current = process.env.PATH ?? "";
2131
+ if (current.trim()) return current;
2132
+ process.env.PATH = DEFAULT_NODE_PATH;
2133
+ return DEFAULT_NODE_PATH;
2134
+ }
2135
+ async function resolveNodeHostGatewayCredentials(params) {
2136
+ return await resolveGatewayConnectionAuth({
2137
+ config: (params.config.gateway?.mode === "remote" ? "remote" : "local") === "local" ? buildNodeHostLocalAuthConfig(params.config) : params.config,
2138
+ env: params.env,
2139
+ includeLegacyEnv: false,
2140
+ localTokenPrecedence: "env-first",
2141
+ localPasswordPrecedence: "env-first",
2142
+ remoteTokenPrecedence: "env-first",
2143
+ remotePasswordPrecedence: "env-first"
2144
+ });
2145
+ }
2146
+ function buildNodeHostLocalAuthConfig(config) {
2147
+ if (!config.gateway?.remote?.token && !config.gateway?.remote?.password) return config;
2148
+ const nextConfig = structuredClone(config);
2149
+ if (nextConfig.gateway?.remote) {
2150
+ nextConfig.gateway.remote.token = void 0;
2151
+ nextConfig.gateway.remote.password = void 0;
2152
+ }
2153
+ return nextConfig;
2154
+ }
2155
+ async function runNodeHost(opts) {
2156
+ const config = await ensureNodeHostConfig();
2157
+ const nodeId = opts.nodeId?.trim() || config.nodeId;
2158
+ if (nodeId !== config.nodeId) config.nodeId = nodeId;
2159
+ const displayName = opts.displayName?.trim() || config.displayName || await getMachineDisplayName();
2160
+ config.displayName = displayName;
2161
+ const gateway = {
2162
+ host: opts.gatewayHost,
2163
+ port: opts.gatewayPort,
2164
+ tls: opts.gatewayTls ?? loadConfig().gateway?.tls?.enabled ?? false,
2165
+ tlsFingerprint: opts.gatewayTlsFingerprint
2166
+ };
2167
+ config.gateway = gateway;
2168
+ await saveNodeHostConfig(config);
2169
+ const cfg = loadConfig();
2170
+ const resolvedBrowser = resolveBrowserConfig(cfg.browser, cfg);
2171
+ const browserProxyEnabled = cfg.nodeHost?.browserProxy?.enabled !== false && resolvedBrowser.enabled;
2172
+ const { token, password } = await resolveNodeHostGatewayCredentials({
2173
+ config: cfg,
2174
+ env: process.env
2175
+ });
2176
+ const host = gateway.host ?? "127.0.0.1";
2177
+ const port = gateway.port ?? 18789;
2178
+ const url = `${gateway.tls ? "wss" : "ws"}://${host}:${port}`;
2179
+ const pathEnv = ensureNodePathEnv();
2180
+ const client = new GatewayClient({
2181
+ url,
2182
+ token: token || void 0,
2183
+ password: password || void 0,
2184
+ instanceId: nodeId,
2185
+ clientName: GATEWAY_CLIENT_NAMES.NODE_HOST,
2186
+ clientDisplayName: displayName,
2187
+ clientVersion: VERSION,
2188
+ platform: process.platform,
2189
+ mode: GATEWAY_CLIENT_MODES.NODE,
2190
+ role: "node",
2191
+ scopes: [],
2192
+ caps: ["system", ...browserProxyEnabled ? ["browser"] : []],
2193
+ commands: [
2194
+ ...NODE_SYSTEM_RUN_COMMANDS,
2195
+ ...NODE_EXEC_APPROVALS_COMMANDS,
2196
+ ...browserProxyEnabled ? [NODE_BROWSER_PROXY_COMMAND] : []
2197
+ ],
2198
+ pathEnv,
2199
+ permissions: void 0,
2200
+ deviceIdentity: loadOrCreateDeviceIdentity(),
2201
+ tlsFingerprint: gateway.tlsFingerprint,
2202
+ onEvent: (evt) => {
2203
+ if (evt.event !== "node.invoke.request") return;
2204
+ const payload = coerceNodeInvokePayload(evt.payload);
2205
+ if (!payload) return;
2206
+ handleInvoke(payload, client, skillBins);
2207
+ },
2208
+ onConnectError: (err) => {
2209
+ console.error(`node host gateway connect failed: ${err.message}`);
2210
+ },
2211
+ onClose: (code, reason) => {
2212
+ console.error(`node host gateway closed (${code}): ${reason}`);
2213
+ }
2214
+ });
2215
+ const skillBins = new SkillBinsCache(async () => {
2216
+ const res = await client.request("skills.bins", {});
2217
+ return Array.isArray(res?.bins) ? res.bins.map((bin) => String(bin)) : [];
2218
+ }, pathEnv);
2219
+ client.start();
2220
+ await new Promise(() => {});
2221
+ }
2222
+ //#endregion
2223
+ //#region src/commands/node-daemon-install-helpers.ts
2224
+ async function buildNodeInstallPlan(params) {
2225
+ const { devMode, nodePath } = await resolveDaemonInstallRuntimeInputs({
2226
+ env: params.env,
2227
+ runtime: params.runtime,
2228
+ devMode: params.devMode,
2229
+ nodePath: params.nodePath
2230
+ });
2231
+ const { programArguments, workingDirectory } = await resolveNodeProgramArguments({
2232
+ host: params.host,
2233
+ port: params.port,
2234
+ tls: params.tls,
2235
+ tlsFingerprint: params.tlsFingerprint,
2236
+ nodeId: params.nodeId,
2237
+ displayName: params.displayName,
2238
+ dev: devMode,
2239
+ runtime: params.runtime,
2240
+ nodePath
2241
+ });
2242
+ await emitDaemonInstallRuntimeWarning({
2243
+ env: params.env,
2244
+ runtime: params.runtime,
2245
+ programArguments,
2246
+ warn: params.warn,
2247
+ title: "Node daemon runtime"
2248
+ });
2249
+ const environment = buildNodeServiceEnvironment({
2250
+ env: params.env,
2251
+ extraPathDirs: resolveDaemonNodeBinDir(nodePath)
2252
+ });
2253
+ return {
2254
+ programArguments,
2255
+ workingDirectory,
2256
+ environment,
2257
+ description: formatNodeServiceDescription({ version: environment.OPENCLAW_SERVICE_VERSION })
2258
+ };
2259
+ }
2260
+ //#endregion
2261
+ //#region src/commands/node-daemon-runtime.ts
2262
+ const DEFAULT_NODE_DAEMON_RUNTIME = DEFAULT_GATEWAY_DAEMON_RUNTIME;
2263
+ function isNodeDaemonRuntime(value) {
2264
+ return isGatewayDaemonRuntime(value);
2265
+ }
2266
+ //#endregion
2267
+ //#region src/cli/node-cli/daemon.ts
2268
+ function renderNodeServiceStartHints() {
2269
+ return buildPlatformServiceStartHints({
2270
+ installCommand: formatCliCommand("openclaw node install"),
2271
+ startCommand: formatCliCommand("openclaw node start"),
2272
+ launchAgentPlistPath: `~/Library/LaunchAgents/${resolveNodeLaunchAgentLabel()}.plist`,
2273
+ systemdServiceName: resolveNodeSystemdServiceName(),
2274
+ windowsTaskName: resolveNodeWindowsTaskName()
2275
+ });
2276
+ }
2277
+ function buildNodeRuntimeHints(env = process.env) {
2278
+ return buildPlatformRuntimeLogHints({
2279
+ env,
2280
+ systemdServiceName: resolveNodeSystemdServiceName(),
2281
+ windowsTaskName: resolveNodeWindowsTaskName()
2282
+ });
2283
+ }
2284
+ function resolveNodeDefaults(opts, config) {
2285
+ const host = opts.host?.trim() || config?.gateway?.host || "127.0.0.1";
2286
+ const portOverride = parsePort(opts.port);
2287
+ if (opts.port !== void 0 && portOverride === null) return {
2288
+ host,
2289
+ port: null
2290
+ };
2291
+ return {
2292
+ host,
2293
+ port: portOverride ?? config?.gateway?.port ?? 18789
2294
+ };
2295
+ }
2296
+ async function runNodeDaemonInstall(opts) {
2297
+ const { json, stdout, warnings, emit, fail } = createDaemonInstallActionContext(opts.json);
2298
+ if (failIfNixDaemonInstallMode(fail)) return;
2299
+ const config = await loadNodeHostConfig();
2300
+ const { host, port } = resolveNodeDefaults(opts, config);
2301
+ if (!Number.isFinite(port ?? NaN) || (port ?? 0) <= 0) {
2302
+ fail("Invalid port");
2303
+ return;
2304
+ }
2305
+ const runtimeRaw = opts.runtime ? String(opts.runtime) : DEFAULT_NODE_DAEMON_RUNTIME;
2306
+ if (!isNodeDaemonRuntime(runtimeRaw)) {
2307
+ fail("Invalid --runtime (use \"node\" or \"bun\")");
2308
+ return;
2309
+ }
2310
+ const service = resolveNodeService();
2311
+ let loaded = false;
2312
+ try {
2313
+ loaded = await service.isLoaded({ env: process.env });
2314
+ } catch (err) {
2315
+ fail(`Node service check failed: ${String(err)}`);
2316
+ return;
2317
+ }
2318
+ if (loaded && !opts.force) {
2319
+ emit({
2320
+ ok: true,
2321
+ result: "already-installed",
2322
+ message: `Node service already ${service.loadedText}.`,
2323
+ service: buildDaemonServiceSnapshot(service, loaded),
2324
+ warnings: warnings.length ? warnings : void 0
2325
+ });
2326
+ if (!json) {
2327
+ defaultRuntime.log(`Node service already ${service.loadedText}.`);
2328
+ defaultRuntime.log(`Reinstall with: ${formatCliCommand("openclaw node install --force")}`);
2329
+ }
2330
+ return;
2331
+ }
2332
+ const tlsFingerprint = opts.tlsFingerprint?.trim() || config?.gateway?.tlsFingerprint;
2333
+ const tls = Boolean(opts.tls) || Boolean(tlsFingerprint) || Boolean(config?.gateway?.tls);
2334
+ const { programArguments, workingDirectory, environment, description } = await buildNodeInstallPlan({
2335
+ env: process.env,
2336
+ host,
2337
+ port: port ?? 18789,
2338
+ tls,
2339
+ tlsFingerprint: tlsFingerprint || void 0,
2340
+ nodeId: opts.nodeId,
2341
+ displayName: opts.displayName,
2342
+ runtime: runtimeRaw,
2343
+ warn: (message) => {
2344
+ if (json) warnings.push(message);
2345
+ else defaultRuntime.log(message);
2346
+ }
2347
+ });
2348
+ await installDaemonServiceAndEmit({
2349
+ serviceNoun: "Node",
2350
+ service,
2351
+ warnings,
2352
+ emit,
2353
+ fail,
2354
+ install: async () => {
2355
+ await service.install({
2356
+ env: process.env,
2357
+ stdout,
2358
+ programArguments,
2359
+ workingDirectory,
2360
+ environment,
2361
+ description
2362
+ });
2363
+ }
2364
+ });
2365
+ }
2366
+ async function runNodeDaemonUninstall(opts = {}) {
2367
+ return await runServiceUninstall({
2368
+ serviceNoun: "Node",
2369
+ service: resolveNodeService(),
2370
+ opts,
2371
+ stopBeforeUninstall: false,
2372
+ assertNotLoadedAfterUninstall: false
2373
+ });
2374
+ }
2375
+ async function runNodeDaemonRestart(opts = {}) {
2376
+ await runServiceRestart({
2377
+ serviceNoun: "Node",
2378
+ service: resolveNodeService(),
2379
+ renderStartHints: renderNodeServiceStartHints,
2380
+ opts
2381
+ });
2382
+ }
2383
+ async function runNodeDaemonStop(opts = {}) {
2384
+ return await runServiceStop({
2385
+ serviceNoun: "Node",
2386
+ service: resolveNodeService(),
2387
+ opts
2388
+ });
2389
+ }
2390
+ async function runNodeDaemonStatus(opts = {}) {
2391
+ const json = Boolean(opts.json);
2392
+ const service = resolveNodeService();
2393
+ const [loaded, command, runtime] = await Promise.all([
2394
+ service.isLoaded({ env: process.env }).catch(() => false),
2395
+ service.readCommand(process.env).catch(() => null),
2396
+ service.readRuntime(process.env).catch((err) => ({
2397
+ status: "unknown",
2398
+ detail: String(err)
2399
+ }))
2400
+ ]);
2401
+ const payload = { service: {
2402
+ ...buildDaemonServiceSnapshot(service, loaded),
2403
+ command,
2404
+ runtime
2405
+ } };
2406
+ if (json) {
2407
+ defaultRuntime.log(JSON.stringify(payload, null, 2));
2408
+ return;
2409
+ }
2410
+ const { rich, label, accent, infoText, okText, warnText, errorText } = createCliStatusTextStyles();
2411
+ const serviceStatus = loaded ? okText(service.loadedText) : warnText(service.notLoadedText);
2412
+ defaultRuntime.log(`${label("Service:")} ${accent(service.label)} (${serviceStatus})`);
2413
+ if (command?.programArguments?.length) defaultRuntime.log(`${label("Command:")} ${infoText(command.programArguments.join(" "))}`);
2414
+ if (command?.sourcePath) defaultRuntime.log(`${label("Service file:")} ${infoText(command.sourcePath)}`);
2415
+ if (command?.workingDirectory) defaultRuntime.log(`${label("Working dir:")} ${infoText(command.workingDirectory)}`);
2416
+ const runtimeLine = formatRuntimeStatus(runtime);
2417
+ if (runtimeLine) {
2418
+ const runtimeColor = resolveRuntimeStatusColor(runtime?.status);
2419
+ defaultRuntime.log(`${label("Runtime:")} ${colorize(rich, runtimeColor, runtimeLine)}`);
2420
+ }
2421
+ if (!loaded) {
2422
+ defaultRuntime.log("");
2423
+ for (const hint of renderNodeServiceStartHints()) defaultRuntime.log(`${warnText("Start with:")} ${infoText(hint)}`);
2424
+ return;
2425
+ }
2426
+ const baseEnv = {
2427
+ ...process.env,
2428
+ ...command?.environment ?? void 0
2429
+ };
2430
+ const hintEnv = {
2431
+ ...baseEnv,
2432
+ OPENCLAW_LOG_PREFIX: baseEnv.OPENCLAW_LOG_PREFIX ?? "node"
2433
+ };
2434
+ if (runtime?.missingUnit) {
2435
+ defaultRuntime.error(errorText("Service unit not found."));
2436
+ for (const hint of buildNodeRuntimeHints(hintEnv)) defaultRuntime.error(errorText(hint));
2437
+ return;
2438
+ }
2439
+ if (runtime?.status === "stopped") {
2440
+ defaultRuntime.error(errorText("Service is loaded but not running."));
2441
+ for (const hint of buildNodeRuntimeHints(hintEnv)) defaultRuntime.error(errorText(hint));
2442
+ }
2443
+ }
2444
+ //#endregion
2445
+ //#region src/cli/node-cli/register.ts
2446
+ function parsePortWithFallback(value, fallback) {
2447
+ return parsePort(value) ?? fallback;
2448
+ }
2449
+ function registerNodeCli(program) {
2450
+ const node = program.command("node").description("Run and manage the headless node host service").addHelpText("after", () => `\n${theme.heading("Examples:")}\n${formatHelpExamples([
2451
+ ["openclaw node run --host 127.0.0.1 --port 18789", "Run the node host in the foreground."],
2452
+ ["openclaw node status", "Check node host service status."],
2453
+ ["openclaw node install", "Install the node host service."],
2454
+ ["openclaw node restart", "Restart the installed node host service."]
2455
+ ])}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/node", "docs.openclaw.ai/cli/node")}\n`);
2456
+ node.command("run").description("Run the headless node host (foreground)").option("--host <host>", "Gateway host").option("--port <port>", "Gateway port").option("--tls", "Use TLS for the gateway connection", false).option("--tls-fingerprint <sha256>", "Expected TLS certificate fingerprint (sha256)").option("--node-id <id>", "Override node id (clears pairing token)").option("--display-name <name>", "Override node display name").action(async (opts) => {
2457
+ const existing = await loadNodeHostConfig();
2458
+ await runNodeHost({
2459
+ gatewayHost: opts.host?.trim() || existing?.gateway?.host || "127.0.0.1",
2460
+ gatewayPort: parsePortWithFallback(opts.port, existing?.gateway?.port ?? 18789),
2461
+ gatewayTls: Boolean(opts.tls) || Boolean(opts.tlsFingerprint),
2462
+ gatewayTlsFingerprint: opts.tlsFingerprint,
2463
+ nodeId: opts.nodeId,
2464
+ displayName: opts.displayName
2465
+ });
2466
+ });
2467
+ node.command("status").description("Show node host status").option("--json", "Output JSON", false).action(async (opts) => {
2468
+ await runNodeDaemonStatus(opts);
2469
+ });
2470
+ node.command("install").description("Install the node host service (launchd/systemd/schtasks)").option("--host <host>", "Gateway host").option("--port <port>", "Gateway port").option("--tls", "Use TLS for the gateway connection", false).option("--tls-fingerprint <sha256>", "Expected TLS certificate fingerprint (sha256)").option("--node-id <id>", "Override node id (clears pairing token)").option("--display-name <name>", "Override node display name").option("--runtime <runtime>", "Service runtime (node|bun). Default: node").option("--force", "Reinstall/overwrite if already installed", false).option("--json", "Output JSON", false).action(async (opts) => {
2471
+ await runNodeDaemonInstall(opts);
2472
+ });
2473
+ node.command("uninstall").description("Uninstall the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
2474
+ await runNodeDaemonUninstall(opts);
2475
+ });
2476
+ node.command("stop").description("Stop the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
2477
+ await runNodeDaemonStop(opts);
2478
+ });
2479
+ node.command("restart").description("Restart the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
2480
+ await runNodeDaemonRestart(opts);
2481
+ });
2482
+ }
2483
+ //#endregion
2484
+ export { registerNodeCli };