@openclaw/discord 2026.8.1-beta.3 → 2026.9.1-beta.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-q-9PaaHH.js} +5 -4
- package/dist/activities-api.js +1 -1
- package/dist/api.js +15 -15
- package/dist/{approval-handler.runtime-B12RCYr8.js → approval-handler.runtime-B7qhK3fR.js} +28 -105
- package/dist/{audit-Yc7eZDd6.js → audit-CBEv_ERu.js} +5 -5
- package/dist/{channel-cXYzGc4L.js → channel-Dx1tMTfx.js} +18 -20
- package/dist/{channel-actions.runtime-CODTvo7c.js → channel-actions.runtime-CLWWu9nC.js} +56 -56
- 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-DOzXS2Pk.js} +5 -5
- package/dist/{components-ezGKo_Yh.js → components-B9V5o361.js} +6 -22
- package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DJYrY2TQ.js} +1 -1
- package/dist/{directory-config-XyCfoqLg.js → directory-config-BK6eqekJ.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-Df0NbFJB.js → directory-live-DSAJSrJk.js} +2 -2
- package/dist/{doctor-DYY31GrO.js → doctor-Cm7Y1pJ2.js} +4 -4
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-BdwCRHmm.js} +9 -5
- package/dist/index.js +1 -1
- package/dist/{message-handler-B61q5MOF.js → message-handler-BXpWZyni.js} +5 -5
- package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-Ba5LAY_X.js} +13 -15
- package/dist/{message-handler.process--4_712Ec.js → message-handler.process-3HEzmemS.js} +59 -65
- package/dist/{message-utils-BXLLnFl6.js → message-text-aiwO5R2F.js} +32 -30
- package/dist/{outbound-adapter-DxHTOqiN.js → outbound-adapter-BE4jSq2d.js} +53 -58
- package/dist/{outbound-components-B2PL0ooH.js → outbound-components-oLpg8Qzb.js} +3 -3
- package/dist/outbound-session-route-Cg15ZFJd.js +625 -0
- package/dist/{owner-access-Bg41VzAf.js → owner-access-UlYi9t0M.js} +1 -1
- package/dist/{pluralkit-dUl4v1X3.js → pluralkit-Tiyl70dx.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-B11xwilq.js} +244 -238
- package/dist/{provider-session.runtime-CvvphHvs.js → provider-session.runtime-B9xe-Qaf.js} +3 -3
- package/dist/provider.runtime-DiYaHvOz.js +2 -0
- package/dist/{realtime-session.runtime-ysbMG8v7.js → realtime-session.runtime-CU8IQUS-.js} +74 -86
- package/dist/{resolve-allowlist-common-DIVXbD1P.js → resolve-allowlist-common-BLoYaxEG.js} +1 -1
- package/dist/{resolve-channels-CGeUoIqb.js → resolve-channels-C2sT_n67.js} +4 -3
- package/dist/{resolve-users-BtKxLUZv.js → resolve-users-CzpjLwjy.js} +2 -2
- package/dist/{retry-DNsVTeTo.js → retry-Cv4jCU5Z.js} +144 -5
- package/dist/{runtime-D71_VFLr.js → runtime-BHrTlFkf.js} +72 -55
- package/dist/{runtime-CQovMsH3.js → runtime-CY4PRMF-.js} +2 -2
- package/dist/runtime-api.js +16 -23
- package/dist/{sdk-runtime-37OU6_Yh.js → sdk-runtime-4geQHtXc.js} +55 -86
- package/dist/{send-rQIffSYu.js → send-C49MFF9j.js} +78 -15
- package/dist/{send.components-ChK1wS7w.js → send.components-DKKAw5VX.js} +14 -21
- package/dist/{send.outbound-HIkgji_7.js → send.outbound-zam0TrZx.js} +58 -69
- package/dist/{send.shared-B3fpaLWJ.js → send.shared-JjljcV4O.js} +35 -20
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-CaAaoksy.js → shared-_5EcP4jW.js} +27 -8
- package/dist/{subagent-hooks-CNT2ZJTJ.js → subagent-hooks-DQzvOptn.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -6
- package/dist/{system-events-Nuwoq_au.js → system-events-C7yxaHWP.js} +1 -1
- package/dist/{target-resolver-DIXShHaZ.js → target-resolver-vxIh6O3-.js} +3 -3
- package/dist/targets-CtTKvntJ.js +3 -0
- package/dist/{thread-bindings-VlymUnbz.js → thread-bindings-DW5F9vat.js} +3 -4
- package/dist/{thread-bindings.manager-CngsgErq.js → thread-bindings.manager-ByOtwjo_.js} +6 -10
- package/dist/{threading-DU6pgeGm.js → threading-agH1T_6s.js} +47 -25
- package/dist/{transcripts-source-DeIMNbRh.js → transcripts-source-BR11iHA4.js} +3 -3
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-oLiS5Z13.js → typing-Dc_YMY2e.js} +1 -1
- package/dist/{voice-runtime-CjNFaynA.js → voice-runtime-DIeaa8fJ.js} +56 -64
- 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/package.json +8 -8
- 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
- package/dist/{config-schema-DC5kDtQ5.js → config-schema-BR13IAx6.js} +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-
|
|
4
|
-
import "./targets-
|
|
1
|
+
import { _ as parseDiscordTarget, v as resolveDiscordChannelId } from "./retry-Cv4jCU5Z.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-B9V5o361.js";
|
|
3
|
+
import { a as readDiscordAutoArchiveDurationParam, t as handleDiscordAction } from "./runtime-BHrTlFkf.js";
|
|
4
|
+
import "./targets-CtTKvntJ.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
|
-
import {
|
|
7
|
-
import { r as isDiscordComponentSpecWithinMessageLimit, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-
|
|
8
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
6
|
+
import { h as discordInboundEventDelivery } from "./outbound-session-route-Cg15ZFJd.js";
|
|
7
|
+
import { r as isDiscordComponentSpecWithinMessageLimit, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-oLpg8Qzb.js";
|
|
8
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-BdwCRHmm.js";
|
|
9
9
|
import { n as notifyDiscordActiveTurnThreadCreated, r as notifyDiscordActiveTurnThreadReplyDelivered } from "./active-turn-thread-route-fmHl1HNd.js";
|
|
10
10
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
|
+
import { adaptMessagePresentationForChannel, normalizeLegacyInteractiveReply, normalizeMessagePresentation, renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime";
|
|
11
12
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
12
13
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
13
|
-
import {
|
|
14
|
-
import { readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
14
|
+
import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringArrayParam as readStringArrayParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/agent-runtime";
|
|
15
15
|
//#region extensions/discord/src/actions/handle-action.ts
|
|
16
16
|
const providerId = "discord";
|
|
17
17
|
function withCurrentSourceReplyRoute(result) {
|
|
@@ -31,7 +31,7 @@ function readCurrentDiscordTarget(toolContext) {
|
|
|
31
31
|
}
|
|
32
32
|
async function handleDiscordMessageAction(ctx) {
|
|
33
33
|
const { action, params, cfg } = ctx;
|
|
34
|
-
const accountId = ctx.accountId ?? readStringParam(params, "accountId");
|
|
34
|
+
const accountId = ctx.accountId ?? readStringParam$1(params, "accountId");
|
|
35
35
|
const readContext = ctx.requesterAccountId && ctx.toolContext?.currentChannelProvider && ctx.toolContext.currentChannelId ? {
|
|
36
36
|
requesterAccountId: ctx.requesterAccountId,
|
|
37
37
|
currentChannelProvider: ctx.toolContext.currentChannelProvider,
|
|
@@ -73,27 +73,26 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
73
73
|
return result;
|
|
74
74
|
};
|
|
75
75
|
const readTarget = () => {
|
|
76
|
-
const target = readStringParam(params, "channelId") ?? readStringParam(params, "to") ?? readCurrentDiscordTarget(ctx.toolContext);
|
|
76
|
+
const target = readStringParam$1(params, "channelId") ?? readStringParam$1(params, "to") ?? readCurrentDiscordTarget(ctx.toolContext);
|
|
77
77
|
if (!target) throw new Error("Discord channel target is required (use channel:<id>).");
|
|
78
78
|
return target;
|
|
79
79
|
};
|
|
80
80
|
const resolveChannelId = () => resolveDiscordChannelId(readTarget());
|
|
81
81
|
const readSendTarget = () => {
|
|
82
|
-
const target = readStringParam(params, "to") ?? readStringParam(params, "target") ?? readCurrentDiscordTarget(ctx.toolContext);
|
|
82
|
+
const target = readStringParam$1(params, "to") ?? readStringParam$1(params, "target") ?? readCurrentDiscordTarget(ctx.toolContext);
|
|
83
83
|
if (!target) throw new Error("Discord channel target is required (use channel:<id>).");
|
|
84
84
|
return target;
|
|
85
85
|
};
|
|
86
86
|
if (action === "send") {
|
|
87
87
|
const to = readSendTarget();
|
|
88
88
|
const asVoice = readBooleanParam(params, "asVoice") === true;
|
|
89
|
-
const mediaUrl = readStringParam(params, "media", { trim: false }) ?? readStringParam(params, "path", { trim: false }) ?? readStringParam(params, "filePath", { trim: false });
|
|
90
|
-
const requestedContent = readStringParam(params, "message", { allowEmpty: true });
|
|
89
|
+
const mediaUrl = readStringParam$1(params, "media", { trim: false }) ?? readStringParam$1(params, "path", { trim: false }) ?? readStringParam$1(params, "filePath", { trim: false });
|
|
90
|
+
const requestedContent = readStringParam$1(params, "message", { allowEmpty: true });
|
|
91
91
|
const presentation = params.components == null ? normalizeMessagePresentation(params.presentation) : void 0;
|
|
92
|
-
const
|
|
92
|
+
const generatedPresentationComponents = buildDiscordPresentationComponents(presentation ? adaptMessagePresentationForChannel({
|
|
93
93
|
presentation,
|
|
94
94
|
capabilities: DISCORD_PRESENTATION_CAPABILITIES
|
|
95
|
-
}) : void 0;
|
|
96
|
-
const generatedPresentationComponents = buildDiscordPresentationComponents(adaptedPresentation);
|
|
95
|
+
}) : void 0);
|
|
97
96
|
const presentationComponents = generatedPresentationComponents && isDiscordComponentSpecWithinMessageLimit({
|
|
98
97
|
spec: generatedPresentationComponents,
|
|
99
98
|
fallbackText: requestedContent,
|
|
@@ -105,21 +104,21 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
105
104
|
const components = hasComponents ? rawComponents : void 0;
|
|
106
105
|
const rawEmbeds = params.embeds;
|
|
107
106
|
const embeds = Array.isArray(rawEmbeds) ? rawEmbeds : void 0;
|
|
108
|
-
const content = readStringParam(params, "message", {
|
|
107
|
+
const content = readStringParam$1(params, "message", {
|
|
109
108
|
required: !asVoice && !hasComponents && !embeds?.length && !mediaUrl && !presentationFellBack,
|
|
110
109
|
allowEmpty: true
|
|
111
110
|
});
|
|
112
|
-
const deliveryContent = presentationFellBack &&
|
|
111
|
+
const deliveryContent = presentationFellBack && presentation ? renderMessagePresentationFallbackText({
|
|
113
112
|
text: content,
|
|
114
|
-
presentation
|
|
113
|
+
presentation
|
|
115
114
|
}) : content;
|
|
116
|
-
const filename = readStringParam(params, "filename");
|
|
117
|
-
const replyTo = readStringParam(params, "replyTo");
|
|
115
|
+
const filename = readStringParam$1(params, "filename");
|
|
116
|
+
const replyTo = readStringParam$1(params, "replyTo");
|
|
118
117
|
const silent = readBooleanParam(params, "silent") === true;
|
|
119
118
|
const suppressEmbeds = readBooleanParam(params, "suppressEmbeds");
|
|
120
|
-
const sessionKey = readStringParam(params, "__sessionKey");
|
|
121
|
-
const agentId = readStringParam(params, "__agentId");
|
|
122
|
-
const threadName = readStringParam(params, "threadName");
|
|
119
|
+
const sessionKey = readStringParam$1(params, "__sessionKey");
|
|
120
|
+
const agentId = readStringParam$1(params, "__agentId");
|
|
121
|
+
const threadName = readStringParam$1(params, "threadName");
|
|
123
122
|
const result = await handleDiscordAction({
|
|
124
123
|
action: "sendMessage",
|
|
125
124
|
accountId: accountId ?? void 0,
|
|
@@ -142,18 +141,18 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
142
141
|
}
|
|
143
142
|
if (action === "upload-file") {
|
|
144
143
|
const to = readSendTarget();
|
|
145
|
-
const mediaUrl = readStringParam(params, "filePath", { trim: false }) ?? readStringParam(params, "path", { trim: false }) ?? readStringParam(params, "media", { trim: false });
|
|
144
|
+
const mediaUrl = readStringParam$1(params, "filePath", { trim: false }) ?? readStringParam$1(params, "path", { trim: false }) ?? readStringParam$1(params, "media", { trim: false });
|
|
146
145
|
if (!mediaUrl) {
|
|
147
|
-
if (readStringParam(params, "buffer", { trim: false })) throw new Error("Use action: \"send\" for base64 buffer attachments; upload-file requires filePath, path, or media.");
|
|
146
|
+
if (readStringParam$1(params, "buffer", { trim: false })) throw new Error("Use action: \"send\" for base64 buffer attachments; upload-file requires filePath, path, or media.");
|
|
148
147
|
throw new Error("upload-file requires filePath, path, or media.");
|
|
149
148
|
}
|
|
150
|
-
const content = readStringParam(params, "message", { allowEmpty: true }) ?? readStringParam(params, "content", { allowEmpty: true }) ?? readStringParam(params, "caption", { allowEmpty: true });
|
|
151
|
-
const filename = readStringParam(params, "filename");
|
|
152
|
-
const replyTo = readStringParam(params, "replyTo");
|
|
149
|
+
const content = readStringParam$1(params, "message", { allowEmpty: true }) ?? readStringParam$1(params, "content", { allowEmpty: true }) ?? readStringParam$1(params, "caption", { allowEmpty: true });
|
|
150
|
+
const filename = readStringParam$1(params, "filename");
|
|
151
|
+
const replyTo = readStringParam$1(params, "replyTo");
|
|
153
152
|
const silent = readBooleanParam(params, "silent") === true;
|
|
154
153
|
const suppressEmbeds = readBooleanParam(params, "suppressEmbeds");
|
|
155
|
-
const sessionKey = readStringParam(params, "__sessionKey");
|
|
156
|
-
const agentId = readStringParam(params, "__agentId");
|
|
154
|
+
const sessionKey = readStringParam$1(params, "__sessionKey");
|
|
155
|
+
const agentId = readStringParam$1(params, "__agentId");
|
|
157
156
|
const result = await handleDiscordAction({
|
|
158
157
|
action: "sendMessage",
|
|
159
158
|
accountId: accountId ?? void 0,
|
|
@@ -176,7 +175,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
176
175
|
toolContext: ctx.toolContext
|
|
177
176
|
})) ?? "";
|
|
178
177
|
if (!messageId) throw new Error("messageId required. Provide messageId explicitly or react to the current inbound message.");
|
|
179
|
-
const emoji = readStringParam(params, "emoji", { allowEmpty: true });
|
|
178
|
+
const emoji = readStringParam$1(params, "emoji", { allowEmpty: true });
|
|
180
179
|
const remove = readBooleanParam(params, "remove");
|
|
181
180
|
return await handleDiscordAction({
|
|
182
181
|
action: "react",
|
|
@@ -188,8 +187,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
188
187
|
}, cfg, actionOptions);
|
|
189
188
|
}
|
|
190
189
|
if (action === "reactions") {
|
|
191
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
192
|
-
const limit = readPositiveIntegerParam(params, "limit");
|
|
190
|
+
const messageId = readStringParam$1(params, "messageId", { required: true });
|
|
191
|
+
const limit = readPositiveIntegerParam$1(params, "limit");
|
|
193
192
|
return await handleDiscordAction({
|
|
194
193
|
action: "reactions",
|
|
195
194
|
accountId: accountId ?? void 0,
|
|
@@ -199,20 +198,20 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
199
198
|
}, cfg, actionOptions);
|
|
200
199
|
}
|
|
201
200
|
if (action === "read") {
|
|
202
|
-
const limit = readPositiveIntegerParam(params, "limit");
|
|
201
|
+
const limit = readPositiveIntegerParam$1(params, "limit");
|
|
203
202
|
return await handleDiscordAction({
|
|
204
203
|
action: "readMessages",
|
|
205
204
|
accountId: accountId ?? void 0,
|
|
206
205
|
channelId: resolveChannelId(),
|
|
207
206
|
limit,
|
|
208
|
-
before: readStringParam(params, "before"),
|
|
209
|
-
after: readStringParam(params, "after"),
|
|
210
|
-
around: readStringParam(params, "around")
|
|
207
|
+
before: readStringParam$1(params, "before"),
|
|
208
|
+
after: readStringParam$1(params, "after"),
|
|
209
|
+
around: readStringParam$1(params, "around")
|
|
211
210
|
}, cfg, actionOptions);
|
|
212
211
|
}
|
|
213
212
|
if (action === "edit") {
|
|
214
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
215
|
-
const content = readStringParam(params, "message", { required: true });
|
|
213
|
+
const messageId = readStringParam$1(params, "messageId", { required: true });
|
|
214
|
+
const content = readStringParam$1(params, "message", { required: true });
|
|
216
215
|
return await handleDiscordAction({
|
|
217
216
|
action: "editMessage",
|
|
218
217
|
accountId: accountId ?? void 0,
|
|
@@ -222,7 +221,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
222
221
|
}, cfg, actionOptions);
|
|
223
222
|
}
|
|
224
223
|
if (action === "delete") {
|
|
225
|
-
const messageId = readStringParam(params, "messageId", { required: true });
|
|
224
|
+
const messageId = readStringParam$1(params, "messageId", { required: true });
|
|
226
225
|
return await handleDiscordAction({
|
|
227
226
|
action: "deleteMessage",
|
|
228
227
|
accountId: accountId ?? void 0,
|
|
@@ -231,7 +230,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
231
230
|
}, cfg, actionOptions);
|
|
232
231
|
}
|
|
233
232
|
if (action === "pin" || action === "unpin" || action === "list-pins") {
|
|
234
|
-
const messageId = action === "list-pins" ? void 0 : readStringParam(params, "messageId", { required: true });
|
|
233
|
+
const messageId = action === "list-pins" ? void 0 : readStringParam$1(params, "messageId", { required: true });
|
|
235
234
|
return await handleDiscordAction({
|
|
236
235
|
action: action === "pin" ? "pinMessage" : action === "unpin" ? "unpinMessage" : "listPins",
|
|
237
236
|
accountId: accountId ?? void 0,
|
|
@@ -245,11 +244,11 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
245
244
|
channelId: resolveChannelId()
|
|
246
245
|
}, cfg, actionOptions);
|
|
247
246
|
if (action === "thread-create") {
|
|
248
|
-
const name = readStringParam(params, "threadName", { required: true });
|
|
249
|
-
const messageId = readStringParam(params, "messageId");
|
|
250
|
-
const content = readStringParam(params, "message");
|
|
247
|
+
const name = readStringParam$1(params, "threadName", { required: true });
|
|
248
|
+
const messageId = readStringParam$1(params, "messageId");
|
|
249
|
+
const content = readStringParam$1(params, "message");
|
|
251
250
|
const autoArchiveMinutes = readDiscordAutoArchiveDurationParam(params, "autoArchiveMin");
|
|
252
|
-
const appliedTags = readStringArrayParam(params, "appliedTags");
|
|
251
|
+
const appliedTags = readStringArrayParam$1(params, "appliedTags");
|
|
253
252
|
const result = await handleDiscordAction({
|
|
254
253
|
action: "threadCreate",
|
|
255
254
|
accountId: accountId ?? void 0,
|
|
@@ -275,8 +274,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
275
274
|
return result;
|
|
276
275
|
}
|
|
277
276
|
if (action === "sticker") {
|
|
278
|
-
const to = readStringParam(params, "to", { required: true });
|
|
279
|
-
const stickerIds = readStringArrayParam(params, "stickerId", {
|
|
277
|
+
const to = readStringParam$1(params, "to", { required: true });
|
|
278
|
+
const stickerIds = readStringArrayParam$1(params, "stickerId", {
|
|
280
279
|
required: true,
|
|
281
280
|
label: "sticker-id"
|
|
282
281
|
}) ?? [];
|
|
@@ -285,7 +284,8 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
285
284
|
accountId: accountId ?? void 0,
|
|
286
285
|
to,
|
|
287
286
|
stickerIds,
|
|
288
|
-
content: readStringParam(params, "message")
|
|
287
|
+
content: readStringParam$1(params, "message"),
|
|
288
|
+
...readBooleanParam(params, "silent") === true ? { silent: true } : {}
|
|
289
289
|
}, cfg, actionOptions);
|
|
290
290
|
notifyVisibleOutbound(result, to);
|
|
291
291
|
return result;
|
|
@@ -293,11 +293,11 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
293
293
|
if (action === "set-presence") return await handleDiscordAction({
|
|
294
294
|
action: "setPresence",
|
|
295
295
|
accountId: accountId ?? void 0,
|
|
296
|
-
status: readStringParam(params, "status"),
|
|
297
|
-
activityType: readStringParam(params, "activityType"),
|
|
298
|
-
activityName: readStringParam(params, "activityName"),
|
|
299
|
-
activityUrl: readStringParam(params, "activityUrl"),
|
|
300
|
-
activityState: readStringParam(params, "activityState")
|
|
296
|
+
status: readStringParam$1(params, "status"),
|
|
297
|
+
activityType: readStringParam$1(params, "activityType"),
|
|
298
|
+
activityName: readStringParam$1(params, "activityName"),
|
|
299
|
+
activityUrl: readStringParam$1(params, "activityUrl"),
|
|
300
|
+
activityState: readStringParam$1(params, "activityState")
|
|
301
301
|
}, cfg, actionOptions);
|
|
302
302
|
const adminResult = await tryHandleDiscordMessageActionGuildAdmin({
|
|
303
303
|
ctx,
|
|
@@ -307,7 +307,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
307
307
|
});
|
|
308
308
|
if (adminResult !== void 0) {
|
|
309
309
|
if (action === "thread-reply") {
|
|
310
|
-
const threadId = readStringParam(params, "threadId") ?? readTarget();
|
|
310
|
+
const threadId = readStringParam$1(params, "threadId") ?? readTarget();
|
|
311
311
|
notifyVisibleOutbound(adminResult, threadId);
|
|
312
312
|
return withAdoptedThreadReplyRoute(adminResult, threadId);
|
|
313
313
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-BR13IAx6.js";
|
|
2
2
|
export { DiscordChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-Dx1tMTfx.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChannelType } from "discord-api-types/v10";
|
|
2
|
+
//#region extensions/discord/src/channel-type.ts
|
|
3
|
+
function isDiscordThreadChannelType(channelType) {
|
|
4
|
+
return channelType === ChannelType.AnnouncementThread || channelType === ChannelType.PublicThread || channelType === ChannelType.PrivateThread;
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { isDiscordThreadChannelType as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-
|
|
2
|
-
import { n as inspectDiscordAccountTokenState } from "./account-inspect-
|
|
3
|
-
import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
1
|
+
import { h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId, u as resolveDiscordAccountConfig } from "./accounts-CfQ-vSyf.js";
|
|
2
|
+
import { n as inspectDiscordAccountTokenState } from "./account-inspect-BDfKyuvL.js";
|
|
3
|
+
import { i as discordSetupContract, t as createDiscordPluginBase } from "./shared-_5EcP4jW.js";
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-C2sT_n67.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-CzpjLwjy.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as TextInput, Q as RadioGroup, X as Label, Y as CheckboxGroup, Z as Modal, at as MediaGallery, ct as Row, dt as StringSelectMenu, et as Button, ft as TextDisplay, gt as parseCustomId, it as LinkButton, lt as Section, mt as UserSelectMenu, nt as Container, on as __exportAll, ot as MentionableSelectMenu, pt as Thumbnail, rt as File, st as RoleSelectMenu, tt as ChannelSelectMenu, ut as Separator } from "./retry-Cv4jCU5Z.js";
|
|
2
2
|
import { ButtonStyle, MessageFlags, TextInputStyle } from "discord-api-types/v10";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { legacyInteractiveReplyToPresentation, resolveMessagePresentationActionValue, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
6
6
|
import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
|
|
7
7
|
//#region extensions/discord/src/custom-id-codec.ts
|
|
8
8
|
/**
|
|
@@ -230,6 +230,7 @@ function parseButtonSpec(raw, label) {
|
|
|
230
230
|
callbackDataKind: readOptionalCallbackDataKind(obj.callbackDataKind, `${label}.callbackDataKind`),
|
|
231
231
|
emoji: readOptionalEmoji(obj.emoji, `${label}.emoji`),
|
|
232
232
|
disabled: typeof obj.disabled === "boolean" ? obj.disabled : void 0,
|
|
233
|
+
reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
|
|
233
234
|
allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
|
|
234
235
|
};
|
|
235
236
|
}
|
|
@@ -396,7 +397,6 @@ function readDiscordComponentSpec(raw) {
|
|
|
396
397
|
const blocksRaw = obj.blocks;
|
|
397
398
|
const blocks = Array.isArray(blocksRaw) ? blocksRaw.map((entry, idx) => parseComponentBlock(entry, `components.blocks[${idx}]`)) : void 0;
|
|
398
399
|
const modalRaw = obj.modal;
|
|
399
|
-
const reusable = typeof obj.reusable === "boolean" ? obj.reusable : void 0;
|
|
400
400
|
let modal;
|
|
401
401
|
if (modalRaw !== void 0) {
|
|
402
402
|
const modalObj = requireObject(modalRaw, "components.modal");
|
|
@@ -415,7 +415,7 @@ function readDiscordComponentSpec(raw) {
|
|
|
415
415
|
}
|
|
416
416
|
return {
|
|
417
417
|
text: normalizeOptionalString(obj.text),
|
|
418
|
-
reusable,
|
|
418
|
+
reusable: typeof obj.reusable === "boolean" ? obj.reusable : void 0,
|
|
419
419
|
container: typeof obj.container === "object" && obj.container && !Array.isArray(obj.container) ? {
|
|
420
420
|
accentColor: obj.container.accentColor,
|
|
421
421
|
spoiler: typeof obj.container.spoiler === "boolean" ? obj.container.spoiler : void 0
|
|
@@ -994,23 +994,7 @@ function appendDiscordSelectBlock(blocks, block) {
|
|
|
994
994
|
* @deprecated Use buildDiscordPresentationComponents with MessagePresentation.
|
|
995
995
|
*/
|
|
996
996
|
function buildDiscordInteractiveComponents(interactive) {
|
|
997
|
-
|
|
998
|
-
if (block.type === "text") {
|
|
999
|
-
const text = block.text.trim();
|
|
1000
|
-
if (text) state.push({
|
|
1001
|
-
type: "text",
|
|
1002
|
-
text
|
|
1003
|
-
});
|
|
1004
|
-
return state;
|
|
1005
|
-
}
|
|
1006
|
-
if (block.type === "buttons") {
|
|
1007
|
-
appendDiscordButtonBlocks(state, block.buttons);
|
|
1008
|
-
return state;
|
|
1009
|
-
}
|
|
1010
|
-
if (block.type === "select") appendDiscordSelectBlock(state, block);
|
|
1011
|
-
return state;
|
|
1012
|
-
});
|
|
1013
|
-
return blocks.length > 0 ? { blocks } : void 0;
|
|
997
|
+
return buildDiscordPresentationComponents(interactive ? legacyInteractiveReplyToPresentation(interactive) : void 0);
|
|
1014
998
|
}
|
|
1015
999
|
function buildDiscordPresentationComponents(presentation) {
|
|
1016
1000
|
if (!presentation) return;
|
|
@@ -1021,7 +1005,7 @@ function buildDiscordPresentationComponents(presentation) {
|
|
|
1021
1005
|
});
|
|
1022
1006
|
for (const block of presentation.blocks) {
|
|
1023
1007
|
if (block.type === "text" || block.type === "context") {
|
|
1024
|
-
const text = block.text
|
|
1008
|
+
const text = block.text;
|
|
1025
1009
|
if (text) blocks.push({
|
|
1026
1010
|
type: "text",
|
|
1027
1011
|
text: block.type === "context" ? `-# ${text}` : text
|
package/dist/{conversation-binding-route-D6rCQ5S0.js → conversation-binding-route-DJYrY2TQ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as shouldIgnoreStaleDiscordRouteBinding } from "./outbound-session-route-Cg15ZFJd.js";
|
|
2
2
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
3
3
|
import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
4
4
|
//#region extensions/discord/src/monitor/conversation-binding-route.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId } from "./accounts-
|
|
1
|
+
import { on as __exportAll } from "./retry-Cv4jCU5Z.js";
|
|
2
|
+
import { l as resolveDiscordAccountAllowFrom, o as mergeDiscordAccountConfig, s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
5
5
|
//#region extensions/discord/src/directory-config.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BK6eqekJ.js";
|
|
2
2
|
//#region extensions/discord/directory-contract-api.ts
|
|
3
3
|
const discordDirectoryContractPlugin = {
|
|
4
4
|
id: "discord",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as resolveDiscordAccount, m as normalizeDiscordToken } from "./accounts-
|
|
1
|
+
import { on as __exportAll } from "./retry-Cv4jCU5Z.js";
|
|
2
|
+
import { c as resolveDiscordAccount, m as normalizeDiscordToken } from "./accounts-CfQ-vSyf.js";
|
|
3
3
|
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-DNVbJyEy.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-BDMimASD.js";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as resolveDefaultDiscordAccountId } from "./accounts-
|
|
2
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
3
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
4
|
-
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-
|
|
1
|
+
import { s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
|
|
2
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-BR11iHA4.js";
|
|
3
|
+
import { t as inspectDiscordAccount } from "./account-inspect-BDfKyuvL.js";
|
|
4
|
+
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-_5EcP4jW.js";
|
|
5
5
|
import { n as normalizeCompatibilityConfig } from "./doctor-contract-DsWvKIXF.js";
|
|
6
6
|
import { t as isDiscordMutableAllowEntry } from "./security-doctor-nGgPm65L.js";
|
|
7
7
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
@@ -3,8 +3,8 @@ import { a as THREAD_BINDINGS_MAX_ENTRIES, d as normalizePersistedBinding, k as
|
|
|
3
3
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DsWvKIXF.js";
|
|
4
4
|
import { i as sanitizeRecentModels, r as preferenceTimestampMs, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-BHT1LkR_.js";
|
|
5
5
|
import { MAX_DATE_TIMESTAMP_MS, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
6
|
-
import { definePluginDoctorMigrationFromPlans } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
7
6
|
import path from "node:path";
|
|
7
|
+
import { definePluginDoctorMigrationFromPlans } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
//#region extensions/discord/src/monitor/model-picker-preferences-migrations.ts
|
|
10
10
|
const PREFERENCE_MAX_ENTRIES = 2e3;
|
package/dist/{handle-action.guild-admin-6Tvvinsa.js → handle-action.guild-admin-BdwCRHmm.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { c as readDiscordChannelMoveParams, n as isDiscordModerationAction, o as readDiscordChannelCreateParams, r as readDiscordModerationCommand, s as readDiscordChannelEditParams, t as handleDiscordAction } from "./runtime-BHrTlFkf.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
|
-
import {
|
|
3
|
+
import { m as isTrustedRequesterGuildAdminAction } from "./outbound-session-route-Cg15ZFJd.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
+
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
5
6
|
import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
6
7
|
//#region extensions/discord/src/actions/handle-action.guild-admin.ts
|
|
7
8
|
function readDiscordRequesterSenderId(ctx) {
|
|
@@ -36,11 +37,13 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
36
37
|
}, cfg, readPolicyOptions);
|
|
37
38
|
}
|
|
38
39
|
if (action === "emoji-list") {
|
|
39
|
-
const guildId = readStringParam(actionParams, "guildId"
|
|
40
|
+
const guildId = readStringParam(actionParams, "guildId");
|
|
41
|
+
const limit = readPositiveIntegerParam(actionParams, "limit");
|
|
40
42
|
return await handleDiscordAction({
|
|
41
43
|
action: "emojiList",
|
|
42
44
|
accountId: accountId ?? void 0,
|
|
43
|
-
guildId
|
|
45
|
+
...guildId ? { guildId } : { channelId: resolveChannelId() },
|
|
46
|
+
...limit ? { limit } : {}
|
|
44
47
|
}, cfg, readPolicyOptions);
|
|
45
48
|
}
|
|
46
49
|
if (action === "emoji-upload") {
|
|
@@ -283,7 +286,8 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
283
286
|
channelId,
|
|
284
287
|
content,
|
|
285
288
|
mediaUrl: mediaUrl ?? void 0,
|
|
286
|
-
replyTo: replyTo ?? void 0
|
|
289
|
+
replyTo: replyTo ?? void 0,
|
|
290
|
+
...readBooleanParam(actionParams, "silent") === true ? { silent: true } : {}
|
|
287
291
|
}, cfg, actionOptions);
|
|
288
292
|
}
|
|
289
293
|
if (action === "search") {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as registerDiscordActivities } from "./activities-api-
|
|
1
|
+
import { t as registerDiscordActivities } from "./activities-api-q-9PaaHH.js";
|
|
2
2
|
import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
|
|
3
3
|
import { registerDiscordTranscriptSourceProvider } from "./transcripts-source-api.js";
|
|
4
4
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
2
|
-
import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-
|
|
3
|
-
import { _ as mapGatewayDispatchData } from "./provider-
|
|
4
|
-
import { i as resolveDiscordMessageText, l as
|
|
2
|
+
import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-ByOtwjo_.js";
|
|
3
|
+
import { _ as mapGatewayDispatchData } from "./provider-B11xwilq.js";
|
|
4
|
+
import { d as resolveDiscordCdnPolicy, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordMessageChannelId } from "./message-text-aiwO5R2F.js";
|
|
5
5
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
6
6
|
import { GatewayDispatchEvents } from "discord-api-types/v10";
|
|
7
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -248,7 +248,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
|
|
|
248
248
|
}
|
|
249
249
|
//#endregion
|
|
250
250
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
251
|
-
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process
|
|
251
|
+
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-3HEzmemS.js"));
|
|
252
252
|
async function processDiscordQueuedMessage(params) {
|
|
253
253
|
const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
|
|
254
254
|
try {
|
|
@@ -335,7 +335,7 @@ function createDiscordMessageRunQueue(params) {
|
|
|
335
335
|
}
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region extensions/discord/src/monitor/message-dispatcher.ts
|
|
338
|
-
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-
|
|
338
|
+
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-Ba5LAY_X.js"));
|
|
339
339
|
function isNonEmptyString(value) {
|
|
340
340
|
return typeof value === "string" && value.length > 0;
|
|
341
341
|
}
|
package/dist/{message-handler.preflight-Bzg_Hawz.js → message-handler.preflight-Ba5LAY_X.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as resolveDefaultDiscordAccountId } from "./accounts-
|
|
1
|
+
import { W as Message, jt as getChannelMessage, y as discord_exports } from "./retry-Cv4jCU5Z.js";
|
|
2
|
+
import { s as resolveDefaultDiscordAccountId } from "./accounts-CfQ-vSyf.js";
|
|
3
3
|
import { C as resolveTimestampMs, S as resolveDiscordSystemLocation, _ as resolveDiscordShouldRequireMention, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, f as resolveDiscordGuildEntry, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, p as resolveDiscordMemberAccessState, v as resolveGroupDmAllow, x as formatDiscordUserTag } from "./allow-list-BDMimASD.js";
|
|
4
|
+
import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
|
|
4
5
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-B9cy6RvQ.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-
|
|
7
|
-
import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-
|
|
8
|
-
import { b as resolveDiscordDmCommandAccess, g as handleDiscordDmCommandDecision, x as resolveDiscordTextCommandAccess } from "./provider-
|
|
9
|
-
import {
|
|
6
|
+
import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Cg15ZFJd.js";
|
|
7
|
+
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DJYrY2TQ.js";
|
|
8
|
+
import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-ByOtwjo_.js";
|
|
9
|
+
import { b as resolveDiscordDmCommandAccess, g as handleDiscordDmCommandDecision, x as resolveDiscordTextCommandAccess } from "./provider-B11xwilq.js";
|
|
10
|
+
import { f as resolveDiscordChannelInfo, i as resolveDiscordMessageText, o as resolveForwardedMediaList, p as resolveDiscordMessageChannelId, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-aiwO5R2F.js";
|
|
10
11
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BJtfyise.js";
|
|
11
12
|
import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
12
13
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -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-C49MFF9j.js").then((n) => n.t));
|
|
32
33
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
33
34
|
return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
|
|
34
35
|
}
|
|
@@ -401,9 +402,6 @@ function isBoundThreadBotSystemMessage(params) {
|
|
|
401
402
|
if (!text) return false;
|
|
402
403
|
return DISCORD_BOUND_THREAD_SYSTEM_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
403
404
|
}
|
|
404
|
-
function isDiscordThreadChannelType(type) {
|
|
405
|
-
return type === discord_exports.ChannelType.PublicThread || type === discord_exports.ChannelType.PrivateThread || type === discord_exports.ChannelType.AnnouncementThread;
|
|
406
|
-
}
|
|
407
405
|
function isDiscordThreadChannelMessage(params) {
|
|
408
406
|
if (!params.isGuildMessage) return false;
|
|
409
407
|
const channel = "channel" in params.message ? params.message.channel : void 0;
|
|
@@ -489,10 +487,10 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
489
487
|
}
|
|
490
488
|
//#endregion
|
|
491
489
|
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
492
|
-
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-
|
|
490
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-Tiyl70dx.js").then((n) => n.n));
|
|
493
491
|
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.js"));
|
|
494
|
-
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-
|
|
495
|
-
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-
|
|
492
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-C7yxaHWP.js"));
|
|
493
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-agH1T_6s.js").then((n) => n.t));
|
|
496
494
|
function isPreflightAborted(abortSignal) {
|
|
497
495
|
return Boolean(abortSignal?.aborted);
|
|
498
496
|
}
|
|
@@ -707,7 +705,7 @@ async function preflightDiscordMessage(params) {
|
|
|
707
705
|
channelType: channelInfo?.type
|
|
708
706
|
});
|
|
709
707
|
const messageText = resolveDiscordMessageText(message, { includeForwarded: true });
|
|
710
|
-
const injectedBoundThreadBinding = !isDirectMessage && !isGroupDm ? resolveInjectedBoundThreadLookupRecord({
|
|
708
|
+
const injectedBoundThreadBinding = !isDirectMessage && !isGroupDm && (webhookId || author.bot) ? resolveInjectedBoundThreadLookupRecord({
|
|
711
709
|
threadBindings: params.threadBindings,
|
|
712
710
|
threadId: messageChannelId
|
|
713
711
|
}) : void 0;
|