@openclaw/slack 2026.8.1-beta.3 → 2026.9.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-BoSeX09X.js} +18 -21
- package/dist/action-runtime.runtime-Dpa16J87.js +2 -0
- package/dist/{actions-DFk0ANVB.js → actions-XdQyjG_p.js} +98 -66
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-DxXfGX_Z.js} +53 -176
- package/dist/{channel-CA5w7qDF.js → channel-C_vnTgxo.js} +60 -54
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-CZWv55Wu.js → channel-type-j-2lalcC.js} +3 -3
- package/dist/{channel.setup-CpyYsEXH.js → channel.setup-aal8tokM.js} +33 -48
- 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-lC6X_Ru-.js} +2 -2
- package/dist/{group-policy-DyfB_ZIE.js → group-policy-CU1tEGpS.js} +536 -609
- package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-CWosHSi5.js} +6 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Chrecrb9.js → monitor-DrNCGneD.js} +3 -3
- package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-DkT2vUE9.js} +34 -13
- package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-CRRng_Nw.js} +74 -137
- package/dist/{policy-BKXSxrIS.js → policy-BoP6t88v.js} +1 -1
- package/dist/{probe-BVA65leh.js → probe-4_aHtVT3.js} +2 -21
- package/dist/{provider-CUUiwsg2.js → provider-D4nDgxCh.js} +187 -63
- package/dist/{relay-source-mhpMMRG-.js → relay-source-CEmze11m.js} +1 -1
- package/dist/{replies-SnWyXcsL.js → replies-D9XMM_S0.js} +14 -4
- package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-DSamDgVs.js} +1 -1
- package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-CIzwbaJR.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BSk4GZvZ.js → scopes-BBrUzpBH.js} +1 -1
- package/dist/{send-CtnOxKCc.js → send-DtjEnlLh.js} +37 -29
- package/dist/{send.runtime-kYctMHSd.js → send.runtime-DQeNKa2J.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BPFfp6So.js → setup-surface-CsBCM4rP.js} +6 -6
- package/dist/{shared-DJBaslN7.js → shared-D9GeeR9K.js} +24 -6
- package/dist/{slack-client-kind-BXyOOICI.js → slack-client-kind-hSfjXyUM.js} +1 -1
- package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-Chr3YHnT.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/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/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,15 +1,15 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
|
|
2
|
-
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js";
|
|
3
3
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
4
|
-
import {
|
|
5
|
-
import { c as createSlackWebClient, g as resolveSlackWebClientOptions, h as resolveSlackProxyDispatcher, m as resolveSlackLookupClientOptions, o as createSlackStartupAuthClient, r as formatSlackError, u as getSlackListenerUploadCompletionClient } from "./probe-
|
|
4
|
+
import { $ as isSlackCallbackActionId, B as SLACK_TEXT_LIMIT, G as truncateSlackText, Nt as isSlackExecApprovalAuthorizedSender, Q as isSlackApprovalActionId, _t as isSlackAnyNativeApprovalClientEnabled, a as qualifySlackConversationId, c as allowListMatches, ct as escapeSlackMrkdwn, d as normalizeSlackAllowOwnerEntry, et as isSlackQuestionActionId, f as normalizeSlackSlug, jt as isSlackApprovalAuthorizedSender, kt as registerSlackInstallationState, l as normalizeAllowList, m as resolveSlackUserAllowListForTeam, nt as decodeSlackQuestionAction, o as qualifySlackRoutePeerId, p as resolveSlackAllowListMatch, rt as resolveSlackQuestionAction, s as resolveSlackEnterpriseMainDmSessionKey, t as buildSlackChannelIdCandidates, u as normalizeAllowListLower, ut as decodeSlackApprovalAction } from "./group-policy-CU1tEGpS.js";
|
|
5
|
+
import { c as createSlackWebClient, g as resolveSlackWebClientOptions, h as resolveSlackProxyDispatcher, m as resolveSlackLookupClientOptions, o as createSlackStartupAuthClient, r as formatSlackError, u as getSlackListenerUploadCompletionClient } from "./probe-4_aHtVT3.js";
|
|
6
6
|
import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
7
|
-
import { i as hasSlackMessageTableBlock, r as saveRemoteMedia, t as isGovSlackClient } from "./slack-client-kind-
|
|
8
|
-
import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-
|
|
7
|
+
import { i as hasSlackMessageTableBlock, r as saveRemoteMedia, t as isGovSlackClient } from "./slack-client-kind-hSfjXyUM.js";
|
|
8
|
+
import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-DtjEnlLh.js";
|
|
9
9
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
10
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
11
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
12
|
-
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-
|
|
10
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DSamDgVs.js";
|
|
11
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-CIzwbaJR.js";
|
|
12
|
+
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-BoP6t88v.js";
|
|
13
13
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
14
14
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
15
15
|
import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -705,6 +705,7 @@ function createSlackMonitorContext(params) {
|
|
|
705
705
|
}
|
|
706
706
|
return false;
|
|
707
707
|
};
|
|
708
|
+
const channelRuntime = params.channelRuntime;
|
|
708
709
|
const ctx = {
|
|
709
710
|
cfg: params.cfg,
|
|
710
711
|
accountId: params.accountId,
|
|
@@ -712,7 +713,8 @@ function createSlackMonitorContext(params) {
|
|
|
712
713
|
app: params.app,
|
|
713
714
|
runtime: params.runtime,
|
|
714
715
|
channelRuntime: params.channelRuntime,
|
|
715
|
-
buildContext:
|
|
716
|
+
buildContext: channelRuntime?.inbound.buildContext,
|
|
717
|
+
dispatchReplyFromConfig: channelRuntime?.reply?.dispatchReplyFromConfig,
|
|
716
718
|
botUserId: params.botUserId,
|
|
717
719
|
botId: params.botId,
|
|
718
720
|
identityHealth: params.identityHealth,
|
|
@@ -1278,6 +1280,8 @@ function resolveSlackIngressTurnLifecycle(context) {
|
|
|
1278
1280
|
function createSlackDurableIngress(options) {
|
|
1279
1281
|
let app;
|
|
1280
1282
|
let relayDispatch;
|
|
1283
|
+
const activeSessionTurns = /* @__PURE__ */ new Map();
|
|
1284
|
+
const activeChannelTurns = /* @__PURE__ */ new Map();
|
|
1281
1285
|
const monitor = createChannelIngressMonitor({
|
|
1282
1286
|
queue: options.queue ?? (() => getSlackRuntime().state.openChannelIngressQueue({ accountId: options.accountId })),
|
|
1283
1287
|
inspect: inspectSlackIngress,
|
|
@@ -1314,26 +1318,110 @@ function createSlackDurableIngress(options) {
|
|
|
1314
1318
|
onDurableAdmission: async (raw) => {
|
|
1315
1319
|
if (raw.kind === "events-api") await raw.afterDurableAdmission?.();
|
|
1316
1320
|
},
|
|
1317
|
-
deliver: async (raw, lifecycle) => {
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1321
|
+
deliver: async (raw, lifecycle, claim) => {
|
|
1322
|
+
const laneKey = claim.laneKey ?? inspectSlackIngress(raw).laneKey;
|
|
1323
|
+
let releaseSession;
|
|
1324
|
+
let releaseChannel;
|
|
1325
|
+
let routedSession;
|
|
1326
|
+
let adoptOnCompletion = false;
|
|
1327
|
+
const settleSession = () => {
|
|
1328
|
+
adoptOnCompletion = false;
|
|
1329
|
+
releaseSession?.();
|
|
1330
|
+
};
|
|
1331
|
+
const settleTurn = () => {
|
|
1332
|
+
settleSession();
|
|
1333
|
+
releaseChannel?.();
|
|
1334
|
+
lifecycle.abortSignal.removeEventListener("abort", settleTurn);
|
|
1335
|
+
};
|
|
1336
|
+
const routedLifecycle = {
|
|
1337
|
+
...lifecycle,
|
|
1338
|
+
onSessionRouted: async (sessionKey) => {
|
|
1339
|
+
if (routedSession !== void 0) {
|
|
1340
|
+
if (routedSession !== sessionKey) throw new Error("Slack ingress session ownership changed after routing.");
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
lifecycle.abortSignal.throwIfAborted();
|
|
1344
|
+
routedSession = sessionKey;
|
|
1345
|
+
adoptOnCompletion = true;
|
|
1346
|
+
const previousTurn = activeSessionTurns.get(sessionKey);
|
|
1347
|
+
const releasedCurrentTurn = createDeferred();
|
|
1348
|
+
const currentTurn = previousTurn ? previousTurn.then(() => releasedCurrentTurn.promise) : releasedCurrentTurn.promise;
|
|
1349
|
+
activeSessionTurns.set(sessionKey, currentTurn);
|
|
1350
|
+
const channelTurn = createDeferred();
|
|
1351
|
+
const channelTurns = activeChannelTurns.get(laneKey) ?? /* @__PURE__ */ new Set();
|
|
1352
|
+
channelTurns.add(channelTurn.promise);
|
|
1353
|
+
activeChannelTurns.set(laneKey, channelTurns);
|
|
1354
|
+
currentTurn.then(() => {
|
|
1355
|
+
if (activeSessionTurns.get(sessionKey) === currentTurn) activeSessionTurns.delete(sessionKey);
|
|
1356
|
+
});
|
|
1357
|
+
channelTurn.promise.then(() => {
|
|
1358
|
+
channelTurns.delete(channelTurn.promise);
|
|
1359
|
+
if (channelTurns.size === 0 && activeChannelTurns.get(laneKey) === channelTurns) activeChannelTurns.delete(laneKey);
|
|
1360
|
+
});
|
|
1361
|
+
releaseSession = () => releasedCurrentTurn.resolve();
|
|
1362
|
+
releaseChannel = () => channelTurn.resolve();
|
|
1363
|
+
lifecycle.abortSignal.addEventListener("abort", settleTurn, { once: true });
|
|
1364
|
+
lifecycle.onDeferred();
|
|
1365
|
+
if (previousTurn) lifecycle.onAdoptionFinalizing();
|
|
1366
|
+
monitor.requestDrain();
|
|
1367
|
+
await previousTurn;
|
|
1368
|
+
lifecycle.abortSignal.throwIfAborted();
|
|
1369
|
+
},
|
|
1370
|
+
onAdopted: async () => {
|
|
1371
|
+
try {
|
|
1372
|
+
await lifecycle.onAdopted();
|
|
1373
|
+
} finally {
|
|
1374
|
+
settleTurn();
|
|
1375
|
+
}
|
|
1376
|
+
},
|
|
1377
|
+
onDeferred: () => {
|
|
1378
|
+
lifecycle.onDeferred();
|
|
1379
|
+
settleSession();
|
|
1380
|
+
monitor.requestDrain();
|
|
1381
|
+
},
|
|
1382
|
+
onAbandoned: async () => {
|
|
1383
|
+
try {
|
|
1384
|
+
await lifecycle.onAbandoned();
|
|
1385
|
+
} finally {
|
|
1386
|
+
settleTurn();
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
};
|
|
1390
|
+
try {
|
|
1391
|
+
if (asOptionalRecord(raw.kind === "events-api" ? asOptionalRecord(raw.body)?.event : void 0)?.type === "channel_id_changed") {
|
|
1392
|
+
const channelTurns = activeChannelTurns.get(laneKey);
|
|
1393
|
+
if (channelTurns && channelTurns.size > 0) {
|
|
1394
|
+
adoptOnCompletion = true;
|
|
1395
|
+
lifecycle.onAdoptionFinalizing();
|
|
1396
|
+
await Promise.all(channelTurns);
|
|
1397
|
+
lifecycle.abortSignal.throwIfAborted();
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
if (raw.kind === "relay") {
|
|
1401
|
+
if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
|
|
1402
|
+
await relayDispatch(raw.message, routedLifecycle);
|
|
1403
|
+
} else {
|
|
1404
|
+
if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
|
|
1405
|
+
await app.processEvent({
|
|
1406
|
+
body: raw.body,
|
|
1407
|
+
ack: async () => {},
|
|
1408
|
+
...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
|
|
1409
|
+
...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
|
|
1410
|
+
customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: routedLifecycle }
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
if (adoptOnCompletion) await routedLifecycle.onAdopted();
|
|
1414
|
+
} catch (error) {
|
|
1415
|
+
settleTurn();
|
|
1416
|
+
throw error;
|
|
1322
1417
|
}
|
|
1323
|
-
if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
|
|
1324
|
-
await app.processEvent({
|
|
1325
|
-
body: raw.body,
|
|
1326
|
-
ack: async () => {},
|
|
1327
|
-
...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
|
|
1328
|
-
...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
|
|
1329
|
-
customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: lifecycle }
|
|
1330
|
-
});
|
|
1331
1418
|
},
|
|
1332
1419
|
pollIntervalMs: options.pollIntervalMs ?? SLACK_INGRESS_POLL_INTERVAL_MS,
|
|
1333
1420
|
retention: "standard",
|
|
1334
1421
|
appendRetryDelaysMs: [0],
|
|
1335
1422
|
drain: {
|
|
1336
1423
|
resolveNonRetryableFailure: resolveSlackIngressNonRetryableFailure,
|
|
1424
|
+
deferredLaneOccupancy: "release",
|
|
1337
1425
|
deriveLaneKey: (record) => record.payload.kind === "relay" ? resolveSlackIngressLane({ event: record.payload.message }, record.id) : resolveSlackIngressLane(record.payload.body, record.id),
|
|
1338
1426
|
...options.adoptionStallTimeoutMs === void 0 ? {} : { adoptionStallTimeoutMs: options.adoptionStallTimeoutMs },
|
|
1339
1427
|
...options.onLog ? { onLog: options.onLog } : {}
|
|
@@ -2015,6 +2103,7 @@ async function authorizeAndResolveSlackSystemEventContext(params) {
|
|
|
2015
2103
|
channelId,
|
|
2016
2104
|
channelType: auth.channelType,
|
|
2017
2105
|
senderId,
|
|
2106
|
+
threadTs: auth.channelType === "im" ? void 0 : params.threadTs,
|
|
2018
2107
|
eventScope: params.eventScope
|
|
2019
2108
|
})
|
|
2020
2109
|
};
|
|
@@ -3653,10 +3742,57 @@ function noteSlackDraftConversationMessage(conversation) {
|
|
|
3653
3742
|
}
|
|
3654
3743
|
}
|
|
3655
3744
|
//#endregion
|
|
3745
|
+
//#region extensions/slack/src/threading.ts
|
|
3746
|
+
function resolveSlackThreadContext(params) {
|
|
3747
|
+
const incomingThreadTs = params.message.thread_ts;
|
|
3748
|
+
const eventTs = params.message.event_ts;
|
|
3749
|
+
const messageTs = params.message.ts ?? eventTs;
|
|
3750
|
+
const hasThreadTs = typeof incomingThreadTs === "string" && incomingThreadTs.length > 0;
|
|
3751
|
+
const isThreadReply = hasThreadTs && (incomingThreadTs !== messageTs || Boolean(params.message.parent_user_id));
|
|
3752
|
+
const replyToId = isThreadReply ? incomingThreadTs : void 0;
|
|
3753
|
+
const isAssistantDmThreadRoot = hasThreadTs && !isThreadReply && params.isDirectMessage === true;
|
|
3754
|
+
return {
|
|
3755
|
+
incomingThreadTs,
|
|
3756
|
+
messageTs,
|
|
3757
|
+
isThreadReply,
|
|
3758
|
+
replyToId,
|
|
3759
|
+
messageThreadId: isThreadReply || isAssistantDmThreadRoot ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
|
|
3760
|
+
};
|
|
3761
|
+
}
|
|
3762
|
+
/**
|
|
3763
|
+
* Resolves Slack thread targeting for replies and status indicators.
|
|
3764
|
+
*
|
|
3765
|
+
* @returns replyThreadTs - Thread timestamp for reply messages
|
|
3766
|
+
* @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
|
|
3767
|
+
* @returns isThreadReply - true if this is a genuine user reply in a thread,
|
|
3768
|
+
* false if thread_ts comes from a bot status message (e.g. typing indicator)
|
|
3769
|
+
*/
|
|
3770
|
+
function resolveSlackThreadTargets(params) {
|
|
3771
|
+
const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
|
|
3772
|
+
const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
|
|
3773
|
+
return {
|
|
3774
|
+
replyThreadTs,
|
|
3775
|
+
statusThreadTs: replyThreadTs,
|
|
3776
|
+
isThreadReply
|
|
3777
|
+
};
|
|
3778
|
+
}
|
|
3779
|
+
//#endregion
|
|
3656
3780
|
//#region extensions/slack/src/monitor/events/message-subtype-handlers.ts
|
|
3781
|
+
function resolveNestedThreadTs(event) {
|
|
3782
|
+
const changed = event;
|
|
3783
|
+
const message = changed.message?.thread_ts ? changed.message : changed.previous_message;
|
|
3784
|
+
if (!message) return;
|
|
3785
|
+
return resolveSlackThreadContext({
|
|
3786
|
+
message: {
|
|
3787
|
+
type: "message",
|
|
3788
|
+
channel: event.channel,
|
|
3789
|
+
...message
|
|
3790
|
+
},
|
|
3791
|
+
replyToMode: "off"
|
|
3792
|
+
}).replyToId;
|
|
3793
|
+
}
|
|
3657
3794
|
const SUBTYPE_HANDLER_REGISTRY = {
|
|
3658
3795
|
message_changed: {
|
|
3659
|
-
subtype: "message_changed",
|
|
3660
3796
|
eventKind: "message_changed",
|
|
3661
3797
|
describe: (channelLabel) => `Slack message edited in ${channelLabel}.`,
|
|
3662
3798
|
contextKey: (event) => {
|
|
@@ -3667,11 +3803,9 @@ const SUBTYPE_HANDLER_REGISTRY = {
|
|
|
3667
3803
|
const changed = event;
|
|
3668
3804
|
return changed.message?.user ?? changed.previous_message?.user ?? changed.message?.bot_id ?? changed.previous_message?.bot_id;
|
|
3669
3805
|
},
|
|
3670
|
-
|
|
3671
|
-
resolveChannelType: () => void 0
|
|
3806
|
+
resolveThreadTs: resolveNestedThreadTs
|
|
3672
3807
|
},
|
|
3673
3808
|
message_deleted: {
|
|
3674
|
-
subtype: "message_deleted",
|
|
3675
3809
|
eventKind: "message_deleted",
|
|
3676
3810
|
describe: (channelLabel) => `Slack message deleted in ${channelLabel}.`,
|
|
3677
3811
|
contextKey: (event) => {
|
|
@@ -3682,8 +3816,7 @@ const SUBTYPE_HANDLER_REGISTRY = {
|
|
|
3682
3816
|
const deleted = event;
|
|
3683
3817
|
return deleted.previous_message?.user ?? deleted.previous_message?.bot_id;
|
|
3684
3818
|
},
|
|
3685
|
-
|
|
3686
|
-
resolveChannelType: () => void 0
|
|
3819
|
+
resolveThreadTs: resolveNestedThreadTs
|
|
3687
3820
|
}
|
|
3688
3821
|
};
|
|
3689
3822
|
function resolveSlackMessageSubtypeHandler(event) {
|
|
@@ -3827,12 +3960,11 @@ function registerSlackMessageEvents(params) {
|
|
|
3827
3960
|
})) return;
|
|
3828
3961
|
const subtypeHandler = resolveSlackMessageSubtypeHandler(message);
|
|
3829
3962
|
if (subtypeHandler) {
|
|
3830
|
-
const channelId = subtypeHandler.resolveChannelId(message);
|
|
3831
3963
|
const ingressContext = await authorizeAndResolveSlackSystemEventContext({
|
|
3832
3964
|
ctx,
|
|
3833
3965
|
senderId: subtypeHandler.resolveSenderId(message),
|
|
3834
|
-
channelId,
|
|
3835
|
-
|
|
3966
|
+
channelId: message.channel,
|
|
3967
|
+
threadTs: subtypeHandler.resolveThreadTs(message),
|
|
3836
3968
|
eventKind: subtypeHandler.eventKind,
|
|
3837
3969
|
eventScope
|
|
3838
3970
|
});
|
|
@@ -4164,19 +4296,7 @@ function buildSlackDebounceKey(message, accountId, teamId) {
|
|
|
4164
4296
|
}
|
|
4165
4297
|
//#endregion
|
|
4166
4298
|
//#region extensions/slack/src/monitor/message-handler.ts
|
|
4167
|
-
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-
|
|
4168
|
-
function createSlackDispatchCompletion() {
|
|
4169
|
-
let resolve;
|
|
4170
|
-
let reject;
|
|
4171
|
-
return {
|
|
4172
|
-
promise: new Promise((nextResolve, nextReject) => {
|
|
4173
|
-
resolve = nextResolve;
|
|
4174
|
-
reject = nextReject;
|
|
4175
|
-
}),
|
|
4176
|
-
resolve,
|
|
4177
|
-
reject
|
|
4178
|
-
};
|
|
4179
|
-
}
|
|
4299
|
+
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-CRRng_Nw.js"));
|
|
4180
4300
|
const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
|
|
4181
4301
|
const RETRYABLE_FLUSH_RETRY_DELAY_MS = 1e3;
|
|
4182
4302
|
const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /reply session initialization conflicted for \S+/u;
|
|
@@ -4243,6 +4363,19 @@ function createSlackMessageHandler(params) {
|
|
|
4243
4363
|
const completions = entries.map((entry) => entry.opts.dispatchCompletion).filter((completion) => completion !== void 0);
|
|
4244
4364
|
try {
|
|
4245
4365
|
await (async () => {
|
|
4366
|
+
const flushedEntry = entries.at(-1);
|
|
4367
|
+
if (flushedEntry) {
|
|
4368
|
+
const teamId = flushedEntry.opts.eventScope?.teamId;
|
|
4369
|
+
const flushedKey = buildSlackDebounceKey(flushedEntry.message, ctx.accountId, teamId);
|
|
4370
|
+
const topLevelConversationKey = buildTopLevelSlackConversationKey(flushedEntry.message, ctx.accountId, teamId);
|
|
4371
|
+
if (flushedKey && topLevelConversationKey) {
|
|
4372
|
+
const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
|
|
4373
|
+
if (pendingKeys) {
|
|
4374
|
+
pendingKeys.delete(flushedKey);
|
|
4375
|
+
if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
|
|
4376
|
+
}
|
|
4377
|
+
}
|
|
4378
|
+
}
|
|
4246
4379
|
const claims = [];
|
|
4247
4380
|
const claimedKeys = /* @__PURE__ */ new Map();
|
|
4248
4381
|
const surviving = [];
|
|
@@ -4296,16 +4429,6 @@ function createSlackMessageHandler(params) {
|
|
|
4296
4429
|
releaseClaims();
|
|
4297
4430
|
return;
|
|
4298
4431
|
}
|
|
4299
|
-
const teamId = last.opts.eventScope?.teamId;
|
|
4300
|
-
const flushedKey = buildSlackDebounceKey(last.message, ctx.accountId, teamId);
|
|
4301
|
-
const topLevelConversationKey = buildTopLevelSlackConversationKey(last.message, ctx.accountId, teamId);
|
|
4302
|
-
if (flushedKey && topLevelConversationKey) {
|
|
4303
|
-
const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
|
|
4304
|
-
if (pendingKeys) {
|
|
4305
|
-
pendingKeys.delete(flushedKey);
|
|
4306
|
-
if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
|
|
4307
|
-
}
|
|
4308
|
-
}
|
|
4309
4432
|
const combinedText = surviving.length === 1 ? last.message.text ?? "" : surviving.map((entry) => entry.message.text ?? "").filter(Boolean).join("\n");
|
|
4310
4433
|
const combinedMentioned = surviving.some((entry) => Boolean(entry.opts.wasMentioned));
|
|
4311
4434
|
const syntheticMessage = {
|
|
@@ -4338,6 +4461,7 @@ function createSlackMessageHandler(params) {
|
|
|
4338
4461
|
releaseClaims();
|
|
4339
4462
|
return;
|
|
4340
4463
|
}
|
|
4464
|
+
await turnAdoptionLifecycle?.onSessionRouted?.(prepared.route.sessionKey);
|
|
4341
4465
|
prepared.turnAdoptionLifecycle = {
|
|
4342
4466
|
...turnAdoptionLifecycle,
|
|
4343
4467
|
admission: turnAdoptionLifecycle?.admission ?? "exclusive",
|
|
@@ -4416,7 +4540,7 @@ function createSlackMessageHandler(params) {
|
|
|
4416
4540
|
pendingKeys.add(debounceKey);
|
|
4417
4541
|
pendingTopLevelDebounceKeys.set(conversationKey, pendingKeys);
|
|
4418
4542
|
}
|
|
4419
|
-
const dispatchCompletion = opts.awaitDispatch ?
|
|
4543
|
+
const dispatchCompletion = opts.awaitDispatch ? createDeferred() : void 0;
|
|
4420
4544
|
await debouncer.enqueue({
|
|
4421
4545
|
message: resolvedMessage,
|
|
4422
4546
|
opts: {
|
|
@@ -5140,7 +5264,7 @@ const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
|
|
|
5140
5264
|
const SLACK_HEADER_TEXT_MAX = 150;
|
|
5141
5265
|
const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
|
|
5142
5266
|
const loadSlashCommandsRuntime = createLazyRuntimeModule(() => import("./slash-commands.runtime-BTTMlmwy.js"));
|
|
5143
|
-
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-
|
|
5267
|
+
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-Chr3YHnT.js"));
|
|
5144
5268
|
const loadSlashSkillCommandsRuntime = createLazyRuntimeModule(() => import("./slash-skill-commands.runtime-CD1J2ODY.js"));
|
|
5145
5269
|
const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
|
|
5146
5270
|
function resolveSlackCommandMenuModelContext(params) {
|
|
@@ -5602,7 +5726,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
5602
5726
|
}
|
|
5603
5727
|
const channelName = channelInfo?.name;
|
|
5604
5728
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
5605
|
-
const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode } = await loadSlashDispatchRuntime();
|
|
5729
|
+
const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode, sanitizeSlackMonitorReplyPayload } = await loadSlashDispatchRuntime();
|
|
5606
5730
|
const route = resolvedSlashRoute ?? resolveAgentRoute({
|
|
5607
5731
|
cfg,
|
|
5608
5732
|
channel: "slack",
|
|
@@ -5702,10 +5826,8 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
5702
5826
|
sessionKey: ctxPayload.SessionKey ?? route.sessionKey
|
|
5703
5827
|
},
|
|
5704
5828
|
ctxPayload,
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
return payload;
|
|
5708
|
-
} },
|
|
5829
|
+
dispatchReplyFromConfig: ctx.dispatchReplyFromConfig,
|
|
5830
|
+
replyPipeline: { transformReplyPayload: sanitizeSlackMonitorReplyPayload },
|
|
5709
5831
|
dispatcherOptions: { onSettled: async () => {
|
|
5710
5832
|
if (pendingSlashReplies.length === 0) return;
|
|
5711
5833
|
const pending = pendingSlashReplies.splice(0);
|
|
@@ -5920,11 +6042,13 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
5920
6042
|
const respondFn = respond ?? (async (message) => {
|
|
5921
6043
|
if (!body.channel?.id || !body.user?.id) return new Response(null, { status: 204 });
|
|
5922
6044
|
const payload = typeof message === "string" ? { text: message } : message;
|
|
6045
|
+
const threadTs = body.container?.thread_ts ?? body.message?.thread_ts;
|
|
5923
6046
|
await args.client.chat.postEphemeral({
|
|
5924
6047
|
token: ctx.botToken,
|
|
5925
6048
|
channel: body.channel.id,
|
|
5926
6049
|
user: body.user.id,
|
|
5927
6050
|
text: payload.text ?? "",
|
|
6051
|
+
...threadTs ? { thread_ts: threadTs } : {},
|
|
5928
6052
|
...payload.blocks ? { blocks: payload.blocks } : {},
|
|
5929
6053
|
...typeof payload.mrkdwn === "boolean" ? { mrkdwn: payload.mrkdwn } : {}
|
|
5930
6054
|
});
|
|
@@ -6036,7 +6160,7 @@ async function getSlackBoltInterop() {
|
|
|
6036
6160
|
}
|
|
6037
6161
|
return slackBoltInterop;
|
|
6038
6162
|
}
|
|
6039
|
-
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-
|
|
6163
|
+
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-CEmze11m.js"));
|
|
6040
6164
|
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
6041
6165
|
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
6042
6166
|
function resolveSlackRuntimeIdentity(params) {
|
|
@@ -6750,4 +6874,4 @@ function createSlackWorkspaceClientResolver(params) {
|
|
|
6750
6874
|
}
|
|
6751
6875
|
const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy$1;
|
|
6752
6876
|
//#endregion
|
|
6753
|
-
export {
|
|
6877
|
+
export { resolveStorePath$1 as C, stripSlackMentionsForCommandDetection as E, resolveChannelResetConfig as S, buildSlackSlashCommandMatcher as T, resolveSlackChatType as _, createSlackResponseUrlBudget as a, readSessionUpdatedAt as b, resolveSlackThreadTargets as c, authorizeSlackBotRoomMessage as d, resolveSlackCommandIngress as f, normalizeSlackChannelType as g, formatUnknownError as h, SlackResponseAlreadyReportedError as i, trackSlackDraftMessage as l, SLACK_SOCKET_RECONNECT_POLICY as m, resolveSlackRuntimeGroupPolicy as n, authorizeSlackDirectMessage as o, resolveSlackEffectiveAllowFrom as p, resolveSlackRoomContextHints as r, resolveSlackThreadContext as s, monitorSlackProvider as t, resolveConversationLabel$1 as u, buildSlackAssistantThreadMetadata as v, updateLastRoute as w, resolveChannelContextVisibilityMode as x, parseSlackAssistantThreadMetadata as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-D4nDgxCh.js";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
4
4
|
import { isIP } from "node:net";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { A as isSlackInvalidBlocksResponse, E as buildSlackNativeDataAccessibilityText,
|
|
2
|
-
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-
|
|
3
|
-
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-
|
|
1
|
+
import { A as isSlackInvalidBlocksResponse, B as SLACK_TEXT_LIMIT, E as buildSlackNativeDataAccessibilityText, N as buildSlackBlocksFallbackText, O as hasSlackNativeDataBlock, _ as hasSlackReplyStructuredContent, at as markdownToSlackMrkdwnChunks, b as resolveSlackReplyBlocks, j as isSlackNativeResponseUrlRejection, y as resolveSlackReplyBlockResolution } from "./group-policy-CU1tEGpS.js";
|
|
2
|
+
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-DtjEnlLh.js";
|
|
3
|
+
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-D4nDgxCh.js";
|
|
4
4
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
5
|
+
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
5
6
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
6
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
8
|
import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
|
|
@@ -114,6 +115,15 @@ function compactSlackResponseUrlFallback(messages) {
|
|
|
114
115
|
function readSlackReplyBlocks(payload) {
|
|
115
116
|
return resolveSlackReplyBlocks(payload);
|
|
116
117
|
}
|
|
118
|
+
function sanitizeSlackMonitorReplyPayload(payload) {
|
|
119
|
+
if (payload.isReasoning === true || typeof payload.text !== "string") return payload.isReasoning === true ? null : payload;
|
|
120
|
+
const text = sanitizeAssistantVisibleText(payload.text);
|
|
121
|
+
if (text === payload.text) return payload;
|
|
122
|
+
return text || resolveSendableOutboundReplyParts(payload).hasMedia || hasSlackReplyStructuredContent(payload) ? {
|
|
123
|
+
...payload,
|
|
124
|
+
text: text || void 0
|
|
125
|
+
} : null;
|
|
126
|
+
}
|
|
117
127
|
function resolveSlackMediaHookSpokenText(payload) {
|
|
118
128
|
return (getReplyPayloadTtsSupplement(payload)?.spokenText ?? payload.spokenText)?.trim() || void 0;
|
|
119
129
|
}
|
|
@@ -511,4 +521,4 @@ async function deliverSlackSlashReplies(params) {
|
|
|
511
521
|
}
|
|
512
522
|
}
|
|
513
523
|
//#endregion
|
|
514
|
-
export { resolveDeliveredSlackReplyThreadTs as a, readSlackReplyBlocks as i, deliverReplies as n, resolveSlackThreadTs as o, deliverSlackSlashReplies as r,
|
|
524
|
+
export { resolveDeliveredSlackReplyThreadTs as a, emitSlackMessageSentHooks as c, readSlackReplyBlocks as i, deliverReplies as n, resolveSlackThreadTs as o, deliverSlackSlashReplies as r, sanitizeSlackMonitorReplyPayload as s, createSlackReplyDeliveryPlan as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
3
|
-
import { i as createSlackLookupClient } from "./probe-
|
|
3
|
+
import { i as createSlackLookupClient } from "./probe-4_aHtVT3.js";
|
|
4
4
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
2
|
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
|
|
3
|
-
import { i as createSlackLookupClient } from "./probe-
|
|
3
|
+
import { i as createSlackLookupClient } from "./probe-4_aHtVT3.js";
|
|
4
4
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CLp4obpN.js";
|
|
2
|
-
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts } from "./accounts-
|
|
3
|
-
import { i as resolveSlackGroupToolPolicy, r as resolveSlackGroupRequireMention } from "./group-policy-
|
|
4
|
-
import { t as probeSlack } from "./probe-
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts } from "./accounts-Dm_H77gH.js";
|
|
3
|
+
import { i as resolveSlackGroupToolPolicy, r as resolveSlackGroupRequireMention } from "./group-policy-CU1tEGpS.js";
|
|
4
|
+
import { t as probeSlack } from "./probe-4_aHtVT3.js";
|
|
5
5
|
import { r as setSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
6
|
-
import {
|
|
7
|
-
import { r as sendMessageSlack } from "./send-
|
|
8
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
9
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
10
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
11
|
-
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-
|
|
12
|
-
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-
|
|
13
|
-
import "./monitor-
|
|
6
|
+
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, s as listSlackEmojis, u as pinSlackMessage } from "./actions-XdQyjG_p.js";
|
|
7
|
+
import { r as sendMessageSlack } from "./send-DtjEnlLh.js";
|
|
8
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DSamDgVs.js";
|
|
9
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-CIzwbaJR.js";
|
|
10
|
+
import { t as monitorSlackProvider } from "./provider-D4nDgxCh.js";
|
|
11
|
+
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-BoSeX09X.js";
|
|
12
|
+
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-lC6X_Ru-.js";
|
|
13
|
+
import "./monitor-DrNCGneD.js";
|
|
14
14
|
export { deleteSlackMessage, editSlackMessage, getSlackMemberInfo, handleSlackAction, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsLive, listSlackDirectoryPeersLive, listSlackEmojis, listSlackPins, listSlackReactions, monitorSlackProvider, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, registerSlackPluginHttpRoutes, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAppToken, resolveSlackBotToken, resolveSlackChannelAllowlist, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackUserAllowlist, sendMessageSlack, sendSlackMessage, setSlackRuntime, slackActionRuntime, unpinSlackMessage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createSlackReadClient, r as formatSlackError } from "./probe-
|
|
1
|
+
import { a as createSlackReadClient, r as formatSlackError } from "./probe-4_aHtVT3.js";
|
|
2
2
|
import { isRecord, normalizeOptionalString, normalizeStringEntries, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/slack/src/scopes.ts
|
|
4
4
|
function collectScopes(value, into) {
|