@openclaw/slack 2026.6.10-beta.2 → 2026.6.11-beta.2
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-configured-DzC407uv.js +14 -0
- package/dist/{account-inspect-CdGk6R7l.js → account-inspect-DOtQbKkB.js} +5 -3
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-f6Xcv9Vi.js → accounts-BPCiCe8y.js} +3 -2
- package/dist/accounts.runtime-CgWgzjLX.js +2 -0
- package/dist/{action-runtime-CkD5nTPl.js → action-runtime-DfJK7zS0.js} +5 -5
- package/dist/action-runtime.runtime-CIYPRrNy.js +2 -0
- package/dist/{actions-B2w2hCZ2.js → actions-OhnDIN4l.js} +4 -4
- package/dist/{actions.runtime-B56qRt06.js → actions.runtime-DkFXr3-k.js} +1 -1
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-BS6xpR-X.js → approval-handler.runtime-CsFrthnF.js} +2 -2
- package/dist/{channel-DJBl-gwf.js → channel-COCbJwom.js} +28 -26
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-WLGVcaSf.js → channel.setup-DYQGnKPK.js} +4 -4
- package/dist/{client-DhaHONzg.js → client-km2ba2l3.js} +2 -11
- package/dist/{config-schema-BjAjs8_6.js → config-schema-BzqzFW__.js} +16 -0
- package/dist/{directory-config-Dmhi8ECy.js → directory-config-DDVHDmrN.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-D_pIXtL1.js → directory-live-DzOkmJVV.js} +2 -2
- package/dist/{interactive-replies-DrBq4Mld.js → interactive-replies-D-22gTp3.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-NLAYFat2.js → message-tool-api--zYyTqrR.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Bxdbet-b.js → monitor-Cy-0xYgF.js} +3 -3
- package/dist/{outbound-adapter-CBFfXlOI.js → outbound-adapter-CzX4D5K_.js} +3 -3
- package/dist/{pipeline.runtime-DQXhebqH.js → pipeline.runtime-5R4HgM_7.js} +13 -12
- package/dist/{policy-Dfbxkneh.js → policy-Bi92bs5t.js} +1 -1
- package/dist/{probe-C3PL00Ms.js → probe-BRsYAcGR.js} +1 -1
- package/dist/{provider-DNl27IZC.js → provider-7YKru1TZ.js} +159 -82
- package/dist/relay-source-42fP7Ktr.js +278 -0
- package/dist/{replies-CH4Dmgbr.js → replies-Dlxge48k.js} +3 -2
- package/dist/{reply-blocks-DSfujQlj.js → reply-blocks-BT_sNsDQ.js} +2 -2
- package/dist/{resolve-channels-DNiE0Z0_.js → resolve-channels-CtUOIX8D.js} +1 -1
- package/dist/{resolve-users-D_TmaIfG.js → resolve-users-DfFN2BcP.js} +1 -1
- package/dist/{runtime-api-DYg05-Op.js → runtime-api-ClM1_yX2.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-CR4oXiXN.js → scopes-CNKZU1t1.js} +1 -1
- package/dist/{secret-contract-g_PPWuoD.js → secret-contract-C3ChHo5A.js} +46 -6
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-EpqsWCGd.js → send-CRoD-UQw.js} +41 -24
- package/dist/send.runtime-C_y65BU0.js +2 -0
- package/dist/{setup-core-POfI_bgP.js → setup-core-BCGzyZhx.js} +4 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BHsOhTJd.js → setup-surface-D4GE34e2.js} +5 -5
- package/dist/{shared-BxzdaqOc.js → shared-BtJS2bUx.js} +8 -7
- package/dist/{slash-dispatch.runtime-BOl9Cbn9.js → slash-dispatch.runtime-D1qKAWNN.js} +1 -1
- package/npm-shrinkwrap.json +4 -3
- package/openclaw.plugin.json +203 -2
- package/package.json +8 -5
- package/skills/slack/SKILL.md +78 -0
- package/dist/accounts.runtime-BJt1IxOS.js +0 -2
- package/dist/action-runtime.runtime-CJyuCUxj.js +0 -2
- package/dist/send.runtime-CbeGF-al.js +0 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolution";
|
|
2
|
+
//#region extensions/slack/src/account-configured.ts
|
|
3
|
+
function isSlackPluginAccountConfigured(account) {
|
|
4
|
+
const mode = account.config.mode ?? "socket";
|
|
5
|
+
if (!Boolean(account.botToken?.trim())) return false;
|
|
6
|
+
if (mode === "http") return hasConfiguredAccountValue(account.config.signingSecret);
|
|
7
|
+
if (mode === "relay") {
|
|
8
|
+
const relay = account.config.relay;
|
|
9
|
+
return hasConfiguredAccountValue(relay?.url) && hasConfiguredAccountValue(relay?.authToken) && hasConfiguredAccountValue(relay?.gatewayId);
|
|
10
|
+
}
|
|
11
|
+
return Boolean(account.appToken?.trim());
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { isSlackPluginAccountConfigured as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-
|
|
1
|
+
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-BPCiCe8y.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";
|
|
@@ -26,17 +26,19 @@ function inspectSlackAccount(params) {
|
|
|
26
26
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
27
27
|
const mode = merged.mode ?? "socket";
|
|
28
28
|
const isHttpMode = mode === "http";
|
|
29
|
+
const isRelayMode = mode === "relay";
|
|
29
30
|
const configBot = inspectSlackToken(merged.botToken);
|
|
30
31
|
const configApp = inspectSlackToken(merged.appToken);
|
|
31
32
|
const configSigningSecret = inspectSlackToken(merged.signingSecret);
|
|
32
33
|
const configUser = inspectSlackToken(merged.userToken);
|
|
33
34
|
const envBot = allowEnv ? normalizeSecretInputString(params.envBotToken ?? process.env.SLACK_BOT_TOKEN) : void 0;
|
|
34
|
-
const envApp = allowEnv ? normalizeSecretInputString(params.envAppToken ?? process.env.SLACK_APP_TOKEN) : void 0;
|
|
35
|
+
const envApp = allowEnv && !isRelayMode ? normalizeSecretInputString(params.envAppToken ?? process.env.SLACK_APP_TOKEN) : void 0;
|
|
35
36
|
const envUser = allowEnv ? normalizeSecretInputString(params.envUserToken ?? process.env.SLACK_USER_TOKEN) : void 0;
|
|
36
37
|
const botToken = configBot.token ?? envBot;
|
|
37
38
|
const appToken = configApp.token ?? envApp;
|
|
38
39
|
const signingSecret = configSigningSecret.token;
|
|
39
40
|
const userToken = configUser.token ?? envUser;
|
|
41
|
+
const relayConfigured = isRelayMode && Boolean(normalizeOptionalString(merged.relay?.url)) && hasConfiguredSecretInput(merged.relay?.authToken) && Boolean(normalizeOptionalString(merged.relay?.gatewayId));
|
|
40
42
|
const botTokenSource = configBot.token ? "config" : configBot.status === "configured_unavailable" ? "config" : envBot ? "env" : "none";
|
|
41
43
|
const appTokenSource = configApp.token ? "config" : configApp.status === "configured_unavailable" ? "config" : envApp ? "env" : "none";
|
|
42
44
|
const signingSecretSource = configSigningSecret.token ? "config" : configSigningSecret.status === "configured_unavailable" ? "config" : "none";
|
|
@@ -58,7 +60,7 @@ function inspectSlackAccount(params) {
|
|
|
58
60
|
appTokenStatus: configApp.token ? "available" : configApp.status === "configured_unavailable" ? "configured_unavailable" : envApp ? "available" : "missing",
|
|
59
61
|
...isHttpMode ? { signingSecretStatus: configSigningSecret.token ? "available" : configSigningSecret.status === "configured_unavailable" ? "configured_unavailable" : "missing" } : {},
|
|
60
62
|
userTokenStatus: configUser.token ? "available" : configUser.status === "configured_unavailable" ? "configured_unavailable" : envUser ? "available" : "missing",
|
|
61
|
-
configured: isHttpMode ? (configBot.status !== "missing" || Boolean(envBot)) && configSigningSecret.status !== "missing" : (configBot.status !== "missing" || Boolean(envBot)) && (configApp.status !== "missing" || Boolean(envApp)),
|
|
63
|
+
configured: isHttpMode ? (configBot.status !== "missing" || Boolean(envBot)) && configSigningSecret.status !== "missing" : isRelayMode ? (configBot.status !== "missing" || Boolean(envBot)) && relayConfigured : (configBot.status !== "missing" || Boolean(envBot)) && (configApp.status !== "missing" || Boolean(envApp)),
|
|
62
64
|
config: merged,
|
|
63
65
|
groupPolicy: merged.groupPolicy,
|
|
64
66
|
textChunkLimit: merged.textChunkLimit,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
|
|
2
2
|
//#region extensions/slack/account-inspect-api.ts
|
|
3
3
|
function inspectSlackReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectSlackAccount({
|
|
@@ -42,6 +42,7 @@ const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("sl
|
|
|
42
42
|
const slack = cfg.channels?.slack;
|
|
43
43
|
if (!(hasConfiguredAccountValue(slack?.botToken) || hasConfiguredAccountValue(process.env.SLACK_BOT_TOKEN))) return false;
|
|
44
44
|
if (slack?.mode === "http") return hasConfiguredAccountValue(slack.signingSecret);
|
|
45
|
+
if (slack?.mode === "relay") return hasConfiguredAccountValue(slack.relay?.url) && hasConfiguredAccountValue(slack.relay?.authToken) && hasConfiguredAccountValue(slack.relay?.gatewayId);
|
|
45
46
|
return hasConfiguredAccountValue(slack?.appToken) || hasConfiguredAccountValue(process.env.SLACK_APP_TOKEN);
|
|
46
47
|
} });
|
|
47
48
|
const listSlackAccountIds = listAccountIds;
|
|
@@ -90,7 +91,7 @@ function mergeSlackAccountConfig(cfg, accountId) {
|
|
|
90
91
|
channelConfig: cfg.channels?.slack,
|
|
91
92
|
accounts: cfg.channels?.slack?.accounts,
|
|
92
93
|
accountId,
|
|
93
|
-
nestedObjectKeys: ["botLoopProtection"]
|
|
94
|
+
nestedObjectKeys: ["botLoopProtection", "relay"]
|
|
94
95
|
});
|
|
95
96
|
const streaming = mergeSlackStreamingConfig((cfg.channels?.slack)?.streaming, accountConfig?.streaming);
|
|
96
97
|
return streaming !== void 0 ? {
|
|
@@ -138,7 +139,7 @@ function resolveSlackAccount(params) {
|
|
|
138
139
|
const mode = merged.mode ?? "socket";
|
|
139
140
|
const baseAllowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
140
141
|
const botActive = enabled;
|
|
141
|
-
const appActive = enabled && mode
|
|
142
|
+
const appActive = enabled && mode === "socket";
|
|
142
143
|
const userActive = enabled;
|
|
143
144
|
const envBot = botActive && baseAllowEnv ? resolveSlackBotToken(process.env.SLACK_BOT_TOKEN) : void 0;
|
|
144
145
|
const envApp = appActive && baseAllowEnv ? resolveSlackAppToken(process.env.SLACK_APP_TOKEN) : void 0;
|
|
@@ -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-
|
|
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-
|
|
5
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
3
|
+
import { r as parseSlackBlocksInput } from "./reply-blocks-BT_sNsDQ.js";
|
|
4
|
+
import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-ClM1_yX2.js";
|
|
5
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
|
|
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-DkFXr3-k.js");
|
|
28
28
|
return slackActionsRuntimePromise;
|
|
29
29
|
}
|
|
30
30
|
function loadSlackAccountsRuntime() {
|
|
31
|
-
slackAccountsRuntimePromise ??= import("./accounts.runtime-
|
|
31
|
+
slackAccountsRuntimePromise ??= import("./accounts.runtime-CgWgzjLX.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, d as resolveSlackBotToken } from "./accounts-
|
|
3
|
-
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-
|
|
4
|
-
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-
|
|
5
|
-
import {
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-BPCiCe8y.js";
|
|
3
|
+
import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
|
|
4
|
+
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
5
|
+
import { l as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-CRoD-UQw.js";
|
|
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-OhnDIN4l.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-BPCiCe8y.js";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
|
|
4
4
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-3jYH8LfB.js";
|
|
5
5
|
import "./targets-Dll4NJgs.js";
|
|
6
|
-
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-
|
|
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 {
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
12
|
-
import {
|
|
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-
|
|
6
|
+
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-COCbJwom.js";
|
|
7
|
+
import { c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, i as validateSlackBlocksArray, l as normalizeAllowList, m as resolveSlackUserAllowed, n as SLACK_MAX_BLOCKS, o as resolveSlackGroupRequireMention, p as resolveSlackAllowListMatch, r as parseSlackBlocksInput, s as resolveSlackGroupToolPolicy, u as normalizeAllowListLower } from "./reply-blocks-BT_sNsDQ.js";
|
|
8
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api--zYyTqrR.js";
|
|
9
|
+
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
|
|
10
|
+
import { a as getSlackWriteClient, c as resolveSlackWebClientOptions, i as createSlackWriteClient, l as resolveSlackWriteClientOptions, n as createSlackTokenCacheKey, o as SLACK_DEFAULT_RETRY_OPTIONS, r as createSlackWebClient, s as SLACK_WRITE_RETRY_OPTIONS, t as clearSlackWriteClientCacheForTest } from "./client-km2ba2l3.js";
|
|
11
|
+
import { t as slackSetupPlugin } from "./channel.setup-DYQGnKPK.js";
|
|
12
|
+
import { i as hasSlackThreadParticipation, o as recordSlackThreadParticipation, r as clearSlackThreadParticipationCache } from "./send-CRoD-UQw.js";
|
|
13
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-OhnDIN4l.js";
|
|
14
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-DDVHDmrN.js";
|
|
15
|
+
import { t as probeSlack } from "./probe-BRsYAcGR.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-7YKru1TZ.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-BT_sNsDQ.js";
|
|
2
|
+
import { t as sendMessageSlack } from "./send-CRoD-UQw.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,14 +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-BPCiCe8y.js";
|
|
2
2
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-3jYH8LfB.js";
|
|
3
3
|
import { t as slackContextTargetsMatch } from "./targets-Dll4NJgs.js";
|
|
4
|
-
import { A as shouldHandleSlackPluginViaForwardingSession, C as normalizeSlackForwardTarget, D as resolveSlackFallbackOriginTarget, E as resolveSlackApprovalKind, F as isSlackExecApprovalAuthorizedSender, I as isSlackExecApprovalClientEnabled, M as getSlackApprovalApprovers, N as isSlackApprovalAuthorizedSender, O as resolveTurnSourceSlackOriginTarget, P as getSlackExecApprovalApprovers, R as resolveSlackExecApprovalTarget, S as isSlackAnyNativeApprovalClientEnabled, T as resolveSessionSlackOriginTarget, _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, j as slackTargetsMatch, k as shouldHandleSlackNativeApprovalRequest, o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy, t as resolveSlackReplyBlocks, u as normalizeAllowListLower, w as normalizeSlackOriginTarget, x as hasSlackPluginApprovers, z as shouldSuppressLocalSlackExecApprovalPrompt } from "./reply-blocks-
|
|
5
|
-
import {
|
|
4
|
+
import { A as shouldHandleSlackPluginViaForwardingSession, C as normalizeSlackForwardTarget, D as resolveSlackFallbackOriginTarget, E as resolveSlackApprovalKind, F as isSlackExecApprovalAuthorizedSender, I as isSlackExecApprovalClientEnabled, M as getSlackApprovalApprovers, N as isSlackApprovalAuthorizedSender, O as resolveTurnSourceSlackOriginTarget, P as getSlackExecApprovalApprovers, R as resolveSlackExecApprovalTarget, S as isSlackAnyNativeApprovalClientEnabled, T as resolveSessionSlackOriginTarget, _ as resolveSlackInteractiveBlockOffsets, a as SLACK_TEXT_LIMIT, g as buildSlackPresentationBlocks, h as buildSlackInteractiveBlocks, j as slackTargetsMatch, k as shouldHandleSlackNativeApprovalRequest, o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy, t as resolveSlackReplyBlocks, u as normalizeAllowListLower, w as normalizeSlackOriginTarget, x as hasSlackPluginApprovers, z as shouldSuppressLocalSlackExecApprovalPrompt } from "./reply-blocks-BT_sNsDQ.js";
|
|
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--zYyTqrR.js";
|
|
8
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
|
|
9
|
+
import { d as PAIRING_APPROVED_MESSAGE, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID$1 } from "./client-km2ba2l3.js";
|
|
9
10
|
import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
10
|
-
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-
|
|
11
|
-
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-BtJS2bUx.js";
|
|
12
|
+
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-BCGzyZhx.js";
|
|
12
13
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
13
14
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
15
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -133,7 +134,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
133
134
|
approvalKind: resolveSlackApprovalKind(request),
|
|
134
135
|
request
|
|
135
136
|
}),
|
|
136
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
137
|
+
load: async () => (await import("./approval-handler.runtime-CsFrthnF.js")).slackApprovalNativeRuntime
|
|
137
138
|
})
|
|
138
139
|
});
|
|
139
140
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -361,7 +362,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = new Set([
|
|
|
361
362
|
"uploadFile"
|
|
362
363
|
]);
|
|
363
364
|
async function loadSlackActionRuntime$1() {
|
|
364
|
-
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-
|
|
365
|
+
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-CIYPRrNy.js");
|
|
365
366
|
return await slackActionRuntimePromise$1;
|
|
366
367
|
}
|
|
367
368
|
function resolveSlackActionContext(params) {
|
|
@@ -494,9 +495,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
494
495
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
495
496
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
496
497
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
497
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
498
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
499
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
498
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-D4GE34e2.js"));
|
|
499
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CNKZU1t1.js"));
|
|
500
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-CzX4D5K_.js"));
|
|
500
501
|
async function resolveSlackHandleAction() {
|
|
501
502
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
502
503
|
}
|
|
@@ -504,7 +505,7 @@ function shouldTreatSlackDeliveredTextAsVisible(params) {
|
|
|
504
505
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
505
506
|
}
|
|
506
507
|
function getTokenForOperation(account, operation) {
|
|
507
|
-
const userToken = normalizeOptionalString(account.
|
|
508
|
+
const userToken = normalizeOptionalString(account.userToken);
|
|
508
509
|
const botToken = normalizeOptionalString(account.botToken);
|
|
509
510
|
const allowUserWrites = account.config.userTokenReadOnly === false;
|
|
510
511
|
if (operation === "read") return userToken ?? botToken;
|
|
@@ -516,27 +517,27 @@ let slackSendRuntimePromise;
|
|
|
516
517
|
let slackProbeModulePromise;
|
|
517
518
|
let slackMonitorModulePromise;
|
|
518
519
|
let slackDirectoryLiveModulePromise;
|
|
519
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
520
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
521
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
520
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-DDVHDmrN.js").then((n) => n.t));
|
|
521
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CtUOIX8D.js").then((n) => n.n));
|
|
522
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DfFN2BcP.js").then((n) => n.n));
|
|
522
523
|
async function loadSlackActionRuntime() {
|
|
523
|
-
slackActionRuntimePromise ??= import("./action-runtime.runtime-
|
|
524
|
+
slackActionRuntimePromise ??= import("./action-runtime.runtime-CIYPRrNy.js");
|
|
524
525
|
return await slackActionRuntimePromise;
|
|
525
526
|
}
|
|
526
527
|
async function loadSlackSendRuntime() {
|
|
527
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
528
|
+
slackSendRuntimePromise ??= import("./send.runtime-C_y65BU0.js");
|
|
528
529
|
return await slackSendRuntimePromise;
|
|
529
530
|
}
|
|
530
531
|
async function loadSlackProbeModule() {
|
|
531
|
-
slackProbeModulePromise ??= import("./probe-
|
|
532
|
+
slackProbeModulePromise ??= import("./probe-BRsYAcGR.js").then((n) => n.n);
|
|
532
533
|
return await slackProbeModulePromise;
|
|
533
534
|
}
|
|
534
535
|
async function loadSlackMonitorModule() {
|
|
535
|
-
slackMonitorModulePromise ??= import("./monitor-
|
|
536
|
+
slackMonitorModulePromise ??= import("./monitor-Cy-0xYgF.js").then((n) => n.t);
|
|
536
537
|
return await slackMonitorModulePromise;
|
|
537
538
|
}
|
|
538
539
|
async function loadSlackDirectoryLiveModule() {
|
|
539
|
-
slackDirectoryLiveModulePromise ??= import("./directory-live-
|
|
540
|
+
slackDirectoryLiveModulePromise ??= import("./directory-live-DzOkmJVV.js").then((n) => n.t);
|
|
540
541
|
return await slackDirectoryLiveModulePromise;
|
|
541
542
|
}
|
|
542
543
|
async function resolveSlackSendContext(params) {
|
|
@@ -661,7 +662,7 @@ const resolveSlackAllowlistGroupOverrides = createFlatAllowlistOverrideResolver(
|
|
|
661
662
|
});
|
|
662
663
|
const resolveSlackAllowlistNames = createAccountScopedAllowlistNameResolver({
|
|
663
664
|
resolveAccount: resolveSlackAccount,
|
|
664
|
-
resolveToken: (account) => normalizeOptionalString(account.
|
|
665
|
+
resolveToken: (account) => normalizeOptionalString(account.userToken) ?? normalizeOptionalString(account.botToken),
|
|
665
666
|
resolveNames: async ({ token, entries }) => (await loadSlackResolveUsersModule()).resolveSlackUserAllowlist({
|
|
666
667
|
token,
|
|
667
668
|
entries
|
|
@@ -868,7 +869,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
868
869
|
});
|
|
869
870
|
const { resolveTargetsWithOptionalToken } = await loadTargetResolverRuntimeSdk();
|
|
870
871
|
if (kind === "group") return resolveTargetsWithOptionalToken({
|
|
871
|
-
token: normalizeOptionalString(account.
|
|
872
|
+
token: normalizeOptionalString(account.userToken) ?? normalizeOptionalString(account.botToken),
|
|
872
873
|
inputs,
|
|
873
874
|
missingTokenNote: "missing Slack token",
|
|
874
875
|
resolveWithToken: async ({ token, inputs: inputsValue }) => (await loadSlackResolveChannelsModule()).resolveSlackChannelAllowlist({
|
|
@@ -878,7 +879,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
878
879
|
mapResolved: (entry) => toResolvedTarget(entry, entry.archived ? "archived" : void 0)
|
|
879
880
|
});
|
|
880
881
|
return resolveTargetsWithOptionalToken({
|
|
881
|
-
token: normalizeOptionalString(account.
|
|
882
|
+
token: normalizeOptionalString(account.userToken) ?? normalizeOptionalString(account.botToken),
|
|
882
883
|
inputs,
|
|
883
884
|
missingTokenNote: "missing Slack token",
|
|
884
885
|
resolveWithToken: async ({ token, inputs: inputsLocal }) => (await loadSlackResolveUsersModule()).resolveSlackUserAllowlist({
|
|
@@ -921,7 +922,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
921
922
|
const lines = [];
|
|
922
923
|
const details = {};
|
|
923
924
|
const botToken = account.botToken?.trim();
|
|
924
|
-
const userToken = account.
|
|
925
|
+
const userToken = account.userToken?.trim();
|
|
925
926
|
const { fetchSlackScopes } = await loadSlackScopesModule();
|
|
926
927
|
const botScopes = botToken ? await fetchSlackScopes(botToken, timeoutMs) : {
|
|
927
928
|
ok: false,
|
|
@@ -946,7 +947,8 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
946
947
|
};
|
|
947
948
|
},
|
|
948
949
|
resolveAccountSnapshot: ({ account }) => {
|
|
949
|
-
const
|
|
950
|
+
const mode = account.config.mode ?? "socket";
|
|
951
|
+
const configured = (mode === "http" ? resolveConfiguredFromRequiredCredentialStatuses(account, ["botTokenStatus", "signingSecretStatus"]) : mode === "socket" ? resolveConfiguredFromRequiredCredentialStatuses(account, ["botTokenStatus", "appTokenStatus"]) : void 0) ?? isSlackPluginAccountConfigured(account);
|
|
950
952
|
return {
|
|
951
953
|
accountId: account.accountId,
|
|
952
954
|
name: account.name,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-BzqzFW__.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-COCbJwom.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-
|
|
3
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-BPCiCe8y.js";
|
|
2
|
+
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-BCGzyZhx.js";
|
|
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-D4GE34e2.js")).slackSetupWizard }));
|
|
8
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
9
9
|
sectionKey: SLACK_CHANNEL,
|
|
10
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import "./target-parsing-3jYH8LfB.js";
|
|
2
|
-
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$
|
|
3
|
-
import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolution";
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
4
3
|
import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
|
|
5
4
|
import { createHash } from "node:crypto";
|
|
6
5
|
import { WebClient } from "@slack/web-api";
|
|
7
6
|
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
8
|
-
//#region extensions/slack/src/account-configured.ts
|
|
9
|
-
function isSlackPluginAccountConfigured(account) {
|
|
10
|
-
const mode = account.config.mode ?? "socket";
|
|
11
|
-
if (!Boolean(account.botToken?.trim())) return false;
|
|
12
|
-
if (mode === "http") return hasConfiguredAccountValue(account.config.signingSecret);
|
|
13
|
-
return Boolean(account.appToken?.trim());
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
7
|
//#region extensions/slack/src/channel-api.ts
|
|
17
8
|
const SLACK_CHANNEL_META = {
|
|
18
9
|
id: "slack",
|
|
@@ -112,4 +103,4 @@ function clearSlackWriteClientCacheForTest() {
|
|
|
112
103
|
slackWriteClientCache.clear();
|
|
113
104
|
}
|
|
114
105
|
//#endregion
|
|
115
|
-
export { getSlackWriteClient as a, resolveSlackWebClientOptions as c, PAIRING_APPROVED_MESSAGE as d, getChatChannelMeta as f,
|
|
106
|
+
export { getSlackWriteClient as a, resolveSlackWebClientOptions as c, PAIRING_APPROVED_MESSAGE as d, getChatChannelMeta as f, createSlackWriteClient as i, resolveSlackWriteClientOptions as l, resolveConfiguredFromRequiredCredentialStatuses as m, createSlackTokenCacheKey as n, SLACK_DEFAULT_RETRY_OPTIONS as o, projectCredentialSnapshotFields as p, createSlackWebClient as r, SLACK_WRITE_RETRY_OPTIONS as s, clearSlackWriteClientCacheForTest as t, DEFAULT_ACCOUNT_ID$1 as u };
|
|
@@ -82,6 +82,22 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
82
82
|
label: "Slack Socket Mode Ping/Pong Logging",
|
|
83
83
|
help: "Enable Slack SDK ping/pong transport logs while debugging Socket Mode websocket health."
|
|
84
84
|
},
|
|
85
|
+
relay: {
|
|
86
|
+
label: "Slack Relay Mode",
|
|
87
|
+
help: "Relay-delivered Slack events. Use with mode=\"relay\" when openclaw-slack-router owns the Slack Socket Mode connection."
|
|
88
|
+
},
|
|
89
|
+
"relay.url": {
|
|
90
|
+
label: "Slack Relay URL",
|
|
91
|
+
help: "Full websocket URL for openclaw-slack-router. Include the route path, for example ws://127.0.0.1:8081/gateway/ws."
|
|
92
|
+
},
|
|
93
|
+
"relay.authToken": {
|
|
94
|
+
label: "Slack Relay Auth Token",
|
|
95
|
+
help: "Bearer token used by this gateway to authenticate its reverse websocket connection to openclaw-slack-router."
|
|
96
|
+
},
|
|
97
|
+
"relay.gatewayId": {
|
|
98
|
+
label: "Slack Relay Gateway ID",
|
|
99
|
+
help: "Destination id that openclaw-slack-router uses when routing user-group mentions to this gateway."
|
|
100
|
+
},
|
|
85
101
|
botToken: {
|
|
86
102
|
label: "Slack Bot Token",
|
|
87
103
|
help: "Slack bot token used for standard chat actions in the configured workspace. Keep this credential scoped and rotate if workspace app permissions change."
|
|
@@ -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-BPCiCe8y.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-DDVHDmrN.js";
|
|
2
2
|
export { listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { r as createSlackWebClient } from "./client-
|
|
2
|
+
import { a as resolveSlackAccount } from "./accounts-BPCiCe8y.js";
|
|
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
|
|
6
6
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId } from "./accounts-BPCiCe8y.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-D-22gTp3.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-BPCiCe8y.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-D-22gTp3.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--zYyTqrR.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,
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { t as monitorSlackProvider, x as buildSlackSlashCommandMatcher } from "./provider-7YKru1TZ.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-Dlxge48k.js";
|
|
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-BT_sNsDQ.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-D-22gTp3.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-C_y65BU0.js");
|
|
14
14
|
return await slackSendRuntimePromise;
|
|
15
15
|
}
|
|
16
16
|
function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as resolveSlackReplyToMode } from "./accounts-
|
|
1
|
+
import { l as resolveSlackReplyToMode } from "./accounts-BPCiCe8y.js";
|
|
2
2
|
import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
|
|
3
3
|
import "./targets-Dll4NJgs.js";
|
|
4
|
-
import { a as SLACK_TEXT_LIMIT, d as normalizeSlackAllowOwnerEntry, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-
|
|
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-BT_sNsDQ.js";
|
|
5
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
|
|
6
6
|
import { n as resolveSlackNativeStreaming, r as resolveSlackStreamingMode, t as mapStreamingModeToSlackLegacyDraftStreamMode } from "./streaming-compat-DjlgH-Be.js";
|
|
7
|
-
import { a as
|
|
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-CRoD-UQw.js";
|
|
8
|
+
import { _ as resolveSlackThreadStarter, b as buildSlackEditTextPayload, f as removeSlackReaction, g as resolveSlackThreadHistory, l as reactSlackMessage, r as editSlackMessage, t as deleteSlackMessage, y as formatSlackFileReference } from "./actions-OhnDIN4l.js";
|
|
9
9
|
import { t as formatSlackError } from "./errors-CZtmv-h0.js";
|
|
10
|
-
import {
|
|
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-7YKru1TZ.js";
|
|
11
|
+
import { n as resolveSlackChannelConfig } from "./policy-Bi92bs5t.js";
|
|
12
|
+
import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-Dlxge48k.js";
|
|
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";
|
|
@@ -813,7 +813,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
813
813
|
username: outboundIdentity.name,
|
|
814
814
|
iconUrl: outboundIdentity.avatarUrl,
|
|
815
815
|
iconEmoji: outboundIdentity.emoji
|
|
816
|
-
} :
|
|
816
|
+
} : prepared.relayIdentity;
|
|
817
817
|
if (prepared.isDirectMessage) {
|
|
818
818
|
const sessionCfg = cfg.session;
|
|
819
819
|
const storePath = resolveStorePath(sessionCfg?.store, { agentId: route.agentId });
|
|
@@ -989,7 +989,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
989
989
|
});
|
|
990
990
|
const previewStreamingEnabled = !sourceRepliesAreToolOnly && shouldEnableSlackPreviewStreaming({ mode: slackStreaming.mode });
|
|
991
991
|
const useStreaming = shouldUseStreaming({
|
|
992
|
-
streamingEnabled: !sourceRepliesAreToolOnly && isSlackStreamingEnabled({
|
|
992
|
+
streamingEnabled: !slackIdentity && !sourceRepliesAreToolOnly && isSlackStreamingEnabled({
|
|
993
993
|
mode: slackStreaming.mode,
|
|
994
994
|
nativeStreaming: slackStreaming.nativeStreaming,
|
|
995
995
|
nativeProgressTaskCards: resolveSlackNativeProgressTaskCards(account.config)
|
|
@@ -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-OhnDIN4l.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-OhnDIN4l.js").then((n) => n.h);
|
|
2550
2550
|
return slackMediaModulePromise;
|
|
2551
2551
|
}
|
|
2552
2552
|
const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
|
|
@@ -3647,6 +3647,7 @@ async function prepareSlackMessage(params) {
|
|
|
3647
3647
|
ctx,
|
|
3648
3648
|
account,
|
|
3649
3649
|
message,
|
|
3650
|
+
...opts.relayIdentity ? { relayIdentity: opts.relayIdentity } : {},
|
|
3650
3651
|
route,
|
|
3651
3652
|
channelConfig,
|
|
3652
3653
|
replyTarget,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as normalizeSlackSlug } from "./reply-blocks-
|
|
1
|
+
import { f as normalizeSlackSlug } from "./reply-blocks-BT_sNsDQ.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { applyChannelMatchMeta, buildChannelKeyCandidates, resolveChannelEntryMatchWithFallback } from "openclaw/plugin-sdk/channel-targets";
|
|
4
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { r as createSlackWebClient } from "./client-
|
|
2
|
+
import { r as createSlackWebClient } from "./client-km2ba2l3.js";
|
|
3
3
|
import { t as formatSlackError } from "./errors-CZtmv-h0.js";
|
|
4
4
|
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
5
|
//#region extensions/slack/src/probe.ts
|