@openclaw/slack 2026.7.2-beta.4 → 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/{action-runtime-CFU52n4W.js → action-runtime-BO3HK_50.js} +5 -5
- package/dist/action-runtime.runtime-DbEcqEXC.js +2 -0
- package/dist/{actions-D51foiwR.js → actions-BkOaiDSX.js} +4 -4
- package/dist/{actions.runtime-BMJwtf5C.js → actions.runtime-Do-iOL51.js} +1 -1
- package/dist/api.js +12 -13
- package/dist/{approval-handler.runtime-3b4-wxMl.js → approval-handler.runtime-BAnGN7w0.js} +2 -2
- package/dist/{channel-Ds8NKvfr.js → channel-Cnrlie9S.js} +20 -32
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DXkUajFP.js → channel-type-CPDX8EV-.js} +3 -3
- package/dist/{channel.setup-DOSTEDfA.js → channel.setup-DyZdLwUB.js} +4 -24
- package/dist/{setup-core-tPxMuFez.js → config-adapter-Bb8hn2tM.js} +38 -67
- package/dist/{config-schema-B4j4tCOI.js → config-schema-BajbuJGL.js} +0 -6
- package/dist/{directory-config-B08pm5ZT.js → directory-config-CeixfVuC.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-DpPKzPrn.js → directory-live-CUwGPX2d.js} +2 -2
- package/dist/doctor-contract-CsGH1Dfc.js +158 -0
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-CdnQzQBI.js → group-policy-CthIXE2T.js} +27 -13
- package/dist/{message-tool-api-ByVyIVOh.js → message-tool-api-CvKoWYYQ.js} +0 -5
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-CnB_WKvF.js → monitor-Cb5ZsOTY.js} +4 -4
- package/dist/{outbound-adapter-DuPz2HHt.js → outbound-adapter-sGrozuRg.js} +11 -68
- package/dist/{pipeline.runtime-5rRYZuX5.js → pipeline.runtime-mFCCSllA.js} +2094 -1953
- package/dist/{policy-C31RYSuT.js → policy-DVg6FyMP.js} +1 -1
- package/dist/{probe-CVRuArHA.js → probe-BhQTDVBQ.js} +50 -57
- package/dist/{provider-htuIJGFD.js → provider-PSppCU_K.js} +83 -65
- package/dist/{relay-source-Df9EaiTF.js → relay-source-D0mb_JBk.js} +1 -1
- package/dist/{replies-Cgr2Gli4.js → replies-BkPPM2Ri.js} +50 -13
- package/dist/{resolve-channels-DodP2TFx.js → resolve-channels-B3RlJKyV.js} +2 -2
- package/dist/{resolve-users-M9eF8891.js → resolve-users-DTm7PEMa.js} +2 -2
- package/dist/{rolldown-runtime-D7D4PA-g.js → rolldown-runtime-8H4AJuhK.js} +1 -0
- package/dist/{runtime-api-D5XYMMsf.js → runtime-api-jpn3vQ7e.js} +2 -2
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-CJRpHkDC.js → scopes-B2SqZ--4.js} +1 -1
- package/dist/{security-audit-Cz6erklv.js → security-audit-DR097212.js} +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/{send-BZ1tPv7-.js → send-2IoDXPeB.js} +7 -21
- package/dist/{send.runtime-a2pilFor.js → send.runtime-BKd_PAEw.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-wV-S1dE_.js → setup-surface-Dyam58nO.js} +8 -16
- package/dist/{shared-BfMskaMx.js → shared-g55DV75U.js} +14 -36
- package/dist/{slash-dispatch.runtime-lfeIsXTX.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/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/{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/openclaw.plugin.json +8 -38
- package/package.json +11 -8
- package/dist/action-runtime.runtime-9-17zvKH.js +0 -2
- package/dist/doctor-contract-U6oVntbM.js +0 -173
- package/dist/interactive-replies-C3ffk6oN.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/agent-base/README.md +0 -145
- package/node_modules/agent-base/dist/src/index.d.ts +0 -78
- package/node_modules/agent-base/dist/src/index.js +0 -203
- package/node_modules/agent-base/dist/src/index.js.map +0 -1
- package/node_modules/agent-base/dist/src/promisify.d.ts +0 -4
- package/node_modules/agent-base/dist/src/promisify.js +0 -18
- package/node_modules/agent-base/dist/src/promisify.js.map +0 -1
- package/node_modules/agent-base/package.json +0 -64
- package/node_modules/agent-base/src/index.ts +0 -345
- package/node_modules/agent-base/src/promisify.ts +0 -33
- 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 -1872
- package/node_modules/axios/LICENSE +0 -7
- package/node_modules/axios/MIGRATION_GUIDE.md +0 -877
- package/node_modules/axios/README.md +0 -2559
- package/node_modules/axios/dist/axios.js +0 -5249
- 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 -5146
- package/node_modules/axios/dist/esm/axios.js +0 -5167
- 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 -5996
- package/node_modules/axios/index.d.cts +0 -738
- package/node_modules/axios/index.d.ts +0 -755
- 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 -643
- package/node_modules/axios/lib/adapters/http.js +0 -1417
- package/node_modules/axios/lib/adapters/xhr.js +0 -228
- 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 -283
- package/node_modules/axios/lib/core/AxiosError.js +0 -188
- package/node_modules/axios/lib/core/AxiosHeaders.js +0 -351
- 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 -50
- package/node_modules/axios/lib/core/dispatchRequest.js +0 -89
- package/node_modules/axios/lib/core/mergeConfig.js +0 -159
- 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 -10
- 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 -59
- package/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
- 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 -69
- 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 -57
- package/node_modules/axios/lib/helpers/cookies.js +0 -64
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -105
- package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -119
- package/node_modules/axios/lib/helpers/formDataToStream.js +0 -119
- package/node_modules/axios/lib/helpers/fromDataURI.js +0 -68
- 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 -54
- package/node_modules/axios/lib/helpers/readBlob.js +0 -15
- package/node_modules/axios/lib/helpers/resolveConfig.js +0 -119
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +0 -60
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -210
- 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 -285
- 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 -1017
- package/node_modules/axios/package.json +0 -201
- 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/https-proxy-agent/README.md +0 -137
- package/node_modules/https-proxy-agent/dist/agent.d.ts +0 -30
- package/node_modules/https-proxy-agent/dist/agent.js +0 -177
- package/node_modules/https-proxy-agent/dist/agent.js.map +0 -1
- package/node_modules/https-proxy-agent/dist/index.d.ts +0 -23
- package/node_modules/https-proxy-agent/dist/index.js +0 -14
- package/node_modules/https-proxy-agent/dist/index.js.map +0 -1
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -7
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -66
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
- package/node_modules/https-proxy-agent/package.json +0 -56
- 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 -1467
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slack/oauth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Official library for interacting with Slack's Oauth endpoints",
|
|
5
5
|
"author": "Slack Technologies, LLC",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dist/**/*"
|
|
17
17
|
],
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
20
|
-
"npm": ">=
|
|
19
|
+
"node": ">=20",
|
|
20
|
+
"npm": ">=9.6.4"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -35,16 +35,15 @@
|
|
|
35
35
|
"build:clean": "shx rm -rf ./dist",
|
|
36
36
|
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
|
|
37
37
|
"prepack": "npm run build",
|
|
38
|
-
"test": "npm run test
|
|
39
|
-
"test:
|
|
40
|
-
"test:unit": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts",
|
|
38
|
+
"test": "npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts'",
|
|
39
|
+
"test:coverage": "npm run build && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/**/*.test.ts",
|
|
41
40
|
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm run build"
|
|
42
41
|
},
|
|
43
42
|
"dependencies": {
|
|
44
|
-
"@slack/logger": "^
|
|
45
|
-
"@slack/web-api": "^
|
|
43
|
+
"@slack/logger": "^5.0.0",
|
|
44
|
+
"@slack/web-api": "^8.0.0",
|
|
46
45
|
"@types/jsonwebtoken": "^9",
|
|
47
|
-
"@types/node": ">=
|
|
46
|
+
"@types/node": ">=20",
|
|
48
47
|
"jsonwebtoken": "^9"
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
@@ -6,7 +6,7 @@ This package is designed to support [**Socket Mode**][socket-mode], which allows
|
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
|
-
This package supports Node
|
|
9
|
+
This package supports Node v20 and higher. It's highly recommended to use [the latest LTS version of
|
|
10
10
|
node](https://github.com/nodejs/Release#release-schedule), and the documentation is written using syntax and features from that version.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slack/socket-mode",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Official library for using the Slack Platform's Socket Mode API",
|
|
5
5
|
"author": "Slack Technologies, LLC",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dist/**/*"
|
|
25
25
|
],
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
28
|
-
"npm": ">=
|
|
27
|
+
"node": ">=20",
|
|
28
|
+
"npm": ">=9.6.4"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -44,24 +44,32 @@
|
|
|
44
44
|
"docs": "npx typedoc --plugin typedoc-plugin-markdown",
|
|
45
45
|
"prepack": "npm run build",
|
|
46
46
|
"test": "npm run test:unit && npm run test:integration",
|
|
47
|
-
"test:
|
|
48
|
-
"test:integration": "npm run build && node --import tsx --test test/
|
|
49
|
-
"test:
|
|
47
|
+
"test:coverage": "npm run build && bash -c 'node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts test/integrations/*.test.js'",
|
|
48
|
+
"test:integration": "npm run build && bash -c 'node --import tsx --test test/integrations/*.test.js'",
|
|
49
|
+
"test:types": "tsd",
|
|
50
|
+
"test:unit": "npm run build && bash -c 'node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=test-results.xml --import tsx --test src/*.test.ts'",
|
|
50
51
|
"watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm test"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@slack/logger": "^
|
|
54
|
-
"@slack/web-api": "^
|
|
55
|
-
"@types/node": ">=
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
"@slack/logger": "^5.0.0",
|
|
55
|
+
"@slack/web-api": "^8.0.0",
|
|
56
|
+
"@types/node": ">=20",
|
|
57
|
+
"eventemitter3": "^5"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"undici": "^7.0.0"
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@types/proxyquire": "^1.3.31",
|
|
62
64
|
"@types/sinon": "^21",
|
|
63
65
|
"nodemon": "^3.1.0",
|
|
64
66
|
"proxyquire": "^2.1.3",
|
|
65
|
-
"sinon": "^21"
|
|
67
|
+
"sinon": "^21",
|
|
68
|
+
"tsd": "^0.33.0",
|
|
69
|
+
"undici": "^7.25.0",
|
|
70
|
+
"ws": "^8"
|
|
71
|
+
},
|
|
72
|
+
"tsd": {
|
|
73
|
+
"directory": "test/types"
|
|
66
74
|
}
|
|
67
75
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Agent } from 'node:http';
|
|
2
1
|
import type { EventEmitter } from 'eventemitter3';
|
|
3
2
|
import { type Logger, LogLevel } from './logger';
|
|
3
|
+
import type { SocketModeDispatcher } from './SocketModeOptions';
|
|
4
4
|
export declare const WS_READY_STATES: string[];
|
|
5
5
|
export interface SlackWebSocketOptions {
|
|
6
6
|
/** @description The Slack WebSocket URL to connect to. */
|
|
@@ -13,8 +13,8 @@ export interface SlackWebSocketOptions {
|
|
|
13
13
|
logger?: Logger;
|
|
14
14
|
/** @description Delay between this client sending a `ping` message, in milliseconds. */
|
|
15
15
|
pingInterval?: number;
|
|
16
|
-
/** @description
|
|
17
|
-
|
|
16
|
+
/** @description An undici Dispatcher used to establish the WebSocket connection (e.g. ProxyAgent). */
|
|
17
|
+
dispatcher?: SocketModeDispatcher;
|
|
18
18
|
/** @description Whether this WebSocket should DEBUG log ping and pong events. `false` by default. */
|
|
19
19
|
pingPongLoggingEnabled?: boolean;
|
|
20
20
|
/**
|
|
@@ -23,7 +23,7 @@ export interface SlackWebSocketOptions {
|
|
|
23
23
|
*/
|
|
24
24
|
serverPingTimeoutMS: number;
|
|
25
25
|
/**
|
|
26
|
-
* @description How many milliseconds to wait
|
|
26
|
+
* @description How many milliseconds to wait for a pong response after sending a ping before deeming the connection
|
|
27
27
|
* stale. Defaults to 5,000.
|
|
28
28
|
*/
|
|
29
29
|
clientPingTimeoutMS: number;
|
|
@@ -54,7 +54,15 @@ export declare class SlackWebSocket {
|
|
|
54
54
|
* Reference to the timeout timer we use to listen to pongs from the server
|
|
55
55
|
*/
|
|
56
56
|
private clientPingTimeout;
|
|
57
|
-
|
|
57
|
+
private openHandler;
|
|
58
|
+
private errorHandler;
|
|
59
|
+
private messageHandler;
|
|
60
|
+
private closeHandler;
|
|
61
|
+
private pingHandler;
|
|
62
|
+
private pongHandler;
|
|
63
|
+
private static pingChannel;
|
|
64
|
+
private static pongChannel;
|
|
65
|
+
constructor({ url, client, dispatcher, logger, logLevel, pingInterval, pingPongLoggingEnabled, serverPingTimeoutMS, clientPingTimeoutMS, }: SlackWebSocketOptions);
|
|
58
66
|
/**
|
|
59
67
|
* Establishes a connection with the Slack backend
|
|
60
68
|
*/
|
|
@@ -66,16 +74,14 @@ export declare class SlackWebSocket {
|
|
|
66
74
|
/**
|
|
67
75
|
* Clean up any underlying intervals, timeouts and the WebSocket.
|
|
68
76
|
*/
|
|
69
|
-
private
|
|
77
|
+
private cleanup;
|
|
70
78
|
/**
|
|
71
79
|
* Returns true if the underlying WebSocket connection is active, meaning the underlying
|
|
72
|
-
* {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants WebSocket ready state is "OPEN"}.
|
|
73
80
|
*/
|
|
74
81
|
isActive(): boolean;
|
|
75
82
|
/**
|
|
76
83
|
* Retrieve the underlying WebSocket readyState. Returns `undefined` if the WebSocket has not been instantiated,
|
|
77
84
|
* otherwise will return a number between 0 and 3 inclusive representing the ready states.
|
|
78
|
-
* The ready state constants are documented in the {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants `ws` API docs }
|
|
79
85
|
*/
|
|
80
86
|
get readyState(): number | undefined;
|
|
81
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackWebSocket.d.ts","sourceRoot":"","sources":["../../src/SlackWebSocket.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlackWebSocket.d.ts","sourceRoot":"","sources":["../../src/SlackWebSocket.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAY,EAAE,KAAK,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,eAAO,MAAM,eAAe,UAA8C,CAAC;AAoB3E,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,8FAA8F;IAC9F,MAAM,EAAE,YAAY,CAAC;IACrB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sGAAsG;IACtG,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,qGAAqG;IACrG,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,cAAc;IAEzB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAoB;IAE7C,OAAO,CAAC,OAAO,CAAwB;IAEvC,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,SAAS,CAAmB;IAEpC;;OAEG;IACH,OAAO,CAAC,yBAAyB,CAAqB;IAEtD;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAAU;IAEpC;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAA6B;IAEtD;;OAEG;IACH,OAAO,CAAC,iBAAiB,CAA6B;IAEtD,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,YAAY,CAAyC;IAC7D,OAAO,CAAC,cAAc,CAAyC;IAC/D,OAAO,CAAC,YAAY,CAAyC;IAE7D,OAAO,CAAC,WAAW,CAA6C;IAChE,OAAO,CAAC,WAAW,CAA6C;IAEhE,OAAO,CAAC,MAAM,CAAC,WAAW,CAAoC;IAC9D,OAAO,CAAC,MAAM,CAAC,WAAW,CAAoC;gBAE3C,EACjB,GAAG,EACH,MAAM,EACN,UAAU,EACV,MAAM,EACN,QAAwB,EACxB,YAAmB,EACnB,sBAA8B,EAC9B,mBAA2B,EAC3B,mBAA0B,GAC3B,EAAE,qBAAqB;IAoBxB;;OAEG;IACI,OAAO,IAAI,IAAI;IAwEtB;;OAEG;IACI,UAAU,IAAI,IAAI;IAwBzB;;OAEG;IACH,OAAO,CAAC,OAAO;IAuBf;;OAEG;IACI,QAAQ,IAAI,OAAO;IAU1B;;;OAGG;IACH,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED;;OAEG;IACI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,SAAS,KAAK,IAAI,GAAG,IAAI;IASrE;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CA4C3B"}
|
|
@@ -34,21 +34,63 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.SlackWebSocket = exports.WS_READY_STATES = void 0;
|
|
37
|
-
const
|
|
37
|
+
const node_diagnostics_channel_1 = require("node:diagnostics_channel");
|
|
38
|
+
const undici_1 = require("undici");
|
|
38
39
|
const errors_1 = require("./errors");
|
|
39
40
|
const logger_1 = __importStar(require("./logger"));
|
|
40
|
-
// Maps ws `readyState` to human readable labels https://github.com/websockets/ws/blob/HEAD/doc/ws.md#ready-state-constants
|
|
41
41
|
exports.WS_READY_STATES = ['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'];
|
|
42
|
+
function isPingPongMessage(message) {
|
|
43
|
+
if (typeof message !== 'object' || message === null) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
if (!('websocket' in message && message.websocket instanceof undici_1.WebSocket)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
if (!('payload' in message && Buffer.isBuffer(message.payload))) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
42
54
|
/**
|
|
43
55
|
* Encapsulates the Slack-specific details around establishing a WebSocket connection with the Slack backend.
|
|
44
56
|
* Manages the ping/pong heartbeat of the connection.
|
|
45
57
|
*/
|
|
46
58
|
class SlackWebSocket {
|
|
47
|
-
|
|
59
|
+
// python equiv: Connection
|
|
60
|
+
static loggerName = 'SlackWebSocket';
|
|
61
|
+
options;
|
|
62
|
+
logger;
|
|
63
|
+
websocket;
|
|
64
|
+
/**
|
|
65
|
+
* The last timetamp that this WebSocket received pong from the server
|
|
66
|
+
*/
|
|
67
|
+
lastPongReceivedTimestamp;
|
|
68
|
+
/**
|
|
69
|
+
* Sentinel checking if Slack sent us a close frame or not, in order to be able
|
|
70
|
+
* to terminate underlying socket gracefully.
|
|
71
|
+
*/
|
|
72
|
+
closeFrameReceived;
|
|
73
|
+
/**
|
|
74
|
+
* Reference to the timeout timer we use to listen to pings from the server
|
|
75
|
+
*/
|
|
76
|
+
serverPingTimeout;
|
|
77
|
+
/**
|
|
78
|
+
* Reference to the timeout timer we use to listen to pongs from the server
|
|
79
|
+
*/
|
|
80
|
+
clientPingTimeout;
|
|
81
|
+
openHandler = null;
|
|
82
|
+
errorHandler = null;
|
|
83
|
+
messageHandler = null;
|
|
84
|
+
closeHandler = null;
|
|
85
|
+
pingHandler = null;
|
|
86
|
+
pongHandler = null;
|
|
87
|
+
static pingChannel = (0, node_diagnostics_channel_1.channel)('undici:websocket:ping');
|
|
88
|
+
static pongChannel = (0, node_diagnostics_channel_1.channel)('undici:websocket:pong');
|
|
89
|
+
constructor({ url, client, dispatcher, logger, logLevel = logger_1.LogLevel.INFO, pingInterval = 5000, pingPongLoggingEnabled = false, serverPingTimeoutMS = 30000, clientPingTimeoutMS = 5000, }) {
|
|
48
90
|
this.options = {
|
|
49
91
|
url,
|
|
50
92
|
client,
|
|
51
|
-
|
|
93
|
+
dispatcher,
|
|
52
94
|
logLevel,
|
|
53
95
|
pingInterval,
|
|
54
96
|
pingPongLoggingEnabled,
|
|
@@ -69,43 +111,69 @@ class SlackWebSocket {
|
|
|
69
111
|
*/
|
|
70
112
|
connect() {
|
|
71
113
|
this.logger.debug('Initiating new WebSocket connection.');
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
agent: this.options.httpAgent,
|
|
75
|
-
};
|
|
76
|
-
this.websocket = new ws_1.WebSocket(this.options.url, options);
|
|
77
|
-
this.websocket.addEventListener('open', (_event) => {
|
|
114
|
+
this.websocket = new undici_1.WebSocket(this.options.url, { dispatcher: this.options.dispatcher });
|
|
115
|
+
this.openHandler = () => {
|
|
78
116
|
this.logger.debug('WebSocket open event received (connection established)!');
|
|
79
117
|
this.monitorPingToSlack();
|
|
80
|
-
}
|
|
81
|
-
this.websocket.addEventListener('
|
|
118
|
+
};
|
|
119
|
+
this.websocket.addEventListener('open', this.openHandler);
|
|
120
|
+
this.errorHandler = (event) => {
|
|
121
|
+
if (!(event instanceof undici_1.ErrorEvent)) {
|
|
122
|
+
this.logger.warn(`Expected ErrorEvent but received ${event.constructor.name} (type: ${event.type})`);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
82
125
|
this.logger.error(`WebSocket error occurred: ${event.message}`);
|
|
83
126
|
this.disconnect();
|
|
84
|
-
this.options.client.emit('error',
|
|
85
|
-
}
|
|
86
|
-
this.websocket.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
127
|
+
this.options.client.emit('error', new errors_1.SMWebsocketError(event.error ?? new Error(event.message)));
|
|
128
|
+
};
|
|
129
|
+
this.websocket.addEventListener('error', this.errorHandler);
|
|
130
|
+
this.messageHandler = (event) => {
|
|
131
|
+
if (!(event instanceof undici_1.MessageEvent)) {
|
|
132
|
+
this.logger.warn(`Expected MessageEvent but received ${event.constructor.name} (type: ${event.type})`);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const isBinary = typeof event.data !== 'string';
|
|
136
|
+
this.options.client.emit('ws_message', event.data, isBinary);
|
|
137
|
+
};
|
|
138
|
+
this.websocket.addEventListener('message', this.messageHandler);
|
|
139
|
+
this.closeHandler = (event) => {
|
|
140
|
+
if (!(event instanceof undici_1.CloseEvent)) {
|
|
141
|
+
this.logger.warn(`Expected CloseEvent but received ${event.constructor.name} (type: ${event.type})`);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
this.logger.debug(`WebSocket close frame received (code: ${event.code}, reason: ${event.reason})`);
|
|
91
145
|
this.closeFrameReceived = true;
|
|
92
146
|
this.disconnect();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
147
|
+
};
|
|
148
|
+
this.websocket.addEventListener('close', this.closeHandler);
|
|
149
|
+
// Subscribe to undici diagnostics_channel for WebSocket ping/pong frame events.
|
|
150
|
+
// These channels fire for ALL undici WebSocket instances, so we filter by matching instance.
|
|
151
|
+
this.pingHandler = (message) => {
|
|
152
|
+
if (!isPingPongMessage(message)) {
|
|
153
|
+
this.logger.warn('Received unexpected ping diagnostics message format');
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (message.websocket !== this.websocket)
|
|
157
|
+
return;
|
|
98
158
|
if (this.options.pingPongLoggingEnabled) {
|
|
99
|
-
this.logger.debug(`WebSocket received ping from Slack server (data: ${
|
|
159
|
+
this.logger.debug(`WebSocket received ping from Slack server (data: ${message.payload?.toString()})`);
|
|
100
160
|
}
|
|
101
161
|
this.monitorPingFromSlack();
|
|
102
|
-
}
|
|
103
|
-
|
|
162
|
+
};
|
|
163
|
+
SlackWebSocket.pingChannel.subscribe(this.pingHandler);
|
|
164
|
+
this.pongHandler = (message) => {
|
|
165
|
+
if (!isPingPongMessage(message)) {
|
|
166
|
+
this.logger.warn('Received unexpected pong diagnostics message format');
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (message.websocket !== this.websocket)
|
|
170
|
+
return;
|
|
104
171
|
if (this.options.pingPongLoggingEnabled) {
|
|
105
|
-
this.logger.debug(`WebSocket received pong from Slack server (data: ${
|
|
172
|
+
this.logger.debug(`WebSocket received pong from Slack server (data: ${message.payload?.toString()})`);
|
|
106
173
|
}
|
|
107
174
|
this.lastPongReceivedTimestamp = Date.now();
|
|
108
|
-
}
|
|
175
|
+
};
|
|
176
|
+
SlackWebSocket.pongChannel.subscribe(this.pongHandler);
|
|
109
177
|
}
|
|
110
178
|
/**
|
|
111
179
|
* Disconnects the WebSocket connection with Slack, if connected.
|
|
@@ -116,13 +184,13 @@ class SlackWebSocket {
|
|
|
116
184
|
// If so, we can terminate the underlying socket connection and let the client know.
|
|
117
185
|
if (this.closeFrameReceived) {
|
|
118
186
|
this.logger.debug('Terminating WebSocket (close frame received).');
|
|
119
|
-
this.
|
|
187
|
+
this.cleanup();
|
|
120
188
|
}
|
|
121
|
-
else if (this.websocket.readyState ===
|
|
189
|
+
else if (this.websocket.readyState === undici_1.WebSocket.CLOSING) {
|
|
122
190
|
// A close frame was already sent but the peer hasn't responded. Force-terminate rather than
|
|
123
191
|
// waiting for the ws library's closeTimeout (~30s) while the ping monitor logs repeated warnings.
|
|
124
192
|
this.logger.debug('Terminating WebSocket (close frame sent but no response, force-terminating).');
|
|
125
|
-
this.
|
|
193
|
+
this.cleanup();
|
|
126
194
|
}
|
|
127
195
|
else {
|
|
128
196
|
// If we haven't received a close frame yet, then we send one to the peer, expecting to receive a close frame
|
|
@@ -133,16 +201,33 @@ class SlackWebSocket {
|
|
|
133
201
|
}
|
|
134
202
|
else {
|
|
135
203
|
this.logger.debug('WebSocket already disconnected, flushing remainder.');
|
|
136
|
-
this.
|
|
204
|
+
this.cleanup();
|
|
137
205
|
}
|
|
138
206
|
}
|
|
139
207
|
/**
|
|
140
208
|
* Clean up any underlying intervals, timeouts and the WebSocket.
|
|
141
209
|
*/
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
210
|
+
cleanup() {
|
|
211
|
+
if (this.websocket) {
|
|
212
|
+
if (this.openHandler)
|
|
213
|
+
this.websocket.removeEventListener('open', this.openHandler);
|
|
214
|
+
if (this.errorHandler)
|
|
215
|
+
this.websocket.removeEventListener('error', this.errorHandler);
|
|
216
|
+
if (this.messageHandler)
|
|
217
|
+
this.websocket.removeEventListener('message', this.messageHandler);
|
|
218
|
+
if (this.closeHandler)
|
|
219
|
+
this.websocket.removeEventListener('close', this.closeHandler);
|
|
220
|
+
}
|
|
221
|
+
this.openHandler = null;
|
|
222
|
+
this.errorHandler = null;
|
|
223
|
+
this.messageHandler = null;
|
|
224
|
+
this.closeHandler = null;
|
|
225
|
+
if (this.pingHandler)
|
|
226
|
+
SlackWebSocket.pingChannel.unsubscribe(this.pingHandler);
|
|
227
|
+
if (this.pongHandler)
|
|
228
|
+
SlackWebSocket.pongChannel.unsubscribe(this.pongHandler);
|
|
229
|
+
this.pingHandler = null;
|
|
230
|
+
this.pongHandler = null;
|
|
146
231
|
this.websocket = null;
|
|
147
232
|
clearTimeout(this.serverPingTimeout);
|
|
148
233
|
clearInterval(this.clientPingTimeout);
|
|
@@ -152,7 +237,6 @@ class SlackWebSocket {
|
|
|
152
237
|
}
|
|
153
238
|
/**
|
|
154
239
|
* Returns true if the underlying WebSocket connection is active, meaning the underlying
|
|
155
|
-
* {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants WebSocket ready state is "OPEN"}.
|
|
156
240
|
*/
|
|
157
241
|
isActive() {
|
|
158
242
|
// python equiv: SocketModeClient.is_connected
|
|
@@ -161,23 +245,26 @@ class SlackWebSocket {
|
|
|
161
245
|
return false;
|
|
162
246
|
}
|
|
163
247
|
this.logger.debug(`isActive(): websocket ready state is ${exports.WS_READY_STATES[this.websocket.readyState]}`);
|
|
164
|
-
return this.websocket.readyState ===
|
|
248
|
+
return this.websocket.readyState === undici_1.WebSocket.OPEN;
|
|
165
249
|
}
|
|
166
250
|
/**
|
|
167
251
|
* Retrieve the underlying WebSocket readyState. Returns `undefined` if the WebSocket has not been instantiated,
|
|
168
252
|
* otherwise will return a number between 0 and 3 inclusive representing the ready states.
|
|
169
|
-
* The ready state constants are documented in the {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants `ws` API docs }
|
|
170
253
|
*/
|
|
171
254
|
get readyState() {
|
|
172
|
-
|
|
173
|
-
return (_a = this.websocket) === null || _a === void 0 ? void 0 : _a.readyState;
|
|
255
|
+
return this.websocket?.readyState;
|
|
174
256
|
}
|
|
175
257
|
/**
|
|
176
258
|
* Sends data via the underlying WebSocket. Accepts an errorback argument.
|
|
177
259
|
*/
|
|
178
260
|
send(data, cb) {
|
|
179
|
-
|
|
180
|
-
|
|
261
|
+
try {
|
|
262
|
+
this.websocket?.send(data);
|
|
263
|
+
cb(undefined);
|
|
264
|
+
}
|
|
265
|
+
catch (err) {
|
|
266
|
+
cb(err);
|
|
267
|
+
}
|
|
181
268
|
}
|
|
182
269
|
/**
|
|
183
270
|
* Confirms WebSocket connection is still active; fires whenever a ping event is received
|
|
@@ -199,11 +286,14 @@ class SlackWebSocket {
|
|
|
199
286
|
let pingAttemptCount = 0;
|
|
200
287
|
clearInterval(this.clientPingTimeout);
|
|
201
288
|
this.clientPingTimeout = setInterval(() => {
|
|
202
|
-
var _a;
|
|
203
289
|
const now = Date.now();
|
|
204
290
|
try {
|
|
205
291
|
const pingMessage = `Ping from client (${now})`;
|
|
206
|
-
(
|
|
292
|
+
if (!this.websocket) {
|
|
293
|
+
this.logger.error('WebSocket not available, skipping ping.');
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
(0, undici_1.ping)(this.websocket, Buffer.from(pingMessage));
|
|
207
297
|
if (this.lastPongReceivedTimestamp === undefined) {
|
|
208
298
|
pingAttemptCount += 1;
|
|
209
299
|
}
|
|
@@ -237,6 +327,4 @@ class SlackWebSocket {
|
|
|
237
327
|
}
|
|
238
328
|
}
|
|
239
329
|
exports.SlackWebSocket = SlackWebSocket;
|
|
240
|
-
// python equiv: Connection
|
|
241
|
-
SlackWebSocket.loggerName = 'SlackWebSocket';
|
|
242
330
|
//# sourceMappingURL=SlackWebSocket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackWebSocket.js","sourceRoot":"","sources":["../../src/SlackWebSocket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"SlackWebSocket.js","sourceRoot":"","sources":["../../src/SlackWebSocket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uEAAmD;AAGnD,mCAAgG;AAEhG,qCAA4C;AAC5C,mDAAsD;AAGzC,QAAA,eAAe,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAO3E,SAAS,iBAAiB,CAAC,OAAgB;IACzC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACpD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,CAAC,WAAW,IAAI,OAAO,IAAI,OAAO,CAAC,SAAS,YAAY,kBAAS,CAAC,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC,CAAC,SAAS,IAAI,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IACD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N,4GAA4G;oBAC5G,gBAAgB,GAAG,CAAC,CAAC;gBACvB,CAAC;gBACD,IAAI,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC;oBACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,WAAW,EAAE,CAAC,CAAC;gBAC1D,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,GAAG,CAAC,CAAC;gBAChE,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClB,OAAO;YACT,CAAC;YACD,4FAA4F;YAC5F,IAAI,SAAS,GAAY,gBAAgB,GAAG,CAAC,CAAC;YAC9C,IAAI,IAAI,CAAC,yBAAyB,KAAK,SAAS,EAAE,CAAC;gBACjD,wEAAwE;gBACxE,4EAA4E;gBAC5E,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,yBAAyB,CAAC;gBACpD,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC;YACxD,CAAC;YACD,IAAI,SAAS,EAAE,CAAC;gBACd,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,gEAAgE,IAAI,CAAC,OAAO,CAAC,mBAAmB,KAAK,CACtG,CAAC;gBACF,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,mBAAmB,GAAG,CAAC,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACzE,CAAC;;AAtSH,wCAuSC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type AppsConnectionsOpenResponse } from '@slack/web-api';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
|
-
import type WebSocket from 'ws';
|
|
4
3
|
import { SlackWebSocket } from './SlackWebSocket';
|
|
5
4
|
import type { SocketModeOptions } from './SocketModeOptions';
|
|
6
5
|
/**
|
|
@@ -27,13 +26,16 @@ export declare class SocketModeClient extends EventEmitter {
|
|
|
27
26
|
*/
|
|
28
27
|
private webClient;
|
|
29
28
|
/**
|
|
30
|
-
* WebClient options we pass to our WebClient instance
|
|
31
|
-
* We also reuse agent and tls for our WebSocket connection
|
|
29
|
+
* WebClient options we pass to our WebClient instance.
|
|
32
30
|
*/
|
|
33
31
|
private webClientOptions;
|
|
34
32
|
/**
|
|
35
|
-
* The
|
|
33
|
+
* The undici Dispatcher used for WebSocket connections. Also wrapped into a custom fetch for HTTP calls
|
|
34
|
+
* unless `clientOptions.fetch` was provided by the user.
|
|
36
35
|
*/
|
|
36
|
+
private dispatcher?;
|
|
37
|
+
/** The most recent response from `apps.connections.open`, used to establish the WebSocket URL. */
|
|
38
|
+
private connectionResponse?;
|
|
37
39
|
websocket?: SlackWebSocket;
|
|
38
40
|
/**
|
|
39
41
|
* Enables ping-pong detailed logging if true
|
|
@@ -57,7 +59,11 @@ export declare class SocketModeClient extends EventEmitter {
|
|
|
57
59
|
* even if `autoReconnectEnabled` is `true`.
|
|
58
60
|
*/
|
|
59
61
|
private shuttingDown;
|
|
60
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Timer handle for scheduling automatic reconnection attempts after a disconnect.
|
|
64
|
+
*/
|
|
65
|
+
private reconnectionTimer;
|
|
66
|
+
constructor({ logger, logLevel, autoReconnectEnabled, pingPongLoggingEnabled, clientPingTimeout, serverPingTimeout, appToken, clientOptions, dispatcher, }?: SocketModeOptions);
|
|
61
67
|
/**
|
|
62
68
|
* Start a Socket Mode session app.
|
|
63
69
|
* This method must be called before any messages can be sent or received,
|
|
@@ -85,7 +91,7 @@ export declare class SocketModeClient extends EventEmitter {
|
|
|
85
91
|
* - raising the State.Connected event (when Slack sends a type:hello message)
|
|
86
92
|
* - disconnecting the underlying socket (when Slack sends a type:disconnect message)
|
|
87
93
|
*/
|
|
88
|
-
protected onWebSocketMessage(data:
|
|
94
|
+
protected onWebSocketMessage(data: string | ArrayBuffer, isBinary: boolean): Promise<void>;
|
|
89
95
|
/**
|
|
90
96
|
* Method for sending an outgoing message of an arbitrary type over the WebSocket connection.
|
|
91
97
|
* Primarily used to send acknowledgements back to slack for incoming events
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SocketModeClient.d.ts","sourceRoot":"","sources":["../../src/SocketModeClient.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SocketModeClient.d.ts","sourceRoot":"","sources":["../../src/SocketModeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,2BAA2B,EAOjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAM7C,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAwB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAanF;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAChD;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAAU;IAEtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAS;IAEvB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU,CAAsB;IAE/C;;OAEG;IACH,OAAO,CAAC,SAAS,CAAY;IAE7B;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAAmB;IAE3C;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAC,CAAuB;IAE1C,kGAAkG;IAClG,OAAO,CAAC,kBAAkB,CAAC,CAA8B;IAElD,SAAS,CAAC,EAAE,cAAc,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAAU;IAExC;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAS;IAEpC;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAAS;IAEpC;;OAEG;IACH,OAAO,CAAC,oCAAoC,CAAK;IAEjD,OAAO,CAAC,oBAAoB,CAAS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