@openclaw/discord 2026.5.31-beta.2 → 2026.5.31-beta.4
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/{allow-list-BnkWtVpA.js → allow-list-C-MqM-B_.js} +1 -1
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-DSFfzXpo.js → approval-handler.runtime-DQiJ1Z0k.js} +3 -3
- package/dist/{audit-kgIklCyI.js → audit-eI8e8RpG.js} +3 -3
- package/dist/{channel-D0gX0yj6.js → channel-W1HBHzdw.js} +20 -20
- package/dist/{channel-actions-DDoc4V7x.js → channel-actions-BaPDAWN_.js} +2 -2
- package/dist/{channel-actions.runtime-CqZfnMaA.js → channel-actions.runtime-BEMDJjP1.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BNZm3eed.js → channel.setup-BX7g7pL-.js} +3 -3
- package/dist/{components-DcLQ2JkV.js → components-CCbYVuVr.js} +66 -27
- package/dist/contract-api.js +3 -3
- package/dist/{conversation-identity-BURFgcfI.js → conversation-identity-CEP1KbK0.js} +2 -2
- package/dist/{directory-config-B9Jw1Q2R.js → directory-config-j1bfTue_.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CDWUg-nA.js → directory-live-BjBs64RV.js} +2 -2
- package/dist/{doctor-BUhqxLb9.js → doctor-D3ngpo-Y.js} +2 -2
- package/dist/{doctor-contract-BAu3WLvd.js → doctor-contract-CU7lnZTF.js} +2 -2
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{handle-action.guild-admin-Dpa-kUzu.js → handle-action.guild-admin-CqUsOA2L.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/legacy-state-migrations-api.js +39 -6
- package/dist/{manager.runtime-BWBENHRA.js → manager.runtime-CVB9_dwq.js} +51 -45
- package/dist/{message-handler-HO8BbZmQ.js → message-handler-CQGpWQ0f.js} +6 -6
- package/dist/{message-handler.preflight-DxHBPQvD.js → message-handler.preflight-B9aZ9jQD.js} +14 -14
- package/dist/{message-handler.process-Cq3j7A9k.js → message-handler.process-DrLZOgzG.js} +18 -17
- package/dist/{message-utils-D_3KTxh_.js → message-utils-ZTGvA2L8.js} +1 -3
- package/dist/{outbound-adapter-BkPkILpq.js → outbound-adapter-Bt6-9M13.js} +6 -6
- package/dist/{pluralkit-Ds9aZAM4.js → pluralkit-BEEldePl.js} +1 -1
- package/dist/{provider-BK8hjk_y.js → provider-BTp6enEl.js} +53 -96
- package/dist/{provider-session.runtime-CYMFlLg9.js → provider-session.runtime-CC2f_W1j.js} +3 -3
- package/dist/provider.runtime-DUQJvWin.js +2 -0
- package/dist/{resolve-allowlist-common-BIf3417N.js → resolve-allowlist-common-B3p7cT8F.js} +1 -1
- package/dist/{resolve-channels-DK-3f_aA.js → resolve-channels-DLNfxFQP.js} +3 -3
- package/dist/{resolve-users-DUDPsfWt.js → resolve-users-QTyD8qgI.js} +2 -2
- package/dist/{runtime-Blf_d9E7.js → runtime-Dds0Ww1n.js} +8 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +21 -21
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-BkA-vJZA.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 +5 -5
- package/dist/{send-BHkA8a-k.js → send-CyyRF1yd.js} +3 -3
- package/dist/{send.components-CUHzDapa.js → send.components-a9JQeeH5.js} +4 -4
- package/dist/{send.outbound-DSKZbjML.js → send.outbound-DhMLobqR.js} +3 -3
- package/dist/{send.receipt-CjsWpitW.js → send.receipt-Z8V6yMOY.js} +38 -11
- package/dist/{send.shared-Cluujl6W.js → send.shared-B3QxPnR3.js} +5 -5
- package/dist/{sender-identity-BFp5w0F8.js → sender-identity-CEsfDF0L.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-BMGLQw74.js → shared-D11J9bXI.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{subagent-hooks-7jAn9HT5.js → subagent-hooks-nBcp0iGm.js} +2 -2
- package/dist/{system-events-BjuNA9Zs.js → system-events-NnSID6Q5.js} +2 -2
- package/dist/{target-resolver-BYuWNVQp.js → target-resolver-BKGK0ftO.js} +2 -2
- package/dist/targets-Cv797U29.js +3 -0
- package/dist/{thread-bindings-CKruJE91.js → thread-bindings-Tfr_vFxk.js} +6 -6
- package/dist/{thread-bindings.discord-api-BjLUwwSP.js → thread-bindings.discord-api-CfDs1lWu.js} +5 -5
- package/dist/{thread-bindings.manager-Dji7SZHG.js → thread-bindings.manager-CRc4hYr1.js} +20 -21
- package/dist/{thread-bindings.session-updates-DoDFvU_h.js → thread-bindings.session-updates-DeMxmcXB.js} +1 -1
- package/dist/{thread-bindings.state-DYp4FVEB.js → thread-bindings.state-CVLF7gJH.js} +48 -22
- package/dist/{transcripts-source-O73_YIDs.js → transcripts-source-Cegx0wdw.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CKW0i8du.js → typing-C7RXECnL.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/provider.runtime-RfQSSM_v.js +0 -2
- package/dist/runtime-api.monitor-LVbgPRHA.js +0 -6
- package/dist/targets-BNDUOdvI.js +0 -3
|
@@ -1,29 +1,29 @@
|
|
|
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-Z8V6yMOY.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-CCbYVuVr.js";
|
|
4
|
+
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-a9JQeeH5.js";
|
|
5
5
|
import { c as setPresence, i as unregisterGateway, r as registerGateway } from "./gateway-registry-DPxmW0Db.js";
|
|
6
|
-
import { B as DISCORD_REST_TIMEOUT_MS, D as canViewDiscordGuildChannel, H as withValidatedDiscordProxy, I as createDiscordRestClient, V as validateDiscordProxyUrl } from "./send.shared-
|
|
6
|
+
import { B as DISCORD_REST_TIMEOUT_MS, D as canViewDiscordGuildChannel, H as withValidatedDiscordProxy, I as createDiscordRestClient, V as validateDiscordProxyUrl } from "./send.shared-B3QxPnR3.js";
|
|
7
7
|
import { a as summarizeDiscordResponseBody, i as isDiscordRateLimitResponseBody } from "./api-BmXlcjYW.js";
|
|
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-
|
|
9
|
-
import { s as sendVoiceMessageDiscord } from "./send-
|
|
10
|
-
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-
|
|
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-CyyRF1yd.js";
|
|
10
|
+
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-DhMLobqR.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-
|
|
13
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
14
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
15
|
-
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-
|
|
12
|
+
import { a as getDiscordExecApprovalApprovers, s as isDiscordExecApprovalClientEnabled, t as resolveDiscordConversationIdentity } from "./conversation-identity-CEP1KbK0.js";
|
|
13
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-DLNfxFQP.js";
|
|
14
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QTyD8qgI.js";
|
|
15
|
+
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-CfDs1lWu.js";
|
|
16
16
|
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
17
17
|
import { o as raceWithTimeout, s as withAbortTimeout } from "./timeouts-CEJ3--Uw.js";
|
|
18
|
-
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
19
|
-
import { t as resolveDiscordSenderIdentity } from "./sender-identity-
|
|
20
|
-
import "./approval-handler.runtime-
|
|
18
|
+
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText, u as resolveDiscordChannelInfo } from "./message-utils-ZTGvA2L8.js";
|
|
19
|
+
import { t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
20
|
+
import "./approval-handler.runtime-DQiJ1Z0k.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";
|
|
24
24
|
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
25
25
|
import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes } from "discord-api-types/v10";
|
|
26
|
-
import { MAX_DATE_TIMESTAMP_MS, asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, parseStrictInteger, parseStrictNonNegativeInteger, parseStrictPositiveInteger, resolveDateTimestampMs, resolveTimestampMsToIsoString
|
|
26
|
+
import { MAX_DATE_TIMESTAMP_MS, asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, parseStrictInteger, parseStrictNonNegativeInteger, parseStrictPositiveInteger, resolveDateTimestampMs, resolveTimestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
27
27
|
import { createHash, randomUUID } from "node:crypto";
|
|
28
28
|
import path from "node:path";
|
|
29
29
|
import { resolvePinnedMainDmOwnerFromAllowlist as resolvePinnedMainDmOwnerFromAllowlist$1 } from "openclaw/plugin-sdk/security-runtime";
|
|
@@ -44,8 +44,6 @@ import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1 } from "
|
|
|
44
44
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
45
45
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
46
46
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
47
|
-
import { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store";
|
|
48
|
-
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
49
47
|
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
50
48
|
import { buildPairingReply, upsertChannelPairingRequest, upsertChannelPairingRequest as upsertChannelPairingRequest$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
51
49
|
import { clearExpiredCooldowns, ensureAuthProfileStore, isProfileInCooldown, resolveAgentAvatar, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -67,7 +65,6 @@ import * as pluginRuntime from "openclaw/plugin-sdk/plugin-runtime";
|
|
|
67
65
|
import { createInteractiveConversationBindingHelpers, dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime";
|
|
68
66
|
import { dispatchReplyWithDispatcher, finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
|
|
69
67
|
import * as conversationRuntime from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
70
|
-
import os from "node:os";
|
|
71
68
|
import { createConnectedChannelStatusPatch, createTransportActivityStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
72
69
|
import { EventEmitter } from "node:events";
|
|
73
70
|
import * as ws from "ws";
|
|
@@ -78,6 +75,7 @@ import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runti
|
|
|
78
75
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
79
76
|
import { stripPlainTextToolCallBlocks } from "openclaw/plugin-sdk/tool-payload";
|
|
80
77
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
78
|
+
import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
|
|
81
79
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
82
80
|
import { Agent as Agent$1, fetch as fetch$1 } from "undici";
|
|
83
81
|
//#region extensions/discord/src/monitor/listeners.queue.ts
|
|
@@ -1370,7 +1368,7 @@ async function deliverDiscordInteractionReply(params) {
|
|
|
1370
1368
|
let hasReplied = false;
|
|
1371
1369
|
const sendMessage = async (content, files, components) => {
|
|
1372
1370
|
const contentPayload = content ? { content } : {};
|
|
1373
|
-
const
|
|
1371
|
+
const payloadLocal = files && files.length > 0 ? {
|
|
1374
1372
|
...contentPayload,
|
|
1375
1373
|
...components ? { components } : {},
|
|
1376
1374
|
...params.responseEphemeral !== void 0 ? { ephemeral: params.responseEphemeral } : {},
|
|
@@ -1392,12 +1390,12 @@ async function deliverDiscordInteractionReply(params) {
|
|
|
1392
1390
|
};
|
|
1393
1391
|
await safeDiscordInteractionCall("interaction send", async () => {
|
|
1394
1392
|
if (!preferFollowUp && !hasReplied) {
|
|
1395
|
-
await interaction.reply(
|
|
1393
|
+
await interaction.reply(payloadLocal);
|
|
1396
1394
|
hasReplied = true;
|
|
1397
1395
|
firstMessageComponents = void 0;
|
|
1398
1396
|
return;
|
|
1399
1397
|
}
|
|
1400
|
-
await interaction.followUp(
|
|
1398
|
+
await interaction.followUp(payloadLocal);
|
|
1401
1399
|
hasReplied = true;
|
|
1402
1400
|
firstMessageComponents = void 0;
|
|
1403
1401
|
});
|
|
@@ -2229,11 +2227,8 @@ function createDiscordCommandArgFallbackButton$1(params) {
|
|
|
2229
2227
|
//#region extensions/discord/src/monitor/model-picker-preferences.ts
|
|
2230
2228
|
const DEFAULT_RECENT_LIMIT = 5;
|
|
2231
2229
|
const PREFERENCE_MAX_ENTRIES = 2e3;
|
|
2232
|
-
const MAX_PLUGIN_STATE_KEY_BYTES = 512;
|
|
2233
|
-
const textEncoder = new TextEncoder();
|
|
2234
2230
|
let lastPreferenceTimestampMs = 0;
|
|
2235
2231
|
let lastPreferenceOrder = 0;
|
|
2236
|
-
const legacyPreferenceImports = /* @__PURE__ */ new Map();
|
|
2237
2232
|
function openPreferenceStore(env) {
|
|
2238
2233
|
return getDiscordRuntime().state.openKeyedStore({
|
|
2239
2234
|
namespace: "model-picker-preferences",
|
|
@@ -2274,14 +2269,6 @@ function sanitizeRecentModels(models, limit) {
|
|
|
2274
2269
|
}
|
|
2275
2270
|
return deduped;
|
|
2276
2271
|
}
|
|
2277
|
-
function sanitizeLegacyPreferenceEntry(value) {
|
|
2278
|
-
if (!value || typeof value !== "object") return;
|
|
2279
|
-
const typedValue = value;
|
|
2280
|
-
return {
|
|
2281
|
-
recent: Array.isArray(typedValue.recent) ? typedValue.recent.filter((item) => typeof item === "string") : [],
|
|
2282
|
-
updatedAt: typeof typedValue.updatedAt === "string" ? typedValue.updatedAt : ""
|
|
2283
|
-
};
|
|
2284
|
-
}
|
|
2285
2272
|
function sanitizeStoredPreferenceEntry(value) {
|
|
2286
2273
|
if (!value || typeof value !== "object") return;
|
|
2287
2274
|
const typedValue = value;
|
|
@@ -2311,10 +2298,6 @@ function timestampOrder(value) {
|
|
|
2311
2298
|
function comparePreferenceEntries(left, right) {
|
|
2312
2299
|
return timestampMs(right.value.updatedAt) - timestampMs(left.value.updatedAt) || timestampOrder(right.value.updatedOrder) - timestampOrder(left.value.updatedOrder) || left.key.localeCompare(right.key);
|
|
2313
2300
|
}
|
|
2314
|
-
function legacyUpdatedAtForIndex(updatedAt, index, total) {
|
|
2315
|
-
const baseMs = timestampMs(updatedAt);
|
|
2316
|
-
return timestampMsToIsoString(Math.min(baseMs + Math.max(0, total), MAX_DATE_TIMESTAMP_MS) - Math.max(0, index)) ?? timestampMsToIsoString(baseMs) ?? timestampMsToIsoString(Math.max(0, total - index)) ?? "1970-01-01T00:00:00.000Z";
|
|
2317
|
-
}
|
|
2318
2301
|
function nextPreferenceTimestamp(existingEntries) {
|
|
2319
2302
|
const existingMaxTimestampMs = existingEntries.reduce((max, entry) => Math.max(max, timestampMs(entry.updatedAt)), 0);
|
|
2320
2303
|
lastPreferenceTimestampMs = Math.min(Math.max(resolveDateTimestampMs(Date.now(), 0), lastPreferenceTimestampMs + 1, existingMaxTimestampMs + 1), MAX_DATE_TIMESTAMP_MS);
|
|
@@ -2325,53 +2308,11 @@ function nextPreferenceTimestamp(existingEntries) {
|
|
|
2325
2308
|
updatedOrder: lastPreferenceOrder
|
|
2326
2309
|
};
|
|
2327
2310
|
}
|
|
2328
|
-
function normalizeLegacyPreferenceKey(key) {
|
|
2329
|
-
const trimmed = key.trim();
|
|
2330
|
-
if (!trimmed || textEncoder.encode(trimmed).length > MAX_PLUGIN_STATE_KEY_BYTES) return;
|
|
2331
|
-
return trimmed;
|
|
2332
|
-
}
|
|
2333
|
-
function resolveLegacyPreferencesPath(env) {
|
|
2334
|
-
return path.join(resolveStateDir(env ?? process.env, os.homedir), "discord", "model-picker-preferences.json");
|
|
2335
|
-
}
|
|
2336
|
-
async function importLegacyPreferences(env) {
|
|
2337
|
-
const legacyPath = resolveLegacyPreferencesPath(env);
|
|
2338
|
-
const stateDir = path.dirname(path.dirname(legacyPath));
|
|
2339
|
-
const existingImport = legacyPreferenceImports.get(stateDir);
|
|
2340
|
-
if (existingImport) {
|
|
2341
|
-
await existingImport;
|
|
2342
|
-
return;
|
|
2343
|
-
}
|
|
2344
|
-
const importPromise = (async () => {
|
|
2345
|
-
const { value, exists } = await readJsonFileWithFallback(legacyPath, null);
|
|
2346
|
-
if (!exists || !value || typeof value.entries !== "object" || value.entries == null) return;
|
|
2347
|
-
const store = openPreferenceStore(env);
|
|
2348
|
-
for (const [rawKey, rawEntry] of Object.entries(value.entries)) {
|
|
2349
|
-
const key = normalizeLegacyPreferenceKey(rawKey);
|
|
2350
|
-
if (!key) continue;
|
|
2351
|
-
const entry = sanitizeLegacyPreferenceEntry(rawEntry);
|
|
2352
|
-
if (!entry || entry.recent.length === 0 && !entry.updatedAt) continue;
|
|
2353
|
-
const recent = sanitizeRecentModels(entry.recent, 10);
|
|
2354
|
-
for (const [index, modelRef] of recent.entries()) await store.registerIfAbsent(buildPreferenceModelKey(key, modelRef), {
|
|
2355
|
-
scopeKey: key,
|
|
2356
|
-
modelRef,
|
|
2357
|
-
updatedAt: legacyUpdatedAtForIndex(entry.updatedAt, index, recent.length)
|
|
2358
|
-
});
|
|
2359
|
-
}
|
|
2360
|
-
})();
|
|
2361
|
-
legacyPreferenceImports.set(stateDir, importPromise);
|
|
2362
|
-
try {
|
|
2363
|
-
await importPromise;
|
|
2364
|
-
} catch (error) {
|
|
2365
|
-
legacyPreferenceImports.delete(stateDir);
|
|
2366
|
-
throw error;
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
2311
|
async function readDiscordModelPickerRecentModels(params) {
|
|
2370
2312
|
const key = buildDiscordModelPickerPreferenceKey(params.scope);
|
|
2371
2313
|
if (!key) return [];
|
|
2372
2314
|
const limit = Math.max(1, Math.min(params.limit ?? DEFAULT_RECENT_LIMIT, 10));
|
|
2373
2315
|
try {
|
|
2374
|
-
await importLegacyPreferences(params.env);
|
|
2375
2316
|
const recent = (await openPreferenceStore(params.env).entries()).map((entry) => ({
|
|
2376
2317
|
key: entry.key,
|
|
2377
2318
|
value: sanitizeStoredPreferenceEntry(entry.value)
|
|
@@ -2387,7 +2328,6 @@ async function recordDiscordModelPickerRecentModel(params) {
|
|
|
2387
2328
|
const normalizedModelRef = normalizeModelRef(params.modelRef);
|
|
2388
2329
|
if (!key || !normalizedModelRef) return;
|
|
2389
2330
|
try {
|
|
2390
|
-
await importLegacyPreferences(params.env);
|
|
2391
2331
|
const store = openPreferenceStore(params.env);
|
|
2392
2332
|
const timestamp = nextPreferenceTimestamp((await store.entries()).map((entry) => sanitizeStoredPreferenceEntry(entry.value)).filter((entry) => entry?.scopeKey === key));
|
|
2393
2333
|
await store.register(buildPreferenceModelKey(key, normalizedModelRef), {
|
|
@@ -3406,7 +3346,9 @@ async function applyDiscordModelPickerSelection(params) {
|
|
|
3406
3346
|
noticeMessage: `❌ Failed to apply ${params.resolvedModelRef}. Try /model ${params.resolvedModelRef} directly.`
|
|
3407
3347
|
};
|
|
3408
3348
|
const fallbackRoute = dispatchResult.effectiveRoute ?? params.route;
|
|
3409
|
-
if (params.settleMs > 0) await new Promise((resolve) =>
|
|
3349
|
+
if (params.settleMs > 0) await new Promise((resolve) => {
|
|
3350
|
+
setTimeout(resolve, params.settleMs);
|
|
3351
|
+
});
|
|
3410
3352
|
let effectiveModelRef = params.resolveCurrentModel(fallbackRoute);
|
|
3411
3353
|
let persisted = effectiveModelRef === params.resolvedModelRef;
|
|
3412
3354
|
if (params.selectedRuntime?.trim()) {
|
|
@@ -3418,7 +3360,9 @@ async function applyDiscordModelPickerSelection(params) {
|
|
|
3418
3360
|
isDefault: params.selectedProvider === params.defaultProvider && params.selectedModel === params.defaultModel,
|
|
3419
3361
|
runtime: params.selectedRuntime
|
|
3420
3362
|
});
|
|
3421
|
-
await new Promise((resolve) =>
|
|
3363
|
+
await new Promise((resolve) => {
|
|
3364
|
+
setTimeout(resolve, 100);
|
|
3365
|
+
});
|
|
3422
3366
|
effectiveModelRef = params.resolveCurrentModel(fallbackRoute);
|
|
3423
3367
|
persisted = effectiveModelRef === params.resolvedModelRef;
|
|
3424
3368
|
}
|
|
@@ -3433,7 +3377,9 @@ async function applyDiscordModelPickerSelection(params) {
|
|
|
3433
3377
|
isDefault: params.selectedProvider === params.defaultProvider && params.selectedModel === params.defaultModel,
|
|
3434
3378
|
runtime: params.selectedRuntime
|
|
3435
3379
|
});
|
|
3436
|
-
await new Promise((resolve) =>
|
|
3380
|
+
await new Promise((resolve) => {
|
|
3381
|
+
setTimeout(resolve, 100);
|
|
3382
|
+
});
|
|
3437
3383
|
effectiveModelRef = params.resolveCurrentModel(fallbackRoute);
|
|
3438
3384
|
persisted = effectiveModelRef === params.resolvedModelRef;
|
|
3439
3385
|
if (!persisted) logVerbose(`discord: direct session override persist failed — expected ${params.resolvedModelRef} but read ${effectiveModelRef} from session key ${fallbackRoute.sessionKey}`);
|
|
@@ -5526,7 +5472,7 @@ function createDiscordAutoPresenceController(params) {
|
|
|
5526
5472
|
let lastAppliedSignature = null;
|
|
5527
5473
|
let lastAppliedAt = 0;
|
|
5528
5474
|
const runEvaluation = (options) => {
|
|
5529
|
-
let decision
|
|
5475
|
+
let decision;
|
|
5530
5476
|
try {
|
|
5531
5477
|
decision = resolveDiscordAutoPresenceDecision({
|
|
5532
5478
|
discordConfig: params.discordConfig,
|
|
@@ -6749,7 +6695,7 @@ function formatDiscordDeployErrorDetails(err) {
|
|
|
6749
6695
|
if (typeof status === "number") details.push(`status=${status}`);
|
|
6750
6696
|
if (typeof discordCode === "number" || typeof discordCode === "string") details.push(`code=${discordCode}`);
|
|
6751
6697
|
if (rawBody !== void 0) {
|
|
6752
|
-
let bodyText
|
|
6698
|
+
let bodyText;
|
|
6753
6699
|
try {
|
|
6754
6700
|
bodyText = JSON.stringify(rawBody);
|
|
6755
6701
|
} catch {
|
|
@@ -7358,10 +7304,10 @@ async function ensureDmComponentAuthorized(params) {
|
|
|
7358
7304
|
allowNameMatching: isDangerousNameMatchingEnabled(ctx.discordConfig),
|
|
7359
7305
|
cfg: ctx.cfg,
|
|
7360
7306
|
token: ctx.token,
|
|
7361
|
-
readStoreAllowFrom: async ({ accountId, dmPolicy }) => await readChannelIngressStoreAllowFromForDmPolicy({
|
|
7307
|
+
readStoreAllowFrom: async ({ accountId, dmPolicy: dmPolicyLocal }) => await readChannelIngressStoreAllowFromForDmPolicy({
|
|
7362
7308
|
provider: "discord",
|
|
7363
7309
|
accountId,
|
|
7364
|
-
dmPolicy
|
|
7310
|
+
dmPolicy: dmPolicyLocal
|
|
7365
7311
|
}),
|
|
7366
7312
|
eventKind: "button"
|
|
7367
7313
|
});
|
|
@@ -7975,7 +7921,7 @@ async function loadConversationRuntime$1() {
|
|
|
7975
7921
|
return await conversationRuntimePromise$1;
|
|
7976
7922
|
}
|
|
7977
7923
|
async function loadTypingRuntime() {
|
|
7978
|
-
typingRuntimePromise ??= import("./typing-
|
|
7924
|
+
typingRuntimePromise ??= import("./typing-C7RXECnL.js").then((n) => n.n);
|
|
7979
7925
|
return await typingRuntimePromise;
|
|
7980
7926
|
}
|
|
7981
7927
|
function buildDiscordComponentConversationLabel(params) {
|
|
@@ -8396,7 +8342,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
8396
8342
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
8397
8343
|
let componentsRuntimePromise;
|
|
8398
8344
|
async function loadComponentsRuntime() {
|
|
8399
|
-
componentsRuntimePromise ??= import("./components-
|
|
8345
|
+
componentsRuntimePromise ??= import("./components-CCbYVuVr.js").then((n) => n.t);
|
|
8400
8346
|
return await componentsRuntimePromise;
|
|
8401
8347
|
}
|
|
8402
8348
|
async function handleDiscordComponentEvent(params) {
|
|
@@ -8467,20 +8413,24 @@ async function handleDiscordComponentEvent(params) {
|
|
|
8467
8413
|
return;
|
|
8468
8414
|
}
|
|
8469
8415
|
const values = params.values ? mapSelectValues(consumed, params.values) : void 0;
|
|
8470
|
-
|
|
8416
|
+
const selectedCallbackData = consumed.kind === "select" && consumed.callbackDataKind === "callback" && params.values?.length === 1 ? params.values[0]?.trim() : void 0;
|
|
8417
|
+
const pluginCallbackData = consumed.callbackData ?? selectedCallbackData;
|
|
8418
|
+
if (pluginCallbackData) {
|
|
8471
8419
|
if (await dispatchPluginDiscordInteractiveEvent({
|
|
8472
8420
|
ctx: params.ctx,
|
|
8473
8421
|
interaction: params.interaction,
|
|
8474
8422
|
interactionCtx,
|
|
8475
8423
|
channelCtx,
|
|
8476
8424
|
isAuthorizedSender: commandAuthorized,
|
|
8477
|
-
data:
|
|
8425
|
+
data: pluginCallbackData,
|
|
8478
8426
|
kind: consumed.kind === "select" ? "select" : "button",
|
|
8479
8427
|
values,
|
|
8480
8428
|
messageId: consumed.messageId ?? params.interaction.message?.id
|
|
8481
8429
|
}) === "handled") return;
|
|
8482
8430
|
}
|
|
8483
|
-
const
|
|
8431
|
+
const buttonCallbackFallback = consumed.kind === "button" && consumed.callbackDataKind !== "callback" ? consumed.callbackData?.trim() : void 0;
|
|
8432
|
+
const selectedCommandFallback = consumed.kind === "select" && consumed.callbackDataKind === "command" && params.values?.length === 1 ? params.values[0]?.trim() : void 0;
|
|
8433
|
+
const eventText = buttonCallbackFallback || selectedCommandFallback || (await loadComponentsRuntime()).formatDiscordComponentEventText({
|
|
8484
8434
|
kind: consumed.kind === "select" ? "select" : "button",
|
|
8485
8435
|
label: consumed.label,
|
|
8486
8436
|
values
|
|
@@ -9216,7 +9166,7 @@ async function waitForDiscordGatewayStop(params) {
|
|
|
9216
9166
|
gateway?.disconnect?.();
|
|
9217
9167
|
} finally {
|
|
9218
9168
|
cleanup();
|
|
9219
|
-
reject(err);
|
|
9169
|
+
reject(toLintErrorObject(err, "Non-Error rejection"));
|
|
9220
9170
|
}
|
|
9221
9171
|
};
|
|
9222
9172
|
const onAbort = () => {
|
|
@@ -9237,6 +9187,13 @@ async function waitForDiscordGatewayStop(params) {
|
|
|
9237
9187
|
params.registerForceStop?.(onForceStop);
|
|
9238
9188
|
});
|
|
9239
9189
|
}
|
|
9190
|
+
function toLintErrorObject(value, fallbackMessage) {
|
|
9191
|
+
if (value instanceof Error) return value;
|
|
9192
|
+
if (typeof value === "string") return new Error(value);
|
|
9193
|
+
const error = new Error(fallbackMessage, { cause: value });
|
|
9194
|
+
if (typeof value === "object" && value !== null || typeof value === "function") Object.assign(error, value);
|
|
9195
|
+
return error;
|
|
9196
|
+
}
|
|
9240
9197
|
//#endregion
|
|
9241
9198
|
//#region extensions/discord/src/monitor/provider.lifecycle.ts
|
|
9242
9199
|
const DEFAULT_DISCORD_GATEWAY_READY_TIMEOUT_MS = 15e3;
|
|
@@ -9603,7 +9560,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
9603
9560
|
gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
|
|
9604
9561
|
if (params.voiceManager) {
|
|
9605
9562
|
await params.voiceManager.destroy();
|
|
9606
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
9563
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Cegx0wdw.js").then((n) => n.n);
|
|
9607
9564
|
setDiscordTranscriptsVoiceManager({
|
|
9608
9565
|
accountId: params.accountId,
|
|
9609
9566
|
manager: null
|
|
@@ -9881,7 +9838,7 @@ function logDiscordStartupPhase(params) {
|
|
|
9881
9838
|
});
|
|
9882
9839
|
}
|
|
9883
9840
|
async function loadDiscordVoiceRuntime() {
|
|
9884
|
-
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-
|
|
9841
|
+
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-CVB9_dwq.js");
|
|
9885
9842
|
discordVoiceRuntimePromise = promise;
|
|
9886
9843
|
try {
|
|
9887
9844
|
return await promise;
|
|
@@ -9891,7 +9848,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
9891
9848
|
}
|
|
9892
9849
|
}
|
|
9893
9850
|
async function loadDiscordProviderSessionRuntime() {
|
|
9894
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
9851
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CC2f_W1j.js");
|
|
9895
9852
|
discordProviderSessionRuntimePromise = promise;
|
|
9896
9853
|
try {
|
|
9897
9854
|
return await promise;
|
|
@@ -10161,7 +10118,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10161
10118
|
runtime,
|
|
10162
10119
|
botUserId
|
|
10163
10120
|
});
|
|
10164
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
10121
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-Cegx0wdw.js").then((n) => n.n);
|
|
10165
10122
|
setDiscordTranscriptsVoiceManager({
|
|
10166
10123
|
accountId: account.accountId,
|
|
10167
10124
|
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-Tfr_vFxk.js";
|
|
2
|
+
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CRc4hYr1.js";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-CQGpWQ0f.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,6 +1,6 @@
|
|
|
1
1
|
import { p as normalizeDiscordToken } from "./accounts-P19jm1lf.js";
|
|
2
2
|
import { n as fetchDiscord } from "./api-BmXlcjYW.js";
|
|
3
|
-
import { a as normalizeDiscordSlug } from "./allow-list-
|
|
3
|
+
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
|
4
4
|
//#region extensions/discord/src/guilds.ts
|
|
5
5
|
async function listGuilds(token, fetcher) {
|
|
6
6
|
return (await fetchDiscord("/users/@me/guilds", token, fetcher)).filter((guild) => typeof guild.id === "string" && typeof guild.name === "string").map((guild) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { n as fetchDiscord, t as DiscordApiError } from "./api-BmXlcjYW.js";
|
|
3
|
-
import { a as normalizeDiscordSlug } from "./allow-list-
|
|
4
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
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-B3p7cT8F.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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-Z8V6yMOY.js";
|
|
2
2
|
import { n as fetchDiscord } from "./api-BmXlcjYW.js";
|
|
3
|
-
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-
|
|
3
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-B3p7cT8F.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 });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-Z8V6yMOY.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-CCbYVuVr.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-a9JQeeH5.js";
|
|
5
5
|
import { n as getGateway, o as getPresence } from "./gateway-registry-DPxmW0Db.js";
|
|
6
|
-
import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-
|
|
7
|
-
import { a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, n as isDiscordGroupAllowedByPolicy } from "./allow-list-
|
|
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-
|
|
6
|
+
import { E as canManageGuildRoleDiscord, L as createDiscordRuntimeAccountContext, M as hasAnyGuildPermissionDiscord, N as isThreadChannelType$1, O as fetchChannelPermissionsDiscord, T as canManageGuildMemberRoleDiscord, d as resolveDiscordTargetChannelId, j as hasAnyChannelPermissionDiscord } from "./send.shared-B3QxPnR3.js";
|
|
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-CyyRF1yd.js";
|
|
9
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DhMLobqR.js";
|
|
10
|
+
import "./targets-Cv797U29.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-Dds0Ww1n.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-BaPDAWN_.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-CCbYVuVr.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-a9JQeeH5.js";
|
|
3
3
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-DPxmW0Db.js";
|
|
4
|
-
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
5
|
-
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-
|
|
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-
|
|
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-
|
|
4
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-B3QxPnR3.js";
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-BjBs64RV.js";
|
|
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-CyyRF1yd.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DhMLobqR.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-Dds0Ww1n.js";
|
|
10
10
|
import { r as setDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
11
|
-
import { t as discordMessageActions } from "./channel-actions-
|
|
12
|
-
import { C as
|
|
13
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
14
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
15
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
16
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
17
|
-
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-
|
|
18
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
11
|
+
import { t as discordMessageActions } from "./channel-actions-BaPDAWN_.js";
|
|
12
|
+
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-CVLF7gJH.js";
|
|
13
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DeMxmcXB.js";
|
|
14
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-DLNfxFQP.js";
|
|
15
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QTyD8qgI.js";
|
|
16
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-CfDs1lWu.js";
|
|
17
|
+
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-Tfr_vFxk.js";
|
|
18
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CRc4hYr1.js";
|
|
19
19
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
20
20
|
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.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-eI8e8RpG.js";
|
|
23
23
|
import "./runtime-api.lookup.js";
|
|
24
|
-
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } 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 { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BTp6enEl.js";
|
|
25
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-ZTGvA2L8.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-CQGpWQ0f.js";
|
|
27
|
+
import "./runtime-api.monitor-BkA-vJZA.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, isDiscordGroupAllowedByPolicy, isDiscordModerationAction, isRecentlyUnboundThreadWebhookMessage, kickMemberDiscord, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadBindingsBySessionKey, listThreadBindingsForAccount, listThreadsDiscord, mergeAbortSignals, monitorDiscordProvider, moveChannelDiscord, normalizeDiscordAllowList, 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, 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-BjBs64RV.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-
|
|
3
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-DLNfxFQP.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-QTyD8qgI.js";
|
|
5
5
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-2MdGjUAf.js";
|
|
6
|
-
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-eI8e8RpG.js";
|
|
7
7
|
export { auditDiscordChannelPermissions, collectDiscordAuditChannelIds, fetchDiscordApplicationId, fetchDiscordApplicationSummary, listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive, parseApplicationIdFromToken, probeDiscord, resolveDiscordChannelAllowlist, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordUserAllowlist, setDiscordRuntime };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as clearPresences, c as setPresence, i as unregisterGateway, n as getGateway, o as getPresence, r as registerGateway, s as presenceCacheSize, t as clearGateways } from "./gateway-registry-DPxmW0Db.js";
|
|
2
|
-
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-
|
|
2
|
+
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";
|
|
3
3
|
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-CEJ3--Uw.js";
|
|
4
|
-
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-
|
|
5
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
6
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
7
|
-
import "./runtime-api.monitor-
|
|
4
|
+
import { C as resolveDiscordReplyTarget, T as sanitizeDiscordThreadName, b as registerDiscordListener, c as resolveDiscordGatewayIntents, d as createDiscordNativeCommand, l as waitForDiscordGatewayPluginRegistration, s as createDiscordGatewayPlugin, t as monitorDiscordProvider } from "./provider-BTp6enEl.js";
|
|
5
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-ZTGvA2L8.js";
|
|
6
|
+
import { t as createDiscordMessageHandler } from "./message-handler-CQGpWQ0f.js";
|
|
7
|
+
import "./runtime-api.monitor-BkA-vJZA.js";
|
|
8
8
|
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, isDiscordGroupAllowedByPolicy, mergeAbortSignals, monitorDiscordProvider, normalizeDiscordAllowList, normalizeDiscordSlug, presenceCacheSize, registerDiscordListener, registerGateway, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGatewayIntents, resolveDiscordGuildEntry, resolveDiscordReplyTarget, resolveDiscordShouldRequireMention, resolveGroupDmAllow, sanitizeDiscordThreadName, setPresence, shouldEmitDiscordReactionNotification, unregisterGateway, waitForDiscordGatewayPluginRegistration };
|
package/dist/runtime-api.send.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
2
|
-
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-
|
|
3
|
-
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-
|
|
4
|
-
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-
|
|
5
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-
|
|
1
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-CCbYVuVr.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-a9JQeeH5.js";
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-B3QxPnR3.js";
|
|
4
|
+
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-CyyRF1yd.js";
|
|
5
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-DhMLobqR.js";
|
|
6
6
|
export { DiscordSendError, addRoleDiscord, banMemberDiscord, createChannelDiscord, createScheduledEventDiscord, createThreadDiscord, deleteChannelDiscord, deleteMessageDiscord, editChannelDiscord, editDiscordComponentMessage, editMessageDiscord, fetchChannelInfoDiscord, fetchChannelPermissionsDiscord, fetchMemberGuildPermissionsDiscord, fetchMemberInfoDiscord, fetchMessageDiscord, fetchReactionsDiscord, fetchRoleInfoDiscord, fetchVoiceStatusDiscord, hasAllGuildPermissionsDiscord, hasAnyGuildPermissionDiscord, kickMemberDiscord, listGuildChannelsDiscord, listGuildEmojisDiscord, listPinsDiscord, listScheduledEventsDiscord, listThreadsDiscord, moveChannelDiscord, pinMessageDiscord, reactMessageDiscord, readMessagesDiscord, registerBuiltDiscordComponentMessage, removeChannelPermissionDiscord, removeOwnReactionsDiscord, removeReactionDiscord, removeRoleDiscord, resolveDiscordOutboundSessionRoute, resolveEventCoverImage, searchMessagesDiscord, sendDiscordComponentMessage, sendMessageDiscord, sendPollDiscord, sendStickerDiscord, sendTypingDiscord, sendVoiceMessageDiscord, sendWebhookMessageDiscord, setChannelPermissionDiscord, timeoutMemberDiscord, unpinMessageDiscord, uploadEmojiDiscord, uploadStickerDiscord };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-
|
|
3
|
-
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-
|
|
4
|
-
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-
|
|
5
|
-
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-
|
|
1
|
+
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-CVLF7gJH.js";
|
|
2
|
+
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-DeMxmcXB.js";
|
|
3
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-CfDs1lWu.js";
|
|
4
|
+
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-Tfr_vFxk.js";
|
|
5
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-CRc4hYr1.js";
|
|
6
6
|
export { testing as __testing, testing, autoBindSpawnedDiscordSubagent, createNoopThreadBindingManager, createThreadBindingManager, formatThreadBindingDurationLabel, getThreadBindingManager, isRecentlyUnboundThreadWebhookMessage, listThreadBindingsBySessionKey, listThreadBindingsForAccount, reconcileAcpThreadBindingsOnStartup, resolveDiscordThreadBindingIdleTimeoutMs, resolveDiscordThreadBindingMaxAgeMs, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingInactivityExpiresAt, resolveThreadBindingIntroText, resolveThreadBindingMaxAgeExpiresAt, resolveThreadBindingMaxAgeMs, resolveThreadBindingPersona, resolveThreadBindingPersonaFromRecord, resolveThreadBindingThreadName, resolveThreadBindingsEnabled, setThreadBindingIdleTimeoutBySessionKey, setThreadBindingMaxAgeBySessionKey, unbindThreadBindingsBySessionKey };
|