@openclaw/slack 2026.5.14-beta.1 → 2026.5.16-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{action-runtime-gtC-RM3r.js → action-runtime-p39JLqwf.js} +4 -4
  2. package/dist/action-runtime.runtime-BzrPV3EA.js +2 -0
  3. package/dist/{media-B-nNpS2G.js → actions-BCRbHv1Q.js} +309 -3
  4. package/dist/{actions.runtime-DD6hfFCA.js → actions.runtime-CpywQR3D.js} +1 -1
  5. package/dist/api.js +16 -16
  6. package/dist/{approval-handler.runtime-DeYBuIaU.js → approval-handler.runtime-DXrdRbkT.js} +3 -4
  7. package/dist/{blocks-render-BdLueE_v.js → blocks-render-BAVfd6r0.js} +1 -1
  8. package/dist/{channel-CC04F-xs.js → channel-CVSopl66.js} +23 -27
  9. package/dist/channel-config-api.js +1 -1
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel.setup-jzYjY634.js → channel.setup-DknBgufI.js} +3 -3
  12. package/dist/{client-8r7r7aZ3.js → client-C_IaJbi5.js} +20 -1
  13. package/dist/{config-schema-Bueih4yH.js → config-schema-CNRousxw.js} +1 -1
  14. package/dist/contract-api.js +4 -4
  15. package/dist/directory-contract-api.js +1 -1
  16. package/dist/{directory-live-CuaWaGnM.js → directory-live-CZPzpQZF.js} +1 -1
  17. package/dist/{doctor-contract-DCkS8eNN.js → doctor-contract-B8QIWMs1.js} +1 -1
  18. package/dist/doctor-contract-api.js +1 -1
  19. package/dist/http-routes-api.js +1 -1
  20. package/dist/inbound-contract-test-api.js +2 -2
  21. package/dist/interactive-replies-api.js +1 -1
  22. package/dist/{message-tool-api-B_bKUmP0.js → message-tool-api-C7gc7goF.js} +1 -1
  23. package/dist/message-tool-api.js +1 -1
  24. package/dist/{monitor-B3QB1ysK.js → monitor-CdVxsuHi.js} +3 -3
  25. package/dist/{outbound-adapter-DsAvCwpZ.js → outbound-adapter-CHm6e-0Q.js} +4 -5
  26. package/dist/outbound-payload-test-api.js +1 -1
  27. package/dist/{outbound-payload.test-harness-DM9ZdY2f.js → outbound-payload.test-harness-C0CW7_CE.js} +2 -2
  28. package/dist/{pipeline.runtime-D-YJZZaI.js → pipeline.runtime-CakcaQh9.js} +119 -143
  29. package/dist/{plugin-routes-Dt_jh9W8.js → plugin-routes-CRnfsTTX.js} +1 -1
  30. package/dist/{prepare-CXI8nHbJ.js → prepare-DSRUr44d.js} +223 -85
  31. package/dist/{prepare.test-helpers-BhFHtbz3.js → prepare.test-helpers-CU1qB54Q.js} +1 -1
  32. package/dist/{probe-D1wYA05H.js → probe-FL4sUJsH.js} +2 -2
  33. package/dist/{provider-Ut7IF0Mn.js → provider-bKg1hkf5.js} +158 -24
  34. package/dist/{replies-CzfjCaLG.js → replies-Fg1T3ZzU.js} +4 -4
  35. package/dist/reply-blocks-BFaJ_ejG.js +134 -0
  36. package/dist/{resolve-channels-BiVxSLVm.js → resolve-channels-B_eKaOkE.js} +2 -2
  37. package/dist/{resolve-users-CcpSlYw-.js → resolve-users-BzBAJwvq.js} +2 -2
  38. package/dist/{room-context-D0hGOp8m.js → room-context-Cd8jFpS-.js} +2 -2
  39. package/dist/{runtime-api-D8wiG9BS.js → runtime-api-B5HGOzX3.js} +2 -2
  40. package/dist/runtime-api.js +12 -12
  41. package/dist/runtime-setter-api.js +1 -1
  42. package/dist/{scopes-BTkB8PPE.js → scopes-Bvg_ZzqZ.js} +2 -2
  43. package/dist/secret-contract-api.js +1 -1
  44. package/dist/security-contract-api.js +1 -1
  45. package/dist/{send-ioky2Xpy.js → send-CxXFbqN1.js} +5 -6
  46. package/dist/send.runtime-BHCPpSj_.js +2 -0
  47. package/dist/send.runtime-CDG5AgU3.js +2 -0
  48. package/dist/{setup-core-DgLJ7dQY.js → setup-core-B7pou7oe.js} +23 -22
  49. package/dist/setup-plugin-api.js +1 -1
  50. package/dist/{setup-surface-B6w9gtds.js → setup-surface-D6LLzeRz.js} +16 -15
  51. package/dist/{shared-CSiHkaVO.js → shared-7Vi9j4aV.js} +7 -7
  52. package/dist/{slash-dispatch.runtime-DNr1EDON.js → slash-dispatch.runtime-Cg7uU92H.js} +1 -1
  53. package/dist/test-api.js +7 -7
  54. package/dist/thread-ts-As_dcNbD.js +52 -0
  55. package/package.json +5 -5
  56. package/dist/action-runtime.runtime-DbVd7_Na.js +0 -2
  57. package/dist/actions-Cqyj7oRr.js +0 -309
  58. package/dist/approval-auth-D3xf0sS6.js +0 -28
  59. package/dist/blocks-input-BJZ8vv03.js +0 -29
  60. package/dist/channel-api-BfBK89IN.js +0 -20
  61. package/dist/exec-approvals-BLn4Zx7V.js +0 -58
  62. package/dist/group-policy-utF2iWnE.js +0 -41
  63. package/dist/mrkdwn-18IzcEAY.js +0 -6
  64. package/dist/reply-blocks-DWoZrUll.js +0 -14
  65. package/dist/send.runtime-5Kl3Wzbf.js +0 -2
  66. package/dist/send.runtime-DoifekaA.js +0 -2
  67. package/dist/thread-ts-o-QBwB3k.js +0 -24
  68. /package/dist/{accounts.runtime-CkfFIisb.js → accounts.runtime-BhbEu1ZK.js} +0 -0
  69. /package/dist/{allow-list-T7ZDpUsF.js → allow-list-nwXs_eCP.js} +0 -0
  70. /package/dist/{config-api-B48Z4H47.js → config-api-CmgE_ORg.js} +0 -0
  71. /package/dist/{directory-config-BKKNBkCq.js → directory-config-CMvFiswf.js} +0 -0
  72. /package/dist/{errors-BrtayXHa.js → errors-C_sW0Zgl.js} +0 -0
  73. /package/dist/{interactive-replies-CawNPL-h.js → interactive-replies-BSg5hXhj.js} +0 -0
  74. /package/dist/{magic-string.es-BLAi6qQC.js → magic-string.es-9lw4MGoF.js} +0 -0
  75. /package/dist/{registry-BdfKYina.js → registry-D2cWOLZV.js} +0 -0
  76. /package/dist/{resolve-allowlist-common-rhfyDyWi.js → resolve-allowlist-common-DLub2I2i.js} +0 -0
  77. /package/dist/{runtime--VlVtTPu.js → runtime-DQxkf7k2.js} +0 -0
  78. /package/dist/{secret-contract-BurGIyhv.js → secret-contract-0TL3L5Kb.js} +0 -0
  79. /package/dist/{security-audit-DvOpSaZM.js → security-audit-BJzADAw3.js} +0 -0
  80. /package/dist/{slash-commands.runtime-DRkNgIQ2.js → slash-commands.runtime-bcDwsGnu.js} +0 -0
  81. /package/dist/{slash-plugin-commands.runtime-Dj5h8hmv.js → slash-plugin-commands.runtime-DBHGUSj2.js} +0 -0
  82. /package/dist/{slash-skill-commands.runtime-B-_KAk0C.js → slash-skill-commands.runtime-rrY2hXvN.js} +0 -0
  83. /package/dist/{streaming-compat-C6rySwiD.js → streaming-compat-eu5Rj5gj.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-C6rySwiD.js";
1
+ import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode } from "./streaming-compat-eu5Rj5gj.js";
2
2
  import { asObjectRecord, hasLegacyAccountStreamingAliases, hasLegacyStreamingAliases, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor";
3
3
  //#region extensions/slack/src/doctor-contract.ts
4
4
  function hasLegacySlackStreamingAliases(value) {
@@ -1,2 +1,2 @@
1
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DCkS8eNN.js";
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-B8QIWMs1.js";
2
2
  export { legacyConfigRules, normalizeCompatibilityConfig };
@@ -1,2 +1,2 @@
1
- import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-Dt_jh9W8.js";
1
+ import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CRnfsTTX.js";
2
2
  export { registerSlackPluginHttpRoutes };
@@ -1,3 +1,3 @@
1
- import { t as prepareSlackMessage } from "./prepare-CXI8nHbJ.js";
2
- import { t as createInboundSlackTestContext } from "./prepare.test-helpers-BhFHtbz3.js";
1
+ import { t as prepareSlackMessage } from "./prepare-DSRUr44d.js";
2
+ import { t as createInboundSlackTestContext } from "./prepare.test-helpers-CU1qB54Q.js";
3
3
  export { createInboundSlackTestContext, prepareSlackMessage };
@@ -1,2 +1,2 @@
1
- import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-CawNPL-h.js";
1
+ import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
2
2
  export { compileSlackInteractiveReplies, isSlackInteractiveRepliesEnabled };
@@ -1,5 +1,5 @@
1
1
  import { a as resolveSlackAccount, t as listEnabledSlackAccounts } from "./accounts-yk5K3wQU.js";
2
- import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-CawNPL-h.js";
2
+ import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BSg5hXhj.js";
3
3
  import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
4
4
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
5
5
  import { Type } from "typebox";
@@ -1,2 +1,2 @@
1
- import { t as describeSlackMessageTool } from "./message-tool-api-B_bKUmP0.js";
1
+ import { t as describeSlackMessageTool } from "./message-tool-api-C7gc7goF.js";
2
2
  export { describeSlackMessageTool as describeMessageTool };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
- import { D as buildSlackSlashCommandMatcher, p as isSlackChannelAllowedByPolicy } from "./room-context-D0hGOp8m.js";
3
- import { t as monitorSlackProvider } from "./provider-Ut7IF0Mn.js";
4
- import { o as resolveSlackThreadTs } from "./replies-CzfjCaLG.js";
2
+ import { D as buildSlackSlashCommandMatcher, p as isSlackChannelAllowedByPolicy } from "./room-context-Cd8jFpS-.js";
3
+ import { t as monitorSlackProvider } from "./provider-bKg1hkf5.js";
4
+ import { o as resolveSlackThreadTs } from "./replies-Fg1T3ZzU.js";
5
5
  //#region extensions/slack/src/monitor.ts
6
6
  var monitor_exports = /* @__PURE__ */ __exportAll({
7
7
  buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
@@ -1,8 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
2
- import { n as buildSlackPresentationBlocks, r as resolveSlackInteractiveBlockOffsets, t as buildSlackInteractiveBlocks } from "./blocks-render-BdLueE_v.js";
3
- import { n as resolveSlackThreadTsValue, r as SLACK_TEXT_LIMIT } from "./thread-ts-o-QBwB3k.js";
4
- import { t as compileSlackInteractiveReplies } from "./interactive-replies-CawNPL-h.js";
5
- import { n as parseSlackBlocksInput } from "./blocks-input-BJZ8vv03.js";
2
+ import { n as buildSlackPresentationBlocks, r as resolveSlackInteractiveBlockOffsets, t as buildSlackInteractiveBlocks } from "./blocks-render-BAVfd6r0.js";
3
+ import { i as parseSlackBlocksInput, n as resolveSlackThreadTsValue, o as SLACK_TEXT_LIMIT } from "./thread-ts-As_dcNbD.js";
4
+ import { t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
6
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
6
  import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
8
7
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
@@ -13,7 +12,7 @@ var outbound_adapter_exports = /* @__PURE__ */ __exportAll({ slackOutbound: () =
13
12
  const SLACK_MAX_BLOCKS = 50;
14
13
  let slackSendRuntimePromise;
15
14
  async function loadSlackSendRuntime() {
16
- slackSendRuntimePromise ??= import("./send.runtime-5Kl3Wzbf.js");
15
+ slackSendRuntimePromise ??= import("./send.runtime-CDG5AgU3.js");
17
16
  return await slackSendRuntimePromise;
18
17
  }
19
18
  function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
@@ -1,2 +1,2 @@
1
- import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-DM9ZdY2f.js";
1
+ import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-C0CW7_CE.js";
2
2
  export { createSlackOutboundPayloadHarness };
@@ -1,4 +1,4 @@
1
- import { n as slackOutbound } from "./outbound-adapter-DsAvCwpZ.js";
1
+ import { n as slackOutbound } from "./outbound-adapter-CHm6e-0Q.js";
2
2
  import { primeChannelOutboundSendMock } from "openclaw/plugin-sdk/channel-contract-testing";
3
3
  //#region node_modules/tinyrainbow/dist/index.js
4
4
  var b = {
@@ -10147,7 +10147,7 @@ function memo(fn) {
10147
10147
  };
10148
10148
  }
10149
10149
  async function saveInlineSnapshots(environment, snapshots) {
10150
- const MagicString = (await import("./magic-string.es-BLAi6qQC.js")).default;
10150
+ const MagicString = (await import("./magic-string.es-9lw4MGoF.js")).default;
10151
10151
  const files = new Set(snapshots.map((i) => i.file));
10152
10152
  await Promise.all(Array.from(files).map(async (file) => {
10153
10153
  const snaps = snapshots.filter((i) => i.file === file);
@@ -1,15 +1,14 @@
1
- import { i as truncateSlackText, r as SLACK_TEXT_LIMIT } from "./thread-ts-o-QBwB3k.js";
2
- import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-CawNPL-h.js";
3
- import { i as normalizeSlackAllowOwnerEntry } from "./allow-list-T7ZDpUsF.js";
4
- import "./blocks-input-BJZ8vv03.js";
5
- import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-C6rySwiD.js";
6
- import { a as recordSlackThreadParticipation, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-ioky2Xpy.js";
7
- import { f as removeSlackReaction, h as buildSlackEditTextPayload, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-Cqyj7oRr.js";
8
- import { t as formatSlackError } from "./errors-BrtayXHa.js";
9
- import { T as updateLastRoute, a as recordInboundSession, w as resolveStorePath } from "./room-context-D0hGOp8m.js";
10
- import { t as escapeSlackMrkdwn } from "./mrkdwn-18IzcEAY.js";
11
- import { n as resolveSlackThreadTargets, t as prepareSlackMessage } from "./prepare-CXI8nHbJ.js";
12
- import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-CzfjCaLG.js";
1
+ import { o as SLACK_TEXT_LIMIT, s as truncateSlackText } from "./thread-ts-As_dcNbD.js";
2
+ import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BSg5hXhj.js";
3
+ import { i as normalizeSlackAllowOwnerEntry } from "./allow-list-nwXs_eCP.js";
4
+ import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-eu5Rj5gj.js";
5
+ import { a as recordSlackThreadParticipation, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-CxXFbqN1.js";
6
+ import { b as buildSlackEditTextPayload, f as removeSlackReaction, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage } from "./actions-BCRbHv1Q.js";
7
+ import { t as formatSlackError } from "./errors-C_sW0Zgl.js";
8
+ import { T as updateLastRoute, a as recordInboundSession, w as resolveStorePath } from "./room-context-Cd8jFpS-.js";
9
+ import { r as escapeSlackMrkdwn } from "./provider-bKg1hkf5.js";
10
+ import { n as resolveSlackThreadTargets, t as prepareSlackMessage } from "./prepare-DSRUr44d.js";
11
+ import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, t as createSlackReplyDeliveryPlan } from "./replies-Fg1T3ZzU.js";
13
12
  import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
14
13
  import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
15
14
  import { createChannelMessageReplyPipeline, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, resolveChannelMessageSourceReplyDeliveryMode } from "openclaw/plugin-sdk/channel-message";
@@ -17,12 +16,11 @@ import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, c
17
16
  import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
18
17
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
19
18
  import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
20
- import { clearHistoryEntriesIfEnabled } from "openclaw/plugin-sdk/reply-history";
21
19
  import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
22
20
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
23
21
  import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
24
22
  import { DEFAULT_TIMING, createStatusReactionController, logAckFailure, logTypingFailure, removeAckReactionAfterReply } from "openclaw/plugin-sdk/channel-feedback";
25
- import { hasVisibleInboundReplyDispatch, runInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
23
+ import { hasVisibleInboundReplyDispatch, runPreparedInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";
26
24
  import { resolveAgentOutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime";
27
25
  import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-lifecycle";
28
26
  import { createReplyDispatcherWithTyping, dispatchInboundMessage, settleReplyDispatcher } from "openclaw/plugin-sdk/reply-runtime";
@@ -988,6 +986,7 @@ async function dispatchPreparedSlackMessage(prepared) {
988
986
  });
989
987
  }
990
988
  };
989
+ let draftPreviewCommitted = false;
991
990
  const { dispatcher, replyOptions, markDispatchIdle } = createReplyDispatcherWithTyping({
992
991
  ...replyPipeline,
993
992
  humanDelay: resolveHumanDelayConfig(cfg, route.agentId),
@@ -1006,7 +1005,7 @@ async function dispatchPreparedSlackMessage(prepared) {
1006
1005
  kind: info.kind,
1007
1006
  payload,
1008
1007
  adapter: defineFinalizableLivePreviewAdapter({
1009
- draft: draftStream ? {
1008
+ draft: draftStream && !draftPreviewCommitted ? {
1010
1009
  flush: draftStream.flush,
1011
1010
  clear: draftStream.clear,
1012
1011
  discardPending: draftStream.discardPending,
@@ -1046,6 +1045,7 @@ async function dispatchPreparedSlackMessage(prepared) {
1046
1045
  });
1047
1046
  },
1048
1047
  onPreviewFinalized: (_preview) => {
1048
+ draftPreviewCommitted = true;
1049
1049
  const finalThreadTs = usedReplyThreadTs ?? statusThreadTs;
1050
1050
  observedReplyDelivery = true;
1051
1051
  replyPlan.markSent();
@@ -1200,127 +1200,113 @@ async function dispatchPreparedSlackMessage(prepared) {
1200
1200
  let counts = {};
1201
1201
  let dispatchSettledBeforeStart = false;
1202
1202
  try {
1203
- const turnResult = await runInboundReplyTurn({
1203
+ const turnResult = await runPreparedInboundReplyTurn({
1204
1204
  channel: "slack",
1205
1205
  accountId: route.accountId,
1206
- raw: prepared.message,
1207
- adapter: {
1208
- ingest: () => ({
1209
- id: prepared.message.ts ?? `${prepared.ctxPayload.From}:${Date.now()}`,
1210
- timestamp: prepared.message.ts ? Number(prepared.message.ts) * 1e3 : void 0,
1211
- rawText: prepared.ctxPayload.RawBody ?? "",
1212
- textForAgent: prepared.ctxPayload.BodyForAgent,
1213
- textForCommands: prepared.ctxPayload.CommandBody,
1214
- raw: prepared.message
1215
- }),
1216
- resolveTurn: () => ({
1217
- channel: "slack",
1218
- accountId: route.accountId,
1219
- routeSessionKey: route.sessionKey,
1220
- storePath: prepared.turn.storePath,
1221
- ctxPayload: prepared.ctxPayload,
1222
- recordInboundSession,
1223
- record: prepared.turn.record,
1224
- botLoopProtection: resolveSlackBotLoopProtection(prepared),
1225
- onPreDispatchFailure: async () => {
1226
- dispatchSettledBeforeStart = true;
1227
- await settleReplyDispatcher({
1228
- dispatcher,
1229
- onSettled: () => markDispatchIdle()
1230
- });
1206
+ routeSessionKey: route.sessionKey,
1207
+ storePath: prepared.turn.storePath,
1208
+ ctxPayload: prepared.ctxPayload,
1209
+ recordInboundSession,
1210
+ record: prepared.turn.record,
1211
+ history: prepared.turn.history,
1212
+ botLoopProtection: resolveSlackBotLoopProtection(prepared),
1213
+ onPreDispatchFailure: async () => {
1214
+ dispatchSettledBeforeStart = true;
1215
+ await settleReplyDispatcher({
1216
+ dispatcher,
1217
+ onSettled: () => markDispatchIdle()
1218
+ });
1219
+ },
1220
+ runDispatch: () => dispatchInboundMessage({
1221
+ ctx: prepared.ctxPayload,
1222
+ cfg,
1223
+ dispatcher,
1224
+ replyOptions: {
1225
+ ...replyOptions,
1226
+ skillFilter: prepared.channelConfig?.skills,
1227
+ sourceReplyDeliveryMode,
1228
+ hasRepliedRef,
1229
+ disableBlockStreaming,
1230
+ onModelSelected,
1231
+ suppressDefaultToolProgressMessages: suppressDefaultToolProgressMessages ? true : void 0,
1232
+ onPartialReply: useStreaming ? void 0 : !previewStreamingEnabled ? void 0 : async (payload) => {
1233
+ updateDraftFromPartial(payload.text);
1231
1234
  },
1232
- runDispatch: () => dispatchInboundMessage({
1233
- ctx: prepared.ctxPayload,
1234
- cfg,
1235
- dispatcher,
1236
- replyOptions: {
1237
- ...replyOptions,
1238
- skillFilter: prepared.channelConfig?.skills,
1239
- sourceReplyDeliveryMode,
1240
- hasRepliedRef,
1241
- disableBlockStreaming,
1242
- onModelSelected,
1243
- suppressDefaultToolProgressMessages: suppressDefaultToolProgressMessages ? true : void 0,
1244
- onPartialReply: useStreaming ? void 0 : !previewStreamingEnabled ? void 0 : async (payload) => {
1245
- updateDraftFromPartial(payload.text);
1246
- },
1247
- onAssistantMessageStart: onDraftBoundary,
1248
- onReasoningEnd: onDraftBoundary,
1249
- onReasoningStream: statusReactionsEnabled ? async () => {
1250
- await statusReactions.setThinking();
1251
- } : void 0,
1252
- onToolStart: async (payload) => {
1253
- if (statusReactionsEnabled) await statusReactions.setTool(payload.name);
1254
- await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
1255
- event: "tool",
1256
- name: payload.name,
1257
- phase: payload.phase,
1258
- args: payload.args
1259
- }, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName: payload.name });
1260
- },
1261
- onItemEvent: async (payload) => {
1262
- await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
1263
- event: "item",
1264
- itemId: payload.itemId,
1265
- itemKind: payload.kind,
1266
- title: payload.title,
1267
- name: payload.name,
1268
- phase: payload.phase,
1269
- status: payload.status,
1270
- summary: payload.summary,
1271
- progressText: payload.progressText,
1272
- meta: payload.meta
1273
- }));
1274
- },
1275
- onPlanUpdate: async (payload) => {
1276
- if (payload.phase !== "update") return;
1277
- await pushPreviewToolProgress(buildChannelProgressDraftLine({
1278
- event: "plan",
1279
- phase: payload.phase,
1280
- title: payload.title,
1281
- explanation: payload.explanation,
1282
- steps: payload.steps
1283
- }));
1284
- },
1285
- onApprovalEvent: async (payload) => {
1286
- if (payload.phase !== "requested") return;
1287
- await pushPreviewToolProgress(buildChannelProgressDraftLine({
1288
- event: "approval",
1289
- phase: payload.phase,
1290
- title: payload.title,
1291
- command: payload.command,
1292
- reason: payload.reason,
1293
- message: payload.message
1294
- }));
1295
- },
1296
- onCommandOutput: async (payload) => {
1297
- if (payload.phase !== "end") return;
1298
- await pushPreviewToolProgress(buildChannelProgressDraftLine({
1299
- event: "command-output",
1300
- phase: payload.phase,
1301
- title: payload.title,
1302
- name: payload.name,
1303
- status: payload.status,
1304
- exitCode: payload.exitCode
1305
- }));
1306
- },
1307
- onPatchSummary: async (payload) => {
1308
- if (payload.phase !== "end") return;
1309
- await pushPreviewToolProgress(buildChannelProgressDraftLine({
1310
- event: "patch",
1311
- phase: payload.phase,
1312
- title: payload.title,
1313
- name: payload.name,
1314
- added: payload.added,
1315
- modified: payload.modified,
1316
- deleted: payload.deleted,
1317
- summary: payload.summary
1318
- }));
1319
- }
1320
- }
1321
- })
1322
- })
1323
- }
1235
+ onAssistantMessageStart: onDraftBoundary,
1236
+ onReasoningEnd: onDraftBoundary,
1237
+ onReasoningStream: statusReactionsEnabled ? async () => {
1238
+ await statusReactions.setThinking();
1239
+ } : void 0,
1240
+ onToolStart: async (payload) => {
1241
+ if (statusReactionsEnabled) await statusReactions.setTool(payload.name);
1242
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
1243
+ event: "tool",
1244
+ name: payload.name,
1245
+ phase: payload.phase,
1246
+ args: payload.args
1247
+ }, payload.detailMode ? { detailMode: payload.detailMode } : void 0), { toolName: payload.name });
1248
+ },
1249
+ onItemEvent: async (payload) => {
1250
+ await pushPreviewToolProgress(buildChannelProgressDraftLineForEntry(account.config, {
1251
+ event: "item",
1252
+ itemId: payload.itemId,
1253
+ itemKind: payload.kind,
1254
+ title: payload.title,
1255
+ name: payload.name,
1256
+ phase: payload.phase,
1257
+ status: payload.status,
1258
+ summary: payload.summary,
1259
+ progressText: payload.progressText,
1260
+ meta: payload.meta
1261
+ }));
1262
+ },
1263
+ onPlanUpdate: async (payload) => {
1264
+ if (payload.phase !== "update") return;
1265
+ await pushPreviewToolProgress(buildChannelProgressDraftLine({
1266
+ event: "plan",
1267
+ phase: payload.phase,
1268
+ title: payload.title,
1269
+ explanation: payload.explanation,
1270
+ steps: payload.steps
1271
+ }));
1272
+ },
1273
+ onApprovalEvent: async (payload) => {
1274
+ if (payload.phase !== "requested") return;
1275
+ await pushPreviewToolProgress(buildChannelProgressDraftLine({
1276
+ event: "approval",
1277
+ phase: payload.phase,
1278
+ title: payload.title,
1279
+ command: payload.command,
1280
+ reason: payload.reason,
1281
+ message: payload.message
1282
+ }));
1283
+ },
1284
+ onCommandOutput: async (payload) => {
1285
+ if (payload.phase !== "end") return;
1286
+ await pushPreviewToolProgress(buildChannelProgressDraftLine({
1287
+ event: "command-output",
1288
+ phase: payload.phase,
1289
+ title: payload.title,
1290
+ name: payload.name,
1291
+ status: payload.status,
1292
+ exitCode: payload.exitCode
1293
+ }));
1294
+ },
1295
+ onPatchSummary: async (payload) => {
1296
+ if (payload.phase !== "end") return;
1297
+ await pushPreviewToolProgress(buildChannelProgressDraftLine({
1298
+ event: "patch",
1299
+ phase: payload.phase,
1300
+ title: payload.title,
1301
+ name: payload.name,
1302
+ added: payload.added,
1303
+ modified: payload.modified,
1304
+ deleted: payload.deleted,
1305
+ summary: payload.summary
1306
+ }));
1307
+ }
1308
+ }
1309
+ })
1324
1310
  });
1325
1311
  if (turnResult.dispatched) {
1326
1312
  const result = turnResult.dispatchResult;
@@ -1368,11 +1354,6 @@ async function dispatchPreparedSlackMessage(prepared) {
1368
1354
  if (anyReplyDelivered && participationThreadTs) recordSlackThreadParticipation(account.accountId, message.channel, participationThreadTs, { agentId: route.agentId });
1369
1355
  if (!anyReplyDelivered) {
1370
1356
  await draftStream?.clear();
1371
- if (prepared.isRoomish && prepared.requireMention) clearHistoryEntriesIfEnabled({
1372
- historyMap: ctx.channelHistories,
1373
- historyKey: prepared.historyKey,
1374
- limit: ctx.historyLimit
1375
- });
1376
1357
  return;
1377
1358
  }
1378
1359
  if (shouldLogVerbose()) {
@@ -1396,11 +1377,6 @@ async function dispatchPreparedSlackMessage(prepared) {
1396
1377
  });
1397
1378
  }
1398
1379
  });
1399
- if (prepared.isRoomish && prepared.requireMention) clearHistoryEntriesIfEnabled({
1400
- historyMap: ctx.channelHistories,
1401
- historyKey: prepared.historyKey,
1402
- limit: ctx.historyLimit
1403
- });
1404
1380
  }
1405
1381
  //#endregion
1406
1382
  export { dispatchPreparedSlackMessage, prepareSlackMessage };
@@ -1,5 +1,5 @@
1
1
  import { n as listSlackAccountIds, r as mergeSlackAccountConfig } from "./accounts-yk5K3wQU.js";
2
- import { r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-BdfKYina.js";
2
+ import { r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-D2cWOLZV.js";
3
3
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
4
4
  //#region extensions/slack/src/http/plugin-routes.ts
5
5
  function registerSlackPluginHttpRoutes(api) {