@openclaw/slack 2026.11.8 → 2026.11.9
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-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
- package/dist/.setup/{account-inspect-BLVha-ov.mjs → account-inspect-DgQgj0wk.mjs} +3 -4
- package/dist/.setup/{accounts-CGJScKtk.mjs → accounts-EaPP0fFY.mjs} +6 -10
- package/dist/.setup/{action-runtime-D01wBhx5.mjs → action-runtime-CK9QZgQl.mjs} +9 -10
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +1 -0
- package/dist/.setup/{actions-D5S6D_BU.mjs → actions-s3CcFO45.mjs} +14 -22
- package/dist/.setup/{approval-handler.runtime-Buw5jh2Y.mjs → approval-handler.runtime-Ch7BecYK.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-CqcRoa28.mjs} +2 -3
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-B5P3w9eA.mjs → channel-type-9Lw6yLf2.mjs} +5 -6
- package/dist/.setup/{channel-DSi3yBu5.mjs → channel-zlQxHZXl.mjs} +36 -45
- package/dist/.setup/{channel.setup-Lq2OxKkF.mjs → channel.setup-BlgXNuCJ.mjs} +10 -14
- package/dist/.setup/{config-schema-BWAaa5au.mjs → config-schema-Bx1tCZB0.mjs} +2 -4
- package/dist/.setup/{cursor-pages-CATAzbTT.mjs → cursor-pages-jVn3Vkfi.mjs} +4 -8
- package/dist/.setup/{directory-config-D-hf9KGQ.mjs → directory-config-CGvKYg9F.mjs} +5 -6
- package/dist/.setup/{directory-live-onKAFI1E.mjs → directory-live-DNdw97LA.mjs} +4 -5
- package/dist/.setup/{doctor-contract-9-QJRCXk.mjs → doctor-contract-BB2KJ9Ni.mjs} +7 -13
- package/dist/.setup/{message-tool-api-LGIgVXJf.mjs → message-tool-api-B38BpEaE.mjs} +5 -7
- package/dist/.setup/{monitor-CZGrHb5a.mjs → monitor-BJId9dWb.mjs} +73 -128
- package/dist/.setup/{outbound-adapter-C-95EWl2.mjs → outbound-adapter-BH6iPWBj.mjs} +9 -10
- package/dist/.setup/{paths-B1u59oLK.mjs → paths-CQZI_5WY.mjs} +1 -2
- package/dist/.setup/{pipeline.runtime-B-EtO-8F.mjs → pipeline.runtime-Bwv_G13H.mjs} +43 -71
- package/dist/.setup/{policy-DxhGRvc2.mjs → policy-C6_DdlSf.mjs} +3 -5
- package/dist/.setup/{probe-DANukR3O.mjs → probe-B_Ax1vS1.mjs} +36 -66
- package/dist/.setup/{question-delivery-CWC7sRhH.mjs → question-delivery-D3qAIwuv.mjs} +2 -3
- package/dist/.setup/{relay-source-BH-NPqBP.mjs → relay-source-D1SVBMhk.mjs} +3 -4
- package/dist/.setup/{replies-B5e7p3dD.mjs → replies-C9j_tM8I.mjs} +8 -10
- package/dist/.setup/{reply-blocks-BzsXUUUL.mjs → reply-blocks-DyYYRrP_.mjs} +4 -7
- package/dist/.setup/{resolve-channels-XDPgnesf.mjs → resolve-channels-CF2JME9q.mjs} +4 -5
- package/dist/.setup/{resolve-users-aDAv24U2.mjs → resolve-users-DDcCAjH1.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
- package/dist/.setup/{scopes-BocHwImV.mjs → scopes-CzHC_dwV.mjs} +3 -4
- package/dist/.setup/{secret-contract-uiQtoNlu.mjs → secret-contract-CqVqR7MP.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-BlLz88mj.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-yK6_-px6.mjs → send-WJZ73VSf.mjs} +13 -19
- package/dist/.setup/{send-results-BGxlroJ-.mjs → send-results-Bm6V1ekL.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-DJXIB8CF.mjs +2 -0
- package/dist/.setup/{setup-surface-C0KRtyqa.mjs → setup-surface-uIqP2B0Y.mjs} +6 -7
- package/dist/.setup/{slash-dispatch.runtime-CZuMRdRx.mjs → slash-dispatch.runtime-DhIREf-h.mjs} +1 -1
- package/dist/.setup/{target-parsing-Bx2UZniD.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
- package/dist/.setup/{targets-D-ASeWHy.mjs → targets-eeOxA_b_.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- 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 +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +0 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-Cfz58xoh.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
|
+
// 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,5 +31,4 @@ function createSlackAccountConfiguredChecker(allowSecretRefs) {
|
|
|
31
31
|
}
|
|
32
32
|
const isSlackPluginAccountConfigured = createSlackAccountConfiguredChecker(false);
|
|
33
33
|
const isSlackSetupAccountConfigured = createSlackAccountConfiguredChecker(true);
|
|
34
|
-
//#endregion
|
|
35
34
|
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-35y0-Hso.mjs";
|
|
2
|
+
import { _ as buildSlackAccountSurfaceFields, a as mergeSlackAccountConfig, o as resolveDefaultSlackAccountId } from "./accounts-EaPP0fFY.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
|
+
// extensions/slack/src/account-inspect.ts
|
|
7
7
|
function inspectSlackToken(value, envToken) {
|
|
8
8
|
const credential = resolveSecretInputString({
|
|
9
9
|
value,
|
|
@@ -66,5 +66,4 @@ function inspectSlackAccount(params) {
|
|
|
66
66
|
...buildSlackAccountSurfaceFields(merged)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
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-nwUcYXjP.mjs";
|
|
2
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-35y0-Hso.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
|
+
// extensions/slack/src/account-surface-fields.ts
|
|
11
11
|
function buildSlackAccountSurfaceFields(config) {
|
|
12
12
|
return {
|
|
13
13
|
groupPolicy: config.groupPolicy,
|
|
@@ -23,8 +23,7 @@ function buildSlackAccountSurfaceFields(config) {
|
|
|
23
23
|
channels: config.channels
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
//#region extensions/slack/src/token.ts
|
|
26
|
+
// extensions/slack/src/token.ts
|
|
28
27
|
function formatSlackBotTokenIdentityWarning(params) {
|
|
29
28
|
const userId = params.auth.user_id?.trim();
|
|
30
29
|
const botId = params.auth.bot_id?.trim();
|
|
@@ -41,15 +40,13 @@ function createSlackTokenResolver(defaultPath) {
|
|
|
41
40
|
const resolveSlackBotToken = createSlackTokenResolver("channels.slack.botToken");
|
|
42
41
|
const resolveSlackAppToken = createSlackTokenResolver("channels.slack.appToken");
|
|
43
42
|
const resolveSlackUserToken = createSlackTokenResolver("channels.slack.userToken");
|
|
44
|
-
|
|
45
|
-
//#region extensions/slack/src/account-reply-mode.ts
|
|
43
|
+
// extensions/slack/src/account-reply-mode.ts
|
|
46
44
|
function resolveSlackReplyToMode(account, chatType) {
|
|
47
45
|
const normalized = normalizeChatType(chatType ?? void 0);
|
|
48
46
|
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
49
47
|
return account.replyToMode ?? "off";
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
//#region extensions/slack/src/accounts.ts
|
|
49
|
+
// extensions/slack/src/accounts.ts
|
|
53
50
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
54
51
|
hasImplicitDefaultSlackAccount: () => hasImplicitDefaultSlackAccount,
|
|
55
52
|
listEnabledSlackAccounts: () => listEnabledSlackAccounts,
|
|
@@ -194,5 +191,4 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
194
191
|
accountId
|
|
195
192
|
})).filter((account) => account.enabled);
|
|
196
193
|
}
|
|
197
|
-
//#endregion
|
|
198
194
|
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-DwYAP3ts.mjs";
|
|
2
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.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-B_Ax1vS1.mjs";
|
|
4
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-C6_DdlSf.mjs";
|
|
5
|
+
import { t as mergeSlackSendResults } from "./send-results-Bm6V1ekL.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
|
+
// 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-s3CcFO45.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-EaPP0fFY.mjs").then((n) => n.t));
|
|
35
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-9Lw6yLf2.mjs").then((n) => n.t));
|
|
36
36
|
const bindSlackChannelType = createLazyRuntimeMethodBinder(loadSlackChannelTypeRuntime);
|
|
37
37
|
const slackActionRuntime = {
|
|
38
38
|
createSlackChannel: bindSlackAction((runtime) => runtime.createSlackChannel),
|
|
@@ -613,5 +613,4 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
613
613
|
}
|
|
614
614
|
throw new Error(`Unknown action: ${action}`);
|
|
615
615
|
}
|
|
616
|
-
//#endregion
|
|
617
616
|
export { slackActionRuntime as n, handleSlackAction as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as handleSlackAction } from "./action-runtime-CK9QZgQl.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-nwUcYXjP.mjs";
|
|
2
|
+
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-DwYAP3ts.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-B_Ax1vS1.mjs";
|
|
5
|
+
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
6
|
+
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-WJZ73VSf.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
|
+
// 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,8 +43,7 @@ async function openSlackConversationWithClient(client, input) {
|
|
|
43
43
|
})
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
//#region extensions/slack/src/edit-text.ts
|
|
46
|
+
// extensions/slack/src/edit-text.ts
|
|
48
47
|
function buildSlackEditTextPayload(content, blocks) {
|
|
49
48
|
const trimmedContent = content.trim();
|
|
50
49
|
const blockText = blocks?.length ? buildSlackCompleteBlocksFallbackText(blocks).trim() : "";
|
|
@@ -57,8 +56,7 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
57
56
|
if (blockText) return truncateSlackTextByUtf8Bytes(blockText, SLACK_EDIT_TEXT_MAX_BYTES);
|
|
58
57
|
return " ";
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
//#region extensions/slack/src/monitor/block-text.ts
|
|
59
|
+
// extensions/slack/src/monitor/block-text.ts
|
|
62
60
|
function hasSlackTableBlock(blocks) {
|
|
63
61
|
return blocks?.some((block) => asOptionalRecord(block)?.type === "table") ?? false;
|
|
64
62
|
}
|
|
@@ -133,8 +131,7 @@ function chooseSlackPrimaryText(params) {
|
|
|
133
131
|
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
134
132
|
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
135
133
|
}
|
|
136
|
-
|
|
137
|
-
//#region extensions/slack/src/file-reference.ts
|
|
134
|
+
// extensions/slack/src/file-reference.ts
|
|
138
135
|
function formatSlackFileReference(file) {
|
|
139
136
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
140
137
|
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
@@ -151,18 +148,15 @@ function formatSlackFileReferenceList(files) {
|
|
|
151
148
|
if (!files?.length) return "file";
|
|
152
149
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
153
150
|
}
|
|
154
|
-
|
|
155
|
-
//#region extensions/slack/src/monitor/media.runtime.ts
|
|
151
|
+
// extensions/slack/src/monitor/media.runtime.ts
|
|
156
152
|
const slackMediaLog = createSubsystemLogger("gateway/channels/slack").child("media");
|
|
157
|
-
|
|
158
|
-
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
153
|
+
// extensions/slack/src/monitor/slack-client-kind.ts
|
|
159
154
|
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
160
155
|
function isGovSlackClient(client) {
|
|
161
156
|
const apiUrl = client?.slackApiUrl ? URL.parse(client.slackApiUrl) : null;
|
|
162
157
|
return apiUrl?.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
163
158
|
}
|
|
164
|
-
|
|
165
|
-
//#region extensions/slack/src/monitor/media.ts
|
|
159
|
+
// extensions/slack/src/monitor/media.ts
|
|
166
160
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
167
161
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
168
162
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
@@ -481,8 +475,7 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
481
475
|
...unavailableFiles.length > 0 ? { files: unavailableFiles } : {}
|
|
482
476
|
};
|
|
483
477
|
}
|
|
484
|
-
|
|
485
|
-
//#region extensions/slack/src/actions.ts
|
|
478
|
+
// extensions/slack/src/actions.ts
|
|
486
479
|
var actions_exports = /* @__PURE__ */ __exportAll({
|
|
487
480
|
createSlackChannel: () => createSlackChannel,
|
|
488
481
|
deleteSlackMessage: () => deleteSlackMessage,
|
|
@@ -860,5 +853,4 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
860
853
|
maxBytes: opts.maxBytes
|
|
861
854
|
}))?.[0] ?? null;
|
|
862
855
|
}
|
|
863
|
-
//#endregion
|
|
864
856
|
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-Buw5jh2Y.mjs → approval-handler.runtime-Ch7BecYK.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-DwYAP3ts.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-B_Ax1vS1.mjs";
|
|
3
|
+
import { o as resolveSlackReplyBlocks } from "./reply-blocks-DyYYRrP_.mjs";
|
|
4
|
+
import { l as getSlackListenerWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
5
|
+
import { t as sendMessageSlack } from "./send-WJZ73VSf.mjs";
|
|
6
|
+
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-CqcRoa28.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
|
+
// 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,5 +261,4 @@ 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
|
|
265
264
|
export { slackApprovalNativeRuntime };
|
package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-CqcRoa28.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as decodeSlackApprovalAction, W as isSlackApprovalActionId } from "./probe-
|
|
1
|
+
import { $ as decodeSlackApprovalAction, W as isSlackApprovalActionId } from "./probe-B_Ax1vS1.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
|
+
// 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,5 +22,4 @@ function hasSlackApprovalControl(blocks, approval) {
|
|
|
22
22
|
});
|
|
23
23
|
}) ?? false;
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { runSlackApprovalMessageUpdate as n, hasSlackApprovalControl as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/slack/src/channel-meta.ts
|
|
2
2
|
const SLACK_CHANNEL_META = {
|
|
3
3
|
id: "slack",
|
|
4
4
|
label: "Slack",
|
|
@@ -23,5 +23,4 @@ const DEFAULT_SLACK_SUGGESTED_PROMPTS = [
|
|
|
23
23
|
message: "Help me draft a reply."
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
|
-
//#endregion
|
|
27
26
|
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-nwUcYXjP.mjs";
|
|
2
|
+
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { S as assertSlackDetachedTargetAllowed } from "./probe-B_Ax1vS1.mjs";
|
|
4
|
+
import { i as createSlackReadClient, o as createSlackTokenCacheKey, p as readLruMapEntry, s as createSlackWebClient } from "./cursor-pages-jVn3Vkfi.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
|
+
// extensions/slack/src/channel-type.ts
|
|
9
9
|
var channel_type_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
resolveSlackChannelType: () => resolveSlackChannelType,
|
|
11
11
|
resolveSlackConversationInfo: () => resolveSlackConversationInfo
|
|
@@ -90,5 +90,4 @@ async function resolveSlackConversationInfo(params) {
|
|
|
90
90
|
async function resolveSlackChannelType(params) {
|
|
91
91
|
return (await resolveSlackConversationInfo(params)).type;
|
|
92
92
|
}
|
|
93
|
-
//#endregion
|
|
94
93
|
export { resolveSlackChannelType as n, resolveSlackConversationInfo as r, channel_type_exports 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-35y0-Hso.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-EaPP0fFY.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
|
|
4
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.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-B_Ax1vS1.mjs";
|
|
7
|
+
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
8
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-B38BpEaE.mjs";
|
|
9
|
+
import { a as resolveSlackReplyBlockResolution, o as resolveSlackReplyBlocks, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-DyYYRrP_.mjs";
|
|
10
|
+
import { r as createSlackLookupClient, t as collectSlackCursorPages, u as getSlackWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
11
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-9Lw6yLf2.mjs";
|
|
12
|
+
import { n as SLACK_CHANNEL_META } from "./channel-meta-C5vsCo3a.mjs";
|
|
13
|
+
import { i as SLACK_CHANNEL, r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-BlgXNuCJ.mjs";
|
|
14
|
+
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-BB2KJ9Ni.mjs";
|
|
15
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CqVqR7MP.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
|
+
// 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-Ch7BecYK.mjs")).slackApprovalNativeRuntime
|
|
107
107
|
})
|
|
108
108
|
});
|
|
109
109
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.nativeAsync;
|
|
@@ -171,8 +171,7 @@ const slackApprovalCapability = {
|
|
|
171
171
|
}
|
|
172
172
|
} : void 0
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
//#region extensions/slack/src/channel-actions.ts
|
|
174
|
+
// extensions/slack/src/channel-actions.ts
|
|
176
175
|
const SLACK_MESSAGE_ACTIONS = /* @__PURE__ */ new Map([
|
|
177
176
|
["reactions", "reactions"],
|
|
178
177
|
["delete", "deleteMessage"],
|
|
@@ -214,7 +213,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
214
213
|
"unpinMessage",
|
|
215
214
|
"uploadFile"
|
|
216
215
|
]);
|
|
217
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
216
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-CpZktret.mjs"));
|
|
218
217
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
219
218
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId && !ctx.assertDirectAdapterHandoff) return;
|
|
220
219
|
return {
|
|
@@ -438,8 +437,7 @@ function shouldUseWorkspaceAwareSlackActionSend(rawTarget, context) {
|
|
|
438
437
|
}
|
|
439
438
|
return false;
|
|
440
439
|
}
|
|
441
|
-
|
|
442
|
-
//#region extensions/slack/src/conversation-route-owner.ts
|
|
440
|
+
// extensions/slack/src/conversation-route-owner.ts
|
|
443
441
|
function prepareSlackConversationRouteOwner(params) {
|
|
444
442
|
const accountId = normalizeAccountId$2(params.accountId);
|
|
445
443
|
const accountConfig = resolveAccountEntry(params.cfg.channels?.slack?.accounts, accountId);
|
|
@@ -559,8 +557,7 @@ const slackConversationRouteOwners = { prepareConversationRouteOwnersAsync: asyn
|
|
|
559
557
|
});
|
|
560
558
|
});
|
|
561
559
|
} };
|
|
562
|
-
|
|
563
|
-
//#region extensions/slack/src/enterprise-user-route.ts
|
|
560
|
+
// extensions/slack/src/enterprise-user-route.ts
|
|
564
561
|
/** Resolve a workspace for a detached Enterprise DM without opening a conversation. */
|
|
565
562
|
async function resolveSlackEnterpriseUserTeamId(params) {
|
|
566
563
|
const account = resolveSlackAccount(params);
|
|
@@ -585,8 +582,7 @@ async function resolveSlackEnterpriseUserTeamId(params) {
|
|
|
585
582
|
if (!teamId) throw new Error("unsupported_enterprise_slack_delivery: recipient shares no verified installed workspace");
|
|
586
583
|
return teamId;
|
|
587
584
|
}
|
|
588
|
-
|
|
589
|
-
//#region extensions/slack/src/security.ts
|
|
585
|
+
// extensions/slack/src/security.ts
|
|
590
586
|
const resolveSlackDmPolicy = createScopedDmSecurityResolver({
|
|
591
587
|
channelKey: "slack",
|
|
592
588
|
resolvePolicy: (account) => account.config.dmPolicy,
|
|
@@ -627,7 +623,7 @@ const collectSlackSecurityFindings = createConditionalWarningCollector.findings(
|
|
|
627
623
|
severity: "warn",
|
|
628
624
|
title: "Slack security warning"
|
|
629
625
|
});
|
|
630
|
-
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-
|
|
626
|
+
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-C3hXCfDt.mjs").then((n) => n.n));
|
|
631
627
|
const slackSecurityAdapter = {
|
|
632
628
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
633
629
|
collectWarnings: collectSlackSecurityFindings,
|
|
@@ -636,8 +632,7 @@ const slackSecurityAdapter = {
|
|
|
636
632
|
return await collectSlackSecurityAuditFindings(params);
|
|
637
633
|
}
|
|
638
634
|
};
|
|
639
|
-
|
|
640
|
-
//#region extensions/slack/src/doctor.ts
|
|
635
|
+
// extensions/slack/src/doctor.ts
|
|
641
636
|
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,}>)$/ });
|
|
642
637
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
643
638
|
channel: "slack",
|
|
@@ -773,8 +768,7 @@ const slackDoctor = {
|
|
|
773
768
|
collectPreviewWarnings: collectSlackUserIdentityWarnings,
|
|
774
769
|
collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
|
|
775
770
|
};
|
|
776
|
-
|
|
777
|
-
//#region extensions/slack/src/shared.ts
|
|
771
|
+
// extensions/slack/src/shared.ts
|
|
778
772
|
const slackConfigAdapter = {
|
|
779
773
|
...slackBaseConfigAdapter,
|
|
780
774
|
inspectAccount: adaptScopedAccountAccessor(inspectSlackAccount)
|
|
@@ -826,8 +820,7 @@ const slackPluginBase = {
|
|
|
826
820
|
collectRuntimeConfigAssignments
|
|
827
821
|
}
|
|
828
822
|
};
|
|
829
|
-
|
|
830
|
-
//#region extensions/slack/src/threading-tool-context.ts
|
|
823
|
+
// extensions/slack/src/threading-tool-context.ts
|
|
831
824
|
function buildSlackThreadingToolContext(params) {
|
|
832
825
|
const account = resolveSlackAccount({
|
|
833
826
|
cfg: params.cfg,
|
|
@@ -857,20 +850,19 @@ function buildSlackThreadingToolContext(params) {
|
|
|
857
850
|
sameChannelThreadRequired: hasExplicitThreadTarget
|
|
858
851
|
};
|
|
859
852
|
}
|
|
860
|
-
|
|
861
|
-
//#region extensions/slack/src/channel.ts
|
|
853
|
+
// extensions/slack/src/channel.ts
|
|
862
854
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/extension-shared"));
|
|
863
855
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/target-resolver-runtime"));
|
|
864
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
865
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
856
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CzHC_dwV.mjs"));
|
|
857
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-BH6iPWBj.mjs"));
|
|
866
858
|
const bindSlackOutbound = createLazyRuntimeMethodBinder(loadSlackOutboundAdapterModule);
|
|
867
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
868
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
869
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
870
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
871
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
872
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
873
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
859
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CGvKYg9F.mjs").then((n) => n.t));
|
|
860
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CF2JME9q.mjs").then((n) => n.n));
|
|
861
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DDcCAjH1.mjs").then((n) => n.n));
|
|
862
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-WJZ73VSf.mjs").then((n) => n.n));
|
|
863
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-B_Ax1vS1.mjs").then((n) => n.n));
|
|
864
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-BJId9dWb.mjs").then((n) => n.t));
|
|
865
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-DNdw97LA.mjs").then((n) => n.t));
|
|
874
866
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
875
867
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
876
868
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -1391,5 +1383,4 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1391
1383
|
},
|
|
1392
1384
|
outbound: slackChannelOutbound
|
|
1393
1385
|
});
|
|
1394
|
-
//#endregion
|
|
1395
1386
|
export { buildSlackThreadingToolContext as n, slackPlugin 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-35y0-Hso.mjs";
|
|
2
|
+
import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
|
|
4
|
+
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C5vsCo3a.mjs";
|
|
5
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-Bx1tCZB0.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
|
+
// extensions/slack/src/setup-shared.ts
|
|
17
17
|
const SLACK_CHANNEL = "slack";
|
|
18
18
|
function buildSlackAllowFromPrompt() {
|
|
19
19
|
const t = createSetupTranslator();
|
|
@@ -150,8 +150,7 @@ function describeSlackSetupAccount(account) {
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
//#region extensions/slack/src/config-adapter.ts
|
|
153
|
+
// extensions/slack/src/config-adapter.ts
|
|
155
154
|
const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
156
155
|
sectionKey: SLACK_CHANNEL,
|
|
157
156
|
listAccountIds: listSlackAccountIds,
|
|
@@ -169,8 +168,7 @@ const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
169
168
|
formatAllowFrom: (allowFrom) => formatAllowFromLowercase({ allowFrom }),
|
|
170
169
|
resolveDefaultTo: (account) => account.defaultTo
|
|
171
170
|
});
|
|
172
|
-
|
|
173
|
-
//#region extensions/slack/src/setup-core.ts
|
|
171
|
+
// extensions/slack/src/setup-core.ts
|
|
174
172
|
const t = createSetupTranslator();
|
|
175
173
|
function enableSlackAccount(cfg, accountId) {
|
|
176
174
|
return patchChannelConfigForAccount({
|
|
@@ -534,8 +532,7 @@ function createSlackSetupWizardProxy(loadWizard) {
|
|
|
534
532
|
fallbackResolvedGroupAllowlist: (entries) => entries
|
|
535
533
|
});
|
|
536
534
|
}
|
|
537
|
-
|
|
538
|
-
//#region extensions/slack/src/channel.setup.ts
|
|
535
|
+
// extensions/slack/src/channel.setup.ts
|
|
539
536
|
const slackSetupPlugin = {
|
|
540
537
|
id: SLACK_CHANNEL,
|
|
541
538
|
meta: {
|
|
@@ -550,7 +547,7 @@ const slackSetupPlugin = {
|
|
|
550
547
|
markdownCapable: true,
|
|
551
548
|
preferSessionLookupForAnnounceTarget: true
|
|
552
549
|
},
|
|
553
|
-
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-
|
|
550
|
+
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-uIqP2B0Y.mjs")),
|
|
554
551
|
capabilities: {
|
|
555
552
|
chatTypes: [
|
|
556
553
|
"direct",
|
|
@@ -628,5 +625,4 @@ const slackSetupPlugin = {
|
|
|
628
625
|
},
|
|
629
626
|
setupContract: slackSetupContract
|
|
630
627
|
};
|
|
631
|
-
//#endregion
|
|
632
628
|
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
|
+
// 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,8 +174,7 @@ 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
|
-
|
|
178
|
-
//#region extensions/slack/src/config-schema.ts
|
|
177
|
+
// extensions/slack/src/config-schema.ts
|
|
179
178
|
const SecretInputSchema = buildSecretInputSchema();
|
|
180
179
|
const SLACK_PRESENCE_EVENT_PROMPT_MAX_CHARS = 2e4;
|
|
181
180
|
const SlackStreamingProgressSchema = ChannelStreamingProgressSchema.extend({
|
|
@@ -370,5 +369,4 @@ const SlackConfigSchema = SlackAccountSchema.safeExtend({
|
|
|
370
369
|
validateSlackSigningSecretRequirements(value, ctx);
|
|
371
370
|
});
|
|
372
371
|
const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { uiHints: slackChannelConfigUiHints });
|
|
373
|
-
//#endregion
|
|
374
372
|
export { SlackChannelConfigSchema as t };
|