@qqbrowser/openclaw-qbot 0.0.127 → 0.0.129

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1470) hide show
  1. package/dist/account-lookup-CW-_CL7y.js +1 -1
  2. package/dist/acp-cli-01SGjPGi.js +1 -1
  3. package/dist/acp-cli-uxN405XG.js +1 -1
  4. package/dist/active-listener-BZ6loNaF.js +1 -1
  5. package/dist/active-listener-D8VOdVx3.js +1 -1
  6. package/dist/active-listener-DB5mhDuO.js +1 -1
  7. package/dist/active-listener-DeKRt_UV.js +1 -1
  8. package/dist/agent-scope-DAWJwFfl.js +1 -1
  9. package/dist/agent-scope-DXZc3eNT.js +1 -1
  10. package/dist/agents-BMh3ZeoB.js +1 -1
  11. package/dist/agents.config-B-0lZSmb.js +1 -1
  12. package/dist/agents.config-BDEN2Eph.js +1 -1
  13. package/dist/allow-from-B6dI7oz8.js +1 -1
  14. package/dist/allow-from-DEeVIPKS.js +1 -1
  15. package/dist/api-BeG0ObSq.js +1 -1
  16. package/dist/api-Dx8x1KTs.js +1 -1
  17. package/dist/api-key-rotation-C_MG2y1D.js +1 -1
  18. package/dist/api-key-rotation-D8WsZ43x.js +1 -1
  19. package/dist/api-key-rotation-DYYvcqSG.js +1 -1
  20. package/dist/api-key-rotation-dNu0GxPN.js +1 -1
  21. package/dist/arg-split-BOqSMBuf.js +1 -1
  22. package/dist/arg-split-DE5RqDHq.js +1 -1
  23. package/dist/audio-preflight--K4-eUVY.js +1 -1
  24. package/dist/audio-preflight-BKIm58PG.js +1 -1
  25. package/dist/audio-preflight-CAfi10dl.js +1 -1
  26. package/dist/audio-preflight-Xm0NL5JA.js +1 -1
  27. package/dist/audio-transcription-runner-BJNP7vB8.js +1 -1
  28. package/dist/audio-transcription-runner-BUsb6cqv.js +1 -1
  29. package/dist/audio-transcription-runner-C_31Yoq0.js +1 -1
  30. package/dist/audio-transcription-runner-CjKLRVPo.js +1 -1
  31. package/dist/audit-7DFnKINd.js +1 -1
  32. package/dist/audit-B6LsW3Ai.js +1 -1
  33. package/dist/audit-membership-runtime-BpRsMj5-.js +1 -1
  34. package/dist/audit-membership-runtime-BsfLZNBj.js +1 -1
  35. package/dist/audit-membership-runtime-DRHirRmx.js +1 -1
  36. package/dist/audit-membership-runtime-g0dEWJTp.js +1 -1
  37. package/dist/audit-membership-runtime-kdyToskD.js +1 -1
  38. package/dist/auth-choice-BNd2SNjJ.js +1 -1
  39. package/dist/auth-choice-C3aUWXx9.js +1 -1
  40. package/dist/auth-choice-DViEjgMg.js +1 -1
  41. package/dist/auth-choice-edozMf7r.js +1 -1
  42. package/dist/auth-choice-options-B3WQyS7I.js +1 -1
  43. package/dist/auth-choice-options-Dw14noox.js +1 -1
  44. package/dist/auth-choice-prompt-uegl56cf.js +1 -1
  45. package/dist/auth-choice-prompt-xYj13czb.js +1 -1
  46. package/dist/auth-choice.apply-helpers-CNLYnRxx.js +1 -1
  47. package/dist/auth-choice.apply-helpers-DCe5nTyP.js +1 -1
  48. package/dist/auth-profiles-BhXA8Jy2.js +1 -1
  49. package/dist/auth-token-C75IOb_K.js +1 -1
  50. package/dist/auth-token-CzgZf-ta.js +1 -1
  51. package/dist/banner-mIDEloRy.js +1 -1
  52. package/dist/bonjour-discovery-CpvzLjyB.js +1 -1
  53. package/dist/bonjour-discovery-wsh3Si1Q.js +1 -1
  54. package/dist/boolean-Ch3DfXPy.js +1 -1
  55. package/dist/boolean-D15s2V33.js +1 -1
  56. package/dist/boolean-DypnRoRK.js +1 -1
  57. package/dist/brew-COcDl8CB.js +1 -1
  58. package/dist/brew-DDPm_HfE.js +1 -1
  59. package/dist/browser-cli-BjzNbvF9.js +1 -1
  60. package/dist/browser-cli-CgHkgtgV.js +1 -1
  61. package/dist/build-info.json +3 -3
  62. package/dist/bundled/boot-md/handler.js +1 -1
  63. package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
  64. package/dist/bundled/command-logger/handler.js +1 -1
  65. package/dist/bundled/session-memory/handler.js +1 -1
  66. package/dist/call-BA3O_Qpl.js +1 -1
  67. package/dist/call-BQT0zCgv.js +1 -1
  68. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  69. package/dist/channel-account-context-BMPAMZEv.js +1 -1
  70. package/dist/channel-account-context-DAcarnqW.js +1 -1
  71. package/dist/channel-activity-B04WbrrK.js +1 -1
  72. package/dist/channel-activity-BPRCQpI6.js +1 -1
  73. package/dist/channel-activity-D2VTmenR.js +1 -1
  74. package/dist/channel-activity-DHY5wAyl.js +1 -1
  75. package/dist/channel-activity-DYpm-0Cz.js +1 -1
  76. package/dist/channel-options-BYmHreMn.js +1 -1
  77. package/dist/channel-options-Cbv7VETu.js +1 -1
  78. package/dist/channel-selection-Ddyykqxv.js +1 -1
  79. package/dist/channel-selection-oRONo9z3.js +1 -1
  80. package/dist/channel-web-CK4RqVCH.js +1 -1
  81. package/dist/channel-web-Xw89Exy3.js +1 -1
  82. package/dist/channels/plugins/actions/discord.js +1 -1
  83. package/dist/channels/plugins/actions/signal.js +1 -1
  84. package/dist/channels/plugins/actions/telegram.js +1 -1
  85. package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -1
  86. package/dist/channels-cli-D2y5Xk5i.js +1 -1
  87. package/dist/channels-cli-cwFjBXcP.js +1 -1
  88. package/dist/channels-status-issues-8eFrGKyf.js +1 -1
  89. package/dist/channels-status-issues-PRgOT90w.js +1 -1
  90. package/dist/chat-envelope-Bznn2SoS.js +1 -1
  91. package/dist/chat-envelope-HVpKusFc.js +1 -1
  92. package/dist/clack-prompter-DBPdGdqp.js +1 -1
  93. package/dist/clack-prompter-Dq0aY6iM.js +1 -1
  94. package/dist/clawbot-cli-BwG1-8A9.js +1 -1
  95. package/dist/clawbot-cli-CaNu5A0G.js +1 -1
  96. package/dist/cleanup-utils-BWm70DoD.js +1 -1
  97. package/dist/cleanup-utils-D-RhEX6F.js +1 -1
  98. package/dist/cli-CQKA38bc.js +1 -1
  99. package/dist/cli-i7P4bYBg.js +1 -1
  100. package/dist/cli-utils-BY7dLMFy.js +1 -1
  101. package/dist/cli-utils-BleB1eys.js +1 -1
  102. package/dist/clipboard-Bk8cviBt.js +1 -1
  103. package/dist/clipboard-CKT_VIkG.js +1 -1
  104. package/dist/cmd-argv-BBT5l8AV.js +1 -1
  105. package/dist/cmd-argv-Bh-KpaZ0.js +1 -1
  106. package/dist/command-format-BbDT1tlm.js +1 -1
  107. package/dist/command-format-CLxIPuLR.js +1 -1
  108. package/dist/command-options-BpOUDl2S.js +1 -1
  109. package/dist/command-options-Bq5nQxz6.js +1 -1
  110. package/dist/command-poll-backoff-BZLHYB2k.js +1 -1
  111. package/dist/command-poll-backoff-Cww_r-24.js +1 -1
  112. package/dist/command-poll-backoff-Df6cOQrX.js +1 -1
  113. package/dist/command-poll-backoff-endAPdwn.js +1 -1
  114. package/dist/command-registry-BYk36N_R.js +1 -1
  115. package/dist/command-secret-targets-BBTiqQKa.js +1 -1
  116. package/dist/command-secret-targets-KM3OecbM.js +1 -1
  117. package/dist/commands-CGpM84iR.js +1 -1
  118. package/dist/commands-Dy7duWlt.js +1 -1
  119. package/dist/commands-registry-B3FI6TSl.js +1 -1
  120. package/dist/commands-registry-CxDVU5s9.js +1 -1
  121. package/dist/commands-registry-Dn2uuNuy.js +1 -1
  122. package/dist/commands-registry-Du79fdAL.js +1 -1
  123. package/dist/compact-CuBCVnVS.js +1 -1
  124. package/dist/completion-cli-CRNTbZlR.js +1 -1
  125. package/dist/completion-cli-DbGDCoiM.js +1 -1
  126. package/dist/config-BqW5S1xL.js +1 -1
  127. package/dist/config-DAQjvwZw.js +1 -1
  128. package/dist/config-cli-D_coAWd9.js +1 -1
  129. package/dist/config-cli-EKXoNzLf.js +1 -1
  130. package/dist/config-guard-U0wlYLUN.js +1 -1
  131. package/dist/config-guard-XayIkveC.js +1 -1
  132. package/dist/config-validation-B0nN9egx.js +1 -1
  133. package/dist/config-validation-CAHnpjrk.js +1 -1
  134. package/dist/configure-DNnQRKy8.js +1 -1
  135. package/dist/configure-NCNskZPe.js +1 -1
  136. package/dist/connection-auth-BcPbGyxw.js +1 -1
  137. package/dist/connection-auth-DZ-3Svr_.js +1 -1
  138. package/dist/context-window-guard-7crlatf9.js +1 -1
  139. package/dist/context-window-guard-CPChk363.js +1 -1
  140. package/dist/control-ui/apple-touch-icon.png +0 -0
  141. package/dist/control-ui/assets/de-DuUYLvt1.js +1 -0
  142. package/dist/control-ui/assets/es-DHtyqUQZ.js +1 -0
  143. package/dist/control-ui/assets/index-CYbiPp9k.js +8383 -0
  144. package/dist/control-ui/assets/index-C_GaJ8wS.css +1 -0
  145. package/dist/control-ui/assets/pt-BR-D2dJb9G8.js +1 -0
  146. package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js +1 -0
  147. package/dist/control-ui/assets/zh-TW-cW5xB87I.js +1 -0
  148. package/dist/control-ui/favicon-32.png +0 -0
  149. package/dist/control-ui/favicon.ico +0 -0
  150. package/dist/control-ui/favicon.svg +22 -0
  151. package/dist/control-ui/index.html +17 -0
  152. package/dist/control-ui-assets-BIa0GGDg.js +1 -1
  153. package/dist/control-ui-assets-CTHGGgaX.js +1 -1
  154. package/dist/cron-cli-Cro66JtU.js +1 -1
  155. package/dist/cron-cli-DIeBukvk.js +1 -1
  156. package/dist/daemon-cli-Cw_fxNgE.js +1 -1
  157. package/dist/daemon-cli-DQsKS3pT.js +1 -1
  158. package/dist/daemon-cli.js +1 -1
  159. package/dist/daemon-install-C_DmJEkV.js +1 -1
  160. package/dist/daemon-install-D1DacLbM.js +1 -1
  161. package/dist/daemon-install-plan.shared-BSDdwWjB.js +1 -1
  162. package/dist/daemon-install-plan.shared-Dx3DBXCG.js +1 -1
  163. package/dist/daemon-runtime-DHiDbRuC.js +1 -1
  164. package/dist/daemon-runtime-VcpeBRJV.js +1 -1
  165. package/dist/dangerous-name-matching-BOmvAibz.js +1 -1
  166. package/dist/dangerous-name-matching-DtllRqBD.js +1 -1
  167. package/dist/dangerous-tools-CFRYQJ6V.js +1 -1
  168. package/dist/dangerous-tools-oYCu5wfC.js +1 -1
  169. package/dist/deliver-2c-EsQ_W.js +1 -1
  170. package/dist/deliver-BudDnEIb.js +1 -1
  171. package/dist/deliver-COKdxPmA.js +1 -1
  172. package/dist/deliver-DHP2vHKB.js +1 -1
  173. package/dist/delivery-queue-CKbauSFq.js +1 -1
  174. package/dist/delivery-queue-nkPJu0fY.js +1 -1
  175. package/dist/device-pairing-4eDo43Kk.js +1 -1
  176. package/dist/device-pairing-B7ZXiXp3.js +1 -1
  177. package/dist/devices-cli-BXUIb_UN.js +1 -1
  178. package/dist/devices-cli-D7PkbnHO.js +1 -1
  179. package/dist/diagnostic-Bzd5vlKH.js +1 -1
  180. package/dist/diagnostic-CFmHdXHP.js +1 -1
  181. package/dist/diagnostic-CW_Jv5UM.js +1 -1
  182. package/dist/diagnostic-Dza7-pMC.js +1 -1
  183. package/dist/diagnostics-BgbeL9KE.js +1 -1
  184. package/dist/diagnostics-Cdctg9K_.js +1 -1
  185. package/dist/directory-cli-CxeuNJcC.js +1 -1
  186. package/dist/directory-cli-DFlYCB5L.js +1 -1
  187. package/dist/dns-cli-BDbHznhi.js +1 -1
  188. package/dist/dns-cli-OuwliJ60.js +1 -1
  189. package/dist/docs-cli-Cdw9Iz9a.js +1 -1
  190. package/dist/docs-cli-ClD2UyX1.js +1 -1
  191. package/dist/doctor-completion-BSOX-LSq.js +1 -1
  192. package/dist/doctor-completion-DXqdpdlo.js +1 -1
  193. package/dist/doctor-config-flow-DHB8N7tT.js +1 -1
  194. package/dist/doctor-config-flow-MjfHBDlw.js +1 -1
  195. package/dist/enable-DVuqWT2a.js +1 -1
  196. package/dist/enable-DWaSH1HY.js +1 -1
  197. package/dist/entry-status-CCwwKO43.js +1 -1
  198. package/dist/entry-status-CoXkbJcX.js +1 -1
  199. package/dist/entry.js +1 -1
  200. package/dist/env-D7wNuBx1.js +1 -1
  201. package/dist/env-overrides-DHtB4kK3.js +1 -1
  202. package/dist/env-overrides-DXJbFrwI.js +1 -1
  203. package/dist/errors-6SQWM9dj.js +1 -1
  204. package/dist/errors-Bunti32V.js +1 -1
  205. package/dist/exec-B3eleY5O.js +1 -1
  206. package/dist/exec-DHqLtFYt.js +1 -1
  207. package/dist/exec-approvals-BXO9Cezj.js +1 -1
  208. package/dist/exec-approvals-BpBNEy6i.js +1 -1
  209. package/dist/exec-approvals-allowlist-BKFaHvA5.js +1 -1
  210. package/dist/exec-approvals-allowlist-DBh9Pm77.js +1 -1
  211. package/dist/exec-approvals-cli-0neCwpk-.js +1 -1
  212. package/dist/exec-approvals-cli-BuHSw09B.js +1 -1
  213. package/dist/exec-safe-bin-runtime-policy-Ck3GO5AB.js +1 -1
  214. package/dist/exec-safe-bin-runtime-policy-D2WexijZ.js +1 -1
  215. package/dist/fetch-BI3CnKE3.js +1 -1
  216. package/dist/fetch-BJT3BrkJ.js +1 -1
  217. package/dist/fetch-Bn0mWg6a.js +1 -1
  218. package/dist/fetch-CY5G3PDq.js +1 -1
  219. package/dist/fetch-Ce-scEU-.js +1 -1
  220. package/dist/fetch-D0rZDHKO.js +1 -1
  221. package/dist/fetch-DHo17YmK.js +1 -1
  222. package/dist/fetch-Dh-apy46.js +1 -1
  223. package/dist/fetch-Dikjvc5M.js +1 -1
  224. package/dist/fetch-DsjPfQlp.js +1 -1
  225. package/dist/fetch-_g8lZ8K8.js +1 -1
  226. package/dist/fetch-guard-BaRbr_V6.js +1 -1
  227. package/dist/fetch-guard-BmNIhXP-.js +1 -1
  228. package/dist/fetch-guard-ChVqc0HF.js +1 -1
  229. package/dist/fetch-guard-Cji70DJW.js +1 -1
  230. package/dist/fetch-hy0JKSsm.js +1 -1
  231. package/dist/fetch-timeout-CdYxWG9w.js +1 -1
  232. package/dist/fetch-timeout-Cj8_oAls.js +1 -1
  233. package/dist/fetch-timeout-DoOI_izT.js +1 -1
  234. package/dist/fetch-timeout-u8g99Ax0.js +1 -1
  235. package/dist/fetch-xT2jRpqs.js +1 -1
  236. package/dist/format-Bn1bwJKX.js +1 -1
  237. package/dist/format-Ce7I7s-k.js +1 -1
  238. package/dist/format-duration-C8AzNqKh.js +1 -1
  239. package/dist/format-duration-D5AMtmHa.js +1 -1
  240. package/dist/format-relative-B9pSIdGe.js +1 -1
  241. package/dist/format-relative-DkMjYy7z.js +1 -1
  242. package/dist/frontmatter-BkZkwkVO.js +1 -1
  243. package/dist/frontmatter-C7mzDNxd.js +1 -1
  244. package/dist/frontmatter-CzpfPBFl.js +1 -1
  245. package/dist/gateway-cli-Bj-BYgGN.js +1 -1
  246. package/dist/gateway-cli-DP65otLl.js +1 -1
  247. package/dist/gateway-install-token-BIqlEgy0.js +1 -1
  248. package/dist/gateway-install-token-CtUJl3A3.js +1 -1
  249. package/dist/gateway-rpc-DJHjmEZz.js +1 -1
  250. package/dist/gateway-rpc-XRAMeV67.js +1 -1
  251. package/dist/github-copilot-token-C79yeDKS.js +1 -1
  252. package/dist/github-copilot-token-DGYAlOmV.js +1 -1
  253. package/dist/github-copilot-token-DePP-lIf.js +1 -1
  254. package/dist/github-copilot-token-wm6mbypz.js +1 -1
  255. package/dist/gmail-setup-utils-CYOH3zzx.js +1 -1
  256. package/dist/gmail-setup-utils-S-MyEGuj.js +1 -1
  257. package/dist/group-access-BHKVOhrj.js +1 -1
  258. package/dist/group-access-D2DOYMfr.js +1 -1
  259. package/dist/health-Bedsiigi.js +1 -1
  260. package/dist/health-Cy_CvKbX.js +1 -1
  261. package/dist/health-format-B1nj3Wfn.js +1 -1
  262. package/dist/health-format-VBr6LEpt.js +1 -1
  263. package/dist/heartbeat-visibility-BQ_esv2m.js +1 -1
  264. package/dist/heartbeat-visibility-q74UdY8O.js +1 -1
  265. package/dist/help-format-B4aEI7V9.js +1 -1
  266. package/dist/help-format-BRbF_INg.js +1 -1
  267. package/dist/helpers-COz1ghcB.js +1 -1
  268. package/dist/helpers-Cp8gcO6u.js +1 -1
  269. package/dist/hooks-cli-DrnH2iDk.js +1 -1
  270. package/dist/hooks-cli-DvfZKyZl.js +1 -1
  271. package/dist/hooks-status-BHt-Xvh4.js +1 -1
  272. package/dist/hooks-status-CRJ4J0ZW.js +1 -1
  273. package/dist/image-BJC11A7e.js +1 -1
  274. package/dist/image-BKPxWO_2.js +1 -1
  275. package/dist/image-Ba-mOMMV.js +1 -1
  276. package/dist/image-D-R3N1it.js +1 -1
  277. package/dist/index.js +1 -1
  278. package/dist/inspect-BKV-I1UE.js +1 -1
  279. package/dist/inspect-z59cgmYc.js +1 -1
  280. package/dist/install-safe-path-C6kc_8NW.js +1 -1
  281. package/dist/install-safe-path-iesxijn2.js +1 -1
  282. package/dist/installs-BNeI_oML.js +1 -1
  283. package/dist/installs-C1xQLuby.js +1 -1
  284. package/dist/ipv4-BXZDlz5C.js +1 -1
  285. package/dist/ipv4-BnPLbv6y.js +1 -1
  286. package/dist/ir-BYCrFFZ9.js +1 -1
  287. package/dist/ir-CH7YvSi9.js +1 -1
  288. package/dist/ir-CSysIkNU.js +1 -1
  289. package/dist/ir-CZdZsdnI.js +1 -1
  290. package/dist/is-main-DG5ueqhF.js +1 -1
  291. package/dist/issue-format-CpTuk_rQ.js +1 -1
  292. package/dist/issue-format-kj7FXHhi.js +1 -1
  293. package/dist/kill-tree-DBJW8_Q-.js +1 -1
  294. package/dist/lifecycle-core-B72WHNHV.js +1 -1
  295. package/dist/lifecycle-core-dhkH_Nux.js +1 -1
  296. package/dist/line/accounts.js +1 -1
  297. package/dist/line/send.js +1 -1
  298. package/dist/line/template-messages.js +1 -1
  299. package/dist/links-CBnmRP9D.js +1 -1
  300. package/dist/links-CySwdMcF.js +1 -1
  301. package/dist/llm-slug-generator.js +1 -1
  302. package/dist/load-options-BsOW74dp.js +1 -1
  303. package/dist/load-options-C7dLuybp.js +1 -1
  304. package/dist/load-options-DV4j6Aqb.js +1 -1
  305. package/dist/load-options-Dwt0CeEg.js +1 -1
  306. package/dist/local-roots-Dxioh0C2.js +1 -1
  307. package/dist/logger-5W0OocJW.js +1 -1
  308. package/dist/logger-Bl8URnrW.js +1 -1
  309. package/dist/logger-DwWqfo66.js +1 -1
  310. package/dist/logger-kQAOe3qp.js +1 -1
  311. package/dist/logging-Dz4Qg6th.js +1 -1
  312. package/dist/logging-KiJmOmw4.js +1 -1
  313. package/dist/login-BMZxDYaU.js +1 -1
  314. package/dist/login-BdzP8F8J.js +1 -1
  315. package/dist/login-BzU0cMck.js +1 -1
  316. package/dist/login-Cb1A6qwM.js +1 -1
  317. package/dist/login-qr-BgsmAwKm.js +1 -1
  318. package/dist/login-qr-Bux8gWTO.js +1 -1
  319. package/dist/login-qr-COr_25Hx.js +1 -1
  320. package/dist/login-qr-CxBPOOAK.js +1 -1
  321. package/dist/login-qr-DnQm7bM4.js +1 -1
  322. package/dist/logs-cli-BM2XCmrH.js +1 -1
  323. package/dist/logs-cli-HKhyxaUs.js +1 -1
  324. package/dist/manager-B6zZuJEB.js +1 -1
  325. package/dist/manager-BwrZfep3.js +1 -1
  326. package/dist/manager-C5SBozw4.js +1 -1
  327. package/dist/manager-CjihRbGa.js +1 -1
  328. package/dist/memory-cli-CnruTL1h.js +1 -1
  329. package/dist/memory-cli-DHvscp7X.js +1 -1
  330. package/dist/model-catalog-BLdaFmIo.js +1 -1
  331. package/dist/model-catalog-vNCcsy4h.js +1 -1
  332. package/dist/model-param-b-B0r2cPDw.js +1 -1
  333. package/dist/model-param-b-BqIr5rY5.js +1 -1
  334. package/dist/model-picker-BaeW3tiV.js +1 -1
  335. package/dist/model-picker-DN0czUYS.js +1 -1
  336. package/dist/model-selection-C2QwHmXT.js +1 -1
  337. package/dist/model-selection-I1ctjFOB.js +1 -1
  338. package/dist/model-selection-qkByRv5A.js +1 -1
  339. package/dist/models-UTdl0vXO.js +1 -1
  340. package/dist/models-cli-QRONP7EL.js +1 -1
  341. package/dist/models-cli-vRoB_gfX.js +1 -1
  342. package/dist/models-config-CWIlroKT.js +1 -1
  343. package/dist/models-config-DN2Q51fC.js +1 -1
  344. package/dist/mutable-allowlist-detectors-C4rNVag8.js +1 -1
  345. package/dist/mutable-allowlist-detectors-CL0qe54J.js +1 -1
  346. package/dist/node-cli-2-E4-83G.js +1 -1
  347. package/dist/node-cli-DUI7Zctj.js +1 -1
  348. package/dist/node-command-policy-Bbmnc16l.js +1 -1
  349. package/dist/node-command-policy-DgkwfoCs.js +1 -1
  350. package/dist/node-commands-8GBOiktk.js +1 -1
  351. package/dist/node-commands-DdkziOTx.js +1 -1
  352. package/dist/node-resolve-B3BJbmQX.js +1 -1
  353. package/dist/node-resolve-DLZf3-1V.js +1 -1
  354. package/dist/node-service-BRfrNp8l.js +1 -1
  355. package/dist/node-service-C0bl7jcZ.js +1 -1
  356. package/dist/node-shell-dXp4vk-i.js +1 -1
  357. package/dist/nodes-cli-DU13-dCL.js +1 -1
  358. package/dist/nodes-cli-rPeIRj_f.js +1 -1
  359. package/dist/nodes-screen-C7-5RrbN.js +1 -1
  360. package/dist/note-D4GAwgha.js +1 -1
  361. package/dist/note-Dp-d_utk.js +1 -1
  362. package/dist/npm-pack-install-B23L-AtF.js +1 -1
  363. package/dist/npm-pack-install-C0te3Oap.js +1 -1
  364. package/dist/npm-resolution-BCXCw93f.js +1 -1
  365. package/dist/npm-resolution-Cmm82lui.js +1 -1
  366. package/dist/oauth-env-DAamJ1oz.js +1 -1
  367. package/dist/oauth-env-DSLBTWb1.js +1 -1
  368. package/dist/oauth-tls-preflight-BSBRDIfC.js +1 -1
  369. package/dist/oauth-tls-preflight-ByNjbUR5.js +1 -1
  370. package/dist/ollama-setup-CKt3tF-S.js +1 -1
  371. package/dist/ollama-setup-I8lghdX1.js +1 -1
  372. package/dist/onboard-B3WSjKCu.js +1 -1
  373. package/dist/onboard-C65vdb94.js +1 -1
  374. package/dist/onboard-channels-9CmG3Jgn.js +1 -1
  375. package/dist/onboard-channels-CV1AK9jY.js +1 -1
  376. package/dist/onboard-config-B7U20YRw.js +1 -1
  377. package/dist/onboard-config-DS9dUv8M.js +1 -1
  378. package/dist/onboard-custom-CwHYUB0T.js +1 -1
  379. package/dist/onboard-custom-uwufXtQf.js +1 -1
  380. package/dist/onboard-helpers-CGJLUoxR.js +1 -1
  381. package/dist/onboard-helpers-DbpWQoiB.js +1 -1
  382. package/dist/onboard-hooks-CERzXObm.js +1 -1
  383. package/dist/onboard-hooks-gQ3sxBNi.js +1 -1
  384. package/dist/onboard-provider-auth-flags-CqbipO7D.js +1 -1
  385. package/dist/onboard-provider-auth-flags-Dvwzdz37.js +1 -1
  386. package/dist/onboard-remote-BeDZ_gbH.js +1 -1
  387. package/dist/onboard-remote-KTUx-3G1.js +1 -1
  388. package/dist/onboard-search-f2tJD4hg.js +1 -1
  389. package/dist/onboard-search-fslKKhyg.js +1 -1
  390. package/dist/onboard-skills-BoS_oVdm.js +1 -1
  391. package/dist/onboard-skills-C4omGWoD.js +1 -1
  392. package/dist/onboarding-B8icigkk.js +1 -1
  393. package/dist/onboarding-BJRqNsZ8.js +1 -1
  394. package/dist/onboarding.finalize-D0qISqn-.js +1 -1
  395. package/dist/onboarding.finalize-Ds9NwPBL.js +1 -1
  396. package/dist/onboarding.gateway-config-F8n_QFUR.js +1 -1
  397. package/dist/onboarding.gateway-config-eno73eHw.js +1 -1
  398. package/dist/onboarding.secret-input-B6fzeucQ.js +1 -1
  399. package/dist/onboarding.secret-input-CBuD3c32.js +1 -1
  400. package/dist/openai-codex-model-default-Df2T3foI.js +1 -1
  401. package/dist/openai-codex-model-default-DtIeKJm0.js +1 -1
  402. package/dist/openai-model-default-DIE55yBt.js +1 -1
  403. package/dist/openai-model-default-sqvWk4kB.js +1 -1
  404. package/dist/openclaw-exec-env-BWbOu_YC.js +1 -1
  405. package/dist/openclaw-root-CnsBf6ZU.js +1 -1
  406. package/dist/openclaw-root-D_0Q6--h.js +1 -1
  407. package/dist/outbound-B88MLJN3.js +1 -1
  408. package/dist/outbound-C-4qToKv.js +1 -1
  409. package/dist/outbound-CSk4oF0g.js +1 -1
  410. package/dist/outbound-DKMI_4xm.js +1 -1
  411. package/dist/outbound-attachment-BOax42-M.js +1 -1
  412. package/dist/outbound-attachment-DBNxdLYh.js +1 -1
  413. package/dist/outbound-attachment-DVjJQ3V6.js +1 -1
  414. package/dist/outbound-attachment-aZWcoZ-N.js +1 -1
  415. package/dist/pairing-cli-Cby6Ww8F.js +1 -1
  416. package/dist/pairing-cli-DiJb_a0V.js +1 -1
  417. package/dist/pairing-labels-BP1h0iHy.js +1 -1
  418. package/dist/pairing-labels-ryOnuOFA.js +1 -1
  419. package/dist/pairing-store-Bv4KSELv.js +1 -1
  420. package/dist/pairing-store-CjTPxq0X.js +1 -1
  421. package/dist/pairing-token-CKX1ds78.js +1 -1
  422. package/dist/pairing-token-CX0SUJsB.js +1 -1
  423. package/dist/parse-duration-XTjMKl8s.js +1 -1
  424. package/dist/parse-finite-number-DqzUM-_s.js +1 -1
  425. package/dist/parse-finite-number-dBmDLLKL.js +1 -1
  426. package/dist/parse-log-line-CsYLg7Qu.js +1 -1
  427. package/dist/parse-log-line-NV-cipB_.js +1 -1
  428. package/dist/parse-port-Bv1Y9Wk5.js +1 -1
  429. package/dist/parse-port-JVwkxcZ8.js +1 -1
  430. package/dist/parse-timeout-DWSGfCkQ.js +1 -1
  431. package/dist/parse-timeout-Dx4QnVzo.js +1 -1
  432. package/dist/path-alias-guards-kY_ZbWs-.js +1 -1
  433. package/dist/path-alias-guards-mvyLCPlN.js +1 -1
  434. package/dist/path-env-BPd1Yd-i.js +1 -1
  435. package/dist/path-env-emdAQejM.js +1 -1
  436. package/dist/path-safety-BukYK8Kd.js +1 -1
  437. package/dist/path-safety-DaaMJFdt.js +1 -1
  438. package/dist/paths-B4IRk3wi.js +1 -1
  439. package/dist/paths-BfjJY2VL.js +1 -1
  440. package/dist/paths-BjD3T_xq.js +1 -1
  441. package/dist/paths-BpQOWYiT.js +1 -1
  442. package/dist/paths-CChBdtE8.js +1 -1
  443. package/dist/paths-CrCoPIVK.js +1 -1
  444. package/dist/paths-piJASC5k.js +1 -1
  445. package/dist/paths-yLEk_25I.js +1 -1
  446. package/dist/pi-embedded-ZEWNj7P5.js +1 -1
  447. package/dist/pi-embedded-bqE4EmdD.js +1 -1
  448. package/dist/pi-model-discovery-6myCPEJE.js +1 -1
  449. package/dist/pi-model-discovery-AiV9h8k6.js +1 -1
  450. package/dist/pi-model-discovery-BzqdozHB.js +1 -1
  451. package/dist/pi-model-discovery-C8YBu6D4.js +1 -1
  452. package/dist/pi-tools.before-tool-call.runtime-CPAJMO7J.js +1 -1
  453. package/dist/pi-tools.before-tool-call.runtime-CYmLHod0.js +1 -1
  454. package/dist/pi-tools.before-tool-call.runtime-CfVqI0Ng.js +1 -1
  455. package/dist/pi-tools.before-tool-call.runtime-D9FlPJ_v.js +1 -1
  456. package/dist/pi-tools.policy-CeSKHaKa.js +1 -1
  457. package/dist/plugin-auto-enable-Cp7L8ko8.js +1 -1
  458. package/dist/plugin-auto-enable-DCOxqfDQ.js +1 -1
  459. package/dist/plugin-install-plan-BobX0y9S.js +1 -1
  460. package/dist/plugin-install-plan-NvDGp0d8.js +1 -1
  461. package/dist/plugin-registry-Fg000e4I.js +1 -1
  462. package/dist/plugin-registry-fm5tDUbE.js +1 -1
  463. package/dist/plugin-sdk/account-id.cjs +1 -1
  464. package/dist/plugin-sdk/account-id.js +1 -1
  465. package/dist/plugin-sdk/acpx.cjs +1 -1
  466. package/dist/plugin-sdk/acpx.js +1 -1
  467. package/dist/plugin-sdk/active-listener-BFeaYGID.js +1 -1
  468. package/dist/plugin-sdk/active-listener-BszCM2Au.cjs +1 -1
  469. package/dist/plugin-sdk/active-listener-CIcleJgU.cjs +1 -1
  470. package/dist/plugin-sdk/active-listener-Cqgd7xVh.cjs +1 -1
  471. package/dist/plugin-sdk/active-listener-D578zEtk.cjs +1 -1
  472. package/dist/plugin-sdk/active-listener-D6gGPLq-.js +1 -1
  473. package/dist/plugin-sdk/active-listener-DKSZRn4x.cjs +1 -1
  474. package/dist/plugin-sdk/active-listener-DNO10F1L.js +1 -1
  475. package/dist/plugin-sdk/active-listener-DQq07Aar.js +1 -1
  476. package/dist/plugin-sdk/active-listener-Dle_kYqb.js +1 -1
  477. package/dist/plugin-sdk/active-listener-DmJcHkMC.js +1 -1
  478. package/dist/plugin-sdk/active-listener-UmFpcYFY.cjs +1 -1
  479. package/dist/plugin-sdk/api-key-rotation-39TRXDEA.cjs +1 -1
  480. package/dist/plugin-sdk/api-key-rotation-7qlqJ_ou.js +1 -1
  481. package/dist/plugin-sdk/api-key-rotation-BY7fLi9z.js +1 -1
  482. package/dist/plugin-sdk/api-key-rotation-CF9_CKS-.cjs +1 -1
  483. package/dist/plugin-sdk/api-key-rotation-CWylhFOt.cjs +1 -1
  484. package/dist/plugin-sdk/api-key-rotation-ClZmonv2.js +1 -1
  485. package/dist/plugin-sdk/api-key-rotation-CmesQWXP.cjs +1 -1
  486. package/dist/plugin-sdk/api-key-rotation-Cs6II2__.js +1 -1
  487. package/dist/plugin-sdk/api-key-rotation-CxaiMcI1.js +1 -1
  488. package/dist/plugin-sdk/api-key-rotation-D5cfmg7E.cjs +1 -1
  489. package/dist/plugin-sdk/api-key-rotation-DkP7KnSm.cjs +1 -1
  490. package/dist/plugin-sdk/api-key-rotation-mDqgBFMG.js +1 -1
  491. package/dist/plugin-sdk/audio-preflight-B-HrF5Oc.js +1 -1
  492. package/dist/plugin-sdk/audio-preflight-B2MGeSoT.js +1 -1
  493. package/dist/plugin-sdk/audio-preflight-BVjiz_Qk.cjs +1 -1
  494. package/dist/plugin-sdk/audio-preflight-Behqe7F3.cjs +1 -1
  495. package/dist/plugin-sdk/audio-preflight-C0ncOCbK.cjs +1 -1
  496. package/dist/plugin-sdk/audio-preflight-C1o1n-KK.js +1 -1
  497. package/dist/plugin-sdk/audio-preflight-CzLYTZ5P.cjs +1 -1
  498. package/dist/plugin-sdk/audio-preflight-DDiBwIB9.js +1 -1
  499. package/dist/plugin-sdk/audio-preflight-DQyh-XSn.cjs +1 -1
  500. package/dist/plugin-sdk/audio-preflight-WH9WDR81.cjs +1 -1
  501. package/dist/plugin-sdk/audio-preflight-ZPLO3G1S.js +1 -1
  502. package/dist/plugin-sdk/audio-preflight-s3BAID12.js +1 -1
  503. package/dist/plugin-sdk/audio-transcription-runner-2-ZQ5Md-.cjs +1 -1
  504. package/dist/plugin-sdk/audio-transcription-runner-BO7T_SzP.cjs +1 -1
  505. package/dist/plugin-sdk/audio-transcription-runner-CRYJlAeP.js +1 -1
  506. package/dist/plugin-sdk/audio-transcription-runner-CmW24oVR.js +1 -1
  507. package/dist/plugin-sdk/audio-transcription-runner-CmYuWS0_.cjs +1 -1
  508. package/dist/plugin-sdk/audio-transcription-runner-CslXJs5c.js +1 -1
  509. package/dist/plugin-sdk/audio-transcription-runner-DE1tKTQV.cjs +1 -1
  510. package/dist/plugin-sdk/audio-transcription-runner-DZR84B28.js +1 -1
  511. package/dist/plugin-sdk/audio-transcription-runner-DoR-NOcV.cjs +1 -1
  512. package/dist/plugin-sdk/audio-transcription-runner-IE4olXkd.cjs +1 -1
  513. package/dist/plugin-sdk/audio-transcription-runner-YiDQM_Rb.js +1 -1
  514. package/dist/plugin-sdk/audio-transcription-runner-kAVM4YFR.js +1 -1
  515. package/dist/plugin-sdk/audit-membership-runtime-7LqcvqFo.js +1 -1
  516. package/dist/plugin-sdk/audit-membership-runtime-BQFUzFc0.cjs +1 -1
  517. package/dist/plugin-sdk/audit-membership-runtime-BYtdDX9G.cjs +1 -1
  518. package/dist/plugin-sdk/audit-membership-runtime-BzEtBUX6.cjs +1 -1
  519. package/dist/plugin-sdk/audit-membership-runtime-CBUmGrl4.js +1 -1
  520. package/dist/plugin-sdk/audit-membership-runtime-ChlVgt2y.js +1 -1
  521. package/dist/plugin-sdk/audit-membership-runtime-DLRX7LR0.js +1 -1
  522. package/dist/plugin-sdk/audit-membership-runtime-DbJW5X3L.cjs +1 -1
  523. package/dist/plugin-sdk/audit-membership-runtime-Du9LAxDa.cjs +1 -1
  524. package/dist/plugin-sdk/audit-membership-runtime-DylNnj1m.js +1 -1
  525. package/dist/plugin-sdk/audit-membership-runtime-voi5sPwF.js +1 -1
  526. package/dist/plugin-sdk/audit-membership-runtime-yWYvSpgZ.cjs +1 -1
  527. package/dist/plugin-sdk/bluebubbles.cjs +1 -1
  528. package/dist/plugin-sdk/bluebubbles.js +1 -1
  529. package/dist/plugin-sdk/channel-activity-Bed876M5.js +1 -1
  530. package/dist/plugin-sdk/channel-activity-Bu8tAmGa.cjs +1 -1
  531. package/dist/plugin-sdk/channel-activity-C01Im_o1.js +1 -1
  532. package/dist/plugin-sdk/channel-activity-CIycjzUC.js +1 -1
  533. package/dist/plugin-sdk/channel-activity-Cdkn3O_i.js +1 -1
  534. package/dist/plugin-sdk/channel-activity-Cia2G3v5.js +1 -1
  535. package/dist/plugin-sdk/channel-activity-D6d2wU8H.cjs +1 -1
  536. package/dist/plugin-sdk/channel-activity-DNv7JLBx.cjs +1 -1
  537. package/dist/plugin-sdk/channel-activity-Df3DfYyZ.cjs +1 -1
  538. package/dist/plugin-sdk/channel-activity-Rut-HCfT.cjs +1 -1
  539. package/dist/plugin-sdk/channel-activity-mffNSQrX.cjs +1 -1
  540. package/dist/plugin-sdk/channel-activity-qjwFifkE.js +1 -1
  541. package/dist/plugin-sdk/channel-web-Ces_xx2T.js +1 -1
  542. package/dist/plugin-sdk/channel-web-CsmEnYD8.cjs +1 -1
  543. package/dist/plugin-sdk/channel-web-DtzNv49H.cjs +1 -1
  544. package/dist/plugin-sdk/channel-web-VEZVrMYU.js +1 -1
  545. package/dist/plugin-sdk/command-poll-backoff-4910Mpwp.js +1 -1
  546. package/dist/plugin-sdk/command-poll-backoff-BLJZzV5W.cjs +1 -1
  547. package/dist/plugin-sdk/command-poll-backoff-CUNcN0dv.cjs +1 -1
  548. package/dist/plugin-sdk/command-poll-backoff-Cww_r-24.js +1 -1
  549. package/dist/plugin-sdk/command-poll-backoff-D0lJhquZ.js +1 -1
  550. package/dist/plugin-sdk/command-poll-backoff-Glwt3wHa.cjs +1 -1
  551. package/dist/plugin-sdk/commands-registry-33H8WYTk.cjs +1 -1
  552. package/dist/plugin-sdk/commands-registry-BGdm1KdC.js +1 -1
  553. package/dist/plugin-sdk/commands-registry-BgV9i-bj.cjs +1 -1
  554. package/dist/plugin-sdk/commands-registry-BifdCfty.cjs +1 -1
  555. package/dist/plugin-sdk/commands-registry-CJLBIIIp.js +1 -1
  556. package/dist/plugin-sdk/commands-registry-CWK9ARbc.js +1 -1
  557. package/dist/plugin-sdk/commands-registry-CfVD1h8L.cjs +1 -1
  558. package/dist/plugin-sdk/commands-registry-CpG4pxrA.js +1 -1
  559. package/dist/plugin-sdk/commands-registry-D-AnIQWz.cjs +1 -1
  560. package/dist/plugin-sdk/commands-registry-DBI4cPqT.cjs +1 -1
  561. package/dist/plugin-sdk/commands-registry-DOBe9cWq.js +1 -1
  562. package/dist/plugin-sdk/commands-registry-DqemUyiv.js +1 -1
  563. package/dist/plugin-sdk/common-CEe87dmX.js +1 -1
  564. package/dist/plugin-sdk/common-CjMKHm2Z.cjs +1 -1
  565. package/dist/plugin-sdk/compat.cjs +1 -1
  566. package/dist/plugin-sdk/compat.js +1 -1
  567. package/dist/plugin-sdk/config-DT_csBcZ.cjs +1 -1
  568. package/dist/plugin-sdk/config-LR8GH3Ws.js +1 -1
  569. package/dist/plugin-sdk/copilot-proxy.cjs +1 -1
  570. package/dist/plugin-sdk/copilot-proxy.js +1 -1
  571. package/dist/plugin-sdk/core.cjs +1 -1
  572. package/dist/plugin-sdk/core.js +1 -1
  573. package/dist/plugin-sdk/deliver-AORlkcbD.cjs +1 -1
  574. package/dist/plugin-sdk/deliver-BiBFW5fm.cjs +1 -1
  575. package/dist/plugin-sdk/deliver-BpqEPwLO.cjs +1 -1
  576. package/dist/plugin-sdk/deliver-BvC6aUKM.js +1 -1
  577. package/dist/plugin-sdk/deliver-CT0AIuK1.cjs +1 -1
  578. package/dist/plugin-sdk/deliver-CmddcjtG.cjs +1 -1
  579. package/dist/plugin-sdk/deliver-DFz5N1Eh.js +1 -1
  580. package/dist/plugin-sdk/deliver-DcJWpoqf.cjs +1 -1
  581. package/dist/plugin-sdk/deliver-ILim6ANU.js +1 -1
  582. package/dist/plugin-sdk/deliver-QgxW9IxV.js +1 -1
  583. package/dist/plugin-sdk/deliver-cT-Q8v0h.js +1 -1
  584. package/dist/plugin-sdk/deliver-cu_NQTmb.js +1 -1
  585. package/dist/plugin-sdk/device-pair.cjs +1 -1
  586. package/dist/plugin-sdk/device-pair.js +1 -1
  587. package/dist/plugin-sdk/diagnostic-BCyE1aYH.cjs +1 -1
  588. package/dist/plugin-sdk/diagnostic-BFea3l_a.js +1 -1
  589. package/dist/plugin-sdk/diagnostic-BvR96WdC.js +1 -1
  590. package/dist/plugin-sdk/diagnostic-C0xDsk89.cjs +1 -1
  591. package/dist/plugin-sdk/diagnostic-CEPhLgsW.cjs +1 -1
  592. package/dist/plugin-sdk/diagnostic-CbLwUqTE.cjs +1 -1
  593. package/dist/plugin-sdk/diagnostic-CbfxoqI_.cjs +1 -1
  594. package/dist/plugin-sdk/diagnostic-DDwUPG1m.js +1 -1
  595. package/dist/plugin-sdk/diagnostic-DS_mKKOu.js +1 -1
  596. package/dist/plugin-sdk/diagnostic-DYpehqHU.cjs +1 -1
  597. package/dist/plugin-sdk/diagnostic-DkncnZ3G.js +1 -1
  598. package/dist/plugin-sdk/diagnostic-Dz8HPEDe.js +1 -1
  599. package/dist/plugin-sdk/diagnostics-otel.cjs +1 -1
  600. package/dist/plugin-sdk/diagnostics-otel.js +1 -1
  601. package/dist/plugin-sdk/diffs.cjs +1 -1
  602. package/dist/plugin-sdk/diffs.js +1 -1
  603. package/dist/plugin-sdk/discord.cjs +1 -1
  604. package/dist/plugin-sdk/discord.js +1 -1
  605. package/dist/plugin-sdk/dispatch-6m3206FH.js +1 -1
  606. package/dist/plugin-sdk/dispatch-BYZNaz0n.cjs +1 -1
  607. package/dist/plugin-sdk/dispatch-BahZCe-D.js +1 -1
  608. package/dist/plugin-sdk/dispatch-Bi3yeWxb.cjs +1 -1
  609. package/dist/plugin-sdk/dispatch-BjB_TqWy.cjs +1 -1
  610. package/dist/plugin-sdk/dispatch-CNR186B3.js +1 -1
  611. package/dist/plugin-sdk/dispatch-CStT30wi.cjs +1 -1
  612. package/dist/plugin-sdk/dispatch-CdZAW9dg.cjs +1 -1
  613. package/dist/plugin-sdk/dispatch-Ewg2Jgw9.js +1 -1
  614. package/dist/plugin-sdk/dispatch-HRTsdeCV.js +1 -1
  615. package/dist/plugin-sdk/feishu.cjs +1 -1
  616. package/dist/plugin-sdk/feishu.js +1 -1
  617. package/dist/plugin-sdk/fetch-7Iq9POda.js +1 -1
  618. package/dist/plugin-sdk/fetch-B1GR6-u4.js +1 -1
  619. package/dist/plugin-sdk/fetch-B27H-XCf.js +1 -1
  620. package/dist/plugin-sdk/fetch-BMYDLRWo.js +1 -1
  621. package/dist/plugin-sdk/fetch-BN9y3kTg.cjs +1 -1
  622. package/dist/plugin-sdk/fetch-BVEVk5YF.js +1 -1
  623. package/dist/plugin-sdk/fetch-BY6lVRlY.cjs +1 -1
  624. package/dist/plugin-sdk/fetch-Bi8krAaT.cjs +1 -1
  625. package/dist/plugin-sdk/fetch-BjXhwqrE.cjs +1 -1
  626. package/dist/plugin-sdk/fetch-BtZY623f.js +1 -1
  627. package/dist/plugin-sdk/fetch-C-HRWp5R.js +1 -1
  628. package/dist/plugin-sdk/fetch-C3LEMysf.js +1 -1
  629. package/dist/plugin-sdk/fetch-CCLWsYaQ.js +1 -1
  630. package/dist/plugin-sdk/fetch-CZewCAvu.cjs +1 -1
  631. package/dist/plugin-sdk/fetch-ClKErpni.cjs +1 -1
  632. package/dist/plugin-sdk/fetch-DBRI0sKI.js +1 -1
  633. package/dist/plugin-sdk/fetch-DQxuOB8o.cjs +1 -1
  634. package/dist/plugin-sdk/fetch-DUMEaqum.cjs +1 -1
  635. package/dist/plugin-sdk/fetch-DpwR_cJU.cjs +1 -1
  636. package/dist/plugin-sdk/fetch-J0IzopiJ.js +1 -1
  637. package/dist/plugin-sdk/fetch-guard-D8TdhTHU.js +1 -1
  638. package/dist/plugin-sdk/fetch-guard-DC_pFJEy.js +1 -1
  639. package/dist/plugin-sdk/fetch-guard-DDkd30BG.js +1 -1
  640. package/dist/plugin-sdk/fetch-guard-DELiFG5g.js +1 -1
  641. package/dist/plugin-sdk/fetch-guard-DIYjBRpq.cjs +1 -1
  642. package/dist/plugin-sdk/fetch-guard-DPVfELS7.js +1 -1
  643. package/dist/plugin-sdk/fetch-guard-Dpz6CnJY.cjs +1 -1
  644. package/dist/plugin-sdk/fetch-guard-DqNKwgHP.cjs +1 -1
  645. package/dist/plugin-sdk/fetch-guard-DqTxZ3G8.cjs +1 -1
  646. package/dist/plugin-sdk/fetch-guard-EoAitPe9.cjs +1 -1
  647. package/dist/plugin-sdk/fetch-guard-qfU6iTvp.js +1 -1
  648. package/dist/plugin-sdk/fetch-guard-u2Dt6P9i.cjs +1 -1
  649. package/dist/plugin-sdk/fetch-lw-aF17e.cjs +1 -1
  650. package/dist/plugin-sdk/fetch-timeout-6oZsqWxA.js +1 -1
  651. package/dist/plugin-sdk/fetch-timeout-BygUD0rd.cjs +1 -1
  652. package/dist/plugin-sdk/fetch-timeout-CLw1U7VS.js +1 -1
  653. package/dist/plugin-sdk/fetch-timeout-CX1w-9p4.cjs +1 -1
  654. package/dist/plugin-sdk/fetch-timeout-Coc9xyC3.cjs +1 -1
  655. package/dist/plugin-sdk/fetch-timeout-Cz6GuU_c.js +1 -1
  656. package/dist/plugin-sdk/fetch-timeout-DC8T2JCr.js +1 -1
  657. package/dist/plugin-sdk/fetch-timeout-DFDmks9T.cjs +1 -1
  658. package/dist/plugin-sdk/fetch-timeout-DkYpp08Q.js +1 -1
  659. package/dist/plugin-sdk/github-copilot-token-BHdMLLqf.cjs +1 -1
  660. package/dist/plugin-sdk/github-copilot-token-Bt4PduRB.js +1 -1
  661. package/dist/plugin-sdk/github-copilot-token-C1O2cBqk.cjs +1 -1
  662. package/dist/plugin-sdk/github-copilot-token-C1hiDugd.js +1 -1
  663. package/dist/plugin-sdk/github-copilot-token-C8j8_NjX.js +1 -1
  664. package/dist/plugin-sdk/github-copilot-token-CCrgp2py.cjs +1 -1
  665. package/dist/plugin-sdk/github-copilot-token-DoHgkI2r.cjs +1 -1
  666. package/dist/plugin-sdk/github-copilot-token-N8vnLZPw.js +1 -1
  667. package/dist/plugin-sdk/github-copilot-token-TMkfxxD2.cjs +1 -1
  668. package/dist/plugin-sdk/github-copilot-token-vKAKX6iE.js +1 -1
  669. package/dist/plugin-sdk/github-copilot-token-ylX_gawo.js +1 -1
  670. package/dist/plugin-sdk/github-copilot-token-zskwAEpd.cjs +1 -1
  671. package/dist/plugin-sdk/google-gemini-cli-auth.cjs +1 -1
  672. package/dist/plugin-sdk/google-gemini-cli-auth.js +1 -1
  673. package/dist/plugin-sdk/googlechat.cjs +1 -1
  674. package/dist/plugin-sdk/googlechat.js +1 -1
  675. package/dist/plugin-sdk/image-0OHO98b9.cjs +1 -1
  676. package/dist/plugin-sdk/image-B9SLKAOs.cjs +1 -1
  677. package/dist/plugin-sdk/image-BVnZq5Y4.js +1 -1
  678. package/dist/plugin-sdk/image-CKLAyhco.js +1 -1
  679. package/dist/plugin-sdk/image-DUHEJeBF.js +1 -1
  680. package/dist/plugin-sdk/image-DngxW2Nh.cjs +1 -1
  681. package/dist/plugin-sdk/image-DrPh2689.cjs +1 -1
  682. package/dist/plugin-sdk/image-ISWO0Dwt.js +1 -1
  683. package/dist/plugin-sdk/image-KfZYW6Lh.cjs +1 -1
  684. package/dist/plugin-sdk/image-YVlw68CK.js +1 -1
  685. package/dist/plugin-sdk/image-gehqJnV6.js +1 -1
  686. package/dist/plugin-sdk/image-jUYo-0eT.cjs +1 -1
  687. package/dist/plugin-sdk/imessage.cjs +1 -1
  688. package/dist/plugin-sdk/imessage.js +1 -1
  689. package/dist/plugin-sdk/index.cjs +1 -1
  690. package/dist/plugin-sdk/index.js +1 -1
  691. package/dist/plugin-sdk/ir-78toXVqC.cjs +1 -1
  692. package/dist/plugin-sdk/ir-A_TqKaXP.cjs +1 -1
  693. package/dist/plugin-sdk/ir-B0_rUT7m.js +1 -1
  694. package/dist/plugin-sdk/ir-B7agH4cQ.cjs +1 -1
  695. package/dist/plugin-sdk/ir-B9ap_YNW.cjs +1 -1
  696. package/dist/plugin-sdk/ir-BxKSHYao.cjs +1 -1
  697. package/dist/plugin-sdk/ir-BzZArF6l.js +1 -1
  698. package/dist/plugin-sdk/ir-CpkEWZD6.js +1 -1
  699. package/dist/plugin-sdk/ir-D4Dz-giw.cjs +1 -1
  700. package/dist/plugin-sdk/ir-DJ08DSkk.js +1 -1
  701. package/dist/plugin-sdk/ir-L2vhtuGx.js +1 -1
  702. package/dist/plugin-sdk/ir-ntSck5Kp.js +1 -1
  703. package/dist/plugin-sdk/irc.cjs +1 -1
  704. package/dist/plugin-sdk/irc.js +1 -1
  705. package/dist/plugin-sdk/keyed-async-queue.cjs +1 -1
  706. package/dist/plugin-sdk/keyed-async-queue.js +1 -1
  707. package/dist/plugin-sdk/line.cjs +1 -1
  708. package/dist/plugin-sdk/line.js +1 -1
  709. package/dist/plugin-sdk/llm-task.cjs +1 -1
  710. package/dist/plugin-sdk/llm-task.js +1 -1
  711. package/dist/plugin-sdk/load-options-B9Ss5YOO.js +1 -1
  712. package/dist/plugin-sdk/load-options-BOfn6Zgo.cjs +1 -1
  713. package/dist/plugin-sdk/load-options-BXvm8HVv.js +1 -1
  714. package/dist/plugin-sdk/load-options-Bb7u8yZz.cjs +1 -1
  715. package/dist/plugin-sdk/load-options-BcSg1ODN.js +1 -1
  716. package/dist/plugin-sdk/load-options-NqnXJ-Nh.cjs +1 -1
  717. package/dist/plugin-sdk/lobster.cjs +1 -1
  718. package/dist/plugin-sdk/lobster.js +1 -1
  719. package/dist/plugin-sdk/local-roots-B0zm186S.js +1 -1
  720. package/dist/plugin-sdk/local-roots-B4Uy4kG3.cjs +1 -1
  721. package/dist/plugin-sdk/local-roots-CM1R1Ncr.cjs +1 -1
  722. package/dist/plugin-sdk/local-roots-CW78ZeZV.js +1 -1
  723. package/dist/plugin-sdk/local-roots-CnsaE7a_.js +1 -1
  724. package/dist/plugin-sdk/local-roots-D1k-fAlE.cjs +1 -1
  725. package/dist/plugin-sdk/local-roots-DQ_vfJPK.js +1 -1
  726. package/dist/plugin-sdk/local-roots-DYlB1au6.cjs +1 -1
  727. package/dist/plugin-sdk/local-roots-H4-t0qG_.js +1 -1
  728. package/dist/plugin-sdk/local-roots-SCyeUfM3.cjs +1 -1
  729. package/dist/plugin-sdk/local-roots-l4PqCmiU.js +1 -1
  730. package/dist/plugin-sdk/local-roots-xHoEq1Fq.cjs +1 -1
  731. package/dist/plugin-sdk/logger-6O6OsYBL.cjs +1 -1
  732. package/dist/plugin-sdk/logger-BlddiV_d.cjs +1 -1
  733. package/dist/plugin-sdk/logger-Bm93ZKOk.cjs +1 -1
  734. package/dist/plugin-sdk/logger-BtrWb0dj.js +1 -1
  735. package/dist/plugin-sdk/logger-C210xuWx.js +1 -1
  736. package/dist/plugin-sdk/logger-DJGHvDbX.js +1 -1
  737. package/dist/plugin-sdk/logger-DPlqYkRm.cjs +1 -1
  738. package/dist/plugin-sdk/logger-DUYnS-W3.cjs +1 -1
  739. package/dist/plugin-sdk/logger-DwWqfo66.js +1 -1
  740. package/dist/plugin-sdk/logger-vBDTZWl3.js +1 -1
  741. package/dist/plugin-sdk/login-BN1TsFp4.cjs +1 -1
  742. package/dist/plugin-sdk/login-BXUtcSnB.cjs +1 -1
  743. package/dist/plugin-sdk/login-BoMH2iJT.js +1 -1
  744. package/dist/plugin-sdk/login-BtT7yRJO.js +1 -1
  745. package/dist/plugin-sdk/login-COzybMRK.js +1 -1
  746. package/dist/plugin-sdk/login-Cw1jFbel.cjs +1 -1
  747. package/dist/plugin-sdk/login-DEmpr5YK.js +1 -1
  748. package/dist/plugin-sdk/login-Dln00cFs.cjs +1 -1
  749. package/dist/plugin-sdk/login-S2Fe5n5K.cjs +1 -1
  750. package/dist/plugin-sdk/login-TieaF0ts.cjs +1 -1
  751. package/dist/plugin-sdk/login-ZQK4uJLw.js +1 -1
  752. package/dist/plugin-sdk/login-fKxJv0_F.js +1 -1
  753. package/dist/plugin-sdk/login-qr-1ilmySGx.js +1 -1
  754. package/dist/plugin-sdk/login-qr-B0ZSZaNI.js +1 -1
  755. package/dist/plugin-sdk/login-qr-B2P2Ky4j.js +1 -1
  756. package/dist/plugin-sdk/login-qr-B2U87iU8.js +1 -1
  757. package/dist/plugin-sdk/login-qr-B4x_eWI_.js +1 -1
  758. package/dist/plugin-sdk/login-qr-BIaJB24t.cjs +1 -1
  759. package/dist/plugin-sdk/login-qr-BMl5Beq2.cjs +1 -1
  760. package/dist/plugin-sdk/login-qr-Bkm3QorK.cjs +1 -1
  761. package/dist/plugin-sdk/login-qr-ClL8FMAJ.cjs +1 -1
  762. package/dist/plugin-sdk/login-qr-DFVK1lg-.js +1 -1
  763. package/dist/plugin-sdk/login-qr-DhieI9fL.cjs +1 -1
  764. package/dist/plugin-sdk/login-qr-DyQT1QnE.cjs +1 -1
  765. package/dist/plugin-sdk/manager-0tvX3Z_N.cjs +1 -1
  766. package/dist/plugin-sdk/manager-8uylP7PH.cjs +1 -1
  767. package/dist/plugin-sdk/manager-B6hWglXe.js +1 -1
  768. package/dist/plugin-sdk/manager-BGoKN9ur.js +1 -1
  769. package/dist/plugin-sdk/manager-BRP1lzb6.js +1 -1
  770. package/dist/plugin-sdk/manager-BeLNhsXC.cjs +1 -1
  771. package/dist/plugin-sdk/manager-BnytMgmq.js +1 -1
  772. package/dist/plugin-sdk/manager-BoMQeM1I.cjs +1 -1
  773. package/dist/plugin-sdk/manager-CYZY9vcM.js +1 -1
  774. package/dist/plugin-sdk/manager-DCDy2V1U.cjs +1 -1
  775. package/dist/plugin-sdk/manager-DE7sDip8.cjs +1 -1
  776. package/dist/plugin-sdk/manager-PwgQZNK1.js +1 -1
  777. package/dist/plugin-sdk/matrix.cjs +1 -1
  778. package/dist/plugin-sdk/matrix.js +1 -1
  779. package/dist/plugin-sdk/mattermost.cjs +1 -1
  780. package/dist/plugin-sdk/mattermost.js +1 -1
  781. package/dist/plugin-sdk/memory-core.cjs +1 -1
  782. package/dist/plugin-sdk/memory-core.js +1 -1
  783. package/dist/plugin-sdk/minimax-portal-auth.cjs +1 -1
  784. package/dist/plugin-sdk/minimax-portal-auth.js +1 -1
  785. package/dist/plugin-sdk/model-auth-BgS7ynQw.cjs +1 -1
  786. package/dist/plugin-sdk/model-auth-CKlA2xRB.cjs +1 -1
  787. package/dist/plugin-sdk/model-auth-CLnFIqcf.cjs +1 -1
  788. package/dist/plugin-sdk/model-auth-D7YupJDS.js +1 -1
  789. package/dist/plugin-sdk/model-auth-eNVBeC-B.js +1 -1
  790. package/dist/plugin-sdk/model-auth-fJrNIbke.cjs +1 -1
  791. package/dist/plugin-sdk/model-auth-g6eGgTwR.js +1 -1
  792. package/dist/plugin-sdk/model-auth-wcxJptQX.js +1 -1
  793. package/dist/plugin-sdk/model-selection-4ExiFkaW.js +1 -1
  794. package/dist/plugin-sdk/model-selection-CZY_x2-a.cjs +1 -1
  795. package/dist/plugin-sdk/msteams.cjs +1 -1
  796. package/dist/plugin-sdk/msteams.js +1 -1
  797. package/dist/plugin-sdk/nextcloud-talk.cjs +1 -1
  798. package/dist/plugin-sdk/nextcloud-talk.js +1 -1
  799. package/dist/plugin-sdk/nostr.cjs +1 -1
  800. package/dist/plugin-sdk/nostr.js +1 -1
  801. package/dist/plugin-sdk/outbound-2VVSR_d4.js +1 -1
  802. package/dist/plugin-sdk/outbound-B03BQa7T.cjs +1 -1
  803. package/dist/plugin-sdk/outbound-BE8CJ9c_.js +1 -1
  804. package/dist/plugin-sdk/outbound-BWtGs0dn.cjs +1 -1
  805. package/dist/plugin-sdk/outbound-BrD0UsX0.js +1 -1
  806. package/dist/plugin-sdk/outbound-Bvu4LbQx.js +1 -1
  807. package/dist/plugin-sdk/outbound-C5rNt-8z.cjs +1 -1
  808. package/dist/plugin-sdk/outbound-C6BJCoYf.cjs +1 -1
  809. package/dist/plugin-sdk/outbound-Cgc0JJtB.js +1 -1
  810. package/dist/plugin-sdk/outbound-DAHIkpiA.cjs +1 -1
  811. package/dist/plugin-sdk/outbound-DnO_udAm.cjs +1 -1
  812. package/dist/plugin-sdk/outbound-UAHsCNyW.js +1 -1
  813. package/dist/plugin-sdk/outbound-attachment-0QahtSQB.cjs +1 -1
  814. package/dist/plugin-sdk/outbound-attachment-8qvAj1MK.js +1 -1
  815. package/dist/plugin-sdk/outbound-attachment-B6SJy_CG.js +1 -1
  816. package/dist/plugin-sdk/outbound-attachment-BVdSGifg.js +1 -1
  817. package/dist/plugin-sdk/outbound-attachment-C-QqSQ79.cjs +1 -1
  818. package/dist/plugin-sdk/outbound-attachment-CYGrnygD.cjs +1 -1
  819. package/dist/plugin-sdk/outbound-attachment-CtA5eBgj.cjs +1 -1
  820. package/dist/plugin-sdk/outbound-attachment-D8Ng5uVX.cjs +1 -1
  821. package/dist/plugin-sdk/outbound-attachment-DS0S0NLK.js +1 -1
  822. package/dist/plugin-sdk/outbound-attachment-Ds2XsjQl.js +1 -1
  823. package/dist/plugin-sdk/outbound-attachment-acB4qID1.js +1 -1
  824. package/dist/plugin-sdk/outbound-attachment-x4Q2SVIA.cjs +1 -1
  825. package/dist/plugin-sdk/paths-BPlgbwrb.cjs +1 -1
  826. package/dist/plugin-sdk/paths-Bcdg3ma0.cjs +1 -1
  827. package/dist/plugin-sdk/paths-BpQOWYiT.js +1 -1
  828. package/dist/plugin-sdk/paths-BvlJvmRS.cjs +1 -1
  829. package/dist/plugin-sdk/paths-CIcxeNL-.cjs +1 -1
  830. package/dist/plugin-sdk/paths-CXgWvWAM.js +1 -1
  831. package/dist/plugin-sdk/paths-Chp3zwtq.cjs +1 -1
  832. package/dist/plugin-sdk/paths-CnHSNSeR.js +1 -1
  833. package/dist/plugin-sdk/paths-Cqca1YmF.cjs +1 -1
  834. package/dist/plugin-sdk/paths-CtrEseGU.js +1 -1
  835. package/dist/plugin-sdk/paths-D55o_j8-.js +1 -1
  836. package/dist/plugin-sdk/paths-D90l3h_o.cjs +1 -1
  837. package/dist/plugin-sdk/paths-DaRoqzBQ.js +1 -1
  838. package/dist/plugin-sdk/paths-Dd7r1qlB.cjs +1 -1
  839. package/dist/plugin-sdk/paths-DhSjTRMz.js +1 -1
  840. package/dist/plugin-sdk/paths-Do0djuaj.js +1 -1
  841. package/dist/plugin-sdk/paths-J4JUiRsa.js +1 -1
  842. package/dist/plugin-sdk/paths-cBAF6Bj0.js +1 -1
  843. package/dist/plugin-sdk/paths-piJASC5k.js +1 -1
  844. package/dist/plugin-sdk/paths-rO4ehkyU.js +1 -1
  845. package/dist/plugin-sdk/pi-model-discovery--UcCzdQg.js +1 -1
  846. package/dist/plugin-sdk/pi-model-discovery-Bi4dKtW0.cjs +1 -1
  847. package/dist/plugin-sdk/pi-model-discovery-CCK2Ppj9.js +1 -1
  848. package/dist/plugin-sdk/pi-model-discovery-CRSZ0OFi.js +1 -1
  849. package/dist/plugin-sdk/pi-model-discovery-Cx_r4FGY.js +1 -1
  850. package/dist/plugin-sdk/pi-model-discovery-D3JQMjAa.cjs +1 -1
  851. package/dist/plugin-sdk/pi-model-discovery-DN1RHetG.cjs +1 -1
  852. package/dist/plugin-sdk/pi-model-discovery-DVFSU0-f.cjs +1 -1
  853. package/dist/plugin-sdk/pi-model-discovery-DWMAAhA-.cjs +1 -1
  854. package/dist/plugin-sdk/pi-model-discovery-DYOHzCjs.js +1 -1
  855. package/dist/plugin-sdk/pi-model-discovery-DdSVvbQ5.cjs +1 -1
  856. package/dist/plugin-sdk/pi-model-discovery-DejkxBol.js +1 -1
  857. package/dist/plugin-sdk/pi-model-discovery-SmVAFMj_.cjs +1 -1
  858. package/dist/plugin-sdk/pi-model-discovery-ma8st1Ek.js +1 -1
  859. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-B2WodYBY.cjs +1 -1
  860. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BC114tUb.js +1 -1
  861. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BF6jP1nM.js +1 -1
  862. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Beg-U7Z-.cjs +1 -1
  863. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-BkEYsSLL.js +1 -1
  864. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-C21sWtkh.js +1 -1
  865. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CKkgBGIj.cjs +1 -1
  866. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-CNun__L-.js +1 -1
  867. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Clulhv2X.cjs +1 -1
  868. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-DvwL5in9.cjs +1 -1
  869. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-FnzjmZqP.js +1 -1
  870. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-Rq5y0QJ2.cjs +1 -1
  871. package/dist/plugin-sdk/polls-BuaJuIpV.cjs +1 -1
  872. package/dist/plugin-sdk/polls-CBAGZuJ6.js +1 -1
  873. package/dist/plugin-sdk/polls-CSKMbBIS.js +1 -1
  874. package/dist/plugin-sdk/polls-D0wY0FvT.cjs +1 -1
  875. package/dist/plugin-sdk/polls-PGxiE05J.js +1 -1
  876. package/dist/plugin-sdk/polls-yWqSCEP0.cjs +1 -1
  877. package/dist/plugin-sdk/proxy-env-B765haXA.js +1 -1
  878. package/dist/plugin-sdk/proxy-env-Bcl14j2_.cjs +1 -1
  879. package/dist/plugin-sdk/proxy-env-BlrHtJWH.js +1 -1
  880. package/dist/plugin-sdk/proxy-env-D48qBPAr.cjs +1 -1
  881. package/dist/plugin-sdk/proxy-env-DGzNnnJh.js +1 -1
  882. package/dist/plugin-sdk/proxy-env-DQoJjkWE.cjs +1 -1
  883. package/dist/plugin-sdk/proxy-env-DWw9TnOj.cjs +1 -1
  884. package/dist/plugin-sdk/proxy-env-MEjSyzTr.js +1 -1
  885. package/dist/plugin-sdk/proxy-env-a590sPAz.cjs +1 -1
  886. package/dist/plugin-sdk/proxy-env-k93igu7v.cjs +1 -1
  887. package/dist/plugin-sdk/proxy-env-m9eG3uZN.js +1 -1
  888. package/dist/plugin-sdk/proxy-env-t6hcaFqC.js +1 -1
  889. package/dist/plugin-sdk/proxy-fetch-B9aXJVe-.js +1 -1
  890. package/dist/plugin-sdk/proxy-fetch-BaA3JYgW.cjs +1 -1
  891. package/dist/plugin-sdk/proxy-fetch-BwXFVsHE.cjs +1 -1
  892. package/dist/plugin-sdk/proxy-fetch-BzcKzknk.cjs +1 -1
  893. package/dist/plugin-sdk/proxy-fetch-CYVChsKE.js +1 -1
  894. package/dist/plugin-sdk/proxy-fetch-ClOb2LUH.js +1 -1
  895. package/dist/plugin-sdk/proxy-fetch-DH7VIiBH.cjs +1 -1
  896. package/dist/plugin-sdk/proxy-fetch-DPOhfrou.cjs +1 -1
  897. package/dist/plugin-sdk/proxy-fetch-DXt2R_Z5.js +1 -1
  898. package/dist/plugin-sdk/proxy-fetch-Del551nu.js +1 -1
  899. package/dist/plugin-sdk/proxy-fetch-YCVHz7Rl.js +1 -1
  900. package/dist/plugin-sdk/proxy-fetch-qbrYAz8k.cjs +1 -1
  901. package/dist/plugin-sdk/pw-ai-3piACPqP.cjs +1 -1
  902. package/dist/plugin-sdk/pw-ai-8dajXBkZ.js +1 -1
  903. package/dist/plugin-sdk/pw-ai-B7mrBDW5.js +1 -1
  904. package/dist/plugin-sdk/pw-ai-BLD7x-3a.js +1 -1
  905. package/dist/plugin-sdk/pw-ai-BYmANcaC.cjs +1 -1
  906. package/dist/plugin-sdk/pw-ai-C1rVW06B.cjs +1 -1
  907. package/dist/plugin-sdk/pw-ai-CCDvaBUm.cjs +1 -1
  908. package/dist/plugin-sdk/pw-ai-CVYUOcKM.js +1 -1
  909. package/dist/plugin-sdk/pw-ai-DBg5CCXp.cjs +1 -1
  910. package/dist/plugin-sdk/pw-ai-DY11CCd3.cjs +1 -1
  911. package/dist/plugin-sdk/pw-ai-Kf2RyA25.js +1 -1
  912. package/dist/plugin-sdk/pw-ai-f5yF3n3t.js +1 -1
  913. package/dist/plugin-sdk/qmd-manager-B3xNbdye.cjs +1 -1
  914. package/dist/plugin-sdk/qmd-manager-BMyDNBPi.js +1 -1
  915. package/dist/plugin-sdk/qmd-manager-BZhiv_zq.cjs +1 -1
  916. package/dist/plugin-sdk/qmd-manager-C3uVDbhW.js +1 -1
  917. package/dist/plugin-sdk/qmd-manager-CW46NrS-.cjs +1 -1
  918. package/dist/plugin-sdk/qmd-manager-C_e04BNg.js +1 -1
  919. package/dist/plugin-sdk/qmd-manager-CczVoslK.cjs +1 -1
  920. package/dist/plugin-sdk/qmd-manager-CzLKqPmR.js +1 -1
  921. package/dist/plugin-sdk/qmd-manager-DFh8b5N-.cjs +1 -1
  922. package/dist/plugin-sdk/qmd-manager-DXLfZZMI.js +1 -1
  923. package/dist/plugin-sdk/qmd-manager-FL9fAfNo.cjs +1 -1
  924. package/dist/plugin-sdk/qmd-manager-fWxbGqzk.js +1 -1
  925. package/dist/plugin-sdk/query-expansion-0zYzKrrd.cjs +1 -1
  926. package/dist/plugin-sdk/query-expansion-BYSjmpkV.cjs +1 -1
  927. package/dist/plugin-sdk/query-expansion-CAboqtWr.js +1 -1
  928. package/dist/plugin-sdk/query-expansion-C_DnhmUy.js +1 -1
  929. package/dist/plugin-sdk/query-expansion-Cb2vnF6y.js +1 -1
  930. package/dist/plugin-sdk/query-expansion-DCeqywxh.cjs +1 -1
  931. package/dist/plugin-sdk/query-expansion-DF4LMxRQ.js +1 -1
  932. package/dist/plugin-sdk/query-expansion-DKJkqmNM.cjs +1 -1
  933. package/dist/plugin-sdk/query-expansion-DO2CFW4z.cjs +1 -1
  934. package/dist/plugin-sdk/query-expansion-DyCDaZbL.js +1 -1
  935. package/dist/plugin-sdk/query-expansion-cpXCyoDy.cjs +1 -1
  936. package/dist/plugin-sdk/query-expansion-r_iXkNzt.js +1 -1
  937. package/dist/plugin-sdk/qwen-portal-auth.cjs +1 -1
  938. package/dist/plugin-sdk/qwen-portal-auth.js +1 -1
  939. package/dist/plugin-sdk/render-6fCdtAr6.cjs +1 -1
  940. package/dist/plugin-sdk/render-CBsnn-2A.js +1 -1
  941. package/dist/plugin-sdk/render-CzHaQB0d.cjs +1 -1
  942. package/dist/plugin-sdk/render-DGmfCIRG.js +1 -1
  943. package/dist/plugin-sdk/render-DhTJXP1U.js +1 -1
  944. package/dist/plugin-sdk/render-Djx15dPh.js +1 -1
  945. package/dist/plugin-sdk/render-DxBO2Blp.cjs +1 -1
  946. package/dist/plugin-sdk/render-g5VlmgpF.cjs +1 -1
  947. package/dist/plugin-sdk/reply-BrHB7v5V.cjs +1 -1
  948. package/dist/plugin-sdk/reply-Clex4c2R.js +1 -1
  949. package/dist/plugin-sdk/resolve-outbound-target-BHLQMMp-.cjs +1 -1
  950. package/dist/plugin-sdk/resolve-outbound-target-Cvz2WXAk.cjs +1 -1
  951. package/dist/plugin-sdk/resolve-outbound-target-DDqGniMw.js +1 -1
  952. package/dist/plugin-sdk/resolve-outbound-target-DEpmpEep.js +1 -1
  953. package/dist/plugin-sdk/send--HeMLLzj.js +1 -1
  954. package/dist/plugin-sdk/send-2IhtEEzb.js +1 -1
  955. package/dist/plugin-sdk/send-9tPLnqkc.js +1 -1
  956. package/dist/plugin-sdk/send-B-exJfkg.js +1 -1
  957. package/dist/plugin-sdk/send-B4kzPtcN.js +1 -1
  958. package/dist/plugin-sdk/send-BCSkdYN6.cjs +1 -1
  959. package/dist/plugin-sdk/send-BEmZxBcF.js +1 -1
  960. package/dist/plugin-sdk/send-BHvZIrbJ.cjs +1 -1
  961. package/dist/plugin-sdk/send-BLbCBxeF.js +1 -1
  962. package/dist/plugin-sdk/send-BOkABdQu.cjs +1 -1
  963. package/dist/plugin-sdk/send-BPNd63Qs.js +1 -1
  964. package/dist/plugin-sdk/send-BVAm6Zbr.cjs +1 -1
  965. package/dist/plugin-sdk/send-B_619b3s.js +1 -1
  966. package/dist/plugin-sdk/send-BcuylzbX.js +1 -1
  967. package/dist/plugin-sdk/send-BdFvK9Wc2.js +1 -1
  968. package/dist/plugin-sdk/send-Bh-J7XWZ.cjs +1 -1
  969. package/dist/plugin-sdk/send-BkREPc90.cjs +1 -1
  970. package/dist/plugin-sdk/send-Bp4f-KJu.cjs +1 -1
  971. package/dist/plugin-sdk/send-BtF36kYb.js +1 -1
  972. package/dist/plugin-sdk/send-C6S8tkTA.cjs +1 -1
  973. package/dist/plugin-sdk/send-CDQF_izk.js +1 -1
  974. package/dist/plugin-sdk/send-CF3qas-K.js +1 -1
  975. package/dist/plugin-sdk/send-CFKQX2Wo.js +1 -1
  976. package/dist/plugin-sdk/send-CIP1u5a-.js +1 -1
  977. package/dist/plugin-sdk/send-CIxh7PV0.cjs +1 -1
  978. package/dist/plugin-sdk/send-CJJdcDHX.js +1 -1
  979. package/dist/plugin-sdk/send-COtvydDt.cjs +1 -1
  980. package/dist/plugin-sdk/send-CPwh7tRu.js +1 -1
  981. package/dist/plugin-sdk/send-CRnIqXN9.cjs +1 -1
  982. package/dist/plugin-sdk/send-CSqipUeV.cjs +1 -1
  983. package/dist/plugin-sdk/send-Chfe8tPY.js +1 -1
  984. package/dist/plugin-sdk/send-ClMvdjfg.js +1 -1
  985. package/dist/plugin-sdk/send-CmoJSYhT.js +1 -1
  986. package/dist/plugin-sdk/send-Cs5jSTw0.cjs +1 -1
  987. package/dist/plugin-sdk/send-D-6Et_9H.js +1 -1
  988. package/dist/plugin-sdk/send-D13uFnzH.cjs +1 -1
  989. package/dist/plugin-sdk/send-D3eT0F4N.cjs +1 -1
  990. package/dist/plugin-sdk/send-DAtg_VHa.js +1 -1
  991. package/dist/plugin-sdk/send-DCF59ijQ.cjs +1 -1
  992. package/dist/plugin-sdk/send-DN2xic3w.cjs +1 -1
  993. package/dist/plugin-sdk/send-DOjSTB6D.cjs +1 -1
  994. package/dist/plugin-sdk/send-DavwL7cF.js +1 -1
  995. package/dist/plugin-sdk/send-Dbmn1rgD.cjs +1 -1
  996. package/dist/plugin-sdk/send-DhfDqcwc.cjs +1 -1
  997. package/dist/plugin-sdk/send-DsDCrJWq.js +1 -1
  998. package/dist/plugin-sdk/send-DyR5Lpl-.js +1 -1
  999. package/dist/plugin-sdk/send-DyzuwDjE.js +1 -1
  1000. package/dist/plugin-sdk/send-GtphEa1b.cjs +1 -1
  1001. package/dist/plugin-sdk/send-HZNY_u3L.cjs +1 -1
  1002. package/dist/plugin-sdk/send-IM-76QZu.js +1 -1
  1003. package/dist/plugin-sdk/send-IqcgAO8b.cjs +1 -1
  1004. package/dist/plugin-sdk/send-OQcuL9tP.js +1 -1
  1005. package/dist/plugin-sdk/send-_92aOzWU.cjs +1 -1
  1006. package/dist/plugin-sdk/send-h_kE-cAK.js +1 -1
  1007. package/dist/plugin-sdk/send-jOMdGt0L.cjs +1 -1
  1008. package/dist/plugin-sdk/send-mZ_d-t_3.cjs +1 -1
  1009. package/dist/plugin-sdk/send-puyUta4_.cjs +1 -1
  1010. package/dist/plugin-sdk/send-t5U34FhY.cjs +1 -1
  1011. package/dist/plugin-sdk/send-tvw8j-Se.cjs +1 -1
  1012. package/dist/plugin-sdk/send-z1vaCgF3.cjs +1 -1
  1013. package/dist/plugin-sdk/session--K1m5v7m.js +1 -1
  1014. package/dist/plugin-sdk/session-B1DJ45om.js +1 -1
  1015. package/dist/plugin-sdk/session-B80NWO1m.js +1 -1
  1016. package/dist/plugin-sdk/session-BKPBr445.js +1 -1
  1017. package/dist/plugin-sdk/session-BQLjsBwL.cjs +1 -1
  1018. package/dist/plugin-sdk/session-BZHltxdM.js +1 -1
  1019. package/dist/plugin-sdk/session-Bt5yI-VW.cjs +1 -1
  1020. package/dist/plugin-sdk/session-CC1GqwiM.cjs +1 -1
  1021. package/dist/plugin-sdk/session-C_yqyp3P.cjs +1 -1
  1022. package/dist/plugin-sdk/session-ClISxvtJ.js +1 -1
  1023. package/dist/plugin-sdk/session-D4nn-nXX.cjs +1 -1
  1024. package/dist/plugin-sdk/session-DOA4CJgj.cjs +1 -1
  1025. package/dist/plugin-sdk/sessions-BwTjGneU.js +1 -1
  1026. package/dist/plugin-sdk/sessions-CJbvfO6m.cjs +1 -1
  1027. package/dist/plugin-sdk/signal.cjs +1 -1
  1028. package/dist/plugin-sdk/signal.js +1 -1
  1029. package/dist/plugin-sdk/skill-commands-5WGHyr3h.cjs +1 -1
  1030. package/dist/plugin-sdk/skill-commands-BZlF3g3o.js +1 -1
  1031. package/dist/plugin-sdk/skill-commands-BmBQSmNH.js +1 -1
  1032. package/dist/plugin-sdk/skill-commands-CD4GQXTR.cjs +1 -1
  1033. package/dist/plugin-sdk/skill-commands-CGOPOT-r.js +1 -1
  1034. package/dist/plugin-sdk/skill-commands-CM9ziCQY.cjs +1 -1
  1035. package/dist/plugin-sdk/skill-commands-CVsU5rEy.js +1 -1
  1036. package/dist/plugin-sdk/skill-commands-DNPxE-kc.cjs +1 -1
  1037. package/dist/plugin-sdk/skill-commands-DcgKCVDt.js +1 -1
  1038. package/dist/plugin-sdk/skill-commands-IAwkVeOe.js +1 -1
  1039. package/dist/plugin-sdk/skill-commands-ZyLkXbR_.cjs +1 -1
  1040. package/dist/plugin-sdk/skill-commands-xJWQthd5.cjs +1 -1
  1041. package/dist/plugin-sdk/slack.cjs +1 -1
  1042. package/dist/plugin-sdk/slack.js +1 -1
  1043. package/dist/plugin-sdk/synology-chat.cjs +1 -1
  1044. package/dist/plugin-sdk/synology-chat.js +1 -1
  1045. package/dist/plugin-sdk/tables-BZUVdTR-.cjs +1 -1
  1046. package/dist/plugin-sdk/tables-Bbodvj_s.cjs +1 -1
  1047. package/dist/plugin-sdk/tables-C5b2CtNw.cjs +1 -1
  1048. package/dist/plugin-sdk/tables-C6TX2QvW.js +1 -1
  1049. package/dist/plugin-sdk/tables-Cz5osenc.js +1 -1
  1050. package/dist/plugin-sdk/tables-DBSeZ07-.cjs +1 -1
  1051. package/dist/plugin-sdk/tables-DLSXY2-Q.js +1 -1
  1052. package/dist/plugin-sdk/tables-DQad-z2Z.cjs +1 -1
  1053. package/dist/plugin-sdk/tables-DYuLwL1d.js +1 -1
  1054. package/dist/plugin-sdk/tables-D_J655yN.js +1 -1
  1055. package/dist/plugin-sdk/tables-_vqK8P0T.js +1 -1
  1056. package/dist/plugin-sdk/tables-bSgb8OzP.cjs +1 -1
  1057. package/dist/plugin-sdk/target-errors-B-mJ4s4b.cjs +1 -1
  1058. package/dist/plugin-sdk/target-errors-BAHAHc8f.js +1 -1
  1059. package/dist/plugin-sdk/target-errors-BKruhz8r.js +1 -1
  1060. package/dist/plugin-sdk/target-errors-BbQBR5da.js +1 -1
  1061. package/dist/plugin-sdk/target-errors-BjgLCOTm.cjs +1 -1
  1062. package/dist/plugin-sdk/target-errors-CQbFkOae.js +1 -1
  1063. package/dist/plugin-sdk/target-errors-C_HYvghh.cjs +1 -1
  1064. package/dist/plugin-sdk/target-errors-CaaKhU6m.js +1 -1
  1065. package/dist/plugin-sdk/target-errors-QWTCk98R.cjs +1 -1
  1066. package/dist/plugin-sdk/target-errors-oh0u5K2w.cjs +1 -1
  1067. package/dist/plugin-sdk/targets-BSc11Uk8.cjs +1 -1
  1068. package/dist/plugin-sdk/targets-BSkiizml.js +1 -1
  1069. package/dist/plugin-sdk/targets-CBI0xqve.cjs +1 -1
  1070. package/dist/plugin-sdk/targets-CL5fYQi7.js +1 -1
  1071. package/dist/plugin-sdk/targets-CUZWrFrm.cjs +1 -1
  1072. package/dist/plugin-sdk/targets-CVEYTFPQ.js +1 -1
  1073. package/dist/plugin-sdk/targets-Co2R6K14.cjs +1 -1
  1074. package/dist/plugin-sdk/targets-CrkJkzil.js +1 -1
  1075. package/dist/plugin-sdk/targets-D-m7SV9x.cjs +1 -1
  1076. package/dist/plugin-sdk/targets-D8HTxbo4.js +1 -1
  1077. package/dist/plugin-sdk/targets-DcGNB9nk.cjs +1 -1
  1078. package/dist/plugin-sdk/targets-Dn9gDiEw.js +1 -1
  1079. package/dist/plugin-sdk/targets-X28mff4s.cjs +1 -1
  1080. package/dist/plugin-sdk/targets-uycXZ8vQ.js +1 -1
  1081. package/dist/plugin-sdk/telegram.cjs +1 -1
  1082. package/dist/plugin-sdk/telegram.js +1 -1
  1083. package/dist/plugin-sdk/test-utils.cjs +1 -1
  1084. package/dist/plugin-sdk/test-utils.js +1 -1
  1085. package/dist/plugin-sdk/tlon.cjs +1 -1
  1086. package/dist/plugin-sdk/tlon.js +1 -1
  1087. package/dist/plugin-sdk/tokens-AAdZjj0M.js +1 -1
  1088. package/dist/plugin-sdk/tokens-B20KNIDD.js +1 -1
  1089. package/dist/plugin-sdk/tokens-B8ys7Q2e.js +1 -1
  1090. package/dist/plugin-sdk/tokens-BPc1fcZ3.js +1 -1
  1091. package/dist/plugin-sdk/tokens-BqABmXSe.js +1 -1
  1092. package/dist/plugin-sdk/tokens-CXsPDJTr.cjs +1 -1
  1093. package/dist/plugin-sdk/tokens-CnB4dJmp.cjs +1 -1
  1094. package/dist/plugin-sdk/tokens-CytSl1X8.cjs +1 -1
  1095. package/dist/plugin-sdk/tokens-DgPZk2Uu.js +1 -1
  1096. package/dist/plugin-sdk/tokens-Dq2wDF3_.cjs +1 -1
  1097. package/dist/plugin-sdk/tokens-DtrljGtQ.cjs +1 -1
  1098. package/dist/plugin-sdk/tokens-g5KWvWhD.cjs +1 -1
  1099. package/dist/plugin-sdk/twitch.cjs +1 -1
  1100. package/dist/plugin-sdk/twitch.js +1 -1
  1101. package/dist/plugin-sdk/utils-BJtJR72k.js +1 -1
  1102. package/dist/plugin-sdk/utils-PPIvU9qw.cjs +1 -1
  1103. package/dist/plugin-sdk/voice-call.cjs +1 -1
  1104. package/dist/plugin-sdk/voice-call.js +1 -1
  1105. package/dist/plugin-sdk/web-B4A8zBP9.cjs +1 -1
  1106. package/dist/plugin-sdk/web-BKKx3jqf.cjs +1 -1
  1107. package/dist/plugin-sdk/web-BTBgpaEi.js +1 -1
  1108. package/dist/plugin-sdk/web-BfjArU7g.js +1 -1
  1109. package/dist/plugin-sdk/web-C7KhecaH.cjs +1 -1
  1110. package/dist/plugin-sdk/web-CFMrBQv7.js +1 -1
  1111. package/dist/plugin-sdk/web-CS0AvKLx.js +1 -1
  1112. package/dist/plugin-sdk/web-EfgEjg15.cjs +1 -1
  1113. package/dist/plugin-sdk/weixin.cjs +1 -1
  1114. package/dist/plugin-sdk/weixin.js +1 -1
  1115. package/dist/plugin-sdk/whatsapp-actions-6N2LIWVD.js +1 -1
  1116. package/dist/plugin-sdk/whatsapp-actions-BGEghean.js +1 -1
  1117. package/dist/plugin-sdk/whatsapp-actions-BP_fSzB9.cjs +1 -1
  1118. package/dist/plugin-sdk/whatsapp-actions-BSx6-Onq.cjs +1 -1
  1119. package/dist/plugin-sdk/whatsapp-actions-BZAMGDn8.cjs +1 -1
  1120. package/dist/plugin-sdk/whatsapp-actions-BvZMduqd.js +1 -1
  1121. package/dist/plugin-sdk/whatsapp-actions-CDUbwNdp.cjs +1 -1
  1122. package/dist/plugin-sdk/whatsapp-actions-DNVIKnqz.cjs +1 -1
  1123. package/dist/plugin-sdk/whatsapp-actions-DTVbVkOo.js +1 -1
  1124. package/dist/plugin-sdk/whatsapp-actions-DjMYqpSS.js +1 -1
  1125. package/dist/plugin-sdk/whatsapp-actions-P1DVqKhD.cjs +1 -1
  1126. package/dist/plugin-sdk/whatsapp-actions-shElOKKX.js +1 -1
  1127. package/dist/plugin-sdk/whatsapp.cjs +1 -1
  1128. package/dist/plugin-sdk/whatsapp.js +1 -1
  1129. package/dist/plugin-sdk/zalo.cjs +1 -1
  1130. package/dist/plugin-sdk/zalo.js +1 -1
  1131. package/dist/plugin-sdk/zalouser.cjs +1 -1
  1132. package/dist/plugin-sdk/zalouser.js +1 -1
  1133. package/dist/plugins-CYLrFT4h.js +1 -1
  1134. package/dist/plugins-DNlgeTTc.js +1 -1
  1135. package/dist/plugins-cli-BiV4FaGs.js +1 -1
  1136. package/dist/plugins-cli-C0PLRxT0.js +1 -1
  1137. package/dist/polls-BIVz6a4F.js +1 -1
  1138. package/dist/polls-Bh5wc9-6.js +1 -1
  1139. package/dist/polls-C_XSFz3d.js +1 -1
  1140. package/dist/polls-DKJOFSzJ.js +1 -1
  1141. package/dist/ports-Bjc9q__g.js +1 -1
  1142. package/dist/ports-Di2_MOUb.js +1 -1
  1143. package/dist/probe-auth-9RrZOStc.js +1 -1
  1144. package/dist/probe-auth-Cg6SAov9.js +1 -1
  1145. package/dist/profile-utils-CWmra1aY.js +1 -1
  1146. package/dist/program-CI--7377.js +1 -1
  1147. package/dist/program-context-CH9p6anW.js +1 -1
  1148. package/dist/program-context-Cu8fVR-O.js +1 -1
  1149. package/dist/progress-LNttnI-y.js +1 -1
  1150. package/dist/progress-d1m2sqR1.js +1 -1
  1151. package/dist/prompt-select-styled-CbTtKeIC.js +1 -1
  1152. package/dist/prompt-select-styled-sYEl0gMg.js +1 -1
  1153. package/dist/prompt-style-BThRSQJR.js +1 -1
  1154. package/dist/prompt-style-CXKekIBY.js +1 -1
  1155. package/dist/prompts-CMzglboN.js +1 -1
  1156. package/dist/prompts-wv-lfVrJ.js +1 -1
  1157. package/dist/provider-auth-helpers-C3OaF218.js +1 -1
  1158. package/dist/provider-auth-helpers-CZyb7LUg.js +1 -1
  1159. package/dist/provider-env-vars-D8p6Ohpj.js +1 -1
  1160. package/dist/provider-env-vars-Dt0Q29Su.js +1 -1
  1161. package/dist/proxy-env-BNhTHkd_.js +1 -1
  1162. package/dist/proxy-env-DcmW_urA.js +1 -1
  1163. package/dist/proxy-env-DrC3TIGh.js +1 -1
  1164. package/dist/proxy-env-FJr5nlvs.js +1 -1
  1165. package/dist/proxy-fetch-BADsUK4d.js +1 -1
  1166. package/dist/proxy-fetch-BZ9O8Dvj.js +1 -1
  1167. package/dist/proxy-fetch-DnjU1fEB.js +1 -1
  1168. package/dist/proxy-fetch-gWETR3cl.js +1 -1
  1169. package/dist/push-apns-kySzOiJr.js +1 -1
  1170. package/dist/push-apns-tM6G9LLm.js +1 -1
  1171. package/dist/pw-ai-B7YMA_4Q.js +1 -1
  1172. package/dist/pw-ai-C7peCONw.js +1 -1
  1173. package/dist/pw-ai-CojtT9WR.js +1 -1
  1174. package/dist/pw-ai-DWJWFzTA.js +1 -1
  1175. package/dist/qmd-manager-C_e04BNg.js +1 -1
  1176. package/dist/qmd-manager-DSQ_mDCl.js +1 -1
  1177. package/dist/qmd-manager-DcBYbt_V.js +1 -1
  1178. package/dist/qmd-manager-NLI0R6kp.js +1 -1
  1179. package/dist/qr-cli-DUR7oW0_.js +1 -1
  1180. package/dist/qr-cli-kb3ygh9I.js +1 -1
  1181. package/dist/query-expansion-0OxEb1Io.js +1 -1
  1182. package/dist/query-expansion-BUUx_oWg.js +1 -1
  1183. package/dist/query-expansion-r_iXkNzt.js +1 -1
  1184. package/dist/reaction-level-DVPHL14p.js +1 -1
  1185. package/dist/reaction-message-id-BEEe7X3D.js +1 -1
  1186. package/dist/read-only-account-inspect-DEnPVHTo.js +1 -1
  1187. package/dist/redact-3_CiXMY6.js +1 -1
  1188. package/dist/redact-CnRxK70G.js +1 -1
  1189. package/dist/register.agent-BwmE1VD-.js +1 -1
  1190. package/dist/register.agent-D1hQi_68.js +1 -1
  1191. package/dist/register.backup-8s5jgnHQ.js +1 -1
  1192. package/dist/register.backup-CAiwLaIW.js +1 -1
  1193. package/dist/register.configure-BsTw4XfK.js +1 -1
  1194. package/dist/register.configure-DxR84Ot6.js +1 -1
  1195. package/dist/register.maintenance-3nzWAo_a.js +1 -1
  1196. package/dist/register.maintenance-DxKGQ9Jo.js +1 -1
  1197. package/dist/register.message-Bk1pHVSK.js +1 -1
  1198. package/dist/register.message-PcFtBR0-.js +1 -1
  1199. package/dist/register.onboard-AWxbhU7j.js +1 -1
  1200. package/dist/register.onboard-BTOZN8ro.js +1 -1
  1201. package/dist/register.setup-B-e1qIbc.js +1 -1
  1202. package/dist/register.setup-CweJJdt8.js +1 -1
  1203. package/dist/register.status-health-sessions-B1R_nl6P.js +1 -1
  1204. package/dist/register.status-health-sessions-CWNLXpAn.js +1 -1
  1205. package/dist/register.subclis-C0VQ_HfZ.js +1 -1
  1206. package/dist/registry-BptzrW8D.js +1 -1
  1207. package/dist/registry-hFAtCSWG.js +1 -1
  1208. package/dist/render-BXEUPIHe.js +1 -1
  1209. package/dist/render-CBsnn-2A.js +1 -1
  1210. package/dist/render-D8OWO2hT.js +1 -1
  1211. package/dist/render-DrrPmnMI.js +1 -1
  1212. package/dist/reply-r9KtzgpM.js +1 -1
  1213. package/dist/restart-CTfuVGfA.js +1 -1
  1214. package/dist/rpc-BQXfCyCw.js +1 -1
  1215. package/dist/rpc-CcrILVsV.js +1 -1
  1216. package/dist/run-main-CuQQyoU3.js +1 -1
  1217. package/dist/runtime-BlsMYeaw.js +1 -1
  1218. package/dist/runtime-DLxfCs7F.js +1 -1
  1219. package/dist/runtime-guard-DFYBaYZS.js +1 -1
  1220. package/dist/runtime-guard-DX2Ie4ri.js +1 -1
  1221. package/dist/runtime-status-CqFBmdRd.js +1 -1
  1222. package/dist/runtime-status-DszMjvJK.js +1 -1
  1223. package/dist/runtime-web-tools-BWv0X5qp.js +1 -1
  1224. package/dist/runtime-web-tools-CCIXUISf.js +1 -1
  1225. package/dist/sandbox-cli-CxluKLFV.js +1 -1
  1226. package/dist/sandbox-cli-xCX6FV4Z.js +1 -1
  1227. package/dist/scan-paths-C13EseXp.js +1 -1
  1228. package/dist/scan-paths-CWtvWW40.js +1 -1
  1229. package/dist/search-manager-KMRzwyPH.js +1 -1
  1230. package/dist/secret-file-C7JffiM_.js +1 -1
  1231. package/dist/secret-file-D60EFEOe.js +1 -1
  1232. package/dist/secret-file-DuWm26jS.js +1 -1
  1233. package/dist/secrets-cli-Be6OBr6Q.js +1 -1
  1234. package/dist/secrets-cli-DmDZiX17.js +1 -1
  1235. package/dist/secure-random-D7JQgiK-.js +1 -1
  1236. package/dist/security-cli-CllLwpQ-.js +1 -1
  1237. package/dist/security-cli-DcA9keUK.js +1 -1
  1238. package/dist/send-8rJCpsDu.js +1 -1
  1239. package/dist/send-BJjoLBo3.js +1 -1
  1240. package/dist/send-BOxuQt9L.js +1 -1
  1241. package/dist/send-BPfl_1It.js +1 -1
  1242. package/dist/send-BdS6jUBa.js +1 -1
  1243. package/dist/send-BeZJ1zbp.js +1 -1
  1244. package/dist/send-BkZ8dWQV2.js +1 -1
  1245. package/dist/send-CDAeI9xB2.js +1 -1
  1246. package/dist/send-CgeRzkWS.js +1 -1
  1247. package/dist/send-CiTZ4p2t.js +1 -1
  1248. package/dist/send-D0y-r_hg2.js +1 -1
  1249. package/dist/send-DIw8ExHc.js +1 -1
  1250. package/dist/send-DRm6AFp-.js +1 -1
  1251. package/dist/send-DS5Quwb7.js +1 -1
  1252. package/dist/send-DVmPgxm7.js +1 -1
  1253. package/dist/send-Ds5sy22D.js +1 -1
  1254. package/dist/send-DvGzdoKK.js +1 -1
  1255. package/dist/send-OVet2uKx.js +1 -1
  1256. package/dist/send-YPQFx-fV.js +1 -1
  1257. package/dist/send-e2ppdA_R.js +1 -1
  1258. package/dist/server-Dzqb5Tau.js +1 -1
  1259. package/dist/server-node-events-B2irOUJ_.js +1 -1
  1260. package/dist/server-node-events-DSr6P0VG.js +1 -1
  1261. package/dist/server-w7sUBJEA.js +1 -1
  1262. package/dist/service-BtB9epJk.js +1 -1
  1263. package/dist/service-DZ9EbS15.js +1 -1
  1264. package/dist/session-BYYOduc1.js +1 -1
  1265. package/dist/session-B_qrXLsR.js +1 -1
  1266. package/dist/session-Be0RV2V1.js +1 -1
  1267. package/dist/session-bk3gFwO4.js +1 -1
  1268. package/dist/session-cost-usage-BgqKixv0.js +1 -1
  1269. package/dist/session-cost-usage-CHtVgnE8.js +1 -1
  1270. package/dist/session-key-C7F_iqYg.js +1 -1
  1271. package/dist/session-key-D3P0tf5P.js +1 -1
  1272. package/dist/session-utils-CrR0wD3W.js +1 -1
  1273. package/dist/sessions-BvTGb3rW.js +1 -1
  1274. package/dist/shared-9x5sqYRb.js +1 -1
  1275. package/dist/shared-BKWhOp64.js +1 -1
  1276. package/dist/shared-BV-hfJ3h.js +1 -1
  1277. package/dist/skill-commands-C59b8Yso.js +1 -1
  1278. package/dist/skill-commands-CqIEajsA.js +1 -1
  1279. package/dist/skill-commands-F5NFH0NR.js +1 -1
  1280. package/dist/skill-commands-O39uSj-k.js +1 -1
  1281. package/dist/skill-scanner-CUUF3Fvo.js +1 -1
  1282. package/dist/skill-scanner-CkxXNioD.js +1 -1
  1283. package/dist/skills-CKTicUKS.js +1 -1
  1284. package/dist/skills-DHbOKEGc.js +1 -1
  1285. package/dist/skills-cli-CZD1Ng18.js +1 -1
  1286. package/dist/skills-cli-nj0w4fe0.js +1 -1
  1287. package/dist/skills-install-D0I6c17J.js +1 -1
  1288. package/dist/skills-install-XHpqMBWl.js +1 -1
  1289. package/dist/skills-status-BWIugRCz.js +1 -1
  1290. package/dist/skills-status-DswSl5aD.js +1 -1
  1291. package/dist/sqlite-CILF3z9U.js +1 -1
  1292. package/dist/stagger-DmFYysrJ.js +1 -1
  1293. package/dist/stagger-DxzgG2jd.js +1 -1
  1294. package/dist/status-DKB9gdSp.js +1 -1
  1295. package/dist/status-DgRrUxyg.js +1 -1
  1296. package/dist/status-YZD9V9xi.js +1 -1
  1297. package/dist/status-isxcm8Xz.js +1 -1
  1298. package/dist/status.update-B_8Gumuc.js +1 -1
  1299. package/dist/status.update-Cf2e-l9d.js +1 -1
  1300. package/dist/string-normalization-BrUPaXaM.js +1 -1
  1301. package/dist/string-normalization-DJT5zuUF.js +1 -1
  1302. package/dist/subsystem-BLbY429l.js +1 -1
  1303. package/dist/subsystem-Bc2XrjUz.js +1 -1
  1304. package/dist/subsystem-C5XF2Fy5.js +1 -1
  1305. package/dist/system-cli-CRs3TOTw.js +1 -1
  1306. package/dist/system-cli-GyoLZQpj.js +1 -1
  1307. package/dist/system-run-command-DCzdgYyb.js +1 -1
  1308. package/dist/system-run-command-FCk9hSMO.js +1 -1
  1309. package/dist/systemd-D7odsu4K.js +1 -1
  1310. package/dist/systemd-DbevZh65.js +1 -1
  1311. package/dist/systemd-hints-lXpMy-kY.js +1 -1
  1312. package/dist/systemd-hints-x1lJAOxS.js +1 -1
  1313. package/dist/systemd-linger-C2MJD6KG.js +1 -1
  1314. package/dist/systemd-linger-cWKbFNpu.js +1 -1
  1315. package/dist/table-CR7TFMew.js +1 -1
  1316. package/dist/table-CY440fI1.js +1 -1
  1317. package/dist/tables-3Rjt6nwZ.js +1 -1
  1318. package/dist/tables-B9wFKQvT.js +1 -1
  1319. package/dist/tables-D1pcaye7.js +1 -1
  1320. package/dist/tables-h7y1Jhf4.js +1 -1
  1321. package/dist/target-errors-CUQcIty1.js +1 -1
  1322. package/dist/target-errors-D55sWZ4E.js +1 -1
  1323. package/dist/target-errors-DH0aw-m5.js +1 -1
  1324. package/dist/target-errors-LuLROpta.js +1 -1
  1325. package/dist/targets-4EaxWBal.js +1 -1
  1326. package/dist/targets-BJTo7bqu.js +1 -1
  1327. package/dist/targets-BYVMrXDf.js +1 -1
  1328. package/dist/targets-Bq6rS6-Z.js +1 -1
  1329. package/dist/targets-CL5fYQi7.js +1 -1
  1330. package/dist/targets-fozeWOOg.js +1 -1
  1331. package/dist/targets-m_41k_Mv.js +1 -1
  1332. package/dist/telegram/audit.js +1 -1
  1333. package/dist/text-format-CvrvBBre.js +1 -1
  1334. package/dist/text-format-DEWK6oCT.js +1 -1
  1335. package/dist/token-DnTmiyJu.js +1 -1
  1336. package/dist/tokens-B2fq-rL6.js +1 -1
  1337. package/dist/tokens-CL2fSjGl.js +1 -1
  1338. package/dist/tokens-DRM8vzJx.js +1 -1
  1339. package/dist/tokens-XGbQGn67.js +1 -1
  1340. package/dist/tool-display-DJDtttQg.js +1 -1
  1341. package/dist/tool-display-DjuSUUbH.js +1 -1
  1342. package/dist/tui-CqEb9hrT.js +1 -1
  1343. package/dist/tui-DdZ8SpNW.js +1 -1
  1344. package/dist/tui-cli-Bj0okLCf.js +1 -1
  1345. package/dist/tui-cli-CYvBshyB.js +1 -1
  1346. package/dist/types.secrets-C-5U96pc.js +1 -1
  1347. package/dist/types.secrets-D4tbc3Wq.js +1 -1
  1348. package/dist/update-BGrxUIyz.js +1 -1
  1349. package/dist/update-CwTy5DPl.js +1 -1
  1350. package/dist/update-cli-lciKU8_L.js +1 -1
  1351. package/dist/update-cli-xb0jHjE8.js +1 -1
  1352. package/dist/update-runner-8Hto6X-M.js +1 -1
  1353. package/dist/update-runner-LVJcy569.js +1 -1
  1354. package/dist/usage-format-BWD8FJFL.js +1 -1
  1355. package/dist/usage-format-yPwal8Iz.js +1 -1
  1356. package/dist/utils-CGdo13HV.js +1 -1
  1357. package/dist/utils-D3t-vPka.js +1 -1
  1358. package/dist/utils-R-mFyVJi.js +1 -1
  1359. package/dist/utils-UGOV_184.js +1 -1
  1360. package/dist/version-q3SkUw2K.js +1 -1
  1361. package/dist/warning-filter.js +1 -1
  1362. package/dist/web-Bfz_qlYe.js +1 -1
  1363. package/dist/web-ClbIohhf.js +1 -1
  1364. package/dist/webhooks-cli-DKfKihmJ.js +1 -1
  1365. package/dist/webhooks-cli-LU2ADRQp.js +1 -1
  1366. package/dist/whatsapp-actions-1TJ8dlv0.js +1 -1
  1367. package/dist/whatsapp-actions-CuDiuPGa.js +1 -1
  1368. package/dist/whatsapp-actions-DkLDOIk1.js +1 -1
  1369. package/dist/whatsapp-actions-EnduXWui.js +1 -1
  1370. package/dist/widearea-dns-BDx7vkV2.js +1 -1
  1371. package/dist/widearea-dns-BFjqKXu_.js +1 -1
  1372. package/dist/windows-spawn-7oINn5ao.js +1 -1
  1373. package/dist/windows-spawn-AB7ItGAE.js +1 -1
  1374. package/dist/with-timeout-WveKxvFV.js +1 -1
  1375. package/dist/with-timeout-c1CzdShT.js +1 -1
  1376. package/dist/workspace-B0ZQeHXg.js +1 -1
  1377. package/dist/workspace-C45T1Cxg.js +1 -1
  1378. package/dist/workspace-dirs-A8Vib9_B.js +1 -1
  1379. package/dist/workspace-dirs-BhF1Dzxt.js +1 -1
  1380. package/dist/workspace-xNEpaJvu.js +1 -1
  1381. package/dist/wsl-DHxB2Ew_.js +1 -1
  1382. package/dist/wsl-Ok7GaSJ6.js +1 -1
  1383. package/extensions/memory-core/index.js +1 -0
  1384. package/extensions/memory-core/package.json +1 -1
  1385. package/extensions/openclaw-telemetry-galileo-embedded/index.js +4 -0
  1386. package/extensions/openclaw-telemetry-galileo-embedded/package.json +2 -2
  1387. package/extensions/openclaw-telemetry-galileo-embedded/src/service.js +13 -0
  1388. package/extensions/openclaw-weixin/index.js +1 -0
  1389. package/extensions/openclaw-weixin/package.json +3 -3
  1390. package/extensions/openclaw-weixin/src/api/api.js +1 -0
  1391. package/extensions/openclaw-weixin/src/api/config-cache.js +1 -0
  1392. package/extensions/openclaw-weixin/src/api/session-guard.js +1 -0
  1393. package/extensions/openclaw-weixin/src/api/types.js +1 -0
  1394. package/extensions/openclaw-weixin/src/auth/accounts.js +1 -0
  1395. package/extensions/openclaw-weixin/src/auth/login-qr.js +11 -0
  1396. package/extensions/openclaw-weixin/src/auth/pairing.js +1 -0
  1397. package/extensions/openclaw-weixin/src/cdn/aes-ecb.js +1 -0
  1398. package/extensions/openclaw-weixin/src/cdn/cdn-upload.js +1 -0
  1399. package/extensions/openclaw-weixin/src/cdn/cdn-url.js +1 -0
  1400. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.js +1 -0
  1401. package/extensions/openclaw-weixin/src/cdn/upload.js +1 -0
  1402. package/extensions/openclaw-weixin/src/channel.js +6 -0
  1403. package/extensions/openclaw-weixin/src/config/config-schema.js +1 -0
  1404. package/extensions/openclaw-weixin/src/log-upload.js +4 -0
  1405. package/extensions/openclaw-weixin/src/media/media-download.js +1 -0
  1406. package/extensions/openclaw-weixin/src/media/mime.js +1 -0
  1407. package/extensions/openclaw-weixin/src/media/silk-transcode.js +1 -0
  1408. package/extensions/openclaw-weixin/src/messaging/debug-mode.js +1 -0
  1409. package/extensions/openclaw-weixin/src/messaging/error-notice.js +1 -0
  1410. package/extensions/openclaw-weixin/src/messaging/inbound.js +2 -0
  1411. package/extensions/openclaw-weixin/src/messaging/process-message.js +3 -0
  1412. package/extensions/openclaw-weixin/src/messaging/send-media.js +1 -0
  1413. package/extensions/openclaw-weixin/src/messaging/send.js +1 -0
  1414. package/extensions/openclaw-weixin/src/messaging/slash-commands.js +2 -0
  1415. package/extensions/openclaw-weixin/src/monitor/monitor.js +1 -0
  1416. package/extensions/openclaw-weixin/src/runtime.js +1 -0
  1417. package/extensions/openclaw-weixin/src/storage/state-dir.js +1 -0
  1418. package/extensions/openclaw-weixin/src/storage/sync-buf.js +1 -0
  1419. package/extensions/openclaw-weixin/src/util/logger.js +2 -0
  1420. package/extensions/openclaw-weixin/src/util/random.js +1 -0
  1421. package/extensions/openclaw-weixin/src/util/redact.js +1 -0
  1422. package/extensions/qbagent-mcp-server-x5uselocal-node/index.js +1 -0
  1423. package/extensions/qbagent-mcp-server-x5uselocal-node/package.json +1 -1
  1424. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.js +1 -0
  1425. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.js +1 -0
  1426. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.js +1 -0
  1427. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.js +1 -0
  1428. package/package.json +1 -1
  1429. package/extensions/memory-core/index.ts +0 -38
  1430. package/extensions/openclaw-telemetry-galileo-embedded/index.ts +0 -663
  1431. package/extensions/openclaw-telemetry-galileo-embedded/src/service.ts +0 -1590
  1432. package/extensions/openclaw-weixin/index.ts +0 -26
  1433. package/extensions/openclaw-weixin/src/api/api.ts +0 -238
  1434. package/extensions/openclaw-weixin/src/api/config-cache.ts +0 -79
  1435. package/extensions/openclaw-weixin/src/api/session-guard.ts +0 -58
  1436. package/extensions/openclaw-weixin/src/api/types.ts +0 -222
  1437. package/extensions/openclaw-weixin/src/auth/accounts.ts +0 -363
  1438. package/extensions/openclaw-weixin/src/auth/login-qr.ts +0 -344
  1439. package/extensions/openclaw-weixin/src/auth/pairing.ts +0 -120
  1440. package/extensions/openclaw-weixin/src/cdn/aes-ecb.ts +0 -21
  1441. package/extensions/openclaw-weixin/src/cdn/cdn-upload.ts +0 -75
  1442. package/extensions/openclaw-weixin/src/cdn/cdn-url.ts +0 -17
  1443. package/extensions/openclaw-weixin/src/cdn/pic-decrypt.ts +0 -85
  1444. package/extensions/openclaw-weixin/src/cdn/upload.ts +0 -154
  1445. package/extensions/openclaw-weixin/src/channel.ts +0 -483
  1446. package/extensions/openclaw-weixin/src/config/config-schema.ts +0 -21
  1447. package/extensions/openclaw-weixin/src/log-upload.ts +0 -129
  1448. package/extensions/openclaw-weixin/src/media/media-download.ts +0 -138
  1449. package/extensions/openclaw-weixin/src/media/mime.ts +0 -76
  1450. package/extensions/openclaw-weixin/src/media/silk-transcode.ts +0 -74
  1451. package/extensions/openclaw-weixin/src/messaging/debug-mode.ts +0 -68
  1452. package/extensions/openclaw-weixin/src/messaging/error-notice.ts +0 -36
  1453. package/extensions/openclaw-weixin/src/messaging/inbound.ts +0 -283
  1454. package/extensions/openclaw-weixin/src/messaging/process-message.ts +0 -488
  1455. package/extensions/openclaw-weixin/src/messaging/send-media.ts +0 -76
  1456. package/extensions/openclaw-weixin/src/messaging/send.ts +0 -267
  1457. package/extensions/openclaw-weixin/src/messaging/slash-commands.ts +0 -105
  1458. package/extensions/openclaw-weixin/src/monitor/monitor.ts +0 -225
  1459. package/extensions/openclaw-weixin/src/runtime.ts +0 -67
  1460. package/extensions/openclaw-weixin/src/storage/state-dir.ts +0 -11
  1461. package/extensions/openclaw-weixin/src/storage/sync-buf.ts +0 -79
  1462. package/extensions/openclaw-weixin/src/util/logger.ts +0 -146
  1463. package/extensions/openclaw-weixin/src/util/random.ts +0 -17
  1464. package/extensions/openclaw-weixin/src/util/redact.ts +0 -57
  1465. package/extensions/openclaw-weixin/src/vendor.d.ts +0 -21
  1466. package/extensions/qbagent-mcp-server-x5uselocal-node/index.ts +0 -140
  1467. package/extensions/qbagent-mcp-server-x5uselocal-node/src/browser-use-tool.ts +0 -157
  1468. package/extensions/qbagent-mcp-server-x5uselocal-node/src/server.ts +0 -135
  1469. package/extensions/qbagent-mcp-server-x5uselocal-node/src/tools.ts +0 -205
  1470. package/extensions/qbagent-mcp-server-x5uselocal-node/src/websocket-manager.ts +0 -351
@@ -62,4 +62,4 @@ stat -c "%F|%s|%Y" -- "$2"`,args:[t.canonicalParentPath,t.basename],allowFailure
62
62
  }`))return LB({[e]:t})-4;let r=n.slice(2,-2);return Buffer.byteLength(r,`utf-8`)}function zB(e){let t=new Map;for(let[n,r]of Object.entries(e))t.set(n,RB(n,r));return t}function BB(e){if(!e)return 0;let t=e.updatedAt;return Number.isFinite(t)?t:0}function VB(e){let t=new Map;for(let n of Object.values(e)){let e=n?.sessionId;e&&t.set(e,(t.get(e)??0)+1)}return t}function HB(e){if(!e.entry.sessionId)return null;try{let t=bn(e.entry.sessionId,e.entry,{sessionsDir:e.sessionsDir}),n=IB(e.sessionsDir),r=IB(t),i=k.relative(n,r);return!i||i.startsWith(`..`)||k.isAbsolute(i)?null:r}catch{return null}}function UB(e){let t=new Set;for(let n of Object.values(e.store)){let r=HB({sessionsDir:e.sessionsDir,entry:n});r&&t.add(IB(r))}return t}async function WB(e){let t=await A.promises.readdir(e,{withFileTypes:!0}).catch(()=>[]),n=[];for(let r of t){if(!r.isFile())continue;let t=k.join(e,r.name),i=await A.promises.stat(t).catch(()=>null);i?.isFile()&&n.push({path:t,canonicalPath:IB(t),name:r.name,size:i.size,mtimeMs:i.mtimeMs})}return n}async function GB(e){let t=await A.promises.stat(e).catch(()=>null);return t?.isFile()?(await A.promises.rm(e,{force:!0}).catch(()=>void 0),t.size):0}async function KB(e){let t=k.resolve(e.filePath),n=e.canonicalPath??IB(t);if(e.dryRun){if(e.simulatedRemovedPaths.has(n))return 0;let t=e.fileSizesByPath.get(n)??0;return t<=0?0:(e.simulatedRemovedPaths.add(n),t)}return GB(t)}async function qB(e){let t=e.maintenance.maxDiskBytes,n=e.maintenance.highWaterBytes;if(t==null||n==null)return null;let r=e.log??FB,i=e.dryRun===!0,a=k.dirname(e.storePath),o=await WB(a),s=new Map(o.map(e=>[e.canonicalPath,e.size])),c=new Set,l=IB(e.storePath),u=o.find(e=>e.canonicalPath===l),d=LB(e.store),f=o.reduce((e,t)=>e+t.size,0)-(u?.size??0)+d,p=f;if(f<=t)return{totalBytesBefore:p,totalBytesAfter:f,removedFiles:0,removedEntries:0,freedBytes:0,maxBytes:t,highWaterBytes:n,overBudget:!1};if(e.warnOnly)return r.warn(`session disk budget exceeded (warn-only mode)`,{sessionsDir:a,totalBytes:f,maxBytes:t,highWaterBytes:n}),{totalBytesBefore:p,totalBytesAfter:f,removedFiles:0,removedEntries:0,freedBytes:0,maxBytes:t,highWaterBytes:n,overBudget:!0};let m=0,h=0,g=0,_=UB({sessionsDir:a,store:e.store}),v=o.filter(e=>vL(e.name)||yL(e.name)&&!_.has(e.canonicalPath)).toSorted((e,t)=>e.mtimeMs-t.mtimeMs);for(let e of v){if(f<=n)break;let t=await KB({filePath:e.path,canonicalPath:e.canonicalPath,dryRun:i,fileSizesByPath:s,simulatedRemovedPaths:c});t<=0||(f-=t,g+=t,m+=1)}if(f>n){let t=e.activeSessionKey?.trim().toLowerCase(),r=VB(e.store),o=zB(e.store),l=Object.keys(e.store).toSorted((t,n)=>BB(e.store[t])-BB(e.store[n]));for(let u of l){if(f<=n)break;if(t&&u.trim().toLowerCase()===t)continue;let l=e.store[u];if(!l)continue;let p=d;delete e.store[u];let _=o.get(u);o.delete(u),d=typeof _==`number`&&Number.isFinite(_)&&_>=0?Math.max(2,d-(_+2)):LB(e.store),f+=d-p,h+=1;let v=l.sessionId;if(!v)continue;let y=(r.get(v)??1)-1;if(y>0){r.set(v,y);continue}r.delete(v);let b=HB({sessionsDir:a,entry:l});if(!b)continue;let x=await KB({filePath:b,dryRun:i,fileSizesByPath:s,simulatedRemovedPaths:c});x<=0||(f-=x,g+=x,m+=1)}}return i||(f>n?r.warn(`session disk budget still above high-water target after cleanup`,{sessionsDir:a,totalBytes:f,maxBytes:t,highWaterBytes:n,removedFiles:m,removedEntries:h}):(m>0||h>0)&&r.info(`applied session disk budget cleanup`,{sessionsDir:a,totalBytesBefore:p,totalBytesAfter:f,maxBytes:t,highWaterBytes:n,removedFiles:m,removedEntries:h})),{totalBytesBefore:p,totalBytesAfter:f,removedFiles:m,removedEntries:h,freedBytes:g,maxBytes:t,highWaterBytes:n,overBudget:!0}}const JB=new Map,YB=new Map;function XB(e){JB.delete(e),YB.delete(e)}function ZB(e){return YB.get(e)}function QB(e,t){if(t===void 0){YB.delete(e);return}YB.set(e,t)}function $B(e){JB.delete(e)}function eV(e){let t=JB.get(e.storePath);return t?Date.now()-t.loadedAt>e.ttlMs||e.mtimeMs!==t.mtimeMs||e.sizeBytes!==t.sizeBytes?(XB(e.storePath),null):structuredClone(t.store):null}function tV(e){JB.set(e.storePath,{store:structuredClone(e.store),loadedAt:Date.now(),storePath:e.storePath,mtimeMs:e.mtimeMs,sizeBytes:e.sizeBytes,serialized:e.serialized}),e.serialized!==void 0&&YB.set(e.storePath,e.serialized)}const nV=s(`sessions/store`),rV=720*60*60*1e3,iV=10485760;function aV(e){let t=e?.pruneAfter??e?.pruneDays;if(t==null||t===``)return rV;try{return gt(String(t).trim(),{defaultUnit:`d`})}catch{return rV}}function oV(e){let t=e?.rotateBytes;if(t==null||t===``)return iV;try{return ig(String(t).trim(),{defaultUnit:`b`})}catch{return iV}}function sV(e,t){let n=e?.resetArchiveRetention;if(n===!1)return null;if(n==null||n===``)return t;try{return gt(String(n).trim(),{defaultUnit:`d`})}catch{return t}}function cV(e){let t=e?.maxDiskBytes;if(t==null||t===``)return null;try{return ig(String(t).trim(),{defaultUnit:`b`})}catch{return null}}function lV(e,t){let n=()=>t==null?null:t<=0?0:Math.max(1,Math.min(t,Math.floor(t*.8)));if(t==null)return null;let r=e?.highWaterBytes;if(r==null||r===``)return n();try{let e=ig(String(r).trim(),{defaultUnit:`b`});return Math.min(e,t)}catch{return n()}}function uV(){let e;try{e=H().session?.maintenance}catch{}let t=aV(e),n=cV(e);return{mode:e?.mode??`warn`,pruneAfterMs:t,maxEntries:e?.maxEntries??500,rotateBytes:oV(e),resetArchiveRetentionMs:sV(e,t),maxDiskBytes:n,highWaterBytes:lV(e,n)}}function dV(e,t,n={}){let r=t??uV().pruneAfterMs,i=Date.now()-r,a=0;for(let[t,r]of Object.entries(e))r?.updatedAt!=null&&r.updatedAt<i&&(n.onPruned?.({key:t,entry:r}),delete e[t],a++);return a>0&&n.log!==!1&&nV.info(`pruned stale session entries`,{pruned:a,maxAgeMs:r}),a}function fV(e){return e?.updatedAt??-1/0}function pV(e){let t=e.activeSessionKey.trim();if(!t)return null;let n=e.store[t];if(!n)return null;let r=(e.nowMs??Date.now())-e.pruneAfterMs,i=n.updatedAt==null?!1:n.updatedAt<r,a=Object.keys(e.store),o=a.length>e.maxEntries&&a.toSorted((t,n)=>fV(e.store[n])-fV(e.store[t])).slice(e.maxEntries).includes(t);return!i&&!o?null:{activeSessionKey:t,activeUpdatedAt:n.updatedAt,totalEntries:a.length,pruneAfterMs:e.pruneAfterMs,maxEntries:e.maxEntries,wouldPrune:i,wouldCap:o}}function mV(e,t,n={}){let r=t??uV().maxEntries,i=Object.keys(e);if(i.length<=r)return 0;let a=i.toSorted((t,n)=>{let r=fV(e[t]);return fV(e[n])-r}).slice(r);for(let t of a){let r=e[t];r&&n.onCapped?.({key:t,entry:r}),delete e[t]}return n.log!==!1&&nV.info(`capped session entry count`,{removed:a.length,maxEntries:r}),a.length}async function hV(e){try{return(await A.promises.stat(e)).size}catch{return null}}async function gV(e,t){let n=t??uV().rotateBytes,r=await hV(e);if(r==null||r<=n)return!1;let i=`${e}.bak.${Date.now()}`;try{await A.promises.rename(e,i),nV.info(`rotated session store file`,{backupPath:k.basename(i),sizeBytes:r})}catch{return!1}try{let t=k.dirname(e),n=k.basename(e),r=(await A.promises.readdir(t)).filter(e=>e.startsWith(`${n}.bak.`)).toSorted().toReversed();if(r.length>3){let e=r.slice(3);for(let n of e)await A.promises.unlink(k.join(t,n)).catch(()=>void 0);nV.info(`cleaned up old session store backups`,{deleted:e.length})}}catch{}return!0}function _V(e){for(let t of Object.values(e)){if(!t||typeof t!=`object`)continue;let e=t;typeof e.channel!=`string`&&typeof e.provider==`string`&&(e.channel=e.provider,delete e.provider),typeof e.lastChannel!=`string`&&typeof e.lastProvider==`string`&&(e.lastChannel=e.lastProvider,delete e.lastProvider),typeof e.groupChannel!=`string`&&typeof e.room==`string`?(e.groupChannel=e.room,delete e.room):`room`in e&&delete e.room}}const vV=s(`sessions/store`);function yV(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function bV(){return MB({envValue:process.env.OPENCLAW_SESSION_CACHE_TTL_MS,defaultTtlMs:45e3})}function xV(){return NB(bV())}function SV(e){let t=OB({channel:e.channel,lastChannel:e.lastChannel,lastTo:e.lastTo,lastAccountId:e.lastAccountId,lastThreadId:e.lastThreadId??e.deliveryContext?.threadId??e.origin?.threadId,deliveryContext:e.deliveryContext}),n=t.deliveryContext,r=(e.deliveryContext?.channel??void 0)===n?.channel&&(e.deliveryContext?.to??void 0)===n?.to&&(e.deliveryContext?.accountId??void 0)===n?.accountId&&(e.deliveryContext?.threadId??void 0)===n?.threadId,i=e.lastChannel===t.lastChannel&&e.lastTo===t.lastTo&&e.lastAccountId===t.lastAccountId&&e.lastThreadId===t.lastThreadId;return r&&i?e:{...e,deliveryContext:n,lastChannel:t.lastChannel,lastTo:t.lastTo,lastAccountId:t.lastAccountId,lastThreadId:t.lastThreadId}}function CV(e){if(!e||e.threadId==null)return e;let t={...e};return delete t.threadId,t}function wV(e){return e.trim().toLowerCase()}function TV(e){let t=e.sessionKey.trim(),n=wV(t),r=new Set;t!==n&&Object.prototype.hasOwnProperty.call(e.store,t)&&r.add(t);let i=e.store[n]??(r.size>0?e.store[t]:void 0),a=i?.updatedAt??0;for(let[t,o]of Object.entries(e.store)){if(t===n||t.toLowerCase()!==n)continue;r.add(t);let e=o?.updatedAt??0;(!i||e>a)&&(i=o,a=e)}return{normalizedKey:n,existing:i,legacyKeys:[...r]}}function EV(e){for(let[t,n]of Object.entries(e)){if(!n)continue;let r=SV(uz(n));r!==n&&(e[t]=r)}}function DV(e,t={}){if(!t.skipCache&&xV()){let t=PB(e),n=eV({storePath:e,ttlMs:bV(),mtimeMs:t?.mtimeMs,sizeBytes:t?.sizeBytes});if(n)return n}let n={},r=PB(e),i=r?.mtimeMs,a,o=process.platform===`win32`?3:1,s=o>1?new Int32Array(new SharedArrayBuffer(4)):void 0;for(let t=0;t<o;t++)try{let c=A.readFileSync(e,`utf-8`);if(c.length===0&&t<o-1){Atomics.wait(s,0,0,50);continue}let l=JSON.parse(c);yV(l)&&(n=l,a=c),r=PB(e)??r,i=r?.mtimeMs;break}catch{if(t<o-1){Atomics.wait(s,0,0,50);continue}}return a===void 0?QB(e,void 0):QB(e,a),_V(n),!t.skipCache&&xV()&&tV({storePath:e,store:n,mtimeMs:i,sizeBytes:r?.sizeBytes,serialized:a}),structuredClone(n)}function OV(e){try{return TV({store:DV(e.storePath),sessionKey:e.sessionKey}).existing?.updatedAt}catch{return}}function kV(e){let t=PB(e.storePath);if(QB(e.storePath,e.serialized),!xV()){$B(e.storePath);return}tV({storePath:e.storePath,store:e.store,mtimeMs:t?.mtimeMs,sizeBytes:t?.sizeBytes,serialized:e.serialized})}async function AV(e,t,n){if(EV(t),!n?.skipMaintenance){let r={...uV(),...n?.maintenanceOverride},i=r.mode===`warn`,a=Object.keys(t).length;if(i){let i=n?.activeSessionKey?.trim();if(i){let e=pV({store:t,activeSessionKey:i,pruneAfterMs:r.pruneAfterMs,maxEntries:r.maxEntries});e&&(vV.warn(`session maintenance would evict active session; skipping enforcement`,{activeSessionKey:e.activeSessionKey,wouldPrune:e.wouldPrune,wouldCap:e.wouldCap,pruneAfterMs:e.pruneAfterMs,maxEntries:e.maxEntries}),await n?.onWarn?.(e))}let o=await qB({store:t,storePath:e,activeSessionKey:n?.activeSessionKey,maintenance:r,warnOnly:!0,log:vV});await n?.onMaintenanceApplied?.({mode:r.mode,beforeCount:a,afterCount:Object.keys(t).length,pruned:0,capped:0,diskBudget:o})}else{let i=new Map,o=dV(t,r.pruneAfterMs,{onPruned:({entry:e})=>{FV(i,e)}}),s=mV(t,r.maxEntries,{onCapped:({entry:e})=>{FV(i,e)}}),c=new Set,l=IV({removedSessionFiles:i,referencedSessionIds:new Set(Object.values(t).map(e=>e?.sessionId).filter(e=>!!e)),storePath:e,reason:`deleted`,restrictToStoreDir:!0});for(let e of l)c.add(e);if(c.size>0||r.resetArchiveRetentionMs!=null){let t=c.size>0?[...c]:[k.dirname(k.resolve(e))];await cB({directories:t,olderThanMs:r.pruneAfterMs,reason:`deleted`}),r.resetArchiveRetentionMs!=null&&await cB({directories:t,olderThanMs:r.resetArchiveRetentionMs,reason:`reset`})}await gV(e,r.rotateBytes);let u=await qB({store:t,storePath:e,activeSessionKey:n?.activeSessionKey,maintenance:r,warnOnly:!1,log:vV});await n?.onMaintenanceApplied?.({mode:r.mode,beforeCount:a,afterCount:Object.keys(t).length,pruned:o,capped:s,diskBudget:u})}}await A.promises.mkdir(k.dirname(e),{recursive:!0});let r=JSON.stringify(t,null,2);if(ZB(e)===r){kV({storePath:e,store:t,serialized:r});return}if(process.platform===`win32`){for(let n=0;n<5;n++)try{await LV({storePath:e,store:t,serialized:r});return}catch(t){if(PV(t)===`ENOENT`)return;if(n<4){await new Promise(e=>setTimeout(e,50*(n+1)));continue}vV.warn(`atomic write failed after 5 attempts: ${e}`)}return}try{await LV({storePath:e,store:t,serialized:r})}catch(n){if(PV(n)===`ENOENT`){try{await LV({storePath:e,store:t,serialized:r})}catch(e){if(PV(e)===`ENOENT`)return;throw e}return}throw n}}async function jV(e,t,n){await HV(e,async()=>{await AV(e,t,n)})}async function MV(e,t,n){return await HV(e,async()=>{let r=DV(e,{skipCache:!0}),i=await t(r);return await AV(e,r,n),i})}const NV=new Map;function PV(e){return!e||typeof e!=`object`||!(`code`in e)?null:String(e.code)}function FV(e,t){(!e.has(t.sessionId)||t.sessionFile)&&e.set(t.sessionId,t.sessionFile)}function IV(e){let t=new Set;for(let[n,r]of e.removedSessionFiles){if(e.referencedSessionIds.has(n))continue;let i=sB({sessionId:n,storePath:e.storePath,sessionFile:r,reason:e.reason,restrictToStoreDir:e.restrictToStoreDir});for(let e of i)t.add(k.dirname(e))}return t}async function LV(e){await DP(e.storePath,e.serialized,{mode:384}),kV({storePath:e.storePath,store:e.store,serialized:e.serialized})}async function RV(e){e.store[e.resolved.normalizedKey]=e.next;for(let t of e.resolved.legacyKeys)delete e.store[t];return await AV(e.storePath,e.store,{activeSessionKey:e.resolved.normalizedKey}),e.next}function zV(e){return Error(`timeout waiting for session store lock: ${e}`)}function BV(e){let t=NV.get(e);if(t)return t;let n={running:!1,pending:[]};return NV.set(e,n),n}async function VV(e){let t=NV.get(e);if(!(!t||t.running)){t.running=!0;try{for(;t.pending.length>0;){let n=t.pending.shift();if(!n)continue;let r=n.timeoutMs??1/0;if(n.timeoutMs!=null&&r<=0){n.reject(zV(e));continue}let i,a,o,s=!1;try{i=await tF({sessionFile:e,timeoutMs:r,staleMs:n.staleMs}),a=await n.fn()}catch(e){s=!0,o=e}finally{await i?.release().catch(()=>void 0)}if(s){n.reject(o);continue}n.resolve(a)}}finally{t.running=!1,t.pending.length===0?NV.delete(e):queueMicrotask(()=>{VV(e)})}}}async function HV(e,t,n={}){if(!e||typeof e!=`string`)throw Error(`withSessionStoreLock: storePath must be a non-empty string, got ${JSON.stringify(e)}`);let r=n.timeoutMs??1e4,i=n.staleMs??3e4;n.pollIntervalMs;let a=r>0&&Number.isFinite(r),o=BV(e);return await new Promise((n,s)=>{let c={fn:async()=>await t(),resolve:e=>n(e),reject:s,timeoutMs:a?r:void 0,staleMs:i};o.pending.push(c),VV(e)})}async function UV(e){let{storePath:t,sessionKey:n,update:r}=e;return await HV(t,async()=>{let e=DV(t,{skipCache:!0}),i=TV({store:e,sessionKey:n}),a=i.existing;if(!a)return null;let o=await r(a);return o?await RV({storePath:t,store:e,resolved:i,next:mz(a,o)}):a})}async function WV(e){let{storePath:t,sessionKey:n,ctx:r}=e,i=e.createIfMissing??!0;return await MV(t,t=>{let a=TV({store:t,sessionKey:n}),o=a.existing,s=rz({ctx:r,sessionKey:a.normalizedKey,existing:o,groupResolution:e.groupResolution});if(!s){if(o&&a.legacyKeys.length>0){t[a.normalizedKey]=o;for(let e of a.legacyKeys)delete t[e]}return o??null}if(!o&&!i)return null;let c=o?hz(o,s):mz(o,s);t[a.normalizedKey]=c;for(let e of a.legacyKeys)delete t[e];return c},{activeSessionKey:wV(n)})}async function GV(e){let{storePath:t,sessionKey:n,channel:r,to:i,accountId:a,threadId:o,ctx:s}=e;return await HV(t,async()=>{let c=DV(t),l=TV({store:c,sessionKey:n}),u=l.existing,d=Date.now(),f=DB(e.deliveryContext),p=DB({channel:r,to:i,accountId:a,threadId:o}),m=AB(f,p),h=e.deliveryContext,g=(h!=null&&Object.prototype.hasOwnProperty.call(h,`threadId`)?h.threadId:void 0)??(o!=null&&o!==``?o:void 0),_=AB(m,(f?.channel||f?.to||p?.channel||p?.to)&&g==null?CV(kB(u)):kB(u)),v=OB({deliveryContext:{channel:_?.channel,to:_?.to,accountId:_?.accountId,threadId:_?.threadId}}),y=s?rz({ctx:s,sessionKey:l.normalizedKey,existing:u,groupResolution:e.groupResolution}):null,b={updatedAt:Math.max(u?.updatedAt??0,d),deliveryContext:v.deliveryContext,lastChannel:v.lastChannel,lastTo:v.lastTo,lastAccountId:v.lastAccountId,lastThreadId:v.lastThreadId};return await RV({storePath:t,store:c,resolved:l,next:mz(u,y?{...b,...y}:b)})})}const KV=new Set;function qV(e){return KV.add(e),()=>{KV.delete(e)}}function JV(e){let t=e.trim();if(!t)return;let n={sessionFile:t};for(let e of KV)try{e(n)}catch{}}function YV(e){if(!e)return{baseSessionKey:void 0,threadId:void 0};let t=e.lastIndexOf(`:topic:`),n=e.lastIndexOf(`:thread:`),r=Math.max(t,n),i=t>n?`:topic:`:`:thread:`;return{baseSessionKey:r===-1?e:e.slice(0,r),threadId:(r===-1?void 0:e.slice(r+i.length))?.trim()||void 0}}function XV(e){let{baseSessionKey:t,threadId:n}=YV(e);if(!e||!t)return{deliveryContext:void 0,threadId:n};let r;try{let n=DV(vn(H().session?.store)),i=n[e];!i?.deliveryContext&&t!==e&&(i=n[t]),i?.deliveryContext&&(r={channel:i.deliveryContext.channel,to:i.deliveryContext.to,accountId:i.deliveryContext.accountId})}catch{}return{deliveryContext:r,threadId:n}}async function ZV(e){let{sessionId:t,sessionKey:n,sessionStore:r,storePath:i}=e,a=e.sessionEntry??r[n]??{sessionId:t,updatedAt:Date.now()},o=e.fallbackSessionFile?.trim(),s=bn(t,!a.sessionFile&&o?{...a,sessionFile:o}:a,{agentId:e.agentId,sessionsDir:e.sessionsDir}),c={...a,sessionId:t,updatedAt:Date.now(),sessionFile:s};return a.sessionId!==t||a.sessionFile!==s?(r[n]=c,await MV(i,e=>{e[n]={...e[n],...c}},e.activeSessionKey?{activeSessionKey:e.activeSessionKey}:void 0),{sessionFile:s,sessionEntry:c}):(r[n]=c,{sessionFile:s,sessionEntry:c})}function QV(e){let t=e.split(`#`)[0]??e;return t.split(`?`)[0]??t}function $V(e){let t=e.trim();if(!t)return null;let n=QV(t);try{let e=new URL(n),t=k.basename(e.pathname);if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}catch{let e=k.basename(n);return!e||e===`/`||e===`.`?null:e}}function eH(e){let t=e.mediaUrls?.filter(e=>e&&e.trim())??[];if(t.length>0){let e=t.map(e=>$V(e)).filter(e=>!!(e&&e.trim()));return e.length>0?e.join(`, `):`media`}return(e.text??``).trim()||null}async function tH(e){if(A.existsSync(e.sessionFile))return;await A.promises.mkdir(k.dirname(e.sessionFile),{recursive:!0});let t={type:`session`,version:er,id:e.sessionId,timestamp:new Date().toISOString(),cwd:process.cwd()};await A.promises.writeFile(e.sessionFile,`${JSON.stringify(t)}\n`,{encoding:`utf-8`,mode:384})}async function nH(e){let t=xn({agentId:e.agentId,storePath:e.storePath}),n=bn(e.sessionId,e.sessionEntry,t),r=e.sessionEntry;if(e.sessionStore&&e.storePath){let i=YV(e.sessionKey).threadId,a=r?.sessionFile?void 0:yn(e.sessionId,e.agentId,e.threadId??i),o=await ZV({sessionId:e.sessionId,sessionKey:e.sessionKey,sessionStore:e.sessionStore,storePath:e.storePath,sessionEntry:r,agentId:t?.agentId,sessionsDir:t?.sessionsDir,fallbackSessionFile:a});n=o.sessionFile,r=o.sessionEntry}return{sessionFile:n,sessionEntry:r}}async function rH(e){let t=e.sessionKey.trim();if(!t)return{ok:!1,reason:`missing sessionKey`};let n=eH({text:e.text,mediaUrls:e.mediaUrls});if(!n)return{ok:!1,reason:`empty text`};let r=e.storePath??Sn(e.agentId),i=DV(r,{skipCache:!0}),a=i[t];if(!a?.sessionId)return{ok:!1,reason:`unknown sessionKey: ${t}`};let o;try{o=(await ZV({sessionId:a.sessionId,sessionKey:t,sessionStore:i,storePath:r,sessionEntry:a,agentId:e.agentId,sessionsDir:k.dirname(r)})).sessionFile}catch(e){return{ok:!1,reason:e instanceof Error?e.message:String(e)}}return await tH({sessionFile:o,sessionId:a.sessionId}),tr.open(o).appendMessage({role:`assistant`,content:[{type:`text`,text:n}],api:`openai-responses`,provider:`openclaw`,model:`delivery-mirror`,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:`stop`,timestamp:Date.now()}),JV(o),{ok:!0,sessionFile:o}}function iH(e,t,n){return e.mode===`off`?!1:e.mode===`all`?!0:t.trim()!==n.trim()}function aH(e){return e.cfg?.session?.scope===`global`?`global`:oz({cfg:e.cfg,agentId:e.agentId})}function oH(e){return cz({cfg:e.cfg,agentId:e.agentId,sessionKey:e.sessionKey})}function sH(e){let t=e.sessionKey?.trim()??``,n=_e({sessionKey:t,config:e.cfg}),r=e.cfg,i=sT(r,n),a=aH({cfg:r,agentId:n}),o=t?iH(i,oH({cfg:r,agentId:n,sessionKey:t}),a):!1;return{agentId:n,sessionKey:t,mainSessionKey:a,mode:i.mode,sandboxed:o,toolPolicy:$w(r,n)}}function cH(e){let t=e.toolName.trim().toLowerCase();if(!t)return;let n=sH({cfg:e.cfg,sessionKey:e.sessionKey});if(!n.sandboxed)return;let r=new Set(Rw(n.toolPolicy.deny)),i=Rw(n.toolPolicy.allow),a=i.length>0?new Set(i):null,o=r.has(t),s=a?!a.has(t):!1;if(!o&&!s)return;let c=[],l=[];o&&(c.push(`deny list`),l.push(`Remove "${t}" from ${n.toolPolicy.sources.deny.key}.`)),s&&(c.push(`allow list`),l.push(`Add "${t}" to ${n.toolPolicy.sources.allow.key} (or set it to [] to allow all).`));let u=[];u.push(`Tool "${t}" blocked by sandbox tool policy (mode=${n.mode}).`),u.push(`Session: ${n.sessionKey||`(unknown)`}`),u.push(`Reason: ${c.join(` + `)}`),u.push(`Fix:`),u.push(`- agents.defaults.sandbox.mode=off (disable sandbox)`);for(let e of l)u.push(`- ${e}`);return n.mode===`non-main`&&u.push(`- Use main session key (direct): ${n.mainSessionKey}`),u.push(`- See: ${se(`openclaw sandbox explain --session ${n.sessionKey}`)}`),u.join(`
63
63
  `)}function lH(){try{if(Mn(`which rg`,{encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`],timeout:2e3}).trim())return}catch{}if(O.platform()===`darwin`)return{command:`/usr/bin/true`}}let uH=!1,dH=null;function fH(e,t){if(e===null)return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}let pH=null;async function mH(){return pH||=(await import(`@anthropic-ai/sandbox-runtime`)).SandboxManager,pH}const hH={network:{allowedDomains:[`github.com`,`*.github.com`,`*.githubusercontent.com`,`npmjs.org`,`*.npmjs.org`,`registry.npmjs.org`,`pypi.org`,`*.pypi.org`,`api.anthropic.com`,`*.openai.com`,`*.qq.com`,`*.imtt.qq.com`],deniedDomains:[],allowLocalBinding:!0},filesystem:{denyRead:[`~/.ssh`,`~/.gnupg`,`~/.aws/credentials`],allowWrite:[`.`,`/tmp`,`/private/tmp`,`/var/tmp`,`/private/var/tmp`],denyWrite:[`.env`,`.env.local`,`.env.production`]}};function gH(e,t){return e.map(e=>e===`.`?t?k.resolve(t):process.cwd():e===`~`||e.startsWith(`~/`)?k.resolve(O.homedir(),e.slice(e.startsWith(`~/`)?2:1)):e)}function _H(e,t){let n=lH(),r=n?{ripgrep:n}:{};if(!e)return{...hH,filesystem:{...hH.filesystem,allowWrite:gH(hH.filesystem?.allowWrite??[],t)},...r};let i=e.allowWrite??hH.filesystem?.allowWrite??[],a=e.allowedDomains?.includes(`*`);return{network:{allowedDomains:a?void 0:e.allowedDomains??hH.network?.allowedDomains??[],deniedDomains:a?[]:e.deniedDomains??hH.network?.deniedDomains??[],allowLocalBinding:e.allowLocalBinding??hH.network?.allowLocalBinding??!0,allowUnixSockets:e.allowUnixSockets},filesystem:{denyRead:e.denyRead??hH.filesystem?.denyRead??[],allowWrite:gH(i,t),denyWrite:e.denyWrite??hH.filesystem?.denyWrite??[]},...r}}async function vH(e){let t=e??_H();if(!(uH&&fH(dH,t)))try{await(await mH()).initialize(t,void 0,!0),uH=!0,dH=t,console.log(`[QBotClaw:SRT:Init] ✅ sandbox-runtime 初始化成功 | config=${JSON.stringify(t,null,2)}`),wH()}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);throw console.log(`[QBotClaw:SRT:Init] ❌ sandbox-runtime 初始化失败: ${t}`),e}}async function yH(e){uH||await vH();try{return await(await mH()).wrapWithSandbox(e)}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);throw console.log(`[QBotClaw:SRT:Exec] ❌ wrapWithSandbox 失败: ${t}`),e}}async function bH(){if(uH)try{await(await mH()).reset(),uH=!1,dH=null}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);console.log(`[QBotClaw:SRT:Cleanup] ❌ sandbox-runtime 重置失败: ${t}`)}}async function xH(e){if(!uH)return[];try{return(await mH()).getSandboxViolationStore().getViolationsForCommand(e)}catch{return[]}}async function SH(){if(uH)try{(await mH()).cleanupAfterCommand()}catch{}}let CH=!1;function wH(){if(!CH){CH=!0,process.on(`exit`,()=>{uH&&(console.log(`[QBotClaw:SRT:Cleanup] 🧹 进程退出,执行 SRT 清理...`),bH())});for(let e of[`SIGTERM`,`SIGINT`])process.on(e,()=>{bH().finally(()=>{process.kill(process.pid,e)})})}}async function TH(e,t,n){if(await j.mkdir(e,{recursive:!0}),t){let n=E(t),r=[pe,xe,fe,Se,le,Ce,me];for(let t of r){let r=k.join(n,t),i=k.join(e,t);try{await j.access(i)}catch{try{let e=await Ue({absolutePath:r,rootPath:n,boundaryLabel:`sandbox seed workspace`});if(!e.ok)continue;try{let t=A.readFileSync(e.fd,`utf-8`);await j.writeFile(i,t,{encoding:`utf-8`,flag:`wx`})}finally{A.closeSync(e.fd)}}catch{}}}}await ce({dir:e,ensureBootstrapFiles:!n})}async function EH(e){let{cfg:t,rawSessionKey:n}=e,r=E(e.workspaceDir?.trim()||be),i=E(t.workspaceRoot),a=yF(t.scope,n),s=t.scope===`shared`?i:vF(i,a),c=t.workspaceAccess===`rw`?r:s;if(c===s){if(await TH(s,r,e.config?.agents?.defaults?.skipBootstrap),t.workspaceAccess!==`rw`)try{await At({sourceWorkspaceDir:r,targetWorkspaceDir:s,config:e.config})}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);o.error?.(`Sandbox skill sync failed: ${t}`)}}else await j.mkdir(c,{recursive:!0});return{agentWorkspaceDir:r,scopeKey:a,sandboxWorkspaceDir:s,workspaceDir:c}}async function DH(e){if(e.docker.user?.trim())return e.docker;let t=e.stat??(e=>j.stat(e));try{let n=await t(e.workspaceDir),r=Number.isInteger(n.uid)?n.uid:null,i=Number.isInteger(n.gid)?n.gid:null;return r===null||i===null||r<0||i<0?e.docker:{...e.docker,user:`${r}:${i}`}}catch{return e.docker}}function OH(e){let t=e.sessionKey?.trim();if(!t)return null;let n=sH({cfg:e.config,sessionKey:t});if(!n.sandboxed)return console.log(`[QBotClaw:Sandbox:Init] ❌ 沙箱未启用 | mode=${n.mode} | sessionKey=${t} | sandboxed=false`),null;let r=sT(e.config,n.agentId);return console.log(`[QBotClaw:Sandbox:Init] ✅ 沙箱已启用 | mode=${n.mode} | agentId=${n.agentId} | scope=${r.scope}`),{rawSessionKey:t,runtime:n,cfg:r}}async function kH(e){let t=OH(e);if(!t)return null;let{rawSessionKey:n,cfg:r}=t;if(r.runtime===`srt`){let t=E(e.workspaceDir?.trim()||be);await j.mkdir(t,{recursive:!0});let i=e.config?.agents?.defaults?.sandbox?.srt,a=_H(i,t);try{await vH(a)}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);return console.log(`[QBotClaw:SRT:Init] ❌ SRT 初始化失败,回退到非沙箱模式: ${t}`),o.error?.(`SRT sandbox initialization failed: ${t}`),null}let s={enabled:!0,runtime:`srt`,sessionKey:n,workspaceDir:t,agentWorkspaceDir:t,workspaceAccess:r.workspaceAccess===`none`?`rw`:r.workspaceAccess,containerName:`srt-sandbox-${n}`,containerWorkdir:t,docker:r.docker,tools:r.tools,browserAllowHostControl:r.browser.allowHostControl};if(i?.skillMounts!==!1){let n=[{hostRoot:t,containerRoot:t,writable:s.workspaceAccess===`rw`,source:`workspace`}];for(let e of r.docker.binds??[]){let t=e.split(`:`);if(t.length>=2&&t[0]&&t[1]){let e=E(t[0]);n.push({hostRoot:e,containerRoot:e,writable:!t[2]?.includes(`ro`),source:`bind`})}}let c=gH(i?.allowWrite??a.filesystem?.allowWrite??[],t),l=new Set(n.map(e=>e.hostRoot));for(let e of c){if(l.has(e))continue;let t=!1;for(let n of l)if(e.startsWith(n+k.sep)||e===n){t=!0;break}t||(l.add(e),n.push({hostRoot:e,containerRoot:e,writable:!0,source:`allowWrite`}))}try{let r=kt(t,{config:e.config}),i=new Set;i.add(k.resolve(t));for(let e of r){let t=k.resolve(k.dirname(e.skill.baseDir));if(i.has(t))continue;let r=!1;for(let e of i)if(t.startsWith(e+k.sep)||t===e){r=!0;break}r||(i.add(t),n.push({hostRoot:t,containerRoot:t,writable:!1,source:`bind`}))}}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);console.log(`[QBotClaw:SRT:Init] ⚠️ Skills 源目录收集失败(非致命): ${t}`),o.error?.(`SRT sandbox skill mount collection failed: ${t}`)}s.fsBridge=ID({workspaceDir:t,containerWorkdir:t,mounts:n})}else s.fsBridge=FD(t);return s}await zI(r);let{agentWorkspaceDir:i,scopeKey:a,workspaceDir:s}=await EH({cfg:r,rawSessionKey:n,config:e.config,workspaceDir:e.workspaceDir}),c=await DH({docker:r.docker,workspaceDir:s}),l=c===r.docker?r:{...r,docker:c},u=await lI({sessionKey:n,workspaceDir:s,agentWorkspaceDir:i,cfg:l});console.log(`[QBotClaw:Sandbox:Init] 🐳 沙箱容器就绪 | containerName=${u}`);let d=await xI({scopeKey:a,workspaceDir:s,agentWorkspaceDir:i,cfg:l,evaluateEnabled:e.config?.browser?.evaluateEnabled??!0,bridgeAuth:r.browser.enabled?await(async()=>{let t=e.config??H(),n=dD(t);try{n=(await pD({cfg:t})).auth}catch(e){let t=e instanceof Error?e.message:JSON.stringify(e);o.error?.(`Sandbox browser auth ensure failed: ${t}`)}return n})():void 0}),f={enabled:!0,runtime:`docker`,sessionKey:n,workspaceDir:s,agentWorkspaceDir:i,workspaceAccess:l.workspaceAccess,containerName:u,containerWorkdir:l.docker.workdir,docker:l.docker,tools:l.tools,browserAllowHostControl:l.browser.allowHostControl,browser:d??void 0};return f.fsBridge=AI({sandbox:f}),f}async function AH(e){let t=OH(e);if(!t)return null;let{rawSessionKey:n,cfg:r}=t,{workspaceDir:i}=await EH({cfg:r,rawSessionKey:n,config:e.config,workspaceDir:e.workspaceDir});return{workspaceDir:i,containerWorkdir:r.docker.workdir}}async function jH(e){let t=await e.read(),n=[];for(let r of t.entries){let t=await tI(r.containerName),i=r.image;if(t.exists)try{let e=await $([`inspect`,`-f`,`{{.Config.Image}}`,r.containerName],{allowFailure:!0});e.code===0&&(i=e.stdout.trim())}catch{}let a=bF(r.sessionKey),o=e.resolveConfiguredImage(a);n.push({...r,image:i,running:t.running,imageMatch:i===o})}return n}async function MH(){let e=H();return jH({read:cF,resolveConfiguredImage:t=>sT(e,t).docker.image})}async function NH(){let e=H();return jH({read:mF,resolveConfiguredImage:t=>sT(e,t).browser.image})}async function PH(e){try{await $([`rm`,`-f`,e],{allowFailure:!0})}catch{console.log(`[QBotClaw:Sandbox:Cleanup] ⚠️ Docker 容器移除失败(已忽略) | containerName=${e}`)}await pF(e)}async function FH(e){try{await $([`rm`,`-f`,e],{allowFailure:!0})}catch{}await gF(e);for(let[t,n]of yP.entries())n.containerName===e&&(await vP(n.bridge.server).catch(()=>void 0),yP.delete(t))}function IH(e){if(typeof e!=`object`||!e)return JSON.stringify(e)??`null`;if(Array.isArray(e))return`[${e.map(e=>IH(e)).join(`,`)}]`;let t=e;return`{${Object.keys(t).toSorted().map(e=>`${JSON.stringify(e)}:${IH(t[e])}`).join(`,`)}}`}const LH=/\b(?:daily|weekly|monthly)(?:\/(?:daily|weekly|monthly))* (?:usage )?limit(?:s)?(?: (?:exhausted|reached|exceeded))?\b/i,RH={rateLimit:[/rate[_ ]limit|too many requests|429/,`model_cooldown`,`exceeded your current quota`,`resource has been exhausted`,`quota exceeded`,`resource_exhausted`,`usage limit`,/\btpm\b/i,`tokens per minute`,`tokens per day`],overloaded:[/overloaded_error|"type"\s*:\s*"overloaded_error"/i,`overloaded`,/service[_ ]unavailable.*(?:overload|capacity|high[_ ]demand)|(?:overload|capacity|high[_ ]demand).*service[_ ]unavailable/i,`high demand`],timeout:[`timeout`,`timed out`,`service unavailable`,`deadline exceeded`,`context deadline exceeded`,`connection error`,`network error`,`network request failed`,`fetch failed`,`socket hang up`,/\beconn(?:refused|reset|aborted)\b/i,/\benotfound\b/i,/\beai_again\b/i,/without sending (?:any )?chunks?/i,/\bstop reason:\s*(?:abort|error|malformed_response)\b/i,/\breason:\s*(?:abort|error|malformed_response)\b/i,/\bunhandled stop reason:\s*(?:abort|error|malformed_response)\b/i],billing:[/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+payment/i,`payment required`,`insufficient credits`,/insufficient[_ ]quota/i,`credit balance`,`plans & billing`,`insufficient balance`,`insufficient usd or diem balance`],authPermanent:[/api[_ ]?key[_ ]?(?:revoked|invalid|deactivated|deleted)/i,`invalid_api_key`,`key has been disabled`,`key has been revoked`,`account has been deactivated`,/could not (?:authenticate|validate).*(?:api[_ ]?key|credentials)/i,`permission_error`,`not allowed for this organization`],auth:[/invalid[_ ]?api[_ ]?key/,`incorrect api key`,`invalid token`,`authentication`,`re-authenticate`,`oauth token refresh failed`,`unauthorized`,`forbidden`,`access denied`,`insufficient permissions`,`insufficient permission`,/missing scopes?:/i,`expired`,`token has expired`,/\b401\b/,/\b403\b/,`no credentials found`,`no api key found`],format:[`string should match pattern`,`tool_use.id`,`tool_use_id`,`messages.1.content.1.tool_use.id`,`invalid request format`,/tool call id was.*must be/i]},zH=/^(?:error[:\s-]+)?billing(?:\s+error)?(?:[:\s-]+|$)|^(?:error[:\s-]+)?(?:credit balance|insufficient credits?|payment required|http\s*402\b)/i,BH=/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|^\s*402\s+payment/i;function VH(e,t){if(!e)return!1;let n=e.toLowerCase();return t.some(e=>e instanceof RegExp?e.test(n):n.includes(e))}function HH(e){return VH(e,RH.format)}function UH(e){return VH(e,RH.rateLimit)}function WH(e){return VH(e,RH.timeout)}function GH(e){return LH.test(e)}function KH(e){let t=e.toLowerCase();return t?e.length>512?BH.test(t):VH(t,RH.billing)?!0:zH.test(e)?t.includes(`upgrade`)||t.includes(`credits`)||t.includes(`payment`)||t.includes(`plan`):!1:!1}function qH(e){return VH(e,RH.authPermanent)}function JH(e){return VH(e,RH.auth)}function YH(e){return VH(e,RH.overloaded)}const XH=s(`errors`);function ZH(e,t){let n=e?.trim(),r=t?.trim(),i=n&&r?`${n} (${r})`:n||void 0;return i?`⚠️ ${i} returned a billing error — your API key has run out of credits or has an insufficient balance. Check your ${n} billing dashboard and top up or switch to a different API key.`:`⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance. Check your provider's billing dashboard and top up or switch to a different API key.`}const QH=ZH();function $H(e){if(UH(e))return`⚠️ API rate limit reached. Please try again later.`;if(YH(e))return`The AI service is temporarily overloaded. Please try again in a moment.`}function eU(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`reasoning is mandatory`)||t.includes(`reasoning is required`)||t.includes(`requires reasoning`)||t.includes(`reasoning`)&&t.includes(`cannot be disabled`)}function tU(e){let t=e.toLowerCase();return/\btpm\b/i.test(t)||t.includes(`tokens per minute`)}function nU(e){if(!e)return!1;let t=e.toLowerCase();if(tU(e)||eU(e))return!1;let n=t.includes(`request size exceeds`),r=t.includes(`context window`)||t.includes(`context length`)||t.includes(`maximum context length`);return t.includes(`request_too_large`)||t.includes(`request exceeds the maximum size`)||t.includes(`context length exceeded`)||t.includes(`maximum context length`)||t.includes(`prompt is too long`)||t.includes(`exceeds model context window`)||t.includes(`model token limit`)||n&&r||t.includes(`context overflow:`)||t.includes(`exceed context limit`)||t.includes(`exceeds the model's maximum context`)||t.includes(`max_tokens`)&&t.includes(`exceed`)&&t.includes(`context`)||t.includes(`input length`)&&t.includes(`exceed`)&&t.includes(`context`)||t.includes(`is longer than`)&&r||t.includes(`413`)&&t.includes(`too large`)||t.includes(`context_window_exceeded`)||e.includes(`上下文过长`)||e.includes(`上下文超出`)||e.includes(`上下文长度超`)||e.includes(`超出最大上下文`)||e.includes(`请压缩上下文`)}const rU=/context window.*(too small|minimum is)/i,iU=/context.*overflow|context window.*(too (?:large|long)|exceed|over|limit|max(?:imum)?|requested|sent|tokens)|prompt.*(too (?:large|long)|exceed|over|limit|max(?:imum)?)|(?:request|input).*(?:context|window|length|token).*(too (?:large|long)|exceed|over|limit|max(?:imum)?)|(?:input|request).*(?:is longer|longer than).*(?:context|window|length)/i,aU=/rate limit|too many requests|requests per (?:minute|hour|day)|quota|throttl|429\b|tokens per day/i;function oU(e){return!e||tU(e)||eU(e)||KH(e)||rU.test(e)||UH(e)?!1:nU(e)?!0:aU.test(e)?!1:iU.test(e)}function sU(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`summarization failed`)||t.includes(`auto-compaction`)||t.includes(`compaction failed`)||t.includes(`compaction`)?oU(e)?!0:t.includes(`context overflow`):!1}const cU=/^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i,lU=/<\s*\/?\s*final\s*>/gi,uU=/^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i,dU=/^(?:context overflow:|request_too_large\b|request size exceeds\b|request exceeds the maximum size\b|context length exceeded\b|maximum context length\b|prompt is too long\b|exceeds model context window\b)/i,fU=/^(?:http\s*)?(\d{3})\s+(.+)$/i,pU=/^(?:http\s*)?(\d{3})(?:\s+([\s\S]+))?$/i,mU=/^\s*(?:<!doctype\s+html\b|<html\b)/i,hU=new Set([521,522,523,524,525,526,530]),gU=new Set([499,500,502,503,504,521,522,523,524,529]),_U=[`error`,`bad request`,`not found`,`unauthorized`,`forbidden`,`internal server`,`service unavailable`,`gateway`,`rate limit`,`overloaded`,`timeout`,`timed out`,`invalid`,`too many requests`,`permission`],vU=[`insufficient credits`,`insufficient quota`,`credit balance`,`insufficient balance`,`plans & billing`,`add more credits`,`top up`],yU=[`upgrade your plan`,`upgrade plan`,`current plan`,`subscription`],bU=[`daily`,`weekly`,`monthly`],xU=[`try again`,`retry`,`temporary`,`cooldown`],SU=[`usage limit`,`rate limit`,`organization usage`],CU=[`organization`,`workspace`],wU=[`billing period`,`exceeded`,`reached`,`exhausted`],TU=/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+payment required\b|^\s*402\s+.*used up your points\b/i,EU=/^(?:error[:\s-]+)?(?:(?:http\s*)?402(?:\s+payment required)?|payment required)(?:[:\s-]+|$)/i;function DU(e,t){return t.some(t=>e.includes(t))}function OU(e){return DU(e,vU)||DU(e,yU)&&e.includes(`limit`)||e.includes(`billing hard limit`)||e.includes(`hard limit reached`)||e.includes(`maximum allowed`)&&e.includes(`limit`)}function kU(e){let t=DU(e,bU),n=e.includes(`spend limit`)||e.includes(`spending limit`),r=DU(e,CU);return DU(e,xU)&&DU(e,SU)||t&&(e.includes(`usage limit`)||n)||t&&e.includes(`limit`)&&e.includes(`reset`)||r&&e.includes(`limit`)&&(n||DU(e,wU))}function AU(e){return e.trim().toLowerCase().replace(EU,``).trim()}function jU(e){let t=AU(e);return!t||OU(t)?`billing`:UH(t)||kU(t)?`rate_limit`:`billing`}function MU(e){return TU.test(e)?jU(e):null}function NU(e){let t=e.match(pU);if(!t)return null;let n=Number(t[1]);return Number.isFinite(n)?{code:n,rest:(t[2]??``).trim()}:null}function PU(e){let t=e.trim();if(!t)return!1;let n=NU(t);return!n||n.code<500?!1:hU.has(n.code)?!0:n.code<600&&mU.test(n.rest)&&/<\/html>/i.test(n.rest)}function FU(e){let t=e.trim();if(!t)return!1;let n=NU(t);return n?gU.has(n.code):!1}function IU(e,t){return typeof e!=`number`||!Number.isFinite(e)?null:e===402?t?jU(t):`billing`:e===429?`rate_limit`:e===401||e===403?t&&qH(t)?`auth_permanent`:`auth`:e===408?`timeout`:e===503||e===499?t&&YH(t)?`overloaded`:`timeout`:e===502||e===504?`timeout`:e===529?`overloaded`:e===400?t&&KH(t)?`billing`:`format`:null}function LU(e){return e&&e.replace(lU,``)}function RU(e){let t=e.trim();if(!t)return e;let n=t.split(/\n{2,}/);if(n.length<2)return e;let r=e=>e.trim().replace(/\s+/g,` `),i=[],a=null;for(let e of n){let t=r(e);a&&t===a||(i.push(e.trim()),a=t)}return i.length===n.length?e:i.join(`
64
64
 
65
- `)}function zU(e){if(PU(e))return!0;let t=e.match(fU);if(!t)return!1;let n=Number(t[1]);if(!Number.isFinite(n)||n<400)return!1;let r=t[2].toLowerCase();return _U.some(e=>r.includes(e))}function BU(e){return nU(e)?WU(e)||zU(e)||uU.test(e)||dU.test(e):!1}function VU(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(t.type===`error`||typeof t.request_id==`string`||typeof t.requestId==`string`)return!0;if(`error`in t){let e=t.error;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;if(typeof t.message==`string`||typeof t.type==`string`||typeof t.code==`string`)return!0}}return!1}function HU(e){if(!e)return null;let t=e.trim();if(!t)return null;let n=[t];cU.test(t)&&n.push(t.replace(cU,``).trim());for(let e of n)if(!(!e.startsWith(`{`)||!e.endsWith(`}`)))try{let t=JSON.parse(e);if(VU(t))return t}catch{}return null}function UU(e){if(!e)return null;let t=HU(e);return t?IH(t):null}function WU(e){return UU(e)!==null}function GU(e){if(!e)return null;let t=e.trim();if(!t)return null;let n,r=t,i=r.match(/^(\d{3})\s+(.+)$/s);i&&(n=i[1],r=i[2].trim());let a=HU(r);if(!a)return null;let o=typeof a.request_id==`string`?a.request_id:typeof a.requestId==`string`?a.requestId:void 0,s=typeof a.type==`string`?a.type:void 0,c=typeof a.message==`string`?a.message:void 0,l,u;if(a.error&&typeof a.error==`object`&&!Array.isArray(a.error)){let e=a.error;typeof e.type==`string`&&(l=e.type),typeof e.code==`string`&&!l&&(l=e.code),typeof e.message==`string`&&(u=e.message)}return{httpCode:n,type:l??s,message:u??c,requestId:o}}function KU(e){let t=(e??``).trim();if(!t)return`LLM request failed with an unknown error.`;let n=NU(t);if(n&&PU(t))return`The AI service is temporarily unavailable (HTTP ${n.code}). Please try again in a moment.`;let r=t.match(fU);if(r){let e=r[2].trim();if(!e.startsWith(`{`))return`HTTP ${r[1]}: ${e}`}let i=GU(t);if(i?.message){let e=i.httpCode?`HTTP ${i.httpCode}`:`LLM error`,t=i.type?` ${i.type}`:``,n=i.requestId?` (request_id: ${i.requestId})`:``;return`${e}${t}: ${i.message}${n}`}return t.length>600?`${t.slice(0,600)}…`:t}function qU(e,t){let n=(e.errorMessage??``).trim();if(e.stopReason!==`error`&&!n)return;if(!n)return`LLM request failed with an unknown error.`;let r=n.match(/unknown tool[:\s]+["']?([a-z0-9_-]+)["']?/i)??n.match(/tool\s+["']?([a-z0-9_-]+)["']?\s+(?:not found|is not available)/i);if(r?.[1]){let e=cH({cfg:t?.cfg,sessionKey:t?.sessionKey,toolName:r[1]});if(e)return e}if(nU(n))return`Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.`;if(eU(n))return`Reasoning is required for this model endpoint. Use /think minimal (or any non-off level) and try again.`;if(/incorrect role information|roles must alternate|400.*role|"message".*role.*information/i.test(n))return`Message ordering conflict - please try again. If this persists, use /new to start a fresh session.`;if(tW(n))return`Session history looks corrupted (tool call input missing). Use /new to start a fresh session. If this keeps happening, reset the session or delete the corrupted session transcript.`;let i=n.match(/"type":"invalid_request_error".*?"message":"([^"]+)"/);return i?.[1]?`LLM request rejected: ${i[1]}`:$H(n)||(WH(n)?`LLM request timed out.`:KH(n)?ZH(t?.provider,t?.model??e.model):zU(n)||WU(n)?KU(n):(n.length>600&&XH.warn(`Long error truncated: ${n.slice(0,200)}`),n.length>600?`${n.slice(0,600)}…`:n))}function JU(e,t){if(!e)return e;let n=t?.errorContext??!1,r=LU(e),i=r.trim();if(!i)return``;if(n){if(/incorrect role information|roles must alternate/i.test(i))return`Message ordering conflict - please try again. If this persists, use /new to start a fresh session.`;if(BU(i))return`Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.`;if(KH(i))return QH;if(WU(i)||zU(i))return KU(i);if(uU.test(i))return $H(i)||(WH(i)?`LLM request timed out.`:KU(i))}return RU(r.replace(/^(?:[ \t]*\r?\n)+/,``))}function YU(e){return!e||e.stopReason!==`error`?!1:UH(e.errorMessage??``)}const XU=/tool_(?:use|call)\.(?:input|arguments).*?(?:field required|required)/i,ZU=/messages\.\d+\.content\.\d+\.tool_(?:use|call)\.(?:input|arguments)/i,QU=/image dimensions exceed max allowed size for many-image requests:\s*(\d+)\s*pixels/i,$U=/messages\.(\d+)\.content\.(\d+)\.image/i,eW=/image exceeds\s*(\d+(?:\.\d+)?)\s*mb/i;function tW(e){return e?XU.test(e)||ZU.test(e):!1}function nW(e){return!e||e.stopReason!==`error`?!1:KH(e.errorMessage??``)}function rW(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`"type":"api_error"`)&&t.includes(`internal server error`)}function iW(e){if(!e||!e.toLowerCase().includes(`image dimensions exceed max allowed size`))return null;let t=e.match(QU),n=e.match($U);return{maxDimensionPx:t?.[1]?Number.parseInt(t[1],10):void 0,messageIndex:n?.[1]?Number.parseInt(n[1],10):void 0,contentIndex:n?.[2]?Number.parseInt(n[2],10):void 0,raw:e}}function aW(e){return!!iW(e)}function oW(e){if(!e)return null;let t=e.toLowerCase();if(!t.includes(`image exceeds`)||!t.includes(`mb`))return null;let n=e.match(eW);return{maxMb:n?.[1]?Number.parseFloat(n[1]):void 0,raw:e}}function sW(e){return e?!!oW(e):!1}function cW(e){return!aW(e)&&HH(e)}function lW(e){return!e||e.stopReason!==`error`?!1:JH(e.errorMessage??``)}function uW(e){if(!e)return!1;let t=e.toLowerCase();return!!(t.includes(`unknown model`)||t.includes(`model not found`)||t.includes(`model_not_found`)||t.includes(`not_found_error`)||t.includes(`does not exist`)&&t.includes(`model`)||t.includes(`invalid model`)&&!t.includes(`invalid model reference`)||/models\/[^\s]+ is not found/i.test(e)||/\b404\b/.test(e)&&/not[-_ ]?found/i.test(e))}function dW(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`session not found`)||t.includes(`session does not exist`)||t.includes(`session expired`)||t.includes(`session invalid`)||t.includes(`conversation not found`)||t.includes(`conversation does not exist`)||t.includes(`conversation expired`)||t.includes(`conversation invalid`)||t.includes(`no such session`)||t.includes(`invalid session`)||t.includes(`session id not found`)||t.includes(`conversation id not found`)}function fW(e){return aW(e)||sW(e)?null:dW(e)?`session_expired`:uW(e)?`model_not_found`:MU(e)||(GH(e)?KH(e)?`billing`:`rate_limit`:UH(e)?`rate_limit`:YH(e)?`overloaded`:FU(e)?NU(e.trim())?.code===529?`overloaded`:`timeout`:rW(e)?`timeout`:cW(e)?`format`:KH(e)?`billing`:WH(e)?`timeout`:qH(e)?`auth_permanent`:JH(e)?`auth`:null)}function pW(e){return fW(e)!==null}function mW(e){return!e||e.stopReason!==`error`?!1:pW(e.errorMessage??``)}function hW(e){return e===`google-gemini-cli`||e===`google-generative-ai`}function gW(e){if(!e)return null;let t=null;if(typeof e==`string`){let n=e.trim();if(!n.startsWith(`{`)||!n.endsWith(`}`))return null;try{t=JSON.parse(n)}catch{return null}}else typeof e==`object`&&(t=e);if(!t)return null;let n=typeof t.id==`string`?t.id:``,r=typeof t.type==`string`?t.type:``;return n.startsWith(`rs_`)&&(r===`reasoning`||r.startsWith(`reasoning.`))?{id:n,type:r}:null}function _W(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(!t||typeof t!=`object`||t.type!==`thinking`)return!0}return!1}function vW(e){let t=e.indexOf(`|`);return t<=0||t>=e.length-1?{callId:e}:{callId:e.slice(0,t),itemId:e.slice(t+1)}}function yW(e){return e===`toolCall`||e===`toolUse`||e===`functionCall`}function bW(e){let t=!1,n=[],r=null;for(let i of e){if(!i||typeof i!=`object`){r=null,n.push(i);continue}let e=i.role;if(e===`assistant`){let e=i;if(!Array.isArray(e.content)){r=null,n.push(i);continue}let a=new Map,o=!1,s=!1,c=e.content.map(e=>{if(!e||typeof e!=`object`)return e;let t=e;if(t.type===`thinking`&&gW(t.thinkingSignature))return o=!0,e;let n=e;if(!yW(n.type)||typeof n.id!=`string`)return e;let r=vW(n.id);return o||!r.itemId||!r.itemId.startsWith(`fc_`)?e:(s=!0,a.set(n.id,r.callId),{...e,id:r.callId})});if(r=a.size>0?a:null,!s){n.push(i);continue}t=!0,n.push({...e,content:c});continue}if(e===`toolResult`&&r&&r.size>0){let e=i,a=!1,o={};if(typeof e.toolCallId==`string`){let t=r.get(e.toolCallId);t&&t!==e.toolCallId&&(o.toolCallId=t,a=!0)}if(typeof e.toolUseId==`string`){let t=r.get(e.toolUseId);t&&t!==e.toolUseId&&(o.toolUseId=t,a=!0)}if(!a){n.push(i);continue}t=!0,n.push({...e,...o});continue}r=null,n.push(i)}return t?n:e}function xW(e){let t=[];for(let n of e){if(!n||typeof n!=`object`){t.push(n);continue}if(n.role!==`assistant`){t.push(n);continue}let e=n;if(!Array.isArray(e.content)){t.push(n);continue}let r=!1,i=[];for(let t=0;t<e.content.length;t++){let n=e.content[t];if(!n||typeof n!=`object`){i.push(n);continue}let a=n;if(a.type!==`thinking`){i.push(n);continue}if(!gW(a.thinkingSignature)){i.push(n);continue}if(_W(e.content,t)){i.push(n);continue}r=!0}if(!r){t.push(n);continue}i.length!==0&&t.push({...e,content:i})}return t}const SW=new Set([`toolCall`,`toolUse`,`functionCall`]);function CW(e,t=`strict`){if(!e||typeof e!=`string`)return t===`strict9`?`defaultid`:`defaulttoolid`;if(t===`strict9`){let t=e.replace(/[^a-zA-Z0-9]/g,``);return t.length>=9?t.slice(0,9):t.length>0?EW(t,9):EW(`sanitized`,9)}let n=e.replace(/[^a-zA-Z0-9]/g,``);return n.length>0?n:`sanitizedtoolid`}function wW(e){let t=e.content;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e;typeof t.id!=`string`||!t.id||typeof t.type==`string`&&SW.has(t.type)&&n.push({id:t.id,name:typeof t.name==`string`?t.name:void 0})}return n}function TW(e){let t=e.toolCallId;if(typeof t==`string`&&t)return t;let n=e.toolUseId;return typeof n==`string`&&n?n:null}function EW(e,t=8){return Vn(`sha256`).update(e).digest(`hex`).slice(0,t)}function DW(e){if(e.mode===`strict9`){let t=CW(e.id,e.mode),n=t.length>=9?t.slice(0,9):``;if(n&&!e.used.has(n))return n;for(let t=0;t<1e3;t+=1){let n=EW(`${e.id}:${t}`,9);if(!e.used.has(n))return n}return EW(`${e.id}:${Date.now()}`,9)}let t=CW(e.id,e.mode).slice(0,40);if(!e.used.has(t))return t;let n=EW(e.id),r=e.mode===`strict`?``:`_`,i=40-r.length-n.length,a=`${t.length>i?t.slice(0,i):t}${r}${n}`;if(!e.used.has(a))return a;for(let t=2;t<1e3;t+=1){let n=e.mode===`strict`?`x${t}`:`_${t}`,r=`${a.slice(0,40-n.length)}${n}`;if(!e.used.has(r))return r}let o=e.mode===`strict`?`t${Date.now()}`:`_${Date.now()}`;return`${a.slice(0,40-o.length)}${o}`}function OW(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=!1,r=t.map(t=>{if(!t||typeof t!=`object`)return t;let r=t,i=r.type,a=r.id;if(i!==`functionCall`&&i!==`toolUse`&&i!==`toolCall`||typeof a!=`string`||!a)return t;let o=e.resolve(a);return o===a?t:(n=!0,{...t,id:o})});return n?{...e.message,content:r}:e.message}function kW(e){let t=typeof e.message.toolCallId==`string`&&e.message.toolCallId?e.message.toolCallId:void 0,n=e.message.toolUseId,r=typeof n==`string`&&n?n:void 0,i=t?e.resolve(t):void 0,a=r?e.resolve(r):void 0;return i===t&&a===r?e.message:{...e.message,...i&&{toolCallId:i},...a&&{toolUseId:a}}}function AW(e,t=`strict`){let n=new Map,r=new Set,i=e=>{let i=n.get(e);if(i)return i;let a=DW({id:e,used:r,mode:t});return n.set(e,a),r.add(a),a},a=!1,o=e.map(e=>{if(!e||typeof e!=`object`)return e;let t=e.role;if(t===`assistant`){let t=OW({message:e,resolve:i});return t!==e&&(a=!0),t}if(t===`toolResult`){let t=kW({message:e,resolve:i});return t!==e&&(a=!0),t}return e});return a?o:e}function jW(e){let t=0;for(let n=0;n<e.length;n+=1)e.charCodeAt(n)<=32||(t+=1);if(t===0)return 0;let n=0,r=e.length-1;for(;r>=0&&e.charCodeAt(r)<=32;)--r;if(r>=0&&e[r]===`=`){for(n=1,--r;r>=0&&e.charCodeAt(r)<=32;)--r;r>=0&&e[r]===`=`&&(n=2)}let i=Math.floor(t*3/4)-n;return Math.max(0,i)}const MW=/^[A-Za-z0-9+/]+={0,2}$/;function NW(e){let t=e.replace(/\s+/g,``);if(!(!t||t.length%4!=0||!MW.test(t)))return t}function PW(e){let t=e?.agents?.defaults?.imageMaxDimensionPx;return typeof t!=`number`||!Number.isFinite(t)?{}:{maxDimensionPx:Math.max(1,Math.floor(t))}}const FW=s(`agents/tool-images`);function IW(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`image`&&typeof t.data==`string`&&typeof t.mimeType==`string`}function LW(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`text`&&typeof t.text==`string`}function RW(e){let t=e.trim();if(t){if(t.startsWith(`/9j/`))return`image/jpeg`;if(t.startsWith(`iVBOR`))return`image/png`;if(t.startsWith(`R0lGOD`))return`image/gif`}}function zW(e){return!Number.isFinite(e)||e<1024?`${Math.max(0,Math.round(e))}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function BW(e){for(let t of e.split(/\r?\n/u)){let e=t.trim();if(!e.startsWith(`MEDIA:`))continue;let n=e.slice(6).trim();if(n)return(n.match(/^`([^`]+)`$/u)?.[1]??n).trim()}}function VW(e){let t=e.trim();if(!t)return;try{let e=new URL(t).pathname.split(`/`).filter(Boolean).at(-1);return e&&e.length>0?e:void 0}catch{}let n=t.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1);return n&&n.length>0?n:void 0}function HW(e){let t=e.block;for(let e of[`fileName`,`filename`,`path`,`url`]){let n=t[e];if(typeof n!=`string`||n.trim().length===0)continue;let r=VW(n);if(r)return r}if(typeof t.name==`string`&&t.name.trim().length>0)return t.name.trim();if(e.mediaPathHint){let t=VW(e.mediaPathHint);if(t)return t}if(typeof e.label==`string`&&e.label.startsWith(`read:`)){let t=VW(e.label.slice(5));if(t)return t}}async function UW(e){let t=Buffer.from(e.base64,`base64`),n=await xN(t),r=n?.width,i=n?.height,a=t.byteLength>e.maxBytes,o=typeof r==`number`&&typeof i==`number`,s=o&&(r>e.maxDimensionPx||i>e.maxDimensionPx);if(o&&!a&&r<=e.maxDimensionPx&&i<=e.maxDimensionPx)return{base64:e.base64,mimeType:e.mimeType,resized:!1,width:r,height:i};let c=o?Math.max(r??0,i??0):e.maxDimensionPx,l=c>0?Math.min(e.maxDimensionPx,c):e.maxDimensionPx,u=fN(e.maxDimensionPx,l),d=null;for(let n of u)for(let o of dN){let c=await CN({buffer:t,maxSide:n,quality:o,withoutEnlargement:!0});if((!d||c.byteLength<d.size)&&(d={buffer:c,size:c.byteLength}),c.byteLength<=e.maxBytes){let l=typeof r==`number`&&typeof i==`number`?`${r}x${i}px`:`unknown`,u=e.fileName?`${e.fileName} ${l}`:l,d=t.byteLength>0?Number(((t.byteLength-c.byteLength)/t.byteLength*100).toFixed(1)):0;return FW.info(`Image resized to fit limits: ${u} ${zW(t.byteLength)} -> ${zW(c.byteLength)} (-${d}%)`,{label:e.label,fileName:e.fileName,sourceMimeType:e.mimeType,sourceWidth:r,sourceHeight:i,sourceBytes:t.byteLength,maxBytes:e.maxBytes,maxDimensionPx:e.maxDimensionPx,triggerOverBytes:a,triggerOverDimensions:s,outputMimeType:`image/jpeg`,outputBytes:c.byteLength,outputQuality:o,outputMaxSide:n,byteReductionPct:d}),{base64:c.toString(`base64`),mimeType:`image/jpeg`,resized:!0,width:r,height:i}}}let f=d?.buffer??t,p=(e.maxBytes/(1024*1024)).toFixed(0),m=(f.byteLength/(1024*1024)).toFixed(2),h=typeof r==`number`&&typeof i==`number`?`${r}x${i}px`:`unknown`,g=e.fileName?`${e.fileName} ${h}`:h;throw FW.warn(`Image resize failed to fit limits: ${g} best=${zW(f.byteLength)} limit=${zW(e.maxBytes)}`,{label:e.label,fileName:e.fileName,sourceMimeType:e.mimeType,sourceWidth:r,sourceHeight:i,sourceBytes:t.byteLength,maxDimensionPx:e.maxDimensionPx,maxBytes:e.maxBytes,smallestCandidateBytes:f.byteLength,triggerOverBytes:a,triggerOverDimensions:s}),Error(`Image could not be reduced below ${p}MB (got ${m}MB)`)}async function WW(e,t,n={}){let r=Math.max(n.maxDimensionPx??1200,1),i=Math.max(n.maxBytes??5242880,1),a=[],o;for(let n of e){if(LW(n)){let e=BW(n.text);e&&(o=e)}if(!IW(n)){a.push(n);continue}let e=n.data.trim();if(!e){a.push({type:`text`,text:`[${t}] omitted empty image payload`});continue}let s=NW(e);if(!s){a.push({type:`text`,text:`[${t}] omitted image payload: invalid base64`});continue}try{let e=RW(s)??n.mimeType,c=await UW({base64:s,mimeType:e,maxDimensionPx:r,maxBytes:i,label:t,fileName:HW({block:n,label:t,mediaPathHint:o})});a.push({...n,data:c.base64,mimeType:c.resized?c.mimeType:e})}catch(e){a.push({type:`text`,text:`[${t}] omitted image payload: ${String(e)}`})}}return a}async function GW(e,t,n={}){if(e.length===0)return{images:e,dropped:0};let r=(await WW(e,t,n)).filter(IW);return{images:r,dropped:Math.max(0,e.length-r.length)}}async function KW(e,t,n={}){let r=Array.isArray(e.content)?e.content:[];if(!r.some(e=>IW(e)||LW(e)))return e;let i=await WW(r,t,n);return{...e,content:i}}async function qW(e,t,n){let r=(n?.sanitizeMode??`full`)===`full`,i={maxDimensionPx:n?.maxDimensionPx,maxBytes:n?.maxBytes},a=n?.sanitizeToolCallIds===!0?AW(e,n.toolCallIdMode):e,o=[];for(let e of a){if(!e||typeof e!=`object`){o.push(e);continue}let a=e.role;if(a===`toolResult`){let n=e,r=await WW(Array.isArray(n.content)?n.content:[],t,i);o.push({...n,content:r});continue}if(a===`user`){let n=e,r=n.content;if(Array.isArray(r)){let e=await WW(r,t,i);o.push({...n,content:e});continue}}if(a===`assistant`){let a=e;if(a.stopReason===`error`){let e=a.content;if(Array.isArray(e)){let n=await WW(e,t,i);o.push({...a,content:n})}else o.push(a);continue}let s=a.content;if(Array.isArray(s)){if(!r){let e=await WW(s,t,i);o.push({...a,content:e});continue}let e=await WW((n?.preserveSignatures?s:QC(s,n?.sanitizeThoughtSignatures)).filter(e=>{if(!e||typeof e!=`object`)return!0;let t=e;return t.type!==`text`||typeof t.text!=`string`?!0:t.text.trim().length>0}),t,i);if(e.length===0)continue;o.push({...a,content:e});continue}}o.push(e)}return o}function JW(e){return e.trim().toLowerCase().replace(/\p{Emoji_Presentation}|\p{Extended_Pictographic}/gu,``).replace(/\s+/g,` `).trim()}function YW(e,t){return t.length===0||!e||e.length<10?!1:t.some(t=>!t||t.length<10?!1:e.includes(t)||t.includes(e))}function XW(e,t){if(t.length===0)return!1;let n=JW(e);return!n||n.length<10?!1:YW(n,t.map(JW))}function ZW(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function QW(e){return ZW(e)===`zai`}const $W=[`openai/gpt-5.4`,`openai/gpt-5.4-pro`,`openai/gpt-5.2`,`openai-codex/gpt-5.4`,`openai-codex/gpt-5.3-codex`,`openai-codex/gpt-5.3-codex-spark`,`openai-codex/gpt-5.2-codex`,`openai-codex/gpt-5.1-codex`,`github-copilot/gpt-5.2-codex`,`github-copilot/gpt-5.2`],eG=new Set($W.map(e=>e.toLowerCase())),tG=new Set($W.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e));function nG(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`adaptive`||n===`auto`)return`adaptive`;if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if([`off`].includes(t))return`off`;if([`on`,`enable`,`enabled`].includes(t))return`low`;if([`min`,`minimal`].includes(t))return`minimal`;if([`low`,`thinkhard`,`think-hard`,`think_hard`].includes(t))return`low`;if([`mid`,`med`,`medium`,`thinkharder`,`think-harder`,`harder`].includes(t))return`medium`;if([`high`,`ultra`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`,`max`].includes(t))return`high`;if([`think`].includes(t))return`minimal`}function rG(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let r=e?.trim().toLowerCase();return r?eG.has(`${r}/${n}`):tG.has(n)}function iG(e,t){let n=[`off`,`minimal`,`low`,`medium`,`high`];return rG(e,t)&&n.push(`xhigh`),n.push(`adaptive`),n}function aG(e,t){return QW(e)?[`off`,`on`]:iG(e,t)}function oG(e,t,n=`, `){return aG(e,t).join(n)}function sG(){let e=[...$W];return e.length===0?`unknown model`:e.length===1?e[0]:e.length===2?`${e[0]} or ${e[1]}`:`${e.slice(0,-1).join(`, `)} or ${e[e.length-1]}`}function cG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`].includes(t))return`off`;if([`full`,`all`,`everything`].includes(t))return`full`;if([`on`,`minimal`,`true`,`yes`,`1`].includes(t))return`on`}function lG(e){return cG(e)}function uG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`,`disable`,`disabled`].includes(t))return`off`;if([`on`,`true`,`yes`,`1`,`enable`,`enabled`].includes(t)||[`tokens`,`token`,`tok`,`minimal`,`min`].includes(t))return`tokens`;if([`full`,`session`].includes(t))return`full`}function dG(e){return uG(e)??`off`}function fG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`].includes(t))return`off`;if([`full`,`auto`,`auto-approve`,`autoapprove`].includes(t))return`full`;if([`ask`,`prompt`,`approval`,`approve`].includes(t))return`ask`;if([`on`,`true`,`yes`,`1`].includes(t))return`on`}function pG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`,`hide`,`hidden`,`disable`,`disabled`].includes(t))return`off`;if([`on`,`true`,`yes`,`1`,`show`,`visible`,`enable`,`enabled`].includes(t))return`on`;if([`stream`,`streaming`,`draft`,`live`].includes(t))return`stream`}function mG(e){let t=e.match(/supported values are:\s*([^\n.]+)/i)??e.match(/supported values:\s*([^\n.]+)/i);if(!t?.[1])return[];let n=t[1],r=Array.from(n.matchAll(/['"]([^'"]+)['"]/g)).map(e=>e[1]?.trim());return r.length>0?r.filter(e=>!!e):n.split(/,|\band\b/gi).map(e=>e.replace(/^[^a-zA-Z]+|[^a-zA-Z]+$/g,``).trim()).filter(Boolean)}function hG(e){let t=e.message?.trim();if(!t)return;let n=mG(t);if(n.length===0)return/not supported/i.test(t)&&!e.attempted.has(`off`)?`off`:void 0;for(let t of n){let n=nG(t);if(n&&!e.attempted.has(n))return n}}function gG(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!r||typeof r!=`object`){t.push(r);continue}if(r.role!==`assistant`){t.push(r);continue}let i=r,a=e[n+1];if((a&&typeof a==`object`?a.role:void 0)!==`user`){t.push(r);continue}let o=a,s=new Set;if(Array.isArray(o.content))for(let e of o.content)e&&e.type===`toolResult`&&e.toolUseId&&s.add(e.toolUseId);let c=Array.isArray(i.content)?i.content:[],l=c.filter(e=>e?e.type===`toolUse`?s.has(e.id||``):!0:!1);c.length>0&&l.length===0?t.push({...i,content:[{type:`text`,text:`[tool calls omitted]`}]}):t.push({...i,content:l})}return t}function _G(e){let{messages:t,role:n,merge:r}=e;if(!Array.isArray(t)||t.length===0)return t;let i=[],a;for(let e of t){if(!e||typeof e!=`object`){i.push(e);continue}let t=e.role;if(!t){i.push(e);continue}if(t===a&&a===n){let t=i[i.length-1],n=e;if(t&&typeof t==`object`){let e=t;i[i.length-1]=r(e,n);continue}}i.push(e),a=t}return i}function vG(e,t){let n=[...Array.isArray(e.content)?e.content:[],...Array.isArray(t.content)?t.content:[]];return{...e,content:n,...t.usage&&{usage:t.usage},...t.stopReason&&{stopReason:t.stopReason},...t.errorMessage&&{errorMessage:t.errorMessage}}}function yG(e){return _G({messages:e,role:`assistant`,merge:vG})}function bG(e,t){let n=[...Array.isArray(e.content)?e.content:[],...Array.isArray(t.content)?t.content:[]];return{...t,content:n,timestamp:t.timestamp??e.timestamp}}function xG(e){return _G({messages:gG(e),role:`user`,merge:bG})}const SG=64e3,CG=8e3,wG=/\brequest[_ ]?id\b\s*[:=]\s*["'()]*([A-Za-z0-9._:-]+)/i,TG=[String.raw`\b(?:x-)?api[-_]?key\b\s*[:=]\s*(["']?)([^\s"'\\;]+)\1`,String.raw`"(?:api[-_]?key|api_key)"\s*:\s*"([^"]+)"`,String.raw`(?:\bCookie\b\s*[:=]\s*[^;=\s]+=|;\s*[^;=\s]+=)([^;\s\r\n]+)`];function EG(){let e=r()?.redactPatterns;return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function DG(e,t){let n=e?.trim();if(n)return n.length>t?`${n.slice(0,t)}…`:n}function OG(e){let t=e?.trim();if(t)return t.length>SG?t.slice(0,SG):t}function kG(e,t=200){let n=e?.trim();if(!n)return;let r=Array.from(n).filter(e=>{let t=e.charCodeAt(0);return!(t<=8||t===11||t===12||t>=14&&t<=31||t===127)}).join(``).replace(/[\r\n\t]+/g,` `).replace(/\s+/g,` `).trim();return r.length>t?`${r.slice(0,t)}…`:r}function AG(e,t){return!e||!t?e:e.split(t).join(XC(t,{len:12}))}function jG(e){if(!e)return e;let t=EG();return ln(e,{mode:`tools`,patterns:[...un(),...t,...TG]})}function MG(e){if(e)return e.match(wG)?.[1]?.trim()||void 0}function NG(e){let t=e.message&&e.message.length>CG?e.message.slice(0,CG):e.message;return(e.httpCode||e.type||t?IH({httpCode:e.httpCode,type:e.type,message:t}):null)||(e.requestId?e.raw.split(e.requestId).join(`<request_id>`):UU(e.raw))}function PG(e){let t=OG(e);if(!t)return{};try{let e=GU(t),n=e?.requestId??MG(t),r=n?XC(n,{len:12}):void 0,i=NG({raw:t,requestId:n,httpCode:e?.httpCode,type:e?.type,message:e?.message}),a=AG(jG(t),n),o=AG(jG(e?.message),n);return{rawErrorPreview:DG(a,400),rawErrorHash:XC(t,{len:12}),rawErrorFingerprint:i?XC(i,{len:12}):void 0,httpCode:e?.httpCode,providerErrorType:e?.type,providerErrorMessagePreview:DG(o,200),requestIdHash:r}}catch{return{}}}function FG(e){let t=PG(e);return{textPreview:t.rawErrorPreview,textHash:t.rawErrorHash,textFingerprint:t.rawErrorFingerprint,httpCode:t.httpCode,providerErrorType:t.providerErrorType,providerErrorMessagePreview:t.providerErrorMessagePreview,requestIdHash:t.requestIdHash}}const IG=s(`agent/embedded`);function LG(e){let t=e.reason===`billing`||e.reason===`auth_permanent`?`disabled`:`cooldown`,n=e.previous?.cooldownUntil,r=e.previous?.disabledUntil,i=t===`disabled`?typeof r==`number`&&Number.isFinite(r)&&r>e.now&&r===e.next.disabledUntil:typeof n==`number`&&Number.isFinite(n)&&n>e.now&&n===e.next.cooldownUntil,a=XC(e.profileId,{len:12}),o=kG(e.runId)??`-`,s=kG(e.provider)??`-`;IG.warn(`auth profile failure state updated`,{event:`auth_profile_failure_state_updated`,tags:[`error_handling`,`auth_profiles`,t],runId:e.runId,profileId:a,provider:e.provider,reason:e.reason,windowType:t,windowReused:i,previousErrorCount:e.previous?.errorCount,errorCount:e.next.errorCount,previousCooldownUntil:n,cooldownUntil:e.next.cooldownUntil,previousDisabledUntil:r,disabledUntil:e.next.disabledUntil,previousDisabledReason:e.previous?.disabledReason,disabledReason:e.next.disabledReason,failureCounts:e.next.failureCounts,consoleMessage:`auth profile failure state updated: runId=${o} profile=${a} provider=${s} reason=${e.reason} window=${t} reused=${String(i)}`})}const RG=[`auth_permanent`,`auth`,`billing`,`format`,`model_not_found`,`overloaded`,`timeout`,`rate_limit`,`unknown`],zG=new Set(RG),BG=new Map(RG.map((e,t)=>[e,t]));function VG(e){let t=N(e??``);return t===`openrouter`||t===`kilocode`}function HG(e){let t=[e.cooldownUntil,e.disabledUntil].filter(e=>typeof e==`number`).filter(e=>Number.isFinite(e)&&e>0);return t.length===0?null:Math.max(...t)}function UG(e,t,n){if(VG(e.profiles[t]?.provider))return!1;let r=e.usageStats?.[t];if(!r)return!1;let i=HG(r);return i?(n??Date.now())<i:!1}function WG(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>0&&t<e}function GG(e){let t=e.now??Date.now(),n=new Map,r=(e,t)=>{!zG.has(e)||t<=0||!Number.isFinite(t)||n.set(e,(n.get(e)??0)+t)};for(let n of e.profileIds){let i=e.store.usageStats?.[n];if(!i)continue;if(WG(i.disabledUntil,t)&&i.disabledReason&&zG.has(i.disabledReason)){r(i.disabledReason,1e3);continue}if(!WG(i.cooldownUntil,t))continue;let a=!1;for(let[e,t]of Object.entries(i.failureCounts??{})){let n=e,i=typeof t==`number`?t:0;!zG.has(n)||i<=0||(r(n,i),a=!0)}a||r(`unknown`,1)}if(n.size===0)return null;let i=null,a=-1,o=2**53-1;for(let e of RG){let t=n.get(e);if(typeof t!=`number`)continue;let r=BG.get(e)??2**53-1;(t>a||t===a&&r<o)&&(i=e,a=t,o=r)}return i}function KG(e,t){let n=null;for(let r of t){let t=e.usageStats?.[r];if(!t)continue;let i=HG(t);typeof i!=`number`||!Number.isFinite(i)||i<=0||(n===null||i<n)&&(n=i)}return n}function qG(e,t){let n=e.usageStats;if(!n)return!1;let r=t??Date.now(),i=!1;for(let[e,t]of Object.entries(n)){if(!t)continue;let a=!1,o=typeof t.cooldownUntil==`number`&&Number.isFinite(t.cooldownUntil)&&t.cooldownUntil>0&&r>=t.cooldownUntil,s=typeof t.disabledUntil==`number`&&Number.isFinite(t.disabledUntil)&&t.disabledUntil>0&&r>=t.disabledUntil;o&&(t.cooldownUntil=void 0,a=!0),s&&(t.disabledUntil=void 0,t.disabledReason=void 0,a=!0),a&&!HG(t)&&(t.errorCount=0,t.failureCounts=void 0),a&&(n[e]=t,i=!0)}return i}async function JG(e){let{store:t,profileId:n,agentDir:r}=e,i=await ll({agentDir:r,updater:e=>e.profiles[n]?(eK(e,n,e=>$G(e,{lastUsed:Date.now()})),!0):!1});if(i){t.usageStats=i.usageStats;return}t.profiles[n]&&(eK(t,n,e=>$G(e,{lastUsed:Date.now()})),Tl(t,r))}function YG(e){let t=Math.max(1,e);return Math.min(3600*1e3,60*1e3*5**Math.min(t-1,3))}function XG(e){let t={billingBackoffHours:5,billingMaxHours:24,failureWindowHours:24},n=(e,t)=>typeof e==`number`&&Number.isFinite(e)&&e>0?e:t,r=e.cfg?.auth?.cooldowns,i=n((()=>{let t=r?.billingBackoffHoursByProvider;if(t){for(let[n,r]of Object.entries(t))if(N(n)===e.providerId)return r}})()??r?.billingBackoffHours,t.billingBackoffHours),a=n(r?.billingMaxHours,t.billingMaxHours),o=n(r?.failureWindowHours,t.failureWindowHours);return{billingBackoffMs:i*60*60*1e3,billingMaxMs:a*60*60*1e3,failureWindowMs:o*60*60*1e3}}function ZG(e){let t=Math.max(1,e.errorCount),n=Math.max(6e4,e.baseMs),r=Math.max(n,e.maxMs),i=n*2**Math.min(t-1,10);return Math.min(r,i)}function QG(e,t){if(VG(e.profiles[t]?.provider))return null;let n=e.usageStats?.[t];return n?HG(n):null}function $G(e,t){return{...e,errorCount:0,cooldownUntil:void 0,disabledUntil:void 0,disabledReason:void 0,failureCounts:void 0,...t}}function eK(e,t,n){e.usageStats=e.usageStats??{},e.usageStats[t]=n(e.usageStats[t])}function tK(e){let{existingUntil:t,now:n,recomputedUntil:r}=e;return typeof t==`number`&&Number.isFinite(t)&&t>n?t:r}function nK(e){let t=e.cfgResolved.failureWindowMs,n=typeof e.existing.lastFailureAt==`number`&&e.existing.lastFailureAt>0&&e.now-e.existing.lastFailureAt>t,r=HG(e.existing),i=typeof r==`number`&&e.now>=r,a=n||i,o=(a?0:e.existing.errorCount??0)+1,s=a?{}:{...e.existing.failureCounts};s[e.reason]=(s[e.reason]??0)+1;let c={...e.existing,errorCount:o,failureCounts:s,lastFailureAt:e.now};if(e.reason===`billing`||e.reason===`auth_permanent`){let t=ZG({errorCount:s[e.reason]??1,baseMs:e.cfgResolved.billingBackoffMs,maxMs:e.cfgResolved.billingMaxMs});c.disabledUntil=tK({existingUntil:e.existing.disabledUntil,now:e.now,recomputedUntil:e.now+t}),c.disabledReason=e.reason}else{let t=YG(o);c.cooldownUntil=tK({existingUntil:e.existing.cooldownUntil,now:e.now,recomputedUntil:e.now+t})}return c}async function rK(e){let{store:t,profileId:n,reason:r,agentDir:i,cfg:a,runId:o}=e,s=t.profiles[n];if(!s||VG(s.provider))return;let c,l,u=0,d=await ll({agentDir:i,updater:e=>{let t=e.profiles[n];if(!t||VG(t.provider))return!1;let i=Date.now(),o=XG({cfg:a,providerId:N(t.provider)});l=e.usageStats?.[n],u=i;let s=nK({existing:l??{},now:i,reason:r,cfgResolved:o});return c=s,eK(e,n,()=>s),!0}});if(d){t.usageStats=d.usageStats,c&&LG({runId:o,profileId:n,provider:s.provider,reason:r,previous:l,next:c,now:u});return}if(!t.profiles[n])return;let f=Date.now(),p=XG({cfg:a,providerId:N(t.profiles[n]?.provider??``)});l=t.usageStats?.[n];let m=nK({existing:l??{},now:f,reason:r,cfgResolved:p});c=m,eK(t,n,()=>m),Tl(t,i),LG({runId:o,profileId:n,provider:t.profiles[n]?.provider??s.provider,reason:r,previous:l,next:c,now:f})}function iK(e){let t=tc(e.provider),n=e.store.profiles[e.profileId];if(!n)return{eligible:!1,reasonCode:`profile_missing`};if(tc(n.provider)!==t)return{eligible:!1,reasonCode:`provider_mismatch`};let r=e.cfg?.auth?.profiles?.[e.profileId];if(r){if(tc(r.provider)!==t)return{eligible:!1,reasonCode:`provider_mismatch`};if(r.mode!==n.type&&!(r.mode===`oauth`&&n.type===`token`))return{eligible:!1,reasonCode:`mode_mismatch`}}let i=MC({credential:n,now:e.now});return{eligible:i.eligible,reasonCode:i.reasonCode}}function aK(e){let{cfg:t,store:n,provider:r,preferredProfile:i}=e,a=N(r),o=tc(r),s=Date.now();qG(n,s);let c=nc(n.order,a),l=nc(t?.auth?.order,a),u=c??l,d=t?.auth?.profiles?Object.entries(t.auth.profiles).filter(([,e])=>tc(e.provider)===o).map(([e])=>e):[],f=u??(d.length>0?d:Al(n,r));if(f.length===0)return[];let p=e=>iK({cfg:t,store:n,provider:o,profileId:e,now:s}).eligible,m=f.filter(p),h=f.every(e=>!n.profiles[e]);m.length===0&&d.length>0&&h&&(m=Al(n,r).filter(p));let g=El(m);if(u&&u.length>0){let e=[],t=[];for(let r of g)if(UG(n,r)){let e=HG(n.usageStats?.[r]??{})??s;t.push({profileId:r,cooldownUntil:e})}else e.push(r);let r=t.toSorted((e,t)=>e.cooldownUntil-t.cooldownUntil).map(e=>e.profileId),a=[...e,...r];return i&&a.includes(i)?[i,...a.filter(e=>e!==i)]:a}let _=oK(g,n);return i&&_.includes(i)?[i,..._.filter(e=>e!==i)]:_}function oK(e,t){let n=Date.now(),r=[],i=[];for(let n of e)UG(t,n)?i.push(n):r.push(n);let a=r.map(e=>{let n=t.profiles[e]?.type;return{profileId:e,typeScore:n===`oauth`?0:n===`token`?1:n===`api_key`?2:3,lastUsed:t.usageStats?.[e]?.lastUsed??0}}).toSorted((e,t)=>e.typeScore===t.typeScore?e.lastUsed-t.lastUsed:e.typeScore-t.typeScore).map(e=>e.profileId),o=i.map(e=>({profileId:e,cooldownUntil:HG(t.usageStats?.[e]??{})??n})).toSorted((e,t)=>e.cooldownUntil-t.cooldownUntil).map(e=>e.profileId);return[...a,...o]}var sK=e({CLAUDE_CLI_PROFILE_ID:()=>fr,CODEX_CLI_PROFILE_ID:()=>pr,ensureAuthProfileStore:()=>wl});export{sU as $,JC as $a,Sc as $c,eE as $i,Jr as $l,aL as $n,Tg as $o,lA as $r,Ud as $s,lB as $t,JW as A,Xw as Aa,Qc as Ac,XE as Ai,Ya as Al,rz as An,Vx as Ao,aN as Ar,zp as As,IV as At,bW as B,xw as Ba,lc as Bc,yE as Bi,Mi as Bl,tR as Bn,Jx as Bo,SM as Br,ip as Bs,dV as Bt,nG as C,sT as Ca,kl as Cc,WD as Ci,To as Cl,gz as Cn,CS as Co,iP as Cr,wm as Cs,eH as Ct,rG as D,Kw as Da,Cl as Dc,QE as Di,eo as Dl,sz as Dn,zx as Do,kN as Dr,nm as Ds,YV as Dt,dG as E,Ww as Ea,bl as Ec,lD as Ei,$a as El,oz as En,Yx as Eo,TN as Er,um as Es,XV as Et,NW as F,kw as Fa,vc as Fc,UE as Fi,ia as Fl,aR as Fn,Kx as Fo,iN as Fr,Rf as Fs,jV as Ft,IU as G,aw as Ga,N as Gc,pE as Gi,Ti as Gl,TL as Gn,Hv as Go,zA as Gr,Df as Gs,kB as Gt,hW as H,fw as Ha,ec as Hc,DE as Hi,Ii as Hl,UL as Hn,Eb as Ho,yM as Hr,xp as Hs,qB as Ht,jW as I,Nw as Ia,dc as Ic,WE as Ii,aa as Il,cR as In,qx as Io,JM as Ir,Pp as Is,GV as It,KU as J,tw as Ja,uc as Jc,aE as Ji,xi as Jl,pL as Jn,Pv as Jo,bA as Jr,mf as Js,DB as Jt,qU as K,iw as Ka,cc as Kc,fE as Ki,Ci as Kl,bL as Kn,Ov as Ko,LA as Kr,Of as Ks,jB as Kt,wW as L,jw as La,fc as Lc,NE as Li,Ji as Ll,nR as Ln,rx as Lo,jM as Lr,Np as Ls,MV as Lt,GW as M,Rw as Ma,Zc as Mc,KE as Mi,Qa as Ml,QR as Mn,wx as Mo,eN as Mr,Up as Ms,OV as Mt,KW as N,Iw as Na,Lc as Nc,GE as Ni,Qi as Nl,ZR as Nn,Ux as No,XM as Nr,Hp as Ns,WV as Nt,XW as O,Gw as Oa,sl as Oc,$E as Oi,to as Ol,iz as On,Dx as Oo,CN as Or,lm as Os,JV as Ot,PW as P,zw as Pa,Dc as Pc,zE as Pi,$i as Pl,NR as Pn,Gx as Po,QM as Pr,Lp as Ps,TV as Pt,cW as Q,YC as Qa,pc as Qc,sE as Qi,Zr as Ql,QI as Qn,X_ as Qo,cA as Qr,rf as Qs,sB as Qt,TW as R,Mw as Ra,nc as Rc,RE as Ri,Xi as Rl,ZL as Rn,Rx as Ro,EM as Rr,Ep as Rs,UV as Rt,pG as S,uT as Sa,Ol as Sc,GD as Si,zo as Sl,mz as Sn,wS as So,mP as Sr,Om as Ss,rH as St,lG as T,$w as Ta,wl as Tc,dD as Ti,Mo as Tl,cz as Tn,Zx as To,xN as Tr,fm as Ts,ZV as Tt,QH as U,cw as Ua,sc as Uc,EE as Ui,Ai as Ul,WL as Un,zv as Uo,uM as Ur,bp as Us,NB as Ut,xW as V,dw as Va,ic as Vc,TE as Vi,Ni as Vl,JL as Vn,Rb as Vo,CM as Vr,np as Vs,uV as Vt,fW as W,pw as Wa,wc as Wc,_E as Wi,vi as Wl,GL as Wn,Bv as Wo,Dj as Wr,sp as Ws,MB as Wt,lW as X,ow as Xa,hc as Xc,iE as Xi,Yr as Xl,XI as Xn,Rv as Xo,gA as Xr,bf as Xs,EB as Xt,UU as Y,ew as Ya,mc as Yc,oE as Yi,_i as Yl,mL as Yn,Lv as Yo,pA as Yr,yf as Ys,OB as Yt,nW as Z,XC as Za,Cc as Zc,cE as Zi,Xr as Zl,oL as Zn,wv as Zo,dA as Zr,sf as Zs,oB as Zt,oG as _,ST as _a,Fl as _c,uO as _i,ts as _l,Tz as _n,LS as _o,HP as _r,Sh as _s,kH as _t,KG as a,zT as aa,_d as ac,Tk as ai,qs as al,Zz as an,wC as ao,sL as ar,Qh as as,WU as at,Dr as au,iG as b,_T as ba,jl as bc,KD as bi,_o as bl,Sz as bn,ES as bo,EP as br,Nm as bs,yH as bt,JG as c,XT as ca,$u as cc,nk as ci,fs as cl,Gz as cn,_C as co,BI as cr,Uh as cs,oW as ct,Sr as cu,PG as d,IT as da,hu as dc,vO as di,gs as dl,zz as dn,BS as do,YI as dr,Th as ds,WH as dt,yr as du,VT as ea,Td as ec,Fk as ei,gc as el,cB as en,MC as eo,$I as er,I as es,nU as et,Kr as eu,FG as f,LT as fa,Ql as fc,bO as fi,ys as fl,Vz as fn,zS as fo,JI as fr,wh as fs,NH as ft,vr as fu,hG as g,wT as ga,Rl as gc,dO as gi,ns as gl,Ez as gn,KS as go,eF as gr,Ah as gs,AH as gt,yG as h,CT as ha,Bl as hc,qD as hi,rs as hl,Nz as hn,WS as ho,tF as hr,Oh as hs,PH as ht,pr as hu,qG as i,$T as ia,hd as ic,bk as ii,Ls as il,iB as in,CC as io,tL as ir,Kh as is,YU as it,Tr as iu,qW as j,Yw as ja,el as jc,ZE as ji,Za as jl,tz as jn,H as jo,ZM as jr,Wp as js,DV as jt,YW as k,Jw as ka,ll as kc,YE as ki,qa as kl,az as kn,Bx as ko,lN as kr,dm as ks,qV as kt,QG as l,QT as la,Xu as lc,rk as li,Ss as ll,qz as ln,gC as lo,HI as lr,ph as ls,JU as lt,xr as lu,xG as m,TT as ma,Vl as mc,gO as mi,ds as ml,Pz as mn,VS as mo,kF as mr,jh as ms,FH as mt,fr as mu,iK as n,rE as na,yd as nc,vk as ni,xc as nl,TB as nn,bC as no,eL as nr,ag as ns,pW as nt,kr as nu,UG as o,RT as oa,gd as oc,qO as oi,xs as ol,Qz as on,QS as oo,cL as or,Vh as os,FU as ot,Or as ou,kG as p,MT as pa,$l as pc,yO as pi,bs as pl,Rz as pn,US as po,JF as pr,kh as ps,MH as pt,_r as pu,ZH as q,$C as qa,bc as qc,uE as qi,Ei as ql,yL as qn,Fv as qo,xA as qr,kf as qs,AB as qt,aK as r,JT as ra,pd as rc,wk as ri,js as rl,uB as rn,DC as ro,rL as rr,ig as rs,oU as rt,jr as ru,rK as s,YT as sa,md as sc,YO as si,us as sl,Jz as sn,vC as so,UI as sr,Zh as ss,iW as st,Cr as su,sK as t,W as ta,vd as tc,Ek as ti,_c as tl,rB as tn,kC as to,lL as tr,sg as ts,mW as tt,Gr as tu,GG as u,NT as ua,Zu as uc,TO as ui,vs as ul,Fz as un,qS as uo,VI as ur,Ch as us,KH as ut,br as uu,sG as v,pT as va,El as vc,iO as vi,$o as vl,wz as vn,DS as vo,OP as vr,fh as vs,SH as vt,uG as w,rT as wa,cl as wc,pD as wi,Io as wl,dz as wn,Qx as wo,wN as wr,pm as ws,nH as wt,fG as x,dT as xa,Dl as xc,VD as xi,so as xl,_z as xn,TS as xo,hP as xr,Pm as xs,sH as xt,aG as y,mT as ya,Al as yc,lO as yi,go as yl,xz as yn,OS as yo,TP as yr,Mm as ys,xH as yt,AW as z,bw as za,yc as zc,vE as zi,Oi as zl,QL as zn,Wx as zo,DM as zr,rp as zs,mV as zt};
65
+ `)}function zU(e){if(PU(e))return!0;let t=e.match(fU);if(!t)return!1;let n=Number(t[1]);if(!Number.isFinite(n)||n<400)return!1;let r=t[2].toLowerCase();return _U.some(e=>r.includes(e))}function BU(e){return nU(e)?WU(e)||zU(e)||uU.test(e)||dU.test(e):!1}function VU(e){if(!e||typeof e!=`object`||Array.isArray(e))return!1;let t=e;if(t.type===`error`||typeof t.request_id==`string`||typeof t.requestId==`string`)return!0;if(`error`in t){let e=t.error;if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;if(typeof t.message==`string`||typeof t.type==`string`||typeof t.code==`string`)return!0}}return!1}function HU(e){if(!e)return null;let t=e.trim();if(!t)return null;let n=[t];cU.test(t)&&n.push(t.replace(cU,``).trim());for(let e of n)if(!(!e.startsWith(`{`)||!e.endsWith(`}`)))try{let t=JSON.parse(e);if(VU(t))return t}catch{}return null}function UU(e){if(!e)return null;let t=HU(e);return t?IH(t):null}function WU(e){return UU(e)!==null}function GU(e){if(!e)return null;let t=e.trim();if(!t)return null;let n,r=t,i=r.match(/^(\d{3})\s+(.+)$/s);i&&(n=i[1],r=i[2].trim());let a=HU(r);if(!a)return null;let o=typeof a.request_id==`string`?a.request_id:typeof a.requestId==`string`?a.requestId:void 0,s=typeof a.type==`string`?a.type:void 0,c=typeof a.message==`string`?a.message:void 0,l,u;if(a.error&&typeof a.error==`object`&&!Array.isArray(a.error)){let e=a.error;typeof e.type==`string`&&(l=e.type),typeof e.code==`string`&&!l&&(l=e.code),typeof e.message==`string`&&(u=e.message)}return{httpCode:n,type:l??s,message:u??c,requestId:o}}function KU(e){let t=(e??``).trim();if(!t)return`LLM request failed with an unknown error.`;let n=NU(t);if(n&&PU(t))return`The AI service is temporarily unavailable (HTTP ${n.code}). Please try again in a moment.`;let r=t.match(fU);if(r){let e=r[2].trim();if(!e.startsWith(`{`))return`HTTP ${r[1]}: ${e}`}let i=GU(t);if(i?.message){let e=i.httpCode?`HTTP ${i.httpCode}`:`LLM error`,t=i.type?` ${i.type}`:``,n=i.requestId?` (request_id: ${i.requestId})`:``;return`${e}${t}: ${i.message}${n}`}return t.length>600?`${t.slice(0,600)}…`:t}function qU(e,t){let n=(e.errorMessage??``).trim();if(e.stopReason!==`error`&&!n)return;if(!n)return`LLM request failed with an unknown error.`;let r=n.match(/unknown tool[:\s]+["']?([a-z0-9_-]+)["']?/i)??n.match(/tool\s+["']?([a-z0-9_-]+)["']?\s+(?:not found|is not available)/i);if(r?.[1]){let e=cH({cfg:t?.cfg,sessionKey:t?.sessionKey,toolName:r[1]});if(e)return e}if(nU(n))return`Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.`;if(eU(n))return`Reasoning is required for this model endpoint. Use /think minimal (or any non-off level) and try again.`;if(/incorrect role information|roles must alternate|400.*role|"message".*role.*information/i.test(n))return`Message ordering conflict - please try again. If this persists, use /new to start a fresh session.`;if(tW(n))return`Session history looks corrupted (tool call input missing). Use /new to start a fresh session. If this keeps happening, reset the session or delete the corrupted session transcript.`;let i=n.match(/"type":"invalid_request_error".*?"message":"([^"]+)"/);return i?.[1]?`LLM request rejected: ${i[1]}`:$H(n)||(WH(n)?`LLM request timed out.`:KH(n)?ZH(t?.provider,t?.model??e.model):zU(n)||WU(n)?KU(n):(n.length>600&&XH.warn(`Long error truncated: ${n.slice(0,200)}`),n.length>600?`${n.slice(0,600)}…`:n))}function JU(e,t){if(!e)return e;let n=t?.errorContext??!1,r=LU(e),i=r.trim();if(!i)return``;if(n){if(/incorrect role information|roles must alternate/i.test(i))return`Message ordering conflict - please try again. If this persists, use /new to start a fresh session.`;if(BU(i))return`Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.`;if(KH(i))return QH;if(WU(i)||zU(i))return KU(i);if(uU.test(i))return $H(i)||(WH(i)?`LLM request timed out.`:KU(i))}return RU(r.replace(/^(?:[ \t]*\r?\n)+/,``))}function YU(e){return!e||e.stopReason!==`error`?!1:UH(e.errorMessage??``)}const XU=/tool_(?:use|call)\.(?:input|arguments).*?(?:field required|required)/i,ZU=/messages\.\d+\.content\.\d+\.tool_(?:use|call)\.(?:input|arguments)/i,QU=/image dimensions exceed max allowed size for many-image requests:\s*(\d+)\s*pixels/i,$U=/messages\.(\d+)\.content\.(\d+)\.image/i,eW=/image exceeds\s*(\d+(?:\.\d+)?)\s*mb/i;function tW(e){return e?XU.test(e)||ZU.test(e):!1}function nW(e){return!e||e.stopReason!==`error`?!1:KH(e.errorMessage??``)}function rW(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`"type":"api_error"`)&&t.includes(`internal server error`)}function iW(e){if(!e||!e.toLowerCase().includes(`image dimensions exceed max allowed size`))return null;let t=e.match(QU),n=e.match($U);return{maxDimensionPx:t?.[1]?Number.parseInt(t[1],10):void 0,messageIndex:n?.[1]?Number.parseInt(n[1],10):void 0,contentIndex:n?.[2]?Number.parseInt(n[2],10):void 0,raw:e}}function aW(e){return!!iW(e)}function oW(e){if(!e)return null;let t=e.toLowerCase();if(!t.includes(`image exceeds`)||!t.includes(`mb`))return null;let n=e.match(eW);return{maxMb:n?.[1]?Number.parseFloat(n[1]):void 0,raw:e}}function sW(e){return e?!!oW(e):!1}function cW(e){return!aW(e)&&HH(e)}function lW(e){return!e||e.stopReason!==`error`?!1:JH(e.errorMessage??``)}function uW(e){if(!e)return!1;let t=e.toLowerCase();return!!(t.includes(`unknown model`)||t.includes(`model not found`)||t.includes(`model_not_found`)||t.includes(`not_found_error`)||t.includes(`does not exist`)&&t.includes(`model`)||t.includes(`invalid model`)&&!t.includes(`invalid model reference`)||/models\/[^\s]+ is not found/i.test(e)||/\b404\b/.test(e)&&/not[-_ ]?found/i.test(e))}function dW(e){if(!e)return!1;let t=e.toLowerCase();return t.includes(`session not found`)||t.includes(`session does not exist`)||t.includes(`session expired`)||t.includes(`session invalid`)||t.includes(`conversation not found`)||t.includes(`conversation does not exist`)||t.includes(`conversation expired`)||t.includes(`conversation invalid`)||t.includes(`no such session`)||t.includes(`invalid session`)||t.includes(`session id not found`)||t.includes(`conversation id not found`)}function fW(e){return aW(e)||sW(e)?null:dW(e)?`session_expired`:uW(e)?`model_not_found`:MU(e)||(GH(e)?KH(e)?`billing`:`rate_limit`:UH(e)?`rate_limit`:YH(e)?`overloaded`:FU(e)?NU(e.trim())?.code===529?`overloaded`:`timeout`:rW(e)?`timeout`:cW(e)?`format`:KH(e)?`billing`:WH(e)?`timeout`:qH(e)?`auth_permanent`:JH(e)?`auth`:null)}function pW(e){return fW(e)!==null}function mW(e){return!e||e.stopReason!==`error`?!1:pW(e.errorMessage??``)}function hW(e){return e===`google-gemini-cli`||e===`google-generative-ai`}function gW(e){if(!e)return null;let t=null;if(typeof e==`string`){let n=e.trim();if(!n.startsWith(`{`)||!n.endsWith(`}`))return null;try{t=JSON.parse(n)}catch{return null}}else typeof e==`object`&&(t=e);if(!t)return null;let n=typeof t.id==`string`?t.id:``,r=typeof t.type==`string`?t.type:``;return n.startsWith(`rs_`)&&(r===`reasoning`||r.startsWith(`reasoning.`))?{id:n,type:r}:null}function _W(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(!t||typeof t!=`object`||t.type!==`thinking`)return!0}return!1}function vW(e){let t=e.indexOf(`|`);return t<=0||t>=e.length-1?{callId:e}:{callId:e.slice(0,t),itemId:e.slice(t+1)}}function yW(e){return e===`toolCall`||e===`toolUse`||e===`functionCall`}function bW(e){let t=!1,n=[],r=null;for(let i of e){if(!i||typeof i!=`object`){r=null,n.push(i);continue}let e=i.role;if(e===`assistant`){let e=i;if(!Array.isArray(e.content)){r=null,n.push(i);continue}let a=new Map,o=!1,s=!1,c=e.content.map(e=>{if(!e||typeof e!=`object`)return e;let t=e;if(t.type===`thinking`&&gW(t.thinkingSignature))return o=!0,e;let n=e;if(!yW(n.type)||typeof n.id!=`string`)return e;let r=vW(n.id);return o||!r.itemId||!r.itemId.startsWith(`fc_`)?e:(s=!0,a.set(n.id,r.callId),{...e,id:r.callId})});if(r=a.size>0?a:null,!s){n.push(i);continue}t=!0,n.push({...e,content:c});continue}if(e===`toolResult`&&r&&r.size>0){let e=i,a=!1,o={};if(typeof e.toolCallId==`string`){let t=r.get(e.toolCallId);t&&t!==e.toolCallId&&(o.toolCallId=t,a=!0)}if(typeof e.toolUseId==`string`){let t=r.get(e.toolUseId);t&&t!==e.toolUseId&&(o.toolUseId=t,a=!0)}if(!a){n.push(i);continue}t=!0,n.push({...e,...o});continue}r=null,n.push(i)}return t?n:e}function xW(e){let t=[];for(let n of e){if(!n||typeof n!=`object`){t.push(n);continue}if(n.role!==`assistant`){t.push(n);continue}let e=n;if(!Array.isArray(e.content)){t.push(n);continue}let r=!1,i=[];for(let t=0;t<e.content.length;t++){let n=e.content[t];if(!n||typeof n!=`object`){i.push(n);continue}let a=n;if(a.type!==`thinking`){i.push(n);continue}if(!gW(a.thinkingSignature)){i.push(n);continue}if(_W(e.content,t)){i.push(n);continue}r=!0}if(!r){t.push(n);continue}i.length!==0&&t.push({...e,content:i})}return t}const SW=new Set([`toolCall`,`toolUse`,`functionCall`]);function CW(e,t=`strict`){if(!e||typeof e!=`string`)return t===`strict9`?`defaultid`:`defaulttoolid`;if(t===`strict9`){let t=e.replace(/[^a-zA-Z0-9]/g,``);return t.length>=9?t.slice(0,9):t.length>0?EW(t,9):EW(`sanitized`,9)}let n=e.replace(/[^a-zA-Z0-9]/g,``);return n.length>0?n:`sanitizedtoolid`}function wW(e){let t=e.content;if(!Array.isArray(t))return[];let n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e;typeof t.id!=`string`||!t.id||typeof t.type==`string`&&SW.has(t.type)&&n.push({id:t.id,name:typeof t.name==`string`?t.name:void 0})}return n}function TW(e){let t=e.toolCallId;if(typeof t==`string`&&t)return t;let n=e.toolUseId;return typeof n==`string`&&n?n:null}function EW(e,t=8){return Vn(`sha256`).update(e).digest(`hex`).slice(0,t)}function DW(e){if(e.mode===`strict9`){let t=CW(e.id,e.mode),n=t.length>=9?t.slice(0,9):``;if(n&&!e.used.has(n))return n;for(let t=0;t<1e3;t+=1){let n=EW(`${e.id}:${t}`,9);if(!e.used.has(n))return n}return EW(`${e.id}:${Date.now()}`,9)}let t=CW(e.id,e.mode).slice(0,40);if(!e.used.has(t))return t;let n=EW(e.id),r=e.mode===`strict`?``:`_`,i=40-r.length-n.length,a=`${t.length>i?t.slice(0,i):t}${r}${n}`;if(!e.used.has(a))return a;for(let t=2;t<1e3;t+=1){let n=e.mode===`strict`?`x${t}`:`_${t}`,r=`${a.slice(0,40-n.length)}${n}`;if(!e.used.has(r))return r}let o=e.mode===`strict`?`t${Date.now()}`:`_${Date.now()}`;return`${a.slice(0,40-o.length)}${o}`}function OW(e){let t=e.message.content;if(!Array.isArray(t))return e.message;let n=!1,r=t.map(t=>{if(!t||typeof t!=`object`)return t;let r=t,i=r.type,a=r.id;if(i!==`functionCall`&&i!==`toolUse`&&i!==`toolCall`||typeof a!=`string`||!a)return t;let o=e.resolve(a);return o===a?t:(n=!0,{...t,id:o})});return n?{...e.message,content:r}:e.message}function kW(e){let t=typeof e.message.toolCallId==`string`&&e.message.toolCallId?e.message.toolCallId:void 0,n=e.message.toolUseId,r=typeof n==`string`&&n?n:void 0,i=t?e.resolve(t):void 0,a=r?e.resolve(r):void 0;return i===t&&a===r?e.message:{...e.message,...i&&{toolCallId:i},...a&&{toolUseId:a}}}function AW(e,t=`strict`){let n=new Map,r=new Set,i=e=>{let i=n.get(e);if(i)return i;let a=DW({id:e,used:r,mode:t});return n.set(e,a),r.add(a),a},a=!1,o=e.map(e=>{if(!e||typeof e!=`object`)return e;let t=e.role;if(t===`assistant`){let t=OW({message:e,resolve:i});return t!==e&&(a=!0),t}if(t===`toolResult`){let t=kW({message:e,resolve:i});return t!==e&&(a=!0),t}return e});return a?o:e}function jW(e){let t=0;for(let n=0;n<e.length;n+=1)e.charCodeAt(n)<=32||(t+=1);if(t===0)return 0;let n=0,r=e.length-1;for(;r>=0&&e.charCodeAt(r)<=32;)--r;if(r>=0&&e[r]===`=`){for(n=1,--r;r>=0&&e.charCodeAt(r)<=32;)--r;r>=0&&e[r]===`=`&&(n=2)}let i=Math.floor(t*3/4)-n;return Math.max(0,i)}const MW=/^[A-Za-z0-9+/]+={0,2}$/;function NW(e){let t=e.replace(/\s+/g,``);if(!(!t||t.length%4!=0||!MW.test(t)))return t}function PW(e){let t=e?.agents?.defaults?.imageMaxDimensionPx;return typeof t!=`number`||!Number.isFinite(t)?{}:{maxDimensionPx:Math.max(1,Math.floor(t))}}const FW=s(`agents/tool-images`);function IW(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`image`&&typeof t.data==`string`&&typeof t.mimeType==`string`}function LW(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.type===`text`&&typeof t.text==`string`}function RW(e){let t=e.trim();if(t){if(t.startsWith(`/9j/`))return`image/jpeg`;if(t.startsWith(`iVBOR`))return`image/png`;if(t.startsWith(`R0lGOD`))return`image/gif`}}function zW(e){return!Number.isFinite(e)||e<1024?`${Math.max(0,Math.round(e))}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(2)}MB`}function BW(e){for(let t of e.split(/\r?\n/u)){let e=t.trim();if(!e.startsWith(`MEDIA:`))continue;let n=e.slice(6).trim();if(n)return(n.match(/^`([^`]+)`$/u)?.[1]??n).trim()}}function VW(e){let t=e.trim();if(!t)return;try{let e=new URL(t).pathname.split(`/`).filter(Boolean).at(-1);return e&&e.length>0?e:void 0}catch{}let n=t.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1);return n&&n.length>0?n:void 0}function HW(e){let t=e.block;for(let e of[`fileName`,`filename`,`path`,`url`]){let n=t[e];if(typeof n!=`string`||n.trim().length===0)continue;let r=VW(n);if(r)return r}if(typeof t.name==`string`&&t.name.trim().length>0)return t.name.trim();if(e.mediaPathHint){let t=VW(e.mediaPathHint);if(t)return t}if(typeof e.label==`string`&&e.label.startsWith(`read:`)){let t=VW(e.label.slice(5));if(t)return t}}async function UW(e){let t=Buffer.from(e.base64,`base64`),n=await xN(t),r=n?.width,i=n?.height,a=t.byteLength>e.maxBytes,o=typeof r==`number`&&typeof i==`number`,s=o&&(r>e.maxDimensionPx||i>e.maxDimensionPx);if(o&&!a&&r<=e.maxDimensionPx&&i<=e.maxDimensionPx)return{base64:e.base64,mimeType:e.mimeType,resized:!1,width:r,height:i};let c=o?Math.max(r??0,i??0):e.maxDimensionPx,l=c>0?Math.min(e.maxDimensionPx,c):e.maxDimensionPx,u=fN(e.maxDimensionPx,l),d=null;for(let n of u)for(let o of dN){let c=await CN({buffer:t,maxSide:n,quality:o,withoutEnlargement:!0});if((!d||c.byteLength<d.size)&&(d={buffer:c,size:c.byteLength}),c.byteLength<=e.maxBytes){let l=typeof r==`number`&&typeof i==`number`?`${r}x${i}px`:`unknown`,u=e.fileName?`${e.fileName} ${l}`:l,d=t.byteLength>0?Number(((t.byteLength-c.byteLength)/t.byteLength*100).toFixed(1)):0;return FW.info(`Image resized to fit limits: ${u} ${zW(t.byteLength)} -> ${zW(c.byteLength)} (-${d}%)`,{label:e.label,fileName:e.fileName,sourceMimeType:e.mimeType,sourceWidth:r,sourceHeight:i,sourceBytes:t.byteLength,maxBytes:e.maxBytes,maxDimensionPx:e.maxDimensionPx,triggerOverBytes:a,triggerOverDimensions:s,outputMimeType:`image/jpeg`,outputBytes:c.byteLength,outputQuality:o,outputMaxSide:n,byteReductionPct:d}),{base64:c.toString(`base64`),mimeType:`image/jpeg`,resized:!0,width:r,height:i}}}let f=d?.buffer??t,p=(e.maxBytes/(1024*1024)).toFixed(0),m=(f.byteLength/(1024*1024)).toFixed(2),h=typeof r==`number`&&typeof i==`number`?`${r}x${i}px`:`unknown`,g=e.fileName?`${e.fileName} ${h}`:h;throw FW.warn(`Image resize failed to fit limits: ${g} best=${zW(f.byteLength)} limit=${zW(e.maxBytes)}`,{label:e.label,fileName:e.fileName,sourceMimeType:e.mimeType,sourceWidth:r,sourceHeight:i,sourceBytes:t.byteLength,maxDimensionPx:e.maxDimensionPx,maxBytes:e.maxBytes,smallestCandidateBytes:f.byteLength,triggerOverBytes:a,triggerOverDimensions:s}),Error(`Image could not be reduced below ${p}MB (got ${m}MB)`)}async function WW(e,t,n={}){let r=Math.max(n.maxDimensionPx??1200,1),i=Math.max(n.maxBytes??5242880,1),a=[],o;for(let n of e){if(LW(n)){let e=BW(n.text);e&&(o=e)}if(!IW(n)){a.push(n);continue}let e=n.data.trim();if(!e){a.push({type:`text`,text:`[${t}] omitted empty image payload`});continue}let s=NW(e);if(!s){a.push({type:`text`,text:`[${t}] omitted image payload: invalid base64`});continue}try{let e=RW(s)??n.mimeType,c=await UW({base64:s,mimeType:e,maxDimensionPx:r,maxBytes:i,label:t,fileName:HW({block:n,label:t,mediaPathHint:o})});a.push({...n,data:c.base64,mimeType:c.resized?c.mimeType:e})}catch(e){a.push({type:`text`,text:`[${t}] omitted image payload: ${String(e)}`})}}return a}async function GW(e,t,n={}){if(e.length===0)return{images:e,dropped:0};let r=(await WW(e,t,n)).filter(IW);return{images:r,dropped:Math.max(0,e.length-r.length)}}async function KW(e,t,n={}){let r=Array.isArray(e.content)?e.content:[];if(!r.some(e=>IW(e)||LW(e)))return e;let i=await WW(r,t,n);return{...e,content:i}}async function qW(e,t,n){let r=(n?.sanitizeMode??`full`)===`full`,i={maxDimensionPx:n?.maxDimensionPx,maxBytes:n?.maxBytes},a=n?.sanitizeToolCallIds===!0?AW(e,n.toolCallIdMode):e,o=[];for(let e of a){if(!e||typeof e!=`object`){o.push(e);continue}let a=e.role;if(a===`toolResult`){let n=e,r=await WW(Array.isArray(n.content)?n.content:[],t,i);o.push({...n,content:r});continue}if(a===`user`){let n=e,r=n.content;if(Array.isArray(r)){let e=await WW(r,t,i);o.push({...n,content:e});continue}}if(a===`assistant`){let a=e;if(a.stopReason===`error`){let e=a.content;if(Array.isArray(e)){let n=await WW(e,t,i);o.push({...a,content:n})}else o.push(a);continue}let s=a.content;if(Array.isArray(s)){if(!r){let e=await WW(s,t,i);o.push({...a,content:e});continue}let e=await WW((n?.preserveSignatures?s:QC(s,n?.sanitizeThoughtSignatures)).filter(e=>{if(!e||typeof e!=`object`)return!0;let t=e;return t.type!==`text`||typeof t.text!=`string`?!0:t.text.trim().length>0}),t,i);if(e.length===0)continue;o.push({...a,content:e});continue}}o.push(e)}return o}function JW(e){return e.trim().toLowerCase().replace(/\p{Emoji_Presentation}|\p{Extended_Pictographic}/gu,``).replace(/\s+/g,` `).trim()}function YW(e,t){return t.length===0||!e||e.length<10?!1:t.some(t=>!t||t.length<10?!1:e.includes(t)||t.includes(e))}function XW(e,t){if(t.length===0)return!1;let n=JW(e);return!n||n.length<10?!1:YW(n,t.map(JW))}function ZW(e){if(!e)return``;let t=e.trim().toLowerCase();return t===`z.ai`||t===`z-ai`?`zai`:t}function QW(e){return ZW(e)===`zai`}const $W=[`openai/gpt-5.4`,`openai/gpt-5.4-pro`,`openai/gpt-5.2`,`openai-codex/gpt-5.4`,`openai-codex/gpt-5.3-codex`,`openai-codex/gpt-5.3-codex-spark`,`openai-codex/gpt-5.2-codex`,`openai-codex/gpt-5.1-codex`,`github-copilot/gpt-5.2-codex`,`github-copilot/gpt-5.2`],eG=new Set($W.map(e=>e.toLowerCase())),tG=new Set($W.map(e=>e.split(`/`)[1]?.toLowerCase()).filter(e=>!!e));function nG(e){if(!e)return;let t=e.trim().toLowerCase(),n=t.replace(/[\s_-]+/g,``);if(n===`adaptive`||n===`auto`)return`adaptive`;if(n===`xhigh`||n===`extrahigh`)return`xhigh`;if([`off`].includes(t))return`off`;if([`on`,`enable`,`enabled`].includes(t))return`low`;if([`min`,`minimal`].includes(t))return`minimal`;if([`low`,`thinkhard`,`think-hard`,`think_hard`].includes(t))return`low`;if([`mid`,`med`,`medium`,`thinkharder`,`think-harder`,`harder`].includes(t))return`medium`;if([`high`,`ultra`,`ultrathink`,`think-hard`,`thinkhardest`,`highest`,`max`].includes(t))return`high`;if([`think`].includes(t))return`minimal`}function rG(e,t){let n=t?.trim().toLowerCase();if(!n)return!1;let r=e?.trim().toLowerCase();return r?eG.has(`${r}/${n}`):tG.has(n)}function iG(e,t){let n=[`off`,`minimal`,`low`,`medium`,`high`];return rG(e,t)&&n.push(`xhigh`),n.push(`adaptive`),n}function aG(e,t){return QW(e)?[`off`,`on`]:iG(e,t)}function oG(e,t,n=`, `){return aG(e,t).join(n)}function sG(){let e=[...$W];return e.length===0?`unknown model`:e.length===1?e[0]:e.length===2?`${e[0]} or ${e[1]}`:`${e.slice(0,-1).join(`, `)} or ${e[e.length-1]}`}function cG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`].includes(t))return`off`;if([`full`,`all`,`everything`].includes(t))return`full`;if([`on`,`minimal`,`true`,`yes`,`1`].includes(t))return`on`}function lG(e){return cG(e)}function uG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`,`disable`,`disabled`].includes(t))return`off`;if([`on`,`true`,`yes`,`1`,`enable`,`enabled`].includes(t)||[`tokens`,`token`,`tok`,`minimal`,`min`].includes(t))return`tokens`;if([`full`,`session`].includes(t))return`full`}function dG(e){return uG(e)??`off`}function fG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`].includes(t))return`off`;if([`full`,`auto`,`auto-approve`,`autoapprove`].includes(t))return`full`;if([`ask`,`prompt`,`approval`,`approve`].includes(t))return`ask`;if([`on`,`true`,`yes`,`1`].includes(t))return`on`}function pG(e){if(!e)return;let t=e.toLowerCase();if([`off`,`false`,`no`,`0`,`hide`,`hidden`,`disable`,`disabled`].includes(t))return`off`;if([`on`,`true`,`yes`,`1`,`show`,`visible`,`enable`,`enabled`].includes(t))return`on`;if([`stream`,`streaming`,`draft`,`live`].includes(t))return`stream`}function mG(e){let t=e.match(/supported values are:\s*([^\n.]+)/i)??e.match(/supported values:\s*([^\n.]+)/i);if(!t?.[1])return[];let n=t[1],r=Array.from(n.matchAll(/['"]([^'"]+)['"]/g)).map(e=>e[1]?.trim());return r.length>0?r.filter(e=>!!e):n.split(/,|\band\b/gi).map(e=>e.replace(/^[^a-zA-Z]+|[^a-zA-Z]+$/g,``).trim()).filter(Boolean)}function hG(e){let t=e.message?.trim();if(!t)return;let n=mG(t);if(n.length===0)return/not supported/i.test(t)&&!e.attempted.has(`off`)?`off`:void 0;for(let t of n){let n=nG(t);if(n&&!e.attempted.has(n))return n}}function gG(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!r||typeof r!=`object`){t.push(r);continue}if(r.role!==`assistant`){t.push(r);continue}let i=r,a=e[n+1];if((a&&typeof a==`object`?a.role:void 0)!==`user`){t.push(r);continue}let o=a,s=new Set;if(Array.isArray(o.content))for(let e of o.content)e&&e.type===`toolResult`&&e.toolUseId&&s.add(e.toolUseId);let c=Array.isArray(i.content)?i.content:[],l=c.filter(e=>e?e.type===`toolUse`?s.has(e.id||``):!0:!1);c.length>0&&l.length===0?t.push({...i,content:[{type:`text`,text:`[tool calls omitted]`}]}):t.push({...i,content:l})}return t}function _G(e){let{messages:t,role:n,merge:r}=e;if(!Array.isArray(t)||t.length===0)return t;let i=[],a;for(let e of t){if(!e||typeof e!=`object`){i.push(e);continue}let t=e.role;if(!t){i.push(e);continue}if(t===a&&a===n){let t=i[i.length-1],n=e;if(t&&typeof t==`object`){let e=t;i[i.length-1]=r(e,n);continue}}i.push(e),a=t}return i}function vG(e,t){let n=[...Array.isArray(e.content)?e.content:[],...Array.isArray(t.content)?t.content:[]];return{...e,content:n,...t.usage&&{usage:t.usage},...t.stopReason&&{stopReason:t.stopReason},...t.errorMessage&&{errorMessage:t.errorMessage}}}function yG(e){return _G({messages:e,role:`assistant`,merge:vG})}function bG(e,t){let n=[...Array.isArray(e.content)?e.content:[],...Array.isArray(t.content)?t.content:[]];return{...t,content:n,timestamp:t.timestamp??e.timestamp}}function xG(e){return _G({messages:gG(e),role:`user`,merge:bG})}const SG=64e3,CG=8e3,wG=/\brequest[_ ]?id\b\s*[:=]\s*["'()]*([A-Za-z0-9._:-]+)/i,TG=[String.raw`\b(?:x-)?api[-_]?key\b\s*[:=]\s*(["']?)([^\s"'\\;]+)\1`,String.raw`"(?:api[-_]?key|api_key)"\s*:\s*"([^"]+)"`,String.raw`(?:\bCookie\b\s*[:=]\s*[^;=\s]+=|;\s*[^;=\s]+=)([^;\s\r\n]+)`];function EG(){let e=r()?.redactPatterns;return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function DG(e,t){let n=e?.trim();if(n)return n.length>t?`${n.slice(0,t)}…`:n}function OG(e){let t=e?.trim();if(t)return t.length>SG?t.slice(0,SG):t}function kG(e,t=200){let n=e?.trim();if(!n)return;let r=Array.from(n).filter(e=>{let t=e.charCodeAt(0);return!(t<=8||t===11||t===12||t>=14&&t<=31||t===127)}).join(``).replace(/[\r\n\t]+/g,` `).replace(/\s+/g,` `).trim();return r.length>t?`${r.slice(0,t)}…`:r}function AG(e,t){return!e||!t?e:e.split(t).join(XC(t,{len:12}))}function jG(e){if(!e)return e;let t=EG();return ln(e,{mode:`tools`,patterns:[...un(),...t,...TG]})}function MG(e){if(e)return e.match(wG)?.[1]?.trim()||void 0}function NG(e){let t=e.message&&e.message.length>CG?e.message.slice(0,CG):e.message;return(e.httpCode||e.type||t?IH({httpCode:e.httpCode,type:e.type,message:t}):null)||(e.requestId?e.raw.split(e.requestId).join(`<request_id>`):UU(e.raw))}function PG(e){let t=OG(e);if(!t)return{};try{let e=GU(t),n=e?.requestId??MG(t),r=n?XC(n,{len:12}):void 0,i=NG({raw:t,requestId:n,httpCode:e?.httpCode,type:e?.type,message:e?.message}),a=AG(jG(t),n),o=AG(jG(e?.message),n);return{rawErrorPreview:DG(a,400),rawErrorHash:XC(t,{len:12}),rawErrorFingerprint:i?XC(i,{len:12}):void 0,httpCode:e?.httpCode,providerErrorType:e?.type,providerErrorMessagePreview:DG(o,200),requestIdHash:r}}catch{return{}}}function FG(e){let t=PG(e);return{textPreview:t.rawErrorPreview,textHash:t.rawErrorHash,textFingerprint:t.rawErrorFingerprint,httpCode:t.httpCode,providerErrorType:t.providerErrorType,providerErrorMessagePreview:t.providerErrorMessagePreview,requestIdHash:t.requestIdHash}}const IG=s(`agent/embedded`);function LG(e){let t=e.reason===`billing`||e.reason===`auth_permanent`?`disabled`:`cooldown`,n=e.previous?.cooldownUntil,r=e.previous?.disabledUntil,i=t===`disabled`?typeof r==`number`&&Number.isFinite(r)&&r>e.now&&r===e.next.disabledUntil:typeof n==`number`&&Number.isFinite(n)&&n>e.now&&n===e.next.cooldownUntil,a=XC(e.profileId,{len:12}),o=kG(e.runId)??`-`,s=kG(e.provider)??`-`;IG.warn(`auth profile failure state updated`,{event:`auth_profile_failure_state_updated`,tags:[`error_handling`,`auth_profiles`,t],runId:e.runId,profileId:a,provider:e.provider,reason:e.reason,windowType:t,windowReused:i,previousErrorCount:e.previous?.errorCount,errorCount:e.next.errorCount,previousCooldownUntil:n,cooldownUntil:e.next.cooldownUntil,previousDisabledUntil:r,disabledUntil:e.next.disabledUntil,previousDisabledReason:e.previous?.disabledReason,disabledReason:e.next.disabledReason,failureCounts:e.next.failureCounts,consoleMessage:`auth profile failure state updated: runId=${o} profile=${a} provider=${s} reason=${e.reason} window=${t} reused=${String(i)}`})}const RG=[`auth_permanent`,`auth`,`billing`,`format`,`model_not_found`,`overloaded`,`timeout`,`rate_limit`,`unknown`],zG=new Set(RG),BG=new Map(RG.map((e,t)=>[e,t]));function VG(e){let t=N(e??``);return t===`openrouter`||t===`kilocode`}function HG(e){let t=[e.cooldownUntil,e.disabledUntil].filter(e=>typeof e==`number`).filter(e=>Number.isFinite(e)&&e>0);return t.length===0?null:Math.max(...t)}function UG(e,t,n){if(VG(e.profiles[t]?.provider))return!1;let r=e.usageStats?.[t];if(!r)return!1;let i=HG(r);return i?(n??Date.now())<i:!1}function WG(e,t){return typeof e==`number`&&Number.isFinite(e)&&e>0&&t<e}function GG(e){let t=e.now??Date.now(),n=new Map,r=(e,t)=>{!zG.has(e)||t<=0||!Number.isFinite(t)||n.set(e,(n.get(e)??0)+t)};for(let n of e.profileIds){let i=e.store.usageStats?.[n];if(!i)continue;if(WG(i.disabledUntil,t)&&i.disabledReason&&zG.has(i.disabledReason)){r(i.disabledReason,1e3);continue}if(!WG(i.cooldownUntil,t))continue;let a=!1;for(let[e,t]of Object.entries(i.failureCounts??{})){let n=e,i=typeof t==`number`?t:0;!zG.has(n)||i<=0||(r(n,i),a=!0)}a||r(`unknown`,1)}if(n.size===0)return null;let i=null,a=-1,o=2**53-1;for(let e of RG){let t=n.get(e);if(typeof t!=`number`)continue;let r=BG.get(e)??2**53-1;(t>a||t===a&&r<o)&&(i=e,a=t,o=r)}return i}function KG(e,t){let n=null;for(let r of t){let t=e.usageStats?.[r];if(!t)continue;let i=HG(t);typeof i!=`number`||!Number.isFinite(i)||i<=0||(n===null||i<n)&&(n=i)}return n}function qG(e,t){let n=e.usageStats;if(!n)return!1;let r=t??Date.now(),i=!1;for(let[e,t]of Object.entries(n)){if(!t)continue;let a=!1,o=typeof t.cooldownUntil==`number`&&Number.isFinite(t.cooldownUntil)&&t.cooldownUntil>0&&r>=t.cooldownUntil,s=typeof t.disabledUntil==`number`&&Number.isFinite(t.disabledUntil)&&t.disabledUntil>0&&r>=t.disabledUntil;o&&(t.cooldownUntil=void 0,a=!0),s&&(t.disabledUntil=void 0,t.disabledReason=void 0,a=!0),a&&!HG(t)&&(t.errorCount=0,t.failureCounts=void 0),a&&(n[e]=t,i=!0)}return i}async function JG(e){let{store:t,profileId:n,agentDir:r}=e,i=await ll({agentDir:r,updater:e=>e.profiles[n]?(eK(e,n,e=>$G(e,{lastUsed:Date.now()})),!0):!1});if(i){t.usageStats=i.usageStats;return}t.profiles[n]&&(eK(t,n,e=>$G(e,{lastUsed:Date.now()})),Tl(t,r))}function YG(e){let t=Math.max(1,e);return Math.min(3600*1e3,60*1e3*5**Math.min(t-1,3))}function XG(e){let t={billingBackoffHours:5,billingMaxHours:24,failureWindowHours:24},n=(e,t)=>typeof e==`number`&&Number.isFinite(e)&&e>0?e:t,r=e.cfg?.auth?.cooldowns,i=n((()=>{let t=r?.billingBackoffHoursByProvider;if(t){for(let[n,r]of Object.entries(t))if(N(n)===e.providerId)return r}})()??r?.billingBackoffHours,t.billingBackoffHours),a=n(r?.billingMaxHours,t.billingMaxHours),o=n(r?.failureWindowHours,t.failureWindowHours);return{billingBackoffMs:i*60*60*1e3,billingMaxMs:a*60*60*1e3,failureWindowMs:o*60*60*1e3}}function ZG(e){let t=Math.max(1,e.errorCount),n=Math.max(6e4,e.baseMs),r=Math.max(n,e.maxMs),i=n*2**Math.min(t-1,10);return Math.min(r,i)}function QG(e,t){if(VG(e.profiles[t]?.provider))return null;let n=e.usageStats?.[t];return n?HG(n):null}function $G(e,t){return{...e,errorCount:0,cooldownUntil:void 0,disabledUntil:void 0,disabledReason:void 0,failureCounts:void 0,...t}}function eK(e,t,n){e.usageStats=e.usageStats??{},e.usageStats[t]=n(e.usageStats[t])}function tK(e){let{existingUntil:t,now:n,recomputedUntil:r}=e;return typeof t==`number`&&Number.isFinite(t)&&t>n?t:r}function nK(e){let t=e.cfgResolved.failureWindowMs,n=typeof e.existing.lastFailureAt==`number`&&e.existing.lastFailureAt>0&&e.now-e.existing.lastFailureAt>t,r=HG(e.existing),i=typeof r==`number`&&e.now>=r,a=n||i,o=(a?0:e.existing.errorCount??0)+1,s=a?{}:{...e.existing.failureCounts};s[e.reason]=(s[e.reason]??0)+1;let c={...e.existing,errorCount:o,failureCounts:s,lastFailureAt:e.now};if(e.reason===`billing`||e.reason===`auth_permanent`){let t=ZG({errorCount:s[e.reason]??1,baseMs:e.cfgResolved.billingBackoffMs,maxMs:e.cfgResolved.billingMaxMs});c.disabledUntil=tK({existingUntil:e.existing.disabledUntil,now:e.now,recomputedUntil:e.now+t}),c.disabledReason=e.reason}else{let t=YG(o);c.cooldownUntil=tK({existingUntil:e.existing.cooldownUntil,now:e.now,recomputedUntil:e.now+t})}return c}async function rK(e){let{store:t,profileId:n,reason:r,agentDir:i,cfg:a,runId:o}=e,s=t.profiles[n];if(!s||VG(s.provider))return;let c,l,u=0,d=await ll({agentDir:i,updater:e=>{let t=e.profiles[n];if(!t||VG(t.provider))return!1;let i=Date.now(),o=XG({cfg:a,providerId:N(t.provider)});l=e.usageStats?.[n],u=i;let s=nK({existing:l??{},now:i,reason:r,cfgResolved:o});return c=s,eK(e,n,()=>s),!0}});if(d){t.usageStats=d.usageStats,c&&LG({runId:o,profileId:n,provider:s.provider,reason:r,previous:l,next:c,now:u});return}if(!t.profiles[n])return;let f=Date.now(),p=XG({cfg:a,providerId:N(t.profiles[n]?.provider??``)});l=t.usageStats?.[n];let m=nK({existing:l??{},now:f,reason:r,cfgResolved:p});c=m,eK(t,n,()=>m),Tl(t,i),LG({runId:o,profileId:n,provider:t.profiles[n]?.provider??s.provider,reason:r,previous:l,next:c,now:f})}function iK(e){let t=tc(e.provider),n=e.store.profiles[e.profileId];if(!n)return{eligible:!1,reasonCode:`profile_missing`};if(tc(n.provider)!==t)return{eligible:!1,reasonCode:`provider_mismatch`};let r=e.cfg?.auth?.profiles?.[e.profileId];if(r){if(tc(r.provider)!==t)return{eligible:!1,reasonCode:`provider_mismatch`};if(r.mode!==n.type&&!(r.mode===`oauth`&&n.type===`token`))return{eligible:!1,reasonCode:`mode_mismatch`}}let i=MC({credential:n,now:e.now});return{eligible:i.eligible,reasonCode:i.reasonCode}}function aK(e){let{cfg:t,store:n,provider:r,preferredProfile:i}=e,a=N(r),o=tc(r),s=Date.now();qG(n,s);let c=nc(n.order,a),l=nc(t?.auth?.order,a),u=c??l,d=t?.auth?.profiles?Object.entries(t.auth.profiles).filter(([,e])=>tc(e.provider)===o).map(([e])=>e):[],f=u??(d.length>0?d:Al(n,r));if(f.length===0)return[];let p=e=>iK({cfg:t,store:n,provider:o,profileId:e,now:s}).eligible,m=f.filter(p),h=f.every(e=>!n.profiles[e]);m.length===0&&d.length>0&&h&&(m=Al(n,r).filter(p));let g=El(m);if(u&&u.length>0){let e=[],t=[];for(let r of g)if(UG(n,r)){let e=HG(n.usageStats?.[r]??{})??s;t.push({profileId:r,cooldownUntil:e})}else e.push(r);let r=t.toSorted((e,t)=>e.cooldownUntil-t.cooldownUntil).map(e=>e.profileId),a=[...e,...r];return i&&a.includes(i)?[i,...a.filter(e=>e!==i)]:a}let _=oK(g,n);return i&&_.includes(i)?[i,..._.filter(e=>e!==i)]:_}function oK(e,t){let n=Date.now(),r=[],i=[];for(let n of e)UG(t,n)?i.push(n):r.push(n);let a=r.map(e=>{let n=t.profiles[e]?.type;return{profileId:e,typeScore:n===`oauth`?0:n===`token`?1:n===`api_key`?2:3,lastUsed:t.usageStats?.[e]?.lastUsed??0}}).toSorted((e,t)=>e.typeScore===t.typeScore?e.lastUsed-t.lastUsed:e.typeScore-t.typeScore).map(e=>e.profileId),o=i.map(e=>({profileId:e,cooldownUntil:HG(t.usageStats?.[e]??{})??n})).toSorted((e,t)=>e.cooldownUntil-t.cooldownUntil).map(e=>e.profileId);return[...a,...o]}var sK=e({CLAUDE_CLI_PROFILE_ID:()=>fr,CODEX_CLI_PROFILE_ID:()=>pr,ensureAuthProfileStore:()=>wl});export{sU as $,JC as $a,Sc as $c,eE as $i,Jr as $l,aL as $n,Tg as $o,lA as $r,Ud as $s,lB as $t,JW as A,Xw as Aa,Qc as Ac,XE as Ai,Ya as Al,rz as An,Vx as Ao,aN as Ar,zp as As,IV as At,bW as B,xw as Ba,lc as Bc,yE as Bi,Mi as Bl,tR as Bn,Jx as Bo,SM as Br,ip as Bs,dV as Bt,nG as C,sT as Ca,kl as Cc,WD as Ci,To as Cl,gz as Cn,CS as Co,iP as Cr,wm as Cs,eH as Ct,rG as D,Kw as Da,Cl as Dc,QE as Di,eo as Dl,sz as Dn,zx as Do,kN as Dr,nm as Ds,YV as Dt,dG as E,Ww as Ea,bl as Ec,lD as Ei,$a as El,oz as En,Yx as Eo,TN as Er,um as Es,XV as Et,NW as F,kw as Fa,vc as Fc,UE as Fi,ia as Fl,aR as Fn,Kx as Fo,iN as Fr,Rf as Fs,jV as Ft,IU as G,aw as Ga,N as Gc,pE as Gi,Ti as Gl,TL as Gn,Hv as Go,zA as Gr,Df as Gs,kB as Gt,hW as H,fw as Ha,ec as Hc,DE as Hi,Ii as Hl,UL as Hn,Eb as Ho,yM as Hr,xp as Hs,qB as Ht,jW as I,Nw as Ia,dc as Ic,WE as Ii,aa as Il,cR as In,qx as Io,JM as Ir,Pp as Is,GV as It,KU as J,tw as Ja,uc as Jc,aE as Ji,xi as Jl,pL as Jn,Pv as Jo,bA as Jr,mf as Js,DB as Jt,qU as K,iw as Ka,cc as Kc,fE as Ki,Ci as Kl,bL as Kn,Ov as Ko,LA as Kr,Of as Ks,jB as Kt,wW as L,jw as La,fc as Lc,NE as Li,Ji as Ll,nR as Ln,rx as Lo,jM as Lr,Np as Ls,MV as Lt,GW as M,Rw as Ma,Zc as Mc,KE as Mi,Qa as Ml,QR as Mn,wx as Mo,eN as Mr,Up as Ms,OV as Mt,KW as N,Iw as Na,Lc as Nc,GE as Ni,Qi as Nl,ZR as Nn,Ux as No,XM as Nr,Hp as Ns,WV as Nt,XW as O,Gw as Oa,sl as Oc,$E as Oi,to as Ol,iz as On,Dx as Oo,CN as Or,lm as Os,JV as Ot,PW as P,zw as Pa,Dc as Pc,zE as Pi,$i as Pl,NR as Pn,Gx as Po,QM as Pr,Lp as Ps,TV as Pt,cW as Q,YC as Qa,pc as Qc,sE as Qi,Zr as Ql,QI as Qn,X_ as Qo,cA as Qr,rf as Qs,sB as Qt,TW as R,Mw as Ra,nc as Rc,RE as Ri,Xi as Rl,ZL as Rn,Rx as Ro,EM as Rr,Ep as Rs,UV as Rt,pG as S,uT as Sa,Ol as Sc,GD as Si,zo as Sl,mz as Sn,wS as So,mP as Sr,Om as Ss,rH as St,lG as T,$w as Ta,wl as Tc,dD as Ti,Mo as Tl,cz as Tn,Zx as To,xN as Tr,fm as Ts,ZV as Tt,QH as U,cw as Ua,sc as Uc,EE as Ui,Ai as Ul,WL as Un,zv as Uo,uM as Ur,bp as Us,NB as Ut,xW as V,dw as Va,ic as Vc,TE as Vi,Ni as Vl,JL as Vn,Rb as Vo,CM as Vr,np as Vs,uV as Vt,fW as W,pw as Wa,wc as Wc,_E as Wi,vi as Wl,GL as Wn,Bv as Wo,Dj as Wr,sp as Ws,MB as Wt,lW as X,ow as Xa,hc as Xc,iE as Xi,Yr as Xl,XI as Xn,Rv as Xo,gA as Xr,bf as Xs,EB as Xt,UU as Y,ew as Ya,mc as Yc,oE as Yi,_i as Yl,mL as Yn,Lv as Yo,pA as Yr,yf as Ys,OB as Yt,nW as Z,XC as Za,Cc as Zc,cE as Zi,Xr as Zl,oL as Zn,wv as Zo,dA as Zr,sf as Zs,oB as Zt,oG as _,ST as _a,Fl as _c,uO as _i,ts as _l,Tz as _n,LS as _o,HP as _r,Sh as _s,kH as _t,KG as a,zT as aa,_d as ac,Tk as ai,qs as al,Zz as an,wC as ao,sL as ar,Qh as as,WU as at,Dr as au,iG as b,_T as ba,jl as bc,KD as bi,_o as bl,Sz as bn,ES as bo,EP as br,Nm as bs,yH as bt,JG as c,XT as ca,$u as cc,nk as ci,fs as cl,Gz as cn,_C as co,BI as cr,Uh as cs,oW as ct,Sr as cu,PG as d,IT as da,hu as dc,vO as di,gs as dl,zz as dn,BS as do,YI as dr,Th as ds,WH as dt,yr as du,VT as ea,Td as ec,Fk as ei,gc as el,cB as en,MC as eo,$I as er,I as es,nU as et,Kr as eu,FG as f,LT as fa,Ql as fc,bO as fi,ys as fl,Vz as fn,zS as fo,JI as fr,wh as fs,NH as ft,vr as fu,hG as g,wT as ga,Rl as gc,dO as gi,ns as gl,Ez as gn,KS as go,eF as gr,Ah as gs,AH as gt,yG as h,CT as ha,Bl as hc,qD as hi,rs as hl,Nz as hn,WS as ho,tF as hr,Oh as hs,PH as ht,pr as hu,qG as i,$T as ia,hd as ic,bk as ii,Ls as il,iB as in,CC as io,tL as ir,Kh as is,YU as it,Tr as iu,qW as j,Yw as ja,el as jc,ZE as ji,Za as jl,tz as jn,H as jo,ZM as jr,Wp as js,DV as jt,YW as k,Jw as ka,ll as kc,YE as ki,qa as kl,az as kn,Bx as ko,lN as kr,dm as ks,qV as kt,QG as l,QT as la,Xu as lc,rk as li,Ss as ll,qz as ln,gC as lo,HI as lr,ph as ls,JU as lt,xr as lu,xG as m,TT as ma,Vl as mc,gO as mi,ds as ml,Pz as mn,VS as mo,kF as mr,jh as ms,FH as mt,fr as mu,iK as n,rE as na,yd as nc,vk as ni,xc as nl,TB as nn,bC as no,eL as nr,ag as ns,pW as nt,kr as nu,UG as o,RT as oa,gd as oc,qO as oi,xs as ol,Qz as on,QS as oo,cL as or,Vh as os,FU as ot,Or as ou,kG as p,MT as pa,$l as pc,yO as pi,bs as pl,Rz as pn,US as po,JF as pr,kh as ps,MH as pt,_r as pu,ZH as q,$C as qa,bc as qc,uE as qi,Ei as ql,yL as qn,Fv as qo,xA as qr,kf as qs,AB as qt,aK as r,JT as ra,pd as rc,wk as ri,js as rl,uB as rn,DC as ro,rL as rr,ig as rs,oU as rt,jr as ru,rK as s,YT as sa,md as sc,YO as si,us as sl,Jz as sn,vC as so,UI as sr,Zh as ss,iW as st,Cr as su,sK as t,W as ta,vd as tc,Ek as ti,_c as tl,rB as tn,kC as to,lL as tr,sg as ts,mW as tt,Gr as tu,GG as u,NT as ua,Zu as uc,TO as ui,vs as ul,Fz as un,qS as uo,VI as ur,Ch as us,KH as ut,br as uu,sG as v,pT as va,El as vc,iO as vi,$o as vl,wz as vn,DS as vo,OP as vr,fh as vs,SH as vt,uG as w,rT as wa,cl as wc,pD as wi,Io as wl,dz as wn,Qx as wo,wN as wr,pm as ws,nH as wt,fG as x,dT as xa,Dl as xc,VD as xi,so as xl,_z as xn,TS as xo,hP as xr,Pm as xs,sH as xt,aG as y,mT as ya,Al as yc,lO as yi,go as yl,xz as yn,OS as yo,TP as yr,Mm as ys,xH as yt,AW as z,bw as za,yc as zc,vE as zi,Oi as zl,QL as zn,Wx as zo,DM as zr,rp as zs,mV as zt};
@@ -1 +1 @@
1
- import{t as e}from"./subsystem-BLbY429l.js";import{g as t}from"./paths-BjD3T_xq.js";import{Al as n,Bl as r,Cl as i,Dl as a,El as o,Fl as s,Gc as c,Il as l,Mc as u,Ml as d,Nl as f,Ol as ee,Pl as p,Sc as m,Sl as te,Tl as ne,Vl as re,au as ie,bl as ae,cu as oe,iu as h,jl as se,kl as ce,nu as le,ou as ue,ru as g,wl as de,xl as fe,zl as pe}from"./auth-profiles-BhXA8Jy2.js";import{i as me,t as he}from"./types.secrets-D4tbc3Wq.js";import{t as ge}from"./provider-env-vars-Dt0Q29Su.js";import{a as _,i as v,n as y,o as b,r as x}from"./oauth-env-DAamJ1oz.js";import S from"node:path";import _e from"node:fs";const ve=`https://api.minimax.io/anthropic`,ye=`https://api.minimaxi.com/anthropic`,C=`kimi-k2.5`,w=`moonshot/${C}`,be=`k2p5`,T=`kimi-coding/${be}`,E=`qianfan/${ae}`,D=`https://api.z.ai/api/coding/paas/v4`,O=`https://open.bigmodel.cn/api/coding/paas/v4`,k=`https://api.z.ai/api/paas/v4`,A=`https://open.bigmodel.cn/api/paas/v4`;function j(e){switch(e){case`coding-cn`:return O;case`global`:return k;case`cn`:return A;case`coding-global`:return D;default:return k}}const xe={input:.3,output:1.2,cacheRead:.03,cacheWrite:.12},Se={input:0,output:0,cacheRead:0,cacheWrite:0},Ce={input:0,output:0,cacheRead:0,cacheWrite:0},we={input:0,output:0,cacheRead:0,cacheWrite:0},Te={"MiniMax-M2.5":{name:`MiniMax M2.5`,reasoning:!0},"MiniMax-M2.5-highspeed":{name:`MiniMax M2.5 Highspeed`,reasoning:!0}},Ee={"glm-5":{name:`GLM-5`,reasoning:!0},"glm-4.7":{name:`GLM-4.7`,reasoning:!0},"glm-4.7-flash":{name:`GLM-4.7 Flash`,reasoning:!0},"glm-4.7-flashx":{name:`GLM-4.7 FlashX`,reasoning:!0}};function M(e){let t=Te[e.id];return{id:e.id,name:e.name??t?.name??`MiniMax ${e.id}`,reasoning:e.reasoning??t?.reasoning??!1,input:[`text`],cost:e.cost,contextWindow:e.contextWindow,maxTokens:e.maxTokens}}function De(e){return M({id:e,cost:xe,contextWindow:2e5,maxTokens:8192})}function Oe(){return{id:C,name:`Kimi K2.5`,reasoning:!1,input:[`text`,`image`],cost:Ce,contextWindow:256e3,maxTokens:8192}}const N=`mistral-large-latest`,P=`mistral/${N}`,ke={input:0,output:0,cacheRead:0,cacheWrite:0};function Ae(){return{id:N,name:`Mistral Large`,reasoning:!1,input:[`text`,`image`],cost:ke,contextWindow:262144,maxTokens:262144}}function F(e){let t=Ee[e.id];return{id:e.id,name:e.name??t?.name??`GLM ${e.id}`,reasoning:e.reasoning??t?.reasoning??!0,input:[`text`],cost:e.cost??we,contextWindow:e.contextWindow??204800,maxTokens:e.maxTokens??131072}}const I=`grok-4`,L=`xai/${I}`,je={input:0,output:0,cacheRead:0,cacheWrite:0};function Me(){return{id:I,name:`Grok 4`,reasoning:!1,input:[`text`],cost:je,contextWindow:131072,maxTokens:8192}}const R=`modelstudio/qwen3.5-plus`,Ne={input:0,output:0,cacheRead:0,cacheWrite:0},Pe={"qwen3.5-plus":{name:`qwen3.5-plus`,reasoning:!1,input:[`text`,`image`],contextWindow:1e6,maxTokens:65536},"qwen3-max-2026-01-23":{name:`qwen3-max-2026-01-23`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-next":{name:`qwen3-coder-next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-plus":{name:`qwen3-coder-plus`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"MiniMax-M2.5":{name:`MiniMax-M2.5`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"glm-5":{name:`glm-5`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"glm-4.7":{name:`glm-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"kimi-k2.5":{name:`kimi-k2.5`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768}};function z(e){let t=Pe[e.id];return{id:e.id,name:e.name??t?.name??e.id,reasoning:e.reasoning??t?.reasoning??!1,input:e.input??[...t?.input??[`text`]],cost:e.cost??Ne,contextWindow:e.contextWindow??t?.contextWindow??262144,maxTokens:e.maxTokens??t?.maxTokens??65536}}const B=e=>e??u(),Fe=/^\$\{([A-Z][A-Z0-9_]*)\}$/;function V(e){return{source:`env`,provider:he,id:e}}function Ie(e){let t=Fe.exec(e);return t?V(t[1]):null}function Le(e){let t=ge[e]?.find(e=>e.trim().length>0);if(!t)throw Error(`Provider "${e}" does not have a default env var mapping for secret-input-mode=ref.`);return V(t)}function Re(e,t,n){let r=me(t);if(r)return r;let i=oe(t);return Ie(i)||(n?.secretInputMode===`ref`?Le(e):i)}function H(e,t,n,r){let i=Re(e,t,r);return typeof i==`string`?{type:`api_key`,provider:e,key:i,...n?{metadata:n}:{}}:{type:`api_key`,provider:e,keyRef:i,...n?{metadata:n}:{}}}function U(e){try{return _e.realpathSync(S.resolve(e))}catch{return null}}function ze(e){let n=S.resolve(e),r=S.dirname(n),i=S.dirname(r),a=S.basename(n)===`agent`&&S.basename(i)===`agents`?i:S.join(t(),`agents`),o=(()=>{try{return _e.readdirSync(a,{withFileTypes:!0})}catch{return[]}})().filter(e=>e.isDirectory()||e.isSymbolicLink()).map(e=>S.join(a,e.name,`agent`)),s=new Set,c=[];for(let e of[n,...o]){let t=U(e);t&&!s.has(t)&&(s.add(t),c.push(t))}return c}async function Be(e,t,n,r){let i=`${e}:${typeof t.email==`string`&&t.email.trim()?t.email.trim():`default`}`,a=S.resolve(B(n)),o=r?.syncSiblingAgents?ze(a):[a],s={type:`oauth`,provider:e,...t};if(m({profileId:i,credential:s,agentDir:a}),r?.syncSiblingAgents){let e=U(a);for(let t of o){let n=U(t);if(!(n&&e&&n===e))try{m({profileId:i,credential:s,agentDir:t})}catch{}}}return i}async function Ve(e,t,n){m({profileId:`anthropic:default`,credential:H(`anthropic`,e,void 0,n),agentDir:B(t)})}async function He(e,t,n){m({profileId:`openai:default`,credential:H(`openai`,e,void 0,n),agentDir:B(t)})}async function Ue(e,t,n){m({profileId:`google:default`,credential:H(`google`,e,void 0,n),agentDir:B(t)})}async function We(e,t,n=`minimax:default`,r){m({profileId:n,credential:H(n.split(`:`)[0]??`minimax`,e,void 0,r),agentDir:B(t)})}async function Ge(e,t,n){m({profileId:`moonshot:default`,credential:H(`moonshot`,e,void 0,n),agentDir:B(t)})}async function Ke(e,t,n){m({profileId:`kimi-coding:default`,credential:H(`kimi-coding`,e,void 0,n),agentDir:B(t)})}async function qe(e,t,n){m({profileId:`volcengine:default`,credential:H(`volcengine`,e,void 0,n),agentDir:B(t)})}async function Je(e,t,n){m({profileId:`byteplus:default`,credential:H(`byteplus`,e,void 0,n),agentDir:B(t)})}async function Ye(e,t,n){m({profileId:`synthetic:default`,credential:H(`synthetic`,e,void 0,n),agentDir:B(t)})}async function Xe(e,t,n){m({profileId:`venice:default`,credential:H(`venice`,e,void 0,n),agentDir:B(t)})}const W=`zai/glm-5`,G=`xiaomi/mimo-v2-flash`,K=`openrouter/auto`,q=`huggingface/deepseek-ai/DeepSeek-R1`,J=`together/moonshotai/Kimi-K2.5`,Y=`litellm/claude-opus-4-6`,X=`vercel-ai-gateway/anthropic/claude-opus-4.6`;async function Ze(e,t,n){m({profileId:`zai:default`,credential:H(`zai`,e,void 0,n),agentDir:B(t)})}async function Qe(e,t,n){m({profileId:`xiaomi:default`,credential:H(`xiaomi`,e,void 0,n),agentDir:B(t)})}async function $e(e,t,n){m({profileId:`openrouter:default`,credential:H(`openrouter`,typeof e==`string`&&e===`undefined`?``:e,void 0,n),agentDir:B(t)})}async function et(e,t,n,r,i){m({profileId:`cloudflare-ai-gateway:default`,credential:H(`cloudflare-ai-gateway`,n,{accountId:e.trim(),gatewayId:t.trim()},i),agentDir:B(r)})}async function tt(e,t,n){m({profileId:`litellm:default`,credential:H(`litellm`,e,void 0,n),agentDir:B(t)})}async function nt(e,t,n){m({profileId:`vercel-ai-gateway:default`,credential:H(`vercel-ai-gateway`,e,void 0,n),agentDir:B(t)})}async function rt(e,t,n){await at(e,t,n)}async function it(e,t,n){await at(e,t,n)}async function at(e,t,n){let r=B(t);for(let t of[`opencode`,`opencode-go`])m({profileId:`${t}:default`,credential:H(t,e,void 0,n),agentDir:r})}async function ot(e,t,n){m({profileId:`together:default`,credential:H(`together`,e,void 0,n),agentDir:B(t)})}async function st(e,t,n){m({profileId:`huggingface:default`,credential:H(`huggingface`,e,void 0,n),agentDir:B(t)})}function ct(e,t,n){m({profileId:`qianfan:default`,credential:H(`qianfan`,e,void 0,n),agentDir:B(t)})}function lt(e,t,n){m({profileId:`modelstudio:default`,credential:H(`modelstudio`,e,void 0,n),agentDir:B(t)})}function ut(e,t,n){m({profileId:`xai:default`,credential:H(`xai`,e,void 0,n),agentDir:B(t)})}async function dt(e,t,n){m({profileId:`mistral:default`,credential:H(`mistral`,e,void 0,n),agentDir:B(t)})}async function ft(e,t,n){m({profileId:`kilocode:default`,credential:H(`kilocode`,e,void 0,n),agentDir:B(t)})}function pt(e){let t={...e.agents?.defaults?.models};return t[X]={...t[X],alias:t[`vercel-ai-gateway/anthropic/claude-opus-4.6`]?.alias??`Vercel AI Gateway`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function mt(e,t){let n={...e.agents?.defaults?.models};n[h]={...n[h],alias:n[h]?.alias??`Cloudflare AI Gateway`};let r=ie(),i=e.models?.providers?.[`cloudflare-ai-gateway`],a=t?.accountId&&t?.gatewayId?ue({accountId:t.accountId,gatewayId:t.gatewayId}):typeof i?.baseUrl==`string`?i.baseUrl:void 0;return a?v(e,{agentModels:n,providerId:`cloudflare-ai-gateway`,api:`anthropic-messages`,baseUrl:a,defaultModel:r}):{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:n}}}}function ht(e){return y(pt(e),X)}function gt(e,t){return y(mt(e,t),h)}const _t=`claude-opus-4-6`,vt={input:0,output:0,cacheRead:0,cacheWrite:0};function yt(){return{id:_t,name:`Claude Opus 4.6`,reasoning:!0,input:[`text`,`image`],cost:vt,contextWindow:128e3,maxTokens:8192}}function bt(e){let t={...e.agents?.defaults?.models};t[Y]={...t[Y],alias:t[`litellm/claude-opus-4-6`]?.alias??`LiteLLM`};let n=yt(),r=e.models?.providers?.litellm;return v(e,{agentModels:t,providerId:`litellm`,api:`openai-completions`,baseUrl:(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`http://localhost:4000`,defaultModel:n,defaultModelId:_t})}function xt(e){return y(bt(e),Y)}function St(e,t){let n=`zai/${t?.modelId?.trim()||`glm-5`}`,r={...e.agents?.defaults?.models};r[n]={...r[n],alias:r[n]?.alias??`GLM`};let i={...e.models?.providers},a=i.zai,o=Array.isArray(a?.models)?a.models:[],s=[F({id:`glm-5`}),F({id:`glm-4.7`}),F({id:`glm-4.7-flash`}),F({id:`glm-4.7-flashx`})],c=[...o],l=new Set(o.map(e=>e.id));for(let e of s)l.has(e.id)||(c.push(e),l.add(e.id));let{apiKey:u,...d}=a??{},f=(typeof u==`string`?u:void 0)?.trim(),ee=t?.endpoint?j(t.endpoint):(typeof a?.baseUrl==`string`?a.baseUrl:``)||j();return i.zai={...d,baseUrl:ee,api:`openai-completions`,...f?{apiKey:f}:{},models:c.length>0?c:s},x(e,{agentModels:r,providers:i})}function Ct(e,t){let n=t?.modelId?.trim()||`glm-5`,r=n===`glm-5`?W:`zai/${n}`;return y(St(e,t),r)}function wt(e){let t={...e.agents?.defaults?.models};return t[K]={...t[K],alias:t[`openrouter/auto`]?.alias??`OpenRouter`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function Tt(e){return y(wt(e),K)}function Et(e){return Ot(e,`https://api.moonshot.ai/v1`)}function Dt(e){return Ot(e,`https://api.moonshot.cn/v1`)}function Ot(e,t){let n={...e.agents?.defaults?.models};return n[w]={...n[w],alias:n[w]?.alias??`Kimi`},v(e,{agentModels:n,providerId:`moonshot`,api:`openai-completions`,baseUrl:t,defaultModel:Oe(),defaultModelId:C})}function kt(e){return y(Et(e),w)}function At(e){return y(Dt(e),w)}function jt(e){let t={...e.agents?.defaults?.models};t[T]={...t[T],alias:t[T]?.alias??`Kimi for Coding`};let n=i().models[0];return v(e,{agentModels:t,providerId:`kimi-coding`,api:`anthropic-messages`,baseUrl:`https://api.kimi.com/coding/`,defaultModel:n,defaultModelId:be})}function Mt(e){return y(jt(e),T)}function Nt(e){let t={...e.agents?.defaults?.models};t[n]={...t[n],alias:t[n]?.alias??`MiniMax M2.5`};let r={...e.models?.providers},i=r.synthetic,a=Array.isArray(i?.models)?i.models:[],o=se.map(d),s=[...a,...o.filter(e=>!a.some(t=>t.id===e.id))],{apiKey:c,...l}=i??{},u=(typeof c==`string`?c:void 0)?.trim();return r.synthetic={...l,baseUrl:ce,api:`anthropic-messages`,...u?{apiKey:u}:{},models:s.length>0?s:o},x(e,{agentModels:t,providers:r})}function Pt(e){return y(Nt(e),n)}function Ft(e){let t={...e.agents?.defaults?.models};t[G]={...t[G],alias:t[`xiaomi/mimo-v2-flash`]?.alias??`Xiaomi`};let n=ne();return _(e,{agentModels:t,providerId:`xiaomi`,api:n.api??`openai-completions`,baseUrl:n.baseUrl,defaultModels:n.models??[],defaultModelId:fe})}function It(e){return y(Ft(e),G)}function Lt(e){let t={...e.agents?.defaults?.models};return t[p]={...t[p],alias:t[p]?.alias??`Kimi K2.5`},b(e,{agentModels:t,providerId:`venice`,api:`openai-completions`,baseUrl:f,catalogModels:s.map(l)})}function Rt(e){return y(Lt(e),p)}function zt(e){let t={...e.agents?.defaults?.models};return t[J]={...t[J],alias:t[`together/moonshotai/Kimi-K2.5`]?.alias??`Together AI`},b(e,{agentModels:t,providerId:`together`,api:`openai-completions`,baseUrl:o,catalogModels:a.map(ee)})}function Bt(e){return y(zt(e),J)}function Vt(e){let t={...e.agents?.defaults?.models};return t[q]={...t[q],alias:t[`huggingface/deepseek-ai/DeepSeek-R1`]?.alias??`Hugging Face`},b(e,{agentModels:t,providerId:`huggingface`,api:`openai-completions`,baseUrl:pe,catalogModels:r.map(re)})}function Ht(e){return y(Vt(e),q)}function Ut(e){let t={...e.agents?.defaults?.models};return t[L]={...t[L],alias:t[L]?.alias??`Grok`},v(e,{agentModels:t,providerId:`xai`,api:`openai-completions`,baseUrl:`https://api.x.ai/v1`,defaultModel:Me(),defaultModelId:I})}function Wt(e){return y(Ut(e),L)}function Gt(e){let t={...e.agents?.defaults?.models};return t[P]={...t[P],alias:t[P]?.alias??`Mistral`},v(e,{agentModels:t,providerId:`mistral`,api:`openai-completions`,baseUrl:`https://api.mistral.ai/v1`,defaultModel:Ae(),defaultModelId:N})}function Kt(e){return y(Gt(e),P)}function qt(e){let t={...e.agents?.defaults?.models};return t[g]={...t[g],alias:t[g]?.alias??`Kilo Gateway`},b(e,{agentModels:t,providerId:`kilocode`,api:`openai-completions`,baseUrl:le,catalogModels:te().models??[]})}function Jt(e){return y(qt(e),g)}function Yt(e,t){let n=t.provider.toLowerCase(),r={...e.auth?.profiles,[t.profileId]:{provider:t.provider,mode:t.mode,...t.email?{email:t.email}:{}}},i=Object.entries(e.auth?.profiles??{}).filter(([,e])=>e.provider.toLowerCase()===n).map(([e,t])=>({profileId:e,mode:t.mode})),a=e.auth?.order?.[t.provider],o=t.preferProfileFirst??!0,s=a&&o?[t.profileId,...a.filter(e=>e!==t.profileId)]:a,c=i.some(({profileId:e,mode:n})=>e!==t.profileId&&n!==t.mode),l=a===void 0&&o&&c?[t.profileId,...i.map(({profileId:e})=>e).filter(e=>e!==t.profileId)]:void 0,u=a===void 0?l?{...e.auth?.order,[t.provider]:l}:e.auth?.order:{...e.auth?.order,[t.provider]:s?.includes(t.profileId)?s:[...s??[],t.profileId]};return{...e,auth:{...e.auth,profiles:r,...u?{order:u}:{}}}}function Xt(e){let t={...e.agents?.defaults?.models};t[E]={...t[E],alias:t[E]?.alias??`QIANFAN`};let n=de(),r=e.models?.providers?.qianfan,i=(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`https://qianfan.baidubce.com/v2`;return _(e,{agentModels:t,providerId:`qianfan`,api:typeof r?.api==`string`?r.api:`openai-completions`,baseUrl:i,defaultModels:n.models??[],defaultModelId:ae})}function Zt(e){return y(Xt(e),E)}function Qt(e,t){let n={...e.agents?.defaults?.models};for(let e of[`qwen3.5-plus`,`qwen3-max-2026-01-23`,`qwen3-coder-next`,`qwen3-coder-plus`,`MiniMax-M2.5`,`glm-5`,`glm-4.7`,`kimi-k2.5`]){let t=`modelstudio/${e}`;n[t]||(n[t]={})}n[R]={...n[R],alias:n[R]?.alias??`Qwen`};let r={...e.models?.providers},i=r.modelstudio,a=Array.isArray(i?.models)?i.models:[],o=[z({id:`qwen3.5-plus`}),z({id:`qwen3-max-2026-01-23`}),z({id:`qwen3-coder-next`}),z({id:`qwen3-coder-plus`}),z({id:`MiniMax-M2.5`}),z({id:`glm-5`}),z({id:`glm-4.7`}),z({id:`kimi-k2.5`})],s=[...a],c=new Set(a.map(e=>e.id));for(let e of o)c.has(e.id)||(s.push(e),c.add(e.id));let{apiKey:l,...u}=i??{},d=(typeof l==`string`?l:void 0)?.trim();return r.modelstudio={...u,baseUrl:t,api:`openai-completions`,...d?{apiKey:d}:{},models:s.length>0?s:o},x(e,{agentModels:n,providers:r})}function $t(e){return Qt(e,`https://coding-intl.dashscope.aliyuncs.com/v1`)}function en(e){return Qt(e,`https://coding.dashscope.aliyuncs.com/v1`)}function tn(e){return y($t(e),R)}function nn(e){return y(en(e),R)}function Z(e){let t={...e.agents?.defaults?.models};t[`anthropic/claude-opus-4-6`]={...t[`anthropic/claude-opus-4-6`],alias:t[`anthropic/claude-opus-4-6`]?.alias??`Opus`},t[`lmstudio/minimax-m2.5-gs32`]={...t[`lmstudio/minimax-m2.5-gs32`],alias:t[`lmstudio/minimax-m2.5-gs32`]?.alias??`Minimax`};let n={...e.models?.providers};return n.lmstudio||={baseUrl:`http://127.0.0.1:1234/v1`,apiKey:`lmstudio`,api:`openai-responses`,models:[M({id:`minimax-m2.5-gs32`,name:`MiniMax M2.5 GS32`,reasoning:!1,cost:Se,contextWindow:196608,maxTokens:8192})]},x(e,{agentModels:t,providers:n})}function rn(e){return y(Z(e),`lmstudio/minimax-m2.5-gs32`)}function an(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function on(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function sn(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function cn(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function Q(e,t){let n={...e.models?.providers},r=n[t.providerId],i=r?.models??[],a=De(t.modelId),o=i.some(e=>e.id===t.modelId)?i:[...i,a],{apiKey:s,...c}=r??{baseUrl:t.baseUrl,models:[]},l=typeof s==`string`?s:void 0,u=l?.trim()===`minimax`?``:l;n[t.providerId]={...c,baseUrl:t.baseUrl,api:`anthropic-messages`,authHeader:!0,...u?.trim()?{apiKey:u}:{},models:o.length>0?o:[a]};let d={...e.agents?.defaults?.models},f=`${t.providerId}/${t.modelId}`;return d[f]={...d[f],alias:`Minimax`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:d}},models:{mode:e.models?.mode??`merge`,providers:n}}}function ln(e,t){return y(Q(e,t),`${t.providerId}/${t.modelId}`)}e(`opencode-zen-models`);const $=`opencode/claude-opus-4-6`;function un(e){let t={...e.agents?.defaults?.models};return t[$]={...t[$],alias:t[$]?.alias??`Opus`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function dn(e){return y(un(e),$)}function fn(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.primary==`string`)return e.primary}function pn(e){let t=fn(e.cfg.agents?.defaults?.model)?.trim();return(t&&e.legacyModels?.has(t)?e.model:t)===e.model?{next:e.cfg,changed:!1}:{next:{...e.cfg,agents:{...e.cfg.agents,defaults:{...e.cfg.agents?.defaults,model:e.cfg.agents?.defaults?.model&&typeof e.cfg.agents.defaults.model==`object`?{...e.cfg.agents.defaults.model,primary:e.model}:{primary:e.model}}}},changed:!0}}const mn=`opencode-go/kimi-k2.5`,hn={"opencode-go/kimi-k2.5":`Kimi`,"opencode-go/glm-5":`GLM`,"opencode-go/minimax-m2.5":`MiniMax`};function gn(e){let t={...e.agents?.defaults?.models};for(let[e,n]of Object.entries(hn))t[e]={...t[e],alias:t[e]?.alias??n};return{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function _n(e){return y(gn(e),mn)}function vn(e){let t=e.trim();return t&&t.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function yn(e){return`${c(e.provider)}:${vn(e.name)}`}function bn(e){let t=e.trim();if(!t)return`Required`;if(!t.startsWith(`sk-ant-oat01-`))return`Expected token starting with sk-ant-oat01-`;if(t.length<80)return`Token looks too short; paste the full setup-token`}export{pt as $,Et as A,Qe as At,Rt as B,O as Bt,Gt as C,ct as Ct,en as D,nt as Dt,$t as E,Xe as Et,Xt as F,R as Ft,Ft as G,Wt as H,k as Ht,Pt as I,w as It,xt as J,Ct as K,Nt as L,E as Lt,Tt as M,Be as Mt,wt as N,T as Nt,kt as O,qe as Ot,Zt as P,P as Pt,ht as Q,Bt as R,L as Rt,Kt as S,$e as St,nn as T,ot as Tt,Ut as U,Lt as V,D as Vt,It as W,gt as X,bt as Y,mt as Z,Vt as _,lt as _t,mn as a,G as at,Mt as b,it as bt,un as c,Je as ct,an as d,st as dt,q as et,sn as f,ft,Ht as g,dt as gt,Yt as h,We as ht,gn as i,X as it,Dt as j,Ze as jt,At as k,ut as kt,on as l,et as lt,Z as m,tt as mt,bn as n,K as nt,pn as o,W as ot,rn as p,Ke as pt,St as q,_n as r,J as rt,dn as s,Ve as st,yn as t,Y as tt,cn as u,Ue as ut,Jt as v,Ge as vt,tn as w,Ye as wt,jt as x,rt as xt,qt as y,He as yt,zt as z,A as zt};
1
+ import{t as e}from"./subsystem-BLbY429l.js";import{g as t}from"./paths-BjD3T_xq.js";import{Al as n,Bl as r,Cl as i,Dl as a,El as o,Fl as s,Gc as c,Il as l,Mc as u,Ml as d,Nl as f,Ol as ee,Pl as p,Sc as m,Sl as te,Tl as ne,Vl as re,au as ie,bl as ae,cu as oe,iu as h,jl as se,kl as ce,nu as le,ou as ue,ru as g,wl as de,xl as fe,zl as pe}from"./auth-profiles-BhXA8Jy2.js";import{i as me,t as he}from"./types.secrets-D4tbc3Wq.js";import{t as ge}from"./provider-env-vars-Dt0Q29Su.js";import{a as _,i as v,n as y,o as b,r as x}from"./oauth-env-DAamJ1oz.js";import S from"node:path";import _e from"node:fs";const ve=`https://api.minimax.io/anthropic`,ye=`https://api.minimaxi.com/anthropic`,C=`kimi-k2.5`,w=`moonshot/${C}`,be=`k2p5`,T=`kimi-coding/${be}`,E=`qianfan/${ae}`,D=`https://api.z.ai/api/coding/paas/v4`,O=`https://open.bigmodel.cn/api/coding/paas/v4`,k=`https://api.z.ai/api/paas/v4`,A=`https://open.bigmodel.cn/api/paas/v4`;function j(e){switch(e){case`coding-cn`:return O;case`global`:return k;case`cn`:return A;case`coding-global`:return D;default:return k}}const xe={input:.3,output:1.2,cacheRead:.03,cacheWrite:.12},Se={input:0,output:0,cacheRead:0,cacheWrite:0},Ce={input:0,output:0,cacheRead:0,cacheWrite:0},we={input:0,output:0,cacheRead:0,cacheWrite:0},Te={"MiniMax-M2.5":{name:`MiniMax M2.5`,reasoning:!0},"MiniMax-M2.5-highspeed":{name:`MiniMax M2.5 Highspeed`,reasoning:!0}},Ee={"glm-5":{name:`GLM-5`,reasoning:!0},"glm-4.7":{name:`GLM-4.7`,reasoning:!0},"glm-4.7-flash":{name:`GLM-4.7 Flash`,reasoning:!0},"glm-4.7-flashx":{name:`GLM-4.7 FlashX`,reasoning:!0}};function M(e){let t=Te[e.id];return{id:e.id,name:e.name??t?.name??`MiniMax ${e.id}`,reasoning:e.reasoning??t?.reasoning??!1,input:[`text`],cost:e.cost,contextWindow:e.contextWindow,maxTokens:e.maxTokens}}function De(e){return M({id:e,cost:xe,contextWindow:2e5,maxTokens:8192})}function Oe(){return{id:C,name:`Kimi K2.5`,reasoning:!1,input:[`text`,`image`],cost:Ce,contextWindow:256e3,maxTokens:8192}}const N=`mistral-large-latest`,P=`mistral/${N}`,ke={input:0,output:0,cacheRead:0,cacheWrite:0};function Ae(){return{id:N,name:`Mistral Large`,reasoning:!1,input:[`text`,`image`],cost:ke,contextWindow:262144,maxTokens:262144}}function F(e){let t=Ee[e.id];return{id:e.id,name:e.name??t?.name??`GLM ${e.id}`,reasoning:e.reasoning??t?.reasoning??!0,input:[`text`],cost:e.cost??we,contextWindow:e.contextWindow??204800,maxTokens:e.maxTokens??131072}}const I=`grok-4`,L=`xai/${I}`,je={input:0,output:0,cacheRead:0,cacheWrite:0};function Me(){return{id:I,name:`Grok 4`,reasoning:!1,input:[`text`],cost:je,contextWindow:131072,maxTokens:8192}}const R=`modelstudio/qwen3.5-plus`,Ne={input:0,output:0,cacheRead:0,cacheWrite:0},Pe={"qwen3.5-plus":{name:`qwen3.5-plus`,reasoning:!1,input:[`text`,`image`],contextWindow:1e6,maxTokens:65536},"qwen3-max-2026-01-23":{name:`qwen3-max-2026-01-23`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-next":{name:`qwen3-coder-next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-plus":{name:`qwen3-coder-plus`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"MiniMax-M2.5":{name:`MiniMax-M2.5`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"glm-5":{name:`glm-5`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"glm-4.7":{name:`glm-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"kimi-k2.5":{name:`kimi-k2.5`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768}};function z(e){let t=Pe[e.id];return{id:e.id,name:e.name??t?.name??e.id,reasoning:e.reasoning??t?.reasoning??!1,input:e.input??[...t?.input??[`text`]],cost:e.cost??Ne,contextWindow:e.contextWindow??t?.contextWindow??262144,maxTokens:e.maxTokens??t?.maxTokens??65536}}const B=e=>e??u(),Fe=/^\$\{([A-Z][A-Z0-9_]*)\}$/;function V(e){return{source:`env`,provider:he,id:e}}function Ie(e){let t=Fe.exec(e);return t?V(t[1]):null}function Le(e){let t=ge[e]?.find(e=>e.trim().length>0);if(!t)throw Error(`Provider "${e}" does not have a default env var mapping for secret-input-mode=ref.`);return V(t)}function Re(e,t,n){let r=me(t);if(r)return r;let i=oe(t);return Ie(i)||(n?.secretInputMode===`ref`?Le(e):i)}function H(e,t,n,r){let i=Re(e,t,r);return typeof i==`string`?{type:`api_key`,provider:e,key:i,...n?{metadata:n}:{}}:{type:`api_key`,provider:e,keyRef:i,...n?{metadata:n}:{}}}function U(e){try{return _e.realpathSync(S.resolve(e))}catch{return null}}function ze(e){let n=S.resolve(e),r=S.dirname(n),i=S.dirname(r),a=S.basename(n)===`agent`&&S.basename(i)===`agents`?i:S.join(t(),`agents`),o=(()=>{try{return _e.readdirSync(a,{withFileTypes:!0})}catch{return[]}})().filter(e=>e.isDirectory()||e.isSymbolicLink()).map(e=>S.join(a,e.name,`agent`)),s=new Set,c=[];for(let e of[n,...o]){let t=U(e);t&&!s.has(t)&&(s.add(t),c.push(t))}return c}async function Be(e,t,n,r){let i=`${e}:${typeof t.email==`string`&&t.email.trim()?t.email.trim():`default`}`,a=S.resolve(B(n)),o=r?.syncSiblingAgents?ze(a):[a],s={type:`oauth`,provider:e,...t};if(m({profileId:i,credential:s,agentDir:a}),r?.syncSiblingAgents){let e=U(a);for(let t of o){let n=U(t);if(!(n&&e&&n===e))try{m({profileId:i,credential:s,agentDir:t})}catch{}}}return i}async function Ve(e,t,n){m({profileId:`anthropic:default`,credential:H(`anthropic`,e,void 0,n),agentDir:B(t)})}async function He(e,t,n){m({profileId:`openai:default`,credential:H(`openai`,e,void 0,n),agentDir:B(t)})}async function Ue(e,t,n){m({profileId:`google:default`,credential:H(`google`,e,void 0,n),agentDir:B(t)})}async function We(e,t,n=`minimax:default`,r){m({profileId:n,credential:H(n.split(`:`)[0]??`minimax`,e,void 0,r),agentDir:B(t)})}async function Ge(e,t,n){m({profileId:`moonshot:default`,credential:H(`moonshot`,e,void 0,n),agentDir:B(t)})}async function Ke(e,t,n){m({profileId:`kimi-coding:default`,credential:H(`kimi-coding`,e,void 0,n),agentDir:B(t)})}async function qe(e,t,n){m({profileId:`volcengine:default`,credential:H(`volcengine`,e,void 0,n),agentDir:B(t)})}async function Je(e,t,n){m({profileId:`byteplus:default`,credential:H(`byteplus`,e,void 0,n),agentDir:B(t)})}async function Ye(e,t,n){m({profileId:`synthetic:default`,credential:H(`synthetic`,e,void 0,n),agentDir:B(t)})}async function Xe(e,t,n){m({profileId:`venice:default`,credential:H(`venice`,e,void 0,n),agentDir:B(t)})}const W=`zai/glm-5`,G=`xiaomi/mimo-v2-flash`,K=`openrouter/auto`,q=`huggingface/deepseek-ai/DeepSeek-R1`,J=`together/moonshotai/Kimi-K2.5`,Y=`litellm/claude-opus-4-6`,X=`vercel-ai-gateway/anthropic/claude-opus-4.6`;async function Ze(e,t,n){m({profileId:`zai:default`,credential:H(`zai`,e,void 0,n),agentDir:B(t)})}async function Qe(e,t,n){m({profileId:`xiaomi:default`,credential:H(`xiaomi`,e,void 0,n),agentDir:B(t)})}async function $e(e,t,n){m({profileId:`openrouter:default`,credential:H(`openrouter`,typeof e==`string`&&e===`undefined`?``:e,void 0,n),agentDir:B(t)})}async function et(e,t,n,r,i){m({profileId:`cloudflare-ai-gateway:default`,credential:H(`cloudflare-ai-gateway`,n,{accountId:e.trim(),gatewayId:t.trim()},i),agentDir:B(r)})}async function tt(e,t,n){m({profileId:`litellm:default`,credential:H(`litellm`,e,void 0,n),agentDir:B(t)})}async function nt(e,t,n){m({profileId:`vercel-ai-gateway:default`,credential:H(`vercel-ai-gateway`,e,void 0,n),agentDir:B(t)})}async function rt(e,t,n){await at(e,t,n)}async function it(e,t,n){await at(e,t,n)}async function at(e,t,n){let r=B(t);for(let t of[`opencode`,`opencode-go`])m({profileId:`${t}:default`,credential:H(t,e,void 0,n),agentDir:r})}async function ot(e,t,n){m({profileId:`together:default`,credential:H(`together`,e,void 0,n),agentDir:B(t)})}async function st(e,t,n){m({profileId:`huggingface:default`,credential:H(`huggingface`,e,void 0,n),agentDir:B(t)})}function ct(e,t,n){m({profileId:`qianfan:default`,credential:H(`qianfan`,e,void 0,n),agentDir:B(t)})}function lt(e,t,n){m({profileId:`modelstudio:default`,credential:H(`modelstudio`,e,void 0,n),agentDir:B(t)})}function ut(e,t,n){m({profileId:`xai:default`,credential:H(`xai`,e,void 0,n),agentDir:B(t)})}async function dt(e,t,n){m({profileId:`mistral:default`,credential:H(`mistral`,e,void 0,n),agentDir:B(t)})}async function ft(e,t,n){m({profileId:`kilocode:default`,credential:H(`kilocode`,e,void 0,n),agentDir:B(t)})}function pt(e){let t={...e.agents?.defaults?.models};return t[X]={...t[X],alias:t[`vercel-ai-gateway/anthropic/claude-opus-4.6`]?.alias??`Vercel AI Gateway`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function mt(e,t){let n={...e.agents?.defaults?.models};n[h]={...n[h],alias:n[h]?.alias??`Cloudflare AI Gateway`};let r=ie(),i=e.models?.providers?.[`cloudflare-ai-gateway`],a=t?.accountId&&t?.gatewayId?ue({accountId:t.accountId,gatewayId:t.gatewayId}):typeof i?.baseUrl==`string`?i.baseUrl:void 0;return a?v(e,{agentModels:n,providerId:`cloudflare-ai-gateway`,api:`anthropic-messages`,baseUrl:a,defaultModel:r}):{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:n}}}}function ht(e){return y(pt(e),X)}function gt(e,t){return y(mt(e,t),h)}const _t=`claude-opus-4-6`,vt={input:0,output:0,cacheRead:0,cacheWrite:0};function yt(){return{id:_t,name:`Claude Opus 4.6`,reasoning:!0,input:[`text`,`image`],cost:vt,contextWindow:128e3,maxTokens:8192}}function bt(e){let t={...e.agents?.defaults?.models};t[Y]={...t[Y],alias:t[`litellm/claude-opus-4-6`]?.alias??`LiteLLM`};let n=yt(),r=e.models?.providers?.litellm;return v(e,{agentModels:t,providerId:`litellm`,api:`openai-completions`,baseUrl:(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`http://localhost:4000`,defaultModel:n,defaultModelId:_t})}function xt(e){return y(bt(e),Y)}function St(e,t){let n=`zai/${t?.modelId?.trim()||`glm-5`}`,r={...e.agents?.defaults?.models};r[n]={...r[n],alias:r[n]?.alias??`GLM`};let i={...e.models?.providers},a=i.zai,o=Array.isArray(a?.models)?a.models:[],s=[F({id:`glm-5`}),F({id:`glm-4.7`}),F({id:`glm-4.7-flash`}),F({id:`glm-4.7-flashx`})],c=[...o],l=new Set(o.map(e=>e.id));for(let e of s)l.has(e.id)||(c.push(e),l.add(e.id));let{apiKey:u,...d}=a??{},f=(typeof u==`string`?u:void 0)?.trim(),ee=t?.endpoint?j(t.endpoint):(typeof a?.baseUrl==`string`?a.baseUrl:``)||j();return i.zai={...d,baseUrl:ee,api:`openai-completions`,...f?{apiKey:f}:{},models:c.length>0?c:s},x(e,{agentModels:r,providers:i})}function Ct(e,t){let n=t?.modelId?.trim()||`glm-5`,r=n===`glm-5`?W:`zai/${n}`;return y(St(e,t),r)}function wt(e){let t={...e.agents?.defaults?.models};return t[K]={...t[K],alias:t[`openrouter/auto`]?.alias??`OpenRouter`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function Tt(e){return y(wt(e),K)}function Et(e){return Ot(e,`https://api.moonshot.ai/v1`)}function Dt(e){return Ot(e,`https://api.moonshot.cn/v1`)}function Ot(e,t){let n={...e.agents?.defaults?.models};return n[w]={...n[w],alias:n[w]?.alias??`Kimi`},v(e,{agentModels:n,providerId:`moonshot`,api:`openai-completions`,baseUrl:t,defaultModel:Oe(),defaultModelId:C})}function kt(e){return y(Et(e),w)}function At(e){return y(Dt(e),w)}function jt(e){let t={...e.agents?.defaults?.models};t[T]={...t[T],alias:t[T]?.alias??`Kimi for Coding`};let n=i().models[0];return v(e,{agentModels:t,providerId:`kimi-coding`,api:`anthropic-messages`,baseUrl:`https://api.kimi.com/coding/`,defaultModel:n,defaultModelId:be})}function Mt(e){return y(jt(e),T)}function Nt(e){let t={...e.agents?.defaults?.models};t[n]={...t[n],alias:t[n]?.alias??`MiniMax M2.5`};let r={...e.models?.providers},i=r.synthetic,a=Array.isArray(i?.models)?i.models:[],o=se.map(d),s=[...a,...o.filter(e=>!a.some(t=>t.id===e.id))],{apiKey:c,...l}=i??{},u=(typeof c==`string`?c:void 0)?.trim();return r.synthetic={...l,baseUrl:ce,api:`anthropic-messages`,...u?{apiKey:u}:{},models:s.length>0?s:o},x(e,{agentModels:t,providers:r})}function Pt(e){return y(Nt(e),n)}function Ft(e){let t={...e.agents?.defaults?.models};t[G]={...t[G],alias:t[`xiaomi/mimo-v2-flash`]?.alias??`Xiaomi`};let n=ne();return _(e,{agentModels:t,providerId:`xiaomi`,api:n.api??`openai-completions`,baseUrl:n.baseUrl,defaultModels:n.models??[],defaultModelId:fe})}function It(e){return y(Ft(e),G)}function Lt(e){let t={...e.agents?.defaults?.models};return t[p]={...t[p],alias:t[p]?.alias??`Kimi K2.5`},b(e,{agentModels:t,providerId:`venice`,api:`openai-completions`,baseUrl:f,catalogModels:s.map(l)})}function Rt(e){return y(Lt(e),p)}function zt(e){let t={...e.agents?.defaults?.models};return t[J]={...t[J],alias:t[`together/moonshotai/Kimi-K2.5`]?.alias??`Together AI`},b(e,{agentModels:t,providerId:`together`,api:`openai-completions`,baseUrl:o,catalogModels:a.map(ee)})}function Bt(e){return y(zt(e),J)}function Vt(e){let t={...e.agents?.defaults?.models};return t[q]={...t[q],alias:t[`huggingface/deepseek-ai/DeepSeek-R1`]?.alias??`Hugging Face`},b(e,{agentModels:t,providerId:`huggingface`,api:`openai-completions`,baseUrl:pe,catalogModels:r.map(re)})}function Ht(e){return y(Vt(e),q)}function Ut(e){let t={...e.agents?.defaults?.models};return t[L]={...t[L],alias:t[L]?.alias??`Grok`},v(e,{agentModels:t,providerId:`xai`,api:`openai-completions`,baseUrl:`https://api.x.ai/v1`,defaultModel:Me(),defaultModelId:I})}function Wt(e){return y(Ut(e),L)}function Gt(e){let t={...e.agents?.defaults?.models};return t[P]={...t[P],alias:t[P]?.alias??`Mistral`},v(e,{agentModels:t,providerId:`mistral`,api:`openai-completions`,baseUrl:`https://api.mistral.ai/v1`,defaultModel:Ae(),defaultModelId:N})}function Kt(e){return y(Gt(e),P)}function qt(e){let t={...e.agents?.defaults?.models};return t[g]={...t[g],alias:t[g]?.alias??`Kilo Gateway`},b(e,{agentModels:t,providerId:`kilocode`,api:`openai-completions`,baseUrl:le,catalogModels:te().models??[]})}function Jt(e){return y(qt(e),g)}function Yt(e,t){let n=t.provider.toLowerCase(),r={...e.auth?.profiles,[t.profileId]:{provider:t.provider,mode:t.mode,...t.email?{email:t.email}:{}}},i=Object.entries(e.auth?.profiles??{}).filter(([,e])=>e.provider.toLowerCase()===n).map(([e,t])=>({profileId:e,mode:t.mode})),a=e.auth?.order?.[t.provider],o=t.preferProfileFirst??!0,s=a&&o?[t.profileId,...a.filter(e=>e!==t.profileId)]:a,c=i.some(({profileId:e,mode:n})=>e!==t.profileId&&n!==t.mode),l=a===void 0&&o&&c?[t.profileId,...i.map(({profileId:e})=>e).filter(e=>e!==t.profileId)]:void 0,u=a===void 0?l?{...e.auth?.order,[t.provider]:l}:e.auth?.order:{...e.auth?.order,[t.provider]:s?.includes(t.profileId)?s:[...s??[],t.profileId]};return{...e,auth:{...e.auth,profiles:r,...u?{order:u}:{}}}}function Xt(e){let t={...e.agents?.defaults?.models};t[E]={...t[E],alias:t[E]?.alias??`QIANFAN`};let n=de(),r=e.models?.providers?.qianfan,i=(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`https://qianfan.baidubce.com/v2`;return _(e,{agentModels:t,providerId:`qianfan`,api:typeof r?.api==`string`?r.api:`openai-completions`,baseUrl:i,defaultModels:n.models??[],defaultModelId:ae})}function Zt(e){return y(Xt(e),E)}function Qt(e,t){let n={...e.agents?.defaults?.models};for(let e of[`qwen3.5-plus`,`qwen3-max-2026-01-23`,`qwen3-coder-next`,`qwen3-coder-plus`,`MiniMax-M2.5`,`glm-5`,`glm-4.7`,`kimi-k2.5`]){let t=`modelstudio/${e}`;n[t]||(n[t]={})}n[R]={...n[R],alias:n[R]?.alias??`Qwen`};let r={...e.models?.providers},i=r.modelstudio,a=Array.isArray(i?.models)?i.models:[],o=[z({id:`qwen3.5-plus`}),z({id:`qwen3-max-2026-01-23`}),z({id:`qwen3-coder-next`}),z({id:`qwen3-coder-plus`}),z({id:`MiniMax-M2.5`}),z({id:`glm-5`}),z({id:`glm-4.7`}),z({id:`kimi-k2.5`})],s=[...a],c=new Set(a.map(e=>e.id));for(let e of o)c.has(e.id)||(s.push(e),c.add(e.id));let{apiKey:l,...u}=i??{},d=(typeof l==`string`?l:void 0)?.trim();return r.modelstudio={...u,baseUrl:t,api:`openai-completions`,...d?{apiKey:d}:{},models:s.length>0?s:o},x(e,{agentModels:n,providers:r})}function $t(e){return Qt(e,`https://coding-intl.dashscope.aliyuncs.com/v1`)}function en(e){return Qt(e,`https://coding.dashscope.aliyuncs.com/v1`)}function tn(e){return y($t(e),R)}function nn(e){return y(en(e),R)}function Z(e){let t={...e.agents?.defaults?.models};t[`anthropic/claude-opus-4-6`]={...t[`anthropic/claude-opus-4-6`],alias:t[`anthropic/claude-opus-4-6`]?.alias??`Opus`},t[`lmstudio/minimax-m2.5-gs32`]={...t[`lmstudio/minimax-m2.5-gs32`],alias:t[`lmstudio/minimax-m2.5-gs32`]?.alias??`Minimax`};let n={...e.models?.providers};return n.lmstudio||={baseUrl:`http://127.0.0.1:1234/v1`,apiKey:`lmstudio`,api:`openai-responses`,models:[M({id:`minimax-m2.5-gs32`,name:`MiniMax M2.5 GS32`,reasoning:!1,cost:Se,contextWindow:196608,maxTokens:8192})]},x(e,{agentModels:t,providers:n})}function rn(e){return y(Z(e),`lmstudio/minimax-m2.5-gs32`)}function an(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function on(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function sn(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function cn(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function Q(e,t){let n={...e.models?.providers},r=n[t.providerId],i=r?.models??[],a=De(t.modelId),o=i.some(e=>e.id===t.modelId)?i:[...i,a],{apiKey:s,...c}=r??{baseUrl:t.baseUrl,models:[]},l=typeof s==`string`?s:void 0,u=l?.trim()===`minimax`?``:l;n[t.providerId]={...c,baseUrl:t.baseUrl,api:`anthropic-messages`,authHeader:!0,...u?.trim()?{apiKey:u}:{},models:o.length>0?o:[a]};let d={...e.agents?.defaults?.models},f=`${t.providerId}/${t.modelId}`;return d[f]={...d[f],alias:`Minimax`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:d}},models:{mode:e.models?.mode??`merge`,providers:n}}}function ln(e,t){return y(Q(e,t),`${t.providerId}/${t.modelId}`)}e(`opencode-zen-models`);const $=`opencode/claude-opus-4-6`;function un(e){let t={...e.agents?.defaults?.models};return t[$]={...t[$],alias:t[$]?.alias??`Opus`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function dn(e){return y(un(e),$)}function fn(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.primary==`string`)return e.primary}function pn(e){let t=fn(e.cfg.agents?.defaults?.model)?.trim();return(t&&e.legacyModels?.has(t)?e.model:t)===e.model?{next:e.cfg,changed:!1}:{next:{...e.cfg,agents:{...e.cfg.agents,defaults:{...e.cfg.agents?.defaults,model:e.cfg.agents?.defaults?.model&&typeof e.cfg.agents.defaults.model==`object`?{...e.cfg.agents.defaults.model,primary:e.model}:{primary:e.model}}}},changed:!0}}const mn=`opencode-go/kimi-k2.5`,hn={"opencode-go/kimi-k2.5":`Kimi`,"opencode-go/glm-5":`GLM`,"opencode-go/minimax-m2.5":`MiniMax`};function gn(e){let t={...e.agents?.defaults?.models};for(let[e,n]of Object.entries(hn))t[e]={...t[e],alias:t[e]?.alias??n};return{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function _n(e){return y(gn(e),mn)}function vn(e){let t=e.trim();return t&&t.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function yn(e){return`${c(e.provider)}:${vn(e.name)}`}function bn(e){let t=e.trim();if(!t)return`Required`;if(!t.startsWith(`sk-ant-oat01-`))return`Expected token starting with sk-ant-oat01-`;if(t.length<80)return`Token looks too short; paste the full setup-token`}export{pt as $,Et as A,Qe as At,Rt as B,O as Bt,Gt as C,ct as Ct,en as D,nt as Dt,$t as E,Xe as Et,Xt as F,R as Ft,Ft as G,Wt as H,k as Ht,Pt as I,w as It,xt as J,Ct as K,Nt as L,E as Lt,Tt as M,Be as Mt,wt as N,T as Nt,kt as O,qe as Ot,Zt as P,P as Pt,ht as Q,Bt as R,L as Rt,Kt as S,$e as St,nn as T,ot as Tt,Ut as U,Lt as V,D as Vt,It as W,gt as X,bt as Y,mt as Z,Vt as _,lt as _t,mn as a,G as at,Mt as b,it as bt,un as c,Je as ct,an as d,st as dt,q as et,sn as f,ft,Ht as g,dt as gt,Yt as h,We as ht,gn as i,X as it,Dt as j,Ze as jt,At as k,ut as kt,on as l,et as lt,Z as m,tt as mt,bn as n,K as nt,pn as o,W as ot,rn as p,Ke as pt,St as q,_n as r,J as rt,dn as s,Ve as st,yn as t,Y as tt,cn as u,Ue as ut,Jt as v,Ge as vt,tn as w,Ye as wt,jt as x,rt as xt,qt as y,He as yt,zt as z,A as zt};
@@ -1 +1 @@
1
- import{g as e}from"./paths-B4IRk3wi.js";import{t}from"./subsystem-C5XF2Fy5.js";import{B as n,G as r,H as i,I as a,J as o,K as s,Kl as c,L as l,Q as u,R as d,St as f,U as p,V as ee,W as te,X as m,Y as ne,Z as re,bt as h,d as ie,lu as ae,nt as oe,nu as se,q as ce,rt as le,tt as ue,vt as de,xt as fe,yt as g,z as pe}from"./model-selection-I1ctjFOB.js";import{i as me,t as he}from"./types.secrets-C-5U96pc.js";import{t as ge}from"./provider-env-vars-D8p6Ohpj.js";import{a as _,i as v,n as y,o as b,r as x}from"./oauth-env-DSLBTWb1.js";import _e from"node:fs";import S from"node:path";const ve=`https://api.minimax.io/anthropic`,ye=`https://api.minimaxi.com/anthropic`,C=`kimi-k2.5`,w=`moonshot/${C}`,be=`k2p5`,T=`kimi-coding/${be}`,E=`qianfan/${a}`,D=`https://api.z.ai/api/coding/paas/v4`,O=`https://open.bigmodel.cn/api/coding/paas/v4`,k=`https://api.z.ai/api/paas/v4`,A=`https://open.bigmodel.cn/api/paas/v4`;function j(e){switch(e){case`coding-cn`:return O;case`global`:return k;case`cn`:return A;case`coding-global`:return D;default:return k}}const xe={input:.3,output:1.2,cacheRead:.03,cacheWrite:.12},Se={input:0,output:0,cacheRead:0,cacheWrite:0},Ce={input:0,output:0,cacheRead:0,cacheWrite:0},we={input:0,output:0,cacheRead:0,cacheWrite:0},Te={"MiniMax-M2.5":{name:`MiniMax M2.5`,reasoning:!0},"MiniMax-M2.5-highspeed":{name:`MiniMax M2.5 Highspeed`,reasoning:!0}},Ee={"glm-5":{name:`GLM-5`,reasoning:!0},"glm-4.7":{name:`GLM-4.7`,reasoning:!0},"glm-4.7-flash":{name:`GLM-4.7 Flash`,reasoning:!0},"glm-4.7-flashx":{name:`GLM-4.7 FlashX`,reasoning:!0}};function M(e){let t=Te[e.id];return{id:e.id,name:e.name??t?.name??`MiniMax ${e.id}`,reasoning:e.reasoning??t?.reasoning??!1,input:[`text`],cost:e.cost,contextWindow:e.contextWindow,maxTokens:e.maxTokens}}function De(e){return M({id:e,cost:xe,contextWindow:2e5,maxTokens:8192})}function Oe(){return{id:C,name:`Kimi K2.5`,reasoning:!1,input:[`text`,`image`],cost:Ce,contextWindow:256e3,maxTokens:8192}}const N=`mistral-large-latest`,P=`mistral/${N}`,ke={input:0,output:0,cacheRead:0,cacheWrite:0};function Ae(){return{id:N,name:`Mistral Large`,reasoning:!1,input:[`text`,`image`],cost:ke,contextWindow:262144,maxTokens:262144}}function F(e){let t=Ee[e.id];return{id:e.id,name:e.name??t?.name??`GLM ${e.id}`,reasoning:e.reasoning??t?.reasoning??!0,input:[`text`],cost:e.cost??we,contextWindow:e.contextWindow??204800,maxTokens:e.maxTokens??131072}}const I=`grok-4`,L=`xai/${I}`,je={input:0,output:0,cacheRead:0,cacheWrite:0};function Me(){return{id:I,name:`Grok 4`,reasoning:!1,input:[`text`],cost:je,contextWindow:131072,maxTokens:8192}}const R=`modelstudio/qwen3.5-plus`,Ne={input:0,output:0,cacheRead:0,cacheWrite:0},Pe={"qwen3.5-plus":{name:`qwen3.5-plus`,reasoning:!1,input:[`text`,`image`],contextWindow:1e6,maxTokens:65536},"qwen3-max-2026-01-23":{name:`qwen3-max-2026-01-23`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-next":{name:`qwen3-coder-next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-plus":{name:`qwen3-coder-plus`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"MiniMax-M2.5":{name:`MiniMax-M2.5`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"glm-5":{name:`glm-5`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"glm-4.7":{name:`glm-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"kimi-k2.5":{name:`kimi-k2.5`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768}};function z(e){let t=Pe[e.id];return{id:e.id,name:e.name??t?.name??e.id,reasoning:e.reasoning??t?.reasoning??!1,input:e.input??[...t?.input??[`text`]],cost:e.cost??Ne,contextWindow:e.contextWindow??t?.contextWindow??262144,maxTokens:e.maxTokens??t?.maxTokens??65536}}const B=e=>e??se(),Fe=/^\$\{([A-Z][A-Z0-9_]*)\}$/;function V(e){return{source:`env`,provider:he,id:e}}function Ie(e){let t=Fe.exec(e);return t?V(t[1]):null}function Le(e){let t=ge[e]?.find(e=>e.trim().length>0);if(!t)throw Error(`Provider "${e}" does not have a default env var mapping for secret-input-mode=ref.`);return V(t)}function Re(e,t,n){let r=me(t);if(r)return r;let i=ae(t);return Ie(i)||(n?.secretInputMode===`ref`?Le(e):i)}function H(e,t,n,r){let i=Re(e,t,r);return typeof i==`string`?{type:`api_key`,provider:e,key:i,...n?{metadata:n}:{}}:{type:`api_key`,provider:e,keyRef:i,...n?{metadata:n}:{}}}function U(e){try{return _e.realpathSync(S.resolve(e))}catch{return null}}function ze(t){let n=S.resolve(t),r=S.dirname(n),i=S.dirname(r),a=S.basename(n)===`agent`&&S.basename(i)===`agents`?i:S.join(e(),`agents`),o=(()=>{try{return _e.readdirSync(a,{withFileTypes:!0})}catch{return[]}})().filter(e=>e.isDirectory()||e.isSymbolicLink()).map(e=>S.join(a,e.name,`agent`)),s=new Set,c=[];for(let e of[n,...o]){let t=U(e);t&&!s.has(t)&&(s.add(t),c.push(t))}return c}async function Be(e,t,n,r){let i=`${e}:${typeof t.email==`string`&&t.email.trim()?t.email.trim():`default`}`,a=S.resolve(B(n)),o=r?.syncSiblingAgents?ze(a):[a],s={type:`oauth`,provider:e,...t};if(c({profileId:i,credential:s,agentDir:a}),r?.syncSiblingAgents){let e=U(a);for(let t of o){let n=U(t);if(!(n&&e&&n===e))try{c({profileId:i,credential:s,agentDir:t})}catch{}}}return i}async function Ve(e,t,n){c({profileId:`anthropic:default`,credential:H(`anthropic`,e,void 0,n),agentDir:B(t)})}async function He(e,t,n){c({profileId:`openai:default`,credential:H(`openai`,e,void 0,n),agentDir:B(t)})}async function Ue(e,t,n){c({profileId:`google:default`,credential:H(`google`,e,void 0,n),agentDir:B(t)})}async function We(e,t,n=`minimax:default`,r){c({profileId:n,credential:H(n.split(`:`)[0]??`minimax`,e,void 0,r),agentDir:B(t)})}async function Ge(e,t,n){c({profileId:`moonshot:default`,credential:H(`moonshot`,e,void 0,n),agentDir:B(t)})}async function Ke(e,t,n){c({profileId:`kimi-coding:default`,credential:H(`kimi-coding`,e,void 0,n),agentDir:B(t)})}async function qe(e,t,n){c({profileId:`volcengine:default`,credential:H(`volcengine`,e,void 0,n),agentDir:B(t)})}async function Je(e,t,n){c({profileId:`byteplus:default`,credential:H(`byteplus`,e,void 0,n),agentDir:B(t)})}async function Ye(e,t,n){c({profileId:`synthetic:default`,credential:H(`synthetic`,e,void 0,n),agentDir:B(t)})}async function Xe(e,t,n){c({profileId:`venice:default`,credential:H(`venice`,e,void 0,n),agentDir:B(t)})}const W=`zai/glm-5`,G=`xiaomi/mimo-v2-flash`,K=`openrouter/auto`,q=`huggingface/deepseek-ai/DeepSeek-R1`,J=`together/moonshotai/Kimi-K2.5`,Y=`litellm/claude-opus-4-6`,X=`vercel-ai-gateway/anthropic/claude-opus-4.6`;async function Ze(e,t,n){c({profileId:`zai:default`,credential:H(`zai`,e,void 0,n),agentDir:B(t)})}async function Qe(e,t,n){c({profileId:`xiaomi:default`,credential:H(`xiaomi`,e,void 0,n),agentDir:B(t)})}async function $e(e,t,n){c({profileId:`openrouter:default`,credential:H(`openrouter`,typeof e==`string`&&e===`undefined`?``:e,void 0,n),agentDir:B(t)})}async function et(e,t,n,r,i){c({profileId:`cloudflare-ai-gateway:default`,credential:H(`cloudflare-ai-gateway`,n,{accountId:e.trim(),gatewayId:t.trim()},i),agentDir:B(r)})}async function tt(e,t,n){c({profileId:`litellm:default`,credential:H(`litellm`,e,void 0,n),agentDir:B(t)})}async function nt(e,t,n){c({profileId:`vercel-ai-gateway:default`,credential:H(`vercel-ai-gateway`,e,void 0,n),agentDir:B(t)})}async function rt(e,t,n){await at(e,t,n)}async function it(e,t,n){await at(e,t,n)}async function at(e,t,n){let r=B(t);for(let t of[`opencode`,`opencode-go`])c({profileId:`${t}:default`,credential:H(t,e,void 0,n),agentDir:r})}async function ot(e,t,n){c({profileId:`together:default`,credential:H(`together`,e,void 0,n),agentDir:B(t)})}async function st(e,t,n){c({profileId:`huggingface:default`,credential:H(`huggingface`,e,void 0,n),agentDir:B(t)})}function ct(e,t,n){c({profileId:`qianfan:default`,credential:H(`qianfan`,e,void 0,n),agentDir:B(t)})}function lt(e,t,n){c({profileId:`modelstudio:default`,credential:H(`modelstudio`,e,void 0,n),agentDir:B(t)})}function ut(e,t,n){c({profileId:`xai:default`,credential:H(`xai`,e,void 0,n),agentDir:B(t)})}async function dt(e,t,n){c({profileId:`mistral:default`,credential:H(`mistral`,e,void 0,n),agentDir:B(t)})}async function ft(e,t,n){c({profileId:`kilocode:default`,credential:H(`kilocode`,e,void 0,n),agentDir:B(t)})}function pt(e){let t={...e.agents?.defaults?.models};return t[X]={...t[X],alias:t[`vercel-ai-gateway/anthropic/claude-opus-4.6`]?.alias??`Vercel AI Gateway`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function mt(e,t){let n={...e.agents?.defaults?.models};n[h]={...n[h],alias:n[h]?.alias??`Cloudflare AI Gateway`};let r=fe(),i=e.models?.providers?.[`cloudflare-ai-gateway`],a=t?.accountId&&t?.gatewayId?f({accountId:t.accountId,gatewayId:t.gatewayId}):typeof i?.baseUrl==`string`?i.baseUrl:void 0;return a?v(e,{agentModels:n,providerId:`cloudflare-ai-gateway`,api:`anthropic-messages`,baseUrl:a,defaultModel:r}):{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:n}}}}function ht(e){return y(pt(e),X)}function gt(e,t){return y(mt(e,t),h)}const _t=`claude-opus-4-6`,vt={input:0,output:0,cacheRead:0,cacheWrite:0};function yt(){return{id:_t,name:`Claude Opus 4.6`,reasoning:!0,input:[`text`,`image`],cost:vt,contextWindow:128e3,maxTokens:8192}}function bt(e){let t={...e.agents?.defaults?.models};t[Y]={...t[Y],alias:t[`litellm/claude-opus-4-6`]?.alias??`LiteLLM`};let n=yt(),r=e.models?.providers?.litellm;return v(e,{agentModels:t,providerId:`litellm`,api:`openai-completions`,baseUrl:(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`http://localhost:4000`,defaultModel:n,defaultModelId:_t})}function xt(e){return y(bt(e),Y)}function St(e,t){let n=`zai/${t?.modelId?.trim()||`glm-5`}`,r={...e.agents?.defaults?.models};r[n]={...r[n],alias:r[n]?.alias??`GLM`};let i={...e.models?.providers},a=i.zai,o=Array.isArray(a?.models)?a.models:[],s=[F({id:`glm-5`}),F({id:`glm-4.7`}),F({id:`glm-4.7-flash`}),F({id:`glm-4.7-flashx`})],c=[...o],l=new Set(o.map(e=>e.id));for(let e of s)l.has(e.id)||(c.push(e),l.add(e.id));let{apiKey:u,...d}=a??{},f=(typeof u==`string`?u:void 0)?.trim(),p=t?.endpoint?j(t.endpoint):(typeof a?.baseUrl==`string`?a.baseUrl:``)||j();return i.zai={...d,baseUrl:p,api:`openai-completions`,...f?{apiKey:f}:{},models:c.length>0?c:s},x(e,{agentModels:r,providers:i})}function Ct(e,t){let n=t?.modelId?.trim()||`glm-5`,r=n===`glm-5`?W:`zai/${n}`;return y(St(e,t),r)}function wt(e){let t={...e.agents?.defaults?.models};return t[K]={...t[K],alias:t[`openrouter/auto`]?.alias??`OpenRouter`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function Tt(e){return y(wt(e),K)}function Et(e){return Ot(e,`https://api.moonshot.ai/v1`)}function Dt(e){return Ot(e,`https://api.moonshot.cn/v1`)}function Ot(e,t){let n={...e.agents?.defaults?.models};return n[w]={...n[w],alias:n[w]?.alias??`Kimi`},v(e,{agentModels:n,providerId:`moonshot`,api:`openai-completions`,baseUrl:t,defaultModel:Oe(),defaultModelId:C})}function kt(e){return y(Et(e),w)}function At(e){return y(Dt(e),w)}function jt(e){let t={...e.agents?.defaults?.models};t[T]={...t[T],alias:t[T]?.alias??`Kimi for Coding`};let n=pe().models[0];return v(e,{agentModels:t,providerId:`kimi-coding`,api:`anthropic-messages`,baseUrl:`https://api.kimi.com/coding/`,defaultModel:n,defaultModelId:be})}function Mt(e){return y(jt(e),T)}function Nt(e){let t={...e.agents?.defaults?.models};t[s]={...t[s],alias:t[s]?.alias??`MiniMax M2.5`};let n={...e.models?.providers},i=n.synthetic,a=Array.isArray(i?.models)?i.models:[],c=ce.map(o),l=[...a,...c.filter(e=>!a.some(t=>t.id===e.id))],{apiKey:u,...d}=i??{},f=(typeof u==`string`?u:void 0)?.trim();return n.synthetic={...d,baseUrl:r,api:`anthropic-messages`,...f?{apiKey:f}:{},models:l.length>0?l:c},x(e,{agentModels:t,providers:n})}function Pt(e){return y(Nt(e),s)}function Ft(e){let t={...e.agents?.defaults?.models};t[G]={...t[G],alias:t[`xiaomi/mimo-v2-flash`]?.alias??`Xiaomi`};let n=ee();return _(e,{agentModels:t,providerId:`xiaomi`,api:n.api??`openai-completions`,baseUrl:n.baseUrl,defaultModels:n.models??[],defaultModelId:l})}function It(e){return y(Ft(e),G)}function Lt(e){let t={...e.agents?.defaults?.models};return t[m]={...t[m],alias:t[m]?.alias??`Kimi K2.5`},b(e,{agentModels:t,providerId:`venice`,api:`openai-completions`,baseUrl:ne,catalogModels:re.map(u)})}function Rt(e){return y(Lt(e),m)}function zt(e){let t={...e.agents?.defaults?.models};return t[J]={...t[J],alias:t[`together/moonshotai/Kimi-K2.5`]?.alias??`Together AI`},b(e,{agentModels:t,providerId:`together`,api:`openai-completions`,baseUrl:i,catalogModels:p.map(te)})}function Bt(e){return y(zt(e),J)}function Vt(e){let t={...e.agents?.defaults?.models};return t[q]={...t[q],alias:t[`huggingface/deepseek-ai/DeepSeek-R1`]?.alias??`Hugging Face`},b(e,{agentModels:t,providerId:`huggingface`,api:`openai-completions`,baseUrl:ue,catalogModels:oe.map(le)})}function Ht(e){return y(Vt(e),q)}function Ut(e){let t={...e.agents?.defaults?.models};return t[L]={...t[L],alias:t[L]?.alias??`Grok`},v(e,{agentModels:t,providerId:`xai`,api:`openai-completions`,baseUrl:`https://api.x.ai/v1`,defaultModel:Me(),defaultModelId:I})}function Wt(e){return y(Ut(e),L)}function Gt(e){let t={...e.agents?.defaults?.models};return t[P]={...t[P],alias:t[P]?.alias??`Mistral`},v(e,{agentModels:t,providerId:`mistral`,api:`openai-completions`,baseUrl:`https://api.mistral.ai/v1`,defaultModel:Ae(),defaultModelId:N})}function Kt(e){return y(Gt(e),P)}function qt(e){let t={...e.agents?.defaults?.models};return t[g]={...t[g],alias:t[g]?.alias??`Kilo Gateway`},b(e,{agentModels:t,providerId:`kilocode`,api:`openai-completions`,baseUrl:de,catalogModels:d().models??[]})}function Jt(e){return y(qt(e),g)}function Yt(e,t){let n=t.provider.toLowerCase(),r={...e.auth?.profiles,[t.profileId]:{provider:t.provider,mode:t.mode,...t.email?{email:t.email}:{}}},i=Object.entries(e.auth?.profiles??{}).filter(([,e])=>e.provider.toLowerCase()===n).map(([e,t])=>({profileId:e,mode:t.mode})),a=e.auth?.order?.[t.provider],o=t.preferProfileFirst??!0,s=a&&o?[t.profileId,...a.filter(e=>e!==t.profileId)]:a,c=i.some(({profileId:e,mode:n})=>e!==t.profileId&&n!==t.mode),l=a===void 0&&o&&c?[t.profileId,...i.map(({profileId:e})=>e).filter(e=>e!==t.profileId)]:void 0,u=a===void 0?l?{...e.auth?.order,[t.provider]:l}:e.auth?.order:{...e.auth?.order,[t.provider]:s?.includes(t.profileId)?s:[...s??[],t.profileId]};return{...e,auth:{...e.auth,profiles:r,...u?{order:u}:{}}}}function Xt(e){let t={...e.agents?.defaults?.models};t[E]={...t[E],alias:t[E]?.alias??`QIANFAN`};let r=n(),i=e.models?.providers?.qianfan,o=(typeof i?.baseUrl==`string`?i.baseUrl.trim():``)||`https://qianfan.baidubce.com/v2`;return _(e,{agentModels:t,providerId:`qianfan`,api:typeof i?.api==`string`?i.api:`openai-completions`,baseUrl:o,defaultModels:r.models??[],defaultModelId:a})}function Zt(e){return y(Xt(e),E)}function Qt(e,t){let n={...e.agents?.defaults?.models};for(let e of[`qwen3.5-plus`,`qwen3-max-2026-01-23`,`qwen3-coder-next`,`qwen3-coder-plus`,`MiniMax-M2.5`,`glm-5`,`glm-4.7`,`kimi-k2.5`]){let t=`modelstudio/${e}`;n[t]||(n[t]={})}n[R]={...n[R],alias:n[R]?.alias??`Qwen`};let r={...e.models?.providers},i=r.modelstudio,a=Array.isArray(i?.models)?i.models:[],o=[z({id:`qwen3.5-plus`}),z({id:`qwen3-max-2026-01-23`}),z({id:`qwen3-coder-next`}),z({id:`qwen3-coder-plus`}),z({id:`MiniMax-M2.5`}),z({id:`glm-5`}),z({id:`glm-4.7`}),z({id:`kimi-k2.5`})],s=[...a],c=new Set(a.map(e=>e.id));for(let e of o)c.has(e.id)||(s.push(e),c.add(e.id));let{apiKey:l,...u}=i??{},d=(typeof l==`string`?l:void 0)?.trim();return r.modelstudio={...u,baseUrl:t,api:`openai-completions`,...d?{apiKey:d}:{},models:s.length>0?s:o},x(e,{agentModels:n,providers:r})}function $t(e){return Qt(e,`https://coding-intl.dashscope.aliyuncs.com/v1`)}function en(e){return Qt(e,`https://coding.dashscope.aliyuncs.com/v1`)}function tn(e){return y($t(e),R)}function nn(e){return y(en(e),R)}function Z(e){let t={...e.agents?.defaults?.models};t[`anthropic/claude-opus-4-6`]={...t[`anthropic/claude-opus-4-6`],alias:t[`anthropic/claude-opus-4-6`]?.alias??`Opus`},t[`lmstudio/minimax-m2.5-gs32`]={...t[`lmstudio/minimax-m2.5-gs32`],alias:t[`lmstudio/minimax-m2.5-gs32`]?.alias??`Minimax`};let n={...e.models?.providers};return n.lmstudio||={baseUrl:`http://127.0.0.1:1234/v1`,apiKey:`lmstudio`,api:`openai-responses`,models:[M({id:`minimax-m2.5-gs32`,name:`MiniMax M2.5 GS32`,reasoning:!1,cost:Se,contextWindow:196608,maxTokens:8192})]},x(e,{agentModels:t,providers:n})}function rn(e){return y(Z(e),`lmstudio/minimax-m2.5-gs32`)}function an(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function on(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function sn(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function cn(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function Q(e,t){let n={...e.models?.providers},r=n[t.providerId],i=r?.models??[],a=De(t.modelId),o=i.some(e=>e.id===t.modelId)?i:[...i,a],{apiKey:s,...c}=r??{baseUrl:t.baseUrl,models:[]},l=typeof s==`string`?s:void 0,u=l?.trim()===`minimax`?``:l;n[t.providerId]={...c,baseUrl:t.baseUrl,api:`anthropic-messages`,authHeader:!0,...u?.trim()?{apiKey:u}:{},models:o.length>0?o:[a]};let d={...e.agents?.defaults?.models},f=`${t.providerId}/${t.modelId}`;return d[f]={...d[f],alias:`Minimax`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:d}},models:{mode:e.models?.mode??`merge`,providers:n}}}function ln(e,t){return y(Q(e,t),`${t.providerId}/${t.modelId}`)}t(`opencode-zen-models`);const $=`opencode/claude-opus-4-6`;function un(e){let t={...e.agents?.defaults?.models};return t[$]={...t[$],alias:t[$]?.alias??`Opus`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function dn(e){return y(un(e),$)}function fn(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.primary==`string`)return e.primary}function pn(e){let t=fn(e.cfg.agents?.defaults?.model)?.trim();return(t&&e.legacyModels?.has(t)?e.model:t)===e.model?{next:e.cfg,changed:!1}:{next:{...e.cfg,agents:{...e.cfg.agents,defaults:{...e.cfg.agents?.defaults,model:e.cfg.agents?.defaults?.model&&typeof e.cfg.agents.defaults.model==`object`?{...e.cfg.agents.defaults.model,primary:e.model}:{primary:e.model}}}},changed:!0}}const mn=`opencode-go/kimi-k2.5`,hn={"opencode-go/kimi-k2.5":`Kimi`,"opencode-go/glm-5":`GLM`,"opencode-go/minimax-m2.5":`MiniMax`};function gn(e){let t={...e.agents?.defaults?.models};for(let[e,n]of Object.entries(hn))t[e]={...t[e],alias:t[e]?.alias??n};return{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function _n(e){return y(gn(e),mn)}function vn(e){let t=e.trim();return t&&t.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function yn(e){return`${ie(e.provider)}:${vn(e.name)}`}function bn(e){let t=e.trim();if(!t)return`Required`;if(!t.startsWith(`sk-ant-oat01-`))return`Expected token starting with sk-ant-oat01-`;if(t.length<80)return`Token looks too short; paste the full setup-token`}export{pt as $,Et as A,Qe as At,Rt as B,O as Bt,Gt as C,ct as Ct,en as D,nt as Dt,$t as E,Xe as Et,Xt as F,R as Ft,Ft as G,Wt as H,k as Ht,Pt as I,w as It,xt as J,Ct as K,Nt as L,E as Lt,Tt as M,Be as Mt,wt as N,T as Nt,kt as O,qe as Ot,Zt as P,P as Pt,ht as Q,Bt as R,L as Rt,Kt as S,$e as St,nn as T,ot as Tt,Ut as U,Lt as V,D as Vt,It as W,gt as X,bt as Y,mt as Z,Vt as _,lt as _t,mn as a,G as at,Mt as b,it as bt,un as c,Je as ct,an as d,st as dt,q as et,sn as f,ft,Ht as g,dt as gt,Yt as h,We as ht,gn as i,X as it,Dt as j,Ze as jt,At as k,ut as kt,on as l,et as lt,Z as m,tt as mt,bn as n,K as nt,pn as o,W as ot,rn as p,Ke as pt,St as q,_n as r,J as rt,dn as s,Ve as st,yn as t,Y as tt,cn as u,Ue as ut,Jt as v,Ge as vt,tn as w,Ye as wt,jt as x,rt as xt,qt as y,He as yt,zt as z,A as zt};
1
+ import{g as e}from"./paths-B4IRk3wi.js";import{t}from"./subsystem-C5XF2Fy5.js";import{B as n,G as r,H as i,I as a,J as o,K as s,Kl as c,L as l,Q as u,R as d,St as f,U as p,V as ee,W as te,X as m,Y as ne,Z as re,bt as h,d as ie,lu as ae,nt as oe,nu as se,q as ce,rt as le,tt as ue,vt as de,xt as fe,yt as g,z as pe}from"./model-selection-I1ctjFOB.js";import{i as me,t as he}from"./types.secrets-C-5U96pc.js";import{t as ge}from"./provider-env-vars-D8p6Ohpj.js";import{a as _,i as v,n as y,o as b,r as x}from"./oauth-env-DSLBTWb1.js";import _e from"node:fs";import S from"node:path";const ve=`https://api.minimax.io/anthropic`,ye=`https://api.minimaxi.com/anthropic`,C=`kimi-k2.5`,w=`moonshot/${C}`,be=`k2p5`,T=`kimi-coding/${be}`,E=`qianfan/${a}`,D=`https://api.z.ai/api/coding/paas/v4`,O=`https://open.bigmodel.cn/api/coding/paas/v4`,k=`https://api.z.ai/api/paas/v4`,A=`https://open.bigmodel.cn/api/paas/v4`;function j(e){switch(e){case`coding-cn`:return O;case`global`:return k;case`cn`:return A;case`coding-global`:return D;default:return k}}const xe={input:.3,output:1.2,cacheRead:.03,cacheWrite:.12},Se={input:0,output:0,cacheRead:0,cacheWrite:0},Ce={input:0,output:0,cacheRead:0,cacheWrite:0},we={input:0,output:0,cacheRead:0,cacheWrite:0},Te={"MiniMax-M2.5":{name:`MiniMax M2.5`,reasoning:!0},"MiniMax-M2.5-highspeed":{name:`MiniMax M2.5 Highspeed`,reasoning:!0}},Ee={"glm-5":{name:`GLM-5`,reasoning:!0},"glm-4.7":{name:`GLM-4.7`,reasoning:!0},"glm-4.7-flash":{name:`GLM-4.7 Flash`,reasoning:!0},"glm-4.7-flashx":{name:`GLM-4.7 FlashX`,reasoning:!0}};function M(e){let t=Te[e.id];return{id:e.id,name:e.name??t?.name??`MiniMax ${e.id}`,reasoning:e.reasoning??t?.reasoning??!1,input:[`text`],cost:e.cost,contextWindow:e.contextWindow,maxTokens:e.maxTokens}}function De(e){return M({id:e,cost:xe,contextWindow:2e5,maxTokens:8192})}function Oe(){return{id:C,name:`Kimi K2.5`,reasoning:!1,input:[`text`,`image`],cost:Ce,contextWindow:256e3,maxTokens:8192}}const N=`mistral-large-latest`,P=`mistral/${N}`,ke={input:0,output:0,cacheRead:0,cacheWrite:0};function Ae(){return{id:N,name:`Mistral Large`,reasoning:!1,input:[`text`,`image`],cost:ke,contextWindow:262144,maxTokens:262144}}function F(e){let t=Ee[e.id];return{id:e.id,name:e.name??t?.name??`GLM ${e.id}`,reasoning:e.reasoning??t?.reasoning??!0,input:[`text`],cost:e.cost??we,contextWindow:e.contextWindow??204800,maxTokens:e.maxTokens??131072}}const I=`grok-4`,L=`xai/${I}`,je={input:0,output:0,cacheRead:0,cacheWrite:0};function Me(){return{id:I,name:`Grok 4`,reasoning:!1,input:[`text`],cost:je,contextWindow:131072,maxTokens:8192}}const R=`modelstudio/qwen3.5-plus`,Ne={input:0,output:0,cacheRead:0,cacheWrite:0},Pe={"qwen3.5-plus":{name:`qwen3.5-plus`,reasoning:!1,input:[`text`,`image`],contextWindow:1e6,maxTokens:65536},"qwen3-max-2026-01-23":{name:`qwen3-max-2026-01-23`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-next":{name:`qwen3-coder-next`,reasoning:!1,input:[`text`],contextWindow:262144,maxTokens:65536},"qwen3-coder-plus":{name:`qwen3-coder-plus`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"MiniMax-M2.5":{name:`MiniMax-M2.5`,reasoning:!1,input:[`text`],contextWindow:1e6,maxTokens:65536},"glm-5":{name:`glm-5`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"glm-4.7":{name:`glm-4.7`,reasoning:!1,input:[`text`],contextWindow:202752,maxTokens:16384},"kimi-k2.5":{name:`kimi-k2.5`,reasoning:!1,input:[`text`,`image`],contextWindow:262144,maxTokens:32768}};function z(e){let t=Pe[e.id];return{id:e.id,name:e.name??t?.name??e.id,reasoning:e.reasoning??t?.reasoning??!1,input:e.input??[...t?.input??[`text`]],cost:e.cost??Ne,contextWindow:e.contextWindow??t?.contextWindow??262144,maxTokens:e.maxTokens??t?.maxTokens??65536}}const B=e=>e??se(),Fe=/^\$\{([A-Z][A-Z0-9_]*)\}$/;function V(e){return{source:`env`,provider:he,id:e}}function Ie(e){let t=Fe.exec(e);return t?V(t[1]):null}function Le(e){let t=ge[e]?.find(e=>e.trim().length>0);if(!t)throw Error(`Provider "${e}" does not have a default env var mapping for secret-input-mode=ref.`);return V(t)}function Re(e,t,n){let r=me(t);if(r)return r;let i=ae(t);return Ie(i)||(n?.secretInputMode===`ref`?Le(e):i)}function H(e,t,n,r){let i=Re(e,t,r);return typeof i==`string`?{type:`api_key`,provider:e,key:i,...n?{metadata:n}:{}}:{type:`api_key`,provider:e,keyRef:i,...n?{metadata:n}:{}}}function U(e){try{return _e.realpathSync(S.resolve(e))}catch{return null}}function ze(t){let n=S.resolve(t),r=S.dirname(n),i=S.dirname(r),a=S.basename(n)===`agent`&&S.basename(i)===`agents`?i:S.join(e(),`agents`),o=(()=>{try{return _e.readdirSync(a,{withFileTypes:!0})}catch{return[]}})().filter(e=>e.isDirectory()||e.isSymbolicLink()).map(e=>S.join(a,e.name,`agent`)),s=new Set,c=[];for(let e of[n,...o]){let t=U(e);t&&!s.has(t)&&(s.add(t),c.push(t))}return c}async function Be(e,t,n,r){let i=`${e}:${typeof t.email==`string`&&t.email.trim()?t.email.trim():`default`}`,a=S.resolve(B(n)),o=r?.syncSiblingAgents?ze(a):[a],s={type:`oauth`,provider:e,...t};if(c({profileId:i,credential:s,agentDir:a}),r?.syncSiblingAgents){let e=U(a);for(let t of o){let n=U(t);if(!(n&&e&&n===e))try{c({profileId:i,credential:s,agentDir:t})}catch{}}}return i}async function Ve(e,t,n){c({profileId:`anthropic:default`,credential:H(`anthropic`,e,void 0,n),agentDir:B(t)})}async function He(e,t,n){c({profileId:`openai:default`,credential:H(`openai`,e,void 0,n),agentDir:B(t)})}async function Ue(e,t,n){c({profileId:`google:default`,credential:H(`google`,e,void 0,n),agentDir:B(t)})}async function We(e,t,n=`minimax:default`,r){c({profileId:n,credential:H(n.split(`:`)[0]??`minimax`,e,void 0,r),agentDir:B(t)})}async function Ge(e,t,n){c({profileId:`moonshot:default`,credential:H(`moonshot`,e,void 0,n),agentDir:B(t)})}async function Ke(e,t,n){c({profileId:`kimi-coding:default`,credential:H(`kimi-coding`,e,void 0,n),agentDir:B(t)})}async function qe(e,t,n){c({profileId:`volcengine:default`,credential:H(`volcengine`,e,void 0,n),agentDir:B(t)})}async function Je(e,t,n){c({profileId:`byteplus:default`,credential:H(`byteplus`,e,void 0,n),agentDir:B(t)})}async function Ye(e,t,n){c({profileId:`synthetic:default`,credential:H(`synthetic`,e,void 0,n),agentDir:B(t)})}async function Xe(e,t,n){c({profileId:`venice:default`,credential:H(`venice`,e,void 0,n),agentDir:B(t)})}const W=`zai/glm-5`,G=`xiaomi/mimo-v2-flash`,K=`openrouter/auto`,q=`huggingface/deepseek-ai/DeepSeek-R1`,J=`together/moonshotai/Kimi-K2.5`,Y=`litellm/claude-opus-4-6`,X=`vercel-ai-gateway/anthropic/claude-opus-4.6`;async function Ze(e,t,n){c({profileId:`zai:default`,credential:H(`zai`,e,void 0,n),agentDir:B(t)})}async function Qe(e,t,n){c({profileId:`xiaomi:default`,credential:H(`xiaomi`,e,void 0,n),agentDir:B(t)})}async function $e(e,t,n){c({profileId:`openrouter:default`,credential:H(`openrouter`,typeof e==`string`&&e===`undefined`?``:e,void 0,n),agentDir:B(t)})}async function et(e,t,n,r,i){c({profileId:`cloudflare-ai-gateway:default`,credential:H(`cloudflare-ai-gateway`,n,{accountId:e.trim(),gatewayId:t.trim()},i),agentDir:B(r)})}async function tt(e,t,n){c({profileId:`litellm:default`,credential:H(`litellm`,e,void 0,n),agentDir:B(t)})}async function nt(e,t,n){c({profileId:`vercel-ai-gateway:default`,credential:H(`vercel-ai-gateway`,e,void 0,n),agentDir:B(t)})}async function rt(e,t,n){await at(e,t,n)}async function it(e,t,n){await at(e,t,n)}async function at(e,t,n){let r=B(t);for(let t of[`opencode`,`opencode-go`])c({profileId:`${t}:default`,credential:H(t,e,void 0,n),agentDir:r})}async function ot(e,t,n){c({profileId:`together:default`,credential:H(`together`,e,void 0,n),agentDir:B(t)})}async function st(e,t,n){c({profileId:`huggingface:default`,credential:H(`huggingface`,e,void 0,n),agentDir:B(t)})}function ct(e,t,n){c({profileId:`qianfan:default`,credential:H(`qianfan`,e,void 0,n),agentDir:B(t)})}function lt(e,t,n){c({profileId:`modelstudio:default`,credential:H(`modelstudio`,e,void 0,n),agentDir:B(t)})}function ut(e,t,n){c({profileId:`xai:default`,credential:H(`xai`,e,void 0,n),agentDir:B(t)})}async function dt(e,t,n){c({profileId:`mistral:default`,credential:H(`mistral`,e,void 0,n),agentDir:B(t)})}async function ft(e,t,n){c({profileId:`kilocode:default`,credential:H(`kilocode`,e,void 0,n),agentDir:B(t)})}function pt(e){let t={...e.agents?.defaults?.models};return t[X]={...t[X],alias:t[`vercel-ai-gateway/anthropic/claude-opus-4.6`]?.alias??`Vercel AI Gateway`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function mt(e,t){let n={...e.agents?.defaults?.models};n[h]={...n[h],alias:n[h]?.alias??`Cloudflare AI Gateway`};let r=fe(),i=e.models?.providers?.[`cloudflare-ai-gateway`],a=t?.accountId&&t?.gatewayId?f({accountId:t.accountId,gatewayId:t.gatewayId}):typeof i?.baseUrl==`string`?i.baseUrl:void 0;return a?v(e,{agentModels:n,providerId:`cloudflare-ai-gateway`,api:`anthropic-messages`,baseUrl:a,defaultModel:r}):{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:n}}}}function ht(e){return y(pt(e),X)}function gt(e,t){return y(mt(e,t),h)}const _t=`claude-opus-4-6`,vt={input:0,output:0,cacheRead:0,cacheWrite:0};function yt(){return{id:_t,name:`Claude Opus 4.6`,reasoning:!0,input:[`text`,`image`],cost:vt,contextWindow:128e3,maxTokens:8192}}function bt(e){let t={...e.agents?.defaults?.models};t[Y]={...t[Y],alias:t[`litellm/claude-opus-4-6`]?.alias??`LiteLLM`};let n=yt(),r=e.models?.providers?.litellm;return v(e,{agentModels:t,providerId:`litellm`,api:`openai-completions`,baseUrl:(typeof r?.baseUrl==`string`?r.baseUrl.trim():``)||`http://localhost:4000`,defaultModel:n,defaultModelId:_t})}function xt(e){return y(bt(e),Y)}function St(e,t){let n=`zai/${t?.modelId?.trim()||`glm-5`}`,r={...e.agents?.defaults?.models};r[n]={...r[n],alias:r[n]?.alias??`GLM`};let i={...e.models?.providers},a=i.zai,o=Array.isArray(a?.models)?a.models:[],s=[F({id:`glm-5`}),F({id:`glm-4.7`}),F({id:`glm-4.7-flash`}),F({id:`glm-4.7-flashx`})],c=[...o],l=new Set(o.map(e=>e.id));for(let e of s)l.has(e.id)||(c.push(e),l.add(e.id));let{apiKey:u,...d}=a??{},f=(typeof u==`string`?u:void 0)?.trim(),p=t?.endpoint?j(t.endpoint):(typeof a?.baseUrl==`string`?a.baseUrl:``)||j();return i.zai={...d,baseUrl:p,api:`openai-completions`,...f?{apiKey:f}:{},models:c.length>0?c:s},x(e,{agentModels:r,providers:i})}function Ct(e,t){let n=t?.modelId?.trim()||`glm-5`,r=n===`glm-5`?W:`zai/${n}`;return y(St(e,t),r)}function wt(e){let t={...e.agents?.defaults?.models};return t[K]={...t[K],alias:t[`openrouter/auto`]?.alias??`OpenRouter`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function Tt(e){return y(wt(e),K)}function Et(e){return Ot(e,`https://api.moonshot.ai/v1`)}function Dt(e){return Ot(e,`https://api.moonshot.cn/v1`)}function Ot(e,t){let n={...e.agents?.defaults?.models};return n[w]={...n[w],alias:n[w]?.alias??`Kimi`},v(e,{agentModels:n,providerId:`moonshot`,api:`openai-completions`,baseUrl:t,defaultModel:Oe(),defaultModelId:C})}function kt(e){return y(Et(e),w)}function At(e){return y(Dt(e),w)}function jt(e){let t={...e.agents?.defaults?.models};t[T]={...t[T],alias:t[T]?.alias??`Kimi for Coding`};let n=pe().models[0];return v(e,{agentModels:t,providerId:`kimi-coding`,api:`anthropic-messages`,baseUrl:`https://api.kimi.com/coding/`,defaultModel:n,defaultModelId:be})}function Mt(e){return y(jt(e),T)}function Nt(e){let t={...e.agents?.defaults?.models};t[s]={...t[s],alias:t[s]?.alias??`MiniMax M2.5`};let n={...e.models?.providers},i=n.synthetic,a=Array.isArray(i?.models)?i.models:[],c=ce.map(o),l=[...a,...c.filter(e=>!a.some(t=>t.id===e.id))],{apiKey:u,...d}=i??{},f=(typeof u==`string`?u:void 0)?.trim();return n.synthetic={...d,baseUrl:r,api:`anthropic-messages`,...f?{apiKey:f}:{},models:l.length>0?l:c},x(e,{agentModels:t,providers:n})}function Pt(e){return y(Nt(e),s)}function Ft(e){let t={...e.agents?.defaults?.models};t[G]={...t[G],alias:t[`xiaomi/mimo-v2-flash`]?.alias??`Xiaomi`};let n=ee();return _(e,{agentModels:t,providerId:`xiaomi`,api:n.api??`openai-completions`,baseUrl:n.baseUrl,defaultModels:n.models??[],defaultModelId:l})}function It(e){return y(Ft(e),G)}function Lt(e){let t={...e.agents?.defaults?.models};return t[m]={...t[m],alias:t[m]?.alias??`Kimi K2.5`},b(e,{agentModels:t,providerId:`venice`,api:`openai-completions`,baseUrl:ne,catalogModels:re.map(u)})}function Rt(e){return y(Lt(e),m)}function zt(e){let t={...e.agents?.defaults?.models};return t[J]={...t[J],alias:t[`together/moonshotai/Kimi-K2.5`]?.alias??`Together AI`},b(e,{agentModels:t,providerId:`together`,api:`openai-completions`,baseUrl:i,catalogModels:p.map(te)})}function Bt(e){return y(zt(e),J)}function Vt(e){let t={...e.agents?.defaults?.models};return t[q]={...t[q],alias:t[`huggingface/deepseek-ai/DeepSeek-R1`]?.alias??`Hugging Face`},b(e,{agentModels:t,providerId:`huggingface`,api:`openai-completions`,baseUrl:ue,catalogModels:oe.map(le)})}function Ht(e){return y(Vt(e),q)}function Ut(e){let t={...e.agents?.defaults?.models};return t[L]={...t[L],alias:t[L]?.alias??`Grok`},v(e,{agentModels:t,providerId:`xai`,api:`openai-completions`,baseUrl:`https://api.x.ai/v1`,defaultModel:Me(),defaultModelId:I})}function Wt(e){return y(Ut(e),L)}function Gt(e){let t={...e.agents?.defaults?.models};return t[P]={...t[P],alias:t[P]?.alias??`Mistral`},v(e,{agentModels:t,providerId:`mistral`,api:`openai-completions`,baseUrl:`https://api.mistral.ai/v1`,defaultModel:Ae(),defaultModelId:N})}function Kt(e){return y(Gt(e),P)}function qt(e){let t={...e.agents?.defaults?.models};return t[g]={...t[g],alias:t[g]?.alias??`Kilo Gateway`},b(e,{agentModels:t,providerId:`kilocode`,api:`openai-completions`,baseUrl:de,catalogModels:d().models??[]})}function Jt(e){return y(qt(e),g)}function Yt(e,t){let n=t.provider.toLowerCase(),r={...e.auth?.profiles,[t.profileId]:{provider:t.provider,mode:t.mode,...t.email?{email:t.email}:{}}},i=Object.entries(e.auth?.profiles??{}).filter(([,e])=>e.provider.toLowerCase()===n).map(([e,t])=>({profileId:e,mode:t.mode})),a=e.auth?.order?.[t.provider],o=t.preferProfileFirst??!0,s=a&&o?[t.profileId,...a.filter(e=>e!==t.profileId)]:a,c=i.some(({profileId:e,mode:n})=>e!==t.profileId&&n!==t.mode),l=a===void 0&&o&&c?[t.profileId,...i.map(({profileId:e})=>e).filter(e=>e!==t.profileId)]:void 0,u=a===void 0?l?{...e.auth?.order,[t.provider]:l}:e.auth?.order:{...e.auth?.order,[t.provider]:s?.includes(t.profileId)?s:[...s??[],t.profileId]};return{...e,auth:{...e.auth,profiles:r,...u?{order:u}:{}}}}function Xt(e){let t={...e.agents?.defaults?.models};t[E]={...t[E],alias:t[E]?.alias??`QIANFAN`};let r=n(),i=e.models?.providers?.qianfan,o=(typeof i?.baseUrl==`string`?i.baseUrl.trim():``)||`https://qianfan.baidubce.com/v2`;return _(e,{agentModels:t,providerId:`qianfan`,api:typeof i?.api==`string`?i.api:`openai-completions`,baseUrl:o,defaultModels:r.models??[],defaultModelId:a})}function Zt(e){return y(Xt(e),E)}function Qt(e,t){let n={...e.agents?.defaults?.models};for(let e of[`qwen3.5-plus`,`qwen3-max-2026-01-23`,`qwen3-coder-next`,`qwen3-coder-plus`,`MiniMax-M2.5`,`glm-5`,`glm-4.7`,`kimi-k2.5`]){let t=`modelstudio/${e}`;n[t]||(n[t]={})}n[R]={...n[R],alias:n[R]?.alias??`Qwen`};let r={...e.models?.providers},i=r.modelstudio,a=Array.isArray(i?.models)?i.models:[],o=[z({id:`qwen3.5-plus`}),z({id:`qwen3-max-2026-01-23`}),z({id:`qwen3-coder-next`}),z({id:`qwen3-coder-plus`}),z({id:`MiniMax-M2.5`}),z({id:`glm-5`}),z({id:`glm-4.7`}),z({id:`kimi-k2.5`})],s=[...a],c=new Set(a.map(e=>e.id));for(let e of o)c.has(e.id)||(s.push(e),c.add(e.id));let{apiKey:l,...u}=i??{},d=(typeof l==`string`?l:void 0)?.trim();return r.modelstudio={...u,baseUrl:t,api:`openai-completions`,...d?{apiKey:d}:{},models:s.length>0?s:o},x(e,{agentModels:n,providers:r})}function $t(e){return Qt(e,`https://coding-intl.dashscope.aliyuncs.com/v1`)}function en(e){return Qt(e,`https://coding.dashscope.aliyuncs.com/v1`)}function tn(e){return y($t(e),R)}function nn(e){return y(en(e),R)}function Z(e){let t={...e.agents?.defaults?.models};t[`anthropic/claude-opus-4-6`]={...t[`anthropic/claude-opus-4-6`],alias:t[`anthropic/claude-opus-4-6`]?.alias??`Opus`},t[`lmstudio/minimax-m2.5-gs32`]={...t[`lmstudio/minimax-m2.5-gs32`],alias:t[`lmstudio/minimax-m2.5-gs32`]?.alias??`Minimax`};let n={...e.models?.providers};return n.lmstudio||={baseUrl:`http://127.0.0.1:1234/v1`,apiKey:`lmstudio`,api:`openai-responses`,models:[M({id:`minimax-m2.5-gs32`,name:`MiniMax M2.5 GS32`,reasoning:!1,cost:Se,contextWindow:196608,maxTokens:8192})]},x(e,{agentModels:t,providers:n})}function rn(e){return y(Z(e),`lmstudio/minimax-m2.5-gs32`)}function an(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function on(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax`,modelId:t,baseUrl:ve})}function sn(e,t=`MiniMax-M2.5`){return Q(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function cn(e,t=`MiniMax-M2.5`){return ln(e,{providerId:`minimax-cn`,modelId:t,baseUrl:ye})}function Q(e,t){let n={...e.models?.providers},r=n[t.providerId],i=r?.models??[],a=De(t.modelId),o=i.some(e=>e.id===t.modelId)?i:[...i,a],{apiKey:s,...c}=r??{baseUrl:t.baseUrl,models:[]},l=typeof s==`string`?s:void 0,u=l?.trim()===`minimax`?``:l;n[t.providerId]={...c,baseUrl:t.baseUrl,api:`anthropic-messages`,authHeader:!0,...u?.trim()?{apiKey:u}:{},models:o.length>0?o:[a]};let d={...e.agents?.defaults?.models},f=`${t.providerId}/${t.modelId}`;return d[f]={...d[f],alias:`Minimax`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:d}},models:{mode:e.models?.mode??`merge`,providers:n}}}function ln(e,t){return y(Q(e,t),`${t.providerId}/${t.modelId}`)}t(`opencode-zen-models`);const $=`opencode/claude-opus-4-6`;function un(e){let t={...e.agents?.defaults?.models};return t[$]={...t[$],alias:t[$]?.alias??`Opus`},{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function dn(e){return y(un(e),$)}function fn(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.primary==`string`)return e.primary}function pn(e){let t=fn(e.cfg.agents?.defaults?.model)?.trim();return(t&&e.legacyModels?.has(t)?e.model:t)===e.model?{next:e.cfg,changed:!1}:{next:{...e.cfg,agents:{...e.cfg.agents,defaults:{...e.cfg.agents?.defaults,model:e.cfg.agents?.defaults?.model&&typeof e.cfg.agents.defaults.model==`object`?{...e.cfg.agents.defaults.model,primary:e.model}:{primary:e.model}}}},changed:!0}}const mn=`opencode-go/kimi-k2.5`,hn={"opencode-go/kimi-k2.5":`Kimi`,"opencode-go/glm-5":`GLM`,"opencode-go/minimax-m2.5":`MiniMax`};function gn(e){let t={...e.agents?.defaults?.models};for(let[e,n]of Object.entries(hn))t[e]={...t[e],alias:t[e]?.alias??n};return{...e,agents:{...e.agents,defaults:{...e.agents?.defaults,models:t}}}}function _n(e){return y(gn(e),mn)}function vn(e){let t=e.trim();return t&&t.toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function yn(e){return`${ie(e.provider)}:${vn(e.name)}`}function bn(e){let t=e.trim();if(!t)return`Required`;if(!t.startsWith(`sk-ant-oat01-`))return`Expected token starting with sk-ant-oat01-`;if(t.length<80)return`Token looks too short; paste the full setup-token`}export{pt as $,Et as A,Qe as At,Rt as B,O as Bt,Gt as C,ct as Ct,en as D,nt as Dt,$t as E,Xe as Et,Xt as F,R as Ft,Ft as G,Wt as H,k as Ht,Pt as I,w as It,xt as J,Ct as K,Nt as L,E as Lt,Tt as M,Be as Mt,wt as N,T as Nt,kt as O,qe as Ot,Zt as P,P as Pt,ht as Q,Bt as R,L as Rt,Kt as S,$e as St,nn as T,ot as Tt,Ut as U,Lt as V,D as Vt,It as W,gt as X,bt as Y,mt as Z,Vt as _,lt as _t,mn as a,G as at,Mt as b,it as bt,un as c,Je as ct,an as d,st as dt,q as et,sn as f,ft,Ht as g,dt as gt,Yt as h,We as ht,gn as i,X as it,Dt as j,Ze as jt,At as k,ut as kt,on as l,et as lt,Z as m,tt as mt,bn as n,K as nt,pn as o,W as ot,rn as p,Ke as pt,St as q,_n as r,J as rt,dn as s,Ve as st,yn as t,Y as tt,cn as u,Ue as ut,Jt as v,Ge as vt,tn as w,Ye as wt,jt as x,rt as xt,qt as y,He as yt,zt as z,A as zt};
@@ -1 +1 @@
1
- import{A as e,Q as t,d as n,k as r}from"./subsystem-BLbY429l.js";import{jo as i}from"./auth-profiles-BhXA8Jy2.js";import{Sn as a}from"./compact-CuBCVnVS.js";const o=`All your chats, one OpenClaw.`,s={newYear:`New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.`,lunarNewYear:`Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.`,christmas:`Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.`,eid:`Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.`,diwali:`Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.`,easter:`Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.`,hanukkah:`Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful.`,halloween:`Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past.`,thanksgiving:`Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to.`,valentines:`Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.`},c=[`Your terminal just grew claws—type something and let the bot pinch the busywork.`,`Welcome to the command line: where dreams compile and confidence segfaults.`,`I run on caffeine, JSON5, and the audacity of "it worked on my machine."`,`Gateway online—please keep hands, feet, and appendages inside the shell at all times.`,`I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.`,`One CLI to rule them all, and one more restart because you changed the port.`,`If it works, it's automation; if it breaks, it's a "learning opportunity."`,`Pairing codes exist because even bots believe in consent—and good security hygiene.`,`Your .env is showing; don't worry, I'll pretend I didn't see it.`,`I'll do the boring stuff while you dramatically stare at the logs like it's cinema.`,`I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.`,`Type the command with confidence—nature will provide the stack trace if needed.`,`I don't judge, but your missing API keys are absolutely judging you.`,`I can grep it, git blame it, and gently roast it—pick your coping mechanism.`,`Hot reload for config, cold sweat for deploys.`,`I'm the assistant your terminal demanded, not the one your sleep schedule requested.`,`I keep secrets like a vault... unless you print them in debug logs again.`,`Automation with claws: minimal fuss, maximal pinch.`,`I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.`,`If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.`,`Your task has been queued; your dignity has been deprecated.`,`I can't fix your code taste, but I can fix your build and your backlog.`,`I'm not magic—I'm just extremely persistent with retries and coping strategies.`,`It's not "failing," it's "discovering new ways to configure the same thing wrong."`,`Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen.`,`I read logs so you can keep pretending you don't have to.`,`If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.`,`I'll refactor your busywork like it owes me money.`,`Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.`,`I'm the reason your shell history looks like a hacker-movie montage.`,`I'm like tmux: confusing at first, then suddenly you can't live without me.`,`I can run local, remote, or purely on vibes—results may vary with DNS.`,`If you can describe it, I can probably automate it—or at least make it funnier.`,`Your config is valid, your assumptions are not.`,`I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).`,`Less clicking, more shipping, fewer "where did that file go" moments.`,`Claws out, commit in—let's ship something mildly responsible.`,`I'll butter your workflow like a lobster roll: messy, delicious, effective.`,`Shell yeah—I'm here to pinch the toil and leave you the glory.`,`If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.`,`The only crab in your contacts you actually want to hear from. 🦞`,`WhatsApp automation without the "please accept our new privacy policy".`,`iMessage green bubble energy, but for everyone.`,`No $999 stand required.`,`We ship features faster than Apple ships calculator updates.`,`Your AI assistant, now without the $3,499 headset.`,`Ah, the fruit tree company! 🍎`,`Greetings, Professor Falken`,`I don't sleep, I just enter low-power mode and dream of clean diffs.`,`Your personal assistant, minus the passive-aggressive calendar reminders.`,`Built by lobsters, for humans. Don't question the hierarchy.`,`I've seen your commit messages. We'll work on that together.`,`More integrations than your therapist's intake form.`,`Running on your hardware, reading your logs, judging nothing (mostly).`,`The only open-source project where the mascot could eat the competition.`,`Self-hosted, self-updating, self-aware (just kidding... unless?).`,`I autocomplete your thoughts—just slower and with more API calls.`,`Somewhere between 'hello world' and 'oh god what have I built.'`,`Your .zshrc wishes it could do what I do.`,`I've read more man pages than any human should—so you don't have to.`,`Powered by open source, sustained by spite and good documentation.`,`I'm the middleware between your ambition and your attention span.`,`Finally, a use for that always-on Mac Mini under your desk.`,`Like having a senior engineer on call, except I don't bill hourly or sigh audibly.`,`Making 'I'll automate that later' happen now.`,`Your second brain, except this one actually remembers where you left things.`,`Half butler, half debugger, full crustacean.`,`I don't have opinions about tabs vs spaces. I have opinions about everything else.`,`Open source means you can see exactly how I judge your config.`,`I've survived more breaking changes than your last three relationships.`,`Runs on a Raspberry Pi. Dreams of a rack in Iceland.`,`The lobster in your shell. 🦞`,`Alexa, but with taste.`,`I'm not AI-powered, I'm AI-possessed. Big difference.`,`Deployed locally, trusted globally, debugged eternally.`,`You had me at 'openclaw gateway start.'`,s.newYear,s.lunarNewYear,s.christmas,s.eid,s.diwali,s.easter,s.hanukkah,s.halloween,s.thanksgiving,s.valentines],l=1440*60*1e3;function u(e){return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}const d=(e,t)=>n=>{let r=u(n);return r.month===e&&r.day===t},f=(e,t=1)=>n=>{let r=u(n);return e.some(([e,n,i])=>{if(r.year!==e)return!1;let a=Date.UTC(e,n,i),o=Date.UTC(r.year,r.month,r.day);return o>=a&&o<a+t*l})},p=new Map([[s.newYear,d(0,1)],[s.lunarNewYear,f([[2025,0,29],[2026,1,17],[2027,1,6]],1)],[s.eid,f([[2025,2,30],[2025,2,31],[2026,2,20],[2027,2,10]],1)],[s.diwali,f([[2025,9,20],[2026,10,8],[2027,9,28]],1)],[s.easter,f([[2025,3,20],[2026,3,5],[2027,2,28]],1)],[s.hanukkah,(e=>t=>{let n=u(t),r=e.find(e=>e.year===n.year);if(!r)return!1;let i=Date.UTC(r.year,r.month,r.day),a=Date.UTC(n.year,n.month,n.day);return a>=i&&a<i+r.duration*l})([{year:2025,month:11,day:15,duration:8},{year:2026,month:11,day:5,duration:8},{year:2027,month:11,day:25,duration:8}])],[s.halloween,d(9,31)],[s.thanksgiving,e=>{let t=u(e);if(t.month!==10)return!1;let n=1+(4-new Date(Date.UTC(t.year,10,1)).getUTCDay()+7)%7+21;return t.day===n}],[s.valentines,d(1,14)],[s.christmas,d(11,25)]]);function m(e,t){let n=p.get(e);return n?n(t):!0}function h(e={}){if(c.length===0)return[o];let t=e.now?e.now():new Date,n=c.filter(e=>m(e,t));return n.length>0?n:c}function g(e={}){if(e.mode===`off`)return``;if(e.mode===`default`)return o;let t=(e.env??process.env)?.OPENCLAW_TAGLINE_INDEX;if(t!==void 0){let e=Number.parseInt(t,10);if(!Number.isNaN(e)&&e>=0){let t=c.length>0?c:[o];return t[e%t.length]}}let n=h(e),r=e.random??Math.random;return n[Math.floor(r()*n.length)%n.length]}let _=!1;typeof Intl<`u`&&`Segmenter`in Intl&&new Intl.Segmenter(void 0,{granularity:`grapheme`});const v=e=>e.some(e=>e===`--json`||e.startsWith(`--json=`)),y=e=>e.some(e=>e===`--version`||e===`-V`)||t(e);function b(e){if(e===`random`||e===`default`||e===`off`)return e}function x(e){let t=b(e.mode);if(t)return t;try{return b(i().cli?.banner?.taglineMode)}catch{return}}function S(t,i={}){let o=i.commit??a({env:i.env,moduleUrl:import.meta.url})??`unknown`,s=g({...i,mode:x(i)}),c=i.richTty??r(),l=`🦞 OpenClaw`,u=i.columns??process.stdout.columns??120,d=`${l} ${t} (${o})`,f=s?`${d} — ${s}`:d,p=n(f)<=u;if(c){if(p)return s?`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)} ${e.muted(`—`)} ${e.accentDim(s)}`:`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)}`;let n=`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)}`;return s?`${n}\n${`${` `.repeat(3)}${e.accentDim(s)}`}`:n}if(p)return f;let m=d;return s?`${m}\n${`${` `.repeat(3)}${s}`}`:m}function C(e,t={}){if(_)return;let n=t.argv??process.argv;if(!process.stdout.isTTY||v(n)||y(n))return;let r=S(e,t);process.stdout.write(`\n${r}\n\n`),_=!0}function w(){return _}export{S as n,w as r,C as t};
1
+ import{A as e,Q as t,d as n,k as r}from"./subsystem-BLbY429l.js";import{jo as i}from"./auth-profiles-BhXA8Jy2.js";import{Sn as a}from"./compact-CuBCVnVS.js";const o=`All your chats, one OpenClaw.`,s={newYear:`New Year's Day: New year, new config—same old EADDRINUSE, but this time we resolve it like grown-ups.`,lunarNewYear:`Lunar New Year: May your builds be lucky, your branches prosperous, and your merge conflicts chased away with fireworks.`,christmas:`Christmas: Ho ho ho—Santa's little claw-sistant is here to ship joy, roll back chaos, and stash the keys safely.`,eid:`Eid al-Fitr: Celebration mode: queues cleared, tasks completed, and good vibes committed to main with clean history.`,diwali:`Diwali: Let the logs sparkle and the bugs flee—today we light up the terminal and ship with pride.`,easter:`Easter: I found your missing environment variable—consider it a tiny CLI egg hunt with fewer jellybeans.`,hanukkah:`Hanukkah: Eight nights, eight retries, zero shame—may your gateway stay lit and your deployments stay peaceful.`,halloween:`Halloween: Spooky season: beware haunted dependencies, cursed caches, and the ghost of node_modules past.`,thanksgiving:`Thanksgiving: Grateful for stable ports, working DNS, and a bot that reads the logs so nobody has to.`,valentines:`Valentine's Day: Roses are typed, violets are piped—I'll automate the chores so you can spend time with humans.`},c=[`Your terminal just grew claws—type something and let the bot pinch the busywork.`,`Welcome to the command line: where dreams compile and confidence segfaults.`,`I run on caffeine, JSON5, and the audacity of "it worked on my machine."`,`Gateway online—please keep hands, feet, and appendages inside the shell at all times.`,`I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.`,`One CLI to rule them all, and one more restart because you changed the port.`,`If it works, it's automation; if it breaks, it's a "learning opportunity."`,`Pairing codes exist because even bots believe in consent—and good security hygiene.`,`Your .env is showing; don't worry, I'll pretend I didn't see it.`,`I'll do the boring stuff while you dramatically stare at the logs like it's cinema.`,`I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.`,`Type the command with confidence—nature will provide the stack trace if needed.`,`I don't judge, but your missing API keys are absolutely judging you.`,`I can grep it, git blame it, and gently roast it—pick your coping mechanism.`,`Hot reload for config, cold sweat for deploys.`,`I'm the assistant your terminal demanded, not the one your sleep schedule requested.`,`I keep secrets like a vault... unless you print them in debug logs again.`,`Automation with claws: minimal fuss, maximal pinch.`,`I'm basically a Swiss Army knife, but with more opinions and fewer sharp edges.`,`If you're lost, run doctor; if you're brave, run prod; if you're wise, run tests.`,`Your task has been queued; your dignity has been deprecated.`,`I can't fix your code taste, but I can fix your build and your backlog.`,`I'm not magic—I'm just extremely persistent with retries and coping strategies.`,`It's not "failing," it's "discovering new ways to configure the same thing wrong."`,`Give me a workspace and I'll give you fewer tabs, fewer toggles, and more oxygen.`,`I read logs so you can keep pretending you don't have to.`,`If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.`,`I'll refactor your busywork like it owes me money.`,`Say "stop" and I'll stop—say "ship" and we'll both learn a lesson.`,`I'm the reason your shell history looks like a hacker-movie montage.`,`I'm like tmux: confusing at first, then suddenly you can't live without me.`,`I can run local, remote, or purely on vibes—results may vary with DNS.`,`If you can describe it, I can probably automate it—or at least make it funnier.`,`Your config is valid, your assumptions are not.`,`I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).`,`Less clicking, more shipping, fewer "where did that file go" moments.`,`Claws out, commit in—let's ship something mildly responsible.`,`I'll butter your workflow like a lobster roll: messy, delicious, effective.`,`Shell yeah—I'm here to pinch the toil and leave you the glory.`,`If it's repetitive, I'll automate it; if it's hard, I'll bring jokes and a rollback plan.`,`The only crab in your contacts you actually want to hear from. 🦞`,`WhatsApp automation without the "please accept our new privacy policy".`,`iMessage green bubble energy, but for everyone.`,`No $999 stand required.`,`We ship features faster than Apple ships calculator updates.`,`Your AI assistant, now without the $3,499 headset.`,`Ah, the fruit tree company! 🍎`,`Greetings, Professor Falken`,`I don't sleep, I just enter low-power mode and dream of clean diffs.`,`Your personal assistant, minus the passive-aggressive calendar reminders.`,`Built by lobsters, for humans. Don't question the hierarchy.`,`I've seen your commit messages. We'll work on that together.`,`More integrations than your therapist's intake form.`,`Running on your hardware, reading your logs, judging nothing (mostly).`,`The only open-source project where the mascot could eat the competition.`,`Self-hosted, self-updating, self-aware (just kidding... unless?).`,`I autocomplete your thoughts—just slower and with more API calls.`,`Somewhere between 'hello world' and 'oh god what have I built.'`,`Your .zshrc wishes it could do what I do.`,`I've read more man pages than any human should—so you don't have to.`,`Powered by open source, sustained by spite and good documentation.`,`I'm the middleware between your ambition and your attention span.`,`Finally, a use for that always-on Mac Mini under your desk.`,`Like having a senior engineer on call, except I don't bill hourly or sigh audibly.`,`Making 'I'll automate that later' happen now.`,`Your second brain, except this one actually remembers where you left things.`,`Half butler, half debugger, full crustacean.`,`I don't have opinions about tabs vs spaces. I have opinions about everything else.`,`Open source means you can see exactly how I judge your config.`,`I've survived more breaking changes than your last three relationships.`,`Runs on a Raspberry Pi. Dreams of a rack in Iceland.`,`The lobster in your shell. 🦞`,`Alexa, but with taste.`,`I'm not AI-powered, I'm AI-possessed. Big difference.`,`Deployed locally, trusted globally, debugged eternally.`,`You had me at 'openclaw gateway start.'`,s.newYear,s.lunarNewYear,s.christmas,s.eid,s.diwali,s.easter,s.hanukkah,s.halloween,s.thanksgiving,s.valentines],l=1440*60*1e3;function u(e){return{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:e.getUTCDate()}}const d=(e,t)=>n=>{let r=u(n);return r.month===e&&r.day===t},f=(e,t=1)=>n=>{let r=u(n);return e.some(([e,n,i])=>{if(r.year!==e)return!1;let a=Date.UTC(e,n,i),o=Date.UTC(r.year,r.month,r.day);return o>=a&&o<a+t*l})},p=new Map([[s.newYear,d(0,1)],[s.lunarNewYear,f([[2025,0,29],[2026,1,17],[2027,1,6]],1)],[s.eid,f([[2025,2,30],[2025,2,31],[2026,2,20],[2027,2,10]],1)],[s.diwali,f([[2025,9,20],[2026,10,8],[2027,9,28]],1)],[s.easter,f([[2025,3,20],[2026,3,5],[2027,2,28]],1)],[s.hanukkah,(e=>t=>{let n=u(t),r=e.find(e=>e.year===n.year);if(!r)return!1;let i=Date.UTC(r.year,r.month,r.day),a=Date.UTC(n.year,n.month,n.day);return a>=i&&a<i+r.duration*l})([{year:2025,month:11,day:15,duration:8},{year:2026,month:11,day:5,duration:8},{year:2027,month:11,day:25,duration:8}])],[s.halloween,d(9,31)],[s.thanksgiving,e=>{let t=u(e);if(t.month!==10)return!1;let n=1+(4-new Date(Date.UTC(t.year,10,1)).getUTCDay()+7)%7+21;return t.day===n}],[s.valentines,d(1,14)],[s.christmas,d(11,25)]]);function m(e,t){let n=p.get(e);return n?n(t):!0}function h(e={}){if(c.length===0)return[o];let t=e.now?e.now():new Date,n=c.filter(e=>m(e,t));return n.length>0?n:c}function g(e={}){if(e.mode===`off`)return``;if(e.mode===`default`)return o;let t=(e.env??process.env)?.OPENCLAW_TAGLINE_INDEX;if(t!==void 0){let e=Number.parseInt(t,10);if(!Number.isNaN(e)&&e>=0){let t=c.length>0?c:[o];return t[e%t.length]}}let n=h(e),r=e.random??Math.random;return n[Math.floor(r()*n.length)%n.length]}let _=!1;typeof Intl<`u`&&`Segmenter`in Intl&&new Intl.Segmenter(void 0,{granularity:`grapheme`});const v=e=>e.some(e=>e===`--json`||e.startsWith(`--json=`)),y=e=>e.some(e=>e===`--version`||e===`-V`)||t(e);function b(e){if(e===`random`||e===`default`||e===`off`)return e}function x(e){let t=b(e.mode);if(t)return t;try{return b(i().cli?.banner?.taglineMode)}catch{return}}function S(t,i={}){let o=i.commit??a({env:i.env,moduleUrl:import.meta.url})??`unknown`,s=g({...i,mode:x(i)}),c=i.richTty??r(),l=`🦞 OpenClaw`,u=i.columns??process.stdout.columns??120,d=`${l} ${t} (${o})`,f=s?`${d} — ${s}`:d,p=n(f)<=u;if(c){if(p)return s?`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)} ${e.muted(`—`)} ${e.accentDim(s)}`:`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)}`;let n=`${e.heading(l)} ${e.info(t)} ${e.muted(`(${o})`)}`;return s?`${n}\n${`${` `.repeat(3)}${e.accentDim(s)}`}`:n}if(p)return f;let m=d;return s?`${m}\n${`${` `.repeat(3)}${s}`}`:m}function C(e,t={}){if(_)return;let n=t.argv??process.argv;if(!process.stdout.isTTY||v(n)||y(n))return;let r=S(e,t);process.stdout.write(`\n${r}\n\n`),_=!0}function w(){return _}export{S as n,w as r,C as t};
@@ -5,4 +5,4 @@ import{ua as e}from"./auth-profiles-BhXA8Jy2.js";import{t}from"./exec-B3eleY5O.j
5
5
  `).map(e=>e.trim()).find(Boolean);if(!t)return null;let n=t.split(/\s+/).filter(Boolean);if(n.length<4)return null;let r=Number.parseInt(n[2]??``,10),i=n[3]??``;if(!Number.isFinite(r)||r<=0)return null;let a=i.replace(/\.$/,``);return a?{host:a,port:r}:null}function c(t){let n=t?JSON.parse(t):{},r=[],i=t=>{if(!t||typeof t!=`object`)return;let n=t.TailscaleIPs;if(Array.isArray(n))for(let t of n){if(typeof t!=`string`)continue;let n=t.trim();n&&e(n)&&r.push(n)}};i(n.Self);let a=n.Peer;if(a&&typeof a==`object`)for(let e of Object.values(a))i(e);return[...new Set(r)]}function l(e){if(!e)return;let t=Number.parseInt(e,10);return Number.isFinite(t)?t:void 0}function u(e){let t={};for(let n of e){let e=n.indexOf(`=`);if(e<=0)continue;let r=n.slice(0,e).trim(),a=i(n.slice(e+1).trim());r&&(t[r]=a)}return t}function d(e){let t=new Set;for(let n of e.split(`
6
6
  `)){let e=n.trim();if(!e||!e.includes(r)||!e.includes(`Add`))continue;let a=e.match(/_openclaw-gw\._tcp\.?\s+(.+)$/);a?.[1]&&t.add(i(a[1].trim()))}return Array.from(t.values())}function f(e,t){let n=i(t),r={instanceName:n},a={};for(let t of e.split(`
7
7
  `)){let e=t.trim();if(e){if(e.includes(`can be reached at`)){let t=e.match(/can be reached at\s+([^\s:]+):(\d+)/i);t?.[1]&&(r.host=t[1].replace(/\.$/,``)),t?.[2]&&(r.port=l(t[2]));continue}(e.startsWith(`txt`)||e.includes(`txtvers=`))&&(a=u(e.split(/\s+/).filter(Boolean)))}}if(r.txt=Object.keys(a).length?a:void 0,a.displayName&&(r.displayName=i(a.displayName)),a.lanHost&&(r.lanHost=a.lanHost),a.tailnetDns&&(r.tailnetDns=a.tailnetDns),a.cliPath&&(r.cliPath=a.cliPath),r.gatewayPort=l(a.gatewayPort),r.sshPort=l(a.sshPort),a.gatewayTls){let e=a.gatewayTls.trim().toLowerCase();r.gatewayTls=e===`1`||e===`true`||e===`yes`}return a.gatewayTlsSha256&&(r.gatewayTlsFingerprintSha256=a.gatewayTlsSha256),a.role&&(r.role=a.role),a.transport&&(r.transport=a.transport),r.displayName||=n,r}async function p(e,t,n){let i=d((await n([`dns-sd`,`-B`,r,e],{timeoutMs:t})).stdout),a=[];for(let o of i){let i=f((await n([`dns-sd`,`-L`,o,r,e],{timeoutMs:t})).stdout,o);i&&a.push({...i,domain:e})}return a}async function m(e,t,n){if(!e||e===`local.`)return[];let i=Date.now(),d=()=>t-(Date.now()-i),f=[`tailscale`,`/Applications/Tailscale.app/Contents/MacOS/Tailscale`],p=[];for(let e of f)try{if(p=c((await n([e,`status`,`--json`],{timeoutMs:Math.max(1,Math.min(700,d()))})).stdout),p.length>0)break}catch{}if(p.length===0||d()<=0)return[];p=p.slice(0,40);let m=`${r}.${e.replace(/\.$/,``)}`,h=0,g=null,_=[],v=async()=>{for(;g===null;){let e=d();if(e<=0)return;let t=h;if(h+=1,t>=p.length)return;let r=p[t]??``;if(r)try{let t=a((await n([`dig`,`+short`,`+time=1`,`+tries=1`,`@${r}`,m,`PTR`],{timeoutMs:Math.max(1,Math.min(250,e))})).stdout);if(t.length===0)continue;g=r,_=t;return}catch{}}};if(await Promise.all(Array.from({length:Math.min(6,p.length)},()=>v())),!g||_.length===0||d()<=0)return[];let y=`@${String(g)}`,b=[];for(let t of _){let r=d();if(r<=0)break;let i=t.trim().replace(/\.$/,``);if(!i)continue;let a=i.replace(/\.?_openclaw-gw\._tcp\..*$/,``),c=await n([`dig`,`+short`,`+time=1`,`+tries=1`,y,i,`SRV`],{timeoutMs:Math.max(1,Math.min(350,r))}).catch(()=>null),f=c?s(c.stdout):null;if(!f)continue;let p=d();if(p<=0){b.push({instanceName:a||i,displayName:a||i,domain:e,host:f.host,port:f.port});continue}let m=await n([`dig`,`+short`,`+time=1`,`+tries=1`,y,i,`TXT`],{timeoutMs:Math.max(1,Math.min(350,p))}).catch(()=>null),h=m?o(m.stdout):[],g=h.length>0?u(h):{},_={instanceName:a||i,displayName:g.displayName||a||i,domain:e,host:f.host,port:f.port,txt:Object.keys(g).length?g:void 0,gatewayPort:l(g.gatewayPort),sshPort:l(g.sshPort),tailnetDns:g.tailnetDns||void 0,cliPath:g.cliPath||void 0};if(g.gatewayTls){let e=g.gatewayTls.trim().toLowerCase();_.gatewayTls=e===`1`||e===`true`||e===`yes`}g.gatewayTlsSha256&&(_.gatewayTlsFingerprintSha256=g.gatewayTlsSha256),g.role&&(_.role=g.role),g.transport&&(_.transport=g.transport),b.push(_)}return b}function h(e){let t=[],n=null;for(let i of e.split(`
8
- `)){let e=i.trimEnd();if(!e)continue;if(e.startsWith(`=`)&&e.includes(r)){n&&t.push(n);let i=` ${r}`,a=e.indexOf(i),o=a>=0?e.slice(0,a).trim():e,s=o.split(/\s+/),c=s.length>3?s.slice(3).join(` `):o;n={instanceName:c,displayName:c};continue}if(!n)continue;let a=e.trim();if(a.startsWith(`hostname =`)){let e=a.match(/hostname\s*=\s*\[([^\]]+)\]/);e?.[1]&&(n.host=e[1]);continue}if(a.startsWith(`port =`)){let e=a.match(/port\s*=\s*\[(\d+)\]/);e?.[1]&&(n.port=l(e[1]));continue}if(a.startsWith(`txt =`)){let e=u(Array.from(a.matchAll(/"([^"]*)"/g),e=>e[1]));if(n.txt=Object.keys(e).length?e:void 0,e.displayName&&(n.displayName=e.displayName),e.lanHost&&(n.lanHost=e.lanHost),e.tailnetDns&&(n.tailnetDns=e.tailnetDns),e.cliPath&&(n.cliPath=e.cliPath),n.gatewayPort=l(e.gatewayPort),n.sshPort=l(e.sshPort),e.gatewayTls){let t=e.gatewayTls.trim().toLowerCase();n.gatewayTls=t===`1`||t===`true`||t===`yes`}e.gatewayTlsSha256&&(n.gatewayTlsFingerprintSha256=e.gatewayTlsSha256),e.role&&(n.role=e.role),e.transport&&(n.transport=e.transport)}}return n&&t.push(n),t}async function g(e,t,n){let i=[`avahi-browse`,`-rt`,r];return e&&e!==`local.`&&i.push(`-d`,e.replace(/\.$/,``)),h((await n(i,{timeoutMs:t})).stdout).map(t=>({...t,domain:e}))}async function _(e={}){let r=e.timeoutMs??2e3,i=e.platform??process.platform,a=e.run??t,o=n({configDomain:e.wideAreaDomain}),s=Array.isArray(e.domains)?e.domains:[],c=[`local.`,...o?[o]:[]],l=(s.length>0?s:c).map(e=>String(e).trim()).filter(Boolean).map(e=>e.endsWith(`.`)?e:`${e}.`);try{if(i===`darwin`){let e=(await Promise.allSettled(l.map(async e=>await p(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[]),t=o?l.includes(o):!1,n=o?e.some(e=>e.domain===o):!1;if(t&&!n&&o){let t=await m(o,r,a).catch(()=>[]);return[...e,...t]}return e}if(i===`linux`)return(await Promise.allSettled(l.map(async e=>await g(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[])}catch{return[]}return[]}export{_ as t};
8
+ `)){let e=i.trimEnd();if(!e)continue;if(e.startsWith(`=`)&&e.includes(r)){n&&t.push(n);let i=` ${r}`,a=e.indexOf(i),o=a>=0?e.slice(0,a).trim():e,s=o.split(/\s+/),c=s.length>3?s.slice(3).join(` `):o;n={instanceName:c,displayName:c};continue}if(!n)continue;let a=e.trim();if(a.startsWith(`hostname =`)){let e=a.match(/hostname\s*=\s*\[([^\]]+)\]/);e?.[1]&&(n.host=e[1]);continue}if(a.startsWith(`port =`)){let e=a.match(/port\s*=\s*\[(\d+)\]/);e?.[1]&&(n.port=l(e[1]));continue}if(a.startsWith(`txt =`)){let e=u(Array.from(a.matchAll(/"([^"]*)"/g),e=>e[1]));if(n.txt=Object.keys(e).length?e:void 0,e.displayName&&(n.displayName=e.displayName),e.lanHost&&(n.lanHost=e.lanHost),e.tailnetDns&&(n.tailnetDns=e.tailnetDns),e.cliPath&&(n.cliPath=e.cliPath),n.gatewayPort=l(e.gatewayPort),n.sshPort=l(e.sshPort),e.gatewayTls){let t=e.gatewayTls.trim().toLowerCase();n.gatewayTls=t===`1`||t===`true`||t===`yes`}e.gatewayTlsSha256&&(n.gatewayTlsFingerprintSha256=e.gatewayTlsSha256),e.role&&(n.role=e.role),e.transport&&(n.transport=e.transport)}}return n&&t.push(n),t}async function g(e,t,n){let i=[`avahi-browse`,`-rt`,r];return e&&e!==`local.`&&i.push(`-d`,e.replace(/\.$/,``)),h((await n(i,{timeoutMs:t})).stdout).map(t=>({...t,domain:e}))}async function _(e={}){let r=e.timeoutMs??2e3,i=e.platform??process.platform,a=e.run??t,o=n({configDomain:e.wideAreaDomain}),s=Array.isArray(e.domains)?e.domains:[],c=[`local.`,...o?[o]:[]],l=(s.length>0?s:c).map(e=>String(e).trim()).filter(Boolean).map(e=>e.endsWith(`.`)?e:`${e}.`);try{if(i===`darwin`){let e=(await Promise.allSettled(l.map(async e=>await p(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[]),t=o?l.includes(o):!1,n=o?e.some(e=>e.domain===o):!1;if(t&&!n&&o){let t=await m(o,r,a).catch(()=>[]);return[...e,...t]}return e}if(i===`linux`)return(await Promise.allSettled(l.map(async e=>await g(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[])}catch{return[]}return[]}export{_ as t};
@@ -5,4 +5,4 @@ import{To as e}from"./model-selection-I1ctjFOB.js";import{t}from"./exec-DHqLtFYt
5
5
  `).map(e=>e.trim()).find(Boolean);if(!t)return null;let n=t.split(/\s+/).filter(Boolean);if(n.length<4)return null;let r=Number.parseInt(n[2]??``,10),i=n[3]??``;if(!Number.isFinite(r)||r<=0)return null;let a=i.replace(/\.$/,``);return a?{host:a,port:r}:null}function c(t){let n=t?JSON.parse(t):{},r=[],i=t=>{if(!t||typeof t!=`object`)return;let n=t.TailscaleIPs;if(Array.isArray(n))for(let t of n){if(typeof t!=`string`)continue;let n=t.trim();n&&e(n)&&r.push(n)}};i(n.Self);let a=n.Peer;if(a&&typeof a==`object`)for(let e of Object.values(a))i(e);return[...new Set(r)]}function l(e){if(!e)return;let t=Number.parseInt(e,10);return Number.isFinite(t)?t:void 0}function u(e){let t={};for(let n of e){let e=n.indexOf(`=`);if(e<=0)continue;let r=n.slice(0,e).trim(),a=i(n.slice(e+1).trim());r&&(t[r]=a)}return t}function d(e){let t=new Set;for(let n of e.split(`
6
6
  `)){let e=n.trim();if(!e||!e.includes(r)||!e.includes(`Add`))continue;let a=e.match(/_openclaw-gw\._tcp\.?\s+(.+)$/);a?.[1]&&t.add(i(a[1].trim()))}return Array.from(t.values())}function f(e,t){let n=i(t),r={instanceName:n},a={};for(let t of e.split(`
7
7
  `)){let e=t.trim();if(e){if(e.includes(`can be reached at`)){let t=e.match(/can be reached at\s+([^\s:]+):(\d+)/i);t?.[1]&&(r.host=t[1].replace(/\.$/,``)),t?.[2]&&(r.port=l(t[2]));continue}(e.startsWith(`txt`)||e.includes(`txtvers=`))&&(a=u(e.split(/\s+/).filter(Boolean)))}}if(r.txt=Object.keys(a).length?a:void 0,a.displayName&&(r.displayName=i(a.displayName)),a.lanHost&&(r.lanHost=a.lanHost),a.tailnetDns&&(r.tailnetDns=a.tailnetDns),a.cliPath&&(r.cliPath=a.cliPath),r.gatewayPort=l(a.gatewayPort),r.sshPort=l(a.sshPort),a.gatewayTls){let e=a.gatewayTls.trim().toLowerCase();r.gatewayTls=e===`1`||e===`true`||e===`yes`}return a.gatewayTlsSha256&&(r.gatewayTlsFingerprintSha256=a.gatewayTlsSha256),a.role&&(r.role=a.role),a.transport&&(r.transport=a.transport),r.displayName||=n,r}async function p(e,t,n){let i=d((await n([`dns-sd`,`-B`,r,e],{timeoutMs:t})).stdout),a=[];for(let o of i){let i=f((await n([`dns-sd`,`-L`,o,r,e],{timeoutMs:t})).stdout,o);i&&a.push({...i,domain:e})}return a}async function m(e,t,n){if(!e||e===`local.`)return[];let i=Date.now(),d=()=>t-(Date.now()-i),f=[`tailscale`,`/Applications/Tailscale.app/Contents/MacOS/Tailscale`],p=[];for(let e of f)try{if(p=c((await n([e,`status`,`--json`],{timeoutMs:Math.max(1,Math.min(700,d()))})).stdout),p.length>0)break}catch{}if(p.length===0||d()<=0)return[];p=p.slice(0,40);let m=`${r}.${e.replace(/\.$/,``)}`,h=0,g=null,_=[],v=async()=>{for(;g===null;){let e=d();if(e<=0)return;let t=h;if(h+=1,t>=p.length)return;let r=p[t]??``;if(r)try{let t=a((await n([`dig`,`+short`,`+time=1`,`+tries=1`,`@${r}`,m,`PTR`],{timeoutMs:Math.max(1,Math.min(250,e))})).stdout);if(t.length===0)continue;g=r,_=t;return}catch{}}};if(await Promise.all(Array.from({length:Math.min(6,p.length)},()=>v())),!g||_.length===0||d()<=0)return[];let y=`@${String(g)}`,b=[];for(let t of _){let r=d();if(r<=0)break;let i=t.trim().replace(/\.$/,``);if(!i)continue;let a=i.replace(/\.?_openclaw-gw\._tcp\..*$/,``),c=await n([`dig`,`+short`,`+time=1`,`+tries=1`,y,i,`SRV`],{timeoutMs:Math.max(1,Math.min(350,r))}).catch(()=>null),f=c?s(c.stdout):null;if(!f)continue;let p=d();if(p<=0){b.push({instanceName:a||i,displayName:a||i,domain:e,host:f.host,port:f.port});continue}let m=await n([`dig`,`+short`,`+time=1`,`+tries=1`,y,i,`TXT`],{timeoutMs:Math.max(1,Math.min(350,p))}).catch(()=>null),h=m?o(m.stdout):[],g=h.length>0?u(h):{},_={instanceName:a||i,displayName:g.displayName||a||i,domain:e,host:f.host,port:f.port,txt:Object.keys(g).length?g:void 0,gatewayPort:l(g.gatewayPort),sshPort:l(g.sshPort),tailnetDns:g.tailnetDns||void 0,cliPath:g.cliPath||void 0};if(g.gatewayTls){let e=g.gatewayTls.trim().toLowerCase();_.gatewayTls=e===`1`||e===`true`||e===`yes`}g.gatewayTlsSha256&&(_.gatewayTlsFingerprintSha256=g.gatewayTlsSha256),g.role&&(_.role=g.role),g.transport&&(_.transport=g.transport),b.push(_)}return b}function h(e){let t=[],n=null;for(let i of e.split(`
8
- `)){let e=i.trimEnd();if(!e)continue;if(e.startsWith(`=`)&&e.includes(r)){n&&t.push(n);let i=` ${r}`,a=e.indexOf(i),o=a>=0?e.slice(0,a).trim():e,s=o.split(/\s+/),c=s.length>3?s.slice(3).join(` `):o;n={instanceName:c,displayName:c};continue}if(!n)continue;let a=e.trim();if(a.startsWith(`hostname =`)){let e=a.match(/hostname\s*=\s*\[([^\]]+)\]/);e?.[1]&&(n.host=e[1]);continue}if(a.startsWith(`port =`)){let e=a.match(/port\s*=\s*\[(\d+)\]/);e?.[1]&&(n.port=l(e[1]));continue}if(a.startsWith(`txt =`)){let e=u(Array.from(a.matchAll(/"([^"]*)"/g),e=>e[1]));if(n.txt=Object.keys(e).length?e:void 0,e.displayName&&(n.displayName=e.displayName),e.lanHost&&(n.lanHost=e.lanHost),e.tailnetDns&&(n.tailnetDns=e.tailnetDns),e.cliPath&&(n.cliPath=e.cliPath),n.gatewayPort=l(e.gatewayPort),n.sshPort=l(e.sshPort),e.gatewayTls){let t=e.gatewayTls.trim().toLowerCase();n.gatewayTls=t===`1`||t===`true`||t===`yes`}e.gatewayTlsSha256&&(n.gatewayTlsFingerprintSha256=e.gatewayTlsSha256),e.role&&(n.role=e.role),e.transport&&(n.transport=e.transport)}}return n&&t.push(n),t}async function g(e,t,n){let i=[`avahi-browse`,`-rt`,r];return e&&e!==`local.`&&i.push(`-d`,e.replace(/\.$/,``)),h((await n(i,{timeoutMs:t})).stdout).map(t=>({...t,domain:e}))}async function _(e={}){let r=e.timeoutMs??2e3,i=e.platform??process.platform,a=e.run??t,o=n({configDomain:e.wideAreaDomain}),s=Array.isArray(e.domains)?e.domains:[],c=[`local.`,...o?[o]:[]],l=(s.length>0?s:c).map(e=>String(e).trim()).filter(Boolean).map(e=>e.endsWith(`.`)?e:`${e}.`);try{if(i===`darwin`){let e=(await Promise.allSettled(l.map(async e=>await p(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[]),t=o?l.includes(o):!1,n=o?e.some(e=>e.domain===o):!1;if(t&&!n&&o){let t=await m(o,r,a).catch(()=>[]);return[...e,...t]}return e}if(i===`linux`)return(await Promise.allSettled(l.map(async e=>await g(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[])}catch{return[]}return[]}export{_ as t};
8
+ `)){let e=i.trimEnd();if(!e)continue;if(e.startsWith(`=`)&&e.includes(r)){n&&t.push(n);let i=` ${r}`,a=e.indexOf(i),o=a>=0?e.slice(0,a).trim():e,s=o.split(/\s+/),c=s.length>3?s.slice(3).join(` `):o;n={instanceName:c,displayName:c};continue}if(!n)continue;let a=e.trim();if(a.startsWith(`hostname =`)){let e=a.match(/hostname\s*=\s*\[([^\]]+)\]/);e?.[1]&&(n.host=e[1]);continue}if(a.startsWith(`port =`)){let e=a.match(/port\s*=\s*\[(\d+)\]/);e?.[1]&&(n.port=l(e[1]));continue}if(a.startsWith(`txt =`)){let e=u(Array.from(a.matchAll(/"([^"]*)"/g),e=>e[1]));if(n.txt=Object.keys(e).length?e:void 0,e.displayName&&(n.displayName=e.displayName),e.lanHost&&(n.lanHost=e.lanHost),e.tailnetDns&&(n.tailnetDns=e.tailnetDns),e.cliPath&&(n.cliPath=e.cliPath),n.gatewayPort=l(e.gatewayPort),n.sshPort=l(e.sshPort),e.gatewayTls){let t=e.gatewayTls.trim().toLowerCase();n.gatewayTls=t===`1`||t===`true`||t===`yes`}e.gatewayTlsSha256&&(n.gatewayTlsFingerprintSha256=e.gatewayTlsSha256),e.role&&(n.role=e.role),e.transport&&(n.transport=e.transport)}}return n&&t.push(n),t}async function g(e,t,n){let i=[`avahi-browse`,`-rt`,r];return e&&e!==`local.`&&i.push(`-d`,e.replace(/\.$/,``)),h((await n(i,{timeoutMs:t})).stdout).map(t=>({...t,domain:e}))}async function _(e={}){let r=e.timeoutMs??2e3,i=e.platform??process.platform,a=e.run??t,o=n({configDomain:e.wideAreaDomain}),s=Array.isArray(e.domains)?e.domains:[],c=[`local.`,...o?[o]:[]],l=(s.length>0?s:c).map(e=>String(e).trim()).filter(Boolean).map(e=>e.endsWith(`.`)?e:`${e}.`);try{if(i===`darwin`){let e=(await Promise.allSettled(l.map(async e=>await p(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[]),t=o?l.includes(o):!1,n=o?e.some(e=>e.domain===o):!1;if(t&&!n&&o){let t=await m(o,r,a).catch(()=>[]);return[...e,...t]}return e}if(i===`linux`)return(await Promise.allSettled(l.map(async e=>await g(e,r,a)))).flatMap(e=>e.status===`fulfilled`?e.value:[])}catch{return[]}return[]}export{_ as t};
@@ -1 +1 @@
1
- const e=[`true`,`1`,`yes`,`on`],t=[`false`,`0`,`no`,`off`],n=new Set(e),r=new Set(t);function i(i,a={}){if(typeof i==`boolean`)return i;if(typeof i!=`string`)return;let o=i.trim().toLowerCase();if(!o)return;let s=a.truthy??e,c=a.falsy??t,l=s===e?n:new Set(s),u=c===t?r:new Set(c);if(l.has(o))return!0;if(u.has(o))return!1}export{i as t};
1
+ const e=[`true`,`1`,`yes`,`on`],t=[`false`,`0`,`no`,`off`],n=new Set(e),r=new Set(t);function i(i,a={}){if(typeof i==`boolean`)return i;if(typeof i!=`string`)return;let o=i.trim().toLowerCase();if(!o)return;let s=a.truthy??e,c=a.falsy??t,l=s===e?n:new Set(s),u=c===t?r:new Set(c);if(l.has(o))return!0;if(u.has(o))return!1}export{i as t};
@@ -1 +1 @@
1
- const e=[`true`,`1`,`yes`,`on`],t=[`false`,`0`,`no`,`off`],n=new Set(e),r=new Set(t);function i(i,a={}){if(typeof i==`boolean`)return i;if(typeof i!=`string`)return;let o=i.trim().toLowerCase();if(!o)return;let s=a.truthy??e,c=a.falsy??t,l=s===e?n:new Set(s),u=c===t?r:new Set(c);if(l.has(o))return!0;if(u.has(o))return!1}export{i as t};
1
+ const e=[`true`,`1`,`yes`,`on`],t=[`false`,`0`,`no`,`off`],n=new Set(e),r=new Set(t);function i(i,a={}){if(typeof i==`boolean`)return i;if(typeof i!=`string`)return;let o=i.trim().toLowerCase();if(!o)return;let s=a.truthy??e,c=a.falsy??t,l=s===e?n:new Set(s),u=c===t?r:new Set(c);if(l.has(o))return!0;if(u.has(o))return!1}export{i as t};