@qqbrowser/openclaw-qbot 0.0.139 → 0.0.142

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 (1565) hide show
  1. package/dist/account-lookup-CW-_CL7y.js +1 -0
  2. package/dist/acp-cli-BaslDuk6.js +1 -0
  3. package/dist/acp-cli-f5-uI85a.js +1 -0
  4. package/dist/active-listener-Cce5tcPa.js +1 -0
  5. package/dist/active-listener-D8VOdVx3.js +1 -0
  6. package/dist/active-listener-DeKRt_UV.js +1 -0
  7. package/dist/active-listener-Dle9QX40.js +1 -0
  8. package/dist/agent-scope-DAWJwFfl.js +1 -0
  9. package/dist/agent-scope-DXZc3eNT.js +1 -0
  10. package/dist/agents-Bpp_F5In.js +1 -0
  11. package/dist/agents.config-B6LRG9eP.js +1 -0
  12. package/dist/agents.config-DfIJAGcd.js +1 -0
  13. package/dist/allow-from-B6dI7oz8.js +1 -0
  14. package/dist/allow-from-DEeVIPKS.js +1 -0
  15. package/dist/api-BeG0ObSq.js +1 -0
  16. package/dist/api-Dx8x1KTs.js +1 -0
  17. package/dist/api-key-rotation-BRt-vnRV.js +1 -0
  18. package/dist/api-key-rotation-CCH1wYVU.js +1 -0
  19. package/dist/api-key-rotation-D0QU-kQ9.js +1 -0
  20. package/dist/api-key-rotation-Di6QgXx7.js +1 -0
  21. package/dist/arg-split-BOqSMBuf.js +1 -0
  22. package/dist/arg-split-DE5RqDHq.js +1 -0
  23. package/dist/audio-preflight-B5o7P9qi.js +1 -0
  24. package/dist/audio-preflight-CxD7VCHW.js +1 -0
  25. package/dist/audio-preflight-DKSCBKRb.js +1 -0
  26. package/dist/audio-preflight-Dpk8-Bmk.js +1 -0
  27. package/dist/audio-transcription-runner-Bd1OZC6K.js +1 -0
  28. package/dist/audio-transcription-runner-D4Bp6MM7.js +1 -0
  29. package/dist/audio-transcription-runner-DPwmBYQj.js +1 -0
  30. package/dist/audio-transcription-runner-DSr6OIz1.js +1 -0
  31. package/dist/audit-C7RP7G_g.js +1 -0
  32. package/dist/audit-jkdcAUep.js +1 -0
  33. package/dist/audit-membership-runtime-BpRsMj5-.js +1 -0
  34. package/dist/audit-membership-runtime-BsfLZNBj.js +1 -0
  35. package/dist/audit-membership-runtime-DRHirRmx.js +1 -0
  36. package/dist/audit-membership-runtime-g0dEWJTp.js +1 -0
  37. package/dist/audit-membership-runtime-kdyToskD.js +1 -0
  38. package/dist/auth-choice-B7LSoXZ_.js +1 -0
  39. package/dist/auth-choice-CxMH4c-u.js +1 -0
  40. package/dist/auth-choice-DvTApGhx.js +1 -0
  41. package/dist/auth-choice-EQdNd7jO.js +1 -0
  42. package/dist/auth-choice-options-B3WQyS7I.js +1 -0
  43. package/dist/auth-choice-options-Dw14noox.js +1 -0
  44. package/dist/auth-choice-prompt-uegl56cf.js +1 -0
  45. package/dist/auth-choice-prompt-xYj13czb.js +1 -0
  46. package/dist/auth-choice.apply-helpers-B7S-PcH_.js +1 -0
  47. package/dist/auth-choice.apply-helpers-gaL-oSft.js +1 -0
  48. package/dist/auth-profiles-T8DuH3ax.js +1 -0
  49. package/dist/auth-token-9OTF1FmL.js +1 -0
  50. package/dist/auth-token-kGltuM6S.js +1 -0
  51. package/dist/banner-9u45RL26.js +1 -0
  52. package/dist/bonjour-discovery-CFZXPega.js +1 -0
  53. package/dist/bonjour-discovery-CjivQOxi.js +1 -0
  54. package/dist/boolean-Ch3DfXPy.js +1 -0
  55. package/dist/boolean-D15s2V33.js +1 -0
  56. package/dist/boolean-DypnRoRK.js +1 -0
  57. package/dist/brew-COcDl8CB.js +1 -0
  58. package/dist/brew-DDPm_HfE.js +1 -0
  59. package/dist/browser-cli-DQHE2iPY.js +1 -0
  60. package/dist/browser-cli-Dt0ds-an.js +1 -0
  61. package/dist/build-info.json +3 -3
  62. package/dist/bundled/boot-md/handler.js +1 -0
  63. package/dist/bundled/bootstrap-extra-files/handler.js +1 -0
  64. package/dist/bundled/command-logger/handler.js +1 -0
  65. package/dist/bundled/session-memory/handler.js +1 -0
  66. package/dist/call-B8Fb4_oh.js +1 -0
  67. package/dist/call-CqoMqP5b.js +1 -0
  68. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  69. package/dist/canvas-host/a2ui/a2ui.bundle.js +1705 -2
  70. package/dist/channel-account-context-BMPAMZEv.js +1 -0
  71. package/dist/channel-account-context-DAcarnqW.js +1 -0
  72. package/dist/channel-activity-B04WbrrK.js +1 -0
  73. package/dist/channel-activity-BBrgoad1.js +1 -0
  74. package/dist/channel-activity-CgbOWaay.js +1 -0
  75. package/dist/channel-activity-YIMhOAUo.js +1 -0
  76. package/dist/channel-activity-YjYNzCpJ.js +1 -0
  77. package/dist/channel-options-CEIzjOno.js +1 -0
  78. package/dist/channel-options-D2syI791.js +1 -0
  79. package/dist/channel-selection-BBeE1TmB.js +1 -0
  80. package/dist/channel-selection-CbNtbAEf.js +1 -0
  81. package/dist/channel-web-BrElpZAc.js +1 -0
  82. package/dist/channel-web-CxHbET4B.js +1 -0
  83. package/dist/channels/plugins/actions/discord.js +1 -0
  84. package/dist/channels/plugins/actions/signal.js +1 -0
  85. package/dist/channels/plugins/actions/telegram.js +1 -0
  86. package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -0
  87. package/dist/channels-cli-BmAJuuRs.js +1 -0
  88. package/dist/channels-cli-Dgosczr6.js +1 -0
  89. package/dist/channels-status-issues-8eFrGKyf.js +1 -0
  90. package/dist/channels-status-issues-PRgOT90w.js +1 -0
  91. package/dist/chat-envelope-Bznn2SoS.js +1 -0
  92. package/dist/chat-envelope-HVpKusFc.js +1 -0
  93. package/dist/clack-prompter-DBPdGdqp.js +1 -0
  94. package/dist/clack-prompter-Dq0aY6iM.js +1 -0
  95. package/dist/clawbot-cli-CgS7TkEx.js +1 -0
  96. package/dist/clawbot-cli-DZ2K0OTk.js +1 -0
  97. package/dist/cleanup-utils-BWm70DoD.js +1 -0
  98. package/dist/cleanup-utils-D-RhEX6F.js +1 -0
  99. package/dist/cli-BcnoCo4z.js +1 -0
  100. package/dist/cli-D8T2tphD.js +1 -0
  101. package/dist/cli-utils-BY7dLMFy.js +1 -0
  102. package/dist/cli-utils-BleB1eys.js +1 -0
  103. package/dist/clipboard-Bk8cviBt.js +1 -0
  104. package/dist/clipboard-CKT_VIkG.js +1 -0
  105. package/dist/cmd-argv-BBT5l8AV.js +1 -0
  106. package/dist/cmd-argv-Bh-KpaZ0.js +1 -0
  107. package/dist/command-format-BbDT1tlm.js +1 -0
  108. package/dist/command-format-CLxIPuLR.js +1 -0
  109. package/dist/command-options-BpOUDl2S.js +1 -0
  110. package/dist/command-options-Bq5nQxz6.js +1 -0
  111. package/dist/command-poll-backoff-BZLHYB2k.js +1 -0
  112. package/dist/command-poll-backoff-Cww_r-24.js +1 -0
  113. package/dist/command-poll-backoff-Df6cOQrX.js +1 -0
  114. package/dist/command-poll-backoff-endAPdwn.js +1 -0
  115. package/dist/command-registry-CfuXCRwV.js +1 -0
  116. package/dist/command-secret-targets-BVN3kiT9.js +1 -0
  117. package/dist/command-secret-targets-BlN-J_fA.js +1 -0
  118. package/dist/commands-CGpM84iR.js +1 -0
  119. package/dist/commands-Dy7duWlt.js +1 -0
  120. package/dist/commands-registry-B1x54ukc.js +1 -0
  121. package/dist/commands-registry-Cpl4QnG4.js +1 -0
  122. package/dist/commands-registry-D40KqYOm.js +1 -0
  123. package/dist/commands-registry-SeddSmFK.js +1 -0
  124. package/dist/compact-Dg66DXx_.js +1 -0
  125. package/dist/completion-cli-BZi4nuQb.js +1 -0
  126. package/dist/completion-cli-C40TWdsv.js +1 -0
  127. package/dist/config-BqW5S1xL.js +1 -0
  128. package/dist/config-D12ZLKqh.js +1 -0
  129. package/dist/config-cli-1ojSLwAj.js +1 -0
  130. package/dist/config-cli-CBte2b1h.js +1 -0
  131. package/dist/config-guard-BTNXbWoO.js +1 -0
  132. package/dist/config-guard-sYYx9zEF.js +1 -0
  133. package/dist/config-validation-C1La_IZU.js +1 -0
  134. package/dist/config-validation-DviYxW8Y.js +1 -0
  135. package/dist/configure-DJrNDEpR.js +1 -0
  136. package/dist/configure-kod4tmZa.js +1 -0
  137. package/dist/connection-auth-B_Uk6Vk8.js +1 -0
  138. package/dist/connection-auth-C8iru0UB.js +1 -0
  139. package/dist/context-window-guard-7crlatf9.js +1 -0
  140. package/dist/context-window-guard-CPChk363.js +1 -0
  141. package/dist/control-ui-assets-BIa0GGDg.js +1 -0
  142. package/dist/control-ui-assets-CTHGGgaX.js +1 -0
  143. package/dist/cron-cli-Dha16Lo-.js +1 -0
  144. package/dist/cron-cli-QHS2pKZ_.js +1 -0
  145. package/dist/daemon-cli-BuXTzSnU.js +1 -0
  146. package/dist/daemon-cli-DOTKuS7d.js +1 -0
  147. package/dist/daemon-cli.js +1 -0
  148. package/dist/daemon-install-C30rBssi.js +1 -0
  149. package/dist/daemon-install-HrqlOCrc.js +1 -0
  150. package/dist/daemon-install-plan.shared-CfA37Ut_.js +1 -0
  151. package/dist/daemon-install-plan.shared-Dx3DBXCG.js +1 -0
  152. package/dist/daemon-runtime-DHiDbRuC.js +1 -0
  153. package/dist/daemon-runtime-VcpeBRJV.js +1 -0
  154. package/dist/dangerous-name-matching-BOmvAibz.js +1 -0
  155. package/dist/dangerous-name-matching-DtllRqBD.js +1 -0
  156. package/dist/dangerous-tools-CFRYQJ6V.js +1 -0
  157. package/dist/dangerous-tools-oYCu5wfC.js +1 -0
  158. package/dist/deliver-56mQkDw3.js +1 -0
  159. package/dist/deliver-BFQ4Zx9z.js +1 -0
  160. package/dist/deliver-BHuhHfkH.js +1 -0
  161. package/dist/deliver-ClBkV2eD.js +1 -0
  162. package/dist/delivery-queue-CKbauSFq.js +1 -0
  163. package/dist/delivery-queue-nkPJu0fY.js +1 -0
  164. package/dist/device-pairing-CTFpaTrD.js +1 -0
  165. package/dist/device-pairing-QTK0dod3.js +1 -0
  166. package/dist/devices-cli-Ckxd0k0I.js +1 -0
  167. package/dist/devices-cli-Db36mBHq.js +1 -0
  168. package/dist/diagnostic-BrE4lMIf.js +1 -0
  169. package/dist/diagnostic-CDxNevIQ.js +1 -0
  170. package/dist/diagnostic-DOzHPnht.js +1 -0
  171. package/dist/diagnostic-DQq4Bwrs.js +1 -0
  172. package/dist/diagnostics-BgbeL9KE.js +1 -0
  173. package/dist/diagnostics-Cdctg9K_.js +1 -0
  174. package/dist/directory-cli-DDTaUkjW.js +1 -0
  175. package/dist/directory-cli-_gTFSHMW.js +1 -0
  176. package/dist/dns-cli--4PwtR2Y.js +1 -0
  177. package/dist/dns-cli-C4DwKquN.js +1 -0
  178. package/dist/docs-cli-Cdw9Iz9a.js +1 -0
  179. package/dist/docs-cli-ClD2UyX1.js +1 -0
  180. package/dist/doctor-completion-BJ6steqx.js +1 -0
  181. package/dist/doctor-completion-DMJhfrtC.js +1 -0
  182. package/dist/doctor-config-flow-D4F3mz4h.js +1 -0
  183. package/dist/doctor-config-flow-DnOyVZhQ.js +1 -0
  184. package/dist/enable-BhD84GhD.js +1 -0
  185. package/dist/enable-Ccf9wSM8.js +1 -0
  186. package/dist/entry-status-CCwwKO43.js +1 -0
  187. package/dist/entry-status-CoXkbJcX.js +1 -0
  188. package/dist/entry.js +1 -0
  189. package/dist/env-D7wNuBx1.js +1 -0
  190. package/dist/env-overrides-DHtB4kK3.js +1 -0
  191. package/dist/env-overrides-DXJbFrwI.js +1 -0
  192. package/dist/errors-6SQWM9dj.js +1 -0
  193. package/dist/errors-Bunti32V.js +1 -0
  194. package/dist/exec-B3eleY5O.js +1 -0
  195. package/dist/exec-DHqLtFYt.js +1 -0
  196. package/dist/exec-approvals-BXO9Cezj.js +1 -0
  197. package/dist/exec-approvals-BpBNEy6i.js +1 -0
  198. package/dist/exec-approvals-allowlist-CE3nYh0K.js +1 -0
  199. package/dist/exec-approvals-allowlist-D8mN7nxV.js +1 -0
  200. package/dist/exec-approvals-cli-CUcuN63y.js +1 -0
  201. package/dist/exec-approvals-cli-CxUGD08t.js +1 -0
  202. package/dist/exec-safe-bin-runtime-policy-Dt0GchLp.js +1 -0
  203. package/dist/exec-safe-bin-runtime-policy-dcCS_Adf.js +1 -0
  204. package/dist/fetch-B9tORjG8.js +1 -0
  205. package/dist/fetch-BJT3BrkJ.js +1 -0
  206. package/dist/fetch-B_wRifvZ.js +1 -0
  207. package/dist/fetch-Bn0mWg6a.js +1 -0
  208. package/dist/fetch-CQaNr5J1.js +1 -0
  209. package/dist/fetch-Ce-scEU-.js +1 -0
  210. package/dist/fetch-D0rZDHKO.js +1 -0
  211. package/dist/fetch-DHo17YmK.js +1 -0
  212. package/dist/fetch-Dh-apy46.js +1 -0
  213. package/dist/fetch-Dikjvc5M.js +1 -0
  214. package/dist/fetch-DsjPfQlp.js +1 -0
  215. package/dist/fetch-_g8lZ8K8.js +1 -0
  216. package/dist/fetch-guard-BrTtJw7h.js +1 -0
  217. package/dist/fetch-guard-D10s0raB.js +1 -0
  218. package/dist/fetch-guard-DPdY0NXR.js +1 -0
  219. package/dist/fetch-guard-cu7DGSRF.js +1 -0
  220. package/dist/fetch-hy0JKSsm.js +1 -0
  221. package/dist/fetch-timeout-CdYxWG9w.js +1 -0
  222. package/dist/fetch-timeout-Cj8_oAls.js +1 -0
  223. package/dist/fetch-timeout-DoOI_izT.js +1 -0
  224. package/dist/fetch-timeout-u8g99Ax0.js +1 -0
  225. package/dist/format-Bn1bwJKX.js +1 -0
  226. package/dist/format-Ce7I7s-k.js +1 -0
  227. package/dist/format-duration-C8AzNqKh.js +1 -0
  228. package/dist/format-duration-D5AMtmHa.js +1 -0
  229. package/dist/format-relative-B9pSIdGe.js +1 -0
  230. package/dist/format-relative-DkMjYy7z.js +1 -0
  231. package/dist/frontmatter-BkZkwkVO.js +1 -0
  232. package/dist/frontmatter-C7mzDNxd.js +1 -0
  233. package/dist/frontmatter-CzpfPBFl.js +1 -0
  234. package/dist/gateway-cli-CKu0FA7D.js +1 -0
  235. package/dist/gateway-cli-C_s9eMlC.js +1 -0
  236. package/dist/gateway-install-token-BCnuZeh1.js +1 -0
  237. package/dist/gateway-install-token-DiDvDPJQ.js +1 -0
  238. package/dist/gateway-rpc-iFvDyHYd.js +1 -0
  239. package/dist/gateway-rpc-tEEvY0kH.js +1 -0
  240. package/dist/github-copilot-token-C79yeDKS.js +1 -0
  241. package/dist/github-copilot-token-DGYAlOmV.js +1 -0
  242. package/dist/github-copilot-token-DePP-lIf.js +1 -0
  243. package/dist/github-copilot-token-wm6mbypz.js +1 -0
  244. package/dist/gmail-setup-utils-CYOH3zzx.js +1 -0
  245. package/dist/gmail-setup-utils-S-MyEGuj.js +1 -0
  246. package/dist/group-access-BHKVOhrj.js +1 -0
  247. package/dist/group-access-D2DOYMfr.js +1 -0
  248. package/dist/health-BgOggK9k.js +1 -0
  249. package/dist/health-PaRHFItm.js +1 -0
  250. package/dist/health-format-B1nj3Wfn.js +1 -0
  251. package/dist/health-format-VBr6LEpt.js +1 -0
  252. package/dist/heartbeat-visibility-BQ_esv2m.js +1 -0
  253. package/dist/heartbeat-visibility-q74UdY8O.js +1 -0
  254. package/dist/help-format-B4aEI7V9.js +1 -0
  255. package/dist/help-format-BRbF_INg.js +1 -0
  256. package/dist/helpers-COz1ghcB.js +1 -0
  257. package/dist/helpers-Cp8gcO6u.js +1 -0
  258. package/dist/hooks-cli-BzyzTNBx.js +1 -0
  259. package/dist/hooks-cli-CsBrScq0.js +1 -0
  260. package/dist/hooks-status-BHt-Xvh4.js +1 -0
  261. package/dist/hooks-status-CRJ4J0ZW.js +1 -0
  262. package/dist/image-BkWwI54C.js +1 -0
  263. package/dist/image-CcVQg-YN.js +1 -0
  264. package/dist/image-Cm1RUBqD.js +1 -0
  265. package/dist/image-DsoO5VP5.js +1 -0
  266. package/dist/index.js +1 -0
  267. package/dist/inspect-BKV-I1UE.js +1 -0
  268. package/dist/inspect-z59cgmYc.js +1 -0
  269. package/dist/install-safe-path-C6kc_8NW.js +1 -0
  270. package/dist/install-safe-path-iesxijn2.js +1 -0
  271. package/dist/installs-BNeI_oML.js +1 -0
  272. package/dist/installs-C1xQLuby.js +1 -0
  273. package/dist/ipv4-BOuNtoGn.js +1 -0
  274. package/dist/ipv4-CWdaEiVH.js +1 -0
  275. package/dist/ir-BF0M2kGp.js +1 -0
  276. package/dist/ir-D8Hh84ab.js +1 -0
  277. package/dist/ir-DBWscfBd.js +1 -0
  278. package/dist/ir-Dk7OQ4bA.js +1 -0
  279. package/dist/is-main-DG5ueqhF.js +1 -0
  280. package/dist/issue-format-BT7cQEt3.js +1 -0
  281. package/dist/issue-format-C_lNzrKa.js +1 -0
  282. package/dist/kill-tree-B3g7HrAO.js +1 -0
  283. package/dist/lifecycle-core-D9KNCvxY.js +1 -0
  284. package/dist/lifecycle-core-LM5UUUB1.js +1 -0
  285. package/dist/line/accounts.js +1 -0
  286. package/dist/line/send.js +1 -0
  287. package/dist/line/template-messages.js +1 -0
  288. package/dist/links-CBnmRP9D.js +1 -0
  289. package/dist/links-CySwdMcF.js +1 -0
  290. package/dist/llm-slug-generator.js +1 -0
  291. package/dist/load-options-BsOW74dp.js +1 -0
  292. package/dist/load-options-C7dLuybp.js +1 -0
  293. package/dist/load-options-DV4j6Aqb.js +1 -0
  294. package/dist/load-options-Dwt0CeEg.js +1 -0
  295. package/dist/local-roots-6waH0SZ0.js +1 -0
  296. package/dist/logger-5W0OocJW.js +1 -0
  297. package/dist/logger-Bl8URnrW.js +1 -0
  298. package/dist/logger-DwWqfo66.js +1 -0
  299. package/dist/logger-kQAOe3qp.js +1 -0
  300. package/dist/logging-Dqe9dxSX.js +1 -0
  301. package/dist/logging-tYw1NbJd.js +1 -0
  302. package/dist/login-BOlqRyr0.js +1 -0
  303. package/dist/login-CkWesqf_.js +1 -0
  304. package/dist/login-Do_NA1Je.js +1 -0
  305. package/dist/login-op9S8yqv.js +1 -0
  306. package/dist/login-qr-B6rxvoTS.js +1 -0
  307. package/dist/login-qr-BGH9zmhw.js +1 -0
  308. package/dist/login-qr-CiENvgog.js +1 -0
  309. package/dist/login-qr-DsV-lxFd.js +1 -0
  310. package/dist/login-qr-QcDMg23y.js +1 -0
  311. package/dist/logs-cli-B4eUg_87.js +1 -0
  312. package/dist/logs-cli-BA3Aso8a.js +1 -0
  313. package/dist/manager-4Y9fRgdw.js +1 -0
  314. package/dist/manager-C2YW7Hkq.js +1 -0
  315. package/dist/manager-Dtd_loL8.js +1 -0
  316. package/dist/manager-M1GKhLUC.js +1 -0
  317. package/dist/memory-cli-XaxtBQm1.js +1 -0
  318. package/dist/memory-cli-jhzJ3as7.js +1 -0
  319. package/dist/model-catalog-C1kpjR75.js +1 -0
  320. package/dist/model-catalog-COVzoZD9.js +1 -0
  321. package/dist/model-param-b-B0r2cPDw.js +1 -0
  322. package/dist/model-param-b-BqIr5rY5.js +1 -0
  323. package/dist/model-picker-D3ZSpr0i.js +1 -0
  324. package/dist/model-picker-bZNuI66U.js +1 -0
  325. package/dist/model-selection-B5JsBS9D.js +1 -0
  326. package/dist/model-selection-BlC_rXAN.js +1 -0
  327. package/dist/model-selection-vfhBuN9O.js +1 -0
  328. package/dist/models-C_Vg3Cty.js +1 -0
  329. package/dist/models-cli-CDZliTXq.js +1 -0
  330. package/dist/models-cli-bGr8jwAb.js +1 -0
  331. package/dist/models-config-CdMhNxKV.js +1 -0
  332. package/dist/models-config-_htt7eY5.js +1 -0
  333. package/dist/mutable-allowlist-detectors-C4rNVag8.js +1 -0
  334. package/dist/mutable-allowlist-detectors-CL0qe54J.js +1 -0
  335. package/dist/node-cli-5lYbDZ70.js +1 -0
  336. package/dist/node-cli-Br04Qmqo.js +1 -0
  337. package/dist/node-command-policy-CejeQemH.js +1 -0
  338. package/dist/node-command-policy-CqXhdnHh.js +1 -0
  339. package/dist/node-commands-8GBOiktk.js +1 -0
  340. package/dist/node-commands-DdkziOTx.js +1 -0
  341. package/dist/node-resolve-B3BJbmQX.js +1 -0
  342. package/dist/node-resolve-DLZf3-1V.js +1 -0
  343. package/dist/node-service-BRfrNp8l.js +1 -0
  344. package/dist/node-service-C0bl7jcZ.js +1 -0
  345. package/dist/node-shell-DyOfwHrh.js +1 -0
  346. package/dist/nodes-cli-8By8--bW.js +1 -0
  347. package/dist/nodes-cli-zq41EwJN.js +1 -0
  348. package/dist/nodes-screen-DECgxo6A.js +1 -0
  349. package/dist/note-D4GAwgha.js +1 -0
  350. package/dist/note-Dp-d_utk.js +1 -0
  351. package/dist/npm-pack-install-B23L-AtF.js +1 -0
  352. package/dist/npm-pack-install-C0te3Oap.js +1 -0
  353. package/dist/npm-resolution-BnJGLwhi.js +1 -0
  354. package/dist/npm-resolution-DWPloph4.js +1 -0
  355. package/dist/oauth-env-DAamJ1oz.js +1 -0
  356. package/dist/oauth-env-DSLBTWb1.js +1 -0
  357. package/dist/oauth-tls-preflight-BSBRDIfC.js +1 -0
  358. package/dist/oauth-tls-preflight-ByNjbUR5.js +1 -0
  359. package/dist/ollama-setup-BMEKWyIE.js +1 -0
  360. package/dist/ollama-setup-DlwS6Gl-.js +1 -0
  361. package/dist/onboard-B0BNCQaO.js +1 -0
  362. package/dist/onboard-CjVhdaiR.js +1 -0
  363. package/dist/onboard-channels-BMIOddLN.js +1 -0
  364. package/dist/onboard-channels-CZK_7xMR.js +1 -0
  365. package/dist/onboard-config-B7U20YRw.js +1 -0
  366. package/dist/onboard-config-DS9dUv8M.js +1 -0
  367. package/dist/onboard-custom-B03SlEHB.js +1 -0
  368. package/dist/onboard-custom-Bl0y8c-g.js +1 -0
  369. package/dist/onboard-helpers-PGl5bVPE.js +1 -0
  370. package/dist/onboard-helpers-zwybUJWu.js +1 -0
  371. package/dist/onboard-hooks-CERzXObm.js +1 -0
  372. package/dist/onboard-hooks-gQ3sxBNi.js +1 -0
  373. package/dist/onboard-provider-auth-flags-CqbipO7D.js +1 -0
  374. package/dist/onboard-provider-auth-flags-Dvwzdz37.js +1 -0
  375. package/dist/onboard-remote-BOpIRdDu.js +1 -0
  376. package/dist/onboard-remote-DPU-H_2O.js +1 -0
  377. package/dist/onboard-search-f2tJD4hg.js +1 -0
  378. package/dist/onboard-search-fslKKhyg.js +1 -0
  379. package/dist/onboard-skills-BMAJs6ly.js +1 -0
  380. package/dist/onboard-skills-CMSQc2Mm.js +1 -0
  381. package/dist/onboarding-B6ixWwgp.js +1 -0
  382. package/dist/onboarding-ouEqUuUr.js +1 -0
  383. package/dist/onboarding.finalize-Bgat5Npc.js +1 -0
  384. package/dist/onboarding.finalize-DsMVlTcH.js +1 -0
  385. package/dist/onboarding.gateway-config-BtLDJWJ2.js +1 -0
  386. package/dist/onboarding.gateway-config-y3pqsL9i.js +1 -0
  387. package/dist/onboarding.secret-input-BsBgh8Tc.js +1 -0
  388. package/dist/onboarding.secret-input-kO5OzYC7.js +1 -0
  389. package/dist/openai-codex-model-default-DuE2_wN7.js +1 -0
  390. package/dist/openai-codex-model-default-yVfRw-Mm.js +1 -0
  391. package/dist/openai-model-default-Bl8MHPb6.js +1 -0
  392. package/dist/openai-model-default-DJObMvLJ.js +1 -0
  393. package/dist/openclaw-exec-env-BWbOu_YC.js +1 -0
  394. package/dist/openclaw-root-CnsBf6ZU.js +1 -0
  395. package/dist/openclaw-root-D_0Q6--h.js +1 -0
  396. package/dist/outbound-BOSIEiEY.js +1 -0
  397. package/dist/outbound-BtUeDLjU.js +1 -0
  398. package/dist/outbound-Bx2Z2aYK.js +1 -0
  399. package/dist/outbound-Bz8bbrMI.js +1 -0
  400. package/dist/outbound-attachment-B7wMxwj6.js +1 -0
  401. package/dist/outbound-attachment-BgAe99RM.js +1 -0
  402. package/dist/outbound-attachment-Dds8xirj.js +1 -0
  403. package/dist/outbound-attachment-DqEKghQp.js +1 -0
  404. package/dist/pairing-cli-Bya9M-I_.js +1 -0
  405. package/dist/pairing-cli-D2JEhufv.js +1 -0
  406. package/dist/pairing-labels-BUU_-70B.js +1 -0
  407. package/dist/pairing-labels-D-kzQEL2.js +1 -0
  408. package/dist/pairing-store-BH-FTYkn.js +1 -0
  409. package/dist/pairing-store-Cg2UxreQ.js +1 -0
  410. package/dist/pairing-token-BjYBuREl.js +1 -0
  411. package/dist/pairing-token-DAR7V7FJ.js +1 -0
  412. package/dist/parse-duration-XTjMKl8s.js +1 -0
  413. package/dist/parse-finite-number-DqzUM-_s.js +1 -0
  414. package/dist/parse-finite-number-dBmDLLKL.js +1 -0
  415. package/dist/parse-log-line-CsYLg7Qu.js +1 -0
  416. package/dist/parse-log-line-NV-cipB_.js +1 -0
  417. package/dist/parse-port-Bv1Y9Wk5.js +1 -0
  418. package/dist/parse-port-JVwkxcZ8.js +1 -0
  419. package/dist/parse-timeout-DWSGfCkQ.js +1 -0
  420. package/dist/parse-timeout-Dx4QnVzo.js +1 -0
  421. package/dist/path-alias-guards-kY_ZbWs-.js +1 -0
  422. package/dist/path-alias-guards-mvyLCPlN.js +1 -0
  423. package/dist/path-env-BPd1Yd-i.js +1 -0
  424. package/dist/path-env-emdAQejM.js +1 -0
  425. package/dist/path-safety-BukYK8Kd.js +1 -0
  426. package/dist/path-safety-DaaMJFdt.js +1 -0
  427. package/dist/paths-B4IRk3wi.js +1 -0
  428. package/dist/paths-BfjJY2VL.js +1 -0
  429. package/dist/paths-BjD3T_xq.js +1 -0
  430. package/dist/paths-BpQOWYiT.js +1 -0
  431. package/dist/paths-CChBdtE8.js +1 -0
  432. package/dist/paths-CrCoPIVK.js +1 -0
  433. package/dist/paths-piJASC5k.js +1 -0
  434. package/dist/paths-yLEk_25I.js +1 -0
  435. package/dist/pi-embedded-BZSn84Bh.js +1 -0
  436. package/dist/pi-embedded-Dsz7p3MF.js +1 -0
  437. package/dist/pi-model-discovery-BbD1YJNx.js +1 -0
  438. package/dist/pi-model-discovery-CpjYoBQf.js +1 -0
  439. package/dist/pi-model-discovery-DeQdHV8O.js +1 -0
  440. package/dist/pi-model-discovery-Dps1PPWz.js +1 -0
  441. package/dist/pi-tools.before-tool-call.runtime-DseAq0gm.js +1 -0
  442. package/dist/pi-tools.before-tool-call.runtime-KKGILAuK.js +1 -0
  443. package/dist/pi-tools.before-tool-call.runtime-Pck2WdIO.js +1 -0
  444. package/dist/pi-tools.before-tool-call.runtime-ZzMJQ1BP.js +1 -0
  445. package/dist/pi-tools.policy-D40r0HmD.js +1 -0
  446. package/dist/plugin-auto-enable-DpVL6-ES.js +1 -0
  447. package/dist/plugin-auto-enable-NzmNh4oU.js +1 -0
  448. package/dist/plugin-install-plan-BobX0y9S.js +1 -0
  449. package/dist/plugin-install-plan-NvDGp0d8.js +1 -0
  450. package/dist/plugin-registry-C6dY-Et7.js +1 -0
  451. package/dist/plugin-registry-CIBiHZH1.js +1 -0
  452. package/dist/plugin-sdk/account-id.cjs +1 -0
  453. package/dist/plugin-sdk/account-id.js +1 -0
  454. package/dist/plugin-sdk/acpx.cjs +1 -0
  455. package/dist/plugin-sdk/acpx.js +1 -0
  456. package/dist/plugin-sdk/active-listener-BApFQlQn.js +1 -0
  457. package/dist/plugin-sdk/active-listener-BETopzG5.cjs +1 -0
  458. package/dist/plugin-sdk/active-listener-BEcmvyxh.cjs +1 -0
  459. package/dist/plugin-sdk/active-listener-BZPPbsNy.cjs +1 -0
  460. package/dist/plugin-sdk/active-listener-B_Mxemq7.cjs +1 -0
  461. package/dist/plugin-sdk/active-listener-BgW_qfd3.js +1 -0
  462. package/dist/plugin-sdk/active-listener-Coet66pF.cjs +1 -0
  463. package/dist/plugin-sdk/active-listener-CvML9qVF.js +1 -0
  464. package/dist/plugin-sdk/active-listener-DuO6KMXJ.js +1 -0
  465. package/dist/plugin-sdk/active-listener-DymzfmOG.cjs +1 -0
  466. package/dist/plugin-sdk/active-listener-ILBdBHMv.js +1 -0
  467. package/dist/plugin-sdk/active-listener-gRRIfN1q.js +1 -0
  468. package/dist/plugin-sdk/api-key-rotation-Bj1A9Slo.cjs +1 -0
  469. package/dist/plugin-sdk/api-key-rotation-CFPNzksf.cjs +1 -0
  470. package/dist/plugin-sdk/api-key-rotation-CXY0AyM1.js +1 -0
  471. package/dist/plugin-sdk/api-key-rotation-ClIwV8yq.js +1 -0
  472. package/dist/plugin-sdk/api-key-rotation-D5Nr1xl3.js +1 -0
  473. package/dist/plugin-sdk/api-key-rotation-DDCwA0KM.cjs +1 -0
  474. package/dist/plugin-sdk/api-key-rotation-DHMvXm70.cjs +1 -0
  475. package/dist/plugin-sdk/api-key-rotation-DaFFZfk5.js +1 -0
  476. package/dist/plugin-sdk/api-key-rotation-DcREl_0x.js +1 -0
  477. package/dist/plugin-sdk/api-key-rotation-X-5Fb7av.cjs +1 -0
  478. package/dist/plugin-sdk/api-key-rotation-_VfXYfHS.js +1 -0
  479. package/dist/plugin-sdk/api-key-rotation-wFUVOOfM.cjs +1 -0
  480. package/dist/plugin-sdk/audio-preflight-B1MP5_bc.cjs +1 -0
  481. package/dist/plugin-sdk/audio-preflight-BETx142T.cjs +1 -0
  482. package/dist/plugin-sdk/audio-preflight-BGRLhCLc.cjs +1 -0
  483. package/dist/plugin-sdk/audio-preflight-BNICfOY5.cjs +1 -0
  484. package/dist/plugin-sdk/audio-preflight-BV3Cav8M.js +1 -0
  485. package/dist/plugin-sdk/audio-preflight-BmO72Cqr.cjs +1 -0
  486. package/dist/plugin-sdk/audio-preflight-BpE8wFQc.js +1 -0
  487. package/dist/plugin-sdk/audio-preflight-CTAafaiH.js +1 -0
  488. package/dist/plugin-sdk/audio-preflight-D82aewIt.js +1 -0
  489. package/dist/plugin-sdk/audio-preflight-DmzxEaq3.cjs +1 -0
  490. package/dist/plugin-sdk/audio-preflight-DrSIYRnD.js +1 -0
  491. package/dist/plugin-sdk/audio-preflight-SZZoA2Ff.js +1 -0
  492. package/dist/plugin-sdk/audio-transcription-runner-B54MyF1_.js +1 -0
  493. package/dist/plugin-sdk/audio-transcription-runner-BIqM5H5q.js +1 -0
  494. package/dist/plugin-sdk/audio-transcription-runner-BLAxZL-U.js +1 -0
  495. package/dist/plugin-sdk/audio-transcription-runner-BVmaaA2k.js +1 -0
  496. package/dist/plugin-sdk/audio-transcription-runner-BdY-TMcc.js +1 -0
  497. package/dist/plugin-sdk/audio-transcription-runner-By3lSLub.cjs +1 -0
  498. package/dist/plugin-sdk/audio-transcription-runner-CH5CoZrF.cjs +1 -0
  499. package/dist/plugin-sdk/audio-transcription-runner-CMsp7bhn.cjs +1 -0
  500. package/dist/plugin-sdk/audio-transcription-runner-ClGibmMi.cjs +1 -0
  501. package/dist/plugin-sdk/audio-transcription-runner-QfEC19vE.cjs +1 -0
  502. package/dist/plugin-sdk/audio-transcription-runner-g7L0m-Z5.cjs +1 -0
  503. package/dist/plugin-sdk/audio-transcription-runner-pVTD93vq.js +1 -0
  504. package/dist/plugin-sdk/audit-membership-runtime-7LqcvqFo.js +1 -0
  505. package/dist/plugin-sdk/audit-membership-runtime-BQFUzFc0.cjs +1 -0
  506. package/dist/plugin-sdk/audit-membership-runtime-BYtdDX9G.cjs +1 -0
  507. package/dist/plugin-sdk/audit-membership-runtime-BzEtBUX6.cjs +1 -0
  508. package/dist/plugin-sdk/audit-membership-runtime-CBUmGrl4.js +1 -0
  509. package/dist/plugin-sdk/audit-membership-runtime-ChlVgt2y.js +1 -0
  510. package/dist/plugin-sdk/audit-membership-runtime-DLRX7LR0.js +1 -0
  511. package/dist/plugin-sdk/audit-membership-runtime-DbJW5X3L.cjs +1 -0
  512. package/dist/plugin-sdk/audit-membership-runtime-Du9LAxDa.cjs +1 -0
  513. package/dist/plugin-sdk/audit-membership-runtime-DylNnj1m.js +1 -0
  514. package/dist/plugin-sdk/audit-membership-runtime-voi5sPwF.js +1 -0
  515. package/dist/plugin-sdk/audit-membership-runtime-yWYvSpgZ.cjs +1 -0
  516. package/dist/plugin-sdk/bluebubbles.cjs +1 -0
  517. package/dist/plugin-sdk/bluebubbles.js +1 -0
  518. package/dist/plugin-sdk/channel-activity-BGK-Bj2_.cjs +1 -0
  519. package/dist/plugin-sdk/channel-activity-BRHvpV0C.js +1 -0
  520. package/dist/plugin-sdk/channel-activity-CKfWFchu.js +1 -0
  521. package/dist/plugin-sdk/channel-activity-CLUi31fX.cjs +1 -0
  522. package/dist/plugin-sdk/channel-activity-CVOp-PL4.cjs +1 -0
  523. package/dist/plugin-sdk/channel-activity-CgXnZ0GC.cjs +1 -0
  524. package/dist/plugin-sdk/channel-activity-CmYpOPAn.js +1 -0
  525. package/dist/plugin-sdk/channel-activity-CwaMf9qT.cjs +1 -0
  526. package/dist/plugin-sdk/channel-activity-D5D5tBWf.cjs +1 -0
  527. package/dist/plugin-sdk/channel-activity-D7tpmatp.js +1 -0
  528. package/dist/plugin-sdk/channel-activity-DpxSOlXF.js +1 -0
  529. package/dist/plugin-sdk/channel-activity-spvDzlTl.js +1 -0
  530. package/dist/plugin-sdk/channel-web-4ZQVqsrt.js +1 -0
  531. package/dist/plugin-sdk/channel-web-9zn1Itpg.cjs +1 -0
  532. package/dist/plugin-sdk/channel-web-BrB00HKH.js +1 -0
  533. package/dist/plugin-sdk/channel-web-DN5La-Ol.cjs +1 -0
  534. package/dist/plugin-sdk/command-poll-backoff-4910Mpwp.js +1 -0
  535. package/dist/plugin-sdk/command-poll-backoff-BLJZzV5W.cjs +1 -0
  536. package/dist/plugin-sdk/command-poll-backoff-CUNcN0dv.cjs +1 -0
  537. package/dist/plugin-sdk/command-poll-backoff-Cww_r-24.js +1 -0
  538. package/dist/plugin-sdk/command-poll-backoff-D0lJhquZ.js +1 -0
  539. package/dist/plugin-sdk/command-poll-backoff-Glwt3wHa.cjs +1 -0
  540. package/dist/plugin-sdk/commands-registry-5lStNoKW.cjs +1 -0
  541. package/dist/plugin-sdk/commands-registry-C8wnXqNa.cjs +1 -0
  542. package/dist/plugin-sdk/commands-registry-Cnr6PvIw.js +1 -0
  543. package/dist/plugin-sdk/commands-registry-CtYCWfuM.cjs +1 -0
  544. package/dist/plugin-sdk/commands-registry-D2gv242l.js +1 -0
  545. package/dist/plugin-sdk/commands-registry-DI2vPscP.js +1 -0
  546. package/dist/plugin-sdk/commands-registry-DcBvmwSU.js +1 -0
  547. package/dist/plugin-sdk/commands-registry-DkUhCIDk.cjs +1 -0
  548. package/dist/plugin-sdk/commands-registry-DsMbmie-.cjs +1 -0
  549. package/dist/plugin-sdk/commands-registry-MCsWR5Vf.js +1 -0
  550. package/dist/plugin-sdk/commands-registry-SHZVq_qf.cjs +1 -0
  551. package/dist/plugin-sdk/commands-registry-kRjFifgj.js +1 -0
  552. package/dist/plugin-sdk/common-B4iFXuoZ.cjs +1 -0
  553. package/dist/plugin-sdk/common-B6fDMl_i.js +1 -0
  554. package/dist/plugin-sdk/compat.cjs +1 -0
  555. package/dist/plugin-sdk/compat.js +1 -0
  556. package/dist/plugin-sdk/config-ByA2hluR.js +1 -0
  557. package/dist/plugin-sdk/config-rBz8C_Hi.cjs +1 -0
  558. package/dist/plugin-sdk/copilot-proxy.cjs +1 -0
  559. package/dist/plugin-sdk/copilot-proxy.js +1 -0
  560. package/dist/plugin-sdk/core.cjs +1 -0
  561. package/dist/plugin-sdk/core.js +1 -0
  562. package/dist/plugin-sdk/deliver-B0fB4hAV.js +1 -0
  563. package/dist/plugin-sdk/deliver-BOLmjIJ3.js +1 -0
  564. package/dist/plugin-sdk/deliver-BrfVwkYz.cjs +1 -0
  565. package/dist/plugin-sdk/deliver-C-tChWTI.cjs +1 -0
  566. package/dist/plugin-sdk/deliver-CjQPkWS-.cjs +1 -0
  567. package/dist/plugin-sdk/deliver-D1P0FNTu.js +1 -0
  568. package/dist/plugin-sdk/deliver-DCrO9mvv.cjs +1 -0
  569. package/dist/plugin-sdk/deliver-DQLekoj2.cjs +1 -0
  570. package/dist/plugin-sdk/deliver-DkfCVM78.js +1 -0
  571. package/dist/plugin-sdk/deliver-Dkh3lqXR.js +1 -0
  572. package/dist/plugin-sdk/deliver-DsFtXFyr.cjs +1 -0
  573. package/dist/plugin-sdk/deliver-vYe_sYOL.js +1 -0
  574. package/dist/plugin-sdk/device-pair.cjs +1 -0
  575. package/dist/plugin-sdk/device-pair.js +1 -0
  576. package/dist/plugin-sdk/diagnostic-8iX73nz_.cjs +1 -0
  577. package/dist/plugin-sdk/diagnostic-CLUtpxAp.js +1 -0
  578. package/dist/plugin-sdk/diagnostic-CVS4k9hh.cjs +1 -0
  579. package/dist/plugin-sdk/diagnostic-CkePwN5F.js +1 -0
  580. package/dist/plugin-sdk/diagnostic-Cu1PGj0E.cjs +1 -0
  581. package/dist/plugin-sdk/diagnostic-D0oCfBju.cjs +1 -0
  582. package/dist/plugin-sdk/diagnostic-D7A9cQYf.cjs +1 -0
  583. package/dist/plugin-sdk/diagnostic-DGLX0zXU.js +1 -0
  584. package/dist/plugin-sdk/diagnostic-DXscFT8t.cjs +1 -0
  585. package/dist/plugin-sdk/diagnostic-Efe4b81B.js +1 -0
  586. package/dist/plugin-sdk/diagnostic-EqHqw9xo.js +1 -0
  587. package/dist/plugin-sdk/diagnostic-vsjHZ_fY.js +1 -0
  588. package/dist/plugin-sdk/diagnostics-otel.cjs +1 -0
  589. package/dist/plugin-sdk/diagnostics-otel.js +1 -0
  590. package/dist/plugin-sdk/diffs.cjs +1 -0
  591. package/dist/plugin-sdk/diffs.js +1 -0
  592. package/dist/plugin-sdk/discord.cjs +1 -0
  593. package/dist/plugin-sdk/discord.js +1 -0
  594. package/dist/plugin-sdk/dispatch-5v3v8zzA.js +1 -0
  595. package/dist/plugin-sdk/dispatch-B6UbZCpL.cjs +1 -0
  596. package/dist/plugin-sdk/dispatch-BYlcmJ9u.js +1 -0
  597. package/dist/plugin-sdk/dispatch-C2YTqGlf.js +1 -0
  598. package/dist/plugin-sdk/dispatch-CNy3g9ma.cjs +1 -0
  599. package/dist/plugin-sdk/dispatch-DCSwqteL.js +1 -0
  600. package/dist/plugin-sdk/dispatch-DHbSBeFJ.js +1 -0
  601. package/dist/plugin-sdk/dispatch-DK5ub8qa.cjs +1 -0
  602. package/dist/plugin-sdk/dispatch-SWyfAZT0.cjs +1 -0
  603. package/dist/plugin-sdk/dispatch-mR2vLkGa.cjs +1 -0
  604. package/dist/plugin-sdk/feishu.cjs +1 -0
  605. package/dist/plugin-sdk/feishu.js +1 -0
  606. package/dist/plugin-sdk/fetch-7Iq9POda.js +1 -0
  607. package/dist/plugin-sdk/fetch-B1GR6-u4.js +1 -0
  608. package/dist/plugin-sdk/fetch-B27H-XCf.js +1 -0
  609. package/dist/plugin-sdk/fetch-BMYDLRWo.js +1 -0
  610. package/dist/plugin-sdk/fetch-BN9y3kTg.cjs +1 -0
  611. package/dist/plugin-sdk/fetch-BVEVk5YF.js +1 -0
  612. package/dist/plugin-sdk/fetch-BY6lVRlY.cjs +1 -0
  613. package/dist/plugin-sdk/fetch-Bi8krAaT.cjs +1 -0
  614. package/dist/plugin-sdk/fetch-BjXhwqrE.cjs +1 -0
  615. package/dist/plugin-sdk/fetch-BtZY623f.js +1 -0
  616. package/dist/plugin-sdk/fetch-C-HRWp5R.js +1 -0
  617. package/dist/plugin-sdk/fetch-C3LEMysf.js +1 -0
  618. package/dist/plugin-sdk/fetch-CCLWsYaQ.js +1 -0
  619. package/dist/plugin-sdk/fetch-CZewCAvu.cjs +1 -0
  620. package/dist/plugin-sdk/fetch-ClKErpni.cjs +1 -0
  621. package/dist/plugin-sdk/fetch-DBRI0sKI.js +1 -0
  622. package/dist/plugin-sdk/fetch-DQxuOB8o.cjs +1 -0
  623. package/dist/plugin-sdk/fetch-DUMEaqum.cjs +1 -0
  624. package/dist/plugin-sdk/fetch-DpwR_cJU.cjs +1 -0
  625. package/dist/plugin-sdk/fetch-J0IzopiJ.js +1 -0
  626. package/dist/plugin-sdk/fetch-guard-8I7EHbDM.cjs +1 -0
  627. package/dist/plugin-sdk/fetch-guard-CIJUkBIL.cjs +1 -0
  628. package/dist/plugin-sdk/fetch-guard-CY03i4gu.js +1 -0
  629. package/dist/plugin-sdk/fetch-guard-Cz-cgYmR.cjs +1 -0
  630. package/dist/plugin-sdk/fetch-guard-DB85MORy.cjs +1 -0
  631. package/dist/plugin-sdk/fetch-guard-DE9BslxX.js +1 -0
  632. package/dist/plugin-sdk/fetch-guard-DLNzldn9.cjs +1 -0
  633. package/dist/plugin-sdk/fetch-guard-DSvAbvSx.js +1 -0
  634. package/dist/plugin-sdk/fetch-guard-DXe8oqEE.js +1 -0
  635. package/dist/plugin-sdk/fetch-guard-DY9jpsXo.cjs +1 -0
  636. package/dist/plugin-sdk/fetch-guard-DbOZYxyN.js +1 -0
  637. package/dist/plugin-sdk/fetch-guard-_fifU0fX.js +1 -0
  638. package/dist/plugin-sdk/fetch-lw-aF17e.cjs +1 -0
  639. package/dist/plugin-sdk/fetch-timeout-6oZsqWxA.js +1 -0
  640. package/dist/plugin-sdk/fetch-timeout-BygUD0rd.cjs +1 -0
  641. package/dist/plugin-sdk/fetch-timeout-CLw1U7VS.js +1 -0
  642. package/dist/plugin-sdk/fetch-timeout-CX1w-9p4.cjs +1 -0
  643. package/dist/plugin-sdk/fetch-timeout-Coc9xyC3.cjs +1 -0
  644. package/dist/plugin-sdk/fetch-timeout-Cz6GuU_c.js +1 -0
  645. package/dist/plugin-sdk/fetch-timeout-DC8T2JCr.js +1 -0
  646. package/dist/plugin-sdk/fetch-timeout-DFDmks9T.cjs +1 -0
  647. package/dist/plugin-sdk/fetch-timeout-DkYpp08Q.js +1 -0
  648. package/dist/plugin-sdk/github-copilot-token-BHdMLLqf.cjs +1 -0
  649. package/dist/plugin-sdk/github-copilot-token-Bt4PduRB.js +1 -0
  650. package/dist/plugin-sdk/github-copilot-token-C1O2cBqk.cjs +1 -0
  651. package/dist/plugin-sdk/github-copilot-token-C1hiDugd.js +1 -0
  652. package/dist/plugin-sdk/github-copilot-token-C8j8_NjX.js +1 -0
  653. package/dist/plugin-sdk/github-copilot-token-CCrgp2py.cjs +1 -0
  654. package/dist/plugin-sdk/github-copilot-token-DoHgkI2r.cjs +1 -0
  655. package/dist/plugin-sdk/github-copilot-token-N8vnLZPw.js +1 -0
  656. package/dist/plugin-sdk/github-copilot-token-TMkfxxD2.cjs +1 -0
  657. package/dist/plugin-sdk/github-copilot-token-vKAKX6iE.js +1 -0
  658. package/dist/plugin-sdk/github-copilot-token-ylX_gawo.js +1 -0
  659. package/dist/plugin-sdk/github-copilot-token-zskwAEpd.cjs +1 -0
  660. package/dist/plugin-sdk/google-gemini-cli-auth.cjs +1 -0
  661. package/dist/plugin-sdk/google-gemini-cli-auth.js +1 -0
  662. package/dist/plugin-sdk/googlechat.cjs +1 -0
  663. package/dist/plugin-sdk/googlechat.js +1 -0
  664. package/dist/plugin-sdk/image-B6HEHWlJ.js +1 -0
  665. package/dist/plugin-sdk/image-Bte8cr4F.js +1 -0
  666. package/dist/plugin-sdk/image-BxafJgQ6.cjs +1 -0
  667. package/dist/plugin-sdk/image-CDI5SqeR.js +1 -0
  668. package/dist/plugin-sdk/image-CTgwucug.cjs +1 -0
  669. package/dist/plugin-sdk/image-CWnsS03L.js +1 -0
  670. package/dist/plugin-sdk/image-CoksjGBL.cjs +1 -0
  671. package/dist/plugin-sdk/image-CuOIoxl2.cjs +1 -0
  672. package/dist/plugin-sdk/image-DJyEMzkq.cjs +1 -0
  673. package/dist/plugin-sdk/image-DegWnAZU.cjs +1 -0
  674. package/dist/plugin-sdk/image-TCSQZpr6.js +1 -0
  675. package/dist/plugin-sdk/image-aG-5S1vd.js +1 -0
  676. package/dist/plugin-sdk/imessage.cjs +1 -0
  677. package/dist/plugin-sdk/imessage.js +1 -0
  678. package/dist/plugin-sdk/index.cjs +1 -0
  679. package/dist/plugin-sdk/index.js +1 -0
  680. package/dist/plugin-sdk/ir-8rDh7div.js +1 -0
  681. package/dist/plugin-sdk/ir-Bh6lKGdS.js +1 -0
  682. package/dist/plugin-sdk/ir-C3VNqnc2.cjs +1 -0
  683. package/dist/plugin-sdk/ir-CZOtKajq.cjs +1 -0
  684. package/dist/plugin-sdk/ir-CveCWs8q.cjs +1 -0
  685. package/dist/plugin-sdk/ir-DAxY-7c1.cjs +1 -0
  686. package/dist/plugin-sdk/ir-DSuLr2UE.cjs +1 -0
  687. package/dist/plugin-sdk/ir-DanxCjD-.cjs +1 -0
  688. package/dist/plugin-sdk/ir-Dgc6qZMX.js +1 -0
  689. package/dist/plugin-sdk/ir-OBi5zaEW.js +1 -0
  690. package/dist/plugin-sdk/ir-hQ6EW92h.js +1 -0
  691. package/dist/plugin-sdk/ir-ynWQeZD9.js +1 -0
  692. package/dist/plugin-sdk/irc.cjs +1 -0
  693. package/dist/plugin-sdk/irc.js +1 -0
  694. package/dist/plugin-sdk/keyed-async-queue.cjs +1 -0
  695. package/dist/plugin-sdk/keyed-async-queue.js +1 -0
  696. package/dist/plugin-sdk/line.cjs +1 -0
  697. package/dist/plugin-sdk/line.js +1 -0
  698. package/dist/plugin-sdk/llm-task.cjs +1 -0
  699. package/dist/plugin-sdk/llm-task.js +1 -0
  700. package/dist/plugin-sdk/load-options-B9Ss5YOO.js +1 -0
  701. package/dist/plugin-sdk/load-options-BOfn6Zgo.cjs +1 -0
  702. package/dist/plugin-sdk/load-options-BXvm8HVv.js +1 -0
  703. package/dist/plugin-sdk/load-options-Bb7u8yZz.cjs +1 -0
  704. package/dist/plugin-sdk/load-options-BcSg1ODN.js +1 -0
  705. package/dist/plugin-sdk/load-options-NqnXJ-Nh.cjs +1 -0
  706. package/dist/plugin-sdk/lobster.cjs +1 -0
  707. package/dist/plugin-sdk/lobster.js +1 -0
  708. package/dist/plugin-sdk/local-roots-5udQUs81.js +1 -0
  709. package/dist/plugin-sdk/local-roots-BmhNPIJm.cjs +1 -0
  710. package/dist/plugin-sdk/local-roots-C5UoE741.cjs +1 -0
  711. package/dist/plugin-sdk/local-roots-Ca8KoAAp.js +1 -0
  712. package/dist/plugin-sdk/local-roots-CeAYfmPb.cjs +1 -0
  713. package/dist/plugin-sdk/local-roots-Cu7YCpql.cjs +1 -0
  714. package/dist/plugin-sdk/local-roots-D0yN794S.js +1 -0
  715. package/dist/plugin-sdk/local-roots-D4i3H0UG.cjs +1 -0
  716. package/dist/plugin-sdk/local-roots-DGe-SRNu.js +1 -0
  717. package/dist/plugin-sdk/local-roots-bWA2msT0.js +1 -0
  718. package/dist/plugin-sdk/local-roots-tee85Q-1.js +1 -0
  719. package/dist/plugin-sdk/local-roots-wTkpE7go.cjs +1 -0
  720. package/dist/plugin-sdk/logger-6O6OsYBL.cjs +1 -0
  721. package/dist/plugin-sdk/logger-BlddiV_d.cjs +1 -0
  722. package/dist/plugin-sdk/logger-Bm93ZKOk.cjs +1 -0
  723. package/dist/plugin-sdk/logger-BtrWb0dj.js +1 -0
  724. package/dist/plugin-sdk/logger-C210xuWx.js +1 -0
  725. package/dist/plugin-sdk/logger-DJGHvDbX.js +1 -0
  726. package/dist/plugin-sdk/logger-DPlqYkRm.cjs +1 -0
  727. package/dist/plugin-sdk/logger-DUYnS-W3.cjs +1 -0
  728. package/dist/plugin-sdk/logger-DwWqfo66.js +1 -0
  729. package/dist/plugin-sdk/logger-vBDTZWl3.js +1 -0
  730. package/dist/plugin-sdk/login-B5IwNcl4.cjs +1 -0
  731. package/dist/plugin-sdk/login-BIbt7ZL_.js +1 -0
  732. package/dist/plugin-sdk/login-CxnDKwXC.js +1 -0
  733. package/dist/plugin-sdk/login-D5iTWowo.cjs +1 -0
  734. package/dist/plugin-sdk/login-DHE1rzB1.js +1 -0
  735. package/dist/plugin-sdk/login-DIPBcPQc.cjs +1 -0
  736. package/dist/plugin-sdk/login-DtDOozuU.js +1 -0
  737. package/dist/plugin-sdk/login-UrWNtI80.cjs +1 -0
  738. package/dist/plugin-sdk/login-VviMkBU2.js +1 -0
  739. package/dist/plugin-sdk/login-jQwwt6C-.js +1 -0
  740. package/dist/plugin-sdk/login-mGjCzJzb.cjs +1 -0
  741. package/dist/plugin-sdk/login-pZnnpj38.cjs +1 -0
  742. package/dist/plugin-sdk/login-qr-BexuTIDJ.cjs +1 -0
  743. package/dist/plugin-sdk/login-qr-C366Qlh-.cjs +1 -0
  744. package/dist/plugin-sdk/login-qr-CQY4ty0o.js +1 -0
  745. package/dist/plugin-sdk/login-qr-CSabEb-n.cjs +1 -0
  746. package/dist/plugin-sdk/login-qr-CUgNKijx.js +1 -0
  747. package/dist/plugin-sdk/login-qr-C_LEw1Bi.js +1 -0
  748. package/dist/plugin-sdk/login-qr-CcPvldsG.js +1 -0
  749. package/dist/plugin-sdk/login-qr-CnNGKwDR.cjs +1 -0
  750. package/dist/plugin-sdk/login-qr-DQm50pXk.js +1 -0
  751. package/dist/plugin-sdk/login-qr-DayvAWkx.js +1 -0
  752. package/dist/plugin-sdk/login-qr-eodIsL9V.cjs +1 -0
  753. package/dist/plugin-sdk/login-qr-yIJE7MmY.cjs +1 -0
  754. package/dist/plugin-sdk/manager-932XljTT.js +1 -0
  755. package/dist/plugin-sdk/manager-CGHd5p2T.js +1 -0
  756. package/dist/plugin-sdk/manager-CbGA_JDa.js +1 -0
  757. package/dist/plugin-sdk/manager-CdD7HaGW.cjs +1 -0
  758. package/dist/plugin-sdk/manager-CmAH_a7A.cjs +1 -0
  759. package/dist/plugin-sdk/manager-DIS4ywpb.cjs +1 -0
  760. package/dist/plugin-sdk/manager-DQ2C-2IU.cjs +1 -0
  761. package/dist/plugin-sdk/manager-DdvFnsT7.cjs +1 -0
  762. package/dist/plugin-sdk/manager-DfdDglld.js +1 -0
  763. package/dist/plugin-sdk/manager-MR9stU_p.js +1 -0
  764. package/dist/plugin-sdk/manager-WwW37IUu.js +1 -0
  765. package/dist/plugin-sdk/manager-gE9187gu.cjs +1 -0
  766. package/dist/plugin-sdk/matrix.cjs +1 -0
  767. package/dist/plugin-sdk/matrix.js +1 -0
  768. package/dist/plugin-sdk/mattermost.cjs +1 -0
  769. package/dist/plugin-sdk/mattermost.js +1 -0
  770. package/dist/plugin-sdk/memory-core.cjs +1 -0
  771. package/dist/plugin-sdk/memory-core.js +1 -0
  772. package/dist/plugin-sdk/minimax-portal-auth.cjs +1 -0
  773. package/dist/plugin-sdk/minimax-portal-auth.js +1 -0
  774. package/dist/plugin-sdk/model-auth-BpS4IWDi.cjs +1 -0
  775. package/dist/plugin-sdk/model-auth-BwajGuoF.cjs +1 -0
  776. package/dist/plugin-sdk/model-auth-C1YL9HcW.js +1 -0
  777. package/dist/plugin-sdk/model-auth-Cc-8H6Cu.js +1 -0
  778. package/dist/plugin-sdk/model-auth-Cw3fuhm_.js +1 -0
  779. package/dist/plugin-sdk/model-auth-CycDtQl-.js +1 -0
  780. package/dist/plugin-sdk/model-auth-D-7xiXhK.cjs +1 -0
  781. package/dist/plugin-sdk/model-auth-TFUxaK0f.cjs +1 -0
  782. package/dist/plugin-sdk/model-selection-BADTZM9n.cjs +1 -0
  783. package/dist/plugin-sdk/model-selection-DUAudCtL.js +1 -0
  784. package/dist/plugin-sdk/msteams.cjs +1 -0
  785. package/dist/plugin-sdk/msteams.js +1 -0
  786. package/dist/plugin-sdk/nextcloud-talk.cjs +1 -0
  787. package/dist/plugin-sdk/nextcloud-talk.js +1 -0
  788. package/dist/plugin-sdk/nostr.cjs +1 -0
  789. package/dist/plugin-sdk/nostr.js +1 -0
  790. package/dist/plugin-sdk/outbound-2Lo6mZEY.js +1 -0
  791. package/dist/plugin-sdk/outbound-9XFlZzaF.cjs +1 -0
  792. package/dist/plugin-sdk/outbound-BlWsUmjQ.js +1 -0
  793. package/dist/plugin-sdk/outbound-Bs2rUcWZ.cjs +1 -0
  794. package/dist/plugin-sdk/outbound-C18nEOFP.js +1 -0
  795. package/dist/plugin-sdk/outbound-CW3o4Eng.cjs +1 -0
  796. package/dist/plugin-sdk/outbound-CzsdW5sy.js +1 -0
  797. package/dist/plugin-sdk/outbound-DcP22VOo.cjs +1 -0
  798. package/dist/plugin-sdk/outbound-QhOJAEO8.cjs +1 -0
  799. package/dist/plugin-sdk/outbound-attachment-1pf06Oiu.cjs +1 -0
  800. package/dist/plugin-sdk/outbound-attachment-B8-ZVX2i.cjs +1 -0
  801. package/dist/plugin-sdk/outbound-attachment-BDwI_tn0.cjs +1 -0
  802. package/dist/plugin-sdk/outbound-attachment-BXhbJils.js +1 -0
  803. package/dist/plugin-sdk/outbound-attachment-Bgf1pCh8.js +1 -0
  804. package/dist/plugin-sdk/outbound-attachment-COgf85S8.cjs +1 -0
  805. package/dist/plugin-sdk/outbound-attachment-CfN9OvMC.js +1 -0
  806. package/dist/plugin-sdk/outbound-attachment-CftilZWd.js +1 -0
  807. package/dist/plugin-sdk/outbound-attachment-Cujprd6T.cjs +1 -0
  808. package/dist/plugin-sdk/outbound-attachment-CvSHb9ci.js +1 -0
  809. package/dist/plugin-sdk/outbound-attachment-DQYtdTUw.js +1 -0
  810. package/dist/plugin-sdk/outbound-attachment-FqWC0WJx.cjs +1 -0
  811. package/dist/plugin-sdk/outbound-dTvIiFIZ.js +1 -0
  812. package/dist/plugin-sdk/outbound-fZ1WJGfe.cjs +1 -0
  813. package/dist/plugin-sdk/outbound-oHoWYWxf.js +1 -0
  814. package/dist/plugin-sdk/paths-BPlgbwrb.cjs +1 -0
  815. package/dist/plugin-sdk/paths-Bcdg3ma0.cjs +1 -0
  816. package/dist/plugin-sdk/paths-BpQOWYiT.js +1 -0
  817. package/dist/plugin-sdk/paths-BvlJvmRS.cjs +1 -0
  818. package/dist/plugin-sdk/paths-CIcxeNL-.cjs +1 -0
  819. package/dist/plugin-sdk/paths-CXgWvWAM.js +1 -0
  820. package/dist/plugin-sdk/paths-Chp3zwtq.cjs +1 -0
  821. package/dist/plugin-sdk/paths-CnHSNSeR.js +1 -0
  822. package/dist/plugin-sdk/paths-Cqca1YmF.cjs +1 -0
  823. package/dist/plugin-sdk/paths-CtrEseGU.js +1 -0
  824. package/dist/plugin-sdk/paths-D55o_j8-.js +1 -0
  825. package/dist/plugin-sdk/paths-D90l3h_o.cjs +1 -0
  826. package/dist/plugin-sdk/paths-DaRoqzBQ.js +1 -0
  827. package/dist/plugin-sdk/paths-Dd7r1qlB.cjs +1 -0
  828. package/dist/plugin-sdk/paths-DhSjTRMz.js +1 -0
  829. package/dist/plugin-sdk/paths-Do0djuaj.js +1 -0
  830. package/dist/plugin-sdk/paths-J4JUiRsa.js +1 -0
  831. package/dist/plugin-sdk/paths-cBAF6Bj0.js +1 -0
  832. package/dist/plugin-sdk/paths-piJASC5k.js +1 -0
  833. package/dist/plugin-sdk/paths-rO4ehkyU.js +1 -0
  834. package/dist/plugin-sdk/pi-model-discovery-B9boErNZ.cjs +1 -0
  835. package/dist/plugin-sdk/pi-model-discovery-BJ8wTgFH.cjs +1 -0
  836. package/dist/plugin-sdk/pi-model-discovery-Bb2vCP6M.js +1 -0
  837. package/dist/plugin-sdk/pi-model-discovery-Bor7jHYd.js +1 -0
  838. package/dist/plugin-sdk/pi-model-discovery-BrTw1qE2.cjs +1 -0
  839. package/dist/plugin-sdk/pi-model-discovery-BuEMyAsU.js +1 -0
  840. package/dist/plugin-sdk/pi-model-discovery-CV9NTjC4.js +1 -0
  841. package/dist/plugin-sdk/pi-model-discovery-D5tLf04u.js +1 -0
  842. package/dist/plugin-sdk/pi-model-discovery-D5xlUS2J.cjs +1 -0
  843. package/dist/plugin-sdk/pi-model-discovery-DGoPUzBj.cjs +1 -0
  844. package/dist/plugin-sdk/pi-model-discovery-DMrqvV1O.cjs +1 -0
  845. package/dist/plugin-sdk/pi-model-discovery-DoY7qnlI.cjs +1 -0
  846. package/dist/plugin-sdk/pi-model-discovery-Dqq9Vm8o.js +1 -0
  847. package/dist/plugin-sdk/pi-model-discovery-zCuISPPq.js +1 -0
  848. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-4238P8NF.js +1 -0
  849. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BEoqzgFe.cjs +1 -0
  850. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BGPjibRD.js +1 -0
  851. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BJ_amISU.cjs +1 -0
  852. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BX2r_qPT.cjs +1 -0
  853. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CGLHFxSr.js +1 -0
  854. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CsNn_Lv8.js +1 -0
  855. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CsiKBTHg.cjs +1 -0
  856. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CuXQQk4F.cjs +1 -0
  857. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DNatrz-3.cjs +1 -0
  858. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-PApjB0tY.js +1 -0
  859. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-xsXDBYNq.js +1 -0
  860. package/dist/plugin-sdk/polls-BuaJuIpV.cjs +1 -0
  861. package/dist/plugin-sdk/polls-CBAGZuJ6.js +1 -0
  862. package/dist/plugin-sdk/polls-CSKMbBIS.js +1 -0
  863. package/dist/plugin-sdk/polls-D0wY0FvT.cjs +1 -0
  864. package/dist/plugin-sdk/polls-PGxiE05J.js +1 -0
  865. package/dist/plugin-sdk/polls-yWqSCEP0.cjs +1 -0
  866. package/dist/plugin-sdk/proxy-env-B765haXA.js +1 -0
  867. package/dist/plugin-sdk/proxy-env-Bcl14j2_.cjs +1 -0
  868. package/dist/plugin-sdk/proxy-env-BlrHtJWH.js +1 -0
  869. package/dist/plugin-sdk/proxy-env-D48qBPAr.cjs +1 -0
  870. package/dist/plugin-sdk/proxy-env-DGzNnnJh.js +1 -0
  871. package/dist/plugin-sdk/proxy-env-DQoJjkWE.cjs +1 -0
  872. package/dist/plugin-sdk/proxy-env-DWw9TnOj.cjs +1 -0
  873. package/dist/plugin-sdk/proxy-env-MEjSyzTr.js +1 -0
  874. package/dist/plugin-sdk/proxy-env-a590sPAz.cjs +1 -0
  875. package/dist/plugin-sdk/proxy-env-k93igu7v.cjs +1 -0
  876. package/dist/plugin-sdk/proxy-env-m9eG3uZN.js +1 -0
  877. package/dist/plugin-sdk/proxy-env-t6hcaFqC.js +1 -0
  878. package/dist/plugin-sdk/proxy-fetch-B9aXJVe-.js +1 -0
  879. package/dist/plugin-sdk/proxy-fetch-BaA3JYgW.cjs +1 -0
  880. package/dist/plugin-sdk/proxy-fetch-BwXFVsHE.cjs +1 -0
  881. package/dist/plugin-sdk/proxy-fetch-BzcKzknk.cjs +1 -0
  882. package/dist/plugin-sdk/proxy-fetch-CYVChsKE.js +1 -0
  883. package/dist/plugin-sdk/proxy-fetch-ClOb2LUH.js +1 -0
  884. package/dist/plugin-sdk/proxy-fetch-DH7VIiBH.cjs +1 -0
  885. package/dist/plugin-sdk/proxy-fetch-DPOhfrou.cjs +1 -0
  886. package/dist/plugin-sdk/proxy-fetch-DXt2R_Z5.js +1 -0
  887. package/dist/plugin-sdk/proxy-fetch-Del551nu.js +1 -0
  888. package/dist/plugin-sdk/proxy-fetch-YCVHz7Rl.js +1 -0
  889. package/dist/plugin-sdk/proxy-fetch-qbrYAz8k.cjs +1 -0
  890. package/dist/plugin-sdk/pw-ai-B0_rvdfF.js +1 -0
  891. package/dist/plugin-sdk/pw-ai-BqdrA15F.js +1 -0
  892. package/dist/plugin-sdk/pw-ai-CDzxu5B3.js +1 -0
  893. package/dist/plugin-sdk/pw-ai-CJIogpwF.cjs +1 -0
  894. package/dist/plugin-sdk/pw-ai-CL_gU5PJ.cjs +1 -0
  895. package/dist/plugin-sdk/pw-ai-Ca4aZTaG.cjs +1 -0
  896. package/dist/plugin-sdk/pw-ai-CrfYxLI8.cjs +1 -0
  897. package/dist/plugin-sdk/pw-ai-DCiFlwP8.js +1 -0
  898. package/dist/plugin-sdk/pw-ai-DSqXNmNZ.js +1 -0
  899. package/dist/plugin-sdk/pw-ai-Dh55xTz1.cjs +1 -0
  900. package/dist/plugin-sdk/pw-ai-DxAvipyK.cjs +1 -0
  901. package/dist/plugin-sdk/pw-ai-U9nPHH-0.js +1 -0
  902. package/dist/plugin-sdk/qmd-manager-B3xNbdye.cjs +1 -0
  903. package/dist/plugin-sdk/qmd-manager-BMyDNBPi.js +1 -0
  904. package/dist/plugin-sdk/qmd-manager-BZhiv_zq.cjs +1 -0
  905. package/dist/plugin-sdk/qmd-manager-C3uVDbhW.js +1 -0
  906. package/dist/plugin-sdk/qmd-manager-CW46NrS-.cjs +1 -0
  907. package/dist/plugin-sdk/qmd-manager-C_e04BNg.js +1 -0
  908. package/dist/plugin-sdk/qmd-manager-CczVoslK.cjs +1 -0
  909. package/dist/plugin-sdk/qmd-manager-CzLKqPmR.js +1 -0
  910. package/dist/plugin-sdk/qmd-manager-DFh8b5N-.cjs +1 -0
  911. package/dist/plugin-sdk/qmd-manager-DXLfZZMI.js +1 -0
  912. package/dist/plugin-sdk/qmd-manager-FL9fAfNo.cjs +1 -0
  913. package/dist/plugin-sdk/qmd-manager-fWxbGqzk.js +1 -0
  914. package/dist/plugin-sdk/query-expansion-0zYzKrrd.cjs +1 -0
  915. package/dist/plugin-sdk/query-expansion-BYSjmpkV.cjs +1 -0
  916. package/dist/plugin-sdk/query-expansion-CAboqtWr.js +1 -0
  917. package/dist/plugin-sdk/query-expansion-C_DnhmUy.js +1 -0
  918. package/dist/plugin-sdk/query-expansion-Cb2vnF6y.js +1 -0
  919. package/dist/plugin-sdk/query-expansion-DCeqywxh.cjs +1 -0
  920. package/dist/plugin-sdk/query-expansion-DF4LMxRQ.js +1 -0
  921. package/dist/plugin-sdk/query-expansion-DKJkqmNM.cjs +1 -0
  922. package/dist/plugin-sdk/query-expansion-DO2CFW4z.cjs +1 -0
  923. package/dist/plugin-sdk/query-expansion-DyCDaZbL.js +1 -0
  924. package/dist/plugin-sdk/query-expansion-cpXCyoDy.cjs +1 -0
  925. package/dist/plugin-sdk/query-expansion-r_iXkNzt.js +1 -0
  926. package/dist/plugin-sdk/qwen-portal-auth.cjs +1 -0
  927. package/dist/plugin-sdk/qwen-portal-auth.js +1 -0
  928. package/dist/plugin-sdk/render-6fCdtAr6.cjs +1 -0
  929. package/dist/plugin-sdk/render-CBsnn-2A.js +1 -0
  930. package/dist/plugin-sdk/render-CzHaQB0d.cjs +1 -0
  931. package/dist/plugin-sdk/render-DGmfCIRG.js +1 -0
  932. package/dist/plugin-sdk/render-DhTJXP1U.js +1 -0
  933. package/dist/plugin-sdk/render-Djx15dPh.js +1 -0
  934. package/dist/plugin-sdk/render-DxBO2Blp.cjs +1 -0
  935. package/dist/plugin-sdk/render-g5VlmgpF.cjs +1 -0
  936. package/dist/plugin-sdk/reply-0zCEbT4w.cjs +1 -0
  937. package/dist/plugin-sdk/reply-D-f2bbXy.js +1 -0
  938. package/dist/plugin-sdk/resolve-outbound-target-CrQGbaua.js +1 -0
  939. package/dist/plugin-sdk/resolve-outbound-target-H7Q9HcfW.js +1 -0
  940. package/dist/plugin-sdk/resolve-outbound-target-MS6Xpp17.cjs +1 -0
  941. package/dist/plugin-sdk/resolve-outbound-target-cDxjy3TL.cjs +1 -0
  942. package/dist/plugin-sdk/send-3VNTSIhr.js +1 -0
  943. package/dist/plugin-sdk/send-61GHLNYP.cjs +1 -0
  944. package/dist/plugin-sdk/send-6q4owAw0.js +1 -0
  945. package/dist/plugin-sdk/send-A2s5sPTd.js +1 -0
  946. package/dist/plugin-sdk/send-B2qa7CSk.js +1 -0
  947. package/dist/plugin-sdk/send-B3aEYvqG.cjs +1 -0
  948. package/dist/plugin-sdk/send-BAoqP09M.cjs +1 -0
  949. package/dist/plugin-sdk/send-BNBJ4CF8.js +1 -0
  950. package/dist/plugin-sdk/send-BTE2rI1E.js +1 -0
  951. package/dist/plugin-sdk/send-BlWuQHYB.js +1 -0
  952. package/dist/plugin-sdk/send-Bnvt7ZUE.cjs +1 -0
  953. package/dist/plugin-sdk/send-Bq6Mqs9G.cjs +1 -0
  954. package/dist/plugin-sdk/send-Bq787fi_.js +1 -0
  955. package/dist/plugin-sdk/send-BrAHLYBR.js +1 -0
  956. package/dist/plugin-sdk/send-Bt2eFBk2.js +1 -0
  957. package/dist/plugin-sdk/send-C4ZFbUux.js +1 -0
  958. package/dist/plugin-sdk/send-C4cyMW4S.cjs +1 -0
  959. package/dist/plugin-sdk/send-C8f5H4XV.cjs +1 -0
  960. package/dist/plugin-sdk/send-CDwTrbgT.cjs +1 -0
  961. package/dist/plugin-sdk/send-CEfs0Fsr.js +1 -0
  962. package/dist/plugin-sdk/send-CFuJjCNB.cjs +1 -0
  963. package/dist/plugin-sdk/send-CJGLeSJ8.cjs +1 -0
  964. package/dist/plugin-sdk/send-CL0W7jLW.js +1 -0
  965. package/dist/plugin-sdk/send-CLl490Gb.cjs +1 -0
  966. package/dist/plugin-sdk/send-CQtITZ7k.cjs +1 -0
  967. package/dist/plugin-sdk/send-CSGh_GVr.cjs +1 -0
  968. package/dist/plugin-sdk/send-CicLiXB4.js +1 -0
  969. package/dist/plugin-sdk/send-Cm7bEwx-.cjs +1 -0
  970. package/dist/plugin-sdk/send-CmO9z2-b.js +1 -0
  971. package/dist/plugin-sdk/send-Co_Wy2kT.cjs +1 -0
  972. package/dist/plugin-sdk/send-Cox_iyYB.cjs +1 -0
  973. package/dist/plugin-sdk/send-CuX4LcJ3.cjs +1 -0
  974. package/dist/plugin-sdk/send-CxMiTtxI.cjs +1 -0
  975. package/dist/plugin-sdk/send-CyyzWwDr.js +1 -0
  976. package/dist/plugin-sdk/send-D-HZnehy.cjs +1 -0
  977. package/dist/plugin-sdk/send-D-qD7BCb.js +1 -0
  978. package/dist/plugin-sdk/send-D3imkSlz.cjs +1 -0
  979. package/dist/plugin-sdk/send-D5UwpCoU.cjs +1 -0
  980. package/dist/plugin-sdk/send-D75OGJco.js +1 -0
  981. package/dist/plugin-sdk/send-DB4i1kUy.cjs +1 -0
  982. package/dist/plugin-sdk/send-DBjzdBda.cjs +1 -0
  983. package/dist/plugin-sdk/send-DPgRTM8s.js +1 -0
  984. package/dist/plugin-sdk/send-DPpBLiL4.js +1 -0
  985. package/dist/plugin-sdk/send-DV_afQnj.cjs +1 -0
  986. package/dist/plugin-sdk/send-DWuChr46.js +1 -0
  987. package/dist/plugin-sdk/send-DZ4szmEa.cjs +1 -0
  988. package/dist/plugin-sdk/send-DZr98eqE.cjs +1 -0
  989. package/dist/plugin-sdk/send-D_1K0zmx.cjs +1 -0
  990. package/dist/plugin-sdk/send-DaLB9Lca.js +1 -0
  991. package/dist/plugin-sdk/send-De4qiprb.js +1 -0
  992. package/dist/plugin-sdk/send-DeU-T5ps.js +1 -0
  993. package/dist/plugin-sdk/send-DtjJM0LO.js +1 -0
  994. package/dist/plugin-sdk/send-DvDCmTQf.js +1 -0
  995. package/dist/plugin-sdk/send-EvcsiFBC.cjs +1 -0
  996. package/dist/plugin-sdk/send-GuISe9C82.js +1 -0
  997. package/dist/plugin-sdk/send-IoGcE0w2.js +1 -0
  998. package/dist/plugin-sdk/send-JVdUTsN1.cjs +1 -0
  999. package/dist/plugin-sdk/send-NpNVFRmY.js +1 -0
  1000. package/dist/plugin-sdk/send-XMOZsJcs.js +1 -0
  1001. package/dist/plugin-sdk/send-h--iKoQE.cjs +1 -0
  1002. package/dist/plugin-sdk/session-8BcB905y.cjs +1 -0
  1003. package/dist/plugin-sdk/session-B2oURX5K.js +1 -0
  1004. package/dist/plugin-sdk/session-BJhNqIOi.js +1 -0
  1005. package/dist/plugin-sdk/session-BRgGsw96.cjs +1 -0
  1006. package/dist/plugin-sdk/session-Be_7rXAz.js +1 -0
  1007. package/dist/plugin-sdk/session-C66IXbE-.js +1 -0
  1008. package/dist/plugin-sdk/session-CCYDbcyV.js +1 -0
  1009. package/dist/plugin-sdk/session-CHu3C2m0.cjs +1 -0
  1010. package/dist/plugin-sdk/session-DUlmK2IL.cjs +1 -0
  1011. package/dist/plugin-sdk/session-DxTRZTnu.js +1 -0
  1012. package/dist/plugin-sdk/session-DzhI0nj-.cjs +1 -0
  1013. package/dist/plugin-sdk/session-WRCBgAzG.cjs +1 -0
  1014. package/dist/plugin-sdk/sessions-DxXXAfdI.js +1 -0
  1015. package/dist/plugin-sdk/sessions-Dz5JUL8j.cjs +1 -0
  1016. package/dist/plugin-sdk/signal.cjs +1 -0
  1017. package/dist/plugin-sdk/signal.js +1 -0
  1018. package/dist/plugin-sdk/skill-commands-B4wI8ETo.cjs +1 -0
  1019. package/dist/plugin-sdk/skill-commands-BoTeA376.cjs +1 -0
  1020. package/dist/plugin-sdk/skill-commands-BwrYJu7Z.js +1 -0
  1021. package/dist/plugin-sdk/skill-commands-BzkMuA58.cjs +1 -0
  1022. package/dist/plugin-sdk/skill-commands-CIAf9cWN.cjs +1 -0
  1023. package/dist/plugin-sdk/skill-commands-CKc7JO_c.cjs +1 -0
  1024. package/dist/plugin-sdk/skill-commands-Cvb6oXym.js +1 -0
  1025. package/dist/plugin-sdk/skill-commands-DWDtyCtB.js +1 -0
  1026. package/dist/plugin-sdk/skill-commands-Hmuw0PPK.js +1 -0
  1027. package/dist/plugin-sdk/skill-commands-KyN0FGaC.cjs +1 -0
  1028. package/dist/plugin-sdk/skill-commands-KzwEqk5p.js +1 -0
  1029. package/dist/plugin-sdk/skill-commands-Ny38ZFIC.js +1 -0
  1030. package/dist/plugin-sdk/slack.cjs +1 -0
  1031. package/dist/plugin-sdk/slack.js +1 -0
  1032. package/dist/plugin-sdk/synology-chat.cjs +1 -0
  1033. package/dist/plugin-sdk/synology-chat.js +1 -0
  1034. package/dist/plugin-sdk/tables-BIDWwpX8.js +1 -0
  1035. package/dist/plugin-sdk/tables-Bk8lHaPx.cjs +1 -0
  1036. package/dist/plugin-sdk/tables-BlNIkMV8.js +1 -0
  1037. package/dist/plugin-sdk/tables-Bp0a2WRP.cjs +1 -0
  1038. package/dist/plugin-sdk/tables-BtVUf77b.cjs +1 -0
  1039. package/dist/plugin-sdk/tables-C4j5Bar_.js +1 -0
  1040. package/dist/plugin-sdk/tables-CZGtYzDC.cjs +1 -0
  1041. package/dist/plugin-sdk/tables-CnrHab5d.cjs +1 -0
  1042. package/dist/plugin-sdk/tables-DtslIPYw.js +1 -0
  1043. package/dist/plugin-sdk/tables-NrdtIJGp.cjs +1 -0
  1044. package/dist/plugin-sdk/tables-XYb3T-vE.js +1 -0
  1045. package/dist/plugin-sdk/tables-lbv-0tl3.js +1 -0
  1046. package/dist/plugin-sdk/target-errors-9cdJA1L2.cjs +1 -0
  1047. package/dist/plugin-sdk/target-errors-BEkhKWCq.cjs +1 -0
  1048. package/dist/plugin-sdk/target-errors-BZRN-lPd.js +1 -0
  1049. package/dist/plugin-sdk/target-errors-BrwqillR.cjs +1 -0
  1050. package/dist/plugin-sdk/target-errors-Buo5pfom.js +1 -0
  1051. package/dist/plugin-sdk/target-errors-CFzzcffg.js +1 -0
  1052. package/dist/plugin-sdk/target-errors-DFmK5loi.js +1 -0
  1053. package/dist/plugin-sdk/target-errors-DXqwykNX.js +1 -0
  1054. package/dist/plugin-sdk/target-errors-Dd6CopYF.cjs +1 -0
  1055. package/dist/plugin-sdk/target-errors-DeNJ10ks.cjs +1 -0
  1056. package/dist/plugin-sdk/targets-BSc11Uk8.cjs +1 -0
  1057. package/dist/plugin-sdk/targets-BSkiizml.js +1 -0
  1058. package/dist/plugin-sdk/targets-CBI0xqve.cjs +1 -0
  1059. package/dist/plugin-sdk/targets-CL5fYQi7.js +1 -0
  1060. package/dist/plugin-sdk/targets-CUZWrFrm.cjs +1 -0
  1061. package/dist/plugin-sdk/targets-CVEYTFPQ.js +1 -0
  1062. package/dist/plugin-sdk/targets-Co2R6K14.cjs +1 -0
  1063. package/dist/plugin-sdk/targets-CrkJkzil.js +1 -0
  1064. package/dist/plugin-sdk/targets-D-m7SV9x.cjs +1 -0
  1065. package/dist/plugin-sdk/targets-D8HTxbo4.js +1 -0
  1066. package/dist/plugin-sdk/targets-DcGNB9nk.cjs +1 -0
  1067. package/dist/plugin-sdk/targets-Dn9gDiEw.js +1 -0
  1068. package/dist/plugin-sdk/targets-X28mff4s.cjs +1 -0
  1069. package/dist/plugin-sdk/targets-uycXZ8vQ.js +1 -0
  1070. package/dist/plugin-sdk/telegram.cjs +1 -0
  1071. package/dist/plugin-sdk/telegram.js +1 -0
  1072. package/dist/plugin-sdk/test-utils.cjs +1 -0
  1073. package/dist/plugin-sdk/test-utils.js +1 -0
  1074. package/dist/plugin-sdk/tlon.cjs +1 -0
  1075. package/dist/plugin-sdk/tlon.js +1 -0
  1076. package/dist/plugin-sdk/tokens-AAdZjj0M.js +1 -0
  1077. package/dist/plugin-sdk/tokens-B20KNIDD.js +1 -0
  1078. package/dist/plugin-sdk/tokens-B8ys7Q2e.js +1 -0
  1079. package/dist/plugin-sdk/tokens-BPc1fcZ3.js +1 -0
  1080. package/dist/plugin-sdk/tokens-BqABmXSe.js +1 -0
  1081. package/dist/plugin-sdk/tokens-CXsPDJTr.cjs +1 -0
  1082. package/dist/plugin-sdk/tokens-CnB4dJmp.cjs +1 -0
  1083. package/dist/plugin-sdk/tokens-CytSl1X8.cjs +1 -0
  1084. package/dist/plugin-sdk/tokens-DgPZk2Uu.js +1 -0
  1085. package/dist/plugin-sdk/tokens-Dq2wDF3_.cjs +1 -0
  1086. package/dist/plugin-sdk/tokens-DtrljGtQ.cjs +1 -0
  1087. package/dist/plugin-sdk/tokens-g5KWvWhD.cjs +1 -0
  1088. package/dist/plugin-sdk/twitch.cjs +1 -0
  1089. package/dist/plugin-sdk/twitch.js +1 -0
  1090. package/dist/plugin-sdk/utils-BJtJR72k.js +1 -0
  1091. package/dist/plugin-sdk/utils-PPIvU9qw.cjs +1 -0
  1092. package/dist/plugin-sdk/voice-call.cjs +1 -0
  1093. package/dist/plugin-sdk/voice-call.js +1 -0
  1094. package/dist/plugin-sdk/web-B-QDcVRv.cjs +1 -0
  1095. package/dist/plugin-sdk/web-B2PwjHsu.cjs +1 -0
  1096. package/dist/plugin-sdk/web-BdnQzLgF.js +1 -0
  1097. package/dist/plugin-sdk/web-C9T7tf6w.js +1 -0
  1098. package/dist/plugin-sdk/web-CODD4ksc.cjs +1 -0
  1099. package/dist/plugin-sdk/web-CkdCvvR-.js +1 -0
  1100. package/dist/plugin-sdk/web-_tj8xNZE.js +1 -0
  1101. package/dist/plugin-sdk/web-pcTha_l7.cjs +1 -0
  1102. package/dist/plugin-sdk/weixin.cjs +1 -0
  1103. package/dist/plugin-sdk/weixin.js +1 -0
  1104. package/dist/plugin-sdk/whatsapp-actions-Bhz2j1uz.cjs +1 -0
  1105. package/dist/plugin-sdk/whatsapp-actions-Bm2UyRYg.cjs +1 -0
  1106. package/dist/plugin-sdk/whatsapp-actions-Bolz0jl5.js +1 -0
  1107. package/dist/plugin-sdk/whatsapp-actions-CJ3LDpaG.js +1 -0
  1108. package/dist/plugin-sdk/whatsapp-actions-CL1Gmkb0.js +1 -0
  1109. package/dist/plugin-sdk/whatsapp-actions-D-bZRT7s.js +1 -0
  1110. package/dist/plugin-sdk/whatsapp-actions-DSGTTE8M.cjs +1 -0
  1111. package/dist/plugin-sdk/whatsapp-actions-DjQxgMpW.cjs +1 -0
  1112. package/dist/plugin-sdk/whatsapp-actions-DrPBBi5t.cjs +1 -0
  1113. package/dist/plugin-sdk/whatsapp-actions-DtK657CZ.cjs +1 -0
  1114. package/dist/plugin-sdk/whatsapp-actions-Xwev51_N.js +1 -0
  1115. package/dist/plugin-sdk/whatsapp-actions-m7vLtNAA.js +1 -0
  1116. package/dist/plugin-sdk/whatsapp.cjs +1 -0
  1117. package/dist/plugin-sdk/whatsapp.js +1 -0
  1118. package/dist/plugin-sdk/zalo.cjs +1 -0
  1119. package/dist/plugin-sdk/zalo.js +1 -0
  1120. package/dist/plugin-sdk/zalouser.cjs +1 -0
  1121. package/dist/plugin-sdk/zalouser.js +1 -0
  1122. package/dist/plugins-CYLrFT4h.js +1 -0
  1123. package/dist/plugins-DNlgeTTc.js +1 -0
  1124. package/dist/plugins-cli-BbjMbzJU.js +1 -0
  1125. package/dist/plugins-cli-BiVMAr5T.js +1 -0
  1126. package/dist/polls-BIVz6a4F.js +1 -0
  1127. package/dist/polls-Bh5wc9-6.js +1 -0
  1128. package/dist/polls-C_XSFz3d.js +1 -0
  1129. package/dist/polls-DKJOFSzJ.js +1 -0
  1130. package/dist/ports-B0XdGTfS.js +1 -0
  1131. package/dist/ports-BR0PLRtq.js +1 -0
  1132. package/dist/probe-auth-BMA0yM94.js +1 -0
  1133. package/dist/probe-auth-VI96zmTK.js +1 -0
  1134. package/dist/profile-utils-CWmra1aY.js +1 -0
  1135. package/dist/program-BrAZTwFr.js +1 -0
  1136. package/dist/program-context-B9ydtPje.js +1 -0
  1137. package/dist/program-context-CH9p6anW.js +1 -0
  1138. package/dist/progress-LNttnI-y.js +1 -0
  1139. package/dist/progress-d1m2sqR1.js +1 -0
  1140. package/dist/prompt-select-styled-BeJNbzSa.js +1 -0
  1141. package/dist/prompt-select-styled-DIOWLjl0.js +1 -0
  1142. package/dist/prompt-style-BThRSQJR.js +1 -0
  1143. package/dist/prompt-style-CXKekIBY.js +1 -0
  1144. package/dist/prompts-CMzglboN.js +1 -0
  1145. package/dist/prompts-wv-lfVrJ.js +1 -0
  1146. package/dist/provider-auth-helpers-1lU43eTW.js +1 -0
  1147. package/dist/provider-auth-helpers-pBVCjBj9.js +1 -0
  1148. package/dist/provider-env-vars-D8p6Ohpj.js +1 -0
  1149. package/dist/provider-env-vars-Dt0Q29Su.js +1 -0
  1150. package/dist/proxy-env-BNhTHkd_.js +1 -0
  1151. package/dist/proxy-env-DcmW_urA.js +1 -0
  1152. package/dist/proxy-env-DrC3TIGh.js +1 -0
  1153. package/dist/proxy-env-FJr5nlvs.js +1 -0
  1154. package/dist/proxy-fetch-BADsUK4d.js +1 -0
  1155. package/dist/proxy-fetch-BZ9O8Dvj.js +1 -0
  1156. package/dist/proxy-fetch-DnjU1fEB.js +1 -0
  1157. package/dist/proxy-fetch-gWETR3cl.js +1 -0
  1158. package/dist/push-apns-BGUOmD5M.js +1 -0
  1159. package/dist/push-apns-B_a2MBJ4.js +1 -0
  1160. package/dist/pw-ai-C-Ffkwai.js +1 -0
  1161. package/dist/pw-ai-CV1H1Vrs.js +1 -0
  1162. package/dist/pw-ai-D_MB1lrR.js +1 -0
  1163. package/dist/pw-ai-_l9lVice.js +1 -0
  1164. package/dist/qmd-manager-C_e04BNg.js +1 -0
  1165. package/dist/qmd-manager-DSQ_mDCl.js +1 -0
  1166. package/dist/qmd-manager-DcBYbt_V.js +1 -0
  1167. package/dist/qmd-manager-NLI0R6kp.js +1 -0
  1168. package/dist/qr-cli-3aG6CB6K.js +1 -0
  1169. package/dist/qr-cli-fiJxD5M4.js +1 -0
  1170. package/dist/query-expansion-0OxEb1Io.js +1 -0
  1171. package/dist/query-expansion-BUUx_oWg.js +1 -0
  1172. package/dist/query-expansion-r_iXkNzt.js +1 -0
  1173. package/dist/reaction-level-DVPHL14p.js +1 -0
  1174. package/dist/reaction-message-id-BEEe7X3D.js +1 -0
  1175. package/dist/read-only-account-inspect-DBwAwB3_.js +1 -0
  1176. package/dist/redact-3_CiXMY6.js +1 -0
  1177. package/dist/redact-CnRxK70G.js +1 -0
  1178. package/dist/register.agent-CX78s_X9.js +1 -0
  1179. package/dist/register.agent-DLDKQENq.js +1 -0
  1180. package/dist/register.backup-DkFoTcuT.js +1 -0
  1181. package/dist/register.backup-PzF5rmeU.js +1 -0
  1182. package/dist/register.configure-BA5u9hT3.js +1 -0
  1183. package/dist/register.configure-BhPtf3Qo.js +1 -0
  1184. package/dist/register.maintenance-BhsBepKS.js +1 -0
  1185. package/dist/register.maintenance-r_MzNK3-.js +1 -0
  1186. package/dist/register.message-CTF--Z2a.js +1 -0
  1187. package/dist/register.message-jcZ875be.js +1 -0
  1188. package/dist/register.onboard-C3yL50_c.js +1 -0
  1189. package/dist/register.onboard-CNwnStUk.js +1 -0
  1190. package/dist/register.setup-BRJMzgfU.js +1 -0
  1191. package/dist/register.setup-BvsS-zgm.js +1 -0
  1192. package/dist/register.status-health-sessions-DVc__2pc.js +1 -0
  1193. package/dist/register.status-health-sessions-Dqmkw820.js +1 -0
  1194. package/dist/register.subclis-D-24j83X.js +1 -0
  1195. package/dist/registry-BptzrW8D.js +1 -0
  1196. package/dist/registry-hFAtCSWG.js +1 -0
  1197. package/dist/render-BXEUPIHe.js +1 -0
  1198. package/dist/render-CBsnn-2A.js +1 -0
  1199. package/dist/render-D8OWO2hT.js +1 -0
  1200. package/dist/render-DrrPmnMI.js +1 -0
  1201. package/dist/reply-l-Y47HP4.js +1 -0
  1202. package/dist/restart-CHXEHdSC.js +1 -0
  1203. package/dist/rpc-B3ReBNXG.js +1 -0
  1204. package/dist/rpc-DumDLalJ.js +1 -0
  1205. package/dist/run-main-B_YBE_TN.js +1 -0
  1206. package/dist/runtime-BC5Ep2pJ.js +1 -0
  1207. package/dist/runtime-Dlg2-Omq.js +1 -0
  1208. package/dist/runtime-guard-DFYBaYZS.js +1 -0
  1209. package/dist/runtime-guard-DX2Ie4ri.js +1 -0
  1210. package/dist/runtime-status-CqFBmdRd.js +1 -0
  1211. package/dist/runtime-status-DszMjvJK.js +1 -0
  1212. package/dist/runtime-web-tools-D8fms06-.js +1 -0
  1213. package/dist/runtime-web-tools-bz76ZaRc.js +1 -0
  1214. package/dist/sandbox-cli-BDorUBm-.js +1 -0
  1215. package/dist/sandbox-cli-Bq40R5Vs.js +1 -0
  1216. package/dist/scan-paths-C13EseXp.js +1 -0
  1217. package/dist/scan-paths-CWtvWW40.js +1 -0
  1218. package/dist/search-manager-Bp9x20r6.js +1 -0
  1219. package/dist/secret-file-C7JffiM_.js +1 -0
  1220. package/dist/secret-file-D60EFEOe.js +1 -0
  1221. package/dist/secret-file-DuWm26jS.js +1 -0
  1222. package/dist/secrets-cli-Bo6PC32U.js +1 -0
  1223. package/dist/secrets-cli-CoXJv3Jp.js +1 -0
  1224. package/dist/secure-random-D7JQgiK-.js +1 -0
  1225. package/dist/security-cli-CgZL2KKh.js +1 -0
  1226. package/dist/security-cli-DVOfhwAP.js +1 -0
  1227. package/dist/send-B7sHR38c2.js +1 -0
  1228. package/dist/send-Bx2Qr7VH.js +1 -0
  1229. package/dist/send-C-AP01PR.js +1 -0
  1230. package/dist/send-C1CJ-GHU.js +1 -0
  1231. package/dist/send-C48Y9SAq.js +1 -0
  1232. package/dist/send-CVplsJpw.js +1 -0
  1233. package/dist/send-CW81y5Wz.js +1 -0
  1234. package/dist/send-CYgHok1p.js +1 -0
  1235. package/dist/send-Cgd_VJHR.js +1 -0
  1236. package/dist/send-Chz0YMoJ.js +1 -0
  1237. package/dist/send-D9hVVn7p2.js +1 -0
  1238. package/dist/send-DKrzj_Ts.js +1 -0
  1239. package/dist/send-DRLSCwCk.js +1 -0
  1240. package/dist/send-DavpkzhH.js +1 -0
  1241. package/dist/send-DbeEC2a3.js +1 -0
  1242. package/dist/send-DkiKKUkt.js +1 -0
  1243. package/dist/send-DlfVd5mL.js +1 -0
  1244. package/dist/send-JYgM9Sm-2.js +1 -0
  1245. package/dist/send-hZFDcGLM.js +1 -0
  1246. package/dist/send-vthbs31u.js +1 -0
  1247. package/dist/server-DpyBukwA.js +1 -0
  1248. package/dist/server-IgiSKzXH.js +1 -0
  1249. package/dist/server-node-events-CFSY_-4t.js +1 -0
  1250. package/dist/server-node-events-ZFwmPwQ-.js +1 -0
  1251. package/dist/service-BtB9epJk.js +1 -0
  1252. package/dist/service-DZ9EbS15.js +1 -0
  1253. package/dist/session-C9TDmUS7.js +1 -0
  1254. package/dist/session-CUUGjiV3.js +1 -0
  1255. package/dist/session-DA-i5xQ-.js +1 -0
  1256. package/dist/session-bk3gFwO4.js +1 -0
  1257. package/dist/session-cost-usage-BgqKixv0.js +1 -0
  1258. package/dist/session-cost-usage-CHtVgnE8.js +1 -0
  1259. package/dist/session-key-C7F_iqYg.js +1 -0
  1260. package/dist/session-key-D3P0tf5P.js +1 -0
  1261. package/dist/session-utils-8acNlxwP.js +1 -0
  1262. package/dist/sessions-BsxT0V2m.js +1 -0
  1263. package/dist/shared-9x5sqYRb.js +1 -0
  1264. package/dist/shared-BKWhOp64.js +1 -0
  1265. package/dist/shared-GesXrZzd.js +1 -0
  1266. package/dist/skill-commands-BWW6mc6t.js +1 -0
  1267. package/dist/skill-commands-CSF6wVPU.js +1 -0
  1268. package/dist/skill-commands-Db232ZRp.js +1 -0
  1269. package/dist/skill-commands-HJHHZqt6.js +1 -0
  1270. package/dist/skill-scanner-CUUF3Fvo.js +1 -0
  1271. package/dist/skill-scanner-CkxXNioD.js +1 -0
  1272. package/dist/skills-CKTicUKS.js +1 -0
  1273. package/dist/skills-DHbOKEGc.js +1 -0
  1274. package/dist/skills-cli-9Ls94z5H.js +1 -0
  1275. package/dist/skills-cli-BY7OhJzj.js +1 -0
  1276. package/dist/skills-install-CIdGCXSy.js +1 -0
  1277. package/dist/skills-install-DIdiVt9Y.js +1 -0
  1278. package/dist/skills-status-BWIugRCz.js +1 -0
  1279. package/dist/skills-status-DswSl5aD.js +1 -0
  1280. package/dist/sqlite-CILF3z9U.js +1 -0
  1281. package/dist/stagger-DmFYysrJ.js +1 -0
  1282. package/dist/stagger-DxzgG2jd.js +1 -0
  1283. package/dist/status-C-9fSiMn.js +1 -0
  1284. package/dist/status-CeBGmSAz.js +1 -0
  1285. package/dist/status-DYqPF0rB.js +1 -0
  1286. package/dist/status-JIPeVrsc.js +1 -0
  1287. package/dist/status.update-B_8Gumuc.js +1 -0
  1288. package/dist/status.update-DoSzHu2F.js +1 -0
  1289. package/dist/string-normalization-BrUPaXaM.js +1 -0
  1290. package/dist/string-normalization-DJT5zuUF.js +1 -0
  1291. package/dist/subsystem-BLbY429l.js +1 -0
  1292. package/dist/subsystem-Bc2XrjUz.js +1 -0
  1293. package/dist/subsystem-C5XF2Fy5.js +1 -0
  1294. package/dist/system-cli-CeZfoVPN.js +1 -0
  1295. package/dist/system-cli-DZkTYB9d.js +1 -0
  1296. package/dist/system-run-command-BKfMiqQM.js +1 -0
  1297. package/dist/system-run-command-DEWnZE0r.js +1 -0
  1298. package/dist/systemd-D7odsu4K.js +1 -0
  1299. package/dist/systemd-DbevZh65.js +1 -0
  1300. package/dist/systemd-hints-C0DKDl35.js +1 -0
  1301. package/dist/systemd-hints-lXpMy-kY.js +1 -0
  1302. package/dist/systemd-linger-C2MJD6KG.js +1 -0
  1303. package/dist/systemd-linger-cWKbFNpu.js +1 -0
  1304. package/dist/table-CR7TFMew.js +1 -0
  1305. package/dist/table-CY440fI1.js +1 -0
  1306. package/dist/tables-Brc2lNcB.js +1 -0
  1307. package/dist/tables-CrXdLc_6.js +1 -0
  1308. package/dist/tables-Oieq7UbT.js +1 -0
  1309. package/dist/tables-btcG3yFT.js +1 -0
  1310. package/dist/target-errors-CRlevJJ5.js +1 -0
  1311. package/dist/target-errors-CgWAJOam.js +1 -0
  1312. package/dist/target-errors-CpKXh2RS.js +1 -0
  1313. package/dist/target-errors-a35Md15n.js +1 -0
  1314. package/dist/targets-4EaxWBal.js +1 -0
  1315. package/dist/targets-BJTo7bqu.js +1 -0
  1316. package/dist/targets-BYVMrXDf.js +1 -0
  1317. package/dist/targets-Bq6rS6-Z.js +1 -0
  1318. package/dist/targets-CL5fYQi7.js +1 -0
  1319. package/dist/targets-fozeWOOg.js +1 -0
  1320. package/dist/targets-m_41k_Mv.js +1 -0
  1321. package/dist/telegram/audit.js +1 -0
  1322. package/dist/text-format-CvrvBBre.js +1 -0
  1323. package/dist/text-format-DEWK6oCT.js +1 -0
  1324. package/dist/token-DnTmiyJu.js +1 -0
  1325. package/dist/tokens-B2fq-rL6.js +1 -0
  1326. package/dist/tokens-CL2fSjGl.js +1 -0
  1327. package/dist/tokens-DRM8vzJx.js +1 -0
  1328. package/dist/tokens-XGbQGn67.js +1 -0
  1329. package/dist/tool-display-DJDtttQg.js +1 -0
  1330. package/dist/tool-display-DjuSUUbH.js +1 -0
  1331. package/dist/tui-B506apla.js +1 -0
  1332. package/dist/tui-CJUkUxHb.js +1 -0
  1333. package/dist/tui-cli-BEdGHmhc.js +1 -0
  1334. package/dist/tui-cli-Cq_eXDAV.js +1 -0
  1335. package/dist/types.secrets-C-5U96pc.js +1 -0
  1336. package/dist/types.secrets-D4tbc3Wq.js +1 -0
  1337. package/dist/update-BGrxUIyz.js +1 -0
  1338. package/dist/update-CwTy5DPl.js +1 -0
  1339. package/dist/update-cli-BwBMOeP0.js +1 -0
  1340. package/dist/update-cli-YrBbmw4f.js +1 -0
  1341. package/dist/update-runner-BvtyRBD2.js +1 -0
  1342. package/dist/update-runner-DYamgo1V.js +1 -0
  1343. package/dist/usage-format-BWD8FJFL.js +1 -0
  1344. package/dist/usage-format-yPwal8Iz.js +1 -0
  1345. package/dist/utils-CGdo13HV.js +1 -0
  1346. package/dist/utils-D3t-vPka.js +1 -0
  1347. package/dist/utils-R-mFyVJi.js +1 -0
  1348. package/dist/utils-UGOV_184.js +1 -0
  1349. package/dist/version-q3SkUw2K.js +1 -0
  1350. package/dist/warning-filter.js +1 -0
  1351. package/dist/web-Cq3xWCaD.js +1 -0
  1352. package/dist/web-DwcxsgH0.js +1 -0
  1353. package/dist/webhooks-cli-CIeyainW.js +1 -0
  1354. package/dist/webhooks-cli-DSNAve_D.js +1 -0
  1355. package/dist/whatsapp-actions-B6gt1KeB.js +1 -0
  1356. package/dist/whatsapp-actions-DACoH7qd.js +1 -0
  1357. package/dist/whatsapp-actions-iQhIeMya.js +1 -0
  1358. package/dist/whatsapp-actions-tmjID75a.js +1 -0
  1359. package/dist/widearea-dns-BDx7vkV2.js +1 -0
  1360. package/dist/widearea-dns-BFjqKXu_.js +1 -0
  1361. package/dist/windows-spawn-7oINn5ao.js +1 -0
  1362. package/dist/windows-spawn-AB7ItGAE.js +1 -0
  1363. package/dist/with-timeout-WveKxvFV.js +1 -0
  1364. package/dist/with-timeout-c1CzdShT.js +1 -0
  1365. package/dist/workspace-B0ZQeHXg.js +1 -0
  1366. package/dist/workspace-C45T1Cxg.js +1 -0
  1367. package/dist/workspace-dirs-A8Vib9_B.js +1 -0
  1368. package/dist/workspace-dirs-BhF1Dzxt.js +1 -0
  1369. package/dist/workspace-xNEpaJvu.js +1 -0
  1370. package/dist/wsl-DHxB2Ew_.js +1 -0
  1371. package/dist/wsl-Ok7GaSJ6.js +1 -0
  1372. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
  1373. package/node_modules/@aws-sdk/token-providers/package.json +1 -1
  1374. package/node_modules/@grammyjs/types/package.json +1 -1
  1375. package/node_modules/@line/bot-sdk/dist/channel-access-token/api/channelAccessTokenClient.js +49 -3
  1376. package/node_modules/@line/bot-sdk/dist/cjs/channel-access-token/api/channelAccessTokenClient.js +49 -3
  1377. package/node_modules/@line/bot-sdk/dist/cjs/client.js +636 -0
  1378. package/node_modules/@line/bot-sdk/dist/cjs/endpoints.js +7 -0
  1379. package/node_modules/@line/bot-sdk/dist/cjs/exceptions.js +15 -1
  1380. package/node_modules/@line/bot-sdk/dist/cjs/http-axios.js +2 -6
  1381. package/node_modules/@line/bot-sdk/dist/cjs/http-fetch.js +5 -13
  1382. package/node_modules/@line/bot-sdk/dist/cjs/index.js +3 -1
  1383. package/node_modules/@line/bot-sdk/dist/cjs/insight/api/insightClient.js +3 -0
  1384. package/node_modules/@line/bot-sdk/dist/cjs/liff/api/liffClient.js +3 -0
  1385. package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.factory.generated.js +66 -0
  1386. package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.generated.js +1999 -0
  1387. package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.js +61 -0
  1388. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceBlobClient.js +3 -0
  1389. package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceClient.js +3 -0
  1390. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiBlobClient.js +3 -0
  1391. package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiClient.js +3 -0
  1392. package/node_modules/@line/bot-sdk/dist/cjs/module/api/lineModuleClient.js +3 -0
  1393. package/node_modules/@line/bot-sdk/dist/cjs/module-attach/api/lineModuleAttachClient.js +3 -0
  1394. package/node_modules/@line/bot-sdk/dist/cjs/shop/api/shopClient.js +3 -0
  1395. package/node_modules/@line/bot-sdk/dist/cjs/utils.js +10 -0
  1396. package/node_modules/@line/bot-sdk/dist/cjs/version.js +1 -1
  1397. package/node_modules/@line/bot-sdk/dist/client.js +636 -0
  1398. package/node_modules/@line/bot-sdk/dist/endpoints.js +7 -0
  1399. package/node_modules/@line/bot-sdk/dist/exceptions.js +15 -1
  1400. package/node_modules/@line/bot-sdk/dist/http-axios.js +2 -6
  1401. package/node_modules/@line/bot-sdk/dist/http-fetch.js +5 -13
  1402. package/node_modules/@line/bot-sdk/dist/index.js +1 -0
  1403. package/node_modules/@line/bot-sdk/dist/insight/api/insightClient.js +3 -0
  1404. package/node_modules/@line/bot-sdk/dist/liff/api/liffClient.js +3 -0
  1405. package/node_modules/@line/bot-sdk/dist/line-bot-client.factory.generated.js +63 -0
  1406. package/node_modules/@line/bot-sdk/dist/line-bot-client.generated.js +1995 -0
  1407. package/node_modules/@line/bot-sdk/dist/line-bot-client.js +58 -0
  1408. package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceBlobClient.js +3 -0
  1409. package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceClient.js +3 -0
  1410. package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiBlobClient.js +3 -0
  1411. package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiClient.js +3 -0
  1412. package/node_modules/@line/bot-sdk/dist/module/api/lineModuleClient.js +3 -0
  1413. package/node_modules/@line/bot-sdk/dist/module-attach/api/lineModuleAttachClient.js +3 -0
  1414. package/node_modules/@line/bot-sdk/dist/shop/api/shopClient.js +3 -0
  1415. package/node_modules/@line/bot-sdk/dist/utils.js +9 -0
  1416. package/node_modules/@line/bot-sdk/dist/version.js +1 -1
  1417. package/node_modules/@line/bot-sdk/package.json +10 -7
  1418. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/clipboard.linux-x64-gnu.node +0 -0
  1419. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/package.json +25 -0
  1420. package/node_modules/@mariozechner/clipboard-linux-x64-musl/clipboard.linux-x64-musl.node +0 -0
  1421. package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +25 -0
  1422. package/node_modules/@slack/bolt/dist/App.js +22 -30
  1423. package/node_modules/@slack/bolt/dist/Assistant.js +21 -37
  1424. package/node_modules/@slack/bolt/dist/CustomFunction.js +1 -43
  1425. package/node_modules/@slack/bolt/dist/context/create-function-complete.js +23 -0
  1426. package/node_modules/@slack/bolt/dist/context/create-function-fail.js +23 -0
  1427. package/node_modules/@slack/bolt/dist/context/create-respond.js +11 -0
  1428. package/node_modules/@slack/bolt/dist/context/create-say-stream.js +16 -0
  1429. package/node_modules/@slack/bolt/dist/context/create-say.js +17 -0
  1430. package/node_modules/@slack/bolt/dist/context/create-set-status.js +21 -0
  1431. package/node_modules/@slack/bolt/dist/context/index.js +16 -0
  1432. package/node_modules/@slack/bolt/dist/helpers.js +79 -3
  1433. package/node_modules/@slack/bolt/dist/index.js +10 -8
  1434. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +5 -1
  1435. package/node_modules/@slack/bolt/dist/types/events/index.js +0 -4
  1436. package/node_modules/@slack/bolt/package.json +7 -7
  1437. package/node_modules/@smithy/config-resolver/package.json +10 -11
  1438. package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +6 -0
  1439. package/node_modules/@smithy/core/dist-cjs/index.js +1 -1
  1440. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +21 -0
  1441. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +21 -0
  1442. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +46 -0
  1443. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +6 -0
  1444. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +24 -0
  1445. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +19 -0
  1446. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +27 -0
  1447. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +5 -0
  1448. package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +10 -0
  1449. package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +44 -0
  1450. package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +5 -0
  1451. package/node_modules/@smithy/core/dist-cjs/setFeature.js +14 -0
  1452. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +17 -0
  1453. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +38 -0
  1454. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +15 -0
  1455. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +6 -0
  1456. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +9 -0
  1457. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +6 -0
  1458. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +61 -0
  1459. package/node_modules/@smithy/core/package.json +15 -16
  1460. package/node_modules/@smithy/credential-provider-imds/package.json +9 -10
  1461. package/node_modules/@smithy/eventstream-codec/dist-cjs/index.js +13 -0
  1462. package/node_modules/@smithy/eventstream-codec/package.json +6 -7
  1463. package/node_modules/@smithy/eventstream-serde-browser/package.json +7 -8
  1464. package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +7 -8
  1465. package/node_modules/@smithy/eventstream-serde-node/package.json +7 -8
  1466. package/node_modules/@smithy/eventstream-serde-universal/package.json +9 -10
  1467. package/node_modules/@smithy/fetch-http-handler/package.json +12 -13
  1468. package/node_modules/@smithy/hash-node/package.json +6 -7
  1469. package/node_modules/@smithy/invalid-dependency/package.json +6 -7
  1470. package/node_modules/@smithy/middleware-content-length/package.json +7 -8
  1471. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +2 -2
  1472. package/node_modules/@smithy/middleware-endpoint/package.json +13 -14
  1473. package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +70 -29
  1474. package/node_modules/@smithy/middleware-retry/dist-es/index.js +5 -4
  1475. package/node_modules/@smithy/middleware-retry/dist-es/longPollMiddleware.js +15 -0
  1476. package/node_modules/@smithy/middleware-retry/dist-es/parseRetryAfterHeader.js +49 -0
  1477. package/node_modules/@smithy/middleware-retry/dist-es/{StandardRetryStrategy.js → retry-pre-sra-deprecated/StandardRetryStrategy.js} +1 -1
  1478. package/node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js +13 -20
  1479. package/node_modules/@smithy/middleware-retry/package.json +16 -16
  1480. package/node_modules/@smithy/middleware-serde/package.json +10 -11
  1481. package/node_modules/@smithy/middleware-stack/package.json +7 -8
  1482. package/node_modules/@smithy/node-config-provider/package.json +8 -9
  1483. package/node_modules/@smithy/node-http-handler/package.json +10 -11
  1484. package/node_modules/@smithy/property-provider/package.json +6 -7
  1485. package/node_modules/@smithy/protocol-http/package.json +6 -7
  1486. package/node_modules/@smithy/querystring-builder/package.json +6 -7
  1487. package/node_modules/@smithy/querystring-parser/package.json +6 -7
  1488. package/node_modules/@smithy/service-error-classification/package.json +6 -7
  1489. package/node_modules/@smithy/shared-ini-file-loader/package.json +7 -8
  1490. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +13 -0
  1491. package/node_modules/@smithy/signature-v4/package.json +9 -10
  1492. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +1 -1
  1493. package/node_modules/@smithy/smithy-client/package.json +14 -15
  1494. package/node_modules/@smithy/types/package.json +7 -8
  1495. package/node_modules/@smithy/url-parser/package.json +7 -8
  1496. package/node_modules/@smithy/util-defaults-mode-browser/package.json +8 -9
  1497. package/node_modules/@smithy/util-defaults-mode-node/package.json +11 -12
  1498. package/node_modules/@smithy/util-endpoints/package.json +9 -10
  1499. package/node_modules/@smithy/util-middleware/package.json +6 -7
  1500. package/node_modules/@smithy/util-retry/dist-cjs/index.js +123 -76
  1501. package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +7 -4
  1502. package/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +2 -2
  1503. package/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +24 -25
  1504. package/node_modules/@smithy/util-retry/dist-es/DefaultRetryBackoffStrategy.js +14 -0
  1505. package/node_modules/@smithy/util-retry/dist-es/DefaultRetryToken.js +25 -0
  1506. package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +39 -26
  1507. package/node_modules/@smithy/util-retry/dist-es/index.js +1 -0
  1508. package/node_modules/@smithy/util-retry/dist-es/retries-2026-config.js +18 -0
  1509. package/node_modules/@smithy/util-retry/package.json +10 -11
  1510. package/node_modules/@smithy/util-stream/package.json +12 -13
  1511. package/node_modules/@snazzah/davey-linux-x64-gnu/davey.linux-x64-gnu.node +0 -0
  1512. package/node_modules/@snazzah/davey-linux-x64-gnu/package.json +43 -0
  1513. package/node_modules/@snazzah/davey-linux-x64-musl/davey.linux-x64-musl.node +0 -0
  1514. package/node_modules/@snazzah/davey-linux-x64-musl/package.json +43 -0
  1515. package/node_modules/dotenv/lib/main.js +1 -1
  1516. package/node_modules/dotenv/package.json +1 -1
  1517. package/node_modules/dotenv/skills/dotenv/SKILL.md +32 -52
  1518. package/node_modules/dotenv/skills/dotenvx/SKILL.md +57 -273
  1519. package/node_modules/grammy/out/bot.js +1 -0
  1520. package/node_modules/grammy/out/context.js +35 -0
  1521. package/node_modules/grammy/out/convenience/keyboard.js +30 -2
  1522. package/node_modules/grammy/out/core/api.js +34 -0
  1523. package/node_modules/grammy/out/filter.js +6 -2
  1524. package/node_modules/grammy/out/web.mjs +58 -10
  1525. package/node_modules/grammy/package.json +2 -2
  1526. package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +12 -0
  1527. package/node_modules/lru-cache/dist/commonjs/index.js +227 -130
  1528. package/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  1529. package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
  1530. package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +17 -0
  1531. package/node_modules/lru-cache/dist/esm/index.js +227 -130
  1532. package/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  1533. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +1 -0
  1534. package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +8 -0
  1535. package/node_modules/lru-cache/dist/esm/node/index.js +1688 -0
  1536. package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
  1537. package/node_modules/lru-cache/package.json +29 -9
  1538. package/node_modules/netmask/dist/netmask.js +58 -0
  1539. package/node_modules/netmask/dist/netmask4.js +189 -0
  1540. package/node_modules/netmask/dist/netmask6.js +187 -0
  1541. package/node_modules/netmask/package.json +15 -6
  1542. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
  1543. package/node_modules/path-expression-matcher/lib/pem.d.cts +93 -0
  1544. package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
  1545. package/node_modules/path-expression-matcher/package.json +1 -1
  1546. package/node_modules/path-expression-matcher/src/ExpressionSet.js +189 -0
  1547. package/node_modules/path-expression-matcher/src/Matcher.js +50 -20
  1548. package/node_modules/path-expression-matcher/src/index.js +3 -2
  1549. package/node_modules/strnum/package.json +1 -1
  1550. package/package.json +1 -1
  1551. package/preset-config.json +12 -0
  1552. package/node_modules/@smithy/util-retry/dist-es/defaultRetryBackoffStrategy.js +0 -14
  1553. package/node_modules/@smithy/util-retry/dist-es/defaultRetryToken.js +0 -11
  1554. package/node_modules/netmask/CREDITS.md +0 -30
  1555. package/node_modules/netmask/lib/netmask.coffee +0 -167
  1556. package/node_modules/netmask/lib/netmask.js +0 -208
  1557. package/node_modules/strnum/.github/SECURITY.md +0 -5
  1558. package/node_modules/strnum/.vscode/launch.json +0 -25
  1559. package/node_modules/strnum/algo.stflow +0 -84
  1560. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
  1561. /package/node_modules/@smithy/middleware-retry/dist-es/{AdaptiveRetryStrategy.js → retry-pre-sra-deprecated/AdaptiveRetryStrategy.js} +0 -0
  1562. /package/node_modules/@smithy/middleware-retry/dist-es/{defaultRetryQuota.js → retry-pre-sra-deprecated/defaultRetryQuota.js} +0 -0
  1563. /package/node_modules/@smithy/middleware-retry/dist-es/{delayDecider.js → retry-pre-sra-deprecated/delayDecider.js} +0 -0
  1564. /package/node_modules/@smithy/middleware-retry/dist-es/{retryDecider.js → retry-pre-sra-deprecated/retryDecider.js} +0 -0
  1565. /package/node_modules/@smithy/middleware-retry/dist-es/{types.js → retry-pre-sra-deprecated/types.js} +0 -0
@@ -1,3 +1,4 @@
1
1
  import{h as e}from"./utils-UGOV_184.js";import{$ as t,K as n,Q as r,V as i,Y as a}from"./reply-l-Y47HP4.js";import{t as o}from"./exec-DHqLtFYt.js";import{i as s,r as c,t as l}from"./stagger-DmFYysrJ.js";import{c as u}from"./daemon-install-plan.shared-CfA37Ut_.js";import{i as d,r as f}from"./control-ui-assets-BIa0GGDg.js";import{f as p,l as m,p as h,r as g,s as _,u as v}from"./channel-account-context-BMPAMZEv.js";import y from"node:os";import b from"node:path";import x from"node:fs/promises";import{Cron as S}from"croner";const C=new Map;function w(e){return(typeof e==`string`?e.trim():``)||Intl.DateTimeFormat().resolvedOptions().timeZone}function T(e,t){let n=`${t}\u0000${e}`,r=C.get(n);if(r)return r;if(C.size>=512){let e=C.keys().next().value;e&&C.delete(e)}let i=new S(e,{timezone:t,catch:!1});return C.set(n,i),i}function E(e){let t=typeof e.expr==`string`?e.expr:e.cron;if(typeof t!=`string`)throw Error(`invalid cron schedule: expr is required`);let n=t.trim();if(n)return T(n,w(e.tz))}function D(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(typeof e==`string`){let t=e.trim();if(!t)return;let n=Number(t);return Number.isFinite(n)?n:void 0}}function O(e,t){if(e.kind===`at`){let n=e,r=typeof n.atMs==`number`&&Number.isFinite(n.atMs)&&n.atMs>0?n.atMs:typeof n.atMs==`string`?s(n.atMs):typeof n.at==`string`?s(n.at):null;return r===null?void 0:r>t?r:void 0}if(e.kind===`every`){let n=D(e.everyMs);if(n===void 0)return;let r=Math.max(1,Math.floor(n)),i=D(e.anchorMs),a=Math.max(0,Math.floor(i??t));if(t<a)return a;let o=t-a;return a+Math.max(1,Math.floor((o+r-1)/r))*r}let n=E(e);if(!n)return;let r=n.nextRun(new Date(t));if(!r)return;let i=r.getTime();if(Number.isFinite(i)){if(i<=t){let e=Math.floor(t/1e3)*1e3+1e3,r=n.nextRun(new Date(e));if(r){let e=r.getTime();if(Number.isFinite(e)&&e>t)return e}let i=new Date(t).setUTCHours(24,0,0,0),a=n.nextRun(new Date(i));if(a){let e=a.getTime();if(Number.isFinite(e)&&e>t)return e}return}return i}}function k(e,t){if(e.kind!==`cron`)return;let n=E(e);if(!n)return;let r=n.previousRuns(1,new Date(t))[0];if(!r)return;let i=r.getTime();if(Number.isFinite(i)&&!(i>=t))return i}function A(e,t){e[t]=(e[t]??0)+1}function j(e){let t=typeof e.kind==`string`?e.kind.trim().toLowerCase():``;return t===`agentturn`?(e.kind=`agentTurn`,!0):t===`systemevent`?(e.kind=`systemEvent`,!0):!1}function M(e){let t=typeof e.message==`string`?e.message.trim():``,n=typeof e.text==`string`?e.text.trim():``,r=typeof e.command==`string`?e.command.trim():``;return t?(e.payload={kind:`agentTurn`,message:t},!0):n?(e.payload={kind:`systemEvent`,text:n},!0):r?(e.payload={kind:`systemEvent`,text:r},!0):!1}function N(e,t){let n=!1,r=r=>{let i=t[r];if(typeof i==`string`&&i.trim())return;let a=e[r];typeof a==`string`&&a.trim()&&(t[r]=a.trim(),n=!0)};return r(`model`),r(`thinking`),typeof t.timeoutSeconds!=`number`&&typeof e.timeoutSeconds==`number`&&Number.isFinite(e.timeoutSeconds)&&(t.timeoutSeconds=Math.max(0,Math.floor(e.timeoutSeconds)),n=!0),typeof t.allowUnsafeExternalContent!=`boolean`&&typeof e.allowUnsafeExternalContent==`boolean`&&(t.allowUnsafeExternalContent=e.allowUnsafeExternalContent,n=!0),typeof t.deliver!=`boolean`&&typeof e.deliver==`boolean`&&(t.deliver=e.deliver,n=!0),typeof t.channel!=`string`&&typeof e.channel==`string`&&e.channel.trim()&&(t.channel=e.channel.trim(),n=!0),typeof t.to!=`string`&&typeof e.to==`string`&&e.to.trim()&&(t.to=e.to.trim(),n=!0),typeof t.bestEffortDeliver!=`boolean`&&typeof e.bestEffortDeliver==`boolean`&&(t.bestEffortDeliver=e.bestEffortDeliver,n=!0),typeof t.provider!=`string`&&typeof e.provider==`string`&&e.provider.trim()&&(t.provider=e.provider.trim(),n=!0),n}function ee(e){`model`in e&&delete e.model,`thinking`in e&&delete e.thinking,`timeoutSeconds`in e&&delete e.timeoutSeconds,`allowUnsafeExternalContent`in e&&delete e.allowUnsafeExternalContent,`message`in e&&delete e.message,`text`in e&&delete e.text,`deliver`in e&&delete e.deliver,`channel`in e&&delete e.channel,`to`in e&&delete e.to,`bestEffortDeliver`in e&&delete e.bestEffortDeliver,`provider`in e&&delete e.provider,`command`in e&&delete e.command,`timeout`in e&&delete e.timeout}function P(e){let i={},o=!1;for(let u of e){let e=new Set,d=t=>{e.has(t)||(e.add(t),A(i,t))},f=u.state;(!f||typeof f!=`object`||Array.isArray(f))&&(u.state={},o=!0);let p=typeof u.id==`string`?u.id.trim():``,m=typeof u.jobId==`string`?u.jobId.trim():``;!p&&m?(u.id=m,o=!0,d(`jobId`)):p&&u.id!==p&&(u.id=p,o=!0),`jobId`in u&&(delete u.jobId,o=!0,d(`jobId`)),typeof u.schedule==`string`&&(u.schedule={kind:`cron`,expr:u.schedule.trim()},o=!0,d(`legacyScheduleString`));let h=u.name;typeof h!=`string`||h.trim().length===0?(u.name=n({schedule:u.schedule,payload:u.payload}),o=!0):u.name=h.trim();let g=a(u.description);if(u.description!==g&&(u.description=g,o=!0),`sessionKey`in u){let e=typeof u.sessionKey==`string`?a(u.sessionKey):void 0;u.sessionKey!==e&&(u.sessionKey=e,o=!0)}typeof u.enabled!=`boolean`&&(u.enabled=!0,o=!0);let _=typeof u.wakeMode==`string`?u.wakeMode.trim().toLowerCase():``;_===`next-heartbeat`?u.wakeMode!==`next-heartbeat`&&(u.wakeMode=`next-heartbeat`,o=!0):_===`now`?u.wakeMode!==`now`&&(u.wakeMode=`now`,o=!0):(u.wakeMode=`now`,o=!0);let v=u.payload;(!v||typeof v!=`object`||Array.isArray(v))&&M(u)&&(o=!0,d(`legacyTopLevelPayloadFields`));let y=u.payload&&typeof u.payload==`object`&&!Array.isArray(u.payload)?u.payload:null;y&&(j(y)&&(o=!0,d(`legacyPayloadKind`)),y.kind||(typeof y.message==`string`&&y.message.trim()?(y.kind=`agentTurn`,o=!0,d(`legacyPayloadKind`)):typeof y.text==`string`&&y.text.trim()&&(y.kind=`systemEvent`,o=!0,d(`legacyPayloadKind`))),y.kind===`agentTurn`&&N(u,y)&&(o=!0));let b=`model`in u||`thinking`in u||`timeoutSeconds`in u||`allowUnsafeExternalContent`in u||`message`in u||`text`in u||`command`in u||`timeout`in u,x=`deliver`in u||`channel`in u||`to`in u||`bestEffortDeliver`in u||`provider`in u;if((b||x)&&(ee(u),o=!0,b&&d(`legacyTopLevelPayloadFields`),x&&d(`legacyTopLevelDeliveryFields`)),y){let e=typeof y.provider==`string`&&y.provider.trim().length>0;r(y)&&(o=!0,e&&d(`legacyPayloadProvider`))}let S=u.schedule;if(S&&typeof S==`object`&&!Array.isArray(S)){let e=S,t=typeof e.kind==`string`?e.kind.trim().toLowerCase():``;!t&&(`at`in e||`atMs`in e)&&(e.kind=`at`,o=!0);let n=typeof e.at==`string`?e.at.trim():``,r=e.atMs,i=typeof r==`number`?r:typeof r==`string`?s(r):n?s(n):null;i!==null&&(e.at=new Date(i).toISOString(),`atMs`in e&&delete e.atMs,o=!0);let a=e.everyMs,f=D(a),p=f===void 0?null:Math.floor(f);if(p!==null&&a!==p&&(e.everyMs=p,o=!0),(t===`every`||e.kind===`every`)&&p!==null){let t=e.anchorMs,n=D(t),r=n===void 0?typeof u.createdAtMs==`number`&&Number.isFinite(u.createdAtMs)?Math.max(0,Math.floor(u.createdAtMs)):typeof u.updatedAtMs==`number`&&Number.isFinite(u.updatedAtMs)?Math.max(0,Math.floor(u.updatedAtMs)):null:Math.max(0,Math.floor(n));r!==null&&t!==r&&(e.anchorMs=r,o=!0)}let m=typeof e.expr==`string`?e.expr.trim():``,h=typeof e.cron==`string`?e.cron.trim():``,g=m;if(!g&&h&&(g=h,e.expr=g,o=!0,d(`legacyScheduleCron`)),typeof e.expr==`string`&&e.expr!==g&&(e.expr=g,o=!0),`cron`in e&&(delete e.cron,o=!0,d(`legacyScheduleCron`)),(t===`cron`||e.kind===`cron`)&&g){let t=l(e.staggerMs),n=c(g),r=t??n;r===void 0?`staggerMs`in e&&(delete e.staggerMs,o=!0):e.staggerMs!==r&&(e.staggerMs=r,o=!0)}}let C=u.delivery;if(C&&typeof C==`object`&&!Array.isArray(C)){let e=C.mode;typeof e==`string`?e.trim().toLowerCase()===`deliver`&&(C.mode=`announce`,o=!0,d(`legacyDeliveryMode`)):e??(C.mode=`announce`,o=!0)}let w=u.isolation;w&&typeof w==`object`&&!Array.isArray(w)&&(delete u.isolation,o=!0);let T=y&&typeof y.kind==`string`?y.kind:``,E=typeof u.sessionTarget==`string`?u.sessionTarget.trim().toLowerCase():``;if(E===`main`||E===`isolated`)u.sessionTarget!==E&&(u.sessionTarget=E,o=!0);else{let e=T===`agentTurn`?`isolated`:`main`;u.sessionTarget!==e&&(u.sessionTarget=e,o=!0)}let O=typeof u.sessionTarget==`string`?u.sessionTarget.trim().toLowerCase():``,k=O===`isolated`||O===``&&T===`agentTurn`,P=C&&typeof C==`object`&&!Array.isArray(C),F=t({delivery:P?C:null,payload:y});k&&T===`agentTurn`?!P&&F.delivery?(u.delivery=F.delivery,o=!0):P?F.mutated&&F.delivery&&(u.delivery=F.delivery,o=!0):(u.delivery={mode:`announce`},o=!0):F.mutated&&F.delivery&&(u.delivery=F.delivery,o=!0)}return{issues:i,jobs:e,mutated:o}}async function F(e){try{let t=await x.readFile(b.join(e,`package.json`),`utf-8`),n=JSON.parse(t);return typeof n?.version==`string`?n.version:null}catch{return null}}async function I(e){try{let t=await x.readFile(b.join(e,`package.json`),`utf-8`);return JSON.parse(t)?.name?.trim()||null}catch{return null}}function L(e,t){let n=e?.trim();if(!n)return null;for(let e of t){let t=`${e}@`;if(n.startsWith(t))return n.slice(t.length)}return n}const R=`openclaw`,z=[R],B=[`--no-fund`,`--no-audit`,`--loglevel=error`],te=[`--omit=optional`,...B];async function V(e){try{return await x.realpath(e)}catch{return b.resolve(e)}}function H(){let e=process.env.BUN_INSTALL?.trim()||b.join(y.homedir(),`.bun`);return b.join(e,`install`,`global`,`node_modules`)}async function U(e,t,n){if(e===`bun`)return H();let r=await t(e===`pnpm`?[`pnpm`,`root`,`-g`]:[`npm`,`root`,`-g`],{timeoutMs:n}).catch(()=>null);return!r||r.code!==0?null:r.stdout.trim()||null}async function ne(e,t,n){let r=await U(e,t,n);return r?b.join(r,R):null}async function W(e,t,n){let r=await V(t);for(let{manager:t,argv:i}of[{manager:`npm`,argv:[`npm`,`root`,`-g`]},{manager:`pnpm`,argv:[`pnpm`,`root`,`-g`]}]){let a=await e(i,{timeoutMs:n}).catch(()=>null);if(!a||a.code!==0)continue;let o=a.stdout.trim();if(!o)continue;let s=await V(o);for(let e of z){let n=await V(b.join(s,e));if(b.resolve(n)===b.resolve(r))return t}}let i=await V(H());for(let e of z){let t=await V(b.join(i,e));if(b.resolve(t)===b.resolve(r))return`bun`}return null}async function re(t,n){for(let r of[`npm`,`pnpm`]){let i=await U(r,t,n);if(i){for(let t of z)if(await e(b.join(i,t)))return r}}let r=H();for(let t of z)if(await e(b.join(r,t)))return`bun`;return null}function G(e,t){return e===`pnpm`?[`pnpm`,`add`,`-g`,t]:e===`bun`?[`bun`,`add`,`-g`,t]:[`npm`,`i`,`-g`,t,...B]}function ie(e,t){return e===`npm`?[`npm`,`i`,`-g`,t,...te]:null}async function K(e){let t=[],n=e.globalRoot.trim(),r=e.packageName.trim();if(!n||!r)return{removed:t};let i=`.${r}-`,a=[];try{a=await x.readdir(n)}catch{return{removed:t}}for(let e of a){if(!e.startsWith(i))continue;let r=b.join(n,e);try{if(!(await x.lstat(r)).isDirectory())continue;await x.rm(r,{recursive:!0,force:!0}),t.push(e)}catch{}}return{removed:t}}const q=8e3,ae=[`cwd`,`argv1`,`process`],J=`openclaw`,oe=new Set([J]);function Y(e){if(!e)return null;let t=e.trim();return t?b.resolve(t):null}function se(e){let t=b.resolve(e),n=t.split(b.sep),r=n.lastIndexOf(`.bin`);if(r<=0||n[r-1]!==`node_modules`)return null;let i=b.basename(t),a=n.slice(0,r).join(b.sep);return b.join(a,i)}function ce(e){let t=[],n=Y(e.cwd);n&&t.push(n);let r=Y(e.argv1);if(r){t.push(b.dirname(r));let e=se(r);e&&t.push(e)}let i=Y(process.cwd());return i&&t.push(i),Array.from(new Set(t))}async function le(e,t,n){let r=await e([`git`,`-C`,t,`rev-parse`,`--abbrev-ref`,`HEAD`],{timeoutMs:n}).catch(()=>null);return!r||r.code!==0?null:r.stdout.trim()||null}async function ue(e,t,n,r=`v*`){let i=await e([`git`,`-C`,t,`tag`,`--list`,r,`--sort=-v:refname`],{timeoutMs:n}).catch(()=>null);return!i||i.code!==0?[]:i.stdout.split(`
2
2
  `).map(e=>e.trim()).filter(Boolean)}async function de(e,t,n,r){let i=await ue(e,t,n);if(r===`beta`){let e=i.find(e=>p(e))??null,t=i.find(e=>h(e))??null;if(!e)return t;if(!t)return e;let n=g(e,t);return n!=null&&n<0?t:e}return i.find(e=>h(e))??null}async function fe(e,t,n){for(let r of t){let t=await e([`git`,`-C`,r,`rev-parse`,`--show-toplevel`],{timeoutMs:n});if(t.code===0){let e=t.stdout.trim();if(e)return e}}return null}async function pe(e){for(let t of e){let e=t;for(let t=0;t<12;t+=1){let t=b.join(e,`package.json`);try{let n=await x.readFile(t,`utf-8`),r=JSON.parse(n)?.name?.trim();if(r&&oe.has(r))return e}catch{}let n=b.dirname(e);if(n===e)break;e=n}}return null}async function X(e){return await _(e)??`npm`}async function Z(e){let{runCommand:t,name:n,argv:r,cwd:a,timeoutMs:o,env:s,progress:c,stepIndex:l,totalSteps:u}=e,d=r.join(` `),f={name:n,command:d,index:l,total:u};c?.onStepStart?.(f);let p=Date.now(),m=await t(r,{cwd:a,timeoutMs:o,env:s}),h=Date.now()-p,g=i(m.stderr,q);return c?.onStepComplete?.({...f,durationMs:h,exitCode:m.code,stderrTail:g}),{name:n,command:d,cwd:a,durationMs:h,exitCode:m.code,stdoutTail:i(m.stdout,q),stderrTail:i(m.stderr,q)}}function Q(e,t,n=[]){return e===`pnpm`?[`pnpm`,t,...n]:e===`bun`?[`bun`,`run`,t,...n]:n.length>0?[`npm`,`run`,t,`--`,...n]:[`npm`,`run`,t]}function $(e){return e===`pnpm`?[`pnpm`,`install`]:e===`bun`?[`bun`,`install`]:[`npm`,`install`]}function me(e){return L(e,[`openclaw`,J])??`latest`}async function he(e={}){let t=Date.now(),n=e.runCommand??(async(e,t)=>{let n=await o(e,t);return{stdout:n.stdout,stderr:n.stderr,code:n.code}}),r=e.timeoutMs??12e5,a=e.progress,s=[],c=ce(e),l=0,p=0,h=(e,t,i,o)=>{let s=l;return l+=1,{runCommand:n,name:e,argv:t,cwd:i,timeoutMs:r,env:o,progress:a,stepIndex:s,totalSteps:p}},g=await pe(c),_=await fe(n,c,r);if(_&&g&&b.resolve(_)!==b.resolve(g)&&(_=null),_&&!g)return{status:`error`,mode:`unknown`,root:_,reason:`not-openclaw-root`,steps:[],durationMs:Date.now()-t};if(_&&g&&b.resolve(_)===b.resolve(g)){let a=(await n([`git`,`-C`,_,`rev-parse`,`HEAD`],{cwd:_,timeoutMs:r})).stdout.trim()||null,o=await F(_),c=e.channel??`dev`,l=c===`dev`?await le(n,_,r):null,g=c===`dev`&&l!==`main`;p=c===`dev`?g?11:10:9;let v=e=>({status:`error`,mode:`git`,root:_,reason:e,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t}),S=async(e,t)=>{let n=await Z(h(e,t,_));return s.push(n),n.exitCode===0?null:v(`checkout-failed`)},C=await Z(h(`clean check`,[`git`,`-C`,_,`status`,`--porcelain`,`--`,`:!dist/control-ui/`],_));if(s.push(C),C.stdoutTail&&C.stdoutTail.trim().length>0)return{status:`skipped`,mode:`git`,root:_,reason:`dirty`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};if(c===`dev`){if(g){let e=await S(`git checkout ${m}`,[`git`,`-C`,_,`checkout`,m]);if(e)return e}let e=await Z(h(`upstream check`,[`git`,`-C`,_,`rev-parse`,`--abbrev-ref`,`--symbolic-full-name`,`@{upstream}`],_));if(s.push(e),e.exitCode!==0)return{status:`skipped`,mode:`git`,root:_,reason:`no-upstream`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let c=await Z(h(`git fetch`,[`git`,`-C`,_,`fetch`,`--all`,`--prune`,`--tags`],_));s.push(c);let l=await Z(h(`git rev-parse @{upstream}`,[`git`,`-C`,_,`rev-parse`,`@{upstream}`],_));s.push(l);let u=l.stdoutTail?.trim();if(!l.stdoutTail||!u)return{status:`error`,mode:`git`,root:_,reason:`no-upstream-sha`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let d=await Z(h(`git rev-list`,[`git`,`-C`,_,`rev-list`,`--max-count=10`,u],_));if(s.push(d),d.exitCode!==0)return{status:`error`,mode:`git`,root:_,reason:`preflight-revlist-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let f=(d.stdoutTail??``).split(`
3
3
  `).map(e=>e.trim()).filter(Boolean);if(f.length===0)return{status:`error`,mode:`git`,root:_,reason:`preflight-no-candidates`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let p=await X(_),v=await x.mkdtemp(b.join(y.tmpdir(),`openclaw-update-preflight-`)),C=b.join(v,`worktree`),w=await Z(h(`preflight worktree`,[`git`,`-C`,_,`worktree`,`add`,`--detach`,C,u],_));if(s.push(w),w.exitCode!==0)return await x.rm(v,{recursive:!0,force:!0}).catch(()=>{}),{status:`error`,mode:`git`,root:_,reason:`preflight-worktree-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let T=null;try{for(let e of f){let t=e.slice(0,8),n=await Z(h(`preflight checkout (${t})`,[`git`,`-C`,C,`checkout`,`--detach`,e],C));if(s.push(n),n.exitCode!==0)continue;let r=await Z(h(`preflight deps install (${t})`,$(p),C));if(s.push(r),r.exitCode!==0)continue;let i=await Z(h(`preflight build (${t})`,Q(p,`build`),C));if(s.push(i),i.exitCode!==0)continue;let a=await Z(h(`preflight lint (${t})`,Q(p,`lint`),C));if(s.push(a),a.exitCode===0){T=e;break}}}finally{let e=await Z(h(`preflight cleanup`,[`git`,`-C`,_,`worktree`,`remove`,`--force`,C],_));s.push(e),await n([`git`,`-C`,_,`worktree`,`prune`],{cwd:_,timeoutMs:r}).catch(()=>null),await x.rm(v,{recursive:!0,force:!0}).catch(()=>{})}if(!T)return{status:`error`,mode:`git`,root:_,reason:`preflight-no-good-commit`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let E=await Z(h(`git rebase`,[`git`,`-C`,_,`rebase`,T],_));if(s.push(E),E.exitCode!==0){let e=await n([`git`,`-C`,_,`rebase`,`--abort`],{cwd:_,timeoutMs:r});return s.push({name:`git rebase --abort`,command:`git rebase --abort`,cwd:_,durationMs:0,exitCode:e.code,stdoutTail:i(e.stdout,q),stderrTail:i(e.stderr,q)}),{status:`error`,mode:`git`,root:_,reason:`rebase-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t}}}else{let e=await Z(h(`git fetch`,[`git`,`-C`,_,`fetch`,`--all`,`--prune`,`--tags`],_));if(s.push(e),e.exitCode!==0)return{status:`error`,mode:`git`,root:_,reason:`fetch-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let i=await de(n,_,r,c);if(!i)return{status:`error`,mode:`git`,root:_,reason:`no-release-tag`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let l=await S(`git checkout ${i}`,[`git`,`-C`,_,`checkout`,`--detach`,i]);if(l)return l}let w=await X(_),T=await Z(h(`deps install`,$(w),_));if(s.push(T),T.exitCode!==0)return{status:`error`,mode:`git`,root:_,reason:`deps-install-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let E=await Z(h(`build`,Q(w,`build`),_));if(s.push(E),E.exitCode!==0)return{status:`error`,mode:`git`,root:_,reason:`build-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let D=await Z(h(`ui:build`,Q(w,`ui:build`),_));if(s.push(D),D.exitCode!==0)return{status:`error`,mode:`git`,root:_,reason:`ui-build-failed`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let O=b.join(_,`openclaw.mjs`);if(!await x.stat(O).then(()=>!0).catch(()=>!1))return s.push({name:`openclaw doctor entry`,command:`verify ${O}`,cwd:_,durationMs:0,exitCode:1,stderrTail:`missing ${O}`}),{status:`error`,mode:`git`,root:_,reason:`doctor-entry-missing`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let k=await Z(h(`openclaw doctor`,[await u(process.execPath),O,`doctor`,`--non-interactive`,`--fix`],_,{OPENCLAW_UPDATE_IN_PROGRESS:`1`}));if(s.push(k),!(await f({root:_})).exists){let e=Q(w,`ui:build`),c=Date.now(),l=await n(e,{cwd:_,timeoutMs:r}),u={name:`ui:build (post-doctor repair)`,command:e.join(` `),cwd:_,durationMs:Date.now()-c,exitCode:l.code,stdoutTail:i(l.stdout,q),stderrTail:i(l.stderr,q)};if(s.push(u),l.code!==0)return{status:`error`,mode:`git`,root:_,reason:u.name,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t};let p=await f({root:_});if(!p.exists){let e=p.indexPath??d(_);return s.push({name:`ui assets verify`,command:`verify ${e}`,cwd:_,durationMs:0,exitCode:1,stderrTail:`missing ${e}`}),{status:`error`,mode:`git`,root:_,reason:`ui-assets-missing`,before:{sha:a,version:o},steps:s,durationMs:Date.now()-t}}}let A=s.find(e=>e.exitCode!==0),j=await Z(h(`git rev-parse HEAD (after)`,[`git`,`-C`,_,`rev-parse`,`HEAD`],_));s.push(j);let M=await F(_);return{status:A?`error`:`ok`,mode:`git`,root:_,reason:A?A.name:void 0,before:{sha:a,version:o},after:{sha:j.stdoutTail?.trim()??null,version:M},steps:s,durationMs:Date.now()-t}}if(!g)return{status:`error`,mode:`unknown`,reason:`no root (${ae.join(`,`)})`,steps:[],durationMs:Date.now()-t};let S=await F(g),C=await W(n,g,r);if(C){let i=await I(g)??J;await K({globalRoot:b.dirname(g),packageName:i});let o=e.channel??`stable`,s=`${i}@${me(e.tag??v(o))}`,c=[],l=await Z({runCommand:n,name:`global update`,argv:G(C,s),cwd:g,timeoutMs:r,progress:a,stepIndex:0,totalSteps:1});c.push(l);let u=l;if(l.exitCode!==0){let e=ie(C,s);if(e){let t=await Z({runCommand:n,name:`global update (omit optional)`,argv:e,cwd:g,timeoutMs:r,progress:a,stepIndex:0,totalSteps:1});c.push(t),u=t}}let d=await F(g);return{status:u.exitCode===0?`ok`:`error`,mode:C,root:g,reason:u.exitCode===0?void 0:u.name,before:{version:S},after:{version:d},steps:c,durationMs:Date.now()-t}}return{status:`skipped`,mode:`unknown`,root:g,reason:`not-git-install`,before:{version:S},steps:[],durationMs:Date.now()-t}}export{G as a,I as c,D as d,O as f,W as i,F as l,K as n,ne as o,k as p,re as r,L as s,he as t,P as u};
4
+ //# sourceMappingURL=update-runner-DYamgo1V.js.map
@@ -1 +1,2 @@
1
1
  function e(e){if(e===void 0||!Number.isFinite(e))return`0`;let t=Math.max(0,e);if(t>=1e6)return`${(t/1e6).toFixed(1)}m`;if(t>=1e3){let e=t>=1e4?0:1,n=(t/1e3).toFixed(e);return Number(n)>=1e3?`${(t/1e6).toFixed(1)}m`:`${n}k`}return String(Math.round(t))}function t(e){if(!(e===void 0||!Number.isFinite(e)))return e>=1||e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function n(e){let t=e.provider?.trim(),n=e.model?.trim();if(!(!t||!n))return(e.config?.models?.providers??{})[t]?.models?.find(e=>e.id===n)?.cost}const r=e=>typeof e==`number`&&Number.isFinite(e)?e:0;function i(e){let t=e.usage,n=e.cost;if(!t||!n)return;let i=r(t.input),a=r(t.output),o=r(t.cacheRead),s=r(t.cacheWrite),c=i*n.input+a*n.output+o*n.cacheRead+s*n.cacheWrite;if(Number.isFinite(c))return c/1e6}export{n as i,e as n,t as r,i as t};
2
+ //# sourceMappingURL=usage-format-BWD8FJFL.js.map
@@ -1 +1,2 @@
1
1
  function e(e){if(e===void 0||!Number.isFinite(e))return`0`;let t=Math.max(0,e);if(t>=1e6)return`${(t/1e6).toFixed(1)}m`;if(t>=1e3){let e=t>=1e4?0:1,n=(t/1e3).toFixed(e);return Number(n)>=1e3?`${(t/1e6).toFixed(1)}m`:`${n}k`}return String(Math.round(t))}function t(e){if(!(e===void 0||!Number.isFinite(e)))return e>=1||e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function n(e){let t=e.provider?.trim(),n=e.model?.trim();if(!(!t||!n))return(e.config?.models?.providers??{})[t]?.models?.find(e=>e.id===n)?.cost}const r=e=>typeof e==`number`&&Number.isFinite(e)?e:0;function i(e){let t=e.usage,n=e.cost;if(!t||!n)return;let i=r(t.input),a=r(t.output),o=r(t.cacheRead),s=r(t.cacheWrite),c=i*n.input+a*n.output+o*n.cacheRead+s*n.cacheWrite;if(Number.isFinite(c))return c/1e6}export{n as i,e as n,t as r,i as t};
2
+ //# sourceMappingURL=usage-format-yPwal8Iz.js.map
@@ -1 +1,2 @@
1
1
  import{S as e,T as t}from"./subsystem-BLbY429l.js";import{_ as n,m as r,v as i,y as a}from"./paths-BjD3T_xq.js";import o from"node:os";import s from"node:path";import c from"node:fs";function l(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}async function u(e){await c.promises.mkdir(e,{recursive:!0})}async function d(e){try{return await c.promises.access(e),!0}catch{return!1}}function f(e,t,n){return Math.max(t,Math.min(n,e))}function p(e,t,n){return f(Math.floor(e),t,n)}const m=f;function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g(e){try{return JSON.parse(e)}catch{return null}}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){let t=e.replace(/^whatsapp:/,``).trim().replace(/[^\d+]/g,``);return t.startsWith(`+`)?`+${t.slice(1)}`:`+${t}`}function y(e,t){if(!e||!Array.isArray(t)||t.length===0)return!1;let n=v(e);return t.some(e=>{if(e===`*`)return!1;try{return v(String(e))===n}catch{return!1}})}function b(e){let t=e.replace(/^whatsapp:/,``).trim();return t.includes(`@`)?t:`${v(t).replace(/\D/g,``)}@s.whatsapp.net`}function x(e){let t=new Set,n=e=>{e&&t.add(A(e))};n(e?.authDir);for(let t of e?.lidMappingDirs??[])n(t);return n(r()),n(s.join(z,`credentials`)),[...t]}function S(e,t){let n=`lid-mapping-${e}_reverse.json`,r=x(t);for(let e of r){let t=s.join(e,n);try{let e=c.readFileSync(t,`utf8`),n=JSON.parse(e);if(n==null)continue;return v(String(n))}catch{}}return null}function C(n,r){let i=n.match(/^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted)$/);if(i)return`+${i[1]}`;let a=n.match(/^(\d+)(?::\d+)?@(lid|hosted\.lid)$/);if(a){let n=a[1],i=S(n,r);if(i)return i;(r?.logMissing??t())&&e(`LID mapping not found for ${n}; skipping inbound message`)}return null}async function w(n,r){if(!n)return null;let i=C(n,r);if(i)return i;if(!/(@lid|@hosted\.lid)$/.test(n)||!r?.lidLookup?.getPNForLID)return null;try{let e=await r.lidLookup.getPNForLID(n);return e?C(e,r):null}catch(r){return t()&&e(`LID mapping lookup failed for ${n}: ${String(r)}`),null}}function T(e){return new Promise(t=>setTimeout(t,e))}function E(e){return e>=55296&&e<=56319}function D(e){return e>=56320&&e<=57343}function O(e,t,n){let r=e.length,i=t<0?Math.max(r+t,0):Math.min(t,r),a=n===void 0?r:n<0?Math.max(r+n,0):Math.min(n,r);if(a<i){let e=i;i=a,a=e}return i>0&&i<r&&D(e.charCodeAt(i))&&E(e.charCodeAt(i-1))&&(i+=1),a>0&&a<r&&E(e.charCodeAt(a-1))&&D(e.charCodeAt(a))&&--a,e.slice(i,a)}function k(e,t){let n=Math.max(0,Math.floor(t));return e.length<=n?e:O(e,0,n)}function A(e){if(!e)return``;let t=e.trim();if(!t)return t;if(t.startsWith(`~`)){let e=n(t,{home:a(process.env,o.homedir),env:process.env,homedir:o.homedir});return s.resolve(e)}return s.resolve(t)}function j(e=process.env,t=o.homedir){let n=e.OPENCLAW_STATE_DIR?.trim()||e.CLAWDBOT_STATE_DIR?.trim();if(n)return A(n);let r=s.join(a(e,t),`.qbotclaw`);try{if(c.existsSync(r))return r}catch{}return r}function M(){return i(process.env,o.homedir)}function N(){let e=M();if(e)return process.env.OPENCLAW_HOME?.trim()?{home:e,prefix:`$OPENCLAW_HOME`}:{home:e,prefix:`~`}}function P(e){if(!e)return e;let t=N();if(!t)return e;let{home:n,prefix:r}=t;return e===n?r:e.startsWith(`${n}/`)||e.startsWith(`${n}\\`)?`${r}${e.slice(n.length)}`:e}function F(e){if(!e)return e;let t=N();return t?e.split(t.home).join(t.prefix):e}function I(e){return P(e)}function L(e){return F(e)}function R(e,t,n){let r=e.replaceAll(`\x1B`,``),i=t.replaceAll(`\x1B`,``);return n?.force===!0||n?.force!==!1&&process.stdout.isTTY?`\u001b]8;;${i}\u0007${r}\u001b]8;;\u0007`:n?.fallback??`${r} (${i})`}const z=j();export{O as C,l as E,T as S,k as T,w as _,I as a,F as b,h as c,y as d,C as f,M as g,j as h,f as i,R as l,d as m,m as n,L as o,v as p,p as r,u as s,z as t,_ as u,A as v,b as w,P as x,g as y};
2
+ //# sourceMappingURL=utils-CGdo13HV.js.map
@@ -1 +1,2 @@
1
1
  import{d as e,l as t,o as n,u as r}from"./paths-CChBdtE8.js";import{d as i,m as a}from"./subsystem-Bc2XrjUz.js";import o from"node:os";import s from"node:path";import c from"node:fs";function l(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}async function u(e){await c.promises.mkdir(e,{recursive:!0})}async function d(e){try{return await c.promises.access(e),!0}catch{return!1}}function f(e,t,n){return Math.max(t,Math.min(n,e))}function p(e,t,n){return f(Math.floor(e),t,n)}const m=f;function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g(e){try{return JSON.parse(e)}catch{return null}}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){let t=e.replace(/^whatsapp:/,``).trim().replace(/[^\d+]/g,``);return t.startsWith(`+`)?`+${t.slice(1)}`:`+${t}`}function y(e,t){if(!e||!Array.isArray(t)||t.length===0)return!1;let n=v(e);return t.some(e=>{if(e===`*`)return!1;try{return v(String(e))===n}catch{return!1}})}function b(e){let t=e.replace(/^whatsapp:/,``).trim();return t.includes(`@`)?t:`${v(t).replace(/\D/g,``)}@s.whatsapp.net`}function x(e){let t=new Set,r=e=>{e&&t.add(A(e))};r(e?.authDir);for(let t of e?.lidMappingDirs??[])r(t);return r(n()),r(s.join(L,`credentials`)),[...t]}function S(e,t){let n=`lid-mapping-${e}_reverse.json`,r=x(t);for(let e of r){let t=s.join(e,n);try{let e=c.readFileSync(t,`utf8`),n=JSON.parse(e);if(n==null)continue;return v(String(n))}catch{}}return null}function C(e,t){let n=e.match(/^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted)$/);if(n)return`+${n[1]}`;let r=e.match(/^(\d+)(?::\d+)?@(lid|hosted\.lid)$/);if(r){let e=r[1],n=S(e,t);if(n)return n;(t?.logMissing??a())&&i(`LID mapping not found for ${e}; skipping inbound message`)}return null}async function w(e,t){if(!e)return null;let n=C(e,t);if(n)return n;if(!/(@lid|@hosted\.lid)$/.test(e)||!t?.lidLookup?.getPNForLID)return null;try{let n=await t.lidLookup.getPNForLID(e);return n?C(n,t):null}catch(t){return a()&&i(`LID mapping lookup failed for ${e}: ${String(t)}`),null}}function T(e){return new Promise(t=>setTimeout(t,e))}function E(e){return e>=55296&&e<=56319}function D(e){return e>=56320&&e<=57343}function O(e,t,n){let r=e.length,i=t<0?Math.max(r+t,0):Math.min(t,r),a=n===void 0?r:n<0?Math.max(r+n,0):Math.min(n,r);if(a<i){let e=i;i=a,a=e}return i>0&&i<r&&D(e.charCodeAt(i))&&E(e.charCodeAt(i-1))&&(i+=1),a>0&&a<r&&E(e.charCodeAt(a-1))&&D(e.charCodeAt(a))&&--a,e.slice(i,a)}function k(e,t){let n=Math.max(0,Math.floor(t));return e.length<=n?e:O(e,0,n)}function A(n){if(!n)return``;let r=n.trim();if(!r)return r;if(r.startsWith(`~`)){let n=t(r,{home:e(process.env,o.homedir),env:process.env,homedir:o.homedir});return s.resolve(n)}return s.resolve(r)}function j(t=process.env,n=o.homedir){let r=t.OPENCLAW_STATE_DIR?.trim()||t.CLAWDBOT_STATE_DIR?.trim();if(r)return A(r);let i=s.join(e(t,n),`.qbotclaw`);try{if(c.existsSync(i))return i}catch{}return i}function M(){return r(process.env,o.homedir)}function N(){let e=M();if(e)return process.env.OPENCLAW_HOME?.trim()?{home:e,prefix:`$OPENCLAW_HOME`}:{home:e,prefix:`~`}}function P(e){if(!e)return e;let t=N();if(!t)return e;let{home:n,prefix:r}=t;return e===n?r:e.startsWith(`${n}/`)||e.startsWith(`${n}\\`)?`${r}${e.slice(n.length)}`:e}function F(e){if(!e)return e;let t=N();return t?e.split(t.home).join(t.prefix):e}function I(e,t,n){let r=e.replaceAll(`\x1B`,``),i=t.replaceAll(`\x1B`,``);return n?.force===!0||n?.force!==!1&&process.stdout.isTTY?`\u001b]8;;${i}\u0007${r}\u001b]8;;\u0007`:n?.fallback??`${r} (${i})`}const L=j();export{l as C,k as S,F as _,u as a,O as b,_ as c,v as d,d as f,g,A as h,f as i,y as l,w as m,m as n,h as o,j as p,p as r,I as s,L as t,C as u,P as v,b as x,T as y};
2
+ //# sourceMappingURL=utils-D3t-vPka.js.map
@@ -1 +1,2 @@
1
1
  import e from"node:path";import t,{Chalk as n}from"chalk";import r from"node:fs";import{Logger as i}from"tslog";import a from"node:os";import o from"json5";const s=new Set([`--dev`,`--no-color`]),c=new Set([`--profile`,`--log-level`]);function l(e){return!e||e===`--`?!1:e.startsWith(`-`)?/^-\d+(?:\.\d+)?$/.test(e):!0}function u(e,t){let n=e[t];return n?s.has(n)||n.startsWith(`--profile=`)||n.startsWith(`--log-level=`)?1:c.has(n)?l(e[t+1])?2:1:0:0}function d(e,t=2){return f(e,t,{skipRootOptions:!0})}function f(e,t,n){let r=e.slice(2),i=[];for(let e=0;e<r.length;e+=1){let a=r[e];if(a){if(a===`--`)break;if(n.skipRootOptions){let t=u(r,e);if(t>0){e+=t-1;continue}}if(!a.startsWith(`-`)&&(i.push(a),i.length>=t))break}}return i}const p=`/tmp/qbotclaw`,m=r.constants.W_OK|r.constants.X_OK;function ee(e,t){return typeof e==`object`&&!!e&&`code`in e&&e.code===t}function h(t={}){let n=t.accessSync??r.accessSync,i=t.chmodSync??r.chmodSync,o=t.lstatSync??r.lstatSync,s=t.mkdirSync??r.mkdirSync,c=t.warn??(e=>console.warn(e)),l=t.getuid??(()=>{try{return typeof process.getuid==`function`?process.getuid():void 0}catch{return}}),u=t.tmpdir??a.tmpdir,d=l(),f=e=>d===void 0?!0:!(typeof e.uid==`number`&&e.uid!==d||typeof e.mode==`number`&&e.mode&18),h=()=>{let t=u(),n=d===void 0?`qbotclaw`:`qbotclaw-${d}`;return e.join(t,n)},g=e=>e.isDirectory()&&!e.isSymbolicLink()&&f(e),_=e=>{try{return g(o(e))?(n(e,m),`available`):`invalid`}catch(e){return ee(e,`ENOENT`)?`missing`:`invalid`}},v=e=>{try{let t=o(e);return!t.isDirectory()||t.isSymbolicLink()||d!==void 0&&typeof t.uid==`number`&&t.uid!==d||typeof t.mode!=`number`||!(t.mode&18)?!1:(i(e,448),c(`[openclaw] tightened permissions on temp dir: ${e}`),_(e)===`available`)}catch{return!1}},y=()=>{let e=h(),t=_(e);if(t===`available`)return e;if(t===`invalid`){if(v(e))return e;throw Error(`Unsafe fallback OpenClaw temp dir: ${e}`)}try{s(e,{recursive:!0,mode:448}),i(e,448)}catch{throw Error(`Unable to create fallback OpenClaw temp dir: ${e}`)}if(_(e)!==`available`&&!v(e))throw Error(`Unsafe fallback OpenClaw temp dir: ${e}`);return e},b=_(p);if(b===`available`)return p;if(b===`invalid`)return v(`/tmp/qbotclaw`)?p:y();try{return n(`/tmp`,m),s(p,{recursive:!0,mode:448}),i(p,448),_(`/tmp/qbotclaw`)!==`available`&&!v(`/tmp/qbotclaw`)?y():p}catch{return y()}}function g(e){return e?.trim()||void 0}function _(t=process.env,n=a.homedir){let r=v(t,n);return r?e.resolve(r):void 0}function v(e,t){let n=g(e.OPENCLAW_HOME);if(n){if(n===`~`||n.startsWith(`~/`)||n.startsWith(`~\\`)){let r=g(e.HOME)??g(e.USERPROFILE)??y(t);return r?n.replace(/^~(?=$|[\\/])/,r):void 0}return n}return g(e.HOME)||g(e.USERPROFILE)||y(t)}function y(e){try{return g(e())}catch{return}}function b(t=process.env,n=a.homedir){return _(t,n)??e.resolve(process.cwd())}function x(e,t){if(!e.startsWith(`~`))return e;let n=g(t?.home)??_(t?.env??process.env,t?.homedir??a.homedir);return n?e.replace(/^~(?=$|[\\/])/,n):e}function te(e=process.env){return e.OPENCLAW_NIX_MODE===`1`}te();const ne=[`.clawdbot`,`.moldbot`,`.moltbot`],S=`.openclaw-qbot.json`,C=[`openclaw.json`,`clawdbot.json`,`moldbot.json`,`moltbot.json`];function w(){return b(process.env,a.homedir)}function T(e){return()=>b(e,a.homedir)}function re(t=w){return ne.map(n=>e.join(t(),n))}function E(t=w){return e.join(t(),`.qbotclaw`)}function D(e=process.env,t=T(e)){let n=()=>b(e,t),i=e.OPENCLAW_STATE_DIR?.trim()||e.CLAWDBOT_STATE_DIR?.trim();if(i)return O(i,e,n);let a=E(n);if(e.OPENCLAW_TEST_FAST===`1`)return a;let o=re(n);return r.existsSync(a)?a:o.find(e=>{try{return r.existsSync(e)}catch{return!1}})||a}function O(t,n=process.env,r=T(n)){let i=t.trim();if(!i)return i;if(i.startsWith(`~`)){let t=x(i,{home:b(n,r),env:n,homedir:r});return e.resolve(t)}return e.resolve(i)}const ie=D();function ae(t=process.env,n=D(t,T(t))){let r=t.OPENCLAW_CONFIG_PATH?.trim()||t.CLAWDBOT_CONFIG_PATH?.trim();return r?O(r,t,T(t)):e.join(n,S)}function oe(e=process.env,t=T(e)){return e.OPENCLAW_TEST_FAST===`1`?ae(e,D(e,t)):k(e,t).find(e=>{try{return r.existsSync(e)}catch{return!1}})||ae(e,D(e,t))}function se(t=process.env,n=D(t,T(t)),i=T(t)){let a=t.OPENCLAW_CONFIG_PATH?.trim();if(a)return O(a,t,i);if(t.OPENCLAW_TEST_FAST===`1`)return e.join(n,S);let o=t.OPENCLAW_STATE_DIR?.trim(),s=[e.join(n,S),...C.map(t=>e.join(n,t))].find(e=>{try{return r.existsSync(e)}catch{return!1}});if(s)return s;if(o)return e.join(n,S);let c=D(t,i);return e.resolve(n)===e.resolve(c)?oe(t,i):e.join(n,S)}oe();function k(t=process.env,n=T(t)){let r=()=>b(t,n),i=t.OPENCLAW_CONFIG_PATH?.trim()||t.CLAWDBOT_CONFIG_PATH?.trim();if(i)return[O(i,t,r)];let a=[],o=t.OPENCLAW_STATE_DIR?.trim()||t.CLAWDBOT_STATE_DIR?.trim();if(o){let n=O(o,t,r);a.push(e.join(n,S)),a.push(...C.map(t=>e.join(n,t)))}let s=[E(r),...re(r)];for(let t of s)a.push(e.join(t,S)),a.push(...C.map(n=>e.join(t,n)));return a}const ce=18789;function A(t=process.env,n=D(t,T(t))){let r=t.OPENCLAW_OAUTH_DIR?.trim();return r?O(r,t,T(t)):e.join(n,`credentials`)}function j(){let e=se();try{if(!r.existsSync(e))return;let t=r.readFileSync(e,`utf-8`),n=o.parse(t)?.logging;return!n||typeof n!=`object`||Array.isArray(n)?void 0:n}catch{return}}const M=[`silent`,`fatal`,`error`,`warn`,`info`,`debug`,`trace`];function N(e){if(typeof e!=`string`)return;let t=e.trim();return M.includes(t)?t:void 0}function P(e,t=`info`){return N(e)??t}function F(e){return{fatal:0,error:1,warn:2,info:3,debug:4,trace:5,silent:1/0}[e]}const I={cachedLogger:null,cachedSettings:null,cachedConsoleSettings:null,overrideSettings:null,invalidEnvLogLevelValue:null,consolePatched:!1,forceConsoleToStderr:!1,consoleTimestampPrefix:!1,consoleSubsystemFilter:null,resolvingConsoleSettings:!1,streamErrorHandlersInstalled:!1,rawConsole:null};function L(){let e=process.env.OPENCLAW_LOG_LEVEL,t=typeof e==`string`?e.trim():``;if(!t){I.invalidEnvLogLevelValue=null;return}let n=N(t);if(n)return I.invalidEnvLogLevelValue=null,n;I.invalidEnvLogLevelValue!==t&&(I.invalidEnvLogLevelValue=t,process.stderr.write(`[openclaw] Ignoring invalid OPENCLAW_LOG_LEVEL="${t}" (allowed: ${M.join(`|`)}).\n`))}function R(e){let t=process.getBuiltinModule;if(typeof t!=`function`)return null;try{let n=t(`module`),r=typeof n.createRequire==`function`?n.createRequire:null;return r?r(e):null}catch{return null}}function le(e){try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),!0}catch{return!1}}function z(e,t){let n=t??process.env.TZ,r=n&&le(n)?n:Intl.DateTimeFormat().resolvedOptions().timeZone,i=new Intl.DateTimeFormat(`en`,{timeZone:r,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1,fractionalSecondDigits:3,timeZoneName:`longOffset`}),a=Object.fromEntries(i.formatToParts(e).map(e=>[e.type,e.value])),o=a.timeZoneName??`GMT`,s=o===`GMT`?`+00:00`:o.slice(3);return`${a.year}-${a.month}-${a.day}T${a.hour}:${a.minute}:${a.second}.${a.fractionalSecond}${s}`}const B=h();e.join(B,`qbotclaw.log`);const V=`qbotclaw`,H=`.log`,U=500*1024*1024,ue=R(import.meta.url),W=new Set;function de(e=process.argv){let[t,n]=d(e,2);return t===`config`&&n===`validate`}function G(e,t){e.attachTransport(e=>{if(W.has(t))try{t(e)}catch{}})}function fe(e){return process.env.VITEST===`true`&&process.env.OPENCLAW_TEST_FILE_LOG!==`1`&&!e&&!I.overrideSettings}function K(){let e=L();if(fe(e))return{level:`silent`,file:xe(),maxFileBytes:U};let t=I.overrideSettings??j();if(!t&&!de())try{t=(ue?.(`../config/config.js`))?.loadConfig?.().logging}catch{t=void 0}let n=process.env.VITEST===`true`&&process.env.OPENCLAW_TEST_FILE_LOG!==`1`?`silent`:`info`,r=P(t?.level,n);return{level:e??r,file:t?.file??xe(),maxFileBytes:he(t?.maxFileBytes)}}function pe(e,t){return e?e.level!==t.level||e.file!==t.file||e.maxFileBytes!==t.maxFileBytes:!0}function q(e){let t=I.cachedSettings??K();return I.cachedSettings||=t,t.level===`silent`?!1:F(e)<=F(t.level)}function me(t){let n=new i({name:`openclaw`,minLevel:F(t.level),type:`hidden`});if(t.level===`silent`){for(let e of W)G(n,e);return n}r.mkdirSync(e.dirname(t.file),{recursive:!0}),Se(t.file)&&Ce(e.dirname(t.file));let a=ge(t.file),o=!1;n.attachTransport(e=>{try{let n=z(e.date??new Date),r=`${JSON.stringify({...e,time:n})}\n`,i=Buffer.byteLength(r,`utf8`),s=a+i;if(s>t.maxFileBytes){if(!o){o=!0;let e=JSON.stringify({time:z(new Date),level:`warn`,subsystem:`logging`,message:`log file size cap reached; suppressing writes file=${t.file} maxFileBytes=${t.maxFileBytes}`});_e(t.file,`${e}\n`),process.stderr.write(`[openclaw] log file size cap reached; suppressing writes file=${t.file} maxFileBytes=${t.maxFileBytes}\n`)}return}_e(t.file,r)&&(a=s)}catch{}});for(let e of W)G(n,e);return n}function he(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):U}function ge(e){try{return r.statSync(e).size}catch{return 0}}function _e(e,t){try{return r.appendFileSync(e,t,{encoding:`utf8`}),!0}catch{return!1}}function J(){let e=K(),t=I.cachedLogger,n=I.cachedSettings;return(!t||pe(n,e))&&(I.cachedLogger=me(e),I.cachedSettings=e),I.cachedLogger}function ve(e,t){let n=J(),r=t?.level?F(t.level):void 0,i=e?JSON.stringify(e):void 0;return n.getSubLogger({name:i,minLevel:r,prefix:e?[i??``]:[]})}function ye(e,t){return{level:t,child:n=>ye(e.getSubLogger({name:n?JSON.stringify(n):void 0}),t),trace:(...t)=>e.trace(...t),debug:(...t)=>e.debug(...t),info:(...t)=>e.info(...t),warn:(...t)=>e.warn(...t),error:(...t)=>e.error(...t),fatal:(...t)=>e.fatal(...t)}}function be(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function xe(){let t=be(new Date);return e.join(B,`${V}-${t}${H}`)}function Se(t){let n=e.basename(t);return n.startsWith(`${V}-`)&&n.endsWith(H)&&n.length===`${V}-YYYY-MM-DD${H}`.length}function Ce(t){try{let n=r.readdirSync(t,{withFileTypes:!0}),i=Date.now()-864e5;for(let a of n){if(!a.isFile()||!a.name.startsWith(`${V}-`)||!a.name.endsWith(H))continue;let n=e.join(t,a.name);try{r.statSync(n).mtimeMs<i&&r.rmSync(n,{force:!0})}catch{}}}catch{}}const Y={accent:`#FF5A2D`,accentBright:`#FF7A3D`,accentDim:`#D14A22`,info:`#FF8A5B`,success:`#2FBF71`,warn:`#FFB020`,error:`#E23D2D`,muted:`#8B7F77`},we=typeof process.env.FORCE_COLOR==`string`&&process.env.FORCE_COLOR.trim().length>0&&process.env.FORCE_COLOR.trim()!==`0`,Te=process.env.NO_COLOR&&!we?new n({level:0}):t,X=e=>Te.hex(e),Z={accent:X(Y.accent),accentBright:X(Y.accentBright),accentDim:X(Y.accentDim),info:X(Y.info),success:X(Y.success),warn:X(Y.warn),error:X(Y.error),muted:X(Y.muted),heading:Te.bold.hex(Y.accent),command:X(Y.accentBright),option:X(Y.warn)};function Ee(){return!1}function Q(){return q(`debug`)}function De(e){if(Q())try{J().debug({message:e},`verbose`)}catch{}}function Oe(e){}const ke=Z.success,Ae=Z.warn,je=Z.info,Me=Z.error;function Ne(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}async function Pe(e){await r.promises.mkdir(e,{recursive:!0})}function Fe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ie(e){let t=e.replace(/^whatsapp:/,``).trim().replace(/[^\d+]/g,``);return t.startsWith(`+`)?`+${t.slice(1)}`:`+${t}`}function Le(t){let n=new Set,r=e=>{e&&n.add($(e))};r(t?.authDir);for(let e of t?.lidMappingDirs??[])r(e);return r(A()),r(e.join(He,`credentials`)),[...n]}function Re(t,n){let i=`lid-mapping-${t}_reverse.json`,a=Le(n);for(let t of a){let n=e.join(t,i);try{let e=r.readFileSync(n,`utf8`),t=JSON.parse(e);if(t==null)continue;return Ie(String(t))}catch{}}return null}function ze(e,t){let n=e.match(/^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted)$/);if(n)return`+${n[1]}`;let r=e.match(/^(\d+)(?::\d+)?@(lid|hosted\.lid)$/);if(r){let e=r[1],n=Re(e,t);if(n)return n;(t?.logMissing??Q())&&De(`LID mapping not found for ${e}; skipping inbound message`)}return null}function Be(e){return new Promise(t=>setTimeout(t,e))}function $(t){if(!t)return``;let n=t.trim();if(!n)return n;if(n.startsWith(`~`)){let t=x(n,{home:b(process.env,a.homedir),env:process.env,homedir:a.homedir});return e.resolve(t)}return e.resolve(n)}function Ve(t=process.env,n=a.homedir){let i=t.OPENCLAW_STATE_DIR?.trim()||t.CLAWDBOT_STATE_DIR?.trim();if(i)return $(i);let o=e.join(b(t,n),`.qbotclaw`);try{if(r.existsSync(o))return o}catch{}return o}const He=Ve();export{se as A,L as C,j as D,P as E,b as F,h as I,A as M,D as N,ce as O,x as P,R as S,F as T,ve as _,Ve as a,ye as b,Ne as c,Ee as d,De as f,Ae as g,ke as h,ze as i,k as j,ie as k,Me as l,Q as m,Pe as n,$ as o,Oe as p,Fe as r,Be as s,He as t,je as u,J as v,I as w,z as x,q as y};
2
+ //# sourceMappingURL=utils-R-mFyVJi.js.map
@@ -1 +1,2 @@
1
1
  import{_ as e,m as t,v as n,y as r}from"./paths-B4IRk3wi.js";import{S as i,T as a}from"./subsystem-C5XF2Fy5.js";import o from"node:fs";import s from"node:os";import c from"node:path";function l(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}async function u(e){await o.promises.mkdir(e,{recursive:!0})}async function d(e){try{return await o.promises.access(e),!0}catch{return!1}}function f(e,t,n){return Math.max(t,Math.min(n,e))}function p(e,t,n){return f(Math.floor(e),t,n)}const m=f;function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function g(e){try{return JSON.parse(e)}catch{return null}}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){if(e!==`web`)throw Error(`Web channel must be 'web'`)}function y(e){let t=e.replace(/^whatsapp:/,``).trim().replace(/[^\d+]/g,``);return t.startsWith(`+`)?`+${t.slice(1)}`:`+${t}`}function b(e,t){if(!e||!Array.isArray(t)||t.length===0)return!1;let n=y(e);return t.some(e=>{if(e===`*`)return!1;try{return y(String(e))===n}catch{return!1}})}function x(e){let t=e.replace(/^whatsapp:/,``).trim();return t.includes(`@`)?t:`${y(t).replace(/\D/g,``)}@s.whatsapp.net`}function S(e){let n=new Set,r=e=>{e&&n.add(j(e))};r(e?.authDir);for(let t of e?.lidMappingDirs??[])r(t);return r(t()),r(c.join(B,`credentials`)),[...n]}function C(e,t){let n=`lid-mapping-${e}_reverse.json`,r=S(t);for(let e of r){let t=c.join(e,n);try{let e=o.readFileSync(t,`utf8`),n=JSON.parse(e);if(n==null)continue;return y(String(n))}catch{}}return null}function w(e,t){let n=e.match(/^(\d+)(?::\d+)?@(s\.whatsapp\.net|hosted)$/);if(n)return`+${n[1]}`;let r=e.match(/^(\d+)(?::\d+)?@(lid|hosted\.lid)$/);if(r){let e=r[1],n=C(e,t);if(n)return n;(t?.logMissing??a())&&i(`LID mapping not found for ${e}; skipping inbound message`)}return null}async function T(e,t){if(!e)return null;let n=w(e,t);if(n)return n;if(!/(@lid|@hosted\.lid)$/.test(e)||!t?.lidLookup?.getPNForLID)return null;try{let n=await t.lidLookup.getPNForLID(e);return n?w(n,t):null}catch(t){return a()&&i(`LID mapping lookup failed for ${e}: ${String(t)}`),null}}function E(e){return new Promise(t=>setTimeout(t,e))}function D(e){return e>=55296&&e<=56319}function O(e){return e>=56320&&e<=57343}function k(e,t,n){let r=e.length,i=t<0?Math.max(r+t,0):Math.min(t,r),a=n===void 0?r:n<0?Math.max(r+n,0):Math.min(n,r);if(a<i){let e=i;i=a,a=e}return i>0&&i<r&&O(e.charCodeAt(i))&&D(e.charCodeAt(i-1))&&(i+=1),a>0&&a<r&&D(e.charCodeAt(a-1))&&O(e.charCodeAt(a))&&--a,e.slice(i,a)}function A(e,t){let n=Math.max(0,Math.floor(t));return e.length<=n?e:k(e,0,n)}function j(t){if(!t)return``;let n=t.trim();if(!n)return n;if(n.startsWith(`~`)){let t=e(n,{home:r(process.env,s.homedir),env:process.env,homedir:s.homedir});return c.resolve(t)}return c.resolve(n)}function M(e=process.env,t=s.homedir){let n=e.OPENCLAW_STATE_DIR?.trim()||e.CLAWDBOT_STATE_DIR?.trim();if(n)return j(n);let i=c.join(r(e,t),`.qbotclaw`);try{if(o.existsSync(i))return i}catch{}return i}function N(){return n(process.env,s.homedir)}function P(){let e=N();if(e)return process.env.OPENCLAW_HOME?.trim()?{home:e,prefix:`$OPENCLAW_HOME`}:{home:e,prefix:`~`}}function F(e){if(!e)return e;let t=P();if(!t)return e;let{home:n,prefix:r}=t;return e===n?r:e.startsWith(`${n}/`)||e.startsWith(`${n}\\`)?`${r}${e.slice(n.length)}`:e}function I(e){if(!e)return e;let t=P();return t?e.split(t.home).join(t.prefix):e}function L(e){return F(e)}function R(e){return I(e)}function z(e,t,n){let r=e.replaceAll(`\x1B`,``),i=t.replaceAll(`\x1B`,``);return n?.force===!0||n?.force!==!1&&process.stdout.isTTY?`\u001b]8;;${i}\u0007${r}\u001b]8;;\u0007`:n?.fallback??`${r} (${i})`}const B=M();export{E as C,l as D,A as E,F as S,x as T,N as _,f as a,g as b,u as c,_ as d,b as f,M as g,d as h,p as i,h as l,y as m,v as n,L as o,w as p,m as r,R as s,B as t,z as u,T as v,k as w,I as x,j as y};
2
+ //# sourceMappingURL=utils-UGOV_184.js.map
@@ -1 +1,2 @@
1
1
  import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{createRequire as t}from"node:module";var n=e({RUNTIME_SERVICE_VERSION_FALLBACK:()=>o,VERSION:()=>l,resolveRuntimeServiceVersion:()=>c,resolveUsableRuntimeVersion:()=>s});const r=[`../package.json`,`../../package.json`,`../../../package.json`,`./package.json`];function i(e,n,r={}){try{let i=t(e),a=r.field??`version`;for(let e of n)try{let t=i(e),n=t[a]?.trim();if(!n||r.requirePackageName&&t.name!==`@qqbrowser/openclaw-qbot`)continue;return n}catch{}return null}catch{return null}}function a(...e){for(let t of e){let e=t?.trim();if(e)return e}}const o=`unknown`;function s(e){let t=e?.trim();if(!(!t||t===`0.0.0`))return t}function c(e=process.env,t=o){let n=s(l);return a(e.OPENCLAW_VERSION,n,e.OPENCLAW_SERVICE_VERSION,e.npm_package_version)??t}const l=i(import.meta.url,r,{field:`version`})??`0.0.0`;export{c as n,n as r,l as t};
2
+ //# sourceMappingURL=version-q3SkUw2K.js.map
@@ -1 +1,2 @@
1
1
  const e=Symbol.for(`openclaw.warning-filter`);function t(e){return!!(e.code===`DEP0040`&&e.message?.includes(`punycode`)||e.code===`DEP0060`&&e.message?.includes(`util._extend`)||e.name===`ExperimentalWarning`&&e.message?.includes(`SQLite is an experimental feature`))}function n(e){let t=e[0],n=e[1],r=e[2],i,a,o;if(t instanceof Error?(i=t.name,o=t.message,a=t.code):typeof t==`string`&&(o=t),n&&typeof n==`object`&&!Array.isArray(n)){let e=n;typeof e.type==`string`&&(i=e.type),typeof e.code==`string`&&(a=e.code)}else typeof n==`string`&&(i=n),typeof r==`string`&&(a=r);return{name:i,code:a,message:o}}function r(){let r=globalThis;if(r[e]?.installed)return;let i=process.emitWarning.bind(process),a=((...e)=>{if(!t(n(e)))return Reflect.apply(i,process,e)});process.emitWarning=a,r[e]={installed:!0}}export{r as installProcessWarningFilter,t as shouldIgnoreWarning};
2
+ //# sourceMappingURL=warning-filter.js.map
@@ -3,3 +3,4 @@ import{Ct as e,Et as t,kt as n,s as r,wt as i}from"./paths-piJASC5k.js";import".
3
3
  `),a={...n,body:i,mentionedJids:r.size>0?Array.from(r):void 0};await e.onMessage(a)},onError:e=>{t.error({error:String(e)},`failed handling inbound web message`),n.error(`Failed handling inbound web message: ${String(e)}`)}}),_=new Map,v=300*1e3,b=r.signalRepository?.lidMapping,x=async t=>g(t,{authDir:e.authDir,lidLookup:b}),S=async e=>{let t=_.get(e);if(t&&t.expires>Date.now())return t;try{let t=await r.groupMetadata(e),n=(await Promise.all(t.participants?.map(async e=>await x(e.id)??e.id)??[])).filter(Boolean)??[],i={subject:t.subject,participants:n,expires:Date.now()+v};return _.set(e,i),i}catch(t){return u(`Failed to fetch group metadata for ${e}: ${String(t)}`),{expires:Date.now()+v}}},C=async t=>{let n=t.key?.id??void 0,a=t.key?.remoteJid;if(!a||a.endsWith(`@status`)||a.endsWith(`@broadcast`))return null;let o=Xe(a)===!0;if(n&&it(`${e.accountId}:${a}:${n}`))return null;let s=t.key?.participant??void 0,c=o?a:await x(a);if(!c)return null;let l=o?s?await x(s):null:c,u,d;if(o){let e=await S(a);u=e.subject,d=e.participants}let f=t.messageTimestamp?Number(t.messageTimestamp)*1e3:void 0,p=await Tt({accountId:e.accountId,from:c,selfE164:m,senderE164:l,group:o,pushName:t.pushName??void 0,isFromMe:!!t.key?.fromMe,messageTimestampMs:f,connectedAtMs:i,sock:{sendMessage:(e,t)=>r.sendMessage(e,t)},remoteJid:a});return p.allowed?{id:n,remoteJid:a,group:o,participantJid:s,from:c,senderE164:l,groupSubject:u,groupParticipants:d,messageTimestampMs:f,access:p}:null},w=async t=>{let{id:n,remoteJid:i,participantJid:o,access:s}=t;if(n&&!s.isSelfChat&&e.sendReadReceipts!==!1)try{await r.readMessages([{remoteJid:i,id:n,participant:o,fromMe:!1}]),a()&&u(`Marked message ${n} as read for ${i}${o?` (participant ${o})`:``}`)}catch(e){u(`Failed to mark message ${n} read: ${String(e)}`)}else n&&s.isSelfChat&&a()&&u(`Self-chat mode: skipping read receipt for ${n}`)},T=async t=>{let n=St(t.message??void 0),i=n?Te(n):void 0,a=pt(t.message??void 0);if(i&&(a=[a,i].filter(Boolean).join(`
4
4
  `).trim()),!a&&(a=mt(t.message??void 0),!a))return null;let o=Ct(t.message),s,c,l;try{let n=await Ot(t,r);if(n){let t=(typeof e.mediaMaxMb==`number`&&e.mediaMaxMb>0?e.mediaMaxMb:50)*1024*1024;s=(await y(n.buffer,n.mimetype,`inbound`,t,n.fileName)).path,c=n.mimetype,l=n.fileName}}catch(e){u(`Inbound media download failed: ${String(e)}`)}return{body:a,location:n??void 0,replyContext:o,mediaPath:s,mediaType:c,mediaFileName:l}},E=async(e,i,a)=>{let o=i.remoteJid,s=async()=>{try{await r.sendPresenceUpdate(`composing`,o)}catch(e){u(`Presence update failed: ${String(e)}`)}},c=async e=>{await r.sendMessage(o,{text:e})},l=async e=>{await r.sendMessage(o,e)},d=i.messageTimestampMs,p=ft(e.message),g=e.pushName??void 0;t.info({from:i.from,to:m??`me`,body:a.body,mediaPath:a.mediaPath,mediaType:a.mediaType,mediaFileName:a.mediaFileName,timestamp:d},`inbound message`);let _={id:i.id,from:i.from,conversationId:i.from,to:m??`me`,accountId:i.access.resolvedAccountId,body:a.body,pushName:g,timestamp:d,chatType:i.group?`group`:`direct`,chatId:i.remoteJid,senderJid:i.participantJid,senderE164:i.senderE164??void 0,senderName:g,replyToId:a.replyContext?.id,replyToBody:a.replyContext?.body,replyToSender:a.replyContext?.sender,replyToSenderJid:a.replyContext?.senderJid,replyToSenderE164:a.replyContext?.senderE164,groupSubject:i.groupSubject,groupParticipants:i.groupParticipants,mentionedJids:p??void 0,selfJid:f,selfE164:m,fromMe:!!e.key?.fromMe,location:a.location??void 0,sendComposing:s,reply:c,sendMedia:l,mediaPath:a.mediaPath,mediaType:a.mediaType,mediaFileName:a.mediaFileName};try{Promise.resolve(h.enqueue(_)).catch(e=>{t.error({error:String(e)},`failed handling inbound web message`),n.error(`Failed handling inbound web message: ${String(e)}`)})}catch(e){t.error({error:String(e)},`failed handling inbound web message`),n.error(`Failed handling inbound web message: ${String(e)}`)}},D=async t=>{if(!(t.type!==`notify`&&t.type!==`append`))for(let n of t.messages??[]){Fe({channel:`whatsapp`,accountId:e.accountId,direction:`inbound`});let r=await C(n);if(!r||(await w(r),t.type===`append`))continue;let i=await T(n);i&&await E(n,r,i)}};r.ev.on(`messages.upsert`,D);let O=e=>{try{if(e.connection===`close`){let t=He(e.lastDisconnect?.error);d({status:t,isLoggedOut:t===Ke.loggedOut,error:e.lastDisconnect?.error})}}catch(e){t.error({error:String(e)},`connection.update handler error`),d({status:void 0,isLoggedOut:!1,error:e})}};return r.ev.on(`connection.update`,O),{close:async()=>{try{let e=r.ev,t=D,n=O;typeof e.off==`function`?(e.off(`messages.upsert`,t),e.off(`connection.update`,n)):typeof e.removeListener==`function`&&(e.removeListener(`messages.upsert`,t),e.removeListener(`connection.update`,n)),r.ws?.close()}catch(e){u(`Socket close failed: ${String(e)}`)}},onClose:c,signalClose:e=>{d(e??{status:void 0,isLoggedOut:!1,error:`closed`})},...jt({sock:{sendMessage:(e,t)=>r.sendMessage(e,t),sendPresenceUpdate:(e,t)=>r.sendPresenceUpdate(e,t)},defaultAccountId:e.accountId})}}function Nt(e,t){return{mentionRegexes:F(e,t),allowFrom:e.channels?.whatsapp?.allowFrom}}function Pt(e,t){let n=t?{authDir:t}:void 0;return{normalizedMentions:e.mentionedJids?.length?e.mentionedJids.map(e=>p(e,n)??e).filter(Boolean):[],selfE164:e.selfE164??(e.selfJid?p(e.selfJid,n):null),selfJid:e.selfJid?e.selfJid.replace(/:\\d+/,``):null}}function Ft(e,t,n){let r=e=>I(e),i=h(n.selfE164,t.allowFrom);if((e.mentionedJids?.length??0)>0&&!i)return!!(n.selfE164&&n.normalizedMentions.includes(n.selfE164)||n.selfJid&&n.normalizedMentions.includes(n.selfJid));let a=r(e.body);if(t.mentionRegexes.some(e=>e.test(a)))return!0;if(n.selfE164){let t=n.selfE164.replace(/\D/g,``);if(t){if(a.replace(/[^\d]/g,``).includes(t))return!0;let n=e.body.replace(/[\s-]/g,``);if(RegExp(`\\+?${t}`,`i`).test(n))return!0}}return!1}function It(e,t,n){let r=Pt(e,n);return{wasMentioned:Ft(e,t,r),details:{from:e.from,body:e.body,bodyClean:I(e.body),mentionedJids:e.mentionedJids??null,normalizedMentionedJids:r.normalizedMentions.length?r.normalizedMentions:null,selfJid:e.selfJid??null,selfJidBare:r.selfJid,selfE164:e.selfE164??null,resolvedSelfE164:r.selfE164}}}function Lt(e,t){let n=e.allowFrom;return(Array.isArray(n)&&n.length>0?n:t?[t]:[]).filter(e=>!!(e&&e!==`*`)).map(e=>f(e)).filter(e=>!!e)}function Rt(e){let t=new Set,n=Math.max(1,e.maxItems??100),r=e=>`combined:${e.sessionKey}:${e.combinedBody}`,i=()=>{for(;t.size>n;){let e=t.values().next().value;if(!e)break;t.delete(e)}};return{rememberText:(n,a)=>{n&&(t.add(n),a.combinedBody&&a.combinedBodySessionKey&&t.add(r({sessionKey:a.combinedBodySessionKey,combinedBody:a.combinedBody})),a.logVerboseMessage&&e.logVerbose?.(`Added to echo detection set (size now: ${t.size}): ${n.substring(0,50)}...`),i())},has:e=>t.has(e),forget:e=>{t.delete(e)},buildCombinedKey:r}}function zt(t){let n=be({agentId:t.agentId,channel:`whatsapp`,accountId:t.route.accountId,peer:{kind:t.msg.chatType===`group`?`group`:`direct`,id:t.peerId},dmScope:t.cfg.session?.dmScope,identityLinks:t.cfg.session?.identityLinks}),r=i({agentId:t.agentId,mainKey:e});return{sessionKey:n,mainSessionKey:r,lastRoutePolicy:z({sessionKey:n,mainSessionKey:r})}}async function Bt(e){let t=e.cfg.broadcast?.[e.peerId];if(!t||!Array.isArray(t)||t.length===0)return!1;let r=e.cfg.broadcast?.strategy||`parallel`;X.info(`Broadcasting message to ${t.length} agents (${r})`);let i=e.cfg.agents?.list?.map(e=>n(e.id)),a=(i?.length??0)>0,o=e.msg.chatType===`group`?e.groupHistories.get(e.groupHistoryKey)??[]:void 0,s=async t=>{let r=n(t);if(a&&!i?.includes(r))return X.warn(`Broadcast agent ${t} not found in agents.list; skipping`),!1;let s=zt({cfg:e.cfg,msg:e.msg,route:e.route,peerId:e.peerId,agentId:r}),c={...e.route,agentId:r,...s};try{return await e.processMessage(e.msg,c,e.groupHistoryKey,{groupHistory:o,suppressGroupHistoryClear:!0})}catch(e){return X.error(`Broadcast agent ${t} failed: ${q(e)}`),!1}};if(r===`sequential`)for(let e of t)await s(e);else await Promise.allSettled(t.map(s));return e.msg.chatType===`group`&&e.groupHistories.set(e.groupHistoryKey,[]),!0}function Vt(e,t,n){let r=e;for(let e of t)r=r.replace(e,` `);if(n){let e=n.replace(/\D/g,``);if(e){let t=RegExp(`\\+?${e}`,`g`);r=r.replace(t,` `)}}return r.replace(/\s+/g,` `).trim()}function Ht(e,t){let n=O({From:t,ChatType:`group`,Provider:`whatsapp`})?.id,r=e.channels?.whatsapp,i=!!(r?.groupAllowFrom?.length||r?.allowFrom?.length);return x({cfg:e,channel:`whatsapp`,groupId:n??t,hasGroupAllowFrom:i})}function Ut(e,t){let n=O({From:t,ChatType:`group`,Provider:`whatsapp`})?.id;return v({cfg:e,channel:`whatsapp`,groupId:n??t})}function Wt(e){let t=A(r(e.cfg.session?.store,{agentId:e.agentId}))[e.sessionKey],n=Ut(e.cfg,e.conversationId)?`mention`:`always`;return R(t?.groupActivation)??n}function Gt(e,t,n){for(let r of e){let e=f(r)??r;!e||t.has(e)||(t.add(e),n.push(e))}}function Kt(e,t,n,r){if(!n||!r)return;let i=f(n)??n;if(!i)return;let a=e.get(t);a||(a=new Map,e.set(t,a)),a.set(i,r)}function qt(e){let{participants:t,roster:n,fallbackE164:r}=e,i=new Set,a=[];if(t?.length&&Gt(t,i,a),n&&Gt(n.keys(),i,a),a.length===0&&r){let e=f(r)??r;e&&a.push(e)}if(a.length!==0)return a.map(e=>{let t=n?.get(e);return t?`${t} (${e})`:e}).join(`, `)}function Jt(e,t){let n=f(t.senderE164??``);return n?Lt(e,t.selfE164??void 0).includes(n):!1}function Yt(e){let t=e.msg.senderName&&e.msg.senderE164?`${e.msg.senderName} (${e.msg.senderE164})`:e.msg.senderName??e.msg.senderE164??`Unknown`;H({historyMap:e.groupHistories,historyKey:e.groupHistoryKey,limit:e.groupHistoryLimit,entry:{sender:t,body:e.msg.body,timestamp:e.msg.timestamp,id:e.msg.id,senderJid:e.msg.senderJid}})}function Xt(e,t){return e.logVerbose(t),Yt({msg:e.msg,groupHistories:e.groupHistories,groupHistoryKey:e.groupHistoryKey,groupHistoryLimit:e.groupHistoryLimit}),{shouldProcess:!1}}function Zt(e){let t=Ht(e.cfg,e.conversationId);if(t.allowlistEnabled&&!t.allowed)return e.logVerbose(`Skipping group message ${e.conversationId} (not in allowlist)`),{shouldProcess:!1};Kt(e.groupMemberNames,e.groupHistoryKey,e.msg.senderE164,e.msg.senderName);let n=Nt(e.cfg,e.agentId),r=Vt(e.msg.body,n.mentionRegexes,e.msg.selfE164),i=K(r),a=Jt(e.baseMentionConfig,e.msg),o=a&&ae(r,e.cfg);if(i.hasCommand&&!a)return Xt(e,`Ignoring /activation from non-owner in group ${e.conversationId}`);let s=It(e.msg,n,e.authDir);e.replyLogger.debug({conversationId:e.conversationId,wasMentioned:s.wasMentioned,...s.details},`group mention debug`);let c=s.wasMentioned,l=Wt({cfg:e.cfg,agentId:e.agentId,sessionKey:e.sessionKey,conversationId:e.conversationId})!==`always`,u=e.msg.selfJid?.replace(/:\\d+/,``),d=e.msg.replyToSenderJid?.replace(/:\\d+/,``),p=e.msg.selfE164?f(e.msg.selfE164):null,m=e.msg.replyToSenderE164?f(e.msg.replyToSenderE164):null,h=V({requireMention:l,canDetectMention:!0,wasMentioned:c,implicitMention:!!(u&&d&&u===d||p&&m&&p===m),shouldBypassMention:o});return e.msg.wasMentioned=h.effectiveWasMentioned,!o&&l&&h.shouldSkip?Xt(e,`Group message stored for context (no mention detected) in ${e.conversationId}: ${e.msg.body}`):{shouldProcess:!0}}function Qt(e,t){e.add(t),t.finally(()=>{e.delete(t)})}function $t(e){let t=r(e.cfg.session?.store,{agentId:e.storeAgentId}),n=D({storePath:t,sessionKey:e.sessionKey,deliveryContext:{channel:e.channel,to:e.to,accountId:e.accountId},ctx:e.ctx}).catch(n=>{e.warn({error:q(n),storePath:t,sessionKey:e.sessionKey,to:e.to},`failed updating last route`)});Qt(e.backgroundTasks,n)}function en(e){return e.chatType===`group`?e.conversationId??e.from:e.senderE164?f(e.senderE164)??e.senderE164:e.from.includes(`@`)?p(e.from)??e.from:f(e.from)??e.from}function $(e,t=400){return!e||e.length<=t?e:`${e.slice(0,t)}… (truncated ${e.length-t} chars)`}function tn(e){let t=(e instanceof Error?`${e.message}\n${e.stack??``}`:(e=>{if(e==null)return``;if(typeof e==`string`)return e;if(e instanceof Error)return`${e.message}\n${e.stack??``}`;if(typeof e==`object`)try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}return typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?String(e):typeof e==`symbol`?e.description??e.toString():typeof e==`function`?e.name?`[function ${e.name}]`:`[function]`:Object.prototype.toString.call(e)})(e)).toLowerCase();return t.includes(`unsupported state or unable to authenticate data`)||t.includes(`bad mac`)?t.includes(`@whiskeysockets/baileys`)||t.includes(`baileys`)||t.includes(`noise-handler`)||t.includes(`aesdecryptgcm`):!1}function nn(e){if(e.isReasoning===!0)return!0;let t=e.text;return typeof t==`string`?t.trimStart().toLowerCase().startsWith(`reasoning:`):!1}async function rn(e){let{replyResult:t,msg:n,maxMediaBytes:r,textLimit:i,replyLogger:s,connectionId:c,skipLog:l}=e,d=Date.now();if(nn(t)){Z.debug(`Suppressed reasoning payload to ${n.from}`);return}let f=e.tableMode??`code`,p=e.chunkMode??`length`,m=je(Re(Ie(t.text||``,f)),i,p),h=t.mediaUrls?.length?t.mediaUrls:t.mediaUrl?[t.mediaUrl]:[],g=async(e,t,r=3)=>{let i;for(let a=1;a<=r;a++)try{return await e()}catch(e){i=e;let s=q(e),c=a===r;if(!/closed|reset|timed\s*out|disconnect/i.test(s)||c)throw e;let l=500*a;u(`Retrying ${t} to ${n.from} after failure (${a}/${r-1}) in ${l}ms: ${s}`),await o(l)}throw i};if(h.length===0&&m.length){let e=m.length;for(let[t,r]of m.entries()){let i=Date.now();if(await g(()=>n.reply(r),`text`),!l){let r=Date.now()-i;Z.debug(`Sent chunk ${t+1}/${e} to ${n.from} (${r.toFixed(0)}ms)`)}}s.info({correlationId:n.id??J(),connectionId:c??null,to:n.from,from:n.to,text:$(t.text,240),mediaUrl:null,mediaSizeBytes:null,mediaKind:null,durationMs:Date.now()-d},`auto-reply sent (text)`);return}let _=[...m];for(let[t,i]of h.entries()){let o=t===0&&_.shift()||void 0;try{let t=await Ae(i,{maxBytes:r,localRoots:e.mediaLocalRoots});if(a()&&(u(`Web auto-reply media size: ${(t.buffer.length/(1024*1024)).toFixed(2)}MB`),u(`Web auto-reply media source: ${i} (kind ${t.kind})`)),t.kind===`image`)await g(()=>n.sendMedia({image:t.buffer,caption:o,mimetype:t.contentType}),`media:image`);else if(t.kind===`audio`)await g(()=>n.sendMedia({audio:t.buffer,ptt:!0,mimetype:t.contentType,caption:o}),`media:audio`);else if(t.kind===`video`)await g(()=>n.sendMedia({video:t.buffer,caption:o,mimetype:t.contentType}),`media:video`);else{let e=t.fileName??i.split(`/`).pop()??`file`,r=t.contentType??`application/octet-stream`;await g(()=>n.sendMedia({document:t.buffer,fileName:e,caption:o,mimetype:r}),`media:document`)}Z.info(`Sent media reply to ${n.from} (${(t.buffer.length/(1024*1024)).toFixed(2)}MB)`),s.info({correlationId:n.id??J(),connectionId:c??null,to:n.from,from:n.to,text:o??null,mediaUrl:i,mediaSizeBytes:t.buffer.length,mediaKind:t.kind,durationMs:Date.now()-d},`auto-reply sent (media)`)}catch(e){if(Z.error(`Failed sending web media to ${n.from}: ${q(e)}`),s.warn({err:e,mediaUrl:i},`failed to send web media reply`),t===0){let t=e instanceof Error?`⚠️ Media failed: ${e.message}`:`⚠️ Media failed.`,r=[_.shift()??o??``,t].filter(Boolean).join(`
5
5
  `);r&&(Z.warn(`Media skipped; sent text-only to ${n.from}`),await n.reply(r))}}}for(let e of _)await n.reply(e)}function an(e){if(!e.msg.id)return;let t=e.cfg.channels?.whatsapp?.ackReaction,n=(t?.emoji??``).trim(),r=t?.direct??!0,i=t?.group??`mentions`,a=e.msg.conversationId??e.msg.from,o=e.msg.chatType===`group`?Wt({cfg:e.cfg,agentId:e.agentId,sessionKey:e.sessionKey,conversationId:a}):null;B({emoji:n,isDirect:e.msg.chatType===`direct`,isGroup:e.msg.chatType===`group`,directEnabled:r,groupMode:i,wasMentioned:e.msg.wasMentioned===!0,groupActivated:o===`always`})&&(e.info({chatId:e.msg.chatId,messageId:e.msg.id,emoji:n},`sending ack reaction`),ze(e.msg.chatId,e.msg.id,n,{verbose:e.verbose,fromMe:!1,participant:e.msg.senderJid,accountId:e.accountId}).catch(t=>{e.warn({error:q(t),chatId:e.msg.chatId,messageId:e.msg.id},`failed to send ack reaction`),u(`WhatsApp ack reaction failed for chat ${e.msg.chatId}: ${q(t)}`)}))}function on(e){return e.replyToBody?`[Replying to ${e.replyToSender??`unknown sender`}${e.replyToId?` id:${e.replyToId}`:``}]\n${e.replyToBody}\n[/Replying]`:null}function sn(e){let{cfg:t,msg:n,agentId:r,previousTimestamp:i,envelope:a}=e,o=se(t,r,{configured:t.channels?.whatsapp?.messagePrefix,hasAllowFrom:(t.channels?.whatsapp?.allowFrom?.length??0)>0}),s=o?`${o} `:``,c=on(n),l=`${s}${n.body}${c?`\n\n${c}`:``}`;return oe({channel:`WhatsApp`,from:n.chatType===`group`?n.from:n.from?.replace(/^whatsapp:/,``),timestamp:n.timestamp,body:l,chatType:n.chatType,sender:{name:n.senderName,e164:n.senderE164,id:n.senderJid},previousTimestamp:i,envelope:a,fromMe:n.fromMe})}async function cn(e){let t=e.cfg.commands?.useAccessGroups!==!1;if(!t)return!0;let n=e.msg.chatType===`group`,r=f(n?e.msg.senderE164??``:e.msg.senderE164??e.msg.from??``);if(!r)return!1;let i=T({cfg:e.cfg,accountId:e.msg.accountId}),a=i.dmPolicy??`pairing`,o=i.groupPolicy??`allowlist`,s=i.allowFrom??[],c=i.groupAllowFrom??(s.length>0?s:void 0),l=n?[]:await U({provider:`whatsapp`,accountId:e.msg.accountId,dmPolicy:a});return he({isGroup:n,dmPolicy:a,groupPolicy:o,allowFrom:s.length>0?s:e.msg.selfE164?[e.msg.selfE164]:[],groupAllowFrom:c,storeAllowFrom:l,isSenderAllowed:e=>e.includes(`*`)?!0:e.map(e=>f(String(e))).filter(e=>!!e).includes(r),command:{useAccessGroups:t,allowTextCommands:!0,hasControlCommand:!0}}).commandAuthorized}function ln(e){let t=T({cfg:e.cfg,accountId:e.msg.accountId});return W({dmScope:e.cfg.session?.dmScope,allowFrom:t.allowFrom,normalizeEntry:e=>f(e)})}async function un(e){let t=e.msg.conversationId??e.msg.from,{storePath:n,envelopeOptions:r,previousTimestamp:i}=le({cfg:e.cfg,agentId:e.route.agentId,sessionKey:e.route.sessionKey}),o=sn({cfg:e.cfg,msg:e.msg,agentId:e.route.agentId,previousTimestamp:i,envelope:r}),s=!1;if(e.msg.chatType===`group`){let n=e.groupHistory??e.groupHistories.get(e.groupHistoryKey)??[];n.length>0&&(o=ve({entries:n.map(e=>({sender:e.sender,body:e.body,timestamp:e.timestamp})),currentMessage:o,excludeLast:!1,formatEntry:e=>oe({channel:`WhatsApp`,from:t,timestamp:e.timestamp,body:e.body,chatType:`group`,senderLabel:e.sender,envelope:r})})),s=!(e.suppressGroupHistoryClear??!1)}let c=e.buildCombinedEchoKey({sessionKey:e.route.sessionKey,combinedBody:o});if(e.echoHas(c))return u(`Skipping auto-reply: detected echo for combined message`),e.echoForget(c),!1;an({cfg:e.cfg,msg:e.msg,agentId:e.route.agentId,sessionKey:e.route.sessionKey,conversationId:t,verbose:e.verbose,accountId:e.route.accountId,info:e.replyLogger.info.bind(e.replyLogger),warn:e.replyLogger.warn.bind(e.replyLogger)});let l=e.msg.id??J();e.replyLogger.info({connectionId:e.connectionId,correlationId:l,from:e.msg.chatType===`group`?t:e.msg.from,to:e.msg.to,body:$(o,240),mediaType:e.msg.mediaType??null,mediaPath:e.msg.mediaPath??null},`inbound web message`);let d=e.msg.chatType===`group`?t:e.msg.from,m=e.msg.mediaType?`, ${e.msg.mediaType}`:``;X.info(`Inbound message ${d} -> ${e.msg.to} (${e.msg.chatType}${m}, ${o.length} chars)`),a()&&X.debug(`Inbound body: ${$(o,400)}`);let h=e.msg.chatType===`group`?void 0:e.msg.senderE164?f(e.msg.senderE164):e.msg.from.includes(`@`)?p(e.msg.from):f(e.msg.from),g=e.maxMediaTextChunkLimit??Me(e.cfg,`whatsapp`),_=Ne(e.cfg,`whatsapp`,e.route.accountId),v=Pe({cfg:e.cfg,channel:`whatsapp`,accountId:e.route.accountId}),y=ke(e.cfg,e.route.agentId),b=!1,x=!1,S=re(e.msg.body,e.cfg)?await cn({cfg:e.cfg,msg:e.msg}):void 0,C=e.cfg.messages?.responsePrefix,{onModelSelected:w,...T}=fe({cfg:e.cfg,agentId:e.route.agentId,channel:`whatsapp`,accountId:e.route.accountId}),E=e.msg.chatType!==`group`&&!!e.msg.selfE164&&f(e.msg.from)===f(e.msg.selfE164??``),D=T.responsePrefix??(C===void 0&&E?ce(e.cfg,e.route.agentId):void 0),O=e.msg.chatType===`group`?(e.groupHistory??e.groupHistories.get(e.groupHistoryKey)??[]).map(e=>({sender:e.sender,body:e.body,timestamp:e.timestamp})):void 0,k=L({Body:o,BodyForAgent:e.msg.body,InboundHistory:O,RawBody:e.msg.body,CommandBody:e.msg.body,From:e.msg.from,To:e.msg.to,SessionKey:e.route.sessionKey,AccountId:e.route.accountId,MessageSid:e.msg.id,ReplyToId:e.msg.replyToId,ReplyToBody:e.msg.replyToBody,ReplyToSender:e.msg.replyToSender,MediaPath:e.msg.mediaPath,MediaUrl:e.msg.mediaUrl,MediaType:e.msg.mediaType,ChatType:e.msg.chatType,ConversationLabel:e.msg.chatType===`group`?t:e.msg.from,GroupSubject:e.msg.groupSubject,GroupMembers:qt({participants:e.msg.groupParticipants,roster:e.groupMemberNames.get(e.groupHistoryKey),fallbackE164:e.msg.senderE164}),SenderName:e.msg.senderName,SenderId:e.msg.senderJid?.trim()||e.msg.senderE164,SenderE164:e.msg.senderE164,CommandAuthorized:S,WasMentioned:e.msg.wasMentioned,...e.msg.location?Ee(e.msg.location):{},Provider:`whatsapp`,Surface:`whatsapp`,OriginatingChannel:`whatsapp`,OriginatingTo:e.msg.from}),A=ln({cfg:e.cfg,msg:e.msg}),j=!A||A===h,M=P({route:e.route,sessionKey:e.route.sessionKey});h&&M===e.route.mainSessionKey&&j?$t({cfg:e.cfg,backgroundTasks:e.backgroundTasks,storeAgentId:e.route.agentId,sessionKey:e.route.mainSessionKey,channel:`whatsapp`,to:h,accountId:e.route.accountId,ctx:k,warn:e.replyLogger.warn.bind(e.replyLogger)}):h&&M===e.route.mainSessionKey&&A&&u(`Skipping main-session last route update for ${h} (pinned owner ${A})`);let te=ee({storePath:n,sessionKey:e.route.sessionKey,ctx:k}).catch(t=>{e.replyLogger.warn({error:q(t),storePath:n,sessionKey:e.route.sessionKey},`failed updating session meta`)});Qt(e.backgroundTasks,te);let{queuedFinal:N}=await ye({ctx:k,cfg:e.cfg,replyResolver:e.replyResolver,dispatcherOptions:{...T,responsePrefix:D,onHeartbeatStrip:()=>{b||(b=!0,u(`Stripped stray HEARTBEAT_OK token from web reply`))},deliver:async(n,r)=>{if(r.kind!==`final`)return;await rn({replyResult:n,msg:e.msg,mediaLocalRoots:y,maxMediaBytes:e.maxMediaBytes,textLimit:g,chunkMode:_,replyLogger:e.replyLogger,connectionId:e.connectionId,skipLog:!1,tableMode:v}),x=!0;let i=n.text?!0:void 0;e.rememberSentText(n.text,{combinedBody:o,combinedBodySessionKey:e.route.sessionKey,logVerboseMessage:i});let s=e.msg.chatType===`group`?t:e.msg.from??`unknown`,c=!!(n.mediaUrl||n.mediaUrls?.length);if(Z.info(`Auto-replied to ${s}${c?` (media)`:``}`),a()){let e=n.text==null?`<media>`:$(n.text,400);Z.debug(`Reply body: ${e}${c?` (media)`:``}`)}},onError:(n,r)=>{let i=r.kind===`tool`?`tool update`:r.kind===`block`?`block update`:`auto-reply`;Z.error(`Failed sending web ${i} to ${e.msg.from??t}: ${q(n)}`)},onReplyStart:e.msg.sendComposing},replyOptions:{disableBlockStreaming:!0,onModelSelected:w}});return N?(s&&e.groupHistories.set(e.groupHistoryKey,[]),x):(s&&e.groupHistories.set(e.groupHistoryKey,[]),u(`Skipping auto-reply: silent token or no text/media returned from resolver`),!1)}function dn(e){let n=async(t,n,r,i)=>un({cfg:e.cfg,msg:t,route:n,groupHistoryKey:r,groupHistories:e.groupHistories,groupMemberNames:e.groupMemberNames,connectionId:e.connectionId,verbose:e.verbose,maxMediaBytes:e.maxMediaBytes,replyResolver:e.replyResolver,replyLogger:e.replyLogger,backgroundTasks:e.backgroundTasks,rememberSentText:e.echoTracker.rememberText,echoHas:e.echoTracker.has,echoForget:e.echoTracker.forget,buildCombinedEchoKey:e.echoTracker.buildCombinedKey,groupHistory:i?.groupHistory,suppressGroupHistoryClear:i?.suppressGroupHistoryClear});return async r=>{let i=r.conversationId??r.from,a=en(r),o=ne({cfg:S(),channel:`whatsapp`,accountId:r.accountId,peer:{kind:r.chatType===`group`?`group`:`direct`,id:a}}),s=r.chatType===`group`?t({channel:`whatsapp`,accountId:o.accountId,peerKind:`group`,peerId:a}):o.sessionKey;if(r.from===r.to&&u(`📱 Same-phone mode detected (from === to: ${r.from})`),e.echoTracker.has(r.body)){u(`Skipping auto-reply: detected echo (message matches recently sent text)`),e.echoTracker.forget(r.body);return}if(r.chatType===`group`){let t={From:r.from,To:r.to,SessionKey:o.sessionKey,AccountId:o.accountId,ChatType:r.chatType,ConversationLabel:i,GroupSubject:r.groupSubject,SenderName:r.senderName,SenderId:r.senderJid?.trim()||r.senderE164,SenderE164:r.senderE164,Provider:`whatsapp`,Surface:`whatsapp`,OriginatingChannel:`whatsapp`,OriginatingTo:i};if($t({cfg:e.cfg,backgroundTasks:e.backgroundTasks,storeAgentId:o.agentId,sessionKey:o.sessionKey,channel:`whatsapp`,to:i,accountId:o.accountId,ctx:t,warn:e.replyLogger.warn.bind(e.replyLogger)}),!Zt({cfg:e.cfg,msg:r,conversationId:i,groupHistoryKey:s,agentId:o.agentId,sessionKey:o.sessionKey,baseMentionConfig:e.baseMentionConfig,authDir:e.account.authDir,groupHistories:e.groupHistories,groupHistoryLimit:e.groupHistoryLimit,groupMemberNames:e.groupMemberNames,logVerbose:u,replyLogger:e.replyLogger}).shouldProcess)return}else !r.senderE164&&a&&a.startsWith(`+`)&&(r.senderE164=f(a)??r.senderE164);await Bt({cfg:e.cfg,msg:r,peerId:a,route:o,groupHistoryKey:s,groupHistories:e.groupHistories,processMessage:n})||await n(r,o,s)}}function fn(e){return e===440}async function pn(e,t=Mt,n=!0,r=N,i=c,a,o={}){let l=J(),d=s({module:`web-auto-reply`,runId:l}),f=s({module:`web-heartbeat`,runId:l}),p=s({module:`web-reconnect`,runId:l}),m={running:!0,connected:!1,reconnectAttempts:0,lastConnectedAt:null,lastDisconnect:null,lastMessageAt:null,lastEventAt:null,lastError:null},h=()=>{o.statusSink?.({...m,lastDisconnect:m.lastDisconnect?{...m.lastDisconnect}:null})};h();let g=S(),_=T({cfg:g,accountId:o.accountId}),v={...g,channels:{...g.channels,whatsapp:{...g.channels?.whatsapp,ackReaction:_.ackReaction,messagePrefix:_.messagePrefix,allowFrom:_.allowFrom,groupAllowFrom:_.groupAllowFrom,groupPolicy:_.groupPolicy,textChunkLimit:_.textChunkLimit,chunkMode:_.chunkMode,mediaMaxMb:_.mediaMaxMb,blockStreaming:_.blockStreaming,groups:_.groups}}},y=C(_),x=$e(v,o.heartbeatSeconds),w=et(v,o.reconnect),E=Nt(v),D=v.channels?.whatsapp?.accounts?.[o.accountId??``]?.historyLimit??v.channels?.whatsapp?.historyLimit??v.messages?.groupChat?.historyLimit??50,O=new Map,ee=new Map,A=Rt({maxItems:100,logVerbose:u}),j=o.sleep??((e,t)=>G(e,t??a)),P=()=>a?.aborted===!0,re=a&&new Promise(e=>a.addEventListener(`abort`,()=>e(`aborted`),{once:!0})),F=process.getMaxListeners?.()??10;process.setMaxListeners&&F<50&&process.setMaxListeners(50);let I=!1,L=()=>{I=!0};process.once(`SIGINT`,L);let R=0;for(;!P();){let s=J(),c=Date.now(),l=null,g=null,S=null,C=0,T=null,F=o.messageTimeoutMs??1800*1e3,oe=o.watchdogCheckMs??60*1e3,z=new Set,se=dn({cfg:v,verbose:e,connectionId:s,maxMediaBytes:y,groupHistoryLimit:D,groupHistories:O,groupMemberNames:ee,echoTracker:A,backgroundTasks:z,replyResolver:r??N,replyLogger:d,baseMentionConfig:E,account:_}),ce=xe({cfg:v,channel:`whatsapp`}),B=await(t??Mt)({verbose:e,accountId:_.accountId,authDir:_.authDir,mediaMaxMb:_.mediaMaxMb,sendReadReceipts:_.sendReadReceipts,debounceMs:ce,shouldDebounce:e=>e.mediaPath||e.mediaType||e.location||e.replyToId||e.replyToBody?!1:!ae(e.body,v),onMessage:async e=>{C+=1,S=Date.now(),m.lastMessageAt=S,m.lastEventAt=S,h(),await se(e)}});Object.assign(m,me()),m.lastError=null,h();let{e164:le}=b(_.authDir),ue=ne({cfg:v,channel:`whatsapp`,accountId:_.accountId});ie(`WhatsApp gateway connected${le?` as ${le}`:``}.`,{sessionKey:ue.sessionKey}),Le(_.accountId,B),T=Oe(e=>{if(!tn(e))return!1;let t=q(e);return p.warn({connectionId:s,error:t},`web reconnect: unhandled rejection from WhatsApp socket; forcing reconnect`),B.signalClose?.({status:499,isLoggedOut:!1,error:e}),!0});let V=async()=>{Le(_.accountId,null),T&&=(T(),null),l&&clearInterval(l),g&&clearInterval(g),z.size>0&&(await Promise.allSettled(z),z.clear());try{await B.close()}catch(e){u(`Socket close failed: ${q(e)}`)}};if(n&&(l=setInterval(()=>{let e=M(_.authDir),t=S?Math.floor((Date.now()-S)/6e4):null,n={connectionId:s,reconnectAttempts:R,messagesHandled:C,lastMessageAt:S,authAgeMs:e,uptimeMs:Date.now()-c,...t!==null&&t>30?{minutesSinceLastMessage:t}:{}};t&&t>30?f.warn(n,`⚠️ web gateway heartbeat - no messages in 30+ minutes`):f.info(n,`web gateway heartbeat`)},x*1e3),g=setInterval(()=>{if(!S)return;let e=Date.now()-S;if(e<=F)return;let t=Math.floor(e/6e4);f.warn({connectionId:s,minutesSinceLastMessage:t,lastMessageAt:new Date(S),messagesHandled:C},`Message timeout detected - forcing reconnect`),tt.warn(`No messages received in ${t}m - restarting connection`),V().catch(e=>{u(`Close listener failed: ${q(e)}`)}),B.signalClose?.({status:499,isLoggedOut:!1,error:`watchdog-timeout`})},oe)),Y.info(`Listening for personal WhatsApp inbound messages.`),(process.stdout.isTTY||process.stderr.isTTY)&&Y.raw(`Ctrl+C to stop.`),!n){await V(),process.removeListener(`SIGINT`,L);return}let H=await Promise.race([B.onClose?.catch(e=>(p.error({error:q(e)},`listener.onClose rejected`),{status:500,isLoggedOut:!1,error:e}))??nt(),re??nt()]);if(Date.now()-c>x*1e3&&(R=0),m.reconnectAttempts=R,h(),P()||I||H===`aborted`){await V();break}let U=(typeof H==`object`&&H&&`status`in H?H.status:void 0)??`unknown`,W=typeof H==`object`&&H&&`isLoggedOut`in H&&H.isLoggedOut,G=q(H);if(m.connected=!1,m.lastEventAt=Date.now(),m.lastDisconnect={at:m.lastEventAt,status:typeof U==`number`?U:void 0,error:G,loggedOut:!!W},m.lastError=G,m.reconnectAttempts=R,h(),p.info({connectionId:s,status:U,loggedOut:W,reconnectAttempts:R,error:G},`web reconnect: connection closed`),ie(`WhatsApp gateway disconnected (status ${U??`unknown`})`,{sessionKey:ue.sessionKey}),W){i.error(`WhatsApp session logged out. Run \`${k(`openclaw channels login --channel web`)}\` to relink.`),await V();break}if(fn(U)){p.warn({connectionId:s,status:U,error:G},`web reconnect: non-retryable close status; stopping monitor`),i.error(`WhatsApp Web connection closed (status ${U}: session conflict). Resolve conflicting WhatsApp Web sessions, then relink with \`${k(`openclaw channels login --channel web`)}\`. Stopping web monitoring.`),await V();break}if(R+=1,m.reconnectAttempts=R,h(),w.maxAttempts>0&&R>=w.maxAttempts){p.warn({connectionId:s,status:U,reconnectAttempts:R,maxAttempts:w.maxAttempts},`web reconnect: max attempts reached; continuing in degraded mode`),i.error(`WhatsApp Web reconnect: max attempts reached (${R}/${w.maxAttempts}). Stopping web monitoring.`),await V();break}let K=te(w,R);p.info({connectionId:s,status:U,reconnectAttempts:R,maxAttempts:w.maxAttempts||`unlimited`,delayMs:K},`web reconnect: scheduling retry`),i.error(`WhatsApp Web connection closed (status ${U}). Retry ${R}/${w.maxAttempts||`∞`} in ${de(K)}… (${G})`),await V();try{await j(K,a)}catch{break}}m.running=!1,m.connected=!1,m.lastEventAt=Date.now(),h(),process.removeListener(`SIGINT`,L)}export{j as WA_WEB_AUTH_DIR,Ue as createWaSocket,w as logWebSelfId,We as loginWeb,pn as monitorWebChannel,Mt as monitorWebInbox,_ as pickWebChannel,Be as sendMessageWhatsApp,Ve as waitForWaConnection,E as webAuthExists};
6
+ //# sourceMappingURL=web-Cq3xWCaD.js.map
@@ -3,3 +3,4 @@ import{s as e}from"./paths-CrCoPIVK.js";import"./paths-CChBdtE8.js";import{a as
3
3
  `),a={...n,body:i,mentionedJids:r.size>0?Array.from(r):void 0};await e.onMessage(a)},onError:e=>{t.error({error:String(e)},`failed handling inbound web message`),o.error(`Failed handling inbound web message: ${String(e)}`)}}),_=new Map,v=300*1e3,b=s.signalRepository?.lidMapping,x=async t=>f(t,{authDir:e.authDir,lidLookup:b}),S=async e=>{let t=_.get(e);if(t&&t.expires>Date.now())return t;try{let t=await s.groupMetadata(e),n=(await Promise.all(t.participants?.map(async e=>await x(e.id)??e.id)??[])).filter(Boolean)??[],r={subject:t.subject,participants:n,expires:Date.now()+v};return _.set(e,r),r}catch(t){return r(`Failed to fetch group metadata for ${e}: ${String(t)}`),{expires:Date.now()+v}}},C=async t=>{let n=t.key?.id??void 0,r=t.key?.remoteJid;if(!r||r.endsWith(`@status`)||r.endsWith(`@broadcast`))return null;let i=Xe(r)===!0;if(n&&it(`${e.accountId}:${r}:${n}`))return null;let a=t.key?.participant??void 0,o=i?r:await x(r);if(!o)return null;let l=i?a?await x(a):null:o,u,d;if(i){let e=await S(r);u=e.subject,d=e.participants}let f=t.messageTimestamp?Number(t.messageTimestamp)*1e3:void 0,p=await Tt({accountId:e.accountId,from:o,selfE164:h,senderE164:l,group:i,pushName:t.pushName??void 0,isFromMe:!!t.key?.fromMe,messageTimestampMs:f,connectedAtMs:c,sock:{sendMessage:(e,t)=>s.sendMessage(e,t)},remoteJid:r});return p.allowed?{id:n,remoteJid:r,group:i,participantJid:a,from:o,senderE164:l,groupSubject:u,groupParticipants:d,messageTimestampMs:f,access:p}:null},w=async t=>{let{id:n,remoteJid:a,participantJid:o,access:c}=t;if(n&&!c.isSelfChat&&e.sendReadReceipts!==!1)try{await s.readMessages([{remoteJid:a,id:n,participant:o,fromMe:!1}]),i()&&r(`Marked message ${n} as read for ${a}${o?` (participant ${o})`:``}`)}catch(e){r(`Failed to mark message ${n} read: ${String(e)}`)}else n&&c.isSelfChat&&i()&&r(`Self-chat mode: skipping read receipt for ${n}`)},T=async t=>{let n=St(t.message??void 0),i=n?Te(n):void 0,a=pt(t.message??void 0);if(i&&(a=[a,i].filter(Boolean).join(`
4
4
  `).trim()),!a&&(a=mt(t.message??void 0),!a))return null;let o=Ct(t.message),c,l,u;try{let n=await Ot(t,s);if(n){let t=(typeof e.mediaMaxMb==`number`&&e.mediaMaxMb>0?e.mediaMaxMb:50)*1024*1024;c=(await y(n.buffer,n.mimetype,`inbound`,t,n.fileName)).path,l=n.mimetype,u=n.fileName}}catch(e){r(`Inbound media download failed: ${String(e)}`)}return{body:a,location:n??void 0,replyContext:o,mediaPath:c,mediaType:l,mediaFileName:u}},E=async(e,n,i)=>{let a=n.remoteJid,c=async()=>{try{await s.sendPresenceUpdate(`composing`,a)}catch(e){r(`Presence update failed: ${String(e)}`)}},l=async e=>{await s.sendMessage(a,{text:e})},u=async e=>{await s.sendMessage(a,e)},d=n.messageTimestampMs,f=ft(e.message),m=e.pushName??void 0;t.info({from:n.from,to:h??`me`,body:i.body,mediaPath:i.mediaPath,mediaType:i.mediaType,mediaFileName:i.mediaFileName,timestamp:d},`inbound message`);let _={id:n.id,from:n.from,conversationId:n.from,to:h??`me`,accountId:n.access.resolvedAccountId,body:i.body,pushName:m,timestamp:d,chatType:n.group?`group`:`direct`,chatId:n.remoteJid,senderJid:n.participantJid,senderE164:n.senderE164??void 0,senderName:m,replyToId:i.replyContext?.id,replyToBody:i.replyContext?.body,replyToSender:i.replyContext?.sender,replyToSenderJid:i.replyContext?.senderJid,replyToSenderE164:i.replyContext?.senderE164,groupSubject:n.groupSubject,groupParticipants:n.groupParticipants,mentionedJids:f??void 0,selfJid:p,selfE164:h,fromMe:!!e.key?.fromMe,location:i.location??void 0,sendComposing:c,reply:l,sendMedia:u,mediaPath:i.mediaPath,mediaType:i.mediaType,mediaFileName:i.mediaFileName};try{Promise.resolve(g.enqueue(_)).catch(e=>{t.error({error:String(e)},`failed handling inbound web message`),o.error(`Failed handling inbound web message: ${String(e)}`)})}catch(e){t.error({error:String(e)},`failed handling inbound web message`),o.error(`Failed handling inbound web message: ${String(e)}`)}},D=async t=>{if(!(t.type!==`notify`&&t.type!==`append`))for(let n of t.messages??[]){Fe({channel:`whatsapp`,accountId:e.accountId,direction:`inbound`});let r=await C(n);if(!r||(await w(r),t.type===`append`))continue;let i=await T(n);i&&await E(n,r,i)}};s.ev.on(`messages.upsert`,D);let O=e=>{try{if(e.connection===`close`){let t=He(e.lastDisconnect?.error);d({status:t,isLoggedOut:t===Ke.loggedOut,error:e.lastDisconnect?.error})}}catch(e){t.error({error:String(e)},`connection.update handler error`),d({status:void 0,isLoggedOut:!1,error:e})}};return s.ev.on(`connection.update`,O),{close:async()=>{try{let e=s.ev,t=D,n=O;typeof e.off==`function`?(e.off(`messages.upsert`,t),e.off(`connection.update`,n)):typeof e.removeListener==`function`&&(e.removeListener(`messages.upsert`,t),e.removeListener(`connection.update`,n)),s.ws?.close()}catch(e){r(`Socket close failed: ${String(e)}`)}},onClose:u,signalClose:e=>{d(e??{status:void 0,isLoggedOut:!1,error:`closed`})},...jt({sock:{sendMessage:(e,t)=>s.sendMessage(e,t),sendPresenceUpdate:(e,t)=>s.sendPresenceUpdate(e,t)},defaultAccountId:e.accountId})}}function Nt(e,t){return{mentionRegexes:I(e,t),allowFrom:e.channels?.whatsapp?.allowFrom}}function Pt(e,t){let n=t?{authDir:t}:void 0;return{normalizedMentions:e.mentionedJids?.length?e.mentionedJids.map(e=>m(e,n)??e).filter(Boolean):[],selfE164:e.selfE164??(e.selfJid?m(e.selfJid,n):null),selfJid:e.selfJid?e.selfJid.replace(/:\\d+/,``):null}}function Ft(e,t,n){let r=e=>R(e),i=d(n.selfE164,t.allowFrom);if((e.mentionedJids?.length??0)>0&&!i)return!!(n.selfE164&&n.normalizedMentions.includes(n.selfE164)||n.selfJid&&n.normalizedMentions.includes(n.selfJid));let a=r(e.body);if(t.mentionRegexes.some(e=>e.test(a)))return!0;if(n.selfE164){let t=n.selfE164.replace(/\D/g,``);if(t){if(a.replace(/[^\d]/g,``).includes(t))return!0;let n=e.body.replace(/[\s-]/g,``);if(RegExp(`\\+?${t}`,`i`).test(n))return!0}}return!1}function It(e,t,n){let r=Pt(e,n);return{wasMentioned:Ft(e,t,r),details:{from:e.from,body:e.body,bodyClean:R(e.body),mentionedJids:e.mentionedJids??null,normalizedMentionedJids:r.normalizedMentions.length?r.normalizedMentions:null,selfJid:e.selfJid??null,selfJidBare:r.selfJid,selfE164:e.selfE164??null,resolvedSelfE164:r.selfE164}}}function Lt(e,t){let n=e.allowFrom;return(Array.isArray(n)&&n.length>0?n:t?[t]:[]).filter(e=>!!(e&&e!==`*`)).map(e=>u(e)).filter(e=>!!e)}function Rt(e){let t=new Set,n=Math.max(1,e.maxItems??100),r=e=>`combined:${e.sessionKey}:${e.combinedBody}`,i=()=>{for(;t.size>n;){let e=t.values().next().value;if(!e)break;t.delete(e)}};return{rememberText:(n,a)=>{n&&(t.add(n),a.combinedBody&&a.combinedBodySessionKey&&t.add(r({sessionKey:a.combinedBodySessionKey,combinedBody:a.combinedBody})),a.logVerboseMessage&&e.logVerbose?.(`Added to echo detection set (size now: ${t.size}): ${n.substring(0,50)}...`),i())},has:e=>t.has(e),forget:e=>{t.delete(e)},buildCombinedKey:r}}function zt(e){let t=Ce({agentId:e.agentId,channel:`whatsapp`,accountId:e.route.accountId,peer:{kind:e.msg.chatType===`group`?`group`:`direct`,id:e.peerId},dmScope:e.cfg.session?.dmScope,identityLinks:e.cfg.session?.identityLinks}),n=l({agentId:e.agentId,mainKey:o});return{sessionKey:t,mainSessionKey:n,lastRoutePolicy:ue({sessionKey:t,mainSessionKey:n})}}async function Bt(e){let t=e.cfg.broadcast?.[e.peerId];if(!t||!Array.isArray(t)||t.length===0)return!1;let n=e.cfg.broadcast?.strategy||`parallel`;X.info(`Broadcasting message to ${t.length} agents (${n})`);let r=e.cfg.agents?.list?.map(e=>s(e.id)),i=(r?.length??0)>0,a=e.msg.chatType===`group`?e.groupHistories.get(e.groupHistoryKey)??[]:void 0,o=async t=>{let n=s(t);if(i&&!r?.includes(n))return X.warn(`Broadcast agent ${t} not found in agents.list; skipping`),!1;let o=zt({cfg:e.cfg,msg:e.msg,route:e.route,peerId:e.peerId,agentId:n}),c={...e.route,agentId:n,...o};try{return await e.processMessage(e.msg,c,e.groupHistoryKey,{groupHistory:a,suppressGroupHistoryClear:!0})}catch(e){return X.error(`Broadcast agent ${t} failed: ${q(e)}`),!1}};if(n===`sequential`)for(let e of t)await o(e);else await Promise.allSettled(t.map(o));return e.msg.chatType===`group`&&e.groupHistories.set(e.groupHistoryKey,[]),!0}function Vt(e,t,n){let r=e;for(let e of t)r=r.replace(e,` `);if(n){let e=n.replace(/\D/g,``);if(e){let t=RegExp(`\\+?${e}`,`g`);r=r.replace(t,` `)}}return r.replace(/\s+/g,` `).trim()}function Ht(e,t){let n=A({From:t,ChatType:`group`,Provider:`whatsapp`})?.id,r=e.channels?.whatsapp,i=!!(r?.groupAllowFrom?.length||r?.allowFrom?.length);return x({cfg:e,channel:`whatsapp`,groupId:n??t,hasGroupAllowFrom:i})}function Ut(e,t){let n=A({From:t,ChatType:`group`,Provider:`whatsapp`})?.id;return v({cfg:e,channel:`whatsapp`,groupId:n??t})}function Wt(t){let n=ee(e(t.cfg.session?.store,{agentId:t.agentId}))[t.sessionKey],r=Ut(t.cfg,t.conversationId)?`mention`:`always`;return z(n?.groupActivation)??r}function Gt(e,t,n){for(let r of e){let e=u(r)??r;!e||t.has(e)||(t.add(e),n.push(e))}}function Kt(e,t,n,r){if(!n||!r)return;let i=u(n)??n;if(!i)return;let a=e.get(t);a||(a=new Map,e.set(t,a)),a.set(i,r)}function qt(e){let{participants:t,roster:n,fallbackE164:r}=e,i=new Set,a=[];if(t?.length&&Gt(t,i,a),n&&Gt(n.keys(),i,a),a.length===0&&r){let e=u(r)??r;e&&a.push(e)}if(a.length!==0)return a.map(e=>{let t=n?.get(e);return t?`${t} (${e})`:e}).join(`, `)}function Jt(e,t){let n=u(t.senderE164??``);return n?Lt(e,t.selfE164??void 0).includes(n):!1}function Yt(e){let t=e.msg.senderName&&e.msg.senderE164?`${e.msg.senderName} (${e.msg.senderE164})`:e.msg.senderName??e.msg.senderE164??`Unknown`;G({historyMap:e.groupHistories,historyKey:e.groupHistoryKey,limit:e.groupHistoryLimit,entry:{sender:t,body:e.msg.body,timestamp:e.msg.timestamp,id:e.msg.id,senderJid:e.msg.senderJid}})}function Xt(e,t){return e.logVerbose(t),Yt({msg:e.msg,groupHistories:e.groupHistories,groupHistoryKey:e.groupHistoryKey,groupHistoryLimit:e.groupHistoryLimit}),{shouldProcess:!1}}function Zt(e){let t=Ht(e.cfg,e.conversationId);if(t.allowlistEnabled&&!t.allowed)return e.logVerbose(`Skipping group message ${e.conversationId} (not in allowlist)`),{shouldProcess:!1};Kt(e.groupMemberNames,e.groupHistoryKey,e.msg.senderE164,e.msg.senderName);let n=Nt(e.cfg,e.agentId),r=Vt(e.msg.body,n.mentionRegexes,e.msg.selfE164),i=me(r),a=Jt(e.baseMentionConfig,e.msg),o=a&&le(r,e.cfg);if(i.hasCommand&&!a)return Xt(e,`Ignoring /activation from non-owner in group ${e.conversationId}`);let s=It(e.msg,n,e.authDir);e.replyLogger.debug({conversationId:e.conversationId,wasMentioned:s.wasMentioned,...s.details},`group mention debug`);let c=s.wasMentioned,l=Wt({cfg:e.cfg,agentId:e.agentId,sessionKey:e.sessionKey,conversationId:e.conversationId})!==`always`,d=e.msg.selfJid?.replace(/:\\d+/,``),f=e.msg.replyToSenderJid?.replace(/:\\d+/,``),p=e.msg.selfE164?u(e.msg.selfE164):null,m=e.msg.replyToSenderE164?u(e.msg.replyToSenderE164):null,h=W({requireMention:l,canDetectMention:!0,wasMentioned:c,implicitMention:!!(d&&f&&d===f||p&&m&&p===m),shouldBypassMention:o});return e.msg.wasMentioned=h.effectiveWasMentioned,!o&&l&&h.shouldSkip?Xt(e,`Group message stored for context (no mention detected) in ${e.conversationId}: ${e.msg.body}`):{shouldProcess:!0}}function Qt(e,t){e.add(t),t.finally(()=>{e.delete(t)})}function $t(t){let n=e(t.cfg.session?.store,{agentId:t.storeAgentId}),r=k({storePath:n,sessionKey:t.sessionKey,deliveryContext:{channel:t.channel,to:t.to,accountId:t.accountId},ctx:t.ctx}).catch(e=>{t.warn({error:q(e),storePath:n,sessionKey:t.sessionKey,to:t.to},`failed updating last route`)});Qt(t.backgroundTasks,r)}function en(e){return e.chatType===`group`?e.conversationId??e.from:e.senderE164?u(e.senderE164)??e.senderE164:e.from.includes(`@`)?m(e.from)??e.from:u(e.from)??e.from}function $(e,t=400){return!e||e.length<=t?e:`${e.slice(0,t)}… (truncated ${e.length-t} chars)`}function tn(e){let t=(e instanceof Error?`${e.message}\n${e.stack??``}`:(e=>{if(e==null)return``;if(typeof e==`string`)return e;if(e instanceof Error)return`${e.message}\n${e.stack??``}`;if(typeof e==`object`)try{return JSON.stringify(e)}catch{return Object.prototype.toString.call(e)}return typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`?String(e):typeof e==`symbol`?e.description??e.toString():typeof e==`function`?e.name?`[function ${e.name}]`:`[function]`:Object.prototype.toString.call(e)})(e)).toLowerCase();return t.includes(`unsupported state or unable to authenticate data`)||t.includes(`bad mac`)?t.includes(`@whiskeysockets/baileys`)||t.includes(`baileys`)||t.includes(`noise-handler`)||t.includes(`aesdecryptgcm`):!1}function nn(e){if(e.isReasoning===!0)return!0;let t=e.text;return typeof t==`string`?t.trimStart().toLowerCase().startsWith(`reasoning:`):!1}async function rn(e){let{replyResult:t,msg:n,maxMediaBytes:a,textLimit:o,replyLogger:s,connectionId:c,skipLog:l}=e,u=Date.now();if(nn(t)){Z.debug(`Suppressed reasoning payload to ${n.from}`);return}let d=e.tableMode??`code`,f=e.chunkMode??`length`,p=je(Re(Ie(t.text||``,d)),o,f),m=t.mediaUrls?.length?t.mediaUrls:t.mediaUrl?[t.mediaUrl]:[],h=async(e,t,i=3)=>{let a;for(let o=1;o<=i;o++)try{return await e()}catch(e){a=e;let s=q(e),c=o===i;if(!/closed|reset|timed\s*out|disconnect/i.test(s)||c)throw e;let l=500*o;r(`Retrying ${t} to ${n.from} after failure (${o}/${i-1}) in ${l}ms: ${s}`),await g(l)}throw a};if(m.length===0&&p.length){let e=p.length;for(let[t,r]of p.entries()){let i=Date.now();if(await h(()=>n.reply(r),`text`),!l){let r=Date.now()-i;Z.debug(`Sent chunk ${t+1}/${e} to ${n.from} (${r.toFixed(0)}ms)`)}}s.info({correlationId:n.id??J(),connectionId:c??null,to:n.from,from:n.to,text:$(t.text,240),mediaUrl:null,mediaSizeBytes:null,mediaKind:null,durationMs:Date.now()-u},`auto-reply sent (text)`);return}let _=[...p];for(let[t,o]of m.entries()){let l=t===0&&_.shift()||void 0;try{let t=await Ae(o,{maxBytes:a,localRoots:e.mediaLocalRoots});if(i()&&(r(`Web auto-reply media size: ${(t.buffer.length/(1024*1024)).toFixed(2)}MB`),r(`Web auto-reply media source: ${o} (kind ${t.kind})`)),t.kind===`image`)await h(()=>n.sendMedia({image:t.buffer,caption:l,mimetype:t.contentType}),`media:image`);else if(t.kind===`audio`)await h(()=>n.sendMedia({audio:t.buffer,ptt:!0,mimetype:t.contentType,caption:l}),`media:audio`);else if(t.kind===`video`)await h(()=>n.sendMedia({video:t.buffer,caption:l,mimetype:t.contentType}),`media:video`);else{let e=t.fileName??o.split(`/`).pop()??`file`,r=t.contentType??`application/octet-stream`;await h(()=>n.sendMedia({document:t.buffer,fileName:e,caption:l,mimetype:r}),`media:document`)}Z.info(`Sent media reply to ${n.from} (${(t.buffer.length/(1024*1024)).toFixed(2)}MB)`),s.info({correlationId:n.id??J(),connectionId:c??null,to:n.from,from:n.to,text:l??null,mediaUrl:o,mediaSizeBytes:t.buffer.length,mediaKind:t.kind,durationMs:Date.now()-u},`auto-reply sent (media)`)}catch(e){if(Z.error(`Failed sending web media to ${n.from}: ${q(e)}`),s.warn({err:e,mediaUrl:o},`failed to send web media reply`),t===0){let t=e instanceof Error?`⚠️ Media failed: ${e.message}`:`⚠️ Media failed.`,r=[_.shift()??l??``,t].filter(Boolean).join(`
5
5
  `);r&&(Z.warn(`Media skipped; sent text-only to ${n.from}`),await n.reply(r))}}}for(let e of _)await n.reply(e)}function an(e){if(!e.msg.id)return;let t=e.cfg.channels?.whatsapp?.ackReaction,n=(t?.emoji??``).trim(),i=t?.direct??!0,a=t?.group??`mentions`,o=e.msg.conversationId??e.msg.from,s=e.msg.chatType===`group`?Wt({cfg:e.cfg,agentId:e.agentId,sessionKey:e.sessionKey,conversationId:o}):null;V({emoji:n,isDirect:e.msg.chatType===`direct`,isGroup:e.msg.chatType===`group`,directEnabled:i,groupMode:a,wasMentioned:e.msg.wasMentioned===!0,groupActivated:s===`always`})&&(e.info({chatId:e.msg.chatId,messageId:e.msg.id,emoji:n},`sending ack reaction`),ze(e.msg.chatId,e.msg.id,n,{verbose:e.verbose,fromMe:!1,participant:e.msg.senderJid,accountId:e.accountId}).catch(t=>{e.warn({error:q(t),chatId:e.msg.chatId,messageId:e.msg.id},`failed to send ack reaction`),r(`WhatsApp ack reaction failed for chat ${e.msg.chatId}: ${q(t)}`)}))}function on(e){return e.replyToBody?`[Replying to ${e.replyToSender??`unknown sender`}${e.replyToId?` id:${e.replyToId}`:``}]\n${e.replyToBody}\n[/Replying]`:null}function sn(e){let{cfg:t,msg:n,agentId:r,previousTimestamp:i,envelope:a}=e,o=oe(t,r,{configured:t.channels?.whatsapp?.messagePrefix,hasAllowFrom:(t.channels?.whatsapp?.allowFrom?.length??0)>0}),s=o?`${o} `:``,c=on(n),l=`${s}${n.body}${c?`\n\n${c}`:``}`;return B({channel:`WhatsApp`,from:n.chatType===`group`?n.from:n.from?.replace(/^whatsapp:/,``),timestamp:n.timestamp,body:l,chatType:n.chatType,sender:{name:n.senderName,e164:n.senderE164,id:n.senderJid},previousTimestamp:i,envelope:a,fromMe:n.fromMe})}async function cn(e){let t=e.cfg.commands?.useAccessGroups!==!1;if(!t)return!0;let n=e.msg.chatType===`group`,r=u(n?e.msg.senderE164??``:e.msg.senderE164??e.msg.from??``);if(!r)return!1;let i=E({cfg:e.cfg,accountId:e.msg.accountId}),a=i.dmPolicy??`pairing`,o=i.groupPolicy??`allowlist`,s=i.allowFrom??[],c=i.groupAllowFrom??(s.length>0?s:void 0),l=n?[]:await K({provider:`whatsapp`,accountId:e.msg.accountId,dmPolicy:a});return ve({isGroup:n,dmPolicy:a,groupPolicy:o,allowFrom:s.length>0?s:e.msg.selfE164?[e.msg.selfE164]:[],groupAllowFrom:c,storeAllowFrom:l,isSenderAllowed:e=>e.includes(`*`)?!0:e.map(e=>u(String(e))).filter(e=>!!e).includes(r),command:{useAccessGroups:t,allowTextCommands:!0,hasControlCommand:!0}}).commandAuthorized}function ln(e){let t=E({cfg:e.cfg,accountId:e.msg.accountId});return fe({dmScope:e.cfg.session?.dmScope,allowFrom:t.allowFrom,normalizeEntry:e=>u(e)})}async function un(e){let t=e.msg.conversationId??e.msg.from,{storePath:n,envelopeOptions:a,previousTimestamp:o}=H({cfg:e.cfg,agentId:e.route.agentId,sessionKey:e.route.sessionKey}),s=sn({cfg:e.cfg,msg:e.msg,agentId:e.route.agentId,previousTimestamp:o,envelope:a}),c=!1;if(e.msg.chatType===`group`){let n=e.groupHistory??e.groupHistories.get(e.groupHistoryKey)??[];n.length>0&&(s=xe({entries:n.map(e=>({sender:e.sender,body:e.body,timestamp:e.timestamp})),currentMessage:s,excludeLast:!1,formatEntry:e=>B({channel:`WhatsApp`,from:t,timestamp:e.timestamp,body:e.body,chatType:`group`,senderLabel:e.sender,envelope:a})})),c=!(e.suppressGroupHistoryClear??!1)}let l=e.buildCombinedEchoKey({sessionKey:e.route.sessionKey,combinedBody:s});if(e.echoHas(l))return r(`Skipping auto-reply: detected echo for combined message`),e.echoForget(l),!1;an({cfg:e.cfg,msg:e.msg,agentId:e.route.agentId,sessionKey:e.route.sessionKey,conversationId:t,verbose:e.verbose,accountId:e.route.accountId,info:e.replyLogger.info.bind(e.replyLogger),warn:e.replyLogger.warn.bind(e.replyLogger)});let d=e.msg.id??J();e.replyLogger.info({connectionId:e.connectionId,correlationId:d,from:e.msg.chatType===`group`?t:e.msg.from,to:e.msg.to,body:$(s,240),mediaType:e.msg.mediaType??null,mediaPath:e.msg.mediaPath??null},`inbound web message`);let f=e.msg.chatType===`group`?t:e.msg.from,p=e.msg.mediaType?`, ${e.msg.mediaType}`:``;X.info(`Inbound message ${f} -> ${e.msg.to} (${e.msg.chatType}${p}, ${s.length} chars)`),i()&&X.debug(`Inbound body: ${$(s,400)}`);let h=e.msg.chatType===`group`?void 0:e.msg.senderE164?u(e.msg.senderE164):e.msg.from.includes(`@`)?m(e.msg.from):u(e.msg.from),g=e.maxMediaTextChunkLimit??Me(e.cfg,`whatsapp`),_=Ne(e.cfg,`whatsapp`,e.route.accountId),v=Pe({cfg:e.cfg,channel:`whatsapp`,accountId:e.route.accountId}),y=ke(e.cfg,e.route.agentId),b=!1,x=!1,S=F(e.msg.body,e.cfg)?await cn({cfg:e.cfg,msg:e.msg}):void 0,C=e.cfg.messages?.responsePrefix,{onModelSelected:w,...T}=he({cfg:e.cfg,agentId:e.route.agentId,channel:`whatsapp`,accountId:e.route.accountId}),E=e.msg.chatType!==`group`&&!!e.msg.selfE164&&u(e.msg.from)===u(e.msg.selfE164??``),O=T.responsePrefix??(C===void 0&&E?ye(e.cfg,e.route.agentId):void 0),ee=e.msg.chatType===`group`?(e.groupHistory??e.groupHistories.get(e.groupHistoryKey)??[]).map(e=>({sender:e.sender,body:e.body,timestamp:e.timestamp})):void 0,k=ce({Body:s,BodyForAgent:e.msg.body,InboundHistory:ee,RawBody:e.msg.body,CommandBody:e.msg.body,From:e.msg.from,To:e.msg.to,SessionKey:e.route.sessionKey,AccountId:e.route.accountId,MessageSid:e.msg.id,ReplyToId:e.msg.replyToId,ReplyToBody:e.msg.replyToBody,ReplyToSender:e.msg.replyToSender,MediaPath:e.msg.mediaPath,MediaUrl:e.msg.mediaUrl,MediaType:e.msg.mediaType,ChatType:e.msg.chatType,ConversationLabel:e.msg.chatType===`group`?t:e.msg.from,GroupSubject:e.msg.groupSubject,GroupMembers:qt({participants:e.msg.groupParticipants,roster:e.groupMemberNames.get(e.groupHistoryKey),fallbackE164:e.msg.senderE164}),SenderName:e.msg.senderName,SenderId:e.msg.senderJid?.trim()||e.msg.senderE164,SenderE164:e.msg.senderE164,CommandAuthorized:S,WasMentioned:e.msg.wasMentioned,...e.msg.location?Ee(e.msg.location):{},Provider:`whatsapp`,Surface:`whatsapp`,OriginatingChannel:`whatsapp`,OriginatingTo:e.msg.from}),A=ln({cfg:e.cfg,msg:e.msg}),te=!A||A===h,j=ie({route:e.route,sessionKey:e.route.sessionKey});h&&j===e.route.mainSessionKey&&te?$t({cfg:e.cfg,backgroundTasks:e.backgroundTasks,storeAgentId:e.route.agentId,sessionKey:e.route.mainSessionKey,channel:`whatsapp`,to:h,accountId:e.route.accountId,ctx:k,warn:e.replyLogger.warn.bind(e.replyLogger)}):h&&j===e.route.mainSessionKey&&A&&r(`Skipping main-session last route update for ${h} (pinned owner ${A})`);let M=D({storePath:n,sessionKey:e.route.sessionKey,ctx:k}).catch(t=>{e.replyLogger.warn({error:q(t),storePath:n,sessionKey:e.route.sessionKey},`failed updating session meta`)});Qt(e.backgroundTasks,M);let{queuedFinal:N}=await Se({ctx:k,cfg:e.cfg,replyResolver:e.replyResolver,dispatcherOptions:{...T,responsePrefix:O,onHeartbeatStrip:()=>{b||(b=!0,r(`Stripped stray HEARTBEAT_OK token from web reply`))},deliver:async(n,r)=>{if(r.kind!==`final`)return;await rn({replyResult:n,msg:e.msg,mediaLocalRoots:y,maxMediaBytes:e.maxMediaBytes,textLimit:g,chunkMode:_,replyLogger:e.replyLogger,connectionId:e.connectionId,skipLog:!1,tableMode:v}),x=!0;let a=n.text?!0:void 0;e.rememberSentText(n.text,{combinedBody:s,combinedBodySessionKey:e.route.sessionKey,logVerboseMessage:a});let o=e.msg.chatType===`group`?t:e.msg.from??`unknown`,c=!!(n.mediaUrl||n.mediaUrls?.length);if(Z.info(`Auto-replied to ${o}${c?` (media)`:``}`),i()){let e=n.text==null?`<media>`:$(n.text,400);Z.debug(`Reply body: ${e}${c?` (media)`:``}`)}},onError:(n,r)=>{let i=r.kind===`tool`?`tool update`:r.kind===`block`?`block update`:`auto-reply`;Z.error(`Failed sending web ${i} to ${e.msg.from??t}: ${q(n)}`)},onReplyStart:e.msg.sendComposing},replyOptions:{disableBlockStreaming:!0,onModelSelected:w}});return N?(c&&e.groupHistories.set(e.groupHistoryKey,[]),x):(c&&e.groupHistories.set(e.groupHistoryKey,[]),r(`Skipping auto-reply: silent token or no text/media returned from resolver`),!1)}function dn(e){let t=async(t,n,r,i)=>un({cfg:e.cfg,msg:t,route:n,groupHistoryKey:r,groupHistories:e.groupHistories,groupMemberNames:e.groupMemberNames,connectionId:e.connectionId,verbose:e.verbose,maxMediaBytes:e.maxMediaBytes,replyResolver:e.replyResolver,replyLogger:e.replyLogger,backgroundTasks:e.backgroundTasks,rememberSentText:e.echoTracker.rememberText,echoHas:e.echoTracker.has,echoForget:e.echoTracker.forget,buildCombinedEchoKey:e.echoTracker.buildCombinedKey,groupHistory:i?.groupHistory,suppressGroupHistoryClear:i?.suppressGroupHistoryClear});return async n=>{let i=n.conversationId??n.from,a=en(n),o=ae({cfg:C(),channel:`whatsapp`,accountId:n.accountId,peer:{kind:n.chatType===`group`?`group`:`direct`,id:a}}),s=n.chatType===`group`?c({channel:`whatsapp`,accountId:o.accountId,peerKind:`group`,peerId:a}):o.sessionKey;if(n.from===n.to&&r(`📱 Same-phone mode detected (from === to: ${n.from})`),e.echoTracker.has(n.body)){r(`Skipping auto-reply: detected echo (message matches recently sent text)`),e.echoTracker.forget(n.body);return}if(n.chatType===`group`){let t={From:n.from,To:n.to,SessionKey:o.sessionKey,AccountId:o.accountId,ChatType:n.chatType,ConversationLabel:i,GroupSubject:n.groupSubject,SenderName:n.senderName,SenderId:n.senderJid?.trim()||n.senderE164,SenderE164:n.senderE164,Provider:`whatsapp`,Surface:`whatsapp`,OriginatingChannel:`whatsapp`,OriginatingTo:i};if($t({cfg:e.cfg,backgroundTasks:e.backgroundTasks,storeAgentId:o.agentId,sessionKey:o.sessionKey,channel:`whatsapp`,to:i,accountId:o.accountId,ctx:t,warn:e.replyLogger.warn.bind(e.replyLogger)}),!Zt({cfg:e.cfg,msg:n,conversationId:i,groupHistoryKey:s,agentId:o.agentId,sessionKey:o.sessionKey,baseMentionConfig:e.baseMentionConfig,authDir:e.account.authDir,groupHistories:e.groupHistories,groupHistoryLimit:e.groupHistoryLimit,groupMemberNames:e.groupMemberNames,logVerbose:r,replyLogger:e.replyLogger}).shouldProcess)return}else !n.senderE164&&a&&a.startsWith(`+`)&&(n.senderE164=u(a)??n.senderE164);await Bt({cfg:e.cfg,msg:n,peerId:a,route:o,groupHistoryKey:s,groupHistories:e.groupHistories,processMessage:t})||await t(n,o,s)}}function fn(e){return e===440}async function pn(e,i=Mt,a=!0,o=re,s=t,c,l={}){let u=J(),d=n({module:`web-auto-reply`,runId:u}),f=n({module:`web-heartbeat`,runId:u}),p=n({module:`web-reconnect`,runId:u}),m={running:!0,connected:!1,reconnectAttempts:0,lastConnectedAt:null,lastDisconnect:null,lastMessageAt:null,lastEventAt:null,lastError:null},h=()=>{l.statusSink?.({...m,lastDisconnect:m.lastDisconnect?{...m.lastDisconnect}:null})};h();let g=C(),_=E({cfg:g,accountId:l.accountId}),v={...g,channels:{...g.channels,whatsapp:{...g.channels?.whatsapp,ackReaction:_.ackReaction,messagePrefix:_.messagePrefix,allowFrom:_.allowFrom,groupAllowFrom:_.groupAllowFrom,groupPolicy:_.groupPolicy,textChunkLimit:_.textChunkLimit,chunkMode:_.chunkMode,mediaMaxMb:_.mediaMaxMb,blockStreaming:_.blockStreaming,groups:_.groups}}},y=w(_),x=$e(v,l.heartbeatSeconds),T=et(v,l.reconnect),D=Nt(v),O=v.channels?.whatsapp?.accounts?.[l.accountId??``]?.historyLimit??v.channels?.whatsapp?.historyLimit??v.messages?.groupChat?.historyLimit??50,ee=new Map,k=new Map,A=Rt({maxItems:100,logVerbose:r}),te=l.sleep??((e,t)=>pe(e,t??c)),M=()=>c?.aborted===!0,N=c&&new Promise(e=>c.addEventListener(`abort`,()=>e(`aborted`),{once:!0})),P=process.getMaxListeners?.()??10;process.setMaxListeners&&P<50&&process.setMaxListeners(50);let ie=!1,F=()=>{ie=!0};process.once(`SIGINT`,F);let I=0;for(;!M();){let t=J(),n=Date.now(),u=null,g=null,C=null,w=0,E=null,P=l.messageTimeoutMs??1800*1e3,oe=l.watchdogCheckMs??60*1e3,L=new Set,R=dn({cfg:v,verbose:e,connectionId:t,maxMediaBytes:y,groupHistoryLimit:O,groupHistories:ee,groupMemberNames:k,echoTracker:A,backgroundTasks:L,replyResolver:o??re,replyLogger:d,baseMentionConfig:D,account:_}),ce=we({cfg:v,channel:`whatsapp`}),z=await(i??Mt)({verbose:e,accountId:_.accountId,authDir:_.authDir,mediaMaxMb:_.mediaMaxMb,sendReadReceipts:_.sendReadReceipts,debounceMs:ce,shouldDebounce:e=>e.mediaPath||e.mediaType||e.location||e.replyToId||e.replyToBody?!1:!le(e.body,v),onMessage:async e=>{w+=1,C=Date.now(),m.lastMessageAt=C,m.lastEventAt=C,h(),await R(e)}});Object.assign(m,_e()),m.lastError=null,h();let{e164:B}=b(_.authDir),ue=ae({cfg:v,channel:`whatsapp`,accountId:_.accountId});se(`WhatsApp gateway connected${B?` as ${B}`:``}.`,{sessionKey:ue.sessionKey}),Le(_.accountId,z),E=Oe(e=>{if(!tn(e))return!1;let n=q(e);return p.warn({connectionId:t,error:n},`web reconnect: unhandled rejection from WhatsApp socket; forcing reconnect`),z.signalClose?.({status:499,isLoggedOut:!1,error:e}),!0});let V=async()=>{Le(_.accountId,null),E&&=(E(),null),u&&clearInterval(u),g&&clearInterval(g),L.size>0&&(await Promise.allSettled(L),L.clear());try{await z.close()}catch(e){r(`Socket close failed: ${q(e)}`)}};if(a&&(u=setInterval(()=>{let e=j(_.authDir),r=C?Math.floor((Date.now()-C)/6e4):null,i={connectionId:t,reconnectAttempts:I,messagesHandled:w,lastMessageAt:C,authAgeMs:e,uptimeMs:Date.now()-n,...r!==null&&r>30?{minutesSinceLastMessage:r}:{}};r&&r>30?f.warn(i,`⚠️ web gateway heartbeat - no messages in 30+ minutes`):f.info(i,`web gateway heartbeat`)},x*1e3),g=setInterval(()=>{if(!C)return;let e=Date.now()-C;if(e<=P)return;let n=Math.floor(e/6e4);f.warn({connectionId:t,minutesSinceLastMessage:n,lastMessageAt:new Date(C),messagesHandled:w},`Message timeout detected - forcing reconnect`),tt.warn(`No messages received in ${n}m - restarting connection`),V().catch(e=>{r(`Close listener failed: ${q(e)}`)}),z.signalClose?.({status:499,isLoggedOut:!1,error:`watchdog-timeout`})},oe)),Y.info(`Listening for personal WhatsApp inbound messages.`),(process.stdout.isTTY||process.stderr.isTTY)&&Y.raw(`Ctrl+C to stop.`),!a){await V(),process.removeListener(`SIGINT`,F);return}let H=await Promise.race([z.onClose?.catch(e=>(p.error({error:q(e)},`listener.onClose rejected`),{status:500,isLoggedOut:!1,error:e}))??nt(),N??nt()]);if(Date.now()-n>x*1e3&&(I=0),m.reconnectAttempts=I,h(),M()||ie||H===`aborted`){await V();break}let U=(typeof H==`object`&&H&&`status`in H?H.status:void 0)??`unknown`,W=typeof H==`object`&&H&&`isLoggedOut`in H&&H.isLoggedOut,G=q(H);if(m.connected=!1,m.lastEventAt=Date.now(),m.lastDisconnect={at:m.lastEventAt,status:typeof U==`number`?U:void 0,error:G,loggedOut:!!W},m.lastError=G,m.reconnectAttempts=I,h(),p.info({connectionId:t,status:U,loggedOut:W,reconnectAttempts:I,error:G},`web reconnect: connection closed`),se(`WhatsApp gateway disconnected (status ${U??`unknown`})`,{sessionKey:ue.sessionKey}),W){s.error(`WhatsApp session logged out. Run \`${S(`openclaw channels login --channel web`)}\` to relink.`),await V();break}if(fn(U)){p.warn({connectionId:t,status:U,error:G},`web reconnect: non-retryable close status; stopping monitor`),s.error(`WhatsApp Web connection closed (status ${U}: session conflict). Resolve conflicting WhatsApp Web sessions, then relink with \`${S(`openclaw channels login --channel web`)}\`. Stopping web monitoring.`),await V();break}if(I+=1,m.reconnectAttempts=I,h(),T.maxAttempts>0&&I>=T.maxAttempts){p.warn({connectionId:t,status:U,reconnectAttempts:I,maxAttempts:T.maxAttempts},`web reconnect: max attempts reached; continuing in degraded mode`),s.error(`WhatsApp Web reconnect: max attempts reached (${I}/${T.maxAttempts}). Stopping web monitoring.`),await V();break}let K=ne(T,I);p.info({connectionId:t,status:U,reconnectAttempts:I,maxAttempts:T.maxAttempts||`unlimited`,delayMs:K},`web reconnect: scheduling retry`),s.error(`WhatsApp Web connection closed (status ${U}). Retry ${I}/${T.maxAttempts||`∞`} in ${de(K)}… (${G})`),await V();try{await te(K,c)}catch{break}}m.running=!1,m.connected=!1,m.lastEventAt=Date.now(),h(),process.removeListener(`SIGINT`,F)}export{te as WA_WEB_AUTH_DIR,Ue as createWaSocket,T as logWebSelfId,We as loginWeb,pn as monitorWebChannel,Mt as monitorWebInbox,_ as pickWebChannel,Be as sendMessageWhatsApp,Ve as waitForWaConnection,O as webAuthExists};
6
+ //# sourceMappingURL=web-DwcxsgH0.js.map
@@ -1 +1,2 @@
1
1
  import{A as e,p as t,v as n}from"./subsystem-BLbY429l.js";import{t as r,u as i}from"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import{Bo as a,Fo as o,Vo as s,jo as c}from"./auth-profiles-T8DuH3ax.js";import{t as l}from"./command-format-CLxIPuLR.js";import"./agent-scope-DAWJwFfl.js";import{a as u}from"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import{t as d}from"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import{t as f}from"./links-CBnmRP9D.js";import{C as p,S as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M,v as N,w as P,x as F,y as I}from"./gmail-setup-utils-CYOH3zzx.js";import{spawn as L}from"node:child_process";async function R(e){await j(`gcloud`,[`--cask`,`gcloud-cli`]),await j(`gog`,[`gogcli`]),e.tailscale!==`off`&&!e.pushEndpoint&&await j(`tailscale`,[`tailscale`]),await E();let n=await o();if(!n.valid)throw Error(`Config invalid: ${r}`);let c=n.config,d=F(c.hooks?.path),f=e.hookToken??c.hooks?.token??I(),h=e.pushToken??c.hooks?.gmail?.pushToken??I(),v=e.topic??c.hooks?.gmail?.topic??`gog-gmail-watch`,b=p(v),x=b?.topicName??v,w=e.project??b?.projectId??await D();if(!w)throw Error(`GCP project id required (use --project or ensure gog credentials are available)`);let T=N(w,x),O=e.subscription??`gog-gmail-watch-push`,M=e.label??`INBOX`,P=e.hookUrl??c.hooks?.gmail?.hookUrl??S(d,i(c)),L=e.bind??`127.0.0.1`,R=e.port??8788,z=e.path??c.hooks?.gmail?.serve?.path,B=e.tailscaleTarget??c.hooks?.gmail?.tailscale?.target,H=typeof z==`string`&&z.trim().length>0?m(z):y,U=typeof B==`string`&&B.trim().length>0?B.trim():void 0,W=e.includeBody??!0,G=e.maxBytes??2e4,K=e.renewEveryMinutes??720,q=e.tailscale??`funnel`,J=m(q!==`off`&&!U?`/`:H),Y=m(e.tailscalePath??c.hooks?.gmail?.tailscale?.path??(q===`off`?J:H));await A([`config`,`set`,`project`,w,`--quiet`]),await A([`services`,`enable`,`gmail.googleapis.com`,`pubsub.googleapis.com`,`--project`,w,`--quiet`]),await g(w,x),await A([`pubsub`,`topics`,`add-iam-policy-binding`,x,`--project`,w,`--member`,`serviceAccount:gmail-api-push@system.gserviceaccount.com`,`--role`,`roles/pubsub.publisher`,`--quiet`]);let X=e.pushEndpoint?e.pushEndpoint:await C({mode:q,path:Y,port:R,target:U,token:h});if(!X)throw Error(`push endpoint required (set --push-endpoint)`);await k(w,O,x,X),await V({account:e.account,label:M,topic:T},!0);let Z=s({...c,hooks:{...c.hooks,enabled:!0,path:d,token:f,presets:_(c.hooks?.presets,`gmail`),gmail:{...c.hooks?.gmail,account:e.account,label:M,topic:T,subscription:O,pushToken:h,hookUrl:P,includeBody:W,maxBytes:G,renewEveryMinutes:K,serve:{...c.hooks?.gmail?.serve,bind:L,port:R,path:J},tailscale:{...c.hooks?.gmail?.tailscale,mode:q,path:Y,target:U}}}});if(!Z.ok)throw Error(`Config validation failed: ${Z.issues[0]?.message??`invalid`}`);await a(Z.config);let Q={projectId:w,topic:T,subscription:O,pushEndpoint:X,hookUrl:P,hookToken:f,pushToken:h,serve:{bind:L,port:R,path:J}};if(e.json){t.log(JSON.stringify(Q,null,2));return}t.log(`Gmail hooks configured:`),t.log(`- project: ${w}`),t.log(`- topic: ${T}`),t.log(`- subscription: ${O}`),t.log(`- push endpoint: ${X}`),t.log(`- hook url: ${P}`),t.log(`- config: ${u(r)}`),t.log(`Next: ${l(`openclaw webhooks gmail run`)}`)}async function z(e){await j(`gog`,[`gogcli`]);let n=P(c(),{account:e.account,topic:e.topic,subscription:e.subscription,label:e.label,hookToken:e.hookToken,pushToken:e.pushToken,hookUrl:e.hookUrl,serveBind:e.bind,servePort:e.port,servePath:e.path,includeBody:e.includeBody,maxBytes:e.maxBytes,renewEveryMinutes:e.renewEveryMinutes,tailscaleMode:e.tailscale,tailscalePath:e.tailscalePath,tailscaleTarget:e.tailscaleTarget});if(!n.ok)throw Error(n.error);let r=n.value;r.tailscale.mode!==`off`&&(await j(`tailscale`,[`tailscale`]),await C({mode:r.tailscale.mode,path:r.tailscale.path,port:r.serve.port,target:r.tailscale.target})),await V(r);let i=!1,a=B(r),o=r.renewEveryMinutes*6e4,s=setInterval(()=>{V(r)},o),l=()=>{process.off(`SIGINT`,u),process.off(`SIGTERM`,u)},u=()=>{i||(i=!0,l(),clearInterval(s),a.kill(`SIGTERM`))};process.on(`SIGINT`,u),process.on(`SIGTERM`,u),a.on(`exit`,()=>{if(i){l();return}t.log(`gog watch serve exited; restarting in 2s`),setTimeout(()=>{i||(a=B(r))},2e3)})}function B(e){let n=x(e);return t.log(`Starting gog ${n.join(` `)}`),L(`gog`,n,{stdio:`inherit`})}async function V(e,n=!1){let r=await d([`gog`,...h(e)],{timeoutMs:12e4});if(r.code!==0){let e=r.stderr||r.stdout||`gog watch start failed`;if(n)throw Error(e);t.error(e)}}function H(r){let i=r.command(`webhooks`).description(`Webhook helpers and integrations`).addHelpText(`after`,()=>`\n${e.muted(`Docs:`)} ${f(`/cli/webhooks`,`docs.openclaw.ai/cli/webhooks`)}\n`).command(`gmail`).description(`Gmail Pub/Sub hooks (via gogcli)`);i.command(`setup`).description(`Configure Gmail watch + Pub/Sub + OpenClaw hooks`).requiredOption(`--account <email>`,`Gmail account to watch`).option(`--project <id>`,`GCP project id (OAuth client owner)`).option(`--topic <name>`,`Pub/Sub topic name`,T).option(`--subscription <name>`,`Pub/Sub subscription name`,O).option(`--label <label>`,`Gmail label to watch`,v).option(`--hook-url <url>`,`OpenClaw hook URL`).option(`--hook-token <token>`,`OpenClaw hook token`).option(`--push-token <token>`,`Push token for gog watch serve`).option(`--bind <host>`,`gog watch serve bind host`,M).option(`--port <port>`,`gog watch serve port`,String(b)).option(`--path <path>`,`gog watch serve path`,y).option(`--include-body`,`Include email body snippets`,!0).option(`--max-bytes <n>`,`Max bytes for body snippets`,String(w)).option(`--renew-minutes <n>`,`Renew watch every N minutes`,`720`).option(`--tailscale <mode>`,`Expose push endpoint via tailscale (funnel|serve|off)`,`funnel`).option(`--tailscale-path <path>`,`Path for tailscale serve/funnel`).option(`--tailscale-target <target>`,`Tailscale serve/funnel target (port, host:port, or URL)`).option(`--push-endpoint <url>`,`Explicit Pub/Sub push endpoint`).option(`--json`,`Output JSON summary`,!1).action(async e=>{try{await R(U(e))}catch(e){t.error(n(String(e))),t.exit(1)}}),i.command(`run`).description(`Run gog watch serve + auto-renew loop`).option(`--account <email>`,`Gmail account to watch`).option(`--topic <topic>`,`Pub/Sub topic path (projects/.../topics/..)`).option(`--subscription <name>`,`Pub/Sub subscription name`).option(`--label <label>`,`Gmail label to watch`).option(`--hook-url <url>`,`OpenClaw hook URL`).option(`--hook-token <token>`,`OpenClaw hook token`).option(`--push-token <token>`,`Push token for gog watch serve`).option(`--bind <host>`,`gog watch serve bind host`).option(`--port <port>`,`gog watch serve port`).option(`--path <path>`,`gog watch serve path`).option(`--include-body`,`Include email body snippets`).option(`--max-bytes <n>`,`Max bytes for body snippets`).option(`--renew-minutes <n>`,`Renew watch every N minutes`).option(`--tailscale <mode>`,`Expose push endpoint via tailscale (funnel|serve|off)`).option(`--tailscale-path <path>`,`Path for tailscale serve/funnel`).option(`--tailscale-target <target>`,`Tailscale serve/funnel target (port, host:port, or URL)`).action(async e=>{try{await z(W(e))}catch(e){t.error(n(String(e))),t.exit(1)}})}function U(e){let t=e.account,n=typeof t==`string`?t.trim():``;if(!n)throw Error(`--account is required`);let r=G(e);return{account:n,project:q(e.project),...K(r),pushEndpoint:q(e.pushEndpoint),json:!!e.json}}function W(e){let t=G(e);return{account:q(e.account),...K(t)}}function G(e){return{topic:q(e.topic),subscription:q(e.subscription),label:q(e.label),hookUrl:q(e.hookUrl),hookToken:q(e.hookToken),pushToken:q(e.pushToken),bind:q(e.bind),port:J(e.port),path:q(e.path),includeBody:Y(e.includeBody),maxBytes:J(e.maxBytes),renewEveryMinutes:J(e.renewMinutes),tailscaleRaw:q(e.tailscale),tailscalePath:q(e.tailscalePath),tailscaleTarget:q(e.tailscaleTarget)}}function K(e){return{topic:e.topic,subscription:e.subscription,label:e.label,hookUrl:e.hookUrl,hookToken:e.hookToken,pushToken:e.pushToken,bind:e.bind,port:e.port,path:e.path,includeBody:e.includeBody,maxBytes:e.maxBytes,renewEveryMinutes:e.renewEveryMinutes,tailscale:e.tailscaleRaw,tailscalePath:e.tailscalePath,tailscaleTarget:e.tailscaleTarget}}function q(e){return typeof e==`string`&&e.trim()||void 0}function J(e){if(e==null)return;let t=typeof e==`number`?e:Number(e);if(!(!Number.isFinite(t)||t<=0))return Math.floor(t)}function Y(e){if(e!=null)return!!e}export{H as registerWebhooksCli};
2
+ //# sourceMappingURL=webhooks-cli-CIeyainW.js.map
@@ -1 +1,2 @@
1
1
  import{t as e,u as t}from"./paths-B4IRk3wi.js";import{A as n,p as r,v as i}from"./subsystem-C5XF2Fy5.js";import{o as a}from"./utils-UGOV_184.js";import{Zs as o,nc as s,qs as c,rc as l}from"./model-selection-BlC_rXAN.js";import"./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"./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{t as d}from"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import{t as f}from"./links-CySwdMcF.js";import{C as p,S as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M,v as N,w as P,x as F,y as I}from"./gmail-setup-utils-S-MyEGuj.js";import{spawn as L}from"node:child_process";async function R(n){await j(`gcloud`,[`--cask`,`gcloud-cli`]),await j(`gog`,[`gogcli`]),n.tailscale!==`off`&&!n.pushEndpoint&&await j(`tailscale`,[`tailscale`]),await E();let i=await o();if(!i.valid)throw Error(`Config invalid: ${e}`);let c=i.config,d=F(c.hooks?.path),f=n.hookToken??c.hooks?.token??I(),h=n.pushToken??c.hooks?.gmail?.pushToken??I(),v=n.topic??c.hooks?.gmail?.topic??`gog-gmail-watch`,b=p(v),x=b?.topicName??v,w=n.project??b?.projectId??await D();if(!w)throw Error(`GCP project id required (use --project or ensure gog credentials are available)`);let T=N(w,x),O=n.subscription??`gog-gmail-watch-push`,M=n.label??`INBOX`,P=n.hookUrl??c.hooks?.gmail?.hookUrl??S(d,t(c)),L=n.bind??`127.0.0.1`,R=n.port??8788,z=n.path??c.hooks?.gmail?.serve?.path,B=n.tailscaleTarget??c.hooks?.gmail?.tailscale?.target,H=typeof z==`string`&&z.trim().length>0?m(z):y,U=typeof B==`string`&&B.trim().length>0?B.trim():void 0,W=n.includeBody??!0,G=n.maxBytes??2e4,K=n.renewEveryMinutes??720,q=n.tailscale??`funnel`,J=m(q!==`off`&&!U?`/`:H),Y=m(n.tailscalePath??c.hooks?.gmail?.tailscale?.path??(q===`off`?J:H));await A([`config`,`set`,`project`,w,`--quiet`]),await A([`services`,`enable`,`gmail.googleapis.com`,`pubsub.googleapis.com`,`--project`,w,`--quiet`]),await g(w,x),await A([`pubsub`,`topics`,`add-iam-policy-binding`,x,`--project`,w,`--member`,`serviceAccount:gmail-api-push@system.gserviceaccount.com`,`--role`,`roles/pubsub.publisher`,`--quiet`]);let X=n.pushEndpoint?n.pushEndpoint:await C({mode:q,path:Y,port:R,target:U,token:h});if(!X)throw Error(`push endpoint required (set --push-endpoint)`);await k(w,O,x,X),await V({account:n.account,label:M,topic:T},!0);let Z=l({...c,hooks:{...c.hooks,enabled:!0,path:d,token:f,presets:_(c.hooks?.presets,`gmail`),gmail:{...c.hooks?.gmail,account:n.account,label:M,topic:T,subscription:O,pushToken:h,hookUrl:P,includeBody:W,maxBytes:G,renewEveryMinutes:K,serve:{...c.hooks?.gmail?.serve,bind:L,port:R,path:J},tailscale:{...c.hooks?.gmail?.tailscale,mode:q,path:Y,target:U}}}});if(!Z.ok)throw Error(`Config validation failed: ${Z.issues[0]?.message??`invalid`}`);await s(Z.config);let Q={projectId:w,topic:T,subscription:O,pushEndpoint:X,hookUrl:P,hookToken:f,pushToken:h,serve:{bind:L,port:R,path:J}};if(n.json){r.log(JSON.stringify(Q,null,2));return}r.log(`Gmail hooks configured:`),r.log(`- project: ${w}`),r.log(`- topic: ${T}`),r.log(`- subscription: ${O}`),r.log(`- push endpoint: ${X}`),r.log(`- hook url: ${P}`),r.log(`- config: ${a(e)}`),r.log(`Next: ${u(`openclaw webhooks gmail run`)}`)}async function z(e){await j(`gog`,[`gogcli`]);let t=P(c(),{account:e.account,topic:e.topic,subscription:e.subscription,label:e.label,hookToken:e.hookToken,pushToken:e.pushToken,hookUrl:e.hookUrl,serveBind:e.bind,servePort:e.port,servePath:e.path,includeBody:e.includeBody,maxBytes:e.maxBytes,renewEveryMinutes:e.renewEveryMinutes,tailscaleMode:e.tailscale,tailscalePath:e.tailscalePath,tailscaleTarget:e.tailscaleTarget});if(!t.ok)throw Error(t.error);let n=t.value;n.tailscale.mode!==`off`&&(await j(`tailscale`,[`tailscale`]),await C({mode:n.tailscale.mode,path:n.tailscale.path,port:n.serve.port,target:n.tailscale.target})),await V(n);let i=!1,a=B(n),o=n.renewEveryMinutes*6e4,s=setInterval(()=>{V(n)},o),l=()=>{process.off(`SIGINT`,u),process.off(`SIGTERM`,u)},u=()=>{i||(i=!0,l(),clearInterval(s),a.kill(`SIGTERM`))};process.on(`SIGINT`,u),process.on(`SIGTERM`,u),a.on(`exit`,()=>{if(i){l();return}r.log(`gog watch serve exited; restarting in 2s`),setTimeout(()=>{i||(a=B(n))},2e3)})}function B(e){let t=x(e);return r.log(`Starting gog ${t.join(` `)}`),L(`gog`,t,{stdio:`inherit`})}async function V(e,t=!1){let n=await d([`gog`,...h(e)],{timeoutMs:12e4});if(n.code!==0){let e=n.stderr||n.stdout||`gog watch start failed`;if(t)throw Error(e);r.error(e)}}function H(e){let t=e.command(`webhooks`).description(`Webhook helpers and integrations`).addHelpText(`after`,()=>`\n${n.muted(`Docs:`)} ${f(`/cli/webhooks`,`docs.openclaw.ai/cli/webhooks`)}\n`).command(`gmail`).description(`Gmail Pub/Sub hooks (via gogcli)`);t.command(`setup`).description(`Configure Gmail watch + Pub/Sub + OpenClaw hooks`).requiredOption(`--account <email>`,`Gmail account to watch`).option(`--project <id>`,`GCP project id (OAuth client owner)`).option(`--topic <name>`,`Pub/Sub topic name`,T).option(`--subscription <name>`,`Pub/Sub subscription name`,O).option(`--label <label>`,`Gmail label to watch`,v).option(`--hook-url <url>`,`OpenClaw hook URL`).option(`--hook-token <token>`,`OpenClaw hook token`).option(`--push-token <token>`,`Push token for gog watch serve`).option(`--bind <host>`,`gog watch serve bind host`,M).option(`--port <port>`,`gog watch serve port`,String(b)).option(`--path <path>`,`gog watch serve path`,y).option(`--include-body`,`Include email body snippets`,!0).option(`--max-bytes <n>`,`Max bytes for body snippets`,String(w)).option(`--renew-minutes <n>`,`Renew watch every N minutes`,`720`).option(`--tailscale <mode>`,`Expose push endpoint via tailscale (funnel|serve|off)`,`funnel`).option(`--tailscale-path <path>`,`Path for tailscale serve/funnel`).option(`--tailscale-target <target>`,`Tailscale serve/funnel target (port, host:port, or URL)`).option(`--push-endpoint <url>`,`Explicit Pub/Sub push endpoint`).option(`--json`,`Output JSON summary`,!1).action(async e=>{try{await R(U(e))}catch(e){r.error(i(String(e))),r.exit(1)}}),t.command(`run`).description(`Run gog watch serve + auto-renew loop`).option(`--account <email>`,`Gmail account to watch`).option(`--topic <topic>`,`Pub/Sub topic path (projects/.../topics/..)`).option(`--subscription <name>`,`Pub/Sub subscription name`).option(`--label <label>`,`Gmail label to watch`).option(`--hook-url <url>`,`OpenClaw hook URL`).option(`--hook-token <token>`,`OpenClaw hook token`).option(`--push-token <token>`,`Push token for gog watch serve`).option(`--bind <host>`,`gog watch serve bind host`).option(`--port <port>`,`gog watch serve port`).option(`--path <path>`,`gog watch serve path`).option(`--include-body`,`Include email body snippets`).option(`--max-bytes <n>`,`Max bytes for body snippets`).option(`--renew-minutes <n>`,`Renew watch every N minutes`).option(`--tailscale <mode>`,`Expose push endpoint via tailscale (funnel|serve|off)`).option(`--tailscale-path <path>`,`Path for tailscale serve/funnel`).option(`--tailscale-target <target>`,`Tailscale serve/funnel target (port, host:port, or URL)`).action(async e=>{try{await z(W(e))}catch(e){r.error(i(String(e))),r.exit(1)}})}function U(e){let t=e.account,n=typeof t==`string`?t.trim():``;if(!n)throw Error(`--account is required`);let r=G(e);return{account:n,project:q(e.project),...K(r),pushEndpoint:q(e.pushEndpoint),json:!!e.json}}function W(e){let t=G(e);return{account:q(e.account),...K(t)}}function G(e){return{topic:q(e.topic),subscription:q(e.subscription),label:q(e.label),hookUrl:q(e.hookUrl),hookToken:q(e.hookToken),pushToken:q(e.pushToken),bind:q(e.bind),port:J(e.port),path:q(e.path),includeBody:Y(e.includeBody),maxBytes:J(e.maxBytes),renewEveryMinutes:J(e.renewMinutes),tailscaleRaw:q(e.tailscale),tailscalePath:q(e.tailscalePath),tailscaleTarget:q(e.tailscaleTarget)}}function K(e){return{topic:e.topic,subscription:e.subscription,label:e.label,hookUrl:e.hookUrl,hookToken:e.hookToken,pushToken:e.pushToken,bind:e.bind,port:e.port,path:e.path,includeBody:e.includeBody,maxBytes:e.maxBytes,renewEveryMinutes:e.renewEveryMinutes,tailscale:e.tailscaleRaw,tailscalePath:e.tailscalePath,tailscaleTarget:e.tailscaleTarget}}function q(e){return typeof e==`string`&&e.trim()||void 0}function J(e){if(e==null)return;let t=typeof e==`number`?e:Number(e);if(!(!Number.isFinite(t)||t<=0))return Math.floor(t)}function Y(e){if(e!=null)return!!e}export{H as registerWebhooksCli};
2
+ //# sourceMappingURL=webhooks-cli-DSNAve_D.js.map
@@ -1 +1,2 @@
1
1
  import"./paths-piJASC5k.js";import"./paths-BpQOWYiT.js";import"./logger-DwWqfo66.js";import{Mr as e,gr as t,jr as n}from"./model-selection-vfhBuN9O.js";import"./github-copilot-token-wm6mbypz.js";import"./proxy-env-BNhTHkd_.js";import"./fetch-B9tORjG8.js";import"./fetch-guard-cu7DGSRF.js";import"./ir-BF0M2kGp.js";import"./render-BXEUPIHe.js";import{f as r,h as i,i as a,l as o,n as s,o as c}from"./target-errors-CpKXh2RS.js";import"./tables-btcG3yFT.js";import{r as l}from"./outbound-Bx2Z2aYK.js";function u(t){let r=t.to?.trim()??``,i=(t.allowFrom??[]).map(e=>String(e).trim()).filter(Boolean),a=i.includes(`*`),o=i.filter(e=>e!==`*`).map(t=>e(t)).filter(e=>!!e);if(r){let t=e(r);return t&&(n(t)||a||o.length===0||o.includes(t))?{ok:!0,to:t}:{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}return{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}function d(e){let n=t({cfg:e.cfg,accountId:e.accountId}),r=u({to:e.chatJid,allowFrom:n.allowFrom??[],mode:`implicit`});if(!r.ok)throw new a(`WhatsApp ${e.actionLabel} blocked: chatJid "${e.chatJid}" is not in the configured allowFrom list for account "${n.accountId}".`);return{to:r.to,accountId:n.accountId}}async function f(e,t){let n=i(e,`action`,{required:!0}),a=c(t.channels?.whatsapp?.actions);if(n===`react`){if(!a(`reactions`))throw Error(`WhatsApp reactions are disabled.`);let n=i(e,`chatJid`,{required:!0}),s=i(e,`messageId`,{required:!0}),{emoji:c,remove:u,isEmpty:f}=r(e,{removeErrorMessage:`Emoji is required to remove a WhatsApp reaction.`}),p=i(e,`participant`),m=i(e,`accountId`),h=e.fromMe,g=typeof h==`boolean`?h:void 0,_=d({cfg:t,chatJid:n,accountId:m,actionLabel:`reaction`}),v=u?``:c;return await l(_.to,s,v,{verbose:!1,fromMe:g,participant:p??void 0,accountId:_.accountId}),o(!u&&!f?{ok:!0,added:c}:{ok:!0,removed:!0})}throw Error(`Unsupported WhatsApp action: ${n}`)}export{f as handleWhatsAppAction};
2
+ //# sourceMappingURL=whatsapp-actions-B6gt1KeB.js.map
@@ -1 +1,2 @@
1
1
  import"./paths-CrCoPIVK.js";import"./paths-CChBdtE8.js";import"./subsystem-Bc2XrjUz.js";import"./workspace-B0ZQeHXg.js";import"./utils-D3t-vPka.js";import{Mr as e,gr as t,jr as n}from"./model-selection-B5JsBS9D.js";import"./github-copilot-token-DePP-lIf.js";import"./boolean-DypnRoRK.js";import"./proxy-env-DcmW_urA.js";import"./frontmatter-CzpfPBFl.js";import"./logger-5W0OocJW.js";import"./fetch-B_wRifvZ.js";import"./fetch-guard-D10s0raB.js";import"./ir-DBWscfBd.js";import"./render-CBsnn-2A.js";import{f as r,h as i,i as a,l as o,n as s,o as c}from"./target-errors-CRlevJJ5.js";import"./tables-CrXdLc_6.js";import{r as l}from"./outbound-BOSIEiEY.js";function u(t){let r=t.to?.trim()??``,i=(t.allowFrom??[]).map(e=>String(e).trim()).filter(Boolean),a=i.includes(`*`),o=i.filter(e=>e!==`*`).map(t=>e(t)).filter(e=>!!e);if(r){let t=e(r);return t&&(n(t)||a||o.length===0||o.includes(t))?{ok:!0,to:t}:{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}return{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}function d(e){let n=t({cfg:e.cfg,accountId:e.accountId}),r=u({to:e.chatJid,allowFrom:n.allowFrom??[],mode:`implicit`});if(!r.ok)throw new a(`WhatsApp ${e.actionLabel} blocked: chatJid "${e.chatJid}" is not in the configured allowFrom list for account "${n.accountId}".`);return{to:r.to,accountId:n.accountId}}async function f(e,t){let n=i(e,`action`,{required:!0}),a=c(t.channels?.whatsapp?.actions);if(n===`react`){if(!a(`reactions`))throw Error(`WhatsApp reactions are disabled.`);let n=i(e,`chatJid`,{required:!0}),s=i(e,`messageId`,{required:!0}),{emoji:c,remove:u,isEmpty:f}=r(e,{removeErrorMessage:`Emoji is required to remove a WhatsApp reaction.`}),p=i(e,`participant`),m=i(e,`accountId`),h=e.fromMe,g=typeof h==`boolean`?h:void 0,_=d({cfg:t,chatJid:n,accountId:m,actionLabel:`reaction`}),v=u?``:c;return await l(_.to,s,v,{verbose:!1,fromMe:g,participant:p??void 0,accountId:_.accountId}),o(!u&&!f?{ok:!0,added:c}:{ok:!0,removed:!0})}throw Error(`Unsupported WhatsApp action: ${n}`)}export{f as handleWhatsAppAction};
2
+ //# sourceMappingURL=whatsapp-actions-DACoH7qd.js.map
@@ -1 +1,2 @@
1
1
  import"./paths-B4IRk3wi.js";import"./subsystem-C5XF2Fy5.js";import"./utils-UGOV_184.js";import"./model-selection-BlC_rXAN.js";import"./agent-scope-DXZc3eNT.js";import"./openclaw-root-D_0Q6--h.js";import"./github-copilot-token-DGYAlOmV.js";import"./boolean-Ch3DfXPy.js";import"./env-D7wNuBx1.js";import"./env-overrides-DXJbFrwI.js";import"./registry-hFAtCSWG.js";import"./skills-DHbOKEGc.js";import"./frontmatter-BkZkwkVO.js";import{U as e,ct as t,st as n}from"./plugins-CYLrFT4h.js";import"./logger-Bl8URnrW.js";import"./exec-DHqLtFYt.js";import"./windows-spawn-AB7ItGAE.js";import"./redact-3_CiXMY6.js";import"./path-alias-guards-mvyLCPlN.js";import"./errors-Bunti32V.js";import"./paths-yLEk_25I.js";import"./chat-envelope-HVpKusFc.js";import"./fetch-guard-DPdY0NXR.js";import"./local-roots-6waH0SZ0.js";import"./ir-Dk7OQ4bA.js";import"./render-D8OWO2hT.js";import{f as r,h as i,i as a,l as o,n as s,o as c}from"./target-errors-a35Md15n.js";import"./tables-Oieq7UbT.js";import{r as l}from"./outbound-Bz8bbrMI.js";function u(e){let r=e.to?.trim()??``,i=(e.allowFrom??[]).map(e=>String(e).trim()).filter(Boolean),a=i.includes(`*`),o=i.filter(e=>e!==`*`).map(e=>t(e)).filter(e=>!!e);if(r){let e=t(r);return e&&(n(e)||a||o.length===0||o.includes(e))?{ok:!0,to:e}:{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}return{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}function d(t){let n=e({cfg:t.cfg,accountId:t.accountId}),r=u({to:t.chatJid,allowFrom:n.allowFrom??[],mode:`implicit`});if(!r.ok)throw new a(`WhatsApp ${t.actionLabel} blocked: chatJid "${t.chatJid}" is not in the configured allowFrom list for account "${n.accountId}".`);return{to:r.to,accountId:n.accountId}}async function f(e,t){let n=i(e,`action`,{required:!0}),a=c(t.channels?.whatsapp?.actions);if(n===`react`){if(!a(`reactions`))throw Error(`WhatsApp reactions are disabled.`);let n=i(e,`chatJid`,{required:!0}),s=i(e,`messageId`,{required:!0}),{emoji:c,remove:u,isEmpty:f}=r(e,{removeErrorMessage:`Emoji is required to remove a WhatsApp reaction.`}),p=i(e,`participant`),m=i(e,`accountId`),h=e.fromMe,g=typeof h==`boolean`?h:void 0,_=d({cfg:t,chatJid:n,accountId:m,actionLabel:`reaction`}),v=u?``:c;return await l(_.to,s,v,{verbose:!1,fromMe:g,participant:p??void 0,accountId:_.accountId}),o(!u&&!f?{ok:!0,added:c}:{ok:!0,removed:!0})}throw Error(`Unsupported WhatsApp action: ${n}`)}export{f as handleWhatsAppAction};
2
+ //# sourceMappingURL=whatsapp-actions-iQhIeMya.js.map
@@ -1 +1,2 @@
1
1
  import"./subsystem-BLbY429l.js";import"./paths-BjD3T_xq.js";import"./boolean-D15s2V33.js";import"./auth-profiles-T8DuH3ax.js";import"./agent-scope-DAWJwFfl.js";import"./utils-CGdo13HV.js";import"./openclaw-root-CnsBf6ZU.js";import"./github-copilot-token-C79yeDKS.js";import"./env-overrides-DHtB4kK3.js";import"./version-q3SkUw2K.js";import"./registry-BptzrW8D.js";import"./skills-CKTicUKS.js";import"./frontmatter-C7mzDNxd.js";import{U as e,ct as t,st as n}from"./plugins-DNlgeTTc.js";import"./logger-kQAOe3qp.js";import"./exec-B3eleY5O.js";import"./windows-spawn-7oINn5ao.js";import"./redact-CnRxK70G.js";import"./path-alias-guards-kY_ZbWs-.js";import"./errors-6SQWM9dj.js";import"./paths-BfjJY2VL.js";import"./chat-envelope-Bznn2SoS.js";import"./fetch-CQaNr5J1.js";import"./fetch-guard-BrTtJw7h.js";import"./ir-D8Hh84ab.js";import"./render-DrrPmnMI.js";import{f as r,h as i,i as a,l as o,n as s,o as c}from"./target-errors-CgWAJOam.js";import"./tables-Brc2lNcB.js";import{r as l}from"./outbound-BtUeDLjU.js";function u(e){let r=e.to?.trim()??``,i=(e.allowFrom??[]).map(e=>String(e).trim()).filter(Boolean),a=i.includes(`*`),o=i.filter(e=>e!==`*`).map(e=>t(e)).filter(e=>!!e);if(r){let e=t(r);return e&&(n(e)||a||o.length===0||o.includes(e))?{ok:!0,to:e}:{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}return{ok:!1,error:s(`WhatsApp`,`<E.164|group JID>`)}}function d(t){let n=e({cfg:t.cfg,accountId:t.accountId}),r=u({to:t.chatJid,allowFrom:n.allowFrom??[],mode:`implicit`});if(!r.ok)throw new a(`WhatsApp ${t.actionLabel} blocked: chatJid "${t.chatJid}" is not in the configured allowFrom list for account "${n.accountId}".`);return{to:r.to,accountId:n.accountId}}async function f(e,t){let n=i(e,`action`,{required:!0}),a=c(t.channels?.whatsapp?.actions);if(n===`react`){if(!a(`reactions`))throw Error(`WhatsApp reactions are disabled.`);let n=i(e,`chatJid`,{required:!0}),s=i(e,`messageId`,{required:!0}),{emoji:c,remove:u,isEmpty:f}=r(e,{removeErrorMessage:`Emoji is required to remove a WhatsApp reaction.`}),p=i(e,`participant`),m=i(e,`accountId`),h=e.fromMe,g=typeof h==`boolean`?h:void 0,_=d({cfg:t,chatJid:n,accountId:m,actionLabel:`reaction`}),v=u?``:c;return await l(_.to,s,v,{verbose:!1,fromMe:g,participant:p??void 0,accountId:_.accountId}),o(!u&&!f?{ok:!0,added:c}:{ok:!0,removed:!0})}throw Error(`Unsupported WhatsApp action: ${n}`)}export{f as handleWhatsAppAction};
2
+ //# sourceMappingURL=whatsapp-actions-tmjID75a.js.map
@@ -2,3 +2,4 @@ import{s as e,t}from"./utils-CGdo13HV.js";import n from"node:os";import r from"n
2
2
  `,`\\n`)}"`}function d(e){return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function f(e,t){let n=d(t),r=Number.parseInt(`${n}01`,10);return!e||!Number.isFinite(e)?r:String(e).startsWith(n)?e+1:r}function p(e){let t=e.match(/^\s*@\s+IN\s+SOA\s+\S+\s+\S+\s+(\d+)\s+/m);if(!t)return null;let n=Number.parseInt(t[1],10);return Number.isFinite(n)?n:null}function m(e){return e.match(/^\s*;\s*openclaw-content-hash:\s*(\S+)\s*$/m)?.[1]??null}function h(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}function g(e){let t=n.hostname().split(`.`)[0]??`openclaw`,r=l(e.hostLabel??t,`openclaw`),i=l(e.instanceLabel??`${t}-gateway`,`openclaw-gw`),o=a(e.domain)??`local.`,s=[`displayName=${e.displayName.trim()||t}`,`role=gateway`,`transport=gateway`,`gatewayPort=${e.gatewayPort}`];e.gatewayTlsEnabled&&(s.push(`gatewayTls=1`),e.gatewayTlsFingerprintSha256&&s.push(`gatewayTlsSha256=${e.gatewayTlsFingerprintSha256}`)),e.tailnetDns?.trim()&&s.push(`tailnetDns=${e.tailnetDns.trim()}`),typeof e.sshPort==`number`&&e.sshPort>0&&s.push(`sshPort=${e.sshPort}`),e.cliPath?.trim()&&s.push(`cliPath=${e.cliPath.trim()}`);let c=[];c.push(`$ORIGIN ${o}`),c.push(`$TTL 60`);let d=`@ IN SOA ns1 hostmaster ${e.serial} 7200 3600 1209600 60`;c.push(d),c.push(`@ IN NS ns1`),c.push(`ns1 IN A ${e.tailnetIPv4}`),c.push(`${r} IN A ${e.tailnetIPv4}`),e.tailnetIPv6&&c.push(`${r} IN AAAA ${e.tailnetIPv6}`),c.push(`_openclaw-gw._tcp IN PTR ${i}._openclaw-gw._tcp`),c.push(`${i}._openclaw-gw._tcp IN SRV 0 0 ${e.gatewayPort} ${r}`),c.push(`${i}._openclaw-gw._tcp IN TXT ${s.map(u).join(` `)}`);let f=`${c.join(`
3
3
  `)}\n`;return`; openclaw-content-hash: ${h(`${c.map(e=>e===d?`@ IN SOA ns1 hostmaster SERIAL 7200 3600 1209600 60`:e).join(`
4
4
  `)}\n`)}\n${f}`}function _(e){return g(e)}async function v(t){let n=a(t.domain);if(!n)throw Error(`wide-area discovery domain is required`);let o=c(n);await e(r.dirname(o));let s=(()=>{try{return i.readFileSync(o,`utf-8`)}catch{return null}})(),l=m(_({...t,serial:0})),u=s?m(s):null;if(s&&l&&u===l)return{zonePath:o,changed:!1};let d=f(s?p(s):null,new Date),h=_({...t,serial:d});return i.writeFileSync(o,h,`utf-8`),{zonePath:o,changed:!0}}export{o as n,v as r,c as t};
5
+ //# sourceMappingURL=widearea-dns-BDx7vkV2.js.map
@@ -2,3 +2,4 @@ import{c as e,t}from"./utils-UGOV_184.js";import n from"node:fs";import r from"n
2
2
  `,`\\n`)}"`}function d(e){return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function f(e,t){let n=d(t),r=Number.parseInt(`${n}01`,10);return!e||!Number.isFinite(e)?r:String(e).startsWith(n)?e+1:r}function p(e){let t=e.match(/^\s*@\s+IN\s+SOA\s+\S+\s+\S+\s+(\d+)\s+/m);if(!t)return null;let n=Number.parseInt(t[1],10);return Number.isFinite(n)?n:null}function m(e){return e.match(/^\s*;\s*openclaw-content-hash:\s*(\S+)\s*$/m)?.[1]??null}function h(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}function g(e){let t=r.hostname().split(`.`)[0]??`openclaw`,n=l(e.hostLabel??t,`openclaw`),i=l(e.instanceLabel??`${t}-gateway`,`openclaw-gw`),o=a(e.domain)??`local.`,s=[`displayName=${e.displayName.trim()||t}`,`role=gateway`,`transport=gateway`,`gatewayPort=${e.gatewayPort}`];e.gatewayTlsEnabled&&(s.push(`gatewayTls=1`),e.gatewayTlsFingerprintSha256&&s.push(`gatewayTlsSha256=${e.gatewayTlsFingerprintSha256}`)),e.tailnetDns?.trim()&&s.push(`tailnetDns=${e.tailnetDns.trim()}`),typeof e.sshPort==`number`&&e.sshPort>0&&s.push(`sshPort=${e.sshPort}`),e.cliPath?.trim()&&s.push(`cliPath=${e.cliPath.trim()}`);let c=[];c.push(`$ORIGIN ${o}`),c.push(`$TTL 60`);let d=`@ IN SOA ns1 hostmaster ${e.serial} 7200 3600 1209600 60`;c.push(d),c.push(`@ IN NS ns1`),c.push(`ns1 IN A ${e.tailnetIPv4}`),c.push(`${n} IN A ${e.tailnetIPv4}`),e.tailnetIPv6&&c.push(`${n} IN AAAA ${e.tailnetIPv6}`),c.push(`_openclaw-gw._tcp IN PTR ${i}._openclaw-gw._tcp`),c.push(`${i}._openclaw-gw._tcp IN SRV 0 0 ${e.gatewayPort} ${n}`),c.push(`${i}._openclaw-gw._tcp IN TXT ${s.map(u).join(` `)}`);let f=`${c.join(`
3
3
  `)}\n`;return`; openclaw-content-hash: ${h(`${c.map(e=>e===d?`@ IN SOA ns1 hostmaster SERIAL 7200 3600 1209600 60`:e).join(`
4
4
  `)}\n`)}\n${f}`}function _(e){return g(e)}async function v(t){let r=a(t.domain);if(!r)throw Error(`wide-area discovery domain is required`);let o=c(r);await e(i.dirname(o));let s=(()=>{try{return n.readFileSync(o,`utf-8`)}catch{return null}})(),l=m(_({...t,serial:0})),u=s?m(s):null;if(s&&l&&u===l)return{zonePath:o,changed:!1};let d=f(s?p(s):null,new Date),h=_({...t,serial:d});return n.writeFileSync(o,h,`utf-8`),{zonePath:o,changed:!0}}export{o as n,v as r,c as t};
5
+ //# sourceMappingURL=widearea-dns-BFjqKXu_.js.map
@@ -2,3 +2,4 @@ import{_ as e}from"./paths-BjD3T_xq.js";import{d as t,f as n,m as r,p as i,s as
2
2
  `);function re(e){let t=e.trim().split(/\r?\n/).map(e=>e.trim()).filter(Boolean).at(-1);if(!t)throw Error(`Pinned write helper returned no identity`);let[n,r]=t.split(`|`),i=Number.parseInt(n??``,10),a=Number.parseInt(r??``,10);if(!Number.isFinite(i)||!Number.isFinite(a))throw Error(`Pinned write helper returned invalid identity: ${t}`);return{dev:i,ino:a}}async function v(e){let t=c(`python3`,[`-c`,ne,e.rootPath,e.relativeParentPath,e.basename,e.mkdir?`1`:`0`,(e.mode||384).toString(8)],{stdio:[`pipe`,`pipe`,`pipe`]}),n=``,r=``;t.stdout.setEncoding?.(`utf8`),t.stderr.setEncoding?.(`utf8`),t.stdout.on(`data`,e=>{n+=e}),t.stderr.on(`data`,e=>{r+=e});let i=g(t,`close`);try{if(!t.stdin){let t=await ie(e);return await i.catch(()=>{}),t}if(e.input.kind===`buffer`){let n=e.input;await new Promise((e,r)=>{if(t.stdin.once(`error`,r),typeof n.data==`string`){t.stdin.end(n.data,n.encoding??`utf8`,()=>e());return}t.stdin.end(n.data,()=>e())})}else await _(e.input.stream,t.stdin);let[a,o]=await i;if(a!==0)throw Error(r.trim()||`Pinned write helper failed with code ${a??`null`} (${o??`?`})`);return re(n)}catch(e){throw t.kill(`SIGKILL`),await i.catch(()=>{}),e}}async function ie(e){let t=e.relativeParentPath?u.join(e.rootPath,...e.relativeParentPath.split(`/`)):e.rootPath;e.mkdir&&await m.mkdir(t,{recursive:!0});let n=u.join(t,e.basename),r=u.join(t,`.${e.basename}.fallback.tmp`);if(e.input.kind===`buffer`)typeof e.input.data==`string`?await m.writeFile(r,e.input.data,{encoding:e.input.encoding??`utf8`,mode:e.mode}):await m.writeFile(r,e.input.data,{mode:e.mode});else{let t=await m.open(r,`w`,e.mode);try{await _(e.input.stream,t.createWriteStream())}finally{await t.close().catch(()=>{})}}await m.rename(r,n);let i=await m.stat(n);return{dev:i.dev,ino:i.ino}}var y=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`SafeOpenError`}};const b=process.platform!==`win32`&&`O_NOFOLLOW`in d,ae=d.O_RDONLY|(b?d.O_NOFOLLOW:0),oe=d.O_WRONLY|(b?d.O_NOFOLLOW:0),x=d.O_WRONLY|d.O_CREAT|d.O_EXCL|(b?d.O_NOFOLLOW:0),S=d.O_RDWR|d.O_APPEND|(b?d.O_NOFOLLOW:0),se=d.O_RDWR|d.O_APPEND|d.O_CREAT|d.O_EXCL|(b?d.O_NOFOLLOW:0),C=e=>e.endsWith(u.sep)?e:e+u.sep;async function w(t){let n=process.env.HOME||process.env.USERPROFILE||l.homedir();try{n=await m.realpath(n)}catch{}return e(t,{home:n})}async function T(e,i){try{if((await m.lstat(e)).isDirectory())throw new y(`not-file`,`not a file`)}catch(e){if(e instanceof y)throw e}let o;try{o=await m.open(e,ae)}catch(e){throw n(e)?new y(`not-found`,`file not found`):r(e)?new y(`symlink`,`symlink open blocked`,{cause:e}):t(e,`EISDIR`)?new y(`not-file`,`not a file`):e}try{let[t,n]=await Promise.all([o.stat(),m.lstat(e)]);if(n.isSymbolicLink())throw new y(`symlink`,`symlink not allowed`);if(!t.isFile())throw new y(`not-file`,`not a file`);if(i?.rejectHardlinks&&t.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!a(t,n))throw new y(`path-mismatch`,`path changed during read`);let r=await m.realpath(e),s=await m.stat(r);if(i?.rejectHardlinks&&s.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!a(t,s))throw new y(`path-mismatch`,`path mismatch`);return{handle:o,realPath:r,stat:t}}catch(e){throw await o.close().catch(()=>{}),e instanceof y?e:n(e)?new y(`not-found`,`file not found`):e}}async function E(e){let t;try{t=await m.realpath(e.rootDir)}catch(e){throw n(e)?new y(`not-found`,`root dir not found`):e}let r=C(t),a=await w(e.relativePath),o=u.resolve(r,a);if(!i(r,o))throw new y(`outside-workspace`,`file is outside workspace root`);return{rootReal:t,rootWithSep:r,resolved:o}}async function D(e){let{rootWithSep:t,resolved:n}=await E(e),r;try{r=await T(n)}catch(e){throw e instanceof y?e.code===`not-found`?e:new y(`invalid-path`,`path is not a regular file under root`,{cause:e}):e}if(e.rejectHardlinks!==!1&&r.stat.nlink>1)throw await r.handle.close().catch(()=>{}),new y(`invalid-path`,`hardlinked path not allowed`);if(!i(t,r.realPath))throw await r.handle.close().catch(()=>{}),new y(`outside-workspace`,`file is outside workspace root`);return r}async function O(e){let t=await D({rootDir:e.rootDir,relativePath:e.relativePath,rejectHardlinks:e.rejectHardlinks});try{return await M({opened:t,maxBytes:e.maxBytes})}finally{await t.handle.close().catch(()=>{})}}async function k(e){let t=u.resolve(e.rootDir),n=u.isAbsolute(e.filePath)?u.resolve(e.filePath):u.resolve(t,e.filePath);return await O({rootDir:t,relativePath:u.relative(t,n),rejectHardlinks:e.rejectHardlinks,maxBytes:e.maxBytes})}function A(e){let t=u.resolve(e.rootDir);return async n=>(await k({rootDir:t,filePath:n,rejectHardlinks:e.rejectHardlinks,maxBytes:e.maxBytes})).buffer}async function j(e){let t=await T(e.filePath);try{return await M({opened:t,maxBytes:e.maxBytes})}finally{await t.handle.close().catch(()=>{})}}async function M(e){if(e.maxBytes!==void 0&&e.opened.stat.size>e.maxBytes)throw new y(`too-large`,`file exceeds limit of ${e.maxBytes} bytes (got ${e.opened.stat.size})`);return{buffer:await e.opened.handle.readFile(),realPath:e.opened.realPath,stat:e.opened.stat}}function N(e){o(`security: fs-safe write boundary warning (${e})`)}function P(e){let t=u.dirname(e),n=u.basename(e);return u.join(t,`.${n}.${process.pid}.${h()}.tmp`)}async function ce(e){let t=await m.open(e.tempPath,x,e.mode);try{return typeof e.data==`string`?await t.writeFile(e.data,e.encoding??`utf8`):await t.writeFile(e.data),await t.stat()}finally{await t.close().catch(()=>{})}}async function F(e){let t=C(await m.realpath(e.rootDir)),n=await T(e.targetPath,{rejectHardlinks:!0});try{if(!a(n.stat,e.expectedIdentity))throw new y(`path-mismatch`,`path changed during write`);if(!i(t,n.realPath))throw new y(`outside-workspace`,`file is outside workspace root`)}finally{await n.handle.close().catch(()=>{})}}async function I(e,t){try{return await m.realpath(t)}catch(e){if(!n(e))throw e}let r=process.platform===`linux`?[`/proc/self/fd/${e.fd}`,`/dev/fd/${e.fd}`]:process.platform===`win32`?[]:[`/dev/fd/${e.fd}`];for(let e of r)try{return await m.realpath(e)}catch{}throw new y(`path-mismatch`,`unable to resolve opened file path`)}async function L(e){let{rootReal:t,rootWithSep:o,resolved:c}=await E(e);try{await s({absolutePath:c,rootPath:t,boundaryLabel:`root`})}catch(e){throw new y(`invalid-path`,`path alias escape blocked`,{cause:e})}e.mkdir!==!1&&await m.mkdir(u.dirname(c),{recursive:!0});let l=c;try{let e=await m.realpath(c);if(!i(o,e))throw new y(`outside-workspace`,`file is outside workspace root`);l=e}catch(e){if(e instanceof y||!n(e))throw e}let d=e.mode??384,f,p=!1,h=e.append?S:oe,g=e.append?se:x;try{try{f=await m.open(l,h,d)}catch(e){if(!n(e))throw e;f=await m.open(l,g,d),p=!0}}catch(e){throw n(e)?new y(`not-found`,`file not found`):r(e)?new y(`invalid-path`,`symlink open blocked`,{cause:e}):e}let _=null;try{let t=await f.stat();if(!t.isFile())throw new y(`invalid-path`,`path is not a regular file under root`);if(t.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);try{let e=await m.lstat(l);if(e.isSymbolicLink()||!e.isFile())throw new y(`invalid-path`,`path is not a regular file under root`);if(!a(t,e))throw new y(`path-mismatch`,`path changed during write`)}catch(e){if(!n(e))throw e}let r=await I(f,l);_=r;let s=await m.stat(r);if(!a(t,s))throw new y(`path-mismatch`,`path mismatch`);if(s.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!i(o,r))throw new y(`outside-workspace`,`file is outside workspace root`);return e.append!==!0&&e.truncateExisting!==!1&&!p&&await f.truncate(0),{handle:f,createdForWrite:p,openedRealPath:r,openedStat:t}}catch(e){let t=p&&e instanceof y,n=_??l;throw await f.close().catch(()=>{}),t&&await m.rm(n,{force:!0}).catch(()=>{}),e}}async function R(e){let t=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1,append:!0});try{let n=``;if(e.prependNewlineIfNeeded===!0&&!t.createdForWrite&&t.openedStat.size>0&&(typeof e.data==`string`&&!e.data.startsWith(`
3
3
  `)||Buffer.isBuffer(e.data)&&e.data.length>0&&e.data[0]!==10)){let e=Buffer.alloc(1),{bytesRead:r}=await t.handle.read(e,0,1,t.openedStat.size-1);r===1&&e[0]!==10&&(n=`
4
4
  `)}if(typeof e.data==`string`){await t.handle.appendFile(`${n}${e.data}`,e.encoding??`utf8`);return}let r=n.length>0?Buffer.concat([Buffer.from(n,`utf8`),e.data]):e.data;await t.handle.appendFile(r)}finally{await t.handle.close().catch(()=>{})}}async function z(e){if(process.platform===`win32`){await W(e);return}let t=await H({rootDir:e.rootDir,relativePath:e.relativePath}),n=await v({rootPath:t.rootReal,relativeParentPath:t.relativeParentPath,basename:t.basename,mkdir:e.mkdir!==!1,mode:t.mode,input:{kind:`buffer`,data:e.data,encoding:e.encoding}}).catch(e=>{throw U(e)});try{await F({rootDir:e.rootDir,targetPath:t.targetPath,expectedIdentity:n})}catch(e){throw N(`post-write verification failed: ${String(e)}`),e}}async function B(e){let t=await T(e.sourcePath,{rejectHardlinks:e.rejectSourceHardlinks});if(e.maxBytes!==void 0&&t.stat.size>e.maxBytes)throw await t.handle.close().catch(()=>{}),new y(`too-large`,`file exceeds limit of ${e.maxBytes} bytes (got ${t.stat.size})`);try{if(process.platform===`win32`){await G(e,t);return}let n=await H({rootDir:e.rootDir,relativePath:e.relativePath}),r=t.handle.createReadStream(),i=await v({rootPath:n.rootReal,relativeParentPath:n.relativeParentPath,basename:n.basename,mkdir:e.mkdir!==!1,mode:n.mode,input:{kind:`stream`,stream:r}}).catch(e=>{throw U(e)});try{await F({rootDir:e.rootDir,targetPath:n.targetPath,expectedIdentity:i})}catch(e){throw N(`post-copy verification failed: ${String(e)}`),e}}finally{await t.handle.close().catch(()=>{})}}async function V(e){await B({sourcePath:e.sourcePath,rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,rejectSourceHardlinks:!0})}async function H(e){let{rootReal:t,rootWithSep:n,resolved:r}=await E(e);try{await s({absolutePath:r,rootPath:t,boundaryLabel:`root`})}catch(e){throw new y(`invalid-path`,`path alias escape blocked`,{cause:e})}let a=u.relative(t,r);if(a.startsWith(`..`)||u.isAbsolute(a))throw new y(`outside-workspace`,`file is outside workspace root`);let o=a?a.split(u.sep).join(u.posix.sep):``,c=u.posix.basename(o);if(!c||c===`.`||c===`/`)throw new y(`invalid-path`,`invalid target path`);let l=384;try{let t=await D({rootDir:e.rootDir,relativePath:e.relativePath,rejectHardlinks:!0});try{if(l=t.stat.mode&511,!i(n,t.realPath))throw new y(`outside-workspace`,`file is outside workspace root`)}finally{await t.handle.close().catch(()=>{})}}catch(e){if(!(e instanceof y)||e.code!==`not-found`)throw e}return{rootReal:t,targetPath:r,relativeParentPath:u.posix.dirname(o)===`.`?``:u.posix.dirname(o),basename:c,mode:l||384}}function U(e){return e instanceof y?e:new y(`invalid-path`,`path is not a regular file under root`,{cause:e instanceof Error?e:void 0})}async function W(e){let t=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1}),n=t.openedRealPath,r=t.openedStat.mode&511;await t.handle.close().catch(()=>{});let i=null;try{i=P(n);let t=await ce({tempPath:i,data:e.data,encoding:e.encoding,mode:r||384});await m.rename(i,n),i=null;try{await F({rootDir:e.rootDir,targetPath:n,expectedIdentity:t})}catch(e){throw N(`post-write verification failed: ${String(e)}`),e}}finally{i&&await m.rm(i,{force:!0}).catch(()=>{})}}async function G(e,t){let n=null,r=!1,i=!1,a=null,o=null,s=!1;try{n=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1});let c=n.openedRealPath,l=n.openedStat.mode&511;await n.handle.close().catch(()=>{}),i=!0,o=P(c),a=await m.open(o,x,l||384);let u=t.handle.createReadStream(),d=a.createWriteStream();u.once(`close`,()=>{r=!0}),d.once(`close`,()=>{s=!0}),await import(`node:stream/promises`).then(({pipeline:e})=>e(u,d));let f=await m.stat(o);s||=(await a.close().catch(()=>{}),!0),a=null,await m.rename(o,c),o=null;try{await F({rootDir:e.rootDir,targetPath:c,expectedIdentity:f})}catch(e){throw N(`post-copy verification failed: ${String(e)}`),e}}catch(e){throw n?.createdForWrite&&await m.rm(n.openedRealPath,{force:!0}).catch(()=>{}),e}finally{o&&await m.rm(o,{force:!0}).catch(()=>{}),r||await t.handle.close().catch(()=>{}),a&&!s&&await a.close().catch(()=>{}),n&&!i&&await n.handle.close().catch(()=>{})}}const K=6*1024*1024,q=100*1024*1024;function J(e){if(e){if(e.startsWith(`image/`))return`image`;if(e.startsWith(`audio/`))return`audio`;if(e.startsWith(`video/`))return`video`;if(e===`application/pdf`||e.startsWith(`text/`)||e.startsWith(`application/`))return`document`}}function le(e){switch(e){case`image`:return K;case`audio`:return 16777216;case`video`:return 16777216;case`document`:return q;default:return q}}const Y={"image/heic":`.heic`,"image/heif":`.heif`,"image/jpeg":`.jpg`,"image/png":`.png`,"image/webp":`.webp`,"image/gif":`.gif`,"audio/ogg":`.ogg`,"audio/mpeg":`.mp3`,"audio/wav":`.wav`,"audio/flac":`.flac`,"audio/aac":`.aac`,"audio/opus":`.opus`,"audio/x-m4a":`.m4a`,"audio/mp4":`.m4a`,"video/mp4":`.mp4`,"video/quicktime":`.mov`,"application/pdf":`.pdf`,"application/json":`.json`,"application/zip":`.zip`,"application/gzip":`.gz`,"application/x-tar":`.tar`,"application/x-7z-compressed":`.7z`,"application/vnd.rar":`.rar`,"application/msword":`.doc`,"application/vnd.ms-excel":`.xls`,"application/vnd.ms-powerpoint":`.ppt`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`.docx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`.xlsx`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`.pptx`,"text/csv":`.csv`,"text/plain":`.txt`,"text/markdown":`.md`},ue={...Object.fromEntries(Object.entries(Y).map(([e,t])=>[t,e])),".jpeg":`image/jpeg`,".js":`text/javascript`},de=new Set([`.aac`,`.caf`,`.flac`,`.m4a`,`.mp3`,`.oga`,`.ogg`,`.opus`,`.wav`]);function X(e){if(e)return e.split(`;`)[0]?.trim().toLowerCase()||void 0}async function fe(e){if(e)try{return(await ee(e))?.mime??void 0}catch{return}}function Z(e){if(e){try{if(/^https?:\/\//i.test(e)){let t=new URL(e);return u.extname(t.pathname).toLowerCase()||void 0}}catch{}return u.extname(e).toLowerCase()||void 0}}function pe(e){let t=Z(e);return t?de.has(t):!1}function me(e){return he(e)}function Q(e){if(!e)return!0;let t=e.toLowerCase();return t===`application/octet-stream`||t===`application/zip`}async function he(e){let t=Z(e.filePath),n=t?ue[t]:void 0,r=X(e.headerMime),i=await fe(e.buffer);if(i&&(!Q(i)||!n))return i;if(n)return n;if(r&&!Q(r))return r;if(i)return i;if(r)return r}function ge(e){let t=X(e);if(t)return Y[t]}function _e(e){return e.contentType?.toLowerCase()===`image/gif`?!0:Z(e.fileName)===`.gif`}function ve(e){if(e)switch(e.toLowerCase()){case`jpg`:case`jpeg`:return`image/jpeg`;case`heic`:return`image/heic`;case`heif`:return`image/heif`;case`png`:return`image/png`;case`webp`:return`image/webp`;case`gif`:return`image/gif`;default:return}}function ye(e){return J(X(e))}function $(e){try{return p(e).isFile()}catch{return!1}}function be(e,t){if(e.includes(`/`)||e.includes(`\\`)||u.isAbsolute(e))return e;let n=(t.PATH??t.Path??process.env.PATH??process.env.Path??``).split(`;`).map(e=>e.trim()).filter(Boolean),r=u.extname(e).length>0,i=t.PATHEXT??t.Pathext??process.env.PATHEXT??process.env.Pathext??`.EXE;.CMD;.BAT;.COM`,a=r?[``]:i.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>e.startsWith(`.`)?e:`.${e}`);for(let t of n)for(let n of a)for(let r of[n,n.toLowerCase(),n.toUpperCase()]){let n=u.join(t,`${e}${r}`);if($(n))return n}return e}function xe(e){if(!$(e))return null;try{let t=f(e,`utf8`),n=[];for(let r of t.matchAll(/"([^"\r\n]*)"/g)){let t=(r[1]??``).match(/%~?dp0%?\s*[\\/]*(.*)$/i)?.[1]?.trim();if(!t)continue;let i=t.replace(/[\\/]+/g,u.sep).replace(/^[\\/]+/,``),a=u.resolve(u.dirname(e),i);$(a)&&n.push(a)}return n.find(e=>{let t=u.basename(e).toLowerCase();return t!==`node.exe`&&t!==`node`})??null}catch{return null}}function Se(e,t){if(typeof t==`string`)return t.trim()||null;if(!t||typeof t!=`object`)return null;if(e){let n=t[e];if(typeof n==`string`&&n.trim())return n.trim()}for(let e of Object.values(t))if(typeof e==`string`&&e.trim())return e.trim();return null}function Ce(e,t){if(!t)return null;let n=u.dirname(e),r=[u.resolve(n,`..`,t),u.resolve(n,`node_modules`,t)];for(let e of r){let n=u.join(e,`package.json`);if($(n))try{let r=Se(t,JSON.parse(f(n,`utf8`)).bin);if(!r)continue;let i=u.resolve(e,r);if($(i))return i}catch{}}return null}function we(e){let t=e.platform??process.platform,n=e.env??process.env,r=e.execPath??process.execPath;if(t!==`win32`)return{command:e.command,leadingArgv:[],resolution:`direct`};let i=be(e.command,n),a=u.extname(i).toLowerCase();if(a===`.js`||a===`.cjs`||a===`.mjs`)return{command:r,leadingArgv:[i],resolution:`node-entrypoint`,windowsHide:!0};if(a===`.cmd`||a===`.bat`){let t=xe(i)??Ce(i,e.packageName);return t?u.extname(t).toLowerCase()===`.exe`?{command:t,leadingArgv:[],resolution:`exe-entrypoint`,windowsHide:!0}:{command:r,leadingArgv:[t],resolution:`node-entrypoint`,windowsHide:!0}:{command:i,leadingArgv:[],resolution:`unresolved-wrapper`}}return{command:i,leadingArgv:[],resolution:`direct`}}function Te(e){if(e.candidate.resolution!==`unresolved-wrapper`)return{command:e.candidate.command,leadingArgv:e.candidate.leadingArgv,resolution:e.candidate.resolution,windowsHide:e.candidate.windowsHide};if(e.allowShellFallback!==!1)return{command:e.candidate.command,leadingArgv:[],resolution:`shell-fallback`,shell:!0};throw Error(`${u.basename(e.candidate.command)} wrapper resolved, but no executable/Node entrypoint could be resolved without shell execution.`)}function Ee(e){return Te({candidate:we(e),allowShellFallback:e.allowShellFallback})}function De(e,t){return{command:e.command,argv:[...e.leadingArgv,...t],resolution:e.resolution,shell:e.shell,windowsHide:e.windowsHide}}export{z as C,V as S,A as _,Z as a,O as b,_e as c,K as d,le as f,B as g,R as h,ge as i,ye as l,y as m,Ee as n,ve as o,J as p,me as r,pe as s,De as t,X as u,D as v,te as w,j as x,L as y};
5
+ //# sourceMappingURL=windows-spawn-7oINn5ao.js.map
@@ -2,3 +2,4 @@ import{_ as e}from"./paths-B4IRk3wi.js";import{d as t,f as n,m as r,p as i,s as
2
2
  `);function re(e){let t=e.trim().split(/\r?\n/).map(e=>e.trim()).filter(Boolean).at(-1);if(!t)throw Error(`Pinned write helper returned no identity`);let[n,r]=t.split(`|`),i=Number.parseInt(n??``,10),a=Number.parseInt(r??``,10);if(!Number.isFinite(i)||!Number.isFinite(a))throw Error(`Pinned write helper returned invalid identity: ${t}`);return{dev:i,ino:a}}async function v(e){let t=m(`python3`,[`-c`,ne,e.rootPath,e.relativeParentPath,e.basename,e.mkdir?`1`:`0`,(e.mode||384).toString(8)],{stdio:[`pipe`,`pipe`,`pipe`]}),n=``,r=``;t.stdout.setEncoding?.(`utf8`),t.stderr.setEncoding?.(`utf8`),t.stdout.on(`data`,e=>{n+=e}),t.stderr.on(`data`,e=>{r+=e});let i=g(t,`close`);try{if(!t.stdin){let t=await ie(e);return await i.catch(()=>{}),t}if(e.input.kind===`buffer`){let n=e.input;await new Promise((e,r)=>{if(t.stdin.once(`error`,r),typeof n.data==`string`){t.stdin.end(n.data,n.encoding??`utf8`,()=>e());return}t.stdin.end(n.data,()=>e())})}else await _(e.input.stream,t.stdin);let[a,o]=await i;if(a!==0)throw Error(r.trim()||`Pinned write helper failed with code ${a??`null`} (${o??`?`})`);return re(n)}catch(e){throw t.kill(`SIGKILL`),await i.catch(()=>{}),e}}async function ie(e){let t=e.relativeParentPath?f.join(e.rootPath,...e.relativeParentPath.split(`/`)):e.rootPath;e.mkdir&&await p.mkdir(t,{recursive:!0});let n=f.join(t,e.basename),r=f.join(t,`.${e.basename}.fallback.tmp`);if(e.input.kind===`buffer`)typeof e.input.data==`string`?await p.writeFile(r,e.input.data,{encoding:e.input.encoding??`utf8`,mode:e.mode}):await p.writeFile(r,e.input.data,{mode:e.mode});else{let t=await p.open(r,`w`,e.mode);try{await _(e.input.stream,t.createWriteStream())}finally{await t.close().catch(()=>{})}}await p.rename(r,n);let i=await p.stat(n);return{dev:i.dev,ino:i.ino}}var y=class extends Error{constructor(e,t,n){super(t,n),this.code=e,this.name=`SafeOpenError`}};const b=process.platform!==`win32`&&`O_NOFOLLOW`in c,ae=c.O_RDONLY|(b?c.O_NOFOLLOW:0),oe=c.O_WRONLY|(b?c.O_NOFOLLOW:0),x=c.O_WRONLY|c.O_CREAT|c.O_EXCL|(b?c.O_NOFOLLOW:0),S=c.O_RDWR|c.O_APPEND|(b?c.O_NOFOLLOW:0),se=c.O_RDWR|c.O_APPEND|c.O_CREAT|c.O_EXCL|(b?c.O_NOFOLLOW:0),C=e=>e.endsWith(f.sep)?e:e+f.sep;async function w(t){let n=process.env.HOME||process.env.USERPROFILE||d.homedir();try{n=await p.realpath(n)}catch{}return e(t,{home:n})}async function T(e,i){try{if((await p.lstat(e)).isDirectory())throw new y(`not-file`,`not a file`)}catch(e){if(e instanceof y)throw e}let o;try{o=await p.open(e,ae)}catch(e){throw n(e)?new y(`not-found`,`file not found`):r(e)?new y(`symlink`,`symlink open blocked`,{cause:e}):t(e,`EISDIR`)?new y(`not-file`,`not a file`):e}try{let[t,n]=await Promise.all([o.stat(),p.lstat(e)]);if(n.isSymbolicLink())throw new y(`symlink`,`symlink not allowed`);if(!t.isFile())throw new y(`not-file`,`not a file`);if(i?.rejectHardlinks&&t.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!a(t,n))throw new y(`path-mismatch`,`path changed during read`);let r=await p.realpath(e),s=await p.stat(r);if(i?.rejectHardlinks&&s.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!a(t,s))throw new y(`path-mismatch`,`path mismatch`);return{handle:o,realPath:r,stat:t}}catch(e){throw await o.close().catch(()=>{}),e instanceof y?e:n(e)?new y(`not-found`,`file not found`):e}}async function E(e){let t;try{t=await p.realpath(e.rootDir)}catch(e){throw n(e)?new y(`not-found`,`root dir not found`):e}let r=C(t),a=await w(e.relativePath),o=f.resolve(r,a);if(!i(r,o))throw new y(`outside-workspace`,`file is outside workspace root`);return{rootReal:t,rootWithSep:r,resolved:o}}async function D(e){let{rootWithSep:t,resolved:n}=await E(e),r;try{r=await T(n)}catch(e){throw e instanceof y?e.code===`not-found`?e:new y(`invalid-path`,`path is not a regular file under root`,{cause:e}):e}if(e.rejectHardlinks!==!1&&r.stat.nlink>1)throw await r.handle.close().catch(()=>{}),new y(`invalid-path`,`hardlinked path not allowed`);if(!i(t,r.realPath))throw await r.handle.close().catch(()=>{}),new y(`outside-workspace`,`file is outside workspace root`);return r}async function O(e){let t=await D({rootDir:e.rootDir,relativePath:e.relativePath,rejectHardlinks:e.rejectHardlinks});try{return await M({opened:t,maxBytes:e.maxBytes})}finally{await t.handle.close().catch(()=>{})}}async function k(e){let t=f.resolve(e.rootDir),n=f.isAbsolute(e.filePath)?f.resolve(e.filePath):f.resolve(t,e.filePath);return await O({rootDir:t,relativePath:f.relative(t,n),rejectHardlinks:e.rejectHardlinks,maxBytes:e.maxBytes})}function A(e){let t=f.resolve(e.rootDir);return async n=>(await k({rootDir:t,filePath:n,rejectHardlinks:e.rejectHardlinks,maxBytes:e.maxBytes})).buffer}async function j(e){let t=await T(e.filePath);try{return await M({opened:t,maxBytes:e.maxBytes})}finally{await t.handle.close().catch(()=>{})}}async function M(e){if(e.maxBytes!==void 0&&e.opened.stat.size>e.maxBytes)throw new y(`too-large`,`file exceeds limit of ${e.maxBytes} bytes (got ${e.opened.stat.size})`);return{buffer:await e.opened.handle.readFile(),realPath:e.opened.realPath,stat:e.opened.stat}}function N(e){o(`security: fs-safe write boundary warning (${e})`)}function P(e){let t=f.dirname(e),n=f.basename(e);return f.join(t,`.${n}.${process.pid}.${h()}.tmp`)}async function ce(e){let t=await p.open(e.tempPath,x,e.mode);try{return typeof e.data==`string`?await t.writeFile(e.data,e.encoding??`utf8`):await t.writeFile(e.data),await t.stat()}finally{await t.close().catch(()=>{})}}async function F(e){let t=C(await p.realpath(e.rootDir)),n=await T(e.targetPath,{rejectHardlinks:!0});try{if(!a(n.stat,e.expectedIdentity))throw new y(`path-mismatch`,`path changed during write`);if(!i(t,n.realPath))throw new y(`outside-workspace`,`file is outside workspace root`)}finally{await n.handle.close().catch(()=>{})}}async function I(e,t){try{return await p.realpath(t)}catch(e){if(!n(e))throw e}let r=process.platform===`linux`?[`/proc/self/fd/${e.fd}`,`/dev/fd/${e.fd}`]:process.platform===`win32`?[]:[`/dev/fd/${e.fd}`];for(let e of r)try{return await p.realpath(e)}catch{}throw new y(`path-mismatch`,`unable to resolve opened file path`)}async function L(e){let{rootReal:t,rootWithSep:o,resolved:c}=await E(e);try{await s({absolutePath:c,rootPath:t,boundaryLabel:`root`})}catch(e){throw new y(`invalid-path`,`path alias escape blocked`,{cause:e})}e.mkdir!==!1&&await p.mkdir(f.dirname(c),{recursive:!0});let l=c;try{let e=await p.realpath(c);if(!i(o,e))throw new y(`outside-workspace`,`file is outside workspace root`);l=e}catch(e){if(e instanceof y||!n(e))throw e}let u=e.mode??384,d,m=!1,h=e.append?S:oe,g=e.append?se:x;try{try{d=await p.open(l,h,u)}catch(e){if(!n(e))throw e;d=await p.open(l,g,u),m=!0}}catch(e){throw n(e)?new y(`not-found`,`file not found`):r(e)?new y(`invalid-path`,`symlink open blocked`,{cause:e}):e}let _=null;try{let t=await d.stat();if(!t.isFile())throw new y(`invalid-path`,`path is not a regular file under root`);if(t.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);try{let e=await p.lstat(l);if(e.isSymbolicLink()||!e.isFile())throw new y(`invalid-path`,`path is not a regular file under root`);if(!a(t,e))throw new y(`path-mismatch`,`path changed during write`)}catch(e){if(!n(e))throw e}let r=await I(d,l);_=r;let s=await p.stat(r);if(!a(t,s))throw new y(`path-mismatch`,`path mismatch`);if(s.nlink>1)throw new y(`invalid-path`,`hardlinked path not allowed`);if(!i(o,r))throw new y(`outside-workspace`,`file is outside workspace root`);return e.append!==!0&&e.truncateExisting!==!1&&!m&&await d.truncate(0),{handle:d,createdForWrite:m,openedRealPath:r,openedStat:t}}catch(e){let t=m&&e instanceof y,n=_??l;throw await d.close().catch(()=>{}),t&&await p.rm(n,{force:!0}).catch(()=>{}),e}}async function R(e){let t=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1,append:!0});try{let n=``;if(e.prependNewlineIfNeeded===!0&&!t.createdForWrite&&t.openedStat.size>0&&(typeof e.data==`string`&&!e.data.startsWith(`
3
3
  `)||Buffer.isBuffer(e.data)&&e.data.length>0&&e.data[0]!==10)){let e=Buffer.alloc(1),{bytesRead:r}=await t.handle.read(e,0,1,t.openedStat.size-1);r===1&&e[0]!==10&&(n=`
4
4
  `)}if(typeof e.data==`string`){await t.handle.appendFile(`${n}${e.data}`,e.encoding??`utf8`);return}let r=n.length>0?Buffer.concat([Buffer.from(n,`utf8`),e.data]):e.data;await t.handle.appendFile(r)}finally{await t.handle.close().catch(()=>{})}}async function z(e){if(process.platform===`win32`){await W(e);return}let t=await H({rootDir:e.rootDir,relativePath:e.relativePath}),n=await v({rootPath:t.rootReal,relativeParentPath:t.relativeParentPath,basename:t.basename,mkdir:e.mkdir!==!1,mode:t.mode,input:{kind:`buffer`,data:e.data,encoding:e.encoding}}).catch(e=>{throw U(e)});try{await F({rootDir:e.rootDir,targetPath:t.targetPath,expectedIdentity:n})}catch(e){throw N(`post-write verification failed: ${String(e)}`),e}}async function B(e){let t=await T(e.sourcePath,{rejectHardlinks:e.rejectSourceHardlinks});if(e.maxBytes!==void 0&&t.stat.size>e.maxBytes)throw await t.handle.close().catch(()=>{}),new y(`too-large`,`file exceeds limit of ${e.maxBytes} bytes (got ${t.stat.size})`);try{if(process.platform===`win32`){await G(e,t);return}let n=await H({rootDir:e.rootDir,relativePath:e.relativePath}),r=t.handle.createReadStream(),i=await v({rootPath:n.rootReal,relativeParentPath:n.relativeParentPath,basename:n.basename,mkdir:e.mkdir!==!1,mode:n.mode,input:{kind:`stream`,stream:r}}).catch(e=>{throw U(e)});try{await F({rootDir:e.rootDir,targetPath:n.targetPath,expectedIdentity:i})}catch(e){throw N(`post-copy verification failed: ${String(e)}`),e}}finally{await t.handle.close().catch(()=>{})}}async function V(e){await B({sourcePath:e.sourcePath,rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,rejectSourceHardlinks:!0})}async function H(e){let{rootReal:t,rootWithSep:n,resolved:r}=await E(e);try{await s({absolutePath:r,rootPath:t,boundaryLabel:`root`})}catch(e){throw new y(`invalid-path`,`path alias escape blocked`,{cause:e})}let a=f.relative(t,r);if(a.startsWith(`..`)||f.isAbsolute(a))throw new y(`outside-workspace`,`file is outside workspace root`);let o=a?a.split(f.sep).join(f.posix.sep):``,c=f.posix.basename(o);if(!c||c===`.`||c===`/`)throw new y(`invalid-path`,`invalid target path`);let l=384;try{let t=await D({rootDir:e.rootDir,relativePath:e.relativePath,rejectHardlinks:!0});try{if(l=t.stat.mode&511,!i(n,t.realPath))throw new y(`outside-workspace`,`file is outside workspace root`)}finally{await t.handle.close().catch(()=>{})}}catch(e){if(!(e instanceof y)||e.code!==`not-found`)throw e}return{rootReal:t,targetPath:r,relativeParentPath:f.posix.dirname(o)===`.`?``:f.posix.dirname(o),basename:c,mode:l||384}}function U(e){return e instanceof y?e:new y(`invalid-path`,`path is not a regular file under root`,{cause:e instanceof Error?e:void 0})}async function W(e){let t=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1}),n=t.openedRealPath,r=t.openedStat.mode&511;await t.handle.close().catch(()=>{});let i=null;try{i=P(n);let t=await ce({tempPath:i,data:e.data,encoding:e.encoding,mode:r||384});await p.rename(i,n),i=null;try{await F({rootDir:e.rootDir,targetPath:n,expectedIdentity:t})}catch(e){throw N(`post-write verification failed: ${String(e)}`),e}}finally{i&&await p.rm(i,{force:!0}).catch(()=>{})}}async function G(e,t){let n=null,r=!1,i=!1,a=null,o=null,s=!1;try{n=await L({rootDir:e.rootDir,relativePath:e.relativePath,mkdir:e.mkdir,truncateExisting:!1});let c=n.openedRealPath,l=n.openedStat.mode&511;await n.handle.close().catch(()=>{}),i=!0,o=P(c),a=await p.open(o,x,l||384);let u=t.handle.createReadStream(),d=a.createWriteStream();u.once(`close`,()=>{r=!0}),d.once(`close`,()=>{s=!0}),await import(`node:stream/promises`).then(({pipeline:e})=>e(u,d));let f=await p.stat(o);s||=(await a.close().catch(()=>{}),!0),a=null,await p.rename(o,c),o=null;try{await F({rootDir:e.rootDir,targetPath:c,expectedIdentity:f})}catch(e){throw N(`post-copy verification failed: ${String(e)}`),e}}catch(e){throw n?.createdForWrite&&await p.rm(n.openedRealPath,{force:!0}).catch(()=>{}),e}finally{o&&await p.rm(o,{force:!0}).catch(()=>{}),r||await t.handle.close().catch(()=>{}),a&&!s&&await a.close().catch(()=>{}),n&&!i&&await n.handle.close().catch(()=>{})}}const K=6*1024*1024,q=100*1024*1024;function J(e){if(e){if(e.startsWith(`image/`))return`image`;if(e.startsWith(`audio/`))return`audio`;if(e.startsWith(`video/`))return`video`;if(e===`application/pdf`||e.startsWith(`text/`)||e.startsWith(`application/`))return`document`}}function le(e){switch(e){case`image`:return K;case`audio`:return 16777216;case`video`:return 16777216;case`document`:return q;default:return q}}const Y={"image/heic":`.heic`,"image/heif":`.heif`,"image/jpeg":`.jpg`,"image/png":`.png`,"image/webp":`.webp`,"image/gif":`.gif`,"audio/ogg":`.ogg`,"audio/mpeg":`.mp3`,"audio/wav":`.wav`,"audio/flac":`.flac`,"audio/aac":`.aac`,"audio/opus":`.opus`,"audio/x-m4a":`.m4a`,"audio/mp4":`.m4a`,"video/mp4":`.mp4`,"video/quicktime":`.mov`,"application/pdf":`.pdf`,"application/json":`.json`,"application/zip":`.zip`,"application/gzip":`.gz`,"application/x-tar":`.tar`,"application/x-7z-compressed":`.7z`,"application/vnd.rar":`.rar`,"application/msword":`.doc`,"application/vnd.ms-excel":`.xls`,"application/vnd.ms-powerpoint":`.ppt`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`.docx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`.xlsx`,"application/vnd.openxmlformats-officedocument.presentationml.presentation":`.pptx`,"text/csv":`.csv`,"text/plain":`.txt`,"text/markdown":`.md`},ue={...Object.fromEntries(Object.entries(Y).map(([e,t])=>[t,e])),".jpeg":`image/jpeg`,".js":`text/javascript`},de=new Set([`.aac`,`.caf`,`.flac`,`.m4a`,`.mp3`,`.oga`,`.ogg`,`.opus`,`.wav`]);function X(e){if(e)return e.split(`;`)[0]?.trim().toLowerCase()||void 0}async function fe(e){if(e)try{return(await ee(e))?.mime??void 0}catch{return}}function Z(e){if(e){try{if(/^https?:\/\//i.test(e)){let t=new URL(e);return f.extname(t.pathname).toLowerCase()||void 0}}catch{}return f.extname(e).toLowerCase()||void 0}}function pe(e){let t=Z(e);return t?de.has(t):!1}function me(e){return he(e)}function Q(e){if(!e)return!0;let t=e.toLowerCase();return t===`application/octet-stream`||t===`application/zip`}async function he(e){let t=Z(e.filePath),n=t?ue[t]:void 0,r=X(e.headerMime),i=await fe(e.buffer);if(i&&(!Q(i)||!n))return i;if(n)return n;if(r&&!Q(r))return r;if(i)return i;if(r)return r}function ge(e){let t=X(e);if(t)return Y[t]}function _e(e){return e.contentType?.toLowerCase()===`image/gif`?!0:Z(e.fileName)===`.gif`}function ve(e){if(e)switch(e.toLowerCase()){case`jpg`:case`jpeg`:return`image/jpeg`;case`heic`:return`image/heic`;case`heif`:return`image/heif`;case`png`:return`image/png`;case`webp`:return`image/webp`;case`gif`:return`image/gif`;default:return}}function ye(e){return J(X(e))}function $(e){try{return u(e).isFile()}catch{return!1}}function be(e,t){if(e.includes(`/`)||e.includes(`\\`)||f.isAbsolute(e))return e;let n=(t.PATH??t.Path??process.env.PATH??process.env.Path??``).split(`;`).map(e=>e.trim()).filter(Boolean),r=f.extname(e).length>0,i=t.PATHEXT??t.Pathext??process.env.PATHEXT??process.env.Pathext??`.EXE;.CMD;.BAT;.COM`,a=r?[``]:i.split(`;`).map(e=>e.trim()).filter(Boolean).map(e=>e.startsWith(`.`)?e:`.${e}`);for(let t of n)for(let n of a)for(let r of[n,n.toLowerCase(),n.toUpperCase()]){let n=f.join(t,`${e}${r}`);if($(n))return n}return e}function xe(e){if(!$(e))return null;try{let t=l(e,`utf8`),n=[];for(let r of t.matchAll(/"([^"\r\n]*)"/g)){let t=(r[1]??``).match(/%~?dp0%?\s*[\\/]*(.*)$/i)?.[1]?.trim();if(!t)continue;let i=t.replace(/[\\/]+/g,f.sep).replace(/^[\\/]+/,``),a=f.resolve(f.dirname(e),i);$(a)&&n.push(a)}return n.find(e=>{let t=f.basename(e).toLowerCase();return t!==`node.exe`&&t!==`node`})??null}catch{return null}}function Se(e,t){if(typeof t==`string`)return t.trim()||null;if(!t||typeof t!=`object`)return null;if(e){let n=t[e];if(typeof n==`string`&&n.trim())return n.trim()}for(let e of Object.values(t))if(typeof e==`string`&&e.trim())return e.trim();return null}function Ce(e,t){if(!t)return null;let n=f.dirname(e),r=[f.resolve(n,`..`,t),f.resolve(n,`node_modules`,t)];for(let e of r){let n=f.join(e,`package.json`);if($(n))try{let r=Se(t,JSON.parse(l(n,`utf8`)).bin);if(!r)continue;let i=f.resolve(e,r);if($(i))return i}catch{}}return null}function we(e){let t=e.platform??process.platform,n=e.env??process.env,r=e.execPath??process.execPath;if(t!==`win32`)return{command:e.command,leadingArgv:[],resolution:`direct`};let i=be(e.command,n),a=f.extname(i).toLowerCase();if(a===`.js`||a===`.cjs`||a===`.mjs`)return{command:r,leadingArgv:[i],resolution:`node-entrypoint`,windowsHide:!0};if(a===`.cmd`||a===`.bat`){let t=xe(i)??Ce(i,e.packageName);return t?f.extname(t).toLowerCase()===`.exe`?{command:t,leadingArgv:[],resolution:`exe-entrypoint`,windowsHide:!0}:{command:r,leadingArgv:[t],resolution:`node-entrypoint`,windowsHide:!0}:{command:i,leadingArgv:[],resolution:`unresolved-wrapper`}}return{command:i,leadingArgv:[],resolution:`direct`}}function Te(e){if(e.candidate.resolution!==`unresolved-wrapper`)return{command:e.candidate.command,leadingArgv:e.candidate.leadingArgv,resolution:e.candidate.resolution,windowsHide:e.candidate.windowsHide};if(e.allowShellFallback!==!1)return{command:e.candidate.command,leadingArgv:[],resolution:`shell-fallback`,shell:!0};throw Error(`${f.basename(e.candidate.command)} wrapper resolved, but no executable/Node entrypoint could be resolved without shell execution.`)}function Ee(e){return Te({candidate:we(e),allowShellFallback:e.allowShellFallback})}function De(e,t){return{command:e.command,argv:[...e.leadingArgv,...t],resolution:e.resolution,shell:e.shell,windowsHide:e.windowsHide}}export{z as C,V as S,A as _,Z as a,O as b,_e as c,K as d,le as f,B as g,R as h,ge as i,ye as l,y as m,Ee as n,ve as o,J as p,me as r,pe as s,De as t,X as u,D as v,te as w,j as x,L as y};
5
+ //# sourceMappingURL=windows-spawn-AB7ItGAE.js.map
@@ -1 +1,2 @@
1
1
  import e from"node:os";import{promisify as t}from"node:util";import{execFile as n}from"node:child_process";const r=t(n);let i=null;async function a(e){try{let{stdout:t}=await r(`/usr/sbin/scutil`,[`--get`,e],{timeout:1e3,windowsHide:!0}),n=String(t??``).trim();return n.length>0?n:null}catch{return null}}function o(){return e.hostname().replace(/\.local$/i,``).trim()||`openclaw`}async function s(){return i||(i=(async()=>{if(process.env.VITEST)return o();if(process.platform===`darwin`){let e=await a(`ComputerName`);if(e)return e;let t=await a(`LocalHostName`);if(t)return t}return o()})(),i)}async function c(e,t,n){let r=typeof t==`number`&&Number.isFinite(t)?Math.max(1,Math.floor(t)):void 0;if(!r)return await e(void 0);let i=new AbortController,a=Error(`${n??`request`} timed out`),o=setTimeout(()=>i.abort(a),r);o.unref?.();let s,c=i.signal.aborted?Promise.reject(i.signal.reason??a):new Promise((e,t)=>{s=()=>t(i.signal.reason??a),i.signal.addEventListener(`abort`,s,{once:!0})});try{return await Promise.race([e(i.signal),c])}finally{clearTimeout(o),s&&i.signal.removeEventListener(`abort`,s)}}export{s as n,c as t};
2
+ //# sourceMappingURL=with-timeout-WveKxvFV.js.map
@@ -1 +1,2 @@
1
1
  import{execFile as e}from"node:child_process";import t from"node:os";import{promisify as n}from"node:util";const r=n(e);let i=null;async function a(e){try{let{stdout:t}=await r(`/usr/sbin/scutil`,[`--get`,e],{timeout:1e3,windowsHide:!0}),n=String(t??``).trim();return n.length>0?n:null}catch{return null}}function o(){return t.hostname().replace(/\.local$/i,``).trim()||`openclaw`}async function s(){return i||(i=(async()=>{if(process.env.VITEST)return o();if(process.platform===`darwin`){let e=await a(`ComputerName`);if(e)return e;let t=await a(`LocalHostName`);if(t)return t}return o()})(),i)}async function c(e,t,n){let r=typeof t==`number`&&Number.isFinite(t)?Math.max(1,Math.floor(t)):void 0;if(!r)return await e(void 0);let i=new AbortController,a=Error(`${n??`request`} timed out`),o=setTimeout(()=>i.abort(a),r);o.unref?.();let s,c=i.signal.aborted?Promise.reject(i.signal.reason??a):new Promise((e,t)=>{s=()=>t(i.signal.reason??a),i.signal.addEventListener(`abort`,s,{once:!0})});try{return await Promise.race([e(i.signal),c])}finally{clearTimeout(o),s&&i.signal.removeEventListener(`abort`,s)}}export{s as n,c as t};
2
+ //# sourceMappingURL=with-timeout-c1CzdShT.js.map