@openclaw/slack 2026.8.1-beta.3 → 2026.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-configured-sUohAxZr.js +33 -0
- package/dist/account-inspect-CN2hBsim.js +87 -0
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-BlzxuYle.js → accounts-Dm_H77gH.js} +7 -10
- package/dist/{accounts.runtime-CbabBL8x.js → accounts.runtime-DRuEK6mL.js} +1 -1
- package/dist/{action-runtime-D6jg2CQd.js → action-runtime-044ldvNL.js} +53 -48
- package/dist/action-runtime.runtime-BL3KzX13.js +2 -0
- package/dist/{actions-DFk0ANVB.js → actions-BI7JkfVm.js} +266 -96
- package/dist/api.js +12 -12
- package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-DYv0UIZS.js} +53 -176
- package/dist/{channel-CA5w7qDF.js → channel-1vIJOzPx.js} +77 -142
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-CZWv55Wu.js → channel-type-DlFSKeIZ.js} +3 -3
- package/dist/{channel.setup-CpyYsEXH.js → channel.setup-ofDi3_Pu.js} +34 -49
- package/dist/{config-schema-CN3XZRX5.js → config-schema-BVIMyiDN.js} +19 -12
- package/dist/configured-state.js +34 -0
- package/dist/{directory-config-BGYyuzWh.js → directory-config-DqfQ42OV.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DjUJQLbq.js → directory-live-BPaNHjmP.js} +2 -2
- package/dist/{group-policy-DyfB_ZIE.js → group-policy-BdwszjYn.js} +581 -743
- package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-CJ0kjcg5.js} +23 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Chrecrb9.js → monitor-Dq5Cmrvp.js} +3 -3
- package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-DYaI8ThX.js} +93 -68
- package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-Bd22U0ga.js} +128 -160
- package/dist/{policy-BKXSxrIS.js → policy-CtQVbde1.js} +2 -1
- package/dist/{probe-BVA65leh.js → probe-0usmAb0i.js} +209 -22
- package/dist/{provider-CUUiwsg2.js → provider-CN_8hFv2.js} +243 -146
- package/dist/{relay-source-mhpMMRG-.js → relay-source-BNGpsdwV.js} +1 -1
- package/dist/{replies-SnWyXcsL.js → replies-BSiRQOJ1.js} +15 -5
- package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-Czheznc8.js} +1 -1
- package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-BAOlNimr.js} +1 -1
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-BSk4GZvZ.js → scopes-COSlmhnH.js} +1 -1
- package/dist/{send-CtnOxKCc.js → send-DS9ICrBI.js} +39 -31
- package/dist/send-results-eeOu_HYm.js +23 -0
- package/dist/{send.runtime-kYctMHSd.js → send.runtime-D_Bb6IuH.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BPFfp6So.js → setup-surface-BGnd2pSe.js} +6 -6
- package/dist/{shared-DJBaslN7.js → shared-D5B-5hBg.js} +26 -6
- package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-CilDmI0c.js} +3 -3
- package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
- package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +14 -6
- package/package.json +9 -7
- package/dist/account-configured-BwfXBo_F.js +0 -14
- package/dist/account-inspect-YJvFBbCR.js +0 -89
- package/dist/action-runtime.runtime-JtoOK9l5.js +0 -2
- package/dist/actions.runtime-CYLsYRai.js +0 -2
- package/dist/runtime-api-DBi7xc_g.js +0 -10
- package/dist/slack-client-kind-BXyOOICI.js +0 -94
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -91,7 +91,7 @@ const User = Type.Object({ // const User = {
|
|
|
91
91
|
// type: 'string',
|
|
92
92
|
// format: 'email'
|
|
93
93
|
// }
|
|
94
|
-
// }
|
|
94
|
+
// },
|
|
95
95
|
// required: [
|
|
96
96
|
// 'id',
|
|
97
97
|
// 'name',
|
|
@@ -111,24 +111,28 @@ type User = Type.Static<typeof User> // type User = {
|
|
|
111
111
|
|
|
112
112
|
## Script
|
|
113
113
|
|
|
114
|
-
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/
|
|
114
|
+
[Documentation](https://sinclairzx81.github.io/typebox/#/docs/script/overview) | [Example 1](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFkBDGAC0YgBMBXAG1WoBjCADsAzvGZs4AXkREAdAGVBUYGBgAKAAaU4cQmjgA1VIJjQALLLgBvOGQBccEdxDFUUADRwkz1+6ePgBe-m4e3nAA7mGBUHAAvnoGRCZmFlAAzDb2Ti7hQb6xESHFnonJhuim5tAATDkOZZF++XEV2gCU1HRwAOJQTGCswIJiHDz8QqIS-YPDo+NyyGjKqupaUqw+uvpVabCoZDnJ+pBiwDDAos41GZZepy7QIEy8t+nQmY-6+twAbh9alA6skkntUn1UDhUDAoEgTr84P9PFdBKgxB9DmQANoAXR+v2AIk4owxzXxYMqqSknmAb0RvyY7mAqBEMCB90J+lJGAw3DEqE5Vm5cDEaEEfCYUGFUEsVIhRgYGPYclsTwA5tCQLD4c4oTC4UhRa8YHS3s5aWo3lSutR9sqxKr5KslDAWKMADxVCAYOZDEZjHF4R2sPB4gB8+l6DpVjKRCcTSeTKZTvX0WsNerscAUecSotTReLJfTcFN5veObzCgqJfrDeTvQSQA) | [Example 2](https://www.typescriptlang.org/play/?target=99&module=7#code/JYWwDg9gTgLgBAFQJ5gKZwGZQiOByGFVAIwgA88AoSgehrgFkBDGAC0YgBMBXAG1WoBjCADsAzvABqqQTGgAWOAF5ERAHQB5YgCsZMABQBvOGQBcqtGoBy3EMVRR9ASgA0cJOeSWbdh87cAXp7qPvaOrnAA7sHetmHOcAC+TpTC4lJ60ADMyhaomjp6RiYx+aF+ER551nEVgaU1vuFJKWkScNKy0ABMuV75WrqyxWbV5eFuVf2N8U4t1HRwAOJQTGCswIJiHDz8QqLt0rCoZH3qg0WGlHBwkGLAMMCi5p1yUPIu13Ai0CBMvC9MlAsp8btwAG6ArpQbqUZKpA7wJaoHCoGBQJBnSwXYZXG7ghyPQSoMQNACCUFWSH0RxgJ1cX2AIk4mxJ5MpTGp03GzhS8La8GYdKgwH+WIGhVxXyYdmAqBEMChbw+XxZGAw3DEqCVClBcDEaEEfCYUB170+-MRjBJ7BU0xxBjxcAA5iiQGiMeZkaj0Ug9X9haKAYwWA4g3CUpRCGhrWJbdUAMowFibAA80ZRGFjrAAfDd8wXC4sM9nck7CxXK1XqzX84sbq6fZ64MY1G2knra13u1363AA2H-uZW+3El8exPJ3X6IkgA)
|
|
115
115
|
|
|
116
|
-
TypeBox includes a
|
|
116
|
+
TypeBox includes a micro TypeScript engine that can transform TypeScript definitions to JSON Schema. The engine is fully type-safe and supports many programmable constructs including Conditional, Mapped, Indexed, Generics, Distributive Generics, and more.
|
|
117
117
|
|
|
118
118
|
### Example
|
|
119
119
|
|
|
120
|
-
Syntax highlighting is available via the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sinclairzx81.typebox-script)
|
|
120
|
+
Syntax highlighting is available via the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sinclairzx81.typebox-script).
|
|
121
121
|
|
|
122
122
|
```typescript
|
|
123
|
-
|
|
123
|
+
import Type from 'typebox'
|
|
124
|
+
|
|
125
|
+
// Math Module
|
|
126
|
+
|
|
124
127
|
const Math = Type.Script(`
|
|
125
|
-
type Vector2 = { x: number, y: number }
|
|
126
|
-
type Vector3 = { x: number, y: number, z: number }
|
|
127
128
|
type Vector4 = { x: number, y: number, z: number, w: number }
|
|
129
|
+
type Vector3 = { x: number, y: number, z: number }
|
|
130
|
+
type Vector2 = { x: number, y: number }
|
|
128
131
|
`)
|
|
129
132
|
|
|
130
|
-
//
|
|
131
|
-
|
|
133
|
+
// Graphics Module
|
|
134
|
+
|
|
135
|
+
const Graphics = Type.Script(Math, `
|
|
132
136
|
type Vertex = {
|
|
133
137
|
position: Vector4,
|
|
134
138
|
normal: Vector3,
|
|
@@ -149,23 +153,10 @@ const { Mesh } = Type.Script(Math, `
|
|
|
149
153
|
}
|
|
150
154
|
`)
|
|
151
155
|
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Mesh.properties.material.properties.diffuse.properties.x
|
|
157
|
-
Mesh.properties.material.properties.ambient.properties.x
|
|
158
|
-
Mesh.properties.material.properties.specular.properties.x
|
|
159
|
-
|
|
160
|
-
// Static Inference
|
|
161
|
-
function render(mesh: Type.Static<typeof Mesh>) {
|
|
162
|
-
mesh.geometry.vertices[0].position.x
|
|
163
|
-
mesh.geometry.vertices[0].normal.x
|
|
164
|
-
mesh.geometry.vertices[0].uv.x
|
|
165
|
-
mesh.material.diffuse.x
|
|
166
|
-
mesh.material.ambient.x
|
|
167
|
-
mesh.material.specular.x
|
|
168
|
-
}
|
|
156
|
+
type Mesh = Type.Static<typeof Graphics['Mesh']> // type Mesh = {
|
|
157
|
+
// geometry: { ... },
|
|
158
|
+
// material: { ... }
|
|
159
|
+
// }
|
|
169
160
|
```
|
|
170
161
|
|
|
171
162
|
<a name="Schema"></a>
|
|
@@ -184,18 +175,21 @@ import Schema from 'typebox/schema'
|
|
|
184
175
|
|
|
185
176
|
### Compile
|
|
186
177
|
|
|
187
|
-
The compiler accepts
|
|
178
|
+
The compiler accepts either TypeBox types or native JSON Schema.
|
|
188
179
|
|
|
189
180
|
```typescript
|
|
190
|
-
|
|
181
|
+
|
|
182
|
+
// Type
|
|
183
|
+
|
|
184
|
+
const VectorA = Schema.Compile(Type.Object({ // const VectorA: Validator<TObject<{
|
|
191
185
|
x: Type.Number(), // x: TNumber
|
|
192
186
|
y: Type.Number(), // y: TNumber
|
|
193
187
|
z: Type.Number() // z: TNumber
|
|
194
188
|
})) // }>>
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const
|
|
189
|
+
|
|
190
|
+
// Schema
|
|
191
|
+
|
|
192
|
+
const VectorB = Schema.Compile({ // const VectorB: Validator<{
|
|
199
193
|
type: 'object', // type: "object";
|
|
200
194
|
required: ['x', 'y', 'z'], // required: ["x", "y", "z"];
|
|
201
195
|
properties: { // properties: { ... };
|
|
@@ -208,35 +202,36 @@ const Vector = Schema.Compile({ // const Vector: Validator<{
|
|
|
208
202
|
|
|
209
203
|
### Validate
|
|
210
204
|
|
|
211
|
-
|
|
205
|
+
Compiled validator instances provide functions to Check and Parse values.
|
|
212
206
|
|
|
213
207
|
```typescript
|
|
208
|
+
|
|
209
|
+
// Compile
|
|
210
|
+
|
|
214
211
|
const Vector = Schema.Compile(Type.Script(`{
|
|
215
212
|
x: number
|
|
216
213
|
y: number
|
|
217
214
|
z: number
|
|
218
215
|
}`))
|
|
219
216
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
z: 0
|
|
224
|
-
})
|
|
225
|
-
|
|
226
|
-
const value = Vector.Parse({ // const value: {
|
|
227
|
-
x: 1, // x: number
|
|
228
|
-
y: 0, // y: number
|
|
229
|
-
z: 0 // z: number
|
|
230
|
-
}) // }
|
|
231
|
-
```
|
|
217
|
+
// Check
|
|
218
|
+
|
|
219
|
+
const valid = Vector.Check({ x: 1, y: 0, z: 0 }) // const valid: boolean
|
|
232
220
|
|
|
221
|
+
// Parse
|
|
233
222
|
|
|
223
|
+
const result = Vector.Parse({ x: 1, y: 0, z: 0 }) // const result: {
|
|
224
|
+
// x: number
|
|
225
|
+
// y: number
|
|
226
|
+
// z: number
|
|
227
|
+
// }
|
|
228
|
+
```
|
|
234
229
|
|
|
235
230
|
### Coverage
|
|
236
231
|
|
|
237
|
-
|
|
232
|
+
[JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite) | [JSON Schema Compliance Suite](https://github.com/sinclairzx81/json-schema-compliance-suite)
|
|
238
233
|
|
|
239
|
-
|
|
234
|
+
TypeBox supports all major JSON Schema draft versions and tracks compliance against the official JSON Schema Test Suite. It also maintains a separate JavaScript compliance suite to track ecosystem adoption as JSON Schema moves toward the V1 candidate. The following table shows TypeBox specification coverage.
|
|
240
235
|
|
|
241
236
|
| Spec | 3 | 4 | 6 | 7 | 2019-09 | 2020-12 | v1 |
|
|
242
237
|
|:-----|:--|:--|:--|:--|:--|:--|:--|
|
|
@@ -253,7 +248,7 @@ Ref: [JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Tes
|
|
|
253
248
|
| dependencies | 17/18 | ✅ | ✅ | ✅ | - | - | - |
|
|
254
249
|
| dependentRequired | - | - | - | - | ✅ | ✅ | ✅ |
|
|
255
250
|
| dependentSchemas | - | - | - | - | ✅ | ✅ | ✅ |
|
|
256
|
-
| dynamicRef | - | - | - | - | - |
|
|
251
|
+
| dynamicRef | - | - | - | - | - | 40/44 | 21/27 |
|
|
257
252
|
| enum | 14/16 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
258
253
|
| exclusiveMaximum | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
259
254
|
| exclusiveMinimum | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
@@ -279,50 +274,52 @@ Ref: [JSON Schema Test Suite](https://github.com/json-schema-org/JSON-Schema-Tes
|
|
|
279
274
|
| properties | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
280
275
|
| propertyNames | - | - | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
281
276
|
| recursiveRef | - | - | - | - | ✅ | - | - |
|
|
282
|
-
| ref |
|
|
277
|
+
| ref | 22/27 | 37/45 | 67/70 | 75/78 | 79/81 | 77/79 | 78/79 |
|
|
283
278
|
| required | 3/4 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
284
279
|
| type | 73/80 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
285
|
-
| unevaluatedItems | - | - | - | - | ✅ |
|
|
286
|
-
| unevaluatedProperties | - | - | - | - | ✅ | ✅ |
|
|
280
|
+
| unevaluatedItems | - | - | - | - | ✅ | ✅ | 70/71 |
|
|
281
|
+
| unevaluatedProperties | - | - | - | - | ✅ | ✅ | 128/129 |
|
|
287
282
|
| uniqueItems | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
288
283
|
|
|
289
|
-
|
|
290
284
|
### Performance
|
|
291
285
|
|
|
292
|
-
|
|
286
|
+
TypeBox tracks comparative performance against AJV8 as the de facto performance standard. For broader comparative benchmarks, refer to the community maintained projects below.
|
|
287
|
+
|
|
288
|
+
[Runtime Benchmarks](https://moltar.github.io/typescript-runtime-type-benchmarks/) | [Schema Benchmarks](https://schemabenchmarks.dev/)
|
|
289
|
+
|
|
290
|
+
The following table shows compilation performance for various JSON Schema structures. These benchmarks measure the time required to JIT compile schematics, with faster compilation resulting in faster application startup.
|
|
293
291
|
|
|
294
292
|
```python
|
|
295
|
-
|
|
296
|
-
│ Compile │ TB1X
|
|
297
|
-
|
|
298
|
-
│ Boolean │
|
|
299
|
-
│ Number │
|
|
300
|
-
│ String │
|
|
301
|
-
│ Null │
|
|
302
|
-
│ Literal_String │
|
|
303
|
-
│ Literal_Number │
|
|
304
|
-
│ Literal_Boolean │
|
|
305
|
-
│ Pattern │
|
|
306
|
-
│ Object_Open │
|
|
307
|
-
│ Object_Close │
|
|
308
|
-
│ Object_Vector3 │
|
|
309
|
-
│ Object_Basis3 │
|
|
310
|
-
│ Intersect_And │
|
|
311
|
-
│ Intersect_Structural │
|
|
312
|
-
│ Union_Or │
|
|
313
|
-
│ Union_Structural │
|
|
314
|
-
│ Tuple_Values │
|
|
315
|
-
│ Tuple_Objects │
|
|
316
|
-
│ Array_Numbers_4 │
|
|
317
|
-
│ Array_Numbers_8 │
|
|
318
|
-
│ Array_Numbers_16 │
|
|
319
|
-
│ Array_Objects_Open │
|
|
320
|
-
│ Array_Objects_Close │
|
|
321
|
-
|
|
293
|
+
┌──────────────────────┬──────────────┬──────────────┐
|
|
294
|
+
│ Compile │ TB1X │ AJV8 │
|
|
295
|
+
├──────────────────────┼──────────────┼──────────────┤
|
|
296
|
+
│ Boolean │ 50.4K ops/s │ 7.1K ops/s │
|
|
297
|
+
│ Number │ 129.9K ops/s │ 7.9K ops/s │
|
|
298
|
+
│ String │ 128.9K ops/s │ 9.1K ops/s │
|
|
299
|
+
│ Null │ 91.3K ops/s │ 8.4K ops/s │
|
|
300
|
+
│ Literal_String │ 63.1K ops/s │ 7.4K ops/s │
|
|
301
|
+
│ Literal_Number │ 74.5K ops/s │ 7.6K ops/s │
|
|
302
|
+
│ Literal_Boolean │ 143.3K ops/s │ 7.7K ops/s │
|
|
303
|
+
│ Pattern │ 94.2K ops/s │ 6.4K ops/s │
|
|
304
|
+
│ Object_Open │ 19.4K ops/s │ 1.3K ops/s │
|
|
305
|
+
│ Object_Close │ 17.6K ops/s │ 991 ops/s │
|
|
306
|
+
│ Object_Vector3 │ 46.1K ops/s │ 3.3K ops/s │
|
|
307
|
+
│ Object_Basis3 │ 16K ops/s │ 848 ops/s │
|
|
308
|
+
│ Intersect_And │ 41.3K ops/s │ 4.2K ops/s │
|
|
309
|
+
│ Intersect_Structural │ 25.3K ops/s │ 1.5K ops/s │
|
|
310
|
+
│ Union_Or │ 58.6K ops/s │ 2.4K ops/s │
|
|
311
|
+
│ Union_Structural │ 31.5K ops/s │ 1.8K ops/s │
|
|
312
|
+
│ Tuple_Values │ 18.2K ops/s │ 1.9K ops/s │
|
|
313
|
+
│ Tuple_Objects │ 3.9K ops/s │ 437 ops/s │
|
|
314
|
+
│ Array_Numbers_4 │ 114.5K ops/s │ 4.2K ops/s │
|
|
315
|
+
│ Array_Numbers_8 │ 128.3K ops/s │ 3.9K ops/s │
|
|
316
|
+
│ Array_Numbers_16 │ 128.4K ops/s │ 4K ops/s │
|
|
317
|
+
│ Array_Objects_Open │ 22K ops/s │ 780 ops/s │
|
|
318
|
+
│ Array_Objects_Close │ 22K ops/s │ 1K ops/s │
|
|
319
|
+
└──────────────────────┴──────────────┴──────────────┘
|
|
322
320
|
```
|
|
323
321
|
|
|
324
|
-
|
|
325
|
-
The following tables shows validation performance for various JSON Schema structures using AJV8 as a basis for comparison.
|
|
322
|
+
The following tables shows validation performance for various JSON Schema structures. These benchmarks measure overall validation throughput for JIT compiled schematics.
|
|
326
323
|
|
|
327
324
|
```python
|
|
328
325
|
┌──────────────────────┬──────────────┬──────────────┐
|
|
@@ -167,7 +167,9 @@ class PerMessageDeflate {
|
|
|
167
167
|
(typeof opts.serverMaxWindowBits === 'number' &&
|
|
168
168
|
opts.serverMaxWindowBits > params.server_max_window_bits))) ||
|
|
169
169
|
(typeof opts.clientMaxWindowBits === 'number' &&
|
|
170
|
-
|
|
170
|
+
(typeof params.client_max_window_bits === 'number'
|
|
171
|
+
? opts.clientMaxWindowBits > params.client_max_window_bits
|
|
172
|
+
: !params.client_max_window_bits))
|
|
171
173
|
) {
|
|
172
174
|
return false;
|
|
173
175
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"type": "boolean"
|
|
52
52
|
},
|
|
53
53
|
"dmPolicy": {
|
|
54
|
+
"default": "pairing",
|
|
54
55
|
"type": "string",
|
|
55
56
|
"enum": [
|
|
56
57
|
"pairing",
|
|
@@ -367,6 +368,9 @@
|
|
|
367
368
|
}
|
|
368
369
|
]
|
|
369
370
|
},
|
|
371
|
+
"joinIntro": {
|
|
372
|
+
"type": "boolean"
|
|
373
|
+
},
|
|
370
374
|
"postAs": {
|
|
371
375
|
"default": "bot",
|
|
372
376
|
"type": "string",
|
|
@@ -1779,6 +1783,9 @@
|
|
|
1779
1783
|
}
|
|
1780
1784
|
]
|
|
1781
1785
|
},
|
|
1786
|
+
"joinIntro": {
|
|
1787
|
+
"type": "boolean"
|
|
1788
|
+
},
|
|
1782
1789
|
"postAs": {
|
|
1783
1790
|
"type": "string",
|
|
1784
1791
|
"enum": [
|
|
@@ -2393,7 +2400,6 @@
|
|
|
2393
2400
|
]
|
|
2394
2401
|
},
|
|
2395
2402
|
"userTokenReadOnly": {
|
|
2396
|
-
"default": true,
|
|
2397
2403
|
"type": "boolean"
|
|
2398
2404
|
},
|
|
2399
2405
|
"allowBots": {
|
|
@@ -2835,9 +2841,6 @@
|
|
|
2835
2841
|
"type": "string"
|
|
2836
2842
|
}
|
|
2837
2843
|
},
|
|
2838
|
-
"required": [
|
|
2839
|
-
"userTokenReadOnly"
|
|
2840
|
-
],
|
|
2841
2844
|
"additionalProperties": false
|
|
2842
2845
|
}
|
|
2843
2846
|
},
|
|
@@ -2846,6 +2849,7 @@
|
|
|
2846
2849
|
}
|
|
2847
2850
|
},
|
|
2848
2851
|
"required": [
|
|
2852
|
+
"dmPolicy",
|
|
2849
2853
|
"groupPolicy",
|
|
2850
2854
|
"postAs",
|
|
2851
2855
|
"mode",
|
|
@@ -2977,6 +2981,10 @@
|
|
|
2977
2981
|
"label": "Slack Progress Command Text",
|
|
2978
2982
|
"help": "Command/exec detail in progress draft lines: \"status\" is the safe default; \"raw\" opts into command text."
|
|
2979
2983
|
},
|
|
2984
|
+
"joinIntro": {
|
|
2985
|
+
"label": "Slack Channel Join Introduction",
|
|
2986
|
+
"help": "Post one brief, room-specific introduction when the bot joins an allowed Slack channel (default: true). Account settings override the channel-wide setting."
|
|
2987
|
+
},
|
|
2980
2988
|
"allowBots": {
|
|
2981
2989
|
"label": "Slack Allow Bot Messages",
|
|
2982
2990
|
"help": "Allow bot-authored messages to trigger Slack replies (default: false)."
|
|
@@ -3035,7 +3043,7 @@
|
|
|
3035
3043
|
},
|
|
3036
3044
|
"execApprovals": {
|
|
3037
3045
|
"label": "Slack Exec Approvals",
|
|
3038
|
-
"help": "Slack-native exec approval routing and approver authorization.
|
|
3046
|
+
"help": "Slack-native exec approval routing and approver authorization. Set enabled to \"auto\" or true to enable DM-first native approvals when approvers can be resolved for this Slack account; unset or false disables them."
|
|
3039
3047
|
},
|
|
3040
3048
|
"presenceEvents": {
|
|
3041
3049
|
"label": "Slack Presence Events",
|
|
@@ -3059,7 +3067,7 @@
|
|
|
3059
3067
|
},
|
|
3060
3068
|
"execApprovals.enabled": {
|
|
3061
3069
|
"label": "Slack Exec Approvals Enabled",
|
|
3062
|
-
"help": "Controls Slack native exec approvals for this account:
|
|
3070
|
+
"help": "Controls Slack native exec approvals for this account: \"auto\" or true enables DM-first native approvals when approvers can be resolved; unset or false disables them."
|
|
3063
3071
|
},
|
|
3064
3072
|
"execApprovals.approvers": {
|
|
3065
3073
|
"label": "Slack Exec Approval Approvers",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/slack",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.1",
|
|
4
4
|
"description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"@slack/types": "3.0.0",
|
|
14
14
|
"@slack/web-api": "8.0.0",
|
|
15
15
|
"get-east-asian-width": "1.6.0",
|
|
16
|
-
"typebox": "1.3.
|
|
16
|
+
"typebox": "1.3.16",
|
|
17
17
|
"undici": "7.29.0",
|
|
18
|
-
"ws": "8.21.
|
|
18
|
+
"ws": "8.21.3",
|
|
19
19
|
"zod": "4.4.3"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"openclaw": ">=2026.8.1
|
|
22
|
+
"openclaw": ">=2026.8.1"
|
|
23
23
|
},
|
|
24
24
|
"peerDependenciesMeta": {
|
|
25
25
|
"openclaw": {
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"SLACK_APP_TOKEN",
|
|
44
44
|
"SLACK_USER_TOKEN"
|
|
45
45
|
]
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"specifier": "./dist/configured-state.js",
|
|
48
|
+
"exportName": "hasConfiguredSlackChannelState"
|
|
47
49
|
},
|
|
48
50
|
"approvalFlags": [
|
|
49
51
|
"native"
|
|
@@ -149,10 +151,10 @@
|
|
|
149
151
|
"allowInvalidConfigRecovery": true
|
|
150
152
|
},
|
|
151
153
|
"compat": {
|
|
152
|
-
"pluginApi": ">=2026.8.1
|
|
154
|
+
"pluginApi": ">=2026.8.1"
|
|
153
155
|
},
|
|
154
156
|
"build": {
|
|
155
|
-
"openclawVersion": "2026.8.1
|
|
157
|
+
"openclawVersion": "2026.8.1",
|
|
156
158
|
"bundledDist": false
|
|
157
159
|
},
|
|
158
160
|
"release": {
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { hasConfiguredAccountValue } from "openclaw/plugin-sdk/account-resolution";
|
|
2
|
-
//#region extensions/slack/src/account-configured.ts
|
|
3
|
-
function isSlackPluginAccountConfigured(account) {
|
|
4
|
-
const mode = account.config.mode ?? "socket";
|
|
5
|
-
if (!(account.identity === "user" ? Boolean(account.userToken?.trim()) : Boolean(account.botToken?.trim()))) return false;
|
|
6
|
-
if (mode === "http") return hasConfiguredAccountValue(account.config.signingSecret);
|
|
7
|
-
if (mode === "relay") {
|
|
8
|
-
const relay = account.config.relay;
|
|
9
|
-
return hasConfiguredAccountValue(relay?.url) && hasConfiguredAccountValue(relay?.authToken) && hasConfiguredAccountValue(relay?.gatewayId);
|
|
10
|
-
}
|
|
11
|
-
return Boolean(account.appToken?.trim());
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { isSlackPluginAccountConfigured as t };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { i as resolveDefaultSlackAccountId, r as mergeSlackAccountConfig } from "./accounts-BlzxuYle.js";
|
|
2
|
-
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
3
|
-
import { hasConfiguredSecretInput, normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
4
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
-
//#region extensions/slack/src/account-inspect.ts
|
|
6
|
-
function inspectSlackToken(value) {
|
|
7
|
-
const token = normalizeSecretInputString(value);
|
|
8
|
-
if (token) return {
|
|
9
|
-
token,
|
|
10
|
-
source: "config",
|
|
11
|
-
status: "available"
|
|
12
|
-
};
|
|
13
|
-
if (hasConfiguredSecretInput(value)) return {
|
|
14
|
-
source: "config",
|
|
15
|
-
status: "configured_unavailable"
|
|
16
|
-
};
|
|
17
|
-
return {
|
|
18
|
-
source: "none",
|
|
19
|
-
status: "missing"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function selectInspectedSlackToken(configured, envToken) {
|
|
23
|
-
return configured.status === "missing" ? envToken : configured.token;
|
|
24
|
-
}
|
|
25
|
-
function inspectSlackAccount(params) {
|
|
26
|
-
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
|
|
27
|
-
const merged = mergeSlackAccountConfig(params.cfg, accountId);
|
|
28
|
-
const enabled = params.cfg.channels?.slack?.enabled !== false && merged.enabled !== false;
|
|
29
|
-
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
30
|
-
const mode = merged.mode ?? "socket";
|
|
31
|
-
const identity = merged.postAs ?? "bot";
|
|
32
|
-
const isHttpMode = mode === "http";
|
|
33
|
-
const isRelayMode = mode === "relay";
|
|
34
|
-
const configBot = inspectSlackToken(merged.botToken);
|
|
35
|
-
const configApp = inspectSlackToken(merged.appToken);
|
|
36
|
-
const configSigningSecret = inspectSlackToken(merged.signingSecret);
|
|
37
|
-
const configUser = inspectSlackToken(merged.userToken);
|
|
38
|
-
const envBot = allowEnv ? normalizeSecretInputString(params.envBotToken ?? process.env.SLACK_BOT_TOKEN) : void 0;
|
|
39
|
-
const envApp = allowEnv && !isRelayMode ? normalizeSecretInputString(params.envAppToken ?? process.env.SLACK_APP_TOKEN) : void 0;
|
|
40
|
-
const envUser = allowEnv ? normalizeSecretInputString(params.envUserToken ?? process.env.SLACK_USER_TOKEN) : void 0;
|
|
41
|
-
const botToken = selectInspectedSlackToken(configBot, envBot);
|
|
42
|
-
const appToken = selectInspectedSlackToken(configApp, envApp);
|
|
43
|
-
const signingSecret = configSigningSecret.token;
|
|
44
|
-
const userToken = selectInspectedSlackToken(configUser, envUser);
|
|
45
|
-
const relayConfigured = isRelayMode && Boolean(normalizeOptionalString(merged.relay?.url)) && hasConfiguredSecretInput(merged.relay?.authToken) && Boolean(normalizeOptionalString(merged.relay?.gatewayId));
|
|
46
|
-
const botTokenSource = configBot.token ? "config" : configBot.status === "configured_unavailable" ? "config" : envBot ? "env" : "none";
|
|
47
|
-
const appTokenSource = configApp.token ? "config" : configApp.status === "configured_unavailable" ? "config" : envApp ? "env" : "none";
|
|
48
|
-
const signingSecretSource = configSigningSecret.token ? "config" : configSigningSecret.status === "configured_unavailable" ? "config" : "none";
|
|
49
|
-
const userTokenSource = configUser.token ? "config" : configUser.status === "configured_unavailable" ? "config" : envUser ? "env" : "none";
|
|
50
|
-
return {
|
|
51
|
-
accountId,
|
|
52
|
-
enabled,
|
|
53
|
-
...identity === "user" ? { identity } : {},
|
|
54
|
-
name: normalizeOptionalString(merged.name),
|
|
55
|
-
mode,
|
|
56
|
-
botToken,
|
|
57
|
-
appToken,
|
|
58
|
-
...isHttpMode ? { signingSecret } : {},
|
|
59
|
-
userToken,
|
|
60
|
-
botTokenSource,
|
|
61
|
-
appTokenSource,
|
|
62
|
-
...isHttpMode ? { signingSecretSource } : {},
|
|
63
|
-
userTokenSource,
|
|
64
|
-
botTokenStatus: configBot.token ? "available" : configBot.status === "configured_unavailable" ? "configured_unavailable" : envBot ? "available" : "missing",
|
|
65
|
-
appTokenStatus: configApp.token ? "available" : configApp.status === "configured_unavailable" ? "configured_unavailable" : envApp ? "available" : "missing",
|
|
66
|
-
...isHttpMode ? { signingSecretStatus: configSigningSecret.token ? "available" : configSigningSecret.status === "configured_unavailable" ? "configured_unavailable" : "missing" } : {},
|
|
67
|
-
userTokenStatus: configUser.token ? "available" : configUser.status === "configured_unavailable" ? "configured_unavailable" : envUser ? "available" : "missing",
|
|
68
|
-
configured: (() => {
|
|
69
|
-
const identityTokenConfigured = identity === "user" ? configUser.status !== "missing" || Boolean(envUser) : configBot.status !== "missing" || Boolean(envBot);
|
|
70
|
-
if (isHttpMode) return identityTokenConfigured && configSigningSecret.status !== "missing";
|
|
71
|
-
if (isRelayMode) return identityTokenConfigured && relayConfigured;
|
|
72
|
-
return identityTokenConfigured && (configApp.status !== "missing" || Boolean(envApp));
|
|
73
|
-
})(),
|
|
74
|
-
config: merged,
|
|
75
|
-
groupPolicy: merged.groupPolicy,
|
|
76
|
-
textChunkLimit: merged.textChunkLimit,
|
|
77
|
-
mediaMaxMb: merged.mediaMaxMb,
|
|
78
|
-
reactionNotifications: merged.reactionNotifications,
|
|
79
|
-
reactionAllowlist: merged.reactionAllowlist,
|
|
80
|
-
replyToMode: merged.replyToMode,
|
|
81
|
-
replyToModeByChatType: merged.replyToModeByChatType,
|
|
82
|
-
actions: merged.actions,
|
|
83
|
-
slashCommand: merged.slashCommand,
|
|
84
|
-
dm: merged.dm,
|
|
85
|
-
channels: merged.channels
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
export { inspectSlackAccount as t };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as getSlackMemberInfo, c as listSlackReactions, d as readSlackMessages, f as removeOwnSlackReactions, g as unpinSlackMessage, h as sendSlackMessage, l as pinSlackMessage, m as resolveSlackConversationName, n as downloadSlackFile, o as listSlackEmojis, p as removeSlackReaction, r as editSlackMessage, s as listSlackPins, t as deleteSlackMessage, u as reactSlackMessage } from "./actions-DFk0ANVB.js";
|
|
2
|
-
export { deleteSlackMessage, downloadSlackFile, editSlackMessage, getSlackMemberInfo, listSlackEmojis, listSlackPins, listSlackReactions, pinSlackMessage, reactSlackMessage, readSlackMessages, removeOwnSlackReactions, removeSlackReaction, resolveSlackConversationName, sendSlackMessage, unpinSlackMessage };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./target-parsing-BnMD2ZqZ.js";
|
|
2
|
-
import "./probe-BVA65leh.js";
|
|
3
|
-
import "./config-schema-CN3XZRX5.js";
|
|
4
|
-
import "openclaw/plugin-sdk/account-id";
|
|
5
|
-
import { createActionGate as createActionGate$1, imageResultFromFile, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam, withNormalizedTimestamp } from "openclaw/plugin-sdk/channel-actions";
|
|
6
|
-
import "openclaw/plugin-sdk/channel-status";
|
|
7
|
-
import "openclaw/plugin-sdk/channel-config-schema";
|
|
8
|
-
import "openclaw/plugin-sdk/channel-plugin-common";
|
|
9
|
-
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
10
|
-
export { readPositiveIntegerParam as a, withNormalizedTimestamp as c, loadOutboundMediaFromUrl as i, imageResultFromFile as n, readReactionParams as o, jsonResult as r, readStringParam as s, createActionGate$1 as t };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { R as renderSlackBlockFallbackText } from "./group-policy-DyfB_ZIE.js";
|
|
2
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
4
|
-
import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
|
|
5
|
-
import { saveRemoteMedia } from "openclaw/plugin-sdk/media-runtime";
|
|
6
|
-
//#region extensions/slack/src/monitor/block-text.ts
|
|
7
|
-
function readSlackBlockType(block) {
|
|
8
|
-
return block && typeof block === "object" && !Array.isArray(block) ? block.type : void 0;
|
|
9
|
-
}
|
|
10
|
-
function hasSlackTableBlock(blocks) {
|
|
11
|
-
return blocks?.some((block) => readSlackBlockType(block) === "table") ?? false;
|
|
12
|
-
}
|
|
13
|
-
function hasSlackMessageTableBlock(message) {
|
|
14
|
-
return hasSlackTableBlock(message.blocks) || message.attachments?.some((attachment) => !isSlackUnfurlAttachment(attachment) && hasSlackTableBlock(attachment.blocks)) === true;
|
|
15
|
-
}
|
|
16
|
-
function isSlackUnfurlAttachment(attachment) {
|
|
17
|
-
return attachment.is_msg_unfurl === true || attachment.is_app_unfurl === true || typeof attachment.app_unfurl_url === "string" && attachment.app_unfurl_url.trim().length > 0;
|
|
18
|
-
}
|
|
19
|
-
function resolveSlackBlocksText(blocks) {
|
|
20
|
-
if (!blocks?.length) return;
|
|
21
|
-
const parts = [];
|
|
22
|
-
let hasRichText = false;
|
|
23
|
-
let hasNativeData = false;
|
|
24
|
-
for (const block of blocks) {
|
|
25
|
-
const blockType = readSlackBlockType(block);
|
|
26
|
-
hasRichText ||= blockType === "rich_text";
|
|
27
|
-
hasNativeData ||= blockType === "data_visualization" || blockType === "data_table" || blockType === "table";
|
|
28
|
-
const text = renderSlackBlockFallbackText(block, { nativeDataFormat: "plain" });
|
|
29
|
-
if (text) parts.push(text);
|
|
30
|
-
}
|
|
31
|
-
return parts.length > 0 ? {
|
|
32
|
-
text: parts.join("\n"),
|
|
33
|
-
hasRichText,
|
|
34
|
-
hasNativeData
|
|
35
|
-
} : void 0;
|
|
36
|
-
}
|
|
37
|
-
function appendDistinctSlackText(base, addition) {
|
|
38
|
-
if (!base) return addition;
|
|
39
|
-
const comparableBase = `\n${base.replace(/\r\n?/g, "\n")}\n`;
|
|
40
|
-
const comparableAddition = `\n${addition.replace(/\r\n?/g, "\n")}\n`;
|
|
41
|
-
if (comparableBase.includes(comparableAddition)) return base;
|
|
42
|
-
return `${base}\n${addition}`;
|
|
43
|
-
}
|
|
44
|
-
function resolveSlackAttachmentTableTexts(attachments) {
|
|
45
|
-
const seen = /* @__PURE__ */ new Set();
|
|
46
|
-
const texts = [];
|
|
47
|
-
for (const attachment of attachments ?? []) {
|
|
48
|
-
if (isSlackUnfurlAttachment(attachment)) continue;
|
|
49
|
-
for (const block of attachment.blocks ?? []) {
|
|
50
|
-
if (readSlackBlockType(block) !== "table") continue;
|
|
51
|
-
const text = renderSlackBlockFallbackText(block, { nativeDataFormat: "plain" });
|
|
52
|
-
if (!text || seen.has(text)) continue;
|
|
53
|
-
seen.add(text);
|
|
54
|
-
texts.push(text);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return texts;
|
|
58
|
-
}
|
|
59
|
-
/** Resolve agent-visible Slack text while admitting only native tables from attachments. */
|
|
60
|
-
function resolveSlackMessageText(message, options = {}) {
|
|
61
|
-
let resolved = chooseSlackPrimaryText({
|
|
62
|
-
messageText: options.preserveMessageTextWhitespace ? typeof message.text === "string" && message.text.trim().length > 0 ? message.text : void 0 : normalizeOptionalString(message.text),
|
|
63
|
-
blocksText: resolveSlackBlocksText(message.blocks)
|
|
64
|
-
});
|
|
65
|
-
for (const tableText of resolveSlackAttachmentTableTexts(message.attachments)) resolved = appendDistinctSlackText(resolved, tableText);
|
|
66
|
-
return resolved;
|
|
67
|
-
}
|
|
68
|
-
function chooseSlackPrimaryText(params) {
|
|
69
|
-
const { messageText, blocksText } = params;
|
|
70
|
-
if (!blocksText) return messageText;
|
|
71
|
-
if (!messageText) return blocksText.text;
|
|
72
|
-
if (blocksText.hasNativeData) {
|
|
73
|
-
const comparableMessageText = messageText.replace(/\s+/g, " ").trim();
|
|
74
|
-
const comparableBlocksText = blocksText.text.replace(/\s+/g, " ").trim();
|
|
75
|
-
if (comparableMessageText.includes(comparableBlocksText)) return messageText;
|
|
76
|
-
return comparableBlocksText.startsWith(comparableMessageText) ? blocksText.text : `${messageText}\n${blocksText.text}`;
|
|
77
|
-
}
|
|
78
|
-
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
79
|
-
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
83
|
-
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
84
|
-
function isGovSlackClient(client) {
|
|
85
|
-
if (!client?.slackApiUrl) return false;
|
|
86
|
-
try {
|
|
87
|
-
const apiUrl = new URL(client.slackApiUrl);
|
|
88
|
-
return apiUrl.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
89
|
-
} catch {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
//#endregion
|
|
94
|
-
export { hasSlackTableBlock as a, resolveSlackMessageText as c, hasSlackMessageTableBlock as i, fetchWithRuntimeDispatcher as n, isSlackUnfurlAttachment as o, saveRemoteMedia as r, resolveSlackBlocksText as s, isGovSlackClient as t };
|