@openclaw/slack 2026.6.9-beta.1 → 2026.6.10-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.
@@ -24,7 +24,7 @@ const pinActions = new Set([
24
24
  let slackActionsRuntimePromise;
25
25
  let slackAccountsRuntimePromise;
26
26
  function loadSlackActionsRuntime() {
27
- slackActionsRuntimePromise ??= import("./actions.runtime-9HYdoYvN.js");
27
+ slackActionsRuntimePromise ??= import("./actions.runtime-B56qRt06.js");
28
28
  return slackActionsRuntimePromise;
29
29
  }
30
30
  function loadSlackAccountsRuntime() {
@@ -0,0 +1,2 @@
1
+ import { t as handleSlackAction } from "./action-runtime-CkD5nTPl.js";
2
+ export { handleSlackAction };
@@ -2,7 +2,7 @@ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-f6Xcv9Vi.js";
3
3
  import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-DSfujQlj.js";
4
4
  import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-DhaHONzg.js";
5
- import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-CTnNcQeb.js";
5
+ import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-EpqsWCGd.js";
6
6
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
8
8
  import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
@@ -201,6 +201,9 @@ function createSlackMediaFetch() {
201
201
  function resolveSlackFetchForRuntime() {
202
202
  return isMockedFetch(globalThis.fetch) ? globalThis.fetch : fetchWithRuntimeDispatcher;
203
203
  }
204
+ async function cancelUnreadResponseBody(response) {
205
+ if (!response.bodyUsed) await response.body?.cancel().catch(() => void 0);
206
+ }
204
207
  /**
205
208
  * Fetches a URL with Authorization header while keeping same-origin redirects
206
209
  * authenticated and dropping auth once the redirect crosses origins.
@@ -223,6 +226,7 @@ async function fetchWithSlackAuth(url, token) {
223
226
  return initialRes;
224
227
  }
225
228
  if (resolvedUrl.protocol !== "https:") return initialRes;
229
+ await cancelUnreadResponseBody(initialRes);
226
230
  if (resolvedUrl.origin === parsed.origin) return fetchImpl(resolvedUrl.toString(), {
227
231
  headers: authHeaders,
228
232
  redirect: "follow"
@@ -1,2 +1,2 @@
1
- import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-C2HjraXv.js";
1
+ import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-B2w2hCZ2.js";
2
2
  export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage };
package/dist/api.js CHANGED
@@ -3,16 +3,16 @@ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resol
3
3
  import { t as inspectSlackAccount } from "./account-inspect-CdGk6R7l.js";
4
4
  import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-3jYH8LfB.js";
5
5
  import "./targets-Dll4NJgs.js";
6
- import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-DNL5oO9B.js";
6
+ import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-DJBl-gwf.js";
7
7
  import { c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, i as validateSlackBlocksArray, l as normalizeAllowList, m as resolveSlackUserAllowed, n as SLACK_MAX_BLOCKS, o as resolveSlackGroupRequireMention, p as resolveSlackAllowListMatch, r as parseSlackBlocksInput, s as resolveSlackGroupToolPolicy, u as normalizeAllowListLower } from "./reply-blocks-DSfujQlj.js";
8
8
  import { a as getSlackWriteClient, c as resolveSlackWebClientOptions, i as createSlackWriteClient, l as resolveSlackWriteClientOptions, n as createSlackTokenCacheKey, o as SLACK_DEFAULT_RETRY_OPTIONS, r as createSlackWebClient, s as SLACK_WRITE_RETRY_OPTIONS, t as clearSlackWriteClientCacheForTest } from "./client-DhaHONzg.js";
9
9
  import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-NLAYFat2.js";
10
10
  import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
11
11
  import { t as slackSetupPlugin } from "./channel.setup-WLGVcaSf.js";
12
- import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-CTnNcQeb.js";
13
- import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-C2HjraXv.js";
12
+ import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-EpqsWCGd.js";
13
+ import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-B2w2hCZ2.js";
14
14
  import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-Dmhi8ECy.js";
15
15
  import { t as probeSlack } from "./probe-C3PL00Ms.js";
16
16
  import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
17
- import { n as resolveSlackRuntimeGroupPolicy } from "./provider-CxePoDl1.js";
17
+ import { n as resolveSlackRuntimeGroupPolicy } from "./provider-DNl27IZC.js";
18
18
  export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, resetSlackChannelTypeCacheForTest as __resetSlackChannelTypeCacheForTest, resetSlackChannelTypeCacheForTest, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, clearSlackWriteClientCacheForTest, collectSlackSecurityAuditFindings, compileSlackInteractiveReplies, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, isSlackInteractiveRepliesEnabled, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackOptionsLine, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
@@ -1,5 +1,5 @@
1
1
  import { E as resolveSlackApprovalKind, L as normalizeSlackApproverId, S as isSlackAnyNativeApprovalClientEnabled, k as shouldHandleSlackNativeApprovalRequest, t as resolveSlackReplyBlocks, v as truncateSlackText } from "./reply-blocks-DSfujQlj.js";
2
- import { t as sendMessageSlack } from "./send-CTnNcQeb.js";
2
+ import { t as sendMessageSlack } from "./send-EpqsWCGd.js";
3
3
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
5
5
  import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
@@ -2,14 +2,15 @@ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resol
2
2
  import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-3jYH8LfB.js";
3
3
  import { t as slackContextTargetsMatch } from "./targets-Dll4NJgs.js";
4
4
  import { A as shouldHandleSlackPluginViaForwardingSession, C as normalizeSlackForwardTarget, D as resolveSlackFallbackOriginTarget, E as resolveSlackApprovalKind, F as isSlackExecApprovalAuthorizedSender, I as isSlackExecApprovalClientEnabled, M as getSlackApprovalApprovers, N as isSlackApprovalAuthorizedSender, O as resolveTurnSourceSlackOriginTarget, P as getSlackExecApprovalApprovers, R as resolveSlackExecApprovalTarget, S as isSlackAnyNativeApprovalClientEnabled, T as resolveSessionSlackOriginTarget, _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, j as slackTargetsMatch, k as shouldHandleSlackNativeApprovalRequest, o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy, t as resolveSlackReplyBlocks, u as normalizeAllowListLower, w as normalizeSlackOriginTarget, x as hasSlackPluginApprovers, z as shouldSuppressLocalSlackExecApprovalPrompt } from "./reply-blocks-DSfujQlj.js";
5
- import { d as PAIRING_APPROVED_MESSAGE, h as isSlackPluginAccountConfigured, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID } from "./client-DhaHONzg.js";
5
+ import { d as PAIRING_APPROVED_MESSAGE, h as isSlackPluginAccountConfigured, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID$1 } from "./client-DhaHONzg.js";
6
6
  import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
7
7
  import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-NLAYFat2.js";
8
8
  import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
9
9
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
10
10
  import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-BxzdaqOc.js";
11
11
  import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-POfI_bgP.js";
12
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
12
+ import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
13
+ import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
13
14
  import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
14
15
  import { buildOutboundBaseSessionKey, normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
15
16
  import { buildLegacyDmAccountAllowlistAdapter, createAccountScopedAllowlistNameResolver, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
@@ -21,7 +22,7 @@ import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter } from
21
22
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
22
23
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
23
24
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
24
- import { createApproverRestrictedNativeApprovalCapability, splitChannelApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
25
+ import { createApproverRestrictedNativeApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
25
26
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
26
27
  import { createChannelNativeOriginTargetResolver, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
27
28
  import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
@@ -132,7 +133,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
132
133
  approvalKind: resolveSlackApprovalKind(request),
133
134
  request
134
135
  }),
135
- load: async () => (await import("./approval-handler.runtime-BuE470KE.js")).slackApprovalNativeRuntime
136
+ load: async () => (await import("./approval-handler.runtime-BS6xpR-X.js")).slackApprovalNativeRuntime
136
137
  })
137
138
  });
138
139
  const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
@@ -181,7 +182,6 @@ const slackApprovalCapability = {
181
182
  }
182
183
  } : void 0
183
184
  };
184
- splitChannelApprovalCapability(slackApprovalCapability);
185
185
  //#endregion
186
186
  //#region extensions/slack/src/message-action-dispatch.ts
187
187
  /** Translate generic channel action requests into Slack-specific tool invocations and payload shapes. */
@@ -295,11 +295,18 @@ async function handleSlackMessageAction(params) {
295
295
  accountId
296
296
  }, cfg);
297
297
  }
298
- if (action === "member-info") return await invoke({
299
- action: "memberInfo",
300
- userId: readStringParam(actionParams, "userId", { required: true }),
301
- accountId
302
- }, cfg);
298
+ if (action === "member-info") {
299
+ const requesterAccountId = ctx.requesterAccountId ? normalizeAccountId(ctx.requesterAccountId) : void 0;
300
+ const targetAccountId = normalizeAccountId(accountId ?? resolveDefaultSlackAccountId(cfg));
301
+ const requesterUserId = normalizeOptionalLowercaseString(ctx.toolContext?.currentChannelProvider) === "slack" && requesterAccountId !== void 0 && requesterAccountId === targetAccountId ? normalizeOptionalString(ctx.requesterSenderId) : void 0;
302
+ const userId = readStringParam(actionParams, "userId") ?? requesterUserId;
303
+ if (!userId) throw new Error("member-info requires a userId outside a current Slack conversation.");
304
+ return await invoke({
305
+ action: "memberInfo",
306
+ userId,
307
+ accountId
308
+ }, cfg);
309
+ }
303
310
  if (action === "emoji-list") return await invoke({
304
311
  action: "emojiList",
305
312
  limit: readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." }),
@@ -354,7 +361,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = new Set([
354
361
  "uploadFile"
355
362
  ]);
356
363
  async function loadSlackActionRuntime$1() {
357
- slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-7FY7XZa3.js");
364
+ slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-CJyuCUxj.js");
358
365
  return await slackActionRuntimePromise$1;
359
366
  }
360
367
  function resolveSlackActionContext(params) {
@@ -489,7 +496,7 @@ const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SH
489
496
  const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
490
497
  const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-BHsOhTJd.js"));
491
498
  const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CR4oXiXN.js"));
492
- const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BcTq1zQP.js"));
499
+ const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-CBFfXlOI.js"));
493
500
  async function resolveSlackHandleAction() {
494
501
  return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
495
502
  }
@@ -513,11 +520,11 @@ const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./d
513
520
  const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DNiE0Z0_.js").then((n) => n.n));
514
521
  const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-D_TmaIfG.js").then((n) => n.n));
515
522
  async function loadSlackActionRuntime() {
516
- slackActionRuntimePromise ??= import("./action-runtime.runtime-7FY7XZa3.js");
523
+ slackActionRuntimePromise ??= import("./action-runtime.runtime-CJyuCUxj.js");
517
524
  return await slackActionRuntimePromise;
518
525
  }
519
526
  async function loadSlackSendRuntime() {
520
- slackSendRuntimePromise ??= import("./send.runtime-nW-v-Zc0.js");
527
+ slackSendRuntimePromise ??= import("./send.runtime-CbeGF-al.js");
521
528
  return await slackSendRuntimePromise;
522
529
  }
523
530
  async function loadSlackProbeModule() {
@@ -525,7 +532,7 @@ async function loadSlackProbeModule() {
525
532
  return await slackProbeModulePromise;
526
533
  }
527
534
  async function loadSlackMonitorModule() {
528
- slackMonitorModulePromise ??= import("./monitor-BMC1e8-1.js").then((n) => n.t);
535
+ slackMonitorModulePromise ??= import("./monitor-Bxdbet-b.js").then((n) => n.t);
529
536
  return await slackMonitorModulePromise;
530
537
  }
531
538
  async function loadSlackDirectoryLiveModule() {
@@ -884,7 +891,7 @@ const slackPlugin = createChatChannelPlugin({
884
891
  actions: createSlackActions(SLACK_CHANNEL, { invoke: async (action, cfg, toolContext) => await (await resolveSlackHandleAction())(action, cfg, toolContext) }),
885
892
  message: slackMessageAdapter,
886
893
  status: createComputedAccountStatusAdapter({
887
- defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
894
+ defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID$1),
888
895
  buildChannelSummary: async ({ snapshot }) => {
889
896
  const { buildPassiveProbedChannelStatusSummary } = await loadExtensionSharedSdk();
890
897
  return buildPassiveProbedChannelStatusSummary(snapshot, {
@@ -1,2 +1,2 @@
1
- import { t as slackPlugin } from "./channel-DNL5oO9B.js";
1
+ import { t as slackPlugin } from "./channel-DJBl-gwf.js";
2
2
  export { slackPlugin };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { t as monitorSlackProvider, y as buildSlackSlashCommandMatcher } from "./provider-CxePoDl1.js";
2
+ import { t as monitorSlackProvider, y as buildSlackSlashCommandMatcher } from "./provider-DNl27IZC.js";
3
3
  import { t as isSlackChannelAllowedByPolicy } from "./policy-Dfbxkneh.js";
4
- import { o as resolveSlackThreadTs } from "./replies-C_dlJ8Aw.js";
4
+ import { o as resolveSlackThreadTs } from "./replies-CH4Dmgbr.js";
5
5
  //#region extensions/slack/src/monitor.ts
6
6
  var monitor_exports = /* @__PURE__ */ __exportAll({
7
7
  buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
@@ -10,7 +10,7 @@ import { resolvePayloadMediaUrls, sendPayloadMediaSequenceAndFinalize, sendTextM
10
10
  const SLACK_MAX_BLOCKS = 50;
11
11
  let slackSendRuntimePromise;
12
12
  async function loadSlackSendRuntime() {
13
- slackSendRuntimePromise ??= import("./send.runtime-nW-v-Zc0.js");
13
+ slackSendRuntimePromise ??= import("./send.runtime-CbeGF-al.js");
14
14
  return await slackSendRuntimePromise;
15
15
  }
16
16
  function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
@@ -4,12 +4,12 @@ import "./targets-Dll4NJgs.js";
4
4
  import { a as SLACK_TEXT_LIMIT, d as normalizeSlackAllowOwnerEntry, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-DSfujQlj.js";
5
5
  import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
6
6
  import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-DjlgH-Be.js";
7
- import { a as recordSlackThreadParticipation, i as hasSlackThreadParticipationWithPersistence, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-CTnNcQeb.js";
8
- import { _ as resolveSlackThreadStarter, b as buildSlackEditTextPayload, f as removeSlackReaction, g as resolveSlackThreadHistory, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage, y as formatSlackFileReference } from "./actions-C2HjraXv.js";
7
+ import { a as recordSlackThreadParticipation, i as hasSlackThreadParticipationWithPersistence, s as normalizeSlackOutboundText, t as sendMessageSlack } from "./send-EpqsWCGd.js";
8
+ import { _ as resolveSlackThreadStarter, b as buildSlackEditTextPayload, f as removeSlackReaction, g as resolveSlackThreadHistory, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage, y as formatSlackFileReference } from "./actions-B2w2hCZ2.js";
9
9
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
10
- import { _ as resolveStorePath, a as escapeSlackMrkdwn, b as stripSlackMentionsForCommandDetection, c as authorizeSlackBotRoomMessage, d as buildSlackAssistantThreadMetadata, f as parseSlackAssistantThreadMetadata, g as resolveChannelContextVisibilityMode, h as readSessionUpdatedAt, i as authorizeSlackDirectMessage, l as resolveSlackCommandIngress, m as resolveSlackChatType, o as recordInboundSession, p as normalizeSlackChannelType, r as resolveSlackRoomContextHints, s as resolveConversationLabel$1, u as resolveSlackEffectiveAllowFrom, v as updateLastRoute } from "./provider-CxePoDl1.js";
10
+ import { _ as resolveStorePath, a as escapeSlackMrkdwn, b as stripSlackMentionsForCommandDetection, c as authorizeSlackBotRoomMessage, d as buildSlackAssistantThreadMetadata, f as parseSlackAssistantThreadMetadata, g as resolveChannelContextVisibilityMode, h as readSessionUpdatedAt, i as authorizeSlackDirectMessage, l as resolveSlackCommandIngress, m as resolveSlackChatType, o as recordInboundSession, p as normalizeSlackChannelType, r as resolveSlackRoomContextHints, s as resolveConversationLabel$1, u as resolveSlackEffectiveAllowFrom, v as updateLastRoute } from "./provider-DNl27IZC.js";
11
11
  import { n as resolveSlackChannelConfig } from "./policy-Dfbxkneh.js";
12
- import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-C_dlJ8Aw.js";
12
+ import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-CH4Dmgbr.js";
13
13
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { resolveAgentRoute, resolveInboundLastRouteSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
15
15
  import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftGate, createDraftStreamLoop, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, isChannelProgressDraftWorkToolName, mergeChannelProgressDraftLine, resolveAgentOutboundIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftConfig, resolveChannelProgressDraftMaxLineChars, resolveChannelProgressDraftMaxLines, resolveChannelProgressDraftRender, resolveChannelStreamingBlockEnabled, resolveChannelStreamingNativeTransport, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-outbound";
@@ -314,14 +314,13 @@ function applyAppendOnlyStreamUpdate(params) {
314
314
  //#endregion
315
315
  //#region extensions/slack/src/streaming.ts
316
316
  /**
317
- * Thrown when Slack rejects a stream flush/finalize with a recipient-resolution
318
- * error (see {@link BENIGN_SLACK_FINALIZE_ERROR_CODES}) while text is still
319
- * only buffered locally by the Slack SDK. Carries the pending text so the
317
+ * Thrown when Slack definitively rejects a stream flush/finalize while text
318
+ * remains buffered locally by the Slack SDK. Carries the pending text so the
320
319
  * caller can deliver it via the normal Slack reply path.
321
320
  */
322
321
  var SlackStreamNotDeliveredError = class extends Error {
323
322
  constructor(pendingText, slackCode) {
324
- super(`slack-stream: finalize failed with ${slackCode} before any text reached Slack (${pendingText.length} chars pending)`);
323
+ super(`slack-stream: finalize failed with ${slackCode} before buffered text reached Slack (${pendingText.length} chars pending)`);
325
324
  this.name = "SlackStreamNotDeliveredError";
326
325
  this.pendingText = pendingText;
327
326
  this.slackCode = slackCode;
@@ -404,17 +403,18 @@ async function appendSlackStream(params) {
404
403
  * After calling this the stream message becomes a normal Slack message.
405
404
  * Optionally include final text to append before stopping.
406
405
  *
407
- * If Slack's `chat.stopStream` responds with a known benign finalize error
408
- * (see {@link BENIGN_SLACK_FINALIZE_ERROR_CODES}) AND any prior `append`
409
- * has already landed on Slack, the error is swallowed and the session is
410
- * marked stopped - the already-delivered text stays visible.
406
+ * If Slack's `chat.stopStream` responds with a definitive recipient/channel
407
+ * rejection while text is still buffered locally, this function throws a
408
+ * {@link SlackStreamNotDeliveredError} carrying that pending text so the caller
409
+ * can deliver it through the normal Slack reply path. Ambiguous failures
410
+ * propagate unchanged because Slack may have committed the request.
411
411
  *
412
- * If the same benign error fires while text is still only buffered locally
413
- * (e.g. short replies that never exceeded the SDK's buffer_size), this
414
- * function throws a {@link SlackStreamNotDeliveredError} carrying that pending
415
- * text so the caller can deliver it through the normal Slack reply path.
412
+ * If Slack responds with a known benign finalize error (see
413
+ * {@link BENIGN_SLACK_FINALIZE_ERROR_CODES}) after prior `append` calls already
414
+ * landed, the error is swallowed and the session is marked stopped - the
415
+ * already-delivered text stays visible.
416
416
  *
417
- * All other errors propagate unchanged.
417
+ * Errors without buffered text propagate unchanged.
418
418
  *
419
419
  * On success, returns the finalized message's Slack `ts` (when reported) so the
420
420
  * caller can emit the `message_sent` hook with a populated `messageId`.
@@ -462,7 +462,8 @@ async function stopSlackStream(params) {
462
462
  const BENIGN_SLACK_FINALIZE_ERROR_CODES = new Set([
463
463
  "user_not_found",
464
464
  "team_not_found",
465
- "missing_recipient_user_id"
465
+ "missing_recipient_user_id",
466
+ "method_not_supported_for_channel_type"
466
467
  ]);
467
468
  function isBenignSlackFinalizeError(err) {
468
469
  const code = extractSlackErrorCode(err);
@@ -1943,12 +1944,15 @@ async function dispatchPreparedSlackMessage(prepared) {
1943
1944
  for (const delivery of streamedDeliveries) delivery.acknowledged = true;
1944
1945
  emitAcknowledgedStreamedDeliveries(stopResult?.messageId);
1945
1946
  } catch (err) {
1946
- if (err instanceof SlackStreamNotDeliveredError) streamFallbackDelivered = await deliverPendingStreamFallback(finalStream, err);
1947
- else {
1947
+ if (err instanceof SlackStreamNotDeliveredError) {
1948
+ streamFallbackDelivered = await deliverPendingStreamFallback(finalStream, err);
1949
+ if (!streamFallbackDelivered) dispatchError ??= err;
1950
+ } else {
1948
1951
  const error = formatSlackError(err);
1949
1952
  emitAcknowledgedStreamedDeliveries();
1950
1953
  emitFailedPendingStreamedDeliveries(error);
1951
1954
  runtime.error?.(danger(`slack-stream: failed to stop stream: ${error}`));
1955
+ if (!finalStream.delivered) dispatchError ??= err;
1952
1956
  }
1953
1957
  }
1954
1958
  for (const kind of [
@@ -1985,9 +1989,9 @@ async function dispatchPreparedSlackMessage(prepared) {
1985
1989
  })();
1986
1990
  else statusReactions.restoreInitial();
1987
1991
  } else await statusReactions.restoreInitial();
1988
- if (dispatchError) throw toLintErrorObject(dispatchError, "Slack dispatch failed");
1989
1992
  const participationThreadTs = usedReplyThreadTs ?? statusThreadTs;
1990
1993
  if (anyReplyDelivered && participationThreadTs) recordSlackThreadParticipation(account.accountId, message.channel, participationThreadTs, { agentId: route.agentId });
1994
+ if (dispatchError) throw toLintErrorObject(dispatchError, "Slack dispatch failed");
1991
1995
  if (!anyReplyDelivered && !draftPreviewCommitted) {
1992
1996
  await draftStream?.clear();
1993
1997
  return;
@@ -2028,7 +2032,7 @@ const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
2028
2032
  const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
2029
2033
  let slackMediaModulePromise$1;
2030
2034
  function loadSlackMediaModule$1() {
2031
- slackMediaModulePromise$1 ??= import("./actions-C2HjraXv.js").then((n) => n.h);
2035
+ slackMediaModulePromise$1 ??= import("./actions-B2w2hCZ2.js").then((n) => n.h);
2032
2036
  return slackMediaModulePromise$1;
2033
2037
  }
2034
2038
  function collectUniqueSlackMentionIds$1(texts) {
@@ -2542,7 +2546,7 @@ function formatSlackBotStarterThreadLabel(params) {
2542
2546
  //#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
2543
2547
  let slackMediaModulePromise;
2544
2548
  function loadSlackMediaModule() {
2545
- slackMediaModulePromise ??= import("./actions-C2HjraXv.js").then((n) => n.h);
2549
+ slackMediaModulePromise ??= import("./actions-B2w2hCZ2.js").then((n) => n.h);
2546
2550
  return slackMediaModulePromise;
2547
2551
  }
2548
2552
  const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
@@ -3445,7 +3449,7 @@ async function prepareSlackMessage(params) {
3445
3449
  const preview = rawBody.replace(/\s+/g, " ").slice(0, 160);
3446
3450
  const inboundLabel = isDirectMessage ? `Slack DM from ${senderName}` : `Slack message in ${roomLabel} from ${senderName}`;
3447
3451
  const slackFrom = isDirectMessage ? `slack:${message.user}` : isRoom ? `slack:channel:${message.channel}` : `slack:group:${message.channel}`;
3448
- enqueueSystemEvent(`${inboundLabel}: ${preview}`, {
3452
+ enqueueSystemEvent(inboundLabel, {
3449
3453
  sessionKey,
3450
3454
  contextKey: `slack:message:${message.channel}:${message.ts ?? "unknown"}`
3451
3455
  });
@@ -16,7 +16,7 @@ import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel
16
16
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
17
17
  import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
18
18
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
19
- import { computeBackoff, createNonExitingRuntime, danger, getChildLogger, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
19
+ import { computeBackoff, createNonExitingRuntime, createSubsystemLogger, danger, getChildLogger, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
20
20
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
21
21
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
22
22
  import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
@@ -33,7 +33,7 @@ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-na
33
33
  import { loadSessionStore, readSessionUpdatedAt, resolveSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
34
34
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
35
35
  import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy as resolveOpenProviderRuntimeGroupPolicy$1, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
36
- import { resolveDefaultAgentId, resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
36
+ import { loadModelCatalog, resolveDefaultAgentId, resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
37
37
  import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
38
38
  import { mutateConfigFile } from "openclaw/plugin-sdk/config-mutation";
39
39
  import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
@@ -177,13 +177,13 @@ function createSlackMonitorContext(params) {
177
177
  };
178
178
  const resolveSlackSystemEventSessionKey = (p) => {
179
179
  const channelId = normalizeOptionalString(p.channelId) ?? "";
180
- if (!channelId) return params.mainKey;
180
+ const senderId = normalizeOptionalString(p.senderId) ?? "";
181
181
  const channelType = normalizeSlackChannelType(p.channelType, channelId);
182
182
  const isDirectMessage = channelType === "im";
183
+ if (!channelId && (!isDirectMessage || !senderId)) return params.mainKey;
183
184
  const isGroup = channelType === "mpim";
184
- const from = isDirectMessage ? `slack:${channelId}` : isGroup ? `slack:group:${channelId}` : `slack:channel:${channelId}`;
185
+ const from = isDirectMessage ? `slack:${channelId || senderId}` : isGroup ? `slack:group:${channelId}` : `slack:channel:${channelId}`;
185
186
  const chatType = isDirectMessage ? "direct" : isGroup ? "group" : "channel";
186
- const senderId = normalizeOptionalString(p.senderId) ?? "";
187
187
  try {
188
188
  const peerKind = isDirectMessage ? "direct" : isGroup ? "group" : "channel";
189
189
  const peerId = isDirectMessage ? senderId : channelId;
@@ -1955,6 +1955,107 @@ function registerModalLifecycleHandler(params) {
1955
1955
  });
1956
1956
  }
1957
1957
  //#endregion
1958
+ //#region extensions/slack/src/monitor/events/interactions.shortcuts.ts
1959
+ function resolveMessageThreadTs(body) {
1960
+ const threadTs = body.message.thread_ts;
1961
+ return typeof threadTs === "string" && threadTs.trim() ? threadTs.trim() : void 0;
1962
+ }
1963
+ async function handleSlackShortcut(params) {
1964
+ const { ack, body } = params.args;
1965
+ await ack();
1966
+ if (params.ctx.shouldDropMismatchedSlackEvent?.(body)) {
1967
+ params.ctx.runtime.log?.("slack:interaction drop shortcut payload (mismatched app/team)");
1968
+ return;
1969
+ }
1970
+ const callbackId = body.callback_id?.trim();
1971
+ const userId = body.user?.id?.trim();
1972
+ if (!callbackId || !userId) {
1973
+ params.ctx.runtime.log?.("slack:interaction drop shortcut reason=invalid-payload");
1974
+ return;
1975
+ }
1976
+ params.trackEvent?.();
1977
+ const isMessageShortcut = body.type === "message_action";
1978
+ const messageBody = isMessageShortcut ? body : void 0;
1979
+ const channelId = messageBody?.channel.id?.trim() || void 0;
1980
+ if (isMessageShortcut && !channelId) {
1981
+ params.ctx.runtime.log?.(`slack:interaction drop shortcut callback=${callbackId} user=${userId} reason=missing-channel`);
1982
+ return;
1983
+ }
1984
+ const threadTs = messageBody ? resolveMessageThreadTs(messageBody) : void 0;
1985
+ const auth = await authorizeSlackSystemEventSender({
1986
+ ctx: params.ctx,
1987
+ senderId: userId,
1988
+ channelId,
1989
+ channelType: isMessageShortcut ? void 0 : "im",
1990
+ expectedSenderId: userId,
1991
+ interactiveEvent: true
1992
+ });
1993
+ if (!auth.allowed) {
1994
+ params.ctx.runtime.log?.(`slack:interaction drop shortcut callback=${callbackId} user=${userId} reason=${auth.reason ?? "unauthorized"}`);
1995
+ return;
1996
+ }
1997
+ const interactionType = isMessageShortcut ? "message_shortcut" : "global_shortcut";
1998
+ const messageTs = messageBody?.message.ts || messageBody?.message_ts;
1999
+ const eventPayload = {
2000
+ interactionType,
2001
+ actionId: `shortcut:${callbackId}`,
2002
+ callbackId,
2003
+ userId,
2004
+ teamId: body.team?.id ?? body.user.team_id,
2005
+ triggerId: body.trigger_id,
2006
+ actionTs: body.action_ts,
2007
+ channelId,
2008
+ channelName: messageBody?.channel.name,
2009
+ messageTs,
2010
+ threadTs,
2011
+ messageUserId: messageBody?.message.user,
2012
+ messageText: messageBody?.message.text,
2013
+ responseUrl: messageBody?.response_url
2014
+ };
2015
+ const sessionKey = params.ctx.resolveSlackSystemEventSessionKey({
2016
+ channelId,
2017
+ channelType: auth.channelType,
2018
+ senderId: userId,
2019
+ threadTs
2020
+ });
2021
+ const contextKey = [
2022
+ "slack:interaction:shortcut",
2023
+ interactionType,
2024
+ callbackId,
2025
+ channelId,
2026
+ messageTs,
2027
+ body.action_ts
2028
+ ].filter(Boolean).join(":");
2029
+ params.ctx.runtime.log?.(`slack:interaction ${interactionType} callback=${callbackId} user=${userId} channel=${channelId ?? "direct"}`);
2030
+ if (enqueueSystemEvent(params.formatSystemEvent(eventPayload), {
2031
+ sessionKey,
2032
+ contextKey,
2033
+ deliveryContext: {
2034
+ channel: "slack",
2035
+ to: auth.channelType === "im" ? `user:${userId}` : `channel:${channelId}`,
2036
+ accountId: params.ctx.accountId,
2037
+ threadId: threadTs
2038
+ }
2039
+ })) requestHeartbeat({
2040
+ source: "hook",
2041
+ intent: "immediate",
2042
+ reason: "hook:slack-interaction",
2043
+ sessionKey,
2044
+ heartbeat: { target: "last" }
2045
+ });
2046
+ }
2047
+ function registerSlackShortcutHandler(params) {
2048
+ if (typeof params.ctx.app.shortcut !== "function") return;
2049
+ params.ctx.app.shortcut(/.+/, async (args) => {
2050
+ await handleSlackShortcut({
2051
+ ctx: params.ctx,
2052
+ trackEvent: params.trackEvent,
2053
+ args,
2054
+ formatSystemEvent: params.formatSystemEvent
2055
+ });
2056
+ });
2057
+ }
2058
+ //#endregion
1958
2059
  //#region extensions/slack/src/monitor/events/interactions.ts
1959
2060
  const SLACK_INTERACTION_EVENT_PREFIX = "Slack interaction: ";
1960
2061
  const REDACTED_INTERACTION_VALUE = "[redacted]";
@@ -2017,11 +2118,14 @@ function buildCompactSlackInteractionPayload(payload) {
2017
2118
  actionId: payload.actionId,
2018
2119
  callbackId: payload.callbackId,
2019
2120
  actionType: payload.actionType,
2121
+ actionTs: payload.actionTs,
2020
2122
  userId: payload.userId,
2021
2123
  teamId: payload.teamId,
2022
2124
  channelId: payload.channelId ?? payload.routedChannelId,
2023
2125
  messageTs: payload.messageTs,
2024
2126
  threadTs: payload.threadTs,
2127
+ messageUserId: payload.messageUserId,
2128
+ messageText: payload.messageText,
2025
2129
  viewId: payload.viewId,
2026
2130
  isCleared: payload.isCleared,
2027
2131
  selectedValues: payload.selectedValues,
@@ -2079,6 +2183,11 @@ function registerSlackInteractionEvents(params) {
2079
2183
  trackEvent,
2080
2184
  formatSystemEvent: formatSlackInteractionSystemEvent
2081
2185
  });
2186
+ registerSlackShortcutHandler({
2187
+ ctx,
2188
+ trackEvent,
2189
+ formatSystemEvent: formatSlackInteractionSystemEvent
2190
+ });
2082
2191
  if (typeof ctx.app.view !== "function") return;
2083
2192
  const modalMatcher = /.*/;
2084
2193
  registerModalLifecycleHandler({
@@ -2214,6 +2323,10 @@ function resolveSlackMessageSubtypeHandler(event) {
2214
2323
  }
2215
2324
  //#endregion
2216
2325
  //#region extensions/slack/src/monitor/events/messages.ts
2326
+ const slackInboundLog = createSubsystemLogger("gateway/channels/slack").child("inbound");
2327
+ function formatSlackInboundLogLine(params) {
2328
+ return `Inbound app_mention ${`slack:${params.workspaceId}:channel:${params.channelId}:user:${params.userId}`} -> bot:${params.botUserId} (${params.channelType}, ${params.bodyChars} chars)`;
2329
+ }
2217
2330
  function isSlackUserId(value) {
2218
2331
  return /^[UW][A-Z0-9]+$/.test(value);
2219
2332
  }
@@ -2329,6 +2442,14 @@ function registerSlackMessageEvents(params) {
2329
2442
  const mention = event;
2330
2443
  const channelType = normalizeSlackChannelType(mention.channel_type, mention.channel);
2331
2444
  if (channelType === "im" || channelType === "mpim") return;
2445
+ slackInboundLog.info(formatSlackInboundLogLine({
2446
+ workspaceId: ctx.teamId,
2447
+ channelId: mention.channel,
2448
+ channelType: channelType ?? "channel",
2449
+ userId: normalizeOptionalString(mention.user) ?? "unknown",
2450
+ botUserId: ctx.botUserId,
2451
+ bodyChars: normalizeOptionalString(mention.text)?.length ?? 0
2452
+ }));
2332
2453
  await handleSlackMessage(mention, {
2333
2454
  source: "app_mention",
2334
2455
  wasMentioned: true
@@ -2699,7 +2820,7 @@ function createSlackThreadTsResolver(params) {
2699
2820
  //#region extensions/slack/src/monitor/message-handler.ts
2700
2821
  let slackMessagePipelinePromise;
2701
2822
  function loadSlackMessagePipeline() {
2702
- slackMessagePipelinePromise ??= import("./pipeline.runtime-ByBVsuvQ.js");
2823
+ slackMessagePipelinePromise ??= import("./pipeline.runtime-DQXhebqH.js");
2703
2824
  return slackMessagePipelinePromise;
2704
2825
  }
2705
2826
  const APP_MENTION_RETRY_TTL_MS = 6e4;
@@ -3339,7 +3460,7 @@ function loadSlashCommandsRuntime() {
3339
3460
  return slashCommandsRuntimePromise;
3340
3461
  }
3341
3462
  function loadSlashDispatchRuntime() {
3342
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-9VbEQ9-6.js");
3463
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-BOl9Cbn9.js");
3343
3464
  return slashDispatchRuntimePromise;
3344
3465
  }
3345
3466
  function loadSlackPluginCommandsRuntime() {
@@ -3715,16 +3836,20 @@ async function registerSlackMonitorSlashCommands(params) {
3715
3836
  };
3716
3837
  if (commandDefinition && supportsInteractiveArgMenus) {
3717
3838
  const { resolveCommandArgMenu } = await loadSlashCommandsRuntime();
3718
- const menuRoute = !(commandArgs?.raw && !commandArgs.values) && commandDefinition.args?.some((arg) => typeof arg.choices === "function" && commandArgs?.values?.[arg.name] == null) ? await resolveSlashRoute() : void 0;
3839
+ const menuNeedsModelContext = !(commandArgs?.raw && !commandArgs.values) && commandDefinition.args?.some((arg) => typeof arg.choices === "function" && commandArgs?.values?.[arg.name] == null);
3840
+ const menuRoute = menuNeedsModelContext ? await resolveSlashRoute() : void 0;
3841
+ const menuModelContext = menuRoute ? resolveSlackCommandMenuModelContext({
3842
+ cfg,
3843
+ agentId: menuRoute.agentId,
3844
+ sessionKey: menuRoute.sessionKey
3845
+ }) : {};
3846
+ const menuModelCatalog = commandDefinition.key === "think" && menuNeedsModelContext ? await loadModelCatalog({ config: cfg }) : void 0;
3719
3847
  const menu = resolveCommandArgMenu({
3720
3848
  command: commandDefinition,
3721
3849
  args: commandArgs,
3722
3850
  cfg,
3723
- ...menuRoute ? resolveSlackCommandMenuModelContext({
3724
- cfg,
3725
- agentId: menuRoute.agentId,
3726
- sessionKey: menuRoute.sessionKey
3727
- }) : {}
3851
+ ...menuModelContext,
3852
+ ...menuModelCatalog?.length ? { catalog: menuModelCatalog } : {}
3728
3853
  });
3729
3854
  if (menu) {
3730
3855
  const commandLabel = commandDefinition.nativeName ?? commandDefinition.key;
@@ -4196,7 +4321,7 @@ async function monitorSlackProvider(opts = {}) {
4196
4321
  let authTestFailed = false;
4197
4322
  let authTestError;
4198
4323
  try {
4199
- const auth = await app.client.auth.test({ token: botToken });
4324
+ const auth = await app.client.auth.test();
4200
4325
  botUserId = auth.user_id ?? "";
4201
4326
  botId = auth.bot_id ?? "";
4202
4327
  teamId = auth.team_id ?? "";
@@ -1,5 +1,5 @@
1
1
  import { a as SLACK_TEXT_LIMIT, t as resolveSlackReplyBlocks } from "./reply-blocks-DSfujQlj.js";
2
- import { o as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-CTnNcQeb.js";
2
+ import { o as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-EpqsWCGd.js";
3
3
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
5
  import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
@@ -2,13 +2,13 @@ import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-B9PvcDQJ.js"
2
2
  import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-f6Xcv9Vi.js";
3
3
  import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-DSfujQlj.js";
4
4
  import { n as setSlackRuntime } from "./runtime-BOk7xkOl.js";
5
- import { t as sendMessageSlack } from "./send-CTnNcQeb.js";
6
- import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-C2HjraXv.js";
5
+ import { t as sendMessageSlack } from "./send-EpqsWCGd.js";
6
+ import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-B2w2hCZ2.js";
7
7
  import { t as probeSlack } from "./probe-C3PL00Ms.js";
8
8
  import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DNiE0Z0_.js";
9
9
  import { t as resolveSlackUserAllowlist } from "./resolve-users-D_TmaIfG.js";
10
- import { t as monitorSlackProvider } from "./provider-CxePoDl1.js";
11
- import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-E614LMrR.js";
10
+ import { t as monitorSlackProvider } from "./provider-DNl27IZC.js";
11
+ import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-CkD5nTPl.js";
12
12
  import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-D_pIXtL1.js";
13
- import "./monitor-BMC1e8-1.js";
13
+ import "./monitor-Bxdbet-b.js";
14
14
  export { deleteSlackMessage, editSlackMessage, getSlackMemberInfo, handleSlackAction, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsLive, listSlackDirectoryPeersLive, listSlackEmojis, listSlackPins, listSlackReactions, monitorSlackProvider, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, registerSlackPluginHttpRoutes, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAppToken, resolveSlackBotToken, resolveSlackChannelAllowlist, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackUserAllowlist, sendMessageSlack, sendSlackMessage, setSlackRuntime, slackActionRuntime, unpinSlackMessage };
@@ -426,6 +426,10 @@ async function postSlackMessageBestEffort(params) {
426
426
  return withSlackDnsRequestRetry("chat.postMessage", () => postChatMessage(basePayload));
427
427
  }
428
428
  }
429
+ function resolvePostedMessageThreadTs(response) {
430
+ const threadTs = response.message?.thread_ts;
431
+ return typeof threadTs === "string" ? normalizeSlackThreadTsCandidate(threadTs) : void 0;
432
+ }
429
433
  function createSlackSendReceipt(params) {
430
434
  return createMessageReceiptFromOutboundResults({
431
435
  results: params.platformMessageIds.map((messageId) => messageId.trim()).filter((messageId) => messageId && messageId !== "unknown" && messageId !== "suppressed").map((messageId) => {
@@ -605,7 +609,7 @@ async function sendMessageSlack(to, message, opts) {
605
609
  recipient,
606
610
  blocks
607
611
  }));
608
- const threadTs = normalizeSlackThreadTsCandidate(opts.threadTs);
612
+ const threadTs = result.threadTs ?? normalizeSlackThreadTsCandidate(opts.threadTs);
609
613
  if (threadTs && result.channelId && account.accountId) recordSlackThreadParticipation(account.accountId, result.channelId, threadTs);
610
614
  return result;
611
615
  }
@@ -648,14 +652,16 @@ async function sendMessageSlackQueuedInner(params) {
648
652
  });
649
653
  const messageId = response.ts ?? "unknown";
650
654
  const deliveredChannelId = resolvePostedMessageChannelId(response, channelId);
655
+ const deliveredThreadTs = resolvePostedMessageThreadTs(response) ?? normalizeSlackThreadTsCandidate(opts.threadTs);
651
656
  return {
652
657
  messageId,
653
658
  channelId: deliveredChannelId,
659
+ threadTs: deliveredThreadTs,
654
660
  receipt: createSlackSendReceipt({
655
661
  platformMessageIds: [messageId],
656
662
  channelId: deliveredChannelId,
657
663
  kind: "card",
658
- threadTs: opts.threadTs
664
+ threadTs: deliveredThreadTs
659
665
  })
660
666
  };
661
667
  }
@@ -672,6 +678,7 @@ async function sendMessageSlackQueuedInner(params) {
672
678
  const sentMessageIds = [];
673
679
  let lastMessageId = "";
674
680
  let deliveredChannelId = channelId;
681
+ let canonicalDeliveredThreadTs;
675
682
  if (opts.mediaUrl) {
676
683
  const [firstChunk, ...rest] = resolvedChunks;
677
684
  lastMessageId = await uploadSlackFile({
@@ -701,6 +708,7 @@ async function sendMessageSlackQueuedInner(params) {
701
708
  });
702
709
  lastMessageId = response.ts ?? lastMessageId;
703
710
  deliveredChannelId = resolvePostedMessageChannelId(response, deliveredChannelId);
711
+ canonicalDeliveredThreadTs ??= resolvePostedMessageThreadTs(response);
704
712
  if (response.ts) sentMessageIds.push(response.ts);
705
713
  }
706
714
  } else for (const chunk of resolvedChunks.length ? resolvedChunks : [""]) {
@@ -716,17 +724,20 @@ async function sendMessageSlackQueuedInner(params) {
716
724
  });
717
725
  lastMessageId = response.ts ?? lastMessageId;
718
726
  deliveredChannelId = resolvePostedMessageChannelId(response, deliveredChannelId);
727
+ canonicalDeliveredThreadTs ??= resolvePostedMessageThreadTs(response);
719
728
  if (response.ts) sentMessageIds.push(response.ts);
720
729
  }
721
730
  const messageId = lastMessageId || "unknown";
731
+ const deliveredThreadTs = canonicalDeliveredThreadTs ?? normalizeSlackThreadTsCandidate(opts.threadTs);
722
732
  return {
723
733
  messageId,
724
734
  channelId: deliveredChannelId,
735
+ threadTs: deliveredThreadTs,
725
736
  receipt: createSlackSendReceipt({
726
737
  platformMessageIds: sentMessageIds.length ? sentMessageIds : [messageId],
727
738
  channelId: deliveredChannelId,
728
739
  kind: opts.mediaUrl ? "media" : "text",
729
- threadTs: opts.threadTs
740
+ threadTs: deliveredThreadTs
730
741
  })
731
742
  };
732
743
  }
@@ -0,0 +1,2 @@
1
+ import { t as sendMessageSlack } from "./send-EpqsWCGd.js";
2
+ export { sendMessageSlack };
@@ -1,4 +1,4 @@
1
- import { r as deliverSlackSlashReplies$1 } from "./replies-C_dlJ8Aw.js";
1
+ import { r as deliverSlackSlashReplies$1 } from "./replies-CH4Dmgbr.js";
2
2
  import { resolveAgentRoute as resolveAgentRoute$1 } from "openclaw/plugin-sdk/routing";
3
3
  import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
4
4
  import { recordInboundSessionMetaSafe as recordInboundSessionMetaSafe$1, resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/slack",
3
- "version": "2026.6.9-beta.1",
3
+ "version": "2026.6.10-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/slack",
9
- "version": "2026.6.9-beta.1",
9
+ "version": "2026.6.10-beta.1",
10
10
  "dependencies": {
11
11
  "@slack/bolt": "4.7.3",
12
12
  "@slack/types": "2.21.1",
@@ -15,7 +15,7 @@
15
15
  "zod": "4.4.3"
16
16
  },
17
17
  "peerDependencies": {
18
- "openclaw": ">=2026.6.9-beta.1"
18
+ "openclaw": ">=2026.6.10-beta.1"
19
19
  },
20
20
  "peerDependenciesMeta": {
21
21
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/slack",
3
- "version": "2026.6.9-beta.1",
3
+ "version": "2026.6.10-beta.1",
4
4
  "description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,7 @@
15
15
  "zod": "4.4.3"
16
16
  },
17
17
  "peerDependencies": {
18
- "openclaw": ">=2026.6.9-beta.1"
18
+ "openclaw": ">=2026.6.10-beta.1"
19
19
  },
20
20
  "peerDependenciesMeta": {
21
21
  "openclaw": {
@@ -60,13 +60,13 @@
60
60
  "allowInvalidConfigRecovery": true
61
61
  },
62
62
  "compat": {
63
- "pluginApi": ">=2026.6.9-beta.1"
63
+ "pluginApi": ">=2026.6.10-beta.1"
64
64
  },
65
65
  "startup": {
66
66
  "deferConfiguredChannelFullLoadUntilAfterListen": true
67
67
  },
68
68
  "build": {
69
- "openclawVersion": "2026.6.9-beta.1",
69
+ "openclawVersion": "2026.6.10-beta.1",
70
70
  "bundledDist": false
71
71
  },
72
72
  "release": {
@@ -1,2 +0,0 @@
1
- import { t as handleSlackAction } from "./action-runtime-E614LMrR.js";
2
- export { handleSlackAction };
@@ -1,2 +0,0 @@
1
- import { t as sendMessageSlack } from "./send-CTnNcQeb.js";
2
- export { sendMessageSlack };