@openclaw/slack 2026.10.10-beta.4 → 2026.10.10
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-CmkKiSb9.mjs → account-inspect-Bc7TVU8F.mjs} +3 -4
- package/dist/.setup/{accounts-msihSF3-.mjs → accounts-CEgdyqoW.mjs} +6 -10
- package/dist/.setup/{action-runtime-CgYsBWl6.mjs → action-runtime-DPoxYao5.mjs} +9 -10
- package/dist/.setup/action-runtime.runtime-DWKWaKgC.mjs +1 -0
- package/dist/.setup/{actions-CafoV8hS.mjs → actions-PF2cP6to.mjs} +14 -22
- package/dist/.setup/{approval-handler.runtime-Pty8hAZ9.mjs → approval-handler.runtime-BtRklemy.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-DCnXFLf3.mjs → approval-message-updates-CpwbsEj6.mjs} +2 -3
- package/dist/.setup/{channel-B7jkkIen.mjs → channel-B6bRmYmX.mjs} +32 -39
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-BrbGGbzI.mjs → channel-type-Dh4vwh1Y.mjs} +5 -6
- package/dist/.setup/{channel.setup-u6QQdbTa.mjs → channel.setup-BBzT6uKA.mjs} +10 -14
- package/dist/.setup/{config-schema-DNnh6bWU.mjs → config-schema-Cz3uId-c.mjs} +2 -4
- package/dist/.setup/{directory-config-Cjj0N8R0.mjs → directory-config-BEPra1E2.mjs} +5 -6
- package/dist/.setup/{directory-live-BIKD-5B_.mjs → directory-live-BkUwPrS0.mjs} +4 -5
- package/dist/.setup/{doctor-contract-Cd4-VzIM.mjs → doctor-contract-HK8aedwU.mjs} +7 -13
- package/dist/.setup/http-GpAVKwSX.mjs +2 -0
- package/dist/.setup/{message-tool-api-BS5ekEA_.mjs → message-tool-api-DeiQJoRV.mjs} +5 -7
- package/dist/.setup/{monitor-B36YZetK.mjs → monitor-DsZUQtTM.mjs} +116 -147
- package/dist/.setup/{outbound-adapter-BlN9vmT-.mjs → outbound-adapter-C0R5jz6S.mjs} +8 -9
- package/dist/.setup/{pipeline.runtime-CT7Krkyw.mjs → pipeline.runtime-CIFVL0kf.mjs} +41 -68
- package/dist/.setup/{plugin-routes-D4qozHVn.mjs → plugin-routes-lXsy_bNV.mjs} +2 -3
- package/dist/.setup/{policy-D4eNyn8m.mjs → policy-Bp1FvE6m.mjs} +4 -6
- package/dist/.setup/{probe-IiHogLQN.mjs → probe-C5VWf3sz.mjs} +11 -19
- package/dist/.setup/{registry-DizWcnNp.mjs → registry-1G0f1zuZ.mjs} +2 -4
- package/dist/.setup/{relay-source-DCfb4yWT.mjs → relay-source-DFBDTA5Z.mjs} +4 -6
- package/dist/.setup/{replies-Dwwt4eVi.mjs → replies-7DRN46EL.mjs} +7 -9
- package/dist/.setup/{reply-blocks-CoZ_dGM_.mjs → reply-blocks-DOjiDr44.mjs} +4 -7
- package/dist/.setup/{resolve-channels-DRRhElwz.mjs → resolve-channels-BNQ1KZXh.mjs} +4 -5
- package/dist/.setup/{resolve-users-Cz8e17ky.mjs → resolve-users-C4dC8Z7D.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-DfQVi8Jw.mjs → scopes-C1aeCBa6.mjs} +2 -3
- package/dist/.setup/{secret-contract-B-Qm6aQQ.mjs → secret-contract-D0UY2JWF.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-DB6CMdgc.mjs → secret-contract-api-BhzGpUb0.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-pi6r24yv.mjs → send-C5uXkmZV.mjs} +14 -21
- package/dist/.setup/{send-results-eeOu_HYm.mjs → send-results-D-o6PgtS.mjs} +1 -2
- package/dist/.setup/{session-status-DQY4hZLd.mjs → session-status-CHkEn3HM.mjs} +39 -59
- package/dist/.setup/setup-plugin-api-D7DoueEh.mjs +2 -0
- package/dist/.setup/{setup-surface-9WVQgYCT.mjs → setup-surface-CtM1pm-9.mjs} +7 -8
- package/dist/.setup/{shared-DpHCoKy2.mjs → shared-CohTHxM1.mjs} +14 -18
- package/dist/.setup/{slash-dispatch.runtime-BDEJ2s49.mjs → slash-dispatch.runtime-Bnn9a5qB.mjs} +1 -1
- package/dist/.setup/{target-parsing-FFE26kOV.mjs → target-parsing-0pRZtahO.mjs} +1 -2
- package/dist/.setup/{targets-C6LZQL1Q.mjs → targets-BqXz7CpG.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/562d694877afe9d9dcbb3b32a8883c16974738f2aa892c48d45572cdc9a62529.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +17 -17
- 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/http-routes-api.js +1 -1
- package/dist/index.js +2 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +12 -12
- 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/node_modules/@slack/bolt/node_modules/body-parser/README.md +17 -13
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/read.js +74 -57
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/json.js +11 -11
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/types/urlencoded.js +5 -5
- package/node_modules/@slack/bolt/node_modules/body-parser/lib/utils.js +0 -15
- package/node_modules/@slack/bolt/node_modules/body-parser/package.json +7 -12
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +13 -6
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +46 -14
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +65 -28
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +7 -5
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +6 -1
- package/package.json +5 -5
- package/dist/.setup/action-runtime.runtime-WS3mGjut.mjs +0 -1
- package/dist/.setup/http-C9sM-FXe.mjs +0 -2
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-B18kDKtr.mjs +0 -2
|
@@ -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, l as fetchSlackChannelListPage, u as createSlackLookupClient } from "./probe-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
3
|
+
import { c as collectSlackCursorPages, l as fetchSlackChannelListPage, u as createSlackLookupClient } from "./probe-C5VWf3sz.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();
|
|
@@ -67,5 +67,4 @@ async function resolveSlackChannelAllowlist(params) {
|
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
//#endregion
|
|
71
70
|
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 { c as collectSlackCursorPages, u as createSlackLookupClient } from "./probe-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { s as resolveWorkspaceQualifiedSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
3
|
+
import { c as collectSlackCursorPages, u as createSlackLookupClient } from "./probe-C5VWf3sz.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();
|
|
@@ -81,5 +81,4 @@ async function resolveSlackUserAllowlist(params) {
|
|
|
81
81
|
return result;
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
//#endregion
|
|
85
84
|
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,6 +1,6 @@
|
|
|
1
|
-
import { d as createSlackReadClient, o as formatSlackError } from "./probe-
|
|
1
|
+
import { d as createSlackReadClient, o as formatSlackError } from "./probe-C5VWf3sz.mjs";
|
|
2
2
|
import { isRecord, normalizeOptionalString, normalizeTrimmedStringList, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
|
|
3
|
+
// 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,5 +58,4 @@ async function fetchSlackScopes(token, timeoutMs) {
|
|
|
58
58
|
error: errors.length > 0 ? errors.join(" | ") : "no scopes returned"
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
//#endregion
|
|
62
61
|
export { fetchSlackScopes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretContract, hasOwnProperty } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/slack/src/secret-contract.ts
|
|
3
3
|
const channelSecrets = createChannelSecretContract({
|
|
4
4
|
channelKey: "slack",
|
|
5
5
|
account: [
|
|
@@ -61,5 +61,4 @@ const channelSecrets = createChannelSecretContract({
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
64
|
-
//#endregion
|
|
65
64
|
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-D0UY2JWF.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 };
|
|
@@ -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-nwUcYXjP.mjs";
|
|
2
|
+
import { d as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-0pRZtahO.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-CHkEn3HM.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-C5VWf3sz.mjs";
|
|
6
|
+
import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
7
|
+
import { t as getOptionalSlackRuntime } from "./runtime-C6HKn7Av.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
|
+
// 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,8 +104,7 @@ function buildSlackNativeDataDeliveryPlan(params) {
|
|
|
104
104
|
skipOriginalBlocks: accessibilityText.length > SLACK_MESSAGE_TEXT_HARD_LIMIT
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
//#region extensions/slack/src/post-message-identity.ts
|
|
107
|
+
// extensions/slack/src/post-message-identity.ts
|
|
109
108
|
function buildSlackMessageIdentityPayload(identity) {
|
|
110
109
|
return {
|
|
111
110
|
...identity?.username ? { username: identity.username } : {},
|
|
@@ -151,8 +150,7 @@ async function postSlackMessageWithIdentityFallback(params) {
|
|
|
151
150
|
return post(basePayload);
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
|
-
|
|
155
|
-
//#region extensions/slack/src/post-message-payload.ts
|
|
153
|
+
// extensions/slack/src/post-message-payload.ts
|
|
156
154
|
function buildSlackPostMessagePayload(params) {
|
|
157
155
|
const threadPayload = params.replyBroadcast && params.threadTs ? {
|
|
158
156
|
thread_ts: params.threadTs,
|
|
@@ -169,8 +167,7 @@ function buildSlackPostMessagePayload(params) {
|
|
|
169
167
|
...typeof params.unfurl?.unfurlMedia === "boolean" ? { unfurl_media: params.unfurl.unfurlMedia } : {}
|
|
170
168
|
};
|
|
171
169
|
}
|
|
172
|
-
|
|
173
|
-
//#region extensions/slack/src/client-delivery.ts
|
|
170
|
+
// extensions/slack/src/client-delivery.ts
|
|
174
171
|
const SLACK_COMMERCIAL_API_HOSTNAME = "slack.com";
|
|
175
172
|
const SLACK_COMMERCIAL_UPLOAD_HOSTNAME = "files.slack.com";
|
|
176
173
|
const SLACK_GOV_API_HOSTNAME = "slack-gov.com";
|
|
@@ -379,8 +376,7 @@ async function uploadSlackFile(params) {
|
|
|
379
376
|
if (!completeResp.ok) throw new Error(`Failed to complete upload: ${completeResp.error ?? "unknown error"}`);
|
|
380
377
|
return uploadFileId;
|
|
381
378
|
}
|
|
382
|
-
|
|
383
|
-
//#region extensions/slack/src/sent-thread-cache.ts
|
|
379
|
+
// extensions/slack/src/sent-thread-cache.ts
|
|
384
380
|
/**
|
|
385
381
|
* Cache of Slack threads the bot has participated in.
|
|
386
382
|
* Used to auto-respond in threads without requiring @mention after the first reply.
|
|
@@ -456,8 +452,7 @@ function clearSlackThreadParticipationCache() {
|
|
|
456
452
|
threadParticipation.clearForTest();
|
|
457
453
|
threadFailureNotices.clear();
|
|
458
454
|
}
|
|
459
|
-
|
|
460
|
-
//#region extensions/slack/src/slack-dm-channel-cache.ts
|
|
455
|
+
// extensions/slack/src/slack-dm-channel-cache.ts
|
|
461
456
|
const SLACK_DM_CHANNEL_CACHE_MAX = 1024;
|
|
462
457
|
const slackDmChannelCaches = /* @__PURE__ */ new WeakMap();
|
|
463
458
|
function createSlackDmCacheKey(params) {
|
|
@@ -478,8 +473,7 @@ function cacheSlackDmChannelId(params, channelId) {
|
|
|
478
473
|
const key = createSlackDmCacheKey(params);
|
|
479
474
|
writeLruMapEntry(cache, key, channelId, SLACK_DM_CHANNEL_CACHE_MAX);
|
|
480
475
|
}
|
|
481
|
-
|
|
482
|
-
//#region extensions/slack/src/send.ts
|
|
476
|
+
// extensions/slack/src/send.ts
|
|
483
477
|
var send_exports = /* @__PURE__ */ __exportAll({
|
|
484
478
|
reconcileSlackUnknownSend: () => reconcileSlackUnknownSend,
|
|
485
479
|
resolveSlackDmChannelId: () => resolveSlackDmChannelId,
|
|
@@ -1125,5 +1119,4 @@ async function sendMessageSlackQueued(params) {
|
|
|
1125
1119
|
receipt: createSlackSendReceiptFromResults(deliveredResults, deliveredThreadTs)
|
|
1126
1120
|
};
|
|
1127
1121
|
}
|
|
1128
|
-
//#endregion
|
|
1129
1122
|
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
|
+
// 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,5 +19,4 @@ function mergeSlackSendResults(results) {
|
|
|
19
19
|
} } : {}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
//#endregion
|
|
23
22
|
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-35y0-Hso.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { a as parseSlackTarget, n as formatSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-0pRZtahO.mjs";
|
|
4
|
+
import { t as slackContextTargetsMatch } from "./targets-BqXz7CpG.mjs";
|
|
5
|
+
import { A as resolveSlackAllowListMatch, j as resolveSlackUserAllowListForTeam, o as formatSlackError } from "./probe-C5VWf3sz.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
|
+
// 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,8 +39,7 @@ function resolveSlackAutoThreadId(params) {
|
|
|
39
39
|
if (isSingleUseReplyToMode(context.replyToMode ?? "off") && context.hasRepliedRef?.value) return;
|
|
40
40
|
return context.currentThreadTs;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
//#region extensions/slack/src/approval-plugin-policy.ts
|
|
42
|
+
// extensions/slack/src/approval-plugin-policy.ts
|
|
44
43
|
/** Returns undefined only when Slack plugin approvals retain legacy account authorization. */
|
|
45
44
|
function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
46
45
|
const policy = cfg.approvals?.plugin?.slack;
|
|
@@ -57,8 +56,7 @@ function resolvePluginApprovalSlackApprovers(cfg, request) {
|
|
|
57
56
|
}
|
|
58
57
|
return plugin?.approvers ?? policy.approvers;
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
//#region extensions/slack/src/exec-approvals.ts
|
|
59
|
+
// extensions/slack/src/exec-approvals.ts
|
|
62
60
|
function normalizeSlackUserLikeId(value) {
|
|
63
61
|
const upper = value.toUpperCase();
|
|
64
62
|
return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
|
|
@@ -67,7 +65,7 @@ function normalizeSlackApproverTarget(value) {
|
|
|
67
65
|
const trimmed = normalizeStringifiedOptionalString(value);
|
|
68
66
|
if (!trimmed) return;
|
|
69
67
|
try {
|
|
70
|
-
const target = parseSlackTarget(trimmed, { defaultKind: "user" });
|
|
68
|
+
const target = parseSlackTarget(trimmed.replace(/^slack:/i, ""), { defaultKind: "user" });
|
|
71
69
|
const id = target?.kind === "user" ? normalizeSlackUserLikeId(target.id) : void 0;
|
|
72
70
|
return target?.teamId && id ? formatSlackTarget({
|
|
73
71
|
kind: "user",
|
|
@@ -105,8 +103,7 @@ const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnable
|
|
|
105
103
|
const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
|
|
106
104
|
const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
|
|
107
105
|
const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
|
|
108
|
-
|
|
109
|
-
//#region extensions/slack/src/installation-identity-state.ts
|
|
106
|
+
// extensions/slack/src/installation-identity-state.ts
|
|
110
107
|
const slackInstallationStates = resolveGlobalMap(Symbol.for("openclaw.slack.installation-identities"), "close-and-restart");
|
|
111
108
|
function registerSlackInstallationState(accountId, kind, teamId) {
|
|
112
109
|
const normalizedAccountId = normalizeAccountId(accountId);
|
|
@@ -139,8 +136,7 @@ function getSlackInstallationTeamId(accountId) {
|
|
|
139
136
|
function isSlackWorkspaceInstallation(accountId) {
|
|
140
137
|
return getSlackInstallationKind(accountId) === "workspace";
|
|
141
138
|
}
|
|
142
|
-
|
|
143
|
-
//#region extensions/slack/src/approval-auth.ts
|
|
139
|
+
// extensions/slack/src/approval-auth.ts
|
|
144
140
|
function resolveSlackApprovalInputs(params) {
|
|
145
141
|
const account = resolveSlackAccount(params).config;
|
|
146
142
|
return {
|
|
@@ -207,8 +203,7 @@ function getSlackApprovalApproversForTeam(params) {
|
|
|
207
203
|
function resolveSlackApprovalTeamId(params) {
|
|
208
204
|
return getSlackInstallationTeamId(resolveSlackAccount(params).accountId) ?? resolveSlackApprovalOriginTeamId(params.request);
|
|
209
205
|
}
|
|
210
|
-
|
|
211
|
-
//#region extensions/slack/src/approval-native-gates.ts
|
|
206
|
+
// extensions/slack/src/approval-native-gates.ts
|
|
212
207
|
function isSlackPluginApprovalRequest(request) {
|
|
213
208
|
return resolveApprovalKind(request) === "plugin";
|
|
214
209
|
}
|
|
@@ -419,8 +414,7 @@ async function shouldHandleSlackNativeApprovalRequest(params) {
|
|
|
419
414
|
approvalKind: "exec"
|
|
420
415
|
});
|
|
421
416
|
}
|
|
422
|
-
|
|
423
|
-
//#region extensions/slack/src/blocks-input.ts
|
|
417
|
+
// extensions/slack/src/blocks-input.ts
|
|
424
418
|
const SLACK_MAX_BLOCKS = 50;
|
|
425
419
|
function parseBlocksJson(raw) {
|
|
426
420
|
try {
|
|
@@ -471,8 +465,7 @@ const SLACK_PRESENTATION_CAPABILITIES = {
|
|
|
471
465
|
}
|
|
472
466
|
}
|
|
473
467
|
};
|
|
474
|
-
|
|
475
|
-
//#region extensions/slack/src/approval-actions.ts
|
|
468
|
+
// extensions/slack/src/approval-actions.ts
|
|
476
469
|
const SLACK_APPROVAL_VALUE_PREFIX = "openclaw:approval:v1:";
|
|
477
470
|
const SLACK_APPROVAL_HEADER_BLOCK_ID = "openclaw_approval_header";
|
|
478
471
|
function isApprovalDecision(value) {
|
|
@@ -509,13 +502,11 @@ function decodeSlackApprovalAction(value) {
|
|
|
509
502
|
return null;
|
|
510
503
|
}
|
|
511
504
|
}
|
|
512
|
-
|
|
513
|
-
//#region extensions/slack/src/monitor/mrkdwn.ts
|
|
505
|
+
// extensions/slack/src/monitor/mrkdwn.ts
|
|
514
506
|
function escapeSlackMrkdwn(value) {
|
|
515
507
|
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
516
508
|
}
|
|
517
|
-
|
|
518
|
-
//#region extensions/slack/src/presentation-fallback.ts
|
|
509
|
+
// extensions/slack/src/presentation-fallback.ts
|
|
519
510
|
const SLACK_UNCOPYABLE_COMMAND_WARNING = "not copyable: contains backtick";
|
|
520
511
|
function escapeSlackPresentationChartBlock(block) {
|
|
521
512
|
const escaped = {
|
|
@@ -595,8 +586,7 @@ function renderSlackMessagePresentationFallbackText(params) {
|
|
|
595
586
|
presentation
|
|
596
587
|
});
|
|
597
588
|
}
|
|
598
|
-
|
|
599
|
-
//#region extensions/slack/src/rich-text.ts
|
|
589
|
+
// extensions/slack/src/rich-text.ts
|
|
600
590
|
const RICH_TEXT_CONTAINER_TYPES = /* @__PURE__ */ new Set([
|
|
601
591
|
"rich_text_section",
|
|
602
592
|
"rich_text_preformatted",
|
|
@@ -632,13 +622,18 @@ function renderSlackRichText(value, mode, separator = "") {
|
|
|
632
622
|
const name = read(element.name);
|
|
633
623
|
return name ? `:${name}:` : "";
|
|
634
624
|
}
|
|
635
|
-
case "date":
|
|
625
|
+
case "date": {
|
|
626
|
+
const fallback = read(element.fallback);
|
|
627
|
+
if (fallback) return literal(fallback);
|
|
628
|
+
if (typeof element.timestamp !== "number") return "";
|
|
629
|
+
const date = /* @__PURE__ */ new Date(element.timestamp * 1e3);
|
|
630
|
+
return Number.isNaN(date.getTime()) ? "" : date.toISOString();
|
|
631
|
+
}
|
|
636
632
|
default: return "";
|
|
637
633
|
}
|
|
638
634
|
}).filter(Boolean).join(separator);
|
|
639
635
|
}
|
|
640
|
-
|
|
641
|
-
//#region extensions/slack/src/data-table.ts
|
|
636
|
+
// extensions/slack/src/data-table.ts
|
|
642
637
|
const SLACK_DATA_TABLE_COLUMNS_MAX = 20;
|
|
643
638
|
const SLACK_DATA_TABLE_ROWS_MAX = 100;
|
|
644
639
|
const SLACK_DATA_TABLE_AGGREGATE_CELL_CHARACTERS_MAX = 1e4;
|
|
@@ -778,8 +773,7 @@ function renderSlackDataTableCompactPlainTextFallback(value) {
|
|
|
778
773
|
...table.rows.map((row) => row.map(escapeCompactFallbackCell).join(" "))
|
|
779
774
|
].join("\n"));
|
|
780
775
|
}
|
|
781
|
-
|
|
782
|
-
//#region extensions/slack/src/data-visualization.ts
|
|
776
|
+
// extensions/slack/src/data-visualization.ts
|
|
783
777
|
const SLACK_CHART_TITLE_MAX = 50;
|
|
784
778
|
const SLACK_CHART_LABEL_MAX = 20;
|
|
785
779
|
const SLACK_CHART_AXIS_LABEL_MAX = 50;
|
|
@@ -890,8 +884,7 @@ function renderSlackDataVisualizationFallbackText(value, mrkdwnSafe = false) {
|
|
|
890
884
|
const title = typeof block.title === "string" ? block.title.trim() : "";
|
|
891
885
|
return title ? mrkdwnSafe ? escapeSlackMrkdwn(title) : title : void 0;
|
|
892
886
|
}
|
|
893
|
-
|
|
894
|
-
//#region extensions/slack/src/format.ts
|
|
887
|
+
// extensions/slack/src/format.ts
|
|
895
888
|
const SLACK_ANGLE_TOKEN_RE = /<[^>\n]+>/g;
|
|
896
889
|
function isAllowedSlackAngleToken(token) {
|
|
897
890
|
const inner = token.slice(1, -1);
|
|
@@ -1221,8 +1214,7 @@ function markdownToSlackMrkdwnChunks(markdown, limit, options = {}) {
|
|
|
1221
1214
|
measureRendered: (rendered) => rendered.length
|
|
1222
1215
|
}).map(({ rendered }) => rendered.length > normalizedLimit ? protectSlackAssistantTranscriptRoleHeaders(rendered) : rendered);
|
|
1223
1216
|
}
|
|
1224
|
-
|
|
1225
|
-
//#region extensions/slack/src/question-actions.ts
|
|
1217
|
+
// extensions/slack/src/question-actions.ts
|
|
1226
1218
|
const SLACK_QUESTION_VALUE_PREFIX = "slq1:";
|
|
1227
1219
|
const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
|
|
1228
1220
|
function encodeSlackQuestionAction(action) {
|
|
@@ -1253,8 +1245,7 @@ async function resolveSlackQuestionAction(params) {
|
|
|
1253
1245
|
}
|
|
1254
1246
|
await params.respond(result.status === "answered" ? "Answer submitted." : "This question was already answered.").catch(() => {});
|
|
1255
1247
|
}
|
|
1256
|
-
|
|
1257
|
-
//#region extensions/slack/src/reply-action-ids.ts
|
|
1248
|
+
// extensions/slack/src/reply-action-ids.ts
|
|
1258
1249
|
const SLACK_REPLY_BUTTON_ACTION_ID = "openclaw:reply_button";
|
|
1259
1250
|
const SLACK_REPLY_LINK_ACTION_ID = "openclaw:reply_link";
|
|
1260
1251
|
const SLACK_SESSION_LINK_ACTION_ID = "openclaw:session_link";
|
|
@@ -1285,8 +1276,7 @@ function resolveSlackQuestionActionIds(blocks) {
|
|
|
1285
1276
|
return (block.elements ?? []).flatMap(({ action_id }) => action_id && isSlackQuestionActionId(action_id) ? [action_id] : []);
|
|
1286
1277
|
});
|
|
1287
1278
|
}
|
|
1288
|
-
|
|
1289
|
-
//#region extensions/slack/src/truncate.ts
|
|
1279
|
+
// extensions/slack/src/truncate.ts
|
|
1290
1280
|
function truncateSlackText(value, max, whitespace = "trim") {
|
|
1291
1281
|
const text = whitespace === "preserve" ? value : value.trim();
|
|
1292
1282
|
if (text.length <= max) return text;
|
|
@@ -1314,14 +1304,12 @@ function truncateSlackTextByUtf8Bytes(value, maxBytes) {
|
|
|
1314
1304
|
}
|
|
1315
1305
|
return maxBytes >= suffixBytes ? `${prefix}${suffix}` : prefix;
|
|
1316
1306
|
}
|
|
1317
|
-
|
|
1318
|
-
//#region extensions/slack/src/limits.ts
|
|
1307
|
+
// extensions/slack/src/limits.ts
|
|
1319
1308
|
const SLACK_TEXT_LIMIT = 8e3;
|
|
1320
1309
|
const SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT = 4e3;
|
|
1321
1310
|
const SLACK_EDIT_TEXT_MAX_BYTES = 4e3;
|
|
1322
1311
|
const SLACK_MESSAGE_TEXT_HARD_LIMIT = 4e4;
|
|
1323
|
-
|
|
1324
|
-
//#region extensions/slack/src/blocks-fallback.ts
|
|
1312
|
+
// extensions/slack/src/blocks-fallback.ts
|
|
1325
1313
|
const SLACK_SELECT_ELEMENT_TYPES = /* @__PURE__ */ new Set([
|
|
1326
1314
|
"static_select",
|
|
1327
1315
|
"multi_static_select",
|
|
@@ -1398,8 +1386,7 @@ function buildSlackBlocksFallbackText(blocks) {
|
|
|
1398
1386
|
function buildSlackCompleteBlocksFallbackText(blocks, options = {}) {
|
|
1399
1387
|
return blocks.map((block) => renderSlackBlockFallbackText(block, options)).filter(Boolean).join("\n\n").trim() || buildSlackBlocksFallbackText(blocks);
|
|
1400
1388
|
}
|
|
1401
|
-
|
|
1402
|
-
//#region extensions/slack/src/native-data-blocks.ts
|
|
1389
|
+
// extensions/slack/src/native-data-blocks.ts
|
|
1403
1390
|
const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
|
|
1404
1391
|
const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16384;
|
|
1405
1392
|
const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
|
|
@@ -1502,14 +1489,12 @@ function appendSlackNativeDataFallbackText(text, blocks) {
|
|
|
1502
1489
|
function appendSlackNativeDataPlainTextFallback(text, blocks) {
|
|
1503
1490
|
return appendSlackBlockFallback(text.trim(), blocks, renderSlackNativeDataPlainTextBlock);
|
|
1504
1491
|
}
|
|
1505
|
-
|
|
1506
|
-
//#region extensions/slack/src/detached-target-admission.ts
|
|
1492
|
+
// extensions/slack/src/detached-target-admission.ts
|
|
1507
1493
|
function assertSlackDetachedTargetAllowed(accountId, teamId) {
|
|
1508
1494
|
const installationKind = getSlackInstallationKind(accountId);
|
|
1509
1495
|
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");
|
|
1510
1496
|
}
|
|
1511
|
-
|
|
1512
|
-
//#region extensions/slack/src/conversation-binding-route.ts
|
|
1497
|
+
// extensions/slack/src/conversation-binding-route.ts
|
|
1513
1498
|
const slackRouteBindingConfigCache = /* @__PURE__ */ new WeakMap();
|
|
1514
1499
|
function normalizeSlackRouteBindingPeer(peer) {
|
|
1515
1500
|
const rawId = peer.id.trim();
|
|
@@ -1646,8 +1631,7 @@ function applySlackConfiguredBindingRoute(params, runtimeRoute) {
|
|
|
1646
1631
|
route: runtimeRoute.boundSessionKey ? runtimeRoute.route : configuredRoute?.route ?? runtimeRoute.route
|
|
1647
1632
|
};
|
|
1648
1633
|
}
|
|
1649
|
-
|
|
1650
|
-
//#region extensions/slack/src/monitor/workspace-routing.ts
|
|
1634
|
+
// extensions/slack/src/monitor/workspace-routing.ts
|
|
1651
1635
|
function resolveSlackAgentRoute(params) {
|
|
1652
1636
|
const route = resolveAgentRoute({
|
|
1653
1637
|
cfg: params.cfg,
|
|
@@ -1681,8 +1665,7 @@ function qualifySlackRoutePeerId(params) {
|
|
|
1681
1665
|
function qualifySlackConversationId(conversationId, eventScope) {
|
|
1682
1666
|
return eventScope ? `team:${encodeURIComponent(eventScope.teamId)}:${conversationId}` : conversationId;
|
|
1683
1667
|
}
|
|
1684
|
-
|
|
1685
|
-
//#region extensions/slack/src/channel-policy-state.ts
|
|
1668
|
+
// extensions/slack/src/channel-policy-state.ts
|
|
1686
1669
|
const slackChannelPolicyBindings = resolveGlobalMap(Symbol.for("openclaw.slack.channel-policy-bindings"), "close-and-restart");
|
|
1687
1670
|
function setSlackChannelPolicyBindings(accountId, bindings) {
|
|
1688
1671
|
slackChannelPolicyBindings.set(normalizeAccountId(accountId), new Map([...bindings].map(([key, id]) => [key, id.toUpperCase()])));
|
|
@@ -1692,8 +1675,7 @@ function getSlackChannelPolicyKeys(accountId, channelId) {
|
|
|
1692
1675
|
if (!id) return [];
|
|
1693
1676
|
return [...slackChannelPolicyBindings.get(normalizeAccountId(accountId)) ?? []].filter(([, resolvedId]) => resolvedId === id).map(([key]) => key);
|
|
1694
1677
|
}
|
|
1695
|
-
|
|
1696
|
-
//#region extensions/slack/src/group-policy.ts
|
|
1678
|
+
// extensions/slack/src/group-policy.ts
|
|
1697
1679
|
function buildSlackChannelIdCandidates(channelId, teamId, options) {
|
|
1698
1680
|
const trimmedId = channelId?.trim();
|
|
1699
1681
|
if (!trimmedId) return [];
|
|
@@ -1745,8 +1727,7 @@ function resolveSlackGroupToolPolicy(params) {
|
|
|
1745
1727
|
senderE164: params.senderE164
|
|
1746
1728
|
});
|
|
1747
1729
|
}
|
|
1748
|
-
|
|
1749
|
-
//#region extensions/slack/src/session-status.ts
|
|
1730
|
+
// extensions/slack/src/session-status.ts
|
|
1750
1731
|
const MISSING_STOP_SUBSCRIPTION = "missing_agent_session_stopped_event_subscription";
|
|
1751
1732
|
let warnedMissingStopSubscription = false;
|
|
1752
1733
|
async function setSlackSessionStatus(params) {
|
|
@@ -1787,5 +1768,4 @@ async function renameSlackSession(params) {
|
|
|
1787
1768
|
return false;
|
|
1788
1769
|
}
|
|
1789
1770
|
}
|
|
1790
|
-
//#endregion
|
|
1791
1771
|
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-CEgdyqoW.mjs";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-Bc7TVU8F.mjs";
|
|
3
|
+
import "./shared-CohTHxM1.mjs";
|
|
4
|
+
import { a as buildSlackAllowFromPrompt, i as SLACK_CHANNEL, n as createSlackSetupWizardBase } from "./channel.setup-BBzT6uKA.mjs";
|
|
5
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-BNQ1KZXh.mjs";
|
|
6
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-C4dC8Z7D.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
|
+
// 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,5 +109,4 @@ const slackSetupWizard = createSlackSetupWizardBase({
|
|
|
109
109
|
},
|
|
110
110
|
resolveGroupAllowlist: resolveSlackGroupAllowlist
|
|
111
111
|
});
|
|
112
|
-
//#endregion
|
|
113
112
|
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-35y0-Hso.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-Bc7TVU8F.mjs";
|
|
4
|
+
import { a as parseSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
5
|
+
import { a as slackIngressIdentity, t as probeSlack } from "./probe-C5VWf3sz.mjs";
|
|
6
|
+
import { n as SLACK_CHANNEL_META } from "./channel-meta-C5vsCo3a.mjs";
|
|
7
|
+
import { r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-BBzT6uKA.mjs";
|
|
8
|
+
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-HK8aedwU.mjs";
|
|
9
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-D0UY2JWF.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
|
+
// 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-C3hXCfDt.mjs").then((n) => n.n));
|
|
57
57
|
const slackSecurityAdapter = {
|
|
58
58
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
59
59
|
collectWarnings: collectSlackSecurityFindings,
|
|
@@ -62,8 +62,7 @@ const slackSecurityAdapter = {
|
|
|
62
62
|
return await collectSlackSecurityAuditFindings(params);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
//#region extensions/slack/src/security-doctor.ts
|
|
65
|
+
// extensions/slack/src/security-doctor.ts
|
|
67
66
|
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,}>)$/ });
|
|
68
67
|
function isSlackMutableAllowEntry(entry) {
|
|
69
68
|
if (/^team:/i.test(entry)) try {
|
|
@@ -72,8 +71,7 @@ function isSlackMutableAllowEntry(entry) {
|
|
|
72
71
|
} catch {}
|
|
73
72
|
return isSlackMutableUnqualifiedAllowEntry(entry);
|
|
74
73
|
}
|
|
75
|
-
|
|
76
|
-
//#region extensions/slack/src/doctor.ts
|
|
74
|
+
// extensions/slack/src/doctor.ts
|
|
77
75
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
78
76
|
channel: "slack",
|
|
79
77
|
detector: isSlackMutableAllowEntry,
|
|
@@ -202,8 +200,7 @@ const slackDoctor = {
|
|
|
202
200
|
collectPreviewWarnings: collectSlackUserIdentityWarnings,
|
|
203
201
|
collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
|
|
204
202
|
};
|
|
205
|
-
|
|
206
|
-
//#region extensions/slack/src/shared.ts
|
|
203
|
+
// extensions/slack/src/shared.ts
|
|
207
204
|
const slackConfigAdapter = {
|
|
208
205
|
...slackBaseConfigAdapter,
|
|
209
206
|
inspectAccount: adaptScopedAccountAccessor(inspectSlackAccount)
|
|
@@ -255,5 +252,4 @@ const slackPluginBase = {
|
|
|
255
252
|
collectRuntimeConfigAssignments
|
|
256
253
|
}
|
|
257
254
|
};
|
|
258
|
-
//#endregion
|
|
259
255
|
export { slackPluginBase as n, slackSecurityAdapter as r, slackConfigAdapter as t };
|
package/dist/.setup/{slash-dispatch.runtime-BDEJ2s49.mjs → slash-dispatch.runtime-Bnn9a5qB.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-7DRN46EL.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";
|