@lawpath-tech/openclaw 2026.2.21-10 → 2026.2.21-12

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 (191) hide show
  1. package/dist/{agents-XFUpnhyw.js → agents-Acsw6oEr.js} +4 -4
  2. package/dist/{agents.config-DjELUleJ.js → agents.config-BAILtL0e.js} +1 -1
  3. package/dist/{agents.config-CTbtf-Et.js → agents.config-DA4Kt9C5.js} +1 -1
  4. package/dist/{audio-preflight-Bqg8wRF0.js → audio-preflight-BnwMjf3g.js} +3 -3
  5. package/dist/{audio-preflight-0nE4BIvV.js → audio-preflight-C56sndLt.js} +4 -4
  6. package/dist/{audio-preflight-DUN77LMG.js → audio-preflight-DTxmK1ti.js} +3 -3
  7. package/dist/{audio-preflight-DESlWRvS.js → audio-preflight-UmMU18Rf.js} +3 -3
  8. package/dist/{auth-choice-C-VbNMFC.js → auth-choice-B0ExtimG.js} +1 -1
  9. package/dist/{auth-choice-Ce5ZhgZB.js → auth-choice-Cc9nPCSG.js} +1 -1
  10. package/dist/{banner-BO0EC6gi.js → banner-l8hdGVT6.js} +1 -1
  11. package/dist/build-info.json +3 -3
  12. package/dist/bundled/boot-md/handler.js +5 -5
  13. package/dist/bundled/session-memory/handler.js +5 -5
  14. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  15. package/dist/{channel-options-Dnl_ON0t.js → channel-options-BOgY_qkz.js} +1 -1
  16. package/dist/{channel-options-CJ562Awb.js → channel-options-DU0lH77F.js} +1 -1
  17. package/dist/{channel-web-C6by66Ik.js → channel-web-Bn_o0ClJ.js} +2 -2
  18. package/dist/{channels-cli-DmemjJTj.js → channels-cli-B8iPHVyY.js} +8 -8
  19. package/dist/{channels-cli-CX3e33oJ.js → channels-cli-HyoLT0X_.js} +8 -8
  20. package/dist/{chrome-Cag1SQQf.js → chrome-EGHj-WC_.js} +7 -7
  21. package/dist/{cli-CZYqgXep.js → cli-BjW27QBR.js} +5 -5
  22. package/dist/{cli-C-oUtdv5.js → cli-CB8wKUFa.js} +5 -5
  23. package/dist/{command-registry-DPgcpkAs.js → command-registry-hszLgVfh.js} +9 -9
  24. package/dist/{completion-cli-BIW77wm1.js → completion-cli-BTOzPrOy.js} +2 -2
  25. package/dist/{completion-cli-B8nHppfQ.js → completion-cli-jFF5jQZF.js} +1 -1
  26. package/dist/{config-cli-DLSqMYRk.js → config-cli-CV3y1IAq.js} +1 -1
  27. package/dist/{config-cli-DF3Frhtb.js → config-cli-Cuv_T0Jj.js} +1 -1
  28. package/dist/{configure-DIlxSV4l.js → configure-80FWz9jT.js} +3 -3
  29. package/dist/{configure-ku8C0kaJ.js → configure-BHGABgNw.js} +3 -3
  30. package/dist/control-ui/assets/{index-Cx1_w3YP.js → index-BfDl8X4O.js} +2 -2
  31. package/dist/control-ui/assets/index-BfDl8X4O.js.map +1 -0
  32. package/dist/control-ui/index.html +1 -1
  33. package/dist/{deliver-D3HyJhTX.js → deliver-B1Ddgm7X.js} +11 -6
  34. package/dist/{deliver-CX6Se-jI.js → deliver-BLkQFTzD.js} +11 -6
  35. package/dist/{deliver-Ct_AlJg5.js → deliver-J2cVd3TS.js} +11 -6
  36. package/dist/{deliver-BAjdrEoI.js → deliver-meQdcFaA.js} +11 -6
  37. package/dist/{doctor-completion-Dqrz2Mxm.js → doctor-completion-BSCz_dGZ.js} +1 -1
  38. package/dist/{doctor-completion-BpvOQ6nZ.js → doctor-completion-DGHNIbJN.js} +1 -1
  39. package/dist/entry.js +1 -1
  40. package/dist/extensionAPI.js +6 -6
  41. package/dist/{gateway-cli-eWm9cU71.js → gateway-cli-DYYSJuSK.js} +13 -13
  42. package/dist/{gateway-cli-DbV5glYW.js → gateway-cli-gLp4lZSu.js} +13 -13
  43. package/dist/{health-DxhXaHDj.js → health-BfWYn33I.js} +2 -2
  44. package/dist/{health-TlGblGrz.js → health-DEibfTDK.js} +2 -2
  45. package/dist/{hooks-cli-DN_-ZC-d.js → hooks-cli-D-nL8J6w.js} +6 -6
  46. package/dist/{hooks-cli-CNBIyMVL.js → hooks-cli-wQnxbc8T.js} +6 -6
  47. package/dist/{image-D-DzmVjC.js → image-BZOs5dHY.js} +2 -2
  48. package/dist/{image-CvBYo9Bu.js → image-C8HOu4vb.js} +2 -2
  49. package/dist/{image-paXd6zl5.js → image-Cj9tfO74.js} +2 -2
  50. package/dist/{image-Cgalj9ct.js → image-DuT8yGCI.js} +2 -2
  51. package/dist/index.js +10 -10
  52. package/dist/llm-slug-generator.js +5 -5
  53. package/dist/{models-CSk9HAo_.js → models-DFRcZ415.js} +2 -2
  54. package/dist/{models-cli-Cw6yV7Hw.js → models-cli-CwEUrjU_.js} +7 -7
  55. package/dist/{models-cli-DDUpEy7b.js → models-cli-t1rYl_DG.js} +6 -6
  56. package/dist/{onboard-BHWdJtCd.js → onboard-8PGPC4o-.js} +2 -2
  57. package/dist/{onboard-B-sVSXzj.js → onboard-XsnXtjOy.js} +2 -2
  58. package/dist/{onboard-channels-BCAVs_mB.js → onboard-channels-Cb8T_ers.js} +1 -1
  59. package/dist/{onboard-channels-CWxLkkUp.js → onboard-channels-vQihczqp.js} +1 -1
  60. package/dist/{onboarding-BRNVJxT8.js → onboarding-C_807D1O.js} +3 -3
  61. package/dist/{onboarding-BoSfn2h0.js → onboarding-EwJ1WIut.js} +3 -3
  62. package/dist/{onboarding.finalize-Uy8WceA5.js → onboarding.finalize-Crpg17t7.js} +10 -10
  63. package/dist/{onboarding.finalize-D1hu4S6g.js → onboarding.finalize-DWFR8IbD.js} +11 -11
  64. package/dist/{pi-embedded-CZT36FAl.js → pi-embedded-Be34NhAY.js} +29 -12
  65. package/dist/{pi-embedded-1isHWl0U.js → pi-embedded-BywyyGi2.js} +34 -17
  66. package/dist/{pi-embedded-helpers-ISSMvBMe.js → pi-embedded-helpers-BVCPWN6Q.js} +40 -8
  67. package/dist/{pi-embedded-helpers-Cx3WmubG.js → pi-embedded-helpers-C4Annkh_.js} +40 -8
  68. package/dist/{pi-embedded-helpers-DOmGm3QX.js → pi-embedded-helpers-C_U_c_EU.js} +40 -8
  69. package/dist/{pi-embedded-helpers-DWuT7Pe9.js → pi-embedded-helpers-Dl_FdUMU.js} +44 -12
  70. package/dist/{plugin-registry-CGpIcEOM.js → plugin-registry-BrN1y1ig.js} +1 -1
  71. package/dist/{plugin-registry-qgZzbjWa.js → plugin-registry-CtLhKV8N.js} +1 -1
  72. package/dist/plugin-sdk/{accounts-DUBJHEgi.js → accounts-BcQo4OUu.js} +1 -1
  73. package/dist/plugin-sdk/{accounts-wSu5JyDM.js → accounts-DEsAwvaZ.js} +1 -1
  74. package/dist/plugin-sdk/{accounts-Ciwy7Yxd.js → accounts-fnLsjAOi.js} +3 -3
  75. package/dist/plugin-sdk/{active-listener-Bnau4oiu.js → active-listener-CeaKSm29.js} +1 -1
  76. package/dist/plugin-sdk/{agent-scope-j9eoKDzr.js → agent-scope-DnU66cJq.js} +2 -2
  77. package/dist/plugin-sdk/agents/pi-embedded-helpers/errors.d.ts +1 -0
  78. package/dist/plugin-sdk/{api-key-rotation-BKOzXMVg.js → api-key-rotation-DRhVpAS4.js} +1 -1
  79. package/dist/plugin-sdk/{audio-preflight-BWBtA5BS.js → audio-preflight-zFFuY6Bd.js} +24 -24
  80. package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +1 -0
  81. package/dist/plugin-sdk/{bindings-BxwR115d.js → bindings-HAeLX6mi.js} +2 -2
  82. package/dist/plugin-sdk/{channel-activity-CCnr-9bS.js → channel-activity-WgE8Z4Bb.js} +1 -1
  83. package/dist/plugin-sdk/{channel-web-C6_SUXeh.js → channel-web-DfA1sgI9.js} +22 -22
  84. package/dist/plugin-sdk/{chrome-CAPUVzg9.js → chrome-NvVwZ3Xn.js} +3 -3
  85. package/dist/plugin-sdk/{chunk-DyzO7IVo.js → chunk-CQk9vawA.js} +1 -1
  86. package/dist/plugin-sdk/{command-format-DcBXOX9Z.js → command-format-DHXa0Clc.js} +1 -1
  87. package/dist/plugin-sdk/{commands-registry-C-WjNyFR.js → commands-registry-C0vBsgUy.js} +4 -4
  88. package/dist/plugin-sdk/{config-DxWaFEai.js → config-C1a-yGCa.js} +9 -9
  89. package/dist/plugin-sdk/{deliver-C9FGk-m8.js → deliver-D4QMj1KQ.js} +20 -15
  90. package/dist/plugin-sdk/{diagnostic-DKyVS3IK.js → diagnostic-Up1aMyxZ.js} +1 -1
  91. package/dist/plugin-sdk/{image-DiGppfRt.js → image-Bu6pmW6i.js} +5 -5
  92. package/dist/plugin-sdk/{image-ops-Bjog8bLM.js → image-ops-6S8Fa1d6.js} +1 -1
  93. package/dist/plugin-sdk/index.js +53 -53
  94. package/dist/plugin-sdk/{ir-98uc6iQ2.js → ir-yosTlCQ0.js} +4 -4
  95. package/dist/plugin-sdk/{local-roots-9jdLho_V.js → local-roots-CW6TWE2a.js} +3 -3
  96. package/dist/plugin-sdk/{login-DTf65Ckq.js → login-CkOX36_Y.js} +7 -7
  97. package/dist/plugin-sdk/{login-qr-CRlrA1Km.js → login-qr-DyxTgmGK.js} +9 -9
  98. package/dist/plugin-sdk/{manager-B44bHk5P.js → manager-CtapJqej.js} +8 -8
  99. package/dist/plugin-sdk/{manifest-registry-sgHvjA6E.js → manifest-registry-DvEm2HHf.js} +1 -1
  100. package/dist/plugin-sdk/{markdown-tables-DV9FqwR1.js → markdown-tables-OYHjLFmr.js} +1 -1
  101. package/dist/plugin-sdk/{message-channel-DmB4bGFh.js → message-channel-DY9wVB2A.js} +1 -1
  102. package/dist/plugin-sdk/{model-selection-BALQkWtM.js → model-selection-TMsqRl-p.js} +4 -4
  103. package/dist/plugin-sdk/{outbound-CjucU9tz.js → outbound-Cs6LZhj-.js} +7 -7
  104. package/dist/plugin-sdk/{outbound-attachment-BGKevRhJ.js → outbound-attachment-C1DtqQQb.js} +2 -2
  105. package/dist/plugin-sdk/{pi-auth-json-CYvT0sDr.js → pi-auth-json-Dpj7O31p.js} +5 -5
  106. package/dist/plugin-sdk/{pi-embedded-helpers-BMLQ8noc.js → pi-embedded-helpers-DBCtPcLq.js} +57 -25
  107. package/dist/plugin-sdk/{plugins-DwNa_Bjz.js → plugins-BizZYn_y.js} +4 -4
  108. package/dist/plugin-sdk/{pw-ai-mUE_oZph.js → pw-ai-CtYVo9Ju.js} +8 -8
  109. package/dist/plugin-sdk/{qmd-manager-CxvLwD3u.js → qmd-manager-qSSWvVwi.js} +4 -4
  110. package/dist/plugin-sdk/{registry-O1yza0Vh.js → registry-DL-33c9X.js} +2 -2
  111. package/dist/plugin-sdk/{replies-BLJ6SuWd.js → replies-YDjHVGij.js} +3 -3
  112. package/dist/plugin-sdk/{reply-Fe-yY6qo.js → reply-Dl9JHnGW.js} +96 -79
  113. package/dist/plugin-sdk/{reply-prefix-Ohtg483v.js → reply-prefix-DNmkrWtV.js} +1 -1
  114. package/dist/plugin-sdk/{resolve-outbound-target-vib4nnNx.js → resolve-outbound-target-DCb1ht31.js} +2 -2
  115. package/dist/plugin-sdk/{resolve-route-DM-CdB9Z.js → resolve-route-BDLDhEh_.js} +3 -3
  116. package/dist/plugin-sdk/{retry-JFNwfUew.js → retry-5P3d0rYw.js} +1 -1
  117. package/dist/plugin-sdk/{runner-CCzW7WWc.js → runner-DvYaPG7_.js} +9 -9
  118. package/dist/plugin-sdk/{send-C-9MUMZ2.js → send-3DmbiJfM.js} +6 -6
  119. package/dist/plugin-sdk/{send-D4OqVuu3.js → send-BsKrW0Xh.js} +6 -6
  120. package/dist/plugin-sdk/{send-DQL4fKTV.js → send-CNMXFSjB.js} +10 -10
  121. package/dist/plugin-sdk/{send-CAhPO5Zx.js → send-DU1Pnsmd.js} +7 -7
  122. package/dist/plugin-sdk/{send-BzXVnK8V.js → send-DZQYUVIY.js} +10 -10
  123. package/dist/plugin-sdk/{session-B-KGD6AG.js → session-D38ojZ3_.js} +4 -4
  124. package/dist/plugin-sdk/{skill-commands-DzurlBtL.js → skill-commands-D7degVS7.js} +5 -5
  125. package/dist/plugin-sdk/{skills-aG_v8SgP.js → skills-DBG2n4rQ.js} +7 -7
  126. package/dist/plugin-sdk/slack/monitor/context.d.ts +1 -0
  127. package/dist/plugin-sdk/{sqlite-DUu0dwic.js → sqlite-ulpcowfN.js} +1 -1
  128. package/dist/plugin-sdk/{store-gutZwMLb.js → store-CMGBlFGX.js} +2 -2
  129. package/dist/plugin-sdk/{subsystem-C4Rh0kdL.js → subsystem-C9WnrKN8.js} +1 -1
  130. package/dist/plugin-sdk/{tables-DhuVe5ji.js → tables-DzujD35V.js} +1 -1
  131. package/dist/plugin-sdk/{target-errors-2VrFN2Zl.js → target-errors-KOPdGMxQ.js} +2 -2
  132. package/dist/plugin-sdk/{thinking-DK3F1Tth.js → thinking-BiNjzudU.js} +5 -5
  133. package/dist/plugin-sdk/{tokens-K9ITCatc.js → tokens-2475WU2Z.js} +1 -1
  134. package/dist/plugin-sdk/{tool-images-Bu_rB65-.js → tool-images-BlYojiWx.js} +2 -2
  135. package/dist/plugin-sdk/{tool-loop-detection-BBRtoox8.js → tool-loop-detection-D0ADW0h2.js} +2 -2
  136. package/dist/plugin-sdk/web-BFEz8bk-.js +65 -0
  137. package/dist/plugin-sdk/{whatsapp-actions-DfsMoZFo.js → whatsapp-actions-Bffbt65T.js} +21 -21
  138. package/dist/{plugins-cli-DjCM2809.js → plugins-cli-ByB9fyeR.js} +6 -6
  139. package/dist/{plugins-cli-CTlSXbxE.js → plugins-cli-CP_m4f99.js} +6 -6
  140. package/dist/{program-lAdk-rjf.js → program-DlspJVqc.js} +11 -11
  141. package/dist/{program-context-DvlZb8HS.js → program-context-CpcNVMdA.js} +18 -18
  142. package/dist/{prompt-select-styled-Ct2adJGY.js → prompt-select-styled-CWRcbfIK.js} +4 -4
  143. package/dist/{prompt-select-styled-BR9UJTaa.js → prompt-select-styled-DHXAx5uX.js} +4 -4
  144. package/dist/{provider-auth-helpers-B7pkCdJK.js → provider-auth-helpers-AORB3hk9.js} +1 -1
  145. package/dist/{provider-auth-helpers-B22yzT-e.js → provider-auth-helpers-TZ3D-fXq.js} +1 -1
  146. package/dist/{push-apns-CA7elLw_.js → push-apns-BTcu7pip.js} +1 -1
  147. package/dist/{push-apns-BLrPdufQ.js → push-apns-CSSSwhDY.js} +1 -1
  148. package/dist/{pw-ai-Bib1qJp-.js → pw-ai-Cs2YQmkQ.js} +1 -1
  149. package/dist/{register.agent-DWWw3Tcp.js → register.agent-C4G2zuxZ.js} +9 -9
  150. package/dist/{register.agent-DnXXai-R.js → register.agent-xMmK5W-R.js} +10 -10
  151. package/dist/{register.configure-wl-tJn4s.js → register.configure-CeFYJnjt.js} +10 -10
  152. package/dist/{register.configure-DzpjSPql.js → register.configure-aXmgTNuB.js} +10 -10
  153. package/dist/{register.maintenance-BkvduEtB.js → register.maintenance-B_bQy-mZ.js} +11 -11
  154. package/dist/{register.maintenance-B7aWrfAO.js → register.maintenance-CWHUzso3.js} +12 -12
  155. package/dist/{register.message-DooMLu1o.js → register.message-42he49is.js} +6 -6
  156. package/dist/{register.message-CL812HS5.js → register.message-Cx6UTHOb.js} +6 -6
  157. package/dist/{register.onboard-DkQtlTNE.js → register.onboard-BmtcBw-6.js} +8 -8
  158. package/dist/{register.onboard-C6f5DRg1.js → register.onboard-C9pozCFG.js} +8 -8
  159. package/dist/{register.setup-9RQgdDUL.js → register.setup-C4TWvr5B.js} +8 -8
  160. package/dist/{register.setup-zBBsTx7h.js → register.setup-C54kkyhM.js} +8 -8
  161. package/dist/{register.status-health-sessions-hl3bzjXd.js → register.status-health-sessions-DHHGaJsX.js} +7 -7
  162. package/dist/{register.status-health-sessions-DLETokGZ.js → register.status-health-sessions-DNqvYowR.js} +7 -7
  163. package/dist/{register.subclis-DJkdsClC.js → register.subclis-m5WJHhwT.js} +10 -10
  164. package/dist/{reply-B4tyXo72.js → reply-V8UXM1XU.js} +29 -12
  165. package/dist/{run-main-C1xUseJS.js → run-main-Djlctozd.js} +18 -18
  166. package/dist/{runner-B9g6ervv.js → runner-BMHyFfIL.js} +1 -1
  167. package/dist/{runner-Be7-7BcC.js → runner-CbkB3vpb.js} +1 -1
  168. package/dist/{runner-BIWQkeih.js → runner-DkWpm1Ly.js} +1 -1
  169. package/dist/{runner-U_c8SvOa.js → runner-DzmbTP-U.js} +1 -1
  170. package/dist/{server-node-events-CXomRKtF.js → server-node-events-D5Fen-q2.js} +6 -6
  171. package/dist/{server-node-events-CRVgNQ0_.js → server-node-events-Dm6MSKk0.js} +6 -6
  172. package/dist/{session-dirs-2TEacrvL.js → session-dirs-BmVdF2KM.js} +1 -1
  173. package/dist/{session-dirs-C7dOvbkp.js → session-dirs-CRnGB63U.js} +1 -1
  174. package/dist/{status-BlmQ68Lr.js → status-2w8d47j-.js} +2 -2
  175. package/dist/{status-BjUudjm_.js → status-Bi_g-8aS.js} +1 -1
  176. package/dist/{status-Cd-_yawg.js → status-BjjDHl4v.js} +1 -1
  177. package/dist/{status-CDINUwpc.js → status-DQEnKbht.js} +2 -2
  178. package/dist/{subagent-registry-CWSe1lKN.js → subagent-registry-DGNGenUN.js} +29 -12
  179. package/dist/{tui-C8TIc36Z.js → tui-BPSckkGa.js} +1 -1
  180. package/dist/{tui-dDj0kI9K.js → tui-Dn3NzP7B.js} +1 -1
  181. package/dist/{tui-cli-B1R2UxjK.js → tui-cli-DYhd0RT6.js} +2 -2
  182. package/dist/{tui-cli-DXNQuXf_.js → tui-cli-Dscc8usx.js} +2 -2
  183. package/dist/{update-cli-HS6kiKIK.js → update-cli-BQIIdEwf.js} +11 -11
  184. package/dist/{update-cli-BUIB_VFr.js → update-cli-C-xMtbk9.js} +12 -12
  185. package/dist/{web-CO5qanzX.js → web-CIdW3A5E.js} +5 -5
  186. package/dist/{web-Cz_gOgql.js → web-Ciz1i7yI.js} +6 -6
  187. package/dist/{web-CmGHJmHB.js → web-H55ayBNa.js} +5 -5
  188. package/dist/{web-0-iNcZsR.js → web-aUEiU7C4.js} +6 -6
  189. package/package.json +1 -1
  190. package/dist/control-ui/assets/index-Cx1_w3YP.js.map +0 -1
  191. package/dist/plugin-sdk/web-DbHQRXHi.js +0 -65
@@ -13,7 +13,7 @@ import { t as parseBooleanValue$1 } from "./boolean-B8-BqKGQ.js";
13
13
  import { n as resolveCliName, r as isTruthyEnvValue, t as formatCliCommand } from "./command-format-BOHIfoCX.js";
14
14
  import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BqtVfvzY.js";
15
15
  import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-CATNwBL8.js";
16
- import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-D3HyJhTX.js";
16
+ import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-B1Ddgm7X.js";
17
17
  import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DriDPU6M.js";
18
18
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Bxo4UHOL.js";
19
19
  import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-CQT5u65w.js";
@@ -23,7 +23,7 @@ import { A as normalizeProviderId, C as buildAllowedModelSet, D as isCliProvider
23
23
  import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-Dgb9dAHW.js";
24
24
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DaNAekda.js";
25
25
  import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-CHYSjmbr.js";
26
- import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-ISSMvBMe.js";
26
+ import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-BVCPWN6Q.js";
27
27
  import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-DN88A7od.js";
28
28
  import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverOpenClawPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-Dhk4A5vb.js";
29
29
  import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-CnYcE5rb.js";
@@ -37,7 +37,7 @@ import { t as resolveIMessageAccount } from "./accounts-DFrH9IVU.js";
37
37
  import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BEAbheM8.js";
38
38
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
39
39
  import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-CrfNWFa1.js";
40
- import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-D-DzmVjC.js";
40
+ import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-BZOs5dHY.js";
41
41
  import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-D1COqWEk.js";
42
42
  import { n as resolveMemorySearchConfig } from "./manager-0vWMF5hH.js";
43
43
  import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-C3XxSzBN.js";
@@ -51,7 +51,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-t9dEMDcL.js";
51
51
  import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-GO5Ntndz.js";
52
52
  import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CZAnHEpp.js";
53
53
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-BlHX0H3E.js";
54
- import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-B9g6ervv.js";
54
+ import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-BMHyFfIL.js";
55
55
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DtI0mtzx.js";
56
56
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Bup9wS1y.js";
57
57
  import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-BgsTqLau.js";
@@ -7198,7 +7198,7 @@ async function routeReply(params) {
7198
7198
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
7199
7199
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
7200
7200
  try {
7201
- const { deliverOutboundPayloads } = await import("./deliver-D3HyJhTX.js").then((n) => n.n);
7201
+ const { deliverOutboundPayloads } = await import("./deliver-B1Ddgm7X.js").then((n) => n.n);
7202
7202
  return {
7203
7203
  ok: true,
7204
7204
  messageId: (await deliverOutboundPayloads({
@@ -41571,7 +41571,7 @@ async function deliverSessionMaintenanceWarning(params) {
41571
41571
  return;
41572
41572
  }
41573
41573
  try {
41574
- const { deliverOutboundPayloads } = await import("./deliver-D3HyJhTX.js").then((n) => n.n);
41574
+ const { deliverOutboundPayloads } = await import("./deliver-B1Ddgm7X.js").then((n) => n.n);
41575
41575
  await deliverOutboundPayloads({
41576
41576
  cfg: params.cfg,
41577
41577
  channel,
@@ -42960,6 +42960,9 @@ function createReplyDispatcherWithTyping(options) {
42960
42960
  typingController = typing;
42961
42961
  }
42962
42962
  },
42963
+ markRunComplete: () => {
42964
+ typingController?.markRunComplete();
42965
+ },
42963
42966
  markDispatchIdle: () => {
42964
42967
  typingController?.markDispatchIdle();
42965
42968
  onIdle?.();
@@ -42995,7 +42998,7 @@ async function dispatchInboundMessage(params) {
42995
42998
  });
42996
42999
  }
42997
43000
  async function dispatchInboundMessageWithBufferedDispatcher(params) {
42998
- const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping(params.dispatcherOptions);
43001
+ const { dispatcher, replyOptions, markDispatchIdle, markRunComplete } = createReplyDispatcherWithTyping(params.dispatcherOptions);
42999
43002
  try {
43000
43003
  return await dispatchInboundMessage({
43001
43004
  ctx: params.ctx,
@@ -43008,6 +43011,7 @@ async function dispatchInboundMessageWithBufferedDispatcher(params) {
43008
43011
  }
43009
43012
  });
43010
43013
  } finally {
43014
+ markRunComplete();
43011
43015
  markDispatchIdle();
43012
43016
  }
43013
43017
  }
@@ -45014,7 +45018,7 @@ async function describeStickerImage(params) {
45014
45018
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
45015
45019
  try {
45016
45020
  const buffer = await fs.readFile(imagePath);
45017
- const { describeImageWithModel } = await import("./image-D-DzmVjC.js").then((n) => n.n);
45021
+ const { describeImageWithModel } = await import("./image-BZOs5dHY.js").then((n) => n.n);
45018
45022
  return (await describeImageWithModel({
45019
45023
  buffer,
45020
45024
  fileName: "sticker.webp",
@@ -47475,7 +47479,7 @@ async function preflightDiscordMessage(params) {
47475
47479
  let preflightTranscript;
47476
47480
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
47477
47481
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
47478
- const { transcribeFirstAudio } = await import("./audio-preflight-Bqg8wRF0.js");
47482
+ const { transcribeFirstAudio } = await import("./audio-preflight-BnwMjf3g.js");
47479
47483
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
47480
47484
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
47481
47485
  ctx: {
@@ -51481,7 +51485,7 @@ function isVoiceChannelType(type) {
51481
51485
  function createDefaultDeps() {
51482
51486
  return {
51483
51487
  sendMessageWhatsApp: async (...args) => {
51484
- const { sendMessageWhatsApp } = await import("./web-CO5qanzX.js");
51488
+ const { sendMessageWhatsApp } = await import("./web-CIdW3A5E.js");
51485
51489
  return await sendMessageWhatsApp(...args);
51486
51490
  },
51487
51491
  sendMessageTelegram: async (...args) => {
@@ -59449,6 +59453,10 @@ function createSlackMonitorContext(params) {
59449
59453
  ttlMs: 6e4,
59450
59454
  maxSize: 500
59451
59455
  });
59456
+ const seenEventIds = createDedupeCache({
59457
+ ttlMs: 6e4,
59458
+ maxSize: 500
59459
+ });
59452
59460
  const allowFrom = normalizeAllowList$2(params.allowFrom);
59453
59461
  const groupDmChannels = normalizeAllowList$2(params.groupDmChannels);
59454
59462
  const defaultRequireMention = params.defaultRequireMention ?? true;
@@ -59456,6 +59464,10 @@ function createSlackMonitorContext(params) {
59456
59464
  if (!channelId || !ts) return false;
59457
59465
  return seenMessages.check(`${channelId}:${ts}`);
59458
59466
  };
59467
+ const markEventIdSeen = (eventId) => {
59468
+ if (!eventId) return false;
59469
+ return seenEventIds.check(eventId);
59470
+ };
59459
59471
  const resolveSlackSystemEventSessionKey = (p) => {
59460
59472
  const channelId = p.channelId?.trim() ?? "";
59461
59473
  if (!channelId) return params.mainKey;
@@ -59620,6 +59632,7 @@ function createSlackMonitorContext(params) {
59620
59632
  removeAckAfterReply: params.removeAckAfterReply,
59621
59633
  logger,
59622
59634
  markMessageSeen,
59635
+ markEventIdSeen,
59623
59636
  shouldDropMismatchedSlackEvent,
59624
59637
  resolveSlackSystemEventSessionKey,
59625
59638
  isChannelAllowed,
@@ -60228,6 +60241,8 @@ function registerSlackMessageEvents(params) {
60228
60241
  ctx.app.event("message", async ({ event, body }) => {
60229
60242
  try {
60230
60243
  if (ctx.shouldDropMismatchedSlackEvent(body)) return;
60244
+ const eventId = body.event_id;
60245
+ if (ctx.markEventIdSeen(eventId)) return;
60231
60246
  const message = event;
60232
60247
  if (message.subtype === "message_changed") {
60233
60248
  const changed = event;
@@ -60273,6 +60288,8 @@ function registerSlackMessageEvents(params) {
60273
60288
  ctx.app.event("app_mention", async ({ event, body }) => {
60274
60289
  try {
60275
60290
  if (ctx.shouldDropMismatchedSlackEvent(body)) return;
60291
+ const eventId = body.event_id;
60292
+ if (ctx.markEventIdSeen(eventId)) return;
60276
60293
  const mention = event;
60277
60294
  const channelType = mention.channel_type;
60278
60295
  if (channelType === "im" || channelType === "mpim") return;
@@ -64654,7 +64671,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
64654
64671
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
64655
64672
  let preflightTranscript;
64656
64673
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
64657
- const { transcribeFirstAudio } = await import("./audio-preflight-Bqg8wRF0.js");
64674
+ const { transcribeFirstAudio } = await import("./audio-preflight-BnwMjf3g.js");
64658
64675
  preflightTranscript = await transcribeFirstAudio({
64659
64676
  ctx: {
64660
64677
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -66811,7 +66828,7 @@ function loadWebLoginQr() {
66811
66828
  return webLoginQrPromise;
66812
66829
  }
66813
66830
  function loadWebChannel() {
66814
- webChannelPromise ??= import("./web-CO5qanzX.js");
66831
+ webChannelPromise ??= import("./web-CIdW3A5E.js");
66815
66832
  return webChannelPromise;
66816
66833
  }
66817
66834
  function loadWhatsAppActions() {
@@ -14,7 +14,7 @@ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExis
14
14
  import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
15
15
  import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-DIoqNZGo.js";
16
16
  import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-BJZNl-To.js";
17
- import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-CX6Se-jI.js";
17
+ import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-BLkQFTzD.js";
18
18
  import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DzmNBZt3.js";
19
19
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-C1vRJs5w.js";
20
20
  import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-sr0G5UOe.js";
@@ -22,10 +22,10 @@ import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normali
22
22
  import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-BJidZpId.js";
23
23
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-j5tVLINv.js";
24
24
  import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-DNOtJsL1.js";
25
- import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-DWuT7Pe9.js";
25
+ import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-Dl_FdUMU.js";
26
26
  import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-Bj1BETyH.js";
27
27
  import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverOpenClawPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-sze5OW-s.js";
28
- import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-Cag1SQQf.js";
28
+ import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-EGHj-WC_.js";
29
29
  import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BZ3AnzBD.js";
30
30
  import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-CPfngF0S.js";
31
31
  import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
@@ -36,7 +36,7 @@ import { t as resolveIMessageAccount } from "./accounts-DAZL5b5o.js";
36
36
  import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-5iQF9bSz.js";
37
37
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-C8Tqw4td.js";
38
38
  import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-o5KE8ifY.js";
39
- import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-Cgalj9ct.js";
39
+ import { S as ensureOpenClawModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-DuT8yGCI.js";
40
40
  import { n as resolveMemorySearchConfig } from "./manager-isQiMuR_.js";
41
41
  import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-CmTvWxxq.js";
42
42
  import { n as retryAsync } from "./retry-CFbmOHr4.js";
@@ -49,7 +49,7 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-D0XFjNjt.js";
49
49
  import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-Cc65BLE0.js";
50
50
  import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-WUe5qD2m.js";
51
51
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-QOi5vzUt.js";
52
- import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-U_c8SvOa.js";
52
+ import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-DzmbTP-U.js";
53
53
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-BMa0enEg.js";
54
54
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DtXYsHEc.js";
55
55
  import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-7fb2OxTV.js";
@@ -79,7 +79,7 @@ import { EdgeTTS } from "node-edge-tts";
79
79
  import AjvPkg from "ajv";
80
80
  import { createServer } from "node:http";
81
81
  import { ProxyAgent, fetch as fetch$1 } from "undici";
82
- import WebSocket$1, { WebSocket } from "ws";
82
+ import WebSocket, { WebSocket as WebSocket$1 } from "ws";
83
83
  import { Buffer as Buffer$1 } from "node:buffer";
84
84
  import { createJiti } from "jiti";
85
85
  import { Type } from "@sinclair/typebox";
@@ -5713,7 +5713,7 @@ var GatewayClient = class {
5713
5713
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
5714
5714
  });
5715
5715
  }
5716
- this.ws = new WebSocket(url, wsOptions);
5716
+ this.ws = new WebSocket$1(url, wsOptions);
5717
5717
  this.ws.on("open", () => {
5718
5718
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
5719
5719
  const tlsError = this.validateTlsFingerprint();
@@ -5932,7 +5932,7 @@ var GatewayClient = class {
5932
5932
  return null;
5933
5933
  }
5934
5934
  async request(method, params, opts) {
5935
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
5935
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
5936
5936
  const id = randomUUID();
5937
5937
  const frame = {
5938
5938
  type: "req",
@@ -7196,7 +7196,7 @@ async function routeReply(params) {
7196
7196
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
7197
7197
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
7198
7198
  try {
7199
- const { deliverOutboundPayloads } = await import("./deliver-CX6Se-jI.js").then((n) => n.n);
7199
+ const { deliverOutboundPayloads } = await import("./deliver-BLkQFTzD.js").then((n) => n.n);
7200
7200
  return {
7201
7201
  ok: true,
7202
7202
  messageId: (await deliverOutboundPayloads({
@@ -41569,7 +41569,7 @@ async function deliverSessionMaintenanceWarning(params) {
41569
41569
  return;
41570
41570
  }
41571
41571
  try {
41572
- const { deliverOutboundPayloads } = await import("./deliver-CX6Se-jI.js").then((n) => n.n);
41572
+ const { deliverOutboundPayloads } = await import("./deliver-BLkQFTzD.js").then((n) => n.n);
41573
41573
  await deliverOutboundPayloads({
41574
41574
  cfg: params.cfg,
41575
41575
  channel,
@@ -42958,6 +42958,9 @@ function createReplyDispatcherWithTyping(options) {
42958
42958
  typingController = typing;
42959
42959
  }
42960
42960
  },
42961
+ markRunComplete: () => {
42962
+ typingController?.markRunComplete();
42963
+ },
42961
42964
  markDispatchIdle: () => {
42962
42965
  typingController?.markDispatchIdle();
42963
42966
  onIdle?.();
@@ -42993,7 +42996,7 @@ async function dispatchInboundMessage(params) {
42993
42996
  });
42994
42997
  }
42995
42998
  async function dispatchInboundMessageWithBufferedDispatcher(params) {
42996
- const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping(params.dispatcherOptions);
42999
+ const { dispatcher, replyOptions, markDispatchIdle, markRunComplete } = createReplyDispatcherWithTyping(params.dispatcherOptions);
42997
43000
  try {
42998
43001
  return await dispatchInboundMessage({
42999
43002
  ctx: params.ctx,
@@ -43006,6 +43009,7 @@ async function dispatchInboundMessageWithBufferedDispatcher(params) {
43006
43009
  }
43007
43010
  });
43008
43011
  } finally {
43012
+ markRunComplete();
43009
43013
  markDispatchIdle();
43010
43014
  }
43011
43015
  }
@@ -45012,7 +45016,7 @@ async function describeStickerImage(params) {
45012
45016
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
45013
45017
  try {
45014
45018
  const buffer = await fs$1.readFile(imagePath);
45015
- const { describeImageWithModel } = await import("./image-Cgalj9ct.js").then((n) => n.n);
45019
+ const { describeImageWithModel } = await import("./image-DuT8yGCI.js").then((n) => n.n);
45016
45020
  return (await describeImageWithModel({
45017
45021
  buffer,
45018
45022
  fileName: "sticker.webp",
@@ -47473,7 +47477,7 @@ async function preflightDiscordMessage(params) {
47473
47477
  let preflightTranscript;
47474
47478
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
47475
47479
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
47476
- const { transcribeFirstAudio } = await import("./audio-preflight-0nE4BIvV.js");
47480
+ const { transcribeFirstAudio } = await import("./audio-preflight-C56sndLt.js");
47477
47481
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
47478
47482
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
47479
47483
  ctx: {
@@ -51479,7 +51483,7 @@ function isVoiceChannelType(type) {
51479
51483
  function createDefaultDeps() {
51480
51484
  return {
51481
51485
  sendMessageWhatsApp: async (...args) => {
51482
- const { sendMessageWhatsApp } = await import("./web-0-iNcZsR.js");
51486
+ const { sendMessageWhatsApp } = await import("./web-aUEiU7C4.js");
51483
51487
  return await sendMessageWhatsApp(...args);
51484
51488
  },
51485
51489
  sendMessageTelegram: async (...args) => {
@@ -54392,7 +54396,7 @@ function createDiscordGatewayPlugin(params) {
54392
54396
  super(options);
54393
54397
  }
54394
54398
  createWebSocket(url) {
54395
- return new WebSocket$1(url, { agent });
54399
+ return new WebSocket(url, { agent });
54396
54400
  }
54397
54401
  }
54398
54402
  return new ProxyGatewayPlugin();
@@ -59447,6 +59451,10 @@ function createSlackMonitorContext(params) {
59447
59451
  ttlMs: 6e4,
59448
59452
  maxSize: 500
59449
59453
  });
59454
+ const seenEventIds = createDedupeCache({
59455
+ ttlMs: 6e4,
59456
+ maxSize: 500
59457
+ });
59450
59458
  const allowFrom = normalizeAllowList$2(params.allowFrom);
59451
59459
  const groupDmChannels = normalizeAllowList$2(params.groupDmChannels);
59452
59460
  const defaultRequireMention = params.defaultRequireMention ?? true;
@@ -59454,6 +59462,10 @@ function createSlackMonitorContext(params) {
59454
59462
  if (!channelId || !ts) return false;
59455
59463
  return seenMessages.check(`${channelId}:${ts}`);
59456
59464
  };
59465
+ const markEventIdSeen = (eventId) => {
59466
+ if (!eventId) return false;
59467
+ return seenEventIds.check(eventId);
59468
+ };
59457
59469
  const resolveSlackSystemEventSessionKey = (p) => {
59458
59470
  const channelId = p.channelId?.trim() ?? "";
59459
59471
  if (!channelId) return params.mainKey;
@@ -59618,6 +59630,7 @@ function createSlackMonitorContext(params) {
59618
59630
  removeAckAfterReply: params.removeAckAfterReply,
59619
59631
  logger,
59620
59632
  markMessageSeen,
59633
+ markEventIdSeen,
59621
59634
  shouldDropMismatchedSlackEvent,
59622
59635
  resolveSlackSystemEventSessionKey,
59623
59636
  isChannelAllowed,
@@ -60226,6 +60239,8 @@ function registerSlackMessageEvents(params) {
60226
60239
  ctx.app.event("message", async ({ event, body }) => {
60227
60240
  try {
60228
60241
  if (ctx.shouldDropMismatchedSlackEvent(body)) return;
60242
+ const eventId = body.event_id;
60243
+ if (ctx.markEventIdSeen(eventId)) return;
60229
60244
  const message = event;
60230
60245
  if (message.subtype === "message_changed") {
60231
60246
  const changed = event;
@@ -60271,6 +60286,8 @@ function registerSlackMessageEvents(params) {
60271
60286
  ctx.app.event("app_mention", async ({ event, body }) => {
60272
60287
  try {
60273
60288
  if (ctx.shouldDropMismatchedSlackEvent(body)) return;
60289
+ const eventId = body.event_id;
60290
+ if (ctx.markEventIdSeen(eventId)) return;
60274
60291
  const mention = event;
60275
60292
  const channelType = mention.channel_type;
60276
60293
  if (channelType === "im" || channelType === "mpim") return;
@@ -64652,7 +64669,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
64652
64669
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
64653
64670
  let preflightTranscript;
64654
64671
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
64655
- const { transcribeFirstAudio } = await import("./audio-preflight-0nE4BIvV.js");
64672
+ const { transcribeFirstAudio } = await import("./audio-preflight-C56sndLt.js");
64656
64673
  preflightTranscript = await transcribeFirstAudio({
64657
64674
  ctx: {
64658
64675
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -66809,7 +66826,7 @@ function loadWebLoginQr() {
66809
66826
  return webLoginQrPromise;
66810
66827
  }
66811
66828
  function loadWebChannel() {
66812
- webChannelPromise ??= import("./web-0-iNcZsR.js");
66829
+ webChannelPromise ??= import("./web-aUEiU7C4.js");
66813
66830
  return webChannelPromise;
66814
66831
  }
66815
66832
  function loadWhatsAppActions() {
@@ -6905,9 +6905,9 @@ function isCompactionFailureError(errorMessage) {
6905
6905
  if (isLikelyContextOverflowError(errorMessage)) return true;
6906
6906
  return lower.includes("context overflow");
6907
6907
  }
6908
- const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
6908
+ const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error)[:\s-]+/i;
6909
6909
  const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
6910
- const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
6910
+ const ERROR_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error|request failed|failed|exception)(?:\s+\d{3})?[:\s-]+/i;
6911
6911
  const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?: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;
6912
6912
  const BILLING_ERROR_HEAD_RE = /^(?:error[:\s-]+)?billing(?:\s+error)?(?:[:\s-]+|$)|^(?:error[:\s-]+)?(?:credit balance|insufficient credits?|payment required|http\s*402\b)/i;
6913
6913
  const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
@@ -7050,6 +7050,25 @@ function getApiErrorPayloadFingerprint(raw) {
7050
7050
  function isRawApiErrorPayload(raw) {
7051
7051
  return getApiErrorPayloadFingerprint(raw) !== null;
7052
7052
  }
7053
+ function isLikelyProviderErrorType(type) {
7054
+ const normalized = type?.trim().toLowerCase();
7055
+ if (!normalized) return false;
7056
+ return normalized.endsWith("_error");
7057
+ }
7058
+ const NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH = 16384;
7059
+ const NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE = /^codex\s*error(?:\s+\d{3})?[:\s-]+/i;
7060
+ function shouldRewriteRawPayloadWithoutErrorContext(raw) {
7061
+ if (raw.length > NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH) return false;
7062
+ if (!NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE.test(raw)) return false;
7063
+ const info = parseApiErrorInfo(raw);
7064
+ if (!info) return false;
7065
+ if (isLikelyProviderErrorType(info.type)) return true;
7066
+ if (info.httpCode) {
7067
+ const parsedCode = Number(info.httpCode);
7068
+ if (Number.isFinite(parsedCode) && parsedCode >= 400) return true;
7069
+ }
7070
+ return false;
7071
+ }
7053
7072
  function parseApiErrorInfo(raw) {
7054
7073
  if (!raw) return null;
7055
7074
  const trimmed = raw.trim();
@@ -7092,12 +7111,7 @@ function formatRawAssistantErrorForUi(raw) {
7092
7111
  if (!rest.startsWith("{")) return `HTTP ${httpMatch[1]}: ${rest}`;
7093
7112
  }
7094
7113
  const info = parseApiErrorInfo(trimmed);
7095
- if (info?.message) {
7096
- const prefix = info.httpCode ? `HTTP ${info.httpCode}` : "LLM error";
7097
- const type = info.type ? ` ${info.type}` : "";
7098
- const requestId = info.requestId ? ` (request_id: ${info.requestId})` : "";
7099
- return `${prefix}${type}: ${info.message}${requestId}`;
7100
- }
7114
+ if (info?.message) return `${info.httpCode ? `HTTP ${info.httpCode}` : "LLM error"}${info.type ? ` ${info.type}` : ""}: ${info.message}`;
7101
7115
  return trimmed.length > 600 ? `${trimmed.slice(0, 600)}…` : trimmed;
7102
7116
  }
7103
7117
  function formatAssistantErrorText(msg, opts) {
@@ -7132,6 +7146,7 @@ function sanitizeUserFacingText(text, opts) {
7132
7146
  const stripped = stripFinalTagsFromText(text);
7133
7147
  const trimmed = stripped.trim();
7134
7148
  if (!trimmed) return "";
7149
+ if (!errorContext && shouldRewriteRawPayloadWithoutErrorContext(trimmed)) return formatRawAssistantErrorForUi(trimmed);
7135
7150
  if (errorContext) {
7136
7151
  if (/incorrect role information|roles must alternate/i.test(trimmed)) return "Message ordering conflict - please try again. If this persists, use /new to start a fresh session.";
7137
7152
  if (shouldRewriteContextOverflowText(trimmed)) return "Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.";
@@ -7166,6 +7181,19 @@ const ERROR_PATTERNS = {
7166
7181
  "service unavailable",
7167
7182
  "high demand"
7168
7183
  ],
7184
+ serverError: [
7185
+ "an error occurred while processing",
7186
+ "internal server error",
7187
+ "internal_error",
7188
+ "server_error",
7189
+ "service temporarily unavailable",
7190
+ "service_unavailable",
7191
+ "bad gateway",
7192
+ "gateway timeout",
7193
+ "upstream error",
7194
+ "upstream connect error",
7195
+ "connection reset"
7196
+ ],
7169
7197
  timeout: [
7170
7198
  "timeout",
7171
7199
  "timed out",
@@ -7246,6 +7274,9 @@ function isAuthErrorMessage(raw) {
7246
7274
  function isOverloadedErrorMessage(raw) {
7247
7275
  return matchesErrorPatterns(raw, ERROR_PATTERNS.overloaded);
7248
7276
  }
7277
+ function isServerErrorMessage(raw) {
7278
+ return matchesErrorPatterns(raw, ERROR_PATTERNS.serverError);
7279
+ }
7249
7280
  function isJsonApiInternalServerError(raw) {
7250
7281
  if (!raw) return false;
7251
7282
  const value = raw.toLowerCase();
@@ -7307,6 +7338,7 @@ function classifyFailoverReason(raw) {
7307
7338
  if (isBillingErrorMessage(raw)) return "billing";
7308
7339
  if (isTimeoutErrorMessage(raw)) return "timeout";
7309
7340
  if (isAuthErrorMessage(raw)) return "auth";
7341
+ if (isServerErrorMessage(raw)) return "timeout";
7310
7342
  return null;
7311
7343
  }
7312
7344
  function isFailoverErrorMessage(raw) {
@@ -211,9 +211,9 @@ function isCompactionFailureError(errorMessage) {
211
211
  if (isLikelyContextOverflowError(errorMessage)) return true;
212
212
  return lower.includes("context overflow");
213
213
  }
214
- const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
214
+ const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error)[:\s-]+/i;
215
215
  const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
216
- const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
216
+ const ERROR_PREFIX_RE = /^(?:error|(?:[a-z][\w-]*\s+)?api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|codex\s*error|request failed|failed|exception)(?:\s+\d{3})?[:\s-]+/i;
217
217
  const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?: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;
218
218
  const BILLING_ERROR_HEAD_RE = /^(?:error[:\s-]+)?billing(?:\s+error)?(?:[:\s-]+|$)|^(?:error[:\s-]+)?(?:credit balance|insufficient credits?|payment required|http\s*402\b)/i;
219
219
  const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
@@ -356,6 +356,25 @@ function getApiErrorPayloadFingerprint(raw) {
356
356
  function isRawApiErrorPayload(raw) {
357
357
  return getApiErrorPayloadFingerprint(raw) !== null;
358
358
  }
359
+ function isLikelyProviderErrorType(type) {
360
+ const normalized = type?.trim().toLowerCase();
361
+ if (!normalized) return false;
362
+ return normalized.endsWith("_error");
363
+ }
364
+ const NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH = 16384;
365
+ const NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE = /^codex\s*error(?:\s+\d{3})?[:\s-]+/i;
366
+ function shouldRewriteRawPayloadWithoutErrorContext(raw) {
367
+ if (raw.length > NON_ERROR_PROVIDER_PAYLOAD_MAX_LENGTH) return false;
368
+ if (!NON_ERROR_PROVIDER_PAYLOAD_PREFIX_RE.test(raw)) return false;
369
+ const info = parseApiErrorInfo(raw);
370
+ if (!info) return false;
371
+ if (isLikelyProviderErrorType(info.type)) return true;
372
+ if (info.httpCode) {
373
+ const parsedCode = Number(info.httpCode);
374
+ if (Number.isFinite(parsedCode) && parsedCode >= 400) return true;
375
+ }
376
+ return false;
377
+ }
359
378
  function parseApiErrorInfo(raw) {
360
379
  if (!raw) return null;
361
380
  const trimmed = raw.trim();
@@ -398,12 +417,7 @@ function formatRawAssistantErrorForUi(raw) {
398
417
  if (!rest.startsWith("{")) return `HTTP ${httpMatch[1]}: ${rest}`;
399
418
  }
400
419
  const info = parseApiErrorInfo(trimmed);
401
- if (info?.message) {
402
- const prefix = info.httpCode ? `HTTP ${info.httpCode}` : "LLM error";
403
- const type = info.type ? ` ${info.type}` : "";
404
- const requestId = info.requestId ? ` (request_id: ${info.requestId})` : "";
405
- return `${prefix}${type}: ${info.message}${requestId}`;
406
- }
420
+ if (info?.message) return `${info.httpCode ? `HTTP ${info.httpCode}` : "LLM error"}${info.type ? ` ${info.type}` : ""}: ${info.message}`;
407
421
  return trimmed.length > 600 ? `${trimmed.slice(0, 600)}…` : trimmed;
408
422
  }
409
423
  function formatAssistantErrorText(msg, opts) {
@@ -438,6 +452,7 @@ function sanitizeUserFacingText(text, opts) {
438
452
  const stripped = stripFinalTagsFromText(text);
439
453
  const trimmed = stripped.trim();
440
454
  if (!trimmed) return "";
455
+ if (!errorContext && shouldRewriteRawPayloadWithoutErrorContext(trimmed)) return formatRawAssistantErrorForUi(trimmed);
441
456
  if (errorContext) {
442
457
  if (/incorrect role information|roles must alternate/i.test(trimmed)) return "Message ordering conflict - please try again. If this persists, use /new to start a fresh session.";
443
458
  if (shouldRewriteContextOverflowText(trimmed)) return "Context overflow: prompt too large for the model. Try /reset (or /new) to start a fresh session, or use a larger-context model.";
@@ -472,6 +487,19 @@ const ERROR_PATTERNS = {
472
487
  "service unavailable",
473
488
  "high demand"
474
489
  ],
490
+ serverError: [
491
+ "an error occurred while processing",
492
+ "internal server error",
493
+ "internal_error",
494
+ "server_error",
495
+ "service temporarily unavailable",
496
+ "service_unavailable",
497
+ "bad gateway",
498
+ "gateway timeout",
499
+ "upstream error",
500
+ "upstream connect error",
501
+ "connection reset"
502
+ ],
475
503
  timeout: [
476
504
  "timeout",
477
505
  "timed out",
@@ -552,6 +580,9 @@ function isAuthErrorMessage(raw) {
552
580
  function isOverloadedErrorMessage(raw) {
553
581
  return matchesErrorPatterns(raw, ERROR_PATTERNS.overloaded);
554
582
  }
583
+ function isServerErrorMessage(raw) {
584
+ return matchesErrorPatterns(raw, ERROR_PATTERNS.serverError);
585
+ }
555
586
  function isJsonApiInternalServerError(raw) {
556
587
  if (!raw) return false;
557
588
  const value = raw.toLowerCase();
@@ -613,6 +644,7 @@ function classifyFailoverReason(raw) {
613
644
  if (isBillingErrorMessage(raw)) return "billing";
614
645
  if (isTimeoutErrorMessage(raw)) return "timeout";
615
646
  if (isAuthErrorMessage(raw)) return "auth";
647
+ if (isServerErrorMessage(raw)) return "timeout";
616
648
  return null;
617
649
  }
618
650
  function isFailoverErrorMessage(raw) {