@openclaw/slack 2026.7.2-beta.3 → 2026.7.2-beta.4
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/account-inspect-api.js +1 -1
- package/dist/{account-inspect-Bvbtu3iH.js → account-inspect-jn1xLaVi.js} +2 -2
- package/dist/account-reply-mode-DrUXogvO.js +14 -0
- package/dist/{accounts-DQEbYKh9.js → accounts-BSr252c_.js} +6 -27
- package/dist/{accounts.runtime-BIKmJdtJ.js → accounts.runtime-CjULMLTa.js} +1 -1
- package/dist/{action-runtime-DqkRwO3Z.js → action-runtime-CFU52n4W.js} +7 -7
- package/dist/action-runtime.runtime-9-17zvKH.js +2 -0
- package/dist/{actions-CF0tUY5q.js → actions-D51foiwR.js} +5 -5
- package/dist/{actions.runtime-hCbx4RXg.js → actions.runtime-BMJwtf5C.js} +1 -1
- package/dist/api.js +15 -14
- package/dist/{approval-handler.runtime-Em8I1-8-.js → approval-handler.runtime-3b4-wxMl.js} +2 -2
- package/dist/{channel-4-TRi1D6.js → channel-Ds8NKvfr.js} +26 -24
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-Cu1yjNg2.js → channel-type-DXkUajFP.js} +3 -3
- package/dist/{channel.setup-CgkADtZg.js → channel.setup-DOSTEDfA.js} +6 -5
- package/dist/{config-schema-XjJGfwQC.js → config-schema-B4j4tCOI.js} +231 -26
- package/dist/{directory-config-Bv0lcUlH.js → directory-config-B08pm5ZT.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CzUIB7th.js → directory-live-DpPKzPrn.js} +2 -2
- package/dist/{doctor-contract-DKpe5VBr.js → doctor-contract-U6oVntbM.js} +60 -89
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-Bw-65m3V.js → group-policy-CdnQzQBI.js} +32 -5
- package/dist/{interactive-replies-Dm_t2R9S.js → interactive-replies-C3ffk6oN.js} +1 -1
- package/dist/interactive-replies-api.js +1 -1
- package/dist/{message-tool-api-C2pcf5du.js → message-tool-api-ByVyIVOh.js} +2 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CNFeF30h.js → monitor-CnB_WKvF.js} +3 -3
- package/dist/{outbound-adapter-CVi2uok0.js → outbound-adapter-DuPz2HHt.js} +3 -3
- package/dist/{pipeline.runtime-CTvokbty.js → pipeline.runtime-5rRYZuX5.js} +110 -77
- package/dist/{policy-b_dOPDCq.js → policy-C31RYSuT.js} +1 -1
- package/dist/{probe-Borhn9PQ.js → probe-CVRuArHA.js} +1 -1
- package/dist/{provider-B-HVL5ZE.js → provider-htuIJGFD.js} +365 -200
- package/dist/{relay-source-Ea_P9VcO.js → relay-source-Df9EaiTF.js} +1 -1
- package/dist/{replies-B4bOdrYb.js → replies-Cgr2Gli4.js} +3 -3
- package/dist/{resolve-channels-KTc568SU.js → resolve-channels-DodP2TFx.js} +1 -1
- package/dist/{resolve-users-DeGJf1yp.js → resolve-users-M9eF8891.js} +1 -1
- package/dist/{runtime-api-BFfNpzDe.js → runtime-api-D5XYMMsf.js} +3 -2
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-lx08L56K.js → scopes-CJRpHkDC.js} +1 -1
- package/dist/{security-audit-CikQhBUY.js → security-audit-Cz6erklv.js} +0 -10
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-KuTDky7i.js → send-BZ1tPv7-.js} +4 -4
- package/dist/{send.runtime-CXyxws1D.js → send.runtime-a2pilFor.js} +1 -1
- package/dist/{setup-core-CeiAVwQ3.js → setup-core-tPxMuFez.js} +138 -40
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DLA0vHXp.js → setup-surface-wV-S1dE_.js} +43 -27
- package/dist/{shared-C4yVB0Q-.js → shared-BfMskaMx.js} +9 -8
- package/dist/{slash-dispatch.runtime-BT-mMm-f.js → slash-dispatch.runtime-lfeIsXTX.js} +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +16 -6
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/agent-base/README.md +145 -0
- package/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/agent-base/package.json +64 -0
- package/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/CHANGELOG.md +197 -1
- package/node_modules/axios/README.md +424 -256
- package/node_modules/axios/dist/axios.js +589 -204
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +630 -185
- package/node_modules/axios/dist/esm/axios.js +630 -185
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +949 -301
- package/node_modules/axios/index.d.cts +28 -5
- package/node_modules/axios/index.d.ts +24 -3
- package/node_modules/axios/lib/adapters/adapters.js +1 -1
- package/node_modules/axios/lib/adapters/fetch.js +223 -49
- package/node_modules/axios/lib/adapters/http.js +408 -193
- package/node_modules/axios/lib/adapters/xhr.js +3 -1
- package/node_modules/axios/lib/core/Axios.js +4 -2
- package/node_modules/axios/lib/core/AxiosError.js +13 -1
- package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
- package/node_modules/axios/lib/core/buildFullPath.js +29 -1
- package/node_modules/axios/lib/core/mergeConfig.js +35 -0
- package/node_modules/axios/lib/defaults/transitional.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -3
- package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
- package/node_modules/axios/lib/helpers/buildURL.js +7 -4
- package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
- package/node_modules/axios/lib/helpers/cookies.js +5 -1
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
- package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
- package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
- package/node_modules/axios/lib/helpers/fromDataURI.js +20 -5
- package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +26 -13
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
- package/node_modules/axios/lib/helpers/toFormData.js +48 -12
- package/node_modules/axios/lib/helpers/validator.js +1 -1
- package/node_modules/axios/lib/utils.js +105 -19
- package/node_modules/axios/package.json +31 -13
- package/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
- package/node_modules/iconv-lite/encodings/utf32.js +10 -3
- package/node_modules/iconv-lite/package.json +2 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.js +135 -158
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/CHANGELOG.md +11 -0
- package/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/qs/lib/parse.js +19 -8
- package/node_modules/qs/lib/utils.js +47 -8
- package/node_modules/qs/package.json +6 -5
- package/node_modules/qs/test/parse.js +230 -0
- package/node_modules/qs/test/utils.js +194 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/npm-shrinkwrap.json +54 -27
- package/openclaw.plugin.json +1759 -1908
- package/package.json +92 -14
- package/dist/action-runtime.runtime-DEWOcFM4.js +0 -2
- package/dist/config-api-Df9a1B8C.js +0 -3
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { t as inspectSlackAccount } from "./account-inspect-jn1xLaVi.js";
|
|
2
2
|
//#region extensions/slack/account-inspect-api.ts
|
|
3
3
|
function inspectSlackReadOnlyAccount(cfg, accountId) {
|
|
4
4
|
return inspectSlackAccount({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-
|
|
1
|
+
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-BSr252c_.js";
|
|
2
2
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
3
3
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
4
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -25,7 +25,7 @@ function inspectSlackAccount(params) {
|
|
|
25
25
|
const enabled = params.cfg.channels?.slack?.enabled !== false && merged.enabled !== false;
|
|
26
26
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
27
27
|
const mode = merged.mode ?? "socket";
|
|
28
|
-
const identity = merged.
|
|
28
|
+
const identity = merged.postAs ?? "bot";
|
|
29
29
|
const isHttpMode = mode === "http";
|
|
30
30
|
const isRelayMode = mode === "relay";
|
|
31
31
|
const configBot = inspectSlackToken(merged.botToken);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region extensions/slack/src/account-reply-mode.ts
|
|
2
|
+
function normalizeSlackChatType(raw) {
|
|
3
|
+
const value = raw?.trim().toLowerCase();
|
|
4
|
+
if (!value) return;
|
|
5
|
+
if (value === "direct" || value === "dm") return "direct";
|
|
6
|
+
if (value === "group" || value === "channel") return value;
|
|
7
|
+
}
|
|
8
|
+
function resolveSlackReplyToMode(account, chatType) {
|
|
9
|
+
const normalized = normalizeSlackChatType(chatType ?? void 0);
|
|
10
|
+
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
11
|
+
return account.replyToMode ?? "off";
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolveSlackReplyToMode as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, hasConfiguredAccountValue, normalizeAccountId, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
2
2
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
|
-
import { mapAllowFromEntries, normalizeChannelDmPolicy
|
|
4
|
+
import { mapAllowFromEntries, normalizeChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
//#region extensions/slack/src/token.ts
|
|
7
7
|
function formatSlackBotTokenIdentityWarning(params) {
|
|
@@ -30,20 +30,6 @@ function resolveSlackUserToken(raw, path = "channels.slack.userToken") {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region extensions/slack/src/account-reply-mode.ts
|
|
34
|
-
function normalizeSlackChatType(raw) {
|
|
35
|
-
const value = raw?.trim().toLowerCase();
|
|
36
|
-
if (!value) return;
|
|
37
|
-
if (value === "direct" || value === "dm") return "direct";
|
|
38
|
-
if (value === "group" || value === "channel") return value;
|
|
39
|
-
}
|
|
40
|
-
function resolveSlackReplyToMode(account, chatType) {
|
|
41
|
-
const normalized = normalizeSlackChatType(chatType ?? void 0);
|
|
42
|
-
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
43
|
-
if (normalized === "direct" && account.dm?.replyToMode !== void 0) return account.dm.replyToMode;
|
|
44
|
-
return account.replyToMode ?? "off";
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
33
|
//#region extensions/slack/src/accounts.ts
|
|
48
34
|
function resolveSlackOperationToken(account, operation) {
|
|
49
35
|
if (account.identity === "user") return normalizeOptionalString(account.userToken);
|
|
@@ -54,7 +40,7 @@ function resolveSlackOperationToken(account, operation) {
|
|
|
54
40
|
}
|
|
55
41
|
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("slack", { hasImplicitDefaultAccount: (cfg) => {
|
|
56
42
|
const slack = cfg.channels?.slack;
|
|
57
|
-
if (slack?.
|
|
43
|
+
if (slack?.postAs === "user") {
|
|
58
44
|
if (!(hasConfiguredAccountValue(slack.userToken) || hasConfiguredAccountValue(process.env.SLACK_USER_TOKEN))) return false;
|
|
59
45
|
if (slack.mode === "http") return hasConfiguredAccountValue(slack.signingSecret);
|
|
60
46
|
if (slack.mode === "relay") return hasConfiguredAccountValue(slack.relay?.url) && hasConfiguredAccountValue(slack.relay?.authToken) && hasConfiguredAccountValue(slack.relay?.gatewayId);
|
|
@@ -123,10 +109,7 @@ function resolveSlackAccountAllowFrom(params) {
|
|
|
123
109
|
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
124
110
|
const accountConfig = resolveSlackAccountConfig(params.cfg, accountId);
|
|
125
111
|
const rootConfig = params.cfg.channels?.slack;
|
|
126
|
-
const allowFrom =
|
|
127
|
-
account: accountConfig,
|
|
128
|
-
parent: rootConfig
|
|
129
|
-
});
|
|
112
|
+
const allowFrom = accountConfig?.allowFrom ?? rootConfig?.allowFrom;
|
|
130
113
|
return allowFrom ? mapAllowFromEntries(allowFrom) : void 0;
|
|
131
114
|
}
|
|
132
115
|
function resolveSlackConfigAccessorAccount(params) {
|
|
@@ -144,17 +127,13 @@ function resolveSlackAccountDmPolicy(params) {
|
|
|
144
127
|
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
145
128
|
const accountConfig = resolveSlackAccountConfig(params.cfg, accountId);
|
|
146
129
|
const rootConfig = params.cfg.channels?.slack;
|
|
147
|
-
return normalizeChannelDmPolicy(
|
|
148
|
-
account: accountConfig,
|
|
149
|
-
parent: rootConfig,
|
|
150
|
-
defaultPolicy: "pairing"
|
|
151
|
-
}));
|
|
130
|
+
return normalizeChannelDmPolicy(accountConfig?.dmPolicy ?? rootConfig?.dmPolicy ?? "pairing");
|
|
152
131
|
}
|
|
153
132
|
function resolveSlackAccount(params) {
|
|
154
133
|
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
155
134
|
const baseEnabled = params.cfg.channels?.slack?.enabled !== false;
|
|
156
135
|
const merged = mergeSlackAccountConfig(params.cfg, accountId);
|
|
157
|
-
const identity = merged.
|
|
136
|
+
const identity = merged.postAs ?? "bot";
|
|
158
137
|
const accountEnabled = merged.enabled !== false;
|
|
159
138
|
const enabled = baseEnabled && accountEnabled;
|
|
160
139
|
const mode = merged.mode ?? "socket";
|
|
@@ -206,4 +185,4 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
206
185
|
})).filter((account) => account.enabled);
|
|
207
186
|
}
|
|
208
187
|
//#endregion
|
|
209
|
-
export { resolveSlackAccount as a, resolveSlackConfigAccessorAccount as c,
|
|
188
|
+
export { resolveSlackAccount as a, resolveSlackConfigAccessorAccount as c, resolveSlackAppToken as d, resolveSlackBotToken as f, resolveDefaultSlackAccountId as i, resolveSlackOperationToken as l, listSlackAccountIds as n, resolveSlackAccountAllowFrom as o, mergeSlackAccountConfig as r, resolveSlackAccountDmPolicy as s, listEnabledSlackAccounts as t, formatSlackBotTokenIdentityWarning as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, l as resolveSlackOperationToken, o as resolveSlackAccountAllowFrom } from "./accounts-
|
|
1
|
+
import { a as resolveSlackAccount, l as resolveSlackOperationToken, o as resolveSlackAccountAllowFrom } from "./accounts-BSr252c_.js";
|
|
2
2
|
export { resolveSlackAccount, resolveSlackAccountAllowFrom, resolveSlackOperationToken };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as resolveSlackChannelId, i as parseSlackTarget } from "./target-parsing-N6lHogYZ.js";
|
|
2
2
|
import { t as slackContextTargetsMatch } from "./targets-KmjP2E8s.js";
|
|
3
|
-
import { $ as parseSlackBlocksInput, C as hasSlackNativeDataBlock } from "./group-policy-
|
|
4
|
-
import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-
|
|
5
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
3
|
+
import { $ as parseSlackBlocksInput, C as hasSlackNativeDataBlock } from "./group-policy-CdnQzQBI.js";
|
|
4
|
+
import { a as readPositiveIntegerParam, c as withNormalizedTimestamp, n as imageResultFromFile, o as readReactionParams, r as jsonResult, s as readStringParam, t as createActionGate } from "./runtime-api-D5XYMMsf.js";
|
|
5
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-C31RYSuT.js";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -24,9 +24,9 @@ const pinActions = /* @__PURE__ */ new Set([
|
|
|
24
24
|
"unpinMessage",
|
|
25
25
|
"listPins"
|
|
26
26
|
]);
|
|
27
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions.runtime-
|
|
28
|
-
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts.runtime-
|
|
29
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
27
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions.runtime-BMJwtf5C.js"));
|
|
28
|
+
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts.runtime-CjULMLTa.js"));
|
|
29
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-DXkUajFP.js").then((n) => n.t));
|
|
30
30
|
function createLazySlackAction(key) {
|
|
31
31
|
return (async (...args) => {
|
|
32
32
|
const action = (await loadSlackActionsRuntime())[key];
|
|
@@ -90,7 +90,7 @@ function hasPotentialSlackNamedPolicy(params) {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
function resolveSlackDmReadAllowed(account) {
|
|
93
|
-
const dmPolicy = account.config.dmPolicy ??
|
|
93
|
+
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
94
94
|
return account.config.dm?.enabled !== false && dmPolicy !== "disabled";
|
|
95
95
|
}
|
|
96
96
|
function normalizeConfiguredSlackDmUserId(value) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount,
|
|
3
|
-
import { A as buildSlackCompleteBlocksFallbackText, C as hasSlackNativeDataBlock, N as SLACK_EDIT_TEXT_LIMIT, T as stripSlackNativeDataBlocks, Y as escapeSlackMrkdwn, b as appendSlackNativeDataPlainTextFallback, et as validateSlackBlocksArray, j as renderSlackBlockFallbackText, k as buildSlackBlocksFallbackText, w as isSlackInvalidBlocksError, y as appendSlackNativeDataFallbackText, z as truncateSlackText } from "./group-policy-
|
|
4
|
-
import { a as createSlackLookupClient, d as getSlackWriteClient } from "./probe-
|
|
5
|
-
import { r as sendMessageSlack, u as buildSlackNativeDataDeliveryPlan } from "./send-
|
|
2
|
+
import { a as resolveSlackAccount, f as resolveSlackBotToken } from "./accounts-BSr252c_.js";
|
|
3
|
+
import { A as buildSlackCompleteBlocksFallbackText, C as hasSlackNativeDataBlock, N as SLACK_EDIT_TEXT_LIMIT, T as stripSlackNativeDataBlocks, Y as escapeSlackMrkdwn, b as appendSlackNativeDataPlainTextFallback, et as validateSlackBlocksArray, j as renderSlackBlockFallbackText, k as buildSlackBlocksFallbackText, w as isSlackInvalidBlocksError, y as appendSlackNativeDataFallbackText, z as truncateSlackText } from "./group-policy-CdnQzQBI.js";
|
|
4
|
+
import { a as createSlackLookupClient, d as getSlackWriteClient } from "./probe-CVRuArHA.js";
|
|
5
|
+
import { r as sendMessageSlack, u as buildSlackNativeDataDeliveryPlan } from "./send-BZ1tPv7-.js";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { logVerbose, logVerbose as logVerbose$1 } from "openclaw/plugin-sdk/runtime-env";
|
|
8
8
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
9
|
-
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
10
9
|
import { z } from "zod";
|
|
10
|
+
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
13
13
|
import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, p as resolveSlackConversationName, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
1
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, p as resolveSlackConversationName, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-D51foiwR.js";
|
|
2
2
|
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, resolveSlackConversationName, sendSlackMessage, unpinSlackMessage };
|
package/dist/api.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath, t as handleSlackHttpRequest } from "./registry-bbjH7IHX.js";
|
|
2
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts
|
|
3
|
-
import { t as
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, r as mergeSlackAccountConfig, t as listEnabledSlackAccounts } from "./accounts-BSr252c_.js";
|
|
3
|
+
import { t as resolveSlackReplyToMode } from "./account-reply-mode-DrUXogvO.js";
|
|
4
|
+
import { t as inspectSlackAccount } from "./account-inspect-jn1xLaVi.js";
|
|
4
5
|
import { a as resolveSlackChannelId, i as parseSlackTarget, n as looksLikeSlackTargetId, r as normalizeSlackMessagingTarget } from "./target-parsing-N6lHogYZ.js";
|
|
5
6
|
import "./targets-KmjP2E8s.js";
|
|
6
|
-
import { n as buildSlackThreadingToolContext, r as resolveSlackAutoThreadId, t as slackPlugin } from "./channel-
|
|
7
|
-
import { $ as parseSlackBlocksInput, I as buildSlackInteractiveBlocks, L as buildSlackPresentationBlocks, Q as SLACK_MAX_BLOCKS, a as allowListMatches, c as normalizeSlackAllowOwnerEntry, d as resolveSlackUserAllowed, et as validateSlackBlocksArray, l as normalizeSlackSlug, n as resolveSlackGroupRequireMention, o as normalizeAllowList, r as resolveSlackGroupToolPolicy, s as normalizeAllowListLower, u as resolveSlackAllowListMatch } from "./group-policy-
|
|
8
|
-
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-
|
|
9
|
-
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
10
|
-
import { c as createSlackWebClient, d as getSlackWriteClient, f as SLACK_DEFAULT_RETRY_OPTIONS, h as resolveSlackWriteClientOptions, i as clearSlackWriteClientCacheForTest, l as createSlackWriteClient, m as resolveSlackWebClientOptions, p as SLACK_WRITE_RETRY_OPTIONS, s as createSlackTokenCacheKey, t as probeSlack } from "./probe-
|
|
11
|
-
import { n as resetSlackChannelTypeCacheForTest, r as resolveSlackChannelType } from "./channel-type-
|
|
12
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
13
|
-
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-
|
|
14
|
-
import { l as recordSlackThreadParticipation, o as clearSlackThreadParticipationCache, s as hasSlackThreadParticipation } from "./send-
|
|
15
|
-
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-
|
|
16
|
-
import { t as collectSlackSecurityAuditFindings } from "./security-audit-
|
|
17
|
-
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-
|
|
7
|
+
import { n as buildSlackThreadingToolContext, r as resolveSlackAutoThreadId, t as slackPlugin } from "./channel-Ds8NKvfr.js";
|
|
8
|
+
import { $ as parseSlackBlocksInput, I as buildSlackInteractiveBlocks, L as buildSlackPresentationBlocks, Q as SLACK_MAX_BLOCKS, a as allowListMatches, c as normalizeSlackAllowOwnerEntry, d as resolveSlackUserAllowed, et as validateSlackBlocksArray, l as normalizeSlackSlug, n as resolveSlackGroupRequireMention, o as normalizeAllowList, r as resolveSlackGroupToolPolicy, s as normalizeAllowListLower, u as resolveSlackAllowListMatch } from "./group-policy-CdnQzQBI.js";
|
|
9
|
+
import { n as extractSlackToolSend, r as listSlackMessageActions } from "./message-tool-api-ByVyIVOh.js";
|
|
10
|
+
import { n as isSlackInteractiveRepliesEnabled, r as parseSlackOptionsLine, t as compileSlackInteractiveReplies } from "./interactive-replies-C3ffk6oN.js";
|
|
11
|
+
import { c as createSlackWebClient, d as getSlackWriteClient, f as SLACK_DEFAULT_RETRY_OPTIONS, h as resolveSlackWriteClientOptions, i as clearSlackWriteClientCacheForTest, l as createSlackWriteClient, m as resolveSlackWebClientOptions, p as SLACK_WRITE_RETRY_OPTIONS, s as createSlackTokenCacheKey, t as probeSlack } from "./probe-CVRuArHA.js";
|
|
12
|
+
import { n as resetSlackChannelTypeCacheForTest, r as resolveSlackChannelType } from "./channel-type-DXkUajFP.js";
|
|
13
|
+
import { t as slackSetupPlugin } from "./channel.setup-DOSTEDfA.js";
|
|
14
|
+
import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, h as unpinSlackMessage, i as getSlackMemberInfo, l as reactSlackMessage, m as sendSlackMessage, n as downloadSlackFile, o as listSlackPins, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-D51foiwR.js";
|
|
15
|
+
import { l as recordSlackThreadParticipation, o as clearSlackThreadParticipationCache, s as hasSlackThreadParticipation } from "./send-BZ1tPv7-.js";
|
|
16
|
+
import { n as listSlackDirectoryGroupsFromConfig, r as listSlackDirectoryPeersFromConfig } from "./directory-config-B08pm5ZT.js";
|
|
17
|
+
import { t as collectSlackSecurityAuditFindings } from "./security-audit-Cz6erklv.js";
|
|
18
|
+
import { n as resolveSlackRuntimeGroupPolicy } from "./provider-htuIJGFD.js";
|
|
18
19
|
export { SLACK_DEFAULT_RETRY_OPTIONS, SLACK_MAX_BLOCKS, SLACK_WRITE_RETRY_OPTIONS, resetSlackChannelTypeCacheForTest as __resetSlackChannelTypeCacheForTest, resetSlackChannelTypeCacheForTest, allowListMatches, buildSlackInteractiveBlocks, buildSlackPresentationBlocks, buildSlackThreadingToolContext, clearSlackThreadParticipationCache, clearSlackWriteClientCacheForTest, collectSlackSecurityAuditFindings, compileSlackInteractiveReplies, createSlackTokenCacheKey, createSlackWebClient, createSlackWriteClient, deleteSlackMessage, downloadSlackFile, editSlackMessage, extractSlackToolSend, getSlackMemberInfo, getSlackWriteClient, handleSlackHttpRequest, hasSlackThreadParticipation, inspectSlackAccount, isSlackInteractiveRepliesEnabled, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsFromConfig, listSlackDirectoryPeersFromConfig, listSlackEmojis, listSlackMessageActions, listSlackPins, listSlackReactions, looksLikeSlackTargetId, mergeSlackAccountConfig, normalizeAllowList, normalizeAllowListLower, normalizeSlackAllowOwnerEntry, normalizeSlackMessagingTarget, normalizeSlackSlug, normalizeSlackWebhookPath, parseSlackBlocksInput, parseSlackOptionsLine, parseSlackTarget, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, recordSlackThreadParticipation, registerSlackHttpHandler, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAllowListMatch, resolveSlackAutoThreadId, resolveSlackChannelId, resolveSlackChannelType, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackReplyToMode, resolveSlackRuntimeGroupPolicy, resolveSlackUserAllowed, resolveSlackWebClientOptions, resolveSlackWriteClientOptions, sendSlackMessage, slackPlugin, slackSetupPlugin, unpinSlackMessage, validateSlackBlocksArray };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ct as shouldHandleSlackNativeApprovalRequest, gt as normalizeSlackApproverId, h as resolveSlackReplyBlocks, nt as isSlackAnyNativeApprovalClientEnabled, z as truncateSlackText } from "./group-policy-
|
|
2
|
-
import { r as sendMessageSlack } from "./send-
|
|
1
|
+
import { ct as shouldHandleSlackNativeApprovalRequest, gt as normalizeSlackApproverId, h as resolveSlackReplyBlocks, nt as isSlackAnyNativeApprovalClientEnabled, z as truncateSlackText } from "./group-policy-CdnQzQBI.js";
|
|
2
|
+
import { r as sendMessageSlack } from "./send-BZ1tPv7-.js";
|
|
3
3
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig
|
|
1
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-BSr252c_.js";
|
|
2
|
+
import { t as resolveSlackReplyToMode } from "./account-reply-mode-DrUXogvO.js";
|
|
2
3
|
import { a as resolveSlackChannelId, i as parseSlackTarget, n as looksLikeSlackTargetId, r as normalizeSlackMessagingTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-N6lHogYZ.js";
|
|
3
4
|
import { t as slackContextTargetsMatch } from "./targets-KmjP2E8s.js";
|
|
4
|
-
import { F as SLACK_TEXT_LIMIT, J as renderSlackMessagePresentationFallbackText, L as buildSlackPresentationBlocks, N as SLACK_EDIT_TEXT_LIMIT, R as canRenderSlackPresentation, Z as SLACK_PRESENTATION_CAPABILITIES, _t as resolveSlackExecApprovalTarget, at as resolveSessionSlackOriginTarget, ct as shouldHandleSlackNativeApprovalRequest, dt as getSlackApprovalApprovers, ft as isSlackApprovalAuthorizedSender, g as resolveSlackReplyDeliveryMessages, h as resolveSlackReplyBlocks, ht as isSlackExecApprovalClientEnabled, i as assertSlackDirectSendAllowed, it as normalizeSlackOriginTarget, lt as shouldHandleSlackPluginViaForwardingSession, m as resolveSlackReplyBlockResolution, mt as isSlackExecApprovalAuthorizedSender, n as resolveSlackGroupRequireMention, nt as isSlackAnyNativeApprovalClientEnabled, ot as resolveSlackFallbackOriginTarget, pt as getSlackExecApprovalApprovers, r as resolveSlackGroupToolPolicy, rt as normalizeSlackForwardTarget, st as resolveTurnSourceSlackOriginTarget, tt as hasSlackPluginApprovers, ut as slackTargetsMatch, vt as shouldSuppressLocalSlackExecApprovalPrompt } from "./group-policy-
|
|
5
|
+
import { F as SLACK_TEXT_LIMIT, J as renderSlackMessagePresentationFallbackText, L as buildSlackPresentationBlocks, N as SLACK_EDIT_TEXT_LIMIT, R as canRenderSlackPresentation, Z as SLACK_PRESENTATION_CAPABILITIES, _t as resolveSlackExecApprovalTarget, at as resolveSessionSlackOriginTarget, ct as shouldHandleSlackNativeApprovalRequest, dt as getSlackApprovalApprovers, ft as isSlackApprovalAuthorizedSender, g as resolveSlackReplyDeliveryMessages, h as resolveSlackReplyBlocks, ht as isSlackExecApprovalClientEnabled, i as assertSlackDirectSendAllowed, it as normalizeSlackOriginTarget, lt as shouldHandleSlackPluginViaForwardingSession, m as resolveSlackReplyBlockResolution, mt as isSlackExecApprovalAuthorizedSender, n as resolveSlackGroupRequireMention, nt as isSlackAnyNativeApprovalClientEnabled, ot as resolveSlackFallbackOriginTarget, pt as getSlackExecApprovalApprovers, r as resolveSlackGroupToolPolicy, rt as normalizeSlackForwardTarget, st as resolveTurnSourceSlackOriginTarget, tt as hasSlackPluginApprovers, ut as slackTargetsMatch, vt as shouldSuppressLocalSlackExecApprovalPrompt } from "./group-policy-CdnQzQBI.js";
|
|
5
6
|
import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.js";
|
|
6
7
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
7
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-
|
|
8
|
-
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-
|
|
9
|
-
import { _ as PAIRING_APPROVED_MESSAGE, b as resolveConfiguredFromRequiredCredentialStatuses, c as createSlackWebClient, g as DEFAULT_ACCOUNT_ID$1, r as formatSlackError, y as projectCredentialSnapshotFields } from "./probe-
|
|
10
|
-
import { i as resolveSlackConversationInfo, r as resolveSlackChannelType } from "./channel-type-
|
|
8
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-ByVyIVOh.js";
|
|
9
|
+
import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-C3ffk6oN.js";
|
|
10
|
+
import { _ as PAIRING_APPROVED_MESSAGE, b as resolveConfiguredFromRequiredCredentialStatuses, c as createSlackWebClient, g as DEFAULT_ACCOUNT_ID$1, r as formatSlackError, y as projectCredentialSnapshotFields } from "./probe-CVRuArHA.js";
|
|
11
|
+
import { i as resolveSlackConversationInfo, r as resolveSlackChannelType } from "./channel-type-DXkUajFP.js";
|
|
11
12
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
12
|
-
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-
|
|
13
|
-
import {
|
|
13
|
+
import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-BfMskaMx.js";
|
|
14
|
+
import { a as SLACK_CHANNEL, i as slackSetupContract, n as createSlackSetupWizardProxy, r as slackSetupAdapter } from "./setup-core-tPxMuFez.js";
|
|
14
15
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
15
16
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
17
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -138,7 +139,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
138
139
|
approvalKind,
|
|
139
140
|
request
|
|
140
141
|
}),
|
|
141
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
142
|
+
load: async () => (await import("./approval-handler.runtime-3b4-wxMl.js")).slackApprovalNativeRuntime
|
|
142
143
|
})
|
|
143
144
|
});
|
|
144
145
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -401,7 +402,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
401
402
|
"unpinMessage",
|
|
402
403
|
"uploadFile"
|
|
403
404
|
]);
|
|
404
|
-
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
405
|
+
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-9-17zvKH.js"));
|
|
405
406
|
function resolveSlackActionContext(params) {
|
|
406
407
|
if (!params.toolContext && !params.mediaLocalRoots && !params.mediaReadFile && !params.conversationReadOrigin && !params.requesterAccountId && !params.requesterSenderId) return;
|
|
407
408
|
return {
|
|
@@ -471,23 +472,23 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
471
472
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
472
473
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
473
474
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
474
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
475
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
476
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
475
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-wV-S1dE_.js"));
|
|
476
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-CJRpHkDC.js"));
|
|
477
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-DuPz2HHt.js"));
|
|
477
478
|
async function resolveSlackHandleAction() {
|
|
478
479
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
479
480
|
}
|
|
480
481
|
function shouldTreatSlackDeliveredTextAsVisible(params) {
|
|
481
482
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
482
483
|
}
|
|
483
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
484
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
485
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
486
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
487
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
488
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
489
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
490
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
484
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-B08pm5ZT.js").then((n) => n.t));
|
|
485
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DodP2TFx.js").then((n) => n.n));
|
|
486
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-M9eF8891.js").then((n) => n.n));
|
|
487
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-9-17zvKH.js"));
|
|
488
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-a2pilFor.js"));
|
|
489
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-CVRuArHA.js").then((n) => n.n));
|
|
490
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-CnB_WKvF.js").then((n) => n.t));
|
|
491
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-DpPKzPrn.js").then((n) => n.t));
|
|
491
492
|
async function resolveSlackSendContext(params) {
|
|
492
493
|
const account = resolveSlackAccount({
|
|
493
494
|
cfg: params.cfg,
|
|
@@ -803,7 +804,8 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
803
804
|
base: {
|
|
804
805
|
...createSlackPluginBase({
|
|
805
806
|
setupWizard: createSlackSetupWizardProxy(loadSlackSetupSurfaceModule),
|
|
806
|
-
setup: slackSetupAdapter
|
|
807
|
+
setup: slackSetupAdapter,
|
|
808
|
+
setupContract: slackSetupContract
|
|
807
809
|
}),
|
|
808
810
|
allowlist: {
|
|
809
811
|
...buildLegacyDmAccountAllowlistAdapter({
|
|
@@ -958,7 +960,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
958
960
|
buildChannelSummary: async ({ snapshot }) => {
|
|
959
961
|
const { buildPassiveProbedChannelStatusSummary } = await loadExtensionSharedSdk();
|
|
960
962
|
return buildPassiveProbedChannelStatusSummary(snapshot, snapshot.identity === "user" ? {
|
|
961
|
-
|
|
963
|
+
postAs: "user",
|
|
962
964
|
userTokenSource: snapshot.userTokenSource ?? "none",
|
|
963
965
|
...snapshot.mode === "http" ? { signingSecretSource: snapshot.signingSecretSource ?? "none" } : { appTokenSource: snapshot.appTokenSource ?? "none" }
|
|
964
966
|
} : {
|
|
@@ -1038,7 +1040,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1038
1040
|
},
|
|
1039
1041
|
resolveAccountSnapshot: ({ account }) => {
|
|
1040
1042
|
const mode = account.config.mode ?? "socket";
|
|
1041
|
-
const identity = account.config.
|
|
1043
|
+
const identity = account.config.postAs ?? "bot";
|
|
1042
1044
|
const configured = (mode === "http" ? resolveConfiguredFromRequiredCredentialStatuses(account, [identity === "user" ? "userTokenStatus" : "botTokenStatus", "signingSecretStatus"]) : mode === "socket" ? resolveConfiguredFromRequiredCredentialStatuses(account, [identity === "user" ? "userTokenStatus" : "botTokenStatus", "appTokenStatus"]) : void 0) ?? isSlackPluginAccountConfigured(account);
|
|
1043
1045
|
return {
|
|
1044
1046
|
accountId: account.accountId,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-B4j4tCOI.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-Ds8NKvfr.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-
|
|
3
|
-
import { s as normalizeAllowListLower } from "./group-policy-
|
|
4
|
-
import { c as createSlackWebClient } from "./probe-
|
|
2
|
+
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-BSr252c_.js";
|
|
3
|
+
import { s as normalizeAllowListLower } from "./group-policy-CdnQzQBI.js";
|
|
4
|
+
import { c as createSlackWebClient } from "./probe-CVRuArHA.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-
|
|
2
|
-
import { a as
|
|
3
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds } from "./accounts-BSr252c_.js";
|
|
2
|
+
import { a as SLACK_CHANNEL, i as slackSetupContract, n as createSlackSetupWizardProxy, o as describeSlackSetupAccount, r as slackSetupAdapter, s as isSlackSetupAccountConfigured } from "./setup-core-tPxMuFez.js";
|
|
3
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-B4j4tCOI.js";
|
|
4
4
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
5
5
|
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
|
6
6
|
//#region extensions/slack/src/channel.setup.ts
|
|
7
|
-
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-
|
|
7
|
+
const slackSetupWizard = createSlackSetupWizardProxy(async () => ({ slackSetupWizard: (await import("./setup-surface-wV-S1dE_.js")).slackSetupWizard }));
|
|
8
8
|
const slackSetupConfigAdapter = createScopedChannelConfigAdapter({
|
|
9
9
|
sectionKey: SLACK_CHANNEL,
|
|
10
10
|
listAccountIds: listSlackAccountIds,
|
|
@@ -69,7 +69,8 @@ const slackSetupPlugin = {
|
|
|
69
69
|
isConfigured: (account) => isSlackSetupAccountConfigured(account),
|
|
70
70
|
describeAccount: (account) => describeSlackSetupAccount(account)
|
|
71
71
|
},
|
|
72
|
-
setup: slackSetupAdapter
|
|
72
|
+
setup: slackSetupAdapter,
|
|
73
|
+
setupContract: slackSetupContract
|
|
73
74
|
};
|
|
74
75
|
//#endregion
|
|
75
76
|
export { slackSetupPlugin as t };
|