@openclaw/discord 2026.9.7 → 2026.9.9

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 (75) hide show
  1. package/dist/.setup/{account-inspect-De8hOUxG.mjs → account-inspect-Bp8nbBSx.mjs} +2 -2
  2. package/dist/.setup/{channel-type-DRCrEMss.mjs → allow-list-Kty_8Xca.mjs} +7 -7
  3. package/dist/.setup/{api-DVbJwZVt.mjs → api-CotnTQLx.mjs} +3 -3
  4. package/dist/.setup/{approval-handler.runtime-DxCK2Rux.mjs → approval-handler.runtime-DqU_yO2L.mjs} +9 -9
  5. package/dist/.setup/{approval-message-updates-BKFqavHZ.mjs → approval-message-updates-CdnQ98c8.mjs} +2 -2
  6. package/dist/.setup/{audit-CLg9I71N.mjs → audit-CqUeNcJH.mjs} +4 -4
  7. package/dist/.setup/{channel-DxlUVU9t.mjs → channel-Bu1qLdnm.mjs} +28 -23
  8. package/dist/.setup/{channel.setup-CRo1GjV7.mjs → channel.setup-DRCLt54O.mjs} +4 -4
  9. package/dist/.setup/{components-Cq1PvIpN.mjs → components-CwpgbGDR.mjs} +3 -3
  10. package/dist/.setup/{conversation-binding-route-Caz_XuFH.mjs → conversation-binding-route-DC0Y2v1B.mjs} +1 -1
  11. package/dist/.setup/{directory-config-esqNn0Eo.mjs → directory-config-DLT0PP2j.mjs} +1 -1
  12. package/dist/.setup/{directory-live-DtKRHuGV.mjs → directory-live-DPVUIJ8-.mjs} +4 -4
  13. package/dist/.setup/{discord-0xJYfdDD.mjs → discord-DTLP81g6.mjs} +3 -3
  14. package/dist/.setup/{doctor-BCl1H5tl.mjs → doctor-E3AF74Ms.mjs} +5 -5
  15. package/dist/.setup/{handle-action-CUvQWnE7.mjs → handle-action-cmTFQysA.mjs} +8 -8
  16. package/dist/.setup/{handle-action.guild-admin-Df-8gVle.mjs → handle-action.guild-admin-CH8nj2w0.mjs} +2 -2
  17. package/dist/.setup/{live-policy-config-8Pv20CHc.mjs → live-policy-config-D--q9Zta.mjs} +1 -1
  18. package/dist/.setup/{message-handler-B-Jk4oDk.mjs → message-handler-BVZO6wCg.mjs} +12 -11
  19. package/dist/.setup/{message-handler.preflight-v-__NSDq.mjs → message-handler.preflight-Be_b_NFp.mjs} +17 -17
  20. package/dist/.setup/{message-handler.preflight-pluralkit-CWLUBVcx.mjs → message-handler.preflight-pluralkit-TPGXsd8P.mjs} +7 -7
  21. package/dist/.setup/{message-handler.process-BNFFuChn.mjs → message-handler.process-BUBGcAoh.mjs} +21 -21
  22. package/dist/.setup/{outbound-adapter-BobT-kse.mjs → outbound-adapter-CSiCDzCN.mjs} +9 -9
  23. package/dist/.setup/{outbound-session-route-zVGxxceg.mjs → outbound-session-route-D0ryINch.mjs} +13 -13
  24. package/dist/.setup/{probe-LYrIHlBF.mjs → probe-DTSDdlpy.mjs} +4 -4
  25. package/dist/.setup/{provider-B_G5hASF.mjs → provider-BTm60b3t.mjs} +81 -81
  26. package/dist/.setup/{provider-session.runtime-BYlTBFD2.mjs → provider-session.runtime-DKJ-qSt9.mjs} +3 -3
  27. package/dist/.setup/provider.runtime-BvoZBuZY.mjs +2 -0
  28. package/dist/.setup/{realtime-session.runtime-oUd9DOcz.mjs → realtime-session.runtime-JZd7A5bS.mjs} +19 -19
  29. package/dist/.setup/{resolve-allowlist-common-DPdRggu5.mjs → resolve-allowlist-common-Ck4M_Ot2.mjs} +3 -3
  30. package/dist/.setup/{resolve-channels-BFPNRmVv.mjs → resolve-channels-CEaKGzuh.mjs} +3 -3
  31. package/dist/.setup/{resolve-users-0-aBuCy3.mjs → resolve-users-CMz4PVnV.mjs} +2 -2
  32. package/dist/.setup/{runtime-FN000lxA.mjs → runtime-DwW5C0WK.mjs} +12 -12
  33. package/dist/.setup/{runtime-sUksZ--Q.mjs → runtime-Lsy4dEx7.mjs} +2 -2
  34. package/dist/.setup/{send-CrfEI6Bs.mjs → send-DY5EeBPr.mjs} +15 -15
  35. package/dist/.setup/{send.components-DxQAMfES.mjs → send.components-DGwzyA_4.mjs} +7 -7
  36. package/dist/.setup/{send.outbound-BISKnb-a.mjs → send.outbound-DR8O-Pvo.mjs} +8 -8
  37. package/dist/.setup/{retry-pz_cSha2.mjs → send.receipt-D0JBijZQ.mjs} +217 -217
  38. package/dist/.setup/{send.shared-DGFkbkQR.mjs → send.shared-r0Fj2v_h.mjs} +40 -40
  39. package/dist/.setup/{sender-identity-B9X5Vb9R.mjs → sender-identity-DQCoikZl.mjs} +1 -1
  40. package/dist/.setup/setup-plugin-api-BEoo_L8p.mjs +3 -0
  41. package/dist/.setup/{shared-B3wZ4hN-.mjs → shared-CDq4vJm3.mjs} +7 -7
  42. package/dist/.setup/{subagent-hooks-nlUE9ow7.mjs → subagent-hooks-Bk0mMyHh.mjs} +2 -2
  43. package/dist/.setup/{system-events-CdeZnvPV.mjs → system-events-I1rH-U6o.mjs} +2 -2
  44. package/dist/.setup/{target-resolver-BuLapkhy.mjs → target-resolver-Dcg0WjsF.mjs} +3 -3
  45. package/dist/.setup/targets-CJkVZIkE.mjs +3 -0
  46. package/dist/.setup/{thread-bindings-D7TfgjR_.mjs → thread-bindings-E0TiUQUX.mjs} +6 -6
  47. package/dist/.setup/{thread-bindings.manager-DN-NissX.mjs → thread-bindings.manager-CEoFDOs9.mjs} +14 -14
  48. package/dist/.setup/{thread-bindings.session-updates-CshfKghV.mjs → thread-bindings.session-updates-DvtjzKO-.mjs} +2 -2
  49. package/dist/.setup/{transcripts-source-p8EV179h.mjs → transcripts-source-CHhpvL97.mjs} +17 -17
  50. package/dist/.setup/{typing-BiHCzBRu.mjs → typing-Cr0b2zBq.mjs} +1 -1
  51. package/dist/.setup/{voice-runtime-B46rcwrG.mjs → voice-runtime-BngIfPc3.mjs} +46 -46
  52. package/dist/account-inspect-api.js +1 -1
  53. package/dist/action-runtime-api.js +1 -1
  54. package/dist/activities-api.js +791 -1
  55. package/dist/api.js +15 -15
  56. package/dist/channel-config-api.js +1 -1
  57. package/dist/channel-plugin-api.js +1 -1
  58. package/dist/directory-contract-api.js +1 -1
  59. package/dist/doctor-contract-api.js +1 -1
  60. package/dist/index.js +9 -5
  61. package/dist/runtime-api.js +20 -20
  62. package/dist/setup-entry.js +1 -1
  63. package/dist/setup-plugin-api.js +1 -1
  64. package/dist/src/voice/audio-worker.runtime.js +3 -3
  65. package/dist/subagent-hooks-api.js +1 -1
  66. package/dist/transcripts-source-api.js +1 -1
  67. package/package.json +4 -4
  68. package/dist/.setup/activities-api-tvbsU2e3.mjs +0 -792
  69. package/dist/.setup/provider.runtime-CUE3UxER.mjs +0 -2
  70. package/dist/.setup/setup-plugin-api-BQUBxbhe.mjs +0 -3
  71. package/dist/.setup/targets-0KUcEIYx.mjs +0 -3
  72. package/dist/.setup/{accounts-ChaMcixG.mjs → accounts-DS-A-gCx.mjs} +3 -3
  73. package/dist/.setup/{config-schema-oxELUSDx.mjs → config-schema-DKUSr985.mjs} +2 -2
  74. package/dist/.setup/{receive-recovery-CHPOsnLc.mjs → receive-recovery-D6eikHf5.mjs} +2 -2
  75. package/dist/.setup/{thread-bindings.state-g6v9zAym.mjs → thread-bindings.state-755lJHln.mjs} +3 -3
@@ -1,227 +1,16 @@
1
- import { v as RateLimitError } from "./discord-0xJYfdDD.mjs";
1
+ import { v as RateLimitError } from "./discord-DTLP81g6.mjs";
2
+ import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
3
+ import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
2
4
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
3
5
  import { parseStrictNonNegativeInteger, resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
4
- import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
5
6
  import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
6
- import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
7
- import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
8
- import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
9
7
  import { chunkByParagraph } from "openclaw/plugin-sdk/reply-chunking";
10
8
  import { chunkTextForOutbound, findCodeRegions } from "openclaw/plugin-sdk/text-chunking";
9
+ import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
10
+ import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
11
11
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
12
12
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
13
13
  import { attachChannelToResults } from "openclaw/plugin-sdk/channel-send-result";
14
- //#region extensions/discord/src/target-parsing.ts
15
- function parseDiscordTarget(raw, options = {}) {
16
- const trimmed = raw.trim();
17
- if (!trimmed) return;
18
- const providerPrefixedTarget = parseDiscordProviderPrefixedTarget(trimmed);
19
- if (providerPrefixedTarget) return providerPrefixedTarget;
20
- const userTarget = parseMentionPrefixOrAtUserTarget({
21
- raw: trimmed,
22
- mentionPattern: /^<@!?(\d+)>$/,
23
- prefixes: [
24
- {
25
- prefix: "user:",
26
- kind: "user"
27
- },
28
- {
29
- prefix: "channel:",
30
- kind: "channel"
31
- },
32
- {
33
- prefix: "discord:",
34
- kind: "user"
35
- }
36
- ],
37
- atUserPattern: /^\d+$/,
38
- atUserErrorMessage: "Discord DMs require a user id (use user:<id> or a <@id> mention)"
39
- });
40
- if (userTarget) return userTarget;
41
- if (/^\d+$/.test(trimmed)) {
42
- if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
43
- throw new Error(options.ambiguousMessage ?? `Ambiguous Discord recipient "${trimmed}". For DMs use "user:${trimmed}" or "<@${trimmed}>"; for channels use "channel:${trimmed}".`);
44
- }
45
- return buildMessagingTarget("channel", trimmed, trimmed);
46
- }
47
- function parseDiscordProviderPrefixedTarget(raw) {
48
- const match = /^discord:(channel|user):(.+)$/i.exec(raw);
49
- if (!match) return;
50
- const kind = match[1]?.toLowerCase();
51
- const id = match[2]?.trim();
52
- if (!kind || !id) return;
53
- return buildMessagingTarget(kind, id, `${kind}:${id}`);
54
- }
55
- function resolveDiscordChannelId(raw) {
56
- const target = parseDiscordTarget(raw, { defaultKind: "channel" });
57
- return requireTargetKind({
58
- platform: "Discord",
59
- target,
60
- kind: "channel"
61
- });
62
- }
63
- //#endregion
64
- //#region extensions/discord/src/normalize.ts
65
- function normalizeDiscordMessagingTarget(raw) {
66
- return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
67
- }
68
- function matchesDiscordToolContextTarget(params) {
69
- const target = normalizeDiscordMessagingTarget(params.target);
70
- if (!target) return false;
71
- return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === target);
72
- }
73
- /**
74
- * Normalize a Discord outbound target for delivery. Bare numeric IDs are
75
- * prefixed with "channel:" to avoid the ambiguous-target error in
76
- * parseDiscordTarget, unless the ID is explicitly configured as an allowed DM
77
- * sender. All other formats pass through unchanged.
78
- */
79
- function normalizeDiscordOutboundTarget(to, allowFrom) {
80
- const trimmed = to?.trim();
81
- if (!trimmed) return {
82
- ok: false,
83
- error: /* @__PURE__ */ new Error("Discord recipient is required. Use \"channel:<id>\" for channels or \"user:<id>\" for DMs.")
84
- };
85
- if (/^\d+$/.test(trimmed)) {
86
- if (allowFromContainsDiscordUserId(allowFrom, trimmed)) return {
87
- ok: true,
88
- to: `user:${trimmed}`
89
- };
90
- return {
91
- ok: true,
92
- to: `channel:${trimmed}`
93
- };
94
- }
95
- return {
96
- ok: true,
97
- to: trimmed
98
- };
99
- }
100
- function allowFromContainsDiscordUserId(allowFrom, userId) {
101
- const normalizedUserId = userId.trim();
102
- if (!normalizedUserId) return false;
103
- const normalizedAllowFrom = (allowFrom ?? []).map(normalizeAllowFromDiscordUserId).filter((entry) => Boolean(entry));
104
- return resolveAllowlistMatchByCandidates({
105
- allowList: normalizedAllowFrom,
106
- candidates: [{
107
- value: normalizedUserId,
108
- source: "id"
109
- }]
110
- }).allowed;
111
- }
112
- function normalizeAllowFromDiscordUserId(entry) {
113
- const trimmed = entry.trim().toLowerCase();
114
- if (!trimmed || trimmed === "*") return;
115
- const mentionMatch = /^<@!?(\d+)>$/.exec(trimmed);
116
- if (mentionMatch) return mentionMatch[1];
117
- const prefixedMatch = /^(?:discord:)?user:(\d+)$/.exec(trimmed);
118
- if (prefixedMatch) return prefixedMatch[1];
119
- const discordMatch = /^discord:(\d+)$/.exec(trimmed);
120
- if (discordMatch) return discordMatch[1];
121
- return /^\d+$/.test(trimmed) ? trimmed : void 0;
122
- }
123
- function looksLikeDiscordTargetId(raw) {
124
- const trimmed = raw.trim();
125
- if (!trimmed) return false;
126
- if (/^<@!?\d+>$/.test(trimmed)) return true;
127
- if (/^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed)) return true;
128
- if (/^\d{6,}$/.test(trimmed)) return true;
129
- return false;
130
- }
131
- //#endregion
132
- //#region extensions/discord/src/reply-reference.ts
133
- function resolveDiscordReplyReference(params) {
134
- if (!params.replyToId) return;
135
- const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
136
- return {
137
- messageId: params.replyToId,
138
- scope: singleUse ? "first" : "all"
139
- };
140
- }
141
- function createReusableDiscordReplyReference(messageId) {
142
- return messageId ? {
143
- messageId,
144
- scope: "all"
145
- } : void 0;
146
- }
147
- function resolveDiscordReplyMessageId(reply, isFirst) {
148
- return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
149
- }
150
- //#endregion
151
- //#region extensions/discord/src/send.receipt.ts
152
- function toDiscordOutboundDeliveryResult(result) {
153
- const { channelId, ...delivery } = result;
154
- return {
155
- ...delivery,
156
- target: {
157
- kind: "channel",
158
- id: channelId
159
- }
160
- };
161
- }
162
- function createDiscordSendReceiptFromResults(params) {
163
- const receipt = createMessageReceiptFromOutboundResults({
164
- results: attachChannelToResults("discord", params.results),
165
- threadId: params.threadId
166
- });
167
- return {
168
- ...receipt,
169
- parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
170
- platformMessageId,
171
- kind,
172
- index,
173
- threadId,
174
- replyToId,
175
- raw
176
- }))
177
- };
178
- }
179
- function createDiscordSendReceipt(params) {
180
- const results = params.platformMessageIds.map((messageId) => messageId.trim()).filter(Boolean).map((messageId, index) => {
181
- const result = {
182
- channel: "discord",
183
- messageId
184
- };
185
- if (params.channelId) result.channelId = params.channelId;
186
- if (params.reply?.scope === "first" && index === 0) {
187
- const rawResult = {
188
- channel: "discord",
189
- messageId
190
- };
191
- if (params.channelId) rawResult.channelId = params.channelId;
192
- result.receipt = createMessageReceiptFromOutboundResults({
193
- results: [rawResult],
194
- kind: params.kind,
195
- threadId: params.threadId,
196
- replyToId: params.reply.messageId
197
- });
198
- }
199
- return result;
200
- });
201
- return createMessageReceiptFromOutboundResults({
202
- results,
203
- kind: params.kind,
204
- threadId: params.threadId,
205
- replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
206
- });
207
- }
208
- function createDiscordSendResult(params) {
209
- const messageId = params.result.id ?? "";
210
- const channelId = params.result.channel_id ?? params.fallbackChannelId;
211
- const receiptParams = {
212
- platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
213
- channelId,
214
- kind: params.kind
215
- };
216
- if (params.threadId != null) receiptParams.threadId = String(params.threadId);
217
- if (params.reply) receiptParams.reply = params.reply;
218
- return {
219
- messageId,
220
- channelId,
221
- receipt: createDiscordSendReceipt(receiptParams)
222
- };
223
- }
224
- //#endregion
225
14
  //#region packages/normalization-core/src/utf16-slice.ts
226
15
  function isHighSurrogate(codeUnit) {
227
16
  return codeUnit >= 55296 && codeUnit <= 56319;
@@ -692,4 +481,215 @@ function createDiscordRetryRunner(params) {
692
481
  };
693
482
  }
694
483
  //#endregion
695
- export { matchesDiscordToolContextTarget as _, recordDiscordMessageCreateAmbiguity as a, parseDiscordTarget as b, createDiscordSendReceipt as c, toDiscordOutboundDeliveryResult as d, createReusableDiscordReplyReference as f, looksLikeDiscordTargetId as g, allowFromContainsDiscordUserId as h, hasDiscordMessageCreateAmbiguity as i, createDiscordSendReceiptFromResults as l, resolveDiscordReplyReference as m, classifyDiscordDeliveryFailure as n, chunkDiscordTextWithMode as o, resolveDiscordReplyMessageId as p, createDiscordRetryRunner as r, findGraphemeChunkEnd as s, canFallbackDiscordWebhookSend as t, createDiscordSendResult as u, normalizeDiscordMessagingTarget as v, resolveDiscordChannelId as x, normalizeDiscordOutboundTarget as y };
484
+ //#region extensions/discord/src/target-parsing.ts
485
+ function parseDiscordTarget(raw, options = {}) {
486
+ const trimmed = raw.trim();
487
+ if (!trimmed) return;
488
+ const providerPrefixedTarget = parseDiscordProviderPrefixedTarget(trimmed);
489
+ if (providerPrefixedTarget) return providerPrefixedTarget;
490
+ const userTarget = parseMentionPrefixOrAtUserTarget({
491
+ raw: trimmed,
492
+ mentionPattern: /^<@!?(\d+)>$/,
493
+ prefixes: [
494
+ {
495
+ prefix: "user:",
496
+ kind: "user"
497
+ },
498
+ {
499
+ prefix: "channel:",
500
+ kind: "channel"
501
+ },
502
+ {
503
+ prefix: "discord:",
504
+ kind: "user"
505
+ }
506
+ ],
507
+ atUserPattern: /^\d+$/,
508
+ atUserErrorMessage: "Discord DMs require a user id (use user:<id> or a <@id> mention)"
509
+ });
510
+ if (userTarget) return userTarget;
511
+ if (/^\d+$/.test(trimmed)) {
512
+ if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
513
+ throw new Error(options.ambiguousMessage ?? `Ambiguous Discord recipient "${trimmed}". For DMs use "user:${trimmed}" or "<@${trimmed}>"; for channels use "channel:${trimmed}".`);
514
+ }
515
+ return buildMessagingTarget("channel", trimmed, trimmed);
516
+ }
517
+ function parseDiscordProviderPrefixedTarget(raw) {
518
+ const match = /^discord:(channel|user):(.+)$/i.exec(raw);
519
+ if (!match) return;
520
+ const kind = match[1]?.toLowerCase();
521
+ const id = match[2]?.trim();
522
+ if (!kind || !id) return;
523
+ return buildMessagingTarget(kind, id, `${kind}:${id}`);
524
+ }
525
+ function resolveDiscordChannelId(raw) {
526
+ const target = parseDiscordTarget(raw, { defaultKind: "channel" });
527
+ return requireTargetKind({
528
+ platform: "Discord",
529
+ target,
530
+ kind: "channel"
531
+ });
532
+ }
533
+ //#endregion
534
+ //#region extensions/discord/src/normalize.ts
535
+ function normalizeDiscordMessagingTarget(raw) {
536
+ return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
537
+ }
538
+ function matchesDiscordToolContextTarget(params) {
539
+ const target = normalizeDiscordMessagingTarget(params.target);
540
+ if (!target) return false;
541
+ return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === target);
542
+ }
543
+ /**
544
+ * Normalize a Discord outbound target for delivery. Bare numeric IDs are
545
+ * prefixed with "channel:" to avoid the ambiguous-target error in
546
+ * parseDiscordTarget, unless the ID is explicitly configured as an allowed DM
547
+ * sender. All other formats pass through unchanged.
548
+ */
549
+ function normalizeDiscordOutboundTarget(to, allowFrom) {
550
+ const trimmed = to?.trim();
551
+ if (!trimmed) return {
552
+ ok: false,
553
+ error: /* @__PURE__ */ new Error("Discord recipient is required. Use \"channel:<id>\" for channels or \"user:<id>\" for DMs.")
554
+ };
555
+ if (/^\d+$/.test(trimmed)) {
556
+ if (allowFromContainsDiscordUserId(allowFrom, trimmed)) return {
557
+ ok: true,
558
+ to: `user:${trimmed}`
559
+ };
560
+ return {
561
+ ok: true,
562
+ to: `channel:${trimmed}`
563
+ };
564
+ }
565
+ return {
566
+ ok: true,
567
+ to: trimmed
568
+ };
569
+ }
570
+ function allowFromContainsDiscordUserId(allowFrom, userId) {
571
+ const normalizedUserId = userId.trim();
572
+ if (!normalizedUserId) return false;
573
+ const normalizedAllowFrom = (allowFrom ?? []).map(normalizeAllowFromDiscordUserId).filter((entry) => Boolean(entry));
574
+ return resolveAllowlistMatchByCandidates({
575
+ allowList: normalizedAllowFrom,
576
+ candidates: [{
577
+ value: normalizedUserId,
578
+ source: "id"
579
+ }]
580
+ }).allowed;
581
+ }
582
+ function normalizeAllowFromDiscordUserId(entry) {
583
+ const trimmed = entry.trim().toLowerCase();
584
+ if (!trimmed || trimmed === "*") return;
585
+ const mentionMatch = /^<@!?(\d+)>$/.exec(trimmed);
586
+ if (mentionMatch) return mentionMatch[1];
587
+ const prefixedMatch = /^(?:discord:)?user:(\d+)$/.exec(trimmed);
588
+ if (prefixedMatch) return prefixedMatch[1];
589
+ const discordMatch = /^discord:(\d+)$/.exec(trimmed);
590
+ if (discordMatch) return discordMatch[1];
591
+ return /^\d+$/.test(trimmed) ? trimmed : void 0;
592
+ }
593
+ function looksLikeDiscordTargetId(raw) {
594
+ const trimmed = raw.trim();
595
+ if (!trimmed) return false;
596
+ if (/^<@!?\d+>$/.test(trimmed)) return true;
597
+ if (/^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed)) return true;
598
+ if (/^\d{6,}$/.test(trimmed)) return true;
599
+ return false;
600
+ }
601
+ //#endregion
602
+ //#region extensions/discord/src/reply-reference.ts
603
+ function resolveDiscordReplyReference(params) {
604
+ if (!params.replyToId) return;
605
+ const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
606
+ return {
607
+ messageId: params.replyToId,
608
+ scope: singleUse ? "first" : "all"
609
+ };
610
+ }
611
+ function createReusableDiscordReplyReference(messageId) {
612
+ return messageId ? {
613
+ messageId,
614
+ scope: "all"
615
+ } : void 0;
616
+ }
617
+ function resolveDiscordReplyMessageId(reply, isFirst) {
618
+ return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
619
+ }
620
+ //#endregion
621
+ //#region extensions/discord/src/send.receipt.ts
622
+ function toDiscordOutboundDeliveryResult(result) {
623
+ const { channelId, ...delivery } = result;
624
+ return {
625
+ ...delivery,
626
+ target: {
627
+ kind: "channel",
628
+ id: channelId
629
+ }
630
+ };
631
+ }
632
+ function createDiscordSendReceiptFromResults(params) {
633
+ const receipt = createMessageReceiptFromOutboundResults({
634
+ results: attachChannelToResults("discord", params.results),
635
+ threadId: params.threadId
636
+ });
637
+ return {
638
+ ...receipt,
639
+ parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
640
+ platformMessageId,
641
+ kind,
642
+ index,
643
+ threadId,
644
+ replyToId,
645
+ raw
646
+ }))
647
+ };
648
+ }
649
+ function createDiscordSendReceipt(params) {
650
+ const results = params.platformMessageIds.map((messageId) => messageId.trim()).filter(Boolean).map((messageId, index) => {
651
+ const result = {
652
+ channel: "discord",
653
+ messageId
654
+ };
655
+ if (params.channelId) result.channelId = params.channelId;
656
+ if (params.reply?.scope === "first" && index === 0) {
657
+ const rawResult = {
658
+ channel: "discord",
659
+ messageId
660
+ };
661
+ if (params.channelId) rawResult.channelId = params.channelId;
662
+ result.receipt = createMessageReceiptFromOutboundResults({
663
+ results: [rawResult],
664
+ kind: params.kind,
665
+ threadId: params.threadId,
666
+ replyToId: params.reply.messageId
667
+ });
668
+ }
669
+ return result;
670
+ });
671
+ return createMessageReceiptFromOutboundResults({
672
+ results,
673
+ kind: params.kind,
674
+ threadId: params.threadId,
675
+ replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
676
+ });
677
+ }
678
+ function createDiscordSendResult(params) {
679
+ const messageId = params.result.id ?? "";
680
+ const channelId = params.result.channel_id ?? params.fallbackChannelId;
681
+ const receiptParams = {
682
+ platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
683
+ channelId,
684
+ kind: params.kind
685
+ };
686
+ if (params.threadId != null) receiptParams.threadId = String(params.threadId);
687
+ if (params.reply) receiptParams.reply = params.reply;
688
+ return {
689
+ messageId,
690
+ channelId,
691
+ receipt: createDiscordSendReceipt(receiptParams)
692
+ };
693
+ }
694
+ //#endregion
695
+ export { createDiscordRetryRunner as _, createReusableDiscordReplyReference as a, chunkDiscordTextWithMode as b, allowFromContainsDiscordUserId as c, normalizeDiscordMessagingTarget as d, normalizeDiscordOutboundTarget as f, classifyDiscordDeliveryFailure as g, canFallbackDiscordWebhookSend as h, toDiscordOutboundDeliveryResult as i, looksLikeDiscordTargetId as l, resolveDiscordChannelId as m, createDiscordSendReceiptFromResults as n, resolveDiscordReplyMessageId as o, parseDiscordTarget as p, createDiscordSendResult as r, resolveDiscordReplyReference as s, createDiscordSendReceipt as t, matchesDiscordToolContextTarget as u, hasDiscordMessageCreateAmbiguity as v, findGraphemeChunkEnd as x, recordDiscordMessageCreateAmbiguity as y };
@@ -1,48 +1,19 @@
1
- import { A as serializePayload, Mt as getGuildMember, ct as createChannelMessage, g as RequestClient, gt as getThreadMember, it as getCurrentUser, j as Embed, jt as getGuild, k as hasDiscordV2Components, mt as getChannel, rt as createUserDmChannel } from "./discord-0xJYfdDD.mjs";
2
- import { t as isDiscordThreadChannelType } from "./channel-type-DRCrEMss.mjs";
3
- import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-ChaMcixG.mjs";
4
- import { o as chunkDiscordTextWithMode, p as resolveDiscordReplyMessageId, r as createDiscordRetryRunner } from "./retry-pz_cSha2.mjs";
5
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-BuLapkhy.mjs";
1
+ import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-DS-A-gCx.mjs";
2
+ import { k as isDiscordThreadChannelType } from "./allow-list-Kty_8Xca.mjs";
3
+ import { A as serializePayload, Mt as getGuildMember, ct as createChannelMessage, g as RequestClient, gt as getThreadMember, it as getCurrentUser, j as Embed, jt as getGuild, k as hasDiscordV2Components, mt as getChannel, rt as createUserDmChannel } from "./discord-DTLP81g6.mjs";
4
+ import { _ as createDiscordRetryRunner, b as chunkDiscordTextWithMode, o as resolveDiscordReplyMessageId } from "./send.receipt-D0JBijZQ.mjs";
5
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-Dcg0WjsF.mjs";
6
+ import { danger } from "openclaw/plugin-sdk/runtime-env";
7
+ import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
8
+ import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
6
9
  import { ChannelType, MessageFlags, PermissionFlagsBits } from "discord-api-types/v10";
7
10
  import { randomBytes } from "node:crypto";
8
11
  import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
9
- import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
10
- import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
11
- import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
12
- import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
13
- import { danger } from "openclaw/plugin-sdk/runtime-env";
14
12
  import { PollLayoutType } from "discord-api-types/payloads/v10";
15
13
  import { buildOutboundMediaLoadOptions, extensionForMime, normalizePollDurationHours, normalizePollInput } from "openclaw/plugin-sdk/media-runtime";
14
+ import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
15
+ import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
16
16
  import { loadWebMedia } from "openclaw/plugin-sdk/web-media";
17
- //#region extensions/discord/src/recipient-resolution.ts
18
- async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
19
- if (!cfg) throw new Error("Discord recipient resolution requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
20
- const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
21
- const accountInfo = resolveDiscordAccount({
22
- cfg: resolvedCfg,
23
- accountId
24
- });
25
- const resolved = await parseAndResolveDiscordTarget(raw, {
26
- cfg: resolvedCfg,
27
- accountId: accountInfo.accountId
28
- }, parseOptions);
29
- return {
30
- kind: resolved.kind,
31
- id: resolved.id
32
- };
33
- }
34
- async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
35
- const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
36
- const resolved = await parseAndResolveDiscordTarget(raw, {
37
- cfg: resolvedCfg,
38
- accountId
39
- }, { defaultKind: "channel" });
40
- return {
41
- kind: resolved.kind,
42
- id: resolved.id
43
- };
44
- }
45
- //#endregion
46
17
  //#region extensions/discord/src/monitor/gateway-registry.ts
47
18
  /**
48
19
  * Module-level registry of active Discord GatewayPlugin instances.
@@ -206,6 +177,35 @@ function resolveDiscordRest(opts) {
206
177
  return createDiscordRestClient(opts).rest;
207
178
  }
208
179
  //#endregion
180
+ //#region extensions/discord/src/recipient-resolution.ts
181
+ async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
182
+ if (!cfg) throw new Error("Discord recipient resolution requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
183
+ const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
184
+ const accountInfo = resolveDiscordAccount({
185
+ cfg: resolvedCfg,
186
+ accountId
187
+ });
188
+ const resolved = await parseAndResolveDiscordTarget(raw, {
189
+ cfg: resolvedCfg,
190
+ accountId: accountInfo.accountId
191
+ }, parseOptions);
192
+ return {
193
+ kind: resolved.kind,
194
+ id: resolved.id
195
+ };
196
+ }
197
+ async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
198
+ const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
199
+ const resolved = await parseAndResolveDiscordTarget(raw, {
200
+ cfg: resolvedCfg,
201
+ accountId
202
+ }, { defaultKind: "channel" });
203
+ return {
204
+ kind: resolved.kind,
205
+ id: resolved.id
206
+ };
207
+ }
208
+ //#endregion
209
209
  //#region extensions/discord/src/send.message-request.ts
210
210
  const SUPPRESS_EMBEDS_FLAG = MessageFlags.SuppressEmbeds;
211
211
  const SUPPRESS_NOTIFICATIONS_FLAG = MessageFlags.SuppressNotifications;
@@ -725,4 +725,4 @@ function buildReactionIdentifier(emoji) {
725
725
  return emoji.name ?? "";
726
726
  }
727
727
  //#endregion
728
- export { resolveDiscordSendEmbeds as A, withValidatedDiscordProxy as B, hasAnyChannelPermissionDiscord as C, createDiscordMessageNonce as D, buildDiscordMessageRequest as E, resolveDiscordClientAccountContext as F, parseAndResolveChannelRecipient as G, getGateway as H, resolveDiscordRest as I, DISCORD_REST_TIMEOUT_MS as L, createDiscordClient as M, createDiscordRestClient as N, resolveDiscordMessageFlags as O, createDiscordRuntimeAccountContext as P, resolveDiscordProxyFetchForAccount as R, hasAllGuildPermissionsDiscord as S, SUPPRESS_NOTIFICATIONS_FLAG as T, registerGateway as U, clearGateways as V, unregisterGateway as W, canManageGuildMemberRoleDiscord as _, normalizeEmojiName as a, fetchChannelPermissionsDiscord as b, resolveChannelId as c, sendDiscordMedia as d, sendDiscordText as f, DiscordSendError as g, DISCORD_MAX_STICKER_BYTES as h, normalizeDiscordPollInput as i, resolveDiscordSuppressEmbeds as j, resolveDiscordSendComponents as k, resolveDiscordChannel as l, DISCORD_MAX_EVENT_COVER_BYTES as m, buildDiscordTextChunks as n, normalizeReactionEmoji as o, DISCORD_MAX_EMOJI_BYTES as p, buildReactionIdentifier as r, normalizeStickerIds as s, buildDiscordSendError as t, resolveDiscordTargetChannelId as u, canManageGuildRoleDiscord as v, hasAnyGuildPermissionDiscord as w, fetchMemberGuildPermissionsDiscord as x, canViewDiscordGuildChannel as y, validateDiscordProxyUrl as z };
728
+ export { resolveDiscordSendEmbeds as A, validateDiscordProxyUrl as B, hasAnyChannelPermissionDiscord as C, createDiscordMessageNonce as D, buildDiscordMessageRequest as E, createDiscordRuntimeAccountContext as F, unregisterGateway as G, clearGateways as H, resolveDiscordClientAccountContext as I, resolveDiscordRest as L, parseAndResolveChannelRecipient as M, createDiscordClient as N, resolveDiscordMessageFlags as O, createDiscordRestClient as P, DISCORD_REST_TIMEOUT_MS as R, hasAllGuildPermissionsDiscord as S, SUPPRESS_NOTIFICATIONS_FLAG as T, getGateway as U, withValidatedDiscordProxy as V, registerGateway as W, canManageGuildMemberRoleDiscord as _, normalizeEmojiName as a, fetchChannelPermissionsDiscord as b, resolveChannelId as c, sendDiscordMedia as d, sendDiscordText as f, DiscordSendError as g, DISCORD_MAX_STICKER_BYTES as h, normalizeDiscordPollInput as i, resolveDiscordSuppressEmbeds as j, resolveDiscordSendComponents as k, resolveDiscordChannel as l, DISCORD_MAX_EVENT_COVER_BYTES as m, buildDiscordTextChunks as n, normalizeReactionEmoji as o, DISCORD_MAX_EMOJI_BYTES as p, buildReactionIdentifier as r, normalizeStickerIds as s, buildDiscordSendError as t, resolveDiscordTargetChannelId as u, canManageGuildRoleDiscord as v, hasAnyGuildPermissionDiscord as w, fetchMemberGuildPermissionsDiscord as x, canViewDiscordGuildChannel as y, resolveDiscordProxyFetchForAccount as z };
@@ -1,4 +1,4 @@
1
- import { S as formatDiscordUserTag } from "./channel-type-DRCrEMss.mjs";
1
+ import { x as formatDiscordUserTag } from "./allow-list-Kty_8Xca.mjs";
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) {
@@ -0,0 +1,3 @@
1
+ import { t as discordSetupPlugin } from "./channel.setup-DRCLt54O.mjs";
2
+ import "../setup-plugin-api.js";
3
+ export { discordSetupPlugin };
@@ -1,17 +1,17 @@
1
- import { c as resolveDiscordAccount, d as resolveDiscordAccountDisabledReason, f as resolveDiscordAccountDmPolicy, l as resolveDiscordAccountAllowFrom, n as isDiscordAccountEnabledForRuntime, o as mergeDiscordAccountConfig, r as listDiscordAccountIds, s as resolveDefaultDiscordAccountId } from "./accounts-ChaMcixG.mjs";
2
- import { t as inspectDiscordAccount } from "./account-inspect-De8hOUxG.mjs";
3
- import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-8Pv20CHc.mjs";
4
- import { t as DiscordChannelConfigSchema } from "./config-schema-oxELUSDx.mjs";
1
+ import { c as resolveDiscordAccount, d as resolveDiscordAccountDisabledReason, f as resolveDiscordAccountDmPolicy, l as resolveDiscordAccountAllowFrom, n as isDiscordAccountEnabledForRuntime, o as mergeDiscordAccountConfig, r as listDiscordAccountIds, s as resolveDefaultDiscordAccountId } from "./accounts-DS-A-gCx.mjs";
2
+ import { t as inspectDiscordAccount } from "./account-inspect-Bp8nbBSx.mjs";
3
+ import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-D--q9Zta.mjs";
4
+ import { t as DiscordChannelConfigSchema } from "./config-schema-DKUSr985.mjs";
5
5
  import { n as normalizeCompatibilityConfig } from "./doctor-contract-CvvgwrrG.mjs";
6
6
  import { r as secretTargetRegistryEntries, t as collectRuntimeConfigAssignments } from "./secret-config-contract-uOE2J7yM.mjs";
7
7
  import { n as unsupportedSecretRefSurfacePatterns, t as collectUnsupportedSecretRefConfigCandidates } from "./security-contract-DSHk7I2w.mjs";
8
8
  import { t as deriveLegacySessionChatType } from "./session-contract-BO5tlIdl.mjs";
9
- import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
9
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
10
10
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
11
+ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
11
12
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
12
13
  import { resolveConfiguredFromCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
13
14
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
14
- import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
15
15
  import { createConditionalWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
16
16
  import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
17
17
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
@@ -101,7 +101,7 @@ const DISCORD_LEGACY_CONFIG_RULES = [];
101
101
  //#region extensions/discord/src/shared.ts
102
102
  const DISCORD_CHANNEL = "discord";
103
103
  const livePolicyConfigPrefixes = Object.keys(selectDiscordLivePolicyConfig({})).flatMap((key) => [`channels.discord.${key}`, `channels.discord.accounts.*.${key}`]);
104
- const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-BCl1H5tl.mjs"));
104
+ const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-E3AF74Ms.mjs"));
105
105
  const discordDoctor = {
106
106
  dmAllowFromMode: "topOnly",
107
107
  groupModel: "route",
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { u as ensureBindingsLoadedAsync } from "./thread-bindings.state-g6v9zAym.mjs";
3
- import { o as listThreadBindingsBySessionKey, u as unbindThreadBindingsBySessionKeyAsync } from "./thread-bindings-D7TfgjR_.mjs";
2
+ import { u as ensureBindingsLoadedAsync } from "./thread-bindings.state-755lJHln.mjs";
3
+ import { o as listThreadBindingsBySessionKey, u as unbindThreadBindingsBySessionKeyAsync } from "./thread-bindings-E0TiUQUX.mjs";
4
4
  import { normalizeOptionalLowercaseString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/discord/src/subagent-hooks.ts
6
6
  var subagent_hooks_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
- import { t as discord_exports } from "./discord-0xJYfdDD.mjs";
2
- import { S as formatDiscordUserTag } from "./channel-type-DRCrEMss.mjs";
1
+ import { x as formatDiscordUserTag } from "./allow-list-Kty_8Xca.mjs";
2
+ import { t as discord_exports } from "./discord-DTLP81g6.mjs";
3
3
  //#region extensions/discord/src/monitor/system-events.ts
4
4
  const SYSTEM_EVENT_ACTIONS = /* @__PURE__ */ new Map([
5
5
  [discord_exports.MessageType.ChannelPinnedMessage, "pinned a message"],
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { c as resolveDiscordAccount, l as resolveDiscordAccountAllowFrom } from "./accounts-ChaMcixG.mjs";
3
- import { a as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-DtKRHuGV.mjs";
4
- import { b as parseDiscordTarget, h as allowFromContainsDiscordUserId } from "./retry-pz_cSha2.mjs";
2
+ import { c as resolveDiscordAccount, l as resolveDiscordAccountAllowFrom } from "./accounts-DS-A-gCx.mjs";
3
+ import { c as allowFromContainsDiscordUserId, p as parseDiscordTarget } from "./send.receipt-D0JBijZQ.mjs";
4
+ import { a as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-DPVUIJ8-.mjs";
5
5
  import { buildMessagingTarget } from "openclaw/plugin-sdk/channel-targets";
6
6
  //#region extensions/discord/src/target-resolver.ts
7
7
  var target_resolver_exports = /* @__PURE__ */ __exportAll({
@@ -0,0 +1,3 @@
1
+ import "./send.receipt-D0JBijZQ.mjs";
2
+ import "./target-resolver-Dcg0WjsF.mjs";
3
+ export {};
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { b as parseDiscordTarget } from "./retry-pz_cSha2.mjs";
3
- import "./targets-0KUcEIYx.mjs";
4
- import { D as resolveThreadBindingMaxAgeMs$1, E as resolveThreadBindingMaxAgeExpiresAt, T as resolveThreadBindingInactivityExpiresAt, _ as refreshUnboundThreadWebhookIdentity, f as getThreadBindingToken, n as MANAGERS_BY_ACCOUNT_ID, t as BINDINGS_BY_THREAD_ID, w as resolveThreadBindingIdleTimeoutMs$1 } from "./thread-bindings.state-g6v9zAym.mjs";
5
- import { a as mutateBindingsForTargetSession, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync } from "./thread-bindings.session-updates-CshfKghV.mjs";
6
- import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-DN-NissX.mjs";
7
- import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
2
+ import { p as parseDiscordTarget } from "./send.receipt-D0JBijZQ.mjs";
3
+ import "./targets-CJkVZIkE.mjs";
4
+ import { D as resolveThreadBindingMaxAgeMs$1, E as resolveThreadBindingMaxAgeExpiresAt, T as resolveThreadBindingInactivityExpiresAt, _ as refreshUnboundThreadWebhookIdentity, f as getThreadBindingToken, n as MANAGERS_BY_ACCOUNT_ID, t as BINDINGS_BY_THREAD_ID, w as resolveThreadBindingIdleTimeoutMs$1 } from "./thread-bindings.state-755lJHln.mjs";
5
+ import { a as mutateBindingsForTargetSession, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync } from "./thread-bindings.session-updates-DvtjzKO-.mjs";
6
+ import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-CEoFDOs9.mjs";
8
7
  import { normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
8
+ import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
9
9
  import { formatThreadBindingDurationLabel as formatThreadBindingDurationLabel$1, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingIntroText, resolveThreadBindingIntroText as resolveThreadBindingIntroText$1, resolveThreadBindingMaxAgeMs, resolveThreadBindingThreadName, resolveThreadBindingThreadName as resolveThreadBindingThreadName$1, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
10
10
  import { readAcpSessionEntry } from "openclaw/plugin-sdk/acp-runtime";
11
11
  import { runTasksWithConcurrency } from "openclaw/plugin-sdk/concurrency-runtime";