@openclaw/discord 2026.7.1-beta.1 → 2026.7.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +6 -6
- package/dist/{approval-handler.runtime-DzoY4ufU.js → approval-handler.runtime-Cg7CuLSc.js} +2 -2
- package/dist/{audit-BXGKCgbA.js → audit-BCVhE9Oe.js} +2 -2
- package/dist/{channel-Da36gsaP.js → channel-CfngVOjW.js} +11 -31
- package/dist/{channel-actions-CamohoDF.js → channel-actions-DJ_i4v9b.js} +2 -5
- package/dist/{channel-actions.runtime-C1y4B9J0.js → channel-actions.runtime-BDW12z0o.js} +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-KhiBHeGT.js → channel.setup-BYZ78cmU.js} +1 -1
- package/dist/{conversation-identity-BEsyd7A1.js → conversation-identity-CnYbx3sO.js} +1 -1
- package/dist/{doctor-D3ngpo-Y.js → doctor-CKIw8urm.js} +1 -1
- package/dist/{handle-action.guild-admin-zmPNo8TF.js → handle-action.guild-admin-CHMDXefq.js} +2 -2
- package/dist/{manager.runtime-TLLuQzsA.js → manager.runtime-BkMOU8kh.js} +2 -2
- package/dist/{message-handler-ClZrgeka.js → message-handler-B2cEpj5S.js} +6 -13
- package/dist/{message-handler.preflight-CjnHwEwP.js → message-handler.preflight-B93Az6zg.js} +14 -40
- package/dist/{message-handler.process-OruF8JFV.js → message-handler.process-CW5mMw4o.js} +12 -19
- package/dist/{message-utils-C_tYBSAu.js → message-utils-Dy9KeClm.js} +1 -1
- package/dist/{outbound-adapter-B0iwUl6c.js → outbound-adapter-n_qRwyHZ.js} +6 -18
- package/dist/{preflight-audio-ClWbnQto.js → preflight-audio-DecwnhEA.js} +2 -5
- package/dist/{provider-CChQJujf.js → provider-BuTO6czP.js} +16 -35
- package/dist/{provider-session.runtime-Dy71XetI.js → provider-session.runtime-DmBTGaQX.js} +3 -3
- package/dist/provider.runtime-CqZpKOCE.js +2 -0
- package/dist/{runtime-C-fNslbg.js → runtime-DaaaVvJm.js} +325 -297
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +14 -14
- package/dist/runtime-api.lookup.js +1 -1
- package/dist/runtime-api.monitor-ChuqOjHq.js +6 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +4 -4
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-BYTToRY1.js → send-B_yfprXu.js} +2 -2
- package/dist/{send.components-Cmv2qMB5.js → send.components-C2psXc7A.js} +2 -2
- package/dist/{send.outbound-BqvRMxXy.js → send.outbound-BPcCF1v2.js} +1 -1
- package/dist/{send.shared-YLGCAMjV.js → send.shared-CUTfqvXx.js} +2 -13
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-D11J9bXI.js → shared-AnStShZr.js} +3 -10
- package/dist/{subagent-hooks-cE_tFGCX.js → subagent-hooks-DkO-jpvh.js} +1 -1
- package/dist/subagent-hooks-api.js +2 -5
- package/dist/{thread-bindings-C1yhwdOw.js → thread-bindings-BuXtcLSp.js} +2 -2
- package/dist/{thread-bindings.discord-api-XBJmlLaf.js → thread-bindings.discord-api-CetgvIbE.js} +3 -3
- package/dist/{thread-bindings.manager-BdFs0ot7.js → thread-bindings.manager-B7AHjU4s.js} +2 -2
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
- package/dist/provider.runtime-BiOSsG0m.js +0 -2
- package/dist/runtime-api.monitor-CN1_mmYY.js +0 -6
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-DaaaVvJm.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -5,19 +5,19 @@ import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForIn
|
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-CJvEMuA6.js";
|
|
6
6
|
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-DYufMbXm.js";
|
|
7
7
|
import "./targets-BA7gf0K0.js";
|
|
8
|
-
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
9
|
-
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CnYbx3sO.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-CfngVOjW.js";
|
|
10
10
|
import { 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, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.js";
|
|
11
11
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
12
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
14
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
12
|
+
import { t as discordSetupPlugin } from "./channel.setup-BYZ78cmU.js";
|
|
13
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-DkO-jpvh.js";
|
|
14
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CHMDXefq.js";
|
|
15
15
|
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-CouAqvDj.js";
|
|
16
16
|
import { t as fetchPluralKitMessageInfo } from "./pluralkit-DaWTJTmF.js";
|
|
17
17
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-Bkf8mJlj.js";
|
|
18
18
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
19
19
|
import { resolveOpenProviderRuntimeGroupPolicy as resolveDiscordRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
20
20
|
//#region extensions/discord/api.ts
|
|
21
|
-
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-
|
|
21
|
+
const handleDiscordMessageAction = async (...args) => (await import("./channel-actions.runtime-BDW12z0o.js")).handleDiscordMessageAction(...args);
|
|
22
22
|
//#endregion
|
|
23
23
|
export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_COMPONENT_ATTACHMENT_PREFIX, DISCORD_COMPONENT_CUSTOM_ID_KEY, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, DISCORD_MODAL_CUSTOM_ID_KEY, DiscordApiError, DiscordFormModal, buildDiscordComponentCustomId, buildDiscordComponentMessage, buildDiscordComponentMessageFlags, buildDiscordInteractiveComponents, buildDiscordModalCustomId, collectDiscordSecurityAuditFindings, collectDiscordStatusIssues, createDiscordActionGate, createDiscordFormModal, discordPlugin, discordSetupPlugin, fetchDiscord, fetchDiscordApplicationId, fetchDiscordApplicationSummary, fetchPluralKitMessageInfo, formatDiscordComponentEventText, getDiscordExecApprovalApprovers, handleDiscordMessageAction, handleDiscordSubagentDeliveryTarget, handleDiscordSubagentEnded, handleDiscordSubagentSpawning, inspectDiscordAccount, isDiscordExecApprovalApprover, isDiscordExecApprovalClientEnabled, listDiscordAccountIds, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, listEnabledDiscordAccounts, looksLikeDiscordTargetId, mergeAbortSignals, mergeDiscordAccountConfig, normalizeDiscordMessagingTarget, normalizeDiscordOutboundTarget, normalizeExplicitDiscordSessionKey, parseApplicationIdFromToken, parseDiscordComponentCustomId, parseDiscordComponentCustomIdForInteraction as parseDiscordComponentCustomIdForCarbon, parseDiscordComponentCustomIdForInteraction, parseDiscordModalCustomId, parseDiscordModalCustomIdForInteraction as parseDiscordModalCustomIdForCarbon, parseDiscordModalCustomIdForInteraction, parseDiscordSendTarget, parseDiscordTarget, probeDiscord, readDiscordComponentSpec, requestDiscord, resolveDefaultDiscordAccountId, resolveDiscordAccount, resolveDiscordAccountConfig, resolveDiscordChannelId, resolveDiscordComponentAttachmentName, resolveDiscordGroupRequireMention, resolveDiscordGroupToolPolicy, resolveDiscordMaxLinesPerMessage, resolveDiscordPrivilegedIntentsFromFlags, resolveDiscordRuntimeGroupPolicy, resolveDiscordTarget, shouldSuppressLocalDiscordExecApprovalPrompt, tryHandleDiscordMessageActionGuildAdmin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as Container, J as Separator, K as Row, R as Button, Wt as __exportAll, X as TextDisplay, ft as editChannelMessage, j as serializePayload, nt as createUserDmChannel, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-
|
|
4
|
-
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-
|
|
3
|
+
import { F as createDiscordClient, b as stripUndefinedFields } from "./send.shared-CUTfqvXx.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-CnYbx3sO.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ButtonStyle } from "discord-api-types/v10";
|
|
7
7
|
import { logDebug, logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Wt as __exportAll } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
|
-
import { O as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
3
|
+
import { O as fetchChannelPermissionsDiscord } from "./send.shared-CUTfqvXx.js";
|
|
4
|
+
import "./send-B_yfprXu.js";
|
|
5
5
|
import { n as collectDiscordAuditChannelIdsForAccount, t as auditDiscordChannelPermissionsWithFetcher } from "./audit-core-xwjIczO0.js";
|
|
6
6
|
//#region extensions/discord/src/audit.ts
|
|
7
7
|
var audit_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -3,14 +3,15 @@ import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as r
|
|
|
3
3
|
import { a as projectCredentialSnapshotFields, n as PAIRING_APPROVED_MESSAGE, o as resolveConfiguredFromCredentialStatuses, r as buildTokenChannelStatusSummary, t as DEFAULT_ACCOUNT_ID } from "./channel-api-CAJ0wMoV.js";
|
|
4
4
|
import { x as resolveDiscordOutboundSessionRoute } from "./components-CBPNJhVP.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-
|
|
6
|
+
import { c as shouldSuppressLocalDiscordExecApprovalPrompt, n as resolveDiscordCurrentConversationIdentity, r as getDiscordApprovalCapability } from "./conversation-identity-CnYbx3sO.js";
|
|
7
7
|
import { r as resolveRequiredDiscordChannelPermissions } from "./audit-core-xwjIczO0.js";
|
|
8
|
-
import { t as discordMessageActions$1 } from "./channel-actions-
|
|
8
|
+
import { t as discordMessageActions$1 } from "./channel-actions-DJ_i4v9b.js";
|
|
9
9
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-Chs3HgGa.js";
|
|
10
10
|
import { d as withAbortTimeout } from "./timeouts-C5TBc_9x.js";
|
|
11
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
12
|
-
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-
|
|
11
|
+
import { n as discordOutbound } from "./outbound-adapter-n_qRwyHZ.js";
|
|
12
|
+
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-AnStShZr.js";
|
|
13
13
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
14
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
14
15
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
15
16
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
16
17
|
import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -21,7 +22,6 @@ import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing
|
|
|
21
22
|
import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
22
23
|
import { appendMatchMetadata, asString, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState, isRecord as isRecord$1, resolveEnabledConfiguredAccountId } from "openclaw/plugin-sdk/status-helpers";
|
|
23
24
|
import { resolveTargetsWithOptionalToken } from "openclaw/plugin-sdk/target-resolver-runtime";
|
|
24
|
-
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
25
25
|
import { resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
|
|
26
26
|
import { normalizeAtHashSlug } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
27
27
|
//#region extensions/discord/src/channel.conversation.ts
|
|
@@ -121,36 +121,16 @@ function resolveDiscordInboundConversation(params) {
|
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
123
|
//#region extensions/discord/src/channel.loaders.ts
|
|
124
|
-
let discordProviderRuntimePromise;
|
|
125
|
-
let discordProbeRuntimePromise;
|
|
126
|
-
let discordAuditModulePromise;
|
|
127
|
-
let discordSendModulePromise;
|
|
128
|
-
let discordDirectoryLiveModulePromise;
|
|
129
124
|
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CouAqvDj.js").then((n) => n.t));
|
|
130
125
|
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-C_rAwrkj.js").then((n) => n.n));
|
|
131
126
|
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-Cz1tkemy.js").then((n) => n.n));
|
|
132
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
127
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-B7AHjU4s.js").then((n) => n.a));
|
|
133
128
|
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-DYufMbXm.js").then((n) => n.r));
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
discordProbeRuntimePromise ??= import("./probe.runtime-3Rerer9g.js");
|
|
140
|
-
return await discordProbeRuntimePromise;
|
|
141
|
-
}
|
|
142
|
-
async function loadDiscordAuditModule() {
|
|
143
|
-
discordAuditModulePromise ??= import("./audit-BXGKCgbA.js").then((n) => n.n);
|
|
144
|
-
return await discordAuditModulePromise;
|
|
145
|
-
}
|
|
146
|
-
async function loadDiscordSendModule() {
|
|
147
|
-
discordSendModulePromise ??= import("./send-BYTToRY1.js").then((n) => n.t);
|
|
148
|
-
return await discordSendModulePromise;
|
|
149
|
-
}
|
|
150
|
-
async function loadDiscordDirectoryLiveModule() {
|
|
151
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-C8lwwDJo.js").then((n) => n.t);
|
|
152
|
-
return await discordDirectoryLiveModulePromise;
|
|
153
|
-
}
|
|
129
|
+
const loadDiscordProviderRuntime = createLazyRuntimeModule(() => import("./provider.runtime-CqZpKOCE.js"));
|
|
130
|
+
const loadDiscordProbeRuntime = createLazyRuntimeModule(() => import("./probe.runtime-3Rerer9g.js"));
|
|
131
|
+
const loadDiscordAuditModule = createLazyRuntimeModule(() => import("./audit-BCVhE9Oe.js").then((n) => n.n));
|
|
132
|
+
const loadDiscordSendModule = createLazyRuntimeModule(() => import("./send-B_yfprXu.js").then((n) => n.t));
|
|
133
|
+
const loadDiscordDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-C8lwwDJo.js").then((n) => n.t));
|
|
154
134
|
//#endregion
|
|
155
135
|
//#region extensions/discord/src/group-policy.ts
|
|
156
136
|
function normalizeDiscordSlug(value) {
|
|
@@ -2,6 +2,7 @@ import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
|
2
2
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { d as readDiscordComponentSpec } from "./components-CBPNJhVP.js";
|
|
4
4
|
import { i as withDiscordInboundEventDeliveryMetadata } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
5
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
7
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
7
8
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
@@ -40,11 +41,7 @@ const localExecutionActions = new Set([
|
|
|
40
41
|
function resolveDiscordActionExecutionMode({ action }) {
|
|
41
42
|
return localExecutionActions.has(action) ? "local" : "gateway";
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
async function loadDiscordChannelActionsRuntime() {
|
|
45
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-C1y4B9J0.js");
|
|
46
|
-
return await discordChannelActionsRuntimePromise;
|
|
47
|
-
}
|
|
44
|
+
const loadDiscordChannelActionsRuntime = createLazyRuntimeModule(() => import("./channel-actions.runtime-BDW12z0o.js"));
|
|
48
45
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
49
46
|
return listDiscordAccountIds(cfg).map((accountId) => inspectDiscordAccount({
|
|
50
47
|
cfg,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ut as resolveDiscordChannelId } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-CBPNJhVP.js";
|
|
3
|
-
import { t as handleDiscordAction } from "./runtime-C-fNslbg.js";
|
|
4
3
|
import "./targets-BA7gf0K0.js";
|
|
4
|
+
import { t as handleDiscordAction } from "./runtime-DaaaVvJm.js";
|
|
5
5
|
import "./action-runtime-api.js";
|
|
6
6
|
import { r as notifyDiscordInboundEventOutboundSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
7
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
7
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-CHMDXefq.js";
|
|
8
8
|
import { normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
10
10
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-CfngVOjW.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as inspectDiscordConfiguredToken } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-
|
|
3
|
+
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-AnStShZr.js";
|
|
4
4
|
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-C_rAwrkj.js";
|
|
5
5
|
import { t as resolveDiscordUserAllowlist } from "./resolve-users-Cz1tkemy.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
@@ -231,7 +231,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
231
231
|
request,
|
|
232
232
|
configOverride
|
|
233
233
|
}),
|
|
234
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
234
|
+
load: async () => (await import("./approval-handler.runtime-Cg7CuLSc.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
235
235
|
})
|
|
236
236
|
});
|
|
237
237
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-
|
|
3
|
+
import { r as DISCORD_LEGACY_CONFIG_RULES } from "./shared-AnStShZr.js";
|
|
4
4
|
import { n as normalizeCompatibilityConfig } from "./doctor-contract-CU7lnZTF.js";
|
|
5
5
|
import { t as isDiscordMutableAllowEntry } from "./security-doctor-uUo8hTD5.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
package/dist/{handle-action.guild-admin-zmPNo8TF.js → handle-action.guild-admin-CHMDXefq.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { a as readDiscordChannelCreateParams, n as isDiscordModerationAction, o as readDiscordChannelEditParams, r as readDiscordModerationCommand, s as readDiscordChannelMoveParams, t as handleDiscordAction } from "./runtime-DaaaVvJm.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
|
-
import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-
|
|
3
|
+
import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-DJ_i4v9b.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
6
6
|
//#region extensions/discord/src/actions/handle-action.guild-admin.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-C-MqM-B_.js";
|
|
4
|
-
import { o as formatMention } from "./send.outbound-
|
|
4
|
+
import { o as formatMention } from "./send.outbound-BPcCF1v2.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-
|
|
6
|
+
import { d as resolveDiscordVoiceEnabled, p as buildDiscordGroupSystemPrompt, s as authorizeDiscordVoiceIngress } from "./provider-BuTO6czP.js";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
1
|
+
import { I as createDiscordRestClient } from "./send.shared-CUTfqvXx.js";
|
|
2
2
|
import { o as mergeAbortSignals } from "./timeouts-C5TBc_9x.js";
|
|
3
|
-
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
4
|
-
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-
|
|
3
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CetgvIbE.js";
|
|
4
|
+
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-Dy9KeClm.js";
|
|
5
5
|
import { t as sendTyping } from "./typing-BMQEI8OW.js";
|
|
6
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
7
|
import { finiteSecondsToTimerSafeMilliseconds } from "openclaw/plugin-sdk/number-runtime";
|
|
7
8
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
8
9
|
import { createChannelRunQueue, createTypingCallbacks, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -177,11 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
|
|
|
177
178
|
}
|
|
178
179
|
//#endregion
|
|
179
180
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
180
|
-
|
|
181
|
-
async function loadMessageProcessRuntime() {
|
|
182
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-OruF8JFV.js");
|
|
183
|
-
return await messageProcessRuntimePromise;
|
|
184
|
-
}
|
|
181
|
+
const loadMessageProcessRuntime = createLazyRuntimeModule(() => import("./message-handler.process-CW5mMw4o.js"));
|
|
185
182
|
async function processDiscordQueuedMessage(params) {
|
|
186
183
|
const processDiscordMessageImpl = params.testing?.processDiscordMessage ?? (await loadMessageProcessRuntime()).processDiscordMessage;
|
|
187
184
|
const abortSignal = mergeAbortSignals([params.job.runtime.abortSignal, params.lifecycleSignal]);
|
|
@@ -307,11 +304,7 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
307
304
|
}
|
|
308
305
|
//#endregion
|
|
309
306
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
310
|
-
|
|
311
|
-
async function loadMessagePreflightRuntime() {
|
|
312
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight-CjnHwEwP.js");
|
|
313
|
-
return await messagePreflightRuntimePromise;
|
|
314
|
-
}
|
|
307
|
+
const loadMessagePreflightRuntime = createLazyRuntimeModule(() => import("./message-handler.preflight-B93Az6zg.js"));
|
|
315
308
|
function isNonEmptyString(value) {
|
|
316
309
|
return typeof value === "string" && value.length > 0;
|
|
317
310
|
}
|
package/dist/{message-handler.preflight-CjnHwEwP.js → message-handler.preflight-B93Az6zg.js}
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { S as resolveTimestampMs, _ as resolveGroupDmAllow, a as normalizeDiscordSlug, b as formatDiscordUserTag, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, g as resolveDiscordShouldRequireMention, i as normalizeDiscordDisplaySlug, n as isDiscordGroupAllowedByPolicy, x as resolveDiscordSystemLocation } from "./allow-list-C-MqM-B_.js";
|
|
4
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
4
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CnYbx3sO.js";
|
|
5
5
|
import { d as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-iSWjCYjB.js";
|
|
6
|
-
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-
|
|
9
|
-
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-
|
|
6
|
+
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CetgvIbE.js";
|
|
7
|
+
import "./thread-bindings-BuXtcLSp.js";
|
|
8
|
+
import { D as resolveDiscordDmCommandAccess, O as resolveDiscordTextCommandAccess, _ as resolveDiscordConversationRoute, b as handleDiscordDmCommandDecision, g as buildDiscordRoutePeer, v as resolveDiscordEffectiveRoute, y as shouldIgnoreStaleDiscordRouteBinding } from "./provider-BuTO6czP.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-Dy9KeClm.js";
|
|
10
10
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
11
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
12
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
13
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
13
14
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -22,16 +23,8 @@ import { hasControlCommand } from "openclaw/plugin-sdk/command-detection";
|
|
|
22
23
|
import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime";
|
|
23
24
|
import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface";
|
|
24
25
|
//#region extensions/discord/src/monitor/message-handler.dm-preflight.ts
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
async function loadConversationRuntime$1() {
|
|
28
|
-
conversationRuntimePromise$1 ??= import("openclaw/plugin-sdk/conversation-binding-runtime");
|
|
29
|
-
return await conversationRuntimePromise$1;
|
|
30
|
-
}
|
|
31
|
-
async function loadDiscordSendRuntime() {
|
|
32
|
-
discordSendRuntimePromise ??= import("./send-BYTToRY1.js").then((n) => n.t);
|
|
33
|
-
return await discordSendRuntimePromise;
|
|
34
|
-
}
|
|
26
|
+
const loadConversationRuntime$1 = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
27
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-B_yfprXu.js").then((n) => n.t));
|
|
35
28
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
36
29
|
return sender.isPluralKit ? `pk:${sender.id}` : sender.id;
|
|
37
30
|
}
|
|
@@ -430,26 +423,10 @@ function logDiscordPreflightInboundSummary(params) {
|
|
|
430
423
|
}
|
|
431
424
|
//#endregion
|
|
432
425
|
//#region extensions/discord/src/monitor/message-handler.preflight-runtime.ts
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
async function loadPluralKitRuntime() {
|
|
438
|
-
pluralkitRuntimePromise ??= import("./pluralkit-DaWTJTmF.js").then((n) => n.n);
|
|
439
|
-
return await pluralkitRuntimePromise;
|
|
440
|
-
}
|
|
441
|
-
async function loadPreflightAudioRuntime() {
|
|
442
|
-
preflightAudioRuntimePromise ??= import("./preflight-audio-ClWbnQto.js");
|
|
443
|
-
return await preflightAudioRuntimePromise;
|
|
444
|
-
}
|
|
445
|
-
async function loadSystemEventsRuntime() {
|
|
446
|
-
systemEventsRuntimePromise ??= import("./system-events-XRYuwB2n.js");
|
|
447
|
-
return await systemEventsRuntimePromise;
|
|
448
|
-
}
|
|
449
|
-
async function loadDiscordThreadingRuntime() {
|
|
450
|
-
discordThreadingRuntimePromise ??= import("./provider-CChQJujf.js").then((n) => n.S);
|
|
451
|
-
return await discordThreadingRuntimePromise;
|
|
452
|
-
}
|
|
426
|
+
const loadPluralKitRuntime = createLazyRuntimeModule(() => import("./pluralkit-DaWTJTmF.js").then((n) => n.n));
|
|
427
|
+
const loadPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio-DecwnhEA.js"));
|
|
428
|
+
const loadSystemEventsRuntime = createLazyRuntimeModule(() => import("./system-events-XRYuwB2n.js"));
|
|
429
|
+
const loadDiscordThreadingRuntime = createLazyRuntimeModule(() => import("./provider-BuTO6czP.js").then((n) => n.S));
|
|
453
430
|
function isPreflightAborted(abortSignal) {
|
|
454
431
|
return Boolean(abortSignal?.aborted);
|
|
455
432
|
}
|
|
@@ -495,11 +472,7 @@ async function resolveDiscordPreflightThreadContext(params) {
|
|
|
495
472
|
}
|
|
496
473
|
//#endregion
|
|
497
474
|
//#region extensions/discord/src/monitor/message-handler.routing-preflight.ts
|
|
498
|
-
|
|
499
|
-
async function loadConversationRuntime() {
|
|
500
|
-
conversationRuntimePromise ??= import("openclaw/plugin-sdk/conversation-binding-runtime");
|
|
501
|
-
return await conversationRuntimePromise;
|
|
502
|
-
}
|
|
475
|
+
const loadConversationRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/conversation-binding-runtime"));
|
|
503
476
|
async function resolveDiscordPreflightRoute(params) {
|
|
504
477
|
const conversationRuntime = await loadConversationRuntime();
|
|
505
478
|
const route = resolveDiscordConversationRoute({
|
|
@@ -1108,6 +1081,7 @@ async function preflightDiscordMessage(params) {
|
|
|
1108
1081
|
channelAllowlistConfigured,
|
|
1109
1082
|
channelAllowed,
|
|
1110
1083
|
shouldRequireMention,
|
|
1084
|
+
groupRequireMention: shouldRequireMentionByConfig,
|
|
1111
1085
|
hasAnyMention,
|
|
1112
1086
|
hasControlCommand: hasControlCommandInMessage,
|
|
1113
1087
|
allowTextCommands,
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { Ut as resolveDiscordChannelId, c as discord_exports, ft as editChannelMessage, s as chunkDiscordTextWithMode, st as createChannelMessage, ut as deleteChannelMessage } from "./send.receipt-CK162xD0.js";
|
|
2
2
|
import { f as resolveDiscordMaxLinesPerMessage, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { I as createDiscordRestClient, L as createDiscordRuntimeAccountContext, _ as resolveDiscordMessageFlags, d as resolveDiscordTargetChannelId } from "./send.shared-
|
|
3
|
+
import { I as createDiscordRestClient, L as createDiscordRuntimeAccountContext, _ as resolveDiscordMessageFlags, d as resolveDiscordTargetChannelId } from "./send.shared-CUTfqvXx.js";
|
|
4
4
|
import { S as resolveTimestampMs, a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-C-MqM-B_.js";
|
|
5
|
-
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-
|
|
6
|
-
import { a as discordTextHasTargetedMention, i as discordTextHasBroadcastMention, s as rewriteDiscordKnownMentions } from "./send.outbound-
|
|
5
|
+
import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-B_yfprXu.js";
|
|
6
|
+
import { a as discordTextHasTargetedMention, i as discordTextHasBroadcastMention, s as rewriteDiscordKnownMentions } from "./send.outbound-BPcCF1v2.js";
|
|
7
7
|
import "./targets-BA7gf0K0.js";
|
|
8
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
8
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-CnYbx3sO.js";
|
|
9
9
|
import { t as beginDiscordInboundEventDeliveryCorrelation } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
10
10
|
import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C5TBc_9x.js";
|
|
11
|
-
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-
|
|
11
|
+
import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-n_qRwyHZ.js";
|
|
12
12
|
import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-DXT8oJdo.js";
|
|
13
|
-
import { C as resolveDiscordAutoThreadReplyPlan, T as resolveDiscordThreadStarter, a as buildGuildLabel, h as createDiscordSupplementalContextAccessChecker, i as buildDirectLabel, m as buildDiscordInboundAccessContext, n as deliverDiscordReply, o as resolveReplyContext, r as sanitizeDiscordFrontChannelReplyPayloads } from "./provider-
|
|
14
|
-
import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-
|
|
15
|
-
import { n as createDiscordReplyTypingFeedback } from "./message-handler-
|
|
13
|
+
import { C as resolveDiscordAutoThreadReplyPlan, T as resolveDiscordThreadStarter, a as buildGuildLabel, h as createDiscordSupplementalContextAccessChecker, i as buildDirectLabel, m as buildDiscordInboundAccessContext, n as deliverDiscordReply, o as resolveReplyContext, r as sanitizeDiscordFrontChannelReplyPayloads } from "./provider-BuTO6czP.js";
|
|
14
|
+
import { a as resolveForwardedMediaList, o as resolveMediaList, r as resolveDiscordMessageText, s as resolveReferencedReplyMediaList } from "./message-utils-Dy9KeClm.js";
|
|
15
|
+
import { n as createDiscordReplyTypingFeedback } from "./message-handler-B2cEpj5S.js";
|
|
16
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
16
17
|
import { buildAgentSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
17
18
|
import { MessageFlags } from "discord-api-types/v10";
|
|
18
19
|
import { evaluateSupplementalContextVisibility } from "openclaw/plugin-sdk/security-runtime";
|
|
19
20
|
import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
|
|
20
21
|
import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, isReplyPayloadNonTerminalToolErrorWarning, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
21
22
|
import { resolveChunkMode } from "openclaw/plugin-sdk/reply-chunking";
|
|
22
|
-
import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
23
|
+
import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
23
24
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
24
25
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
25
26
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
|
|
@@ -357,6 +358,7 @@ async function buildDiscordMessageProcessContext(params) {
|
|
|
357
358
|
...preflightAudioTranscript !== void 0 ? { Transcript: preflightAudioTranscript } : {},
|
|
358
359
|
GroupSubject: groupSubject,
|
|
359
360
|
GroupChannel: groupChannel,
|
|
361
|
+
...isGuildMessage ? { GroupRequireMention: ctx.groupRequireMention } : {},
|
|
360
362
|
UntrustedStructuredContext: untrustedContext,
|
|
361
363
|
OwnerAllowFrom: ownerAllowFrom
|
|
362
364
|
}
|
|
@@ -732,16 +734,7 @@ function shouldStartDiscordProgressDraftNow(line) {
|
|
|
732
734
|
}
|
|
733
735
|
//#endregion
|
|
734
736
|
//#region extensions/discord/src/monitor/message-handler.process.ts
|
|
735
|
-
|
|
736
|
-
return new Promise((resolve) => {
|
|
737
|
-
setTimeout(resolve, ms);
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
let replyRuntimePromise;
|
|
741
|
-
async function loadReplyRuntime() {
|
|
742
|
-
replyRuntimePromise ??= import("openclaw/plugin-sdk/reply-runtime");
|
|
743
|
-
return await replyRuntimePromise;
|
|
744
|
-
}
|
|
737
|
+
const loadReplyRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/reply-runtime"));
|
|
745
738
|
function isProcessAborted(abortSignal) {
|
|
746
739
|
return Boolean(abortSignal?.aborted);
|
|
747
740
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as mergeAbortSignals } from "./timeouts-C5TBc_9x.js";
|
|
2
|
-
import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
2
|
+
import { u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CetgvIbE.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { ComponentType, StickerFormatType } from "discord-api-types/v10";
|
|
5
5
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -3,6 +3,7 @@ import { s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
|
3
3
|
import { d as readDiscordComponentSpec } from "./components-CBPNJhVP.js";
|
|
4
4
|
import { t as parseDiscordRetryAfterBodySeconds } from "./retry-after-D5_VmM-_.js";
|
|
5
5
|
import { n as notifyDiscordInboundEventOutboundPayloadSuccess } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
6
|
+
import { createLazyRuntimeModule, createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
7
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
8
|
import { resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
8
9
|
import { resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
@@ -83,16 +84,11 @@ function normalizeDiscordApprovalPayload(payload) {
|
|
|
83
84
|
}
|
|
84
85
|
//#endregion
|
|
85
86
|
//#region extensions/discord/src/outbound-components.ts
|
|
86
|
-
|
|
87
|
-
let discordSharedInteractivePromise;
|
|
87
|
+
const loadDiscordComponentSend = createLazyRuntimeNamedExport(() => import("./send.components-C2psXc7A.js").then((n) => n.i), "sendDiscordComponentMessage");
|
|
88
88
|
async function sendDiscordComponentMessageLazy(...args) {
|
|
89
|
-
|
|
90
|
-
return await (await discordComponentSendPromise)(...args);
|
|
91
|
-
}
|
|
92
|
-
function loadDiscordSharedInteractive() {
|
|
93
|
-
discordSharedInteractivePromise ??= import("./components-CBPNJhVP.js").then((n) => n.a);
|
|
94
|
-
return discordSharedInteractivePromise;
|
|
89
|
+
return await (await loadDiscordComponentSend())(...args);
|
|
95
90
|
}
|
|
91
|
+
const loadDiscordSharedInteractive = createLazyRuntimeModule(() => import("./components-CBPNJhVP.js").then((n) => n.a));
|
|
96
92
|
function addPayloadTextFallback(spec, payload) {
|
|
97
93
|
return spec.text ? spec : {
|
|
98
94
|
...spec,
|
|
@@ -123,11 +119,7 @@ async function resolveDiscordComponentSpec(payload) {
|
|
|
123
119
|
}
|
|
124
120
|
//#endregion
|
|
125
121
|
//#region extensions/discord/src/outbound-send-context.ts
|
|
126
|
-
|
|
127
|
-
async function loadDiscordSendRuntime() {
|
|
128
|
-
discordSendRuntimePromise ??= import("./send-BYTToRY1.js").then((n) => n.t);
|
|
129
|
-
return await discordSendRuntimePromise;
|
|
130
|
-
}
|
|
122
|
+
const loadDiscordSendRuntime = createLazyRuntimeModule(() => import("./send-B_yfprXu.js").then((n) => n.t));
|
|
131
123
|
function resolveDiscordOutboundTarget(params) {
|
|
132
124
|
if (params.threadId == null) return params.to;
|
|
133
125
|
const threadId = normalizeOptionalStringifiedId(params.threadId) ?? "";
|
|
@@ -284,11 +276,7 @@ const DISCORD_INTERNAL_RUNTIME_SCAFFOLDING_TAG_RE = /<\s*\/?\s*(?:system-reminde
|
|
|
284
276
|
function stripDiscordInternalRuntimeScaffolding(text) {
|
|
285
277
|
return text.replace(DISCORD_INTERNAL_RUNTIME_SCAFFOLDING_BLOCK_RE, "").replace(DISCORD_INTERNAL_RUNTIME_SCAFFOLDING_SELF_CLOSING_RE, "").replace(DISCORD_INTERNAL_RUNTIME_SCAFFOLDING_TAG_RE, "");
|
|
286
278
|
}
|
|
287
|
-
|
|
288
|
-
function loadDiscordThreadBindings() {
|
|
289
|
-
discordThreadBindingsPromise ??= import("./thread-bindings-C1yhwdOw.js").then((n) => n.t);
|
|
290
|
-
return discordThreadBindingsPromise;
|
|
291
|
-
}
|
|
279
|
+
const loadDiscordThreadBindings = createLazyRuntimeModule(() => import("./thread-bindings-BuXtcLSp.js").then((n) => n.t));
|
|
292
280
|
function resolveDiscordWebhookIdentity(params) {
|
|
293
281
|
const usernameRaw = normalizeOptionalString(params.identity?.name);
|
|
294
282
|
const fallbackUsername = normalizeOptionalString(params.binding.label) ?? params.binding.agentId;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
1
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
3
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
3
4
|
import { getFileExtension } from "openclaw/plugin-sdk/media-mime";
|
|
4
5
|
//#region extensions/discord/src/monitor/preflight-audio.ts
|
|
5
|
-
|
|
6
|
-
function loadDiscordPreflightAudioRuntime() {
|
|
7
|
-
discordPreflightAudioRuntimePromise ??= import("./preflight-audio.runtime-CoCXMM8r.js");
|
|
8
|
-
return discordPreflightAudioRuntimePromise;
|
|
9
|
-
}
|
|
6
|
+
const loadDiscordPreflightAudioRuntime = createLazyRuntimeModule(() => import("./preflight-audio.runtime-CoCXMM8r.js"));
|
|
10
7
|
const AUDIO_ATTACHMENT_MIME_BY_EXT = new Map([
|
|
11
8
|
[".aac", "audio/aac"],
|
|
12
9
|
[".caf", "audio/x-caf"],
|