@openclaw/slack 2026.7.2-beta.3 → 2026.7.2-beta.5
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/README.md +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{account-inspect-Bvbtu3iH.js → account-inspect-jn1xLaVi.js} +2 -2
- package/dist/account-reply-mode-DrUXogvO.js +14 -0
- package/dist/{accounts-DQEbYKh9.js → accounts-BSr252c_.js} +6 -27
- package/dist/{accounts.runtime-BIKmJdtJ.js → accounts.runtime-CjULMLTa.js} +1 -1
- package/dist/{action-runtime-DqkRwO3Z.js → action-runtime-BO3HK_50.js} +7 -7
- package/dist/action-runtime.runtime-DbEcqEXC.js +2 -0
- package/dist/{actions-CF0tUY5q.js → actions-BkOaiDSX.js} +6 -6
- package/dist/{actions.runtime-hCbx4RXg.js → actions.runtime-Do-iOL51.js} +1 -1
- package/dist/api.js +15 -15
- package/dist/{approval-handler.runtime-Em8I1-8-.js → approval-handler.runtime-BAnGN7w0.js} +2 -2
- package/dist/{channel-4-TRi1D6.js → channel-Cnrlie9S.js} +26 -36
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-Cu1yjNg2.js → channel-type-CPDX8EV-.js} +4 -4
- package/dist/{channel.setup-CgkADtZg.js → channel.setup-DyZdLwUB.js} +6 -25
- package/dist/{setup-core-CeiAVwQ3.js → config-adapter-Bb8hn2tM.js} +141 -72
- package/dist/{config-schema-XjJGfwQC.js → config-schema-BajbuJGL.js} +229 -30
- package/dist/{directory-config-Bv0lcUlH.js → directory-config-CeixfVuC.js} +2 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-CzUIB7th.js → directory-live-CUwGPX2d.js} +3 -3
- package/dist/doctor-contract-CsGH1Dfc.js +158 -0
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-Bw-65m3V.js → group-policy-CthIXE2T.js} +48 -7
- package/dist/{message-tool-api-C2pcf5du.js → message-tool-api-CvKoWYYQ.js} +1 -6
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CNFeF30h.js → monitor-Cb5ZsOTY.js} +4 -4
- package/dist/{outbound-adapter-CVi2uok0.js → outbound-adapter-sGrozuRg.js} +11 -68
- package/dist/{pipeline.runtime-CTvokbty.js → pipeline.runtime-mFCCSllA.js} +2173 -1999
- package/dist/{policy-b_dOPDCq.js → policy-DVg6FyMP.js} +1 -1
- package/dist/{probe-Borhn9PQ.js → probe-BhQTDVBQ.js} +51 -58
- package/dist/{provider-B-HVL5ZE.js → provider-PSppCU_K.js} +435 -252
- package/dist/{relay-source-Ea_P9VcO.js → relay-source-D0mb_JBk.js} +1 -1
- package/dist/{replies-B4bOdrYb.js → replies-BkPPM2Ri.js} +50 -13
- package/dist/{resolve-channels-KTc568SU.js → resolve-channels-B3RlJKyV.js} +2 -2
- package/dist/{resolve-users-DeGJf1yp.js → resolve-users-DTm7PEMa.js} +2 -2
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-8H4AJuhK.js} +1 -0
- package/dist/{runtime-api-BFfNpzDe.js → runtime-api-jpn3vQ7e.js} +3 -2
- package/dist/runtime-api.js +11 -11
- package/dist/{scopes-lx08L56K.js → scopes-B2SqZ--4.js} +1 -1
- package/dist/{security-audit-CikQhBUY.js → security-audit-DR097212.js} +1 -11
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-KuTDky7i.js → send-2IoDXPeB.js} +8 -22
- package/dist/{send.runtime-CXyxws1D.js → send.runtime-BKd_PAEw.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-DLA0vHXp.js → setup-surface-Dyam58nO.js} +47 -39
- package/dist/{shared-C4yVB0Q-.js → shared-g55DV75U.js} +16 -37
- package/dist/{slash-dispatch.runtime-BT-mMm-f.js → slash-dispatch.runtime-BRQbvn2e.js} +10 -9
- package/node_modules/@slack/bolt/dist/App.d.ts +4 -19
- package/node_modules/@slack/bolt/dist/App.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/App.js +21 -40
- package/node_modules/@slack/bolt/dist/App.js.map +1 -1
- package/node_modules/@slack/bolt/dist/context/create-respond.d.ts +3 -3
- package/node_modules/@slack/bolt/dist/context/create-respond.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/context/create-respond.js +13 -2
- package/node_modules/@slack/bolt/dist/context/create-respond.js.map +1 -1
- package/node_modules/@slack/bolt/dist/errors.d.ts +6 -8
- package/node_modules/@slack/bolt/dist/errors.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/errors.js +11 -11
- package/node_modules/@slack/bolt/dist/errors.js.map +1 -1
- package/node_modules/@slack/bolt/dist/helpers.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/helpers.js +1 -2
- package/node_modules/@slack/bolt/dist/helpers.js.map +1 -1
- package/node_modules/@slack/bolt/dist/index.d.ts +0 -1
- package/node_modules/@slack/bolt/dist/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/index.js +1 -3
- package/node_modules/@slack/bolt/dist/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts +10 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +5 -1
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js +10 -14
- package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.js +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.js.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts +3 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +2 -1
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js.map +1 -1
- package/node_modules/@slack/bolt/dist/types/actions/index.d.ts +2 -4
- package/node_modules/@slack/bolt/dist/types/actions/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/actions/index.js +0 -2
- package/node_modules/@slack/bolt/dist/types/actions/index.js.map +1 -1
- package/node_modules/@slack/bolt/dist/types/events/index.d.ts +2 -0
- package/node_modules/@slack/bolt/dist/types/events/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/utilities.d.ts +2 -2
- package/node_modules/@slack/bolt/dist/types/utilities.d.ts.map +1 -1
- package/node_modules/@slack/bolt/dist/types/view/index.d.ts +1 -31
- package/node_modules/@slack/bolt/dist/types/view/index.d.ts.map +1 -1
- package/node_modules/@slack/bolt/package.json +10 -11
- package/node_modules/@slack/logger/README.md +1 -1
- package/node_modules/@slack/logger/dist/index.js +17 -13
- package/node_modules/@slack/logger/dist/index.js.map +1 -1
- package/node_modules/@slack/logger/package.json +6 -7
- package/node_modules/@slack/oauth/README.md +1 -1
- package/node_modules/@slack/oauth/dist/errors.d.ts +25 -14
- package/node_modules/@slack/oauth/dist/errors.d.ts.map +1 -1
- package/node_modules/@slack/oauth/dist/errors.js +24 -33
- package/node_modules/@slack/oauth/dist/errors.js.map +1 -1
- package/node_modules/@slack/oauth/dist/install-provider.js +58 -16
- package/node_modules/@slack/oauth/dist/install-provider.js.map +1 -1
- package/node_modules/@slack/oauth/dist/installation-stores/file-store.js +4 -2
- package/node_modules/@slack/oauth/dist/installation-stores/file-store.js.map +1 -1
- package/node_modules/@slack/oauth/dist/installation-stores/memory-store.js +3 -16
- package/node_modules/@slack/oauth/dist/installation-stores/memory-store.js.map +1 -1
- package/node_modules/@slack/oauth/dist/state-stores/clear-state-store.js +2 -0
- package/node_modules/@slack/oauth/dist/state-stores/clear-state-store.js.map +1 -1
- package/node_modules/@slack/oauth/dist/state-stores/file-state-store.js +3 -0
- package/node_modules/@slack/oauth/dist/state-stores/file-state-store.js.map +1 -1
- package/node_modules/@slack/oauth/package.json +8 -9
- package/node_modules/@slack/socket-mode/README.md +1 -1
- package/node_modules/@slack/socket-mode/dist/package.json +21 -13
- package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts +14 -8
- package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +136 -48
- package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts +12 -6
- package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +87 -38
- package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts +31 -1
- package/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/errors.d.ts +31 -37
- package/node_modules/@slack/socket-mode/dist/src/errors.d.ts.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/errors.js +43 -47
- package/node_modules/@slack/socket-mode/dist/src/errors.js.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/index.d.ts +2 -2
- package/node_modules/@slack/socket-mode/dist/src/index.d.ts.map +1 -1
- package/node_modules/@slack/socket-mode/dist/src/index.js +7 -1
- package/node_modules/@slack/socket-mode/dist/src/index.js.map +1 -1
- package/node_modules/@slack/socket-mode/package.json +21 -13
- package/node_modules/@slack/types/README.md +1 -1
- package/node_modules/@slack/types/dist/events/app.d.ts +28 -0
- package/node_modules/@slack/types/dist/events/app.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.d.ts +2 -2
- package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -1
- package/node_modules/@slack/types/dist/events/index.js.map +1 -1
- package/node_modules/@slack/types/dist/events/message.d.ts +2 -0
- package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -1
- package/node_modules/@slack/types/package.json +3 -3
- package/node_modules/@slack/web-api/README.md +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.d.ts +42 -71
- package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/WebClient.js +180 -248
- package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
- package/node_modules/@slack/web-api/dist/chat-stream.js +37 -22
- package/node_modules/@slack/web-api/dist/chat-stream.js.map +1 -1
- package/node_modules/@slack/web-api/dist/errors.d.ts +32 -51
- package/node_modules/@slack/web-api/dist/errors.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/errors.js +64 -55
- package/node_modules/@slack/web-api/dist/errors.js.map +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.d.ts +0 -9
- package/node_modules/@slack/web-api/dist/file-upload.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/file-upload.js +41 -46
- package/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
- package/node_modules/@slack/web-api/dist/index.d.ts +2 -2
- package/node_modules/@slack/web-api/dist/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/index.js +8 -1
- package/node_modules/@slack/web-api/dist/index.js.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.d.ts +2 -38
- package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/methods.js +1347 -1384
- package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts +0 -1
- package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts +3 -3
- package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts +66 -1
- package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/rtm.d.ts +1 -14
- package/node_modules/@slack/web-api/dist/types/request/rtm.d.ts.map +1 -1
- package/node_modules/@slack/web-api/dist/types/request/workflows.d.ts +0 -29
- package/node_modules/@slack/web-api/dist/types/request/workflows.d.ts.map +1 -1
- package/node_modules/@slack/web-api/package.json +6 -10
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +16 -6
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/retry/LICENSE +21 -21
- package/node_modules/@types/retry/README.md +5 -4
- package/node_modules/@types/retry/index.d.ts +20 -13
- package/node_modules/@types/retry/package.json +9 -11
- package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
- package/node_modules/iconv-lite/encodings/utf32.js +10 -3
- package/node_modules/iconv-lite/package.json +2 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.js +135 -158
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/CHANGELOG.md +11 -0
- package/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/qs/lib/parse.js +19 -8
- package/node_modules/qs/lib/utils.js +47 -8
- package/node_modules/qs/package.json +6 -5
- package/node_modules/qs/test/parse.js +230 -0
- package/node_modules/qs/test/utils.js +194 -0
- package/node_modules/typebox/build/compile/validator.d.mts +1 -4
- package/node_modules/typebox/build/guard/guard.d.mts +1 -1
- package/node_modules/typebox/build/guard/guard.mjs +5 -2
- package/node_modules/typebox/build/guard/string.mjs +16 -4
- package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
- package/node_modules/typebox/build/typebox.d.mts +1 -1
- package/node_modules/typebox/build/typebox.mjs +1 -1
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +29 -32
- package/node_modules/{es-set-tostringtag → undici}/LICENSE +1 -1
- package/node_modules/undici/README.md +741 -0
- package/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/undici/docs/docs/api/Client.md +288 -0
- package/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +128 -0
- package/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +315 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1392 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +139 -0
- package/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +93 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +50 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +118 -0
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +616 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +275 -0
- package/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/undici/index.d.ts +3 -0
- package/node_modules/undici/index.js +234 -0
- package/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/undici/lib/api/api-connect.js +110 -0
- package/node_modules/undici/lib/api/api-pipeline.js +252 -0
- package/node_modules/undici/lib/api/api-request.js +214 -0
- package/node_modules/undici/lib/api/api-stream.js +209 -0
- package/node_modules/undici/lib/api/api-upgrade.js +111 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +580 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +234 -0
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +461 -0
- package/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/undici/lib/core/constants.js +143 -0
- package/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/undici/lib/core/request.js +453 -0
- package/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/undici/lib/core/symbols.js +75 -0
- package/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/undici/lib/core/util.js +992 -0
- package/node_modules/undici/lib/dispatcher/agent.js +158 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +219 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1722 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +995 -0
- package/node_modules/undici/lib/dispatcher/client.js +664 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
- package/node_modules/undici/lib/dispatcher/pool.js +118 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +137 -0
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +260 -0
- package/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/undici/lib/global.js +59 -0
- package/node_modules/undici/lib/handler/cache-handler.js +578 -0
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +67 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +460 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +238 -0
- package/node_modules/undici/lib/handler/retry-handler.js +394 -0
- package/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/node_modules/undici/lib/interceptor/cache.js +495 -0
- package/node_modules/undici/lib/interceptor/decompress.js +259 -0
- package/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/undici/lib/interceptor/dump.js +112 -0
- package/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/node_modules/undici/lib/llhttp/constants.d.ts +195 -0
- package/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/utils.d.ts +2 -0
- package/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/undici/lib/mock/mock-utils.js +486 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/snapshot-agent.js +353 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +588 -0
- package/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/undici/lib/util/cache.js +414 -0
- package/node_modules/undici/lib/util/date.js +653 -0
- package/node_modules/undici/lib/util/promise.js +28 -0
- package/node_modules/undici/lib/util/runtime-features.js +124 -0
- package/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/undici/lib/web/cache/cache.js +864 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/undici/lib/web/cookies/parse.js +314 -0
- package/node_modules/undici/lib/web/cookies/util.js +282 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +399 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/{has-tostringtag → undici/lib/web/fetch}/LICENSE +1 -1
- package/node_modules/undici/lib/web/fetch/body.js +509 -0
- package/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +259 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/undici/lib/web/fetch/index.js +2413 -0
- package/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/undici/lib/web/infra/index.js +229 -0
- package/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/undici/lib/web/webidl/index.js +1006 -0
- package/node_modules/undici/lib/web/websocket/connection.js +329 -0
- package/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/undici/lib/web/websocket/frame.js +133 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +507 -0
- package/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +498 -0
- package/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +758 -0
- package/node_modules/undici/package.json +152 -0
- package/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/undici/types/README.md +6 -0
- package/node_modules/undici/types/agent.d.ts +32 -0
- package/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/undici/types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/undici/types/client-stats.d.ts +15 -0
- package/node_modules/undici/types/client.d.ts +139 -0
- package/node_modules/undici/types/connector.d.ts +36 -0
- package/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici/types/dispatcher.d.ts +275 -0
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici/types/errors.d.ts +177 -0
- package/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/undici/types/fetch.d.ts +231 -0
- package/node_modules/undici/types/formdata.d.ts +114 -0
- package/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/undici/types/h2c-client.d.ts +73 -0
- package/node_modules/undici/types/handlers.d.ts +14 -0
- package/node_modules/undici/types/header.d.ts +160 -0
- package/node_modules/undici/types/index.d.ts +91 -0
- package/node_modules/undici/types/interceptors.d.ts +80 -0
- package/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/node_modules/undici/types/mock-call-history.d.ts +111 -0
- package/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/undici/types/pool.d.ts +41 -0
- package/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/undici/types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici/types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/undici/types/utility.d.ts +7 -0
- package/node_modules/undici/types/webidl.d.ts +347 -0
- package/node_modules/undici/types/websocket.d.ts +188 -0
- package/node_modules/ws/lib/receiver.js +15 -32
- package/node_modules/ws/lib/websocket-server.js +4 -4
- package/node_modules/ws/lib/websocket.js +4 -4
- package/node_modules/ws/package.json +5 -1
- package/openclaw.plugin.json +1064 -1243
- package/package.json +99 -18
- package/dist/action-runtime.runtime-DEWOcFM4.js +0 -2
- package/dist/config-api-Df9a1B8C.js +0 -3
- package/dist/doctor-contract-DKpe5VBr.js +0 -202
- package/dist/interactive-replies-Dm_t2R9S.js +0 -197
- package/dist/interactive-replies-api.js +0 -2
- package/node_modules/@slack/bolt/dist/WorkflowStep.d.ts +0 -159
- package/node_modules/@slack/bolt/dist/WorkflowStep.d.ts.map +0 -1
- package/node_modules/@slack/bolt/dist/WorkflowStep.js +0 -217
- package/node_modules/@slack/bolt/dist/WorkflowStep.js.map +0 -1
- package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.d.ts +0 -49
- package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.d.ts.map +0 -1
- package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.js +0 -3
- package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.js.map +0 -1
- package/node_modules/@types/ws/LICENSE +0 -21
- package/node_modules/@types/ws/README.md +0 -15
- package/node_modules/@types/ws/index.d.mts +0 -451
- package/node_modules/@types/ws/index.d.ts +0 -445
- package/node_modules/@types/ws/package.json +0 -72
- package/node_modules/asynckit/LICENSE +0 -21
- package/node_modules/asynckit/README.md +0 -233
- package/node_modules/asynckit/bench.js +0 -76
- package/node_modules/asynckit/index.js +0 -6
- package/node_modules/asynckit/lib/abort.js +0 -29
- package/node_modules/asynckit/lib/async.js +0 -34
- package/node_modules/asynckit/lib/defer.js +0 -26
- package/node_modules/asynckit/lib/iterate.js +0 -75
- package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
- package/node_modules/asynckit/lib/readable_parallel.js +0 -25
- package/node_modules/asynckit/lib/readable_serial.js +0 -25
- package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
- package/node_modules/asynckit/lib/state.js +0 -37
- package/node_modules/asynckit/lib/streamify.js +0 -141
- package/node_modules/asynckit/lib/terminator.js +0 -29
- package/node_modules/asynckit/package.json +0 -63
- package/node_modules/asynckit/parallel.js +0 -43
- package/node_modules/asynckit/serial.js +0 -17
- package/node_modules/asynckit/serialOrdered.js +0 -75
- package/node_modules/asynckit/stream.js +0 -21
- package/node_modules/axios/CHANGELOG.md +0 -1676
- package/node_modules/axios/LICENSE +0 -7
- package/node_modules/axios/MIGRATION_GUIDE.md +0 -877
- package/node_modules/axios/README.md +0 -2391
- package/node_modules/axios/dist/axios.js +0 -4864
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/axios.min.js +0 -5
- package/node_modules/axios/dist/axios.min.js.map +0 -1
- package/node_modules/axios/dist/browser/axios.cjs +0 -4701
- package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
- package/node_modules/axios/dist/esm/axios.js +0 -4722
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.min.js +0 -3
- package/node_modules/axios/dist/esm/axios.min.js.map +0 -1
- package/node_modules/axios/dist/node/axios.cjs +0 -5348
- package/node_modules/axios/dist/node/axios.cjs.map +0 -1
- package/node_modules/axios/index.d.cts +0 -715
- package/node_modules/axios/index.d.ts +0 -734
- package/node_modules/axios/index.js +0 -45
- package/node_modules/axios/lib/adapters/README.md +0 -36
- package/node_modules/axios/lib/adapters/adapters.js +0 -132
- package/node_modules/axios/lib/adapters/fetch.js +0 -469
- package/node_modules/axios/lib/adapters/http.js +0 -1202
- package/node_modules/axios/lib/adapters/xhr.js +0 -226
- package/node_modules/axios/lib/axios.js +0 -89
- package/node_modules/axios/lib/cancel/CancelToken.js +0 -135
- package/node_modules/axios/lib/cancel/CanceledError.js +0 -22
- package/node_modules/axios/lib/cancel/isCancel.js +0 -5
- package/node_modules/axios/lib/core/Axios.js +0 -281
- package/node_modules/axios/lib/core/AxiosError.js +0 -176
- package/node_modules/axios/lib/core/AxiosHeaders.js +0 -380
- package/node_modules/axios/lib/core/InterceptorManager.js +0 -72
- package/node_modules/axios/lib/core/README.md +0 -8
- package/node_modules/axios/lib/core/buildFullPath.js +0 -22
- package/node_modules/axios/lib/core/dispatchRequest.js +0 -89
- package/node_modules/axios/lib/core/mergeConfig.js +0 -124
- package/node_modules/axios/lib/core/settle.js +0 -27
- package/node_modules/axios/lib/core/transformData.js +0 -28
- package/node_modules/axios/lib/defaults/index.js +0 -177
- package/node_modules/axios/lib/defaults/transitional.js +0 -8
- package/node_modules/axios/lib/env/README.md +0 -3
- package/node_modules/axios/lib/env/classes/FormData.js +0 -2
- package/node_modules/axios/lib/env/data.js +0 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -61
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
- package/node_modules/axios/lib/helpers/README.md +0 -7
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
- package/node_modules/axios/lib/helpers/bind.js +0 -14
- package/node_modules/axios/lib/helpers/buildURL.js +0 -66
- package/node_modules/axios/lib/helpers/callbackify.js +0 -18
- package/node_modules/axios/lib/helpers/combineURLs.js +0 -15
- package/node_modules/axios/lib/helpers/composeSignals.js +0 -56
- package/node_modules/axios/lib/helpers/cookies.js +0 -60
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -100
- package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -97
- package/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
- package/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
- package/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
- package/node_modules/axios/lib/helpers/null.js +0 -2
- package/node_modules/axios/lib/helpers/parseHeaders.js +0 -69
- package/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
- package/node_modules/axios/lib/helpers/progressEventReducer.js +0 -51
- package/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/axios/lib/helpers/resolveConfig.js +0 -106
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -178
- package/node_modules/axios/lib/helpers/speedometer.js +0 -55
- package/node_modules/axios/lib/helpers/spread.js +0 -28
- package/node_modules/axios/lib/helpers/throttle.js +0 -44
- package/node_modules/axios/lib/helpers/toFormData.js +0 -249
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/node_modules/axios/lib/helpers/validator.js +0 -112
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/browser/index.js +0 -13
- package/node_modules/axios/lib/platform/common/utils.js +0 -52
- package/node_modules/axios/lib/platform/index.js +0 -7
- package/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
- package/node_modules/axios/lib/platform/node/index.js +0 -37
- package/node_modules/axios/lib/utils.js +0 -931
- package/node_modules/axios/package.json +0 -183
- package/node_modules/combined-stream/License +0 -19
- package/node_modules/combined-stream/Readme.md +0 -138
- package/node_modules/combined-stream/lib/combined_stream.js +0 -208
- package/node_modules/combined-stream/package.json +0 -25
- package/node_modules/delayed-stream/.npmignore +0 -1
- package/node_modules/delayed-stream/License +0 -19
- package/node_modules/delayed-stream/Makefile +0 -7
- package/node_modules/delayed-stream/Readme.md +0 -141
- package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
- package/node_modules/delayed-stream/package.json +0 -27
- package/node_modules/es-set-tostringtag/.eslintrc +0 -13
- package/node_modules/es-set-tostringtag/.nycrc +0 -9
- package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
- package/node_modules/es-set-tostringtag/README.md +0 -53
- package/node_modules/es-set-tostringtag/index.d.ts +0 -10
- package/node_modules/es-set-tostringtag/index.js +0 -35
- package/node_modules/es-set-tostringtag/package.json +0 -78
- package/node_modules/es-set-tostringtag/test/index.js +0 -85
- package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
- package/node_modules/follow-redirects/LICENSE +0 -18
- package/node_modules/follow-redirects/README.md +0 -157
- package/node_modules/follow-redirects/debug.js +0 -15
- package/node_modules/follow-redirects/http.js +0 -1
- package/node_modules/follow-redirects/https.js +0 -1
- package/node_modules/follow-redirects/index.js +0 -709
- package/node_modules/follow-redirects/package.json +0 -58
- package/node_modules/form-data/CHANGELOG.md +0 -669
- package/node_modules/form-data/License +0 -19
- package/node_modules/form-data/README.md +0 -350
- package/node_modules/form-data/index.d.ts +0 -51
- package/node_modules/form-data/lib/browser.js +0 -4
- package/node_modules/form-data/lib/form_data.js +0 -514
- package/node_modules/form-data/lib/populate.js +0 -10
- package/node_modules/form-data/node_modules/mime-db/HISTORY.md +0 -507
- package/node_modules/form-data/node_modules/mime-db/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-db/README.md +0 -100
- package/node_modules/form-data/node_modules/mime-db/db.json +0 -8519
- package/node_modules/form-data/node_modules/mime-db/index.js +0 -12
- package/node_modules/form-data/node_modules/mime-db/package.json +0 -60
- package/node_modules/form-data/node_modules/mime-types/HISTORY.md +0 -397
- package/node_modules/form-data/node_modules/mime-types/LICENSE +0 -23
- package/node_modules/form-data/node_modules/mime-types/README.md +0 -113
- package/node_modules/form-data/node_modules/mime-types/index.js +0 -188
- package/node_modules/form-data/node_modules/mime-types/package.json +0 -44
- package/node_modules/form-data/package.json +0 -83
- package/node_modules/has-tostringtag/.eslintrc +0 -5
- package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
- package/node_modules/has-tostringtag/.nycrc +0 -13
- package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
- package/node_modules/has-tostringtag/README.md +0 -46
- package/node_modules/has-tostringtag/index.d.ts +0 -3
- package/node_modules/has-tostringtag/index.js +0 -8
- package/node_modules/has-tostringtag/package.json +0 -108
- package/node_modules/has-tostringtag/shams.d.ts +0 -3
- package/node_modules/has-tostringtag/shams.js +0 -8
- package/node_modules/has-tostringtag/test/index.js +0 -21
- package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
- package/node_modules/has-tostringtag/test/tests.js +0 -15
- package/node_modules/has-tostringtag/tsconfig.json +0 -49
- package/node_modules/is-electron/LICENSE +0 -21
- package/node_modules/is-electron/README.md +0 -25
- package/node_modules/is-electron/index.d.ts +0 -2
- package/node_modules/is-electron/index.js +0 -21
- package/node_modules/is-electron/package.json +0 -34
- package/node_modules/is-stream/index.d.ts +0 -79
- package/node_modules/is-stream/index.js +0 -28
- package/node_modules/is-stream/license +0 -9
- package/node_modules/is-stream/package.json +0 -42
- package/node_modules/is-stream/readme.md +0 -60
- package/node_modules/proxy-from-env/LICENSE +0 -20
- package/node_modules/proxy-from-env/README.md +0 -163
- package/node_modules/proxy-from-env/index.cjs +0 -105
- package/node_modules/proxy-from-env/index.js +0 -103
- package/node_modules/proxy-from-env/package.json +0 -43
- package/npm-shrinkwrap.json +0 -1440
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
|
|
2
|
-
import { a as resolveSlackAccount, d as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-b_dOPDCq.js";
|
|
2
|
+
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-BSr252c_.js";
|
|
3
|
+
import { G as isSlackApprovalActionId, J as decodeSlackQuestionAction, K as isSlackCallbackActionId, L as SLACK_TEXT_LIMIT, Q as decodeSlackApprovalAction, V as truncateSlackText, Y as resolveSlackQuestionAction, Z as escapeSlackMrkdwn, a as allowListMatches, c as normalizeSlackAllowOwnerEntry, gt as isSlackExecApprovalAuthorizedSender, it as isSlackAnyNativeApprovalClientEnabled, l as normalizeSlackSlug, mt as isSlackApprovalAuthorizedSender, o as normalizeAllowList, q as isSlackQuestionActionId, s as normalizeAllowListLower, u as resolveSlackAllowListMatch } from "./group-policy-CthIXE2T.js";
|
|
4
|
+
import { h as resolveSlackWebClientOptions, m as resolveSlackProxyDispatcher, o as createSlackStartupAuthClient, r as formatSlackError, u as getSlackListenerUploadCompletionClient } from "./probe-BhQTDVBQ.js";
|
|
5
|
+
import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
6
|
+
import { i as setSlackDefaultSendIdentity } from "./send-2IoDXPeB.js";
|
|
7
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-B3RlJKyV.js";
|
|
8
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-DTm7PEMa.js";
|
|
9
|
+
import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-DVg6FyMP.js";
|
|
11
10
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
12
11
|
import { asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringEntriesLower, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
12
|
import { normalizeAccountId, normalizeMainKey, resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
|
|
14
|
-
import {
|
|
13
|
+
import { createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
14
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
16
15
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
17
16
|
import { computeBackoff, createNonExitingRuntime, createSubsystemLogger, danger, getChildLogger, logVerbose, shouldLogVerbose, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -20,10 +19,11 @@ import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plu
|
|
|
20
19
|
import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
21
20
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
22
21
|
import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
|
|
23
|
-
import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
22
|
+
import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, isApprovalNotFoundError, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
24
23
|
import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
25
24
|
import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
26
|
-
import {
|
|
25
|
+
import { buildChannelMetadata } from "openclaw/plugin-sdk/security-runtime";
|
|
26
|
+
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
27
27
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
28
28
|
import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
|
|
29
29
|
import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
|
|
@@ -35,7 +35,7 @@ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-na
|
|
|
35
35
|
import { getSessionEntry, readSessionUpdatedAt, resolveChannelResetConfig, resolveSessionKey, resolveStorePath, resolveStorePath as resolveStorePath$1, updateLastRoute } from "openclaw/plugin-sdk/session-store-runtime";
|
|
36
36
|
import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime";
|
|
37
37
|
import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy as resolveOpenProviderRuntimeGroupPolicy$1, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
38
|
-
import {
|
|
38
|
+
import { loadPreparedModelCatalog, resolveAgentDir, resolveDefaultAgentId, resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
39
39
|
import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
|
|
40
40
|
import { mutateConfigFile } from "openclaw/plugin-sdk/config-mutation";
|
|
41
41
|
import { enqueueSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
|
|
@@ -45,7 +45,7 @@ import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
|
|
|
45
45
|
import { createInteractiveConversationBindingHelpers, dispatchPluginInteractiveHandler } from "openclaw/plugin-sdk/plugin-runtime";
|
|
46
46
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
47
47
|
import { createChannelInboundDebouncer, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
|
|
48
|
-
import { createChannelReplayGuard } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
48
|
+
import { createChannelReplayGuard, runClaimableDedupeClaimLoop } from "openclaw/plugin-sdk/persistent-dedupe";
|
|
49
49
|
import { generateSecureToken } from "openclaw/plugin-sdk/secure-random-runtime";
|
|
50
50
|
//#region extensions/slack/src/monitor/commands.ts
|
|
51
51
|
/**
|
|
@@ -72,6 +72,151 @@ function buildSlackSlashCommandMatcher(name) {
|
|
|
72
72
|
return new RegExp(`^/?${escaped}$`);
|
|
73
73
|
}
|
|
74
74
|
//#endregion
|
|
75
|
+
//#region extensions/slack/src/monitor/agent-view-state.ts
|
|
76
|
+
const SLACK_AGENT_VIEW_STATE_NAMESPACE = "agent-view-workspaces";
|
|
77
|
+
const SLACK_AGENT_VIEW_THREAD_STATE_NAMESPACE = "agent-view-threads";
|
|
78
|
+
const SLACK_AGENT_VIEW_STATE_MAX_ENTRIES = 4096;
|
|
79
|
+
const SLACK_AGENT_VIEW_THREAD_STATE_MAX_ENTRIES = 4096;
|
|
80
|
+
const SLACK_MANAGED_THREAD_CACHE_MAX_ENTRIES = 4096;
|
|
81
|
+
function createSlackAgentViewState(params) {
|
|
82
|
+
let enabled = false;
|
|
83
|
+
let loaded = false;
|
|
84
|
+
let persisted = false;
|
|
85
|
+
let workspaceStore;
|
|
86
|
+
let threadStore;
|
|
87
|
+
let warned = false;
|
|
88
|
+
const managedThreads = /* @__PURE__ */ new Map();
|
|
89
|
+
const warnOnce = (action, error) => {
|
|
90
|
+
if (warned) return;
|
|
91
|
+
warned = true;
|
|
92
|
+
params.warn(action, error);
|
|
93
|
+
};
|
|
94
|
+
const openWorkspaceStore = () => {
|
|
95
|
+
if (workspaceStore) return workspaceStore;
|
|
96
|
+
const runtime = getOptionalSlackRuntime();
|
|
97
|
+
if (!runtime) return;
|
|
98
|
+
try {
|
|
99
|
+
workspaceStore = runtime.state.openKeyedStore({
|
|
100
|
+
namespace: SLACK_AGENT_VIEW_STATE_NAMESPACE,
|
|
101
|
+
maxEntries: SLACK_AGENT_VIEW_STATE_MAX_ENTRIES
|
|
102
|
+
});
|
|
103
|
+
return workspaceStore;
|
|
104
|
+
} catch (error) {
|
|
105
|
+
warnOnce("open", error);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const openThreadStore = () => {
|
|
110
|
+
if (threadStore) return threadStore;
|
|
111
|
+
const runtime = getOptionalSlackRuntime();
|
|
112
|
+
if (!runtime) return;
|
|
113
|
+
try {
|
|
114
|
+
threadStore = runtime.state.openKeyedStore({
|
|
115
|
+
namespace: SLACK_AGENT_VIEW_THREAD_STATE_NAMESPACE,
|
|
116
|
+
maxEntries: SLACK_AGENT_VIEW_THREAD_STATE_MAX_ENTRIES
|
|
117
|
+
});
|
|
118
|
+
return threadStore;
|
|
119
|
+
} catch (error) {
|
|
120
|
+
warnOnce("open", error);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const workspaceStateKey = params.apiAppId ? JSON.stringify([
|
|
125
|
+
"workspace",
|
|
126
|
+
params.accountId,
|
|
127
|
+
params.teamId,
|
|
128
|
+
params.apiAppId
|
|
129
|
+
]) : void 0;
|
|
130
|
+
const record = async () => {
|
|
131
|
+
enabled = true;
|
|
132
|
+
loaded = true;
|
|
133
|
+
if (persisted || !workspaceStateKey) return;
|
|
134
|
+
const openedStore = openWorkspaceStore();
|
|
135
|
+
if (!openedStore) return;
|
|
136
|
+
try {
|
|
137
|
+
await openedStore.register(workspaceStateKey, {
|
|
138
|
+
experience: "agent",
|
|
139
|
+
observedAt: Date.now()
|
|
140
|
+
});
|
|
141
|
+
persisted = true;
|
|
142
|
+
} catch (error) {
|
|
143
|
+
warnOnce("persist", error);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const isEnabled = async () => {
|
|
147
|
+
if (enabled) return true;
|
|
148
|
+
if (loaded) return false;
|
|
149
|
+
if (!workspaceStateKey) {
|
|
150
|
+
loaded = true;
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
const openedStore = openWorkspaceStore();
|
|
154
|
+
if (!openedStore) return false;
|
|
155
|
+
try {
|
|
156
|
+
const stored = await openedStore.lookup(workspaceStateKey);
|
|
157
|
+
loaded = true;
|
|
158
|
+
enabled = stored?.experience === "agent";
|
|
159
|
+
persisted = enabled;
|
|
160
|
+
return enabled;
|
|
161
|
+
} catch (error) {
|
|
162
|
+
warnOnce("load", error);
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
const managedThreadKey = (channelId, threadTs) => JSON.stringify([channelId, threadTs]);
|
|
167
|
+
const managedThreadStateKey = (channelId, threadTs) => params.apiAppId ? JSON.stringify([
|
|
168
|
+
"thread",
|
|
169
|
+
params.accountId,
|
|
170
|
+
params.teamId,
|
|
171
|
+
params.apiAppId,
|
|
172
|
+
channelId,
|
|
173
|
+
threadTs
|
|
174
|
+
]) : void 0;
|
|
175
|
+
const rememberManagedThread = (key) => {
|
|
176
|
+
managedThreads.delete(key);
|
|
177
|
+
managedThreads.set(key, true);
|
|
178
|
+
if (managedThreads.size <= SLACK_MANAGED_THREAD_CACHE_MAX_ENTRIES) return;
|
|
179
|
+
const oldestKey = managedThreads.keys().next().value;
|
|
180
|
+
if (oldestKey !== void 0) managedThreads.delete(oldestKey);
|
|
181
|
+
};
|
|
182
|
+
const recordManagedThread = async (channelId, threadTs) => {
|
|
183
|
+
const key = managedThreadKey(channelId, threadTs);
|
|
184
|
+
rememberManagedThread(key);
|
|
185
|
+
const stateKey = managedThreadStateKey(channelId, threadTs);
|
|
186
|
+
const openedStore = stateKey ? openThreadStore() : void 0;
|
|
187
|
+
if (!openedStore || !stateKey) return;
|
|
188
|
+
try {
|
|
189
|
+
await openedStore.register(stateKey, {
|
|
190
|
+
experience: "managed-thread",
|
|
191
|
+
observedAt: Date.now()
|
|
192
|
+
});
|
|
193
|
+
} catch (error) {
|
|
194
|
+
warnOnce("persist", error);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
const isManagedThread = async (channelId, threadTs) => {
|
|
198
|
+
const key = managedThreadKey(channelId, threadTs);
|
|
199
|
+
if (managedThreads.has(key)) return true;
|
|
200
|
+
const stateKey = managedThreadStateKey(channelId, threadTs);
|
|
201
|
+
const openedStore = stateKey ? openThreadStore() : void 0;
|
|
202
|
+
if (!openedStore || !stateKey) return false;
|
|
203
|
+
try {
|
|
204
|
+
const found = (await openedStore.lookup(stateKey))?.experience === "managed-thread";
|
|
205
|
+
if (found) rememberManagedThread(key);
|
|
206
|
+
return found;
|
|
207
|
+
} catch (error) {
|
|
208
|
+
warnOnce("load", error);
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
return {
|
|
213
|
+
isEnabled,
|
|
214
|
+
isManagedThread,
|
|
215
|
+
record,
|
|
216
|
+
recordManagedThread
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
75
220
|
//#region extensions/slack/src/monitor/channel-type.ts
|
|
76
221
|
function inferSlackChannelType(channelId) {
|
|
77
222
|
const trimmed = channelId?.trim();
|
|
@@ -111,6 +256,42 @@ function writeLruMapEntry(cache, cacheKey, entry, maxEntries) {
|
|
|
111
256
|
pruneMapToMaxSize(cache, maxEntries);
|
|
112
257
|
}
|
|
113
258
|
//#endregion
|
|
259
|
+
//#region extensions/slack/src/monitor/suggested-prompts.ts
|
|
260
|
+
const DEFAULT_SLACK_SUGGESTED_PROMPTS = [
|
|
261
|
+
{
|
|
262
|
+
title: "What can you do?",
|
|
263
|
+
message: "What can you help me with?"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
title: "Summarize this channel",
|
|
267
|
+
message: "Summarize the recent activity in this channel."
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
title: "Draft a reply",
|
|
271
|
+
message: "Help me draft a reply."
|
|
272
|
+
}
|
|
273
|
+
];
|
|
274
|
+
async function updateSlackSuggestedPrompts(params) {
|
|
275
|
+
const prompts = params.prompts.map((prompt) => ({
|
|
276
|
+
title: prompt.title.trim(),
|
|
277
|
+
message: prompt.message.trim()
|
|
278
|
+
})).filter((prompt) => prompt.title && prompt.message).slice(0, 4);
|
|
279
|
+
if (prompts.length === 0) return false;
|
|
280
|
+
try {
|
|
281
|
+
await params.client.assistant.threads.setSuggestedPrompts({
|
|
282
|
+
token: params.botToken,
|
|
283
|
+
channel_id: params.channelId,
|
|
284
|
+
...params.threadTs ? { thread_ts: params.threadTs } : {},
|
|
285
|
+
...params.title?.trim() ? { title: params.title.trim() } : {},
|
|
286
|
+
prompts
|
|
287
|
+
});
|
|
288
|
+
return true;
|
|
289
|
+
} catch (error) {
|
|
290
|
+
logVerbose(`slack suggested prompts update failed for channel ${params.channelId}: ${formatSlackError(error)}`);
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
//#endregion
|
|
114
295
|
//#region extensions/slack/src/monitor/context.ts
|
|
115
296
|
const SLACK_ASSISTANT_THREAD_CONTEXT_METADATA_EVENT = "assistant_thread_context";
|
|
116
297
|
const SLACK_CHANNEL_CACHE_MAX_ENTRIES = 1024;
|
|
@@ -157,6 +338,12 @@ function createSlackMonitorContext(params) {
|
|
|
157
338
|
});
|
|
158
339
|
const assistantThreadContexts = /* @__PURE__ */ new Map();
|
|
159
340
|
let lastAssistantContextCleanupAt = Date.now();
|
|
341
|
+
const agentViewState = createSlackAgentViewState({
|
|
342
|
+
accountId: params.accountId,
|
|
343
|
+
teamId: params.teamId,
|
|
344
|
+
apiAppId: params.apiAppId,
|
|
345
|
+
warn: (action, error) => logger.warn({ error: formatSlackError(error) }, `Slack Agent View state failed to ${action}`)
|
|
346
|
+
});
|
|
160
347
|
const allowFrom = normalizeAllowList(params.allowFrom);
|
|
161
348
|
const groupDmChannels = normalizeAllowList(params.groupDmChannels);
|
|
162
349
|
const groupDmChannelsLower = new Set(normalizeAllowListLower(groupDmChannels).map((entry) => entry.replace(/^channel:/, "")));
|
|
@@ -331,26 +518,11 @@ function createSlackMonitorContext(params) {
|
|
|
331
518
|
logVerbose(`slack status update failed for channel ${p.channelId}: ${formatSlackError(err)}`);
|
|
332
519
|
}
|
|
333
520
|
};
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (prompts.length === 0) return false;
|
|
340
|
-
try {
|
|
341
|
-
await params.app.client.assistant.threads.setSuggestedPrompts({
|
|
342
|
-
token: params.botToken,
|
|
343
|
-
channel_id: p.channelId,
|
|
344
|
-
thread_ts: p.threadTs,
|
|
345
|
-
...p.title?.trim() ? { title: p.title.trim() } : {},
|
|
346
|
-
prompts
|
|
347
|
-
});
|
|
348
|
-
return true;
|
|
349
|
-
} catch (err) {
|
|
350
|
-
logVerbose(`slack suggested prompts update failed for channel ${p.channelId}: ${formatSlackError(err)}`);
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
};
|
|
521
|
+
const setSlackSuggestedPrompts = (input) => updateSlackSuggestedPrompts({
|
|
522
|
+
...input,
|
|
523
|
+
botToken: params.botToken,
|
|
524
|
+
client: params.app.client
|
|
525
|
+
});
|
|
354
526
|
const isChannelAllowed = (p) => {
|
|
355
527
|
const channelType = normalizeSlackChannelType(p.channelType, p.channelId);
|
|
356
528
|
const isDirectMessage = channelType === "im";
|
|
@@ -466,7 +638,6 @@ function createSlackMonitorContext(params) {
|
|
|
466
638
|
ackReactionScope: params.ackReactionScope,
|
|
467
639
|
typingReaction: params.typingReaction,
|
|
468
640
|
mediaMaxBytes: params.mediaMaxBytes,
|
|
469
|
-
removeAckAfterReply: params.removeAckAfterReply,
|
|
470
641
|
logger,
|
|
471
642
|
shouldDropMismatchedSlackEvent,
|
|
472
643
|
resolveSlackSystemEventSessionKey,
|
|
@@ -478,7 +649,11 @@ function createSlackMonitorContext(params) {
|
|
|
478
649
|
setSlackThreadStatus,
|
|
479
650
|
getSlackAssistantThreadContext,
|
|
480
651
|
saveSlackAssistantThreadContext,
|
|
481
|
-
|
|
652
|
+
setSlackSuggestedPrompts,
|
|
653
|
+
recordSlackAgentView: agentViewState.record,
|
|
654
|
+
isSlackAgentView: agentViewState.isEnabled,
|
|
655
|
+
recordSlackManagedViewThread: agentViewState.recordManagedThread,
|
|
656
|
+
isSlackManagedViewThread: agentViewState.isManagedThread
|
|
482
657
|
};
|
|
483
658
|
}
|
|
484
659
|
//#endregion
|
|
@@ -521,8 +696,8 @@ function assertEnterpriseSlackPolicyConfig(params) {
|
|
|
521
696
|
predicate: isStableSlackAllowlistUserEntry
|
|
522
697
|
});
|
|
523
698
|
assertStableEntries({
|
|
524
|
-
values: config.
|
|
525
|
-
path: `channels.slack.accounts.${accountId}.
|
|
699
|
+
values: config.allowFrom,
|
|
700
|
+
path: `channels.slack.accounts.${accountId}.allowFrom`,
|
|
526
701
|
predicate: isStableSlackAllowlistUserEntry
|
|
527
702
|
});
|
|
528
703
|
assertStableEntries({
|
|
@@ -611,21 +786,21 @@ function resolveSlackIdentityHealth(params) {
|
|
|
611
786
|
};
|
|
612
787
|
}
|
|
613
788
|
//#endregion
|
|
789
|
+
//#region extensions/slack/src/monitor/events/agent.ts
|
|
790
|
+
function registerSlackAgentEvents(params) {
|
|
791
|
+
const { ctx, trackEvent } = params;
|
|
792
|
+
ctx.app.event("app_context_changed", async ({ body }) => {
|
|
793
|
+
try {
|
|
794
|
+
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
795
|
+
trackEvent?.();
|
|
796
|
+
await ctx.recordSlackAgentView();
|
|
797
|
+
} catch (error) {
|
|
798
|
+
ctx.runtime.error?.(danger(`slack app_context_changed handler failed: ${formatErrorMessage(error)}`));
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
//#endregion
|
|
614
803
|
//#region extensions/slack/src/monitor/events/assistant.ts
|
|
615
|
-
const DEFAULT_ASSISTANT_PROMPTS = [
|
|
616
|
-
{
|
|
617
|
-
title: "What can you do?",
|
|
618
|
-
message: "What can you help me with?"
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
title: "Summarize this channel",
|
|
622
|
-
message: "Summarize the recent activity in this channel."
|
|
623
|
-
},
|
|
624
|
-
{
|
|
625
|
-
title: "Draft a reply",
|
|
626
|
-
message: "Help me draft a reply."
|
|
627
|
-
}
|
|
628
|
-
];
|
|
629
804
|
function normalizeAssistantThread(event, getPrevious) {
|
|
630
805
|
const thread = event.assistant_thread;
|
|
631
806
|
if (!thread) return null;
|
|
@@ -687,11 +862,11 @@ function registerSlackAssistantEvents(params) {
|
|
|
687
862
|
return;
|
|
688
863
|
}
|
|
689
864
|
ctx.saveSlackAssistantThreadContext(assistantThread);
|
|
690
|
-
await ctx.
|
|
865
|
+
await ctx.setSlackSuggestedPrompts({
|
|
691
866
|
channelId: assistantThread.assistantChannelId,
|
|
692
867
|
threadTs: assistantThread.threadTs,
|
|
693
868
|
title: "Try asking",
|
|
694
|
-
prompts:
|
|
869
|
+
prompts: DEFAULT_SLACK_SUGGESTED_PROMPTS
|
|
695
870
|
});
|
|
696
871
|
} catch (err) {
|
|
697
872
|
ctx.runtime.error?.(danger(`slack assistant_thread_started handler failed: ${formatErrorMessage(err)}`));
|
|
@@ -931,7 +1106,16 @@ function registerSlackHomeEvents(params) {
|
|
|
931
1106
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
932
1107
|
trackEvent?.();
|
|
933
1108
|
const payload = event;
|
|
934
|
-
if (!payload.user
|
|
1109
|
+
if (!payload.user) return;
|
|
1110
|
+
if (payload.tab === "messages") {
|
|
1111
|
+
if (!payload.channel) return;
|
|
1112
|
+
if (await ctx.setSlackSuggestedPrompts({
|
|
1113
|
+
channelId: payload.channel,
|
|
1114
|
+
title: "Try asking",
|
|
1115
|
+
prompts: DEFAULT_SLACK_SUGGESTED_PROMPTS
|
|
1116
|
+
})) await ctx.recordSlackAgentView();
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
935
1119
|
await ctx.app.client.views.publish({
|
|
936
1120
|
token: ctx.botToken,
|
|
937
1121
|
user_id: payload.user,
|
|
@@ -2682,7 +2866,7 @@ function isBufferArray(value) {
|
|
|
2682
2866
|
return Array.isArray(value) && value.every((entry) => Buffer.isBuffer(entry));
|
|
2683
2867
|
}
|
|
2684
2868
|
function resolveSlackSocketModeConnectionCount(message) {
|
|
2685
|
-
const buffer = Buffer.isBuffer(message) ? message : message instanceof ArrayBuffer ? Buffer.from(message) : isBufferArray(message) ? Buffer.concat(message) : void 0;
|
|
2869
|
+
const buffer = typeof message === "string" ? Buffer.from(message) : Buffer.isBuffer(message) ? message : message instanceof ArrayBuffer ? Buffer.from(message) : isBufferArray(message) ? Buffer.concat(message) : void 0;
|
|
2686
2870
|
if (!buffer?.includes(SLACK_SOCKET_HELLO_MARKER)) return;
|
|
2687
2871
|
let payload;
|
|
2688
2872
|
try {
|
|
@@ -2812,13 +2996,37 @@ function resolveSlackIngressLane(body, eventId) {
|
|
|
2812
2996
|
function isSlackEventCallback(body) {
|
|
2813
2997
|
return asOptionalRecord(body)?.type === "event_callback";
|
|
2814
2998
|
}
|
|
2815
|
-
function
|
|
2816
|
-
if (payload.version !== SLACK_INGRESS_PAYLOAD_VERSION) throw new SlackIngressPayloadError(`Slack ingress payload ${eventId} was invalid.`);
|
|
2999
|
+
function decodeSlackIngressPayload(payload, eventId) {
|
|
2817
3000
|
if (payload.kind === "relay") {
|
|
2818
3001
|
if (!asOptionalRecord(payload.message)) throw new SlackIngressPayloadError(`Slack relay ingress payload ${eventId} was invalid.`);
|
|
2819
|
-
return
|
|
3002
|
+
return {
|
|
3003
|
+
version: payload.version,
|
|
3004
|
+
body: payload
|
|
3005
|
+
};
|
|
2820
3006
|
}
|
|
2821
3007
|
if (!asOptionalRecord(payload.body) || resolveSlackEventId(payload.body) !== eventId) throw new SlackIngressPayloadError(`Slack ingress payload ${eventId} was invalid.`);
|
|
3008
|
+
return {
|
|
3009
|
+
version: payload.version,
|
|
3010
|
+
body: payload
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
function inspectSlackIngress(raw) {
|
|
3014
|
+
if (raw.kind === "relay") {
|
|
3015
|
+
const eventId = resolveSlackRelayIngressEventId({
|
|
3016
|
+
deliveryId: raw.deliveryId,
|
|
3017
|
+
message: raw.message
|
|
3018
|
+
});
|
|
3019
|
+
return {
|
|
3020
|
+
eventId,
|
|
3021
|
+
laneKey: resolveSlackIngressLane({ event: raw.message }, eventId)
|
|
3022
|
+
};
|
|
3023
|
+
}
|
|
3024
|
+
const eventId = resolveSlackEventId(raw.body);
|
|
3025
|
+
if (!eventId) throw new SlackIngressPayloadError("Slack Events API envelope missing event_id.");
|
|
3026
|
+
return {
|
|
3027
|
+
eventId,
|
|
3028
|
+
laneKey: resolveSlackIngressLane(raw.body, eventId)
|
|
3029
|
+
};
|
|
2822
3030
|
}
|
|
2823
3031
|
function resolveSlackIngressNonRetryableFailure(error) {
|
|
2824
3032
|
for (const candidate of collectErrorGraphCandidates(error, (current) => [
|
|
@@ -2844,115 +3052,97 @@ function resolveSlackIngressTurnLifecycle(context) {
|
|
|
2844
3052
|
return typeof lifecycle.onAdopted === "function" && lifecycle.abortSignal instanceof AbortSignal ? lifecycle : null;
|
|
2845
3053
|
}
|
|
2846
3054
|
function createSlackDurableIngress(options) {
|
|
2847
|
-
let queue = options.queue;
|
|
2848
|
-
let drain;
|
|
2849
3055
|
let app;
|
|
2850
3056
|
let relayDispatch;
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
deadLetterMinAgeMs: DEFAULT_INGRESS_RETRY_DEAD_LETTER_MIN_AGE_MS
|
|
3057
|
+
const monitor = createChannelIngressMonitor({
|
|
3058
|
+
queue: options.queue ?? (() => getSlackRuntime().state.openChannelIngressQueue({ accountId: options.accountId })),
|
|
3059
|
+
inspect: inspectSlackIngress,
|
|
3060
|
+
payload: {
|
|
3061
|
+
version: SLACK_INGRESS_PAYLOAD_VERSION,
|
|
3062
|
+
serialize: (raw, { receivedAt }) => raw.kind === "relay" ? {
|
|
3063
|
+
kind: "relay",
|
|
3064
|
+
receivedAt,
|
|
3065
|
+
message: raw.message
|
|
3066
|
+
} : {
|
|
3067
|
+
kind: "events-api",
|
|
3068
|
+
receivedAt,
|
|
3069
|
+
body: raw.body,
|
|
3070
|
+
...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
|
|
3071
|
+
...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason }
|
|
2867
3072
|
},
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
3073
|
+
deserialize: (body, { claim }) => body.kind === "relay" ? {
|
|
3074
|
+
kind: "relay",
|
|
3075
|
+
deliveryId: claim.id.startsWith("relay:") ? claim.id.slice(6) : claim.id,
|
|
3076
|
+
message: body.message
|
|
3077
|
+
} : {
|
|
3078
|
+
kind: "events-api",
|
|
3079
|
+
body: body.body,
|
|
3080
|
+
...body.retryNum === void 0 ? {} : { retryNum: body.retryNum },
|
|
3081
|
+
...body.retryReason === void 0 ? {} : { retryReason: body.retryReason }
|
|
3082
|
+
},
|
|
3083
|
+
encode: ({ body }) => ({
|
|
3084
|
+
version: SLACK_INGRESS_PAYLOAD_VERSION,
|
|
3085
|
+
...body
|
|
3086
|
+
}),
|
|
3087
|
+
decode: (payload, { claim }) => decodeSlackIngressPayload(payload, claim.id),
|
|
3088
|
+
createClaimError: (_kind, claim) => new SlackIngressPayloadError(`Slack ingress payload ${claim.id} was invalid.`)
|
|
3089
|
+
},
|
|
3090
|
+
onDurableAdmission: async (raw) => {
|
|
3091
|
+
if (raw.kind === "events-api") await raw.afterDurableAdmission?.();
|
|
3092
|
+
},
|
|
3093
|
+
deliver: async (raw, lifecycle) => {
|
|
3094
|
+
if (raw.kind === "relay") {
|
|
3095
|
+
if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
|
|
3096
|
+
await relayDispatch(raw.message, lifecycle);
|
|
3097
|
+
return;
|
|
2889
3098
|
}
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
3099
|
+
if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
|
|
3100
|
+
await app.processEvent({
|
|
3101
|
+
body: raw.body,
|
|
3102
|
+
ack: async () => {},
|
|
3103
|
+
...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
|
|
3104
|
+
...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
|
|
3105
|
+
customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: lifecycle }
|
|
3106
|
+
});
|
|
3107
|
+
},
|
|
3108
|
+
pollIntervalMs: options.pollIntervalMs ?? SLACK_INGRESS_POLL_INTERVAL_MS,
|
|
3109
|
+
retention: {
|
|
3110
|
+
pruneIntervalMs: SLACK_INGRESS_PRUNE_INTERVAL_MS,
|
|
2897
3111
|
completedTtlMs: SLACK_INGRESS_COMPLETED_TTL_MS,
|
|
2898
3112
|
completedMaxEntries: SLACK_INGRESS_COMPLETED_MAX_ENTRIES,
|
|
2899
3113
|
failedTtlMs: SLACK_INGRESS_FAILED_TTL_MS,
|
|
2900
|
-
failedMaxEntries: SLACK_INGRESS_FAILED_MAX_ENTRIES
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
await activeDrain.waitForIdle();
|
|
2913
|
-
if (!running || !requested && started === 0) break;
|
|
2914
|
-
}
|
|
2915
|
-
} catch (error) {
|
|
2916
|
-
options.onLog?.(`slack ingress drain failed: ${formatErrorMessage(error)}`);
|
|
2917
|
-
} finally {
|
|
2918
|
-
pumping = void 0;
|
|
2919
|
-
if (running && requested) requestDrain();
|
|
2920
|
-
}
|
|
2921
|
-
};
|
|
2922
|
-
const requestDrain = () => {
|
|
2923
|
-
requested = true;
|
|
2924
|
-
if (!running || pumping) return;
|
|
2925
|
-
pumping = runPump();
|
|
2926
|
-
};
|
|
3114
|
+
failedMaxEntries: SLACK_INGRESS_FAILED_MAX_ENTRIES
|
|
3115
|
+
},
|
|
3116
|
+
appendRetryDelaysMs: [0],
|
|
3117
|
+
drain: {
|
|
3118
|
+
resolveNonRetryableFailure: resolveSlackIngressNonRetryableFailure,
|
|
3119
|
+
deriveLaneKey: (record) => record.payload.kind === "relay" ? resolveSlackIngressLane({ event: record.payload.message }, record.id) : resolveSlackIngressLane(record.payload.body, record.id),
|
|
3120
|
+
...options.adoptionStallTimeoutMs === void 0 ? {} : { adoptionStallTimeoutMs: options.adoptionStallTimeoutMs },
|
|
3121
|
+
...options.onLog ? { onLog: options.onLog } : {}
|
|
3122
|
+
},
|
|
3123
|
+
...options.abortSignal ? { abortSignal: options.abortSignal } : {},
|
|
3124
|
+
onError: (error) => options.onLog?.(`slack ingress drain failed: ${formatErrorMessage(error)}`)
|
|
3125
|
+
});
|
|
2927
3126
|
const acceptReceiverEvent = async (event) => {
|
|
2928
3127
|
if (!isSlackEventCallback(event.body)) {
|
|
2929
3128
|
if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
|
|
2930
3129
|
await app.processEvent(event);
|
|
2931
3130
|
return;
|
|
2932
3131
|
}
|
|
2933
|
-
|
|
2934
|
-
if (!eventId) throw new SlackIngressPayloadError("Slack Events API envelope missing event_id.");
|
|
2935
|
-
const receivedAt = Date.now();
|
|
2936
|
-
await getQueue().enqueue(eventId, {
|
|
2937
|
-
version: SLACK_INGRESS_PAYLOAD_VERSION,
|
|
2938
|
-
receivedAt,
|
|
3132
|
+
await monitor.admit({
|
|
2939
3133
|
kind: "events-api",
|
|
2940
3134
|
body: event.body,
|
|
2941
3135
|
...event.retryNum === void 0 ? {} : { retryNum: event.retryNum },
|
|
2942
|
-
...event.retryReason === void 0 ? {} : { retryReason: event.retryReason }
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
requestDrain();
|
|
3136
|
+
...event.retryReason === void 0 ? {} : { retryReason: event.retryReason },
|
|
3137
|
+
afterDurableAdmission: () => event.ack()
|
|
3138
|
+
});
|
|
2946
3139
|
};
|
|
2947
3140
|
const acceptRelayEvent = async (event) => {
|
|
2948
|
-
|
|
2949
|
-
await getQueue().enqueue(resolveSlackRelayIngressEventId(event), {
|
|
2950
|
-
version: SLACK_INGRESS_PAYLOAD_VERSION,
|
|
2951
|
-
receivedAt,
|
|
3141
|
+
await monitor.admit({
|
|
2952
3142
|
kind: "relay",
|
|
3143
|
+
deliveryId: event.deliveryId,
|
|
2953
3144
|
message: event.message
|
|
2954
|
-
}
|
|
2955
|
-
requestDrain();
|
|
3145
|
+
});
|
|
2956
3146
|
};
|
|
2957
3147
|
return {
|
|
2958
3148
|
wrapReceiver: (receiver) => {
|
|
@@ -2971,31 +3161,9 @@ function createSlackDurableIngress(options) {
|
|
|
2971
3161
|
attachRelayDispatch: (dispatch) => {
|
|
2972
3162
|
relayDispatch = dispatch;
|
|
2973
3163
|
},
|
|
2974
|
-
start:
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
pollTimer = setInterval(requestDrain, options.pollIntervalMs ?? SLACK_INGRESS_POLL_INTERVAL_MS);
|
|
2978
|
-
pollTimer.unref?.();
|
|
2979
|
-
requestDrain();
|
|
2980
|
-
},
|
|
2981
|
-
stop: async () => {
|
|
2982
|
-
running = false;
|
|
2983
|
-
if (pollTimer) {
|
|
2984
|
-
clearInterval(pollTimer);
|
|
2985
|
-
pollTimer = void 0;
|
|
2986
|
-
}
|
|
2987
|
-
drain?.dispose();
|
|
2988
|
-
await pumping;
|
|
2989
|
-
await drain?.waitForIdle();
|
|
2990
|
-
},
|
|
2991
|
-
waitForIdle: async () => {
|
|
2992
|
-
for (;;) {
|
|
2993
|
-
const activePump = pumping;
|
|
2994
|
-
if (!activePump) break;
|
|
2995
|
-
await activePump;
|
|
2996
|
-
}
|
|
2997
|
-
await drain?.waitForIdle();
|
|
2998
|
-
}
|
|
3164
|
+
start: monitor.start,
|
|
3165
|
+
stop: monitor.stop,
|
|
3166
|
+
waitForIdle: monitor.waitForIdle
|
|
2999
3167
|
};
|
|
3000
3168
|
}
|
|
3001
3169
|
//#endregion
|
|
@@ -3377,6 +3545,10 @@ function registerSlackMonitorEvents(params) {
|
|
|
3377
3545
|
slashCommandName: params.appHomeSlashCommandName,
|
|
3378
3546
|
trackEvent: params.trackEvent
|
|
3379
3547
|
});
|
|
3548
|
+
registerSlackAgentEvents({
|
|
3549
|
+
ctx: params.ctx,
|
|
3550
|
+
trackEvent: params.trackEvent
|
|
3551
|
+
});
|
|
3380
3552
|
registerSlackInteractionEvents({
|
|
3381
3553
|
ctx: params.ctx,
|
|
3382
3554
|
trackEvent: params.trackEvent
|
|
@@ -3423,22 +3595,11 @@ function createSlackMessageDispatchReplayGuard(params = {}) {
|
|
|
3423
3595
|
}
|
|
3424
3596
|
/** Claim one logical message key; an in-flight sibling claim settles to duplicate. */
|
|
3425
3597
|
async function claimSlackMessageDispatchReplay(params) {
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
handle: claim.handle
|
|
3432
|
-
};
|
|
3433
|
-
if (claim.kind === "duplicate" || claim.kind === "invalid") return { kind: "duplicate" };
|
|
3434
|
-
try {
|
|
3435
|
-
await claim.pending;
|
|
3436
|
-
return { kind: "duplicate" };
|
|
3437
|
-
} catch {
|
|
3438
|
-
releaseRetries += 1;
|
|
3439
|
-
if (releaseRetries > 1) return { kind: "duplicate" };
|
|
3440
|
-
}
|
|
3441
|
-
}
|
|
3598
|
+
const claim = await runClaimableDedupeClaimLoop(() => params.guard.claim({ keys: [params.key] }), (_error, rejectionCount) => rejectionCount <= 1);
|
|
3599
|
+
return claim.kind === "claimed" ? {
|
|
3600
|
+
kind: "claimed",
|
|
3601
|
+
handle: claim.handle
|
|
3602
|
+
} : { kind: "duplicate" };
|
|
3442
3603
|
}
|
|
3443
3604
|
//#endregion
|
|
3444
3605
|
//#region extensions/slack/src/monitor/message-handler/debounce-key.ts
|
|
@@ -3566,7 +3727,7 @@ function createSlackThreadTsResolver(params) {
|
|
|
3566
3727
|
}
|
|
3567
3728
|
//#endregion
|
|
3568
3729
|
//#region extensions/slack/src/monitor/message-handler.ts
|
|
3569
|
-
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-
|
|
3730
|
+
const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-mFCCSllA.js"));
|
|
3570
3731
|
function createSlackDispatchCompletion() {
|
|
3571
3732
|
let resolve;
|
|
3572
3733
|
let reject;
|
|
@@ -4024,7 +4185,7 @@ function installSlackNativeReconnectFailureObserver(receiver) {
|
|
|
4024
4185
|
resolve(void 0);
|
|
4025
4186
|
return;
|
|
4026
4187
|
}
|
|
4027
|
-
reject(
|
|
4188
|
+
reject(toErrorObject(error, "Non-Error rejection"));
|
|
4028
4189
|
});
|
|
4029
4190
|
}, delayMs);
|
|
4030
4191
|
});
|
|
@@ -4144,13 +4305,12 @@ function createSlackBoltApp(params) {
|
|
|
4144
4305
|
const socketModeReceiverOptions = {
|
|
4145
4306
|
appToken: params.appToken ?? "",
|
|
4146
4307
|
autoReconnectEnabled: true,
|
|
4147
|
-
clientPingTimeout:
|
|
4308
|
+
clientPingTimeout: OPENCLAW_SLACK_CLIENT_PING_TIMEOUT_MS,
|
|
4148
4309
|
logger: socketModeLogger,
|
|
4310
|
+
...params.dispatcher ? { dispatcher: params.dispatcher } : {},
|
|
4149
4311
|
installerOptions: { clientOptions: params.clientOptions },
|
|
4150
4312
|
...params.wrapReceiver ? { processEventErrorHandler: async () => false } : {}
|
|
4151
4313
|
};
|
|
4152
|
-
if (params.socketMode?.serverPingTimeout !== void 0) socketModeReceiverOptions.serverPingTimeout = params.socketMode.serverPingTimeout;
|
|
4153
|
-
if (params.socketMode?.pingPongLoggingEnabled !== void 0) socketModeReceiverOptions.pingPongLoggingEnabled = params.socketMode.pingPongLoggingEnabled;
|
|
4154
4314
|
let receiver;
|
|
4155
4315
|
if (params.slackMode === "socket") {
|
|
4156
4316
|
receiver = new params.interop.SocketModeReceiver(socketModeReceiverOptions);
|
|
@@ -4215,7 +4375,7 @@ async function startSlackSocketAndWaitForDisconnect(params) {
|
|
|
4215
4375
|
await Promise.resolve();
|
|
4216
4376
|
const disconnect = disconnectWaiter.getLatest();
|
|
4217
4377
|
disconnectWaiter.cancel();
|
|
4218
|
-
if (isMissingSocketStartErrorDetail(err) && disconnect?.error !== void 0) throw
|
|
4378
|
+
if (isMissingSocketStartErrorDetail(err) && disconnect?.error !== void 0) throw toErrorObject(disconnect.error, "Non-Error thrown");
|
|
4219
4379
|
if (isMissingSocketStartErrorDetail(err)) {
|
|
4220
4380
|
const suffix = disconnect ? ` after ${disconnect.event}` : "";
|
|
4221
4381
|
throw new Error(`Slack Socket Mode start failed${suffix} without error detail`, { cause: err });
|
|
@@ -4265,13 +4425,6 @@ function formatSlackUserResolved(entry) {
|
|
|
4265
4425
|
extra: entry.note ? [entry.note] : []
|
|
4266
4426
|
});
|
|
4267
4427
|
}
|
|
4268
|
-
function toLintErrorObject(value, fallbackMessage) {
|
|
4269
|
-
if (value instanceof Error) return value;
|
|
4270
|
-
if (typeof value === "string") return new Error(value);
|
|
4271
|
-
const error = new Error(fallbackMessage, { cause: value });
|
|
4272
|
-
if (typeof value === "object" && value !== null || typeof value === "function") Object.assign(error, value);
|
|
4273
|
-
return error;
|
|
4274
|
-
}
|
|
4275
4428
|
//#endregion
|
|
4276
4429
|
//#region extensions/slack/src/monitor/dm-auth.ts
|
|
4277
4430
|
async function authorizeSlackDirectMessage(params) {
|
|
@@ -4387,14 +4540,14 @@ function createSlackResponseUrlBudget(respond, maxCalls = SLACK_RESPONSE_URL_MAX
|
|
|
4387
4540
|
//#endregion
|
|
4388
4541
|
//#region extensions/slack/src/monitor/room-context.ts
|
|
4389
4542
|
function resolveSlackRoomContextHints(params) {
|
|
4390
|
-
const
|
|
4543
|
+
const channelMetadata = params.isRoomish ? buildChannelMetadata({
|
|
4391
4544
|
source: "slack",
|
|
4392
4545
|
label: "Slack channel description",
|
|
4393
4546
|
entries: [params.channelInfo?.topic, params.channelInfo?.purpose]
|
|
4394
4547
|
}) : void 0;
|
|
4395
4548
|
const systemPromptParts = [params.isRoomish ? normalizeOptionalString(params.channelConfig?.systemPrompt) ?? null : null].filter((entry) => Boolean(entry));
|
|
4396
4549
|
return {
|
|
4397
|
-
|
|
4550
|
+
channelMetadata,
|
|
4398
4551
|
groupSystemPrompt: systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : void 0
|
|
4399
4552
|
};
|
|
4400
4553
|
}
|
|
@@ -4415,7 +4568,7 @@ const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
|
|
|
4415
4568
|
const SLACK_HEADER_TEXT_MAX = 150;
|
|
4416
4569
|
const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
|
|
4417
4570
|
const loadSlashCommandsRuntime = createLazyRuntimeModule(() => import("./slash-commands.runtime-BTTMlmwy.js"));
|
|
4418
|
-
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-
|
|
4571
|
+
const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-BRQbvn2e.js"));
|
|
4419
4572
|
const loadSlackPluginCommandsRuntime = createLazyRuntimeModule(() => import("./slash-plugin-commands.runtime-Dosfcx3X.js"));
|
|
4420
4573
|
const loadSlashSkillCommandsRuntime = createLazyRuntimeModule(() => import("./slash-skill-commands.runtime-CD1J2ODY.js"));
|
|
4421
4574
|
function resolveSlackCommandMenuModelContext(params) {
|
|
@@ -4808,8 +4961,12 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4808
4961
|
agentId: menuRoute.agentId,
|
|
4809
4962
|
sessionKey: menuRoute.sessionKey
|
|
4810
4963
|
}) : {};
|
|
4811
|
-
const menuModelCatalog = commandDefinition.key === "think" && menuNeedsModelContext ? await
|
|
4964
|
+
const menuModelCatalog = commandDefinition.key === "think" && menuNeedsModelContext ? await loadPreparedModelCatalog({
|
|
4812
4965
|
config: cfg,
|
|
4966
|
+
...menuRoute ? {
|
|
4967
|
+
agentId: menuRoute.agentId,
|
|
4968
|
+
agentDir: resolveAgentDir(cfg, menuRoute.agentId)
|
|
4969
|
+
} : {},
|
|
4813
4970
|
readOnly: true
|
|
4814
4971
|
}) : void 0;
|
|
4815
4972
|
const menu = resolveCommandArgMenu({
|
|
@@ -4846,7 +5003,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4846
5003
|
}
|
|
4847
5004
|
const channelName = channelInfo?.name;
|
|
4848
5005
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
4849
|
-
const { deliverSlackSlashReplies,
|
|
5006
|
+
const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode } = await loadSlashDispatchRuntime();
|
|
4850
5007
|
const route = resolvedSlashRoute ?? resolveAgentRoute({
|
|
4851
5008
|
cfg,
|
|
4852
5009
|
channel: "slack",
|
|
@@ -4857,7 +5014,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4857
5014
|
id: isDirectMessage ? command.user_id : command.channel_id
|
|
4858
5015
|
}
|
|
4859
5016
|
});
|
|
4860
|
-
const {
|
|
5017
|
+
const { channelMetadata, groupSystemPrompt } = resolveSlackRoomContextHints({
|
|
4861
5018
|
isRoomish,
|
|
4862
5019
|
channelInfo,
|
|
4863
5020
|
channelConfig
|
|
@@ -4867,7 +5024,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4867
5024
|
sessionPrefix: slashCommand.sessionPrefix,
|
|
4868
5025
|
userId: command.user_id,
|
|
4869
5026
|
targetSessionKey: route.sessionKey,
|
|
4870
|
-
|
|
5027
|
+
sessionKeyCase: "lowercase"
|
|
4871
5028
|
});
|
|
4872
5029
|
const slashReplyTarget = !slashCommand.ephemeral && isRoomish ? `channel:${command.channel_id}` : `user:${command.user_id}`;
|
|
4873
5030
|
const ctxPayload = finalizeInboundContext({
|
|
@@ -4888,7 +5045,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4888
5045
|
GroupSubject: isRoomish ? roomLabel : void 0,
|
|
4889
5046
|
GroupSpace: ctx.teamId || void 0,
|
|
4890
5047
|
GroupSystemPrompt: groupSystemPrompt,
|
|
4891
|
-
|
|
5048
|
+
ChannelPromptContext: channelMetadata ? [channelMetadata] : void 0,
|
|
4892
5049
|
SenderName: senderName,
|
|
4893
5050
|
SenderId: command.user_id,
|
|
4894
5051
|
Provider: "slack",
|
|
@@ -4904,28 +5061,8 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4904
5061
|
OriginatingChannel: "slack",
|
|
4905
5062
|
OriginatingTo: slashReplyTarget
|
|
4906
5063
|
});
|
|
4907
|
-
await recordInboundSessionMetaSafe({
|
|
4908
|
-
cfg,
|
|
4909
|
-
agentId: route.agentId,
|
|
4910
|
-
sessionKey: ctxPayload.SessionKey ?? route.sessionKey,
|
|
4911
|
-
ctx: ctxPayload,
|
|
4912
|
-
onError: (err) => runtime.error?.(danger(`slack slash: failed updating session meta: ${formatErrorMessage(err)}`))
|
|
4913
|
-
});
|
|
4914
|
-
const { onModelSelected, ...replyPipeline } = createChannelMessageReplyPipeline({
|
|
4915
|
-
cfg,
|
|
4916
|
-
agentId: route.agentId,
|
|
4917
|
-
channel: "slack",
|
|
4918
|
-
accountId: route.accountId,
|
|
4919
|
-
transformReplyPayload: (payload) => {
|
|
4920
|
-
if (payload.isReasoning === true) return null;
|
|
4921
|
-
return isSlackInteractiveRepliesEnabled({
|
|
4922
|
-
cfg,
|
|
4923
|
-
accountId: route.accountId
|
|
4924
|
-
}) ? compileSlackInteractiveReplies(payload) : payload;
|
|
4925
|
-
}
|
|
4926
|
-
});
|
|
4927
5064
|
const messageSentHookTarget = ctxPayload.OriginatingTo ?? ctxPayload.To ?? slashReplyTarget;
|
|
4928
|
-
const deliverSlashPayloads = async (replies) => {
|
|
5065
|
+
const deliverSlashPayloads = async (replies, onReplySettled) => {
|
|
4929
5066
|
await deliverSlackSlashReplies({
|
|
4930
5067
|
replies,
|
|
4931
5068
|
respond,
|
|
@@ -4942,29 +5079,74 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
4942
5079
|
channel: "slack",
|
|
4943
5080
|
accountId: route.accountId
|
|
4944
5081
|
}),
|
|
4945
|
-
responseBudget
|
|
5082
|
+
responseBudget,
|
|
5083
|
+
onReplySettled
|
|
4946
5084
|
});
|
|
4947
5085
|
};
|
|
4948
5086
|
const pendingSlashReplies = [];
|
|
4949
|
-
const
|
|
4950
|
-
|
|
5087
|
+
const shouldDeliverBlockImmediately = commandDefinition?.key === "login";
|
|
5088
|
+
await dispatchChannelInboundTurn({
|
|
4951
5089
|
cfg,
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
5090
|
+
channel: "slack",
|
|
5091
|
+
accountId: route.accountId,
|
|
5092
|
+
route: {
|
|
5093
|
+
agentId: route.agentId,
|
|
5094
|
+
sessionKey: ctxPayload.SessionKey ?? route.sessionKey
|
|
5095
|
+
},
|
|
5096
|
+
ctxPayload,
|
|
5097
|
+
replyPipeline: { transformReplyPayload: (payload) => {
|
|
5098
|
+
if (payload.isReasoning === true) return null;
|
|
5099
|
+
return payload;
|
|
5100
|
+
} },
|
|
5101
|
+
dispatcherOptions: { onSettled: async () => {
|
|
5102
|
+
if (pendingSlashReplies.length === 0) return;
|
|
5103
|
+
const pending = pendingSlashReplies.splice(0);
|
|
5104
|
+
const settled = /* @__PURE__ */ new Set();
|
|
5105
|
+
try {
|
|
5106
|
+
await deliverSlashPayloads(pending.map((entry) => entry.payload), ({ replyIndex, visibleReplySent, error }) => {
|
|
5107
|
+
const entry = pending[replyIndex];
|
|
5108
|
+
if (!entry || settled.has(replyIndex)) return;
|
|
5109
|
+
settled.add(replyIndex);
|
|
5110
|
+
if (error !== void 0) {
|
|
5111
|
+
entry.finalization.reject(error);
|
|
5112
|
+
return;
|
|
5113
|
+
}
|
|
5114
|
+
entry.finalization.resolve({ visibleReplySent });
|
|
5115
|
+
});
|
|
5116
|
+
} catch (error) {
|
|
5117
|
+
const unsettledError = isChannelPartialDeliveryError(error) ? error.cause ?? error : error;
|
|
5118
|
+
for (const [replyIndex, entry] of pending.entries()) if (!settled.has(replyIndex)) entry.finalization.reject(unsettledError);
|
|
5119
|
+
throw error;
|
|
5120
|
+
}
|
|
5121
|
+
} },
|
|
5122
|
+
delivery: {
|
|
5123
|
+
deliver: async (payload, info) => {
|
|
5124
|
+
if (info.kind === "block" && shouldDeliverBlockImmediately) {
|
|
5125
|
+
let visibleReplySent = false;
|
|
5126
|
+
await deliverSlashPayloads([payload], (settlement) => {
|
|
5127
|
+
visibleReplySent = settlement.visibleReplySent;
|
|
5128
|
+
});
|
|
5129
|
+
return visibleReplySent ? { visibleReplySent: true } : {
|
|
5130
|
+
visibleReplySent: false,
|
|
5131
|
+
suppression: { reason: "no_visible_result" }
|
|
5132
|
+
};
|
|
5133
|
+
}
|
|
5134
|
+
const finalization = createDeferred();
|
|
5135
|
+
pendingSlashReplies.push({
|
|
5136
|
+
payload,
|
|
5137
|
+
finalization
|
|
5138
|
+
});
|
|
5139
|
+
return {
|
|
5140
|
+
visibleReplySent: false,
|
|
5141
|
+
finalization: finalization.promise
|
|
5142
|
+
};
|
|
4956
5143
|
},
|
|
4957
5144
|
onError: (err, info) => {
|
|
4958
5145
|
runtime.error?.(danger(`slack slash ${info.kind} reply failed: ${formatSlackError(err)}`));
|
|
4959
5146
|
}
|
|
4960
5147
|
},
|
|
4961
|
-
replyOptions: {
|
|
4962
|
-
skillFilter: channelConfig?.skills,
|
|
4963
|
-
onModelSelected
|
|
4964
|
-
}
|
|
5148
|
+
replyOptions: { skillFilter: channelConfig?.skills }
|
|
4965
5149
|
});
|
|
4966
|
-
if (pendingSlashReplies.length > 0) await deliverSlashPayloads(pendingSlashReplies);
|
|
4967
|
-
else if (counts.final + counts.tool + counts.block === 0) await deliverSlashPayloads([]);
|
|
4968
5150
|
} catch (err) {
|
|
4969
5151
|
runtime.error?.(danger(`slack slash handler failed: ${formatErrorMessage(err)}`));
|
|
4970
5152
|
if (!isSlackResponseAlreadyReportedError(err) && responseBudget.remaining() !== 0) await respond({
|
|
@@ -5087,7 +5269,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
5087
5269
|
return;
|
|
5088
5270
|
}
|
|
5089
5271
|
const respondFn = respond ?? (async (message) => {
|
|
5090
|
-
if (!body.channel?.id || !body.user?.id) return;
|
|
5272
|
+
if (!body.channel?.id || !body.user?.id) return new Response(null, { status: 204 });
|
|
5091
5273
|
const payload = typeof message === "string" ? { text: message } : message;
|
|
5092
5274
|
await ctx.app.client.chat.postEphemeral({
|
|
5093
5275
|
token: ctx.botToken,
|
|
@@ -5097,6 +5279,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
5097
5279
|
...payload.blocks ? { blocks: payload.blocks } : {},
|
|
5098
5280
|
...typeof payload.mrkdwn === "boolean" ? { mrkdwn: payload.mrkdwn } : {}
|
|
5099
5281
|
});
|
|
5282
|
+
return new Response(null, { status: 200 });
|
|
5100
5283
|
});
|
|
5101
5284
|
const parsed = parseSlackCommandArgValue(action?.value ?? action?.selected_option?.value);
|
|
5102
5285
|
if (!parsed) {
|
|
@@ -5155,7 +5338,7 @@ async function getSlackBoltInterop() {
|
|
|
5155
5338
|
}
|
|
5156
5339
|
return slackBoltInterop;
|
|
5157
5340
|
}
|
|
5158
|
-
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-
|
|
5341
|
+
const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-D0mb_JBk.js"));
|
|
5159
5342
|
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
5160
5343
|
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
5161
5344
|
function resolveStableSlackUserIdEntry(raw) {
|
|
@@ -5301,7 +5484,7 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
5301
5484
|
log: (message) => runtime.log?.(warn(message))
|
|
5302
5485
|
});
|
|
5303
5486
|
const resolveToken = account.userToken || botToken;
|
|
5304
|
-
const useAccessGroups =
|
|
5487
|
+
const useAccessGroups = true;
|
|
5305
5488
|
const reactionMode = slackCfg.reactionNotifications ?? "own";
|
|
5306
5489
|
const reactionAllowlist = slackCfg.reactionAllowlist ?? [];
|
|
5307
5490
|
const replyToMode = slackCfg.replyToMode ?? "off";
|
|
@@ -5313,8 +5496,8 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
5313
5496
|
const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions";
|
|
5314
5497
|
const typingReaction = slackCfg.typingReaction?.trim() ?? "";
|
|
5315
5498
|
const mediaMaxBytes = (opts.mediaMaxMb ?? slackCfg.mediaMaxMb ?? 20) * 1024 * 1024;
|
|
5316
|
-
const
|
|
5317
|
-
const clientOptions = resolveSlackWebClientOptions();
|
|
5499
|
+
const slackDispatcher = resolveSlackProxyDispatcher();
|
|
5500
|
+
const clientOptions = resolveSlackWebClientOptions({}, slackDispatcher);
|
|
5318
5501
|
const durableIngress = createSlackDurableIngress({
|
|
5319
5502
|
accountId: account.accountId,
|
|
5320
5503
|
...runtime.log ? { onLog: runtime.log } : {},
|
|
@@ -5328,7 +5511,7 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
5328
5511
|
signingSecret: slackMode === "http" ? signingSecret ?? void 0 : void 0,
|
|
5329
5512
|
slackWebhookPath,
|
|
5330
5513
|
clientOptions,
|
|
5331
|
-
|
|
5514
|
+
dispatcher: slackDispatcher,
|
|
5332
5515
|
wrapReceiver: durableIngress.wrapReceiver
|
|
5333
5516
|
});
|
|
5334
5517
|
const gracefulStop = async () => {
|
|
@@ -5435,8 +5618,7 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
5435
5618
|
textLimit,
|
|
5436
5619
|
ackReactionScope,
|
|
5437
5620
|
typingReaction,
|
|
5438
|
-
mediaMaxBytes
|
|
5439
|
-
removeAckAfterReply
|
|
5621
|
+
mediaMaxBytes
|
|
5440
5622
|
});
|
|
5441
5623
|
const trackEvent = opts.setStatus ? () => {
|
|
5442
5624
|
opts.setStatus({
|
|
@@ -5685,6 +5867,7 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
5685
5867
|
unregisterHttpHandler?.();
|
|
5686
5868
|
await durableIngress.stop();
|
|
5687
5869
|
await gracefulStop();
|
|
5870
|
+
await slackDispatcher?.close();
|
|
5688
5871
|
}
|
|
5689
5872
|
}
|
|
5690
5873
|
const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy$1;
|