@openclaw/discord 2026.8.1-beta.3 → 2026.8.2

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 (290) hide show
  1. package/dist/account-inspect-BY-ve3yH.js +45 -0
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-DNl-oCEw.js → accounts-CwJQoLjM.js} +87 -162
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/{activities-api-KCBAmWxD.js → activities-api-CkKcHUB6.js} +14 -12
  6. package/dist/activities-api.js +1 -1
  7. package/dist/{allow-list-BDMimASD.js → allow-list-C2JuH-R0.js} +10 -6
  8. package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
  9. package/dist/api.js +18 -18
  10. package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-DZM6Kt1Z.js} +30 -106
  11. package/dist/{audit-Yc7eZDd6.js → audit-DIbQA4VT.js} +8 -7
  12. package/dist/{channel-cXYzGc4L.js → channel-CarzU3bg.js} +25 -25
  13. package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-B2wMqeVK.js} +60 -57
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/channel-type-CVLZyGYS.js +7 -0
  17. package/dist/{channel.setup-CSiwnMgs.js → channel.setup-z_ewMVa9.js} +18 -18
  18. package/dist/{components-ezGKo_Yh.js → components-gvRA0oaI.js} +33 -29
  19. package/dist/{config-schema-DC5kDtQ5.js → config-schema-B797-Spt.js} +21 -14
  20. package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DPpBRpYI.js} +1 -1
  21. package/dist/{directory-config-XyCfoqLg.js → directory-config-AA8wQx0D.js} +2 -2
  22. package/dist/directory-contract-api.js +1 -1
  23. package/dist/{directory-live-Df0NbFJB.js → directory-live-D_kFz_Fj.js} +4 -4
  24. package/dist/{doctor-DYY31GrO.js → doctor-QQTOkBfW.js} +5 -5
  25. package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
  26. package/dist/doctor-contract-api.js +4 -3
  27. package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-Cc88ZGon.js} +9 -5
  28. package/dist/index.js +1 -1
  29. package/dist/ingress-identity-BCzfPPYM.js +60 -0
  30. package/dist/{message-handler-B61q5MOF.js → message-handler-CAeEpqWo.js} +14 -10
  31. package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-CoKoE3dY.js} +32 -91
  32. package/dist/{message-handler.process--4_712Ec.js → message-handler.process-cdIJ_fDT.js} +99 -123
  33. package/dist/{message-utils-BXLLnFl6.js → message-text-C0K4-fkg.js} +41 -34
  34. package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-Ch0At5Ra.js} +85 -78
  35. package/dist/{outbound-components-B2PL0ooH.js → outbound-components-Bnt_7x7r.js} +5 -4
  36. package/dist/outbound-session-route-CzzerX2K.js +668 -0
  37. package/dist/{owner-access-Bg41VzAf.js → owner-access-yc1sX7Gx.js} +7 -6
  38. package/dist/{pluralkit-dUl4v1X3.js → pluralkit-B3cUVI7i.js} +2 -2
  39. package/dist/{probe-BTdtVRwU.js → probe-3ovFAp3b.js} +3 -3
  40. package/dist/{probe.runtime-Dq5-PRKT.js → probe.runtime-BckHn3cJ.js} +1 -1
  41. package/dist/{provider-DlK_ynqt.js → provider-CjI8BSzS.js} +511 -342
  42. package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-DdKRMcE9.js} +3 -3
  43. package/dist/provider.runtime-Bo1WbLLr.js +2 -0
  44. package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-37IC-p5K.js} +110 -126
  45. package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BJ5UZNNT.js} +3 -3
  46. package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-BexR2eUn.js} +6 -5
  47. package/dist/{resolve-users-BtKxLUZv.js → resolve-users-BtXBCH5W.js} +5 -4
  48. package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
  49. package/dist/{retry-DNsVTeTo.js → retry-t5RcEsPk.js} +237 -15
  50. package/dist/{runtime-CQovMsH3.js → runtime-BNlDfLwS.js} +2 -2
  51. package/dist/{runtime-D71_VFLr.js → runtime-DydyfxST.js} +182 -131
  52. package/dist/runtime-api.js +19 -26
  53. package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
  54. package/dist/secret-contract-api.js +1 -1
  55. package/dist/{security-audit-BfJhAXZp.js → security-audit-DKfK-iPY.js} +10 -11
  56. package/dist/security-audit-contract-api.js +1 -1
  57. package/dist/{security-audit.runtime-BVKF9VtY.js → security-audit.runtime-sKZyKgpx.js} +1 -1
  58. package/dist/{send-rQIffSYu.js → send-mTKSBdmZ.js} +149 -58
  59. package/dist/{send.components-ChK1wS7w.js → send.components-nsPnc7kK.js} +29 -30
  60. package/dist/{send.outbound-HIkgji_7.js → send.outbound-CaOs9Zy1.js} +87 -84
  61. package/dist/{send.shared-B3fpaLWJ.js → send.shared-BJHt0Vyf.js} +55 -33
  62. package/dist/{sender-identity-BJtfyise.js → sender-identity-Dt0imZyY.js} +1 -1
  63. package/dist/setup-plugin-api.js +1 -1
  64. package/dist/{shared-CaAaoksy.js → shared-BNesVA4P.js} +43 -18
  65. package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-IeZVPLGj.js} +2 -2
  66. package/dist/subagent-hooks-api.js +1 -6
  67. package/dist/{system-events-Nuwoq_au.js → system-events-Be5EJI3b.js} +2 -2
  68. package/dist/{target-resolver-DIXShHaZ.js → target-resolver-C0MnwEki.js} +6 -5
  69. package/dist/targets-DQSye1Rv.js +3 -0
  70. package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-wECUSIIG.js} +6 -6
  71. package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-B-3UHCc1.js} +31 -32
  72. package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-CC7HoQvt.js} +2 -1
  73. package/dist/{threading-DU6pgeGm.js → threading-te5ADPQI.js} +51 -27
  74. package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
  75. package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-DkUhR7YK.js} +9 -4
  76. package/dist/transcripts-source-api.js +1 -1
  77. package/dist/{typing-oLiS5Z13.js → typing-DAwJF5VT.js} +2 -2
  78. package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-COyYYTDD.js} +418 -74
  79. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
  80. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
  81. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
  82. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
  83. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
  84. package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
  85. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
  86. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
  87. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
  88. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
  89. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
  90. package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
  91. package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
  92. package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
  93. package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
  94. package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
  95. package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
  96. package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
  97. package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
  98. package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
  99. package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
  100. package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
  101. package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
  102. package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
  103. package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
  104. package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
  105. package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
  106. package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
  107. package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
  108. package/node_modules/discord-api-types/CHANGELOG.md +8 -0
  109. package/node_modules/discord-api-types/package.json +4 -4
  110. package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
  111. package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
  112. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
  113. package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
  114. package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
  115. package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
  116. package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
  117. package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
  118. package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
  119. package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
  120. package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
  121. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
  122. package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
  123. package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
  124. package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
  125. package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
  126. package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
  127. package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
  128. package/node_modules/typebox/build/format/date.d.mts +1 -1
  129. package/node_modules/typebox/build/format/date.mjs +1 -1
  130. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  131. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  132. package/node_modules/typebox/build/format/email.d.mts +1 -1
  133. package/node_modules/typebox/build/format/email.mjs +2 -2
  134. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  135. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  136. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  137. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  138. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  139. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  140. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  141. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  142. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  143. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  144. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  145. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  146. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
  147. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  148. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  149. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  150. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  151. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  152. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  153. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  154. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  155. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  156. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  157. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  158. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  159. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  160. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  161. package/node_modules/typebox/build/format/iri.mjs +26 -8
  162. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  163. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  164. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  165. package/node_modules/typebox/build/format/regex.mjs +2 -6
  166. package/node_modules/typebox/build/format/time.d.mts +2 -2
  167. package/node_modules/typebox/build/format/time.mjs +19 -14
  168. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  169. package/node_modules/typebox/build/format/uri.mjs +3 -130
  170. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  171. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  172. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  173. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  174. package/node_modules/typebox/build/format/url.d.mts +3 -3
  175. package/node_modules/typebox/build/format/url.mjs +4 -5
  176. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  177. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  178. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  179. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  180. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  181. package/node_modules/typebox/build/guard/string.mjs +7 -7
  182. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  183. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  184. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  185. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  186. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  187. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  188. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  189. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  190. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  191. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  192. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  193. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  194. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  195. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  196. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  197. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  198. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  199. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  200. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  201. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  202. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  203. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  204. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  205. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  206. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  207. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  208. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  209. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  210. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  211. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  212. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  213. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  214. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  215. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  216. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  217. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  218. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  219. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  220. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  221. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  222. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  223. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  224. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  225. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  226. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  227. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  228. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  229. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  230. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  231. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  232. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  233. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  234. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  235. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  236. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  237. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  238. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  239. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  240. package/node_modules/typebox/package.json +27 -27
  241. package/node_modules/typebox/readme.md +79 -82
  242. package/node_modules/undici/docs/docs/api/Client.md +21 -8
  243. package/node_modules/undici/lib/api/readable.js +33 -43
  244. package/node_modules/undici/lib/core/connect.js +16 -2
  245. package/node_modules/undici/lib/core/symbols.js +1 -0
  246. package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
  247. package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
  248. package/node_modules/undici/lib/dispatcher/client.js +74 -29
  249. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
  250. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
  251. package/node_modules/undici/lib/handler/retry-handler.js +7 -2
  252. package/node_modules/undici/lib/interceptor/cache.js +5 -2
  253. package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
  254. package/node_modules/undici/lib/mock/mock-utils.js +213 -24
  255. package/node_modules/undici/lib/util/cache.js +2 -4
  256. package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
  257. package/node_modules/undici/package.json +1 -1
  258. package/node_modules/undici/types/client.d.ts +40 -0
  259. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  260. package/node_modules/ws/package.json +1 -1
  261. package/openclaw.plugin.json +14 -6
  262. package/package.json +8 -8
  263. package/skills/discord/SKILL.md +1 -1
  264. package/dist/account-inspect-D5xmUpnj.js +0 -89
  265. package/dist/approval-message-safety-XGFPbDoI.js +0 -226
  266. package/dist/audit-core-BCX8UeFH.js +0 -105
  267. package/dist/channel-actions-Dr2QI8Bf.js +0 -212
  268. package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
  269. package/dist/provider.runtime-CzKGRiAF.js +0 -2
  270. package/dist/runtime-api.actions.js +0 -3
  271. package/dist/runtime-api.lookup.js +0 -7
  272. package/dist/runtime-api.monitor-CzeTYF32.js +0 -6
  273. package/dist/runtime-api.monitor.js +0 -9
  274. package/dist/runtime-api.send.js +0 -7
  275. package/dist/runtime-api.threads.js +0 -5
  276. package/dist/sdk-runtime-37OU6_Yh.js +0 -369
  277. package/dist/send.reactions-gmJ6yFPo.js +0 -78
  278. package/dist/send.receipt-Cnhoautb.js +0 -76
  279. package/dist/subagent-progress-FPLqBY1s.js +0 -110
  280. package/dist/targets-B2pf49zc.js +0 -3
  281. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  282. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  283. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  284. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  285. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  286. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  287. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  288. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  289. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  290. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
@@ -1,23 +1,25 @@
1
- import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-DdLPmPoa.js";
2
- import { k as parseDiscordTarget } from "./accounts-DNl-oCEw.js";
1
+ import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-BrLjLUJi.js";
3
2
  import "node:module";
4
3
  import { redactIdentifier, redactSensitiveFieldValue } from "openclaw/plugin-sdk/logging-core";
5
4
  import { ApplicationCommandOptionType, ApplicationCommandType, ButtonStyle, ComponentType, GatewayDispatchEvents, InteractionContextType, InteractionResponseType, InteractionType, MessageFlags, Routes, TextInputStyle } from "discord-api-types/v10";
5
+ import { Type } from "typebox";
6
+ import { Check } from "typebox/value";
6
7
  import { createHash } from "node:crypto";
7
8
  import { asDateTimestampMs, clampTimerTimeoutMs, parseStrictNonNegativeInteger, resolveExpiresAtMsFromDurationMs, resolveIntegerOption, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
8
9
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
9
- import { Type } from "typebox";
10
- import { Check } from "typebox/value";
11
10
  import { inspect } from "node:util";
12
11
  import { gunzipSync } from "node:zlib";
13
12
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
14
13
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
15
14
  import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, parseRetryAfterHeaderSeconds, resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
15
+ import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
16
16
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
17
17
  import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
18
18
  import { chunkMarkdownTextWithMode } from "openclaw/plugin-sdk/reply-chunking";
19
19
  import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
20
20
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
21
+ import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
22
+ import { attachChannelToResults } from "openclaw/plugin-sdk/channel-send-result";
21
23
  //#region \0rolldown/runtime.js
22
24
  var __defProp = Object.defineProperty;
23
25
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -65,6 +67,11 @@ async function overwriteGuildApplicationCommands(rest, clientId, guildId, body)
65
67
  }
66
68
  //#endregion
67
69
  //#region extensions/discord/src/internal/api.guild.ts
70
+ const discordGuildEmojiListSchema = Type.Array(Type.Object({
71
+ id: Type.Union([Type.String(), Type.Null()]),
72
+ name: Type.Union([Type.String(), Type.Null()]),
73
+ animated: Type.Optional(Type.Boolean())
74
+ }, { additionalProperties: true }));
68
75
  async function getGuild(rest, guildId) {
69
76
  return await rest.get(Routes.guild(guildId));
70
77
  }
@@ -117,7 +124,9 @@ async function createGuildBan(rest, guildId, userId, data) {
117
124
  await rest.put(Routes.guildBan(guildId, userId), data);
118
125
  }
119
126
  async function listGuildEmojis(rest, guildId) {
120
- return await rest.get(Routes.guildEmojis(guildId));
127
+ const emojis = await rest.get(Routes.guildEmojis(guildId));
128
+ if (!Check(discordGuildEmojiListSchema, emojis)) throw new Error("Invalid Discord guild emoji response.");
129
+ return emojis;
121
130
  }
122
131
  async function createGuildEmoji(rest, guildId, data) {
123
132
  return await rest.post(Routes.guildEmojis(guildId), data);
@@ -1166,6 +1175,9 @@ var DiscordEntityCache = class {
1166
1175
  return new GuildMember(this.params.client, raw);
1167
1176
  });
1168
1177
  }
1178
+ async fetchGuildEmojis(guildId, fetcher) {
1179
+ return await this.fetchCached(`guild-emojis:${guildId}`, fetcher);
1180
+ }
1169
1181
  invalidateForGatewayEvent(type, data) {
1170
1182
  const raw = data && typeof data === "object" ? data : {};
1171
1183
  const channelUpdate = GatewayDispatchEvents.ChannelUpdate;
@@ -1173,11 +1185,13 @@ var DiscordEntityCache = class {
1173
1185
  const threadUpdate = GatewayDispatchEvents.ThreadUpdate;
1174
1186
  const threadDelete = GatewayDispatchEvents.ThreadDelete;
1175
1187
  const guildUpdate = GatewayDispatchEvents.GuildUpdate;
1188
+ const guildEmojisUpdate = GatewayDispatchEvents.GuildEmojisUpdate;
1176
1189
  const guildMemberAdd = GatewayDispatchEvents.GuildMemberAdd;
1177
1190
  const guildMemberRemove = GatewayDispatchEvents.GuildMemberRemove;
1178
1191
  const guildMemberUpdate = GatewayDispatchEvents.GuildMemberUpdate;
1179
1192
  if (type === channelUpdate || type === channelDelete || type === threadUpdate || type === threadDelete) this.deleteId("channel", raw.id);
1180
1193
  if (type === guildUpdate) this.deleteId("guild", raw.id);
1194
+ if (type === guildEmojisUpdate) this.deleteId("guild-emojis", raw.guild_id);
1181
1195
  if (type === guildMemberAdd || type === guildMemberRemove || type === guildMemberUpdate) {
1182
1196
  const guildId = raw.guild_id;
1183
1197
  const user = raw.user && typeof raw.user === "object" ? raw.user : {};
@@ -1662,6 +1676,7 @@ var BaseInteraction = class {
1662
1676
  this.message = null;
1663
1677
  this.response = new InteractionResponseController();
1664
1678
  this.pendingResponse = Promise.resolve();
1679
+ this.sentFollowUp = false;
1665
1680
  this.id = rawData.id;
1666
1681
  this.token = rawData.token;
1667
1682
  this.user = readInteractionUser(rawData, client);
@@ -1678,6 +1693,14 @@ var BaseInteraction = class {
1678
1693
  set responseState(nextState) {
1679
1694
  this.response.state = nextState;
1680
1695
  }
1696
+ /**
1697
+ * True once a follow-up message has been delivered. Follow-ups are visible to
1698
+ * the user but never advance `responseState`, so this is the only record that
1699
+ * the interaction has already produced output.
1700
+ */
1701
+ get hasSentFollowUp() {
1702
+ return this.sentFollowUp;
1703
+ }
1681
1704
  enqueueResponse(operation) {
1682
1705
  const result = this.pendingResponse.then(operation);
1683
1706
  this.pendingResponse = result.then(() => void 0, () => void 0);
@@ -1712,6 +1735,24 @@ var BaseInteraction = class {
1712
1735
  async editReply(payload) {
1713
1736
  return await this.enqueueResponse(() => this.performReplyEdit(payload));
1714
1737
  }
1738
+ /**
1739
+ * Edits the deferred placeholder only if this interaction is still an
1740
+ * unanswered spinner when the queue reaches this operation.
1741
+ *
1742
+ * Both conditions are re-read inside the queue. A follow-up that was still in
1743
+ * flight when the caller decided to report will have settled — and recorded
1744
+ * itself in `sentFollowUp` — by the time this runs, so the decision cannot be
1745
+ * made against state that is about to change.
1746
+ *
1747
+ * Resolves true when the edit was sent.
1748
+ */
1749
+ async editDeferredPlaceholderIfUnanswered(payload) {
1750
+ return await this.enqueueResponse(async () => {
1751
+ if (this.responseState !== "deferred" || this.sentFollowUp) return false;
1752
+ await this.performReplyEdit(payload);
1753
+ return true;
1754
+ });
1755
+ }
1715
1756
  async performReplyEdit(payload) {
1716
1757
  const body = serializePayload(payload);
1717
1758
  const query = needsComponentsV2Query(body) ? { with_components: true } : void 0;
@@ -1741,7 +1782,9 @@ var BaseInteraction = class {
1741
1782
  }
1742
1783
  async performFollowUp(payload) {
1743
1784
  const body = serializePayload(payload);
1744
- return await createWebhookMessage(this.client.rest, this.client.options.clientId, this.token, { body }, needsComponentsV2Query(body) ? { with_components: true } : void 0);
1785
+ const result = await createWebhookMessage(this.client.rest, this.client.options.clientId, this.token, { body }, needsComponentsV2Query(body) ? { with_components: true } : void 0);
1786
+ this.sentFollowUp = true;
1787
+ return result;
1745
1788
  }
1746
1789
  };
1747
1790
  var CommandInteraction = class extends BaseInteraction {
@@ -1830,6 +1873,14 @@ async function dispatchInteraction(client, rawData) {
1830
1873
  if (command.commandKind === "leaf") await command.autocomplete(autocompleteInteraction);
1831
1874
  return;
1832
1875
  }
1876
+ try {
1877
+ await dispatchAcknowledgeableInteraction(client, rawData, interaction);
1878
+ } catch (error) {
1879
+ await reportInteractionFailure(interaction);
1880
+ throw error;
1881
+ }
1882
+ }
1883
+ async function dispatchAcknowledgeableInteraction(client, rawData, interaction) {
1833
1884
  if (rawData.type === InteractionType.ApplicationCommand) {
1834
1885
  const command = client.commands.find((entry) => entry.name === readInteractionName(rawData));
1835
1886
  if (command) {
@@ -1865,6 +1916,44 @@ async function dispatchInteraction(client, rawData) {
1865
1916
  if (modal) await modal.run(interaction, modal.customIdParser(customId).data);
1866
1917
  }
1867
1918
  }
1919
+ /**
1920
+ * Fixed text. The thrown error is deliberately not echoed here: an interaction
1921
+ * response is visible to the whole channel, and handler exceptions routinely
1922
+ * carry absolute paths, config keys, and provider responses. The rethrow keeps
1923
+ * the detail in the Gateway log where operators already look for it.
1924
+ */
1925
+ const INTERACTION_FAILURE_NOTICE = "Command failed. Check the Gateway logs for details.";
1926
+ /**
1927
+ * Best-effort user-visible notice for a failed interaction. Never throws: a
1928
+ * reporting failure must not mask the original error.
1929
+ *
1930
+ * Deliberately narrow. It reports only for `deferred`, where a spinner is known
1931
+ * to exist and the original response is a placeholder this dispatch created:
1932
+ *
1933
+ * - `deferred` the deferring callback succeeded (state advances only
1934
+ * after a REST success), so editing the original response
1935
+ * resolves a spinner that would otherwise hang forever.
1936
+ * - `deferred-update` a component acknowledgement. Discord leaves no spinner,
1937
+ * and the original response is the message the component is
1938
+ * attached to, so editing it would overwrite content the
1939
+ * user is still reading.
1940
+ * - `unacknowledged` nothing is known to have reached Discord. A second
1941
+ * initial callback risks "already acknowledged" if the
1942
+ * first one landed after all, and Discord already shows its
1943
+ * own "did not respond" notice.
1944
+ * - `replied` the user has seen a message, and nextReplyAction() would
1945
+ * turn this into a contradictory follow-up beside it.
1946
+ */
1947
+ async function reportInteractionFailure(interaction) {
1948
+ if (interaction.responseState !== "deferred") return;
1949
+ if (interaction.hasSentFollowUp) return;
1950
+ try {
1951
+ await interaction.editDeferredPlaceholderIfUnanswered({
1952
+ content: INTERACTION_FAILURE_NOTICE,
1953
+ allowed_mentions: { parse: [] }
1954
+ });
1955
+ } catch {}
1956
+ }
1868
1957
  function resolveConditionalComponentOption(value, interaction) {
1869
1958
  return typeof value === "function" ? value(interaction) : value;
1870
1959
  }
@@ -2040,7 +2129,8 @@ function redactDiscordErrorBody(body, fieldKey = "", sensitiveAncestorKey, state
2040
2129
  return redacted;
2041
2130
  }
2042
2131
  function readDiscordCode(body) {
2043
- return parseStrictNonNegativeInteger(body && typeof body === "object" && "code" in body ? body.code : void 0);
2132
+ const value = body && typeof body === "object" && "code" in body ? body.code : void 0;
2133
+ return parseStrictNonNegativeInteger(value);
2044
2134
  }
2045
2135
  function readDiscordMessage(body, fallback) {
2046
2136
  const value = body && typeof body === "object" && "message" in body ? body.message : void 0;
@@ -2050,7 +2140,8 @@ function isUnknownDiscordVoiceStateError(err) {
2050
2140
  return (err && typeof err === "object" && "discordCode" in err ? parseStrictNonNegativeInteger(err.discordCode) : void 0) === DISCORD_UNKNOWN_VOICE_STATE || /unknown voice state/i.test(formatErrorMessage(err));
2051
2141
  }
2052
2142
  function readRetryAfter(body, response, fallbackSeconds = 0) {
2053
- return parseDiscordRetryAfterBodySeconds(body && typeof body === "object" && "retry_after" in body ? body.retry_after : void 0) ?? parseRetryAfterHeaderSeconds(response.headers.get("Retry-After")) ?? fallbackSeconds;
2143
+ const bodyValue = body && typeof body === "object" && "retry_after" in body ? body.retry_after : void 0;
2144
+ return parseDiscordRetryAfterBodySeconds(bodyValue) ?? parseRetryAfterHeaderSeconds(response.headers.get("Retry-After")) ?? fallbackSeconds;
2054
2145
  }
2055
2146
  function readDiscordRateLimitBucket(response) {
2056
2147
  const value = response.headers.get("X-RateLimit-Bucket")?.trim();
@@ -2062,7 +2153,8 @@ function readDiscordRateLimitScope(response) {
2062
2153
  }
2063
2154
  var DiscordError = class extends Error {
2064
2155
  constructor(response, body) {
2065
- const redactedMessage = redactSensitiveFieldValue("message", readDiscordMessage(body, `Discord API request failed (${response.status})`));
2156
+ const fallbackMessage = `Discord API request failed (${response.status})`;
2157
+ const redactedMessage = redactSensitiveFieldValue("message", readDiscordMessage(body, fallbackMessage));
2066
2158
  const redactedBody = redactDiscordErrorBody(body);
2067
2159
  super(redactedMessage);
2068
2160
  this.name = "DiscordError";
@@ -2135,7 +2227,7 @@ function appendQuery(path, query) {
2135
2227
  }
2136
2228
  //#endregion
2137
2229
  //#region extensions/discord/src/internal/rest-scheduler.ts
2138
- const INVALID_REQUEST_WINDOW_MS = 10 * 6e4;
2230
+ const INVALID_REQUEST_WINDOW_MS = 6e5;
2139
2231
  const requestPriorities = [
2140
2232
  "critical",
2141
2233
  "standard",
@@ -2524,7 +2616,7 @@ const defaultLaneOptions = {
2524
2616
  weight: 1
2525
2617
  }
2526
2618
  };
2527
- const DISCORD_REST_RESPONSE_BODY_MAX_BYTES = 8 * 1024 * 1024;
2619
+ const DISCORD_REST_RESPONSE_BODY_MAX_BYTES = 8388608;
2528
2620
  const GZIP_MAGIC = [31, 139];
2529
2621
  function createResponseBodyOverflowError(size) {
2530
2622
  return /* @__PURE__ */ new Error(`Discord REST response body exceeds ${DISCORD_REST_RESPONSE_BODY_MAX_BYTES} bytes (received ${size})`);
@@ -2774,6 +2866,9 @@ var Client = class {
2774
2866
  async fetchMember(guildId, userId) {
2775
2867
  return await this.entityCache.fetchMember(guildId, userId);
2776
2868
  }
2869
+ async fetchGuildEmojis(guildId, fetcher) {
2870
+ return await this.entityCache.fetchGuildEmojis(guildId, fetcher);
2871
+ }
2777
2872
  async deployCommands(options = {}) {
2778
2873
  return await this.commandDeployer.deploy(options);
2779
2874
  }
@@ -2998,6 +3093,56 @@ var discord_exports = /* @__PURE__ */ __exportAll({
2998
3093
  import * as import_discord_api_types_v10 from "discord-api-types/v10";
2999
3094
  __reExport(discord_exports, import_discord_api_types_v10);
3000
3095
  //#endregion
3096
+ //#region extensions/discord/src/target-parsing.ts
3097
+ function parseDiscordTarget(raw, options = {}) {
3098
+ const trimmed = raw.trim();
3099
+ if (!trimmed) return;
3100
+ const providerPrefixedTarget = parseDiscordProviderPrefixedTarget(trimmed);
3101
+ if (providerPrefixedTarget) return providerPrefixedTarget;
3102
+ const userTarget = parseMentionPrefixOrAtUserTarget({
3103
+ raw: trimmed,
3104
+ mentionPattern: /^<@!?(\d+)>$/,
3105
+ prefixes: [
3106
+ {
3107
+ prefix: "user:",
3108
+ kind: "user"
3109
+ },
3110
+ {
3111
+ prefix: "channel:",
3112
+ kind: "channel"
3113
+ },
3114
+ {
3115
+ prefix: "discord:",
3116
+ kind: "user"
3117
+ }
3118
+ ],
3119
+ atUserPattern: /^\d+$/,
3120
+ atUserErrorMessage: "Discord DMs require a user id (use user:<id> or a <@id> mention)"
3121
+ });
3122
+ if (userTarget) return userTarget;
3123
+ if (/^\d+$/.test(trimmed)) {
3124
+ if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
3125
+ throw new Error(options.ambiguousMessage ?? `Ambiguous Discord recipient "${trimmed}". For DMs use "user:${trimmed}" or "<@${trimmed}>"; for channels use "channel:${trimmed}".`);
3126
+ }
3127
+ return buildMessagingTarget("channel", trimmed, trimmed);
3128
+ }
3129
+ function parseDiscordProviderPrefixedTarget(raw) {
3130
+ const match = /^discord:(channel|user):(.+)$/i.exec(raw);
3131
+ if (!match) return;
3132
+ const kind = match[1]?.toLowerCase();
3133
+ const id = match[2]?.trim();
3134
+ if (!kind || !id) return;
3135
+ return buildMessagingTarget(kind, id, `${kind}:${id}`);
3136
+ }
3137
+ function resolveDiscordChannelId(raw) {
3138
+ const target = parseDiscordTarget(raw, { defaultKind: "channel" });
3139
+ return requireTargetKind({
3140
+ platform: "Discord",
3141
+ target,
3142
+ kind: "channel"
3143
+ });
3144
+ }
3145
+ //#endregion
3001
3146
  //#region extensions/discord/src/normalize.ts
3002
3147
  function normalizeDiscordMessagingTarget(raw) {
3003
3148
  return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
@@ -3032,8 +3177,9 @@ function normalizeDiscordOutboundTarget(to, allowFrom) {
3032
3177
  function allowFromContainsDiscordUserId(allowFrom, userId) {
3033
3178
  const normalizedUserId = userId.trim();
3034
3179
  if (!normalizedUserId) return false;
3180
+ const normalizedAllowFrom = (allowFrom ?? []).map(normalizeAllowFromDiscordUserId).filter((entry) => Boolean(entry));
3035
3181
  return resolveAllowlistMatchByCandidates({
3036
- allowList: (allowFrom ?? []).map(normalizeAllowFromDiscordUserId).filter((entry) => Boolean(entry)),
3182
+ allowList: normalizedAllowFrom,
3037
3183
  candidates: [{
3038
3184
  value: normalizedUserId,
3039
3185
  source: "id"
@@ -3079,6 +3225,80 @@ function resolveDiscordReplyMessageId(reply, isFirst) {
3079
3225
  return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
3080
3226
  }
3081
3227
  //#endregion
3228
+ //#region extensions/discord/src/send.receipt.ts
3229
+ function toDiscordOutboundDeliveryResult(result) {
3230
+ const { channelId, ...delivery } = result;
3231
+ return {
3232
+ ...delivery,
3233
+ target: {
3234
+ kind: "channel",
3235
+ id: channelId
3236
+ }
3237
+ };
3238
+ }
3239
+ function createDiscordSendReceiptFromResults(params) {
3240
+ const receipt = createMessageReceiptFromOutboundResults({
3241
+ results: attachChannelToResults("discord", params.results),
3242
+ threadId: params.threadId
3243
+ });
3244
+ return {
3245
+ ...receipt,
3246
+ parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
3247
+ platformMessageId,
3248
+ kind,
3249
+ index,
3250
+ threadId,
3251
+ replyToId,
3252
+ raw
3253
+ }))
3254
+ };
3255
+ }
3256
+ function createDiscordSendReceipt(params) {
3257
+ const results = params.platformMessageIds.map((messageId) => messageId.trim()).filter((messageId) => messageId && messageId !== "unknown").map((messageId, index) => {
3258
+ const result = {
3259
+ channel: "discord",
3260
+ messageId
3261
+ };
3262
+ if (params.channelId) result.channelId = params.channelId;
3263
+ if (params.reply?.scope === "first" && index === 0) {
3264
+ const rawResult = {
3265
+ channel: "discord",
3266
+ messageId
3267
+ };
3268
+ if (params.channelId) rawResult.channelId = params.channelId;
3269
+ result.receipt = createMessageReceiptFromOutboundResults({
3270
+ results: [rawResult],
3271
+ kind: params.kind,
3272
+ threadId: params.threadId,
3273
+ replyToId: params.reply.messageId
3274
+ });
3275
+ }
3276
+ return result;
3277
+ });
3278
+ return createMessageReceiptFromOutboundResults({
3279
+ results,
3280
+ kind: params.kind,
3281
+ threadId: params.threadId,
3282
+ replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
3283
+ });
3284
+ }
3285
+ function createDiscordSendResult(params) {
3286
+ const messageId = params.result.id || "unknown";
3287
+ const channelId = params.result.channel_id ?? params.fallbackChannelId;
3288
+ const receiptParams = {
3289
+ platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
3290
+ channelId,
3291
+ kind: params.kind
3292
+ };
3293
+ if (params.threadId != null) receiptParams.threadId = String(params.threadId);
3294
+ if (params.reply) receiptParams.reply = params.reply;
3295
+ return {
3296
+ messageId,
3297
+ channelId,
3298
+ receipt: createDiscordSendReceipt(receiptParams)
3299
+ };
3300
+ }
3301
+ //#endregion
3082
3302
  //#region extensions/discord/src/chunk.ts
3083
3303
  const DEFAULT_MAX_CHARS = 2e3;
3084
3304
  const DEFAULT_MAX_LINES = 17;
@@ -3175,7 +3395,8 @@ function chunkDiscordText(text, opts = {}) {
3175
3395
  const reopenPrefixLen = fenceToReserve ? reopenFenceLine(fenceToReserve, maxChars)?.length ?? 0 : 0;
3176
3396
  const prefixLen = current.length > 0 ? current.length + 1 : 0;
3177
3397
  const reopenBudget = reopenPrefixLen > 0 ? reopenPrefixLen + 1 : 0;
3178
- const segments = chunkTextForOutbound(originalLine, Math.max(1, charLimit - Math.max(prefixLen, reopenBudget)), { preserveWhitespace: wasInsideFence });
3398
+ const segmentLimit = Math.max(1, charLimit - Math.max(prefixLen, reopenBudget));
3399
+ const segments = chunkTextForOutbound(originalLine, segmentLimit, { preserveWhitespace: wasInsideFence });
3179
3400
  for (let segIndex = 0; segIndex < segments.length; segIndex++) {
3180
3401
  const segment = segments[segIndex];
3181
3402
  const isLineContinuation = segIndex > 0;
@@ -3316,7 +3537,8 @@ const DISCORD_TRANSIENT_MESSAGE_RE = /\b(?:bad gateway|fetch failed|network erro
3316
3537
  const ambiguousDiscordMessageCreates = /* @__PURE__ */ new WeakSet();
3317
3538
  function readDiscordErrorStatus(err) {
3318
3539
  if (!err || typeof err !== "object") return;
3319
- return parseStrictNonNegativeInteger("status" in err && err.status !== void 0 ? err.status : "statusCode" in err && err.statusCode !== void 0 ? err.statusCode : void 0);
3540
+ const raw = "status" in err && err.status !== void 0 ? err.status : "statusCode" in err && err.statusCode !== void 0 ? err.statusCode : void 0;
3541
+ return parseStrictNonNegativeInteger(raw);
3320
3542
  }
3321
3543
  function classifyDiscordDeliveryFailure(error) {
3322
3544
  const candidates = collectErrorGraphCandidates(error, (current) => [current.cause, current.error]);
@@ -3401,4 +3623,4 @@ function createDiscordRetryRunner(params) {
3401
3623
  };
3402
3624
  }
3403
3625
  //#endregion
3404
- export { MediaGallery as $, timeoutGuildMember as $t, RateLimitError as A, pinChannelMessage as At, hasDiscordV2Components as B, deleteChannelPermission as Bt, ThreadDeleteListener as C, editChannelMessage as Ct, Plugin as D, listChannelArchivedThreads as Dt, Client as E, getThreadMember as Et, Command as F, createGuildBan as Ft, Modal as G, listGuildChannels as Gt, Embed as H, getGuildMember as Ht, CommandWithSubcommands as I, createGuildChannel as It, Button as J, listGuildScheduledEvents as Jt, RadioGroup as K, listGuildEmojis as Kt, Guild as L, createGuildEmoji as Lt, readDiscordCode as M, sendChannelTyping as Mt, readDiscordMessage as N, unpinChannelMessage as Nt, RequestClient as O, listChannelMessages as Ot, readRetryAfter as P, addGuildMemberRole as Pt, LinkButton as Q, removeGuildMemberRole as Qt, Message as R, createGuildScheduledEvent as Rt, ResumedListener as S, editChannel as St, VoiceStateUpdateListener as T, getChannelMessage as Tt, CheckboxGroup as U, getGuildVoiceState as Ut, serializePayload as V, getGuild as Vt, Label as W, listGuildActiveThreads as Wt, Container as X, putChannelPermission as Xt, ChannelSelectMenu as Y, moveGuildChannels as Yt, File as Z, removeGuildMember as Zt, MessageCreateListener as _, listMessageReactionUsers as _t, chunkDiscordTextWithMode as a, StringSelectMenu as at, PresenceUpdateListener as b, deleteChannel as bt, resolveDiscordReplyReference as c, UserSelectMenu as ct, normalizeDiscordMessagingTarget as d, stripUndefinedFields as dt, __exportAll as en, MentionableSelectMenu as et, normalizeDiscordOutboundTarget as f, createChannelWebhook as ft, InteractionCreateListener as g, deleteOwnMessageReaction as gt, GuildDeleteListener as h, createOwnMessageReaction as ht, recordDiscordMessageCreateAmbiguity as i, Separator as it, isUnknownDiscordVoiceStateError as j, searchGuildMessages as jt, DiscordError as k, listChannelPins as kt, allowFromContainsDiscordUserId as l, BaseMessageInteractiveComponent as lt, GuildCreateListener as m, getCurrentUser as mt, createDiscordRetryRunner as n, Row as nt, createReusableDiscordReplyReference as o, TextDisplay as ot, discord_exports as p, createUserDmChannel as pt, TextInput as q, listGuildRoles as qt, hasDiscordMessageCreateAmbiguity as r, Section as rt, resolveDiscordReplyMessageId as s, Thumbnail as st, classifyDiscordDeliveryFailure as t, RoleSelectMenu as tt, looksLikeDiscordTargetId as u, parseCustomId as ut, MessageReactionAddListener as v, createChannelMessage as vt, ThreadUpdateListener as w, getChannel as wt, ReadyListener as x, deleteChannelMessage as xt, MessageReactionRemoveListener as y, createThread as yt, User as z, createGuildSticker as zt };
3626
+ export { TextInput as $, listGuildRoles as $t, ThreadUpdateListener as A, getChannel as At, readRetryAfter as B, addGuildMemberRole as Bt, MessageCreateListener as C, listMessageReactionUsers as Ct, ReadyListener as D, deleteChannelMessage as Dt, PresenceUpdateListener as E, deleteChannel as Et, DiscordError as F, listChannelPins as Ft, User as G, createGuildSticker as Gt, CommandWithSubcommands as H, createGuildChannel as Ht, RateLimitError as I, pinChannelMessage as It, Embed as J, getGuildMember as Jt, hasDiscordV2Components as K, deleteChannelPermission as Kt, isUnknownDiscordVoiceStateError as L, searchGuildMessages as Lt, Client as M, getThreadMember as Mt, Plugin as N, listChannelArchivedThreads as Nt, ResumedListener as O, editChannel as Ot, RequestClient as P, listChannelMessages as Pt, RadioGroup as Q, listGuildEmojis as Qt, readDiscordCode as R, sendChannelTyping as Rt, InteractionCreateListener as S, deleteOwnMessageReaction as St, MessageReactionRemoveListener as T, createThread as Tt, Guild as U, createGuildEmoji as Ut, Command as V, createGuildBan as Vt, Message as W, createGuildScheduledEvent as Wt, Label as X, listGuildActiveThreads as Xt, CheckboxGroup as Y, getGuildVoiceState as Yt, Modal as Z, listGuildChannels as Zt, parseDiscordTarget as _, stripUndefinedFields as _t, chunkDiscordTextWithMode as a, timeoutGuildMember as an, MediaGallery as at, GuildCreateListener as b, getCurrentUser as bt, createDiscordSendResult as c, Row as ct, resolveDiscordReplyMessageId as d, StringSelectMenu as dt, listGuildScheduledEvents as en, Button as et, resolveDiscordReplyReference as f, TextDisplay as ft, normalizeDiscordOutboundTarget as g, parseCustomId as gt, normalizeDiscordMessagingTarget as h, BaseMessageInteractiveComponent as ht, recordDiscordMessageCreateAmbiguity as i, removeGuildMemberRole as in, LinkButton as it, VoiceStateUpdateListener as j, getChannelMessage as jt, ThreadDeleteListener as k, editChannelMessage as kt, toDiscordOutboundDeliveryResult as l, Section as lt, looksLikeDiscordTargetId as m, UserSelectMenu as mt, createDiscordRetryRunner as n, putChannelPermission as nn, Container as nt, createDiscordSendReceipt as o, __exportAll as on, MentionableSelectMenu as ot, allowFromContainsDiscordUserId as p, Thumbnail as pt, serializePayload as q, getGuild as qt, hasDiscordMessageCreateAmbiguity as r, removeGuildMember as rn, File as rt, createDiscordSendReceiptFromResults as s, RoleSelectMenu as st, classifyDiscordDeliveryFailure as t, moveGuildChannels as tn, ChannelSelectMenu as tt, createReusableDiscordReplyReference as u, Separator as ut, resolveDiscordChannelId as v, createChannelWebhook as vt, MessageReactionAddListener as w, createChannelMessage as wt, GuildDeleteListener as x, createOwnMessageReaction as xt, discord_exports as y, createUserDmChannel as yt, readDiscordMessage as z, unpinChannelMessage as zt };
@@ -1,5 +1,5 @@
1
- import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-DNl-oCEw.js";
2
- import { B as resolveDiscordProxyFetchForAccount } from "./send.shared-B3fpaLWJ.js";
1
+ import { c as resolveDiscordAccount, g as selectDiscordActivitiesRuntimeConfig, n as isDiscordAccountEnabledForRuntime, r as listDiscordAccountIds } from "./accounts-CwJQoLjM.js";
2
+ import { z as resolveDiscordProxyFetchForAccount } from "./send.shared-BJHt0Vyf.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/discord/src/activities/config.ts
5
5
  function resolveDiscordActivitiesConfig(account, env = process.env) {