@openclaw/discord 2026.10.10-beta.4 → 2026.10.10
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-BvF8oUpa.mjs → approval-handler.runtime-BAoEELJJ.mjs} +8 -9
- package/dist/.setup/{approval-message-updates-wbUqLtLI.mjs → approval-message-updates-Cks-MSCJ.mjs} +3 -4
- package/dist/.setup/{audit-UwzCdDJk.mjs → audit-Dw_rAZIz.mjs} +6 -7
- package/dist/.setup/{channel-BlvyeRAu.mjs → channel-BMpMAeQL.mjs} +33 -41
- package/dist/.setup/{channel-access-DasWY_OV.mjs → channel-access-BPrWoEXM.mjs} +1 -2
- package/dist/.setup/{channel.setup-By7wNopw.mjs → channel.setup-DVe7Y3Jf.mjs} +8 -12
- package/dist/.setup/{command-deploy-store-DFkBTViB.mjs → command-deploy-store-DPWiBMks.mjs} +1 -2
- package/dist/.setup/{command-owners-D78sAoOz.mjs → command-owners-BzlhNBxA.mjs} +2 -3
- 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-fdYsXexV.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-94GSI6lY.mjs → doctor-Dty_Ossy.mjs} +8 -9
- package/dist/.setup/{doctor-contract-Bwv8EuQ_.mjs → doctor-contract-Dstl3cMg.mjs} +2 -3
- package/dist/.setup/{handle-action-0-FZD3Am.mjs → handle-action-DXY91jF-.mjs} +10 -11
- package/dist/.setup/{handle-action.guild-admin-DfAWANBE.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-CtR2w7W_.mjs → message-handler-fL1j1NiR.mjs} +11 -16
- package/dist/.setup/{message-handler.preflight-BqUw7LWb.mjs → message-handler.preflight-DkjwNZAd.mjs} +20 -28
- package/dist/.setup/{message-handler.preflight-pluralkit-BU9I_X-b.mjs → message-handler.preflight-pluralkit-DR4BnvMU.mjs} +10 -14
- package/dist/.setup/{message-handler.process-BZeWmSNC.mjs → message-handler.process-ClOwIPDK.mjs} +33 -47
- package/dist/.setup/{outbound-adapter-DBwgKemw.mjs → outbound-adapter-DWyAWBFh.mjs} +13 -19
- package/dist/.setup/{outbound-session-route-CsHHPxsQ.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-DUTsZJHz.mjs → provider-BBDuE14w.mjs} +165 -227
- package/dist/.setup/{provider-session.runtime-Ucr3XodI.mjs → provider-session.runtime-D8hMXXqJ.mjs} +3 -3
- package/dist/.setup/provider.runtime-BQ1z4Aq1.mjs +1 -0
- package/dist/.setup/{realtime-session.runtime-bNnPOKP_.mjs → realtime-session.runtime-cetognkp.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-DE6W14G3.mjs → runtime-CI0UJqeS.mjs} +23 -35
- package/dist/.setup/{runtime-Cg5pIBm_.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-BdbCvqnM.mjs} +1 -2
- 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-yR1hfybW.mjs → send-Cbq-IVsS.mjs} +18 -28
- package/dist/.setup/{send.components--dxMjc2O.mjs → send.components-BV6ucNpJ.mjs} +10 -13
- package/dist/.setup/{send.outbound-B5vQwgUK.mjs → send.outbound-CGhBhzjQ.mjs} +9 -13
- package/dist/.setup/{send.receipt-eE3zLTDH.mjs → send.receipt-Dw-_r5Bx.mjs} +17 -19
- package/dist/.setup/{send.shared-iGf1rqAm.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-B4J6wmL1.mjs +2 -0
- package/dist/.setup/{shared-DgzLizSt.mjs → shared-Bp0sxD5R.mjs} +15 -19
- package/dist/.setup/{subagent-hooks-tBtaqWkD.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-BFOKmBni.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-Dsc3zsrI.mjs → thread-bindings-Dg7X_ZXP.mjs} +8 -11
- package/dist/.setup/{thread-bindings.manager-BMpmKLQh.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-Cg_QRc8s.mjs → threading-l0UfrE6x.mjs} +6 -9
- package/dist/.setup/{timeouts-CuNARfyw.mjs → timeouts-DTrUsJ_W.mjs} +1 -2
- package/dist/.setup/{transcripts-source-fRvFsZng.mjs → transcripts-source-CGgOaWcu.mjs} +19 -32
- package/dist/.setup/{typing-CNlSKY5S.mjs → typing-DAv4S2fI.mjs} +2 -3
- package/dist/.setup/{voice-runtime-DHDNu0fz.mjs → voice-runtime-DY1EwDfi.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/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 +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/@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/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-J8NuMCNs.mjs +0 -1
- package/dist/.setup/setup-plugin-api-DVpA_yqS.mjs +0 -2
- package/dist/.setup/targets-UbCpek5o.mjs +0 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { c as resolveDefaultDiscordAccountId } from "./accounts-
|
|
2
|
-
import { C as resolveDiscordSystemLocation, S as formatDiscordUserTag, a as normalizeDiscordDisplaySlug, f as resolveDiscordGuildEntry, h as resolveDiscordMentionPolicy, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, w as resolveTimestampMs } from "./allow-list-
|
|
3
|
-
import { Q as Message, pt as getChannelMessage, t as discord_exports } from "./discord-
|
|
4
|
-
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-
|
|
5
|
-
import { b as resolveDiscordRuntimeBindingConversationId, g as resolveDiscordEffectiveRoute, h as resolveDiscordConversationRoute, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-
|
|
6
|
-
import { n as resolveDiscordConversationBindingRouteAsync } from "./conversation-binding-route-
|
|
7
|
-
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-
|
|
8
|
-
import { A as resolveDiscordDmCommandAccess, E as handleDiscordDmCommandDecision, j as resolveDiscordTextCommandAccess, n as resolveDiscordPreflightChannelAccess } from "./provider-
|
|
9
|
-
import { A as resolveDiscordChannelInfo, C as resolveMediaList, D as resolveDiscordMessageStickers, O as resolveDiscordReferencedReplyMessage, S as resolveForwardedMediaList, _ as resolveDiscordMessageBatch, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, v as resolveDiscordMessageHistoryText, y as resolveDiscordMessageMentionDocuments } from "./transcripts-source-
|
|
10
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
11
|
-
import { a as createDiscordHistorySenderProvenance, c as hasRawDiscordUserMention, d as matchesActiveDiscordMentionPatterns, f as resolveDiscordMentionState, i as loadSystemEventsRuntime, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, n as loadDiscordThreadingRuntime, p as resolveInjectedBoundThreadLookupRecord, r as loadPreflightAudioRuntime, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo, u as isDiscordThreadChannelMessage } from "./message-handler.preflight-pluralkit-
|
|
1
|
+
import { c as resolveDefaultDiscordAccountId } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { C as resolveDiscordSystemLocation, S as formatDiscordUserTag, a as normalizeDiscordDisplaySlug, f as resolveDiscordGuildEntry, h as resolveDiscordMentionPolicy, l as resolveDiscordChannelConfigWithFallback, o as normalizeDiscordSlug, p as resolveDiscordMemberAccessState, w as resolveTimestampMs } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { Q as Message, pt as getChannelMessage, t as discord_exports } from "./discord-eFlHX1Gn.mjs";
|
|
4
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-DTrUsJ_W.mjs";
|
|
5
|
+
import { b as resolveDiscordRuntimeBindingConversationId, g as resolveDiscordEffectiveRoute, h as resolveDiscordConversationRoute, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-TFBPPkoz.mjs";
|
|
6
|
+
import { n as resolveDiscordConversationBindingRouteAsync } from "./conversation-binding-route-DOPUZNYo.mjs";
|
|
7
|
+
import { n as resolveDiscordChannelInfoSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-BPrWoEXM.mjs";
|
|
8
|
+
import { A as resolveDiscordDmCommandAccess, E as handleDiscordDmCommandDecision, j as resolveDiscordTextCommandAccess, n as resolveDiscordPreflightChannelAccess } from "./provider-BBDuE14w.mjs";
|
|
9
|
+
import { A as resolveDiscordChannelInfo, C as resolveMediaList, D as resolveDiscordMessageStickers, O as resolveDiscordReferencedReplyMessage, S as resolveForwardedMediaList, _ as resolveDiscordMessageBatch, b as resolveDiscordMessageText, j as resolveDiscordMessageChannelId, v as resolveDiscordMessageHistoryText, y as resolveDiscordMessageMentionDocuments } from "./transcripts-source-CGgOaWcu.mjs";
|
|
10
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-DrN5c4ec.mjs";
|
|
11
|
+
import { a as createDiscordHistorySenderProvenance, c as hasRawDiscordUserMention, d as matchesActiveDiscordMentionPatterns, f as resolveDiscordMentionState, i as loadSystemEventsRuntime, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, n as loadDiscordThreadingRuntime, p as resolveInjectedBoundThreadLookupRecord, r as loadPreflightAudioRuntime, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo, u as isDiscordThreadChannelMessage } from "./message-handler.preflight-pluralkit-DR4BnvMU.mjs";
|
|
12
12
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
13
13
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
14
14
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
@@ -24,9 +24,9 @@ import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
|
|
24
24
|
import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
|
|
25
25
|
import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
26
26
|
import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
27
|
-
|
|
27
|
+
// extensions/discord/src/monitor/message-handler.dm-preflight.ts
|
|
28
28
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
29
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
29
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Cbq-IVsS.mjs").then((n) => n.t));
|
|
30
30
|
async function resolveDiscordDmPreflightAccess(params) {
|
|
31
31
|
if (params.dmPolicy === "disabled") {
|
|
32
32
|
logVerbose("discord: drop dm (dmPolicy: disabled)");
|
|
@@ -108,8 +108,7 @@ async function resolveDiscordDmPreflightAccess(params) {
|
|
|
108
108
|
});
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
//#region extensions/discord/src/monitor/message-handler.hydration.ts
|
|
111
|
+
// extensions/discord/src/monitor/message-handler.hydration.ts
|
|
113
112
|
function shouldHydrateDiscordMessagePayload(message) {
|
|
114
113
|
let currentText;
|
|
115
114
|
try {
|
|
@@ -181,8 +180,7 @@ async function hydrateDiscordMessageIfNeeded(params) {
|
|
|
181
180
|
})
|
|
182
181
|
};
|
|
183
182
|
}
|
|
184
|
-
|
|
185
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-channel-context.ts
|
|
183
|
+
// extensions/discord/src/monitor/message-handler.preflight-channel-context.ts
|
|
186
184
|
function resolveDiscordPreflightChannelContext(params) {
|
|
187
185
|
const threadName = params.threadChannel?.name;
|
|
188
186
|
const displayChannelName = threadName ?? params.channelName;
|
|
@@ -205,8 +203,7 @@ function resolveDiscordPreflightChannelContext(params) {
|
|
|
205
203
|
}) : null
|
|
206
204
|
};
|
|
207
205
|
}
|
|
208
|
-
|
|
209
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-history.ts
|
|
206
|
+
// extensions/discord/src/monitor/message-handler.preflight-history.ts
|
|
210
207
|
function buildDiscordPreflightHistoryEntry(params) {
|
|
211
208
|
const textForHistory = resolveDiscordMessageHistoryText(params.message, { includeForwarded: true });
|
|
212
209
|
return params.isGuildMessage && params.historyLimit > 0 && textForHistory ? {
|
|
@@ -218,8 +215,7 @@ function buildDiscordPreflightHistoryEntry(params) {
|
|
|
218
215
|
senderProvenance: createDiscordHistorySenderProvenance(params)
|
|
219
216
|
} : void 0;
|
|
220
217
|
}
|
|
221
|
-
|
|
222
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-logging.ts
|
|
218
|
+
// extensions/discord/src/monitor/message-handler.preflight-logging.ts
|
|
223
219
|
function logDiscordPreflightChannelConfig(params) {
|
|
224
220
|
if (!shouldLogVerbose()) return;
|
|
225
221
|
const channelConfigSummary = params.channelConfig ? `allowed=${params.channelConfig.allowed} enabled=${params.channelConfig.enabled ?? "unset"} requireMention=${params.channelConfig.requireMention ?? "unset"} ignoreOtherMentions=${params.channelConfig.ignoreOtherMentions ?? "unset"} matchKey=${params.channelConfig.matchKey ?? "none"} matchSource=${params.channelConfig.matchSource ?? "none"} users=${params.channelConfig.users?.length ?? 0} roles=${params.channelConfig.roles?.length ?? 0} skills=${params.channelConfig.skills?.length ?? 0}` : "none";
|
|
@@ -229,8 +225,7 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
229
225
|
if (!shouldLogVerbose()) return;
|
|
230
226
|
logVerbose(`discord: inbound id=${params.messageId} guild=${params.guildId ?? "dm"} channel=${params.channelId} mention=${params.wasMentioned ? "yes" : "no"} type=${params.isDirectMessage ? "dm" : params.isGroupDm ? "group-dm" : "guild"} content=${params.hasContent ? "yes" : "no"}`);
|
|
231
227
|
}
|
|
232
|
-
|
|
233
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-thread.ts
|
|
228
|
+
// extensions/discord/src/monitor/message-handler.preflight-thread.ts
|
|
234
229
|
async function resolveDiscordPreflightThreadContext(params) {
|
|
235
230
|
const { resolveDiscordThreadChannel, resolveDiscordThreadParentInfo } = await loadDiscordThreadingRuntime();
|
|
236
231
|
const earlyThreadChannel = resolveDiscordThreadChannel(params);
|
|
@@ -248,8 +243,7 @@ async function resolveDiscordPreflightThreadContext(params) {
|
|
|
248
243
|
earlyThreadParentType: parentInfo.type
|
|
249
244
|
};
|
|
250
245
|
}
|
|
251
|
-
|
|
252
|
-
//#region extensions/discord/src/monitor/message-handler.routing-preflight.ts
|
|
246
|
+
// extensions/discord/src/monitor/message-handler.routing-preflight.ts
|
|
253
247
|
const loadConversationRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
254
248
|
async function resolveDiscordPreflightRoute(params) {
|
|
255
249
|
const conversationRuntime = await loadConversationRuntime();
|
|
@@ -301,8 +295,7 @@ async function resolveDiscordPreflightRoute(params) {
|
|
|
301
295
|
baseSessionKey: effectiveRoute.sessionKey
|
|
302
296
|
};
|
|
303
297
|
}
|
|
304
|
-
|
|
305
|
-
//#region extensions/discord/src/monitor/message-handler.preflight.ts
|
|
298
|
+
// extensions/discord/src/monitor/message-handler.preflight.ts
|
|
306
299
|
const DISCORD_HISTORY_MEDIA_MAX_ATTACHMENTS = 4;
|
|
307
300
|
const DISCORD_HISTORY_MEDIA_MAX_BYTES = 10485760;
|
|
308
301
|
const DISCORD_HISTORY_MEDIA_IDLE_TIMEOUT_MS = 1e3;
|
|
@@ -892,5 +885,4 @@ async function preflightDiscordMessage(params) {
|
|
|
892
885
|
canDetectMention
|
|
893
886
|
};
|
|
894
887
|
}
|
|
895
|
-
//#endregion
|
|
896
888
|
export { preflightDiscordMessage, shouldIgnoreBoundThreadWebhookMessage };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as isDiscordThreadChannelType } from "./allow-list-
|
|
2
|
-
import { D as resolveDiscordMessageStickers } from "./transcripts-source-
|
|
1
|
+
import { A as isDiscordThreadChannelType } from "./allow-list-D1ZGfhXh.mjs";
|
|
2
|
+
import { D as resolveDiscordMessageStickers } from "./transcripts-source-CGgOaWcu.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
|
+
// extensions/discord/src/monitor/message-handler.preflight-helpers.ts
|
|
10
10
|
const DISCORD_BOUND_THREAD_SYSTEM_PREFIXES = [
|
|
11
11
|
"⚙️",
|
|
12
12
|
"🤖",
|
|
@@ -80,8 +80,7 @@ function shouldIgnoreBoundThreadWebhookMessage(params) {
|
|
|
80
80
|
const threadId = normalizeOptionalString(params.threadId) ?? "";
|
|
81
81
|
return Boolean(threadId && params.threadBinding);
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
//#region extensions/discord/src/monitor/message-handler.history.ts
|
|
83
|
+
// extensions/discord/src/monitor/message-handler.history.ts
|
|
85
84
|
function createDiscordHistorySenderProvenance(params) {
|
|
86
85
|
return Object.freeze({
|
|
87
86
|
id: params.sender.id,
|
|
@@ -109,14 +108,12 @@ function filterDiscordHistoryEntriesForContext(params) {
|
|
|
109
108
|
function resolveDiscordHistoryMediaIds(message) {
|
|
110
109
|
return [...(message.attachments ?? []).map((attachment) => `attachment:${attachment.id}`), ...resolveDiscordMessageStickers(message).map((sticker) => `sticker:${sticker.id}`)];
|
|
111
110
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
//#endregion
|
|
119
|
-
//#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
|
|
111
|
+
// extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
112
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-DcXbHTpQ.mjs").then((n) => n.n));
|
|
113
|
+
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-CwtPIsvk.mjs"));
|
|
114
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-2zc2eGfF.mjs"));
|
|
115
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-l0UfrE6x.mjs").then((n) => n.t));
|
|
116
|
+
// extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
|
|
120
117
|
async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
121
118
|
if (!params.config?.enabled || !params.webhookId) return null;
|
|
122
119
|
try {
|
|
@@ -132,5 +129,4 @@ async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
|
132
129
|
return null;
|
|
133
130
|
}
|
|
134
131
|
}
|
|
135
|
-
//#endregion
|
|
136
132
|
export { createDiscordHistorySenderProvenance as a, hasRawDiscordUserMention as c, matchesActiveDiscordMentionPatterns as d, resolveDiscordMentionState as f, loadSystemEventsRuntime as i, isBoundThreadBotSystemMessage as l, shouldIgnoreBoundThreadWebhookMessage as m, loadDiscordThreadingRuntime as n, filterDiscordHistoryEntriesForContext as o, resolveInjectedBoundThreadLookupRecord as p, loadPreflightAudioRuntime as r, resolveDiscordHistoryMediaIds as s, resolveDiscordPreflightPluralKitInfo as t, isDiscordThreadChannelMessage as u };
|
package/dist/.setup/{message-handler.process-BZeWmSNC.mjs → message-handler.process-ClOwIPDK.mjs}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-
|
|
2
|
-
import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug, w as resolveTimestampMs } from "./allow-list-
|
|
3
|
-
import { F as createDiscordRuntimeAccountContext, O as resolveDiscordMessageFlags, P as createDiscordRestClient, u as resolveDiscordTargetChannelId } from "./send.shared-
|
|
4
|
-
import { G as withDiscordRequestAuthority, Q as Message, W as captureDiscordRequestAuthority, dt as editChannelMessage, t as discord_exports, ut as deleteChannelMessage, vt as getGuildMember } from "./discord-
|
|
5
|
-
import { 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 "./targets-
|
|
11
|
-
import { C as discordInboundEventDelivery, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-
|
|
12
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-
|
|
13
|
-
import { T as createDiscordSupplementalContextAccessChecker, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as buildDiscordInboundAccessContext } from "./provider-
|
|
14
|
-
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-
|
|
15
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
16
|
-
import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-
|
|
17
|
-
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-
|
|
18
|
-
import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, o as filterDiscordHistoryEntriesForContext, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-
|
|
19
|
-
import { t as sendTyping } from "./typing-
|
|
1
|
+
import { m as resolveDiscordMaxLinesPerMessage } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { i as normalizeDiscordAllowList, o as normalizeDiscordSlug, w as resolveTimestampMs } from "./allow-list-D1ZGfhXh.mjs";
|
|
3
|
+
import { F as createDiscordRuntimeAccountContext, O as resolveDiscordMessageFlags, P as createDiscordRestClient, u as resolveDiscordTargetChannelId } from "./send.shared-D4MioxW_.mjs";
|
|
4
|
+
import { G as withDiscordRequestAuthority, Q as Message, W as captureDiscordRequestAuthority, dt as editChannelMessage, t as discord_exports, ut as deleteChannelMessage, vt as getGuildMember } from "./discord-eFlHX1Gn.mjs";
|
|
5
|
+
import { v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
6
|
+
import { n as resolveDiscordChannelId } from "./target-parsing-BiuhcK9Q.mjs";
|
|
7
|
+
import { a as removeReactionDiscord, r as reactMessageDiscord } from "./send-Cbq-IVsS.mjs";
|
|
8
|
+
import { o as discordTextHasBroadcastMention } from "./send.outbound-CGhBhzjQ.mjs";
|
|
9
|
+
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-DTrUsJ_W.mjs";
|
|
10
|
+
import "./targets-BaklhOqq.mjs";
|
|
11
|
+
import { C as discordInboundEventDelivery, p as buildDiscordRoutePeer, v as resolveDiscordConversationIdentity } from "./outbound-session-route-TFBPPkoz.mjs";
|
|
12
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-DWyAWBFh.mjs";
|
|
13
|
+
import { T as createDiscordSupplementalContextAccessChecker, c as formatDiscordReplySkip, d as buildGuildLabel, f as resolveReplyContext, l as sanitizeDiscordFrontChannelReplyPayloads, o as deliverDiscordReply, s as formatDiscordReplyDeliveryFailure, u as buildDirectLabel, w as buildDiscordInboundAccessContext } from "./provider-BBDuE14w.mjs";
|
|
14
|
+
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-CGgOaWcu.mjs";
|
|
15
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-DrN5c4ec.mjs";
|
|
16
|
+
import { n as resolveDiscordAutoThreadReplyPlan } from "./threading-l0UfrE6x.mjs";
|
|
17
|
+
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-BAc_Xik-.mjs";
|
|
18
|
+
import { a as createDiscordHistorySenderProvenance, l as isBoundThreadBotSystemMessage, m as shouldIgnoreBoundThreadWebhookMessage, o as filterDiscordHistoryEntriesForContext, s as resolveDiscordHistoryMediaIds, t as resolveDiscordPreflightPluralKitInfo } from "./message-handler.preflight-pluralkit-DR4BnvMU.mjs";
|
|
19
|
+
import { t as sendTyping } from "./typing-DAv4S2fI.mjs";
|
|
20
20
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
21
21
|
import { danger, logVerbose, shouldLogVerbose, sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
22
22
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
@@ -44,7 +44,7 @@ import { buildHistoryContextFromEntries, buildInboundHistoryFromEntries, createC
|
|
|
44
44
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
45
45
|
import { formatAudioTranscriptForAgent } from "openclaw/plugin-sdk/media-understanding-runtime";
|
|
46
46
|
import { createStatusReactionController, logAckFailure, logTypingFailure, shouldAckReaction } from "openclaw/plugin-sdk/channel-feedback";
|
|
47
|
-
|
|
47
|
+
// extensions/discord/src/monitor/message-handler.recent-history.ts
|
|
48
48
|
/** Fetch a physical recent window, never walking older pages to refill filtered rows. */
|
|
49
49
|
async function recoverDiscordChannelHistory(params) {
|
|
50
50
|
const { ctx, isCurrent } = params;
|
|
@@ -151,8 +151,7 @@ async function recoverDiscordChannelHistory(params) {
|
|
|
151
151
|
return [];
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
//#region extensions/discord/src/monitor/message-handler.retry.ts
|
|
154
|
+
// extensions/discord/src/monitor/message-handler.retry.ts
|
|
156
155
|
const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /^reply session initialization conflicted for \S+$/u;
|
|
157
156
|
const DISCORD_SESSION_CONFLICT_FAILURE_TEXT = "⚠️ Couldn't process this message because the session stayed busy. Please try again in a moment.";
|
|
158
157
|
async function completeDiscordSessionConflict(error, sourceReplyDeliveryMode, deliver, onDeliveryError) {
|
|
@@ -174,8 +173,7 @@ function removeDiscordReplayHistoryEntry(historyMap, historyKey, messageId) {
|
|
|
174
173
|
if (!history) return;
|
|
175
174
|
for (let index = history.length - 1; index >= 0; index -= 1) if (history[index]?.messageId === messageId) history.splice(index, 1);
|
|
176
175
|
}
|
|
177
|
-
|
|
178
|
-
//#region extensions/discord/src/monitor/message-handler.context.ts
|
|
176
|
+
// extensions/discord/src/monitor/message-handler.context.ts
|
|
179
177
|
function normalizeDiscordDmOwnerEntry(entry) {
|
|
180
178
|
const candidate = normalizeDiscordAllowList([entry], [
|
|
181
179
|
"discord:",
|
|
@@ -586,8 +584,7 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
586
584
|
replyPlan
|
|
587
585
|
};
|
|
588
586
|
}
|
|
589
|
-
|
|
590
|
-
//#region extensions/discord/src/monitor/message-handler.process-progress.ts
|
|
587
|
+
// extensions/discord/src/monitor/message-handler.process-progress.ts
|
|
591
588
|
async function createDiscordMessageProgressRuntime(params) {
|
|
592
589
|
const { ctx, draftPreview } = params;
|
|
593
590
|
const { cfg, route, abortSignal } = ctx;
|
|
@@ -683,8 +680,7 @@ async function createDiscordMessageProgressRuntime(params) {
|
|
|
683
680
|
}
|
|
684
681
|
} };
|
|
685
682
|
}
|
|
686
|
-
|
|
687
|
-
//#region extensions/discord/src/monitor/ack-reactions.ts
|
|
683
|
+
// extensions/discord/src/monitor/ack-reactions.ts
|
|
688
684
|
function createDiscordAckReactionContext(params) {
|
|
689
685
|
return {
|
|
690
686
|
rest: params.rest,
|
|
@@ -716,8 +712,7 @@ function queueInitialDiscordAckReaction(params) {
|
|
|
716
712
|
});
|
|
717
713
|
});
|
|
718
714
|
}
|
|
719
|
-
|
|
720
|
-
//#region extensions/discord/src/monitor/message-handler.process-reactions.ts
|
|
715
|
+
// extensions/discord/src/monitor/message-handler.process-reactions.ts
|
|
721
716
|
function createDiscordMessageReactionRuntime(params) {
|
|
722
717
|
const { ctx } = params;
|
|
723
718
|
const { cfg, accountId, token, ackReactionScope, message, messageChannelId, isGuildMessage, isDirectMessage, isGroupDm, canDetectMention, effectiveWasMentioned, shouldBypassMention, route } = ctx;
|
|
@@ -845,8 +840,7 @@ function createDiscordMessageReactionRuntime(params) {
|
|
|
845
840
|
finish
|
|
846
841
|
};
|
|
847
842
|
}
|
|
848
|
-
|
|
849
|
-
//#region extensions/discord/src/draft-stream.ts
|
|
843
|
+
// extensions/discord/src/draft-stream.ts
|
|
850
844
|
/** Discord messages cap at 2000 characters. */
|
|
851
845
|
const DISCORD_STREAM_MAX_CHARS = 2e3;
|
|
852
846
|
const DEFAULT_THROTTLE_MS = 1200;
|
|
@@ -983,13 +977,11 @@ function createDiscordDraftStream(params) {
|
|
|
983
977
|
forceNewMessage: lifecycle.reset
|
|
984
978
|
};
|
|
985
979
|
}
|
|
986
|
-
|
|
987
|
-
//#region extensions/discord/src/preview-streaming.ts
|
|
980
|
+
// extensions/discord/src/preview-streaming.ts
|
|
988
981
|
function resolveDiscordPreviewStreamMode(params = {}) {
|
|
989
982
|
return resolveChannelPreviewStreamMode(params, "progress");
|
|
990
983
|
}
|
|
991
|
-
|
|
992
|
-
//#region extensions/discord/src/monitor/message-handler.progress-continuation.ts
|
|
984
|
+
// extensions/discord/src/monitor/message-handler.progress-continuation.ts
|
|
993
985
|
/** The registry owns task settlement; Discord keeps the confirmed transport and its cleanup. */
|
|
994
986
|
function retainDiscordProgressDraft(params) {
|
|
995
987
|
let retired = false;
|
|
@@ -1048,8 +1040,7 @@ function retainDiscordProgressDraft(params) {
|
|
|
1048
1040
|
}
|
|
1049
1041
|
};
|
|
1050
1042
|
}
|
|
1051
|
-
|
|
1052
|
-
//#region extensions/discord/src/monitor/message-handler.draft-preview.ts
|
|
1043
|
+
// extensions/discord/src/monitor/message-handler.draft-preview.ts
|
|
1053
1044
|
function createDiscordDraftPreviewController(params) {
|
|
1054
1045
|
const runInChannelScope = AsyncLocalStorage.snapshot();
|
|
1055
1046
|
const assertChannelAuthority = captureDiscordRequestAuthority();
|
|
@@ -1321,8 +1312,7 @@ function isEmptyDiscordProgressLine(line) {
|
|
|
1321
1312
|
function shouldStartDiscordProgressDraftNow(line) {
|
|
1322
1313
|
return typeof line === "object" && line?.kind === "patch" && Boolean(line.detail);
|
|
1323
1314
|
}
|
|
1324
|
-
|
|
1325
|
-
//#region extensions/discord/src/monitor/reply-typing-feedback.ts
|
|
1315
|
+
// extensions/discord/src/monitor/reply-typing-feedback.ts
|
|
1326
1316
|
const DISCORD_REPLY_TYPING_MAX_DURATION_MS = 12e5;
|
|
1327
1317
|
function createDiscordReplyTypingFeedback(params) {
|
|
1328
1318
|
const rest = params.rest ?? createDiscordRestClient(params).rest;
|
|
@@ -1343,8 +1333,7 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
1343
1333
|
maxDurationMs: params.maxDurationMs ?? DISCORD_REPLY_TYPING_MAX_DURATION_MS
|
|
1344
1334
|
});
|
|
1345
1335
|
}
|
|
1346
|
-
|
|
1347
|
-
//#region extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
|
|
1336
|
+
// extensions/discord/src/monitor/message-handler.process-reply-runtime.ts
|
|
1348
1337
|
function formatDiscordGroupThreadReply(text, participant) {
|
|
1349
1338
|
return `**${participant.name.replace(/[\\`*_{}[\]()<>#!|]/g, "\\$&").replace(/\s+/g, " ")}**\n${text}`;
|
|
1350
1339
|
}
|
|
@@ -1474,8 +1463,7 @@ function createDiscordMessageReplyRuntime(params) {
|
|
|
1474
1463
|
resolvedBlockStreamingEnabled: resolveChannelStreamingBlockEnabled(discordConfig)
|
|
1475
1464
|
};
|
|
1476
1465
|
}
|
|
1477
|
-
|
|
1478
|
-
//#region extensions/discord/src/monitor/message-handler.process-thread-route.ts
|
|
1466
|
+
// extensions/discord/src/monitor/message-handler.process-thread-route.ts
|
|
1479
1467
|
function createDiscordMessageActiveThreadRoute(params) {
|
|
1480
1468
|
let adoptedThreadId;
|
|
1481
1469
|
let threadReplyDelivered = false;
|
|
@@ -1510,8 +1498,7 @@ function createDiscordMessageActiveThreadRoute(params) {
|
|
|
1510
1498
|
})
|
|
1511
1499
|
};
|
|
1512
1500
|
}
|
|
1513
|
-
|
|
1514
|
-
//#region extensions/discord/src/monitor/message-handler.process.ts
|
|
1501
|
+
// extensions/discord/src/monitor/message-handler.process.ts
|
|
1515
1502
|
const TARGETED_ONLY_ALLOWED_MENTIONS = { parse: [AllowedMentionsTypes.User, AllowedMentionsTypes.Role] };
|
|
1516
1503
|
function isFallbackOnlyToolWarningFinal(payload) {
|
|
1517
1504
|
if (payload.isError !== true || !isReplyPayloadNonTerminalToolErrorWarning(payload)) return false;
|
|
@@ -1878,5 +1865,4 @@ async function processDiscordMessage(ctx, observer) {
|
|
|
1878
1865
|
logVerbose(`discord: delivered ${finalCount} reply${finalCount === 1 ? "" : "ies"} to ${replyPlan.replyTarget}`);
|
|
1879
1866
|
}
|
|
1880
1867
|
}
|
|
1881
|
-
//#endregion
|
|
1882
1868
|
export { processDiscordMessage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, s as resolveDiscordReplyReference, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-
|
|
3
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
4
|
-
import { C as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, w as notifyDiscordInboundEventOutboundPayloadSuccess, y as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-
|
|
1
|
+
import { t as createDiscordActionGate } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, g as hasDiscordMessageCreateAmbiguity, i as toDiscordOutboundDeliveryResult, n as createDiscordSendReceiptFromResults, p as canFallbackDiscordWebhookSend, s as resolveDiscordReplyReference, t as createDiscordSendReceipt, v as chunkDiscordTextWithMode } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
3
|
+
import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
4
|
+
import { C as discordInboundEventDelivery, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, w as notifyDiscordInboundEventOutboundPayloadSuccess, y as resolveDiscordCurrentConversationIdentity } from "./outbound-session-route-TFBPPkoz.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
|
+
// 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) ?? "";
|
|
@@ -100,8 +100,7 @@ function resolveDiscordInboundConversation(params) {
|
|
|
100
100
|
});
|
|
101
101
|
return conversationId ? { conversationId } : null;
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
//#region extensions/discord/src/media-detection.ts
|
|
103
|
+
// extensions/discord/src/media-detection.ts
|
|
105
104
|
const DISCORD_VIDEO_MEDIA_EXTENSIONS = [
|
|
106
105
|
".avi",
|
|
107
106
|
".m4v",
|
|
@@ -126,8 +125,7 @@ function isLikelyDiscordVideoMedia(mediaUrl) {
|
|
|
126
125
|
const normalized = normalizeLowercaseStringOrEmpty(path);
|
|
127
126
|
return DISCORD_VIDEO_MEDIA_EXTENSIONS.some((ext) => normalized.endsWith(ext));
|
|
128
127
|
}
|
|
129
|
-
|
|
130
|
-
//#region extensions/discord/src/outbound-approval.ts
|
|
128
|
+
// extensions/discord/src/outbound-approval.ts
|
|
131
129
|
function normalizeDiscordApprovalPayload(payload) {
|
|
132
130
|
if (!asOptionalRecord(payload.channelData)?.execApproval || !payload.text) return payload;
|
|
133
131
|
return {
|
|
@@ -135,9 +133,8 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
135
133
|
text: payload.text.replace(/@everyone/gi, "@everyone").replace(/@here/gi, "@here").replace(/<@/g, "<@").replace(/<#/g, "<#")
|
|
136
134
|
};
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-yR1hfybW.mjs").then((n) => n.t));
|
|
136
|
+
// extensions/discord/src/outbound-send-context.ts
|
|
137
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-Cbq-IVsS.mjs").then((n) => n.t));
|
|
141
138
|
function resolveDiscordFormattingOptions(ctx) {
|
|
142
139
|
const formatting = ctx.formatting;
|
|
143
140
|
return {
|
|
@@ -165,8 +162,7 @@ async function createDiscordPayloadSendContext(ctx) {
|
|
|
165
162
|
sendVoice: resolveOutboundSendDep(ctx.deps, "discordVoice") ?? runtime.sendVoiceMessageDiscord
|
|
166
163
|
};
|
|
167
164
|
}
|
|
168
|
-
|
|
169
|
-
//#region extensions/discord/src/outbound-payload.ts
|
|
165
|
+
// extensions/discord/src/outbound-payload.ts
|
|
170
166
|
const log$1 = createSubsystemLogger("discord/outbound");
|
|
171
167
|
function createDiscordUnknownPayloadResult(target) {
|
|
172
168
|
return {
|
|
@@ -328,13 +324,12 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
328
324
|
}
|
|
329
325
|
}));
|
|
330
326
|
}
|
|
331
|
-
|
|
332
|
-
//#region extensions/discord/src/outbound-adapter.ts
|
|
327
|
+
// extensions/discord/src/outbound-adapter.ts
|
|
333
328
|
const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
|
|
334
329
|
const DISCORD_PRECHUNK_MAX_LINES = Number.MAX_SAFE_INTEGER;
|
|
335
330
|
const log = createSubsystemLogger("discord/outbound");
|
|
336
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
337
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components
|
|
331
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-Dg7X_ZXP.mjs").then((n) => n.i));
|
|
332
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-BV6ucNpJ.mjs").then((n) => n.i));
|
|
338
333
|
function resolveDiscordDeliveryOptions(params) {
|
|
339
334
|
return {
|
|
340
335
|
onPlatformSendDispatch: params.onPlatformSendDispatch,
|
|
@@ -539,5 +534,4 @@ const discordOutbound = {
|
|
|
539
534
|
await manager.touchThread({ threadId });
|
|
540
535
|
}
|
|
541
536
|
};
|
|
542
|
-
//#endregion
|
|
543
537
|
export { normalizeDiscordAcpConversationId as a, resolveDiscordInboundConversation as c, matchDiscordAcpConversation as i, discordOutbound as n, resolveDiscordAttachedOutboundTarget as o, buildDiscordCrossContextPresentation as r, resolveDiscordCommandConversation as s, DISCORD_TEXT_CHUNK_LIMIT as t };
|
package/dist/.setup/{outbound-session-route-CsHHPxsQ.mjs → outbound-session-route-TFBPPkoz.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { t as inspectDiscordAccount } from "./account-inspect-
|
|
3
|
-
import { A as isDiscordThreadChannelType } from "./allow-list-
|
|
4
|
-
import { d as normalizeDiscordMessagingTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-
|
|
5
|
-
import { t as parseDiscordTarget } from "./target-parsing-
|
|
6
|
-
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-
|
|
7
|
-
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-
|
|
1
|
+
import { i as listDiscordAccountIds, l as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-C18HNgge.mjs";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-X_Xlr42B.mjs";
|
|
3
|
+
import { A as isDiscordThreadChannelType } from "./allow-list-D1ZGfhXh.mjs";
|
|
4
|
+
import { d as normalizeDiscordMessagingTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-Dw-_r5Bx.mjs";
|
|
5
|
+
import { t as parseDiscordTarget } from "./target-parsing-BiuhcK9Q.mjs";
|
|
6
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-BvOWSPxr.mjs";
|
|
7
|
+
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-BzlhNBxA.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";
|
|
@@ -20,7 +20,7 @@ import { getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromCon
|
|
|
20
20
|
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
21
21
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
22
22
|
import { createInboundEventDeliveryCorrelation } from "openclaw/plugin-sdk/inbound-event-delivery";
|
|
23
|
-
|
|
23
|
+
// extensions/discord/src/exec-approvals.ts
|
|
24
24
|
function normalizeDiscordApproverId(value) {
|
|
25
25
|
const trimmed = String(value).trim();
|
|
26
26
|
if (!trimmed) return;
|
|
@@ -65,8 +65,7 @@ function shouldSuppressLocalDiscordExecApprovalPrompt(params) {
|
|
|
65
65
|
sessionFilter: config?.sessionFilter
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
//#region extensions/discord/src/audit-core.ts
|
|
68
|
+
// extensions/discord/src/audit-core.ts
|
|
70
69
|
const REQUIRED_TEXT_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
71
70
|
const REQUIRED_THREAD_CHANNEL_PERMISSIONS = ["ViewChannel", "SendMessagesInThreads"];
|
|
72
71
|
const REQUIRED_VOICE_CHANNEL_PERMISSIONS = [
|
|
@@ -141,8 +140,7 @@ async function auditDiscordChannelPermissionsWithFetcher(params) {
|
|
|
141
140
|
elapsedMs: Date.now() - started
|
|
142
141
|
};
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
//#region extensions/discord/src/inbound-event-delivery.ts
|
|
143
|
+
// extensions/discord/src/inbound-event-delivery.ts
|
|
146
144
|
const DISCORD_INBOUND_EVENT_DELIVERY_KEY = "__openclawInboundEventDelivery";
|
|
147
145
|
function normalizeDiscordDeliveryTarget(value) {
|
|
148
146
|
return value.trim().replace(/^discord:/iu, "").replace(/^channel:/iu, "").toLowerCase();
|
|
@@ -179,8 +177,7 @@ function notifyDiscordInboundEventOutboundPayloadSuccess(params) {
|
|
|
179
177
|
accountId: params.accountId
|
|
180
178
|
});
|
|
181
179
|
}
|
|
182
|
-
|
|
183
|
-
//#region extensions/discord/src/trusted-requester-actions.ts
|
|
180
|
+
// extensions/discord/src/trusted-requester-actions.ts
|
|
184
181
|
const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
|
|
185
182
|
"emoji-upload",
|
|
186
183
|
"sticker-upload",
|
|
@@ -201,8 +198,7 @@ const trustedRequesterGuildAdminActions = /* @__PURE__ */ new Set([
|
|
|
201
198
|
function isTrustedRequesterGuildAdminAction(action) {
|
|
202
199
|
return trustedRequesterGuildAdminActions.has(action);
|
|
203
200
|
}
|
|
204
|
-
|
|
205
|
-
//#region extensions/discord/src/channel-actions.ts
|
|
201
|
+
// extensions/discord/src/channel-actions.ts
|
|
206
202
|
const localExecutionActions = /* @__PURE__ */ new Set([
|
|
207
203
|
"send",
|
|
208
204
|
"poll",
|
|
@@ -223,7 +219,7 @@ function resolveDiscordThreadReplyTarget(args) {
|
|
|
223
219
|
const target = threadId !== void 0 ? `channel:${threadId}` : normalizeOptionalString(args.channelId) ?? normalizeOptionalString(args.to) ?? normalizeOptionalString(args.target);
|
|
224
220
|
return target ? normalizeDiscordMessagingTarget(target) : void 0;
|
|
225
221
|
}
|
|
226
|
-
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-
|
|
222
|
+
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-DXY91jF-.mjs"));
|
|
227
223
|
const discordActionGroups = [
|
|
228
224
|
{
|
|
229
225
|
gate: "polls",
|
|
@@ -458,8 +454,7 @@ const discordMessageActions = {
|
|
|
458
454
|
...sessionKey ? { sessionKey } : {}
|
|
459
455
|
})
|
|
460
456
|
};
|
|
461
|
-
|
|
462
|
-
//#region extensions/discord/src/conversation-identity.ts
|
|
457
|
+
// extensions/discord/src/conversation-identity.ts
|
|
463
458
|
function normalizeDiscordTarget(raw, defaultKind) {
|
|
464
459
|
return parseDiscordTarget(normalizeOptionalString(raw) ?? "", { defaultKind })?.normalized;
|
|
465
460
|
}
|
|
@@ -488,8 +483,7 @@ function resolveDiscordCurrentConversationIdentity(params) {
|
|
|
488
483
|
if (target) return target;
|
|
489
484
|
}
|
|
490
485
|
}
|
|
491
|
-
|
|
492
|
-
//#region extensions/discord/src/monitor/route-resolution.ts
|
|
486
|
+
// extensions/discord/src/monitor/route-resolution.ts
|
|
493
487
|
function buildDiscordRoutePeer(params) {
|
|
494
488
|
return {
|
|
495
489
|
kind: params.isGroupDm ? "group" : params.isDirectMessage ? "direct" : "channel",
|
|
@@ -569,8 +563,7 @@ function shouldIgnoreStaleDiscordRouteBinding(params) {
|
|
|
569
563
|
if (!bound || !routed || bound.rest !== routed.rest) return false;
|
|
570
564
|
return bound.agentId !== params.route.agentId;
|
|
571
565
|
}
|
|
572
|
-
|
|
573
|
-
//#region extensions/discord/src/channel-policy-state.ts
|
|
566
|
+
// extensions/discord/src/channel-policy-state.ts
|
|
574
567
|
const channelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.discord.channel-policy-bindings"), "close-and-restart");
|
|
575
568
|
function setDiscordChannelPolicyBindings(accountId, bindings) {
|
|
576
569
|
channelPolicyBindings.set(normalizeAccountId(accountId), [...bindings]);
|
|
@@ -584,8 +577,7 @@ function getDiscordChannelPolicyBinding(accountId, guildKey, channelKey) {
|
|
|
584
577
|
function findDiscordChannelPolicyKey(accountId, guildKey, channelId) {
|
|
585
578
|
return listBindings(accountId, guildKey).find((binding) => binding.channelId === channelId)?.channelKey;
|
|
586
579
|
}
|
|
587
|
-
|
|
588
|
-
//#region extensions/discord/src/approval-message-safety.ts
|
|
580
|
+
// extensions/discord/src/approval-message-safety.ts
|
|
589
581
|
const DISCORD_APPROVAL_ALLOWED_MENTIONS = { parse: [] };
|
|
590
582
|
const DISCORD_MARKDOWN_META_CHARACTERS = /* @__PURE__ */ new Set([
|
|
591
583
|
"\\",
|
|
@@ -628,8 +620,7 @@ function formatDiscordApprovalDisplayValue(value, maxChars = 200) {
|
|
|
628
620
|
}
|
|
629
621
|
return escaped;
|
|
630
622
|
}
|
|
631
|
-
|
|
632
|
-
//#region extensions/discord/src/outbound-components.ts
|
|
623
|
+
// extensions/discord/src/outbound-components.ts
|
|
633
624
|
const DISCORD_MESSAGE_COMPONENT_LIMIT = 40;
|
|
634
625
|
const DISCORD_TEXT_DISPLAY_LIMIT = 2e3;
|
|
635
626
|
const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
@@ -659,8 +650,8 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
|
659
650
|
}
|
|
660
651
|
}
|
|
661
652
|
};
|
|
662
|
-
const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components
|
|
663
|
-
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-
|
|
653
|
+
const sendDiscordComponentMessageLazy = createLazyRuntimeMethod(createLazyRuntimeModule(() => import("./send.components-BV6ucNpJ.mjs").then((n) => n.i)), (runtime) => runtime.sendDiscordComponentMessage);
|
|
654
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-BvOWSPxr.mjs").then((n) => n.a));
|
|
664
655
|
function addPayloadTextFallback(spec, payload) {
|
|
665
656
|
return spec.text ? spec : {
|
|
666
657
|
...spec,
|
|
@@ -715,8 +706,7 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
715
706
|
const interactiveSpec = (await loadDiscordSharedInteractive()).buildDiscordInteractiveComponents(payload.interactive);
|
|
716
707
|
return interactiveSpec ? addPayloadTextFallback(interactiveSpec, payload) : void 0;
|
|
717
708
|
}
|
|
718
|
-
|
|
719
|
-
//#region extensions/discord/src/outbound-session-route.ts
|
|
709
|
+
// extensions/discord/src/outbound-session-route.ts
|
|
720
710
|
function resolveDiscordOutboundSessionRoute(params) {
|
|
721
711
|
const parsed = parseDiscordTarget(params.target, { defaultKind: resolveDiscordOutboundTargetKindHint(params) });
|
|
722
712
|
if (!parsed) return null;
|
|
@@ -756,5 +746,4 @@ function resolveDiscordOutboundTargetKindHint(params) {
|
|
|
756
746
|
if (resolvedKind === "group" || resolvedKind === "channel") return "channel";
|
|
757
747
|
return /^(user:|discord:|@|<@!?)/i.test(params.target.trim()) ? "user" : "channel";
|
|
758
748
|
}
|
|
759
|
-
//#endregion
|
|
760
749
|
export { isDiscordExecApprovalClientEnabled as A, discordInboundEventDelivery as C, resolveRequiredDiscordChannelPermissions as D, collectDiscordAuditChannelIdsForAccount as E, getDiscordExecApprovalApprovers as O, isTrustedRequesterGuildAdminAction as S, auditDiscordChannelPermissionsWithFetcher as T, shouldIgnoreStaleDiscordRouteBinding as _, resolveDiscordComponentSpec as a, resolveDiscordRuntimeBindingConversationId as b, formatDiscordApprovalDisplayValue as c, setDiscordChannelPolicyBindings as d, buildDiscordConversationRouteContext as f, resolveDiscordEffectiveRoute as g, resolveDiscordConversationRoute as h, isDiscordComponentSpecWithinMessageLimit as i, shouldSuppressLocalDiscordExecApprovalPrompt as j, isDiscordExecApprovalApprover as k, findDiscordChannelPolicyKey as l, resolveDiscordBoundConversationRoute 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, getDiscordChannelPolicyBinding as u, resolveDiscordConversationIdentity as v, notifyDiscordInboundEventOutboundPayloadSuccess as w, discordMessageActions as x, resolveDiscordCurrentConversationIdentity as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// 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,5 +7,4 @@ function resolveDiscordOutputAudioDelta(previous, sourceAudioBytes) {
|
|
|
7
7
|
sinkAudioBytes
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { resolveDiscordOutputAudioDelta as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.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
|
+
// 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,5 +41,4 @@ async function fetchPluralKitMessageInfo(params) {
|
|
|
41
41
|
timeout.cleanup();
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
//#endregion
|
|
45
44
|
export { pluralkit_exports as n, fetchPluralKitMessageInfo as t };
|