@openclaw/discord 2026.6.10 → 2026.6.11-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 +12 -12
- package/dist/{approval-handler.runtime-20qhf0uH.js → approval-handler.runtime-SsFtZQA6.js} +3 -3
- package/dist/{audit-CCffO6o7.js → audit-CAnmyf2A.js} +3 -3
- package/dist/{channel-BZ3NznY_.js → channel-YA7AbYP3.js} +14 -14
- package/dist/{channel-actions-DDT9kJXw.js → channel-actions-BJ3n5Z1l.js} +2 -2
- package/dist/{channel-actions.runtime-CfMUtfAv.js → channel-actions.runtime-D2QTRgZ9.js} +5 -5
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-DRJiHe7I.js → channel.setup-B1zDEAR7.js} +2 -2
- package/dist/{components-CXEorOhu.js → components-Dm4c_ce6.js} +1 -1
- package/dist/{conversation-identity-BvlP-djn.js → conversation-identity-DZ0BD7xO.js} +2 -2
- package/dist/{directory-config-Bg8bulWB.js → directory-config-BK1OhHa3.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BAJw6kS2.js → directory-live-DP3CmwGf.js} +1 -1
- package/dist/{handle-action.guild-admin-RxnJFLgU.js → handle-action.guild-admin-B2cOoU2D.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-D_jgYp8E.js → manager.runtime-CPHxr9B3.js} +27 -31
- package/dist/{message-handler-1sY7wU_a.js → message-handler-CKaTgBIV.js} +6 -6
- package/dist/{message-handler.preflight-Rz2OZiuq.js → message-handler.preflight--eAiaewz.js} +10 -10
- package/dist/{message-handler.process-DoynJ51o.js → message-handler.process-PhKAmrEd.js} +23 -25
- package/dist/{message-utils-ConlUKCU.js → message-utils-O1vK3kPu.js} +1 -1
- package/dist/{outbound-adapter-XuMiR77A.js → outbound-adapter-fO_7hbTh.js} +6 -6
- package/dist/{pluralkit-o6s-EP9g.js → pluralkit-B3MzPaPU.js} +1 -1
- package/dist/{provider-Cqe8M2zT.js → provider-BJaJ20MY.js} +18 -18
- package/dist/{provider-session.runtime-COsZZGlm.js → provider-session.runtime-D6xc-60s.js} +3 -3
- package/dist/provider.runtime-jNlHxUSW.js +2 -0
- package/dist/{resolve-channels-DpM2v0Am.js → resolve-channels-iJIjYfRw.js} +1 -1
- package/dist/{resolve-users-Dl6np4pH.js → resolve-users-_fv1mm1f.js} +1 -1
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +18 -18
- package/dist/runtime-api.lookup.js +4 -4
- package/dist/runtime-api.monitor-Bb5AaRzg.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/{runtime-CkdyyjTb.js → runtime-ywXByivr.js} +7 -7
- package/dist/{send-CIhsDMqs.js → send-Dc5uQX5H.js} +3 -3
- package/dist/{send.components-DxoGyTkn.js → send.components-D4bl20xr.js} +4 -4
- package/dist/{send.outbound-DaUyYuZa.js → send.outbound-5axvwLkl.js} +3 -3
- package/dist/{send.receipt-De_2iEWU.js → send.receipt-B21MspvT.js} +3 -2
- package/dist/{send.shared-gtgBGDuV.js → send.shared-9082A2sO.js} +2 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-DPCipg2M.js → subagent-hooks-NTv6B4up.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-4vmuyaBF.js → system-events-BzaI1WpN.js} +1 -1
- package/dist/{target-resolver-CVrOhQyC.js → target-resolver-agnOrtOU.js} +2 -2
- package/dist/targets-ClUPljCU.js +3 -0
- package/dist/{thread-bindings-D2SBj6F8.js → thread-bindings-DNitaHVh.js} +4 -4
- package/dist/{thread-bindings.discord-api-C7STOVXm.js → thread-bindings.discord-api-CjYNuvZa.js} +4 -4
- package/dist/{thread-bindings.manager-CN4MIGoJ.js → thread-bindings.manager-PZvJ4TJx.js} +3 -3
- package/dist/{transcripts-source-39NBdNeE.js → transcripts-source-Bi8N6h5X.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CxIYS3vQ.js → typing-BdRqXUN3.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +4 -0
- package/package.json +6 -5
- package/skills/discord/SKILL.md +136 -0
- package/dist/provider.runtime-Bz_Z6Iop.js +0 -2
- package/dist/runtime-api.monitor-Cv5KB0eR.js +0 -6
- package/dist/targets-CRGgRKs7.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-ywXByivr.js";
|
|
2
2
|
export { handleDiscordAction };
|
package/dist/api.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, Ut as resolveDiscordChannelId, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId, o as normalizeDiscordOutboundTarget } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
3
3
|
import { a as mergeDiscordAccountConfig, f as resolveDiscordMaxLinesPerMessage, i as listEnabledDiscordAccounts, l as resolveDiscordAccountConfig, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
4
|
-
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-
|
|
4
|
+
import { _ as parseDiscordComponentCustomId, b as parseDiscordModalCustomIdForInteraction, c as buildDiscordComponentMessage, d as readDiscordComponentSpec, f as resolveDiscordComponentAttachmentName, g as buildDiscordModalCustomId, h as buildDiscordComponentCustomId, l as buildDiscordComponentMessageFlags, m as DISCORD_MODAL_CUSTOM_ID_KEY, n as formatDiscordComponentEventText, o as DiscordFormModal, p as DISCORD_COMPONENT_CUSTOM_ID_KEY, r as buildDiscordInteractiveComponents, s as createDiscordFormModal, u as DISCORD_COMPONENT_ATTACHMENT_PREFIX, v as parseDiscordComponentCustomIdForInteraction, y as parseDiscordModalCustomId } from "./components-Dm4c_ce6.js";
|
|
5
5
|
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-4GFMoWu0.js";
|
|
6
|
-
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-
|
|
7
|
-
import "./targets-
|
|
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-
|
|
6
|
+
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-agnOrtOU.js";
|
|
7
|
+
import "./targets-ClUPljCU.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DZ0BD7xO.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-YA7AbYP3.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-
|
|
15
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as fetchPluralKitMessageInfo } from "./pluralkit-
|
|
12
|
+
import { t as discordSetupPlugin } from "./channel.setup-B1zDEAR7.js";
|
|
13
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-NTv6B4up.js";
|
|
14
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-B2cOoU2D.js";
|
|
15
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BK1OhHa3.js";
|
|
16
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-B3MzPaPU.js";
|
|
17
17
|
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-CxnDikWm.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-D2QTRgZ9.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
|
-
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-
|
|
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-B21MspvT.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-9082A2sO.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DZ0BD7xO.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
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-B21MspvT.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-9082A2sO.js";
|
|
4
|
+
import "./send-Dc5uQX5H.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({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, a as normalizeDiscordMessagingTarget, i as looksLikeDiscordTargetId } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
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
|
-
import { x as resolveDiscordOutboundSessionRoute } from "./components-
|
|
4
|
+
import { x as resolveDiscordOutboundSessionRoute } from "./components-Dm4c_ce6.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-DZ0BD7xO.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-BJ3n5Z1l.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-
|
|
11
|
+
import { n as discordOutbound } from "./outbound-adapter-fO_7hbTh.js";
|
|
12
12
|
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-D11J9bXI.js";
|
|
13
13
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
14
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -126,13 +126,13 @@ let discordProbeRuntimePromise;
|
|
|
126
126
|
let discordAuditModulePromise;
|
|
127
127
|
let discordSendModulePromise;
|
|
128
128
|
let discordDirectoryLiveModulePromise;
|
|
129
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
130
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
131
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
132
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
133
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
129
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-BK1OhHa3.js").then((n) => n.t));
|
|
130
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-iJIjYfRw.js").then((n) => n.n));
|
|
131
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-_fv1mm1f.js").then((n) => n.n));
|
|
132
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-PZvJ4TJx.js").then((n) => n.a));
|
|
133
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-agnOrtOU.js").then((n) => n.r));
|
|
134
134
|
async function loadDiscordProviderRuntime() {
|
|
135
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
135
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-jNlHxUSW.js");
|
|
136
136
|
return await discordProviderRuntimePromise;
|
|
137
137
|
}
|
|
138
138
|
async function loadDiscordProbeRuntime() {
|
|
@@ -140,15 +140,15 @@ async function loadDiscordProbeRuntime() {
|
|
|
140
140
|
return await discordProbeRuntimePromise;
|
|
141
141
|
}
|
|
142
142
|
async function loadDiscordAuditModule() {
|
|
143
|
-
discordAuditModulePromise ??= import("./audit-
|
|
143
|
+
discordAuditModulePromise ??= import("./audit-CAnmyf2A.js").then((n) => n.n);
|
|
144
144
|
return await discordAuditModulePromise;
|
|
145
145
|
}
|
|
146
146
|
async function loadDiscordSendModule() {
|
|
147
|
-
discordSendModulePromise ??= import("./send-
|
|
147
|
+
discordSendModulePromise ??= import("./send-Dc5uQX5H.js").then((n) => n.t);
|
|
148
148
|
return await discordSendModulePromise;
|
|
149
149
|
}
|
|
150
150
|
async function loadDiscordDirectoryLiveModule() {
|
|
151
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
151
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-DP3CmwGf.js").then((n) => n.t);
|
|
152
152
|
return await discordDirectoryLiveModulePromise;
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as inspectDiscordAccount } from "./account-inspect-DDZtT5C8.js";
|
|
2
2
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-P19jm1lf.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-Dm4c_ce6.js";
|
|
4
4
|
import { i as withDiscordInboundEventDeliveryMetadata } from "./inbound-event-delivery-CEPlt2uz.js";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createUnionActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -42,7 +42,7 @@ function resolveDiscordActionExecutionMode({ action }) {
|
|
|
42
42
|
}
|
|
43
43
|
let discordChannelActionsRuntimePromise;
|
|
44
44
|
async function loadDiscordChannelActionsRuntime() {
|
|
45
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
45
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-D2QTRgZ9.js");
|
|
46
46
|
return await discordChannelActionsRuntimePromise;
|
|
47
47
|
}
|
|
48
48
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ut as resolveDiscordChannelId } from "./send.receipt-
|
|
2
|
-
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-
|
|
3
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
4
|
-
import "./targets-
|
|
1
|
+
import { Ut as resolveDiscordChannelId } from "./send.receipt-B21MspvT.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-Dm4c_ce6.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-ywXByivr.js";
|
|
4
|
+
import "./targets-ClUPljCU.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-B2cOoU2D.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-YA7AbYP3.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
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
3
|
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-D11J9bXI.js";
|
|
4
|
-
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-
|
|
5
|
-
import { t as resolveDiscordUserAllowlist } from "./resolve-users-
|
|
4
|
+
import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-iJIjYfRw.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-_fv1mm1f.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-
|
|
1
|
+
import { B as Container, F as Modal, G as RoleSelectMenu, H as LinkButton, Ht as parseDiscordTarget, I as RadioGroup, J as Separator, K as Row, L as TextInput, N as CheckboxGroup, P as Label, Q as UserSelectMenu, R as Button, U as MediaGallery, V as File, W as MentionableSelectMenu, Wt as __exportAll, X as TextDisplay, Y as StringSelectMenu, Z as Thumbnail, et as parseCustomId, q as Section, z as ChannelSelectMenu } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
4
4
|
import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
@@ -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-SsFtZQA6.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
235
235
|
})
|
|
236
236
|
});
|
|
237
237
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-BK1OhHa3.js";
|
|
2
2
|
//#region extensions/discord/directory-contract-api.ts
|
|
3
3
|
const discordDirectoryContractPlugin = {
|
|
4
4
|
id: "discord",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-B21MspvT.js";
|
|
2
2
|
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-P19jm1lf.js";
|
|
3
3
|
import { n as fetchDiscord } from "./api-4GFMoWu0.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-C-MqM-B_.js";
|
package/dist/{handle-action.guild-admin-RxnJFLgU.js → handle-action.guild-admin-B2cOoU2D.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-ywXByivr.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
|
-
import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-
|
|
3
|
+
import { n as isTrustedRequesterGuildAdminAction } from "./channel-actions-BJ3n5Z1l.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
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerDiscordSubagentHooks } from "./subagent-hooks-api.js";
|
|
2
|
-
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-
|
|
2
|
+
import { t as discordVoiceTranscriptsSourceProvider } from "./transcripts-source-Bi8N6h5X.js";
|
|
3
3
|
import "./transcripts-source-api.js";
|
|
4
4
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
5
5
|
//#region extensions/discord/index.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget, _ as VoiceStateUpdateListener, c as discord_exports, h as ResumedListener, jt as getGuildVoiceState, m as ReadyListener } from "./send.receipt-B21MspvT.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-5axvwLkl.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-BJaJ20MY.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";
|
|
@@ -19,7 +19,7 @@ import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME, REALTIME_VOICE_AGENT_CONTROL_TO
|
|
|
19
19
|
import { agentCommandFromIngress, getTtsProvider, resolveAgentDir, resolveTtsConfig, resolveTtsPrefsPath } from "openclaw/plugin-sdk/agent-runtime";
|
|
20
20
|
import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
21
21
|
import { spawn } from "node:child_process";
|
|
22
|
-
import { PassThrough, Readable, Transform } from "node:stream";
|
|
22
|
+
import { PassThrough, Readable, Transform, pipeline } from "node:stream";
|
|
23
23
|
import { Application, OpusError, createDecoder, createEncoder } from "libopus-wasm";
|
|
24
24
|
import { resolveRealtimeBootstrapContextInstructions } from "openclaw/plugin-sdk/realtime-bootstrap-context";
|
|
25
25
|
import { parseTtsDirectives } from "openclaw/plugin-sdk/speech";
|
|
@@ -458,6 +458,14 @@ async function resolveDiscordVoiceRealtimeBootstrapContext(params) {
|
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
|
+
//#region extensions/discord/src/voice/log-preview.ts
|
|
462
|
+
const DISCORD_VOICE_LOG_PREVIEW_CHARS = 500;
|
|
463
|
+
function formatVoiceLogPreview(text) {
|
|
464
|
+
const oneLine = text.replace(/\s+/g, " ").trim();
|
|
465
|
+
if (oneLine.length <= DISCORD_VOICE_LOG_PREVIEW_CHARS) return oneLine;
|
|
466
|
+
return `${oneLine.slice(0, DISCORD_VOICE_LOG_PREVIEW_CHARS)}...`;
|
|
467
|
+
}
|
|
468
|
+
//#endregion
|
|
461
469
|
//#region extensions/discord/src/voice/agent-control.ts
|
|
462
470
|
async function maybeControlDiscordVoiceAgentRun(params) {
|
|
463
471
|
if (!shouldAutoControlRealtimeVoiceAgentText(params.text)) return { handled: false };
|
|
@@ -532,7 +540,6 @@ const DISCORD_REALTIME_RECENT_AGENT_PROXY_CONSULT_LIMIT = 16;
|
|
|
532
540
|
const DISCORD_REALTIME_RECENT_AGENT_PROXY_CONSULT_TTL_MS = 15e3;
|
|
533
541
|
const DISCORD_REALTIME_IGNORED_WAKE_NAME_CONTEXT_TTL_MS = 1e4;
|
|
534
542
|
const DISCORD_REALTIME_WAKE_NAME_FOLLOWUP_TTL_MS = 1e4;
|
|
535
|
-
const DISCORD_REALTIME_LOG_PREVIEW_CHARS = 500;
|
|
536
543
|
const DISCORD_REALTIME_DEFAULT_MIN_BARGE_IN_AUDIO_END_MS = 250;
|
|
537
544
|
const DISCORD_REALTIME_FORCED_CONSULT_FALLBACK_DELAY_MS = 200;
|
|
538
545
|
const DISCORD_REALTIME_DUPLICATE_ERROR_SUPPRESS_MS = 6e4;
|
|
@@ -556,11 +563,6 @@ const DISCORD_REALTIME_VERBOSE_OMITTED_EVENTS = new Set([
|
|
|
556
563
|
"response.audio.delta",
|
|
557
564
|
"response.output_audio.delta"
|
|
558
565
|
]);
|
|
559
|
-
function formatRealtimeLogPreview(text) {
|
|
560
|
-
const oneLine = text.replace(/\s+/g, " ").trim();
|
|
561
|
-
if (oneLine.length <= DISCORD_REALTIME_LOG_PREVIEW_CHARS) return oneLine;
|
|
562
|
-
return `${oneLine.slice(0, DISCORD_REALTIME_LOG_PREVIEW_CHARS)}...`;
|
|
563
|
-
}
|
|
564
566
|
function formatRealtimeInterruptionLog(event) {
|
|
565
567
|
const detail = event.detail ? ` ${event.detail}` : "";
|
|
566
568
|
if (event.direction === "client") {
|
|
@@ -709,8 +711,9 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
709
711
|
this.wakeNameAckedForTurn = false;
|
|
710
712
|
this.wakeNameAckIndex = 0;
|
|
711
713
|
this.playerIdleHandler = () => {
|
|
714
|
+
const hadOutputAudio = this.isOutputAudioActive();
|
|
712
715
|
this.resetOutputStream("player-idle");
|
|
713
|
-
this.completeExactSpeechResponse("player-idle");
|
|
716
|
+
if (hadOutputAudio) this.completeExactSpeechResponse("player-idle");
|
|
714
717
|
};
|
|
715
718
|
this.talkback = createRealtimeVoiceAgentTalkbackQueue({
|
|
716
719
|
debounceMs: this.realtimeConfig?.debounceMs ?? DISCORD_REALTIME_TALKBACK_DEBOUNCE_MS,
|
|
@@ -781,7 +784,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
781
784
|
clearAudio: () => this.clearOutputAudio("provider-clear-audio")
|
|
782
785
|
},
|
|
783
786
|
onTranscript: (role, text, isFinal) => {
|
|
784
|
-
if (isFinal && text.trim()) logger$2.info(`discord voice: realtime ${role} transcript (${text.length} chars): ${
|
|
787
|
+
if (isFinal && text.trim()) logger$2.info(`discord voice: realtime ${role} transcript (${text.length} chars): ${formatVoiceLogPreview(text)}`);
|
|
785
788
|
if (isFinal && role === "assistant") this.suppressDuplicateControlSpeech(text);
|
|
786
789
|
if (role !== "user") return;
|
|
787
790
|
if (!isFinal) {
|
|
@@ -961,9 +964,10 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
961
964
|
handleOutputStreamClosed(stream, reason) {
|
|
962
965
|
if (this.outputStream !== stream) return;
|
|
963
966
|
this.logOutputAudioStopped(reason);
|
|
967
|
+
this.clearOutputPlaybackWatchdog();
|
|
964
968
|
this.outputStream = null;
|
|
965
969
|
this.resetOutputAudioStats();
|
|
966
|
-
this.completeExactSpeechResponse(reason
|
|
970
|
+
this.completeExactSpeechResponse(reason);
|
|
967
971
|
}
|
|
968
972
|
queueOutputAudio(stream, discordPcm) {
|
|
969
973
|
if (this.outputActivity.snapshot().playbackStarted) {
|
|
@@ -982,7 +986,11 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
982
986
|
this.resetOutputStream("opus-encode-error");
|
|
983
987
|
});
|
|
984
988
|
opusStream.once("close", () => this.handleOutputStreamClosed(stream, "stream-close"));
|
|
985
|
-
stream
|
|
989
|
+
pipeline(stream, opusStream, (err) => {
|
|
990
|
+
if (!err) return;
|
|
991
|
+
logger$2.warn(`discord voice: realtime output pipeline failed guild=${this.params.entry.guildId} channel=${this.params.entry.channelId}: ${formatErrorMessage(err)}`);
|
|
992
|
+
this.resetOutputStream("output-pipeline-error");
|
|
993
|
+
});
|
|
986
994
|
if (this.outputPacedBuffer.length > 0) {
|
|
987
995
|
stream.write(this.outputPacedBuffer);
|
|
988
996
|
this.outputPacedBuffer = Buffer.alloc(0);
|
|
@@ -1191,7 +1199,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1191
1199
|
session.submitToolResult(callId, { error: message });
|
|
1192
1200
|
return;
|
|
1193
1201
|
}
|
|
1194
|
-
logger$2.info(`discord voice: realtime consult requested call=${callId || "unknown"} voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId} question=${
|
|
1202
|
+
logger$2.info(`discord voice: realtime consult requested call=${callId || "unknown"} voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId} question=${formatVoiceLogPreview(consultMessage)}`);
|
|
1195
1203
|
const nativeConsult = this.forcedConsults.recordNativeConsult(event.args, callId);
|
|
1196
1204
|
const pendingConsult = nativeConsult.kind === "pending" ? nativeConsult.handle : void 0;
|
|
1197
1205
|
if (pendingConsult) this.forcedConsults.rememberQuestion(pendingConsult, consultMessage);
|
|
@@ -1227,7 +1235,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1227
1235
|
});
|
|
1228
1236
|
if (recent) this.setRecentAgentProxyConsultPromise(recent, promise);
|
|
1229
1237
|
promise.then((text) => {
|
|
1230
|
-
logger$2.info(`discord voice: realtime consult answer (${text.length} chars) voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId} speaker=${context.speakerLabel} owner=${context.senderIsOwner}: ${
|
|
1238
|
+
logger$2.info(`discord voice: realtime consult answer (${text.length} chars) voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId} speaker=${context.speakerLabel} owner=${context.senderIsOwner}: ${formatVoiceLogPreview(text)}`);
|
|
1231
1239
|
session.submitToolResult(callId, { text });
|
|
1232
1240
|
}).catch((error) => {
|
|
1233
1241
|
logger$2.warn(`discord voice: realtime consult failed call=${callId || "unknown"}: ${formatErrorMessage(error)}`);
|
|
@@ -1377,7 +1385,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1377
1385
|
const skipReason = classifySkippableRealtimeVoiceConsultTranscript(question);
|
|
1378
1386
|
if (skipReason) {
|
|
1379
1387
|
const context = this.consumePendingSpeakerContext();
|
|
1380
|
-
logger$2.info(`discord voice: realtime forced agent consult skipped reason=${skipReason} chars=${question.length} speaker=${context?.speakerLabel ?? "unknown"} transcript=${
|
|
1388
|
+
logger$2.info(`discord voice: realtime forced agent consult skipped reason=${skipReason} chars=${question.length} speaker=${context?.speakerLabel ?? "unknown"} transcript=${formatVoiceLogPreview(question)}`);
|
|
1381
1389
|
return;
|
|
1382
1390
|
}
|
|
1383
1391
|
let context = speakerContext ?? this.consumePendingSpeakerContext();
|
|
@@ -1421,7 +1429,7 @@ var DiscordRealtimeVoiceSession = class {
|
|
|
1421
1429
|
});
|
|
1422
1430
|
this.setRecentAgentProxyConsultPromise(pending, promise);
|
|
1423
1431
|
const text = await promise;
|
|
1424
|
-
logger$2.info(`discord voice: realtime forced agent consult answer (${text.length} chars) elapsedMs=${Date.now() - startedAt} voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId}: ${
|
|
1432
|
+
logger$2.info(`discord voice: realtime forced agent consult answer (${text.length} chars) elapsedMs=${Date.now() - startedAt} voiceSession=${this.params.entry.voiceSessionKey} supervisorSession=${this.params.entry.route.sessionKey} agent=${this.params.entry.route.agentId}: ${formatVoiceLogPreview(text)}`);
|
|
1425
1433
|
if (text.trim()) this.enqueueExactSpeechMessage(text);
|
|
1426
1434
|
} catch (error) {
|
|
1427
1435
|
logger$2.warn(`discord voice: realtime forced agent consult failed elapsedMs=${Date.now() - startedAt}: ${formatErrorMessage(error)}`);
|
|
@@ -1781,13 +1789,7 @@ async function synthesizeVoiceReplyAudio(params) {
|
|
|
1781
1789
|
}
|
|
1782
1790
|
//#endregion
|
|
1783
1791
|
//#region extensions/discord/src/voice/segment.ts
|
|
1784
|
-
const VOICE_TRANSCRIPT_LOG_PREVIEW_CHARS = 500;
|
|
1785
1792
|
const logger$1 = createSubsystemLogger("discord/voice");
|
|
1786
|
-
function formatVoiceTranscriptLogPreview(text) {
|
|
1787
|
-
const oneLine = text.replace(/\s+/g, " ").trim();
|
|
1788
|
-
if (oneLine.length <= VOICE_TRANSCRIPT_LOG_PREVIEW_CHARS) return oneLine;
|
|
1789
|
-
return `${oneLine.slice(0, VOICE_TRANSCRIPT_LOG_PREVIEW_CHARS)}...`;
|
|
1790
|
-
}
|
|
1791
1793
|
async function processDiscordVoiceSegment(params) {
|
|
1792
1794
|
const { entry, wavPath, userId, durationSeconds } = params;
|
|
1793
1795
|
logVoiceVerbose(`segment processing (${durationSeconds.toFixed(2)}s): guild ${entry.guildId} channel ${entry.channelId}`);
|
|
@@ -1814,7 +1816,7 @@ async function processDiscordVoiceSegment(params) {
|
|
|
1814
1816
|
return;
|
|
1815
1817
|
}
|
|
1816
1818
|
logVoiceVerbose(`transcription ok (${transcript.length} chars): guild ${entry.guildId} channel ${entry.channelId}`);
|
|
1817
|
-
logVoiceVerbose(`transcript from ${ingress.speakerLabel} (${userId}) in guild ${entry.guildId} channel ${entry.channelId}: ${
|
|
1819
|
+
logVoiceVerbose(`transcript from ${ingress.speakerLabel} (${userId}) in guild ${entry.guildId} channel ${entry.channelId}: ${formatVoiceLogPreview(transcript)}`);
|
|
1818
1820
|
if (params.transcripts) {
|
|
1819
1821
|
await params.transcripts.onUtterance({
|
|
1820
1822
|
sessionId: params.transcripts.sessionId,
|
|
@@ -2002,7 +2004,6 @@ var DiscordVoiceSpeakerContextResolver = class {
|
|
|
2002
2004
|
//#endregion
|
|
2003
2005
|
//#region extensions/discord/src/voice/manager.ts
|
|
2004
2006
|
const logger = createSubsystemLogger("discord/voice");
|
|
2005
|
-
const VOICE_LOG_PREVIEW_CHARS = 500;
|
|
2006
2007
|
const FOLLOW_USERS_RECONCILE_INTERVAL_MS = 1e4;
|
|
2007
2008
|
const FOLLOW_USERS_RECONCILE_MAX_GUILDS_PER_RUN = 4;
|
|
2008
2009
|
const FOLLOW_USERS_RECONCILE_MAX_REST_LOOKUPS_PER_RUN = 32;
|
|
@@ -2022,11 +2023,6 @@ function logFollowUserReconcileVerbose(reason, message) {
|
|
|
2022
2023
|
}
|
|
2023
2024
|
logVoiceVerbose(message);
|
|
2024
2025
|
}
|
|
2025
|
-
function formatVoiceLogPreview(text) {
|
|
2026
|
-
const oneLine = text.replace(/\s+/g, " ").trim();
|
|
2027
|
-
if (oneLine.length <= VOICE_LOG_PREVIEW_CHARS) return oneLine;
|
|
2028
|
-
return `${oneLine.slice(0, VOICE_LOG_PREVIEW_CHARS)}...`;
|
|
2029
|
-
}
|
|
2030
2026
|
function isVoiceConnectionDestroyed(connection, voiceSdk) {
|
|
2031
2027
|
return connection.state.status === voiceSdk.VoiceConnectionStatus.Destroyed;
|
|
2032
2028
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
1
|
+
import { I as createDiscordRestClient } from "./send.shared-9082A2sO.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-
|
|
5
|
-
import { t as sendTyping } from "./typing-
|
|
3
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-CjYNuvZa.js";
|
|
4
|
+
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-O1vK3kPu.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-BdRqXUN3.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { createChannelRunQueue, createTypingCallbacks, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -178,7 +178,7 @@ function resolveDiscordAcceptedTypingPrestart(ctx) {
|
|
|
178
178
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
179
179
|
let messageProcessRuntimePromise;
|
|
180
180
|
async function loadMessageProcessRuntime() {
|
|
181
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-
|
|
181
|
+
messageProcessRuntimePromise ??= import("./message-handler.process-PhKAmrEd.js");
|
|
182
182
|
return await messageProcessRuntimePromise;
|
|
183
183
|
}
|
|
184
184
|
async function processDiscordQueuedMessage(params) {
|
|
@@ -307,7 +307,7 @@ function createDiscordReplyTypingFeedback(params) {
|
|
|
307
307
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
308
308
|
let messagePreflightRuntimePromise;
|
|
309
309
|
async function loadMessagePreflightRuntime() {
|
|
310
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight
|
|
310
|
+
messagePreflightRuntimePromise ??= import("./message-handler.preflight--eAiaewz.js");
|
|
311
311
|
return await messagePreflightRuntimePromise;
|
|
312
312
|
}
|
|
313
313
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-Rz2OZiuq.js → message-handler.preflight--eAiaewz.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-
|
|
1
|
+
import { c as discord_exports, k as Message, mt as getChannelMessage } from "./send.receipt-B21MspvT.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-DZ0BD7xO.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-CjYNuvZa.js";
|
|
7
|
+
import "./thread-bindings-DNitaHVh.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-BJaJ20MY.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-O1vK3kPu.js";
|
|
10
10
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-CEsfDF0L.js";
|
|
11
11
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { MessageReferenceType, MessageType } from "discord-api-types/v10";
|
|
@@ -29,7 +29,7 @@ async function loadConversationRuntime$1() {
|
|
|
29
29
|
return await conversationRuntimePromise$1;
|
|
30
30
|
}
|
|
31
31
|
async function loadDiscordSendRuntime() {
|
|
32
|
-
discordSendRuntimePromise ??= import("./send-
|
|
32
|
+
discordSendRuntimePromise ??= import("./send-Dc5uQX5H.js").then((n) => n.t);
|
|
33
33
|
return await discordSendRuntimePromise;
|
|
34
34
|
}
|
|
35
35
|
function resolveDiscordDmPairingSenderId(sender) {
|
|
@@ -435,7 +435,7 @@ let preflightAudioRuntimePromise;
|
|
|
435
435
|
let systemEventsRuntimePromise;
|
|
436
436
|
let discordThreadingRuntimePromise;
|
|
437
437
|
async function loadPluralKitRuntime() {
|
|
438
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
438
|
+
pluralkitRuntimePromise ??= import("./pluralkit-B3MzPaPU.js").then((n) => n.n);
|
|
439
439
|
return await pluralkitRuntimePromise;
|
|
440
440
|
}
|
|
441
441
|
async function loadPreflightAudioRuntime() {
|
|
@@ -443,11 +443,11 @@ async function loadPreflightAudioRuntime() {
|
|
|
443
443
|
return await preflightAudioRuntimePromise;
|
|
444
444
|
}
|
|
445
445
|
async function loadSystemEventsRuntime() {
|
|
446
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
446
|
+
systemEventsRuntimePromise ??= import("./system-events-BzaI1WpN.js");
|
|
447
447
|
return await systemEventsRuntimePromise;
|
|
448
448
|
}
|
|
449
449
|
async function loadDiscordThreadingRuntime() {
|
|
450
|
-
discordThreadingRuntimePromise ??= import("./provider-
|
|
450
|
+
discordThreadingRuntimePromise ??= import("./provider-BJaJ20MY.js").then((n) => n.S);
|
|
451
451
|
return await discordThreadingRuntimePromise;
|
|
452
452
|
}
|
|
453
453
|
function isPreflightAborted(abortSignal) {
|