@openclaw/discord 2026.6.34 → 2026.6.35
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/{api-CjnGBhM3.js → api-1GXlSrYP.js} +42 -21
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-BWPQrzpP.js → approval-handler.runtime-Dv4p7REU.js} +3 -3
- package/dist/{audit-BwJ_2OjL.js → audit-DEVi9nIs.js} +3 -3
- package/dist/{channel-DU4jnQgl.js → channel-CQIRiosn.js} +15 -15
- package/dist/{channel-actions-CwmIqnYN.js → channel-actions-JziPEcBU.js} +2 -2
- package/dist/{channel-actions.runtime-DvpTfaJ4.js → channel-actions.runtime-D7L47LY3.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-glZ5Y98a.js → channel.setup-oMeR19Cc.js} +2 -2
- package/dist/{components-j6lTZBsT.js → components-_s5UPJqU.js} +1 -1
- package/dist/{conversation-identity-36FFBwm5.js → conversation-identity-B0k94-bz.js} +2 -2
- package/dist/{directory-config-BYMFzL29.js → directory-config-CD1svkyN.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-9JtJCiu8.js → directory-live-DBTsSRxl.js} +5 -5
- package/dist/{handle-action.guild-admin-xxGYrp-I.js → handle-action.guild-admin-CYIFMxh-.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-NxCd-PVt.js → manager.runtime-BZVdGX2d.js} +17 -9
- package/dist/{message-handler-cizxbaDc.js → message-handler-DZd9Bpq8.js} +6 -6
- package/dist/{message-handler.preflight-CbD0u7U7.js → message-handler.preflight-Axv9J9EO.js} +12 -11
- package/dist/{message-handler.process-Do4EM591.js → message-handler.process-CG0zFS-Z.js} +10 -10
- package/dist/{message-utils-CJeAoISH.js → message-utils-Dbuw27gd.js} +1 -1
- package/dist/{outbound-adapter-Dxs6iKEq.js → outbound-adapter-CKC_kmUN.js} +6 -6
- package/dist/pluralkit-CfTReLl3.js +40 -0
- package/dist/{probe-esE_Oqdm.js → probe-DcgZIpyF.js} +3 -2
- package/dist/{probe.runtime-C3Atgpvr.js → probe.runtime-CVwM9L5E.js} +1 -1
- package/dist/{provider-B-s93q9s.js → provider-CwwSXIIj.js} +73 -33
- package/dist/{provider-session.runtime-BKMOqHpd.js → provider-session.runtime-reBWkqHZ.js} +3 -3
- package/dist/provider.runtime-BsmTLYS_.js +2 -0
- package/dist/{resolve-allowlist-common-3gB2Gpmm.js → resolve-allowlist-common-D7bZqAw3.js} +3 -3
- package/dist/{resolve-channels-B3gQf8QL.js → resolve-channels--oE-RnO6.js} +6 -6
- package/dist/{resolve-users-BO10y5fJ.js → resolve-users-QXo8CXBU.js} +5 -5
- package/dist/{runtime-CFlR3L9X.js → runtime-CF7ramAs.js} +7 -7
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-CzF8MUl_.js +6 -0
- package/dist/runtime-api.monitor.js +5 -5
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-JHxfT4Pk.js → send-Bb295iHT.js} +5 -5
- package/dist/{send.components-CN35E2Ck.js → send.components-COkDUO3B.js} +4 -4
- package/dist/{send.outbound-B-cA1Esv.js → send.outbound-B_sk0hNe.js} +3 -3
- package/dist/{send.receipt-CGecJDin.js → send.receipt-Cli6_9Sn.js} +19 -7
- package/dist/{send.shared-vcbfThdy.js → send.shared-BCG7MWnP.js} +2 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-20wXhVzZ.js → subagent-hooks-CtqoWK4x.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-DR27TE7p.js → system-events-BxGNk_wE.js} +1 -1
- package/dist/{target-resolver-CDi1gI90.js → target-resolver-BcoK6b0g.js} +2 -2
- package/dist/targets-Q-ZoP7K4.js +3 -0
- package/dist/{thread-bindings-DU4T6nDo.js → thread-bindings-DJ_HT6GJ.js} +4 -4
- package/dist/{thread-bindings.discord-api-CYkr-3Gj.js → thread-bindings.discord-api-OPyjvgyz.js} +4 -4
- package/dist/{thread-bindings.manager-BqWs1UE2.js → thread-bindings.manager-Cd2HAVw_.js} +3 -3
- package/dist/{transcripts-source-D-lBI5ZD.js → transcripts-source-CPf5gURy.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-xr05bL-r.js → typing-DY0cwLdg.js} +1 -1
- package/node_modules/undici/docs/docs/api/Client.md +25 -8
- 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/api/readable.js +33 -43
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/connect.js +16 -2
- package/node_modules/undici/lib/core/symbols.js +3 -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 +9 -1
- package/node_modules/undici/lib/dispatcher/client-h2.js +221 -12
- package/node_modules/undici/lib/dispatcher/client.js +76 -30
- 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 +37 -8
- 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 +106 -22
- 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 +155 -32
- package/node_modules/undici/lib/interceptor/cache.js +65 -9
- 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 +217 -27
- package/node_modules/undici/lib/util/cache.js +43 -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/lib/web/websocket/websocket.js +22 -0
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +50 -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/npm-shrinkwrap.json +7 -7
- package/package.json +6 -5
- package/dist/pluralkit-DI6RYaVj.js +0 -24
- package/dist/provider.runtime-CaTJrpnl.js +0 -2
- package/dist/runtime-api.monitor-CRiBIQEI.js +0 -6
- package/dist/targets-C6yd3y8R.js +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt } from "./send.receipt-
|
|
2
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
1
|
+
import { o as normalizeDiscordOutboundTarget, s as chunkDiscordTextWithMode, t as createDiscordSendReceipt } from "./send.receipt-Cli6_9Sn.js";
|
|
2
|
+
import { d as readDiscordComponentSpec } from "./components-_s5UPJqU.js";
|
|
3
3
|
import { n as notifyDiscordInboundEventOutboundPayloadSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -50,11 +50,11 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
50
50
|
let discordComponentSendPromise;
|
|
51
51
|
let discordSharedInteractivePromise;
|
|
52
52
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
53
|
-
discordComponentSendPromise ??= import("./send.components-
|
|
53
|
+
discordComponentSendPromise ??= import("./send.components-COkDUO3B.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
|
|
54
54
|
return await (await discordComponentSendPromise)(...args);
|
|
55
55
|
}
|
|
56
56
|
function loadDiscordSharedInteractive() {
|
|
57
|
-
discordSharedInteractivePromise ??= import("./components-
|
|
57
|
+
discordSharedInteractivePromise ??= import("./components-_s5UPJqU.js").then((n) => n.a);
|
|
58
58
|
return discordSharedInteractivePromise;
|
|
59
59
|
}
|
|
60
60
|
function addPayloadTextFallback(spec, payload) {
|
|
@@ -89,7 +89,7 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
89
89
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
90
90
|
let discordSendRuntimePromise;
|
|
91
91
|
async function loadDiscordSendRuntime() {
|
|
92
|
-
discordSendRuntimePromise ??= import("./send-
|
|
92
|
+
discordSendRuntimePromise ??= import("./send-Bb295iHT.js").then((n) => n.t);
|
|
93
93
|
return await discordSendRuntimePromise;
|
|
94
94
|
}
|
|
95
95
|
function resolveDiscordOutboundTarget(params) {
|
|
@@ -239,7 +239,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
|
|
|
239
239
|
}
|
|
240
240
|
let discordThreadBindingsPromise;
|
|
241
241
|
function loadDiscordThreadBindings() {
|
|
242
|
-
discordThreadBindingsPromise ??= import("./thread-bindings-
|
|
242
|
+
discordThreadBindingsPromise ??= import("./thread-bindings-DJ_HT6GJ.js").then((n) => n.t);
|
|
243
243
|
return discordThreadBindingsPromise;
|
|
244
244
|
}
|
|
245
245
|
function resolveDiscordWebhookIdentity(params) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Cli6_9Sn.js";
|
|
2
|
+
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
3
|
+
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
4
|
+
import { buildTimeoutAbortSignal } from "openclaw/plugin-sdk/extension-shared";
|
|
5
|
+
//#region extensions/discord/src/pluralkit.ts
|
|
6
|
+
var pluralkit_exports = /* @__PURE__ */ __exportAll({ fetchPluralKitMessageInfo: () => fetchPluralKitMessageInfo });
|
|
7
|
+
const PLURALKIT_API_BASE = "https://api.pluralkit.me/v2";
|
|
8
|
+
const PLURALKIT_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
|
|
9
|
+
const PLURALKIT_LOOKUP_TIMEOUT_MS = 1e4;
|
|
10
|
+
async function fetchPluralKitMessageInfo(params) {
|
|
11
|
+
if (!params.config?.enabled) return null;
|
|
12
|
+
const fetchImpl = resolveFetch(params.fetcher);
|
|
13
|
+
if (!fetchImpl) return null;
|
|
14
|
+
const headers = {};
|
|
15
|
+
if (params.config.token?.trim()) headers.Authorization = params.config.token.trim();
|
|
16
|
+
const url = `${PLURALKIT_API_BASE}/messages/${params.messageId}`;
|
|
17
|
+
const timeout = buildTimeoutAbortSignal({
|
|
18
|
+
signal: params.signal,
|
|
19
|
+
timeoutMs: PLURALKIT_LOOKUP_TIMEOUT_MS,
|
|
20
|
+
operation: "discord.pluralkit.lookup",
|
|
21
|
+
url
|
|
22
|
+
});
|
|
23
|
+
try {
|
|
24
|
+
const res = await fetchImpl(url, {
|
|
25
|
+
headers,
|
|
26
|
+
signal: timeout.signal
|
|
27
|
+
});
|
|
28
|
+
if (res.status === 404) return null;
|
|
29
|
+
if (!res.ok) {
|
|
30
|
+
const text = await readResponseTextLimited(res, PLURALKIT_ERROR_BODY_LIMIT_BYTES).catch(() => "");
|
|
31
|
+
const detail = text.trim() ? `: ${text.trim()}` : "";
|
|
32
|
+
throw new Error(`PluralKit API failed (${res.status})${detail}`);
|
|
33
|
+
}
|
|
34
|
+
return await readProviderJsonResponse(res, "PluralKit message");
|
|
35
|
+
} finally {
|
|
36
|
+
timeout.cleanup();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { pluralkit_exports as n, fetchPluralKitMessageInfo as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { p as normalizeDiscordToken } from "./accounts-P19jm1lf.js";
|
|
2
|
-
import { n as
|
|
2
|
+
import { n as DiscordApiError, r as fetchDiscord } from "./api-1GXlSrYP.js";
|
|
3
3
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
|
+
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
5
6
|
import { fetchWithTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
6
7
|
//#region extensions/discord/src/probe.ts
|
|
7
8
|
const DISCORD_API_BASE = "https://discord.com/api/v10";
|
|
@@ -78,7 +79,7 @@ async function probeDiscord(token, timeoutMs, opts) {
|
|
|
78
79
|
elapsedMs: Date.now() - started
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
|
-
const json = await res.
|
|
82
|
+
const json = await readProviderJsonResponse(res, "discord.probe.getMe");
|
|
82
83
|
result.ok = true;
|
|
83
84
|
result.bot = {
|
|
84
85
|
id: json.id ?? null,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
1
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcgZIpyF.js";
|
|
2
2
|
export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, resolveDiscordPrivilegedIntentsFromFlags };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { $ as BaseMessageInteractiveComponent, A as User, B as Container, D as CommandWithSubcommands, E as Command, F as Modal, J as Separator, K as Row, O as Guild, R as Button, S as RateLimitError, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, c as discord_exports, ct as createThread, d as MessageReactionAddListener, dt as editChannel, f as MessageReactionRemoveListener, g as ThreadUpdateListener, k as Message, l as InteractionCreateListener, m as ReadyListener, mt as getChannelMessage, p as PresenceUpdateListener, s as chunkDiscordTextWithMode, u as MessageCreateListener, v as Client, y as Plugin } from "./send.receipt-
|
|
1
|
+
import { $ as BaseMessageInteractiveComponent, A as User, B as Container, D as CommandWithSubcommands, E as Command, F as Modal, J as Separator, K as Row, O as Guild, R as Button, S as RateLimitError, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, c as discord_exports, ct as createThread, d as MessageReactionAddListener, dt as editChannel, f as MessageReactionRemoveListener, g as ThreadUpdateListener, k as Message, l as InteractionCreateListener, m as ReadyListener, mt as getChannelMessage, p as PresenceUpdateListener, s as chunkDiscordTextWithMode, u as MessageCreateListener, v as Client, y as Plugin } from "./send.receipt-Cli6_9Sn.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-
|
|
4
|
-
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-
|
|
3
|
+
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-_s5UPJqU.js";
|
|
4
|
+
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-COkDUO3B.js";
|
|
5
5
|
import { i as setPresence } from "./presence-cache-z1N8MbJ3.js";
|
|
6
|
-
import { H as validateDiscordProxyUrl, K as registerGateway, L as createDiscordRestClient, O as canViewDiscordGuildChannel, U as withValidatedDiscordProxy, V as DISCORD_REST_TIMEOUT_MS, q as unregisterGateway } from "./send.shared-
|
|
7
|
-
import { a as
|
|
6
|
+
import { H as validateDiscordProxyUrl, K as registerGateway, L as createDiscordRestClient, O as canViewDiscordGuildChannel, U as withValidatedDiscordProxy, V as DISCORD_REST_TIMEOUT_MS, q as unregisterGateway } from "./send.shared-BCG7MWnP.js";
|
|
7
|
+
import { a as isDiscordRateLimitResponseBody, o as summarizeDiscordResponseBody } from "./api-1GXlSrYP.js";
|
|
8
8
|
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, v as shouldEmitDiscordReactionNotification, y as formatDiscordReactionEmoji } from "./allow-list-C-MqM-B_.js";
|
|
9
|
-
import { s as sendVoiceMessageDiscord } from "./send-
|
|
10
|
-
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
+
import { s as sendVoiceMessageDiscord } from "./send-Bb295iHT.js";
|
|
10
|
+
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-B_sk0hNe.js";
|
|
11
11
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
12
|
-
import { a as getDiscordExecApprovalApprovers, s as isDiscordExecApprovalClientEnabled, t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
12
|
+
import { a as getDiscordExecApprovalApprovers, s as isDiscordExecApprovalClientEnabled, t as resolveDiscordConversationIdentity } from "./conversation-identity-B0k94-bz.js";
|
|
13
13
|
import { d as withAbortTimeout, l as raceWithTimeout } from "./timeouts-C5TBc_9x.js";
|
|
14
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
15
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
16
|
-
import { _ as formatThreadBindingDurationLabel, a as isThreadArchived, d as resolveDiscordChannelNameSafe, f as resolveDiscordChannelParentIdSafe, l as resolveDiscordChannelIdSafe, m as resolveDiscordChannelTopicSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
17
|
-
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
18
|
-
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
14
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels--oE-RnO6.js";
|
|
15
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QXo8CXBU.js";
|
|
16
|
+
import { _ as formatThreadBindingDurationLabel, a as isThreadArchived, d as resolveDiscordChannelNameSafe, f as resolveDiscordChannelParentIdSafe, l as resolveDiscordChannelIdSafe, m as resolveDiscordChannelTopicSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-OPyjvgyz.js";
|
|
17
|
+
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcgZIpyF.js";
|
|
18
|
+
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText, u as resolveDiscordChannelInfo } from "./message-utils-Dbuw27gd.js";
|
|
19
19
|
import { t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
20
|
-
import "./approval-handler.runtime-
|
|
20
|
+
import "./approval-handler.runtime-Dv4p7REU.js";
|
|
21
21
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
22
22
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, normalizeStringEntries, normalizeStringEntriesLower, summarizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
23
23
|
import { buildAgentSessionKey, deriveLastRoutePolicy, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, resolveAgentIdFromSessionKey, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -5023,6 +5023,7 @@ const DEFAULT_GATEWAY_URL = "wss://gateway.discord.gg/";
|
|
|
5023
5023
|
const DISCORD_GATEWAY_PAYLOAD_LIMIT_BYTES = 4096;
|
|
5024
5024
|
const INVALID_SESSION_MIN_DELAY_MS = 1e3;
|
|
5025
5025
|
const INVALID_SESSION_JITTER_MS = 4e3;
|
|
5026
|
+
const RESUME_FAILURE_THRESHOLD = 3;
|
|
5026
5027
|
function ensureGatewayParams(url) {
|
|
5027
5028
|
const parsed = new URL(url);
|
|
5028
5029
|
parsed.searchParams.set("v", parsed.searchParams.get("v") ?? "10");
|
|
@@ -5049,6 +5050,7 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5049
5050
|
this.sessionId = null;
|
|
5050
5051
|
this.resumeGatewayUrl = null;
|
|
5051
5052
|
this.reconnectAttempts = 0;
|
|
5053
|
+
this.consecutiveResumeFailures = 0;
|
|
5052
5054
|
this.shouldReconnect = false;
|
|
5053
5055
|
this.isConnecting = false;
|
|
5054
5056
|
this.heartbeatTimers = new GatewayHeartbeatTimers();
|
|
@@ -5114,6 +5116,7 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5114
5116
|
this.isConnecting = false;
|
|
5115
5117
|
this.isConnected = false;
|
|
5116
5118
|
this.reconnectAttempts = 0;
|
|
5119
|
+
this.consecutiveResumeFailures = 0;
|
|
5117
5120
|
}
|
|
5118
5121
|
createWebSocket(url) {
|
|
5119
5122
|
return new ws.WebSocket(url);
|
|
@@ -5151,7 +5154,11 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5151
5154
|
}
|
|
5152
5155
|
const canResume = canResumeAfterGatewayClose(closeCode);
|
|
5153
5156
|
if (!canResume) this.resetSessionState();
|
|
5154
|
-
this.scheduleReconnect(
|
|
5157
|
+
this.scheduleReconnect({
|
|
5158
|
+
reason: "close",
|
|
5159
|
+
preferResume: canResume,
|
|
5160
|
+
closeCode
|
|
5161
|
+
});
|
|
5155
5162
|
});
|
|
5156
5163
|
socket.on("error", (error) => {
|
|
5157
5164
|
if (socket !== this.ws) return;
|
|
@@ -5161,20 +5168,22 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5161
5168
|
handlePayload(payload, resume, sourceSocket) {
|
|
5162
5169
|
if (payload.s !== null && payload.s !== void 0) this.sequence = payload.s;
|
|
5163
5170
|
switch (payload.op) {
|
|
5164
|
-
case GatewayOpcodes.Hello:
|
|
5171
|
+
case GatewayOpcodes.Hello: {
|
|
5165
5172
|
this.startHeartbeat(payload.d.heartbeat_interval ?? 45e3);
|
|
5166
|
-
|
|
5173
|
+
const resumeState = resume ? this.getResumeState() : null;
|
|
5174
|
+
if (resumeState) this.send({
|
|
5167
5175
|
op: GatewayOpcodes.Resume,
|
|
5168
5176
|
d: {
|
|
5169
5177
|
token: this.client?.options.token ?? "",
|
|
5170
|
-
session_id:
|
|
5171
|
-
seq:
|
|
5178
|
+
session_id: resumeState.sessionId,
|
|
5179
|
+
seq: resumeState.sequence
|
|
5172
5180
|
}
|
|
5173
5181
|
}, true);
|
|
5174
5182
|
else this.identifyWithConcurrency(sourceSocket).catch((error) => {
|
|
5175
5183
|
this.emitter.emit("error", error instanceof Error ? error : new Error(String(error), { cause: error }));
|
|
5176
5184
|
});
|
|
5177
5185
|
break;
|
|
5186
|
+
}
|
|
5178
5187
|
case GatewayOpcodes.HeartbeatAck:
|
|
5179
5188
|
this.lastHeartbeatAck = true;
|
|
5180
5189
|
break;
|
|
@@ -5188,10 +5197,17 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5188
5197
|
break;
|
|
5189
5198
|
case GatewayOpcodes.InvalidSession:
|
|
5190
5199
|
if (!payload.d) this.resetSessionState();
|
|
5191
|
-
this.scheduleReconnect(
|
|
5200
|
+
this.scheduleReconnect({
|
|
5201
|
+
reason: "invalid-session",
|
|
5202
|
+
preferResume: payload.d,
|
|
5203
|
+
minDelayMs: INVALID_SESSION_MIN_DELAY_MS + Math.floor(Math.random() * INVALID_SESSION_JITTER_MS)
|
|
5204
|
+
});
|
|
5192
5205
|
break;
|
|
5193
5206
|
case GatewayOpcodes.Reconnect:
|
|
5194
|
-
this.scheduleReconnect(
|
|
5207
|
+
this.scheduleReconnect({
|
|
5208
|
+
reason: "reconnect-opcode",
|
|
5209
|
+
preferResume: true
|
|
5210
|
+
});
|
|
5195
5211
|
break;
|
|
5196
5212
|
}
|
|
5197
5213
|
}
|
|
@@ -5202,7 +5218,10 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5202
5218
|
onHeartbeat: () => this.sendHeartbeat(),
|
|
5203
5219
|
onAckTimeout: () => {
|
|
5204
5220
|
this.emitter.emit("error", /* @__PURE__ */ new Error("Gateway heartbeat ACK timeout"));
|
|
5205
|
-
this.scheduleReconnect(
|
|
5221
|
+
this.scheduleReconnect({
|
|
5222
|
+
reason: "zombie",
|
|
5223
|
+
preferResume: true
|
|
5224
|
+
});
|
|
5206
5225
|
}
|
|
5207
5226
|
});
|
|
5208
5227
|
}
|
|
@@ -5243,7 +5262,10 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5243
5262
|
const socket = sourceSocket ?? this.ws;
|
|
5244
5263
|
if (!socket || socket !== this.ws) return;
|
|
5245
5264
|
if (socket.readyState !== READY_STATE_OPEN) {
|
|
5246
|
-
this.scheduleReconnect(
|
|
5265
|
+
this.scheduleReconnect({
|
|
5266
|
+
reason: "identify",
|
|
5267
|
+
preferResume: false
|
|
5268
|
+
});
|
|
5247
5269
|
return;
|
|
5248
5270
|
}
|
|
5249
5271
|
this.identify();
|
|
@@ -5265,10 +5287,12 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5265
5287
|
this.sessionId = ready.session_id ?? null;
|
|
5266
5288
|
this.resumeGatewayUrl = ready.resume_gateway_url ?? null;
|
|
5267
5289
|
this.reconnectAttempts = 0;
|
|
5290
|
+
this.consecutiveResumeFailures = 0;
|
|
5268
5291
|
this.isConnected = true;
|
|
5269
5292
|
}
|
|
5270
5293
|
if (payload.t === GatewayDispatchEvents.Resumed) {
|
|
5271
5294
|
this.reconnectAttempts = 0;
|
|
5295
|
+
this.consecutiveResumeFailures = 0;
|
|
5272
5296
|
this.isConnected = true;
|
|
5273
5297
|
}
|
|
5274
5298
|
dispatchVoiceGatewayEvent(this.client, payload.t, payload.d);
|
|
@@ -5280,8 +5304,15 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5280
5304
|
this.sessionId = null;
|
|
5281
5305
|
this.resumeGatewayUrl = null;
|
|
5282
5306
|
this.sequence = null;
|
|
5307
|
+
this.consecutiveResumeFailures = 0;
|
|
5283
5308
|
}
|
|
5284
|
-
|
|
5309
|
+
getResumeState() {
|
|
5310
|
+
return this.sessionId && this.sequence !== null ? {
|
|
5311
|
+
sessionId: this.sessionId,
|
|
5312
|
+
sequence: this.sequence
|
|
5313
|
+
} : null;
|
|
5314
|
+
}
|
|
5315
|
+
scheduleReconnect(options) {
|
|
5285
5316
|
if (!this.shouldReconnect) return;
|
|
5286
5317
|
this.stopHeartbeat();
|
|
5287
5318
|
this.stopReconnectTimer();
|
|
@@ -5293,12 +5324,21 @@ var GatewayPlugin = class extends Plugin {
|
|
|
5293
5324
|
this.reconnectAttempts += 1;
|
|
5294
5325
|
if (this.reconnectAttempts > (this.options.reconnect?.maxAttempts ?? 50)) {
|
|
5295
5326
|
const maxAttempts = this.options.reconnect?.maxAttempts ?? 50;
|
|
5296
|
-
this.emitter.emit("error", /* @__PURE__ */ new Error(`Max reconnect attempts (${maxAttempts}) reached${closeCode !== void 0 ? ` after close code ${closeCode}` : ""}`));
|
|
5327
|
+
this.emitter.emit("error", /* @__PURE__ */ new Error(`Max reconnect attempts (${maxAttempts}) reached${options.closeCode !== void 0 ? ` after close code ${options.closeCode}` : ""}`));
|
|
5297
5328
|
return;
|
|
5298
5329
|
}
|
|
5299
|
-
|
|
5330
|
+
let shouldResume = options.preferResume && this.getResumeState() !== null;
|
|
5331
|
+
if (shouldResume && this.consecutiveResumeFailures >= RESUME_FAILURE_THRESHOLD) {
|
|
5332
|
+
this.resetSessionState();
|
|
5333
|
+
shouldResume = false;
|
|
5334
|
+
this.emitter.emit("debug", `Gateway forcing fresh IDENTIFY after ${RESUME_FAILURE_THRESHOLD} failed resume attempts`);
|
|
5335
|
+
}
|
|
5336
|
+
if (shouldResume) this.consecutiveResumeFailures += 1;
|
|
5337
|
+
else this.consecutiveResumeFailures = 0;
|
|
5338
|
+
const delay = Math.max(options.minDelayMs ?? 0, Math.min(3e4, 1e3 * 2 ** Math.min(this.reconnectAttempts, 5)));
|
|
5339
|
+
this.emitter.emit("debug", `Gateway reconnect scheduled in ${delay}ms (${options.reason}, resume=${String(shouldResume)})`);
|
|
5300
5340
|
this.reconnectTimer.schedule(delay, () => {
|
|
5301
|
-
this.connect(
|
|
5341
|
+
this.connect(shouldResume);
|
|
5302
5342
|
});
|
|
5303
5343
|
}
|
|
5304
5344
|
updatePresence(data) {
|
|
@@ -8001,7 +8041,7 @@ async function loadConversationRuntime$1() {
|
|
|
8001
8041
|
return await conversationRuntimePromise$1;
|
|
8002
8042
|
}
|
|
8003
8043
|
async function loadTypingRuntime() {
|
|
8004
|
-
typingRuntimePromise ??= import("./typing-
|
|
8044
|
+
typingRuntimePromise ??= import("./typing-DY0cwLdg.js").then((n) => n.n);
|
|
8005
8045
|
return await typingRuntimePromise;
|
|
8006
8046
|
}
|
|
8007
8047
|
function buildDiscordComponentConversationLabel(params) {
|
|
@@ -8422,7 +8462,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
8422
8462
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
8423
8463
|
let componentsRuntimePromise;
|
|
8424
8464
|
async function loadComponentsRuntime() {
|
|
8425
|
-
componentsRuntimePromise ??= import("./components-
|
|
8465
|
+
componentsRuntimePromise ??= import("./components-_s5UPJqU.js").then((n) => n.t);
|
|
8426
8466
|
return await componentsRuntimePromise;
|
|
8427
8467
|
}
|
|
8428
8468
|
async function handleDiscordComponentEvent(params) {
|
|
@@ -9642,7 +9682,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
9642
9682
|
gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
|
|
9643
9683
|
if (params.voiceManager) {
|
|
9644
9684
|
await params.voiceManager.destroy();
|
|
9645
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
9685
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CPf5gURy.js").then((n) => n.n);
|
|
9646
9686
|
setDiscordTranscriptsVoiceManager({
|
|
9647
9687
|
accountId: params.accountId,
|
|
9648
9688
|
manager: null
|
|
@@ -9920,7 +9960,7 @@ function logDiscordStartupPhase(params) {
|
|
|
9920
9960
|
});
|
|
9921
9961
|
}
|
|
9922
9962
|
async function loadDiscordVoiceRuntime() {
|
|
9923
|
-
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-
|
|
9963
|
+
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-BZVdGX2d.js");
|
|
9924
9964
|
discordVoiceRuntimePromise = promise;
|
|
9925
9965
|
try {
|
|
9926
9966
|
return await promise;
|
|
@@ -9930,7 +9970,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
9930
9970
|
}
|
|
9931
9971
|
}
|
|
9932
9972
|
async function loadDiscordProviderSessionRuntime() {
|
|
9933
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
9973
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-reBWkqHZ.js");
|
|
9934
9974
|
discordProviderSessionRuntimePromise = promise;
|
|
9935
9975
|
try {
|
|
9936
9976
|
return await promise;
|
|
@@ -10201,7 +10241,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10201
10241
|
runtime,
|
|
10202
10242
|
botUserId
|
|
10203
10243
|
});
|
|
10204
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
10244
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-CPf5gURy.js").then((n) => n.n);
|
|
10205
10245
|
setDiscordTranscriptsVoiceManager({
|
|
10206
10246
|
accountId: account.accountId,
|
|
10207
10247
|
manager: voiceManager
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-
|
|
2
|
-
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
3
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
1
|
+
import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DJ_HT6GJ.js";
|
|
2
|
+
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-Cd2HAVw_.js";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-DZd9Bpq8.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,9 +1,9 @@
|
|
|
1
1
|
import { p as normalizeDiscordToken } from "./accounts-P19jm1lf.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as fetchDiscord } from "./api-1GXlSrYP.js";
|
|
3
3
|
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
|
4
4
|
//#region extensions/discord/src/guilds.ts
|
|
5
|
-
async function listGuilds(token, fetcher) {
|
|
6
|
-
return (await fetchDiscord("/users/@me/guilds", token, fetcher)).filter((guild) => typeof guild.id === "string" && typeof guild.name === "string").map((guild) => ({
|
|
5
|
+
async function listGuilds(token, fetcher, options) {
|
|
6
|
+
return (await fetchDiscord("/users/@me/guilds", token, fetcher, options)).filter((guild) => typeof guild.id === "string" && typeof guild.name === "string").map((guild) => ({
|
|
7
7
|
id: guild.id,
|
|
8
8
|
name: guild.name,
|
|
9
9
|
slug: normalizeDiscordSlug(guild.name)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
2
|
-
import { n as fetchDiscord, t as
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Cli6_9Sn.js";
|
|
2
|
+
import { n as DiscordApiError, r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-1GXlSrYP.js";
|
|
3
3
|
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
|
4
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
4
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-D7bZqAw3.js";
|
|
5
5
|
//#region extensions/discord/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
|
|
7
7
|
function parseDiscordChannelInput(raw) {
|
|
@@ -45,7 +45,7 @@ function parseDiscordChannelInput(raw) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
async function listGuildChannels(token, fetcher, guildId) {
|
|
48
|
-
return (await fetchDiscord(`/guilds/${guildId}/channels`, token, fetcher)).map((channel) => {
|
|
48
|
+
return (await fetchDiscord(`/guilds/${guildId}/channels`, token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS })).map((channel) => {
|
|
49
49
|
const archived = channel.thread_metadata?.archived;
|
|
50
50
|
return {
|
|
51
51
|
id: typeof channel.id === "string" ? channel.id : "",
|
|
@@ -59,7 +59,7 @@ async function listGuildChannels(token, fetcher, guildId) {
|
|
|
59
59
|
async function fetchChannel(token, fetcher, channelId) {
|
|
60
60
|
let raw;
|
|
61
61
|
try {
|
|
62
|
-
raw = await fetchDiscord(`/channels/${channelId}`, token, fetcher);
|
|
62
|
+
raw = await fetchDiscord(`/channels/${channelId}`, token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS });
|
|
63
63
|
} catch (err) {
|
|
64
64
|
if (err instanceof DiscordApiError && err.status === 403) return { status: "forbidden" };
|
|
65
65
|
if (err instanceof DiscordApiError && err.status === 404) return { status: "not-found" };
|
|
@@ -95,7 +95,7 @@ async function resolveDiscordChannelAllowlist(params) {
|
|
|
95
95
|
resolved: false
|
|
96
96
|
}));
|
|
97
97
|
const fetcher = params.fetcher ?? fetch;
|
|
98
|
-
const guilds = await listGuilds(token, fetcher);
|
|
98
|
+
const guilds = await listGuilds(token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS });
|
|
99
99
|
const channelsByGuild = /* @__PURE__ */ new Map();
|
|
100
100
|
const getChannels = (guildId) => {
|
|
101
101
|
const existing = channelsByGuild.get(guildId);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
2
|
-
import {
|
|
3
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Cli6_9Sn.js";
|
|
2
|
+
import { r as fetchDiscord, t as DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS } from "./api-1GXlSrYP.js";
|
|
3
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-D7bZqAw3.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/discord/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });
|
|
@@ -52,7 +52,7 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
52
52
|
const fetcher = params.fetcher ?? fetch;
|
|
53
53
|
let guilds = null;
|
|
54
54
|
const getGuilds = async () => {
|
|
55
|
-
if (!guilds) guilds = await listGuilds(token, fetcher);
|
|
55
|
+
if (!guilds) guilds = await listGuilds(token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS });
|
|
56
56
|
return guilds;
|
|
57
57
|
};
|
|
58
58
|
const results = [];
|
|
@@ -85,7 +85,7 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
85
85
|
query,
|
|
86
86
|
limit: "25"
|
|
87
87
|
});
|
|
88
|
-
const members = await fetchDiscord(`/guilds/${guild.id}/members/search?${paramsObj.toString()}`, token, fetcher);
|
|
88
|
+
const members = await fetchDiscord(`/guilds/${guild.id}/members/search?${paramsObj.toString()}`, token, fetcher, { timeoutMs: DISCORD_DIRECTORY_LOOKUP_TIMEOUT_MS });
|
|
89
89
|
for (const member of members) {
|
|
90
90
|
const score = scoreDiscordMember(member, query);
|
|
91
91
|
if (score === 0) continue;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-Cli6_9Sn.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, o as resolveDefaultDiscordAccountId, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
4
|
-
import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-_s5UPJqU.js";
|
|
4
|
+
import { _ as withNormalizedTimestamp, c as jsonResult, d as readNonNegativeIntegerParam, f as readPositiveIntegerParam, g as resolvePollMaxSelections, h as readStringParam, l as parseAvailableTags, m as readStringArrayParam, p as readReactionParams, r as sendDiscordComponentMessage, s as assertMediaNotDataUrl, u as readBooleanParam } from "./send.components-COkDUO3B.js";
|
|
5
5
|
import { n as getPresence } from "./presence-cache-z1N8MbJ3.js";
|
|
6
|
-
import { D as canManageGuildRoleDiscord, E as canManageGuildMemberRoleDiscord, G as getGateway, M as hasAnyChannelPermissionDiscord, N as hasAnyGuildPermissionDiscord, P as isThreadChannelType$1, R as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId, k as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
6
|
+
import { D as canManageGuildRoleDiscord, E as canManageGuildMemberRoleDiscord, G as getGateway, M as hasAnyChannelPermissionDiscord, N as hasAnyGuildPermissionDiscord, P as isThreadChannelType$1, R as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId, k as fetchChannelPermissionsDiscord } from "./send.shared-BCG7MWnP.js";
|
|
7
7
|
import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy } from "./allow-list-C-MqM-B_.js";
|
|
8
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-
|
|
9
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
10
|
-
import "./targets-
|
|
8
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, l as DiscordThreadInitialMessageError, m as listPinsDiscord, n as fetchReactionsDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, w as fetchGuildInfoDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-Bb295iHT.js";
|
|
9
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-B_sk0hNe.js";
|
|
10
|
+
import "./targets-Q-ZoP7K4.js";
|
|
11
11
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { ChannelType, PermissionFlagsBits } from "discord-api-types/v10";
|
|
13
13
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
2
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
1
|
+
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CF7ramAs.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-JziPEcBU.js";
|
|
3
3
|
export { discordMessageActions, handleDiscordAction, isDiscordModerationAction, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, requiredGuildPermissionForModerationAction };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
1
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-_s5UPJqU.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-COkDUO3B.js";
|
|
3
3
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
4
|
-
import { A as fetchMemberGuildPermissionsDiscord, G as getGateway, K as registerGateway, N as hasAnyGuildPermissionDiscord, T as DiscordSendError, W as clearGateways, j as hasAllGuildPermissionsDiscord, k as fetchChannelPermissionsDiscord, q as unregisterGateway } from "./send.shared-
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
4
|
+
import { A as fetchMemberGuildPermissionsDiscord, G as getGateway, K as registerGateway, N as hasAnyGuildPermissionDiscord, T as DiscordSendError, W as clearGateways, j as hasAllGuildPermissionsDiscord, k as fetchChannelPermissionsDiscord, q as unregisterGateway } from "./send.shared-BCG7MWnP.js";
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-DBTsSRxl.js";
|
|
6
6
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-C-MqM-B_.js";
|
|
7
|
-
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-
|
|
8
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
9
|
-
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
7
|
+
import { A as listScheduledEventsDiscord, B as moveChannelDiscord, C as fetchChannelInfoDiscord, D as fetchVoiceStatusDiscord, E as fetchRoleInfoDiscord, F as uploadEmojiDiscord, H as setChannelPermissionDiscord, I as uploadStickerDiscord, L as createChannelDiscord, M as resolveEventCoverImage, N as timeoutMemberDiscord, O as kickMemberDiscord, P as listGuildEmojisDiscord, R as deleteChannelDiscord, S as createScheduledEventDiscord, T as fetchMemberInfoDiscord, V as removeChannelPermissionDiscord, _ as readMessagesDiscord, a as removeReactionDiscord, b as addRoleDiscord, c as sendWebhookMessageDiscord, d as deleteMessageDiscord, f as editMessageDiscord, g as pinMessageDiscord, h as listThreadsDiscord, i as removeOwnReactionsDiscord, j as removeRoleDiscord, k as listGuildChannelsDiscord, m as listPinsDiscord, n as fetchReactionsDiscord, o as sendTypingDiscord, p as fetchMessageDiscord, r as reactMessageDiscord, s as sendVoiceMessageDiscord, u as createThreadDiscord, v as searchMessagesDiscord, x as banMemberDiscord, y as unpinMessageDiscord, z as editChannelDiscord } from "./send-Bb295iHT.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-B_sk0hNe.js";
|
|
9
|
+
import { a as readDiscordChannelCreateParams, c as readDiscordParentIdParam, i as requiredGuildPermissionForModerationAction, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-CF7ramAs.js";
|
|
10
10
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
11
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
11
|
+
import { t as discordMessageActions } from "./channel-actions-JziPEcBU.js";
|
|
12
12
|
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-iSWjCYjB.js";
|
|
13
13
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
14
14
|
import { a as isAbortError, c as normalizeDiscordListenerTimeoutMs, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordInboundWorkerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, u as runDiscordTaskWithTimeout } from "./timeouts-C5TBc_9x.js";
|
|
15
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
16
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
17
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
18
|
-
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-
|
|
19
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
20
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
15
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels--oE-RnO6.js";
|
|
16
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QXo8CXBU.js";
|
|
17
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-OPyjvgyz.js";
|
|
18
|
+
import { a as reconcileAcpThreadBindingsOnStartup, c as resolveDiscordThreadBindingMaxAgeMs, i as listThreadBindingsForAccount, l as resolveThreadBindingsEnabled, n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey, s as resolveDiscordThreadBindingIdleTimeoutMs } from "./thread-bindings-DJ_HT6GJ.js";
|
|
19
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-Cd2HAVw_.js";
|
|
20
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcgZIpyF.js";
|
|
21
21
|
import "./runtime-api.actions.js";
|
|
22
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
22
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-DEVi9nIs.js";
|
|
23
23
|
import "./runtime-api.lookup.js";
|
|
24
|
-
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-
|
|
25
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
26
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
27
|
-
import "./runtime-api.monitor-
|
|
24
|
+
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-CwwSXIIj.js";
|
|
25
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-Dbuw27gd.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-DZd9Bpq8.js";
|
|
27
|
+
import "./runtime-api.monitor-CzF8MUl_.js";
|
|
28
28
|
import "./runtime-api.send.js";
|
|
29
29
|
import "./runtime-api.threads.js";
|
|
30
30
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DiscordSendError, testing as __testing, testing, addRoleDiscord, allowListMatches, auditDiscordChannelPermissions, autoBindSpawnedDiscordSubagent, banMemberDiscord, buildDiscordMediaPayload, clearGateways, clearPresences, collectDiscordAuditChannelIds, createChannelDiscord, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, createNoopThreadBindingManager, createScheduledEventDiscord, createThreadBindingManager, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, discordMessageActions, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, formatThreadBindingDurationLabel, getGateway, getPresence, getThreadBindingManager, handleDiscordAction, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, isAbortError, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, parseApplicationIdFromToken, pinMessageDiscord, presenceCacheSize, probeDiscord, reactMessageDiscord, readDiscordChannelCreateParams, readDiscordChannelEditParams, readDiscordChannelMoveParams, readDiscordModerationCommand, readDiscordParentIdParam, readMessagesDiscord, reconcileAcpThreadBindingsOnStartup, registerBuiltDiscordComponentMessage, registerDiscordListener, registerGateway, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, requiredGuildPermissionForModerationAction, resolveDiscordChannelAllowlist, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordOutboundSessionRoute, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveDiscordUserAllowlist, resolveEventCoverImage, resolveGroupDmAllow, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, setDiscordRuntime, setPresence, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, shouldEmitDiscordReactionNotification, timeoutMemberDiscord, unbindThreadBindingsBySessionKey, unpinMessageDiscord, unregisterGateway, uploadEmojiDiscord, uploadStickerDiscord, waitForDiscordGatewayPluginRegistration };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-DBTsSRxl.js";
|
|
2
2
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
3
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
4
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
5
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
6
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels--oE-RnO6.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QXo8CXBU.js";
|
|
5
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcgZIpyF.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-DEVi9nIs.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as setPresence, n as getPresence, r as presenceCacheSize, t as clearPresences } from "./presence-cache-z1N8MbJ3.js";
|
|
2
|
-
import { G as getGateway, K as registerGateway, W as clearGateways, q as unregisterGateway } from "./send.shared-
|
|
2
|
+
import { G as getGateway, K as registerGateway, W as clearGateways, q as unregisterGateway } from "./send.shared-BCG7MWnP.js";
|
|
3
3
|
import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, g as resolveDiscordShouldRequireMention, n as isDiscordGroupAllowedByPolicy, r as normalizeDiscordAllowList, s as resolveDiscordChannelConfig, t as allowListMatches, u as resolveDiscordCommandAuthorized, v as shouldEmitDiscordReactionNotification } from "./allow-list-C-MqM-B_.js";
|
|
4
4
|
import { a as isAbortError, c as normalizeDiscordListenerTimeoutMs, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, o as mergeAbortSignals, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, s as normalizeDiscordInboundWorkerTimeoutMs, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, u as runDiscordTaskWithTimeout } from "./timeouts-C5TBc_9x.js";
|
|
5
|
-
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-
|
|
6
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
7
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
8
|
-
import "./runtime-api.monitor-
|
|
5
|
+
import { E as sanitizeDiscordThreadName, c as createDiscordGatewayPlugin, f as createDiscordNativeCommand, l as resolveDiscordGatewayIntents, t as monitorDiscordProvider, u as waitForDiscordGatewayPluginRegistration, w as resolveDiscordReplyTarget, x as registerDiscordListener } from "./provider-CwwSXIIj.js";
|
|
6
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-Dbuw27gd.js";
|
|
7
|
+
import { t as createDiscordMessageHandler } from "./message-handler-DZd9Bpq8.js";
|
|
8
|
+
import "./runtime-api.monitor-CzF8MUl_.js";
|
|
9
9
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, allowListMatches, buildDiscordMediaPayload, clearGateways, clearPresences, createDiscordGatewayPlugin, createDiscordMessageHandler, createDiscordNativeCommand, getGateway, getPresence, isAbortError, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordInboundWorkerTimeoutMs, normalizeDiscordListenerTimeoutMs, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, runDiscordTaskWithTimeout, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
|