@openclaw/slack 2026.11.7 → 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,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
3
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
4
|
-
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
5
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
6
|
-
import { _ as createSlackProbeDispatcher, i as createSlackReadClient } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
3
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, m as formatSlackBotTokenIdentityWarning, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
4
|
+
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.mjs";
|
|
6
|
+
import { _ as createSlackProbeDispatcher, i as createSlackReadClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringifiedOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { normalizeMessageChannel, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
@@ -31,7 +31,7 @@ import { inspectRuntimeConversationBindingRoute, resolveConfiguredBindingRoute,
|
|
|
31
31
|
import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
|
|
32
32
|
import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
33
33
|
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
34
|
-
|
|
34
|
+
// extensions/slack/src/action-threading.ts
|
|
35
35
|
const SLACK_PRIVATE_ACTION_DELIVERY_RESULT = Symbol("slack.action.delivery-result");
|
|
36
36
|
function resolveSlackAutoThreadId(params) {
|
|
37
37
|
const context = params.toolContext;
|
|
@@ -55,8 +55,7 @@ function resolveSlackThreadTsFromContext(explicitThreadTs, targetChannel, contex
|
|
|
55
55
|
if (isSingleUseReplyToMode(context?.replyToMode ?? "off") && !context?.hasRepliedRef) return;
|
|
56
56
|
return threadTs;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
//#region extensions/slack/src/approval-plugin-policy.ts
|
|
58
|
+
// extensions/slack/src/approval-plugin-policy.ts
|
|
60
59
|
/** Returns undefined only when Slack plugin approvals retain legacy account authorization. */
|
|
61
60
|
function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
62
61
|
const policy = cfg.approvals?.plugin?.slack;
|
|
@@ -73,8 +72,7 @@ function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
|
73
72
|
}
|
|
74
73
|
return plugin?.approvers ?? policy.approvers;
|
|
75
74
|
}
|
|
76
|
-
|
|
77
|
-
//#region extensions/slack/src/exec-approvals.ts
|
|
75
|
+
// extensions/slack/src/exec-approvals.ts
|
|
78
76
|
function normalizeSlackUserLikeId(value) {
|
|
79
77
|
const upper = value.toUpperCase();
|
|
80
78
|
return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
|
|
@@ -121,8 +119,7 @@ const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnable
|
|
|
121
119
|
const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
|
|
122
120
|
const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
123
121
|
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
124
|
-
|
|
125
|
-
//#region extensions/slack/src/installation-identity-state.ts
|
|
122
|
+
// extensions/slack/src/installation-identity-state.ts
|
|
126
123
|
const slackInstallationStates = resolveGlobalMap(Symbol.for("openclaw.slack.installation-identities"), "close-and-restart");
|
|
127
124
|
function registerSlackInstallationState(accountId, kind, teamId) {
|
|
128
125
|
const normalizedAccountId = normalizeAccountId(accountId);
|
|
@@ -155,8 +152,7 @@ function getSlackInstallationTeamId(accountId) {
|
|
|
155
152
|
function isSlackWorkspaceInstallation(accountId) {
|
|
156
153
|
return getSlackInstallationKind(accountId) === "workspace";
|
|
157
154
|
}
|
|
158
|
-
|
|
159
|
-
//#region extensions/slack/src/monitor/allow-list.ts
|
|
155
|
+
// extensions/slack/src/monitor/allow-list.ts
|
|
160
156
|
const SLACK_SLUG_CACHE_MAX = 512;
|
|
161
157
|
const SLACK_STABLE_USER_ID_RE = /^[ubw][a-z0-9]+$/;
|
|
162
158
|
const slackSlugCache = /* @__PURE__ */ new Map();
|
|
@@ -253,8 +249,7 @@ function resolveSlackUserAllowListForTeam(params) {
|
|
|
253
249
|
}
|
|
254
250
|
});
|
|
255
251
|
}
|
|
256
|
-
|
|
257
|
-
//#region extensions/slack/src/approval-auth.ts
|
|
252
|
+
// extensions/slack/src/approval-auth.ts
|
|
258
253
|
function resolveSlackApprovalInputs(params) {
|
|
259
254
|
const account = resolveSlackAccount(params).config;
|
|
260
255
|
return {
|
|
@@ -321,8 +316,7 @@ function getSlackApprovalApproversForTeam(params) {
|
|
|
321
316
|
function resolveSlackApprovalTeamId(params) {
|
|
322
317
|
return getSlackInstallationTeamId(resolveSlackAccount(params).accountId) ?? resolveSlackApprovalOriginTeamId(params.request);
|
|
323
318
|
}
|
|
324
|
-
|
|
325
|
-
//#region extensions/slack/src/approval-native-gates.ts
|
|
319
|
+
// extensions/slack/src/approval-native-gates.ts
|
|
326
320
|
function isSlackPluginApprovalRequest(request) {
|
|
327
321
|
return resolveApprovalKind(request) === "plugin";
|
|
328
322
|
}
|
|
@@ -533,13 +527,11 @@ async function shouldHandleSlackNativeApprovalRequest(params) {
|
|
|
533
527
|
approvalKind: "exec"
|
|
534
528
|
});
|
|
535
529
|
}
|
|
536
|
-
|
|
537
|
-
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
530
|
+
// extensions/slack/src/monitor/mrkdwn.ts
|
|
538
531
|
function escapeSlackMrkdwn(value) {
|
|
539
532
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
540
533
|
}
|
|
541
|
-
|
|
542
|
-
//#region extensions/slack/src/format.ts
|
|
534
|
+
// extensions/slack/src/format.ts
|
|
543
535
|
const SLACK_ANGLE_TOKEN_RE = /<[^>\n]+>/g;
|
|
544
536
|
function isAllowedSlackAngleToken(token) {
|
|
545
537
|
const inner = token.slice(1, -1);
|
|
@@ -869,14 +861,12 @@ function markdownToSlackMrkdwnChunks(markdown, limit, options = {}) {
|
|
|
869
861
|
measureRendered: (rendered) => rendered.length
|
|
870
862
|
}).map(({ rendered }) => rendered.length > normalizedLimit ? protectSlackAssistantTranscriptRoleHeaders(rendered) : rendered);
|
|
871
863
|
}
|
|
872
|
-
|
|
873
|
-
//#region extensions/slack/src/limits.ts
|
|
864
|
+
// extensions/slack/src/limits.ts
|
|
874
865
|
const SLACK_TEXT_LIMIT = 8e3;
|
|
875
866
|
const SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT = 4e3;
|
|
876
867
|
const SLACK_EDIT_TEXT_MAX_BYTES = 4e3;
|
|
877
868
|
const SLACK_MESSAGE_TEXT_HARD_LIMIT = 4e4;
|
|
878
|
-
|
|
879
|
-
//#region extensions/slack/src/presentation-fallback.ts
|
|
869
|
+
// extensions/slack/src/presentation-fallback.ts
|
|
880
870
|
const SLACK_UNCOPYABLE_COMMAND_WARNING = "not copyable: contains backtick";
|
|
881
871
|
function escapeSlackPresentationFallbackBlock(block) {
|
|
882
872
|
if (block.type === "chart") return {
|
|
@@ -961,8 +951,7 @@ const SLACK_PRESENTATION_CAPABILITIES = {
|
|
|
961
951
|
}
|
|
962
952
|
}
|
|
963
953
|
};
|
|
964
|
-
|
|
965
|
-
//#region extensions/slack/src/rich-text.ts
|
|
954
|
+
// extensions/slack/src/rich-text.ts
|
|
966
955
|
const RICH_TEXT_CONTAINER_TYPES = /* @__PURE__ */ new Set([
|
|
967
956
|
"rich_text_section",
|
|
968
957
|
"rich_text_preformatted",
|
|
@@ -1009,8 +998,7 @@ function renderSlackRichText(value, mode, separator = "") {
|
|
|
1009
998
|
}
|
|
1010
999
|
}).filter(Boolean).join(separator);
|
|
1011
1000
|
}
|
|
1012
|
-
|
|
1013
|
-
//#region extensions/slack/src/data-table.ts
|
|
1001
|
+
// extensions/slack/src/data-table.ts
|
|
1014
1002
|
const SLACK_DATA_TABLE_COLUMNS_MAX = 20;
|
|
1015
1003
|
const SLACK_DATA_TABLE_ROWS_MAX = 100;
|
|
1016
1004
|
const SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX = 1e4;
|
|
@@ -1150,8 +1138,7 @@ function renderSlackDataTableCompactPlainTextFallback(value) {
|
|
|
1150
1138
|
...table.rows.map((row) => row.map(escapeCompactFallbackCell).join(" "))
|
|
1151
1139
|
].join("\n"));
|
|
1152
1140
|
}
|
|
1153
|
-
|
|
1154
|
-
//#region extensions/slack/src/data-visualization.ts
|
|
1141
|
+
// extensions/slack/src/data-visualization.ts
|
|
1155
1142
|
const SLACK_CHART_TITLE_MAX = 50;
|
|
1156
1143
|
const SLACK_CHART_LABEL_MAX = 20;
|
|
1157
1144
|
const SLACK_CHART_AXIS_LABEL_MAX = 50;
|
|
@@ -1262,8 +1249,7 @@ function renderSlackDataVisualizationFallbackText(value, mrkdwnSafe = false) {
|
|
|
1262
1249
|
const title = typeof block.title === "string" ? block.title.trim() : "";
|
|
1263
1250
|
return title ? mrkdwnSafe ? escapeSlackMrkdwn(title) : title : void 0;
|
|
1264
1251
|
}
|
|
1265
|
-
|
|
1266
|
-
//#region extensions/slack/src/blocks-fallback.ts
|
|
1252
|
+
// extensions/slack/src/blocks-fallback.ts
|
|
1267
1253
|
const SLACK_SELECT_ELEMENT_TYPES = /* @__PURE__ */ new Set([
|
|
1268
1254
|
"static_select",
|
|
1269
1255
|
"multi_static_select",
|
|
@@ -1339,8 +1325,7 @@ function buildSlackBlocksFallbackText(blocks) {
|
|
|
1339
1325
|
function buildSlackCompleteBlocksFallbackText(blocks, options = {}) {
|
|
1340
1326
|
return blocks.map((block) => renderSlackBlockFallbackText(block, options)).filter(Boolean).join("\n\n").trim() || buildSlackBlocksFallbackText(blocks);
|
|
1341
1327
|
}
|
|
1342
|
-
|
|
1343
|
-
//#region extensions/slack/src/blocks-input.ts
|
|
1328
|
+
// extensions/slack/src/blocks-input.ts
|
|
1344
1329
|
const SLACK_MAX_BLOCKS = 50;
|
|
1345
1330
|
function parseBlocksJson(raw) {
|
|
1346
1331
|
try {
|
|
@@ -1364,8 +1349,7 @@ function parseSlackBlocksInput(raw) {
|
|
|
1364
1349
|
if (raw == null) return;
|
|
1365
1350
|
return validateSlackBlocksArray(typeof raw === "string" ? parseBlocksJson(raw) : raw);
|
|
1366
1351
|
}
|
|
1367
|
-
|
|
1368
|
-
//#region extensions/slack/src/approval-actions.ts
|
|
1352
|
+
// extensions/slack/src/approval-actions.ts
|
|
1369
1353
|
const SLACK_APPROVAL_VALUE_PREFIX = "openclaw:approval:v1:";
|
|
1370
1354
|
const SLACK_APPROVAL_HEADER_BLOCK_ID = "openclaw_approval_header";
|
|
1371
1355
|
function isApprovalDecision(value) {
|
|
@@ -1402,8 +1386,7 @@ function decodeSlackApprovalAction(value) {
|
|
|
1402
1386
|
return null;
|
|
1403
1387
|
}
|
|
1404
1388
|
}
|
|
1405
|
-
|
|
1406
|
-
//#region extensions/slack/src/question-actions.ts
|
|
1389
|
+
// extensions/slack/src/question-actions.ts
|
|
1407
1390
|
const SLACK_QUESTION_VALUE_PREFIX = "slq1:";
|
|
1408
1391
|
const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
|
|
1409
1392
|
function encodeSlackQuestionAction(action) {
|
|
@@ -1434,8 +1417,7 @@ async function resolveSlackQuestionAction(params) {
|
|
|
1434
1417
|
}
|
|
1435
1418
|
await params.respond(result.status === "answered" ? "Answer submitted." : "This question was already answered.").catch(() => {});
|
|
1436
1419
|
}
|
|
1437
|
-
|
|
1438
|
-
//#region extensions/slack/src/reply-action-ids.ts
|
|
1420
|
+
// extensions/slack/src/reply-action-ids.ts
|
|
1439
1421
|
const SLACK_REPLY_BUTTON_ACTION_ID = "openclaw:reply_button";
|
|
1440
1422
|
const SLACK_REPLY_LINK_ACTION_ID = "openclaw:reply_link";
|
|
1441
1423
|
const SLACK_SESSION_LINK_ACTION_ID = "openclaw:session_link";
|
|
@@ -1469,8 +1451,7 @@ function resolveSlackQuestionActionIds(blocks, questionId) {
|
|
|
1469
1451
|
return (block.elements ?? []).flatMap((element) => element.action_id && (questionId ? isSlackQuestionActionForQuestion(element, questionId) : isSlackQuestionActionId(element.action_id)) ? [element.action_id] : []);
|
|
1470
1452
|
});
|
|
1471
1453
|
}
|
|
1472
|
-
|
|
1473
|
-
//#region extensions/slack/src/truncate.ts
|
|
1454
|
+
// extensions/slack/src/truncate.ts
|
|
1474
1455
|
function truncateSlackText(value, max, whitespace = "trim") {
|
|
1475
1456
|
const text = whitespace === "preserve" ? value : value.trim();
|
|
1476
1457
|
if (text.length <= max) return text;
|
|
@@ -1495,8 +1476,7 @@ function truncateSlackTextByUtf8Bytes(value, maxBytes) {
|
|
|
1495
1476
|
const prefix = truncateUtf8Prefix(trimmed, prefixBudget);
|
|
1496
1477
|
return maxBytes >= suffixBytes ? `${prefix}${suffix}` : prefix;
|
|
1497
1478
|
}
|
|
1498
|
-
|
|
1499
|
-
//#region extensions/slack/src/native-data-blocks.ts
|
|
1479
|
+
// extensions/slack/src/native-data-blocks.ts
|
|
1500
1480
|
const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
|
|
1501
1481
|
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16384;
|
|
1502
1482
|
const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
|
|
@@ -1599,14 +1579,12 @@ function appendSlackNativeDataFallbackText(text, blocks) {
|
|
|
1599
1579
|
function appendSlackNativeDataPlainTextFallback(text, blocks) {
|
|
1600
1580
|
return appendSlackBlockFallback(text.trim(), blocks, renderSlackNativeDataPlainTextBlock);
|
|
1601
1581
|
}
|
|
1602
|
-
|
|
1603
|
-
//#region extensions/slack/src/detached-target-admission.ts
|
|
1582
|
+
// extensions/slack/src/detached-target-admission.ts
|
|
1604
1583
|
function assertSlackDetachedTargetAllowed(accountId, teamId) {
|
|
1605
1584
|
const installationKind = getSlackInstallationKind(accountId);
|
|
1606
1585
|
if (installationKind && installationKind !== "workspace" && !teamId) throw new Error("unsupported_enterprise_slack_delivery: detached Slack operations require team:<team-id>:channel:<channel-id> or team:<team-id>:user:<user-id> until a workspace install is authenticated");
|
|
1607
1586
|
}
|
|
1608
|
-
|
|
1609
|
-
//#region extensions/slack/src/conversation-binding-route.ts
|
|
1587
|
+
// extensions/slack/src/conversation-binding-route.ts
|
|
1610
1588
|
const slackRouteBindingConfigCache = /* @__PURE__ */ new WeakMap();
|
|
1611
1589
|
function normalizeSlackRouteBindingPeer(peer) {
|
|
1612
1590
|
const rawId = peer.id.trim();
|
|
@@ -1743,8 +1721,7 @@ function applySlackConfiguredBindingRoute(params, runtimeRoute) {
|
|
|
1743
1721
|
route: runtimeRoute.boundSessionKey ? runtimeRoute.route : configuredRoute?.route ?? runtimeRoute.route
|
|
1744
1722
|
};
|
|
1745
1723
|
}
|
|
1746
|
-
|
|
1747
|
-
//#region extensions/slack/src/monitor/workspace-routing.ts
|
|
1724
|
+
// extensions/slack/src/monitor/workspace-routing.ts
|
|
1748
1725
|
function resolveSlackAgentRoute(params) {
|
|
1749
1726
|
const route = resolveAgentRoute({
|
|
1750
1727
|
cfg: params.cfg,
|
|
@@ -1778,8 +1755,7 @@ function qualifySlackRoutePeerId(params) {
|
|
|
1778
1755
|
function qualifySlackConversationId(conversationId, eventScope) {
|
|
1779
1756
|
return eventScope ? `team:${encodeURIComponent(eventScope.teamId)}:${conversationId}` : conversationId;
|
|
1780
1757
|
}
|
|
1781
|
-
|
|
1782
|
-
//#region extensions/slack/src/errors.ts
|
|
1758
|
+
// extensions/slack/src/errors.ts
|
|
1783
1759
|
const NO_ERROR_DETAIL = "no error detail";
|
|
1784
1760
|
const MAX_ERROR_CAUSE_DEPTH = 32;
|
|
1785
1761
|
function getSlackWebApiErrorData(error) {
|
|
@@ -1886,8 +1862,7 @@ function formatSlackErrorWithCauses(error, fallback, seen) {
|
|
|
1886
1862
|
function formatSlackError(error, fallback = NO_ERROR_DETAIL) {
|
|
1887
1863
|
return formatSlackErrorWithCauses(error, fallback, /* @__PURE__ */ new Set());
|
|
1888
1864
|
}
|
|
1889
|
-
|
|
1890
|
-
//#region extensions/slack/src/channel-policy-state.ts
|
|
1865
|
+
// extensions/slack/src/channel-policy-state.ts
|
|
1891
1866
|
const slackChannelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.slack.channel-policy-bindings"), "close-and-restart");
|
|
1892
1867
|
function setSlackChannelPolicyBindings(accountId, bindings) {
|
|
1893
1868
|
slackChannelPolicyBindings.set(normalizeAccountId(accountId), new Map([...bindings].map(([key, id]) => [key, id.toUpperCase()])));
|
|
@@ -1897,8 +1872,7 @@ function getSlackChannelPolicyKeys(accountId, channelId) {
|
|
|
1897
1872
|
if (!id) return [];
|
|
1898
1873
|
return [...slackChannelPolicyBindings.get(normalizeAccountId(accountId)) ?? []].filter(([, resolvedId]) => resolvedId === id).map(([key]) => key);
|
|
1899
1874
|
}
|
|
1900
|
-
|
|
1901
|
-
//#region extensions/slack/src/group-policy.ts
|
|
1875
|
+
// extensions/slack/src/group-policy.ts
|
|
1902
1876
|
function hasPotentialSlackNamedPolicy(params) {
|
|
1903
1877
|
if (params.allowNameMatching !== true) return false;
|
|
1904
1878
|
return Object.entries(params.channels ?? {}).some(([key, entry]) => {
|
|
@@ -1959,8 +1933,7 @@ function resolveSlackGroupToolPolicy(params) {
|
|
|
1959
1933
|
senderE164: params.senderE164
|
|
1960
1934
|
});
|
|
1961
1935
|
}
|
|
1962
|
-
|
|
1963
|
-
//#region extensions/slack/src/monitor/ingress-identity.ts
|
|
1936
|
+
// extensions/slack/src/monitor/ingress-identity.ts
|
|
1964
1937
|
const SLACK_USER_NAME_KIND = "plugin:slack-user-name";
|
|
1965
1938
|
const SLACK_WORKSPACE_USER_ID_KIND = "plugin:slack-workspace-user-id";
|
|
1966
1939
|
function normalizeSlackUserId(raw) {
|
|
@@ -2057,8 +2030,7 @@ function createSlackIngressSubject(params) {
|
|
|
2057
2030
|
}
|
|
2058
2031
|
};
|
|
2059
2032
|
}
|
|
2060
|
-
|
|
2061
|
-
//#region extensions/slack/src/session-status.ts
|
|
2033
|
+
// extensions/slack/src/session-status.ts
|
|
2062
2034
|
const MISSING_STOP_SUBSCRIPTION = "missing_agent_session_stopped_event_subscription";
|
|
2063
2035
|
let warnedMissingStopSubscription = false;
|
|
2064
2036
|
async function setSlackSessionStatus(params) {
|
|
@@ -2099,8 +2071,7 @@ async function renameSlackSession(params) {
|
|
|
2099
2071
|
return false;
|
|
2100
2072
|
}
|
|
2101
2073
|
}
|
|
2102
|
-
|
|
2103
|
-
//#region extensions/slack/src/probe.ts
|
|
2074
|
+
// extensions/slack/src/probe.ts
|
|
2104
2075
|
var probe_exports = /* @__PURE__ */ __exportAll({ probeSlack: () => probeSlack });
|
|
2105
2076
|
async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
2106
2077
|
const dispatcher = createSlackProbeDispatcher(timeoutMs);
|
|
@@ -2160,5 +2131,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
2160
2131
|
await dispatcher.destroy().catch(() => void 0);
|
|
2161
2132
|
}
|
|
2162
2133
|
}
|
|
2163
|
-
//#endregion
|
|
2164
2134
|
export { decodeSlackApprovalAction as $, resolveSlackExecApprovalTarget as $t, isSlackInvalidBlocksResponse as A, resolveSessionSlackOriginTarget as At, SLACK_REPLY_LINK_ACTION_ID as B, allowListMatches as Bt, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as C, markdownToSlackMrkdwnChunks as Ct, createSlackNativeDataBaseTextConsumer as D, isSlackPluginApprovalRequest as Dt, buildSlackNativeDataAccessibilityText as E, isSlackAnyNativeApprovalClientEnabled as Et, truncateSlackText as F, shouldHandleSlackPluginViaForwardingSession as Ft, isSlackCallbackActionId as G, resolveSlackUserAllowed as Gt, SLACK_SELECT_ACTION_IDS as H, normalizeSlackSlug as Ht, truncateSlackTextByUtf8Bytes as I, slackTargetsMatch as It, resolveSlackQuestionActionIds as J, registerSlackInstallationState as Jt, isSlackQuestionActionForQuestion as K, getSlackInstallationKind as Kt, SLACK_BUTTON_ACTION_IDS as L, getSlackApprovalApproversForTeam as Lt, renderSlackNativeDataPlainTextBlock as M, resolveSlackFallbackOriginTarget as Mt, stripSlackNativeDataBlocks as N, resolveTurnSourceSlackOriginTarget as Nt, hasSlackNativeDataBlock as O, normalizeSlackForwardTarget as Ot, countSlackTextUtf8Bytes as P, shouldHandleSlackNativeApprovalRequest as Pt, SLACK_APPROVAL_HEADER_BLOCK_ID as Q, normalizeSlackApproverId as Qt, SLACK_QUESTION_FINALIZATION_BLOCKS as R, isSlackPluginApprovalAuthorizedSender as Rt, assertSlackDetachedTargetAllowed as S, chunkSlackMrkdwnText as St, appendSlackNativeDataPlainTextFallback as T, escapeSlackMrkdwn as Tt, SLACK_SESSION_LINK_ACTION_ID as U, resolveSlackAllowListMatch as Ut, SLACK_REPLY_SELECT_ACTION_ID as V, normalizeSlackAllowOwnerEntry as Vt, isSlackApprovalActionId as W, resolveSlackUserAllowListForTeam as Wt, encodeSlackQuestionAction as X, isSlackExecApprovalAuthorizedSender as Xt, decodeSlackQuestionAction as Y, getSlackExecApprovalApprovers as Yt, resolveSlackQuestionAction as Z, isSlackExecApprovalClientEnabled as Zt, qualifySlackRoutePeerId as _, renderSlackMessagePresentationFallbackText as _t, SLACK_USER_NAME_KIND as a, buildSlackCompleteBlocksFallbackText as at, resolveSlackConversationBindingRoute as b, SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT as bt, buildSlackChannelIdCandidates as c, hasSlackDataVisualizationBlock as ct, resolveSlackGroupRequireMention as d, countSlackDataTableBlocksCellCharacters as dt, shouldSuppressLocalSlackExecApprovalPrompt as en, encodeSlackApprovalAction as et, resolveSlackGroupToolPolicy as f, countSlackDataTableCellCharacters as ft, qualifySlackConversationId as g, renderSlackMessagePresentationChartFallbackText as gt, getSlackWebApiErrorData as h, SLACK_SECTION_TEXT_MAX as ht, setSlackSessionStatus as i, resolveSlackThreadTsFromContext as in, buildSlackBlocksFallbackText as it, isSlackNativeResponseUrlRejection as j, resolveSlackApproverDmTargets as jt, isSlackInvalidBlocksError as k, normalizeSlackOriginTarget as kt, buildSlackChannelPolicyScope as l, SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX as lt, formatSlackError as m, SLACK_PRESENTATION_CAPABILITIES as mt, probe_exports as n, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as nn, parseSlackBlocksInput as nt, createSlackIngressSubject as o, renderSlackBlockFallbackText as ot, setSlackChannelPolicyBindings as p, SLACK_BUTTON_VALUE_MAX as pt, isSlackQuestionActionId as q, isSlackWorkspaceInstallation as qt, renameSlackSession as r, resolveSlackAutoThreadId as rn, validateSlackBlocksArray as rt, slackIngressIdentity as s, buildSlackDataVisualizationBlock as st, probeSlack as t, resolvePluginApprovalSlackApprovers as tn, SLACK_MAX_BLOCKS as tt, hasPotentialSlackNamedPolicy as u, buildSlackDataTableBlock as ut, resolveSlackAgentRoute as v, SLACK_EDIT_TEXT_MAX_BYTES as vt, appendSlackNativeDataFallbackText as w, normalizeSlackOutboundText as wt, resolveSlackConversationBindingRouteAsync as x, SLACK_TEXT_LIMIT as xt, normalizeSlackRouteBindingConfig as y, SLACK_MESSAGE_TEXT_HARD_LIMIT as yt, SLACK_REPLY_BUTTON_ACTION_ID as z, resolveSlackApprovalTeamId as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { J as resolveSlackQuestionActionIds, K as isSlackQuestionActionForQuestion, R as SLACK_QUESTION_FINALIZATION_BLOCKS, Tt as escapeSlackMrkdwn, at as buildSlackCompleteBlocksFallbackText } from "./probe-
|
|
1
|
+
import { J as resolveSlackQuestionActionIds, K as isSlackQuestionActionForQuestion, R as SLACK_QUESTION_FINALIZATION_BLOCKS, Tt as escapeSlackMrkdwn, at as buildSlackCompleteBlocksFallbackText } from "./probe-B_Ax1vS1.mjs";
|
|
2
2
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/slack/src/question-delivery.ts
|
|
4
4
|
function registerSlackQuestionDelivery(params) {
|
|
5
5
|
const blocks = params.result.meta?.[SLACK_QUESTION_FINALIZATION_BLOCKS];
|
|
6
6
|
if (!blocks || resolveSlackQuestionActionIds(blocks, params.questionId).length === 0) return;
|
|
@@ -35,5 +35,4 @@ function registerSlackQuestionDelivery(params) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { registerSlackQuestionDelivery as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { m as formatSlackError } from "./probe-
|
|
2
|
-
import { S as SLACK_SOCKET_RECONNECT_POLICY, d as parseSlackMessageEvent, f as requireSlackMessageEvent } from "./monitor-
|
|
1
|
+
import { m as formatSlackError } from "./probe-B_Ax1vS1.mjs";
|
|
2
|
+
import { S as SLACK_SOCKET_RECONNECT_POLICY, d as parseSlackMessageEvent, f as requireSlackMessageEvent } from "./monitor-BJId9dWb.mjs";
|
|
3
3
|
import { asOptionalRecord, normalizeOptionalString, readStringValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { createNodeProxyAgent } from "openclaw/plugin-sdk/fetch-runtime";
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
import { rawDataToString } from "openclaw/plugin-sdk/webhook-ingress";
|
|
8
8
|
import { WebSocket, startWebSocketKeepalive } from "openclaw/plugin-sdk/websocket-runtime";
|
|
9
|
-
|
|
9
|
+
// extensions/slack/src/monitor/relay-source.ts
|
|
10
10
|
const SLACK_RELAY_ROUTE_KINDS = /* @__PURE__ */ new Set([
|
|
11
11
|
"user_group",
|
|
12
12
|
"thread_affinity",
|
|
@@ -253,5 +253,4 @@ function formatRelayClose(code, reason) {
|
|
|
253
253
|
const text = reason.toString("utf8");
|
|
254
254
|
return text ? `Slack relay websocket closed (${code} ${text})` : `Slack relay websocket closed (${code})`;
|
|
255
255
|
}
|
|
256
|
-
//#endregion
|
|
257
256
|
export { SLACK_RELAY_MAX_PAYLOAD_BYTES, SlackRelayMalformedFrameError, buildRelayWebSocketOptions, buildRelayWebSocketUrl, monitorSlackRelaySource, parseRelayFrame, requireSlackMessageEvent };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as isSlackInvalidBlocksResponse, Ct as markdownToSlackMrkdwnChunks, O as hasSlackNativeDataBlock, j as isSlackNativeResponseUrlRejection, xt as SLACK_TEXT_LIMIT } from "./probe-
|
|
2
|
-
import { n as resolveSlackReplyThreadTs } from "./thread-ts-
|
|
3
|
-
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-
|
|
4
|
-
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack } from "./send-
|
|
5
|
-
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-
|
|
6
|
-
import { t as registerSlackQuestionDelivery } from "./question-delivery-
|
|
1
|
+
import { A as isSlackInvalidBlocksResponse, Ct as markdownToSlackMrkdwnChunks, O as hasSlackNativeDataBlock, j as isSlackNativeResponseUrlRejection, xt as SLACK_TEXT_LIMIT } from "./probe-B_Ax1vS1.mjs";
|
|
2
|
+
import { n as resolveSlackReplyThreadTs } from "./thread-ts-47Au2-Yn.mjs";
|
|
3
|
+
import { a as resolveSlackReplyBlockResolution, n as iterateSlackReplyDeliveryMessages, t as hasSlackReplyStructuredContent } from "./reply-blocks-DyYYRrP_.mjs";
|
|
4
|
+
import { g as chunkSlackTextAtHardLimit, h as buildSlackNativeDataDeliveryPlan, i as updateMessageSlack, t as sendMessageSlack } from "./send-WJZ73VSf.mjs";
|
|
5
|
+
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./monitor-BJId9dWb.mjs";
|
|
6
|
+
import { t as registerSlackQuestionDelivery } from "./question-delivery-D3qAIwuv.mjs";
|
|
7
7
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
8
8
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
9
9
|
import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -15,7 +15,7 @@ import { resolveOutboundMediaAccessForConfig } from "openclaw/plugin-sdk/outboun
|
|
|
15
15
|
import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
|
|
16
16
|
import { createAcceptedChannelDeliveryResult, createChannelPartialDeliveryError, getGroupThreadDeliverySession } from "openclaw/plugin-sdk/channel-inbound";
|
|
17
17
|
import { buildCanonicalSentMessageHookContext, createInternalHookEvent, fireAndForgetHook, toInternalMessageSentContext, toPluginMessageContext, toPluginMessageSentEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
|
|
18
|
-
|
|
18
|
+
// extensions/slack/src/message-sent-hook.ts
|
|
19
19
|
function emitSlackMessageSentHooks(params) {
|
|
20
20
|
const hookRunner = getGlobalHookRunner();
|
|
21
21
|
const enabled = hookRunner?.hasHooks("message_sent") ?? false;
|
|
@@ -36,8 +36,7 @@ function emitSlackMessageSentHooks(params) {
|
|
|
36
36
|
if (enabled) fireAndForgetHook(Promise.resolve(hookRunner.runMessageSent(toPluginMessageSentEvent(canonical), toPluginMessageContext(canonical))), "slack: message_sent plugin hook failed");
|
|
37
37
|
if (params.sessionKeyForInternalHooks) fireAndForgetHook(triggerInternalHook(createInternalHookEvent("message", "sent", params.sessionKeyForInternalHooks, toInternalMessageSentContext(canonical))), "slack: message:sent internal hook failed");
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
//#region extensions/slack/src/monitor/replies.ts
|
|
39
|
+
// extensions/slack/src/monitor/replies.ts
|
|
41
40
|
function compactSlackResponseUrlFallback(messages) {
|
|
42
41
|
if (messages.length <= 1) return [...messages];
|
|
43
42
|
if (messages.every((message) => !message.blocks?.length)) return chunkSlackTextAtHardLimit(messages.map((message) => message.text).join("")).map((text) => ({
|
|
@@ -439,5 +438,4 @@ async function deliverSlackSlashReplies(params) {
|
|
|
439
438
|
});
|
|
440
439
|
}
|
|
441
440
|
}
|
|
442
|
-
//#endregion
|
|
443
441
|
export { emitSlackMessageSentHooks as a, sanitizeSlackMonitorReplyPayload as i, deliverReplies as n, deliverSlackSlashReplies as r, createSlackReplyDeliveryPlan as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ct as markdownToSlackMrkdwnChunks, E as buildSlackNativeDataAccessibilityText, F as truncateSlackText, H as SLACK_SELECT_ACTION_IDS, L as SLACK_BUTTON_ACTION_IDS, O as hasSlackNativeDataBlock, St as chunkSlackMrkdwnText, Tt as escapeSlackMrkdwn, X as encodeSlackQuestionAction, at as buildSlackCompleteBlocksFallbackText, ct as hasSlackDataVisualizationBlock, dt as countSlackDataTableBlocksCellCharacters, et as encodeSlackApprovalAction, ft as countSlackDataTableCellCharacters, gt as renderSlackMessagePresentationChartFallbackText, ht as SLACK_SECTION_TEXT_MAX, it as buildSlackBlocksFallbackText, nt as parseSlackBlocksInput, ot as renderSlackBlockFallbackText, st as buildSlackDataVisualizationBlock, ut as buildSlackDataTableBlock, w as appendSlackNativeDataFallbackText } from "./probe-
|
|
1
|
+
import { Ct as markdownToSlackMrkdwnChunks, E as buildSlackNativeDataAccessibilityText, F as truncateSlackText, H as SLACK_SELECT_ACTION_IDS, L as SLACK_BUTTON_ACTION_IDS, O as hasSlackNativeDataBlock, St as chunkSlackMrkdwnText, Tt as escapeSlackMrkdwn, X as encodeSlackQuestionAction, at as buildSlackCompleteBlocksFallbackText, ct as hasSlackDataVisualizationBlock, dt as countSlackDataTableBlocksCellCharacters, et as encodeSlackApprovalAction, ft as countSlackDataTableCellCharacters, gt as renderSlackMessagePresentationChartFallbackText, ht as SLACK_SECTION_TEXT_MAX, it as buildSlackBlocksFallbackText, nt as parseSlackBlocksInput, ot as renderSlackBlockFallbackText, st as buildSlackDataVisualizationBlock, ut as buildSlackDataTableBlock, w as appendSlackNativeDataFallbackText } from "./probe-B_Ax1vS1.mjs";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
4
4
|
import { legacyInteractiveReplyToPresentation, normalizeMessagePresentation, renderMessagePresentationFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
|
|
5
5
|
import { resolveAskUserQuestionOptionIndex, resolveAskUserQuestionOptionIndices, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
6
6
|
import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
7
|
-
|
|
7
|
+
// extensions/slack/src/authored-text.ts
|
|
8
8
|
function isSlackAuthoredTextRepresentedInFragments(plan, fragments) {
|
|
9
9
|
if (plan.length === 0) return false;
|
|
10
10
|
if (fragments.some((_, start) => plan.every((text, index) => text === fragments[start + index]))) return true;
|
|
@@ -30,8 +30,7 @@ function resolveSlackAuthoredTextPlacement(params) {
|
|
|
30
30
|
const fragments = (params.renderedTextFragments ?? params.interactive?.blocks.flatMap((block) => block.type === "text" ? [block.text] : []) ?? []).map((fragment) => fragment?.trim() ?? null).filter((fragment) => fragment !== "");
|
|
31
31
|
return isSlackAuthoredTextRepresentedInFragments((params.authoredChunks ?? [text]).map((fragment) => fragment.trim()).filter(Boolean), fragments) ? "blocks" : "outside-blocks";
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
//#region extensions/slack/src/blocks-render.ts
|
|
33
|
+
// extensions/slack/src/blocks-render.ts
|
|
35
34
|
const SLACK_BUTTON_URL_MAX = 3e3;
|
|
36
35
|
function buildSlackPlainText(text, maxLength) {
|
|
37
36
|
return {
|
|
@@ -285,8 +284,7 @@ function compileSlackPresentationBlocks(presentation, options, requireComplete)
|
|
|
285
284
|
}
|
|
286
285
|
return blocks;
|
|
287
286
|
}
|
|
288
|
-
|
|
289
|
-
//#region extensions/slack/src/reply-blocks.ts
|
|
287
|
+
// extensions/slack/src/reply-blocks.ts
|
|
290
288
|
function normalizeSlackReplyPayload(payload) {
|
|
291
289
|
const previousSlackData = asOptionalRecord(payload.channelData?.slack) ?? {};
|
|
292
290
|
const { authoredPresentationText: _authoredPresentationText, ...slackData } = previousSlackData;
|
|
@@ -642,5 +640,4 @@ function resolveSlackReplyBlocks(payload) {
|
|
|
642
640
|
const segments = compileSlackReplyBlockSegments(payload, readSlackChannelBlocks(payload), normalizeMessagePresentation(payload.presentation));
|
|
643
641
|
return segments.length === 1 && segments[0]?.kind === "blocks" ? segments[0].blocks : void 0;
|
|
644
642
|
}
|
|
645
|
-
//#endregion
|
|
646
643
|
export { resolveSlackReplyBlockResolution as a, resolveSlackReplyRenderPlan as c, resolveSlackAuthoredTextPlacement as d, prepareSlackReply as i, buildSlackInteractiveBlocks as l, iterateSlackReplyDeliveryMessages as n, resolveSlackReplyBlocks as o, normalizeSlackReplyPayload as r, resolveSlackReplyDeliveryMessages as s, hasSlackReplyStructuredContent as t, buildSlackPresentationBlocks as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-
|
|
3
|
-
import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
+
import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/resolve-channels.ts
|
|
6
6
|
var resolve_channels_exports = /* @__PURE__ */ __exportAll({ resolveSlackChannelAllowlist: () => resolveSlackChannelAllowlist });
|
|
7
7
|
function parseSlackChannelMention(raw) {
|
|
8
8
|
const trimmed = raw.trim();
|
|
@@ -64,5 +64,4 @@ async function resolveSlackChannelAllowlist(params) {
|
|
|
64
64
|
};
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
//#endregion
|
|
68
67
|
export { resolve_channels_exports as n, resolveSlackChannelAllowlist as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-
|
|
3
|
-
import { r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
3
|
+
import { r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/resolve-users.ts
|
|
6
6
|
var resolve_users_exports = /* @__PURE__ */ __exportAll({ resolveSlackUserAllowlist: () => resolveSlackUserAllowlist });
|
|
7
7
|
function parseSlackUserInput(raw) {
|
|
8
8
|
const trimmed = raw.trim();
|
|
@@ -73,5 +73,4 @@ async function resolveSlackUserAllowlist(params) {
|
|
|
73
73
|
return result;
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { resolve_users_exports as n, resolveSlackUserAllowlist as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,5 +24,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
27
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/slack/src/runtime.ts
|
|
3
3
|
const { setRuntime: setSlackRuntime, tryGetRuntime: getOptionalSlackRuntime, getRuntime: getSlackRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "slack",
|
|
5
5
|
errorMessage: "Slack runtime not initialized"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { getSlackRuntime as n, setSlackRuntime as r, getOptionalSlackRuntime as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as formatSlackError } from "./probe-
|
|
2
|
-
import { i as createSlackReadClient } from "./cursor-pages-
|
|
1
|
+
import { m as formatSlackError } from "./probe-B_Ax1vS1.mjs";
|
|
2
|
+
import { i as createSlackReadClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
3
3
|
import { isRecord, normalizeOptionalString, normalizeTrimmedStringList, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
|
|
4
|
+
// extensions/slack/src/scopes.ts
|
|
5
5
|
function collectScopes(value, into) {
|
|
6
6
|
if (Array.isArray(value) || typeof value === "string") {
|
|
7
7
|
for (const scope of normalizeTrimmedStringList(typeof value === "string" ? value.split(/[,\s]+/) : value)) into.push(scope);
|
|
@@ -59,5 +59,4 @@ async function fetchSlackScopes(token, timeoutMs) {
|
|
|
59
59
|
error: errors.length > 0 ? errors.join(" | ") : "no scopes returned"
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { fetchSlackScopes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-
|
|
1
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-35y0-Hso.mjs";
|
|
2
2
|
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretContract, hasOwnProperty, isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
-
|
|
3
|
+
// extensions/slack/src/secret-contract.ts
|
|
4
4
|
const channelSecrets = createChannelSecretContract({
|
|
5
5
|
channelKey: "slack",
|
|
6
6
|
account: [
|
|
@@ -63,5 +63,4 @@ const channelSecrets = createChannelSecretContract({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
66
|
-
//#endregion
|
|
67
66
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CqVqR7MP.mjs";
|
|
2
2
|
import "../secret-contract-api.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
2
|
import { coerceNativeSetting, normalizeAllowFromList } from "openclaw/plugin-sdk/channel-policy";
|
|
3
3
|
import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime";
|
|
4
4
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/security-audit.ts
|
|
6
6
|
var security_audit_exports = /* @__PURE__ */ __exportAll({ collectSlackSecurityAuditFindings: () => collectSlackSecurityAuditFindings });
|
|
7
7
|
async function collectSlackSecurityAuditFindings(params) {
|
|
8
8
|
const findings = [];
|
|
@@ -37,5 +37,4 @@ async function collectSlackSecurityAuditFindings(params) {
|
|
|
37
37
|
});
|
|
38
38
|
return findings;
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { security_audit_exports as n, collectSlackSecurityAuditFindings as t };
|