@openclaw/discord 2026.9.1 → 2026.9.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/action-runtime-api.js +1 -1
- package/dist/{activities-api-E-segZn6.js → activities-api-CTcGq3Hf.js} +4 -4
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-C2JuH-R0.js → allow-list-DBTtR2dz.js} +3 -29
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-CW5k3mSa.js → approval-handler.runtime-DUSe5fyH.js} +5 -5
- package/dist/{audit-B9rydv5a.js → audit-DpPfwoJM.js} +4 -4
- package/dist/{channel-D93LnbTE.js → channel-BHajPgwR.js} +16 -16
- package/dist/{channel-actions.runtime-DMFv4doE.js → channel-actions.runtime-DS8pXo0S.js} +29 -32
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-DTL7kPOM.js → channel.setup-BWmMe1tT.js} +3 -3
- package/dist/command-owners-D78sAoOz.js +10 -0
- package/dist/{components-DmXYIQ26.js → components-BimX47Mq.js} +1 -1
- package/dist/{conversation-binding-route-24afmvEC.js → conversation-binding-route-DuR5NGIx.js} +1 -1
- package/dist/{directory-config-BD4YL7wT.js → directory-config-CD2v2Szs.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BrFVc1Ds.js → directory-live-DaJzWJ2N.js} +2 -2
- package/dist/{doctor-BUB41_lr.js → doctor-D4HH1inA.js} +6 -3
- package/dist/doctor-contract-api.js +28 -26
- package/dist/{handle-action.guild-admin-B0egstYq.js → handle-action.guild-admin-4We6wWQU.js} +6 -3
- package/dist/index.js +1 -1
- package/dist/{ingress-identity-BCzfPPYM.js → ingress-identity-XNmW-mZS.js} +1 -1
- package/dist/{message-handler-Qdw9c0j4.js → message-handler-DhgBabyU.js} +52 -65
- package/dist/{message-handler.preflight-Dxi2yBfR.js → message-handler.preflight-oZ7dQCd0.js} +12 -12
- package/dist/{message-handler.process-BYDjtxZJ.js → message-handler.process-BzCYf1pa.js} +14 -14
- package/dist/{message-text-BRVqYm-t.js → message-text-DK4NnBg-.js} +1 -1
- package/dist/{outbound-adapter-DEhthWTk.js → outbound-adapter-CtggmGh9.js} +6 -6
- package/dist/{outbound-components-DehyxvA4.js → outbound-components-Dn8SJWMS.js} +3 -3
- package/dist/{outbound-session-route-BFGRF9fE.js → outbound-session-route-Q_HEusBQ.js} +5 -6
- package/dist/{owner-access-yc1sX7Gx.js → owner-access-Cp8r6Ipf.js} +3 -2
- package/dist/{pluralkit-XmmAHoV6.js → pluralkit-BY75YcK0.js} +1 -1
- package/dist/{provider-session.runtime-BA2BPyZ4.js → provider-session.runtime-BL2lHBH7.js} +3 -3
- package/dist/{provider-DuDtKbF8.js → provider-uKmmrDM4.js} +28 -28
- package/dist/provider.runtime-C-IkWF2w.js +2 -0
- package/dist/{realtime-session.runtime-DgSbX6ay.js → realtime-session.runtime-CGYm1t_0.js} +705 -295
- package/dist/{resolve-allowlist-common-BJ5UZNNT.js → resolve-allowlist-common-sKIKy-cF.js} +1 -1
- package/dist/{resolve-channels-CYseD5Uw.js → resolve-channels-CoiMlWy0.js} +3 -3
- package/dist/{resolve-users-DrmhDrqm.js → resolve-users-DJpiokfW.js} +2 -2
- package/dist/{retry-BNCxiyyR.js → retry-DQt1zDgH.js} +238 -184
- package/dist/{runtime-DB7Fb6AU.js → runtime-BHsdEdr5.js} +1 -1
- package/dist/{runtime-BbWNtfyq.js → runtime-Ghtfh5ZA.js} +32 -24
- package/dist/runtime-api.js +18 -18
- package/dist/{send-BnTEIeLE.js → send-CZeWKUiA.js} +3 -3
- package/dist/{send.components-BWVEcjRP.js → send.components-BG5IDABj.js} +4 -4
- package/dist/{send.outbound-b5xwHTlL.js → send.outbound-DHuFUL6W.js} +10 -44
- package/dist/{send.shared-5vxBTagO.js → send.shared-B0n_fWzu.js} +62 -141
- package/dist/{sender-identity-Dt0imZyY.js → sender-identity-B8Ncfi63.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-BSJWHEMA.js → shared-C3dKun_X.js} +6 -3
- package/dist/{subagent-hooks-IzQKX4RQ.js → subagent-hooks-ZoQXEI1E.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-BOiDS8b3.js → system-events-DFF_awl7.js} +2 -2
- package/dist/{target-resolver-BVI8xSSC.js → target-resolver-DLtHDwMK.js} +2 -2
- package/dist/targets-BObRyaKX.js +3 -0
- package/dist/{thread-bindings-D7mcaXQC.js → thread-bindings-DKvsNjQR.js} +5 -5
- package/dist/{thread-bindings.manager-B1oySiVc.js → thread-bindings.manager-pbbRT5gb.js} +5 -5
- package/dist/{thread-bindings.session-updates-CC7HoQvt.js → thread-bindings.session-updates-t6jeFB1-.js} +1 -1
- package/dist/{thread-bindings.state-D8OMdk4O.js → thread-bindings.state-DtgOqsbX.js} +34 -1
- package/dist/{threading-OQnL-0Zx.js → threading-BCx49X-6.js} +3 -3
- package/dist/{transcripts-source-D8lH7AkN.js → transcripts-source-Dc6Nnli5.js} +48 -5
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-C9q0AQMb.js → typing-CuopV-Hi.js} +1 -1
- package/dist/{voice-runtime-Dfhjh1tV.js → voice-runtime-BQnILUbG.js} +82 -35
- package/node_modules/@discordjs/voice/node_modules/@types/node/README.md +1 -1
- package/node_modules/@discordjs/voice/node_modules/@types/node/buffer.buffer.d.ts +5 -5
- package/node_modules/@discordjs/voice/node_modules/@types/node/crypto.d.ts +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/http.d.ts +16 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/http2.d.ts +10 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/package.json +2 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/process.d.ts +52 -0
- package/node_modules/@discordjs/voice/node_modules/@types/node/quic.d.ts +210 -28
- package/node_modules/@discordjs/voice/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@discordjs/voice/node_modules/@types/node/test.d.ts +36 -0
- package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
- package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/undici/lib/handler/retry-handler.js +148 -30
- package/node_modules/undici/lib/interceptor/cache.js +65 -12
- package/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +10 -0
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici/types/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
- package/openclaw.plugin.json +1 -2
- package/package.json +6 -6
- package/dist/provider.runtime-Db8YwZBv.js +0 -2
- package/dist/targets-DbxVbq8k.js +0 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
2
|
-
import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-
|
|
3
|
-
import { v as mapGatewayDispatchData } from "./provider-
|
|
4
|
-
import { f as resolveDiscordReferencedReplyMessageId, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordCdnPolicy } from "./message-text-
|
|
2
|
+
import { c as resolveDiscordChannelInfoSafe, d as resolveDiscordChannelParentSafe, l as resolveDiscordChannelNameSafe, s as resolveDiscordChannelIdSafe } from "./thread-bindings.manager-pbbRT5gb.js";
|
|
3
|
+
import { v as mapGatewayDispatchData } from "./provider-uKmmrDM4.js";
|
|
4
|
+
import { f as resolveDiscordReferencedReplyMessageId, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, l as hasDiscordMessageStickers, p as resolveDiscordCdnPolicy } from "./message-text-DK4NnBg-.js";
|
|
5
5
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
6
6
|
import { GatewayDispatchEvents } from "discord-api-types/v10";
|
|
7
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { normalizeNullableString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
+
import { createRuntimeConfigReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
9
10
|
import { danger } from "openclaw/plugin-sdk/runtime-env";
|
|
10
11
|
import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference";
|
|
11
12
|
import { DEFAULT_INGRESS_RETRY_MAX_ATTEMPTS, createChannelIngressError, createChannelIngressMonitor, createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -13,7 +14,7 @@ import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
|
|
|
13
14
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
14
15
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
15
16
|
import { fanInChannelIngressLifecycles } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
16
|
-
import { createChannelInboundDebouncer, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
17
|
+
import { createChannelInboundDebouncer, resolveInboundDebounceMs, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
17
18
|
//#region extensions/discord/src/monitor/ingress.ts
|
|
18
19
|
const DISCORD_INGRESS_PAYLOAD_VERSION = 1;
|
|
19
20
|
const DISCORD_INGRESS_DRAIN_INTERVAL_MS = 1e3;
|
|
@@ -249,7 +250,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
|
|
|
249
250
|
}
|
|
250
251
|
//#endregion
|
|
251
252
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
252
|
-
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-
|
|
253
|
+
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-BzCYf1pa.js"));
|
|
253
254
|
async function processDiscordQueuedMessage(params) {
|
|
254
255
|
const abortSignal = params.job.runtime.abortSignal && params.lifecycleSignal ? AbortSignal.any([params.job.runtime.abortSignal, params.lifecycleSignal]) : params.job.runtime.abortSignal ?? params.lifecycleSignal;
|
|
255
256
|
try {
|
|
@@ -336,7 +337,7 @@ function createDiscordMessageRunQueue(params) {
|
|
|
336
337
|
}
|
|
337
338
|
//#endregion
|
|
338
339
|
//#region extensions/discord/src/monitor/message-dispatcher.ts
|
|
339
|
-
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-
|
|
340
|
+
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-oZ7dQCd0.js"));
|
|
340
341
|
function isNonEmptyString(value) {
|
|
341
342
|
return typeof value === "string" && value.length > 0;
|
|
342
343
|
}
|
|
@@ -346,7 +347,7 @@ function createDiscordMessageDispatcher(params) {
|
|
|
346
347
|
groupPolicy: params.discordConfig?.groupPolicy,
|
|
347
348
|
defaultGroupPolicy: params.cfg.channels?.defaults?.groupPolicy
|
|
348
349
|
});
|
|
349
|
-
const
|
|
350
|
+
const readConfig = createRuntimeConfigReader(params.cfg);
|
|
350
351
|
const preflightDiscordMessageImpl = params.testing?.preflightDiscordMessage;
|
|
351
352
|
const messageRunQueue = createDiscordMessageRunQueue({
|
|
352
353
|
runtime: params.runtime,
|
|
@@ -373,6 +374,10 @@ function createDiscordMessageDispatcher(params) {
|
|
|
373
374
|
const { debouncer } = createChannelInboundDebouncer({
|
|
374
375
|
cfg: params.cfg,
|
|
375
376
|
channel: "discord",
|
|
377
|
+
resolveDebounceMs: () => resolveInboundDebounceMs({
|
|
378
|
+
cfg: readConfig(),
|
|
379
|
+
channel: "discord"
|
|
380
|
+
}),
|
|
376
381
|
buildKey: resolveDebounceKey,
|
|
377
382
|
shouldDebounce: (entry) => {
|
|
378
383
|
const message = entry.data.message;
|
|
@@ -398,69 +403,51 @@ function createDiscordMessageDispatcher(params) {
|
|
|
398
403
|
return;
|
|
399
404
|
}
|
|
400
405
|
try {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
406
|
+
const cfg = readConfig();
|
|
407
|
+
let data = last.data;
|
|
408
|
+
if (entries.length > 1) {
|
|
409
|
+
const combinedBaseText = entries.map((entry) => resolveDiscordMessageText(entry.data.message, { includeForwarded: false })).filter(Boolean).join("\n");
|
|
410
|
+
const syntheticMessage = Object.create(Object.getPrototypeOf(last.data.message), {
|
|
411
|
+
...Object.getOwnPropertyDescriptors(last.data.message),
|
|
412
|
+
content: {
|
|
413
|
+
value: combinedBaseText,
|
|
414
|
+
enumerable: true,
|
|
415
|
+
configurable: true
|
|
416
|
+
},
|
|
417
|
+
attachments: {
|
|
418
|
+
value: [],
|
|
419
|
+
enumerable: true,
|
|
420
|
+
configurable: true
|
|
421
|
+
},
|
|
422
|
+
message_snapshots: {
|
|
423
|
+
value: last.data.message.message_snapshots,
|
|
424
|
+
enumerable: true,
|
|
425
|
+
configurable: true
|
|
426
|
+
},
|
|
427
|
+
messageSnapshots: {
|
|
428
|
+
value: last.data.message.messageSnapshots,
|
|
429
|
+
enumerable: true,
|
|
430
|
+
configurable: true
|
|
431
|
+
},
|
|
432
|
+
rawData: {
|
|
433
|
+
value: { ...last.data.message.rawData },
|
|
434
|
+
enumerable: true,
|
|
435
|
+
configurable: true
|
|
436
|
+
}
|
|
411
437
|
});
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
if (!ctx) {
|
|
417
|
-
await ingress.settle();
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
applyImplicitReplyBatchGate(ctx, params.replyToMode, false);
|
|
421
|
-
messageRunQueue.enqueue(buildDiscordInboundJob(ctx, { ingressSettlement: ingress }));
|
|
422
|
-
return;
|
|
438
|
+
data = {
|
|
439
|
+
...last.data,
|
|
440
|
+
message: syntheticMessage
|
|
441
|
+
};
|
|
423
442
|
}
|
|
424
|
-
const combinedBaseText = entries.map((entry) => resolveDiscordMessageText(entry.data.message, { includeForwarded: false })).filter(Boolean).join("\n");
|
|
425
|
-
const syntheticMessage = Object.create(Object.getPrototypeOf(last.data.message), {
|
|
426
|
-
...Object.getOwnPropertyDescriptors(last.data.message),
|
|
427
|
-
content: {
|
|
428
|
-
value: combinedBaseText,
|
|
429
|
-
enumerable: true,
|
|
430
|
-
configurable: true
|
|
431
|
-
},
|
|
432
|
-
attachments: {
|
|
433
|
-
value: [],
|
|
434
|
-
enumerable: true,
|
|
435
|
-
configurable: true
|
|
436
|
-
},
|
|
437
|
-
message_snapshots: {
|
|
438
|
-
value: last.data.message.message_snapshots,
|
|
439
|
-
enumerable: true,
|
|
440
|
-
configurable: true
|
|
441
|
-
},
|
|
442
|
-
messageSnapshots: {
|
|
443
|
-
value: last.data.message.messageSnapshots,
|
|
444
|
-
enumerable: true,
|
|
445
|
-
configurable: true
|
|
446
|
-
},
|
|
447
|
-
rawData: {
|
|
448
|
-
value: { ...last.data.message.rawData },
|
|
449
|
-
enumerable: true,
|
|
450
|
-
configurable: true
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
const syntheticData = {
|
|
454
|
-
...last.data,
|
|
455
|
-
message: syntheticMessage
|
|
456
|
-
};
|
|
457
443
|
const ctx = await (preflightDiscordMessageImpl ?? (await loadMessagePreflightRuntime()).preflightDiscordMessage)({
|
|
458
444
|
...params,
|
|
445
|
+
cfg,
|
|
459
446
|
avatarResolver,
|
|
460
|
-
ackReactionScope,
|
|
447
|
+
ackReactionScope: params.discordConfig?.ackReactionScope ?? cfg.messages?.ackReactionScope ?? "group-mentions",
|
|
461
448
|
groupPolicy,
|
|
462
449
|
abortSignal,
|
|
463
|
-
data
|
|
450
|
+
data,
|
|
464
451
|
client: last.client,
|
|
465
452
|
turnAdoptionLifecycle: admissionLifecycle
|
|
466
453
|
});
|
|
@@ -472,9 +459,9 @@ function createDiscordMessageDispatcher(params) {
|
|
|
472
459
|
await ingress.settle();
|
|
473
460
|
return;
|
|
474
461
|
}
|
|
475
|
-
applyImplicitReplyBatchGate(ctx, params.replyToMode,
|
|
462
|
+
applyImplicitReplyBatchGate(ctx, params.replyToMode, entries.length > 1);
|
|
476
463
|
const ids = entries.map((entry) => entry.data.message?.id).filter(isNonEmptyString);
|
|
477
|
-
if (ids.length > 0) {
|
|
464
|
+
if (entries.length > 1 && ids.length > 0) {
|
|
478
465
|
const ctxBatch = ctx;
|
|
479
466
|
ctxBatch.MessageSids = ids;
|
|
480
467
|
ctxBatch.MessageSidFirst = ids[0];
|
package/dist/{message-handler.preflight-Dxi2yBfR.js → message-handler.preflight-oZ7dQCd0.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as Message, Mt as getChannelMessage, b as discord_exports } from "./retry-
|
|
1
|
+
import { G as Message, Mt as getChannelMessage, b as discord_exports } from "./retry-DQt1zDgH.js";
|
|
2
2
|
import { s as resolveDefaultDiscordAccountId } from "./accounts-CwJQoLjM.js";
|
|
3
|
-
import {
|
|
3
|
+
import { S as resolveTimestampMs, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, x as resolveDiscordSystemLocation } from "./allow-list-DBTtR2dz.js";
|
|
4
4
|
import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
|
|
5
5
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
|
|
6
|
-
import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-
|
|
7
|
-
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-
|
|
8
|
-
import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-
|
|
9
|
-
import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-
|
|
10
|
-
import { d as resolveDiscordReferencedReplyMessage, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, m as resolveDiscordChannelInfo, o as resolveForwardedMediaList, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-
|
|
11
|
-
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
6
|
+
import { a as buildDiscordRoutePeer, c as resolveDiscordEffectiveRoute, f as resolveDiscordRuntimeBindingConversationId, s as resolveDiscordConversationRoute, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
|
|
7
|
+
import { t as resolveDiscordConversationBindingRoute } from "./conversation-binding-route-DuR5NGIx.js";
|
|
8
|
+
import { c as resolveDiscordChannelInfoSafe, l as resolveDiscordChannelNameSafe } from "./thread-bindings.manager-pbbRT5gb.js";
|
|
9
|
+
import { S as resolveDiscordTextCommandAccess, _ as handleDiscordDmCommandDecision, n as resolveDiscordPreflightChannelAccess, x as resolveDiscordDmCommandAccess } from "./provider-uKmmrDM4.js";
|
|
10
|
+
import { d as resolveDiscordReferencedReplyMessage, h as resolveDiscordMessageChannelId, i as resolveDiscordMessageText, m as resolveDiscordChannelInfo, o as resolveForwardedMediaList, r as resolveDiscordMessageHistoryText, s as resolveMediaList, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
|
|
11
|
+
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-B8Ncfi63.js";
|
|
12
12
|
import { t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
13
13
|
import { logDebug } from "openclaw/plugin-sdk/logging-core";
|
|
14
14
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
@@ -29,7 +29,7 @@ import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
|
29
29
|
import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
|
|
30
30
|
//#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
|
|
31
31
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
32
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
32
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CZeWKUiA.js").then((n) => n.t));
|
|
33
33
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
34
34
|
return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
|
|
35
35
|
}
|
|
@@ -424,10 +424,10 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
424
424
|
}
|
|
425
425
|
//#endregion
|
|
426
426
|
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
427
|
-
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-
|
|
427
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-BY75YcK0.js").then((n) => n.n));
|
|
428
428
|
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DrnqFA8U.js"));
|
|
429
|
-
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-
|
|
430
|
-
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-
|
|
429
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-DFF_awl7.js"));
|
|
430
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./threading-BCx49X-6.js").then((n) => n.t));
|
|
431
431
|
//#endregion
|
|
432
432
|
//#region extensions/discord/src/monitor/message-handler.preflight-pluralkit.ts
|
|
433
433
|
async function resolveDiscordPreflightPluralKitInfo(params) {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { At as editChannelMessage, Ot as deleteChannelMessage, Tt as createChannelMessage, b as discord_exports, o as chunkDiscordTextWithMode, y as resolveDiscordChannelId } from "./retry-
|
|
1
|
+
import { At as editChannelMessage, Ot as deleteChannelMessage, Tt as createChannelMessage, b as discord_exports, o as chunkDiscordTextWithMode, y as resolveDiscordChannelId } from "./retry-DQt1zDgH.js";
|
|
2
2
|
import { p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
|
|
3
|
-
import {
|
|
4
|
-
import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-
|
|
5
|
-
import { i as discordTextHasBroadcastMention } from "./send.outbound-
|
|
6
|
-
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-
|
|
3
|
+
import { S as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-DBTtR2dz.js";
|
|
4
|
+
import { F as createDiscordRuntimeAccountContext, P as createDiscordRestClient, d as resolveDiscordTargetChannelId, k as resolveDiscordMessageFlags } from "./send.shared-B0n_fWzu.js";
|
|
5
|
+
import { i as discordTextHasBroadcastMention } from "./send.outbound-DHuFUL6W.js";
|
|
6
|
+
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-CZeWKUiA.js";
|
|
7
7
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-D86uWLt_.js";
|
|
8
|
-
import "./targets-
|
|
9
|
-
import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-
|
|
10
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-
|
|
11
|
-
import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-
|
|
12
|
-
import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-
|
|
13
|
-
import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-
|
|
14
|
-
import { n as resolveDiscordWebhookId } from "./sender-identity-
|
|
8
|
+
import "./targets-BObRyaKX.js";
|
|
9
|
+
import { a as buildDiscordRoutePeer, h as discordInboundEventDelivery, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
|
|
10
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-CtggmGh9.js";
|
|
11
|
+
import { a as formatDiscordReplySkip, c as buildGuildLabel, g as createDiscordSupplementalContextAccessChecker, h as buildDiscordInboundAccessContext, i as formatDiscordReplyDeliveryFailure, l as resolveReplyContext, o as sanitizeDiscordFrontChannelReplyPayloads, r as deliverDiscordReply, s as buildDirectLabel } from "./provider-uKmmrDM4.js";
|
|
12
|
+
import { a as formatDiscordMediaText, c as resolveReferencedReplyMediaList, i as resolveDiscordMessageText, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
|
|
13
|
+
import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-BCx49X-6.js";
|
|
14
|
+
import { n as resolveDiscordWebhookId } from "./sender-identity-B8Ncfi63.js";
|
|
15
15
|
import { t as beginDiscordActiveTurnThreadRoute } from "./active-turn-thread-route-fmHl1HNd.js";
|
|
16
16
|
import { n as filterDiscordHistoryEntriesForContext, t as createDiscordHistorySenderProvenance } from "./message-handler.history-CJOsN9w5.js";
|
|
17
|
-
import { t as sendTyping } from "./typing-
|
|
17
|
+
import { t as sendTyping } from "./typing-CuopV-Hi.js";
|
|
18
18
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
19
19
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
20
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
@@ -986,12 +986,12 @@ function createDiscordDraftPreviewController(params) {
|
|
|
986
986
|
const narrationHideCommandText = narrationProgressEnabled && resolveChannelStreamingPreviewCommandText(params.discordConfig) === "status";
|
|
987
987
|
const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
|
|
988
988
|
const progressDraft = createChannelProgressDraftCompositor({
|
|
989
|
-
presentation: discordStreamMode === "progress" ? "summary" : void 0,
|
|
990
989
|
entry: params.discordConfig,
|
|
991
990
|
mode: discordStreamMode,
|
|
992
991
|
active: Boolean(draftStream),
|
|
993
992
|
seed: progressSeed,
|
|
994
993
|
reasoningLinePrefix: "🧠 ",
|
|
994
|
+
commentaryLinePrefix: "💬 ",
|
|
995
995
|
commentaryItalics: false,
|
|
996
996
|
update: async (previewText, options) => {
|
|
997
997
|
if (!draftStream) return false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-
|
|
1
|
+
import { c as resolveDiscordChannelInfoSafe } from "./thread-bindings.manager-pbbRT5gb.js";
|
|
2
2
|
import { ComponentType, StickerFormatType } from "discord-api-types/v10";
|
|
3
3
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as normalizeDiscordOutboundTarget, c as createDiscordSendReceiptFromResults, i as hasDiscordMessageCreateAmbiguity, o as chunkDiscordTextWithMode, p as resolveDiscordReplyReference, s as createDiscordSendReceipt, t as canFallbackDiscordWebhookSend, u as toDiscordOutboundDeliveryResult } from "./retry-
|
|
1
|
+
import { _ as normalizeDiscordOutboundTarget, c as createDiscordSendReceiptFromResults, i as hasDiscordMessageCreateAmbiguity, o as chunkDiscordTextWithMode, p as resolveDiscordReplyReference, s as createDiscordSendReceipt, t as canFallbackDiscordWebhookSend, u as toDiscordOutboundDeliveryResult } from "./retry-DQt1zDgH.js";
|
|
2
2
|
import { t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
|
|
3
|
-
import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-
|
|
4
|
-
import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-
|
|
3
|
+
import { g as notifyDiscordInboundEventOutboundPayloadSuccess, h as discordInboundEventDelivery, r as formatDiscordApprovalDisplayValue } from "./outbound-session-route-Q_HEusBQ.js";
|
|
4
|
+
import { a as sendDiscordComponentMessageLazy, i as resolveDiscordComponentSpec, n as buildDiscordPresentationPayload, t as DISCORD_PRESENTATION_CAPABILITIES } from "./outbound-components-Dn8SJWMS.js";
|
|
5
5
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -60,7 +60,7 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
63
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
63
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-CZeWKUiA.js").then((n) => n.t));
|
|
64
64
|
function resolveDiscordOutboundTarget(params) {
|
|
65
65
|
if (params.threadId == null) return params.to;
|
|
66
66
|
const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
|
|
@@ -280,8 +280,8 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
280
280
|
//#region extensions/discord/src/outbound-adapter.ts
|
|
281
281
|
const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
|
|
282
282
|
const log = createSubsystemLogger("discord/outbound");
|
|
283
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
284
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-
|
|
283
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-DKvsNjQR.js").then((n) => n.t));
|
|
284
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-BG5IDABj.js").then((n) => n.i));
|
|
285
285
|
function resolveDiscordDeliveryOptions(params) {
|
|
286
286
|
return {
|
|
287
287
|
onPlatformSendDispatch: params.onPlatformSendDispatch,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as readDiscordComponentSpec } from "./components-
|
|
1
|
+
import { h as readDiscordComponentSpec } from "./components-BimX47Mq.js";
|
|
2
2
|
import { resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
|
|
3
3
|
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
4
4
|
//#region extensions/discord/src/outbound-components.ts
|
|
@@ -31,11 +31,11 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-
|
|
34
|
+
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-BG5IDABj.js").then((n) => n.i), "sendDiscordComponentMessage");
|
|
35
35
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
36
36
|
return await (await loadDiscordComponentSend())(...args);
|
|
37
37
|
}
|
|
38
|
-
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-
|
|
38
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-BimX47Mq.js").then((n) => n.a));
|
|
39
39
|
function addPayloadTextFallback(spec, payload) {
|
|
40
40
|
return spec.text ? spec : {
|
|
41
41
|
...spec,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { g as normalizeDiscordMessagingTarget, v as parseDiscordTarget } from "./retry-
|
|
2
|
-
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-
|
|
1
|
+
import { g as normalizeDiscordMessagingTarget, v as parseDiscordTarget } from "./retry-DQt1zDgH.js";
|
|
2
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-BimX47Mq.js";
|
|
3
3
|
import { c as resolveDiscordAccount, r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-CwJQoLjM.js";
|
|
4
|
+
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-D78sAoOz.js";
|
|
4
5
|
import { t as inspectDiscordAccount } from "./account-inspect-BY-ve3yH.js";
|
|
5
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
6
7
|
import { Type } from "typebox";
|
|
@@ -29,10 +30,8 @@ function normalizeDiscordApproverId(value) {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
function resolveDiscordOwnerApprovers(cfg) {
|
|
32
|
-
const ownerAllowFrom = cfg.commands?.ownerAllowFrom;
|
|
33
|
-
if (!Array.isArray(ownerAllowFrom) || ownerAllowFrom.length === 0) return [];
|
|
34
33
|
return resolveApprovalApprovers({
|
|
35
|
-
explicit:
|
|
34
|
+
explicit: resolveDiscordCommandOwnerEntries(cfg),
|
|
36
35
|
normalizeApprover: (value) => normalizeDiscordApproverId(String(value))
|
|
37
36
|
});
|
|
38
37
|
}
|
|
@@ -265,7 +264,7 @@ function matchesCurrentDiscordThread(params) {
|
|
|
265
264
|
if (!requestedTarget) return false;
|
|
266
265
|
return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === requestedTarget);
|
|
267
266
|
}
|
|
268
|
-
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-
|
|
267
|
+
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-DS8pXo0S.js"));
|
|
269
268
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
270
269
|
return listDiscordAccountIds(cfg).map((accountId) => inspectDiscordAccount({
|
|
271
270
|
cfg,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { l as resolveDiscordAccountAllowFrom } from "./accounts-CwJQoLjM.js";
|
|
2
|
-
import { c as resolveDiscordChannelConfigWithFallback, d as
|
|
2
|
+
import { c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, t as allowListMatches } from "./allow-list-DBTtR2dz.js";
|
|
3
|
+
import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-D78sAoOz.js";
|
|
3
4
|
import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native";
|
|
4
5
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
5
6
|
//#region extensions/discord/src/voice/access.ts
|
|
@@ -54,7 +55,7 @@ async function authorizeDiscordVoiceIngress(params) {
|
|
|
54
55
|
sender: params.sender,
|
|
55
56
|
allowNameMatching: false
|
|
56
57
|
});
|
|
57
|
-
const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom
|
|
58
|
+
const admissionAllowList = normalizeDiscordAllowList(params.admissionAllowFrom ?? params.discordConfig.allowFrom, [
|
|
58
59
|
"discord:",
|
|
59
60
|
"user:",
|
|
60
61
|
"pk:"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sn as __exportAll } from "./retry-
|
|
1
|
+
import { sn as __exportAll } from "./retry-DQt1zDgH.js";
|
|
2
2
|
import { readProviderJsonObjectResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
3
3
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
4
|
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
2
|
-
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-
|
|
3
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
1
|
+
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-pbbRT5gb.js";
|
|
2
|
+
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DKvsNjQR.js";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-DhgBabyU.js";
|
|
4
4
|
import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
|
|
5
5
|
import { getAcpSessionManager, isAcpRuntimeError } from "openclaw/plugin-sdk/acp-runtime";
|
|
6
6
|
export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled };
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { A as ThreadDeleteListener, C as InteractionCreateListener, D as PresenceUpdateListener, E as MessageReactionRemoveListener, G as Message, H as Command, K as User, L as RateLimitError, N as Client, O as ReadyListener, P as Plugin, Q as Modal, S as GuildDeleteListener, T as MessageReactionAddListener, U as CommandWithSubcommands, W as Guild, b as discord_exports, dt as Separator, ft as StringSelectMenu, gt as BaseMessageInteractiveComponent, j as ThreadUpdateListener, lt as Row, o as chunkDiscordTextWithMode, pt as TextDisplay, q as hasDiscordV2Components, rt as Container, tt as Button, w as MessageCreateListener, x as GuildCreateListener } from "./retry-
|
|
2
|
-
import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, c as parseExecApprovalData, k as encodeCustomIdComponent, o as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./components-
|
|
1
|
+
import { A as ThreadDeleteListener, C as InteractionCreateListener, D as PresenceUpdateListener, E as MessageReactionRemoveListener, G as Message, H as Command, K as User, L as RateLimitError, N as Client, O as ReadyListener, P as Plugin, Q as Modal, S as GuildDeleteListener, T as MessageReactionAddListener, U as CommandWithSubcommands, W as Guild, b as discord_exports, dt as Separator, ft as StringSelectMenu, gt as BaseMessageInteractiveComponent, j as ThreadUpdateListener, lt as Row, o as chunkDiscordTextWithMode, pt as TextDisplay, q as hasDiscordV2Components, rt as Container, tt as Button, w as MessageCreateListener, x as GuildCreateListener } from "./retry-DQt1zDgH.js";
|
|
2
|
+
import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, c as parseExecApprovalData, k as encodeCustomIdComponent, o as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./components-BimX47Mq.js";
|
|
3
3
|
import { c as resolveDiscordAccount, f as resolveDiscordAccountDmPolicy, l as resolveDiscordAccountAllowFrom, m as normalizeDiscordToken, p as resolveDiscordMaxLinesPerMessage } from "./accounts-CwJQoLjM.js";
|
|
4
|
-
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-
|
|
4
|
+
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-BG5IDABj.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
6
|
import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-BfmEP6wp.js";
|
|
7
|
-
import {
|
|
8
|
-
import { B as validateDiscordProxyUrl, G as unregisterGateway, P as createDiscordRestClient, R as DISCORD_REST_TIMEOUT_MS, V as withValidatedDiscordProxy, W as registerGateway, b as canViewDiscordGuildChannel, w as hasAnyChannelPermissionDiscord } from "./send.shared-
|
|
9
|
-
import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-
|
|
7
|
+
import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, h as resolveDiscordOwnerAllowFrom, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAllowed, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, v as shouldEmitDiscordReactionNotification, y as formatDiscordReactionEmoji } from "./allow-list-DBTtR2dz.js";
|
|
8
|
+
import { B as validateDiscordProxyUrl, G as unregisterGateway, P as createDiscordRestClient, R as DISCORD_REST_TIMEOUT_MS, V as withValidatedDiscordProxy, W as registerGateway, b as canViewDiscordGuildChannel, w as hasAnyChannelPermissionDiscord } from "./send.shared-B0n_fWzu.js";
|
|
9
|
+
import { a as formatMention, t as sendMessageDiscord } from "./send.outbound-DHuFUL6W.js";
|
|
10
10
|
import { t as isDiscordThreadChannelType } from "./channel-type-CVLZyGYS.js";
|
|
11
|
-
import { n as getDiscordActivitiesRuntime } from "./runtime-
|
|
12
|
-
import { n as resolveDiscordVoiceEnabled, r as authorizeDiscordVoiceIngress, t as resolveDiscordVoiceAccess } from "./owner-access-
|
|
11
|
+
import { n as getDiscordActivitiesRuntime } from "./runtime-BHsdEdr5.js";
|
|
12
|
+
import { n as resolveDiscordVoiceEnabled, r as authorizeDiscordVoiceIngress, t as resolveDiscordVoiceAccess } from "./owner-access-Cp8r6Ipf.js";
|
|
13
|
+
import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-D78sAoOz.js";
|
|
13
14
|
import { i as setPresence, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
14
|
-
import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-
|
|
15
|
+
import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-CZeWKUiA.js";
|
|
15
16
|
import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-D86uWLt_.js";
|
|
16
|
-
import { S as isDiscordExecApprovalClientEnabled, b as getDiscordExecApprovalApprovers, c as resolveDiscordEffectiveRoute, i as buildDiscordConversationRouteContext, n as DISCORD_APPROVAL_ALLOWED_MENTIONS, o as resolveDiscordBoundConversationRoute, r as formatDiscordApprovalDisplayValue, u as resolveDiscordConversationIdentity } from "./outbound-session-route-
|
|
17
|
-
import { t as discordIngressIdentity } from "./ingress-identity-
|
|
18
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
19
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
20
|
-
import { a as isThreadArchived, c as resolveDiscordChannelInfoSafe, f as resolveDiscordChannelTopicSafe, h as formatThreadBindingDurationLabel, l as resolveDiscordChannelNameSafe, r as getThreadBindingManager, s as resolveDiscordChannelIdSafe, u as resolveDiscordChannelParentIdSafe } from "./thread-bindings.manager-
|
|
17
|
+
import { S as isDiscordExecApprovalClientEnabled, b as getDiscordExecApprovalApprovers, c as resolveDiscordEffectiveRoute, i as buildDiscordConversationRouteContext, n as DISCORD_APPROVAL_ALLOWED_MENTIONS, o as resolveDiscordBoundConversationRoute, r as formatDiscordApprovalDisplayValue, u as resolveDiscordConversationIdentity } from "./outbound-session-route-Q_HEusBQ.js";
|
|
18
|
+
import { t as discordIngressIdentity } from "./ingress-identity-XNmW-mZS.js";
|
|
19
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CoiMlWy0.js";
|
|
20
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DJpiokfW.js";
|
|
21
|
+
import { a as isThreadArchived, c as resolveDiscordChannelInfoSafe, f as resolveDiscordChannelTopicSafe, h as formatThreadBindingDurationLabel, l as resolveDiscordChannelNameSafe, r as getThreadBindingManager, s as resolveDiscordChannelIdSafe, u as resolveDiscordChannelParentIdSafe } from "./thread-bindings.manager-pbbRT5gb.js";
|
|
21
22
|
import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-3ovFAp3b.js";
|
|
22
23
|
import { i as sanitizeRecentModels, n as normalizeModelRef, r as preferenceTimestampMs, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-BHT1LkR_.js";
|
|
23
|
-
import { m as resolveDiscordChannelInfo, u as resolveDiscordMessageStickers } from "./message-text-
|
|
24
|
-
import { i as resolveDiscordThreadParentInfo } from "./threading-
|
|
25
|
-
import { t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
24
|
+
import { m as resolveDiscordChannelInfo, u as resolveDiscordMessageStickers } from "./message-text-DK4NnBg-.js";
|
|
25
|
+
import { i as resolveDiscordThreadParentInfo } from "./threading-BCx49X-6.js";
|
|
26
|
+
import { t as resolveDiscordSenderIdentity } from "./sender-identity-B8Ncfi63.js";
|
|
26
27
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
27
28
|
import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes, PermissionFlagsBits } from "discord-api-types/v10";
|
|
28
29
|
import { Type } from "typebox";
|
|
@@ -4289,10 +4290,12 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
4289
4290
|
} : {},
|
|
4290
4291
|
readOnly: true
|
|
4291
4292
|
}) : void 0;
|
|
4292
|
-
const
|
|
4293
|
+
const menuRouteState = command.key === "verbose" ? await getNativeRouteState() : void 0;
|
|
4294
|
+
const menu = menuRouteState?.bindingReadiness?.ok === false ? null : resolveCommandArgMenu({
|
|
4293
4295
|
command,
|
|
4294
4296
|
args: commandArgs,
|
|
4295
4297
|
cfg,
|
|
4298
|
+
session: menuRouteState?.effectiveRoute,
|
|
4296
4299
|
provider: menuModelContext?.provider,
|
|
4297
4300
|
model: menuModelContext?.model,
|
|
4298
4301
|
agentRuntime: menuModelContext?.agentRuntime,
|
|
@@ -6500,7 +6503,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
6500
6503
|
gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
|
|
6501
6504
|
if (params.voiceManager) {
|
|
6502
6505
|
await params.voiceManager.destroy();
|
|
6503
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
6506
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Dc6Nnli5.js").then((n) => n.n);
|
|
6504
6507
|
setDiscordTranscriptsVoiceManager({
|
|
6505
6508
|
accountId: params.accountId,
|
|
6506
6509
|
manager: null
|
|
@@ -6515,7 +6518,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
6515
6518
|
let discordVoiceRuntimePromise;
|
|
6516
6519
|
let discordProviderSessionRuntimePromise;
|
|
6517
6520
|
async function loadDiscordVoiceRuntime() {
|
|
6518
|
-
const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-
|
|
6521
|
+
const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-BQnILUbG.js").then((n) => n.t);
|
|
6519
6522
|
discordVoiceRuntimePromise = promise;
|
|
6520
6523
|
try {
|
|
6521
6524
|
return await promise;
|
|
@@ -6525,7 +6528,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
6525
6528
|
}
|
|
6526
6529
|
}
|
|
6527
6530
|
async function loadDiscordProviderSessionRuntime() {
|
|
6528
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
6531
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-BL2lHBH7.js");
|
|
6529
6532
|
discordProviderSessionRuntimePromise = promise;
|
|
6530
6533
|
try {
|
|
6531
6534
|
return await promise;
|
|
@@ -7140,9 +7143,7 @@ async function resolveDiscordProviderCommandSpecs(params) {
|
|
|
7140
7143
|
const listSkillCommands = params.listSkillCommandsForAgents ?? listSkillCommandsForAgents;
|
|
7141
7144
|
const listNativeCommandSpecs = params.listNativeCommandSpecsForConfig ?? listNativeCommandSpecsForConfig;
|
|
7142
7145
|
const maxDiscordCommands = params.maxDiscordCommands ?? 100;
|
|
7143
|
-
|
|
7144
|
-
if (params.nativeEnabled) pluginCommandRuntime = (await loadPluginCommandRuntime()).createPluginCommandRuntime();
|
|
7145
|
-
const pluginCommandSpecs = pluginCommandRuntime?.listNativeCandidates("discord") ?? [];
|
|
7146
|
+
const pluginCommandSpecs = params.nativeEnabled ? (await loadPluginCommandRuntime()).createPluginCommandRuntime().listNativeCandidates("discord") : [];
|
|
7146
7147
|
const onCollision = (normalizedName) => {
|
|
7147
7148
|
params.runtime.error?.(danger(`discord: plugin command "/${normalizedName}" duplicates an existing native command. Skipping.`));
|
|
7148
7149
|
};
|
|
@@ -7170,7 +7171,6 @@ async function resolveDiscordProviderCommandSpecs(params) {
|
|
|
7170
7171
|
params.runtime.log?.(warn(`${initialCommandCount} commands exceed the ${maxDiscordCommands}-command Discord limit; removing per-skill commands and keeping /skill.`));
|
|
7171
7172
|
} else for (const normalizedName of provisionalCollisions) onCollision(normalizedName);
|
|
7172
7173
|
if (params.nativeEnabled && commandSpecs.length > maxDiscordCommands) params.runtime.log?.(warn(`${commandSpecs.length} commands exceed the ${maxDiscordCommands}-command Discord limit; some commands may fail to deploy.`));
|
|
7173
|
-
if (commandSpecs.some((command) => "prepareDispatch" in command)) pluginCommandRuntime?.retainNativeCatalog("discord");
|
|
7174
7174
|
return {
|
|
7175
7175
|
skillCommands,
|
|
7176
7176
|
commandSpecs
|
|
@@ -8342,7 +8342,7 @@ async function deliverDiscordReply(params) {
|
|
|
8342
8342
|
//#endregion
|
|
8343
8343
|
//#region extensions/discord/src/monitor/agent-components.dispatch.ts
|
|
8344
8344
|
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("./agent-components.runtime-CEPrf2SY.js"));
|
|
8345
|
-
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-
|
|
8345
|
+
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-CuopV-Hi.js").then((n) => n.n));
|
|
8346
8346
|
function buildDiscordComponentConversationLabel(params) {
|
|
8347
8347
|
if (params.interactionCtx.isDirectMessage) return buildDirectLabel(params.interactionCtx.user);
|
|
8348
8348
|
if (params.interactionCtx.isGroupDm) return `Group DM #${params.channelCtx.channelName ?? params.interactionCtx.channelId} channel id:${params.interactionCtx.channelId}`;
|
|
@@ -8749,7 +8749,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
8749
8749
|
}
|
|
8750
8750
|
//#endregion
|
|
8751
8751
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
8752
|
-
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-
|
|
8752
|
+
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-BimX47Mq.js").then((n) => n.t));
|
|
8753
8753
|
async function handleDiscordComponentEvent(params) {
|
|
8754
8754
|
const parsed = parseDiscordComponentData(params.data, resolveInteractionCustomId(params.interaction));
|
|
8755
8755
|
if (!parsed) {
|
|
@@ -10292,7 +10292,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10292
10292
|
runtime,
|
|
10293
10293
|
botUserId
|
|
10294
10294
|
});
|
|
10295
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
10295
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Dc6Nnli5.js").then((n) => n.n);
|
|
10296
10296
|
setDiscordTranscriptsVoiceManager({
|
|
10297
10297
|
accountId: account.accountId,
|
|
10298
10298
|
manager: voiceManager
|