@openclaw/discord 2026.8.1-beta.3 → 2026.8.1
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-D5xmUpnj.js → account-inspect-BDfKyuvL.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-DNl-oCEw.js → accounts-CfQ-vSyf.js} +5 -124
- package/dist/action-runtime-api.js +1 -1
- package/dist/{activities-api-KCBAmWxD.js → activities-api-Dl-TOyOX.js} +5 -4
- package/dist/activities-api.js +1 -1
- package/dist/api.js +16 -16
- package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-q4Zqo44V.js} +28 -105
- package/dist/{audit-Yc7eZDd6.js → audit-DgrvFPGt.js} +5 -5
- package/dist/{channel-cXYzGc4L.js → channel-BsQUalPw.js} +18 -20
- package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-UMGGIfSy.js} +59 -58
- 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-rPs4dsk_.js} +5 -5
- package/dist/{components-ezGKo_Yh.js → components-Dk35LTf_.js} +33 -29
- package/dist/{config-schema-DC5kDtQ5.js → config-schema-CxPqtVI1.js} +16 -10
- package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-BjvX4e35.js} +1 -1
- package/dist/{directory-config-XyCfoqLg.js → directory-config-B7DY_pNG.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Df0NbFJB.js → directory-live-DuAXKkan.js} +2 -2
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{doctor-DYY31GrO.js → doctor-zQTtn6hm.js} +4 -4
- package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-DZewwLr1.js} +9 -5
- package/dist/index.js +1 -1
- package/dist/ingress-identity-CzZKcPK8.js +60 -0
- package/dist/{message-handler-B61q5MOF.js → message-handler-C5By3yl5.js} +5 -5
- package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-DrszWuHw.js} +20 -84
- package/dist/{message-handler.process--4_712Ec.js → message-handler.process-DyFPDLCt.js} +60 -66
- package/dist/{message-utils-BXLLnFl6.js → message-text-Ca8M6TU8.js} +34 -32
- package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-Dif8p481.js} +58 -61
- package/dist/{outbound-components-B2PL0ooH.js → outbound-components-wjv7yyAj.js} +5 -4
- package/dist/outbound-session-route-Bn4uXaoE.js +665 -0
- package/dist/{owner-access-Bg41VzAf.js → owner-access-UlYi9t0M.js} +1 -1
- package/dist/{pluralkit-dUl4v1X3.js → pluralkit-9EuEN4UD.js} +1 -1
- package/dist/{probe-BTdtVRwU.js → probe-n6ZXxK8V.js} +1 -1
- package/dist/{probe.runtime-Dq5-PRKT.js → probe.runtime-CN4bdPfZ.js} +1 -1
- package/dist/{provider-DlK_ynqt.js → provider-LXiOcJrH.js} +443 -295
- package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-DSNe7r2W.js} +3 -3
- package/dist/provider.runtime-DiInaDXO.js +2 -0
- package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-DOViOIjY.js} +106 -122
- package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BLoYaxEG.js} +1 -1
- package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-D2yl_2CN.js} +4 -3
- package/dist/{resolve-users-BtKxLUZv.js → resolve-users-BLxfqajZ.js} +2 -2
- package/dist/{retry-DNsVTeTo.js → retry-DqHCW6PV.js} +220 -6
- package/dist/{runtime-D71_VFLr.js → runtime-BYamRVPN.js} +73 -56
- package/dist/{runtime-CQovMsH3.js → runtime-DrxVBTtp.js} +2 -2
- package/dist/runtime-api.js +16 -23
- package/dist/{sdk-runtime-37OU6_Yh.js → sdk-runtime-6tfgYDjY.js} +55 -86
- 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-UJHiAm4C.js} +78 -15
- package/dist/{send.components-ChK1wS7w.js → send.components-CrBJpGT_.js} +15 -22
- package/dist/{send.outbound-HIkgji_7.js → send.outbound-D7JYmfm9.js} +58 -69
- package/dist/{send.shared-B3fpaLWJ.js → send.shared-DZJ1akvQ.js} +36 -21
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-CaAaoksy.js → shared-Dii2HTn7.js} +31 -9
- package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-JyGrtQIl.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -6
- package/dist/{system-events-Nuwoq_au.js → system-events-BEmcj4xJ.js} +1 -1
- package/dist/{target-resolver-DIXShHaZ.js → target-resolver-V-IYae6s.js} +3 -3
- package/dist/targets-CQp53cGj.js +3 -0
- package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-DvYP79fy.js} +3 -4
- package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-Clm77DBM.js} +8 -12
- package/dist/{threading-DU6pgeGm.js → threading-CXuu_7o9.js} +47 -25
- package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-BLEMH_yi.js} +9 -4
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-oLiS5Z13.js → typing-B9snnwMe.js} +1 -1
- package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-DY6_o73o.js} +76 -66
- 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 +23 -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 +12 -4
- package/package.json +8 -8
- package/skills/discord/SKILL.md +1 -1
- 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/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
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { a as chunkDiscordTextWithMode,
|
|
2
|
-
import { t as createDiscordActionGate } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as notifyDiscordInboundEventOutboundPayloadSuccess, t as discordInboundEventDelivery } from "./inbound-event-delivery-De2qxTrP.js";
|
|
6
|
-
import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-B2PL0ooH.js";
|
|
1
|
+
import { a as chunkDiscordTextWithMode, f as resolveDiscordReplyReference, g as normalizeDiscordOutboundTarget, l as toDiscordOutboundDeliveryResult, o as createDiscordSendReceipt, r as hasDiscordMessageCreateAmbiguity, s as createDiscordSendReceiptFromResults } from "./retry-DqHCW6PV.js";
|
|
2
|
+
import { t as createDiscordActionGate } from "./accounts-CfQ-vSyf.js";
|
|
3
|
+
import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-Bn4uXaoE.js";
|
|
4
|
+
import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-wjv7yyAj.js";
|
|
7
5
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
8
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
|
+
import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
9
8
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
10
9
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
10
|
import { createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
12
11
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
13
|
-
import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
14
12
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
15
13
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
16
14
|
//#region extensions/discord/src/media-detection.ts
|
|
@@ -61,7 +59,7 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
61
59
|
}
|
|
62
60
|
//#endregion
|
|
63
61
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
64
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
62
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-UJHiAm4C.js").then((n) => n.t));
|
|
65
63
|
function resolveDiscordOutboundTarget(params) {
|
|
66
64
|
if (params.threadId == null) return params.to;
|
|
67
65
|
const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
|
|
@@ -98,11 +96,6 @@ async function createDiscordPayloadSendContext(ctx) {
|
|
|
98
96
|
//#endregion
|
|
99
97
|
//#region extensions/discord/src/outbound-payload.ts
|
|
100
98
|
const log$1 = createSubsystemLogger("discord/outbound");
|
|
101
|
-
function resolveDiscordDeliveryProgress(ctx) {
|
|
102
|
-
return ctx.onDeliveryResult ? async (result) => {
|
|
103
|
-
await ctx.onDeliveryResult?.(attachChannelToResult("discord", toDiscordOutboundDeliveryResult(result)));
|
|
104
|
-
} : void 0;
|
|
105
|
-
}
|
|
106
99
|
function createDiscordUnknownPayloadResult(target) {
|
|
107
100
|
return {
|
|
108
101
|
messageId: "",
|
|
@@ -146,6 +139,35 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
146
139
|
});
|
|
147
140
|
const mediaUrls = resolvePayloadMediaUrls(payload);
|
|
148
141
|
const sendContext = await createDiscordPayloadSendContext(ctx);
|
|
142
|
+
const payloadContext = {
|
|
143
|
+
...ctx,
|
|
144
|
+
payload
|
|
145
|
+
};
|
|
146
|
+
const deliveredResults = [];
|
|
147
|
+
let createdThreadId;
|
|
148
|
+
payloadContext.onDeliveryResult = async (result) => {
|
|
149
|
+
await ctx.onDeliveryResult?.(result);
|
|
150
|
+
const threadId = result.receipt?.threadId;
|
|
151
|
+
if (threadId && payloadContext.threadId == null) {
|
|
152
|
+
payloadContext.threadId = threadId;
|
|
153
|
+
sendContext.target = `channel:${threadId}`;
|
|
154
|
+
createdThreadId = threadId;
|
|
155
|
+
}
|
|
156
|
+
if (createdThreadId && result.target?.kind === "channel" && result.receipt) deliveredResults.push({
|
|
157
|
+
messageId: result.messageId,
|
|
158
|
+
channelId: result.target.id,
|
|
159
|
+
receipt: result.receipt
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const completeResult = (result) => createdThreadId ? {
|
|
163
|
+
...result,
|
|
164
|
+
receipt: createDiscordSendReceiptFromResults({
|
|
165
|
+
results: deliveredResults,
|
|
166
|
+
threadId: createdThreadId
|
|
167
|
+
})
|
|
168
|
+
} : result;
|
|
169
|
+
const completeDelivery = (result) => attachChannelToResult("discord", toDiscordOutboundDeliveryResult(completeResult(result)));
|
|
170
|
+
const onDeliveryResult = async (result) => await payloadContext.onDeliveryResult?.(attachChannelToResult("discord", toDiscordOutboundDeliveryResult(result)));
|
|
149
171
|
if (payload.audioAsVoice && mediaUrls.length > 0) {
|
|
150
172
|
const voiceReply = sendContext.resolveReply();
|
|
151
173
|
let voiceFailure;
|
|
@@ -169,38 +191,38 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
169
191
|
if (fallbackText) await sendContext.send(sendContext.target, fallbackText, {
|
|
170
192
|
verbose: false,
|
|
171
193
|
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext, voiceReply),
|
|
172
|
-
onDeliveryResult
|
|
194
|
+
onDeliveryResult
|
|
173
195
|
});
|
|
174
196
|
voiceFailure = { error: err };
|
|
175
197
|
}
|
|
176
198
|
if (!voiceFailure) {
|
|
177
|
-
await
|
|
199
|
+
await payloadContext.onDeliveryResult?.(attachChannelToResult("discord", toDiscordOutboundDeliveryResult(lastResult)));
|
|
178
200
|
if (payload.text?.trim()) lastResult = await sendContext.send(sendContext.target, payload.text, {
|
|
179
201
|
verbose: false,
|
|
180
202
|
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext),
|
|
181
|
-
onDeliveryResult
|
|
203
|
+
onDeliveryResult
|
|
182
204
|
});
|
|
183
205
|
}
|
|
184
206
|
for (const mediaUrl of mediaUrls.slice(1)) try {
|
|
185
207
|
lastResult = await sendContext.send(sendContext.target, "", {
|
|
186
208
|
verbose: false,
|
|
187
209
|
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl),
|
|
188
|
-
onDeliveryResult
|
|
210
|
+
onDeliveryResult
|
|
189
211
|
});
|
|
190
212
|
} catch (err) {
|
|
191
213
|
if (!voiceFailure) throw err;
|
|
192
214
|
log$1.warn("discord remaining media send failed after voice failure", { error: err });
|
|
193
215
|
}
|
|
194
216
|
if (voiceFailure) throw voiceFailure.error;
|
|
195
|
-
return
|
|
217
|
+
return completeDelivery(lastResult);
|
|
196
218
|
}
|
|
219
|
+
const discordData = payload.channelData?.discord && typeof payload.channelData.discord === "object" && !Array.isArray(payload.channelData.discord) ? payload.channelData.discord : {};
|
|
220
|
+
const filename = normalizeOptionalString(discordData.filename);
|
|
197
221
|
const componentSpec = await resolveDiscordComponentSpec(payload);
|
|
198
222
|
if (!componentSpec) {
|
|
199
|
-
const discordData = payload.channelData?.discord && typeof payload.channelData.discord === "object" && !Array.isArray(payload.channelData.discord) ? payload.channelData.discord : {};
|
|
200
223
|
const nativeComponents = Array.isArray(discordData.components) ? discordData.components : void 0;
|
|
201
224
|
const embeds = Array.isArray(discordData.embeds) ? discordData.embeds : void 0;
|
|
202
|
-
|
|
203
|
-
if (nativeComponents || embeds?.length || filename) return attachChannelToResult("discord", toDiscordOutboundDeliveryResult(await sendPayloadMediaSequenceOrFallback({
|
|
225
|
+
if (nativeComponents || embeds?.length || filename) return completeDelivery(await sendPayloadMediaSequenceOrFallback({
|
|
204
226
|
text: payload.text ?? "",
|
|
205
227
|
mediaUrls,
|
|
206
228
|
fallbackResult: createDiscordUnknownPayloadResult(sendContext.target),
|
|
@@ -210,7 +232,7 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
210
232
|
embeds,
|
|
211
233
|
filename,
|
|
212
234
|
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext),
|
|
213
|
-
onDeliveryResult
|
|
235
|
+
onDeliveryResult
|
|
214
236
|
}),
|
|
215
237
|
send: async ({ text, mediaUrl, isFirst }) => await sendContext.send(sendContext.target, text, {
|
|
216
238
|
verbose: false,
|
|
@@ -218,70 +240,46 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
218
240
|
components: isFirst ? nativeComponents : void 0,
|
|
219
241
|
embeds: isFirst ? embeds : void 0,
|
|
220
242
|
filename: isFirst ? filename : void 0,
|
|
221
|
-
onDeliveryResult
|
|
243
|
+
onDeliveryResult
|
|
222
244
|
})
|
|
223
|
-
}))
|
|
224
|
-
|
|
225
|
-
...ctx,
|
|
226
|
-
payload
|
|
227
|
-
};
|
|
228
|
-
const deliveredResults = [];
|
|
229
|
-
let createdThreadId;
|
|
230
|
-
payloadContext.onDeliveryResult = async (result) => {
|
|
231
|
-
await ctx.onDeliveryResult?.(result);
|
|
232
|
-
const threadId = result.receipt?.threadId;
|
|
233
|
-
if (threadId && payloadContext.threadId == null) {
|
|
234
|
-
payloadContext.threadId = threadId;
|
|
235
|
-
createdThreadId = threadId;
|
|
236
|
-
}
|
|
237
|
-
if (createdThreadId && result.target?.kind === "channel" && result.receipt) deliveredResults.push({
|
|
238
|
-
messageId: result.messageId,
|
|
239
|
-
channelId: result.target.id,
|
|
240
|
-
receipt: result.receipt
|
|
241
|
-
});
|
|
242
|
-
};
|
|
243
|
-
const result = await sendTextMediaPayload({
|
|
245
|
+
}));
|
|
246
|
+
return completeResult(await sendTextMediaPayload({
|
|
244
247
|
channel: "discord",
|
|
245
248
|
ctx: payloadContext,
|
|
246
249
|
adapter: params.fallbackAdapter
|
|
247
|
-
});
|
|
248
|
-
return createdThreadId ? {
|
|
249
|
-
...result,
|
|
250
|
-
receipt: createDiscordSendReceiptFromResults({
|
|
251
|
-
results: deliveredResults,
|
|
252
|
-
threadId: createdThreadId
|
|
253
|
-
})
|
|
254
|
-
} : result;
|
|
250
|
+
}));
|
|
255
251
|
}
|
|
256
|
-
return
|
|
252
|
+
return completeDelivery(await sendPayloadMediaSequenceOrFallback({
|
|
257
253
|
text: payload.text ?? "",
|
|
258
254
|
mediaUrls,
|
|
259
255
|
fallbackResult: createDiscordUnknownPayloadResult(sendContext.target),
|
|
260
256
|
sendNoMedia: async () => {
|
|
261
257
|
return await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, {
|
|
262
258
|
...resolveDiscordFormattedDeliveryOptions(ctx, sendContext),
|
|
263
|
-
|
|
259
|
+
filename,
|
|
260
|
+
onDeliveryResult
|
|
264
261
|
});
|
|
265
262
|
},
|
|
266
263
|
send: async ({ text, mediaUrl, isFirst }) => {
|
|
267
264
|
if (isFirst) return await sendDiscordComponentMessageLazy(sendContext.target, componentSpec, {
|
|
268
265
|
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl),
|
|
269
|
-
|
|
266
|
+
filename,
|
|
267
|
+
onDeliveryResult
|
|
270
268
|
});
|
|
271
269
|
return await sendContext.send(sendContext.target, text, {
|
|
272
270
|
verbose: false,
|
|
273
271
|
...resolveDiscordMediaDeliveryOptions(ctx, sendContext, mediaUrl),
|
|
274
|
-
onDeliveryResult
|
|
272
|
+
onDeliveryResult
|
|
275
273
|
});
|
|
276
274
|
}
|
|
277
|
-
}))
|
|
275
|
+
}));
|
|
278
276
|
}
|
|
279
277
|
//#endregion
|
|
280
278
|
//#region extensions/discord/src/outbound-adapter.ts
|
|
281
279
|
const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
|
|
282
280
|
const log = createSubsystemLogger("discord/outbound");
|
|
283
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
284
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-
|
|
281
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-DvYP79fy.js").then((n) => n.t));
|
|
282
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-CrBJpGT_.js").then((n) => n.i));
|
|
285
283
|
function resolveDiscordWebhookIdentity(params) {
|
|
286
284
|
const usernameRaw = normalizeOptionalString(params.identity?.name);
|
|
287
285
|
const fallbackUsername = normalizeOptionalString(params.binding.label) ?? params.binding.agentId;
|
|
@@ -427,9 +425,8 @@ const discordOutbound = {
|
|
|
427
425
|
reply: options.reply?.scope === "all" ? options.reply : void 0
|
|
428
426
|
});
|
|
429
427
|
const threadId = captionResult.receipt?.threadId;
|
|
430
|
-
if (!threadId) return toDiscordOutboundDeliveryResult(mediaResult);
|
|
431
428
|
return toDiscordOutboundDeliveryResult({
|
|
432
|
-
...captionResult,
|
|
429
|
+
...threadId ? captionResult : mediaResult,
|
|
433
430
|
receipt: createDiscordSendReceiptFromResults({
|
|
434
431
|
results: [captionResult, mediaResult],
|
|
435
432
|
threadId
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as readDiscordComponentSpec } from "./components-Dk35LTf_.js";
|
|
2
|
+
import { resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
|
|
2
3
|
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
3
4
|
//#region extensions/discord/src/outbound-components.ts
|
|
4
5
|
const DISCORD_MESSAGE_COMPONENT_LIMIT = 40;
|
|
@@ -30,11 +31,11 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-
|
|
34
|
+
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-CrBJpGT_.js").then((n) => n.i), "sendDiscordComponentMessage");
|
|
34
35
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
35
36
|
return await (await loadDiscordComponentSend())(...args);
|
|
36
37
|
}
|
|
37
|
-
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-
|
|
38
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-Dk35LTf_.js").then((n) => n.a));
|
|
38
39
|
function addPayloadTextFallback(spec, payload) {
|
|
39
40
|
return spec.text ? spec : {
|
|
40
41
|
...spec,
|
|
@@ -68,7 +69,7 @@ function isDiscordComponentSpecWithinMessageLimit(params) {
|
|
|
68
69
|
}) <= DISCORD_MESSAGE_COMPONENT_LIMIT;
|
|
69
70
|
}
|
|
70
71
|
async function buildDiscordPresentationPayload(params) {
|
|
71
|
-
const componentSpec = (await loadDiscordSharedInteractive()).buildDiscordPresentationComponents(params.presentation);
|
|
72
|
+
const componentSpec = (await loadDiscordSharedInteractive()).buildDiscordPresentationComponents(params.presentation, { questionOptionIndices: resolveAskUserQuestionOptionIndices(params.payload) });
|
|
72
73
|
if (!componentSpec) return null;
|
|
73
74
|
const includesMedia = Boolean(params.payload.mediaUrl || params.payload.mediaUrls?.some((mediaUrl) => mediaUrl));
|
|
74
75
|
if (!isDiscordComponentSpecWithinMessageLimit({
|