@openclaw/discord 2026.5.7 → 2026.5.9-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.
Files changed (110) hide show
  1. package/dist/{access-CHY9FK3X.js → access-Lk7H_e7y.js} +1 -1
  2. package/dist/action-runtime-api.js +1 -1
  3. package/dist/{allow-list-ek-1hMKN.js → allow-list-Dtho5Hww.js} +1 -1
  4. package/dist/api.js +19 -17
  5. package/dist/{approval-handler.runtime-BBZRYAGs.js → approval-handler.runtime-CqvKEAqO.js} +3 -3
  6. package/dist/{approval-native-CBdZsAR7.js → approval-native-W5mtrjYy.js} +2 -2
  7. package/dist/{approval-shared-Ck6TxKgo.js → approval-shared-D0FVj8b_.js} +1 -1
  8. package/dist/{audit-CCJ0h49k.js → audit-CrCPCVFG.js} +3 -3
  9. package/dist/{channel-UXGa9PGc.js → channel-CRTWY5R-.js} +53 -31
  10. package/dist/{channel-actions-Br29_1nE.js → channel-actions-BRgtLo8F.js} +27 -1
  11. package/dist/{channel-actions.runtime-ChmNUig1.js → channel-actions.runtime-gosyu06g.js} +5 -5
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel.setup-D_xyQu_h.js → channel.setup-BQlXR1Gt.js} +3 -3
  15. package/dist/chunk-BDgKaWaV.js +179 -0
  16. package/dist/{components-D5LnN7ZQ.js → components-BWdIitIb.js} +2 -2
  17. package/dist/{config-schema-Cc953rAs.js → config-schema-D1DUqXws.js} +46 -1
  18. package/dist/contract-api.js +7 -7
  19. package/dist/{conversation-identity-DHhS0ez3.js → conversation-identity-6hcTVj3L.js} +1 -1
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-DJ0V5asB.js → directory-live-D3kbmVAu.js} +3 -3
  22. package/dist/{discord-eZlimVfW.js → discord-Du6FnKAq.js} +30 -13
  23. package/dist/{doctor-Bo-yifB3.js → doctor-Ys2-q5bc.js} +3 -3
  24. package/dist/{doctor-contract-Bso46EOQ.js → doctor-contract-DSB2zzJA.js} +1 -1
  25. package/dist/doctor-contract-api.js +1 -1
  26. package/dist/{handle-action.guild-admin-sJiQymg8.js → handle-action.guild-admin-LM6kZ6zE.js} +6 -3
  27. package/dist/{inbound-context-CRylwjg0.js → inbound-context-BobVUBqo.js} +1 -1
  28. package/dist/{manager.runtime-Cug1PoeZ.js → manager.runtime-C_cPd048.js} +802 -134
  29. package/dist/{mentions-BPZUaFk7.js → mentions-CiPUID82.js} +1 -1
  30. package/dist/{message-handler-C9Ohf-ea.js → message-handler-C2ZQV7ZQ.js} +7 -7
  31. package/dist/{message-handler.preflight-BrvazsYn.js → message-handler.preflight-B5hN7RpX.js} +15 -15
  32. package/dist/{message-handler.process-CEnzuLiN.js → message-handler.process-Dns8D7t2.js} +82 -65
  33. package/dist/{message-utils-9kaGF59d.js → message-utils-B3uf0_3D.js} +2 -2
  34. package/dist/normalize-DBcng6RL.js +58 -0
  35. package/dist/{outbound-adapter-DNsTVJfH.js → outbound-adapter-jP0OgIyW.js} +78 -17
  36. package/dist/{outbound-session-route-DK9qkPgP.js → outbound-session-route-BaJRt05p.js} +1 -1
  37. package/dist/{preflight-audio-CRmUxxuM.js → preflight-audio-6J0vFNtu.js} +1 -1
  38. package/dist/{preview-streaming-Cc_oeIPP.js → preview-streaming-CXrFDP2T.js} +1 -0
  39. package/dist/{probe-E80IMT1X.js → probe-91lU5eh8.js} +1 -1
  40. package/dist/{probe.runtime-CMgUDax3.js → probe.runtime-DV37RDCU.js} +1 -1
  41. package/dist/{provider-CuOh6z_b.js → provider-D_QVXvp8.js} +53 -50
  42. package/dist/{provider-session.runtime-CCESIHVo.js → provider-session.runtime-CcPDguh6.js} +3 -3
  43. package/dist/provider.runtime-O7G03kik.js +2 -0
  44. package/dist/{reply-delivery-D9aKHtDH.js → reply-delivery-DKTZ6HkK.js} +10 -7
  45. package/dist/{resolve-allowlist-common-_e1cWOb3.js → resolve-allowlist-common-LhuVITjh.js} +2 -2
  46. package/dist/{resolve-channels-kyuvrXJg.js → resolve-channels-DjpVRJdT.js} +3 -3
  47. package/dist/{resolve-users-CAwh4EBq.js → resolve-users-DrZYxZSX.js} +2 -2
  48. package/dist/{route-resolution-BWErj5Cn.js → route-resolution-CYRPDKY4.js} +3 -3
  49. package/dist/{runtime-D8alY00g.js → runtime-BHAwVXEa.js} +7 -7
  50. package/dist/runtime-api.actions.js +2 -2
  51. package/dist/runtime-api.js +25 -25
  52. package/dist/runtime-api.lookup.js +6 -6
  53. package/dist/runtime-api.monitor--iuvLjPX.js +6 -0
  54. package/dist/runtime-api.monitor.js +7 -7
  55. package/dist/runtime-api.send.js +5 -5
  56. package/dist/runtime-api.threads.js +5 -5
  57. package/dist/runtime-setter-api.js +1 -1
  58. package/dist/secret-contract-api.js +1 -1
  59. package/dist/{security-audit-BtRd_VhN.js → security-audit-D8IaFuCm.js} +1 -1
  60. package/dist/security-audit-contract-api.js +1 -1
  61. package/dist/{security-audit.runtime-Dm1LW9KX.js → security-audit.runtime-DO1398sV.js} +1 -1
  62. package/dist/security-contract-api.js +1 -1
  63. package/dist/{send-8S_HKJpQ.js → send-C3peGbWO.js} +83 -56
  64. package/dist/{send.components-A42c_5tQ.js → send.components-Dsk3IzS_.js} +22 -14
  65. package/dist/{send.outbound-D3tonSz8.js → send.outbound-CXyInQ3c.js} +22 -11
  66. package/dist/send.receipt-DXimpUGs.js +35 -0
  67. package/dist/{send.shared-BQGiUPvZ.js → send.shared-BydEWvYg.js} +26 -7
  68. package/dist/{sender-identity-BGUfyvOC.js → sender-identity-DVJCrDxs.js} +1 -1
  69. package/dist/session-key-api.js +1 -1
  70. package/dist/setup-plugin-api.js +1 -1
  71. package/dist/{shared-BEW4H3bj.js → shared-BWD6uc0p.js} +8 -8
  72. package/dist/{shared-interactive-KgJjCqnB.js → shared-interactive-BZCU0ZJ8.js} +2 -2
  73. package/dist/{subagent-hooks-T0LPLh4H.js → subagent-hooks-DtbWOdAK.js} +1 -1
  74. package/dist/subagent-hooks-api.js +1 -1
  75. package/dist/{system-events-_fzSG--3.js → system-events-Dsc8MFYs.js} +2 -2
  76. package/dist/target-parsing-D-H7nnh2.js +51 -0
  77. package/dist/target-resolver-D7t8FMhO.js +85 -0
  78. package/dist/targets-DzAZIwg4.js +3 -0
  79. package/dist/test-api.js +4 -4
  80. package/dist/{thread-bindings-CMpZjP50.js → thread-bindings-B90pBWJg.js} +6 -6
  81. package/dist/{thread-bindings.discord-api-CwWGoyei.js → thread-bindings.discord-api-Dvf789Je.js} +7 -7
  82. package/dist/{thread-bindings.manager-BtxfLfWf.js → thread-bindings.manager-AwZ5Vble.js} +5 -5
  83. package/dist/{thread-bindings.session-updates-jcZSiRPI.js → thread-bindings.session-updates-B_AcsXSf.js} +1 -1
  84. package/dist/{threading-BMmpA2JR.js → threading-Dku_cGS8.js} +4 -4
  85. package/dist/timeouts.js +1 -1
  86. package/dist/{typing-Bw6NKWLZ.js → typing-BIjMmOZB.js} +2 -2
  87. package/openclaw.plugin.json +222 -1
  88. package/package.json +5 -5
  89. package/dist/provider.runtime-B68g3qLv.js +0 -2
  90. package/dist/runtime-api.monitor-DzkCxeBL.js +0 -6
  91. package/dist/target-resolver-DA84_xbt.js +0 -365
  92. package/dist/targets-FwL1BPTU.js +0 -2
  93. /package/dist/{agent-components.runtime-Dof1YMSz.js → agent-components.runtime-caj0h9y4.js} +0 -0
  94. /package/dist/{api-DzNBVTto.js → api-DaTujGTe.js} +0 -0
  95. /package/dist/{audit-core-CejGc3hO.js → audit-core-CIvZE94W.js} +0 -0
  96. /package/dist/{channel-access-DFIQqbYm.js → channel-access-CXAdcM95.js} +0 -0
  97. /package/dist/{directory-cache-D93eSrpB.js → directory-cache-D3l2v2_L.js} +0 -0
  98. /package/dist/{directory-config-DoETeOOx.js → directory-config-S2852QcC.js} +0 -0
  99. /package/dist/{doctor-shared-Cqvfgv9m.js → doctor-shared-DtOaqWzy.js} +0 -0
  100. /package/dist/{format-D8TsaXxW.js → format-XDPCvGK4.js} +0 -0
  101. /package/dist/{pluralkit-OFss_pIy.js → pluralkit-EXKKni07.js} +0 -0
  102. /package/dist/{preflight-audio.runtime-DPVbpZid.js → preflight-audio.runtime-3hiRefuj.js} +0 -0
  103. /package/dist/{runtime-K9RT6Egn.js → runtime-EoVRXYxX.js} +0 -0
  104. /package/dist/{secret-config-contract-5S9U9pjx.js → secret-config-contract-BA9jVaKx.js} +0 -0
  105. /package/dist/{security-contract-BE8rsdPq.js → security-contract-B7i5uqn6.js} +0 -0
  106. /package/dist/{security-doctor-DiilN216.js → security-doctor-2SGSPibT.js} +0 -0
  107. /package/dist/{session-contract-CuW9Nlxg.js → session-contract-DwjfF970.js} +0 -0
  108. /package/dist/{session-key-normalization-B5La-jFM.js → session-key-normalization-DvI2OlyS.js} +0 -0
  109. /package/dist/{thread-bindings.state-WU4duXKY.js → thread-bindings.state-CBwtFsbB.js} +0 -0
  110. /package/dist/{timeouts-CdsmBWWs.js → timeouts-BxAzVpSG.js} +0 -0
@@ -0,0 +1,85 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
+ import { c as resolveDiscordAccountAllowFrom, s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
3
+ import { t as parseDiscordTarget } from "./target-parsing-D-H7nnh2.js";
4
+ import { t as rememberDiscordDirectoryUser } from "./directory-cache-D3l2v2_L.js";
5
+ import { r as listDiscordDirectoryPeersLive } from "./directory-live-D3kbmVAu.js";
6
+ import { t as allowFromContainsDiscordUserId } from "./normalize-DBcng6RL.js";
7
+ import { buildMessagingTarget } from "openclaw/plugin-sdk/messaging-targets";
8
+ //#region extensions/discord/src/send-target-parsing.ts
9
+ const parseDiscordSendTarget = (raw, options = {}) => parseDiscordTarget(raw, options);
10
+ //#endregion
11
+ //#region extensions/discord/src/target-resolver.ts
12
+ var target_resolver_exports = /* @__PURE__ */ __exportAll({
13
+ parseAndResolveDiscordTarget: () => parseAndResolveDiscordTarget,
14
+ resolveDiscordTarget: () => resolveDiscordTarget
15
+ });
16
+ /**
17
+ * Resolve a Discord username to user ID using the directory lookup.
18
+ * This enables sending DMs by username instead of requiring explicit user IDs.
19
+ */
20
+ async function resolveDiscordTarget(raw, options, parseOptions = {}) {
21
+ const trimmed = raw.trim();
22
+ if (!trimmed) return;
23
+ const likelyUsername = isLikelyUsername(trimmed);
24
+ const shouldLookup = isExplicitUserLookup(trimmed, parseOptions) || likelyUsername;
25
+ if (/^\d+$/.test(trimmed) && parseOptions.defaultKind !== "user" && isConfiguredAllowedDiscordDmUser(trimmed, options)) return buildMessagingTarget("user", trimmed, trimmed);
26
+ const directParse = safeParseDiscordTarget(trimmed, parseOptions);
27
+ if (directParse && directParse.kind !== "channel" && !likelyUsername) return directParse;
28
+ if (!shouldLookup) return directParse ?? parseDiscordSendTarget(trimmed, parseOptions);
29
+ try {
30
+ const match = (await listDiscordDirectoryPeersLive({
31
+ ...options,
32
+ query: trimmed,
33
+ limit: 1
34
+ }))[0];
35
+ if (match && match.kind === "user") {
36
+ const userId = match.id.replace(/^user:/, "");
37
+ const resolvedAccountId = resolveDiscordAccount({
38
+ cfg: options.cfg,
39
+ accountId: options.accountId
40
+ }).accountId;
41
+ rememberDiscordDirectoryUser({
42
+ accountId: resolvedAccountId,
43
+ userId,
44
+ handles: [
45
+ trimmed,
46
+ match.name,
47
+ match.handle
48
+ ]
49
+ });
50
+ return buildMessagingTarget("user", userId, trimmed);
51
+ }
52
+ } catch {}
53
+ return parseDiscordSendTarget(trimmed, parseOptions);
54
+ }
55
+ async function parseAndResolveDiscordTarget(raw, options, parseOptions = {}) {
56
+ const resolved = await resolveDiscordTarget(raw, options, parseOptions) ?? parseDiscordSendTarget(raw, parseOptions);
57
+ if (!resolved) throw new Error("Recipient is required for Discord sends");
58
+ return resolved;
59
+ }
60
+ function safeParseDiscordTarget(input, options) {
61
+ try {
62
+ return parseDiscordSendTarget(input, options);
63
+ } catch {
64
+ return;
65
+ }
66
+ }
67
+ function isConfiguredAllowedDiscordDmUser(input, options) {
68
+ return allowFromContainsDiscordUserId(resolveDiscordAccountAllowFrom({
69
+ cfg: options.cfg,
70
+ accountId: options.accountId
71
+ }) ?? [], input);
72
+ }
73
+ function isExplicitUserLookup(input, options) {
74
+ if (/^<@!?(\d+)>$/.test(input)) return true;
75
+ if (/^(user:|discord:)/.test(input)) return true;
76
+ if (input.startsWith("@")) return true;
77
+ if (/^\d+$/.test(input)) return options.defaultKind === "user";
78
+ return false;
79
+ }
80
+ function isLikelyUsername(input) {
81
+ if (/^(user:|channel:|discord:|@|<@!?)|[\d]+$/.test(input)) return false;
82
+ return true;
83
+ }
84
+ //#endregion
85
+ export { parseDiscordSendTarget as i, resolveDiscordTarget as n, target_resolver_exports as r, parseAndResolveDiscordTarget as t };
@@ -0,0 +1,3 @@
1
+ import "./target-parsing-D-H7nnh2.js";
2
+ import "./target-resolver-D7t8FMhO.js";
3
+ export {};
package/dist/test-api.js CHANGED
@@ -1,7 +1,7 @@
1
- import { t as discordPlugin } from "./channel-UXGa9PGc.js";
2
- import { n as discordOutbound } from "./outbound-adapter-DNsTVJfH.js";
3
- import { t as __testing } from "./thread-bindings.manager-BtxfLfWf.js";
4
- import { n as buildDiscordInboundAccessContext } from "./inbound-context-CRylwjg0.js";
1
+ import { t as discordPlugin } from "./channel-CRTWY5R-.js";
2
+ import { n as discordOutbound } from "./outbound-adapter-jP0OgIyW.js";
3
+ import { t as __testing } from "./thread-bindings.manager-AwZ5Vble.js";
4
+ import { n as buildDiscordInboundAccessContext } from "./inbound-context-BobVUBqo.js";
5
5
  import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
6
6
  //#region extensions/discord/src/monitor/inbound-context.test-helpers.ts
7
7
  function buildFinalizedDiscordDirectInboundContext() {
@@ -1,10 +1,10 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
- import { c as parseDiscordTarget } from "./target-resolver-DA84_xbt.js";
3
- import "./targets-FwL1BPTU.js";
4
- import { C as resolveThreadBindingMaxAgeMs$1, O as shouldPersistBindingMutations, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, f as normalizeThreadId, g as removeBindingRecord, l as isRecentlyUnboundThreadWebhookMessage, n as MANAGERS_BY_ACCOUNT_ID, p as rememberRecentUnboundWebhookEcho, t as BINDINGS_BY_THREAD_ID, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-WU4duXKY.js";
5
- import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-jcZSiRPI.js";
6
- import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, s as resolveChannelIdForBinding, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-CwWGoyei.js";
7
- import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-BtxfLfWf.js";
2
+ import { t as parseDiscordTarget } from "./target-parsing-D-H7nnh2.js";
3
+ import "./targets-DzAZIwg4.js";
4
+ import { C as resolveThreadBindingMaxAgeMs$1, O as shouldPersistBindingMutations, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, f as normalizeThreadId, g as removeBindingRecord, l as isRecentlyUnboundThreadWebhookMessage, n as MANAGERS_BY_ACCOUNT_ID, p as rememberRecentUnboundWebhookEcho, t as BINDINGS_BY_THREAD_ID, x as resolveThreadBindingInactivityExpiresAt } from "./thread-bindings.state-CBwtFsbB.js";
5
+ import { n as setThreadBindingMaxAgeBySessionKey, r as resolveBindingIdsForTargetSession, t as setThreadBindingIdleTimeoutBySessionKey } from "./thread-bindings.session-updates-B_AcsXSf.js";
6
+ import { d as formatThreadBindingDurationLabel, l as resolveThreadBindingPersona, m as resolveThreadBindingThreadName, p as resolveThreadBindingIntroText, s as resolveChannelIdForBinding, u as resolveThreadBindingPersonaFromRecord } from "./thread-bindings.discord-api-Dvf789Je.js";
7
+ import { i as getThreadBindingManager, n as createNoopThreadBindingManager, r as createThreadBindingManager, t as __testing } from "./thread-bindings.manager-AwZ5Vble.js";
8
8
  import { normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
9
9
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
10
10
  import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
@@ -1,10 +1,10 @@
1
- import { l as resolveDiscordChannelId } from "./target-resolver-DA84_xbt.js";
2
- import { at as getChannel, q as createChannelWebhook } from "./discord-eZlimVfW.js";
3
- import { j as createDiscordRestClient } from "./send.shared-BQGiUPvZ.js";
4
- import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-8S_HKJpQ.js";
5
- import { t as sendMessageDiscord } from "./send.outbound-D3tonSz8.js";
6
- import { i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, k as toReusableWebhookKey, m as rememberReusableWebhook, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-WU4duXKY.js";
7
- import { n as resolveDiscordChannelInfoSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-DFIQqbYm.js";
1
+ import { n as resolveDiscordChannelId } from "./target-parsing-D-H7nnh2.js";
2
+ import { at as getChannel, q as createChannelWebhook } from "./discord-Du6FnKAq.js";
3
+ import { j as createDiscordRestClient } from "./send.shared-BydEWvYg.js";
4
+ import { c as sendWebhookMessageDiscord, u as createThreadDiscord } from "./send-C3peGbWO.js";
5
+ import { t as sendMessageDiscord } from "./send.outbound-CXyInQ3c.js";
6
+ import { i as REUSABLE_WEBHOOKS_BY_ACCOUNT_CHANNEL, k as toReusableWebhookKey, m as rememberReusableWebhook, t as BINDINGS_BY_THREAD_ID } from "./thread-bindings.state-CBwtFsbB.js";
7
+ import { n as resolveDiscordChannelInfoSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-CXAdcM95.js";
8
8
  import { SYSTEM_MARK, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
9
9
  import { ChannelType } from "discord-api-types/v10";
10
10
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
- import { l as resolveDiscordChannelId } from "./target-resolver-DA84_xbt.js";
3
- import { at as getChannel } from "./discord-eZlimVfW.js";
4
- import { j as createDiscordRestClient } from "./send.shared-BQGiUPvZ.js";
5
- import { A as DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS, C as resolveThreadBindingMaxAgeMs$1, D as shouldDefaultPersist, E as setBindingRecord, M as THREAD_BINDINGS_SWEEP_INTERVAL_MS, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, _ as resetThreadBindingsForTests, a as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, d as normalizeThreadBindingDurationMs, f as normalizeThreadId, g as removeBindingRecord, h as rememberThreadBindingToken, n as MANAGERS_BY_ACCOUNT_ID, o as ensureBindingsLoaded, p as rememberRecentUnboundWebhookEcho, r as PERSIST_BY_ACCOUNT_ID, s as forgetThreadBindingToken, t as BINDINGS_BY_THREAD_ID, u as normalizeTargetKind, v as resolveBindingIdsForSession, w as resolveThreadBindingsPath, x as resolveThreadBindingInactivityExpiresAt, y as resolveBindingRecordKey } from "./thread-bindings.state-WU4duXKY.js";
6
- import { a as isThreadArchived, c as summarizeDiscordError, f as resolveThreadBindingFarewellText, i as isDiscordThreadGoneError, m as resolveThreadBindingThreadName, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding } from "./thread-bindings.discord-api-CwWGoyei.js";
2
+ import { n as resolveDiscordChannelId } from "./target-parsing-D-H7nnh2.js";
3
+ import { at as getChannel } from "./discord-Du6FnKAq.js";
4
+ import { j as createDiscordRestClient } from "./send.shared-BydEWvYg.js";
5
+ import { A as DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS, C as resolveThreadBindingMaxAgeMs$1, D as shouldDefaultPersist, E as setBindingRecord, M as THREAD_BINDINGS_SWEEP_INTERVAL_MS, S as resolveThreadBindingMaxAgeExpiresAt, T as saveBindingsToDisk, _ as resetThreadBindingsForTests, a as THREAD_BINDING_TOUCH_PERSIST_MIN_INTERVAL_MS, b as resolveThreadBindingIdleTimeoutMs$1, c as getThreadBindingToken, d as normalizeThreadBindingDurationMs, f as normalizeThreadId, g as removeBindingRecord, h as rememberThreadBindingToken, n as MANAGERS_BY_ACCOUNT_ID, o as ensureBindingsLoaded, p as rememberRecentUnboundWebhookEcho, r as PERSIST_BY_ACCOUNT_ID, s as forgetThreadBindingToken, t as BINDINGS_BY_THREAD_ID, u as normalizeTargetKind, v as resolveBindingIdsForSession, w as resolveThreadBindingsPath, x as resolveThreadBindingInactivityExpiresAt, y as resolveBindingRecordKey } from "./thread-bindings.state-CBwtFsbB.js";
6
+ import { a as isThreadArchived, c as summarizeDiscordError, f as resolveThreadBindingFarewellText, i as isDiscordThreadGoneError, m as resolveThreadBindingThreadName, n as createWebhookForChannel, o as maybeSendBindingMessage, r as findReusableWebhook, s as resolveChannelIdForBinding, t as createThreadForBinding } from "./thread-bindings.discord-api-Dvf789Je.js";
7
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
8
8
  import { normalizeAccountId, resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/routing";
9
9
  import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
@@ -1,4 +1,4 @@
1
- import { E as setBindingRecord, O as shouldPersistBindingMutations, T as saveBindingsToDisk, o as ensureBindingsLoaded, t as BINDINGS_BY_THREAD_ID, v as resolveBindingIdsForSession } from "./thread-bindings.state-WU4duXKY.js";
1
+ import { E as setBindingRecord, O as shouldPersistBindingMutations, T as saveBindingsToDisk, o as ensureBindingsLoaded, t as BINDINGS_BY_THREAD_ID, v as resolveBindingIdsForSession } from "./thread-bindings.state-CBwtFsbB.js";
2
2
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
3
3
  //#region extensions/discord/src/monitor/thread-bindings.session-shared.ts
4
4
  function normalizeNonNegativeMs(raw) {
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
- import { et as createThread, ot as getChannelMessage, rt as editChannel, t as discord_exports } from "./discord-eZlimVfW.js";
3
- import { a as resolveDiscordChannelParentSafe, i as resolveDiscordChannelParentIdSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-DFIQqbYm.js";
4
- import { s as withAbortTimeout } from "./timeouts-CdsmBWWs.js";
5
- import { c as resolveDiscordChannelInfo, l as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText } from "./message-utils-9kaGF59d.js";
2
+ import { et as createThread, ot as getChannelMessage, rt as editChannel, t as discord_exports } from "./discord-Du6FnKAq.js";
3
+ import { a as resolveDiscordChannelParentSafe, i as resolveDiscordChannelParentIdSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-CXAdcM95.js";
4
+ import { s as withAbortTimeout } from "./timeouts-BxAzVpSG.js";
5
+ import { c as resolveDiscordChannelInfo, l as resolveDiscordMessageChannelId, n as resolveDiscordForwardedMessagesTextFromSnapshots, t as resolveDiscordEmbedText } from "./message-utils-B3uf0_3D.js";
6
6
  import { normalizeOptionalString, normalizeOptionalStringifiedId, truncateUtf16Safe } from "openclaw/plugin-sdk/text-runtime";
7
7
  import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing";
8
8
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
package/dist/timeouts.js CHANGED
@@ -1,2 +1,2 @@
1
- import { 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-CdsmBWWs.js";
1
+ import { 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-BxAzVpSG.js";
2
2
  export { DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS, DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS, DISCORD_DEFAULT_LISTENER_TIMEOUT_MS };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
- import { ft as sendChannelTyping } from "./discord-eZlimVfW.js";
3
- import { o as raceWithTimeout } from "./timeouts-CdsmBWWs.js";
2
+ import { ft as sendChannelTyping } from "./discord-Du6FnKAq.js";
3
+ import { o as raceWithTimeout } from "./timeouts-BxAzVpSG.js";
4
4
  //#region extensions/discord/src/monitor/typing.ts
5
5
  var typing_exports = /* @__PURE__ */ __exportAll({ sendTyping: () => sendTyping });
6
6
  const DISCORD_TYPING_START_TIMEOUT_MS = 5e3;
@@ -959,10 +959,98 @@
959
959
  "enabled": {
960
960
  "type": "boolean"
961
961
  },
962
+ "mode": {
963
+ "type": "string",
964
+ "enum": [
965
+ "stt-tts",
966
+ "agent-proxy",
967
+ "bidi"
968
+ ]
969
+ },
970
+ "agentSession": {
971
+ "type": "object",
972
+ "properties": {
973
+ "mode": {
974
+ "type": "string",
975
+ "enum": [
976
+ "voice",
977
+ "target"
978
+ ]
979
+ },
980
+ "target": {
981
+ "type": "string",
982
+ "minLength": 1
983
+ }
984
+ },
985
+ "additionalProperties": false
986
+ },
962
987
  "model": {
963
988
  "type": "string",
964
989
  "minLength": 1
965
990
  },
991
+ "realtime": {
992
+ "type": "object",
993
+ "properties": {
994
+ "provider": {
995
+ "type": "string",
996
+ "minLength": 1
997
+ },
998
+ "model": {
999
+ "type": "string",
1000
+ "minLength": 1
1001
+ },
1002
+ "voice": {
1003
+ "type": "string",
1004
+ "minLength": 1
1005
+ },
1006
+ "instructions": {
1007
+ "type": "string",
1008
+ "minLength": 1
1009
+ },
1010
+ "toolPolicy": {
1011
+ "type": "string",
1012
+ "enum": [
1013
+ "safe-read-only",
1014
+ "owner",
1015
+ "none"
1016
+ ]
1017
+ },
1018
+ "consultPolicy": {
1019
+ "type": "string",
1020
+ "enum": [
1021
+ "auto",
1022
+ "always"
1023
+ ]
1024
+ },
1025
+ "bargeIn": {
1026
+ "type": "boolean"
1027
+ },
1028
+ "minBargeInAudioEndMs": {
1029
+ "type": "integer",
1030
+ "minimum": 0,
1031
+ "maximum": 10000
1032
+ },
1033
+ "debounceMs": {
1034
+ "type": "integer",
1035
+ "exclusiveMinimum": 0,
1036
+ "maximum": 10000
1037
+ },
1038
+ "providers": {
1039
+ "type": "object",
1040
+ "propertyNames": {
1041
+ "type": "string"
1042
+ },
1043
+ "additionalProperties": {
1044
+ "type": "object",
1045
+ "propertyNames": {
1046
+ "type": "string"
1047
+ },
1048
+ "additionalProperties": {}
1049
+ }
1050
+ }
1051
+ },
1052
+ "additionalProperties": false
1053
+ },
966
1054
  "autoJoin": {
967
1055
  "type": "array",
968
1056
  "items": {
@@ -2541,10 +2629,98 @@
2541
2629
  "enabled": {
2542
2630
  "type": "boolean"
2543
2631
  },
2632
+ "mode": {
2633
+ "type": "string",
2634
+ "enum": [
2635
+ "stt-tts",
2636
+ "agent-proxy",
2637
+ "bidi"
2638
+ ]
2639
+ },
2640
+ "agentSession": {
2641
+ "type": "object",
2642
+ "properties": {
2643
+ "mode": {
2644
+ "type": "string",
2645
+ "enum": [
2646
+ "voice",
2647
+ "target"
2648
+ ]
2649
+ },
2650
+ "target": {
2651
+ "type": "string",
2652
+ "minLength": 1
2653
+ }
2654
+ },
2655
+ "additionalProperties": false
2656
+ },
2544
2657
  "model": {
2545
2658
  "type": "string",
2546
2659
  "minLength": 1
2547
2660
  },
2661
+ "realtime": {
2662
+ "type": "object",
2663
+ "properties": {
2664
+ "provider": {
2665
+ "type": "string",
2666
+ "minLength": 1
2667
+ },
2668
+ "model": {
2669
+ "type": "string",
2670
+ "minLength": 1
2671
+ },
2672
+ "voice": {
2673
+ "type": "string",
2674
+ "minLength": 1
2675
+ },
2676
+ "instructions": {
2677
+ "type": "string",
2678
+ "minLength": 1
2679
+ },
2680
+ "toolPolicy": {
2681
+ "type": "string",
2682
+ "enum": [
2683
+ "safe-read-only",
2684
+ "owner",
2685
+ "none"
2686
+ ]
2687
+ },
2688
+ "consultPolicy": {
2689
+ "type": "string",
2690
+ "enum": [
2691
+ "auto",
2692
+ "always"
2693
+ ]
2694
+ },
2695
+ "bargeIn": {
2696
+ "type": "boolean"
2697
+ },
2698
+ "minBargeInAudioEndMs": {
2699
+ "type": "integer",
2700
+ "minimum": 0,
2701
+ "maximum": 10000
2702
+ },
2703
+ "debounceMs": {
2704
+ "type": "integer",
2705
+ "exclusiveMinimum": 0,
2706
+ "maximum": 10000
2707
+ },
2708
+ "providers": {
2709
+ "type": "object",
2710
+ "propertyNames": {
2711
+ "type": "string"
2712
+ },
2713
+ "additionalProperties": {
2714
+ "type": "object",
2715
+ "propertyNames": {
2716
+ "type": "string"
2717
+ },
2718
+ "additionalProperties": {}
2719
+ }
2720
+ }
2721
+ },
2722
+ "additionalProperties": false
2723
+ },
2548
2724
  "autoJoin": {
2549
2725
  "type": "array",
2550
2726
  "items": {
@@ -3375,7 +3551,52 @@
3375
3551
  },
3376
3552
  "voice.model": {
3377
3553
  "label": "Discord Voice Model",
3378
- "help": "Optional LLM model override for Discord voice channel responses (for example openai/gpt-5.4-mini). Leave unset to inherit the routed agent model."
3554
+ "help": "Optional LLM model override for Discord voice channel responses and realtime agent consults (for example openai-codex/gpt-5.5). Leave unset to inherit the routed agent model."
3555
+ },
3556
+ "voice.mode": {
3557
+ "label": "Discord Voice Mode",
3558
+ "help": "Conversation mode: agent-proxy (default) uses realtime voice as the microphone/speaker for the routed OpenClaw agent, stt-tts uses batch speech-to-text plus TTS, and bidi lets the realtime provider converse directly with the OpenClaw consult tool."
3559
+ },
3560
+ "voice.agentSession": {
3561
+ "label": "Discord Voice Agent Session",
3562
+ "help": "Controls which OpenClaw conversation receives voice turns. Leave unset for the voice channel session, or set mode=\"target\" with a Discord target such as channel:123 to make voice an extension of an existing text channel session."
3563
+ },
3564
+ "voice.agentSession.target": {
3565
+ "label": "Discord Voice Agent Session Target",
3566
+ "help": "Discord target used when voice.agentSession.mode=\"target\", for example channel:123."
3567
+ },
3568
+ "voice.realtime.provider": {
3569
+ "label": "Discord Realtime Provider",
3570
+ "help": "Realtime voice provider for agent-proxy or bidi Discord voice modes, such as openai."
3571
+ },
3572
+ "voice.realtime.model": {
3573
+ "label": "Discord Realtime Model",
3574
+ "help": "Provider realtime session model, such as gpt-realtime-2. This is separate from voice.model, which remains the OpenClaw agent brain model."
3575
+ },
3576
+ "voice.realtime.voice": {
3577
+ "label": "Discord Realtime Voice",
3578
+ "help": "Provider realtime output voice, such as cedar."
3579
+ },
3580
+ "voice.realtime.toolPolicy": {
3581
+ "label": "Discord Realtime Tool Policy",
3582
+ "help": "Tool policy for the OpenClaw agent consult tool in bidi mode: safe-read-only, owner, or none."
3583
+ },
3584
+ "voice.realtime.consultPolicy": {
3585
+ "label": "Discord Realtime Consult Policy",
3586
+ "help": "Use always to strongly prefer the OpenClaw agent brain for substantive bidi turns."
3587
+ },
3588
+ "voice.realtime.bargeIn": {
3589
+ "label": "Discord Realtime Barge-In",
3590
+ "help": "Allow Discord speaker-start events to interrupt active realtime playback. Set true to keep manual interruption when provider input-audio interruption is disabled for echo control."
3591
+ },
3592
+ "voice.realtime.minBargeInAudioEndMs": {
3593
+ "label": "Discord Realtime Minimum Barge-In Audio (ms)",
3594
+ "help": "Minimum assistant playback duration before a Discord barge-in truncates realtime audio. Default: 250; set 0 for immediate interruption in low-echo rooms."
3595
+ },
3596
+ "voice.realtime.providers": {
3597
+ "label": "Discord Realtime Provider Settings",
3598
+ "help": "Provider-specific realtime voice settings keyed by provider id.",
3599
+ "advanced": true
3379
3600
  },
3380
3601
  "voice.autoJoin": {
3381
3602
  "label": "Discord Voice Auto-Join",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.5.7",
3
+ "version": "2026.5.9-beta.1",
4
4
  "description": "OpenClaw Discord channel plugin",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "discord-api-types": "^0.38.47",
13
13
  "https-proxy-agent": "^9.0.0",
14
14
  "opusscript": "^0.1.1",
15
- "typebox": "1.1.37",
15
+ "typebox": "1.1.38",
16
16
  "undici": "8.2.0",
17
17
  "ws": "^8.20.0"
18
18
  },
@@ -21,7 +21,7 @@
21
21
  "openclaw": "workspace:*"
22
22
  },
23
23
  "peerDependencies": {
24
- "openclaw": ">=2026.5.7"
24
+ "openclaw": ">=2026.5.9-beta.1"
25
25
  },
26
26
  "peerDependenciesMeta": {
27
27
  "openclaw": {
@@ -65,10 +65,10 @@
65
65
  "allowInvalidConfigRecovery": true
66
66
  },
67
67
  "compat": {
68
- "pluginApi": ">=2026.5.7"
68
+ "pluginApi": ">=2026.5.9-beta.1"
69
69
  },
70
70
  "build": {
71
- "openclawVersion": "2026.5.7"
71
+ "openclawVersion": "2026.5.9-beta.1"
72
72
  },
73
73
  "release": {
74
74
  "publishToClawHub": true,
@@ -1,2 +0,0 @@
1
- import { t as monitorDiscordProvider } from "./provider-CuOh6z_b.js";
2
- export { monitorDiscordProvider };
@@ -1,6 +0,0 @@
1
- import "./allow-list-ek-1hMKN.js";
2
- import "./provider-CuOh6z_b.js";
3
- import "./message-utils-9kaGF59d.js";
4
- import "./threading-BMmpA2JR.js";
5
- import "./message-handler-C9Ohf-ea.js";
6
- export {};