@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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as buildSlackChannelPolicyScope, t as buildSlackChannelIdCandidates } from "./group-policy-BYH74y50.js";
|
|
2
|
+
import { D as resolveSlackUserAllowListForTeam, T as normalizeSlackSlug } from "./probe-gj5yQgN2.js";
|
|
2
3
|
import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
|
|
3
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
4
5
|
//#region extensions/slack/src/monitor/channel-config.ts
|
|
@@ -17,9 +18,10 @@ function resolveSlackChannelConfig(params) {
|
|
|
17
18
|
const keys = channelKeys ?? Object.keys(entries);
|
|
18
19
|
const normalizedName = channelName ? normalizeSlackSlug(channelName) : "";
|
|
19
20
|
const directName = channelName ? channelName.trim() : "";
|
|
21
|
+
const candidates = buildChannelKeyCandidates(...buildSlackChannelIdCandidates(channelId, params.teamId, { allowUnscoped: params.allowUnscoped }), allowNameMatching ? channelName ? `#${directName}` : void 0 : void 0, allowNameMatching ? directName : void 0, allowNameMatching ? normalizedName : void 0);
|
|
20
22
|
const match = buildSlackChannelPolicyScope({
|
|
21
23
|
channels: entries,
|
|
22
|
-
candidates
|
|
24
|
+
candidates
|
|
23
25
|
});
|
|
24
26
|
const { entry: matched, wildcardEntry: fallback } = match;
|
|
25
27
|
const requireMentionDefault = defaultRequireMention ?? true;
|
|
@@ -46,7 +48,7 @@ function resolveSlackChannelConfig(params) {
|
|
|
46
48
|
const skills = firstDefined(resolved.skills, fallback?.skills);
|
|
47
49
|
const systemPrompt = firstDefined(resolved.systemPrompt, fallback?.systemPrompt);
|
|
48
50
|
const presenceEvents = firstDefined(resolved.presenceEvents, fallback?.presenceEvents);
|
|
49
|
-
|
|
51
|
+
const result = {
|
|
50
52
|
allowed,
|
|
51
53
|
requireMention,
|
|
52
54
|
ignoreOtherMentions,
|
|
@@ -57,7 +59,8 @@ function resolveSlackChannelConfig(params) {
|
|
|
57
59
|
skills,
|
|
58
60
|
systemPrompt,
|
|
59
61
|
presenceEvents
|
|
60
|
-
}
|
|
62
|
+
};
|
|
63
|
+
return applyChannelMatchMeta(result, match);
|
|
61
64
|
}
|
|
62
65
|
//#endregion
|
|
63
66
|
//#region extensions/slack/src/monitor/policy.ts
|
|
@@ -1,35 +1,128 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { u as formatSlackBotTokenIdentityWarning } from "./accounts-
|
|
3
|
-
import "./target-parsing-
|
|
2
|
+
import { u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js";
|
|
3
|
+
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { isRecord, normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { compileAllowlist, resolveCompiledAllowlistMatch } from "openclaw/plugin-sdk/allow-from";
|
|
7
|
+
import { normalizeHyphenSlug, normalizeStringEntries as normalizeStringEntries$1, normalizeStringEntriesLower } from "openclaw/plugin-sdk/string-normalization-runtime";
|
|
7
8
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
8
|
-
import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import { WebClient } from "@slack/web-api";
|
|
11
11
|
import { addActiveManagedProxyTlsOptions, resolveEnvHttpProxyAgentOptions, resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
|
|
12
12
|
import { isDebugProxyGlobalFetchPatchInstalled } from "openclaw/plugin-sdk/proxy-capture";
|
|
13
13
|
import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
15
|
+
//#region extensions/slack/src/monitor/allow-list.ts
|
|
16
|
+
const SLACK_SLUG_CACHE_MAX = 512;
|
|
17
|
+
const SLACK_STABLE_USER_ID_RE = /^[ubw][a-z0-9]+$/;
|
|
18
|
+
const slackSlugCache = /* @__PURE__ */ new Map();
|
|
19
|
+
function normalizeSlackSlug(raw) {
|
|
20
|
+
const key = raw ?? "";
|
|
21
|
+
const cached = slackSlugCache.get(key);
|
|
22
|
+
if (cached !== void 0) return cached;
|
|
23
|
+
const normalized = normalizeHyphenSlug(raw);
|
|
24
|
+
slackSlugCache.set(key, normalized);
|
|
25
|
+
if (slackSlugCache.size > SLACK_SLUG_CACHE_MAX) {
|
|
26
|
+
const oldest = slackSlugCache.keys().next();
|
|
27
|
+
if (!oldest.done) slackSlugCache.delete(oldest.value);
|
|
28
|
+
}
|
|
29
|
+
return normalized;
|
|
30
|
+
}
|
|
31
|
+
function normalizeAllowList(list) {
|
|
32
|
+
return normalizeStringEntries$1(list);
|
|
33
|
+
}
|
|
34
|
+
function normalizeAllowListLower(list) {
|
|
35
|
+
return normalizeStringEntriesLower(list);
|
|
36
|
+
}
|
|
37
|
+
function normalizeSlackAllowOwnerEntry(entry) {
|
|
38
|
+
const trimmed = normalizeOptionalLowercaseString(entry);
|
|
39
|
+
if (!trimmed || trimmed === "*") return;
|
|
40
|
+
try {
|
|
41
|
+
const target = parseSlackTarget(trimmed);
|
|
42
|
+
if (target?.kind === "user" && target.teamId) return target.id.toLowerCase();
|
|
43
|
+
} catch {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const withoutPrefix = trimmed.replace(/^(slack:|user:)/, "");
|
|
47
|
+
return SLACK_STABLE_USER_ID_RE.test(withoutPrefix) ? withoutPrefix : void 0;
|
|
48
|
+
}
|
|
49
|
+
function resolveSlackAllowListMatch(params) {
|
|
50
|
+
const compiledAllowList = compileAllowlist(params.allowList);
|
|
51
|
+
const teamId = normalizeOptionalLowercaseString(params.teamId);
|
|
52
|
+
const id = normalizeOptionalLowercaseString(params.id);
|
|
53
|
+
const name = normalizeOptionalLowercaseString(params.name);
|
|
54
|
+
const slug = normalizeSlackSlug(name);
|
|
55
|
+
const scopedCandidates = [{
|
|
56
|
+
value: teamId && id ? `team:${teamId}:user:${id}` : void 0,
|
|
57
|
+
source: "workspace-id"
|
|
58
|
+
}];
|
|
59
|
+
const unscopedCandidates = [
|
|
60
|
+
{
|
|
61
|
+
value: id,
|
|
62
|
+
source: "id"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
value: id ? `slack:${id}` : void 0,
|
|
66
|
+
source: "prefixed-id"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
value: id ? `user:${id}` : void 0,
|
|
70
|
+
source: "prefixed-user"
|
|
71
|
+
},
|
|
72
|
+
...params.allowNameMatching === true ? [
|
|
73
|
+
{
|
|
74
|
+
value: name,
|
|
75
|
+
source: "name"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: name ? `slack:${name}` : void 0,
|
|
79
|
+
source: "prefixed-name"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: slug,
|
|
83
|
+
source: "slug"
|
|
84
|
+
}
|
|
85
|
+
] : []
|
|
86
|
+
];
|
|
87
|
+
return resolveCompiledAllowlistMatch({
|
|
88
|
+
compiledAllowlist: compiledAllowList,
|
|
89
|
+
candidates: [...scopedCandidates, ...unscopedCandidates]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function allowListMatches(params) {
|
|
93
|
+
return resolveSlackAllowListMatch(params).allowed;
|
|
94
|
+
}
|
|
95
|
+
function resolveSlackUserAllowed(params) {
|
|
96
|
+
const allowList = normalizeAllowListLower(params.allowList);
|
|
97
|
+
if (allowList.length === 0) return true;
|
|
98
|
+
return allowListMatches({
|
|
99
|
+
allowList,
|
|
100
|
+
teamId: params.teamId,
|
|
101
|
+
id: params.userId,
|
|
102
|
+
name: params.userName,
|
|
103
|
+
allowNameMatching: params.allowNameMatching
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function resolveSlackUserAllowListForTeam(params) {
|
|
107
|
+
const allowList = normalizeAllowListLower(params.allowList);
|
|
108
|
+
const teamId = normalizeOptionalLowercaseString(params.teamId);
|
|
109
|
+
return allowList.flatMap((entry) => {
|
|
110
|
+
if (entry === "*") return [entry];
|
|
111
|
+
if (!entry.startsWith("team:")) return [entry];
|
|
112
|
+
try {
|
|
113
|
+
const target = parseSlackTarget(entry);
|
|
114
|
+
if (target?.kind === "user" && target.teamId?.toLowerCase() === teamId) return [entry];
|
|
115
|
+
return params.preserveUnmatchedScopedEntries ? [entry] : [];
|
|
116
|
+
} catch {
|
|
117
|
+
return params.preserveUnmatchedScopedEntries ? [entry] : [];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
28
120
|
}
|
|
29
121
|
//#endregion
|
|
30
122
|
//#region extensions/slack/src/client-options.ts
|
|
31
123
|
const requireFromSlackSocketMode = (() => {
|
|
32
|
-
|
|
124
|
+
const require = createRequire(import.meta.url);
|
|
125
|
+
return createRequire(require.resolve("@slack/socket-mode/package.json"));
|
|
33
126
|
})();
|
|
34
127
|
function loadSlackUndiciRuntime() {
|
|
35
128
|
return requireFromSlackSocketMode("undici");
|
|
@@ -298,6 +391,101 @@ function formatSlackError(error, fallback = NO_ERROR_DETAIL) {
|
|
|
298
391
|
return safeStringify(error) ?? fallback;
|
|
299
392
|
}
|
|
300
393
|
//#endregion
|
|
394
|
+
//#region extensions/slack/src/monitor/ingress-identity.ts
|
|
395
|
+
const SLACK_USER_NAME_KIND = "plugin:slack-user-name";
|
|
396
|
+
const SLACK_WORKSPACE_USER_ID_KIND = "plugin:slack-workspace-user-id";
|
|
397
|
+
function normalizeSlackUserId(raw) {
|
|
398
|
+
const value = (raw ?? "").trim().toLowerCase();
|
|
399
|
+
if (!value) return "";
|
|
400
|
+
const mention = value.match(/^<@([a-z0-9_]+)>$/i);
|
|
401
|
+
if (mention?.[1]) return mention[1];
|
|
402
|
+
return value.replace(/^(slack:|user:)/, "");
|
|
403
|
+
}
|
|
404
|
+
function isSlackStableUserId(value) {
|
|
405
|
+
return /^[ubw][a-z0-9_]+$/i.test(value);
|
|
406
|
+
}
|
|
407
|
+
function normalizeSlackWorkspaceUserEntry(entry) {
|
|
408
|
+
const normalized = entry.trim().toLowerCase();
|
|
409
|
+
if (!normalized) return null;
|
|
410
|
+
try {
|
|
411
|
+
const target = parseSlackTarget(normalized);
|
|
412
|
+
if (target?.kind === "user" && target.teamId) return target.normalized;
|
|
413
|
+
} catch {
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
function normalizeSlackBareUserEntry(entry) {
|
|
419
|
+
const normalized = entry.trim().toLowerCase();
|
|
420
|
+
if (!normalized || normalizeSlackWorkspaceUserEntry(normalized)) return null;
|
|
421
|
+
const userId = normalizeSlackUserId(normalized);
|
|
422
|
+
return isSlackStableUserId(userId) ? userId : null;
|
|
423
|
+
}
|
|
424
|
+
function normalizeSlackStableEntry(entry) {
|
|
425
|
+
return normalizeSlackBareUserEntry(entry) ?? normalizeSlackWorkspaceUserEntry(entry);
|
|
426
|
+
}
|
|
427
|
+
function normalizeSlackNameEntry(entry) {
|
|
428
|
+
const normalized = entry.trim().toLowerCase();
|
|
429
|
+
if (!normalized || normalizeSlackStableEntry(normalized)) return null;
|
|
430
|
+
return normalized.replace(/^slack:/, "") || null;
|
|
431
|
+
}
|
|
432
|
+
function normalizeSlackNameSubject(value) {
|
|
433
|
+
return value.trim().toLowerCase() || null;
|
|
434
|
+
}
|
|
435
|
+
function normalizeSlackNameSlugEntry(entry) {
|
|
436
|
+
const name = normalizeSlackNameEntry(entry);
|
|
437
|
+
if (!name) return null;
|
|
438
|
+
return normalizeSlackSlug(name) || null;
|
|
439
|
+
}
|
|
440
|
+
const slackIngressIdentity = defineStableChannelIngressIdentity({
|
|
441
|
+
resolveParticipant: (subject) => {
|
|
442
|
+
const qualified = subject.aliases?.workspaceSenderId;
|
|
443
|
+
if (typeof qualified !== "string") return;
|
|
444
|
+
const normalized = normalizeSlackWorkspaceUserEntry(qualified);
|
|
445
|
+
const target = normalized ? parseSlackTarget(normalized) : void 0;
|
|
446
|
+
return target?.teamId ? {
|
|
447
|
+
domain: target.teamId,
|
|
448
|
+
idKind: target.id.startsWith("b") ? "bot-id" : "user-id",
|
|
449
|
+
id: target.id
|
|
450
|
+
} : void 0;
|
|
451
|
+
},
|
|
452
|
+
key: "senderId",
|
|
453
|
+
kind: "stable-id",
|
|
454
|
+
authentication: "asserted",
|
|
455
|
+
normalizeEntry: normalizeSlackBareUserEntry,
|
|
456
|
+
normalizeSubject: normalizeSlackUserId,
|
|
457
|
+
sensitivity: "pii",
|
|
458
|
+
aliases: [{
|
|
459
|
+
key: "workspaceSenderId",
|
|
460
|
+
kind: SLACK_WORKSPACE_USER_ID_KIND,
|
|
461
|
+
authentication: "asserted",
|
|
462
|
+
normalizeEntry: normalizeSlackWorkspaceUserEntry,
|
|
463
|
+
normalizeSubject: normalizeSlackWorkspaceUserEntry,
|
|
464
|
+
sensitivity: "pii"
|
|
465
|
+
}, ...[["senderName", normalizeSlackNameEntry], ["senderNameSlug", normalizeSlackNameSlugEntry]].map(([key, normalizeEntry]) => ({
|
|
466
|
+
key,
|
|
467
|
+
kind: SLACK_USER_NAME_KIND,
|
|
468
|
+
normalizeEntry,
|
|
469
|
+
normalizeSubject: normalizeSlackNameSubject,
|
|
470
|
+
authentication: "mutable",
|
|
471
|
+
sensitivity: "pii"
|
|
472
|
+
}))]
|
|
473
|
+
});
|
|
474
|
+
function createSlackIngressSubject(params) {
|
|
475
|
+
const senderId = normalizeSlackUserId(params.senderId);
|
|
476
|
+
const teamId = normalizeOptionalLowercaseString(params.teamId);
|
|
477
|
+
const senderName = params.senderName?.trim().toLowerCase();
|
|
478
|
+
const senderNameSlug = senderName ? normalizeSlackSlug(senderName) : void 0;
|
|
479
|
+
return {
|
|
480
|
+
stableId: senderId,
|
|
481
|
+
aliases: {
|
|
482
|
+
workspaceSenderId: teamId && senderId ? `team:${teamId}:user:${senderId}` : void 0,
|
|
483
|
+
senderName,
|
|
484
|
+
senderNameSlug
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
//#endregion
|
|
301
489
|
//#region extensions/slack/src/probe.ts
|
|
302
490
|
var probe_exports = /* @__PURE__ */ __exportAll({ probeSlack: () => probeSlack });
|
|
303
491
|
async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
@@ -362,4 +550,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
|
|
|
362
550
|
}));
|
|
363
551
|
}
|
|
364
552
|
//#endregion
|
|
365
|
-
export {
|
|
553
|
+
export { normalizeAllowListLower as C, resolveSlackUserAllowListForTeam as D, resolveSlackAllowListMatch as E, resolveSlackUserAllowed as O, normalizeAllowList as S, normalizeSlackSlug as T, resolveSlackLookupClientOptions as _, slackIngressIdentity as a, resolveSlackWriteClientOptions as b, createSlackReadClient as c, createSlackWebClient as d, createSlackWriteClient as f, SLACK_WRITE_RETRY_OPTIONS as g, SLACK_DEFAULT_RETRY_OPTIONS as h, createSlackIngressSubject as i, createSlackStartupAuthClient as l, getSlackWriteClient as m, probe_exports as n, formatSlackError as o, getSlackListenerUploadCompletionClient as p, SLACK_USER_NAME_KIND as r, createSlackLookupClient as s, probeSlack as t, createSlackTokenCacheKey as u, resolveSlackProxyDispatcher as v, normalizeSlackAllowOwnerEntry as w, allowListMatches as x, resolveSlackWebClientOptions as y };
|