@openclaw/slack 2026.8.1-beta.2 → 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-CK4AVI2_.js → accounts-Dm_H77gH.js} +12 -11
- package/dist/{accounts.runtime-Cb7QwWBz.js → accounts.runtime-DRuEK6mL.js} +1 -1
- package/dist/{action-runtime-BkGe7ny_.js → action-runtime-044ldvNL.js} +80 -79
- package/dist/action-runtime.runtime-BL3KzX13.js +2 -0
- package/dist/{actions-BTDXwwE3.js → actions-BI7JkfVm.js} +273 -263
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-CJaNzAq2.js → approval-handler.runtime-DYv0UIZS.js} +53 -174
- package/dist/{channel-D_tovcUL.js → channel-1vIJOzPx.js} +134 -160
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-B9MSdoGN.js → channel-type-DlFSKeIZ.js} +3 -7
- package/dist/{channel.setup-Bch9dYmA.js → channel.setup-ofDi3_Pu.js} +34 -49
- package/dist/{config-schema-xto5jFIx.js → config-schema-BVIMyiDN.js} +42 -19
- package/dist/configured-state.js +34 -0
- package/dist/conversation-binding-route-DFVLUdYF.js +115 -0
- package/dist/{directory-config-CNBz8lJa.js → directory-config-DqfQ42OV.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CFKUtW9E.js → directory-live-BPaNHjmP.js} +2 -2
- package/dist/{group-policy-c4RP9bjc.js → group-policy-BdwszjYn.js} +625 -773
- package/dist/{message-tool-api-BykQB4AU.js → message-tool-api-CJ0kjcg5.js} +23 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-1nF1NtqT.js → monitor-Dq5Cmrvp.js} +3 -3
- package/dist/{outbound-adapter-S81tsswN.js → outbound-adapter-DYaI8ThX.js} +101 -66
- package/dist/{pipeline.runtime-BvYsM5JO.js → pipeline.runtime-Bd22U0ga.js} +494 -474
- package/dist/{policy-TapwbeaT.js → policy-CtQVbde1.js} +2 -1
- package/dist/{probe-HoEg_WxB.js → probe-0usmAb0i.js} +209 -22
- package/dist/{provider-CDNvBXUi.js → provider-CN_8hFv2.js} +296 -178
- package/dist/{relay-source-C9leF11u.js → relay-source-BNGpsdwV.js} +1 -1
- package/dist/{replies-CeOfv82I.js → replies-BSiRQOJ1.js} +48 -27
- package/dist/{resolve-channels-CNPrxaXY.js → resolve-channels-Czheznc8.js} +1 -1
- package/dist/{resolve-users-Dzomuwnr.js → resolve-users-BAOlNimr.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-cYXKkrRD.js → scopes-COSlmhnH.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-Nor0iBwY.js → send-DS9ICrBI.js} +88 -100
- package/dist/send-results-eeOu_HYm.js +23 -0
- package/dist/{send.runtime-BmgNe6S9.js → send.runtime-D_Bb6IuH.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CbX1-Knh.js → setup-surface-BGnd2pSe.js} +6 -6
- package/dist/{shared-zdT5AMp-.js → shared-D5B-5hBg.js} +35 -9
- package/dist/{slash-dispatch.runtime-Bnr9GR1S.js → slash-dispatch.runtime-CilDmI0c.js} +2 -2
- 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 +57 -7
- package/package.json +9 -9
- package/dist/account-configured-BwfXBo_F.js +0 -14
- package/dist/account-inspect-Drw2gAiN.js +0 -89
- package/dist/account-reply-mode-DrUXogvO.js +0 -14
- package/dist/action-runtime.runtime-D9I6uc0Q.js +0 -2
- package/dist/actions.runtime-DLFyUkvg.js +0 -2
- package/dist/block-text-YtiNkqmx.js +0 -79
- package/dist/runtime-api-Cj9nxBNv.js +0 -10
- package/node_modules/p-map/index.d.ts +0 -155
- package/node_modules/p-map/index.js +0 -285
- package/node_modules/p-map/license +0 -9
- package/node_modules/p-map/package.json +0 -57
- package/node_modules/p-map/readme.md +0 -190
- 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
- package/dist/{security-audit-DR097212.js → security-audit-B_yKr7MW.js} +1 -1
|
@@ -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,15 +1,27 @@
|
|
|
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
|
|
15
|
+
function toSlackOutboundResult(result) {
|
|
16
|
+
const { channelId, ...delivery } = result;
|
|
17
|
+
return attachChannelToResult("slack", channelId === void 0 ? delivery : {
|
|
18
|
+
...delivery,
|
|
19
|
+
target: {
|
|
20
|
+
kind: "channel",
|
|
21
|
+
id: channelId
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
13
25
|
const SLACK_RENDERED_PRESENTATION_PROVENANCE_KEY = randomBytes(32);
|
|
14
26
|
function createSlackRenderedPresentationProvenance(resolution) {
|
|
15
27
|
return createHmac("sha256", SLACK_RENDERED_PRESENTATION_PROVENANCE_KEY).update(JSON.stringify([resolution.authoredTextPlacement, resolution.segments])).digest("base64url");
|
|
@@ -39,7 +51,7 @@ function readSlackRenderedPresentation(slackData) {
|
|
|
39
51
|
return;
|
|
40
52
|
}
|
|
41
53
|
}
|
|
42
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
54
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-D_Bb6IuH.js"));
|
|
43
55
|
function resolveSlackSendIdentity(identity) {
|
|
44
56
|
if (!identity) return;
|
|
45
57
|
const username = normalizeOptionalString(identity.name);
|
|
@@ -87,43 +99,45 @@ function withSlackRenderedPresentation(payload, slackData, resolution) {
|
|
|
87
99
|
function readSlackAuthoredTextPlacement(value) {
|
|
88
100
|
return value === "none" || value === "blocks" || value === "outside-blocks" ? value : void 0;
|
|
89
101
|
}
|
|
90
|
-
async function
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
replyToId: params.replyToId,
|
|
95
|
-
threadId: params.threadId
|
|
102
|
+
async function prepareSlackOutboundSend(ctx) {
|
|
103
|
+
const account = resolveSlackAccount({
|
|
104
|
+
cfg: ctx.cfg,
|
|
105
|
+
accountId: ctx.accountId
|
|
96
106
|
});
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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);
|
|
118
140
|
};
|
|
119
|
-
return await send(params.to, params.text, sendOptions);
|
|
120
|
-
}
|
|
121
|
-
function createSlackAttachedSendAdapter() {
|
|
122
|
-
return createAttachedChannelResultAdapter({
|
|
123
|
-
channel: "slack",
|
|
124
|
-
sendText: sendSlackOutboundMessage,
|
|
125
|
-
sendMedia: sendSlackOutboundMessage
|
|
126
|
-
});
|
|
127
141
|
}
|
|
128
142
|
const slackOutbound = {
|
|
129
143
|
deliveryMode: "direct",
|
|
@@ -136,11 +150,19 @@ const slackOutbound = {
|
|
|
136
150
|
return resolution.segments.length > 0 ? withSlackRenderedPresentation(payload, slackData, resolution) : null;
|
|
137
151
|
},
|
|
138
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
|
+
};
|
|
139
161
|
const payload = {
|
|
140
|
-
...
|
|
162
|
+
...preparedCtx.payload,
|
|
141
163
|
text: resolveLegacyInteractiveTextFallback({
|
|
142
|
-
text:
|
|
143
|
-
interactive:
|
|
164
|
+
text: preparedCtx.payload.text,
|
|
165
|
+
interactive: preparedCtx.payload.interactive
|
|
144
166
|
}) ?? ""
|
|
145
167
|
};
|
|
146
168
|
const slackData = payload.channelData?.slack;
|
|
@@ -148,43 +170,48 @@ const slackOutbound = {
|
|
|
148
170
|
let resolution;
|
|
149
171
|
if (renderedResolution) resolution = renderedResolution;
|
|
150
172
|
else resolution = resolveSlackOutboundBlockResolution(payload);
|
|
151
|
-
if (resolution.segments.length === 0)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
+
}
|
|
159
187
|
const mediaUrls = resolvePayloadMediaUrls(payload);
|
|
160
188
|
const deliveryMessages = resolveSlackReplyDeliveryMessages({
|
|
161
189
|
authoredTextPlacement: resolution.authoredTextPlacement,
|
|
162
190
|
segments: resolution.segments,
|
|
163
191
|
text: payload.text
|
|
164
192
|
});
|
|
165
|
-
const
|
|
166
|
-
return
|
|
193
|
+
const sentResults = [];
|
|
194
|
+
return toSlackOutboundResult(await sendPayloadMediaSequenceAndFinalize({
|
|
167
195
|
text: "",
|
|
168
196
|
mediaUrls,
|
|
169
|
-
send: async ({ text, mediaUrl }) => await
|
|
170
|
-
...
|
|
197
|
+
send: async ({ text, mediaUrl }) => await send({
|
|
198
|
+
...preparedCtx,
|
|
171
199
|
text,
|
|
172
|
-
mediaUrl
|
|
173
|
-
deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
|
|
200
|
+
mediaUrl
|
|
174
201
|
}),
|
|
202
|
+
onResult: (result) => {
|
|
203
|
+
sentResults.push(result);
|
|
204
|
+
},
|
|
175
205
|
finalize: async () => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
...ctx,
|
|
206
|
+
for (const message of deliveryMessages) sentResults.push(await send({
|
|
207
|
+
...preparedCtx,
|
|
179
208
|
text: message.text,
|
|
180
209
|
...message.blocks ? { blocks: message.blocks } : {},
|
|
181
210
|
...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
|
|
182
211
|
...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
|
|
183
|
-
...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
if (!lastResult) throw new Error("Slack rendered presentation produced no deliverable segment");
|
|
187
|
-
return lastResult;
|
|
212
|
+
...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {}
|
|
213
|
+
}));
|
|
214
|
+
return mergeSlackSendResults(sentResults);
|
|
188
215
|
}
|
|
189
216
|
}));
|
|
190
217
|
},
|
|
@@ -203,7 +230,7 @@ const slackOutbound = {
|
|
|
203
230
|
const result = results.find(({ channel, meta }) => channel === "slack" && Array.isArray(meta?.slackQuestionActionIds) && meta.slackQuestionActionIds.some((actionId) => typeof actionId === "string" && questionActionIds.includes(actionId)));
|
|
204
231
|
const deliveredDisplayBlocks = (result?.meta)?.[SLACK_QUESTION_FINALIZATION_BLOCKS];
|
|
205
232
|
if (!deliveryMessage || !deliveredDisplayBlocks || !result?.messageId) return;
|
|
206
|
-
const channelId = result.
|
|
233
|
+
const channelId = result.target?.kind === "channel" ? result.target.id : void 0;
|
|
207
234
|
if (!channelId) return;
|
|
208
235
|
const teamId = parseSlackTarget(target.to, { defaultKind: "channel" })?.teamId;
|
|
209
236
|
const questionMessageId = typeof result.meta?.slackQuestionMessageId === "string" ? result.meta.slackQuestionMessageId : result.messageId;
|
|
@@ -232,7 +259,15 @@ const slackOutbound = {
|
|
|
232
259
|
}
|
|
233
260
|
});
|
|
234
261
|
},
|
|
235
|
-
|
|
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
|
+
}
|
|
236
271
|
};
|
|
237
272
|
//#endregion
|
|
238
273
|
export { slackOutbound };
|