@openclaw/slack 2026.10.10-beta.5 → 2026.11.5-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/.setup/{account-configured-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
- package/dist/.setup/{account-inspect-CmkKiSb9.mjs → account-inspect-DgQgj0wk.mjs} +13 -11
- package/dist/.setup/{accounts-msihSF3-.mjs → accounts-EaPP0fFY.mjs} +16 -11
- package/dist/.setup/{action-runtime-ChRfnnBu.mjs → action-runtime-CK9QZgQl.mjs} +39 -47
- package/dist/.setup/action-runtime.runtime-CpZktret.mjs +1 -0
- package/dist/.setup/{actions-By7tvpvv.mjs → actions-s3CcFO45.mjs} +98 -93
- package/dist/.setup/{approval-handler.runtime-D8ArtDQt.mjs → approval-handler.runtime-Ch7BecYK.mjs} +27 -32
- package/dist/.setup/{approval-message-updates-DT7XBPbV.mjs → approval-message-updates-CqcRoa28.mjs} +2 -3
- package/dist/.setup/{channel-6YzXl_63.mjs → channel-CAvo_WNZ.mjs} +573 -352
- package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
- package/dist/.setup/{channel-type-BEFP2ORi.mjs → channel-type-9Lw6yLf2.mjs} +6 -11
- package/dist/.setup/{channel.setup-u6QQdbTa.mjs → channel.setup-BlgXNuCJ.mjs} +19 -23
- package/dist/.setup/{config-schema-DNnh6bWU.mjs → config-schema-Bx1tCZB0.mjs} +5 -11
- package/dist/.setup/cursor-pages-jVn3Vkfi.mjs +309 -0
- package/dist/.setup/{directory-config-Cjj0N8R0.mjs → directory-config-CGvKYg9F.mjs} +5 -6
- package/dist/.setup/{directory-live-BIKD-5B_.mjs → directory-live-DNdw97LA.mjs} +6 -7
- package/dist/.setup/{doctor-contract-Cd4-VzIM.mjs → doctor-contract-BB2KJ9Ni.mjs} +44 -58
- package/dist/.setup/{message-tool-api-BS5ekEA_.mjs → message-tool-api-B38BpEaE.mjs} +7 -8
- package/dist/.setup/{monitor-BFilOuM_.mjs → monitor-BD86SotB.mjs} +3416 -3750
- package/dist/.setup/{outbound-adapter-9dbnYtL1.mjs → outbound-adapter-BH6iPWBj.mjs} +32 -39
- package/dist/.setup/paths-CQZI_5WY.mjs +7 -0
- package/dist/.setup/{pipeline.runtime-BG5swHnj.mjs → pipeline.runtime-C4ELxaRU.mjs} +444 -590
- package/dist/.setup/{policy-yhn48xf5.mjs → policy-C6_DdlSf.mjs} +3 -6
- package/dist/.setup/{session-status-Dv8wNBEt.mjs → probe-B_Ax1vS1.mjs} +1015 -678
- package/dist/.setup/question-delivery-D3qAIwuv.mjs +38 -0
- package/dist/.setup/{relay-source-oY9SbDiX.mjs → relay-source-a8jodKuO.mjs} +12 -6
- package/dist/.setup/{replies-CJwjTqDr.mjs → replies-Bq7n0gfM.mjs} +37 -24
- package/dist/.setup/{reply-blocks-Ca-raz2z.mjs → reply-blocks-DyYYRrP_.mjs} +202 -210
- package/dist/.setup/{resolve-channels-DRRhElwz.mjs → resolve-channels-CF2JME9q.mjs} +6 -10
- package/dist/.setup/{resolve-users-Cz8e17ky.mjs → resolve-users-DDcCAjH1.mjs} +10 -19
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
- package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
- package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
- package/dist/.setup/{scopes-DfQVi8Jw.mjs → scopes-CzHC_dwV.mjs} +3 -3
- package/dist/.setup/{secret-contract-B-Qm6aQQ.mjs → secret-contract-CqVqR7MP.mjs} +5 -4
- package/dist/.setup/{secret-contract-api-DB6CMdgc.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
- package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
- package/dist/.setup/{send-C-8wY0lK.mjs → send-WJZ73VSf.mjs} +306 -349
- package/dist/.setup/{send-results-eeOu_HYm.mjs → send-results-Bm6V1ekL.mjs} +4 -6
- package/dist/.setup/setup-plugin-api-DJXIB8CF.mjs +2 -0
- package/dist/.setup/{setup-surface-9WVQgYCT.mjs → setup-surface-uIqP2B0Y.mjs} +6 -8
- package/dist/.setup/{slash-dispatch.runtime-v5kQqJPh.mjs → slash-dispatch.runtime-Cwuwv7FL.mjs} +2 -2
- package/dist/.setup/{target-parsing-FFE26kOV.mjs → target-parsing-DwYAP3ts.mjs} +2 -4
- package/dist/.setup/{targets-C6LZQL1Q.mjs → targets-eeOxA_b_.mjs} +2 -3
- package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
- package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -0
- package/dist/account-inspect-api.js +2 -3
- package/dist/api.js +17 -18
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-entry.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/configured-state.js +2 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -8
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +11 -13
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +4 -5
- package/dist/setup-plugin-api.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/package.json +2 -2
- package/node_modules/@slack/bolt/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@slack/bolt/node_modules/content-disposition/README.md +105 -35
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/@slack/bolt/node_modules/content-disposition/package.json +31 -19
- package/node_modules/@slack/bolt/node_modules/content-type/README.md +34 -57
- package/node_modules/@slack/bolt/node_modules/content-type/package.json +35 -25
- package/node_modules/@slack/bolt/node_modules/express/Readme.md +15 -9
- package/node_modules/@slack/bolt/node_modules/express/lib/application.js +2 -2
- package/node_modules/@slack/bolt/node_modules/express/lib/request.js +32 -19
- package/node_modules/@slack/bolt/node_modules/express/lib/response.js +27 -30
- package/node_modules/@slack/bolt/node_modules/express/package.json +10 -10
- package/node_modules/@slack/bolt/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +38 -14
- package/node_modules/@slack/bolt/node_modules/qs/README.md +31 -3
- package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +94 -4
- package/node_modules/@slack/bolt/node_modules/qs/lib/stringify.js +4 -4
- package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +130 -6
- package/node_modules/@slack/bolt/node_modules/qs/package.json +4 -4
- package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +174 -0
- package/node_modules/@slack/bolt/node_modules/qs/test/stringify.js +263 -33
- package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +184 -0
- package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
- package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
- package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/typebox/build/format/duration.d.mts +2 -2
- package/node_modules/typebox/build/format/duration.mjs +2 -2
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_email.mjs +1 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_hostname.mjs +1 -1
- package/node_modules/typebox/build/format/ipv4.d.mts +2 -2
- package/node_modules/typebox/build/format/ipv4.mjs +2 -2
- package/node_modules/typebox/build/format/ipv6.d.mts +1 -1
- package/node_modules/typebox/build/format/ipv6.mjs +1 -1
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/schema/build.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +4 -2
- package/node_modules/typebox/build/schema/engine/_unique.mjs +7 -3
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +0 -3
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +15 -17
- package/node_modules/typebox/build/schema/engine/contains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +1 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +7 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/minContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/system/hashing/hash.mjs +63 -34
- package/node_modules/typebox/build/system/locale/en_US.mjs +2 -1
- package/node_modules/typebox/build/system/memory/assign.d.mts +2 -8
- package/node_modules/typebox/build/system/memory/assign.mjs +13 -6
- package/node_modules/typebox/build/system/memory/clone.d.mts +4 -5
- package/node_modules/typebox/build/system/memory/clone.mjs +8 -96
- package/node_modules/typebox/build/system/memory/create.d.mts +1 -5
- package/node_modules/typebox/build/system/memory/create.mjs +18 -13
- package/node_modules/typebox/build/system/memory/deep.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/deep.mjs +108 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +1 -1
- package/node_modules/typebox/build/system/memory/discard.mjs +9 -8
- package/node_modules/typebox/build/system/memory/finalize.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/finalize.mjs +30 -0
- package/node_modules/typebox/build/system/memory/keys.d.mts +2 -0
- package/node_modules/typebox/build/system/memory/keys.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +1 -4
- package/node_modules/typebox/build/system/memory/update.mjs +43 -16
- package/node_modules/typebox/build/type/engine/call/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/call/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +2 -24
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +2 -29
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -1
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +6 -1
- package/node_modules/typebox/build/type/engine/evaluate/property.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/property.mjs +29 -0
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +2 -2
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +1 -3
- package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +1 -4
- package/node_modules/typebox/build/type/engine/this/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/this/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +4 -3
- package/node_modules/typebox/build/value/clone/clone.mjs +5 -7
- package/node_modules/typebox/build/value/repair/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +25 -14
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +1 -1
- package/node_modules/undici/README.md +25 -3
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +3 -0
- package/node_modules/undici/docs/docs/api/Errors.md +76 -1
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +28 -8
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +12 -12
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +16 -1
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -1
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +116 -80
- package/node_modules/undici/lib/dispatcher/client-h2.js +124 -17
- package/node_modules/undici/lib/dispatcher/client.js +4 -1
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +85 -31
- package/node_modules/undici/lib/dispatcher/pool.js +11 -8
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -8
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +112 -51
- package/node_modules/undici/lib/handler/redirect-handler.js +28 -8
- package/node_modules/undici/lib/handler/retry-handler.js +44 -11
- package/node_modules/undici/lib/interceptor/cache.js +11 -3
- package/node_modules/undici/lib/interceptor/decompress.js +22 -9
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cookies/util.js +19 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -2
- package/node_modules/undici/lib/web/fetch/body.js +47 -38
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/headers.js +2 -2
- package/node_modules/undici/lib/web/fetch/index.js +8 -4
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +25 -4
- package/node_modules/undici/package.json +9 -7
- package/node_modules/undici/types/api.d.ts +1 -1
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +6 -1
- package/node_modules/undici/types/utility.d.ts +4 -4
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +6 -30
- package/package.json +7 -7
- package/dist/.setup/action-runtime.runtime-Ck_j1YTn.mjs +0 -1
- package/dist/.setup/http-C9sM-FXe.mjs +0 -2
- package/dist/.setup/plugin-routes-D4qozHVn.mjs +0 -22
- package/dist/.setup/probe-IiHogLQN.mjs +0 -694
- package/dist/.setup/registry-DizWcnNp.mjs +0 -36
- package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-B18kDKtr.mjs +0 -2
- package/dist/.setup/shared-DpHCoKy2.mjs +0 -259
- package/dist/.source-module-urls/562d694877afe9d9dcbb3b32a8883c16974738f2aa892c48d45572cdc9a62529.json +0 -1
- package/dist/http-routes-api.js +0 -1
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +0 -52
- package/node_modules/@slack/bolt/node_modules/content-disposition/index.js +0 -536
- package/node_modules/@slack/bolt/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/@slack/bolt/node_modules/content-type/index.js +0 -225
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +0 -52
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +0 -71
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +0 -52
- package/node_modules/typebox/build/system/memory/freeze.d.mts +0 -4
- package/node_modules/typebox/build/system/memory/freeze.mjs +0 -6
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
- /package/node_modules/@slack/bolt/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import {
|
|
3
|
-
import { n as formatSlackTarget } from "./target-parsing-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
|
|
2
|
+
import { g as resolveSlackBotToken, o as resolveDefaultSlackAccountId, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
|
|
3
|
+
import { n as formatSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
4
|
+
import { I as truncateSlackTextByUtf8Bytes, N as stripSlackNativeDataBlocks, O as hasSlackNativeDataBlock, P as countSlackTextUtf8Bytes, S as assertSlackDetachedTargetAllowed, T as appendSlackNativeDataPlainTextFallback, Tt as escapeSlackMrkdwn, at as buildSlackCompleteBlocksFallbackText, it as buildSlackBlocksFallbackText, k as isSlackInvalidBlocksError, nn as SLACK_PRIVATE_ACTION_DELIVERY_RESULT, ot as renderSlackBlockFallbackText, rt as validateSlackBlocksArray, vt as SLACK_EDIT_TEXT_MAX_BYTES, w as appendSlackNativeDataFallbackText, wt as normalizeSlackOutboundText } from "./probe-B_Ax1vS1.mjs";
|
|
5
|
+
import { c as createSlackWriteClient, r as createSlackLookupClient, u as getSlackWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
6
|
+
import { h as buildSlackNativeDataDeliveryPlan, t as sendMessageSlack } from "./send-WJZ73VSf.mjs";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
|
|
8
8
|
import { asOptionalObjectRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
-
import { createSubsystemLogger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
10
9
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
10
|
+
import { createSubsystemLogger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
|
11
11
|
import { captureChannelReadAuthority as captureChannelReadAuthority$1 } from "openclaw/plugin-sdk/fetch-runtime";
|
|
12
12
|
import { fetchWithRuntimeDispatcher as fetchWithRuntimeDispatcher$1 } from "openclaw/plugin-sdk/runtime-fetch";
|
|
13
13
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
@@ -20,13 +20,14 @@ import { normalizeHostname } from "openclaw/plugin-sdk/host-runtime";
|
|
|
20
20
|
import { resolveRequestUrl } from "openclaw/plugin-sdk/request-url";
|
|
21
21
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
22
22
|
import { saveRemoteMedia, unlinkIfExists } from "openclaw/plugin-sdk/media-runtime";
|
|
23
|
-
|
|
23
|
+
// extensions/slack/src/conversation-open.ts
|
|
24
|
+
const slackTeamIdSchema = z.string().trim().regex(/^T[A-Z0-9]+$/i).optional();
|
|
24
25
|
function parseSlackConversationOpenInput(userIds, teamId) {
|
|
25
26
|
const users = z.array(z.string().trim().regex(/^[UW][A-Z0-9]+$/)).min(1).max(8).parse(userIds);
|
|
26
27
|
if (new Set(users).size !== users.length) throw new Error("Slack conversation-open requires distinct userIds.");
|
|
27
28
|
return {
|
|
28
29
|
users,
|
|
29
|
-
teamId:
|
|
30
|
+
teamId: slackTeamIdSchema.parse(teamId)
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
async function openSlackConversationWithClient(client, input) {
|
|
@@ -42,8 +43,7 @@ async function openSlackConversationWithClient(client, input) {
|
|
|
42
43
|
})
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
//#region extensions/slack/src/edit-text.ts
|
|
46
|
+
// extensions/slack/src/edit-text.ts
|
|
47
47
|
function buildSlackEditTextPayload(content, blocks) {
|
|
48
48
|
const trimmedContent = content.trim();
|
|
49
49
|
const blockText = blocks?.length ? buildSlackCompleteBlocksFallbackText(blocks).trim() : "";
|
|
@@ -56,8 +56,7 @@ function buildSlackEditTextPayload(content, blocks) {
|
|
|
56
56
|
if (blockText) return truncateSlackTextByUtf8Bytes(blockText, SLACK_EDIT_TEXT_MAX_BYTES);
|
|
57
57
|
return " ";
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
//#region extensions/slack/src/monitor/block-text.ts
|
|
59
|
+
// extensions/slack/src/monitor/block-text.ts
|
|
61
60
|
function hasSlackTableBlock(blocks) {
|
|
62
61
|
return blocks?.some((block) => asOptionalRecord(block)?.type === "table") ?? false;
|
|
63
62
|
}
|
|
@@ -132,8 +131,7 @@ function chooseSlackPrimaryText(params) {
|
|
|
132
131
|
if (blocksText.hasRichText && blocksText.text.length > messageText.length) return blocksText.text;
|
|
133
132
|
return blocksText.text.length > messageText.length && blocksText.text.startsWith(messageText) ? blocksText.text : messageText;
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
//#region extensions/slack/src/file-reference.ts
|
|
134
|
+
// extensions/slack/src/file-reference.ts
|
|
137
135
|
function formatSlackFileReference(file) {
|
|
138
136
|
const name = normalizeOptionalString(file?.name) ?? "file";
|
|
139
137
|
const mimetype = normalizeOptionalString(file?.mimetype);
|
|
@@ -150,18 +148,15 @@ function formatSlackFileReferenceList(files) {
|
|
|
150
148
|
if (!files?.length) return "file";
|
|
151
149
|
return files.map((file) => formatSlackFileReference(file)).join(", ");
|
|
152
150
|
}
|
|
153
|
-
|
|
154
|
-
//#region extensions/slack/src/monitor/media.runtime.ts
|
|
151
|
+
// extensions/slack/src/monitor/media.runtime.ts
|
|
155
152
|
const slackMediaLog = createSubsystemLogger("gateway/channels/slack").child("media");
|
|
156
|
-
|
|
157
|
-
//#region extensions/slack/src/monitor/slack-client-kind.ts
|
|
153
|
+
// extensions/slack/src/monitor/slack-client-kind.ts
|
|
158
154
|
/** Detects the isolated GovSlack API plane without consulting mutable config. */
|
|
159
155
|
function isGovSlackClient(client) {
|
|
160
156
|
const apiUrl = client?.slackApiUrl ? URL.parse(client.slackApiUrl) : null;
|
|
161
157
|
return apiUrl?.protocol === "https:" && !apiUrl.port && normalizeHostname(apiUrl.hostname) === "slack-gov.com";
|
|
162
158
|
}
|
|
163
|
-
|
|
164
|
-
//#region extensions/slack/src/monitor/media.ts
|
|
159
|
+
// extensions/slack/src/monitor/media.ts
|
|
165
160
|
var media_exports = /* @__PURE__ */ __exportAll({
|
|
166
161
|
SLACK_MEDIA_READ_IDLE_TIMEOUT_MS: () => SLACK_MEDIA_READ_IDLE_TIMEOUT_MS,
|
|
167
162
|
resolveSlackAttachmentContent: () => resolveSlackAttachmentContent,
|
|
@@ -232,7 +227,6 @@ async function saveSlackMedia(params) {
|
|
|
232
227
|
const timeoutAbortController = totalTimeoutMs ? new AbortController() : void 0;
|
|
233
228
|
const abortSignals = [params.abortSignal, timeoutAbortController?.signal].filter((signal) => Boolean(signal));
|
|
234
229
|
const signal = abortSignals.length > 1 ? AbortSignal.any(abortSignals) : abortSignals[0];
|
|
235
|
-
let timedOut = false;
|
|
236
230
|
const savePromise = saveRemoteMedia({
|
|
237
231
|
url,
|
|
238
232
|
fetchImpl: createSlackMediaFetch(params.govSlack, params.assertReadAuthority),
|
|
@@ -249,13 +243,9 @@ async function saveSlackMedia(params) {
|
|
|
249
243
|
maxBytes: params.maxBytes,
|
|
250
244
|
ssrfPolicy: params.govSlack ? SLACK_GOV_MEDIA_SSRF_POLICY : SLACK_MEDIA_SSRF_POLICY,
|
|
251
245
|
readIdleTimeoutMs: params.readIdleTimeoutMs ?? 6e4
|
|
252
|
-
}).catch((error) => {
|
|
253
|
-
if (timedOut) return new Promise(() => {});
|
|
254
|
-
throw error;
|
|
255
246
|
});
|
|
256
247
|
if (!totalTimeoutMs) return await savePromise;
|
|
257
248
|
return await raceWithTimeout(savePromise, totalTimeoutMs, () => {
|
|
258
|
-
timedOut = true;
|
|
259
249
|
timeoutAbortController?.abort();
|
|
260
250
|
throw new Error(`slack media download timed out after ${totalTimeoutMs}ms`);
|
|
261
251
|
}, { ref: false });
|
|
@@ -289,34 +279,6 @@ async function looksLikeHtmlFile(filePath) {
|
|
|
289
279
|
const MAX_SLACK_MEDIA_CONCURRENCY = 3;
|
|
290
280
|
const MAX_SLACK_FORWARDED_ATTACHMENTS = 8;
|
|
291
281
|
const SLACK_MEDIA_LIMIT_REASON = `omitted: 8-file limit`;
|
|
292
|
-
function formatSlackMediaFailure(error) {
|
|
293
|
-
return redactToolPayloadText(formatErrorMessage(error)).replace(/\s+/g, " ").slice(0, 200);
|
|
294
|
-
}
|
|
295
|
-
async function fetchFreshSlackFileUrl(params) {
|
|
296
|
-
if (!params.file.id || !params.client) return null;
|
|
297
|
-
const assertCurrent = captureSlackMediaReadGuard(params);
|
|
298
|
-
try {
|
|
299
|
-
assertCurrent?.();
|
|
300
|
-
const info = await params.client.files.info({ file: params.file.id });
|
|
301
|
-
assertCurrent?.();
|
|
302
|
-
const freshFile = info.file;
|
|
303
|
-
if (freshFile && params.isRefreshedFileAllowed?.(freshFile) === false) {
|
|
304
|
-
logVerbose(`slack: refreshed file metadata rejected for file id=${params.file.id}`);
|
|
305
|
-
return null;
|
|
306
|
-
}
|
|
307
|
-
const freshUrl = freshFile?.url_private_download ?? freshFile?.url_private;
|
|
308
|
-
if (freshUrl) {
|
|
309
|
-
logVerbose(`slack: refreshed file URL via files.info for file id=${params.file.id}`);
|
|
310
|
-
return freshUrl;
|
|
311
|
-
}
|
|
312
|
-
logVerbose(`slack: files.info returned no private URL for file id=${params.file.id}`);
|
|
313
|
-
return null;
|
|
314
|
-
} catch (error) {
|
|
315
|
-
assertCurrent?.();
|
|
316
|
-
logVerbose(`slack: files.info failed for file id=${params.file.id}: ${formatErrorMessage(error)}`);
|
|
317
|
-
return null;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
282
|
async function downloadSlackMediaFile(params) {
|
|
321
283
|
const assertReadAuthority = captureSlackMediaReadGuard(params);
|
|
322
284
|
assertReadAuthority?.();
|
|
@@ -359,13 +321,29 @@ async function resolveSlackMedia(params) {
|
|
|
359
321
|
const files = params.files ?? [];
|
|
360
322
|
const limitedFiles = files.length > 8 ? files.slice(0, 8) : files;
|
|
361
323
|
for (const file of files.slice(8)) params.unavailableFiles?.set(file, SLACK_MEDIA_LIMIT_REASON);
|
|
362
|
-
const refreshFileUrl = (file) =>
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
324
|
+
const refreshFileUrl = async (file) => {
|
|
325
|
+
const { client, isRefreshedFileAllowed } = params;
|
|
326
|
+
if (!file.id || !client) return null;
|
|
327
|
+
const assertRefreshCurrent = captureSlackMediaReadGuard(params);
|
|
328
|
+
try {
|
|
329
|
+
assertRefreshCurrent?.();
|
|
330
|
+
const info = await client.files.info({ file: file.id });
|
|
331
|
+
assertRefreshCurrent?.();
|
|
332
|
+
const freshFile = info.file;
|
|
333
|
+
if (freshFile && isRefreshedFileAllowed?.(freshFile) === false) {
|
|
334
|
+
logVerbose(`slack: refreshed file metadata rejected for file id=${file.id}`);
|
|
335
|
+
return null;
|
|
336
|
+
}
|
|
337
|
+
const freshUrl = freshFile?.url_private_download ?? freshFile?.url_private;
|
|
338
|
+
if (freshUrl) return freshUrl;
|
|
339
|
+
logVerbose(`slack: files.info returned no private URL for file id=${file.id}`);
|
|
340
|
+
return null;
|
|
341
|
+
} catch {
|
|
342
|
+
assertRefreshCurrent?.();
|
|
343
|
+
logVerbose(`slack: files.info failed for file id=${file.id}`);
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
};
|
|
369
347
|
const { results, hasError, firstError } = await runTasksWithConcurrency({
|
|
370
348
|
tasks: limitedFiles.map((file) => async () => {
|
|
371
349
|
assertCurrent?.();
|
|
@@ -383,13 +361,16 @@ async function resolveSlackMedia(params) {
|
|
|
383
361
|
govSlack
|
|
384
362
|
});
|
|
385
363
|
} catch (error) {
|
|
386
|
-
reason =
|
|
364
|
+
reason = redactToolPayloadText(formatErrorMessage(error)).replace(/\s+/g, " ").slice(0, 200);
|
|
387
365
|
}
|
|
388
366
|
assertCurrent?.();
|
|
389
367
|
url = attempt === 0 && eventUrl ? await refreshFileUrl(file) : null;
|
|
390
368
|
}
|
|
391
369
|
params.unavailableFiles?.set(file, reason);
|
|
392
|
-
slackMediaLog.warn(
|
|
370
|
+
slackMediaLog.warn("slack: file unavailable", {
|
|
371
|
+
fileId: file.id,
|
|
372
|
+
reason: reason === "no private download URL" ? "missing-url" : "download-failed"
|
|
373
|
+
});
|
|
393
374
|
return null;
|
|
394
375
|
}),
|
|
395
376
|
limit: MAX_SLACK_MEDIA_CONCURRENCY,
|
|
@@ -464,9 +445,9 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
464
445
|
...saved.fileName ? { fileName: saved.fileName } : {},
|
|
465
446
|
placeholder: `[Forwarded image: ${label}]`
|
|
466
447
|
});
|
|
467
|
-
} catch
|
|
448
|
+
} catch {
|
|
468
449
|
unavailableMediaCount += 1;
|
|
469
|
-
slackMediaLog.warn(
|
|
450
|
+
slackMediaLog.warn("slack: forwarded image unavailable");
|
|
470
451
|
}
|
|
471
452
|
attachmentMedia.push(...await resolveFiles(att.files) ?? []);
|
|
472
453
|
}
|
|
@@ -494,9 +475,9 @@ async function resolveSlackAttachmentContent(params) {
|
|
|
494
475
|
...unavailableFiles.length > 0 ? { files: unavailableFiles } : {}
|
|
495
476
|
};
|
|
496
477
|
}
|
|
497
|
-
|
|
498
|
-
//#region extensions/slack/src/actions.ts
|
|
478
|
+
// extensions/slack/src/actions.ts
|
|
499
479
|
var actions_exports = /* @__PURE__ */ __exportAll({
|
|
480
|
+
createSlackChannel: () => createSlackChannel,
|
|
500
481
|
deleteSlackMessage: () => deleteSlackMessage,
|
|
501
482
|
downloadSlackFile: () => downloadSlackFile,
|
|
502
483
|
editSlackMessage: () => editSlackMessage,
|
|
@@ -506,6 +487,7 @@ var actions_exports = /* @__PURE__ */ __exportAll({
|
|
|
506
487
|
listSlackPins: () => listSlackPins,
|
|
507
488
|
listSlackReactions: () => listSlackReactions,
|
|
508
489
|
openSlackConversation: () => openSlackConversation,
|
|
490
|
+
parseSlackChannelCreateInput: () => parseSlackChannelCreateInput,
|
|
509
491
|
pinSlackMessage: () => pinSlackMessage,
|
|
510
492
|
reactSlackMessage: () => reactSlackMessage,
|
|
511
493
|
readSlackMessages: () => readSlackMessages,
|
|
@@ -616,17 +598,58 @@ async function getClient(opts = {}, mode = "read") {
|
|
|
616
598
|
}).accountId : normalizeAccountId(opts.accountId);
|
|
617
599
|
assertSlackDetachedTargetAllowed(accountId, opts.teamId);
|
|
618
600
|
const token = resolveToken(opts.token, opts.accountId, opts.cfg);
|
|
601
|
+
const clientTeamId = opts.omitTeamId ? void 0 : opts.teamId;
|
|
619
602
|
if (mode === "write") {
|
|
620
|
-
if (opts.assertDirectAdapterHandoff) return createSlackWriteClient(token, { teamId:
|
|
621
|
-
return getSlackWriteClient(token, { teamId:
|
|
603
|
+
if (opts.assertDirectAdapterHandoff) return createSlackWriteClient(token, { teamId: clientTeamId }, opts.assertDirectAdapterHandoff);
|
|
604
|
+
return getSlackWriteClient(token, { teamId: clientTeamId });
|
|
622
605
|
}
|
|
623
|
-
return createSlackLookupClient(token, { teamId:
|
|
606
|
+
return createSlackLookupClient(token, { teamId: clientTeamId }, opts.assertDirectAdapterHandoff);
|
|
624
607
|
}
|
|
625
608
|
async function resolveBotUserId(client) {
|
|
626
609
|
const auth = await client.auth.test();
|
|
627
610
|
if (!auth?.user_id) throw new Error("Failed to resolve Slack bot user id");
|
|
628
611
|
return auth.user_id;
|
|
629
612
|
}
|
|
613
|
+
function parseSlackChannelCreateInput(name, teamId, inviteUserId) {
|
|
614
|
+
return {
|
|
615
|
+
name: z.string().trim().regex(/^[a-z0-9][a-z0-9_-]{0,79}$/).parse(name),
|
|
616
|
+
teamId: slackTeamIdSchema.parse(teamId),
|
|
617
|
+
inviteUserId: inviteUserId === void 0 ? void 0 : z.string().trim().regex(/^[UW][A-Z0-9]+$/i).parse(inviteUserId)
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
async function createSlackChannel(name, opts = {}) {
|
|
621
|
+
const input = parseSlackChannelCreateInput(name, opts.teamId, opts.inviteUserId);
|
|
622
|
+
const result = await (await getClient(opts, "write")).conversations.create({
|
|
623
|
+
name: input.name,
|
|
624
|
+
team_id: input.teamId
|
|
625
|
+
});
|
|
626
|
+
const channelId = result.channel?.id?.trim();
|
|
627
|
+
if (!channelId || !/^C[A-Z0-9]+$/i.test(channelId)) throw new Error("Slack conversations.create did not return a valid public channel ID.");
|
|
628
|
+
let inviteWarning;
|
|
629
|
+
if (input.inviteUserId) try {
|
|
630
|
+
await (await getClient({
|
|
631
|
+
...opts,
|
|
632
|
+
omitTeamId: true
|
|
633
|
+
}, "write")).conversations.invite({
|
|
634
|
+
channel: channelId,
|
|
635
|
+
users: input.inviteUserId
|
|
636
|
+
});
|
|
637
|
+
} catch (error) {
|
|
638
|
+
inviteWarning = `${error instanceof Error && /missing_scope/i.test(error.message) ? "Slack is missing the invitation permission" : "Slack rejected the invitation"}; the requesting user can join the returned public channel, or an operator can reauthorize the Slack app and retry.`;
|
|
639
|
+
}
|
|
640
|
+
return {
|
|
641
|
+
channelId,
|
|
642
|
+
name: result.channel?.name?.trim() || input.name,
|
|
643
|
+
target: formatSlackTarget({
|
|
644
|
+
teamId: input.teamId,
|
|
645
|
+
kind: "channel",
|
|
646
|
+
id: channelId,
|
|
647
|
+
explicitKind: true
|
|
648
|
+
}),
|
|
649
|
+
...input.inviteUserId && !inviteWarning ? { invitedUserId: input.inviteUserId } : {},
|
|
650
|
+
...inviteWarning ? { inviteWarning } : {}
|
|
651
|
+
};
|
|
652
|
+
}
|
|
630
653
|
function createSlackReactionUpdater(method, unchangedError) {
|
|
631
654
|
return async (channelId, messageId, emoji, opts = {}) => {
|
|
632
655
|
const client = await getClient(opts, "write");
|
|
@@ -653,7 +676,6 @@ async function removeOwnSlackReactions(channelId, messageId, opts = {}) {
|
|
|
653
676
|
if (!name) continue;
|
|
654
677
|
if ((reaction?.users ?? []).includes(userId)) toRemove.add(name);
|
|
655
678
|
}
|
|
656
|
-
if (toRemove.size === 0) return [];
|
|
657
679
|
await Promise.all(Array.from(toRemove, (name) => removeSlackReaction(channelId, messageId, name, { client })));
|
|
658
680
|
return Array.from(toRemove);
|
|
659
681
|
}
|
|
@@ -667,26 +689,10 @@ async function listSlackReactions(channelId, messageId, opts = {}) {
|
|
|
667
689
|
async function sendSlackMessage(to, content, opts) {
|
|
668
690
|
const onDeliveryResult = Object.getOwnPropertyDescriptor(opts, SLACK_PRIVATE_ACTION_DELIVERY_RESULT)?.value;
|
|
669
691
|
return await sendMessageSlack(to, content, {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
...opts.forceDocument ? { forceDocument: true } : {},
|
|
675
|
-
mediaAccess: opts.mediaAccess,
|
|
676
|
-
mediaLocalRoots: opts.mediaLocalRoots,
|
|
677
|
-
mediaReadFile: opts.mediaReadFile,
|
|
678
|
-
client: opts.client,
|
|
679
|
-
assertDirectAdapterHandoff: opts.assertDirectAdapterHandoff,
|
|
680
|
-
threadTs: opts.threadTs,
|
|
681
|
-
replyBroadcast: opts.replyBroadcast,
|
|
682
|
-
...opts.textIsSlackMrkdwn ? { textIsSlackMrkdwn: true } : {},
|
|
683
|
-
...opts.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
|
|
684
|
-
...opts.authoredTextPlacement ? { authoredTextPlacement: opts.authoredTextPlacement } : {},
|
|
685
|
-
...Object.hasOwn(opts, "nativeDataFallbackBaseText") ? { nativeDataFallbackBaseText: opts.nativeDataFallbackBaseText } : {},
|
|
686
|
-
...opts.uploadFileName ? { uploadFileName: opts.uploadFileName } : {},
|
|
687
|
-
...opts.uploadTitle ? { uploadTitle: opts.uploadTitle } : {},
|
|
688
|
-
...typeof onDeliveryResult === "function" ? { onDeliveryResult } : {},
|
|
689
|
-
blocks: opts.blocks
|
|
692
|
+
...opts,
|
|
693
|
+
uploadFileName: opts.uploadFileName || void 0,
|
|
694
|
+
uploadTitle: opts.uploadTitle || void 0,
|
|
695
|
+
onDeliveryResult: typeof onDeliveryResult === "function" ? onDeliveryResult : void 0
|
|
690
696
|
});
|
|
691
697
|
}
|
|
692
698
|
async function editSlackMessage(channelId, messageId, content, opts = {}) {
|
|
@@ -720,7 +726,7 @@ async function editSlackRenderedMessage(channelId, messageId, content, opts = {}
|
|
|
720
726
|
if (!hasNativeData || !isSlackInvalidBlocksError(error)) throw error;
|
|
721
727
|
logVerbose("slack edit: native data block rejected, retrying with text fallback");
|
|
722
728
|
const survivorBlocks = stripSlackNativeDataBlocks(blocks);
|
|
723
|
-
const survivorText = buildSlackBlocksFallbackText(survivorBlocks)
|
|
729
|
+
const survivorText = buildSlackBlocksFallbackText(survivorBlocks);
|
|
724
730
|
const authoredEditText = content.trim();
|
|
725
731
|
const baseText = authoredEditText && !survivorText.includes(authoredEditText) ? authoredEditText : "";
|
|
726
732
|
const fallbackPlan = buildSlackNativeDataDeliveryPlan({
|
|
@@ -847,5 +853,4 @@ async function downloadSlackFile(fileId, opts) {
|
|
|
847
853
|
maxBytes: opts.maxBytes
|
|
848
854
|
}))?.[0] ?? null;
|
|
849
855
|
}
|
|
850
|
-
//#endregion
|
|
851
856
|
export { hasSlackTableBlock as C, buildSlackEditTextPayload as D, resolveSlackMessageText as E, hasSlackMessageTableBlock as S, resolveSlackBlocksText as T, media_exports as _, editSlackRenderedMessage as a, formatSlackFileReference as b, listSlackPins as c, reactSlackMessage as d, readSlackMessages as f, unpinSlackMessage as g, sendSlackMessage as h, editSlackMessage as i, listSlackReactions as l, removeSlackReaction as m, deleteSlackMessage as n, getSlackMemberInfo as o, removeOwnSlackReactions as p, downloadSlackFile as r, listSlackEmojis as s, actions_exports as t, pinSlackMessage as u, isGovSlackClient as v, isSlackUnfurlAttachment as w, formatSlackFileReferenceList as x, saveRemoteMedia as y };
|
package/dist/.setup/{approval-handler.runtime-D8ArtDQt.mjs → approval-handler.runtime-Ch7BecYK.mjs}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as sendMessageSlack } from "./send-
|
|
6
|
-
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-
|
|
1
|
+
import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
|
|
2
|
+
import { Et as isSlackAnyNativeApprovalClientEnabled, F as truncateSlackText, I as truncateSlackTextByUtf8Bytes, Pt as shouldHandleSlackNativeApprovalRequest, Q as SLACK_APPROVAL_HEADER_BLOCK_ID, Qt as normalizeSlackApproverId, i as setSlackSessionStatus, vt as SLACK_EDIT_TEXT_MAX_BYTES } from "./probe-B_Ax1vS1.mjs";
|
|
3
|
+
import { o as resolveSlackReplyBlocks } from "./reply-blocks-DyYYRrP_.mjs";
|
|
4
|
+
import { l as getSlackListenerWriteClient } from "./cursor-pages-jVn3Vkfi.mjs";
|
|
5
|
+
import { t as sendMessageSlack } from "./send-WJZ73VSf.mjs";
|
|
6
|
+
import { n as runSlackApprovalMessageUpdate } from "./approval-message-updates-CqcRoa28.mjs";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
9
9
|
import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
10
10
|
import { logError } from "openclaw/plugin-sdk/logging-core";
|
|
11
|
-
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
12
11
|
import { formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
13
|
-
|
|
12
|
+
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
13
|
+
// extensions/slack/src/approval-handler.runtime.ts
|
|
14
14
|
const SLACK_CONTEXT_ELEMENTS_MAX = 10;
|
|
15
15
|
const SLACK_TEXT_OBJECT_MAX = 3e3;
|
|
16
16
|
function resolveHandlerContext(params) {
|
|
@@ -22,9 +22,6 @@ function resolveHandlerContext(params) {
|
|
|
22
22
|
context
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function truncateSlackMrkdwn(text, maxChars) {
|
|
26
|
-
return truncateSlackText(text, Math.max(0, Math.floor(maxChars)), "preserve");
|
|
27
|
-
}
|
|
28
25
|
function buildSlackCodeBlock(text) {
|
|
29
26
|
let fence = "```";
|
|
30
27
|
while (text.includes(fence)) fence += "`";
|
|
@@ -40,7 +37,7 @@ function buildSlackMetadataContextBlock(lines) {
|
|
|
40
37
|
const visibleLineCount = lines.length > SLACK_CONTEXT_ELEMENTS_MAX ? 9 : lines.length;
|
|
41
38
|
const elements = lines.slice(0, visibleLineCount).map((line) => ({
|
|
42
39
|
type: "mrkdwn",
|
|
43
|
-
text:
|
|
40
|
+
text: truncateSlackText(line, SLACK_TEXT_OBJECT_MAX, "preserve")
|
|
44
41
|
}));
|
|
45
42
|
if (lines.length > SLACK_CONTEXT_ELEMENTS_MAX) elements.push({
|
|
46
43
|
type: "mrkdwn",
|
|
@@ -95,8 +92,8 @@ function buildSlackApprovalPayload(input) {
|
|
|
95
92
|
renderBody(bodyText),
|
|
96
93
|
...metadataLines
|
|
97
94
|
].join("\n");
|
|
98
|
-
const headerDescription = isPlugin && phase === "pending" ?
|
|
99
|
-
const blocks = [buildSlackApprovalSection(`${heading}\n${headerDescription}`, phase === "pending" ? SLACK_APPROVAL_HEADER_BLOCK_ID : void 0), buildSlackApprovalSection(`${bodyLabel}\n${renderBody(
|
|
95
|
+
const headerDescription = isPlugin && phase === "pending" ? truncateSlackText(description, 2600, "preserve") : description;
|
|
96
|
+
const blocks = [buildSlackApprovalSection(`${heading}\n${headerDescription}`, phase === "pending" ? SLACK_APPROVAL_HEADER_BLOCK_ID : void 0), buildSlackApprovalSection(`${bodyLabel}\n${renderBody(truncateSlackText(bodyText, 2600, "preserve"))}`)];
|
|
100
97
|
const metadataBlock = buildSlackMetadataContextBlock(metadataLines);
|
|
101
98
|
if (metadataBlock) blocks.push(metadataBlock);
|
|
102
99
|
if (phase === "pending") blocks.push(...resolveSlackReplyBlocks({
|
|
@@ -108,22 +105,6 @@ function buildSlackApprovalPayload(input) {
|
|
|
108
105
|
blocks
|
|
109
106
|
};
|
|
110
107
|
}
|
|
111
|
-
async function updateMessage(client, accountId, { channelId, messageTs }, { text, blocks }) {
|
|
112
|
-
try {
|
|
113
|
-
await runSlackApprovalMessageUpdate({
|
|
114
|
-
accountId,
|
|
115
|
-
channelId,
|
|
116
|
-
messageTs
|
|
117
|
-
}, () => client.chat.update({
|
|
118
|
-
channel: channelId,
|
|
119
|
-
ts: messageTs,
|
|
120
|
-
text: truncateSlackTextByUtf8Bytes(text, SLACK_EDIT_TEXT_MAX_BYTES),
|
|
121
|
-
blocks
|
|
122
|
-
}));
|
|
123
|
-
} catch (err) {
|
|
124
|
-
logError(`slack approvals: failed to update message: ${String(err)}`);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
108
|
const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapterAsync({
|
|
128
109
|
eventKinds: [
|
|
129
110
|
"exec",
|
|
@@ -229,7 +210,22 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapterAsyn
|
|
|
229
210
|
});
|
|
230
211
|
if (!resolved) return;
|
|
231
212
|
const client = resolveApprovalClient(resolved.context, entry.teamId);
|
|
232
|
-
|
|
213
|
+
const { channelId, messageTs } = entry;
|
|
214
|
+
const { text, blocks } = payload;
|
|
215
|
+
try {
|
|
216
|
+
await runSlackApprovalMessageUpdate({
|
|
217
|
+
accountId: resolved.accountId,
|
|
218
|
+
channelId,
|
|
219
|
+
messageTs
|
|
220
|
+
}, () => client.chat.update({
|
|
221
|
+
channel: channelId,
|
|
222
|
+
ts: messageTs,
|
|
223
|
+
text: truncateSlackTextByUtf8Bytes(text, SLACK_EDIT_TEXT_MAX_BYTES),
|
|
224
|
+
blocks
|
|
225
|
+
}));
|
|
226
|
+
} catch (err) {
|
|
227
|
+
logError(`slack approvals: failed to update message: ${String(err)}`);
|
|
228
|
+
}
|
|
233
229
|
await setSlackSessionStatus({
|
|
234
230
|
client,
|
|
235
231
|
channelId: entry.channelId,
|
|
@@ -265,5 +261,4 @@ async function resolveApprovalChannel(client, target, teamId) {
|
|
|
265
261
|
if (!channelId) throw new Error("Slack approval DM did not return a channel id");
|
|
266
262
|
return `channel:${channelId}`;
|
|
267
263
|
}
|
|
268
|
-
//#endregion
|
|
269
264
|
export { slackApprovalNativeRuntime };
|
package/dist/.setup/{approval-message-updates-DT7XBPbV.mjs → approval-message-updates-CqcRoa28.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as decodeSlackApprovalAction, W as isSlackApprovalActionId } from "./probe-B_Ax1vS1.mjs";
|
|
2
2
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
4
|
-
|
|
4
|
+
// extensions/slack/src/approval-message-updates.ts
|
|
5
5
|
const updates = new KeyedAsyncQueue();
|
|
6
6
|
function runSlackApprovalMessageUpdate(target, update) {
|
|
7
7
|
return updates.enqueue(JSON.stringify([
|
|
@@ -22,5 +22,4 @@ function hasSlackApprovalControl(blocks, approval) {
|
|
|
22
22
|
});
|
|
23
23
|
}) ?? false;
|
|
24
24
|
}
|
|
25
|
-
//#endregion
|
|
26
25
|
export { runSlackApprovalMessageUpdate as n, hasSlackApprovalControl as t };
|