@openclaw/slack 2026.5.28 → 2026.5.31-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{action-runtime-BOEgcnv6.js → action-runtime-DEztkt37.js} +2 -2
- package/dist/action-runtime.runtime-uN2B3l57.js +2 -0
- package/dist/{actions-zfVWcIY6.js → actions-BA_6yvPC.js} +23 -12
- package/dist/{actions.runtime-CoijPN8g.js → actions.runtime-BNL71SN3.js} +1 -1
- package/dist/api.js +7 -7
- package/dist/{approval-handler.runtime-CWz3XLfN.js → approval-handler.runtime-D0rHmHTC.js} +33 -60
- package/dist/{channel-BvEE3i26.js → channel-ClgouPGI.js} +14 -15
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-oGp4gSTP.js → channel.setup-DvU_3G7a.js} +2 -3
- package/dist/{client-DowBk5k0.js → client-qvqS9fQM.js} +20 -1
- package/dist/{config-schema-C0RewpJQ.js → config-schema-BjAjs8_6.js} +16 -0
- package/dist/contract-api.js +1 -1
- package/dist/{directory-live-BFB1pSax.js → directory-live-WZwhRYe2.js} +1 -1
- package/dist/{doctor-contract-DIMUXDHO.js → doctor-contract-DpGLNqS3.js} +2 -2
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{monitor-RVx8NyTs.js → monitor-D5FVBchh.js} +2 -2
- package/dist/{outbound-adapter-BHZMgblN.js → outbound-adapter-BxKw6eWi.js} +1 -1
- package/dist/{pipeline.runtime-CwtZdUTK.js → pipeline.runtime-Bo6reKXg.js} +54 -34
- package/dist/{probe-Djes9Fy6.js → probe-DczaQTdi.js} +1 -1
- package/dist/{provider-Do2x35qj.js → provider-DNfFBEzl.js} +65 -31
- package/dist/{replies-DkmWK7JW.js → replies-BmFpkBXm.js} +1 -1
- package/dist/{resolve-channels-zXt5f47h.js → resolve-channels-DIxJRl0F.js} +1 -1
- package/dist/{resolve-users-BLfGAz1v.js → resolve-users-B3vczJHE.js} +1 -1
- package/dist/{runtime-api-DvpUD2hw.js → runtime-api-BpGQDSTg.js} +1 -1
- package/dist/runtime-api.js +9 -9
- package/dist/{scopes-DiiHsqh1.js → scopes-Q1VjNpWb.js} +1 -1
- package/dist/{send-BURYyCXI.js → send-zvrcUvp2.js} +2 -3
- package/dist/send.runtime-iCVpfyB_.js +2 -0
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DJTHAguz.js → setup-surface-95xI4u2U.js} +3 -3
- package/dist/{shared-D9WMYymo.js → shared-D5tOdKwQ.js} +3 -4
- package/dist/{slash-dispatch.runtime-lsyTm_q5.js → slash-dispatch.runtime-BKo3qtpZ.js} +1 -1
- package/node_modules/@slack/bolt/README.md +1 -1
- package/node_modules/@slack/bolt/dist/App.d.ts +3 -3
- package/node_modules/@slack/bolt/dist/App.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/App.js +8 -12
- package/node_modules/@slack/bolt/dist/App.js.map +1 -1
- package/node_modules/@slack/bolt/dist/Assistant.d.ts +1 -2
- package/node_modules/@slack/bolt/dist/Assistant.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/Assistant.js.map +1 -1
- package/node_modules/@slack/bolt/dist/context/index.d.ts +5 -5
- package/node_modules/@slack/bolt/dist/context/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/context/index.js +7 -7
- package/node_modules/@slack/bolt/dist/context/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/index.d.ts +19 -19
- package/node_modules/@slack/bolt/dist/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/index.js +16 -16
- package/node_modules/@slack/bolt/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts +1 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +2 -0
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.d.ts +2 -2
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.js +8 -1
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.d.ts +2 -2
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -2
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/verify-request.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/verify-request.js +3 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-request.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.d.ts +2 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.d.ts.map +1 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.js +12 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.js.map +1 -0
- package/node_modules/@slack/bolt/dist/types/actions/index.d.ts +1 -1
- package/node_modules/@slack/bolt/dist/types/actions/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/actions/index.js +1 -1
- package/node_modules/@slack/bolt/dist/types/actions/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/types/events/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/index.d.ts +3 -3
- package/node_modules/@slack/bolt/dist/types/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/index.js +3 -3
- package/node_modules/@slack/bolt/dist/types/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/types/options/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/package.json +4 -4
- package/node_modules/@types/retry/LICENSE +21 -21
- package/node_modules/@types/retry/README.md +4 -5
- package/node_modules/@types/retry/index.d.ts +13 -20
- package/node_modules/@types/retry/package.json +11 -9
- package/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/typebox/build/type/script/mapping.d.mts +5 -2
- package/node_modules/typebox/build/type/script/mapping.mjs +15 -8
- package/node_modules/typebox/build/type/script/parser.d.mts +3 -1
- package/node_modules/typebox/build/type/script/parser.mjs +2 -1
- package/node_modules/typebox/package.json +29 -29
- package/npm-shrinkwrap.json +22 -101
- package/openclaw.plugin.json +76 -0
- package/package.json +6 -6
- package/dist/action-runtime.runtime-BXQYV0yA.js +0 -2
- package/dist/channel-api-DdLCPu8a.js +0 -20
- package/dist/send.runtime-CKaMG3s-.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as resolveSlackChannelId, r as parseSlackTarget } from "./target-parsing-C7eeWg7M.js";
|
|
2
2
|
import "./targets-nUqxHGgg.js";
|
|
3
3
|
import { a as parseSlackBlocksInput } from "./thread-ts-NSVqWybn.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-
|
|
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-BpGQDSTg.js";
|
|
5
5
|
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-BBDU-PQK.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -30,7 +30,7 @@ function sameSlackChannelTarget(targetChannel, currentChannelId) {
|
|
|
30
30
|
let slackActionsRuntimePromise;
|
|
31
31
|
let slackAccountsRuntimePromise;
|
|
32
32
|
function loadSlackActionsRuntime() {
|
|
33
|
-
slackActionsRuntimePromise ??= import("./actions.runtime-
|
|
33
|
+
slackActionsRuntimePromise ??= import("./actions.runtime-BNL71SN3.js");
|
|
34
34
|
return slackActionsRuntimePromise;
|
|
35
35
|
}
|
|
36
36
|
function loadSlackAccountsRuntime() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-f6Xcv9Vi.js";
|
|
3
3
|
import { b as truncateSlackText, o as validateSlackBlocksArray, s as SLACK_TEXT_LIMIT } from "./thread-ts-NSVqWybn.js";
|
|
4
|
-
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-
|
|
5
|
-
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-
|
|
4
|
+
import { a as getSlackWriteClient, r as createSlackWebClient } from "./client-qvqS9fQM.js";
|
|
5
|
+
import { c as buildSlackBlocksFallbackText, t as sendMessageSlack } from "./send-zvrcUvp2.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";
|
|
@@ -14,6 +14,7 @@ import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
|
14
14
|
import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
|
|
15
15
|
import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
|
|
16
16
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
17
|
+
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
17
18
|
//#region extensions/slack/src/edit-text.ts
|
|
18
19
|
function buildSlackEditTextPayload(content, blocks) {
|
|
19
20
|
const trimmedContent = content.trim();
|
|
@@ -41,8 +42,12 @@ const THREAD_STARTER_CACHE = /* @__PURE__ */ new Map();
|
|
|
41
42
|
const THREAD_STARTER_CACHE_TTL_MS = 360 * 6e4;
|
|
42
43
|
const THREAD_STARTER_CACHE_MAX = 2e3;
|
|
43
44
|
function evictThreadStarterCache() {
|
|
44
|
-
const now = Date.now();
|
|
45
|
-
|
|
45
|
+
const now = asDateTimestampMs(Date.now());
|
|
46
|
+
if (now === void 0) {
|
|
47
|
+
THREAD_STARTER_CACHE.clear();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
for (const [cacheKey, entry] of THREAD_STARTER_CACHE.entries()) if (asDateTimestampMs(entry.expiresAt) === void 0 || entry.expiresAt <= now) THREAD_STARTER_CACHE.delete(cacheKey);
|
|
46
51
|
pruneMapToMaxSize(THREAD_STARTER_CACHE, THREAD_STARTER_CACHE_MAX);
|
|
47
52
|
}
|
|
48
53
|
function formatSlackFilePlaceholder(files) {
|
|
@@ -52,8 +57,11 @@ async function resolveSlackThreadStarter(params) {
|
|
|
52
57
|
evictThreadStarterCache();
|
|
53
58
|
const cacheKey = `${params.channelId}:${params.threadTs}`;
|
|
54
59
|
const cached = THREAD_STARTER_CACHE.get(cacheKey);
|
|
55
|
-
if (cached
|
|
56
|
-
|
|
60
|
+
if (cached) {
|
|
61
|
+
const now = asDateTimestampMs(Date.now());
|
|
62
|
+
if (now !== void 0 && cached.expiresAt > now) return cached.value;
|
|
63
|
+
THREAD_STARTER_CACHE.delete(cacheKey);
|
|
64
|
+
}
|
|
57
65
|
try {
|
|
58
66
|
const message = (await params.client.conversations.replies({
|
|
59
67
|
channel: params.channelId,
|
|
@@ -71,12 +79,15 @@ async function resolveSlackThreadStarter(params) {
|
|
|
71
79
|
ts: message.ts,
|
|
72
80
|
files
|
|
73
81
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
const expiresAt = resolveExpiresAtMsFromDurationMs(THREAD_STARTER_CACHE_TTL_MS);
|
|
83
|
+
if (expiresAt !== void 0) {
|
|
84
|
+
if (THREAD_STARTER_CACHE.has(cacheKey)) THREAD_STARTER_CACHE.delete(cacheKey);
|
|
85
|
+
THREAD_STARTER_CACHE.set(cacheKey, {
|
|
86
|
+
value: starter,
|
|
87
|
+
expiresAt
|
|
88
|
+
});
|
|
89
|
+
evictThreadStarterCache();
|
|
90
|
+
}
|
|
80
91
|
return starter;
|
|
81
92
|
} catch (err) {
|
|
82
93
|
logVerbose$1(`slack thread starter fetch failed channel=${params.channelId} ts=${params.threadTs}: ${formatErrorMessage(err)}`);
|
|
@@ -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-BA_6yvPC.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -3,16 +3,16 @@ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resol
|
|
|
3
3
|
import { t as inspectSlackAccount } from "./account-inspect-CdGk6R7l.js";
|
|
4
4
|
import { i as resolveSlackChannelId, n as normalizeSlackMessagingTarget, r as parseSlackTarget, t as looksLikeSlackTargetId } from "./target-parsing-C7eeWg7M.js";
|
|
5
5
|
import "./targets-nUqxHGgg.js";
|
|
6
|
-
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-
|
|
6
|
+
import { a as resolveSlackAutoThreadId, i as resolveSlackChannelType, n as buildSlackThreadingToolContext, r as resetSlackChannelTypeCacheForTest, t as slackPlugin } from "./channel-ClgouPGI.js";
|
|
7
7
|
import { _ as buildSlackInteractiveBlocks, a as parseSlackBlocksInput, c as resolveSlackGroupRequireMention, d as normalizeAllowList, f as normalizeAllowListLower, g as resolveSlackUserAllowed, h as resolveSlackAllowListMatch, i as SLACK_MAX_BLOCKS, l as resolveSlackGroupToolPolicy, m as normalizeSlackSlug, o as validateSlackBlocksArray, p as normalizeSlackAllowOwnerEntry, u as allowListMatches, v as buildSlackPresentationBlocks } from "./thread-ts-NSVqWybn.js";
|
|
8
8
|
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-B9M0zzlQ.js";
|
|
9
9
|
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.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-
|
|
11
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
12
|
-
import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-
|
|
13
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, n as downloadSlackFile, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
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-qvqS9fQM.js";
|
|
11
|
+
import { t as slackSetupPlugin } from "./channel.setup-DvU_3G7a.js";
|
|
12
|
+
import { a as recordSlackThreadParticipation, n as clearSlackThreadParticipationCache, r as hasSlackThreadParticipation } from "./send-zvrcUvp2.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-BA_6yvPC.js";
|
|
14
14
|
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-8UPAEyNg.js";
|
|
15
|
-
import { t as probeSlack } from "./probe-
|
|
15
|
+
import { t as probeSlack } from "./probe-DczaQTdi.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-DNfFBEzl.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
1
|
import { C as isSlackAnyNativeApprovalClientEnabled, T as shouldHandleSlackNativeApprovalRequest, b as truncateSlackText, j as normalizeSlackApproverId, r as resolveSlackReplyBlocks, w as resolveSlackApprovalKind } from "./thread-ts-NSVqWybn.js";
|
|
2
|
-
import { t as sendMessageSlack } from "./send-
|
|
2
|
+
import { t as sendMessageSlack } from "./send-zvrcUvp2.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 { logError } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -58,6 +58,13 @@ function buildSlackMetadataContextElements(metadata) {
|
|
|
58
58
|
});
|
|
59
59
|
return elements;
|
|
60
60
|
}
|
|
61
|
+
function buildSlackMetadataContextBlocks(metadata) {
|
|
62
|
+
const metadataElements = buildSlackMetadataContextElements(metadata);
|
|
63
|
+
return metadataElements.length > 0 ? [{
|
|
64
|
+
type: "context",
|
|
65
|
+
elements: metadataElements
|
|
66
|
+
}] : [];
|
|
67
|
+
}
|
|
61
68
|
function resolveSlackApprovalDecisionLabel(decision) {
|
|
62
69
|
return decision === "allow-once" ? "Allowed once" : decision === "allow-always" ? "Allowed always" : "Denied";
|
|
63
70
|
}
|
|
@@ -70,6 +77,15 @@ function buildSlackPluginMetadata(view) {
|
|
|
70
77
|
function resolveSlackPluginDescription(view) {
|
|
71
78
|
return normalizeOptionalString(view.description) ?? "A plugin action needs your approval.";
|
|
72
79
|
}
|
|
80
|
+
function buildSlackPluginRequestBlocks(view) {
|
|
81
|
+
return [{
|
|
82
|
+
type: "section",
|
|
83
|
+
text: {
|
|
84
|
+
type: "mrkdwn",
|
|
85
|
+
text: `*Request*\n${truncateSlackMrkdwn(view.title, 2600)}`
|
|
86
|
+
}
|
|
87
|
+
}, ...buildSlackMetadataContextBlocks(buildSlackPluginMetadata(view))];
|
|
88
|
+
}
|
|
73
89
|
function buildSlackExecPendingApprovalText(view) {
|
|
74
90
|
const metadataLines = buildSlackMetadataLines(view.metadata);
|
|
75
91
|
return [
|
|
@@ -96,7 +112,6 @@ function buildSlackPendingApprovalText(view) {
|
|
|
96
112
|
return view.approvalKind === "plugin" ? buildSlackPluginPendingApprovalText(view) : buildSlackExecPendingApprovalText(view);
|
|
97
113
|
}
|
|
98
114
|
function buildSlackExecPendingApprovalBlocks(view) {
|
|
99
|
-
const metadataElements = buildSlackMetadataContextElements(view.metadata);
|
|
100
115
|
const interactiveBlocks = resolveSlackReplyBlocks({
|
|
101
116
|
text: "",
|
|
102
117
|
presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
|
|
@@ -116,15 +131,11 @@ function buildSlackExecPendingApprovalBlocks(view) {
|
|
|
116
131
|
text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
|
|
117
132
|
}
|
|
118
133
|
},
|
|
119
|
-
...
|
|
120
|
-
type: "context",
|
|
121
|
-
elements: metadataElements
|
|
122
|
-
}] : [],
|
|
134
|
+
...buildSlackMetadataContextBlocks(view.metadata),
|
|
123
135
|
...interactiveBlocks
|
|
124
136
|
];
|
|
125
137
|
}
|
|
126
138
|
function buildSlackPluginPendingApprovalBlocks(view) {
|
|
127
|
-
const metadataElements = buildSlackMetadataContextElements(buildSlackPluginMetadata(view));
|
|
128
139
|
const interactiveBlocks = resolveSlackReplyBlocks({
|
|
129
140
|
text: "",
|
|
130
141
|
presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
|
|
@@ -137,17 +148,7 @@ function buildSlackPluginPendingApprovalBlocks(view) {
|
|
|
137
148
|
text: `*Plugin approval required*\n${truncateSlackMrkdwn(resolveSlackPluginDescription(view), 2600)}`
|
|
138
149
|
}
|
|
139
150
|
},
|
|
140
|
-
|
|
141
|
-
type: "section",
|
|
142
|
-
text: {
|
|
143
|
-
type: "mrkdwn",
|
|
144
|
-
text: `*Request*\n${truncateSlackMrkdwn(view.title, 2600)}`
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
...metadataElements.length > 0 ? [{
|
|
148
|
-
type: "context",
|
|
149
|
-
elements: metadataElements
|
|
150
|
-
}] : [],
|
|
151
|
+
...buildSlackPluginRequestBlocks(view),
|
|
151
152
|
...interactiveBlocks
|
|
152
153
|
];
|
|
153
154
|
}
|
|
@@ -197,27 +198,13 @@ function buildSlackExecResolvedBlocks(view) {
|
|
|
197
198
|
}
|
|
198
199
|
function buildSlackPluginResolvedBlocks(view) {
|
|
199
200
|
const resolvedBy = formatSlackApprover(view.resolvedBy);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
{
|
|
203
|
-
type: "
|
|
204
|
-
text: {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
type: "section",
|
|
211
|
-
text: {
|
|
212
|
-
type: "mrkdwn",
|
|
213
|
-
text: `*Request*\n${truncateSlackMrkdwn(view.title, 2600)}`
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
...metadataElements.length > 0 ? [{
|
|
217
|
-
type: "context",
|
|
218
|
-
elements: metadataElements
|
|
219
|
-
}] : []
|
|
220
|
-
];
|
|
201
|
+
return [{
|
|
202
|
+
type: "section",
|
|
203
|
+
text: {
|
|
204
|
+
type: "mrkdwn",
|
|
205
|
+
text: `*Plugin approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
|
|
206
|
+
}
|
|
207
|
+
}, ...buildSlackPluginRequestBlocks(view)];
|
|
221
208
|
}
|
|
222
209
|
function buildSlackResolvedBlocks(view) {
|
|
223
210
|
return view.approvalKind === "plugin" ? buildSlackPluginResolvedBlocks(view) : buildSlackExecResolvedBlocks(view);
|
|
@@ -261,27 +248,13 @@ function buildSlackExecExpiredBlocks(view) {
|
|
|
261
248
|
}];
|
|
262
249
|
}
|
|
263
250
|
function buildSlackPluginExpiredBlocks(view) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
{
|
|
267
|
-
type: "
|
|
268
|
-
text:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
type: "section",
|
|
275
|
-
text: {
|
|
276
|
-
type: "mrkdwn",
|
|
277
|
-
text: `*Request*\n${truncateSlackMrkdwn(view.title, 2600)}`
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
...metadataElements.length > 0 ? [{
|
|
281
|
-
type: "context",
|
|
282
|
-
elements: metadataElements
|
|
283
|
-
}] : []
|
|
284
|
-
];
|
|
251
|
+
return [{
|
|
252
|
+
type: "section",
|
|
253
|
+
text: {
|
|
254
|
+
type: "mrkdwn",
|
|
255
|
+
text: "*Plugin approval expired*\nThis approval request expired before it was resolved."
|
|
256
|
+
}
|
|
257
|
+
}, ...buildSlackPluginRequestBlocks(view)];
|
|
285
258
|
}
|
|
286
259
|
function buildSlackExpiredBlocks(view) {
|
|
287
260
|
return view.approvalKind === "plugin" ? buildSlackPluginExpiredBlocks(view) : buildSlackExecExpiredBlocks(view);
|
|
@@ -4,10 +4,9 @@ import "./targets-nUqxHGgg.js";
|
|
|
4
4
|
import { A as isSlackExecApprovalClientEnabled, C as isSlackAnyNativeApprovalClientEnabled, D as isSlackApprovalAuthorizedSender, E as getSlackApprovalApprovers, M as resolveSlackExecApprovalTarget, N as shouldSuppressLocalSlackExecApprovalPrompt, O as getSlackExecApprovalApprovers, T as shouldHandleSlackNativeApprovalRequest, _ as buildSlackInteractiveBlocks, c as resolveSlackGroupRequireMention, f as normalizeAllowListLower, k as isSlackExecApprovalAuthorizedSender, l as resolveSlackGroupToolPolicy, n as resolveSlackThreadTsValue, r as resolveSlackReplyBlocks, s as SLACK_TEXT_LIMIT, t as normalizeSlackThreadTsCandidate, v as buildSlackPresentationBlocks, w as resolveSlackApprovalKind, y as resolveSlackInteractiveBlockOffsets } from "./thread-ts-NSVqWybn.js";
|
|
5
5
|
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-B9M0zzlQ.js";
|
|
6
6
|
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-DrBq4Mld.js";
|
|
7
|
-
import {
|
|
8
|
-
import { r as createSlackWebClient } from "./client-DowBk5k0.js";
|
|
7
|
+
import { d as PAIRING_APPROVED_MESSAGE, m as resolveConfiguredFromRequiredCredentialStatuses, p as projectCredentialSnapshotFields, r as createSlackWebClient, u as DEFAULT_ACCOUNT_ID } from "./client-qvqS9fQM.js";
|
|
9
8
|
import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
|
|
10
|
-
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-
|
|
9
|
+
import { i as slackSecurityAdapter, n as isSlackPluginAccountConfigured, r as slackConfigAdapter, t as createSlackPluginBase } from "./shared-D5tOdKwQ.js";
|
|
11
10
|
import { i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-POfI_bgP.js";
|
|
12
11
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
12
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -232,7 +231,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
232
231
|
approvalKind: resolveSlackApprovalKind(request),
|
|
233
232
|
request
|
|
234
233
|
}),
|
|
235
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
234
|
+
load: async () => (await import("./approval-handler.runtime-D0rHmHTC.js")).slackApprovalNativeRuntime
|
|
236
235
|
})
|
|
237
236
|
});
|
|
238
237
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -431,7 +430,7 @@ async function handleSlackMessageAction(params) {
|
|
|
431
430
|
//#region extensions/slack/src/channel-actions.ts
|
|
432
431
|
let slackActionRuntimePromise$1;
|
|
433
432
|
async function loadSlackActionRuntime$1() {
|
|
434
|
-
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-
|
|
433
|
+
slackActionRuntimePromise$1 ??= import("./action-runtime.runtime-uN2B3l57.js");
|
|
435
434
|
return await slackActionRuntimePromise$1;
|
|
436
435
|
}
|
|
437
436
|
function resolveSlackActionContext(params) {
|
|
@@ -561,9 +560,9 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
561
560
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
562
561
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
563
562
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
564
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
565
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
566
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
563
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-95xI4u2U.js"));
|
|
564
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-Q1VjNpWb.js"));
|
|
565
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BxKw6eWi.js"));
|
|
567
566
|
async function resolveSlackHandleAction() {
|
|
568
567
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
569
568
|
}
|
|
@@ -584,26 +583,26 @@ let slackProbeModulePromise;
|
|
|
584
583
|
let slackMonitorModulePromise;
|
|
585
584
|
let slackDirectoryLiveModulePromise;
|
|
586
585
|
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-8UPAEyNg.js").then((n) => n.t));
|
|
587
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
588
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
586
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DIxJRl0F.js").then((n) => n.n));
|
|
587
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-B3vczJHE.js").then((n) => n.n));
|
|
589
588
|
async function loadSlackActionRuntime() {
|
|
590
|
-
slackActionRuntimePromise ??= import("./action-runtime.runtime-
|
|
589
|
+
slackActionRuntimePromise ??= import("./action-runtime.runtime-uN2B3l57.js");
|
|
591
590
|
return await slackActionRuntimePromise;
|
|
592
591
|
}
|
|
593
592
|
async function loadSlackSendRuntime() {
|
|
594
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
593
|
+
slackSendRuntimePromise ??= import("./send.runtime-iCVpfyB_.js");
|
|
595
594
|
return await slackSendRuntimePromise;
|
|
596
595
|
}
|
|
597
596
|
async function loadSlackProbeModule() {
|
|
598
|
-
slackProbeModulePromise ??= import("./probe-
|
|
597
|
+
slackProbeModulePromise ??= import("./probe-DczaQTdi.js").then((n) => n.n);
|
|
599
598
|
return await slackProbeModulePromise;
|
|
600
599
|
}
|
|
601
600
|
async function loadSlackMonitorModule() {
|
|
602
|
-
slackMonitorModulePromise ??= import("./monitor-
|
|
601
|
+
slackMonitorModulePromise ??= import("./monitor-D5FVBchh.js").then((n) => n.t);
|
|
603
602
|
return await slackMonitorModulePromise;
|
|
604
603
|
}
|
|
605
604
|
async function loadSlackDirectoryLiveModule() {
|
|
606
|
-
slackDirectoryLiveModulePromise ??= import("./directory-live-
|
|
605
|
+
slackDirectoryLiveModulePromise ??= import("./directory-live-WZwhRYe2.js").then((n) => n.t);
|
|
607
606
|
return await slackDirectoryLiveModulePromise;
|
|
608
607
|
}
|
|
609
608
|
async function resolveSlackSendContext(params) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-BjAjs8_6.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-ClgouPGI.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-f6Xcv9Vi.js";
|
|
2
|
-
import "./channel-api-DdLCPu8a.js";
|
|
3
2
|
import { a as describeSlackSetupAccount, i as SLACK_CHANNEL, n as createSlackSetupWizardProxy, o as isSlackSetupAccountConfigured, r as slackSetupAdapter } from "./setup-core-POfI_bgP.js";
|
|
4
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
3
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-BjAjs8_6.js";
|
|
5
4
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
6
5
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
7
6
|
//#region extensions/slack/src/channel.setup.ts
|
|
8
|
-
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-
|
|
7
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-95xI4u2U.js")).slackSetupWizard }));
|
|
9
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
10
9
|
sectionKey: SLACK_CHANNEL,
|
|
11
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
import "./target-parsing-C7eeWg7M.js";
|
|
2
|
+
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
3
|
+
import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
|
|
1
4
|
import { createHash } from "node:crypto";
|
|
2
5
|
import { WebClient } from "@slack/web-api";
|
|
3
6
|
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
7
|
+
//#region extensions/slack/src/channel-api.ts
|
|
8
|
+
const SLACK_CHANNEL_META = {
|
|
9
|
+
id: "slack",
|
|
10
|
+
label: "Slack",
|
|
11
|
+
selectionLabel: "Slack",
|
|
12
|
+
docsPath: "/channels/slack",
|
|
13
|
+
docsLabel: "slack",
|
|
14
|
+
blurb: "supports bot + app tokens, channels, threads, and interactive replies.",
|
|
15
|
+
systemImage: "number.square",
|
|
16
|
+
markdownCapable: true
|
|
17
|
+
};
|
|
18
|
+
function getChatChannelMeta(id) {
|
|
19
|
+
if (id !== SLACK_CHANNEL_META.id) throw new Error(`Unsupported Slack channel meta lookup: ${id}`);
|
|
20
|
+
return SLACK_CHANNEL_META;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
4
23
|
//#region extensions/slack/src/client-options.ts
|
|
5
24
|
const SLACK_DEFAULT_RETRY_OPTIONS = {
|
|
6
25
|
retries: 2,
|
|
@@ -84,4 +103,4 @@ function clearSlackWriteClientCacheForTest() {
|
|
|
84
103
|
slackWriteClientCache.clear();
|
|
85
104
|
}
|
|
86
105
|
//#endregion
|
|
87
|
-
export { getSlackWriteClient as a, resolveSlackWebClientOptions as c, createSlackWriteClient as i, resolveSlackWriteClientOptions as l, createSlackTokenCacheKey as n, SLACK_DEFAULT_RETRY_OPTIONS as o, createSlackWebClient as r, SLACK_WRITE_RETRY_OPTIONS as s, clearSlackWriteClientCacheForTest as t };
|
|
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 };
|
|
@@ -18,6 +18,22 @@ const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { u
|
|
|
18
18
|
label: "Slack Config Writes",
|
|
19
19
|
help: "Allow Slack to write config in response to channel events/commands (default: true)."
|
|
20
20
|
},
|
|
21
|
+
mentionPatterns: {
|
|
22
|
+
label: "Slack Mention Pattern Policy",
|
|
23
|
+
help: "Scopes configured groupChat mentionPatterns to selected Slack channel IDs. Native Slack @mentions still trigger even when regex patterns are denied."
|
|
24
|
+
},
|
|
25
|
+
"mentionPatterns.mode": {
|
|
26
|
+
label: "Slack Mention Pattern Mode",
|
|
27
|
+
help: "\"allow\" enables configured regex mention patterns unless denyIn matches; \"deny\" disables them unless allowIn matches."
|
|
28
|
+
},
|
|
29
|
+
"mentionPatterns.allowIn": {
|
|
30
|
+
label: "Slack Mention Pattern Allowlist",
|
|
31
|
+
help: "Slack channel IDs where configured regex mention patterns are enabled when mode is deny."
|
|
32
|
+
},
|
|
33
|
+
"mentionPatterns.denyIn": {
|
|
34
|
+
label: "Slack Mention Pattern Denylist",
|
|
35
|
+
help: "Slack channel IDs where configured regex mention patterns are disabled. Native @mentions still trigger."
|
|
36
|
+
},
|
|
21
37
|
"commands.native": {
|
|
22
38
|
label: "Slack Native Commands",
|
|
23
39
|
help: "Override native commands for Slack (bool or \"auto\")."
|
package/dist/contract-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DpGLNqS3.js";
|
|
2
2
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-g_PPWuoD.js";
|
|
3
3
|
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-8UPAEyNg.js";
|
|
4
4
|
import { t as collectSlackSecurityAuditFindings } from "./security-audit-CikQhBUY.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as resolveSlackAccount } from "./accounts-f6Xcv9Vi.js";
|
|
3
|
-
import { r as createSlackWebClient } from "./client-
|
|
3
|
+
import { r as createSlackWebClient } from "./client-qvqS9fQM.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({
|
|
@@ -7,14 +7,14 @@ function hasLegacySlackStreamingAliases(value) {
|
|
|
7
7
|
function hasLegacySlackChannelAllowAlias(value) {
|
|
8
8
|
const channels = asObjectRecord(asObjectRecord(value)?.channels);
|
|
9
9
|
if (!channels) return false;
|
|
10
|
-
return Object.values(channels).some((channel) => Object.
|
|
10
|
+
return Object.values(channels).some((channel) => Object.hasOwn(asObjectRecord(channel) ?? {}, "allow"));
|
|
11
11
|
}
|
|
12
12
|
function normalizeSlackChannelAllowAliases(params) {
|
|
13
13
|
let changed = false;
|
|
14
14
|
const nextChannels = { ...params.channels };
|
|
15
15
|
for (const [channelId, channelValue] of Object.entries(params.channels)) {
|
|
16
16
|
const channel = asObjectRecord(channelValue);
|
|
17
|
-
if (!channel || !Object.
|
|
17
|
+
if (!channel || !Object.hasOwn(channel, "allow")) continue;
|
|
18
18
|
const nextChannel = { ...channel };
|
|
19
19
|
if (nextChannel.enabled === void 0) {
|
|
20
20
|
nextChannel.enabled = channel.allow;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DpGLNqS3.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { t as monitorSlackProvider, y as buildSlackSlashCommandMatcher } from "./provider-
|
|
2
|
+
import { t as monitorSlackProvider, y as buildSlackSlashCommandMatcher } from "./provider-DNfFBEzl.js";
|
|
3
3
|
import { t as isSlackChannelAllowedByPolicy } from "./policy-BBDU-PQK.js";
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-BmFpkBXm.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -9,7 +9,7 @@ import { resolvePayloadMediaUrls, sendPayloadMediaSequenceAndFinalize, sendTextM
|
|
|
9
9
|
const SLACK_MAX_BLOCKS = 50;
|
|
10
10
|
let slackSendRuntimePromise;
|
|
11
11
|
async function loadSlackSendRuntime() {
|
|
12
|
-
slackSendRuntimePromise ??= import("./send.runtime-
|
|
12
|
+
slackSendRuntimePromise ??= import("./send.runtime-iCVpfyB_.js");
|
|
13
13
|
return await slackSendRuntimePromise;
|
|
14
14
|
}
|
|
15
15
|
function resolveRenderedInteractiveBlocks(interactive, previousBlocks) {
|