@openclaw/discord 2026.6.11-beta.2 → 2026.7.1-beta.1
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-4GFMoWu0.js → api-CJvEMuA6.js} +9 -2
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-SsFtZQA6.js → approval-handler.runtime-DzoY4ufU.js} +3 -3
- package/dist/{audit-CAnmyf2A.js → audit-BXGKCgbA.js} +3 -3
- package/dist/{channel-YA7AbYP3.js → channel-Da36gsaP.js} +15 -15
- package/dist/{channel-actions-BJ3n5Z1l.js → channel-actions-CamohoDF.js} +2 -2
- package/dist/{channel-actions.runtime-D2QTRgZ9.js → channel-actions.runtime-C1y4B9J0.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-B1zDEAR7.js → channel.setup-KhiBHeGT.js} +2 -2
- package/dist/{components-Dm4c_ce6.js → components-CBPNJhVP.js} +1 -1
- package/dist/{conversation-identity-DZ0BD7xO.js → conversation-identity-BEsyd7A1.js} +2 -2
- package/dist/{directory-config-BK1OhHa3.js → directory-config-CouAqvDj.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DP3CmwGf.js → directory-live-C8lwwDJo.js} +2 -2
- package/dist/{handle-action.guild-admin-B2cOoU2D.js → handle-action.guild-admin-zmPNo8TF.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-CPHxr9B3.js → manager.runtime-TLLuQzsA.js} +4 -4
- package/dist/{message-handler-CKaTgBIV.js → message-handler-ClZrgeka.js} +10 -7
- package/dist/{message-handler.preflight--eAiaewz.js → message-handler.preflight-CjnHwEwP.js} +10 -10
- package/dist/{message-handler.process-PhKAmrEd.js → message-handler.process-OruF8JFV.js} +200 -22
- package/dist/{message-utils-O1vK3kPu.js → message-utils-C_tYBSAu.js} +1 -1
- package/dist/{outbound-adapter-fO_7hbTh.js → outbound-adapter-B0iwUl6c.js} +15 -9
- package/dist/{pluralkit-B3MzPaPU.js → pluralkit-DaWTJTmF.js} +3 -3
- package/dist/{probe-CxnDikWm.js → probe-Bkf8mJlj.js} +3 -2
- package/dist/{probe.runtime-DLFkSDVB.js → probe.runtime-3Rerer9g.js} +1 -1
- package/dist/{provider-BJaJ20MY.js → provider-CChQJujf.js} +64 -37
- package/dist/{provider-session.runtime-D6xc-60s.js → provider-session.runtime-Dy71XetI.js} +3 -3
- package/dist/provider.runtime-BiOSsG0m.js +2 -0
- package/dist/{resolve-allowlist-common-BDpBb8dF.js → resolve-allowlist-common-BDNoAQll.js} +1 -1
- package/dist/{resolve-channels-iJIjYfRw.js → resolve-channels-C_rAwrkj.js} +3 -3
- package/dist/{resolve-users-_fv1mm1f.js → resolve-users-Cz1tkemy.js} +3 -3
- package/dist/{runtime-ywXByivr.js → runtime-C-fNslbg.js} +9 -10
- 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-CN1_mmYY.js +6 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-Dc5uQX5H.js → send-BYTToRY1.js} +18 -9
- package/dist/{send.components-D4bl20xr.js → send.components-Cmv2qMB5.js} +4 -4
- package/dist/{send.outbound-5axvwLkl.js → send.outbound-BqvRMxXy.js} +5 -4
- package/dist/{send.receipt-B21MspvT.js → send.receipt-CK162xD0.js} +28 -1
- package/dist/{send.shared-9082A2sO.js → send.shared-YLGCAMjV.js} +2 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{subagent-hooks-NTv6B4up.js → subagent-hooks-cE_tFGCX.js} +2 -2
- package/dist/{system-events-BzaI1WpN.js → system-events-XRYuwB2n.js} +1 -1
- package/dist/{target-resolver-agnOrtOU.js → target-resolver-DYufMbXm.js} +2 -2
- package/dist/targets-BA7gf0K0.js +3 -0
- package/dist/{thread-bindings-DNitaHVh.js → thread-bindings-C1yhwdOw.js} +4 -4
- package/dist/{thread-bindings.discord-api-CjYNuvZa.js → thread-bindings.discord-api-XBJmlLaf.js} +4 -4
- package/dist/{thread-bindings.manager-PZvJ4TJx.js → thread-bindings.manager-BdFs0ot7.js} +3 -3
- package/dist/{transcripts-source-Bi8N6h5X.js → transcripts-source-DW6d1eCL.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-BdRqXUN3.js → typing-BMQEI8OW.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/provider.runtime-jNlHxUSW.js +0 -2
- package/dist/runtime-api.monitor-Bb5AaRzg.js +0 -6
- package/dist/targets-ClUPljCU.js +0 -3
|
@@ -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-CK162xD0.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-CBPNJhVP.js";
|
|
4
|
+
import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-Cmv2qMB5.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-
|
|
7
|
-
import { a as summarizeDiscordResponseBody, i as isDiscordRateLimitResponseBody } from "./api-
|
|
6
|
+
import { B as DISCORD_REST_TIMEOUT_MS, D as canViewDiscordGuildChannel, H as withValidatedDiscordProxy, I as createDiscordRestClient, V as validateDiscordProxyUrl } from "./send.shared-YLGCAMjV.js";
|
|
7
|
+
import { a as summarizeDiscordResponseBody, i as isDiscordRateLimitResponseBody } from "./api-CJvEMuA6.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-BYTToRY1.js";
|
|
10
|
+
import { o as formatMention, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.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-BEsyd7A1.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-C_rAwrkj.js";
|
|
15
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cz1tkemy.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-XBJmlLaf.js";
|
|
17
|
+
import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bkf8mJlj.js";
|
|
18
|
+
import { d as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText, u as resolveDiscordChannelInfo } from "./message-utils-C_tYBSAu.js";
|
|
19
19
|
import { t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
20
|
-
import "./approval-handler.runtime-
|
|
20
|
+
import "./approval-handler.runtime-DzoY4ufU.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";
|
|
@@ -39,6 +39,7 @@ import { createNonExitingRuntime, createSubsystemLogger, danger, formatDurationS
|
|
|
39
39
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
40
40
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
41
41
|
import { chunkItems, sanitizeAssistantVisibleText, sanitizeAssistantVisibleTextWithProfile } from "openclaw/plugin-sdk/text-chunking";
|
|
42
|
+
import { sliceUtf16Safe, truncateUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
42
43
|
import { buildOutboundSessionContext, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled, sendDurableMessageBatch } from "openclaw/plugin-sdk/channel-outbound";
|
|
43
44
|
import { fetchWithSsrFGuard, formatErrorMessage as formatErrorMessage$1 } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
44
45
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -47,7 +48,6 @@ import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plu
|
|
|
47
48
|
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
48
49
|
import { buildPairingReply, upsertChannelPairingRequest, upsertChannelPairingRequest as upsertChannelPairingRequest$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
49
50
|
import { clearExpiredCooldowns, ensureAuthProfileStore, formatReasoningMessage, isProfileInCooldown, loadModelCatalog, resolveAgentAvatar, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
|
|
50
|
-
import { truncateUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
51
51
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
52
52
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
53
53
|
import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared";
|
|
@@ -56,7 +56,7 @@ import { createChannelIngressResolver, defineStableChannelIngressIdentity, readC
|
|
|
56
56
|
import { applyModelOverrideToSessionEntry, resolveChannelModelOverride } from "openclaw/plugin-sdk/model-session-runtime";
|
|
57
57
|
import { completeWithPreparedSimpleCompletionModel, extractAssistantText, prepareSimpleCompletionModelForAgent } from "openclaw/plugin-sdk/simple-completion-runtime";
|
|
58
58
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
59
|
-
import { getSessionEntry, listSessionEntries,
|
|
59
|
+
import { getSessionEntry, listSessionEntries, patchSessionEntry, readSessionUpdatedAt as readSessionUpdatedAt$1, resolveStorePath, resolveStorePath as resolveStorePath$1 } from "openclaw/plugin-sdk/session-store-runtime";
|
|
60
60
|
import { formatInboundEnvelope, resolveEnvelopeFormatOptions, runChannelInboundEvent } from "openclaw/plugin-sdk/channel-inbound";
|
|
61
61
|
import { buildCommandTextFromArgs, findCommandByNativeName, formatCommandArgMenuTitle, listChatCommands, listNativeCommandSpecsForConfig, listSkillCommandsForAgents, resolveCommandAuthorizedFromAuthorizers, resolveNativeCommandSessionTargets, resolveStoredModelOverride, serializeCommandArgs } from "openclaw/plugin-sdk/command-auth-native";
|
|
62
62
|
import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNativeName as findCommandByNativeName$1, parseCommandArgs, resolveCommandArgChoices, resolveCommandArgMenu, serializeCommandArgs as serializeCommandArgs$1 } from "openclaw/plugin-sdk/native-command-registry";
|
|
@@ -391,14 +391,21 @@ function stripThreadTitleWrappers(raw) {
|
|
|
391
391
|
while (current && current !== previous) {
|
|
392
392
|
previous = current;
|
|
393
393
|
current = current.replace(/^["'`]+|["'`]+$/g, "").trim();
|
|
394
|
-
current = current
|
|
395
|
-
current = current
|
|
396
|
-
current = current
|
|
397
|
-
current = current
|
|
398
|
-
current = current
|
|
394
|
+
current = stripBalancedWrapper(current, "**");
|
|
395
|
+
current = stripBalancedWrapper(current, "__");
|
|
396
|
+
current = stripBalancedWrapper(current, "*");
|
|
397
|
+
current = stripBalancedWrapper(current, "_");
|
|
398
|
+
current = stripBalancedWrapper(current, "~~");
|
|
399
399
|
}
|
|
400
400
|
return current;
|
|
401
401
|
}
|
|
402
|
+
function stripBalancedWrapper(text, marker) {
|
|
403
|
+
if (text.length < marker.length * 2 + 1) return text;
|
|
404
|
+
if (!text.startsWith(marker) || !text.endsWith(marker)) return text;
|
|
405
|
+
const inner = text.slice(marker.length, text.length - marker.length);
|
|
406
|
+
if (!inner || inner.includes(marker)) return text;
|
|
407
|
+
return inner;
|
|
408
|
+
}
|
|
402
409
|
function normalizeTitleContextField(raw, maxChars) {
|
|
403
410
|
const value = raw?.trim();
|
|
404
411
|
if (!value) return;
|
|
@@ -3240,7 +3247,7 @@ function formatRecentsButtonLabel(modelRef, suffix) {
|
|
|
3240
3247
|
const maxLen = 80;
|
|
3241
3248
|
const label = suffix ? `${modelRef} ${suffix}` : modelRef;
|
|
3242
3249
|
if (label.length <= maxLen) return label;
|
|
3243
|
-
return suffix ? `${modelRef
|
|
3250
|
+
return suffix ? `${sliceUtf16Safe(modelRef, 0, maxLen - suffix.length - 2)}… ${suffix}` : `${sliceUtf16Safe(modelRef, 0, maxLen - 1)}…`;
|
|
3244
3251
|
}
|
|
3245
3252
|
function renderDiscordModelPickerRecentsView(params) {
|
|
3246
3253
|
const defaultModelRef = `${params.data.resolvedDefault.provider}/${params.data.resolvedDefault.model}`;
|
|
@@ -3524,11 +3531,16 @@ async function resolveDiscordNativeChoiceContext(params) {
|
|
|
3524
3531
|
cfg: params.cfg,
|
|
3525
3532
|
agentId: route.agentId
|
|
3526
3533
|
});
|
|
3527
|
-
const
|
|
3528
|
-
const sessionEntry = sessionStore[route.sessionKey];
|
|
3534
|
+
const storePath = resolveStorePath(params.cfg.session?.store, { agentId: route.agentId });
|
|
3529
3535
|
const override = resolveStoredModelOverride({
|
|
3530
|
-
sessionEntry
|
|
3531
|
-
|
|
3536
|
+
sessionEntry: getSessionEntry({
|
|
3537
|
+
storePath,
|
|
3538
|
+
sessionKey: route.sessionKey
|
|
3539
|
+
}),
|
|
3540
|
+
loadSessionEntry: (sessionKey) => getSessionEntry({
|
|
3541
|
+
storePath,
|
|
3542
|
+
sessionKey
|
|
3543
|
+
}),
|
|
3532
3544
|
sessionKey: route.sessionKey,
|
|
3533
3545
|
defaultProvider: fallback.provider
|
|
3534
3546
|
});
|
|
@@ -3547,11 +3559,18 @@ async function resolveDiscordNativeChoiceContext(params) {
|
|
|
3547
3559
|
function resolveDiscordModelPickerCurrentModel(params) {
|
|
3548
3560
|
const fallback = buildDiscordModelPickerCurrentModel(params.data.resolvedDefault.provider, params.data.resolvedDefault.model);
|
|
3549
3561
|
try {
|
|
3550
|
-
const
|
|
3551
|
-
const sessionEntry = sessionStore[params.route.sessionKey];
|
|
3562
|
+
const storePath = resolveStorePath(params.cfg.session?.store, { agentId: params.route.agentId });
|
|
3552
3563
|
const override = resolveStoredModelOverride({
|
|
3553
|
-
sessionEntry
|
|
3554
|
-
|
|
3564
|
+
sessionEntry: getSessionEntry({
|
|
3565
|
+
storePath,
|
|
3566
|
+
sessionKey: params.route.sessionKey,
|
|
3567
|
+
readConsistency: "latest"
|
|
3568
|
+
}),
|
|
3569
|
+
loadSessionEntry: (sessionKey) => getSessionEntry({
|
|
3570
|
+
storePath,
|
|
3571
|
+
sessionKey,
|
|
3572
|
+
readConsistency: "latest"
|
|
3573
|
+
}),
|
|
3555
3574
|
sessionKey: params.route.sessionKey,
|
|
3556
3575
|
defaultProvider: params.data.resolvedDefault.provider
|
|
3557
3576
|
});
|
|
@@ -3565,7 +3584,11 @@ function resolveDiscordModelPickerCurrentModel(params) {
|
|
|
3565
3584
|
}
|
|
3566
3585
|
function resolveDiscordModelPickerCurrentRuntime(params) {
|
|
3567
3586
|
try {
|
|
3568
|
-
const sessionRuntime = normalizeOptionalString(
|
|
3587
|
+
const sessionRuntime = normalizeOptionalString(getSessionEntry({
|
|
3588
|
+
storePath: resolveStorePath(params.cfg.session?.store, { agentId: params.route.agentId }),
|
|
3589
|
+
sessionKey: params.route.sessionKey,
|
|
3590
|
+
readConsistency: "latest"
|
|
3591
|
+
})?.agentRuntimeOverride);
|
|
3569
3592
|
if (sessionRuntime) return sessionRuntime;
|
|
3570
3593
|
} catch {}
|
|
3571
3594
|
return "auto";
|
|
@@ -4596,6 +4619,10 @@ async function dispatchDiscordCommandInteraction(params) {
|
|
|
4596
4619
|
messageThreadId,
|
|
4597
4620
|
threadParentId: pluginThreadParentId
|
|
4598
4621
|
});
|
|
4622
|
+
if (pluginReply.suppressReply === true) return {
|
|
4623
|
+
accepted: true,
|
|
4624
|
+
effectiveRoute
|
|
4625
|
+
};
|
|
4599
4626
|
if (!hasRenderableReplyPayload(pluginReply)) {
|
|
4600
4627
|
await respond(DISCORD_EMPTY_VISIBLE_REPLY_WARNING);
|
|
4601
4628
|
return {
|
|
@@ -7953,7 +7980,7 @@ async function loadConversationRuntime$1() {
|
|
|
7953
7980
|
return await conversationRuntimePromise$1;
|
|
7954
7981
|
}
|
|
7955
7982
|
async function loadTypingRuntime() {
|
|
7956
|
-
typingRuntimePromise ??= import("./typing-
|
|
7983
|
+
typingRuntimePromise ??= import("./typing-BMQEI8OW.js").then((n) => n.n);
|
|
7957
7984
|
return await typingRuntimePromise;
|
|
7958
7985
|
}
|
|
7959
7986
|
function buildDiscordComponentConversationLabel(params) {
|
|
@@ -8374,7 +8401,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
|
|
|
8374
8401
|
//#region extensions/discord/src/monitor/agent-components.handlers.ts
|
|
8375
8402
|
let componentsRuntimePromise;
|
|
8376
8403
|
async function loadComponentsRuntime() {
|
|
8377
|
-
componentsRuntimePromise ??= import("./components-
|
|
8404
|
+
componentsRuntimePromise ??= import("./components-CBPNJhVP.js").then((n) => n.t);
|
|
8378
8405
|
return await componentsRuntimePromise;
|
|
8379
8406
|
}
|
|
8380
8407
|
async function handleDiscordComponentEvent(params) {
|
|
@@ -9592,7 +9619,7 @@ async function runDiscordGatewayLifecycle(params) {
|
|
|
9592
9619
|
gatewayEmitter?.removeListener(DISCORD_GATEWAY_TRANSPORT_ACTIVITY_EVENT, onGatewayTransportActivity);
|
|
9593
9620
|
if (params.voiceManager) {
|
|
9594
9621
|
await params.voiceManager.destroy();
|
|
9595
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
9622
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-DW6d1eCL.js").then((n) => n.n);
|
|
9596
9623
|
setDiscordTranscriptsVoiceManager({
|
|
9597
9624
|
accountId: params.accountId,
|
|
9598
9625
|
manager: null
|
|
@@ -9870,7 +9897,7 @@ function logDiscordStartupPhase(params) {
|
|
|
9870
9897
|
});
|
|
9871
9898
|
}
|
|
9872
9899
|
async function loadDiscordVoiceRuntime() {
|
|
9873
|
-
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-
|
|
9900
|
+
const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-TLLuQzsA.js");
|
|
9874
9901
|
discordVoiceRuntimePromise = promise;
|
|
9875
9902
|
try {
|
|
9876
9903
|
return await promise;
|
|
@@ -9880,7 +9907,7 @@ async function loadDiscordVoiceRuntime() {
|
|
|
9880
9907
|
}
|
|
9881
9908
|
}
|
|
9882
9909
|
async function loadDiscordProviderSessionRuntime() {
|
|
9883
|
-
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-
|
|
9910
|
+
const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-Dy71XetI.js");
|
|
9884
9911
|
discordProviderSessionRuntimePromise = promise;
|
|
9885
9912
|
try {
|
|
9886
9913
|
return await promise;
|
|
@@ -10151,7 +10178,7 @@ async function monitorDiscordProvider(opts = {}) {
|
|
|
10151
10178
|
runtime,
|
|
10152
10179
|
botUserId
|
|
10153
10180
|
});
|
|
10154
|
-
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-
|
|
10181
|
+
const { setDiscordTranscriptsVoiceManager } = await import("./transcripts-source-DW6d1eCL.js").then((n) => n.n);
|
|
10155
10182
|
setDiscordTranscriptsVoiceManager({
|
|
10156
10183
|
accountId: account.accountId,
|
|
10157
10184
|
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-C1yhwdOw.js";
|
|
2
|
+
import { n as createThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BdFs0ot7.js";
|
|
3
|
+
import { t as createDiscordMessageHandler } from "./message-handler-ClZrgeka.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,5 +1,5 @@
|
|
|
1
1
|
import { p as normalizeDiscordToken } from "./accounts-P19jm1lf.js";
|
|
2
|
-
import { n as fetchDiscord } from "./api-
|
|
2
|
+
import { n as fetchDiscord } from "./api-CJvEMuA6.js";
|
|
3
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) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
2
|
-
import { n as fetchDiscord, t as DiscordApiError } from "./api-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-CK162xD0.js";
|
|
2
|
+
import { n as fetchDiscord, t as DiscordApiError } from "./api-CJvEMuA6.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-BDNoAQll.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-
|
|
2
|
-
import { n as fetchDiscord } from "./api-
|
|
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-CK162xD0.js";
|
|
2
|
+
import { n as fetchDiscord } from "./api-CJvEMuA6.js";
|
|
3
|
+
import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-BDNoAQll.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-CK162xD0.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-CBPNJhVP.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-Cmv2qMB5.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-
|
|
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-YLGCAMjV.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-BYTToRY1.js";
|
|
9
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.js";
|
|
10
|
+
import "./targets-BA7gf0K0.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";
|
|
@@ -678,13 +678,12 @@ async function handleDiscordMessageManagementAction(ctx) {
|
|
|
678
678
|
ok: true,
|
|
679
679
|
results
|
|
680
680
|
});
|
|
681
|
-
const
|
|
682
|
-
const messages = resultsRecord.messages;
|
|
681
|
+
const messages = results.messages;
|
|
683
682
|
const normalizedMessages = Array.isArray(messages) ? messages.map((group) => Array.isArray(group) ? group.map((msg) => ctx.normalizeMessage(msg)) : group) : messages;
|
|
684
683
|
return jsonResult({
|
|
685
684
|
ok: true,
|
|
686
685
|
results: {
|
|
687
|
-
...
|
|
686
|
+
...results,
|
|
688
687
|
messages: normalizedMessages
|
|
689
688
|
}
|
|
690
689
|
});
|
|
@@ -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-C-fNslbg.js";
|
|
2
|
+
import { t as discordMessageActions } from "./channel-actions-CamohoDF.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-CBPNJhVP.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-Cmv2qMB5.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-
|
|
4
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-YLGCAMjV.js";
|
|
5
|
+
import { n as listDiscordDirectoryGroupsLive, r as listDiscordDirectoryPeersLive } from "./directory-live-C8lwwDJo.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-BYTToRY1.js";
|
|
8
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.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-C-fNslbg.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-CamohoDF.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-C_rAwrkj.js";
|
|
16
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cz1tkemy.js";
|
|
17
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-XBJmlLaf.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-C1yhwdOw.js";
|
|
19
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BdFs0ot7.js";
|
|
20
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bkf8mJlj.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-BXGKCgbA.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-CChQJujf.js";
|
|
25
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-C_tYBSAu.js";
|
|
26
|
+
import { t as createDiscordMessageHandler } from "./message-handler-ClZrgeka.js";
|
|
27
|
+
import "./runtime-api.monitor-CN1_mmYY.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-C8lwwDJo.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-C_rAwrkj.js";
|
|
4
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cz1tkemy.js";
|
|
5
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bkf8mJlj.js";
|
|
6
|
+
import { r as collectDiscordAuditChannelIds, t as auditDiscordChannelPermissions } from "./audit-BXGKCgbA.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
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 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";
|
|
4
|
-
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-
|
|
5
|
-
import { i as buildDiscordMediaPayload } from "./message-utils-
|
|
6
|
-
import { t as createDiscordMessageHandler } from "./message-handler-
|
|
7
|
-
import "./runtime-api.monitor-
|
|
4
|
+
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-CChQJujf.js";
|
|
5
|
+
import { i as buildDiscordMediaPayload } from "./message-utils-C_tYBSAu.js";
|
|
6
|
+
import { t as createDiscordMessageHandler } from "./message-handler-ClZrgeka.js";
|
|
7
|
+
import "./runtime-api.monitor-CN1_mmYY.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, 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 };
|
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-CBPNJhVP.js";
|
|
2
|
+
import { n as registerBuiltDiscordComponentMessage, r as sendDiscordComponentMessage, t as editDiscordComponentMessage } from "./send.components-Cmv2qMB5.js";
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, k as fetchMemberGuildPermissionsDiscord, w as DiscordSendError } from "./send.shared-YLGCAMjV.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-BYTToRY1.js";
|
|
5
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.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
1
|
import { C as resolveThreadBindingIdleTimeoutMs, E as resolveThreadBindingMaxAgeMs, T as resolveThreadBindingMaxAgeExpiresAt, d as isRecentlyUnboundThreadWebhookMessage, w as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-iSWjCYjB.js";
|
|
2
2
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
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-
|
|
3
|
+
import { _ as formatThreadBindingDurationLabel, b as resolveThreadBindingThreadName, g as resolveThreadBindingPersonaFromRecord, h as resolveThreadBindingPersona, y as resolveThreadBindingIntroText } from "./thread-bindings.discord-api-XBJmlLaf.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-C1yhwdOw.js";
|
|
5
|
+
import { i as testing, n as createThreadBindingManager, r as getThreadBindingManager, t as createNoopThreadBindingManager } from "./thread-bindings.manager-BdFs0ot7.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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { At as getGuildMember, Bt as removeGuildMemberRole, C as readDiscordCode, Ct as createGuildBan, Dt as createGuildSticker, Et as createGuildScheduledEvent, Ft as listGuildRoles, It as listGuildScheduledEvents, Lt as moveGuildChannels, Mt as listGuildActiveThreads, Nt as listGuildChannels, Ot as deleteChannelPermission, Pt as listGuildEmojis, Rt as putChannelPermission, S as RateLimitError, St as addGuildMemberRole, T as readRetryAfter, Tt as createGuildEmoji, Vt as timeoutGuildMember, Wt as __exportAll, _t as listChannelPins, at as deleteOwnMessageReaction, bt as sendChannelTyping, ct as createThread, dt as editChannel, ft as editChannelMessage, gt as listChannelMessages, ht as listChannelArchivedThreads, it as createOwnMessageReaction, jt as getGuildVoiceState, kt as getGuild, lt as deleteChannel, mt as getChannelMessage, n as createDiscordSendResult, ot as listMessageReactionUsers, pt as getChannel, st as createChannelMessage, ut as deleteChannelMessage, vt as pinChannelMessage, w as readDiscordMessage, wt as createGuildChannel, x as DiscordError, xt as unpinChannelMessage, yt as searchGuildMessages, zt as removeGuildMember } from "./send.receipt-
|
|
1
|
+
import { At as getGuildMember, Bt as removeGuildMemberRole, C as readDiscordCode, Ct as createGuildBan, Dt as createGuildSticker, Et as createGuildScheduledEvent, Ft as listGuildRoles, It as listGuildScheduledEvents, Lt as moveGuildChannels, Mt as listGuildActiveThreads, Nt as listGuildChannels, Ot as deleteChannelPermission, Pt as listGuildEmojis, Rt as putChannelPermission, S as RateLimitError, St as addGuildMemberRole, T as readRetryAfter, Tt as createGuildEmoji, Vt as timeoutGuildMember, Wt as __exportAll, _t as listChannelPins, at as deleteOwnMessageReaction, bt as sendChannelTyping, ct as createThread, dt as editChannel, ft as editChannelMessage, gt as listChannelMessages, ht as listChannelArchivedThreads, it as createOwnMessageReaction, jt as getGuildVoiceState, kt as getGuild, lt as deleteChannel, mt as getChannelMessage, n as createDiscordSendResult, ot as listMessageReactionUsers, pt as getChannel, st as createChannelMessage, ut as deleteChannelMessage, vt as pinChannelMessage, w as readDiscordMessage, wt as createGuildChannel, x as DiscordError, xt as unpinChannelMessage, yt as searchGuildMessages, zt as removeGuildMember } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, F as createDiscordClient, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as parseAndResolveChannelRecipient, R as resolveDiscordClientAccountContext, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, i as formatReactionEmoji, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES, z as resolveDiscordRest } from "./send.shared-
|
|
4
|
-
import { n as sendPollDiscord, r as sendStickerDiscord, s as rewriteDiscordKnownMentions, t as sendMessageDiscord } from "./send.outbound-
|
|
3
|
+
import { A as hasAllGuildPermissionsDiscord, C as DISCORD_MAX_STICKER_BYTES, D as canViewDiscordGuildChannel, E as canManageGuildRoleDiscord, F as createDiscordClient, M as hasAnyGuildPermissionDiscord, O as fetchChannelPermissionsDiscord, P as parseAndResolveChannelRecipient, R as resolveDiscordClientAccountContext, S as DISCORD_MAX_EVENT_COVER_BYTES, T as canManageGuildMemberRoleDiscord, i as formatReactionEmoji, j as hasAnyChannelPermissionDiscord, k as fetchMemberGuildPermissionsDiscord, l as resolveChannelId, o as normalizeEmojiName, r as buildReactionIdentifier, s as normalizeReactionEmoji, t as buildDiscordSendError, w as DiscordSendError, x as DISCORD_MAX_EMOJI_BYTES, z as resolveDiscordRest } from "./send.shared-YLGCAMjV.js";
|
|
4
|
+
import { n as sendPollDiscord, r as sendStickerDiscord, s as rewriteDiscordKnownMentions, t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ChannelType } from "discord-api-types/v10";
|
|
7
7
|
import { parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -12,8 +12,9 @@ import { MEDIA_FFMPEG_MAX_AUDIO_DURATION_SECS, extensionForMime, maxBytesForKind
|
|
|
12
12
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
13
13
|
import { loadWebMediaRaw } from "openclaw/plugin-sdk/web-media";
|
|
14
14
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
15
|
-
import { readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
15
|
+
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
16
16
|
import { recordChannelActivity } from "openclaw/plugin-sdk/channel-activity-runtime";
|
|
17
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
17
18
|
import fs from "node:fs/promises";
|
|
18
19
|
import { resolvePreferredOpenClawTmpDir, tempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
19
20
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
@@ -201,6 +202,14 @@ async function banMemberDiscord(payload, opts) {
|
|
|
201
202
|
function formatDiscordThreadInitialMessageError(error) {
|
|
202
203
|
return error instanceof Error ? error.message : String(error);
|
|
203
204
|
}
|
|
205
|
+
function assertDiscordResponseArray(value, label) {
|
|
206
|
+
if (!Array.isArray(value)) throw new Error(`Unexpected Discord response for ${label}: expected array.`);
|
|
207
|
+
return value;
|
|
208
|
+
}
|
|
209
|
+
function assertDiscordResponseObject(value, label) {
|
|
210
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`Unexpected Discord response for ${label}: expected object.`);
|
|
211
|
+
return value;
|
|
212
|
+
}
|
|
204
213
|
var DiscordThreadInitialMessageError = class extends Error {
|
|
205
214
|
constructor(thread, error) {
|
|
206
215
|
const initialMessageError = formatDiscordThreadInitialMessageError(error);
|
|
@@ -219,7 +228,7 @@ async function readMessagesDiscord(channelId, query, opts) {
|
|
|
219
228
|
if (messageQuery.before) params.before = messageQuery.before;
|
|
220
229
|
if (messageQuery.after) params.after = messageQuery.after;
|
|
221
230
|
if (messageQuery.around) params.around = messageQuery.around;
|
|
222
|
-
return await listChannelMessages(rest, channelId, params);
|
|
231
|
+
return assertDiscordResponseArray(await listChannelMessages(rest, channelId, params), "message read");
|
|
223
232
|
}
|
|
224
233
|
async function fetchMessageDiscord(channelId, messageId, opts) {
|
|
225
234
|
return await getChannelMessage(resolveDiscordRest(opts), channelId, messageId);
|
|
@@ -291,7 +300,7 @@ async function searchMessagesDiscord(query, opts) {
|
|
|
291
300
|
const limit = Math.min(Math.max(Math.floor(query.limit), 1), 25);
|
|
292
301
|
params.set("limit", String(limit));
|
|
293
302
|
}
|
|
294
|
-
return await searchGuildMessages(rest, query.guildId, params);
|
|
303
|
+
return assertDiscordResponseObject(await searchGuildMessages(rest, query.guildId, params), "message search");
|
|
295
304
|
}
|
|
296
305
|
//#endregion
|
|
297
306
|
//#region extensions/discord/src/send.webhook.ts
|
|
@@ -307,7 +316,7 @@ function coerceWebhookErrorBody(raw) {
|
|
|
307
316
|
try {
|
|
308
317
|
return JSON.parse(raw);
|
|
309
318
|
} catch {
|
|
310
|
-
return { message: raw
|
|
319
|
+
return { message: truncateUtf16Safe(raw, 200) };
|
|
311
320
|
}
|
|
312
321
|
}
|
|
313
322
|
async function throwWebhookResponseError(response) {
|
|
@@ -565,7 +574,7 @@ function coerceDiscordErrorBody(raw) {
|
|
|
565
574
|
try {
|
|
566
575
|
return JSON.parse(raw);
|
|
567
576
|
} catch {
|
|
568
|
-
return { message: raw
|
|
577
|
+
return { message: truncateUtf16Safe(raw, 200) };
|
|
569
578
|
}
|
|
570
579
|
}
|
|
571
580
|
async function createVoiceRequestError(response, fallbackMessage) {
|
|
@@ -597,7 +606,7 @@ async function requestVoiceUploadUrl(params) {
|
|
|
597
606
|
});
|
|
598
607
|
try {
|
|
599
608
|
if (!res.ok) throw await createVoiceRequestError(res, "Upload URL request failed");
|
|
600
|
-
return await res.
|
|
609
|
+
return await readProviderJsonResponse(res, "discord.voice.upload-url");
|
|
601
610
|
} finally {
|
|
602
611
|
await release();
|
|
603
612
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll, ft as editChannelMessage, j as serializePayload, n as createDiscordSendResult, st as createChannelMessage } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import "./config-api-JiPdJeb0.js";
|
|
4
4
|
import "./channel-api-CAJ0wMoV.js";
|
|
5
|
-
import { c as buildDiscordComponentMessage, f as resolveDiscordComponentAttachmentName, l as buildDiscordComponentMessageFlags } from "./components-
|
|
6
|
-
import { F as createDiscordClient, P as parseAndResolveChannelRecipient, b as stripUndefinedFields, h as SUPPRESS_NOTIFICATIONS_FLAG, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType } from "./send.shared-
|
|
7
|
-
import { t as sendMessageDiscord } from "./send.outbound-
|
|
5
|
+
import { c as buildDiscordComponentMessage, f as resolveDiscordComponentAttachmentName, l as buildDiscordComponentMessageFlags } from "./components-CBPNJhVP.js";
|
|
6
|
+
import { F as createDiscordClient, P as parseAndResolveChannelRecipient, b as stripUndefinedFields, h as SUPPRESS_NOTIFICATIONS_FLAG, l as resolveChannelId, m as toDiscordFileBlob, t as buildDiscordSendError, u as resolveDiscordChannelType } from "./send.shared-YLGCAMjV.js";
|
|
7
|
+
import { t as sendMessageDiscord } from "./send.outbound-BqvRMxXy.js";
|
|
8
8
|
import { n as getOptionalDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
9
9
|
import "openclaw/plugin-sdk/account-id";
|
|
10
10
|
import "openclaw/plugin-sdk/secret-input";
|