@openclaw/discord 2026.5.3-beta.2 → 2026.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/{account-inspect-C2UEUhbG.js → account-inspect-BcQAxhKY.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-BKnkNaoA.js → accounts-CaHGiVB4.js} +7 -5
  4. package/dist/action-runtime-api.js +1 -1
  5. package/dist/api.js +13 -13
  6. package/dist/{approval-handler.runtime-v8nzQHlT.js → approval-handler.runtime-AZort68o.js} +4 -4
  7. package/dist/{approval-native-DqWGp0bM.js → approval-native-oN9__F3M.js} +3 -3
  8. package/dist/{approval-shared-DKnwwjZM.js → approval-shared-GfJeMdLu.js} +1 -1
  9. package/dist/{audit-CJ92YD6J.js → audit-DEbWTFTt.js} +3 -3
  10. package/dist/{channel-B3aTtBj1.js → channel-Nf20xyAS.js} +16 -16
  11. package/dist/{channel-actions-TNih7k3w.js → channel-actions-ChsoeB3T.js} +3 -3
  12. package/dist/{channel-actions.runtime-CaPytiY4.js → channel-actions.runtime-BxNUYqD-.js} +3 -3
  13. package/dist/channel-config-api.js +1 -1
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/{channel.setup-Dt4tIDrl.js → channel.setup-DHzAG9qO.js} +5 -5
  16. package/dist/{components-BapWDmDM.js → components-D5LnN7ZQ.js} +1 -1
  17. package/dist/{config-schema-DwFkL904.js → config-schema-BmGtnfiE.js} +18 -2
  18. package/dist/contract-api.js +3 -3
  19. package/dist/{directory-config-LyMP0sdv.js → directory-config-DElx_Gr4.js} +1 -1
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-BQapdpkZ.js → directory-live-DJ0V5asB.js} +2 -2
  22. package/dist/{discord-D1kDh0X_.js → discord-eZlimVfW.js} +1 -1
  23. package/dist/{doctor-B2G7WqO0.js → doctor-Bgzf3Du2.js} +3 -3
  24. package/dist/{doctor-contract-D3pSutkb.js → doctor-contract-Dxq4VIkE.js} +1 -1
  25. package/dist/doctor-contract-api.js +1 -1
  26. package/dist/{handle-action.guild-admin-BuqsSVXu.js → handle-action.guild-admin-B2Zzo2HU.js} +1 -1
  27. package/dist/{manager.runtime-M2aAa7qA.js → manager.runtime-B0TEyget.js} +2 -2
  28. package/dist/{message-handler-D6JfFV3P.js → message-handler-TShaLWeQ.js} +4 -4
  29. package/dist/{message-handler.preflight-DqaF3vHm.js → message-handler.preflight-BsvNIDEw.js} +7 -7
  30. package/dist/{message-handler.process-tl3Nwnhr.js → message-handler.process-Be2HA9AV.js} +178 -78
  31. package/dist/{outbound-adapter-DJf9_sfH.js → outbound-adapter-B-mzejZP.js} +6 -6
  32. package/dist/preview-streaming-BzkA67Qa.js +7 -0
  33. package/dist/{probe-DcNEodPI.js → probe-DmHUl6wI.js} +1 -1
  34. package/dist/{probe.runtime-P-e4r1Hl.js → probe.runtime-ch3eJ1Ar.js} +1 -1
  35. package/dist/{provider-CMvXOp-3.js → provider-Cy1aml6b.js} +23 -56
  36. package/dist/{provider-session.runtime-JFemrDZT.js → provider-session.runtime-CD5RUyP3.js} +3 -3
  37. package/dist/provider.runtime-CbW_PYV-.js +2 -0
  38. package/dist/{reply-delivery-D9So77a6.js → reply-delivery-uCiWAyIt.js} +2 -2
  39. package/dist/{resolve-allowlist-common-DqqFY_qa.js → resolve-allowlist-common-Cl2N5YLW.js} +1 -1
  40. package/dist/{resolve-channels-CGPntufJ.js → resolve-channels-VAqom3Dn.js} +1 -1
  41. package/dist/{resolve-users-CDvSlW0V.js → resolve-users-DPJkRKx1.js} +1 -1
  42. package/dist/{route-resolution-BYiC-6Cc.js → route-resolution-Bx85WEpX.js} +1 -1
  43. package/dist/{runtime-n5xZHW55.js → runtime-SoSwefbS.js} +7 -7
  44. package/dist/runtime-api.actions.js +2 -2
  45. package/dist/runtime-api.js +18 -18
  46. package/dist/runtime-api.lookup.js +5 -5
  47. package/dist/runtime-api.monitor-srLSEVEX.js +6 -0
  48. package/dist/runtime-api.monitor.js +4 -4
  49. package/dist/runtime-api.send.js +4 -4
  50. package/dist/runtime-api.threads.js +3 -3
  51. package/dist/{send-B_frVn_Q.js → send-Dw6Da1m2.js} +4 -4
  52. package/dist/{send.components-B1EgHAds.js → send.components-CJ8gYK3s.js} +5 -5
  53. package/dist/{send.outbound-DlBAuW7y.js → send.outbound-6KbINW5h.js} +3 -3
  54. package/dist/{send.shared-Db0opnak.js → send.shared-e9Pd_Em0.js} +10 -5
  55. package/dist/setup-plugin-api.js +1 -1
  56. package/dist/{shared-CqlrJmSs.js → shared-C1EMtcxR.js} +9 -6
  57. package/dist/{subagent-hooks-mEK5ARfP.js → subagent-hooks-4TZ3SJrh.js} +2 -2
  58. package/dist/subagent-hooks-api.js +1 -1
  59. package/dist/{system-events-Bu9jmO4W.js → system-events-B-xNU7II.js} +1 -1
  60. package/dist/{targets-kKlbZ4ai.js → targets-B7OfGFt8.js} +1 -1
  61. package/dist/test-api.js +3 -3
  62. package/dist/{thread-bindings-Bj1R-6QH.js → thread-bindings-DLoian4S.js} +3 -3
  63. package/dist/{thread-bindings.discord-api-ClPMuIr8.js → thread-bindings.discord-api-BJF6acLK.js} +4 -4
  64. package/dist/{thread-bindings.manager-BaN0l4y8.js → thread-bindings.manager-CWG9Gd04.js} +4 -4
  65. package/dist/{threading-CWhdYHVx.js → threading-Bi95Nz8h.js} +1 -1
  66. package/dist/token-BZtonk7d.js +93 -0
  67. package/dist/{typing-CJiowRTZ.js → typing-BSi1dUHm.js} +1 -1
  68. package/openclaw.plugin.json +80 -2
  69. package/package.json +4 -4
  70. package/dist/preview-streaming-C0O92Qqz.js +0 -14
  71. package/dist/provider.runtime-BO007oR2.js +0 -2
  72. package/dist/runtime-api.monitor-BC-XN0tY.js +0 -6
  73. package/dist/token-D-w3Rigl.js +0 -42
@@ -1,20 +1,20 @@
1
- import { f as resolveDiscordMaxLinesPerMessage } from "./accounts-BKnkNaoA.js";
1
+ import { f as resolveDiscordMaxLinesPerMessage } from "./accounts-CaHGiVB4.js";
2
2
  import { a as chunkDiscordTextWithMode, s as resolveDiscordChannelId } from "./normalize-B-ktw-T_.js";
3
- import { $ as createChannelMessage, it as editChannelMessage, nt as deleteChannelMessage, t as discord_exports } from "./discord-D1kDh0X_.js";
4
- import { N as createDiscordRestClient, P as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId } from "./send.shared-Db0opnak.js";
3
+ import { $ as createChannelMessage, it as editChannelMessage, nt as deleteChannelMessage, t as discord_exports } from "./discord-eZlimVfW.js";
4
+ import { N as createDiscordRestClient, P as createDiscordRuntimeAccountContext, d as resolveDiscordTargetChannelId } from "./send.shared-e9Pd_Em0.js";
5
5
  import { i as resolveTimestampMs } from "./format-D8TsaXxW.js";
6
6
  import { a as normalizeDiscordSlug, r as normalizeDiscordAllowList } from "./allow-list-ek-1hMKN.js";
7
- import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-B_frVn_Q.js";
8
- import "./targets-kKlbZ4ai.js";
7
+ import { a as removeReactionDiscord, f as editMessageDiscord, r as reactMessageDiscord } from "./send-Dw6Da1m2.js";
8
+ import "./targets-B7OfGFt8.js";
9
9
  import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
10
- import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-DJf9_sfH.js";
11
- import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-C0O92Qqz.js";
10
+ import { t as DISCORD_TEXT_CHUNK_LIMIT } from "./outbound-adapter-B-mzejZP.js";
11
+ import { t as resolveDiscordPreviewStreamMode } from "./preview-streaming-BzkA67Qa.js";
12
12
  import { n as DISCORD_ATTACHMENT_TOTAL_TIMEOUT_MS, t as DISCORD_ATTACHMENT_IDLE_TIMEOUT_MS } from "./timeouts-C7jeTtGs.js";
13
13
  import { a as resolveForwardedMediaList, i as buildDiscordMediaPayload, o as resolveMediaList, r as resolveDiscordMessageText } from "./message-utils-Dmgu-7fC.js";
14
- import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-CWhdYHVx.js";
15
- import { t as sendTyping } from "./typing-CJiowRTZ.js";
14
+ import { a as resolveDiscordThreadStarter, n as resolveDiscordAutoThreadReplyPlan } from "./threading-Bi95Nz8h.js";
15
+ import { t as sendTyping } from "./typing-BSi1dUHm.js";
16
16
  import { n as buildDiscordInboundAccessContext, r as createDiscordSupplementalContextAccessChecker } from "./inbound-context-e_oBBJtF.js";
17
- import { i as resolveReplyContext, n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-D9So77a6.js";
17
+ import { i as resolveReplyContext, n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-uCiWAyIt.js";
18
18
  import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery, stripReasoningTagsFromText, truncateUtf16Safe } from "openclaw/plugin-sdk/text-runtime";
19
19
  import { buildAgentSessionKey, normalizeAccountId, resolveAccountEntry, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
20
20
  import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";
@@ -23,6 +23,7 @@ import { resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/rep
23
23
  import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
24
24
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
25
25
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
26
+ import { createChannelProgressDraftGate, formatChannelProgressDraftLine, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, resolveChannelProgressDraftMaxLines, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-streaming";
26
27
  import { recordInboundSession, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/conversation-runtime";
27
28
  import { EmbeddedBlockChunker, resolveAckReaction, resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
28
29
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
@@ -31,7 +32,6 @@ import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/sess
31
32
  import { formatInboundEnvelope, resolveEnvelopeFormatOptions } from "openclaw/plugin-sdk/channel-inbound";
32
33
  import { createFinalizableDraftLifecycle, deliverFinalizableDraftPreview } from "openclaw/plugin-sdk/channel-lifecycle";
33
34
  import { createChannelReplyPipeline, resolveChannelSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-reply-pipeline";
34
- import { resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewChunk, resolveChannelStreamingPreviewToolProgress } from "openclaw/plugin-sdk/channel-streaming";
35
35
  import { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime";
36
36
  import { hasFinalInboundReplyDispatch, runInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
37
37
  import { buildPendingHistoryContextFromMap } from "openclaw/plugin-sdk/reply-history";
@@ -475,7 +475,7 @@ function createDiscordDraftPreviewController(params) {
475
475
  channelId: params.deliverChannelId,
476
476
  maxChars: draftMaxChars,
477
477
  replyToMessageId: () => params.replyReference.peek(),
478
- minInitialChars: 30,
478
+ minInitialChars: discordStreamMode === "progress" ? 0 : 30,
479
479
  throttleMs: 1200,
480
480
  log: params.log,
481
481
  warn: params.log
@@ -489,8 +489,29 @@ function createDiscordDraftPreviewController(params) {
489
489
  let finalizedViaPreviewMessage = false;
490
490
  let finalDeliveryHandled = false;
491
491
  const previewToolProgressEnabled = Boolean(draftStream) && resolveChannelStreamingPreviewToolProgress(params.discordConfig);
492
+ const suppressDefaultToolProgressMessages = Boolean(draftStream) && resolveChannelStreamingSuppressDefaultToolProgressMessages(params.discordConfig, {
493
+ draftStreamActive: true,
494
+ previewToolProgressEnabled
495
+ });
492
496
  let previewToolProgressSuppressed = false;
493
497
  let previewToolProgressLines = [];
498
+ const progressSeed = `${params.accountId}:${params.deliverChannelId}`;
499
+ const renderProgressDraft = async (options) => {
500
+ if (!draftStream || discordStreamMode !== "progress") return;
501
+ const previewText = formatChannelProgressDraftText({
502
+ entry: params.discordConfig,
503
+ lines: previewToolProgressLines,
504
+ seed: progressSeed
505
+ });
506
+ if (!previewText || previewText === lastPartialText) return;
507
+ lastPartialText = previewText;
508
+ draftText = previewText;
509
+ hasStreamedMessage = true;
510
+ draftChunker?.reset();
511
+ draftStream.update(previewText);
512
+ if (options?.flush) await draftStream.flush();
513
+ };
514
+ const progressDraftGate = createChannelProgressDraftGate({ onStart: () => renderProgressDraft({ flush: true }) });
494
515
  const resetProgressState = () => {
495
516
  lastPartialText = "";
496
517
  draftText = "";
@@ -508,6 +529,13 @@ function createDiscordDraftPreviewController(params) {
508
529
  return {
509
530
  draftStream,
510
531
  previewToolProgressEnabled,
532
+ suppressDefaultToolProgressMessages,
533
+ get isProgressMode() {
534
+ return discordStreamMode === "progress";
535
+ },
536
+ get hasProgressDraftStarted() {
537
+ return progressDraftGate.hasStarted;
538
+ },
511
539
  get finalizedViaPreviewMessage() {
512
540
  return finalizedViaPreviewMessage;
513
541
  },
@@ -518,18 +546,36 @@ function createDiscordDraftPreviewController(params) {
518
546
  finalizedViaPreviewMessage = true;
519
547
  },
520
548
  disableBlockStreamingForDraft: draftStream ? true : void 0,
521
- pushToolProgress(line) {
522
- if (!draftStream || !previewToolProgressEnabled || previewToolProgressSuppressed) return;
549
+ async startProgressDraft() {
550
+ if (!draftStream || discordStreamMode !== "progress") return;
551
+ await progressDraftGate.startNow();
552
+ },
553
+ async pushToolProgress(line, options) {
554
+ if (!draftStream) return;
555
+ if (options?.toolName !== void 0 && !isChannelProgressDraftWorkToolName(options.toolName)) return;
523
556
  const normalized = line?.replace(/\s+/g, " ").trim();
524
- if (!normalized) return;
525
- if (previewToolProgressLines.at(-1) === normalized) return;
526
- previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-8);
527
- const previewText = ["Working…", ...previewToolProgressLines.map((entry) => `• ${entry}`)].join("\n");
528
- lastPartialText = previewText;
529
- draftText = previewText;
530
- hasStreamedMessage = true;
531
- draftChunker?.reset();
532
- draftStream.update(previewText);
557
+ if (discordStreamMode !== "progress") {
558
+ if (!previewToolProgressEnabled || previewToolProgressSuppressed || !normalized) return;
559
+ if (previewToolProgressLines.at(-1) === normalized) return;
560
+ previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
561
+ const previewText = formatChannelProgressDraftText({
562
+ entry: params.discordConfig,
563
+ lines: previewToolProgressLines,
564
+ seed: progressSeed
565
+ });
566
+ lastPartialText = previewText;
567
+ draftText = previewText;
568
+ hasStreamedMessage = true;
569
+ draftChunker?.reset();
570
+ draftStream.update(previewText);
571
+ return;
572
+ }
573
+ if (previewToolProgressEnabled && !previewToolProgressSuppressed && normalized) {
574
+ if (previewToolProgressLines.at(-1) !== normalized) previewToolProgressLines = [...previewToolProgressLines, normalized].slice(-resolveChannelProgressDraftMaxLines(params.discordConfig));
575
+ }
576
+ const alreadyStarted = progressDraftGate.hasStarted;
577
+ await progressDraftGate.noteWork();
578
+ if (alreadyStarted && progressDraftGate.hasStarted) await renderProgressDraft();
533
579
  },
534
580
  resolvePreviewFinalText(text) {
535
581
  if (typeof text !== "string") return;
@@ -555,6 +601,7 @@ function createDiscordDraftPreviewController(params) {
555
601
  })).text;
556
602
  if (!cleaned || cleaned.startsWith("Reasoning:\n")) return;
557
603
  if (cleaned === lastPartialText) return;
604
+ if (discordStreamMode === "progress") return;
558
605
  previewToolProgressSuppressed = true;
559
606
  previewToolProgressLines = [];
560
607
  hasStreamedMessage = true;
@@ -586,7 +633,10 @@ function createDiscordDraftPreviewController(params) {
586
633
  }
587
634
  });
588
635
  },
589
- handleAssistantMessageBoundary: forceNewMessageIfNeeded,
636
+ handleAssistantMessageBoundary() {
637
+ if (discordStreamMode === "progress") return;
638
+ forceNewMessageIfNeeded();
639
+ },
590
640
  async flush() {
591
641
  if (!draftStream) return;
592
642
  if (draftChunker?.hasBuffered()) {
@@ -603,6 +653,7 @@ function createDiscordDraftPreviewController(params) {
603
653
  },
604
654
  async cleanup() {
605
655
  try {
656
+ progressDraftGate.cancel();
606
657
  if (!finalDeliveryHandled) await draftStream?.discardPending();
607
658
  if (!finalDeliveryHandled && !finalizedViaPreviewMessage && draftStream?.messageId()) await draftStream.clear();
608
659
  } catch (err) {
@@ -861,7 +912,10 @@ async function processDiscordMessage(ctx, observer) {
861
912
  const isFinal = info.kind === "final";
862
913
  if (payload.isReasoning) return;
863
914
  const draftStream = draftPreview.draftStream;
864
- if (draftStream && isFinal) {
915
+ if (draftStream && draftPreview.isProgressMode && info.kind === "block") {
916
+ if (!resolveSendableOutboundReplyParts(payload).hasMedia && !payload.isError) return;
917
+ }
918
+ if (draftStream && isFinal && (!draftPreview.isProgressMode || draftPreview.hasProgressDraftStarted)) {
865
919
  draftPreview.markFinalDeliveryHandled();
866
920
  const hasMedia = resolveSendableOutboundReplyParts(payload).hasMedia;
867
921
  const finalText = payload.text;
@@ -1013,60 +1067,106 @@ async function processDiscordMessage(ctx, observer) {
1013
1067
  limit: historyLimit
1014
1068
  },
1015
1069
  onPreDispatchFailure: settleDispatchBeforeStart,
1016
- runDispatch: () => dispatchInboundMessage({
1017
- ctx: ctxPayload,
1018
- cfg,
1019
- dispatcher,
1020
- replyOptions: {
1021
- ...replyOptions,
1022
- abortSignal,
1023
- skillFilter: channelConfig?.skills,
1024
- sourceReplyDeliveryMode,
1025
- disableBlockStreaming: sourceRepliesAreToolOnly ? true : draftPreview.disableBlockStreamingForDraft ?? (typeof resolvedBlockStreamingEnabled === "boolean" ? !resolvedBlockStreamingEnabled : void 0),
1026
- onPartialReply: draftPreview.draftStream ? (payload) => draftPreview.updateFromPartial(payload.text) : void 0,
1027
- onAssistantMessageStart: draftPreview.draftStream ? draftPreview.handleAssistantMessageBoundary : void 0,
1028
- onReasoningEnd: draftPreview.draftStream ? draftPreview.handleAssistantMessageBoundary : void 0,
1029
- onModelSelected,
1030
- suppressDefaultToolProgressMessages: draftPreview.previewToolProgressEnabled ? true : void 0,
1031
- onReasoningStream: async () => {
1032
- await statusReactions.setThinking();
1033
- },
1034
- onToolStart: async (payload) => {
1035
- if (isProcessAborted(abortSignal)) return;
1036
- await maybeBindStatusReactionsToToolReaction(payload);
1037
- await statusReactions.setTool(payload.name);
1038
- draftPreview.pushToolProgress(payload.name ? `tool: ${payload.name}` : "tool running");
1039
- },
1040
- onItemEvent: async (payload) => {
1041
- draftPreview.pushToolProgress(payload.progressText ?? payload.summary ?? payload.title ?? payload.name);
1042
- },
1043
- onPlanUpdate: async (payload) => {
1044
- if (payload.phase !== "update") return;
1045
- draftPreview.pushToolProgress(payload.explanation ?? payload.steps?.[0] ?? "planning");
1046
- },
1047
- onApprovalEvent: async (payload) => {
1048
- if (payload.phase !== "requested") return;
1049
- draftPreview.pushToolProgress(payload.command ? `approval: ${payload.command}` : "approval requested");
1050
- },
1051
- onCommandOutput: async (payload) => {
1052
- if (payload.phase !== "end") return;
1053
- draftPreview.pushToolProgress(payload.name ? `${payload.name}${payload.exitCode === 0 ? " ✓" : payload.exitCode != null ? ` (exit ${payload.exitCode})` : ""}` : payload.title);
1054
- },
1055
- onPatchSummary: async (payload) => {
1056
- if (payload.phase !== "end") return;
1057
- draftPreview.pushToolProgress(payload.summary ?? payload.title ?? "patch applied");
1058
- },
1059
- onCompactionStart: async () => {
1060
- if (isProcessAborted(abortSignal)) return;
1061
- await statusReactions.setCompacting();
1062
- },
1063
- onCompactionEnd: async () => {
1064
- if (isProcessAborted(abortSignal)) return;
1065
- statusReactions.cancelPending();
1066
- await statusReactions.setThinking();
1070
+ runDispatch: async () => {
1071
+ return await dispatchInboundMessage({
1072
+ ctx: ctxPayload,
1073
+ cfg,
1074
+ dispatcher,
1075
+ replyOptions: {
1076
+ ...replyOptions,
1077
+ abortSignal,
1078
+ skillFilter: channelConfig?.skills,
1079
+ sourceReplyDeliveryMode,
1080
+ disableBlockStreaming: sourceRepliesAreToolOnly ? true : draftPreview.disableBlockStreamingForDraft ?? (typeof resolvedBlockStreamingEnabled === "boolean" ? !resolvedBlockStreamingEnabled : void 0),
1081
+ onPartialReply: draftPreview.draftStream ? (payload) => draftPreview.updateFromPartial(payload.text) : void 0,
1082
+ onAssistantMessageStart: draftPreview.draftStream ? () => draftPreview.handleAssistantMessageBoundary() : void 0,
1083
+ onReasoningEnd: draftPreview.draftStream ? () => draftPreview.handleAssistantMessageBoundary() : void 0,
1084
+ onModelSelected,
1085
+ suppressDefaultToolProgressMessages: draftPreview.suppressDefaultToolProgressMessages ? true : void 0,
1086
+ onReasoningStream: async () => {
1087
+ await statusReactions.setThinking();
1088
+ },
1089
+ onToolStart: async (payload) => {
1090
+ if (isProcessAborted(abortSignal)) return;
1091
+ await maybeBindStatusReactionsToToolReaction(payload);
1092
+ await statusReactions.setTool(payload.name);
1093
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1094
+ event: "tool",
1095
+ name: payload.name,
1096
+ phase: payload.phase,
1097
+ args: payload.args
1098
+ }), { toolName: payload.name });
1099
+ },
1100
+ onItemEvent: async (payload) => {
1101
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1102
+ event: "item",
1103
+ itemKind: payload.kind,
1104
+ title: payload.title,
1105
+ name: payload.name,
1106
+ phase: payload.phase,
1107
+ status: payload.status,
1108
+ summary: payload.summary,
1109
+ progressText: payload.progressText,
1110
+ meta: payload.meta
1111
+ }));
1112
+ },
1113
+ onPlanUpdate: async (payload) => {
1114
+ if (payload.phase !== "update") return;
1115
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1116
+ event: "plan",
1117
+ phase: payload.phase,
1118
+ title: payload.title,
1119
+ explanation: payload.explanation,
1120
+ steps: payload.steps
1121
+ }));
1122
+ },
1123
+ onApprovalEvent: async (payload) => {
1124
+ if (payload.phase !== "requested") return;
1125
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1126
+ event: "approval",
1127
+ phase: payload.phase,
1128
+ title: payload.title,
1129
+ command: payload.command,
1130
+ reason: payload.reason,
1131
+ message: payload.message
1132
+ }));
1133
+ },
1134
+ onCommandOutput: async (payload) => {
1135
+ if (payload.phase !== "end") return;
1136
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1137
+ event: "command-output",
1138
+ phase: payload.phase,
1139
+ title: payload.title,
1140
+ name: payload.name,
1141
+ status: payload.status,
1142
+ exitCode: payload.exitCode
1143
+ }));
1144
+ },
1145
+ onPatchSummary: async (payload) => {
1146
+ if (payload.phase !== "end") return;
1147
+ await draftPreview.pushToolProgress(formatChannelProgressDraftLine({
1148
+ event: "patch",
1149
+ phase: payload.phase,
1150
+ title: payload.title,
1151
+ name: payload.name,
1152
+ added: payload.added,
1153
+ modified: payload.modified,
1154
+ deleted: payload.deleted,
1155
+ summary: payload.summary
1156
+ }));
1157
+ },
1158
+ onCompactionStart: async () => {
1159
+ if (isProcessAborted(abortSignal)) return;
1160
+ await statusReactions.setCompacting();
1161
+ },
1162
+ onCompactionEnd: async () => {
1163
+ if (isProcessAborted(abortSignal)) return;
1164
+ statusReactions.cancelPending();
1165
+ await statusReactions.setThinking();
1166
+ }
1067
1167
  }
1068
- }
1069
- })
1168
+ });
1169
+ }
1070
1170
  })
1071
1171
  }
1072
1172
  });
@@ -1,7 +1,7 @@
1
- import { s as resolveDiscordAccount } from "./accounts-BKnkNaoA.js";
1
+ import { s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
2
2
  import { a as chunkDiscordTextWithMode, i as normalizeDiscordOutboundTarget } from "./normalize-B-ktw-T_.js";
3
- import { m as DiscordError } from "./discord-D1kDh0X_.js";
4
- import { c as readDiscordComponentSpec } from "./components-BapWDmDM.js";
3
+ import { m as DiscordError } from "./discord-eZlimVfW.js";
4
+ import { c as readDiscordComponentSpec } from "./components-D5LnN7ZQ.js";
5
5
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeOptionalStringifiedId } from "openclaw/plugin-sdk/text-runtime";
6
6
  import { resolvePayloadMediaUrls, sendPayloadMediaSequenceOrFallback, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
7
7
  import { resolveRetryConfig, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
@@ -85,7 +85,7 @@ function normalizeDiscordApprovalPayload(payload) {
85
85
  let discordComponentSendPromise;
86
86
  let discordSharedInteractivePromise;
87
87
  async function sendDiscordComponentMessageLazy(...args) {
88
- discordComponentSendPromise ??= import("./send.components-B1EgHAds.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
88
+ discordComponentSendPromise ??= import("./send.components-CJ8gYK3s.js").then((n) => n.i).then((module) => module.sendDiscordComponentMessage);
89
89
  return await (await discordComponentSendPromise)(...args);
90
90
  }
91
91
  function loadDiscordSharedInteractive() {
@@ -124,7 +124,7 @@ async function resolveDiscordComponentSpec(payload) {
124
124
  //#region extensions/discord/src/outbound-send-context.ts
125
125
  let discordSendRuntimePromise;
126
126
  async function loadDiscordSendRuntime() {
127
- discordSendRuntimePromise ??= import("./send-B_frVn_Q.js").then((n) => n.t);
127
+ discordSendRuntimePromise ??= import("./send-Dw6Da1m2.js").then((n) => n.t);
128
128
  return await discordSendRuntimePromise;
129
129
  }
130
130
  function resolveDiscordOutboundTarget(params) {
@@ -264,7 +264,7 @@ function stripDiscordInternalRuntimeScaffolding(text) {
264
264
  }
265
265
  let discordThreadBindingsPromise;
266
266
  function loadDiscordThreadBindings() {
267
- discordThreadBindingsPromise ??= import("./thread-bindings-Bj1R-6QH.js").then((n) => n.t);
267
+ discordThreadBindingsPromise ??= import("./thread-bindings-DLoian4S.js").then((n) => n.t);
268
268
  return discordThreadBindingsPromise;
269
269
  }
270
270
  function resolveDiscordWebhookIdentity(params) {
@@ -0,0 +1,7 @@
1
+ import { resolveChannelPreviewStreamMode } from "openclaw/plugin-sdk/channel-streaming";
2
+ //#region extensions/discord/src/preview-streaming.ts
3
+ function resolveDiscordPreviewStreamMode(params = {}) {
4
+ return resolveChannelPreviewStreamMode(params, "off");
5
+ }
6
+ //#endregion
7
+ export { resolveDiscordPreviewStreamMode as t };
@@ -1,4 +1,4 @@
1
- import { t as normalizeDiscordToken } from "./token-D-w3Rigl.js";
1
+ import { t as normalizeDiscordToken } from "./token-BZtonk7d.js";
2
2
  import { n as fetchDiscord, t as DiscordApiError } from "./api-DzNBVTto.js";
3
3
  import { fetchWithTimeout } from "openclaw/plugin-sdk/text-runtime";
4
4
  import { resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
@@ -1,2 +1,2 @@
1
- import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcNEodPI.js";
1
+ import { a as resolveDiscordPrivilegedIntentsFromFlags, i as probeDiscord, n as fetchDiscordApplicationSummary, r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
2
2
  export { fetchDiscordApplicationId, fetchDiscordApplicationSummary, parseApplicationIdFromToken, probeDiscord, resolveDiscordPrivilegedIntentsFromFlags };
@@ -1,35 +1,36 @@
1
- import { t as normalizeDiscordToken } from "./token-D-w3Rigl.js";
2
- import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, s as resolveDiscordAccount } from "./accounts-BKnkNaoA.js";
1
+ import { t as normalizeDiscordToken } from "./token-BZtonk7d.js";
2
+ import { c as resolveDiscordAccountAllowFrom, d as resolveDiscordAccountDmPolicy, f as resolveDiscordMaxLinesPerMessage, s as resolveDiscordAccount } from "./accounts-CaHGiVB4.js";
3
3
  import { a as chunkDiscordTextWithMode } from "./normalize-B-ktw-T_.js";
4
- import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-B1EgHAds.js";
4
+ import { a as resolveDiscordComponentEntryWithPersistence, o as resolveDiscordModalEntryWithPersistence, t as editDiscordComponentMessage } from "./send.components-CJ8gYK3s.js";
5
5
  import { c as setPresence, i as unregisterGateway, r as registerGateway } from "./gateway-registry-BKG4KIVC.js";
6
- import { A as Button, B as Separator, C as User, D as Modal, G as BaseMessageInteractiveComponent, H as TextDisplay, M as Container, Pt as overwriteApplicationCommands, R as Row, S as Message, V as StringSelectMenu, a as MessageReactionRemoveListener, b as CommandWithSubcommands, d as Client, f as Plugin, h as RateLimitError, i as MessageReactionAddListener, l as ThreadUpdateListener, n as InteractionCreateListener, o as PresenceUpdateListener, r as MessageCreateListener, s as ReadyListener, t as discord_exports, x as Guild, y as Command } from "./discord-D1kDh0X_.js";
7
- import { B as validateDiscordProxyUrl, L as DISCORD_REST_TIMEOUT_MS, N as createDiscordRestClient, R as createDiscordRequestClient, V as withValidatedDiscordProxy, z as resolveDiscordProxyFetchForAccount } from "./send.shared-Db0opnak.js";
6
+ import { A as Button, B as Separator, C as User, D as Modal, G as BaseMessageInteractiveComponent, H as TextDisplay, M as Container, R as Row, S as Message, V as StringSelectMenu, a as MessageReactionRemoveListener, b as CommandWithSubcommands, d as Client, f as Plugin, h as RateLimitError, i as MessageReactionAddListener, l as ThreadUpdateListener, n as InteractionCreateListener, o as PresenceUpdateListener, r as MessageCreateListener, s as ReadyListener, t as discord_exports, x as Guild, y as Command } from "./discord-eZlimVfW.js";
7
+ import { B as validateDiscordProxyUrl, L as DISCORD_REST_TIMEOUT_MS, N as createDiscordRestClient, R as createDiscordRequestClient, V as withValidatedDiscordProxy, z as resolveDiscordProxyFetchForAccount } from "./send.shared-e9Pd_Em0.js";
8
8
  import { a as summarizeDiscordResponseBody, i as isDiscordRateLimitResponseBody } from "./api-DzNBVTto.js";
9
9
  import { n as formatDiscordUserTag, t as formatDiscordReactionEmoji } from "./format-D8TsaXxW.js";
10
10
  import { _ as resolveGroupDmAllow, a as normalizeDiscordSlug, c as resolveDiscordChannelConfigWithFallback, d as resolveDiscordGuildEntry, f as resolveDiscordMemberAccessState, i as normalizeDiscordDisplaySlug, l as resolveDiscordChannelPolicyCommandAuthorizer, m as resolveDiscordOwnerAccess, n as isDiscordGroupAllowedByPolicy, o as resolveDiscordAllowListMatch, r as normalizeDiscordAllowList, v as shouldEmitDiscordReactionNotification } from "./allow-list-ek-1hMKN.js";
11
11
  import { t as formatMention } from "./mentions-BPZUaFk7.js";
12
- import { _ as parseDiscordModalCustomIdForInteraction, g as parseDiscordModalCustomId, h as parseDiscordComponentCustomIdForInteraction, m as parseDiscordComponentCustomId } from "./components-BapWDmDM.js";
13
- import { i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers } from "./approval-shared-DKnwwjZM.js";
14
- import "./approval-native-DqWGp0bM.js";
12
+ import { _ as parseDiscordModalCustomIdForInteraction, g as parseDiscordModalCustomId, h as parseDiscordComponentCustomIdForInteraction, m as parseDiscordComponentCustomId } from "./components-D5LnN7ZQ.js";
13
+ import { i as isDiscordExecApprovalClientEnabled, n as getDiscordExecApprovalApprovers } from "./approval-shared-GfJeMdLu.js";
14
+ import "./approval-native-oN9__F3M.js";
15
15
  import { t as resolveDiscordConversationIdentity } from "./conversation-identity-BN9wSmxJ.js";
16
- import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-CGPntufJ.js";
17
- import { t as resolveDiscordUserAllowlist } from "./resolve-users-CDvSlW0V.js";
18
- import { a as isThreadArchived, d as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-ClPMuIr8.js";
16
+ import { t as resolveDiscordChannelAllowlist } from "./resolve-channels-VAqom3Dn.js";
17
+ import { t as resolveDiscordUserAllowlist } from "./resolve-users-DPJkRKx1.js";
18
+ import { a as isThreadArchived, d as formatThreadBindingDurationLabel } from "./thread-bindings.discord-api-BJF6acLK.js";
19
19
  import { i as resolveDiscordChannelParentIdSafe, n as resolveDiscordChannelInfoSafe, o as resolveDiscordChannelTopicSafe, r as resolveDiscordChannelNameSafe, t as resolveDiscordChannelIdSafe } from "./channel-access-ewDxhd9q.js";
20
- import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DcNEodPI.js";
20
+ import { r as parseApplicationIdFromToken, t as fetchDiscordApplicationId } from "./probe-DmHUl6wI.js";
21
21
  import { o as raceWithTimeout, s as withAbortTimeout } from "./timeouts-C7jeTtGs.js";
22
22
  import { c as resolveDiscordChannelInfo } from "./message-utils-Dmgu-7fC.js";
23
- import { i as resolveDiscordThreadParentInfo } from "./threading-CWhdYHVx.js";
24
- import { c as resolveDiscordDmAccessGroupEntries, i as resolveDiscordEffectiveRoute, n as resolveDiscordBoundConversationRoute, o as handleDiscordDmCommandDecision, s as resolveDiscordDmCommandAccess } from "./route-resolution-BYiC-6Cc.js";
23
+ import { i as resolveDiscordThreadParentInfo } from "./threading-Bi95Nz8h.js";
24
+ import { c as resolveDiscordDmAccessGroupEntries, i as resolveDiscordEffectiveRoute, n as resolveDiscordBoundConversationRoute, o as handleDiscordDmCommandDecision, s as resolveDiscordDmCommandAccess } from "./route-resolution-Bx85WEpX.js";
25
25
  import { t as resolveDiscordSenderIdentity } from "./sender-identity-BiSDAk2P.js";
26
26
  import { n as buildDiscordInboundAccessContext, t as buildDiscordGroupSystemPrompt } from "./inbound-context-e_oBBJtF.js";
27
27
  import { n as resolveDiscordVoiceEnabled, t as authorizeDiscordVoiceIngress } from "./access-B9ujuUtS.js";
28
- import { n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-D9So77a6.js";
29
- import "./approval-handler.runtime-v8nzQHlT.js";
28
+ import { n as buildDirectLabel, r as buildGuildLabel, t as deliverDiscordReply } from "./reply-delivery-uCiWAyIt.js";
29
+ import "./approval-handler.runtime-AZort68o.js";
30
30
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
31
31
  import { chunkItems, logDebug, logError, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, summarizeStringEntries, withTimeout } from "openclaw/plugin-sdk/text-runtime";
32
32
  import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
33
+ import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
33
34
  import { ApplicationCommandOptionType, ButtonStyle, ChannelType, ComponentType, GatewayCloseCodes, GatewayCloseCodes as GatewayCloseCodes$1, GatewayDispatchEvents, GatewayIntentBits, GatewayOpcodes } from "discord-api-types/v10";
34
35
  import { randomUUID } from "node:crypto";
35
36
  import path from "node:path";
@@ -50,12 +51,12 @@ import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plu
50
51
  import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";
51
52
  import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
52
53
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, canonicalizeAllowlistWithResolvedIds, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
54
+ import { resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-streaming";
53
55
  import { buildPairingReply, upsertChannelPairingRequest as upsertChannelPairingRequest$1 } from "openclaw/plugin-sdk/conversation-runtime";
54
- import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
55
56
  import { clearExpiredCooldowns, ensureAuthProfileStore, isProfileInCooldown, resolveDefaultModelForAgent, resolveHumanDelayConfig, resolveProfilesUnavailableReason } from "openclaw/plugin-sdk/agent-runtime";
56
57
  import { GROUP_POLICY_BLOCKED_LABEL, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
57
58
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
58
- import { isNativeCommandsExplicitlyDisabled, resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
59
+ import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
59
60
  import { readStoreAllowFromForDmPolicy, readStoreAllowFromForDmPolicy as readStoreAllowFromForDmPolicy$1, resolveDmGroupAccessWithLists, resolvePinnedMainDmOwnerFromAllowlist as resolvePinnedMainDmOwnerFromAllowlist$1 } from "openclaw/plugin-sdk/security-runtime";
60
61
  import { enqueueSystemEvent, enqueueSystemEvent as enqueueSystemEvent$1 } from "openclaw/plugin-sdk/system-event-runtime";
61
62
  import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime";
@@ -65,7 +66,6 @@ import { resolveCommandAuthorizedFromAuthorizers, resolveNativeCommandSessionTar
65
66
  import { buildCommandTextFromArgs, findCommandByNativeName, parseCommandArgs, resolveCommandArgChoices, resolveCommandArgMenu, serializeCommandArgs } from "openclaw/plugin-sdk/native-command-registry";
66
67
  import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNativeName as findCommandByNativeName$1, formatCommandArgMenuTitle, listChatCommands, listNativeCommandSpecsForConfig, listSkillCommandsForAgents, resolveStoredModelOverride, serializeCommandArgs as serializeCommandArgs$1 } from "openclaw/plugin-sdk/command-auth";
67
68
  import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
68
- import { resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-streaming";
69
69
  import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime";
70
70
  import * as pluginRuntime from "openclaw/plugin-sdk/plugin-runtime";
71
71
  import { createInteractiveConversationBindingHelpers, dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime";
@@ -5282,14 +5282,6 @@ function runDiscordCommandDeployInBackground(params) {
5282
5282
  params.runtime.log?.(warn(`discord: native slash command deploy background warning (not message send): ${formatErrorMessage$1(err)}`));
5283
5283
  });
5284
5284
  }
5285
- async function clearDiscordNativeCommands(params) {
5286
- try {
5287
- await overwriteApplicationCommands(params.client.rest, params.applicationId, []);
5288
- params.runtime.log?.("discord: cleared native commands (commands.native=false)");
5289
- } catch (err) {
5290
- params.runtime.error?.(`discord: failed to clear native commands: ${String(err)}`);
5291
- }
5292
- }
5293
5285
  //#endregion
5294
5286
  //#region extensions/discord/src/voice/command.ts
5295
5287
  const VOICE_CHANNEL_TYPES = [ChannelType.GuildVoice, ChannelType.GuildStageVoice];
@@ -6124,7 +6116,7 @@ async function loadReplyPipelineRuntime() {
6124
6116
  return await replyPipelineRuntimePromise;
6125
6117
  }
6126
6118
  async function loadTypingRuntime() {
6127
- typingRuntimePromise ??= import("./typing-CJiowRTZ.js").then((n) => n.n);
6119
+ typingRuntimePromise ??= import("./typing-BSi1dUHm.js").then((n) => n.n);
6128
6120
  return await typingRuntimePromise;
6129
6121
  }
6130
6122
  function buildDiscordComponentConversationLabel(params) {
@@ -6544,7 +6536,7 @@ async function dispatchPluginDiscordInteractiveEvent(params) {
6544
6536
  //#region extensions/discord/src/monitor/agent-components.handlers.ts
6545
6537
  let componentsRuntimePromise;
6546
6538
  async function loadComponentsRuntime() {
6547
- componentsRuntimePromise ??= import("./components-BapWDmDM.js").then((n) => n.t);
6539
+ componentsRuntimePromise ??= import("./components-D5LnN7ZQ.js").then((n) => n.t);
6548
6540
  return await componentsRuntimePromise;
6549
6541
  }
6550
6542
  async function handleDiscordComponentEvent(params) {
@@ -8033,7 +8025,7 @@ function logDiscordStartupPhase(params) {
8033
8025
  });
8034
8026
  }
8035
8027
  async function loadDiscordVoiceRuntime() {
8036
- const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-M2aAa7qA.js");
8028
+ const promise = discordVoiceRuntimePromise ?? import("./manager.runtime-B0TEyget.js");
8037
8029
  discordVoiceRuntimePromise = promise;
8038
8030
  try {
8039
8031
  return await promise;
@@ -8043,7 +8035,7 @@ async function loadDiscordVoiceRuntime() {
8043
8035
  }
8044
8036
  }
8045
8037
  async function loadDiscordProviderSessionRuntime() {
8046
- const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-JFemrDZT.js");
8038
+ const promise = discordProviderSessionRuntimePromise ?? import("./provider-session.runtime-CD5RUyP3.js");
8047
8039
  discordProviderSessionRuntimePromise = promise;
8048
8040
  try {
8049
8041
  return await promise;
@@ -8130,10 +8122,6 @@ async function monitorDiscordProvider(opts = {}) {
8130
8122
  providerSetting: discordCfg.commands?.nativeSkills,
8131
8123
  globalSetting: cfg.commands?.nativeSkills
8132
8124
  });
8133
- const nativeDisabledExplicit = isNativeCommandsExplicitlyDisabled({
8134
- providerSetting: discordCfg.commands?.native,
8135
- globalSetting: cfg.commands?.native
8136
- });
8137
8125
  const useAccessGroups = cfg.commands?.useAccessGroups !== false;
8138
8126
  const slashCommand = resolveDiscordSlashCommandConfig(discordCfg.slashCommand);
8139
8127
  const sessionPrefix = "discord:slash";
@@ -8307,27 +8295,6 @@ async function monitorDiscordProvider(opts = {}) {
8307
8295
  })
8308
8296
  });
8309
8297
  let voiceManager = null;
8310
- if (nativeDisabledExplicit) {
8311
- logDiscordStartupPhase({
8312
- runtime,
8313
- accountId: account.accountId,
8314
- phase: "clear-native-commands:start",
8315
- startAt: startupStartedAt,
8316
- gateway: lifecycleGateway
8317
- });
8318
- await clearDiscordNativeCommands({
8319
- client,
8320
- applicationId,
8321
- runtime
8322
- });
8323
- logDiscordStartupPhase({
8324
- runtime,
8325
- accountId: account.accountId,
8326
- phase: "clear-native-commands:done",
8327
- startAt: startupStartedAt,
8328
- gateway: lifecycleGateway
8329
- });
8330
- }
8331
8298
  if (voiceEnabled) {
8332
8299
  const { DiscordVoiceManager, DiscordVoiceReadyListener, DiscordVoiceResumedListener } = await loadDiscordVoiceRuntime();
8333
8300
  voiceManager = new DiscordVoiceManager({
@@ -1,6 +1,6 @@
1
- import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-Bj1R-6QH.js";
2
- import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-BaN0l4y8.js";
3
- import { t as createDiscordMessageHandler } from "./message-handler-D6JfFV3P.js";
1
+ import { a as reconcileAcpThreadBindingsOnStartup } from "./thread-bindings-DLoian4S.js";
2
+ import { n as createNoopThreadBindingManager, r as createThreadBindingManager } from "./thread-bindings.manager-CWG9Gd04.js";
3
+ import { t as createDiscordMessageHandler } from "./message-handler-TShaLWeQ.js";
4
4
  import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled } from "openclaw/plugin-sdk/conversation-runtime";
5
5
  import { getAcpSessionManager, isAcpRuntimeError } from "openclaw/plugin-sdk/acp-runtime";
6
6
  export { createDiscordMessageHandler, createNoopThreadBindingManager, createThreadBindingManager, getAcpSessionManager, isAcpRuntimeError, reconcileAcpThreadBindingsOnStartup, resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, resolveThreadBindingsEnabled };
@@ -0,0 +1,2 @@
1
+ import { t as monitorDiscordProvider } from "./provider-Cy1aml6b.js";
2
+ export { monitorDiscordProvider };
@@ -1,6 +1,6 @@
1
1
  import { i as resolveTimestampMs } from "./format-D8TsaXxW.js";
2
- import { s as sendVoiceMessageDiscord } from "./send-B_frVn_Q.js";
3
- import { t as sendMessageDiscord } from "./send.outbound-DlBAuW7y.js";
2
+ import { s as sendVoiceMessageDiscord } from "./send-Dw6Da1m2.js";
3
+ import { t as sendMessageDiscord } from "./send.outbound-6KbINW5h.js";
4
4
  import { t as resolveDiscordSenderIdentity } from "./sender-identity-BiSDAk2P.js";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
6
6
  import { buildOutboundSessionContext, deliverOutboundPayloads } from "openclaw/plugin-sdk/outbound-runtime";
@@ -1,4 +1,4 @@
1
- import { t as normalizeDiscordToken } from "./token-D-w3Rigl.js";
1
+ import { t as normalizeDiscordToken } from "./token-BZtonk7d.js";
2
2
  import { n as fetchDiscord } from "./api-DzNBVTto.js";
3
3
  import { a as normalizeDiscordSlug } from "./allow-list-ek-1hMKN.js";
4
4
  //#region extensions/discord/src/guilds.ts
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
2
  import { n as fetchDiscord, t as DiscordApiError } from "./api-DzNBVTto.js";
3
3
  import { a as normalizeDiscordSlug } from "./allow-list-ek-1hMKN.js";
4
- import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-DqqFY_qa.js";
4
+ import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-Cl2N5YLW.js";
5
5
  //#region extensions/discord/src/resolve-channels.ts
6
6
  var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveDiscordChannelAllowlist: () => resolveDiscordChannelAllowlist });
7
7
  function parseDiscordChannelInput(raw) {
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-C3SqQTfK.js";
2
2
  import { n as fetchDiscord } from "./api-DzNBVTto.js";
3
- import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-DqqFY_qa.js";
3
+ import { i as listGuilds, n as filterDiscordGuilds, r as resolveDiscordAllowlistToken, t as buildDiscordUnresolvedResults } from "./resolve-allowlist-common-Cl2N5YLW.js";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
5
5
  //#region extensions/discord/src/resolve-users.ts
6
6
  var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveDiscordUserAllowlist: () => resolveDiscordUserAllowlist });