@openclaw/slack 2026.9.3 → 2026.9.4
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.
- package/dist/{action-runtime-CDeQkU__.js → action-runtime-B9OuFiGA.js} +4 -4
- package/dist/action-runtime.runtime-Ck8jcJV1.js +2 -0
- package/dist/{actions-NBjICINI.js → actions-mLOa06lO.js} +3 -3
- package/dist/api.js +9 -9
- package/dist/{approval-handler.runtime-Ceuqg0dX.js → approval-handler.runtime-Dg3MWNVV.js} +4 -4
- package/dist/{channel-BA3swiQP.js → channel-DFRIGeyd.js} +56 -18
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-XCgEbqUU.js → channel-type-COtzGBSC.js} +2 -2
- package/dist/{channel.setup-FuoOWjWU.js → channel.setup-DZZFSOoo.js} +16 -25
- package/dist/{directory-live-BHEVDsdG.js → directory-live-lgrHdjAZ.js} +1 -2
- package/dist/{monitor-BAZB29kR.js → monitor-f00RCEB4.js} +3 -3
- package/dist/{outbound-adapter-CvOvmMa7.js → outbound-adapter-BpbypQqC.js} +3 -3
- package/dist/{pipeline.runtime-uzM3DH1T.js → pipeline.runtime-BakleNSy.js} +11 -12
- package/dist/{policy-DzUHR8tk.js → policy-BRmkJFsS.js} +2 -2
- package/dist/{probe-DJFRGrzY.js → probe-DpWLeifT.js} +25 -1
- package/dist/{provider-BvuEcGRl.js → provider-vY0lRzNo.js} +50 -31
- package/dist/{relay-source-DARGWG1N.js → relay-source-Bsx8Gbmu.js} +1 -1
- package/dist/{replies-DnKtWYw4.js → replies-DUe6ydtU.js} +16 -28
- package/dist/{reply-blocks-DcAWH25M.js → reply-blocks-B4hOhLRu.js} +13 -12
- package/dist/{resolve-channels-Bc8m8vbt.js → resolve-channels-DrAfYhDi.js} +1 -2
- package/dist/{resolve-users-yNamAAsN.js → resolve-users-BHQ-q15T.js} +1 -2
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-A_sJNLH6.js → scopes-DhzG6IDV.js} +1 -1
- package/dist/{send-RcdbbkzS.js → send-BQ2bNPlQ.js} +2 -2
- package/dist/{send.runtime-DE7UXChq.js → send.runtime-dE3mWx2v.js} +1 -1
- package/dist/{session-status-qYGWV7LP.js → session-status-B59iRt0l.js} +2 -12
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D0eISHY2.js → setup-surface-BjCh94HU.js} +4 -4
- package/dist/{shared--uqkfibn.js → shared-DmHcvFcF.js} +2 -2
- package/dist/{slash-dispatch.runtime-CaDmjo5f.js → slash-dispatch.runtime-Dr9LEs9d.js} +1 -1
- package/openclaw.plugin.json +3 -0
- package/package.json +4 -4
- package/dist/action-runtime.runtime-C0NRFz6i.js +0 -2
- package/dist/cursor-pages-ByFwo-Py.js +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Mt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, Nt as resolveSlackAutoThreadId, ct as parseSlackBlocksInput, f as assertSlackDetachedTargetAllowed, r as buildSlackChannelIdCandidates, v as hasSlackNativeDataBlock, xt as getSlackInstallationKind } from "./session-status-
|
|
1
|
+
import { Mt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, Nt as resolveSlackAutoThreadId, ct as parseSlackBlocksInput, f as assertSlackDetachedTargetAllowed, r as buildSlackChannelIdCandidates, v as hasSlackNativeDataBlock, xt as getSlackInstallationKind } from "./session-status-B59iRt0l.js";
|
|
2
2
|
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-PbxGDbr9.js";
|
|
3
3
|
import { t as slackContextTargetsMatch } from "./targets-7FexXJ62.js";
|
|
4
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-BRmkJFsS.js";
|
|
5
5
|
import { t as mergeSlackSendResults } from "./send-results-eeOu_HYm.js";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -27,9 +27,9 @@ const pinActions = /* @__PURE__ */ new Set([
|
|
|
27
27
|
"listPins"
|
|
28
28
|
]);
|
|
29
29
|
const SLACK_REACTION_RESULT_LIMIT = 100;
|
|
30
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-
|
|
30
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-mLOa06lO.js").then((n) => n.t));
|
|
31
31
|
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts.runtime-DRuEK6mL.js"));
|
|
32
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
32
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-COtzGBSC.js").then((n) => n.t));
|
|
33
33
|
function createLazySlackAction(key) {
|
|
34
34
|
return (async (...args) => {
|
|
35
35
|
const action = (await loadSlackActionsRuntime())[key];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as resolveSlackAccount, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { A as countSlackTextUtf8Bytes, C as buildSlackBlocksFallbackText, E as SLACK_EDIT_TEXT_MAX_BYTES, M as truncateSlackTextByUtf8Bytes, Mt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, S as stripSlackNativeDataBlocks, T as renderSlackBlockFallbackText, Y as normalizeSlackOutboundText, f as assertSlackDetachedTargetAllowed, h as appendSlackNativeDataPlainTextFallback, lt as validateSlackBlocksArray, m as appendSlackNativeDataFallbackText, ot as escapeSlackMrkdwn, v as hasSlackNativeDataBlock, w as buildSlackCompleteBlocksFallbackText, y as isSlackInvalidBlocksError } from "./session-status-
|
|
3
|
+
import { A as countSlackTextUtf8Bytes, C as buildSlackBlocksFallbackText, E as SLACK_EDIT_TEXT_MAX_BYTES, M as truncateSlackTextByUtf8Bytes, Mt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, S as stripSlackNativeDataBlocks, T as renderSlackBlockFallbackText, Y as normalizeSlackOutboundText, f as assertSlackDetachedTargetAllowed, h as appendSlackNativeDataPlainTextFallback, lt as validateSlackBlocksArray, m as appendSlackNativeDataFallbackText, ot as escapeSlackMrkdwn, v as hasSlackNativeDataBlock, w as buildSlackCompleteBlocksFallbackText, y as isSlackInvalidBlocksError } from "./session-status-B59iRt0l.js";
|
|
4
4
|
import { n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
5
|
-
import {
|
|
6
|
-
import { m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-
|
|
5
|
+
import { g as getSlackWriteClient, l as createSlackLookupClient } from "./probe-DpWLeifT.js";
|
|
6
|
+
import { m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-BQ2bNPlQ.js";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { createSubsystemLogger, logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
package/dist/api.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-bbjH7IHX.js";
|
|
2
2
|
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { Nt as resolveSlackAutoThreadId, Pt as resolveSlackReplyToMode, a as resolveSlackGroupRequireMention, ct as parseSlackBlocksInput, lt as validateSlackBlocksArray, o as resolveSlackGroupToolPolicy, st as SLACK_MAX_BLOCKS } from "./session-status-
|
|
3
|
+
import { Nt as resolveSlackAutoThreadId, Pt as resolveSlackReplyToMode, a as resolveSlackGroupRequireMention, ct as parseSlackBlocksInput, lt as validateSlackBlocksArray, o as resolveSlackGroupToolPolicy, st as SLACK_MAX_BLOCKS } from "./session-status-B59iRt0l.js";
|
|
4
4
|
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
5
5
|
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
6
6
|
import "./targets-7FexXJ62.js";
|
|
7
|
-
import {
|
|
8
|
-
import { n as buildSlackThreadingToolContext, t as slackPlugin } from "./channel-
|
|
9
|
-
import {
|
|
7
|
+
import { A as resolveSlackUserAllowed, C as allowListMatches, D as normalizeSlackSlug, E as normalizeSlackAllowOwnerEntry, O as resolveSlackAllowListMatch, S as resolveSlackWriteClientOptions, T as normalizeAllowListLower, _ as SLACK_DEFAULT_RETRY_OPTIONS, f as createSlackTokenCacheKey, g as getSlackWriteClient, m as createSlackWriteClient, p as createSlackWebClient, t as probeSlack, v as SLACK_WRITE_RETRY_OPTIONS, w as normalizeAllowList, x as resolveSlackWebClientOptions } from "./probe-DpWLeifT.js";
|
|
8
|
+
import { n as buildSlackThreadingToolContext, t as slackPlugin } from "./channel-DFRIGeyd.js";
|
|
9
|
+
import { d as buildSlackPresentationBlocks, u as buildSlackInteractiveBlocks } from "./reply-blocks-B4hOhLRu.js";
|
|
10
10
|
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-uNEfQYGY.js";
|
|
11
|
-
import { n as resolveSlackChannelType } from "./channel-type-
|
|
12
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, r as downloadSlackFile, s as listSlackEmojis, u as pinSlackMessage } from "./actions-
|
|
14
|
-
import { f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, s as clearSlackThreadParticipationCache } from "./send-
|
|
11
|
+
import { n as resolveSlackChannelType } from "./channel-type-COtzGBSC.js";
|
|
12
|
+
import { t as slackSetupPlugin } from "./channel.setup-DZZFSOoo.js";
|
|
13
|
+
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, r as downloadSlackFile, s as listSlackEmojis, u as pinSlackMessage } from "./actions-mLOa06lO.js";
|
|
14
|
+
import { f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, s as clearSlackThreadParticipationCache } from "./send-BQ2bNPlQ.js";
|
|
15
15
|
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-Bmw4ykSy.js";
|
|
16
16
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-B_yKr7MW.js";
|
|
17
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
17
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-vY0lRzNo.js";
|
|
18
18
|
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, collectSlackSecurityAuditFindings, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, 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,8 @@
|
|
|
1
|
-
import { E as SLACK_EDIT_TEXT_MAX_BYTES, M as truncateSlackTextByUtf8Bytes, dt as isSlackAnyNativeApprovalClientEnabled, kt as normalizeSlackApproverId, n as setSlackSessionStatus, vt as shouldHandleSlackNativeApprovalRequest } from "./session-status-
|
|
1
|
+
import { E as SLACK_EDIT_TEXT_MAX_BYTES, M as truncateSlackTextByUtf8Bytes, dt as isSlackAnyNativeApprovalClientEnabled, kt as normalizeSlackApproverId, n as setSlackSessionStatus, vt as shouldHandleSlackNativeApprovalRequest } from "./session-status-B59iRt0l.js";
|
|
2
2
|
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as sendMessageSlack } from "./send-
|
|
3
|
+
import { h as getSlackListenerWriteClient } from "./probe-DpWLeifT.js";
|
|
4
|
+
import { h as SLACK_APPROVAL_HEADER_BLOCK_ID, o as resolveSlackReplyBlocks } from "./reply-blocks-B4hOhLRu.js";
|
|
5
|
+
import { r as sendMessageSlack } from "./send-BQ2bNPlQ.js";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
8
8
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAxZr.js";
|
|
2
2
|
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { A as countSlackTextUtf8Bytes, At as resolveSlackExecApprovalTarget, Dt as isSlackExecApprovalAuthorizedSender, E as SLACK_EDIT_TEXT_MAX_BYTES, Et as getSlackExecApprovalApprovers, Nt as resolveSlackAutoThreadId, Ot as isSlackExecApprovalClientEnabled, Pt as resolveSlackReplyToMode, St as isSlackWorkspaceInstallation, Tt as isSlackApprovalAuthorizedSender, Y as normalizeSlackOutboundText, _t as resolveTurnSourceSlackOriginTarget, a as resolveSlackGroupRequireMention, at as renderSlackMessagePresentationFallbackText, bt as slackTargetsMatch, c as qualifySlackRoutePeerId, d as resolveSlackConversationBindingRoute, dt as isSlackAnyNativeApprovalClientEnabled, f as assertSlackDetachedTargetAllowed, ft as normalizeSlackForwardTarget, gt as resolveSlackFallbackOriginTarget, ht as resolveSessionSlackOriginTarget, jt as shouldSuppressLocalSlackExecApprovalPrompt, k as SLACK_TEXT_LIMIT, mt as resolveEnterpriseApprovalTeamId, n as setSlackSessionStatus, o as resolveSlackGroupToolPolicy, pt as normalizeSlackOriginTarget, s as qualifySlackConversationId, u as normalizeSlackRouteBindingConfig, ut as hasSlackPluginApprovers, vt as shouldHandleSlackNativeApprovalRequest, wt as getSlackApprovalApproversForTeam, xt as getSlackInstallationKind, yt as shouldHandleSlackPluginViaForwardingSession } from "./session-status-
|
|
3
|
+
import { A as countSlackTextUtf8Bytes, At as resolveSlackExecApprovalTarget, Dt as isSlackExecApprovalAuthorizedSender, E as SLACK_EDIT_TEXT_MAX_BYTES, Et as getSlackExecApprovalApprovers, Nt as resolveSlackAutoThreadId, Ot as isSlackExecApprovalClientEnabled, Pt as resolveSlackReplyToMode, St as isSlackWorkspaceInstallation, Tt as isSlackApprovalAuthorizedSender, Y as normalizeSlackOutboundText, _t as resolveTurnSourceSlackOriginTarget, a as resolveSlackGroupRequireMention, at as renderSlackMessagePresentationFallbackText, bt as slackTargetsMatch, c as qualifySlackRoutePeerId, d as resolveSlackConversationBindingRoute, dt as isSlackAnyNativeApprovalClientEnabled, f as assertSlackDetachedTargetAllowed, ft as normalizeSlackForwardTarget, gt as resolveSlackFallbackOriginTarget, ht as resolveSessionSlackOriginTarget, jt as shouldSuppressLocalSlackExecApprovalPrompt, k as SLACK_TEXT_LIMIT, mt as resolveEnterpriseApprovalTeamId, n as setSlackSessionStatus, o as resolveSlackGroupToolPolicy, pt as normalizeSlackOriginTarget, s as qualifySlackConversationId, u as normalizeSlackRouteBindingConfig, ut as hasSlackPluginApprovers, vt as shouldHandleSlackNativeApprovalRequest, wt as getSlackApprovalApproversForTeam, xt as getSlackInstallationKind, yt as shouldHandleSlackPluginViaForwardingSession } from "./session-status-B59iRt0l.js";
|
|
4
4
|
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
5
5
|
import { t as slackContextTargetsMatch } from "./targets-7FexXJ62.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { g as getSlackWriteClient, l as createSlackLookupClient, o as formatSlackError, s as collectSlackCursorPages } from "./probe-DpWLeifT.js";
|
|
7
|
+
import { _ as SLACK_PRESENTATION_CAPABILITIES, a as resolveSlackReplyBlockResolution, d as buildSlackPresentationBlocks, f as canRenderSlackPresentation, o as resolveSlackReplyBlocks, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-B4hOhLRu.js";
|
|
8
8
|
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-CukseRVL.js";
|
|
9
9
|
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-uNEfQYGY.js";
|
|
10
|
-
import { a as PAIRING_APPROVED_MESSAGE, i as DEFAULT_ACCOUNT_ID$1, n as slackConfigAdapter, o as projectCredentialSnapshotFields, r as slackSecurityAdapter, s as resolveConfiguredFromRequiredCredentialStatuses, t as createSlackPluginBase } from "./shared
|
|
11
|
-
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-
|
|
10
|
+
import { a as PAIRING_APPROVED_MESSAGE, i as DEFAULT_ACCOUNT_ID$1, n as slackConfigAdapter, o as projectCredentialSnapshotFields, r as slackSecurityAdapter, s as resolveConfiguredFromRequiredCredentialStatuses, t as createSlackPluginBase } from "./shared-DmHcvFcF.js";
|
|
11
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-COtzGBSC.js";
|
|
12
12
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
13
|
-
import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-
|
|
13
|
+
import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-DZZFSOoo.js";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
15
15
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -127,6 +127,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
127
127
|
resolveApproverDmTargets: resolveSlackApproverDmTargets,
|
|
128
128
|
notifyOriginWhenDmOnly: true,
|
|
129
129
|
nativeRuntime: createLazyChannelApprovalNativeRuntimeAdapter({
|
|
130
|
+
capabilityBoundary: true,
|
|
130
131
|
eventKinds: [
|
|
131
132
|
"exec",
|
|
132
133
|
"plugin",
|
|
@@ -142,7 +143,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
142
143
|
approvalKind,
|
|
143
144
|
request
|
|
144
145
|
}),
|
|
145
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
146
|
+
load: async () => (await import("./approval-handler.runtime-Dg3MWNVV.js")).slackApprovalNativeRuntime
|
|
146
147
|
})
|
|
147
148
|
});
|
|
148
149
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -426,7 +427,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
426
427
|
"unpinMessage",
|
|
427
428
|
"uploadFile"
|
|
428
429
|
]);
|
|
429
|
-
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
430
|
+
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-Ck8jcJV1.js"));
|
|
430
431
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
431
432
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId) return;
|
|
432
433
|
return {
|
|
@@ -532,6 +533,32 @@ function inspectSlackConversationRouteOwner(params) {
|
|
|
532
533
|
};
|
|
533
534
|
}
|
|
534
535
|
//#endregion
|
|
536
|
+
//#region extensions/slack/src/enterprise-user-route.ts
|
|
537
|
+
/** Resolve a workspace for a detached Enterprise DM without opening a conversation. */
|
|
538
|
+
async function resolveSlackEnterpriseUserTeamId(params) {
|
|
539
|
+
const account = resolveSlackAccount(params);
|
|
540
|
+
if (getSlackInstallationKind(account.accountId) !== "enterprise") return;
|
|
541
|
+
const token = resolveSlackOperationToken(account, "write");
|
|
542
|
+
if (!token) throw new Error("unsupported_enterprise_slack_delivery: missing Slack sending token");
|
|
543
|
+
const client = createSlackLookupClient(token);
|
|
544
|
+
const response = await client.users.info({ user: params.userId });
|
|
545
|
+
const user = response.user;
|
|
546
|
+
if (!response.ok || !user || user.deleted || user.id !== params.userId && user.enterprise_user?.id !== params.userId) throw new Error("unsupported_enterprise_slack_delivery: could not verify Slack recipient");
|
|
547
|
+
const memberTeamIds = new Set(user.enterprise_user?.teams ?? []);
|
|
548
|
+
const teamId = (await collectSlackCursorPages({
|
|
549
|
+
fetchPage: (cursor) => client.auth.teams.list({
|
|
550
|
+
limit: 1e3,
|
|
551
|
+
cursor
|
|
552
|
+
}),
|
|
553
|
+
collectPageItems: (page) => {
|
|
554
|
+
if (!page.ok) throw new Error("unsupported_enterprise_slack_delivery: could not verify Slack workspaces");
|
|
555
|
+
return (page.teams ?? []).flatMap((team) => team.id && /^T[A-Z0-9]+$/.test(team.id) ? [team.id] : []);
|
|
556
|
+
}
|
|
557
|
+
})).filter((id) => memberTeamIds.has(id)).toSorted()[0];
|
|
558
|
+
if (!teamId) throw new Error("unsupported_enterprise_slack_delivery: recipient shares no verified installed workspace");
|
|
559
|
+
return teamId;
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
535
562
|
//#region extensions/slack/src/threading-tool-context.ts
|
|
536
563
|
function buildSlackThreadingToolContext(params) {
|
|
537
564
|
const account = resolveSlackAccount({
|
|
@@ -568,9 +595,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
568
595
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
569
596
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
570
597
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
571
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
572
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
573
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
598
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-BjCh94HU.js"));
|
|
599
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-DhzG6IDV.js"));
|
|
600
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BpbypQqC.js"));
|
|
574
601
|
async function resolveSlackHandleAction() {
|
|
575
602
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
576
603
|
}
|
|
@@ -578,13 +605,13 @@ function shouldTreatSlackDeliveredTextAsVisible(params) {
|
|
|
578
605
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
579
606
|
}
|
|
580
607
|
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-Bmw4ykSy.js").then((n) => n.t));
|
|
581
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
582
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
583
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
584
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
585
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
586
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
587
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
608
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DrAfYhDi.js").then((n) => n.n));
|
|
609
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-BHQ-q15T.js").then((n) => n.n));
|
|
610
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-Ck8jcJV1.js"));
|
|
611
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-dE3mWx2v.js"));
|
|
612
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-DpWLeifT.js").then((n) => n.n));
|
|
613
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-f00RCEB4.js").then((n) => n.t));
|
|
614
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-lgrHdjAZ.js").then((n) => n.t));
|
|
588
615
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
589
616
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
590
617
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -661,6 +688,17 @@ async function resolveSlackOutboundSessionRoute(params) {
|
|
|
661
688
|
if (!parsed) return null;
|
|
662
689
|
const apiTargetId = canonicalizeSlackApiTargetId(parsed.kind, parsed.id, params.target);
|
|
663
690
|
const isDm = parsed.kind === "user";
|
|
691
|
+
if (params.deliveryPurpose === "heartbeat-owner" && isDm && !parsed.teamId && /^[UW][A-Z0-9]{8,}$/.test(apiTargetId)) {
|
|
692
|
+
const teamId = await resolveSlackEnterpriseUserTeamId({
|
|
693
|
+
cfg: params.cfg,
|
|
694
|
+
accountId: params.accountId,
|
|
695
|
+
userId: apiTargetId
|
|
696
|
+
});
|
|
697
|
+
if (teamId) {
|
|
698
|
+
parsed.teamId = teamId;
|
|
699
|
+
parsed.id = apiTargetId;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
664
702
|
let peerKind = isDm ? "direct" : "channel";
|
|
665
703
|
let peerId = formatSlackTarget(parsed);
|
|
666
704
|
let recipientSessionExact = isDm ? /^[UW][A-Z0-9]{8,}$/i.test(parsed.id) : /^C[A-Z0-9]{8,}$/i.test(parsed.id);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-DFRIGeyd.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { f as assertSlackDetachedTargetAllowed } from "./session-status-
|
|
4
|
-
import {
|
|
3
|
+
import { f as assertSlackDetachedTargetAllowed } from "./session-status-B59iRt0l.js";
|
|
4
|
+
import { T as normalizeAllowListLower, p as createSlackWebClient, u as createSlackReadClient } from "./probe-DpWLeifT.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -8,6 +8,7 @@ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "op
|
|
|
8
8
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
9
9
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
10
10
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
11
|
+
import { patchTopLevelChannelConfigSection } from "openclaw/plugin-sdk/setup";
|
|
11
12
|
import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createPatchedAccountSetupAdapter, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
12
13
|
import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
13
14
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -158,35 +159,25 @@ function setSlackSetupIdentity(params) {
|
|
|
158
159
|
if (params.identity === "user") return next;
|
|
159
160
|
const slack = next.channels?.slack;
|
|
160
161
|
if (!slack) return next;
|
|
161
|
-
if (params.accountId === DEFAULT_ACCOUNT_ID) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
...next.channels,
|
|
168
|
-
slack: nextSlack
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
}
|
|
162
|
+
if (params.accountId === DEFAULT_ACCOUNT_ID) return patchTopLevelChannelConfigSection({
|
|
163
|
+
cfg: next,
|
|
164
|
+
channel: SLACK_CHANNEL,
|
|
165
|
+
clearFields: ["postAs"],
|
|
166
|
+
patch: {}
|
|
167
|
+
});
|
|
172
168
|
const account = slack.accounts?.[params.accountId];
|
|
173
169
|
if (!account) return next;
|
|
174
170
|
const nextAccount = { ...account };
|
|
175
171
|
if (slack.postAs === "user") nextAccount.postAs = "bot";
|
|
176
172
|
else delete nextAccount.postAs;
|
|
177
|
-
return {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
slack
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
[params.accountId]: nextAccount
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
};
|
|
173
|
+
return patchTopLevelChannelConfigSection({
|
|
174
|
+
cfg: next,
|
|
175
|
+
channel: SLACK_CHANNEL,
|
|
176
|
+
patch: { accounts: {
|
|
177
|
+
...slack.accounts,
|
|
178
|
+
[params.accountId]: nextAccount
|
|
179
|
+
} }
|
|
180
|
+
});
|
|
190
181
|
}
|
|
191
182
|
function createSlackTokenCredential(params) {
|
|
192
183
|
return defineTokenCredential({
|
|
@@ -558,7 +549,7 @@ const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
558
549
|
});
|
|
559
550
|
//#endregion
|
|
560
551
|
//#region extensions/slack/src/channel.setup.ts
|
|
561
|
-
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-
|
|
552
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-BjCh94HU.js")).slackSetupWizard }));
|
|
562
553
|
const slackSetupPlugin = {
|
|
563
554
|
id: SLACK_CHANNEL,
|
|
564
555
|
meta: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as resolveSlackAccount } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as fetchSlackChannelListPage, t as collectSlackCursorPages } from "./cursor-pages-ByFwo-Py.js";
|
|
3
|
+
import { c as fetchSlackChannelListPage, l as createSlackLookupClient, s as collectSlackCursorPages } from "./probe-DpWLeifT.js";
|
|
5
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
5
|
//#region extensions/slack/src/directory-live.ts
|
|
7
6
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { M as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { a as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { M as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-vY0lRzNo.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-BRmkJFsS.js";
|
|
4
|
+
import { a as resolveSlackThreadTs } from "./replies-DUe6ydtU.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { K as resolveSlackQuestionActionIds, R as SLACK_QUESTION_FINALIZATION_BLOCKS, f as assertSlackDetachedTargetAllowed, k as SLACK_TEXT_LIMIT, ot as escapeSlackMrkdwn } from "./session-status-
|
|
2
|
+
import { K as resolveSlackQuestionActionIds, R as SLACK_QUESTION_FINALIZATION_BLOCKS, f as assertSlackDetachedTargetAllowed, k as SLACK_TEXT_LIMIT, ot as escapeSlackMrkdwn } from "./session-status-B59iRt0l.js";
|
|
3
3
|
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as SLACK_PRESENTATION_CAPABILITIES, a as resolveSlackReplyBlockResolution, l as resolveSlackAuthoredTextPlacement, r as parseSlackReplyBlockSegments, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-B4hOhLRu.js";
|
|
5
5
|
import { r as resolveSlackThreadTsValue } from "./thread-ts-CukseRVL.js";
|
|
6
6
|
import { t as mergeSlackSendResults } from "./send-results-eeOu_HYm.js";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -52,7 +52,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
55
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-dE3mWx2v.js"));
|
|
56
56
|
function resolveSlackSendIdentity(identity) {
|
|
57
57
|
if (!identity) return;
|
|
58
58
|
const username = normalizeOptionalString(identity.name);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as countSlackTextUtf8Bytes, C as buildSlackBlocksFallbackText, E as SLACK_EDIT_TEXT_MAX_BYTES, H as SLACK_SESSION_LINK_ACTION_ID, M as truncateSlackTextByUtf8Bytes, Pt as resolveSlackReplyToMode, Y as normalizeSlackOutboundText, c as qualifySlackRoutePeerId, j as truncateSlackText, k as SLACK_TEXT_LIMIT, ot as escapeSlackMrkdwn, v as hasSlackNativeDataBlock } from "./session-status-
|
|
1
|
+
import { A as countSlackTextUtf8Bytes, C as buildSlackBlocksFallbackText, E as SLACK_EDIT_TEXT_MAX_BYTES, H as SLACK_SESSION_LINK_ACTION_ID, M as truncateSlackTextByUtf8Bytes, Pt as resolveSlackReplyToMode, Y as normalizeSlackOutboundText, c as qualifySlackRoutePeerId, j as truncateSlackText, k as SLACK_TEXT_LIMIT, ot as escapeSlackMrkdwn, v as hasSlackNativeDataBlock } from "./session-status-B59iRt0l.js";
|
|
2
2
|
import { n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { E as normalizeSlackAllowOwnerEntry, O as resolveSlackAllowListMatch, T as normalizeAllowListLower, o as formatSlackError } from "./probe-DpWLeifT.js";
|
|
4
|
+
import { c as resolveSlackReplyRenderPlan, i as prepareSlackReply } from "./reply-blocks-B4hOhLRu.js";
|
|
5
5
|
import { n as resolveSlackReplyThreadTs } from "./thread-ts-CukseRVL.js";
|
|
6
6
|
import { n as resolveSlackStreamingMode, t as resolveSlackNativeStreaming } from "./streaming-compat-B-e0mqM0.js";
|
|
7
|
-
import { D as resolveSlackMessageText$1, E as resolveSlackBlocksText, O as buildSlackEditTextPayload, S as formatSlackFileReferenceList, T as isSlackUnfurlAttachment, a as editSlackRenderedMessage, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage, v as logVerbose$1, w as hasSlackTableBlock, x as formatSlackFileReference } from "./actions-
|
|
8
|
-
import { c as hasSlackThreadFailureNotice, d as recordSlackThreadFailureNotice, f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, m as buildSlackNativeDataDeliveryPlan, o as clearSlackThreadFailureNotice, r as sendMessageSlack, u as hasSlackThreadParticipationWithPersistence } from "./send-
|
|
9
|
-
import { A as resolveStorePath, C as resolveSlackChatType, D as readSessionUpdatedAt, E as getSessionEntry, N as stripSlackMentionsForCommandDetection, O as resolveChannelContextVisibilityMode, S as normalizeSlackChannelType, T as readSlackAssistantThreadContext, _ as SlackStreamNotDeliveredError, b as startSlackStream, d as resolveSlackRoutingContext, f as registerSlackSessionRun, g as resolveSlackEffectiveAllowFrom, h as resolveSlackCommandIngress, j as updateLastRoute, k as resolveChannelResetConfig, l as authorizeSlackDirectMessage, m as authorizeSlackBotRoomMessage, o as resolveSlackRoomContextHints, p as resolveSlackThreadTargets, r as trackSlackDraftMessage, u as resolveConversationLabel$1, v as appendSlackStream, w as buildSlackAssistantThreadMetadata, x as stopSlackStream, y as markSlackStreamFallbackDelivered } from "./provider-
|
|
10
|
-
import { n as resolveSlackChannelConfig } from "./policy-
|
|
11
|
-
import { a as resolveSlackThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as sanitizeSlackMonitorReplyPayload, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
7
|
+
import { D as resolveSlackMessageText$1, E as resolveSlackBlocksText, O as buildSlackEditTextPayload, S as formatSlackFileReferenceList, T as isSlackUnfurlAttachment, a as editSlackRenderedMessage, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage, v as logVerbose$1, w as hasSlackTableBlock, x as formatSlackFileReference } from "./actions-mLOa06lO.js";
|
|
8
|
+
import { c as hasSlackThreadFailureNotice, d as recordSlackThreadFailureNotice, f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, m as buildSlackNativeDataDeliveryPlan, o as clearSlackThreadFailureNotice, r as sendMessageSlack, u as hasSlackThreadParticipationWithPersistence } from "./send-BQ2bNPlQ.js";
|
|
9
|
+
import { A as resolveStorePath, C as resolveSlackChatType, D as readSessionUpdatedAt, E as getSessionEntry, N as stripSlackMentionsForCommandDetection, O as resolveChannelContextVisibilityMode, S as normalizeSlackChannelType, T as readSlackAssistantThreadContext, _ as SlackStreamNotDeliveredError, b as startSlackStream, d as resolveSlackRoutingContext, f as registerSlackSessionRun, g as resolveSlackEffectiveAllowFrom, h as resolveSlackCommandIngress, j as updateLastRoute, k as resolveChannelResetConfig, l as authorizeSlackDirectMessage, m as authorizeSlackBotRoomMessage, o as resolveSlackRoomContextHints, p as resolveSlackThreadTargets, r as trackSlackDraftMessage, u as resolveConversationLabel$1, v as appendSlackStream, w as buildSlackAssistantThreadMetadata, x as stopSlackStream, y as markSlackStreamFallbackDelivered } from "./provider-vY0lRzNo.js";
|
|
10
|
+
import { n as resolveSlackChannelConfig } from "./policy-BRmkJFsS.js";
|
|
11
|
+
import { a as resolveSlackThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as sanitizeSlackMonitorReplyPayload, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-DUe6ydtU.js";
|
|
12
12
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
13
|
import { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
14
14
|
import { buildChannelProgressDraftLine, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createChannelProgressWorkCounter, createDraftStreamLoop, createFinalizableDraftStreamControlsForState, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftDiffStat, formatChannelProgressDraftText, formatPlanChecklistLines, resolveAgentOutboundIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftConfig, resolveChannelProgressDraftMaxLineChars, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -2725,7 +2725,7 @@ const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
|
|
|
2725
2725
|
const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
|
|
2726
2726
|
const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
|
|
2727
2727
|
const MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS = 2e3;
|
|
2728
|
-
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-
|
|
2728
|
+
const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-mLOa06lO.js").then((n) => n._));
|
|
2729
2729
|
function formatSlackUnavailableMedia(params) {
|
|
2730
2730
|
let fileReferences = params.files?.map((file) => `${formatSlackFileReference(file)} unavailable (${file.reason})`).join(", ");
|
|
2731
2731
|
if (fileReferences && fileReferences.length > MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS) fileReferences = `${truncateUtf16Safe(fileReferences, MAX_SLACK_UNAVAILABLE_FILE_TEXT_CHARS)}; … (file references truncated)`;
|
|
@@ -2979,7 +2979,7 @@ function formatSlackThreadLabelSnippet(text) {
|
|
|
2979
2979
|
}
|
|
2980
2980
|
//#endregion
|
|
2981
2981
|
//#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
|
|
2982
|
-
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-
|
|
2982
|
+
const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-mLOa06lO.js").then((n) => n._));
|
|
2983
2983
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
2984
2984
|
function resolveSlackThreadSessionFreshness(params) {
|
|
2985
2985
|
return params.ctx.channelRuntime?.session?.resolveEntryResetFreshness?.({
|
|
@@ -4054,8 +4054,7 @@ async function prepareSlackMessage(params) {
|
|
|
4054
4054
|
shouldBypassMention
|
|
4055
4055
|
}));
|
|
4056
4056
|
const ackReactionMessageTs = message.ts;
|
|
4057
|
-
const
|
|
4058
|
-
const shouldSendAckReaction = shouldAckReaction$1() && (!sourceRepliesAreToolOnly || allowToolOnlyStatusReaction || isRoomEvent);
|
|
4057
|
+
const shouldSendAckReaction = shouldAckReaction$1() && (!sourceRepliesAreToolOnly || effectiveWasMentioned || shouldBypassMention || isRoomEvent);
|
|
4059
4058
|
const statusReactionsWillHandle = Boolean(ackReactionMessageTs) && !isRoomEvent && statusReactionsExplicitlyEnabled && shouldSendAckReaction;
|
|
4060
4059
|
const ackReactionPromise = !statusReactionsWillHandle && shouldSendAckReaction && ackReactionMessageTs && ackReactionValue ? reactSlackMessage(message.channel, ackReactionMessageTs, ackReactionValue, {
|
|
4061
4060
|
token: ctx.botToken,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as buildSlackChannelPolicyScope, r as buildSlackChannelIdCandidates } from "./session-status-
|
|
2
|
-
import { D as
|
|
1
|
+
import { i as buildSlackChannelPolicyScope, r as buildSlackChannelIdCandidates } from "./session-status-B59iRt0l.js";
|
|
2
|
+
import { D as normalizeSlackSlug, k as resolveSlackUserAllowListForTeam } from "./probe-DpWLeifT.js";
|
|
3
3
|
import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
4
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
5
5
|
//#region extensions/slack/src/monitor/channel-config.ts
|
|
@@ -319,6 +319,30 @@ function getSlackListenerWriteClient(params) {
|
|
|
319
319
|
return client;
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
|
+
//#region extensions/slack/src/cursor-pages.ts
|
|
323
|
+
const SLACK_CURSOR_PAGE_LIMIT = 1e4;
|
|
324
|
+
const fetchSlackChannelListPage = (client, cursor) => client.conversations.list({
|
|
325
|
+
types: "public_channel,private_channel",
|
|
326
|
+
exclude_archived: false,
|
|
327
|
+
limit: 1e3,
|
|
328
|
+
cursor
|
|
329
|
+
});
|
|
330
|
+
async function collectSlackCursorPages(params) {
|
|
331
|
+
const items = [];
|
|
332
|
+
let cursor;
|
|
333
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
334
|
+
for (let pageCount = 1; pageCount <= SLACK_CURSOR_PAGE_LIMIT; pageCount += 1) {
|
|
335
|
+
const response = await params.fetchPage(cursor);
|
|
336
|
+
items.push(...params.collectPageItems(response));
|
|
337
|
+
const nextCursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
338
|
+
if (!nextCursor) return items;
|
|
339
|
+
if (seenCursors.has(nextCursor)) throw new Error(`Slack cursor pagination repeated a cursor after ${pageCount} pages`);
|
|
340
|
+
seenCursors.add(nextCursor);
|
|
341
|
+
cursor = nextCursor;
|
|
342
|
+
}
|
|
343
|
+
throw new Error(`Slack cursor pagination exceeded ${SLACK_CURSOR_PAGE_LIMIT} pages`);
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
322
346
|
//#region extensions/slack/src/errors.ts
|
|
323
347
|
const NO_ERROR_DETAIL = "no error detail";
|
|
324
348
|
function redact(value) {
|
|
@@ -582,4 +606,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
582
606
|
}));
|
|
583
607
|
}
|
|
584
608
|
//#endregion
|
|
585
|
-
export {
|
|
609
|
+
export { resolveSlackUserAllowed as A, allowListMatches as C, normalizeSlackSlug as D, normalizeSlackAllowOwnerEntry as E, resolveSlackAllowListMatch as O, resolveSlackWriteClientOptions as S, normalizeAllowListLower as T, SLACK_DEFAULT_RETRY_OPTIONS as _, slackIngressIdentity as a, resolveSlackProxyDispatcher as b, fetchSlackChannelListPage as c, createSlackStartupAuthClient as d, createSlackTokenCacheKey as f, getSlackWriteClient as g, getSlackListenerWriteClient as h, createSlackIngressSubject as i, resolveSlackUserAllowListForTeam as k, createSlackLookupClient as l, createSlackWriteClient as m, probe_exports as n, formatSlackError as o, createSlackWebClient as p, SLACK_USER_NAME_KIND as r, collectSlackCursorPages as s, probeSlack as t, createSlackReadClient as u, SLACK_WRITE_RETRY_OPTIONS as v, normalizeAllowList as w, resolveSlackWebClientOptions as x, resolveSlackLookupClientOptions as y };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
|
|
2
2
|
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { Ct as registerSlackInstallationState, Dt as isSlackExecApprovalAuthorizedSender, G as isSlackQuestionActionId, Pt as resolveSlackReplyToMode, Tt as isSlackApprovalAuthorizedSender, U as isSlackApprovalActionId, W as isSlackCallbackActionId, c as qualifySlackRoutePeerId, d as resolveSlackConversationBindingRoute, dt as isSlackAnyNativeApprovalClientEnabled, j as truncateSlackText, k as SLACK_TEXT_LIMIT, l as resolveSlackEnterpriseMainDmSessionKey, n as setSlackSessionStatus, ot as escapeSlackMrkdwn, r as buildSlackChannelIdCandidates, s as qualifySlackConversationId, t as renameSlackSession, u as normalizeSlackRouteBindingConfig } from "./session-status-
|
|
3
|
+
import { Ct as registerSlackInstallationState, Dt as isSlackExecApprovalAuthorizedSender, G as isSlackQuestionActionId, Pt as resolveSlackReplyToMode, Tt as isSlackApprovalAuthorizedSender, U as isSlackApprovalActionId, W as isSlackCallbackActionId, c as qualifySlackRoutePeerId, d as resolveSlackConversationBindingRoute, dt as isSlackAnyNativeApprovalClientEnabled, j as truncateSlackText, k as SLACK_TEXT_LIMIT, l as resolveSlackEnterpriseMainDmSessionKey, n as setSlackSessionStatus, ot as escapeSlackMrkdwn, r as buildSlackChannelIdCandidates, s as qualifySlackConversationId, t as renameSlackSession, u as normalizeSlackRouteBindingConfig } from "./session-status-B59iRt0l.js";
|
|
4
4
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
5
|
+
import { C as allowListMatches, D as normalizeSlackSlug, E as normalizeSlackAllowOwnerEntry, O as resolveSlackAllowListMatch, T as normalizeAllowListLower, a as slackIngressIdentity, b as resolveSlackProxyDispatcher, d as createSlackStartupAuthClient, h as getSlackListenerWriteClient, i as createSlackIngressSubject, k as resolveSlackUserAllowListForTeam, o as formatSlackError, p as createSlackWebClient, s as collectSlackCursorPages, w as normalizeAllowList, x as resolveSlackWebClientOptions, y as resolveSlackLookupClientOptions } from "./probe-DpWLeifT.js";
|
|
6
|
+
import { g as decodeSlackApprovalAction, m as resolveSlackQuestionAction, p as decodeSlackQuestionAction } from "./reply-blocks-B4hOhLRu.js";
|
|
7
7
|
import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
8
|
-
import { C as hasSlackMessageTableBlock, b as saveRemoteMedia, f as readSlackMessages, y as isGovSlackClient } from "./actions-
|
|
9
|
-
import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-DzUHR8tk.js";
|
|
8
|
+
import { C as hasSlackMessageTableBlock, b as saveRemoteMedia, f as readSlackMessages, y as isGovSlackClient } from "./actions-mLOa06lO.js";
|
|
9
|
+
import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-BQ2bNPlQ.js";
|
|
10
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DrAfYhDi.js";
|
|
11
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BHQ-q15T.js";
|
|
12
|
+
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-BRmkJFsS.js";
|
|
14
13
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
15
14
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
16
15
|
import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -37,7 +36,6 @@ import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
|
37
36
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
38
37
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
39
38
|
import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history";
|
|
40
|
-
import { installRequestBodyLimitGuard } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
41
39
|
import { createRuntimeConfigReader, getRuntimeConfig, getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
42
40
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
43
41
|
import { getConversationSession, getSessionEntry, getSessionEntry as getSessionEntry$1, readSessionUpdatedAt, resolveChannelResetConfig, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
|
|
@@ -55,6 +53,8 @@ import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway
|
|
|
55
53
|
import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
|
|
56
54
|
import { createChannelInteractiveDispatcher } from "openclaw/plugin-sdk/plugin-runtime";
|
|
57
55
|
import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
|
|
56
|
+
import { finished } from "node:stream/promises";
|
|
57
|
+
import { beginWebhookRequestPipelineOrReject, createWebhookInFlightLimiter, readWebhookBodyOrReject } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
58
58
|
import { createChannelInboundDebouncer, resolveInboundDebounceMs, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
59
59
|
import { createChannelReplayGuard, runClaimableDedupeClaimLoop } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
60
60
|
import { channelBlockedPatch, channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
@@ -2144,7 +2144,7 @@ const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
|
|
|
2144
2144
|
const SLACK_HEADER_TEXT_MAX = 150;
|
|
2145
2145
|
const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
|
|
2146
2146
|
const loadSlashCommandsRuntime = createLazyRuntimeModule(() => import("./slash-commands.runtime-BTTMlmwy.js"));
|
|
2147
|
-
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-
|
|
2147
|
+
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-Dr9LEs9d.js"));
|
|
2148
2148
|
const loadSlashSkillCommandsRuntime = createLazyRuntimeModule(() => import("./slash-skill-commands.runtime-CD1J2ODY.js"));
|
|
2149
2149
|
const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
|
|
2150
2150
|
function resolveSlackCommandMenuModelContext(params) {
|
|
@@ -5928,6 +5928,39 @@ function registerSlackWorkspaceEvents(params) {
|
|
|
5928
5928
|
});
|
|
5929
5929
|
}
|
|
5930
5930
|
//#endregion
|
|
5931
|
+
//#region extensions/slack/src/monitor/http-handler.ts
|
|
5932
|
+
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1048576;
|
|
5933
|
+
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
5934
|
+
function createSlackHttpRequestHandler(params) {
|
|
5935
|
+
const inFlightLimiter = createWebhookInFlightLimiter();
|
|
5936
|
+
const inFlightKey = `slack:${params.accountId}`;
|
|
5937
|
+
return async (req, res) => {
|
|
5938
|
+
const lifecycle = beginWebhookRequestPipelineOrReject({
|
|
5939
|
+
req,
|
|
5940
|
+
res,
|
|
5941
|
+
allowMethods: ["POST"],
|
|
5942
|
+
inFlightLimiter,
|
|
5943
|
+
inFlightKey
|
|
5944
|
+
});
|
|
5945
|
+
if (!lifecycle.ok) return;
|
|
5946
|
+
try {
|
|
5947
|
+
const body = await readWebhookBodyOrReject({
|
|
5948
|
+
req,
|
|
5949
|
+
res,
|
|
5950
|
+
maxBytes: SLACK_WEBHOOK_MAX_BODY_BYTES,
|
|
5951
|
+
timeoutMs: SLACK_WEBHOOK_BODY_TIMEOUT_MS,
|
|
5952
|
+
profile: "pre-auth"
|
|
5953
|
+
});
|
|
5954
|
+
if (!body.ok) return;
|
|
5955
|
+
Object.assign(req, { rawBody: Buffer.from(body.value) });
|
|
5956
|
+
params.receiver.requestListener(req, res);
|
|
5957
|
+
await finished(res, { cleanup: true }).catch(() => void 0);
|
|
5958
|
+
} finally {
|
|
5959
|
+
lifecycle.release();
|
|
5960
|
+
}
|
|
5961
|
+
};
|
|
5962
|
+
}
|
|
5963
|
+
//#endregion
|
|
5931
5964
|
//#region extensions/slack/src/monitor/message-dispatch-dedupe.ts
|
|
5932
5965
|
const SLACK_MESSAGE_DISPATCH_DEDUPE_TTL_MS = 864e5;
|
|
5933
5966
|
const SLACK_MESSAGE_DISPATCH_DEDUPE_MEMORY_MAX_ENTRIES = 2e4;
|
|
@@ -5996,7 +6029,7 @@ function buildSlackDebounceKey(message, accountId, teamId) {
|
|
|
5996
6029
|
}
|
|
5997
6030
|
//#endregion
|
|
5998
6031
|
//#region extensions/slack/src/monitor/message-handler.ts
|
|
5999
|
-
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-
|
|
6032
|
+
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-BakleNSy.js"));
|
|
6000
6033
|
const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
|
|
6001
6034
|
const RETRYABLE_FLUSH_RETRY_DELAY_MS = 1e3;
|
|
6002
6035
|
const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /reply session initialization conflicted for \S+/u;
|
|
@@ -6831,9 +6864,7 @@ async function getSlackBoltInterop() {
|
|
|
6831
6864
|
}
|
|
6832
6865
|
return slackBoltInterop;
|
|
6833
6866
|
}
|
|
6834
|
-
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-
|
|
6835
|
-
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1048576;
|
|
6836
|
-
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
6867
|
+
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-Bsx8Gbmu.js"));
|
|
6837
6868
|
function resolveSlackRuntimeIdentity(params) {
|
|
6838
6869
|
const botUserId = normalizeOptionalString(params.botUserId);
|
|
6839
6870
|
const botId = normalizeOptionalString(params.botId);
|
|
@@ -7050,22 +7081,10 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
7050
7081
|
const gracefulStop = async () => {
|
|
7051
7082
|
await gracefulStopSlackApp(app);
|
|
7052
7083
|
};
|
|
7053
|
-
const slackHttpHandler = slackMode === "http" && receiver ?
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
timeoutMs: SLACK_WEBHOOK_BODY_TIMEOUT_MS,
|
|
7058
|
-
responseFormat: "text"
|
|
7059
|
-
});
|
|
7060
|
-
if (guard.isTripped()) return;
|
|
7061
|
-
try {
|
|
7062
|
-
await Promise.resolve(httpReceiver.requestListener(req, res));
|
|
7063
|
-
} catch (err) {
|
|
7064
|
-
if (!guard.isTripped()) throw err;
|
|
7065
|
-
} finally {
|
|
7066
|
-
guard.dispose();
|
|
7067
|
-
}
|
|
7068
|
-
} : null;
|
|
7084
|
+
const slackHttpHandler = slackMode === "http" && receiver ? createSlackHttpRequestHandler({
|
|
7085
|
+
receiver,
|
|
7086
|
+
accountId: account.accountId
|
|
7087
|
+
}) : null;
|
|
7069
7088
|
let unregisterHttpHandler = null;
|
|
7070
7089
|
const unregisterSocketModeConnectionDiagnostics = slackMode === "socket" ? registerSlackSocketModeConnectionDiagnostics({
|
|
7071
7090
|
app,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as formatUnknownError, i as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-
|
|
1
|
+
import { a as formatUnknownError, i as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-vY0lRzNo.js";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
4
4
|
import { isIP } from "node:net";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as buildSlackBlocksFallbackText, J as markdownToSlackMrkdwnChunks, b as isSlackInvalidBlocksResponse, g as buildSlackNativeDataAccessibilityText, k as SLACK_TEXT_LIMIT, v as hasSlackNativeDataBlock, x as isSlackNativeResponseUrlRejection } from "./session-status-
|
|
2
|
-
import { a as
|
|
1
|
+
import { C as buildSlackBlocksFallbackText, J as markdownToSlackMrkdwnChunks, b as isSlackInvalidBlocksResponse, g as buildSlackNativeDataAccessibilityText, k as SLACK_TEXT_LIMIT, v as hasSlackNativeDataBlock, x as isSlackNativeResponseUrlRejection } from "./session-status-B59iRt0l.js";
|
|
2
|
+
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, o as resolveSlackReplyBlocks, t as hasSlackReplyStructuredContent } from "./reply-blocks-B4hOhLRu.js";
|
|
3
3
|
import { n as resolveSlackReplyThreadTs } from "./thread-ts-CukseRVL.js";
|
|
4
|
-
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-
|
|
5
|
-
import { c as createSlackResponseUrlBudget, s as SlackResponseAlreadyReportedError } from "./provider-
|
|
4
|
+
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-BQ2bNPlQ.js";
|
|
5
|
+
import { c as createSlackResponseUrlBudget, s as SlackResponseAlreadyReportedError } from "./provider-vY0lRzNo.js";
|
|
6
6
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
7
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
8
8
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -226,13 +226,14 @@ async function deliverReplies(params) {
|
|
|
226
226
|
});
|
|
227
227
|
delivered ||= mediaDelivery !== "empty";
|
|
228
228
|
}
|
|
229
|
-
for (const
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
for (const message of iterateSlackReplyDeliveryMessages({
|
|
230
|
+
authoredTextPlacement,
|
|
231
|
+
segments,
|
|
232
|
+
text: outsideText
|
|
233
|
+
})) {
|
|
234
|
+
hookParts.push(message.text);
|
|
235
|
+
if (message.textIsSlackPlainText) {
|
|
236
|
+
for (const chunk of chunkSlackTextAtHardLimit(message.text)) {
|
|
236
237
|
lastResult = await sendReply({
|
|
237
238
|
text: chunk,
|
|
238
239
|
threadTs,
|
|
@@ -242,24 +243,11 @@ async function deliverReplies(params) {
|
|
|
242
243
|
}
|
|
243
244
|
continue;
|
|
244
245
|
}
|
|
245
|
-
const baseText = outsideText;
|
|
246
|
-
outsideText = "";
|
|
247
|
-
const accessibilityText = buildSlackNativeDataAccessibilityText(baseText, segment.blocks) || buildSlackBlocksFallbackText(segment.blocks);
|
|
248
|
-
hookParts.push(accessibilityText);
|
|
249
|
-
const segmentPlacement = baseText ? "outside-blocks" : authoredTextPlacement === "blocks" ? "blocks" : "none";
|
|
250
|
-
lastResult = await sendReply({
|
|
251
|
-
text: baseText,
|
|
252
|
-
threadTs,
|
|
253
|
-
blocks: segment.blocks,
|
|
254
|
-
authoredTextPlacement: segmentPlacement,
|
|
255
|
-
...baseText ? { nativeDataFallbackBaseText: baseText } : {}
|
|
256
|
-
});
|
|
257
|
-
delivered = true;
|
|
258
|
-
}
|
|
259
|
-
if (outsideText && !reply.hasMedia) {
|
|
260
|
-
hookParts.push(outsideText);
|
|
261
246
|
lastResult = await sendReply({
|
|
262
|
-
|
|
247
|
+
...message.blocks ? {
|
|
248
|
+
...message,
|
|
249
|
+
text: message.nativeDataFallbackBaseText ?? ""
|
|
250
|
+
} : { text: message.text },
|
|
263
251
|
threadTs
|
|
264
252
|
});
|
|
265
253
|
delivered = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as SLACK_REPLY_LINK_ACTION_ID, C as buildSlackBlocksFallbackText, F as SLACK_CALLBACK_BUTTON_ACTION_ID, I as SLACK_CALLBACK_SELECT_ACTION_ID, J as markdownToSlackMrkdwnChunks, L as SLACK_QUESTION_BUTTON_ACTION_ID, N as SLACK_APPROVAL_BUTTON_ACTION_ID, P as SLACK_APPROVAL_SELECT_ACTION_ID, Q as hasSlackDataVisualizationBlock, T as renderSlackBlockFallbackText, V as SLACK_REPLY_SELECT_ACTION_ID, X as buildSlackDataVisualizationBlock, Z as canRenderSlackDataVisualization, at as renderSlackMessagePresentationFallbackText, ct as parseSlackBlocksInput, et as buildSlackDataTableBlock, g as buildSlackNativeDataAccessibilityText, it as renderSlackMessagePresentationChartFallbackText, j as truncateSlackText, m as appendSlackNativeDataFallbackText, nt as countSlackDataTableCellCharacters, q as chunkSlackMrkdwnText, rt as resolveSlackDataTableCellCharacterCount, tt as countSlackDataTableBlocksCellCharacters, v as hasSlackNativeDataBlock, z as SLACK_REPLY_BUTTON_ACTION_ID } from "./session-status-
|
|
1
|
+
import { B as SLACK_REPLY_LINK_ACTION_ID, C as buildSlackBlocksFallbackText, F as SLACK_CALLBACK_BUTTON_ACTION_ID, I as SLACK_CALLBACK_SELECT_ACTION_ID, J as markdownToSlackMrkdwnChunks, L as SLACK_QUESTION_BUTTON_ACTION_ID, N as SLACK_APPROVAL_BUTTON_ACTION_ID, P as SLACK_APPROVAL_SELECT_ACTION_ID, Q as hasSlackDataVisualizationBlock, T as renderSlackBlockFallbackText, V as SLACK_REPLY_SELECT_ACTION_ID, X as buildSlackDataVisualizationBlock, Z as canRenderSlackDataVisualization, at as renderSlackMessagePresentationFallbackText, ct as parseSlackBlocksInput, et as buildSlackDataTableBlock, g as buildSlackNativeDataAccessibilityText, it as renderSlackMessagePresentationChartFallbackText, j as truncateSlackText, m as appendSlackNativeDataFallbackText, nt as countSlackDataTableCellCharacters, q as chunkSlackMrkdwnText, rt as resolveSlackDataTableCellCharacterCount, tt as countSlackDataTableBlocksCellCharacters, v as hasSlackNativeDataBlock, z as SLACK_REPLY_BUTTON_ACTION_ID } from "./session-status-B59iRt0l.js";
|
|
2
2
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
4
4
|
import { legacyInteractiveReplyToPresentation, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
@@ -502,36 +502,37 @@ function parseSlackReplyBlockSegments(value) {
|
|
|
502
502
|
throw new Error("Slack rendered presentation segment is invalid");
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
|
-
/**
|
|
506
|
-
function
|
|
507
|
-
const messages = [];
|
|
505
|
+
/** Project each segment only when the caller is ready to deliver it. */
|
|
506
|
+
function* iterateSlackReplyDeliveryMessages(params) {
|
|
508
507
|
let outsideText = params.authoredTextPlacement === "outside-blocks" ? params.text?.trim() ?? "" : "";
|
|
509
508
|
for (const segment of params.segments) {
|
|
510
509
|
if (segment.kind === "text") {
|
|
511
510
|
const text = [outsideText, segment.text].filter(Boolean).join("\n\n");
|
|
512
511
|
outsideText = "";
|
|
513
|
-
if (text)
|
|
512
|
+
if (text) yield {
|
|
514
513
|
text,
|
|
515
514
|
textIsSlackPlainText: true
|
|
516
|
-
}
|
|
515
|
+
};
|
|
517
516
|
continue;
|
|
518
517
|
}
|
|
519
518
|
const baseText = outsideText;
|
|
520
519
|
outsideText = "";
|
|
521
520
|
const text = buildSlackNativeDataAccessibilityText(baseText, segment.blocks) || buildSlackBlocksFallbackText(segment.blocks);
|
|
522
521
|
const authoredTextPlacement = baseText ? "outside-blocks" : params.authoredTextPlacement === "blocks" ? "blocks" : "none";
|
|
523
|
-
|
|
522
|
+
yield {
|
|
524
523
|
text,
|
|
525
524
|
blocks: segment.blocks,
|
|
526
525
|
authoredTextPlacement,
|
|
527
526
|
...baseText ? { nativeDataFallbackBaseText: baseText } : {}
|
|
528
|
-
}
|
|
527
|
+
};
|
|
529
528
|
}
|
|
530
|
-
if (outsideText)
|
|
529
|
+
if (outsideText) yield {
|
|
531
530
|
text: outsideText,
|
|
532
531
|
authoredTextPlacement: "outside-blocks"
|
|
533
|
-
}
|
|
534
|
-
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function resolveSlackReplyDeliveryMessages(params) {
|
|
535
|
+
return Array.from(iterateSlackReplyDeliveryMessages(params));
|
|
535
536
|
}
|
|
536
537
|
function resolveSlackReplyText(payload, text = payload.text) {
|
|
537
538
|
const presentation = normalizeMessagePresentation(payload.presentation);
|
|
@@ -821,4 +822,4 @@ function resolveSlackReplyBlocks(payload) {
|
|
|
821
822
|
return segments.length === 1 && segments[0]?.kind === "blocks" ? segments[0].blocks : void 0;
|
|
822
823
|
}
|
|
823
824
|
//#endregion
|
|
824
|
-
export {
|
|
825
|
+
export { SLACK_PRESENTATION_CAPABILITIES as _, resolveSlackReplyBlockResolution as a, resolveSlackReplyRenderPlan as c, buildSlackPresentationBlocks as d, canRenderSlackPresentation as f, decodeSlackApprovalAction as g, SLACK_APPROVAL_HEADER_BLOCK_ID as h, prepareSlackReply as i, resolveSlackAuthoredTextPlacement as l, resolveSlackQuestionAction as m, iterateSlackReplyDeliveryMessages as n, resolveSlackReplyBlocks as o, decodeSlackQuestionAction as p, parseSlackReplyBlockSegments as r, resolveSlackReplyDeliveryMessages as s, hasSlackReplyStructuredContent as t, buildSlackInteractiveBlocks as u, SLACK_SECTION_TEXT_MAX as v };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as fetchSlackChannelListPage, t as collectSlackCursorPages } from "./cursor-pages-ByFwo-Py.js";
|
|
3
|
+
import { c as fetchSlackChannelListPage, l as createSlackLookupClient, s as collectSlackCursorPages } from "./probe-DpWLeifT.js";
|
|
5
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
5
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
|
7
6
|
//#region extensions/slack/src/resolve-channels.ts
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as collectSlackCursorPages } from "./cursor-pages-ByFwo-Py.js";
|
|
3
|
+
import { l as createSlackLookupClient, s as collectSlackCursorPages } from "./probe-DpWLeifT.js";
|
|
5
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
5
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
|
7
6
|
//#region extensions/slack/src/resolve-users.ts
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CLp4obpN.js";
|
|
2
2
|
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { a as resolveSlackGroupRequireMention, o as resolveSlackGroupToolPolicy } from "./session-status-
|
|
4
|
-
import { t as probeSlack } from "./probe-
|
|
3
|
+
import { a as resolveSlackGroupRequireMention, o as resolveSlackGroupToolPolicy } from "./session-status-B59iRt0l.js";
|
|
4
|
+
import { t as probeSlack } from "./probe-DpWLeifT.js";
|
|
5
5
|
import { r as setSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
6
|
-
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, s as listSlackEmojis, u as pinSlackMessage } from "./actions-
|
|
7
|
-
import { r as sendMessageSlack } from "./send-
|
|
8
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
9
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
10
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
11
|
-
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-
|
|
12
|
-
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-
|
|
13
|
-
import "./monitor-
|
|
6
|
+
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, s as listSlackEmojis, u as pinSlackMessage } from "./actions-mLOa06lO.js";
|
|
7
|
+
import { r as sendMessageSlack } from "./send-BQ2bNPlQ.js";
|
|
8
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DrAfYhDi.js";
|
|
9
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BHQ-q15T.js";
|
|
10
|
+
import { t as monitorSlackProvider } from "./provider-vY0lRzNo.js";
|
|
11
|
+
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-B9OuFiGA.js";
|
|
12
|
+
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-lgrHdjAZ.js";
|
|
13
|
+
import "./monitor-f00RCEB4.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 {
|
|
1
|
+
import { o as formatSlackError, u as createSlackReadClient } from "./probe-DpWLeifT.js";
|
|
2
2
|
import { isRecord, normalizeOptionalString, normalizeStringEntries, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/slack/src/scopes.ts
|
|
4
4
|
function collectScopes(value, into) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { D as SLACK_MESSAGE_TEXT_HARD_LIMIT, E as SLACK_EDIT_TEXT_MAX_BYTES, J as markdownToSlackMrkdwnChunks, K as resolveSlackQuestionActionIds, M as truncateSlackTextByUtf8Bytes, O as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, R as SLACK_QUESTION_FINALIZATION_BLOCKS, S as stripSlackNativeDataBlocks, T as renderSlackBlockFallbackText, _ as createSlackNativeDataBaseTextConsumer, f as assertSlackDetachedTargetAllowed, g as buildSlackNativeDataAccessibilityText, h as appendSlackNativeDataPlainTextFallback, j as truncateSlackText, k as SLACK_TEXT_LIMIT, lt as validateSlackBlocksArray, q as chunkSlackMrkdwnText, v as hasSlackNativeDataBlock, w as buildSlackCompleteBlocksFallbackText, y as isSlackInvalidBlocksError } from "./session-status-
|
|
2
|
+
import { D as SLACK_MESSAGE_TEXT_HARD_LIMIT, E as SLACK_EDIT_TEXT_MAX_BYTES, J as markdownToSlackMrkdwnChunks, K as resolveSlackQuestionActionIds, M as truncateSlackTextByUtf8Bytes, O as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, R as SLACK_QUESTION_FINALIZATION_BLOCKS, S as stripSlackNativeDataBlocks, T as renderSlackBlockFallbackText, _ as createSlackNativeDataBaseTextConsumer, f as assertSlackDetachedTargetAllowed, g as buildSlackNativeDataAccessibilityText, h as appendSlackNativeDataPlainTextFallback, j as truncateSlackText, k as SLACK_TEXT_LIMIT, lt as validateSlackBlocksArray, q as chunkSlackMrkdwnText, v as hasSlackNativeDataBlock, w as buildSlackCompleteBlocksFallbackText, y as isSlackInvalidBlocksError } from "./session-status-B59iRt0l.js";
|
|
3
3
|
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
4
|
-
import {
|
|
4
|
+
import { f as createSlackTokenCacheKey, g as getSlackWriteClient, o as formatSlackError, u as createSlackReadClient } from "./probe-DpWLeifT.js";
|
|
5
5
|
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-CukseRVL.js";
|
|
6
6
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
7
7
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateMessageSlack, n as resolveSlackDmChannelId, r as sendMessageSlack, t as reconcileSlackUnknownSend } from "./send-
|
|
1
|
+
import { a as updateMessageSlack, n as resolveSlackDmChannelId, r as sendMessageSlack, t as reconcileSlackUnknownSend } from "./send-BQ2bNPlQ.js";
|
|
2
2
|
export { reconcileSlackUnknownSend, resolveSlackDmChannelId, sendMessageSlack, updateMessageSlack };
|
|
@@ -2,7 +2,7 @@ import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAx
|
|
|
2
2
|
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-Dm_H77gH.js";
|
|
3
3
|
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
4
4
|
import { t as slackContextTargetsMatch } from "./targets-7FexXJ62.js";
|
|
5
|
-
import {
|
|
5
|
+
import { O as resolveSlackAllowListMatch, T as normalizeAllowListLower, k as resolveSlackUserAllowListForTeam, o as formatSlackError } from "./probe-DpWLeifT.js";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
|
|
@@ -1038,15 +1038,6 @@ function tokenizeSlackMrkdwn(text) {
|
|
|
1038
1038
|
if (codePoint === void 0) break;
|
|
1039
1039
|
const character = String.fromCodePoint(codePoint);
|
|
1040
1040
|
index += character.length;
|
|
1041
|
-
if (character === "\\" && index < text.length) {
|
|
1042
|
-
const escapedCodePoint = text.codePointAt(index);
|
|
1043
|
-
if (escapedCodePoint !== void 0) {
|
|
1044
|
-
const escapedCharacter = String.fromCodePoint(escapedCodePoint);
|
|
1045
|
-
tokens.push(character + escapedCharacter);
|
|
1046
|
-
index += escapedCharacter.length;
|
|
1047
|
-
continue;
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
1041
|
tokens.push(character);
|
|
1051
1042
|
}
|
|
1052
1043
|
return tokens;
|
|
@@ -1127,7 +1118,6 @@ function projectSlackMrkdwnVisibleText(text, dateDisplay) {
|
|
|
1127
1118
|
else if (token === "&" || token === "<" || token === ">") visible = decodeSlackMrkdwnEntities(token);
|
|
1128
1119
|
else if (!activeMarker && (token === "*" || token === "_" || token === "~")) visible = "";
|
|
1129
1120
|
else if (!activeMarker && token === ">" && !lineHasVisibleContent) visible = "";
|
|
1130
|
-
else if (token.startsWith("\\") && token.length > 1) visible = token.slice(1);
|
|
1131
1121
|
appendSlackVisibleProjection(projection, visible, activeMarker !== void 0);
|
|
1132
1122
|
for (const character of visible) if (character === "\n") lineHasVisibleContent = false;
|
|
1133
1123
|
else if (character !== " " && character !== " " && character !== "\r") lineHasVisibleContent = true;
|
|
@@ -1186,7 +1176,7 @@ function normalizeSlackOutboundText(markdown, options = {}) {
|
|
|
1186
1176
|
/** Chunk already-rendered Slack mrkdwn without splitting entities or code markers. */
|
|
1187
1177
|
function chunkSlackMrkdwnText(text, limit) {
|
|
1188
1178
|
if (text.length <= limit) return [text];
|
|
1189
|
-
if (!(text.includes("`") || text.includes("&") || text.includes("<") || text.includes(">") || (text.match(/<[^>\n]+>/gu)?.some(isAllowedSlackAngleToken) ?? false)
|
|
1179
|
+
if (!(text.includes("`") || text.includes("&") || text.includes("<") || text.includes(">") || (text.match(/<[^>\n]+>/gu)?.some(isAllowedSlackAngleToken) ?? false))) return chunkTextForOutbound(text, limit, { preserveWhitespace: true });
|
|
1190
1180
|
const chunks = [];
|
|
1191
1181
|
let activeMarker;
|
|
1192
1182
|
let content = "";
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as slackSetupPlugin } from "./channel.setup-DZZFSOoo.js";
|
|
2
2
|
export { slackSetupPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-Dm_H77gH.js";
|
|
2
2
|
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
3
|
-
import "./shared
|
|
4
|
-
import { o as SLACK_CHANNEL, r as createSlackSetupWizardBase } from "./channel.setup-
|
|
5
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
6
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
3
|
+
import "./shared-DmHcvFcF.js";
|
|
4
|
+
import { o as SLACK_CHANNEL, r as createSlackSetupWizardBase } from "./channel.setup-DZZFSOoo.js";
|
|
5
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DrAfYhDi.js";
|
|
6
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BHQ-q15T.js";
|
|
7
7
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
9
9
|
import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptResolvedAllowFrom, resolveEntriesWithOptionalToken, resolveSetupAccountId, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -2,8 +2,8 @@ import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAx
|
|
|
2
2
|
import { n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-Dm_H77gH.js";
|
|
3
3
|
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
4
4
|
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
5
|
-
import { a as slackIngressIdentity, t as probeSlack } from "./probe-
|
|
6
|
-
import { n as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-
|
|
5
|
+
import { a as slackIngressIdentity, t as probeSlack } from "./probe-DpWLeifT.js";
|
|
6
|
+
import { n as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-DZZFSOoo.js";
|
|
7
7
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BNjw9bxb.js";
|
|
8
8
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DxmvbxBF.js";
|
|
9
9
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies$1 } from "./replies-
|
|
1
|
+
import { o as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies$1 } from "./replies-DUe6ydtU.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 { resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/slack",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.4",
|
|
4
4
|
"description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"zod": "4.4.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.9.
|
|
22
|
+
"openclaw": ">=2026.9.4"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -151,10 +151,10 @@
|
|
|
151
151
|
"allowInvalidConfigRecovery": true
|
|
152
152
|
},
|
|
153
153
|
"compat": {
|
|
154
|
-
"pluginApi": ">=2026.9.
|
|
154
|
+
"pluginApi": ">=2026.9.4"
|
|
155
155
|
},
|
|
156
156
|
"build": {
|
|
157
|
-
"openclawVersion": "2026.9.
|
|
157
|
+
"openclawVersion": "2026.9.4",
|
|
158
158
|
"bundledDist": false
|
|
159
159
|
},
|
|
160
160
|
"release": {
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region extensions/slack/src/cursor-pages.ts
|
|
2
|
-
const SLACK_CURSOR_PAGE_LIMIT = 1e4;
|
|
3
|
-
const fetchSlackChannelListPage = (client, cursor) => client.conversations.list({
|
|
4
|
-
types: "public_channel,private_channel",
|
|
5
|
-
exclude_archived: false,
|
|
6
|
-
limit: 1e3,
|
|
7
|
-
cursor
|
|
8
|
-
});
|
|
9
|
-
async function collectSlackCursorPages(params) {
|
|
10
|
-
const items = [];
|
|
11
|
-
let cursor;
|
|
12
|
-
const seenCursors = /* @__PURE__ */ new Set();
|
|
13
|
-
for (let pageCount = 1; pageCount <= SLACK_CURSOR_PAGE_LIMIT; pageCount += 1) {
|
|
14
|
-
const response = await params.fetchPage(cursor);
|
|
15
|
-
items.push(...params.collectPageItems(response));
|
|
16
|
-
const nextCursor = response.response_metadata?.next_cursor?.trim() || void 0;
|
|
17
|
-
if (!nextCursor) return items;
|
|
18
|
-
if (seenCursors.has(nextCursor)) throw new Error(`Slack cursor pagination repeated a cursor after ${pageCount} pages`);
|
|
19
|
-
seenCursors.add(nextCursor);
|
|
20
|
-
cursor = nextCursor;
|
|
21
|
-
}
|
|
22
|
-
throw new Error(`Slack cursor pagination exceeded ${SLACK_CURSOR_PAGE_LIMIT} pages`);
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
export { fetchSlackChannelListPage as n, collectSlackCursorPages as t };
|