@openclaw/discord 2026.10.1-beta.2 → 2026.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/.setup/{account-inspect-CjKqkDnH.mjs → account-inspect-DsER5ILV.mjs} +2 -2
  2. package/dist/.setup/{channel-type-D1_b5UhU.mjs → allow-list-vxkG9_JD.mjs} +6 -6
  3. package/dist/.setup/{api-_oznjffB.mjs → api-DlNUkDqj.mjs} +3 -3
  4. package/dist/.setup/{approval-handler.runtime-BilYSrRF.mjs → approval-handler.runtime-DmnEa54W.mjs} +8 -8
  5. package/dist/.setup/{approval-message-updates-CgRwc2_Q.mjs → approval-message-updates-B0jdSqOj.mjs} +2 -2
  6. package/dist/.setup/{audit-DtvzxONM.mjs → audit-BpikUwN_.mjs} +4 -4
  7. package/dist/.setup/{channel-z5lQMS_9.mjs → channel-Dr-AUnGt.mjs} +23 -23
  8. package/dist/.setup/{channel.setup-DBJtugJO.mjs → channel.setup-BmNvkidb.mjs} +5 -5
  9. package/dist/.setup/{components-CzXLR3QH.mjs → components-DLJR0xU-.mjs} +2 -2
  10. package/dist/.setup/{conversation-binding-route-Bi62ApSt.mjs → conversation-binding-route-DicJC1Lj.mjs} +1 -1
  11. package/dist/.setup/{directory-config-BH1LA-gi.mjs → directory-config-gqsdcplU.mjs} +1 -1
  12. package/dist/.setup/{directory-live-C9xz7IPm.mjs → directory-live-Bipr0eUJ.mjs} +3 -3
  13. package/dist/.setup/{discord-J7aRzq2Q.mjs → discord-9gysrhzp.mjs} +10 -10
  14. package/dist/.setup/{doctor-DxSAngJq.mjs → doctor-B2bskDcF.mjs} +4 -4
  15. package/dist/.setup/{handle-action-DlmFX-_G.mjs → handle-action-UmkjXBfo.mjs} +8 -8
  16. package/dist/.setup/{handle-action.guild-admin-BnyqTczR.mjs → handle-action.guild-admin-CB4sc9VV.mjs} +2 -2
  17. package/dist/.setup/{live-policy-config-emmPNyh4.mjs → live-policy-config-VxexfRKo.mjs} +1 -1
  18. package/dist/.setup/{message-handler-BNToPZrx.mjs → message-handler-BK69A-NB.mjs} +13 -13
  19. package/dist/.setup/{message-handler.preflight-D0BcCyI7.mjs → message-handler.preflight-DFpsh90H.mjs} +17 -17
  20. package/dist/.setup/{message-handler.preflight-pluralkit-D1g3eq0B.mjs → message-handler.preflight-pluralkit-BXGGVmpe.mjs} +7 -7
  21. package/dist/.setup/{message-handler.process-CThRmCWK.mjs → message-handler.process-TKoqcqIP.mjs} +21 -21
  22. package/dist/.setup/{outbound-adapter-BPq0c2wY.mjs → outbound-adapter-D4wRAb5S.mjs} +9 -9
  23. package/dist/.setup/{outbound-session-route-DGPPKA0z.mjs → outbound-session-route-BvBH4LC6.mjs} +13 -13
  24. package/dist/.setup/{probe-DIRY8vh7.mjs → probe-BwSKpnZf.mjs} +4 -4
  25. package/dist/.setup/{provider-D2OKMo0f.mjs → provider-YP8gN9_o.mjs} +74 -74
  26. package/dist/.setup/{provider-session.runtime-BupCTZQv.mjs → provider-session.runtime-D1gkPxHT.mjs} +3 -3
  27. package/dist/.setup/provider.runtime-CZ51OIgD.mjs +2 -0
  28. package/dist/.setup/{realtime-session.runtime-D5RSC8Mm.mjs → realtime-session.runtime-BKUQBy1u.mjs} +19 -19
  29. package/dist/.setup/{resolve-allowlist-common-DUYRrrVB.mjs → resolve-allowlist-common-BUyU3C-T.mjs} +3 -3
  30. package/dist/.setup/{resolve-channels--MUatisx.mjs → resolve-channels-DA6QlhZN.mjs} +3 -3
  31. package/dist/.setup/{resolve-users-CxLcDmM0.mjs → resolve-users-DNrwvunm.mjs} +2 -2
  32. package/dist/.setup/{runtime-CwUA0RLr.mjs → runtime-CESTexGn.mjs} +12 -12
  33. package/dist/.setup/{runtime-CerRBfaa.mjs → runtime-DPcmPST9.mjs} +2 -2
  34. package/dist/.setup/{send-2X7m2Zmw.mjs → send-CJk3VP5q.mjs} +16 -16
  35. package/dist/.setup/{send.components-RqvgmCs3.mjs → send.components-dPljuV24.mjs} +7 -7
  36. package/dist/.setup/{send.outbound-B4QHSEzm.mjs → send.outbound-rOboMO_6.mjs} +8 -8
  37. package/dist/.setup/{retry-BKzO25k4.mjs → send.receipt-DVOg2Oaw.mjs} +203 -203
  38. package/dist/.setup/{send.shared-BQIUh6Vn.mjs → send.shared-C4CN24D9.mjs} +40 -40
  39. package/dist/.setup/{sender-identity-CooeYfAn.mjs → sender-identity-AHpUNr72.mjs} +1 -1
  40. package/dist/.setup/setup-plugin-api-BVlCz3fm.mjs +3 -0
  41. package/dist/.setup/{shared-CIJn6AEC.mjs → shared-BoBnM5kM.mjs} +7 -7
  42. package/dist/.setup/{subagent-hooks-BYlVnxzy.mjs → subagent-hooks-HH8Uy9cx.mjs} +2 -2
  43. package/dist/.setup/{system-events-CQ3if_pS.mjs → system-events-Cwxaww8i.mjs} +2 -2
  44. package/dist/.setup/{target-resolver-Dzxf80Y3.mjs → target-resolver-CSFoPQ12.mjs} +3 -3
  45. package/dist/.setup/targets-bqXQENmX.mjs +3 -0
  46. package/dist/.setup/{thread-bindings-yNNlcUWE.mjs → thread-bindings-DjQCkmsd.mjs} +4 -4
  47. package/dist/.setup/{thread-bindings.manager-plk0zJAW.mjs → thread-bindings.manager-D2-GYZ5s.mjs} +10 -10
  48. package/dist/.setup/{transcripts-source-CNWswry-.mjs → transcripts-source-CaZQnGRH.mjs} +18 -18
  49. package/dist/.setup/{voice-runtime-Bc75quiH.mjs → voice-runtime-DDymtIw8.mjs} +46 -46
  50. package/dist/account-inspect-api.js +1 -1
  51. package/dist/action-runtime-api.js +1 -1
  52. package/dist/activities-api.js +788 -1
  53. package/dist/api.js +15 -15
  54. package/dist/channel-config-api.js +1 -1
  55. package/dist/channel-plugin-api.js +1 -1
  56. package/dist/directory-contract-api.js +1 -1
  57. package/dist/index.js +9 -5
  58. package/dist/runtime-api.js +20 -20
  59. package/dist/setup-entry.js +1 -1
  60. package/dist/setup-plugin-api.js +1 -1
  61. package/dist/src/voice/audio-worker.runtime.js +3 -3
  62. package/dist/subagent-hooks-api.js +1 -1
  63. package/dist/transcripts-source-api.js +1 -1
  64. package/package.json +4 -4
  65. package/dist/.setup/activities-api-BL_hJ0JQ.mjs +0 -789
  66. package/dist/.setup/provider.runtime-BaW_JnfU.mjs +0 -2
  67. package/dist/.setup/setup-plugin-api-nn_giXvZ.mjs +0 -3
  68. package/dist/.setup/targets-Lf8D55w-.mjs +0 -3
  69. package/dist/.setup/{accounts-DXHCL8Zm.mjs → accounts-HE9-mj1L.mjs} +2 -2
  70. package/dist/.setup/{config-schema-CsemBDpS.mjs → config-schema-BQWfnSCx.mjs} +1 -1
  71. package/dist/.setup/{receive-recovery-GqF2PUN_.mjs → receive-recovery-DgkX7Qvi.mjs} +2 -2
  72. package/dist/.setup/{thread-bindings.session-updates-C9aKtVs6.mjs → thread-bindings.session-updates-Bu_CGr_O.mjs} +2 -2
@@ -1,212 +1,16 @@
1
- import { v as RateLimitError } from "./discord-J7aRzq2Q.mjs";
2
- import { parseStrictNonNegativeInteger, resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
1
+ import { v as RateLimitError } from "./discord-9gysrhzp.mjs";
3
2
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, readErrorName } from "openclaw/plugin-sdk/error-runtime";
4
- import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
5
- import { buildMessagingTarget, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
6
3
  import { sleepWithAbort } from "openclaw/plugin-sdk/runtime-env";
7
- import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
8
- import { chunkByParagraph } from "openclaw/plugin-sdk/reply-chunking";
9
4
  import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
5
+ import { parseStrictNonNegativeInteger, resolveIntegerOption } from "openclaw/plugin-sdk/number-runtime";
6
+ import { chunkByParagraph } from "openclaw/plugin-sdk/reply-chunking";
10
7
  import { chunkTextForOutbound, findCodeRegions } from "openclaw/plugin-sdk/text-chunking";
8
+ import { classifyTransientNetworkErrorCode, createChannelApiRetryRunner, resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
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
- return /^(?:(?:discord:)?user:|discord:)?(\d+)$/.exec(trimmed)?.[1];
118
- }
119
- function looksLikeDiscordTargetId(raw) {
120
- const trimmed = raw.trim();
121
- return /^<@!?\d+>$/.test(trimmed) || /^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed) || /^\d{6,}$/.test(trimmed);
122
- }
123
- //#endregion
124
- //#region extensions/discord/src/reply-reference.ts
125
- function resolveDiscordReplyReference(params) {
126
- if (!params.replyToId) return;
127
- const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
128
- return {
129
- messageId: params.replyToId,
130
- scope: singleUse ? "first" : "all"
131
- };
132
- }
133
- function createReusableDiscordReplyReference(messageId) {
134
- return messageId ? {
135
- messageId,
136
- scope: "all"
137
- } : void 0;
138
- }
139
- function resolveDiscordReplyMessageId(reply, isFirst) {
140
- return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
141
- }
142
- //#endregion
143
- //#region extensions/discord/src/send.receipt.ts
144
- function toDiscordOutboundDeliveryResult(result) {
145
- const { channelId, ...delivery } = result;
146
- return {
147
- ...delivery,
148
- target: {
149
- kind: "channel",
150
- id: channelId
151
- }
152
- };
153
- }
154
- function createDiscordSendReceiptFromResults(params) {
155
- const receipt = createMessageReceiptFromOutboundResults({
156
- results: attachChannelToResults("discord", params.results),
157
- threadId: params.threadId
158
- });
159
- return {
160
- ...receipt,
161
- parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
162
- platformMessageId,
163
- kind,
164
- index,
165
- threadId,
166
- replyToId,
167
- raw
168
- }))
169
- };
170
- }
171
- function createDiscordSendReceipt(params) {
172
- const results = params.platformMessageIds.map((messageId) => messageId.trim()).filter(Boolean).map((messageId, index) => {
173
- const result = {
174
- channel: "discord",
175
- messageId
176
- };
177
- if (params.channelId) result.channelId = params.channelId;
178
- if (params.reply?.scope === "first" && index === 0) result.receipt = createMessageReceiptFromOutboundResults({
179
- results: [{ ...result }],
180
- kind: params.kind,
181
- threadId: params.threadId,
182
- replyToId: params.reply.messageId
183
- });
184
- return result;
185
- });
186
- return createMessageReceiptFromOutboundResults({
187
- results,
188
- kind: params.kind,
189
- threadId: params.threadId,
190
- replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
191
- });
192
- }
193
- function createDiscordSendResult(params) {
194
- const messageId = params.result.id ?? "";
195
- const channelId = params.result.channel_id ?? params.fallbackChannelId;
196
- const receiptParams = {
197
- platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
198
- channelId,
199
- kind: params.kind
200
- };
201
- if (params.threadId != null) receiptParams.threadId = String(params.threadId);
202
- if (params.reply) receiptParams.reply = params.reply;
203
- return {
204
- messageId,
205
- channelId,
206
- receipt: createDiscordSendReceipt(receiptParams)
207
- };
208
- }
209
- //#endregion
210
14
  //#region packages/normalization-core/src/utf16-slice.ts
211
15
  function isHighSurrogate(codeUnit) {
212
16
  return codeUnit >= 55296 && codeUnit <= 56319;
@@ -668,4 +472,200 @@ function createDiscordRetryRunner(params) {
668
472
  };
669
473
  }
670
474
  //#endregion
671
- 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 };
475
+ //#region extensions/discord/src/target-parsing.ts
476
+ function parseDiscordTarget(raw, options = {}) {
477
+ const trimmed = raw.trim();
478
+ if (!trimmed) return;
479
+ const providerPrefixedTarget = parseDiscordProviderPrefixedTarget(trimmed);
480
+ if (providerPrefixedTarget) return providerPrefixedTarget;
481
+ const userTarget = parseMentionPrefixOrAtUserTarget({
482
+ raw: trimmed,
483
+ mentionPattern: /^<@!?(\d+)>$/,
484
+ prefixes: [
485
+ {
486
+ prefix: "user:",
487
+ kind: "user"
488
+ },
489
+ {
490
+ prefix: "channel:",
491
+ kind: "channel"
492
+ },
493
+ {
494
+ prefix: "discord:",
495
+ kind: "user"
496
+ }
497
+ ],
498
+ atUserPattern: /^\d+$/,
499
+ atUserErrorMessage: "Discord DMs require a user id (use user:<id> or a <@id> mention)"
500
+ });
501
+ if (userTarget) return userTarget;
502
+ if (/^\d+$/.test(trimmed)) {
503
+ if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
504
+ throw new Error(options.ambiguousMessage ?? `Ambiguous Discord recipient "${trimmed}". For DMs use "user:${trimmed}" or "<@${trimmed}>"; for channels use "channel:${trimmed}".`);
505
+ }
506
+ return buildMessagingTarget("channel", trimmed, trimmed);
507
+ }
508
+ function parseDiscordProviderPrefixedTarget(raw) {
509
+ const match = /^discord:(channel|user):(.+)$/i.exec(raw);
510
+ if (!match) return;
511
+ const kind = match[1]?.toLowerCase();
512
+ const id = match[2]?.trim();
513
+ if (!kind || !id) return;
514
+ return buildMessagingTarget(kind, id, `${kind}:${id}`);
515
+ }
516
+ function resolveDiscordChannelId(raw) {
517
+ const target = parseDiscordTarget(raw, { defaultKind: "channel" });
518
+ return requireTargetKind({
519
+ platform: "Discord",
520
+ target,
521
+ kind: "channel"
522
+ });
523
+ }
524
+ //#endregion
525
+ //#region extensions/discord/src/normalize.ts
526
+ function normalizeDiscordMessagingTarget(raw) {
527
+ return parseDiscordTarget(raw, { defaultKind: "channel" })?.normalized;
528
+ }
529
+ function matchesDiscordToolContextTarget(params) {
530
+ const target = normalizeDiscordMessagingTarget(params.target);
531
+ if (!target) return false;
532
+ return [params.toolContext.currentChannelId, params.toolContext.currentMessagingTarget].some((currentTarget) => currentTarget !== void 0 && normalizeDiscordMessagingTarget(currentTarget) === target);
533
+ }
534
+ /**
535
+ * Normalize a Discord outbound target for delivery. Bare numeric IDs are
536
+ * prefixed with "channel:" to avoid the ambiguous-target error in
537
+ * parseDiscordTarget, unless the ID is explicitly configured as an allowed DM
538
+ * sender. All other formats pass through unchanged.
539
+ */
540
+ function normalizeDiscordOutboundTarget(to, allowFrom) {
541
+ const trimmed = to?.trim();
542
+ if (!trimmed) return {
543
+ ok: false,
544
+ error: /* @__PURE__ */ new Error("Discord recipient is required. Use \"channel:<id>\" for channels or \"user:<id>\" for DMs.")
545
+ };
546
+ if (/^\d+$/.test(trimmed)) {
547
+ if (allowFromContainsDiscordUserId(allowFrom, trimmed)) return {
548
+ ok: true,
549
+ to: `user:${trimmed}`
550
+ };
551
+ return {
552
+ ok: true,
553
+ to: `channel:${trimmed}`
554
+ };
555
+ }
556
+ return {
557
+ ok: true,
558
+ to: trimmed
559
+ };
560
+ }
561
+ function allowFromContainsDiscordUserId(allowFrom, userId) {
562
+ const normalizedUserId = userId.trim();
563
+ if (!normalizedUserId) return false;
564
+ const normalizedAllowFrom = (allowFrom ?? []).map(normalizeAllowFromDiscordUserId).filter((entry) => Boolean(entry));
565
+ return resolveAllowlistMatchByCandidates({
566
+ allowList: normalizedAllowFrom,
567
+ candidates: [{
568
+ value: normalizedUserId,
569
+ source: "id"
570
+ }]
571
+ }).allowed;
572
+ }
573
+ function normalizeAllowFromDiscordUserId(entry) {
574
+ const trimmed = entry.trim().toLowerCase();
575
+ if (!trimmed || trimmed === "*") return;
576
+ const mentionMatch = /^<@!?(\d+)>$/.exec(trimmed);
577
+ if (mentionMatch) return mentionMatch[1];
578
+ return /^(?:(?:discord:)?user:|discord:)?(\d+)$/.exec(trimmed)?.[1];
579
+ }
580
+ function looksLikeDiscordTargetId(raw) {
581
+ const trimmed = raw.trim();
582
+ return /^<@!?\d+>$/.test(trimmed) || /^(?:(?:user|channel|discord):\d+|discord:(?:user|channel):\d+)$/i.test(trimmed) || /^\d{6,}$/.test(trimmed);
583
+ }
584
+ //#endregion
585
+ //#region extensions/discord/src/reply-reference.ts
586
+ function resolveDiscordReplyReference(params) {
587
+ if (!params.replyToId) return;
588
+ const singleUse = params.replyToIdSource !== "explicit" && params.replyToMode !== void 0 && isSingleUseReplyToMode(params.replyToMode);
589
+ return {
590
+ messageId: params.replyToId,
591
+ scope: singleUse ? "first" : "all"
592
+ };
593
+ }
594
+ function createReusableDiscordReplyReference(messageId) {
595
+ return messageId ? {
596
+ messageId,
597
+ scope: "all"
598
+ } : void 0;
599
+ }
600
+ function resolveDiscordReplyMessageId(reply, isFirst) {
601
+ return reply && (isFirst || reply.scope === "all") ? reply.messageId : void 0;
602
+ }
603
+ //#endregion
604
+ //#region extensions/discord/src/send.receipt.ts
605
+ function toDiscordOutboundDeliveryResult(result) {
606
+ const { channelId, ...delivery } = result;
607
+ return {
608
+ ...delivery,
609
+ target: {
610
+ kind: "channel",
611
+ id: channelId
612
+ }
613
+ };
614
+ }
615
+ function createDiscordSendReceiptFromResults(params) {
616
+ const receipt = createMessageReceiptFromOutboundResults({
617
+ results: attachChannelToResults("discord", params.results),
618
+ threadId: params.threadId
619
+ });
620
+ return {
621
+ ...receipt,
622
+ parts: receipt.parts.map(({ platformMessageId, kind, threadId, replyToId, raw }, index) => ({
623
+ platformMessageId,
624
+ kind,
625
+ index,
626
+ threadId,
627
+ replyToId,
628
+ raw
629
+ }))
630
+ };
631
+ }
632
+ function createDiscordSendReceipt(params) {
633
+ const results = params.platformMessageIds.map((messageId) => messageId.trim()).filter(Boolean).map((messageId, index) => {
634
+ const result = {
635
+ channel: "discord",
636
+ messageId
637
+ };
638
+ if (params.channelId) result.channelId = params.channelId;
639
+ if (params.reply?.scope === "first" && index === 0) result.receipt = createMessageReceiptFromOutboundResults({
640
+ results: [{ ...result }],
641
+ kind: params.kind,
642
+ threadId: params.threadId,
643
+ replyToId: params.reply.messageId
644
+ });
645
+ return result;
646
+ });
647
+ return createMessageReceiptFromOutboundResults({
648
+ results,
649
+ kind: params.kind,
650
+ threadId: params.threadId,
651
+ replyToId: params.reply?.scope === "all" ? params.reply.messageId : void 0
652
+ });
653
+ }
654
+ function createDiscordSendResult(params) {
655
+ const messageId = params.result.id ?? "";
656
+ const channelId = params.result.channel_id ?? params.fallbackChannelId;
657
+ const receiptParams = {
658
+ platformMessageIds: params.result.platformMessageIds?.length ? params.result.platformMessageIds : [messageId],
659
+ channelId,
660
+ kind: params.kind
661
+ };
662
+ if (params.threadId != null) receiptParams.threadId = String(params.threadId);
663
+ if (params.reply) receiptParams.reply = params.reply;
664
+ return {
665
+ messageId,
666
+ channelId,
667
+ receipt: createDiscordSendReceipt(receiptParams)
668
+ };
669
+ }
670
+ //#endregion
671
+ 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,47 +1,19 @@
1
- import { A as serializePayload, _t as getGuildMember, dt as getChannel, g as RequestClient, gt as getGuild, it as getCurrentUser, j as Embed, k as hasDiscordV2Components, pt as getThreadMember, rt as createUserDmChannel } from "./discord-J7aRzq2Q.mjs";
2
- import { t as isDiscordThreadChannelType } from "./channel-type-D1_b5UhU.mjs";
3
- import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-DXHCL8Zm.mjs";
4
- import { o as chunkDiscordTextWithMode, p as resolveDiscordReplyMessageId, r as createDiscordRetryRunner } from "./retry-BKzO25k4.mjs";
5
- import { t as parseAndResolveDiscordTarget } from "./target-resolver-Dzxf80Y3.mjs";
1
+ import { c as resolveDiscordAccount, m as normalizeDiscordToken, o as mergeDiscordAccountConfig } from "./accounts-HE9-mj1L.mjs";
2
+ import { A as isDiscordThreadChannelType } from "./allow-list-vxkG9_JD.mjs";
3
+ import { A as serializePayload, ft as getThreadMember, g as RequestClient, gt as getGuildMember, ht as getGuild, j as Embed, k as hasDiscordV2Components, nt as createUserDmChannel, rt as getCurrentUser, ut as getChannel } from "./discord-9gysrhzp.mjs";
4
+ import { _ as createDiscordRetryRunner, b as chunkDiscordTextWithMode, o as resolveDiscordReplyMessageId } from "./send.receipt-DVOg2Oaw.mjs";
5
+ import { t as parseAndResolveDiscordTarget } from "./target-resolver-CSFoPQ12.mjs";
6
+ import { danger } from "openclaw/plugin-sdk/runtime-env";
6
7
  import { normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
7
- import { ChannelType, MessageFlags, PermissionFlagsBits, Routes } from "discord-api-types/v10";
8
- import { randomBytes } from "node:crypto";
9
- import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
10
8
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
9
+ import { ChannelType, MessageFlags, PermissionFlagsBits, Routes } from "discord-api-types/v10";
10
+ import { PollLayoutType } from "discord-api-types/payloads/v10";
11
+ import { extensionForMime, normalizePollDurationHours, normalizePollInput } from "openclaw/plugin-sdk/media-runtime";
11
12
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
12
13
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
13
14
  import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
14
- import { danger } from "openclaw/plugin-sdk/runtime-env";
15
- import { PollLayoutType } from "discord-api-types/payloads/v10";
16
- import { extensionForMime, normalizePollDurationHours, normalizePollInput } from "openclaw/plugin-sdk/media-runtime";
17
- //#region extensions/discord/src/recipient-resolution.ts
18
- async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
19
- const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
20
- const accountInfo = resolveDiscordAccount({
21
- cfg: resolvedCfg,
22
- accountId
23
- });
24
- const resolved = await parseAndResolveDiscordTarget(raw, {
25
- cfg: resolvedCfg,
26
- accountId: accountInfo.accountId
27
- }, parseOptions);
28
- return {
29
- kind: resolved.kind,
30
- id: resolved.id
31
- };
32
- }
33
- async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
34
- const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
35
- const resolved = await parseAndResolveDiscordTarget(raw, {
36
- cfg: resolvedCfg,
37
- accountId
38
- }, { defaultKind: "channel" });
39
- return {
40
- kind: resolved.kind,
41
- id: resolved.id
42
- };
43
- }
44
- //#endregion
15
+ import { randomBytes } from "node:crypto";
16
+ import { makeProxyFetch } from "openclaw/plugin-sdk/fetch-runtime";
45
17
  //#region extensions/discord/src/monitor/gateway-registry.ts
46
18
  /**
47
19
  * Module-level registry of active Discord GatewayPlugin instances.
@@ -199,6 +171,34 @@ function resolveDiscordRest(opts) {
199
171
  return createDiscordRestClient(opts).rest;
200
172
  }
201
173
  //#endregion
174
+ //#region extensions/discord/src/recipient-resolution.ts
175
+ async function parseAndResolveRecipient(raw, cfg, accountId, parseOptions = {}) {
176
+ const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
177
+ const accountInfo = resolveDiscordAccount({
178
+ cfg: resolvedCfg,
179
+ accountId
180
+ });
181
+ const resolved = await parseAndResolveDiscordTarget(raw, {
182
+ cfg: resolvedCfg,
183
+ accountId: accountInfo.accountId
184
+ }, parseOptions);
185
+ return {
186
+ kind: resolved.kind,
187
+ id: resolved.id
188
+ };
189
+ }
190
+ async function parseAndResolveChannelRecipient(raw, cfg, accountId) {
191
+ const resolvedCfg = requireRuntimeConfig(cfg, "Discord recipient resolution");
192
+ const resolved = await parseAndResolveDiscordTarget(raw, {
193
+ cfg: resolvedCfg,
194
+ accountId
195
+ }, { defaultKind: "channel" });
196
+ return {
197
+ kind: resolved.kind,
198
+ id: resolved.id
199
+ };
200
+ }
201
+ //#endregion
202
202
  //#region extensions/discord/src/send.message-request.ts
203
203
  const SUPPRESS_EMBEDS_FLAG = MessageFlags.SuppressEmbeds;
204
204
  const SUPPRESS_NOTIFICATIONS_FLAG = MessageFlags.SuppressNotifications;
@@ -718,4 +718,4 @@ function buildReactionIdentifier(emoji) {
718
718
  return emoji.name ?? "";
719
719
  }
720
720
  //#endregion
721
- 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 };
721
+ 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 { C as formatDiscordUserTag } from "./channel-type-D1_b5UhU.mjs";
1
+ import { S as formatDiscordUserTag } from "./allow-list-vxkG9_JD.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-BmNvkidb.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-DXHCL8Zm.mjs";
2
- import { t as inspectDiscordAccount } from "./account-inspect-CjKqkDnH.mjs";
3
- import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-emmPNyh4.mjs";
4
- import { t as DiscordChannelConfigSchema } from "./config-schema-CsemBDpS.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-HE9-mj1L.mjs";
2
+ import { t as inspectDiscordAccount } from "./account-inspect-DsER5ILV.mjs";
3
+ import { n as discordIngressIdentity, t as selectDiscordLivePolicyConfig } from "./live-policy-config-VxexfRKo.mjs";
4
+ import { t as DiscordChannelConfigSchema } from "./config-schema-BQWfnSCx.mjs";
5
5
  import { n as normalizeCompatibilityConfig } from "./doctor-contract-Bg3NPAMw.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-DxSAngJq.mjs"));
104
+ const loadDiscordDoctorModule = createLazyRuntimeModule(() => import("./doctor-B2bskDcF.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 { x as ensureBindingsLoadedAsync } from "./thread-bindings.session-updates-C9aKtVs6.mjs";
3
- import { o as listThreadBindingsBySessionKey, u as unbindThreadBindingsBySessionKeyAsync } from "./thread-bindings-yNNlcUWE.mjs";
2
+ import { x as ensureBindingsLoadedAsync } from "./thread-bindings.session-updates-Bu_CGr_O.mjs";
3
+ import { o as listThreadBindingsBySessionKey, u as unbindThreadBindingsBySessionKeyAsync } from "./thread-bindings-DjQCkmsd.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-J7aRzq2Q.mjs";
2
- import { C as formatDiscordUserTag } from "./channel-type-D1_b5UhU.mjs";
1
+ import { S as formatDiscordUserTag } from "./allow-list-vxkG9_JD.mjs";
2
+ import { t as discord_exports } from "./discord-9gysrhzp.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-DXHCL8Zm.mjs";
3
- import { o as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-C9xz7IPm.mjs";
4
- import { b as parseDiscordTarget, h as allowFromContainsDiscordUserId } from "./retry-BKzO25k4.mjs";
2
+ import { c as resolveDiscordAccount, l as resolveDiscordAccountAllowFrom } from "./accounts-HE9-mj1L.mjs";
3
+ import { c as allowFromContainsDiscordUserId, p as parseDiscordTarget } from "./send.receipt-DVOg2Oaw.mjs";
4
+ import { o as rememberDiscordDirectoryUser, r as listDiscordDirectoryPeersLive } from "./directory-live-Bipr0eUJ.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-DVOg2Oaw.mjs";
2
+ import "./target-resolver-CSFoPQ12.mjs";
3
+ export {};
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { b as parseDiscordTarget } from "./retry-BKzO25k4.mjs";
3
- import "./targets-Lf8D55w-.mjs";
4
- import { C as getThreadBindingToken, E as refreshUnboundThreadWebhookIdentity, F as resolveThreadBindingMaxAgeMs$1, M as resolveThreadBindingIdleTimeoutMs$1, N as resolveThreadBindingInactivityExpiresAt, P as resolveThreadBindingMaxAgeExpiresAt, _ as MANAGERS_BY_ACCOUNT_ID, a as mutateBindingsForTargetSession, g as BINDINGS_BY_THREAD_ID, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync } from "./thread-bindings.session-updates-C9aKtVs6.mjs";
5
- import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-plk0zJAW.mjs";
2
+ import { p as parseDiscordTarget } from "./send.receipt-DVOg2Oaw.mjs";
3
+ import "./targets-bqXQENmX.mjs";
4
+ import { C as getThreadBindingToken, E as refreshUnboundThreadWebhookIdentity, F as resolveThreadBindingMaxAgeMs$1, M as resolveThreadBindingIdleTimeoutMs$1, N as resolveThreadBindingInactivityExpiresAt, P as resolveThreadBindingMaxAgeExpiresAt, _ as MANAGERS_BY_ACCOUNT_ID, a as mutateBindingsForTargetSession, g as BINDINGS_BY_THREAD_ID, i as setThreadBindingMaxAgeBySessionKeyAsync, n as setThreadBindingIdleTimeoutBySessionKeyAsync, o as resolveBindingIdsForTargetSession, r as setThreadBindingMaxAgeBySessionKey, t as setThreadBindingIdleTimeoutBySessionKey, u as removeBindingRecordSync } from "./thread-bindings.session-updates-Bu_CGr_O.mjs";
5
+ import { c as resolveThreadBindingPersonaFromRecord, i as createNoopThreadBindingManager, n as getThreadBindingManager, o as resolveChannelIdForBinding, s as resolveThreadBindingPersona, t as createThreadBindingManager } from "./thread-bindings.manager-D2-GYZ5s.mjs";
6
6
  import { normalizeOptionalLowercaseString, normalizeOptionalString, normalizeOptionalStringifiedId, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
8
8
  import { formatThreadBindingDurationLabel as formatThreadBindingDurationLabel$1, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingIntroText, resolveThreadBindingIntroText as resolveThreadBindingIntroText$1, resolveThreadBindingMaxAgeMs, resolveThreadBindingThreadName, resolveThreadBindingThreadName as resolveThreadBindingThreadName$1, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";