@openclaw/discord 2026.7.2-beta.2 → 2026.7.2-beta.3
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/{activities-api-D0D_87n3.js → activities-api-DS1L7KRY.js} +15 -42
- package/dist/activities-api.js +1 -1
- package/dist/{allow-list-B7qOH5xu.js → allow-list-DzKrtfah.js} +18 -7
- package/dist/{api-B88T4rFN.js → api-C43z8vUm.js} +3 -1
- package/dist/api.js +25 -16
- package/dist/{approval-handler.runtime-B7E1-x5q.js → approval-handler.runtime-BbkfPoGc.js} +5 -6
- package/dist/{conversation-identity-BPcbhCAH.js → approval-message-safety-DrLlgIPz.js} +48 -2
- package/dist/{audit-CjpnY1yb.js → audit-BC6bgPMX.js} +3 -3
- package/dist/{channel-BDfKr14H.js → channel-5MfaC2IE.js} +18 -18
- package/dist/{channel-actions-BQct-o4T.js → channel-actions-DicWTbYH.js} +2 -2
- package/dist/{channel-actions.runtime-CC4QwYVO.js → channel-actions.runtime-D9Qadn-l.js} +8 -8
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-BS4gd8sc.js → channel.setup-CJXfFclP.js} +3 -3
- package/dist/{chunk-CHpY_lsO.js → chunk-CWzmeWf_.js} +9 -49
- package/dist/{config-schema-CoDck1GW.js → config-schema-BxrgfSMD.js} +4 -0
- package/dist/{directory-config-G1QwBIdi.js → directory-config-CmukHSms.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-nfvekMil.js → directory-live-BYlCRO__.js} +3 -3
- package/dist/{doctor-Bq4pJAQk.js → doctor-Ci7USQAW.js} +1 -1
- package/dist/{handle-action.guild-admin-LYY75_Oa.js → handle-action.guild-admin-Bsk2YBPs.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{manager.runtime-w6VVYQMl.js → manager.runtime-Cc8vS-M7.js} +98 -145
- package/dist/message-handler-CWJ-mQvH.js +590 -0
- package/dist/{message-handler.preflight-DnAH04Ss.js → message-handler.preflight-DK46_qbS.js} +16 -15
- package/dist/{message-handler.process-ClgKz8I5.js → message-handler.process-BK0mjFJH.js} +37 -61
- package/dist/{message-utils-BU3gc01v.js → message-utils-Cfe6CZ6N.js} +1 -1
- package/dist/{outbound-adapter-ByoXsR-V.js → outbound-adapter-B2_oa-zV.js} +36 -5
- package/dist/{outbound-components-7wAolLuS.js → outbound-components-BGhk6HI3.js} +3 -3
- package/dist/{outbound-session-route-D4QqePZN.js → outbound-session-route-M2bEY9tI.js} +36 -6
- package/dist/{pluralkit-r4wiI2yy.js → pluralkit-CT0VRsZd.js} +1 -1
- package/dist/{probe-WKeTYyJX.js → probe-C3SCKyYU.js} +1 -1
- package/dist/{probe.runtime-CRY-qUke.js → probe.runtime-D55QqC9u.js} +1 -1
- package/dist/{provider-PRlF_lZm.js → provider-HW0G-2l6.js} +868 -794
- package/dist/{provider-session.runtime-BZPUZRjn.js → provider-session.runtime-cCfGMsF_.js} +3 -3
- package/dist/provider.runtime-BWCRsVoT.js +2 -0
- package/dist/{resolve-allowlist-common-QN7VMZaC.js → resolve-allowlist-common-CJlqw_nC.js} +2 -2
- package/dist/{resolve-channels-BO9NUPlS.js → resolve-channels-9KcG3mLg.js} +4 -4
- package/dist/{resolve-users-CU3oG5-m.js → resolve-users-GCGf3oV0.js} +3 -3
- package/dist/{runtime-CCf5nkV3.js → runtime-CD5MRZkD.js} +1 -2
- package/dist/{runtime-BsefAQ9q.js → runtime-Z2qkKakn.js} +9 -8
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +23 -22
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-C3EDYJqk.js +6 -0
- package/dist/runtime-api.monitor.js +8 -8
- package/dist/runtime-api.send.js +6 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{secret-config-contract-BDNrRWvd.js → secret-config-contract-B1akrlyY.js} +1 -0
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-audit-contract-api.js +1 -1
- package/dist/{security-audit.runtime-K0nkzjzJ.js → security-audit.runtime-DEEywczv.js} +1 -1
- package/dist/{send-JJzVo_sK.js → send-CSRxNNgq.js} +7 -86
- package/dist/{send.components-CCRW54gK.js → send.components-DLqzOEPJ.js} +5 -4
- package/dist/{send.outbound-Cvulb-k_.js → send.outbound-C1SfX20w.js} +4 -3
- package/dist/send.reactions-Cj4ugX3F.js +85 -0
- package/dist/send.receipt-CuwRrpFz.js +48 -0
- package/dist/{send.shared-XuOTO1dW.js → send.shared-Dber6X57.js} +2 -2
- package/dist/{sender-identity-C62lBe18.js → sender-identity-mG_zsdox.js} +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-Bngr0I-v.js → shared-BEhmAdMY.js} +5 -5
- package/dist/{subagent-hooks-mSxRv4AE.js → subagent-hooks-Wrk61DwY.js} +2 -2
- package/dist/subagent-hooks-api.js +10 -1
- package/dist/subagent-progress-B2fpHe3m.js +662 -0
- package/dist/{system-events-BANBRAe3.js → system-events-AhfcKRRb.js} +2 -2
- package/dist/{target-resolver-BaEmTxeK.js → target-resolver-vqLA450R.js} +2 -2
- package/dist/targets-BjEMIe8t.js +3 -0
- package/dist/{thread-bindings-4MV-u8vU.js → thread-bindings-CJQoXuWY.js} +4 -4
- package/dist/{thread-bindings.discord-api-DXfXsHGZ.js → thread-bindings.discord-api-mNCWlgvM.js} +4 -4
- package/dist/{thread-bindings.manager-DJ4cO5Eu.js → thread-bindings.manager-D1z8mK4b.js} +3 -3
- package/dist/{timeouts-D5lWili0.js → timeouts-B9cy6RvQ.js} +1 -6
- package/dist/{transcripts-source-TDZcMriu.js → transcripts-source-DjDbt14x.js} +1 -1
- package/dist/transcripts-source-api.js +1 -1
- package/dist/{typing-CKd2NMWG.js → typing-wxtm1NlF.js} +2 -2
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +10 -0
- package/package.json +4 -4
- package/dist/approval-message-safety-C-8BL6Kv.js +0 -47
- package/dist/message-handler-DExaghWK.js +0 -331
- package/dist/provider.runtime-BX8GcCYx.js +0 -2
- package/dist/runtime-api.monitor-DCS_ETft.js +0 -6
- package/dist/targets-fjJt3PYG.js +0 -3
- package/dist/{security-audit-aLbWmUjl.js → security-audit-DtT0SIns.js} +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
2
|
+
//#region extensions/discord/src/send.receipt.ts
|
|
3
|
+
function createDiscordSendReceipt(params) {
|
|
4
|
+
return createMessageReceiptFromOutboundResults({
|
|
5
|
+
results: params.platformMessageIds.map((messageId) => messageId.trim()).filter((messageId) => messageId && messageId !== "unknown").map((messageId, index) => {
|
|
6
|
+
const result = {
|
|
7
|
+
channel: "discord",
|
|
8
|
+
messageId
|
|
9
|
+
};
|
|
10
|
+
if (params.channelId) result.channelId = params.channelId;
|
|
11
|
+
if (params.reply?.scope === "first" && index === 0) {
|
|
12
|
+
const rawResult = {
|
|
13
|
+
channel: "discord",
|
|
14
|
+
messageId
|
|
15
|
+
};
|
|
16
|
+
if (params.channelId) rawResult.channelId = params.channelId;
|
|
17
|
+
result.receipt = createMessageReceiptFromOutboundResults({
|
|
18
|
+
results: [rawResult],
|
|
19
|
+
kind: params.kind,
|
|
20
|
+
threadId: params.threadId,
|
|
21
|
+
replyToId: params.reply.messageId
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return result;
|
|
25
|
+
}),
|
|
26
|
+
kind: params.kind,
|
|
27
|
+
threadId: params.threadId,
|
|
28
|
+
replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function createDiscordSendResult(params) {
|
|
32
|
+
const messageId = params.result.id || "unknown";
|
|
33
|
+
const channelId = params.result.channel_id ?? params.fallbackChannelId;
|
|
34
|
+
const receiptParams = {
|
|
35
|
+
platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
|
|
36
|
+
channelId,
|
|
37
|
+
kind: params.kind
|
|
38
|
+
};
|
|
39
|
+
if (params.threadId != null) receiptParams.threadId = String(params.threadId);
|
|
40
|
+
if (params.reply) receiptParams.reply = params.reply;
|
|
41
|
+
return {
|
|
42
|
+
messageId,
|
|
43
|
+
channelId,
|
|
44
|
+
receipt: createDiscordSendReceipt(receiptParams)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { createDiscordSendResult as n, createDiscordSendReceipt as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as RateLimitError, It as getGuild, L as serializePayload, Lt as getGuildMember, R as Embed, T as RequestClient, ct as createUserDmChannel, lt as getCurrentUser, pt as createChannelMessage, r as resolveDiscordReplyMessageId, t as chunkDiscordTextWithMode, xt as getThreadMember, yt as getChannel } from "./chunk-CWzmeWf_.js";
|
|
2
2
|
import { a as mergeDiscordAccountConfig, p as normalizeDiscordToken, s as resolveDiscordAccount } from "./accounts-CMd4nzLB.js";
|
|
3
|
-
import { t as parseAndResolveDiscordTarget } from "./target-resolver-
|
|
3
|
+
import { t as parseAndResolveDiscordTarget } from "./target-resolver-vqLA450R.js";
|
|
4
4
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
5
5
|
import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as formatDiscordUserTag } from "./allow-list-
|
|
1
|
+
import { x as formatDiscordUserTag } from "./allow-list-DzKrtfah.js";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/discord/src/monitor/sender-identity.ts
|
|
4
4
|
function resolveDiscordWebhookId(message) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-
|
|
1
|
+
import { i as testing, n as createThreadBindingManager } from "./thread-bindings.manager-D1z8mK4b.js";
|
|
2
2
|
export { createThreadBindingManager, testing as discordThreadBindingTesting };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as discordSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as discordSetupPlugin } from "./channel.setup-CJXfFclP.js";
|
|
2
2
|
export { discordSetupPlugin };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as mergeDiscordAccountConfig, c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, n as isDiscordAccountEnabledForRuntime, o as resolveDefaultDiscordAccountId, r as listDiscordAccountIds, s as resolveDiscordAccount, u as resolveDiscordAccountDisabledReason } from "./accounts-CMd4nzLB.js";
|
|
2
2
|
import { i as getChatChannelMeta, o as resolveConfiguredFromCredentialStatuses } from "./channel-api-CAJ0wMoV.js";
|
|
3
3
|
import { t as inspectDiscordAccount } from "./account-inspect-dFV0JrnR.js";
|
|
4
|
-
import { t as DiscordChannelConfigSchema } from "./config-schema-
|
|
4
|
+
import { t as DiscordChannelConfigSchema } from "./config-schema-BxrgfSMD.js";
|
|
5
5
|
import { n as normalizeCompatibilityConfig } from "./doctor-contract-wId6pV41.js";
|
|
6
|
-
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-
|
|
6
|
+
import { n as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-B1akrlyY.js";
|
|
7
7
|
import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.js";
|
|
8
8
|
import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.js";
|
|
9
9
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
10
10
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
11
11
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
12
|
+
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
12
13
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
13
14
|
import { createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
14
15
|
import { createEnvPatchedAccountSetupAdapter } from "openclaw/plugin-sdk/setup-runtime";
|
|
15
|
-
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
16
16
|
//#region extensions/discord/src/security.ts
|
|
17
17
|
const resolveDiscordDmPolicy = createScopedDmSecurityResolver({
|
|
18
18
|
channelKey: "discord",
|
|
@@ -47,7 +47,7 @@ const collectDiscordSecurityWarnings = createOpenProviderConfiguredRouteWarningC
|
|
|
47
47
|
remediation: "Set channels.discord.groupPolicy=\"allowlist\" and configure channels.discord.guilds.<id>.channels"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-
|
|
50
|
+
const loadDiscordSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit.runtime-DEEywczv.js"));
|
|
51
51
|
const discordSecurityAdapter = {
|
|
52
52
|
resolveDmPolicy: resolveDiscordDmPolicy,
|
|
53
53
|
collectWarnings: collectDiscordSecurityWarnings,
|
|
@@ -66,7 +66,7 @@ const DISCORD_LEGACY_CONFIG_RULES = [];
|
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region extensions/discord/src/shared.ts
|
|
68
68
|
const DISCORD_CHANNEL = "discord";
|
|
69
|
-
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-
|
|
69
|
+
const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-Ci7USQAW.js"));
|
|
70
70
|
const discordDoctor = {
|
|
71
71
|
dmAllowFromMode: "topOnly",
|
|
72
72
|
groupModel: "route",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Yt as __exportAll } from "./chunk-CWzmeWf_.js";
|
|
2
2
|
import { s as resolveDiscordAccount } from "./accounts-CMd4nzLB.js";
|
|
3
|
-
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-
|
|
3
|
+
import { n as autoBindSpawnedDiscordSubagent, o as unbindThreadBindingsBySessionKey, r as listThreadBindingsBySessionKey } from "./thread-bindings-CJQoXuWY.js";
|
|
4
4
|
import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { formatThreadBindingDisabledError, formatThreadBindingSpawnDisabledError, resolveThreadBindingSpawnPolicy } from "openclaw/plugin-sdk/conversation-runtime";
|
|
6
6
|
//#region extensions/discord/src/subagent-hooks.ts
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
2
2
|
//#region extensions/discord/subagent-hooks-api.ts
|
|
3
|
-
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-
|
|
3
|
+
const loadDiscordSubagentHooksModule = createLazyRuntimeModule(() => import("./subagent-hooks-Wrk61DwY.js").then((n) => n.i));
|
|
4
|
+
const loadDiscordSubagentProgressModule = createLazyRuntimeModule(() => import("./subagent-progress-B2fpHe3m.js"));
|
|
4
5
|
function registerDiscordSubagentHooks(api) {
|
|
6
|
+
api.on("gateway_start", async () => {
|
|
7
|
+
const { recoverDiscordSubagentProgress } = await loadDiscordSubagentProgressModule();
|
|
8
|
+
await recoverDiscordSubagentProgress(api);
|
|
9
|
+
});
|
|
10
|
+
api.on("subagent_progress", async (event) => {
|
|
11
|
+
const { handleDiscordSubagentProgress } = await loadDiscordSubagentProgressModule();
|
|
12
|
+
await handleDiscordSubagentProgress(api, event);
|
|
13
|
+
});
|
|
5
14
|
api.on("subagent_ended", async (event) => {
|
|
6
15
|
const { handleDiscordSubagentEnded } = await loadDiscordSubagentHooksModule();
|
|
7
16
|
handleDiscordSubagentEnded(event);
|