@openclaw/slack 2026.10.10-beta.5 → 2026.11.1
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-ChRfnnBu.mjs → action-runtime-DPoxYao5.mjs} +9 -10
- package/dist/.setup/action-runtime.runtime-DWKWaKgC.mjs +1 -0
- package/dist/.setup/{actions-By7tvpvv.mjs → actions-PF2cP6to.mjs} +14 -22
- package/dist/.setup/{approval-handler.runtime-D8ArtDQt.mjs → approval-handler.runtime-BtRklemy.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-DT7XBPbV.mjs → approval-message-updates-CpwbsEj6.mjs} +2 -3
- package/dist/.setup/{channel-6YzXl_63.mjs → channel-BzPa5LRe.mjs} +32 -39
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-BEFP2ORi.mjs → channel-type-Dh4vwh1Y.mjs} +5 -6
- package/dist/.setup/{channel.setup-u6QQdbTa.mjs → channel.setup-Cc6oaNPS.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-BFilOuM_.mjs → monitor-BSKi0nx-.mjs} +78 -137
- package/dist/.setup/{outbound-adapter-9dbnYtL1.mjs → outbound-adapter-C0R5jz6S.mjs} +8 -9
- package/dist/.setup/{pipeline.runtime-BG5swHnj.mjs → pipeline.runtime-zTQpztym.mjs} +41 -68
- package/dist/.setup/{plugin-routes-D4qozHVn.mjs → plugin-routes-lXsy_bNV.mjs} +2 -3
- package/dist/.setup/{policy-yhn48xf5.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-oY9SbDiX.mjs → relay-source-D1NGf3d2.mjs} +9 -5
- package/dist/.setup/{replies-CJwjTqDr.mjs → replies-BY9G1WZH.mjs} +7 -9
- package/dist/.setup/{reply-blocks-Ca-raz2z.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-BH1ergYo.mjs} +3 -2
- package/dist/.setup/{secret-contract-api-DB6CMdgc.mjs → secret-contract-api-BdG3j9lT.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-C-8wY0lK.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-Dv8wNBEt.mjs → session-status-CHkEn3HM.mjs} +31 -57
- package/dist/.setup/setup-plugin-api-9mACIIlc.mjs +2 -0
- package/dist/.setup/{setup-surface-9WVQgYCT.mjs → setup-surface-b9gluDhT.mjs} +7 -8
- package/dist/.setup/{shared-DpHCoKy2.mjs → shared-DbdvOUXo.mjs} +14 -18
- package/dist/.setup/{slash-dispatch.runtime-v5kQqJPh.mjs → slash-dispatch.runtime-Bf0r7kf2.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-Ck_j1YTn.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,6 +1,6 @@
|
|
|
1
1
|
import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolution";
|
|
2
2
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
|
|
3
|
-
|
|
3
|
+
// extensions/slack/src/account-configured.ts
|
|
4
4
|
function hasSlackAccountCredentials(params) {
|
|
5
5
|
if (!params.identityTokenConfigured) return false;
|
|
6
6
|
const mode = params.config.mode ?? "socket";
|
|
@@ -31,5 +31,4 @@ function createSlackAccountConfiguredChecker(allowSecretRefs) {
|
|
|
31
31
|
}
|
|
32
32
|
const isSlackPluginAccountConfigured = createSlackAccountConfiguredChecker(false);
|
|
33
33
|
const isSlackSetupAccountConfigured = createSlackAccountConfiguredChecker(true);
|
|
34
|
-
//#endregion
|
|
35
34
|
export { isSlackSetupAccountConfigured as i, hasSlackAccountCredentialsFromConfig as n, isSlackPluginAccountConfigured as r, hasSlackAccountCredentials as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as hasSlackAccountCredentials } from "./account-configured-
|
|
2
|
-
import { a as mergeSlackAccountConfig, g as buildSlackAccountSurfaceFields, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { t as hasSlackAccountCredentials } from "./account-configured-35y0-Hso.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, g as buildSlackAccountSurfaceFields, o as resolveDefaultSlackAccountId } from "./accounts-CEgdyqoW.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
-
|
|
6
|
+
// extensions/slack/src/account-inspect.ts
|
|
7
7
|
function inspectSlackToken(value, envToken) {
|
|
8
8
|
const token = normalizeSecretInputString(value);
|
|
9
9
|
if (token || hasConfiguredSecretInput(value)) return {
|
|
@@ -63,5 +63,4 @@ function inspectSlackAccount(params) {
|
|
|
63
63
|
...buildSlackAccountSurfaceFields(merged)
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
//#endregion
|
|
67
66
|
export { inspectSlackAccount as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { n as hasSlackAccountCredentialsFromConfig } from "./account-configured-35y0-Hso.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { mapAllowFromEntries, normalizeChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
7
7
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
8
8
|
import { normalizeChatType } from "openclaw/plugin-sdk/account-core";
|
|
9
|
-
|
|
9
|
+
// extensions/slack/src/account-surface-fields.ts
|
|
10
10
|
function buildSlackAccountSurfaceFields(config) {
|
|
11
11
|
return {
|
|
12
12
|
groupPolicy: config.groupPolicy,
|
|
@@ -22,8 +22,7 @@ function buildSlackAccountSurfaceFields(config) {
|
|
|
22
22
|
channels: config.channels
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
//#region extensions/slack/src/token.ts
|
|
25
|
+
// extensions/slack/src/token.ts
|
|
27
26
|
function formatSlackBotTokenIdentityWarning(params) {
|
|
28
27
|
const userId = params.auth.user_id?.trim();
|
|
29
28
|
const botId = params.auth.bot_id?.trim();
|
|
@@ -40,15 +39,13 @@ function createSlackTokenResolver(defaultPath) {
|
|
|
40
39
|
const resolveSlackBotToken = createSlackTokenResolver("channels.slack.botToken");
|
|
41
40
|
const resolveSlackAppToken = createSlackTokenResolver("channels.slack.appToken");
|
|
42
41
|
const resolveSlackUserToken = createSlackTokenResolver("channels.slack.userToken");
|
|
43
|
-
|
|
44
|
-
//#region extensions/slack/src/account-reply-mode.ts
|
|
42
|
+
// extensions/slack/src/account-reply-mode.ts
|
|
45
43
|
function resolveSlackReplyToMode(account, chatType) {
|
|
46
44
|
const normalized = normalizeChatType(chatType ?? void 0);
|
|
47
45
|
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
48
46
|
return account.replyToMode ?? "off";
|
|
49
47
|
}
|
|
50
|
-
|
|
51
|
-
//#region extensions/slack/src/accounts.ts
|
|
48
|
+
// extensions/slack/src/accounts.ts
|
|
52
49
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
53
50
|
hasImplicitDefaultSlackAccount: () => hasImplicitDefaultSlackAccount,
|
|
54
51
|
listEnabledSlackAccounts: () => listEnabledSlackAccounts,
|
|
@@ -185,5 +182,4 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
185
182
|
accountId
|
|
186
183
|
})).filter((account) => account.enabled);
|
|
187
184
|
}
|
|
188
|
-
//#endregion
|
|
189
185
|
export { mergeSlackAccountConfig as a, resolveSlackAccountAllowFrom as c, resolveSlackOperationToken as d, resolveSlackReplyToMode as f, buildSlackAccountSurfaceFields as g, resolveSlackBotToken as h, listSlackAccountIds as i, resolveSlackAccountDmPolicy as l, resolveSlackAppToken as m, hasImplicitDefaultSlackAccount as n, resolveDefaultSlackAccountId as o, formatSlackBotTokenIdentityWarning as p, listEnabledSlackAccounts as r, resolveSlackAccount as s, accounts_exports as t, resolveSlackConfigAccessorAccount as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-
|
|
2
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
3
|
-
import { Ht as resolveSlackAutoThreadId, Vt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, b as hasSlackNativeDataBlock, ht as parseSlackBlocksInput, jt as getSlackInstallationKind, m as assertSlackDetachedTargetAllowed, r as buildSlackChannelIdCandidates } from "./session-status-
|
|
4
|
-
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
5
|
-
import { t as mergeSlackSendResults } from "./send-results-
|
|
1
|
+
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-0pRZtahO.mjs";
|
|
2
|
+
import { t as slackContextTargetsMatch } from "./targets-BqXz7CpG.mjs";
|
|
3
|
+
import { Ht as resolveSlackAutoThreadId, Vt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, b as hasSlackNativeDataBlock, ht as parseSlackBlocksInput, jt as getSlackInstallationKind, m as assertSlackDetachedTargetAllowed, r as buildSlackChannelIdCandidates } from "./session-status-CHkEn3HM.mjs";
|
|
4
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-Bp1FvE6m.mjs";
|
|
5
|
+
import { t as mergeSlackSendResults } from "./send-results-D-o6PgtS.mjs";
|
|
6
6
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -10,7 +10,7 @@ import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
|
|
|
10
10
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
11
11
|
import { createActionGate, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
12
12
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
13
|
-
|
|
13
|
+
// extensions/slack/src/action-runtime.ts
|
|
14
14
|
const messagingActions = /* @__PURE__ */ new Set([
|
|
15
15
|
"openConversation",
|
|
16
16
|
"sendMessage",
|
|
@@ -30,10 +30,10 @@ const SLACK_REACTION_RESULT_LIMIT = 100;
|
|
|
30
30
|
function readSlackResultLimit(params) {
|
|
31
31
|
return Math.min(readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." }) ?? SLACK_REACTION_RESULT_LIMIT, SLACK_REACTION_RESULT_LIMIT);
|
|
32
32
|
}
|
|
33
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-
|
|
33
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-PF2cP6to.mjs").then((n) => n.t));
|
|
34
34
|
const bindSlackAction = createLazyRuntimeMethodBinder(loadSlackActionsRuntime);
|
|
35
|
-
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-
|
|
36
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
35
|
+
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-CEgdyqoW.mjs").then((n) => n.t));
|
|
36
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-Dh4vwh1Y.mjs").then((n) => n.t));
|
|
37
37
|
const bindSlackChannelType = createLazyRuntimeMethodBinder(loadSlackChannelTypeRuntime);
|
|
38
38
|
const slackActionRuntime = {
|
|
39
39
|
deleteSlackMessage: bindSlackAction((runtime) => runtime.deleteSlackMessage),
|
|
@@ -620,5 +620,4 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
620
620
|
}
|
|
621
621
|
throw new Error(`Unknown action: ${action}`);
|
|
622
622
|
}
|
|
623
|
-
//#endregion
|
|
624
623
|
export { slackActionRuntime as n, handleSlackAction as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as handleSlackAction } from "./action-runtime-DPoxYao5.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { h as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { n as formatSlackTarget } from "./target-parsing-
|
|
4
|
-
import { D as buildSlackCompleteBlocksFallbackText, E as buildSlackBlocksFallbackText, F as truncateSlackTextByUtf8Bytes, N as countSlackTextUtf8Bytes, O as renderSlackBlockFallbackText, Q as normalizeSlackOutboundText, T as stripSlackNativeDataBlocks, Vt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, _ as appendSlackNativeDataPlainTextFallback, b as hasSlackNativeDataBlock, g as appendSlackNativeDataFallbackText, gt as validateSlackBlocksArray, k as SLACK_EDIT_TEXT_MAX_BYTES, m as assertSlackDetachedTargetAllowed, st as escapeSlackMrkdwn, x as isSlackInvalidBlocksError } from "./session-status-
|
|
5
|
-
import { _ as getSlackWriteClient, h as createSlackWriteClient, u as createSlackLookupClient } from "./probe-
|
|
6
|
-
import { m as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { h as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
4
|
+
import { D as buildSlackCompleteBlocksFallbackText, E as buildSlackBlocksFallbackText, F as truncateSlackTextByUtf8Bytes, N as countSlackTextUtf8Bytes, O as renderSlackBlockFallbackText, Q as normalizeSlackOutboundText, T as stripSlackNativeDataBlocks, Vt as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, _ as appendSlackNativeDataPlainTextFallback, b as hasSlackNativeDataBlock, g as appendSlackNativeDataFallbackText, gt as validateSlackBlocksArray, k as SLACK_EDIT_TEXT_MAX_BYTES, m as assertSlackDetachedTargetAllowed, st as escapeSlackMrkdwn, x as isSlackInvalidBlocksError } from "./session-status-CHkEn3HM.mjs";
|
|
5
|
+
import { _ as getSlackWriteClient, h as createSlackWriteClient, u as createSlackLookupClient } from "./probe-C5VWf3sz.mjs";
|
|
6
|
+
import { m as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-C5uXkmZV.mjs";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
9
|
import { createSubsystemLogger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -20,7 +20,7 @@ import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
|
20
20
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
21
21
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
22
22
|
import { saveRemoteMedia, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
23
|
-
|
|
23
|
+
// extensions/slack/src/conversation-open.ts
|
|
24
24
|
function parseSlackConversationOpenInput(userIds, teamId) {
|
|
25
25
|
const users = z.array(z.string().trim().regex(/^[UW][A-Z0-9]+$/)).min(1).max(8).parse(userIds);
|
|
26
26
|
if (new Set(users).size !== users.length) throw new Error("Slack conversation-open requires distinct userIds.");
|
|
@@ -42,8 +42,7 @@ async function openSlackConversationWithClient(client, input) {
|
|
|
42
42
|
})
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
//#region extensions/slack/src/edit-text.ts
|
|
45
|
+
// extensions/slack/src/edit-text.ts
|
|
47
46
|
function buildSlackEditTextPayload(content, blocks) {
|
|
48
47
|
const trimmedContent = content.trim();
|
|
49
48
|
const blockText = blocks?.length ? buildSlackCompleteBlocksFallbackText(blocks).trim() : "";
|
|
@@ -56,8 +55,7 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
56
55
|
if (blockText) return truncateSlackTextByUtf8Bytes(blockText, SLACK_EDIT_TEXT_MAX_BYTES);
|
|
57
56
|
return " ";
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
//#region extensions/slack/src/monitor/block-text.ts
|
|
58
|
+
// extensions/slack/src/monitor/block-text.ts
|
|
61
59
|
function hasSlackTableBlock(blocks) {
|
|
62
60
|
return blocks?.some((block) => asOptionalRecord(block)?.type === "table") ?? false;
|
|
63
61
|
}
|
|
@@ -132,8 +130,7 @@ function chooseSlackPrimaryText(params) {
|
|
|
132
130
|
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
133
131
|
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
134
132
|
}
|
|
135
|
-
|
|
136
|
-
//#region extensions/slack/src/file-reference.ts
|
|
133
|
+
// extensions/slack/src/file-reference.ts
|
|
137
134
|
function formatSlackFileReference(file) {
|
|
138
135
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
139
136
|
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
@@ -150,18 +147,15 @@ function formatSlackFileReferenceList(files) {
|
|
|
150
147
|
if (!files?.length) return "file";
|
|
151
148
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
152
149
|
}
|
|
153
|
-
|
|
154
|
-
//#region extensions/slack/src/monitor/media.runtime.ts
|
|
150
|
+
// extensions/slack/src/monitor/media.runtime.ts
|
|
155
151
|
const slackMediaLog = createSubsystemLogger("gateway/channels/slack").child("media");
|
|
156
|
-
|
|
157
|
-
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
152
|
+
// extensions/slack/src/monitor/slack-client-kind.ts
|
|
158
153
|
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
159
154
|
function isGovSlackClient(client) {
|
|
160
155
|
const apiUrl = client?.slackApiUrl ? URL.parse(client.slackApiUrl) : null;
|
|
161
156
|
return apiUrl?.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
162
157
|
}
|
|
163
|
-
|
|
164
|
-
//#region extensions/slack/src/monitor/media.ts
|
|
158
|
+
// extensions/slack/src/monitor/media.ts
|
|
165
159
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
166
160
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
167
161
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
@@ -494,8 +488,7 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
494
488
|
...unavailableFiles.length > 0 ? { files: unavailableFiles } : {}
|
|
495
489
|
};
|
|
496
490
|
}
|
|
497
|
-
|
|
498
|
-
//#region extensions/slack/src/actions.ts
|
|
491
|
+
// extensions/slack/src/actions.ts
|
|
499
492
|
var actions_exports = /* @__PURE__ */ __exportAll({
|
|
500
493
|
deleteSlackMessage: () => deleteSlackMessage,
|
|
501
494
|
downloadSlackFile: () => downloadSlackFile,
|
|
@@ -847,5 +840,4 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
847
840
|
maxBytes: opts.maxBytes
|
|
848
841
|
}))?.[0] ?? null;
|
|
849
842
|
}
|
|
850
|
-
//#endregion
|
|
851
843
|
export { hasSlackTableBlock as C, buildSlackEditTextPayload as D, resolveSlackMessageText as E, hasSlackMessageTableBlock as S, resolveSlackBlocksText as T, media_exports as _, editSlackRenderedMessage as a, formatSlackFileReference as b, listSlackPins as c, reactSlackMessage as d, readSlackMessages as f, unpinSlackMessage as g, sendSlackMessage as h, editSlackMessage as i, listSlackReactions as l, removeSlackReaction as m, deleteSlackMessage as n, getSlackMemberInfo as o, removeOwnSlackReactions as p, downloadSlackFile as r, listSlackEmojis as s, actions_exports as t, pinSlackMessage as u, isGovSlackClient as v, isSlackUnfurlAttachment as w, formatSlackFileReferenceList as x, saveRemoteMedia as y };
|
package/dist/.setup/{approval-handler.runtime-D8ArtDQt.mjs → approval-handler.runtime-BtRklemy.mjs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
2
|
-
import { F as truncateSlackTextByUtf8Bytes, Lt as normalizeSlackApproverId, P as truncateSlackText, Tt as shouldHandleSlackNativeApprovalRequest, _t as isSlackAnyNativeApprovalClientEnabled, ct as SLACK_APPROVAL_HEADER_BLOCK_ID, k as SLACK_EDIT_TEXT_MAX_BYTES, n as setSlackSessionStatus } from "./session-status-
|
|
3
|
-
import { g as getSlackListenerWriteClient } from "./probe-
|
|
4
|
-
import { s as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
5
|
-
import { t as sendMessageSlack } from "./send-
|
|
6
|
-
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
2
|
+
import { F as truncateSlackTextByUtf8Bytes, Lt as normalizeSlackApproverId, P as truncateSlackText, Tt as shouldHandleSlackNativeApprovalRequest, _t as isSlackAnyNativeApprovalClientEnabled, ct as SLACK_APPROVAL_HEADER_BLOCK_ID, k as SLACK_EDIT_TEXT_MAX_BYTES, n as setSlackSessionStatus } from "./session-status-CHkEn3HM.mjs";
|
|
3
|
+
import { g as getSlackListenerWriteClient } from "./probe-C5VWf3sz.mjs";
|
|
4
|
+
import { s as resolveSlackReplyBlocks } from "./reply-blocks-DOjiDr44.mjs";
|
|
5
|
+
import { t as sendMessageSlack } from "./send-C5uXkmZV.mjs";
|
|
6
|
+
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-CpwbsEj6.mjs";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
9
9
|
import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
10
10
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
11
11
|
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
12
12
|
import { formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
13
|
-
|
|
13
|
+
// extensions/slack/src/approval-handler.runtime.ts
|
|
14
14
|
const SLACK_CONTEXT_ELEMENTS_MAX = 10;
|
|
15
15
|
const SLACK_TEXT_OBJECT_MAX = 3e3;
|
|
16
16
|
function resolveHandlerContext(params) {
|
|
@@ -265,5 +265,4 @@ async function resolveApprovalChannel(client, target, teamId) {
|
|
|
265
265
|
if (!channelId) throw new Error("Slack approval DM did not return a channel id");
|
|
266
266
|
return `channel:${channelId}`;
|
|
267
267
|
}
|
|
268
|
-
//#endregion
|
|
269
268
|
export { slackApprovalNativeRuntime };
|
package/dist/.setup/{approval-message-updates-DT7XBPbV.mjs → approval-message-updates-CpwbsEj6.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { U as isSlackApprovalActionId, lt as decodeSlackApprovalAction } from "./session-status-
|
|
1
|
+
import { U as isSlackApprovalActionId, lt as decodeSlackApprovalAction } from "./session-status-CHkEn3HM.mjs";
|
|
2
2
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
4
|
-
|
|
4
|
+
// extensions/slack/src/approval-message-updates.ts
|
|
5
5
|
const updates = new KeyedAsyncQueue();
|
|
6
6
|
function runSlackApprovalMessageUpdate(target, update) {
|
|
7
7
|
return updates.enqueue(JSON.stringify([
|
|
@@ -22,5 +22,4 @@ function hasSlackApprovalControl(blocks, approval) {
|
|
|
22
22
|
});
|
|
23
23
|
}) ?? false;
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { runSlackApprovalMessageUpdate as n, hasSlackApprovalControl as t };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
2
|
-
import { c as resolveSlackAccountAllowFrom, d as resolveSlackOperationToken, f as resolveSlackReplyToMode, i as listSlackAccountIds, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
4
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
5
|
-
import { At as resolveSlackApprovalTeamId, Bt as resolvePluginApprovalSlackApprovers, Ct as resolveSlackFallbackOriginTarget, Dt as slackTargetsMatch, Et as shouldHandleSlackPluginViaForwardingSession, Ft as isSlackExecApprovalAuthorizedSender, Ht as resolveSlackAutoThreadId, It as isSlackExecApprovalClientEnabled, M as SLACK_TEXT_LIMIT, Mt as isSlackWorkspaceInstallation, N as countSlackTextUtf8Bytes, Ot as getSlackApprovalApproversForTeam, Pt as getSlackExecApprovalApprovers, Q as normalizeSlackOutboundText, Rt as resolveSlackExecApprovalTarget, St as resolveSlackApproverDmTargets, Tt as shouldHandleSlackNativeApprovalRequest, _t as isSlackAnyNativeApprovalClientEnabled, a as resolveSlackGroupRequireMention, bt as normalizeSlackOriginTarget, c as qualifySlackConversationId, d as normalizeSlackRouteBindingConfig, f as resolveSlackConversationBindingRoute, ft as SLACK_PRESENTATION_CAPABILITIES, jt as getSlackInstallationKind, k as SLACK_EDIT_TEXT_MAX_BYTES, kt as isSlackPluginApprovalAuthorizedSender, l as qualifySlackRoutePeerId, m as assertSlackDetachedTargetAllowed, n as setSlackSessionStatus, o as resolveSlackGroupToolPolicy, ot as renderSlackMessagePresentationFallbackText, vt as isSlackPluginApprovalRequest, wt as resolveTurnSourceSlackOriginTarget, xt as resolveSessionSlackOriginTarget, yt as normalizeSlackForwardTarget, zt as shouldSuppressLocalSlackExecApprovalPrompt } from "./session-status-
|
|
6
|
-
import { _ as getSlackWriteClient, c as collectSlackCursorPages, o as formatSlackError, u as createSlackLookupClient } from "./probe-
|
|
7
|
-
import { c as resolveSlackReplyDeliveryMessages, o as resolveSlackReplyBlockResolution, p as buildSlackPresentationBlocksIfComplete, r as normalizeSlackReplyPayload, s as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
8
|
-
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-
|
|
9
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-
|
|
10
|
-
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-
|
|
11
|
-
import { t as getOptionalSlackRuntime } from "./runtime-
|
|
12
|
-
import { n as slackPluginBase, r as slackSecurityAdapter, t as slackConfigAdapter } from "./shared-
|
|
13
|
-
import { i as SLACK_CHANNEL } from "./channel.setup-
|
|
1
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
2
|
+
import { c as resolveSlackAccountAllowFrom, d as resolveSlackOperationToken, f as resolveSlackReplyToMode, i as listSlackAccountIds, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-0pRZtahO.mjs";
|
|
4
|
+
import { t as slackContextTargetsMatch } from "./targets-BqXz7CpG.mjs";
|
|
5
|
+
import { At as resolveSlackApprovalTeamId, Bt as resolvePluginApprovalSlackApprovers, Ct as resolveSlackFallbackOriginTarget, Dt as slackTargetsMatch, Et as shouldHandleSlackPluginViaForwardingSession, Ft as isSlackExecApprovalAuthorizedSender, Ht as resolveSlackAutoThreadId, It as isSlackExecApprovalClientEnabled, M as SLACK_TEXT_LIMIT, Mt as isSlackWorkspaceInstallation, N as countSlackTextUtf8Bytes, Ot as getSlackApprovalApproversForTeam, Pt as getSlackExecApprovalApprovers, Q as normalizeSlackOutboundText, Rt as resolveSlackExecApprovalTarget, St as resolveSlackApproverDmTargets, Tt as shouldHandleSlackNativeApprovalRequest, _t as isSlackAnyNativeApprovalClientEnabled, a as resolveSlackGroupRequireMention, bt as normalizeSlackOriginTarget, c as qualifySlackConversationId, d as normalizeSlackRouteBindingConfig, f as resolveSlackConversationBindingRoute, ft as SLACK_PRESENTATION_CAPABILITIES, jt as getSlackInstallationKind, k as SLACK_EDIT_TEXT_MAX_BYTES, kt as isSlackPluginApprovalAuthorizedSender, l as qualifySlackRoutePeerId, m as assertSlackDetachedTargetAllowed, n as setSlackSessionStatus, o as resolveSlackGroupToolPolicy, ot as renderSlackMessagePresentationFallbackText, vt as isSlackPluginApprovalRequest, wt as resolveTurnSourceSlackOriginTarget, xt as resolveSessionSlackOriginTarget, yt as normalizeSlackForwardTarget, zt as shouldSuppressLocalSlackExecApprovalPrompt } from "./session-status-CHkEn3HM.mjs";
|
|
6
|
+
import { _ as getSlackWriteClient, c as collectSlackCursorPages, o as formatSlackError, u as createSlackLookupClient } from "./probe-C5VWf3sz.mjs";
|
|
7
|
+
import { c as resolveSlackReplyDeliveryMessages, o as resolveSlackReplyBlockResolution, p as buildSlackPresentationBlocksIfComplete, r as normalizeSlackReplyPayload, s as resolveSlackReplyBlocks } from "./reply-blocks-DOjiDr44.mjs";
|
|
8
|
+
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
9
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-DeiQJoRV.mjs";
|
|
10
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-Dh4vwh1Y.mjs";
|
|
11
|
+
import { t as getOptionalSlackRuntime } from "./runtime-C6HKn7Av.mjs";
|
|
12
|
+
import { n as slackPluginBase, r as slackSecurityAdapter, t as slackConfigAdapter } from "./shared-DbdvOUXo.mjs";
|
|
13
|
+
import { i as SLACK_CHANNEL } from "./channel.setup-Cc6oaNPS.mjs";
|
|
14
14
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
15
15
|
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-resolution";
|
|
16
16
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -35,7 +35,7 @@ import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
|
35
35
|
import { normalizeLegacyInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
36
36
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
37
37
|
import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/param-readers";
|
|
38
|
-
|
|
38
|
+
// extensions/slack/src/approval-native.ts
|
|
39
39
|
function resolveSlackNativeSuppressionAccountId({ target, request }) {
|
|
40
40
|
return normalizeOptionalString(target.accountId) ?? normalizeOptionalString(request.request.turnSourceAccountId);
|
|
41
41
|
}
|
|
@@ -99,7 +99,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
99
99
|
],
|
|
100
100
|
isConfigured: isSlackAnyNativeApprovalClientEnabled,
|
|
101
101
|
shouldHandle: shouldHandleSlackNativeApprovalRequest,
|
|
102
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
102
|
+
load: async () => (await import("./approval-handler.runtime-BtRklemy.mjs")).slackApprovalNativeRuntime
|
|
103
103
|
})
|
|
104
104
|
});
|
|
105
105
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.nativeAsync;
|
|
@@ -167,8 +167,7 @@ const slackApprovalCapability = {
|
|
|
167
167
|
}
|
|
168
168
|
} : void 0
|
|
169
169
|
};
|
|
170
|
-
|
|
171
|
-
//#region extensions/slack/src/message-action-dispatch.ts
|
|
170
|
+
// extensions/slack/src/message-action-dispatch.ts
|
|
172
171
|
const SLACK_MESSAGE_ACTIONS = /* @__PURE__ */ new Map([
|
|
173
172
|
["reactions", "reactions"],
|
|
174
173
|
["delete", "deleteMessage"],
|
|
@@ -367,8 +366,7 @@ async function handleSlackMessageAction(params) {
|
|
|
367
366
|
}
|
|
368
367
|
throw new Error(`Action ${action} is not supported for provider ${providerId}.`);
|
|
369
368
|
}
|
|
370
|
-
|
|
371
|
-
//#region extensions/slack/src/channel-actions.ts
|
|
369
|
+
// extensions/slack/src/channel-actions.ts
|
|
372
370
|
const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
373
371
|
"deleteMessage",
|
|
374
372
|
"editMessage",
|
|
@@ -378,7 +376,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
378
376
|
"unpinMessage",
|
|
379
377
|
"uploadFile"
|
|
380
378
|
]);
|
|
381
|
-
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
379
|
+
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-DWKWaKgC.mjs"));
|
|
382
380
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
383
381
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId && !ctx.assertDirectAdapterHandoff) return;
|
|
384
382
|
return {
|
|
@@ -429,8 +427,7 @@ function shouldUseWorkspaceAwareSlackActionSend(rawTarget, context) {
|
|
|
429
427
|
}
|
|
430
428
|
return false;
|
|
431
429
|
}
|
|
432
|
-
|
|
433
|
-
//#region extensions/slack/src/conversation-route-owner.ts
|
|
430
|
+
// extensions/slack/src/conversation-route-owner.ts
|
|
434
431
|
function prepareSlackConversationRouteOwner(params) {
|
|
435
432
|
const accountId = normalizeAccountId(params.accountId);
|
|
436
433
|
const accountConfig = resolveAccountEntry(params.cfg.channels?.slack?.accounts, accountId);
|
|
@@ -551,8 +548,7 @@ async function prepareSlackConversationRouteOwnersAsync(inputs, inspectBindings)
|
|
|
551
548
|
});
|
|
552
549
|
}
|
|
553
550
|
const slackConversationRouteOwners = { prepareConversationRouteOwnersAsync: prepareSlackConversationRouteOwnersAsync };
|
|
554
|
-
|
|
555
|
-
//#region extensions/slack/src/enterprise-user-route.ts
|
|
551
|
+
// extensions/slack/src/enterprise-user-route.ts
|
|
556
552
|
/** Resolve a workspace for a detached Enterprise DM without opening a conversation. */
|
|
557
553
|
async function resolveSlackEnterpriseUserTeamId(params) {
|
|
558
554
|
const account = resolveSlackAccount(params);
|
|
@@ -577,8 +573,7 @@ async function resolveSlackEnterpriseUserTeamId(params) {
|
|
|
577
573
|
if (!teamId) throw new Error("unsupported_enterprise_slack_delivery: recipient shares no verified installed workspace");
|
|
578
574
|
return teamId;
|
|
579
575
|
}
|
|
580
|
-
|
|
581
|
-
//#region extensions/slack/src/threading-tool-context.ts
|
|
576
|
+
// extensions/slack/src/threading-tool-context.ts
|
|
582
577
|
function buildSlackThreadingToolContext(params) {
|
|
583
578
|
const account = resolveSlackAccount({
|
|
584
579
|
cfg: params.cfg,
|
|
@@ -608,24 +603,23 @@ function buildSlackThreadingToolContext(params) {
|
|
|
608
603
|
sameChannelThreadRequired: hasExplicitThreadTarget
|
|
609
604
|
};
|
|
610
605
|
}
|
|
611
|
-
|
|
612
|
-
//#region extensions/slack/src/channel.ts
|
|
606
|
+
// extensions/slack/src/channel.ts
|
|
613
607
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/extension-shared"));
|
|
614
608
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/target-resolver-runtime"));
|
|
615
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
616
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
609
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-C1aeCBa6.mjs"));
|
|
610
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-C0R5jz6S.mjs"));
|
|
617
611
|
const bindSlackOutbound = createLazyRuntimeMethodBinder(loadSlackOutboundAdapterModule);
|
|
618
612
|
async function resolveSlackHandleAction() {
|
|
619
613
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
620
614
|
}
|
|
621
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
622
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
623
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
624
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
625
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
626
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
627
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
628
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
615
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-BEPra1E2.mjs").then((n) => n.t));
|
|
616
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-BNQ1KZXh.mjs").then((n) => n.n));
|
|
617
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-C4dC8Z7D.mjs").then((n) => n.n));
|
|
618
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-DWKWaKgC.mjs"));
|
|
619
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-C5uXkmZV.mjs").then((n) => n.n));
|
|
620
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-C5VWf3sz.mjs").then((n) => n.n));
|
|
621
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-BSKi0nx-.mjs").then((n) => n.t));
|
|
622
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-BkUwPrS0.mjs").then((n) => n.t));
|
|
629
623
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
630
624
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
631
625
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -1161,5 +1155,4 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1161
1155
|
},
|
|
1162
1156
|
outbound: slackChannelOutbound
|
|
1163
1157
|
});
|
|
1164
|
-
//#endregion
|
|
1165
1158
|
export { buildSlackThreadingToolContext as n, slackPlugin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// extensions/slack/src/channel-meta.ts
|
|
2
2
|
const SLACK_CHANNEL_META = {
|
|
3
3
|
id: "slack",
|
|
4
4
|
label: "Slack",
|
|
@@ -23,5 +23,4 @@ const DEFAULT_SLACK_SUGGESTED_PROMPTS = [
|
|
|
23
23
|
message: "Help me draft a reply."
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
|
-
//#endregion
|
|
27
26
|
export { SLACK_CHANNEL_META as n, DEFAULT_SLACK_SUGGESTED_PROMPTS as t };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { d as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { m as assertSlackDetachedTargetAllowed } from "./session-status-
|
|
4
|
-
import { d as createSlackReadClient, m as createSlackWebClient, y as readLruMapEntry } from "./probe-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { d as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { m as assertSlackDetachedTargetAllowed } from "./session-status-CHkEn3HM.mjs";
|
|
4
|
+
import { d as createSlackReadClient, m as createSlackWebClient, y as readLruMapEntry } from "./probe-C5VWf3sz.mjs";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
|
-
|
|
9
|
+
// extensions/slack/src/channel-type.ts
|
|
10
10
|
var channel_type_exports = /* @__PURE__ */ __exportAll({
|
|
11
11
|
resolveSlackChannelType: () => resolveSlackChannelType,
|
|
12
12
|
resolveSlackConversationInfo: () => resolveSlackConversationInfo
|
|
@@ -94,5 +94,4 @@ async function resolveSlackConversationInfo(params) {
|
|
|
94
94
|
async function resolveSlackChannelType(params) {
|
|
95
95
|
return (await resolveSlackConversationInfo(params)).type;
|
|
96
96
|
}
|
|
97
|
-
//#endregion
|
|
98
97
|
export { resolveSlackChannelType as n, resolveSlackConversationInfo as r, channel_type_exports as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as isSlackSetupAccountConfigured } from "./account-configured-
|
|
2
|
-
import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-
|
|
5
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { i as isSlackSetupAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
2
|
+
import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-Bc7TVU8F.mjs";
|
|
4
|
+
import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C5vsCo3a.mjs";
|
|
5
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-Cz3uId-c.mjs";
|
|
6
6
|
import { normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -13,7 +13,7 @@ import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
|
13
13
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
14
14
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
15
15
|
import { patchTopLevelChannelConfigSection } from "openclaw/plugin-sdk/setup";
|
|
16
|
-
|
|
16
|
+
// extensions/slack/src/setup-shared.ts
|
|
17
17
|
const SLACK_CHANNEL = "slack";
|
|
18
18
|
function buildSlackAllowFromPrompt() {
|
|
19
19
|
const t = createSetupTranslator();
|
|
@@ -150,8 +150,7 @@ function describeSlackSetupAccount(account) {
|
|
|
150
150
|
}
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
//#region extensions/slack/src/config-adapter.ts
|
|
153
|
+
// extensions/slack/src/config-adapter.ts
|
|
155
154
|
const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
156
155
|
sectionKey: SLACK_CHANNEL,
|
|
157
156
|
listAccountIds: listSlackAccountIds,
|
|
@@ -169,8 +168,7 @@ const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
169
168
|
formatAllowFrom: (allowFrom) => formatAllowFromLowercase({ allowFrom }),
|
|
170
169
|
resolveDefaultTo: (account) => account.defaultTo
|
|
171
170
|
});
|
|
172
|
-
|
|
173
|
-
//#region extensions/slack/src/setup-core.ts
|
|
171
|
+
// extensions/slack/src/setup-core.ts
|
|
174
172
|
const t = createSetupTranslator();
|
|
175
173
|
function enableSlackAccount(cfg, accountId) {
|
|
176
174
|
return patchChannelConfigForAccount({
|
|
@@ -534,8 +532,7 @@ function createSlackSetupWizardProxy(loadWizard) {
|
|
|
534
532
|
fallbackResolvedGroupAllowlist: (entries) => entries
|
|
535
533
|
});
|
|
536
534
|
}
|
|
537
|
-
|
|
538
|
-
//#region extensions/slack/src/channel.setup.ts
|
|
535
|
+
// extensions/slack/src/channel.setup.ts
|
|
539
536
|
const slackSetupPlugin = {
|
|
540
537
|
id: SLACK_CHANNEL,
|
|
541
538
|
meta: {
|
|
@@ -550,7 +547,7 @@ const slackSetupPlugin = {
|
|
|
550
547
|
markdownCapable: true,
|
|
551
548
|
preferSessionLookupForAnnounceTarget: true
|
|
552
549
|
},
|
|
553
|
-
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-
|
|
550
|
+
setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-b9gluDhT.mjs")),
|
|
554
551
|
capabilities: {
|
|
555
552
|
chatTypes: [
|
|
556
553
|
"direct",
|
|
@@ -628,5 +625,4 @@ const slackSetupPlugin = {
|
|
|
628
625
|
},
|
|
629
626
|
setupContract: slackSetupContract
|
|
630
627
|
};
|
|
631
|
-
//#endregion
|
|
632
628
|
export { buildSlackAllowFromPrompt as a, SLACK_CHANNEL as i, createSlackSetupWizardBase as n, slackBaseConfigAdapter as r, slackSetupPlugin as t };
|
|
@@ -2,7 +2,7 @@ import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugi
|
|
|
2
2
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
3
3
|
import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, ReplyToModeSchema, buildChannelAccountSchemaParts, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildGroupEntrySchema, refineChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-schema";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// extensions/slack/src/config-ui-hints.ts
|
|
6
6
|
const observedGroupHistoryHint = { help: "Automatic observed-message context uses a default of 50 and a maximum of 200 messages; 0 disables automatic injection. The JSON integer maximum selects the 50-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
|
|
7
7
|
const observedDmHistoryHint = { help: "Automatic observed-DM context uses a default of 0 and a maximum of 200 messages; 0 disables that extra context. The JSON integer maximum selects the 0-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
|
|
8
8
|
const botThreadMentionHint = {
|
|
@@ -174,8 +174,7 @@ const slackChannelConfigUiHints = {
|
|
|
174
174
|
help: "Maximum number of existing Slack thread messages to fetch when starting a new thread session (default: 20, set to 0 to disable)."
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
|
|
178
|
-
//#region extensions/slack/src/config-schema.ts
|
|
177
|
+
// extensions/slack/src/config-schema.ts
|
|
179
178
|
const SecretInputSchema = buildSecretInputSchema();
|
|
180
179
|
const SLACK_PRESENCE_EVENT_PROMPT_MAX_CHARS = 2e4;
|
|
181
180
|
const SlackStreamingProgressSchema = ChannelStreamingProgressSchema.extend({
|
|
@@ -374,5 +373,4 @@ const SlackConfigSchema = SlackAccountSchema.safeExtend({
|
|
|
374
373
|
validateSlackSigningSecretRequirements(value, ctx);
|
|
375
374
|
});
|
|
376
375
|
const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { uiHints: slackChannelConfigUiHints });
|
|
377
|
-
//#endregion
|
|
378
376
|
export { SlackChannelConfigSchema as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
3
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
4
|
-
import "./targets-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { a as parseSlackTarget } from "./target-parsing-0pRZtahO.mjs";
|
|
4
|
+
import "./targets-BqXz7CpG.mjs";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
6
6
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
|
|
8
|
-
|
|
8
|
+
// extensions/slack/src/directory-config.ts
|
|
9
9
|
var directory_config_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
listSlackDirectoryGroupsFromConfig: () => listSlackDirectoryGroupsFromConfig,
|
|
11
11
|
listSlackDirectoryPeersFromConfig: () => listSlackDirectoryPeersFromConfig
|
|
@@ -48,5 +48,4 @@ const listSlackDirectoryGroupsFromConfig = createResolvedDirectoryEntriesLister(
|
|
|
48
48
|
return normalized?.kind === "channel" ? `channel:${normalizeLowercaseStringOrEmpty(normalized.id)}` : null;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
//#endregion
|
|
52
51
|
export { listSlackDirectoryGroupsFromConfig as n, listSlackDirectoryPeersFromConfig as r, directory_config_exports as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { s as resolveSlackAccount } from "./accounts-
|
|
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 resolveSlackAccount } from "./accounts-CEgdyqoW.mjs";
|
|
3
|
+
import { c as collectSlackCursorPages, l as fetchSlackChannelListPage, 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/directory-live.ts
|
|
6
6
|
var directory_live_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
getSlackDirectorySelfLive: () => getSlackDirectorySelfLive,
|
|
8
8
|
listSlackDirectoryGroupsLive: () => listSlackDirectoryGroupsLive,
|
|
@@ -97,5 +97,4 @@ const listSlackDirectoryGroupsLive = createSlackDirectoryLister({
|
|
|
97
97
|
} : null;
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
-
//#endregion
|
|
101
100
|
export { listSlackDirectoryGroupsLive as n, listSlackDirectoryPeersLive as r, directory_live_exports as t };
|