@openclaw/slack 2026.11.5 → 2026.11.10-beta.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/README.md +16 -0
- package/dist/.setup/{account-configured-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
- package/dist/.setup/{account-inspect-BLVha-ov.mjs → account-inspect-DgQgj0wk.mjs} +3 -4
- package/dist/.setup/{accounts-CGJScKtk.mjs → accounts-EaPP0fFY.mjs} +6 -10
- package/dist/.setup/{action-runtime-D01wBhx5.mjs → action-runtime-Cs2IxOLc.mjs} +13 -12
- package/dist/.setup/action-runtime.runtime-me4Yd3j7.mjs +1 -0
- package/dist/.setup/{actions-D5S6D_BU.mjs → actions-BNOabmV6.mjs} +16 -24
- package/dist/.setup/{approval-handler.runtime-Buw5jh2Y.mjs → approval-handler.runtime-C2C-jNxi.mjs} +7 -8
- package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-Bx2u_5-z.mjs} +2 -3
- package/dist/.setup/{channel-lxmLyPDr.mjs → channel-CyxJGWYr.mjs} +66 -53
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-B5P3w9eA.mjs → channel-type-ZG0ErPTI.mjs} +5 -6
- package/dist/.setup/{channel.setup-Lq2OxKkF.mjs → channel.setup-DNnvYUKL.mjs} +10 -14
- package/dist/.setup/{config-schema-BWAaa5au.mjs → config-schema-DO2u-jsa.mjs} +5 -7
- package/dist/.setup/{cursor-pages-CATAzbTT.mjs → cursor-pages-jVn3Vkfi.mjs} +4 -8
- package/dist/.setup/{directory-config-D-hf9KGQ.mjs → directory-config-CGvKYg9F.mjs} +5 -6
- package/dist/.setup/{directory-live-onKAFI1E.mjs → directory-live-DNdw97LA.mjs} +4 -5
- package/dist/.setup/{doctor-contract-9-QJRCXk.mjs → doctor-contract-BB2KJ9Ni.mjs} +7 -13
- package/dist/.setup/fork-DTKBA8Fm.mjs +155 -0
- package/dist/.setup/literal-text-DdCRYzYh.mjs +24 -0
- package/dist/.setup/{message-tool-api-LGIgVXJf.mjs → message-tool-api-B38BpEaE.mjs} +5 -7
- package/dist/.setup/{monitor-C1oM6vom.mjs → monitor-DEKC3W7P.mjs} +147 -159
- package/dist/.setup/{outbound-adapter-C-95EWl2.mjs → outbound-adapter-1JpFMcJD.mjs} +14 -11
- package/dist/.setup/{paths-B1u59oLK.mjs → paths-CQZI_5WY.mjs} +1 -2
- package/dist/.setup/{pipeline.runtime-D398MsEc.mjs → pipeline.runtime-CJ9dBvJp.mjs} +113 -107
- package/dist/.setup/{policy-DxhGRvc2.mjs → policy-klXrk5vE.mjs} +3 -5
- package/dist/.setup/{probe-DANukR3O.mjs → probe-BHqvMbno.mjs} +72 -75
- package/dist/.setup/{question-delivery-CWC7sRhH.mjs → question-delivery-BGwm5Zmr.mjs} +2 -3
- package/dist/.setup/{relay-source-DNdK-_wn.mjs → relay-source-BPCzwy4s.mjs} +3 -4
- package/dist/.setup/{replies-BGZkt6tB.mjs → replies-DSFvZ-sZ.mjs} +11 -10
- package/dist/.setup/{reply-blocks-BzsXUUUL.mjs → reply-blocks-CFy-O-2B.mjs} +4 -7
- package/dist/.setup/{resolve-channels-XDPgnesf.mjs → resolve-channels-CF2JME9q.mjs} +4 -5
- package/dist/.setup/{resolve-users-aDAv24U2.mjs → resolve-users-DDcCAjH1.mjs} +4 -5
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
- package/dist/.setup/{scopes-BocHwImV.mjs → scopes-DKl6yqIv.mjs} +3 -4
- package/dist/.setup/{secret-contract-uiQtoNlu.mjs → secret-contract-CqVqR7MP.mjs} +2 -3
- package/dist/.setup/{secret-contract-api-BlLz88mj.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-yK6_-px6.mjs → send-kGJWQtLk.mjs} +20 -38
- package/dist/.setup/{send-results-BGxlroJ-.mjs → send-results-Bm6V1ekL.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-UWUSCOAK.mjs +2 -0
- package/dist/.setup/{setup-surface-C0KRtyqa.mjs → setup-surface-CPFVFPFM.mjs} +6 -7
- package/dist/.setup/{slash-dispatch.runtime-B9IcPnHV.mjs → slash-dispatch.runtime-BddQT-3Z.mjs} +1 -1
- package/dist/.setup/{target-parsing-Bx2UZniD.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
- package/dist/.setup/{targets-D-ASeWHy.mjs → targets-eeOxA_b_.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +16 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/@slack/bolt/node_modules/qs/.editorconfig +1 -1
- package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +87 -22
- package/node_modules/@slack/bolt/node_modules/qs/README.md +63 -10
- package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/@slack/bolt/node_modules/qs/eslint.config.mjs +61 -50
- package/node_modules/@slack/bolt/node_modules/qs/lib/formats.js +7 -2
- package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +29 -10
- package/node_modules/@slack/bolt/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +28 -9
- package/node_modules/@slack/bolt/node_modules/qs/package.json +6 -6
- package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +335 -2
- package/node_modules/@slack/bolt/node_modules/qs/test/stringify.js +222 -0
- package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +61 -3
- package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts +14 -0
- package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/block-kit/blocks.d.ts +65 -1
- package/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.d.ts +2 -2
- package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.js.map +1 -1
- package/node_modules/@slack/types/dist/events/message.d.ts +4 -0
- package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/user.d.ts +20 -0
- package/node_modules/@slack/types/dist/events/user.d.ts.map +1 -1
- package/node_modules/@slack/types/package.json +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.js +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.d.ts +18 -3
- package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.js +16 -1
- package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/apps.d.ts +62 -0
- package/node_modules/@slack/web-api/dist/types/request/apps.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts +4 -0
- package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts +5 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts +2 -2
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts +35 -3
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/team.d.ts +6 -0
- package/node_modules/@slack/web-api/dist/types/request/team.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts +19 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts +14 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts +10 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js +11 -0
- package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js.map +1 -0
- package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts +1 -0
- package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/response/index.d.ts +3 -0
- package/node_modules/@slack/web-api/dist/types/response/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +752 -0
- package/node_modules/@slack/web-api/package.json +3 -3
- package/node_modules/typebox/build/format/date_time.d.mts +2 -1
- package/node_modules/typebox/build/format/date_time.mjs +12 -3
- package/node_modules/typebox/package.json +1 -1
- package/openclaw.plugin.json +13 -8
- package/package.json +7 -7
- package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +0 -1
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +0 -2
package/README.md
CHANGED
|
@@ -9,3 +9,19 @@ openclaw plugins install @openclaw/slack
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Configure the Slack app credentials and allowed workspaces/channels in OpenClaw. The plugin lets agents receive Slack events and reply through the configured Slack app.
|
|
12
|
+
|
|
13
|
+
## Fork a channel thread
|
|
14
|
+
|
|
15
|
+
Inside an existing public or private channel thread, send an ordinary message:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
@OpenClaw /fork [title]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The optional single-line title (up to 3000 characters) becomes the new root message, not a Slack thread title. OpenClaw copies the conversation into an independent session, posts a new top-level root in the **same channel**, binds that root to the copied session, and posts up to three recent visible text excerpts in the new thread. Continue through the returned Slack link. The channel audience is unchanged; a fork does not create a private conversation. Titles and excerpts are literal text, with mentions, link parsing, and unfurls disabled.
|
|
22
|
+
|
|
23
|
+
Slack custom slash commands cannot run inside threads. Use the ordinary message above, not `/openclaw fork` or a top-level `/fork`. Top-level messages (including synthetic reply targets from `replyToMode: all`), ordinary and managed DMs, group DMs, source-less slash contexts, and Enterprise Grid/org installs are not supported. No last-active thread is inferred.
|
|
24
|
+
|
|
25
|
+
The selected account must already belong to the channel, have channel metadata and thread-history read access, and be able to post. Slack may require a user read token with `channels:history` or `groups:history` for `conversations.replies`; a missing permission is reported before creating a root. Existing channel, sender, mention, and participation policies still apply to subsequent replies. Binding changes routing, not who may participate.
|
|
26
|
+
|
|
27
|
+
If root creation is uncertain, OpenClaw does not retry it automatically. Check the named channel before sending a new request. If a root is confirmed but setup or recap delivery fails, the root and copied context are retained and the error reports what is known.
|
|
@@ -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 { _ as buildSlackAccountSurfaceFields, a as mergeSlackAccountConfig, o as resolveDefaultSlackAccountId } from "./accounts-
|
|
1
|
+
import { t as hasSlackAccountCredentials } from "./account-configured-35y0-Hso.mjs";
|
|
2
|
+
import { _ as buildSlackAccountSurfaceFields, a as mergeSlackAccountConfig, o as resolveDefaultSlackAccountId } from "./accounts-EaPP0fFY.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { normalizeSecretInputString, resolveSecretInputString } 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 credential = resolveSecretInputString({
|
|
9
9
|
value,
|
|
@@ -66,5 +66,4 @@ function inspectSlackAccount(params) {
|
|
|
66
66
|
...buildSlackAccountSurfaceFields(merged)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { inspectSlackAccount as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
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";
|
|
@@ -7,7 +7,7 @@ import { mapAllowFromEntries, normalizeChannelDmPolicy } from "openclaw/plugin-s
|
|
|
7
7
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
8
8
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
9
9
|
import { normalizeChatType } from "openclaw/plugin-sdk/account-core";
|
|
10
|
-
|
|
10
|
+
// extensions/slack/src/account-surface-fields.ts
|
|
11
11
|
function buildSlackAccountSurfaceFields(config) {
|
|
12
12
|
return {
|
|
13
13
|
groupPolicy: config.groupPolicy,
|
|
@@ -23,8 +23,7 @@ function buildSlackAccountSurfaceFields(config) {
|
|
|
23
23
|
channels: config.channels
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
//#region extensions/slack/src/token.ts
|
|
26
|
+
// extensions/slack/src/token.ts
|
|
28
27
|
function formatSlackBotTokenIdentityWarning(params) {
|
|
29
28
|
const userId = params.auth.user_id?.trim();
|
|
30
29
|
const botId = params.auth.bot_id?.trim();
|
|
@@ -41,15 +40,13 @@ function createSlackTokenResolver(defaultPath) {
|
|
|
41
40
|
const resolveSlackBotToken = createSlackTokenResolver("channels.slack.botToken");
|
|
42
41
|
const resolveSlackAppToken = createSlackTokenResolver("channels.slack.appToken");
|
|
43
42
|
const resolveSlackUserToken = createSlackTokenResolver("channels.slack.userToken");
|
|
44
|
-
|
|
45
|
-
//#region extensions/slack/src/account-reply-mode.ts
|
|
43
|
+
// extensions/slack/src/account-reply-mode.ts
|
|
46
44
|
function resolveSlackReplyToMode(account, chatType) {
|
|
47
45
|
const normalized = normalizeChatType(chatType ?? void 0);
|
|
48
46
|
if (normalized && account.replyToModeByChatType?.[normalized] !== void 0) return account.replyToModeByChatType[normalized] ?? "off";
|
|
49
47
|
return account.replyToMode ?? "off";
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
//#region extensions/slack/src/accounts.ts
|
|
49
|
+
// extensions/slack/src/accounts.ts
|
|
53
50
|
var accounts_exports = /* @__PURE__ */ __exportAll({
|
|
54
51
|
hasImplicitDefaultSlackAccount: () => hasImplicitDefaultSlackAccount,
|
|
55
52
|
listEnabledSlackAccounts: () => listEnabledSlackAccounts,
|
|
@@ -194,5 +191,4 @@ function listEnabledSlackAccounts(cfg) {
|
|
|
194
191
|
accountId
|
|
195
192
|
})).filter((account) => account.enabled);
|
|
196
193
|
}
|
|
197
|
-
//#endregion
|
|
198
194
|
export { buildSlackAccountSurfaceFields as _, mergeSlackAccountConfig as a, resolveSlackAccountAllowFrom as c, resolveSlackMarkdownOptions as d, resolveSlackOperationToken as f, resolveSlackBotToken as g, resolveSlackAppToken as h, listSlackAccountIds as i, resolveSlackAccountDmPolicy as l, formatSlackBotTokenIdentityWarning as m, hasImplicitDefaultSlackAccount as n, resolveDefaultSlackAccountId as o, resolveSlackReplyToMode as p, listEnabledSlackAccounts as r, resolveSlackAccount as s, accounts_exports as t, resolveSlackConfigAccessorAccount as u };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as parseSlackTarget, n as formatSlackTarget, o as resolveSlackChannelId } from "./target-parsing-
|
|
2
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
3
|
-
import {
|
|
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-DwYAP3ts.mjs";
|
|
2
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.mjs";
|
|
3
|
+
import { T as assertSlackDetachedTargetAllowed, Xt as getSlackInstallationKind, an as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, at as parseSlackBlocksInput, d as hasPotentialSlackNamedPolicy, j as hasSlackNativeDataBlock, l as buildSlackChannelIdCandidates, sn as resolveSlackThreadTsFromContext } from "./probe-BHqvMbno.mjs";
|
|
4
|
+
import { n as resolveSlackChannelConfig, t as isSlackChannelAllowedByPolicy } from "./policy-klXrk5vE.mjs";
|
|
5
|
+
import { t as mergeSlackSendResults } from "./send-results-Bm6V1ekL.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";
|
|
9
9
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
10
10
|
import { createActionGate, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
11
11
|
import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
12
|
-
|
|
12
|
+
// extensions/slack/src/action-runtime.ts
|
|
13
13
|
const messagingActions = /* @__PURE__ */ new Set([
|
|
14
14
|
"openConversation",
|
|
15
15
|
"sendMessage",
|
|
@@ -29,10 +29,10 @@ const SLACK_REACTION_RESULT_LIMIT = 100;
|
|
|
29
29
|
function readSlackResultLimit(params) {
|
|
30
30
|
return Math.min(readPositiveIntegerParam(params, "limit", { message: "limit must be a positive integer." }) ?? SLACK_REACTION_RESULT_LIMIT, SLACK_REACTION_RESULT_LIMIT);
|
|
31
31
|
}
|
|
32
|
-
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-
|
|
32
|
+
const loadSlackActionsRuntime = createLazyRuntimeModule(() => import("./actions-BNOabmV6.mjs").then((n) => n.t));
|
|
33
33
|
const bindSlackAction = createLazyRuntimeMethodBinder(loadSlackActionsRuntime);
|
|
34
|
-
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-
|
|
35
|
-
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-
|
|
34
|
+
const loadSlackAccountsRuntime = createLazyRuntimeModule(() => import("./accounts-EaPP0fFY.mjs").then((n) => n.t));
|
|
35
|
+
const loadSlackChannelTypeRuntime = createLazyRuntimeModule(() => import("./channel-type-ZG0ErPTI.mjs").then((n) => n.t));
|
|
36
36
|
const bindSlackChannelType = createLazyRuntimeMethodBinder(loadSlackChannelTypeRuntime);
|
|
37
37
|
const slackActionRuntime = {
|
|
38
38
|
createSlackChannel: bindSlackAction((runtime) => runtime.createSlackChannel),
|
|
@@ -561,8 +561,10 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
561
561
|
return jsonResult({ ok: true });
|
|
562
562
|
}
|
|
563
563
|
await assertReadTargetAllowed(target);
|
|
564
|
-
const
|
|
565
|
-
|
|
564
|
+
const pins = await slackActionRuntime.listSlackPins(channelId, readOpts);
|
|
565
|
+
pins.length = Math.min(pins.length, readPositiveIntegerParam(params, "limit") ?? pins.length);
|
|
566
|
+
const normalizedPins = pins.map((pin) => {
|
|
567
|
+
const message = pin.message && withNormalizedTimestamp(pin.message, pin.message.ts);
|
|
566
568
|
return message ? Object.assign({}, pin, { message }) : pin;
|
|
567
569
|
});
|
|
568
570
|
return jsonResult({
|
|
@@ -613,5 +615,4 @@ async function handleSlackAction(params, cfg, context) {
|
|
|
613
615
|
}
|
|
614
616
|
throw new Error(`Unknown action: ${action}`);
|
|
615
617
|
}
|
|
616
|
-
//#endregion
|
|
617
618
|
export { slackActionRuntime as n, handleSlackAction as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as handleSlackAction } from "./action-runtime-Cs2IxOLc.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { n as formatSlackTarget } from "./target-parsing-
|
|
4
|
-
import {
|
|
5
|
-
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-
|
|
6
|
-
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
+
import { D as appendSlackNativeDataFallbackText, Dt as normalizeSlackOutboundText, I as stripSlackNativeDataBlocks, L as countSlackTextUtf8Bytes, M as isSlackInvalidBlocksError, O as appendSlackNativeDataPlainTextFallback, Ot as escapeSlackMrkdwn, T as assertSlackDetachedTargetAllowed, an as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, ct as buildSlackCompleteBlocksFallbackText, j as hasSlackNativeDataBlock, lt as renderSlackBlockFallbackText, ot as validateSlackBlocksArray, st as buildSlackBlocksFallbackText, xt as SLACK_EDIT_TEXT_MAX_BYTES, z as truncateSlackTextByUtf8Bytes } from "./probe-BHqvMbno.mjs";
|
|
5
|
+
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
6
|
+
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-kGJWQtLk.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 { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
@@ -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
|
const slackTeamIdSchema = z.string().trim().regex(/^T[A-Z0-9]+$/i).optional();
|
|
25
25
|
function parseSlackConversationOpenInput(userIds, teamId) {
|
|
26
26
|
const users = z.array(z.string().trim().regex(/^[UW][A-Z0-9]+$/)).min(1).max(8).parse(userIds);
|
|
@@ -43,8 +43,7 @@ async function openSlackConversationWithClient(client, input) {
|
|
|
43
43
|
})
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
//#region extensions/slack/src/edit-text.ts
|
|
46
|
+
// extensions/slack/src/edit-text.ts
|
|
48
47
|
function buildSlackEditTextPayload(content, blocks) {
|
|
49
48
|
const trimmedContent = content.trim();
|
|
50
49
|
const blockText = blocks?.length ? buildSlackCompleteBlocksFallbackText(blocks).trim() : "";
|
|
@@ -57,8 +56,7 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
57
56
|
if (blockText) return truncateSlackTextByUtf8Bytes(blockText, SLACK_EDIT_TEXT_MAX_BYTES);
|
|
58
57
|
return " ";
|
|
59
58
|
}
|
|
60
|
-
|
|
61
|
-
//#region extensions/slack/src/monitor/block-text.ts
|
|
59
|
+
// extensions/slack/src/monitor/block-text.ts
|
|
62
60
|
function hasSlackTableBlock(blocks) {
|
|
63
61
|
return blocks?.some((block) => asOptionalRecord(block)?.type === "table") ?? false;
|
|
64
62
|
}
|
|
@@ -133,8 +131,7 @@ function chooseSlackPrimaryText(params) {
|
|
|
133
131
|
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
134
132
|
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
135
133
|
}
|
|
136
|
-
|
|
137
|
-
//#region extensions/slack/src/file-reference.ts
|
|
134
|
+
// extensions/slack/src/file-reference.ts
|
|
138
135
|
function formatSlackFileReference(file) {
|
|
139
136
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
140
137
|
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
@@ -151,18 +148,15 @@ function formatSlackFileReferenceList(files) {
|
|
|
151
148
|
if (!files?.length) return "file";
|
|
152
149
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
153
150
|
}
|
|
154
|
-
|
|
155
|
-
//#region extensions/slack/src/monitor/media.runtime.ts
|
|
151
|
+
// extensions/slack/src/monitor/media.runtime.ts
|
|
156
152
|
const slackMediaLog = createSubsystemLogger("gateway/channels/slack").child("media");
|
|
157
|
-
|
|
158
|
-
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
153
|
+
// extensions/slack/src/monitor/slack-client-kind.ts
|
|
159
154
|
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
160
155
|
function isGovSlackClient(client) {
|
|
161
156
|
const apiUrl = client?.slackApiUrl ? URL.parse(client.slackApiUrl) : null;
|
|
162
157
|
return apiUrl?.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
163
158
|
}
|
|
164
|
-
|
|
165
|
-
//#region extensions/slack/src/monitor/media.ts
|
|
159
|
+
// extensions/slack/src/monitor/media.ts
|
|
166
160
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
167
161
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
168
162
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
@@ -481,8 +475,7 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
481
475
|
...unavailableFiles.length > 0 ? { files: unavailableFiles } : {}
|
|
482
476
|
};
|
|
483
477
|
}
|
|
484
|
-
|
|
485
|
-
//#region extensions/slack/src/actions.ts
|
|
478
|
+
// extensions/slack/src/actions.ts
|
|
486
479
|
var actions_exports = /* @__PURE__ */ __exportAll({
|
|
487
480
|
createSlackChannel: () => createSlackChannel,
|
|
488
481
|
deleteSlackMessage: () => deleteSlackMessage,
|
|
@@ -590,8 +583,8 @@ function formatEpochSeconds(milliseconds) {
|
|
|
590
583
|
return seconds.toFixed(3).replace(/0+$/, "").replace(/\.$/, "");
|
|
591
584
|
}
|
|
592
585
|
function normalizeSlackReadTimestamp(raw, field) {
|
|
593
|
-
|
|
594
|
-
|
|
586
|
+
if (!raw?.trim()) return;
|
|
587
|
+
const trimmed = raw.trim().replace(/^"(.*)"$/u, "$1");
|
|
595
588
|
if (SLACK_TIMESTAMP_RE.test(trimmed)) return trimmed;
|
|
596
589
|
const parsed = ISO_8601_TIMESTAMP_SCHEMA.safeParse(trimmed).success ? Date.parse(trimmed) : NaN;
|
|
597
590
|
if (!Number.isFinite(parsed)) throw new Error(`Invalid Slack read ${field} timestamp "${trimmed}": expected a Slack timestamp or ISO-8601 date string`);
|
|
@@ -860,5 +853,4 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
860
853
|
maxBytes: opts.maxBytes
|
|
861
854
|
}))?.[0] ?? null;
|
|
862
855
|
}
|
|
863
|
-
//#endregion
|
|
864
856
|
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-Buw5jh2Y.mjs → approval-handler.runtime-C2C-jNxi.mjs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
2
|
-
import {
|
|
3
|
-
import { o as resolveSlackReplyBlocks } from "./reply-blocks-
|
|
4
|
-
import { l as getSlackListenerWriteClient } from "./cursor-pages-
|
|
5
|
-
import { t as sendMessageSlack } from "./send-
|
|
6
|
-
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
2
|
+
import { Lt as shouldHandleSlackNativeApprovalRequest, R as truncateSlackText, i as setSlackSessionStatus, kt as isSlackAnyNativeApprovalClientEnabled, tn as normalizeSlackApproverId, tt as SLACK_APPROVAL_HEADER_BLOCK_ID, xt as SLACK_EDIT_TEXT_MAX_BYTES, z as truncateSlackTextByUtf8Bytes } from "./probe-BHqvMbno.mjs";
|
|
3
|
+
import { o as resolveSlackReplyBlocks } from "./reply-blocks-CFy-O-2B.mjs";
|
|
4
|
+
import { l as getSlackListenerWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
5
|
+
import { t as sendMessageSlack } from "./send-kGJWQtLk.mjs";
|
|
6
|
+
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-Bx2u_5-z.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 { formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
12
12
|
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-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) {
|
|
@@ -261,5 +261,4 @@ async function resolveApprovalChannel(client, target, teamId) {
|
|
|
261
261
|
if (!channelId) throw new Error("Slack approval DM did not return a channel id");
|
|
262
262
|
return `channel:${channelId}`;
|
|
263
263
|
}
|
|
264
|
-
//#endregion
|
|
265
264
|
export { slackApprovalNativeRuntime };
|
package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-Bx2u_5-z.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nt as decodeSlackApprovalAction, q as isSlackApprovalActionId } from "./probe-BHqvMbno.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,18 +1,18 @@
|
|
|
1
|
-
import { r as isSlackPluginAccountConfigured } from "./account-configured-
|
|
2
|
-
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
5
|
-
import { t as slackContextTargetsMatch } from "./targets-
|
|
6
|
-
import { $t as
|
|
7
|
-
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-
|
|
8
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-
|
|
9
|
-
import { a as resolveSlackReplyBlockResolution, o as resolveSlackReplyBlocks, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-
|
|
10
|
-
import { r as createSlackLookupClient, t as collectSlackCursorPages, u as getSlackWriteClient } from "./cursor-pages-
|
|
11
|
-
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-
|
|
12
|
-
import { n as SLACK_CHANNEL_META } from "./channel-meta-
|
|
13
|
-
import { i as SLACK_CHANNEL, r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-
|
|
14
|
-
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-
|
|
15
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { r as isSlackPluginAccountConfigured } from "./account-configured-35y0-Hso.mjs";
|
|
2
|
+
import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, d as resolveSlackMarkdownOptions, f as resolveSlackOperationToken, i as listSlackAccountIds, l as resolveSlackAccountDmPolicy, n as hasImplicitDefaultSlackAccount, o as resolveDefaultSlackAccountId, p as resolveSlackReplyToMode, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
|
|
4
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-eeOxA_b_.mjs";
|
|
6
|
+
import { $t as isSlackExecApprovalAuthorizedSender, At as isSlackPluginApprovalRequest, Bt as getSlackApprovalApproversForTeam, Dt as normalizeSlackOutboundText, Ft as resolveSlackFallbackOriginTarget, Ht as resolveSlackApprovalTeamId, It as resolveTurnSourceSlackOriginTarget, L as countSlackTextUtf8Bytes, Lt as shouldHandleSlackNativeApprovalRequest, Mt as normalizeSlackOriginTarget, Nt as resolveSessionSlackOriginTarget, Pt as resolveSlackApproverDmTargets, Qt as getSlackExecApprovalApprovers, Rt as shouldHandleSlackPluginViaForwardingSession, S as resolveSlackConversationBindingRoute, T as assertSlackDetachedTargetAllowed, Vt as isSlackPluginApprovalAuthorizedSender, Xt as getSlackInstallationKind, _t as SLACK_PRESENTATION_CAPABILITIES, bt as renderSlackMessagePresentationFallbackText, c as slackIngressIdentity, en as isSlackExecApprovalClientEnabled, f as resolveSlackGroupRequireMention, g as formatSlackError, i as setSlackSessionStatus, in as resolvePluginApprovalSlackApprovers, jt as normalizeSlackForwardTarget, kt as isSlackAnyNativeApprovalClientEnabled, nn as resolveSlackExecApprovalTarget, on as resolveSlackAutoThreadId, p as resolveSlackGroupToolPolicy, rn as shouldSuppressLocalSlackExecApprovalPrompt, s as normalizeSlackStableEntry, t as probeSlack, v as qualifySlackConversationId, w as slackConversationBindings, wt as SLACK_TEXT_LIMIT, x as normalizeSlackRouteBindingConfig, xt as SLACK_EDIT_TEXT_MAX_BYTES, y as qualifySlackRoutePeerId, zt as slackTargetsMatch } from "./probe-BHqvMbno.mjs";
|
|
7
|
+
import { n as resolveSlackReplyThreadTs, r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
|
|
8
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-B38BpEaE.mjs";
|
|
9
|
+
import { a as resolveSlackReplyBlockResolution, o as resolveSlackReplyBlocks, r as normalizeSlackReplyPayload, s as resolveSlackReplyDeliveryMessages } from "./reply-blocks-CFy-O-2B.mjs";
|
|
10
|
+
import { r as createSlackLookupClient, t as collectSlackCursorPages, u as getSlackWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
11
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-ZG0ErPTI.mjs";
|
|
12
|
+
import { n as SLACK_CHANNEL_META } from "./channel-meta-C5vsCo3a.mjs";
|
|
13
|
+
import { i as SLACK_CHANNEL, r as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-DNnvYUKL.mjs";
|
|
14
|
+
import { n as normalizeCompatibilityConfig, r as runtime_doctor_migrations_exports, t as legacyConfigRules } from "./doctor-contract-BB2KJ9Ni.mjs";
|
|
15
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CqVqR7MP.mjs";
|
|
16
16
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
17
17
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
18
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -28,7 +28,6 @@ import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "openclaw
|
|
|
28
28
|
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
29
29
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
30
30
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
31
|
-
import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
32
31
|
import { createApproverRestrictedNativeApprovalCapabilityAsync } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
33
32
|
import { createLazyChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
34
33
|
import { createChannelNativeOriginTargetResolverAsync, createNativeApprovalForwardingFallbackSuppressorAsync } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -36,10 +35,11 @@ import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
|
36
35
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
37
36
|
import { normalizeLegacyInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
38
37
|
import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/param-readers";
|
|
38
|
+
import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
39
39
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createConditionalWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
40
40
|
import { identityEntryAuthenticationClassifier } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
41
41
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
42
|
-
|
|
42
|
+
// extensions/slack/src/approval-native.ts
|
|
43
43
|
function resolveSlackNativeSuppressionAccountId({ target, request }) {
|
|
44
44
|
return normalizeOptionalString(target.accountId) ?? normalizeOptionalString(request.request.turnSourceAccountId);
|
|
45
45
|
}
|
|
@@ -103,7 +103,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
103
103
|
],
|
|
104
104
|
isConfigured: isSlackAnyNativeApprovalClientEnabled,
|
|
105
105
|
shouldHandle: shouldHandleSlackNativeApprovalRequest,
|
|
106
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
106
|
+
load: async () => (await import("./approval-handler.runtime-C2C-jNxi.mjs")).slackApprovalNativeRuntime
|
|
107
107
|
})
|
|
108
108
|
});
|
|
109
109
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.nativeAsync;
|
|
@@ -171,8 +171,7 @@ const slackApprovalCapability = {
|
|
|
171
171
|
}
|
|
172
172
|
} : void 0
|
|
173
173
|
};
|
|
174
|
-
|
|
175
|
-
//#region extensions/slack/src/channel-actions.ts
|
|
174
|
+
// extensions/slack/src/channel-actions.ts
|
|
176
175
|
const SLACK_MESSAGE_ACTIONS = /* @__PURE__ */ new Map([
|
|
177
176
|
["reactions", "reactions"],
|
|
178
177
|
["delete", "deleteMessage"],
|
|
@@ -214,7 +213,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
214
213
|
"unpinMessage",
|
|
215
214
|
"uploadFile"
|
|
216
215
|
]);
|
|
217
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
216
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-me4Yd3j7.mjs"));
|
|
218
217
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
219
218
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId && !ctx.assertDirectAdapterHandoff) return;
|
|
220
219
|
return {
|
|
@@ -242,7 +241,11 @@ function createSlackActions(providerId, options) {
|
|
|
242
241
|
describeMessageTool: describeSlackMessageTool,
|
|
243
242
|
extractToolSend: ({ args }) => extractSlackToolSend(args),
|
|
244
243
|
isToolDeliveryAction: ({ args }) => typeof args.action === "string" && SLACK_TOOL_DELIVERY_ACTIONS.has(args.action),
|
|
245
|
-
prepareSendPayload: ({ ctx, to, payload }) =>
|
|
244
|
+
prepareSendPayload: ({ ctx, to, payload }) => {
|
|
245
|
+
if (ctx.action !== "send") return null;
|
|
246
|
+
if (readBooleanParam(ctx.params, "replyBroadcast") === true) return null;
|
|
247
|
+
return shouldUseWorkspaceAwareSlackActionSend(to, ctx.toolContext) ? null : payload;
|
|
248
|
+
},
|
|
246
249
|
handleAction: async (ctx) => {
|
|
247
250
|
const { action, cfg, params: actionParams } = ctx;
|
|
248
251
|
const accountId = ctx.accountId ?? void 0;
|
|
@@ -348,7 +351,7 @@ function createSlackActions(providerId, options) {
|
|
|
348
351
|
action: messageAction,
|
|
349
352
|
channelId: resolveChannelId(),
|
|
350
353
|
messageId,
|
|
351
|
-
...action === "reactions" ? { limit: actionParams.limit } : {}
|
|
354
|
+
...action === "reactions" || action === "list-pins" ? { limit: actionParams.limit } : {}
|
|
352
355
|
});
|
|
353
356
|
}
|
|
354
357
|
if (action === "read") return await invokeSlackAction({
|
|
@@ -438,8 +441,7 @@ function shouldUseWorkspaceAwareSlackActionSend(rawTarget, context) {
|
|
|
438
441
|
}
|
|
439
442
|
return false;
|
|
440
443
|
}
|
|
441
|
-
|
|
442
|
-
//#region extensions/slack/src/conversation-route-owner.ts
|
|
444
|
+
// extensions/slack/src/conversation-route-owner.ts
|
|
443
445
|
function prepareSlackConversationRouteOwner(params) {
|
|
444
446
|
const accountId = normalizeAccountId$2(params.accountId);
|
|
445
447
|
const accountConfig = resolveAccountEntry(params.cfg.channels?.slack?.accounts, accountId);
|
|
@@ -559,8 +561,7 @@ const slackConversationRouteOwners = { prepareConversationRouteOwnersAsync: asyn
|
|
|
559
561
|
});
|
|
560
562
|
});
|
|
561
563
|
} };
|
|
562
|
-
|
|
563
|
-
//#region extensions/slack/src/enterprise-user-route.ts
|
|
564
|
+
// extensions/slack/src/enterprise-user-route.ts
|
|
564
565
|
/** Resolve a workspace for a detached Enterprise DM without opening a conversation. */
|
|
565
566
|
async function resolveSlackEnterpriseUserTeamId(params) {
|
|
566
567
|
const account = resolveSlackAccount(params);
|
|
@@ -585,8 +586,28 @@ async function resolveSlackEnterpriseUserTeamId(params) {
|
|
|
585
586
|
if (!teamId) throw new Error("unsupported_enterprise_slack_delivery: recipient shares no verified installed workspace");
|
|
586
587
|
return teamId;
|
|
587
588
|
}
|
|
588
|
-
|
|
589
|
-
|
|
589
|
+
// extensions/slack/src/mention-adapter.ts
|
|
590
|
+
/** The retained ID/name form is for model input; these ranges only describe display. */
|
|
591
|
+
function readSlackDisplayMentions(text) {
|
|
592
|
+
return Array.from(text.matchAll(/<@([UW][A-Z0-9]+)>(?: \(([^\r\n)]{1,256})\))?/gu)).flatMap((match) => {
|
|
593
|
+
const userId = match[1];
|
|
594
|
+
const senderId = userId ? normalizeSlackStableEntry(userId) : null;
|
|
595
|
+
return senderId ? [{
|
|
596
|
+
start: match.index,
|
|
597
|
+
end: match.index + match[0].length,
|
|
598
|
+
senderId,
|
|
599
|
+
...match[2]?.trim() ? { fallbackLabel: match[2].trim() } : {}
|
|
600
|
+
}] : [];
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
const slackMentionAdapter = {
|
|
604
|
+
readDisplayMentions: readSlackDisplayMentions,
|
|
605
|
+
stripPatterns: ({ ctx }) => {
|
|
606
|
+
const preparedPatterns = ctx.ChannelContext?.chat?.mentionStripPatterns;
|
|
607
|
+
return [...Array.isArray(preparedPatterns) ? preparedPatterns.flatMap((pattern) => typeof pattern === "string" ? [escapeRegExp(pattern)] : []) : [], "<@[^>\\s]+>"];
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
// extensions/slack/src/security.ts
|
|
590
611
|
const resolveSlackDmPolicy = createScopedDmSecurityResolver({
|
|
591
612
|
channelKey: "slack",
|
|
592
613
|
resolvePolicy: (account) => account.config.dmPolicy,
|
|
@@ -627,7 +648,7 @@ const collectSlackSecurityFindings = createConditionalWarningCollector.findings(
|
|
|
627
648
|
severity: "warn",
|
|
628
649
|
title: "Slack security warning"
|
|
629
650
|
});
|
|
630
|
-
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-
|
|
651
|
+
const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-C3hXCfDt.mjs").then((n) => n.n));
|
|
631
652
|
const slackSecurityAdapter = {
|
|
632
653
|
resolveDmPolicy: resolveSlackDmPolicy,
|
|
633
654
|
collectWarnings: collectSlackSecurityFindings,
|
|
@@ -636,8 +657,7 @@ const slackSecurityAdapter = {
|
|
|
636
657
|
return await collectSlackSecurityAuditFindings(params);
|
|
637
658
|
}
|
|
638
659
|
};
|
|
639
|
-
|
|
640
|
-
//#region extensions/slack/src/doctor.ts
|
|
660
|
+
// extensions/slack/src/doctor.ts
|
|
641
661
|
const isSlackMutableUnqualifiedAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:(?:[sS][lL][aA][cC][kK]|[uU][sS][eE][rR]):)?(?:[UWBCGDT][A-Z0-9]{2,}|[A-Za-z0-9]{8,})|<@[A-Za-z0-9]{8,}>)$/ });
|
|
642
662
|
const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
643
663
|
channel: "slack",
|
|
@@ -773,8 +793,7 @@ const slackDoctor = {
|
|
|
773
793
|
collectPreviewWarnings: collectSlackUserIdentityWarnings,
|
|
774
794
|
collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
|
|
775
795
|
};
|
|
776
|
-
|
|
777
|
-
//#region extensions/slack/src/shared.ts
|
|
796
|
+
// extensions/slack/src/shared.ts
|
|
778
797
|
const slackConfigAdapter = {
|
|
779
798
|
...slackBaseConfigAdapter,
|
|
780
799
|
inspectAccount: adaptScopedAccountAccessor(inspectSlackAccount)
|
|
@@ -826,8 +845,7 @@ const slackPluginBase = {
|
|
|
826
845
|
collectRuntimeConfigAssignments
|
|
827
846
|
}
|
|
828
847
|
};
|
|
829
|
-
|
|
830
|
-
//#region extensions/slack/src/threading-tool-context.ts
|
|
848
|
+
// extensions/slack/src/threading-tool-context.ts
|
|
831
849
|
function buildSlackThreadingToolContext(params) {
|
|
832
850
|
const account = resolveSlackAccount({
|
|
833
851
|
cfg: params.cfg,
|
|
@@ -857,20 +875,19 @@ function buildSlackThreadingToolContext(params) {
|
|
|
857
875
|
sameChannelThreadRequired: hasExplicitThreadTarget
|
|
858
876
|
};
|
|
859
877
|
}
|
|
860
|
-
|
|
861
|
-
//#region extensions/slack/src/channel.ts
|
|
878
|
+
// extensions/slack/src/channel.ts
|
|
862
879
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/extension-shared"));
|
|
863
880
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/target-resolver-runtime"));
|
|
864
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
865
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
881
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-DKl6yqIv.mjs"));
|
|
882
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-1JpFMcJD.mjs"));
|
|
866
883
|
const bindSlackOutbound = createLazyRuntimeMethodBinder(loadSlackOutboundAdapterModule);
|
|
867
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
868
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
869
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
870
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-
|
|
871
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
872
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
873
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
884
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CGvKYg9F.mjs").then((n) => n.t));
|
|
885
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CF2JME9q.mjs").then((n) => n.n));
|
|
886
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-DDcCAjH1.mjs").then((n) => n.n));
|
|
887
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send-kGJWQtLk.mjs").then((n) => n.n));
|
|
888
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-BHqvMbno.mjs").then((n) => n.n));
|
|
889
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-DEKC3W7P.mjs").then((n) => n.t));
|
|
890
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-DNdw97LA.mjs").then((n) => n.t));
|
|
874
891
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
875
892
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
876
893
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -1048,7 +1065,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1048
1065
|
return null;
|
|
1049
1066
|
}
|
|
1050
1067
|
},
|
|
1051
|
-
conversationBindings:
|
|
1068
|
+
conversationBindings: slackConversationBindings,
|
|
1052
1069
|
messaging: {
|
|
1053
1070
|
...slackConversationRouteOwners,
|
|
1054
1071
|
targetPrefixes: ["slack"],
|
|
@@ -1325,10 +1342,7 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1325
1342
|
});
|
|
1326
1343
|
}
|
|
1327
1344
|
},
|
|
1328
|
-
mentions:
|
|
1329
|
-
const preparedPatterns = ctx.ChannelContext?.chat?.mentionStripPatterns;
|
|
1330
|
-
return [...Array.isArray(preparedPatterns) ? preparedPatterns.flatMap((pattern) => typeof pattern === "string" ? [escapeRegExp(pattern)] : []) : [], "<@[^>\\s]+>"];
|
|
1331
|
-
} }
|
|
1345
|
+
mentions: slackMentionAdapter
|
|
1332
1346
|
},
|
|
1333
1347
|
pairing: {
|
|
1334
1348
|
idLabel: "slackUserId",
|
|
@@ -1391,5 +1405,4 @@ const slackPlugin = createChatChannelPlugin({
|
|
|
1391
1405
|
},
|
|
1392
1406
|
outbound: slackChannelOutbound
|
|
1393
1407
|
});
|
|
1394
|
-
//#endregion
|
|
1395
1408
|
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,11 +1,11 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import { i as createSlackReadClient, o as createSlackTokenCacheKey, p as readLruMapEntry, s as createSlackWebClient } from "./cursor-pages-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { T as assertSlackDetachedTargetAllowed } from "./probe-BHqvMbno.mjs";
|
|
4
|
+
import { i as createSlackReadClient, o as createSlackTokenCacheKey, p as readLruMapEntry, s as createSlackWebClient } from "./cursor-pages-jVn3Vkfi.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
|
+
// extensions/slack/src/channel-type.ts
|
|
9
9
|
var channel_type_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
resolveSlackChannelType: () => resolveSlackChannelType,
|
|
11
11
|
resolveSlackConversationInfo: () => resolveSlackConversationInfo
|
|
@@ -90,5 +90,4 @@ async function resolveSlackConversationInfo(params) {
|
|
|
90
90
|
async function resolveSlackChannelType(params) {
|
|
91
91
|
return (await resolveSlackConversationInfo(params)).type;
|
|
92
92
|
}
|
|
93
|
-
//#endregion
|
|
94
93
|
export { resolveSlackChannelType as n, resolveSlackConversationInfo as r, channel_type_exports as t };
|