@openclaw/discord 2026.5.27 → 2026.5.28-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-runtime-api.js +1 -1
- package/dist/{api-Kq7vtaSO.js → api-ChQJ1kfZ.js} +2 -5
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-BDxD97LJ.js → approval-handler.runtime-pEIfYHQG.js} +5 -18
- package/dist/{audit-BdUjE2tr.js → audit-CEJs-ZOq.js} +3 -3
- package/dist/{channel-9YoMy5Jf.js → channel-DPhpYUJD.js} +15 -15
- package/dist/{channel-actions-DZfkB0nd.js → channel-actions-CAfBgXn1.js} +2 -2
- package/dist/{channel-actions.runtime-suaDJHH0.js → channel-actions.runtime-CwCyNZkN.js} +10 -13
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-B-kHacpx.js → channel.setup-CpVPrc0F.js} +2 -2
- package/dist/{components-Dlc81IU5.js → components-Ynd-Vfsr.js} +34 -12
- package/dist/contract-api.js +2 -2
- package/dist/{conversation-identity-DAEgiGDV.js → conversation-identity-DbJP9mrG.js} +2 -2
- package/dist/{directory-config-Cgp0csDd.js → directory-config-CzVAco4Z.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-C-ECRrM8.js → directory-live-OYvKvO_R.js} +2 -2
- package/dist/{handle-action.guild-admin-DWFTAcfd.js → handle-action.guild-admin-lQMKNF5k.js} +11 -8
- package/dist/index.js +1 -1
- package/dist/{manager.runtime-D6V2SPKr.js → manager.runtime-B_xrVTWf.js} +3 -4
- package/dist/{message-handler-B5-UG_oD.js → message-handler-BM5VbEP3.js} +6 -6
- package/dist/{message-handler.preflight-Ddww-wnF.js → message-handler.preflight-NWBbCKig.js} +10 -10
- package/dist/{message-handler.process-HWGh2NOP.js → message-handler.process-BUGG-Fsv.js} +14 -15
- package/dist/{message-utils-4w0_DPFE.js → message-utils-uONSGxcw.js} +1 -1
- package/dist/{outbound-adapter-DYUYRaBd.js → outbound-adapter-CDcIemWV.js} +9 -7
- package/dist/{pluralkit-BS1MuvYs.js → pluralkit-D5BSur8g.js} +1 -1
- package/dist/{probe-DfIM7zSY.js → probe-CSBPZIYV.js} +1 -1
- package/dist/{probe.runtime-DoXDN3rt.js → probe.runtime-BhWW0223.js} +1 -1
- package/dist/{provider-CO6pih5z.js → provider-CoyiVUd5.js} +94 -43
- package/dist/{provider-session.runtime-BD5XLPI8.js → provider-session.runtime-Ch0qhK0p.js} +3 -3
- package/dist/provider.runtime-DazBQ_13.js +2 -0
- package/dist/{resolve-allowlist-common-QzX-w4-_.js → resolve-allowlist-common-CzfIcLSO.js} +1 -1
- package/dist/{resolve-channels-pD06YNCU.js → resolve-channels-BjXtUlXb.js} +3 -3
- package/dist/{resolve-users-BiWLqNNO.js → resolve-users-DY6Sa5l0.js} +3 -3
- package/dist/retry-after-CSukypPP.js +21 -0
- package/dist/{runtime-xSazIM0F.js → runtime-CiHKoHjw.js} +26 -23
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-BYyGzDrT.js +5 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-BzXZ8iUI.js → send-BBY2mPUE.js} +7 -7
- package/dist/{send.components-AK8K4TwB.js → send.components-C9OG2oNd.js} +6 -6
- package/dist/{send.outbound-ZrMnBa8C.js → send.outbound-DZxH3H5t.js} +3 -3
- package/dist/{send.receipt-BzfsP3Bb.js → send.receipt-zNKgqYqU.js} +6 -14
- package/dist/{send.shared-ehnDGwXx.js → send.shared-D2rnoZ6i.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{subagent-hooks-Di_2iXU8.js → subagent-hooks-CLe88Fgo.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{system-events-DbqKnNPF.js → system-events-BZyO1kxg.js} +1 -1
- package/dist/{target-resolver-DXPvq5-L.js → target-resolver-Der0K9Um.js} +2 -2
- package/dist/targets-CZf4_VtX.js +3 -0
- package/dist/{thread-bindings-Bw40FTRZ.js → thread-bindings-Bx9iaVSx.js} +4 -4
- package/dist/{thread-bindings.discord-api-irWYI8YX.js → thread-bindings.discord-api-Deuhxjj4.js} +4 -4
- package/dist/{thread-bindings.manager-LoYZzlss.js → thread-bindings.manager-moDGXTgH.js} +3 -3
- package/dist/{transcripts-source-CwahHAYt.js → transcripts-source-Bnm3Dvrt.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-Cv09OhaY.js → typing-C6Q3TeK_.js} +1 -1
- package/npm-shrinkwrap.json +3 -49
- package/package.json +5 -7
- package/dist/inbound-context-B5EsqsSr.js +0 -48
- package/dist/provider.runtime-pUGk7VR5.js +0 -2
- package/dist/runtime-api.monitor-BjgSsR6H.js +0 -5
- package/dist/targets-BBVHRaeO.js +0 -3
- package/dist/test-api.js +0 -45
- package/node_modules/agent-base/LICENSE +0 -22
- package/node_modules/agent-base/README.md +0 -69
- package/node_modules/agent-base/dist/helpers.d.ts +0 -10
- package/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
- package/node_modules/agent-base/dist/helpers.js +0 -37
- package/node_modules/agent-base/dist/helpers.js.map +0 -1
- package/node_modules/agent-base/dist/index.d.ts +0 -37
- package/node_modules/agent-base/dist/index.d.ts.map +0 -1
- package/node_modules/agent-base/dist/index.js +0 -146
- package/node_modules/agent-base/dist/index.js.map +0 -1
- package/node_modules/agent-base/package.json +0 -46
- package/node_modules/debug/LICENSE +0 -20
- package/node_modules/debug/README.md +0 -481
- package/node_modules/debug/package.json +0 -64
- package/node_modules/debug/src/browser.js +0 -272
- package/node_modules/debug/src/common.js +0 -292
- package/node_modules/debug/src/index.js +0 -10
- package/node_modules/debug/src/node.js +0 -263
- package/node_modules/https-proxy-agent/LICENSE +0 -22
- package/node_modules/https-proxy-agent/README.md +0 -70
- package/node_modules/https-proxy-agent/dist/index.d.ts +0 -43
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
- package/node_modules/https-proxy-agent/dist/index.js +0 -150
- package/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -12
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -94
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/https-proxy-agent/package.json +0 -50
- package/node_modules/ms/index.js +0 -162
- package/node_modules/ms/license.md +0 -21
- package/node_modules/ms/package.json +0 -38
- package/node_modules/ms/readme.md +0 -59
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as handleDiscordAction } from "./runtime-
|
|
1
|
+
import { t as handleDiscordAction } from "./runtime-CiHKoHjw.js";
|
|
2
2
|
export { handleDiscordAction };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as parseRetryAfterHeaderSeconds } from "./retry-after-CSukypPP.js";
|
|
1
2
|
import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
2
3
|
import { resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
|
|
3
4
|
//#region extensions/discord/src/error-body.ts
|
|
@@ -41,11 +42,7 @@ function parseRetryAfterSeconds(text, response) {
|
|
|
41
42
|
if (retryAfter !== void 0) return retryAfter;
|
|
42
43
|
const header = response.headers.get("Retry-After");
|
|
43
44
|
if (!header) return;
|
|
44
|
-
|
|
45
|
-
if (Number.isFinite(parsed) && parsed >= 0) return parsed;
|
|
46
|
-
const retryAt = Date.parse(header);
|
|
47
|
-
if (!Number.isFinite(retryAt)) return;
|
|
48
|
-
return Math.max(0, (retryAt - Date.now()) / 1e3);
|
|
45
|
+
return parseRetryAfterHeaderSeconds(header);
|
|
49
46
|
}
|
|
50
47
|
function formatRetryAfterSeconds(value) {
|
|
51
48
|
if (value === void 0 || !Number.isFinite(value) || value < 0) return;
|
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-zNKgqYqU.js";
|
|
2
2
|
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-dXTfmnSZ.js";
|
|
3
3
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.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-
|
|
5
|
-
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-
|
|
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-
|
|
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-Ynd-Vfsr.js";
|
|
5
|
+
import { n as fetchDiscord, r as requestDiscord, t as DiscordApiError } from "./api-ChQJ1kfZ.js";
|
|
6
|
+
import { i as parseDiscordSendTarget, n as resolveDiscordTarget } from "./target-resolver-Der0K9Um.js";
|
|
7
|
+
import "./targets-CZf4_VtX.js";
|
|
8
|
+
import { a as getDiscordExecApprovalApprovers, c as shouldSuppressLocalDiscordExecApprovalPrompt, o as isDiscordExecApprovalApprover, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DbJP9mrG.js";
|
|
9
|
+
import { i as resolveDiscordGroupToolPolicy, n as collectDiscordStatusIssues, r as resolveDiscordGroupRequireMention, t as discordPlugin } from "./channel-DPhpYUJD.js";
|
|
10
10
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
11
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
12
|
-
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-
|
|
13
|
-
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-
|
|
14
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
-
import { t as fetchPluralKitMessageInfo } from "./pluralkit-
|
|
16
|
-
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-
|
|
11
|
+
import { t as discordSetupPlugin } from "./channel.setup-CpVPrc0F.js";
|
|
12
|
+
import { n as handleDiscordSubagentEnded, r as handleDiscordSubagentSpawning, t as handleDiscordSubagentDeliveryTarget } from "./subagent-hooks-CLe88Fgo.js";
|
|
13
|
+
import { t as tryHandleDiscordMessageActionGuildAdmin } from "./handle-action.guild-admin-lQMKNF5k.js";
|
|
14
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-CzVAco4Z.js";
|
|
15
|
+
import { t as fetchPluralKitMessageInfo } from "./pluralkit-D5BSur8g.js";
|
|
16
|
+
import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-CSBPZIYV.js";
|
|
17
17
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
18
18
|
import { a as mergeAbortSignals, i as DISCORD_DEFAULT_LISTENER_TIMEOUT_MS, n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, r as DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-l_PsHQvX.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-CwCyNZkN.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-zNKgqYqU.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.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-D2rnoZ6i.js";
|
|
4
|
+
import { i as shouldHandleDiscordApprovalRequest, s as isDiscordExecApprovalClientEnabled } from "./conversation-identity-DbJP9mrG.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";
|
|
@@ -41,9 +41,6 @@ var approval_handler_runtime_exports = /* @__PURE__ */ __exportAll({
|
|
|
41
41
|
buildExecApprovalCustomId: () => buildExecApprovalCustomId,
|
|
42
42
|
discordApprovalNativeRuntime: () => discordApprovalNativeRuntime
|
|
43
43
|
});
|
|
44
|
-
function isDecisionApprovalAction(action) {
|
|
45
|
-
return action.kind === "decision" && (action.decision === "allow-once" || action.decision === "allow-always" || action.decision === "deny");
|
|
46
|
-
}
|
|
47
44
|
function resolveHandlerContext(params) {
|
|
48
45
|
const context = params.context;
|
|
49
46
|
const accountId = normalizeOptionalString(params.accountId) ?? "";
|
|
@@ -97,21 +94,11 @@ var ExecApprovalActionRow = class extends Row {
|
|
|
97
94
|
}
|
|
98
95
|
};
|
|
99
96
|
function createApprovalActionRow(view) {
|
|
100
|
-
const actions = view.actions.filter(isDecisionApprovalAction);
|
|
101
|
-
if (actions.length === 0) return;
|
|
102
97
|
return new ExecApprovalActionRow({
|
|
103
98
|
approvalId: view.approvalId,
|
|
104
|
-
actions
|
|
99
|
+
actions: view.actions
|
|
105
100
|
});
|
|
106
101
|
}
|
|
107
|
-
function isCommandOnlyApprovalAction(action) {
|
|
108
|
-
return action.kind === "command" && typeof action.command === "string" && action.command.trim().length > 0;
|
|
109
|
-
}
|
|
110
|
-
function buildPluginCommandActionLines(actions) {
|
|
111
|
-
const commandActions = actions.filter(isCommandOnlyApprovalAction);
|
|
112
|
-
if (commandActions.length === 0) return [];
|
|
113
|
-
return ["### Actions", ...commandActions.map((action) => `- ${action.label}: \`${formatCommandPreview(action.command.trim(), 240)}\``)];
|
|
114
|
-
}
|
|
115
102
|
function buildApprovalMetadataLines(metadata) {
|
|
116
103
|
return metadata.map((item) => `- ${item.label}: ${item.value}`);
|
|
117
104
|
}
|
|
@@ -158,7 +145,7 @@ function createPluginApprovalRequestContainer(params) {
|
|
|
158
145
|
description: "A plugin action needs your approval.",
|
|
159
146
|
commandPreview: formatCommandPreview(params.view.title, 700),
|
|
160
147
|
commandSecondaryPreview: formatOptionalCommandPreview(params.view.description, 1e3),
|
|
161
|
-
metadataLines:
|
|
148
|
+
metadataLines: buildApprovalMetadataLines(params.view.metadata),
|
|
162
149
|
actionRow: params.actionRow,
|
|
163
150
|
footer: `Expires <t:${expiresAtSeconds}:R> · ID: ${params.view.approvalId}`,
|
|
164
151
|
accentColor
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-zNKgqYqU.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import { O as fetchChannelPermissionsDiscord } from "./send.shared-
|
|
4
|
-
import "./send-
|
|
3
|
+
import { O as fetchChannelPermissionsDiscord } from "./send.shared-D2rnoZ6i.js";
|
|
4
|
+
import "./send-BBY2mPUE.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,13 +1,13 @@
|
|
|
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-zNKgqYqU.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom, r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.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-Ynd-Vfsr.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-DbJP9mrG.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-CAfBgXn1.js";
|
|
9
9
|
import { n as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-D5gY2ZTE.js";
|
|
10
|
-
import { n as discordOutbound } from "./outbound-adapter-
|
|
10
|
+
import { n as discordOutbound } from "./outbound-adapter-CDcIemWV.js";
|
|
11
11
|
import { a as discordSecurityAdapter, i as discordSetupAdapter, n as discordConfigAdapter, t as createDiscordPluginBase } from "./shared-ToNRC7ax.js";
|
|
12
12
|
import { t as normalizeExplicitDiscordSessionKey } from "./session-key-normalization-wJgsKPNF.js";
|
|
13
13
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -114,29 +114,29 @@ let discordProbeRuntimePromise;
|
|
|
114
114
|
let discordAuditModulePromise;
|
|
115
115
|
let discordSendModulePromise;
|
|
116
116
|
let discordDirectoryLiveModulePromise;
|
|
117
|
-
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
118
|
-
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
119
|
-
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
120
|
-
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-
|
|
121
|
-
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-
|
|
117
|
+
const loadDiscordDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CzVAco4Z.js").then((n) => n.t));
|
|
118
|
+
const loadDiscordResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-BjXtUlXb.js").then((n) => n.n));
|
|
119
|
+
const loadDiscordResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DY6Sa5l0.js").then((n) => n.n));
|
|
120
|
+
const loadDiscordThreadBindingsManagerModule = createLazyRuntimeModule(() => import("./thread-bindings.manager-moDGXTgH.js").then((n) => n.a));
|
|
121
|
+
const loadDiscordTargetResolverModule = createLazyRuntimeModule(() => import("./target-resolver-Der0K9Um.js").then((n) => n.r));
|
|
122
122
|
async function loadDiscordProviderRuntime() {
|
|
123
|
-
discordProviderRuntimePromise ??= import("./provider.runtime-
|
|
123
|
+
discordProviderRuntimePromise ??= import("./provider.runtime-DazBQ_13.js");
|
|
124
124
|
return await discordProviderRuntimePromise;
|
|
125
125
|
}
|
|
126
126
|
async function loadDiscordProbeRuntime() {
|
|
127
|
-
discordProbeRuntimePromise ??= import("./probe.runtime-
|
|
127
|
+
discordProbeRuntimePromise ??= import("./probe.runtime-BhWW0223.js");
|
|
128
128
|
return await discordProbeRuntimePromise;
|
|
129
129
|
}
|
|
130
130
|
async function loadDiscordAuditModule() {
|
|
131
|
-
discordAuditModulePromise ??= import("./audit-
|
|
131
|
+
discordAuditModulePromise ??= import("./audit-CEJs-ZOq.js").then((n) => n.n);
|
|
132
132
|
return await discordAuditModulePromise;
|
|
133
133
|
}
|
|
134
134
|
async function loadDiscordSendModule() {
|
|
135
|
-
discordSendModulePromise ??= import("./send-
|
|
135
|
+
discordSendModulePromise ??= import("./send-BBY2mPUE.js").then((n) => n.t);
|
|
136
136
|
return await discordSendModulePromise;
|
|
137
137
|
}
|
|
138
138
|
async function loadDiscordDirectoryLiveModule() {
|
|
139
|
-
discordDirectoryLiveModulePromise ??= import("./directory-live-
|
|
139
|
+
discordDirectoryLiveModulePromise ??= import("./directory-live-OYvKvO_R.js").then((n) => n.t);
|
|
140
140
|
return await discordDirectoryLiveModulePromise;
|
|
141
141
|
}
|
|
142
142
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as listDiscordAccountIds, t as createDiscordActionGate } from "./accounts-dXTfmnSZ.js";
|
|
2
2
|
import { t as inspectDiscordAccount } from "./account-inspect-C4sJZNbI.js";
|
|
3
|
-
import { d as readDiscordComponentSpec } from "./components-
|
|
3
|
+
import { d as readDiscordComponentSpec } from "./components-Ynd-Vfsr.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";
|
|
@@ -22,7 +22,7 @@ const trustedRequesterGuildAdminActions = new Set([
|
|
|
22
22
|
]);
|
|
23
23
|
let discordChannelActionsRuntimePromise;
|
|
24
24
|
async function loadDiscordChannelActionsRuntime() {
|
|
25
|
-
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-
|
|
25
|
+
discordChannelActionsRuntimePromise ??= import("./channel-actions.runtime-CwCyNZkN.js");
|
|
26
26
|
return await discordChannelActionsRuntimePromise;
|
|
27
27
|
}
|
|
28
28
|
function listDiscoverableDiscordAccounts(cfg) {
|
|
@@ -1,15 +1,15 @@
|
|
|
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-zNKgqYqU.js";
|
|
2
|
+
import { i as buildDiscordPresentationComponents, r as buildDiscordInteractiveComponents } from "./components-Ynd-Vfsr.js";
|
|
3
|
+
import { t as handleDiscordAction } from "./runtime-CiHKoHjw.js";
|
|
4
|
+
import "./targets-CZf4_VtX.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-lQMKNF5k.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";
|
|
11
11
|
import { normalizeInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
12
|
-
import {
|
|
12
|
+
import { readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
13
13
|
//#region extensions/discord/src/actions/handle-action.ts
|
|
14
14
|
const providerId = "discord";
|
|
15
15
|
function readCurrentDiscordTarget(toolContext) {
|
|
@@ -114,10 +114,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
114
114
|
const question = readStringParam(params, "pollQuestion", { required: true });
|
|
115
115
|
const answers = readStringArrayParam(params, "pollOption", { required: true });
|
|
116
116
|
const allowMultiselect = readBooleanParam(params, "pollMulti");
|
|
117
|
-
const durationHours =
|
|
118
|
-
integer: true,
|
|
119
|
-
strict: true
|
|
120
|
-
});
|
|
117
|
+
const durationHours = readPositiveIntegerParam(params, "pollDurationHours");
|
|
121
118
|
const result = await handleDiscordAction({
|
|
122
119
|
action: "poll",
|
|
123
120
|
accountId: accountId ?? void 0,
|
|
@@ -150,7 +147,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
150
147
|
}
|
|
151
148
|
if (action === "reactions") {
|
|
152
149
|
const messageId = readStringParam(params, "messageId", { required: true });
|
|
153
|
-
const limit =
|
|
150
|
+
const limit = readPositiveIntegerParam(params, "limit");
|
|
154
151
|
return await handleDiscordAction({
|
|
155
152
|
action: "reactions",
|
|
156
153
|
accountId: accountId ?? void 0,
|
|
@@ -160,7 +157,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
160
157
|
}, cfg, actionOptions);
|
|
161
158
|
}
|
|
162
159
|
if (action === "read") {
|
|
163
|
-
const limit =
|
|
160
|
+
const limit = readPositiveIntegerParam(params, "limit");
|
|
164
161
|
return await handleDiscordAction({
|
|
165
162
|
action: "readMessages",
|
|
166
163
|
accountId: accountId ?? void 0,
|
|
@@ -209,7 +206,7 @@ async function handleDiscordMessageAction(ctx) {
|
|
|
209
206
|
const name = readStringParam(params, "threadName", { required: true });
|
|
210
207
|
const messageId = readStringParam(params, "messageId");
|
|
211
208
|
const content = readStringParam(params, "message");
|
|
212
|
-
const autoArchiveMinutes =
|
|
209
|
+
const autoArchiveMinutes = readPositiveIntegerParam(params, "autoArchiveMin");
|
|
213
210
|
const appliedTags = readStringArrayParam(params, "appliedTags");
|
|
214
211
|
const result = await handleDiscordAction({
|
|
215
212
|
action: "threadCreate",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordPlugin } from "./channel-
|
|
1
|
+
import { t as discordPlugin } from "./channel-DPhpYUJD.js";
|
|
2
2
|
export { discordPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, l as resolveDiscordAccountConfig, m as resolveDiscordToken, o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.js";
|
|
2
2
|
import "./channel-api-CAJ0wMoV.js";
|
|
3
3
|
import { i as discordSetupAdapter, t as createDiscordPluginBase } from "./shared-ToNRC7ax.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-BjXtUlXb.js";
|
|
5
|
+
import { t as resolveDiscordUserAllowlist } from "./resolve-users-DY6Sa5l0.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
8
8
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-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-zNKgqYqU.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";
|
|
@@ -125,8 +125,11 @@ function readOptionalStringArray(value, label) {
|
|
|
125
125
|
if (value.length === 0) return;
|
|
126
126
|
return value.map((entry, index) => readString(entry, `${label}[${index}]`));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
128
|
+
function readOptionalInteger(value, label, bounds) {
|
|
129
|
+
if (value == null) return;
|
|
130
|
+
if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value)) throw new Error(`${label} must be an integer`);
|
|
131
|
+
if (bounds?.min !== void 0 && value < bounds.min) throw new Error(`${label} must be at least ${bounds.min}`);
|
|
132
|
+
if (bounds?.max !== void 0 && value > bounds.max) throw new Error(`${label} must be at most ${bounds.max}`);
|
|
130
133
|
return value;
|
|
131
134
|
}
|
|
132
135
|
function readOptionalEmoji(value, label) {
|
|
@@ -217,8 +220,14 @@ function parseSelectSpec(raw, label) {
|
|
|
217
220
|
type,
|
|
218
221
|
callbackData: readOptionalString(obj.callbackData),
|
|
219
222
|
placeholder: readOptionalString(obj.placeholder),
|
|
220
|
-
minValues:
|
|
221
|
-
|
|
223
|
+
minValues: readOptionalInteger(obj.minValues, `${label}.minValues`, {
|
|
224
|
+
min: 0,
|
|
225
|
+
max: 25
|
|
226
|
+
}),
|
|
227
|
+
maxValues: readOptionalInteger(obj.maxValues, `${label}.maxValues`, {
|
|
228
|
+
min: 1,
|
|
229
|
+
max: 25
|
|
230
|
+
}),
|
|
222
231
|
options: parseSelectOptions(obj.options, `${label}.options`),
|
|
223
232
|
allowedUsers: readOptionalStringArray(obj.allowedUsers, `${label}.allowedUsers`)
|
|
224
233
|
};
|
|
@@ -241,18 +250,33 @@ function parseModalField(raw, label, index) {
|
|
|
241
250
|
"radio",
|
|
242
251
|
"select"
|
|
243
252
|
].includes(type) && (!options || options.length === 0)) throw new Error(`${label}.options is required for ${type} fields`);
|
|
253
|
+
if (type === "radio" && (obj.minValues != null || obj.maxValues != null)) throw new Error(`${label}.minValues/maxValues are not supported for radio fields`);
|
|
254
|
+
const required = typeof obj.required === "boolean" ? obj.required : void 0;
|
|
255
|
+
const maxValues = type === "checkbox" ? 10 : 25;
|
|
244
256
|
return {
|
|
245
257
|
type,
|
|
246
258
|
name: normalizeModalFieldName(readOptionalString(obj.name), index),
|
|
247
259
|
label: readString(obj.label, `${label}.label`),
|
|
248
260
|
description: readOptionalString(obj.description),
|
|
249
261
|
placeholder: readOptionalString(obj.placeholder),
|
|
250
|
-
required
|
|
262
|
+
required,
|
|
251
263
|
options,
|
|
252
|
-
minValues:
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
264
|
+
minValues: readOptionalInteger(obj.minValues, `${label}.minValues`, {
|
|
265
|
+
min: required === false ? 0 : 1,
|
|
266
|
+
max: maxValues
|
|
267
|
+
}),
|
|
268
|
+
maxValues: readOptionalInteger(obj.maxValues, `${label}.maxValues`, {
|
|
269
|
+
min: 1,
|
|
270
|
+
max: maxValues
|
|
271
|
+
}),
|
|
272
|
+
minLength: readOptionalInteger(obj.minLength, `${label}.minLength`, {
|
|
273
|
+
min: 0,
|
|
274
|
+
max: 4e3
|
|
275
|
+
}),
|
|
276
|
+
maxLength: readOptionalInteger(obj.maxLength, `${label}.maxLength`, {
|
|
277
|
+
min: 1,
|
|
278
|
+
max: 4e3
|
|
279
|
+
}),
|
|
256
280
|
style: readOptionalString(obj.style)
|
|
257
281
|
};
|
|
258
282
|
}
|
|
@@ -734,8 +758,6 @@ function createModalFieldComponent(field) {
|
|
|
734
758
|
this.customId = field.id;
|
|
735
759
|
this.options = options;
|
|
736
760
|
this.required = field.required;
|
|
737
|
-
this.minValues = field.minValues;
|
|
738
|
-
this.maxValues = field.maxValues;
|
|
739
761
|
}
|
|
740
762
|
}
|
|
741
763
|
return new DynamicRadioGroup();
|
package/dist/contract-api.js
CHANGED
|
@@ -2,7 +2,7 @@ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doc
|
|
|
2
2
|
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-BjM-1hr9.js";
|
|
3
3
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.js";
|
|
4
4
|
import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.js";
|
|
5
|
-
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-
|
|
6
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
5
|
+
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-moDGXTgH.js";
|
|
6
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-CzVAco4Z.js";
|
|
7
7
|
import { t as collectDiscordSecurityAuditFindings } from "./security-audit-Bh_65L5C.js";
|
|
8
8
|
export { collectDiscordSecurityAuditFindings, collectRuntimeConfigAssignments, collectUnsupportedSecretRefConfigCandidates, createThreadBindingManager, deriveLegacySessionChatType, testing as discordThreadBindingTesting, legacyConfigRules, listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig, normalizeCompatibilityConfig, secretTargetRegistryEntries, unsupportedSecretRefSurfacePatterns };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ht as parseDiscordTarget } from "./send.receipt-
|
|
1
|
+
import { Ht as parseDiscordTarget } from "./send.receipt-zNKgqYqU.js";
|
|
2
2
|
import { r as listDiscordAccountIds, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.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";
|
|
@@ -229,7 +229,7 @@ function createDiscordApprovalCapability(configOverride) {
|
|
|
229
229
|
request,
|
|
230
230
|
configOverride
|
|
231
231
|
}),
|
|
232
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
232
|
+
load: async () => (await import("./approval-handler.runtime-pEIfYHQG.js").then((n) => n.t)).discordApprovalNativeRuntime
|
|
233
233
|
})
|
|
234
234
|
});
|
|
235
235
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-zNKgqYqU.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.js";
|
|
3
3
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listDiscordDirectoryGroupsFromConfig, r as listDiscordDirectoryPeersFromConfig } from "./directory-config-CzVAco4Z.js";
|
|
2
2
|
export { listDiscordDirectoryGroupsFromConfig, listDiscordDirectoryPeersFromConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Wt as __exportAll } from "./send.receipt-
|
|
1
|
+
import { Wt as __exportAll } from "./send.receipt-zNKgqYqU.js";
|
|
2
2
|
import { p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-dXTfmnSZ.js";
|
|
3
|
-
import { n as fetchDiscord } from "./api-
|
|
3
|
+
import { n as fetchDiscord } from "./api-ChQJ1kfZ.js";
|
|
4
4
|
import { a as normalizeDiscordSlug } from "./allow-list-BnkWtVpA.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
package/dist/{handle-action.guild-admin-DWFTAcfd.js → handle-action.guild-admin-lQMKNF5k.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
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-CiHKoHjw.js";
|
|
2
2
|
import "./action-runtime-api.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { readNonNegativeIntegerParam, readPositiveIntegerParam, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/agent-runtime";
|
|
5
5
|
//#region extensions/discord/src/actions/handle-action.guild-admin.ts
|
|
6
6
|
function readDiscordRequesterSenderId(ctx) {
|
|
7
7
|
return ctx.toolContext?.currentChannelProvider?.trim().toLowerCase() === "discord" ? normalizeOptionalString(ctx.requesterSenderId) : void 0;
|
|
@@ -157,7 +157,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
157
157
|
if (action === "category-create") {
|
|
158
158
|
const guildId = readStringParam(actionParams, "guildId", { required: true });
|
|
159
159
|
const name = readStringParam(actionParams, "name", { required: true });
|
|
160
|
-
const position =
|
|
160
|
+
const position = readNonNegativeIntegerParam(actionParams, "position");
|
|
161
161
|
return await handleDiscordAction({
|
|
162
162
|
action: "categoryCreate",
|
|
163
163
|
accountId: accountId ?? void 0,
|
|
@@ -170,7 +170,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
170
170
|
if (action === "category-edit") {
|
|
171
171
|
const categoryId = readStringParam(actionParams, "categoryId", { required: true });
|
|
172
172
|
const name = readStringParam(actionParams, "name");
|
|
173
|
-
const position =
|
|
173
|
+
const position = readNonNegativeIntegerParam(actionParams, "position");
|
|
174
174
|
return await handleDiscordAction({
|
|
175
175
|
action: "categoryEdit",
|
|
176
176
|
accountId: accountId ?? void 0,
|
|
@@ -235,8 +235,11 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
235
235
|
if (isDiscordModerationAction(action)) {
|
|
236
236
|
const moderation = readDiscordModerationCommand(action, {
|
|
237
237
|
...actionParams,
|
|
238
|
-
durationMinutes:
|
|
239
|
-
deleteMessageDays:
|
|
238
|
+
durationMinutes: readNonNegativeIntegerParam(actionParams, "durationMin"),
|
|
239
|
+
deleteMessageDays: readNonNegativeIntegerParam(actionParams, "deleteDays", {
|
|
240
|
+
max: 7,
|
|
241
|
+
message: "deleteDays must be an integer from 0 to 7"
|
|
242
|
+
})
|
|
240
243
|
});
|
|
241
244
|
const senderUserId = normalizeOptionalString(ctx.requesterSenderId);
|
|
242
245
|
return await handleDiscordAction({
|
|
@@ -256,7 +259,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
256
259
|
const channelId = readStringParam(actionParams, "channelId");
|
|
257
260
|
const includeArchived = typeof actionParams.includeArchived === "boolean" ? actionParams.includeArchived : void 0;
|
|
258
261
|
const before = readStringParam(actionParams, "before");
|
|
259
|
-
const limit =
|
|
262
|
+
const limit = readPositiveIntegerParam(actionParams, "limit");
|
|
260
263
|
return await handleDiscordAction({
|
|
261
264
|
action: "threadList",
|
|
262
265
|
accountId: accountId ?? void 0,
|
|
@@ -296,7 +299,7 @@ async function tryHandleDiscordMessageActionGuildAdmin(params) {
|
|
|
296
299
|
channelIds: readStringArrayParam(actionParams, "channelIds"),
|
|
297
300
|
authorId: readStringParam(actionParams, "authorId"),
|
|
298
301
|
authorIds: readStringArrayParam(actionParams, "authorIds"),
|
|
299
|
-
limit:
|
|
302
|
+
limit: readPositiveIntegerParam(actionParams, "limit")
|
|
300
303
|
}, cfg);
|
|
301
304
|
}
|
|
302
305
|
}
|
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-Bnm3Dvrt.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,10 +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-zNKgqYqU.js";
|
|
2
2
|
import { c as resolveDiscordAccountAllowFrom } from "./accounts-dXTfmnSZ.js";
|
|
3
3
|
import { a as normalizeDiscordSlug, b as formatDiscordUserTag, m as resolveDiscordOwnerAccess } from "./allow-list-BnkWtVpA.js";
|
|
4
|
-
import { i as formatMention } from "./send.outbound-
|
|
4
|
+
import { i as formatMention } from "./send.outbound-DZxH3H5t.js";
|
|
5
5
|
import { t as getDiscordRuntime } from "./runtime-DgnVQ7zW.js";
|
|
6
|
-
import { o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-
|
|
7
|
-
import { t as buildDiscordGroupSystemPrompt } from "./inbound-context-B5EsqsSr.js";
|
|
6
|
+
import { f as buildDiscordGroupSystemPrompt, o as authorizeDiscordVoiceIngress, u as resolveDiscordVoiceEnabled } from "./provider-CoyiVUd5.js";
|
|
8
7
|
import { createRequire } from "node:module";
|
|
9
8
|
import { asBoolean, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
9
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as createDiscordRestClient } from "./send.shared-
|
|
2
|
-
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
1
|
+
import { I as createDiscordRestClient } from "./send.shared-D2rnoZ6i.js";
|
|
2
|
+
import { d as resolveDiscordChannelNameSafe, l as resolveDiscordChannelIdSafe, p as resolveDiscordChannelParentSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-Deuhxjj4.js";
|
|
3
3
|
import { a as mergeAbortSignals } from "./timeouts-l_PsHQvX.js";
|
|
4
|
-
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-
|
|
5
|
-
import { t as sendTyping } from "./typing-
|
|
4
|
+
import { c as hasDiscordMessageStickers, d as resolveDiscordMessageChannelId, r as resolveDiscordMessageText } from "./message-utils-uONSGxcw.js";
|
|
5
|
+
import { t as sendTyping } from "./typing-C6Q3TeK_.js";
|
|
6
6
|
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
7
7
|
import { createChannelRunQueue } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
@@ -121,7 +121,7 @@ function applyImplicitReplyBatchGate(ctx, replyToMode, isBatched) {
|
|
|
121
121
|
//#region extensions/discord/src/monitor/message-run-queue.ts
|
|
122
122
|
let messageProcessRuntimePromise;
|
|
123
123
|
async function loadMessageProcessRuntime() {
|
|
124
|
-
messageProcessRuntimePromise ??= import("./message-handler.process-
|
|
124
|
+
messageProcessRuntimePromise ??= import("./message-handler.process-BUGG-Fsv.js");
|
|
125
125
|
return await messageProcessRuntimePromise;
|
|
126
126
|
}
|
|
127
127
|
async function processDiscordQueuedMessage(params) {
|
|
@@ -173,7 +173,7 @@ function createDiscordMessageRunQueue(params) {
|
|
|
173
173
|
//#region extensions/discord/src/monitor/message-handler.ts
|
|
174
174
|
let messagePreflightRuntimePromise;
|
|
175
175
|
async function loadMessagePreflightRuntime() {
|
|
176
|
-
messagePreflightRuntimePromise ??= import("./message-handler.preflight-
|
|
176
|
+
messagePreflightRuntimePromise ??= import("./message-handler.preflight-NWBbCKig.js");
|
|
177
177
|
return await messagePreflightRuntimePromise;
|
|
178
178
|
}
|
|
179
179
|
function isNonEmptyString(value) {
|
package/dist/{message-handler.preflight-Ddww-wnF.js → message-handler.preflight-NWBbCKig.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-zNKgqYqU.js";
|
|
2
2
|
import { o as resolveDefaultDiscordAccountId } from "./accounts-dXTfmnSZ.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-BnkWtVpA.js";
|
|
4
|
-
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-
|
|
4
|
+
import { t as resolveDiscordConversationIdentity } from "./conversation-identity-DbJP9mrG.js";
|
|
5
5
|
import { l as isRecentlyUnboundThreadWebhookMessage } from "./thread-bindings.state-BsOnj5NX.js";
|
|
6
|
-
import { d as resolveDiscordChannelNameSafe, u as resolveDiscordChannelInfoSafe } from "./thread-bindings.discord-api-
|
|
7
|
-
import "./thread-bindings-
|
|
8
|
-
import {
|
|
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-Deuhxjj4.js";
|
|
7
|
+
import "./thread-bindings-Bx9iaVSx.js";
|
|
8
|
+
import { D as resolveDiscordTextCommandAccess, E as resolveDiscordDmCommandAccess, _ as resolveDiscordEffectiveRoute, g as resolveDiscordConversationRoute, h as buildDiscordRoutePeer, v as shouldIgnoreStaleDiscordRouteBinding, y as handleDiscordDmCommandDecision } from "./provider-CoyiVUd5.js";
|
|
9
|
+
import { d as resolveDiscordMessageChannelId, l as resolveDiscordMessageStickers, o as resolveMediaList, r as resolveDiscordMessageText, u as resolveDiscordChannelInfo } from "./message-utils-uONSGxcw.js";
|
|
10
10
|
import { n as resolveDiscordWebhookId, t as resolveDiscordSenderIdentity } from "./sender-identity-BFp5w0F8.js";
|
|
11
11
|
import { normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
12
12
|
import { getChildLogger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -28,7 +28,7 @@ async function loadConversationRuntime$1() {
|
|
|
28
28
|
return await conversationRuntimePromise$1;
|
|
29
29
|
}
|
|
30
30
|
async function loadDiscordSendRuntime() {
|
|
31
|
-
discordSendRuntimePromise ??= import("./send-
|
|
31
|
+
discordSendRuntimePromise ??= import("./send-BBY2mPUE.js").then((n) => n.t);
|
|
32
32
|
return await discordSendRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
async function resolveDiscordDmPreflightAccess(params) {
|
|
@@ -423,7 +423,7 @@ let preflightAudioRuntimePromise;
|
|
|
423
423
|
let systemEventsRuntimePromise;
|
|
424
424
|
let discordThreadingRuntimePromise;
|
|
425
425
|
async function loadPluralKitRuntime() {
|
|
426
|
-
pluralkitRuntimePromise ??= import("./pluralkit-
|
|
426
|
+
pluralkitRuntimePromise ??= import("./pluralkit-D5BSur8g.js").then((n) => n.n);
|
|
427
427
|
return await pluralkitRuntimePromise;
|
|
428
428
|
}
|
|
429
429
|
async function loadPreflightAudioRuntime() {
|
|
@@ -431,11 +431,11 @@ async function loadPreflightAudioRuntime() {
|
|
|
431
431
|
return await preflightAudioRuntimePromise;
|
|
432
432
|
}
|
|
433
433
|
async function loadSystemEventsRuntime() {
|
|
434
|
-
systemEventsRuntimePromise ??= import("./system-events-
|
|
434
|
+
systemEventsRuntimePromise ??= import("./system-events-BZyO1kxg.js");
|
|
435
435
|
return await systemEventsRuntimePromise;
|
|
436
436
|
}
|
|
437
437
|
async function loadDiscordThreadingRuntime() {
|
|
438
|
-
discordThreadingRuntimePromise ??= import("./provider-
|
|
438
|
+
discordThreadingRuntimePromise ??= import("./provider-CoyiVUd5.js").then((n) => n.x);
|
|
439
439
|
return await discordThreadingRuntimePromise;
|
|
440
440
|
}
|
|
441
441
|
function isPreflightAborted(abortSignal) {
|