@openclaw/discord 2026.11.5-beta.1 → 2026.11.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-inspect-CSz5Qodj.mjs → account-inspect-DGkdWwix.mjs} +3 -2
- package/dist/.setup/{accounts-DtjvhJUj.mjs → accounts-C_25wyxC.mjs} +8 -4
- package/dist/.setup/{active-turn-thread-route-DkPnk2x8.mjs → active-turn-thread-route-KvRTAVE3.mjs} +2 -1
- package/dist/.setup/{allow-list-DahA0Jxh.mjs → allow-list-BXrS8-R9.mjs} +8 -4
- package/dist/.setup/{api-Bp0HI4q3.mjs → api-BlBD4ism.mjs} +6 -4
- package/dist/.setup/{approval-handler.runtime-Cy53ugTf.mjs → approval-handler.runtime-BGYjX1t9.mjs} +10 -9
- package/dist/.setup/{approval-message-updates-DqOXxPss.mjs → approval-message-updates-DKsCfxSW.mjs} +4 -3
- package/dist/.setup/{audit-DoPKOfQE.mjs → audit-5b-FXj9R.mjs} +7 -6
- package/dist/.setup/{channel-Ds6iuNdy.mjs → channel-CWwTHWFo.mjs} +39 -32
- package/dist/.setup/{channel-access-DhJhVrdZ.mjs → channel-access-9cyzozUP.mjs} +2 -1
- package/dist/.setup/{channel.setup-BLt9dkIG.mjs → channel.setup-B3MtmBQG.mjs} +10 -7
- package/dist/.setup/{command-deploy-store-DPWiBMks.mjs → command-deploy-store-DFkBTViB.mjs} +2 -1
- package/dist/.setup/{command-owners-BzlhNBxA.mjs → command-owners-C7rUdqUX.mjs} +2 -1
- package/dist/.setup/{components-WTfUxead.mjs → components-YCvQ6YLS.mjs} +16 -10
- package/dist/.setup/{components.base-C5sAPHe4.mjs → components.base-CiS0h_XP.mjs} +2 -1
- package/dist/.setup/{config-schema-GX2yDgIH.mjs → config-schema-BNKN1cu5.mjs} +5 -3
- package/dist/.setup/{conversation-binding-route-CZdm-X5A.mjs → conversation-binding-route-kCTw8cij.mjs} +3 -2
- package/dist/.setup/{directory-config-BXJuh9-J.mjs → directory-config-Ble81PWH.mjs} +4 -3
- package/dist/.setup/{directory-live-CEopeb8Q.mjs → directory-live-DH3tpS3x.mjs} +11 -8
- package/dist/.setup/{discord-r79VFjJp.mjs → discord-DGVSguhx.mjs} +52 -28
- package/dist/.setup/{doctor-contract-Dstl3cMg.mjs → doctor-contract-Bwv8EuQ_.mjs} +3 -2
- package/dist/.setup/{doctor-UfLW8nye.mjs → doctor-eujgbnpZ.mjs} +8 -7
- package/dist/.setup/{endpoint-runtime-BM3x-m6O.mjs → endpoint-runtime-lf4DeLas.mjs} +2 -1
- package/dist/.setup/{guilds-DQucP5Tn.mjs → guilds-eDq22iSM.mjs} +4 -3
- package/dist/.setup/{handle-action-BarHOi-v.mjs → handle-action-CktwmzMz.mjs} +11 -10
- package/dist/.setup/{handle-action.guild-admin-oRUb8p_O.mjs → handle-action.guild-admin-WLQ7fRqI.mjs} +4 -3
- package/dist/.setup/{listeners-CHgTENFu.mjs → listeners-Df8lx3vK.mjs} +3 -2
- package/dist/.setup/{live-policy-config-EKp4O6zx.mjs → live-policy-config-DiBVuaU6.mjs} +5 -3
- package/dist/.setup/{message-handler-DUeT8Asf.mjs → message-handler-hhNSioxo.mjs} +15 -11
- package/dist/.setup/{message-handler.preflight-C6TNtKW0.mjs → message-handler.preflight-BZcZE1o-.mjs} +26 -19
- package/dist/.setup/{message-handler.preflight-pluralkit-6E9TFmmN.mjs → message-handler.preflight-pluralkit-CYZfXXb6.mjs} +14 -10
- package/dist/.setup/{message-handler.process-D8_oQ5Cp.mjs → message-handler.process-B0n-mQ99.mjs} +34 -26
- package/dist/.setup/{outbound-payload-DUsrFICb.mjs → outbound-payload-BaZmjewa.mjs} +11 -9
- package/dist/.setup/{outbound-session-route-Cb8cv4Oi.mjs → outbound-session-route-Cgx4i9cS.mjs} +34 -22
- package/dist/.setup/{output-activity-CDgs2s3O.mjs → output-activity-uBpMSX75.mjs} +2 -1
- package/dist/.setup/{pluralkit-DcXbHTpQ.mjs → pluralkit-B64dfq_j.mjs} +3 -2
- package/dist/.setup/{preflight-audio-r4BbaJxh.mjs → preflight-audio-C6QtD6HX.mjs} +2 -1
- package/dist/.setup/{presence-cache-B3xj3b0l.mjs → presence-cache-Dq-3nH7R.mjs} +2 -1
- package/dist/.setup/{probe-BUmJyH35.mjs → probe-DezB-6xz.mjs} +6 -5
- package/dist/.setup/{provider-Dm2ERSxe.mjs → provider-BN2bCIUp.mjs} +185 -109
- package/dist/.setup/{provider-session.runtime-DCIqDsIg.mjs → provider-session.runtime-Dr_5X43t.mjs} +3 -3
- package/dist/.setup/provider.runtime-BuJpl0Pv.mjs +1 -0
- package/dist/.setup/{proxy-fetch-B8cK6FLQ.mjs → proxy-fetch-BzXwBAXt.mjs} +2 -1
- package/dist/.setup/{realtime-session.runtime-WJL6NdwK.mjs → realtime-session.runtime-BTDWsV4d.mjs} +25 -15
- package/dist/.setup/{receive-recovery-DV_v5ROf.mjs → receive-recovery-C3Ks4wAQ.mjs} +6 -3
- package/dist/.setup/{resolve-allowlist-common-C37fgnYG.mjs → resolve-allowlist-common-Bk8Fj6Ik.mjs} +4 -3
- package/dist/.setup/{resolve-channels-CwpnQ7C2.mjs → resolve-channels-Bp8frXvc.mjs} +7 -6
- package/dist/.setup/{resolve-users-D6jSwe8R.mjs → resolve-users-Cvcj22sG.mjs} +6 -5
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-DhOMlnYS.mjs → runtime-BJaCvlmq.mjs} +26 -18
- package/dist/.setup/{runtime-B-PgPsGR.mjs → runtime-BMgTyuwg.mjs} +6 -4
- package/dist/.setup/{runtime-DcBvHOm1.mjs → runtime-DgnVQ7zW.mjs} +2 -1
- package/dist/.setup/{runtime-doctor-migrations-BpV1jKk0.mjs → runtime-doctor-migrations-BPV-R4G9.mjs} +9 -5
- package/dist/.setup/{secret-config-contract-CP6teHec.mjs → secret-config-contract-B1kE4sDv.mjs} +2 -1
- package/dist/.setup/{security-audit-CTwisG7c.mjs → security-audit-BFT84Uny.mjs} +4 -3
- package/dist/.setup/{security-contract-D-o0iWDk.mjs → security-contract-DNyyjTZZ.mjs} +2 -1
- package/dist/.setup/{security-doctor-4s7omTZd.mjs → security-doctor-nGgPm65L.mjs} +2 -1
- package/dist/.setup/{send-DnLL6XoO.mjs → send-CVW7V-VZ.mjs} +28 -19
- package/dist/.setup/{send.components-xB43CksK.mjs → send.components-C8YXdnO_.mjs} +14 -11
- package/dist/.setup/{send.outbound-B11X6TOE.mjs → send.outbound-Uzcmh3Yd.mjs} +16 -11
- package/dist/.setup/{send.receipt-CMteCIZS.mjs → send.receipt-NZDOTZBU.mjs} +16 -9
- package/dist/.setup/{send.shared-BcLLZBul.mjs → send.shared-a_6Oeyg1.mjs} +18 -12
- package/dist/.setup/{sender-identity-CGNpdJmb.mjs → sender-identity-76HFb8eK.mjs} +3 -2
- package/dist/.setup/{session-contract-Bq71MS78.mjs → session-contract-BO5tlIdl.mjs} +2 -1
- package/dist/.setup/{session-key-normalization-Cfvze5hd.mjs → session-key-normalization-CCHGNSQw.mjs} +2 -1
- package/dist/.setup/setup-plugin-api-BExhGEhL.mjs +2 -0
- package/dist/.setup/{shared-interactive-DKBw4SNV.mjs → shared-interactive-DmzaoKOM.mjs} +12 -7
- package/dist/.setup/{shared-BEYw16he.mjs → shared-yDUSExm2.mjs} +17 -14
- package/dist/.setup/{subagent-hooks-DlYElpXa.mjs → subagent-hooks-CDkdHQyy.mjs} +4 -3
- package/dist/.setup/{system-events--Pk6y9aP.mjs → system-events-yfWz150v.mjs} +4 -3
- package/dist/.setup/{target-parsing-BiuhcK9Q.mjs → target-parsing-C-HyNxcE.mjs} +2 -1
- package/dist/.setup/{target-resolver-Bo9EpGp_.mjs → target-resolver-BOOzqxxM.mjs} +7 -6
- package/dist/.setup/{thread-binding-api-Drd4Zu-5.mjs → thread-binding-api-BDZJD4na.mjs} +2 -1
- package/dist/.setup/{thread-bindings-BF-hr-bg.mjs → thread-bindings-zce4cpu_.mjs} +10 -7
- package/dist/.setup/{thread-bindings.manager-CQCkha5r.mjs → thread-bindings.manager-NywKzUtc.mjs} +20 -15
- package/dist/.setup/{thread-bindings.session-updates-C2gJAj_I.mjs → thread-bindings.session-updates-D0j7oh8S.mjs} +10 -6
- package/dist/.setup/{threading-HA9C2wYR.mjs → threading-DodLYDt-.mjs} +7 -5
- package/dist/.setup/{timeouts-CT9hnmo4.mjs → timeouts-cIxzatmv.mjs} +2 -1
- package/dist/.setup/{transcripts-source-DzpzETZR.mjs → transcripts-source-ie9GBWaU.mjs} +33 -20
- package/dist/.setup/{typing-DAv4S2fI.mjs → typing-CNlSKY5S.mjs} +3 -2
- package/dist/.setup/{voice-runtime-Bo_nsVvX.mjs → voice-runtime-B7V_LTdX.mjs} +46 -28
- package/dist/.source-module-urls/d6c089460280c5a04184542d6712e04545caeb1ebb290d3504377b4cc5e22fea.json +1 -1
- package/dist/account-inspect-api.js +3 -2
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +13 -9
- package/dist/api.js +22 -21
- package/dist/assets/embedded-app-sdk.mjs +1 -1
- 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 +3 -2
- package/dist/doctor-contract-api.js +7 -5
- package/dist/index.js +2 -1
- 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 +3 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +14 -8
- package/dist/subagent-hooks-api.js +3 -2
- package/dist/thread-binding-api.js +1 -1
- package/dist/transcripts-source-api.js +3 -2
- package/node_modules/@discord/embedded-app-sdk/output/lib/zod/lib/index.cjs +3 -2
- package/node_modules/@discord/embedded-app-sdk/output/lib/zod/lib/index.mjs +3 -2
- package/package.json +4 -4
- package/dist/.setup/provider.runtime-DmxPGoUg.mjs +0 -1
- package/dist/.setup/setup-plugin-api-C6AMx3hu.mjs +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { w as isDiscordThreadChannelType } from "./allow-list-
|
|
2
|
-
import { D as resolveDiscordMessageStickers } from "./transcripts-source-
|
|
1
|
+
import { w as isDiscordThreadChannelType } from "./allow-list-BXrS8-R9.mjs";
|
|
2
|
+
import { D as resolveDiscordMessageStickers } from "./transcripts-source-ie9GBWaU.mjs";
|
|
3
3
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
4
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { findCodeRegions, isInsideCode } from "openclaw/plugin-sdk/text-chunking";
|
|
7
7
|
import { filterSupplementalContextItems } from "openclaw/plugin-sdk/security-runtime";
|
|
8
8
|
import { implicitMentionKindWhen, matchesMentionWithExplicit, normalizeMentionText } from "openclaw/plugin-sdk/channel-inbound";
|
|
9
|
-
|
|
9
|
+
//#region extensions/discord/src/monitor/message-handler.preflight-helpers.ts
|
|
10
10
|
const DISCORD_BOUND_THREAD_SYSTEM_PREFIXES = [
|
|
11
11
|
"⚙️",
|
|
12
12
|
"🤖",
|
|
@@ -74,7 +74,8 @@ function shouldIgnoreBoundThreadWebhookMessage(params) {
|
|
|
74
74
|
const threadId = normalizeOptionalString(params.threadId) ?? "";
|
|
75
75
|
return Boolean(threadId && params.threadBinding);
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region extensions/discord/src/monitor/message-handler.history.ts
|
|
78
79
|
function createDiscordHistorySenderProvenance(params) {
|
|
79
80
|
return Object.freeze({
|
|
80
81
|
id: params.sender.id,
|
|
@@ -95,12 +96,14 @@ function filterDiscordHistoryEntriesForContext(params) {
|
|
|
95
96
|
function resolveDiscordHistoryMediaIds(message) {
|
|
96
97
|
return [...(message.attachments ?? []).map((attachment) => `attachment:${attachment.id}`), ...resolveDiscordMessageStickers(message).map((sticker) => `sticker:${sticker.id}`)];
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
101
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-B64dfq_j.mjs").then((n) => n.n));
|
|
102
|
+
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-C6QtD6HX.mjs"));
|
|
103
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-yfWz150v.mjs"));
|
|
104
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-DodLYDt-.mjs").then((n) => n.t));
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
|
|
104
107
|
async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
105
108
|
if (!params.config?.enabled || !params.webhookId) return null;
|
|
106
109
|
try {
|
|
@@ -116,4 +119,5 @@ async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
|
116
119
|
return null;
|
|
117
120
|
}
|
|
118
121
|
}
|
|
122
|
+
//#endregion
|
|
119
123
|
export { createDiscordHistorySenderProvenance as a, hasRawDiscordUserMention as c, matchesActiveDiscordMentionPatterns as d, resolveDiscordMentionState as f, loadSystemEventsRuntime as i, isBoundThreadBotSystemMessage as l, loadDiscordThreadingRuntime as n, filterDiscordHistoryEntriesForContext as o, shouldIgnoreBoundThreadWebhookMessage as p, loadPreflightAudioRuntime as r, resolveDiscordHistoryMediaIds as s, resolveDiscordPreflightPluralKitInfo as t, isDiscordThreadChannelMessage as u };
|
package/dist/.setup/{message-handler.process-D8_oQ5Cp.mjs → message-handler.process-B0n-mQ99.mjs}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-
|
|
2
|
-
import { N as createDiscordRestClient, O as resolveDiscordMessageFlags, P as createDiscordRuntimeAccountContext, u as resolveDiscordTargetChannelId } from "./send.shared-
|
|
3
|
-
import { D as editChannelMessage, E as deleteChannelMessage, K as captureDiscordRequestAuthority, P as getGuildMember, h as Message, q as withDiscordRequestAuthority, t as discord_exports } from "./discord-
|
|
4
|
-
import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug } from "./allow-list-
|
|
5
|
-
import { h as createDiscordRetryRunner, v as chunkDiscordTextWithMode } from "./send.receipt-
|
|
6
|
-
import { n as resolveDiscordChannelId } from "./target-parsing-
|
|
7
|
-
import { a as removeReactionDiscord, r as reactMessageDiscord } from "./send-
|
|
8
|
-
import { o as discordTextHasBroadcastMention } from "./send.outbound-
|
|
9
|
-
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
10
|
-
import { S as discordInboundEventDelivery, _ as resolveDiscordConversationIdentity, p as buildDiscordRoutePeer } from "./outbound-session-route-
|
|
11
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-payload-
|
|
12
|
-
import { C as buildDiscordInboundAccessContext, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as createDiscordSupplementalContextAccessChecker } from "./provider-
|
|
13
|
-
import { D as resolveDiscordMessageStickers, b as resolveDiscordMessageText, h as resolveDiscordThreadStarter, k as resolveDiscordReferencedReplyMessageId, v as resolveDiscordMessageHistoryText, w as resolveReferencedReplyMediaList, x as formatDiscordMediaText } from "./transcripts-source-
|
|
14
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
15
|
-
import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-
|
|
16
|
-
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-
|
|
17
|
-
import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, o as filterDiscordHistoryEntriesForContext, p as shouldIgnoreBoundThreadWebhookMessage, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-
|
|
18
|
-
import { t as sendTyping } from "./typing-
|
|
1
|
+
import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-C_25wyxC.mjs";
|
|
2
|
+
import { N as createDiscordRestClient, O as resolveDiscordMessageFlags, P as createDiscordRuntimeAccountContext, u as resolveDiscordTargetChannelId } from "./send.shared-a_6Oeyg1.mjs";
|
|
3
|
+
import { D as editChannelMessage, E as deleteChannelMessage, K as captureDiscordRequestAuthority, P as getGuildMember, h as Message, q as withDiscordRequestAuthority, t as discord_exports } from "./discord-DGVSguhx.mjs";
|
|
4
|
+
import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug } from "./allow-list-BXrS8-R9.mjs";
|
|
5
|
+
import { h as createDiscordRetryRunner, v as chunkDiscordTextWithMode } from "./send.receipt-NZDOTZBU.mjs";
|
|
6
|
+
import { n as resolveDiscordChannelId } from "./target-parsing-C-HyNxcE.mjs";
|
|
7
|
+
import { a as removeReactionDiscord, r as reactMessageDiscord } from "./send-CVW7V-VZ.mjs";
|
|
8
|
+
import { o as discordTextHasBroadcastMention } from "./send.outbound-Uzcmh3Yd.mjs";
|
|
9
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-cIxzatmv.mjs";
|
|
10
|
+
import { S as discordInboundEventDelivery, _ as resolveDiscordConversationIdentity, p as buildDiscordRoutePeer } from "./outbound-session-route-Cgx4i9cS.mjs";
|
|
11
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-payload-BaZmjewa.mjs";
|
|
12
|
+
import { C as buildDiscordInboundAccessContext, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as createDiscordSupplementalContextAccessChecker } from "./provider-BN2bCIUp.mjs";
|
|
13
|
+
import { D as resolveDiscordMessageStickers, b as resolveDiscordMessageText, h as resolveDiscordThreadStarter, k as resolveDiscordReferencedReplyMessageId, v as resolveDiscordMessageHistoryText, w as resolveReferencedReplyMediaList, x as formatDiscordMediaText } from "./transcripts-source-ie9GBWaU.mjs";
|
|
14
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-76HFb8eK.mjs";
|
|
15
|
+
import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-DodLYDt-.mjs";
|
|
16
|
+
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-KvRTAVE3.mjs";
|
|
17
|
+
import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, o as filterDiscordHistoryEntriesForContext, p as shouldIgnoreBoundThreadWebhookMessage, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-CYZfXXb6.mjs";
|
|
18
|
+
import { t as sendTyping } from "./typing-CNlSKY5S.mjs";
|
|
19
19
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
20
|
import { danger, logVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
21
21
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
@@ -42,7 +42,7 @@ import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createC
|
|
|
42
42
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
43
43
|
import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
44
44
|
import { createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
45
|
-
|
|
45
|
+
//#region extensions/discord/src/monitor/message-handler.recent-history.ts
|
|
46
46
|
/** Fetch a physical recent window, never walking older pages to refill filtered rows. */
|
|
47
47
|
async function recoverDiscordChannelHistory(params) {
|
|
48
48
|
const { ctx, isCurrent } = params;
|
|
@@ -149,7 +149,8 @@ async function recoverDiscordChannelHistory(params) {
|
|
|
149
149
|
return [];
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region extensions/discord/src/monitor/message-handler.retry.ts
|
|
153
154
|
const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /^reply session initialization conflicted for \S+$/u;
|
|
154
155
|
const DISCORD_SESSION_CONFLICT_FAILURE_TEXT = "⚠️ Couldn't process this message because the session stayed busy. Please try again in a moment.";
|
|
155
156
|
async function completeDiscordSessionConflict(error, sourceReplyDeliveryMode, deliver, onDeliveryError) {
|
|
@@ -171,7 +172,8 @@ function removeDiscordReplayHistoryEntry(historyMap, historyKey, messageId) {
|
|
|
171
172
|
if (!history) return;
|
|
172
173
|
for (let index = history.length - 1; index >= 0; index -= 1) if (history[index]?.messageId === messageId) history.splice(index, 1);
|
|
173
174
|
}
|
|
174
|
-
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region extensions/discord/src/monitor/message-handler.context.ts
|
|
175
177
|
function normalizeDiscordDmOwnerEntry(entry) {
|
|
176
178
|
const candidate = normalizeDiscordAllowList([entry], [
|
|
177
179
|
"discord:",
|
|
@@ -584,7 +586,8 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
584
586
|
replyPlan
|
|
585
587
|
};
|
|
586
588
|
}
|
|
587
|
-
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region extensions/discord/src/monitor/message-handler.process-reactions.ts
|
|
588
591
|
function createDiscordMessageReactionRuntime(params) {
|
|
589
592
|
const { ctx } = params;
|
|
590
593
|
const { cfg, accountId, token, ackReactionScope, message, messageChannelId, isGuildMessage, isDirectMessage, isGroupDm, canDetectMention, effectiveWasMentioned, shouldBypassMention, route } = ctx;
|
|
@@ -713,7 +716,8 @@ function createDiscordMessageReactionRuntime(params) {
|
|
|
713
716
|
finish
|
|
714
717
|
};
|
|
715
718
|
}
|
|
716
|
-
|
|
719
|
+
//#endregion
|
|
720
|
+
//#region extensions/discord/src/draft-stream.ts
|
|
717
721
|
/** Discord messages cap at 2000 characters. */
|
|
718
722
|
const DISCORD_STREAM_MAX_CHARS = 2e3;
|
|
719
723
|
const DEFAULT_THROTTLE_MS = 1200;
|
|
@@ -851,7 +855,8 @@ function createDiscordDraftStream(params) {
|
|
|
851
855
|
forceNewMessage: lifecycle.reset
|
|
852
856
|
};
|
|
853
857
|
}
|
|
854
|
-
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region extensions/discord/src/monitor/message-handler.draft-preview.ts
|
|
855
860
|
function createDiscordDraftPreviewController(params) {
|
|
856
861
|
const runInChannelScope = AsyncLocalStorage.snapshot();
|
|
857
862
|
const assertChannelAuthority = captureDiscordRequestAuthority();
|
|
@@ -1165,7 +1170,8 @@ function isEmptyDiscordProgressLine(line) {
|
|
|
1165
1170
|
function shouldStartDiscordProgressDraftNow(line) {
|
|
1166
1171
|
return typeof line === "object" && line?.kind === "patch" && Boolean(line.detail);
|
|
1167
1172
|
}
|
|
1168
|
-
|
|
1173
|
+
//#endregion
|
|
1174
|
+
//#region extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
|
|
1169
1175
|
function formatDiscordGroupThreadReply(text, participant) {
|
|
1170
1176
|
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
1171
1177
|
}
|
|
@@ -1300,7 +1306,8 @@ function createDiscordMessageReplyRuntime(params) {
|
|
|
1300
1306
|
resolvedBlockStreamingEnabled: resolveChannelStreamingBlockEnabled(discordConfig)
|
|
1301
1307
|
};
|
|
1302
1308
|
}
|
|
1303
|
-
|
|
1309
|
+
//#endregion
|
|
1310
|
+
//#region extensions/discord/src/monitor/message-handler.process.ts
|
|
1304
1311
|
const TARGETED_ONLY_ALLOWED_MENTIONS = { parse: [AllowedMentionsTypes.User, AllowedMentionsTypes.Role] };
|
|
1305
1312
|
function isFallbackOnlyToolWarningFinal(payload) {
|
|
1306
1313
|
if (payload.isError !== true || !isReplyPayloadNonTerminalToolErrorWarning(payload)) return false;
|
|
@@ -1754,4 +1761,5 @@ async function processDiscordMessage(ctx) {
|
|
|
1754
1761
|
});
|
|
1755
1762
|
}
|
|
1756
1763
|
}
|
|
1764
|
+
//#endregion
|
|
1757
1765
|
export { processDiscordMessage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { c as normalizeDiscordMessagingTarget, f as resolveDiscordReplyReference, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, l as normalizeDiscordOutboundTarget, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-
|
|
3
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
4
|
-
import { C as notifyDiscordInboundEventOutboundPayloadSuccess, S as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, v as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-
|
|
1
|
+
import { t as createDiscordActionGate } from "./accounts-C_25wyxC.mjs";
|
|
2
|
+
import { c as normalizeDiscordMessagingTarget, f as resolveDiscordReplyReference, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, l as normalizeDiscordOutboundTarget, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-NZDOTZBU.mjs";
|
|
3
|
+
import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
|
|
4
|
+
import { C as notifyDiscordInboundEventOutboundPayloadSuccess, S as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, v as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-Cgx4i9cS.mjs";
|
|
5
5
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
6
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -11,7 +11,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
11
11
|
import { createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
12
12
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
13
13
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
14
|
-
|
|
14
|
+
//#region extensions/discord/src/channel.conversation.ts
|
|
15
15
|
function resolveDiscordAttachedOutboundTarget(params) {
|
|
16
16
|
if (params.threadId == null) return params.to;
|
|
17
17
|
const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
|
|
@@ -72,8 +72,9 @@ function resolveDiscordInboundConversation(params) {
|
|
|
72
72
|
});
|
|
73
73
|
return conversationId ? { conversationId } : null;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region extensions/discord/src/outbound-payload.ts
|
|
77
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CVW7V-VZ.mjs").then((n) => n.t));
|
|
77
78
|
function resolveDiscordDeliveryOptions(ctx) {
|
|
78
79
|
return {
|
|
79
80
|
onPlatformSendDispatch: ctx.onPlatformSendDispatch,
|
|
@@ -161,8 +162,8 @@ const DISCORD_VIDEO_MEDIA_EXTENSIONS = [
|
|
|
161
162
|
".webm"
|
|
162
163
|
];
|
|
163
164
|
const log = createSubsystemLogger("discord/outbound");
|
|
164
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
165
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-
|
|
165
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-zce4cpu_.mjs").then((n) => n.i));
|
|
166
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-C8YXdnO_.mjs").then((n) => n.i));
|
|
166
167
|
const discordOutbound = {
|
|
167
168
|
deliveryMode: "direct",
|
|
168
169
|
chunker: (text, limit, ctx) => chunkDiscordTextWithMode(text, {
|
|
@@ -442,4 +443,5 @@ const discordOutbound = {
|
|
|
442
443
|
await manager.touchThread({ threadId });
|
|
443
444
|
}
|
|
444
445
|
};
|
|
446
|
+
//#endregion
|
|
445
447
|
export { resolveDiscordInboundConversation as a, resolveDiscordCommandConversation as i, discordOutbound as n, resolveDiscordAttachedOutboundTarget as r, DISCORD_TEXT_CHUNK_LIMIT as t };
|
package/dist/.setup/{outbound-session-route-Cb8cv4Oi.mjs → outbound-session-route-Cgx4i9cS.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as resolveDiscordAccountConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { w as isDiscordThreadChannelType } from "./allow-list-
|
|
4
|
-
import { c as normalizeDiscordMessagingTarget, s as matchesDiscordToolContextTarget } from "./send.receipt-
|
|
5
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
6
|
-
import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-
|
|
7
|
-
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-
|
|
1
|
+
import { d as resolveDiscordAccountConfig, i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-C_25wyxC.mjs";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-DGkdWwix.mjs";
|
|
3
|
+
import { w as isDiscordThreadChannelType } from "./allow-list-BXrS8-R9.mjs";
|
|
4
|
+
import { c as normalizeDiscordMessagingTarget, s as matchesDiscordToolContextTarget } from "./send.receipt-NZDOTZBU.mjs";
|
|
5
|
+
import { t as parseDiscordTarget } from "./target-parsing-C-HyNxcE.mjs";
|
|
6
|
+
import { c as coerceDiscordComponentParam, l as readDiscordComponentSpec } from "./components-YCvQ6YLS.mjs";
|
|
7
|
+
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-C7rUdqUX.mjs";
|
|
8
8
|
import { createLazyRuntimeMethod, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
9
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
10
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -22,7 +22,7 @@ import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runt
|
|
|
22
22
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
23
23
|
import { createInboundEventDeliveryCorrelation } from "openclaw/plugin-sdk/inbound-event-delivery";
|
|
24
24
|
import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
25
|
-
|
|
25
|
+
//#region extensions/discord/src/exec-approvals.ts
|
|
26
26
|
function normalizeDiscordApproverId(value) {
|
|
27
27
|
const trimmed = String(value).trim();
|
|
28
28
|
if (!trimmed) return;
|
|
@@ -67,7 +67,8 @@ function shouldSuppressLocalDiscordExecApprovalPrompt(params) {
|
|
|
67
67
|
sessionFilter: config?.sessionFilter
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region extensions/discord/src/audit-core.ts
|
|
71
72
|
const REQUIRED_TEXT_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
72
73
|
const REQUIRED_THREAD_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessagesInThreads"];
|
|
73
74
|
const REQUIRED_VOICE_CHANNEL_PERMISSIONS = [
|
|
@@ -142,7 +143,8 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
|
142
143
|
elapsedMs: Date.now() - started
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region extensions/discord/src/inbound-event-delivery.ts
|
|
146
148
|
const DISCORD_INBOUND_EVENT_DELIVERY_KEY = "__openclawInboundEventDelivery";
|
|
147
149
|
function normalizeDiscordDeliveryTarget(value) {
|
|
148
150
|
return value.trim().replace(/^discord:/iu, "").replace(/^channel:/iu, "").toLowerCase();
|
|
@@ -179,7 +181,8 @@ function notifyDiscordInboundEventOutboundPayloadSuccess(params) {
|
|
|
179
181
|
accountId: params.accountId
|
|
180
182
|
});
|
|
181
183
|
}
|
|
182
|
-
|
|
184
|
+
//#endregion
|
|
185
|
+
//#region extensions/discord/src/trusted-requester-actions.ts
|
|
183
186
|
const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
|
|
184
187
|
"emoji-upload",
|
|
185
188
|
"sticker-upload",
|
|
@@ -200,7 +203,8 @@ const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
|
|
|
200
203
|
function isTrustedRequesterGuildAdminAction(action) {
|
|
201
204
|
return trustedRequesterGuildAdminActions.has(action);
|
|
202
205
|
}
|
|
203
|
-
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region extensions/discord/src/channel-actions.ts
|
|
204
208
|
const localExecutionActions = /* @__PURE__ */ new Set([
|
|
205
209
|
"send",
|
|
206
210
|
"poll",
|
|
@@ -211,7 +215,7 @@ const localExecutionActions = /* @__PURE__ */ new Set([
|
|
|
211
215
|
"sticker-upload",
|
|
212
216
|
"event-create"
|
|
213
217
|
]);
|
|
214
|
-
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-
|
|
218
|
+
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-CktwmzMz.mjs"));
|
|
215
219
|
const discordActionGroups = [
|
|
216
220
|
{
|
|
217
221
|
gate: "polls",
|
|
@@ -451,7 +455,8 @@ const discordMessageActions = {
|
|
|
451
455
|
...sessionKey ? { sessionKey } : {}
|
|
452
456
|
})
|
|
453
457
|
};
|
|
454
|
-
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region extensions/discord/src/conversation-identity.ts
|
|
455
460
|
function normalizeDiscordTarget(raw, defaultKind) {
|
|
456
461
|
return parseDiscordTarget(raw ?? "", { defaultKind })?.normalized;
|
|
457
462
|
}
|
|
@@ -480,7 +485,8 @@ function resolveDiscordCurrentConversationIdentity(params) {
|
|
|
480
485
|
if (target) return target;
|
|
481
486
|
}
|
|
482
487
|
}
|
|
483
|
-
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region extensions/discord/src/monitor/route-resolution.ts
|
|
484
490
|
function buildDiscordRoutePeer(params) {
|
|
485
491
|
return {
|
|
486
492
|
kind: params.isGroupDm ? "group" : params.isDirectMessage ? "direct" : "channel",
|
|
@@ -550,7 +556,8 @@ function shouldIgnoreStaleDiscordRouteBinding(params) {
|
|
|
550
556
|
if (!bound || !routed || bound.rest !== routed.rest) return false;
|
|
551
557
|
return bound.agentId !== params.route.agentId;
|
|
552
558
|
}
|
|
553
|
-
|
|
559
|
+
//#endregion
|
|
560
|
+
//#region extensions/discord/src/channel-policy-state.ts
|
|
554
561
|
const policyBindings = resolveGlobalMap(Symbol.for("openclaw.discord.policy-bindings"), "close-and-restart");
|
|
555
562
|
function setDiscordPolicyBindings(accountId, bindings, guilds = /* @__PURE__ */ new Map()) {
|
|
556
563
|
policyBindings.set(normalizeAccountId(accountId), {
|
|
@@ -567,7 +574,8 @@ function getDiscordChannelPolicyBinding(accountId, guildKey, channelKey) {
|
|
|
567
574
|
function findDiscordChannelPolicyKey(accountId, guildKey, channelId) {
|
|
568
575
|
return policyBindings.get(normalizeAccountId(accountId))?.channels.find((binding) => binding.guildKey === guildKey && binding.channelId === channelId)?.channelKey;
|
|
569
576
|
}
|
|
570
|
-
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region extensions/discord/src/group-policy.ts
|
|
571
579
|
function resolveDiscordGuildKey(guilds, groupSpace, accountId) {
|
|
572
580
|
if (!guilds || Object.keys(guilds).length === 0) return;
|
|
573
581
|
const space = normalizeOptionalString(groupSpace) ?? "";
|
|
@@ -629,7 +637,8 @@ function resolveDiscordGroupToolPolicy(params) {
|
|
|
629
637
|
senderE164: params.senderE164
|
|
630
638
|
});
|
|
631
639
|
}
|
|
632
|
-
|
|
640
|
+
//#endregion
|
|
641
|
+
//#region extensions/discord/src/approval-message-safety.ts
|
|
633
642
|
const DISCORD_APPROVAL_ALLOWED_MENTIONS = { parse: [] };
|
|
634
643
|
const DISCORD_MARKDOWN_META_CHARACTERS = /* @__PURE__ */ new Set([
|
|
635
644
|
"\\",
|
|
@@ -672,7 +681,8 @@ function formatDiscordApprovalDisplayValue(value) {
|
|
|
672
681
|
}
|
|
673
682
|
return escaped;
|
|
674
683
|
}
|
|
675
|
-
|
|
684
|
+
//#endregion
|
|
685
|
+
//#region extensions/discord/src/outbound-components.ts
|
|
676
686
|
const DISCORD_MESSAGE_COMPONENT_LIMIT = 40;
|
|
677
687
|
const DISCORD_TEXT_DISPLAY_LIMIT = 2e3;
|
|
678
688
|
const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
@@ -702,8 +712,8 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
|
702
712
|
}
|
|
703
713
|
}
|
|
704
714
|
};
|
|
705
|
-
const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components-
|
|
706
|
-
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./shared-interactive-
|
|
715
|
+
const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components-C8YXdnO_.mjs").then((n) => n.i)), (runtime) => runtime.sendDiscordComponentMessage);
|
|
716
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./shared-interactive-DmzaoKOM.mjs").then((n) => n.r));
|
|
707
717
|
function addPayloadTextFallback(spec, payload) {
|
|
708
718
|
return spec.text ? spec : {
|
|
709
719
|
...spec,
|
|
@@ -758,7 +768,8 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
758
768
|
const interactiveSpec = (await loadDiscordSharedInteractive()).buildDiscordInteractiveComponents(payload.interactive);
|
|
759
769
|
return interactiveSpec ? addPayloadTextFallback(interactiveSpec, payload) : void 0;
|
|
760
770
|
}
|
|
761
|
-
|
|
771
|
+
//#endregion
|
|
772
|
+
//#region extensions/discord/src/outbound-session-route.ts
|
|
762
773
|
function resolveDiscordOutboundSessionRoute(params) {
|
|
763
774
|
const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
|
|
764
775
|
if (!parsed) return null;
|
|
@@ -798,4 +809,5 @@ function resolveDiscordOutboundTargetKindHint(params) {
|
|
|
798
809
|
if (resolvedKind === "group" || resolvedKind === "channel") return "channel";
|
|
799
810
|
return /^(user:|discord:|@|<@!?)/i.test(params.target.trim()) ? "user" : "channel";
|
|
800
811
|
}
|
|
812
|
+
//#endregion
|
|
801
813
|
export { shouldSuppressLocalDiscordExecApprovalPrompt as A, notifyDiscordInboundEventOutboundPayloadSuccess as C, getDiscordExecApprovalApprovers as D, resolveRequiredDiscordChannelPermissions as E, isDiscordExecApprovalApprover as O, discordInboundEventDelivery as S, collectDiscordAuditChannelIdsForAccount as T, resolveDiscordConversationIdentity as _, resolveDiscordComponentSpec as a, discordMessageActions as b, formatDiscordApprovalDisplayValue as c, setDiscordPolicyBindings as d, buildDiscordConversationRouteContext as f, shouldIgnoreStaleDiscordRouteBinding as g, resolveDiscordEffectiveRoute as h, isDiscordComponentSpecWithinMessageLimit as i, isDiscordExecApprovalClientEnabled as k, resolveDiscordGroupRequireMention as l, resolveDiscordConversationRoute as m, DISCORD_PRESENTATION_CAPABILITIES as n, sendDiscordComponentMessageLazy as o, buildDiscordRoutePeer as p, buildDiscordPresentationPayload as r, DISCORD_APPROVAL_ALLOWED_MENTIONS as s, resolveDiscordOutboundSessionRoute as t, resolveDiscordGroupToolPolicy as u, resolveDiscordCurrentConversationIdentity as v, auditDiscordChannelPermissionsWithFetcher as w, isTrustedRequesterGuildAdminAction as x, resolveDiscordRuntimeBindingConversationId as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region extensions/discord/src/voice/output-activity.ts
|
|
2
2
|
function resolveDiscordOutputAudioDelta(previous, sourceAudioBytes) {
|
|
3
3
|
const sinkAudioBytes = Math.floor((previous.sourceAudioBytes + sourceAudioBytes) / 2) * 8 - previous.sinkAudioBytes;
|
|
4
4
|
return {
|
|
@@ -7,4 +7,5 @@ function resolveDiscordOutputAudioDelta(previous, sourceAudioBytes) {
|
|
|
7
7
|
sinkAudioBytes
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
+
//#endregion
|
|
10
11
|
export { resolveDiscordOutputAudioDelta as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
2
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
3
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
4
4
|
import { readProviderJsonObjectResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
5
5
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
6
|
-
|
|
6
|
+
//#region extensions/discord/src/pluralkit.ts
|
|
7
7
|
var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });
|
|
8
8
|
const PLURALKIT_API_BASE = "https://api.pluralkit.me/v2";
|
|
9
9
|
const PLURALKIT_ERROR_BODY_LIMIT_BYTES = 8192;
|
|
@@ -41,4 +41,5 @@ async function fetchPluralKitMessageInfo(params) {
|
|
|
41
41
|
timeout.cleanup();
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
//#endregion
|
|
44
45
|
export { pluralkit_exports as n, fetchPluralKitMessageInfo as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { getFileExtension } from "openclaw/plugin-sdk/media-mime";
|
|
3
3
|
import { createChannelPreflightAudio } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
4
|
-
|
|
4
|
+
//#region extensions/discord/src/monitor/preflight-audio.ts
|
|
5
5
|
const AUDIO_ATTACHMENT_MIME_BY_EXT = /* @__PURE__ */ new Map([
|
|
6
6
|
[".aac", "audio/aac"],
|
|
7
7
|
[".caf", "audio/x-caf"],
|
|
@@ -55,4 +55,5 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
55
55
|
transcript
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
+
//#endregion
|
|
58
59
|
export { resolveDiscordPreflightAudioMentionContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
2
|
-
|
|
2
|
+
//#region extensions/discord/src/monitor/presence-cache.ts
|
|
3
3
|
/**
|
|
4
4
|
* In-memory cache of Discord user presence data.
|
|
5
5
|
* Populated by GUILD_CREATE snapshots and PRESENCE_UPDATE when GuildPresences is enabled.
|
|
@@ -27,4 +27,5 @@ function clearPresences(accountId) {
|
|
|
27
27
|
}
|
|
28
28
|
presenceCache.clear();
|
|
29
29
|
}
|
|
30
|
+
//#endregion
|
|
30
31
|
export { getPresence as n, setPresence as r, clearPresences as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { h as normalizeDiscordToken } from "./accounts-
|
|
3
|
-
import { n as getDiscordEndpointRuntime } from "./endpoint-runtime-
|
|
4
|
-
import { n as DiscordApiError, r as fetchDiscord } from "./api-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { h as normalizeDiscordToken } from "./accounts-C_25wyxC.mjs";
|
|
3
|
+
import { n as getDiscordEndpointRuntime } from "./endpoint-runtime-lf4DeLas.mjs";
|
|
4
|
+
import { n as DiscordApiError, r as fetchDiscord } from "./api-BlBD4ism.mjs";
|
|
5
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
6
6
|
import { ApplicationFlags } from "discord-api-types/v10";
|
|
7
7
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
8
8
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
9
9
|
import { fetchWithTimeout, runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
10
|
-
|
|
10
|
+
//#region extensions/discord/src/probe.ts
|
|
11
11
|
var probe_exports = /* @__PURE__ */ __exportAll({
|
|
12
12
|
fetchDiscordApplicationId: () => fetchDiscordApplicationId,
|
|
13
13
|
fetchDiscordApplicationSummary: () => fetchDiscordApplicationSummary,
|
|
@@ -167,4 +167,5 @@ async function fetchDiscordApplicationId(token, timeoutMs, fetcher = fetch) {
|
|
|
167
167
|
if (result.kind === "resolved") return result.applicationId;
|
|
168
168
|
if (result.kind === "unavailable" && result.status === 429) throw result.error;
|
|
169
169
|
}
|
|
170
|
+
//#endregion
|
|
170
171
|
export { probeDiscordApplicationId as a, probeDiscord as i, fetchDiscordApplicationSummary as n, probe_exports as o, parseApplicationIdFromToken as r, resolveDiscordPrivilegedIntentsFromFlags as s, fetchDiscordApplicationId as t };
|