@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.
- package/dist/account-inspect-BY-ve3yH.js +45 -0
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-DNl-oCEw.js → accounts-CwJQoLjM.js} +87 -162
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-KCBAmWxD.js → activities-api-CkKcHUB6.js} +14 -12
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-BDMimASD.js → allow-list-C2JuH-R0.js} +10 -6
- package/dist/{api-DNVbJyEy.js → api-BfmEP6wp.js} +6 -5
- package/dist/api.js +18 -18
- package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-DZM6Kt1Z.js} +30 -106
- package/dist/{audit-Yc7eZDd6.js → audit-DIbQA4VT.js} +8 -7
- package/dist/{channel-cXYzGc4L.js → channel-CarzU3bg.js} +25 -25
- package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-B2wMqeVK.js} +60 -57
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/channel-type-CVLZyGYS.js +7 -0
- package/dist/{channel.setup-CSiwnMgs.js → channel.setup-z_ewMVa9.js} +18 -18
- package/dist/{components-ezGKo_Yh.js → components-gvRA0oaI.js} +33 -29
- package/dist/{config-schema-DC5kDtQ5.js → config-schema-B797-Spt.js} +21 -14
- package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DPpBRpYI.js} +1 -1
- package/dist/{directory-config-XyCfoqLg.js → directory-config-AA8wQx0D.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Df0NbFJB.js → directory-live-D_kFz_Fj.js} +4 -4
- package/dist/{doctor-DYY31GrO.js → doctor-QQTOkBfW.js} +5 -5
- package/dist/{doctor-contract-DsWvKIXF.js → doctor-contract-Co5vRCZ6.js} +9 -6
- package/dist/doctor-contract-api.js +4 -3
- package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-Cc88ZGon.js} +9 -5
- package/dist/index.js +1 -1
- package/dist/ingress-identity-BCzfPPYM.js +60 -0
- package/dist/{message-handler-B61q5MOF.js → message-handler-CAeEpqWo.js} +14 -10
- package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-CoKoE3dY.js} +32 -91
- package/dist/{message-handler.process--4_712Ec.js → message-handler.process-cdIJ_fDT.js} +99 -123
- package/dist/{message-utils-BXLLnFl6.js → message-text-C0K4-fkg.js} +41 -34
- package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-Ch0At5Ra.js} +85 -78
- package/dist/{outbound-components-B2PL0ooH.js → outbound-components-Bnt_7x7r.js} +5 -4
- package/dist/outbound-session-route-CzzerX2K.js +668 -0
- package/dist/{owner-access-Bg41VzAf.js → owner-access-yc1sX7Gx.js} +7 -6
- package/dist/{pluralkit-dUl4v1X3.js → pluralkit-B3cUVI7i.js} +2 -2
- package/dist/{probe-BTdtVRwU.js → probe-3ovFAp3b.js} +3 -3
- package/dist/{probe.runtime-Dq5-PRKT.js → probe.runtime-BckHn3cJ.js} +1 -1
- package/dist/{provider-DlK_ynqt.js → provider-CjI8BSzS.js} +511 -342
- package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-DdKRMcE9.js} +3 -3
- package/dist/provider.runtime-Bo1WbLLr.js +2 -0
- package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-37IC-p5K.js} +110 -126
- package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BJ5UZNNT.js} +3 -3
- package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-BexR2eUn.js} +6 -5
- package/dist/{resolve-users-BtKxLUZv.js → resolve-users-BtXBCH5W.js} +5 -4
- package/dist/{retry-after-DdLPmPoa.js → retry-after-BrLjLUJi.js} +2 -1
- package/dist/{retry-DNsVTeTo.js → retry-t5RcEsPk.js} +237 -15
- package/dist/{runtime-CQovMsH3.js → runtime-BNlDfLwS.js} +2 -2
- package/dist/{runtime-D71_VFLr.js → runtime-DydyfxST.js} +182 -131
- package/dist/runtime-api.js +19 -26
- package/dist/{secret-config-contract-B3i6WxV5.js → secret-config-contract-DFu9hfU8.js} +14 -6
- package/dist/secret-contract-api.js +1 -1
- package/dist/{security-audit-BfJhAXZp.js → security-audit-DKfK-iPY.js} +10 -11
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-BVKF9VtY.js → security-audit.runtime-sKZyKgpx.js} +1 -1
- package/dist/{send-rQIffSYu.js → send-mTKSBdmZ.js} +149 -58
- package/dist/{send.components-ChK1wS7w.js → send.components-nsPnc7kK.js} +29 -30
- package/dist/{send.outbound-HIkgji_7.js → send.outbound-CaOs9Zy1.js} +87 -84
- package/dist/{send.shared-B3fpaLWJ.js → send.shared-BJHt0Vyf.js} +55 -33
- package/dist/{sender-identity-BJtfyise.js → sender-identity-Dt0imZyY.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-CaAaoksy.js → shared-BNesVA4P.js} +43 -18
- package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-IeZVPLGj.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -6
- package/dist/{system-events-Nuwoq_au.js → system-events-Be5EJI3b.js} +2 -2
- package/dist/{target-resolver-DIXShHaZ.js → target-resolver-C0MnwEki.js} +6 -5
- package/dist/targets-DQSye1Rv.js +3 -0
- package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-wECUSIIG.js} +6 -6
- package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-B-3UHCc1.js} +31 -32
- package/dist/{thread-bindings.session-updates-CJb-BpPL.js → thread-bindings.session-updates-CC7HoQvt.js} +2 -1
- package/dist/{threading-DU6pgeGm.js → threading-te5ADPQI.js} +51 -27
- package/dist/{timeouts-B9cy6RvQ.js → timeouts-D86uWLt_.js} +1 -1
- package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-DkUhR7YK.js} +9 -4
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-oLiS5Z13.js → typing-DAwJF5VT.js} +2 -2
- package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-COyYYTDD.js} +418 -74
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/README.md +1 -1
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/conforms.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/package.json +3 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubArray.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubObject.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/@types/lodash/stubString.d.ts +2 -0
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/README.md +19 -19
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v1.js +7 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist/v7.js +5 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v1.js +7 -3
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/dist-node/v7.js +5 -2
- package/node_modules/@discord/embedded-app-sdk/node_modules/uuid/package.json +4 -3
- package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@discordjs/voice/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@discordjs/voice/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/discord-api-types/CHANGELOG.md +8 -0
- package/node_modules/discord-api-types/package.json +4 -4
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts +2 -2
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v10/message.js +1 -0
- package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts +2 -2
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts +4 -1
- package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -1
- package/node_modules/discord-api-types/payloads/v9/message.js +1 -0
- package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -1
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/node_modules/undici/docs/docs/api/Client.md +21 -8
- package/node_modules/undici/lib/api/readable.js +33 -43
- package/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +3 -3
- package/node_modules/undici/lib/dispatcher/client-h2.js +179 -10
- package/node_modules/undici/lib/dispatcher/client.js +74 -29
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +28 -6
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +15 -1
- package/node_modules/undici/lib/handler/retry-handler.js +7 -2
- package/node_modules/undici/lib/interceptor/cache.js +5 -2
- package/node_modules/undici/lib/interceptor/deduplicate.js +1 -1
- package/node_modules/undici/lib/mock/mock-utils.js +213 -24
- package/node_modules/undici/lib/util/cache.js +2 -4
- package/node_modules/undici/lib/web/websocket/websocket.js +22 -0
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +40 -0
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +14 -6
- package/package.json +8 -8
- package/skills/discord/SKILL.md +1 -1
- package/dist/account-inspect-D5xmUpnj.js +0 -89
- package/dist/approval-message-safety-XGFPbDoI.js +0 -226
- package/dist/audit-core-BCX8UeFH.js +0 -105
- package/dist/channel-actions-Dr2QI8Bf.js +0 -212
- package/dist/inbound-event-delivery-De2qxTrP.js +0 -39
- package/dist/provider.runtime-CzKGRiAF.js +0 -2
- package/dist/runtime-api.actions.js +0 -3
- package/dist/runtime-api.lookup.js +0 -7
- package/dist/runtime-api.monitor-CzeTYF32.js +0 -6
- package/dist/runtime-api.monitor.js +0 -9
- package/dist/runtime-api.send.js +0 -7
- package/dist/runtime-api.threads.js +0 -5
- package/dist/sdk-runtime-37OU6_Yh.js +0 -369
- package/dist/send.reactions-gmJ6yFPo.js +0 -78
- package/dist/send.receipt-Cnhoautb.js +0 -76
- package/dist/subagent-progress-FPLqBY1s.js +0 -110
- package/dist/targets-B2pf49zc.js +0 -3
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-CoKoE3dY.js}
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as resolveDefaultDiscordAccountId } from "./accounts-
|
|
3
|
-
import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, i as normalizeDiscordDisplaySlug,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { W as Message, jt as getChannelMessage, y as discord_exports } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
|
|
3
|
+
import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, i as normalizeDiscordDisplaySlug, p as resolveDiscordMemberAccessState, x as formatDiscordUserTag } from "./allow-list-C2JuH-R0.js";
|
|
4
|
+
import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
|
|
5
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
|
|
6
|
+
import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-CzzerX2K.js";
|
|
7
|
+
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DPpBRpYI.js";
|
|
8
|
+
import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-B-3UHCc1.js";
|
|
9
|
+
import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-CjI8BSzS.js";
|
|
10
|
+
import { d as resolveDiscordReferencedReplyMessage, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, m as resolveDiscordChannelInfo, o as resolveForwardedMediaList, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-C0K4-fkg.js";
|
|
11
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-Dt0imZyY.js";
|
|
11
12
|
import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
12
13
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
13
14
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
@@ -28,7 +29,7 @@ import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
|
28
29
|
import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
29
30
|
//#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
|
|
30
31
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
31
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
32
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-mTKSBdmZ.js").then((n) => n.t));
|
|
32
33
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
33
34
|
return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
|
|
34
35
|
}
|
|
@@ -53,7 +54,9 @@ async function resolveDiscordDmPreflightAccess(params) {
|
|
|
53
54
|
sender: {
|
|
54
55
|
id: params.sender.id,
|
|
55
56
|
name: params.sender.name,
|
|
56
|
-
tag: params.sender.tag
|
|
57
|
+
tag: params.sender.tag,
|
|
58
|
+
isPluralKit: params.sender.isPluralKit,
|
|
59
|
+
authorKind: params.author.bot ? "bot" : "user"
|
|
57
60
|
},
|
|
58
61
|
allowNameMatching: params.allowNameMatching,
|
|
59
62
|
cfg: params.preflight.cfg,
|
|
@@ -267,72 +270,6 @@ async function hydrateDiscordMessageIfNeeded(params) {
|
|
|
267
270
|
};
|
|
268
271
|
}
|
|
269
272
|
//#endregion
|
|
270
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-channel-access.ts
|
|
271
|
-
function resolveDiscordPreflightChannelAccess(params) {
|
|
272
|
-
if (params.isGuildMessage && params.channelConfig?.enabled === false) {
|
|
273
|
-
logDebug(`[discord-preflight] drop: channel disabled`);
|
|
274
|
-
logVerbose(`Blocked discord channel ${params.messageChannelId} (channel disabled, ${params.channelMatchMeta})`);
|
|
275
|
-
return {
|
|
276
|
-
allowed: false,
|
|
277
|
-
channelAllowlistConfigured: false,
|
|
278
|
-
channelAllowed: false
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
const groupDmAllowed = params.isGroupDm && resolveGroupDmAllow({
|
|
282
|
-
channels: params.groupDmChannels,
|
|
283
|
-
channelId: params.messageChannelId,
|
|
284
|
-
channelName: params.displayChannelName,
|
|
285
|
-
channelSlug: params.displayChannelSlug
|
|
286
|
-
});
|
|
287
|
-
if (params.isGroupDm && !groupDmAllowed) return {
|
|
288
|
-
allowed: false,
|
|
289
|
-
channelAllowlistConfigured: false,
|
|
290
|
-
channelAllowed: false
|
|
291
|
-
};
|
|
292
|
-
const channelAllowlistConfigured = Boolean(params.guildInfo?.channels) && Object.keys(params.guildInfo?.channels ?? {}).length > 0;
|
|
293
|
-
const channelAllowed = params.channelConfig?.allowed !== false;
|
|
294
|
-
if (params.isGuildMessage && !isDiscordGroupAllowedByPolicy({
|
|
295
|
-
groupPolicy: params.groupPolicy,
|
|
296
|
-
guildAllowlisted: Boolean(params.guildInfo),
|
|
297
|
-
channelAllowlistConfigured,
|
|
298
|
-
channelAllowed
|
|
299
|
-
})) {
|
|
300
|
-
if (params.groupPolicy === "disabled") {
|
|
301
|
-
logDebug(`[discord-preflight] drop: groupPolicy disabled`);
|
|
302
|
-
logVerbose(`discord: drop guild message (groupPolicy: disabled, ${params.channelMatchMeta})`);
|
|
303
|
-
} else if (!channelAllowlistConfigured) {
|
|
304
|
-
logDebug(`[discord-preflight] drop: groupPolicy allowlist, no channel allowlist configured`);
|
|
305
|
-
logVerbose(`discord: drop guild message (groupPolicy: allowlist, no channel allowlist, ${params.channelMatchMeta})`);
|
|
306
|
-
} else {
|
|
307
|
-
logDebug(`[discord] Ignored message from channel ${params.messageChannelId} (not in guild allowlist). Add to guilds.<guildId>.channels to enable.`);
|
|
308
|
-
logVerbose(`Blocked discord channel ${params.messageChannelId} not in guild channel allowlist (groupPolicy: allowlist, ${params.channelMatchMeta})`);
|
|
309
|
-
}
|
|
310
|
-
return {
|
|
311
|
-
allowed: false,
|
|
312
|
-
channelAllowlistConfigured,
|
|
313
|
-
channelAllowed
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
if (params.isGuildMessage && params.channelConfig?.allowed === false) {
|
|
317
|
-
logDebug(`[discord-preflight] drop: channelConfig.allowed===false`);
|
|
318
|
-
logVerbose(`Blocked discord channel ${params.messageChannelId} not in guild channel allowlist (${params.channelMatchMeta})`);
|
|
319
|
-
return {
|
|
320
|
-
allowed: false,
|
|
321
|
-
channelAllowlistConfigured,
|
|
322
|
-
channelAllowed
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
if (params.isGuildMessage) {
|
|
326
|
-
logDebug(`[discord-preflight] pass: channel allowed`);
|
|
327
|
-
logVerbose(`discord: allow channel ${params.messageChannelId} (${params.channelMatchMeta})`);
|
|
328
|
-
}
|
|
329
|
-
return {
|
|
330
|
-
allowed: true,
|
|
331
|
-
channelAllowlistConfigured,
|
|
332
|
-
channelAllowed
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
//#endregion
|
|
336
273
|
//#region extensions/discord/src/monitor/message-handler.preflight-channel-context.ts
|
|
337
274
|
function resolveDiscordPreflightChannelContext(params) {
|
|
338
275
|
const threadName = params.threadChannel?.name;
|
|
@@ -401,9 +338,6 @@ function isBoundThreadBotSystemMessage(params) {
|
|
|
401
338
|
if (!text) return false;
|
|
402
339
|
return DISCORD_BOUND_THREAD_SYSTEM_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
403
340
|
}
|
|
404
|
-
function isDiscordThreadChannelType(type) {
|
|
405
|
-
return type === discord_exports.ChannelType.PublicThread || type === discord_exports.ChannelType.PrivateThread || type === discord_exports.ChannelType.AnnouncementThread;
|
|
406
|
-
}
|
|
407
341
|
function isDiscordThreadChannelMessage(params) {
|
|
408
342
|
if (!params.isGuildMessage) return false;
|
|
409
343
|
const channel = "channel" in params.message ? params.message.channel : void 0;
|
|
@@ -481,7 +415,8 @@ function buildDiscordPreflightHistoryEntry(params) {
|
|
|
481
415
|
//#region extensions/discord/src/monitor/message-handler.preflight-logging.ts
|
|
482
416
|
function logDiscordPreflightChannelConfig(params) {
|
|
483
417
|
if (!shouldLogVerbose()) return;
|
|
484
|
-
|
|
418
|
+
const channelConfigSummary = params.channelConfig ? `allowed=${params.channelConfig.allowed} enabled=${params.channelConfig.enabled ?? "unset"} requireMention=${params.channelConfig.requireMention ?? "unset"} ignoreOtherMentions=${params.channelConfig.ignoreOtherMentions ?? "unset"} matchKey=${params.channelConfig.matchKey ?? "none"} matchSource=${params.channelConfig.matchSource ?? "none"} users=${params.channelConfig.users?.length ?? 0} roles=${params.channelConfig.roles?.length ?? 0} skills=${params.channelConfig.skills?.length ?? 0}` : "none";
|
|
419
|
+
logDebug(`[discord-preflight] channelConfig=${channelConfigSummary} channelMatchMeta=${params.channelMatchMeta} channelId=${params.channelId}`);
|
|
485
420
|
}
|
|
486
421
|
function logDiscordPreflightInboundSummary(params) {
|
|
487
422
|
if (!shouldLogVerbose()) return;
|
|
@@ -489,10 +424,10 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
489
424
|
}
|
|
490
425
|
//#endregion
|
|
491
426
|
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
492
|
-
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-
|
|
427
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-B3cUVI7i.js").then((n) => n.n));
|
|
493
428
|
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.js"));
|
|
494
|
-
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-
|
|
495
|
-
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-
|
|
429
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-Be5EJI3b.js"));
|
|
430
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-te5ADPQI.js").then((n) => n.t));
|
|
496
431
|
function isPreflightAborted(abortSignal) {
|
|
497
432
|
return Boolean(abortSignal?.aborted);
|
|
498
433
|
}
|
|
@@ -592,7 +527,7 @@ async function resolveDiscordPreflightRoute(params) {
|
|
|
592
527
|
//#endregion
|
|
593
528
|
//#region extensions/discord/src/monitor/message-handler.preflight.ts
|
|
594
529
|
const DISCORD_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
595
|
-
const DISCORD_HISTORY_MEDIA_MAX_BYTES =
|
|
530
|
+
const DISCORD_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
596
531
|
const DISCORD_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
597
532
|
const DISCORD_HISTORY_MEDIA_TOTAL_TIMEOUT_MS = 3e3;
|
|
598
533
|
function resolveDiscordPreflightConversationKind(params) {
|
|
@@ -707,7 +642,7 @@ async function preflightDiscordMessage(params) {
|
|
|
707
642
|
channelType: channelInfo?.type
|
|
708
643
|
});
|
|
709
644
|
const messageText = resolveDiscordMessageText(message, { includeForwarded: true });
|
|
710
|
-
const injectedBoundThreadBinding = !isDirectMessage && !isGroupDm ? resolveInjectedBoundThreadLookupRecord({
|
|
645
|
+
const injectedBoundThreadBinding = !isDirectMessage && !isGroupDm && (webhookId || author.bot) ? resolveInjectedBoundThreadLookupRecord({
|
|
711
646
|
threadBindings: params.threadBindings,
|
|
712
647
|
threadId: messageChannelId
|
|
713
648
|
}) : void 0;
|
|
@@ -967,7 +902,9 @@ async function preflightDiscordMessage(params) {
|
|
|
967
902
|
sender: {
|
|
968
903
|
id: sender.id,
|
|
969
904
|
name: sender.name,
|
|
970
|
-
tag: sender.tag
|
|
905
|
+
tag: sender.tag,
|
|
906
|
+
isPluralKit: sender.isPluralKit,
|
|
907
|
+
authorKind: author.bot ? "bot" : "user"
|
|
971
908
|
},
|
|
972
909
|
memberAccessConfigured: hasAccessRestrictions,
|
|
973
910
|
memberAllowed,
|
|
@@ -1046,9 +983,13 @@ async function preflightDiscordMessage(params) {
|
|
|
1046
983
|
}
|
|
1047
984
|
}
|
|
1048
985
|
const ignoreOtherMentions = channelConfig?.ignoreOtherMentions ?? guildInfo?.ignoreOtherMentions ?? false;
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
986
|
+
const referencedReply = resolveDiscordReferencedReplyMessage(message);
|
|
987
|
+
const referencedWebhookId = referencedReply ? resolveDiscordWebhookId(referencedReply) : null;
|
|
988
|
+
const referencedAuthor = referencedReply?.author;
|
|
989
|
+
const replyTargetsOtherBot = Boolean(botId) && Boolean(referencedAuthor?.bot) && referencedAuthor?.id !== botId && !referencedWebhookId;
|
|
990
|
+
if (isGuildMessage && ignoreOtherMentions && (hasUserOrRoleMention || replyTargetsOtherBot) && !wasMentioned && !mentionDecision.implicitMention) {
|
|
991
|
+
logDebug(`[discord-preflight] drop: addressed-to-other`);
|
|
992
|
+
logVerbose(`discord: drop guild message (addressed to another identity, ignoreOtherMentions=true, botId=${botId})`);
|
|
1052
993
|
await recordDiscordPendingHistoryEntry({
|
|
1053
994
|
preflight: params,
|
|
1054
995
|
historyKey: messageChannelId,
|
|
@@ -1,33 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { C as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-
|
|
4
|
-
import {
|
|
5
|
-
import { i as discordTextHasBroadcastMention } from "./send.outbound-
|
|
6
|
-
import {
|
|
7
|
-
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
8
|
-
import
|
|
9
|
-
import "./
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { a as
|
|
14
|
-
import {
|
|
15
|
-
import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-DU6pgeGm.js";
|
|
16
|
-
import { n as resolveDiscordWebhookId } from "./sender-identity-BJtfyise.js";
|
|
1
|
+
import { Dt as deleteChannelMessage, a as chunkDiscordTextWithMode, kt as editChannelMessage, v as resolveDiscordChannelId, wt as createChannelMessage, y as discord_exports } from "./retry-t5RcEsPk.js";
|
|
2
|
+
import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
|
|
3
|
+
import { C as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-C2JuH-R0.js";
|
|
4
|
+
import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-BJHt0Vyf.js";
|
|
5
|
+
import { i as discordTextHasBroadcastMention } from "./send.outbound-CaOs9Zy1.js";
|
|
6
|
+
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-mTKSBdmZ.js";
|
|
7
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
|
|
8
|
+
import "./targets-DQSye1Rv.js";
|
|
9
|
+
import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-CzzerX2K.js";
|
|
10
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-Ch0At5Ra.js";
|
|
11
|
+
import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-CjI8BSzS.js";
|
|
12
|
+
import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-C0K4-fkg.js";
|
|
13
|
+
import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-te5ADPQI.js";
|
|
14
|
+
import { n as resolveDiscordWebhookId } from "./sender-identity-Dt0imZyY.js";
|
|
17
15
|
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.js";
|
|
18
16
|
import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
19
|
-
import { t as sendTyping } from "./typing-
|
|
17
|
+
import { t as sendTyping } from "./typing-DAwJF5VT.js";
|
|
20
18
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
21
19
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
22
20
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
21
|
+
import { getReplyPayloadTtsSupplement, isReplyPayloadNonTerminalToolErrorWarning, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
23
22
|
import { danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
24
23
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
25
24
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
26
25
|
import { resolveChunkMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
27
26
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
28
|
-
import { bindIngressLifecycleToReplyOptions,
|
|
27
|
+
import { bindIngressLifecycleToReplyOptions, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createFinalizableDraftStreamControlsForState, createTypingCallbacks, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelDraftStreamingChunking, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelPreviewStreamMode, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewCommandText, resolveChannelStreamingProgressNarration, resolveTranscriptBackedChannelFinalText } from "openclaw/plugin-sdk/channel-outbound";
|
|
29
28
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
30
|
-
import { getReplyPayloadTtsSupplement, isReplyPayloadNonTerminalToolErrorWarning, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
31
29
|
import { evaluateSupplementalContextVisibility } from "openclaw/plugin-sdk/security-runtime";
|
|
32
30
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
|
|
33
31
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
@@ -39,7 +37,7 @@ import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
|
39
37
|
import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
40
38
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
41
39
|
import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
42
|
-
import {
|
|
40
|
+
import { createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
43
41
|
import { readLatestAssistantTextByIdentity } from "openclaw/plugin-sdk/session-transcript-runtime";
|
|
44
42
|
//#region extensions/discord/src/monitor/message-handler.retry.ts
|
|
45
43
|
const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /^reply session initialization conflicted for \S+$/u;
|
|
@@ -118,10 +116,11 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
118
116
|
channel: "discord",
|
|
119
117
|
accountId
|
|
120
118
|
});
|
|
119
|
+
const allowNameMatching = isDangerousNameMatchingEnabled(discordConfig);
|
|
121
120
|
const isSupplementalContextSenderAllowed = createDiscordSupplementalContextAccessChecker({
|
|
122
121
|
channelConfig,
|
|
123
122
|
guildInfo,
|
|
124
|
-
allowNameMatching
|
|
123
|
+
allowNameMatching,
|
|
125
124
|
isGuild: isGuildMessage
|
|
126
125
|
});
|
|
127
126
|
const storePath = resolveStorePath(cfg.session?.store, { agentId: route.agentId });
|
|
@@ -199,21 +198,24 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
199
198
|
const starter = await resolveDiscordThreadStarter({
|
|
200
199
|
channel: threadChannel,
|
|
201
200
|
client,
|
|
201
|
+
accountId,
|
|
202
202
|
parentId: threadParentId,
|
|
203
203
|
parentType: threadParentType,
|
|
204
204
|
resolveTimestampMs
|
|
205
205
|
});
|
|
206
|
-
if (starter?.text)
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
206
|
+
if (starter?.text) {
|
|
207
|
+
if (evaluateSupplementalContextVisibility({
|
|
208
|
+
mode: contextVisibilityMode,
|
|
209
|
+
kind: "thread",
|
|
210
|
+
senderAllowed: isSupplementalContextSenderAllowed({
|
|
211
|
+
id: starter.authorId,
|
|
212
|
+
name: starter.authorName ?? starter.author,
|
|
213
|
+
tag: starter.authorTag,
|
|
214
|
+
memberRoleIds: starter.memberRoleIds
|
|
215
|
+
})
|
|
216
|
+
}).include) threadStarterBody = starter.text;
|
|
217
|
+
else logVerbose(`discord: drop thread starter context (mode=${contextVisibilityMode})`);
|
|
218
|
+
}
|
|
217
219
|
}
|
|
218
220
|
const parentName = threadParentName ?? "parent";
|
|
219
221
|
threadLabel = threadName ? `Discord thread #${normalizeDiscordSlug(parentName)} › ${threadName}` : `Discord thread #${normalizeDiscordSlug(parentName)}`;
|
|
@@ -651,15 +653,13 @@ function createDiscordMessageReactionRuntime(params) {
|
|
|
651
653
|
messageId: message.id,
|
|
652
654
|
reactionContext: ackReactionContext
|
|
653
655
|
});
|
|
654
|
-
const statusReactionTiming = DEFAULT_TIMING;
|
|
655
656
|
let statusReactionTarget = `${messageChannelId}/${message.id}`;
|
|
656
657
|
let statusReactionsActive = statusReactionsEnabled;
|
|
657
658
|
let statusReactions = createStatusReactionController({
|
|
658
659
|
enabled: statusReactionsEnabled,
|
|
659
660
|
adapter: discordAdapter,
|
|
660
661
|
initialEmoji: ackReaction,
|
|
661
|
-
|
|
662
|
-
timing: statusReactionTiming,
|
|
662
|
+
presentation: "acknowledgement",
|
|
663
663
|
onError: (err) => {
|
|
664
664
|
logAckFailure({
|
|
665
665
|
log: logVerbose,
|
|
@@ -712,8 +712,7 @@ function createDiscordMessageReactionRuntime(params) {
|
|
|
712
712
|
reactionContext: ackReactionContext
|
|
713
713
|
}),
|
|
714
714
|
initialEmoji: emoji,
|
|
715
|
-
|
|
716
|
-
timing: statusReactionTiming,
|
|
715
|
+
presentation: "acknowledgement",
|
|
717
716
|
onError: (err) => {
|
|
718
717
|
logAckFailure({
|
|
719
718
|
log: logVerbose,
|
|
@@ -792,7 +791,7 @@ function createDiscordDraftStream(params) {
|
|
|
792
791
|
let streamGeneration = 0;
|
|
793
792
|
let activeCreateGeneration;
|
|
794
793
|
let discardActiveCreate = false;
|
|
795
|
-
let
|
|
794
|
+
let pendingCleanupMessages = [];
|
|
796
795
|
const sendOrEditStreamMessage = async (text) => {
|
|
797
796
|
const generation = streamGeneration;
|
|
798
797
|
if (streamState.stopped && !streamState.final) return false;
|
|
@@ -833,11 +832,11 @@ function createDiscordDraftStream(params) {
|
|
|
833
832
|
activeCreateGeneration = void 0;
|
|
834
833
|
discardActiveCreate = false;
|
|
835
834
|
if (generation !== streamGeneration) {
|
|
836
|
-
if (shouldDiscardStaleCreate && typeof sentMessageId === "string" && sentMessageId)
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}
|
|
835
|
+
if (shouldDiscardStaleCreate && typeof sentMessageId === "string" && sentMessageId) await deleteCleanupMessage({
|
|
836
|
+
channelId,
|
|
837
|
+
messageId: sentMessageId,
|
|
838
|
+
warnPrefix: "discord stale stream preview cleanup failed"
|
|
839
|
+
});
|
|
841
840
|
return true;
|
|
842
841
|
}
|
|
843
842
|
if (typeof sentMessageId !== "string" || !sentMessageId) {
|
|
@@ -858,24 +857,11 @@ function createDiscordDraftStream(params) {
|
|
|
858
857
|
return false;
|
|
859
858
|
}
|
|
860
859
|
};
|
|
861
|
-
const
|
|
862
|
-
const clearMessageId = () => {
|
|
863
|
-
streamMessageId = void 0;
|
|
864
|
-
};
|
|
865
|
-
const isValidStreamMessageId = (value) => typeof value === "string";
|
|
866
|
-
const deleteStreamMessage = async (messageId) => {
|
|
867
|
-
await deleteChannelMessage(rest, channelId, messageId);
|
|
868
|
-
};
|
|
869
|
-
const { loop, update, stop, clear, discardPending, seal } = createFinalizableDraftLifecycle({
|
|
860
|
+
const { loop, update, stop, discardPending, seal } = createFinalizableDraftStreamControlsForState({
|
|
870
861
|
throttleMs,
|
|
862
|
+
coalesceInFlight: true,
|
|
871
863
|
state: streamState,
|
|
872
|
-
sendOrEditStreamMessage
|
|
873
|
-
readMessageId,
|
|
874
|
-
clearMessageId,
|
|
875
|
-
isValidMessageId: isValidStreamMessageId,
|
|
876
|
-
deleteMessage: deleteStreamMessage,
|
|
877
|
-
warn: params.warn,
|
|
878
|
-
warnPrefix: "discord stream preview cleanup failed"
|
|
864
|
+
sendOrEditStreamMessage
|
|
879
865
|
});
|
|
880
866
|
const forceNewMessage = (mode = "preserve") => {
|
|
881
867
|
if (mode === "discard" && activeCreateGeneration !== void 0) discardActiveCreate = true;
|
|
@@ -887,16 +873,19 @@ function createDiscordDraftStream(params) {
|
|
|
887
873
|
loop.resetPending();
|
|
888
874
|
loop.resetThrottleWindow();
|
|
889
875
|
};
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
for (const stale of pending) try {
|
|
894
|
-
await deleteChannelMessage(rest, stale.channelId, stale.messageId);
|
|
876
|
+
const deleteCleanupMessage = async (message) => {
|
|
877
|
+
try {
|
|
878
|
+
await deleteChannelMessage(rest, message.channelId, message.messageId);
|
|
895
879
|
} catch (err) {
|
|
896
|
-
|
|
897
|
-
params.warn?.(
|
|
880
|
+
pendingCleanupMessages.push(message);
|
|
881
|
+
params.warn?.(`${message.warnPrefix}: ${formatErrorMessage(err)}`);
|
|
898
882
|
}
|
|
899
883
|
};
|
|
884
|
+
const cleanupPendingMessages = async () => {
|
|
885
|
+
const pending = pendingCleanupMessages;
|
|
886
|
+
pendingCleanupMessages = [];
|
|
887
|
+
for (const message of pending) await deleteCleanupMessage(message);
|
|
888
|
+
};
|
|
900
889
|
const retarget = async (nextChannelId) => {
|
|
901
890
|
const normalized = nextChannelId.trim();
|
|
902
891
|
if (!normalized || normalized === channelId) return;
|
|
@@ -919,33 +908,33 @@ function createDiscordDraftStream(params) {
|
|
|
919
908
|
if (previousMessageId) {
|
|
920
909
|
const stale = {
|
|
921
910
|
channelId: previousChannelId,
|
|
922
|
-
messageId: previousMessageId
|
|
911
|
+
messageId: previousMessageId,
|
|
912
|
+
warnPrefix: "discord stream preview retarget cleanup failed"
|
|
923
913
|
};
|
|
924
914
|
if (!streamMessageId) {
|
|
925
|
-
|
|
915
|
+
pendingCleanupMessages.push(stale);
|
|
926
916
|
throw new Error("discord stream preview retarget replacement failed");
|
|
927
917
|
}
|
|
928
|
-
|
|
929
|
-
await deleteChannelMessage(rest, previousChannelId, previousMessageId);
|
|
930
|
-
} catch (err) {
|
|
931
|
-
retargetedCleanup.push(stale);
|
|
932
|
-
params.warn?.(`discord stream preview retarget cleanup failed: ${formatErrorMessage(err)}`);
|
|
933
|
-
}
|
|
918
|
+
await deleteCleanupMessage(stale);
|
|
934
919
|
}
|
|
935
920
|
};
|
|
936
921
|
const deleteCurrentMessage = async () => {
|
|
937
922
|
loop.resetPending();
|
|
938
923
|
await loop.waitForInFlight();
|
|
939
|
-
const
|
|
924
|
+
const currentMessage = streamMessageId ? {
|
|
925
|
+
channelId,
|
|
926
|
+
messageId: streamMessageId,
|
|
927
|
+
warnPrefix: "discord stream preview cleanup failed"
|
|
928
|
+
} : void 0;
|
|
940
929
|
streamMessageId = void 0;
|
|
941
930
|
lastSentText = "";
|
|
942
931
|
loop.resetThrottleWindow();
|
|
943
|
-
if (!
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
932
|
+
if (!currentMessage) return;
|
|
933
|
+
await deleteCleanupMessage(currentMessage);
|
|
934
|
+
};
|
|
935
|
+
const clear = async () => {
|
|
936
|
+
await discardPending();
|
|
937
|
+
await deleteCurrentMessage();
|
|
949
938
|
};
|
|
950
939
|
params.log?.(`discord stream preview ready (maxChars=${maxChars}, throttleMs=${throttleMs})`);
|
|
951
940
|
return {
|
|
@@ -958,7 +947,7 @@ function createDiscordDraftStream(params) {
|
|
|
958
947
|
seal,
|
|
959
948
|
stop,
|
|
960
949
|
retarget,
|
|
961
|
-
|
|
950
|
+
cleanupPendingMessages,
|
|
962
951
|
forceNewMessage
|
|
963
952
|
};
|
|
964
953
|
}
|
|
@@ -1002,24 +991,17 @@ function createDiscordDraftPreviewController(params) {
|
|
|
1002
991
|
let progressDraftStartedBeforeFinal = false;
|
|
1003
992
|
let progressDraftCollapsed = false;
|
|
1004
993
|
let progressNarratorLifecycle;
|
|
1005
|
-
const previewToolProgressEnabled = Boolean(draftStream) && resolveChannelStreamingPreviewToolProgress(params.discordConfig, true, discordStreamMode);
|
|
1006
994
|
const narrationProgressEnabled = Boolean(draftStream) && discordStreamMode === "progress" && resolveChannelStreamingProgressNarration(params.discordConfig);
|
|
1007
995
|
const narrationHideCommandText = narrationProgressEnabled && resolveChannelStreamingPreviewCommandText(params.discordConfig) === "status";
|
|
1008
|
-
const suppressDefaultToolProgressMessages = Boolean(draftStream) && resolveChannelStreamingSuppressDefaultToolProgressMessages(params.discordConfig, {
|
|
1009
|
-
draftStreamActive: true,
|
|
1010
|
-
previewToolProgressEnabled
|
|
1011
|
-
});
|
|
1012
996
|
const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
|
|
1013
997
|
const progressDraft = createChannelProgressDraftCompositor({
|
|
998
|
+
presentation: discordStreamMode === "progress" ? "summary" : void 0,
|
|
1014
999
|
entry: params.discordConfig,
|
|
1015
1000
|
mode: discordStreamMode,
|
|
1016
1001
|
active: Boolean(draftStream),
|
|
1017
1002
|
seed: progressSeed,
|
|
1018
1003
|
reasoningLinePrefix: "🧠 ",
|
|
1019
|
-
commentaryLinePrefix: "💬 ",
|
|
1020
|
-
reasoningGate: previewToolProgressEnabled,
|
|
1021
1004
|
commentaryItalics: false,
|
|
1022
|
-
buildProgressEventLine: (input, options) => input.event === "tool" || input.event === "item" || input.event === "command-output" ? buildChannelProgressDraftLineForEntry(params.discordConfig, input, options) : buildChannelProgressDraftLine(input, options),
|
|
1023
1005
|
update: async (previewText, options) => {
|
|
1024
1006
|
if (!draftStream) return false;
|
|
1025
1007
|
lastPartialText = previewText;
|
|
@@ -1052,10 +1034,6 @@ function createDiscordDraftPreviewController(params) {
|
|
|
1052
1034
|
}
|
|
1053
1035
|
resetProgressState();
|
|
1054
1036
|
};
|
|
1055
|
-
const pushPreambleHeadline = async (text, options) => {
|
|
1056
|
-
if (discordStreamMode === "progress") return await progressDraft.pushPreambleHeadline(text, options);
|
|
1057
|
-
return false;
|
|
1058
|
-
};
|
|
1059
1037
|
const beginNewProgressTurn = (options) => {
|
|
1060
1038
|
const beganNewTurn = progressDraft.beginNewTurn(options);
|
|
1061
1039
|
if (beganNewTurn) {
|
|
@@ -1072,11 +1050,10 @@ function createDiscordDraftPreviewController(params) {
|
|
|
1072
1050
|
};
|
|
1073
1051
|
return {
|
|
1074
1052
|
draftStream,
|
|
1075
|
-
previewToolProgressEnabled,
|
|
1076
1053
|
narrationProgressEnabled,
|
|
1077
1054
|
narrationHideCommandText,
|
|
1078
1055
|
commentaryProgressEnabled: progressDraft.commentaryProgressEnabled,
|
|
1079
|
-
suppressDefaultToolProgressMessages,
|
|
1056
|
+
suppressDefaultToolProgressMessages: progressDraft.suppressDefaultToolProgressMessages,
|
|
1080
1057
|
get isProgressMode() {
|
|
1081
1058
|
return discordStreamMode === "progress";
|
|
1082
1059
|
},
|
|
@@ -1127,31 +1104,18 @@ function createDiscordDraftPreviewController(params) {
|
|
|
1127
1104
|
disableBlockStreamingForDraft: draftStream ? true : void 0,
|
|
1128
1105
|
pushToolEvent: progressDraft.pushToolEvent,
|
|
1129
1106
|
pushItemEvent: progressDraft.pushItemEvent,
|
|
1130
|
-
pushApprovalEvent: progressDraft.pushApprovalEvent,
|
|
1107
|
+
pushApprovalEvent: progressDraft.pushApprovalEvent.bind(progressDraft),
|
|
1131
1108
|
pushCommandOutputEvent: progressDraft.pushCommandOutputEvent,
|
|
1132
1109
|
pushPatchEvent: progressDraft.pushPatchEvent,
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
async pushPlanProgress(steps, options) {
|
|
1137
|
-
return await progressDraft.pushPlanProgress(steps, options);
|
|
1138
|
-
},
|
|
1139
|
-
async pushReasoningProgress(text, options) {
|
|
1140
|
-
return await progressDraft.pushReasoningProgress(text, options);
|
|
1141
|
-
},
|
|
1142
|
-
async pushNarrationProgress(text) {
|
|
1143
|
-
return await progressDraft.pushNarrationProgress(text);
|
|
1144
|
-
},
|
|
1145
|
-
pushPreambleHeadline,
|
|
1110
|
+
pushPlanProgress: progressDraft.pushPlanProgress.bind(progressDraft),
|
|
1111
|
+
pushReasoningProgress: progressDraft.pushReasoningProgress.bind(progressDraft),
|
|
1112
|
+
pushNarrationProgress: progressDraft.pushNarrationProgress.bind(progressDraft),
|
|
1146
1113
|
async pushPreambleItemEvent(payload) {
|
|
1147
|
-
const headlineAccepted = await pushPreambleHeadline(payload.progressText, { itemId: payload.itemId });
|
|
1114
|
+
const headlineAccepted = await progressDraft.pushPreambleHeadline(payload.progressText, { itemId: payload.itemId });
|
|
1148
1115
|
if (!progressDraft.commentaryProgressEnabled) return headlineAccepted;
|
|
1149
1116
|
const commentaryAccepted = await progressDraft.pushCommentaryProgress(payload.progressText, { itemId: payload.itemId });
|
|
1150
1117
|
return headlineAccepted || commentaryAccepted;
|
|
1151
1118
|
},
|
|
1152
|
-
async pushCommentaryProgress(text, options) {
|
|
1153
|
-
return await progressDraft.pushCommentaryProgress(text, options);
|
|
1154
|
-
},
|
|
1155
1119
|
resolvePreviewFinalText(text) {
|
|
1156
1120
|
if (typeof text !== "string") return;
|
|
1157
1121
|
const formatted = convertMarkdownTables(stripInlineDirectiveTagsForDelivery(text).text, params.tableMode);
|
|
@@ -1232,7 +1196,7 @@ function createDiscordDraftPreviewController(params) {
|
|
|
1232
1196
|
progressDraft.cancel();
|
|
1233
1197
|
if (finalReplyError !== false) await draftStream?.discardPending();
|
|
1234
1198
|
if (finalReplyError !== true && !finalizedViaPreviewMessage && draftStream?.messageId()) await draftStream.clear();
|
|
1235
|
-
await draftStream?.
|
|
1199
|
+
await draftStream?.cleanupPendingMessages();
|
|
1236
1200
|
} catch (err) {
|
|
1237
1201
|
params.log(`discord: draft cleanup failed: ${String(err)}`);
|
|
1238
1202
|
}
|
|
@@ -1248,7 +1212,7 @@ function shouldStartDiscordProgressDraftNow(line) {
|
|
|
1248
1212
|
}
|
|
1249
1213
|
//#endregion
|
|
1250
1214
|
//#region extensions/discord/src/monitor/reply-typing-feedback.ts
|
|
1251
|
-
const DISCORD_REPLY_TYPING_MAX_DURATION_MS =
|
|
1215
|
+
const DISCORD_REPLY_TYPING_MAX_DURATION_MS = 12e5;
|
|
1252
1216
|
function createDiscordReplyTypingFeedback(params) {
|
|
1253
1217
|
const rest = params.rest ?? createDiscordRestClient({
|
|
1254
1218
|
cfg: params.cfg,
|
|
@@ -1581,8 +1545,9 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1581
1545
|
const raw = (payload.text ?? "").trim();
|
|
1582
1546
|
const body = raw.startsWith("Reasoning:\n") ? raw.slice(11).trim() : raw;
|
|
1583
1547
|
if (!body) return { visibleReplySent: false };
|
|
1548
|
+
const chunkLimit = Math.max(256, Math.min(textLimit, 2e3) - 8);
|
|
1584
1549
|
const chunks = chunkDiscordTextWithMode(body, {
|
|
1585
|
-
maxChars:
|
|
1550
|
+
maxChars: chunkLimit,
|
|
1586
1551
|
maxLines: maxLinesPerMessage,
|
|
1587
1552
|
chunkMode
|
|
1588
1553
|
});
|
|
@@ -1609,7 +1574,9 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1609
1574
|
threadBindings,
|
|
1610
1575
|
mediaLocalRoots,
|
|
1611
1576
|
kind: "block",
|
|
1612
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery
|
|
1577
|
+
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1578
|
+
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1579
|
+
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1613
1580
|
});
|
|
1614
1581
|
if (result.visibleReplySent) replyReference.markSent();
|
|
1615
1582
|
return result;
|
|
@@ -1626,10 +1593,11 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1626
1593
|
finalText: payload.text,
|
|
1627
1594
|
resolveCandidateText: resolveCurrentTurnTranscriptFinalText
|
|
1628
1595
|
}) : payload.text;
|
|
1629
|
-
const
|
|
1596
|
+
const effectivePayload = finalText !== payload.text ? {
|
|
1630
1597
|
...payload,
|
|
1631
1598
|
text: finalText
|
|
1632
|
-
} : payload
|
|
1599
|
+
} : payload;
|
|
1600
|
+
const [deliverablePayload] = sanitizeDiscordFrontChannelReplyPayloads([effectivePayload], { kind: info.kind });
|
|
1633
1601
|
if (!deliverablePayload) {
|
|
1634
1602
|
logVerbose(formatDiscordReplySkip({
|
|
1635
1603
|
kind: info.kind,
|
|
@@ -1708,7 +1676,9 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1708
1676
|
mediaLocalRoots,
|
|
1709
1677
|
allowedMentions,
|
|
1710
1678
|
kind: info.kind,
|
|
1711
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery
|
|
1679
|
+
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1680
|
+
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1681
|
+
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1712
1682
|
})).visibleReplySent;
|
|
1713
1683
|
},
|
|
1714
1684
|
onNormalDelivered: () => {
|
|
@@ -1746,7 +1716,9 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1746
1716
|
threadBindings,
|
|
1747
1717
|
mediaLocalRoots,
|
|
1748
1718
|
kind: info.kind,
|
|
1749
|
-
bindPendingFinalDelivery: info.bindPendingFinalDelivery
|
|
1719
|
+
bindPendingFinalDelivery: info.bindPendingFinalDelivery,
|
|
1720
|
+
onPlatformSendDispatch: info.onPlatformSendDispatch,
|
|
1721
|
+
assertPlatformSendAuthorized: info.assertPlatformSendAuthorized
|
|
1750
1722
|
});
|
|
1751
1723
|
if (!result.visibleReplySent) return result;
|
|
1752
1724
|
replyReference.markSent();
|
|
@@ -1864,7 +1836,11 @@ async function processDiscordMessageInner(ctx, observer) {
|
|
|
1864
1836
|
return;
|
|
1865
1837
|
}
|
|
1866
1838
|
dispatchError = true;
|
|
1867
|
-
if (await completeDiscordSessionConflict(err,
|
|
1839
|
+
if (await completeDiscordSessionConflict(err, (payload, info) => deliverDiscordPayload(payload, {
|
|
1840
|
+
...info,
|
|
1841
|
+
onPlatformSendDispatch: () => Promise.resolve(),
|
|
1842
|
+
assertPlatformSendAuthorized: () => void 0
|
|
1843
|
+
}), onDiscordDeliveryError)) return;
|
|
1868
1844
|
throw err;
|
|
1869
1845
|
} finally {
|
|
1870
1846
|
activeThreadRoute.end();
|