@openclaw/slack 2026.11.1 → 2026.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-configured-35y0-Hso.mjs → account-configured-zcR9TJJN.mjs} +2 -1
- package/dist/.setup/{account-inspect-Bc7TVU8F.mjs → account-inspect-CmkKiSb9.mjs} +4 -3
- package/dist/.setup/{accounts-CEgdyqoW.mjs → accounts-msihSF3-.mjs} +10 -6
- package/dist/.setup/{action-runtime-DPoxYao5.mjs → action-runtime-ChRfnnBu.mjs} +10 -9
- package/dist/.setup/action-runtime.runtime-vLxx_7s2.mjs +2 -0
- package/dist/.setup/{actions-PF2cP6to.mjs → actions-By7tvpvv.mjs} +22 -14
- package/dist/.setup/{approval-handler.runtime-BtRklemy.mjs → approval-handler.runtime-D8ArtDQt.mjs} +8 -7
- package/dist/.setup/{approval-message-updates-CpwbsEj6.mjs → approval-message-updates-DT7XBPbV.mjs} +3 -2
- package/dist/.setup/{channel-BzPa5LRe.mjs → channel-DLFiMJm2.mjs} +39 -32
- package/dist/.setup/{channel-meta-C5vsCo3a.mjs → channel-meta-C443t-lI.mjs} +2 -1
- package/dist/.setup/{channel-type-Dh4vwh1Y.mjs → channel-type-BEFP2ORi.mjs} +6 -5
- package/dist/.setup/{channel.setup-Cc6oaNPS.mjs → channel.setup-CzFw73mU.mjs} +14 -10
- package/dist/.setup/{config-schema-Cz3uId-c.mjs → config-schema-DNnh6bWU.mjs} +4 -2
- package/dist/.setup/{directory-config-BEPra1E2.mjs → directory-config-Cjj0N8R0.mjs} +6 -5
- package/dist/.setup/{directory-live-BkUwPrS0.mjs → directory-live-BIKD-5B_.mjs} +5 -4
- package/dist/.setup/{doctor-contract-HK8aedwU.mjs → doctor-contract-Cd4-VzIM.mjs} +13 -7
- package/dist/.setup/http-C9sM-FXe.mjs +2 -0
- package/dist/.setup/{message-tool-api-DeiQJoRV.mjs → message-tool-api-BS5ekEA_.mjs} +7 -5
- package/dist/.setup/{monitor-BSKi0nx-.mjs → monitor-CV6Z6FKP.mjs} +137 -78
- package/dist/.setup/{outbound-adapter-C0R5jz6S.mjs → outbound-adapter-9dbnYtL1.mjs} +9 -8
- package/dist/.setup/{pipeline.runtime-zTQpztym.mjs → pipeline.runtime-DLIQf1Bo.mjs} +68 -41
- package/dist/.setup/{plugin-routes-lXsy_bNV.mjs → plugin-routes-D4qozHVn.mjs} +3 -2
- package/dist/.setup/{policy-Bp1FvE6m.mjs → policy-yhn48xf5.mjs} +6 -4
- package/dist/.setup/{probe-C5VWf3sz.mjs → probe-IiHogLQN.mjs} +19 -11
- package/dist/.setup/{registry-1G0f1zuZ.mjs → registry-DizWcnNp.mjs} +4 -2
- package/dist/.setup/{relay-source-D1NGf3d2.mjs → relay-source-CxDcrn16.mjs} +4 -3
- package/dist/.setup/{replies-BY9G1WZH.mjs → replies-MRkrg3rC.mjs} +9 -7
- package/dist/.setup/{reply-blocks-DOjiDr44.mjs → reply-blocks-Ca-raz2z.mjs} +7 -4
- package/dist/.setup/{resolve-channels-BNQ1KZXh.mjs → resolve-channels-DRRhElwz.mjs} +5 -4
- package/dist/.setup/{resolve-users-C4dC8Z7D.mjs → resolve-users-Cz8e17ky.mjs} +5 -4
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-C6HKn7Av.mjs → runtime-JSVZSWAj.mjs} +2 -1
- package/dist/.setup/runtime-setter-api-CMFvhrAr.mjs +3 -0
- package/dist/.setup/{scopes-C1aeCBa6.mjs → scopes-DfQVi8Jw.mjs} +3 -2
- package/dist/.setup/secret-contract-api-DK9gZldc.mjs +3 -0
- package/dist/.setup/{secret-contract-BH1ergYo.mjs → secret-contract-vVRMoE1D.mjs} +3 -2
- package/dist/.setup/{security-audit-C3hXCfDt.mjs → security-audit-DFGiFLqd.mjs} +3 -2
- package/dist/.setup/{send-C5uXkmZV.mjs → send-C-8wY0lK.mjs} +21 -14
- package/dist/.setup/{send-results-D-o6PgtS.mjs → send-results-eeOu_HYm.mjs} +2 -1
- package/dist/.setup/{session-status-CHkEn3HM.mjs → session-status-Dv8wNBEt.mjs} +57 -31
- package/dist/.setup/setup-plugin-api-BGD1TYnK.mjs +3 -0
- package/dist/.setup/{setup-surface-b9gluDhT.mjs → setup-surface--n8VsDvV.mjs} +8 -7
- package/dist/.setup/{shared-DbdvOUXo.mjs → shared-BhJHIZs1.mjs} +18 -14
- package/dist/.setup/{slash-dispatch.runtime-Bf0r7kf2.mjs → slash-dispatch.runtime-D3Wq45ER.mjs} +1 -1
- package/dist/.setup/{target-parsing-0pRZtahO.mjs → target-parsing-FFE26kOV.mjs} +2 -1
- package/dist/.setup/{targets-BqXz7CpG.mjs → targets-C6LZQL1Q.mjs} +3 -2
- package/dist/.setup/{thread-ts-47Au2-Yn.mjs → thread-ts-Cvt7WD6B.mjs} +2 -1
- package/dist/account-inspect-api.js +3 -2
- package/dist/api.js +17 -17
- package/dist/channel-config-api.js +2 -1
- package/dist/channel-entry.js +2 -1
- package/dist/channel-plugin-api.js +2 -1
- package/dist/configured-state.js +3 -2
- package/dist/directory-contract-api.js +2 -1
- package/dist/doctor-contract-api.js +2 -1
- package/dist/http-routes-api.js +2 -1
- package/dist/index.js +3 -2
- package/dist/message-tool-api.js +2 -1
- package/dist/runtime-api.js +12 -12
- package/dist/runtime-setter-api.js +2 -1
- package/dist/secret-contract-api.js +2 -1
- package/dist/security-contract-api.js +2 -1
- package/dist/setup-entry.js +5 -4
- package/dist/setup-plugin-api.js +2 -1
- package/package.json +4 -4
- package/dist/.setup/action-runtime.runtime-DWKWaKgC.mjs +0 -1
- package/dist/.setup/http-GpAVKwSX.mjs +0 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +0 -2
- package/dist/.setup/secret-contract-api-BdG3j9lT.mjs +0 -2
- package/dist/.setup/setup-plugin-api-9mACIIlc.mjs +0 -2
- package/dist/.source-module-urls/562d694877afe9d9dcbb3b32a8883c16974738f2aa892c48d45572cdc9a62529.json +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-
|
|
3
|
-
import { c as collectSlackCursorPages, u as createSlackLookupClient } from "./probe-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-FFE26kOV.mjs";
|
|
3
|
+
import { c as collectSlackCursorPages, u as createSlackLookupClient } from "./probe-IiHogLQN.mjs";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
|
|
5
|
+
//#region 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();
|
|
@@ -81,4 +81,5 @@ async function resolveSlackUserAllowlist(params) {
|
|
|
81
81
|
return result;
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
+
//#endregion
|
|
84
85
|
export { resolve_users_exports as n, resolveSlackUserAllowlist as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,4 +24,5 @@ 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
|
|
27
28
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
//#region 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
|
|
7
8
|
export { getSlackRuntime as n, setSlackRuntime as r, getOptionalSlackRuntime as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as createSlackReadClient, o as formatSlackError } from "./probe-
|
|
1
|
+
import { d as createSlackReadClient, o as formatSlackError } from "./probe-IiHogLQN.mjs";
|
|
2
2
|
import { isRecord, normalizeOptionalString, normalizeTrimmedStringList, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/slack/src/scopes.ts
|
|
4
4
|
function collectScopes(value, into) {
|
|
5
5
|
if (Array.isArray(value) || typeof value === "string") {
|
|
6
6
|
for (const scope of normalizeTrimmedStringList(typeof value === "string" ? value.split(/[,\s]+/) : value)) into.push(scope);
|
|
@@ -58,4 +58,5 @@ async function fetchSlackScopes(token, timeoutMs) {
|
|
|
58
58
|
error: errors.length > 0 ? errors.join(" | ") : "no scopes returned"
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
//#endregion
|
|
61
62
|
export { fetchSlackScopes };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-
|
|
1
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-zcR9TJJN.mjs";
|
|
2
2
|
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretContract, hasOwnProperty } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/slack/src/secret-contract.ts
|
|
4
4
|
const channelSecrets = createChannelSecretContract({
|
|
5
5
|
channelKey: "slack",
|
|
6
6
|
account: [
|
|
@@ -63,4 +63,5 @@ const channelSecrets = createChannelSecretContract({
|
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
66
|
+
//#endregion
|
|
66
67
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.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
|
+
//#region 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,4 +37,5 @@ async function collectSlackSecurityAuditFindings(params) {
|
|
|
37
37
|
});
|
|
38
38
|
return findings;
|
|
39
39
|
}
|
|
40
|
+
//#endregion
|
|
40
41
|
export { security_audit_exports as n, collectSlackSecurityAuditFindings as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { d as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
4
|
-
import { A as SLACK_MESSAGE_TEXT_HARD_LIMIT, D as buildSlackCompleteBlocksFallbackText, F as truncateSlackTextByUtf8Bytes, K as resolveSlackQuestionActionIds, L as SLACK_QUESTION_FINALIZATION_BLOCKS, M as SLACK_TEXT_LIMIT, O as renderSlackBlockFallbackText, P as truncateSlackText, T as stripSlackNativeDataBlocks, X as chunkSlackMrkdwnText, Z as markdownToSlackMrkdwnChunks, b as hasSlackNativeDataBlock, gt as validateSlackBlocksArray, j as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, k as SLACK_EDIT_TEXT_MAX_BYTES, m as assertSlackDetachedTargetAllowed, v as buildSlackNativeDataAccessibilityText, w as renderSlackNativeDataPlainTextBlock, x as isSlackInvalidBlocksError, y as createSlackNativeDataBaseTextConsumer } from "./session-status-
|
|
5
|
-
import { _ as getSlackWriteClient, b as writeLruMapEntry, d as createSlackReadClient, h as createSlackWriteClient, o as formatSlackError, p as createSlackTokenCacheKey, s as getSlackWebApiErrorData } from "./probe-
|
|
6
|
-
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-
|
|
7
|
-
import { t as getOptionalSlackRuntime } from "./runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { d as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-msihSF3-.mjs";
|
|
3
|
+
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-FFE26kOV.mjs";
|
|
4
|
+
import { A as SLACK_MESSAGE_TEXT_HARD_LIMIT, D as buildSlackCompleteBlocksFallbackText, F as truncateSlackTextByUtf8Bytes, K as resolveSlackQuestionActionIds, L as SLACK_QUESTION_FINALIZATION_BLOCKS, M as SLACK_TEXT_LIMIT, O as renderSlackBlockFallbackText, P as truncateSlackText, T as stripSlackNativeDataBlocks, X as chunkSlackMrkdwnText, Z as markdownToSlackMrkdwnChunks, b as hasSlackNativeDataBlock, gt as validateSlackBlocksArray, j as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, k as SLACK_EDIT_TEXT_MAX_BYTES, m as assertSlackDetachedTargetAllowed, v as buildSlackNativeDataAccessibilityText, w as renderSlackNativeDataPlainTextBlock, x as isSlackInvalidBlocksError, y as createSlackNativeDataBaseTextConsumer } from "./session-status-Dv8wNBEt.mjs";
|
|
5
|
+
import { _ as getSlackWriteClient, b as writeLruMapEntry, d as createSlackReadClient, h as createSlackWriteClient, o as formatSlackError, p as createSlackTokenCacheKey, s as getSlackWebApiErrorData } from "./probe-IiHogLQN.mjs";
|
|
6
|
+
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-Cvt7WD6B.mjs";
|
|
7
|
+
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.mjs";
|
|
8
8
|
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
9
9
|
import { asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -27,7 +27,7 @@ import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
|
27
27
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
28
28
|
import { createPersistentDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
29
29
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
30
|
-
|
|
30
|
+
//#region extensions/slack/src/native-data-fallback.ts
|
|
31
31
|
const SLACK_SECTION_PLAIN_TEXT_MAX = 3e3;
|
|
32
32
|
const SLACK_EMPTY_BLOCK_FALLBACK = "Shared a Block Kit message";
|
|
33
33
|
function chunkSlackTextAtHardLimit(text, limit = SLACK_MESSAGE_TEXT_HARD_LIMIT) {
|
|
@@ -104,7 +104,8 @@ function buildSlackNativeDataDeliveryPlan(params) {
|
|
|
104
104
|
skipOriginalBlocks: accessibilityText.length > SLACK_MESSAGE_TEXT_HARD_LIMIT
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region extensions/slack/src/post-message-identity.ts
|
|
108
109
|
function buildSlackMessageIdentityPayload(identity) {
|
|
109
110
|
return {
|
|
110
111
|
...identity?.username ? { username: identity.username } : {},
|
|
@@ -150,7 +151,8 @@ async function postSlackMessageWithIdentityFallback(params) {
|
|
|
150
151
|
return post(basePayload);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
|
-
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region extensions/slack/src/post-message-payload.ts
|
|
154
156
|
function buildSlackPostMessagePayload(params) {
|
|
155
157
|
const threadPayload = params.replyBroadcast && params.threadTs ? {
|
|
156
158
|
thread_ts: params.threadTs,
|
|
@@ -167,7 +169,8 @@ function buildSlackPostMessagePayload(params) {
|
|
|
167
169
|
...typeof params.unfurl?.unfurlMedia === "boolean" ? { unfurl_media: params.unfurl.unfurlMedia } : {}
|
|
168
170
|
};
|
|
169
171
|
}
|
|
170
|
-
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region extensions/slack/src/client-delivery.ts
|
|
171
174
|
const SLACK_COMMERCIAL_API_HOSTNAME = "slack.com";
|
|
172
175
|
const SLACK_COMMERCIAL_UPLOAD_HOSTNAME = "files.slack.com";
|
|
173
176
|
const SLACK_GOV_API_HOSTNAME = "slack-gov.com";
|
|
@@ -376,7 +379,8 @@ async function uploadSlackFile(params) {
|
|
|
376
379
|
if (!completeResp.ok) throw new Error(`Failed to complete upload: ${completeResp.error ?? "unknown error"}`);
|
|
377
380
|
return uploadFileId;
|
|
378
381
|
}
|
|
379
|
-
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region extensions/slack/src/sent-thread-cache.ts
|
|
380
384
|
/**
|
|
381
385
|
* Cache of Slack threads the bot has participated in.
|
|
382
386
|
* Used to auto-respond in threads without requiring @mention after the first reply.
|
|
@@ -452,7 +456,8 @@ function clearSlackThreadParticipationCache() {
|
|
|
452
456
|
threadParticipation.clearForTest();
|
|
453
457
|
threadFailureNotices.clear();
|
|
454
458
|
}
|
|
455
|
-
|
|
459
|
+
//#endregion
|
|
460
|
+
//#region extensions/slack/src/slack-dm-channel-cache.ts
|
|
456
461
|
const SLACK_DM_CHANNEL_CACHE_MAX = 1024;
|
|
457
462
|
const slackDmChannelCaches = /* @__PURE__ */ new WeakMap();
|
|
458
463
|
function createSlackDmCacheKey(params) {
|
|
@@ -473,7 +478,8 @@ function cacheSlackDmChannelId(params, channelId) {
|
|
|
473
478
|
const key = createSlackDmCacheKey(params);
|
|
474
479
|
writeLruMapEntry(cache, key, channelId, SLACK_DM_CHANNEL_CACHE_MAX);
|
|
475
480
|
}
|
|
476
|
-
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region extensions/slack/src/send.ts
|
|
477
483
|
var send_exports = /* @__PURE__ */ __exportAll({
|
|
478
484
|
reconcileSlackUnknownSend: () => reconcileSlackUnknownSend,
|
|
479
485
|
resolveSlackDmChannelId: () => resolveSlackDmChannelId,
|
|
@@ -1119,4 +1125,5 @@ async function sendMessageSlackQueued(params) {
|
|
|
1119
1125
|
receipt: createSlackSendReceiptFromResults(deliveredResults, deliveredThreadTs)
|
|
1120
1126
|
};
|
|
1121
1127
|
}
|
|
1128
|
+
//#endregion
|
|
1122
1129
|
export { clearSlackThreadParticipationCache as a, hasSlackThreadParticipationWithPersistence as c, requireSlackPostMessageTimestamp as d, buildSlackMessageIdentityPayload as f, chunkSlackTextAtHardLimit as h, clearSlackThreadFailureNotice as i, recordSlackThreadFailureNotice as l, buildSlackNativeDataDeliveryPlan as m, send_exports as n, hasSlackThreadFailureNotice as o, hasSlackMessageIdentity as p, setSlackDefaultSendIdentity as r, hasSlackThreadParticipation as s, sendMessageSlack as t, recordSlackThreadParticipation as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
2
|
-
|
|
2
|
+
//#region extensions/slack/src/send-results.ts
|
|
3
3
|
function mergeSlackSendResults(results) {
|
|
4
4
|
const lastResult = results.at(-1);
|
|
5
5
|
if (!lastResult) throw new Error("Slack send plan produced no delivery.");
|
|
@@ -19,4 +19,5 @@ function mergeSlackSendResults(results) {
|
|
|
19
19
|
} } : {}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
//#endregion
|
|
22
23
|
export { mergeSlackSendResults as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
2
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
4
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
5
|
-
import { A as resolveSlackAllowListMatch, j as resolveSlackUserAllowListForTeam, o as formatSlackError } from "./probe-
|
|
1
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-zcR9TJJN.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-msihSF3-.mjs";
|
|
3
|
+
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-FFE26kOV.mjs";
|
|
4
|
+
import { t as slackContextTargetsMatch } from "./targets-C6LZQL1Q.mjs";
|
|
5
|
+
import { A as resolveSlackAllowListMatch, j as resolveSlackUserAllowListForTeam, o as formatSlackError } from "./probe-IiHogLQN.mjs";
|
|
6
6
|
import { resolveGlobalMap } from "openclaw/plugin-sdk/global-singleton";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -25,7 +25,7 @@ import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-run
|
|
|
25
25
|
import { readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
26
26
|
import { inspectRuntimeConversationBindingRoute, resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRouteAsync } from "openclaw/plugin-sdk/conversation-binding-runtime";
|
|
27
27
|
import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
28
|
-
|
|
28
|
+
//#region extensions/slack/src/action-threading.ts
|
|
29
29
|
const SLACK_PRIVATE_ACTION_DELIVERY_RESULT = Symbol("slack.action.delivery-result");
|
|
30
30
|
function resolveSlackAutoThreadId(params) {
|
|
31
31
|
const context = params.toolContext;
|
|
@@ -39,7 +39,8 @@ function resolveSlackAutoThreadId(params) {
|
|
|
39
39
|
if (isSingleUseReplyToMode(context.replyToMode ?? "off") && context.hasRepliedRef?.value) return;
|
|
40
40
|
return context.currentThreadTs;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region extensions/slack/src/approval-plugin-policy.ts
|
|
43
44
|
/** Returns undefined only when Slack plugin approvals retain legacy account authorization. */
|
|
44
45
|
function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
45
46
|
const policy = cfg.approvals?.plugin?.slack;
|
|
@@ -56,7 +57,8 @@ function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
|
56
57
|
}
|
|
57
58
|
return plugin?.approvers ?? policy.approvers;
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region extensions/slack/src/exec-approvals.ts
|
|
60
62
|
function normalizeSlackUserLikeId(value) {
|
|
61
63
|
const upper = value.toUpperCase();
|
|
62
64
|
return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
|
|
@@ -103,7 +105,8 @@ const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnable
|
|
|
103
105
|
const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
|
|
104
106
|
const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
105
107
|
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
106
|
-
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region extensions/slack/src/installation-identity-state.ts
|
|
107
110
|
const slackInstallationStates = resolveGlobalMap(Symbol.for("openclaw.slack.installation-identities"), "close-and-restart");
|
|
108
111
|
function registerSlackInstallationState(accountId, kind, teamId) {
|
|
109
112
|
const normalizedAccountId = normalizeAccountId(accountId);
|
|
@@ -136,7 +139,8 @@ function getSlackInstallationTeamId(accountId) {
|
|
|
136
139
|
function isSlackWorkspaceInstallation(accountId) {
|
|
137
140
|
return getSlackInstallationKind(accountId) === "workspace";
|
|
138
141
|
}
|
|
139
|
-
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region extensions/slack/src/approval-auth.ts
|
|
140
144
|
function resolveSlackApprovalInputs(params) {
|
|
141
145
|
const account = resolveSlackAccount(params).config;
|
|
142
146
|
return {
|
|
@@ -203,7 +207,8 @@ function getSlackApprovalApproversForTeam(params) {
|
|
|
203
207
|
function resolveSlackApprovalTeamId(params) {
|
|
204
208
|
return getSlackInstallationTeamId(resolveSlackAccount(params).accountId) ?? resolveSlackApprovalOriginTeamId(params.request);
|
|
205
209
|
}
|
|
206
|
-
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region extensions/slack/src/approval-native-gates.ts
|
|
207
212
|
function isSlackPluginApprovalRequest(request) {
|
|
208
213
|
return resolveApprovalKind(request) === "plugin";
|
|
209
214
|
}
|
|
@@ -414,7 +419,8 @@ async function shouldHandleSlackNativeApprovalRequest(params) {
|
|
|
414
419
|
approvalKind: "exec"
|
|
415
420
|
});
|
|
416
421
|
}
|
|
417
|
-
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region extensions/slack/src/blocks-input.ts
|
|
418
424
|
const SLACK_MAX_BLOCKS = 50;
|
|
419
425
|
function parseBlocksJson(raw) {
|
|
420
426
|
try {
|
|
@@ -465,7 +471,8 @@ const SLACK_PRESENTATION_CAPABILITIES = {
|
|
|
465
471
|
}
|
|
466
472
|
}
|
|
467
473
|
};
|
|
468
|
-
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region extensions/slack/src/approval-actions.ts
|
|
469
476
|
const SLACK_APPROVAL_VALUE_PREFIX = "openclaw:approval:v1:";
|
|
470
477
|
const SLACK_APPROVAL_HEADER_BLOCK_ID = "openclaw_approval_header";
|
|
471
478
|
function isApprovalDecision(value) {
|
|
@@ -502,11 +509,13 @@ function decodeSlackApprovalAction(value) {
|
|
|
502
509
|
return null;
|
|
503
510
|
}
|
|
504
511
|
}
|
|
505
|
-
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
506
514
|
function escapeSlackMrkdwn(value) {
|
|
507
515
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
508
516
|
}
|
|
509
|
-
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region extensions/slack/src/presentation-fallback.ts
|
|
510
519
|
const SLACK_UNCOPYABLE_COMMAND_WARNING = "not copyable: contains backtick";
|
|
511
520
|
function escapeSlackPresentationChartBlock(block) {
|
|
512
521
|
const escaped = {
|
|
@@ -586,7 +595,8 @@ function renderSlackMessagePresentationFallbackText(params) {
|
|
|
586
595
|
presentation
|
|
587
596
|
});
|
|
588
597
|
}
|
|
589
|
-
|
|
598
|
+
//#endregion
|
|
599
|
+
//#region extensions/slack/src/rich-text.ts
|
|
590
600
|
const RICH_TEXT_CONTAINER_TYPES = /* @__PURE__ */ new Set([
|
|
591
601
|
"rich_text_section",
|
|
592
602
|
"rich_text_preformatted",
|
|
@@ -633,7 +643,8 @@ function renderSlackRichText(value, mode, separator = "") {
|
|
|
633
643
|
}
|
|
634
644
|
}).filter(Boolean).join(separator);
|
|
635
645
|
}
|
|
636
|
-
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region extensions/slack/src/data-table.ts
|
|
637
648
|
const SLACK_DATA_TABLE_COLUMNS_MAX = 20;
|
|
638
649
|
const SLACK_DATA_TABLE_ROWS_MAX = 100;
|
|
639
650
|
const SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX = 1e4;
|
|
@@ -773,7 +784,8 @@ function renderSlackDataTableCompactPlainTextFallback(value) {
|
|
|
773
784
|
...table.rows.map((row) => row.map(escapeCompactFallbackCell).join(" "))
|
|
774
785
|
].join("\n"));
|
|
775
786
|
}
|
|
776
|
-
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region extensions/slack/src/data-visualization.ts
|
|
777
789
|
const SLACK_CHART_TITLE_MAX = 50;
|
|
778
790
|
const SLACK_CHART_LABEL_MAX = 20;
|
|
779
791
|
const SLACK_CHART_AXIS_LABEL_MAX = 50;
|
|
@@ -884,7 +896,8 @@ function renderSlackDataVisualizationFallbackText(value, mrkdwnSafe = false) {
|
|
|
884
896
|
const title = typeof block.title === "string" ? block.title.trim() : "";
|
|
885
897
|
return title ? mrkdwnSafe ? escapeSlackMrkdwn(title) : title : void 0;
|
|
886
898
|
}
|
|
887
|
-
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region extensions/slack/src/format.ts
|
|
888
901
|
const SLACK_ANGLE_TOKEN_RE = /<[^>\n]+>/g;
|
|
889
902
|
function isAllowedSlackAngleToken(token) {
|
|
890
903
|
const inner = token.slice(1, -1);
|
|
@@ -1214,7 +1227,8 @@ function markdownToSlackMrkdwnChunks(markdown, limit, options = {}) {
|
|
|
1214
1227
|
measureRendered: (rendered) => rendered.length
|
|
1215
1228
|
}).map(({ rendered }) => rendered.length > normalizedLimit ? protectSlackAssistantTranscriptRoleHeaders(rendered) : rendered);
|
|
1216
1229
|
}
|
|
1217
|
-
|
|
1230
|
+
//#endregion
|
|
1231
|
+
//#region extensions/slack/src/question-actions.ts
|
|
1218
1232
|
const SLACK_QUESTION_VALUE_PREFIX = "slq1:";
|
|
1219
1233
|
const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
|
|
1220
1234
|
function encodeSlackQuestionAction(action) {
|
|
@@ -1245,7 +1259,8 @@ async function resolveSlackQuestionAction(params) {
|
|
|
1245
1259
|
}
|
|
1246
1260
|
await params.respond(result.status === "answered" ? "Answer submitted." : "This question was already answered.").catch(() => {});
|
|
1247
1261
|
}
|
|
1248
|
-
|
|
1262
|
+
//#endregion
|
|
1263
|
+
//#region extensions/slack/src/reply-action-ids.ts
|
|
1249
1264
|
const SLACK_REPLY_BUTTON_ACTION_ID = "openclaw:reply_button";
|
|
1250
1265
|
const SLACK_REPLY_LINK_ACTION_ID = "openclaw:reply_link";
|
|
1251
1266
|
const SLACK_SESSION_LINK_ACTION_ID = "openclaw:session_link";
|
|
@@ -1276,7 +1291,8 @@ function resolveSlackQuestionActionIds(blocks) {
|
|
|
1276
1291
|
return (block.elements ?? []).flatMap(({ action_id }) => action_id && isSlackQuestionActionId(action_id) ? [action_id] : []);
|
|
1277
1292
|
});
|
|
1278
1293
|
}
|
|
1279
|
-
|
|
1294
|
+
//#endregion
|
|
1295
|
+
//#region extensions/slack/src/truncate.ts
|
|
1280
1296
|
function truncateSlackText(value, max, whitespace = "trim") {
|
|
1281
1297
|
const text = whitespace === "preserve" ? value : value.trim();
|
|
1282
1298
|
if (text.length <= max) return text;
|
|
@@ -1304,12 +1320,14 @@ function truncateSlackTextByUtf8Bytes(value, maxBytes) {
|
|
|
1304
1320
|
}
|
|
1305
1321
|
return maxBytes >= suffixBytes ? `${prefix}${suffix}` : prefix;
|
|
1306
1322
|
}
|
|
1307
|
-
|
|
1323
|
+
//#endregion
|
|
1324
|
+
//#region extensions/slack/src/limits.ts
|
|
1308
1325
|
const SLACK_TEXT_LIMIT = 8e3;
|
|
1309
1326
|
const SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT = 4e3;
|
|
1310
1327
|
const SLACK_EDIT_TEXT_MAX_BYTES = 4e3;
|
|
1311
1328
|
const SLACK_MESSAGE_TEXT_HARD_LIMIT = 4e4;
|
|
1312
|
-
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region extensions/slack/src/blocks-fallback.ts
|
|
1313
1331
|
const SLACK_SELECT_ELEMENT_TYPES = /* @__PURE__ */ new Set([
|
|
1314
1332
|
"static_select",
|
|
1315
1333
|
"multi_static_select",
|
|
@@ -1386,7 +1404,8 @@ function buildSlackBlocksFallbackText(blocks) {
|
|
|
1386
1404
|
function buildSlackCompleteBlocksFallbackText(blocks, options = {}) {
|
|
1387
1405
|
return blocks.map((block) => renderSlackBlockFallbackText(block, options)).filter(Boolean).join("\n\n").trim() || buildSlackBlocksFallbackText(blocks);
|
|
1388
1406
|
}
|
|
1389
|
-
|
|
1407
|
+
//#endregion
|
|
1408
|
+
//#region extensions/slack/src/native-data-blocks.ts
|
|
1390
1409
|
const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
|
|
1391
1410
|
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16384;
|
|
1392
1411
|
const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
|
|
@@ -1489,12 +1508,14 @@ function appendSlackNativeDataFallbackText(text, blocks) {
|
|
|
1489
1508
|
function appendSlackNativeDataPlainTextFallback(text, blocks) {
|
|
1490
1509
|
return appendSlackBlockFallback(text.trim(), blocks, renderSlackNativeDataPlainTextBlock);
|
|
1491
1510
|
}
|
|
1492
|
-
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region extensions/slack/src/detached-target-admission.ts
|
|
1493
1513
|
function assertSlackDetachedTargetAllowed(accountId, teamId) {
|
|
1494
1514
|
const installationKind = getSlackInstallationKind(accountId);
|
|
1495
1515
|
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");
|
|
1496
1516
|
}
|
|
1497
|
-
|
|
1517
|
+
//#endregion
|
|
1518
|
+
//#region extensions/slack/src/conversation-binding-route.ts
|
|
1498
1519
|
const slackRouteBindingConfigCache = /* @__PURE__ */ new WeakMap();
|
|
1499
1520
|
function normalizeSlackRouteBindingPeer(peer) {
|
|
1500
1521
|
const rawId = peer.id.trim();
|
|
@@ -1631,7 +1652,8 @@ function applySlackConfiguredBindingRoute(params, runtimeRoute) {
|
|
|
1631
1652
|
route: runtimeRoute.boundSessionKey ? runtimeRoute.route : configuredRoute?.route ?? runtimeRoute.route
|
|
1632
1653
|
};
|
|
1633
1654
|
}
|
|
1634
|
-
|
|
1655
|
+
//#endregion
|
|
1656
|
+
//#region extensions/slack/src/monitor/workspace-routing.ts
|
|
1635
1657
|
function resolveSlackAgentRoute(params) {
|
|
1636
1658
|
const route = resolveAgentRoute({
|
|
1637
1659
|
cfg: params.cfg,
|
|
@@ -1665,7 +1687,8 @@ function qualifySlackRoutePeerId(params) {
|
|
|
1665
1687
|
function qualifySlackConversationId(conversationId, eventScope) {
|
|
1666
1688
|
return eventScope ? `team:${encodeURIComponent(eventScope.teamId)}:${conversationId}` : conversationId;
|
|
1667
1689
|
}
|
|
1668
|
-
|
|
1690
|
+
//#endregion
|
|
1691
|
+
//#region extensions/slack/src/channel-policy-state.ts
|
|
1669
1692
|
const slackChannelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.slack.channel-policy-bindings"), "close-and-restart");
|
|
1670
1693
|
function setSlackChannelPolicyBindings(accountId, bindings) {
|
|
1671
1694
|
slackChannelPolicyBindings.set(normalizeAccountId(accountId), new Map([...bindings].map(([key, id]) => [key, id.toUpperCase()])));
|
|
@@ -1675,7 +1698,8 @@ function getSlackChannelPolicyKeys(accountId, channelId) {
|
|
|
1675
1698
|
if (!id) return [];
|
|
1676
1699
|
return [...slackChannelPolicyBindings.get(normalizeAccountId(accountId)) ?? []].filter(([, resolvedId]) => resolvedId === id).map(([key]) => key);
|
|
1677
1700
|
}
|
|
1678
|
-
|
|
1701
|
+
//#endregion
|
|
1702
|
+
//#region extensions/slack/src/group-policy.ts
|
|
1679
1703
|
function buildSlackChannelIdCandidates(channelId, teamId, options) {
|
|
1680
1704
|
const trimmedId = channelId?.trim();
|
|
1681
1705
|
if (!trimmedId) return [];
|
|
@@ -1727,7 +1751,8 @@ function resolveSlackGroupToolPolicy(params) {
|
|
|
1727
1751
|
senderE164: params.senderE164
|
|
1728
1752
|
});
|
|
1729
1753
|
}
|
|
1730
|
-
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region extensions/slack/src/session-status.ts
|
|
1731
1756
|
const MISSING_STOP_SUBSCRIPTION = "missing_agent_session_stopped_event_subscription";
|
|
1732
1757
|
let warnedMissingStopSubscription = false;
|
|
1733
1758
|
async function setSlackSessionStatus(params) {
|
|
@@ -1768,4 +1793,5 @@ async function renameSlackSession(params) {
|
|
|
1768
1793
|
return false;
|
|
1769
1794
|
}
|
|
1770
1795
|
}
|
|
1796
|
+
//#endregion
|
|
1771
1797
|
export { buildSlackDataVisualizationBlock as $, SLACK_MESSAGE_TEXT_HARD_LIMIT as A, resolveSlackApprovalTeamId as At, SLACK_REPLY_SELECT_ACTION_ID as B, resolvePluginApprovalSlackApprovers as Bt, isSlackNativeResponseUrlRejection as C, resolveSlackFallbackOriginTarget as Ct, buildSlackCompleteBlocksFallbackText as D, slackTargetsMatch as Dt, buildSlackBlocksFallbackText as E, shouldHandleSlackPluginViaForwardingSession as Et, truncateSlackTextByUtf8Bytes as F, isSlackExecApprovalAuthorizedSender as Ft, isSlackQuestionActionId as G, SLACK_SESSION_LINK_ACTION_ID as H, resolveSlackAutoThreadId as Ht, SLACK_BUTTON_ACTION_IDS as I, isSlackExecApprovalClientEnabled as It, encodeSlackQuestionAction as J, resolveSlackQuestionActionIds as K, SLACK_QUESTION_FINALIZATION_BLOCKS as L, normalizeSlackApproverId as Lt, SLACK_TEXT_LIMIT as M, isSlackWorkspaceInstallation as Mt, countSlackTextUtf8Bytes as N, registerSlackInstallationState as Nt, renderSlackBlockFallbackText as O, getSlackApprovalApproversForTeam as Ot, truncateSlackText as P, getSlackExecApprovalApprovers as Pt, normalizeSlackOutboundText as Q, SLACK_REPLY_BUTTON_ACTION_ID as R, resolveSlackExecApprovalTarget as Rt, isSlackInvalidBlocksResponse as S, resolveSlackApproverDmTargets as St, stripSlackNativeDataBlocks as T, shouldHandleSlackNativeApprovalRequest as Tt, isSlackApprovalActionId as U, SLACK_SELECT_ACTION_IDS as V, SLACK_PRIVATE_ACTION_DELIVERY_RESULT as Vt, isSlackCallbackActionId as W, chunkSlackMrkdwnText as X, resolveSlackQuestionAction as Y, markdownToSlackMrkdwnChunks as Z, appendSlackNativeDataPlainTextFallback as _, isSlackAnyNativeApprovalClientEnabled as _t, resolveSlackGroupRequireMention as a, renderSlackMessagePresentationChartFallbackText as at, hasSlackNativeDataBlock as b, normalizeSlackOriginTarget as bt, qualifySlackConversationId as c, SLACK_APPROVAL_HEADER_BLOCK_ID as ct, normalizeSlackRouteBindingConfig as d, SLACK_BUTTON_VALUE_MAX as dt, hasSlackDataVisualizationBlock as et, resolveSlackConversationBindingRoute as f, SLACK_PRESENTATION_CAPABILITIES as ft, appendSlackNativeDataFallbackText as g, validateSlackBlocksArray as gt, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as h, parseSlackBlocksInput as ht, buildSlackChannelPolicyScope as i, countSlackDataTableCellCharacters as it, SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT as j, getSlackInstallationKind as jt, SLACK_EDIT_TEXT_MAX_BYTES as k, isSlackPluginApprovalAuthorizedSender as kt, qualifySlackRoutePeerId as l, decodeSlackApprovalAction as lt, assertSlackDetachedTargetAllowed as m, SLACK_MAX_BLOCKS as mt, setSlackSessionStatus as n, buildSlackDataTableBlock as nt, resolveSlackGroupToolPolicy as o, renderSlackMessagePresentationFallbackText as ot, resolveSlackConversationBindingRouteAsync as p, SLACK_SECTION_TEXT_MAX as pt, decodeSlackQuestionAction as q, buildSlackChannelIdCandidates as r, countSlackDataTableBlocksCellCharacters as rt, setSlackChannelPolicyBindings as s, escapeSlackMrkdwn as st, renameSlackSession as t, SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX as tt, resolveSlackAgentRoute as u, encodeSlackApprovalAction as ut, buildSlackNativeDataAccessibilityText as v, isSlackPluginApprovalRequest as vt, renderSlackNativeDataPlainTextBlock as w, resolveTurnSourceSlackOriginTarget as wt, isSlackInvalidBlocksError as x, resolveSessionSlackOriginTarget as xt, createSlackNativeDataBaseTextConsumer as y, normalizeSlackForwardTarget as yt, SLACK_REPLY_LINK_ACTION_ID as z, shouldSuppressLocalSlackExecApprovalPrompt as zt };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
3
|
-
import "./shared-
|
|
4
|
-
import { a as buildSlackAllowFromPrompt, i as SLACK_CHANNEL, n as createSlackSetupWizardBase } from "./channel.setup-
|
|
5
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
6
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
1
|
+
import { c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-msihSF3-.mjs";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-CmkKiSb9.mjs";
|
|
3
|
+
import "./shared-BhJHIZs1.mjs";
|
|
4
|
+
import { a as buildSlackAllowFromPrompt, i as SLACK_CHANNEL, n as createSlackSetupWizardBase } from "./channel.setup-CzFw73mU.mjs";
|
|
5
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DRRhElwz.mjs";
|
|
6
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-Cz8e17ky.mjs";
|
|
7
7
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
9
9
|
import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, patchChannelConfigForAccount, promptResolvedAllowFrom, resolveEntriesWithOptionalToken, resolveSetupAccountId, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
|
|
10
|
-
|
|
10
|
+
//#region extensions/slack/src/setup-surface.ts
|
|
11
11
|
const t = createSetupTranslator();
|
|
12
12
|
function resolveSlackSetupAuth(account, credentialValues) {
|
|
13
13
|
if (account.config.postAs === "user") return credentialValues.userToken || account.userToken;
|
|
@@ -109,4 +109,5 @@ const slackSetupWizard = createSlackSetupWizardBase({
|
|
|
109
109
|
},
|
|
110
110
|
resolveGroupAllowlist: resolveSlackGroupAllowlist
|
|
111
111
|
});
|
|
112
|
+
//#endregion
|
|
112
113
|
export { slackSetupWizard };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
2
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
5
|
-
import { a as slackIngressIdentity, t as probeSlack } from "./probe-
|
|
6
|
-
import { n as SLACK_CHANNEL_META } from "./channel-meta-
|
|
7
|
-
import { r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-
|
|
8
|
-
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-
|
|
9
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-zcR9TJJN.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy } from "./accounts-msihSF3-.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-CmkKiSb9.mjs";
|
|
4
|
+
import { a as parseSlackTarget } from "./target-parsing-FFE26kOV.mjs";
|
|
5
|
+
import { a as slackIngressIdentity, t as probeSlack } from "./probe-IiHogLQN.mjs";
|
|
6
|
+
import { n as SLACK_CHANNEL_META } from "./channel-meta-C443t-lI.mjs";
|
|
7
|
+
import { r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-CzFw73mU.mjs";
|
|
8
|
+
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-Cd4-VzIM.mjs";
|
|
9
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-vVRMoE1D.mjs";
|
|
10
10
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
11
11
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
12
12
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createConditionalWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
13
13
|
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
14
14
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
15
|
-
|
|
15
|
+
//#region extensions/slack/src/security.ts
|
|
16
16
|
const resolveSlackDmPolicy = createScopedDmSecurityResolver({
|
|
17
17
|
channelKey: "slack",
|
|
18
18
|
resolvePolicy: (account) => account.config.dmPolicy,
|
|
@@ -53,7 +53,7 @@ const collectSlackSecurityFindings = createConditionalWarningCollector.findings(
|
|
|
53
53
|
severity: "warn",
|
|
54
54
|
title: "Slack security warning"
|
|
55
55
|
});
|
|
56
|
-
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-
|
|
56
|
+
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-DFGiFLqd.mjs").then((n) => n.n));
|
|
57
57
|
const slackSecurityAdapter = {
|
|
58
58
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
59
59
|
collectWarnings: collectSlackSecurityFindings,
|
|
@@ -62,7 +62,8 @@ const slackSecurityAdapter = {
|
|
|
62
62
|
return await collectSlackSecurityAuditFindings(params);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region extensions/slack/src/security-doctor.ts
|
|
66
67
|
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,}>)$/ });
|
|
67
68
|
function isSlackMutableAllowEntry(entry) {
|
|
68
69
|
if (/^team:/i.test(entry)) try {
|
|
@@ -71,7 +72,8 @@ function isSlackMutableAllowEntry(entry) {
|
|
|
71
72
|
} catch {}
|
|
72
73
|
return isSlackMutableUnqualifiedAllowEntry(entry);
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region extensions/slack/src/doctor.ts
|
|
75
77
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
76
78
|
channel: "slack",
|
|
77
79
|
detector: isSlackMutableAllowEntry,
|
|
@@ -200,7 +202,8 @@ const slackDoctor = {
|
|
|
200
202
|
collectPreviewWarnings: collectSlackUserIdentityWarnings,
|
|
201
203
|
collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
|
|
202
204
|
};
|
|
203
|
-
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region extensions/slack/src/shared.ts
|
|
204
207
|
const slackConfigAdapter = {
|
|
205
208
|
...slackBaseConfigAdapter,
|
|
206
209
|
inspectAccount: adaptScopedAccountAccessor(inspectSlackAccount)
|
|
@@ -252,4 +255,5 @@ const slackPluginBase = {
|
|
|
252
255
|
collectRuntimeConfigAssignments
|
|
253
256
|
}
|
|
254
257
|
};
|
|
258
|
+
//#endregion
|
|
255
259
|
export { slackPluginBase as n, slackSecurityAdapter as r, slackConfigAdapter as t };
|
package/dist/.setup/{slash-dispatch.runtime-Bf0r7kf2.mjs → slash-dispatch.runtime-D3Wq45ER.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies } from "./replies-
|
|
1
|
+
import { i as sanitizeSlackMonitorReplyPayload, r as deliverSlackSlashReplies } from "./replies-MRkrg3rC.mjs";
|
|
2
2
|
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
3
3
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
4
4
|
import { resolveConversationLabel } from "openclaw/plugin-sdk/conversation-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildMessagingTarget, ensureTargetId, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/channel-targets";
|
|
2
|
-
|
|
2
|
+
//#region extensions/slack/src/target-parsing.ts
|
|
3
3
|
const SLACK_CHANNEL_API_ID_RE = /^[CDG][0-9][A-Z0-9]{7,}$/i;
|
|
4
4
|
const SLACK_USER_API_ID_RE = /^[BUW][A-Z0-9]{8,}$/i;
|
|
5
5
|
const SLACK_QUALIFIED_TARGET_RE = /^team:([^:]+):(user|channel):([^:]+)$/i;
|
|
@@ -124,4 +124,5 @@ function looksLikeSlackTargetId(raw) {
|
|
|
124
124
|
const trimmed = raw.trim();
|
|
125
125
|
return /^<@([A-Z0-9]+)>$/i.test(trimmed) || /^(user|channel):/i.test(trimmed) || /^slack:/i.test(trimmed) || /^team:/i.test(trimmed) || /^[@#]/.test(trimmed) || /^[CUWGD][A-Z0-9]{8,}$/i.test(trimmed);
|
|
126
126
|
}
|
|
127
|
+
//#endregion
|
|
127
128
|
export { parseSlackTarget as a, slackTargetsMatch as c, normalizeSlackMessagingTarget as i, formatSlackTarget as n, resolveSlackChannelId as o, looksLikeSlackTargetId as r, resolveWorkspaceQualifiedSlackTarget as s, canonicalizeSlackApiTargetId as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as parseSlackTarget, c as slackTargetsMatch } from "./target-parsing-
|
|
2
|
-
|
|
1
|
+
import { a as parseSlackTarget, c as slackTargetsMatch } from "./target-parsing-FFE26kOV.mjs";
|
|
2
|
+
//#region extensions/slack/src/targets.ts
|
|
3
3
|
function matchesResolvedUserTarget(target, currentMessagingTarget) {
|
|
4
4
|
const resolvedId = target.trim();
|
|
5
5
|
if (!/^[UW][A-Z0-9]+$/i.test(resolvedId)) return false;
|
|
@@ -9,4 +9,5 @@ function matchesResolvedUserTarget(target, currentMessagingTarget) {
|
|
|
9
9
|
function slackContextTargetsMatch(target, context) {
|
|
10
10
|
return Boolean(context.currentMessagingTarget && (slackTargetsMatch(target, context.currentMessagingTarget) || matchesResolvedUserTarget(target, context.currentMessagingTarget)) || context.currentChannelId && slackTargetsMatch(target, context.currentChannelId));
|
|
11
11
|
}
|
|
12
|
+
//#endregion
|
|
12
13
|
export { slackContextTargetsMatch as t };
|