@openclaw/discord 2026.10.10-beta.5 → 2026.11.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/.setup/{account-inspect-8cCu6uPG.mjs → account-inspect-X_Xlr42B.mjs} +2 -3
- package/dist/.setup/{accounts-ljrzXBJi.mjs → accounts-C18HNgge.mjs} +4 -8
- package/dist/.setup/{active-turn-thread-route-C4tp9noA.mjs → active-turn-thread-route-BAc_Xik-.mjs} +1 -2
- package/dist/.setup/{allow-list-B_ToXtew.mjs → allow-list-D1ZGfhXh.mjs} +5 -10
- package/dist/.setup/{api-CtmE1OUN.mjs → api-Bth1wKF9.mjs} +3 -5
- package/dist/.setup/{approval-handler.runtime-Db06VTbO.mjs → approval-handler.runtime-krznjTz9.mjs} +8 -9
- package/dist/.setup/{approval-message-updates-wbUqLtLI.mjs → approval-message-updates-Cks-MSCJ.mjs} +3 -4
- package/dist/.setup/{audit-BXOSwPCj.mjs → audit-Dw_rAZIz.mjs} +6 -7
- package/dist/.setup/{channel-D2pO9g6n.mjs → channel-DwvRHJL0.mjs} +33 -41
- package/dist/.setup/{channel-access-DasWY_OV.mjs → channel-access-BPrWoEXM.mjs} +1 -2
- package/dist/.setup/{channel.setup-5fHTqcKz.mjs → channel.setup-BHjvtK1U.mjs} +8 -12
- package/dist/.setup/{command-deploy-store-DFkBTViB.mjs → command-deploy-store-DPWiBMks.mjs} +1 -2
- package/dist/.setup/{command-owners-C7rUdqUX.mjs → command-owners-BzlhNBxA.mjs} +1 -2
- package/dist/.setup/{components-C_cuoW1q.mjs → components-BvOWSPxr.mjs} +11 -20
- package/dist/.setup/{config-schema-_uBILpQf.mjs → config-schema-Coyq5wOr.mjs} +3 -5
- package/dist/.setup/{conversation-binding-route-Dcqrf96n.mjs → conversation-binding-route-DOPUZNYo.mjs} +2 -3
- package/dist/.setup/{directory-config-3iVub-3m.mjs → directory-config-CIqVnQtn.mjs} +3 -4
- package/dist/.setup/{directory-live-DLygQVtW.mjs → directory-live-DUuPEWub.mjs} +7 -10
- package/dist/.setup/{discord-Cl2OPTZ6.mjs → discord-eFlHX1Gn.mjs} +35 -68
- package/dist/.setup/{doctor-t9tc4fim.mjs → doctor-Cg_N6ZOI.mjs} +8 -9
- package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
- package/dist/.setup/{handle-action-CRH5-aLm.mjs → handle-action-DXY91jF-.mjs} +10 -11
- package/dist/.setup/{handle-action.guild-admin-BCWdfNPn.mjs → handle-action.guild-admin-BvBCfhXF.mjs} +3 -4
- package/dist/.setup/{live-policy-config-BPoB3eQi.mjs → live-policy-config-DO1Fk2hp.mjs} +3 -5
- package/dist/.setup/{message-handler-BvzZOXLT.mjs → message-handler-TR7l1P3P.mjs} +15 -19
- package/dist/.setup/{message-handler.preflight-DD0kun2e.mjs → message-handler.preflight-DxGb4zsm.mjs} +20 -28
- package/dist/.setup/{message-handler.preflight-pluralkit-DQygfoVJ.mjs → message-handler.preflight-pluralkit-BTE5JebL.mjs} +10 -14
- package/dist/.setup/{message-handler.process-1dRMGRR1.mjs → message-handler.process-DVHZKc2e.mjs} +33 -47
- package/dist/.setup/{outbound-adapter-gpo_85fY.mjs → outbound-adapter-DWyAWBFh.mjs} +13 -19
- package/dist/.setup/{outbound-session-route-D-qWvLfS.mjs → outbound-session-route-TFBPPkoz.mjs} +21 -32
- package/dist/.setup/{output-activity-uBpMSX75.mjs → output-activity-CDgs2s3O.mjs} +1 -2
- package/dist/.setup/{pluralkit-B64dfq_j.mjs → pluralkit-DcXbHTpQ.mjs} +2 -3
- package/dist/.setup/{preflight-audio-wWgsZG5F.mjs → preflight-audio-CwtPIsvk.mjs} +1 -2
- package/dist/.setup/{presence-cache-DCeTsL73.mjs → presence-cache-CgutE4NN.mjs} +1 -2
- package/dist/.setup/{probe-D3P1x4aN.mjs → probe-DNge7OEP.mjs} +5 -6
- package/dist/.setup/{provider-D2gXZbGd.mjs → provider-C61K7HHq.mjs} +119 -209
- package/dist/.setup/{provider-session.runtime-3bl84wqI.mjs → provider-session.runtime-D87e36ut.mjs} +3 -3
- package/dist/.setup/provider.runtime-xk5CVdoI.mjs +1 -0
- package/dist/.setup/{realtime-session.runtime-Cw2Nz11j.mjs → realtime-session.runtime-D1YHKwbc.mjs} +14 -23
- package/dist/.setup/{receive-recovery-CKvaG2Hf.mjs → receive-recovery-C77CVdGM.mjs} +3 -6
- package/dist/.setup/{resolve-allowlist-common-DNSsUQRF.mjs → resolve-allowlist-common-CI77288n.mjs} +5 -7
- package/dist/.setup/{resolve-channels-UdT38DzU.mjs → resolve-channels-DYc6-xgV.mjs} +5 -6
- package/dist/.setup/{resolve-users-DnCsrXZ_.mjs → resolve-users-BQT7XWF2.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-By-vo8b-.mjs → runtime-CI0UJqeS.mjs} +23 -35
- package/dist/.setup/{runtime-BRsj76Px.mjs → runtime-CcijhTJT.mjs} +4 -6
- package/dist/.setup/{runtime-DgnVQ7zW.mjs → runtime-DcBvHOm1.mjs} +1 -2
- package/dist/.setup/{runtime-doctor-migrations-BPV-R4G9.mjs → runtime-doctor-migrations-BpV1jKk0.mjs} +5 -9
- package/dist/.setup/{secret-config-contract-CIsH7R3B.mjs → secret-config-contract-B7UlqVYr.mjs} +2 -3
- package/dist/.setup/{security-audit-BFT84Uny.mjs → security-audit-CTwisG7c.mjs} +3 -4
- package/dist/.setup/{security-contract-DNyyjTZZ.mjs → security-contract-D-o0iWDk.mjs} +1 -2
- package/dist/.setup/{security-doctor-nGgPm65L.mjs → security-doctor-4s7omTZd.mjs} +1 -2
- package/dist/.setup/{send-Ca810XtV.mjs → send-Cbq-IVsS.mjs} +18 -28
- package/dist/.setup/{send.components-DxpLdHrr.mjs → send.components-BV6ucNpJ.mjs} +10 -13
- package/dist/.setup/{send.outbound-ByYCrfta.mjs → send.outbound-CGhBhzjQ.mjs} +9 -13
- package/dist/.setup/{send.receipt-DkwJ1h9E.mjs → send.receipt-Dw-_r5Bx.mjs} +9 -16
- package/dist/.setup/{send.shared-C2J1g_uJ.mjs → send.shared-D4MioxW_.mjs} +14 -23
- package/dist/.setup/{sender-identity-BNBvGt1l.mjs → sender-identity-DrN5c4ec.mjs} +2 -3
- package/dist/.setup/{session-contract-BO5tlIdl.mjs → session-contract-Bq71MS78.mjs} +1 -2
- package/dist/.setup/{session-key-normalization-CCHGNSQw.mjs → session-key-normalization-Cfvze5hd.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-DGfQO4Ec.mjs +2 -0
- package/dist/.setup/{shared-DbNfsfcr.mjs → shared-_o59Fvrr.mjs} +15 -19
- package/dist/.setup/{subagent-hooks-BhV5ZVej.mjs → subagent-hooks-mQbDkvuD.mjs} +3 -4
- package/dist/.setup/{system-events-DGsxf-l9.mjs → system-events-2zc2eGfF.mjs} +3 -4
- package/dist/.setup/{target-parsing-C-HyNxcE.mjs → target-parsing-BiuhcK9Q.mjs} +1 -2
- package/dist/.setup/{target-resolver-BxRZHPL3.mjs → target-resolver-CAHeVfmZ.mjs} +6 -7
- package/dist/.setup/targets-BaklhOqq.mjs +3 -0
- package/dist/.setup/{thread-binding-api-BDZJD4na.mjs → thread-binding-api-Drd4Zu-5.mjs} +1 -2
- package/dist/.setup/{thread-bindings-c0WwzyHH.mjs → thread-bindings-Dg7X_ZXP.mjs} +8 -11
- package/dist/.setup/{thread-bindings.manager-B7HFHXrI.mjs → thread-bindings.manager-DCDYksah.mjs} +15 -20
- package/dist/.setup/{thread-bindings.session-updates-BMdJeJMc.mjs → thread-bindings.session-updates-C76plLS3.mjs} +5 -9
- package/dist/.setup/{threading-DJjzMR2f.mjs → threading-BKn_OF3K.mjs} +6 -9
- package/dist/.setup/{timeouts-CuNARfyw.mjs → timeouts-DTrUsJ_W.mjs} +1 -2
- package/dist/.setup/{transcripts-source-MRAZocrc.mjs → transcripts-source-BSorJ4AS.mjs} +25 -39
- package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
- package/dist/.setup/{voice-runtime-_LfZ3Za7.mjs → voice-runtime-B5m2Ryg8.mjs} +33 -55
- package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +13 -20
- package/dist/api.js +21 -22
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/directory-contract-api.js +2 -3
- package/dist/doctor-contract-api.js +5 -7
- package/dist/index.js +1 -2
- package/dist/runtime-api.js +22 -22
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-entry.js +2 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +8 -14
- package/dist/subagent-hooks-api.js +2 -3
- package/dist/thread-binding-api.js +1 -1
- package/dist/transcripts-source-api.js +2 -3
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +13 -6
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +46 -14
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +65 -28
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +7 -5
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +6 -1
- package/package.json +5 -5
- package/dist/.setup/provider.runtime-BI_CV9tI.mjs +0 -1
- package/dist/.setup/setup-plugin-api-D5VV8xTN.mjs +0 -2
- package/dist/.setup/targets-C0qD28Sz.mjs +0 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { D as getDiscordEndpointRuntime, O as resolveDiscordEndpointAttachmentGuard, T as parseDiscordRetryAfterBodySeconds } from "./allow-list-
|
|
3
|
-
import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, I as resolveDiscordClientAccountContext, L as resolveDiscordRest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, R as DISCORD_REST_TIMEOUT_MS, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-
|
|
4
|
-
import { B as isUnknownDiscordVoiceStateError, G as withDiscordRequestAuthority, H as readDiscordMessage, L as DiscordError, R as RateLimitError, U as readRetryAfter, V as readDiscordCode, _t as getGuild, at as createOwnMessageReaction, bt as listGuildEmojis, dt as editChannelMessage, ft as getChannel, gt as unpinChannelMessage, ht as pinChannelMessage, lt as createThread, ot as deleteOwnMessageReaction, pt as getChannelMessage, st as listMessageReactionUsers, ut as deleteChannelMessage, vt as getGuildMember, xt as stripUndefinedFields, yt as getGuildVoiceState, z as isUnknownDiscordMessageError } from "./discord-
|
|
5
|
-
import { _ as recordDiscordMessageCreateAmbiguity, a as createReusableDiscordReplyReference, h as createDiscordRetryRunner, m as classifyDiscordDeliveryFailure, n as createDiscordSendReceiptFromResults, o as resolveDiscordReplyMessageId, r as createDiscordSendResult, v as chunkDiscordTextWithMode } from "./send.receipt-
|
|
6
|
-
import { o as parseDiscordHttpErrorBody } from "./api-
|
|
7
|
-
import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
8
|
-
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { D as getDiscordEndpointRuntime, O as resolveDiscordEndpointAttachmentGuard, T as parseDiscordRetryAfterBodySeconds } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { C as hasAnyChannelPermissionDiscord, D as createDiscordMessageNonce, I as resolveDiscordClientAccountContext, L as resolveDiscordRest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, R as DISCORD_REST_TIMEOUT_MS, S as hasAllGuildPermissionsDiscord, _ as canManageGuildMemberRoleDiscord, a as normalizeEmojiName, b as fetchChannelPermissionsDiscord, c as resolveChannelId, d as sendDiscordChunks, g as DiscordSendError, h as DISCORD_MAX_STICKER_BYTES, j as resolveDiscordSuppressEmbeds, m as DISCORD_MAX_EVENT_COVER_BYTES, n as buildDiscordTextChunks, o as normalizeReactionEmoji, p as DISCORD_MAX_EMOJI_BYTES, r as buildReactionIdentifier, t as buildDiscordSendError, v as canManageGuildRoleDiscord, w as hasAnyGuildPermissionDiscord, x as fetchMemberGuildPermissionsDiscord, y as canViewDiscordGuildChannel } from "./send.shared-D4MioxW_.mjs";
|
|
4
|
+
import { B as isUnknownDiscordVoiceStateError, G as withDiscordRequestAuthority, H as readDiscordMessage, L as DiscordError, R as RateLimitError, U as readRetryAfter, V as readDiscordCode, _t as getGuild, at as createOwnMessageReaction, bt as listGuildEmojis, dt as editChannelMessage, ft as getChannel, gt as unpinChannelMessage, ht as pinChannelMessage, lt as createThread, ot as deleteOwnMessageReaction, pt as getChannelMessage, st as listMessageReactionUsers, ut as deleteChannelMessage, vt as getGuildMember, xt as stripUndefinedFields, yt as getGuildVoiceState, z as isUnknownDiscordMessageError } from "./discord-eFlHX1Gn.mjs";
|
|
5
|
+
import { _ as recordDiscordMessageCreateAmbiguity, a as createReusableDiscordReplyReference, h as createDiscordRetryRunner, m as classifyDiscordDeliveryFailure, n as createDiscordSendReceiptFromResults, o as resolveDiscordReplyMessageId, r as createDiscordSendResult, v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
6
|
+
import { o as parseDiscordHttpErrorBody } from "./api-Bth1wKF9.mjs";
|
|
7
|
+
import { a as prepareDiscordOutboundText, n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-CGhBhzjQ.mjs";
|
|
8
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS } from "./timeouts-DTrUsJ_W.mjs";
|
|
9
9
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
10
|
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -24,7 +24,7 @@ import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
|
24
24
|
import fs from "node:fs/promises";
|
|
25
25
|
import path from "node:path";
|
|
26
26
|
import { writeExternalFileWithinRoot } from "openclaw/plugin-sdk/security-runtime";
|
|
27
|
-
|
|
27
|
+
// extensions/discord/src/send.channels.ts
|
|
28
28
|
async function createChannelDiscord(payload, opts) {
|
|
29
29
|
const rest = resolveDiscordRest(opts);
|
|
30
30
|
const body = stripUndefinedFields({
|
|
@@ -90,8 +90,7 @@ async function removeChannelPermissionDiscord(channelId, targetId, opts) {
|
|
|
90
90
|
await resolveDiscordRest(opts).delete(Routes.channelPermission(channelId, targetId));
|
|
91
91
|
return { ok: true };
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region extensions/discord/src/send.emojis-stickers.ts
|
|
93
|
+
// extensions/discord/src/send.emojis-stickers.ts
|
|
95
94
|
const DISCORD_IMAGE_UPLOAD_TYPES = [
|
|
96
95
|
"image/png",
|
|
97
96
|
"image/jpeg",
|
|
@@ -149,8 +148,7 @@ async function uploadStickerDiscord(payload, opts) {
|
|
|
149
148
|
}
|
|
150
149
|
});
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
//#region extensions/discord/src/send.guild.ts
|
|
151
|
+
// extensions/discord/src/send.guild.ts
|
|
154
152
|
function readDiscordResource(read) {
|
|
155
153
|
return async (id, opts) => await read(resolveDiscordRest(opts), id);
|
|
156
154
|
}
|
|
@@ -229,8 +227,7 @@ async function banMemberDiscord(payload, opts) {
|
|
|
229
227
|
});
|
|
230
228
|
return { ok: true };
|
|
231
229
|
}
|
|
232
|
-
|
|
233
|
-
//#region extensions/discord/src/send.messages.ts
|
|
230
|
+
// extensions/discord/src/send.messages.ts
|
|
234
231
|
const DISCORD_THREAD_TRANSPORT_ONLY_MAX_LINES = Number.MAX_SAFE_INTEGER;
|
|
235
232
|
function resolveDiscordThreadStarterMessageId(thread) {
|
|
236
233
|
const starterMessage = "message" in thread ? thread.message : void 0;
|
|
@@ -421,8 +418,7 @@ async function searchMessagesDiscord(query, opts) {
|
|
|
421
418
|
if (!Array.isArray(result.messages)) throw new Error("Unexpected Discord response for message search: expected messages array.");
|
|
422
419
|
return result;
|
|
423
420
|
}
|
|
424
|
-
|
|
425
|
-
//#region extensions/discord/src/send.webhook.ts
|
|
421
|
+
// extensions/discord/src/send.webhook.ts
|
|
426
422
|
const DISCORD_WEBHOOK_ERROR_BODY_LIMIT_BYTES = 8192;
|
|
427
423
|
const DISCORD_WEBHOOK_TIMEOUT_MS = DISCORD_REST_TIMEOUT_MS;
|
|
428
424
|
function throwIfWebhookDeadlineExpired(signal) {
|
|
@@ -547,8 +543,7 @@ async function sendWebhookMessageDiscord(text, opts) {
|
|
|
547
543
|
deadline.cleanup();
|
|
548
544
|
}
|
|
549
545
|
}
|
|
550
|
-
|
|
551
|
-
//#region extensions/discord/src/voice-message.ts
|
|
546
|
+
// extensions/discord/src/voice-message.ts
|
|
552
547
|
const WAVEFORM_SAMPLES = 256;
|
|
553
548
|
const DISCORD_OPUS_SAMPLE_RATE_HZ = 48e3;
|
|
554
549
|
const DISCORD_VOICE_ERROR_BODY_LIMIT_BYTES = 8192;
|
|
@@ -817,8 +812,7 @@ async function sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, r
|
|
|
817
812
|
throw error;
|
|
818
813
|
}
|
|
819
814
|
}
|
|
820
|
-
|
|
821
|
-
//#region extensions/discord/src/send.voice.ts
|
|
815
|
+
// extensions/discord/src/send.voice.ts
|
|
822
816
|
/** Discord voice messages require OGG/Opus audio with a waveform and cannot include text. */
|
|
823
817
|
async function sendVoiceMessageDiscord(to, audioPath, opts) {
|
|
824
818
|
return await withDiscordRequestAuthority(opts.assertPlatformSendAuthorized, async () => {
|
|
@@ -878,8 +872,7 @@ async function sendVoiceMessageDiscord(to, audioPath, opts) {
|
|
|
878
872
|
});
|
|
879
873
|
});
|
|
880
874
|
}
|
|
881
|
-
|
|
882
|
-
//#region extensions/discord/src/send.typing.ts
|
|
875
|
+
// extensions/discord/src/send.typing.ts
|
|
883
876
|
async function sendTypingDiscord(channelId, opts) {
|
|
884
877
|
await resolveDiscordRest(opts).post(Routes.channelTyping(channelId));
|
|
885
878
|
return {
|
|
@@ -887,8 +880,7 @@ async function sendTypingDiscord(channelId, opts) {
|
|
|
887
880
|
channelId
|
|
888
881
|
};
|
|
889
882
|
}
|
|
890
|
-
|
|
891
|
-
//#region extensions/discord/src/send.reactions.ts
|
|
883
|
+
// extensions/discord/src/send.reactions.ts
|
|
892
884
|
function resolveDiscordReactionClient(opts) {
|
|
893
885
|
if (opts.rest && opts.cfg && opts.accountId) return createDiscordClient(opts);
|
|
894
886
|
const cfg = requireRuntimeConfig(opts.cfg, "Discord reactions");
|
|
@@ -952,8 +944,7 @@ async function fetchReactionsDiscord(channelId, messageId, opts) {
|
|
|
952
944
|
}
|
|
953
945
|
return summaries;
|
|
954
946
|
}
|
|
955
|
-
|
|
956
|
-
//#region extensions/discord/src/send.ts
|
|
947
|
+
// extensions/discord/src/send.ts
|
|
957
948
|
var send_exports = /* @__PURE__ */ __exportAll({
|
|
958
949
|
DiscordSendError: () => DiscordSendError,
|
|
959
950
|
DiscordThreadInitialMessageError: () => DiscordThreadInitialMessageError,
|
|
@@ -1009,5 +1000,4 @@ var send_exports = /* @__PURE__ */ __exportAll({
|
|
|
1009
1000
|
uploadEmojiDiscord: () => uploadEmojiDiscord,
|
|
1010
1001
|
uploadStickerDiscord: () => uploadStickerDiscord
|
|
1011
1002
|
});
|
|
1012
|
-
//#endregion
|
|
1013
1003
|
export { listScheduledEventsDiscord as A, moveChannelDiscord as B, fetchChannelInfoDiscord as C, fetchVoiceStatusDiscord as D, fetchRoleInfoDiscord as E, uploadEmojiDiscord as F, setChannelPermissionDiscord as H, uploadStickerDiscord as I, createChannelDiscord as L, resolveEventCoverImage as M, timeoutMemberDiscord as N, kickMemberDiscord as O, listGuildEmojisDiscord as P, deleteChannelDiscord as R, createScheduledEventDiscord as S, fetchMemberInfoDiscord as T, removeChannelPermissionDiscord as V, readMessagesDiscord as _, removeReactionDiscord as a, addRoleDiscord as b, sendWebhookMessageDiscord as c, deleteMessageDiscord as d, editMessageDiscord as f, pinMessageDiscord as g, listThreadsDiscord as h, removeOwnReactionsDiscord as i, removeRoleDiscord as j, listGuildChannelsDiscord as k, DiscordThreadInitialMessageError as l, listPinsDiscord as m, fetchReactionsDiscord as n, sendTypingDiscord as o, fetchMessageDiscord as p, reactMessageDiscord as r, sendVoiceMessageDiscord as s, send_exports as t, createThreadDiscord as u, searchMessagesDiscord as v, fetchGuildInfoDiscord as w, banMemberDiscord as x, unpinMessageDiscord as y, editChannelDiscord as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { D as createDiscordMessageNonce, M as parseAndResolveChannelRecipient, N as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-
|
|
3
|
-
import { G as withDiscordRequestAuthority, ct as createChannelMessage, dt as editChannelMessage, q as serializePayload } from "./discord-
|
|
4
|
-
import { r as createDiscordSendResult } from "./send.receipt-
|
|
5
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
6
|
-
import { d as buildDiscordComponentMessage, f as buildDiscordComponentMessageFlags, g as resolveDiscordComponentAttachmentName } from "./components-
|
|
7
|
-
import { n as getOptionalDiscordRuntime } from "./runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { D as createDiscordMessageNonce, M as parseAndResolveChannelRecipient, N as createDiscordClient, T as SUPPRESS_NOTIFICATIONS_FLAG, c as resolveChannelId, l as resolveDiscordChannel, t as buildDiscordSendError } from "./send.shared-D4MioxW_.mjs";
|
|
3
|
+
import { G as withDiscordRequestAuthority, ct as createChannelMessage, dt as editChannelMessage, q as serializePayload } from "./discord-eFlHX1Gn.mjs";
|
|
4
|
+
import { r as createDiscordSendResult } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
5
|
+
import { t as sendMessageDiscord } from "./send.outbound-CGhBhzjQ.mjs";
|
|
6
|
+
import { d as buildDiscordComponentMessage, f as buildDiscordComponentMessageFlags, g as resolveDiscordComponentAttachmentName } from "./components-BvOWSPxr.mjs";
|
|
7
|
+
import { n as getOptionalDiscordRuntime } from "./runtime-DcBvHOm1.mjs";
|
|
8
8
|
import { hasNonEmptyString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { ChannelType } from "discord-api-types/v10";
|
|
10
10
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
@@ -15,7 +15,7 @@ import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runt
|
|
|
15
15
|
import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
16
16
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
17
17
|
import { createAsyncLock } from "openclaw/plugin-sdk/async-lock-runtime";
|
|
18
|
-
|
|
18
|
+
// extensions/discord/src/components-registry-state.ts
|
|
19
19
|
const discordComponentRegistryState = resolveGlobalSingleton(Symbol.for("openclaw.discord.componentRegistryState"), () => ({
|
|
20
20
|
withRegistryLock: createAsyncLock(),
|
|
21
21
|
componentEntries: /* @__PURE__ */ new Map(),
|
|
@@ -30,8 +30,7 @@ const discordComponentRegistryState = resolveGlobalSingleton(Symbol.for("opencla
|
|
|
30
30
|
state.persistentModalStore = void 0;
|
|
31
31
|
state.persistentRegistryDisabled = false;
|
|
32
32
|
}));
|
|
33
|
-
|
|
34
|
-
//#region extensions/discord/src/components-registry.ts
|
|
33
|
+
// extensions/discord/src/components-registry.ts
|
|
35
34
|
const DEFAULT_COMPONENT_TTL_MS = 18e5;
|
|
36
35
|
const PERSISTENT_COMPONENT_NAMESPACE = "discord.components";
|
|
37
36
|
const PERSISTENT_MODAL_NAMESPACE = "discord.modals";
|
|
@@ -224,8 +223,7 @@ async function resolveDiscordModalEntryWithPersistence(params) {
|
|
|
224
223
|
});
|
|
225
224
|
});
|
|
226
225
|
}
|
|
227
|
-
|
|
228
|
-
//#region extensions/discord/src/send.components.ts
|
|
226
|
+
// extensions/discord/src/send.components.ts
|
|
229
227
|
var send_components_exports = /* @__PURE__ */ __exportAll({
|
|
230
228
|
editDiscordComponentMessage: () => editDiscordComponentMessage,
|
|
231
229
|
registerBuiltDiscordComponentMessage: () => registerBuiltDiscordComponentMessage,
|
|
@@ -404,5 +402,4 @@ async function writeDiscordComponentMessage(to, spec, opts, messageId) {
|
|
|
404
402
|
});
|
|
405
403
|
return deliveryResult ?? toDeliveryResult();
|
|
406
404
|
}
|
|
407
|
-
//#endregion
|
|
408
405
|
export { registerDiscordComponentEntries as a, send_components_exports as i, registerBuiltDiscordComponentMessage as n, resolveDiscordComponentEntryWithPersistence as o, sendDiscordComponentMessage as r, resolveDiscordModalEntryWithPersistence as s, editDiscordComponentMessage as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-
|
|
3
|
-
import { G as withDiscordRequestAuthority, ct as createChannelMessage, lt as createThread } from "./discord-
|
|
4
|
-
import { a as createReusableDiscordReplyReference, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult } from "./send.receipt-
|
|
5
|
-
import { a as normalizeDiscordSnowflake, i as normalizeDiscordHandleKey, s as resolveDiscordDirectoryUserId } from "./directory-live-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { A as resolveDiscordSendEmbeds, D as createDiscordMessageNonce, E as buildDiscordMessageRequest, M as parseAndResolveChannelRecipient, N as createDiscordClient, O as resolveDiscordMessageFlags, c as resolveChannelId, d as sendDiscordChunks, f as sendDiscordMedia, i as normalizeDiscordPollInput, j as resolveDiscordSuppressEmbeds, k as resolveDiscordSendComponents, l as resolveDiscordChannel, n as buildDiscordTextChunks, s as normalizeStickerIds, t as buildDiscordSendError } from "./send.shared-D4MioxW_.mjs";
|
|
3
|
+
import { G as withDiscordRequestAuthority, ct as createChannelMessage, lt as createThread } from "./discord-eFlHX1Gn.mjs";
|
|
4
|
+
import { a as createReusableDiscordReplyReference, n as createDiscordSendReceiptFromResults, r as createDiscordSendResult } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
5
|
+
import { a as normalizeDiscordSnowflake, i as normalizeDiscordHandleKey, s as resolveDiscordDirectoryUserId } from "./directory-live-DUuPEWub.mjs";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { ChannelType } from "discord-api-types/v10";
|
|
8
8
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -13,7 +13,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
13
13
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
14
14
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
15
15
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
16
|
-
|
|
16
|
+
// extensions/discord/src/mentions.ts
|
|
17
17
|
const MENTION_CANDIDATE_PATTERN = /(^|[\s([{"'.,;:!?])@([a-z0-9_.-]{2,32}(?:#[0-9]{4})?)/gi;
|
|
18
18
|
const DISCORD_RESERVED_MENTIONS = /* @__PURE__ */ new Set(["everyone", "here"]);
|
|
19
19
|
const DISCORD_DISCRIMINATOR_SUFFIX = /#\d{4}$/;
|
|
@@ -108,8 +108,7 @@ function rewriteDiscordKnownMentions(text, params) {
|
|
|
108
108
|
function discordTextHasBroadcastMention(text) {
|
|
109
109
|
return DISCORD_BROADCAST_MENTION_PATTERN.test(text);
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
//#region extensions/discord/src/markdown.ts
|
|
111
|
+
// extensions/discord/src/markdown.ts
|
|
113
112
|
const DISCORD_NATIVE_TOKEN_RE = /<a?:[A-Za-z0-9_]+:\d+>|<\/[^>]+:\d+>/giu;
|
|
114
113
|
const DISCORD_URL_START_RE = /(?:[A-Za-z][A-Za-z0-9+.-]*:\/\/|www\.)/giu;
|
|
115
114
|
function findDiscordUrlRanges(markdown) {
|
|
@@ -346,8 +345,7 @@ function normalizeDiscordBold(markdown) {
|
|
|
346
345
|
function renderDiscordMarkdown(markdown, tableMode) {
|
|
347
346
|
return normalizeDiscordBold(convertMarkdownTables(markdown, tableMode));
|
|
348
347
|
}
|
|
349
|
-
|
|
350
|
-
//#region extensions/discord/src/outbound-text.ts
|
|
348
|
+
// extensions/discord/src/outbound-text.ts
|
|
351
349
|
function prepareDiscordOutboundText(text, params) {
|
|
352
350
|
const { account } = params;
|
|
353
351
|
const renderedText = renderDiscordMarkdown(text, params.tableMode ?? resolveMarkdownTableMode({
|
|
@@ -364,8 +362,7 @@ function prepareDiscordOutboundText(text, params) {
|
|
|
364
362
|
})
|
|
365
363
|
};
|
|
366
364
|
}
|
|
367
|
-
|
|
368
|
-
//#region extensions/discord/src/send.outbound.ts
|
|
365
|
+
// extensions/discord/src/send.outbound.ts
|
|
369
366
|
var send_outbound_exports = /* @__PURE__ */ __exportAll({
|
|
370
367
|
sendMessageDiscord: () => sendMessageDiscord,
|
|
371
368
|
sendPollDiscord: () => sendPollDiscord,
|
|
@@ -627,5 +624,4 @@ async function sendDiscordStructuredMessage(to, opts, kind, buildPayload) {
|
|
|
627
624
|
});
|
|
628
625
|
});
|
|
629
626
|
}
|
|
630
|
-
//#endregion
|
|
631
627
|
export { prepareDiscordOutboundText as a, send_outbound_exports as i, sendPollDiscord as n, discordTextHasBroadcastMention as o, sendStickerDiscord as r, formatMention as s, sendMessageDiscord as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RateLimitError } from "./discord-
|
|
2
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
1
|
+
import { R as RateLimitError } from "./discord-eFlHX1Gn.mjs";
|
|
2
|
+
import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
3
3
|
import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
@@ -10,7 +10,7 @@ import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, resolve
|
|
|
10
10
|
import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
|
|
11
11
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
12
12
|
import { attachChannelToResults } from "openclaw/plugin-sdk/channel-send-result";
|
|
13
|
-
|
|
13
|
+
// packages/normalization-core/src/utf16-slice.ts
|
|
14
14
|
function isHighSurrogate(codeUnit) {
|
|
15
15
|
return codeUnit >= 55296 && codeUnit <= 56319;
|
|
16
16
|
}
|
|
@@ -23,8 +23,7 @@ function avoidTrailingHighSurrogateBreak(text, start, end) {
|
|
|
23
23
|
const adjusted = end - 1;
|
|
24
24
|
return adjusted > start ? adjusted : end + 1;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
//#region packages/normalization-core/src/grapheme.ts
|
|
26
|
+
// packages/normalization-core/src/grapheme.ts
|
|
28
27
|
let graphemeSegmenter;
|
|
29
28
|
function getGraphemeSegmenter() {
|
|
30
29
|
graphemeSegmenter ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -48,8 +47,7 @@ function findGraphemeChunkEnd(text, start, maxEnd, preferredEnd = maxEnd, allowP
|
|
|
48
47
|
if (end <= start && preferred < hardEnd) end = hardEnd === text.length ? hardEnd : segments.containing(hardEnd)?.index ?? hardEnd;
|
|
49
48
|
return end > start ? end : allowPartial ? avoidTrailingHighSurrogateBreak(text, start, hardEnd) : start;
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
//#region extensions/discord/src/chunk.ts
|
|
50
|
+
// extensions/discord/src/chunk.ts
|
|
53
51
|
const DEFAULT_MAX_CHARS = 2e3;
|
|
54
52
|
const DEFAULT_MAX_LINES = 17;
|
|
55
53
|
const REASONING_ITALICS_MARKER_CHARS = 2;
|
|
@@ -364,8 +362,7 @@ function createDiscordRanges(source, maxChars, maxLines) {
|
|
|
364
362
|
cutBoundary
|
|
365
363
|
};
|
|
366
364
|
}
|
|
367
|
-
|
|
368
|
-
//#region extensions/discord/src/retry.ts
|
|
365
|
+
// extensions/discord/src/retry.ts
|
|
369
366
|
const DISCORD_RETRY_DEFAULTS = {
|
|
370
367
|
attempts: 3,
|
|
371
368
|
minDelayMs: 500,
|
|
@@ -459,8 +456,7 @@ function createDiscordRetryRunner(params) {
|
|
|
459
456
|
})(runRequest, label);
|
|
460
457
|
};
|
|
461
458
|
}
|
|
462
|
-
|
|
463
|
-
//#region extensions/discord/src/normalize.ts
|
|
459
|
+
// extensions/discord/src/normalize.ts
|
|
464
460
|
function normalizeDiscordMessagingTarget(raw) {
|
|
465
461
|
return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
|
|
466
462
|
}
|
|
@@ -505,8 +501,7 @@ function looksLikeDiscordTargetId(raw) {
|
|
|
505
501
|
const trimmed = raw.trim();
|
|
506
502
|
return /^<@!?\d+>$/.test(trimmed) || /^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed) || /^\d{6,}$/.test(trimmed);
|
|
507
503
|
}
|
|
508
|
-
|
|
509
|
-
//#region extensions/discord/src/reply-reference.ts
|
|
504
|
+
// extensions/discord/src/reply-reference.ts
|
|
510
505
|
function resolveDiscordReplyReference(params) {
|
|
511
506
|
if (!params.replyToId) return;
|
|
512
507
|
const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
|
|
@@ -524,8 +519,7 @@ function createReusableDiscordReplyReference(messageId) {
|
|
|
524
519
|
function resolveDiscordReplyMessageId(reply, isFirst) {
|
|
525
520
|
return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
|
|
526
521
|
}
|
|
527
|
-
|
|
528
|
-
//#region extensions/discord/src/send.receipt.ts
|
|
522
|
+
// extensions/discord/src/send.receipt.ts
|
|
529
523
|
function toDiscordOutboundDeliveryResult(result) {
|
|
530
524
|
const { channelId, ...delivery } = result;
|
|
531
525
|
return {
|
|
@@ -590,5 +584,4 @@ function createDiscordSendResult(params) {
|
|
|
590
584
|
})
|
|
591
585
|
};
|
|
592
586
|
}
|
|
593
|
-
//#endregion
|
|
594
587
|
export { recordDiscordMessageCreateAmbiguity as _, createReusableDiscordReplyReference as a, allowFromContainsDiscordUserId as c, normalizeDiscordMessagingTarget as d, normalizeDiscordOutboundTarget as f, hasDiscordMessageCreateAmbiguity as g, createDiscordRetryRunner as h, toDiscordOutboundDeliveryResult as i, looksLikeDiscordTargetId as l, classifyDiscordDeliveryFailure as m, createDiscordSendReceiptFromResults as n, resolveDiscordReplyMessageId as o, canFallbackDiscordWebhookSend as p, createDiscordSendResult as r, resolveDiscordReplyReference as s, createDiscordSendReceipt as t, matchesDiscordToolContextTarget as u, chunkDiscordTextWithMode as v, findGraphemeChunkEnd as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as normalizeDiscordToken, l as resolveDiscordAccount, s as mergeDiscordAccountConfig } from "./accounts-
|
|
2
|
-
import { A as isDiscordThreadChannelType } from "./allow-list-
|
|
3
|
-
import { I as RequestClient, J as Embed, K as hasDiscordV2Components, _t as getGuild, ct as createChannelMessage, ft as getChannel, it as getCurrentUser, mt as getThreadMember, q as serializePayload, rt as createUserDmChannel, vt as getGuildMember } from "./discord-
|
|
4
|
-
import { h as createDiscordRetryRunner, o as resolveDiscordReplyMessageId, v as chunkDiscordTextWithMode } from "./send.receipt-
|
|
5
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
1
|
+
import { h as normalizeDiscordToken, l as resolveDiscordAccount, s as mergeDiscordAccountConfig } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { A as isDiscordThreadChannelType } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { I as RequestClient, J as Embed, K as hasDiscordV2Components, _t as getGuild, ct as createChannelMessage, ft as getChannel, it as getCurrentUser, mt as getThreadMember, q as serializePayload, rt as createUserDmChannel, vt as getGuildMember } from "./discord-eFlHX1Gn.mjs";
|
|
4
|
+
import { h as createDiscordRetryRunner, o as resolveDiscordReplyMessageId, v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
5
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-CAHeVfmZ.mjs";
|
|
6
6
|
import { danger } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
8
8
|
import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -14,7 +14,7 @@ import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"
|
|
|
14
14
|
import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
|
|
15
15
|
import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
16
16
|
import { randomBytes } from "node:crypto";
|
|
17
|
-
|
|
17
|
+
// extensions/discord/src/monitor/gateway-registry.ts
|
|
18
18
|
/**
|
|
19
19
|
* Module-level registry of active Discord GatewayPlugin instances.
|
|
20
20
|
* Bridges the gap between agent tool handlers (which only have REST access)
|
|
@@ -35,8 +35,7 @@ function getGateway(accountId) {
|
|
|
35
35
|
function clearGateways() {
|
|
36
36
|
gatewayRegistry.clear();
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
//#region extensions/discord/src/proxy-fetch.ts
|
|
38
|
+
// extensions/discord/src/proxy-fetch.ts
|
|
40
39
|
function resolveDiscordProxyFetchForAccount(account, cfg, runtime) {
|
|
41
40
|
return withValidatedDiscordProxy(normalizeOptionalString(account.config.proxy) ?? normalizeOptionalString(cfg?.channels?.discord?.proxy), runtime, makeProxyFetch);
|
|
42
41
|
}
|
|
@@ -62,14 +61,12 @@ function validateDiscordProxyUrl(proxyUrl) {
|
|
|
62
61
|
if (!parsed.hostname) throw new Error("Proxy URL must include a host");
|
|
63
62
|
return proxyUrl;
|
|
64
63
|
}
|
|
65
|
-
|
|
66
|
-
//#region extensions/discord/src/proxy-request-client.ts
|
|
64
|
+
// extensions/discord/src/proxy-request-client.ts
|
|
67
65
|
const DISCORD_REST_TIMEOUT_MS = 15e3;
|
|
68
66
|
function createDiscordRequestClient(token, options) {
|
|
69
67
|
return new RequestClient(token, options);
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
//#region extensions/discord/src/client.ts
|
|
69
|
+
// extensions/discord/src/client.ts
|
|
73
70
|
function createDiscordRuntimeAccountContext(params) {
|
|
74
71
|
return {
|
|
75
72
|
cfg: params.cfg,
|
|
@@ -153,8 +150,7 @@ function createDiscordClient(opts) {
|
|
|
153
150
|
function resolveDiscordRest(opts) {
|
|
154
151
|
return createDiscordRestClient(opts).rest;
|
|
155
152
|
}
|
|
156
|
-
|
|
157
|
-
//#region extensions/discord/src/recipient-resolution.ts
|
|
153
|
+
// extensions/discord/src/recipient-resolution.ts
|
|
158
154
|
async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
|
|
159
155
|
const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
|
|
160
156
|
const accountInfo = resolveDiscordAccount({
|
|
@@ -181,8 +177,7 @@ async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
|
|
|
181
177
|
id: resolved.id
|
|
182
178
|
};
|
|
183
179
|
}
|
|
184
|
-
|
|
185
|
-
//#region extensions/discord/src/send.message-request.ts
|
|
180
|
+
// extensions/discord/src/send.message-request.ts
|
|
186
181
|
const SUPPRESS_EMBEDS_FLAG = MessageFlags.SuppressEmbeds;
|
|
187
182
|
const SUPPRESS_NOTIFICATIONS_FLAG = MessageFlags.SuppressNotifications;
|
|
188
183
|
function createDiscordMessageNonce() {
|
|
@@ -224,8 +219,7 @@ function buildDiscordMessageRequest(params) {
|
|
|
224
219
|
...nonce ? { enforce_nonce: true } : {}
|
|
225
220
|
};
|
|
226
221
|
}
|
|
227
|
-
|
|
228
|
-
//#region extensions/discord/src/send.permissions.ts
|
|
222
|
+
// extensions/discord/src/send.permissions.ts
|
|
229
223
|
const PERMISSION_ENTRIES = Object.entries(PermissionFlagsBits).filter(([, value]) => typeof value === "bigint");
|
|
230
224
|
const ALL_PERMISSIONS = PERMISSION_ENTRIES.reduce((acc, [, value]) => acc | value, 0n);
|
|
231
225
|
const ADMINISTRATOR_BIT = PermissionFlagsBits.Administrator;
|
|
@@ -439,8 +433,7 @@ async function fetchChannelPermissionsDiscord(channelId, opts) {
|
|
|
439
433
|
channelType
|
|
440
434
|
};
|
|
441
435
|
}
|
|
442
|
-
|
|
443
|
-
//#region extensions/discord/src/send.types.ts
|
|
436
|
+
// extensions/discord/src/send.types.ts
|
|
444
437
|
var DiscordSendError = class extends Error {
|
|
445
438
|
constructor(message, opts) {
|
|
446
439
|
super(message);
|
|
@@ -454,8 +447,7 @@ var DiscordSendError = class extends Error {
|
|
|
454
447
|
const DISCORD_MAX_EMOJI_BYTES = 262144;
|
|
455
448
|
const DISCORD_MAX_STICKER_BYTES = 524288;
|
|
456
449
|
const DISCORD_MAX_EVENT_COVER_BYTES = 8388608;
|
|
457
|
-
|
|
458
|
-
//#region extensions/discord/src/send.shared.ts
|
|
450
|
+
// extensions/discord/src/send.shared.ts
|
|
459
451
|
const DISCORD_TEXT_LIMIT = 2e3;
|
|
460
452
|
const DISCORD_MAX_STICKERS = 3;
|
|
461
453
|
const DISCORD_POLL_MAX_ANSWERS = 10;
|
|
@@ -662,5 +654,4 @@ function buildReactionIdentifier(emoji) {
|
|
|
662
654
|
if (emoji.id && emoji.name) return `${emoji.name}:${emoji.id}`;
|
|
663
655
|
return emoji.name ?? "";
|
|
664
656
|
}
|
|
665
|
-
//#endregion
|
|
666
657
|
export { resolveDiscordSendEmbeds as A, validateDiscordProxyUrl as B, hasAnyChannelPermissionDiscord as C, createDiscordMessageNonce as D, buildDiscordMessageRequest as E, createDiscordRuntimeAccountContext as F, unregisterGateway as G, clearGateways as H, resolveDiscordClientAccountContext as I, resolveDiscordRest as L, parseAndResolveChannelRecipient as M, createDiscordClient as N, resolveDiscordMessageFlags as O, createDiscordRestClient as P, DISCORD_REST_TIMEOUT_MS as R, hasAllGuildPermissionsDiscord as S, SUPPRESS_NOTIFICATIONS_FLAG as T, getGateway as U, withValidatedDiscordProxy as V, registerGateway as W, canManageGuildMemberRoleDiscord as _, normalizeEmojiName as a, fetchChannelPermissionsDiscord as b, resolveChannelId as c, sendDiscordChunks as d, sendDiscordMedia as f, DiscordSendError as g, DISCORD_MAX_STICKER_BYTES as h, normalizeDiscordPollInput as i, resolveDiscordSuppressEmbeds as j, resolveDiscordSendComponents as k, resolveDiscordChannel as l, DISCORD_MAX_EVENT_COVER_BYTES as m, buildDiscordTextChunks as n, normalizeReactionEmoji as o, DISCORD_MAX_EMOJI_BYTES as p, buildReactionIdentifier as r, normalizeStickerIds as s, buildDiscordSendError as t, resolveDiscordTargetChannelId as u, canManageGuildRoleDiscord as v, hasAnyGuildPermissionDiscord as w, fetchMemberGuildPermissionsDiscord as x, canViewDiscordGuildChannel as y, resolveDiscordProxyFetchForAccount as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as formatDiscordUserTag } from "./allow-list-
|
|
1
|
+
import { S as formatDiscordUserTag } from "./allow-list-D1ZGfhXh.mjs";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/discord/src/monitor/sender-identity.ts
|
|
4
4
|
function resolveDiscordWebhookId(message) {
|
|
5
5
|
return normalizeOptionalString(message.webhookId ?? message.webhook_id) ?? null;
|
|
6
6
|
}
|
|
@@ -38,5 +38,4 @@ function resolveDiscordSenderIdentity(params) {
|
|
|
38
38
|
isPluralKit: false
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { resolveDiscordWebhookId as n, resolveDiscordSenderIdentity as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/discord/src/session-contract.ts
|
|
2
2
|
function deriveLegacySessionChatType(sessionKey) {
|
|
3
3
|
return /^discord:(?:[^:]+:)?guild-[^:]+:channel-[^:]+$/.test(sessionKey) ? "channel" : void 0;
|
|
4
4
|
}
|
|
5
|
-
//#endregion
|
|
6
5
|
export { deriveLegacySessionChatType as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/discord/src/session-key-normalization.ts
|
|
3
3
|
function normalizeExplicitDiscordSessionKey(sessionKey, ctx) {
|
|
4
4
|
let normalized = normalizeLowercaseStringOrEmpty(sessionKey);
|
|
5
5
|
const chatType = normalizeLowercaseStringOrEmpty(ctx.ChatType);
|
|
@@ -13,5 +13,4 @@ function normalizeExplicitDiscordSessionKey(sessionKey, ctx) {
|
|
|
13
13
|
const directId = senderId || fromDiscordId;
|
|
14
14
|
return directId && directId === match[2] ? `${match[1]}discord:direct:${match[2]}` : normalized;
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { normalizeExplicitDiscordSessionKey as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as resolveDefaultDiscordAccountId, f as resolveDiscordAccountDisabledReason, i as listDiscordAccountIds, l as resolveDiscordAccount, p as resolveDiscordAccountDmPolicy, r as isDiscordAccountEnabledForRuntime, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
4
|
-
import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-
|
|
5
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
6
|
-
import { n as normalizeCompatibilityConfig } from "./doctor-contract-
|
|
7
|
-
import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-
|
|
8
|
-
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-
|
|
9
|
-
import { t as deriveLegacySessionChatType } from "./session-contract-
|
|
1
|
+
import { c as resolveDefaultDiscordAccountId, f as resolveDiscordAccountDisabledReason, i as listDiscordAccountIds, l as resolveDiscordAccount, p as resolveDiscordAccountDmPolicy, r as isDiscordAccountEnabledForRuntime, s as mergeDiscordAccountConfig, u as resolveDiscordAccountAllowFrom } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-X_Xlr42B.mjs";
|
|
3
|
+
import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
4
|
+
import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-DO1Fk2hp.mjs";
|
|
5
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-Coyq5wOr.mjs";
|
|
6
|
+
import { n as normalizeCompatibilityConfig } from "./doctor-contract-Dstl3cMg.mjs";
|
|
7
|
+
import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B7UlqVYr.mjs";
|
|
8
|
+
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-D-o0iWDk.mjs";
|
|
9
|
+
import { t as deriveLegacySessionChatType } from "./session-contract-Bq71MS78.mjs";
|
|
10
10
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
12
12
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -17,7 +17,7 @@ import { createConditionalWarningCollector, createOpenProviderConfiguredRouteWar
|
|
|
17
17
|
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
18
18
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
19
19
|
import { createEnvPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
|
|
20
|
-
|
|
20
|
+
// extensions/discord/src/security.ts
|
|
21
21
|
const resolveDiscordDmPolicy = createScopedDmSecurityResolver({
|
|
22
22
|
channelKey: "discord",
|
|
23
23
|
resolvePolicy: (account) => account.config.dmPolicy,
|
|
@@ -60,10 +60,9 @@ const discordSecurityAdapter = {
|
|
|
60
60
|
severity: "warn",
|
|
61
61
|
title: "Discord security warning"
|
|
62
62
|
}),
|
|
63
|
-
collectAuditFindings: async (params) => (await import("./security-audit-
|
|
63
|
+
collectAuditFindings: async (params) => (await import("./security-audit-CTwisG7c.mjs").then((n) => n.n)).collectDiscordSecurityAuditFindings(params)
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
//#region extensions/discord/src/setup-adapter.ts
|
|
65
|
+
// extensions/discord/src/setup-adapter.ts
|
|
67
66
|
const discordSetupAdapter = createEnvPatchedAccountSetupAdapter({
|
|
68
67
|
channelKey: "discord",
|
|
69
68
|
defaultAccountOnlyEnvError: "DISCORD_BOT_TOKEN can only be used for the default account.",
|
|
@@ -93,14 +92,12 @@ const discordSetupContract = defineChannelSetupContract({
|
|
|
93
92
|
},
|
|
94
93
|
legacyAdapter: discordSetupAdapter
|
|
95
94
|
});
|
|
96
|
-
|
|
97
|
-
//#region extensions/discord/src/doctor-shared.ts
|
|
95
|
+
// extensions/discord/src/doctor-shared.ts
|
|
98
96
|
const DISCORD_LEGACY_CONFIG_RULES = [];
|
|
99
|
-
|
|
100
|
-
//#region extensions/discord/src/shared.ts
|
|
97
|
+
// extensions/discord/src/shared.ts
|
|
101
98
|
const DISCORD_CHANNEL = "discord";
|
|
102
99
|
const livePolicyConfigPrefixes = Object.keys(selectDiscordLivePolicyConfig({})).flatMap((key) => [`channels.discord.${key}`, `channels.discord.accounts.*.${key}`]);
|
|
103
|
-
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-
|
|
100
|
+
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-Cg_N6ZOI.mjs"));
|
|
104
101
|
const discordDoctor = {
|
|
105
102
|
dmAllowFromMode: "topOnly",
|
|
106
103
|
groupModel: "route",
|
|
@@ -226,5 +223,4 @@ function createDiscordPluginBase(params) {
|
|
|
226
223
|
}
|
|
227
224
|
};
|
|
228
225
|
}
|
|
229
|
-
//#endregion
|
|
230
226
|
export { discordSecurityAdapter as a, discordSetupContract as i, discordConfigAdapter as n, DISCORD_LEGACY_CONFIG_RULES as r, createDiscordPluginBase as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { d as unbindThreadBindingsBySessionKeyAsync, o as listThreadBindingsBySessionKey, s as listThreadBindingsBySessionKeyAsync } from "./thread-bindings-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { d as unbindThreadBindingsBySessionKeyAsync, o as listThreadBindingsBySessionKey, s as listThreadBindingsBySessionKeyAsync } from "./thread-bindings-Dg7X_ZXP.mjs";
|
|
3
3
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { warnPluginSdkDeprecation } from "openclaw/plugin-sdk/thread-bindings-session-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/discord/src/subagent-hooks.ts
|
|
6
6
|
var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
handleDiscordSubagentDeliveryTarget: () => handleDiscordSubagentDeliveryTarget,
|
|
8
8
|
handleDiscordSubagentDeliveryTargetAsync: () => handleDiscordSubagentDeliveryTargetAsync,
|
|
@@ -55,5 +55,4 @@ function resolveDiscordDeliveryTarget(event, bindings) {
|
|
|
55
55
|
threadId: binding.threadId
|
|
56
56
|
} };
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { subagent_hooks_exports as i, handleDiscordSubagentDeliveryTargetAsync as n, handleDiscordSubagentEnded as r, handleDiscordSubagentDeliveryTarget as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as formatDiscordUserTag } from "./allow-list-
|
|
2
|
-
import { t as discord_exports } from "./discord-
|
|
3
|
-
|
|
1
|
+
import { S as formatDiscordUserTag } from "./allow-list-D1ZGfhXh.mjs";
|
|
2
|
+
import { t as discord_exports } from "./discord-eFlHX1Gn.mjs";
|
|
3
|
+
// extensions/discord/src/monitor/system-events.ts
|
|
4
4
|
const SYSTEM_EVENT_ACTIONS = /* @__PURE__ */ new Map([
|
|
5
5
|
[discord_exports.MessageType.ChannelPinnedMessage, "pinned a message"],
|
|
6
6
|
[discord_exports.MessageType.RecipientAdd, "added a recipient"],
|
|
@@ -29,5 +29,4 @@ function resolveDiscordSystemEvent(message, location) {
|
|
|
29
29
|
const authorLabel = message.author ? formatDiscordUserTag(message.author) : "";
|
|
30
30
|
return `Discord system: ${authorLabel ? `${authorLabel} ` : ""}${action} in ${location}`;
|
|
31
31
|
}
|
|
32
|
-
//#endregion
|
|
33
32
|
export { resolveDiscordSystemEvent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
|
|
2
|
-
|
|
2
|
+
// extensions/discord/src/target-parsing.ts
|
|
3
3
|
function parseDiscordTarget(raw, options = {}) {
|
|
4
4
|
const trimmed = raw.trim();
|
|
5
5
|
if (!trimmed) return;
|
|
@@ -44,5 +44,4 @@ function resolveDiscordChannelId(raw) {
|
|
|
44
44
|
kind: "channel"
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
//#endregion
|
|
48
47
|
export { resolveDiscordChannelId as n, parseDiscordTarget as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { l as resolveDiscordAccount, u as resolveDiscordAccountAllowFrom } from "./accounts-
|
|
3
|
-
import { c as allowFromContainsDiscordUserId } from "./send.receipt-
|
|
4
|
-
import { o as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
5
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { l as resolveDiscordAccount, u as resolveDiscordAccountAllowFrom } from "./accounts-C18HNgge.mjs";
|
|
3
|
+
import { c as allowFromContainsDiscordUserId } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
4
|
+
import { o as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-DUuPEWub.mjs";
|
|
5
|
+
import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
6
6
|
import { buildMessagingTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
7
|
-
|
|
7
|
+
// extensions/discord/src/target-resolver.ts
|
|
8
8
|
var target_resolver_exports = /* @__PURE__ */ __exportAll({
|
|
9
9
|
parseAndResolveDiscordTarget: () => parseAndResolveDiscordTarget,
|
|
10
10
|
resolveDiscordTarget: () => resolveDiscordTarget
|
|
@@ -53,5 +53,4 @@ async function parseAndResolveDiscordTarget(raw, options, parseOptions = {}) {
|
|
|
53
53
|
if (!resolved) throw new Error("Recipient is required for Discord sends");
|
|
54
54
|
return resolved;
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { resolveDiscordTarget as n, target_resolver_exports as r, parseAndResolveDiscordTarget as t };
|