@openclaw/slack 2026.6.11 → 2026.6.33
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/account-inspect-api.js +1 -1
- package/dist/{account-inspect-DOtQbKkB.js → account-inspect-ldU97llt.js} +1 -1
- package/dist/{accounts-BPCiCe8y.js → accounts-C9Z3J3lT.js} +8 -1
- package/dist/accounts.runtime-4Xez0y2c.js +2 -0
- package/dist/{action-runtime-DfJK7zS0.js → action-runtime-z9j2PYiO.js} +4 -4
- package/dist/action-runtime.runtime-BuOQERTf.js +2 -0
- package/dist/{actions-OhnDIN4l.js → actions-CCTO1mVi.js} +3 -3
- package/dist/{actions.runtime-DkFXr3-k.js → actions.runtime-BaBCJbO3.js} +1 -1
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-CsFrthnF.js → approval-handler.runtime-Cw1Im48B.js} +2 -2
- package/dist/{channel-COCbJwom.js → channel-DLPyf4p_.js} +23 -17
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-DYQGnKPK.js → channel.setup-RewyjVhG.js} +3 -3
- package/dist/{directory-config-DDVHDmrN.js → directory-config-NDOJRlhK.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DzOkmJVV.js → directory-live-CeVhaEVq.js} +1 -1
- package/dist/{interactive-replies-D-22gTp3.js → interactive-replies-BBZN1A9T.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api--zYyTqrR.js → message-tool-api-OXkQLOkR.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Cy-0xYgF.js → monitor-CoF156tn.js} +3 -3
- package/dist/{outbound-adapter-CzX4D5K_.js → outbound-adapter-DqEIkSaa.js} +3 -3
- package/dist/{pipeline.runtime-5R4HgM_7.js → pipeline.runtime-Lp1AVrkR.js} +74 -59
- package/dist/{policy-Bi92bs5t.js → policy-hyhJMisM.js} +1 -1
- package/dist/{probe-BRsYAcGR.js → probe-PFduhlzL.js} +8 -2
- package/dist/{provider-7YKru1TZ.js → provider-CQvIQMod.js} +49 -31
- package/dist/{relay-source-42fP7Ktr.js → relay-source-Bv6k-bAg.js} +1 -1
- package/dist/{replies-Dlxge48k.js → replies-DM1Qi_1b.js} +3 -3
- package/dist/{reply-blocks-BT_sNsDQ.js → reply-blocks-0ofUZd6K.js} +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/{send-CRoD-UQw.js → send-CrC49d83.js} +3 -3
- package/dist/send.runtime-B_nPiIPk.js +2 -0
- package/dist/{setup-core-BCGzyZhx.js → setup-core-DPMX-Z6o.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-D4GE34e2.js → setup-surface-BCB7d1mL.js} +3 -3
- package/dist/{shared-BtJS2bUx.js → shared-CQ2R9FGA.js} +4 -4
- package/dist/{slash-dispatch.runtime-D1qKAWNN.js → slash-dispatch.runtime-CCP3os2O.js} +1 -1
- package/node_modules/agent-base/README.md +145 -0
- package/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/agent-base/package.json +64 -0
- package/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/CHANGELOG.md +165 -1
- package/node_modules/axios/README.md +310 -247
- package/node_modules/axios/dist/axios.js +533 -197
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +564 -161
- package/node_modules/axios/dist/esm/axios.js +564 -161
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +839 -281
- package/node_modules/axios/index.d.cts +11 -4
- package/node_modules/axios/index.d.ts +7 -2
- package/node_modules/axios/lib/adapters/fetch.js +196 -37
- package/node_modules/axios/lib/adapters/http.js +328 -185
- package/node_modules/axios/lib/adapters/xhr.js +2 -1
- package/node_modules/axios/lib/core/Axios.js +4 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
- package/node_modules/axios/lib/core/buildFullPath.js +29 -1
- package/node_modules/axios/lib/core/mergeConfig.js +34 -0
- package/node_modules/axios/lib/defaults/transitional.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
- package/node_modules/axios/lib/helpers/buildURL.js +6 -4
- package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
- package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
- package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
- package/node_modules/axios/lib/helpers/fromDataURI.js +18 -5
- package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +17 -9
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
- package/node_modules/axios/lib/helpers/toFormData.js +41 -11
- package/node_modules/axios/lib/utils.js +105 -19
- package/node_modules/axios/package.json +31 -13
- package/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +56 -0
- package/npm-shrinkwrap.json +32 -6
- package/package.json +4 -4
- package/dist/accounts.runtime-CgWgzjLX.js +0 -2
- package/dist/action-runtime.runtime-CIYPRrNy.js +0 -2
- package/dist/send.runtime-C_y65BU0.js +0 -2
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectSlackAccount } from "./account-inspect-ldU97llt.js";
|
|
2
2
|
//#region extensions/slack/account-inspect-api.ts
|
|
3
3
|
function inspectSlackReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectSlackAccount({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-
|
|
1
|
+
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-C9Z3J3lT.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
3
3
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -4,6 +4,13 @@ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runti
|
|
|
4
4
|
import { mapAllowFromEntries, normalizeChannelDmPolicy, resolveChannelDmAllowFrom, resolveChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
//#region extensions/slack/src/token.ts
|
|
7
|
+
function formatSlackBotTokenIdentityWarning(params) {
|
|
8
|
+
const userId = params.auth.user_id?.trim();
|
|
9
|
+
const botId = params.auth.bot_id?.trim();
|
|
10
|
+
if (!userId || botId) return;
|
|
11
|
+
const accountId = params.accountId?.trim() || "default";
|
|
12
|
+
return `Slack auth.test identified account "${accountId}" as user ${userId} without bot_id. ${accountId === "default" ? "channels.slack.botToken, channels.slack.accounts.default.botToken, or SLACK_BOT_TOKEN" : `channels.slack.accounts.${accountId}.botToken`} appears to contain a user token; replace it with a Bot User OAuth Token. Until replaced, explicit bot-mention detection is disabled and required-mention channels fail closed.`;
|
|
13
|
+
}
|
|
7
14
|
function resolveSlackBotToken(raw, path = "channels.slack.botToken") {
|
|
8
15
|
return normalizeResolvedSecretInputString({
|
|
9
16
|
value: raw,
|
|
@@ -184,4 +191,4 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
184
191
|
})).filter((account) => account.enabled);
|
|
185
192
|
}
|
|
186
193
|
//#endregion
|
|
187
|
-
export { resolveSlackAccount as a, resolveSlackConfigAccessorAccount as c,
|
|
194
|
+
export { resolveSlackAccount as a, resolveSlackConfigAccessorAccount as c, resolveSlackAppToken as d, resolveSlackBotToken as f, resolveDefaultSlackAccountId as i, resolveSlackReplyToMode as l, listSlackAccountIds as n, resolveSlackAccountAllowFrom as o, mergeSlackAccountConfig as r, resolveSlackAccountDmPolicy as s, listEnabledSlackAccounts as t, formatSlackBotTokenIdentityWarning as u };
|
|
@@ -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-
|
|
3
|
+
import { r as parseSlackBlocksInput } from "./reply-blocks-0ofUZd6K.js";
|
|
4
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-
|
|
5
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-hyhJMisM.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,11 +24,11 @@ const pinActions = new Set([
|
|
|
24
24
|
let slackActionsRuntimePromise;
|
|
25
25
|
let slackAccountsRuntimePromise;
|
|
26
26
|
function loadSlackActionsRuntime() {
|
|
27
|
-
slackActionsRuntimePromise ??= import("./actions.runtime-
|
|
27
|
+
slackActionsRuntimePromise ??= import("./actions.runtime-BaBCJbO3.js");
|
|
28
28
|
return slackActionsRuntimePromise;
|
|
29
29
|
}
|
|
30
30
|
function loadSlackAccountsRuntime() {
|
|
31
|
-
slackAccountsRuntimePromise ??= import("./accounts.runtime-
|
|
31
|
+
slackAccountsRuntimePromise ??= import("./accounts.runtime-4Xez0y2c.js");
|
|
32
32
|
return slackAccountsRuntimePromise;
|
|
33
33
|
}
|
|
34
34
|
function createLazySlackAction(key) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount,
|
|
3
|
-
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-
|
|
2
|
+
import { a as resolveSlackAccount, f as resolveSlackBotToken } from "./accounts-C9Z3J3lT.js";
|
|
3
|
+
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-0ofUZd6K.js";
|
|
4
4
|
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
5
|
-
import { l as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-
|
|
5
|
+
import { l as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-CrC49d83.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-
|
|
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-CCTO1mVi.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage };
|
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
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-C9Z3J3lT.js";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-ldU97llt.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-
|
|
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-
|
|
8
|
-
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api
|
|
9
|
-
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
6
|
+
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-DLPyf4p_.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-0ofUZd6K.js";
|
|
8
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-OXkQLOkR.js";
|
|
9
|
+
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.js";
|
|
10
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-
|
|
12
|
-
import { i as hasSlackThreadParticipation, o as recordSlackThreadParticipation, r as clearSlackThreadParticipationCache } from "./send-
|
|
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-
|
|
14
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
15
|
-
import { t as probeSlack } from "./probe-
|
|
11
|
+
import { t as slackSetupPlugin } from "./channel.setup-RewyjVhG.js";
|
|
12
|
+
import { i as hasSlackThreadParticipation, o as recordSlackThreadParticipation, r as clearSlackThreadParticipationCache } from "./send-CrC49d83.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-CCTO1mVi.js";
|
|
14
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-NDOJRlhK.js";
|
|
15
|
+
import { t as probeSlack } from "./probe-PFduhlzL.js";
|
|
16
16
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
|
|
17
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
17
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-CQvIQMod.js";
|
|
18
18
|
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, resetSlackChannelTypeCacheForTest as __resetSlackChannelTypeCacheForTest, resetSlackChannelTypeCacheForTest, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, clearSlackWriteClientCacheForTest, collectSlackSecurityAuditFindings, compileSlackInteractiveReplies, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, isSlackInteractiveRepliesEnabled, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackOptionsLine, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as resolveSlackApprovalKind, L as normalizeSlackApproverId, S as isSlackAnyNativeApprovalClientEnabled, k as shouldHandleSlackNativeApprovalRequest, t as resolveSlackReplyBlocks, v as truncateSlackText } from "./reply-blocks-
|
|
2
|
-
import { t as sendMessageSlack } from "./send-
|
|
1
|
+
import { E as resolveSlackApprovalKind, L as normalizeSlackApproverId, S as isSlackAnyNativeApprovalClientEnabled, k as shouldHandleSlackNativeApprovalRequest, t as resolveSlackReplyBlocks, v as truncateSlackText } from "./reply-blocks-0ofUZd6K.js";
|
|
2
|
+
import { t as sendMessageSlack } from "./send-CrC49d83.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";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackReplyToMode, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-C9Z3J3lT.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-
|
|
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-0ofUZd6K.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
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api
|
|
8
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
7
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-OXkQLOkR.js";
|
|
8
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.js";
|
|
9
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";
|
|
10
10
|
import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
11
|
-
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-
|
|
12
|
-
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-
|
|
11
|
+
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-CQ2R9FGA.js";
|
|
12
|
+
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-DPMX-Z6o.js";
|
|
13
13
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
14
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
15
15
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -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-
|
|
138
|
+
load: async () => (await import("./approval-handler.runtime-Cw1Im48B.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-
|
|
366
|
+
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-BuOQERTf.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-
|
|
499
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-BCB7d1mL.js"));
|
|
499
500
|
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CNKZU1t1.js"));
|
|
500
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
501
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-DqEIkSaa.js"));
|
|
501
502
|
async function resolveSlackHandleAction() {
|
|
502
503
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
503
504
|
}
|
|
@@ -517,27 +518,27 @@ let slackSendRuntimePromise;
|
|
|
517
518
|
let slackProbeModulePromise;
|
|
518
519
|
let slackMonitorModulePromise;
|
|
519
520
|
let slackDirectoryLiveModulePromise;
|
|
520
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
521
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-NDOJRlhK.js").then((n) => n.t));
|
|
521
522
|
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CtUOIX8D.js").then((n) => n.n));
|
|
522
523
|
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DfFN2BcP.js").then((n) => n.n));
|
|
523
524
|
async function loadSlackActionRuntime() {
|
|
524
|
-
slackActionRuntimePromise ??= import("./action-runtime.runtime-
|
|
525
|
+
slackActionRuntimePromise ??= import("./action-runtime.runtime-BuOQERTf.js");
|
|
525
526
|
return await slackActionRuntimePromise;
|
|
526
527
|
}
|
|
527
528
|
async function loadSlackSendRuntime() {
|
|
528
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
529
|
+
slackSendRuntimePromise ??= import("./send.runtime-B_nPiIPk.js");
|
|
529
530
|
return await slackSendRuntimePromise;
|
|
530
531
|
}
|
|
531
532
|
async function loadSlackProbeModule() {
|
|
532
|
-
slackProbeModulePromise ??= import("./probe-
|
|
533
|
+
slackProbeModulePromise ??= import("./probe-PFduhlzL.js").then((n) => n.n);
|
|
533
534
|
return await slackProbeModulePromise;
|
|
534
535
|
}
|
|
535
536
|
async function loadSlackMonitorModule() {
|
|
536
|
-
slackMonitorModulePromise ??= import("./monitor-
|
|
537
|
+
slackMonitorModulePromise ??= import("./monitor-CoF156tn.js").then((n) => n.t);
|
|
537
538
|
return await slackMonitorModulePromise;
|
|
538
539
|
}
|
|
539
540
|
async function loadSlackDirectoryLiveModule() {
|
|
540
|
-
slackDirectoryLiveModulePromise ??= import("./directory-live-
|
|
541
|
+
slackDirectoryLiveModulePromise ??= import("./directory-live-CeVhaEVq.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
|
|
@@ -906,11 +908,15 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
906
908
|
ok: false,
|
|
907
909
|
error: "missing token"
|
|
908
910
|
};
|
|
909
|
-
return await (await loadSlackProbeModule()).probeSlack(token, timeoutMs);
|
|
911
|
+
return await (await loadSlackProbeModule()).probeSlack(token, timeoutMs, { accountId: account.accountId });
|
|
910
912
|
},
|
|
911
913
|
formatCapabilitiesProbe: ({ probe }) => {
|
|
912
914
|
const slackProbe = probe;
|
|
913
915
|
const lines = [];
|
|
916
|
+
if (slackProbe?.warning) lines.push({
|
|
917
|
+
text: `Warning: ${slackProbe.warning}`,
|
|
918
|
+
tone: "warn"
|
|
919
|
+
});
|
|
914
920
|
if (slackProbe?.bot?.name) lines.push({ text: `Bot: @${slackProbe.bot.name}` });
|
|
915
921
|
if (slackProbe?.team?.name || slackProbe?.team?.id) {
|
|
916
922
|
const id = slackProbe.team?.id ? ` (${slackProbe.team.id})` : "";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-DLPyf4p_.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-
|
|
2
|
-
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-C9Z3J3lT.js";
|
|
2
|
+
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-DPMX-Z6o.js";
|
|
3
3
|
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-
|
|
7
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-BCB7d1mL.js")).slackSetupWizard }));
|
|
8
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
9
9
|
sectionKey: SLACK_CHANNEL,
|
|
10
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-
|
|
2
|
+
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-C9Z3J3lT.js";
|
|
3
3
|
import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
|
|
4
4
|
import "./targets-Dll4NJgs.js";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
1
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-NDOJRlhK.js";
|
|
2
2
|
export { listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount } from "./accounts-
|
|
2
|
+
import { a as resolveSlackAccount } from "./accounts-C9Z3J3lT.js";
|
|
3
3
|
import { r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
//#region extensions/slack/src/directory-live.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-C9Z3J3lT.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries, normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/slack/src/interactive-replies.ts
|
|
4
4
|
const SLACK_BUTTON_MAX_ITEMS = 5;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
1
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.js";
|
|
2
2
|
export { compileSlackInteractiveReplies, isSlackInteractiveRepliesEnabled };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, t as listEnabledSlackAccounts } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, t as listEnabledSlackAccounts } from "./accounts-C9Z3J3lT.js";
|
|
2
2
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
3
|
-
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-
|
|
3
|
+
import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BBZN1A9T.js";
|
|
4
4
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
6
6
|
import { Type } from "typebox";
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeSlackMessageTool } from "./message-tool-api
|
|
1
|
+
import { t as describeSlackMessageTool } from "./message-tool-api-OXkQLOkR.js";
|
|
2
2
|
export { describeSlackMessageTool as describeMessageTool };
|
|
@@ -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-
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { t as monitorSlackProvider, x as buildSlackSlashCommandMatcher } from "./provider-CQvIQMod.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-hyhJMisM.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-DM1Qi_1b.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, r as parseSlackBlocksInput } from "./reply-blocks-
|
|
1
|
+
import { _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, r as parseSlackBlocksInput } from "./reply-blocks-0ofUZd6K.js";
|
|
2
2
|
import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
|
|
3
|
-
import { t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
3
|
+
import { t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.js";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
6
6
|
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
@@ -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-
|
|
13
|
+
slackSendRuntimePromise ??= import("./send.runtime-B_nPiIPk.js");
|
|
14
14
|
return await slackSendRuntimePromise;
|
|
15
15
|
}
|
|
16
16
|
function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { l as resolveSlackReplyToMode } from "./accounts-
|
|
1
|
+
import { l as resolveSlackReplyToMode } from "./accounts-C9Z3J3lT.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-
|
|
5
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
4
|
+
import { a as SLACK_TEXT_LIMIT, d as normalizeSlackAllowOwnerEntry, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-0ofUZd6K.js";
|
|
5
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.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-
|
|
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-
|
|
7
|
+
import { a as hasSlackThreadParticipationWithPersistence, c as normalizeSlackOutboundText, o as recordSlackThreadParticipation, t as sendMessageSlack } from "./send-CrC49d83.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-CCTO1mVi.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-
|
|
11
|
-
import { n as resolveSlackChannelConfig } from "./policy-
|
|
12
|
-
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
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-CQvIQMod.js";
|
|
11
|
+
import { n as resolveSlackChannelConfig } from "./policy-hyhJMisM.js";
|
|
12
|
+
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-DM1Qi_1b.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-
|
|
2035
|
+
slackMediaModulePromise$1 ??= import("./actions-CCTO1mVi.js").then((n) => n.h);
|
|
2036
2036
|
return slackMediaModulePromise$1;
|
|
2037
2037
|
}
|
|
2038
2038
|
function collectUniqueSlackMentionIds$1(texts) {
|
|
@@ -2546,7 +2546,7 @@ 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-
|
|
2549
|
+
slackMediaModulePromise ??= import("./actions-CCTO1mVi.js").then((n) => n.h);
|
|
2550
2550
|
return slackMediaModulePromise;
|
|
2551
2551
|
}
|
|
2552
2552
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
@@ -3241,6 +3241,56 @@ async function prepareSlackMessage(params) {
|
|
|
3241
3241
|
resolvedSenderName = message.user ?? message.bot_id ?? "unknown";
|
|
3242
3242
|
return resolvedSenderName;
|
|
3243
3243
|
};
|
|
3244
|
+
const recordDroppedHistory = async (reason) => {
|
|
3245
|
+
const pendingText = (message.text ?? "").trim();
|
|
3246
|
+
const historyMediaCandidate = buildSlackHistoryMediaCandidateMessage(message);
|
|
3247
|
+
const fallbackFile = message.files?.length ? `[Slack file: ${formatSlackFileReference(message.files[0])}]` : "";
|
|
3248
|
+
const pendingBody = pendingText || fallbackFile || (!fallbackFile && historyMediaCandidate ? "[Slack media attachment]" : "");
|
|
3249
|
+
const skippedThreadStarter = historyMediaCandidate && isThreadReply && threadTs ? await resolveSlackThreadStarter({
|
|
3250
|
+
channelId: message.channel,
|
|
3251
|
+
threadTs,
|
|
3252
|
+
client: ctx.app.client
|
|
3253
|
+
}) : null;
|
|
3254
|
+
const senderName = pendingBody ? await resolveSenderName() : void 0;
|
|
3255
|
+
await recordDroppedChannelInboundHistory({
|
|
3256
|
+
input: {
|
|
3257
|
+
id: message.ts ?? `${message.channel}:${Date.now()}`,
|
|
3258
|
+
timestamp: resolveSlackTimestampMs(message.ts),
|
|
3259
|
+
rawText: pendingBody,
|
|
3260
|
+
textForAgent: pendingBody,
|
|
3261
|
+
raw: message
|
|
3262
|
+
},
|
|
3263
|
+
admission: {
|
|
3264
|
+
kind: "drop",
|
|
3265
|
+
reason,
|
|
3266
|
+
recordHistory: true
|
|
3267
|
+
},
|
|
3268
|
+
preflight: {
|
|
3269
|
+
message: pendingBody ? {
|
|
3270
|
+
rawBody: pendingBody,
|
|
3271
|
+
body: pendingBody,
|
|
3272
|
+
bodyForAgent: pendingBody,
|
|
3273
|
+
senderLabel: senderName,
|
|
3274
|
+
envelopeFrom: senderName
|
|
3275
|
+
} : void 0,
|
|
3276
|
+
history: {
|
|
3277
|
+
key: historyKey,
|
|
3278
|
+
historyMap: ctx.channelHistories,
|
|
3279
|
+
limit: ctx.historyLimit,
|
|
3280
|
+
recordOnDrop: true,
|
|
3281
|
+
mediaLimit: SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS,
|
|
3282
|
+
shouldRecord: opts.shouldRecordDroppedHistory
|
|
3283
|
+
},
|
|
3284
|
+
media: () => resolveSlackHistoryMediaForPendingRecord({
|
|
3285
|
+
ctx,
|
|
3286
|
+
message,
|
|
3287
|
+
isThreadReply,
|
|
3288
|
+
threadStarter: skippedThreadStarter,
|
|
3289
|
+
isBotMessage
|
|
3290
|
+
})
|
|
3291
|
+
}
|
|
3292
|
+
});
|
|
3293
|
+
};
|
|
3244
3294
|
const senderNameForAuth = ctx.allowNameMatching ? await resolveSenderName() : void 0;
|
|
3245
3295
|
const allowTextCommands = shouldHandleTextCommands({
|
|
3246
3296
|
cfg,
|
|
@@ -3327,59 +3377,20 @@ async function prepareSlackMessage(params) {
|
|
|
3327
3377
|
});
|
|
3328
3378
|
return null;
|
|
3329
3379
|
}
|
|
3380
|
+
if (isRoom && shouldRequireMention && !canDetectMention && !effectiveWasMentioned) {
|
|
3381
|
+
ctx.logger.info({
|
|
3382
|
+
channel: message.channel,
|
|
3383
|
+
reason: "mention-detection-unavailable"
|
|
3384
|
+
}, "skipping channel message");
|
|
3385
|
+
await recordDroppedHistory("slack-mention-detection-unavailable");
|
|
3386
|
+
return null;
|
|
3387
|
+
}
|
|
3330
3388
|
if (isRoom && shouldRequireMention && messageIngress.activationAccess.shouldSkip) {
|
|
3331
3389
|
ctx.logger.info({
|
|
3332
3390
|
channel: message.channel,
|
|
3333
3391
|
reason: "no-mention"
|
|
3334
3392
|
}, "skipping channel message");
|
|
3335
|
-
|
|
3336
|
-
const historyMediaCandidate = buildSlackHistoryMediaCandidateMessage(message);
|
|
3337
|
-
const fallbackFile = message.files?.length ? `[Slack file: ${formatSlackFileReference(message.files[0])}]` : "";
|
|
3338
|
-
const pendingBody = pendingText || fallbackFile || (!fallbackFile && historyMediaCandidate ? "[Slack media attachment]" : "");
|
|
3339
|
-
const skippedThreadStarter = historyMediaCandidate && isThreadReply && threadTs ? await resolveSlackThreadStarter({
|
|
3340
|
-
channelId: message.channel,
|
|
3341
|
-
threadTs,
|
|
3342
|
-
client: ctx.app.client
|
|
3343
|
-
}) : null;
|
|
3344
|
-
const timestamp = resolveSlackTimestampMs(message.ts);
|
|
3345
|
-
const senderName = pendingBody ? await resolveSenderName() : void 0;
|
|
3346
|
-
await recordDroppedChannelInboundHistory({
|
|
3347
|
-
input: {
|
|
3348
|
-
id: message.ts ?? `${message.channel}:${Date.now()}`,
|
|
3349
|
-
timestamp,
|
|
3350
|
-
rawText: pendingBody,
|
|
3351
|
-
textForAgent: pendingBody,
|
|
3352
|
-
raw: message
|
|
3353
|
-
},
|
|
3354
|
-
admission: {
|
|
3355
|
-
kind: "drop",
|
|
3356
|
-
reason: "slack-no-mention",
|
|
3357
|
-
recordHistory: true
|
|
3358
|
-
},
|
|
3359
|
-
preflight: {
|
|
3360
|
-
message: pendingBody ? {
|
|
3361
|
-
rawBody: pendingBody,
|
|
3362
|
-
body: pendingBody,
|
|
3363
|
-
bodyForAgent: pendingBody,
|
|
3364
|
-
senderLabel: senderName,
|
|
3365
|
-
envelopeFrom: senderName
|
|
3366
|
-
} : void 0,
|
|
3367
|
-
history: {
|
|
3368
|
-
key: historyKey,
|
|
3369
|
-
historyMap: ctx.channelHistories,
|
|
3370
|
-
limit: ctx.historyLimit,
|
|
3371
|
-
recordOnDrop: true,
|
|
3372
|
-
mediaLimit: SLACK_HISTORY_MEDIA_MAX_ATTACHMENTS
|
|
3373
|
-
},
|
|
3374
|
-
media: () => resolveSlackHistoryMediaForPendingRecord({
|
|
3375
|
-
ctx,
|
|
3376
|
-
message,
|
|
3377
|
-
isThreadReply,
|
|
3378
|
-
threadStarter: skippedThreadStarter,
|
|
3379
|
-
isBotMessage
|
|
3380
|
-
})
|
|
3381
|
-
}
|
|
3382
|
-
});
|
|
3393
|
+
await recordDroppedHistory("slack-no-mention");
|
|
3383
3394
|
return null;
|
|
3384
3395
|
}
|
|
3385
3396
|
const threadStarter = isThreadReply && threadTs ? await resolveSlackThreadStarter({
|
|
@@ -3467,6 +3478,10 @@ async function prepareSlackMessage(params) {
|
|
|
3467
3478
|
storePath,
|
|
3468
3479
|
sessionKey
|
|
3469
3480
|
});
|
|
3481
|
+
if (opts.source === "app_mention" && !ctx.botUserId && message.ts) {
|
|
3482
|
+
const pendingHistory = ctx.channelHistories.get(historyKey);
|
|
3483
|
+
if (pendingHistory) ctx.channelHistories.set(historyKey, pendingHistory.filter((entry) => entry.messageId !== message.ts));
|
|
3484
|
+
}
|
|
3470
3485
|
const channelHistory = createChannelHistoryWindow({ historyMap: ctx.channelHistories });
|
|
3471
3486
|
const dmHistoryLimit = isDirectMessage ? resolveSlackDmHistoryLimit({
|
|
3472
3487
|
account,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as normalizeSlackSlug } from "./reply-blocks-
|
|
1
|
+
import { f as normalizeSlackSlug } from "./reply-blocks-0ofUZd6K.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,10 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { u as formatSlackBotTokenIdentityWarning } from "./accounts-C9Z3J3lT.js";
|
|
2
3
|
import { r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
3
4
|
import { t as formatSlackError } from "./errors-CZtmv-h0.js";
|
|
4
5
|
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
6
|
//#region extensions/slack/src/probe.ts
|
|
6
7
|
var probe_exports = /* @__PURE__ */ __exportAll({ probeSlack: () => probeSlack });
|
|
7
|
-
async function probeSlack(token, timeoutMs = 2500) {
|
|
8
|
+
async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
8
9
|
const client = createSlackWebClient(token);
|
|
9
10
|
const start = Date.now();
|
|
10
11
|
try {
|
|
@@ -15,6 +16,10 @@ async function probeSlack(token, timeoutMs = 2500) {
|
|
|
15
16
|
error: result.error ?? "unknown",
|
|
16
17
|
elapsedMs: Date.now() - start
|
|
17
18
|
};
|
|
19
|
+
const warning = formatSlackBotTokenIdentityWarning({
|
|
20
|
+
auth: result,
|
|
21
|
+
accountId: opts?.accountId
|
|
22
|
+
});
|
|
18
23
|
return {
|
|
19
24
|
ok: true,
|
|
20
25
|
status: 200,
|
|
@@ -26,7 +31,8 @@ async function probeSlack(token, timeoutMs = 2500) {
|
|
|
26
31
|
team: {
|
|
27
32
|
id: result.team_id,
|
|
28
33
|
name: result.team
|
|
29
|
-
}
|
|
34
|
+
},
|
|
35
|
+
...warning ? { warning } : {}
|
|
30
36
|
};
|
|
31
37
|
} catch (err) {
|
|
32
38
|
const message = formatSlackError(err);
|