@openclaw/slack 2026.7.2-beta.2 → 2026.7.2-beta.3
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 → account-configured-BwfXBo_F.js} +1 -1
- package/dist/{account-inspect-Di7ditqZ.js → account-inspect-Bvbtu3iH.js} +9 -2
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BOJJiHSr.js → accounts-DQEbYKh9.js} +9 -0
- package/dist/accounts.runtime-BIKmJdtJ.js +2 -0
- package/dist/{action-runtime-Cee2ih0s.js → action-runtime-DqkRwO3Z.js} +10 -16
- package/dist/action-runtime.runtime-DEWOcFM4.js +2 -0
- package/dist/{actions-BZiuSTIq.js → actions-CF0tUY5q.js} +4 -4
- package/dist/{actions.runtime-DoD0-gxw.js → actions.runtime-hCbx4RXg.js} +1 -1
- package/dist/api.js +13 -14
- package/dist/{approval-handler.runtime-CUPtIM4k.js → approval-handler.runtime-Em8I1-8-.js} +2 -2
- package/dist/{channel-DaIiGUOp.js → channel-4-TRi1D6.js} +72 -40
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-Cfm6_6n1.js → channel-type-Cu1yjNg2.js} +3 -3
- package/dist/{channel.setup-C-mLz50O.js → channel.setup-CgkADtZg.js} +6 -4
- package/dist/{config-schema-xPSnK2VK.js → config-schema-XjJGfwQC.js} +6 -5
- package/dist/{directory-config-DRkFujwG.js → directory-config-Bv0lcUlH.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-D_yZhjgp.js → directory-live-CzUIB7th.js} +2 -2
- package/dist/{doctor-contract-DddfkMlF.js → doctor-contract-DKpe5VBr.js} +80 -12
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-85UWiriS.js → group-policy-Bw-65m3V.js} +67 -121
- package/dist/{interactive-replies-BilWUdcI.js → interactive-replies-Dm_t2R9S.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-CA9jZrCY.js → message-tool-api-C2pcf5du.js} +3 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CalGciTs.js → monitor-CNFeF30h.js} +3 -3
- package/dist/{outbound-adapter-BiLKcnyH.js → outbound-adapter-CVi2uok0.js} +49 -5
- package/dist/{pipeline.runtime-DofAvTtb.js → pipeline.runtime-CTvokbty.js} +391 -279
- package/dist/{policy-BVs4LiSa.js → policy-b_dOPDCq.js} +1 -1
- package/dist/probe-Borhn9PQ.js +340 -0
- package/dist/{provider-CmeoUiIM.js → provider-B-HVL5ZE.js} +573 -306
- package/dist/{relay-source-DMmgtvg4.js → relay-source-Ea_P9VcO.js} +6 -11
- package/dist/{replies-CJJCp6qz.js → replies-B4bOdrYb.js} +3 -3
- package/dist/{resolve-channels-Rfts6POK.js → resolve-channels-KTc568SU.js} +1 -1
- package/dist/{resolve-users-y6wAxR8E.js → resolve-users-DeGJf1yp.js} +1 -1
- package/dist/{runtime-api-BGDyOt1D.js → runtime-api-BFfNpzDe.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-CuxNQZ6v.js → scopes-lx08L56K.js} +1 -2
- package/dist/{secret-contract-CMohXFWS.js → secret-contract-DxmvbxBF.js} +1 -0
- package/dist/secret-contract-api.js +1 -1
- package/dist/{send-DYp8ca-l.js → send-KuTDky7i.js} +28 -11
- package/dist/send.runtime-CXyxws1D.js +2 -0
- package/dist/{setup-core-CkwVLzFO.js → setup-core-CeiAVwQ3.js} +218 -53
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-oSd3NX9J.js → setup-surface-DLA0vHXp.js} +23 -13
- package/dist/{shared-D9yz5Otg.js → shared-C4yVB0Q-.js} +55 -9
- package/dist/{slash-dispatch.runtime-CSja9VuD.js → slash-dispatch.runtime-BT-mMm-f.js} +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/openclaw.plugin.json +66 -10
- package/package.json +4 -4
- package/dist/accounts.runtime-KvftRRek.js +0 -2
- package/dist/action-runtime.runtime-DZfd7IFr.js +0 -2
- package/dist/client-WIPAS3Yr.js +0 -160
- package/dist/probe-CN0ssfLN.js +0 -48
- package/dist/send.runtime-CJLxAt26.js +0 -2
|
@@ -2,7 +2,7 @@ import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolutio
|
|
|
2
2
|
//#region extensions/slack/src/account-configured.ts
|
|
3
3
|
function isSlackPluginAccountConfigured(account) {
|
|
4
4
|
const mode = account.config.mode ?? "socket";
|
|
5
|
-
if (!Boolean(account.botToken?.trim())) return false;
|
|
5
|
+
if (!(account.identity === "user" ? Boolean(account.userToken?.trim()) : Boolean(account.botToken?.trim()))) return false;
|
|
6
6
|
if (mode === "http") return hasConfiguredAccountValue(account.config.signingSecret);
|
|
7
7
|
if (mode === "relay") {
|
|
8
8
|
const relay = account.config.relay;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-
|
|
1
|
+
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-DQEbYKh9.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";
|
|
@@ -25,6 +25,7 @@ function inspectSlackAccount(params) {
|
|
|
25
25
|
const enabled = params.cfg.channels?.slack?.enabled !== false && merged.enabled !== false;
|
|
26
26
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
27
27
|
const mode = merged.mode ?? "socket";
|
|
28
|
+
const identity = merged.identity ?? "bot";
|
|
28
29
|
const isHttpMode = mode === "http";
|
|
29
30
|
const isRelayMode = mode === "relay";
|
|
30
31
|
const configBot = inspectSlackToken(merged.botToken);
|
|
@@ -46,6 +47,7 @@ function inspectSlackAccount(params) {
|
|
|
46
47
|
return {
|
|
47
48
|
accountId,
|
|
48
49
|
enabled,
|
|
50
|
+
...identity === "user" ? { identity } : {},
|
|
49
51
|
name: normalizeOptionalString(merged.name),
|
|
50
52
|
mode,
|
|
51
53
|
botToken,
|
|
@@ -60,7 +62,12 @@ function inspectSlackAccount(params) {
|
|
|
60
62
|
appTokenStatus: configApp.token ? "available" : configApp.status === "configured_unavailable" ? "configured_unavailable" : envApp ? "available" : "missing",
|
|
61
63
|
...isHttpMode ? { signingSecretStatus: configSigningSecret.token ? "available" : configSigningSecret.status === "configured_unavailable" ? "configured_unavailable" : "missing" } : {},
|
|
62
64
|
userTokenStatus: configUser.token ? "available" : configUser.status === "configured_unavailable" ? "configured_unavailable" : envUser ? "available" : "missing",
|
|
63
|
-
configured:
|
|
65
|
+
configured: (() => {
|
|
66
|
+
const identityTokenConfigured = identity === "user" ? configUser.status !== "missing" || Boolean(envUser) : configBot.status !== "missing" || Boolean(envBot);
|
|
67
|
+
if (isHttpMode) return identityTokenConfigured && configSigningSecret.status !== "missing";
|
|
68
|
+
if (isRelayMode) return identityTokenConfigured && relayConfigured;
|
|
69
|
+
return identityTokenConfigured && (configApp.status !== "missing" || Boolean(envApp));
|
|
70
|
+
})(),
|
|
64
71
|
config: merged,
|
|
65
72
|
groupPolicy: merged.groupPolicy,
|
|
66
73
|
textChunkLimit: merged.textChunkLimit,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectSlackAccount } from "./account-inspect-Bvbtu3iH.js";
|
|
2
2
|
//#region extensions/slack/account-inspect-api.ts
|
|
3
3
|
function inspectSlackReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectSlackAccount({
|
|
@@ -46,6 +46,7 @@ function resolveSlackReplyToMode(account, chatType) {
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region extensions/slack/src/accounts.ts
|
|
48
48
|
function resolveSlackOperationToken(account, operation) {
|
|
49
|
+
if (account.identity === "user") return normalizeOptionalString(account.userToken);
|
|
49
50
|
const userToken = normalizeOptionalString(account.userToken);
|
|
50
51
|
const botToken = normalizeOptionalString(account.botToken);
|
|
51
52
|
if (operation === "read") return userToken ?? botToken;
|
|
@@ -53,6 +54,12 @@ function resolveSlackOperationToken(account, operation) {
|
|
|
53
54
|
}
|
|
54
55
|
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("slack", { hasImplicitDefaultAccount: (cfg) => {
|
|
55
56
|
const slack = cfg.channels?.slack;
|
|
57
|
+
if (slack?.identity === "user") {
|
|
58
|
+
if (!(hasConfiguredAccountValue(slack.userToken) || hasConfiguredAccountValue(process.env.SLACK_USER_TOKEN))) return false;
|
|
59
|
+
if (slack.mode === "http") return hasConfiguredAccountValue(slack.signingSecret);
|
|
60
|
+
if (slack.mode === "relay") return hasConfiguredAccountValue(slack.relay?.url) && hasConfiguredAccountValue(slack.relay?.authToken) && hasConfiguredAccountValue(slack.relay?.gatewayId);
|
|
61
|
+
return hasConfiguredAccountValue(slack.appToken) || hasConfiguredAccountValue(process.env.SLACK_APP_TOKEN);
|
|
62
|
+
}
|
|
56
63
|
if (!(hasConfiguredAccountValue(slack?.botToken) || hasConfiguredAccountValue(process.env.SLACK_BOT_TOKEN))) return false;
|
|
57
64
|
if (slack?.mode === "http") return hasConfiguredAccountValue(slack.signingSecret);
|
|
58
65
|
if (slack?.mode === "relay") return hasConfiguredAccountValue(slack.relay?.url) && hasConfiguredAccountValue(slack.relay?.authToken) && hasConfiguredAccountValue(slack.relay?.gatewayId);
|
|
@@ -147,6 +154,7 @@ function resolveSlackAccount(params) {
|
|
|
147
154
|
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
148
155
|
const baseEnabled = params.cfg.channels?.slack?.enabled !== false;
|
|
149
156
|
const merged = mergeSlackAccountConfig(params.cfg, accountId);
|
|
157
|
+
const identity = merged.identity ?? "bot";
|
|
150
158
|
const accountEnabled = merged.enabled !== false;
|
|
151
159
|
const enabled = baseEnabled && accountEnabled;
|
|
152
160
|
const mode = merged.mode ?? "socket";
|
|
@@ -169,6 +177,7 @@ function resolveSlackAccount(params) {
|
|
|
169
177
|
return {
|
|
170
178
|
accountId,
|
|
171
179
|
enabled,
|
|
180
|
+
identity,
|
|
172
181
|
name: normalizeOptionalString(merged.name),
|
|
173
182
|
botToken,
|
|
174
183
|
appToken,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as resolveSlackChannelId, i as parseSlackTarget } from "./target-parsing-N6lHogYZ.js";
|
|
2
2
|
import { t as slackContextTargetsMatch } from "./targets-KmjP2E8s.js";
|
|
3
|
-
import {
|
|
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 { $ as parseSlackBlocksInput, C as hasSlackNativeDataBlock } from "./group-policy-Bw-65m3V.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-BFfNpzDe.js";
|
|
5
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-b_dOPDCq.js";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -24,9 +24,9 @@ const pinActions = /* @__PURE__ */ new Set([
|
|
|
24
24
|
"unpinMessage",
|
|
25
25
|
"listPins"
|
|
26
26
|
]);
|
|
27
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions.runtime-
|
|
28
|
-
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts.runtime-
|
|
29
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
27
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions.runtime-hCbx4RXg.js"));
|
|
28
|
+
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts.runtime-BIKmJdtJ.js"));
|
|
29
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-Cu1yjNg2.js").then((n) => n.t));
|
|
30
30
|
function createLazySlackAction(key) {
|
|
31
31
|
return (async (...args) => {
|
|
32
32
|
const action = (await loadSlackActionsRuntime())[key];
|
|
@@ -238,23 +238,17 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
238
238
|
const resolveChannelId = () => resolveSlackChannelId(readStringParam(params, "channelId", { required: true }));
|
|
239
239
|
const action = readStringParam(params, "action", { required: true });
|
|
240
240
|
const accountId = readStringParam(params, "accountId");
|
|
241
|
-
const { resolveSlackAccount } = await loadSlackAccountsRuntime();
|
|
241
|
+
const { resolveSlackAccount, resolveSlackOperationToken } = await loadSlackAccountsRuntime();
|
|
242
242
|
const account = resolveSlackAccount({
|
|
243
243
|
cfg,
|
|
244
244
|
accountId
|
|
245
245
|
});
|
|
246
246
|
if (account.config.enterpriseOrgInstall === true) throw new Error("Slack action tools are unavailable for Enterprise Grid org installs.");
|
|
247
247
|
const isActionEnabled = createActionGate(account.actions ?? cfg.channels?.slack?.actions);
|
|
248
|
-
const userToken = account.userToken;
|
|
249
248
|
const botToken = account.botToken?.trim();
|
|
250
|
-
const allowUserWrites = account.config.userTokenReadOnly === false;
|
|
251
|
-
const getTokenForOperation = (operation) => {
|
|
252
|
-
if (operation === "read") return userToken ?? botToken;
|
|
253
|
-
if (!allowUserWrites) return botToken;
|
|
254
|
-
return botToken ?? userToken;
|
|
255
|
-
};
|
|
256
249
|
const buildActionOpts = (operation) => {
|
|
257
|
-
const token =
|
|
250
|
+
const token = resolveSlackOperationToken(account, operation);
|
|
251
|
+
if (!token && account.identity === "user") throw new Error(`Slack operation token missing for account "${account.accountId}".`);
|
|
258
252
|
const tokenOverride = token && token !== botToken ? token : void 0;
|
|
259
253
|
return {
|
|
260
254
|
cfg,
|
|
@@ -464,7 +458,7 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
464
458
|
await assertReadTargetAllowed(channelId);
|
|
465
459
|
const threadId = readStringParam(params, "threadId") ?? readStringParam(params, "replyTo");
|
|
466
460
|
const maxBytes = account.config?.mediaMaxMb ? account.config.mediaMaxMb * 1024 * 1024 : 20 * 1024 * 1024;
|
|
467
|
-
const readToken =
|
|
461
|
+
const readToken = resolveSlackOperationToken(account, "read");
|
|
468
462
|
const downloaded = await slackActionRuntime.downloadSlackFile(fileId, {
|
|
469
463
|
...readOpts,
|
|
470
464
|
...readToken && !readOpts?.token ? { token: readToken } : {},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount, p as resolveSlackBotToken } from "./accounts-
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { a as resolveSlackAccount, p as resolveSlackBotToken } from "./accounts-DQEbYKh9.js";
|
|
3
|
+
import { A as buildSlackCompleteBlocksFallbackText, C as hasSlackNativeDataBlock, N as SLACK_EDIT_TEXT_LIMIT, T as stripSlackNativeDataBlocks, Y as escapeSlackMrkdwn, b as appendSlackNativeDataPlainTextFallback, et as validateSlackBlocksArray, j as renderSlackBlockFallbackText, k as buildSlackBlocksFallbackText, w as isSlackInvalidBlocksError, y as appendSlackNativeDataFallbackText, z as truncateSlackText } from "./group-policy-Bw-65m3V.js";
|
|
4
|
+
import { a as createSlackLookupClient, d as getSlackWriteClient } from "./probe-Borhn9PQ.js";
|
|
5
|
+
import { r as sendMessageSlack, u as buildSlackNativeDataDeliveryPlan } from "./send-KuTDky7i.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, p as resolveSlackConversationName, 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, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, p as resolveSlackConversationName, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-CF0tUY5q.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, resolveSlackConversationName, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -1,19 +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, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts, u as resolveSlackReplyToMode } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts, u as resolveSlackReplyToMode } from "./accounts-DQEbYKh9.js";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-Bvbtu3iH.js";
|
|
4
4
|
import { a as resolveSlackChannelId, i as parseSlackTarget, n as looksLikeSlackTargetId, r as normalizeSlackMessagingTarget } from "./target-parsing-N6lHogYZ.js";
|
|
5
5
|
import "./targets-KmjP2E8s.js";
|
|
6
|
-
import { n as buildSlackThreadingToolContext, r as resolveSlackAutoThreadId, t as slackPlugin } from "./channel-
|
|
7
|
-
import {
|
|
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-
|
|
10
|
-
import {
|
|
11
|
-
import { n as resetSlackChannelTypeCacheForTest, r as resolveSlackChannelType } from "./channel-type-
|
|
12
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
14
|
-
import {
|
|
15
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as probeSlack } from "./probe-CN0ssfLN.js";
|
|
6
|
+
import { n as buildSlackThreadingToolContext, r as resolveSlackAutoThreadId, t as slackPlugin } from "./channel-4-TRi1D6.js";
|
|
7
|
+
import { $ as parseSlackBlocksInput, I as buildSlackInteractiveBlocks, L as buildSlackPresentationBlocks, Q as SLACK_MAX_BLOCKS, a as allowListMatches, c as normalizeSlackAllowOwnerEntry, d as resolveSlackUserAllowed, et as validateSlackBlocksArray, l as normalizeSlackSlug, n as resolveSlackGroupRequireMention, o as normalizeAllowList, r as resolveSlackGroupToolPolicy, s as normalizeAllowListLower, u as resolveSlackAllowListMatch } from "./group-policy-Bw-65m3V.js";
|
|
8
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-C2pcf5du.js";
|
|
9
|
+
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-Dm_t2R9S.js";
|
|
10
|
+
import { c as createSlackWebClient, d as getSlackWriteClient, f as SLACK_DEFAULT_RETRY_OPTIONS, h as resolveSlackWriteClientOptions, i as clearSlackWriteClientCacheForTest, l as createSlackWriteClient, m as resolveSlackWebClientOptions, p as SLACK_WRITE_RETRY_OPTIONS, s as createSlackTokenCacheKey, t as probeSlack } from "./probe-Borhn9PQ.js";
|
|
11
|
+
import { n as resetSlackChannelTypeCacheForTest, r as resolveSlackChannelType } from "./channel-type-Cu1yjNg2.js";
|
|
12
|
+
import { t as slackSetupPlugin } from "./channel.setup-CgkADtZg.js";
|
|
13
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-CF0tUY5q.js";
|
|
14
|
+
import { l as recordSlackThreadParticipation, o as clearSlackThreadParticipationCache, s as hasSlackThreadParticipation } from "./send-KuTDky7i.js";
|
|
15
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-Bv0lcUlH.js";
|
|
17
16
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
|
|
18
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
17
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-B-HVL5ZE.js";
|
|
19
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 {
|
|
2
|
-
import { r as sendMessageSlack } from "./send-
|
|
1
|
+
import { ct as shouldHandleSlackNativeApprovalRequest, gt as normalizeSlackApproverId, h as resolveSlackReplyBlocks, nt as isSlackAnyNativeApprovalClientEnabled, z as truncateSlackText } from "./group-policy-Bw-65m3V.js";
|
|
2
|
+
import { r as sendMessageSlack } from "./send-KuTDky7i.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,16 +1,16 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, u as resolveSlackReplyToMode } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, u as resolveSlackReplyToMode } from "./accounts-DQEbYKh9.js";
|
|
2
2
|
import { a as resolveSlackChannelId, i as parseSlackTarget, n as looksLikeSlackTargetId, r as normalizeSlackMessagingTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-N6lHogYZ.js";
|
|
3
3
|
import { t as slackContextTargetsMatch } from "./targets-KmjP2E8s.js";
|
|
4
|
-
import {
|
|
5
|
-
import { t as isSlackPluginAccountConfigured } from "./account-configured-
|
|
4
|
+
import { F as SLACK_TEXT_LIMIT, J as renderSlackMessagePresentationFallbackText, L as buildSlackPresentationBlocks, N as SLACK_EDIT_TEXT_LIMIT, R as canRenderSlackPresentation, Z as SLACK_PRESENTATION_CAPABILITIES, _t as resolveSlackExecApprovalTarget, at as resolveSessionSlackOriginTarget, ct as shouldHandleSlackNativeApprovalRequest, dt as getSlackApprovalApprovers, ft as isSlackApprovalAuthorizedSender, g as resolveSlackReplyDeliveryMessages, h as resolveSlackReplyBlocks, ht as isSlackExecApprovalClientEnabled, i as assertSlackDirectSendAllowed, it as normalizeSlackOriginTarget, lt as shouldHandleSlackPluginViaForwardingSession, m as resolveSlackReplyBlockResolution, mt as isSlackExecApprovalAuthorizedSender, n as resolveSlackGroupRequireMention, nt as isSlackAnyNativeApprovalClientEnabled, ot as resolveSlackFallbackOriginTarget, pt as getSlackExecApprovalApprovers, r as resolveSlackGroupToolPolicy, rt as normalizeSlackForwardTarget, st as resolveTurnSourceSlackOriginTarget, tt as hasSlackPluginApprovers, ut as slackTargetsMatch, vt as shouldSuppressLocalSlackExecApprovalPrompt } from "./group-policy-Bw-65m3V.js";
|
|
5
|
+
import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.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-
|
|
9
|
-
import { _ as resolveConfiguredFromRequiredCredentialStatuses,
|
|
10
|
-
import { i as resolveSlackConversationInfo, r as resolveSlackChannelType } from "./channel-type-
|
|
7
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-C2pcf5du.js";
|
|
8
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-Dm_t2R9S.js";
|
|
9
|
+
import { _ as PAIRING_APPROVED_MESSAGE, b as resolveConfiguredFromRequiredCredentialStatuses, c as createSlackWebClient, g as DEFAULT_ACCOUNT_ID$1, r as formatSlackError, y as projectCredentialSnapshotFields } from "./probe-Borhn9PQ.js";
|
|
10
|
+
import { i as resolveSlackConversationInfo, r as resolveSlackChannelType } from "./channel-type-Cu1yjNg2.js";
|
|
11
11
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
12
|
-
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-
|
|
13
|
-
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-
|
|
12
|
+
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-C4yVB0Q-.js";
|
|
13
|
+
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-CeiAVwQ3.js";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
15
15
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -30,7 +30,7 @@ import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-s
|
|
|
30
30
|
import { createChannelNativeOriginTargetResolver, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
31
31
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
32
32
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
33
|
-
import {
|
|
33
|
+
import { normalizeLegacyInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
34
34
|
import { readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/param-readers";
|
|
35
35
|
//#region extensions/slack/src/action-threading.ts
|
|
36
36
|
function resolveSlackAutoThreadId(params) {
|
|
@@ -138,7 +138,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
138
138
|
approvalKind,
|
|
139
139
|
request
|
|
140
140
|
}),
|
|
141
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
141
|
+
load: async () => (await import("./approval-handler.runtime-Em8I1-8-.js")).slackApprovalNativeRuntime
|
|
142
142
|
})
|
|
143
143
|
});
|
|
144
144
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -222,7 +222,7 @@ async function handleSlackMessageAction(params) {
|
|
|
222
222
|
});
|
|
223
223
|
const mediaUrl = readStringParam(actionParams, "media", { trim: false });
|
|
224
224
|
const presentation = normalizeMessagePresentation(actionParams.presentation);
|
|
225
|
-
const interactive =
|
|
225
|
+
const interactive = normalizeLegacyInteractiveReply(actionParams.interactive);
|
|
226
226
|
const hasStructuredContent = Boolean(presentation || interactive?.blocks.length);
|
|
227
227
|
const resolution = resolveSlackReplyBlockResolution({
|
|
228
228
|
text: content,
|
|
@@ -401,7 +401,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
401
401
|
"unpinMessage",
|
|
402
402
|
"uploadFile"
|
|
403
403
|
]);
|
|
404
|
-
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
404
|
+
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-DEWOcFM4.js"));
|
|
405
405
|
function resolveSlackActionContext(params) {
|
|
406
406
|
if (!params.toolContext && !params.mediaLocalRoots && !params.mediaReadFile && !params.conversationReadOrigin && !params.requesterAccountId && !params.requesterSenderId) return;
|
|
407
407
|
return {
|
|
@@ -471,23 +471,23 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
471
471
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
472
472
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
473
473
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
474
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
475
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
476
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
474
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-DLA0vHXp.js"));
|
|
475
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-lx08L56K.js"));
|
|
476
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-CVi2uok0.js"));
|
|
477
477
|
async function resolveSlackHandleAction() {
|
|
478
478
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
479
479
|
}
|
|
480
480
|
function shouldTreatSlackDeliveredTextAsVisible(params) {
|
|
481
481
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
482
482
|
}
|
|
483
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
484
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
485
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
486
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
487
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
488
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
489
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
490
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
483
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-Bv0lcUlH.js").then((n) => n.t));
|
|
484
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-KTc568SU.js").then((n) => n.n));
|
|
485
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DeGJf1yp.js").then((n) => n.n));
|
|
486
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-DEWOcFM4.js"));
|
|
487
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-CXyxws1D.js"));
|
|
488
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-Borhn9PQ.js").then((n) => n.n));
|
|
489
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-CNFeF30h.js").then((n) => n.t));
|
|
490
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-CzUIB7th.js").then((n) => n.t));
|
|
491
491
|
async function resolveSlackSendContext(params) {
|
|
492
492
|
const account = resolveSlackAccount({
|
|
493
493
|
cfg: params.cfg,
|
|
@@ -957,18 +957,25 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
957
957
|
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID$1),
|
|
958
958
|
buildChannelSummary: async ({ snapshot }) => {
|
|
959
959
|
const { buildPassiveProbedChannelStatusSummary } = await loadExtensionSharedSdk();
|
|
960
|
-
return buildPassiveProbedChannelStatusSummary(snapshot, {
|
|
960
|
+
return buildPassiveProbedChannelStatusSummary(snapshot, snapshot.identity === "user" ? {
|
|
961
|
+
identity: "user",
|
|
962
|
+
userTokenSource: snapshot.userTokenSource ?? "none",
|
|
963
|
+
...snapshot.mode === "http" ? { signingSecretSource: snapshot.signingSecretSource ?? "none" } : { appTokenSource: snapshot.appTokenSource ?? "none" }
|
|
964
|
+
} : {
|
|
961
965
|
botTokenSource: snapshot.botTokenSource ?? "none",
|
|
962
966
|
appTokenSource: snapshot.appTokenSource ?? "none"
|
|
963
967
|
});
|
|
964
968
|
},
|
|
965
969
|
probeAccount: async ({ account, timeoutMs }) => {
|
|
966
|
-
const token = account.botToken?.trim();
|
|
970
|
+
const token = account.identity === "user" ? account.userToken?.trim() : account.botToken?.trim();
|
|
967
971
|
if (!token) return {
|
|
968
972
|
ok: false,
|
|
969
|
-
error: "missing token"
|
|
973
|
+
error: account.identity === "user" ? "missing user token" : "missing token"
|
|
970
974
|
};
|
|
971
|
-
return await (await loadSlackProbeModule()).probeSlack(token, timeoutMs, {
|
|
975
|
+
return await (await loadSlackProbeModule()).probeSlack(token, timeoutMs, {
|
|
976
|
+
accountId: account.accountId,
|
|
977
|
+
...account.identity === "user" ? { identity: "user" } : {}
|
|
978
|
+
});
|
|
972
979
|
},
|
|
973
980
|
formatCapabilitiesProbe: ({ probe }) => {
|
|
974
981
|
const slackProbe = probe;
|
|
@@ -978,6 +985,11 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
978
985
|
tone: "warn"
|
|
979
986
|
});
|
|
980
987
|
if (slackProbe?.bot?.name) lines.push({ text: `Bot: @${slackProbe.bot.name}` });
|
|
988
|
+
if (slackProbe?.user?.id || slackProbe?.user?.name) {
|
|
989
|
+
const name = slackProbe.user.name ? `@${slackProbe.user.name}` : "unknown";
|
|
990
|
+
const id = slackProbe.user.id ? ` (${slackProbe.user.id})` : "";
|
|
991
|
+
lines.push({ text: `User identity: ${name}${id}` });
|
|
992
|
+
}
|
|
981
993
|
if (slackProbe?.team?.name || slackProbe?.team?.id) {
|
|
982
994
|
const id = slackProbe.team?.id ? ` (${slackProbe.team.id})` : "";
|
|
983
995
|
lines.push({ text: `Team: ${slackProbe.team?.name ?? "unknown"}${id}` });
|
|
@@ -990,16 +1002,28 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
990
1002
|
const botToken = account.botToken?.trim();
|
|
991
1003
|
const userToken = account.userToken?.trim();
|
|
992
1004
|
const { fetchSlackScopes } = await loadSlackScopesModule();
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1005
|
+
if (account.identity === "user") {
|
|
1006
|
+
const userScopes = userToken ? await fetchSlackScopes(userToken, timeoutMs) : {
|
|
1007
|
+
ok: false,
|
|
1008
|
+
error: "Slack user token missing."
|
|
1009
|
+
};
|
|
1010
|
+
lines.push(formatSlackScopeDiagnostic({
|
|
1011
|
+
tokenType: "user",
|
|
1012
|
+
result: userScopes
|
|
1013
|
+
}));
|
|
1014
|
+
details.userScopes = userScopes;
|
|
1015
|
+
} else {
|
|
1016
|
+
const botScopes = botToken ? await fetchSlackScopes(botToken, timeoutMs) : {
|
|
1017
|
+
ok: false,
|
|
1018
|
+
error: "Slack bot token missing."
|
|
1019
|
+
};
|
|
1020
|
+
lines.push(formatSlackScopeDiagnostic({
|
|
1021
|
+
tokenType: "bot",
|
|
1022
|
+
result: botScopes
|
|
1023
|
+
}));
|
|
1024
|
+
details.botScopes = botScopes;
|
|
1025
|
+
}
|
|
1026
|
+
if (account.identity !== "user" && userToken) {
|
|
1003
1027
|
const userScopes = await fetchSlackScopes(userToken, timeoutMs);
|
|
1004
1028
|
lines.push(formatSlackScopeDiagnostic({
|
|
1005
1029
|
tokenType: "user",
|
|
@@ -1014,13 +1038,21 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1014
1038
|
},
|
|
1015
1039
|
resolveAccountSnapshot: ({ account }) => {
|
|
1016
1040
|
const mode = account.config.mode ?? "socket";
|
|
1017
|
-
const
|
|
1041
|
+
const identity = account.config.identity ?? "bot";
|
|
1042
|
+
const configured = (mode === "http" ? resolveConfiguredFromRequiredCredentialStatuses(account, [identity === "user" ? "userTokenStatus" : "botTokenStatus", "signingSecretStatus"]) : mode === "socket" ? resolveConfiguredFromRequiredCredentialStatuses(account, [identity === "user" ? "userTokenStatus" : "botTokenStatus", "appTokenStatus"]) : void 0) ?? isSlackPluginAccountConfigured(account);
|
|
1018
1043
|
return {
|
|
1019
1044
|
accountId: account.accountId,
|
|
1020
1045
|
name: account.name,
|
|
1021
1046
|
enabled: account.enabled,
|
|
1022
1047
|
configured,
|
|
1023
|
-
extra: {
|
|
1048
|
+
extra: {
|
|
1049
|
+
...projectCredentialSnapshotFields(account),
|
|
1050
|
+
...identity === "user" ? {
|
|
1051
|
+
identity,
|
|
1052
|
+
mode,
|
|
1053
|
+
userTokenSource: account.userTokenSource
|
|
1054
|
+
} : {}
|
|
1055
|
+
}
|
|
1024
1056
|
};
|
|
1025
1057
|
}
|
|
1026
1058
|
}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-XjJGfwQC.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-4-TRi1D6.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-DQEbYKh9.js";
|
|
3
|
+
import { s as normalizeAllowListLower } from "./group-policy-Bw-65m3V.js";
|
|
4
|
+
import { c as createSlackWebClient } from "./probe-Borhn9PQ.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -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-DQEbYKh9.js";
|
|
2
|
+
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-CeiAVwQ3.js";
|
|
3
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-XjJGfwQC.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-DLA0vHXp.js")).slackSetupWizard }));
|
|
8
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
9
9
|
sectionKey: SLACK_CHANNEL,
|
|
10
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -14,6 +14,8 @@ const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
14
14
|
clearBaseFields: [
|
|
15
15
|
"botToken",
|
|
16
16
|
"appToken",
|
|
17
|
+
"userToken",
|
|
18
|
+
"signingSecret",
|
|
17
19
|
"name"
|
|
18
20
|
],
|
|
19
21
|
resolveAllowFrom: (account) => account.allowFrom,
|
|
@@ -11,6 +11,10 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
11
11
|
label: "Slack Enterprise Grid Org Install",
|
|
12
12
|
help: "Enable only for an Enterprise Grid org-wide bot installation. OpenClaw verifies the token with Slack auth.test at startup; DMs must be disabled or use dmPolicy=\"open\" with allowFrom=[\"*\"]."
|
|
13
13
|
},
|
|
14
|
+
identity: {
|
|
15
|
+
label: "Slack Identity",
|
|
16
|
+
help: "Select \"bot\" (default) for the classic Slack app/bot identity or \"user\" to post as the authorizing human through a user token while the app carries event transport."
|
|
17
|
+
},
|
|
14
18
|
...createChannelConfigUiHints({
|
|
15
19
|
channelLabel: "Slack",
|
|
16
20
|
dmPolicy: {
|
|
@@ -23,7 +27,8 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
23
27
|
policyNote: "Native Slack @mentions still trigger even when regex patterns are denied.",
|
|
24
28
|
denyNote: "Native @mentions still trigger."
|
|
25
29
|
},
|
|
26
|
-
nativeCommands: true
|
|
30
|
+
nativeCommands: true,
|
|
31
|
+
implicitMentions: true
|
|
27
32
|
}),
|
|
28
33
|
allowBots: {
|
|
29
34
|
label: "Slack Allow Bot Messages",
|
|
@@ -212,10 +217,6 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
212
217
|
"thread.initialHistoryLimit": {
|
|
213
218
|
label: "Slack Thread Initial History Limit",
|
|
214
219
|
help: "Maximum number of existing Slack thread messages to fetch when starting a new thread session (default: 20, set to 0 to disable)."
|
|
215
|
-
},
|
|
216
|
-
"thread.requireExplicitMention": {
|
|
217
|
-
label: "Slack Thread Require Explicit Mention",
|
|
218
|
-
help: "If true, require an explicit @mention even inside threads where the bot has participated. Suppresses implicit thread mention behavior so the bot only responds to explicit @bot mentions in threads (default: false)."
|
|
219
220
|
}
|
|
220
221
|
} });
|
|
221
222
|
//#endregion
|
|
@@ -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-DQEbYKh9.js";
|
|
3
3
|
import { i as parseSlackTarget } from "./target-parsing-N6lHogYZ.js";
|
|
4
4
|
import "./targets-KmjP2E8s.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-Bv0lcUlH.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 {
|
|
2
|
+
import { a as resolveSlackAccount } from "./accounts-DQEbYKh9.js";
|
|
3
|
+
import { a as createSlackLookupClient } from "./probe-Borhn9PQ.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({
|