@openclaw/slack 2026.8.1-beta.3 → 2026.8.2
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-C3sePHWa.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-B0kRJ69h.js} +90 -75
- package/dist/action-runtime.runtime-IuA14rev.js +2 -0
- package/dist/{actions-DFk0ANVB.js → actions-BOxiu2Vy.js} +278 -102
- package/dist/api.js +15 -15
- package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-l5_2JLqi.js} +58 -180
- package/dist/{channel-CA5w7qDF.js → channel-BguxhhNG.js} +97 -154
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-CZWv55Wu.js → channel-type-ChkODKBW.js} +3 -3
- package/dist/{channel.setup-CpyYsEXH.js → channel.setup-BJohRJha.js} +54 -68
- package/dist/{config-schema-CN3XZRX5.js → config-schema-B9GwoRlE.js} +24 -15
- package/dist/configured-state.js +34 -0
- package/dist/{conversation-binding-route-DFVLUdYF.js → conversation-binding-route-Vee8Dgbf.js} +2 -2
- package/dist/{directory-config-BGYyuzWh.js → directory-config-Bmw4ykSy.js} +5 -4
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DjUJQLbq.js → directory-live-BOILcXPo.js} +2 -2
- package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-DyfB_ZIE.js → group-policy-BYH74y50.js} +643 -774
- package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-BsZbsulu.js} +23 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Chrecrb9.js → monitor-B72wWXWg.js} +3 -3
- package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-CPgYQ-BM.js} +94 -69
- package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-CcdujV99.js} +357 -544
- package/dist/{policy-BKXSxrIS.js → policy-CUpBeOt9.js} +7 -4
- package/dist/{probe-BVA65leh.js → probe-gj5yQgN2.js} +209 -21
- package/dist/{provider-CUUiwsg2.js → provider-DW9YC_no.js} +301 -179
- package/dist/{relay-source-mhpMMRG-.js → relay-source-BLMdBrAw.js} +6 -4
- package/dist/{replies-SnWyXcsL.js → replies-DLjQ8RYU.js} +25 -10
- package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-Bv6IiGZ4.js} +4 -3
- package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-BXw2pA7y.js} +4 -3
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BSk4GZvZ.js → scopes-B9HRguDe.js} +1 -1
- package/dist/{send-CtnOxKCc.js → send-GUz4_v2E.js} +58 -42
- package/dist/send-results-eeOu_HYm.js +23 -0
- package/dist/{send.runtime-kYctMHSd.js → send.runtime-rScD-UJi.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BPFfp6So.js → setup-surface-Cc3P-z35.js} +6 -6
- package/dist/{shared-DJBaslN7.js → shared-CQGVZ_8a.js} +28 -8
- package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-C2015r6s.js} +3 -3
- package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
- package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.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/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/negotiator/lib/accept.js +54 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
- 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 +41 -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/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
- 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,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAxZr.js";
|
|
2
|
+
import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-Dm_H77gH.js";
|
|
3
|
+
import { n as resolveSlackConversationBindingRoute, r as resolveSlackReplyToMode, t as normalizeSlackRouteBindingConfig } from "./conversation-binding-route-Vee8Dgbf.js";
|
|
4
|
+
import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
5
|
+
import { t as slackContextTargetsMatch } from "./targets-7FexXJ62.js";
|
|
6
|
+
import { $ as renderSlackMessagePresentationFallbackText, Ct as isSlackApprovalAuthorizedSender, Et as isSlackExecApprovalClientEnabled, F as canRenderSlackPresentation, I as countSlackTextUtf8Bytes, M as SLACK_TEXT_LIMIT, Ot as resolveSlackExecApprovalTarget, P as buildSlackPresentationBlocks, Q as normalizeSlackOutboundText, St as getSlackApprovalApproversForTeam, Tt as isSlackExecApprovalAuthorizedSender, _t as shouldHandleSlackPluginViaForwardingSession, a as qualifySlackConversationId, bt as isSlackWorkspaceInstallation, c as assertSlackDetachedTargetAllowed, ct as hasSlackPluginApprovers, d as resolveSlackReplyBlockResolution, dt as normalizeSlackOriginTarget, f as resolveSlackReplyBlocks, ft as resolveEnterpriseApprovalTeamId, gt as shouldHandleSlackNativeApprovalRequest, ht as resolveTurnSourceSlackOriginTarget, i as resolveSlackGroupToolPolicy, jt as resolveSlackAutoThreadId, k as SLACK_EDIT_TEXT_MAX_BYTES, kt as shouldSuppressLocalSlackExecApprovalPrompt, lt as isSlackAnyNativeApprovalClientEnabled, mt as resolveSlackFallbackOriginTarget, o as qualifySlackRoutePeerId, p as resolveSlackReplyDeliveryMessages, pt as resolveSessionSlackOriginTarget, r as resolveSlackGroupRequireMention, rt as SLACK_PRESENTATION_CAPABILITIES, ut as normalizeSlackForwardTarget, vt as slackTargetsMatch, wt as getSlackExecApprovalApprovers, yt as getSlackInstallationKind } from "./group-policy-BYH74y50.js";
|
|
7
|
+
import { m as getSlackWriteClient, o as formatSlackError } from "./probe-gj5yQgN2.js";
|
|
7
8
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
8
|
-
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-
|
|
9
|
-
import {
|
|
10
|
-
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-
|
|
9
|
+
import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-BsZbsulu.js";
|
|
10
|
+
import { a as PAIRING_APPROVED_MESSAGE, i as DEFAULT_ACCOUNT_ID$1, n as slackConfigAdapter, o as projectCredentialSnapshotFields, r as slackSecurityAdapter, s as resolveConfiguredFromRequiredCredentialStatuses, t as createSlackPluginBase } from "./shared-CQGVZ_8a.js";
|
|
11
|
+
import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-ChkODKBW.js";
|
|
11
12
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
12
|
-
import {
|
|
13
|
-
import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-CpyYsEXH.js";
|
|
13
|
+
import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-BJohRJha.js";
|
|
14
14
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
15
15
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
17
17
|
import { buildOutboundBaseSessionKey, normalizeMessageChannel, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|
18
18
|
import { buildLegacyDmAccountAllowlistAdapter, createAccountScopedAllowlistNameResolver, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
19
19
|
import { buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
20
|
-
import { createChannelMessageAdapterFromOutbound, createRuntimeOutboundDelegates
|
|
20
|
+
import { createChannelMessageAdapterFromOutbound, createRuntimeOutboundDelegates } from "openclaw/plugin-sdk/channel-outbound";
|
|
21
21
|
import { createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
22
22
|
import { createChannelDirectoryAdapter, createRuntimeDirectoryLiveAdapter } from "openclaw/plugin-sdk/directory-runtime";
|
|
23
23
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -30,7 +30,8 @@ import { createChannelNativeOriginTargetResolver, createNativeApprovalForwarding
|
|
|
30
30
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
31
31
|
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
32
32
|
import { normalizeLegacyInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
|
|
33
|
-
import {
|
|
33
|
+
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
34
|
+
import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/param-readers";
|
|
34
35
|
//#region extensions/slack/src/approval-native.ts
|
|
35
36
|
function resolveSlackNativeSuppressionAccountId({ target, request }) {
|
|
36
37
|
return normalizeOptionalString(target.accountId) ?? normalizeOptionalString(request.request.turnSourceAccountId);
|
|
@@ -61,14 +62,20 @@ function resolveSlackApproverDmTargets(params) {
|
|
|
61
62
|
approvalKind: params.approvalKind,
|
|
62
63
|
request: params.request
|
|
63
64
|
})) return [];
|
|
64
|
-
const approvers = params.approvalKind === "plugin" ? getSlackApprovalApprovers(params) : getSlackExecApprovalApprovers(params);
|
|
65
65
|
const teamId = resolveEnterpriseApprovalTeamId(params.request);
|
|
66
|
-
return
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
return (params.approvalKind === "plugin" ? getSlackApprovalApproversForTeam({
|
|
67
|
+
...params,
|
|
68
|
+
teamId
|
|
69
|
+
}) : getSlackExecApprovalApprovers(params)).map((approver) => {
|
|
70
|
+
const target = parseSlackTarget(approver, { defaultKind: "user" });
|
|
71
|
+
if (!target || target.kind !== "user") throw new Error("Slack approval approver target must be a user");
|
|
72
|
+
return { to: formatSlackTarget({
|
|
73
|
+
kind: "user",
|
|
74
|
+
id: target.id,
|
|
75
|
+
teamId: target.teamId ?? teamId,
|
|
76
|
+
explicitKind: true
|
|
77
|
+
}) };
|
|
78
|
+
});
|
|
72
79
|
}
|
|
73
80
|
const shouldSuppressSlackForwardingFallback = createNativeApprovalForwardingFallbackSuppressor({
|
|
74
81
|
channel: "slack",
|
|
@@ -88,7 +95,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
88
95
|
channelLabel: "Slack",
|
|
89
96
|
describeExecApprovalSetup: ({ accountId }) => {
|
|
90
97
|
const prefix = accountId && accountId !== "default" ? `channels.slack.accounts.${accountId}` : "channels.slack";
|
|
91
|
-
return `Approve it from the Web UI or terminal UI for now. Slack supports native exec approvals for this account. Configure \`${prefix}.execApprovals.approvers\` or \`commands.ownerAllowFrom\`;
|
|
98
|
+
return `Approve it from the Web UI or terminal UI for now. Slack supports native exec approvals for this account. Configure \`${prefix}.execApprovals.approvers\` or \`commands.ownerAllowFrom\`; set \`${prefix}.execApprovals.enabled\` to \`auto\` or \`true\`. Unset or \`false\` disables native exec approval delivery.`;
|
|
92
99
|
},
|
|
93
100
|
listAccountIds: listSlackAccountIds,
|
|
94
101
|
hasApprovers: ({ cfg, accountId }) => getSlackExecApprovalApprovers({
|
|
@@ -130,7 +137,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
|
|
|
130
137
|
approvalKind,
|
|
131
138
|
request
|
|
132
139
|
}),
|
|
133
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
140
|
+
load: async () => (await import("./approval-handler.runtime-l5_2JLqi.js")).slackApprovalNativeRuntime
|
|
134
141
|
})
|
|
135
142
|
});
|
|
136
143
|
const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
|
|
@@ -172,7 +179,8 @@ const slackApprovalCapability = {
|
|
|
172
179
|
preferredSurface: "origin",
|
|
173
180
|
supportsApproverDmSurface: hasSlackPluginApprovers({
|
|
174
181
|
cfg: params.cfg,
|
|
175
|
-
accountId: params.accountId
|
|
182
|
+
accountId: params.accountId,
|
|
183
|
+
teamId: resolveEnterpriseApprovalTeamId(request)
|
|
176
184
|
})
|
|
177
185
|
} : {}
|
|
178
186
|
};
|
|
@@ -192,7 +200,7 @@ function resolveSlackPresentationText(content, presentation) {
|
|
|
192
200
|
}
|
|
193
201
|
function renderSlackActionPresentation(presentation) {
|
|
194
202
|
if (!presentation) return { usesPresentationTextFallback: false };
|
|
195
|
-
const renderedBlocks = canRenderSlackPresentation(presentation) ? buildSlackPresentationBlocks(presentation) : void 0;
|
|
203
|
+
const renderedBlocks = !presentation.blocks.some((block) => (block.type === "text" || block.type === "context") && block.text.trim().length > 3e3) && canRenderSlackPresentation(presentation) ? buildSlackPresentationBlocks(presentation) : void 0;
|
|
196
204
|
const usesPresentationTextFallback = !renderedBlocks || renderedBlocks.length > 50;
|
|
197
205
|
const blocks = usesPresentationTextFallback ? void 0 : renderedBlocks;
|
|
198
206
|
return {
|
|
@@ -206,16 +214,22 @@ async function handleSlackMessageAction(params) {
|
|
|
206
214
|
const { action, cfg, params: actionParams } = ctx;
|
|
207
215
|
const accountId = ctx.accountId ?? void 0;
|
|
208
216
|
const resolveChannelId = () => {
|
|
209
|
-
const channelId = readStringParam(actionParams, "channelId") ?? readStringParam(actionParams, "to", { required: true });
|
|
217
|
+
const channelId = readStringParam$1(actionParams, "channelId") ?? readStringParam$1(actionParams, "to", { required: true });
|
|
210
218
|
return normalizeChannelId ? normalizeChannelId(channelId) : channelId;
|
|
211
219
|
};
|
|
220
|
+
if (action === "conversation-open") return await invoke({
|
|
221
|
+
action: "openConversation",
|
|
222
|
+
userIds: actionParams.userIds,
|
|
223
|
+
teamId: readStringParam$1(actionParams, "teamId"),
|
|
224
|
+
accountId
|
|
225
|
+
}, cfg, ctx.toolContext);
|
|
212
226
|
if (action === "send") {
|
|
213
|
-
const to = readStringParam(actionParams, "to", { required: true });
|
|
214
|
-
const content = readStringParam(actionParams, "message", {
|
|
227
|
+
const to = readStringParam$1(actionParams, "to", { required: true });
|
|
228
|
+
const content = readStringParam$1(actionParams, "message", {
|
|
215
229
|
required: false,
|
|
216
230
|
allowEmpty: true
|
|
217
231
|
});
|
|
218
|
-
const mediaUrl = readStringParam(actionParams, "media", { trim: false });
|
|
232
|
+
const mediaUrl = readStringParam$1(actionParams, "media", { trim: false });
|
|
219
233
|
const presentation = normalizeMessagePresentation(actionParams.presentation);
|
|
220
234
|
const interactive = normalizeLegacyInteractiveReply(actionParams.interactive);
|
|
221
235
|
const hasStructuredContent = Boolean(presentation || interactive?.blocks.length);
|
|
@@ -232,8 +246,8 @@ async function handleSlackMessageAction(params) {
|
|
|
232
246
|
if (!content && preparedMessages.length === 0 && !mediaUrl) throw new Error("Slack send requires message, blocks, or media.");
|
|
233
247
|
const replyBroadcast = readBooleanParam(actionParams, "replyBroadcast");
|
|
234
248
|
if (replyBroadcast && mediaUrl) throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");
|
|
235
|
-
const threadId = readStringParam(actionParams, "threadId");
|
|
236
|
-
const replyTo = readStringParam(actionParams, "replyTo");
|
|
249
|
+
const threadId = readStringParam$1(actionParams, "threadId");
|
|
250
|
+
const replyTo = readStringParam$1(actionParams, "replyTo");
|
|
237
251
|
const topLevel = readBooleanParam(actionParams, "topLevel") === true || actionParams.threadId === null;
|
|
238
252
|
const toolContext = preparedMessages.length > 0 ? {
|
|
239
253
|
...ctx.toolContext,
|
|
@@ -246,7 +260,10 @@ async function handleSlackMessageAction(params) {
|
|
|
246
260
|
mediaUrl: mediaUrl ?? void 0,
|
|
247
261
|
...readSlackForceDocument(actionParams) ? { forceDocument: true } : {},
|
|
248
262
|
accountId,
|
|
249
|
-
threadTs:
|
|
263
|
+
threadTs: resolveSlackThreadTsValue({
|
|
264
|
+
replyToId: replyTo,
|
|
265
|
+
threadId
|
|
266
|
+
}),
|
|
250
267
|
...topLevel ? { topLevel: true } : {},
|
|
251
268
|
...replyBroadcast ? { replyBroadcast } : {}
|
|
252
269
|
}, cfg, toolContext);
|
|
@@ -258,7 +275,7 @@ async function handleSlackMessageAction(params) {
|
|
|
258
275
|
});
|
|
259
276
|
if (messageIdRaw == null) throw new Error("messageId required. Provide messageId explicitly or react to the current inbound message.");
|
|
260
277
|
const messageId = String(messageIdRaw);
|
|
261
|
-
const emoji = readStringParam(actionParams, "emoji", { allowEmpty: true });
|
|
278
|
+
const emoji = readStringParam$1(actionParams, "emoji", { allowEmpty: true });
|
|
262
279
|
const remove = typeof actionParams.remove === "boolean" ? actionParams.remove : void 0;
|
|
263
280
|
return await invoke({
|
|
264
281
|
action: "react",
|
|
@@ -270,7 +287,7 @@ async function handleSlackMessageAction(params) {
|
|
|
270
287
|
}, cfg, ctx.toolContext);
|
|
271
288
|
}
|
|
272
289
|
if (action === "reactions") {
|
|
273
|
-
const messageId = readStringParam(actionParams, "messageId", { required: true });
|
|
290
|
+
const messageId = readStringParam$1(actionParams, "messageId", { required: true });
|
|
274
291
|
return await invoke({
|
|
275
292
|
action: "reactions",
|
|
276
293
|
channelId: resolveChannelId(),
|
|
@@ -284,17 +301,17 @@ async function handleSlackMessageAction(params) {
|
|
|
284
301
|
action: "readMessages",
|
|
285
302
|
channelId: resolveChannelId(),
|
|
286
303
|
limit: actionParams.limit,
|
|
287
|
-
before: readStringParam(actionParams, "before"),
|
|
288
|
-
after: readStringParam(actionParams, "after"),
|
|
289
|
-
messageId: readStringParam(actionParams, "messageId"),
|
|
304
|
+
before: readStringParam$1(actionParams, "before"),
|
|
305
|
+
after: readStringParam$1(actionParams, "after"),
|
|
306
|
+
messageId: readStringParam$1(actionParams, "messageId"),
|
|
290
307
|
accountId
|
|
291
308
|
};
|
|
292
|
-
if (includeReadThreadId) readAction.threadId = readStringParam(actionParams, "threadId");
|
|
309
|
+
if (includeReadThreadId) readAction.threadId = readStringParam$1(actionParams, "threadId");
|
|
293
310
|
return await invoke(readAction, cfg, ctx.toolContext);
|
|
294
311
|
}
|
|
295
312
|
if (action === "edit") {
|
|
296
|
-
const messageId = readStringParam(actionParams, "messageId", { required: true });
|
|
297
|
-
const content = readStringParam(actionParams, "message", { allowEmpty: true });
|
|
313
|
+
const messageId = readStringParam$1(actionParams, "messageId", { required: true });
|
|
314
|
+
const content = readStringParam$1(actionParams, "message", { allowEmpty: true });
|
|
298
315
|
const presentation = normalizeMessagePresentation(actionParams.presentation);
|
|
299
316
|
const renderedPresentation = renderSlackActionPresentation(presentation);
|
|
300
317
|
const blocks = renderedPresentation.usesPresentationTextFallback ? void 0 : renderedPresentation.blocks;
|
|
@@ -302,7 +319,15 @@ async function handleSlackMessageAction(params) {
|
|
|
302
319
|
text: content,
|
|
303
320
|
presentation
|
|
304
321
|
}) : resolveSlackPresentationText(content, presentation);
|
|
305
|
-
|
|
322
|
+
const tableMode = resolveMarkdownTableMode({
|
|
323
|
+
cfg,
|
|
324
|
+
channel: "slack",
|
|
325
|
+
accountId: accountId ?? resolveDefaultSlackAccountId(cfg)
|
|
326
|
+
});
|
|
327
|
+
if (!blocks && countSlackTextUtf8Bytes(normalizeSlackOutboundText(accessibleContent, { tableMode })) > 4e3) {
|
|
328
|
+
const editSubject = renderedPresentation.usesPresentationTextFallback ? "Slack presentation fallback" : "Slack edit";
|
|
329
|
+
throw new Error(`${editSubject} exceeds the ${String(SLACK_EDIT_TEXT_MAX_BYTES)}-byte edit limit. Send a new message instead.`);
|
|
330
|
+
}
|
|
306
331
|
if (!accessibleContent && !blocks) throw new Error("Slack edit requires message or blocks.");
|
|
307
332
|
return await invoke({
|
|
308
333
|
action: "editMessage",
|
|
@@ -314,7 +339,7 @@ async function handleSlackMessageAction(params) {
|
|
|
314
339
|
}, cfg, ctx.toolContext);
|
|
315
340
|
}
|
|
316
341
|
if (action === "delete") {
|
|
317
|
-
const messageId = readStringParam(actionParams, "messageId", { required: true });
|
|
342
|
+
const messageId = readStringParam$1(actionParams, "messageId", { required: true });
|
|
318
343
|
return await invoke({
|
|
319
344
|
action: "deleteMessage",
|
|
320
345
|
channelId: resolveChannelId(),
|
|
@@ -323,7 +348,7 @@ async function handleSlackMessageAction(params) {
|
|
|
323
348
|
}, cfg, ctx.toolContext);
|
|
324
349
|
}
|
|
325
350
|
if (action === "pin" || action === "unpin" || action === "list-pins") {
|
|
326
|
-
const messageId = action === "list-pins" ? void 0 : readStringParam(actionParams, "messageId", { required: true });
|
|
351
|
+
const messageId = action === "list-pins" ? void 0 : readStringParam$1(actionParams, "messageId", { required: true });
|
|
327
352
|
return await invoke({
|
|
328
353
|
action: action === "pin" ? "pinMessage" : action === "unpin" ? "unpinMessage" : "listPins",
|
|
329
354
|
channelId: resolveChannelId(),
|
|
@@ -335,7 +360,7 @@ async function handleSlackMessageAction(params) {
|
|
|
335
360
|
const requesterAccountId = ctx.requesterAccountId ? normalizeAccountId(ctx.requesterAccountId) : void 0;
|
|
336
361
|
const targetAccountId = normalizeAccountId(accountId ?? resolveDefaultSlackAccountId(cfg));
|
|
337
362
|
const requesterUserId = normalizeOptionalLowercaseString(ctx.toolContext?.currentChannelProvider) === "slack" && requesterAccountId !== void 0 && requesterAccountId === targetAccountId ? normalizeOptionalString(ctx.requesterSenderId) : void 0;
|
|
338
|
-
const userId = readStringParam(actionParams, "userId") ?? requesterUserId;
|
|
363
|
+
const userId = readStringParam$1(actionParams, "userId") ?? requesterUserId;
|
|
339
364
|
if (!userId) throw new Error("member-info requires a userId outside a current Slack conversation.");
|
|
340
365
|
return await invoke({
|
|
341
366
|
action: "memberInfo",
|
|
@@ -345,16 +370,16 @@ async function handleSlackMessageAction(params) {
|
|
|
345
370
|
}
|
|
346
371
|
if (action === "emoji-list") return await invoke({
|
|
347
372
|
action: "emojiList",
|
|
348
|
-
limit: readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." }),
|
|
373
|
+
limit: readPositiveIntegerParam$1(actionParams, "limit", { message: "limit must be a positive integer." }),
|
|
349
374
|
accountId
|
|
350
375
|
}, cfg, ctx.toolContext);
|
|
351
376
|
if (action === "download-file") {
|
|
352
|
-
const fileIdParam = readStringParam(actionParams, "fileId");
|
|
353
|
-
const messageIdParam = readStringParam(actionParams, "messageId") ?? readStringParam(actionParams, "message_id");
|
|
377
|
+
const fileIdParam = readStringParam$1(actionParams, "fileId");
|
|
378
|
+
const messageIdParam = readStringParam$1(actionParams, "messageId") ?? readStringParam$1(actionParams, "message_id");
|
|
354
379
|
if (!fileIdParam && messageIdParam) throw new Error("download-file requires fileId (the Slack file id, for example F0B0LTT8M36 from event.files[].id), not messageId. Did you mean to pass fileId? messageId is the Slack message timestamp and is used by react / reactions / edit / delete / pin / unpin actions, not download-file.");
|
|
355
|
-
const fileId = readStringParam(actionParams, "fileId", { required: true });
|
|
356
|
-
const channelId = readStringParam(actionParams, "channelId") ?? readStringParam(actionParams, "to");
|
|
357
|
-
const threadId = readStringParam(actionParams, "threadId") ?? readStringParam(actionParams, "replyTo");
|
|
380
|
+
const fileId = readStringParam$1(actionParams, "fileId", { required: true });
|
|
381
|
+
const channelId = readStringParam$1(actionParams, "channelId") ?? readStringParam$1(actionParams, "to");
|
|
382
|
+
const threadId = readStringParam$1(actionParams, "threadId") ?? readStringParam$1(actionParams, "replyTo");
|
|
358
383
|
return await invoke({
|
|
359
384
|
action: "downloadFile",
|
|
360
385
|
fileId,
|
|
@@ -365,18 +390,18 @@ async function handleSlackMessageAction(params) {
|
|
|
365
390
|
}
|
|
366
391
|
if (action === "upload-file") {
|
|
367
392
|
if (readBooleanParam(actionParams, "replyBroadcast")) throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");
|
|
368
|
-
const to = readStringParam(actionParams, "to") ?? resolveChannelId();
|
|
369
|
-
const filePath = readStringParam(actionParams, "filePath", { trim: false }) ?? readStringParam(actionParams, "path", { trim: false }) ?? readStringParam(actionParams, "media", { trim: false });
|
|
393
|
+
const to = readStringParam$1(actionParams, "to") ?? resolveChannelId();
|
|
394
|
+
const filePath = readStringParam$1(actionParams, "filePath", { trim: false }) ?? readStringParam$1(actionParams, "path", { trim: false }) ?? readStringParam$1(actionParams, "media", { trim: false });
|
|
370
395
|
if (!filePath) throw new Error("upload-file requires filePath, path, or media");
|
|
371
|
-
const threadId = readStringParam(actionParams, "threadId") ?? readStringParam(actionParams, "replyTo");
|
|
396
|
+
const threadId = readStringParam$1(actionParams, "threadId") ?? readStringParam$1(actionParams, "replyTo");
|
|
372
397
|
const topLevel = readBooleanParam(actionParams, "topLevel") === true || actionParams.threadId === null;
|
|
373
398
|
return await invoke({
|
|
374
399
|
action: "uploadFile",
|
|
375
400
|
to,
|
|
376
401
|
filePath,
|
|
377
|
-
initialComment: readStringParam(actionParams, "initialComment", { allowEmpty: true }) ?? readStringParam(actionParams, "message", { allowEmpty: true }) ?? readStringParam(actionParams, "caption", { allowEmpty: true }) ?? "",
|
|
378
|
-
filename: readStringParam(actionParams, "filename"),
|
|
379
|
-
title: readStringParam(actionParams, "title"),
|
|
402
|
+
initialComment: readStringParam$1(actionParams, "initialComment", { allowEmpty: true }) ?? readStringParam$1(actionParams, "message", { allowEmpty: true }) ?? readStringParam$1(actionParams, "caption", { allowEmpty: true }) ?? "",
|
|
403
|
+
filename: readStringParam$1(actionParams, "filename"),
|
|
404
|
+
title: readStringParam$1(actionParams, "title"),
|
|
380
405
|
threadTs: threadId ?? void 0,
|
|
381
406
|
...readSlackForceDocument(actionParams) ? { forceDocument: true } : {},
|
|
382
407
|
...topLevel ? { topLevel: true } : {},
|
|
@@ -396,7 +421,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
|
|
|
396
421
|
"unpinMessage",
|
|
397
422
|
"uploadFile"
|
|
398
423
|
]);
|
|
399
|
-
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
424
|
+
const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-IuA14rev.js"));
|
|
400
425
|
function resolveSlackActionContext(ctx, toolContext) {
|
|
401
426
|
if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId) return;
|
|
402
427
|
return {
|
|
@@ -538,41 +563,23 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
|
|
|
538
563
|
const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
|
|
539
564
|
const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
|
|
540
565
|
const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
|
|
541
|
-
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-
|
|
542
|
-
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-
|
|
543
|
-
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-
|
|
566
|
+
const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-Cc3P-z35.js"));
|
|
567
|
+
const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-B9HRguDe.js"));
|
|
568
|
+
const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-CPgYQ-BM.js"));
|
|
544
569
|
async function resolveSlackHandleAction() {
|
|
545
570
|
return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
|
|
546
571
|
}
|
|
547
572
|
function shouldTreatSlackDeliveredTextAsVisible(params) {
|
|
548
573
|
return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
|
|
549
574
|
}
|
|
550
|
-
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-
|
|
551
|
-
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-
|
|
552
|
-
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-
|
|
553
|
-
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-
|
|
554
|
-
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
555
|
-
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
556
|
-
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
557
|
-
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-
|
|
558
|
-
async function resolveSlackSendContext(params) {
|
|
559
|
-
const account = resolveSlackAccount({
|
|
560
|
-
cfg: params.cfg,
|
|
561
|
-
accountId: params.accountId
|
|
562
|
-
});
|
|
563
|
-
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
564
|
-
assertSlackDetachedTargetAllowed(account.accountId, target?.teamId);
|
|
565
|
-
const send = resolveOutboundSendDep(params.deps, "slack") ?? (await loadSlackSendRuntime()).sendMessageSlack;
|
|
566
|
-
const token = resolveSlackOperationToken(account, "write");
|
|
567
|
-
const botToken = account.botToken?.trim();
|
|
568
|
-
const tokenOverride = token && token !== botToken ? token : void 0;
|
|
569
|
-
return {
|
|
570
|
-
send,
|
|
571
|
-
threadTsValue: resolveSlackThreadTsValue(params),
|
|
572
|
-
tokenOverride,
|
|
573
|
-
to: params.to
|
|
574
|
-
};
|
|
575
|
-
}
|
|
575
|
+
const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-Bmw4ykSy.js").then((n) => n.t));
|
|
576
|
+
const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-Bv6IiGZ4.js").then((n) => n.n));
|
|
577
|
+
const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-BXw2pA7y.js").then((n) => n.n));
|
|
578
|
+
const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-IuA14rev.js"));
|
|
579
|
+
const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-rScD-UJi.js"));
|
|
580
|
+
const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-gj5yQgN2.js").then((n) => n.n));
|
|
581
|
+
const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-B72wWXWg.js").then((n) => n.t));
|
|
582
|
+
const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-BOILcXPo.js").then((n) => n.t));
|
|
576
583
|
async function setSlackHeartbeatThreadStatus(params) {
|
|
577
584
|
const threadTs = resolveSlackThreadTsValue({ threadId: params.threadId });
|
|
578
585
|
const target = parseSlackTarget(params.to, { defaultKind: "channel" });
|
|
@@ -603,15 +610,6 @@ async function setSlackHeartbeatThreadStatus(params) {
|
|
|
603
610
|
logVerbose(`slack heartbeat status update failed: ${formatSlackError(error)}`);
|
|
604
611
|
}
|
|
605
612
|
}
|
|
606
|
-
function withSlackSendOverride(params) {
|
|
607
|
-
return {
|
|
608
|
-
...params.deps,
|
|
609
|
-
slack: async (to, text, opts) => await params.send(to, text, {
|
|
610
|
-
...opts,
|
|
611
|
-
...params.tokenOverride ? { token: params.tokenOverride } : {}
|
|
612
|
-
})
|
|
613
|
-
};
|
|
614
|
-
}
|
|
615
613
|
function resolveSlackRouteTarget(raw) {
|
|
616
614
|
const target = parseSlackTarget(raw, { defaultKind: "channel" });
|
|
617
615
|
if (!target) return null;
|
|
@@ -623,7 +621,8 @@ function resolveSlackRouteTarget(raw) {
|
|
|
623
621
|
function normalizeSlackAcpConversationId(raw) {
|
|
624
622
|
const trimmed = normalizeOptionalString(raw);
|
|
625
623
|
if (!trimmed) return null;
|
|
626
|
-
const
|
|
624
|
+
const parsed = parseSlackTarget(trimmed, { defaultKind: "channel" });
|
|
625
|
+
const conversationId = normalizeLowercaseStringOrEmpty(parsed?.id ?? trimmed.replace(/^slack:/i, "").replace(/^(?:channel|group|direct|user):/i, ""));
|
|
627
626
|
return conversationId ? { conversationId } : null;
|
|
628
627
|
}
|
|
629
628
|
function matchSlackAcpConversation(params) {
|
|
@@ -773,72 +772,16 @@ const slackChannelOutbound = {
|
|
|
773
772
|
}
|
|
774
773
|
}),
|
|
775
774
|
sendPayload: async (ctx) => {
|
|
776
|
-
const { send, threadTsValue, tokenOverride, to } = await resolveSlackSendContext({
|
|
777
|
-
cfg: ctx.cfg,
|
|
778
|
-
accountId: ctx.accountId ?? void 0,
|
|
779
|
-
to: ctx.to,
|
|
780
|
-
deps: ctx.deps,
|
|
781
|
-
replyToId: ctx.replyToId,
|
|
782
|
-
threadId: ctx.threadId
|
|
783
|
-
});
|
|
784
775
|
const { slackOutbound } = await loadSlackOutboundAdapterModule();
|
|
785
|
-
return await slackOutbound.sendPayload(
|
|
786
|
-
...ctx,
|
|
787
|
-
to,
|
|
788
|
-
replyToId: threadTsValue,
|
|
789
|
-
threadId: null,
|
|
790
|
-
deliveryQueueId: void 0,
|
|
791
|
-
deps: withSlackSendOverride({
|
|
792
|
-
deps: ctx.deps,
|
|
793
|
-
send,
|
|
794
|
-
tokenOverride
|
|
795
|
-
})
|
|
796
|
-
});
|
|
776
|
+
return await slackOutbound.sendPayload(ctx);
|
|
797
777
|
},
|
|
798
778
|
sendText: async (ctx) => {
|
|
799
|
-
const { send, threadTsValue, tokenOverride, to } = await resolveSlackSendContext({
|
|
800
|
-
cfg: ctx.cfg,
|
|
801
|
-
accountId: ctx.accountId ?? void 0,
|
|
802
|
-
to: ctx.to,
|
|
803
|
-
deps: ctx.deps,
|
|
804
|
-
replyToId: ctx.replyToId,
|
|
805
|
-
threadId: ctx.threadId
|
|
806
|
-
});
|
|
807
779
|
const { slackOutbound } = await loadSlackOutboundAdapterModule();
|
|
808
|
-
return await slackOutbound.sendText(
|
|
809
|
-
...ctx,
|
|
810
|
-
to,
|
|
811
|
-
replyToId: threadTsValue,
|
|
812
|
-
threadId: null,
|
|
813
|
-
deps: withSlackSendOverride({
|
|
814
|
-
deps: ctx.deps,
|
|
815
|
-
send,
|
|
816
|
-
tokenOverride
|
|
817
|
-
})
|
|
818
|
-
});
|
|
780
|
+
return await slackOutbound.sendText(ctx);
|
|
819
781
|
},
|
|
820
782
|
sendMedia: async (ctx) => {
|
|
821
|
-
const { send, threadTsValue, tokenOverride, to } = await resolveSlackSendContext({
|
|
822
|
-
cfg: ctx.cfg,
|
|
823
|
-
accountId: ctx.accountId ?? void 0,
|
|
824
|
-
to: ctx.to,
|
|
825
|
-
deps: ctx.deps,
|
|
826
|
-
replyToId: ctx.replyToId,
|
|
827
|
-
threadId: ctx.threadId
|
|
828
|
-
});
|
|
829
783
|
const { slackOutbound } = await loadSlackOutboundAdapterModule();
|
|
830
|
-
return await slackOutbound.sendMedia(
|
|
831
|
-
...ctx,
|
|
832
|
-
to,
|
|
833
|
-
replyToId: threadTsValue,
|
|
834
|
-
threadId: null,
|
|
835
|
-
deliveryQueueId: void 0,
|
|
836
|
-
deps: withSlackSendOverride({
|
|
837
|
-
deps: ctx.deps,
|
|
838
|
-
send,
|
|
839
|
-
tokenOverride
|
|
840
|
-
})
|
|
841
|
-
});
|
|
784
|
+
return await slackOutbound.sendMedia(ctx);
|
|
842
785
|
}
|
|
843
786
|
};
|
|
844
787
|
const slackMessageAdapterBase = createChannelMessageAdapterFromOutbound({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SlackChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SlackChannelConfigSchema } from "./config-schema-B9GwoRlE.js";
|
|
2
2
|
export { SlackChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackPlugin } from "./channel-
|
|
1
|
+
import { t as slackPlugin } from "./channel-BguxhhNG.js";
|
|
2
2
|
export { slackPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
3
|
+
import { c as assertSlackDetachedTargetAllowed } from "./group-policy-BYH74y50.js";
|
|
4
|
+
import { C as normalizeAllowListLower, c as createSlackReadClient, d as createSlackWebClient } from "./probe-gj5yQgN2.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|