@openclaw/slack 2026.11.5-beta.1 → 2026.11.5-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/.setup/{account-configured-35y0-Hso.mjs → account-configured-zcR9TJJN.mjs} +2 -1
- package/dist/.setup/{account-inspect-DgQgj0wk.mjs → account-inspect-BLVha-ov.mjs} +4 -3
- package/dist/.setup/{accounts-EaPP0fFY.mjs → accounts-CGJScKtk.mjs} +10 -6
- package/dist/.setup/{action-runtime-CK9QZgQl.mjs → action-runtime-D01wBhx5.mjs} +10 -9
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +1 -0
- package/dist/.setup/{actions-s3CcFO45.mjs → actions-D5S6D_BU.mjs} +22 -14
- package/dist/.setup/{approval-handler.runtime-Ch7BecYK.mjs → approval-handler.runtime-Buw5jh2Y.mjs} +8 -7
- package/dist/.setup/{approval-message-updates-CqcRoa28.mjs → approval-message-updates-pmXcve5E.mjs} +3 -2
- package/dist/.setup/{channel-CAvo_WNZ.mjs → channel-C_R98Nbv.mjs} +45 -36
- package/dist/.setup/{channel-meta-C5vsCo3a.mjs → channel-meta-C443t-lI.mjs} +2 -1
- package/dist/.setup/{channel-type-9Lw6yLf2.mjs → channel-type-B5P3w9eA.mjs} +6 -5
- package/dist/.setup/{channel.setup-BlgXNuCJ.mjs → channel.setup-Lq2OxKkF.mjs} +14 -10
- package/dist/.setup/{config-schema-Bx1tCZB0.mjs → config-schema-BWAaa5au.mjs} +4 -2
- package/dist/.setup/{cursor-pages-jVn3Vkfi.mjs → cursor-pages-CATAzbTT.mjs} +8 -4
- package/dist/.setup/{directory-config-CGvKYg9F.mjs → directory-config-D-hf9KGQ.mjs} +6 -5
- package/dist/.setup/{directory-live-DNdw97LA.mjs → directory-live-onKAFI1E.mjs} +5 -4
- package/dist/.setup/{doctor-contract-BB2KJ9Ni.mjs → doctor-contract-9-QJRCXk.mjs} +13 -7
- package/dist/.setup/{message-tool-api-B38BpEaE.mjs → message-tool-api-LGIgVXJf.mjs} +7 -5
- package/dist/.setup/{monitor-BD86SotB.mjs → monitor-Cm1TuqxN.mjs} +128 -73
- package/dist/.setup/{outbound-adapter-BH6iPWBj.mjs → outbound-adapter-C-95EWl2.mjs} +10 -9
- package/dist/.setup/{paths-CQZI_5WY.mjs → paths-B1u59oLK.mjs} +2 -1
- package/dist/.setup/{pipeline.runtime-C4ELxaRU.mjs → pipeline.runtime-DGnV6akc.mjs} +71 -43
- package/dist/.setup/{policy-C6_DdlSf.mjs → policy-DxhGRvc2.mjs} +5 -3
- package/dist/.setup/{probe-B_Ax1vS1.mjs → probe-DANukR3O.mjs} +66 -36
- package/dist/.setup/{question-delivery-D3qAIwuv.mjs → question-delivery-CWC7sRhH.mjs} +3 -2
- package/dist/.setup/{relay-source-a8jodKuO.mjs → relay-source-DoyOlTbK.mjs} +4 -3
- package/dist/.setup/{replies-Bq7n0gfM.mjs → replies-BcmUKord.mjs} +10 -8
- package/dist/.setup/{reply-blocks-DyYYRrP_.mjs → reply-blocks-BzsXUUUL.mjs} +7 -4
- package/dist/.setup/{resolve-channels-CF2JME9q.mjs → resolve-channels-XDPgnesf.mjs} +5 -4
- package/dist/.setup/{resolve-users-DDcCAjH1.mjs → resolve-users-aDAv24U2.mjs} +5 -4
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-C6HKn7Av.mjs → runtime-JSVZSWAj.mjs} +2 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +2 -0
- package/dist/.setup/{scopes-CzHC_dwV.mjs → scopes-BocHwImV.mjs} +4 -3
- package/dist/.setup/{secret-contract-api-DaCXZ47j.mjs → secret-contract-api-BlLz88mj.mjs} +1 -1
- package/dist/.setup/{secret-contract-CqVqR7MP.mjs → secret-contract-uiQtoNlu.mjs} +3 -2
- package/dist/.setup/{security-audit-C3hXCfDt.mjs → security-audit-DFGiFLqd.mjs} +3 -2
- package/dist/.setup/{send-results-Bm6V1ekL.mjs → send-results-BGxlroJ-.mjs} +2 -1
- package/dist/.setup/{send-WJZ73VSf.mjs → send-yK6_-px6.mjs} +19 -13
- package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +2 -0
- package/dist/.setup/{setup-surface-uIqP2B0Y.mjs → setup-surface-C0KRtyqa.mjs} +7 -6
- package/dist/.setup/{slash-dispatch.runtime-Cwuwv7FL.mjs → slash-dispatch.runtime-CyVC3bYx.mjs} +1 -1
- package/dist/.setup/{target-parsing-DwYAP3ts.mjs → target-parsing-Bx2UZniD.mjs} +2 -1
- package/dist/.setup/{targets-eeOxA_b_.mjs → targets-D-ASeWHy.mjs} +3 -2
- package/dist/.setup/{thread-ts-47Au2-Yn.mjs → thread-ts-Cvt7WD6B.mjs} +2 -1
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +3 -2
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +2 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +3 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +2 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +5 -4
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/README.md +17 -13
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/@slack/bolt/node_modules/body-parser/package.json +7 -12
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +0 -1
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +0 -2
- package/dist/.setup/setup-plugin-api-DJXIB8CF.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolution";
|
|
2
2
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
3
|
-
|
|
3
|
+
//#region extensions/slack/src/account-configured.ts
|
|
4
4
|
function hasSlackAccountCredentials(params) {
|
|
5
5
|
if (!params.identityTokenConfigured) return false;
|
|
6
6
|
const mode = params.config.mode ?? "socket";
|
|
@@ -31,4 +31,5 @@ function createSlackAccountConfiguredChecker(allowSecretRefs) {
|
|
|
31
31
|
}
|
|
32
32
|
const isSlackPluginAccountConfigured = createSlackAccountConfiguredChecker(false);
|
|
33
33
|
const isSlackSetupAccountConfigured = createSlackAccountConfiguredChecker(true);
|
|
34
|
+
//#endregion
|
|
34
35
|
export { isSlackSetupAccountConfigured as i, hasSlackAccountCredentialsFromConfig as n, isSlackPluginAccountConfigured as r, hasSlackAccountCredentials as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as hasSlackAccountCredentials } from "./account-configured-
|
|
2
|
-
import { _ as buildSlackAccountSurfaceFields, a as mergeSlackAccountConfig, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { t as hasSlackAccountCredentials } from "./account-configured-zcR9TJJN.mjs";
|
|
2
|
+
import { _ as buildSlackAccountSurfaceFields, a as mergeSlackAccountConfig, o as resolveDefaultSlackAccountId } from "./accounts-CGJScKtk.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { normalizeSecretInputString, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
//#region extensions/slack/src/account-inspect.ts
|
|
7
7
|
function inspectSlackToken(value, envToken) {
|
|
8
8
|
const credential = resolveSecretInputString({
|
|
9
9
|
value,
|
|
@@ -66,4 +66,5 @@ function inspectSlackAccount(params) {
|
|
|
66
66
|
...buildSlackAccountSurfaceFields(merged)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
+
//#endregion
|
|
69
70
|
export { inspectSlackAccount as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-zcR9TJJN.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -7,7 +7,7 @@ import { mapAllowFromEntries, normalizeChannelDmPolicy } from "openclaw/plugin-s
|
|
|
7
7
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
8
8
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { normalizeChatType } from "openclaw/plugin-sdk/account-core";
|
|
10
|
-
|
|
10
|
+
//#region extensions/slack/src/account-surface-fields.ts
|
|
11
11
|
function buildSlackAccountSurfaceFields(config) {
|
|
12
12
|
return {
|
|
13
13
|
groupPolicy: config.groupPolicy,
|
|
@@ -23,7 +23,8 @@ function buildSlackAccountSurfaceFields(config) {
|
|
|
23
23
|
channels: config.channels
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region extensions/slack/src/token.ts
|
|
27
28
|
function formatSlackBotTokenIdentityWarning(params) {
|
|
28
29
|
const userId = params.auth.user_id?.trim();
|
|
29
30
|
const botId = params.auth.bot_id?.trim();
|
|
@@ -40,13 +41,15 @@ function createSlackTokenResolver(defaultPath) {
|
|
|
40
41
|
const resolveSlackBotToken = createSlackTokenResolver("channels.slack.botToken");
|
|
41
42
|
const resolveSlackAppToken = createSlackTokenResolver("channels.slack.appToken");
|
|
42
43
|
const resolveSlackUserToken = createSlackTokenResolver("channels.slack.userToken");
|
|
43
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region extensions/slack/src/account-reply-mode.ts
|
|
44
46
|
function resolveSlackReplyToMode(account, chatType) {
|
|
45
47
|
const normalized = normalizeChatType(chatType ?? void 0);
|
|
46
48
|
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
47
49
|
return account.replyToMode ?? "off";
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region extensions/slack/src/accounts.ts
|
|
50
53
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
51
54
|
hasImplicitDefaultSlackAccount: () => hasImplicitDefaultSlackAccount,
|
|
52
55
|
listEnabledSlackAccounts: () => listEnabledSlackAccounts,
|
|
@@ -191,4 +194,5 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
191
194
|
accountId
|
|
192
195
|
})).filter((account) => account.enabled);
|
|
193
196
|
}
|
|
197
|
+
//#endregion
|
|
194
198
|
export { buildSlackAccountSurfaceFields as _, mergeSlackAccountConfig as a, resolveSlackAccountAllowFrom as c, resolveSlackMarkdownOptions as d, resolveSlackOperationToken as f, resolveSlackBotToken as g, resolveSlackAppToken as h, listSlackAccountIds as i, resolveSlackAccountDmPolicy as l, formatSlackBotTokenIdentityWarning as m, hasImplicitDefaultSlackAccount as n, resolveDefaultSlackAccountId as o, resolveSlackReplyToMode as p, listEnabledSlackAccounts as r, resolveSlackAccount as s, accounts_exports as t, resolveSlackConfigAccessorAccount as u };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-
|
|
2
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
3
|
-
import { Kt as getSlackInstallationKind, O as hasSlackNativeDataBlock, S as assertSlackDetachedTargetAllowed, c as buildSlackChannelIdCandidates, in as resolveSlackThreadTsFromContext, nn as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, nt as parseSlackBlocksInput, u as hasPotentialSlackNamedPolicy } from "./probe-
|
|
4
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
5
|
-
import { t as mergeSlackSendResults } from "./send-results-
|
|
1
|
+
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-Bx2UZniD.mjs";
|
|
2
|
+
import { t as slackContextTargetsMatch } from "./targets-D-ASeWHy.mjs";
|
|
3
|
+
import { Kt as getSlackInstallationKind, O as hasSlackNativeDataBlock, S as assertSlackDetachedTargetAllowed, c as buildSlackChannelIdCandidates, in as resolveSlackThreadTsFromContext, nn as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, nt as parseSlackBlocksInput, u as hasPotentialSlackNamedPolicy } from "./probe-DANukR3O.mjs";
|
|
4
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-DxhGRvc2.mjs";
|
|
5
|
+
import { t as mergeSlackSendResults } from "./send-results-BGxlroJ-.mjs";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
9
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
10
10
|
import { createActionGate, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
11
11
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
12
|
-
|
|
12
|
+
//#region extensions/slack/src/action-runtime.ts
|
|
13
13
|
const messagingActions = /* @__PURE__ */ new Set([
|
|
14
14
|
"openConversation",
|
|
15
15
|
"sendMessage",
|
|
@@ -29,10 +29,10 @@ const SLACK_REACTION_RESULT_LIMIT = 100;
|
|
|
29
29
|
function readSlackResultLimit(params) {
|
|
30
30
|
return Math.min(readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." }) ?? SLACK_REACTION_RESULT_LIMIT, SLACK_REACTION_RESULT_LIMIT);
|
|
31
31
|
}
|
|
32
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-
|
|
32
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-D5S6D_BU.mjs").then((n) => n.t));
|
|
33
33
|
const bindSlackAction = createLazyRuntimeMethodBinder(loadSlackActionsRuntime);
|
|
34
|
-
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-
|
|
35
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
34
|
+
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-CGJScKtk.mjs").then((n) => n.t));
|
|
35
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-B5P3w9eA.mjs").then((n) => n.t));
|
|
36
36
|
const bindSlackChannelType = createLazyRuntimeMethodBinder(loadSlackChannelTypeRuntime);
|
|
37
37
|
const slackActionRuntime = {
|
|
38
38
|
createSlackChannel: bindSlackAction((runtime) => runtime.createSlackChannel),
|
|
@@ -613,4 +613,5 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
613
613
|
}
|
|
614
614
|
throw new Error(`Unknown action: ${action}`);
|
|
615
615
|
}
|
|
616
|
+
//#endregion
|
|
616
617
|
export { slackActionRuntime as n, handleSlackAction as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as handleSlackAction } from "./action-runtime-D01wBhx5.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { n as formatSlackTarget } from "./target-parsing-
|
|
4
|
-
import { I as truncateSlackTextByUtf8Bytes, N as stripSlackNativeDataBlocks, O as hasSlackNativeDataBlock, P as countSlackTextUtf8Bytes, S as assertSlackDetachedTargetAllowed, T as appendSlackNativeDataPlainTextFallback, Tt as escapeSlackMrkdwn, at as buildSlackCompleteBlocksFallbackText, it as buildSlackBlocksFallbackText, k as isSlackInvalidBlocksError, nn as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, ot as renderSlackBlockFallbackText, rt as validateSlackBlocksArray, vt as SLACK_EDIT_TEXT_MAX_BYTES, w as appendSlackNativeDataFallbackText, wt as normalizeSlackOutboundText } from "./probe-
|
|
5
|
-
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-
|
|
6
|
-
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-CGJScKtk.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-Bx2UZniD.mjs";
|
|
4
|
+
import { I as truncateSlackTextByUtf8Bytes, N as stripSlackNativeDataBlocks, O as hasSlackNativeDataBlock, P as countSlackTextUtf8Bytes, S as assertSlackDetachedTargetAllowed, T as appendSlackNativeDataPlainTextFallback, Tt as escapeSlackMrkdwn, at as buildSlackCompleteBlocksFallbackText, it as buildSlackBlocksFallbackText, k as isSlackInvalidBlocksError, nn as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, ot as renderSlackBlockFallbackText, rt as validateSlackBlocksArray, vt as SLACK_EDIT_TEXT_MAX_BYTES, w as appendSlackNativeDataFallbackText, wt as normalizeSlackOutboundText } from "./probe-DANukR3O.mjs";
|
|
5
|
+
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-CATAzbTT.mjs";
|
|
6
|
+
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-yK6_-px6.mjs";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
@@ -20,7 +20,7 @@ import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
|
20
20
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
21
21
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
22
22
|
import { saveRemoteMedia, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
23
|
-
|
|
23
|
+
//#region extensions/slack/src/conversation-open.ts
|
|
24
24
|
const slackTeamIdSchema = z.string().trim().regex(/^T[A-Z0-9]+$/i).optional();
|
|
25
25
|
function parseSlackConversationOpenInput(userIds, teamId) {
|
|
26
26
|
const users = z.array(z.string().trim().regex(/^[UW][A-Z0-9]+$/)).min(1).max(8).parse(userIds);
|
|
@@ -43,7 +43,8 @@ async function openSlackConversationWithClient(client, input) {
|
|
|
43
43
|
})
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region extensions/slack/src/edit-text.ts
|
|
47
48
|
function buildSlackEditTextPayload(content, blocks) {
|
|
48
49
|
const trimmedContent = content.trim();
|
|
49
50
|
const blockText = blocks?.length ? buildSlackCompleteBlocksFallbackText(blocks).trim() : "";
|
|
@@ -56,7 +57,8 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
56
57
|
if (blockText) return truncateSlackTextByUtf8Bytes(blockText, SLACK_EDIT_TEXT_MAX_BYTES);
|
|
57
58
|
return " ";
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/slack/src/monitor/block-text.ts
|
|
60
62
|
function hasSlackTableBlock(blocks) {
|
|
61
63
|
return blocks?.some((block) => asOptionalRecord(block)?.type === "table") ?? false;
|
|
62
64
|
}
|
|
@@ -131,7 +133,8 @@ function chooseSlackPrimaryText(params) {
|
|
|
131
133
|
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
132
134
|
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
133
135
|
}
|
|
134
|
-
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region extensions/slack/src/file-reference.ts
|
|
135
138
|
function formatSlackFileReference(file) {
|
|
136
139
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
137
140
|
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
@@ -148,15 +151,18 @@ function formatSlackFileReferenceList(files) {
|
|
|
148
151
|
if (!files?.length) return "file";
|
|
149
152
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
150
153
|
}
|
|
151
|
-
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region extensions/slack/src/monitor/media.runtime.ts
|
|
152
156
|
const slackMediaLog = createSubsystemLogger("gateway/channels/slack").child("media");
|
|
153
|
-
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
154
159
|
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
155
160
|
function isGovSlackClient(client) {
|
|
156
161
|
const apiUrl = client?.slackApiUrl ? URL.parse(client.slackApiUrl) : null;
|
|
157
162
|
return apiUrl?.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
158
163
|
}
|
|
159
|
-
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region extensions/slack/src/monitor/media.ts
|
|
160
166
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
161
167
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
162
168
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
@@ -475,7 +481,8 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
475
481
|
...unavailableFiles.length > 0 ? { files: unavailableFiles } : {}
|
|
476
482
|
};
|
|
477
483
|
}
|
|
478
|
-
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region extensions/slack/src/actions.ts
|
|
479
486
|
var actions_exports = /* @__PURE__ */ __exportAll({
|
|
480
487
|
createSlackChannel: () => createSlackChannel,
|
|
481
488
|
deleteSlackMessage: () => deleteSlackMessage,
|
|
@@ -853,4 +860,5 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
853
860
|
maxBytes: opts.maxBytes
|
|
854
861
|
}))?.[0] ?? null;
|
|
855
862
|
}
|
|
863
|
+
//#endregion
|
|
856
864
|
export { hasSlackTableBlock as C, buildSlackEditTextPayload as D, resolveSlackMessageText as E, hasSlackMessageTableBlock as S, resolveSlackBlocksText as T, media_exports as _, editSlackRenderedMessage as a, formatSlackFileReference as b, listSlackPins as c, reactSlackMessage as d, readSlackMessages as f, unpinSlackMessage as g, sendSlackMessage as h, editSlackMessage as i, listSlackReactions as l, removeSlackReaction as m, deleteSlackMessage as n, getSlackMemberInfo as o, removeOwnSlackReactions as p, downloadSlackFile as r, listSlackEmojis as s, actions_exports as t, pinSlackMessage as u, isGovSlackClient as v, isSlackUnfurlAttachment as w, formatSlackFileReferenceList as x, saveRemoteMedia as y };
|
package/dist/.setup/{approval-handler.runtime-Ch7BecYK.mjs → approval-handler.runtime-Buw5jh2Y.mjs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
2
|
-
import { Et as isSlackAnyNativeApprovalClientEnabled, F as truncateSlackText, I as truncateSlackTextByUtf8Bytes, Pt as shouldHandleSlackNativeApprovalRequest, Q as SLACK_APPROVAL_HEADER_BLOCK_ID, Qt as normalizeSlackApproverId, i as setSlackSessionStatus, vt as SLACK_EDIT_TEXT_MAX_BYTES } from "./probe-
|
|
3
|
-
import { o as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
4
|
-
import { l as getSlackListenerWriteClient } from "./cursor-pages-
|
|
5
|
-
import { t as sendMessageSlack } from "./send-
|
|
6
|
-
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-Bx2UZniD.mjs";
|
|
2
|
+
import { Et as isSlackAnyNativeApprovalClientEnabled, F as truncateSlackText, I as truncateSlackTextByUtf8Bytes, Pt as shouldHandleSlackNativeApprovalRequest, Q as SLACK_APPROVAL_HEADER_BLOCK_ID, Qt as normalizeSlackApproverId, i as setSlackSessionStatus, vt as SLACK_EDIT_TEXT_MAX_BYTES } from "./probe-DANukR3O.mjs";
|
|
3
|
+
import { o as resolveSlackReplyBlocks } from "./reply-blocks-BzsXUUUL.mjs";
|
|
4
|
+
import { l as getSlackListenerWriteClient } from "./cursor-pages-CATAzbTT.mjs";
|
|
5
|
+
import { t as sendMessageSlack } from "./send-yK6_-px6.mjs";
|
|
6
|
+
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-pmXcve5E.mjs";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
9
9
|
import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
10
10
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
11
11
|
import { formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
12
12
|
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
13
|
-
|
|
13
|
+
//#region extensions/slack/src/approval-handler.runtime.ts
|
|
14
14
|
const SLACK_CONTEXT_ELEMENTS_MAX = 10;
|
|
15
15
|
const SLACK_TEXT_OBJECT_MAX = 3e3;
|
|
16
16
|
function resolveHandlerContext(params) {
|
|
@@ -261,4 +261,5 @@ async function resolveApprovalChannel(client, target, teamId) {
|
|
|
261
261
|
if (!channelId) throw new Error("Slack approval DM did not return a channel id");
|
|
262
262
|
return `channel:${channelId}`;
|
|
263
263
|
}
|
|
264
|
+
//#endregion
|
|
264
265
|
export { slackApprovalNativeRuntime };
|
package/dist/.setup/{approval-message-updates-CqcRoa28.mjs → approval-message-updates-pmXcve5E.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as decodeSlackApprovalAction, W as isSlackApprovalActionId } from "./probe-
|
|
1
|
+
import { $ as decodeSlackApprovalAction, W as isSlackApprovalActionId } from "./probe-DANukR3O.mjs";
|
|
2
2
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
4
|
-
|
|
4
|
+
//#region extensions/slack/src/approval-message-updates.ts
|
|
5
5
|
const updates = new KeyedAsyncQueue();
|
|
6
6
|
function runSlackApprovalMessageUpdate(target, update) {
|
|
7
7
|
return updates.enqueue(JSON.stringify([
|
|
@@ -22,4 +22,5 @@ function hasSlackApprovalControl(blocks, approval) {
|
|
|
22
22
|
});
|
|
23
23
|
}) ?? false;
|
|
24
24
|
}
|
|
25
|
+
//#endregion
|
|
25
26
|
export { runSlackApprovalMessageUpdate as n, hasSlackApprovalControl as t };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
2
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
5
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
6
|
-
import { $t as resolveSlackExecApprovalTarget, At as resolveSessionSlackOriginTarget, Dt as isSlackPluginApprovalRequest, Et as isSlackAnyNativeApprovalClientEnabled, Ft as shouldHandleSlackPluginViaForwardingSession, It as slackTargetsMatch, Kt as getSlackInstallationKind, Lt as getSlackApprovalApproversForTeam, Mt as resolveSlackFallbackOriginTarget, Nt as resolveTurnSourceSlackOriginTarget, Ot as normalizeSlackForwardTarget, P as countSlackTextUtf8Bytes, Pt as shouldHandleSlackNativeApprovalRequest, Rt as isSlackPluginApprovalAuthorizedSender, S as assertSlackDetachedTargetAllowed, Xt as isSlackExecApprovalAuthorizedSender, Yt as getSlackExecApprovalApprovers, Zt as isSlackExecApprovalClientEnabled, _ as qualifySlackRoutePeerId, _t as renderSlackMessagePresentationFallbackText, b as resolveSlackConversationBindingRoute, d as resolveSlackGroupRequireMention, en as shouldSuppressLocalSlackExecApprovalPrompt, f as resolveSlackGroupToolPolicy, g as qualifySlackConversationId, i as setSlackSessionStatus, jt as resolveSlackApproverDmTargets, kt as normalizeSlackOriginTarget, m as formatSlackError, mt as SLACK_PRESENTATION_CAPABILITIES, qt as isSlackWorkspaceInstallation, rn as resolveSlackAutoThreadId, s as slackIngressIdentity, t as probeSlack, tn as resolvePluginApprovalSlackApprovers, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT, y as normalizeSlackRouteBindingConfig, zt as resolveSlackApprovalTeamId } from "./probe-
|
|
7
|
-
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-
|
|
8
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-
|
|
9
|
-
import { a as resolveSlackReplyBlockResolution, o as resolveSlackReplyBlocks, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-
|
|
10
|
-
import { r as createSlackLookupClient, t as collectSlackCursorPages, u as getSlackWriteClient } from "./cursor-pages-
|
|
11
|
-
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-
|
|
12
|
-
import { n as SLACK_CHANNEL_META } from "./channel-meta-
|
|
13
|
-
import { i as SLACK_CHANNEL, r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-
|
|
14
|
-
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-
|
|
15
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-zcR9TJJN.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-CGJScKtk.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-BLVha-ov.mjs";
|
|
4
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-Bx2UZniD.mjs";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-D-ASeWHy.mjs";
|
|
6
|
+
import { $t as resolveSlackExecApprovalTarget, At as resolveSessionSlackOriginTarget, Dt as isSlackPluginApprovalRequest, Et as isSlackAnyNativeApprovalClientEnabled, Ft as shouldHandleSlackPluginViaForwardingSession, It as slackTargetsMatch, Kt as getSlackInstallationKind, Lt as getSlackApprovalApproversForTeam, Mt as resolveSlackFallbackOriginTarget, Nt as resolveTurnSourceSlackOriginTarget, Ot as normalizeSlackForwardTarget, P as countSlackTextUtf8Bytes, Pt as shouldHandleSlackNativeApprovalRequest, Rt as isSlackPluginApprovalAuthorizedSender, S as assertSlackDetachedTargetAllowed, Xt as isSlackExecApprovalAuthorizedSender, Yt as getSlackExecApprovalApprovers, Zt as isSlackExecApprovalClientEnabled, _ as qualifySlackRoutePeerId, _t as renderSlackMessagePresentationFallbackText, b as resolveSlackConversationBindingRoute, d as resolveSlackGroupRequireMention, en as shouldSuppressLocalSlackExecApprovalPrompt, f as resolveSlackGroupToolPolicy, g as qualifySlackConversationId, i as setSlackSessionStatus, jt as resolveSlackApproverDmTargets, kt as normalizeSlackOriginTarget, m as formatSlackError, mt as SLACK_PRESENTATION_CAPABILITIES, qt as isSlackWorkspaceInstallation, rn as resolveSlackAutoThreadId, s as slackIngressIdentity, t as probeSlack, tn as resolvePluginApprovalSlackApprovers, vt as SLACK_EDIT_TEXT_MAX_BYTES, wt as normalizeSlackOutboundText, xt as SLACK_TEXT_LIMIT, y as normalizeSlackRouteBindingConfig, zt as resolveSlackApprovalTeamId } from "./probe-DANukR3O.mjs";
|
|
7
|
+
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-Cvt7WD6B.mjs";
|
|
8
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-LGIgVXJf.mjs";
|
|
9
|
+
import { a as resolveSlackReplyBlockResolution, o as resolveSlackReplyBlocks, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-BzsXUUUL.mjs";
|
|
10
|
+
import { r as createSlackLookupClient, t as collectSlackCursorPages, u as getSlackWriteClient } from "./cursor-pages-CATAzbTT.mjs";
|
|
11
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-B5P3w9eA.mjs";
|
|
12
|
+
import { n as SLACK_CHANNEL_META } from "./channel-meta-C443t-lI.mjs";
|
|
13
|
+
import { i as SLACK_CHANNEL, r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-Lq2OxKkF.mjs";
|
|
14
|
+
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-9-QJRCXk.mjs";
|
|
15
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-uiQtoNlu.mjs";
|
|
16
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
17
17
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
18
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -39,7 +39,7 @@ import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringParam
|
|
|
39
39
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createConditionalWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
40
40
|
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
41
41
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
42
|
-
|
|
42
|
+
//#region extensions/slack/src/approval-native.ts
|
|
43
43
|
function resolveSlackNativeSuppressionAccountId({ target, request }) {
|
|
44
44
|
return normalizeOptionalString(target.accountId) ?? normalizeOptionalString(request.request.turnSourceAccountId);
|
|
45
45
|
}
|
|
@@ -103,7 +103,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
103
103
|
],
|
|
104
104
|
isConfigured: isSlackAnyNativeApprovalClientEnabled,
|
|
105
105
|
shouldHandle: shouldHandleSlackNativeApprovalRequest,
|
|
106
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
106
|
+
load: async () => (await import("./approval-handler.runtime-Buw5jh2Y.mjs")).slackApprovalNativeRuntime
|
|
107
107
|
})
|
|
108
108
|
});
|
|
109
109
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.nativeAsync;
|
|
@@ -171,7 +171,8 @@ const slackApprovalCapability = {
|
|
|
171
171
|
}
|
|
172
172
|
} : void 0
|
|
173
173
|
};
|
|
174
|
-
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region extensions/slack/src/channel-actions.ts
|
|
175
176
|
const SLACK_MESSAGE_ACTIONS = /* @__PURE__ */ new Map([
|
|
176
177
|
["reactions", "reactions"],
|
|
177
178
|
["delete", "deleteMessage"],
|
|
@@ -213,7 +214,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
213
214
|
"unpinMessage",
|
|
214
215
|
"uploadFile"
|
|
215
216
|
]);
|
|
216
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
217
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-VQGaR6g8.mjs"));
|
|
217
218
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
218
219
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId && !ctx.assertDirectAdapterHandoff) return;
|
|
219
220
|
return {
|
|
@@ -437,7 +438,8 @@ function shouldUseWorkspaceAwareSlackActionSend(rawTarget, context) {
|
|
|
437
438
|
}
|
|
438
439
|
return false;
|
|
439
440
|
}
|
|
440
|
-
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region extensions/slack/src/conversation-route-owner.ts
|
|
441
443
|
function prepareSlackConversationRouteOwner(params) {
|
|
442
444
|
const accountId = normalizeAccountId$2(params.accountId);
|
|
443
445
|
const accountConfig = resolveAccountEntry(params.cfg.channels?.slack?.accounts, accountId);
|
|
@@ -557,7 +559,8 @@ const slackConversationRouteOwners = { prepareConversationRouteOwnersAsync: asyn
|
|
|
557
559
|
});
|
|
558
560
|
});
|
|
559
561
|
} };
|
|
560
|
-
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region extensions/slack/src/enterprise-user-route.ts
|
|
561
564
|
/** Resolve a workspace for a detached Enterprise DM without opening a conversation. */
|
|
562
565
|
async function resolveSlackEnterpriseUserTeamId(params) {
|
|
563
566
|
const account = resolveSlackAccount(params);
|
|
@@ -582,7 +585,8 @@ async function resolveSlackEnterpriseUserTeamId(params) {
|
|
|
582
585
|
if (!teamId) throw new Error("unsupported_enterprise_slack_delivery: recipient shares no verified installed workspace");
|
|
583
586
|
return teamId;
|
|
584
587
|
}
|
|
585
|
-
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region extensions/slack/src/security.ts
|
|
586
590
|
const resolveSlackDmPolicy = createScopedDmSecurityResolver({
|
|
587
591
|
channelKey: "slack",
|
|
588
592
|
resolvePolicy: (account) => account.config.dmPolicy,
|
|
@@ -623,7 +627,7 @@ const collectSlackSecurityFindings = createConditionalWarningCollector.findings(
|
|
|
623
627
|
severity: "warn",
|
|
624
628
|
title: "Slack security warning"
|
|
625
629
|
});
|
|
626
|
-
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-
|
|
630
|
+
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-DFGiFLqd.mjs").then((n) => n.n));
|
|
627
631
|
const slackSecurityAdapter = {
|
|
628
632
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
629
633
|
collectWarnings: collectSlackSecurityFindings,
|
|
@@ -632,7 +636,8 @@ const slackSecurityAdapter = {
|
|
|
632
636
|
return await collectSlackSecurityAuditFindings(params);
|
|
633
637
|
}
|
|
634
638
|
};
|
|
635
|
-
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region extensions/slack/src/doctor.ts
|
|
636
641
|
const isSlackMutableUnqualifiedAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:(?:[sS][lL][aA][cC][kK]|[uU][sS][eE][rR]):)?(?:[UWBCGDT][A-Z0-9]{2,}|[A-Za-z0-9]{8,})|<@[A-Za-z0-9]{8,}>)$/ });
|
|
637
642
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
638
643
|
channel: "slack",
|
|
@@ -768,7 +773,8 @@ const slackDoctor = {
|
|
|
768
773
|
collectPreviewWarnings: collectSlackUserIdentityWarnings,
|
|
769
774
|
collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
|
|
770
775
|
};
|
|
771
|
-
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region extensions/slack/src/shared.ts
|
|
772
778
|
const slackConfigAdapter = {
|
|
773
779
|
...slackBaseConfigAdapter,
|
|
774
780
|
inspectAccount: adaptScopedAccountAccessor(inspectSlackAccount)
|
|
@@ -820,7 +826,8 @@ const slackPluginBase = {
|
|
|
820
826
|
collectRuntimeConfigAssignments
|
|
821
827
|
}
|
|
822
828
|
};
|
|
823
|
-
|
|
829
|
+
//#endregion
|
|
830
|
+
//#region extensions/slack/src/threading-tool-context.ts
|
|
824
831
|
function buildSlackThreadingToolContext(params) {
|
|
825
832
|
const account = resolveSlackAccount({
|
|
826
833
|
cfg: params.cfg,
|
|
@@ -850,19 +857,20 @@ function buildSlackThreadingToolContext(params) {
|
|
|
850
857
|
sameChannelThreadRequired: hasExplicitThreadTarget
|
|
851
858
|
};
|
|
852
859
|
}
|
|
853
|
-
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region extensions/slack/src/channel.ts
|
|
854
862
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/extension-shared"));
|
|
855
863
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/target-resolver-runtime"));
|
|
856
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
857
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
864
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-BocHwImV.mjs"));
|
|
865
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-C-95EWl2.mjs"));
|
|
858
866
|
const bindSlackOutbound = createLazyRuntimeMethodBinder(loadSlackOutboundAdapterModule);
|
|
859
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
860
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
861
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
862
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
863
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
864
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
865
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
867
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-D-hf9KGQ.mjs").then((n) => n.t));
|
|
868
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-XDPgnesf.mjs").then((n) => n.n));
|
|
869
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-aDAv24U2.mjs").then((n) => n.n));
|
|
870
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-yK6_-px6.mjs").then((n) => n.n));
|
|
871
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-DANukR3O.mjs").then((n) => n.n));
|
|
872
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-Cm1TuqxN.mjs").then((n) => n.t));
|
|
873
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-onKAFI1E.mjs").then((n) => n.t));
|
|
866
874
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
867
875
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
868
876
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -1383,4 +1391,5 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1383
1391
|
},
|
|
1384
1392
|
outbound: slackChannelOutbound
|
|
1385
1393
|
});
|
|
1394
|
+
//#endregion
|
|
1386
1395
|
export { buildSlackThreadingToolContext as n, slackPlugin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
//#region extensions/slack/src/channel-meta.ts
|
|
2
2
|
const SLACK_CHANNEL_META = {
|
|
3
3
|
id: "slack",
|
|
4
4
|
label: "Slack",
|
|
@@ -23,4 +23,5 @@ const DEFAULT_SLACK_SUGGESTED_PROMPTS = [
|
|
|
23
23
|
message: "Help me draft a reply."
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
|
+
//#endregion
|
|
26
27
|
export { SLACK_CHANNEL_META as n, DEFAULT_SLACK_SUGGESTED_PROMPTS as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { S as assertSlackDetachedTargetAllowed } from "./probe-
|
|
4
|
-
import { i as createSlackReadClient, o as createSlackTokenCacheKey, p as readLruMapEntry, s as createSlackWebClient } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-CGJScKtk.mjs";
|
|
3
|
+
import { S as assertSlackDetachedTargetAllowed } from "./probe-DANukR3O.mjs";
|
|
4
|
+
import { i as createSlackReadClient, o as createSlackTokenCacheKey, p as readLruMapEntry, s as createSlackWebClient } from "./cursor-pages-CATAzbTT.mjs";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
8
|
-
|
|
8
|
+
//#region extensions/slack/src/channel-type.ts
|
|
9
9
|
var channel_type_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
resolveSlackChannelType: () => resolveSlackChannelType,
|
|
11
11
|
resolveSlackConversationInfo: () => resolveSlackConversationInfo
|
|
@@ -90,4 +90,5 @@ async function resolveSlackConversationInfo(params) {
|
|
|
90
90
|
async function resolveSlackChannelType(params) {
|
|
91
91
|
return (await resolveSlackConversationInfo(params)).type;
|
|
92
92
|
}
|
|
93
|
+
//#endregion
|
|
93
94
|
export { resolveSlackChannelType as n, resolveSlackConversationInfo as r, channel_type_exports as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as isSlackSetupAccountConfigured } from "./account-configured-
|
|
2
|
-
import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-
|
|
5
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { i as isSlackSetupAccountConfigured } from "./account-configured-zcR9TJJN.mjs";
|
|
2
|
+
import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-CGJScKtk.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-BLVha-ov.mjs";
|
|
4
|
+
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C443t-lI.mjs";
|
|
5
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-BWAaa5au.mjs";
|
|
6
6
|
import { normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -13,7 +13,7 @@ import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
|
13
13
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
14
14
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
15
15
|
import { patchTopLevelChannelConfigSection } from "openclaw/plugin-sdk/setup";
|
|
16
|
-
|
|
16
|
+
//#region extensions/slack/src/setup-shared.ts
|
|
17
17
|
const SLACK_CHANNEL = "slack";
|
|
18
18
|
function buildSlackAllowFromPrompt() {
|
|
19
19
|
const t = createSetupTranslator();
|
|
@@ -150,7 +150,8 @@ function describeSlackSetupAccount(account) {
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region extensions/slack/src/config-adapter.ts
|
|
154
155
|
const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
155
156
|
sectionKey: SLACK_CHANNEL,
|
|
156
157
|
listAccountIds: listSlackAccountIds,
|
|
@@ -168,7 +169,8 @@ const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
168
169
|
formatAllowFrom: (allowFrom) => formatAllowFromLowercase({ allowFrom }),
|
|
169
170
|
resolveDefaultTo: (account) => account.defaultTo
|
|
170
171
|
});
|
|
171
|
-
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region extensions/slack/src/setup-core.ts
|
|
172
174
|
const t = createSetupTranslator();
|
|
173
175
|
function enableSlackAccount(cfg, accountId) {
|
|
174
176
|
return patchChannelConfigForAccount({
|
|
@@ -532,7 +534,8 @@ function createSlackSetupWizardProxy(loadWizard) {
|
|
|
532
534
|
fallbackResolvedGroupAllowlist: (entries) => entries
|
|
533
535
|
});
|
|
534
536
|
}
|
|
535
|
-
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region extensions/slack/src/channel.setup.ts
|
|
536
539
|
const slackSetupPlugin = {
|
|
537
540
|
id: SLACK_CHANNEL,
|
|
538
541
|
meta: {
|
|
@@ -547,7 +550,7 @@ const slackSetupPlugin = {
|
|
|
547
550
|
markdownCapable: true,
|
|
548
551
|
preferSessionLookupForAnnounceTarget: true
|
|
549
552
|
},
|
|
550
|
-
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-
|
|
553
|
+
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-C0KRtyqa.mjs")),
|
|
551
554
|
capabilities: {
|
|
552
555
|
chatTypes: [
|
|
553
556
|
"direct",
|
|
@@ -625,4 +628,5 @@ const slackSetupPlugin = {
|
|
|
625
628
|
},
|
|
626
629
|
setupContract: slackSetupContract
|
|
627
630
|
};
|
|
631
|
+
//#endregion
|
|
628
632
|
export { buildSlackAllowFromPrompt as a, SLACK_CHANNEL as i, createSlackSetupWizardBase as n, slackBaseConfigAdapter as r, slackSetupPlugin as t };
|
|
@@ -2,7 +2,7 @@ import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugi
|
|
|
2
2
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
3
3
|
import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, ReplyToModeSchema, buildChannelAccountSchemaParts, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildGroupEntrySchema, refineChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-schema";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
//#region extensions/slack/src/config-ui-hints.ts
|
|
6
6
|
const observedGroupHistoryHint = { help: "Automatic observed-message context uses a default of 50 and a maximum of 200 messages; 0 disables automatic injection. The JSON integer maximum selects the 50-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
|
|
7
7
|
const observedDmHistoryHint = { help: "Automatic observed-DM context uses a default of 0 and a maximum of 200 messages; 0 disables that extra context. The JSON integer maximum selects the 0-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
|
|
8
8
|
const botThreadMentionHint = {
|
|
@@ -174,7 +174,8 @@ const slackChannelConfigUiHints = {
|
|
|
174
174
|
help: "Maximum number of existing Slack thread messages to fetch when starting a new thread session (default: 20, set to 0 to disable)."
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region extensions/slack/src/config-schema.ts
|
|
178
179
|
const SecretInputSchema = buildSecretInputSchema();
|
|
179
180
|
const SLACK_PRESENCE_EVENT_PROMPT_MAX_CHARS = 2e4;
|
|
180
181
|
const SlackStreamingProgressSchema = ChannelStreamingProgressSchema.extend({
|
|
@@ -369,4 +370,5 @@ const SlackConfigSchema = SlackAccountSchema.safeExtend({
|
|
|
369
370
|
validateSlackSigningSecretRequirements(value, ctx);
|
|
370
371
|
});
|
|
371
372
|
const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { uiHints: slackChannelConfigUiHints });
|
|
373
|
+
//#endregion
|
|
372
374
|
export { SlackChannelConfigSchema as t };
|