@qqbrowser/openclaw-qbot 0.0.128 → 0.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1471) hide show
  1. package/dist/account-lookup-CW-_CL7y.js +1 -1
  2. package/dist/acp-cli-01SGjPGi.js +1 -1
  3. package/dist/acp-cli-uxN405XG.js +1 -1
  4. package/dist/active-listener-BZ6loNaF.js +1 -1
  5. package/dist/active-listener-D8VOdVx3.js +1 -1
  6. package/dist/active-listener-DB5mhDuO.js +1 -1
  7. package/dist/active-listener-DeKRt_UV.js +1 -1
  8. package/dist/agent-scope-DAWJwFfl.js +1 -1
  9. package/dist/agent-scope-DXZc3eNT.js +1 -1
  10. package/dist/agents-BMh3ZeoB.js +1 -1
  11. package/dist/agents.config-B-0lZSmb.js +1 -1
  12. package/dist/agents.config-BDEN2Eph.js +1 -1
  13. package/dist/allow-from-B6dI7oz8.js +1 -1
  14. package/dist/allow-from-DEeVIPKS.js +1 -1
  15. package/dist/api-BeG0ObSq.js +1 -1
  16. package/dist/api-Dx8x1KTs.js +1 -1
  17. package/dist/api-key-rotation-C_MG2y1D.js +1 -1
  18. package/dist/api-key-rotation-D8WsZ43x.js +1 -1
  19. package/dist/api-key-rotation-DYYvcqSG.js +1 -1
  20. package/dist/api-key-rotation-dNu0GxPN.js +1 -1
  21. package/dist/arg-split-BOqSMBuf.js +1 -1
  22. package/dist/arg-split-DE5RqDHq.js +1 -1
  23. package/dist/audio-preflight--K4-eUVY.js +1 -1
  24. package/dist/audio-preflight-BKIm58PG.js +1 -1
  25. package/dist/audio-preflight-CAfi10dl.js +1 -1
  26. package/dist/audio-preflight-Xm0NL5JA.js +1 -1
  27. package/dist/audio-transcription-runner-BJNP7vB8.js +1 -1
  28. package/dist/audio-transcription-runner-BUsb6cqv.js +1 -1
  29. package/dist/audio-transcription-runner-C_31Yoq0.js +1 -1
  30. package/dist/audio-transcription-runner-CjKLRVPo.js +1 -1
  31. package/dist/audit-7DFnKINd.js +1 -1
  32. package/dist/audit-B6LsW3Ai.js +1 -1
  33. package/dist/audit-membership-runtime-BpRsMj5-.js +1 -1
  34. package/dist/audit-membership-runtime-BsfLZNBj.js +1 -1
  35. package/dist/audit-membership-runtime-DRHirRmx.js +1 -1
  36. package/dist/audit-membership-runtime-g0dEWJTp.js +1 -1
  37. package/dist/audit-membership-runtime-kdyToskD.js +1 -1
  38. package/dist/auth-choice-BNd2SNjJ.js +1 -1
  39. package/dist/auth-choice-C3aUWXx9.js +1 -1
  40. package/dist/auth-choice-DViEjgMg.js +1 -1
  41. package/dist/auth-choice-edozMf7r.js +1 -1
  42. package/dist/auth-choice-options-B3WQyS7I.js +1 -1
  43. package/dist/auth-choice-options-Dw14noox.js +1 -1
  44. package/dist/auth-choice-prompt-uegl56cf.js +1 -1
  45. package/dist/auth-choice-prompt-xYj13czb.js +1 -1
  46. package/dist/auth-choice.apply-helpers-CNLYnRxx.js +1 -1
  47. package/dist/auth-choice.apply-helpers-DCe5nTyP.js +1 -1
  48. package/dist/auth-profiles-BhXA8Jy2.js +1 -1
  49. package/dist/auth-token-C75IOb_K.js +1 -1
  50. package/dist/auth-token-CzgZf-ta.js +1 -1
  51. package/dist/banner-mIDEloRy.js +1 -1
  52. package/dist/bonjour-discovery-CpvzLjyB.js +1 -1
  53. package/dist/bonjour-discovery-wsh3Si1Q.js +1 -1
  54. package/dist/boolean-Ch3DfXPy.js +1 -1
  55. package/dist/boolean-D15s2V33.js +1 -1
  56. package/dist/boolean-DypnRoRK.js +1 -1
  57. package/dist/brew-COcDl8CB.js +1 -1
  58. package/dist/brew-DDPm_HfE.js +1 -1
  59. package/dist/browser-cli-BjzNbvF9.js +1 -1
  60. package/dist/browser-cli-CgHkgtgV.js +1 -1
  61. package/dist/build-info.json +2 -2
  62. package/dist/bundled/boot-md/handler.js +1 -1
  63. package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
  64. package/dist/bundled/command-logger/handler.js +1 -1
  65. package/dist/bundled/session-memory/handler.js +1 -1
  66. package/dist/call-BA3O_Qpl.js +1 -1
  67. package/dist/call-BQT0zCgv.js +1 -1
  68. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  69. package/dist/channel-account-context-BMPAMZEv.js +1 -1
  70. package/dist/channel-account-context-DAcarnqW.js +1 -1
  71. package/dist/channel-activity-B04WbrrK.js +1 -1
  72. package/dist/channel-activity-BPRCQpI6.js +1 -1
  73. package/dist/channel-activity-D2VTmenR.js +1 -1
  74. package/dist/channel-activity-DHY5wAyl.js +1 -1
  75. package/dist/channel-activity-DYpm-0Cz.js +1 -1
  76. package/dist/channel-options-BYmHreMn.js +1 -1
  77. package/dist/channel-options-Cbv7VETu.js +1 -1
  78. package/dist/channel-selection-Ddyykqxv.js +1 -1
  79. package/dist/channel-selection-oRONo9z3.js +1 -1
  80. package/dist/channel-web-CK4RqVCH.js +1 -1
  81. package/dist/channel-web-Xw89Exy3.js +1 -1
  82. package/dist/channels/plugins/actions/discord.js +1 -1
  83. package/dist/channels/plugins/actions/signal.js +1 -1
  84. package/dist/channels/plugins/actions/telegram.js +1 -1
  85. package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -1
  86. package/dist/channels-cli-D2y5Xk5i.js +1 -1
  87. package/dist/channels-cli-cwFjBXcP.js +1 -1
  88. package/dist/channels-status-issues-8eFrGKyf.js +1 -1
  89. package/dist/channels-status-issues-PRgOT90w.js +1 -1
  90. package/dist/chat-envelope-Bznn2SoS.js +1 -1
  91. package/dist/chat-envelope-HVpKusFc.js +1 -1
  92. package/dist/clack-prompter-DBPdGdqp.js +1 -1
  93. package/dist/clack-prompter-Dq0aY6iM.js +1 -1
  94. package/dist/clawbot-cli-BwG1-8A9.js +1 -1
  95. package/dist/clawbot-cli-CaNu5A0G.js +1 -1
  96. package/dist/cleanup-utils-BWm70DoD.js +1 -1
  97. package/dist/cleanup-utils-D-RhEX6F.js +1 -1
  98. package/dist/cli-CQKA38bc.js +1 -1
  99. package/dist/cli-i7P4bYBg.js +1 -1
  100. package/dist/cli-utils-BY7dLMFy.js +1 -1
  101. package/dist/cli-utils-BleB1eys.js +1 -1
  102. package/dist/clipboard-Bk8cviBt.js +1 -1
  103. package/dist/clipboard-CKT_VIkG.js +1 -1
  104. package/dist/cmd-argv-BBT5l8AV.js +1 -1
  105. package/dist/cmd-argv-Bh-KpaZ0.js +1 -1
  106. package/dist/command-format-BbDT1tlm.js +1 -1
  107. package/dist/command-format-CLxIPuLR.js +1 -1
  108. package/dist/command-options-BpOUDl2S.js +1 -1
  109. package/dist/command-options-Bq5nQxz6.js +1 -1
  110. package/dist/command-poll-backoff-BZLHYB2k.js +1 -1
  111. package/dist/command-poll-backoff-Cww_r-24.js +1 -1
  112. package/dist/command-poll-backoff-Df6cOQrX.js +1 -1
  113. package/dist/command-poll-backoff-endAPdwn.js +1 -1
  114. package/dist/command-registry-BYk36N_R.js +1 -1
  115. package/dist/command-secret-targets-BBTiqQKa.js +1 -1
  116. package/dist/command-secret-targets-KM3OecbM.js +1 -1
  117. package/dist/commands-CGpM84iR.js +1 -1
  118. package/dist/commands-Dy7duWlt.js +1 -1
  119. package/dist/commands-registry-B3FI6TSl.js +1 -1
  120. package/dist/commands-registry-CxDVU5s9.js +1 -1
  121. package/dist/commands-registry-Dn2uuNuy.js +1 -1
  122. package/dist/commands-registry-Du79fdAL.js +1 -1
  123. package/dist/compact-CuBCVnVS.js +1 -1
  124. package/dist/completion-cli-CRNTbZlR.js +1 -1
  125. package/dist/completion-cli-DbGDCoiM.js +1 -1
  126. package/dist/config-BqW5S1xL.js +1 -1
  127. package/dist/config-DAQjvwZw.js +1 -1
  128. package/dist/config-cli-D_coAWd9.js +1 -1
  129. package/dist/config-cli-EKXoNzLf.js +1 -1
  130. package/dist/config-guard-U0wlYLUN.js +1 -1
  131. package/dist/config-guard-XayIkveC.js +1 -1
  132. package/dist/config-validation-B0nN9egx.js +1 -1
  133. package/dist/config-validation-CAHnpjrk.js +1 -1
  134. package/dist/configure-DNnQRKy8.js +1 -1
  135. package/dist/configure-NCNskZPe.js +1 -1
  136. package/dist/connection-auth-BcPbGyxw.js +1 -1
  137. package/dist/connection-auth-DZ-3Svr_.js +1 -1
  138. package/dist/context-window-guard-7crlatf9.js +1 -1
  139. package/dist/context-window-guard-CPChk363.js +1 -1
  140. package/dist/control-ui/apple-touch-icon.png +0 -0
  141. package/dist/control-ui/assets/de-DuUYLvt1.js +1 -0
  142. package/dist/control-ui/assets/es-DHtyqUQZ.js +1 -0
  143. package/dist/control-ui/assets/index-CYbiPp9k.js +8383 -0
  144. package/dist/control-ui/assets/index-C_GaJ8wS.css +1 -0
  145. package/dist/control-ui/assets/pt-BR-D2dJb9G8.js +1 -0
  146. package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js +1 -0
  147. package/dist/control-ui/assets/zh-TW-cW5xB87I.js +1 -0
  148. package/dist/control-ui/favicon-32.png +0 -0
  149. package/dist/control-ui/favicon.ico +0 -0
  150. package/dist/control-ui/favicon.svg +22 -0
  151. package/dist/control-ui/index.html +17 -0
  152. package/dist/control-ui-assets-BIa0GGDg.js +1 -1
  153. package/dist/control-ui-assets-CTHGGgaX.js +1 -1
  154. package/dist/cron-cli-Cro66JtU.js +1 -1
  155. package/dist/cron-cli-DIeBukvk.js +1 -1
  156. package/dist/daemon-cli-Cw_fxNgE.js +1 -1
  157. package/dist/daemon-cli-DQsKS3pT.js +1 -1
  158. package/dist/daemon-cli.js +1 -1
  159. package/dist/daemon-install-C_DmJEkV.js +1 -1
  160. package/dist/daemon-install-D1DacLbM.js +1 -1
  161. package/dist/daemon-install-plan.shared-BSDdwWjB.js +1 -1
  162. package/dist/daemon-install-plan.shared-Dx3DBXCG.js +1 -1
  163. package/dist/daemon-runtime-DHiDbRuC.js +1 -1
  164. package/dist/daemon-runtime-VcpeBRJV.js +1 -1
  165. package/dist/dangerous-name-matching-BOmvAibz.js +1 -1
  166. package/dist/dangerous-name-matching-DtllRqBD.js +1 -1
  167. package/dist/dangerous-tools-CFRYQJ6V.js +1 -1
  168. package/dist/dangerous-tools-oYCu5wfC.js +1 -1
  169. package/dist/deliver-2c-EsQ_W.js +1 -1
  170. package/dist/deliver-BudDnEIb.js +1 -1
  171. package/dist/deliver-COKdxPmA.js +1 -1
  172. package/dist/deliver-DHP2vHKB.js +1 -1
  173. package/dist/delivery-queue-CKbauSFq.js +1 -1
  174. package/dist/delivery-queue-nkPJu0fY.js +1 -1
  175. package/dist/device-pairing-4eDo43Kk.js +1 -1
  176. package/dist/device-pairing-B7ZXiXp3.js +1 -1
  177. package/dist/devices-cli-BXUIb_UN.js +1 -1
  178. package/dist/devices-cli-D7PkbnHO.js +1 -1
  179. package/dist/diagnostic-Bzd5vlKH.js +1 -1
  180. package/dist/diagnostic-CFmHdXHP.js +1 -1
  181. package/dist/diagnostic-CW_Jv5UM.js +1 -1
  182. package/dist/diagnostic-Dza7-pMC.js +1 -1
  183. package/dist/diagnostics-BgbeL9KE.js +1 -1
  184. package/dist/diagnostics-Cdctg9K_.js +1 -1
  185. package/dist/directory-cli-CxeuNJcC.js +1 -1
  186. package/dist/directory-cli-DFlYCB5L.js +1 -1
  187. package/dist/dns-cli-BDbHznhi.js +1 -1
  188. package/dist/dns-cli-OuwliJ60.js +1 -1
  189. package/dist/docs-cli-Cdw9Iz9a.js +1 -1
  190. package/dist/docs-cli-ClD2UyX1.js +1 -1
  191. package/dist/doctor-completion-BSOX-LSq.js +1 -1
  192. package/dist/doctor-completion-DXqdpdlo.js +1 -1
  193. package/dist/doctor-config-flow-DHB8N7tT.js +1 -1
  194. package/dist/doctor-config-flow-MjfHBDlw.js +1 -1
  195. package/dist/enable-DVuqWT2a.js +1 -1
  196. package/dist/enable-DWaSH1HY.js +1 -1
  197. package/dist/entry-status-CCwwKO43.js +1 -1
  198. package/dist/entry-status-CoXkbJcX.js +1 -1
  199. package/dist/entry.js +1 -1
  200. package/dist/env-D7wNuBx1.js +1 -1
  201. package/dist/env-overrides-DHtB4kK3.js +1 -1
  202. package/dist/env-overrides-DXJbFrwI.js +1 -1
  203. package/dist/errors-6SQWM9dj.js +1 -1
  204. package/dist/errors-Bunti32V.js +1 -1
  205. package/dist/exec-B3eleY5O.js +1 -1
  206. package/dist/exec-DHqLtFYt.js +1 -1
  207. package/dist/exec-approvals-BXO9Cezj.js +1 -1
  208. package/dist/exec-approvals-BpBNEy6i.js +1 -1
  209. package/dist/exec-approvals-allowlist-BKFaHvA5.js +1 -1
  210. package/dist/exec-approvals-allowlist-DBh9Pm77.js +1 -1
  211. package/dist/exec-approvals-cli-0neCwpk-.js +1 -1
  212. package/dist/exec-approvals-cli-BuHSw09B.js +1 -1
  213. package/dist/exec-safe-bin-runtime-policy-Ck3GO5AB.js +1 -1
  214. package/dist/exec-safe-bin-runtime-policy-D2WexijZ.js +1 -1
  215. package/dist/fetch-BI3CnKE3.js +1 -1
  216. package/dist/fetch-BJT3BrkJ.js +1 -1
  217. package/dist/fetch-Bn0mWg6a.js +1 -1
  218. package/dist/fetch-CY5G3PDq.js +1 -1
  219. package/dist/fetch-Ce-scEU-.js +1 -1
  220. package/dist/fetch-D0rZDHKO.js +1 -1
  221. package/dist/fetch-DHo17YmK.js +1 -1
  222. package/dist/fetch-Dh-apy46.js +1 -1
  223. package/dist/fetch-Dikjvc5M.js +1 -1
  224. package/dist/fetch-DsjPfQlp.js +1 -1
  225. package/dist/fetch-_g8lZ8K8.js +1 -1
  226. package/dist/fetch-guard-BaRbr_V6.js +1 -1
  227. package/dist/fetch-guard-BmNIhXP-.js +1 -1
  228. package/dist/fetch-guard-ChVqc0HF.js +1 -1
  229. package/dist/fetch-guard-Cji70DJW.js +1 -1
  230. package/dist/fetch-hy0JKSsm.js +1 -1
  231. package/dist/fetch-timeout-CdYxWG9w.js +1 -1
  232. package/dist/fetch-timeout-Cj8_oAls.js +1 -1
  233. package/dist/fetch-timeout-DoOI_izT.js +1 -1
  234. package/dist/fetch-timeout-u8g99Ax0.js +1 -1
  235. package/dist/fetch-xT2jRpqs.js +1 -1
  236. package/dist/format-Bn1bwJKX.js +1 -1
  237. package/dist/format-Ce7I7s-k.js +1 -1
  238. package/dist/format-duration-C8AzNqKh.js +1 -1
  239. package/dist/format-duration-D5AMtmHa.js +1 -1
  240. package/dist/format-relative-B9pSIdGe.js +1 -1
  241. package/dist/format-relative-DkMjYy7z.js +1 -1
  242. package/dist/frontmatter-BkZkwkVO.js +1 -1
  243. package/dist/frontmatter-C7mzDNxd.js +1 -1
  244. package/dist/frontmatter-CzpfPBFl.js +1 -1
  245. package/dist/gateway-cli-Bj-BYgGN.js +1 -1
  246. package/dist/gateway-cli-DP65otLl.js +1 -1
  247. package/dist/gateway-install-token-BIqlEgy0.js +1 -1
  248. package/dist/gateway-install-token-CtUJl3A3.js +1 -1
  249. package/dist/gateway-rpc-DJHjmEZz.js +1 -1
  250. package/dist/gateway-rpc-XRAMeV67.js +1 -1
  251. package/dist/github-copilot-token-C79yeDKS.js +1 -1
  252. package/dist/github-copilot-token-DGYAlOmV.js +1 -1
  253. package/dist/github-copilot-token-DePP-lIf.js +1 -1
  254. package/dist/github-copilot-token-wm6mbypz.js +1 -1
  255. package/dist/gmail-setup-utils-CYOH3zzx.js +1 -1
  256. package/dist/gmail-setup-utils-S-MyEGuj.js +1 -1
  257. package/dist/group-access-BHKVOhrj.js +1 -1
  258. package/dist/group-access-D2DOYMfr.js +1 -1
  259. package/dist/health-Bedsiigi.js +1 -1
  260. package/dist/health-Cy_CvKbX.js +1 -1
  261. package/dist/health-format-B1nj3Wfn.js +1 -1
  262. package/dist/health-format-VBr6LEpt.js +1 -1
  263. package/dist/heartbeat-visibility-BQ_esv2m.js +1 -1
  264. package/dist/heartbeat-visibility-q74UdY8O.js +1 -1
  265. package/dist/help-format-B4aEI7V9.js +1 -1
  266. package/dist/help-format-BRbF_INg.js +1 -1
  267. package/dist/helpers-COz1ghcB.js +1 -1
  268. package/dist/helpers-Cp8gcO6u.js +1 -1
  269. package/dist/hooks-cli-DrnH2iDk.js +1 -1
  270. package/dist/hooks-cli-DvfZKyZl.js +1 -1
  271. package/dist/hooks-status-BHt-Xvh4.js +1 -1
  272. package/dist/hooks-status-CRJ4J0ZW.js +1 -1
  273. package/dist/image-BJC11A7e.js +1 -1
  274. package/dist/image-BKPxWO_2.js +1 -1
  275. package/dist/image-Ba-mOMMV.js +1 -1
  276. package/dist/image-D-R3N1it.js +1 -1
  277. package/dist/index.js +1 -1
  278. package/dist/inspect-BKV-I1UE.js +1 -1
  279. package/dist/inspect-z59cgmYc.js +1 -1
  280. package/dist/install-safe-path-C6kc_8NW.js +1 -1
  281. package/dist/install-safe-path-iesxijn2.js +1 -1
  282. package/dist/installs-BNeI_oML.js +1 -1
  283. package/dist/installs-C1xQLuby.js +1 -1
  284. package/dist/ipv4-BXZDlz5C.js +1 -1
  285. package/dist/ipv4-BnPLbv6y.js +1 -1
  286. package/dist/ir-BYCrFFZ9.js +1 -1
  287. package/dist/ir-CH7YvSi9.js +1 -1
  288. package/dist/ir-CSysIkNU.js +1 -1
  289. package/dist/ir-CZdZsdnI.js +1 -1
  290. package/dist/is-main-DG5ueqhF.js +1 -1
  291. package/dist/issue-format-CpTuk_rQ.js +1 -1
  292. package/dist/issue-format-kj7FXHhi.js +1 -1
  293. package/dist/kill-tree-DBJW8_Q-.js +1 -1
  294. package/dist/lifecycle-core-B72WHNHV.js +1 -1
  295. package/dist/lifecycle-core-dhkH_Nux.js +1 -1
  296. package/dist/line/accounts.js +1 -1
  297. package/dist/line/send.js +1 -1
  298. package/dist/line/template-messages.js +1 -1
  299. package/dist/links-CBnmRP9D.js +1 -1
  300. package/dist/links-CySwdMcF.js +1 -1
  301. package/dist/llm-slug-generator.js +1 -1
  302. package/dist/load-options-BsOW74dp.js +1 -1
  303. package/dist/load-options-C7dLuybp.js +1 -1
  304. package/dist/load-options-DV4j6Aqb.js +1 -1
  305. package/dist/load-options-Dwt0CeEg.js +1 -1
  306. package/dist/local-roots-Dxioh0C2.js +1 -1
  307. package/dist/logger-5W0OocJW.js +1 -1
  308. package/dist/logger-Bl8URnrW.js +1 -1
  309. package/dist/logger-DwWqfo66.js +1 -1
  310. package/dist/logger-kQAOe3qp.js +1 -1
  311. package/dist/logging-Dz4Qg6th.js +1 -1
  312. package/dist/logging-KiJmOmw4.js +1 -1
  313. package/dist/login-BMZxDYaU.js +1 -1
  314. package/dist/login-BdzP8F8J.js +1 -1
  315. package/dist/login-BzU0cMck.js +1 -1
  316. package/dist/login-Cb1A6qwM.js +1 -1
  317. package/dist/login-qr-BgsmAwKm.js +1 -1
  318. package/dist/login-qr-Bux8gWTO.js +1 -1
  319. package/dist/login-qr-COr_25Hx.js +1 -1
  320. package/dist/login-qr-CxBPOOAK.js +1 -1
  321. package/dist/login-qr-DnQm7bM4.js +1 -1
  322. package/dist/logs-cli-BM2XCmrH.js +1 -1
  323. package/dist/logs-cli-HKhyxaUs.js +1 -1
  324. package/dist/manager-B6zZuJEB.js +1 -1
  325. package/dist/manager-BwrZfep3.js +1 -1
  326. package/dist/manager-C5SBozw4.js +1 -1
  327. package/dist/manager-CjihRbGa.js +1 -1
  328. package/dist/memory-cli-CnruTL1h.js +1 -1
  329. package/dist/memory-cli-DHvscp7X.js +1 -1
  330. package/dist/model-catalog-BLdaFmIo.js +1 -1
  331. package/dist/model-catalog-vNCcsy4h.js +1 -1
  332. package/dist/model-param-b-B0r2cPDw.js +1 -1
  333. package/dist/model-param-b-BqIr5rY5.js +1 -1
  334. package/dist/model-picker-BaeW3tiV.js +1 -1
  335. package/dist/model-picker-DN0czUYS.js +1 -1
  336. package/dist/model-selection-C2QwHmXT.js +1 -1
  337. package/dist/model-selection-I1ctjFOB.js +1 -1
  338. package/dist/model-selection-qkByRv5A.js +1 -1
  339. package/dist/models-UTdl0vXO.js +1 -1
  340. package/dist/models-cli-QRONP7EL.js +1 -1
  341. package/dist/models-cli-vRoB_gfX.js +1 -1
  342. package/dist/models-config-CWIlroKT.js +1 -1
  343. package/dist/models-config-DN2Q51fC.js +1 -1
  344. package/dist/mutable-allowlist-detectors-C4rNVag8.js +1 -1
  345. package/dist/mutable-allowlist-detectors-CL0qe54J.js +1 -1
  346. package/dist/node-cli-2-E4-83G.js +1 -1
  347. package/dist/node-cli-DUI7Zctj.js +1 -1
  348. package/dist/node-command-policy-Bbmnc16l.js +1 -1
  349. package/dist/node-command-policy-DgkwfoCs.js +1 -1
  350. package/dist/node-commands-8GBOiktk.js +1 -1
  351. package/dist/node-commands-DdkziOTx.js +1 -1
  352. package/dist/node-resolve-B3BJbmQX.js +1 -1
  353. package/dist/node-resolve-DLZf3-1V.js +1 -1
  354. package/dist/node-service-BRfrNp8l.js +1 -1
  355. package/dist/node-service-C0bl7jcZ.js +1 -1
  356. package/dist/node-shell-dXp4vk-i.js +1 -1
  357. package/dist/nodes-cli-DU13-dCL.js +1 -1
  358. package/dist/nodes-cli-rPeIRj_f.js +1 -1
  359. package/dist/nodes-screen-C7-5RrbN.js +1 -1
  360. package/dist/note-D4GAwgha.js +1 -1
  361. package/dist/note-Dp-d_utk.js +1 -1
  362. package/dist/npm-pack-install-B23L-AtF.js +1 -1
  363. package/dist/npm-pack-install-C0te3Oap.js +1 -1
  364. package/dist/npm-resolution-BCXCw93f.js +1 -1
  365. package/dist/npm-resolution-Cmm82lui.js +1 -1
  366. package/dist/oauth-env-DAamJ1oz.js +1 -1
  367. package/dist/oauth-env-DSLBTWb1.js +1 -1
  368. package/dist/oauth-tls-preflight-BSBRDIfC.js +1 -1
  369. package/dist/oauth-tls-preflight-ByNjbUR5.js +1 -1
  370. package/dist/ollama-setup-CKt3tF-S.js +1 -1
  371. package/dist/ollama-setup-I8lghdX1.js +1 -1
  372. package/dist/onboard-B3WSjKCu.js +1 -1
  373. package/dist/onboard-C65vdb94.js +1 -1
  374. package/dist/onboard-channels-9CmG3Jgn.js +1 -1
  375. package/dist/onboard-channels-CV1AK9jY.js +1 -1
  376. package/dist/onboard-config-B7U20YRw.js +1 -1
  377. package/dist/onboard-config-DS9dUv8M.js +1 -1
  378. package/dist/onboard-custom-CwHYUB0T.js +1 -1
  379. package/dist/onboard-custom-uwufXtQf.js +1 -1
  380. package/dist/onboard-helpers-CGJLUoxR.js +1 -1
  381. package/dist/onboard-helpers-DbpWQoiB.js +1 -1
  382. package/dist/onboard-hooks-CERzXObm.js +1 -1
  383. package/dist/onboard-hooks-gQ3sxBNi.js +1 -1
  384. package/dist/onboard-provider-auth-flags-CqbipO7D.js +1 -1
  385. package/dist/onboard-provider-auth-flags-Dvwzdz37.js +1 -1
  386. package/dist/onboard-remote-BeDZ_gbH.js +1 -1
  387. package/dist/onboard-remote-KTUx-3G1.js +1 -1
  388. package/dist/onboard-search-f2tJD4hg.js +1 -1
  389. package/dist/onboard-search-fslKKhyg.js +1 -1
  390. package/dist/onboard-skills-BoS_oVdm.js +1 -1
  391. package/dist/onboard-skills-C4omGWoD.js +1 -1
  392. package/dist/onboarding-B8icigkk.js +1 -1
  393. package/dist/onboarding-BJRqNsZ8.js +1 -1
  394. package/dist/onboarding.finalize-D0qISqn-.js +1 -1
  395. package/dist/onboarding.finalize-Ds9NwPBL.js +1 -1
  396. package/dist/onboarding.gateway-config-F8n_QFUR.js +1 -1
  397. package/dist/onboarding.gateway-config-eno73eHw.js +1 -1
  398. package/dist/onboarding.secret-input-B6fzeucQ.js +1 -1
  399. package/dist/onboarding.secret-input-CBuD3c32.js +1 -1
  400. package/dist/openai-codex-model-default-Df2T3foI.js +1 -1
  401. package/dist/openai-codex-model-default-DtIeKJm0.js +1 -1
  402. package/dist/openai-model-default-DIE55yBt.js +1 -1
  403. package/dist/openai-model-default-sqvWk4kB.js +1 -1
  404. package/dist/openclaw-exec-env-BWbOu_YC.js +1 -1
  405. package/dist/openclaw-root-CnsBf6ZU.js +1 -1
  406. package/dist/openclaw-root-D_0Q6--h.js +1 -1
  407. package/dist/outbound-B88MLJN3.js +1 -1
  408. package/dist/outbound-C-4qToKv.js +1 -1
  409. package/dist/outbound-CSk4oF0g.js +1 -1
  410. package/dist/outbound-DKMI_4xm.js +1 -1
  411. package/dist/outbound-attachment-BOax42-M.js +1 -1
  412. package/dist/outbound-attachment-DBNxdLYh.js +1 -1
  413. package/dist/outbound-attachment-DVjJQ3V6.js +1 -1
  414. package/dist/outbound-attachment-aZWcoZ-N.js +1 -1
  415. package/dist/pairing-cli-Cby6Ww8F.js +1 -1
  416. package/dist/pairing-cli-DiJb_a0V.js +1 -1
  417. package/dist/pairing-labels-BP1h0iHy.js +1 -1
  418. package/dist/pairing-labels-ryOnuOFA.js +1 -1
  419. package/dist/pairing-store-Bv4KSELv.js +1 -1
  420. package/dist/pairing-store-CjTPxq0X.js +1 -1
  421. package/dist/pairing-token-CKX1ds78.js +1 -1
  422. package/dist/pairing-token-CX0SUJsB.js +1 -1
  423. package/dist/parse-duration-XTjMKl8s.js +1 -1
  424. package/dist/parse-finite-number-DqzUM-_s.js +1 -1
  425. package/dist/parse-finite-number-dBmDLLKL.js +1 -1
  426. package/dist/parse-log-line-CsYLg7Qu.js +1 -1
  427. package/dist/parse-log-line-NV-cipB_.js +1 -1
  428. package/dist/parse-port-Bv1Y9Wk5.js +1 -1
  429. package/dist/parse-port-JVwkxcZ8.js +1 -1
  430. package/dist/parse-timeout-DWSGfCkQ.js +1 -1
  431. package/dist/parse-timeout-Dx4QnVzo.js +1 -1
  432. package/dist/path-alias-guards-kY_ZbWs-.js +1 -1
  433. package/dist/path-alias-guards-mvyLCPlN.js +1 -1
  434. package/dist/path-env-BPd1Yd-i.js +1 -1
  435. package/dist/path-env-emdAQejM.js +1 -1
  436. package/dist/path-safety-BukYK8Kd.js +1 -1
  437. package/dist/path-safety-DaaMJFdt.js +1 -1
  438. package/dist/paths-B4IRk3wi.js +1 -1
  439. package/dist/paths-BfjJY2VL.js +1 -1
  440. package/dist/paths-BjD3T_xq.js +1 -1
  441. package/dist/paths-BpQOWYiT.js +1 -1
  442. package/dist/paths-CChBdtE8.js +1 -1
  443. package/dist/paths-CrCoPIVK.js +1 -1
  444. package/dist/paths-piJASC5k.js +1 -1
  445. package/dist/paths-yLEk_25I.js +1 -1
  446. package/dist/pi-embedded-ZEWNj7P5.js +1 -1
  447. package/dist/pi-embedded-bqE4EmdD.js +1 -1
  448. package/dist/pi-model-discovery-6myCPEJE.js +1 -1
  449. package/dist/pi-model-discovery-AiV9h8k6.js +1 -1
  450. package/dist/pi-model-discovery-BzqdozHB.js +1 -1
  451. package/dist/pi-model-discovery-C8YBu6D4.js +1 -1
  452. package/dist/pi-tools.before-tool-call.runtime-CPAJMO7J.js +1 -1
  453. package/dist/pi-tools.before-tool-call.runtime-CYmLHod0.js +1 -1
  454. package/dist/pi-tools.before-tool-call.runtime-CfVqI0Ng.js +1 -1
  455. package/dist/pi-tools.before-tool-call.runtime-D9FlPJ_v.js +1 -1
  456. package/dist/pi-tools.policy-CeSKHaKa.js +1 -1
  457. package/dist/plugin-auto-enable-Cp7L8ko8.js +1 -1
  458. package/dist/plugin-auto-enable-DCOxqfDQ.js +1 -1
  459. package/dist/plugin-install-plan-BobX0y9S.js +1 -1
  460. package/dist/plugin-install-plan-NvDGp0d8.js +1 -1
  461. package/dist/plugin-registry-Fg000e4I.js +1 -1
  462. package/dist/plugin-registry-fm5tDUbE.js +1 -1
  463. package/dist/plugin-sdk/account-id.cjs +1 -1
  464. package/dist/plugin-sdk/account-id.js +1 -1
  465. package/dist/plugin-sdk/acpx.cjs +1 -1
  466. package/dist/plugin-sdk/acpx.js +1 -1
  467. package/dist/plugin-sdk/active-listener-BFeaYGID.js +1 -1
  468. package/dist/plugin-sdk/active-listener-BszCM2Au.cjs +1 -1
  469. package/dist/plugin-sdk/active-listener-CIcleJgU.cjs +1 -1
  470. package/dist/plugin-sdk/active-listener-Cqgd7xVh.cjs +1 -1
  471. package/dist/plugin-sdk/active-listener-D578zEtk.cjs +1 -1
  472. package/dist/plugin-sdk/active-listener-D6gGPLq-.js +1 -1
  473. package/dist/plugin-sdk/active-listener-DKSZRn4x.cjs +1 -1
  474. package/dist/plugin-sdk/active-listener-DNO10F1L.js +1 -1
  475. package/dist/plugin-sdk/active-listener-DQq07Aar.js +1 -1
  476. package/dist/plugin-sdk/active-listener-Dle_kYqb.js +1 -1
  477. package/dist/plugin-sdk/active-listener-DmJcHkMC.js +1 -1
  478. package/dist/plugin-sdk/active-listener-UmFpcYFY.cjs +1 -1
  479. package/dist/plugin-sdk/api-key-rotation-39TRXDEA.cjs +1 -1
  480. package/dist/plugin-sdk/api-key-rotation-7qlqJ_ou.js +1 -1
  481. package/dist/plugin-sdk/api-key-rotation-BY7fLi9z.js +1 -1
  482. package/dist/plugin-sdk/api-key-rotation-CF9_CKS-.cjs +1 -1
  483. package/dist/plugin-sdk/api-key-rotation-CWylhFOt.cjs +1 -1
  484. package/dist/plugin-sdk/api-key-rotation-ClZmonv2.js +1 -1
  485. package/dist/plugin-sdk/api-key-rotation-CmesQWXP.cjs +1 -1
  486. package/dist/plugin-sdk/api-key-rotation-Cs6II2__.js +1 -1
  487. package/dist/plugin-sdk/api-key-rotation-CxaiMcI1.js +1 -1
  488. package/dist/plugin-sdk/api-key-rotation-D5cfmg7E.cjs +1 -1
  489. package/dist/plugin-sdk/api-key-rotation-DkP7KnSm.cjs +1 -1
  490. package/dist/plugin-sdk/api-key-rotation-mDqgBFMG.js +1 -1
  491. package/dist/plugin-sdk/audio-preflight-B-HrF5Oc.js +1 -1
  492. package/dist/plugin-sdk/audio-preflight-B2MGeSoT.js +1 -1
  493. package/dist/plugin-sdk/audio-preflight-BVjiz_Qk.cjs +1 -1
  494. package/dist/plugin-sdk/audio-preflight-Behqe7F3.cjs +1 -1
  495. package/dist/plugin-sdk/audio-preflight-C0ncOCbK.cjs +1 -1
  496. package/dist/plugin-sdk/audio-preflight-C1o1n-KK.js +1 -1
  497. package/dist/plugin-sdk/audio-preflight-CzLYTZ5P.cjs +1 -1
  498. package/dist/plugin-sdk/audio-preflight-DDiBwIB9.js +1 -1
  499. package/dist/plugin-sdk/audio-preflight-DQyh-XSn.cjs +1 -1
  500. package/dist/plugin-sdk/audio-preflight-WH9WDR81.cjs +1 -1
  501. package/dist/plugin-sdk/audio-preflight-ZPLO3G1S.js +1 -1
  502. package/dist/plugin-sdk/audio-preflight-s3BAID12.js +1 -1
  503. package/dist/plugin-sdk/audio-transcription-runner-2-ZQ5Md-.cjs +1 -1
  504. package/dist/plugin-sdk/audio-transcription-runner-BO7T_SzP.cjs +1 -1
  505. package/dist/plugin-sdk/audio-transcription-runner-CRYJlAeP.js +1 -1
  506. package/dist/plugin-sdk/audio-transcription-runner-CmW24oVR.js +1 -1
  507. package/dist/plugin-sdk/audio-transcription-runner-CmYuWS0_.cjs +1 -1
  508. package/dist/plugin-sdk/audio-transcription-runner-CslXJs5c.js +1 -1
  509. package/dist/plugin-sdk/audio-transcription-runner-DE1tKTQV.cjs +1 -1
  510. package/dist/plugin-sdk/audio-transcription-runner-DZR84B28.js +1 -1
  511. package/dist/plugin-sdk/audio-transcription-runner-DoR-NOcV.cjs +1 -1
  512. package/dist/plugin-sdk/audio-transcription-runner-IE4olXkd.cjs +1 -1
  513. package/dist/plugin-sdk/audio-transcription-runner-YiDQM_Rb.js +1 -1
  514. package/dist/plugin-sdk/audio-transcription-runner-kAVM4YFR.js +1 -1
  515. package/dist/plugin-sdk/audit-membership-runtime-7LqcvqFo.js +1 -1
  516. package/dist/plugin-sdk/audit-membership-runtime-BQFUzFc0.cjs +1 -1
  517. package/dist/plugin-sdk/audit-membership-runtime-BYtdDX9G.cjs +1 -1
  518. package/dist/plugin-sdk/audit-membership-runtime-BzEtBUX6.cjs +1 -1
  519. package/dist/plugin-sdk/audit-membership-runtime-CBUmGrl4.js +1 -1
  520. package/dist/plugin-sdk/audit-membership-runtime-ChlVgt2y.js +1 -1
  521. package/dist/plugin-sdk/audit-membership-runtime-DLRX7LR0.js +1 -1
  522. package/dist/plugin-sdk/audit-membership-runtime-DbJW5X3L.cjs +1 -1
  523. package/dist/plugin-sdk/audit-membership-runtime-Du9LAxDa.cjs +1 -1
  524. package/dist/plugin-sdk/audit-membership-runtime-DylNnj1m.js +1 -1
  525. package/dist/plugin-sdk/audit-membership-runtime-voi5sPwF.js +1 -1
  526. package/dist/plugin-sdk/audit-membership-runtime-yWYvSpgZ.cjs +1 -1
  527. package/dist/plugin-sdk/bluebubbles.cjs +1 -1
  528. package/dist/plugin-sdk/bluebubbles.js +1 -1
  529. package/dist/plugin-sdk/channel-activity-Bed876M5.js +1 -1
  530. package/dist/plugin-sdk/channel-activity-Bu8tAmGa.cjs +1 -1
  531. package/dist/plugin-sdk/channel-activity-C01Im_o1.js +1 -1
  532. package/dist/plugin-sdk/channel-activity-CIycjzUC.js +1 -1
  533. package/dist/plugin-sdk/channel-activity-Cdkn3O_i.js +1 -1
  534. package/dist/plugin-sdk/channel-activity-Cia2G3v5.js +1 -1
  535. package/dist/plugin-sdk/channel-activity-D6d2wU8H.cjs +1 -1
  536. package/dist/plugin-sdk/channel-activity-DNv7JLBx.cjs +1 -1
  537. package/dist/plugin-sdk/channel-activity-Df3DfYyZ.cjs +1 -1
  538. package/dist/plugin-sdk/channel-activity-Rut-HCfT.cjs +1 -1
  539. package/dist/plugin-sdk/channel-activity-mffNSQrX.cjs +1 -1
  540. package/dist/plugin-sdk/channel-activity-qjwFifkE.js +1 -1
  541. package/dist/plugin-sdk/channel-web-Ces_xx2T.js +1 -1
  542. package/dist/plugin-sdk/channel-web-CsmEnYD8.cjs +1 -1
  543. package/dist/plugin-sdk/channel-web-DtzNv49H.cjs +1 -1
  544. package/dist/plugin-sdk/channel-web-VEZVrMYU.js +1 -1
  545. package/dist/plugin-sdk/command-poll-backoff-4910Mpwp.js +1 -1
  546. package/dist/plugin-sdk/command-poll-backoff-BLJZzV5W.cjs +1 -1
  547. package/dist/plugin-sdk/command-poll-backoff-CUNcN0dv.cjs +1 -1
  548. package/dist/plugin-sdk/command-poll-backoff-Cww_r-24.js +1 -1
  549. package/dist/plugin-sdk/command-poll-backoff-D0lJhquZ.js +1 -1
  550. package/dist/plugin-sdk/command-poll-backoff-Glwt3wHa.cjs +1 -1
  551. package/dist/plugin-sdk/commands-registry-33H8WYTk.cjs +1 -1
  552. package/dist/plugin-sdk/commands-registry-BGdm1KdC.js +1 -1
  553. package/dist/plugin-sdk/commands-registry-BgV9i-bj.cjs +1 -1
  554. package/dist/plugin-sdk/commands-registry-BifdCfty.cjs +1 -1
  555. package/dist/plugin-sdk/commands-registry-CJLBIIIp.js +1 -1
  556. package/dist/plugin-sdk/commands-registry-CWK9ARbc.js +1 -1
  557. package/dist/plugin-sdk/commands-registry-CfVD1h8L.cjs +1 -1
  558. package/dist/plugin-sdk/commands-registry-CpG4pxrA.js +1 -1
  559. package/dist/plugin-sdk/commands-registry-D-AnIQWz.cjs +1 -1
  560. package/dist/plugin-sdk/commands-registry-DBI4cPqT.cjs +1 -1
  561. package/dist/plugin-sdk/commands-registry-DOBe9cWq.js +1 -1
  562. package/dist/plugin-sdk/commands-registry-DqemUyiv.js +1 -1
  563. package/dist/plugin-sdk/common-CEe87dmX.js +1 -1
  564. package/dist/plugin-sdk/common-CjMKHm2Z.cjs +1 -1
  565. package/dist/plugin-sdk/compat.cjs +1 -1
  566. package/dist/plugin-sdk/compat.js +1 -1
  567. package/dist/plugin-sdk/config-DT_csBcZ.cjs +1 -1
  568. package/dist/plugin-sdk/config-LR8GH3Ws.js +1 -1
  569. package/dist/plugin-sdk/copilot-proxy.cjs +1 -1
  570. package/dist/plugin-sdk/copilot-proxy.js +1 -1
  571. package/dist/plugin-sdk/core.cjs +1 -1
  572. package/dist/plugin-sdk/core.js +1 -1
  573. package/dist/plugin-sdk/deliver-AORlkcbD.cjs +1 -1
  574. package/dist/plugin-sdk/deliver-BiBFW5fm.cjs +1 -1
  575. package/dist/plugin-sdk/deliver-BpqEPwLO.cjs +1 -1
  576. package/dist/plugin-sdk/deliver-BvC6aUKM.js +1 -1
  577. package/dist/plugin-sdk/deliver-CT0AIuK1.cjs +1 -1
  578. package/dist/plugin-sdk/deliver-CmddcjtG.cjs +1 -1
  579. package/dist/plugin-sdk/deliver-DFz5N1Eh.js +1 -1
  580. package/dist/plugin-sdk/deliver-DcJWpoqf.cjs +1 -1
  581. package/dist/plugin-sdk/deliver-ILim6ANU.js +1 -1
  582. package/dist/plugin-sdk/deliver-QgxW9IxV.js +1 -1
  583. package/dist/plugin-sdk/deliver-cT-Q8v0h.js +1 -1
  584. package/dist/plugin-sdk/deliver-cu_NQTmb.js +1 -1
  585. package/dist/plugin-sdk/device-pair.cjs +1 -1
  586. package/dist/plugin-sdk/device-pair.js +1 -1
  587. package/dist/plugin-sdk/diagnostic-BCyE1aYH.cjs +1 -1
  588. package/dist/plugin-sdk/diagnostic-BFea3l_a.js +1 -1
  589. package/dist/plugin-sdk/diagnostic-BvR96WdC.js +1 -1
  590. package/dist/plugin-sdk/diagnostic-C0xDsk89.cjs +1 -1
  591. package/dist/plugin-sdk/diagnostic-CEPhLgsW.cjs +1 -1
  592. package/dist/plugin-sdk/diagnostic-CbLwUqTE.cjs +1 -1
  593. package/dist/plugin-sdk/diagnostic-CbfxoqI_.cjs +1 -1
  594. package/dist/plugin-sdk/diagnostic-DDwUPG1m.js +1 -1
  595. package/dist/plugin-sdk/diagnostic-DS_mKKOu.js +1 -1
  596. package/dist/plugin-sdk/diagnostic-DYpehqHU.cjs +1 -1
  597. package/dist/plugin-sdk/diagnostic-DkncnZ3G.js +1 -1
  598. package/dist/plugin-sdk/diagnostic-Dz8HPEDe.js +1 -1
  599. package/dist/plugin-sdk/diagnostics-otel.cjs +1 -1
  600. package/dist/plugin-sdk/diagnostics-otel.js +1 -1
  601. package/dist/plugin-sdk/diffs.cjs +1 -1
  602. package/dist/plugin-sdk/diffs.js +1 -1
  603. package/dist/plugin-sdk/discord.cjs +1 -1
  604. package/dist/plugin-sdk/discord.js +1 -1
  605. package/dist/plugin-sdk/dispatch-6m3206FH.js +1 -1
  606. package/dist/plugin-sdk/dispatch-BYZNaz0n.cjs +1 -1
  607. package/dist/plugin-sdk/dispatch-BahZCe-D.js +1 -1
  608. package/dist/plugin-sdk/dispatch-Bi3yeWxb.cjs +1 -1
  609. package/dist/plugin-sdk/dispatch-BjB_TqWy.cjs +1 -1
  610. package/dist/plugin-sdk/dispatch-CNR186B3.js +1 -1
  611. package/dist/plugin-sdk/dispatch-CStT30wi.cjs +1 -1
  612. package/dist/plugin-sdk/dispatch-CdZAW9dg.cjs +1 -1
  613. package/dist/plugin-sdk/dispatch-Ewg2Jgw9.js +1 -1
  614. package/dist/plugin-sdk/dispatch-HRTsdeCV.js +1 -1
  615. package/dist/plugin-sdk/feishu.cjs +1 -1
  616. package/dist/plugin-sdk/feishu.js +1 -1
  617. package/dist/plugin-sdk/fetch-7Iq9POda.js +1 -1
  618. package/dist/plugin-sdk/fetch-B1GR6-u4.js +1 -1
  619. package/dist/plugin-sdk/fetch-B27H-XCf.js +1 -1
  620. package/dist/plugin-sdk/fetch-BMYDLRWo.js +1 -1
  621. package/dist/plugin-sdk/fetch-BN9y3kTg.cjs +1 -1
  622. package/dist/plugin-sdk/fetch-BVEVk5YF.js +1 -1
  623. package/dist/plugin-sdk/fetch-BY6lVRlY.cjs +1 -1
  624. package/dist/plugin-sdk/fetch-Bi8krAaT.cjs +1 -1
  625. package/dist/plugin-sdk/fetch-BjXhwqrE.cjs +1 -1
  626. package/dist/plugin-sdk/fetch-BtZY623f.js +1 -1
  627. package/dist/plugin-sdk/fetch-C-HRWp5R.js +1 -1
  628. package/dist/plugin-sdk/fetch-C3LEMysf.js +1 -1
  629. package/dist/plugin-sdk/fetch-CCLWsYaQ.js +1 -1
  630. package/dist/plugin-sdk/fetch-CZewCAvu.cjs +1 -1
  631. package/dist/plugin-sdk/fetch-ClKErpni.cjs +1 -1
  632. package/dist/plugin-sdk/fetch-DBRI0sKI.js +1 -1
  633. package/dist/plugin-sdk/fetch-DQxuOB8o.cjs +1 -1
  634. package/dist/plugin-sdk/fetch-DUMEaqum.cjs +1 -1
  635. package/dist/plugin-sdk/fetch-DpwR_cJU.cjs +1 -1
  636. package/dist/plugin-sdk/fetch-J0IzopiJ.js +1 -1
  637. package/dist/plugin-sdk/fetch-guard-D8TdhTHU.js +1 -1
  638. package/dist/plugin-sdk/fetch-guard-DC_pFJEy.js +1 -1
  639. package/dist/plugin-sdk/fetch-guard-DDkd30BG.js +1 -1
  640. package/dist/plugin-sdk/fetch-guard-DELiFG5g.js +1 -1
  641. package/dist/plugin-sdk/fetch-guard-DIYjBRpq.cjs +1 -1
  642. package/dist/plugin-sdk/fetch-guard-DPVfELS7.js +1 -1
  643. package/dist/plugin-sdk/fetch-guard-Dpz6CnJY.cjs +1 -1
  644. package/dist/plugin-sdk/fetch-guard-DqNKwgHP.cjs +1 -1
  645. package/dist/plugin-sdk/fetch-guard-DqTxZ3G8.cjs +1 -1
  646. package/dist/plugin-sdk/fetch-guard-EoAitPe9.cjs +1 -1
  647. package/dist/plugin-sdk/fetch-guard-qfU6iTvp.js +1 -1
  648. package/dist/plugin-sdk/fetch-guard-u2Dt6P9i.cjs +1 -1
  649. package/dist/plugin-sdk/fetch-lw-aF17e.cjs +1 -1
  650. package/dist/plugin-sdk/fetch-timeout-6oZsqWxA.js +1 -1
  651. package/dist/plugin-sdk/fetch-timeout-BygUD0rd.cjs +1 -1
  652. package/dist/plugin-sdk/fetch-timeout-CLw1U7VS.js +1 -1
  653. package/dist/plugin-sdk/fetch-timeout-CX1w-9p4.cjs +1 -1
  654. package/dist/plugin-sdk/fetch-timeout-Coc9xyC3.cjs +1 -1
  655. package/dist/plugin-sdk/fetch-timeout-Cz6GuU_c.js +1 -1
  656. package/dist/plugin-sdk/fetch-timeout-DC8T2JCr.js +1 -1
  657. package/dist/plugin-sdk/fetch-timeout-DFDmks9T.cjs +1 -1
  658. package/dist/plugin-sdk/fetch-timeout-DkYpp08Q.js +1 -1
  659. package/dist/plugin-sdk/github-copilot-token-BHdMLLqf.cjs +1 -1
  660. package/dist/plugin-sdk/github-copilot-token-Bt4PduRB.js +1 -1
  661. package/dist/plugin-sdk/github-copilot-token-C1O2cBqk.cjs +1 -1
  662. package/dist/plugin-sdk/github-copilot-token-C1hiDugd.js +1 -1
  663. package/dist/plugin-sdk/github-copilot-token-C8j8_NjX.js +1 -1
  664. package/dist/plugin-sdk/github-copilot-token-CCrgp2py.cjs +1 -1
  665. package/dist/plugin-sdk/github-copilot-token-DoHgkI2r.cjs +1 -1
  666. package/dist/plugin-sdk/github-copilot-token-N8vnLZPw.js +1 -1
  667. package/dist/plugin-sdk/github-copilot-token-TMkfxxD2.cjs +1 -1
  668. package/dist/plugin-sdk/github-copilot-token-vKAKX6iE.js +1 -1
  669. package/dist/plugin-sdk/github-copilot-token-ylX_gawo.js +1 -1
  670. package/dist/plugin-sdk/github-copilot-token-zskwAEpd.cjs +1 -1
  671. package/dist/plugin-sdk/google-gemini-cli-auth.cjs +1 -1
  672. package/dist/plugin-sdk/google-gemini-cli-auth.js +1 -1
  673. package/dist/plugin-sdk/googlechat.cjs +1 -1
  674. package/dist/plugin-sdk/googlechat.js +1 -1
  675. package/dist/plugin-sdk/image-0OHO98b9.cjs +1 -1
  676. package/dist/plugin-sdk/image-B9SLKAOs.cjs +1 -1
  677. package/dist/plugin-sdk/image-BVnZq5Y4.js +1 -1
  678. package/dist/plugin-sdk/image-CKLAyhco.js +1 -1
  679. package/dist/plugin-sdk/image-DUHEJeBF.js +1 -1
  680. package/dist/plugin-sdk/image-DngxW2Nh.cjs +1 -1
  681. package/dist/plugin-sdk/image-DrPh2689.cjs +1 -1
  682. package/dist/plugin-sdk/image-ISWO0Dwt.js +1 -1
  683. package/dist/plugin-sdk/image-KfZYW6Lh.cjs +1 -1
  684. package/dist/plugin-sdk/image-YVlw68CK.js +1 -1
  685. package/dist/plugin-sdk/image-gehqJnV6.js +1 -1
  686. package/dist/plugin-sdk/image-jUYo-0eT.cjs +1 -1
  687. package/dist/plugin-sdk/imessage.cjs +1 -1
  688. package/dist/plugin-sdk/imessage.js +1 -1
  689. package/dist/plugin-sdk/index.cjs +1 -1
  690. package/dist/plugin-sdk/index.js +1 -1
  691. package/dist/plugin-sdk/ir-78toXVqC.cjs +1 -1
  692. package/dist/plugin-sdk/ir-A_TqKaXP.cjs +1 -1
  693. package/dist/plugin-sdk/ir-B0_rUT7m.js +1 -1
  694. package/dist/plugin-sdk/ir-B7agH4cQ.cjs +1 -1
  695. package/dist/plugin-sdk/ir-B9ap_YNW.cjs +1 -1
  696. package/dist/plugin-sdk/ir-BxKSHYao.cjs +1 -1
  697. package/dist/plugin-sdk/ir-BzZArF6l.js +1 -1
  698. package/dist/plugin-sdk/ir-CpkEWZD6.js +1 -1
  699. package/dist/plugin-sdk/ir-D4Dz-giw.cjs +1 -1
  700. package/dist/plugin-sdk/ir-DJ08DSkk.js +1 -1
  701. package/dist/plugin-sdk/ir-L2vhtuGx.js +1 -1
  702. package/dist/plugin-sdk/ir-ntSck5Kp.js +1 -1
  703. package/dist/plugin-sdk/irc.cjs +1 -1
  704. package/dist/plugin-sdk/irc.js +1 -1
  705. package/dist/plugin-sdk/keyed-async-queue.cjs +1 -1
  706. package/dist/plugin-sdk/keyed-async-queue.js +1 -1
  707. package/dist/plugin-sdk/line.cjs +1 -1
  708. package/dist/plugin-sdk/line.js +1 -1
  709. package/dist/plugin-sdk/llm-task.cjs +1 -1
  710. package/dist/plugin-sdk/llm-task.js +1 -1
  711. package/dist/plugin-sdk/load-options-B9Ss5YOO.js +1 -1
  712. package/dist/plugin-sdk/load-options-BOfn6Zgo.cjs +1 -1
  713. package/dist/plugin-sdk/load-options-BXvm8HVv.js +1 -1
  714. package/dist/plugin-sdk/load-options-Bb7u8yZz.cjs +1 -1
  715. package/dist/plugin-sdk/load-options-BcSg1ODN.js +1 -1
  716. package/dist/plugin-sdk/load-options-NqnXJ-Nh.cjs +1 -1
  717. package/dist/plugin-sdk/lobster.cjs +1 -1
  718. package/dist/plugin-sdk/lobster.js +1 -1
  719. package/dist/plugin-sdk/local-roots-B0zm186S.js +1 -1
  720. package/dist/plugin-sdk/local-roots-B4Uy4kG3.cjs +1 -1
  721. package/dist/plugin-sdk/local-roots-CM1R1Ncr.cjs +1 -1
  722. package/dist/plugin-sdk/local-roots-CW78ZeZV.js +1 -1
  723. package/dist/plugin-sdk/local-roots-CnsaE7a_.js +1 -1
  724. package/dist/plugin-sdk/local-roots-D1k-fAlE.cjs +1 -1
  725. package/dist/plugin-sdk/local-roots-DQ_vfJPK.js +1 -1
  726. package/dist/plugin-sdk/local-roots-DYlB1au6.cjs +1 -1
  727. package/dist/plugin-sdk/local-roots-H4-t0qG_.js +1 -1
  728. package/dist/plugin-sdk/local-roots-SCyeUfM3.cjs +1 -1
  729. package/dist/plugin-sdk/local-roots-l4PqCmiU.js +1 -1
  730. package/dist/plugin-sdk/local-roots-xHoEq1Fq.cjs +1 -1
  731. package/dist/plugin-sdk/logger-6O6OsYBL.cjs +1 -1
  732. package/dist/plugin-sdk/logger-BlddiV_d.cjs +1 -1
  733. package/dist/plugin-sdk/logger-Bm93ZKOk.cjs +1 -1
  734. package/dist/plugin-sdk/logger-BtrWb0dj.js +1 -1
  735. package/dist/plugin-sdk/logger-C210xuWx.js +1 -1
  736. package/dist/plugin-sdk/logger-DJGHvDbX.js +1 -1
  737. package/dist/plugin-sdk/logger-DPlqYkRm.cjs +1 -1
  738. package/dist/plugin-sdk/logger-DUYnS-W3.cjs +1 -1
  739. package/dist/plugin-sdk/logger-DwWqfo66.js +1 -1
  740. package/dist/plugin-sdk/logger-vBDTZWl3.js +1 -1
  741. package/dist/plugin-sdk/login-BN1TsFp4.cjs +1 -1
  742. package/dist/plugin-sdk/login-BXUtcSnB.cjs +1 -1
  743. package/dist/plugin-sdk/login-BoMH2iJT.js +1 -1
  744. package/dist/plugin-sdk/login-BtT7yRJO.js +1 -1
  745. package/dist/plugin-sdk/login-COzybMRK.js +1 -1
  746. package/dist/plugin-sdk/login-Cw1jFbel.cjs +1 -1
  747. package/dist/plugin-sdk/login-DEmpr5YK.js +1 -1
  748. package/dist/plugin-sdk/login-Dln00cFs.cjs +1 -1
  749. package/dist/plugin-sdk/login-S2Fe5n5K.cjs +1 -1
  750. package/dist/plugin-sdk/login-TieaF0ts.cjs +1 -1
  751. package/dist/plugin-sdk/login-ZQK4uJLw.js +1 -1
  752. package/dist/plugin-sdk/login-fKxJv0_F.js +1 -1
  753. package/dist/plugin-sdk/login-qr-1ilmySGx.js +1 -1
  754. package/dist/plugin-sdk/login-qr-B0ZSZaNI.js +1 -1
  755. package/dist/plugin-sdk/login-qr-B2P2Ky4j.js +1 -1
  756. package/dist/plugin-sdk/login-qr-B2U87iU8.js +1 -1
  757. package/dist/plugin-sdk/login-qr-B4x_eWI_.js +1 -1
  758. package/dist/plugin-sdk/login-qr-BIaJB24t.cjs +1 -1
  759. package/dist/plugin-sdk/login-qr-BMl5Beq2.cjs +1 -1
  760. package/dist/plugin-sdk/login-qr-Bkm3QorK.cjs +1 -1
  761. package/dist/plugin-sdk/login-qr-ClL8FMAJ.cjs +1 -1
  762. package/dist/plugin-sdk/login-qr-DFVK1lg-.js +1 -1
  763. package/dist/plugin-sdk/login-qr-DhieI9fL.cjs +1 -1
  764. package/dist/plugin-sdk/login-qr-DyQT1QnE.cjs +1 -1
  765. package/dist/plugin-sdk/manager-0tvX3Z_N.cjs +1 -1
  766. package/dist/plugin-sdk/manager-8uylP7PH.cjs +1 -1
  767. package/dist/plugin-sdk/manager-B6hWglXe.js +1 -1
  768. package/dist/plugin-sdk/manager-BGoKN9ur.js +1 -1
  769. package/dist/plugin-sdk/manager-BRP1lzb6.js +1 -1
  770. package/dist/plugin-sdk/manager-BeLNhsXC.cjs +1 -1
  771. package/dist/plugin-sdk/manager-BnytMgmq.js +1 -1
  772. package/dist/plugin-sdk/manager-BoMQeM1I.cjs +1 -1
  773. package/dist/plugin-sdk/manager-CYZY9vcM.js +1 -1
  774. package/dist/plugin-sdk/manager-DCDy2V1U.cjs +1 -1
  775. package/dist/plugin-sdk/manager-DE7sDip8.cjs +1 -1
  776. package/dist/plugin-sdk/manager-PwgQZNK1.js +1 -1
  777. package/dist/plugin-sdk/matrix.cjs +1 -1
  778. package/dist/plugin-sdk/matrix.js +1 -1
  779. package/dist/plugin-sdk/mattermost.cjs +1 -1
  780. package/dist/plugin-sdk/mattermost.js +1 -1
  781. package/dist/plugin-sdk/memory-core.cjs +1 -1
  782. package/dist/plugin-sdk/memory-core.js +1 -1
  783. package/dist/plugin-sdk/minimax-portal-auth.cjs +1 -1
  784. package/dist/plugin-sdk/minimax-portal-auth.js +1 -1
  785. package/dist/plugin-sdk/model-auth-BgS7ynQw.cjs +1 -1
  786. package/dist/plugin-sdk/model-auth-CKlA2xRB.cjs +1 -1
  787. package/dist/plugin-sdk/model-auth-CLnFIqcf.cjs +1 -1
  788. package/dist/plugin-sdk/model-auth-D7YupJDS.js +1 -1
  789. package/dist/plugin-sdk/model-auth-eNVBeC-B.js +1 -1
  790. package/dist/plugin-sdk/model-auth-fJrNIbke.cjs +1 -1
  791. package/dist/plugin-sdk/model-auth-g6eGgTwR.js +1 -1
  792. package/dist/plugin-sdk/model-auth-wcxJptQX.js +1 -1
  793. package/dist/plugin-sdk/model-selection-4ExiFkaW.js +1 -1
  794. package/dist/plugin-sdk/model-selection-CZY_x2-a.cjs +1 -1
  795. package/dist/plugin-sdk/msteams.cjs +1 -1
  796. package/dist/plugin-sdk/msteams.js +1 -1
  797. package/dist/plugin-sdk/nextcloud-talk.cjs +1 -1
  798. package/dist/plugin-sdk/nextcloud-talk.js +1 -1
  799. package/dist/plugin-sdk/nostr.cjs +1 -1
  800. package/dist/plugin-sdk/nostr.js +1 -1
  801. package/dist/plugin-sdk/outbound-2VVSR_d4.js +1 -1
  802. package/dist/plugin-sdk/outbound-B03BQa7T.cjs +1 -1
  803. package/dist/plugin-sdk/outbound-BE8CJ9c_.js +1 -1
  804. package/dist/plugin-sdk/outbound-BWtGs0dn.cjs +1 -1
  805. package/dist/plugin-sdk/outbound-BrD0UsX0.js +1 -1
  806. package/dist/plugin-sdk/outbound-Bvu4LbQx.js +1 -1
  807. package/dist/plugin-sdk/outbound-C5rNt-8z.cjs +1 -1
  808. package/dist/plugin-sdk/outbound-C6BJCoYf.cjs +1 -1
  809. package/dist/plugin-sdk/outbound-Cgc0JJtB.js +1 -1
  810. package/dist/plugin-sdk/outbound-DAHIkpiA.cjs +1 -1
  811. package/dist/plugin-sdk/outbound-DnO_udAm.cjs +1 -1
  812. package/dist/plugin-sdk/outbound-UAHsCNyW.js +1 -1
  813. package/dist/plugin-sdk/outbound-attachment-0QahtSQB.cjs +1 -1
  814. package/dist/plugin-sdk/outbound-attachment-8qvAj1MK.js +1 -1
  815. package/dist/plugin-sdk/outbound-attachment-B6SJy_CG.js +1 -1
  816. package/dist/plugin-sdk/outbound-attachment-BVdSGifg.js +1 -1
  817. package/dist/plugin-sdk/outbound-attachment-C-QqSQ79.cjs +1 -1
  818. package/dist/plugin-sdk/outbound-attachment-CYGrnygD.cjs +1 -1
  819. package/dist/plugin-sdk/outbound-attachment-CtA5eBgj.cjs +1 -1
  820. package/dist/plugin-sdk/outbound-attachment-D8Ng5uVX.cjs +1 -1
  821. package/dist/plugin-sdk/outbound-attachment-DS0S0NLK.js +1 -1
  822. package/dist/plugin-sdk/outbound-attachment-Ds2XsjQl.js +1 -1
  823. package/dist/plugin-sdk/outbound-attachment-acB4qID1.js +1 -1
  824. package/dist/plugin-sdk/outbound-attachment-x4Q2SVIA.cjs +1 -1
  825. package/dist/plugin-sdk/paths-BPlgbwrb.cjs +1 -1
  826. package/dist/plugin-sdk/paths-Bcdg3ma0.cjs +1 -1
  827. package/dist/plugin-sdk/paths-BpQOWYiT.js +1 -1
  828. package/dist/plugin-sdk/paths-BvlJvmRS.cjs +1 -1
  829. package/dist/plugin-sdk/paths-CIcxeNL-.cjs +1 -1
  830. package/dist/plugin-sdk/paths-CXgWvWAM.js +1 -1
  831. package/dist/plugin-sdk/paths-Chp3zwtq.cjs +1 -1
  832. package/dist/plugin-sdk/paths-CnHSNSeR.js +1 -1
  833. package/dist/plugin-sdk/paths-Cqca1YmF.cjs +1 -1
  834. package/dist/plugin-sdk/paths-CtrEseGU.js +1 -1
  835. package/dist/plugin-sdk/paths-D55o_j8-.js +1 -1
  836. package/dist/plugin-sdk/paths-D90l3h_o.cjs +1 -1
  837. package/dist/plugin-sdk/paths-DaRoqzBQ.js +1 -1
  838. package/dist/plugin-sdk/paths-Dd7r1qlB.cjs +1 -1
  839. package/dist/plugin-sdk/paths-DhSjTRMz.js +1 -1
  840. package/dist/plugin-sdk/paths-Do0djuaj.js +1 -1
  841. package/dist/plugin-sdk/paths-J4JUiRsa.js +1 -1
  842. package/dist/plugin-sdk/paths-cBAF6Bj0.js +1 -1
  843. package/dist/plugin-sdk/paths-piJASC5k.js +1 -1
  844. package/dist/plugin-sdk/paths-rO4ehkyU.js +1 -1
  845. package/dist/plugin-sdk/pi-model-discovery--UcCzdQg.js +1 -1
  846. package/dist/plugin-sdk/pi-model-discovery-Bi4dKtW0.cjs +1 -1
  847. package/dist/plugin-sdk/pi-model-discovery-CCK2Ppj9.js +1 -1
  848. package/dist/plugin-sdk/pi-model-discovery-CRSZ0OFi.js +1 -1
  849. package/dist/plugin-sdk/pi-model-discovery-Cx_r4FGY.js +1 -1
  850. package/dist/plugin-sdk/pi-model-discovery-D3JQMjAa.cjs +1 -1
  851. package/dist/plugin-sdk/pi-model-discovery-DN1RHetG.cjs +1 -1
  852. package/dist/plugin-sdk/pi-model-discovery-DVFSU0-f.cjs +1 -1
  853. package/dist/plugin-sdk/pi-model-discovery-DWMAAhA-.cjs +1 -1
  854. package/dist/plugin-sdk/pi-model-discovery-DYOHzCjs.js +1 -1
  855. package/dist/plugin-sdk/pi-model-discovery-DdSVvbQ5.cjs +1 -1
  856. package/dist/plugin-sdk/pi-model-discovery-DejkxBol.js +1 -1
  857. package/dist/plugin-sdk/pi-model-discovery-SmVAFMj_.cjs +1 -1
  858. package/dist/plugin-sdk/pi-model-discovery-ma8st1Ek.js +1 -1
  859. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-B2WodYBY.cjs +1 -1
  860. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BC114tUb.js +1 -1
  861. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BF6jP1nM.js +1 -1
  862. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Beg-U7Z-.cjs +1 -1
  863. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BkEYsSLL.js +1 -1
  864. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-C21sWtkh.js +1 -1
  865. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CKkgBGIj.cjs +1 -1
  866. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CNun__L-.js +1 -1
  867. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Clulhv2X.cjs +1 -1
  868. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DvwL5in9.cjs +1 -1
  869. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-FnzjmZqP.js +1 -1
  870. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Rq5y0QJ2.cjs +1 -1
  871. package/dist/plugin-sdk/polls-BuaJuIpV.cjs +1 -1
  872. package/dist/plugin-sdk/polls-CBAGZuJ6.js +1 -1
  873. package/dist/plugin-sdk/polls-CSKMbBIS.js +1 -1
  874. package/dist/plugin-sdk/polls-D0wY0FvT.cjs +1 -1
  875. package/dist/plugin-sdk/polls-PGxiE05J.js +1 -1
  876. package/dist/plugin-sdk/polls-yWqSCEP0.cjs +1 -1
  877. package/dist/plugin-sdk/proxy-env-B765haXA.js +1 -1
  878. package/dist/plugin-sdk/proxy-env-Bcl14j2_.cjs +1 -1
  879. package/dist/plugin-sdk/proxy-env-BlrHtJWH.js +1 -1
  880. package/dist/plugin-sdk/proxy-env-D48qBPAr.cjs +1 -1
  881. package/dist/plugin-sdk/proxy-env-DGzNnnJh.js +1 -1
  882. package/dist/plugin-sdk/proxy-env-DQoJjkWE.cjs +1 -1
  883. package/dist/plugin-sdk/proxy-env-DWw9TnOj.cjs +1 -1
  884. package/dist/plugin-sdk/proxy-env-MEjSyzTr.js +1 -1
  885. package/dist/plugin-sdk/proxy-env-a590sPAz.cjs +1 -1
  886. package/dist/plugin-sdk/proxy-env-k93igu7v.cjs +1 -1
  887. package/dist/plugin-sdk/proxy-env-m9eG3uZN.js +1 -1
  888. package/dist/plugin-sdk/proxy-env-t6hcaFqC.js +1 -1
  889. package/dist/plugin-sdk/proxy-fetch-B9aXJVe-.js +1 -1
  890. package/dist/plugin-sdk/proxy-fetch-BaA3JYgW.cjs +1 -1
  891. package/dist/plugin-sdk/proxy-fetch-BwXFVsHE.cjs +1 -1
  892. package/dist/plugin-sdk/proxy-fetch-BzcKzknk.cjs +1 -1
  893. package/dist/plugin-sdk/proxy-fetch-CYVChsKE.js +1 -1
  894. package/dist/plugin-sdk/proxy-fetch-ClOb2LUH.js +1 -1
  895. package/dist/plugin-sdk/proxy-fetch-DH7VIiBH.cjs +1 -1
  896. package/dist/plugin-sdk/proxy-fetch-DPOhfrou.cjs +1 -1
  897. package/dist/plugin-sdk/proxy-fetch-DXt2R_Z5.js +1 -1
  898. package/dist/plugin-sdk/proxy-fetch-Del551nu.js +1 -1
  899. package/dist/plugin-sdk/proxy-fetch-YCVHz7Rl.js +1 -1
  900. package/dist/plugin-sdk/proxy-fetch-qbrYAz8k.cjs +1 -1
  901. package/dist/plugin-sdk/pw-ai-3piACPqP.cjs +1 -1
  902. package/dist/plugin-sdk/pw-ai-8dajXBkZ.js +1 -1
  903. package/dist/plugin-sdk/pw-ai-B7mrBDW5.js +1 -1
  904. package/dist/plugin-sdk/pw-ai-BLD7x-3a.js +1 -1
  905. package/dist/plugin-sdk/pw-ai-BYmANcaC.cjs +1 -1
  906. package/dist/plugin-sdk/pw-ai-C1rVW06B.cjs +1 -1
  907. package/dist/plugin-sdk/pw-ai-CCDvaBUm.cjs +1 -1
  908. package/dist/plugin-sdk/pw-ai-CVYUOcKM.js +1 -1
  909. package/dist/plugin-sdk/pw-ai-DBg5CCXp.cjs +1 -1
  910. package/dist/plugin-sdk/pw-ai-DY11CCd3.cjs +1 -1
  911. package/dist/plugin-sdk/pw-ai-Kf2RyA25.js +1 -1
  912. package/dist/plugin-sdk/pw-ai-f5yF3n3t.js +1 -1
  913. package/dist/plugin-sdk/qmd-manager-B3xNbdye.cjs +1 -1
  914. package/dist/plugin-sdk/qmd-manager-BMyDNBPi.js +1 -1
  915. package/dist/plugin-sdk/qmd-manager-BZhiv_zq.cjs +1 -1
  916. package/dist/plugin-sdk/qmd-manager-C3uVDbhW.js +1 -1
  917. package/dist/plugin-sdk/qmd-manager-CW46NrS-.cjs +1 -1
  918. package/dist/plugin-sdk/qmd-manager-C_e04BNg.js +1 -1
  919. package/dist/plugin-sdk/qmd-manager-CczVoslK.cjs +1 -1
  920. package/dist/plugin-sdk/qmd-manager-CzLKqPmR.js +1 -1
  921. package/dist/plugin-sdk/qmd-manager-DFh8b5N-.cjs +1 -1
  922. package/dist/plugin-sdk/qmd-manager-DXLfZZMI.js +1 -1
  923. package/dist/plugin-sdk/qmd-manager-FL9fAfNo.cjs +1 -1
  924. package/dist/plugin-sdk/qmd-manager-fWxbGqzk.js +1 -1
  925. package/dist/plugin-sdk/query-expansion-0zYzKrrd.cjs +1 -1
  926. package/dist/plugin-sdk/query-expansion-BYSjmpkV.cjs +1 -1
  927. package/dist/plugin-sdk/query-expansion-CAboqtWr.js +1 -1
  928. package/dist/plugin-sdk/query-expansion-C_DnhmUy.js +1 -1
  929. package/dist/plugin-sdk/query-expansion-Cb2vnF6y.js +1 -1
  930. package/dist/plugin-sdk/query-expansion-DCeqywxh.cjs +1 -1
  931. package/dist/plugin-sdk/query-expansion-DF4LMxRQ.js +1 -1
  932. package/dist/plugin-sdk/query-expansion-DKJkqmNM.cjs +1 -1
  933. package/dist/plugin-sdk/query-expansion-DO2CFW4z.cjs +1 -1
  934. package/dist/plugin-sdk/query-expansion-DyCDaZbL.js +1 -1
  935. package/dist/plugin-sdk/query-expansion-cpXCyoDy.cjs +1 -1
  936. package/dist/plugin-sdk/query-expansion-r_iXkNzt.js +1 -1
  937. package/dist/plugin-sdk/qwen-portal-auth.cjs +1 -1
  938. package/dist/plugin-sdk/qwen-portal-auth.js +1 -1
  939. package/dist/plugin-sdk/render-6fCdtAr6.cjs +1 -1
  940. package/dist/plugin-sdk/render-CBsnn-2A.js +1 -1
  941. package/dist/plugin-sdk/render-CzHaQB0d.cjs +1 -1
  942. package/dist/plugin-sdk/render-DGmfCIRG.js +1 -1
  943. package/dist/plugin-sdk/render-DhTJXP1U.js +1 -1
  944. package/dist/plugin-sdk/render-Djx15dPh.js +1 -1
  945. package/dist/plugin-sdk/render-DxBO2Blp.cjs +1 -1
  946. package/dist/plugin-sdk/render-g5VlmgpF.cjs +1 -1
  947. package/dist/plugin-sdk/reply-BrHB7v5V.cjs +1 -1
  948. package/dist/plugin-sdk/reply-Clex4c2R.js +1 -1
  949. package/dist/plugin-sdk/resolve-outbound-target-BHLQMMp-.cjs +1 -1
  950. package/dist/plugin-sdk/resolve-outbound-target-Cvz2WXAk.cjs +1 -1
  951. package/dist/plugin-sdk/resolve-outbound-target-DDqGniMw.js +1 -1
  952. package/dist/plugin-sdk/resolve-outbound-target-DEpmpEep.js +1 -1
  953. package/dist/plugin-sdk/send--HeMLLzj.js +1 -1
  954. package/dist/plugin-sdk/send-2IhtEEzb.js +1 -1
  955. package/dist/plugin-sdk/send-9tPLnqkc.js +1 -1
  956. package/dist/plugin-sdk/send-B-exJfkg.js +1 -1
  957. package/dist/plugin-sdk/send-B4kzPtcN.js +1 -1
  958. package/dist/plugin-sdk/send-BCSkdYN6.cjs +1 -1
  959. package/dist/plugin-sdk/send-BEmZxBcF.js +1 -1
  960. package/dist/plugin-sdk/send-BHvZIrbJ.cjs +1 -1
  961. package/dist/plugin-sdk/send-BLbCBxeF.js +1 -1
  962. package/dist/plugin-sdk/send-BOkABdQu.cjs +1 -1
  963. package/dist/plugin-sdk/send-BPNd63Qs.js +1 -1
  964. package/dist/plugin-sdk/send-BVAm6Zbr.cjs +1 -1
  965. package/dist/plugin-sdk/send-B_619b3s.js +1 -1
  966. package/dist/plugin-sdk/send-BcuylzbX.js +1 -1
  967. package/dist/plugin-sdk/send-BdFvK9Wc2.js +1 -1
  968. package/dist/plugin-sdk/send-Bh-J7XWZ.cjs +1 -1
  969. package/dist/plugin-sdk/send-BkREPc90.cjs +1 -1
  970. package/dist/plugin-sdk/send-Bp4f-KJu.cjs +1 -1
  971. package/dist/plugin-sdk/send-BtF36kYb.js +1 -1
  972. package/dist/plugin-sdk/send-C6S8tkTA.cjs +1 -1
  973. package/dist/plugin-sdk/send-CDQF_izk.js +1 -1
  974. package/dist/plugin-sdk/send-CF3qas-K.js +1 -1
  975. package/dist/plugin-sdk/send-CFKQX2Wo.js +1 -1
  976. package/dist/plugin-sdk/send-CIP1u5a-.js +1 -1
  977. package/dist/plugin-sdk/send-CIxh7PV0.cjs +1 -1
  978. package/dist/plugin-sdk/send-CJJdcDHX.js +1 -1
  979. package/dist/plugin-sdk/send-COtvydDt.cjs +1 -1
  980. package/dist/plugin-sdk/send-CPwh7tRu.js +1 -1
  981. package/dist/plugin-sdk/send-CRnIqXN9.cjs +1 -1
  982. package/dist/plugin-sdk/send-CSqipUeV.cjs +1 -1
  983. package/dist/plugin-sdk/send-Chfe8tPY.js +1 -1
  984. package/dist/plugin-sdk/send-ClMvdjfg.js +1 -1
  985. package/dist/plugin-sdk/send-CmoJSYhT.js +1 -1
  986. package/dist/plugin-sdk/send-Cs5jSTw0.cjs +1 -1
  987. package/dist/plugin-sdk/send-D-6Et_9H.js +1 -1
  988. package/dist/plugin-sdk/send-D13uFnzH.cjs +1 -1
  989. package/dist/plugin-sdk/send-D3eT0F4N.cjs +1 -1
  990. package/dist/plugin-sdk/send-DAtg_VHa.js +1 -1
  991. package/dist/plugin-sdk/send-DCF59ijQ.cjs +1 -1
  992. package/dist/plugin-sdk/send-DN2xic3w.cjs +1 -1
  993. package/dist/plugin-sdk/send-DOjSTB6D.cjs +1 -1
  994. package/dist/plugin-sdk/send-DavwL7cF.js +1 -1
  995. package/dist/plugin-sdk/send-Dbmn1rgD.cjs +1 -1
  996. package/dist/plugin-sdk/send-DhfDqcwc.cjs +1 -1
  997. package/dist/plugin-sdk/send-DsDCrJWq.js +1 -1
  998. package/dist/plugin-sdk/send-DyR5Lpl-.js +1 -1
  999. package/dist/plugin-sdk/send-DyzuwDjE.js +1 -1
  1000. package/dist/plugin-sdk/send-GtphEa1b.cjs +1 -1
  1001. package/dist/plugin-sdk/send-HZNY_u3L.cjs +1 -1
  1002. package/dist/plugin-sdk/send-IM-76QZu.js +1 -1
  1003. package/dist/plugin-sdk/send-IqcgAO8b.cjs +1 -1
  1004. package/dist/plugin-sdk/send-OQcuL9tP.js +1 -1
  1005. package/dist/plugin-sdk/send-_92aOzWU.cjs +1 -1
  1006. package/dist/plugin-sdk/send-h_kE-cAK.js +1 -1
  1007. package/dist/plugin-sdk/send-jOMdGt0L.cjs +1 -1
  1008. package/dist/plugin-sdk/send-mZ_d-t_3.cjs +1 -1
  1009. package/dist/plugin-sdk/send-puyUta4_.cjs +1 -1
  1010. package/dist/plugin-sdk/send-t5U34FhY.cjs +1 -1
  1011. package/dist/plugin-sdk/send-tvw8j-Se.cjs +1 -1
  1012. package/dist/plugin-sdk/send-z1vaCgF3.cjs +1 -1
  1013. package/dist/plugin-sdk/session--K1m5v7m.js +1 -1
  1014. package/dist/plugin-sdk/session-B1DJ45om.js +1 -1
  1015. package/dist/plugin-sdk/session-B80NWO1m.js +1 -1
  1016. package/dist/plugin-sdk/session-BKPBr445.js +1 -1
  1017. package/dist/plugin-sdk/session-BQLjsBwL.cjs +1 -1
  1018. package/dist/plugin-sdk/session-BZHltxdM.js +1 -1
  1019. package/dist/plugin-sdk/session-Bt5yI-VW.cjs +1 -1
  1020. package/dist/plugin-sdk/session-CC1GqwiM.cjs +1 -1
  1021. package/dist/plugin-sdk/session-C_yqyp3P.cjs +1 -1
  1022. package/dist/plugin-sdk/session-ClISxvtJ.js +1 -1
  1023. package/dist/plugin-sdk/session-D4nn-nXX.cjs +1 -1
  1024. package/dist/plugin-sdk/session-DOA4CJgj.cjs +1 -1
  1025. package/dist/plugin-sdk/sessions-BwTjGneU.js +1 -1
  1026. package/dist/plugin-sdk/sessions-CJbvfO6m.cjs +1 -1
  1027. package/dist/plugin-sdk/signal.cjs +1 -1
  1028. package/dist/plugin-sdk/signal.js +1 -1
  1029. package/dist/plugin-sdk/skill-commands-5WGHyr3h.cjs +1 -1
  1030. package/dist/plugin-sdk/skill-commands-BZlF3g3o.js +1 -1
  1031. package/dist/plugin-sdk/skill-commands-BmBQSmNH.js +1 -1
  1032. package/dist/plugin-sdk/skill-commands-CD4GQXTR.cjs +1 -1
  1033. package/dist/plugin-sdk/skill-commands-CGOPOT-r.js +1 -1
  1034. package/dist/plugin-sdk/skill-commands-CM9ziCQY.cjs +1 -1
  1035. package/dist/plugin-sdk/skill-commands-CVsU5rEy.js +1 -1
  1036. package/dist/plugin-sdk/skill-commands-DNPxE-kc.cjs +1 -1
  1037. package/dist/plugin-sdk/skill-commands-DcgKCVDt.js +1 -1
  1038. package/dist/plugin-sdk/skill-commands-IAwkVeOe.js +1 -1
  1039. package/dist/plugin-sdk/skill-commands-ZyLkXbR_.cjs +1 -1
  1040. package/dist/plugin-sdk/skill-commands-xJWQthd5.cjs +1 -1
  1041. package/dist/plugin-sdk/slack.cjs +1 -1
  1042. package/dist/plugin-sdk/slack.js +1 -1
  1043. package/dist/plugin-sdk/synology-chat.cjs +1 -1
  1044. package/dist/plugin-sdk/synology-chat.js +1 -1
  1045. package/dist/plugin-sdk/tables-BZUVdTR-.cjs +1 -1
  1046. package/dist/plugin-sdk/tables-Bbodvj_s.cjs +1 -1
  1047. package/dist/plugin-sdk/tables-C5b2CtNw.cjs +1 -1
  1048. package/dist/plugin-sdk/tables-C6TX2QvW.js +1 -1
  1049. package/dist/plugin-sdk/tables-Cz5osenc.js +1 -1
  1050. package/dist/plugin-sdk/tables-DBSeZ07-.cjs +1 -1
  1051. package/dist/plugin-sdk/tables-DLSXY2-Q.js +1 -1
  1052. package/dist/plugin-sdk/tables-DQad-z2Z.cjs +1 -1
  1053. package/dist/plugin-sdk/tables-DYuLwL1d.js +1 -1
  1054. package/dist/plugin-sdk/tables-D_J655yN.js +1 -1
  1055. package/dist/plugin-sdk/tables-_vqK8P0T.js +1 -1
  1056. package/dist/plugin-sdk/tables-bSgb8OzP.cjs +1 -1
  1057. package/dist/plugin-sdk/target-errors-B-mJ4s4b.cjs +1 -1
  1058. package/dist/plugin-sdk/target-errors-BAHAHc8f.js +1 -1
  1059. package/dist/plugin-sdk/target-errors-BKruhz8r.js +1 -1
  1060. package/dist/plugin-sdk/target-errors-BbQBR5da.js +1 -1
  1061. package/dist/plugin-sdk/target-errors-BjgLCOTm.cjs +1 -1
  1062. package/dist/plugin-sdk/target-errors-CQbFkOae.js +1 -1
  1063. package/dist/plugin-sdk/target-errors-C_HYvghh.cjs +1 -1
  1064. package/dist/plugin-sdk/target-errors-CaaKhU6m.js +1 -1
  1065. package/dist/plugin-sdk/target-errors-QWTCk98R.cjs +1 -1
  1066. package/dist/plugin-sdk/target-errors-oh0u5K2w.cjs +1 -1
  1067. package/dist/plugin-sdk/targets-BSc11Uk8.cjs +1 -1
  1068. package/dist/plugin-sdk/targets-BSkiizml.js +1 -1
  1069. package/dist/plugin-sdk/targets-CBI0xqve.cjs +1 -1
  1070. package/dist/plugin-sdk/targets-CL5fYQi7.js +1 -1
  1071. package/dist/plugin-sdk/targets-CUZWrFrm.cjs +1 -1
  1072. package/dist/plugin-sdk/targets-CVEYTFPQ.js +1 -1
  1073. package/dist/plugin-sdk/targets-Co2R6K14.cjs +1 -1
  1074. package/dist/plugin-sdk/targets-CrkJkzil.js +1 -1
  1075. package/dist/plugin-sdk/targets-D-m7SV9x.cjs +1 -1
  1076. package/dist/plugin-sdk/targets-D8HTxbo4.js +1 -1
  1077. package/dist/plugin-sdk/targets-DcGNB9nk.cjs +1 -1
  1078. package/dist/plugin-sdk/targets-Dn9gDiEw.js +1 -1
  1079. package/dist/plugin-sdk/targets-X28mff4s.cjs +1 -1
  1080. package/dist/plugin-sdk/targets-uycXZ8vQ.js +1 -1
  1081. package/dist/plugin-sdk/telegram.cjs +1 -1
  1082. package/dist/plugin-sdk/telegram.js +1 -1
  1083. package/dist/plugin-sdk/test-utils.cjs +1 -1
  1084. package/dist/plugin-sdk/test-utils.js +1 -1
  1085. package/dist/plugin-sdk/tlon.cjs +1 -1
  1086. package/dist/plugin-sdk/tlon.js +1 -1
  1087. package/dist/plugin-sdk/tokens-AAdZjj0M.js +1 -1
  1088. package/dist/plugin-sdk/tokens-B20KNIDD.js +1 -1
  1089. package/dist/plugin-sdk/tokens-B8ys7Q2e.js +1 -1
  1090. package/dist/plugin-sdk/tokens-BPc1fcZ3.js +1 -1
  1091. package/dist/plugin-sdk/tokens-BqABmXSe.js +1 -1
  1092. package/dist/plugin-sdk/tokens-CXsPDJTr.cjs +1 -1
  1093. package/dist/plugin-sdk/tokens-CnB4dJmp.cjs +1 -1
  1094. package/dist/plugin-sdk/tokens-CytSl1X8.cjs +1 -1
  1095. package/dist/plugin-sdk/tokens-DgPZk2Uu.js +1 -1
  1096. package/dist/plugin-sdk/tokens-Dq2wDF3_.cjs +1 -1
  1097. package/dist/plugin-sdk/tokens-DtrljGtQ.cjs +1 -1
  1098. package/dist/plugin-sdk/tokens-g5KWvWhD.cjs +1 -1
  1099. package/dist/plugin-sdk/twitch.cjs +1 -1
  1100. package/dist/plugin-sdk/twitch.js +1 -1
  1101. package/dist/plugin-sdk/utils-BJtJR72k.js +1 -1
  1102. package/dist/plugin-sdk/utils-PPIvU9qw.cjs +1 -1
  1103. package/dist/plugin-sdk/voice-call.cjs +1 -1
  1104. package/dist/plugin-sdk/voice-call.js +1 -1
  1105. package/dist/plugin-sdk/web-B4A8zBP9.cjs +1 -1
  1106. package/dist/plugin-sdk/web-BKKx3jqf.cjs +1 -1
  1107. package/dist/plugin-sdk/web-BTBgpaEi.js +1 -1
  1108. package/dist/plugin-sdk/web-BfjArU7g.js +1 -1
  1109. package/dist/plugin-sdk/web-C7KhecaH.cjs +1 -1
  1110. package/dist/plugin-sdk/web-CFMrBQv7.js +1 -1
  1111. package/dist/plugin-sdk/web-CS0AvKLx.js +1 -1
  1112. package/dist/plugin-sdk/web-EfgEjg15.cjs +1 -1
  1113. package/dist/plugin-sdk/weixin.cjs +1 -1
  1114. package/dist/plugin-sdk/weixin.js +1 -1
  1115. package/dist/plugin-sdk/whatsapp-actions-6N2LIWVD.js +1 -1
  1116. package/dist/plugin-sdk/whatsapp-actions-BGEghean.js +1 -1
  1117. package/dist/plugin-sdk/whatsapp-actions-BP_fSzB9.cjs +1 -1
  1118. package/dist/plugin-sdk/whatsapp-actions-BSx6-Onq.cjs +1 -1
  1119. package/dist/plugin-sdk/whatsapp-actions-BZAMGDn8.cjs +1 -1
  1120. package/dist/plugin-sdk/whatsapp-actions-BvZMduqd.js +1 -1
  1121. package/dist/plugin-sdk/whatsapp-actions-CDUbwNdp.cjs +1 -1
  1122. package/dist/plugin-sdk/whatsapp-actions-DNVIKnqz.cjs +1 -1
  1123. package/dist/plugin-sdk/whatsapp-actions-DTVbVkOo.js +1 -1
  1124. package/dist/plugin-sdk/whatsapp-actions-DjMYqpSS.js +1 -1
  1125. package/dist/plugin-sdk/whatsapp-actions-P1DVqKhD.cjs +1 -1
  1126. package/dist/plugin-sdk/whatsapp-actions-shElOKKX.js +1 -1
  1127. package/dist/plugin-sdk/whatsapp.cjs +1 -1
  1128. package/dist/plugin-sdk/whatsapp.js +1 -1
  1129. package/dist/plugin-sdk/zalo.cjs +1 -1
  1130. package/dist/plugin-sdk/zalo.js +1 -1
  1131. package/dist/plugin-sdk/zalouser.cjs +1 -1
  1132. package/dist/plugin-sdk/zalouser.js +1 -1
  1133. package/dist/plugins-CYLrFT4h.js +1 -1
  1134. package/dist/plugins-DNlgeTTc.js +1 -1
  1135. package/dist/plugins-cli-BiV4FaGs.js +1 -1
  1136. package/dist/plugins-cli-C0PLRxT0.js +1 -1
  1137. package/dist/polls-BIVz6a4F.js +1 -1
  1138. package/dist/polls-Bh5wc9-6.js +1 -1
  1139. package/dist/polls-C_XSFz3d.js +1 -1
  1140. package/dist/polls-DKJOFSzJ.js +1 -1
  1141. package/dist/ports-Bjc9q__g.js +1 -1
  1142. package/dist/ports-Di2_MOUb.js +1 -1
  1143. package/dist/probe-auth-9RrZOStc.js +1 -1
  1144. package/dist/probe-auth-Cg6SAov9.js +1 -1
  1145. package/dist/profile-utils-CWmra1aY.js +1 -1
  1146. package/dist/program-CI--7377.js +1 -1
  1147. package/dist/program-context-CH9p6anW.js +1 -1
  1148. package/dist/program-context-Cu8fVR-O.js +1 -1
  1149. package/dist/progress-LNttnI-y.js +1 -1
  1150. package/dist/progress-d1m2sqR1.js +1 -1
  1151. package/dist/prompt-select-styled-CbTtKeIC.js +1 -1
  1152. package/dist/prompt-select-styled-sYEl0gMg.js +1 -1
  1153. package/dist/prompt-style-BThRSQJR.js +1 -1
  1154. package/dist/prompt-style-CXKekIBY.js +1 -1
  1155. package/dist/prompts-CMzglboN.js +1 -1
  1156. package/dist/prompts-wv-lfVrJ.js +1 -1
  1157. package/dist/provider-auth-helpers-C3OaF218.js +1 -1
  1158. package/dist/provider-auth-helpers-CZyb7LUg.js +1 -1
  1159. package/dist/provider-env-vars-D8p6Ohpj.js +1 -1
  1160. package/dist/provider-env-vars-Dt0Q29Su.js +1 -1
  1161. package/dist/proxy-env-BNhTHkd_.js +1 -1
  1162. package/dist/proxy-env-DcmW_urA.js +1 -1
  1163. package/dist/proxy-env-DrC3TIGh.js +1 -1
  1164. package/dist/proxy-env-FJr5nlvs.js +1 -1
  1165. package/dist/proxy-fetch-BADsUK4d.js +1 -1
  1166. package/dist/proxy-fetch-BZ9O8Dvj.js +1 -1
  1167. package/dist/proxy-fetch-DnjU1fEB.js +1 -1
  1168. package/dist/proxy-fetch-gWETR3cl.js +1 -1
  1169. package/dist/push-apns-kySzOiJr.js +1 -1
  1170. package/dist/push-apns-tM6G9LLm.js +1 -1
  1171. package/dist/pw-ai-B7YMA_4Q.js +1 -1
  1172. package/dist/pw-ai-C7peCONw.js +1 -1
  1173. package/dist/pw-ai-CojtT9WR.js +1 -1
  1174. package/dist/pw-ai-DWJWFzTA.js +1 -1
  1175. package/dist/qmd-manager-C_e04BNg.js +1 -1
  1176. package/dist/qmd-manager-DSQ_mDCl.js +1 -1
  1177. package/dist/qmd-manager-DcBYbt_V.js +1 -1
  1178. package/dist/qmd-manager-NLI0R6kp.js +1 -1
  1179. package/dist/qr-cli-DUR7oW0_.js +1 -1
  1180. package/dist/qr-cli-kb3ygh9I.js +1 -1
  1181. package/dist/query-expansion-0OxEb1Io.js +1 -1
  1182. package/dist/query-expansion-BUUx_oWg.js +1 -1
  1183. package/dist/query-expansion-r_iXkNzt.js +1 -1
  1184. package/dist/reaction-level-DVPHL14p.js +1 -1
  1185. package/dist/reaction-message-id-BEEe7X3D.js +1 -1
  1186. package/dist/read-only-account-inspect-DEnPVHTo.js +1 -1
  1187. package/dist/redact-3_CiXMY6.js +1 -1
  1188. package/dist/redact-CnRxK70G.js +1 -1
  1189. package/dist/register.agent-BwmE1VD-.js +1 -1
  1190. package/dist/register.agent-D1hQi_68.js +1 -1
  1191. package/dist/register.backup-8s5jgnHQ.js +1 -1
  1192. package/dist/register.backup-CAiwLaIW.js +1 -1
  1193. package/dist/register.configure-BsTw4XfK.js +1 -1
  1194. package/dist/register.configure-DxR84Ot6.js +1 -1
  1195. package/dist/register.maintenance-3nzWAo_a.js +1 -1
  1196. package/dist/register.maintenance-DxKGQ9Jo.js +1 -1
  1197. package/dist/register.message-Bk1pHVSK.js +1 -1
  1198. package/dist/register.message-PcFtBR0-.js +1 -1
  1199. package/dist/register.onboard-AWxbhU7j.js +1 -1
  1200. package/dist/register.onboard-BTOZN8ro.js +1 -1
  1201. package/dist/register.setup-B-e1qIbc.js +1 -1
  1202. package/dist/register.setup-CweJJdt8.js +1 -1
  1203. package/dist/register.status-health-sessions-B1R_nl6P.js +1 -1
  1204. package/dist/register.status-health-sessions-CWNLXpAn.js +1 -1
  1205. package/dist/register.subclis-C0VQ_HfZ.js +1 -1
  1206. package/dist/registry-BptzrW8D.js +1 -1
  1207. package/dist/registry-hFAtCSWG.js +1 -1
  1208. package/dist/render-BXEUPIHe.js +1 -1
  1209. package/dist/render-CBsnn-2A.js +1 -1
  1210. package/dist/render-D8OWO2hT.js +1 -1
  1211. package/dist/render-DrrPmnMI.js +1 -1
  1212. package/dist/reply-r9KtzgpM.js +1 -1
  1213. package/dist/restart-CTfuVGfA.js +1 -1
  1214. package/dist/rpc-BQXfCyCw.js +1 -1
  1215. package/dist/rpc-CcrILVsV.js +1 -1
  1216. package/dist/run-main-CuQQyoU3.js +1 -1
  1217. package/dist/runtime-BlsMYeaw.js +1 -1
  1218. package/dist/runtime-DLxfCs7F.js +1 -1
  1219. package/dist/runtime-guard-DFYBaYZS.js +1 -1
  1220. package/dist/runtime-guard-DX2Ie4ri.js +1 -1
  1221. package/dist/runtime-status-CqFBmdRd.js +1 -1
  1222. package/dist/runtime-status-DszMjvJK.js +1 -1
  1223. package/dist/runtime-web-tools-BWv0X5qp.js +1 -1
  1224. package/dist/runtime-web-tools-CCIXUISf.js +1 -1
  1225. package/dist/sandbox-cli-CxluKLFV.js +1 -1
  1226. package/dist/sandbox-cli-xCX6FV4Z.js +1 -1
  1227. package/dist/scan-paths-C13EseXp.js +1 -1
  1228. package/dist/scan-paths-CWtvWW40.js +1 -1
  1229. package/dist/search-manager-KMRzwyPH.js +1 -1
  1230. package/dist/secret-file-C7JffiM_.js +1 -1
  1231. package/dist/secret-file-D60EFEOe.js +1 -1
  1232. package/dist/secret-file-DuWm26jS.js +1 -1
  1233. package/dist/secrets-cli-Be6OBr6Q.js +1 -1
  1234. package/dist/secrets-cli-DmDZiX17.js +1 -1
  1235. package/dist/secure-random-D7JQgiK-.js +1 -1
  1236. package/dist/security-cli-CllLwpQ-.js +1 -1
  1237. package/dist/security-cli-DcA9keUK.js +1 -1
  1238. package/dist/send-8rJCpsDu.js +1 -1
  1239. package/dist/send-BJjoLBo3.js +1 -1
  1240. package/dist/send-BOxuQt9L.js +1 -1
  1241. package/dist/send-BPfl_1It.js +1 -1
  1242. package/dist/send-BdS6jUBa.js +1 -1
  1243. package/dist/send-BeZJ1zbp.js +1 -1
  1244. package/dist/send-BkZ8dWQV2.js +1 -1
  1245. package/dist/send-CDAeI9xB2.js +1 -1
  1246. package/dist/send-CgeRzkWS.js +1 -1
  1247. package/dist/send-CiTZ4p2t.js +1 -1
  1248. package/dist/send-D0y-r_hg2.js +1 -1
  1249. package/dist/send-DIw8ExHc.js +1 -1
  1250. package/dist/send-DRm6AFp-.js +1 -1
  1251. package/dist/send-DS5Quwb7.js +1 -1
  1252. package/dist/send-DVmPgxm7.js +1 -1
  1253. package/dist/send-Ds5sy22D.js +1 -1
  1254. package/dist/send-DvGzdoKK.js +1 -1
  1255. package/dist/send-OVet2uKx.js +1 -1
  1256. package/dist/send-YPQFx-fV.js +1 -1
  1257. package/dist/send-e2ppdA_R.js +1 -1
  1258. package/dist/server-Dzqb5Tau.js +1 -1
  1259. package/dist/server-node-events-B2irOUJ_.js +1 -1
  1260. package/dist/server-node-events-DSr6P0VG.js +1 -1
  1261. package/dist/server-w7sUBJEA.js +1 -1
  1262. package/dist/service-BtB9epJk.js +1 -1
  1263. package/dist/service-DZ9EbS15.js +1 -1
  1264. package/dist/session-BYYOduc1.js +1 -1
  1265. package/dist/session-B_qrXLsR.js +1 -1
  1266. package/dist/session-Be0RV2V1.js +1 -1
  1267. package/dist/session-bk3gFwO4.js +1 -1
  1268. package/dist/session-cost-usage-BgqKixv0.js +1 -1
  1269. package/dist/session-cost-usage-CHtVgnE8.js +1 -1
  1270. package/dist/session-key-C7F_iqYg.js +1 -1
  1271. package/dist/session-key-D3P0tf5P.js +1 -1
  1272. package/dist/session-utils-CrR0wD3W.js +1 -1
  1273. package/dist/sessions-BvTGb3rW.js +1 -1
  1274. package/dist/shared-9x5sqYRb.js +1 -1
  1275. package/dist/shared-BKWhOp64.js +1 -1
  1276. package/dist/shared-BV-hfJ3h.js +1 -1
  1277. package/dist/skill-commands-C59b8Yso.js +1 -1
  1278. package/dist/skill-commands-CqIEajsA.js +1 -1
  1279. package/dist/skill-commands-F5NFH0NR.js +1 -1
  1280. package/dist/skill-commands-O39uSj-k.js +1 -1
  1281. package/dist/skill-scanner-CUUF3Fvo.js +1 -1
  1282. package/dist/skill-scanner-CkxXNioD.js +1 -1
  1283. package/dist/skills-CKTicUKS.js +1 -1
  1284. package/dist/skills-DHbOKEGc.js +1 -1
  1285. package/dist/skills-cli-CZD1Ng18.js +1 -1
  1286. package/dist/skills-cli-nj0w4fe0.js +1 -1
  1287. package/dist/skills-install-D0I6c17J.js +1 -1
  1288. package/dist/skills-install-XHpqMBWl.js +1 -1
  1289. package/dist/skills-status-BWIugRCz.js +1 -1
  1290. package/dist/skills-status-DswSl5aD.js +1 -1
  1291. package/dist/sqlite-CILF3z9U.js +1 -1
  1292. package/dist/stagger-DmFYysrJ.js +1 -1
  1293. package/dist/stagger-DxzgG2jd.js +1 -1
  1294. package/dist/status-DKB9gdSp.js +1 -1
  1295. package/dist/status-DgRrUxyg.js +1 -1
  1296. package/dist/status-YZD9V9xi.js +1 -1
  1297. package/dist/status-isxcm8Xz.js +1 -1
  1298. package/dist/status.update-B_8Gumuc.js +1 -1
  1299. package/dist/status.update-Cf2e-l9d.js +1 -1
  1300. package/dist/string-normalization-BrUPaXaM.js +1 -1
  1301. package/dist/string-normalization-DJT5zuUF.js +1 -1
  1302. package/dist/subsystem-BLbY429l.js +1 -1
  1303. package/dist/subsystem-Bc2XrjUz.js +1 -1
  1304. package/dist/subsystem-C5XF2Fy5.js +1 -1
  1305. package/dist/system-cli-CRs3TOTw.js +1 -1
  1306. package/dist/system-cli-GyoLZQpj.js +1 -1
  1307. package/dist/system-run-command-DCzdgYyb.js +1 -1
  1308. package/dist/system-run-command-FCk9hSMO.js +1 -1
  1309. package/dist/systemd-D7odsu4K.js +1 -1
  1310. package/dist/systemd-DbevZh65.js +1 -1
  1311. package/dist/systemd-hints-lXpMy-kY.js +1 -1
  1312. package/dist/systemd-hints-x1lJAOxS.js +1 -1
  1313. package/dist/systemd-linger-C2MJD6KG.js +1 -1
  1314. package/dist/systemd-linger-cWKbFNpu.js +1 -1
  1315. package/dist/table-CR7TFMew.js +1 -1
  1316. package/dist/table-CY440fI1.js +1 -1
  1317. package/dist/tables-3Rjt6nwZ.js +1 -1
  1318. package/dist/tables-B9wFKQvT.js +1 -1
  1319. package/dist/tables-D1pcaye7.js +1 -1
  1320. package/dist/tables-h7y1Jhf4.js +1 -1
  1321. package/dist/target-errors-CUQcIty1.js +1 -1
  1322. package/dist/target-errors-D55sWZ4E.js +1 -1
  1323. package/dist/target-errors-DH0aw-m5.js +1 -1
  1324. package/dist/target-errors-LuLROpta.js +1 -1
  1325. package/dist/targets-4EaxWBal.js +1 -1
  1326. package/dist/targets-BJTo7bqu.js +1 -1
  1327. package/dist/targets-BYVMrXDf.js +1 -1
  1328. package/dist/targets-Bq6rS6-Z.js +1 -1
  1329. package/dist/targets-CL5fYQi7.js +1 -1
  1330. package/dist/targets-fozeWOOg.js +1 -1
  1331. package/dist/targets-m_41k_Mv.js +1 -1
  1332. package/dist/telegram/audit.js +1 -1
  1333. package/dist/text-format-CvrvBBre.js +1 -1
  1334. package/dist/text-format-DEWK6oCT.js +1 -1
  1335. package/dist/token-DnTmiyJu.js +1 -1
  1336. package/dist/tokens-B2fq-rL6.js +1 -1
  1337. package/dist/tokens-CL2fSjGl.js +1 -1
  1338. package/dist/tokens-DRM8vzJx.js +1 -1
  1339. package/dist/tokens-XGbQGn67.js +1 -1
  1340. package/dist/tool-display-DJDtttQg.js +1 -1
  1341. package/dist/tool-display-DjuSUUbH.js +1 -1
  1342. package/dist/tui-CqEb9hrT.js +1 -1
  1343. package/dist/tui-DdZ8SpNW.js +1 -1
  1344. package/dist/tui-cli-Bj0okLCf.js +1 -1
  1345. package/dist/tui-cli-CYvBshyB.js +1 -1
  1346. package/dist/types.secrets-C-5U96pc.js +1 -1
  1347. package/dist/types.secrets-D4tbc3Wq.js +1 -1
  1348. package/dist/update-BGrxUIyz.js +1 -1
  1349. package/dist/update-CwTy5DPl.js +1 -1
  1350. package/dist/update-cli-lciKU8_L.js +1 -1
  1351. package/dist/update-cli-xb0jHjE8.js +1 -1
  1352. package/dist/update-runner-8Hto6X-M.js +1 -1
  1353. package/dist/update-runner-LVJcy569.js +1 -1
  1354. package/dist/usage-format-BWD8FJFL.js +1 -1
  1355. package/dist/usage-format-yPwal8Iz.js +1 -1
  1356. package/dist/utils-CGdo13HV.js +1 -1
  1357. package/dist/utils-D3t-vPka.js +1 -1
  1358. package/dist/utils-R-mFyVJi.js +1 -1
  1359. package/dist/utils-UGOV_184.js +1 -1
  1360. package/dist/version-q3SkUw2K.js +1 -1
  1361. package/dist/warning-filter.js +1 -1
  1362. package/dist/web-Bfz_qlYe.js +1 -1
  1363. package/dist/web-ClbIohhf.js +1 -1
  1364. package/dist/webhooks-cli-DKfKihmJ.js +1 -1
  1365. package/dist/webhooks-cli-LU2ADRQp.js +1 -1
  1366. package/dist/whatsapp-actions-1TJ8dlv0.js +1 -1
  1367. package/dist/whatsapp-actions-CuDiuPGa.js +1 -1
  1368. package/dist/whatsapp-actions-DkLDOIk1.js +1 -1
  1369. package/dist/whatsapp-actions-EnduXWui.js +1 -1
  1370. package/dist/widearea-dns-BDx7vkV2.js +1 -1
  1371. package/dist/widearea-dns-BFjqKXu_.js +1 -1
  1372. package/dist/windows-spawn-7oINn5ao.js +1 -1
  1373. package/dist/windows-spawn-AB7ItGAE.js +1 -1
  1374. package/dist/with-timeout-WveKxvFV.js +1 -1
  1375. package/dist/with-timeout-c1CzdShT.js +1 -1
  1376. package/dist/workspace-B0ZQeHXg.js +1 -1
  1377. package/dist/workspace-C45T1Cxg.js +1 -1
  1378. package/dist/workspace-dirs-A8Vib9_B.js +1 -1
  1379. package/dist/workspace-dirs-BhF1Dzxt.js +1 -1
  1380. package/dist/workspace-xNEpaJvu.js +1 -1
  1381. package/dist/wsl-DHxB2Ew_.js +1 -1
  1382. package/dist/wsl-Ok7GaSJ6.js +1 -1
  1383. package/extensions/memory-core/index.js +1 -0
  1384. package/extensions/memory-core/package.json +1 -1
  1385. package/extensions/openclaw-telemetry-galileo-embedded/index.js +4 -0
  1386. package/extensions/openclaw-telemetry-galileo-embedded/package.json +2 -2
  1387. package/extensions/openclaw-telemetry-galileo-embedded/src/service.js +13 -0
  1388. package/extensions/openclaw-weixin/index.js +1 -0
  1389. package/extensions/openclaw-weixin/package.json +3 -3
  1390. package/extensions/openclaw-weixin/src/api/api.js +1 -0
  1391. package/extensions/openclaw-weixin/src/api/config-cache.js +1 -0
  1392. package/extensions/openclaw-weixin/src/api/session-guard.js +1 -0
  1393. package/extensions/openclaw-weixin/src/api/types.js +1 -0
  1394. package/extensions/openclaw-weixin/src/auth/accounts.js +1 -0
  1395. package/extensions/openclaw-weixin/src/auth/login-qr.js +11 -0
  1396. package/extensions/openclaw-weixin/src/auth/pairing.js +1 -0
  1397. package/extensions/openclaw-weixin/src/cdn/aes-ecb.js +1 -0
  1398. package/extensions/openclaw-weixin/src/cdn/cdn-upload.js +1 -0
  1399. package/extensions/openclaw-weixin/src/cdn/cdn-url.js +1 -0
  1400. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.js +1 -0
  1401. package/extensions/openclaw-weixin/src/cdn/upload.js +1 -0
  1402. package/extensions/openclaw-weixin/src/channel.js +6 -0
  1403. package/extensions/openclaw-weixin/src/config/config-schema.js +1 -0
  1404. package/extensions/openclaw-weixin/src/log-upload.js +4 -0
  1405. package/extensions/openclaw-weixin/src/media/media-download.js +1 -0
  1406. package/extensions/openclaw-weixin/src/media/mime.js +1 -0
  1407. package/extensions/openclaw-weixin/src/media/silk-transcode.js +1 -0
  1408. package/extensions/openclaw-weixin/src/messaging/debug-mode.js +1 -0
  1409. package/extensions/openclaw-weixin/src/messaging/error-notice.js +1 -0
  1410. package/extensions/openclaw-weixin/src/messaging/inbound.js +2 -0
  1411. package/extensions/openclaw-weixin/src/messaging/process-message.js +3 -0
  1412. package/extensions/openclaw-weixin/src/messaging/send-media.js +1 -0
  1413. package/extensions/openclaw-weixin/src/messaging/send.js +1 -0
  1414. package/extensions/openclaw-weixin/src/messaging/slash-commands.js +2 -0
  1415. package/extensions/openclaw-weixin/src/monitor/monitor.js +1 -0
  1416. package/extensions/openclaw-weixin/src/runtime.js +1 -0
  1417. package/extensions/openclaw-weixin/src/storage/state-dir.js +1 -0
  1418. package/extensions/openclaw-weixin/src/storage/sync-buf.js +1 -0
  1419. package/extensions/openclaw-weixin/src/util/logger.js +2 -0
  1420. package/extensions/openclaw-weixin/src/util/random.js +1 -0
  1421. package/extensions/openclaw-weixin/src/util/redact.js +1 -0
  1422. package/extensions/qbagent-mcp-server-x5uselocal-node/index.js +1 -0
  1423. package/extensions/qbagent-mcp-server-x5uselocal-node/package.json +1 -1
  1424. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.js +1 -0
  1425. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.js +1 -0
  1426. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.js +1 -0
  1427. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.js +1 -0
  1428. package/package.json +1 -1
  1429. package/preset-config.json +22 -0
  1430. package/extensions/memory-core/index.ts +0 -38
  1431. package/extensions/openclaw-telemetry-galileo-embedded/index.ts +0 -663
  1432. package/extensions/openclaw-telemetry-galileo-embedded/src/service.ts +0 -1590
  1433. package/extensions/openclaw-weixin/index.ts +0 -26
  1434. package/extensions/openclaw-weixin/src/api/api.ts +0 -238
  1435. package/extensions/openclaw-weixin/src/api/config-cache.ts +0 -79
  1436. package/extensions/openclaw-weixin/src/api/session-guard.ts +0 -58
  1437. package/extensions/openclaw-weixin/src/api/types.ts +0 -222
  1438. package/extensions/openclaw-weixin/src/auth/accounts.ts +0 -363
  1439. package/extensions/openclaw-weixin/src/auth/login-qr.ts +0 -344
  1440. package/extensions/openclaw-weixin/src/auth/pairing.ts +0 -120
  1441. package/extensions/openclaw-weixin/src/cdn/aes-ecb.ts +0 -21
  1442. package/extensions/openclaw-weixin/src/cdn/cdn-upload.ts +0 -75
  1443. package/extensions/openclaw-weixin/src/cdn/cdn-url.ts +0 -17
  1444. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.ts +0 -85
  1445. package/extensions/openclaw-weixin/src/cdn/upload.ts +0 -154
  1446. package/extensions/openclaw-weixin/src/channel.ts +0 -483
  1447. package/extensions/openclaw-weixin/src/config/config-schema.ts +0 -21
  1448. package/extensions/openclaw-weixin/src/log-upload.ts +0 -129
  1449. package/extensions/openclaw-weixin/src/media/media-download.ts +0 -138
  1450. package/extensions/openclaw-weixin/src/media/mime.ts +0 -76
  1451. package/extensions/openclaw-weixin/src/media/silk-transcode.ts +0 -74
  1452. package/extensions/openclaw-weixin/src/messaging/debug-mode.ts +0 -68
  1453. package/extensions/openclaw-weixin/src/messaging/error-notice.ts +0 -36
  1454. package/extensions/openclaw-weixin/src/messaging/inbound.ts +0 -283
  1455. package/extensions/openclaw-weixin/src/messaging/process-message.ts +0 -488
  1456. package/extensions/openclaw-weixin/src/messaging/send-media.ts +0 -76
  1457. package/extensions/openclaw-weixin/src/messaging/send.ts +0 -267
  1458. package/extensions/openclaw-weixin/src/messaging/slash-commands.ts +0 -105
  1459. package/extensions/openclaw-weixin/src/monitor/monitor.ts +0 -225
  1460. package/extensions/openclaw-weixin/src/runtime.ts +0 -67
  1461. package/extensions/openclaw-weixin/src/storage/state-dir.ts +0 -11
  1462. package/extensions/openclaw-weixin/src/storage/sync-buf.ts +0 -79
  1463. package/extensions/openclaw-weixin/src/util/logger.ts +0 -146
  1464. package/extensions/openclaw-weixin/src/util/random.ts +0 -17
  1465. package/extensions/openclaw-weixin/src/util/redact.ts +0 -57
  1466. package/extensions/openclaw-weixin/src/vendor.d.ts +0 -21
  1467. package/extensions/qbagent-mcp-server-x5uselocal-node/index.ts +0 -140
  1468. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.ts +0 -157
  1469. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.ts +0 -135
  1470. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.ts +0 -205
  1471. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.ts +0 -351
@@ -207,4 +207,4 @@ Add your local tool notes here.
207
207
  - Notes:
208
208
  `)]);await aM(Y.join(t,`AGENTS.md`),n),await aM(Y.join(t,`SOUL.md`),r),await aM(Y.join(t,`TOOLS.md`),i),await aM(Y.join(t,`IDENTITY.md`),a),await aM(Y.join(t,`USER.md`),o)}async function sM(e){let t=iM();e.reset&&await tu(`full`,t,_);let n=Fe().configPath,r=J.existsSync(n);!e.reset&&r||(await Vt({gateway:{mode:`local`,bind:`loopback`},agents:{defaults:{workspace:t,skipBootstrap:!0},list:[{id:`dev`,default:!0,workspace:t,identity:{name:eM,theme:tM,emoji:nM}}]}}),await oM(t),_.log(`Dev config ready: ${C(n)}`),_.log(`Dev workspace ready: ${C(E(t))}`))}const cM={launchd:[`LAUNCH_JOB_LABEL`,`LAUNCH_JOB_NAME`,`XPC_SERVICE_NAME`,`OPENCLAW_LAUNCHD_LABEL`],systemd:[`OPENCLAW_SYSTEMD_UNIT`,`INVOCATION_ID`,`SYSTEMD_EXEC_PID`,`JOURNAL_STREAM`],schtasks:[`OPENCLAW_WINDOWS_TASK_NAME`]};[...cM.launchd,...cM.systemd,...cM.schtasks];function lM(e,t){return t.some(t=>{let n=e[t];return typeof n==`string`&&n.trim().length>0})}function uM(e=process.env,t=process.platform){if(t===`darwin`)return lM(e,cM.launchd)?`launchd`:null;if(t===`linux`)return lM(e,cM.systemd)?`systemd`:null;if(t===`win32`){if(lM(e,cM.schtasks))return`schtasks`;let t=e.OPENCLAW_SERVICE_MARKER?.trim(),n=e.OPENCLAW_SERVICE_KIND?.trim();return t&&n===`gateway`?`schtasks`:null}return null}function dM(e){if(!e)return!1;let t=e.trim().toLowerCase();return t===`1`||t===`true`||t===`yes`||t===`on`}function fM(){if(dM(process.env.OPENCLAW_NO_RESPAWN))return{mode:`disabled`};let e=uM(process.env);if(e){if(e===`launchd`){let e=$u({env:process.env,mode:`start-after-exit`,waitForPid:process.pid});return e.ok?{mode:`supervised`,detail:`launchd restart handoff pid ${e.pid??`unknown`}`}:{mode:`supervised`,detail:`launchd exit fallback (${e.detail??`restart handoff failed`})`}}if(e===`schtasks`){let e=Ll();if(!e.ok)return{mode:`failed`,detail:e.detail??`${e.method} restart failed`}}return{mode:`supervised`}}if(process.platform===`win32`)return{mode:`disabled`,detail:`win32: detached respawn unsupported without Scheduled Task markers`};try{let e=[...process.execArgv,...process.argv.slice(1)],t=Sf(process.execPath,e,{env:process.env,detached:!0,stdio:`inherit`});return t.unref(),{mode:`spawned`,pid:t.pid??void 0}}catch(e){return{mode:`failed`,detail:e instanceof Error?e.message:String(e)}}}function pM(e){let t=!0;return()=>t?(t=!1,!1):(e(),!0)}const mM=v(`gateway`);async function hM(e){let t=await PA({port:e.lockPort}),n=null,r=!1,i=null,a=()=>{process.removeListener(`SIGTERM`,m),process.removeListener(`SIGINT`,h),process.removeListener(`SIGUSR1`,g)},o=t=>{a(),e.runtime.exit(t)},s=async()=>t?(await t.release(),t=null,!0):!1,c=async()=>{try{return t=await PA({port:e.lockPort}),!0}catch(e){return mM.error(`failed to reacquire gateway lock for in-process restart: ${String(e)}`),o(1),!1}},l=async()=>{let e=await s(),t=fM();if(t.mode===`spawned`||t.mode===`supervised`){let e=t.mode===`spawned`?`spawned pid ${t.pid??`unknown`}`:`supervisor restart`;mM.info(`restart mode: full process restart (${e})`),o(0);return}t.mode===`failed`?mM.warn(`full process restart failed (${t.detail??`unknown error`}); falling back to in-process restart`):mM.info(`restart mode: in-process restart (${t.detail??`OPENCLAW_NO_RESPAWN`})`),!(e&&!await c())&&(r=!1,i?.())},u=async()=>{await s(),o(0)},d=9e4,f=5e3,p=(e,t)=>{if(r){mM.info(`received ${t} during shutdown; ignoring`);return}r=!0;let i=e===`restart`;mM.info(`received ${t}; ${i?`restarting`:`shutting down`}`);let a=i?d+f:f,s=setTimeout(()=>{mM.error(`shutdown timed out; exiting without full cleanup`),o(i?1:0)},a);(async()=>{try{if(i){ni();let e=Ur(),t=Ci();if(t>0&&Mi(void 0,{mode:`compacting`}),e>0||t>0){mM.info(`draining ${e} active task(s) and ${t} active embedded run(s) before restart (timeout ${d}ms)`);let[n,r]=await Promise.all([e>0?Ri(d):Promise.resolve({drained:!0}),t>0?fi(d):Promise.resolve({drained:!0})]);n.drained&&r.drained?mM.info(`all active work drained`):(mM.warn(`drain timeout reached; proceeding with restart`),Mi(void 0,{mode:`all`}))}}await n?.close({reason:i?`gateway restarting`:`gateway stopping`,restartExpectedMs:i?1500:null})}catch(e){mM.error(`shutdown error: ${String(e)}`)}finally{clearTimeout(s),n=null,i?await l():await u()}})()},m=()=>{mM.info(`signal SIGTERM received`),p(`stop`,`SIGTERM`)},h=()=>{mM.info(`signal SIGINT received`),p(`stop`,`SIGINT`)},g=()=>{if(mM.info(`signal SIGUSR1 received`),!Hl()&&!Il()){mM.warn(`SIGUSR1 restart ignored (not authorized; commands.restart=false or use gateway tool).`);return}Pl(),p(`restart`,`SIGUSR1`)};process.on(`SIGTERM`,m),process.on(`SIGINT`,h),process.on(`SIGUSR1`,g);try{let t=pM(()=>{Ui()}),r=!0;for(;;){t();try{n=await e.start(),r=!1}catch(e){if(r)throw e;n=null,await s();let t=e instanceof Error?e.message:String(e),i=e instanceof Error&&e.stack?`\n${e.stack}`:``;mM.error(`gateway startup failed: ${t}. Process will stay alive; fix the issue and restart.${i}`)}await new Promise(e=>{i=e})}}finally{await s(),a()}}const gM=v(`gateway`),_M=[`port`,`bind`,`token`,`auth`,`password`,`passwordFile`,`tailscale`,`wsLog`,`rawStreamPath`],vM=[`tailscaleResetOnExit`,`allowUnconfigured`,`dev`,`reset`,`force`,`verbose`,`claudeCliLogs`,`compact`,`rawStream`],yM=[`none`,`token`,`password`,`trusted-proxy`],bM=[`off`,`serve`,`funnel`];function xM(){_.error(`Warning: --password can be exposed via process listings. Prefer --password-file or OPENCLAW_GATEWAY_PASSWORD.`)}function SM(e){let t=bd(e.password),n=bd(e.passwordFile);if(t&&n)throw Error(`Use either --password or --password-file.`);return n?Uu(n,`Gateway password`):t}function CM(e,t){return e&&t.includes(e)?e:null}function wM(e){return e.map(e=>`"${e}"`).join(`|`)}function TM(e){let t=e.map(e=>`"${e}"`);return t.length===0?``:t.length===1?t[0]:t.length===2?`${t[0]} or ${t[1]}`:`${t.slice(0,-1).join(`, `)}, or ${t[t.length-1]}`}function EM(e,t){let n={...e};for(let e of _M){let r=Wu(t,e);if(e===`wsLog`){n[e]=r??n[e];continue}n[e]=n[e]??r}for(let e of vM){let r=Wu(t,e);n[e]=!!(n[e]||r)}return n}async function DM(t){let n=process.env.OPENCLAW_PROFILE?.trim().toLowerCase()===`dev`,r=!!t.dev||n;if(t.reset&&!r){_.error(`Use --reset with --dev.`),_.exit(1);return}g(!0),y(!!t.verbose),t.claudeCliLogs&&(f([`agent/claude-cli`]),process.env.OPENCLAW_CLAUDE_CLI_LOG_OUTPUT=`1`);let i=t.compact?`compact`:t.wsLog,s=i===`compact`?`compact`:i===`full`?`full`:`auto`;i!==void 0&&i!==`auto`&&i!==`compact`&&i!==`full`&&(_.error(`Invalid --ws-log (use "auto", "full", "compact")`),_.exit(1)),Jd(s),t.rawStream&&(process.env.OPENCLAW_RAW_STREAM=`1`);let c=bd(t.rawStreamPath);c&&(process.env.OPENCLAW_RAW_STREAM_PATH=c),r&&await sM({reset:!!t.reset});let l=H(),u=ed(t.port);t.port!==void 0&&u===null&&(_.error(`Invalid port`),_.exit(1));let d=u??o(l);(!Number.isFinite(d)||d<=0)&&(_.error(`Invalid port`),_.exit(1));let p=bd(t.bind)??l.gateway?.bind??`loopback`,m=p===`loopback`||p===`lan`||p===`auto`||p===`custom`||p===`tailnet`?p:null;if(!m){_.error(`Invalid --bind (use "loopback", "lan", "tailnet", "auto", or "custom")`),_.exit(1);return}if(process.env.OPENCLAW_SERVICE_MARKER?.trim()){let e=Ul(d);e.length>0&&gM.info(`service-mode: cleared ${e.length} stale gateway pid(s) before bind on port ${d}`)}if(t.force)try{let{killed:e,waitedMs:t,escalatedToSigkill:n}=await Bu(d,{timeoutMs:2e3,intervalMs:100,sigtermTimeoutMs:700});if(e.length===0)gM.info(`force: no listeners on port ${d}`);else{for(let t of e)gM.info(`force: killed pid ${t.pid}${t.command?` (${t.command})`:``} on port ${d}`);n&&gM.info(`force: escalated to SIGKILL while freeing port ${d}`),t>0&&gM.info(`force: waited ${t}ms for port ${d} to free`)}let r=await zu(d,{timeoutMs:3e3,intervalMs:150,host:m===`loopback`?`127.0.0.1`:m===`lan`?`0.0.0.0`:m===`custom`?bd(l.gateway?.customBindHost):void 0});r>0&&gM.info(`force: waited ${r}ms for port ${d} to become bindable`)}catch(e){_.error(`Force: ${String(e)}`),_.exit(1);return}if(t.token){let e=bd(t.token);e&&(process.env.OPENCLAW_GATEWAY_TOKEN=e)}let h=bd(t.auth),v=CM(h,yM);if(h&&!v){_.error(`Invalid --auth (use ${TM(yM)})`),_.exit(1);return}let b=bd(t.tailscale),x=CM(b,bM);if(b&&!x){_.error(`Invalid --tailscale (use ${TM(bM)})`),_.exit(1);return}let S;try{S=SM(t)}catch(e){_.error(e instanceof Error?e.message:String(e)),_.exit(1);return}bd(t.password)&&xM();let C=bd(t.token),w=await Ge().catch(()=>null),T=w?.exists??J.existsSync(a),E=Y.join(e(process.env),`logs`,`config-audit.jsonl`),O=l.gateway?.mode;if(!t.allowUnconfigured&&O!==`local`){T?(_.error(`Gateway start blocked: set gateway.mode=local (current: ${O??`unset`}) or pass --allow-unconfigured.`),_.error(`Config write audit: ${E}`)):_.error(`Missing config. Run \`${$a(`openclaw setup`)}\` or set gateway.mode=local (or pass --allow-unconfigured).`),_.exit(1);return}let k=xd(w?.parsed),A=v||S||C||h?{...v?{mode:v}:{},...C?{token:C}:{},...S?{password:S}:{}}:void 0,j=D({authConfig:l.gateway?.auth,authOverride:A,env:process.env,tailscaleMode:x??l.gateway?.tailscale?.mode??`off`}),M=j.mode,N=j.token,P=j.password,ee=typeof N==`string`&&N.trim().length>0,F=typeof P==`string`&&P.trim().length>0,I=ee||Qa(A?.token??l.gateway?.auth?.token,l.secrets?.defaults),L=F||Qa(A?.password??l.gateway?.auth?.password,l.secrets?.defaults),te=M===`token`&&I||M===`password`&&L,R=M===`token`&&!I,z=[];if(k.hasGatewayToken&&z.push(`Found "gateway.token" in config. Use "gateway.auth.token" instead.`),k.hasRemoteToken&&z.push(`"gateway.remote.token" is for remote CLI calls; it does not enable local gateway auth.`),M===`password`&&!L){_.error([`Gateway auth is set to password, but no password is configured.`,`Set gateway.auth.password (or OPENCLAW_GATEWAY_PASSWORD), or pass --password.`,...z].filter(Boolean).join(`
209
209
  `)),_.exit(1);return}if(M===`none`&&gM.warn(`Gateway auth mode=none explicitly configured; all gateway connections are unauthenticated.`),m!==`loopback`&&!te&&!R&&M!==`trusted-proxy`){_.error([`Refusing to bind gateway to ${m} without auth.`,`Set gateway.auth.token/password (or OPENCLAW_GATEWAY_TOKEN/OPENCLAW_GATEWAY_PASSWORD) or pass --token/--password.`,...z].filter(Boolean).join(`
210
- `)),_.exit(1);return}let ne=x||t.tailscaleResetOnExit?{...x?{mode:x}:{},...t.tailscaleResetOnExit?{resetOnExit:!0}:{}}:void 0;try{await hM({runtime:_,lockPort:d,start:async()=>await $j(d,{bind:m,auth:A,tailscale:ne})})}catch(e){if(e instanceof DA||e&&typeof e==`object`&&e.name===`GatewayLockError`){let t=Cd(e);_.error(`Gateway failed to start: ${t}\nIf the gateway is supervised, stop it with: ${$a(`openclaw gateway stop`)}`);try{let e=await Qt(d);if(e.status===`busy`)for(let t of at(e))_.error(t)}catch{}await Sd(),_.exit(1);return}_.error(`Gateway failed to start: ${String(e)}`),_.exit(1)}}function OM(e){return e.option(`--port <port>`,`Port for the gateway WebSocket`).option(`--bind <mode>`,`Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).`).option(`--token <token>`,`Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if set)`).option(`--auth <mode>`,`Gateway auth mode (${wM(yM)})`).option(`--password <password>`,`Password for auth mode=password`).option(`--password-file <path>`,`Read gateway password from file`).option(`--tailscale <mode>`,`Tailscale exposure mode (${wM(bM)})`).option(`--tailscale-reset-on-exit`,`Reset Tailscale serve/funnel configuration on shutdown`,!1).option(`--allow-unconfigured`,`Allow gateway start without gateway.mode=local in config`,!1).option(`--dev`,`Create a dev config + workspace if missing (no BOOTSTRAP.md)`,!1).option(`--reset`,`Reset dev config + credentials + sessions + workspace (requires --dev)`,!1).option(`--force`,`Kill any existing listener on the target port before starting`,!1).option(`--verbose`,`Verbose logging to stdout/stderr`,!1).option(`--claude-cli-logs`,`Only show claude-cli logs in the console (includes stdout/stderr)`,!1).option(`--ws-log <style>`,`WebSocket log style ("auto"|"full"|"compact")`,`auto`).option(`--compact`,`Alias for "--ws-log compact"`,!1).option(`--raw-stream`,`Log raw model stream events to jsonl`,!1).option(`--raw-stream-path <path>`,`Raw stream jsonl path`).action(async(e,t)=>{await DM(EM(e,t))})}function kM(e,t){return uu(_,e,e=>{let n=String(e);_.error(t?`${t}: ${n}`:n),_.exit(1)})}function AM(e,t=30){if(typeof e==`number`&&Number.isFinite(e))return Math.max(1,Math.floor(e));if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return Math.max(1,Math.floor(t))}return t}function jM(e,t){let n=Wu(t,`token`),r=Wu(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function MM(e,t,n){let r=au(e.totals.totalCost)??`$0.00`,i=iu(e.totals.totalTokens)??`0`,a=[u(n,s.heading,`Usage cost (${t} days)`),`${u(n,s.muted,`Total:`)} ${r} · ${i} tokens`];e.totals.missingCostEntries>0&&a.push(`${u(n,s.muted,`Missing entries:`)} ${e.totals.missingCostEntries}`);let o=e.daily.at(-1);if(o){let e=au(o.totalCost)??`$0.00`,t=iu(o.totalTokens)??`0`;a.push(`${u(n,s.muted,`Latest day:`)} ${o.date} · ${e} · ${t} tokens`)}return a}function NM(e){let t=OM(e.command(`gateway`).description(`Run, inspect, and query the WebSocket Gateway`).addHelpText(`after`,()=>`\n${s.heading(`Examples:`)}\n${du([[`openclaw gateway run`,`Run the gateway in the foreground.`],[`openclaw gateway status`,`Show service status and probe reachability.`],[`openclaw gateway discover`,`Find local and wide-area gateway beacons.`],[`openclaw gateway call health`,`Call a gateway RPC method directly.`]])}\n\n${s.muted(`Docs:`)} ${lu(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`));OM(t.command(`run`).description(`Run the WebSocket Gateway (foreground)`)),nd(t,{statusDescription:`Show gateway service status + probe the Gateway`}),op(t.command(`call`).description(`Call a Gateway method`).argument(`<method>`,`Method name (health/status/system-presence/cron.*)`).option(`--params <json>`,`JSON object string for params`,`{}`).action(async(e,t,n)=>{await kM(async()=>{let r=jM(t,n),i=await ze(),a=JSON.parse(String(t.params??`{}`)),o=await sp(e,{...r,config:i},a);if(r.json){_.log(JSON.stringify(o,null,2));return}let c=m();_.log(`${u(c,s.heading,`Gateway call`)}: ${u(c,s.muted,String(e))}`),_.log(JSON.stringify(o,null,2))},`Gateway call failed`)})),op(t.command(`usage-cost`).description(`Fetch usage cost summary from session logs`).option(`--days <days>`,`Number of days to include`,`30`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=AM(e.days),i=await ze(),a=await sp(`usage.cost`,{...n,config:i},{days:r});if(n.json){_.log(JSON.stringify(a,null,2));return}let o=m(),s=a;for(let e of MM(s,r,o))_.log(e)},`Gateway usage cost failed`)})),op(t.command(`health`).description(`Fetch Gateway health`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=await ze(),i=await sp(`health`,{...n,config:r});if(n.json){_.log(JSON.stringify(i,null,2));return}let a=m(),o=i&&typeof i==`object`?i:{},c=typeof o.durationMs==`number`?o.durationMs:null;if(_.log(u(a,s.heading,`Gateway Health`)),_.log(`${u(a,s.success,`OK`)}${c==null?``:` (${c}ms)`}`),o.channels&&typeof o.channels==`object`)for(let e of jd(o))_.log(Dd(e,a))})})),t.command(`probe`).description(`Show gateway reachability + discovery + health + status summary (local + remote)`).option(`--url <url>`,`Explicit Gateway WebSocket URL (still probes localhost)`).option(`--ssh <target>`,`SSH target for remote gateway tunnel (user@host or user@host:port)`).option(`--ssh-identity <path>`,`SSH identity file path`).option(`--ssh-auto`,`Try to derive an SSH target from Bonjour discovery`,!1).option(`--token <token>`,`Gateway token (applies to all probes)`).option(`--password <password>`,`Gateway password (applies to all probes)`).option(`--timeout <ms>`,`Overall probe budget in ms`,`3000`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await kM(async()=>{await np(jM(e,t),_)})}),t.command(`discover`).description(`Discover gateways via Bonjour (local + wide-area if configured)`).option(`--timeout <ms>`,`Per-command timeout in ms`,`2000`).option(`--json`,`Output JSON`,!1).action(async e=>{await kM(async()=>{let t=vd({configDomain:(await ze()).discovery?.wideArea?.domain}),n=cp(e.timeout,2e3),r=[`local.`,...t?[t]:[]],i=dp(await fu({label:`Scanning for gateways…`,indeterminate:!0,enabled:e.json!==!0,delayMs:0},async()=>await wd({timeoutMs:n,wideAreaDomain:t}))).toSorted((e,t)=>String(e.displayName||e.instanceName).localeCompare(String(t.displayName||t.instanceName)));if(e.json){let e=i.map(e=>{let t=lp(e),n=up(e);return{...e,wsUrl:t?`ws://${t}:${n}`:null}});_.log(JSON.stringify({timeoutMs:n,domains:r,count:e.length,beacons:e},null,2));return}let a=m();if(_.log(u(a,s.heading,`Gateway Discovery`)),_.log(u(a,s.muted,`Found ${i.length} gateway(s) · domains: ${r.join(`, `)}`)),i.length!==0)for(let e of i)for(let t of fp(e,a))_.log(t)},`gateway discover failed`)})}export{NM as registerGatewayCli};
210
+ `)),_.exit(1);return}let ne=x||t.tailscaleResetOnExit?{...x?{mode:x}:{},...t.tailscaleResetOnExit?{resetOnExit:!0}:{}}:void 0;try{await hM({runtime:_,lockPort:d,start:async()=>await $j(d,{bind:m,auth:A,tailscale:ne})})}catch(e){if(e instanceof DA||e&&typeof e==`object`&&e.name===`GatewayLockError`){let t=Cd(e);_.error(`Gateway failed to start: ${t}\nIf the gateway is supervised, stop it with: ${$a(`openclaw gateway stop`)}`);try{let e=await Qt(d);if(e.status===`busy`)for(let t of at(e))_.error(t)}catch{}await Sd(),_.exit(1);return}_.error(`Gateway failed to start: ${String(e)}`),_.exit(1)}}function OM(e){return e.option(`--port <port>`,`Port for the gateway WebSocket`).option(`--bind <mode>`,`Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).`).option(`--token <token>`,`Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if set)`).option(`--auth <mode>`,`Gateway auth mode (${wM(yM)})`).option(`--password <password>`,`Password for auth mode=password`).option(`--password-file <path>`,`Read gateway password from file`).option(`--tailscale <mode>`,`Tailscale exposure mode (${wM(bM)})`).option(`--tailscale-reset-on-exit`,`Reset Tailscale serve/funnel configuration on shutdown`,!1).option(`--allow-unconfigured`,`Allow gateway start without gateway.mode=local in config`,!1).option(`--dev`,`Create a dev config + workspace if missing (no BOOTSTRAP.md)`,!1).option(`--reset`,`Reset dev config + credentials + sessions + workspace (requires --dev)`,!1).option(`--force`,`Kill any existing listener on the target port before starting`,!1).option(`--verbose`,`Verbose logging to stdout/stderr`,!1).option(`--claude-cli-logs`,`Only show claude-cli logs in the console (includes stdout/stderr)`,!1).option(`--ws-log <style>`,`WebSocket log style ("auto"|"full"|"compact")`,`auto`).option(`--compact`,`Alias for "--ws-log compact"`,!1).option(`--raw-stream`,`Log raw model stream events to jsonl`,!1).option(`--raw-stream-path <path>`,`Raw stream jsonl path`).action(async(e,t)=>{await DM(EM(e,t))})}function kM(e,t){return uu(_,e,e=>{let n=String(e);_.error(t?`${t}: ${n}`:n),_.exit(1)})}function AM(e,t=30){if(typeof e==`number`&&Number.isFinite(e))return Math.max(1,Math.floor(e));if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return Math.max(1,Math.floor(t))}return t}function jM(e,t){let n=Wu(t,`token`),r=Wu(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function MM(e,t,n){let r=au(e.totals.totalCost)??`$0.00`,i=iu(e.totals.totalTokens)??`0`,a=[u(n,s.heading,`Usage cost (${t} days)`),`${u(n,s.muted,`Total:`)} ${r} · ${i} tokens`];e.totals.missingCostEntries>0&&a.push(`${u(n,s.muted,`Missing entries:`)} ${e.totals.missingCostEntries}`);let o=e.daily.at(-1);if(o){let e=au(o.totalCost)??`$0.00`,t=iu(o.totalTokens)??`0`;a.push(`${u(n,s.muted,`Latest day:`)} ${o.date} · ${e} · ${t} tokens`)}return a}function NM(e){let t=OM(e.command(`gateway`).description(`Run, inspect, and query the WebSocket Gateway`).addHelpText(`after`,()=>`\n${s.heading(`Examples:`)}\n${du([[`openclaw gateway run`,`Run the gateway in the foreground.`],[`openclaw gateway status`,`Show service status and probe reachability.`],[`openclaw gateway discover`,`Find local and wide-area gateway beacons.`],[`openclaw gateway call health`,`Call a gateway RPC method directly.`]])}\n\n${s.muted(`Docs:`)} ${lu(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`));OM(t.command(`run`).description(`Run the WebSocket Gateway (foreground)`)),nd(t,{statusDescription:`Show gateway service status + probe the Gateway`}),op(t.command(`call`).description(`Call a Gateway method`).argument(`<method>`,`Method name (health/status/system-presence/cron.*)`).option(`--params <json>`,`JSON object string for params`,`{}`).action(async(e,t,n)=>{await kM(async()=>{let r=jM(t,n),i=await ze(),a=JSON.parse(String(t.params??`{}`)),o=await sp(e,{...r,config:i},a);if(r.json){_.log(JSON.stringify(o,null,2));return}let c=m();_.log(`${u(c,s.heading,`Gateway call`)}: ${u(c,s.muted,String(e))}`),_.log(JSON.stringify(o,null,2))},`Gateway call failed`)})),op(t.command(`usage-cost`).description(`Fetch usage cost summary from session logs`).option(`--days <days>`,`Number of days to include`,`30`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=AM(e.days),i=await ze(),a=await sp(`usage.cost`,{...n,config:i},{days:r});if(n.json){_.log(JSON.stringify(a,null,2));return}let o=m(),s=a;for(let e of MM(s,r,o))_.log(e)},`Gateway usage cost failed`)})),op(t.command(`health`).description(`Fetch Gateway health`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=await ze(),i=await sp(`health`,{...n,config:r});if(n.json){_.log(JSON.stringify(i,null,2));return}let a=m(),o=i&&typeof i==`object`?i:{},c=typeof o.durationMs==`number`?o.durationMs:null;if(_.log(u(a,s.heading,`Gateway Health`)),_.log(`${u(a,s.success,`OK`)}${c==null?``:` (${c}ms)`}`),o.channels&&typeof o.channels==`object`)for(let e of jd(o))_.log(Dd(e,a))})})),t.command(`probe`).description(`Show gateway reachability + discovery + health + status summary (local + remote)`).option(`--url <url>`,`Explicit Gateway WebSocket URL (still probes localhost)`).option(`--ssh <target>`,`SSH target for remote gateway tunnel (user@host or user@host:port)`).option(`--ssh-identity <path>`,`SSH identity file path`).option(`--ssh-auto`,`Try to derive an SSH target from Bonjour discovery`,!1).option(`--token <token>`,`Gateway token (applies to all probes)`).option(`--password <password>`,`Gateway password (applies to all probes)`).option(`--timeout <ms>`,`Overall probe budget in ms`,`3000`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await kM(async()=>{await np(jM(e,t),_)})}),t.command(`discover`).description(`Discover gateways via Bonjour (local + wide-area if configured)`).option(`--timeout <ms>`,`Per-command timeout in ms`,`2000`).option(`--json`,`Output JSON`,!1).action(async e=>{await kM(async()=>{let t=vd({configDomain:(await ze()).discovery?.wideArea?.domain}),n=cp(e.timeout,2e3),r=[`local.`,...t?[t]:[]],i=dp(await fu({label:`Scanning for gateways…`,indeterminate:!0,enabled:e.json!==!0,delayMs:0},async()=>await wd({timeoutMs:n,wideAreaDomain:t}))).toSorted((e,t)=>String(e.displayName||e.instanceName).localeCompare(String(t.displayName||t.instanceName)));if(e.json){let e=i.map(e=>{let t=lp(e),n=up(e);return{...e,wsUrl:t?`ws://${t}:${n}`:null}});_.log(JSON.stringify({timeoutMs:n,domains:r,count:e.length,beacons:e},null,2));return}let a=m();if(_.log(u(a,s.heading,`Gateway Discovery`)),_.log(u(a,s.muted,`Found ${i.length} gateway(s) · domains: ${r.join(`, `)}`)),i.length!==0)for(let e of i)for(let t of fp(e,a))_.log(t)},`gateway discover failed`)})}export{NM as registerGatewayCli};
@@ -207,4 +207,4 @@ Add your local tool notes here.
207
207
  - Notes:
208
208
  `)]);await aM(J.join(t,`AGENTS.md`),n),await aM(J.join(t,`SOUL.md`),r),await aM(J.join(t,`TOOLS.md`),i),await aM(J.join(t,`IDENTITY.md`),a),await aM(J.join(t,`USER.md`),o)}async function sM(e){let t=iM();e.reset&&await yu(`full`,t,u);let n=V().configPath,r=Y.existsSync(n);!e.reset&&r||(await O({gateway:{mode:`local`,bind:`loopback`},agents:{defaults:{workspace:t,skipBootstrap:!0},list:[{id:`dev`,default:!0,workspace:t,identity:{name:eM,theme:tM,emoji:nM}}]}}),await oM(t),u.log(`Dev config ready: ${rr(n)}`),u.log(`Dev workspace ready: ${rr(nr(t))}`))}const cM={launchd:[`LAUNCH_JOB_LABEL`,`LAUNCH_JOB_NAME`,`XPC_SERVICE_NAME`,`OPENCLAW_LAUNCHD_LABEL`],systemd:[`OPENCLAW_SYSTEMD_UNIT`,`INVOCATION_ID`,`SYSTEMD_EXEC_PID`,`JOURNAL_STREAM`],schtasks:[`OPENCLAW_WINDOWS_TASK_NAME`]};[...cM.launchd,...cM.systemd,...cM.schtasks];function lM(e,t){return t.some(t=>{let n=e[t];return typeof n==`string`&&n.trim().length>0})}function uM(e=process.env,t=process.platform){if(t===`darwin`)return lM(e,cM.launchd)?`launchd`:null;if(t===`linux`)return lM(e,cM.systemd)?`systemd`:null;if(t===`win32`){if(lM(e,cM.schtasks))return`schtasks`;let t=e.OPENCLAW_SERVICE_MARKER?.trim(),n=e.OPENCLAW_SERVICE_KIND?.trim();return t&&n===`gateway`?`schtasks`:null}return null}function dM(e){if(!e)return!1;let t=e.trim().toLowerCase();return t===`1`||t===`true`||t===`yes`||t===`on`}function fM(){if(dM(process.env.OPENCLAW_NO_RESPAWN))return{mode:`disabled`};let e=uM(process.env);if(e){if(e===`launchd`){let e=Zu({env:process.env,mode:`start-after-exit`,waitForPid:process.pid});return e.ok?{mode:`supervised`,detail:`launchd restart handoff pid ${e.pid??`unknown`}`}:{mode:`supervised`,detail:`launchd exit fallback (${e.detail??`restart handoff failed`})`}}if(e===`schtasks`){let e=Jl();if(!e.ok)return{mode:`failed`,detail:e.detail??`${e.method} restart failed`}}return{mode:`supervised`}}if(process.platform===`win32`)return{mode:`disabled`,detail:`win32: detached respawn unsupported without Scheduled Task markers`};try{let e=[...process.execArgv,...process.argv.slice(1)],t=hf(process.execPath,e,{env:process.env,detached:!0,stdio:`inherit`});return t.unref(),{mode:`spawned`,pid:t.pid??void 0}}catch(e){return{mode:`failed`,detail:e instanceof Error?e.message:String(e)}}}function pM(e){let t=!0;return()=>t?(t=!1,!1):(e(),!0)}const mM=d(`gateway`);async function hM(e){let t=await PA({port:e.lockPort}),n=null,r=!1,i=null,a=()=>{process.removeListener(`SIGTERM`,m),process.removeListener(`SIGINT`,h),process.removeListener(`SIGUSR1`,g)},o=t=>{a(),e.runtime.exit(t)},s=async()=>t?(await t.release(),t=null,!0):!1,c=async()=>{try{return t=await PA({port:e.lockPort}),!0}catch(e){return mM.error(`failed to reacquire gateway lock for in-process restart: ${String(e)}`),o(1),!1}},l=async()=>{let e=await s(),t=fM();if(t.mode===`spawned`||t.mode===`supervised`){let e=t.mode===`spawned`?`spawned pid ${t.pid??`unknown`}`:`supervisor restart`;mM.info(`restart mode: full process restart (${e})`),o(0);return}t.mode===`failed`?mM.warn(`full process restart failed (${t.detail??`unknown error`}); falling back to in-process restart`):mM.info(`restart mode: in-process restart (${t.detail??`OPENCLAW_NO_RESPAWN`})`),!(e&&!await c())&&(r=!1,i?.())},u=async()=>{await s(),o(0)},d=9e4,f=5e3,p=(e,t)=>{if(r){mM.info(`received ${t} during shutdown; ignoring`);return}r=!0;let i=e===`restart`;mM.info(`received ${t}; ${i?`restarting`:`shutting down`}`);let a=i?d+f:f,s=setTimeout(()=>{mM.error(`shutdown timed out; exiting without full cleanup`),o(i?1:0)},a);(async()=>{try{if(i){oo();let e=Ri(),t=po();if(t>0&&za(void 0,{mode:`compacting`}),e>0||t>0){mM.info(`draining ${e} active task(s) and ${t} active embedded run(s) before restart (timeout ${d}ms)`);let[n,r]=await Promise.all([e>0?ka(d):Promise.resolve({drained:!0}),t>0?_a(d):Promise.resolve({drained:!0})]);n.drained&&r.drained?mM.info(`all active work drained`):(mM.warn(`drain timeout reached; proceeding with restart`),za(void 0,{mode:`all`}))}}await n?.close({reason:i?`gateway restarting`:`gateway stopping`,restartExpectedMs:i?1500:null})}catch(e){mM.error(`shutdown error: ${String(e)}`)}finally{clearTimeout(s),n=null,i?await l():await u()}})()},m=()=>{mM.info(`signal SIGTERM received`),p(`stop`,`SIGTERM`)},h=()=>{mM.info(`signal SIGINT received`),p(`stop`,`SIGINT`)},g=()=>{if(mM.info(`signal SIGUSR1 received`),!Wl()&&!zl()){mM.warn(`SIGUSR1 restart ignored (not authorized; commands.restart=false or use gateway tool).`);return}Gl(),p(`restart`,`SIGUSR1`)};process.on(`SIGTERM`,m),process.on(`SIGINT`,h),process.on(`SIGUSR1`,g);try{let t=pM(()=>{Ua()}),r=!0;for(;;){t();try{n=await e.start(),r=!1}catch(e){if(r)throw e;n=null,await s();let t=e instanceof Error?e.message:String(e),i=e instanceof Error&&e.stack?`\n${e.stack}`:``;mM.error(`gateway startup failed: ${t}. Process will stay alive; fix the issue and restart.${i}`)}await new Promise(e=>{i=e})}}finally{await s(),a()}}const gM=d(`gateway`),_M=[`port`,`bind`,`token`,`auth`,`password`,`passwordFile`,`tailscale`,`wsLog`,`rawStreamPath`],vM=[`tailscaleResetOnExit`,`allowUnconfigured`,`dev`,`reset`,`force`,`verbose`,`claudeCliLogs`,`compact`,`rawStream`],yM=[`none`,`token`,`password`,`trusted-proxy`],bM=[`off`,`serve`,`funnel`];function xM(){u.error(`Warning: --password can be exposed via process listings. Prefer --password-file or OPENCLAW_GATEWAY_PASSWORD.`)}function SM(e){let t=vd(e.password),n=vd(e.passwordFile);if(t&&n)throw Error(`Use either --password or --password-file.`);return n?Vu(n,`Gateway password`):t}function CM(e,t){return e&&t.includes(e)?e:null}function wM(e){return e.map(e=>`"${e}"`).join(`|`)}function TM(e){let t=e.map(e=>`"${e}"`);return t.length===0?``:t.length===1?t[0]:t.length===2?`${t[0]} or ${t[1]}`:`${t.slice(0,-1).join(`, `)}, or ${t[t.length-1]}`}function EM(e,t){let n={...e};for(let e of _M){let r=Hu(t,e);if(e===`wsLog`){n[e]=r??n[e];continue}n[e]=n[e]??r}for(let e of vM){let r=Hu(t,e);n[e]=!!(n[e]||r)}return n}async function DM(e){let t=process.env.OPENCLAW_PROFILE?.trim().toLowerCase()===`dev`,n=!!e.dev||t;if(e.reset&&!n){u.error(`Use --reset with --dev.`),u.exit(1);return}l(!0),f(!!e.verbose),e.claudeCliLogs&&(a([`agent/claude-cli`]),process.env.OPENCLAW_CLAUDE_CLI_LOG_OUTPUT=`1`);let r=e.compact?`compact`:e.wsLog,i=r===`compact`?`compact`:r===`full`?`full`:`auto`;r!==void 0&&r!==`auto`&&r!==`compact`&&r!==`full`&&(u.error(`Invalid --ws-log (use "auto", "full", "compact")`),u.exit(1)),Kd(i),e.rawStream&&(process.env.OPENCLAW_RAW_STREAM=`1`);let o=vd(e.rawStreamPath);o&&(process.env.OPENCLAW_RAW_STREAM_PATH=o),n&&await sM({reset:!!e.reset});let s=H(),c=Qu(e.port);e.port!==void 0&&c===null&&(u.error(`Invalid port`),u.exit(1));let d=c??y(s);(!Number.isFinite(d)||d<=0)&&(u.error(`Invalid port`),u.exit(1));let m=vd(e.bind)??s.gateway?.bind??`loopback`,h=m===`loopback`||m===`lan`||m===`auto`||m===`custom`||m===`tailnet`?m:null;if(!h){u.error(`Invalid --bind (use "loopback", "lan", "tailnet", "auto", or "custom")`),u.exit(1);return}if(process.env.OPENCLAW_SERVICE_MARKER?.trim()){let e=Vl(d);e.length>0&&gM.info(`service-mode: cleared ${e.length} stale gateway pid(s) before bind on port ${d}`)}if(e.force)try{let{killed:e,waitedMs:t,escalatedToSigkill:n}=await pf(d,{timeoutMs:2e3,intervalMs:100,sigtermTimeoutMs:700});if(e.length===0)gM.info(`force: no listeners on port ${d}`);else{for(let t of e)gM.info(`force: killed pid ${t.pid}${t.command?` (${t.command})`:``} on port ${d}`);n&&gM.info(`force: escalated to SIGKILL while freeing port ${d}`),t>0&&gM.info(`force: waited ${t}ms for port ${d} to free`)}let r=await mf(d,{timeoutMs:3e3,intervalMs:150,host:h===`loopback`?`127.0.0.1`:h===`lan`?`0.0.0.0`:h===`custom`?vd(s.gateway?.customBindHost):void 0});r>0&&gM.info(`force: waited ${r}ms for port ${d} to become bindable`)}catch(e){u.error(`Force: ${String(e)}`),u.exit(1);return}if(e.token){let t=vd(e.token);t&&(process.env.OPENCLAW_GATEWAY_TOKEN=t)}let g=vd(e.auth),_=CM(g,yM);if(g&&!_){u.error(`Invalid --auth (use ${TM(yM)})`),u.exit(1);return}let b=vd(e.tailscale),x=CM(b,bM);if(b&&!x){u.error(`Invalid --tailscale (use ${TM(bM)})`),u.exit(1);return}let S;try{S=SM(e)}catch(e){u.error(e instanceof Error?e.message:String(e)),u.exit(1);return}vd(e.password)&&xM();let C=vd(e.token),w=await L().catch(()=>null),T=w?.exists??Y.existsSync(v),E=J.join(p(process.env),`logs`,`config-audit.jsonl`),D=s.gateway?.mode;if(!e.allowUnconfigured&&D!==`local`){T?(u.error(`Gateway start blocked: set gateway.mode=local (current: ${D??`unset`}) or pass --allow-unconfigured.`),u.error(`Config write audit: ${E}`)):u.error(`Missing config. Run \`${hn(`openclaw setup`)}\` or set gateway.mode=local (or pass --allow-unconfigured).`),u.exit(1);return}let O=yd(w?.parsed),k=_||S||C||g?{..._?{mode:_}:{},...C?{token:C}:{},...S?{password:S}:{}}:void 0,A=ke({authConfig:s.gateway?.auth,authOverride:k,env:process.env,tailscaleMode:x??s.gateway?.tailscale?.mode??`off`}),j=A.mode,M=A.token,N=A.password,ee=typeof M==`string`&&M.trim().length>0,te=typeof N==`string`&&N.trim().length>0,P=ee||dr(k?.token??s.gateway?.auth?.token,s.secrets?.defaults),F=te||dr(k?.password??s.gateway?.auth?.password,s.secrets?.defaults),ne=j===`token`&&P||j===`password`&&F,re=j===`token`&&!P,I=[];if(O.hasGatewayToken&&I.push(`Found "gateway.token" in config. Use "gateway.auth.token" instead.`),O.hasRemoteToken&&I.push(`"gateway.remote.token" is for remote CLI calls; it does not enable local gateway auth.`),j===`password`&&!F){u.error([`Gateway auth is set to password, but no password is configured.`,`Set gateway.auth.password (or OPENCLAW_GATEWAY_PASSWORD), or pass --password.`,...I].filter(Boolean).join(`
209
209
  `)),u.exit(1);return}if(j===`none`&&gM.warn(`Gateway auth mode=none explicitly configured; all gateway connections are unauthenticated.`),h!==`loopback`&&!ne&&!re&&j!==`trusted-proxy`){u.error([`Refusing to bind gateway to ${h} without auth.`,`Set gateway.auth.token/password (or OPENCLAW_GATEWAY_TOKEN/OPENCLAW_GATEWAY_PASSWORD) or pass --token/--password.`,...I].filter(Boolean).join(`
210
- `)),u.exit(1);return}let R=x||e.tailscaleResetOnExit?{...x?{mode:x}:{},...e.tailscaleResetOnExit?{resetOnExit:!0}:{}}:void 0;try{await hM({runtime:u,lockPort:d,start:async()=>await $j(d,{bind:h,auth:k,tailscale:R})})}catch(e){if(e instanceof DA||e&&typeof e==`object`&&e.name===`GatewayLockError`){let t=xd(e);u.error(`Gateway failed to start: ${t}\nIf the gateway is supervised, stop it with: ${hn(`openclaw gateway stop`)}`);try{let e=await de(d);if(e.status===`busy`)for(let t of He(e))u.error(t)}catch{}await bd(),u.exit(1);return}u.error(`Gateway failed to start: ${String(e)}`),u.exit(1)}}function OM(e){return e.option(`--port <port>`,`Port for the gateway WebSocket`).option(`--bind <mode>`,`Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).`).option(`--token <token>`,`Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if set)`).option(`--auth <mode>`,`Gateway auth mode (${wM(yM)})`).option(`--password <password>`,`Password for auth mode=password`).option(`--password-file <path>`,`Read gateway password from file`).option(`--tailscale <mode>`,`Tailscale exposure mode (${wM(bM)})`).option(`--tailscale-reset-on-exit`,`Reset Tailscale serve/funnel configuration on shutdown`,!1).option(`--allow-unconfigured`,`Allow gateway start without gateway.mode=local in config`,!1).option(`--dev`,`Create a dev config + workspace if missing (no BOOTSTRAP.md)`,!1).option(`--reset`,`Reset dev config + credentials + sessions + workspace (requires --dev)`,!1).option(`--force`,`Kill any existing listener on the target port before starting`,!1).option(`--verbose`,`Verbose logging to stdout/stderr`,!1).option(`--claude-cli-logs`,`Only show claude-cli logs in the console (includes stdout/stderr)`,!1).option(`--ws-log <style>`,`WebSocket log style ("auto"|"full"|"compact")`,`auto`).option(`--compact`,`Alias for "--ws-log compact"`,!1).option(`--raw-stream`,`Log raw model stream events to jsonl`,!1).option(`--raw-stream-path <path>`,`Raw stream jsonl path`).action(async(e,t)=>{await DM(EM(e,t))})}function kM(e,t){return Eu(u,e,e=>{let n=String(e);u.error(t?`${t}: ${n}`:n),u.exit(1)})}function AM(e,t=30){if(typeof e==`number`&&Number.isFinite(e))return Math.max(1,Math.floor(e));if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return Math.max(1,Math.floor(t))}return t}function jM(e,t){let n=Hu(t,`token`),r=Hu(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function MM(t,n,i){let a=yl(t.totals.totalCost)??`$0.00`,o=vl(t.totals.totalTokens)??`0`,s=[r(i,e.heading,`Usage cost (${n} days)`),`${r(i,e.muted,`Total:`)} ${a} · ${o} tokens`];t.totals.missingCostEntries>0&&s.push(`${r(i,e.muted,`Missing entries:`)} ${t.totals.missingCostEntries}`);let c=t.daily.at(-1);if(c){let t=yl(c.totalCost)??`$0.00`,n=vl(c.totalTokens)??`0`;s.push(`${r(i,e.muted,`Latest day:`)} ${c.date} · ${t} · ${n} tokens`)}return s}function NM(t){let n=OM(t.command(`gateway`).description(`Run, inspect, and query the WebSocket Gateway`).addHelpText(`after`,()=>`\n${e.heading(`Examples:`)}\n${Du([[`openclaw gateway run`,`Run the gateway in the foreground.`],[`openclaw gateway status`,`Show service status and probe reachability.`],[`openclaw gateway discover`,`Find local and wide-area gateway beacons.`],[`openclaw gateway call health`,`Call a gateway RPC method directly.`]])}\n\n${e.muted(`Docs:`)} ${Tu(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`));OM(n.command(`run`).description(`Run the WebSocket Gateway (foreground)`)),ed(n,{statusDescription:`Show gateway service status + probe the Gateway`}),op(n.command(`call`).description(`Call a Gateway method`).argument(`<method>`,`Method name (health/status/system-presence/cron.*)`).option(`--params <json>`,`JSON object string for params`,`{}`).action(async(t,n,i)=>{await kM(async()=>{let a=jM(n,i),o=await Ce(),c=JSON.parse(String(n.params??`{}`)),l=await sp(t,{...a,config:o},c);if(a.json){u.log(JSON.stringify(l,null,2));return}let d=s();u.log(`${r(d,e.heading,`Gateway call`)}: ${r(d,e.muted,String(t))}`),u.log(JSON.stringify(l,null,2))},`Gateway call failed`)})),op(n.command(`usage-cost`).description(`Fetch usage cost summary from session logs`).option(`--days <days>`,`Number of days to include`,`30`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=AM(e.days),i=await Ce(),a=await sp(`usage.cost`,{...n,config:i},{days:r});if(n.json){u.log(JSON.stringify(a,null,2));return}let o=s(),c=a;for(let e of MM(c,r,o))u.log(e)},`Gateway usage cost failed`)})),op(n.command(`health`).description(`Fetch Gateway health`).action(async(t,n)=>{await kM(async()=>{let i=jM(t,n),a=await Ce(),o=await sp(`health`,{...i,config:a});if(i.json){u.log(JSON.stringify(o,null,2));return}let c=s(),l=o&&typeof o==`object`?o:{},d=typeof l.durationMs==`number`?l.durationMs:null;if(u.log(r(c,e.heading,`Gateway Health`)),u.log(`${r(c,e.success,`OK`)}${d==null?``:` (${d}ms)`}`),l.channels&&typeof l.channels==`object`)for(let e of kd(l))u.log(Td(e,c))})})),n.command(`probe`).description(`Show gateway reachability + discovery + health + status summary (local + remote)`).option(`--url <url>`,`Explicit Gateway WebSocket URL (still probes localhost)`).option(`--ssh <target>`,`SSH target for remote gateway tunnel (user@host or user@host:port)`).option(`--ssh-identity <path>`,`SSH identity file path`).option(`--ssh-auto`,`Try to derive an SSH target from Bonjour discovery`,!1).option(`--token <token>`,`Gateway token (applies to all probes)`).option(`--password <password>`,`Gateway password (applies to all probes)`).option(`--timeout <ms>`,`Overall probe budget in ms`,`3000`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await kM(async()=>{await np(jM(e,t),u)})}),n.command(`discover`).description(`Discover gateways via Bonjour (local + wide-area if configured)`).option(`--timeout <ms>`,`Per-command timeout in ms`,`2000`).option(`--json`,`Output JSON`,!1).action(async t=>{await kM(async()=>{let n=gd({configDomain:(await Ce()).discovery?.wideArea?.domain}),i=cp(t.timeout,2e3),a=[`local.`,...n?[n]:[]],o=dp(await Ou({label:`Scanning for gateways…`,indeterminate:!0,enabled:t.json!==!0,delayMs:0},async()=>await Sd({timeoutMs:i,wideAreaDomain:n}))).toSorted((e,t)=>String(e.displayName||e.instanceName).localeCompare(String(t.displayName||t.instanceName)));if(t.json){let e=o.map(e=>{let t=lp(e),n=up(e);return{...e,wsUrl:t?`ws://${t}:${n}`:null}});u.log(JSON.stringify({timeoutMs:i,domains:a,count:e.length,beacons:e},null,2));return}let c=s();if(u.log(r(c,e.heading,`Gateway Discovery`)),u.log(r(c,e.muted,`Found ${o.length} gateway(s) · domains: ${a.join(`, `)}`)),o.length!==0)for(let e of o)for(let t of fp(e,c))u.log(t)},`gateway discover failed`)})}export{NM as registerGatewayCli};
210
+ `)),u.exit(1);return}let R=x||e.tailscaleResetOnExit?{...x?{mode:x}:{},...e.tailscaleResetOnExit?{resetOnExit:!0}:{}}:void 0;try{await hM({runtime:u,lockPort:d,start:async()=>await $j(d,{bind:h,auth:k,tailscale:R})})}catch(e){if(e instanceof DA||e&&typeof e==`object`&&e.name===`GatewayLockError`){let t=xd(e);u.error(`Gateway failed to start: ${t}\nIf the gateway is supervised, stop it with: ${hn(`openclaw gateway stop`)}`);try{let e=await de(d);if(e.status===`busy`)for(let t of He(e))u.error(t)}catch{}await bd(),u.exit(1);return}u.error(`Gateway failed to start: ${String(e)}`),u.exit(1)}}function OM(e){return e.option(`--port <port>`,`Port for the gateway WebSocket`).option(`--bind <mode>`,`Bind mode ("loopback"|"lan"|"tailnet"|"auto"|"custom"). Defaults to config gateway.bind (or loopback).`).option(`--token <token>`,`Shared token required in connect.params.auth.token (default: OPENCLAW_GATEWAY_TOKEN env if set)`).option(`--auth <mode>`,`Gateway auth mode (${wM(yM)})`).option(`--password <password>`,`Password for auth mode=password`).option(`--password-file <path>`,`Read gateway password from file`).option(`--tailscale <mode>`,`Tailscale exposure mode (${wM(bM)})`).option(`--tailscale-reset-on-exit`,`Reset Tailscale serve/funnel configuration on shutdown`,!1).option(`--allow-unconfigured`,`Allow gateway start without gateway.mode=local in config`,!1).option(`--dev`,`Create a dev config + workspace if missing (no BOOTSTRAP.md)`,!1).option(`--reset`,`Reset dev config + credentials + sessions + workspace (requires --dev)`,!1).option(`--force`,`Kill any existing listener on the target port before starting`,!1).option(`--verbose`,`Verbose logging to stdout/stderr`,!1).option(`--claude-cli-logs`,`Only show claude-cli logs in the console (includes stdout/stderr)`,!1).option(`--ws-log <style>`,`WebSocket log style ("auto"|"full"|"compact")`,`auto`).option(`--compact`,`Alias for "--ws-log compact"`,!1).option(`--raw-stream`,`Log raw model stream events to jsonl`,!1).option(`--raw-stream-path <path>`,`Raw stream jsonl path`).action(async(e,t)=>{await DM(EM(e,t))})}function kM(e,t){return Eu(u,e,e=>{let n=String(e);u.error(t?`${t}: ${n}`:n),u.exit(1)})}function AM(e,t=30){if(typeof e==`number`&&Number.isFinite(e))return Math.max(1,Math.floor(e));if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return Math.max(1,Math.floor(t))}return t}function jM(e,t){let n=Hu(t,`token`),r=Hu(t,`password`);return{...e,token:e.token??n,password:e.password??r}}function MM(t,n,i){let a=yl(t.totals.totalCost)??`$0.00`,o=vl(t.totals.totalTokens)??`0`,s=[r(i,e.heading,`Usage cost (${n} days)`),`${r(i,e.muted,`Total:`)} ${a} · ${o} tokens`];t.totals.missingCostEntries>0&&s.push(`${r(i,e.muted,`Missing entries:`)} ${t.totals.missingCostEntries}`);let c=t.daily.at(-1);if(c){let t=yl(c.totalCost)??`$0.00`,n=vl(c.totalTokens)??`0`;s.push(`${r(i,e.muted,`Latest day:`)} ${c.date} · ${t} · ${n} tokens`)}return s}function NM(t){let n=OM(t.command(`gateway`).description(`Run, inspect, and query the WebSocket Gateway`).addHelpText(`after`,()=>`\n${e.heading(`Examples:`)}\n${Du([[`openclaw gateway run`,`Run the gateway in the foreground.`],[`openclaw gateway status`,`Show service status and probe reachability.`],[`openclaw gateway discover`,`Find local and wide-area gateway beacons.`],[`openclaw gateway call health`,`Call a gateway RPC method directly.`]])}\n\n${e.muted(`Docs:`)} ${Tu(`/cli/gateway`,`docs.openclaw.ai/cli/gateway`)}\n`));OM(n.command(`run`).description(`Run the WebSocket Gateway (foreground)`)),ed(n,{statusDescription:`Show gateway service status + probe the Gateway`}),op(n.command(`call`).description(`Call a Gateway method`).argument(`<method>`,`Method name (health/status/system-presence/cron.*)`).option(`--params <json>`,`JSON object string for params`,`{}`).action(async(t,n,i)=>{await kM(async()=>{let a=jM(n,i),o=await Ce(),c=JSON.parse(String(n.params??`{}`)),l=await sp(t,{...a,config:o},c);if(a.json){u.log(JSON.stringify(l,null,2));return}let d=s();u.log(`${r(d,e.heading,`Gateway call`)}: ${r(d,e.muted,String(t))}`),u.log(JSON.stringify(l,null,2))},`Gateway call failed`)})),op(n.command(`usage-cost`).description(`Fetch usage cost summary from session logs`).option(`--days <days>`,`Number of days to include`,`30`).action(async(e,t)=>{await kM(async()=>{let n=jM(e,t),r=AM(e.days),i=await Ce(),a=await sp(`usage.cost`,{...n,config:i},{days:r});if(n.json){u.log(JSON.stringify(a,null,2));return}let o=s(),c=a;for(let e of MM(c,r,o))u.log(e)},`Gateway usage cost failed`)})),op(n.command(`health`).description(`Fetch Gateway health`).action(async(t,n)=>{await kM(async()=>{let i=jM(t,n),a=await Ce(),o=await sp(`health`,{...i,config:a});if(i.json){u.log(JSON.stringify(o,null,2));return}let c=s(),l=o&&typeof o==`object`?o:{},d=typeof l.durationMs==`number`?l.durationMs:null;if(u.log(r(c,e.heading,`Gateway Health`)),u.log(`${r(c,e.success,`OK`)}${d==null?``:` (${d}ms)`}`),l.channels&&typeof l.channels==`object`)for(let e of kd(l))u.log(Td(e,c))})})),n.command(`probe`).description(`Show gateway reachability + discovery + health + status summary (local + remote)`).option(`--url <url>`,`Explicit Gateway WebSocket URL (still probes localhost)`).option(`--ssh <target>`,`SSH target for remote gateway tunnel (user@host or user@host:port)`).option(`--ssh-identity <path>`,`SSH identity file path`).option(`--ssh-auto`,`Try to derive an SSH target from Bonjour discovery`,!1).option(`--token <token>`,`Gateway token (applies to all probes)`).option(`--password <password>`,`Gateway password (applies to all probes)`).option(`--timeout <ms>`,`Overall probe budget in ms`,`3000`).option(`--json`,`Output JSON`,!1).action(async(e,t)=>{await kM(async()=>{await np(jM(e,t),u)})}),n.command(`discover`).description(`Discover gateways via Bonjour (local + wide-area if configured)`).option(`--timeout <ms>`,`Per-command timeout in ms`,`2000`).option(`--json`,`Output JSON`,!1).action(async t=>{await kM(async()=>{let n=gd({configDomain:(await Ce()).discovery?.wideArea?.domain}),i=cp(t.timeout,2e3),a=[`local.`,...n?[n]:[]],o=dp(await Ou({label:`Scanning for gateways…`,indeterminate:!0,enabled:t.json!==!0,delayMs:0},async()=>await Sd({timeoutMs:i,wideAreaDomain:n}))).toSorted((e,t)=>String(e.displayName||e.instanceName).localeCompare(String(t.displayName||t.instanceName)));if(t.json){let e=o.map(e=>{let t=lp(e),n=up(e);return{...e,wsUrl:t?`ws://${t}:${n}`:null}});u.log(JSON.stringify({timeoutMs:i,domains:a,count:e.length,beacons:e},null,2));return}let c=s();if(u.log(r(c,e.heading,`Gateway Discovery`)),u.log(r(c,e.muted,`Found ${o.length} gateway(s) · domains: ${a.join(`, `)}`)),o.length!==0)for(let e of o)for(let t of fp(e,c))u.log(t)},`gateway discover failed`)})}export{NM as registerGatewayCli};
@@ -1 +1 @@
1
- import{$a as e,Dl as t,Ja as n,Ts as r,Zs as i,nc as a,so as o}from"./model-selection-I1ctjFOB.js";import{a as s,d as c}from"./types.secrets-C-5U96pc.js";import{t as l}from"./command-format-BbDT1tlm.js";import{jt as u}from"./plugins-CYLrFT4h.js";import{h as d}from"./onboard-helpers-CGJLUoxR.js";import{u as f}from"./arg-split-DE5RqDHq.js";import{f as p,n as m,t as h,u as g}from"./daemon-install-plan.shared-BSDdwWjB.js";async function _(e){let{devMode:n,nodePath:r}=await m({env:e.env,runtime:e.runtime,devMode:e.devMode,nodePath:e.nodePath}),{programArguments:i,workingDirectory:a}=await p({port:e.port,dev:n,runtime:e.runtime,nodePath:r});await h({env:e.env,runtime:e.runtime,programArguments:i,warn:e.warn,title:`Gateway runtime`});let o=g({env:e.env,port:e.port,launchdLabel:process.platform===`darwin`?f(e.env.OPENCLAW_PROFILE):void 0}),s={...t(e.config)};return Object.assign(s,o),{programArguments:i,workingDirectory:a,environment:s}}function v(e=process.platform){return e===`win32`?`Tip: rerun from an elevated PowerShell (Start → type PowerShell → right-click → Run as administrator) or skip service install.`:`Tip: rerun \`${l(`openclaw gateway install`)}\` after fixing the error.`}function y(e,n){let r=e.gateway?.auth?.mode;if(r===`token`)return!0;if(r===`password`||r===`none`||r===`trusted-proxy`||s(e.gateway?.auth?.password,e.secrets?.defaults))return!1;let i=t(e);return!(i.OPENCLAW_GATEWAY_PASSWORD?.trim()||i.CLAWDBOT_GATEWAY_PASSWORD?.trim())}function b(){return[`gateway.auth.token and gateway.auth.password are both configured while gateway.auth.mode is unset.`,`Set ${l(`openclaw config set gateway.auth.mode token`)} or ${l(`openclaw config set gateway.auth.mode password`)}.`].join(` `)}async function x(t){let s=t.config,l=[],f=c({value:s.gateway?.auth?.token,defaults:s.secrets?.defaults}).ref,p=!!f,m=f||typeof s.gateway?.auth?.token!=`string`?void 0:s.gateway.auth.token.trim()||void 0,h=t.explicitToken?.trim()||void 0,g=o(t.env);if(n(s))return{token:void 0,tokenRefConfigured:p,unavailableReason:b(),warnings:l};let _=e({authConfig:s.gateway?.auth,tailscaleMode:s.gateway?.tailscale?.mode??`off`}),v=y(s,t.env)&&!_.allowTailscale,x=h||m||(f?void 0:g),S;if(f&&!x&&v)try{let e=(await r([f],{config:s,env:t.env})).get(u(f));if(typeof e!=`string`||e.trim().length===0)throw Error(`gateway.auth.token resolved to an empty or non-string value.`);l.push(`gateway.auth.token is SecretRef-managed; install will not persist a resolved token in service environment. Ensure the SecretRef is resolvable in the daemon runtime context.`)}catch(e){S=`gateway.auth.token SecretRef is configured but unresolved (${String(e)}).`}let C=t.autoGenerateWhenMissing??!1,w=t.persistGeneratedToken??!1;if(!x&&v&&!f&&C&&(x=d(),l.push(w?`No gateway token found. Auto-generated one and saving to config.`:`No gateway token found. Auto-generated one for this run without saving to config.`),w))try{let e=await i();if(e.exists&&!e.valid)l.push(`Warning: config file exists but is invalid; skipping token persistence.`);else{let t=e.exists?e.config:{},n=c({value:t.gateway?.auth?.token,defaults:t.secrets?.defaults}).ref,r=n||typeof t.gateway?.auth?.token!=`string`?void 0:t.gateway.auth.token.trim()||void 0;!n&&!r?await a({...t,gateway:{...t.gateway,auth:{...t.gateway?.auth,mode:t.gateway?.auth?.mode??`token`,token:x}}}):r?x=r:(x=void 0,l.push(`Warning: gateway.auth.token is SecretRef-managed; skipping plaintext token persistence.`))}}catch(e){l.push(`Warning: could not persist token to config: ${String(e)}`)}return{token:x,tokenRefConfigured:p,unavailableReason:S,warnings:l}}export{_ as n,v as r,x as t};
1
+ import{$a as e,Dl as t,Ja as n,Ts as r,Zs as i,nc as a,so as o}from"./model-selection-I1ctjFOB.js";import{a as s,d as c}from"./types.secrets-C-5U96pc.js";import{t as l}from"./command-format-BbDT1tlm.js";import{jt as u}from"./plugins-CYLrFT4h.js";import{h as d}from"./onboard-helpers-CGJLUoxR.js";import{u as f}from"./arg-split-DE5RqDHq.js";import{f as p,n as m,t as h,u as g}from"./daemon-install-plan.shared-BSDdwWjB.js";async function _(e){let{devMode:n,nodePath:r}=await m({env:e.env,runtime:e.runtime,devMode:e.devMode,nodePath:e.nodePath}),{programArguments:i,workingDirectory:a}=await p({port:e.port,dev:n,runtime:e.runtime,nodePath:r});await h({env:e.env,runtime:e.runtime,programArguments:i,warn:e.warn,title:`Gateway runtime`});let o=g({env:e.env,port:e.port,launchdLabel:process.platform===`darwin`?f(e.env.OPENCLAW_PROFILE):void 0}),s={...t(e.config)};return Object.assign(s,o),{programArguments:i,workingDirectory:a,environment:s}}function v(e=process.platform){return e===`win32`?`Tip: rerun from an elevated PowerShell (Start → type PowerShell → right-click → Run as administrator) or skip service install.`:`Tip: rerun \`${l(`openclaw gateway install`)}\` after fixing the error.`}function y(e,n){let r=e.gateway?.auth?.mode;if(r===`token`)return!0;if(r===`password`||r===`none`||r===`trusted-proxy`||s(e.gateway?.auth?.password,e.secrets?.defaults))return!1;let i=t(e);return!(i.OPENCLAW_GATEWAY_PASSWORD?.trim()||i.CLAWDBOT_GATEWAY_PASSWORD?.trim())}function b(){return[`gateway.auth.token and gateway.auth.password are both configured while gateway.auth.mode is unset.`,`Set ${l(`openclaw config set gateway.auth.mode token`)} or ${l(`openclaw config set gateway.auth.mode password`)}.`].join(` `)}async function x(t){let s=t.config,l=[],f=c({value:s.gateway?.auth?.token,defaults:s.secrets?.defaults}).ref,p=!!f,m=f||typeof s.gateway?.auth?.token!=`string`?void 0:s.gateway.auth.token.trim()||void 0,h=t.explicitToken?.trim()||void 0,g=o(t.env);if(n(s))return{token:void 0,tokenRefConfigured:p,unavailableReason:b(),warnings:l};let _=e({authConfig:s.gateway?.auth,tailscaleMode:s.gateway?.tailscale?.mode??`off`}),v=y(s,t.env)&&!_.allowTailscale,x=h||m||(f?void 0:g),S;if(f&&!x&&v)try{let e=(await r([f],{config:s,env:t.env})).get(u(f));if(typeof e!=`string`||e.trim().length===0)throw Error(`gateway.auth.token resolved to an empty or non-string value.`);l.push(`gateway.auth.token is SecretRef-managed; install will not persist a resolved token in service environment. Ensure the SecretRef is resolvable in the daemon runtime context.`)}catch(e){S=`gateway.auth.token SecretRef is configured but unresolved (${String(e)}).`}let C=t.autoGenerateWhenMissing??!1,w=t.persistGeneratedToken??!1;if(!x&&v&&!f&&C&&(x=d(),l.push(w?`No gateway token found. Auto-generated one and saving to config.`:`No gateway token found. Auto-generated one for this run without saving to config.`),w))try{let e=await i();if(e.exists&&!e.valid)l.push(`Warning: config file exists but is invalid; skipping token persistence.`);else{let t=e.exists?e.config:{},n=c({value:t.gateway?.auth?.token,defaults:t.secrets?.defaults}).ref,r=n||typeof t.gateway?.auth?.token!=`string`?void 0:t.gateway.auth.token.trim()||void 0;!n&&!r?await a({...t,gateway:{...t.gateway,auth:{...t.gateway?.auth,mode:t.gateway?.auth?.mode??`token`,token:x}}}):r?x=r:(x=void 0,l.push(`Warning: gateway.auth.token is SecretRef-managed; skipping plaintext token persistence.`))}}catch(e){l.push(`Warning: could not persist token to config: ${String(e)}`)}return{token:x,tokenRefConfigured:p,unavailableReason:S,warnings:l}}export{_ as n,v as r,x as t};
@@ -1 +1 @@
1
- import{Bo as e,Fo as t,Ki as n,Ni as r,Ri as i,lc as a,lo as o}from"./auth-profiles-BhXA8Jy2.js";import{t as s}from"./command-format-CLxIPuLR.js";import{a as c,d as l}from"./types.secrets-D4tbc3Wq.js";import{jt as u}from"./plugins-DNlgeTTc.js";import{u as d}from"./arg-split-BOqSMBuf.js";import{h as f}from"./onboard-helpers-DbpWQoiB.js";import{f as p,n as m,t as h,u as g}from"./daemon-install-plan.shared-Dx3DBXCG.js";async function _(e){let{devMode:t,nodePath:n}=await m({env:e.env,runtime:e.runtime,devMode:e.devMode,nodePath:e.nodePath}),{programArguments:r,workingDirectory:i}=await p({port:e.port,dev:t,runtime:e.runtime,nodePath:n});await h({env:e.env,runtime:e.runtime,programArguments:r,warn:e.warn,title:`Gateway runtime`});let o=g({env:e.env,port:e.port,launchdLabel:process.platform===`darwin`?d(e.env.OPENCLAW_PROFILE):void 0}),s={...a(e.config)};return Object.assign(s,o),{programArguments:r,workingDirectory:i,environment:s}}function v(e=process.platform){return e===`win32`?`Tip: rerun from an elevated PowerShell (Start → type PowerShell → right-click → Run as administrator) or skip service install.`:`Tip: rerun \`${s(`openclaw gateway install`)}\` after fixing the error.`}function y(e,t){let n=e.gateway?.auth?.mode;if(n===`token`)return!0;if(n===`password`||n===`none`||n===`trusted-proxy`||c(e.gateway?.auth?.password,e.secrets?.defaults))return!1;let r=a(e);return!(r.OPENCLAW_GATEWAY_PASSWORD?.trim()||r.CLAWDBOT_GATEWAY_PASSWORD?.trim())}function b(){return[`gateway.auth.token and gateway.auth.password are both configured while gateway.auth.mode is unset.`,`Set ${s(`openclaw config set gateway.auth.mode token`)} or ${s(`openclaw config set gateway.auth.mode password`)}.`].join(` `)}async function x(a){let s=a.config,c=[],d=l({value:s.gateway?.auth?.token,defaults:s.secrets?.defaults}).ref,p=!!d,m=d||typeof s.gateway?.auth?.token!=`string`?void 0:s.gateway.auth.token.trim()||void 0,h=a.explicitToken?.trim()||void 0,g=n(a.env);if(r(s))return{token:void 0,tokenRefConfigured:p,unavailableReason:b(),warnings:c};let _=i({authConfig:s.gateway?.auth,tailscaleMode:s.gateway?.tailscale?.mode??`off`}),v=y(s,a.env)&&!_.allowTailscale,x=h||m||(d?void 0:g),S;if(d&&!x&&v)try{let e=(await o([d],{config:s,env:a.env})).get(u(d));if(typeof e!=`string`||e.trim().length===0)throw Error(`gateway.auth.token resolved to an empty or non-string value.`);c.push(`gateway.auth.token is SecretRef-managed; install will not persist a resolved token in service environment. Ensure the SecretRef is resolvable in the daemon runtime context.`)}catch(e){S=`gateway.auth.token SecretRef is configured but unresolved (${String(e)}).`}let C=a.autoGenerateWhenMissing??!1,w=a.persistGeneratedToken??!1;if(!x&&v&&!d&&C&&(x=f(),c.push(w?`No gateway token found. Auto-generated one and saving to config.`:`No gateway token found. Auto-generated one for this run without saving to config.`),w))try{let n=await t();if(n.exists&&!n.valid)c.push(`Warning: config file exists but is invalid; skipping token persistence.`);else{let t=n.exists?n.config:{},r=l({value:t.gateway?.auth?.token,defaults:t.secrets?.defaults}).ref,i=r||typeof t.gateway?.auth?.token!=`string`?void 0:t.gateway.auth.token.trim()||void 0;!r&&!i?await e({...t,gateway:{...t.gateway,auth:{...t.gateway?.auth,mode:t.gateway?.auth?.mode??`token`,token:x}}}):i?x=i:(x=void 0,c.push(`Warning: gateway.auth.token is SecretRef-managed; skipping plaintext token persistence.`))}}catch(e){c.push(`Warning: could not persist token to config: ${String(e)}`)}return{token:x,tokenRefConfigured:p,unavailableReason:S,warnings:c}}export{_ as n,v as r,x as t};
1
+ import{Bo as e,Fo as t,Ki as n,Ni as r,Ri as i,lc as a,lo as o}from"./auth-profiles-BhXA8Jy2.js";import{t as s}from"./command-format-CLxIPuLR.js";import{a as c,d as l}from"./types.secrets-D4tbc3Wq.js";import{jt as u}from"./plugins-DNlgeTTc.js";import{u as d}from"./arg-split-BOqSMBuf.js";import{h as f}from"./onboard-helpers-DbpWQoiB.js";import{f as p,n as m,t as h,u as g}from"./daemon-install-plan.shared-Dx3DBXCG.js";async function _(e){let{devMode:t,nodePath:n}=await m({env:e.env,runtime:e.runtime,devMode:e.devMode,nodePath:e.nodePath}),{programArguments:r,workingDirectory:i}=await p({port:e.port,dev:t,runtime:e.runtime,nodePath:n});await h({env:e.env,runtime:e.runtime,programArguments:r,warn:e.warn,title:`Gateway runtime`});let o=g({env:e.env,port:e.port,launchdLabel:process.platform===`darwin`?d(e.env.OPENCLAW_PROFILE):void 0}),s={...a(e.config)};return Object.assign(s,o),{programArguments:r,workingDirectory:i,environment:s}}function v(e=process.platform){return e===`win32`?`Tip: rerun from an elevated PowerShell (Start → type PowerShell → right-click → Run as administrator) or skip service install.`:`Tip: rerun \`${s(`openclaw gateway install`)}\` after fixing the error.`}function y(e,t){let n=e.gateway?.auth?.mode;if(n===`token`)return!0;if(n===`password`||n===`none`||n===`trusted-proxy`||c(e.gateway?.auth?.password,e.secrets?.defaults))return!1;let r=a(e);return!(r.OPENCLAW_GATEWAY_PASSWORD?.trim()||r.CLAWDBOT_GATEWAY_PASSWORD?.trim())}function b(){return[`gateway.auth.token and gateway.auth.password are both configured while gateway.auth.mode is unset.`,`Set ${s(`openclaw config set gateway.auth.mode token`)} or ${s(`openclaw config set gateway.auth.mode password`)}.`].join(` `)}async function x(a){let s=a.config,c=[],d=l({value:s.gateway?.auth?.token,defaults:s.secrets?.defaults}).ref,p=!!d,m=d||typeof s.gateway?.auth?.token!=`string`?void 0:s.gateway.auth.token.trim()||void 0,h=a.explicitToken?.trim()||void 0,g=n(a.env);if(r(s))return{token:void 0,tokenRefConfigured:p,unavailableReason:b(),warnings:c};let _=i({authConfig:s.gateway?.auth,tailscaleMode:s.gateway?.tailscale?.mode??`off`}),v=y(s,a.env)&&!_.allowTailscale,x=h||m||(d?void 0:g),S;if(d&&!x&&v)try{let e=(await o([d],{config:s,env:a.env})).get(u(d));if(typeof e!=`string`||e.trim().length===0)throw Error(`gateway.auth.token resolved to an empty or non-string value.`);c.push(`gateway.auth.token is SecretRef-managed; install will not persist a resolved token in service environment. Ensure the SecretRef is resolvable in the daemon runtime context.`)}catch(e){S=`gateway.auth.token SecretRef is configured but unresolved (${String(e)}).`}let C=a.autoGenerateWhenMissing??!1,w=a.persistGeneratedToken??!1;if(!x&&v&&!d&&C&&(x=f(),c.push(w?`No gateway token found. Auto-generated one and saving to config.`:`No gateway token found. Auto-generated one for this run without saving to config.`),w))try{let n=await t();if(n.exists&&!n.valid)c.push(`Warning: config file exists but is invalid; skipping token persistence.`);else{let t=n.exists?n.config:{},r=l({value:t.gateway?.auth?.token,defaults:t.secrets?.defaults}).ref,i=r||typeof t.gateway?.auth?.token!=`string`?void 0:t.gateway.auth.token.trim()||void 0;!r&&!i?await e({...t,gateway:{...t.gateway,auth:{...t.gateway?.auth,mode:t.gateway?.auth?.mode??`token`,token:x}}}):i?x=i:(x=void 0,c.push(`Warning: gateway.auth.token is SecretRef-managed; skipping plaintext token persistence.`))}}catch(e){c.push(`Warning: could not persist token to config: ${String(e)}`)}return{token:x,tokenRefConfigured:p,unavailableReason:S,warnings:c}}export{_ as n,v as r,x as t};
@@ -1 +1 @@
1
- import{Si as e,xi as t}from"./model-selection-I1ctjFOB.js";import{n}from"./call-BA3O_Qpl.js";import{n as r}from"./progress-LNttnI-y.js";function i(e){return e.option(`--url <url>`,`Gateway WebSocket URL (defaults to gateway.remote.url when configured)`).option(`--token <token>`,`Gateway token (if required)`).option(`--timeout <ms>`,`Timeout in ms`,`30000`).option(`--expect-final`,`Wait for final response (agent)`,!1)}async function a(i,a,o,s){let c=s?.progress??a.json!==!0;return await r({label:`Gateway ${i}`,indeterminate:!0,enabled:c},async()=>await n({url:a.url,token:a.token,method:i,params:o,expectFinal:s?.expectFinal??!!a.expectFinal,timeoutMs:Number(a.timeout??1e4),clientName:e.CLI,mode:t.CLI}))}export{a as n,i as t};
1
+ import{Si as e,xi as t}from"./model-selection-I1ctjFOB.js";import{n}from"./call-BA3O_Qpl.js";import{n as r}from"./progress-LNttnI-y.js";function i(e){return e.option(`--url <url>`,`Gateway WebSocket URL (defaults to gateway.remote.url when configured)`).option(`--token <token>`,`Gateway token (if required)`).option(`--timeout <ms>`,`Timeout in ms`,`30000`).option(`--expect-final`,`Wait for final response (agent)`,!1)}async function a(i,a,o,s){let c=s?.progress??a.json!==!0;return await r({label:`Gateway ${i}`,indeterminate:!0,enabled:c},async()=>await n({url:a.url,token:a.token,method:i,params:o,expectFinal:s?.expectFinal??!!a.expectFinal,timeoutMs:Number(a.timeout??1e4),clientName:e.CLI,mode:t.CLI}))}export{a as n,i as t};
@@ -1 +1 @@
1
- import{lr as e,ur as t}from"./auth-profiles-BhXA8Jy2.js";import{n}from"./call-BQT0zCgv.js";import{n as r}from"./progress-d1m2sqR1.js";function i(e){return e.option(`--url <url>`,`Gateway WebSocket URL (defaults to gateway.remote.url when configured)`).option(`--token <token>`,`Gateway token (if required)`).option(`--timeout <ms>`,`Timeout in ms`,`30000`).option(`--expect-final`,`Wait for final response (agent)`,!1)}async function a(i,a,o,s){let c=s?.progress??a.json!==!0;return await r({label:`Gateway ${i}`,indeterminate:!0,enabled:c},async()=>await n({url:a.url,token:a.token,method:i,params:o,expectFinal:s?.expectFinal??!!a.expectFinal,timeoutMs:Number(a.timeout??1e4),clientName:t.CLI,mode:e.CLI}))}export{a as n,i as t};
1
+ import{lr as e,ur as t}from"./auth-profiles-BhXA8Jy2.js";import{n}from"./call-BQT0zCgv.js";import{n as r}from"./progress-d1m2sqR1.js";function i(e){return e.option(`--url <url>`,`Gateway WebSocket URL (defaults to gateway.remote.url when configured)`).option(`--token <token>`,`Gateway token (if required)`).option(`--timeout <ms>`,`Timeout in ms`,`30000`).option(`--expect-final`,`Wait for final response (agent)`,!1)}async function a(i,a,o,s){let c=s?.progress??a.json!==!0;return await r({label:`Gateway ${i}`,indeterminate:!0,enabled:c},async()=>await n({url:a.url,token:a.token,method:i,params:o,expectFinal:s?.expectFinal??!!a.expectFinal,timeoutMs:Number(a.timeout??1e4),clientName:t.CLI,mode:e.CLI}))}export{a as n,i as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-BjD3T_xq.js";import n from"node:path";import r from"node:fs";function i(e){try{if(!r.existsSync(e))return;let t=r.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=n.dirname(e);r.existsSync(i)||r.mkdirSync(i,{recursive:!0,mode:448}),r.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),r.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return n.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
1
+ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-BjD3T_xq.js";import n from"node:path";import r from"node:fs";function i(e){try{if(!r.existsSync(e))return;let t=r.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=n.dirname(e);r.existsSync(i)||r.mkdirSync(i,{recursive:!0,mode:448}),r.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),r.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return n.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-B4IRk3wi.js";import n from"node:fs";import r from"node:path";function i(e){try{if(!n.existsSync(e))return;let t=n.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=r.dirname(e);n.existsSync(i)||n.mkdirSync(i,{recursive:!0,mode:448}),n.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),n.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return r.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
1
+ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{g as t}from"./paths-B4IRk3wi.js";import n from"node:fs";import r from"node:path";function i(e){try{if(!n.existsSync(e))return;let t=n.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=r.dirname(e);n.existsSync(i)||n.mkdirSync(i,{recursive:!0,mode:448}),n.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),n.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return r.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{c as t}from"./paths-CChBdtE8.js";import n from"node:path";import r from"node:fs";function i(e){try{if(!r.existsSync(e))return;let t=r.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=n.dirname(e);r.existsSync(i)||r.mkdirSync(i,{recursive:!0,mode:448}),r.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),r.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return n.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
1
+ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{c as t}from"./paths-CChBdtE8.js";import n from"node:path";import r from"node:fs";function i(e){try{if(!r.existsSync(e))return;let t=r.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=n.dirname(e);r.existsSync(i)||r.mkdirSync(i,{recursive:!0,mode:448}),r.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),r.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return n.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
@@ -1 +1 @@
1
- import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{c as t}from"./paths-BpQOWYiT.js";import n from"node:fs";import r from"node:path";function i(e){try{if(!n.existsSync(e))return;let t=n.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=r.dirname(e);n.existsSync(i)||n.mkdirSync(i,{recursive:!0,mode:448}),n.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),n.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return r.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
1
+ import{t as e}from"./rolldown-runtime-CNxR59P3.js";import{c as t}from"./paths-BpQOWYiT.js";import n from"node:fs";import r from"node:path";function i(e){try{if(!n.existsSync(e))return;let t=n.readFileSync(e,`utf8`);return JSON.parse(t)}catch{return}}function a(e,t){let i=r.dirname(e);n.existsSync(i)||n.mkdirSync(i,{recursive:!0,mode:448}),n.writeFileSync(e,`${JSON.stringify(t,null,2)}\n`,`utf8`),n.chmodSync(e,384)}var o=e({DEFAULT_COPILOT_API_BASE_URL:()=>d,deriveCopilotApiBaseUrlFromToken:()=>f,resolveCopilotApiToken:()=>p});const s=`https://api.github.com/copilot_internal/v2/token`;function c(e=process.env){return r.join(t(e),`credentials`,`github-copilot.token.json`)}function l(e,t=Date.now()){return e.expiresAt-t>300*1e3}function u(e){if(!e||typeof e!=`object`)throw Error(`Unexpected response from GitHub Copilot token endpoint`);let t=e,n=t.token,r=t.expires_at;if(typeof n!=`string`||n.trim().length===0)throw Error(`Copilot token response missing token`);let i;if(typeof r==`number`&&Number.isFinite(r))i=r>1e10?r:r*1e3;else if(typeof r==`string`&&r.trim().length>0){let e=Number.parseInt(r,10);if(!Number.isFinite(e))throw Error(`Copilot token response has invalid expires_at`);i=e>1e10?e:e*1e3}else throw Error(`Copilot token response missing expires_at`);return{token:n,expiresAt:i}}const d=`https://api.individual.githubcopilot.com`;function f(e){let t=e.trim();if(!t)return null;let n=t.match(/(?:^|;)\s*proxy-ep=([^;\s]+)/i)?.[1]?.trim();if(!n)return null;let r=n.replace(/^https?:\/\//,``).replace(/^proxy\./i,`api.`);return r?`https://${r}`:null}async function p(e){let t=e.env??process.env,n=e.cachePath?.trim()||c(t),r=e.loadJsonFileImpl??i,o=e.saveJsonFileImpl??a,d=r(n);if(d&&typeof d.token==`string`&&typeof d.expiresAt==`number`&&l(d))return{token:d.token,expiresAt:d.expiresAt,source:`cache:${n}`,baseUrl:f(d.token)??`https://api.individual.githubcopilot.com`};let p=await(e.fetchImpl??fetch)(s,{method:`GET`,headers:{Accept:`application/json`,Authorization:`Bearer ${e.githubToken}`}});if(!p.ok)throw Error(`Copilot token exchange failed: HTTP ${p.status}`);let m=u(await p.json()),h={token:m.token,expiresAt:m.expiresAt,updatedAt:Date.now()};return o(n,h),{token:h.token,expiresAt:h.expiresAt,source:`fetched:${s}`,baseUrl:f(h.token)??`https://api.individual.githubcopilot.com`}}export{a,i,o as n,p as r,d as t};
@@ -1,2 +1,2 @@
1
1
  import{n as e,u as t}from"./paths-BjD3T_xq.js";import{v as n}from"./utils-CGdo13HV.js";import{f as r}from"./frontmatter-C7mzDNxd.js";import{t as i}from"./exec-B3eleY5O.js";import a from"node:path";import o from"node:fs";import{randomBytes as s}from"node:crypto";const c=`INBOX`,l=`gog-gmail-watch`,u=`gog-gmail-watch-push`,d=`127.0.0.1`,f=8788,p=`/gmail-pubsub`,m=2e4;function h(e=24){return s(e).toString(`hex`)}function g(e,t){let n=new Set((e??[]).map(e=>e.trim()).filter(Boolean));return n.add(t),Array.from(n)}function _(e){let t=e?.trim()||`/hooks`;return t===`/`?`/hooks`:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function v(e){let t=e?.trim()||`/gmail-pubsub`;return t===`/`?`/`:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function y(t,n=e){let r=_(t);return T(`http://127.0.0.1:${n}`,`${r}/gmail`)}function b(e,n){let r=e.hooks,i=r?.gmail,a=n.hookToken??r?.token??``;if(!a)return{ok:!1,error:`hooks.token missing (needed for gmail hook)`};let o=n.account??i?.account??``;if(!o)return{ok:!1,error:`gmail account required`};let s=n.topic??i?.topic??``;if(!s)return{ok:!1,error:`gmail topic required`};let c=n.subscription??i?.subscription??`gog-gmail-watch-push`,l=n.pushToken??i?.pushToken??``;if(!l)return{ok:!1,error:`gmail push token required`};let u=n.hookUrl??i?.hookUrl??y(r?.path,t(e)),d=n.includeBody??i?.includeBody??!0,h=n.maxBytes??i?.maxBytes,g=typeof h==`number`&&Number.isFinite(h)&&h>0?Math.floor(h):m,_=n.renewEveryMinutes??i?.renewEveryMinutes,b=typeof _==`number`&&Number.isFinite(_)&&_>0?Math.floor(_):720,x=n.serveBind??i?.serve?.bind??`127.0.0.1`,S=n.servePort??i?.serve?.port,C=typeof S==`number`&&Number.isFinite(S)&&S>0?Math.floor(S):f,w=n.servePath??i?.serve?.path,T=typeof w==`string`&&w.trim().length>0?v(w):p,E=n.tailscaleTarget??i?.tailscale?.target,D=n.tailscaleMode??i?.tailscale?.mode??`off`,O=D!==`off`&&typeof E==`string`&&E.trim().length>0?E.trim():void 0,k=v(D!==`off`&&!O?`/`:T),A=n.tailscalePath??i?.tailscale?.path,j=v(D===`off`?A??k:A??T);return{ok:!0,value:{account:o,label:n.label??i?.label??`INBOX`,topic:s,subscription:c,pushToken:l,hookToken:a,hookUrl:u,includeBody:d,maxBytes:g,renewEveryMinutes:b,serve:{bind:x,port:C,path:k},tailscale:{mode:D,path:j,target:O}}}}function x(e){return[`gmail`,`watch`,`start`,`--account`,e.account,`--label`,e.label,`--topic`,e.topic]}function S(e){let t=[`gmail`,`watch`,`serve`,`--account`,e.account,`--bind`,e.serve.bind,`--port`,String(e.serve.port),`--path`,e.serve.path,`--token`,e.pushToken,`--hook-url`,e.hookUrl,`--hook-token`,e.hookToken];return e.includeBody&&t.push(`--include-body`),e.maxBytes>0&&t.push(`--max-bytes`,String(e.maxBytes)),t}function C(e,t){return`projects/${e}/topics/${t}`}function w(e){let t=e.trim().match(/^projects\/([^/]+)\/topics\/([^/]+)$/i);return t?{projectId:t[1]??``,topicName:t[2]??``}:null}function T(e,t){let n=new URL(e);return n.pathname=`${n.pathname.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}`,n.toString()}let E;function D(e){let t=e.trim();return t?t.length<=800?t:`${t.slice(0,800)}…`:``}function O(e,t,n){let r=t.code??`null`,i=t.signal?`, signal=${t.signal}`:``,a=t.killed?`, killed=true`:``,o=D(t.stderr),s=D(t.stdout),c=[`${e} ${n} (code=${r}${i}${a})`];return o&&c.push(`stderr: ${o}`),s&&c.push(`stdout: ${s}`),c.join(`
2
- `)}function k(e,t){return O(e,t,`failed`)}function A(e,t){return O(e,t,`exited`)}function j(e,t,n){return`${e} returned invalid JSON: ${n instanceof Error?n.message:String(n)}\n${A(e,t)}`}function M(e,t){return[e,...t].join(` `)}function N(e){let t=(process.env.PATH??``).split(a.delimiter).filter(Boolean),n=new Set,r=[];for(let i of t)for(let t of e){let e=a.join(i,t);if(!n.has(e))try{o.accessSync(e,o.constants.X_OK),r.push(e),n.add(e)}catch{}}return r}function P(e,t){let n=(process.env.PATH??``).split(a.delimiter).filter(Boolean);if(n.includes(e))return;let r=t===`prepend`?[e,...n]:[...n,e];process.env.PATH=r.join(a.delimiter)}function F(){if(r(`gcloud`))return!0;for(let e of[`/opt/homebrew/share/google-cloud-sdk/bin/gcloud`,`/usr/local/share/google-cloud-sdk/bin/gcloud`,`/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`,`/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`])try{return o.accessSync(e,o.constants.X_OK),P(a.dirname(e),`append`),!0}catch{}return!1}async function I(){if(E!==void 0)return E??void 0;let e=N([`python3`,`python`]);for(let t of e){let e=await i([t,`-c`,`import os, sys; print(os.path.realpath(sys.executable))`],{timeoutMs:2e3});if(e.code!==0)continue;let n=e.stdout.trim().split(/\s+/)[0];if(n)try{return o.accessSync(n,o.constants.X_OK),E=n,n}catch{}}E=null}async function L(){if(process.env.CLOUDSDK_PYTHON)return;let e=await I();if(e)return{CLOUDSDK_PYTHON:e}}async function R(e,t){return await i([`gcloud`,...e],{timeoutMs:t,env:await L()})}async function z(e,t){if(e===`gcloud`&&F()||r(e))return;if(process.platform!==`darwin`)throw Error(`${e} not installed; install it and retry`);if(!r(`brew`))throw Error(`Homebrew not installed (install brew and retry)`);let n=e===`gcloud`?await L():void 0,a=await i([`brew`,`install`,...t],{timeoutMs:6e5,env:n});if(a.code!==0)throw Error(`brew install failed for ${e}: ${a.stderr||a.stdout}`);if(!r(e))throw Error(`${e} still not available after brew install`)}async function B(){let e=await R([`auth`,`list`,`--filter`,`status:ACTIVE`,`--format`,`value(account)`],3e4);if(e.code===0&&e.stdout.trim())return;let t=await R([`auth`,`login`],6e5);if(t.code!==0)throw Error(t.stderr||`gcloud auth login failed`)}async function V(e){let t=await R(e,12e4);if(t.code!==0)throw Error(t.stderr||t.stdout||`gcloud command failed`);return t}async function H(e,t){(await R([`pubsub`,`topics`,`describe`,t,`--project`,e],3e4)).code!==0&&await V([`pubsub`,`topics`,`create`,t,`--project`,e])}async function U(e,t,n,r){if((await R([`pubsub`,`subscriptions`,`describe`,t,`--project`,e],3e4)).code===0){await V([`pubsub`,`subscriptions`,`update`,t,`--project`,e,`--push-endpoint`,r]);return}await V([`pubsub`,`subscriptions`,`create`,t,`--project`,e,`--topic`,n,`--push-endpoint`,r])}async function W(e){if(e.mode===`off`)return``;let t=[`status`,`--json`],n=M(`tailscale`,t),r=await i([`tailscale`,...t],{timeoutMs:3e4});if(r.code!==0)throw Error(k(n,r));let a;try{a=JSON.parse(r.stdout)}catch(e){throw Error(j(n,r,e),{cause:e})}let o=a.Self?.DNSName?.replace(/\.$/,``);if(!o)throw Error(`tailscale DNS name missing; run tailscale up`);let s=typeof e.target==`string`&&e.target.trim().length>0?e.target.trim():e.port?String(e.port):``;if(!s)throw Error(`tailscale target missing; set a port or target URL`);let c=v(e.path),l=[e.mode,`--bg`,`--set-path`,c,`--yes`,s],u=M(`tailscale`,l),d=await i([`tailscale`,...l],{timeoutMs:3e4});if(d.code!==0)throw Error(k(u,d));let f=`https://${o}${c}`;return e.token?`${f}?token=${e.token}`:f}async function G(){let e=K();for(let t of e)if(o.existsSync(t))try{let e=o.readFileSync(t,`utf-8`),n=J(q(JSON.parse(e)));if(!n)continue;let r=await R([`projects`,`list`,`--filter`,`projectNumber=${n}`,`--format`,`value(projectId)`],3e4);if(r.code!==0)continue;let i=r.stdout.trim().split(/\s+/)[0];if(i)return i}catch{}return null}function K(){let e=[],t=process.env.XDG_CONFIG_HOME;return t&&e.push(a.join(t,`gogcli`,`credentials.json`)),e.push(n(`~/.config/gogcli/credentials.json`)),process.platform===`darwin`&&e.push(n(`~/Library/Application Support/gogcli/credentials.json`)),e}function q(e){let t=e.installed,n=e.web,r=t?.client_id||n?.client_id||e.client_id||``;return typeof r==`string`?r:null}function J(e){return e?e.match(/^(\d+)-/)?.[1]??null:null}export{w as C,v as S,x as _,H as a,g as b,c,p as d,f,S as g,y as h,W as i,m as l,l as m,B as n,G as o,u as p,U as r,V as s,z as t,d as u,C as v,b as w,_ as x,h as y};
2
+ `)}function k(e,t){return O(e,t,`failed`)}function A(e,t){return O(e,t,`exited`)}function j(e,t,n){return`${e} returned invalid JSON: ${n instanceof Error?n.message:String(n)}\n${A(e,t)}`}function M(e,t){return[e,...t].join(` `)}function N(e){let t=(process.env.PATH??``).split(a.delimiter).filter(Boolean),n=new Set,r=[];for(let i of t)for(let t of e){let e=a.join(i,t);if(!n.has(e))try{o.accessSync(e,o.constants.X_OK),r.push(e),n.add(e)}catch{}}return r}function P(e,t){let n=(process.env.PATH??``).split(a.delimiter).filter(Boolean);if(n.includes(e))return;let r=t===`prepend`?[e,...n]:[...n,e];process.env.PATH=r.join(a.delimiter)}function F(){if(r(`gcloud`))return!0;for(let e of[`/opt/homebrew/share/google-cloud-sdk/bin/gcloud`,`/usr/local/share/google-cloud-sdk/bin/gcloud`,`/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`,`/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`])try{return o.accessSync(e,o.constants.X_OK),P(a.dirname(e),`append`),!0}catch{}return!1}async function I(){if(E!==void 0)return E??void 0;let e=N([`python3`,`python`]);for(let t of e){let e=await i([t,`-c`,`import os, sys; print(os.path.realpath(sys.executable))`],{timeoutMs:2e3});if(e.code!==0)continue;let n=e.stdout.trim().split(/\s+/)[0];if(n)try{return o.accessSync(n,o.constants.X_OK),E=n,n}catch{}}E=null}async function L(){if(process.env.CLOUDSDK_PYTHON)return;let e=await I();if(e)return{CLOUDSDK_PYTHON:e}}async function R(e,t){return await i([`gcloud`,...e],{timeoutMs:t,env:await L()})}async function z(e,t){if(e===`gcloud`&&F()||r(e))return;if(process.platform!==`darwin`)throw Error(`${e} not installed; install it and retry`);if(!r(`brew`))throw Error(`Homebrew not installed (install brew and retry)`);let n=e===`gcloud`?await L():void 0,a=await i([`brew`,`install`,...t],{timeoutMs:6e5,env:n});if(a.code!==0)throw Error(`brew install failed for ${e}: ${a.stderr||a.stdout}`);if(!r(e))throw Error(`${e} still not available after brew install`)}async function B(){let e=await R([`auth`,`list`,`--filter`,`status:ACTIVE`,`--format`,`value(account)`],3e4);if(e.code===0&&e.stdout.trim())return;let t=await R([`auth`,`login`],6e5);if(t.code!==0)throw Error(t.stderr||`gcloud auth login failed`)}async function V(e){let t=await R(e,12e4);if(t.code!==0)throw Error(t.stderr||t.stdout||`gcloud command failed`);return t}async function H(e,t){(await R([`pubsub`,`topics`,`describe`,t,`--project`,e],3e4)).code!==0&&await V([`pubsub`,`topics`,`create`,t,`--project`,e])}async function U(e,t,n,r){if((await R([`pubsub`,`subscriptions`,`describe`,t,`--project`,e],3e4)).code===0){await V([`pubsub`,`subscriptions`,`update`,t,`--project`,e,`--push-endpoint`,r]);return}await V([`pubsub`,`subscriptions`,`create`,t,`--project`,e,`--topic`,n,`--push-endpoint`,r])}async function W(e){if(e.mode===`off`)return``;let t=[`status`,`--json`],n=M(`tailscale`,t),r=await i([`tailscale`,...t],{timeoutMs:3e4});if(r.code!==0)throw Error(k(n,r));let a;try{a=JSON.parse(r.stdout)}catch(e){throw Error(j(n,r,e),{cause:e})}let o=a.Self?.DNSName?.replace(/\.$/,``);if(!o)throw Error(`tailscale DNS name missing; run tailscale up`);let s=typeof e.target==`string`&&e.target.trim().length>0?e.target.trim():e.port?String(e.port):``;if(!s)throw Error(`tailscale target missing; set a port or target URL`);let c=v(e.path),l=[e.mode,`--bg`,`--set-path`,c,`--yes`,s],u=M(`tailscale`,l),d=await i([`tailscale`,...l],{timeoutMs:3e4});if(d.code!==0)throw Error(k(u,d));let f=`https://${o}${c}`;return e.token?`${f}?token=${e.token}`:f}async function G(){let e=K();for(let t of e)if(o.existsSync(t))try{let e=o.readFileSync(t,`utf-8`),n=J(q(JSON.parse(e)));if(!n)continue;let r=await R([`projects`,`list`,`--filter`,`projectNumber=${n}`,`--format`,`value(projectId)`],3e4);if(r.code!==0)continue;let i=r.stdout.trim().split(/\s+/)[0];if(i)return i}catch{}return null}function K(){let e=[],t=process.env.XDG_CONFIG_HOME;return t&&e.push(a.join(t,`gogcli`,`credentials.json`)),e.push(n(`~/.config/gogcli/credentials.json`)),process.platform===`darwin`&&e.push(n(`~/Library/Application Support/gogcli/credentials.json`)),e}function q(e){let t=e.installed,n=e.web,r=t?.client_id||n?.client_id||e.client_id||``;return typeof r==`string`?r:null}function J(e){return e?e.match(/^(\d+)-/)?.[1]??null:null}export{w as C,v as S,x as _,H as a,g as b,c,p as d,f,S as g,y as h,W as i,m as l,l as m,B as n,G as o,u as p,U as r,V as s,z as t,d as u,C as v,b as w,_ as x,h as y};
@@ -1,2 +1,2 @@
1
1
  import{n as e,u as t}from"./paths-B4IRk3wi.js";import{y as n}from"./utils-UGOV_184.js";import{f as r}from"./frontmatter-BkZkwkVO.js";import{t as i}from"./exec-DHqLtFYt.js";import a from"node:fs";import o from"node:path";import{randomBytes as s}from"node:crypto";const c=`INBOX`,l=`gog-gmail-watch`,u=`gog-gmail-watch-push`,d=`127.0.0.1`,f=8788,p=`/gmail-pubsub`,m=2e4;function h(e=24){return s(e).toString(`hex`)}function g(e,t){let n=new Set((e??[]).map(e=>e.trim()).filter(Boolean));return n.add(t),Array.from(n)}function _(e){let t=e?.trim()||`/hooks`;return t===`/`?`/hooks`:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function v(e){let t=e?.trim()||`/gmail-pubsub`;return t===`/`?`/`:(t.startsWith(`/`)?t:`/${t}`).replace(/\/+$/,``)}function y(t,n=e){let r=_(t);return T(`http://127.0.0.1:${n}`,`${r}/gmail`)}function b(e,n){let r=e.hooks,i=r?.gmail,a=n.hookToken??r?.token??``;if(!a)return{ok:!1,error:`hooks.token missing (needed for gmail hook)`};let o=n.account??i?.account??``;if(!o)return{ok:!1,error:`gmail account required`};let s=n.topic??i?.topic??``;if(!s)return{ok:!1,error:`gmail topic required`};let c=n.subscription??i?.subscription??`gog-gmail-watch-push`,l=n.pushToken??i?.pushToken??``;if(!l)return{ok:!1,error:`gmail push token required`};let u=n.hookUrl??i?.hookUrl??y(r?.path,t(e)),d=n.includeBody??i?.includeBody??!0,h=n.maxBytes??i?.maxBytes,g=typeof h==`number`&&Number.isFinite(h)&&h>0?Math.floor(h):m,_=n.renewEveryMinutes??i?.renewEveryMinutes,b=typeof _==`number`&&Number.isFinite(_)&&_>0?Math.floor(_):720,x=n.serveBind??i?.serve?.bind??`127.0.0.1`,S=n.servePort??i?.serve?.port,C=typeof S==`number`&&Number.isFinite(S)&&S>0?Math.floor(S):f,w=n.servePath??i?.serve?.path,T=typeof w==`string`&&w.trim().length>0?v(w):p,E=n.tailscaleTarget??i?.tailscale?.target,D=n.tailscaleMode??i?.tailscale?.mode??`off`,O=D!==`off`&&typeof E==`string`&&E.trim().length>0?E.trim():void 0,k=v(D!==`off`&&!O?`/`:T),A=n.tailscalePath??i?.tailscale?.path,j=v(D===`off`?A??k:A??T);return{ok:!0,value:{account:o,label:n.label??i?.label??`INBOX`,topic:s,subscription:c,pushToken:l,hookToken:a,hookUrl:u,includeBody:d,maxBytes:g,renewEveryMinutes:b,serve:{bind:x,port:C,path:k},tailscale:{mode:D,path:j,target:O}}}}function x(e){return[`gmail`,`watch`,`start`,`--account`,e.account,`--label`,e.label,`--topic`,e.topic]}function S(e){let t=[`gmail`,`watch`,`serve`,`--account`,e.account,`--bind`,e.serve.bind,`--port`,String(e.serve.port),`--path`,e.serve.path,`--token`,e.pushToken,`--hook-url`,e.hookUrl,`--hook-token`,e.hookToken];return e.includeBody&&t.push(`--include-body`),e.maxBytes>0&&t.push(`--max-bytes`,String(e.maxBytes)),t}function C(e,t){return`projects/${e}/topics/${t}`}function w(e){let t=e.trim().match(/^projects\/([^/]+)\/topics\/([^/]+)$/i);return t?{projectId:t[1]??``,topicName:t[2]??``}:null}function T(e,t){let n=new URL(e);return n.pathname=`${n.pathname.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}`,n.toString()}let E;function D(e){let t=e.trim();return t?t.length<=800?t:`${t.slice(0,800)}…`:``}function O(e,t,n){let r=t.code??`null`,i=t.signal?`, signal=${t.signal}`:``,a=t.killed?`, killed=true`:``,o=D(t.stderr),s=D(t.stdout),c=[`${e} ${n} (code=${r}${i}${a})`];return o&&c.push(`stderr: ${o}`),s&&c.push(`stdout: ${s}`),c.join(`
2
- `)}function k(e,t){return O(e,t,`failed`)}function A(e,t){return O(e,t,`exited`)}function j(e,t,n){return`${e} returned invalid JSON: ${n instanceof Error?n.message:String(n)}\n${A(e,t)}`}function M(e,t){return[e,...t].join(` `)}function N(e){let t=(process.env.PATH??``).split(o.delimiter).filter(Boolean),n=new Set,r=[];for(let i of t)for(let t of e){let e=o.join(i,t);if(!n.has(e))try{a.accessSync(e,a.constants.X_OK),r.push(e),n.add(e)}catch{}}return r}function P(e,t){let n=(process.env.PATH??``).split(o.delimiter).filter(Boolean);if(n.includes(e))return;let r=t===`prepend`?[e,...n]:[...n,e];process.env.PATH=r.join(o.delimiter)}function F(){if(r(`gcloud`))return!0;for(let e of[`/opt/homebrew/share/google-cloud-sdk/bin/gcloud`,`/usr/local/share/google-cloud-sdk/bin/gcloud`,`/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`,`/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`])try{return a.accessSync(e,a.constants.X_OK),P(o.dirname(e),`append`),!0}catch{}return!1}async function I(){if(E!==void 0)return E??void 0;let e=N([`python3`,`python`]);for(let t of e){let e=await i([t,`-c`,`import os, sys; print(os.path.realpath(sys.executable))`],{timeoutMs:2e3});if(e.code!==0)continue;let n=e.stdout.trim().split(/\s+/)[0];if(n)try{return a.accessSync(n,a.constants.X_OK),E=n,n}catch{}}E=null}async function L(){if(process.env.CLOUDSDK_PYTHON)return;let e=await I();if(e)return{CLOUDSDK_PYTHON:e}}async function R(e,t){return await i([`gcloud`,...e],{timeoutMs:t,env:await L()})}async function z(e,t){if(e===`gcloud`&&F()||r(e))return;if(process.platform!==`darwin`)throw Error(`${e} not installed; install it and retry`);if(!r(`brew`))throw Error(`Homebrew not installed (install brew and retry)`);let n=e===`gcloud`?await L():void 0,a=await i([`brew`,`install`,...t],{timeoutMs:6e5,env:n});if(a.code!==0)throw Error(`brew install failed for ${e}: ${a.stderr||a.stdout}`);if(!r(e))throw Error(`${e} still not available after brew install`)}async function B(){let e=await R([`auth`,`list`,`--filter`,`status:ACTIVE`,`--format`,`value(account)`],3e4);if(e.code===0&&e.stdout.trim())return;let t=await R([`auth`,`login`],6e5);if(t.code!==0)throw Error(t.stderr||`gcloud auth login failed`)}async function V(e){let t=await R(e,12e4);if(t.code!==0)throw Error(t.stderr||t.stdout||`gcloud command failed`);return t}async function H(e,t){(await R([`pubsub`,`topics`,`describe`,t,`--project`,e],3e4)).code!==0&&await V([`pubsub`,`topics`,`create`,t,`--project`,e])}async function U(e,t,n,r){if((await R([`pubsub`,`subscriptions`,`describe`,t,`--project`,e],3e4)).code===0){await V([`pubsub`,`subscriptions`,`update`,t,`--project`,e,`--push-endpoint`,r]);return}await V([`pubsub`,`subscriptions`,`create`,t,`--project`,e,`--topic`,n,`--push-endpoint`,r])}async function W(e){if(e.mode===`off`)return``;let t=[`status`,`--json`],n=M(`tailscale`,t),r=await i([`tailscale`,...t],{timeoutMs:3e4});if(r.code!==0)throw Error(k(n,r));let a;try{a=JSON.parse(r.stdout)}catch(e){throw Error(j(n,r,e),{cause:e})}let o=a.Self?.DNSName?.replace(/\.$/,``);if(!o)throw Error(`tailscale DNS name missing; run tailscale up`);let s=typeof e.target==`string`&&e.target.trim().length>0?e.target.trim():e.port?String(e.port):``;if(!s)throw Error(`tailscale target missing; set a port or target URL`);let c=v(e.path),l=[e.mode,`--bg`,`--set-path`,c,`--yes`,s],u=M(`tailscale`,l),d=await i([`tailscale`,...l],{timeoutMs:3e4});if(d.code!==0)throw Error(k(u,d));let f=`https://${o}${c}`;return e.token?`${f}?token=${e.token}`:f}async function G(){let e=K();for(let t of e)if(a.existsSync(t))try{let e=a.readFileSync(t,`utf-8`),n=J(q(JSON.parse(e)));if(!n)continue;let r=await R([`projects`,`list`,`--filter`,`projectNumber=${n}`,`--format`,`value(projectId)`],3e4);if(r.code!==0)continue;let i=r.stdout.trim().split(/\s+/)[0];if(i)return i}catch{}return null}function K(){let e=[],t=process.env.XDG_CONFIG_HOME;return t&&e.push(o.join(t,`gogcli`,`credentials.json`)),e.push(n(`~/.config/gogcli/credentials.json`)),process.platform===`darwin`&&e.push(n(`~/Library/Application Support/gogcli/credentials.json`)),e}function q(e){let t=e.installed,n=e.web,r=t?.client_id||n?.client_id||e.client_id||``;return typeof r==`string`?r:null}function J(e){return e?e.match(/^(\d+)-/)?.[1]??null:null}export{w as C,v as S,x as _,H as a,g as b,c,p as d,f,S as g,y as h,W as i,m as l,l as m,B as n,G as o,u as p,U as r,V as s,z as t,d as u,C as v,b as w,_ as x,h as y};
2
+ `)}function k(e,t){return O(e,t,`failed`)}function A(e,t){return O(e,t,`exited`)}function j(e,t,n){return`${e} returned invalid JSON: ${n instanceof Error?n.message:String(n)}\n${A(e,t)}`}function M(e,t){return[e,...t].join(` `)}function N(e){let t=(process.env.PATH??``).split(o.delimiter).filter(Boolean),n=new Set,r=[];for(let i of t)for(let t of e){let e=o.join(i,t);if(!n.has(e))try{a.accessSync(e,a.constants.X_OK),r.push(e),n.add(e)}catch{}}return r}function P(e,t){let n=(process.env.PATH??``).split(o.delimiter).filter(Boolean);if(n.includes(e))return;let r=t===`prepend`?[e,...n]:[...n,e];process.env.PATH=r.join(o.delimiter)}function F(){if(r(`gcloud`))return!0;for(let e of[`/opt/homebrew/share/google-cloud-sdk/bin/gcloud`,`/usr/local/share/google-cloud-sdk/bin/gcloud`,`/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`,`/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud`])try{return a.accessSync(e,a.constants.X_OK),P(o.dirname(e),`append`),!0}catch{}return!1}async function I(){if(E!==void 0)return E??void 0;let e=N([`python3`,`python`]);for(let t of e){let e=await i([t,`-c`,`import os, sys; print(os.path.realpath(sys.executable))`],{timeoutMs:2e3});if(e.code!==0)continue;let n=e.stdout.trim().split(/\s+/)[0];if(n)try{return a.accessSync(n,a.constants.X_OK),E=n,n}catch{}}E=null}async function L(){if(process.env.CLOUDSDK_PYTHON)return;let e=await I();if(e)return{CLOUDSDK_PYTHON:e}}async function R(e,t){return await i([`gcloud`,...e],{timeoutMs:t,env:await L()})}async function z(e,t){if(e===`gcloud`&&F()||r(e))return;if(process.platform!==`darwin`)throw Error(`${e} not installed; install it and retry`);if(!r(`brew`))throw Error(`Homebrew not installed (install brew and retry)`);let n=e===`gcloud`?await L():void 0,a=await i([`brew`,`install`,...t],{timeoutMs:6e5,env:n});if(a.code!==0)throw Error(`brew install failed for ${e}: ${a.stderr||a.stdout}`);if(!r(e))throw Error(`${e} still not available after brew install`)}async function B(){let e=await R([`auth`,`list`,`--filter`,`status:ACTIVE`,`--format`,`value(account)`],3e4);if(e.code===0&&e.stdout.trim())return;let t=await R([`auth`,`login`],6e5);if(t.code!==0)throw Error(t.stderr||`gcloud auth login failed`)}async function V(e){let t=await R(e,12e4);if(t.code!==0)throw Error(t.stderr||t.stdout||`gcloud command failed`);return t}async function H(e,t){(await R([`pubsub`,`topics`,`describe`,t,`--project`,e],3e4)).code!==0&&await V([`pubsub`,`topics`,`create`,t,`--project`,e])}async function U(e,t,n,r){if((await R([`pubsub`,`subscriptions`,`describe`,t,`--project`,e],3e4)).code===0){await V([`pubsub`,`subscriptions`,`update`,t,`--project`,e,`--push-endpoint`,r]);return}await V([`pubsub`,`subscriptions`,`create`,t,`--project`,e,`--topic`,n,`--push-endpoint`,r])}async function W(e){if(e.mode===`off`)return``;let t=[`status`,`--json`],n=M(`tailscale`,t),r=await i([`tailscale`,...t],{timeoutMs:3e4});if(r.code!==0)throw Error(k(n,r));let a;try{a=JSON.parse(r.stdout)}catch(e){throw Error(j(n,r,e),{cause:e})}let o=a.Self?.DNSName?.replace(/\.$/,``);if(!o)throw Error(`tailscale DNS name missing; run tailscale up`);let s=typeof e.target==`string`&&e.target.trim().length>0?e.target.trim():e.port?String(e.port):``;if(!s)throw Error(`tailscale target missing; set a port or target URL`);let c=v(e.path),l=[e.mode,`--bg`,`--set-path`,c,`--yes`,s],u=M(`tailscale`,l),d=await i([`tailscale`,...l],{timeoutMs:3e4});if(d.code!==0)throw Error(k(u,d));let f=`https://${o}${c}`;return e.token?`${f}?token=${e.token}`:f}async function G(){let e=K();for(let t of e)if(a.existsSync(t))try{let e=a.readFileSync(t,`utf-8`),n=J(q(JSON.parse(e)));if(!n)continue;let r=await R([`projects`,`list`,`--filter`,`projectNumber=${n}`,`--format`,`value(projectId)`],3e4);if(r.code!==0)continue;let i=r.stdout.trim().split(/\s+/)[0];if(i)return i}catch{}return null}function K(){let e=[],t=process.env.XDG_CONFIG_HOME;return t&&e.push(o.join(t,`gogcli`,`credentials.json`)),e.push(n(`~/.config/gogcli/credentials.json`)),process.platform===`darwin`&&e.push(n(`~/Library/Application Support/gogcli/credentials.json`)),e}function q(e){let t=e.installed,n=e.web,r=t?.client_id||n?.client_id||e.client_id||``;return typeof r==`string`?r:null}function J(e){return e?e.match(/^(\d+)-/)?.[1]??null:null}export{w as C,v as S,x as _,H as a,g as b,c,p as d,f,S as g,y as h,W as i,m as l,l as m,B as n,G as o,u as p,U as r,V as s,z as t,d as u,C as v,b as w,_ as x,h as y};
@@ -1 +1 @@
1
- function e(e){let t=e.configuredFallbackPolicy??`open`,n=e.missingProviderFallbackPolicy??`allowlist`;return{groupPolicy:e.providerConfigPresent?e.groupPolicy??e.defaultGroupPolicy??t:e.groupPolicy??n,providerMissingFallbackApplied:!e.providerConfigPresent&&e.groupPolicy===void 0}}function t(e){return e.channels?.defaults?.groupPolicy}const n={group:`group messages`,guild:`guild messages`,room:`room messages`,channel:`channel messages`,space:`space messages`};function r(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`open`,missingProviderFallbackPolicy:`allowlist`})}function i(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`allowlist`,missingProviderFallbackPolicy:`allowlist`})}const a=new Set;function o(e){if(!e.providerMissingFallbackApplied)return!1;let t=`${e.providerKey}:${e.accountId??`*`}`;if(a.has(t))return!1;a.add(t);let n=e.blockedLabel?.trim()||`group messages`;return e.log(`${e.providerKey}: channels.${e.providerKey} is missing; defaulting groupPolicy to "allowlist" (${n} blocked until explicitly configured).`),!0}function s(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.routeMatched&&e.routeEnabled===!1)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_disabled`};if(e.groupPolicy===`allowlist`){if(!e.routeAllowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.routeMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}function c(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.groupPolicy===`allowlist`){if(e.requireMatchInput&&!e.hasMatchInput)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`missing_match_input`};if(!e.allowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.allowlistMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}export{t as a,i,c as n,r as o,n as r,o as s,s as t};
1
+ function e(e){let t=e.configuredFallbackPolicy??`open`,n=e.missingProviderFallbackPolicy??`allowlist`;return{groupPolicy:e.providerConfigPresent?e.groupPolicy??e.defaultGroupPolicy??t:e.groupPolicy??n,providerMissingFallbackApplied:!e.providerConfigPresent&&e.groupPolicy===void 0}}function t(e){return e.channels?.defaults?.groupPolicy}const n={group:`group messages`,guild:`guild messages`,room:`room messages`,channel:`channel messages`,space:`space messages`};function r(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`open`,missingProviderFallbackPolicy:`allowlist`})}function i(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`allowlist`,missingProviderFallbackPolicy:`allowlist`})}const a=new Set;function o(e){if(!e.providerMissingFallbackApplied)return!1;let t=`${e.providerKey}:${e.accountId??`*`}`;if(a.has(t))return!1;a.add(t);let n=e.blockedLabel?.trim()||`group messages`;return e.log(`${e.providerKey}: channels.${e.providerKey} is missing; defaulting groupPolicy to "allowlist" (${n} blocked until explicitly configured).`),!0}function s(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.routeMatched&&e.routeEnabled===!1)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_disabled`};if(e.groupPolicy===`allowlist`){if(!e.routeAllowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.routeMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}function c(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.groupPolicy===`allowlist`){if(e.requireMatchInput&&!e.hasMatchInput)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`missing_match_input`};if(!e.allowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.allowlistMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}export{t as a,i,c as n,r as o,n as r,o as s,s as t};
@@ -1 +1 @@
1
- function e(e){let t=e.configuredFallbackPolicy??`open`,n=e.missingProviderFallbackPolicy??`allowlist`;return{groupPolicy:e.providerConfigPresent?e.groupPolicy??e.defaultGroupPolicy??t:e.groupPolicy??n,providerMissingFallbackApplied:!e.providerConfigPresent&&e.groupPolicy===void 0}}function t(e){return e.channels?.defaults?.groupPolicy}const n={group:`group messages`,guild:`guild messages`,room:`room messages`,channel:`channel messages`,space:`space messages`};function r(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`open`,missingProviderFallbackPolicy:`allowlist`})}function i(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`allowlist`,missingProviderFallbackPolicy:`allowlist`})}const a=new Set;function o(e){if(!e.providerMissingFallbackApplied)return!1;let t=`${e.providerKey}:${e.accountId??`*`}`;if(a.has(t))return!1;a.add(t);let n=e.blockedLabel?.trim()||`group messages`;return e.log(`${e.providerKey}: channels.${e.providerKey} is missing; defaulting groupPolicy to "allowlist" (${n} blocked until explicitly configured).`),!0}function s(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.routeMatched&&e.routeEnabled===!1)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_disabled`};if(e.groupPolicy===`allowlist`){if(!e.routeAllowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.routeMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}function c(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.groupPolicy===`allowlist`){if(e.requireMatchInput&&!e.hasMatchInput)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`missing_match_input`};if(!e.allowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.allowlistMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}export{t as a,i,c as n,r as o,n as r,o as s,s as t};
1
+ function e(e){let t=e.configuredFallbackPolicy??`open`,n=e.missingProviderFallbackPolicy??`allowlist`;return{groupPolicy:e.providerConfigPresent?e.groupPolicy??e.defaultGroupPolicy??t:e.groupPolicy??n,providerMissingFallbackApplied:!e.providerConfigPresent&&e.groupPolicy===void 0}}function t(e){return e.channels?.defaults?.groupPolicy}const n={group:`group messages`,guild:`guild messages`,room:`room messages`,channel:`channel messages`,space:`space messages`};function r(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`open`,missingProviderFallbackPolicy:`allowlist`})}function i(t){return e({providerConfigPresent:t.providerConfigPresent,groupPolicy:t.groupPolicy,defaultGroupPolicy:t.defaultGroupPolicy,configuredFallbackPolicy:`allowlist`,missingProviderFallbackPolicy:`allowlist`})}const a=new Set;function o(e){if(!e.providerMissingFallbackApplied)return!1;let t=`${e.providerKey}:${e.accountId??`*`}`;if(a.has(t))return!1;a.add(t);let n=e.blockedLabel?.trim()||`group messages`;return e.log(`${e.providerKey}: channels.${e.providerKey} is missing; defaulting groupPolicy to "allowlist" (${n} blocked until explicitly configured).`),!0}function s(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.routeMatched&&e.routeEnabled===!1)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_disabled`};if(e.groupPolicy===`allowlist`){if(!e.routeAllowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.routeMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`route_not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}function c(e){if(e.groupPolicy===`disabled`)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`disabled`};if(e.groupPolicy===`allowlist`){if(e.requireMatchInput&&!e.hasMatchInput)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`missing_match_input`};if(!e.allowlistConfigured)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`empty_allowlist`};if(!e.allowlistMatched)return{allowed:!1,groupPolicy:e.groupPolicy,reason:`not_allowlisted`}}return{allowed:!0,groupPolicy:e.groupPolicy,reason:`allowed`}}export{t as a,i,c as n,r as o,n as r,o as s,s as t};
@@ -9,4 +9,4 @@ Please relay this reminder to the user in a helpful and friendly way.`:`A schedu
9
9
 
10
10
  Handle this reminder internally. Do not relay it to the user unless explicitly requested.`:n?`A scheduled cron event was triggered, but no event content was found. Reply HEARTBEAT_OK.`:`A scheduled cron event was triggered, but no event content was found. Handle this internally and reply HEARTBEAT_OK when nothing needs user-facing follow-up.`}function Se(e){return e?.deliverToUser??!0?`An async command you ran earlier has completed. The result is shown in the system messages above. Please relay the command output to the user in a helpful way. If the command succeeded, share the relevant output. If it failed, explain what went wrong.`:`An async command you ran earlier has completed. The result is shown in the system messages above. Handle the result internally. Do not relay it to the user unless explicitly requested.`}const Ce=R.toLowerCase();function we(e){let t=e.trim();if(!t)return!1;let n=t.toLowerCase();if(!n.startsWith(Ce))return!1;let r=n.slice(Ce.length);return r.length===0?!0:!/[a-z0-9_]/.test(r[0])}function Te(e){let t=e.trim().toLowerCase();return t?we(t)||t.includes(`heartbeat poll`)||t.includes(`heartbeat wake`):!1}function Ee(e){return e.toLowerCase().includes(`exec finished`)}function De(e){return e.trim()?!Te(e)&&!Ee(e):!1}const G=i(`gateway/heartbeat`),Oe=`none`;function ke(e){return(e.agents?.list??[]).some(e=>!!e?.heartbeat)}function Ae(e,t){let n=y(t??g(e)),r=e.agents?.list??[];return ke(e)?r.some(e=>!!e?.heartbeat&&y(e?.id)===n):n===g(e)}function K(e,t){let n=e.agents?.defaults?.heartbeat;if(!t)return n;let r=_(e,t)?.heartbeat;return!n&&!r?r:{...n,...r}}function je(e,t){let n=e.agents?.defaults?.heartbeat,r=t?_(e,t)?.heartbeat:void 0;if(!Ae(e,t))return{enabled:!1,every:`disabled`,everyMs:null,prompt:I(n?.prompt),target:n?.target??Oe,model:n?.model,ackMaxChars:Math.max(0,n?.ackMaxChars??300)};let i=n||r?{...n,...r}:void 0;return{enabled:!0,every:i?.every??n?.every??r?.every??`30m`,everyMs:q(e,void 0,i),prompt:I(i?.prompt??n?.prompt??r?.prompt),target:i?.target??n?.target??r?.target??Oe,model:i?.model??n?.model??r?.model,ackMaxChars:Math.max(0,i?.ackMaxChars??n?.ackMaxChars??r?.ackMaxChars??300)}}function Me(e){let t=e.agents?.list??[];if(ke(e))return t.filter(e=>e?.heartbeat).map(t=>{let n=y(t.id);return{agentId:n,heartbeat:K(e,n)}}).filter(e=>e.agentId);let n=g(e);return[{agentId:n,heartbeat:K(e,n)}]}function q(e,t,n){let r=t??n?.every??e.agents?.defaults?.heartbeat?.every??`30m`;if(!r)return null;let i=String(r).trim();if(!i)return null;let a;try{a=C(i,{defaultUnit:`m`})}catch{return null}return a<=0?null:a}function Ne(e,t){return I(t?.prompt??e.agents?.defaults?.heartbeat?.prompt)}function Pe(e,t){return Math.max(0,t?.ackMaxChars??e.agents?.defaults?.heartbeat?.ackMaxChars??300)}function Fe(e,t,n,r){let i=e.session,a=i?.scope??`per-sender`,o=y(t??g(e)),c=a===`global`?`global`:s({cfg:e,agentId:o}),l=a===`global`?g(e):o,u=L(i?.store,{agentId:l}),f=p(u),m=f[c];if(a===`global`)return{sessionKey:c,storePath:u,store:f,entry:m};let h=r?.trim();if(h){let t=d({cfg:e,agentId:o,sessionKey:b({agentId:o,requestKey:h,mainKey:e.session?.mainKey})});if(t!==`global`&&x(t)===y(o))return{sessionKey:t,storePath:u,store:f,entry:f[t]}}let _=n?.session?.trim()??``;if(!_)return{sessionKey:c,storePath:u,store:f,entry:m};let v=_.toLowerCase();if(v===`main`||v===`global`)return{sessionKey:c,storePath:u,store:f,entry:m};let S=d({cfg:e,agentId:o,sessionKey:b({agentId:o,requestKey:_,mainKey:e.session?.mainKey})});return S!==`global`&&x(S)===y(o)?{sessionKey:S,storePath:u,store:f,entry:f[S]}:{sessionKey:c,storePath:u,store:f,entry:m}}function Ie(e){return(Array.isArray(e)?e:e?[e]:[]).filter(e=>(typeof e.text==`string`?e.text:``).trimStart().startsWith(`Reasoning:`))}async function J(e){let{storePath:t,sessionKey:n,updatedAt:r}=e;if(typeof r!=`number`)return;let i=p(t)[n];if(!i)return;let a=Math.max(i.updatedAt??0,r);i.updatedAt!==a&&await l(t,e=>{let t=e[n]??i;if(!t)return;let a=Math.max(t.updatedAt??0,r);t.updatedAt!==a&&(e[n]={...t,updatedAt:a})})}async function Y(e){let{transcriptPath:t,preHeartbeatSize:n}=e;if(!(!t||typeof n!=`number`||n<0))try{(await U.stat(t)).size>n&&await U.truncate(t,n)}catch{}}async function Le(e){let{storePath:t,sessionKey:n,agentId:r}=e;try{let e=p(t)[n];if(!e?.sessionId)return{};let i=de(e.sessionId,e,{agentId:r,sessionsDir:H.dirname(t)});return{transcriptPath:i,preHeartbeatSize:(await U.stat(i)).size}}catch{return{}}}function Re(e,t){let n=t?.trim();if(!n)return e;let r=RegExp(`^${S(n)}(?=$|\\s|[\\p{P}\\p{S}])\\s*`,`iu`);return e.replace(r,``)}function ze(e,t,n){let r=F(Re(typeof e.text==`string`?e.text:``,t),{mode:`heartbeat`,maxAckChars:n}),i=!!(e.mediaUrl||(e.mediaUrls?.length??0)>0);if(r.shouldSkip&&!i)return{shouldSkip:!0,text:``,hasMedia:i};let a=r.text;return t&&a&&!a.startsWith(t)&&(a=`${t} ${a}`),{shouldSkip:!1,text:a,hasMedia:i}}function Be(e){let t=ce(e);return{isExecEventReason:t===`exec-event`,isCronEventReason:t===`cron`,isWakeReason:t===`wake`||t===`hook`}}async function Ve(e){let t=Be(e.reason),n=Fe(e.cfg,e.agentId,e.heartbeat,e.forcedSessionKey),r=P(n.sessionKey),i=r.some(e=>e.contextKey?.startsWith(`cron:`)),a=t.isExecEventReason||t.isCronEventReason||i,o=t.isExecEventReason||t.isCronEventReason||t.isWakeReason||i,s={...t,session:n,pendingEventEntries:r,hasTaggedCronEvents:i,shouldInspectPendingEvents:a};if(o)return s;let c=h(e.cfg,e.agentId),l=H.join(c,m);try{if(re(await U.readFile(l,`utf-8`)))return{...s,skipReason:`empty-heartbeat-file`}}catch(e){if(k(e,`ENOENT`))return s}return s}function He(e,t){if(!/heartbeat\.md/i.test(e))return e;let n=`When reading HEARTBEAT.md, use workspace file ${H.join(t,m).replace(/\\/g,`/`)} (exact case). Do not read docs/heartbeat.md.`;return e.includes(n)?e:`${e}\n${n}`}function Ue(e){let t=e.preflight.pendingEventEntries,n=e.preflight.shouldInspectPendingEvents?t.map(e=>e.text):[],r=t.filter(t=>(e.preflight.isCronEventReason||t.contextKey?.startsWith(`cron:`))&&De(t.text)).map(e=>e.text),i=n.some(Ee),a=r.length>0;return{prompt:He(i?Se({deliverToUser:e.canRelayToUser}):a?xe(r,{deliverToUser:e.canRelayToUser}):Ne(e.cfg,e.heartbeat),e.workspaceDir),hasExecCompletion:i,hasCronEvents:a}}async function We(e){let t=e.cfg??f(),n=typeof e.agentId==`string`?e.agentId.trim():``,r=n.length>0?void 0:v(e.sessionKey)?.agentId,i=y(n||r||g(t)),a=e.heartbeat??K(t,i);if(!ie()||!Ae(t,i)||!q(t,void 0,a))return{status:`skipped`,reason:`disabled`};let o=e.deps?.nowMs?.()??Date.now();if(!be(t,a,o))return{status:`skipped`,reason:`quiet-hours`};if((e.deps?.getQueueSize??j)(te.Main)>0)return{status:`skipped`,reason:`requests-in-flight`};let s=await Ve({cfg:t,agentId:i,heartbeat:a,forcedSessionKey:e.sessionKey,reason:e.reason});if(s.skipReason)return V({status:`skipped`,reason:s.skipReason,durationMs:Date.now()-o}),{status:`skipped`,reason:s.skipReason};let{entry:l,sessionKey:u,storePath:d}=s.session,m=l?.updatedAt,_=le({cfg:t,entry:l,heartbeat:a}),b=a?.accountId?.trim();_.reason===`unknown-account`?G.warn(`heartbeat: unknown accountId`,{accountId:_.accountId??b??null,target:a?.target??`none`}):b&&G.info(`heartbeat: using explicit accountId`,{accountId:_.accountId??b,target:a?.target??`none`,channel:_.channel});let x=_.channel===`none`?{showOk:!1,showAlerts:!0,useIndicator:!0}:ge({cfg:t,channel:_.channel,accountId:_.accountId}),{sender:S}=ue({cfg:t,entry:l,delivery:_}),C=M(t,i,{channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId}).responsePrefix,{prompt:w,hasExecCompletion:T,hasCronEvents:E}=Ue({cfg:t,heartbeat:a,preflight:s,canRelayToUser:!!(_.channel!==`none`&&_.to&&x.showAlerts),workspaceDir:h(t,i)}),O={Body:ae(w,t,o),From:S,To:S,OriginatingChannel:_.channel===`none`?void 0:_.channel,OriginatingTo:_.to,AccountId:_.accountId,MessageThreadId:_.threadId,Provider:T?`exec-event`:E?`cron-event`:`heartbeat`,SessionKey:u};if(!x.showAlerts&&!x.showOk&&!x.useIndicator)return V({status:`skipped`,reason:`alerts-disabled`,durationMs:Date.now()-o,channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId}),{status:`skipped`,reason:`alerts-disabled`};let k=C?`${C} ${R}`:R,N=oe({cfg:t,agentId:i,sessionKey:u}),P=!!(x.showOk&&_.channel!==`none`&&_.to),F=async()=>{if(!P||_.channel===`none`||!_.to)return!1;let n=D(_.channel);return n?.heartbeat?.checkReady&&!(await n.heartbeat.checkReady({cfg:t,accountId:_.accountId,deps:e.deps})).ok?!1:(await z({cfg:t,channel:_.channel,to:_.to,accountId:_.accountId,threadId:_.threadId,payloads:[{text:k}],session:N,deps:e.deps}),!0)};try{let n=await Le({storePath:d,sessionKey:u,agentId:i}),r=a?.model?.trim()||void 0,s=a?.suppressToolErrorWarnings===!0,f=a?.lightContext===!0?`lightweight`:void 0,h=await ee(O,r?{isHeartbeat:!0,heartbeatModelOverride:r,suppressToolErrorWarnings:s,bootstrapContextMode:f}:{isHeartbeat:!0,suppressToolErrorWarnings:s,bootstrapContextMode:f},t),g=he(h),v=a?.includeReasoning===!0?Ie(h).filter(e=>e!==g):[];if(!g||!g.text&&!g.mediaUrl&&!g.mediaUrls?.length){await J({storePath:d,sessionKey:u,updatedAt:m}),await Y(n);let t=await F();return V({status:`ok-empty`,reason:e.reason,durationMs:Date.now()-o,channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId,silent:!t,indicatorType:x.useIndicator?B(`ok-empty`):void 0}),{status:`ran`,durationMs:Date.now()-o}}let y=ze(g,C,Pe(t,a)),b=T&&!y.text.trim()&&g.text?.trim()?g.text.trim():null;b&&(y.text=b,y.shouldSkip=!1);let S=y.shouldSkip&&!y.hasMedia&&!T;if(S&&v.length===0){await J({storePath:d,sessionKey:u,updatedAt:m}),await Y(n);let t=await F();return V({status:`ok-token`,reason:e.reason,durationMs:Date.now()-o,channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId,silent:!t,indicatorType:x.useIndicator?B(`ok-token`):void 0}),{status:`ran`,durationMs:Date.now()-o}}let w=g.mediaUrls??(g.mediaUrl?[g.mediaUrl]:[]),E=typeof l?.lastHeartbeatText==`string`?l.lastHeartbeatText:``,k=typeof l?.lastHeartbeatSentAt==`number`?l.lastHeartbeatSentAt:void 0;if(!S&&!w.length&&E.trim()&&y.text.trim()===E.trim()&&typeof k==`number`&&o-k<1440*60*1e3)return await J({storePath:d,sessionKey:u,updatedAt:m}),await Y(n),V({status:`skipped`,reason:`duplicate`,preview:y.text.slice(0,200),durationMs:Date.now()-o,hasMedia:!1,channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId}),{status:`ran`,durationMs:Date.now()-o};let A=S?v.map(e=>e.text).filter(e=>!!e?.trim()).join(`
11
11
  `):y.text;if(_.channel===`none`||!_.to)return V({status:`skipped`,reason:_.reason??`no-target`,preview:A?.slice(0,200),durationMs:Date.now()-o,hasMedia:w.length>0,accountId:_.accountId}),{status:`ran`,durationMs:Date.now()-o};if(!x.showAlerts)return await J({storePath:d,sessionKey:u,updatedAt:m}),V({status:`skipped`,reason:`alerts-disabled`,preview:A?.slice(0,200),durationMs:Date.now()-o,channel:_.channel,hasMedia:w.length>0,accountId:_.accountId,indicatorType:x.useIndicator?B(`sent`):void 0}),{status:`ran`,durationMs:Date.now()-o};let j=_.accountId,M=D(_.channel);if(M?.heartbeat?.checkReady){let n=await M.heartbeat.checkReady({cfg:t,accountId:j,deps:e.deps});if(!n.ok)return V({status:`skipped`,reason:n.reason,preview:A?.slice(0,200),durationMs:Date.now()-o,hasMedia:w.length>0,channel:_.channel,accountId:_.accountId}),G.info(`heartbeat: channel not ready`,{channel:_.channel,reason:n.reason}),{status:`skipped`,reason:n.reason}}if(await z({cfg:t,channel:_.channel,to:_.to,accountId:j,session:N,threadId:_.threadId,payloads:[...v,...S?[]:[{text:y.text,mediaUrls:w}]],deps:e.deps}),!S&&y.text.trim()){let e=p(d),t=e[u];t&&(e[u]={...t,lastHeartbeatText:y.text,lastHeartbeatSentAt:o},await c(d,e))}return V({status:`sent`,to:_.to,preview:A?.slice(0,200),durationMs:Date.now()-o,hasMedia:w.length>0,channel:_.channel,accountId:_.accountId,indicatorType:x.useIndicator?B(`sent`):void 0}),{status:`ran`,durationMs:Date.now()-o}}catch(e){let t=A(e);return V({status:`failed`,reason:t,durationMs:Date.now()-o,channel:_.channel===`none`?void 0:_.channel,accountId:_.accountId,indicatorType:x.useIndicator?B(`failed`):void 0}),G.error(`heartbeat failed: ${t}`,{error:t}),{status:`failed`,reason:t}}}function Ge(e){let t=e.runtime??r,n=e.runOnce??We,i={cfg:e.cfg??f(),runtime:t,agents:new Map,timer:null,stopped:!1},a=!1,o=(e,t,n)=>typeof n?.lastRunMs==`number`?n.lastRunMs+t:n&&n.intervalMs===t&&n.nextDueMs>e?n.nextDueMs:e+t,s=(e,t)=>{e.lastRunMs=t,e.nextDueMs=t+e.intervalMs},c=()=>{if(i.stopped||(i.timer&&=(clearTimeout(i.timer),null),i.agents.size===0))return;let e=Date.now(),t=1/0;for(let e of i.agents.values())e.nextDueMs<t&&(t=e.nextDueMs);if(!Number.isFinite(t))return;let n=Math.max(0,t-e);i.timer=setTimeout(()=>{i.timer=null,se({reason:`interval`,coalesceMs:0})},n),i.timer.unref?.()},l=e=>{if(i.stopped)return;let t=Date.now(),n=i.agents,r=n.size>0,s=new Map,l=[];for(let r of Me(e)){let i=q(e,void 0,r.heartbeat);if(!i)continue;l.push(i);let a=n.get(r.agentId),c=o(t,i,a);s.set(r.agentId,{agentId:r.agentId,heartbeat:r.heartbeat,intervalMs:i,lastRunMs:a?.lastRunMs,nextDueMs:c})}i.cfg=e,i.agents=s;let u=s.size>0;a?r!==u&&(u?G.info(`heartbeat: started`,{intervalMs:Math.min(...l)}):G.info(`heartbeat: disabled`,{enabled:!1})):(u?G.info(`heartbeat: started`,{intervalMs:Math.min(...l)}):G.info(`heartbeat: disabled`,{enabled:!1}),a=!0),c()},u=async e=>{if(i.stopped||!ie()||i.agents.size===0)return{status:`skipped`,reason:`disabled`};let t=e?.reason,r=e?.agentId?y(e.agentId):void 0,a=e?.sessionKey?.trim()||void 0,o=t===`interval`,l=Date.now(),u=l,d=!1;if(a||r){let e=r??x(a),o=i.agents.get(e);if(!o)return c(),{status:`skipped`,reason:`disabled`};try{let e=await n({cfg:i.cfg,agentId:o.agentId,heartbeat:o.heartbeat,reason:t,sessionKey:a,deps:{runtime:i.runtime}});return(e.status!==`skipped`||e.reason!==`disabled`)&&s(o,u),c(),e.status===`ran`?{status:`ran`,durationMs:Date.now()-l}:e}catch(e){let t=A(e);return G.error(`heartbeat runner: targeted runOnce threw unexpectedly: ${t}`,{error:t}),s(o,u),c(),{status:`failed`,reason:t}}}for(let e of i.agents.values()){if(o&&u<e.nextDueMs)continue;let r;try{r=await n({cfg:i.cfg,agentId:e.agentId,heartbeat:e.heartbeat,reason:t,deps:{runtime:i.runtime}})}catch(t){let n=A(t);G.error(`heartbeat runner: runOnce threw unexpectedly: ${n}`,{error:n}),s(e,u);continue}if(r.status===`skipped`&&r.reason===`requests-in-flight`)return r;(r.status!==`skipped`||r.reason!==`disabled`)&&s(e,u),r.status===`ran`&&(d=!0)}return c(),d?{status:`ran`,durationMs:Date.now()-l}:{status:`skipped`,reason:o?`not-due`:`disabled`}},d=ne(async e=>u({reason:e.reason,agentId:e.agentId,sessionKey:e.sessionKey}));l(i.cfg);let p=()=>{i.stopped||(i.stopped=!0,d(),i.timer&&clearTimeout(i.timer),i.timer=null)};return e.abortSignal?.addEventListener(`abort`,p,{once:!0}),{stop:p,updateConfig:l}}function Ke(e,n){if(!n)return e;let r=e.indexOf(`:`);if(r===-1)return e;let i=e.slice(0,r+1),a=e.slice(r+1).trimStart(),o=a.toLowerCase(),s=(e,t)=>`${i} ${t(a.slice(0,e.length))}${a.slice(e.length)}`;return o.startsWith(`failed`)?s(`failed`,t.error):o.startsWith(`ok`)?s(`ok`,t.success):o.startsWith(`linked`)?s(`linked`,t.success):o.startsWith(`configured`)?s(`configured`,t.success):o.startsWith(`not linked`)?s(`not linked`,t.warn):o.startsWith(`not configured`)?s(`not configured`,t.muted):o.startsWith(`unknown`)?s(`unknown`,t.warn):e}var qe=e({formatHealthChannelLines:()=>Q,getHealthSnapshot:()=>nt,healthCommand:()=>$});const Je=(...e)=>{o(process.env.OPENCLAW_DEBUG_HEALTH)&&console.warn(`[health:debug]`,...e)},Ye=e=>{if(!Number.isFinite(e))return`unknown`;if(e<1e3)return`${Math.max(0,Math.round(e))}ms`;let t=[{label:`w`,size:10080*60*1e3},{label:`d`,size:1440*60*1e3},{label:`h`,size:3600*1e3},{label:`m`,size:60*1e3},{label:`s`,size:1e3}],n=Math.max(0,Math.floor(e)),r=[];for(let e of t){let t=Math.floor(n/e.size);t>0&&(r.push(`${t}${e.label}`),n-=t*e.size)}return r.length===0?`0s`:r.join(` `)},Xe=(e,t)=>je(e,t),Ze=e=>{let t=g(e),n=Array.isArray(e.agents?.list)?e.agents.list:[],r=new Set,i=[];for(let e of n){if(!e||typeof e!=`object`||typeof e.id!=`string`||!e.id.trim())continue;let t=y(e.id);!t||r.has(t)||(r.add(t),i.push({id:t,name:typeof e.name==`string`?e.name:void 0}))}return r.has(t)||i.unshift({id:t}),i.length===0&&i.push({id:t}),{defaultAgentId:t,ordered:i}},X=e=>{let t=p(e),n=Object.entries(t).filter(([e])=>e!==`global`&&e!==`unknown`).map(([e,t])=>({key:e,updatedAt:t?.updatedAt??0})).toSorted((e,t)=>t.updatedAt-e.updatedAt),r=n.slice(0,5).map(e=>({key:e.key,updatedAt:e.updatedAt||null,age:e.updatedAt?Date.now()-e.updatedAt:null}));return{path:e,count:n.length,recent:r}},Qe=e=>!e||typeof e!=`object`?!0:e.enabled!==!1,Z=e=>e&&typeof e==`object`?e:null,$e=(e,t={})=>{let n=Z(e);if(!n)return null;let r=typeof n.ok==`boolean`?n.ok:void 0;if(r===void 0)return null;let i=typeof n.elapsedMs==`number`?n.elapsedMs:null,a=typeof n.status==`number`?n.status:null,o=typeof n.error==`string`?n.error:null,s=Z(n.bot),c=s&&typeof s.username==`string`?s.username:null,l=Z(n.webhook),u=l&&typeof l.url==`string`?l.url:null,d=new Set;c&&d.add(c);for(let e of t.botUsernames??[])e&&d.add(e);if(r){let e=`ok`;return d.size>0&&(e+=` (@${Array.from(d).join(`, @`)})`),i!=null&&(e+=` (${i}ms)`),u&&(e+=` - webhook ${u}`),e}let f=`failed (${a??`unknown`})`;return o&&(f+=` - ${o}`),f},et=e=>{let t=Z(e.probe);if(!t)return null;let n=typeof t.elapsedMs==`number`?Math.round(t.elapsedMs):null,r=typeof t.ok==`boolean`?t.ok:null;if(n==null&&r!==!0)return null;let i=e.accountId||`default`,a=Z(t.bot),o=a&&typeof a.username==`string`?a.username:null;return`${o?`@${o}`:i}:${i}:${n==null?`ok`:`${n}ms`}`},tt=e=>{let t=Z(e.probe);return t?(typeof t.ok==`boolean`?t.ok:null)===!1:!1},Q=(e,t={})=>{let n=e.channels??{},r=e.channelOrder?.length>0?e.channelOrder:Object.keys(n),i=t.accountMode??`default`,a=[];for(let o of r){let r=n[o];if(!r)continue;let s=D(o),c=e.channelLabels?.[o]??s?.meta.label??o,l=r.accounts??{},u=t.accountIdsByChannel?.[o],d=u&&u.length>0?u.map(e=>l[e]).filter(e=>!!e):void 0,f=i===`all`?Object.values(l):d??(r.accounts?Object.values(l):[]),p=d&&d.length>0?d[0]:r,m=f?f.map(e=>{let t=Z(e.probe),n=t?Z(t.bot):null;return n&&typeof n.username==`string`?n.username:null}).filter(e=>!!e):[],h=typeof p.linked==`boolean`?p.linked:null;if(h!==null){if(h){let e=typeof p.authAgeMs==`number`?p.authAgeMs:null,t=e==null?``:` (auth age ${Math.round(e/6e4)}m)`;a.push(`${c}: linked${t}`)}else a.push(`${c}: not linked`);continue}let g=typeof p.configured==`boolean`?p.configured:null;if(g===!1){a.push(`${c}: not configured`);continue}let _=i===`all`?f.map(e=>et(e)).filter(e=>!!e):[],v=f.find(e=>tt(e));if(v){let e=$e(v.probe,{botUsernames:m});if(e){a.push(`${c}: ${e}`);continue}}if(_.length>0){a.push(`${c}: ok (${_.join(`, `)})`);continue}let y=$e(p.probe,{botUsernames:m});if(y){a.push(`${c}: ${y}`);continue}if(g===!0){a.push(`${c}: configured`);continue}a.push(`${c}: unknown`)}return a};async function nt(e){let t=e?.timeoutMs,n=f(),{defaultAgentId:r,ordered:i}=Ze(n),a=w(n),o=new Map,s=i.map(e=>{let t=L(n.session?.store,{agentId:e.id}),i=o.get(t)??X(t);return o.set(t,i),{agentId:e.id,name:e.name,isDefault:e.id===r,heartbeat:Xe(n,e.id),sessions:i}}),c=s.find(e=>e.isDefault)??s[0],l=c?.heartbeat.everyMs?Math.round(c.heartbeat.everyMs/1e3):0,u=c?.sessions??X(L(n.session?.store,{agentId:r})),d=Date.now(),p=t===void 0?1e4:Math.max(50,t),m=e?.probe!==!1,h={},g=E().map(e=>e.id),_={};for(let e of E()){_[e.id]=e.meta.label??e.id;let t=e.config.listAccountIds(n),i=T({plugin:e,cfg:n,accountIds:t}),o=a.get(e.id)?.get(r)??[],s=O({accountIds:t,defaultAccountId:i,boundAccounts:o}),c=Array.from(new Set(Array.from(a.get(e.id)?.values()??[]).flatMap(e=>e))),l=Array.from(new Set([s,i,...t,...c].filter(e=>e&&e.trim())));Je(`channel`,{id:e.id,accountIds:t,defaultAccountId:i,boundAccounts:o,preferredAccountId:s,accountIdsToProbe:l});let u={};for(let t of l){let r=e.config.resolveAccount(n,t),i=e.config.isEnabled?e.config.isEnabled(r,n):Qe(r),a=e.config.isConfigured?await e.config.isConfigured(r,n):!0,o,s=null;if(i&&a&&m&&e.status?.probeAccount)try{o=await e.status.probeAccount({account:r,timeoutMs:p,cfg:n}),s=Date.now()}catch(e){o={ok:!1,error:A(e)},s=Date.now()}let c=o&&typeof o==`object`?o:null,l=c&&typeof c.bot==`object`?c.bot:null;l?.username&&Je(`probe.bot`,{channel:e.id,accountId:t,username:l.username});let d={accountId:t,enabled:i,configured:a};o!==void 0&&(d.probe=o),s&&(d.lastProbeAt=s);let f=e.status?.buildChannelSummary?await e.status.buildChannelSummary({account:r,cfg:n,defaultAccountId:t,snapshot:d}):void 0,h=f&&typeof f==`object`?f:{accountId:t,configured:a,probe:o,lastProbeAt:s};h.configured===void 0&&(h.configured=a),h.lastProbeAt===void 0&&s&&(h.lastProbeAt=s),h.accountId=t,u[t]=h}let d=u[s]??u[i]??u[l[0]??s]??u[Object.keys(u)[0]];d&&(h[e.id]={...d,accounts:u})}return{ok:!0,ts:Date.now(),durationMs:Date.now()-d,channels:h,channelOrder:g,channelLabels:_,heartbeatSeconds:l,defaultAgentId:r,agents:s,sessions:{path:u.path,count:u.count,recent:u.recent}}}async function $(e,t){let r=e.config??await u(),i=await me({label:`Checking gateway health…`,indeterminate:!0,enabled:e.json!==!0},async()=>await fe({method:`health`,params:e.verbose?{probe:!0}:void 0,timeoutMs:e.timeoutMs,config:r}));if(e.json)t.log(JSON.stringify(i,null,2));else{let s=o(process.env.OPENCLAW_DEBUG_HEALTH),c=n();if(e.verbose){let e=pe({config:r});t.log(a(`Gateway connection:`));for(let n of e.message.split(`
12
- `))t.log(` ${n}`)}let l=Ze(r),u=i.defaultAgentId??l.defaultAgentId,d=Array.isArray(i.agents)?i.agents:[],f=l.ordered.map(e=>{let t=L(r.session?.store,{agentId:e.id});return{agentId:e.id,name:e.name,isDefault:e.id===l.defaultAgentId,heartbeat:Xe(r,e.id),sessions:X(t)}}),p=d.length>0?d:f,m=e.verbose?p:p.filter(e=>e.agentId===u),h=w(r);if(s){t.log(a(`[debug] local channel accounts`));for(let e of E()){let n=e.config.listAccountIds(r),i=T({plugin:e,cfg:r,accountIds:n});t.log(` ${e.id}: accounts=${n.join(`, `)||`(none)`} default=${i}`);for(let i of n){let n=e.config.resolveAccount(r,i),a=Z(n),o=a&&typeof a.tokenSource==`string`?a.tokenSource:void 0,s=e.config.isConfigured?await e.config.isConfigured(n,r):!0;t.log(` - ${i}: configured=${s}${o?` tokenSource=${o}`:``}`)}}t.log(a(`[debug] bindings map`));for(let[e,n]of h.entries()){let r=Array.from(n.entries()).map(([e,t])=>`${e}=[${t.join(`, `)}]`);t.log(` ${e}: ${r.join(` `)}`)}t.log(a(`[debug] gateway channel probes`));for(let[e,n]of Object.entries(i.channels??{})){let r=n.accounts??{},i=Object.entries(r).map(([e,t])=>{let n=Z(t.probe),r=n?Z(n.bot):null;return`${e}=${(r&&typeof r.username==`string`?r.username:null)??`(no bot)`}`});t.log(` ${e}: ${i.join(`, `)||`(none)`}`)}}let g=Object.fromEntries(E().map(e=>{let t=e.config.listAccountIds(r),n=O({accountIds:t,defaultAccountId:T({plugin:e,cfg:r,accountIds:t}),boundAccounts:h.get(e.id)?.get(u)??[]});return[e.id,[n]]})),_=(()=>{let e=m.length>0?m:p,t={};for(let[n,r]of h.entries()){let i=[];for(let t of e){let e=r.get(t.agentId)??[];for(let t of e)i.includes(t)||i.push(t)}i.length>0&&(t[n]=i)}for(let[e,n]of Object.entries(g))(!t[e]||t[e].length===0)&&(t[e]=n);return t})(),v=Object.keys(_).length>0?Q(i,{accountMode:e.verbose?`all`:`default`,accountIdsByChannel:_}):Q(i,{accountMode:e.verbose?`all`:`default`});for(let e of v)t.log(Ke(e,c));for(let e of E()){let n=i.channels?.[e.id];if(!n||n.linked!==!0||!e.status?.logSelfId)continue;let a=h.get(e.id)?.get(u)??[],o=e.config.listAccountIds(r),s=O({accountIds:o,defaultAccountId:T({plugin:e,cfg:r,accountIds:o}),boundAccounts:a}),c=e.config.resolveAccount(r,s);e.status.logSelfId({account:c,cfg:r,runtime:t,includeChannelPrefix:!0})}if(p.length>0){let e=p.map(e=>e.isDefault?`${e.agentId} (default)`:e.agentId);t.log(a(`Agents: ${e.join(`, `)}`))}let y=m.map(e=>{let t=e.heartbeat?.everyMs;return`${t?Ye(t):`disabled`} (${e.agentId})`}).filter(Boolean);if(y.length>0&&t.log(a(`Heartbeat interval: ${y.join(`, `)}`)),m.length===0){if(t.log(a(`Session store: ${i.sessions.path} (${i.sessions.count} entries)`)),i.sessions.recent.length>0)for(let e of i.sessions.recent)t.log(`- ${e.key} (${e.updatedAt?`${Math.round((Date.now()-e.updatedAt)/6e4)}m ago`:`no activity`})`)}else for(let e of m)if(t.log(a(`Session store (${e.agentId}): ${e.sessions.path} (${e.sessions.count} entries)`)),e.sessions.recent.length>0)for(let n of e.sessions.recent)t.log(`- ${n.key} (${n.updatedAt?`${Math.round((Date.now()-n.updatedAt)/6e4)}m ago`:`no activity`})`)}}export{Ke as a,Ge as c,qe as i,nt as n,je as o,$ as r,We as s,Q as t};
12
+ `))t.log(` ${n}`)}let l=Ze(r),u=i.defaultAgentId??l.defaultAgentId,d=Array.isArray(i.agents)?i.agents:[],f=l.ordered.map(e=>{let t=L(r.session?.store,{agentId:e.id});return{agentId:e.id,name:e.name,isDefault:e.id===l.defaultAgentId,heartbeat:Xe(r,e.id),sessions:X(t)}}),p=d.length>0?d:f,m=e.verbose?p:p.filter(e=>e.agentId===u),h=w(r);if(s){t.log(a(`[debug] local channel accounts`));for(let e of E()){let n=e.config.listAccountIds(r),i=T({plugin:e,cfg:r,accountIds:n});t.log(` ${e.id}: accounts=${n.join(`, `)||`(none)`} default=${i}`);for(let i of n){let n=e.config.resolveAccount(r,i),a=Z(n),o=a&&typeof a.tokenSource==`string`?a.tokenSource:void 0,s=e.config.isConfigured?await e.config.isConfigured(n,r):!0;t.log(` - ${i}: configured=${s}${o?` tokenSource=${o}`:``}`)}}t.log(a(`[debug] bindings map`));for(let[e,n]of h.entries()){let r=Array.from(n.entries()).map(([e,t])=>`${e}=[${t.join(`, `)}]`);t.log(` ${e}: ${r.join(` `)}`)}t.log(a(`[debug] gateway channel probes`));for(let[e,n]of Object.entries(i.channels??{})){let r=n.accounts??{},i=Object.entries(r).map(([e,t])=>{let n=Z(t.probe),r=n?Z(n.bot):null;return`${e}=${(r&&typeof r.username==`string`?r.username:null)??`(no bot)`}`});t.log(` ${e}: ${i.join(`, `)||`(none)`}`)}}let g=Object.fromEntries(E().map(e=>{let t=e.config.listAccountIds(r),n=O({accountIds:t,defaultAccountId:T({plugin:e,cfg:r,accountIds:t}),boundAccounts:h.get(e.id)?.get(u)??[]});return[e.id,[n]]})),_=(()=>{let e=m.length>0?m:p,t={};for(let[n,r]of h.entries()){let i=[];for(let t of e){let e=r.get(t.agentId)??[];for(let t of e)i.includes(t)||i.push(t)}i.length>0&&(t[n]=i)}for(let[e,n]of Object.entries(g))(!t[e]||t[e].length===0)&&(t[e]=n);return t})(),v=Object.keys(_).length>0?Q(i,{accountMode:e.verbose?`all`:`default`,accountIdsByChannel:_}):Q(i,{accountMode:e.verbose?`all`:`default`});for(let e of v)t.log(Ke(e,c));for(let e of E()){let n=i.channels?.[e.id];if(!n||n.linked!==!0||!e.status?.logSelfId)continue;let a=h.get(e.id)?.get(u)??[],o=e.config.listAccountIds(r),s=O({accountIds:o,defaultAccountId:T({plugin:e,cfg:r,accountIds:o}),boundAccounts:a}),c=e.config.resolveAccount(r,s);e.status.logSelfId({account:c,cfg:r,runtime:t,includeChannelPrefix:!0})}if(p.length>0){let e=p.map(e=>e.isDefault?`${e.agentId} (default)`:e.agentId);t.log(a(`Agents: ${e.join(`, `)}`))}let y=m.map(e=>{let t=e.heartbeat?.everyMs;return`${t?Ye(t):`disabled`} (${e.agentId})`}).filter(Boolean);if(y.length>0&&t.log(a(`Heartbeat interval: ${y.join(`, `)}`)),m.length===0){if(t.log(a(`Session store: ${i.sessions.path} (${i.sessions.count} entries)`)),i.sessions.recent.length>0)for(let e of i.sessions.recent)t.log(`- ${e.key} (${e.updatedAt?`${Math.round((Date.now()-e.updatedAt)/6e4)}m ago`:`no activity`})`)}else for(let e of m)if(t.log(a(`Session store (${e.agentId}): ${e.sessions.path} (${e.sessions.count} entries)`)),e.sessions.recent.length>0)for(let n of e.sessions.recent)t.log(`- ${n.key} (${n.updatedAt?`${Math.round((Date.now()-n.updatedAt)/6e4)}m ago`:`no activity`})`)}}export{Ke as a,Ge as c,qe as i,nt as n,je as o,$ as r,We as s,Q as t};
@@ -9,4 +9,4 @@ Please relay this reminder to the user in a helpful and friendly way.`:`A schedu
9
9
 
10
10
  Handle this reminder internally. Do not relay it to the user unless explicitly requested.`:n?`A scheduled cron event was triggered, but no event content was found. Reply HEARTBEAT_OK.`:`A scheduled cron event was triggered, but no event content was found. Handle this internally and reply HEARTBEAT_OK when nothing needs user-facing follow-up.`}function be(e){return e?.deliverToUser??!0?`An async command you ran earlier has completed. The result is shown in the system messages above. Please relay the command output to the user in a helpful way. If the command succeeded, share the relevant output. If it failed, explain what went wrong.`:`An async command you ran earlier has completed. The result is shown in the system messages above. Handle the result internally. Do not relay it to the user unless explicitly requested.`}const xe=H.toLowerCase();function Se(e){let t=e.trim();if(!t)return!1;let n=t.toLowerCase();if(!n.startsWith(xe))return!1;let r=n.slice(xe.length);return r.length===0?!0:!/[a-z0-9_]/.test(r[0])}function Ce(e){let t=e.trim().toLowerCase();return t?Se(t)||t.includes(`heartbeat poll`)||t.includes(`heartbeat wake`):!1}function we(e){return e.toLowerCase().includes(`exec finished`)}function Te(e){return e.trim()?!Ce(e)&&!we(e):!1}const q=i(`gateway/heartbeat`),Ee=`none`;function De(e){return(e.agents?.list??[]).some(e=>!!e?.heartbeat)}function Oe(e,t){let n=N(t??j(e)),r=e.agents?.list??[];return De(e)?r.some(e=>!!e?.heartbeat&&N(e?.id)===n):n===j(e)}function J(e,t){let n=e.agents?.defaults?.heartbeat;if(!t)return n;let r=M(e,t)?.heartbeat;return!n&&!r?r:{...n,...r}}function ke(e,t){let n=e.agents?.defaults?.heartbeat,r=t?M(e,t)?.heartbeat:void 0;if(!Oe(e,t))return{enabled:!1,every:`disabled`,everyMs:null,prompt:E(n?.prompt),target:n?.target??Ee,model:n?.model,ackMaxChars:Math.max(0,n?.ackMaxChars??300)};let i=n||r?{...n,...r}:void 0;return{enabled:!0,every:i?.every??n?.every??r?.every??`30m`,everyMs:Y(e,void 0,i),prompt:E(i?.prompt??n?.prompt??r?.prompt),target:i?.target??n?.target??r?.target??Ee,model:i?.model??n?.model??r?.model,ackMaxChars:Math.max(0,i?.ackMaxChars??n?.ackMaxChars??r?.ackMaxChars??300)}}function Ae(e){let t=e.agents?.list??[];if(De(e))return t.filter(e=>e?.heartbeat).map(t=>{let n=N(t.id);return{agentId:n,heartbeat:J(e,n)}}).filter(e=>e.agentId);let n=j(e);return[{agentId:n,heartbeat:J(e,n)}]}function Y(e,t,n){let r=t??n?.every??e.agents?.defaults?.heartbeat?.every??`30m`;if(!r)return null;let i=String(r).trim();if(!i)return null;let a;try{a=m(i,{defaultUnit:`m`})}catch{return null}return a<=0?null:a}function je(e,t){return E(t?.prompt??e.agents?.defaults?.heartbeat?.prompt)}function Me(e,t){return Math.max(0,t?.ackMaxChars??e.agents?.defaults?.heartbeat?.ackMaxChars??300)}function Ne(e,t,n,r){let i=e.session,a=i?.scope??`per-sender`,o=N(t??j(e)),c=a===`global`?`global`:d({cfg:e,agentId:o}),l=a===`global`?j(e):o,f=V(i?.store,{agentId:l}),p=s(f),m=p[c];if(a===`global`)return{sessionKey:c,storePath:f,store:p,entry:m};let h=r?.trim();if(h){let t=u({cfg:e,agentId:o,sessionKey:P({agentId:o,requestKey:h,mainKey:e.session?.mainKey})});if(t!==`global`&&F(t)===N(o))return{sessionKey:t,storePath:f,store:p,entry:p[t]}}let g=n?.session?.trim()??``;if(!g)return{sessionKey:c,storePath:f,store:p,entry:m};let _=g.toLowerCase();if(_===`main`||_===`global`)return{sessionKey:c,storePath:f,store:p,entry:m};let v=u({cfg:e,agentId:o,sessionKey:P({agentId:o,requestKey:g,mainKey:e.session?.mainKey})});return v!==`global`&&F(v)===N(o)?{sessionKey:v,storePath:f,store:p,entry:p[v]}:{sessionKey:c,storePath:f,store:p,entry:m}}function Pe(e){return(Array.isArray(e)?e:e?[e]:[]).filter(e=>(typeof e.text==`string`?e.text:``).trimStart().startsWith(`Reasoning:`))}async function X(e){let{storePath:t,sessionKey:n,updatedAt:r}=e;if(typeof r!=`number`)return;let i=s(t)[n];if(!i)return;let a=Math.max(i.updatedAt??0,r);i.updatedAt!==a&&await c(t,e=>{let t=e[n]??i;if(!t)return;let a=Math.max(t.updatedAt??0,r);t.updatedAt!==a&&(e[n]={...t,updatedAt:a})})}async function Z(e){let{transcriptPath:t,preHeartbeatSize:n}=e;if(!(!t||typeof n!=`number`||n<0))try{(await K.stat(t)).size>n&&await K.truncate(t,n)}catch{}}async function Fe(e){let{storePath:t,sessionKey:n,agentId:r}=e;try{let e=s(t)[n];if(!e?.sessionId)return{};let i=se(e.sessionId,e,{agentId:r,sessionsDir:G.dirname(t)});return{transcriptPath:i,preHeartbeatSize:(await K.stat(i)).size}}catch{return{}}}function Ie(e,t){let n=t?.trim();if(!n)return e;let r=RegExp(`^${o(n)}(?=$|\\s|[\\p{P}\\p{S}])\\s*`,`iu`);return e.replace(r,``)}function Le(e,t,n){let r=O(Ie(typeof e.text==`string`?e.text:``,t),{mode:`heartbeat`,maxAckChars:n}),i=!!(e.mediaUrl||(e.mediaUrls?.length??0)>0);if(r.shouldSkip&&!i)return{shouldSkip:!0,text:``,hasMedia:i};let a=r.text;return t&&a&&!a.startsWith(t)&&(a=`${t} ${a}`),{shouldSkip:!1,text:a,hasMedia:i}}function Re(e){let t=x(e);return{isExecEventReason:t===`exec-event`,isCronEventReason:t===`cron`,isWakeReason:t===`wake`||t===`hook`}}async function ze(e){let t=Re(e.reason),n=Ne(e.cfg,e.agentId,e.heartbeat,e.forcedSessionKey),r=A(n.sessionKey),i=r.some(e=>e.contextKey?.startsWith(`cron:`)),a=t.isExecEventReason||t.isCronEventReason||i,o=t.isExecEventReason||t.isCronEventReason||t.isWakeReason||i,s={...t,session:n,pendingEventEntries:r,hasTaggedCronEvents:i,shouldInspectPendingEvents:a};if(o)return s;let c=ne(e.cfg,e.agentId),l=G.join(c,te);try{if(S(await K.readFile(l,`utf-8`)))return{...s,skipReason:`empty-heartbeat-file`}}catch(e){if(oe(e,`ENOENT`))return s}return s}function Be(e,t){if(!/heartbeat\.md/i.test(e))return e;let n=`When reading HEARTBEAT.md, use workspace file ${G.join(t,te).replace(/\\/g,`/`)} (exact case). Do not read docs/heartbeat.md.`;return e.includes(n)?e:`${e}\n${n}`}function Ve(e){let t=e.preflight.pendingEventEntries,n=e.preflight.shouldInspectPendingEvents?t.map(e=>e.text):[],r=t.filter(t=>(e.preflight.isCronEventReason||t.contextKey?.startsWith(`cron:`))&&Te(t.text)).map(e=>e.text),i=n.some(we),a=r.length>0;return{prompt:Be(i?be({deliverToUser:e.canRelayToUser}):a?ye(r,{deliverToUser:e.canRelayToUser}):je(e.cfg,e.heartbeat),e.workspaceDir),hasExecCompletion:i,hasCronEvents:a}}async function He(e){let t=e.cfg??p(),n=typeof e.agentId==`string`?e.agentId.trim():``,r=n.length>0?void 0:re(e.sessionKey)?.agentId,i=N(n||r||j(t)),a=e.heartbeat??J(t,i);if(!h()||!Oe(t,i)||!Y(t,void 0,a))return{status:`skipped`,reason:`disabled`};let o=e.deps?.nowMs?.()??Date.now();if(!ve(t,a,o))return{status:`skipped`,reason:`quiet-hours`};if((e.deps?.getQueueSize??v)(w.Main)>0)return{status:`skipped`,reason:`requests-in-flight`};let c=await ze({cfg:t,agentId:i,heartbeat:a,forcedSessionKey:e.sessionKey,reason:e.reason});if(c.skipReason)return W({status:`skipped`,reason:c.skipReason,durationMs:Date.now()-o}),{status:`skipped`,reason:c.skipReason};let{entry:u,sessionKey:d,storePath:f}=c.session,m=u?.updatedAt,g=y({cfg:t,entry:u,heartbeat:a}),_=a?.accountId?.trim();g.reason===`unknown-account`?q.warn(`heartbeat: unknown accountId`,{accountId:g.accountId??_??null,target:a?.target??`none`}):_&&q.info(`heartbeat: using explicit accountId`,{accountId:g.accountId??_,target:a?.target??`none`,channel:g.channel});let x=g.channel===`none`?{showOk:!1,showAlerts:!0,useIndicator:!0}:pe({cfg:t,channel:g.channel,accountId:g.accountId}),{sender:S}=b({cfg:t,entry:u,delivery:g}),E=T(t,i,{channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId}).responsePrefix,{prompt:D,hasExecCompletion:O,hasCronEvents:A}=Ve({cfg:t,heartbeat:a,preflight:c,canRelayToUser:!!(g.channel!==`none`&&g.to&&x.showAlerts),workspaceDir:ne(t,i)}),te={Body:k(D,t,o),From:S,To:S,OriginatingChannel:g.channel===`none`?void 0:g.channel,OriginatingTo:g.to,AccountId:g.accountId,MessageThreadId:g.threadId,Provider:O?`exec-event`:A?`cron-event`:`heartbeat`,SessionKey:d};if(!x.showAlerts&&!x.showOk&&!x.useIndicator)return W({status:`skipped`,reason:`alerts-disabled`,durationMs:Date.now()-o,channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId}),{status:`skipped`,reason:`alerts-disabled`};let M=E?`${E} ${H}`:H,P=C({cfg:t,agentId:i,sessionKey:d}),F=!!(x.showOk&&g.channel!==`none`&&g.to),I=async()=>{if(!F||g.channel===`none`||!g.to)return!1;let n=ae(g.channel);return n?.heartbeat?.checkReady&&!(await n.heartbeat.checkReady({cfg:t,accountId:g.accountId,deps:e.deps})).ok?!1:(await ce({cfg:t,channel:g.channel,to:g.to,accountId:g.accountId,threadId:g.threadId,payloads:[{text:M}],session:P,deps:e.deps}),!0)};try{let n=await Fe({storePath:f,sessionKey:d,agentId:i}),r=a?.model?.trim()||void 0,c=a?.suppressToolErrorWarnings===!0,p=a?.lightContext===!0?`lightweight`:void 0,h=await ee(te,r?{isHeartbeat:!0,heartbeatModelOverride:r,suppressToolErrorWarnings:c,bootstrapContextMode:p}:{isHeartbeat:!0,suppressToolErrorWarnings:c,bootstrapContextMode:p},t),_=fe(h),v=a?.includeReasoning===!0?Pe(h).filter(e=>e!==_):[];if(!_||!_.text&&!_.mediaUrl&&!_.mediaUrls?.length){await X({storePath:f,sessionKey:d,updatedAt:m}),await Z(n);let t=await I();return W({status:`ok-empty`,reason:e.reason,durationMs:Date.now()-o,channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId,silent:!t,indicatorType:x.useIndicator?U(`ok-empty`):void 0}),{status:`ran`,durationMs:Date.now()-o}}let y=Le(_,E,Me(t,a)),b=O&&!y.text.trim()&&_.text?.trim()?_.text.trim():null;b&&(y.text=b,y.shouldSkip=!1);let S=y.shouldSkip&&!y.hasMedia&&!O;if(S&&v.length===0){await X({storePath:f,sessionKey:d,updatedAt:m}),await Z(n);let t=await I();return W({status:`ok-token`,reason:e.reason,durationMs:Date.now()-o,channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId,silent:!t,indicatorType:x.useIndicator?U(`ok-token`):void 0}),{status:`ran`,durationMs:Date.now()-o}}let C=_.mediaUrls??(_.mediaUrl?[_.mediaUrl]:[]),w=typeof u?.lastHeartbeatText==`string`?u.lastHeartbeatText:``,T=typeof u?.lastHeartbeatSentAt==`number`?u.lastHeartbeatSentAt:void 0;if(!S&&!C.length&&w.trim()&&y.text.trim()===w.trim()&&typeof T==`number`&&o-T<1440*60*1e3)return await X({storePath:f,sessionKey:d,updatedAt:m}),await Z(n),W({status:`skipped`,reason:`duplicate`,preview:y.text.slice(0,200),durationMs:Date.now()-o,hasMedia:!1,channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId}),{status:`ran`,durationMs:Date.now()-o};let D=S?v.map(e=>e.text).filter(e=>!!e?.trim()).join(`
11
11
  `):y.text;if(g.channel===`none`||!g.to)return W({status:`skipped`,reason:g.reason??`no-target`,preview:D?.slice(0,200),durationMs:Date.now()-o,hasMedia:C.length>0,accountId:g.accountId}),{status:`ran`,durationMs:Date.now()-o};if(!x.showAlerts)return await X({storePath:f,sessionKey:d,updatedAt:m}),W({status:`skipped`,reason:`alerts-disabled`,preview:D?.slice(0,200),durationMs:Date.now()-o,channel:g.channel,hasMedia:C.length>0,accountId:g.accountId,indicatorType:x.useIndicator?U(`sent`):void 0}),{status:`ran`,durationMs:Date.now()-o};let k=g.accountId,A=ae(g.channel);if(A?.heartbeat?.checkReady){let n=await A.heartbeat.checkReady({cfg:t,accountId:k,deps:e.deps});if(!n.ok)return W({status:`skipped`,reason:n.reason,preview:D?.slice(0,200),durationMs:Date.now()-o,hasMedia:C.length>0,channel:g.channel,accountId:g.accountId}),q.info(`heartbeat: channel not ready`,{channel:g.channel,reason:n.reason}),{status:`skipped`,reason:n.reason}}if(await ce({cfg:t,channel:g.channel,to:g.to,accountId:k,session:P,threadId:g.threadId,payloads:[...v,...S?[]:[{text:y.text,mediaUrls:C}]],deps:e.deps}),!S&&y.text.trim()){let e=s(f),t=e[d];t&&(e[d]={...t,lastHeartbeatText:y.text,lastHeartbeatSentAt:o},await l(f,e))}return W({status:`sent`,to:g.to,preview:D?.slice(0,200),durationMs:Date.now()-o,hasMedia:C.length>0,channel:g.channel,accountId:g.accountId,indicatorType:x.useIndicator?U(`sent`):void 0}),{status:`ran`,durationMs:Date.now()-o}}catch(e){let t=B(e);return W({status:`failed`,reason:t,durationMs:Date.now()-o,channel:g.channel===`none`?void 0:g.channel,accountId:g.accountId,indicatorType:x.useIndicator?U(`failed`):void 0}),q.error(`heartbeat failed: ${t}`,{error:t}),{status:`failed`,reason:t}}}function Ue(e){let t=e.runtime??r,n=e.runOnce??He,i={cfg:e.cfg??p(),runtime:t,agents:new Map,timer:null,stopped:!1},a=!1,o=(e,t,n)=>typeof n?.lastRunMs==`number`?n.lastRunMs+t:n&&n.intervalMs===t&&n.nextDueMs>e?n.nextDueMs:e+t,s=(e,t)=>{e.lastRunMs=t,e.nextDueMs=t+e.intervalMs},c=()=>{if(i.stopped||(i.timer&&=(clearTimeout(i.timer),null),i.agents.size===0))return;let e=Date.now(),t=1/0;for(let e of i.agents.values())e.nextDueMs<t&&(t=e.nextDueMs);if(!Number.isFinite(t))return;let n=Math.max(0,t-e);i.timer=setTimeout(()=>{i.timer=null,g({reason:`interval`,coalesceMs:0})},n),i.timer.unref?.()},l=e=>{if(i.stopped)return;let t=Date.now(),n=i.agents,r=n.size>0,s=new Map,l=[];for(let r of Ae(e)){let i=Y(e,void 0,r.heartbeat);if(!i)continue;l.push(i);let a=n.get(r.agentId),c=o(t,i,a);s.set(r.agentId,{agentId:r.agentId,heartbeat:r.heartbeat,intervalMs:i,lastRunMs:a?.lastRunMs,nextDueMs:c})}i.cfg=e,i.agents=s;let u=s.size>0;a?r!==u&&(u?q.info(`heartbeat: started`,{intervalMs:Math.min(...l)}):q.info(`heartbeat: disabled`,{enabled:!1})):(u?q.info(`heartbeat: started`,{intervalMs:Math.min(...l)}):q.info(`heartbeat: disabled`,{enabled:!1}),a=!0),c()},u=async e=>{if(i.stopped||!h()||i.agents.size===0)return{status:`skipped`,reason:`disabled`};let t=e?.reason,r=e?.agentId?N(e.agentId):void 0,a=e?.sessionKey?.trim()||void 0,o=t===`interval`,l=Date.now(),u=l,d=!1;if(a||r){let e=r??F(a),o=i.agents.get(e);if(!o)return c(),{status:`skipped`,reason:`disabled`};try{let e=await n({cfg:i.cfg,agentId:o.agentId,heartbeat:o.heartbeat,reason:t,sessionKey:a,deps:{runtime:i.runtime}});return(e.status!==`skipped`||e.reason!==`disabled`)&&s(o,u),c(),e.status===`ran`?{status:`ran`,durationMs:Date.now()-l}:e}catch(e){let t=B(e);return q.error(`heartbeat runner: targeted runOnce threw unexpectedly: ${t}`,{error:t}),s(o,u),c(),{status:`failed`,reason:t}}}for(let e of i.agents.values()){if(o&&u<e.nextDueMs)continue;let r;try{r=await n({cfg:i.cfg,agentId:e.agentId,heartbeat:e.heartbeat,reason:t,deps:{runtime:i.runtime}})}catch(t){let n=B(t);q.error(`heartbeat runner: runOnce threw unexpectedly: ${n}`,{error:n}),s(e,u);continue}if(r.status===`skipped`&&r.reason===`requests-in-flight`)return r;(r.status!==`skipped`||r.reason!==`disabled`)&&s(e,u),r.status===`ran`&&(d=!0)}return c(),d?{status:`ran`,durationMs:Date.now()-l}:{status:`skipped`,reason:o?`not-due`:`disabled`}},d=D(async e=>u({reason:e.reason,agentId:e.agentId,sessionKey:e.sessionKey}));l(i.cfg);let f=()=>{i.stopped||(i.stopped=!0,d(),i.timer&&clearTimeout(i.timer),i.timer=null)};return e.abortSignal?.addEventListener(`abort`,f,{once:!0}),{stop:f,updateConfig:l}}function We(e,n){if(!n)return e;let r=e.indexOf(`:`);if(r===-1)return e;let i=e.slice(0,r+1),a=e.slice(r+1).trimStart(),o=a.toLowerCase(),s=(e,t)=>`${i} ${t(a.slice(0,e.length))}${a.slice(e.length)}`;return o.startsWith(`failed`)?s(`failed`,t.error):o.startsWith(`ok`)?s(`ok`,t.success):o.startsWith(`linked`)?s(`linked`,t.success):o.startsWith(`configured`)?s(`configured`,t.success):o.startsWith(`not linked`)?s(`not linked`,t.warn):o.startsWith(`not configured`)?s(`not configured`,t.muted):o.startsWith(`unknown`)?s(`unknown`,t.warn):e}var Ge=e({formatHealthChannelLines:()=>$,getHealthSnapshot:()=>tt,healthCommand:()=>nt});const Ke=(...e)=>{I(process.env.OPENCLAW_DEBUG_HEALTH)&&console.warn(`[health:debug]`,...e)},qe=e=>{if(!Number.isFinite(e))return`unknown`;if(e<1e3)return`${Math.max(0,Math.round(e))}ms`;let t=[{label:`w`,size:10080*60*1e3},{label:`d`,size:1440*60*1e3},{label:`h`,size:3600*1e3},{label:`m`,size:60*1e3},{label:`s`,size:1e3}],n=Math.max(0,Math.floor(e)),r=[];for(let e of t){let t=Math.floor(n/e.size);t>0&&(r.push(`${t}${e.label}`),n-=t*e.size)}return r.length===0?`0s`:r.join(` `)},Je=(e,t)=>ke(e,t),Ye=e=>{let t=j(e),n=Array.isArray(e.agents?.list)?e.agents.list:[],r=new Set,i=[];for(let e of n){if(!e||typeof e!=`object`||typeof e.id!=`string`||!e.id.trim())continue;let t=N(e.id);!t||r.has(t)||(r.add(t),i.push({id:t,name:typeof e.name==`string`?e.name:void 0}))}return r.has(t)||i.unshift({id:t}),i.length===0&&i.push({id:t}),{defaultAgentId:t,ordered:i}},Xe=e=>{let t=s(e),n=Object.entries(t).filter(([e])=>e!==`global`&&e!==`unknown`).map(([e,t])=>({key:e,updatedAt:t?.updatedAt??0})).toSorted((e,t)=>t.updatedAt-e.updatedAt),r=n.slice(0,5).map(e=>({key:e.key,updatedAt:e.updatedAt||null,age:e.updatedAt?Date.now()-e.updatedAt:null}));return{path:e,count:n.length,recent:r}},Ze=e=>!e||typeof e!=`object`?!0:e.enabled!==!1,Q=e=>e&&typeof e==`object`?e:null,Qe=(e,t={})=>{let n=Q(e);if(!n)return null;let r=typeof n.ok==`boolean`?n.ok:void 0;if(r===void 0)return null;let i=typeof n.elapsedMs==`number`?n.elapsedMs:null,a=typeof n.status==`number`?n.status:null,o=typeof n.error==`string`?n.error:null,s=Q(n.bot),c=s&&typeof s.username==`string`?s.username:null,l=Q(n.webhook),u=l&&typeof l.url==`string`?l.url:null,d=new Set;c&&d.add(c);for(let e of t.botUsernames??[])e&&d.add(e);if(r){let e=`ok`;return d.size>0&&(e+=` (@${Array.from(d).join(`, @`)})`),i!=null&&(e+=` (${i}ms)`),u&&(e+=` - webhook ${u}`),e}let f=`failed (${a??`unknown`})`;return o&&(f+=` - ${o}`),f},$e=e=>{let t=Q(e.probe);if(!t)return null;let n=typeof t.elapsedMs==`number`?Math.round(t.elapsedMs):null,r=typeof t.ok==`boolean`?t.ok:null;if(n==null&&r!==!0)return null;let i=e.accountId||`default`,a=Q(t.bot),o=a&&typeof a.username==`string`?a.username:null;return`${o?`@${o}`:i}:${i}:${n==null?`ok`:`${n}ms`}`},et=e=>{let t=Q(e.probe);return t?(typeof t.ok==`boolean`?t.ok:null)===!1:!1},$=(e,t={})=>{let n=e.channels??{},r=e.channelOrder?.length>0?e.channelOrder:Object.keys(n),i=t.accountMode??`default`,a=[];for(let o of r){let r=n[o];if(!r)continue;let s=ae(o),c=e.channelLabels?.[o]??s?.meta.label??o,l=r.accounts??{},u=t.accountIdsByChannel?.[o],d=u&&u.length>0?u.map(e=>l[e]).filter(e=>!!e):void 0,f=i===`all`?Object.values(l):d??(r.accounts?Object.values(l):[]),p=d&&d.length>0?d[0]:r,m=f?f.map(e=>{let t=Q(e.probe),n=t?Q(t.bot):null;return n&&typeof n.username==`string`?n.username:null}).filter(e=>!!e):[],h=typeof p.linked==`boolean`?p.linked:null;if(h!==null){if(h){let e=typeof p.authAgeMs==`number`?p.authAgeMs:null,t=e==null?``:` (auth age ${Math.round(e/6e4)}m)`;a.push(`${c}: linked${t}`)}else a.push(`${c}: not linked`);continue}let g=typeof p.configured==`boolean`?p.configured:null;if(g===!1){a.push(`${c}: not configured`);continue}let _=i===`all`?f.map(e=>$e(e)).filter(e=>!!e):[],v=f.find(e=>et(e));if(v){let e=Qe(v.probe,{botUsernames:m});if(e){a.push(`${c}: ${e}`);continue}}if(_.length>0){a.push(`${c}: ok (${_.join(`, `)})`);continue}let y=Qe(p.probe,{botUsernames:m});if(y){a.push(`${c}: ${y}`);continue}if(g===!0){a.push(`${c}: configured`);continue}a.push(`${c}: unknown`)}return a};async function tt(e){let t=e?.timeoutMs,n=p(),{defaultAgentId:r,ordered:i}=Ye(n),a=ie(n),o=new Map,s=i.map(e=>{let t=V(n.session?.store,{agentId:e.id}),i=o.get(t)??Xe(t);return o.set(t,i),{agentId:e.id,name:e.name,isDefault:e.id===r,heartbeat:Je(n,e.id),sessions:i}}),c=s.find(e=>e.isDefault)??s[0],l=c?.heartbeat.everyMs?Math.round(c.heartbeat.everyMs/1e3):0,u=c?.sessions??Xe(V(n.session?.store,{agentId:r})),d=Date.now(),f=t===void 0?1e4:Math.max(50,t),m=e?.probe!==!1,h={},g=R().map(e=>e.id),_={};for(let e of R()){_[e.id]=e.meta.label??e.id;let t=e.config.listAccountIds(n),i=L({plugin:e,cfg:n,accountIds:t}),o=a.get(e.id)?.get(r)??[],s=z({accountIds:t,defaultAccountId:i,boundAccounts:o}),c=Array.from(new Set(Array.from(a.get(e.id)?.values()??[]).flatMap(e=>e))),l=Array.from(new Set([s,i,...t,...c].filter(e=>e&&e.trim())));Ke(`channel`,{id:e.id,accountIds:t,defaultAccountId:i,boundAccounts:o,preferredAccountId:s,accountIdsToProbe:l});let u={};for(let t of l){let r=e.config.resolveAccount(n,t),i=e.config.isEnabled?e.config.isEnabled(r,n):Ze(r),a=e.config.isConfigured?await e.config.isConfigured(r,n):!0,o,s=null;if(i&&a&&m&&e.status?.probeAccount)try{o=await e.status.probeAccount({account:r,timeoutMs:f,cfg:n}),s=Date.now()}catch(e){o={ok:!1,error:B(e)},s=Date.now()}let c=o&&typeof o==`object`?o:null,l=c&&typeof c.bot==`object`?c.bot:null;l?.username&&Ke(`probe.bot`,{channel:e.id,accountId:t,username:l.username});let d={accountId:t,enabled:i,configured:a};o!==void 0&&(d.probe=o),s&&(d.lastProbeAt=s);let p=e.status?.buildChannelSummary?await e.status.buildChannelSummary({account:r,cfg:n,defaultAccountId:t,snapshot:d}):void 0,h=p&&typeof p==`object`?p:{accountId:t,configured:a,probe:o,lastProbeAt:s};h.configured===void 0&&(h.configured=a),h.lastProbeAt===void 0&&s&&(h.lastProbeAt=s),h.accountId=t,u[t]=h}let d=u[s]??u[i]??u[l[0]??s]??u[Object.keys(u)[0]];d&&(h[e.id]={...d,accounts:u})}return{ok:!0,ts:Date.now(),durationMs:Date.now()-d,channels:h,channelOrder:g,channelLabels:_,heartbeatSeconds:l,defaultAgentId:r,agents:s,sessions:{path:u.path,count:u.count,recent:u.recent}}}async function nt(e,t){let r=e.config??await f(),i=await de({label:`Checking gateway health…`,indeterminate:!0,enabled:e.json!==!0},async()=>await le({method:`health`,params:e.verbose?{probe:!0}:void 0,timeoutMs:e.timeoutMs,config:r}));if(e.json)t.log(JSON.stringify(i,null,2));else{let o=I(process.env.OPENCLAW_DEBUG_HEALTH),s=n();if(e.verbose){let e=ue({config:r});t.log(a(`Gateway connection:`));for(let n of e.message.split(`
12
- `))t.log(` ${n}`)}let c=Ye(r),l=i.defaultAgentId??c.defaultAgentId,u=Array.isArray(i.agents)?i.agents:[],d=c.ordered.map(e=>{let t=V(r.session?.store,{agentId:e.id});return{agentId:e.id,name:e.name,isDefault:e.id===c.defaultAgentId,heartbeat:Je(r,e.id),sessions:Xe(t)}}),f=u.length>0?u:d,p=e.verbose?f:f.filter(e=>e.agentId===l),m=ie(r);if(o){t.log(a(`[debug] local channel accounts`));for(let e of R()){let n=e.config.listAccountIds(r),i=L({plugin:e,cfg:r,accountIds:n});t.log(` ${e.id}: accounts=${n.join(`, `)||`(none)`} default=${i}`);for(let i of n){let n=e.config.resolveAccount(r,i),a=Q(n),o=a&&typeof a.tokenSource==`string`?a.tokenSource:void 0,s=e.config.isConfigured?await e.config.isConfigured(n,r):!0;t.log(` - ${i}: configured=${s}${o?` tokenSource=${o}`:``}`)}}t.log(a(`[debug] bindings map`));for(let[e,n]of m.entries()){let r=Array.from(n.entries()).map(([e,t])=>`${e}=[${t.join(`, `)}]`);t.log(` ${e}: ${r.join(` `)}`)}t.log(a(`[debug] gateway channel probes`));for(let[e,n]of Object.entries(i.channels??{})){let r=n.accounts??{},i=Object.entries(r).map(([e,t])=>{let n=Q(t.probe),r=n?Q(n.bot):null;return`${e}=${(r&&typeof r.username==`string`?r.username:null)??`(no bot)`}`});t.log(` ${e}: ${i.join(`, `)||`(none)`}`)}}let h=Object.fromEntries(R().map(e=>{let t=e.config.listAccountIds(r),n=z({accountIds:t,defaultAccountId:L({plugin:e,cfg:r,accountIds:t}),boundAccounts:m.get(e.id)?.get(l)??[]});return[e.id,[n]]})),g=(()=>{let e=p.length>0?p:f,t={};for(let[n,r]of m.entries()){let i=[];for(let t of e){let e=r.get(t.agentId)??[];for(let t of e)i.includes(t)||i.push(t)}i.length>0&&(t[n]=i)}for(let[e,n]of Object.entries(h))(!t[e]||t[e].length===0)&&(t[e]=n);return t})(),_=Object.keys(g).length>0?$(i,{accountMode:e.verbose?`all`:`default`,accountIdsByChannel:g}):$(i,{accountMode:e.verbose?`all`:`default`});for(let e of _)t.log(We(e,s));for(let e of R()){let n=i.channels?.[e.id];if(!n||n.linked!==!0||!e.status?.logSelfId)continue;let a=m.get(e.id)?.get(l)??[],o=e.config.listAccountIds(r),s=z({accountIds:o,defaultAccountId:L({plugin:e,cfg:r,accountIds:o}),boundAccounts:a}),c=e.config.resolveAccount(r,s);e.status.logSelfId({account:c,cfg:r,runtime:t,includeChannelPrefix:!0})}if(f.length>0){let e=f.map(e=>e.isDefault?`${e.agentId} (default)`:e.agentId);t.log(a(`Agents: ${e.join(`, `)}`))}let v=p.map(e=>{let t=e.heartbeat?.everyMs;return`${t?qe(t):`disabled`} (${e.agentId})`}).filter(Boolean);if(v.length>0&&t.log(a(`Heartbeat interval: ${v.join(`, `)}`)),p.length===0){if(t.log(a(`Session store: ${i.sessions.path} (${i.sessions.count} entries)`)),i.sessions.recent.length>0)for(let e of i.sessions.recent)t.log(`- ${e.key} (${e.updatedAt?`${Math.round((Date.now()-e.updatedAt)/6e4)}m ago`:`no activity`})`)}else for(let e of p)if(t.log(a(`Session store (${e.agentId}): ${e.sessions.path} (${e.sessions.count} entries)`)),e.sessions.recent.length>0)for(let n of e.sessions.recent)t.log(`- ${n.key} (${n.updatedAt?`${Math.round((Date.now()-n.updatedAt)/6e4)}m ago`:`no activity`})`)}}export{We as a,Ue as c,Ge as i,tt as n,ke as o,nt as r,He as s,$ as t};
12
+ `))t.log(` ${n}`)}let c=Ye(r),l=i.defaultAgentId??c.defaultAgentId,u=Array.isArray(i.agents)?i.agents:[],d=c.ordered.map(e=>{let t=V(r.session?.store,{agentId:e.id});return{agentId:e.id,name:e.name,isDefault:e.id===c.defaultAgentId,heartbeat:Je(r,e.id),sessions:Xe(t)}}),f=u.length>0?u:d,p=e.verbose?f:f.filter(e=>e.agentId===l),m=ie(r);if(o){t.log(a(`[debug] local channel accounts`));for(let e of R()){let n=e.config.listAccountIds(r),i=L({plugin:e,cfg:r,accountIds:n});t.log(` ${e.id}: accounts=${n.join(`, `)||`(none)`} default=${i}`);for(let i of n){let n=e.config.resolveAccount(r,i),a=Q(n),o=a&&typeof a.tokenSource==`string`?a.tokenSource:void 0,s=e.config.isConfigured?await e.config.isConfigured(n,r):!0;t.log(` - ${i}: configured=${s}${o?` tokenSource=${o}`:``}`)}}t.log(a(`[debug] bindings map`));for(let[e,n]of m.entries()){let r=Array.from(n.entries()).map(([e,t])=>`${e}=[${t.join(`, `)}]`);t.log(` ${e}: ${r.join(` `)}`)}t.log(a(`[debug] gateway channel probes`));for(let[e,n]of Object.entries(i.channels??{})){let r=n.accounts??{},i=Object.entries(r).map(([e,t])=>{let n=Q(t.probe),r=n?Q(n.bot):null;return`${e}=${(r&&typeof r.username==`string`?r.username:null)??`(no bot)`}`});t.log(` ${e}: ${i.join(`, `)||`(none)`}`)}}let h=Object.fromEntries(R().map(e=>{let t=e.config.listAccountIds(r),n=z({accountIds:t,defaultAccountId:L({plugin:e,cfg:r,accountIds:t}),boundAccounts:m.get(e.id)?.get(l)??[]});return[e.id,[n]]})),g=(()=>{let e=p.length>0?p:f,t={};for(let[n,r]of m.entries()){let i=[];for(let t of e){let e=r.get(t.agentId)??[];for(let t of e)i.includes(t)||i.push(t)}i.length>0&&(t[n]=i)}for(let[e,n]of Object.entries(h))(!t[e]||t[e].length===0)&&(t[e]=n);return t})(),_=Object.keys(g).length>0?$(i,{accountMode:e.verbose?`all`:`default`,accountIdsByChannel:g}):$(i,{accountMode:e.verbose?`all`:`default`});for(let e of _)t.log(We(e,s));for(let e of R()){let n=i.channels?.[e.id];if(!n||n.linked!==!0||!e.status?.logSelfId)continue;let a=m.get(e.id)?.get(l)??[],o=e.config.listAccountIds(r),s=z({accountIds:o,defaultAccountId:L({plugin:e,cfg:r,accountIds:o}),boundAccounts:a}),c=e.config.resolveAccount(r,s);e.status.logSelfId({account:c,cfg:r,runtime:t,includeChannelPrefix:!0})}if(f.length>0){let e=f.map(e=>e.isDefault?`${e.agentId} (default)`:e.agentId);t.log(a(`Agents: ${e.join(`, `)}`))}let v=p.map(e=>{let t=e.heartbeat?.everyMs;return`${t?qe(t):`disabled`} (${e.agentId})`}).filter(Boolean);if(v.length>0&&t.log(a(`Heartbeat interval: ${v.join(`, `)}`)),p.length===0){if(t.log(a(`Session store: ${i.sessions.path} (${i.sessions.count} entries)`)),i.sessions.recent.length>0)for(let e of i.sessions.recent)t.log(`- ${e.key} (${e.updatedAt?`${Math.round((Date.now()-e.updatedAt)/6e4)}m ago`:`no activity`})`)}else for(let e of p)if(t.log(a(`Session store (${e.agentId}): ${e.sessions.path} (${e.sessions.count} entries)`)),e.sessions.recent.length>0)for(let n of e.sessions.recent)t.log(`- ${n.key} (${n.updatedAt?`${Math.round((Date.now()-n.updatedAt)/6e4)}m ago`:`no activity`})`)}}export{We as a,Ue as c,Ge as i,tt as n,ke as o,nt as r,He as s,$ as t};
@@ -1,3 +1,3 @@
1
1
  import{A as e,O as t,k as n}from"./subsystem-BLbY429l.js";const r=(n,r)=>{let i=n.indexOf(`: `);if(i<=0)return t(r,e.muted,n);let a=n.slice(0,i),o=n.slice(i+2),s=a===`Gateway target`||a===`Config`?e.command:a===`Source`?e.muted:e.info;return`${t(r,e.muted,`${a}:`)} ${t(r,s,o)}`};function i(i,a={}){let o=a.rich??n(),s=String(i),c=i instanceof Error?i.message:s;if(!o)return`Health check failed: ${s}`;let l=c.split(`
2
2
  `).map(e=>e.trimEnd()).filter(Boolean),u=l.findIndex(e=>e.startsWith(`Gateway target: `)),d=(u>=0?l.slice(0,u):l).map(e=>e.trim()).filter(Boolean),f=u>=0?l.slice(u):[],p=d.length>0?d.join(` `):c,m=[`${t(o,e.error.bold,`Health check failed`)}: ${p}`];for(let e of f)m.push(` ${r(e,o)}`);return m.join(`
3
- `)}export{i as t};
3
+ `)}export{i as t};
@@ -1,3 +1,3 @@
1
1
  import{A as e,O as t,k as n}from"./subsystem-C5XF2Fy5.js";const r=(n,r)=>{let i=n.indexOf(`: `);if(i<=0)return t(r,e.muted,n);let a=n.slice(0,i),o=n.slice(i+2),s=a===`Gateway target`||a===`Config`?e.command:a===`Source`?e.muted:e.info;return`${t(r,e.muted,`${a}:`)} ${t(r,s,o)}`};function i(i,a={}){let o=a.rich??n(),s=String(i),c=i instanceof Error?i.message:s;if(!o)return`Health check failed: ${s}`;let l=c.split(`
2
2
  `).map(e=>e.trimEnd()).filter(Boolean),u=l.findIndex(e=>e.startsWith(`Gateway target: `)),d=(u>=0?l.slice(0,u):l).map(e=>e.trim()).filter(Boolean),f=u>=0?l.slice(u):[],p=d.length>0?d.join(` `):c,m=[`${t(o,e.error.bold,`Health check failed`)}: ${p}`];for(let e of f)m.push(` ${r(e,o)}`);return m.join(`
3
- `)}export{i as t};
3
+ `)}export{i as t};
@@ -1 +1 @@
1
- function e(e){if(e){if(!Array.isArray(e))return e;for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&(n.text||n.mediaUrl||n.mediaUrls&&n.mediaUrls.length>0))return n}}}function t(e){switch(e){case`ok-empty`:case`ok-token`:return`ok`;case`sent`:return`alert`;case`failed`:return`error`;case`skipped`:return}}let n=null;const r=new Set;function i(e){let t={ts:Date.now(),...e};n=t;for(let e of r)try{e(t)}catch{}}function a(e){return r.add(e),()=>r.delete(e)}function o(){return n}const s={showOk:!1,showAlerts:!0,useIndicator:!0};function c(e){let{cfg:t,channel:n,accountId:r}=e;if(n===`webchat`){let e=t.channels?.defaults?.heartbeat;return{showOk:e?.showOk??s.showOk,showAlerts:e?.showAlerts??s.showAlerts,useIndicator:e?.useIndicator??s.useIndicator}}let i=t.channels?.defaults?.heartbeat,a=t.channels?.[n],o=a?.heartbeat,c=(r?a?.accounts?.[r]:void 0)?.heartbeat;return{showOk:c?.showOk??o?.showOk??i?.showOk??s.showOk,showAlerts:c?.showAlerts??o?.showAlerts??i?.showAlerts??s.showAlerts,useIndicator:c?.useIndicator??o?.useIndicator??i?.useIndicator??s.useIndicator}}export{t as a,a as i,i as n,e as o,o as r,c as t};
1
+ function e(e){if(e){if(!Array.isArray(e))return e;for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&(n.text||n.mediaUrl||n.mediaUrls&&n.mediaUrls.length>0))return n}}}function t(e){switch(e){case`ok-empty`:case`ok-token`:return`ok`;case`sent`:return`alert`;case`failed`:return`error`;case`skipped`:return}}let n=null;const r=new Set;function i(e){let t={ts:Date.now(),...e};n=t;for(let e of r)try{e(t)}catch{}}function a(e){return r.add(e),()=>r.delete(e)}function o(){return n}const s={showOk:!1,showAlerts:!0,useIndicator:!0};function c(e){let{cfg:t,channel:n,accountId:r}=e;if(n===`webchat`){let e=t.channels?.defaults?.heartbeat;return{showOk:e?.showOk??s.showOk,showAlerts:e?.showAlerts??s.showAlerts,useIndicator:e?.useIndicator??s.useIndicator}}let i=t.channels?.defaults?.heartbeat,a=t.channels?.[n],o=a?.heartbeat,c=(r?a?.accounts?.[r]:void 0)?.heartbeat;return{showOk:c?.showOk??o?.showOk??i?.showOk??s.showOk,showAlerts:c?.showAlerts??o?.showAlerts??i?.showAlerts??s.showAlerts,useIndicator:c?.useIndicator??o?.useIndicator??i?.useIndicator??s.useIndicator}}export{t as a,a as i,i as n,e as o,o as r,c as t};
@@ -1 +1 @@
1
- function e(e){if(e){if(!Array.isArray(e))return e;for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&(n.text||n.mediaUrl||n.mediaUrls&&n.mediaUrls.length>0))return n}}}function t(e){switch(e){case`ok-empty`:case`ok-token`:return`ok`;case`sent`:return`alert`;case`failed`:return`error`;case`skipped`:return}}let n=null;const r=new Set;function i(e){let t={ts:Date.now(),...e};n=t;for(let e of r)try{e(t)}catch{}}function a(e){return r.add(e),()=>r.delete(e)}function o(){return n}const s={showOk:!1,showAlerts:!0,useIndicator:!0};function c(e){let{cfg:t,channel:n,accountId:r}=e;if(n===`webchat`){let e=t.channels?.defaults?.heartbeat;return{showOk:e?.showOk??s.showOk,showAlerts:e?.showAlerts??s.showAlerts,useIndicator:e?.useIndicator??s.useIndicator}}let i=t.channels?.defaults?.heartbeat,a=t.channels?.[n],o=a?.heartbeat,c=(r?a?.accounts?.[r]:void 0)?.heartbeat;return{showOk:c?.showOk??o?.showOk??i?.showOk??s.showOk,showAlerts:c?.showAlerts??o?.showAlerts??i?.showAlerts??s.showAlerts,useIndicator:c?.useIndicator??o?.useIndicator??i?.useIndicator??s.useIndicator}}export{t as a,a as i,i as n,e as o,o as r,c as t};
1
+ function e(e){if(e){if(!Array.isArray(e))return e;for(let t=e.length-1;t>=0;--t){let n=e[t];if(n&&(n.text||n.mediaUrl||n.mediaUrls&&n.mediaUrls.length>0))return n}}}function t(e){switch(e){case`ok-empty`:case`ok-token`:return`ok`;case`sent`:return`alert`;case`failed`:return`error`;case`skipped`:return}}let n=null;const r=new Set;function i(e){let t={ts:Date.now(),...e};n=t;for(let e of r)try{e(t)}catch{}}function a(e){return r.add(e),()=>r.delete(e)}function o(){return n}const s={showOk:!1,showAlerts:!0,useIndicator:!0};function c(e){let{cfg:t,channel:n,accountId:r}=e;if(n===`webchat`){let e=t.channels?.defaults?.heartbeat;return{showOk:e?.showOk??s.showOk,showAlerts:e?.showAlerts??s.showAlerts,useIndicator:e?.useIndicator??s.useIndicator}}let i=t.channels?.defaults?.heartbeat,a=t.channels?.[n],o=a?.heartbeat,c=(r?a?.accounts?.[r]:void 0)?.heartbeat;return{showOk:c?.showOk??o?.showOk??i?.showOk??s.showOk,showAlerts:c?.showAlerts??o?.showAlerts??i?.showAlerts??s.showAlerts,useIndicator:c?.useIndicator??o?.useIndicator??i?.useIndicator??s.useIndicator}}export{t as a,a as i,i as n,e as o,o as r,c as t};
@@ -1,2 +1,2 @@
1
1
  import{A as e}from"./subsystem-BLbY429l.js";function t(t,n){return` ${e.command(t)}\n ${e.muted(n)}`}function n(t,n){return n?` ${e.command(t)} ${e.muted(`# ${n}`)}`:` ${e.command(t)}`}function r(e,r=!1){let i=r?n:t;return e.map(([e,t])=>i(e,t)).join(`
2
- `)}export{r as t};
2
+ `)}export{r as t};
@@ -1,2 +1,2 @@
1
1
  import{A as e}from"./subsystem-C5XF2Fy5.js";function t(t,n){return` ${e.command(t)}\n ${e.muted(n)}`}function n(t,n){return n?` ${e.command(t)} ${e.muted(`# ${n}`)}`:` ${e.command(t)}`}function r(e,r=!1){let i=r?n:t;return e.map(([e,t])=>i(e,t)).join(`
2
- `)}export{r as t};
2
+ `)}export{r as t};
@@ -1 +1 @@
1
- function e(e,t=[]){return[...t,e]}function t(e){if(!(e==null||e===``)){if(typeof e==`number`){if(!Number.isFinite(e))return;let t=Math.trunc(e);return t>0?t:void 0}if(typeof e==`string`){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}}}function n(e){if(!e)return[];let t=e.args;return Array.isArray(t)?t:[]}export{t as n,n as r,e as t};
1
+ function e(e,t=[]){return[...t,e]}function t(e){if(!(e==null||e===``)){if(typeof e==`number`){if(!Number.isFinite(e))return;let t=Math.trunc(e);return t>0?t:void 0}if(typeof e==`string`){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}}}function n(e){if(!e)return[];let t=e.args;return Array.isArray(t)?t:[]}export{t as n,n as r,e as t};
@@ -1 +1 @@
1
- function e(e,t=[]){return[...t,e]}function t(e){if(!(e==null||e===``)){if(typeof e==`number`){if(!Number.isFinite(e))return;let t=Math.trunc(e);return t>0?t:void 0}if(typeof e==`string`){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}}}function n(e){if(!e)return[];let t=e.args;return Array.isArray(t)?t:[]}export{t as n,n as r,e as t};
1
+ function e(e,t=[]){return[...t,e]}function t(e){if(!(e==null||e===``)){if(typeof e==`number`){if(!Number.isFinite(e))return;let t=Math.trunc(e);return t>0?t:void 0}if(typeof e==`string`){let t=Number.parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}}}function n(e){if(!e)return[];let t=e.args;return Array.isArray(t)?t:[]}export{t as n,n as r,e as t};