@qqbrowser/openclaw-qbot 0.0.127 → 0.0.129

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 (1470) hide show
  1. package/dist/account-lookup-CW-_CL7y.js +1 -1
  2. package/dist/acp-cli-01SGjPGi.js +1 -1
  3. package/dist/acp-cli-uxN405XG.js +1 -1
  4. package/dist/active-listener-BZ6loNaF.js +1 -1
  5. package/dist/active-listener-D8VOdVx3.js +1 -1
  6. package/dist/active-listener-DB5mhDuO.js +1 -1
  7. package/dist/active-listener-DeKRt_UV.js +1 -1
  8. package/dist/agent-scope-DAWJwFfl.js +1 -1
  9. package/dist/agent-scope-DXZc3eNT.js +1 -1
  10. package/dist/agents-BMh3ZeoB.js +1 -1
  11. package/dist/agents.config-B-0lZSmb.js +1 -1
  12. package/dist/agents.config-BDEN2Eph.js +1 -1
  13. package/dist/allow-from-B6dI7oz8.js +1 -1
  14. package/dist/allow-from-DEeVIPKS.js +1 -1
  15. package/dist/api-BeG0ObSq.js +1 -1
  16. package/dist/api-Dx8x1KTs.js +1 -1
  17. package/dist/api-key-rotation-C_MG2y1D.js +1 -1
  18. package/dist/api-key-rotation-D8WsZ43x.js +1 -1
  19. package/dist/api-key-rotation-DYYvcqSG.js +1 -1
  20. package/dist/api-key-rotation-dNu0GxPN.js +1 -1
  21. package/dist/arg-split-BOqSMBuf.js +1 -1
  22. package/dist/arg-split-DE5RqDHq.js +1 -1
  23. package/dist/audio-preflight--K4-eUVY.js +1 -1
  24. package/dist/audio-preflight-BKIm58PG.js +1 -1
  25. package/dist/audio-preflight-CAfi10dl.js +1 -1
  26. package/dist/audio-preflight-Xm0NL5JA.js +1 -1
  27. package/dist/audio-transcription-runner-BJNP7vB8.js +1 -1
  28. package/dist/audio-transcription-runner-BUsb6cqv.js +1 -1
  29. package/dist/audio-transcription-runner-C_31Yoq0.js +1 -1
  30. package/dist/audio-transcription-runner-CjKLRVPo.js +1 -1
  31. package/dist/audit-7DFnKINd.js +1 -1
  32. package/dist/audit-B6LsW3Ai.js +1 -1
  33. package/dist/audit-membership-runtime-BpRsMj5-.js +1 -1
  34. package/dist/audit-membership-runtime-BsfLZNBj.js +1 -1
  35. package/dist/audit-membership-runtime-DRHirRmx.js +1 -1
  36. package/dist/audit-membership-runtime-g0dEWJTp.js +1 -1
  37. package/dist/audit-membership-runtime-kdyToskD.js +1 -1
  38. package/dist/auth-choice-BNd2SNjJ.js +1 -1
  39. package/dist/auth-choice-C3aUWXx9.js +1 -1
  40. package/dist/auth-choice-DViEjgMg.js +1 -1
  41. package/dist/auth-choice-edozMf7r.js +1 -1
  42. package/dist/auth-choice-options-B3WQyS7I.js +1 -1
  43. package/dist/auth-choice-options-Dw14noox.js +1 -1
  44. package/dist/auth-choice-prompt-uegl56cf.js +1 -1
  45. package/dist/auth-choice-prompt-xYj13czb.js +1 -1
  46. package/dist/auth-choice.apply-helpers-CNLYnRxx.js +1 -1
  47. package/dist/auth-choice.apply-helpers-DCe5nTyP.js +1 -1
  48. package/dist/auth-profiles-BhXA8Jy2.js +1 -1
  49. package/dist/auth-token-C75IOb_K.js +1 -1
  50. package/dist/auth-token-CzgZf-ta.js +1 -1
  51. package/dist/banner-mIDEloRy.js +1 -1
  52. package/dist/bonjour-discovery-CpvzLjyB.js +1 -1
  53. package/dist/bonjour-discovery-wsh3Si1Q.js +1 -1
  54. package/dist/boolean-Ch3DfXPy.js +1 -1
  55. package/dist/boolean-D15s2V33.js +1 -1
  56. package/dist/boolean-DypnRoRK.js +1 -1
  57. package/dist/brew-COcDl8CB.js +1 -1
  58. package/dist/brew-DDPm_HfE.js +1 -1
  59. package/dist/browser-cli-BjzNbvF9.js +1 -1
  60. package/dist/browser-cli-CgHkgtgV.js +1 -1
  61. package/dist/build-info.json +3 -3
  62. package/dist/bundled/boot-md/handler.js +1 -1
  63. package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
  64. package/dist/bundled/command-logger/handler.js +1 -1
  65. package/dist/bundled/session-memory/handler.js +1 -1
  66. package/dist/call-BA3O_Qpl.js +1 -1
  67. package/dist/call-BQT0zCgv.js +1 -1
  68. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  69. package/dist/channel-account-context-BMPAMZEv.js +1 -1
  70. package/dist/channel-account-context-DAcarnqW.js +1 -1
  71. package/dist/channel-activity-B04WbrrK.js +1 -1
  72. package/dist/channel-activity-BPRCQpI6.js +1 -1
  73. package/dist/channel-activity-D2VTmenR.js +1 -1
  74. package/dist/channel-activity-DHY5wAyl.js +1 -1
  75. package/dist/channel-activity-DYpm-0Cz.js +1 -1
  76. package/dist/channel-options-BYmHreMn.js +1 -1
  77. package/dist/channel-options-Cbv7VETu.js +1 -1
  78. package/dist/channel-selection-Ddyykqxv.js +1 -1
  79. package/dist/channel-selection-oRONo9z3.js +1 -1
  80. package/dist/channel-web-CK4RqVCH.js +1 -1
  81. package/dist/channel-web-Xw89Exy3.js +1 -1
  82. package/dist/channels/plugins/actions/discord.js +1 -1
  83. package/dist/channels/plugins/actions/signal.js +1 -1
  84. package/dist/channels/plugins/actions/telegram.js +1 -1
  85. package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -1
  86. package/dist/channels-cli-D2y5Xk5i.js +1 -1
  87. package/dist/channels-cli-cwFjBXcP.js +1 -1
  88. package/dist/channels-status-issues-8eFrGKyf.js +1 -1
  89. package/dist/channels-status-issues-PRgOT90w.js +1 -1
  90. package/dist/chat-envelope-Bznn2SoS.js +1 -1
  91. package/dist/chat-envelope-HVpKusFc.js +1 -1
  92. package/dist/clack-prompter-DBPdGdqp.js +1 -1
  93. package/dist/clack-prompter-Dq0aY6iM.js +1 -1
  94. package/dist/clawbot-cli-BwG1-8A9.js +1 -1
  95. package/dist/clawbot-cli-CaNu5A0G.js +1 -1
  96. package/dist/cleanup-utils-BWm70DoD.js +1 -1
  97. package/dist/cleanup-utils-D-RhEX6F.js +1 -1
  98. package/dist/cli-CQKA38bc.js +1 -1
  99. package/dist/cli-i7P4bYBg.js +1 -1
  100. package/dist/cli-utils-BY7dLMFy.js +1 -1
  101. package/dist/cli-utils-BleB1eys.js +1 -1
  102. package/dist/clipboard-Bk8cviBt.js +1 -1
  103. package/dist/clipboard-CKT_VIkG.js +1 -1
  104. package/dist/cmd-argv-BBT5l8AV.js +1 -1
  105. package/dist/cmd-argv-Bh-KpaZ0.js +1 -1
  106. package/dist/command-format-BbDT1tlm.js +1 -1
  107. package/dist/command-format-CLxIPuLR.js +1 -1
  108. package/dist/command-options-BpOUDl2S.js +1 -1
  109. package/dist/command-options-Bq5nQxz6.js +1 -1
  110. package/dist/command-poll-backoff-BZLHYB2k.js +1 -1
  111. package/dist/command-poll-backoff-Cww_r-24.js +1 -1
  112. package/dist/command-poll-backoff-Df6cOQrX.js +1 -1
  113. package/dist/command-poll-backoff-endAPdwn.js +1 -1
  114. package/dist/command-registry-BYk36N_R.js +1 -1
  115. package/dist/command-secret-targets-BBTiqQKa.js +1 -1
  116. package/dist/command-secret-targets-KM3OecbM.js +1 -1
  117. package/dist/commands-CGpM84iR.js +1 -1
  118. package/dist/commands-Dy7duWlt.js +1 -1
  119. package/dist/commands-registry-B3FI6TSl.js +1 -1
  120. package/dist/commands-registry-CxDVU5s9.js +1 -1
  121. package/dist/commands-registry-Dn2uuNuy.js +1 -1
  122. package/dist/commands-registry-Du79fdAL.js +1 -1
  123. package/dist/compact-CuBCVnVS.js +1 -1
  124. package/dist/completion-cli-CRNTbZlR.js +1 -1
  125. package/dist/completion-cli-DbGDCoiM.js +1 -1
  126. package/dist/config-BqW5S1xL.js +1 -1
  127. package/dist/config-DAQjvwZw.js +1 -1
  128. package/dist/config-cli-D_coAWd9.js +1 -1
  129. package/dist/config-cli-EKXoNzLf.js +1 -1
  130. package/dist/config-guard-U0wlYLUN.js +1 -1
  131. package/dist/config-guard-XayIkveC.js +1 -1
  132. package/dist/config-validation-B0nN9egx.js +1 -1
  133. package/dist/config-validation-CAHnpjrk.js +1 -1
  134. package/dist/configure-DNnQRKy8.js +1 -1
  135. package/dist/configure-NCNskZPe.js +1 -1
  136. package/dist/connection-auth-BcPbGyxw.js +1 -1
  137. package/dist/connection-auth-DZ-3Svr_.js +1 -1
  138. package/dist/context-window-guard-7crlatf9.js +1 -1
  139. package/dist/context-window-guard-CPChk363.js +1 -1
  140. package/dist/control-ui/apple-touch-icon.png +0 -0
  141. package/dist/control-ui/assets/de-DuUYLvt1.js +1 -0
  142. package/dist/control-ui/assets/es-DHtyqUQZ.js +1 -0
  143. package/dist/control-ui/assets/index-CYbiPp9k.js +8383 -0
  144. package/dist/control-ui/assets/index-C_GaJ8wS.css +1 -0
  145. package/dist/control-ui/assets/pt-BR-D2dJb9G8.js +1 -0
  146. package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js +1 -0
  147. package/dist/control-ui/assets/zh-TW-cW5xB87I.js +1 -0
  148. package/dist/control-ui/favicon-32.png +0 -0
  149. package/dist/control-ui/favicon.ico +0 -0
  150. package/dist/control-ui/favicon.svg +22 -0
  151. package/dist/control-ui/index.html +17 -0
  152. package/dist/control-ui-assets-BIa0GGDg.js +1 -1
  153. package/dist/control-ui-assets-CTHGGgaX.js +1 -1
  154. package/dist/cron-cli-Cro66JtU.js +1 -1
  155. package/dist/cron-cli-DIeBukvk.js +1 -1
  156. package/dist/daemon-cli-Cw_fxNgE.js +1 -1
  157. package/dist/daemon-cli-DQsKS3pT.js +1 -1
  158. package/dist/daemon-cli.js +1 -1
  159. package/dist/daemon-install-C_DmJEkV.js +1 -1
  160. package/dist/daemon-install-D1DacLbM.js +1 -1
  161. package/dist/daemon-install-plan.shared-BSDdwWjB.js +1 -1
  162. package/dist/daemon-install-plan.shared-Dx3DBXCG.js +1 -1
  163. package/dist/daemon-runtime-DHiDbRuC.js +1 -1
  164. package/dist/daemon-runtime-VcpeBRJV.js +1 -1
  165. package/dist/dangerous-name-matching-BOmvAibz.js +1 -1
  166. package/dist/dangerous-name-matching-DtllRqBD.js +1 -1
  167. package/dist/dangerous-tools-CFRYQJ6V.js +1 -1
  168. package/dist/dangerous-tools-oYCu5wfC.js +1 -1
  169. package/dist/deliver-2c-EsQ_W.js +1 -1
  170. package/dist/deliver-BudDnEIb.js +1 -1
  171. package/dist/deliver-COKdxPmA.js +1 -1
  172. package/dist/deliver-DHP2vHKB.js +1 -1
  173. package/dist/delivery-queue-CKbauSFq.js +1 -1
  174. package/dist/delivery-queue-nkPJu0fY.js +1 -1
  175. package/dist/device-pairing-4eDo43Kk.js +1 -1
  176. package/dist/device-pairing-B7ZXiXp3.js +1 -1
  177. package/dist/devices-cli-BXUIb_UN.js +1 -1
  178. package/dist/devices-cli-D7PkbnHO.js +1 -1
  179. package/dist/diagnostic-Bzd5vlKH.js +1 -1
  180. package/dist/diagnostic-CFmHdXHP.js +1 -1
  181. package/dist/diagnostic-CW_Jv5UM.js +1 -1
  182. package/dist/diagnostic-Dza7-pMC.js +1 -1
  183. package/dist/diagnostics-BgbeL9KE.js +1 -1
  184. package/dist/diagnostics-Cdctg9K_.js +1 -1
  185. package/dist/directory-cli-CxeuNJcC.js +1 -1
  186. package/dist/directory-cli-DFlYCB5L.js +1 -1
  187. package/dist/dns-cli-BDbHznhi.js +1 -1
  188. package/dist/dns-cli-OuwliJ60.js +1 -1
  189. package/dist/docs-cli-Cdw9Iz9a.js +1 -1
  190. package/dist/docs-cli-ClD2UyX1.js +1 -1
  191. package/dist/doctor-completion-BSOX-LSq.js +1 -1
  192. package/dist/doctor-completion-DXqdpdlo.js +1 -1
  193. package/dist/doctor-config-flow-DHB8N7tT.js +1 -1
  194. package/dist/doctor-config-flow-MjfHBDlw.js +1 -1
  195. package/dist/enable-DVuqWT2a.js +1 -1
  196. package/dist/enable-DWaSH1HY.js +1 -1
  197. package/dist/entry-status-CCwwKO43.js +1 -1
  198. package/dist/entry-status-CoXkbJcX.js +1 -1
  199. package/dist/entry.js +1 -1
  200. package/dist/env-D7wNuBx1.js +1 -1
  201. package/dist/env-overrides-DHtB4kK3.js +1 -1
  202. package/dist/env-overrides-DXJbFrwI.js +1 -1
  203. package/dist/errors-6SQWM9dj.js +1 -1
  204. package/dist/errors-Bunti32V.js +1 -1
  205. package/dist/exec-B3eleY5O.js +1 -1
  206. package/dist/exec-DHqLtFYt.js +1 -1
  207. package/dist/exec-approvals-BXO9Cezj.js +1 -1
  208. package/dist/exec-approvals-BpBNEy6i.js +1 -1
  209. package/dist/exec-approvals-allowlist-BKFaHvA5.js +1 -1
  210. package/dist/exec-approvals-allowlist-DBh9Pm77.js +1 -1
  211. package/dist/exec-approvals-cli-0neCwpk-.js +1 -1
  212. package/dist/exec-approvals-cli-BuHSw09B.js +1 -1
  213. package/dist/exec-safe-bin-runtime-policy-Ck3GO5AB.js +1 -1
  214. package/dist/exec-safe-bin-runtime-policy-D2WexijZ.js +1 -1
  215. package/dist/fetch-BI3CnKE3.js +1 -1
  216. package/dist/fetch-BJT3BrkJ.js +1 -1
  217. package/dist/fetch-Bn0mWg6a.js +1 -1
  218. package/dist/fetch-CY5G3PDq.js +1 -1
  219. package/dist/fetch-Ce-scEU-.js +1 -1
  220. package/dist/fetch-D0rZDHKO.js +1 -1
  221. package/dist/fetch-DHo17YmK.js +1 -1
  222. package/dist/fetch-Dh-apy46.js +1 -1
  223. package/dist/fetch-Dikjvc5M.js +1 -1
  224. package/dist/fetch-DsjPfQlp.js +1 -1
  225. package/dist/fetch-_g8lZ8K8.js +1 -1
  226. package/dist/fetch-guard-BaRbr_V6.js +1 -1
  227. package/dist/fetch-guard-BmNIhXP-.js +1 -1
  228. package/dist/fetch-guard-ChVqc0HF.js +1 -1
  229. package/dist/fetch-guard-Cji70DJW.js +1 -1
  230. package/dist/fetch-hy0JKSsm.js +1 -1
  231. package/dist/fetch-timeout-CdYxWG9w.js +1 -1
  232. package/dist/fetch-timeout-Cj8_oAls.js +1 -1
  233. package/dist/fetch-timeout-DoOI_izT.js +1 -1
  234. package/dist/fetch-timeout-u8g99Ax0.js +1 -1
  235. package/dist/fetch-xT2jRpqs.js +1 -1
  236. package/dist/format-Bn1bwJKX.js +1 -1
  237. package/dist/format-Ce7I7s-k.js +1 -1
  238. package/dist/format-duration-C8AzNqKh.js +1 -1
  239. package/dist/format-duration-D5AMtmHa.js +1 -1
  240. package/dist/format-relative-B9pSIdGe.js +1 -1
  241. package/dist/format-relative-DkMjYy7z.js +1 -1
  242. package/dist/frontmatter-BkZkwkVO.js +1 -1
  243. package/dist/frontmatter-C7mzDNxd.js +1 -1
  244. package/dist/frontmatter-CzpfPBFl.js +1 -1
  245. package/dist/gateway-cli-Bj-BYgGN.js +1 -1
  246. package/dist/gateway-cli-DP65otLl.js +1 -1
  247. package/dist/gateway-install-token-BIqlEgy0.js +1 -1
  248. package/dist/gateway-install-token-CtUJl3A3.js +1 -1
  249. package/dist/gateway-rpc-DJHjmEZz.js +1 -1
  250. package/dist/gateway-rpc-XRAMeV67.js +1 -1
  251. package/dist/github-copilot-token-C79yeDKS.js +1 -1
  252. package/dist/github-copilot-token-DGYAlOmV.js +1 -1
  253. package/dist/github-copilot-token-DePP-lIf.js +1 -1
  254. package/dist/github-copilot-token-wm6mbypz.js +1 -1
  255. package/dist/gmail-setup-utils-CYOH3zzx.js +1 -1
  256. package/dist/gmail-setup-utils-S-MyEGuj.js +1 -1
  257. package/dist/group-access-BHKVOhrj.js +1 -1
  258. package/dist/group-access-D2DOYMfr.js +1 -1
  259. package/dist/health-Bedsiigi.js +1 -1
  260. package/dist/health-Cy_CvKbX.js +1 -1
  261. package/dist/health-format-B1nj3Wfn.js +1 -1
  262. package/dist/health-format-VBr6LEpt.js +1 -1
  263. package/dist/heartbeat-visibility-BQ_esv2m.js +1 -1
  264. package/dist/heartbeat-visibility-q74UdY8O.js +1 -1
  265. package/dist/help-format-B4aEI7V9.js +1 -1
  266. package/dist/help-format-BRbF_INg.js +1 -1
  267. package/dist/helpers-COz1ghcB.js +1 -1
  268. package/dist/helpers-Cp8gcO6u.js +1 -1
  269. package/dist/hooks-cli-DrnH2iDk.js +1 -1
  270. package/dist/hooks-cli-DvfZKyZl.js +1 -1
  271. package/dist/hooks-status-BHt-Xvh4.js +1 -1
  272. package/dist/hooks-status-CRJ4J0ZW.js +1 -1
  273. package/dist/image-BJC11A7e.js +1 -1
  274. package/dist/image-BKPxWO_2.js +1 -1
  275. package/dist/image-Ba-mOMMV.js +1 -1
  276. package/dist/image-D-R3N1it.js +1 -1
  277. package/dist/index.js +1 -1
  278. package/dist/inspect-BKV-I1UE.js +1 -1
  279. package/dist/inspect-z59cgmYc.js +1 -1
  280. package/dist/install-safe-path-C6kc_8NW.js +1 -1
  281. package/dist/install-safe-path-iesxijn2.js +1 -1
  282. package/dist/installs-BNeI_oML.js +1 -1
  283. package/dist/installs-C1xQLuby.js +1 -1
  284. package/dist/ipv4-BXZDlz5C.js +1 -1
  285. package/dist/ipv4-BnPLbv6y.js +1 -1
  286. package/dist/ir-BYCrFFZ9.js +1 -1
  287. package/dist/ir-CH7YvSi9.js +1 -1
  288. package/dist/ir-CSysIkNU.js +1 -1
  289. package/dist/ir-CZdZsdnI.js +1 -1
  290. package/dist/is-main-DG5ueqhF.js +1 -1
  291. package/dist/issue-format-CpTuk_rQ.js +1 -1
  292. package/dist/issue-format-kj7FXHhi.js +1 -1
  293. package/dist/kill-tree-DBJW8_Q-.js +1 -1
  294. package/dist/lifecycle-core-B72WHNHV.js +1 -1
  295. package/dist/lifecycle-core-dhkH_Nux.js +1 -1
  296. package/dist/line/accounts.js +1 -1
  297. package/dist/line/send.js +1 -1
  298. package/dist/line/template-messages.js +1 -1
  299. package/dist/links-CBnmRP9D.js +1 -1
  300. package/dist/links-CySwdMcF.js +1 -1
  301. package/dist/llm-slug-generator.js +1 -1
  302. package/dist/load-options-BsOW74dp.js +1 -1
  303. package/dist/load-options-C7dLuybp.js +1 -1
  304. package/dist/load-options-DV4j6Aqb.js +1 -1
  305. package/dist/load-options-Dwt0CeEg.js +1 -1
  306. package/dist/local-roots-Dxioh0C2.js +1 -1
  307. package/dist/logger-5W0OocJW.js +1 -1
  308. package/dist/logger-Bl8URnrW.js +1 -1
  309. package/dist/logger-DwWqfo66.js +1 -1
  310. package/dist/logger-kQAOe3qp.js +1 -1
  311. package/dist/logging-Dz4Qg6th.js +1 -1
  312. package/dist/logging-KiJmOmw4.js +1 -1
  313. package/dist/login-BMZxDYaU.js +1 -1
  314. package/dist/login-BdzP8F8J.js +1 -1
  315. package/dist/login-BzU0cMck.js +1 -1
  316. package/dist/login-Cb1A6qwM.js +1 -1
  317. package/dist/login-qr-BgsmAwKm.js +1 -1
  318. package/dist/login-qr-Bux8gWTO.js +1 -1
  319. package/dist/login-qr-COr_25Hx.js +1 -1
  320. package/dist/login-qr-CxBPOOAK.js +1 -1
  321. package/dist/login-qr-DnQm7bM4.js +1 -1
  322. package/dist/logs-cli-BM2XCmrH.js +1 -1
  323. package/dist/logs-cli-HKhyxaUs.js +1 -1
  324. package/dist/manager-B6zZuJEB.js +1 -1
  325. package/dist/manager-BwrZfep3.js +1 -1
  326. package/dist/manager-C5SBozw4.js +1 -1
  327. package/dist/manager-CjihRbGa.js +1 -1
  328. package/dist/memory-cli-CnruTL1h.js +1 -1
  329. package/dist/memory-cli-DHvscp7X.js +1 -1
  330. package/dist/model-catalog-BLdaFmIo.js +1 -1
  331. package/dist/model-catalog-vNCcsy4h.js +1 -1
  332. package/dist/model-param-b-B0r2cPDw.js +1 -1
  333. package/dist/model-param-b-BqIr5rY5.js +1 -1
  334. package/dist/model-picker-BaeW3tiV.js +1 -1
  335. package/dist/model-picker-DN0czUYS.js +1 -1
  336. package/dist/model-selection-C2QwHmXT.js +1 -1
  337. package/dist/model-selection-I1ctjFOB.js +1 -1
  338. package/dist/model-selection-qkByRv5A.js +1 -1
  339. package/dist/models-UTdl0vXO.js +1 -1
  340. package/dist/models-cli-QRONP7EL.js +1 -1
  341. package/dist/models-cli-vRoB_gfX.js +1 -1
  342. package/dist/models-config-CWIlroKT.js +1 -1
  343. package/dist/models-config-DN2Q51fC.js +1 -1
  344. package/dist/mutable-allowlist-detectors-C4rNVag8.js +1 -1
  345. package/dist/mutable-allowlist-detectors-CL0qe54J.js +1 -1
  346. package/dist/node-cli-2-E4-83G.js +1 -1
  347. package/dist/node-cli-DUI7Zctj.js +1 -1
  348. package/dist/node-command-policy-Bbmnc16l.js +1 -1
  349. package/dist/node-command-policy-DgkwfoCs.js +1 -1
  350. package/dist/node-commands-8GBOiktk.js +1 -1
  351. package/dist/node-commands-DdkziOTx.js +1 -1
  352. package/dist/node-resolve-B3BJbmQX.js +1 -1
  353. package/dist/node-resolve-DLZf3-1V.js +1 -1
  354. package/dist/node-service-BRfrNp8l.js +1 -1
  355. package/dist/node-service-C0bl7jcZ.js +1 -1
  356. package/dist/node-shell-dXp4vk-i.js +1 -1
  357. package/dist/nodes-cli-DU13-dCL.js +1 -1
  358. package/dist/nodes-cli-rPeIRj_f.js +1 -1
  359. package/dist/nodes-screen-C7-5RrbN.js +1 -1
  360. package/dist/note-D4GAwgha.js +1 -1
  361. package/dist/note-Dp-d_utk.js +1 -1
  362. package/dist/npm-pack-install-B23L-AtF.js +1 -1
  363. package/dist/npm-pack-install-C0te3Oap.js +1 -1
  364. package/dist/npm-resolution-BCXCw93f.js +1 -1
  365. package/dist/npm-resolution-Cmm82lui.js +1 -1
  366. package/dist/oauth-env-DAamJ1oz.js +1 -1
  367. package/dist/oauth-env-DSLBTWb1.js +1 -1
  368. package/dist/oauth-tls-preflight-BSBRDIfC.js +1 -1
  369. package/dist/oauth-tls-preflight-ByNjbUR5.js +1 -1
  370. package/dist/ollama-setup-CKt3tF-S.js +1 -1
  371. package/dist/ollama-setup-I8lghdX1.js +1 -1
  372. package/dist/onboard-B3WSjKCu.js +1 -1
  373. package/dist/onboard-C65vdb94.js +1 -1
  374. package/dist/onboard-channels-9CmG3Jgn.js +1 -1
  375. package/dist/onboard-channels-CV1AK9jY.js +1 -1
  376. package/dist/onboard-config-B7U20YRw.js +1 -1
  377. package/dist/onboard-config-DS9dUv8M.js +1 -1
  378. package/dist/onboard-custom-CwHYUB0T.js +1 -1
  379. package/dist/onboard-custom-uwufXtQf.js +1 -1
  380. package/dist/onboard-helpers-CGJLUoxR.js +1 -1
  381. package/dist/onboard-helpers-DbpWQoiB.js +1 -1
  382. package/dist/onboard-hooks-CERzXObm.js +1 -1
  383. package/dist/onboard-hooks-gQ3sxBNi.js +1 -1
  384. package/dist/onboard-provider-auth-flags-CqbipO7D.js +1 -1
  385. package/dist/onboard-provider-auth-flags-Dvwzdz37.js +1 -1
  386. package/dist/onboard-remote-BeDZ_gbH.js +1 -1
  387. package/dist/onboard-remote-KTUx-3G1.js +1 -1
  388. package/dist/onboard-search-f2tJD4hg.js +1 -1
  389. package/dist/onboard-search-fslKKhyg.js +1 -1
  390. package/dist/onboard-skills-BoS_oVdm.js +1 -1
  391. package/dist/onboard-skills-C4omGWoD.js +1 -1
  392. package/dist/onboarding-B8icigkk.js +1 -1
  393. package/dist/onboarding-BJRqNsZ8.js +1 -1
  394. package/dist/onboarding.finalize-D0qISqn-.js +1 -1
  395. package/dist/onboarding.finalize-Ds9NwPBL.js +1 -1
  396. package/dist/onboarding.gateway-config-F8n_QFUR.js +1 -1
  397. package/dist/onboarding.gateway-config-eno73eHw.js +1 -1
  398. package/dist/onboarding.secret-input-B6fzeucQ.js +1 -1
  399. package/dist/onboarding.secret-input-CBuD3c32.js +1 -1
  400. package/dist/openai-codex-model-default-Df2T3foI.js +1 -1
  401. package/dist/openai-codex-model-default-DtIeKJm0.js +1 -1
  402. package/dist/openai-model-default-DIE55yBt.js +1 -1
  403. package/dist/openai-model-default-sqvWk4kB.js +1 -1
  404. package/dist/openclaw-exec-env-BWbOu_YC.js +1 -1
  405. package/dist/openclaw-root-CnsBf6ZU.js +1 -1
  406. package/dist/openclaw-root-D_0Q6--h.js +1 -1
  407. package/dist/outbound-B88MLJN3.js +1 -1
  408. package/dist/outbound-C-4qToKv.js +1 -1
  409. package/dist/outbound-CSk4oF0g.js +1 -1
  410. package/dist/outbound-DKMI_4xm.js +1 -1
  411. package/dist/outbound-attachment-BOax42-M.js +1 -1
  412. package/dist/outbound-attachment-DBNxdLYh.js +1 -1
  413. package/dist/outbound-attachment-DVjJQ3V6.js +1 -1
  414. package/dist/outbound-attachment-aZWcoZ-N.js +1 -1
  415. package/dist/pairing-cli-Cby6Ww8F.js +1 -1
  416. package/dist/pairing-cli-DiJb_a0V.js +1 -1
  417. package/dist/pairing-labels-BP1h0iHy.js +1 -1
  418. package/dist/pairing-labels-ryOnuOFA.js +1 -1
  419. package/dist/pairing-store-Bv4KSELv.js +1 -1
  420. package/dist/pairing-store-CjTPxq0X.js +1 -1
  421. package/dist/pairing-token-CKX1ds78.js +1 -1
  422. package/dist/pairing-token-CX0SUJsB.js +1 -1
  423. package/dist/parse-duration-XTjMKl8s.js +1 -1
  424. package/dist/parse-finite-number-DqzUM-_s.js +1 -1
  425. package/dist/parse-finite-number-dBmDLLKL.js +1 -1
  426. package/dist/parse-log-line-CsYLg7Qu.js +1 -1
  427. package/dist/parse-log-line-NV-cipB_.js +1 -1
  428. package/dist/parse-port-Bv1Y9Wk5.js +1 -1
  429. package/dist/parse-port-JVwkxcZ8.js +1 -1
  430. package/dist/parse-timeout-DWSGfCkQ.js +1 -1
  431. package/dist/parse-timeout-Dx4QnVzo.js +1 -1
  432. package/dist/path-alias-guards-kY_ZbWs-.js +1 -1
  433. package/dist/path-alias-guards-mvyLCPlN.js +1 -1
  434. package/dist/path-env-BPd1Yd-i.js +1 -1
  435. package/dist/path-env-emdAQejM.js +1 -1
  436. package/dist/path-safety-BukYK8Kd.js +1 -1
  437. package/dist/path-safety-DaaMJFdt.js +1 -1
  438. package/dist/paths-B4IRk3wi.js +1 -1
  439. package/dist/paths-BfjJY2VL.js +1 -1
  440. package/dist/paths-BjD3T_xq.js +1 -1
  441. package/dist/paths-BpQOWYiT.js +1 -1
  442. package/dist/paths-CChBdtE8.js +1 -1
  443. package/dist/paths-CrCoPIVK.js +1 -1
  444. package/dist/paths-piJASC5k.js +1 -1
  445. package/dist/paths-yLEk_25I.js +1 -1
  446. package/dist/pi-embedded-ZEWNj7P5.js +1 -1
  447. package/dist/pi-embedded-bqE4EmdD.js +1 -1
  448. package/dist/pi-model-discovery-6myCPEJE.js +1 -1
  449. package/dist/pi-model-discovery-AiV9h8k6.js +1 -1
  450. package/dist/pi-model-discovery-BzqdozHB.js +1 -1
  451. package/dist/pi-model-discovery-C8YBu6D4.js +1 -1
  452. package/dist/pi-tools.before-tool-call.runtime-CPAJMO7J.js +1 -1
  453. package/dist/pi-tools.before-tool-call.runtime-CYmLHod0.js +1 -1
  454. package/dist/pi-tools.before-tool-call.runtime-CfVqI0Ng.js +1 -1
  455. package/dist/pi-tools.before-tool-call.runtime-D9FlPJ_v.js +1 -1
  456. package/dist/pi-tools.policy-CeSKHaKa.js +1 -1
  457. package/dist/plugin-auto-enable-Cp7L8ko8.js +1 -1
  458. package/dist/plugin-auto-enable-DCOxqfDQ.js +1 -1
  459. package/dist/plugin-install-plan-BobX0y9S.js +1 -1
  460. package/dist/plugin-install-plan-NvDGp0d8.js +1 -1
  461. package/dist/plugin-registry-Fg000e4I.js +1 -1
  462. package/dist/plugin-registry-fm5tDUbE.js +1 -1
  463. package/dist/plugin-sdk/account-id.cjs +1 -1
  464. package/dist/plugin-sdk/account-id.js +1 -1
  465. package/dist/plugin-sdk/acpx.cjs +1 -1
  466. package/dist/plugin-sdk/acpx.js +1 -1
  467. package/dist/plugin-sdk/active-listener-BFeaYGID.js +1 -1
  468. package/dist/plugin-sdk/active-listener-BszCM2Au.cjs +1 -1
  469. package/dist/plugin-sdk/active-listener-CIcleJgU.cjs +1 -1
  470. package/dist/plugin-sdk/active-listener-Cqgd7xVh.cjs +1 -1
  471. package/dist/plugin-sdk/active-listener-D578zEtk.cjs +1 -1
  472. package/dist/plugin-sdk/active-listener-D6gGPLq-.js +1 -1
  473. package/dist/plugin-sdk/active-listener-DKSZRn4x.cjs +1 -1
  474. package/dist/plugin-sdk/active-listener-DNO10F1L.js +1 -1
  475. package/dist/plugin-sdk/active-listener-DQq07Aar.js +1 -1
  476. package/dist/plugin-sdk/active-listener-Dle_kYqb.js +1 -1
  477. package/dist/plugin-sdk/active-listener-DmJcHkMC.js +1 -1
  478. package/dist/plugin-sdk/active-listener-UmFpcYFY.cjs +1 -1
  479. package/dist/plugin-sdk/api-key-rotation-39TRXDEA.cjs +1 -1
  480. package/dist/plugin-sdk/api-key-rotation-7qlqJ_ou.js +1 -1
  481. package/dist/plugin-sdk/api-key-rotation-BY7fLi9z.js +1 -1
  482. package/dist/plugin-sdk/api-key-rotation-CF9_CKS-.cjs +1 -1
  483. package/dist/plugin-sdk/api-key-rotation-CWylhFOt.cjs +1 -1
  484. package/dist/plugin-sdk/api-key-rotation-ClZmonv2.js +1 -1
  485. package/dist/plugin-sdk/api-key-rotation-CmesQWXP.cjs +1 -1
  486. package/dist/plugin-sdk/api-key-rotation-Cs6II2__.js +1 -1
  487. package/dist/plugin-sdk/api-key-rotation-CxaiMcI1.js +1 -1
  488. package/dist/plugin-sdk/api-key-rotation-D5cfmg7E.cjs +1 -1
  489. package/dist/plugin-sdk/api-key-rotation-DkP7KnSm.cjs +1 -1
  490. package/dist/plugin-sdk/api-key-rotation-mDqgBFMG.js +1 -1
  491. package/dist/plugin-sdk/audio-preflight-B-HrF5Oc.js +1 -1
  492. package/dist/plugin-sdk/audio-preflight-B2MGeSoT.js +1 -1
  493. package/dist/plugin-sdk/audio-preflight-BVjiz_Qk.cjs +1 -1
  494. package/dist/plugin-sdk/audio-preflight-Behqe7F3.cjs +1 -1
  495. package/dist/plugin-sdk/audio-preflight-C0ncOCbK.cjs +1 -1
  496. package/dist/plugin-sdk/audio-preflight-C1o1n-KK.js +1 -1
  497. package/dist/plugin-sdk/audio-preflight-CzLYTZ5P.cjs +1 -1
  498. package/dist/plugin-sdk/audio-preflight-DDiBwIB9.js +1 -1
  499. package/dist/plugin-sdk/audio-preflight-DQyh-XSn.cjs +1 -1
  500. package/dist/plugin-sdk/audio-preflight-WH9WDR81.cjs +1 -1
  501. package/dist/plugin-sdk/audio-preflight-ZPLO3G1S.js +1 -1
  502. package/dist/plugin-sdk/audio-preflight-s3BAID12.js +1 -1
  503. package/dist/plugin-sdk/audio-transcription-runner-2-ZQ5Md-.cjs +1 -1
  504. package/dist/plugin-sdk/audio-transcription-runner-BO7T_SzP.cjs +1 -1
  505. package/dist/plugin-sdk/audio-transcription-runner-CRYJlAeP.js +1 -1
  506. package/dist/plugin-sdk/audio-transcription-runner-CmW24oVR.js +1 -1
  507. package/dist/plugin-sdk/audio-transcription-runner-CmYuWS0_.cjs +1 -1
  508. package/dist/plugin-sdk/audio-transcription-runner-CslXJs5c.js +1 -1
  509. package/dist/plugin-sdk/audio-transcription-runner-DE1tKTQV.cjs +1 -1
  510. package/dist/plugin-sdk/audio-transcription-runner-DZR84B28.js +1 -1
  511. package/dist/plugin-sdk/audio-transcription-runner-DoR-NOcV.cjs +1 -1
  512. package/dist/plugin-sdk/audio-transcription-runner-IE4olXkd.cjs +1 -1
  513. package/dist/plugin-sdk/audio-transcription-runner-YiDQM_Rb.js +1 -1
  514. package/dist/plugin-sdk/audio-transcription-runner-kAVM4YFR.js +1 -1
  515. package/dist/plugin-sdk/audit-membership-runtime-7LqcvqFo.js +1 -1
  516. package/dist/plugin-sdk/audit-membership-runtime-BQFUzFc0.cjs +1 -1
  517. package/dist/plugin-sdk/audit-membership-runtime-BYtdDX9G.cjs +1 -1
  518. package/dist/plugin-sdk/audit-membership-runtime-BzEtBUX6.cjs +1 -1
  519. package/dist/plugin-sdk/audit-membership-runtime-CBUmGrl4.js +1 -1
  520. package/dist/plugin-sdk/audit-membership-runtime-ChlVgt2y.js +1 -1
  521. package/dist/plugin-sdk/audit-membership-runtime-DLRX7LR0.js +1 -1
  522. package/dist/plugin-sdk/audit-membership-runtime-DbJW5X3L.cjs +1 -1
  523. package/dist/plugin-sdk/audit-membership-runtime-Du9LAxDa.cjs +1 -1
  524. package/dist/plugin-sdk/audit-membership-runtime-DylNnj1m.js +1 -1
  525. package/dist/plugin-sdk/audit-membership-runtime-voi5sPwF.js +1 -1
  526. package/dist/plugin-sdk/audit-membership-runtime-yWYvSpgZ.cjs +1 -1
  527. package/dist/plugin-sdk/bluebubbles.cjs +1 -1
  528. package/dist/plugin-sdk/bluebubbles.js +1 -1
  529. package/dist/plugin-sdk/channel-activity-Bed876M5.js +1 -1
  530. package/dist/plugin-sdk/channel-activity-Bu8tAmGa.cjs +1 -1
  531. package/dist/plugin-sdk/channel-activity-C01Im_o1.js +1 -1
  532. package/dist/plugin-sdk/channel-activity-CIycjzUC.js +1 -1
  533. package/dist/plugin-sdk/channel-activity-Cdkn3O_i.js +1 -1
  534. package/dist/plugin-sdk/channel-activity-Cia2G3v5.js +1 -1
  535. package/dist/plugin-sdk/channel-activity-D6d2wU8H.cjs +1 -1
  536. package/dist/plugin-sdk/channel-activity-DNv7JLBx.cjs +1 -1
  537. package/dist/plugin-sdk/channel-activity-Df3DfYyZ.cjs +1 -1
  538. package/dist/plugin-sdk/channel-activity-Rut-HCfT.cjs +1 -1
  539. package/dist/plugin-sdk/channel-activity-mffNSQrX.cjs +1 -1
  540. package/dist/plugin-sdk/channel-activity-qjwFifkE.js +1 -1
  541. package/dist/plugin-sdk/channel-web-Ces_xx2T.js +1 -1
  542. package/dist/plugin-sdk/channel-web-CsmEnYD8.cjs +1 -1
  543. package/dist/plugin-sdk/channel-web-DtzNv49H.cjs +1 -1
  544. package/dist/plugin-sdk/channel-web-VEZVrMYU.js +1 -1
  545. package/dist/plugin-sdk/command-poll-backoff-4910Mpwp.js +1 -1
  546. package/dist/plugin-sdk/command-poll-backoff-BLJZzV5W.cjs +1 -1
  547. package/dist/plugin-sdk/command-poll-backoff-CUNcN0dv.cjs +1 -1
  548. package/dist/plugin-sdk/command-poll-backoff-Cww_r-24.js +1 -1
  549. package/dist/plugin-sdk/command-poll-backoff-D0lJhquZ.js +1 -1
  550. package/dist/plugin-sdk/command-poll-backoff-Glwt3wHa.cjs +1 -1
  551. package/dist/plugin-sdk/commands-registry-33H8WYTk.cjs +1 -1
  552. package/dist/plugin-sdk/commands-registry-BGdm1KdC.js +1 -1
  553. package/dist/plugin-sdk/commands-registry-BgV9i-bj.cjs +1 -1
  554. package/dist/plugin-sdk/commands-registry-BifdCfty.cjs +1 -1
  555. package/dist/plugin-sdk/commands-registry-CJLBIIIp.js +1 -1
  556. package/dist/plugin-sdk/commands-registry-CWK9ARbc.js +1 -1
  557. package/dist/plugin-sdk/commands-registry-CfVD1h8L.cjs +1 -1
  558. package/dist/plugin-sdk/commands-registry-CpG4pxrA.js +1 -1
  559. package/dist/plugin-sdk/commands-registry-D-AnIQWz.cjs +1 -1
  560. package/dist/plugin-sdk/commands-registry-DBI4cPqT.cjs +1 -1
  561. package/dist/plugin-sdk/commands-registry-DOBe9cWq.js +1 -1
  562. package/dist/plugin-sdk/commands-registry-DqemUyiv.js +1 -1
  563. package/dist/plugin-sdk/common-CEe87dmX.js +1 -1
  564. package/dist/plugin-sdk/common-CjMKHm2Z.cjs +1 -1
  565. package/dist/plugin-sdk/compat.cjs +1 -1
  566. package/dist/plugin-sdk/compat.js +1 -1
  567. package/dist/plugin-sdk/config-DT_csBcZ.cjs +1 -1
  568. package/dist/plugin-sdk/config-LR8GH3Ws.js +1 -1
  569. package/dist/plugin-sdk/copilot-proxy.cjs +1 -1
  570. package/dist/plugin-sdk/copilot-proxy.js +1 -1
  571. package/dist/plugin-sdk/core.cjs +1 -1
  572. package/dist/plugin-sdk/core.js +1 -1
  573. package/dist/plugin-sdk/deliver-AORlkcbD.cjs +1 -1
  574. package/dist/plugin-sdk/deliver-BiBFW5fm.cjs +1 -1
  575. package/dist/plugin-sdk/deliver-BpqEPwLO.cjs +1 -1
  576. package/dist/plugin-sdk/deliver-BvC6aUKM.js +1 -1
  577. package/dist/plugin-sdk/deliver-CT0AIuK1.cjs +1 -1
  578. package/dist/plugin-sdk/deliver-CmddcjtG.cjs +1 -1
  579. package/dist/plugin-sdk/deliver-DFz5N1Eh.js +1 -1
  580. package/dist/plugin-sdk/deliver-DcJWpoqf.cjs +1 -1
  581. package/dist/plugin-sdk/deliver-ILim6ANU.js +1 -1
  582. package/dist/plugin-sdk/deliver-QgxW9IxV.js +1 -1
  583. package/dist/plugin-sdk/deliver-cT-Q8v0h.js +1 -1
  584. package/dist/plugin-sdk/deliver-cu_NQTmb.js +1 -1
  585. package/dist/plugin-sdk/device-pair.cjs +1 -1
  586. package/dist/plugin-sdk/device-pair.js +1 -1
  587. package/dist/plugin-sdk/diagnostic-BCyE1aYH.cjs +1 -1
  588. package/dist/plugin-sdk/diagnostic-BFea3l_a.js +1 -1
  589. package/dist/plugin-sdk/diagnostic-BvR96WdC.js +1 -1
  590. package/dist/plugin-sdk/diagnostic-C0xDsk89.cjs +1 -1
  591. package/dist/plugin-sdk/diagnostic-CEPhLgsW.cjs +1 -1
  592. package/dist/plugin-sdk/diagnostic-CbLwUqTE.cjs +1 -1
  593. package/dist/plugin-sdk/diagnostic-CbfxoqI_.cjs +1 -1
  594. package/dist/plugin-sdk/diagnostic-DDwUPG1m.js +1 -1
  595. package/dist/plugin-sdk/diagnostic-DS_mKKOu.js +1 -1
  596. package/dist/plugin-sdk/diagnostic-DYpehqHU.cjs +1 -1
  597. package/dist/plugin-sdk/diagnostic-DkncnZ3G.js +1 -1
  598. package/dist/plugin-sdk/diagnostic-Dz8HPEDe.js +1 -1
  599. package/dist/plugin-sdk/diagnostics-otel.cjs +1 -1
  600. package/dist/plugin-sdk/diagnostics-otel.js +1 -1
  601. package/dist/plugin-sdk/diffs.cjs +1 -1
  602. package/dist/plugin-sdk/diffs.js +1 -1
  603. package/dist/plugin-sdk/discord.cjs +1 -1
  604. package/dist/plugin-sdk/discord.js +1 -1
  605. package/dist/plugin-sdk/dispatch-6m3206FH.js +1 -1
  606. package/dist/plugin-sdk/dispatch-BYZNaz0n.cjs +1 -1
  607. package/dist/plugin-sdk/dispatch-BahZCe-D.js +1 -1
  608. package/dist/plugin-sdk/dispatch-Bi3yeWxb.cjs +1 -1
  609. package/dist/plugin-sdk/dispatch-BjB_TqWy.cjs +1 -1
  610. package/dist/plugin-sdk/dispatch-CNR186B3.js +1 -1
  611. package/dist/plugin-sdk/dispatch-CStT30wi.cjs +1 -1
  612. package/dist/plugin-sdk/dispatch-CdZAW9dg.cjs +1 -1
  613. package/dist/plugin-sdk/dispatch-Ewg2Jgw9.js +1 -1
  614. package/dist/plugin-sdk/dispatch-HRTsdeCV.js +1 -1
  615. package/dist/plugin-sdk/feishu.cjs +1 -1
  616. package/dist/plugin-sdk/feishu.js +1 -1
  617. package/dist/plugin-sdk/fetch-7Iq9POda.js +1 -1
  618. package/dist/plugin-sdk/fetch-B1GR6-u4.js +1 -1
  619. package/dist/plugin-sdk/fetch-B27H-XCf.js +1 -1
  620. package/dist/plugin-sdk/fetch-BMYDLRWo.js +1 -1
  621. package/dist/plugin-sdk/fetch-BN9y3kTg.cjs +1 -1
  622. package/dist/plugin-sdk/fetch-BVEVk5YF.js +1 -1
  623. package/dist/plugin-sdk/fetch-BY6lVRlY.cjs +1 -1
  624. package/dist/plugin-sdk/fetch-Bi8krAaT.cjs +1 -1
  625. package/dist/plugin-sdk/fetch-BjXhwqrE.cjs +1 -1
  626. package/dist/plugin-sdk/fetch-BtZY623f.js +1 -1
  627. package/dist/plugin-sdk/fetch-C-HRWp5R.js +1 -1
  628. package/dist/plugin-sdk/fetch-C3LEMysf.js +1 -1
  629. package/dist/plugin-sdk/fetch-CCLWsYaQ.js +1 -1
  630. package/dist/plugin-sdk/fetch-CZewCAvu.cjs +1 -1
  631. package/dist/plugin-sdk/fetch-ClKErpni.cjs +1 -1
  632. package/dist/plugin-sdk/fetch-DBRI0sKI.js +1 -1
  633. package/dist/plugin-sdk/fetch-DQxuOB8o.cjs +1 -1
  634. package/dist/plugin-sdk/fetch-DUMEaqum.cjs +1 -1
  635. package/dist/plugin-sdk/fetch-DpwR_cJU.cjs +1 -1
  636. package/dist/plugin-sdk/fetch-J0IzopiJ.js +1 -1
  637. package/dist/plugin-sdk/fetch-guard-D8TdhTHU.js +1 -1
  638. package/dist/plugin-sdk/fetch-guard-DC_pFJEy.js +1 -1
  639. package/dist/plugin-sdk/fetch-guard-DDkd30BG.js +1 -1
  640. package/dist/plugin-sdk/fetch-guard-DELiFG5g.js +1 -1
  641. package/dist/plugin-sdk/fetch-guard-DIYjBRpq.cjs +1 -1
  642. package/dist/plugin-sdk/fetch-guard-DPVfELS7.js +1 -1
  643. package/dist/plugin-sdk/fetch-guard-Dpz6CnJY.cjs +1 -1
  644. package/dist/plugin-sdk/fetch-guard-DqNKwgHP.cjs +1 -1
  645. package/dist/plugin-sdk/fetch-guard-DqTxZ3G8.cjs +1 -1
  646. package/dist/plugin-sdk/fetch-guard-EoAitPe9.cjs +1 -1
  647. package/dist/plugin-sdk/fetch-guard-qfU6iTvp.js +1 -1
  648. package/dist/plugin-sdk/fetch-guard-u2Dt6P9i.cjs +1 -1
  649. package/dist/plugin-sdk/fetch-lw-aF17e.cjs +1 -1
  650. package/dist/plugin-sdk/fetch-timeout-6oZsqWxA.js +1 -1
  651. package/dist/plugin-sdk/fetch-timeout-BygUD0rd.cjs +1 -1
  652. package/dist/plugin-sdk/fetch-timeout-CLw1U7VS.js +1 -1
  653. package/dist/plugin-sdk/fetch-timeout-CX1w-9p4.cjs +1 -1
  654. package/dist/plugin-sdk/fetch-timeout-Coc9xyC3.cjs +1 -1
  655. package/dist/plugin-sdk/fetch-timeout-Cz6GuU_c.js +1 -1
  656. package/dist/plugin-sdk/fetch-timeout-DC8T2JCr.js +1 -1
  657. package/dist/plugin-sdk/fetch-timeout-DFDmks9T.cjs +1 -1
  658. package/dist/plugin-sdk/fetch-timeout-DkYpp08Q.js +1 -1
  659. package/dist/plugin-sdk/github-copilot-token-BHdMLLqf.cjs +1 -1
  660. package/dist/plugin-sdk/github-copilot-token-Bt4PduRB.js +1 -1
  661. package/dist/plugin-sdk/github-copilot-token-C1O2cBqk.cjs +1 -1
  662. package/dist/plugin-sdk/github-copilot-token-C1hiDugd.js +1 -1
  663. package/dist/plugin-sdk/github-copilot-token-C8j8_NjX.js +1 -1
  664. package/dist/plugin-sdk/github-copilot-token-CCrgp2py.cjs +1 -1
  665. package/dist/plugin-sdk/github-copilot-token-DoHgkI2r.cjs +1 -1
  666. package/dist/plugin-sdk/github-copilot-token-N8vnLZPw.js +1 -1
  667. package/dist/plugin-sdk/github-copilot-token-TMkfxxD2.cjs +1 -1
  668. package/dist/plugin-sdk/github-copilot-token-vKAKX6iE.js +1 -1
  669. package/dist/plugin-sdk/github-copilot-token-ylX_gawo.js +1 -1
  670. package/dist/plugin-sdk/github-copilot-token-zskwAEpd.cjs +1 -1
  671. package/dist/plugin-sdk/google-gemini-cli-auth.cjs +1 -1
  672. package/dist/plugin-sdk/google-gemini-cli-auth.js +1 -1
  673. package/dist/plugin-sdk/googlechat.cjs +1 -1
  674. package/dist/plugin-sdk/googlechat.js +1 -1
  675. package/dist/plugin-sdk/image-0OHO98b9.cjs +1 -1
  676. package/dist/plugin-sdk/image-B9SLKAOs.cjs +1 -1
  677. package/dist/plugin-sdk/image-BVnZq5Y4.js +1 -1
  678. package/dist/plugin-sdk/image-CKLAyhco.js +1 -1
  679. package/dist/plugin-sdk/image-DUHEJeBF.js +1 -1
  680. package/dist/plugin-sdk/image-DngxW2Nh.cjs +1 -1
  681. package/dist/plugin-sdk/image-DrPh2689.cjs +1 -1
  682. package/dist/plugin-sdk/image-ISWO0Dwt.js +1 -1
  683. package/dist/plugin-sdk/image-KfZYW6Lh.cjs +1 -1
  684. package/dist/plugin-sdk/image-YVlw68CK.js +1 -1
  685. package/dist/plugin-sdk/image-gehqJnV6.js +1 -1
  686. package/dist/plugin-sdk/image-jUYo-0eT.cjs +1 -1
  687. package/dist/plugin-sdk/imessage.cjs +1 -1
  688. package/dist/plugin-sdk/imessage.js +1 -1
  689. package/dist/plugin-sdk/index.cjs +1 -1
  690. package/dist/plugin-sdk/index.js +1 -1
  691. package/dist/plugin-sdk/ir-78toXVqC.cjs +1 -1
  692. package/dist/plugin-sdk/ir-A_TqKaXP.cjs +1 -1
  693. package/dist/plugin-sdk/ir-B0_rUT7m.js +1 -1
  694. package/dist/plugin-sdk/ir-B7agH4cQ.cjs +1 -1
  695. package/dist/plugin-sdk/ir-B9ap_YNW.cjs +1 -1
  696. package/dist/plugin-sdk/ir-BxKSHYao.cjs +1 -1
  697. package/dist/plugin-sdk/ir-BzZArF6l.js +1 -1
  698. package/dist/plugin-sdk/ir-CpkEWZD6.js +1 -1
  699. package/dist/plugin-sdk/ir-D4Dz-giw.cjs +1 -1
  700. package/dist/plugin-sdk/ir-DJ08DSkk.js +1 -1
  701. package/dist/plugin-sdk/ir-L2vhtuGx.js +1 -1
  702. package/dist/plugin-sdk/ir-ntSck5Kp.js +1 -1
  703. package/dist/plugin-sdk/irc.cjs +1 -1
  704. package/dist/plugin-sdk/irc.js +1 -1
  705. package/dist/plugin-sdk/keyed-async-queue.cjs +1 -1
  706. package/dist/plugin-sdk/keyed-async-queue.js +1 -1
  707. package/dist/plugin-sdk/line.cjs +1 -1
  708. package/dist/plugin-sdk/line.js +1 -1
  709. package/dist/plugin-sdk/llm-task.cjs +1 -1
  710. package/dist/plugin-sdk/llm-task.js +1 -1
  711. package/dist/plugin-sdk/load-options-B9Ss5YOO.js +1 -1
  712. package/dist/plugin-sdk/load-options-BOfn6Zgo.cjs +1 -1
  713. package/dist/plugin-sdk/load-options-BXvm8HVv.js +1 -1
  714. package/dist/plugin-sdk/load-options-Bb7u8yZz.cjs +1 -1
  715. package/dist/plugin-sdk/load-options-BcSg1ODN.js +1 -1
  716. package/dist/plugin-sdk/load-options-NqnXJ-Nh.cjs +1 -1
  717. package/dist/plugin-sdk/lobster.cjs +1 -1
  718. package/dist/plugin-sdk/lobster.js +1 -1
  719. package/dist/plugin-sdk/local-roots-B0zm186S.js +1 -1
  720. package/dist/plugin-sdk/local-roots-B4Uy4kG3.cjs +1 -1
  721. package/dist/plugin-sdk/local-roots-CM1R1Ncr.cjs +1 -1
  722. package/dist/plugin-sdk/local-roots-CW78ZeZV.js +1 -1
  723. package/dist/plugin-sdk/local-roots-CnsaE7a_.js +1 -1
  724. package/dist/plugin-sdk/local-roots-D1k-fAlE.cjs +1 -1
  725. package/dist/plugin-sdk/local-roots-DQ_vfJPK.js +1 -1
  726. package/dist/plugin-sdk/local-roots-DYlB1au6.cjs +1 -1
  727. package/dist/plugin-sdk/local-roots-H4-t0qG_.js +1 -1
  728. package/dist/plugin-sdk/local-roots-SCyeUfM3.cjs +1 -1
  729. package/dist/plugin-sdk/local-roots-l4PqCmiU.js +1 -1
  730. package/dist/plugin-sdk/local-roots-xHoEq1Fq.cjs +1 -1
  731. package/dist/plugin-sdk/logger-6O6OsYBL.cjs +1 -1
  732. package/dist/plugin-sdk/logger-BlddiV_d.cjs +1 -1
  733. package/dist/plugin-sdk/logger-Bm93ZKOk.cjs +1 -1
  734. package/dist/plugin-sdk/logger-BtrWb0dj.js +1 -1
  735. package/dist/plugin-sdk/logger-C210xuWx.js +1 -1
  736. package/dist/plugin-sdk/logger-DJGHvDbX.js +1 -1
  737. package/dist/plugin-sdk/logger-DPlqYkRm.cjs +1 -1
  738. package/dist/plugin-sdk/logger-DUYnS-W3.cjs +1 -1
  739. package/dist/plugin-sdk/logger-DwWqfo66.js +1 -1
  740. package/dist/plugin-sdk/logger-vBDTZWl3.js +1 -1
  741. package/dist/plugin-sdk/login-BN1TsFp4.cjs +1 -1
  742. package/dist/plugin-sdk/login-BXUtcSnB.cjs +1 -1
  743. package/dist/plugin-sdk/login-BoMH2iJT.js +1 -1
  744. package/dist/plugin-sdk/login-BtT7yRJO.js +1 -1
  745. package/dist/plugin-sdk/login-COzybMRK.js +1 -1
  746. package/dist/plugin-sdk/login-Cw1jFbel.cjs +1 -1
  747. package/dist/plugin-sdk/login-DEmpr5YK.js +1 -1
  748. package/dist/plugin-sdk/login-Dln00cFs.cjs +1 -1
  749. package/dist/plugin-sdk/login-S2Fe5n5K.cjs +1 -1
  750. package/dist/plugin-sdk/login-TieaF0ts.cjs +1 -1
  751. package/dist/plugin-sdk/login-ZQK4uJLw.js +1 -1
  752. package/dist/plugin-sdk/login-fKxJv0_F.js +1 -1
  753. package/dist/plugin-sdk/login-qr-1ilmySGx.js +1 -1
  754. package/dist/plugin-sdk/login-qr-B0ZSZaNI.js +1 -1
  755. package/dist/plugin-sdk/login-qr-B2P2Ky4j.js +1 -1
  756. package/dist/plugin-sdk/login-qr-B2U87iU8.js +1 -1
  757. package/dist/plugin-sdk/login-qr-B4x_eWI_.js +1 -1
  758. package/dist/plugin-sdk/login-qr-BIaJB24t.cjs +1 -1
  759. package/dist/plugin-sdk/login-qr-BMl5Beq2.cjs +1 -1
  760. package/dist/plugin-sdk/login-qr-Bkm3QorK.cjs +1 -1
  761. package/dist/plugin-sdk/login-qr-ClL8FMAJ.cjs +1 -1
  762. package/dist/plugin-sdk/login-qr-DFVK1lg-.js +1 -1
  763. package/dist/plugin-sdk/login-qr-DhieI9fL.cjs +1 -1
  764. package/dist/plugin-sdk/login-qr-DyQT1QnE.cjs +1 -1
  765. package/dist/plugin-sdk/manager-0tvX3Z_N.cjs +1 -1
  766. package/dist/plugin-sdk/manager-8uylP7PH.cjs +1 -1
  767. package/dist/plugin-sdk/manager-B6hWglXe.js +1 -1
  768. package/dist/plugin-sdk/manager-BGoKN9ur.js +1 -1
  769. package/dist/plugin-sdk/manager-BRP1lzb6.js +1 -1
  770. package/dist/plugin-sdk/manager-BeLNhsXC.cjs +1 -1
  771. package/dist/plugin-sdk/manager-BnytMgmq.js +1 -1
  772. package/dist/plugin-sdk/manager-BoMQeM1I.cjs +1 -1
  773. package/dist/plugin-sdk/manager-CYZY9vcM.js +1 -1
  774. package/dist/plugin-sdk/manager-DCDy2V1U.cjs +1 -1
  775. package/dist/plugin-sdk/manager-DE7sDip8.cjs +1 -1
  776. package/dist/plugin-sdk/manager-PwgQZNK1.js +1 -1
  777. package/dist/plugin-sdk/matrix.cjs +1 -1
  778. package/dist/plugin-sdk/matrix.js +1 -1
  779. package/dist/plugin-sdk/mattermost.cjs +1 -1
  780. package/dist/plugin-sdk/mattermost.js +1 -1
  781. package/dist/plugin-sdk/memory-core.cjs +1 -1
  782. package/dist/plugin-sdk/memory-core.js +1 -1
  783. package/dist/plugin-sdk/minimax-portal-auth.cjs +1 -1
  784. package/dist/plugin-sdk/minimax-portal-auth.js +1 -1
  785. package/dist/plugin-sdk/model-auth-BgS7ynQw.cjs +1 -1
  786. package/dist/plugin-sdk/model-auth-CKlA2xRB.cjs +1 -1
  787. package/dist/plugin-sdk/model-auth-CLnFIqcf.cjs +1 -1
  788. package/dist/plugin-sdk/model-auth-D7YupJDS.js +1 -1
  789. package/dist/plugin-sdk/model-auth-eNVBeC-B.js +1 -1
  790. package/dist/plugin-sdk/model-auth-fJrNIbke.cjs +1 -1
  791. package/dist/plugin-sdk/model-auth-g6eGgTwR.js +1 -1
  792. package/dist/plugin-sdk/model-auth-wcxJptQX.js +1 -1
  793. package/dist/plugin-sdk/model-selection-4ExiFkaW.js +1 -1
  794. package/dist/plugin-sdk/model-selection-CZY_x2-a.cjs +1 -1
  795. package/dist/plugin-sdk/msteams.cjs +1 -1
  796. package/dist/plugin-sdk/msteams.js +1 -1
  797. package/dist/plugin-sdk/nextcloud-talk.cjs +1 -1
  798. package/dist/plugin-sdk/nextcloud-talk.js +1 -1
  799. package/dist/plugin-sdk/nostr.cjs +1 -1
  800. package/dist/plugin-sdk/nostr.js +1 -1
  801. package/dist/plugin-sdk/outbound-2VVSR_d4.js +1 -1
  802. package/dist/plugin-sdk/outbound-B03BQa7T.cjs +1 -1
  803. package/dist/plugin-sdk/outbound-BE8CJ9c_.js +1 -1
  804. package/dist/plugin-sdk/outbound-BWtGs0dn.cjs +1 -1
  805. package/dist/plugin-sdk/outbound-BrD0UsX0.js +1 -1
  806. package/dist/plugin-sdk/outbound-Bvu4LbQx.js +1 -1
  807. package/dist/plugin-sdk/outbound-C5rNt-8z.cjs +1 -1
  808. package/dist/plugin-sdk/outbound-C6BJCoYf.cjs +1 -1
  809. package/dist/plugin-sdk/outbound-Cgc0JJtB.js +1 -1
  810. package/dist/plugin-sdk/outbound-DAHIkpiA.cjs +1 -1
  811. package/dist/plugin-sdk/outbound-DnO_udAm.cjs +1 -1
  812. package/dist/plugin-sdk/outbound-UAHsCNyW.js +1 -1
  813. package/dist/plugin-sdk/outbound-attachment-0QahtSQB.cjs +1 -1
  814. package/dist/plugin-sdk/outbound-attachment-8qvAj1MK.js +1 -1
  815. package/dist/plugin-sdk/outbound-attachment-B6SJy_CG.js +1 -1
  816. package/dist/plugin-sdk/outbound-attachment-BVdSGifg.js +1 -1
  817. package/dist/plugin-sdk/outbound-attachment-C-QqSQ79.cjs +1 -1
  818. package/dist/plugin-sdk/outbound-attachment-CYGrnygD.cjs +1 -1
  819. package/dist/plugin-sdk/outbound-attachment-CtA5eBgj.cjs +1 -1
  820. package/dist/plugin-sdk/outbound-attachment-D8Ng5uVX.cjs +1 -1
  821. package/dist/plugin-sdk/outbound-attachment-DS0S0NLK.js +1 -1
  822. package/dist/plugin-sdk/outbound-attachment-Ds2XsjQl.js +1 -1
  823. package/dist/plugin-sdk/outbound-attachment-acB4qID1.js +1 -1
  824. package/dist/plugin-sdk/outbound-attachment-x4Q2SVIA.cjs +1 -1
  825. package/dist/plugin-sdk/paths-BPlgbwrb.cjs +1 -1
  826. package/dist/plugin-sdk/paths-Bcdg3ma0.cjs +1 -1
  827. package/dist/plugin-sdk/paths-BpQOWYiT.js +1 -1
  828. package/dist/plugin-sdk/paths-BvlJvmRS.cjs +1 -1
  829. package/dist/plugin-sdk/paths-CIcxeNL-.cjs +1 -1
  830. package/dist/plugin-sdk/paths-CXgWvWAM.js +1 -1
  831. package/dist/plugin-sdk/paths-Chp3zwtq.cjs +1 -1
  832. package/dist/plugin-sdk/paths-CnHSNSeR.js +1 -1
  833. package/dist/plugin-sdk/paths-Cqca1YmF.cjs +1 -1
  834. package/dist/plugin-sdk/paths-CtrEseGU.js +1 -1
  835. package/dist/plugin-sdk/paths-D55o_j8-.js +1 -1
  836. package/dist/plugin-sdk/paths-D90l3h_o.cjs +1 -1
  837. package/dist/plugin-sdk/paths-DaRoqzBQ.js +1 -1
  838. package/dist/plugin-sdk/paths-Dd7r1qlB.cjs +1 -1
  839. package/dist/plugin-sdk/paths-DhSjTRMz.js +1 -1
  840. package/dist/plugin-sdk/paths-Do0djuaj.js +1 -1
  841. package/dist/plugin-sdk/paths-J4JUiRsa.js +1 -1
  842. package/dist/plugin-sdk/paths-cBAF6Bj0.js +1 -1
  843. package/dist/plugin-sdk/paths-piJASC5k.js +1 -1
  844. package/dist/plugin-sdk/paths-rO4ehkyU.js +1 -1
  845. package/dist/plugin-sdk/pi-model-discovery--UcCzdQg.js +1 -1
  846. package/dist/plugin-sdk/pi-model-discovery-Bi4dKtW0.cjs +1 -1
  847. package/dist/plugin-sdk/pi-model-discovery-CCK2Ppj9.js +1 -1
  848. package/dist/plugin-sdk/pi-model-discovery-CRSZ0OFi.js +1 -1
  849. package/dist/plugin-sdk/pi-model-discovery-Cx_r4FGY.js +1 -1
  850. package/dist/plugin-sdk/pi-model-discovery-D3JQMjAa.cjs +1 -1
  851. package/dist/plugin-sdk/pi-model-discovery-DN1RHetG.cjs +1 -1
  852. package/dist/plugin-sdk/pi-model-discovery-DVFSU0-f.cjs +1 -1
  853. package/dist/plugin-sdk/pi-model-discovery-DWMAAhA-.cjs +1 -1
  854. package/dist/plugin-sdk/pi-model-discovery-DYOHzCjs.js +1 -1
  855. package/dist/plugin-sdk/pi-model-discovery-DdSVvbQ5.cjs +1 -1
  856. package/dist/plugin-sdk/pi-model-discovery-DejkxBol.js +1 -1
  857. package/dist/plugin-sdk/pi-model-discovery-SmVAFMj_.cjs +1 -1
  858. package/dist/plugin-sdk/pi-model-discovery-ma8st1Ek.js +1 -1
  859. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-B2WodYBY.cjs +1 -1
  860. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BC114tUb.js +1 -1
  861. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BF6jP1nM.js +1 -1
  862. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Beg-U7Z-.cjs +1 -1
  863. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BkEYsSLL.js +1 -1
  864. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-C21sWtkh.js +1 -1
  865. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CKkgBGIj.cjs +1 -1
  866. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CNun__L-.js +1 -1
  867. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Clulhv2X.cjs +1 -1
  868. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DvwL5in9.cjs +1 -1
  869. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-FnzjmZqP.js +1 -1
  870. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Rq5y0QJ2.cjs +1 -1
  871. package/dist/plugin-sdk/polls-BuaJuIpV.cjs +1 -1
  872. package/dist/plugin-sdk/polls-CBAGZuJ6.js +1 -1
  873. package/dist/plugin-sdk/polls-CSKMbBIS.js +1 -1
  874. package/dist/plugin-sdk/polls-D0wY0FvT.cjs +1 -1
  875. package/dist/plugin-sdk/polls-PGxiE05J.js +1 -1
  876. package/dist/plugin-sdk/polls-yWqSCEP0.cjs +1 -1
  877. package/dist/plugin-sdk/proxy-env-B765haXA.js +1 -1
  878. package/dist/plugin-sdk/proxy-env-Bcl14j2_.cjs +1 -1
  879. package/dist/plugin-sdk/proxy-env-BlrHtJWH.js +1 -1
  880. package/dist/plugin-sdk/proxy-env-D48qBPAr.cjs +1 -1
  881. package/dist/plugin-sdk/proxy-env-DGzNnnJh.js +1 -1
  882. package/dist/plugin-sdk/proxy-env-DQoJjkWE.cjs +1 -1
  883. package/dist/plugin-sdk/proxy-env-DWw9TnOj.cjs +1 -1
  884. package/dist/plugin-sdk/proxy-env-MEjSyzTr.js +1 -1
  885. package/dist/plugin-sdk/proxy-env-a590sPAz.cjs +1 -1
  886. package/dist/plugin-sdk/proxy-env-k93igu7v.cjs +1 -1
  887. package/dist/plugin-sdk/proxy-env-m9eG3uZN.js +1 -1
  888. package/dist/plugin-sdk/proxy-env-t6hcaFqC.js +1 -1
  889. package/dist/plugin-sdk/proxy-fetch-B9aXJVe-.js +1 -1
  890. package/dist/plugin-sdk/proxy-fetch-BaA3JYgW.cjs +1 -1
  891. package/dist/plugin-sdk/proxy-fetch-BwXFVsHE.cjs +1 -1
  892. package/dist/plugin-sdk/proxy-fetch-BzcKzknk.cjs +1 -1
  893. package/dist/plugin-sdk/proxy-fetch-CYVChsKE.js +1 -1
  894. package/dist/plugin-sdk/proxy-fetch-ClOb2LUH.js +1 -1
  895. package/dist/plugin-sdk/proxy-fetch-DH7VIiBH.cjs +1 -1
  896. package/dist/plugin-sdk/proxy-fetch-DPOhfrou.cjs +1 -1
  897. package/dist/plugin-sdk/proxy-fetch-DXt2R_Z5.js +1 -1
  898. package/dist/plugin-sdk/proxy-fetch-Del551nu.js +1 -1
  899. package/dist/plugin-sdk/proxy-fetch-YCVHz7Rl.js +1 -1
  900. package/dist/plugin-sdk/proxy-fetch-qbrYAz8k.cjs +1 -1
  901. package/dist/plugin-sdk/pw-ai-3piACPqP.cjs +1 -1
  902. package/dist/plugin-sdk/pw-ai-8dajXBkZ.js +1 -1
  903. package/dist/plugin-sdk/pw-ai-B7mrBDW5.js +1 -1
  904. package/dist/plugin-sdk/pw-ai-BLD7x-3a.js +1 -1
  905. package/dist/plugin-sdk/pw-ai-BYmANcaC.cjs +1 -1
  906. package/dist/plugin-sdk/pw-ai-C1rVW06B.cjs +1 -1
  907. package/dist/plugin-sdk/pw-ai-CCDvaBUm.cjs +1 -1
  908. package/dist/plugin-sdk/pw-ai-CVYUOcKM.js +1 -1
  909. package/dist/plugin-sdk/pw-ai-DBg5CCXp.cjs +1 -1
  910. package/dist/plugin-sdk/pw-ai-DY11CCd3.cjs +1 -1
  911. package/dist/plugin-sdk/pw-ai-Kf2RyA25.js +1 -1
  912. package/dist/plugin-sdk/pw-ai-f5yF3n3t.js +1 -1
  913. package/dist/plugin-sdk/qmd-manager-B3xNbdye.cjs +1 -1
  914. package/dist/plugin-sdk/qmd-manager-BMyDNBPi.js +1 -1
  915. package/dist/plugin-sdk/qmd-manager-BZhiv_zq.cjs +1 -1
  916. package/dist/plugin-sdk/qmd-manager-C3uVDbhW.js +1 -1
  917. package/dist/plugin-sdk/qmd-manager-CW46NrS-.cjs +1 -1
  918. package/dist/plugin-sdk/qmd-manager-C_e04BNg.js +1 -1
  919. package/dist/plugin-sdk/qmd-manager-CczVoslK.cjs +1 -1
  920. package/dist/plugin-sdk/qmd-manager-CzLKqPmR.js +1 -1
  921. package/dist/plugin-sdk/qmd-manager-DFh8b5N-.cjs +1 -1
  922. package/dist/plugin-sdk/qmd-manager-DXLfZZMI.js +1 -1
  923. package/dist/plugin-sdk/qmd-manager-FL9fAfNo.cjs +1 -1
  924. package/dist/plugin-sdk/qmd-manager-fWxbGqzk.js +1 -1
  925. package/dist/plugin-sdk/query-expansion-0zYzKrrd.cjs +1 -1
  926. package/dist/plugin-sdk/query-expansion-BYSjmpkV.cjs +1 -1
  927. package/dist/plugin-sdk/query-expansion-CAboqtWr.js +1 -1
  928. package/dist/plugin-sdk/query-expansion-C_DnhmUy.js +1 -1
  929. package/dist/plugin-sdk/query-expansion-Cb2vnF6y.js +1 -1
  930. package/dist/plugin-sdk/query-expansion-DCeqywxh.cjs +1 -1
  931. package/dist/plugin-sdk/query-expansion-DF4LMxRQ.js +1 -1
  932. package/dist/plugin-sdk/query-expansion-DKJkqmNM.cjs +1 -1
  933. package/dist/plugin-sdk/query-expansion-DO2CFW4z.cjs +1 -1
  934. package/dist/plugin-sdk/query-expansion-DyCDaZbL.js +1 -1
  935. package/dist/plugin-sdk/query-expansion-cpXCyoDy.cjs +1 -1
  936. package/dist/plugin-sdk/query-expansion-r_iXkNzt.js +1 -1
  937. package/dist/plugin-sdk/qwen-portal-auth.cjs +1 -1
  938. package/dist/plugin-sdk/qwen-portal-auth.js +1 -1
  939. package/dist/plugin-sdk/render-6fCdtAr6.cjs +1 -1
  940. package/dist/plugin-sdk/render-CBsnn-2A.js +1 -1
  941. package/dist/plugin-sdk/render-CzHaQB0d.cjs +1 -1
  942. package/dist/plugin-sdk/render-DGmfCIRG.js +1 -1
  943. package/dist/plugin-sdk/render-DhTJXP1U.js +1 -1
  944. package/dist/plugin-sdk/render-Djx15dPh.js +1 -1
  945. package/dist/plugin-sdk/render-DxBO2Blp.cjs +1 -1
  946. package/dist/plugin-sdk/render-g5VlmgpF.cjs +1 -1
  947. package/dist/plugin-sdk/reply-BrHB7v5V.cjs +1 -1
  948. package/dist/plugin-sdk/reply-Clex4c2R.js +1 -1
  949. package/dist/plugin-sdk/resolve-outbound-target-BHLQMMp-.cjs +1 -1
  950. package/dist/plugin-sdk/resolve-outbound-target-Cvz2WXAk.cjs +1 -1
  951. package/dist/plugin-sdk/resolve-outbound-target-DDqGniMw.js +1 -1
  952. package/dist/plugin-sdk/resolve-outbound-target-DEpmpEep.js +1 -1
  953. package/dist/plugin-sdk/send--HeMLLzj.js +1 -1
  954. package/dist/plugin-sdk/send-2IhtEEzb.js +1 -1
  955. package/dist/plugin-sdk/send-9tPLnqkc.js +1 -1
  956. package/dist/plugin-sdk/send-B-exJfkg.js +1 -1
  957. package/dist/plugin-sdk/send-B4kzPtcN.js +1 -1
  958. package/dist/plugin-sdk/send-BCSkdYN6.cjs +1 -1
  959. package/dist/plugin-sdk/send-BEmZxBcF.js +1 -1
  960. package/dist/plugin-sdk/send-BHvZIrbJ.cjs +1 -1
  961. package/dist/plugin-sdk/send-BLbCBxeF.js +1 -1
  962. package/dist/plugin-sdk/send-BOkABdQu.cjs +1 -1
  963. package/dist/plugin-sdk/send-BPNd63Qs.js +1 -1
  964. package/dist/plugin-sdk/send-BVAm6Zbr.cjs +1 -1
  965. package/dist/plugin-sdk/send-B_619b3s.js +1 -1
  966. package/dist/plugin-sdk/send-BcuylzbX.js +1 -1
  967. package/dist/plugin-sdk/send-BdFvK9Wc2.js +1 -1
  968. package/dist/plugin-sdk/send-Bh-J7XWZ.cjs +1 -1
  969. package/dist/plugin-sdk/send-BkREPc90.cjs +1 -1
  970. package/dist/plugin-sdk/send-Bp4f-KJu.cjs +1 -1
  971. package/dist/plugin-sdk/send-BtF36kYb.js +1 -1
  972. package/dist/plugin-sdk/send-C6S8tkTA.cjs +1 -1
  973. package/dist/plugin-sdk/send-CDQF_izk.js +1 -1
  974. package/dist/plugin-sdk/send-CF3qas-K.js +1 -1
  975. package/dist/plugin-sdk/send-CFKQX2Wo.js +1 -1
  976. package/dist/plugin-sdk/send-CIP1u5a-.js +1 -1
  977. package/dist/plugin-sdk/send-CIxh7PV0.cjs +1 -1
  978. package/dist/plugin-sdk/send-CJJdcDHX.js +1 -1
  979. package/dist/plugin-sdk/send-COtvydDt.cjs +1 -1
  980. package/dist/plugin-sdk/send-CPwh7tRu.js +1 -1
  981. package/dist/plugin-sdk/send-CRnIqXN9.cjs +1 -1
  982. package/dist/plugin-sdk/send-CSqipUeV.cjs +1 -1
  983. package/dist/plugin-sdk/send-Chfe8tPY.js +1 -1
  984. package/dist/plugin-sdk/send-ClMvdjfg.js +1 -1
  985. package/dist/plugin-sdk/send-CmoJSYhT.js +1 -1
  986. package/dist/plugin-sdk/send-Cs5jSTw0.cjs +1 -1
  987. package/dist/plugin-sdk/send-D-6Et_9H.js +1 -1
  988. package/dist/plugin-sdk/send-D13uFnzH.cjs +1 -1
  989. package/dist/plugin-sdk/send-D3eT0F4N.cjs +1 -1
  990. package/dist/plugin-sdk/send-DAtg_VHa.js +1 -1
  991. package/dist/plugin-sdk/send-DCF59ijQ.cjs +1 -1
  992. package/dist/plugin-sdk/send-DN2xic3w.cjs +1 -1
  993. package/dist/plugin-sdk/send-DOjSTB6D.cjs +1 -1
  994. package/dist/plugin-sdk/send-DavwL7cF.js +1 -1
  995. package/dist/plugin-sdk/send-Dbmn1rgD.cjs +1 -1
  996. package/dist/plugin-sdk/send-DhfDqcwc.cjs +1 -1
  997. package/dist/plugin-sdk/send-DsDCrJWq.js +1 -1
  998. package/dist/plugin-sdk/send-DyR5Lpl-.js +1 -1
  999. package/dist/plugin-sdk/send-DyzuwDjE.js +1 -1
  1000. package/dist/plugin-sdk/send-GtphEa1b.cjs +1 -1
  1001. package/dist/plugin-sdk/send-HZNY_u3L.cjs +1 -1
  1002. package/dist/plugin-sdk/send-IM-76QZu.js +1 -1
  1003. package/dist/plugin-sdk/send-IqcgAO8b.cjs +1 -1
  1004. package/dist/plugin-sdk/send-OQcuL9tP.js +1 -1
  1005. package/dist/plugin-sdk/send-_92aOzWU.cjs +1 -1
  1006. package/dist/plugin-sdk/send-h_kE-cAK.js +1 -1
  1007. package/dist/plugin-sdk/send-jOMdGt0L.cjs +1 -1
  1008. package/dist/plugin-sdk/send-mZ_d-t_3.cjs +1 -1
  1009. package/dist/plugin-sdk/send-puyUta4_.cjs +1 -1
  1010. package/dist/plugin-sdk/send-t5U34FhY.cjs +1 -1
  1011. package/dist/plugin-sdk/send-tvw8j-Se.cjs +1 -1
  1012. package/dist/plugin-sdk/send-z1vaCgF3.cjs +1 -1
  1013. package/dist/plugin-sdk/session--K1m5v7m.js +1 -1
  1014. package/dist/plugin-sdk/session-B1DJ45om.js +1 -1
  1015. package/dist/plugin-sdk/session-B80NWO1m.js +1 -1
  1016. package/dist/plugin-sdk/session-BKPBr445.js +1 -1
  1017. package/dist/plugin-sdk/session-BQLjsBwL.cjs +1 -1
  1018. package/dist/plugin-sdk/session-BZHltxdM.js +1 -1
  1019. package/dist/plugin-sdk/session-Bt5yI-VW.cjs +1 -1
  1020. package/dist/plugin-sdk/session-CC1GqwiM.cjs +1 -1
  1021. package/dist/plugin-sdk/session-C_yqyp3P.cjs +1 -1
  1022. package/dist/plugin-sdk/session-ClISxvtJ.js +1 -1
  1023. package/dist/plugin-sdk/session-D4nn-nXX.cjs +1 -1
  1024. package/dist/plugin-sdk/session-DOA4CJgj.cjs +1 -1
  1025. package/dist/plugin-sdk/sessions-BwTjGneU.js +1 -1
  1026. package/dist/plugin-sdk/sessions-CJbvfO6m.cjs +1 -1
  1027. package/dist/plugin-sdk/signal.cjs +1 -1
  1028. package/dist/plugin-sdk/signal.js +1 -1
  1029. package/dist/plugin-sdk/skill-commands-5WGHyr3h.cjs +1 -1
  1030. package/dist/plugin-sdk/skill-commands-BZlF3g3o.js +1 -1
  1031. package/dist/plugin-sdk/skill-commands-BmBQSmNH.js +1 -1
  1032. package/dist/plugin-sdk/skill-commands-CD4GQXTR.cjs +1 -1
  1033. package/dist/plugin-sdk/skill-commands-CGOPOT-r.js +1 -1
  1034. package/dist/plugin-sdk/skill-commands-CM9ziCQY.cjs +1 -1
  1035. package/dist/plugin-sdk/skill-commands-CVsU5rEy.js +1 -1
  1036. package/dist/plugin-sdk/skill-commands-DNPxE-kc.cjs +1 -1
  1037. package/dist/plugin-sdk/skill-commands-DcgKCVDt.js +1 -1
  1038. package/dist/plugin-sdk/skill-commands-IAwkVeOe.js +1 -1
  1039. package/dist/plugin-sdk/skill-commands-ZyLkXbR_.cjs +1 -1
  1040. package/dist/plugin-sdk/skill-commands-xJWQthd5.cjs +1 -1
  1041. package/dist/plugin-sdk/slack.cjs +1 -1
  1042. package/dist/plugin-sdk/slack.js +1 -1
  1043. package/dist/plugin-sdk/synology-chat.cjs +1 -1
  1044. package/dist/plugin-sdk/synology-chat.js +1 -1
  1045. package/dist/plugin-sdk/tables-BZUVdTR-.cjs +1 -1
  1046. package/dist/plugin-sdk/tables-Bbodvj_s.cjs +1 -1
  1047. package/dist/plugin-sdk/tables-C5b2CtNw.cjs +1 -1
  1048. package/dist/plugin-sdk/tables-C6TX2QvW.js +1 -1
  1049. package/dist/plugin-sdk/tables-Cz5osenc.js +1 -1
  1050. package/dist/plugin-sdk/tables-DBSeZ07-.cjs +1 -1
  1051. package/dist/plugin-sdk/tables-DLSXY2-Q.js +1 -1
  1052. package/dist/plugin-sdk/tables-DQad-z2Z.cjs +1 -1
  1053. package/dist/plugin-sdk/tables-DYuLwL1d.js +1 -1
  1054. package/dist/plugin-sdk/tables-D_J655yN.js +1 -1
  1055. package/dist/plugin-sdk/tables-_vqK8P0T.js +1 -1
  1056. package/dist/plugin-sdk/tables-bSgb8OzP.cjs +1 -1
  1057. package/dist/plugin-sdk/target-errors-B-mJ4s4b.cjs +1 -1
  1058. package/dist/plugin-sdk/target-errors-BAHAHc8f.js +1 -1
  1059. package/dist/plugin-sdk/target-errors-BKruhz8r.js +1 -1
  1060. package/dist/plugin-sdk/target-errors-BbQBR5da.js +1 -1
  1061. package/dist/plugin-sdk/target-errors-BjgLCOTm.cjs +1 -1
  1062. package/dist/plugin-sdk/target-errors-CQbFkOae.js +1 -1
  1063. package/dist/plugin-sdk/target-errors-C_HYvghh.cjs +1 -1
  1064. package/dist/plugin-sdk/target-errors-CaaKhU6m.js +1 -1
  1065. package/dist/plugin-sdk/target-errors-QWTCk98R.cjs +1 -1
  1066. package/dist/plugin-sdk/target-errors-oh0u5K2w.cjs +1 -1
  1067. package/dist/plugin-sdk/targets-BSc11Uk8.cjs +1 -1
  1068. package/dist/plugin-sdk/targets-BSkiizml.js +1 -1
  1069. package/dist/plugin-sdk/targets-CBI0xqve.cjs +1 -1
  1070. package/dist/plugin-sdk/targets-CL5fYQi7.js +1 -1
  1071. package/dist/plugin-sdk/targets-CUZWrFrm.cjs +1 -1
  1072. package/dist/plugin-sdk/targets-CVEYTFPQ.js +1 -1
  1073. package/dist/plugin-sdk/targets-Co2R6K14.cjs +1 -1
  1074. package/dist/plugin-sdk/targets-CrkJkzil.js +1 -1
  1075. package/dist/plugin-sdk/targets-D-m7SV9x.cjs +1 -1
  1076. package/dist/plugin-sdk/targets-D8HTxbo4.js +1 -1
  1077. package/dist/plugin-sdk/targets-DcGNB9nk.cjs +1 -1
  1078. package/dist/plugin-sdk/targets-Dn9gDiEw.js +1 -1
  1079. package/dist/plugin-sdk/targets-X28mff4s.cjs +1 -1
  1080. package/dist/plugin-sdk/targets-uycXZ8vQ.js +1 -1
  1081. package/dist/plugin-sdk/telegram.cjs +1 -1
  1082. package/dist/plugin-sdk/telegram.js +1 -1
  1083. package/dist/plugin-sdk/test-utils.cjs +1 -1
  1084. package/dist/plugin-sdk/test-utils.js +1 -1
  1085. package/dist/plugin-sdk/tlon.cjs +1 -1
  1086. package/dist/plugin-sdk/tlon.js +1 -1
  1087. package/dist/plugin-sdk/tokens-AAdZjj0M.js +1 -1
  1088. package/dist/plugin-sdk/tokens-B20KNIDD.js +1 -1
  1089. package/dist/plugin-sdk/tokens-B8ys7Q2e.js +1 -1
  1090. package/dist/plugin-sdk/tokens-BPc1fcZ3.js +1 -1
  1091. package/dist/plugin-sdk/tokens-BqABmXSe.js +1 -1
  1092. package/dist/plugin-sdk/tokens-CXsPDJTr.cjs +1 -1
  1093. package/dist/plugin-sdk/tokens-CnB4dJmp.cjs +1 -1
  1094. package/dist/plugin-sdk/tokens-CytSl1X8.cjs +1 -1
  1095. package/dist/plugin-sdk/tokens-DgPZk2Uu.js +1 -1
  1096. package/dist/plugin-sdk/tokens-Dq2wDF3_.cjs +1 -1
  1097. package/dist/plugin-sdk/tokens-DtrljGtQ.cjs +1 -1
  1098. package/dist/plugin-sdk/tokens-g5KWvWhD.cjs +1 -1
  1099. package/dist/plugin-sdk/twitch.cjs +1 -1
  1100. package/dist/plugin-sdk/twitch.js +1 -1
  1101. package/dist/plugin-sdk/utils-BJtJR72k.js +1 -1
  1102. package/dist/plugin-sdk/utils-PPIvU9qw.cjs +1 -1
  1103. package/dist/plugin-sdk/voice-call.cjs +1 -1
  1104. package/dist/plugin-sdk/voice-call.js +1 -1
  1105. package/dist/plugin-sdk/web-B4A8zBP9.cjs +1 -1
  1106. package/dist/plugin-sdk/web-BKKx3jqf.cjs +1 -1
  1107. package/dist/plugin-sdk/web-BTBgpaEi.js +1 -1
  1108. package/dist/plugin-sdk/web-BfjArU7g.js +1 -1
  1109. package/dist/plugin-sdk/web-C7KhecaH.cjs +1 -1
  1110. package/dist/plugin-sdk/web-CFMrBQv7.js +1 -1
  1111. package/dist/plugin-sdk/web-CS0AvKLx.js +1 -1
  1112. package/dist/plugin-sdk/web-EfgEjg15.cjs +1 -1
  1113. package/dist/plugin-sdk/weixin.cjs +1 -1
  1114. package/dist/plugin-sdk/weixin.js +1 -1
  1115. package/dist/plugin-sdk/whatsapp-actions-6N2LIWVD.js +1 -1
  1116. package/dist/plugin-sdk/whatsapp-actions-BGEghean.js +1 -1
  1117. package/dist/plugin-sdk/whatsapp-actions-BP_fSzB9.cjs +1 -1
  1118. package/dist/plugin-sdk/whatsapp-actions-BSx6-Onq.cjs +1 -1
  1119. package/dist/plugin-sdk/whatsapp-actions-BZAMGDn8.cjs +1 -1
  1120. package/dist/plugin-sdk/whatsapp-actions-BvZMduqd.js +1 -1
  1121. package/dist/plugin-sdk/whatsapp-actions-CDUbwNdp.cjs +1 -1
  1122. package/dist/plugin-sdk/whatsapp-actions-DNVIKnqz.cjs +1 -1
  1123. package/dist/plugin-sdk/whatsapp-actions-DTVbVkOo.js +1 -1
  1124. package/dist/plugin-sdk/whatsapp-actions-DjMYqpSS.js +1 -1
  1125. package/dist/plugin-sdk/whatsapp-actions-P1DVqKhD.cjs +1 -1
  1126. package/dist/plugin-sdk/whatsapp-actions-shElOKKX.js +1 -1
  1127. package/dist/plugin-sdk/whatsapp.cjs +1 -1
  1128. package/dist/plugin-sdk/whatsapp.js +1 -1
  1129. package/dist/plugin-sdk/zalo.cjs +1 -1
  1130. package/dist/plugin-sdk/zalo.js +1 -1
  1131. package/dist/plugin-sdk/zalouser.cjs +1 -1
  1132. package/dist/plugin-sdk/zalouser.js +1 -1
  1133. package/dist/plugins-CYLrFT4h.js +1 -1
  1134. package/dist/plugins-DNlgeTTc.js +1 -1
  1135. package/dist/plugins-cli-BiV4FaGs.js +1 -1
  1136. package/dist/plugins-cli-C0PLRxT0.js +1 -1
  1137. package/dist/polls-BIVz6a4F.js +1 -1
  1138. package/dist/polls-Bh5wc9-6.js +1 -1
  1139. package/dist/polls-C_XSFz3d.js +1 -1
  1140. package/dist/polls-DKJOFSzJ.js +1 -1
  1141. package/dist/ports-Bjc9q__g.js +1 -1
  1142. package/dist/ports-Di2_MOUb.js +1 -1
  1143. package/dist/probe-auth-9RrZOStc.js +1 -1
  1144. package/dist/probe-auth-Cg6SAov9.js +1 -1
  1145. package/dist/profile-utils-CWmra1aY.js +1 -1
  1146. package/dist/program-CI--7377.js +1 -1
  1147. package/dist/program-context-CH9p6anW.js +1 -1
  1148. package/dist/program-context-Cu8fVR-O.js +1 -1
  1149. package/dist/progress-LNttnI-y.js +1 -1
  1150. package/dist/progress-d1m2sqR1.js +1 -1
  1151. package/dist/prompt-select-styled-CbTtKeIC.js +1 -1
  1152. package/dist/prompt-select-styled-sYEl0gMg.js +1 -1
  1153. package/dist/prompt-style-BThRSQJR.js +1 -1
  1154. package/dist/prompt-style-CXKekIBY.js +1 -1
  1155. package/dist/prompts-CMzglboN.js +1 -1
  1156. package/dist/prompts-wv-lfVrJ.js +1 -1
  1157. package/dist/provider-auth-helpers-C3OaF218.js +1 -1
  1158. package/dist/provider-auth-helpers-CZyb7LUg.js +1 -1
  1159. package/dist/provider-env-vars-D8p6Ohpj.js +1 -1
  1160. package/dist/provider-env-vars-Dt0Q29Su.js +1 -1
  1161. package/dist/proxy-env-BNhTHkd_.js +1 -1
  1162. package/dist/proxy-env-DcmW_urA.js +1 -1
  1163. package/dist/proxy-env-DrC3TIGh.js +1 -1
  1164. package/dist/proxy-env-FJr5nlvs.js +1 -1
  1165. package/dist/proxy-fetch-BADsUK4d.js +1 -1
  1166. package/dist/proxy-fetch-BZ9O8Dvj.js +1 -1
  1167. package/dist/proxy-fetch-DnjU1fEB.js +1 -1
  1168. package/dist/proxy-fetch-gWETR3cl.js +1 -1
  1169. package/dist/push-apns-kySzOiJr.js +1 -1
  1170. package/dist/push-apns-tM6G9LLm.js +1 -1
  1171. package/dist/pw-ai-B7YMA_4Q.js +1 -1
  1172. package/dist/pw-ai-C7peCONw.js +1 -1
  1173. package/dist/pw-ai-CojtT9WR.js +1 -1
  1174. package/dist/pw-ai-DWJWFzTA.js +1 -1
  1175. package/dist/qmd-manager-C_e04BNg.js +1 -1
  1176. package/dist/qmd-manager-DSQ_mDCl.js +1 -1
  1177. package/dist/qmd-manager-DcBYbt_V.js +1 -1
  1178. package/dist/qmd-manager-NLI0R6kp.js +1 -1
  1179. package/dist/qr-cli-DUR7oW0_.js +1 -1
  1180. package/dist/qr-cli-kb3ygh9I.js +1 -1
  1181. package/dist/query-expansion-0OxEb1Io.js +1 -1
  1182. package/dist/query-expansion-BUUx_oWg.js +1 -1
  1183. package/dist/query-expansion-r_iXkNzt.js +1 -1
  1184. package/dist/reaction-level-DVPHL14p.js +1 -1
  1185. package/dist/reaction-message-id-BEEe7X3D.js +1 -1
  1186. package/dist/read-only-account-inspect-DEnPVHTo.js +1 -1
  1187. package/dist/redact-3_CiXMY6.js +1 -1
  1188. package/dist/redact-CnRxK70G.js +1 -1
  1189. package/dist/register.agent-BwmE1VD-.js +1 -1
  1190. package/dist/register.agent-D1hQi_68.js +1 -1
  1191. package/dist/register.backup-8s5jgnHQ.js +1 -1
  1192. package/dist/register.backup-CAiwLaIW.js +1 -1
  1193. package/dist/register.configure-BsTw4XfK.js +1 -1
  1194. package/dist/register.configure-DxR84Ot6.js +1 -1
  1195. package/dist/register.maintenance-3nzWAo_a.js +1 -1
  1196. package/dist/register.maintenance-DxKGQ9Jo.js +1 -1
  1197. package/dist/register.message-Bk1pHVSK.js +1 -1
  1198. package/dist/register.message-PcFtBR0-.js +1 -1
  1199. package/dist/register.onboard-AWxbhU7j.js +1 -1
  1200. package/dist/register.onboard-BTOZN8ro.js +1 -1
  1201. package/dist/register.setup-B-e1qIbc.js +1 -1
  1202. package/dist/register.setup-CweJJdt8.js +1 -1
  1203. package/dist/register.status-health-sessions-B1R_nl6P.js +1 -1
  1204. package/dist/register.status-health-sessions-CWNLXpAn.js +1 -1
  1205. package/dist/register.subclis-C0VQ_HfZ.js +1 -1
  1206. package/dist/registry-BptzrW8D.js +1 -1
  1207. package/dist/registry-hFAtCSWG.js +1 -1
  1208. package/dist/render-BXEUPIHe.js +1 -1
  1209. package/dist/render-CBsnn-2A.js +1 -1
  1210. package/dist/render-D8OWO2hT.js +1 -1
  1211. package/dist/render-DrrPmnMI.js +1 -1
  1212. package/dist/reply-r9KtzgpM.js +1 -1
  1213. package/dist/restart-CTfuVGfA.js +1 -1
  1214. package/dist/rpc-BQXfCyCw.js +1 -1
  1215. package/dist/rpc-CcrILVsV.js +1 -1
  1216. package/dist/run-main-CuQQyoU3.js +1 -1
  1217. package/dist/runtime-BlsMYeaw.js +1 -1
  1218. package/dist/runtime-DLxfCs7F.js +1 -1
  1219. package/dist/runtime-guard-DFYBaYZS.js +1 -1
  1220. package/dist/runtime-guard-DX2Ie4ri.js +1 -1
  1221. package/dist/runtime-status-CqFBmdRd.js +1 -1
  1222. package/dist/runtime-status-DszMjvJK.js +1 -1
  1223. package/dist/runtime-web-tools-BWv0X5qp.js +1 -1
  1224. package/dist/runtime-web-tools-CCIXUISf.js +1 -1
  1225. package/dist/sandbox-cli-CxluKLFV.js +1 -1
  1226. package/dist/sandbox-cli-xCX6FV4Z.js +1 -1
  1227. package/dist/scan-paths-C13EseXp.js +1 -1
  1228. package/dist/scan-paths-CWtvWW40.js +1 -1
  1229. package/dist/search-manager-KMRzwyPH.js +1 -1
  1230. package/dist/secret-file-C7JffiM_.js +1 -1
  1231. package/dist/secret-file-D60EFEOe.js +1 -1
  1232. package/dist/secret-file-DuWm26jS.js +1 -1
  1233. package/dist/secrets-cli-Be6OBr6Q.js +1 -1
  1234. package/dist/secrets-cli-DmDZiX17.js +1 -1
  1235. package/dist/secure-random-D7JQgiK-.js +1 -1
  1236. package/dist/security-cli-CllLwpQ-.js +1 -1
  1237. package/dist/security-cli-DcA9keUK.js +1 -1
  1238. package/dist/send-8rJCpsDu.js +1 -1
  1239. package/dist/send-BJjoLBo3.js +1 -1
  1240. package/dist/send-BOxuQt9L.js +1 -1
  1241. package/dist/send-BPfl_1It.js +1 -1
  1242. package/dist/send-BdS6jUBa.js +1 -1
  1243. package/dist/send-BeZJ1zbp.js +1 -1
  1244. package/dist/send-BkZ8dWQV2.js +1 -1
  1245. package/dist/send-CDAeI9xB2.js +1 -1
  1246. package/dist/send-CgeRzkWS.js +1 -1
  1247. package/dist/send-CiTZ4p2t.js +1 -1
  1248. package/dist/send-D0y-r_hg2.js +1 -1
  1249. package/dist/send-DIw8ExHc.js +1 -1
  1250. package/dist/send-DRm6AFp-.js +1 -1
  1251. package/dist/send-DS5Quwb7.js +1 -1
  1252. package/dist/send-DVmPgxm7.js +1 -1
  1253. package/dist/send-Ds5sy22D.js +1 -1
  1254. package/dist/send-DvGzdoKK.js +1 -1
  1255. package/dist/send-OVet2uKx.js +1 -1
  1256. package/dist/send-YPQFx-fV.js +1 -1
  1257. package/dist/send-e2ppdA_R.js +1 -1
  1258. package/dist/server-Dzqb5Tau.js +1 -1
  1259. package/dist/server-node-events-B2irOUJ_.js +1 -1
  1260. package/dist/server-node-events-DSr6P0VG.js +1 -1
  1261. package/dist/server-w7sUBJEA.js +1 -1
  1262. package/dist/service-BtB9epJk.js +1 -1
  1263. package/dist/service-DZ9EbS15.js +1 -1
  1264. package/dist/session-BYYOduc1.js +1 -1
  1265. package/dist/session-B_qrXLsR.js +1 -1
  1266. package/dist/session-Be0RV2V1.js +1 -1
  1267. package/dist/session-bk3gFwO4.js +1 -1
  1268. package/dist/session-cost-usage-BgqKixv0.js +1 -1
  1269. package/dist/session-cost-usage-CHtVgnE8.js +1 -1
  1270. package/dist/session-key-C7F_iqYg.js +1 -1
  1271. package/dist/session-key-D3P0tf5P.js +1 -1
  1272. package/dist/session-utils-CrR0wD3W.js +1 -1
  1273. package/dist/sessions-BvTGb3rW.js +1 -1
  1274. package/dist/shared-9x5sqYRb.js +1 -1
  1275. package/dist/shared-BKWhOp64.js +1 -1
  1276. package/dist/shared-BV-hfJ3h.js +1 -1
  1277. package/dist/skill-commands-C59b8Yso.js +1 -1
  1278. package/dist/skill-commands-CqIEajsA.js +1 -1
  1279. package/dist/skill-commands-F5NFH0NR.js +1 -1
  1280. package/dist/skill-commands-O39uSj-k.js +1 -1
  1281. package/dist/skill-scanner-CUUF3Fvo.js +1 -1
  1282. package/dist/skill-scanner-CkxXNioD.js +1 -1
  1283. package/dist/skills-CKTicUKS.js +1 -1
  1284. package/dist/skills-DHbOKEGc.js +1 -1
  1285. package/dist/skills-cli-CZD1Ng18.js +1 -1
  1286. package/dist/skills-cli-nj0w4fe0.js +1 -1
  1287. package/dist/skills-install-D0I6c17J.js +1 -1
  1288. package/dist/skills-install-XHpqMBWl.js +1 -1
  1289. package/dist/skills-status-BWIugRCz.js +1 -1
  1290. package/dist/skills-status-DswSl5aD.js +1 -1
  1291. package/dist/sqlite-CILF3z9U.js +1 -1
  1292. package/dist/stagger-DmFYysrJ.js +1 -1
  1293. package/dist/stagger-DxzgG2jd.js +1 -1
  1294. package/dist/status-DKB9gdSp.js +1 -1
  1295. package/dist/status-DgRrUxyg.js +1 -1
  1296. package/dist/status-YZD9V9xi.js +1 -1
  1297. package/dist/status-isxcm8Xz.js +1 -1
  1298. package/dist/status.update-B_8Gumuc.js +1 -1
  1299. package/dist/status.update-Cf2e-l9d.js +1 -1
  1300. package/dist/string-normalization-BrUPaXaM.js +1 -1
  1301. package/dist/string-normalization-DJT5zuUF.js +1 -1
  1302. package/dist/subsystem-BLbY429l.js +1 -1
  1303. package/dist/subsystem-Bc2XrjUz.js +1 -1
  1304. package/dist/subsystem-C5XF2Fy5.js +1 -1
  1305. package/dist/system-cli-CRs3TOTw.js +1 -1
  1306. package/dist/system-cli-GyoLZQpj.js +1 -1
  1307. package/dist/system-run-command-DCzdgYyb.js +1 -1
  1308. package/dist/system-run-command-FCk9hSMO.js +1 -1
  1309. package/dist/systemd-D7odsu4K.js +1 -1
  1310. package/dist/systemd-DbevZh65.js +1 -1
  1311. package/dist/systemd-hints-lXpMy-kY.js +1 -1
  1312. package/dist/systemd-hints-x1lJAOxS.js +1 -1
  1313. package/dist/systemd-linger-C2MJD6KG.js +1 -1
  1314. package/dist/systemd-linger-cWKbFNpu.js +1 -1
  1315. package/dist/table-CR7TFMew.js +1 -1
  1316. package/dist/table-CY440fI1.js +1 -1
  1317. package/dist/tables-3Rjt6nwZ.js +1 -1
  1318. package/dist/tables-B9wFKQvT.js +1 -1
  1319. package/dist/tables-D1pcaye7.js +1 -1
  1320. package/dist/tables-h7y1Jhf4.js +1 -1
  1321. package/dist/target-errors-CUQcIty1.js +1 -1
  1322. package/dist/target-errors-D55sWZ4E.js +1 -1
  1323. package/dist/target-errors-DH0aw-m5.js +1 -1
  1324. package/dist/target-errors-LuLROpta.js +1 -1
  1325. package/dist/targets-4EaxWBal.js +1 -1
  1326. package/dist/targets-BJTo7bqu.js +1 -1
  1327. package/dist/targets-BYVMrXDf.js +1 -1
  1328. package/dist/targets-Bq6rS6-Z.js +1 -1
  1329. package/dist/targets-CL5fYQi7.js +1 -1
  1330. package/dist/targets-fozeWOOg.js +1 -1
  1331. package/dist/targets-m_41k_Mv.js +1 -1
  1332. package/dist/telegram/audit.js +1 -1
  1333. package/dist/text-format-CvrvBBre.js +1 -1
  1334. package/dist/text-format-DEWK6oCT.js +1 -1
  1335. package/dist/token-DnTmiyJu.js +1 -1
  1336. package/dist/tokens-B2fq-rL6.js +1 -1
  1337. package/dist/tokens-CL2fSjGl.js +1 -1
  1338. package/dist/tokens-DRM8vzJx.js +1 -1
  1339. package/dist/tokens-XGbQGn67.js +1 -1
  1340. package/dist/tool-display-DJDtttQg.js +1 -1
  1341. package/dist/tool-display-DjuSUUbH.js +1 -1
  1342. package/dist/tui-CqEb9hrT.js +1 -1
  1343. package/dist/tui-DdZ8SpNW.js +1 -1
  1344. package/dist/tui-cli-Bj0okLCf.js +1 -1
  1345. package/dist/tui-cli-CYvBshyB.js +1 -1
  1346. package/dist/types.secrets-C-5U96pc.js +1 -1
  1347. package/dist/types.secrets-D4tbc3Wq.js +1 -1
  1348. package/dist/update-BGrxUIyz.js +1 -1
  1349. package/dist/update-CwTy5DPl.js +1 -1
  1350. package/dist/update-cli-lciKU8_L.js +1 -1
  1351. package/dist/update-cli-xb0jHjE8.js +1 -1
  1352. package/dist/update-runner-8Hto6X-M.js +1 -1
  1353. package/dist/update-runner-LVJcy569.js +1 -1
  1354. package/dist/usage-format-BWD8FJFL.js +1 -1
  1355. package/dist/usage-format-yPwal8Iz.js +1 -1
  1356. package/dist/utils-CGdo13HV.js +1 -1
  1357. package/dist/utils-D3t-vPka.js +1 -1
  1358. package/dist/utils-R-mFyVJi.js +1 -1
  1359. package/dist/utils-UGOV_184.js +1 -1
  1360. package/dist/version-q3SkUw2K.js +1 -1
  1361. package/dist/warning-filter.js +1 -1
  1362. package/dist/web-Bfz_qlYe.js +1 -1
  1363. package/dist/web-ClbIohhf.js +1 -1
  1364. package/dist/webhooks-cli-DKfKihmJ.js +1 -1
  1365. package/dist/webhooks-cli-LU2ADRQp.js +1 -1
  1366. package/dist/whatsapp-actions-1TJ8dlv0.js +1 -1
  1367. package/dist/whatsapp-actions-CuDiuPGa.js +1 -1
  1368. package/dist/whatsapp-actions-DkLDOIk1.js +1 -1
  1369. package/dist/whatsapp-actions-EnduXWui.js +1 -1
  1370. package/dist/widearea-dns-BDx7vkV2.js +1 -1
  1371. package/dist/widearea-dns-BFjqKXu_.js +1 -1
  1372. package/dist/windows-spawn-7oINn5ao.js +1 -1
  1373. package/dist/windows-spawn-AB7ItGAE.js +1 -1
  1374. package/dist/with-timeout-WveKxvFV.js +1 -1
  1375. package/dist/with-timeout-c1CzdShT.js +1 -1
  1376. package/dist/workspace-B0ZQeHXg.js +1 -1
  1377. package/dist/workspace-C45T1Cxg.js +1 -1
  1378. package/dist/workspace-dirs-A8Vib9_B.js +1 -1
  1379. package/dist/workspace-dirs-BhF1Dzxt.js +1 -1
  1380. package/dist/workspace-xNEpaJvu.js +1 -1
  1381. package/dist/wsl-DHxB2Ew_.js +1 -1
  1382. package/dist/wsl-Ok7GaSJ6.js +1 -1
  1383. package/extensions/memory-core/index.js +1 -0
  1384. package/extensions/memory-core/package.json +1 -1
  1385. package/extensions/openclaw-telemetry-galileo-embedded/index.js +4 -0
  1386. package/extensions/openclaw-telemetry-galileo-embedded/package.json +2 -2
  1387. package/extensions/openclaw-telemetry-galileo-embedded/src/service.js +13 -0
  1388. package/extensions/openclaw-weixin/index.js +1 -0
  1389. package/extensions/openclaw-weixin/package.json +3 -3
  1390. package/extensions/openclaw-weixin/src/api/api.js +1 -0
  1391. package/extensions/openclaw-weixin/src/api/config-cache.js +1 -0
  1392. package/extensions/openclaw-weixin/src/api/session-guard.js +1 -0
  1393. package/extensions/openclaw-weixin/src/api/types.js +1 -0
  1394. package/extensions/openclaw-weixin/src/auth/accounts.js +1 -0
  1395. package/extensions/openclaw-weixin/src/auth/login-qr.js +11 -0
  1396. package/extensions/openclaw-weixin/src/auth/pairing.js +1 -0
  1397. package/extensions/openclaw-weixin/src/cdn/aes-ecb.js +1 -0
  1398. package/extensions/openclaw-weixin/src/cdn/cdn-upload.js +1 -0
  1399. package/extensions/openclaw-weixin/src/cdn/cdn-url.js +1 -0
  1400. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.js +1 -0
  1401. package/extensions/openclaw-weixin/src/cdn/upload.js +1 -0
  1402. package/extensions/openclaw-weixin/src/channel.js +6 -0
  1403. package/extensions/openclaw-weixin/src/config/config-schema.js +1 -0
  1404. package/extensions/openclaw-weixin/src/log-upload.js +4 -0
  1405. package/extensions/openclaw-weixin/src/media/media-download.js +1 -0
  1406. package/extensions/openclaw-weixin/src/media/mime.js +1 -0
  1407. package/extensions/openclaw-weixin/src/media/silk-transcode.js +1 -0
  1408. package/extensions/openclaw-weixin/src/messaging/debug-mode.js +1 -0
  1409. package/extensions/openclaw-weixin/src/messaging/error-notice.js +1 -0
  1410. package/extensions/openclaw-weixin/src/messaging/inbound.js +2 -0
  1411. package/extensions/openclaw-weixin/src/messaging/process-message.js +3 -0
  1412. package/extensions/openclaw-weixin/src/messaging/send-media.js +1 -0
  1413. package/extensions/openclaw-weixin/src/messaging/send.js +1 -0
  1414. package/extensions/openclaw-weixin/src/messaging/slash-commands.js +2 -0
  1415. package/extensions/openclaw-weixin/src/monitor/monitor.js +1 -0
  1416. package/extensions/openclaw-weixin/src/runtime.js +1 -0
  1417. package/extensions/openclaw-weixin/src/storage/state-dir.js +1 -0
  1418. package/extensions/openclaw-weixin/src/storage/sync-buf.js +1 -0
  1419. package/extensions/openclaw-weixin/src/util/logger.js +2 -0
  1420. package/extensions/openclaw-weixin/src/util/random.js +1 -0
  1421. package/extensions/openclaw-weixin/src/util/redact.js +1 -0
  1422. package/extensions/qbagent-mcp-server-x5uselocal-node/index.js +1 -0
  1423. package/extensions/qbagent-mcp-server-x5uselocal-node/package.json +1 -1
  1424. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.js +1 -0
  1425. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.js +1 -0
  1426. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.js +1 -0
  1427. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.js +1 -0
  1428. package/package.json +1 -1
  1429. package/extensions/memory-core/index.ts +0 -38
  1430. package/extensions/openclaw-telemetry-galileo-embedded/index.ts +0 -663
  1431. package/extensions/openclaw-telemetry-galileo-embedded/src/service.ts +0 -1590
  1432. package/extensions/openclaw-weixin/index.ts +0 -26
  1433. package/extensions/openclaw-weixin/src/api/api.ts +0 -238
  1434. package/extensions/openclaw-weixin/src/api/config-cache.ts +0 -79
  1435. package/extensions/openclaw-weixin/src/api/session-guard.ts +0 -58
  1436. package/extensions/openclaw-weixin/src/api/types.ts +0 -222
  1437. package/extensions/openclaw-weixin/src/auth/accounts.ts +0 -363
  1438. package/extensions/openclaw-weixin/src/auth/login-qr.ts +0 -344
  1439. package/extensions/openclaw-weixin/src/auth/pairing.ts +0 -120
  1440. package/extensions/openclaw-weixin/src/cdn/aes-ecb.ts +0 -21
  1441. package/extensions/openclaw-weixin/src/cdn/cdn-upload.ts +0 -75
  1442. package/extensions/openclaw-weixin/src/cdn/cdn-url.ts +0 -17
  1443. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.ts +0 -85
  1444. package/extensions/openclaw-weixin/src/cdn/upload.ts +0 -154
  1445. package/extensions/openclaw-weixin/src/channel.ts +0 -483
  1446. package/extensions/openclaw-weixin/src/config/config-schema.ts +0 -21
  1447. package/extensions/openclaw-weixin/src/log-upload.ts +0 -129
  1448. package/extensions/openclaw-weixin/src/media/media-download.ts +0 -138
  1449. package/extensions/openclaw-weixin/src/media/mime.ts +0 -76
  1450. package/extensions/openclaw-weixin/src/media/silk-transcode.ts +0 -74
  1451. package/extensions/openclaw-weixin/src/messaging/debug-mode.ts +0 -68
  1452. package/extensions/openclaw-weixin/src/messaging/error-notice.ts +0 -36
  1453. package/extensions/openclaw-weixin/src/messaging/inbound.ts +0 -283
  1454. package/extensions/openclaw-weixin/src/messaging/process-message.ts +0 -488
  1455. package/extensions/openclaw-weixin/src/messaging/send-media.ts +0 -76
  1456. package/extensions/openclaw-weixin/src/messaging/send.ts +0 -267
  1457. package/extensions/openclaw-weixin/src/messaging/slash-commands.ts +0 -105
  1458. package/extensions/openclaw-weixin/src/monitor/monitor.ts +0 -225
  1459. package/extensions/openclaw-weixin/src/runtime.ts +0 -67
  1460. package/extensions/openclaw-weixin/src/storage/state-dir.ts +0 -11
  1461. package/extensions/openclaw-weixin/src/storage/sync-buf.ts +0 -79
  1462. package/extensions/openclaw-weixin/src/util/logger.ts +0 -146
  1463. package/extensions/openclaw-weixin/src/util/random.ts +0 -17
  1464. package/extensions/openclaw-weixin/src/util/redact.ts +0 -57
  1465. package/extensions/openclaw-weixin/src/vendor.d.ts +0 -21
  1466. package/extensions/qbagent-mcp-server-x5uselocal-node/index.ts +0 -140
  1467. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.ts +0 -157
  1468. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.ts +0 -135
  1469. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.ts +0 -205
  1470. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.ts +0 -351
@@ -1,4 +1,4 @@
1
1
  import{A as e,p as t}from"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Bo as n,jo as r,xa as i}from"./auth-profiles-BhXA8Jy2.js";import{t as a}from"./command-format-CLxIPuLR.js";import{d as o,f as s}from"./agent-scope-DAWJwFfl.js";import{t as c,v as l,x as u}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import{_ as d}from"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import{n as f,r as p}from"./scan-paths-CWtvWW40.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import{m}from"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./send-DS5Quwb7.js";import"./send-BeZJ1zbp.js";import"./compact-CuBCVnVS.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./models-config-DN2Q51fC.js";import"./tokens-DRM8vzJx.js";import"./with-timeout-c1CzdShT.js";import"./deliver-COKdxPmA.js";import"./diagnostic-CW_Jv5UM.js";import"./send-DRm6AFp-.js";import"./pi-model-discovery-AiV9h8k6.js";import"./exec-approvals-allowlist-DBh9Pm77.js";import"./exec-safe-bin-runtime-policy-Ck3GO5AB.js";import"./model-catalog-BLdaFmIo.js";import"./fetch-CY5G3PDq.js";import"./audio-transcription-runner-BUsb6cqv.js";import"./fetch-guard-BaRbr_V6.js";import"./image-D-R3N1it.js";import"./tool-display-DJDtttQg.js";import"./api-key-rotation-D8WsZ43x.js";import"./proxy-fetch-gWETR3cl.js";import"./ir-CH7YvSi9.js";import"./render-DrrPmnMI.js";import"./target-errors-D55sWZ4E.js";import"./commands-Dy7duWlt.js";import"./commands-registry-Dn2uuNuy.js";import"./session-cost-usage-CHtVgnE8.js";import"./session-utils-CrR0wD3W.js";import"./sqlite-CILF3z9U.js";import"./call-BQT0zCgv.js";import"./pi-tools.policy-CeSKHaKa.js";import"./pairing-store-CjTPxq0X.js";import"./fetch-Dh-apy46.js";import"./skill-commands-C59b8Yso.js";import"./workspace-dirs-A8Vib9_B.js";import"./pairing-token-CX0SUJsB.js";import"./channel-activity-DYpm-0Cz.js";import"./tables-D1pcaye7.js";import"./kill-tree-DBJW8_Q-.js";import"./runtime-web-tools-BWv0X5qp.js";import"./runtime-BlsMYeaw.js";import"./node-shell-dXp4vk-i.js";import"./stagger-DxzgG2jd.js";import"./channel-selection-Ddyykqxv.js";import"./plugin-auto-enable-DCOxqfDQ.js";import"./send-8rJCpsDu.js";import"./outbound-attachment-DBNxdLYh.js";import"./delivery-queue-nkPJu0fY.js";import"./send-BPfl_1It.js";import"./system-run-command-FCk9hSMO.js";import"./fetch-Ce-scEU-.js";import"./command-secret-targets-KM3OecbM.js";import"./connection-auth-BcPbGyxw.js";import"./onboard-helpers-DbpWQoiB.js";import"./prompt-style-BThRSQJR.js";import"./pairing-labels-BP1h0iHy.js";import"./search-manager-KMRzwyPH.js";import"./manager-C5SBozw4.js";import"./memory-cli-CnruTL1h.js";import{t as h}from"./links-CBnmRP9D.js";import"./cli-utils-BleB1eys.js";import"./help-format-B4aEI7V9.js";import"./progress-d1m2sqR1.js";import"./exec-approvals-BXO9Cezj.js";import{a as ee,c as g,l as te,n as _,u as v}from"./install-safe-path-C6kc_8NW.js";import{a as y,c as b,f as ne,i as re,l as ie,n as ae,o as x,r as oe,s as se,t as ce,u as le}from"./npm-pack-install-C0te3Oap.js";import{n as ue,t as de}from"./table-CR7TFMew.js";import{a as S,t as C}from"./workspace-xNEpaJvu.js";import{t as w}from"./hooks-status-BHt-Xvh4.js";import{i as T,n as E,r as fe,t as pe}from"./npm-resolution-BCXCw93f.js";import D from"node:path";import O from"node:fs";import k from"node:fs/promises";async function me(e){let t=e.spec.trim(),n=d(t);return n?{ok:!1,error:n}:ce(await ae({tempDirPrefix:e.tempDirPrefix,spec:t,timeoutMs:e.timeoutMs,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e.warn,installFromArchive:e.installFromArchive,archiveInstallParams:e.archiveInstallParams}))}const A={};function j(e){return{hooksDir:e.hooksDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId}}function M(e){return e?e===`.`||e===`..`?`invalid hook name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid hook name: path separators not allowed`:null:`invalid hook name: missing`}function N(e,t){let n=t?l(t):D.join(c,`hooks`),r=M(e);if(r)throw Error(r);let i=_({baseDir:n,id:e,invalidNameMessage:`invalid hook name: path traversal detected`});if(!i.ok)throw Error(i.error);return i.path}async function P(e){let t=e[m]?.hooks;if(!Array.isArray(t))throw Error(`package.json missing openclaw.hooks`);let n=t.map(e=>typeof e==`string`?e.trim():``).filter(Boolean);if(n.length===0)throw Error(`package.json openclaw.hooks is empty`);return n}async function F(e,t){return await re({baseDir:t?l(t):D.join(c,`hooks`),id:e,invalidNameMessage:`invalid hook name: path traversal detected`,boundaryLabel:`hooks directory`})}async function I(e){let t=await F(e.id,e.hooksDir);if(!t.ok)return t;let n=t.targetDir,r=await oe({mode:e.mode,targetDir:n,alreadyExistsError:e.alreadyExistsError(n)});return r.ok?{ok:!0,targetDir:n}:r}async function L(e,t){return await g(D.join(e,`package.json`))?await he({packageDir:e,hooksDir:t.hooksDir,timeoutMs:t.timeoutMs,logger:t.logger,mode:t.mode,dryRun:t.dryRun,expectedHookPackId:t.expectedHookPackId}):await ge({hookDir:e,hooksDir:t.hooksDir,logger:t.logger,mode:t.mode,dryRun:t.dryRun,expectedHookPackId:t.expectedHookPackId})}async function R(e){let t=D.join(e,`HOOK.md`);if(!await g(t))throw Error(`HOOK.md missing in ${e}`);return S(await k.readFile(t,`utf-8`)).name||D.basename(e)}async function z(e){if(!await g(D.join(e,`HOOK.md`)))throw Error(`HOOK.md missing in ${e}`);if(!await Promise.all([`handler.ts`,`handler.js`,`index.ts`,`index.js`].map(async t=>g(D.join(e,t)))).then(e=>e.some(Boolean)))throw Error(`handler.ts/handler.js/index.ts/index.js missing in ${e}`)}async function he(e){let{logger:t,timeoutMs:n,mode:r,dryRun:i}=b(e,A),a=D.join(e.packageDir,`package.json`);if(!await g(a))return{ok:!1,error:`package.json missing`};let o;try{o=await te(a)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let s;try{s=await P(o)}catch(e){return{ok:!1,error:String(e)}}let c=typeof o.name==`string`?o.name:``,l=c?ee(c):D.basename(e.packageDir),u=M(l);if(u)return{ok:!1,error:u};if(e.expectedHookPackId&&e.expectedHookPackId!==l)return{ok:!1,error:`hook pack id mismatch: expected ${e.expectedHookPackId}, got ${l}`};let d=await I({id:l,hooksDir:e.hooksDir,mode:r,alreadyExistsError:e=>`hook pack already exists: ${e} (delete it first)`});if(!d.ok)return d;let m=d.targetDir,h=[];for(let t of s){let n=D.resolve(e.packageDir,t);if(!f(e.packageDir,n))return{ok:!1,error:`openclaw.hooks entry escapes package directory: ${t}`};if(await z(n),!p(e.packageDir,n,{requireRealpath:!0}))return{ok:!1,error:`openclaw.hooks entry resolves outside package directory: ${t}`};let r=await R(n);h.push(r)}if(i)return{ok:!0,hookPackId:l,hooks:h,targetDir:m,version:typeof o.version==`string`?o.version:void 0};let _=await x({sourceDir:e.packageDir,targetDir:m,mode:r,timeoutMs:n,logger:t,copyErrorPrefix:`failed to copy hook pack`,depsLogMessage:`Installing hook pack dependencies…`,manifestDependencies:o.dependencies});return _.ok?{ok:!0,hookPackId:l,hooks:h,targetDir:m,version:typeof o.version==`string`?o.version:void 0}:_}async function ge(e){let{logger:t,mode:n,dryRun:r}=se(e,A);await z(e.hookDir);let i=await R(e.hookDir),a=M(i);if(a)return{ok:!1,error:a};if(e.expectedHookPackId&&e.expectedHookPackId!==i)return{ok:!1,error:`hook id mismatch: expected ${e.expectedHookPackId}, got ${i}`};let o=await I({id:i,hooksDir:e.hooksDir,mode:n,alreadyExistsError:e=>`hook already exists: ${e} (delete it first)`});if(!o.ok)return o;let s=o.targetDir;if(r)return{ok:!0,hookPackId:i,hooks:[i],targetDir:s};let c=await y({sourceDir:e.hookDir,targetDir:s,mode:n,timeoutMs:12e4,logger:t,copyErrorPrefix:`failed to copy hook`,hasDeps:!1,depsLogMessage:`Installing hook dependencies…`});return c.ok?{ok:!0,hookPackId:i,hooks:[i],targetDir:s}:c}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=await ne(e.archivePath);if(!r.ok)return r;let i=r.path;return await le({archivePath:i,tempDirPrefix:`openclaw-hook-`,timeoutMs:n,logger:t,onExtracted:async r=>await L(r,j({hooksDir:e.hooksDir,timeoutMs:n,logger:t,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId}))})}async function V(e){let{logger:t,timeoutMs:n,mode:r,dryRun:i}=b(e,A),a=e.expectedHookPackId,o=e.spec;return t.info?.(`Downloading ${o.trim()}…`),await me({tempDirPrefix:`openclaw-hook-pack-`,spec:o,timeoutMs:n,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:j({hooksDir:e.hooksDir,timeoutMs:n,logger:t,mode:r,dryRun:i,expectedHookPackId:a})})}async function H(e){let t=await ie(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=j({hooksDir:e.hooksDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId});return r.isDirectory()?await L(n,i):v(n)?await B({archivePath:n,...i}):{ok:!1,error:`unsupported hook file: ${n}`}}function U(e,t){let{hookId:n,...r}=t,i={...e.hooks?.internal?.installs,[n]:{...e.hooks?.internal?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,hooks:{...e.hooks,internal:{...e.hooks?.internal,installs:{...i,[n]:i[n]}}}}}function _e(e,t){let n=new Map;for(let t of e)n.set(t.hook.name,t);for(let e of t)n.set(e.hook.name,e);return Array.from(n.values())}function W(e){let t=o(e,s(e)),n=C(t,{config:e});return w(t,{config:e,entries:_e(T({config:e,workspaceDir:t}).hooks.map(e=>e.entry),n)})}function G(e,t,n){let r=e.hooks.find(e=>e.name===t);if(!r)throw Error(`Hook "${t}" not found`);if(r.managedByPlugin)throw Error(`Hook "${t}" is managed by plugin "${r.pluginId??`unknown`}" and cannot be enabled/disabled.`);if(n?.requireEligible&&!r.eligible)throw Error(`Hook "${t}" is not eligible (missing requirements)`);return r}function K(e){let t={...e.config.hooks?.internal?.entries};t[e.hookName]={...t[e.hookName],enabled:e.enabled};let n={...e.config.hooks?.internal,...e.ensureHooksEnabled?{enabled:!0}:{},entries:t};return{...e.config,hooks:{...e.config.hooks,internal:n}}}function ve(t){return t.eligible?e.success(`✓ ready`):t.disabled?e.warn(`⏸ disabled`):e.error(`✗ missing`)}function ye(t){return`${t.emoji??`🔗`} ${e.command(t.name)}`}function be(e){return e.managedByPlugin?`plugin:${e.pluginId??`unknown`}`:e.source}function xe(e){let t=[];return e.missing.bins.length>0&&t.push(`bins: ${e.missing.bins.join(`, `)}`),e.missing.anyBins.length>0&&t.push(`anyBins: ${e.missing.anyBins.join(`, `)}`),e.missing.env.length>0&&t.push(`env: ${e.missing.env.join(`, `)}`),e.missing.config.length>0&&t.push(`config: ${e.missing.config.join(`, `)}`),e.missing.os.length>0&&t.push(`os: ${e.missing.os.join(`, `)}`),t.join(`; `)}function Se(n){t.error(`${e.error(`Error:`)} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}async function q(e){try{await e()}catch(e){Se(e)}}function J(){return{info:e=>t.log(e),warn:n=>t.log(e.warn(n))}}function Y(){t.log(`Restart the gateway to load hooks.`)}function X(n,r){let i=r.resolution.resolvedSpec??r.spec;t.log(e.warn(`Integrity drift detected for "${n}" (${i})\nExpected: ${r.expectedIntegrity}\nActual: ${r.actualIntegrity}`))}async function Z(e){try{let t=await k.readFile(D.join(e,`package.json`),`utf-8`),n=JSON.parse(t);return typeof n.version==`string`?n.version:void 0}catch{return}}function Q(e,t){let n={...e.hooks?.internal?.entries};for(let e of t)n[e]={...n[e],enabled:!0};return{...e,hooks:{...e.hooks,internal:{...e.hooks?.internal,enabled:!0,entries:n}}}}function $(t,n){let r=n.eligible?t.hooks.filter(e=>e.eligible):t.hooks;if(n.json){let e={workspaceDir:t.workspaceDir,managedHooksDir:t.managedHooksDir,hooks:r.map(e=>({name:e.name,description:e.description,emoji:e.emoji,eligible:e.eligible,disabled:e.disabled,source:e.source,pluginId:e.pluginId,events:e.events,homepage:e.homepage,missing:e.missing,managedByPlugin:e.managedByPlugin}))};return JSON.stringify(e,null,2)}if(r.length===0)return n.eligible?`No eligible hooks found. Run \`${a(`openclaw hooks list`)}\` to see all hooks.`:`No hooks found.`;let i=r.filter(e=>e.eligible),o=de(),s=r.map(t=>{let n=xe(t);return{Status:ve(t),Hook:ye(t),Description:e.muted(t.description),Source:be(t),Missing:n?e.warn(n):``}}),c=[{key:`Status`,header:`Status`,minWidth:10},{key:`Hook`,header:`Hook`,minWidth:18,flex:!0},{key:`Description`,header:`Description`,minWidth:24,flex:!0},{key:`Source`,header:`Source`,minWidth:12,flex:!0}];n.verbose&&c.push({key:`Missing`,header:`Missing`,minWidth:18,flex:!0});let l=[];return l.push(`${e.heading(`Hooks`)} ${e.muted(`(${i.length}/${r.length} ready)`)}`),l.push(ue({width:o,columns:c,rows:s}).trimEnd()),l.join(`
2
2
  `)}function Ce(t,n,r){let i=t.hooks.find(e=>e.name===n||e.hookKey===n);if(!i)return r.json?JSON.stringify({error:`not found`,hook:n},null,2):`Hook "${n}" not found. Run \`${a(`openclaw hooks list`)}\` to see available hooks.`;if(r.json)return JSON.stringify(i,null,2);let o=[],s=i.emoji??`🔗`,c=i.eligible?e.success(`✓ Ready`):i.disabled?e.warn(`⏸ Disabled`):e.error(`✗ Missing requirements`);if(o.push(`${s} ${e.heading(i.name)} ${c}`),o.push(``),o.push(i.description),o.push(``),o.push(e.heading(`Details:`)),i.managedByPlugin?o.push(`${e.muted(` Source:`)} ${i.source} (${i.pluginId??`unknown`})`):o.push(`${e.muted(` Source:`)} ${i.source}`),o.push(`${e.muted(` Path:`)} ${u(i.filePath)}`),o.push(`${e.muted(` Handler:`)} ${u(i.handlerPath)}`),i.homepage&&o.push(`${e.muted(` Homepage:`)} ${i.homepage}`),i.events.length>0&&o.push(`${e.muted(` Events:`)} ${i.events.join(`, `)}`),i.managedByPlugin&&o.push(e.muted(` Managed by plugin; enable/disable via hooks CLI not available.`)),i.requirements.bins.length>0||i.requirements.anyBins.length>0||i.requirements.env.length>0||i.requirements.config.length>0||i.requirements.os.length>0){if(o.push(``),o.push(e.heading(`Requirements:`)),i.requirements.bins.length>0){let t=i.requirements.bins.map(t=>i.missing.bins.includes(t)?e.error(`✗ ${t}`):e.success(`✓ ${t}`));o.push(`${e.muted(` Binaries:`)} ${t.join(`, `)}`)}if(i.requirements.anyBins.length>0){let t=i.missing.anyBins.length>0?e.error(`✗ (any of: ${i.requirements.anyBins.join(`, `)})`):e.success(`✓ (any of: ${i.requirements.anyBins.join(`, `)})`);o.push(`${e.muted(` Any binary:`)} ${t}`)}if(i.requirements.env.length>0){let t=i.requirements.env.map(t=>i.missing.env.includes(t)?e.error(`✗ ${t}`):e.success(`✓ ${t}`));o.push(`${e.muted(` Environment:`)} ${t.join(`, `)}`)}if(i.requirements.config.length>0){let t=i.configChecks.map(t=>t.satisfied?e.success(`✓ ${t.path}`):e.error(`✗ ${t.path}`));o.push(`${e.muted(` Config:`)} ${t.join(`, `)}`)}if(i.requirements.os.length>0){let t=i.missing.os.length>0?e.error(`✗ (${i.requirements.os.join(`, `)})`):e.success(`✓ (${i.requirements.os.join(`, `)})`);o.push(`${e.muted(` OS:`)} ${t}`)}}return o.join(`
3
3
  `)}function we(t,n){if(n.json){let e=t.hooks.filter(e=>e.eligible),n=t.hooks.filter(e=>!e.eligible);return JSON.stringify({total:t.hooks.length,eligible:e.length,notEligible:n.length,hooks:{eligible:e.map(e=>e.name),notEligible:n.map(e=>({name:e.name,missing:e.missing}))}},null,2)}let r=t.hooks.filter(e=>e.eligible),i=t.hooks.filter(e=>!e.eligible),a=[];if(a.push(e.heading(`Hooks Status`)),a.push(``),a.push(`${e.muted(`Total hooks:`)} ${t.hooks.length}`),a.push(`${e.success(`Ready:`)} ${r.length}`),a.push(`${e.warn(`Not ready:`)} ${i.length}`),i.length>0){a.push(``),a.push(e.heading(`Hooks not ready:`));for(let e of i){let t=[];e.disabled&&t.push(`disabled`),e.missing.bins.length>0&&t.push(`bins: ${e.missing.bins.join(`, `)}`),e.missing.anyBins.length>0&&t.push(`anyBins: ${e.missing.anyBins.join(`, `)}`),e.missing.env.length>0&&t.push(`env: ${e.missing.env.join(`, `)}`),e.missing.config.length>0&&t.push(`config: ${e.missing.config.join(`, `)}`),e.missing.os.length>0&&t.push(`os: ${e.missing.os.join(`, `)}`),a.push(` ${e.emoji??`🔗`} ${e.name} - ${t.join(`; `)}`)}}return a.join(`
4
- `)}async function Te(i){let a=r(),o=G(W(a),i,{requireEligible:!0});await n(K({config:a,hookName:i,enabled:!0,ensureHooksEnabled:!0})),t.log(`${e.success(`✓`)} Enabled hook: ${o.emoji??`🔗`} ${e.command(i)}`)}async function Ee(i){let a=r(),o=G(W(a),i);await n(K({config:a,hookName:i,enabled:!1})),t.log(`${e.warn(`⏸`)} Disabled hook: ${o.emoji??`🔗`} ${e.command(i)}`)}function De(a){let o=a.command(`hooks`).description(`Manage internal agent hooks`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${h(`/cli/hooks`,`docs.openclaw.ai/cli/hooks`)}\n`);o.command(`list`).description(`List all hooks`).option(`--eligible`,`Show only eligible hooks`,!1).option(`--json`,`Output as JSON`,!1).option(`-v, --verbose`,`Show more details including missing requirements`,!1).action(async e=>q(async()=>{let n=W(r());t.log($(n,e))})),o.command(`info <name>`).description(`Show detailed information about a hook`).option(`--json`,`Output as JSON`,!1).action(async(e,n)=>q(async()=>{let i=W(r());t.log(Ce(i,e,n))})),o.command(`check`).description(`Check hooks eligibility status`).option(`--json`,`Output as JSON`,!1).action(async e=>q(async()=>{let n=W(r());t.log(we(n,e))})),o.command(`enable <name>`).description(`Enable a hook`).action(async e=>q(async()=>{await Te(e)})),o.command(`disable <name>`).description(`Disable a hook`).action(async e=>q(async()=>{await Ee(e)})),o.command(`install`).description(`Install a hook pack (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path to a hook pack or npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).option(`--pin`,`Record npm installs as exact resolved <name>@<version>`,!1).action(async(i,a)=>{let o=l(i),s=r();if(O.existsSync(o)){if(a.link){O.statSync(o).isDirectory()||(t.error(`Linked hook paths must be directories.`),process.exit(1));let e=s.hooks?.internal?.load?.extraDirs??[],r=Array.from(new Set([...e,o])),i=await H({path:o,dryRun:!0});i.ok||(t.error(i.error),process.exit(1));let a={...s,hooks:{...s.hooks,internal:{...s.hooks?.internal,enabled:!0,load:{...s.hooks?.internal?.load,extraDirs:r}}}};a=Q(a,i.hooks),a=U(a,{hookId:i.hookPackId,source:`path`,sourcePath:o,installPath:o,version:i.version,hooks:i.hooks}),await n(a),t.log(`Linked hook path: ${u(o)}`),Y();return}let e=await H({path:o,logger:J()});e.ok||(t.error(e.error),process.exit(1));let r=Q(s,e.hooks),i=v(o)?`archive`:`path`;r=U(r,{hookId:e.hookPackId,source:i,sourcePath:o,installPath:e.targetDir,version:e.version,hooks:e.hooks}),await n(r),t.log(`Installed hooks: ${e.hooks.join(`, `)}`),Y();return}a.link&&(t.error("`--link` requires a local path."),process.exit(1)),fe(i,[`.zip`,`.tgz`,`.tar.gz`,`.tar`])&&(t.error(`Path not found: ${o}`),process.exit(1));let c=await V({spec:i,logger:J()});c.ok||(t.error(c.error),process.exit(1));let d=Q(s,c.hooks),f=E(i,!!a.pin,c.targetDir,c.version,c.npmResolution,t.log,e.warn);d=U(d,{hookId:c.hookPackId,...f,hooks:c.hooks}),await n(d),t.log(`Installed hooks: ${c.hooks.join(`, `)}`),Y()}),o.command(`update`).description(`Update installed hooks (npm installs only)`).argument(`[id]`,`Hook pack id (omit with --all)`).option(`--all`,`Update all tracked hooks`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(a,o)=>{let s=r(),c=s.hooks?.internal?.installs??{},l=o.all?Object.keys(c):a?[a]:[];l.length===0&&(t.error(`Provide a hook id or use --all.`),process.exit(1));let u=s,d=0;for(let n of l){let r=c[n];if(!r){t.log(e.warn(`No install record for "${n}".`));continue}if(r.source!==`npm`){t.log(e.warn(`Skipping "${n}" (source: ${r.source}).`));continue}if(!r.spec){t.log(e.warn(`Skipping "${n}" (missing npm spec).`));continue}let a;try{a=r.installPath??N(n)}catch(r){t.log(e.error(`Invalid install path for "${n}": ${String(r)}`));continue}let s=await Z(a);if(o.dryRun){let i=await V({spec:r.spec,mode:`update`,dryRun:!0,expectedHookPackId:n,expectedIntegrity:r.integrity,onIntegrityDrift:async e=>(X(n,e),!0),logger:J()});if(!i.ok){t.log(e.error(`Failed to check ${n}: ${i.error}`));continue}let a=i.version??`unknown`,o=s??`unknown`;s&&i.version&&s===i.version?t.log(`${n} is up to date (${o}).`):t.log(`Would update ${n}: ${o} → ${a}.`);continue}let l=await V({spec:r.spec,mode:`update`,expectedHookPackId:n,expectedIntegrity:r.integrity,onIntegrityDrift:async e=>(X(n,e),await i(`Continue updating "${n}" with this artifact?`)),logger:J()});if(!l.ok){t.log(e.error(`Failed to update ${n}: ${l.error}`));continue}let f=l.version??await Z(l.targetDir);u=U(u,{hookId:n,...pe({spec:r.spec,installPath:l.targetDir,version:f,resolution:l.npmResolution}),hooks:l.hooks}),d+=1;let p=s??`unknown`,m=f??`unknown`;s&&f&&s===f?t.log(`${n} already at ${p}.`):t.log(`Updated ${n}: ${p} → ${m}.`)}d>0&&(await n(u),Y())}),o.action(async()=>q(async()=>{let e=W(r());t.log($(e,{}))}))}export{De as registerHooksCli};
4
+ `)}async function Te(i){let a=r(),o=G(W(a),i,{requireEligible:!0});await n(K({config:a,hookName:i,enabled:!0,ensureHooksEnabled:!0})),t.log(`${e.success(`✓`)} Enabled hook: ${o.emoji??`🔗`} ${e.command(i)}`)}async function Ee(i){let a=r(),o=G(W(a),i);await n(K({config:a,hookName:i,enabled:!1})),t.log(`${e.warn(`⏸`)} Disabled hook: ${o.emoji??`🔗`} ${e.command(i)}`)}function De(a){let o=a.command(`hooks`).description(`Manage internal agent hooks`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${h(`/cli/hooks`,`docs.openclaw.ai/cli/hooks`)}\n`);o.command(`list`).description(`List all hooks`).option(`--eligible`,`Show only eligible hooks`,!1).option(`--json`,`Output as JSON`,!1).option(`-v, --verbose`,`Show more details including missing requirements`,!1).action(async e=>q(async()=>{let n=W(r());t.log($(n,e))})),o.command(`info <name>`).description(`Show detailed information about a hook`).option(`--json`,`Output as JSON`,!1).action(async(e,n)=>q(async()=>{let i=W(r());t.log(Ce(i,e,n))})),o.command(`check`).description(`Check hooks eligibility status`).option(`--json`,`Output as JSON`,!1).action(async e=>q(async()=>{let n=W(r());t.log(we(n,e))})),o.command(`enable <name>`).description(`Enable a hook`).action(async e=>q(async()=>{await Te(e)})),o.command(`disable <name>`).description(`Disable a hook`).action(async e=>q(async()=>{await Ee(e)})),o.command(`install`).description(`Install a hook pack (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path to a hook pack or npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).option(`--pin`,`Record npm installs as exact resolved <name>@<version>`,!1).action(async(i,a)=>{let o=l(i),s=r();if(O.existsSync(o)){if(a.link){O.statSync(o).isDirectory()||(t.error(`Linked hook paths must be directories.`),process.exit(1));let e=s.hooks?.internal?.load?.extraDirs??[],r=Array.from(new Set([...e,o])),i=await H({path:o,dryRun:!0});i.ok||(t.error(i.error),process.exit(1));let a={...s,hooks:{...s.hooks,internal:{...s.hooks?.internal,enabled:!0,load:{...s.hooks?.internal?.load,extraDirs:r}}}};a=Q(a,i.hooks),a=U(a,{hookId:i.hookPackId,source:`path`,sourcePath:o,installPath:o,version:i.version,hooks:i.hooks}),await n(a),t.log(`Linked hook path: ${u(o)}`),Y();return}let e=await H({path:o,logger:J()});e.ok||(t.error(e.error),process.exit(1));let r=Q(s,e.hooks),i=v(o)?`archive`:`path`;r=U(r,{hookId:e.hookPackId,source:i,sourcePath:o,installPath:e.targetDir,version:e.version,hooks:e.hooks}),await n(r),t.log(`Installed hooks: ${e.hooks.join(`, `)}`),Y();return}a.link&&(t.error("`--link` requires a local path."),process.exit(1)),fe(i,[`.zip`,`.tgz`,`.tar.gz`,`.tar`])&&(t.error(`Path not found: ${o}`),process.exit(1));let c=await V({spec:i,logger:J()});c.ok||(t.error(c.error),process.exit(1));let d=Q(s,c.hooks),f=E(i,!!a.pin,c.targetDir,c.version,c.npmResolution,t.log,e.warn);d=U(d,{hookId:c.hookPackId,...f,hooks:c.hooks}),await n(d),t.log(`Installed hooks: ${c.hooks.join(`, `)}`),Y()}),o.command(`update`).description(`Update installed hooks (npm installs only)`).argument(`[id]`,`Hook pack id (omit with --all)`).option(`--all`,`Update all tracked hooks`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(a,o)=>{let s=r(),c=s.hooks?.internal?.installs??{},l=o.all?Object.keys(c):a?[a]:[];l.length===0&&(t.error(`Provide a hook id or use --all.`),process.exit(1));let u=s,d=0;for(let n of l){let r=c[n];if(!r){t.log(e.warn(`No install record for "${n}".`));continue}if(r.source!==`npm`){t.log(e.warn(`Skipping "${n}" (source: ${r.source}).`));continue}if(!r.spec){t.log(e.warn(`Skipping "${n}" (missing npm spec).`));continue}let a;try{a=r.installPath??N(n)}catch(r){t.log(e.error(`Invalid install path for "${n}": ${String(r)}`));continue}let s=await Z(a);if(o.dryRun){let i=await V({spec:r.spec,mode:`update`,dryRun:!0,expectedHookPackId:n,expectedIntegrity:r.integrity,onIntegrityDrift:async e=>(X(n,e),!0),logger:J()});if(!i.ok){t.log(e.error(`Failed to check ${n}: ${i.error}`));continue}let a=i.version??`unknown`,o=s??`unknown`;s&&i.version&&s===i.version?t.log(`${n} is up to date (${o}).`):t.log(`Would update ${n}: ${o} → ${a}.`);continue}let l=await V({spec:r.spec,mode:`update`,expectedHookPackId:n,expectedIntegrity:r.integrity,onIntegrityDrift:async e=>(X(n,e),await i(`Continue updating "${n}" with this artifact?`)),logger:J()});if(!l.ok){t.log(e.error(`Failed to update ${n}: ${l.error}`));continue}let f=l.version??await Z(l.targetDir);u=U(u,{hookId:n,...pe({spec:r.spec,installPath:l.targetDir,version:f,resolution:l.npmResolution}),hooks:l.hooks}),d+=1;let p=s??`unknown`,m=f??`unknown`;s&&f&&s===f?t.log(`${n} already at ${p}.`):t.log(`Updated ${n}: ${p} → ${m}.`)}d>0&&(await n(u),Y())}),o.action(async()=>q(async()=>{let e=W(r());t.log($(e,{}))}))}export{De as registerHooksCli};
@@ -1,4 +1,4 @@
1
1
  import"./paths-B4IRk3wi.js";import{A as e,p as t}from"./subsystem-C5XF2Fy5.js";import{S as n,t as r,y as i}from"./utils-UGOV_184.js";import{Lo as a,nc as o,qs as s}from"./model-selection-I1ctjFOB.js";import"./reply-r9KtzgpM.js";import{d as c,f as l}from"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{t as u}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import{_ as d}from"./env-overrides-DXJbFrwI.js";import{n as f,r as p}from"./scan-paths-C13EseXp.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import{m}from"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./send-YPQFx-fV.js";import"./send-Ds5sy22D.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./audio-transcription-runner-BJNP7vB8.js";import"./image-BJC11A7e.js";import"./models-config-CWIlroKT.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-Cji70DJW.js";import"./api-key-rotation-DYYvcqSG.js";import"./local-roots-Dxioh0C2.js";import"./model-catalog-vNCcsy4h.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-DHP2vHKB.js";import"./commands-CGpM84iR.js";import"./commands-registry-CxDVU5s9.js";import"./pairing-store-Bv4KSELv.js";import"./fetch-Dikjvc5M.js";import"./call-BA3O_Qpl.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-Bzd5vlKH.js";import"./send-D0y-r_hg2.js";import"./pi-model-discovery-6myCPEJE.js";import"./exec-approvals-allowlist-BKFaHvA5.js";import"./exec-safe-bin-runtime-policy-D2WexijZ.js";import"./ir-CZdZsdnI.js";import"./render-D8OWO2hT.js";import"./target-errors-DH0aw-m5.js";import"./read-only-account-inspect-DEnPVHTo.js";import"./channel-selection-oRONo9z3.js";import"./plugin-auto-enable-Cp7L8ko8.js";import"./send-CgeRzkWS.js";import"./outbound-attachment-aZWcoZ-N.js";import"./delivery-queue-CKbauSFq.js";import"./send-DIw8ExHc.js";import"./channel-activity-DHY5wAyl.js";import"./tables-h7y1Jhf4.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-O39uSj-k.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-CKX1ds78.js";import"./restart-CTfuVGfA.js";import"./runtime-web-tools-CCIXUISf.js";import"./command-secret-targets-BBTiqQKa.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-DZ-3Svr_.js";import"./onboard-helpers-CGJLUoxR.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-ryOnuOFA.js";import"./memory-cli-DHvscp7X.js";import"./query-expansion-0OxEb1Io.js";import"./manager-BwrZfep3.js";import{t as h}from"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-C7-5RrbN.js";import"./system-run-command-DCzdgYyb.js";import"./runtime-DLxfCs7F.js";import"./stagger-DmFYysrJ.js";import{a as ee,c as g,l as te,n as _,u as v}from"./install-safe-path-iesxijn2.js";import{a as y,c as b,f as ne,i as re,l as ie,n as ae,o as x,r as oe,s as se,t as ce,u as le}from"./npm-pack-install-B23L-AtF.js";import{n as ue,t as de}from"./table-CY440fI1.js";import{a as S,t as C}from"./workspace-C45T1Cxg.js";import{t as w}from"./hooks-status-CRJ4J0ZW.js";import{i as T,n as E,r as fe,t as pe}from"./npm-resolution-Cmm82lui.js";import D from"node:fs";import O from"node:path";import k from"node:fs/promises";async function me(e){let t=e.spec.trim(),n=d(t);return n?{ok:!1,error:n}:ce(await ae({tempDirPrefix:e.tempDirPrefix,spec:t,timeoutMs:e.timeoutMs,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e.warn,installFromArchive:e.installFromArchive,archiveInstallParams:e.archiveInstallParams}))}const A={};function j(e){return{hooksDir:e.hooksDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId}}function M(e){return e?e===`.`||e===`..`?`invalid hook name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid hook name: path separators not allowed`:null:`invalid hook name: missing`}function N(e,t){let n=t?i(t):O.join(r,`hooks`),a=M(e);if(a)throw Error(a);let o=_({baseDir:n,id:e,invalidNameMessage:`invalid hook name: path traversal detected`});if(!o.ok)throw Error(o.error);return o.path}async function P(e){let t=e[m]?.hooks;if(!Array.isArray(t))throw Error(`package.json missing openclaw.hooks`);let n=t.map(e=>typeof e==`string`?e.trim():``).filter(Boolean);if(n.length===0)throw Error(`package.json openclaw.hooks is empty`);return n}async function F(e,t){return await re({baseDir:t?i(t):O.join(r,`hooks`),id:e,invalidNameMessage:`invalid hook name: path traversal detected`,boundaryLabel:`hooks directory`})}async function I(e){let t=await F(e.id,e.hooksDir);if(!t.ok)return t;let n=t.targetDir,r=await oe({mode:e.mode,targetDir:n,alreadyExistsError:e.alreadyExistsError(n)});return r.ok?{ok:!0,targetDir:n}:r}async function L(e,t){return await g(O.join(e,`package.json`))?await he({packageDir:e,hooksDir:t.hooksDir,timeoutMs:t.timeoutMs,logger:t.logger,mode:t.mode,dryRun:t.dryRun,expectedHookPackId:t.expectedHookPackId}):await ge({hookDir:e,hooksDir:t.hooksDir,logger:t.logger,mode:t.mode,dryRun:t.dryRun,expectedHookPackId:t.expectedHookPackId})}async function R(e){let t=O.join(e,`HOOK.md`);if(!await g(t))throw Error(`HOOK.md missing in ${e}`);return S(await k.readFile(t,`utf-8`)).name||O.basename(e)}async function z(e){if(!await g(O.join(e,`HOOK.md`)))throw Error(`HOOK.md missing in ${e}`);if(!await Promise.all([`handler.ts`,`handler.js`,`index.ts`,`index.js`].map(async t=>g(O.join(e,t)))).then(e=>e.some(Boolean)))throw Error(`handler.ts/handler.js/index.ts/index.js missing in ${e}`)}async function he(e){let{logger:t,timeoutMs:n,mode:r,dryRun:i}=b(e,A),a=O.join(e.packageDir,`package.json`);if(!await g(a))return{ok:!1,error:`package.json missing`};let o;try{o=await te(a)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let s;try{s=await P(o)}catch(e){return{ok:!1,error:String(e)}}let c=typeof o.name==`string`?o.name:``,l=c?ee(c):O.basename(e.packageDir),u=M(l);if(u)return{ok:!1,error:u};if(e.expectedHookPackId&&e.expectedHookPackId!==l)return{ok:!1,error:`hook pack id mismatch: expected ${e.expectedHookPackId}, got ${l}`};let d=await I({id:l,hooksDir:e.hooksDir,mode:r,alreadyExistsError:e=>`hook pack already exists: ${e} (delete it first)`});if(!d.ok)return d;let m=d.targetDir,h=[];for(let t of s){let n=O.resolve(e.packageDir,t);if(!f(e.packageDir,n))return{ok:!1,error:`openclaw.hooks entry escapes package directory: ${t}`};if(await z(n),!p(e.packageDir,n,{requireRealpath:!0}))return{ok:!1,error:`openclaw.hooks entry resolves outside package directory: ${t}`};let r=await R(n);h.push(r)}if(i)return{ok:!0,hookPackId:l,hooks:h,targetDir:m,version:typeof o.version==`string`?o.version:void 0};let _=await x({sourceDir:e.packageDir,targetDir:m,mode:r,timeoutMs:n,logger:t,copyErrorPrefix:`failed to copy hook pack`,depsLogMessage:`Installing hook pack dependencies…`,manifestDependencies:o.dependencies});return _.ok?{ok:!0,hookPackId:l,hooks:h,targetDir:m,version:typeof o.version==`string`?o.version:void 0}:_}async function ge(e){let{logger:t,mode:n,dryRun:r}=se(e,A);await z(e.hookDir);let i=await R(e.hookDir),a=M(i);if(a)return{ok:!1,error:a};if(e.expectedHookPackId&&e.expectedHookPackId!==i)return{ok:!1,error:`hook id mismatch: expected ${e.expectedHookPackId}, got ${i}`};let o=await I({id:i,hooksDir:e.hooksDir,mode:n,alreadyExistsError:e=>`hook already exists: ${e} (delete it first)`});if(!o.ok)return o;let s=o.targetDir;if(r)return{ok:!0,hookPackId:i,hooks:[i],targetDir:s};let c=await y({sourceDir:e.hookDir,targetDir:s,mode:n,timeoutMs:12e4,logger:t,copyErrorPrefix:`failed to copy hook`,hasDeps:!1,depsLogMessage:`Installing hook dependencies…`});return c.ok?{ok:!0,hookPackId:i,hooks:[i],targetDir:s}:c}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=await ne(e.archivePath);if(!r.ok)return r;let i=r.path;return await le({archivePath:i,tempDirPrefix:`openclaw-hook-`,timeoutMs:n,logger:t,onExtracted:async r=>await L(r,j({hooksDir:e.hooksDir,timeoutMs:n,logger:t,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId}))})}async function V(e){let{logger:t,timeoutMs:n,mode:r,dryRun:i}=b(e,A),a=e.expectedHookPackId,o=e.spec;return t.info?.(`Downloading ${o.trim()}…`),await me({tempDirPrefix:`openclaw-hook-pack-`,spec:o,timeoutMs:n,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:j({hooksDir:e.hooksDir,timeoutMs:n,logger:t,mode:r,dryRun:i,expectedHookPackId:a})})}async function H(e){let t=await ie(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=j({hooksDir:e.hooksDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedHookPackId:e.expectedHookPackId});return r.isDirectory()?await L(n,i):v(n)?await B({archivePath:n,...i}):{ok:!1,error:`unsupported hook file: ${n}`}}function U(e,t){let{hookId:n,...r}=t,i={...e.hooks?.internal?.installs,[n]:{...e.hooks?.internal?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,hooks:{...e.hooks,internal:{...e.hooks?.internal,installs:{...i,[n]:i[n]}}}}}function _e(e,t){let n=new Map;for(let t of e)n.set(t.hook.name,t);for(let e of t)n.set(e.hook.name,e);return Array.from(n.values())}function W(e){let t=c(e,l(e)),n=C(t,{config:e});return w(t,{config:e,entries:_e(T({config:e,workspaceDir:t}).hooks.map(e=>e.entry),n)})}function G(e,t,n){let r=e.hooks.find(e=>e.name===t);if(!r)throw Error(`Hook "${t}" not found`);if(r.managedByPlugin)throw Error(`Hook "${t}" is managed by plugin "${r.pluginId??`unknown`}" and cannot be enabled/disabled.`);if(n?.requireEligible&&!r.eligible)throw Error(`Hook "${t}" is not eligible (missing requirements)`);return r}function K(e){let t={...e.config.hooks?.internal?.entries};t[e.hookName]={...t[e.hookName],enabled:e.enabled};let n={...e.config.hooks?.internal,...e.ensureHooksEnabled?{enabled:!0}:{},entries:t};return{...e.config,hooks:{...e.config.hooks,internal:n}}}function ve(t){return t.eligible?e.success(`✓ ready`):t.disabled?e.warn(`⏸ disabled`):e.error(`✗ missing`)}function ye(t){return`${t.emoji??`🔗`} ${e.command(t.name)}`}function be(e){return e.managedByPlugin?`plugin:${e.pluginId??`unknown`}`:e.source}function xe(e){let t=[];return e.missing.bins.length>0&&t.push(`bins: ${e.missing.bins.join(`, `)}`),e.missing.anyBins.length>0&&t.push(`anyBins: ${e.missing.anyBins.join(`, `)}`),e.missing.env.length>0&&t.push(`env: ${e.missing.env.join(`, `)}`),e.missing.config.length>0&&t.push(`config: ${e.missing.config.join(`, `)}`),e.missing.os.length>0&&t.push(`os: ${e.missing.os.join(`, `)}`),t.join(`; `)}function Se(n){t.error(`${e.error(`Error:`)} ${n instanceof Error?n.message:String(n)}`),process.exit(1)}async function q(e){try{await e()}catch(e){Se(e)}}function J(){return{info:e=>t.log(e),warn:n=>t.log(e.warn(n))}}function Y(){t.log(`Restart the gateway to load hooks.`)}function X(n,r){let i=r.resolution.resolvedSpec??r.spec;t.log(e.warn(`Integrity drift detected for "${n}" (${i})\nExpected: ${r.expectedIntegrity}\nActual: ${r.actualIntegrity}`))}async function Z(e){try{let t=await k.readFile(O.join(e,`package.json`),`utf-8`),n=JSON.parse(t);return typeof n.version==`string`?n.version:void 0}catch{return}}function Q(e,t){let n={...e.hooks?.internal?.entries};for(let e of t)n[e]={...n[e],enabled:!0};return{...e,hooks:{...e.hooks,internal:{...e.hooks?.internal,enabled:!0,entries:n}}}}function $(t,n){let r=n.eligible?t.hooks.filter(e=>e.eligible):t.hooks;if(n.json){let e={workspaceDir:t.workspaceDir,managedHooksDir:t.managedHooksDir,hooks:r.map(e=>({name:e.name,description:e.description,emoji:e.emoji,eligible:e.eligible,disabled:e.disabled,source:e.source,pluginId:e.pluginId,events:e.events,homepage:e.homepage,missing:e.missing,managedByPlugin:e.managedByPlugin}))};return JSON.stringify(e,null,2)}if(r.length===0)return n.eligible?`No eligible hooks found. Run \`${u(`openclaw hooks list`)}\` to see all hooks.`:`No hooks found.`;let i=r.filter(e=>e.eligible),a=de(),o=r.map(t=>{let n=xe(t);return{Status:ve(t),Hook:ye(t),Description:e.muted(t.description),Source:be(t),Missing:n?e.warn(n):``}}),s=[{key:`Status`,header:`Status`,minWidth:10},{key:`Hook`,header:`Hook`,minWidth:18,flex:!0},{key:`Description`,header:`Description`,minWidth:24,flex:!0},{key:`Source`,header:`Source`,minWidth:12,flex:!0}];n.verbose&&s.push({key:`Missing`,header:`Missing`,minWidth:18,flex:!0});let c=[];return c.push(`${e.heading(`Hooks`)} ${e.muted(`(${i.length}/${r.length} ready)`)}`),c.push(ue({width:a,columns:s,rows:o}).trimEnd()),c.join(`
2
2
  `)}function Ce(t,r,i){let a=t.hooks.find(e=>e.name===r||e.hookKey===r);if(!a)return i.json?JSON.stringify({error:`not found`,hook:r},null,2):`Hook "${r}" not found. Run \`${u(`openclaw hooks list`)}\` to see available hooks.`;if(i.json)return JSON.stringify(a,null,2);let o=[],s=a.emoji??`🔗`,c=a.eligible?e.success(`✓ Ready`):a.disabled?e.warn(`⏸ Disabled`):e.error(`✗ Missing requirements`);if(o.push(`${s} ${e.heading(a.name)} ${c}`),o.push(``),o.push(a.description),o.push(``),o.push(e.heading(`Details:`)),a.managedByPlugin?o.push(`${e.muted(` Source:`)} ${a.source} (${a.pluginId??`unknown`})`):o.push(`${e.muted(` Source:`)} ${a.source}`),o.push(`${e.muted(` Path:`)} ${n(a.filePath)}`),o.push(`${e.muted(` Handler:`)} ${n(a.handlerPath)}`),a.homepage&&o.push(`${e.muted(` Homepage:`)} ${a.homepage}`),a.events.length>0&&o.push(`${e.muted(` Events:`)} ${a.events.join(`, `)}`),a.managedByPlugin&&o.push(e.muted(` Managed by plugin; enable/disable via hooks CLI not available.`)),a.requirements.bins.length>0||a.requirements.anyBins.length>0||a.requirements.env.length>0||a.requirements.config.length>0||a.requirements.os.length>0){if(o.push(``),o.push(e.heading(`Requirements:`)),a.requirements.bins.length>0){let t=a.requirements.bins.map(t=>a.missing.bins.includes(t)?e.error(`✗ ${t}`):e.success(`✓ ${t}`));o.push(`${e.muted(` Binaries:`)} ${t.join(`, `)}`)}if(a.requirements.anyBins.length>0){let t=a.missing.anyBins.length>0?e.error(`✗ (any of: ${a.requirements.anyBins.join(`, `)})`):e.success(`✓ (any of: ${a.requirements.anyBins.join(`, `)})`);o.push(`${e.muted(` Any binary:`)} ${t}`)}if(a.requirements.env.length>0){let t=a.requirements.env.map(t=>a.missing.env.includes(t)?e.error(`✗ ${t}`):e.success(`✓ ${t}`));o.push(`${e.muted(` Environment:`)} ${t.join(`, `)}`)}if(a.requirements.config.length>0){let t=a.configChecks.map(t=>t.satisfied?e.success(`✓ ${t.path}`):e.error(`✗ ${t.path}`));o.push(`${e.muted(` Config:`)} ${t.join(`, `)}`)}if(a.requirements.os.length>0){let t=a.missing.os.length>0?e.error(`✗ (${a.requirements.os.join(`, `)})`):e.success(`✓ (${a.requirements.os.join(`, `)})`);o.push(`${e.muted(` OS:`)} ${t}`)}}return o.join(`
3
3
  `)}function we(t,n){if(n.json){let e=t.hooks.filter(e=>e.eligible),n=t.hooks.filter(e=>!e.eligible);return JSON.stringify({total:t.hooks.length,eligible:e.length,notEligible:n.length,hooks:{eligible:e.map(e=>e.name),notEligible:n.map(e=>({name:e.name,missing:e.missing}))}},null,2)}let r=t.hooks.filter(e=>e.eligible),i=t.hooks.filter(e=>!e.eligible),a=[];if(a.push(e.heading(`Hooks Status`)),a.push(``),a.push(`${e.muted(`Total hooks:`)} ${t.hooks.length}`),a.push(`${e.success(`Ready:`)} ${r.length}`),a.push(`${e.warn(`Not ready:`)} ${i.length}`),i.length>0){a.push(``),a.push(e.heading(`Hooks not ready:`));for(let e of i){let t=[];e.disabled&&t.push(`disabled`),e.missing.bins.length>0&&t.push(`bins: ${e.missing.bins.join(`, `)}`),e.missing.anyBins.length>0&&t.push(`anyBins: ${e.missing.anyBins.join(`, `)}`),e.missing.env.length>0&&t.push(`env: ${e.missing.env.join(`, `)}`),e.missing.config.length>0&&t.push(`config: ${e.missing.config.join(`, `)}`),e.missing.os.length>0&&t.push(`os: ${e.missing.os.join(`, `)}`),a.push(` ${e.emoji??`🔗`} ${e.name} - ${t.join(`; `)}`)}}return a.join(`
4
- `)}async function Te(n){let r=s(),i=G(W(r),n,{requireEligible:!0});await o(K({config:r,hookName:n,enabled:!0,ensureHooksEnabled:!0})),t.log(`${e.success(`✓`)} Enabled hook: ${i.emoji??`🔗`} ${e.command(n)}`)}async function Ee(n){let r=s(),i=G(W(r),n);await o(K({config:r,hookName:n,enabled:!1})),t.log(`${e.warn(`⏸`)} Disabled hook: ${i.emoji??`🔗`} ${e.command(n)}`)}function De(r){let c=r.command(`hooks`).description(`Manage internal agent hooks`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${h(`/cli/hooks`,`docs.openclaw.ai/cli/hooks`)}\n`);c.command(`list`).description(`List all hooks`).option(`--eligible`,`Show only eligible hooks`,!1).option(`--json`,`Output as JSON`,!1).option(`-v, --verbose`,`Show more details including missing requirements`,!1).action(async e=>q(async()=>{let n=W(s());t.log($(n,e))})),c.command(`info <name>`).description(`Show detailed information about a hook`).option(`--json`,`Output as JSON`,!1).action(async(e,n)=>q(async()=>{let r=W(s());t.log(Ce(r,e,n))})),c.command(`check`).description(`Check hooks eligibility status`).option(`--json`,`Output as JSON`,!1).action(async e=>q(async()=>{let n=W(s());t.log(we(n,e))})),c.command(`enable <name>`).description(`Enable a hook`).action(async e=>q(async()=>{await Te(e)})),c.command(`disable <name>`).description(`Disable a hook`).action(async e=>q(async()=>{await Ee(e)})),c.command(`install`).description(`Install a hook pack (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path to a hook pack or npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).option(`--pin`,`Record npm installs as exact resolved <name>@<version>`,!1).action(async(r,a)=>{let c=i(r),l=s();if(D.existsSync(c)){if(a.link){D.statSync(c).isDirectory()||(t.error(`Linked hook paths must be directories.`),process.exit(1));let e=l.hooks?.internal?.load?.extraDirs??[],r=Array.from(new Set([...e,c])),i=await H({path:c,dryRun:!0});i.ok||(t.error(i.error),process.exit(1));let a={...l,hooks:{...l.hooks,internal:{...l.hooks?.internal,enabled:!0,load:{...l.hooks?.internal?.load,extraDirs:r}}}};a=Q(a,i.hooks),a=U(a,{hookId:i.hookPackId,source:`path`,sourcePath:c,installPath:c,version:i.version,hooks:i.hooks}),await o(a),t.log(`Linked hook path: ${n(c)}`),Y();return}let e=await H({path:c,logger:J()});e.ok||(t.error(e.error),process.exit(1));let r=Q(l,e.hooks),i=v(c)?`archive`:`path`;r=U(r,{hookId:e.hookPackId,source:i,sourcePath:c,installPath:e.targetDir,version:e.version,hooks:e.hooks}),await o(r),t.log(`Installed hooks: ${e.hooks.join(`, `)}`),Y();return}a.link&&(t.error("`--link` requires a local path."),process.exit(1)),fe(r,[`.zip`,`.tgz`,`.tar.gz`,`.tar`])&&(t.error(`Path not found: ${c}`),process.exit(1));let u=await V({spec:r,logger:J()});u.ok||(t.error(u.error),process.exit(1));let d=Q(l,u.hooks),f=E(r,!!a.pin,u.targetDir,u.version,u.npmResolution,t.log,e.warn);d=U(d,{hookId:u.hookPackId,...f,hooks:u.hooks}),await o(d),t.log(`Installed hooks: ${u.hooks.join(`, `)}`),Y()}),c.command(`update`).description(`Update installed hooks (npm installs only)`).argument(`[id]`,`Hook pack id (omit with --all)`).option(`--all`,`Update all tracked hooks`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(n,r)=>{let i=s(),c=i.hooks?.internal?.installs??{},l=r.all?Object.keys(c):n?[n]:[];l.length===0&&(t.error(`Provide a hook id or use --all.`),process.exit(1));let u=i,d=0;for(let n of l){let i=c[n];if(!i){t.log(e.warn(`No install record for "${n}".`));continue}if(i.source!==`npm`){t.log(e.warn(`Skipping "${n}" (source: ${i.source}).`));continue}if(!i.spec){t.log(e.warn(`Skipping "${n}" (missing npm spec).`));continue}let o;try{o=i.installPath??N(n)}catch(r){t.log(e.error(`Invalid install path for "${n}": ${String(r)}`));continue}let s=await Z(o);if(r.dryRun){let r=await V({spec:i.spec,mode:`update`,dryRun:!0,expectedHookPackId:n,expectedIntegrity:i.integrity,onIntegrityDrift:async e=>(X(n,e),!0),logger:J()});if(!r.ok){t.log(e.error(`Failed to check ${n}: ${r.error}`));continue}let a=r.version??`unknown`,o=s??`unknown`;s&&r.version&&s===r.version?t.log(`${n} is up to date (${o}).`):t.log(`Would update ${n}: ${o} → ${a}.`);continue}let l=await V({spec:i.spec,mode:`update`,expectedHookPackId:n,expectedIntegrity:i.integrity,onIntegrityDrift:async e=>(X(n,e),await a(`Continue updating "${n}" with this artifact?`)),logger:J()});if(!l.ok){t.log(e.error(`Failed to update ${n}: ${l.error}`));continue}let f=l.version??await Z(l.targetDir);u=U(u,{hookId:n,...pe({spec:i.spec,installPath:l.targetDir,version:f,resolution:l.npmResolution}),hooks:l.hooks}),d+=1;let p=s??`unknown`,m=f??`unknown`;s&&f&&s===f?t.log(`${n} already at ${p}.`):t.log(`Updated ${n}: ${p} → ${m}.`)}d>0&&(await o(u),Y())}),c.action(async()=>q(async()=>{let e=W(s());t.log($(e,{}))}))}export{De as registerHooksCli};
4
+ `)}async function Te(n){let r=s(),i=G(W(r),n,{requireEligible:!0});await o(K({config:r,hookName:n,enabled:!0,ensureHooksEnabled:!0})),t.log(`${e.success(`✓`)} Enabled hook: ${i.emoji??`🔗`} ${e.command(n)}`)}async function Ee(n){let r=s(),i=G(W(r),n);await o(K({config:r,hookName:n,enabled:!1})),t.log(`${e.warn(`⏸`)} Disabled hook: ${i.emoji??`🔗`} ${e.command(n)}`)}function De(r){let c=r.command(`hooks`).description(`Manage internal agent hooks`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${h(`/cli/hooks`,`docs.openclaw.ai/cli/hooks`)}\n`);c.command(`list`).description(`List all hooks`).option(`--eligible`,`Show only eligible hooks`,!1).option(`--json`,`Output as JSON`,!1).option(`-v, --verbose`,`Show more details including missing requirements`,!1).action(async e=>q(async()=>{let n=W(s());t.log($(n,e))})),c.command(`info <name>`).description(`Show detailed information about a hook`).option(`--json`,`Output as JSON`,!1).action(async(e,n)=>q(async()=>{let r=W(s());t.log(Ce(r,e,n))})),c.command(`check`).description(`Check hooks eligibility status`).option(`--json`,`Output as JSON`,!1).action(async e=>q(async()=>{let n=W(s());t.log(we(n,e))})),c.command(`enable <name>`).description(`Enable a hook`).action(async e=>q(async()=>{await Te(e)})),c.command(`disable <name>`).description(`Disable a hook`).action(async e=>q(async()=>{await Ee(e)})),c.command(`install`).description(`Install a hook pack (path, archive, or npm spec)`).argument(`<path-or-spec>`,`Path to a hook pack or npm package spec`).option(`-l, --link`,`Link a local path instead of copying`,!1).option(`--pin`,`Record npm installs as exact resolved <name>@<version>`,!1).action(async(r,a)=>{let c=i(r),l=s();if(D.existsSync(c)){if(a.link){D.statSync(c).isDirectory()||(t.error(`Linked hook paths must be directories.`),process.exit(1));let e=l.hooks?.internal?.load?.extraDirs??[],r=Array.from(new Set([...e,c])),i=await H({path:c,dryRun:!0});i.ok||(t.error(i.error),process.exit(1));let a={...l,hooks:{...l.hooks,internal:{...l.hooks?.internal,enabled:!0,load:{...l.hooks?.internal?.load,extraDirs:r}}}};a=Q(a,i.hooks),a=U(a,{hookId:i.hookPackId,source:`path`,sourcePath:c,installPath:c,version:i.version,hooks:i.hooks}),await o(a),t.log(`Linked hook path: ${n(c)}`),Y();return}let e=await H({path:c,logger:J()});e.ok||(t.error(e.error),process.exit(1));let r=Q(l,e.hooks),i=v(c)?`archive`:`path`;r=U(r,{hookId:e.hookPackId,source:i,sourcePath:c,installPath:e.targetDir,version:e.version,hooks:e.hooks}),await o(r),t.log(`Installed hooks: ${e.hooks.join(`, `)}`),Y();return}a.link&&(t.error("`--link` requires a local path."),process.exit(1)),fe(r,[`.zip`,`.tgz`,`.tar.gz`,`.tar`])&&(t.error(`Path not found: ${c}`),process.exit(1));let u=await V({spec:r,logger:J()});u.ok||(t.error(u.error),process.exit(1));let d=Q(l,u.hooks),f=E(r,!!a.pin,u.targetDir,u.version,u.npmResolution,t.log,e.warn);d=U(d,{hookId:u.hookPackId,...f,hooks:u.hooks}),await o(d),t.log(`Installed hooks: ${u.hooks.join(`, `)}`),Y()}),c.command(`update`).description(`Update installed hooks (npm installs only)`).argument(`[id]`,`Hook pack id (omit with --all)`).option(`--all`,`Update all tracked hooks`,!1).option(`--dry-run`,`Show what would change without writing`,!1).action(async(n,r)=>{let i=s(),c=i.hooks?.internal?.installs??{},l=r.all?Object.keys(c):n?[n]:[];l.length===0&&(t.error(`Provide a hook id or use --all.`),process.exit(1));let u=i,d=0;for(let n of l){let i=c[n];if(!i){t.log(e.warn(`No install record for "${n}".`));continue}if(i.source!==`npm`){t.log(e.warn(`Skipping "${n}" (source: ${i.source}).`));continue}if(!i.spec){t.log(e.warn(`Skipping "${n}" (missing npm spec).`));continue}let o;try{o=i.installPath??N(n)}catch(r){t.log(e.error(`Invalid install path for "${n}": ${String(r)}`));continue}let s=await Z(o);if(r.dryRun){let r=await V({spec:i.spec,mode:`update`,dryRun:!0,expectedHookPackId:n,expectedIntegrity:i.integrity,onIntegrityDrift:async e=>(X(n,e),!0),logger:J()});if(!r.ok){t.log(e.error(`Failed to check ${n}: ${r.error}`));continue}let a=r.version??`unknown`,o=s??`unknown`;s&&r.version&&s===r.version?t.log(`${n} is up to date (${o}).`):t.log(`Would update ${n}: ${o} → ${a}.`);continue}let l=await V({spec:i.spec,mode:`update`,expectedHookPackId:n,expectedIntegrity:i.integrity,onIntegrityDrift:async e=>(X(n,e),await a(`Continue updating "${n}" with this artifact?`)),logger:J()});if(!l.ok){t.log(e.error(`Failed to update ${n}: ${l.error}`));continue}let f=l.version??await Z(l.targetDir);u=U(u,{hookId:n,...pe({spec:i.spec,installPath:l.targetDir,version:f,resolution:l.npmResolution}),hooks:l.hooks}),d+=1;let p=s??`unknown`,m=f??`unknown`;s&&f&&s===f?t.log(`${n} already at ${p}.`):t.log(`Updated ${n}: ${p} → ${m}.`)}d>0&&(await o(u),Y())}),c.action(async()=>q(async()=>{let e=W(s());t.log($(e,{}))}))}export{De as registerHooksCli};
@@ -1 +1 @@
1
- import{t as e}from"./utils-CGdo13HV.js";import{f as t}from"./frontmatter-C7mzDNxd.js";import{t as n}from"./entry-status-CoXkbJcX.js";import{n as r,r as i,t as a}from"./workspace-xNEpaJvu.js";import o from"node:path";function s(e){return e.metadata?.hookKey??e.hook.name}function c(e){let t=e.metadata?.install??[];return t.length===0?[]:t.map((e,t)=>{let n=(e.id??`${e.kind}-${t}`).trim(),r=e.bins??[],i=(e.label??``).trim();return i||=e.kind===`bundled`?`Bundled with OpenClaw`:e.kind===`npm`&&e.package?`Install ${e.package} (npm)`:e.kind===`git`&&e.repository?`Install from ${e.repository}`:`Run installer`,{id:n,kind:e.kind,label:i,bins:r}})}function l(e,a,o){let l=s(e),u=i(a,l),d=e.hook.source===`openclaw-plugin`,f=d?!1:u?.enabled===!1,p=e.metadata?.always===!0,m=e.metadata?.events??[],{emoji:h,homepage:g,required:_,missing:v,requirementsSatisfied:y,configChecks:b}=n({always:p,entry:e,hasLocalBin:t,remote:o?.remote,isEnvSatisfied:e=>!!(process.env[e]||u?.env?.[e]),isConfigSatisfied:e=>r(a,e)}),x=!f&&y;return{name:e.hook.name,description:e.hook.description,source:e.hook.source,pluginId:e.hook.pluginId,filePath:e.hook.filePath,baseDir:e.hook.baseDir,handlerPath:e.hook.handlerPath,hookKey:l,emoji:h,homepage:g,events:m,always:p,disabled:f,eligible:x,managedByPlugin:d,requirements:_,missing:v,configChecks:b,install:c(e)}}function u(t,n){return{workspaceDir:t,managedHooksDir:n?.managedHooksDir??o.join(e,`hooks`),hooks:(n?.entries??a(t,n)).map(e=>l(e,n?.config,n?.eligibility))}}export{u as t};
1
+ import{t as e}from"./utils-CGdo13HV.js";import{f as t}from"./frontmatter-C7mzDNxd.js";import{t as n}from"./entry-status-CoXkbJcX.js";import{n as r,r as i,t as a}from"./workspace-xNEpaJvu.js";import o from"node:path";function s(e){return e.metadata?.hookKey??e.hook.name}function c(e){let t=e.metadata?.install??[];return t.length===0?[]:t.map((e,t)=>{let n=(e.id??`${e.kind}-${t}`).trim(),r=e.bins??[],i=(e.label??``).trim();return i||=e.kind===`bundled`?`Bundled with OpenClaw`:e.kind===`npm`&&e.package?`Install ${e.package} (npm)`:e.kind===`git`&&e.repository?`Install from ${e.repository}`:`Run installer`,{id:n,kind:e.kind,label:i,bins:r}})}function l(e,a,o){let l=s(e),u=i(a,l),d=e.hook.source===`openclaw-plugin`,f=d?!1:u?.enabled===!1,p=e.metadata?.always===!0,m=e.metadata?.events??[],{emoji:h,homepage:g,required:_,missing:v,requirementsSatisfied:y,configChecks:b}=n({always:p,entry:e,hasLocalBin:t,remote:o?.remote,isEnvSatisfied:e=>!!(process.env[e]||u?.env?.[e]),isConfigSatisfied:e=>r(a,e)}),x=!f&&y;return{name:e.hook.name,description:e.hook.description,source:e.hook.source,pluginId:e.hook.pluginId,filePath:e.hook.filePath,baseDir:e.hook.baseDir,handlerPath:e.hook.handlerPath,hookKey:l,emoji:h,homepage:g,events:m,always:p,disabled:f,eligible:x,managedByPlugin:d,requirements:_,missing:v,configChecks:b,install:c(e)}}function u(t,n){return{workspaceDir:t,managedHooksDir:n?.managedHooksDir??o.join(e,`hooks`),hooks:(n?.entries??a(t,n)).map(e=>l(e,n?.config,n?.eligibility))}}export{u as t};
@@ -1 +1 @@
1
- import{t as e}from"./utils-UGOV_184.js";import{f as t}from"./frontmatter-BkZkwkVO.js";import{t as n}from"./entry-status-CCwwKO43.js";import{n as r,r as i,t as a}from"./workspace-C45T1Cxg.js";import o from"node:path";function s(e){return e.metadata?.hookKey??e.hook.name}function c(e){let t=e.metadata?.install??[];return t.length===0?[]:t.map((e,t)=>{let n=(e.id??`${e.kind}-${t}`).trim(),r=e.bins??[],i=(e.label??``).trim();return i||=e.kind===`bundled`?`Bundled with OpenClaw`:e.kind===`npm`&&e.package?`Install ${e.package} (npm)`:e.kind===`git`&&e.repository?`Install from ${e.repository}`:`Run installer`,{id:n,kind:e.kind,label:i,bins:r}})}function l(e,a,o){let l=s(e),u=i(a,l),d=e.hook.source===`openclaw-plugin`,f=d?!1:u?.enabled===!1,p=e.metadata?.always===!0,m=e.metadata?.events??[],{emoji:h,homepage:g,required:_,missing:v,requirementsSatisfied:y,configChecks:b}=n({always:p,entry:e,hasLocalBin:t,remote:o?.remote,isEnvSatisfied:e=>!!(process.env[e]||u?.env?.[e]),isConfigSatisfied:e=>r(a,e)}),x=!f&&y;return{name:e.hook.name,description:e.hook.description,source:e.hook.source,pluginId:e.hook.pluginId,filePath:e.hook.filePath,baseDir:e.hook.baseDir,handlerPath:e.hook.handlerPath,hookKey:l,emoji:h,homepage:g,events:m,always:p,disabled:f,eligible:x,managedByPlugin:d,requirements:_,missing:v,configChecks:b,install:c(e)}}function u(t,n){return{workspaceDir:t,managedHooksDir:n?.managedHooksDir??o.join(e,`hooks`),hooks:(n?.entries??a(t,n)).map(e=>l(e,n?.config,n?.eligibility))}}export{u as t};
1
+ import{t as e}from"./utils-UGOV_184.js";import{f as t}from"./frontmatter-BkZkwkVO.js";import{t as n}from"./entry-status-CCwwKO43.js";import{n as r,r as i,t as a}from"./workspace-C45T1Cxg.js";import o from"node:path";function s(e){return e.metadata?.hookKey??e.hook.name}function c(e){let t=e.metadata?.install??[];return t.length===0?[]:t.map((e,t)=>{let n=(e.id??`${e.kind}-${t}`).trim(),r=e.bins??[],i=(e.label??``).trim();return i||=e.kind===`bundled`?`Bundled with OpenClaw`:e.kind===`npm`&&e.package?`Install ${e.package} (npm)`:e.kind===`git`&&e.repository?`Install from ${e.repository}`:`Run installer`,{id:n,kind:e.kind,label:i,bins:r}})}function l(e,a,o){let l=s(e),u=i(a,l),d=e.hook.source===`openclaw-plugin`,f=d?!1:u?.enabled===!1,p=e.metadata?.always===!0,m=e.metadata?.events??[],{emoji:h,homepage:g,required:_,missing:v,requirementsSatisfied:y,configChecks:b}=n({always:p,entry:e,hasLocalBin:t,remote:o?.remote,isEnvSatisfied:e=>!!(process.env[e]||u?.env?.[e]),isConfigSatisfied:e=>r(a,e)}),x=!f&&y;return{name:e.hook.name,description:e.hook.description,source:e.hook.source,pluginId:e.hook.pluginId,filePath:e.hook.filePath,baseDir:e.hook.baseDir,handlerPath:e.hook.handlerPath,hookKey:l,emoji:h,homepage:g,events:m,always:p,disabled:f,eligible:x,managedByPlugin:d,requirements:_,missing:v,configChecks:b,install:c(e)}}function u(t,n){return{workspaceDir:t,managedHooksDir:n?.managedHooksDir??o.join(e,`hooks`),hooks:(n?.entries??a(t,n)).map(e=>l(e,n?.config,n?.eligibility))}}export{u as t};
@@ -8,4 +8,4 @@ import{d as e}from"./utils-UGOV_184.js";import{E as t,bn as n,k as r,l as i,lu a
8
8
  `,normalizeText:e=>e.trim()})??``,{errorContext:e.stopReason===`error`})}function M(e){return Array.isArray(e.content)?e.content.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return t.type===`thinking`&&typeof t.thinking==`string`?t.thinking.trim():``}).filter(Boolean).join(`
9
9
  `).trim():``}function N(e){let t=e.trim();return t?`Reasoning:\n${t.split(`
10
10
  `).map(e=>e&&`_${e}_`).join(`
11
- `)}`:``}function P(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function F(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=P(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function I(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function L(e){if(!e)return``;let t=I(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function R(e,t){return u(l({name:e,args:t}))}function z(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function B(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=j(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function V(e){let t=s(e?.agents?.defaults?.imageModel),n=o(e?.agents?.defaults?.imageModel);return{...t?.trim()?{primary:t.trim()}:{},...n.length>0?{fallbacks:n}:{}}}function H(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let U=null;function W(){return U??=import(`./pi-model-discovery-runtime-CtZH_E7L.js`),U}async function G(e){await c(e.cfg,e.agentDir);let{discoverAuthStorage:n,discoverModels:a}=await W(),o=n(e.agentDir),s=a(o,e.agentDir),l=i(e.provider,e.model),u=s.find(l.provider,l.model);if(!u)throw Error(`Unknown model: ${l.provider}/${l.model}`);if(!u.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let f=r(await t({model:u,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),u.provider);o.setRuntimeApiKey(u.provider,f);let m=e.buffer.toString(`base64`);return p(u.provider,u.id)?{text:await g({apiKey:f,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${m}`,modelBaseUrl:u.baseUrl}),model:u.id}:{text:B({message:await d(u,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:m,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:f,maxTokens:e.maxTokens??512}),provider:u.provider,model:u.id}),model:u.id}}export{f as C,p as S,A as _,H as a,y as b,L as c,R as d,T as f,O as g,E as h,z as i,I as l,k as m,B as n,j as o,F as p,V as r,M as s,G as t,N as u,w as v,g as w,_ as x,v as y};
11
+ `)}`:``}function P(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function F(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=P(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function I(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function L(e){if(!e)return``;let t=I(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function R(e,t){return u(l({name:e,args:t}))}function z(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function B(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=j(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function V(e){let t=s(e?.agents?.defaults?.imageModel),n=o(e?.agents?.defaults?.imageModel);return{...t?.trim()?{primary:t.trim()}:{},...n.length>0?{fallbacks:n}:{}}}function H(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let U=null;function W(){return U??=import(`./pi-model-discovery-runtime-CtZH_E7L.js`),U}async function G(e){await c(e.cfg,e.agentDir);let{discoverAuthStorage:n,discoverModels:a}=await W(),o=n(e.agentDir),s=a(o,e.agentDir),l=i(e.provider,e.model),u=s.find(l.provider,l.model);if(!u)throw Error(`Unknown model: ${l.provider}/${l.model}`);if(!u.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let f=r(await t({model:u,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),u.provider);o.setRuntimeApiKey(u.provider,f);let m=e.buffer.toString(`base64`);return p(u.provider,u.id)?{text:await g({apiKey:f,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${m}`,modelBaseUrl:u.baseUrl}),model:u.id}:{text:B({message:await d(u,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:m,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:f,maxTokens:e.maxTokens??512}),provider:u.provider,model:u.id}),model:u.id}}export{f as C,p as S,A as _,H as a,y as b,L as c,R as d,T as f,O as g,E as h,z as i,I as l,k as m,B as n,j as o,F as p,V as r,M as s,G as t,N as u,w as v,g as w,_ as x,v as y};
@@ -9,4 +9,4 @@ import{P as e,nt as t,rt as n}from"./paths-CrCoPIVK.js";import{_ as r,c as i}fro
9
9
  `,normalizeText:e=>e.trim()})??``,{errorContext:e.stopReason===`error`})}function ot(e){return Array.isArray(e.content)?e.content.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return t.type===`thinking`&&typeof t.thinking==`string`?t.thinking.trim():``}).filter(Boolean).join(`
10
10
  `).trim():``}function st(e){let t=e.trim();return t?`Reasoning:\n${t.split(`
11
11
  `).map(e=>e&&`_${e}_`).join(`
12
- `)}`:``}function ct(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function lt(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=ct(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function ut(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function dt(e){if(!e)return``;let t=ut(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function ft(e,t){return X(Y({name:e,args:t}))}function pt(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function mt(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=at(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function ht(e){let r=n(e?.agents?.defaults?.imageModel),i=t(e?.agents?.defaults?.imageModel);return{...r?.trim()?{primary:r.trim()}:{},...i.length>0?{fallbacks:i}:{}}}function gt(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let $=null;function _t(){return $??=import(`./pi-model-discovery-runtime-D66cohqx.js`),$}async function vt(e){await x(e.cfg,e.agentDir);let{discoverAuthStorage:t,discoverModels:n}=await _t(),r=t(e.agentDir),i=n(r,e.agentDir),a=te(e.provider,e.model),o=i.find(a.provider,a.model);if(!o)throw Error(`Unknown model: ${a.provider}/${a.model}`);if(!o.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let s=ee(await re({model:o,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),o.provider);r.setRuntimeApiKey(o.provider,s);let c=e.buffer.toString(`base64`);return C(o.provider,o.id)?{text:await w({apiKey:s,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${c}`,modelBaseUrl:o.baseUrl}),model:o.id}:{text:mt({message:await ae(o,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:c,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:s,maxTokens:e.maxTokens??512}),provider:o.provider,model:o.id}),model:o.id}}export{T as C,x as D,w as E,D as S,S as T,it as _,gt as a,A as b,dt as c,ft as d,tt as f,Q as g,nt as h,pt as i,ut as l,rt as m,mt as n,at as o,lt as p,ht as r,ot as s,vt as t,st as u,et as v,C as w,E as x,Y as y};
12
+ `)}`:``}function ct(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function lt(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=ct(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function ut(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function dt(e){if(!e)return``;let t=ut(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function ft(e,t){return X(Y({name:e,args:t}))}function pt(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function mt(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=at(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function ht(e){let r=n(e?.agents?.defaults?.imageModel),i=t(e?.agents?.defaults?.imageModel);return{...r?.trim()?{primary:r.trim()}:{},...i.length>0?{fallbacks:i}:{}}}function gt(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let $=null;function _t(){return $??=import(`./pi-model-discovery-runtime-D66cohqx.js`),$}async function vt(e){await x(e.cfg,e.agentDir);let{discoverAuthStorage:t,discoverModels:n}=await _t(),r=t(e.agentDir),i=n(r,e.agentDir),a=te(e.provider,e.model),o=i.find(a.provider,a.model);if(!o)throw Error(`Unknown model: ${a.provider}/${a.model}`);if(!o.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let s=ee(await re({model:o,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),o.provider);r.setRuntimeApiKey(o.provider,s);let c=e.buffer.toString(`base64`);return C(o.provider,o.id)?{text:await w({apiKey:s,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${c}`,modelBaseUrl:o.baseUrl}),model:o.id}:{text:mt({message:await ae(o,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:c,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:s,maxTokens:e.maxTokens??512}),provider:o.provider,model:o.id}),model:o.id}}export{T as C,x as D,w as E,D as S,S as T,it as _,gt as a,A as b,dt as c,ft as d,tt as f,Q as g,nt as h,pt as i,ut as l,rt as m,mt as n,at as o,lt as p,ht as r,ot as s,vt as t,st as u,et as v,C as w,E as x,Y as y};
@@ -9,4 +9,4 @@ import{Kt as e,P as t,qt as n}from"./paths-piJASC5k.js";import{f as r,x as i}fro
9
9
  `,normalizeText:e=>e.trim()})??``,{errorContext:e.stopReason===`error`})}function ot(e){return Array.isArray(e.content)?e.content.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return t.type===`thinking`&&typeof t.thinking==`string`?t.thinking.trim():``}).filter(Boolean).join(`
10
10
  `).trim():``}function st(e){let t=e.trim();return t?`Reasoning:\n${t.split(`
11
11
  `).map(e=>e&&`_${e}_`).join(`
12
- `)}`:``}function ct(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function lt(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=ct(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function ut(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function dt(e){if(!e)return``;let t=ut(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function ft(e,t){return Y(J({name:e,args:t}))}function pt(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function mt(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=at(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function ht(t){let r=n(t?.agents?.defaults?.imageModel),i=e(t?.agents?.defaults?.imageModel);return{...r?.trim()?{primary:r.trim()}:{},...i.length>0?{fallbacks:i}:{}}}function gt(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let $=null;function _t(){return $??=import(`./pi-model-discovery-runtime-BBVkpV5J.js`),$}async function vt(e){await b(e.cfg,e.agentDir);let{discoverAuthStorage:t,discoverModels:n}=await _t(),r=t(e.agentDir),i=n(r,e.agentDir),a=te(e.provider,e.model),o=i.find(a.provider,a.model);if(!o)throw Error(`Unknown model: ${a.provider}/${a.model}`);if(!o.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let s=re(await ne({model:o,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),o.provider);r.setRuntimeApiKey(o.provider,s);let c=e.buffer.toString(`base64`);return S(o.provider,o.id)?{text:await C({apiKey:s,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${c}`,modelBaseUrl:o.baseUrl}),model:o.id}:{text:mt({message:await oe(o,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:c,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:s,maxTokens:e.maxTokens??512}),provider:o.provider,model:o.id}),model:o.id}}export{w as C,b as D,C as E,E as S,x as T,it as _,gt as a,k as b,dt as c,ft as d,nt as f,Q as g,X as h,pt as i,ut as l,rt as m,mt as n,at as o,lt as p,ht as r,ot as s,vt as t,st as u,tt as v,S as w,T as x,J as y};
12
+ `)}`:``}function ct(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function lt(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=ct(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function ut(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function dt(e){if(!e)return``;let t=ut(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function ft(e,t){return Y(J({name:e,args:t}))}function pt(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function mt(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=at(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function ht(t){let r=n(t?.agents?.defaults?.imageModel),i=e(t?.agents?.defaults?.imageModel);return{...r?.trim()?{primary:r.trim()}:{},...i.length>0?{fallbacks:i}:{}}}function gt(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let $=null;function _t(){return $??=import(`./pi-model-discovery-runtime-BBVkpV5J.js`),$}async function vt(e){await b(e.cfg,e.agentDir);let{discoverAuthStorage:t,discoverModels:n}=await _t(),r=t(e.agentDir),i=n(r,e.agentDir),a=te(e.provider,e.model),o=i.find(a.provider,a.model);if(!o)throw Error(`Unknown model: ${a.provider}/${a.model}`);if(!o.input?.includes(`image`))throw Error(`Model does not support images: ${e.provider}/${e.model}`);let s=re(await ne({model:o,cfg:e.cfg,agentDir:e.agentDir,profileId:e.profile,preferredProfile:e.preferredProfile}),o.provider);r.setRuntimeApiKey(o.provider,s);let c=e.buffer.toString(`base64`);return S(o.provider,o.id)?{text:await C({apiKey:s,prompt:e.prompt??`Describe the image.`,imageDataUrl:`data:${e.mime??`image/jpeg`};base64,${c}`,modelBaseUrl:o.baseUrl}),model:o.id}:{text:mt({message:await oe(o,{messages:[{role:`user`,content:[{type:`text`,text:e.prompt??`Describe the image.`},{type:`image`,data:c,mimeType:e.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:s,maxTokens:e.maxTokens??512}),provider:o.provider,model:o.id}),model:o.id}}export{w as C,b as D,C as E,E as S,x as T,it as _,gt as a,k as b,dt as c,ft as d,nt as f,Q as g,X as h,pt as i,ut as l,rt as m,mt as n,at as o,lt as p,ht as r,ot as s,vt as t,st as u,tt as v,S as w,T as x,J as y};
@@ -8,4 +8,4 @@ import{Uc as e,cu as t,ll as n,lt as r,ol as i}from"./auth-profiles-BhXA8Jy2.js"
8
8
  `,normalizeText:e=>e.trim()})??``,{errorContext:e.stopReason===`error`})}function M(e){return Array.isArray(e.content)?e.content.map(e=>{if(!e||typeof e!=`object`)return``;let t=e;return t.type===`thinking`&&typeof t.thinking==`string`?t.thinking.trim():``}).filter(Boolean).join(`
9
9
  `).trim():``}function N(e){let t=e.trim();return t?`Reasoning:\n${t.split(`
10
10
  `).map(e=>e&&`_${e}_`).join(`
11
- `)}`:``}function P(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function F(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=P(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function I(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function L(e){if(!e)return``;let t=I(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function R(e,t){return u(l({name:e,args:t}))}function z(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function B(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=j(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function V(e){let t=o(e?.agents?.defaults?.imageModel),n=a(e?.agents?.defaults?.imageModel);return{...t?.trim()?{primary:t.trim()}:{},...n.length>0?{fallbacks:n}:{}}}function H(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let U=null;function W(){return U??=import(`./pi-model-discovery-runtime-COr1WwJu.js`),U}async function G(t){await c(t.cfg,t.agentDir);let{discoverAuthStorage:r,discoverModels:a}=await W(),o=r(t.agentDir),s=a(o,t.agentDir),l=e(t.provider,t.model),u=s.find(l.provider,l.model);if(!u)throw Error(`Unknown model: ${l.provider}/${l.model}`);if(!u.input?.includes(`image`))throw Error(`Model does not support images: ${t.provider}/${t.model}`);let f=n(await i({model:u,cfg:t.cfg,agentDir:t.agentDir,profileId:t.profile,preferredProfile:t.preferredProfile}),u.provider);o.setRuntimeApiKey(u.provider,f);let m=t.buffer.toString(`base64`);return p(u.provider,u.id)?{text:await g({apiKey:f,prompt:t.prompt??`Describe the image.`,imageDataUrl:`data:${t.mime??`image/jpeg`};base64,${m}`,modelBaseUrl:u.baseUrl}),model:u.id}:{text:B({message:await d(u,{messages:[{role:`user`,content:[{type:`text`,text:t.prompt??`Describe the image.`},{type:`image`,data:m,mimeType:t.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:f,maxTokens:t.maxTokens??512}),provider:u.provider,model:u.id}),model:u.id}}export{f as C,p as S,A as _,H as a,y as b,L as c,R as d,T as f,O as g,E as h,z as i,I as l,k as m,B as n,j as o,F as p,V as r,M as s,G as t,N as u,w as v,g as w,_ as x,v as y};
11
+ `)}`:``}function P(e){let t=e.trimStart();if(!t.startsWith(`<`)||!/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(t)||!/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/i.test(e))return null;let n=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=!1,i=0,a=0,o=[],s=e=>{e&&o.push({type:`text`,text:e})},c=e=>{let t=e.trim();t&&o.push({type:`thinking`,thinking:t})};for(let t of e.matchAll(n)){let n=t.index??0,o=!!t[1]?.includes(`/`);if(!r&&!o){s(e.slice(i,n)),a=n+t[0].length,r=!0;continue}r&&o&&(c(e.slice(a,n)),i=n+t[0].length,r=!1)}return r||(s(e.slice(i)),!o.some(e=>e.type===`thinking`))?null:o}function F(e){if(!Array.isArray(e.content)||e.content.some(e=>e&&typeof e==`object`&&e.type===`thinking`))return;let t=[],n=!1;for(let r of e.content){if(!r||typeof r!=`object`||!(`type`in r)){t.push(r);continue}if(r.type!==`text`){t.push(r);continue}let e=P(r.text);if(!e){t.push(r);continue}n=!0;for(let n of e)if(n.type===`thinking`)t.push({type:`thinking`,thinking:n.thinking});else if(n.type===`text`){let e=n.text.trimStart();e&&t.push({type:`text`,text:e})}}n&&(e.content=t)}function I(e){if(!e)return``;let t=/<\s*(\/?)\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,n=``,r=0,i=!1;for(let a of e.matchAll(t)){let t=a.index??0;i&&(n+=e.slice(r,t)),i=a[1]!==`/`,r=t+a[0].length}return n.trim()}function L(e){if(!e)return``;let t=I(e);if(t)return t;let n=/<\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,r=/<\s*\/\s*(?:think(?:ing)?|thought|antthinking)\s*>/gi,i=[...e.matchAll(n)];if(i.length===0)return``;let a=[...e.matchAll(r)],o=i[i.length-1],s=a[a.length-1];if(s&&(s.index??-1)>(o.index??-1))return t;let c=(o.index??0)+o[0].length;return e.slice(c).trim()}function R(e,t){return u(l({name:e,args:t}))}function z(e){let t=e.trim(),n=/^data:([^;,]+);base64,([a-z0-9+/=\r\n]+)$/i.exec(t);if(!n)throw Error(`Invalid data URL (expected base64 data: URL).`);let r=(n[1]??``).trim().toLowerCase();if(!r.startsWith(`image/`))throw Error(`Unsupported data URL type: ${r||`unknown`}`);let i=(n[2]??``).trim(),a=Buffer.from(i,`base64`);if(a.length===0)throw Error(`Invalid data URL: empty payload.`);return{buffer:a,mimeType:r,kind:`image`}}function B(e){let t=e.message.stopReason,n=e.message.errorMessage?.trim();if(t===`error`||t===`aborted`)throw Error(n?`Image model failed (${e.provider}/${e.model}): ${n}`:`Image model failed (${e.provider}/${e.model})`);if(n)throw Error(`Image model failed (${e.provider}/${e.model}): ${n}`);let r=j(e.message);if(r.trim())return r.trim();throw Error(`Image model returned no text (${e.provider}/${e.model}).`)}function V(e){let t=o(e?.agents?.defaults?.imageModel),n=a(e?.agents?.defaults?.imageModel);return{...t?.trim()?{primary:t.trim()}:{},...n.length>0?{fallbacks:n}:{}}}function H(e){let t=e.cfg?.models?.providers?.[e.provider]?.models??[],n=(((e.provider===`minimax`?t.find(e=>(e?.id??``).trim()===`MiniMax-VL-01`&&Array.isArray(e?.input)&&e.input.includes(`image`)):null)??t.find(e=>!!(e?.id??``).trim()&&e.input?.includes(`image`)))?.id??``).trim();return n?`${e.provider}/${n}`:null}let U=null;function W(){return U??=import(`./pi-model-discovery-runtime-COr1WwJu.js`),U}async function G(t){await c(t.cfg,t.agentDir);let{discoverAuthStorage:r,discoverModels:a}=await W(),o=r(t.agentDir),s=a(o,t.agentDir),l=e(t.provider,t.model),u=s.find(l.provider,l.model);if(!u)throw Error(`Unknown model: ${l.provider}/${l.model}`);if(!u.input?.includes(`image`))throw Error(`Model does not support images: ${t.provider}/${t.model}`);let f=n(await i({model:u,cfg:t.cfg,agentDir:t.agentDir,profileId:t.profile,preferredProfile:t.preferredProfile}),u.provider);o.setRuntimeApiKey(u.provider,f);let m=t.buffer.toString(`base64`);return p(u.provider,u.id)?{text:await g({apiKey:f,prompt:t.prompt??`Describe the image.`,imageDataUrl:`data:${t.mime??`image/jpeg`};base64,${m}`,modelBaseUrl:u.baseUrl}),model:u.id}:{text:B({message:await d(u,{messages:[{role:`user`,content:[{type:`text`,text:t.prompt??`Describe the image.`},{type:`image`,data:m,mimeType:t.mime??`image/jpeg`}],timestamp:Date.now()}]},{apiKey:f,maxTokens:t.maxTokens??512}),provider:u.provider,model:u.id}),model:u.id}}export{f as C,p as S,A as _,H as a,y as b,L as c,R as d,T as f,O as g,E as h,z as i,I as l,k as m,B as n,j as o,F as p,V as r,M as s,G as t,N as u,w as v,g as w,_ as x,v as y};
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  import"./paths-B4IRk3wi.js";import{A as e,B as t,J as n,K as r,R as i,W as a,Y as o,d as s,k as c,p as l,q as u,r as d,w as f}from"./subsystem-C5XF2Fy5.js";import{T as p,l as ee,m as te,n as ne}from"./utils-UGOV_184.js";import{Dr as m,Er as h,Hn as re,Io as ie,Kn as ae,Lo as oe,Ml as se,aa as ce,ia as le,oa as ue,qs as g,ra as de,zl as fe}from"./model-selection-I1ctjFOB.js";import{Ft as pe,gt as _,t as me}from"./reply-r9KtzgpM.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import{n as he,r as v}from"./command-format-BbDT1tlm.js";import"./boolean-Ch3DfXPy.js";import{r as y,t as b}from"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import{n as x,t as S}from"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import{i as C}from"./errors-Bunti32V.js";import"./send-YPQFx-fV.js";import"./send-Ds5sy22D.js";import{c as w}from"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import{S as T,l as E}from"./audio-transcription-runner-BJNP7vB8.js";import"./image-BJC11A7e.js";import"./models-config-CWIlroKT.js";import"./tool-display-DjuSUUbH.js";import"./fetch-guard-Cji70DJW.js";import"./api-key-rotation-DYYvcqSG.js";import"./local-roots-Dxioh0C2.js";import"./model-catalog-vNCcsy4h.js";import"./proxy-fetch-BADsUK4d.js";import"./tokens-XGbQGn67.js";import"./deliver-DHP2vHKB.js";import"./commands-CGpM84iR.js";import"./commands-registry-CxDVU5s9.js";import"./pairing-store-Bv4KSELv.js";import"./fetch-Dikjvc5M.js";import"./call-BA3O_Qpl.js";import"./with-timeout-WveKxvFV.js";import"./diagnostic-Bzd5vlKH.js";import"./send-D0y-r_hg2.js";import"./pi-model-discovery-6myCPEJE.js";import"./exec-approvals-allowlist-BKFaHvA5.js";import"./exec-safe-bin-runtime-policy-D2WexijZ.js";import"./ir-CZdZsdnI.js";import"./render-D8OWO2hT.js";import"./target-errors-DH0aw-m5.js";import"./read-only-account-inspect-DEnPVHTo.js";import"./channel-selection-oRONo9z3.js";import"./plugin-auto-enable-Cp7L8ko8.js";import"./send-CgeRzkWS.js";import"./outbound-attachment-aZWcoZ-N.js";import"./delivery-queue-CKbauSFq.js";import"./send-DIw8ExHc.js";import"./channel-activity-DHY5wAyl.js";import"./tables-h7y1Jhf4.js";import"./fetch-Bn0mWg6a.js";import"./skill-commands-O39uSj-k.js";import"./workspace-dirs-BhF1Dzxt.js";import"./pairing-token-CKX1ds78.js";import"./restart-CTfuVGfA.js";import"./runtime-web-tools-CCIXUISf.js";import"./command-secret-targets-BBTiqQKa.js";import"./session-cost-usage-BgqKixv0.js";import"./connection-auth-DZ-3Svr_.js";import"./onboard-helpers-CGJLUoxR.js";import"./prompt-style-CXKekIBY.js";import"./pairing-labels-ryOnuOFA.js";import"./memory-cli-DHvscp7X.js";import"./query-expansion-0OxEb1Io.js";import"./manager-BwrZfep3.js";import{t as D}from"./links-CySwdMcF.js";import"./cli-utils-BY7dLMFy.js";import"./help-format-BRbF_INg.js";import"./progress-LNttnI-y.js";import"./exec-approvals-BpBNEy6i.js";import"./nodes-screen-C7-5RrbN.js";import"./system-run-command-DCzdgYyb.js";import"./runtime-DLxfCs7F.js";import"./stagger-DmFYysrJ.js";import{r as O,t as k}from"./channel-web-Xw89Exy3.js";import"./outbound-DKMI_4xm.js";import"./session-Be0RV2V1.js";import"./login-Cb1A6qwM.js";import{t as A}from"./is-main-DG5ueqhF.js";import{t as j}from"./path-env-BPd1Yd-i.js";import{t as M}from"./runtime-guard-DFYBaYZS.js";import"./ports-Di2_MOUb.js";import{i as N,n as P,o as F,s as I}from"./program-context-Cu8fVR-O.js";import"./plugin-registry-fm5tDUbE.js";import{n as L}from"./channel-options-Cbv7VETu.js";import R from"node:process";import{fileURLToPath as ge}from"node:url";import{Command as _e,InvalidArgumentError as ve}from"commander";function ye(){let e,t=()=>(e===void 0&&(e=L()),e);return{programVersion:se,get channelOptions(){return t()},get messageChannelOptions(){return t().join(`|`)},get agentChannelOptions(){return[`last`,...t()].join(`|`)}}}const z=`All your chats, one OpenClaw.`,B={newYear:`New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.`,lunarNewYear:`Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.`,christmas:`Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.`,eid:`Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.`,diwali:`Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.`,easter:`Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.`,hanukkah:`Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful.`,halloween:`Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past.`,thanksgiving:`Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to.`,valentines:`Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.`},V=[`Your terminal just grew claws—type something and let the bot pinch the busywork.`,`Welcome to the command line: where dreams compile and confidence segfaults.`,`I run on caffeine, JSON5, and the audacity of "it worked on my machine."`,`Gateway online—please keep hands, feet, and appendages inside the shell at all times.`,`I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.`,`One CLI to rule them all, and one more restart because you changed the port.`,`If it works, it's automation; if it breaks, it's a "learning opportunity."`,`Pairing codes exist because even bots believe in consent—and good security hygiene.`,`Your .env is showing; don't worry, I'll pretend I didn't see it.`,`I'll do the boring stuff while you dramatically stare at the logs like it's cinema.`,`I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.`,`Type the command with confidence—nature will provide the stack trace if needed.`,`I don't judge, but your missing API keys are absolutely judging you.`,`I can grep it, git blame it, and gently roast it—pick your coping mechanism.`,`Hot reload for config, cold sweat for deploys.`,`I'm the assistant your terminal demanded, not the one your sleep schedule requested.`,`I keep secrets like a vault... unless you print them in debug logs again.`,`Automation with claws: minimal fuss, maximal pinch.`,`I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.`,`If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.`,`Your task has been queued; your dignity has been deprecated.`,`I can't fix your code taste, but I can fix your build and your backlog.`,`I'm not magic—I'm just extremely persistent with retries and coping strategies.`,`It's not "failing," it's "discovering new ways to configure the same thing wrong."`,`Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen.`,`I read logs so you can keep pretending you don't have to.`,`If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.`,`I'll refactor your busywork like it owes me money.`,`Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.`,`I'm the reason your shell history looks like a hacker-movie montage.`,`I'm like tmux: confusing at first, then suddenly you can't live without me.`,`I can run local, remote, or purely on vibes—results may vary with DNS.`,`If you can describe it, I can probably automate it—or at least make it funnier.`,`Your config is valid, your assumptions are not.`,`I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).`,`Less clicking, more shipping, fewer "where did that file go" moments.`,`Claws out, commit in—let's ship something mildly responsible.`,`I'll butter your workflow like a lobster roll: messy, delicious, effective.`,`Shell yeah—I'm here to pinch the toil and leave you the glory.`,`If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.`,`The only crab in your contacts you actually want to hear from. 🦞`,`WhatsApp automation without the "please accept our new privacy policy".`,`iMessage green bubble energy, but for everyone.`,`No $999 stand required.`,`We ship features faster than Apple ships calculator updates.`,`Your AI assistant, now without the $3,499 headset.`,`Ah, the fruit tree company! 🍎`,`Greetings, Professor Falken`,`I don't sleep, I just enter low-power mode and dream of clean diffs.`,`Your personal assistant, minus the passive-aggressive calendar reminders.`,`Built by lobsters, for humans. Don't question the hierarchy.`,`I've seen your commit messages. We'll work on that together.`,`More integrations than your therapist's intake form.`,`Running on your hardware, reading your logs, judging nothing (mostly).`,`The only open-source project where the mascot could eat the competition.`,`Self-hosted, self-updating, self-aware (just kidding... unless?).`,`I autocomplete your thoughts—just slower and with more API calls.`,`Somewhere between 'hello world' and 'oh god what have I built.'`,`Your .zshrc wishes it could do what I do.`,`I've read more man pages than any human should—so you don't have to.`,`Powered by open source, sustained by spite and good documentation.`,`I'm the middleware between your ambition and your attention span.`,`Finally, a use for that always-on Mac Mini under your desk.`,`Like having a senior engineer on call, except I don't bill hourly or sigh audibly.`,`Making 'I'll automate that later' happen now.`,`Your second brain, except this one actually remembers where you left things.`,`Half butler, half debugger, full crustacean.`,`I don't have opinions about tabs vs spaces. I have opinions about everything else.`,`Open source means you can see exactly how I judge your config.`,`I've survived more breaking changes than your last three relationships.`,`Runs on a Raspberry Pi. Dreams of a rack in Iceland.`,`The lobster in your shell. 🦞`,`Alexa, but with taste.`,`I'm not AI-powered, I'm AI-possessed. Big difference.`,`Deployed locally, trusted globally, debugged eternally.`,`You had me at 'openclaw gateway start.'`,B.newYear,B.lunarNewYear,B.christmas,B.eid,B.diwali,B.easter,B.hanukkah,B.halloween,B.thanksgiving,B.valentines],H=1440*60*1e3;function U(e){return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}const W=(e,t)=>n=>{let r=U(n);return r.month===e&&r.day===t},G=(e,t=1)=>n=>{let r=U(n);return e.some(([e,n,i])=>{if(r.year!==e)return!1;let a=Date.UTC(e,n,i),o=Date.UTC(r.year,r.month,r.day);return o>=a&&o<a+t*H})},be=new Map([[B.newYear,W(0,1)],[B.lunarNewYear,G([[2025,0,29],[2026,1,17],[2027,1,6]],1)],[B.eid,G([[2025,2,30],[2025,2,31],[2026,2,20],[2027,2,10]],1)],[B.diwali,G([[2025,9,20],[2026,10,8],[2027,9,28]],1)],[B.easter,G([[2025,3,20],[2026,3,5],[2027,2,28]],1)],[B.hanukkah,(e=>t=>{let n=U(t),r=e.find(e=>e.year===n.year);if(!r)return!1;let i=Date.UTC(r.year,r.month,r.day),a=Date.UTC(n.year,n.month,n.day);return a>=i&&a<i+r.duration*H})([{year:2025,month:11,day:15,duration:8},{year:2026,month:11,day:5,duration:8},{year:2027,month:11,day:25,duration:8}])],[B.halloween,W(9,31)],[B.thanksgiving,e=>{let t=U(e);if(t.month!==10)return!1;let n=1+(4-new Date(Date.UTC(t.year,10,1)).getUTCDay()+7)%7+21;return t.day===n}],[B.valentines,W(1,14)],[B.christmas,W(11,25)]]);function xe(e,t){let n=be.get(e);return n?n(t):!0}function Se(e={}){if(V.length===0)return[z];let t=e.now?e.now():new Date,n=V.filter(e=>xe(e,t));return n.length>0?n:V}function Ce(e={}){if(e.mode===`off`)return``;if(e.mode===`default`)return z;let t=(e.env??process.env)?.OPENCLAW_TAGLINE_INDEX;if(t!==void 0){let e=Number.parseInt(t,10);if(!Number.isNaN(e)&&e>=0){let t=V.length>0?V:[z];return t[e%t.length]}}let n=Se(e),r=e.random??Math.random;return n[Math.floor(r()*n.length)%n.length]}let K=!1;typeof Intl<`u`&&`Segmenter`in Intl&&new Intl.Segmenter(void 0,{granularity:`grapheme`});const we=e=>e.some(e=>e===`--json`||e.startsWith(`--json=`)),Te=e=>e.some(e=>e===`--version`||e===`-V`)||o(e);function q(e){if(e===`random`||e===`default`||e===`off`)return e}function Ee(e){let t=q(e.mode);if(t)return t;try{return q(g().cli?.banner?.taglineMode)}catch{return}}function J(t,n={}){let r=n.commit??_({env:n.env,moduleUrl:import.meta.url})??`unknown`,i=Ce({...n,mode:Ee(n)}),a=n.richTty??c(),o=`🦞 OpenClaw`,l=n.columns??process.stdout.columns??120,u=`${o} ${t} (${r})`,d=i?`${u} — ${i}`:u,f=s(d)<=l;if(a){if(f)return i?`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)} ${e.muted(`—`)} ${e.accentDim(i)}`:`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;let n=`${e.heading(o)} ${e.info(t)} ${e.muted(`(${r})`)}`;return i?`${n}\n${`${` `.repeat(3)}${e.accentDim(i)}`}`:n}if(f)return d;let p=u;return i?`${p}\n${`${` `.repeat(3)}${i}`}`:p}function De(e,t={}){if(K)return;let n=t.argv??process.argv;if(!process.stdout.isTTY||we(n)||Te(n))return;let r=J(e,t);process.stdout.write(`\n${r}\n\n`),K=!0}function Oe(){return K}const Y=i.join(`|`);function ke(e){let n=t(e);if(!n)throw new ve(`Invalid --log-level (use ${Y})`);return n}const X=v(),Ae=ee(X),je=new Set([...N(),...I()]),Me=[[`openclaw models --help`,`Show detailed help for the models command.`],[`openclaw channels login --verbose`,`Link personal WhatsApp Web and show QR + connection logs.`],[`openclaw message send --target +15555550123 --message "Hi" --json`,`Send via your web session and print JSON result.`],[`openclaw gateway --port 18789`,`Run the WebSocket Gateway locally.`],[`openclaw --dev gateway`,`Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.`],[`openclaw gateway --force`,`Kill anything bound to the default gateway port, then start it.`],[`openclaw gateway ...`,`Gateway control via WebSocket.`],[`openclaw agent --to +15555550123 --message "Run summary" --deliver`,`Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.`],[`openclaw message send --channel telegram --target @mychat --message "Hi"`,`Send via your Telegram bot.`]];function Ne(t,n){t.name(X).description(``).version(n.programVersion).option(`--dev`,`Dev profile: isolate state under ~/.qbotclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)`).option(`--profile <name>`,`Use a named profile (isolates OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under ~/.qbotclaw-<name>)`).option(`--log-level <level>`,`Global log level override for file + console (${Y})`,ke),t.option(`--no-color`,`Disable ANSI colors`,!1),t.helpOption(`-h, --help`,`Display help for command`),t.helpCommand(`help [command]`,`Display help for command`),t.configureHelp({sortSubcommands:!0,sortOptions:!0,optionTerm:t=>e.option(t.flags),subcommandTerm:n=>{let r=n.parent===t&&je.has(n.name());return e.command(r?`${n.name()} *`:n.name())}});let r=t=>{let n=t;return RegExp(`^Usage:\\s+${Ae}\\s+\\[options\\]\\s+\\[command\\]\\s*$`,`m`).test(n)&&/^Commands:/m.test(n)&&(n=n.replace(/^Commands:/m,`Commands:\n ${e.muted(`Hint: commands suffixed with * have subcommands. Run <command> --help for details.`)}`)),n.replace(/^Usage:/gm,e.heading(`Usage:`)).replace(/^Options:/gm,e.heading(`Options:`)).replace(/^Commands:/gm,e.heading(`Commands:`))};if(t.configureOutput({writeOut:e=>{process.stdout.write(r(e))},writeErr:e=>{process.stderr.write(r(e))},outputError:(t,n)=>n(e.error(t))}),u(process.argv,`-V`)||u(process.argv,`--version`)||o(process.argv)){let e=_({moduleUrl:import.meta.url});console.log(e?`OpenClaw ${n.programVersion} (${e})`:`OpenClaw ${n.programVersion}`),process.exit(0)}t.addHelpText(`beforeAll`,()=>{if(Oe())return``;let e=c();return`\n${J(n.programVersion,{richTty:e})}\n`});let i=Me.map(([t,n])=>` ${e.command(he(t,X))}\n ${e.muted(n)}`).join(`
3
- `);t.addHelpText(`afterAll`,({command:n})=>{if(n!==t)return``;let r=D(`/cli`,`docs.openclaw.ai/cli`);return`\n${e.heading(`Examples:`)}\n${i}\n\n${e.muted(`Docs:`)} ${r}\n`})}function Pe(e){let t=e;for(;t.parent&&t.parent.parent;)t=t.parent;let n=t.name(),r=v();!n||n===r||(process.title=`${r}-${n}`)}const Fe=new Set([`message`,`channels`,`directory`,`agents`,`configure`,`onboard`,`status`,`health`]),Ie=new Set([`backup`,`doctor`,`completion`,`secrets`]),Z=new Set([`config set`]);let Q,$;function Le(e){let[t,n]=e;return t?!!(Ie.has(t)||t===`config`&&n===`validate`):!1}function Re(){return Q??=import(`./config-guard-U0wlYLUN.js`),Q}function ze(){return $??=import(`./plugin-registry-fm5tDUbE.js`).then(e=>e.n),$}function Be(e){let t=e;for(;t.parent;)t=t.parent;return t}function Ve(e){let t=Be(e);if(typeof t.getOptionValueSource!=`function`||t.getOptionValueSource(`logLevel`)!==`cli`)return;let n=t.opts().logLevel;return typeof n==`string`?n:void 0}function He(e,t){if(!u(t,`--json`))return!1;let n=`${e[0]??``} ${e[1]??``}`.trim();return!Z.has(n)}function Ue(e,t){e.hook(`preAction`,async(e,i)=>{Pe(i);let o=process.argv;if(n(o))return;let s=a(o,2);b(process.env.OPENCLAW_HIDE_BANNER)||s[0]===`update`||s[0]===`completion`||s[0]===`plugins`&&s[1]===`update`||De(t);let c=r(o,{includeDebug:!0});f(c);let u=Ve(i);if(u&&(process.env.OPENCLAW_LOG_LEVEL=u),c||(process.env.NODE_NO_WARNINGS??=`1`),Le(s))return;let d=He(s,o),{ensureConfigReady:p}=await Re();if(await p({runtime:l,commandPath:s,...d?{suppressDoctorStdout:!0}:{}}),Fe.has(s[0])){let{ensurePluginRegistryLoaded:e}=await ze();e()}})}function We(){let e=new _e,t=ye(),n=process.argv;return P(e,t),Ne(e,t),Ue(e,t.programVersion),F(e,t,n),e}fe({quiet:!0}),y(),j(),d(),M();const Ge=We();A({currentFile:ge(import.meta.url)})&&(E(),R.on(`uncaughtException`,e=>{console.error(`[openclaw] Uncaught exception:`,C(e)),R.exit(1)}),Ge.parseAsync(R.argv).catch(e=>{console.error(`[openclaw] CLI failed:`,C(e)),R.exit(1)}));export{de as PortInUseError,T as applyTemplate,ne as assertWebChannel,pe as createDefaultDeps,h as deriveSessionKey,le as describePortOwner,ie as ensureBinary,ce as ensurePortAvailable,me as getReplyFromConfig,ue as handlePortError,g as loadConfig,re as loadSessionStore,k as monitorWebChannel,te as normalizeE164,oe as promptYesNo,m as resolveSessionKey,w as resolveStorePath,S as runCommandWithTimeout,x as runExec,ae as saveSessionStore,p as toWhatsappJid,O as waitForever};
3
+ `);t.addHelpText(`afterAll`,({command:n})=>{if(n!==t)return``;let r=D(`/cli`,`docs.openclaw.ai/cli`);return`\n${e.heading(`Examples:`)}\n${i}\n\n${e.muted(`Docs:`)} ${r}\n`})}function Pe(e){let t=e;for(;t.parent&&t.parent.parent;)t=t.parent;let n=t.name(),r=v();!n||n===r||(process.title=`${r}-${n}`)}const Fe=new Set([`message`,`channels`,`directory`,`agents`,`configure`,`onboard`,`status`,`health`]),Ie=new Set([`backup`,`doctor`,`completion`,`secrets`]),Z=new Set([`config set`]);let Q,$;function Le(e){let[t,n]=e;return t?!!(Ie.has(t)||t===`config`&&n===`validate`):!1}function Re(){return Q??=import(`./config-guard-U0wlYLUN.js`),Q}function ze(){return $??=import(`./plugin-registry-fm5tDUbE.js`).then(e=>e.n),$}function Be(e){let t=e;for(;t.parent;)t=t.parent;return t}function Ve(e){let t=Be(e);if(typeof t.getOptionValueSource!=`function`||t.getOptionValueSource(`logLevel`)!==`cli`)return;let n=t.opts().logLevel;return typeof n==`string`?n:void 0}function He(e,t){if(!u(t,`--json`))return!1;let n=`${e[0]??``} ${e[1]??``}`.trim();return!Z.has(n)}function Ue(e,t){e.hook(`preAction`,async(e,i)=>{Pe(i);let o=process.argv;if(n(o))return;let s=a(o,2);b(process.env.OPENCLAW_HIDE_BANNER)||s[0]===`update`||s[0]===`completion`||s[0]===`plugins`&&s[1]===`update`||De(t);let c=r(o,{includeDebug:!0});f(c);let u=Ve(i);if(u&&(process.env.OPENCLAW_LOG_LEVEL=u),c||(process.env.NODE_NO_WARNINGS??=`1`),Le(s))return;let d=He(s,o),{ensureConfigReady:p}=await Re();if(await p({runtime:l,commandPath:s,...d?{suppressDoctorStdout:!0}:{}}),Fe.has(s[0])){let{ensurePluginRegistryLoaded:e}=await ze();e()}})}function We(){let e=new _e,t=ye(),n=process.argv;return P(e,t),Ne(e,t),Ue(e,t.programVersion),F(e,t,n),e}fe({quiet:!0}),y(),j(),d(),M();const Ge=We();A({currentFile:ge(import.meta.url)})&&(E(),R.on(`uncaughtException`,e=>{console.error(`[openclaw] Uncaught exception:`,C(e)),R.exit(1)}),Ge.parseAsync(R.argv).catch(e=>{console.error(`[openclaw] CLI failed:`,C(e)),R.exit(1)}));export{de as PortInUseError,T as applyTemplate,ne as assertWebChannel,pe as createDefaultDeps,h as deriveSessionKey,le as describePortOwner,ie as ensureBinary,ce as ensurePortAvailable,me as getReplyFromConfig,ue as handlePortError,g as loadConfig,re as loadSessionStore,k as monitorWebChannel,te as normalizeE164,oe as promptYesNo,m as resolveSessionKey,w as resolveStorePath,S as runCommandWithTimeout,x as runExec,ae as saveSessionStore,p as toWhatsappJid,O as waitForever};
@@ -1 +1 @@
1
- import{i as e,m as t,p as n,u as r}from"./arg-split-DE5RqDHq.js";import{r as i}from"./service-BtB9epJk.js";import a from"node:path";import o from"node:fs/promises";const s=[`openclaw`,`clawdbot`,`moltbot`];function c(e=process.env){let i=e.OPENCLAW_PROFILE;switch(process.platform){case`darwin`:{let e=r(i);return[`launchctl bootout gui/$UID/${e}`,`rm ~/Library/LaunchAgents/${e}.plist`]}case`linux`:{let e=n(i);return[`systemctl --user disable --now ${e}.service`,`rm ~/.config/systemd/user/${e}.service`]}case`win32`:return[`schtasks /Delete /TN "${t(i)}" /F`];default:return[]}}function l(e){let t=e.HOME?.trim()||e.USERPROFILE?.trim();if(!t)throw Error(`Missing HOME`);return t}function u(e){let t=e.toLowerCase();for(let e of s)if(t.includes(e))return e;return null}function d(t){let n=t.toLowerCase(),r=[`openclaw_service_marker`],i=[`openclaw_service_kind`],a=[e.toLowerCase()],o=r.some(e=>n.includes(e)),s=i.some(e=>n.includes(e)),c=a.some(e=>n.includes(e));return o&&s&&c&&n.includes(`gateway`)}function f(e,t){return d(t)?!0:t.toLowerCase().includes(`gateway`)?e.startsWith(`ai.openclaw.`):!1}function p(e,t){return d(t)?!0:e.startsWith(`openclaw-gateway`)?t.toLowerCase().includes(`gateway`):!1}function m(e){let n=e.trim().toLowerCase();return n?n===t().toLowerCase()||n.startsWith(`openclaw gateway`):!1}function h(e){let t=e.match(/<key>Label<\/key>\s*<string>([\s\S]*?)<\/string>/i);return t&&t[1]?.trim()||null}function g(e){return e===r()}function _(e){return e===n()}function v(e){let t=e.toLowerCase();return t.includes(`clawdbot`)||t.includes(`moltbot`)}async function y(e){try{return await o.readdir(e)}catch{return[]}}async function b(e){try{return await o.readFile(e,`utf8`)}catch{return null}}async function x(e){let t=[],n=await y(e.dir);for(let r of n){if(!r.endsWith(e.extension))continue;let n=r.slice(0,-e.extension.length);if(e.isIgnoredName(n))continue;let i=a.join(e.dir,r),o=await b(i);o!==null&&t.push({entry:r,name:n,fullPath:i,contents:o})}return t}async function S(e){let t=[],n=await x({dir:e.dir,extension:`.plist`,isIgnoredName:g});for(let{name:r,fullPath:i,contents:a}of n){let n=u(a),o=h(a)??r;if(!n){if(!(v(r)||v(o)))continue;t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:v(o)?`clawdbot`:`moltbot`,legacy:!0});continue}g(o)||n===`openclaw`&&f(o,a)||t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:n,legacy:n!==`openclaw`||v(o)})}return t}async function C(e){let t=[],n=await x({dir:e.dir,extension:`.service`,isIgnoredName:_});for(let{entry:r,name:i,fullPath:a,contents:o}of n){let n=u(o);n&&(n===`openclaw`&&p(i,o)||t.push({platform:`linux`,label:r,detail:`unit: ${a}`,scope:e.scope,marker:n,legacy:n!==`openclaw`}))}return t}function w(e){let t=[],n=null;for(let r of e.split(/\r?\n/)){let e=r.trim();if(!e){n&&=(t.push(n),null);continue}let i=e.indexOf(`:`);if(i<=0)continue;let a=e.slice(0,i).trim().toLowerCase(),o=e.slice(i+1).trim();if(o){if(a===`taskname`){n&&t.push(n),n={name:o};continue}n&&a===`task to run`&&(n.taskToRun=o)}}return n&&t.push(n),t}async function T(e,t={}){let n=[],r=new Set,o=e=>{let t=`${e.platform}:${e.label}:${e.detail}:${e.scope}`;r.has(t)||(r.add(t),n.push(e))};if(process.platform===`darwin`){try{let n=l(e),r=a.join(n,`Library`,`LaunchAgents`);for(let e of await S({dir:r,scope:`user`}))o(e);if(t.deep){for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchAgents`),scope:`system`}))o(e);for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchDaemons`),scope:`system`}))o(e)}}catch{return n}return n}if(process.platform===`linux`){try{let n=l(e),r=a.join(n,`.config`,`systemd`,`user`);for(let e of await C({dir:r,scope:`user`}))o(e);if(t.deep)for(let e of[`/etc/systemd/system`,`/usr/lib/systemd/system`,`/lib/systemd/system`])for(let t of await C({dir:e,scope:`system`}))o(t)}catch{return n}return n}if(process.platform===`win32`){if(!t.deep)return n;let e=await i([`/Query`,`/FO`,`LIST`,`/V`]);if(e.code!==0)return n;let r=w(e.stdout);for(let e of r){let t=e.name.trim();if(!t||m(t))continue;let n=t.toLowerCase(),r=e.taskToRun?.toLowerCase()??``,i=null;for(let e of s)if(n.includes(e)||r.includes(e)){i=e;break}i&&o({platform:`win32`,label:t,detail:e.taskToRun?`task: ${t}, run: ${e.taskToRun}`:t,scope:`system`,marker:i,legacy:i!==`openclaw`})}return n}return n}export{c as n,T as t};
1
+ import{i as e,m as t,p as n,u as r}from"./arg-split-DE5RqDHq.js";import{r as i}from"./service-BtB9epJk.js";import a from"node:path";import o from"node:fs/promises";const s=[`openclaw`,`clawdbot`,`moltbot`];function c(e=process.env){let i=e.OPENCLAW_PROFILE;switch(process.platform){case`darwin`:{let e=r(i);return[`launchctl bootout gui/$UID/${e}`,`rm ~/Library/LaunchAgents/${e}.plist`]}case`linux`:{let e=n(i);return[`systemctl --user disable --now ${e}.service`,`rm ~/.config/systemd/user/${e}.service`]}case`win32`:return[`schtasks /Delete /TN "${t(i)}" /F`];default:return[]}}function l(e){let t=e.HOME?.trim()||e.USERPROFILE?.trim();if(!t)throw Error(`Missing HOME`);return t}function u(e){let t=e.toLowerCase();for(let e of s)if(t.includes(e))return e;return null}function d(t){let n=t.toLowerCase(),r=[`openclaw_service_marker`],i=[`openclaw_service_kind`],a=[e.toLowerCase()],o=r.some(e=>n.includes(e)),s=i.some(e=>n.includes(e)),c=a.some(e=>n.includes(e));return o&&s&&c&&n.includes(`gateway`)}function f(e,t){return d(t)?!0:t.toLowerCase().includes(`gateway`)?e.startsWith(`ai.openclaw.`):!1}function p(e,t){return d(t)?!0:e.startsWith(`openclaw-gateway`)?t.toLowerCase().includes(`gateway`):!1}function m(e){let n=e.trim().toLowerCase();return n?n===t().toLowerCase()||n.startsWith(`openclaw gateway`):!1}function h(e){let t=e.match(/<key>Label<\/key>\s*<string>([\s\S]*?)<\/string>/i);return t&&t[1]?.trim()||null}function g(e){return e===r()}function _(e){return e===n()}function v(e){let t=e.toLowerCase();return t.includes(`clawdbot`)||t.includes(`moltbot`)}async function y(e){try{return await o.readdir(e)}catch{return[]}}async function b(e){try{return await o.readFile(e,`utf8`)}catch{return null}}async function x(e){let t=[],n=await y(e.dir);for(let r of n){if(!r.endsWith(e.extension))continue;let n=r.slice(0,-e.extension.length);if(e.isIgnoredName(n))continue;let i=a.join(e.dir,r),o=await b(i);o!==null&&t.push({entry:r,name:n,fullPath:i,contents:o})}return t}async function S(e){let t=[],n=await x({dir:e.dir,extension:`.plist`,isIgnoredName:g});for(let{name:r,fullPath:i,contents:a}of n){let n=u(a),o=h(a)??r;if(!n){if(!(v(r)||v(o)))continue;t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:v(o)?`clawdbot`:`moltbot`,legacy:!0});continue}g(o)||n===`openclaw`&&f(o,a)||t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:n,legacy:n!==`openclaw`||v(o)})}return t}async function C(e){let t=[],n=await x({dir:e.dir,extension:`.service`,isIgnoredName:_});for(let{entry:r,name:i,fullPath:a,contents:o}of n){let n=u(o);n&&(n===`openclaw`&&p(i,o)||t.push({platform:`linux`,label:r,detail:`unit: ${a}`,scope:e.scope,marker:n,legacy:n!==`openclaw`}))}return t}function w(e){let t=[],n=null;for(let r of e.split(/\r?\n/)){let e=r.trim();if(!e){n&&=(t.push(n),null);continue}let i=e.indexOf(`:`);if(i<=0)continue;let a=e.slice(0,i).trim().toLowerCase(),o=e.slice(i+1).trim();if(o){if(a===`taskname`){n&&t.push(n),n={name:o};continue}n&&a===`task to run`&&(n.taskToRun=o)}}return n&&t.push(n),t}async function T(e,t={}){let n=[],r=new Set,o=e=>{let t=`${e.platform}:${e.label}:${e.detail}:${e.scope}`;r.has(t)||(r.add(t),n.push(e))};if(process.platform===`darwin`){try{let n=l(e),r=a.join(n,`Library`,`LaunchAgents`);for(let e of await S({dir:r,scope:`user`}))o(e);if(t.deep){for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchAgents`),scope:`system`}))o(e);for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchDaemons`),scope:`system`}))o(e)}}catch{return n}return n}if(process.platform===`linux`){try{let n=l(e),r=a.join(n,`.config`,`systemd`,`user`);for(let e of await C({dir:r,scope:`user`}))o(e);if(t.deep)for(let e of[`/etc/systemd/system`,`/usr/lib/systemd/system`,`/lib/systemd/system`])for(let t of await C({dir:e,scope:`system`}))o(t)}catch{return n}return n}if(process.platform===`win32`){if(!t.deep)return n;let e=await i([`/Query`,`/FO`,`LIST`,`/V`]);if(e.code!==0)return n;let r=w(e.stdout);for(let e of r){let t=e.name.trim();if(!t||m(t))continue;let n=t.toLowerCase(),r=e.taskToRun?.toLowerCase()??``,i=null;for(let e of s)if(n.includes(e)||r.includes(e)){i=e;break}i&&o({platform:`win32`,label:t,detail:e.taskToRun?`task: ${t}, run: ${e.taskToRun}`:t,scope:`system`,marker:i,legacy:i!==`openclaw`})}return n}return n}export{c as n,T as t};
@@ -1 +1 @@
1
- import{i as e,m as t,p as n,u as r}from"./arg-split-BOqSMBuf.js";import{r as i}from"./service-DZ9EbS15.js";import a from"node:path";import o from"node:fs/promises";const s=[`openclaw`,`clawdbot`,`moltbot`];function c(e=process.env){let i=e.OPENCLAW_PROFILE;switch(process.platform){case`darwin`:{let e=r(i);return[`launchctl bootout gui/$UID/${e}`,`rm ~/Library/LaunchAgents/${e}.plist`]}case`linux`:{let e=n(i);return[`systemctl --user disable --now ${e}.service`,`rm ~/.config/systemd/user/${e}.service`]}case`win32`:return[`schtasks /Delete /TN "${t(i)}" /F`];default:return[]}}function l(e){let t=e.HOME?.trim()||e.USERPROFILE?.trim();if(!t)throw Error(`Missing HOME`);return t}function u(e){let t=e.toLowerCase();for(let e of s)if(t.includes(e))return e;return null}function d(t){let n=t.toLowerCase(),r=[`openclaw_service_marker`],i=[`openclaw_service_kind`],a=[e.toLowerCase()],o=r.some(e=>n.includes(e)),s=i.some(e=>n.includes(e)),c=a.some(e=>n.includes(e));return o&&s&&c&&n.includes(`gateway`)}function f(e,t){return d(t)?!0:t.toLowerCase().includes(`gateway`)?e.startsWith(`ai.openclaw.`):!1}function p(e,t){return d(t)?!0:e.startsWith(`openclaw-gateway`)?t.toLowerCase().includes(`gateway`):!1}function m(e){let n=e.trim().toLowerCase();return n?n===t().toLowerCase()||n.startsWith(`openclaw gateway`):!1}function h(e){let t=e.match(/<key>Label<\/key>\s*<string>([\s\S]*?)<\/string>/i);return t&&t[1]?.trim()||null}function g(e){return e===r()}function _(e){return e===n()}function v(e){let t=e.toLowerCase();return t.includes(`clawdbot`)||t.includes(`moltbot`)}async function y(e){try{return await o.readdir(e)}catch{return[]}}async function b(e){try{return await o.readFile(e,`utf8`)}catch{return null}}async function x(e){let t=[],n=await y(e.dir);for(let r of n){if(!r.endsWith(e.extension))continue;let n=r.slice(0,-e.extension.length);if(e.isIgnoredName(n))continue;let i=a.join(e.dir,r),o=await b(i);o!==null&&t.push({entry:r,name:n,fullPath:i,contents:o})}return t}async function S(e){let t=[],n=await x({dir:e.dir,extension:`.plist`,isIgnoredName:g});for(let{name:r,fullPath:i,contents:a}of n){let n=u(a),o=h(a)??r;if(!n){if(!(v(r)||v(o)))continue;t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:v(o)?`clawdbot`:`moltbot`,legacy:!0});continue}g(o)||n===`openclaw`&&f(o,a)||t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:n,legacy:n!==`openclaw`||v(o)})}return t}async function C(e){let t=[],n=await x({dir:e.dir,extension:`.service`,isIgnoredName:_});for(let{entry:r,name:i,fullPath:a,contents:o}of n){let n=u(o);n&&(n===`openclaw`&&p(i,o)||t.push({platform:`linux`,label:r,detail:`unit: ${a}`,scope:e.scope,marker:n,legacy:n!==`openclaw`}))}return t}function w(e){let t=[],n=null;for(let r of e.split(/\r?\n/)){let e=r.trim();if(!e){n&&=(t.push(n),null);continue}let i=e.indexOf(`:`);if(i<=0)continue;let a=e.slice(0,i).trim().toLowerCase(),o=e.slice(i+1).trim();if(o){if(a===`taskname`){n&&t.push(n),n={name:o};continue}n&&a===`task to run`&&(n.taskToRun=o)}}return n&&t.push(n),t}async function T(e,t={}){let n=[],r=new Set,o=e=>{let t=`${e.platform}:${e.label}:${e.detail}:${e.scope}`;r.has(t)||(r.add(t),n.push(e))};if(process.platform===`darwin`){try{let n=l(e),r=a.join(n,`Library`,`LaunchAgents`);for(let e of await S({dir:r,scope:`user`}))o(e);if(t.deep){for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchAgents`),scope:`system`}))o(e);for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchDaemons`),scope:`system`}))o(e)}}catch{return n}return n}if(process.platform===`linux`){try{let n=l(e),r=a.join(n,`.config`,`systemd`,`user`);for(let e of await C({dir:r,scope:`user`}))o(e);if(t.deep)for(let e of[`/etc/systemd/system`,`/usr/lib/systemd/system`,`/lib/systemd/system`])for(let t of await C({dir:e,scope:`system`}))o(t)}catch{return n}return n}if(process.platform===`win32`){if(!t.deep)return n;let e=await i([`/Query`,`/FO`,`LIST`,`/V`]);if(e.code!==0)return n;let r=w(e.stdout);for(let e of r){let t=e.name.trim();if(!t||m(t))continue;let n=t.toLowerCase(),r=e.taskToRun?.toLowerCase()??``,i=null;for(let e of s)if(n.includes(e)||r.includes(e)){i=e;break}i&&o({platform:`win32`,label:t,detail:e.taskToRun?`task: ${t}, run: ${e.taskToRun}`:t,scope:`system`,marker:i,legacy:i!==`openclaw`})}return n}return n}export{c as n,T as t};
1
+ import{i as e,m as t,p as n,u as r}from"./arg-split-BOqSMBuf.js";import{r as i}from"./service-DZ9EbS15.js";import a from"node:path";import o from"node:fs/promises";const s=[`openclaw`,`clawdbot`,`moltbot`];function c(e=process.env){let i=e.OPENCLAW_PROFILE;switch(process.platform){case`darwin`:{let e=r(i);return[`launchctl bootout gui/$UID/${e}`,`rm ~/Library/LaunchAgents/${e}.plist`]}case`linux`:{let e=n(i);return[`systemctl --user disable --now ${e}.service`,`rm ~/.config/systemd/user/${e}.service`]}case`win32`:return[`schtasks /Delete /TN "${t(i)}" /F`];default:return[]}}function l(e){let t=e.HOME?.trim()||e.USERPROFILE?.trim();if(!t)throw Error(`Missing HOME`);return t}function u(e){let t=e.toLowerCase();for(let e of s)if(t.includes(e))return e;return null}function d(t){let n=t.toLowerCase(),r=[`openclaw_service_marker`],i=[`openclaw_service_kind`],a=[e.toLowerCase()],o=r.some(e=>n.includes(e)),s=i.some(e=>n.includes(e)),c=a.some(e=>n.includes(e));return o&&s&&c&&n.includes(`gateway`)}function f(e,t){return d(t)?!0:t.toLowerCase().includes(`gateway`)?e.startsWith(`ai.openclaw.`):!1}function p(e,t){return d(t)?!0:e.startsWith(`openclaw-gateway`)?t.toLowerCase().includes(`gateway`):!1}function m(e){let n=e.trim().toLowerCase();return n?n===t().toLowerCase()||n.startsWith(`openclaw gateway`):!1}function h(e){let t=e.match(/<key>Label<\/key>\s*<string>([\s\S]*?)<\/string>/i);return t&&t[1]?.trim()||null}function g(e){return e===r()}function _(e){return e===n()}function v(e){let t=e.toLowerCase();return t.includes(`clawdbot`)||t.includes(`moltbot`)}async function y(e){try{return await o.readdir(e)}catch{return[]}}async function b(e){try{return await o.readFile(e,`utf8`)}catch{return null}}async function x(e){let t=[],n=await y(e.dir);for(let r of n){if(!r.endsWith(e.extension))continue;let n=r.slice(0,-e.extension.length);if(e.isIgnoredName(n))continue;let i=a.join(e.dir,r),o=await b(i);o!==null&&t.push({entry:r,name:n,fullPath:i,contents:o})}return t}async function S(e){let t=[],n=await x({dir:e.dir,extension:`.plist`,isIgnoredName:g});for(let{name:r,fullPath:i,contents:a}of n){let n=u(a),o=h(a)??r;if(!n){if(!(v(r)||v(o)))continue;t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:v(o)?`clawdbot`:`moltbot`,legacy:!0});continue}g(o)||n===`openclaw`&&f(o,a)||t.push({platform:`darwin`,label:o,detail:`plist: ${i}`,scope:e.scope,marker:n,legacy:n!==`openclaw`||v(o)})}return t}async function C(e){let t=[],n=await x({dir:e.dir,extension:`.service`,isIgnoredName:_});for(let{entry:r,name:i,fullPath:a,contents:o}of n){let n=u(o);n&&(n===`openclaw`&&p(i,o)||t.push({platform:`linux`,label:r,detail:`unit: ${a}`,scope:e.scope,marker:n,legacy:n!==`openclaw`}))}return t}function w(e){let t=[],n=null;for(let r of e.split(/\r?\n/)){let e=r.trim();if(!e){n&&=(t.push(n),null);continue}let i=e.indexOf(`:`);if(i<=0)continue;let a=e.slice(0,i).trim().toLowerCase(),o=e.slice(i+1).trim();if(o){if(a===`taskname`){n&&t.push(n),n={name:o};continue}n&&a===`task to run`&&(n.taskToRun=o)}}return n&&t.push(n),t}async function T(e,t={}){let n=[],r=new Set,o=e=>{let t=`${e.platform}:${e.label}:${e.detail}:${e.scope}`;r.has(t)||(r.add(t),n.push(e))};if(process.platform===`darwin`){try{let n=l(e),r=a.join(n,`Library`,`LaunchAgents`);for(let e of await S({dir:r,scope:`user`}))o(e);if(t.deep){for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchAgents`),scope:`system`}))o(e);for(let e of await S({dir:a.join(a.sep,`Library`,`LaunchDaemons`),scope:`system`}))o(e)}}catch{return n}return n}if(process.platform===`linux`){try{let n=l(e),r=a.join(n,`.config`,`systemd`,`user`);for(let e of await C({dir:r,scope:`user`}))o(e);if(t.deep)for(let e of[`/etc/systemd/system`,`/usr/lib/systemd/system`,`/lib/systemd/system`])for(let t of await C({dir:e,scope:`system`}))o(t)}catch{return n}return n}if(process.platform===`win32`){if(!t.deep)return n;let e=await i([`/Query`,`/FO`,`LIST`,`/V`]);if(e.code!==0)return n;let r=w(e.stdout);for(let e of r){let t=e.name.trim();if(!t||m(t))continue;let n=t.toLowerCase(),r=e.taskToRun?.toLowerCase()??``,i=null;for(let e of s)if(n.includes(e)||r.includes(e)){i=e;break}i&&o({platform:`win32`,label:t,detail:e.taskToRun?`task: ${t}, run: ${e.taskToRun}`:t,scope:`system`,marker:i,legacy:i!==`openclaw`})}return n}return n}export{c as n,T as t};
@@ -1 +1 @@
1
- import{f as e,p as t,s as n}from"./openclaw-root-CnsBf6ZU.js";import{g as r,m as i,v as a,y as o}from"./windows-spawn-7oINn5ao.js";import{n as s}from"./path-safety-BukYK8Kd.js";import c from"node:path";import{constants as l}from"node:fs";import u from"node:fs/promises";import{createHash as d,randomUUID as f}from"node:crypto";import{pipeline as p}from"node:stream/promises";import{Readable as m,Transform as h}from"node:stream";import g from"jszip";import*as _ from"tar";function v(e){return/^[a-zA-Z]:[\\/]/.test(e)}function y(e){return e.replaceAll(`\\`,`/`)}function b(e,t){if(!e||e===`.`||e===`./`)return;if(v(e))throw Error(`archive entry uses a drive path: ${e}`);let n=c.posix.normalize(y(e)),r=t?.escapeLabel??`destination`;if(n===`..`||n.startsWith(`../`))throw Error(`archive entry escapes ${r}: ${e}`);if(c.posix.isAbsolute(n)||n.startsWith(`//`))throw Error(`archive entry is absolute: ${e}`)}function x(e,t){let n=y(e);if(!n||n===`.`||n===`./`)return null;let r=n.split(`/`).filter(e=>e.length>0&&e!==`.`),i=Math.max(0,Math.floor(t)),a=i===0?r.join(`/`):r.slice(i).join(`/`),o=c.posix.normalize(a);return!o||o===`.`||o===`./`?null:o}function S(e){let t=s(e.rootDir),n=c.resolve(e.rootDir,e.relPath),r=e.escapeLabel??`destination`;if(!n.startsWith(t))throw Error(`archive entry escapes ${r}: ${e.originalPath}`);return n}var C=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`ArchiveSecurityError`}};function w(e){return new C(`destination-symlink-traversal`,`archive entry traverses symlink in destination: ${e}`)}async function T(e){let t=await u.lstat(e);if(t.isSymbolicLink())throw new C(`destination-symlink`,`archive destination is a symlink`);if(!t.isDirectory())throw new C(`destination-not-directory`,`archive destination is not a directory`);return await u.realpath(e)}async function ee(t){let n=t.relPath.split(/[\\/]+/).filter(Boolean),r=c.resolve(t.rootDir);for(let i of n){r=c.join(r,i);let n;try{n=await u.lstat(r)}catch(t){if(e(t))continue;throw t}if(n.isSymbolicLink())throw w(t.originalPath)}}async function E(n){let r;try{r=await u.realpath(n.targetPath)}catch(t){if(e(t))return;throw t}if(!t(n.destinationRealDir,r))throw w(n.originalPath)}async function D(e){if(await ee({rootDir:e.destinationDir,relPath:e.relPath,originalPath:e.originalPath}),e.isDirectory){await u.mkdir(e.outPath,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:e.outPath,originalPath:e.originalPath});return}let t=c.dirname(e.outPath);await u.mkdir(t,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath})}async function O(e){let t=c.join(e.destinationRealDir,e.relPath);await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath}),e.mode!==0&&await u.chmod(t,e.mode).catch(()=>void 0)}async function k(e){let t=await u.mkdtemp(c.join(e.destinationRealDir,`.openclaw-archive-`));try{return await e.run(t)}finally{await u.rm(t,{recursive:!0,force:!0}).catch(()=>void 0)}}async function A(e){let t=async n=>{let i=await u.readdir(n,{withFileTypes:!0});for(let a of i){let i=c.join(n,a.name),o=c.relative(e.sourceDir,i),s=o.split(c.sep).join(`/`),l=c.join(e.destinationDir,o),d=await u.lstat(i);if(d.isSymbolicLink())throw w(s);if(d.isDirectory()){await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:l,originalPath:s,isDirectory:!0}),await t(i),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s});continue}if(!d.isFile())throw Error(`archive staging contains unsupported entry: ${s}`);await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:l,originalPath:s,isDirectory:!1}),await r({sourcePath:i,rootDir:e.destinationRealDir,relativePath:o,mkdir:!0}),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s})}};await t(e.sourceDir)}function j(e){return w(e)}const M=`archive size exceeds limit`,N=`archive entry extracted size exceeds limit`,te=process.platform!==`win32`&&`O_NOFOLLOW`in l,ne=l.O_WRONLY|l.O_CREAT|l.O_EXCL|(te?l.O_NOFOLLOW:0),P=[`.tgz`,`.tar.gz`,`.tar`];function F(e){let t=e.toLowerCase();return t.endsWith(`.zip`)?`zip`:P.some(e=>t.endsWith(e))?`tar`:null}async function I(e){let t=c.join(e,`package`);try{if((await u.stat(t)).isDirectory())return t}catch{}let n=(await u.readdir(e,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name);if(n.length!==1)throw Error(`unexpected archive layout (dirs: ${n.join(`, `)})`);let r=n[0];if(!r)throw Error(`unexpected archive layout (no package dir found)`);return c.join(e,r)}async function L(e,t,n){let r;try{return await Promise.race([e,new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${t}ms`)),t)})])}finally{r&&clearTimeout(r)}}function R(e){if(typeof e!=`number`||!Number.isFinite(e))return;let t=Math.floor(e);return t>0?t:void 0}function z(e){return{maxArchiveBytes:R(e?.maxArchiveBytes)??268435456,maxEntries:R(e?.maxEntries)??5e4,maxExtractedBytes:R(e?.maxExtractedBytes)??536870912,maxEntryBytes:R(e?.maxEntryBytes)??268435456}}function B(e,t){if(e>t.maxEntries)throw Error(`archive entry count exceeds limit`)}function V(e){let t=0,n=0,r=r=>{let i=Math.max(0,Math.floor(r));if(i!==0){if(t+=i,t>e.maxEntryBytes)throw Error(N);if(n+=i,n>e.maxExtractedBytes)throw Error(`archive extracted size exceeds limit`)}};return{startEntry(){t=0},addBytes:r,addEntrySize(t){let n=Math.max(0,Math.floor(t));if(n>e.maxEntryBytes)throw Error(N);r(n)}}}function H(e){return new h({transform(t,n,r){try{let n=t instanceof Buffer?t:Buffer.from(t);e.onChunkBytes(n.byteLength),r(null,n)}catch(e){r(e instanceof Error?e:Error(String(e)))}}})}function U(e){return j(e)}async function W(e){try{return await o({rootDir:e.destinationRealDir,relativePath:e.relPath,mkdir:!1,mode:438})}catch(t){throw t instanceof i&&(t.code===`invalid-path`||t.code===`outside-workspace`||t.code===`path-mismatch`)?U(e.originalPath):t}}async function G(t){let n;try{n=await u.lstat(t)}catch(t){if(e(t))return;throw t}n.isFile()&&await u.unlink(t).catch(()=>void 0)}function K(e){return c.join(c.dirname(e),`.${c.basename(e)}.${process.pid}.${f()}.tmp`)}async function q(e){let t=await a({rootDir:e.destinationRealDir,relativePath:e.relPath,rejectHardlinks:!0});try{if(!n(t.stat,e.expectedStat))throw new i(`path-mismatch`,`path changed during zip extract`);return t.realPath}finally{await t.handle.close().catch(()=>void 0)}}async function J(e){if(typeof e.nodeStream==`function`)return e.nodeStream();let t=await e.async(`nodebuffer`);return m.from(t)}function Y(e){b(e.entryPath);let t=x(e.entryPath,e.strip);return t?(b(t),{relPath:t,outPath:S({rootDir:e.destinationDir,relPath:t,originalPath:e.entryPath})}):null}async function X(e){await D(e)}async function re(e){let t=await W({relPath:e.relPath,originalPath:e.entry.name,destinationRealDir:e.destinationRealDir});e.budget.startEntry();let n=await J(e.entry),r=t.openedRealPath,a=t.openedStat.mode&511;await t.handle.close().catch(()=>void 0);let o=null,s=null,c=null,l=!1;try{s=K(r),o=await u.open(s,ne,a||438);let t=o.createWriteStream();if(t.once(`close`,()=>{l=!0}),await p(n,H({onChunkBytes:e.budget.addBytes}),t),c=await u.stat(s),!c)throw Error(`zip temp write did not produce file metadata`);l||=(await o.close().catch(()=>void 0),!0),o=null,await u.rename(s,r),s=null;let i=await q({destinationRealDir:e.destinationRealDir,relPath:e.relPath,expectedStat:c});if(typeof e.entry.unixPermissions==`number`){let t=e.entry.unixPermissions&511;t!==0&&await u.chmod(i,t).catch(()=>void 0)}}catch(t){throw s?await u.rm(s,{force:!0}).catch(()=>void 0):await G(r).catch(()=>void 0),t instanceof i?U(e.entry.name):t}finally{o&&!l&&await o.close().catch(()=>void 0)}}async function ie(e){let t=z(e.limits),n=await T(e.destDir);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let r=await u.readFile(e.archivePath),i=await g.loadAsync(r),a=Object.values(i.files),o=Math.max(0,Math.floor(e.stripComponents??0));B(a.length,t);let s=V(t);for(let t of a){let r=Y({entryPath:t.name,strip:o,destinationDir:e.destDir});r&&(await X({destinationDir:e.destDir,destinationRealDir:n,relPath:r.relPath,outPath:r.outPath,originalPath:t.name,isDirectory:t.dir}),!t.dir&&await re({entry:t,relPath:r.relPath,destinationRealDir:n,budget:s}))}}const ae=new Set([`SymbolicLink`,`Link`,`BlockDevice`,`CharacterDevice`,`FIFO`,`Socket`]);function oe(e){return{path:typeof e==`object`&&e&&`path`in e?String(e.path):``,type:typeof e==`object`&&e&&`type`in e?String(e.type):``,size:typeof e==`object`&&e&&`size`in e&&typeof e.size==`number`&&Number.isFinite(e.size)?Math.max(0,Math.floor(e.size)):0}}function Z(e){let t=Math.max(0,Math.floor(e.stripComponents??0)),n=z(e.limits),r=0,i=V(n);return a=>{b(a.path,{escapeLabel:e.escapeLabel});let o=x(a.path,t);if(o){if(b(o,{escapeLabel:e.escapeLabel}),S({rootDir:e.rootDir,relPath:o,originalPath:a.path,escapeLabel:e.escapeLabel}),ae.has(a.type))throw Error(`tar entry is a link: ${a.path}`);r+=1,B(r,n),i.addEntrySize(a.size)}}}async function se(e){let t=e.kind??F(e.archivePath);if(!t)throw Error(`unsupported archive: ${e.archivePath}`);let n=t===`zip`?`extract zip`:`extract tar`;if(t===`tar`){await L((async()=>{let t=z(e.limits);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let n=await T(e.destDir);await k({destinationRealDir:n,run:async r=>{let i=Z({rootDir:n,stripComponents:e.stripComponents,limits:t});await _.x({file:e.archivePath,cwd:r,strip:Math.max(0,Math.floor(e.stripComponents??0)),gzip:e.tarGzip,preservePaths:!1,strict:!0,onReadEntry(e){try{i(oe(e))}catch(e){let t=e instanceof Error?e:Error(String(e));this.abort?.(t)}}}),await A({sourceDir:r,destinationDir:n,destinationRealDir:n})}})})(),e.timeoutMs,n);return}await L(ie({archivePath:e.archivePath,destDir:e.destDir,stripComponents:e.stripComponents,limits:e.limits}),e.timeoutMs,n)}async function Q(e){try{return await u.stat(e),!0}catch{return!1}}async function ce(e){let t=await u.readFile(e,`utf-8`);return JSON.parse(t)}function le(e){let t=e.trim();return t&&(t.includes(`/`)?t.split(`/`).pop()??t:t)}function $(e){let t=e.trim();return t&&t.replaceAll(`/`,`__`).replaceAll(`\\`,`__`)}function ue(e){let t=e.trim(),n=t.replaceAll(/[\\/]/g,`-`).replaceAll(/[^a-zA-Z0-9._-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+/g,``).replaceAll(/-+$/g,``),r=n.length>0?n:`skill`,i=r===`.`||r===`..`?`skill`:r,a=d(`sha256`).update(t).digest(`hex`).slice(0,10);return i===t?i.length>60?`${i.slice(0,50)}-${a}`:i:`${i.length>50?i.slice(0,50):i}-${a}`}function de(e){let t=c.join(e.baseDir,$(e.id)),n=c.resolve(e.baseDir),r=c.resolve(t),i=c.relative(n,r);return!i||i===`..`||i.startsWith(`..${c.sep}`)||c.isAbsolute(i)?{ok:!1,error:e.invalidNameMessage}:{ok:!0,path:t}}async function fe(e){let n=c.resolve(e.baseDir),r=c.resolve(e.candidatePath);if(!t(n,r))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`);let i=await u.lstat(n);if(!i.isDirectory()||i.isSymbolicLink())throw Error(`Invalid ${e.boundaryLabel}: base directory must be a real directory`);let a=await u.realpath(n),o=async n=>{let r=await u.lstat(n);if(!r.isDirectory()||r.isSymbolicLink()||!t(a,await u.realpath(n)))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`)};try{await o(r);return}catch(e){if(e.code!==`ENOENT`)throw e}await o(c.dirname(r))}export{le as a,Q as c,I as d,A as f,v as h,ue as i,ce as l,k as m,de as n,Z as o,T as p,$ as r,se as s,fe as t,F as u};
1
+ import{f as e,p as t,s as n}from"./openclaw-root-CnsBf6ZU.js";import{g as r,m as i,v as a,y as o}from"./windows-spawn-7oINn5ao.js";import{n as s}from"./path-safety-BukYK8Kd.js";import c from"node:path";import{constants as l}from"node:fs";import u from"node:fs/promises";import{createHash as d,randomUUID as f}from"node:crypto";import{pipeline as p}from"node:stream/promises";import{Readable as m,Transform as h}from"node:stream";import g from"jszip";import*as _ from"tar";function v(e){return/^[a-zA-Z]:[\\/]/.test(e)}function y(e){return e.replaceAll(`\\`,`/`)}function b(e,t){if(!e||e===`.`||e===`./`)return;if(v(e))throw Error(`archive entry uses a drive path: ${e}`);let n=c.posix.normalize(y(e)),r=t?.escapeLabel??`destination`;if(n===`..`||n.startsWith(`../`))throw Error(`archive entry escapes ${r}: ${e}`);if(c.posix.isAbsolute(n)||n.startsWith(`//`))throw Error(`archive entry is absolute: ${e}`)}function x(e,t){let n=y(e);if(!n||n===`.`||n===`./`)return null;let r=n.split(`/`).filter(e=>e.length>0&&e!==`.`),i=Math.max(0,Math.floor(t)),a=i===0?r.join(`/`):r.slice(i).join(`/`),o=c.posix.normalize(a);return!o||o===`.`||o===`./`?null:o}function S(e){let t=s(e.rootDir),n=c.resolve(e.rootDir,e.relPath),r=e.escapeLabel??`destination`;if(!n.startsWith(t))throw Error(`archive entry escapes ${r}: ${e.originalPath}`);return n}var C=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`ArchiveSecurityError`}};function w(e){return new C(`destination-symlink-traversal`,`archive entry traverses symlink in destination: ${e}`)}async function T(e){let t=await u.lstat(e);if(t.isSymbolicLink())throw new C(`destination-symlink`,`archive destination is a symlink`);if(!t.isDirectory())throw new C(`destination-not-directory`,`archive destination is not a directory`);return await u.realpath(e)}async function ee(t){let n=t.relPath.split(/[\\/]+/).filter(Boolean),r=c.resolve(t.rootDir);for(let i of n){r=c.join(r,i);let n;try{n=await u.lstat(r)}catch(t){if(e(t))continue;throw t}if(n.isSymbolicLink())throw w(t.originalPath)}}async function E(n){let r;try{r=await u.realpath(n.targetPath)}catch(t){if(e(t))return;throw t}if(!t(n.destinationRealDir,r))throw w(n.originalPath)}async function D(e){if(await ee({rootDir:e.destinationDir,relPath:e.relPath,originalPath:e.originalPath}),e.isDirectory){await u.mkdir(e.outPath,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:e.outPath,originalPath:e.originalPath});return}let t=c.dirname(e.outPath);await u.mkdir(t,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath})}async function O(e){let t=c.join(e.destinationRealDir,e.relPath);await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath}),e.mode!==0&&await u.chmod(t,e.mode).catch(()=>void 0)}async function k(e){let t=await u.mkdtemp(c.join(e.destinationRealDir,`.openclaw-archive-`));try{return await e.run(t)}finally{await u.rm(t,{recursive:!0,force:!0}).catch(()=>void 0)}}async function A(e){let t=async n=>{let i=await u.readdir(n,{withFileTypes:!0});for(let a of i){let i=c.join(n,a.name),o=c.relative(e.sourceDir,i),s=o.split(c.sep).join(`/`),l=c.join(e.destinationDir,o),d=await u.lstat(i);if(d.isSymbolicLink())throw w(s);if(d.isDirectory()){await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:l,originalPath:s,isDirectory:!0}),await t(i),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s});continue}if(!d.isFile())throw Error(`archive staging contains unsupported entry: ${s}`);await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:l,originalPath:s,isDirectory:!1}),await r({sourcePath:i,rootDir:e.destinationRealDir,relativePath:o,mkdir:!0}),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s})}};await t(e.sourceDir)}function j(e){return w(e)}const M=`archive size exceeds limit`,N=`archive entry extracted size exceeds limit`,te=process.platform!==`win32`&&`O_NOFOLLOW`in l,ne=l.O_WRONLY|l.O_CREAT|l.O_EXCL|(te?l.O_NOFOLLOW:0),P=[`.tgz`,`.tar.gz`,`.tar`];function F(e){let t=e.toLowerCase();return t.endsWith(`.zip`)?`zip`:P.some(e=>t.endsWith(e))?`tar`:null}async function I(e){let t=c.join(e,`package`);try{if((await u.stat(t)).isDirectory())return t}catch{}let n=(await u.readdir(e,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name);if(n.length!==1)throw Error(`unexpected archive layout (dirs: ${n.join(`, `)})`);let r=n[0];if(!r)throw Error(`unexpected archive layout (no package dir found)`);return c.join(e,r)}async function L(e,t,n){let r;try{return await Promise.race([e,new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${t}ms`)),t)})])}finally{r&&clearTimeout(r)}}function R(e){if(typeof e!=`number`||!Number.isFinite(e))return;let t=Math.floor(e);return t>0?t:void 0}function z(e){return{maxArchiveBytes:R(e?.maxArchiveBytes)??268435456,maxEntries:R(e?.maxEntries)??5e4,maxExtractedBytes:R(e?.maxExtractedBytes)??536870912,maxEntryBytes:R(e?.maxEntryBytes)??268435456}}function B(e,t){if(e>t.maxEntries)throw Error(`archive entry count exceeds limit`)}function V(e){let t=0,n=0,r=r=>{let i=Math.max(0,Math.floor(r));if(i!==0){if(t+=i,t>e.maxEntryBytes)throw Error(N);if(n+=i,n>e.maxExtractedBytes)throw Error(`archive extracted size exceeds limit`)}};return{startEntry(){t=0},addBytes:r,addEntrySize(t){let n=Math.max(0,Math.floor(t));if(n>e.maxEntryBytes)throw Error(N);r(n)}}}function H(e){return new h({transform(t,n,r){try{let n=t instanceof Buffer?t:Buffer.from(t);e.onChunkBytes(n.byteLength),r(null,n)}catch(e){r(e instanceof Error?e:Error(String(e)))}}})}function U(e){return j(e)}async function W(e){try{return await o({rootDir:e.destinationRealDir,relativePath:e.relPath,mkdir:!1,mode:438})}catch(t){throw t instanceof i&&(t.code===`invalid-path`||t.code===`outside-workspace`||t.code===`path-mismatch`)?U(e.originalPath):t}}async function G(t){let n;try{n=await u.lstat(t)}catch(t){if(e(t))return;throw t}n.isFile()&&await u.unlink(t).catch(()=>void 0)}function K(e){return c.join(c.dirname(e),`.${c.basename(e)}.${process.pid}.${f()}.tmp`)}async function q(e){let t=await a({rootDir:e.destinationRealDir,relativePath:e.relPath,rejectHardlinks:!0});try{if(!n(t.stat,e.expectedStat))throw new i(`path-mismatch`,`path changed during zip extract`);return t.realPath}finally{await t.handle.close().catch(()=>void 0)}}async function J(e){if(typeof e.nodeStream==`function`)return e.nodeStream();let t=await e.async(`nodebuffer`);return m.from(t)}function Y(e){b(e.entryPath);let t=x(e.entryPath,e.strip);return t?(b(t),{relPath:t,outPath:S({rootDir:e.destinationDir,relPath:t,originalPath:e.entryPath})}):null}async function X(e){await D(e)}async function re(e){let t=await W({relPath:e.relPath,originalPath:e.entry.name,destinationRealDir:e.destinationRealDir});e.budget.startEntry();let n=await J(e.entry),r=t.openedRealPath,a=t.openedStat.mode&511;await t.handle.close().catch(()=>void 0);let o=null,s=null,c=null,l=!1;try{s=K(r),o=await u.open(s,ne,a||438);let t=o.createWriteStream();if(t.once(`close`,()=>{l=!0}),await p(n,H({onChunkBytes:e.budget.addBytes}),t),c=await u.stat(s),!c)throw Error(`zip temp write did not produce file metadata`);l||=(await o.close().catch(()=>void 0),!0),o=null,await u.rename(s,r),s=null;let i=await q({destinationRealDir:e.destinationRealDir,relPath:e.relPath,expectedStat:c});if(typeof e.entry.unixPermissions==`number`){let t=e.entry.unixPermissions&511;t!==0&&await u.chmod(i,t).catch(()=>void 0)}}catch(t){throw s?await u.rm(s,{force:!0}).catch(()=>void 0):await G(r).catch(()=>void 0),t instanceof i?U(e.entry.name):t}finally{o&&!l&&await o.close().catch(()=>void 0)}}async function ie(e){let t=z(e.limits),n=await T(e.destDir);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let r=await u.readFile(e.archivePath),i=await g.loadAsync(r),a=Object.values(i.files),o=Math.max(0,Math.floor(e.stripComponents??0));B(a.length,t);let s=V(t);for(let t of a){let r=Y({entryPath:t.name,strip:o,destinationDir:e.destDir});r&&(await X({destinationDir:e.destDir,destinationRealDir:n,relPath:r.relPath,outPath:r.outPath,originalPath:t.name,isDirectory:t.dir}),!t.dir&&await re({entry:t,relPath:r.relPath,destinationRealDir:n,budget:s}))}}const ae=new Set([`SymbolicLink`,`Link`,`BlockDevice`,`CharacterDevice`,`FIFO`,`Socket`]);function oe(e){return{path:typeof e==`object`&&e&&`path`in e?String(e.path):``,type:typeof e==`object`&&e&&`type`in e?String(e.type):``,size:typeof e==`object`&&e&&`size`in e&&typeof e.size==`number`&&Number.isFinite(e.size)?Math.max(0,Math.floor(e.size)):0}}function Z(e){let t=Math.max(0,Math.floor(e.stripComponents??0)),n=z(e.limits),r=0,i=V(n);return a=>{b(a.path,{escapeLabel:e.escapeLabel});let o=x(a.path,t);if(o){if(b(o,{escapeLabel:e.escapeLabel}),S({rootDir:e.rootDir,relPath:o,originalPath:a.path,escapeLabel:e.escapeLabel}),ae.has(a.type))throw Error(`tar entry is a link: ${a.path}`);r+=1,B(r,n),i.addEntrySize(a.size)}}}async function se(e){let t=e.kind??F(e.archivePath);if(!t)throw Error(`unsupported archive: ${e.archivePath}`);let n=t===`zip`?`extract zip`:`extract tar`;if(t===`tar`){await L((async()=>{let t=z(e.limits);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let n=await T(e.destDir);await k({destinationRealDir:n,run:async r=>{let i=Z({rootDir:n,stripComponents:e.stripComponents,limits:t});await _.x({file:e.archivePath,cwd:r,strip:Math.max(0,Math.floor(e.stripComponents??0)),gzip:e.tarGzip,preservePaths:!1,strict:!0,onReadEntry(e){try{i(oe(e))}catch(e){let t=e instanceof Error?e:Error(String(e));this.abort?.(t)}}}),await A({sourceDir:r,destinationDir:n,destinationRealDir:n})}})})(),e.timeoutMs,n);return}await L(ie({archivePath:e.archivePath,destDir:e.destDir,stripComponents:e.stripComponents,limits:e.limits}),e.timeoutMs,n)}async function Q(e){try{return await u.stat(e),!0}catch{return!1}}async function ce(e){let t=await u.readFile(e,`utf-8`);return JSON.parse(t)}function le(e){let t=e.trim();return t&&(t.includes(`/`)?t.split(`/`).pop()??t:t)}function $(e){let t=e.trim();return t&&t.replaceAll(`/`,`__`).replaceAll(`\\`,`__`)}function ue(e){let t=e.trim(),n=t.replaceAll(/[\\/]/g,`-`).replaceAll(/[^a-zA-Z0-9._-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+/g,``).replaceAll(/-+$/g,``),r=n.length>0?n:`skill`,i=r===`.`||r===`..`?`skill`:r,a=d(`sha256`).update(t).digest(`hex`).slice(0,10);return i===t?i.length>60?`${i.slice(0,50)}-${a}`:i:`${i.length>50?i.slice(0,50):i}-${a}`}function de(e){let t=c.join(e.baseDir,$(e.id)),n=c.resolve(e.baseDir),r=c.resolve(t),i=c.relative(n,r);return!i||i===`..`||i.startsWith(`..${c.sep}`)||c.isAbsolute(i)?{ok:!1,error:e.invalidNameMessage}:{ok:!0,path:t}}async function fe(e){let n=c.resolve(e.baseDir),r=c.resolve(e.candidatePath);if(!t(n,r))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`);let i=await u.lstat(n);if(!i.isDirectory()||i.isSymbolicLink())throw Error(`Invalid ${e.boundaryLabel}: base directory must be a real directory`);let a=await u.realpath(n),o=async n=>{let r=await u.lstat(n);if(!r.isDirectory()||r.isSymbolicLink()||!t(a,await u.realpath(n)))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`)};try{await o(r);return}catch(e){if(e.code!==`ENOENT`)throw e}await o(c.dirname(r))}export{le as a,Q as c,I as d,A as f,v as h,ue as i,ce as l,k as m,de as n,Z as o,T as p,$ as r,se as s,fe as t,F as u};
@@ -1 +1 @@
1
- import{f as e,p as t,s as n}from"./openclaw-root-D_0Q6--h.js";import{g as r,m as i,v as a,y as o}from"./windows-spawn-AB7ItGAE.js";import{n as s}from"./path-safety-DaaMJFdt.js";import{constants as c}from"node:fs";import l from"node:path";import u from"node:fs/promises";import{createHash as d,randomUUID as f}from"node:crypto";import{pipeline as p}from"node:stream/promises";import{Readable as m,Transform as h}from"node:stream";import g from"jszip";import*as _ from"tar";function v(e){return/^[a-zA-Z]:[\\/]/.test(e)}function y(e){return e.replaceAll(`\\`,`/`)}function b(e,t){if(!e||e===`.`||e===`./`)return;if(v(e))throw Error(`archive entry uses a drive path: ${e}`);let n=l.posix.normalize(y(e)),r=t?.escapeLabel??`destination`;if(n===`..`||n.startsWith(`../`))throw Error(`archive entry escapes ${r}: ${e}`);if(l.posix.isAbsolute(n)||n.startsWith(`//`))throw Error(`archive entry is absolute: ${e}`)}function x(e,t){let n=y(e);if(!n||n===`.`||n===`./`)return null;let r=n.split(`/`).filter(e=>e.length>0&&e!==`.`),i=Math.max(0,Math.floor(t)),a=i===0?r.join(`/`):r.slice(i).join(`/`),o=l.posix.normalize(a);return!o||o===`.`||o===`./`?null:o}function S(e){let t=s(e.rootDir),n=l.resolve(e.rootDir,e.relPath),r=e.escapeLabel??`destination`;if(!n.startsWith(t))throw Error(`archive entry escapes ${r}: ${e.originalPath}`);return n}var C=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`ArchiveSecurityError`}};function w(e){return new C(`destination-symlink-traversal`,`archive entry traverses symlink in destination: ${e}`)}async function T(e){let t=await u.lstat(e);if(t.isSymbolicLink())throw new C(`destination-symlink`,`archive destination is a symlink`);if(!t.isDirectory())throw new C(`destination-not-directory`,`archive destination is not a directory`);return await u.realpath(e)}async function ee(t){let n=t.relPath.split(/[\\/]+/).filter(Boolean),r=l.resolve(t.rootDir);for(let i of n){r=l.join(r,i);let n;try{n=await u.lstat(r)}catch(t){if(e(t))continue;throw t}if(n.isSymbolicLink())throw w(t.originalPath)}}async function E(n){let r;try{r=await u.realpath(n.targetPath)}catch(t){if(e(t))return;throw t}if(!t(n.destinationRealDir,r))throw w(n.originalPath)}async function D(e){if(await ee({rootDir:e.destinationDir,relPath:e.relPath,originalPath:e.originalPath}),e.isDirectory){await u.mkdir(e.outPath,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:e.outPath,originalPath:e.originalPath});return}let t=l.dirname(e.outPath);await u.mkdir(t,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath})}async function O(e){let t=l.join(e.destinationRealDir,e.relPath);await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath}),e.mode!==0&&await u.chmod(t,e.mode).catch(()=>void 0)}async function k(e){let t=await u.mkdtemp(l.join(e.destinationRealDir,`.openclaw-archive-`));try{return await e.run(t)}finally{await u.rm(t,{recursive:!0,force:!0}).catch(()=>void 0)}}async function A(e){let t=async n=>{let i=await u.readdir(n,{withFileTypes:!0});for(let a of i){let i=l.join(n,a.name),o=l.relative(e.sourceDir,i),s=o.split(l.sep).join(`/`),c=l.join(e.destinationDir,o),d=await u.lstat(i);if(d.isSymbolicLink())throw w(s);if(d.isDirectory()){await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:c,originalPath:s,isDirectory:!0}),await t(i),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s});continue}if(!d.isFile())throw Error(`archive staging contains unsupported entry: ${s}`);await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:c,originalPath:s,isDirectory:!1}),await r({sourcePath:i,rootDir:e.destinationRealDir,relativePath:o,mkdir:!0}),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s})}};await t(e.sourceDir)}function j(e){return w(e)}const M=`archive size exceeds limit`,N=`archive entry extracted size exceeds limit`,te=process.platform!==`win32`&&`O_NOFOLLOW`in c,ne=c.O_WRONLY|c.O_CREAT|c.O_EXCL|(te?c.O_NOFOLLOW:0),P=[`.tgz`,`.tar.gz`,`.tar`];function F(e){let t=e.toLowerCase();return t.endsWith(`.zip`)?`zip`:P.some(e=>t.endsWith(e))?`tar`:null}async function I(e){let t=l.join(e,`package`);try{if((await u.stat(t)).isDirectory())return t}catch{}let n=(await u.readdir(e,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name);if(n.length!==1)throw Error(`unexpected archive layout (dirs: ${n.join(`, `)})`);let r=n[0];if(!r)throw Error(`unexpected archive layout (no package dir found)`);return l.join(e,r)}async function L(e,t,n){let r;try{return await Promise.race([e,new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${t}ms`)),t)})])}finally{r&&clearTimeout(r)}}function R(e){if(typeof e!=`number`||!Number.isFinite(e))return;let t=Math.floor(e);return t>0?t:void 0}function z(e){return{maxArchiveBytes:R(e?.maxArchiveBytes)??268435456,maxEntries:R(e?.maxEntries)??5e4,maxExtractedBytes:R(e?.maxExtractedBytes)??536870912,maxEntryBytes:R(e?.maxEntryBytes)??268435456}}function B(e,t){if(e>t.maxEntries)throw Error(`archive entry count exceeds limit`)}function V(e){let t=0,n=0,r=r=>{let i=Math.max(0,Math.floor(r));if(i!==0){if(t+=i,t>e.maxEntryBytes)throw Error(N);if(n+=i,n>e.maxExtractedBytes)throw Error(`archive extracted size exceeds limit`)}};return{startEntry(){t=0},addBytes:r,addEntrySize(t){let n=Math.max(0,Math.floor(t));if(n>e.maxEntryBytes)throw Error(N);r(n)}}}function H(e){return new h({transform(t,n,r){try{let n=t instanceof Buffer?t:Buffer.from(t);e.onChunkBytes(n.byteLength),r(null,n)}catch(e){r(e instanceof Error?e:Error(String(e)))}}})}function U(e){return j(e)}async function W(e){try{return await o({rootDir:e.destinationRealDir,relativePath:e.relPath,mkdir:!1,mode:438})}catch(t){throw t instanceof i&&(t.code===`invalid-path`||t.code===`outside-workspace`||t.code===`path-mismatch`)?U(e.originalPath):t}}async function G(t){let n;try{n=await u.lstat(t)}catch(t){if(e(t))return;throw t}n.isFile()&&await u.unlink(t).catch(()=>void 0)}function K(e){return l.join(l.dirname(e),`.${l.basename(e)}.${process.pid}.${f()}.tmp`)}async function q(e){let t=await a({rootDir:e.destinationRealDir,relativePath:e.relPath,rejectHardlinks:!0});try{if(!n(t.stat,e.expectedStat))throw new i(`path-mismatch`,`path changed during zip extract`);return t.realPath}finally{await t.handle.close().catch(()=>void 0)}}async function J(e){if(typeof e.nodeStream==`function`)return e.nodeStream();let t=await e.async(`nodebuffer`);return m.from(t)}function Y(e){b(e.entryPath);let t=x(e.entryPath,e.strip);return t?(b(t),{relPath:t,outPath:S({rootDir:e.destinationDir,relPath:t,originalPath:e.entryPath})}):null}async function X(e){await D(e)}async function re(e){let t=await W({relPath:e.relPath,originalPath:e.entry.name,destinationRealDir:e.destinationRealDir});e.budget.startEntry();let n=await J(e.entry),r=t.openedRealPath,a=t.openedStat.mode&511;await t.handle.close().catch(()=>void 0);let o=null,s=null,c=null,l=!1;try{s=K(r),o=await u.open(s,ne,a||438);let t=o.createWriteStream();if(t.once(`close`,()=>{l=!0}),await p(n,H({onChunkBytes:e.budget.addBytes}),t),c=await u.stat(s),!c)throw Error(`zip temp write did not produce file metadata`);l||=(await o.close().catch(()=>void 0),!0),o=null,await u.rename(s,r),s=null;let i=await q({destinationRealDir:e.destinationRealDir,relPath:e.relPath,expectedStat:c});if(typeof e.entry.unixPermissions==`number`){let t=e.entry.unixPermissions&511;t!==0&&await u.chmod(i,t).catch(()=>void 0)}}catch(t){throw s?await u.rm(s,{force:!0}).catch(()=>void 0):await G(r).catch(()=>void 0),t instanceof i?U(e.entry.name):t}finally{o&&!l&&await o.close().catch(()=>void 0)}}async function ie(e){let t=z(e.limits),n=await T(e.destDir);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let r=await u.readFile(e.archivePath),i=await g.loadAsync(r),a=Object.values(i.files),o=Math.max(0,Math.floor(e.stripComponents??0));B(a.length,t);let s=V(t);for(let t of a){let r=Y({entryPath:t.name,strip:o,destinationDir:e.destDir});r&&(await X({destinationDir:e.destDir,destinationRealDir:n,relPath:r.relPath,outPath:r.outPath,originalPath:t.name,isDirectory:t.dir}),!t.dir&&await re({entry:t,relPath:r.relPath,destinationRealDir:n,budget:s}))}}const ae=new Set([`SymbolicLink`,`Link`,`BlockDevice`,`CharacterDevice`,`FIFO`,`Socket`]);function oe(e){return{path:typeof e==`object`&&e&&`path`in e?String(e.path):``,type:typeof e==`object`&&e&&`type`in e?String(e.type):``,size:typeof e==`object`&&e&&`size`in e&&typeof e.size==`number`&&Number.isFinite(e.size)?Math.max(0,Math.floor(e.size)):0}}function Z(e){let t=Math.max(0,Math.floor(e.stripComponents??0)),n=z(e.limits),r=0,i=V(n);return a=>{b(a.path,{escapeLabel:e.escapeLabel});let o=x(a.path,t);if(o){if(b(o,{escapeLabel:e.escapeLabel}),S({rootDir:e.rootDir,relPath:o,originalPath:a.path,escapeLabel:e.escapeLabel}),ae.has(a.type))throw Error(`tar entry is a link: ${a.path}`);r+=1,B(r,n),i.addEntrySize(a.size)}}}async function se(e){let t=e.kind??F(e.archivePath);if(!t)throw Error(`unsupported archive: ${e.archivePath}`);let n=t===`zip`?`extract zip`:`extract tar`;if(t===`tar`){await L((async()=>{let t=z(e.limits);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let n=await T(e.destDir);await k({destinationRealDir:n,run:async r=>{let i=Z({rootDir:n,stripComponents:e.stripComponents,limits:t});await _.x({file:e.archivePath,cwd:r,strip:Math.max(0,Math.floor(e.stripComponents??0)),gzip:e.tarGzip,preservePaths:!1,strict:!0,onReadEntry(e){try{i(oe(e))}catch(e){let t=e instanceof Error?e:Error(String(e));this.abort?.(t)}}}),await A({sourceDir:r,destinationDir:n,destinationRealDir:n})}})})(),e.timeoutMs,n);return}await L(ie({archivePath:e.archivePath,destDir:e.destDir,stripComponents:e.stripComponents,limits:e.limits}),e.timeoutMs,n)}async function Q(e){try{return await u.stat(e),!0}catch{return!1}}async function ce(e){let t=await u.readFile(e,`utf-8`);return JSON.parse(t)}function le(e){let t=e.trim();return t&&(t.includes(`/`)?t.split(`/`).pop()??t:t)}function $(e){let t=e.trim();return t&&t.replaceAll(`/`,`__`).replaceAll(`\\`,`__`)}function ue(e){let t=e.trim(),n=t.replaceAll(/[\\/]/g,`-`).replaceAll(/[^a-zA-Z0-9._-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+/g,``).replaceAll(/-+$/g,``),r=n.length>0?n:`skill`,i=r===`.`||r===`..`?`skill`:r,a=d(`sha256`).update(t).digest(`hex`).slice(0,10);return i===t?i.length>60?`${i.slice(0,50)}-${a}`:i:`${i.length>50?i.slice(0,50):i}-${a}`}function de(e){let t=l.join(e.baseDir,$(e.id)),n=l.resolve(e.baseDir),r=l.resolve(t),i=l.relative(n,r);return!i||i===`..`||i.startsWith(`..${l.sep}`)||l.isAbsolute(i)?{ok:!1,error:e.invalidNameMessage}:{ok:!0,path:t}}async function fe(e){let n=l.resolve(e.baseDir),r=l.resolve(e.candidatePath);if(!t(n,r))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`);let i=await u.lstat(n);if(!i.isDirectory()||i.isSymbolicLink())throw Error(`Invalid ${e.boundaryLabel}: base directory must be a real directory`);let a=await u.realpath(n),o=async n=>{let r=await u.lstat(n);if(!r.isDirectory()||r.isSymbolicLink()||!t(a,await u.realpath(n)))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`)};try{await o(r);return}catch(e){if(e.code!==`ENOENT`)throw e}await o(l.dirname(r))}export{le as a,Q as c,I as d,A as f,v as h,ue as i,ce as l,k as m,de as n,Z as o,T as p,$ as r,se as s,fe as t,F as u};
1
+ import{f as e,p as t,s as n}from"./openclaw-root-D_0Q6--h.js";import{g as r,m as i,v as a,y as o}from"./windows-spawn-AB7ItGAE.js";import{n as s}from"./path-safety-DaaMJFdt.js";import{constants as c}from"node:fs";import l from"node:path";import u from"node:fs/promises";import{createHash as d,randomUUID as f}from"node:crypto";import{pipeline as p}from"node:stream/promises";import{Readable as m,Transform as h}from"node:stream";import g from"jszip";import*as _ from"tar";function v(e){return/^[a-zA-Z]:[\\/]/.test(e)}function y(e){return e.replaceAll(`\\`,`/`)}function b(e,t){if(!e||e===`.`||e===`./`)return;if(v(e))throw Error(`archive entry uses a drive path: ${e}`);let n=l.posix.normalize(y(e)),r=t?.escapeLabel??`destination`;if(n===`..`||n.startsWith(`../`))throw Error(`archive entry escapes ${r}: ${e}`);if(l.posix.isAbsolute(n)||n.startsWith(`//`))throw Error(`archive entry is absolute: ${e}`)}function x(e,t){let n=y(e);if(!n||n===`.`||n===`./`)return null;let r=n.split(`/`).filter(e=>e.length>0&&e!==`.`),i=Math.max(0,Math.floor(t)),a=i===0?r.join(`/`):r.slice(i).join(`/`),o=l.posix.normalize(a);return!o||o===`.`||o===`./`?null:o}function S(e){let t=s(e.rootDir),n=l.resolve(e.rootDir,e.relPath),r=e.escapeLabel??`destination`;if(!n.startsWith(t))throw Error(`archive entry escapes ${r}: ${e.originalPath}`);return n}var C=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`ArchiveSecurityError`}};function w(e){return new C(`destination-symlink-traversal`,`archive entry traverses symlink in destination: ${e}`)}async function T(e){let t=await u.lstat(e);if(t.isSymbolicLink())throw new C(`destination-symlink`,`archive destination is a symlink`);if(!t.isDirectory())throw new C(`destination-not-directory`,`archive destination is not a directory`);return await u.realpath(e)}async function ee(t){let n=t.relPath.split(/[\\/]+/).filter(Boolean),r=l.resolve(t.rootDir);for(let i of n){r=l.join(r,i);let n;try{n=await u.lstat(r)}catch(t){if(e(t))continue;throw t}if(n.isSymbolicLink())throw w(t.originalPath)}}async function E(n){let r;try{r=await u.realpath(n.targetPath)}catch(t){if(e(t))return;throw t}if(!t(n.destinationRealDir,r))throw w(n.originalPath)}async function D(e){if(await ee({rootDir:e.destinationDir,relPath:e.relPath,originalPath:e.originalPath}),e.isDirectory){await u.mkdir(e.outPath,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:e.outPath,originalPath:e.originalPath});return}let t=l.dirname(e.outPath);await u.mkdir(t,{recursive:!0}),await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath})}async function O(e){let t=l.join(e.destinationRealDir,e.relPath);await E({destinationRealDir:e.destinationRealDir,targetPath:t,originalPath:e.originalPath}),e.mode!==0&&await u.chmod(t,e.mode).catch(()=>void 0)}async function k(e){let t=await u.mkdtemp(l.join(e.destinationRealDir,`.openclaw-archive-`));try{return await e.run(t)}finally{await u.rm(t,{recursive:!0,force:!0}).catch(()=>void 0)}}async function A(e){let t=async n=>{let i=await u.readdir(n,{withFileTypes:!0});for(let a of i){let i=l.join(n,a.name),o=l.relative(e.sourceDir,i),s=o.split(l.sep).join(`/`),c=l.join(e.destinationDir,o),d=await u.lstat(i);if(d.isSymbolicLink())throw w(s);if(d.isDirectory()){await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:c,originalPath:s,isDirectory:!0}),await t(i),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s});continue}if(!d.isFile())throw Error(`archive staging contains unsupported entry: ${s}`);await D({destinationDir:e.destinationDir,destinationRealDir:e.destinationRealDir,relPath:o,outPath:c,originalPath:s,isDirectory:!1}),await r({sourcePath:i,rootDir:e.destinationRealDir,relativePath:o,mkdir:!0}),await O({destinationRealDir:e.destinationRealDir,relPath:o,mode:d.mode&511,originalPath:s})}};await t(e.sourceDir)}function j(e){return w(e)}const M=`archive size exceeds limit`,N=`archive entry extracted size exceeds limit`,te=process.platform!==`win32`&&`O_NOFOLLOW`in c,ne=c.O_WRONLY|c.O_CREAT|c.O_EXCL|(te?c.O_NOFOLLOW:0),P=[`.tgz`,`.tar.gz`,`.tar`];function F(e){let t=e.toLowerCase();return t.endsWith(`.zip`)?`zip`:P.some(e=>t.endsWith(e))?`tar`:null}async function I(e){let t=l.join(e,`package`);try{if((await u.stat(t)).isDirectory())return t}catch{}let n=(await u.readdir(e,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name);if(n.length!==1)throw Error(`unexpected archive layout (dirs: ${n.join(`, `)})`);let r=n[0];if(!r)throw Error(`unexpected archive layout (no package dir found)`);return l.join(e,r)}async function L(e,t,n){let r;try{return await Promise.race([e,new Promise((e,i)=>{r=setTimeout(()=>i(Error(`${n} timed out after ${t}ms`)),t)})])}finally{r&&clearTimeout(r)}}function R(e){if(typeof e!=`number`||!Number.isFinite(e))return;let t=Math.floor(e);return t>0?t:void 0}function z(e){return{maxArchiveBytes:R(e?.maxArchiveBytes)??268435456,maxEntries:R(e?.maxEntries)??5e4,maxExtractedBytes:R(e?.maxExtractedBytes)??536870912,maxEntryBytes:R(e?.maxEntryBytes)??268435456}}function B(e,t){if(e>t.maxEntries)throw Error(`archive entry count exceeds limit`)}function V(e){let t=0,n=0,r=r=>{let i=Math.max(0,Math.floor(r));if(i!==0){if(t+=i,t>e.maxEntryBytes)throw Error(N);if(n+=i,n>e.maxExtractedBytes)throw Error(`archive extracted size exceeds limit`)}};return{startEntry(){t=0},addBytes:r,addEntrySize(t){let n=Math.max(0,Math.floor(t));if(n>e.maxEntryBytes)throw Error(N);r(n)}}}function H(e){return new h({transform(t,n,r){try{let n=t instanceof Buffer?t:Buffer.from(t);e.onChunkBytes(n.byteLength),r(null,n)}catch(e){r(e instanceof Error?e:Error(String(e)))}}})}function U(e){return j(e)}async function W(e){try{return await o({rootDir:e.destinationRealDir,relativePath:e.relPath,mkdir:!1,mode:438})}catch(t){throw t instanceof i&&(t.code===`invalid-path`||t.code===`outside-workspace`||t.code===`path-mismatch`)?U(e.originalPath):t}}async function G(t){let n;try{n=await u.lstat(t)}catch(t){if(e(t))return;throw t}n.isFile()&&await u.unlink(t).catch(()=>void 0)}function K(e){return l.join(l.dirname(e),`.${l.basename(e)}.${process.pid}.${f()}.tmp`)}async function q(e){let t=await a({rootDir:e.destinationRealDir,relativePath:e.relPath,rejectHardlinks:!0});try{if(!n(t.stat,e.expectedStat))throw new i(`path-mismatch`,`path changed during zip extract`);return t.realPath}finally{await t.handle.close().catch(()=>void 0)}}async function J(e){if(typeof e.nodeStream==`function`)return e.nodeStream();let t=await e.async(`nodebuffer`);return m.from(t)}function Y(e){b(e.entryPath);let t=x(e.entryPath,e.strip);return t?(b(t),{relPath:t,outPath:S({rootDir:e.destinationDir,relPath:t,originalPath:e.entryPath})}):null}async function X(e){await D(e)}async function re(e){let t=await W({relPath:e.relPath,originalPath:e.entry.name,destinationRealDir:e.destinationRealDir});e.budget.startEntry();let n=await J(e.entry),r=t.openedRealPath,a=t.openedStat.mode&511;await t.handle.close().catch(()=>void 0);let o=null,s=null,c=null,l=!1;try{s=K(r),o=await u.open(s,ne,a||438);let t=o.createWriteStream();if(t.once(`close`,()=>{l=!0}),await p(n,H({onChunkBytes:e.budget.addBytes}),t),c=await u.stat(s),!c)throw Error(`zip temp write did not produce file metadata`);l||=(await o.close().catch(()=>void 0),!0),o=null,await u.rename(s,r),s=null;let i=await q({destinationRealDir:e.destinationRealDir,relPath:e.relPath,expectedStat:c});if(typeof e.entry.unixPermissions==`number`){let t=e.entry.unixPermissions&511;t!==0&&await u.chmod(i,t).catch(()=>void 0)}}catch(t){throw s?await u.rm(s,{force:!0}).catch(()=>void 0):await G(r).catch(()=>void 0),t instanceof i?U(e.entry.name):t}finally{o&&!l&&await o.close().catch(()=>void 0)}}async function ie(e){let t=z(e.limits),n=await T(e.destDir);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let r=await u.readFile(e.archivePath),i=await g.loadAsync(r),a=Object.values(i.files),o=Math.max(0,Math.floor(e.stripComponents??0));B(a.length,t);let s=V(t);for(let t of a){let r=Y({entryPath:t.name,strip:o,destinationDir:e.destDir});r&&(await X({destinationDir:e.destDir,destinationRealDir:n,relPath:r.relPath,outPath:r.outPath,originalPath:t.name,isDirectory:t.dir}),!t.dir&&await re({entry:t,relPath:r.relPath,destinationRealDir:n,budget:s}))}}const ae=new Set([`SymbolicLink`,`Link`,`BlockDevice`,`CharacterDevice`,`FIFO`,`Socket`]);function oe(e){return{path:typeof e==`object`&&e&&`path`in e?String(e.path):``,type:typeof e==`object`&&e&&`type`in e?String(e.type):``,size:typeof e==`object`&&e&&`size`in e&&typeof e.size==`number`&&Number.isFinite(e.size)?Math.max(0,Math.floor(e.size)):0}}function Z(e){let t=Math.max(0,Math.floor(e.stripComponents??0)),n=z(e.limits),r=0,i=V(n);return a=>{b(a.path,{escapeLabel:e.escapeLabel});let o=x(a.path,t);if(o){if(b(o,{escapeLabel:e.escapeLabel}),S({rootDir:e.rootDir,relPath:o,originalPath:a.path,escapeLabel:e.escapeLabel}),ae.has(a.type))throw Error(`tar entry is a link: ${a.path}`);r+=1,B(r,n),i.addEntrySize(a.size)}}}async function se(e){let t=e.kind??F(e.archivePath);if(!t)throw Error(`unsupported archive: ${e.archivePath}`);let n=t===`zip`?`extract zip`:`extract tar`;if(t===`tar`){await L((async()=>{let t=z(e.limits);if((await u.stat(e.archivePath)).size>t.maxArchiveBytes)throw Error(M);let n=await T(e.destDir);await k({destinationRealDir:n,run:async r=>{let i=Z({rootDir:n,stripComponents:e.stripComponents,limits:t});await _.x({file:e.archivePath,cwd:r,strip:Math.max(0,Math.floor(e.stripComponents??0)),gzip:e.tarGzip,preservePaths:!1,strict:!0,onReadEntry(e){try{i(oe(e))}catch(e){let t=e instanceof Error?e:Error(String(e));this.abort?.(t)}}}),await A({sourceDir:r,destinationDir:n,destinationRealDir:n})}})})(),e.timeoutMs,n);return}await L(ie({archivePath:e.archivePath,destDir:e.destDir,stripComponents:e.stripComponents,limits:e.limits}),e.timeoutMs,n)}async function Q(e){try{return await u.stat(e),!0}catch{return!1}}async function ce(e){let t=await u.readFile(e,`utf-8`);return JSON.parse(t)}function le(e){let t=e.trim();return t&&(t.includes(`/`)?t.split(`/`).pop()??t:t)}function $(e){let t=e.trim();return t&&t.replaceAll(`/`,`__`).replaceAll(`\\`,`__`)}function ue(e){let t=e.trim(),n=t.replaceAll(/[\\/]/g,`-`).replaceAll(/[^a-zA-Z0-9._-]/g,`-`).replaceAll(/-+/g,`-`).replaceAll(/^-+/g,``).replaceAll(/-+$/g,``),r=n.length>0?n:`skill`,i=r===`.`||r===`..`?`skill`:r,a=d(`sha256`).update(t).digest(`hex`).slice(0,10);return i===t?i.length>60?`${i.slice(0,50)}-${a}`:i:`${i.length>50?i.slice(0,50):i}-${a}`}function de(e){let t=l.join(e.baseDir,$(e.id)),n=l.resolve(e.baseDir),r=l.resolve(t),i=l.relative(n,r);return!i||i===`..`||i.startsWith(`..${l.sep}`)||l.isAbsolute(i)?{ok:!1,error:e.invalidNameMessage}:{ok:!0,path:t}}async function fe(e){let n=l.resolve(e.baseDir),r=l.resolve(e.candidatePath);if(!t(n,r))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`);let i=await u.lstat(n);if(!i.isDirectory()||i.isSymbolicLink())throw Error(`Invalid ${e.boundaryLabel}: base directory must be a real directory`);let a=await u.realpath(n),o=async n=>{let r=await u.lstat(n);if(!r.isDirectory()||r.isSymbolicLink()||!t(a,await u.realpath(n)))throw Error(`Invalid path: must stay within ${e.boundaryLabel}`)};try{await o(r);return}catch(e){if(e.code!==`ENOENT`)throw e}await o(l.dirname(r))}export{le as a,Q as c,I as d,A as f,v as h,ue as i,ce as l,k as m,de as n,Z as o,T as p,$ as r,se as s,fe as t,F as u};
@@ -1 +1 @@
1
- import{t as e,y as t}from"./utils-UGOV_184.js";import{_ as n}from"./env-overrides-DXJbFrwI.js";import{n as r,t as i}from"./scan-paths-C13EseXp.js";import{_ as a,b as o,x as s}from"./skills-DHbOKEGc.js";import{S as c}from"./windows-spawn-AB7ItGAE.js";import{a as l,c as u,l as d,n as f,r as p,u as m}from"./install-safe-path-iesxijn2.js";import{a as h,c as g,d as _,f as v,i as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./npm-pack-install-B23L-AtF.js";import{t as E}from"./skill-scanner-CUUF3Fvo.js";import D from"node:path";import O from"node:fs/promises";const k={INVALID_NPM_SPEC:`invalid_npm_spec`,MISSING_OPENCLAW_EXTENSIONS:`missing_openclaw_extensions`,EMPTY_OPENCLAW_EXTENSIONS:`empty_openclaw_extensions`,NPM_PACKAGE_NOT_FOUND:`npm_package_not_found`,PLUGIN_ID_MISMATCH:`plugin_id_mismatch`},A={};function j(e){return p(e)}function M(e){return e?e===`.`||e===`..`?`invalid plugin name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid plugin name: path separators not allowed`:null:`invalid plugin name: missing`}function N(e){let t=s(e.manifest);return t.status===`missing`?{ok:!1,error:`package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"]). See https://docs.openclaw.ai/help/troubleshooting#plugin-install-fails-with-missing-openclaw-extensions`,code:k.MISSING_OPENCLAW_EXTENSIONS}:t.status===`empty`?{ok:!1,error:`package.json openclaw.extensions is empty`,code:k.EMPTY_OPENCLAW_EXTENSIONS}:{ok:!0,entries:t.entries}}function P(e){let t=e.trim();return t.startsWith(`Package not found on npm:`)?!0:/E404|404 not found|not in this registry/i.test(t)}function F(e,t){return{ok:!0,pluginId:e,targetDir:t,manifestName:void 0,version:void 0,extensions:[D.basename(t)]}}function I(e){return{extensionsDir:e.extensionsDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId}}function L(e){return{extensionsDir:e.extensionsDir,logger:e.logger,mode:e.mode,dryRun:e.dryRun}}function R(n,r){let i=r?t(r):D.join(e,`extensions`),a=M(n);if(a)throw Error(a);let o=f({baseDir:i,id:n,invalidNameMessage:`invalid plugin name: path traversal detected`});if(!o.ok)throw Error(o.error);return o.path}async function z(n){let{logger:a,timeoutMs:s,mode:c,dryRun:f}=g(n,A),p=D.join(n.packageDir,`package.json`);if(!await u(p))return{ok:!1,error:`extracted package missing package.json`};let m;try{m=await d(p)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let _=N({manifest:m});if(!_.ok)return{ok:!1,error:_.error,code:_.code};let v=_.entries,b=typeof m.name==`string`?m.name:``,x=b?l(b):`plugin`,C=o(n.packageDir),w=C.ok&&C.manifest.id?l(C.manifest.id):void 0,T=w??x,O=M(T);if(O)return{ok:!1,error:O};if(n.expectedPluginId&&n.expectedPluginId!==T)return{ok:!1,error:`plugin id mismatch: expected ${n.expectedPluginId}, got ${T}`,code:k.PLUGIN_ID_MISMATCH};w&&w!==x&&a.info?.(`Plugin manifest id "${w}" differs from npm package name "${x}"; using manifest id as the config key.`);let j=D.resolve(n.packageDir),P=[];for(let e of v){let t=D.resolve(j,e);if(!r(j,t)){a.warn?.(`extension entry escapes plugin directory and will not be scanned: ${e}`);continue}i(e)&&a.warn?.(`extension entry is in a hidden/node_modules path and will receive targeted scan coverage: ${e}`),P.push(t)}try{let e=await E(n.packageDir,{includeFiles:P});if(e.critical>0){let t=e.findings.filter(e=>e.severity===`critical`).map(e=>`${e.message} (${e.file}:${e.line})`).join(`; `);a.warn?.(`WARNING: Plugin "${T}" contains dangerous code patterns: ${t}`)}else e.warn>0&&a.warn?.(`Plugin "${T}" has ${e.warn} suspicious code pattern(s). Run "openclaw security audit --deep" for details.`)}catch(e){a.warn?.(`Plugin "${T}" code safety scan failed (${String(e)}). Installation continues; run "openclaw security audit --deep" after install.`)}let F=await y({baseDir:n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`),id:T,invalidNameMessage:`invalid plugin name: path traversal detected`,boundaryLabel:`extensions directory`});if(!F.ok)return{ok:!1,error:F.error};let I=F.targetDir,L=await S({mode:c,targetDir:I,alreadyExistsError:`plugin already exists: ${I} (delete it first)`});if(!L.ok)return L;if(f)return{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v};let R=m.dependencies??{},z=Object.keys(R).length>0,B=await h({sourceDir:n.packageDir,targetDir:I,mode:c,timeoutMs:s,logger:a,copyErrorPrefix:`failed to copy plugin`,hasDeps:z,depsLogMessage:`Installing plugin dependencies…`,afterCopy:async e=>{for(let t of v){let n=D.resolve(e,t);if(!r(e,n)){a.warn?.(`extension entry escapes plugin directory: ${t}`);continue}await u(n)||a.warn?.(`extension entry not found: ${t}`)}}});return B.ok?{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v}:B}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=e.mode??`install`,i=await v(e.archivePath);if(!i.ok)return i;let a=i.path;return await T({archivePath:a,tempDirPrefix:`openclaw-plugin-`,timeoutMs:n,logger:t,onExtracted:async i=>await z({packageDir:i,...I({extensionsDir:e.extensionsDir,timeoutMs:n,logger:t,mode:r,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId})})})}async function V(e){let n=t(e.dirPath);return await u(n)?(await O.stat(n)).isDirectory()?await z({packageDir:n,...I(e)}):{ok:!1,error:`not a directory: ${n}`}:{ok:!1,error:`directory not found: ${n}`}}async function H(n){let{logger:r,mode:i,dryRun:a}=C(n,A),o=t(n.filePath);if(!await u(o))return{ok:!1,error:`file not found: ${o}`};let s=n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`);await O.mkdir(s,{recursive:!0});let l=D.basename(o,D.extname(o))||`plugin`,d=M(l);if(d)return{ok:!1,error:d};let f=D.join(s,`${j(l)}${D.extname(o)}`),p=await S({mode:i,targetDir:f,alreadyExistsError:`plugin already exists: ${f} (delete it first)`});if(!p.ok)return p;if(a)return F(l,f);r.info?.(`Installing to ${f}…`);try{await c({rootDir:s,relativePath:D.basename(f),sourcePath:o})}catch(e){return{ok:!1,error:String(e)}}return F(l,f)}async function U(e){let{logger:t,timeoutMs:r,mode:i,dryRun:a}=g(e,A),o=e.expectedPluginId,s=e.spec.trim(),c=n(s);if(c)return{ok:!1,error:c,code:k.INVALID_NPM_SPEC};t.info?.(`Downloading ${s}…`);let l=w(await x({tempDirPrefix:`openclaw-npm-pack-`,spec:s,timeoutMs:r,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:{extensionsDir:e.extensionsDir,timeoutMs:r,logger:t,mode:i,dryRun:a,expectedPluginId:o}}));return!l.ok&&P(l.error)?{ok:!1,error:l.error,code:k.NPM_PACKAGE_NOT_FOUND}:l}async function W(e){let t=await b(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=I(e);return r.isDirectory()?await V({dirPath:n,...i}):m(n)?await B({archivePath:n,...i}):await H({filePath:n,...L(e)})}function G(e){let t=e.lookup.value.trim();if(t){if(e.lookup.kind===`pluginId`)return e.bundled.get(t);for(let n of e.bundled.values())if(n.npmSpec===t)return n}}function K(e){let t=a({workspaceDir:e.workspaceDir}),n=new Map;for(let e of t.candidates){if(e.origin!==`bundled`)continue;let t=o(e.rootDir,!1);if(!t.ok)continue;let r=t.manifest.id;if(n.has(r))continue;let i=e.packageManifest?.install?.npmSpec?.trim()||e.packageName?.trim()||void 0;n.set(r,{pluginId:r,localPath:e.rootDir,npmSpec:i})}return n}function q(e){return G({bundled:K({workspaceDir:e.workspaceDir}),lookup:e.lookup})}function J(e){return _(e)}function Y(e,t){let{pluginId:n,...r}=t,i={...e.plugins?.installs,[n]:{...e.plugins?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,plugins:{...e.plugins,installs:{...i,[n]:i[n]}}}}export{K as a,W as c,G as i,R as l,Y as n,k as o,q as r,U as s,J as t};
1
+ import{t as e,y as t}from"./utils-UGOV_184.js";import{_ as n}from"./env-overrides-DXJbFrwI.js";import{n as r,t as i}from"./scan-paths-C13EseXp.js";import{_ as a,b as o,x as s}from"./skills-DHbOKEGc.js";import{S as c}from"./windows-spawn-AB7ItGAE.js";import{a as l,c as u,l as d,n as f,r as p,u as m}from"./install-safe-path-iesxijn2.js";import{a as h,c as g,d as _,f as v,i as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./npm-pack-install-B23L-AtF.js";import{t as E}from"./skill-scanner-CUUF3Fvo.js";import D from"node:path";import O from"node:fs/promises";const k={INVALID_NPM_SPEC:`invalid_npm_spec`,MISSING_OPENCLAW_EXTENSIONS:`missing_openclaw_extensions`,EMPTY_OPENCLAW_EXTENSIONS:`empty_openclaw_extensions`,NPM_PACKAGE_NOT_FOUND:`npm_package_not_found`,PLUGIN_ID_MISMATCH:`plugin_id_mismatch`},A={};function j(e){return p(e)}function M(e){return e?e===`.`||e===`..`?`invalid plugin name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid plugin name: path separators not allowed`:null:`invalid plugin name: missing`}function N(e){let t=s(e.manifest);return t.status===`missing`?{ok:!1,error:`package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"]). See https://docs.openclaw.ai/help/troubleshooting#plugin-install-fails-with-missing-openclaw-extensions`,code:k.MISSING_OPENCLAW_EXTENSIONS}:t.status===`empty`?{ok:!1,error:`package.json openclaw.extensions is empty`,code:k.EMPTY_OPENCLAW_EXTENSIONS}:{ok:!0,entries:t.entries}}function P(e){let t=e.trim();return t.startsWith(`Package not found on npm:`)?!0:/E404|404 not found|not in this registry/i.test(t)}function F(e,t){return{ok:!0,pluginId:e,targetDir:t,manifestName:void 0,version:void 0,extensions:[D.basename(t)]}}function I(e){return{extensionsDir:e.extensionsDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId}}function L(e){return{extensionsDir:e.extensionsDir,logger:e.logger,mode:e.mode,dryRun:e.dryRun}}function R(n,r){let i=r?t(r):D.join(e,`extensions`),a=M(n);if(a)throw Error(a);let o=f({baseDir:i,id:n,invalidNameMessage:`invalid plugin name: path traversal detected`});if(!o.ok)throw Error(o.error);return o.path}async function z(n){let{logger:a,timeoutMs:s,mode:c,dryRun:f}=g(n,A),p=D.join(n.packageDir,`package.json`);if(!await u(p))return{ok:!1,error:`extracted package missing package.json`};let m;try{m=await d(p)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let _=N({manifest:m});if(!_.ok)return{ok:!1,error:_.error,code:_.code};let v=_.entries,b=typeof m.name==`string`?m.name:``,x=b?l(b):`plugin`,C=o(n.packageDir),w=C.ok&&C.manifest.id?l(C.manifest.id):void 0,T=w??x,O=M(T);if(O)return{ok:!1,error:O};if(n.expectedPluginId&&n.expectedPluginId!==T)return{ok:!1,error:`plugin id mismatch: expected ${n.expectedPluginId}, got ${T}`,code:k.PLUGIN_ID_MISMATCH};w&&w!==x&&a.info?.(`Plugin manifest id "${w}" differs from npm package name "${x}"; using manifest id as the config key.`);let j=D.resolve(n.packageDir),P=[];for(let e of v){let t=D.resolve(j,e);if(!r(j,t)){a.warn?.(`extension entry escapes plugin directory and will not be scanned: ${e}`);continue}i(e)&&a.warn?.(`extension entry is in a hidden/node_modules path and will receive targeted scan coverage: ${e}`),P.push(t)}try{let e=await E(n.packageDir,{includeFiles:P});if(e.critical>0){let t=e.findings.filter(e=>e.severity===`critical`).map(e=>`${e.message} (${e.file}:${e.line})`).join(`; `);a.warn?.(`WARNING: Plugin "${T}" contains dangerous code patterns: ${t}`)}else e.warn>0&&a.warn?.(`Plugin "${T}" has ${e.warn} suspicious code pattern(s). Run "openclaw security audit --deep" for details.`)}catch(e){a.warn?.(`Plugin "${T}" code safety scan failed (${String(e)}). Installation continues; run "openclaw security audit --deep" after install.`)}let F=await y({baseDir:n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`),id:T,invalidNameMessage:`invalid plugin name: path traversal detected`,boundaryLabel:`extensions directory`});if(!F.ok)return{ok:!1,error:F.error};let I=F.targetDir,L=await S({mode:c,targetDir:I,alreadyExistsError:`plugin already exists: ${I} (delete it first)`});if(!L.ok)return L;if(f)return{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v};let R=m.dependencies??{},z=Object.keys(R).length>0,B=await h({sourceDir:n.packageDir,targetDir:I,mode:c,timeoutMs:s,logger:a,copyErrorPrefix:`failed to copy plugin`,hasDeps:z,depsLogMessage:`Installing plugin dependencies…`,afterCopy:async e=>{for(let t of v){let n=D.resolve(e,t);if(!r(e,n)){a.warn?.(`extension entry escapes plugin directory: ${t}`);continue}await u(n)||a.warn?.(`extension entry not found: ${t}`)}}});return B.ok?{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v}:B}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=e.mode??`install`,i=await v(e.archivePath);if(!i.ok)return i;let a=i.path;return await T({archivePath:a,tempDirPrefix:`openclaw-plugin-`,timeoutMs:n,logger:t,onExtracted:async i=>await z({packageDir:i,...I({extensionsDir:e.extensionsDir,timeoutMs:n,logger:t,mode:r,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId})})})}async function V(e){let n=t(e.dirPath);return await u(n)?(await O.stat(n)).isDirectory()?await z({packageDir:n,...I(e)}):{ok:!1,error:`not a directory: ${n}`}:{ok:!1,error:`directory not found: ${n}`}}async function H(n){let{logger:r,mode:i,dryRun:a}=C(n,A),o=t(n.filePath);if(!await u(o))return{ok:!1,error:`file not found: ${o}`};let s=n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`);await O.mkdir(s,{recursive:!0});let l=D.basename(o,D.extname(o))||`plugin`,d=M(l);if(d)return{ok:!1,error:d};let f=D.join(s,`${j(l)}${D.extname(o)}`),p=await S({mode:i,targetDir:f,alreadyExistsError:`plugin already exists: ${f} (delete it first)`});if(!p.ok)return p;if(a)return F(l,f);r.info?.(`Installing to ${f}…`);try{await c({rootDir:s,relativePath:D.basename(f),sourcePath:o})}catch(e){return{ok:!1,error:String(e)}}return F(l,f)}async function U(e){let{logger:t,timeoutMs:r,mode:i,dryRun:a}=g(e,A),o=e.expectedPluginId,s=e.spec.trim(),c=n(s);if(c)return{ok:!1,error:c,code:k.INVALID_NPM_SPEC};t.info?.(`Downloading ${s}…`);let l=w(await x({tempDirPrefix:`openclaw-npm-pack-`,spec:s,timeoutMs:r,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:{extensionsDir:e.extensionsDir,timeoutMs:r,logger:t,mode:i,dryRun:a,expectedPluginId:o}}));return!l.ok&&P(l.error)?{ok:!1,error:l.error,code:k.NPM_PACKAGE_NOT_FOUND}:l}async function W(e){let t=await b(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=I(e);return r.isDirectory()?await V({dirPath:n,...i}):m(n)?await B({archivePath:n,...i}):await H({filePath:n,...L(e)})}function G(e){let t=e.lookup.value.trim();if(t){if(e.lookup.kind===`pluginId`)return e.bundled.get(t);for(let n of e.bundled.values())if(n.npmSpec===t)return n}}function K(e){let t=a({workspaceDir:e.workspaceDir}),n=new Map;for(let e of t.candidates){if(e.origin!==`bundled`)continue;let t=o(e.rootDir,!1);if(!t.ok)continue;let r=t.manifest.id;if(n.has(r))continue;let i=e.packageManifest?.install?.npmSpec?.trim()||e.packageName?.trim()||void 0;n.set(r,{pluginId:r,localPath:e.rootDir,npmSpec:i})}return n}function q(e){return G({bundled:K({workspaceDir:e.workspaceDir}),lookup:e.lookup})}function J(e){return _(e)}function Y(e,t){let{pluginId:n,...r}=t,i={...e.plugins?.installs,[n]:{...e.plugins?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,plugins:{...e.plugins,installs:{...i,[n]:i[n]}}}}export{K as a,W as c,G as i,R as l,Y as n,k as o,q as r,U as s,J as t};
@@ -1 +1 @@
1
- import{t as e,v as t}from"./utils-CGdo13HV.js";import{_ as n}from"./env-overrides-DHtB4kK3.js";import{n as r,t as i}from"./scan-paths-CWtvWW40.js";import{_ as a,b as o,x as s}from"./skills-CKTicUKS.js";import{S as c}from"./windows-spawn-7oINn5ao.js";import{a as l,c as u,l as d,n as f,r as p,u as m}from"./install-safe-path-C6kc_8NW.js";import{a as h,c as g,d as _,f as v,i as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./npm-pack-install-C0te3Oap.js";import{t as E}from"./skill-scanner-CkxXNioD.js";import D from"node:path";import O from"node:fs/promises";const k={INVALID_NPM_SPEC:`invalid_npm_spec`,MISSING_OPENCLAW_EXTENSIONS:`missing_openclaw_extensions`,EMPTY_OPENCLAW_EXTENSIONS:`empty_openclaw_extensions`,NPM_PACKAGE_NOT_FOUND:`npm_package_not_found`,PLUGIN_ID_MISMATCH:`plugin_id_mismatch`},A={};function j(e){return p(e)}function M(e){return e?e===`.`||e===`..`?`invalid plugin name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid plugin name: path separators not allowed`:null:`invalid plugin name: missing`}function N(e){let t=s(e.manifest);return t.status===`missing`?{ok:!1,error:`package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"]). See https://docs.openclaw.ai/help/troubleshooting#plugin-install-fails-with-missing-openclaw-extensions`,code:k.MISSING_OPENCLAW_EXTENSIONS}:t.status===`empty`?{ok:!1,error:`package.json openclaw.extensions is empty`,code:k.EMPTY_OPENCLAW_EXTENSIONS}:{ok:!0,entries:t.entries}}function P(e){let t=e.trim();return t.startsWith(`Package not found on npm:`)?!0:/E404|404 not found|not in this registry/i.test(t)}function F(e,t){return{ok:!0,pluginId:e,targetDir:t,manifestName:void 0,version:void 0,extensions:[D.basename(t)]}}function I(e){return{extensionsDir:e.extensionsDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId}}function L(e){return{extensionsDir:e.extensionsDir,logger:e.logger,mode:e.mode,dryRun:e.dryRun}}function R(n,r){let i=r?t(r):D.join(e,`extensions`),a=M(n);if(a)throw Error(a);let o=f({baseDir:i,id:n,invalidNameMessage:`invalid plugin name: path traversal detected`});if(!o.ok)throw Error(o.error);return o.path}async function z(n){let{logger:a,timeoutMs:s,mode:c,dryRun:f}=g(n,A),p=D.join(n.packageDir,`package.json`);if(!await u(p))return{ok:!1,error:`extracted package missing package.json`};let m;try{m=await d(p)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let _=N({manifest:m});if(!_.ok)return{ok:!1,error:_.error,code:_.code};let v=_.entries,b=typeof m.name==`string`?m.name:``,x=b?l(b):`plugin`,C=o(n.packageDir),w=C.ok&&C.manifest.id?l(C.manifest.id):void 0,T=w??x,O=M(T);if(O)return{ok:!1,error:O};if(n.expectedPluginId&&n.expectedPluginId!==T)return{ok:!1,error:`plugin id mismatch: expected ${n.expectedPluginId}, got ${T}`,code:k.PLUGIN_ID_MISMATCH};w&&w!==x&&a.info?.(`Plugin manifest id "${w}" differs from npm package name "${x}"; using manifest id as the config key.`);let j=D.resolve(n.packageDir),P=[];for(let e of v){let t=D.resolve(j,e);if(!r(j,t)){a.warn?.(`extension entry escapes plugin directory and will not be scanned: ${e}`);continue}i(e)&&a.warn?.(`extension entry is in a hidden/node_modules path and will receive targeted scan coverage: ${e}`),P.push(t)}try{let e=await E(n.packageDir,{includeFiles:P});if(e.critical>0){let t=e.findings.filter(e=>e.severity===`critical`).map(e=>`${e.message} (${e.file}:${e.line})`).join(`; `);a.warn?.(`WARNING: Plugin "${T}" contains dangerous code patterns: ${t}`)}else e.warn>0&&a.warn?.(`Plugin "${T}" has ${e.warn} suspicious code pattern(s). Run "openclaw security audit --deep" for details.`)}catch(e){a.warn?.(`Plugin "${T}" code safety scan failed (${String(e)}). Installation continues; run "openclaw security audit --deep" after install.`)}let F=await y({baseDir:n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`),id:T,invalidNameMessage:`invalid plugin name: path traversal detected`,boundaryLabel:`extensions directory`});if(!F.ok)return{ok:!1,error:F.error};let I=F.targetDir,L=await S({mode:c,targetDir:I,alreadyExistsError:`plugin already exists: ${I} (delete it first)`});if(!L.ok)return L;if(f)return{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v};let R=m.dependencies??{},z=Object.keys(R).length>0,B=await h({sourceDir:n.packageDir,targetDir:I,mode:c,timeoutMs:s,logger:a,copyErrorPrefix:`failed to copy plugin`,hasDeps:z,depsLogMessage:`Installing plugin dependencies…`,afterCopy:async e=>{for(let t of v){let n=D.resolve(e,t);if(!r(e,n)){a.warn?.(`extension entry escapes plugin directory: ${t}`);continue}await u(n)||a.warn?.(`extension entry not found: ${t}`)}}});return B.ok?{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v}:B}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=e.mode??`install`,i=await v(e.archivePath);if(!i.ok)return i;let a=i.path;return await T({archivePath:a,tempDirPrefix:`openclaw-plugin-`,timeoutMs:n,logger:t,onExtracted:async i=>await z({packageDir:i,...I({extensionsDir:e.extensionsDir,timeoutMs:n,logger:t,mode:r,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId})})})}async function V(e){let n=t(e.dirPath);return await u(n)?(await O.stat(n)).isDirectory()?await z({packageDir:n,...I(e)}):{ok:!1,error:`not a directory: ${n}`}:{ok:!1,error:`directory not found: ${n}`}}async function H(n){let{logger:r,mode:i,dryRun:a}=C(n,A),o=t(n.filePath);if(!await u(o))return{ok:!1,error:`file not found: ${o}`};let s=n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`);await O.mkdir(s,{recursive:!0});let l=D.basename(o,D.extname(o))||`plugin`,d=M(l);if(d)return{ok:!1,error:d};let f=D.join(s,`${j(l)}${D.extname(o)}`),p=await S({mode:i,targetDir:f,alreadyExistsError:`plugin already exists: ${f} (delete it first)`});if(!p.ok)return p;if(a)return F(l,f);r.info?.(`Installing to ${f}…`);try{await c({rootDir:s,relativePath:D.basename(f),sourcePath:o})}catch(e){return{ok:!1,error:String(e)}}return F(l,f)}async function U(e){let{logger:t,timeoutMs:r,mode:i,dryRun:a}=g(e,A),o=e.expectedPluginId,s=e.spec.trim(),c=n(s);if(c)return{ok:!1,error:c,code:k.INVALID_NPM_SPEC};t.info?.(`Downloading ${s}…`);let l=w(await x({tempDirPrefix:`openclaw-npm-pack-`,spec:s,timeoutMs:r,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:{extensionsDir:e.extensionsDir,timeoutMs:r,logger:t,mode:i,dryRun:a,expectedPluginId:o}}));return!l.ok&&P(l.error)?{ok:!1,error:l.error,code:k.NPM_PACKAGE_NOT_FOUND}:l}async function W(e){let t=await b(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=I(e);return r.isDirectory()?await V({dirPath:n,...i}):m(n)?await B({archivePath:n,...i}):await H({filePath:n,...L(e)})}function G(e){let t=e.lookup.value.trim();if(t){if(e.lookup.kind===`pluginId`)return e.bundled.get(t);for(let n of e.bundled.values())if(n.npmSpec===t)return n}}function K(e){let t=a({workspaceDir:e.workspaceDir}),n=new Map;for(let e of t.candidates){if(e.origin!==`bundled`)continue;let t=o(e.rootDir,!1);if(!t.ok)continue;let r=t.manifest.id;if(n.has(r))continue;let i=e.packageManifest?.install?.npmSpec?.trim()||e.packageName?.trim()||void 0;n.set(r,{pluginId:r,localPath:e.rootDir,npmSpec:i})}return n}function q(e){return G({bundled:K({workspaceDir:e.workspaceDir}),lookup:e.lookup})}function J(e){return _(e)}function Y(e,t){let{pluginId:n,...r}=t,i={...e.plugins?.installs,[n]:{...e.plugins?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,plugins:{...e.plugins,installs:{...i,[n]:i[n]}}}}export{K as a,W as c,G as i,R as l,Y as n,k as o,q as r,U as s,J as t};
1
+ import{t as e,v as t}from"./utils-CGdo13HV.js";import{_ as n}from"./env-overrides-DHtB4kK3.js";import{n as r,t as i}from"./scan-paths-CWtvWW40.js";import{_ as a,b as o,x as s}from"./skills-CKTicUKS.js";import{S as c}from"./windows-spawn-7oINn5ao.js";import{a as l,c as u,l as d,n as f,r as p,u as m}from"./install-safe-path-C6kc_8NW.js";import{a as h,c as g,d as _,f as v,i as y,l as b,n as x,r as S,s as C,t as w,u as T}from"./npm-pack-install-C0te3Oap.js";import{t as E}from"./skill-scanner-CkxXNioD.js";import D from"node:path";import O from"node:fs/promises";const k={INVALID_NPM_SPEC:`invalid_npm_spec`,MISSING_OPENCLAW_EXTENSIONS:`missing_openclaw_extensions`,EMPTY_OPENCLAW_EXTENSIONS:`empty_openclaw_extensions`,NPM_PACKAGE_NOT_FOUND:`npm_package_not_found`,PLUGIN_ID_MISMATCH:`plugin_id_mismatch`},A={};function j(e){return p(e)}function M(e){return e?e===`.`||e===`..`?`invalid plugin name: reserved path segment`:e.includes(`/`)||e.includes(`\\`)?`invalid plugin name: path separators not allowed`:null:`invalid plugin name: missing`}function N(e){let t=s(e.manifest);return t.status===`missing`?{ok:!1,error:`package.json missing openclaw.extensions; update the plugin package to include openclaw.extensions (for example ["./dist/index.js"]). See https://docs.openclaw.ai/help/troubleshooting#plugin-install-fails-with-missing-openclaw-extensions`,code:k.MISSING_OPENCLAW_EXTENSIONS}:t.status===`empty`?{ok:!1,error:`package.json openclaw.extensions is empty`,code:k.EMPTY_OPENCLAW_EXTENSIONS}:{ok:!0,entries:t.entries}}function P(e){let t=e.trim();return t.startsWith(`Package not found on npm:`)?!0:/E404|404 not found|not in this registry/i.test(t)}function F(e,t){return{ok:!0,pluginId:e,targetDir:t,manifestName:void 0,version:void 0,extensions:[D.basename(t)]}}function I(e){return{extensionsDir:e.extensionsDir,timeoutMs:e.timeoutMs,logger:e.logger,mode:e.mode,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId}}function L(e){return{extensionsDir:e.extensionsDir,logger:e.logger,mode:e.mode,dryRun:e.dryRun}}function R(n,r){let i=r?t(r):D.join(e,`extensions`),a=M(n);if(a)throw Error(a);let o=f({baseDir:i,id:n,invalidNameMessage:`invalid plugin name: path traversal detected`});if(!o.ok)throw Error(o.error);return o.path}async function z(n){let{logger:a,timeoutMs:s,mode:c,dryRun:f}=g(n,A),p=D.join(n.packageDir,`package.json`);if(!await u(p))return{ok:!1,error:`extracted package missing package.json`};let m;try{m=await d(p)}catch(e){return{ok:!1,error:`invalid package.json: ${String(e)}`}}let _=N({manifest:m});if(!_.ok)return{ok:!1,error:_.error,code:_.code};let v=_.entries,b=typeof m.name==`string`?m.name:``,x=b?l(b):`plugin`,C=o(n.packageDir),w=C.ok&&C.manifest.id?l(C.manifest.id):void 0,T=w??x,O=M(T);if(O)return{ok:!1,error:O};if(n.expectedPluginId&&n.expectedPluginId!==T)return{ok:!1,error:`plugin id mismatch: expected ${n.expectedPluginId}, got ${T}`,code:k.PLUGIN_ID_MISMATCH};w&&w!==x&&a.info?.(`Plugin manifest id "${w}" differs from npm package name "${x}"; using manifest id as the config key.`);let j=D.resolve(n.packageDir),P=[];for(let e of v){let t=D.resolve(j,e);if(!r(j,t)){a.warn?.(`extension entry escapes plugin directory and will not be scanned: ${e}`);continue}i(e)&&a.warn?.(`extension entry is in a hidden/node_modules path and will receive targeted scan coverage: ${e}`),P.push(t)}try{let e=await E(n.packageDir,{includeFiles:P});if(e.critical>0){let t=e.findings.filter(e=>e.severity===`critical`).map(e=>`${e.message} (${e.file}:${e.line})`).join(`; `);a.warn?.(`WARNING: Plugin "${T}" contains dangerous code patterns: ${t}`)}else e.warn>0&&a.warn?.(`Plugin "${T}" has ${e.warn} suspicious code pattern(s). Run "openclaw security audit --deep" for details.`)}catch(e){a.warn?.(`Plugin "${T}" code safety scan failed (${String(e)}). Installation continues; run "openclaw security audit --deep" after install.`)}let F=await y({baseDir:n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`),id:T,invalidNameMessage:`invalid plugin name: path traversal detected`,boundaryLabel:`extensions directory`});if(!F.ok)return{ok:!1,error:F.error};let I=F.targetDir,L=await S({mode:c,targetDir:I,alreadyExistsError:`plugin already exists: ${I} (delete it first)`});if(!L.ok)return L;if(f)return{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v};let R=m.dependencies??{},z=Object.keys(R).length>0,B=await h({sourceDir:n.packageDir,targetDir:I,mode:c,timeoutMs:s,logger:a,copyErrorPrefix:`failed to copy plugin`,hasDeps:z,depsLogMessage:`Installing plugin dependencies…`,afterCopy:async e=>{for(let t of v){let n=D.resolve(e,t);if(!r(e,n)){a.warn?.(`extension entry escapes plugin directory: ${t}`);continue}await u(n)||a.warn?.(`extension entry not found: ${t}`)}}});return B.ok?{ok:!0,pluginId:T,targetDir:I,manifestName:b||void 0,version:typeof m.version==`string`?m.version:void 0,extensions:v}:B}async function B(e){let t=e.logger??A,n=e.timeoutMs??12e4,r=e.mode??`install`,i=await v(e.archivePath);if(!i.ok)return i;let a=i.path;return await T({archivePath:a,tempDirPrefix:`openclaw-plugin-`,timeoutMs:n,logger:t,onExtracted:async i=>await z({packageDir:i,...I({extensionsDir:e.extensionsDir,timeoutMs:n,logger:t,mode:r,dryRun:e.dryRun,expectedPluginId:e.expectedPluginId})})})}async function V(e){let n=t(e.dirPath);return await u(n)?(await O.stat(n)).isDirectory()?await z({packageDir:n,...I(e)}):{ok:!1,error:`not a directory: ${n}`}:{ok:!1,error:`directory not found: ${n}`}}async function H(n){let{logger:r,mode:i,dryRun:a}=C(n,A),o=t(n.filePath);if(!await u(o))return{ok:!1,error:`file not found: ${o}`};let s=n.extensionsDir?t(n.extensionsDir):D.join(e,`extensions`);await O.mkdir(s,{recursive:!0});let l=D.basename(o,D.extname(o))||`plugin`,d=M(l);if(d)return{ok:!1,error:d};let f=D.join(s,`${j(l)}${D.extname(o)}`),p=await S({mode:i,targetDir:f,alreadyExistsError:`plugin already exists: ${f} (delete it first)`});if(!p.ok)return p;if(a)return F(l,f);r.info?.(`Installing to ${f}…`);try{await c({rootDir:s,relativePath:D.basename(f),sourcePath:o})}catch(e){return{ok:!1,error:String(e)}}return F(l,f)}async function U(e){let{logger:t,timeoutMs:r,mode:i,dryRun:a}=g(e,A),o=e.expectedPluginId,s=e.spec.trim(),c=n(s);if(c)return{ok:!1,error:c,code:k.INVALID_NPM_SPEC};t.info?.(`Downloading ${s}…`);let l=w(await x({tempDirPrefix:`openclaw-npm-pack-`,spec:s,timeoutMs:r,expectedIntegrity:e.expectedIntegrity,onIntegrityDrift:e.onIntegrityDrift,warn:e=>{t.warn?.(e)},installFromArchive:B,archiveInstallParams:{extensionsDir:e.extensionsDir,timeoutMs:r,logger:t,mode:i,dryRun:a,expectedPluginId:o}}));return!l.ok&&P(l.error)?{ok:!1,error:l.error,code:k.NPM_PACKAGE_NOT_FOUND}:l}async function W(e){let t=await b(e.path);if(!t.ok)return t;let{resolvedPath:n,stat:r}=t,i=I(e);return r.isDirectory()?await V({dirPath:n,...i}):m(n)?await B({archivePath:n,...i}):await H({filePath:n,...L(e)})}function G(e){let t=e.lookup.value.trim();if(t){if(e.lookup.kind===`pluginId`)return e.bundled.get(t);for(let n of e.bundled.values())if(n.npmSpec===t)return n}}function K(e){let t=a({workspaceDir:e.workspaceDir}),n=new Map;for(let e of t.candidates){if(e.origin!==`bundled`)continue;let t=o(e.rootDir,!1);if(!t.ok)continue;let r=t.manifest.id;if(n.has(r))continue;let i=e.packageManifest?.install?.npmSpec?.trim()||e.packageName?.trim()||void 0;n.set(r,{pluginId:r,localPath:e.rootDir,npmSpec:i})}return n}function q(e){return G({bundled:K({workspaceDir:e.workspaceDir}),lookup:e.lookup})}function J(e){return _(e)}function Y(e,t){let{pluginId:n,...r}=t,i={...e.plugins?.installs,[n]:{...e.plugins?.installs?.[n],...r,installedAt:r.installedAt??new Date().toISOString()}};return{...e,plugins:{...e.plugins,installs:{...i,[n]:i[n]}}}}export{K as a,W as c,G as i,R as l,Y as n,k as o,q as r,U as s,J as t};