@openclaw/slack 2026.8.1-beta.3 → 2026.8.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/account-configured-sUohAxZr.js +33 -0
- package/dist/account-inspect-CN2hBsim.js +87 -0
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BlzxuYle.js → accounts-Dm_H77gH.js} +7 -10
- package/dist/{accounts.runtime-CbabBL8x.js → accounts.runtime-DRuEK6mL.js} +1 -1
- package/dist/{action-runtime-D6jg2CQd.js → action-runtime-044ldvNL.js} +53 -48
- package/dist/action-runtime.runtime-BL3KzX13.js +2 -0
- package/dist/{actions-DFk0ANVB.js → actions-BI7JkfVm.js} +266 -96
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-DYv0UIZS.js} +53 -176
- package/dist/{channel-CA5w7qDF.js → channel-1vIJOzPx.js} +77 -142
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-CZWv55Wu.js → channel-type-DlFSKeIZ.js} +3 -3
- package/dist/{channel.setup-CpyYsEXH.js → channel.setup-ofDi3_Pu.js} +34 -49
- package/dist/{config-schema-CN3XZRX5.js → config-schema-BVIMyiDN.js} +19 -12
- package/dist/configured-state.js +34 -0
- package/dist/{directory-config-BGYyuzWh.js → directory-config-DqfQ42OV.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DjUJQLbq.js → directory-live-BPaNHjmP.js} +2 -2
- package/dist/{group-policy-DyfB_ZIE.js → group-policy-BdwszjYn.js} +581 -743
- package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-CJ0kjcg5.js} +23 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Chrecrb9.js → monitor-Dq5Cmrvp.js} +3 -3
- package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-DYaI8ThX.js} +93 -68
- package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-Bd22U0ga.js} +128 -160
- package/dist/{policy-BKXSxrIS.js → policy-CtQVbde1.js} +2 -1
- package/dist/{probe-BVA65leh.js → probe-0usmAb0i.js} +209 -22
- package/dist/{provider-CUUiwsg2.js → provider-CN_8hFv2.js} +243 -146
- package/dist/{relay-source-mhpMMRG-.js → relay-source-BNGpsdwV.js} +1 -1
- package/dist/{replies-SnWyXcsL.js → replies-BSiRQOJ1.js} +15 -5
- package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-Czheznc8.js} +1 -1
- package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-BAOlNimr.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BSk4GZvZ.js → scopes-COSlmhnH.js} +1 -1
- package/dist/{send-CtnOxKCc.js → send-DS9ICrBI.js} +39 -31
- package/dist/send-results-eeOu_HYm.js +23 -0
- package/dist/{send.runtime-kYctMHSd.js → send.runtime-D_Bb6IuH.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BPFfp6So.js → setup-surface-BGnd2pSe.js} +6 -6
- package/dist/{shared-DJBaslN7.js → shared-D5B-5hBg.js} +26 -6
- package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-CilDmI0c.js} +3 -3
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +14 -6
- package/package.json +9 -7
- package/dist/account-configured-BwfXBo_F.js +0 -14
- package/dist/account-inspect-YJvFBbCR.js +0 -89
- package/dist/action-runtime.runtime-JtoOK9l5.js +0 -2
- package/dist/actions.runtime-CYLsYRai.js +0 -2
- package/dist/runtime-api-DBi7xc_g.js +0 -10
- package/dist/slack-client-kind-BXyOOICI.js +0 -94
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as listSlackAccountIds } from "./accounts-
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
1
|
+
import { n as listSlackAccountIds } from "./accounts-Dm_H77gH.js";
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-CN2hBsim.js";
|
|
3
3
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
4
4
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
@@ -24,6 +24,7 @@ function listSlackMessageActions(cfg, accountId) {
|
|
|
24
24
|
actions.add("reactions");
|
|
25
25
|
}
|
|
26
26
|
if (isActionEnabled("messages")) {
|
|
27
|
+
actions.add("conversation-open");
|
|
27
28
|
actions.add("read");
|
|
28
29
|
actions.add("edit");
|
|
29
30
|
actions.add("delete");
|
|
@@ -71,8 +72,9 @@ const SLACK_MESSAGE_ID_ACTIONS = [
|
|
|
71
72
|
function createSlackFileActionSchema() {
|
|
72
73
|
return { fileId: Type.Optional(Type.String({ description: "Slack file id, starting with \"F\" (for example F0B0LTT8M36). Required for action=\"download-file\". Read it from inbound Slack file metadata at event.files[].id. This is not the Slack message timestamp/messageId." })) };
|
|
73
74
|
}
|
|
74
|
-
function createSlackReactionEmojiSchema() {
|
|
75
|
-
|
|
75
|
+
function createSlackReactionEmojiSchema(emojiListAvailable) {
|
|
76
|
+
const discoveryHint = emojiListAvailable ? " Discover workspace custom emoji with action:\"emoji-list\"." : "";
|
|
77
|
+
return { emoji: Type.Optional(Type.String({ description: "Slack standard or workspace custom emoji shortcode (for example \"white_check_mark\" or \"+1\") or common emoji character (for example \"✅\"). Colons are optional." + discoveryHint })) };
|
|
76
78
|
}
|
|
77
79
|
function createSlackForcedMediaSchema() {
|
|
78
80
|
const description = "Preserve original image bytes without image optimization. Slack still uploads a regular file; this does not convert it into a Slack document.";
|
|
@@ -105,6 +107,22 @@ function describeSlackMessageTool({ cfg, accountId }) {
|
|
|
105
107
|
const actions = listSlackMessageActions(cfg, accountId);
|
|
106
108
|
const capabilities = /* @__PURE__ */ new Set();
|
|
107
109
|
const schema = [];
|
|
110
|
+
if (actions.includes("conversation-open")) schema.push({
|
|
111
|
+
actions: ["conversation-open"],
|
|
112
|
+
visibility: "all-configured",
|
|
113
|
+
properties: {
|
|
114
|
+
userIds: Type.Optional(Type.Array(Type.String({ pattern: "^[UW][A-Z0-9]+$" }), {
|
|
115
|
+
minItems: 1,
|
|
116
|
+
maxItems: 8,
|
|
117
|
+
uniqueItems: true,
|
|
118
|
+
description: "Slack conversation-open: 1-8 other member IDs. One opens a DM; multiple open or reuse a group DM. Exclude the calling account. Use the returned target with action=\"send\"."
|
|
119
|
+
})),
|
|
120
|
+
teamId: Type.Optional(Type.String({
|
|
121
|
+
pattern: "^T[A-Z0-9]+$",
|
|
122
|
+
description: "Slack workspace for conversation-open. Defaults to the trusted current workspace for the selected account; required for detached Enterprise operations."
|
|
123
|
+
}))
|
|
124
|
+
}
|
|
125
|
+
});
|
|
108
126
|
if (actions.includes("send")) capabilities.add("presentation");
|
|
109
127
|
if (actions.includes("download-file")) schema.push({
|
|
110
128
|
properties: createSlackFileActionSchema(),
|
|
@@ -119,7 +137,7 @@ function describeSlackMessageTool({ cfg, accountId }) {
|
|
|
119
137
|
actions: ["upload-file"]
|
|
120
138
|
});
|
|
121
139
|
if (actions.includes("react")) schema.push({
|
|
122
|
-
properties: createSlackReactionEmojiSchema(),
|
|
140
|
+
properties: createSlackReactionEmojiSchema(actions.includes("emoji-list")),
|
|
123
141
|
actions: ["react", "reactions"]
|
|
124
142
|
});
|
|
125
143
|
const messageIdActions = [];
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeSlackMessageTool } from "./message-tool-api-
|
|
1
|
+
import { t as describeSlackMessageTool } from "./message-tool-api-CJ0kjcg5.js";
|
|
2
2
|
export { describeSlackMessageTool as describeMessageTool };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
4
|
-
import { o as resolveSlackThreadTs } from "./replies-
|
|
2
|
+
import { T as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-CN_8hFv2.js";
|
|
3
|
+
import { t as isSlackChannelAllowedByPolicy } from "./policy-CtQVbde1.js";
|
|
4
|
+
import { o as resolveSlackThreadTs } from "./replies-BSiRQOJ1.js";
|
|
5
5
|
//#region extensions/slack/src/monitor.ts
|
|
6
6
|
var monitor_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
1
2
|
import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
2
|
-
import {
|
|
3
|
+
import { M as SLACK_TEXT_LIMIT, O as resolveSlackAuthoredTextPlacement, c as assertSlackDetachedTargetAllowed, d as resolveSlackReplyBlockResolution, et as escapeSlackMrkdwn, p as resolveSlackReplyDeliveryMessages, q as resolveSlackQuestionActionIds, rt as SLACK_PRESENTATION_CAPABILITIES, u as parseSlackReplyBlockSegments, z as SLACK_QUESTION_FINALIZATION_BLOCKS } from "./group-policy-BdwszjYn.js";
|
|
3
4
|
import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
|
|
5
|
+
import { t as mergeSlackSendResults } from "./send-results-eeOu_HYm.js";
|
|
4
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
7
|
import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
6
8
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
9
|
import { normalizeMessagePresentation, resolveLegacyInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
|
|
10
|
+
import { resolvePayloadMediaUrls, sendPayloadMediaSequenceAndFinalize, sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload";
|
|
8
11
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
9
12
|
import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
|
|
10
|
-
import {
|
|
11
|
-
import { attachChannelToResult, createAttachedChannelResultAdapter } from "openclaw/plugin-sdk/channel-send-result";
|
|
13
|
+
import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
|
|
12
14
|
//#region extensions/slack/src/outbound-adapter.ts
|
|
13
15
|
function toSlackOutboundResult(result) {
|
|
14
16
|
const { channelId, ...delivery } = result;
|
|
15
|
-
return channelId === void 0 ? delivery : {
|
|
17
|
+
return attachChannelToResult("slack", channelId === void 0 ? delivery : {
|
|
16
18
|
...delivery,
|
|
17
19
|
target: {
|
|
18
20
|
kind: "channel",
|
|
19
21
|
id: channelId
|
|
20
22
|
}
|
|
21
|
-
};
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
25
|
const SLACK_RENDERED_PRESENTATION_PROVENANCE_KEY = randomBytes(32);
|
|
24
26
|
function createSlackRenderedPresentationProvenance(resolution) {
|
|
@@ -49,7 +51,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
54
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-D_Bb6IuH.js"));
|
|
53
55
|
function resolveSlackSendIdentity(identity) {
|
|
54
56
|
if (!identity) return;
|
|
55
57
|
const username = normalizeOptionalString(identity.name);
|
|
@@ -97,43 +99,45 @@ function withSlackRenderedPresentation(payload, slackData, resolution) {
|
|
|
97
99
|
function readSlackAuthoredTextPlacement(value) {
|
|
98
100
|
return value === "none" || value === "blocks" || value === "outside-blocks" ? value : void 0;
|
|
99
101
|
}
|
|
100
|
-
async function
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
replyToId: params.replyToId,
|
|
105
|
-
threadId: params.threadId
|
|
102
|
+
async function prepareSlackOutboundSend(ctx) {
|
|
103
|
+
const account = resolveSlackAccount({
|
|
104
|
+
cfg: ctx.cfg,
|
|
105
|
+
accountId: ctx.accountId
|
|
106
106
|
});
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
const target = parseSlackTarget(ctx.to, { defaultKind: "channel" });
|
|
108
|
+
assertSlackDetachedTargetAllowed(account.accountId, target?.teamId);
|
|
109
|
+
const send = resolveOutboundSendDep(ctx.deps, "slack") ?? (await loadSlackSendRuntime()).sendMessageSlack;
|
|
110
|
+
const token = resolveSlackOperationToken(account, "write");
|
|
111
|
+
const botToken = account.botToken?.trim();
|
|
112
|
+
const tokenOverride = token && token !== botToken ? token : void 0;
|
|
113
|
+
return async (params) => {
|
|
114
|
+
const slackIdentity = resolveSlackSendIdentity(params.identity);
|
|
115
|
+
const threadTs = resolveSlackThreadTsValue(params);
|
|
116
|
+
const sendOptions = {
|
|
117
|
+
cfg: params.cfg,
|
|
118
|
+
...tokenOverride ? { token: tokenOverride } : {},
|
|
119
|
+
threadTs,
|
|
120
|
+
accountId: params.accountId ?? void 0,
|
|
121
|
+
...params.mediaUrl ? {
|
|
122
|
+
mediaUrl: params.mediaUrl,
|
|
123
|
+
mediaAccess: params.mediaAccess,
|
|
124
|
+
mediaLocalRoots: params.mediaLocalRoots,
|
|
125
|
+
mediaReadFile: params.mediaReadFile,
|
|
126
|
+
...params.forceDocument ? { forceDocument: true } : {}
|
|
127
|
+
} : {},
|
|
128
|
+
...params.blocks ? { blocks: params.blocks } : {},
|
|
129
|
+
...params.authoredTextPlacement ? { authoredTextPlacement: params.authoredTextPlacement } : {},
|
|
130
|
+
...Object.hasOwn(params, "nativeDataFallbackBaseText") ? { nativeDataFallbackBaseText: params.nativeDataFallbackBaseText } : {},
|
|
131
|
+
...params.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
|
|
132
|
+
...slackIdentity ? { identity: slackIdentity } : {},
|
|
133
|
+
...params.deliveryQueueId ? { deliveryQueueId: params.deliveryQueueId } : {},
|
|
134
|
+
...params.onPlatformSendDispatch ? { onPlatformSendDispatch: params.onPlatformSendDispatch } : {},
|
|
135
|
+
...params.onDeliveryResult ? { onDeliveryResult: async (progress) => {
|
|
136
|
+
await params.onDeliveryResult?.(toSlackOutboundResult(progress));
|
|
137
|
+
} } : {}
|
|
138
|
+
};
|
|
139
|
+
return await send(params.to, params.text, sendOptions);
|
|
128
140
|
};
|
|
129
|
-
return await send(params.to, params.text, sendOptions);
|
|
130
|
-
}
|
|
131
|
-
function createSlackAttachedSendAdapter() {
|
|
132
|
-
return createAttachedChannelResultAdapter({
|
|
133
|
-
channel: "slack",
|
|
134
|
-
sendText: async (ctx) => toSlackOutboundResult(await sendSlackOutboundMessage(ctx)),
|
|
135
|
-
sendMedia: async (ctx) => toSlackOutboundResult(await sendSlackOutboundMessage(ctx))
|
|
136
|
-
});
|
|
137
141
|
}
|
|
138
142
|
const slackOutbound = {
|
|
139
143
|
deliveryMode: "direct",
|
|
@@ -146,11 +150,19 @@ const slackOutbound = {
|
|
|
146
150
|
return resolution.segments.length > 0 ? withSlackRenderedPresentation(payload, slackData, resolution) : null;
|
|
147
151
|
},
|
|
148
152
|
sendPayload: async (ctx) => {
|
|
153
|
+
const send = await prepareSlackOutboundSend(ctx);
|
|
154
|
+
const { mediaUrl: _mediaUrl, ...commonCtx } = ctx;
|
|
155
|
+
const preparedCtx = {
|
|
156
|
+
...commonCtx,
|
|
157
|
+
replyToId: resolveSlackThreadTsValue(ctx),
|
|
158
|
+
threadId: null,
|
|
159
|
+
deliveryQueueId: void 0
|
|
160
|
+
};
|
|
149
161
|
const payload = {
|
|
150
|
-
...
|
|
162
|
+
...preparedCtx.payload,
|
|
151
163
|
text: resolveLegacyInteractiveTextFallback({
|
|
152
|
-
text:
|
|
153
|
-
interactive:
|
|
164
|
+
text: preparedCtx.payload.text,
|
|
165
|
+
interactive: preparedCtx.payload.interactive
|
|
154
166
|
}) ?? ""
|
|
155
167
|
};
|
|
156
168
|
const slackData = payload.channelData?.slack;
|
|
@@ -158,45 +170,50 @@ const slackOutbound = {
|
|
|
158
170
|
let resolution;
|
|
159
171
|
if (renderedResolution) resolution = renderedResolution;
|
|
160
172
|
else resolution = resolveSlackOutboundBlockResolution(payload);
|
|
161
|
-
if (resolution.segments.length === 0)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
if (resolution.segments.length === 0) {
|
|
174
|
+
const sendPart = async (part) => toSlackOutboundResult(await send(part));
|
|
175
|
+
return await sendTextMediaPayload({
|
|
176
|
+
channel: "slack",
|
|
177
|
+
ctx: {
|
|
178
|
+
...preparedCtx,
|
|
179
|
+
payload
|
|
180
|
+
},
|
|
181
|
+
adapter: {
|
|
182
|
+
sendText: sendPart,
|
|
183
|
+
sendMedia: sendPart
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
169
187
|
const mediaUrls = resolvePayloadMediaUrls(payload);
|
|
170
188
|
const deliveryMessages = resolveSlackReplyDeliveryMessages({
|
|
171
189
|
authoredTextPlacement: resolution.authoredTextPlacement,
|
|
172
190
|
segments: resolution.segments,
|
|
173
191
|
text: payload.text
|
|
174
192
|
});
|
|
175
|
-
const
|
|
176
|
-
return
|
|
193
|
+
const sentResults = [];
|
|
194
|
+
return toSlackOutboundResult(await sendPayloadMediaSequenceAndFinalize({
|
|
177
195
|
text: "",
|
|
178
196
|
mediaUrls,
|
|
179
|
-
send: async ({ text, mediaUrl }) => await
|
|
180
|
-
...
|
|
197
|
+
send: async ({ text, mediaUrl }) => await send({
|
|
198
|
+
...preparedCtx,
|
|
181
199
|
text,
|
|
182
|
-
mediaUrl
|
|
183
|
-
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
200
|
+
mediaUrl
|
|
184
201
|
}),
|
|
202
|
+
onResult: (result) => {
|
|
203
|
+
sentResults.push(result);
|
|
204
|
+
},
|
|
185
205
|
finalize: async () => {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
...ctx,
|
|
206
|
+
for (const message of deliveryMessages) sentResults.push(await send({
|
|
207
|
+
...preparedCtx,
|
|
189
208
|
text: message.text,
|
|
190
209
|
...message.blocks ? { blocks: message.blocks } : {},
|
|
191
210
|
...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
|
|
192
211
|
...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
|
|
193
|
-
...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
if (!lastResult) throw new Error("Slack rendered presentation produced no deliverable segment");
|
|
197
|
-
return lastResult;
|
|
212
|
+
...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {}
|
|
213
|
+
}));
|
|
214
|
+
return mergeSlackSendResults(sentResults);
|
|
198
215
|
}
|
|
199
|
-
}))
|
|
216
|
+
}));
|
|
200
217
|
},
|
|
201
218
|
afterDeliverPayload: async ({ cfg, target, payload, results }) => {
|
|
202
219
|
const questionId = questionGatewayRuntime.readAskUserQuestionId(payload);
|
|
@@ -242,7 +259,15 @@ const slackOutbound = {
|
|
|
242
259
|
}
|
|
243
260
|
});
|
|
244
261
|
},
|
|
245
|
-
|
|
262
|
+
sendText: async (ctx) => {
|
|
263
|
+
return toSlackOutboundResult(await (await prepareSlackOutboundSend(ctx))(ctx));
|
|
264
|
+
},
|
|
265
|
+
sendMedia: async (ctx) => {
|
|
266
|
+
return toSlackOutboundResult(await (await prepareSlackOutboundSend(ctx))({
|
|
267
|
+
...ctx,
|
|
268
|
+
deliveryQueueId: void 0
|
|
269
|
+
}));
|
|
270
|
+
}
|
|
246
271
|
};
|
|
247
272
|
//#endregion
|
|
248
273
|
export { slackOutbound };
|