@openclaw/slack 2026.6.11-beta.2 → 2026.7.1-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 (35) hide show
  1. package/dist/{action-runtime-DfJK7zS0.js → action-runtime-BLu039dd.js} +4 -4
  2. package/dist/action-runtime.runtime-Pwl_ixsr.js +2 -0
  3. package/dist/{actions-OhnDIN4l.js → actions-CqRHPciJ.js} +3 -3
  4. package/dist/{actions.runtime-DkFXr3-k.js → actions.runtime-Dl6AfO_g.js} +1 -1
  5. package/dist/api.js +8 -8
  6. package/dist/{approval-handler.runtime-CsFrthnF.js → approval-handler.runtime-BqNO_HC_.js} +7 -3
  7. package/dist/{channel-COCbJwom.js → channel-DjNY4ik7.js} +22 -18
  8. package/dist/channel-plugin-api.js +1 -1
  9. package/dist/{channel.setup-DYQGnKPK.js → channel.setup-CDOZ8V3p.js} +1 -1
  10. package/dist/{client-km2ba2l3.js → client-DG9cyk55.js} +27 -16
  11. package/dist/{directory-live-DzOkmJVV.js → directory-live-DC-YA5SQ.js} +10 -12
  12. package/dist/{monitor-Cy-0xYgF.js → monitor-Cf50drfK.js} +3 -3
  13. package/dist/{outbound-adapter-CzX4D5K_.js → outbound-adapter-WHn1M1t4.js} +2 -2
  14. package/dist/{pipeline.runtime-5R4HgM_7.js → pipeline.runtime-BKICBY52.js} +38 -18
  15. package/dist/{policy-Bi92bs5t.js → policy-DAE6BTN3.js} +1 -1
  16. package/dist/{probe-BRsYAcGR.js → probe-DFKt9Ute.js} +1 -1
  17. package/dist/{provider-7YKru1TZ.js → provider-DOZHzRWi.js} +25 -17
  18. package/dist/{relay-source-42fP7Ktr.js → relay-source-BpBIUaF8.js} +13 -3
  19. package/dist/{replies-Dlxge48k.js → replies-CMZq3Lcb.js} +3 -3
  20. package/dist/{reply-blocks-BT_sNsDQ.js → reply-blocks-CfJqf7eq.js} +3 -2
  21. package/dist/{resolve-channels-CtUOIX8D.js → resolve-channels-eniB45fy.js} +1 -1
  22. package/dist/{resolve-users-DfFN2BcP.js → resolve-users-DDKzl37a.js} +1 -1
  23. package/dist/{runtime-api-ClM1_yX2.js → runtime-api-DHJ8ntLr.js} +1 -1
  24. package/dist/runtime-api.js +10 -10
  25. package/dist/{scopes-CNKZU1t1.js → scopes-BdVdJxFf.js} +1 -1
  26. package/dist/{send-CRoD-UQw.js → send-Dg6U9K7_.js} +4 -4
  27. package/dist/send.runtime-a-O4PP2B.js +2 -0
  28. package/dist/setup-plugin-api.js +1 -1
  29. package/dist/{setup-surface-D4GE34e2.js → setup-surface-D7xdZLxB.js} +3 -3
  30. package/dist/{shared-BtJS2bUx.js → shared-iMaNxOIL.js} +1 -1
  31. package/dist/{slash-dispatch.runtime-D1qKAWNN.js → slash-dispatch.runtime-C-1pDqWi.js} +1 -1
  32. package/npm-shrinkwrap.json +3 -3
  33. package/package.json +4 -4
  34. package/dist/action-runtime.runtime-CIYPRrNy.js +0 -2
  35. package/dist/send.runtime-C_y65BU0.js +0 -2
@@ -1,8 +1,8 @@
1
1
  import { i as resolveSlackChannelId } from "./target-parsing-3jYH8LfB.js";
2
2
  import { t as slackContextTargetsMatch } from "./targets-Dll4NJgs.js";
3
- import { r as parseSlackBlocksInput } from "./reply-blocks-BT_sNsDQ.js";
4
- import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-ClM1_yX2.js";
5
- import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
3
+ import { r as parseSlackBlocksInput } from "./reply-blocks-CfJqf7eq.js";
4
+ import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-DHJ8ntLr.js";
5
+ import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-DAE6BTN3.js";
6
6
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
7
7
  import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
8
8
  import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
@@ -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-DkFXr3-k.js");
27
+ slackActionsRuntimePromise ??= import("./actions.runtime-Dl6AfO_g.js");
28
28
  return slackActionsRuntimePromise;
29
29
  }
30
30
  function loadSlackAccountsRuntime() {
@@ -0,0 +1,2 @@
1
+ import { t as handleSlackAction } from "./action-runtime-BLu039dd.js";
2
+ export { handleSlackAction };
@@ -1,8 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-BPCiCe8y.js";
3
- import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
4
- import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-km2ba2l3.js";
5
- import { l as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-CRoD-UQw.js";
3
+ import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-CfJqf7eq.js";
4
+ import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-DG9cyk55.js";
5
+ import { l as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-Dg6U9K7_.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";
@@ -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-OhnDIN4l.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-CqRHPciJ.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-DOtQbKkB.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-COCbJwom.js";
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-BT_sNsDQ.js";
6
+ import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-DjNY4ik7.js";
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-CfJqf7eq.js";
8
8
  import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api--zYyTqrR.js";
9
9
  import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
10
- 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-km2ba2l3.js";
11
- import { t as slackSetupPlugin } from "./channel.setup-DYQGnKPK.js";
12
- import { i as hasSlackThreadParticipation, o as recordSlackThreadParticipation, r as clearSlackThreadParticipationCache } from "./send-CRoD-UQw.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-OhnDIN4l.js";
10
+ 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-DG9cyk55.js";
11
+ import { t as slackSetupPlugin } from "./channel.setup-CDOZ8V3p.js";
12
+ import { i as hasSlackThreadParticipation, o as recordSlackThreadParticipation, r as clearSlackThreadParticipationCache } from "./send-Dg6U9K7_.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-CqRHPciJ.js";
14
14
  import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-DDVHDmrN.js";
15
- import { t as probeSlack } from "./probe-BRsYAcGR.js";
15
+ import { t as probeSlack } from "./probe-DFKt9Ute.js";
16
16
  import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
17
- import { n as resolveSlackRuntimeGroupPolicy } from "./provider-7YKru1TZ.js";
17
+ import { n as resolveSlackRuntimeGroupPolicy } from "./provider-DOZHzRWi.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,8 +1,9 @@
1
- import { E as resolveSlackApprovalKind, L as normalizeSlackApproverId, S as isSlackAnyNativeApprovalClientEnabled, k as shouldHandleSlackNativeApprovalRequest, t as resolveSlackReplyBlocks, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
2
- import { t as sendMessageSlack } from "./send-CRoD-UQw.js";
1
+ import { E as resolveSlackApprovalKind, L as normalizeSlackApproverId, S as isSlackAnyNativeApprovalClientEnabled, k as shouldHandleSlackNativeApprovalRequest, t as resolveSlackReplyBlocks, v as truncateSlackText } from "./reply-blocks-CfJqf7eq.js";
2
+ import { t as sendMessageSlack } from "./send-Dg6U9K7_.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";
6
+ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
6
7
  import { logError } from "openclaw/plugin-sdk/logging-core";
7
8
  import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
8
9
  //#region extensions/slack/src/approval-handler.runtime.ts
@@ -19,7 +20,10 @@ function resolveHandlerContext(params) {
19
20
  };
20
21
  }
21
22
  function truncateSlackMrkdwn(text, maxChars) {
22
- return text.length <= maxChars ? text : `${text.slice(0, maxChars - 1)}…`;
23
+ const limit = Math.max(0, Math.floor(maxChars));
24
+ if (text.length <= limit) return text;
25
+ if (limit <= 1) return truncateUtf16Safe(text, limit);
26
+ return `${truncateUtf16Safe(text, limit - 1)}…`;
23
27
  }
24
28
  function buildSlackCodeBlock(text) {
25
29
  let fence = "```";
@@ -1,14 +1,14 @@
1
1
  import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-BPCiCe8y.js";
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
- 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-BT_sNsDQ.js";
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-CfJqf7eq.js";
5
5
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.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--zYyTqrR.js";
8
8
  import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
9
- import { d as PAIRING_APPROVED_MESSAGE, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID$1 } from "./client-km2ba2l3.js";
9
+ import { d as PAIRING_APPROVED_MESSAGE, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID$1 } from "./client-DG9cyk55.js";
10
10
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
11
- import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-BtJS2bUx.js";
11
+ import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-iMaNxOIL.js";
12
12
  import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-BCGzyZhx.js";
13
13
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
14
14
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -22,6 +22,7 @@ import { createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-
22
22
  import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
23
23
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
24
24
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
25
+ import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
25
26
  import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
26
27
  import { createApproverRestrictedNativeApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
27
28
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
@@ -134,7 +135,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
134
135
  approvalKind: resolveSlackApprovalKind(request),
135
136
  request
136
137
  }),
137
- load: async () => (await import("./approval-handler.runtime-CsFrthnF.js")).slackApprovalNativeRuntime
138
+ load: async () => (await import("./approval-handler.runtime-BqNO_HC_.js")).slackApprovalNativeRuntime
138
139
  })
139
140
  });
140
141
  const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
@@ -362,7 +363,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = new Set([
362
363
  "uploadFile"
363
364
  ]);
364
365
  async function loadSlackActionRuntime$1() {
365
- slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-CIYPRrNy.js");
366
+ slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-Pwl_ixsr.js");
366
367
  return await slackActionRuntimePromise$1;
367
368
  }
368
369
  function resolveSlackActionContext(params) {
@@ -495,9 +496,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
495
496
  const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
496
497
  const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
497
498
  const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
498
- const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-D4GE34e2.js"));
499
- const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CNKZU1t1.js"));
500
- const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-CzX4D5K_.js"));
499
+ const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-D7xdZLxB.js"));
500
+ const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-BdVdJxFf.js"));
501
+ const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-WHn1M1t4.js"));
501
502
  async function resolveSlackHandleAction() {
502
503
  return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
503
504
  }
@@ -518,26 +519,26 @@ let slackProbeModulePromise;
518
519
  let slackMonitorModulePromise;
519
520
  let slackDirectoryLiveModulePromise;
520
521
  const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-DDVHDmrN.js").then((n) => n.t));
521
- const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CtUOIX8D.js").then((n) => n.n));
522
- const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DfFN2BcP.js").then((n) => n.n));
522
+ const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-eniB45fy.js").then((n) => n.n));
523
+ const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DDKzl37a.js").then((n) => n.n));
523
524
  async function loadSlackActionRuntime() {
524
- slackActionRuntimePromise ??= import("./action-runtime.runtime-CIYPRrNy.js");
525
+ slackActionRuntimePromise ??= import("./action-runtime.runtime-Pwl_ixsr.js");
525
526
  return await slackActionRuntimePromise;
526
527
  }
527
528
  async function loadSlackSendRuntime() {
528
- slackSendRuntimePromise ??= import("./send.runtime-C_y65BU0.js");
529
+ slackSendRuntimePromise ??= import("./send.runtime-a-O4PP2B.js");
529
530
  return await slackSendRuntimePromise;
530
531
  }
531
532
  async function loadSlackProbeModule() {
532
- slackProbeModulePromise ??= import("./probe-BRsYAcGR.js").then((n) => n.n);
533
+ slackProbeModulePromise ??= import("./probe-DFKt9Ute.js").then((n) => n.n);
533
534
  return await slackProbeModulePromise;
534
535
  }
535
536
  async function loadSlackMonitorModule() {
536
- slackMonitorModulePromise ??= import("./monitor-Cy-0xYgF.js").then((n) => n.t);
537
+ slackMonitorModulePromise ??= import("./monitor-Cf50drfK.js").then((n) => n.t);
537
538
  return await slackMonitorModulePromise;
538
539
  }
539
540
  async function loadSlackDirectoryLiveModule() {
540
- slackDirectoryLiveModulePromise ??= import("./directory-live-DzOkmJVV.js").then((n) => n.t);
541
+ slackDirectoryLiveModulePromise ??= import("./directory-live-DC-YA5SQ.js").then((n) => n.t);
541
542
  return await slackDirectoryLiveModulePromise;
542
543
  }
543
544
  async function resolveSlackSendContext(params) {
@@ -672,6 +673,7 @@ const slackChannelOutbound = {
672
673
  deliveryMode: "direct",
673
674
  chunker: null,
674
675
  textChunkLimit: SLACK_TEXT_LIMIT,
676
+ sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
675
677
  normalizePayload: ({ payload, cfg, accountId }) => isSlackInteractiveRepliesEnabled({
676
678
  cfg,
677
679
  accountId
@@ -1010,10 +1012,12 @@ const slackPlugin = createChatChannelPlugin({
1010
1012
  to,
1011
1013
  toolContext
1012
1014
  })),
1013
- resolveReplyTransport: ({ threadId, replyToId, replyDelivery }) => {
1015
+ resolveReplyTransport: ({ threadId, replyToId, replyToIsExplicit, replyDelivery }) => {
1016
+ const allowedReplyToId = replyDelivery?.replyToMode === "off" ? void 0 : replyToId;
1017
+ const preferThreadId = replyToIsExplicit === false;
1014
1018
  const resolvedReplyToId = resolveSlackThreadTsValue({
1015
- replyToId: replyDelivery?.replyToMode === "off" ? void 0 : replyToId,
1016
- threadId
1019
+ replyToId: preferThreadId ? threadId : allowedReplyToId,
1020
+ threadId: preferThreadId ? allowedReplyToId : threadId
1017
1021
  });
1018
1022
  return {
1019
1023
  replyToId: replyDelivery?.replyToMode === "off" && !resolvedReplyToId ? null : resolvedReplyToId,
@@ -1,2 +1,2 @@
1
- import { t as slackPlugin } from "./channel-COCbJwom.js";
1
+ import { t as slackPlugin } from "./channel-DjNY4ik7.js";
2
2
  export { slackPlugin };
@@ -4,7 +4,7 @@ import { t as SlackChannelConfigSchema } from "./config-schema-BzqzFW__.js";
4
4
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
5
5
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
6
6
  //#region extensions/slack/src/channel.setup.ts
7
- const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-D4GE34e2.js")).slackSetupWizard }));
7
+ const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-D7xdZLxB.js")).slackSetupWizard }));
8
8
  const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
9
9
  sectionKey: SLACK_CHANNEL,
10
10
  listAccountIds: listSlackAccountIds,
@@ -44,31 +44,37 @@ const SLACK_WRITE_RETRY_OPTIONS = { retries: 0 };
44
44
  * Returns `undefined` when no proxy env var is configured or when Slack hosts
45
45
  * are excluded by `NO_PROXY`.
46
46
  */
47
- function resolveSlackProxyAgent() {
47
+ function resolveSlackProxyAgent(targetUrl) {
48
48
  try {
49
49
  return createNodeProxyAgent({
50
50
  mode: "env",
51
- targetUrl: "https://slack.com/",
52
- protocol: "https"
51
+ targetUrl
53
52
  });
54
53
  } catch {
55
54
  return;
56
55
  }
57
56
  }
57
+ function resolveSlackApiUrlFromEnv() {
58
+ return process.env.SLACK_API_URL?.trim() || void 0;
59
+ }
60
+ function applySlackApiUrlAndProxyOptions(options) {
61
+ const slackApiUrl = options.slackApiUrl ?? resolveSlackApiUrlFromEnv();
62
+ options.agent ??= resolveSlackProxyAgent(slackApiUrl ?? "https://slack.com/");
63
+ if (slackApiUrl !== void 0) options.slackApiUrl = slackApiUrl;
64
+ else delete options.slackApiUrl;
65
+ }
58
66
  function resolveSlackWebClientOptions(options = {}) {
59
- return {
60
- ...options,
61
- agent: options.agent ?? resolveSlackProxyAgent(),
62
- retryConfig: options.retryConfig ?? SLACK_DEFAULT_RETRY_OPTIONS
63
- };
67
+ const resolved = Object.assign({}, options);
68
+ applySlackApiUrlAndProxyOptions(resolved);
69
+ resolved.retryConfig ??= SLACK_DEFAULT_RETRY_OPTIONS;
70
+ return resolved;
64
71
  }
65
72
  function resolveSlackWriteClientOptions(options = {}) {
66
- return {
67
- ...options,
68
- agent: options.agent ?? resolveSlackProxyAgent(),
69
- retryConfig: options.retryConfig ?? SLACK_WRITE_RETRY_OPTIONS,
70
- maxRequestConcurrency: options.maxRequestConcurrency ?? 1
71
- };
73
+ const resolved = Object.assign({}, options);
74
+ applySlackApiUrlAndProxyOptions(resolved);
75
+ resolved.retryConfig ??= SLACK_WRITE_RETRY_OPTIONS;
76
+ resolved.maxRequestConcurrency ??= 1;
77
+ return resolved;
72
78
  }
73
79
  //#endregion
74
80
  //#region extensions/slack/src/client.ts
@@ -83,15 +89,20 @@ function createSlackWriteClient(token, options = {}) {
83
89
  function createSlackTokenCacheKey(token) {
84
90
  return `sha256:${createHash("sha256").update(token).digest("base64url")}`;
85
91
  }
86
- function getSlackWriteClient(token) {
92
+ function slackWriteClientCacheKey(token, options) {
87
93
  const tokenKey = createSlackTokenCacheKey(token);
94
+ return options.slackApiUrl ? `${tokenKey}:api:${options.slackApiUrl}` : tokenKey;
95
+ }
96
+ function getSlackWriteClient(token, options = {}) {
97
+ const resolvedOptions = resolveSlackWriteClientOptions(options);
98
+ const tokenKey = slackWriteClientCacheKey(token, resolvedOptions);
88
99
  const cached = slackWriteClientCache.get(tokenKey);
89
100
  if (cached) {
90
101
  slackWriteClientCache.delete(tokenKey);
91
102
  slackWriteClientCache.set(tokenKey, cached);
92
103
  return cached;
93
104
  }
94
- const client = createSlackWriteClient(token);
105
+ const client = new WebClient(token, resolvedOptions);
95
106
  if (slackWriteClientCache.size >= SLACK_WRITE_CLIENT_CACHE_MAX) {
96
107
  const oldestTokenKey = slackWriteClientCache.keys().next().value;
97
108
  if (oldestTokenKey) slackWriteClientCache.delete(oldestTokenKey);
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { a as resolveSlackAccount } from "./accounts-BPCiCe8y.js";
3
- import { r as createSlackWebClient } from "./client-km2ba2l3.js";
3
+ import { r as createSlackWebClient } from "./client-DG9cyk55.js";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/slack/src/directory-live.ts
6
6
  var directory_live_exports = /* @__PURE__ */ __exportAll({
@@ -8,12 +8,13 @@ var directory_live_exports = /* @__PURE__ */ __exportAll({
8
8
  listSlackDirectoryGroupsLive: () => listSlackDirectoryGroupsLive,
9
9
  listSlackDirectoryPeersLive: () => listSlackDirectoryPeersLive
10
10
  });
11
- function resolveReadToken(params) {
11
+ function createSlackDirectoryClient(params) {
12
12
  const account = resolveSlackAccount({
13
13
  cfg: params.cfg,
14
14
  accountId: params.accountId
15
15
  });
16
- return account.userToken ?? account.botToken?.trim();
16
+ const token = account.userToken ?? account.botToken?.trim();
17
+ return token ? createSlackWebClient(token) : null;
17
18
  }
18
19
  function normalizeQuery(value) {
19
20
  return normalizeLowercaseStringOrEmpty(value);
@@ -42,9 +43,8 @@ function slackUserToDirectoryEntry(user, fallback) {
42
43
  };
43
44
  }
44
45
  async function getSlackDirectorySelfLive(params) {
45
- const token = resolveReadToken(params);
46
- if (!token) return null;
47
- const client = createSlackWebClient(token);
46
+ const client = createSlackDirectoryClient(params);
47
+ if (!client) return null;
48
48
  const auth = await client.auth.test();
49
49
  const userId = normalizeOptionalString(auth.user_id);
50
50
  if (!userId) return null;
@@ -64,9 +64,8 @@ async function getSlackDirectorySelfLive(params) {
64
64
  }
65
65
  }
66
66
  async function listSlackDirectoryPeersLive(params) {
67
- const token = resolveReadToken(params);
68
- if (!token) return [];
69
- const client = createSlackWebClient(token);
67
+ const client = createSlackDirectoryClient(params);
68
+ if (!client) return [];
70
69
  const query = normalizeQuery(params.query);
71
70
  const members = [];
72
71
  let cursor;
@@ -92,9 +91,8 @@ async function listSlackDirectoryPeersLive(params) {
92
91
  return rows;
93
92
  }
94
93
  async function listSlackDirectoryGroupsLive(params) {
95
- const token = resolveReadToken(params);
96
- if (!token) return [];
97
- const client = createSlackWebClient(token);
94
+ const client = createSlackDirectoryClient(params);
95
+ if (!client) return [];
98
96
  const query = normalizeQuery(params.query);
99
97
  const channels = [];
100
98
  let cursor;
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { t as monitorSlackProvider, x as buildSlackSlashCommandMatcher } from "./provider-7YKru1TZ.js";
3
- import { t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
4
- import { o as resolveSlackThreadTs } from "./replies-Dlxge48k.js";
2
+ import { S as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-DOZHzRWi.js";
3
+ import { t as isSlackChannelAllowedByPolicy } from "./policy-DAE6BTN3.js";
4
+ import { o as resolveSlackThreadTs } from "./replies-CMZq3Lcb.js";
5
5
  //#region extensions/slack/src/monitor.ts
6
6
  var monitor_exports = /* @__PURE__ */ __exportAll({
7
7
  buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
@@ -1,4 +1,4 @@
1
- import { _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, r as parseSlackBlocksInput } from "./reply-blocks-BT_sNsDQ.js";
1
+ import { _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, r as parseSlackBlocksInput } from "./reply-blocks-CfJqf7eq.js";
2
2
  import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
3
3
  import { t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -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-C_y65BU0.js");
13
+ slackSendRuntimePromise ??= import("./send.runtime-a-O4PP2B.js");
14
14
  return await slackSendRuntimePromise;
15
15
  }
16
16
  function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
@@ -1,24 +1,24 @@
1
1
  import { l as resolveSlackReplyToMode } from "./accounts-BPCiCe8y.js";
2
2
  import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
3
3
  import "./targets-Dll4NJgs.js";
4
- import { a as SLACK_TEXT_LIMIT, d as normalizeSlackAllowOwnerEntry, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
4
+ import { a as SLACK_TEXT_LIMIT, d as normalizeSlackAllowOwnerEntry, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-CfJqf7eq.js";
5
5
  import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
6
6
  import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-DjlgH-Be.js";
7
- import { a as hasSlackThreadParticipationWithPersistence, c as normalizeSlackOutboundText, o as recordSlackThreadParticipation, t as sendMessageSlack } from "./send-CRoD-UQw.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-OhnDIN4l.js";
7
+ import { a as hasSlackThreadParticipationWithPersistence, c as normalizeSlackOutboundText, o as recordSlackThreadParticipation, t as sendMessageSlack } from "./send-Dg6U9K7_.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-CqRHPciJ.js";
9
9
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
10
- import { S as stripSlackMentionsForCommandDetection, _ as readSessionUpdatedAt, b as updateLastRoute, c as recordInboundSession, d as resolveSlackCommandIngress, f as resolveSlackEffectiveAllowFrom, g as resolveSlackChatType, h as normalizeSlackChannelType, i as authorizeSlackDirectMessage, l as resolveConversationLabel$1, m as parseSlackAssistantThreadMetadata, p as buildSlackAssistantThreadMetadata, r as resolveSlackRoomContextHints, s as escapeSlackMrkdwn, u as authorizeSlackBotRoomMessage, v as resolveChannelContextVisibilityMode, y as resolveStorePath } from "./provider-7YKru1TZ.js";
11
- import { n as resolveSlackChannelConfig } from "./policy-Bi92bs5t.js";
12
- import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-Dlxge48k.js";
10
+ import { C as stripSlackMentionsForCommandDetection, _ as readSessionUpdatedAt, b as resolveStorePath, c as recordInboundSession, d as resolveSlackCommandIngress, f as resolveSlackEffectiveAllowFrom, g as resolveSlackChatType, h as normalizeSlackChannelType, i as authorizeSlackDirectMessage, l as resolveConversationLabel$1, m as parseSlackAssistantThreadMetadata, p as buildSlackAssistantThreadMetadata, r as resolveSlackRoomContextHints, s as escapeSlackMrkdwn, u as authorizeSlackBotRoomMessage, v as resolveChannelContextVisibilityMode, x as updateLastRoute, y as resolveChannelResetConfig } from "./provider-DOZHzRWi.js";
11
+ import { n as resolveSlackChannelConfig } from "./policy-DAE6BTN3.js";
12
+ import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-CMZq3Lcb.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";
16
+ import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
16
17
  import { createHash } from "node:crypto";
17
18
  import { danger, logVerbose, shouldLogVerbose, sleep } from "openclaw/plugin-sdk/runtime-env";
18
19
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
19
20
  import { asDateTimestampMs, asFiniteNumberInRange, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
20
21
  import { buildTtsSupplementMediaPayload, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
21
- import { stripReasoningTagsFromText } from "openclaw/plugin-sdk/text-chunking";
22
22
  import { ensureConfiguredBindingRouteReady, resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-runtime";
23
23
  import { createChannelHistoryWindow } from "openclaw/plugin-sdk/reply-history";
24
24
  import { resolveHumanDelayConfig } from "openclaw/plugin-sdk/agent-runtime";
@@ -2032,7 +2032,7 @@ const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
2032
2032
  const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
2033
2033
  let slackMediaModulePromise$1;
2034
2034
  function loadSlackMediaModule$1() {
2035
- slackMediaModulePromise$1 ??= import("./actions-OhnDIN4l.js").then((n) => n.h);
2035
+ slackMediaModulePromise$1 ??= import("./actions-CqRHPciJ.js").then((n) => n.h);
2036
2036
  return slackMediaModulePromise$1;
2037
2037
  }
2038
2038
  function collectUniqueSlackMentionIds$1(texts) {
@@ -2546,10 +2546,22 @@ function formatSlackBotStarterThreadLabel(params) {
2546
2546
  //#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
2547
2547
  let slackMediaModulePromise;
2548
2548
  function loadSlackMediaModule() {
2549
- slackMediaModulePromise ??= import("./actions-OhnDIN4l.js").then((n) => n.h);
2549
+ slackMediaModulePromise ??= import("./actions-CqRHPciJ.js").then((n) => n.h);
2550
2550
  return slackMediaModulePromise;
2551
2551
  }
2552
2552
  const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
2553
+ function resolveSlackThreadSessionFreshness(params) {
2554
+ return params.ctx.channelRuntime?.session?.resolveEntryResetFreshness?.({
2555
+ storePath: params.storePath,
2556
+ sessionKey: params.sessionKey,
2557
+ sessionCfg: params.ctx.cfg.session,
2558
+ resetType: "thread",
2559
+ resetOverride: resolveChannelResetConfig({
2560
+ sessionCfg: params.ctx.cfg.session,
2561
+ channel: "slack"
2562
+ })
2563
+ });
2564
+ }
2553
2565
  function isSlackThreadContextSenderAllowed(params) {
2554
2566
  if (params.allowFromLower.length === 0 || params.botId) return true;
2555
2567
  if (!params.userId) return false;
@@ -2596,14 +2608,21 @@ async function resolveSlackThreadContextData(params) {
2596
2608
  let threadHistoryBody;
2597
2609
  let threadLabel;
2598
2610
  let threadStarterMedia = null;
2599
- const threadSessionPreviousTimestamp = params.isThreadReply && params.threadTs ? readSessionUpdatedAt({
2611
+ const threadSessionFreshness = params.isThreadReply && params.threadTs ? resolveSlackThreadSessionFreshness({
2612
+ ctx: params.ctx,
2613
+ storePath: params.storePath,
2614
+ sessionKey: params.sessionKey
2615
+ }) : void 0;
2616
+ const threadSessionPreviousTimestamp = params.isThreadReply && params.threadTs && !threadSessionFreshness ? readSessionUpdatedAt({
2600
2617
  storePath: params.storePath,
2601
2618
  sessionKey: params.sessionKey
2602
2619
  }) : void 0;
2620
+ const shouldSeedInitialThreadContext = Boolean(params.isThreadReply && params.threadTs && (threadSessionFreshness ? threadSessionFreshness.state !== "fresh" : threadSessionPreviousTimestamp === void 0));
2621
+ const shouldLoadInitialThreadHistory = shouldSeedInitialThreadContext || params.forceInitialHistory === true;
2603
2622
  if (!params.isThreadReply || !params.threadTs) return {
2604
2623
  threadStarterBody,
2605
2624
  threadHistoryBody,
2606
- threadSessionPreviousTimestamp,
2625
+ shouldSeedInitialThreadContext,
2607
2626
  threadLabel,
2608
2627
  threadStarterMedia
2609
2628
  };
@@ -2642,7 +2661,7 @@ async function resolveSlackThreadContextData(params) {
2642
2661
  } else threadLabel = `Slack thread ${params.roomLabel}`;
2643
2662
  const includeBotStarterAsRootContext = shouldIncludeBotThreadStarterContext({
2644
2663
  starterIsCurrentBot,
2645
- isNewThreadSession: !threadSessionPreviousTimestamp,
2664
+ isNewThreadSession: shouldSeedInitialThreadContext,
2646
2665
  hasStarterText: Boolean(starter?.text)
2647
2666
  });
2648
2667
  if (starter?.text && starterIsCurrentBot && !includeBotStarterAsRootContext) logVerbose("slack: omitted current-bot thread starter from context");
@@ -2655,7 +2674,7 @@ async function resolveSlackThreadContextData(params) {
2655
2674
  logVerbose("slack: retained current-bot thread starter as assistant root context");
2656
2675
  }
2657
2676
  const threadInitialHistoryLimit = params.account.config?.thread?.initialHistoryLimit ?? 20;
2658
- if (threadInitialHistoryLimit > 0 && (!threadSessionPreviousTimestamp || params.forceInitialHistory)) {
2677
+ if (threadInitialHistoryLimit > 0 && shouldLoadInitialThreadHistory) {
2659
2678
  const currentBotRootTs = starter?.ts ?? params.threadTs;
2660
2679
  const threadHistoryWithBotRoot = ensureSlackThreadHistoryHasBotRoot({
2661
2680
  history: await resolveSlackThreadHistory({
@@ -2740,7 +2759,7 @@ async function resolveSlackThreadContextData(params) {
2740
2759
  return {
2741
2760
  threadStarterBody,
2742
2761
  threadHistoryBody,
2743
- threadSessionPreviousTimestamp,
2762
+ shouldSeedInitialThreadContext,
2744
2763
  threadLabel,
2745
2764
  threadStarterMedia
2746
2765
  };
@@ -3517,7 +3536,7 @@ async function prepareSlackMessage(params) {
3517
3536
  channelInfo,
3518
3537
  channelConfig
3519
3538
  });
3520
- const { threadStarterBody, threadHistoryBody, threadSessionPreviousTimestamp, threadLabel, threadStarterMedia } = await resolveSlackThreadContextData({
3539
+ const { threadStarterBody, threadHistoryBody, shouldSeedInitialThreadContext, threadLabel, threadStarterMedia } = await resolveSlackThreadContextData({
3521
3540
  ctx,
3522
3541
  account,
3523
3542
  message,
@@ -3551,7 +3570,8 @@ async function prepareSlackMessage(params) {
3551
3570
  sender: {
3552
3571
  id: senderId,
3553
3572
  name: senderName,
3554
- displayLabel: senderName
3573
+ displayLabel: senderName,
3574
+ isBot: isBotMessage || void 0
3555
3575
  },
3556
3576
  conversation: {
3557
3577
  kind: chatType,
@@ -3595,7 +3615,7 @@ async function prepareSlackMessage(params) {
3595
3615
  media: toInboundMediaFacts(effectiveMedia),
3596
3616
  supplemental: {
3597
3617
  thread: {
3598
- starterBody: !directThreadRoutedToDmSession && !threadSessionPreviousTimestamp ? threadStarterBody : void 0,
3618
+ starterBody: !directThreadRoutedToDmSession && shouldSeedInitialThreadContext ? threadStarterBody : void 0,
3599
3619
  historyBody: supplementalThreadHistoryBody,
3600
3620
  label: directThreadRoutedToDmSession ? void 0 : threadLabel
3601
3621
  },
@@ -3609,7 +3629,7 @@ async function prepareSlackMessage(params) {
3609
3629
  SlackAssistantThreadContextChannelId: assistantThreadContext?.channelId,
3610
3630
  SlackAssistantThreadContextTeamId: assistantThreadContext?.teamId,
3611
3631
  SlackAssistantThreadContextEnterpriseId: assistantThreadContext?.enterpriseId ?? void 0,
3612
- IsFirstThreadTurn: isThreadReply && threadTs && !directThreadRoutedToDmSession && !threadSessionPreviousTimestamp ? true : void 0,
3632
+ IsFirstThreadTurn: isThreadReply && threadTs && !directThreadRoutedToDmSession && shouldSeedInitialThreadContext ? true : void 0,
3613
3633
  ...buildSlackMentionContextPayload({
3614
3634
  isRoomish,
3615
3635
  effectiveWasMentioned,
@@ -1,4 +1,4 @@
1
- import { f as normalizeSlackSlug } from "./reply-blocks-BT_sNsDQ.js";
1
+ import { f as normalizeSlackSlug } from "./reply-blocks-CfJqf7eq.js";
2
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { applyChannelMatchMeta, buildChannelKeyCandidates, resolveChannelEntryMatchWithFallback } from "openclaw/plugin-sdk/channel-targets";
4
4
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { r as createSlackWebClient } from "./client-km2ba2l3.js";
2
+ import { r as createSlackWebClient } from "./client-DG9cyk55.js";
3
3
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
4
4
  import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
5
5
  //#region extensions/slack/src/probe.ts
@@ -1,19 +1,20 @@
1
1
  import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
2
2
  import { a as resolveSlackAccount, d as resolveSlackBotToken, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as resolveSlackAppToken } from "./accounts-BPCiCe8y.js";
3
- import { F as isSlackExecApprovalAuthorizedSender, N as isSlackApprovalAuthorizedSender, S as isSlackAnyNativeApprovalClientEnabled, a as SLACK_TEXT_LIMIT, c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, l as normalizeAllowList, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
3
+ import { F as isSlackExecApprovalAuthorizedSender, N as isSlackApprovalAuthorizedSender, S as isSlackAnyNativeApprovalClientEnabled, a as SLACK_TEXT_LIMIT, c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, l as normalizeAllowList, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-CfJqf7eq.js";
4
4
  import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
5
- import { c as resolveSlackWebClientOptions } from "./client-km2ba2l3.js";
5
+ import { c as resolveSlackWebClientOptions } from "./client-DG9cyk55.js";
6
6
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
7
- import { n as setSlackDefaultSendIdentity } from "./send-CRoD-UQw.js";
7
+ import { n as setSlackDefaultSendIdentity } from "./send-Dg6U9K7_.js";
8
8
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
9
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
10
- import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
11
- import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
9
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-eniB45fy.js";
10
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-DDKzl37a.js";
11
+ import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-DAE6BTN3.js";
12
12
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
13
13
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringEntriesLower, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { normalizeAccountId, normalizeMainKey, resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
15
15
  import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
16
16
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
17
+ import { chunkItems } from "openclaw/plugin-sdk/text-chunking";
17
18
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
18
19
  import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
19
20
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
@@ -22,7 +23,6 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
22
23
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
23
24
  import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
24
25
  import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
25
- import { chunkItems } from "openclaw/plugin-sdk/text-chunking";
26
26
  import { createDedupeCache, resolveGlobalDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
27
27
  import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, recordInboundSession, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
28
28
  import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
@@ -31,7 +31,7 @@ import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history";
31
31
  import { installRequestBodyLimitGuard } from "openclaw/plugin-sdk/webhook-request-guards";
32
32
  import { getRuntimeConfig, getRuntimeConfig as getRuntimeConfig$1, getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
33
33
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
34
- import { loadSessionStore, readSessionUpdatedAt, resolveSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
34
+ import { getSessionEntry, readSessionUpdatedAt, resolveChannelResetConfig, resolveSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
35
35
  import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
36
36
  import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy as resolveOpenProviderRuntimeGroupPolicy$1, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
37
37
  import { loadModelCatalog, resolveDefaultAgentId, resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
@@ -374,6 +374,7 @@ function createSlackMonitorContext(params) {
374
374
  botToken: params.botToken,
375
375
  app: params.app,
376
376
  runtime: params.runtime,
377
+ channelRuntime: params.channelRuntime,
377
378
  botUserId: params.botUserId,
378
379
  botId: params.botId,
379
380
  teamId: params.teamId,
@@ -1178,7 +1179,7 @@ function summarizeRichTextPreview(value) {
1178
1179
  const joined = fragments.join(" ").replace(/\s+/g, " ").trim();
1179
1180
  if (!joined) return;
1180
1181
  const max = 120;
1181
- return joined.length <= max ? joined : `${joined.slice(0, max - 1)}…`;
1182
+ return joined.length <= max ? joined : truncateSlackText(joined, max);
1182
1183
  }
1183
1184
  function readInteractionAction(raw) {
1184
1185
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
@@ -2821,7 +2822,7 @@ function createSlackThreadTsResolver(params) {
2821
2822
  //#region extensions/slack/src/monitor/message-handler.ts
2822
2823
  let slackMessagePipelinePromise;
2823
2824
  function loadSlackMessagePipeline() {
2824
- slackMessagePipelinePromise ??= import("./pipeline.runtime-5R4HgM_7.js");
2825
+ slackMessagePipelinePromise ??= import("./pipeline.runtime-BKICBY52.js");
2825
2826
  return slackMessagePipelinePromise;
2826
2827
  }
2827
2828
  function createSlackDispatchCompletion() {
@@ -3502,7 +3503,7 @@ function loadSlashCommandsRuntime() {
3502
3503
  return slashCommandsRuntimePromise;
3503
3504
  }
3504
3505
  function loadSlashDispatchRuntime() {
3505
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-D1qKAWNN.js");
3506
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-C-1pDqWi.js");
3506
3507
  return slashDispatchRuntimePromise;
3507
3508
  }
3508
3509
  function loadSlackPluginCommandsRuntime() {
@@ -3520,15 +3521,21 @@ function resolveSlackCommandMenuModelContext(params) {
3520
3521
  cfg: params.cfg,
3521
3522
  agentId: params.agentId
3522
3523
  });
3523
- const store = loadSessionStore(resolveStorePath(params.cfg.session?.store, { agentId: params.agentId }));
3524
- const entry = store[params.sessionKey];
3524
+ const storePath = resolveStorePath(params.cfg.session?.store, { agentId: params.agentId });
3525
+ const entry = getSessionEntry({
3526
+ storePath,
3527
+ sessionKey: params.sessionKey
3528
+ });
3525
3529
  if (entry?.modelOverrideSource === "auto" && normalizeOptionalString(entry.modelOverride)) return {
3526
3530
  provider: defaultModel.provider,
3527
3531
  model: defaultModel.model
3528
3532
  };
3529
3533
  const override = resolveStoredModelOverride({
3530
3534
  sessionEntry: entry,
3531
- sessionStore: store,
3535
+ loadSessionEntry: (sessionKey) => getSessionEntry({
3536
+ storePath,
3537
+ sessionKey
3538
+ }),
3532
3539
  sessionKey: params.sessionKey,
3533
3540
  defaultProvider: defaultModel.provider
3534
3541
  });
@@ -4127,7 +4134,7 @@ async function registerSlackMonitorSlashCommands(params) {
4127
4134
  await ack({ options: entry.choices.filter((choice) => !query || normalizeLowercaseStringOrEmpty(choice.label).includes(query)).slice(0, SLACK_COMMAND_ARG_SELECT_OPTIONS_MAX).map((choice) => ({
4128
4135
  text: {
4129
4136
  type: "plain_text",
4130
- text: choice.label.slice(0, 75)
4137
+ text: truncateSlackText(choice.label, SLACK_COMMAND_ARG_SELECT_OPTION_TEXT_MAX)
4131
4138
  },
4132
4139
  value: choice.value
4133
4140
  })) });
@@ -4215,7 +4222,7 @@ async function getSlackBoltInterop() {
4215
4222
  return slackBoltInterop;
4216
4223
  }
4217
4224
  function loadSlackRelaySource() {
4218
- slackRelaySourcePromise ??= import("./relay-source-42fP7Ktr.js");
4225
+ slackRelaySourcePromise ??= import("./relay-source-BpBIUaF8.js");
4219
4226
  return slackRelaySourcePromise;
4220
4227
  }
4221
4228
  const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
@@ -4408,6 +4415,7 @@ async function monitorSlackProvider(opts = {}) {
4408
4415
  botToken,
4409
4416
  app,
4410
4417
  runtime,
4418
+ channelRuntime: opts.channelRuntime,
4411
4419
  botUserId,
4412
4420
  botId,
4413
4421
  teamId,
@@ -4661,4 +4669,4 @@ async function monitorSlackProvider(opts = {}) {
4661
4669
  }
4662
4670
  const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy$1;
4663
4671
  //#endregion
4664
- export { stripSlackMentionsForCommandDetection as S, readSessionUpdatedAt as _, SLACK_SOCKET_RECONNECT_POLICY as a, updateLastRoute as b, recordInboundSession as c, resolveSlackCommandIngress as d, resolveSlackEffectiveAllowFrom as f, resolveSlackChatType as g, normalizeSlackChannelType as h, authorizeSlackDirectMessage as i, resolveConversationLabel$1 as l, parseSlackAssistantThreadMetadata as m, resolveSlackRuntimeGroupPolicy as n, formatUnknownError as o, buildSlackAssistantThreadMetadata as p, resolveSlackRoomContextHints as r, escapeSlackMrkdwn as s, monitorSlackProvider as t, authorizeSlackBotRoomMessage as u, resolveChannelContextVisibilityMode as v, buildSlackSlashCommandMatcher as x, resolveStorePath$1 as y };
4672
+ export { stripSlackMentionsForCommandDetection as C, buildSlackSlashCommandMatcher as S, readSessionUpdatedAt as _, SLACK_SOCKET_RECONNECT_POLICY as a, resolveStorePath$1 as b, recordInboundSession as c, resolveSlackCommandIngress as d, resolveSlackEffectiveAllowFrom as f, resolveSlackChatType as g, normalizeSlackChannelType as h, authorizeSlackDirectMessage as i, resolveConversationLabel$1 as l, parseSlackAssistantThreadMetadata as m, resolveSlackRuntimeGroupPolicy as n, formatUnknownError as o, buildSlackAssistantThreadMetadata as p, resolveSlackRoomContextHints as r, escapeSlackMrkdwn as s, monitorSlackProvider as t, authorizeSlackBotRoomMessage as u, resolveChannelContextVisibilityMode as v, updateLastRoute as x, resolveChannelResetConfig as y };
@@ -1,4 +1,4 @@
1
- import { a as SLACK_SOCKET_RECONNECT_POLICY, o as formatUnknownError } from "./provider-7YKru1TZ.js";
1
+ import { a as SLACK_SOCKET_RECONNECT_POLICY, o as formatUnknownError } from "./provider-DOZHzRWi.js";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
4
4
  import { Buffer } from "node:buffer";
@@ -206,9 +206,19 @@ function isLocalRelayHost(hostname) {
206
206
  if (host === "localhost" || host === "::1") return true;
207
207
  return isIP(host) === 4 && host.startsWith("127.");
208
208
  }
209
+ var SlackRelayMalformedFrameError = class extends Error {
210
+ constructor(message, options) {
211
+ super(message, options);
212
+ this.name = "SlackRelayMalformedFrameError";
213
+ }
214
+ };
209
215
  function parseRelayFrame(data) {
210
216
  const text = rawDataToString(data);
211
- return JSON.parse(text);
217
+ try {
218
+ return JSON.parse(text);
219
+ } catch (cause) {
220
+ throw new SlackRelayMalformedFrameError("Slack relay received malformed JSON frame", { cause });
221
+ }
212
222
  }
213
223
  function rawDataToString(data) {
214
224
  if (typeof data === "string") return data;
@@ -275,4 +285,4 @@ function stringValue(value) {
275
285
  return typeof value === "string" ? value : void 0;
276
286
  }
277
287
  //#endregion
278
- export { SLACK_RELAY_MAX_PAYLOAD_BYTES, buildRelayWebSocketOptions, buildRelayWebSocketUrl, monitorSlackRelaySource };
288
+ export { SLACK_RELAY_MAX_PAYLOAD_BYTES, SlackRelayMalformedFrameError, buildRelayWebSocketOptions, buildRelayWebSocketUrl, monitorSlackRelaySource, parseRelayFrame };
@@ -1,6 +1,6 @@
1
- import { a as SLACK_TEXT_LIMIT, t as resolveSlackReplyBlocks } from "./reply-blocks-BT_sNsDQ.js";
2
- import { s as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-CRoD-UQw.js";
3
- import "./provider-7YKru1TZ.js";
1
+ import { a as SLACK_TEXT_LIMIT, t as resolveSlackReplyBlocks } from "./reply-blocks-CfJqf7eq.js";
2
+ import { s as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-Dg6U9K7_.js";
3
+ import "./provider-DOZHzRWi.js";
4
4
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
5
5
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
6
6
  import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
@@ -11,6 +11,7 @@ import { createChannelExecApprovalProfile, isChannelExecApprovalClientEnabledFro
11
11
  import { channelRouteTargetsMatchExact, stringifyRouteThreadId } from "openclaw/plugin-sdk/channel-route";
12
12
  import { reduceInteractiveReply, resolveMessagePresentationControlValue } from "openclaw/plugin-sdk/interactive-runtime";
13
13
  import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
14
+ import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
14
15
  import { compileAllowlist, resolveCompiledAllowlistMatch } from "openclaw/plugin-sdk/allow-from";
15
16
  import { normalizeHyphenSlug, normalizeStringEntries as normalizeStringEntries$1, normalizeStringEntriesLower as normalizeStringEntriesLower$1 } from "openclaw/plugin-sdk/string-normalization-runtime";
16
17
  import { resolveToolsBySender } from "openclaw/plugin-sdk/channel-policy";
@@ -316,8 +317,8 @@ const SLACK_REPLY_SELECT_ACTION_ID = "openclaw:reply_select";
316
317
  function truncateSlackText(value, max) {
317
318
  const trimmed = value.trim();
318
319
  if (trimmed.length <= max) return trimmed;
319
- if (max <= 1) return trimmed.slice(0, max);
320
- return `${trimmed.slice(0, max - 1)}…`;
320
+ if (max <= 1) return sliceUtf16Safe(trimmed, 0, max);
321
+ return `${sliceUtf16Safe(trimmed, 0, max - 1)}…`;
321
322
  }
322
323
  //#endregion
323
324
  //#region extensions/slack/src/blocks-render.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { r as createSlackWebClient } from "./client-km2ba2l3.js";
2
+ import { r as createSlackWebClient } from "./client-DG9cyk55.js";
3
3
  import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-CP8SH0Zf.js";
4
4
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/slack/src/resolve-channels.ts
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { r as createSlackWebClient } from "./client-km2ba2l3.js";
2
+ import { r as createSlackWebClient } from "./client-DG9cyk55.js";
3
3
  import { n as resolveSlackAllowlistEntries, t as collectSlackCursorItems } from "./resolve-allowlist-common-CP8SH0Zf.js";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  //#region extensions/slack/src/resolve-users.ts
@@ -1,5 +1,5 @@
1
1
  import "./target-parsing-3jYH8LfB.js";
2
- import "./client-km2ba2l3.js";
2
+ import "./client-DG9cyk55.js";
3
3
  import "./config-api-DnT9ohtE.js";
4
4
  import "openclaw/plugin-sdk/account-id";
5
5
  import { createActionGate as createActionGate$1, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
@@ -1,14 +1,14 @@
1
1
  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-BPCiCe8y.js";
3
- import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-BT_sNsDQ.js";
3
+ import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-CfJqf7eq.js";
4
4
  import { n as setSlackRuntime } from "./runtime-BOk7xkOl.js";
5
- import { t as sendMessageSlack } from "./send-CRoD-UQw.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-OhnDIN4l.js";
7
- import { t as probeSlack } from "./probe-BRsYAcGR.js";
8
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
9
- import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
10
- import { t as monitorSlackProvider } from "./provider-7YKru1TZ.js";
11
- import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-DfJK7zS0.js";
12
- import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-DzOkmJVV.js";
13
- import "./monitor-Cy-0xYgF.js";
5
+ import { t as sendMessageSlack } from "./send-Dg6U9K7_.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-CqRHPciJ.js";
7
+ import { t as probeSlack } from "./probe-DFKt9Ute.js";
8
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-eniB45fy.js";
9
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-DDKzl37a.js";
10
+ import { t as monitorSlackProvider } from "./provider-DOZHzRWi.js";
11
+ import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-BLu039dd.js";
12
+ import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-DC-YA5SQ.js";
13
+ import "./monitor-Cf50drfK.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 };
@@ -1,4 +1,4 @@
1
- import { r as createSlackWebClient } from "./client-km2ba2l3.js";
1
+ import { r as createSlackWebClient } from "./client-DG9cyk55.js";
2
2
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
3
3
  import { isRecord, normalizeOptionalString, normalizeStringEntries, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/slack/src/scopes.ts
@@ -1,13 +1,14 @@
1
1
  import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-BPCiCe8y.js";
2
2
  import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
3
3
  import "./targets-Dll4NJgs.js";
4
- import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
4
+ import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-CfJqf7eq.js";
5
5
  import { t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
6
- import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-km2ba2l3.js";
6
+ import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-DG9cyk55.js";
7
7
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
8
- import { i as loadOutboundMediaFromUrl } from "./runtime-api-ClM1_yX2.js";
8
+ import { i as loadOutboundMediaFromUrl } from "./runtime-api-DHJ8ntLr.js";
9
9
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
11
+ import { markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
11
12
  import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
12
13
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
13
14
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
@@ -15,7 +16,6 @@ import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-run
15
16
  import { chunkMarkdownTextWithMode, isSilentReplyText, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
16
17
  import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
17
18
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
18
- import { markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
19
19
  import { resolveGlobalDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
20
20
  //#region extensions/slack/src/blocks-fallback.ts
21
21
  function cleanCandidate(value) {
@@ -0,0 +1,2 @@
1
+ import { t as sendMessageSlack } from "./send-Dg6U9K7_.js";
2
+ export { sendMessageSlack };
@@ -1,2 +1,2 @@
1
- import { t as slackSetupPlugin } from "./channel.setup-DYQGnKPK.js";
1
+ import { t as slackSetupPlugin } from "./channel.setup-CDOZ8V3p.js";
2
2
  export { slackSetupPlugin };
@@ -1,8 +1,8 @@
1
1
  import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-BPCiCe8y.js";
2
- import "./shared-BtJS2bUx.js";
2
+ import "./shared-iMaNxOIL.js";
3
3
  import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-BCGzyZhx.js";
4
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
5
- import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
4
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-eniB45fy.js";
5
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-DDKzl37a.js";
6
6
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
8
8
  import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken } from "openclaw/plugin-sdk/setup-runtime";
@@ -2,7 +2,7 @@ import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as
2
2
  import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
3
3
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
4
4
  import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-D-22gTp3.js";
5
- import { f as getChatChannelMeta } from "./client-km2ba2l3.js";
5
+ import { f as getChatChannelMeta } from "./client-DG9cyk55.js";
6
6
  import { i as SLACK_CHANNEL } from "./setup-core-BCGzyZhx.js";
7
7
  import { t as SlackChannelConfigSchema } from "./config-schema-BzqzFW__.js";
8
8
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-XL6HeNCb.js";
@@ -1,4 +1,4 @@
1
- import { r as deliverSlackSlashReplies$1 } from "./replies-Dlxge48k.js";
1
+ import { r as deliverSlackSlashReplies$1 } from "./replies-CMZq3Lcb.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.11-beta.2",
3
+ "version": "2026.7.1-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/slack",
9
- "version": "2026.6.11-beta.2",
9
+ "version": "2026.7.1-beta.1",
10
10
  "dependencies": {
11
11
  "@slack/bolt": "4.7.3",
12
12
  "@slack/types": "2.21.1",
@@ -16,7 +16,7 @@
16
16
  "zod": "4.4.3"
17
17
  },
18
18
  "peerDependencies": {
19
- "openclaw": ">=2026.6.11-beta.2"
19
+ "openclaw": ">=2026.7.1-beta.1"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/slack",
3
- "version": "2026.6.11-beta.2",
3
+ "version": "2026.7.1-beta.1",
4
4
  "description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,7 @@
16
16
  "zod": "4.4.3"
17
17
  },
18
18
  "peerDependencies": {
19
- "openclaw": ">=2026.6.11-beta.2"
19
+ "openclaw": ">=2026.7.1-beta.1"
20
20
  },
21
21
  "peerDependenciesMeta": {
22
22
  "openclaw": {
@@ -61,13 +61,13 @@
61
61
  "allowInvalidConfigRecovery": true
62
62
  },
63
63
  "compat": {
64
- "pluginApi": ">=2026.6.11-beta.2"
64
+ "pluginApi": ">=2026.7.1-beta.1"
65
65
  },
66
66
  "startup": {
67
67
  "deferConfiguredChannelFullLoadUntilAfterListen": true
68
68
  },
69
69
  "build": {
70
- "openclawVersion": "2026.6.11-beta.2",
70
+ "openclawVersion": "2026.7.1-beta.1",
71
71
  "bundledDist": false
72
72
  },
73
73
  "release": {
@@ -1,2 +0,0 @@
1
- import { t as handleSlackAction } from "./action-runtime-DfJK7zS0.js";
2
- export { handleSlackAction };
@@ -1,2 +0,0 @@
1
- import { t as sendMessageSlack } from "./send-CRoD-UQw.js";
2
- export { sendMessageSlack };