@openclaw/discord 2026.9.7 → 2026.9.9
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-De8hOUxG.mjs → account-inspect-Bp8nbBSx.mjs} +2 -2
- package/dist/.setup/{channel-type-DRCrEMss.mjs → allow-list-Kty_8Xca.mjs} +7 -7
- package/dist/.setup/{api-DVbJwZVt.mjs → api-CotnTQLx.mjs} +3 -3
- package/dist/.setup/{approval-handler.runtime-DxCK2Rux.mjs → approval-handler.runtime-DqU_yO2L.mjs} +9 -9
- package/dist/.setup/{approval-message-updates-BKFqavHZ.mjs → approval-message-updates-CdnQ98c8.mjs} +2 -2
- package/dist/.setup/{audit-CLg9I71N.mjs → audit-CqUeNcJH.mjs} +4 -4
- package/dist/.setup/{channel-DxlUVU9t.mjs → channel-Bu1qLdnm.mjs} +28 -23
- package/dist/.setup/{channel.setup-CRo1GjV7.mjs → channel.setup-DRCLt54O.mjs} +4 -4
- package/dist/.setup/{components-Cq1PvIpN.mjs → components-CwpgbGDR.mjs} +3 -3
- package/dist/.setup/{conversation-binding-route-Caz_XuFH.mjs → conversation-binding-route-DC0Y2v1B.mjs} +1 -1
- package/dist/.setup/{directory-config-esqNn0Eo.mjs → directory-config-DLT0PP2j.mjs} +1 -1
- package/dist/.setup/{directory-live-DtKRHuGV.mjs → directory-live-DPVUIJ8-.mjs} +4 -4
- package/dist/.setup/{discord-0xJYfdDD.mjs → discord-DTLP81g6.mjs} +3 -3
- package/dist/.setup/{doctor-BCl1H5tl.mjs → doctor-E3AF74Ms.mjs} +5 -5
- package/dist/.setup/{handle-action-CUvQWnE7.mjs → handle-action-cmTFQysA.mjs} +8 -8
- package/dist/.setup/{handle-action.guild-admin-Df-8gVle.mjs → handle-action.guild-admin-CH8nj2w0.mjs} +2 -2
- package/dist/.setup/{live-policy-config-8Pv20CHc.mjs → live-policy-config-D--q9Zta.mjs} +1 -1
- package/dist/.setup/{message-handler-B-Jk4oDk.mjs → message-handler-BVZO6wCg.mjs} +12 -11
- package/dist/.setup/{message-handler.preflight-v-__NSDq.mjs → message-handler.preflight-Be_b_NFp.mjs} +17 -17
- package/dist/.setup/{message-handler.preflight-pluralkit-CWLUBVcx.mjs → message-handler.preflight-pluralkit-TPGXsd8P.mjs} +7 -7
- package/dist/.setup/{message-handler.process-BNFFuChn.mjs → message-handler.process-BUBGcAoh.mjs} +21 -21
- package/dist/.setup/{outbound-adapter-BobT-kse.mjs → outbound-adapter-CSiCDzCN.mjs} +9 -9
- package/dist/.setup/{outbound-session-route-zVGxxceg.mjs → outbound-session-route-D0ryINch.mjs} +13 -13
- package/dist/.setup/{probe-LYrIHlBF.mjs → probe-DTSDdlpy.mjs} +4 -4
- package/dist/.setup/{provider-B_G5hASF.mjs → provider-BTm60b3t.mjs} +81 -81
- package/dist/.setup/{provider-session.runtime-BYlTBFD2.mjs → provider-session.runtime-DKJ-qSt9.mjs} +3 -3
- package/dist/.setup/provider.runtime-BvoZBuZY.mjs +2 -0
- package/dist/.setup/{realtime-session.runtime-oUd9DOcz.mjs → realtime-session.runtime-JZd7A5bS.mjs} +19 -19
- package/dist/.setup/{resolve-allowlist-common-DPdRggu5.mjs → resolve-allowlist-common-Ck4M_Ot2.mjs} +3 -3
- package/dist/.setup/{resolve-channels-BFPNRmVv.mjs → resolve-channels-CEaKGzuh.mjs} +3 -3
- package/dist/.setup/{resolve-users-0-aBuCy3.mjs → resolve-users-CMz4PVnV.mjs} +2 -2
- package/dist/.setup/{runtime-FN000lxA.mjs → runtime-DwW5C0WK.mjs} +12 -12
- package/dist/.setup/{runtime-sUksZ--Q.mjs → runtime-Lsy4dEx7.mjs} +2 -2
- package/dist/.setup/{send-CrfEI6Bs.mjs → send-DY5EeBPr.mjs} +15 -15
- package/dist/.setup/{send.components-DxQAMfES.mjs → send.components-DGwzyA_4.mjs} +7 -7
- package/dist/.setup/{send.outbound-BISKnb-a.mjs → send.outbound-DR8O-Pvo.mjs} +8 -8
- package/dist/.setup/{retry-pz_cSha2.mjs → send.receipt-D0JBijZQ.mjs} +217 -217
- package/dist/.setup/{send.shared-DGFkbkQR.mjs → send.shared-r0Fj2v_h.mjs} +40 -40
- package/dist/.setup/{sender-identity-B9X5Vb9R.mjs → sender-identity-DQCoikZl.mjs} +1 -1
- package/dist/.setup/setup-plugin-api-BEoo_L8p.mjs +3 -0
- package/dist/.setup/{shared-B3wZ4hN-.mjs → shared-CDq4vJm3.mjs} +7 -7
- package/dist/.setup/{subagent-hooks-nlUE9ow7.mjs → subagent-hooks-Bk0mMyHh.mjs} +2 -2
- package/dist/.setup/{system-events-CdeZnvPV.mjs → system-events-I1rH-U6o.mjs} +2 -2
- package/dist/.setup/{target-resolver-BuLapkhy.mjs → target-resolver-Dcg0WjsF.mjs} +3 -3
- package/dist/.setup/targets-CJkVZIkE.mjs +3 -0
- package/dist/.setup/{thread-bindings-D7TfgjR_.mjs → thread-bindings-E0TiUQUX.mjs} +6 -6
- package/dist/.setup/{thread-bindings.manager-DN-NissX.mjs → thread-bindings.manager-CEoFDOs9.mjs} +14 -14
- package/dist/.setup/{thread-bindings.session-updates-CshfKghV.mjs → thread-bindings.session-updates-DvtjzKO-.mjs} +2 -2
- package/dist/.setup/{transcripts-source-p8EV179h.mjs → transcripts-source-CHhpvL97.mjs} +17 -17
- package/dist/.setup/{typing-BiHCzBRu.mjs → typing-Cr0b2zBq.mjs} +1 -1
- package/dist/.setup/{voice-runtime-B46rcwrG.mjs → voice-runtime-BngIfPc3.mjs} +46 -46
- package/dist/account-inspect-api.js +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/activities-api.js +791 -1
- package/dist/api.js +15 -15
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +9 -5
- package/dist/runtime-api.js +20 -20
- package/dist/setup-entry.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/src/voice/audio-worker.runtime.js +3 -3
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/activities-api-tvbsU2e3.mjs +0 -792
- package/dist/.setup/provider.runtime-CUE3UxER.mjs +0 -2
- package/dist/.setup/setup-plugin-api-BQUBxbhe.mjs +0 -3
- package/dist/.setup/targets-0KUcEIYx.mjs +0 -3
- package/dist/.setup/{accounts-ChaMcixG.mjs → accounts-DS-A-gCx.mjs} +3 -3
- package/dist/.setup/{config-schema-oxELUSDx.mjs → config-schema-DKUSr985.mjs} +2 -2
- package/dist/.setup/{receive-recovery-CHPOsnLc.mjs → receive-recovery-D6eikHf5.mjs} +2 -2
- package/dist/.setup/{thread-bindings.state-g6v9zAym.mjs → thread-bindings.state-755lJHln.mjs} +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as createDiscordActionGate } from "./accounts-
|
|
2
|
-
import { b as
|
|
3
|
-
import { a as resolveDiscordComponentSpec, b as discordInboundEventDelivery, c as formatDiscordApprovalDisplayValue, g as resolveDiscordCurrentConversationIdentity, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, x as notifyDiscordInboundEventOutboundPayloadSuccess } from "./outbound-session-route-
|
|
4
|
-
import {
|
|
1
|
+
import { t as createDiscordActionGate } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { b as chunkDiscordTextWithMode, d as normalizeDiscordMessagingTarget, f as normalizeDiscordOutboundTarget, h as canFallbackDiscordWebhookSend, i as toDiscordOutboundDeliveryResult, n as createDiscordSendReceiptFromResults, p as parseDiscordTarget, s as resolveDiscordReplyReference, t as createDiscordSendReceipt, v as hasDiscordMessageCreateAmbiguity } from "./send.receipt-D0JBijZQ.mjs";
|
|
3
|
+
import { a as resolveDiscordComponentSpec, b as discordInboundEventDelivery, c as formatDiscordApprovalDisplayValue, g as resolveDiscordCurrentConversationIdentity, n as DISCORD_PRESENTATION_CAPABILITIES, o as sendDiscordComponentMessageLazy, r as buildDiscordPresentationPayload, x as notifyDiscordInboundEventOutboundPayloadSuccess } from "./outbound-session-route-D0ryINch.mjs";
|
|
4
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
|
+
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
5
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
|
+
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
6
8
|
import { getReplyPayloadTtsSupplement, resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
7
|
-
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
8
9
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
10
|
import { createReplyToFanout, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
11
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
11
|
-
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
12
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
13
13
|
//#region extensions/discord/src/channel.conversation.ts
|
|
14
14
|
function resolveDiscordAttachedOutboundTarget(params) {
|
|
@@ -151,7 +151,7 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
151
151
|
}
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
154
|
-
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
154
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-DY5EeBPr.mjs").then((n) => n.t));
|
|
155
155
|
function resolveDiscordFormattingOptions(ctx) {
|
|
156
156
|
const formatting = ctx.formatting;
|
|
157
157
|
return {
|
|
@@ -366,8 +366,8 @@ async function sendDiscordOutboundPayload(params) {
|
|
|
366
366
|
const DISCORD_TEXT_CHUNK_LIMIT = 2e3;
|
|
367
367
|
const DISCORD_PRECHUNK_MAX_LINES = Number.MAX_SAFE_INTEGER;
|
|
368
368
|
const log = createSubsystemLogger("discord/outbound");
|
|
369
|
-
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-
|
|
370
|
-
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-
|
|
369
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-E0TiUQUX.mjs").then((n) => n.i));
|
|
370
|
+
const loadDiscordComponentSendRuntime = createLazyRuntimeModule(() => import("./send.components-DGwzyA_4.mjs").then((n) => n.i));
|
|
371
371
|
function resolveDiscordDeliveryOptions(params) {
|
|
372
372
|
return {
|
|
373
373
|
onPlatformSendDispatch: params.onPlatformSendDispatch,
|
package/dist/.setup/{outbound-session-route-zVGxxceg.mjs → outbound-session-route-D0ryINch.mjs}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as resolveDiscordAccount, r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { t as inspectDiscordAccount } from "./account-inspect-Bp8nbBSx.mjs";
|
|
3
|
+
import { k as isDiscordThreadChannelType } from "./allow-list-Kty_8Xca.mjs";
|
|
4
|
+
import { d as normalizeDiscordMessagingTarget, p as parseDiscordTarget, u as matchesDiscordToolContextTarget } from "./send.receipt-D0JBijZQ.mjs";
|
|
5
|
+
import { h as readDiscordComponentSpec, m as coerceDiscordComponentParam } from "./components-CwpgbGDR.mjs";
|
|
5
6
|
import { n as resolveDiscordCommandOwnerEntries } from "./command-owners-D78sAoOz.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { ChannelType } from "discord-api-types/v10";
|
|
8
|
-
import { Type } from "typebox";
|
|
7
|
+
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
8
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
10
|
-
import { buildOutboundBaseSessionKey, deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
11
9
|
import { asOptionalRecord, isRecord, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
|
-
import {
|
|
13
|
-
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
|
+
import { buildOutboundBaseSessionKey, deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
14
11
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
12
|
+
import { ChannelType } from "discord-api-types/v10";
|
|
13
|
+
import { Type } from "typebox";
|
|
14
|
+
import { resolveAskUserQuestionOptionIndices } from "openclaw/plugin-sdk/reply-payload";
|
|
15
15
|
import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
16
16
|
import { getExecApprovalReplyMetadata, isChannelExecApprovalClientEnabledFromConfig, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
|
|
17
17
|
import { resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
@@ -264,7 +264,7 @@ function matchesCurrentDiscordThread(params) {
|
|
|
264
264
|
toolContext: params.toolContext
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
|
-
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-
|
|
267
|
+
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./handle-action-cmTFQysA.mjs"));
|
|
268
268
|
const discordActionGroups = [
|
|
269
269
|
{
|
|
270
270
|
gate: "polls",
|
|
@@ -713,11 +713,11 @@ const DISCORD_PRESENTATION_CAPABILITIES = {
|
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-
|
|
716
|
+
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-DGwzyA_4.mjs").then((n) => n.i), "sendDiscordComponentMessage");
|
|
717
717
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
718
718
|
return await (await loadDiscordComponentSend())(...args);
|
|
719
719
|
}
|
|
720
|
-
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-
|
|
720
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-CwpgbGDR.mjs").then((n) => n.a));
|
|
721
721
|
function addPayloadTextFallback(spec, payload) {
|
|
722
722
|
return spec.text ? spec : {
|
|
723
723
|
...spec,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as DiscordApiError, r as fetchDiscord } from "./api-
|
|
2
|
+
import { m as normalizeDiscordToken } from "./accounts-DS-A-gCx.mjs";
|
|
3
|
+
import { E as getDiscordEndpointRuntime } from "./allow-list-Kty_8Xca.mjs";
|
|
4
|
+
import { n as DiscordApiError, r as fetchDiscord } from "./api-CotnTQLx.mjs";
|
|
5
|
+
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
6
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
6
7
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
7
|
-
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { fetchWithTimeout, runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
9
|
//#region extensions/discord/src/probe.ts
|
|
10
10
|
var probe_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,65 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
1
|
+
import { c as resolveDiscordAccount, f as resolveDiscordAccountDmPolicy, h as resolveDiscordToken, l as resolveDiscordAccountAllowFrom, m as normalizeDiscordToken, o as mergeDiscordAccountConfig, p as resolveDiscordMaxLinesPerMessage } from "./accounts-DS-A-gCx.mjs";
|
|
2
|
+
import { C as resolveTimestampMs, E as getDiscordEndpointRuntime, T as assertDiscordEndpointGatewayUrl, a as normalizeDiscordSlug, b as formatDiscordReactionEmoji, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordOwnerAllowFrom, h as resolveDiscordOwnerAccess, i as normalizeDiscordDisplaySlug, k as isDiscordThreadChannelType, l as resolveDiscordChannelPolicyCommandAuthorizer, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, p as resolveDiscordMemberAllowed, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, v as resolveGroupDmAllow, x as formatDiscordUserTag, y as shouldEmitDiscordReactionNotification } from "./allow-list-Kty_8Xca.mjs";
|
|
3
|
+
import { B as validateDiscordProxyUrl, C as hasAnyChannelPermissionDiscord, G as unregisterGateway, P as createDiscordRestClient, R as DISCORD_REST_TIMEOUT_MS, V as withValidatedDiscordProxy, W as registerGateway, y as canViewDiscordGuildChannel } from "./send.shared-r0Fj2v_h.mjs";
|
|
4
|
+
import { i as setPresence, t as clearPresences } from "./presence-cache-Di3H3DIU.mjs";
|
|
5
|
+
import { $ as BaseMessageInteractiveComponent, B as Container, D as Message, E as Guild, J as Separator, K as Row, O as User, P as Modal, R as Button, T as CommandWithSubcommands, X as TextDisplay, Y as StringSelectMenu, a as MessageCreateListener, c as PresenceUpdateListener, d as ThreadDeleteListener, f as ThreadUpdateListener, h as Plugin, i as InteractionCreateListener, k as hasDiscordV2Components, l as ReadyListener, m as Client, n as GuildCreateListener, o as MessageReactionAddListener, r as GuildDeleteListener, s as MessageReactionRemoveListener, t as discord_exports, v as RateLimitError, w as Command } from "./discord-DTLP81g6.mjs";
|
|
6
|
+
import { b as chunkDiscordTextWithMode } from "./send.receipt-D0JBijZQ.mjs";
|
|
7
|
+
import { a as isDiscordRateLimitResponseBody, s as summarizeDiscordResponseBody } from "./api-CotnTQLx.mjs";
|
|
8
|
+
import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-DY5EeBPr.mjs";
|
|
9
|
+
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-DR8O-Pvo.mjs";
|
|
10
|
+
import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-D86uWLt_.mjs";
|
|
11
|
+
import { C as parseDiscordActivityCustomIdForInteraction, D as parseDiscordModalCustomIdForInteraction, E as parseDiscordModalCustomId, O as decodeCustomIdComponent, T as parseDiscordComponentCustomIdForInteraction, c as parseExecApprovalData, d as buildDiscordComponentMessage, k as encodeCustomIdComponent, o as parseDiscordQuestionData, w as parseDiscordComponentCustomId, y as buildDiscordActivityCustomId } from "./components-CwpgbGDR.mjs";
|
|
12
|
+
import { a as registerDiscordComponentEntries, o as resolveDiscordComponentEntryWithPersistence, s as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-DGwzyA_4.mjs";
|
|
6
13
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import { o as chunkDiscordTextWithMode } from "./retry-pz_cSha2.mjs";
|
|
9
|
-
import { B as withValidatedDiscordProxy, C as hasAnyChannelPermissionDiscord, L as DISCORD_REST_TIMEOUT_MS, N as createDiscordRestClient, U as registerGateway, W as unregisterGateway, y as canViewDiscordGuildChannel, z as validateDiscordProxyUrl } from "./send.shared-DGFkbkQR.mjs";
|
|
10
|
-
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-BISKnb-a.mjs";
|
|
11
|
-
import { n as getDiscordActivitiesRuntime } from "./runtime-sUksZ--Q.mjs";
|
|
14
|
+
import { n as getDiscordActivitiesRuntime } from "./runtime-Lsy4dEx7.mjs";
|
|
12
15
|
import { t as resolveDiscordCommandOwnerAllowFrom } from "./command-owners-D78sAoOz.mjs";
|
|
16
|
+
import { D as isDiscordExecApprovalClientEnabled, T as getDiscordExecApprovalApprovers, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, d as resolveDiscordBoundConversationRoute, h as resolveDiscordConversationIdentity, l as buildDiscordConversationRouteContext, n as DISCORD_PRESENTATION_CAPABILITIES, p as resolveDiscordEffectiveRoute, r as buildDiscordPresentationPayload, s as DISCORD_APPROVAL_ALLOWED_MENTIONS, u as buildDiscordRoutePeer } from "./outbound-session-route-D0ryINch.mjs";
|
|
17
|
+
import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-D--q9Zta.mjs";
|
|
18
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CEaKGzuh.mjs";
|
|
19
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-CMz4PVnV.mjs";
|
|
20
|
+
import { a as isThreadArchived, n as getThreadBindingManager } from "./thread-bindings.manager-CEoFDOs9.mjs";
|
|
13
21
|
import { n as resolveDiscordChannelInfoSafe, o as resolveDiscordChannelTopicSafe, r as resolveDiscordChannelNameSafe } from "./channel-access-C12aDZ0p.mjs";
|
|
14
|
-
import {
|
|
15
|
-
import { i as setPresence, t as clearPresences } from "./presence-cache-Di3H3DIU.mjs";
|
|
16
|
-
import { _ as readMessagesDiscord, s as sendVoiceMessageDiscord } from "./send-CrfEI6Bs.mjs";
|
|
17
|
-
import { c as raceWithTimeout, u as withAbortTimeout } from "./timeouts-D86uWLt_.mjs";
|
|
18
|
-
import { D as isDiscordExecApprovalClientEnabled, T as getDiscordExecApprovalApprovers, a as resolveDiscordComponentSpec, c as formatDiscordApprovalDisplayValue, d as resolveDiscordBoundConversationRoute, h as resolveDiscordConversationIdentity, l as buildDiscordConversationRouteContext, n as DISCORD_PRESENTATION_CAPABILITIES, p as resolveDiscordEffectiveRoute, r as buildDiscordPresentationPayload, s as DISCORD_APPROVAL_ALLOWED_MENTIONS, u as buildDiscordRoutePeer } from "./outbound-session-route-zVGxxceg.mjs";
|
|
19
|
-
import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-8Pv20CHc.mjs";
|
|
20
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-BFPNRmVv.mjs";
|
|
21
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-0-aBuCy3.mjs";
|
|
22
|
-
import { a as isThreadArchived, n as getThreadBindingManager } from "./thread-bindings.manager-DN-NissX.mjs";
|
|
23
|
-
import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-LYrIHlBF.mjs";
|
|
22
|
+
import { a as probeDiscordApplicationId, r as parseApplicationIdFromToken } from "./probe-DTSDdlpy.mjs";
|
|
24
23
|
import { i as sanitizeRecentModels, n as normalizeModelRef, r as preferenceTimestampMs, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-BHT1LkR_.mjs";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
24
|
+
import { D as resolveDiscordReferencedReplyMessage, O as resolveDiscordReferencedReplyMessageId, a as authorizeDiscordVoiceIngress, c as resolveDiscordVoiceEnabled, i as setDiscordTranscriptsVoiceManager, l as resolveDiscordThreadLikeChannelContext, o as resolveDiscordVoiceAccess, u as resolveFetchedDiscordThreadLikeChannelContext } from "./transcripts-source-CHhpvL97.mjs";
|
|
25
|
+
import { t as resolveDiscordSenderIdentity } from "./sender-identity-DQCoikZl.mjs";
|
|
26
|
+
import { n as hasDiscordApprovalControl, t as discordApprovalMessageUpdates } from "./approval-message-updates-CdnQ98c8.mjs";
|
|
27
27
|
import { createRequire } from "node:module";
|
|
28
|
-
import {
|
|
28
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
29
|
+
import { PlatformMessageNotDispatchedError, formatErrorMessage, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
30
|
+
import { createNonExitingRuntime, createSubsystemLogger, danger, formatDurationSeconds, isVerbose, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
31
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
32
|
+
import { asFiniteNumber, asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, parseFiniteNumber, parseStrictNonNegativeInteger, summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
33
|
+
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
34
|
+
import { createRuntimeConfigReader, getRuntimeConfig, getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
29
35
|
import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes, PermissionFlagsBits } from "discord-api-types/v10";
|
|
30
36
|
import { Type } from "typebox";
|
|
31
37
|
import { Check, Errors } from "typebox/value";
|
|
32
38
|
import { createHash, randomUUID } from "node:crypto";
|
|
33
39
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
34
|
-
import { MAX_DATE_TIMESTAMP_MS, MAX_TIMER_TIMEOUT_MS, asDateTimestampMs, asSafeIntegerInRange, parseFiniteNumber, parseStrictInteger, parseStrictPositiveInteger, resolveDateTimestampMs, resolvePromptHistoryLimit, resolveTimestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
40
|
+
import { MAX_DATE_TIMESTAMP_MS, MAX_TIMER_TIMEOUT_MS, asDateTimestampMs, asSafeIntegerInRange, parseFiniteNumber as parseFiniteNumber$1, parseStrictInteger, parseStrictPositiveInteger, resolveDateTimestampMs, resolvePromptHistoryLimit, resolveTimestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
35
41
|
import { inspect } from "node:util";
|
|
36
42
|
import * as fetchRuntimeSdk from "openclaw/plugin-sdk/fetch-runtime";
|
|
37
43
|
import { createHttp1EnvHttpProxyAgent, createHttp1ProxyAgent, createNodeProxyAgent, resolveEnvHttpProxyAgentOptions, wrapFetchWithAbortSignal } from "openclaw/plugin-sdk/fetch-runtime";
|
|
38
44
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
39
|
-
import { fetchWithSsrFGuard, formatErrorMessage, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
43
|
-
import { asFiniteNumber, asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, parseFiniteNumber as parseFiniteNumber$1, parseStrictNonNegativeInteger as parseStrictNonNegativeInteger$1, summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
44
|
-
import { createRuntimeConfigReader, getRuntimeConfig, getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
45
|
-
import { renderPresentationForDelivery } from "openclaw/plugin-sdk/interactive-runtime";
|
|
45
|
+
import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1, resolvePinnedHostnameWithPolicy } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
46
|
+
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
47
|
+
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
46
48
|
import { hasOutboundReplyContent, resolveSendableOutboundReplyParts, resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
|
|
47
|
-
import {
|
|
49
|
+
import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
|
|
50
|
+
import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
51
|
+
import { chunkItems, findCodeRegions, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
|
|
48
52
|
import { sliceUtf16Safe, truncateUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
49
53
|
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
50
|
-
import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
51
54
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
52
|
-
import { chunkItems, findCodeRegions, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
|
|
53
55
|
import { buildOutboundSessionContext, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled, sendDurableMessageBatch } from "openclaw/plugin-sdk/channel-outbound";
|
|
54
|
-
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
55
|
-
import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
|
|
56
|
-
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
57
|
-
import { buildCommandTextFromArgs, findCommandByNativeName, formatCommandArgMenuTitle, listChatCommands, listNativeCommandSpecsForConfig, listSkillCommandsForAgents, resolveCommandAuthorization, resolveCommandAuthorizedFromAuthorizers, resolveEffectiveAgentRuntime, resolveNativeCommandSessionTargets, resolveStoredModelOverride, serializeCommandArgs } from "openclaw/plugin-sdk/command-auth-native";
|
|
58
|
-
import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
59
|
-
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
60
|
-
import { buildChannelInboundEventContext, createChannelPartialDeliveryError, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
|
|
61
56
|
import path from "node:path";
|
|
62
57
|
import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
58
|
+
import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
59
|
+
import { renderPresentationForDelivery } from "openclaw/plugin-sdk/interactive-runtime";
|
|
63
60
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
64
61
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
65
62
|
import { buildPairingReply, formatThreadBindingDurationLabel, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
@@ -68,18 +65,21 @@ import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-run
|
|
|
68
65
|
import { readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
69
66
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
70
67
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
68
|
+
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
71
69
|
import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
|
|
72
70
|
import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
73
71
|
import { clearExpiredCooldowns, ensureAuthProfileStore, formatReasoningMessage, getPreparedModelCatalogSnapshot, isProfileInCooldown, listAgentIds, loadPreparedModelCatalog, resolveAgentAvatar, resolveAgentDir, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
|
|
74
72
|
import { deleteSessionEntry, getSessionEntry, listSessionEntries, readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
73
|
+
import { buildChannelInboundEventContext, createChannelPartialDeliveryError, createCommandTurnContext, dispatchChannelInboundTurn, formatInboundEnvelope, hasVisibleInboundReplyDispatch, isChannelPartialDeliveryError, resolveEnvelopeFormatOptions, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
|
|
75
74
|
import * as proxyCaptureSdk from "openclaw/plugin-sdk/proxy-capture";
|
|
76
75
|
import { resolveDebugProxySettings, resolveEffectiveDebugProxyUrl } from "openclaw/plugin-sdk/proxy-capture";
|
|
77
76
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
78
77
|
import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
|
|
79
78
|
import * as dns from "node:dns";
|
|
80
|
-
import { buildCommandTextFromArgs
|
|
79
|
+
import { buildCommandTextFromArgs, findCommandByNativeName, mergeNativeCommandSpecs, parseCommandArgs, resolveCommandArgChoices, resolveCommandArgMenu, serializeCommandArgs } from "openclaw/plugin-sdk/native-command-registry";
|
|
81
80
|
import { PLUGIN_COMMAND_DISPATCH } from "openclaw/plugin-sdk/plugin-command-runtime";
|
|
82
81
|
import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime";
|
|
82
|
+
import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNativeName as findCommandByNativeName$1, formatCommandArgMenuTitle, listChatCommands, listNativeCommandSpecsForConfig, listSkillCommandsForAgents, resolveCommandAuthorization, resolveCommandAuthorizedFromAuthorizers, resolveEffectiveAgentRuntime, resolveNativeCommandSessionTargets, resolveStoredModelOverride, serializeCommandArgs as serializeCommandArgs$1 } from "openclaw/plugin-sdk/command-auth-native";
|
|
83
83
|
import * as modelsProviderRuntime from "openclaw/plugin-sdk/models-provider-runtime";
|
|
84
84
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
85
85
|
import { EventEmitter } from "node:events";
|
|
@@ -1374,7 +1374,7 @@ async function resolveGuildEntriesByChannelAllowlist(params) {
|
|
|
1374
1374
|
summarizeMapping("discord channels", mapping, unresolved, params.runtime);
|
|
1375
1375
|
return nextGuilds;
|
|
1376
1376
|
} catch (err) {
|
|
1377
|
-
params.runtime.log?.(`discord channel resolve failed; using config entries. ${formatErrorMessage(err)}`);
|
|
1377
|
+
params.runtime.log?.(`discord channel resolve failed; using config entries. ${formatErrorMessage$1(err)}`);
|
|
1378
1378
|
return params.guildEntries;
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
@@ -1398,7 +1398,7 @@ async function resolveAllowFromByUserAllowlist(params) {
|
|
|
1398
1398
|
summarizeMapping("discord users", mapping, unresolved, params.runtime);
|
|
1399
1399
|
return allowFrom;
|
|
1400
1400
|
} catch (err) {
|
|
1401
|
-
params.runtime.log?.(`discord user resolve failed; using config entries. ${formatErrorMessage(err)}`);
|
|
1401
|
+
params.runtime.log?.(`discord user resolve failed; using config entries. ${formatErrorMessage$1(err)}`);
|
|
1402
1402
|
return params.allowFrom;
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
@@ -1441,7 +1441,7 @@ async function resolveGuildEntriesByUserAllowlist(params) {
|
|
|
1441
1441
|
summarizeMapping("discord channel users", mapping, unresolved, params.runtime);
|
|
1442
1442
|
return nextGuilds;
|
|
1443
1443
|
} catch (err) {
|
|
1444
|
-
params.runtime.log?.(`discord channel user resolve failed; using config entries. ${formatErrorMessage(err)}`);
|
|
1444
|
+
params.runtime.log?.(`discord channel user resolve failed; using config entries. ${formatErrorMessage$1(err)}`);
|
|
1445
1445
|
return params.guildEntries;
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
@@ -1554,7 +1554,7 @@ function createEnvProxyDiscordRestDispatcher(runtime) {
|
|
|
1554
1554
|
connect: { lookup: discordDnsLookup$1 }
|
|
1555
1555
|
});
|
|
1556
1556
|
} catch (err) {
|
|
1557
|
-
runtime.error?.(danger(`discord: env proxy unavailable for REST fetch; using direct dispatcher: ${formatErrorMessage
|
|
1557
|
+
runtime.error?.(danger(`discord: env proxy unavailable for REST fetch; using direct dispatcher: ${formatErrorMessage(err)}`));
|
|
1558
1558
|
return;
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
@@ -2023,7 +2023,7 @@ async function handleDiscordCommandArgInteraction(params) {
|
|
|
2023
2023
|
await params.safeInteractionCall("command arg ack", () => interaction.acknowledge());
|
|
2024
2024
|
return;
|
|
2025
2025
|
}
|
|
2026
|
-
const commandDefinition = findCommandByNativeName(parsed.command, "discord") ?? listChatCommands().find((entry) => entry.key === parsed.command);
|
|
2026
|
+
const commandDefinition = findCommandByNativeName$1(parsed.command, "discord") ?? listChatCommands().find((entry) => entry.key === parsed.command);
|
|
2027
2027
|
if (!commandDefinition) {
|
|
2028
2028
|
await clearWithMessage("Sorry, that command is no longer available.");
|
|
2029
2029
|
return;
|
|
@@ -2032,9 +2032,9 @@ async function handleDiscordCommandArgInteraction(params) {
|
|
|
2032
2032
|
const commandArgs = { values: { [parsed.arg]: parsed.value } };
|
|
2033
2033
|
const commandArgsWithRaw = {
|
|
2034
2034
|
...commandArgs,
|
|
2035
|
-
raw: serializeCommandArgs(commandDefinition, commandArgs)
|
|
2035
|
+
raw: serializeCommandArgs$1(commandDefinition, commandArgs)
|
|
2036
2036
|
};
|
|
2037
|
-
const prompt = buildCommandTextFromArgs(commandDefinition, commandArgsWithRaw);
|
|
2037
|
+
const prompt = buildCommandTextFromArgs$1(commandDefinition, commandArgsWithRaw);
|
|
2038
2038
|
await params.dispatchCommandInteraction({
|
|
2039
2039
|
...ctx,
|
|
2040
2040
|
interaction,
|
|
@@ -3586,7 +3586,7 @@ async function applyDiscordModelPickerSelection(params) {
|
|
|
3586
3586
|
function shouldOpenDiscordModelPickerFromCommand(params) {
|
|
3587
3587
|
const context = normalizeLowercaseStringOrEmpty(params.command.nativeName ?? params.command.key);
|
|
3588
3588
|
if (context !== "model" && context !== "models") return null;
|
|
3589
|
-
const serializedArgs = normalizeOptionalString(serializeCommandArgs(params.command, params.commandArgs)) ?? "";
|
|
3589
|
+
const serializedArgs = normalizeOptionalString(serializeCommandArgs$1(params.command, params.commandArgs)) ?? "";
|
|
3590
3590
|
if (context === "model") return !normalizeOptionalString(params.commandArgs?.values?.model) && !serializedArgs ? context : null;
|
|
3591
3591
|
return serializedArgs ? null : context;
|
|
3592
3592
|
}
|
|
@@ -3829,7 +3829,7 @@ function resolveSubmittedModelRef(params) {
|
|
|
3829
3829
|
return provider && selectedModel ? `${provider}/${selectedModel}` : null;
|
|
3830
3830
|
}
|
|
3831
3831
|
function buildDiscordModelPickerSelectionCommand(params) {
|
|
3832
|
-
const commandDefinition = findCommandByNativeName("model", "discord") ?? listChatCommands().find((entry) => entry.key === "model");
|
|
3832
|
+
const commandDefinition = findCommandByNativeName$1("model", "discord") ?? listChatCommands().find((entry) => entry.key === "model");
|
|
3833
3833
|
if (!commandDefinition) return null;
|
|
3834
3834
|
const commandArgs = {
|
|
3835
3835
|
values: { model: params.modelRef },
|
|
@@ -3838,7 +3838,7 @@ function buildDiscordModelPickerSelectionCommand(params) {
|
|
|
3838
3838
|
return {
|
|
3839
3839
|
command: commandDefinition,
|
|
3840
3840
|
args: commandArgs,
|
|
3841
|
-
prompt: buildCommandTextFromArgs(commandDefinition, commandArgs)
|
|
3841
|
+
prompt: buildCommandTextFromArgs$1(commandDefinition, commandArgs)
|
|
3842
3842
|
};
|
|
3843
3843
|
}
|
|
3844
3844
|
function listDiscordModelPickerProviderModels(data, provider) {
|
|
@@ -4391,7 +4391,7 @@ function createDiscordNativeCommand(params) {
|
|
|
4391
4391
|
const { command, cfg, discordConfig, accountId, sessionPrefix, ephemeralDefault, threadBindings, buildContext, dispatchReplyFromConfig } = params;
|
|
4392
4392
|
const fallbackCommandDefinition = createNativeCommandDefinition(command);
|
|
4393
4393
|
const pluginCommandCandidate = "prepareDispatch" in command ? command : void 0;
|
|
4394
|
-
const commandDefinition = pluginCommandCandidate ? fallbackCommandDefinition : findCommandByNativeName
|
|
4394
|
+
const commandDefinition = pluginCommandCandidate ? fallbackCommandDefinition : findCommandByNativeName(command.name, "discord", { includeBundledChannelFallback: false }) ?? fallbackCommandDefinition;
|
|
4395
4395
|
const argDefinitions = commandDefinition.args ?? ("args" in command ? command.args : void 0);
|
|
4396
4396
|
const resolveCurrentConfig = () => getRuntimeConfigSnapshot() ?? cfg;
|
|
4397
4397
|
const readPolicy = resolveDiscordNativePolicyReader(params);
|
|
@@ -4447,9 +4447,9 @@ function createDiscordNativeCommand(params) {
|
|
|
4447
4447
|
const commandArgs = argDefinitions?.length ? readDiscordCommandArgs(interaction, argDefinitions) : command.acceptsArgs ? parseCommandArgs(commandDefinition, interaction.options.getString("input") ?? "") : void 0;
|
|
4448
4448
|
const commandArgsWithRaw = commandArgs ? {
|
|
4449
4449
|
...commandArgs,
|
|
4450
|
-
raw: serializeCommandArgs
|
|
4450
|
+
raw: serializeCommandArgs(commandDefinition, commandArgs) ?? commandArgs.raw
|
|
4451
4451
|
} : void 0;
|
|
4452
|
-
const prompt = buildCommandTextFromArgs
|
|
4452
|
+
const prompt = buildCommandTextFromArgs(commandDefinition, commandArgsWithRaw);
|
|
4453
4453
|
const preparedPluginCommand = pluginCommandCandidate?.prepareDispatch(commandArgsWithRaw?.raw);
|
|
4454
4454
|
await dispatchDiscordCommandInteraction({
|
|
4455
4455
|
readPolicy,
|
|
@@ -4942,7 +4942,7 @@ function canResumeAfterGatewayClose(code) {
|
|
|
4942
4942
|
//#region extensions/discord/src/internal/gateway-identify-limiter.ts
|
|
4943
4943
|
const IDENTIFY_WINDOW_MS = 5e3;
|
|
4944
4944
|
function normalizeMaxConcurrency(value) {
|
|
4945
|
-
const parsed = parseFiniteNumber(value);
|
|
4945
|
+
const parsed = parseFiniteNumber$1(value);
|
|
4946
4946
|
return parsed === void 0 ? 1 : Math.max(1, Math.floor(parsed));
|
|
4947
4947
|
}
|
|
4948
4948
|
var GatewayIdentifyLimiter = class {
|
|
@@ -5806,7 +5806,7 @@ async function fetchDiscordGatewayInfo(params) {
|
|
|
5806
5806
|
body = await response.text();
|
|
5807
5807
|
} catch (error) {
|
|
5808
5808
|
throw createGatewayMetadataError({
|
|
5809
|
-
detail: formatErrorMessage
|
|
5809
|
+
detail: formatErrorMessage(error),
|
|
5810
5810
|
transient: true,
|
|
5811
5811
|
cause: error
|
|
5812
5812
|
});
|
|
@@ -5821,7 +5821,7 @@ async function fetchDiscordGatewayInfo(params) {
|
|
|
5821
5821
|
return parseDiscordGatewayInfoBody(body);
|
|
5822
5822
|
} catch (error) {
|
|
5823
5823
|
throw createGatewayMetadataError({
|
|
5824
|
-
detail: `Discord API /gateway/bot returned invalid metadata: ${formatErrorMessage
|
|
5824
|
+
detail: `Discord API /gateway/bot returned invalid metadata: ${formatErrorMessage(error)} (${summary})`,
|
|
5825
5825
|
transient,
|
|
5826
5826
|
cause: error
|
|
5827
5827
|
});
|
|
@@ -5849,7 +5849,7 @@ async function fetchDiscordGatewayInfoWithTimeout(params) {
|
|
|
5849
5849
|
}
|
|
5850
5850
|
function resolveGatewayInfoWithFallback(params) {
|
|
5851
5851
|
if (!isTransientGatewayMetadataError(params.error)) throw params.error;
|
|
5852
|
-
const message = formatErrorMessage
|
|
5852
|
+
const message = formatErrorMessage(params.error);
|
|
5853
5853
|
const now = Date.now();
|
|
5854
5854
|
if (params.runtime) {
|
|
5855
5855
|
const previous = gatewayMetadataFallbackLogLastAt.get(params.runtime);
|
|
@@ -6186,12 +6186,12 @@ function readFirstStackFrame(err) {
|
|
|
6186
6186
|
return frame ? frame.replace(/^at\s+/, "") : void 0;
|
|
6187
6187
|
}
|
|
6188
6188
|
function formatDiscordGatewayErrorMessage(err) {
|
|
6189
|
-
if (!(err instanceof Error)) return formatErrorMessage(err);
|
|
6189
|
+
if (!(err instanceof Error)) return formatErrorMessage$1(err);
|
|
6190
6190
|
if (err.message) {
|
|
6191
|
-
const detail = formatErrorMessage(err);
|
|
6191
|
+
const detail = formatErrorMessage$1(err);
|
|
6192
6192
|
return err.name ? `${err.name}: ${detail}` : detail;
|
|
6193
6193
|
}
|
|
6194
|
-
const detail = formatErrorMessage(err);
|
|
6194
|
+
const detail = formatErrorMessage$1(err);
|
|
6195
6195
|
const firstFrame = readFirstStackFrame(err);
|
|
6196
6196
|
if (firstFrame && detail === (err.name || "Error")) return `${detail} @ ${firstFrame}`;
|
|
6197
6197
|
return detail;
|
|
@@ -6691,7 +6691,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
6691
6691
|
});
|
|
6692
6692
|
try {
|
|
6693
6693
|
if (drainPendingGatewayErrors() === "stop") return;
|
|
6694
|
-
if (gatewayReadyAtLifecycleStart && params.voiceManager) params.voiceManager.autoJoin().catch((err) => params.runtime.error?.(danger(`discord voice: autoJoin failed: ${formatErrorMessage(err)}`)));
|
|
6694
|
+
if (gatewayReadyAtLifecycleStart && params.voiceManager) params.voiceManager.autoJoin().catch((err) => params.runtime.error?.(danger(`discord voice: autoJoin failed: ${formatErrorMessage$1(err)}`)));
|
|
6695
6695
|
await waitForGatewayReady({
|
|
6696
6696
|
gateway,
|
|
6697
6697
|
abortSignal: params.abortSignal,
|
|
@@ -6739,7 +6739,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
6739
6739
|
let discordVoiceRuntimePromise;
|
|
6740
6740
|
let discordProviderSessionRuntimePromise;
|
|
6741
6741
|
async function loadDiscordVoiceRuntime() {
|
|
6742
|
-
const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-
|
|
6742
|
+
const promise = discordVoiceRuntimePromise ?? import("./voice-runtime-BngIfPc3.mjs").then((n) => n.t);
|
|
6743
6743
|
discordVoiceRuntimePromise = promise;
|
|
6744
6744
|
try {
|
|
6745
6745
|
return await promise;
|
|
@@ -6749,7 +6749,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
6749
6749
|
}
|
|
6750
6750
|
}
|
|
6751
6751
|
async function loadDiscordProviderSessionRuntime() {
|
|
6752
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
6752
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-DKJ-qSt9.mjs");
|
|
6753
6753
|
discordProviderSessionRuntimePromise = promise;
|
|
6754
6754
|
try {
|
|
6755
6755
|
return await promise;
|
|
@@ -6783,13 +6783,13 @@ function isLegacyMissingSessionError(message) {
|
|
|
6783
6783
|
function classifyAcpStatusProbeError(params) {
|
|
6784
6784
|
if (params.isAcpRuntimeError(params.error) && ["SESSION_OWNER_MIGRATION_REQUIRED", "SESSION_OWNER_UNSUPPORTED"].includes(params.error.detailCode ?? "")) return {
|
|
6785
6785
|
status: "uncertain",
|
|
6786
|
-
reason: formatErrorMessage(params.error)
|
|
6786
|
+
reason: formatErrorMessage$1(params.error)
|
|
6787
6787
|
};
|
|
6788
6788
|
if (params.isAcpRuntimeError(params.error) && params.error.code === "ACP_SESSION_INIT_FAILED") return {
|
|
6789
6789
|
status: "stale",
|
|
6790
6790
|
reason: "session-init-failed"
|
|
6791
6791
|
};
|
|
6792
|
-
if (isLegacyMissingSessionError(formatErrorMessage(params.error))) return {
|
|
6792
|
+
if (isLegacyMissingSessionError(formatErrorMessage$1(params.error))) return {
|
|
6793
6793
|
status: "stale",
|
|
6794
6794
|
reason: "session-missing"
|
|
6795
6795
|
};
|
|
@@ -7231,7 +7231,7 @@ function readDiscordDeployObjectField(value, field) {
|
|
|
7231
7231
|
function isAbortLikeError(err) {
|
|
7232
7232
|
if (!err || typeof err !== "object") return false;
|
|
7233
7233
|
const name = "name" in err && typeof err.name === "string" ? err.name : void 0;
|
|
7234
|
-
const message = formatErrorMessage(err);
|
|
7234
|
+
const message = formatErrorMessage$1(err);
|
|
7235
7235
|
return name === "AbortError" || message === "This operation was aborted" || message === "The operation was aborted" || /\boperation was aborted\b/i.test(message);
|
|
7236
7236
|
}
|
|
7237
7237
|
function formatDiscordDeployRestOperation(err) {
|
|
@@ -7241,10 +7241,10 @@ function formatDiscordDeployRestOperation(err) {
|
|
|
7241
7241
|
return method ?? path ?? "request";
|
|
7242
7242
|
}
|
|
7243
7243
|
function formatDiscordDeployErrorMessage(err) {
|
|
7244
|
-
if (!isAbortLikeError(err)) return formatErrorMessage(err);
|
|
7244
|
+
if (!isAbortLikeError(err)) return formatErrorMessage$1(err);
|
|
7245
7245
|
const deployErr = err && typeof err === "object" ? err : {};
|
|
7246
|
-
const requestMs = parseFiniteNumber
|
|
7247
|
-
const timeoutMs = parseFiniteNumber
|
|
7246
|
+
const requestMs = parseFiniteNumber(deployErr.deployRequestMs);
|
|
7247
|
+
const timeoutMs = parseFiniteNumber(deployErr.deployTimeoutMs);
|
|
7248
7248
|
const operation = formatDiscordDeployRestOperation(deployErr);
|
|
7249
7249
|
if (!(requestMs !== void 0 || timeoutMs !== void 0 || deployErr.deployRestMethod !== void 0 || deployErr.deployRestPath !== void 0)) return "Discord REST request was aborted";
|
|
7250
7250
|
const timing = [];
|
|
@@ -7257,8 +7257,8 @@ function formatDiscordDeployErrorMessage(err) {
|
|
|
7257
7257
|
function resolveDiscordDeployRateLimitDetails(err) {
|
|
7258
7258
|
if (!err || typeof err !== "object") return;
|
|
7259
7259
|
const deployErr = err;
|
|
7260
|
-
const status = parseStrictNonNegativeInteger
|
|
7261
|
-
const retryAfterSeconds = parseFiniteNumber
|
|
7260
|
+
const status = parseStrictNonNegativeInteger(deployErr.status) ?? parseStrictNonNegativeInteger(deployErr.statusCode);
|
|
7261
|
+
const retryAfterSeconds = parseFiniteNumber(deployErr.retryAfter) ?? parseFiniteNumber(readDiscordDeployObjectField(deployErr.rawBody, "retry_after"));
|
|
7262
7262
|
if (!(err instanceof RateLimitError || status === 429 || retryAfterSeconds !== void 0)) return;
|
|
7263
7263
|
const rawGlobal = readDiscordDeployObjectField(deployErr.rawBody, "global");
|
|
7264
7264
|
const scope = typeof deployErr.scope === "string" && deployErr.scope.trim().length > 0 ? deployErr.scope : rawGlobal === true ? "global" : rawGlobal === false ? "route" : void 0;
|
|
@@ -7345,9 +7345,9 @@ function formatDiscordDeployErrorDetails(err) {
|
|
|
7345
7345
|
function isDiscordDeployDailyCreateLimit(err) {
|
|
7346
7346
|
if (!err || typeof err !== "object") return false;
|
|
7347
7347
|
const deployErr = err;
|
|
7348
|
-
const discordCode = parseStrictNonNegativeInteger
|
|
7349
|
-
const rawCode = parseStrictNonNegativeInteger
|
|
7350
|
-
return (discordCode === 30034 || rawCode === 30034) && /daily application command creates/i.test(formatErrorMessage(err));
|
|
7348
|
+
const discordCode = parseStrictNonNegativeInteger(deployErr.discordCode);
|
|
7349
|
+
const rawCode = parseStrictNonNegativeInteger(readDiscordDeployObjectField(deployErr.rawBody, "code"));
|
|
7350
|
+
return (discordCode === 30034 || rawCode === 30034) && /daily application command creates/i.test(formatErrorMessage$1(err));
|
|
7351
7351
|
}
|
|
7352
7352
|
//#endregion
|
|
7353
7353
|
//#region extensions/discord/src/monitor/provider.startup-log.ts
|
|
@@ -7482,7 +7482,7 @@ function runDiscordCommandDeployInBackground(params) {
|
|
|
7482
7482
|
isVerbose: params.isVerbose
|
|
7483
7483
|
});
|
|
7484
7484
|
}).catch((err) => {
|
|
7485
|
-
params.runtime.log?.(warn(`[${params.accountId}] slash command deploy failed in background (message send/receive unaffected): ${formatErrorMessage(err)}`));
|
|
7485
|
+
params.runtime.log?.(warn(`[${params.accountId}] slash command deploy failed in background (message send/receive unaffected): ${formatErrorMessage$1(err)}`));
|
|
7486
7486
|
});
|
|
7487
7487
|
}
|
|
7488
7488
|
//#endregion
|
|
@@ -8357,7 +8357,7 @@ async function deliverDiscordReply(params) {
|
|
|
8357
8357
|
//#endregion
|
|
8358
8358
|
//#region extensions/discord/src/monitor/agent-components.dispatch.ts
|
|
8359
8359
|
const loadReplyRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/reply-runtime"));
|
|
8360
|
-
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-
|
|
8360
|
+
const loadTypingRuntime = createLazyRuntimeModule(() => import("./typing-Cr0b2zBq.mjs").then((n) => n.n));
|
|
8361
8361
|
function buildDiscordComponentConversationLabel(params) {
|
|
8362
8362
|
if (params.interactionCtx.isDirectMessage) return buildDirectLabel(params.interactionCtx.user);
|
|
8363
8363
|
if (params.interactionCtx.isGroupDm) return `Group DM #${params.channelCtx.channelName ?? params.interactionCtx.channelId} channel id:${params.interactionCtx.channelId}`;
|
|
@@ -8752,7 +8752,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
8752
8752
|
}
|
|
8753
8753
|
//#endregion
|
|
8754
8754
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
8755
|
-
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-
|
|
8755
|
+
const loadComponentsRuntime = createLazyRuntimeModule(() => import("./components-CwpgbGDR.mjs").then((n) => n.t));
|
|
8756
8756
|
async function handleDiscordComponentEvent(params) {
|
|
8757
8757
|
const parsed = parseDiscordComponentData(params.data, resolveInteractionCustomId(params.interaction));
|
|
8758
8758
|
if (!parsed) {
|
|
@@ -9880,7 +9880,7 @@ const DEFAULT_DISCORD_MEDIA_MAX_MB = 100;
|
|
|
9880
9880
|
const DISCORD_DISALLOWED_INTENTS_CODE = GatewayCloseCodes$1.DisallowedIntents;
|
|
9881
9881
|
function isDiscordDisallowedIntentsError(err) {
|
|
9882
9882
|
if (!err) return false;
|
|
9883
|
-
return formatErrorMessage(err).includes(String(DISCORD_DISALLOWED_INTENTS_CODE));
|
|
9883
|
+
return formatErrorMessage$1(err).includes(String(DISCORD_DISALLOWED_INTENTS_CODE));
|
|
9884
9884
|
}
|
|
9885
9885
|
async function monitorDiscordProvider(opts = {}) {
|
|
9886
9886
|
const startupStartedAt = Date.now();
|
|
@@ -10017,7 +10017,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10017
10017
|
if (applicationIdProbe.kind !== "resolved") {
|
|
10018
10018
|
const at = Date.now();
|
|
10019
10019
|
const terminal = applicationIdProbe.kind === "rejected";
|
|
10020
|
-
const probeError = formatErrorMessage(applicationIdProbe.error);
|
|
10020
|
+
const probeError = formatErrorMessage$1(applicationIdProbe.error);
|
|
10021
10021
|
const message = `Failed to resolve Discord application id: ${probeError}`;
|
|
10022
10022
|
opts.setStatus?.({
|
|
10023
10023
|
connected: false,
|
package/dist/.setup/{provider-session.runtime-BYlTBFD2.mjs → provider-session.runtime-DKJ-qSt9.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-
|
|
2
|
-
import { c as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-
|
|
3
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
1
|
+
import { i as createNoopThreadBindingManager, t as createThreadBindingManager } from "./thread-bindings.manager-CEoFDOs9.mjs";
|
|
2
|
+
import { c as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-E0TiUQUX.mjs";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-BVZO6wCg.mjs";
|
|
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 };
|