@openclaw/slack 2026.7.2-beta.7 → 2026.7.34

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.
Files changed (1339) hide show
  1. package/README.md +1 -1
  2. package/dist/.setup/account-configured-DzC407uv.mjs +14 -0
  3. package/dist/.setup/account-inspect-CcqRNkC3.mjs +79 -0
  4. package/dist/.setup/account-reply-mode-Bvoq75cS.mjs +15 -0
  5. package/dist/.setup/accounts-uGn8E6uq.mjs +187 -0
  6. package/dist/.setup/accounts.runtime-k_V5-EOr.mjs +2 -0
  7. package/dist/.setup/action-runtime-iq6ZxO_b.mjs +395 -0
  8. package/dist/.setup/action-runtime.runtime-DXY8CdWJ.mjs +2 -0
  9. package/dist/.setup/actions-2VEX4Wdz.mjs +950 -0
  10. package/dist/.setup/actions.runtime-CfX8mK8Y.mjs +2 -0
  11. package/dist/.setup/approval-handler.runtime-COMbf4Ud.mjs +368 -0
  12. package/dist/.setup/channel-BqOekthS.mjs +1120 -0
  13. package/dist/.setup/channel.setup-DBlZCEvc.mjs +73 -0
  14. package/dist/.setup/client-B6i83rHk.mjs +116 -0
  15. package/dist/.setup/config-api-DnT9ohtE.mjs +2 -0
  16. package/dist/.setup/config-schema-DV93lEJ7.mjs +227 -0
  17. package/dist/.setup/directory-config-DB0OcZzw.mjs +55 -0
  18. package/dist/.setup/directory-live-O3jkDEJH.mjs +131 -0
  19. package/dist/.setup/doctor-contract-Dxk57DKz.mjs +147 -0
  20. package/dist/.setup/format-xuAop9a-.mjs +108 -0
  21. package/dist/.setup/interactive-replies-BLw4HEPS.mjs +193 -0
  22. package/dist/.setup/message-tool-api-D2m68v1f.mjs +128 -0
  23. package/dist/.setup/monitor-jTrujB_u.mjs +13 -0
  24. package/dist/.setup/outbound-adapter-DwAvZVk8.mjs +273 -0
  25. package/dist/.setup/pipeline.runtime-qFsXbTJf.mjs +3646 -0
  26. package/dist/.setup/plugin-routes-C3X0eVaK.mjs +22 -0
  27. package/dist/.setup/policy-C6VVHqUf.mjs +67 -0
  28. package/dist/.setup/probe-tmU762D2.mjs +48 -0
  29. package/dist/.setup/provider-Bjv1R5E2.mjs +4720 -0
  30. package/dist/.setup/relay-source-DR--lDW8.mjs +289 -0
  31. package/dist/.setup/replies-BO37R07g.mjs +288 -0
  32. package/dist/.setup/reply-blocks-Cwu6LYJI.mjs +882 -0
  33. package/dist/.setup/resolve-allowlist-common-CP8SH0Zf.mjs +43 -0
  34. package/dist/.setup/resolve-channels-CivvCeZv.mjs +81 -0
  35. package/dist/.setup/resolve-users-D5Qb64BJ.mjs +113 -0
  36. package/dist/.setup/rolldown-runtime-D7D4PA-g.mjs +13 -0
  37. package/dist/.setup/runtime-BOk7xkOl.mjs +8 -0
  38. package/dist/.setup/runtime-api-BnavgpzD.mjs +9 -0
  39. package/dist/.setup/runtime-setter-api-C-6lgBvk.mjs +3 -0
  40. package/dist/.setup/scopes-CYSKlU91.mjs +74 -0
  41. package/dist/.setup/secret-contract-C3ChHo5A.mjs +181 -0
  42. package/dist/.setup/secret-contract-api-CcCSHlV7.mjs +3 -0
  43. package/dist/.setup/security-audit-HMEYeSrJ.mjs +51 -0
  44. package/dist/.setup/send-DEOvcVM4.mjs +933 -0
  45. package/dist/.setup/send.runtime-Bmals7DV.mjs +2 -0
  46. package/dist/.setup/setup-core-uPGudyJH.mjs +344 -0
  47. package/dist/.setup/setup-plugin-api-DMKdqvij.mjs +3 -0
  48. package/dist/.setup/setup-surface-_4luZsPQ.mjs +130 -0
  49. package/dist/.setup/shared-BqyNq0up.mjs +269 -0
  50. package/dist/.setup/slash-dispatch.runtime-eyQo6mTA.mjs +32 -0
  51. package/dist/.setup/streaming-compat-DjlgH-Be.mjs +43 -0
  52. package/dist/.setup/target-parsing-C36VFWHQ.mjs +65 -0
  53. package/dist/.setup/targets-DnpzC22e.mjs +13 -0
  54. package/dist/account-inspect-api.js +1 -1
  55. package/dist/api.js +19 -18
  56. package/dist/channel-config-api.js +1 -1
  57. package/dist/channel-plugin-api.js +1 -1
  58. package/dist/configured-state.js +11 -0
  59. package/dist/directory-contract-api.js +1 -1
  60. package/dist/doctor-contract-api.js +1 -1
  61. package/dist/http-routes-api.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/interactive-replies-api.js +2 -0
  64. package/dist/message-tool-api.js +1 -1
  65. package/dist/runtime-api.js +13 -13
  66. package/dist/runtime-setter-api.js +1 -1
  67. package/dist/secret-contract-api.js +1 -1
  68. package/dist/security-contract-api.js +1 -1
  69. package/dist/setup-entry.js +5 -4
  70. package/dist/setup-plugin-api.js +1 -1
  71. package/node_modules/@slack/bolt/dist/App.d.ts +19 -4
  72. package/node_modules/@slack/bolt/dist/App.d.ts.map +1 -1
  73. package/node_modules/@slack/bolt/dist/App.js +40 -21
  74. package/node_modules/@slack/bolt/dist/App.js.map +1 -1
  75. package/node_modules/@slack/bolt/dist/WorkflowStep.d.ts +159 -0
  76. package/node_modules/@slack/bolt/dist/WorkflowStep.d.ts.map +1 -0
  77. package/node_modules/@slack/bolt/dist/WorkflowStep.js +217 -0
  78. package/node_modules/@slack/bolt/dist/WorkflowStep.js.map +1 -0
  79. package/node_modules/@slack/bolt/dist/context/create-respond.d.ts +3 -3
  80. package/node_modules/@slack/bolt/dist/context/create-respond.d.ts.map +1 -1
  81. package/node_modules/@slack/bolt/dist/context/create-respond.js +2 -13
  82. package/node_modules/@slack/bolt/dist/context/create-respond.js.map +1 -1
  83. package/node_modules/@slack/bolt/dist/errors.d.ts +8 -6
  84. package/node_modules/@slack/bolt/dist/errors.d.ts.map +1 -1
  85. package/node_modules/@slack/bolt/dist/errors.js +11 -11
  86. package/node_modules/@slack/bolt/dist/errors.js.map +1 -1
  87. package/node_modules/@slack/bolt/dist/helpers.d.ts.map +1 -1
  88. package/node_modules/@slack/bolt/dist/helpers.js +2 -1
  89. package/node_modules/@slack/bolt/dist/helpers.js.map +1 -1
  90. package/node_modules/@slack/bolt/dist/index.d.ts +1 -0
  91. package/node_modules/@slack/bolt/dist/index.d.ts.map +1 -1
  92. package/node_modules/@slack/bolt/dist/index.js +3 -1
  93. package/node_modules/@slack/bolt/dist/index.js.map +1 -1
  94. package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts +1 -10
  95. package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.d.ts.map +1 -1
  96. package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +1 -5
  97. package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js.map +1 -1
  98. package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.d.ts.map +1 -1
  99. package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js +14 -10
  100. package/node_modules/@slack/bolt/dist/receivers/HTTPModuleFunctions.js.map +1 -1
  101. package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.d.ts.map +1 -1
  102. package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.js +1 -1
  103. package/node_modules/@slack/bolt/dist/receivers/SocketModeFunctions.js.map +1 -1
  104. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts +1 -3
  105. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.d.ts.map +1 -1
  106. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +1 -2
  107. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js.map +1 -1
  108. package/node_modules/@slack/bolt/dist/types/actions/index.d.ts +4 -2
  109. package/node_modules/@slack/bolt/dist/types/actions/index.d.ts.map +1 -1
  110. package/node_modules/@slack/bolt/dist/types/actions/index.js +2 -0
  111. package/node_modules/@slack/bolt/dist/types/actions/index.js.map +1 -1
  112. package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.d.ts +49 -0
  113. package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.d.ts.map +1 -0
  114. package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.js +3 -0
  115. package/node_modules/@slack/bolt/dist/types/actions/workflow-step-edit.js.map +1 -0
  116. package/node_modules/@slack/bolt/dist/types/events/index.d.ts +0 -2
  117. package/node_modules/@slack/bolt/dist/types/events/index.d.ts.map +1 -1
  118. package/node_modules/@slack/bolt/dist/types/utilities.d.ts +2 -2
  119. package/node_modules/@slack/bolt/dist/types/utilities.d.ts.map +1 -1
  120. package/node_modules/@slack/bolt/dist/types/view/index.d.ts +31 -1
  121. package/node_modules/@slack/bolt/dist/types/view/index.d.ts.map +1 -1
  122. package/node_modules/@slack/bolt/node_modules/@slack/logger/README.md +1 -1
  123. package/node_modules/@slack/bolt/node_modules/@slack/logger/dist/index.js +13 -17
  124. package/node_modules/@slack/bolt/node_modules/@slack/logger/dist/index.js.map +1 -1
  125. package/node_modules/@slack/bolt/node_modules/@slack/logger/package.json +7 -6
  126. package/node_modules/@slack/bolt/node_modules/@slack/oauth/README.md +1 -1
  127. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/errors.d.ts +14 -25
  128. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/errors.d.ts.map +1 -1
  129. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/errors.js +33 -24
  130. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/errors.js.map +1 -1
  131. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/install-provider.js +16 -58
  132. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/install-provider.js.map +1 -1
  133. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/installation-stores/file-store.js +2 -4
  134. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/installation-stores/file-store.js.map +1 -1
  135. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/installation-stores/memory-store.js +16 -3
  136. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/installation-stores/memory-store.js.map +1 -1
  137. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/state-stores/clear-state-store.js +0 -2
  138. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/state-stores/clear-state-store.js.map +1 -1
  139. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/state-stores/file-state-store.js +0 -3
  140. package/node_modules/@slack/bolt/node_modules/@slack/oauth/dist/state-stores/file-state-store.js.map +1 -1
  141. package/node_modules/@slack/bolt/node_modules/@slack/oauth/package.json +9 -8
  142. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/README.md +221 -0
  143. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/package.json +67 -0
  144. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts +96 -0
  145. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts.map +1 -0
  146. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +242 -0
  147. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js.map +1 -0
  148. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts +98 -0
  149. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts.map +1 -0
  150. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +363 -0
  151. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js.map +1 -0
  152. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts +47 -0
  153. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts.map +1 -0
  154. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/errors.d.ts +60 -0
  155. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/errors.d.ts.map +1 -0
  156. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/errors.js +68 -0
  157. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/errors.js.map +1 -0
  158. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/index.d.ts +6 -0
  159. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/index.d.ts.map +1 -0
  160. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/index.js +13 -0
  161. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/dist/src/index.js.map +1 -0
  162. package/node_modules/@slack/bolt/node_modules/@slack/socket-mode/package.json +67 -0
  163. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  164. package/node_modules/@slack/bolt/node_modules/@types/node/fs/promises.d.ts +6 -16
  165. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  166. package/node_modules/@slack/bolt/node_modules/@types/ws/README.md +15 -0
  167. package/node_modules/@slack/bolt/node_modules/@types/ws/index.d.mts +451 -0
  168. package/node_modules/@slack/bolt/node_modules/@types/ws/index.d.ts +445 -0
  169. package/node_modules/@slack/bolt/node_modules/@types/ws/package.json +72 -0
  170. package/node_modules/@slack/bolt/node_modules/agent-base/README.md +145 -0
  171. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/index.d.ts +78 -0
  172. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/index.js +203 -0
  173. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/index.js.map +1 -0
  174. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  175. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/promisify.js +18 -0
  176. package/node_modules/@slack/bolt/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  177. package/node_modules/@slack/bolt/node_modules/agent-base/package.json +64 -0
  178. package/node_modules/@slack/bolt/node_modules/agent-base/src/index.ts +345 -0
  179. package/node_modules/@slack/bolt/node_modules/agent-base/src/promisify.ts +33 -0
  180. package/node_modules/@slack/bolt/node_modules/asynckit/LICENSE +21 -0
  181. package/node_modules/@slack/bolt/node_modules/asynckit/README.md +233 -0
  182. package/node_modules/@slack/bolt/node_modules/asynckit/bench.js +76 -0
  183. package/node_modules/@slack/bolt/node_modules/asynckit/index.js +6 -0
  184. package/node_modules/@slack/bolt/node_modules/asynckit/lib/abort.js +29 -0
  185. package/node_modules/@slack/bolt/node_modules/asynckit/lib/async.js +34 -0
  186. package/node_modules/@slack/bolt/node_modules/asynckit/lib/defer.js +26 -0
  187. package/node_modules/@slack/bolt/node_modules/asynckit/lib/iterate.js +75 -0
  188. package/node_modules/@slack/bolt/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  189. package/node_modules/@slack/bolt/node_modules/asynckit/lib/readable_parallel.js +25 -0
  190. package/node_modules/@slack/bolt/node_modules/asynckit/lib/readable_serial.js +25 -0
  191. package/node_modules/@slack/bolt/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  192. package/node_modules/@slack/bolt/node_modules/asynckit/lib/state.js +37 -0
  193. package/node_modules/@slack/bolt/node_modules/asynckit/lib/streamify.js +141 -0
  194. package/node_modules/@slack/bolt/node_modules/asynckit/lib/terminator.js +29 -0
  195. package/node_modules/@slack/bolt/node_modules/asynckit/package.json +63 -0
  196. package/node_modules/@slack/bolt/node_modules/asynckit/parallel.js +43 -0
  197. package/node_modules/@slack/bolt/node_modules/asynckit/serial.js +17 -0
  198. package/node_modules/@slack/bolt/node_modules/asynckit/serialOrdered.js +75 -0
  199. package/node_modules/@slack/bolt/node_modules/asynckit/stream.js +21 -0
  200. package/node_modules/@slack/bolt/node_modules/axios/CHANGELOG.md +1934 -0
  201. package/node_modules/@slack/bolt/node_modules/axios/LICENSE +7 -0
  202. package/node_modules/@slack/bolt/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  203. package/node_modules/@slack/bolt/node_modules/axios/README.md +2851 -0
  204. package/node_modules/@slack/bolt/node_modules/axios/dist/axios.js +5807 -0
  205. package/node_modules/@slack/bolt/node_modules/axios/dist/axios.min.js +5 -0
  206. package/node_modules/@slack/bolt/node_modules/axios/dist/axios.min.js.map +1 -0
  207. package/node_modules/@slack/bolt/node_modules/axios/dist/browser/axios.cjs +5829 -0
  208. package/node_modules/@slack/bolt/node_modules/axios/dist/esm/axios.js +5850 -0
  209. package/node_modules/@slack/bolt/node_modules/axios/dist/esm/axios.min.js +3 -0
  210. package/node_modules/@slack/bolt/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  211. package/node_modules/@slack/bolt/node_modules/axios/dist/node/axios.cjs +6808 -0
  212. package/node_modules/@slack/bolt/node_modules/axios/index.d.cts +766 -0
  213. package/node_modules/@slack/bolt/node_modules/axios/index.d.ts +787 -0
  214. package/node_modules/@slack/bolt/node_modules/axios/index.js +45 -0
  215. package/node_modules/@slack/bolt/node_modules/axios/lib/adapters/README.md +36 -0
  216. package/node_modules/@slack/bolt/node_modules/axios/lib/adapters/adapters.js +132 -0
  217. package/node_modules/@slack/bolt/node_modules/axios/lib/adapters/fetch.js +696 -0
  218. package/node_modules/@slack/bolt/node_modules/axios/lib/adapters/http.js +1490 -0
  219. package/node_modules/@slack/bolt/node_modules/axios/lib/adapters/xhr.js +277 -0
  220. package/node_modules/@slack/bolt/node_modules/axios/lib/axios.js +89 -0
  221. package/node_modules/@slack/bolt/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  222. package/node_modules/@slack/bolt/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  223. package/node_modules/@slack/bolt/node_modules/axios/lib/cancel/isCancel.js +5 -0
  224. package/node_modules/@slack/bolt/node_modules/axios/lib/core/Axios.js +306 -0
  225. package/node_modules/@slack/bolt/node_modules/axios/lib/core/AxiosError.js +219 -0
  226. package/node_modules/@slack/bolt/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  227. package/node_modules/@slack/bolt/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  228. package/node_modules/@slack/bolt/node_modules/axios/lib/core/README.md +8 -0
  229. package/node_modules/@slack/bolt/node_modules/axios/lib/core/buildFullPath.js +76 -0
  230. package/node_modules/@slack/bolt/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  231. package/node_modules/@slack/bolt/node_modules/axios/lib/core/mergeConfig.js +174 -0
  232. package/node_modules/@slack/bolt/node_modules/axios/lib/core/methodList.js +17 -0
  233. package/node_modules/@slack/bolt/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  234. package/node_modules/@slack/bolt/node_modules/axios/lib/core/settle.js +27 -0
  235. package/node_modules/@slack/bolt/node_modules/axios/lib/core/transformData.js +28 -0
  236. package/node_modules/@slack/bolt/node_modules/axios/lib/defaults/index.js +178 -0
  237. package/node_modules/@slack/bolt/node_modules/axios/lib/defaults/transitional.js +10 -0
  238. package/node_modules/@slack/bolt/node_modules/axios/lib/env/README.md +3 -0
  239. package/node_modules/@slack/bolt/node_modules/axios/lib/env/classes/FormData.js +2 -0
  240. package/node_modules/@slack/bolt/node_modules/axios/lib/env/data.js +1 -0
  241. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  242. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  243. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  244. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  245. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/README.md +7 -0
  246. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  247. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/bind.js +14 -0
  248. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/buildURL.js +69 -0
  249. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/callbackify.js +18 -0
  250. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  251. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  252. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/cookies.js +64 -0
  253. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  254. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  255. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  256. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  257. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  258. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  259. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  260. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  261. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  262. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/null.js +2 -0
  263. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  264. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  265. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  266. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/readBlob.js +15 -0
  267. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  268. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  269. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  270. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/speedometer.js +55 -0
  271. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/spread.js +28 -0
  272. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/throttle.js +45 -0
  273. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/toFormData.js +279 -0
  274. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  275. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/trackStream.js +89 -0
  276. package/node_modules/@slack/bolt/node_modules/axios/lib/helpers/validator.js +112 -0
  277. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  278. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  279. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  280. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/browser/index.js +13 -0
  281. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/common/utils.js +52 -0
  282. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/index.js +7 -0
  283. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  284. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  285. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  286. package/node_modules/@slack/bolt/node_modules/axios/lib/platform/node/index.js +37 -0
  287. package/node_modules/@slack/bolt/node_modules/axios/lib/utils.js +1150 -0
  288. package/node_modules/@slack/bolt/node_modules/axios/package.json +203 -0
  289. package/node_modules/@slack/bolt/node_modules/combined-stream/License +19 -0
  290. package/node_modules/@slack/bolt/node_modules/combined-stream/Readme.md +138 -0
  291. package/node_modules/@slack/bolt/node_modules/combined-stream/lib/combined_stream.js +208 -0
  292. package/node_modules/@slack/bolt/node_modules/combined-stream/package.json +25 -0
  293. package/node_modules/@slack/bolt/node_modules/delayed-stream/.npmignore +1 -0
  294. package/node_modules/@slack/bolt/node_modules/delayed-stream/License +19 -0
  295. package/node_modules/@slack/bolt/node_modules/delayed-stream/Makefile +7 -0
  296. package/node_modules/@slack/bolt/node_modules/delayed-stream/Readme.md +141 -0
  297. package/node_modules/@slack/bolt/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  298. package/node_modules/@slack/bolt/node_modules/delayed-stream/package.json +27 -0
  299. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/.eslintrc +13 -0
  300. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/.nycrc +9 -0
  301. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  302. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/LICENSE +21 -0
  303. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/README.md +53 -0
  304. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/index.d.ts +10 -0
  305. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/index.js +35 -0
  306. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/package.json +78 -0
  307. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/test/index.js +85 -0
  308. package/node_modules/@slack/bolt/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  309. package/node_modules/@slack/bolt/node_modules/follow-redirects/LICENSE +18 -0
  310. package/node_modules/@slack/bolt/node_modules/follow-redirects/README.md +157 -0
  311. package/node_modules/@slack/bolt/node_modules/follow-redirects/debug.js +15 -0
  312. package/node_modules/@slack/bolt/node_modules/follow-redirects/http.js +1 -0
  313. package/node_modules/@slack/bolt/node_modules/follow-redirects/https.js +1 -0
  314. package/node_modules/@slack/bolt/node_modules/follow-redirects/index.js +709 -0
  315. package/node_modules/@slack/bolt/node_modules/follow-redirects/package.json +58 -0
  316. package/node_modules/@slack/bolt/node_modules/form-data/CHANGELOG.md +669 -0
  317. package/node_modules/@slack/bolt/node_modules/form-data/License +19 -0
  318. package/node_modules/@slack/bolt/node_modules/form-data/README.md +350 -0
  319. package/node_modules/@slack/bolt/node_modules/form-data/index.d.ts +51 -0
  320. package/node_modules/@slack/bolt/node_modules/form-data/lib/browser.js +4 -0
  321. package/node_modules/@slack/bolt/node_modules/form-data/lib/form_data.js +514 -0
  322. package/node_modules/@slack/bolt/node_modules/form-data/lib/populate.js +10 -0
  323. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/HISTORY.md +507 -0
  324. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/LICENSE +23 -0
  325. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/README.md +100 -0
  326. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/db.json +8519 -0
  327. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/index.js +12 -0
  328. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-db/package.json +60 -0
  329. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-types/HISTORY.md +397 -0
  330. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-types/LICENSE +23 -0
  331. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-types/README.md +113 -0
  332. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-types/index.js +188 -0
  333. package/node_modules/@slack/bolt/node_modules/form-data/node_modules/mime-types/package.json +44 -0
  334. package/node_modules/@slack/bolt/node_modules/form-data/package.json +83 -0
  335. package/node_modules/@slack/bolt/node_modules/has-tostringtag/.eslintrc +5 -0
  336. package/node_modules/@slack/bolt/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  337. package/node_modules/@slack/bolt/node_modules/has-tostringtag/.nycrc +13 -0
  338. package/node_modules/@slack/bolt/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  339. package/node_modules/@slack/bolt/node_modules/has-tostringtag/LICENSE +21 -0
  340. package/node_modules/@slack/bolt/node_modules/has-tostringtag/README.md +46 -0
  341. package/node_modules/@slack/bolt/node_modules/has-tostringtag/index.d.ts +3 -0
  342. package/node_modules/@slack/bolt/node_modules/has-tostringtag/index.js +8 -0
  343. package/node_modules/@slack/bolt/node_modules/has-tostringtag/package.json +108 -0
  344. package/node_modules/@slack/bolt/node_modules/has-tostringtag/shams.d.ts +3 -0
  345. package/node_modules/@slack/bolt/node_modules/has-tostringtag/shams.js +8 -0
  346. package/node_modules/@slack/bolt/node_modules/has-tostringtag/test/index.js +21 -0
  347. package/node_modules/@slack/bolt/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  348. package/node_modules/@slack/bolt/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  349. package/node_modules/@slack/bolt/node_modules/has-tostringtag/test/tests.js +15 -0
  350. package/node_modules/@slack/bolt/node_modules/has-tostringtag/tsconfig.json +49 -0
  351. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/README.md +137 -0
  352. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  353. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/agent.js +177 -0
  354. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  355. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  356. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/index.js +14 -0
  357. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  358. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  359. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  360. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  361. package/node_modules/@slack/bolt/node_modules/https-proxy-agent/package.json +56 -0
  362. package/node_modules/@slack/bolt/node_modules/iconv-lite/encodings/sbcs-data.js +0 -2
  363. package/node_modules/@slack/bolt/node_modules/iconv-lite/encodings/utf32.js +3 -10
  364. package/node_modules/@slack/bolt/node_modules/iconv-lite/package.json +2 -2
  365. package/node_modules/@slack/bolt/node_modules/iconv-lite/types/encodings.d.ts +0 -2
  366. package/node_modules/@slack/bolt/node_modules/media-typer/README.md +14 -15
  367. package/node_modules/@slack/bolt/node_modules/media-typer/index.js +8 -0
  368. package/node_modules/@slack/bolt/node_modules/media-typer/package.json +12 -16
  369. package/node_modules/@slack/bolt/node_modules/path-to-regexp/Readme.md +3 -3
  370. package/node_modules/@slack/bolt/node_modules/path-to-regexp/dist/index.js +158 -135
  371. package/node_modules/@slack/bolt/node_modules/path-to-regexp/dist/index.js.map +1 -1
  372. package/node_modules/@slack/bolt/node_modules/path-to-regexp/package.json +2 -2
  373. package/node_modules/@slack/bolt/node_modules/proxy-addr/HISTORY.md +60 -54
  374. package/node_modules/@slack/bolt/node_modules/proxy-addr/README.md +1 -1
  375. package/node_modules/@slack/bolt/node_modules/proxy-addr/index.js +32 -0
  376. package/node_modules/@slack/bolt/node_modules/proxy-addr/package.json +8 -4
  377. package/node_modules/@slack/bolt/node_modules/proxy-from-env/LICENSE +20 -0
  378. package/node_modules/@slack/bolt/node_modules/proxy-from-env/README.md +163 -0
  379. package/node_modules/@slack/bolt/node_modules/proxy-from-env/index.cjs +105 -0
  380. package/node_modules/@slack/bolt/node_modules/proxy-from-env/index.js +103 -0
  381. package/node_modules/@slack/bolt/node_modules/proxy-from-env/package.json +43 -0
  382. package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +0 -11
  383. package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +17 -17
  384. package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +8 -19
  385. package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +8 -47
  386. package/node_modules/@slack/bolt/node_modules/qs/package.json +5 -6
  387. package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +0 -230
  388. package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +0 -194
  389. package/node_modules/@slack/bolt/package.json +11 -10
  390. package/node_modules/@slack/types/README.md +1 -1
  391. package/node_modules/@slack/types/dist/events/app.d.ts +0 -28
  392. package/node_modules/@slack/types/dist/events/app.d.ts.map +1 -1
  393. package/node_modules/@slack/types/dist/events/index.d.ts +2 -2
  394. package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -1
  395. package/node_modules/@slack/types/dist/events/index.js.map +1 -1
  396. package/node_modules/@slack/types/dist/events/message.d.ts +0 -2
  397. package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -1
  398. package/node_modules/@slack/types/package.json +3 -3
  399. package/node_modules/@slack/web-api/README.md +1 -1
  400. package/node_modules/@slack/web-api/dist/WebClient.d.ts +71 -42
  401. package/node_modules/@slack/web-api/dist/WebClient.d.ts.map +1 -1
  402. package/node_modules/@slack/web-api/dist/WebClient.js +248 -180
  403. package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
  404. package/node_modules/@slack/web-api/dist/chat-stream.js +22 -37
  405. package/node_modules/@slack/web-api/dist/chat-stream.js.map +1 -1
  406. package/node_modules/@slack/web-api/dist/errors.d.ts +51 -32
  407. package/node_modules/@slack/web-api/dist/errors.d.ts.map +1 -1
  408. package/node_modules/@slack/web-api/dist/errors.js +55 -64
  409. package/node_modules/@slack/web-api/dist/errors.js.map +1 -1
  410. package/node_modules/@slack/web-api/dist/file-upload.d.ts +9 -0
  411. package/node_modules/@slack/web-api/dist/file-upload.d.ts.map +1 -1
  412. package/node_modules/@slack/web-api/dist/file-upload.js +46 -41
  413. package/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
  414. package/node_modules/@slack/web-api/dist/index.d.ts +2 -2
  415. package/node_modules/@slack/web-api/dist/index.d.ts.map +1 -1
  416. package/node_modules/@slack/web-api/dist/index.js +1 -8
  417. package/node_modules/@slack/web-api/dist/index.js.map +1 -1
  418. package/node_modules/@slack/web-api/dist/methods.d.ts +38 -2
  419. package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
  420. package/node_modules/@slack/web-api/dist/methods.js +1384 -1347
  421. package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
  422. package/node_modules/@slack/web-api/dist/types/request/files.d.ts +1 -0
  423. package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
  424. package/node_modules/@slack/web-api/dist/types/request/index.d.ts +3 -3
  425. package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
  426. package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts +1 -66
  427. package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts.map +1 -1
  428. package/node_modules/@slack/web-api/dist/types/request/rtm.d.ts +14 -1
  429. package/node_modules/@slack/web-api/dist/types/request/rtm.d.ts.map +1 -1
  430. package/node_modules/@slack/web-api/dist/types/request/workflows.d.ts +29 -0
  431. package/node_modules/@slack/web-api/dist/types/request/workflows.d.ts.map +1 -1
  432. package/node_modules/@slack/web-api/node_modules/@slack/logger/README.md +1 -1
  433. package/node_modules/@slack/web-api/node_modules/@slack/logger/dist/index.js +13 -17
  434. package/node_modules/@slack/web-api/node_modules/@slack/logger/dist/index.js.map +1 -1
  435. package/node_modules/@slack/web-api/node_modules/@slack/logger/package.json +7 -6
  436. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  437. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +6 -16
  438. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  439. package/node_modules/@slack/web-api/node_modules/agent-base/README.md +145 -0
  440. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/index.d.ts +78 -0
  441. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/index.js +203 -0
  442. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/index.js.map +1 -0
  443. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  444. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/promisify.js +18 -0
  445. package/node_modules/@slack/web-api/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  446. package/node_modules/@slack/web-api/node_modules/agent-base/package.json +64 -0
  447. package/node_modules/@slack/web-api/node_modules/agent-base/src/index.ts +345 -0
  448. package/node_modules/@slack/web-api/node_modules/agent-base/src/promisify.ts +33 -0
  449. package/node_modules/@slack/web-api/node_modules/asynckit/LICENSE +21 -0
  450. package/node_modules/@slack/web-api/node_modules/asynckit/README.md +233 -0
  451. package/node_modules/@slack/web-api/node_modules/asynckit/bench.js +76 -0
  452. package/node_modules/@slack/web-api/node_modules/asynckit/index.js +6 -0
  453. package/node_modules/@slack/web-api/node_modules/asynckit/lib/abort.js +29 -0
  454. package/node_modules/@slack/web-api/node_modules/asynckit/lib/async.js +34 -0
  455. package/node_modules/@slack/web-api/node_modules/asynckit/lib/defer.js +26 -0
  456. package/node_modules/@slack/web-api/node_modules/asynckit/lib/iterate.js +75 -0
  457. package/node_modules/@slack/web-api/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  458. package/node_modules/@slack/web-api/node_modules/asynckit/lib/readable_parallel.js +25 -0
  459. package/node_modules/@slack/web-api/node_modules/asynckit/lib/readable_serial.js +25 -0
  460. package/node_modules/@slack/web-api/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  461. package/node_modules/@slack/web-api/node_modules/asynckit/lib/state.js +37 -0
  462. package/node_modules/@slack/web-api/node_modules/asynckit/lib/streamify.js +141 -0
  463. package/node_modules/@slack/web-api/node_modules/asynckit/lib/terminator.js +29 -0
  464. package/node_modules/@slack/web-api/node_modules/asynckit/package.json +63 -0
  465. package/node_modules/@slack/web-api/node_modules/asynckit/parallel.js +43 -0
  466. package/node_modules/@slack/web-api/node_modules/asynckit/serial.js +17 -0
  467. package/node_modules/@slack/web-api/node_modules/asynckit/serialOrdered.js +75 -0
  468. package/node_modules/@slack/web-api/node_modules/asynckit/stream.js +21 -0
  469. package/node_modules/@slack/web-api/node_modules/axios/CHANGELOG.md +1934 -0
  470. package/node_modules/@slack/web-api/node_modules/axios/LICENSE +7 -0
  471. package/node_modules/@slack/web-api/node_modules/axios/MIGRATION_GUIDE.md +877 -0
  472. package/node_modules/@slack/web-api/node_modules/axios/README.md +2851 -0
  473. package/node_modules/@slack/web-api/node_modules/axios/dist/axios.js +5807 -0
  474. package/node_modules/@slack/web-api/node_modules/axios/dist/axios.min.js +5 -0
  475. package/node_modules/@slack/web-api/node_modules/axios/dist/axios.min.js.map +1 -0
  476. package/node_modules/@slack/web-api/node_modules/axios/dist/browser/axios.cjs +5829 -0
  477. package/node_modules/@slack/web-api/node_modules/axios/dist/esm/axios.js +5850 -0
  478. package/node_modules/@slack/web-api/node_modules/axios/dist/esm/axios.min.js +3 -0
  479. package/node_modules/@slack/web-api/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  480. package/node_modules/@slack/web-api/node_modules/axios/dist/node/axios.cjs +6808 -0
  481. package/node_modules/@slack/web-api/node_modules/axios/index.d.cts +766 -0
  482. package/node_modules/@slack/web-api/node_modules/axios/index.d.ts +787 -0
  483. package/node_modules/@slack/web-api/node_modules/axios/index.js +45 -0
  484. package/node_modules/@slack/web-api/node_modules/axios/lib/adapters/README.md +36 -0
  485. package/node_modules/@slack/web-api/node_modules/axios/lib/adapters/adapters.js +132 -0
  486. package/node_modules/@slack/web-api/node_modules/axios/lib/adapters/fetch.js +696 -0
  487. package/node_modules/@slack/web-api/node_modules/axios/lib/adapters/http.js +1490 -0
  488. package/node_modules/@slack/web-api/node_modules/axios/lib/adapters/xhr.js +277 -0
  489. package/node_modules/@slack/web-api/node_modules/axios/lib/axios.js +89 -0
  490. package/node_modules/@slack/web-api/node_modules/axios/lib/cancel/CancelToken.js +135 -0
  491. package/node_modules/@slack/web-api/node_modules/axios/lib/cancel/CanceledError.js +22 -0
  492. package/node_modules/@slack/web-api/node_modules/axios/lib/cancel/isCancel.js +5 -0
  493. package/node_modules/@slack/web-api/node_modules/axios/lib/core/Axios.js +306 -0
  494. package/node_modules/@slack/web-api/node_modules/axios/lib/core/AxiosError.js +219 -0
  495. package/node_modules/@slack/web-api/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
  496. package/node_modules/@slack/web-api/node_modules/axios/lib/core/InterceptorManager.js +171 -0
  497. package/node_modules/@slack/web-api/node_modules/axios/lib/core/README.md +8 -0
  498. package/node_modules/@slack/web-api/node_modules/axios/lib/core/buildFullPath.js +76 -0
  499. package/node_modules/@slack/web-api/node_modules/axios/lib/core/dispatchRequest.js +95 -0
  500. package/node_modules/@slack/web-api/node_modules/axios/lib/core/mergeConfig.js +174 -0
  501. package/node_modules/@slack/web-api/node_modules/axios/lib/core/methodList.js +17 -0
  502. package/node_modules/@slack/web-api/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
  503. package/node_modules/@slack/web-api/node_modules/axios/lib/core/settle.js +27 -0
  504. package/node_modules/@slack/web-api/node_modules/axios/lib/core/transformData.js +28 -0
  505. package/node_modules/@slack/web-api/node_modules/axios/lib/defaults/index.js +178 -0
  506. package/node_modules/@slack/web-api/node_modules/axios/lib/defaults/transitional.js +10 -0
  507. package/node_modules/@slack/web-api/node_modules/axios/lib/env/README.md +3 -0
  508. package/node_modules/@slack/web-api/node_modules/axios/lib/env/classes/FormData.js +2 -0
  509. package/node_modules/@slack/web-api/node_modules/axios/lib/env/data.js +1 -0
  510. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
  511. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
  512. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
  513. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
  514. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/README.md +7 -0
  515. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  516. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/bind.js +14 -0
  517. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/buildURL.js +69 -0
  518. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/callbackify.js +18 -0
  519. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/combineURLs.js +23 -0
  520. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/composeSignals.js +68 -0
  521. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/cookies.js +64 -0
  522. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
  523. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
  524. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/formDataToJSON.js +125 -0
  525. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
  526. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/fromDataURI.js +69 -0
  527. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
  528. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  529. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
  530. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
  531. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/null.js +2 -0
  532. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/parseHeaders.js +71 -0
  533. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  534. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
  535. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/readBlob.js +15 -0
  536. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
  537. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  538. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
  539. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/speedometer.js +55 -0
  540. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/spread.js +28 -0
  541. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/throttle.js +45 -0
  542. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/toFormData.js +279 -0
  543. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
  544. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/trackStream.js +89 -0
  545. package/node_modules/@slack/web-api/node_modules/axios/lib/helpers/validator.js +112 -0
  546. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  547. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  548. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  549. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/browser/index.js +13 -0
  550. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/common/utils.js +52 -0
  551. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/index.js +7 -0
  552. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
  553. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  554. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  555. package/node_modules/@slack/web-api/node_modules/axios/lib/platform/node/index.js +37 -0
  556. package/node_modules/@slack/web-api/node_modules/axios/lib/utils.js +1150 -0
  557. package/node_modules/@slack/web-api/node_modules/axios/package.json +203 -0
  558. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  559. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  560. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  561. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  562. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  563. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/README.md +62 -0
  564. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  565. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  566. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  567. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  568. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  569. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  570. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  571. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  572. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  573. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/index.js +15 -0
  574. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/package.json +85 -0
  575. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  576. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  577. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  578. package/node_modules/@slack/web-api/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  579. package/node_modules/@slack/web-api/node_modules/combined-stream/License +19 -0
  580. package/node_modules/@slack/web-api/node_modules/combined-stream/Readme.md +138 -0
  581. package/node_modules/@slack/web-api/node_modules/combined-stream/lib/combined_stream.js +208 -0
  582. package/node_modules/@slack/web-api/node_modules/combined-stream/package.json +25 -0
  583. package/node_modules/@slack/web-api/node_modules/debug/LICENSE +20 -0
  584. package/node_modules/@slack/web-api/node_modules/debug/README.md +481 -0
  585. package/node_modules/@slack/web-api/node_modules/debug/package.json +64 -0
  586. package/node_modules/@slack/web-api/node_modules/debug/src/browser.js +272 -0
  587. package/node_modules/@slack/web-api/node_modules/debug/src/common.js +292 -0
  588. package/node_modules/@slack/web-api/node_modules/debug/src/index.js +10 -0
  589. package/node_modules/@slack/web-api/node_modules/debug/src/node.js +263 -0
  590. package/node_modules/@slack/web-api/node_modules/delayed-stream/.npmignore +1 -0
  591. package/node_modules/@slack/web-api/node_modules/delayed-stream/License +19 -0
  592. package/node_modules/@slack/web-api/node_modules/delayed-stream/Makefile +7 -0
  593. package/node_modules/@slack/web-api/node_modules/delayed-stream/Readme.md +141 -0
  594. package/node_modules/@slack/web-api/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  595. package/node_modules/@slack/web-api/node_modules/delayed-stream/package.json +27 -0
  596. package/node_modules/@slack/web-api/node_modules/dunder-proto/.eslintrc +5 -0
  597. package/node_modules/@slack/web-api/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  598. package/node_modules/@slack/web-api/node_modules/dunder-proto/.nycrc +13 -0
  599. package/node_modules/@slack/web-api/node_modules/dunder-proto/CHANGELOG.md +24 -0
  600. package/node_modules/@slack/web-api/node_modules/dunder-proto/LICENSE +21 -0
  601. package/node_modules/@slack/web-api/node_modules/dunder-proto/README.md +54 -0
  602. package/node_modules/@slack/web-api/node_modules/dunder-proto/get.d.ts +5 -0
  603. package/node_modules/@slack/web-api/node_modules/dunder-proto/get.js +30 -0
  604. package/node_modules/@slack/web-api/node_modules/dunder-proto/package.json +76 -0
  605. package/node_modules/@slack/web-api/node_modules/dunder-proto/set.d.ts +5 -0
  606. package/node_modules/@slack/web-api/node_modules/dunder-proto/set.js +35 -0
  607. package/node_modules/@slack/web-api/node_modules/dunder-proto/test/get.js +34 -0
  608. package/node_modules/@slack/web-api/node_modules/dunder-proto/test/index.js +4 -0
  609. package/node_modules/@slack/web-api/node_modules/dunder-proto/test/set.js +50 -0
  610. package/node_modules/@slack/web-api/node_modules/dunder-proto/tsconfig.json +9 -0
  611. package/node_modules/@slack/web-api/node_modules/es-define-property/.eslintrc +13 -0
  612. package/node_modules/@slack/web-api/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  613. package/node_modules/@slack/web-api/node_modules/es-define-property/.nycrc +9 -0
  614. package/node_modules/@slack/web-api/node_modules/es-define-property/CHANGELOG.md +29 -0
  615. package/node_modules/@slack/web-api/node_modules/es-define-property/LICENSE +21 -0
  616. package/node_modules/@slack/web-api/node_modules/es-define-property/README.md +49 -0
  617. package/node_modules/@slack/web-api/node_modules/es-define-property/index.d.ts +3 -0
  618. package/node_modules/@slack/web-api/node_modules/es-define-property/index.js +14 -0
  619. package/node_modules/@slack/web-api/node_modules/es-define-property/package.json +81 -0
  620. package/node_modules/@slack/web-api/node_modules/es-define-property/test/index.js +56 -0
  621. package/node_modules/@slack/web-api/node_modules/es-define-property/tsconfig.json +10 -0
  622. package/node_modules/@slack/web-api/node_modules/es-errors/.eslintrc +5 -0
  623. package/node_modules/@slack/web-api/node_modules/es-errors/.github/FUNDING.yml +12 -0
  624. package/node_modules/@slack/web-api/node_modules/es-errors/CHANGELOG.md +40 -0
  625. package/node_modules/@slack/web-api/node_modules/es-errors/LICENSE +21 -0
  626. package/node_modules/@slack/web-api/node_modules/es-errors/README.md +55 -0
  627. package/node_modules/@slack/web-api/node_modules/es-errors/eval.d.ts +3 -0
  628. package/node_modules/@slack/web-api/node_modules/es-errors/eval.js +4 -0
  629. package/node_modules/@slack/web-api/node_modules/es-errors/index.d.ts +3 -0
  630. package/node_modules/@slack/web-api/node_modules/es-errors/index.js +4 -0
  631. package/node_modules/@slack/web-api/node_modules/es-errors/package.json +80 -0
  632. package/node_modules/@slack/web-api/node_modules/es-errors/range.d.ts +3 -0
  633. package/node_modules/@slack/web-api/node_modules/es-errors/range.js +4 -0
  634. package/node_modules/@slack/web-api/node_modules/es-errors/ref.d.ts +3 -0
  635. package/node_modules/@slack/web-api/node_modules/es-errors/ref.js +4 -0
  636. package/node_modules/@slack/web-api/node_modules/es-errors/syntax.d.ts +3 -0
  637. package/node_modules/@slack/web-api/node_modules/es-errors/syntax.js +4 -0
  638. package/node_modules/@slack/web-api/node_modules/es-errors/test/index.js +19 -0
  639. package/node_modules/@slack/web-api/node_modules/es-errors/tsconfig.json +49 -0
  640. package/node_modules/@slack/web-api/node_modules/es-errors/type.d.ts +3 -0
  641. package/node_modules/@slack/web-api/node_modules/es-errors/type.js +4 -0
  642. package/node_modules/@slack/web-api/node_modules/es-errors/uri.d.ts +3 -0
  643. package/node_modules/@slack/web-api/node_modules/es-errors/uri.js +4 -0
  644. package/node_modules/@slack/web-api/node_modules/es-object-atoms/.eslintrc +16 -0
  645. package/node_modules/@slack/web-api/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  646. package/node_modules/@slack/web-api/node_modules/es-object-atoms/CHANGELOG.md +44 -0
  647. package/node_modules/@slack/web-api/node_modules/es-object-atoms/LICENSE +21 -0
  648. package/node_modules/@slack/web-api/node_modules/es-object-atoms/README.md +63 -0
  649. package/node_modules/@slack/web-api/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  650. package/node_modules/@slack/web-api/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  651. package/node_modules/@slack/web-api/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  652. package/node_modules/@slack/web-api/node_modules/es-object-atoms/ToObject.js +10 -0
  653. package/node_modules/@slack/web-api/node_modules/es-object-atoms/index.d.ts +3 -0
  654. package/node_modules/@slack/web-api/node_modules/es-object-atoms/index.js +4 -0
  655. package/node_modules/@slack/web-api/node_modules/es-object-atoms/isObject.d.ts +3 -0
  656. package/node_modules/@slack/web-api/node_modules/es-object-atoms/isObject.js +6 -0
  657. package/node_modules/@slack/web-api/node_modules/es-object-atoms/package.json +79 -0
  658. package/node_modules/@slack/web-api/node_modules/es-object-atoms/test/index.js +38 -0
  659. package/node_modules/@slack/web-api/node_modules/es-object-atoms/tsconfig.json +7 -0
  660. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/.eslintrc +13 -0
  661. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/.nycrc +9 -0
  662. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
  663. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/LICENSE +21 -0
  664. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/README.md +53 -0
  665. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/index.d.ts +10 -0
  666. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/index.js +35 -0
  667. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/package.json +78 -0
  668. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/test/index.js +85 -0
  669. package/node_modules/@slack/web-api/node_modules/es-set-tostringtag/tsconfig.json +9 -0
  670. package/node_modules/@slack/web-api/node_modules/follow-redirects/LICENSE +18 -0
  671. package/node_modules/@slack/web-api/node_modules/follow-redirects/README.md +157 -0
  672. package/node_modules/@slack/web-api/node_modules/follow-redirects/debug.js +15 -0
  673. package/node_modules/@slack/web-api/node_modules/follow-redirects/http.js +1 -0
  674. package/node_modules/@slack/web-api/node_modules/follow-redirects/https.js +1 -0
  675. package/node_modules/@slack/web-api/node_modules/follow-redirects/index.js +709 -0
  676. package/node_modules/@slack/web-api/node_modules/follow-redirects/package.json +58 -0
  677. package/node_modules/@slack/web-api/node_modules/form-data/CHANGELOG.md +669 -0
  678. package/node_modules/@slack/web-api/node_modules/form-data/License +19 -0
  679. package/node_modules/@slack/web-api/node_modules/form-data/README.md +350 -0
  680. package/node_modules/@slack/web-api/node_modules/form-data/index.d.ts +51 -0
  681. package/node_modules/@slack/web-api/node_modules/form-data/lib/browser.js +4 -0
  682. package/node_modules/@slack/web-api/node_modules/form-data/lib/form_data.js +514 -0
  683. package/node_modules/@slack/web-api/node_modules/form-data/lib/populate.js +10 -0
  684. package/node_modules/@slack/web-api/node_modules/form-data/package.json +83 -0
  685. package/node_modules/@slack/web-api/node_modules/function-bind/.eslintrc +21 -0
  686. package/node_modules/@slack/web-api/node_modules/function-bind/.github/FUNDING.yml +12 -0
  687. package/node_modules/@slack/web-api/node_modules/function-bind/.github/SECURITY.md +3 -0
  688. package/node_modules/@slack/web-api/node_modules/function-bind/.nycrc +13 -0
  689. package/node_modules/@slack/web-api/node_modules/function-bind/CHANGELOG.md +136 -0
  690. package/node_modules/@slack/web-api/node_modules/function-bind/LICENSE +20 -0
  691. package/node_modules/@slack/web-api/node_modules/function-bind/README.md +46 -0
  692. package/node_modules/@slack/web-api/node_modules/function-bind/implementation.js +84 -0
  693. package/node_modules/@slack/web-api/node_modules/function-bind/index.js +5 -0
  694. package/node_modules/@slack/web-api/node_modules/function-bind/package.json +87 -0
  695. package/node_modules/@slack/web-api/node_modules/function-bind/test/.eslintrc +9 -0
  696. package/node_modules/@slack/web-api/node_modules/function-bind/test/index.js +252 -0
  697. package/node_modules/@slack/web-api/node_modules/get-intrinsic/.eslintrc +42 -0
  698. package/node_modules/@slack/web-api/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  699. package/node_modules/@slack/web-api/node_modules/get-intrinsic/.nycrc +9 -0
  700. package/node_modules/@slack/web-api/node_modules/get-intrinsic/CHANGELOG.md +186 -0
  701. package/node_modules/@slack/web-api/node_modules/get-intrinsic/LICENSE +21 -0
  702. package/node_modules/@slack/web-api/node_modules/get-intrinsic/README.md +71 -0
  703. package/node_modules/@slack/web-api/node_modules/get-intrinsic/index.js +378 -0
  704. package/node_modules/@slack/web-api/node_modules/get-intrinsic/package.json +97 -0
  705. package/node_modules/@slack/web-api/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  706. package/node_modules/@slack/web-api/node_modules/get-proto/.eslintrc +10 -0
  707. package/node_modules/@slack/web-api/node_modules/get-proto/.github/FUNDING.yml +12 -0
  708. package/node_modules/@slack/web-api/node_modules/get-proto/.nycrc +9 -0
  709. package/node_modules/@slack/web-api/node_modules/get-proto/CHANGELOG.md +21 -0
  710. package/node_modules/@slack/web-api/node_modules/get-proto/LICENSE +21 -0
  711. package/node_modules/@slack/web-api/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  712. package/node_modules/@slack/web-api/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  713. package/node_modules/@slack/web-api/node_modules/get-proto/README.md +50 -0
  714. package/node_modules/@slack/web-api/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  715. package/node_modules/@slack/web-api/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  716. package/node_modules/@slack/web-api/node_modules/get-proto/index.d.ts +5 -0
  717. package/node_modules/@slack/web-api/node_modules/get-proto/index.js +27 -0
  718. package/node_modules/@slack/web-api/node_modules/get-proto/package.json +81 -0
  719. package/node_modules/@slack/web-api/node_modules/get-proto/test/index.js +68 -0
  720. package/node_modules/@slack/web-api/node_modules/get-proto/tsconfig.json +9 -0
  721. package/node_modules/@slack/web-api/node_modules/gopd/.eslintrc +16 -0
  722. package/node_modules/@slack/web-api/node_modules/gopd/.github/FUNDING.yml +12 -0
  723. package/node_modules/@slack/web-api/node_modules/gopd/CHANGELOG.md +45 -0
  724. package/node_modules/@slack/web-api/node_modules/gopd/LICENSE +21 -0
  725. package/node_modules/@slack/web-api/node_modules/gopd/README.md +40 -0
  726. package/node_modules/@slack/web-api/node_modules/gopd/gOPD.d.ts +1 -0
  727. package/node_modules/@slack/web-api/node_modules/gopd/gOPD.js +4 -0
  728. package/node_modules/@slack/web-api/node_modules/gopd/index.d.ts +5 -0
  729. package/node_modules/@slack/web-api/node_modules/gopd/index.js +15 -0
  730. package/node_modules/@slack/web-api/node_modules/gopd/package.json +77 -0
  731. package/node_modules/@slack/web-api/node_modules/gopd/test/index.js +36 -0
  732. package/node_modules/@slack/web-api/node_modules/gopd/tsconfig.json +9 -0
  733. package/node_modules/@slack/web-api/node_modules/has-symbols/.eslintrc +11 -0
  734. package/node_modules/@slack/web-api/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  735. package/node_modules/@slack/web-api/node_modules/has-symbols/.nycrc +9 -0
  736. package/node_modules/@slack/web-api/node_modules/has-symbols/CHANGELOG.md +91 -0
  737. package/node_modules/@slack/web-api/node_modules/has-symbols/LICENSE +21 -0
  738. package/node_modules/@slack/web-api/node_modules/has-symbols/README.md +46 -0
  739. package/node_modules/@slack/web-api/node_modules/has-symbols/index.d.ts +3 -0
  740. package/node_modules/@slack/web-api/node_modules/has-symbols/index.js +14 -0
  741. package/node_modules/@slack/web-api/node_modules/has-symbols/package.json +111 -0
  742. package/node_modules/@slack/web-api/node_modules/has-symbols/shams.d.ts +3 -0
  743. package/node_modules/@slack/web-api/node_modules/has-symbols/shams.js +45 -0
  744. package/node_modules/@slack/web-api/node_modules/has-symbols/test/index.js +22 -0
  745. package/node_modules/@slack/web-api/node_modules/has-symbols/test/shams/core-js.js +29 -0
  746. package/node_modules/@slack/web-api/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  747. package/node_modules/@slack/web-api/node_modules/has-symbols/test/tests.js +58 -0
  748. package/node_modules/@slack/web-api/node_modules/has-symbols/tsconfig.json +10 -0
  749. package/node_modules/@slack/web-api/node_modules/has-tostringtag/.eslintrc +5 -0
  750. package/node_modules/@slack/web-api/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
  751. package/node_modules/@slack/web-api/node_modules/has-tostringtag/.nycrc +13 -0
  752. package/node_modules/@slack/web-api/node_modules/has-tostringtag/CHANGELOG.md +42 -0
  753. package/node_modules/@slack/web-api/node_modules/has-tostringtag/LICENSE +21 -0
  754. package/node_modules/@slack/web-api/node_modules/has-tostringtag/README.md +46 -0
  755. package/node_modules/@slack/web-api/node_modules/has-tostringtag/index.d.ts +3 -0
  756. package/node_modules/@slack/web-api/node_modules/has-tostringtag/index.js +8 -0
  757. package/node_modules/@slack/web-api/node_modules/has-tostringtag/package.json +108 -0
  758. package/node_modules/@slack/web-api/node_modules/has-tostringtag/shams.d.ts +3 -0
  759. package/node_modules/@slack/web-api/node_modules/has-tostringtag/shams.js +8 -0
  760. package/node_modules/@slack/web-api/node_modules/has-tostringtag/test/index.js +21 -0
  761. package/node_modules/@slack/web-api/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
  762. package/node_modules/@slack/web-api/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
  763. package/node_modules/@slack/web-api/node_modules/has-tostringtag/test/tests.js +15 -0
  764. package/node_modules/@slack/web-api/node_modules/has-tostringtag/tsconfig.json +49 -0
  765. package/node_modules/@slack/web-api/node_modules/hasown/.github/FUNDING.yml +12 -0
  766. package/node_modules/@slack/web-api/node_modules/hasown/.nycrc +13 -0
  767. package/node_modules/@slack/web-api/node_modules/hasown/CHANGELOG.md +58 -0
  768. package/node_modules/@slack/web-api/node_modules/hasown/LICENSE +21 -0
  769. package/node_modules/@slack/web-api/node_modules/hasown/README.md +40 -0
  770. package/node_modules/@slack/web-api/node_modules/hasown/eslint.config.mjs +6 -0
  771. package/node_modules/@slack/web-api/node_modules/hasown/index.d.ts +3 -0
  772. package/node_modules/@slack/web-api/node_modules/hasown/index.js +8 -0
  773. package/node_modules/@slack/web-api/node_modules/hasown/package.json +91 -0
  774. package/node_modules/@slack/web-api/node_modules/hasown/tsconfig.json +6 -0
  775. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/README.md +137 -0
  776. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  777. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/agent.js +177 -0
  778. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  779. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  780. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/index.js +14 -0
  781. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  782. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  783. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  784. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  785. package/node_modules/@slack/web-api/node_modules/https-proxy-agent/package.json +56 -0
  786. package/node_modules/@slack/web-api/node_modules/is-electron/LICENSE +21 -0
  787. package/node_modules/@slack/web-api/node_modules/is-electron/README.md +25 -0
  788. package/node_modules/@slack/web-api/node_modules/is-electron/index.d.ts +2 -0
  789. package/node_modules/@slack/web-api/node_modules/is-electron/index.js +21 -0
  790. package/node_modules/@slack/web-api/node_modules/is-electron/package.json +34 -0
  791. package/node_modules/@slack/web-api/node_modules/is-stream/index.d.ts +79 -0
  792. package/node_modules/@slack/web-api/node_modules/is-stream/index.js +28 -0
  793. package/node_modules/@slack/web-api/node_modules/is-stream/package.json +42 -0
  794. package/node_modules/@slack/web-api/node_modules/is-stream/readme.md +60 -0
  795. package/node_modules/@slack/web-api/node_modules/math-intrinsics/.eslintrc +16 -0
  796. package/node_modules/@slack/web-api/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  797. package/node_modules/@slack/web-api/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  798. package/node_modules/@slack/web-api/node_modules/math-intrinsics/LICENSE +21 -0
  799. package/node_modules/@slack/web-api/node_modules/math-intrinsics/README.md +50 -0
  800. package/node_modules/@slack/web-api/node_modules/math-intrinsics/abs.d.ts +1 -0
  801. package/node_modules/@slack/web-api/node_modules/math-intrinsics/abs.js +4 -0
  802. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  803. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  804. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  805. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  806. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  807. package/node_modules/@slack/web-api/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  808. package/node_modules/@slack/web-api/node_modules/math-intrinsics/floor.d.ts +1 -0
  809. package/node_modules/@slack/web-api/node_modules/math-intrinsics/floor.js +4 -0
  810. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  811. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isFinite.js +12 -0
  812. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  813. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isInteger.js +16 -0
  814. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  815. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isNaN.js +6 -0
  816. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  817. package/node_modules/@slack/web-api/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  818. package/node_modules/@slack/web-api/node_modules/math-intrinsics/max.d.ts +1 -0
  819. package/node_modules/@slack/web-api/node_modules/math-intrinsics/max.js +4 -0
  820. package/node_modules/@slack/web-api/node_modules/math-intrinsics/min.d.ts +1 -0
  821. package/node_modules/@slack/web-api/node_modules/math-intrinsics/min.js +4 -0
  822. package/node_modules/@slack/web-api/node_modules/math-intrinsics/mod.d.ts +3 -0
  823. package/node_modules/@slack/web-api/node_modules/math-intrinsics/mod.js +9 -0
  824. package/node_modules/@slack/web-api/node_modules/math-intrinsics/package.json +86 -0
  825. package/node_modules/@slack/web-api/node_modules/math-intrinsics/pow.d.ts +1 -0
  826. package/node_modules/@slack/web-api/node_modules/math-intrinsics/pow.js +4 -0
  827. package/node_modules/@slack/web-api/node_modules/math-intrinsics/round.d.ts +1 -0
  828. package/node_modules/@slack/web-api/node_modules/math-intrinsics/round.js +4 -0
  829. package/node_modules/@slack/web-api/node_modules/math-intrinsics/sign.d.ts +3 -0
  830. package/node_modules/@slack/web-api/node_modules/math-intrinsics/sign.js +11 -0
  831. package/node_modules/@slack/web-api/node_modules/math-intrinsics/test/index.js +192 -0
  832. package/node_modules/@slack/web-api/node_modules/math-intrinsics/tsconfig.json +3 -0
  833. package/node_modules/@slack/web-api/node_modules/mime-db/HISTORY.md +507 -0
  834. package/node_modules/@slack/web-api/node_modules/mime-db/LICENSE +23 -0
  835. package/node_modules/@slack/web-api/node_modules/mime-db/README.md +100 -0
  836. package/node_modules/@slack/web-api/node_modules/mime-db/db.json +8519 -0
  837. package/node_modules/@slack/web-api/node_modules/mime-db/index.js +12 -0
  838. package/node_modules/@slack/web-api/node_modules/mime-db/package.json +60 -0
  839. package/node_modules/@slack/web-api/node_modules/mime-types/HISTORY.md +397 -0
  840. package/node_modules/@slack/web-api/node_modules/mime-types/LICENSE +23 -0
  841. package/node_modules/@slack/web-api/node_modules/mime-types/README.md +113 -0
  842. package/node_modules/@slack/web-api/node_modules/mime-types/index.js +188 -0
  843. package/node_modules/@slack/web-api/node_modules/mime-types/package.json +44 -0
  844. package/node_modules/@slack/web-api/node_modules/ms/index.js +162 -0
  845. package/node_modules/@slack/web-api/node_modules/ms/license.md +21 -0
  846. package/node_modules/@slack/web-api/node_modules/ms/package.json +38 -0
  847. package/node_modules/@slack/web-api/node_modules/ms/readme.md +59 -0
  848. package/node_modules/@slack/web-api/node_modules/proxy-from-env/LICENSE +20 -0
  849. package/node_modules/@slack/web-api/node_modules/proxy-from-env/README.md +163 -0
  850. package/node_modules/@slack/web-api/node_modules/proxy-from-env/index.cjs +105 -0
  851. package/node_modules/@slack/web-api/node_modules/proxy-from-env/index.js +103 -0
  852. package/node_modules/@slack/web-api/node_modules/proxy-from-env/package.json +43 -0
  853. package/node_modules/@slack/web-api/node_modules/safe-buffer/LICENSE +21 -0
  854. package/node_modules/@slack/web-api/node_modules/safe-buffer/README.md +584 -0
  855. package/node_modules/@slack/web-api/node_modules/safe-buffer/index.d.ts +187 -0
  856. package/node_modules/@slack/web-api/node_modules/safe-buffer/index.js +65 -0
  857. package/node_modules/@slack/web-api/node_modules/safe-buffer/package.json +51 -0
  858. package/node_modules/@slack/web-api/package.json +10 -6
  859. package/node_modules/typebox/build/compile/validator.d.mts +4 -1
  860. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  861. package/node_modules/typebox/build/guard/guard.mjs +2 -5
  862. package/node_modules/typebox/build/guard/string.mjs +4 -16
  863. package/node_modules/typebox/build/schema/engine/_functions.mjs +15 -34
  864. package/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
  865. package/node_modules/typebox/build/type/action/readonly_object.mjs +0 -8
  866. package/node_modules/typebox/build/typebox.d.mts +1 -1
  867. package/node_modules/typebox/build/typebox.mjs +1 -1
  868. package/node_modules/typebox/package.json +1 -1
  869. package/node_modules/typebox/readme.md +32 -29
  870. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  871. package/node_modules/ws/package.json +1 -1
  872. package/openclaw.plugin.json +1390 -1351
  873. package/package.json +19 -109
  874. package/dist/account-configured-BwfXBo_F.js +0 -14
  875. package/dist/account-inspect-DEKpg9Ip.js +0 -89
  876. package/dist/account-reply-mode-DrUXogvO.js +0 -14
  877. package/dist/accounts-CHAeNZOX.js +0 -186
  878. package/dist/accounts.runtime-BHD4Ma2R.js +0 -2
  879. package/dist/action-runtime-DfuYoMjG.js +0 -561
  880. package/dist/action-runtime.runtime-DQErZYpz.js +0 -2
  881. package/dist/actions-D3NuJvva.js +0 -876
  882. package/dist/actions.runtime-BIRU_G4M.js +0 -2
  883. package/dist/approval-handler.runtime-BA05P0QT.js +0 -367
  884. package/dist/block-text-DkHaoGem.js +0 -79
  885. package/dist/channel-B9fVdW3s.js +0 -1118
  886. package/dist/channel-type-DXyos1d2.js +0 -108
  887. package/dist/channel.setup-CLP5oTvh.js +0 -56
  888. package/dist/config-adapter-CxBQH8fq.js +0 -566
  889. package/dist/config-schema-SgZT6nXV.js +0 -373
  890. package/dist/cursor-pages-eX7p8Wwt.js +0 -19
  891. package/dist/directory-config-CnCIAktf.js +0 -54
  892. package/dist/directory-live-DKunWh3A.js +0 -131
  893. package/dist/doctor-contract-CsGH1Dfc.js +0 -158
  894. package/dist/group-policy-NQZti9t-.js +0 -2442
  895. package/dist/message-tool-api-DkhFpMoy.js +0 -127
  896. package/dist/monitor-CmKz0wtI.js +0 -13
  897. package/dist/outbound-adapter-BkuMp2Vs.js +0 -236
  898. package/dist/pipeline.runtime-DgtmuYCP.js +0 -4360
  899. package/dist/plugin-routes-CLp4obpN.js +0 -22
  900. package/dist/policy-PRysPn23.js +0 -65
  901. package/dist/preflight-audio.runtime-D5Bgags0.js +0 -3
  902. package/dist/probe-CgDsSops.js +0 -345
  903. package/dist/provider-DmRizMZt.js +0 -5900
  904. package/dist/relay-source-Blxj8xb4.js +0 -272
  905. package/dist/replies-4s_Vq_z9.js +0 -457
  906. package/dist/resolve-channels-yEqmM-3I.js +0 -92
  907. package/dist/resolve-users-BOrt5K-5.js +0 -118
  908. package/dist/rolldown-runtime-8H4AJuhK.js +0 -14
  909. package/dist/runtime-JSVZSWAj.js +0 -8
  910. package/dist/runtime-api-QMb-Q5Ko.js +0 -10
  911. package/dist/scopes-BJSrkAp6.js +0 -73
  912. package/dist/secret-contract-DxmvbxBF.js +0 -87
  913. package/dist/security-audit-DR097212.js +0 -41
  914. package/dist/send-DsLeZpST.js +0 -1269
  915. package/dist/send.runtime-gUdK6V3h.js +0 -2
  916. package/dist/setup-surface-BeNzrMrJ.js +0 -148
  917. package/dist/shared-DgIN3Dcr.js +0 -268
  918. package/dist/slash-dispatch.runtime-zPkyl7dB.js +0 -33
  919. package/dist/streaming-compat-3_X-21wW.js +0 -44
  920. package/dist/target-parsing-N6lHogYZ.js +0 -73
  921. package/dist/targets-KmjP2E8s.js +0 -13
  922. package/node_modules/@slack/socket-mode/README.md +0 -221
  923. package/node_modules/@slack/socket-mode/dist/package.json +0 -75
  924. package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts +0 -102
  925. package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.d.ts.map +0 -1
  926. package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js +0 -330
  927. package/node_modules/@slack/socket-mode/dist/src/SlackWebSocket.js.map +0 -1
  928. package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts +0 -104
  929. package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.d.ts.map +0 -1
  930. package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js +0 -412
  931. package/node_modules/@slack/socket-mode/dist/src/SocketModeClient.js.map +0 -1
  932. package/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts +0 -77
  933. package/node_modules/@slack/socket-mode/dist/src/SocketModeOptions.d.ts.map +0 -1
  934. package/node_modules/@slack/socket-mode/dist/src/errors.d.ts +0 -54
  935. package/node_modules/@slack/socket-mode/dist/src/errors.d.ts.map +0 -1
  936. package/node_modules/@slack/socket-mode/dist/src/errors.js +0 -64
  937. package/node_modules/@slack/socket-mode/dist/src/errors.js.map +0 -1
  938. package/node_modules/@slack/socket-mode/dist/src/index.d.ts +0 -6
  939. package/node_modules/@slack/socket-mode/dist/src/index.d.ts.map +0 -1
  940. package/node_modules/@slack/socket-mode/dist/src/index.js +0 -19
  941. package/node_modules/@slack/socket-mode/dist/src/index.js.map +0 -1
  942. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/LICENSE +0 -23
  943. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/README.md +0 -66
  944. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/dist/index.d.ts +0 -94
  945. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/dist/index.d.ts.map +0 -1
  946. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/dist/index.js +0 -98
  947. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/dist/index.js.map +0 -1
  948. package/node_modules/@slack/socket-mode/node_modules/@slack/logger/package.json +0 -42
  949. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +0 -15
  950. package/node_modules/@slack/socket-mode/node_modules/@types/node/assert/strict.d.ts +0 -68
  951. package/node_modules/@slack/socket-mode/node_modules/@types/node/assert.d.ts +0 -1077
  952. package/node_modules/@slack/socket-mode/node_modules/@types/node/async_hooks.d.ts +0 -711
  953. package/node_modules/@slack/socket-mode/node_modules/@types/node/buffer.buffer.d.ts +0 -466
  954. package/node_modules/@slack/socket-mode/node_modules/@types/node/buffer.d.ts +0 -1799
  955. package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1362
  956. package/node_modules/@slack/socket-mode/node_modules/@types/node/cluster.d.ts +0 -432
  957. package/node_modules/@slack/socket-mode/node_modules/@types/node/console.d.ts +0 -93
  958. package/node_modules/@slack/socket-mode/node_modules/@types/node/constants.d.ts +0 -14
  959. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +0 -3954
  960. package/node_modules/@slack/socket-mode/node_modules/@types/node/dgram.d.ts +0 -537
  961. package/node_modules/@slack/socket-mode/node_modules/@types/node/diagnostics_channel.d.ts +0 -794
  962. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +0 -497
  963. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +0 -876
  964. package/node_modules/@slack/socket-mode/node_modules/@types/node/domain.d.ts +0 -150
  965. package/node_modules/@slack/socket-mode/node_modules/@types/node/events.d.ts +0 -1008
  966. package/node_modules/@slack/socket-mode/node_modules/@types/node/ffi.d.ts +0 -486
  967. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs/promises.d.ts +0 -1481
  968. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +0 -4786
  969. package/node_modules/@slack/socket-mode/node_modules/@types/node/globals.d.ts +0 -150
  970. package/node_modules/@slack/socket-mode/node_modules/@types/node/globals.typedarray.d.ts +0 -101
  971. package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +0 -2172
  972. package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +0 -2489
  973. package/node_modules/@slack/socket-mode/node_modules/@types/node/https.d.ts +0 -400
  974. package/node_modules/@slack/socket-mode/node_modules/@types/node/index.d.ts +0 -115
  975. package/node_modules/@slack/socket-mode/node_modules/@types/node/inspector/promises.d.ts +0 -35
  976. package/node_modules/@slack/socket-mode/node_modules/@types/node/inspector.d.ts +0 -264
  977. package/node_modules/@slack/socket-mode/node_modules/@types/node/inspector.generated.d.ts +0 -4406
  978. package/node_modules/@slack/socket-mode/node_modules/@types/node/module.d.ts +0 -726
  979. package/node_modules/@slack/socket-mode/node_modules/@types/node/net.d.ts +0 -970
  980. package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +0 -498
  981. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +0 -155
  982. package/node_modules/@slack/socket-mode/node_modules/@types/node/path/posix.d.ts +0 -8
  983. package/node_modules/@slack/socket-mode/node_modules/@types/node/path/win32.d.ts +0 -8
  984. package/node_modules/@slack/socket-mode/node_modules/@types/node/path.d.ts +0 -178
  985. package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +0 -604
  986. package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +0 -2217
  987. package/node_modules/@slack/socket-mode/node_modules/@types/node/punycode.d.ts +0 -89
  988. package/node_modules/@slack/socket-mode/node_modules/@types/node/querystring.d.ts +0 -139
  989. package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +0 -978
  990. package/node_modules/@slack/socket-mode/node_modules/@types/node/readline/promises.d.ts +0 -158
  991. package/node_modules/@slack/socket-mode/node_modules/@types/node/readline.d.ts +0 -508
  992. package/node_modules/@slack/socket-mode/node_modules/@types/node/repl.d.ts +0 -420
  993. package/node_modules/@slack/socket-mode/node_modules/@types/node/sea.d.ts +0 -47
  994. package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +0 -1123
  995. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/consumers.d.ts +0 -114
  996. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +0 -451
  997. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/promises.d.ts +0 -211
  998. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/web.d.ts +0 -300
  999. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream.d.ts +0 -1806
  1000. package/node_modules/@slack/socket-mode/node_modules/@types/node/string_decoder.d.ts +0 -27
  1001. package/node_modules/@slack/socket-mode/node_modules/@types/node/test/reporters.d.ts +0 -59
  1002. package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +0 -2389
  1003. package/node_modules/@slack/socket-mode/node_modules/@types/node/timers/promises.d.ts +0 -93
  1004. package/node_modules/@slack/socket-mode/node_modules/@types/node/timers.d.ts +0 -149
  1005. package/node_modules/@slack/socket-mode/node_modules/@types/node/tls.d.ts +0 -1193
  1006. package/node_modules/@slack/socket-mode/node_modules/@types/node/trace_events.d.ts +0 -103
  1007. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
  1008. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  1009. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
  1010. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.6/index.d.ts +0 -117
  1011. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  1012. package/node_modules/@slack/socket-mode/node_modules/@types/node/ts5.7/index.d.ts +0 -117
  1013. package/node_modules/@slack/socket-mode/node_modules/@types/node/tty.d.ts +0 -225
  1014. package/node_modules/@slack/socket-mode/node_modules/@types/node/url.d.ts +0 -556
  1015. package/node_modules/@slack/socket-mode/node_modules/@types/node/util/types.d.ts +0 -558
  1016. package/node_modules/@slack/socket-mode/node_modules/@types/node/util.d.ts +0 -1677
  1017. package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +0 -1062
  1018. package/node_modules/@slack/socket-mode/node_modules/@types/node/vm.d.ts +0 -1136
  1019. package/node_modules/@slack/socket-mode/node_modules/@types/node/wasi.d.ts +0 -131
  1020. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
  1021. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  1022. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/console.d.ts +0 -9
  1023. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  1024. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/domexception.d.ts +0 -83
  1025. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  1026. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/events.d.ts +0 -106
  1027. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
  1028. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  1029. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  1030. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
  1031. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  1032. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  1033. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/streams.d.ts +0 -115
  1034. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  1035. package/node_modules/@slack/socket-mode/node_modules/@types/node/web-globals/url.d.ts +0 -24
  1036. package/node_modules/@slack/socket-mode/node_modules/@types/node/worker_threads.d.ts +0 -669
  1037. package/node_modules/@slack/socket-mode/node_modules/@types/node/zlib/iter.d.ts +0 -131
  1038. package/node_modules/@slack/socket-mode/node_modules/@types/node/zlib.d.ts +0 -589
  1039. package/node_modules/@slack/socket-mode/node_modules/undici-types/LICENSE +0 -21
  1040. package/node_modules/@slack/socket-mode/node_modules/undici-types/README.md +0 -6
  1041. package/node_modules/@slack/socket-mode/node_modules/undici-types/agent.d.ts +0 -30
  1042. package/node_modules/@slack/socket-mode/node_modules/undici-types/api.d.ts +0 -43
  1043. package/node_modules/@slack/socket-mode/node_modules/undici-types/balanced-pool.d.ts +0 -30
  1044. package/node_modules/@slack/socket-mode/node_modules/undici-types/cache-interceptor.d.ts +0 -179
  1045. package/node_modules/@slack/socket-mode/node_modules/undici-types/cache.d.ts +0 -36
  1046. package/node_modules/@slack/socket-mode/node_modules/undici-types/client-stats.d.ts +0 -15
  1047. package/node_modules/@slack/socket-mode/node_modules/undici-types/client.d.ts +0 -129
  1048. package/node_modules/@slack/socket-mode/node_modules/undici-types/connector.d.ts +0 -36
  1049. package/node_modules/@slack/socket-mode/node_modules/undici-types/content-type.d.ts +0 -21
  1050. package/node_modules/@slack/socket-mode/node_modules/undici-types/cookies.d.ts +0 -30
  1051. package/node_modules/@slack/socket-mode/node_modules/undici-types/diagnostics-channel.d.ts +0 -74
  1052. package/node_modules/@slack/socket-mode/node_modules/undici-types/dispatcher.d.ts +0 -253
  1053. package/node_modules/@slack/socket-mode/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
  1054. package/node_modules/@slack/socket-mode/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -22
  1055. package/node_modules/@slack/socket-mode/node_modules/undici-types/errors.d.ts +0 -177
  1056. package/node_modules/@slack/socket-mode/node_modules/undici-types/eventsource.d.ts +0 -66
  1057. package/node_modules/@slack/socket-mode/node_modules/undici-types/fetch.d.ts +0 -231
  1058. package/node_modules/@slack/socket-mode/node_modules/undici-types/formdata.d.ts +0 -108
  1059. package/node_modules/@slack/socket-mode/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  1060. package/node_modules/@slack/socket-mode/node_modules/undici-types/global-origin.d.ts +0 -7
  1061. package/node_modules/@slack/socket-mode/node_modules/undici-types/h2c-client.d.ts +0 -73
  1062. package/node_modules/@slack/socket-mode/node_modules/undici-types/handlers.d.ts +0 -14
  1063. package/node_modules/@slack/socket-mode/node_modules/undici-types/header.d.ts +0 -165
  1064. package/node_modules/@slack/socket-mode/node_modules/undici-types/index.d.ts +0 -93
  1065. package/node_modules/@slack/socket-mode/node_modules/undici-types/interceptors.d.ts +0 -80
  1066. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-agent.d.ts +0 -68
  1067. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-call-history.d.ts +0 -111
  1068. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-client.d.ts +0 -27
  1069. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-errors.d.ts +0 -12
  1070. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-interceptor.d.ts +0 -94
  1071. package/node_modules/@slack/socket-mode/node_modules/undici-types/mock-pool.d.ts +0 -27
  1072. package/node_modules/@slack/socket-mode/node_modules/undici-types/package.json +0 -55
  1073. package/node_modules/@slack/socket-mode/node_modules/undici-types/patch.d.ts +0 -29
  1074. package/node_modules/@slack/socket-mode/node_modules/undici-types/pool-stats.d.ts +0 -19
  1075. package/node_modules/@slack/socket-mode/node_modules/undici-types/pool.d.ts +0 -39
  1076. package/node_modules/@slack/socket-mode/node_modules/undici-types/proxy-agent.d.ts +0 -29
  1077. package/node_modules/@slack/socket-mode/node_modules/undici-types/readable.d.ts +0 -68
  1078. package/node_modules/@slack/socket-mode/node_modules/undici-types/retry-agent.d.ts +0 -8
  1079. package/node_modules/@slack/socket-mode/node_modules/undici-types/retry-handler.d.ts +0 -125
  1080. package/node_modules/@slack/socket-mode/node_modules/undici-types/round-robin-pool.d.ts +0 -39
  1081. package/node_modules/@slack/socket-mode/node_modules/undici-types/snapshot-agent.d.ts +0 -113
  1082. package/node_modules/@slack/socket-mode/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
  1083. package/node_modules/@slack/socket-mode/node_modules/undici-types/util.d.ts +0 -18
  1084. package/node_modules/@slack/socket-mode/node_modules/undici-types/utility.d.ts +0 -7
  1085. package/node_modules/@slack/socket-mode/node_modules/undici-types/webidl.d.ts +0 -346
  1086. package/node_modules/@slack/socket-mode/node_modules/undici-types/websocket.d.ts +0 -188
  1087. package/node_modules/@slack/socket-mode/package.json +0 -75
  1088. package/node_modules/get-east-asian-width/index.d.ts +0 -60
  1089. package/node_modules/get-east-asian-width/index.js +0 -30
  1090. package/node_modules/get-east-asian-width/lookup-data.js +0 -21
  1091. package/node_modules/get-east-asian-width/lookup.js +0 -138
  1092. package/node_modules/get-east-asian-width/package.json +0 -71
  1093. package/node_modules/get-east-asian-width/readme.md +0 -65
  1094. package/node_modules/get-east-asian-width/utilities.js +0 -24
  1095. package/node_modules/p-map/index.d.ts +0 -155
  1096. package/node_modules/p-map/index.js +0 -285
  1097. package/node_modules/p-map/license +0 -9
  1098. package/node_modules/p-map/package.json +0 -57
  1099. package/node_modules/p-map/readme.md +0 -190
  1100. package/node_modules/undici/LICENSE +0 -21
  1101. package/node_modules/undici/README.md +0 -741
  1102. package/node_modules/undici/docs/docs/api/Agent.md +0 -84
  1103. package/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
  1104. package/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
  1105. package/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
  1106. package/node_modules/undici/docs/docs/api/Client.md +0 -288
  1107. package/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
  1108. package/node_modules/undici/docs/docs/api/Connector.md +0 -115
  1109. package/node_modules/undici/docs/docs/api/ContentType.md +0 -57
  1110. package/node_modules/undici/docs/docs/api/Cookies.md +0 -128
  1111. package/node_modules/undici/docs/docs/api/Debug.md +0 -62
  1112. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
  1113. package/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
  1114. package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
  1115. package/node_modules/undici/docs/docs/api/Errors.md +0 -49
  1116. package/node_modules/undici/docs/docs/api/EventSource.md +0 -45
  1117. package/node_modules/undici/docs/docs/api/Fetch.md +0 -60
  1118. package/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
  1119. package/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
  1120. package/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
  1121. package/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
  1122. package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
  1123. package/node_modules/undici/docs/docs/api/MockClient.md +0 -81
  1124. package/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
  1125. package/node_modules/undici/docs/docs/api/MockPool.md +0 -555
  1126. package/node_modules/undici/docs/docs/api/Pool.md +0 -84
  1127. package/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
  1128. package/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
  1129. package/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
  1130. package/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
  1131. package/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
  1132. package/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
  1133. package/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
  1134. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -275
  1135. package/node_modules/undici/docs/docs/api/Util.md +0 -25
  1136. package/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
  1137. package/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
  1138. package/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
  1139. package/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
  1140. package/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
  1141. package/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
  1142. package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
  1143. package/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
  1144. package/node_modules/undici/index-fetch.js +0 -65
  1145. package/node_modules/undici/index.d.ts +0 -3
  1146. package/node_modules/undici/index.js +0 -234
  1147. package/node_modules/undici/lib/api/abort-signal.js +0 -59
  1148. package/node_modules/undici/lib/api/api-connect.js +0 -110
  1149. package/node_modules/undici/lib/api/api-pipeline.js +0 -252
  1150. package/node_modules/undici/lib/api/api-request.js +0 -214
  1151. package/node_modules/undici/lib/api/api-stream.js +0 -209
  1152. package/node_modules/undici/lib/api/api-upgrade.js +0 -111
  1153. package/node_modules/undici/lib/api/index.js +0 -7
  1154. package/node_modules/undici/lib/api/readable.js +0 -580
  1155. package/node_modules/undici/lib/cache/memory-cache-store.js +0 -234
  1156. package/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -461
  1157. package/node_modules/undici/lib/core/connect.js +0 -153
  1158. package/node_modules/undici/lib/core/constants.js +0 -143
  1159. package/node_modules/undici/lib/core/diagnostics.js +0 -227
  1160. package/node_modules/undici/lib/core/errors.js +0 -477
  1161. package/node_modules/undici/lib/core/request.js +0 -453
  1162. package/node_modules/undici/lib/core/socks5-client.js +0 -422
  1163. package/node_modules/undici/lib/core/socks5-utils.js +0 -212
  1164. package/node_modules/undici/lib/core/symbols.js +0 -75
  1165. package/node_modules/undici/lib/core/tree.js +0 -160
  1166. package/node_modules/undici/lib/core/util.js +0 -992
  1167. package/node_modules/undici/lib/dispatcher/agent.js +0 -158
  1168. package/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
  1169. package/node_modules/undici/lib/dispatcher/client-h1.js +0 -1722
  1170. package/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
  1171. package/node_modules/undici/lib/dispatcher/client.js +0 -664
  1172. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
  1173. package/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
  1174. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
  1175. package/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
  1176. package/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
  1177. package/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
  1178. package/node_modules/undici/lib/dispatcher/pool.js +0 -118
  1179. package/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
  1180. package/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
  1181. package/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
  1182. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
  1183. package/node_modules/undici/lib/encoding/index.js +0 -33
  1184. package/node_modules/undici/lib/global.js +0 -59
  1185. package/node_modules/undici/lib/handler/cache-handler.js +0 -578
  1186. package/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
  1187. package/node_modules/undici/lib/handler/decorator-handler.js +0 -67
  1188. package/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
  1189. package/node_modules/undici/lib/handler/redirect-handler.js +0 -238
  1190. package/node_modules/undici/lib/handler/retry-handler.js +0 -394
  1191. package/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
  1192. package/node_modules/undici/lib/handler/wrap-handler.js +0 -105
  1193. package/node_modules/undici/lib/interceptor/cache.js +0 -495
  1194. package/node_modules/undici/lib/interceptor/decompress.js +0 -259
  1195. package/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
  1196. package/node_modules/undici/lib/interceptor/dns.js +0 -571
  1197. package/node_modules/undici/lib/interceptor/dump.js +0 -112
  1198. package/node_modules/undici/lib/interceptor/redirect.js +0 -21
  1199. package/node_modules/undici/lib/interceptor/response-error.js +0 -95
  1200. package/node_modules/undici/lib/interceptor/retry.js +0 -19
  1201. package/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  1202. package/node_modules/undici/lib/llhttp/constants.d.ts +0 -195
  1203. package/node_modules/undici/lib/llhttp/constants.js +0 -531
  1204. package/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
  1205. package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
  1206. package/node_modules/undici/lib/llhttp/utils.d.ts +0 -2
  1207. package/node_modules/undici/lib/llhttp/utils.js +0 -12
  1208. package/node_modules/undici/lib/mock/mock-agent.js +0 -232
  1209. package/node_modules/undici/lib/mock/mock-call-history.js +0 -248
  1210. package/node_modules/undici/lib/mock/mock-client.js +0 -68
  1211. package/node_modules/undici/lib/mock/mock-errors.js +0 -29
  1212. package/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
  1213. package/node_modules/undici/lib/mock/mock-pool.js +0 -68
  1214. package/node_modules/undici/lib/mock/mock-symbols.js +0 -32
  1215. package/node_modules/undici/lib/mock/mock-utils.js +0 -486
  1216. package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
  1217. package/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
  1218. package/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
  1219. package/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
  1220. package/node_modules/undici/lib/util/cache.js +0 -414
  1221. package/node_modules/undici/lib/util/date.js +0 -653
  1222. package/node_modules/undici/lib/util/promise.js +0 -28
  1223. package/node_modules/undici/lib/util/runtime-features.js +0 -124
  1224. package/node_modules/undici/lib/util/stats.js +0 -32
  1225. package/node_modules/undici/lib/util/timers.js +0 -425
  1226. package/node_modules/undici/lib/web/cache/cache.js +0 -864
  1227. package/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
  1228. package/node_modules/undici/lib/web/cache/util.js +0 -45
  1229. package/node_modules/undici/lib/web/cookies/constants.js +0 -12
  1230. package/node_modules/undici/lib/web/cookies/index.js +0 -199
  1231. package/node_modules/undici/lib/web/cookies/parse.js +0 -314
  1232. package/node_modules/undici/lib/web/cookies/util.js +0 -282
  1233. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
  1234. package/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
  1235. package/node_modules/undici/lib/web/eventsource/util.js +0 -29
  1236. package/node_modules/undici/lib/web/fetch/LICENSE +0 -21
  1237. package/node_modules/undici/lib/web/fetch/body.js +0 -509
  1238. package/node_modules/undici/lib/web/fetch/constants.js +0 -131
  1239. package/node_modules/undici/lib/web/fetch/data-url.js +0 -596
  1240. package/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
  1241. package/node_modules/undici/lib/web/fetch/formdata.js +0 -259
  1242. package/node_modules/undici/lib/web/fetch/global.js +0 -40
  1243. package/node_modules/undici/lib/web/fetch/headers.js +0 -719
  1244. package/node_modules/undici/lib/web/fetch/index.js +0 -2413
  1245. package/node_modules/undici/lib/web/fetch/request.js +0 -1115
  1246. package/node_modules/undici/lib/web/fetch/response.js +0 -641
  1247. package/node_modules/undici/lib/web/fetch/util.js +0 -1522
  1248. package/node_modules/undici/lib/web/infra/index.js +0 -229
  1249. package/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
  1250. package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
  1251. package/node_modules/undici/lib/web/webidl/index.js +0 -1006
  1252. package/node_modules/undici/lib/web/websocket/connection.js +0 -329
  1253. package/node_modules/undici/lib/web/websocket/constants.js +0 -126
  1254. package/node_modules/undici/lib/web/websocket/events.js +0 -331
  1255. package/node_modules/undici/lib/web/websocket/frame.js +0 -133
  1256. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
  1257. package/node_modules/undici/lib/web/websocket/receiver.js +0 -507
  1258. package/node_modules/undici/lib/web/websocket/sender.js +0 -109
  1259. package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
  1260. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
  1261. package/node_modules/undici/lib/web/websocket/util.js +0 -347
  1262. package/node_modules/undici/lib/web/websocket/websocket.js +0 -758
  1263. package/node_modules/undici/package.json +0 -152
  1264. package/node_modules/undici/scripts/strip-comments.js +0 -10
  1265. package/node_modules/undici/types/README.md +0 -6
  1266. package/node_modules/undici/types/agent.d.ts +0 -32
  1267. package/node_modules/undici/types/api.d.ts +0 -43
  1268. package/node_modules/undici/types/balanced-pool.d.ts +0 -30
  1269. package/node_modules/undici/types/cache-interceptor.d.ts +0 -179
  1270. package/node_modules/undici/types/cache.d.ts +0 -36
  1271. package/node_modules/undici/types/client-stats.d.ts +0 -15
  1272. package/node_modules/undici/types/client.d.ts +0 -139
  1273. package/node_modules/undici/types/connector.d.ts +0 -36
  1274. package/node_modules/undici/types/content-type.d.ts +0 -21
  1275. package/node_modules/undici/types/cookies.d.ts +0 -30
  1276. package/node_modules/undici/types/diagnostics-channel.d.ts +0 -74
  1277. package/node_modules/undici/types/dispatcher.d.ts +0 -275
  1278. package/node_modules/undici/types/env-http-proxy-agent.d.ts +0 -22
  1279. package/node_modules/undici/types/errors.d.ts +0 -177
  1280. package/node_modules/undici/types/eventsource.d.ts +0 -66
  1281. package/node_modules/undici/types/fetch.d.ts +0 -231
  1282. package/node_modules/undici/types/formdata.d.ts +0 -114
  1283. package/node_modules/undici/types/global-dispatcher.d.ts +0 -9
  1284. package/node_modules/undici/types/global-origin.d.ts +0 -7
  1285. package/node_modules/undici/types/h2c-client.d.ts +0 -73
  1286. package/node_modules/undici/types/handlers.d.ts +0 -14
  1287. package/node_modules/undici/types/header.d.ts +0 -160
  1288. package/node_modules/undici/types/index.d.ts +0 -91
  1289. package/node_modules/undici/types/interceptors.d.ts +0 -80
  1290. package/node_modules/undici/types/mock-agent.d.ts +0 -68
  1291. package/node_modules/undici/types/mock-call-history.d.ts +0 -111
  1292. package/node_modules/undici/types/mock-client.d.ts +0 -27
  1293. package/node_modules/undici/types/mock-errors.d.ts +0 -12
  1294. package/node_modules/undici/types/mock-interceptor.d.ts +0 -94
  1295. package/node_modules/undici/types/mock-pool.d.ts +0 -27
  1296. package/node_modules/undici/types/patch.d.ts +0 -29
  1297. package/node_modules/undici/types/pool-stats.d.ts +0 -19
  1298. package/node_modules/undici/types/pool.d.ts +0 -41
  1299. package/node_modules/undici/types/proxy-agent.d.ts +0 -29
  1300. package/node_modules/undici/types/readable.d.ts +0 -68
  1301. package/node_modules/undici/types/retry-agent.d.ts +0 -8
  1302. package/node_modules/undici/types/retry-handler.d.ts +0 -125
  1303. package/node_modules/undici/types/round-robin-pool.d.ts +0 -41
  1304. package/node_modules/undici/types/snapshot-agent.d.ts +0 -109
  1305. package/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -25
  1306. package/node_modules/undici/types/util.d.ts +0 -18
  1307. package/node_modules/undici/types/utility.d.ts +0 -7
  1308. package/node_modules/undici/types/webidl.d.ts +0 -347
  1309. package/node_modules/undici/types/websocket.d.ts +0 -188
  1310. /package/dist/{registry-bbjH7IHX.js → .setup/registry-bbjH7IHX.mjs} +0 -0
  1311. /package/dist/{slash-commands.runtime-BTTMlmwy.js → .setup/slash-commands.runtime-BTTMlmwy.mjs} +0 -0
  1312. /package/dist/{slash-plugin-commands.runtime-Dosfcx3X.js → .setup/slash-plugin-commands.runtime-Dosfcx3X.mjs} +0 -0
  1313. /package/dist/{slash-skill-commands.runtime-CD1J2ODY.js → .setup/slash-skill-commands.runtime-CD1J2ODY.mjs} +0 -0
  1314. /package/dist/{thread-ts-DUGhaYKq.js → .setup/thread-ts-DUGhaYKq.mjs} +0 -0
  1315. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/LICENSE +0 -0
  1316. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/SocketModeOptions.js +0 -0
  1317. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/SocketModeOptions.js.map +0 -0
  1318. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/UnrecoverableSocketModeStartError.d.ts +0 -0
  1319. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/UnrecoverableSocketModeStartError.d.ts.map +0 -0
  1320. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/UnrecoverableSocketModeStartError.js +0 -0
  1321. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/UnrecoverableSocketModeStartError.js.map +0 -0
  1322. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/logger.d.ts +0 -0
  1323. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/logger.d.ts.map +0 -0
  1324. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/logger.js +0 -0
  1325. /package/node_modules/@slack/{socket-mode → bolt/node_modules/@slack/socket-mode}/dist/src/logger.js.map +0 -0
  1326. /package/node_modules/@slack/{socket-mode/node_modules/@types/node → bolt/node_modules/@types/ws}/LICENSE +0 -0
  1327. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/LICENSE +0 -0
  1328. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/README.md +0 -0
  1329. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -0
  1330. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -0
  1331. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -0
  1332. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -0
  1333. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -0
  1334. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -0
  1335. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/index.d.ts +0 -0
  1336. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/index.js +0 -0
  1337. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/index.mjs +0 -0
  1338. /package/node_modules/@slack/{socket-mode → bolt}/node_modules/eventemitter3/package.json +0 -0
  1339. /package/node_modules/{get-east-asian-width → @slack/web-api/node_modules/is-stream}/license +0 -0
@@ -1,2442 +0,0 @@
1
- import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-CHAeNZOX.js";
2
- import { i as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-N6lHogYZ.js";
3
- import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.js";
4
- import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
5
- import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
- import { normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
7
- import { FormatCapabilityProfile, chunkTextForOutbound, markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
8
- import { createNativeApprovalChannelRouteGates, doesApprovalRequestMatchChannelAccount, resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime";
9
- import { createChannelApprovalAuth, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
10
- import { createChannelExecApprovalProfile, isChannelExecApprovalClientEnabledFromConfig, isChannelExecApprovalTargetRecipient, matchesApprovalRequestFilters } from "openclaw/plugin-sdk/approval-client-runtime";
11
- import { channelRouteTargetsMatchExact, stringifyRouteThreadId } from "openclaw/plugin-sdk/channel-route";
12
- import { normalizeMessagePresentation, reduceLegacyInteractiveReply, renderMessagePresentationChartFallbackText, renderMessagePresentationFallbackText, renderMessagePresentationTableFallbackText, resolveMessagePresentationButtonAction, resolveMessagePresentationOptionAction } from "openclaw/plugin-sdk/interactive-runtime";
13
- import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
14
- import { buildApprovalResolutionRef } from "openclaw/plugin-sdk/approval-reference-runtime";
15
- import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
16
- import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
17
- import { eastAsianWidthType } from "get-east-asian-width";
18
- import { readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
19
- import { compileAllowlist, resolveCompiledAllowlistMatch } from "openclaw/plugin-sdk/allow-from";
20
- import { normalizeHyphenSlug, normalizeStringEntries as normalizeStringEntries$1, normalizeStringEntriesLower as normalizeStringEntriesLower$1 } from "openclaw/plugin-sdk/string-normalization-runtime";
21
- import { resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
22
- //#region extensions/slack/src/exec-approvals.ts
23
- function normalizeSlackUserLikeId(value) {
24
- const upper = value.toUpperCase();
25
- return /^[UW][A-Z0-9]+$/.test(upper) ? upper : void 0;
26
- }
27
- function normalizeSlackApproverId(value) {
28
- const trimmed = normalizeStringifiedOptionalString(value);
29
- if (!trimmed) return;
30
- const prefixed = trimmed.match(/^(?:slack|user):([A-Z0-9]+)$/i);
31
- if (prefixed?.[1]) return normalizeSlackUserLikeId(prefixed[1]);
32
- const mention = trimmed.match(/^<@([A-Z0-9]+)>$/i);
33
- if (mention?.[1]) return normalizeSlackUserLikeId(mention[1]);
34
- return normalizeSlackUserLikeId(trimmed);
35
- }
36
- function resolveSlackOwnerApprovers(cfg) {
37
- const ownerAllowFrom = cfg.commands?.ownerAllowFrom;
38
- if (!Array.isArray(ownerAllowFrom) || ownerAllowFrom.length === 0) return [];
39
- return resolveApprovalApprovers({
40
- explicit: ownerAllowFrom,
41
- normalizeApprover: normalizeSlackApproverId
42
- });
43
- }
44
- function getSlackExecApprovalApprovers(params) {
45
- const account = resolveSlackAccount(params).config;
46
- return resolveApprovalApprovers({
47
- explicit: account.execApprovals?.approvers ?? resolveSlackOwnerApprovers(params.cfg),
48
- normalizeApprover: normalizeSlackApproverId
49
- });
50
- }
51
- function isSlackExecApprovalTargetRecipient(params) {
52
- return isChannelExecApprovalTargetRecipient({
53
- ...params,
54
- channel: "slack",
55
- normalizeSenderId: normalizeSlackApproverId,
56
- matchTarget: ({ target, normalizedSenderId }) => normalizeSlackApproverId(target.to) === normalizedSenderId
57
- });
58
- }
59
- const slackExecApprovalProfile = createChannelExecApprovalProfile({
60
- resolveConfig: (params) => resolveSlackAccount(params).config.execApprovals,
61
- resolveApprovers: getSlackExecApprovalApprovers,
62
- normalizeSenderId: normalizeSlackApproverId,
63
- isTargetRecipient: isSlackExecApprovalTargetRecipient,
64
- matchesRequestAccount: (params) => doesApprovalRequestMatchChannelAccount({
65
- cfg: params.cfg,
66
- request: params.request,
67
- channel: "slack",
68
- accountId: params.accountId
69
- })
70
- });
71
- const isSlackExecApprovalClientEnabled = slackExecApprovalProfile.isClientEnabled;
72
- const isSlackExecApprovalAuthorizedSender = slackExecApprovalProfile.isAuthorizedSender;
73
- const resolveSlackExecApprovalTarget = slackExecApprovalProfile.resolveTarget;
74
- const shouldSuppressLocalSlackExecApprovalPrompt = slackExecApprovalProfile.shouldSuppressLocalPrompt;
75
- //#endregion
76
- //#region extensions/slack/src/approval-auth.ts
77
- const slackApproval = createChannelApprovalAuth({
78
- channelLabel: "Slack",
79
- resolveInputs: ({ cfg, accountId }) => {
80
- const account = resolveSlackAccount({
81
- cfg,
82
- accountId
83
- }).config;
84
- return {
85
- allowFrom: resolveSlackAccountAllowFrom({
86
- cfg,
87
- accountId
88
- }),
89
- defaultTo: account.defaultTo
90
- };
91
- },
92
- normalizeApprover: normalizeSlackApproverId,
93
- normalizeDefaultTo: normalizeSlackApproverId,
94
- isWildcardAuthorized: ({ purpose, senderId, inputs, approvers }) => purpose === "sender" && Boolean(senderId) && approvers.length === 0 && inputs.allowFrom?.some((entry) => String(entry).trim() === "*") === true
95
- });
96
- const getSlackApprovalApprovers = slackApproval.resolveApprovers;
97
- const isSlackApprovalAuthorizedSender = slackApproval.isAuthorizedSender;
98
- //#endregion
99
- //#region extensions/slack/src/approval-native-gates.ts
100
- const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
101
- const SLACK_DM_CHANNEL_ID_RE = /^D[A-Z0-9]{8,}$/i;
102
- const SLACK_USER_ID_RE = /^[UW][A-Z0-9]{8,}$/i;
103
- function resolveSlackApprovalKind(request) {
104
- const isExec = "command" in request.request;
105
- if (isExec === ("title" in request.request && "description" in request.request)) throw new Error("Slack approval request payload does not identify exactly one owner");
106
- return isExec ? "exec" : "plugin";
107
- }
108
- function isSlackApprovalTransportEnabled(params) {
109
- const account = resolveSlackAccount(params);
110
- return account.config.enterpriseOrgInstall !== true && isSlackPluginAccountConfigured(account);
111
- }
112
- function resolveSlackNativeApprovalConfig(params) {
113
- return resolveSlackAccount(params).config.execApprovals;
114
- }
115
- function resolvePluginApprovalForwardingConfig(cfg) {
116
- return cfg.approvals?.plugin;
117
- }
118
- function normalizeSlackThreadMatchKey(threadId) {
119
- return threadId == null ? "" : String(threadId).trim();
120
- }
121
- function normalizeComparableTarget(value) {
122
- return normalizeLowercaseStringOrEmpty(value);
123
- }
124
- function extractSlackSessionKind(sessionKey) {
125
- if (!sessionKey) return null;
126
- const kind = normalizeLowercaseStringOrEmpty(sessionKey.match(/slack:(direct|channel|group):/i)?.[1]);
127
- return kind ? kind : null;
128
- }
129
- function resolveSlackTurnSourceDefaultKind(params) {
130
- if (SLACK_DM_CHANNEL_ID_RE.test(params.turnSourceTo)) return "channel";
131
- return params.sessionKind === "direct" ? "user" : "channel";
132
- }
133
- function resolveTurnSourceSlackOriginTarget(request) {
134
- const turnSourceChannel = normalizeLowercaseStringOrEmpty(request.request.turnSourceChannel);
135
- const turnSourceTo = normalizeOptionalString(request.request.turnSourceTo) ?? "";
136
- if (turnSourceChannel !== "slack" || !turnSourceTo) return null;
137
- const parsed = parseSlackTarget(turnSourceTo, { defaultKind: resolveSlackTurnSourceDefaultKind({
138
- turnSourceTo,
139
- sessionKind: extractSlackSessionKind(request.request.sessionKey ?? void 0)
140
- }) });
141
- if (!parsed) return null;
142
- return {
143
- to: `${parsed.kind}:${parsed.id}`,
144
- threadId: stringifyRouteThreadId(request.request.turnSourceThreadId)
145
- };
146
- }
147
- function resolveSessionSlackOriginTarget(sessionTarget) {
148
- return {
149
- to: sessionTarget.to,
150
- threadId: stringifyRouteThreadId(sessionTarget.threadId)
151
- };
152
- }
153
- function resolveSlackFallbackOriginTarget(request) {
154
- const sessionTarget = resolveApprovalRequestSessionConversation({
155
- request,
156
- channel: "slack",
157
- bundledFallback: false
158
- });
159
- if (!sessionTarget) return null;
160
- const parsed = parseSlackTarget(sessionTarget.id, { defaultKind: "channel" });
161
- if (!parsed) return null;
162
- return {
163
- to: `${parsed.kind}:${canonicalizeSlackApiTargetId(parsed.kind, parsed.id)}`,
164
- threadId: sessionTarget.threadId
165
- };
166
- }
167
- function normalizeSlackOriginTarget(target) {
168
- return {
169
- ...target,
170
- to: normalizeComparableTarget(target.to)
171
- };
172
- }
173
- function parseComparableSlackTarget(target) {
174
- return parseSlackTarget(target.to, { defaultKind: "channel" });
175
- }
176
- function isSlackDmChannelToUserRoutePair(a, b) {
177
- const left = parseComparableSlackTarget(a);
178
- const right = parseComparableSlackTarget(b);
179
- if (!left || !right) return false;
180
- return left.kind === "channel" && SLACK_DM_CHANNEL_ID_RE.test(left.id) && right.kind === "user" || right.kind === "channel" && SLACK_DM_CHANNEL_ID_RE.test(right.id) && left.kind === "user";
181
- }
182
- function slackTargetsMatch(a, b) {
183
- const threadKey = normalizeSlackThreadMatchKey(a.threadId);
184
- if (threadKey !== normalizeSlackThreadMatchKey(b.threadId)) return false;
185
- if (channelRouteTargetsMatchExact({
186
- left: {
187
- channel: "slack",
188
- to: a.to
189
- },
190
- right: {
191
- channel: "slack",
192
- to: b.to
193
- }
194
- })) return true;
195
- return Boolean(threadKey && isSlackDmChannelToUserRoutePair(a, b));
196
- }
197
- function normalizeSlackForwardTarget(target) {
198
- if ((normalizeMessageChannel(target.channel) ?? target.channel) !== "slack") return null;
199
- const to = normalizeOptionalString(target.to);
200
- if (!to) return null;
201
- const parsed = parseSlackTarget(to, { defaultKind: SLACK_USER_ID_RE.test(to) ? "user" : "channel" });
202
- if (!parsed) return null;
203
- return {
204
- to: `${parsed.kind}:${parsed.id}`,
205
- accountId: normalizeOptionalString(target.accountId),
206
- threadId: stringifyRouteThreadId(target.threadId)
207
- };
208
- }
209
- const { canApprovalPotentiallyRouteToChannel: canApprovalPotentiallyRouteToSlack, isSessionApprovalEligible: isForwardedSlackSessionApprovalEligible, isExplicitTargetEligible: isForwardedSlackExplicitTargetEligible } = createNativeApprovalChannelRouteGates({
210
- channel: "slack",
211
- defaultForwardingMode: DEFAULT_APPROVAL_FORWARDING_MODE,
212
- isTransportEnabled: isSlackApprovalTransportEnabled,
213
- listAccountIds: listSlackAccountIds,
214
- resolveDefaultAccountId: resolveDefaultSlackAccountId,
215
- normalizeForwardTarget: normalizeSlackForwardTarget,
216
- resolveTurnSourceTarget: resolveTurnSourceSlackOriginTarget,
217
- targetsMatch: slackTargetsMatch
218
- });
219
- function hasSlackPluginApprovers(params) {
220
- return getSlackApprovalApprovers(params).length > 0;
221
- }
222
- function isSlackPluginNativeApprovalClientConfigEnabled(params) {
223
- return isChannelExecApprovalClientEnabledFromConfig({
224
- enabled: resolveSlackNativeApprovalConfig(params)?.enabled,
225
- approverCount: getSlackApprovalApprovers(params).length
226
- });
227
- }
228
- function isSlackPluginForwardingRoutePotentiallyEnabled(params) {
229
- return canApprovalPotentiallyRouteToSlack({
230
- ...params,
231
- approvalKind: "plugin"
232
- });
233
- }
234
- function isSlackPluginNativeApprovalClientEnabled(params) {
235
- return isSlackPluginNativeApprovalClientConfigEnabled(params) || isSlackPluginForwardingRoutePotentiallyEnabled(params);
236
- }
237
- function shouldHandleSlackPluginViaNativeClientConfig(params) {
238
- if (!doesApprovalRequestMatchChannelAccount({
239
- cfg: params.cfg,
240
- request: params.request,
241
- channel: "slack",
242
- accountId: params.accountId
243
- })) return false;
244
- const config = resolveSlackNativeApprovalConfig(params);
245
- if (!isChannelExecApprovalClientEnabledFromConfig({
246
- enabled: config?.enabled,
247
- approverCount: getSlackApprovalApprovers(params).length
248
- })) return false;
249
- return matchesSlackNativeApprovalFilters({
250
- request: params.request,
251
- agentFilter: config?.agentFilter,
252
- sessionFilter: config?.sessionFilter
253
- });
254
- }
255
- function matchesSlackNativeApprovalFilters(params) {
256
- return matchesApprovalRequestFilters({
257
- request: params.request.request,
258
- agentFilter: params.agentFilter,
259
- sessionFilter: params.sessionFilter
260
- });
261
- }
262
- function isAnyForwardedSlackExplicitTargetEligible(params) {
263
- return (resolvePluginApprovalForwardingConfig(params.cfg)?.targets ?? []).some((target) => isForwardedSlackExplicitTargetEligible({
264
- ...params,
265
- approvalKind: "plugin",
266
- target
267
- }));
268
- }
269
- function shouldHandleSlackPluginViaForwarding(params) {
270
- return isForwardedSlackSessionApprovalEligible({
271
- ...params,
272
- approvalKind: "plugin"
273
- }) || isAnyForwardedSlackExplicitTargetEligible(params);
274
- }
275
- function shouldHandleSlackPluginViaForwardingSession(params) {
276
- return isForwardedSlackSessionApprovalEligible({
277
- ...params,
278
- approvalKind: "plugin"
279
- });
280
- }
281
- function isSlackNativeApprovalClientEnabled(params) {
282
- if (params.approvalKind === "exec") return isSlackExecApprovalClientEnabled(params);
283
- return isSlackPluginNativeApprovalClientEnabled(params);
284
- }
285
- function isSlackAnyNativeApprovalClientEnabled(params) {
286
- return isSlackNativeApprovalClientEnabled({
287
- ...params,
288
- approvalKind: "exec"
289
- }) || isSlackNativeApprovalClientEnabled({
290
- ...params,
291
- approvalKind: "plugin"
292
- });
293
- }
294
- function shouldHandleSlackNativeApprovalRequest(params) {
295
- if ((params.approvalKind ?? resolveSlackApprovalKind(params.request)) === "plugin") return shouldHandleSlackPluginViaNativeClientConfig(params) || shouldHandleSlackPluginViaForwarding(params);
296
- if (!doesApprovalRequestMatchChannelAccount({
297
- cfg: params.cfg,
298
- request: params.request,
299
- channel: "slack",
300
- accountId: params.accountId
301
- })) return false;
302
- const config = resolveSlackNativeApprovalConfig(params);
303
- if (!isChannelExecApprovalClientEnabledFromConfig({
304
- enabled: config?.enabled,
305
- approverCount: getSlackExecApprovalApprovers(params).length
306
- })) return false;
307
- return matchesSlackNativeApprovalFilters({
308
- request: params.request,
309
- agentFilter: config?.agentFilter,
310
- sessionFilter: config?.sessionFilter
311
- });
312
- }
313
- //#endregion
314
- //#region extensions/slack/src/blocks-input.ts
315
- const SLACK_MAX_BLOCKS = 50;
316
- function parseBlocksJson(raw) {
317
- try {
318
- return JSON.parse(raw);
319
- } catch {
320
- throw new Error("blocks must be valid JSON");
321
- }
322
- }
323
- function assertBlocksArray(raw) {
324
- if (!Array.isArray(raw)) throw new Error("blocks must be an array");
325
- if (raw.length === 0) throw new Error("blocks must contain at least one block");
326
- if (raw.length > 50) throw new Error(`blocks cannot exceed 50 items`);
327
- for (const block of raw) {
328
- if (!block || typeof block !== "object" || Array.isArray(block)) throw new Error("each block must be an object");
329
- const type = block.type;
330
- if (typeof type !== "string" || type.trim().length === 0) throw new Error("each block must include a non-empty string type");
331
- }
332
- }
333
- function validateSlackBlocksArray(raw) {
334
- assertBlocksArray(raw);
335
- return raw;
336
- }
337
- function parseSlackBlocksInput(raw) {
338
- if (raw == null) return;
339
- return validateSlackBlocksArray(typeof raw === "string" ? parseBlocksJson(raw) : raw);
340
- }
341
- const SLACK_BUTTON_VALUE_MAX = 2e3;
342
- const SLACK_SECTION_TEXT_MAX = 3e3;
343
- const SLACK_PRESENTATION_CAPABILITIES = {
344
- supported: true,
345
- buttons: true,
346
- selects: true,
347
- context: true,
348
- divider: true,
349
- charts: true,
350
- tables: true,
351
- limits: {
352
- actions: {
353
- maxActionsPerRow: 25,
354
- maxValueBytes: SLACK_BUTTON_VALUE_MAX,
355
- supportsStyles: true
356
- },
357
- selects: {
358
- maxOptions: 100,
359
- maxValueBytes: 150
360
- },
361
- text: {
362
- encoding: "characters",
363
- markdownDialect: "slack-mrkdwn",
364
- supportsEdit: true
365
- }
366
- }
367
- };
368
- //#endregion
369
- //#region extensions/slack/src/approval-actions.ts
370
- const SLACK_APPROVAL_VALUE_PREFIX = "openclaw:approval:v1:";
371
- function isApprovalDecision(value) {
372
- return value === "allow-once" || value === "allow-always" || value === "deny";
373
- }
374
- /** Encode portable approval facts without exposing a slash command to Slack callbacks. */
375
- function encodeSlackApprovalAction(action) {
376
- const encode = (approvalId) => `${SLACK_APPROVAL_VALUE_PREFIX}${JSON.stringify({
377
- approvalId,
378
- approvalKind: action.approvalKind,
379
- decision: action.decision
380
- })}`;
381
- const exact = encode(action.approvalId);
382
- return exact.length <= 2e3 ? exact : encode(buildApprovalResolutionRef({
383
- approvalId: action.approvalId,
384
- approvalKind: action.approvalKind
385
- }));
386
- }
387
- /** Decode only the exact Slack-owned approval envelope. Malformed callbacks fail closed. */
388
- function decodeSlackApprovalAction(value) {
389
- if (typeof value !== "string" || !value.startsWith(SLACK_APPROVAL_VALUE_PREFIX)) return null;
390
- try {
391
- const decoded = JSON.parse(value.slice(21));
392
- if (!decoded || typeof decoded !== "object" || Array.isArray(decoded)) return null;
393
- const record = decoded;
394
- if (Object.keys(record).length !== 3 || typeof record.approvalId !== "string" || record.approvalId.length === 0 || record.approvalKind !== "exec" && record.approvalKind !== "plugin" || !isApprovalDecision(record.decision)) return null;
395
- return {
396
- type: "approval",
397
- approvalId: record.approvalId,
398
- approvalKind: record.approvalKind,
399
- decision: record.decision
400
- };
401
- } catch {
402
- return null;
403
- }
404
- }
405
- //#endregion
406
- //#region extensions/slack/src/monitor/mrkdwn.ts
407
- function escapeSlackMrkdwn(value) {
408
- return value.replaceAll("\\", "\\\\").replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replace(/([*_`~])/g, "\\$1");
409
- }
410
- //#endregion
411
- //#region extensions/slack/src/presentation-fallback.ts
412
- const SLACK_UNCOPYABLE_COMMAND_WARNING = "not copyable: contains backtick";
413
- function resolveSlackCommandFallback(command) {
414
- if (!command.includes("`")) return { command };
415
- return {
416
- command: command.replaceAll("`", "[backtick]"),
417
- warning: SLACK_UNCOPYABLE_COMMAND_WARNING
418
- };
419
- }
420
- function escapeSlackPresentationChartBlock(block) {
421
- if (block.chartType === "pie") return {
422
- ...block,
423
- title: escapeSlackMrkdwn(block.title),
424
- segments: block.segments.map((segment) => ({
425
- ...segment,
426
- label: escapeSlackMrkdwn(segment.label)
427
- }))
428
- };
429
- return {
430
- ...block,
431
- title: escapeSlackMrkdwn(block.title),
432
- categories: block.categories.map(escapeSlackMrkdwn),
433
- series: block.series.map((series) => ({
434
- ...series,
435
- name: escapeSlackMrkdwn(series.name)
436
- })),
437
- ...block.xLabel ? { xLabel: escapeSlackMrkdwn(block.xLabel) } : {},
438
- ...block.yLabel ? { yLabel: escapeSlackMrkdwn(block.yLabel) } : {}
439
- };
440
- }
441
- function escapeSlackPresentationTableBlock(block) {
442
- return {
443
- ...block,
444
- caption: escapeSlackMrkdwn(block.caption),
445
- headers: block.headers.map(escapeSlackMrkdwn),
446
- rows: block.rows.map((row) => row.map((cell) => typeof cell === "string" ? escapeSlackMrkdwn(cell) : cell))
447
- };
448
- }
449
- function escapeSlackPresentationFallbackBlock(block) {
450
- if (block.type === "chart") return escapeSlackPresentationChartBlock(block);
451
- if (block.type === "table") return escapeSlackPresentationTableBlock(block);
452
- if (block.type === "buttons") return {
453
- ...block,
454
- buttons: block.buttons.map((button) => {
455
- const commandFallback = button.action?.type === "command" ? resolveSlackCommandFallback(button.action.command) : void 0;
456
- const label = commandFallback?.warning ? `${button.label} [${commandFallback.warning}]` : button.label;
457
- return {
458
- ...button,
459
- label: escapeSlackMrkdwn(label),
460
- ...button.value ? { value: escapeSlackMrkdwn(button.value) } : {},
461
- ...button.url ? { url: escapeSlackMrkdwn(button.url) } : {},
462
- ...button.webApp ? { webApp: { url: escapeSlackMrkdwn(button.webApp.url) } } : {},
463
- ...button.web_app ? { web_app: { url: escapeSlackMrkdwn(button.web_app.url) } } : {},
464
- ...button.action?.type === "command" && commandFallback ? { action: {
465
- ...button.action,
466
- command: commandFallback.command
467
- } } : {}
468
- };
469
- })
470
- };
471
- if (block.type === "select") return {
472
- ...block,
473
- ...block.placeholder ? { placeholder: escapeSlackMrkdwn(block.placeholder) } : {},
474
- options: block.options.map((option) => ({
475
- ...option,
476
- label: escapeSlackMrkdwn(option.label)
477
- }))
478
- };
479
- return block;
480
- }
481
- function renderSlackMessagePresentationChartFallbackText(block) {
482
- return renderMessagePresentationChartFallbackText(escapeSlackPresentationChartBlock(block));
483
- }
484
- function renderSlackMessagePresentationTableFallbackText(block) {
485
- return renderMessagePresentationTableFallbackText(escapeSlackPresentationTableBlock(block));
486
- }
487
- function renderSlackMessagePresentationFallbackText(params) {
488
- if (!params.presentation) return renderMessagePresentationFallbackText(params);
489
- const presentation = {
490
- ...params.presentation,
491
- ...params.presentation.title ? { title: escapeSlackMrkdwn(params.presentation.title) } : {},
492
- blocks: params.presentation.blocks.map(escapeSlackPresentationFallbackBlock)
493
- };
494
- return renderMessagePresentationFallbackText({
495
- ...params,
496
- presentation
497
- });
498
- }
499
- //#endregion
500
- //#region extensions/slack/src/data-table.ts
501
- const SLACK_DATA_TABLE_COLUMNS_MAX = 20;
502
- const SLACK_DATA_TABLE_ROWS_MAX = 100;
503
- function asRecord$3(value) {
504
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
505
- }
506
- function readNonEmptyString$1(value) {
507
- return typeof value === "string" && value.trim().length > 0 ? value : void 0;
508
- }
509
- function countCharacters(value) {
510
- return Array.from(value).length;
511
- }
512
- function readRichTextLeaf(record) {
513
- if (record.type === "text" && typeof record.text === "string") return record.text;
514
- const text = readNonEmptyString$1(record.text);
515
- if (text) return text;
516
- switch (record.type) {
517
- case "link": return readNonEmptyString$1(record.url) ?? "";
518
- case "user": {
519
- const userId = readNonEmptyString$1(record.user_id);
520
- return userId ? `<@${userId}>` : "";
521
- }
522
- case "channel": {
523
- const channelId = readNonEmptyString$1(record.channel_id);
524
- return channelId ? `<#${channelId}>` : "";
525
- }
526
- case "usergroup": {
527
- const usergroupId = readNonEmptyString$1(record.usergroup_id);
528
- return usergroupId ? `<!subteam^${usergroupId}>` : "";
529
- }
530
- case "broadcast": {
531
- const range = readNonEmptyString$1(record.range);
532
- return range ? `<!${range}>` : "";
533
- }
534
- case "emoji": {
535
- const name = readNonEmptyString$1(record.name);
536
- return name ? `:${name}:` : "";
537
- }
538
- case "date": return readNonEmptyString$1(record.fallback) ?? "";
539
- default: return "";
540
- }
541
- }
542
- function readRichTextElements(value, separator = "") {
543
- if (!Array.isArray(value)) return "";
544
- const parts = [];
545
- for (const rawElement of value) {
546
- const element = asRecord$3(rawElement);
547
- if (!element) continue;
548
- if (Array.isArray(element.elements)) {
549
- const rendered = readRichTextElements(element.elements, element.type === "rich_text_list" ? "\n" : "");
550
- if (rendered) parts.push(rendered);
551
- continue;
552
- }
553
- const rendered = readRichTextLeaf(element);
554
- if (rendered) parts.push(rendered);
555
- }
556
- return parts.join(separator);
557
- }
558
- function readSlackBasicTableCell(value) {
559
- const cell = asRecord$3(value);
560
- if (!cell) return "";
561
- if (cell.type === "raw_text") return typeof cell.text === "string" ? cell.text : "";
562
- if (cell.type === "raw_number") {
563
- if (typeof cell.text === "string" && cell.text.length > 0) return cell.text;
564
- if (typeof cell.value === "number" && Number.isFinite(cell.value)) return String(cell.value);
565
- return typeof cell.value === "string" ? cell.value : "";
566
- }
567
- return cell.type === "rich_text" ? readRichTextElements(cell.elements, "\n") : "";
568
- }
569
- function parseSlackBasicTableRows(value) {
570
- const block = asRecord$3(value);
571
- if (block?.type !== "table" || !Array.isArray(block.rows)) return;
572
- if (block.rows.length < 1 || block.rows.length > SLACK_DATA_TABLE_ROWS_MAX) return;
573
- let characterCount = 0;
574
- const rows = [];
575
- for (const rawRow of block.rows) {
576
- if (!Array.isArray(rawRow) || rawRow.length < 1 || rawRow.length > SLACK_DATA_TABLE_COLUMNS_MAX) return;
577
- const row = rawRow.map(readSlackBasicTableCell);
578
- characterCount += row.reduce((total, cell) => total + countCharacters(cell), 0);
579
- if (characterCount > 1e4) return;
580
- rows.push(row);
581
- }
582
- return rows.some((row) => row.some((cell) => cell.length > 0)) ? rows : void 0;
583
- }
584
- function readSlackDataTableCell(value, allowRichText) {
585
- const cell = asRecord$3(value);
586
- if (!cell) return;
587
- if (cell.type === "raw_text") return readNonEmptyString$1(cell.text);
588
- if (cell.type === "raw_number") return typeof cell.value === "number" && Number.isFinite(cell.value) ? readNonEmptyString$1(cell.text) : void 0;
589
- if (allowRichText && cell.type === "rich_text") return readNonEmptyString$1(readRichTextElements(cell.elements));
590
- }
591
- function parseSlackDataTable(value, options = {}) {
592
- const block = asRecord$3(value);
593
- const caption = readNonEmptyString$1(block?.caption);
594
- if (block?.type !== "data_table" || !caption || !Array.isArray(block.rows)) return;
595
- if (block.rows.length < 2) return;
596
- const rawHeader = block.rows[0];
597
- if (!Array.isArray(rawHeader) || rawHeader.length < 1) return;
598
- const headers = rawHeader.map((cell) => readSlackDataTableCell(cell, false));
599
- if (!headers.every((header) => Boolean(header))) return;
600
- const rows = block.rows.slice(1).map((rawRow) => {
601
- if (!Array.isArray(rawRow) || rawRow.length !== headers.length) return;
602
- const cells = rawRow.map((cell) => readSlackDataTableCell(cell, true));
603
- return cells.every((cell) => Boolean(cell)) ? cells : void 0;
604
- });
605
- if (!rows.every((row) => Boolean(row))) return;
606
- const cellCharacterCount = [...headers, ...rows.flat()].reduce((total, cell) => total + countCharacters(cell), 0);
607
- if (options.enforceNativeLimits && (block.rows.length > 101 || headers.length > SLACK_DATA_TABLE_COLUMNS_MAX || cellCharacterCount > 1e4)) return;
608
- return {
609
- caption,
610
- headers,
611
- rows,
612
- cellCharacterCount
613
- };
614
- }
615
- /** Detect current native table blocks without depending on unreleased Slack SDK types. */
616
- function hasSlackDataTableBlock(blocks) {
617
- return blocks?.some((block) => asRecord$3(block)?.type === "data_table") ?? false;
618
- }
619
- function countSlackDataTableCellCharacters(value) {
620
- return parseSlackDataTable(value, { enforceNativeLimits: true })?.cellCharacterCount;
621
- }
622
- /** Count the aggregate native-table cell characters already present in a message. */
623
- function countSlackDataTableBlocksCellCharacters(blocks) {
624
- let total = 0;
625
- for (const block of blocks ?? []) {
626
- if (!hasSlackDataTableBlock([block])) continue;
627
- const cellCharacterCount = countSlackDataTableCellCharacters(block);
628
- if (cellCharacterCount === void 0) return;
629
- total += cellCharacterCount;
630
- }
631
- return total;
632
- }
633
- function resolvePortableTableCellCharacterCount(block) {
634
- if (typeof block.caption !== "string" || block.caption.trim().length === 0 || !Array.isArray(block.headers) || block.headers.length < 1 || block.headers.length > SLACK_DATA_TABLE_COLUMNS_MAX || !Array.isArray(block.rows) || block.rows.length < 1 || block.rows.length > SLACK_DATA_TABLE_ROWS_MAX || new Set(block.headers).size !== block.headers.length || !block.headers.every((header) => typeof header === "string" && header.trim().length > 0) || block.rowHeaderColumnIndex !== void 0 && (!Number.isInteger(block.rowHeaderColumnIndex) || block.rowHeaderColumnIndex < 0 || block.rowHeaderColumnIndex >= block.headers.length)) return;
635
- const values = [...block.headers];
636
- for (const row of block.rows) {
637
- if (!Array.isArray(row) || row.length !== block.headers.length) return;
638
- for (const cell of row) {
639
- if (typeof cell === "number") {
640
- if (!Number.isFinite(cell)) return;
641
- values.push(String(cell));
642
- continue;
643
- }
644
- if (typeof cell !== "string" || cell.trim().length === 0) return;
645
- values.push(cell);
646
- }
647
- }
648
- return values.reduce((total, value) => total + countCharacters(value), 0);
649
- }
650
- /** True when a portable table fits Slack's per-table and per-message contracts. */
651
- function canRenderSlackDataTable(block, options = {}) {
652
- const cellCharacterCountOffset = options.cellCharacterCountOffset ?? 0;
653
- if (!Number.isSafeInteger(cellCharacterCountOffset) || cellCharacterCountOffset < 0) return false;
654
- const cellCharacterCount = resolvePortableTableCellCharacterCount(block);
655
- return cellCharacterCount !== void 0 && cellCharacterCountOffset + cellCharacterCount <= 1e4;
656
- }
657
- /** Map a validated portable table to Slack's current app-facing Block Kit shape. */
658
- function buildSlackDataTableBlock(block, options = {}) {
659
- if (!canRenderSlackDataTable(block, options)) return;
660
- const header = block.headers.map((text) => ({
661
- type: "raw_text",
662
- text
663
- }));
664
- const rows = block.rows.map((row) => row.map((cell) => typeof cell === "number" ? {
665
- type: "raw_number",
666
- value: cell,
667
- text: String(cell)
668
- } : {
669
- type: "raw_text",
670
- text: cell
671
- }));
672
- return {
673
- type: "data_table",
674
- caption: block.caption,
675
- rows: [header, ...rows],
676
- ...block.rowHeaderColumnIndex !== void 0 ? { row_header_column_index: block.rowHeaderColumnIndex } : {}
677
- };
678
- }
679
- /** Extract a deterministic accessible summary from a native Slack table block. */
680
- function renderSlackDataTableFallbackText(value) {
681
- const block = asRecord$3(value);
682
- if (block?.type !== "data_table") return;
683
- const parsed = parseSlackDataTable(block);
684
- if (parsed) return renderMessagePresentationTableFallbackText({
685
- type: "table",
686
- caption: parsed.caption,
687
- headers: parsed.headers,
688
- rows: parsed.rows
689
- });
690
- return readNonEmptyString$1(block.caption)?.trim();
691
- }
692
- function escapeCompactFallbackCell(value) {
693
- return value.replaceAll("\\", "\\\\").replaceAll(" ", "\\t").replaceAll("\r", "\\r").replaceAll("\n", "\\n");
694
- }
695
- function escapeSlackBasicTableCell(value, mrkdwnSafe) {
696
- return (mrkdwnSafe ? escapeSlackMrkdwn(value) : value.replaceAll("\\", "\\\\")).replaceAll(" ", "\\t").replaceAll("\r", "\\r").replaceAll("\n", "\\n");
697
- }
698
- function renderSlackBasicTableRows(value, mrkdwnSafe) {
699
- return parseSlackBasicTableRows(value)?.map((row) => row.map((cell) => escapeSlackBasicTableCell(cell, mrkdwnSafe)).join(" ")).join("\n");
700
- }
701
- /** Render Slack's inbound `table` block as ordered, delimiter-safe TSV. */
702
- function renderSlackTableFallbackText(value) {
703
- return renderSlackBasicTableRows(value, false);
704
- }
705
- /** Render Slack's inbound `table` block without activating mrkdwn control tokens. */
706
- function renderSlackTableMrkdwnFallbackText(value) {
707
- return renderSlackBasicTableRows(value, true);
708
- }
709
- /** Render each native table cell once for bounded, formatting-disabled delivery. */
710
- function renderSlackDataTableCompactPlainTextFallback(value) {
711
- const block = asRecord$3(value);
712
- if (block?.type !== "data_table") return;
713
- const parsed = parseSlackDataTable(block);
714
- if (!parsed) return readNonEmptyString$1(block.caption)?.trim();
715
- return [
716
- `${escapeCompactFallbackCell(parsed.caption)} (table)`,
717
- parsed.headers.map(escapeCompactFallbackCell).join(" "),
718
- ...parsed.rows.map((row) => row.map(escapeCompactFallbackCell).join(" "))
719
- ].join("\n");
720
- }
721
- /** Render a native table as mrkdwn without activating raw cell control tokens. */
722
- function renderSlackDataTableMrkdwnFallbackText(value) {
723
- const block = asRecord$3(value);
724
- if (block?.type !== "data_table") return;
725
- const parsed = parseSlackDataTable(block);
726
- if (parsed) return renderSlackMessagePresentationTableFallbackText({
727
- type: "table",
728
- caption: parsed.caption,
729
- headers: parsed.headers,
730
- rows: parsed.rows
731
- });
732
- const caption = readNonEmptyString$1(block.caption)?.trim();
733
- return caption ? escapeSlackMrkdwn(caption) : void 0;
734
- }
735
- //#endregion
736
- //#region extensions/slack/src/data-visualization.ts
737
- const SLACK_CHART_TITLE_MAX = 50;
738
- const SLACK_CHART_LABEL_MAX = 20;
739
- const SLACK_CHART_AXIS_LABEL_MAX = 50;
740
- const SLACK_CHART_SERIES_MAX = 12;
741
- const SLACK_CHART_DATA_POINTS_MAX = 20;
742
- function asRecord$2(value) {
743
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
744
- }
745
- /** Detect native chart blocks without depending on unreleased Slack SDK types. */
746
- function hasSlackDataVisualizationBlock(blocks) {
747
- return blocks?.some((block) => asRecord$2(block)?.type === "data_visualization") ?? false;
748
- }
749
- function isStringWithin(value, maxLength) {
750
- return typeof value === "string" && value.trim().length > 0 && Array.from(value).length <= maxLength;
751
- }
752
- function hasUniqueStrings(values) {
753
- return new Set(values).size === values.length;
754
- }
755
- /** True when a portable chart satisfies Slack's complete native-block contract. */
756
- function canRenderSlackDataVisualization(block) {
757
- if (!isStringWithin(block.title, SLACK_CHART_TITLE_MAX)) return false;
758
- if (block.chartType === "pie") return block.segments.length >= 1 && block.segments.length <= SLACK_CHART_SERIES_MAX && block.segments.every((segment) => isStringWithin(segment.label, SLACK_CHART_LABEL_MAX) && Number.isFinite(segment.value) && segment.value > 0);
759
- if (block.categories.length < 1 || block.categories.length > SLACK_CHART_DATA_POINTS_MAX || !block.categories.every((category) => isStringWithin(category, SLACK_CHART_LABEL_MAX)) || !hasUniqueStrings(block.categories) || block.series.length < 1 || block.series.length > SLACK_CHART_SERIES_MAX || !hasUniqueStrings(block.series.map((series) => series.name)) || block.xLabel !== void 0 && !isStringWithin(block.xLabel, SLACK_CHART_AXIS_LABEL_MAX) || block.yLabel !== void 0 && !isStringWithin(block.yLabel, SLACK_CHART_AXIS_LABEL_MAX)) return false;
760
- return block.series.every((series) => isStringWithin(series.name, SLACK_CHART_LABEL_MAX) && series.values.length === block.categories.length && series.values.every((value) => Number.isFinite(value)));
761
- }
762
- /** Map a validated portable chart to Slack's app-facing Block Kit shape. */
763
- function buildSlackDataVisualizationBlock(block) {
764
- if (!canRenderSlackDataVisualization(block)) return;
765
- if (block.chartType === "pie") return {
766
- type: "data_visualization",
767
- title: block.title,
768
- chart: {
769
- type: "pie",
770
- segments: block.segments.map((segment) => ({ ...segment }))
771
- }
772
- };
773
- return {
774
- type: "data_visualization",
775
- title: block.title,
776
- chart: {
777
- type: block.chartType,
778
- series: block.series.map((series) => ({
779
- name: series.name,
780
- data: block.categories.map((label, index) => ({
781
- label,
782
- value: series.values[index]
783
- }))
784
- })),
785
- axis_config: {
786
- categories: [...block.categories],
787
- ...block.xLabel ? { x_label: block.xLabel } : {},
788
- ...block.yLabel ? { y_label: block.yLabel } : {}
789
- }
790
- }
791
- };
792
- }
793
- function readSlackChartDatum(value) {
794
- const record = asRecord$2(value);
795
- const label = record?.label;
796
- const datumValue = record?.value;
797
- return typeof label === "string" && typeof datumValue === "number" ? {
798
- label,
799
- value: datumValue
800
- } : void 0;
801
- }
802
- function parseSlackDataVisualizationBlock(value) {
803
- const block = asRecord$2(value);
804
- const title = block?.title;
805
- const chart = asRecord$2(block?.chart);
806
- if (block?.type !== "data_visualization" || typeof title !== "string" || !chart) return;
807
- if (chart.type === "pie") {
808
- if (!Array.isArray(chart.segments)) return;
809
- const segments = chart.segments.map(readSlackChartDatum);
810
- if (segments.some((segment) => !segment)) return;
811
- const normalizedBlock = normalizeMessagePresentation({ blocks: [{
812
- type: "chart",
813
- chartType: "pie",
814
- title,
815
- segments
816
- }] })?.blocks[0];
817
- return normalizedBlock?.type === "chart" ? normalizedBlock : void 0;
818
- }
819
- if (chart.type !== "bar" && chart.type !== "area" && chart.type !== "line") return;
820
- const axisConfig = asRecord$2(chart.axis_config);
821
- const categories = axisConfig?.categories;
822
- if (!Array.isArray(categories) || !categories.every((category) => typeof category === "string")) return;
823
- if (!Array.isArray(chart.series)) return;
824
- const series = chart.series.map((rawSeries) => {
825
- const seriesRecord = asRecord$2(rawSeries);
826
- if (typeof seriesRecord?.name !== "string" || !Array.isArray(seriesRecord.data)) return;
827
- const data = seriesRecord.data.map(readSlackChartDatum);
828
- if (data.some((datum) => !datum) || data.length !== categories.length) return;
829
- const dataByLabel = new Map(data.map((datum) => [datum.label, datum.value]));
830
- if (dataByLabel.size !== data.length || categories.some((category) => !dataByLabel.has(category))) return;
831
- return {
832
- name: seriesRecord.name,
833
- values: categories.map((category) => dataByLabel.get(category))
834
- };
835
- });
836
- if (series.some((entry) => !entry)) return;
837
- const normalizedBlock = normalizeMessagePresentation({ blocks: [{
838
- type: "chart",
839
- chartType: chart.type,
840
- title,
841
- categories,
842
- series,
843
- xLabel: axisConfig?.x_label,
844
- yLabel: axisConfig?.y_label
845
- }] })?.blocks[0];
846
- return normalizedBlock?.type === "chart" ? normalizedBlock : void 0;
847
- }
848
- /** Extract a deterministic accessible summary from a native Slack chart block. */
849
- function renderSlackDataVisualizationFallbackText(value) {
850
- const block = asRecord$2(value);
851
- if (block?.type !== "data_visualization") return;
852
- const parsed = parseSlackDataVisualizationBlock(block);
853
- if (parsed) return renderMessagePresentationChartFallbackText(parsed);
854
- return typeof block.title === "string" && block.title.trim() ? block.title.trim() : void 0;
855
- }
856
- /** Render a native chart as mrkdwn without activating raw data control tokens. */
857
- function renderSlackDataVisualizationMrkdwnFallbackText(value) {
858
- const block = asRecord$2(value);
859
- if (block?.type !== "data_visualization") return;
860
- const parsed = parseSlackDataVisualizationBlock(block);
861
- if (parsed) return renderSlackMessagePresentationChartFallbackText(parsed);
862
- return typeof block.title === "string" && block.title.trim() ? escapeSlackMrkdwn(block.title.trim()) : void 0;
863
- }
864
- //#endregion
865
- //#region extensions/slack/src/question-actions.ts
866
- const SLACK_QUESTION_VALUE_PREFIX = "slq1:";
867
- const QUESTION_RECORD_ID_PATTERN = /^ask_[a-f0-9]{32}$/u;
868
- function encodeSlackQuestionAction(action) {
869
- if (!QUESTION_RECORD_ID_PATTERN.test(action.questionId) || !Number.isInteger(action.optionIndex) || action.optionIndex < 0 || action.optionIndex > 3) return;
870
- const value = `${SLACK_QUESTION_VALUE_PREFIX}${action.questionId}:${action.optionIndex}`;
871
- return value.length <= 2e3 ? value : void 0;
872
- }
873
- function decodeSlackQuestionAction(value) {
874
- if (typeof value !== "string" || value.length > 2e3) return null;
875
- const match = /^slq1:(ask_[a-f0-9]{32}):([0-3])$/u.exec(value);
876
- return match?.[1] && match[2] ? {
877
- questionId: match[1],
878
- optionIndex: Number(match[2])
879
- } : null;
880
- }
881
- async function resolveSlackQuestionAction(params) {
882
- let result;
883
- try {
884
- result = await (params.resolveQuestion ?? questionGatewayRuntime.resolveOption)({
885
- cfg: params.cfg,
886
- questionId: params.action.questionId,
887
- optionIndex: params.action.optionIndex,
888
- senderId: params.userId,
889
- clientDisplayName: `Slack question (${params.accountId})`
890
- });
891
- } catch {
892
- await params.respond("Could not submit this answer.").catch(() => {});
893
- return;
894
- }
895
- await params.respond(result.status === "answered" ? "Answer submitted." : "This question was already answered.").catch(() => {});
896
- }
897
- //#endregion
898
- //#region extensions/slack/src/reply-action-ids.ts
899
- const SLACK_REPLY_BUTTON_ACTION_ID = "openclaw:reply_button";
900
- const SLACK_REPLY_LINK_ACTION_ID = "openclaw:reply_link";
901
- const SLACK_REPLY_SELECT_ACTION_ID = "openclaw:reply_select";
902
- const SLACK_CALLBACK_BUTTON_ACTION_ID = "openclaw:callback_button";
903
- const SLACK_CALLBACK_SELECT_ACTION_ID = "openclaw:callback_select";
904
- const SLACK_APPROVAL_BUTTON_ACTION_ID = "openclaw:approval_button";
905
- const SLACK_APPROVAL_SELECT_ACTION_ID = "openclaw:approval_select";
906
- const SLACK_QUESTION_BUTTON_ACTION_ID = "openclaw:question_button";
907
- function isSlackQuestionActionId(actionId) {
908
- return actionId === "openclaw:question_button" || actionId.startsWith(`openclaw:question_button:`);
909
- }
910
- function isSlackApprovalActionId(actionId) {
911
- return actionId === "openclaw:approval_button" || actionId === "openclaw:approval_select" || actionId.startsWith(`openclaw:approval_button:`) || actionId.startsWith(`openclaw:approval_select:`);
912
- }
913
- function isSlackCallbackActionId(actionId) {
914
- return actionId === "openclaw:callback_button" || actionId === "openclaw:callback_select" || actionId.startsWith(`openclaw:callback_button:`) || actionId.startsWith(`openclaw:callback_select:`);
915
- }
916
- //#endregion
917
- //#region extensions/slack/src/truncate.ts
918
- function truncateSlackText(value, max) {
919
- const trimmed = value.trim();
920
- if (trimmed.length <= max) return trimmed;
921
- if (max <= 1) return sliceUtf16Safe(trimmed, 0, max);
922
- return `${sliceUtf16Safe(trimmed, 0, max - 1)}…`;
923
- }
924
- function countSlackTextUtf8Bytes(value) {
925
- return Buffer.byteLength(value, "utf8");
926
- }
927
- /** Truncate Slack text without splitting a code point or exceeding a UTF-8 byte limit. */
928
- function truncateSlackTextByUtf8Bytes(value, maxBytes) {
929
- const trimmed = value.trim();
930
- if (maxBytes <= 0) return "";
931
- if (countSlackTextUtf8Bytes(trimmed) <= maxBytes) return trimmed;
932
- const suffix = "…";
933
- const suffixBytes = countSlackTextUtf8Bytes(suffix);
934
- const prefixBudget = maxBytes >= suffixBytes ? maxBytes - suffixBytes : maxBytes;
935
- let prefix = "";
936
- let prefixBytes = 0;
937
- for (const character of trimmed) {
938
- const characterBytes = countSlackTextUtf8Bytes(character);
939
- if (prefixBytes + characterBytes > prefixBudget) break;
940
- prefix += character;
941
- prefixBytes += characterBytes;
942
- }
943
- return maxBytes >= suffixBytes ? `${prefix}${suffix}` : prefix;
944
- }
945
- //#endregion
946
- //#region extensions/slack/src/blocks-render.ts
947
- const SLACK_BUTTON_URL_MAX = 3e3;
948
- function buildSlackReplyButtonActionId(buttonIndex, choiceIndex) {
949
- return `${SLACK_REPLY_BUTTON_ACTION_ID}:${String(buttonIndex)}:${String(choiceIndex + 1)}`;
950
- }
951
- function buildSlackReplyLinkActionId(buttonIndex, choiceIndex) {
952
- return `${SLACK_REPLY_LINK_ACTION_ID}:${String(buttonIndex)}:${String(choiceIndex + 1)}`;
953
- }
954
- function buildSlackReplySelectActionId(selectIndex) {
955
- return `${SLACK_REPLY_SELECT_ACTION_ID}:${String(selectIndex)}`;
956
- }
957
- function buildSlackApprovalButtonActionId(buttonIndex, choiceIndex) {
958
- return `${SLACK_APPROVAL_BUTTON_ACTION_ID}:${String(buttonIndex)}:${String(choiceIndex + 1)}`;
959
- }
960
- function buildSlackApprovalSelectActionId(selectIndex) {
961
- return `${SLACK_APPROVAL_SELECT_ACTION_ID}:${String(selectIndex)}`;
962
- }
963
- function buildSlackCallbackButtonActionId(buttonIndex, choiceIndex) {
964
- return `${SLACK_CALLBACK_BUTTON_ACTION_ID}:${String(buttonIndex)}:${String(choiceIndex + 1)}`;
965
- }
966
- function buildSlackCallbackSelectActionId(selectIndex) {
967
- return `${SLACK_CALLBACK_SELECT_ACTION_ID}:${String(selectIndex)}`;
968
- }
969
- function buildSlackQuestionButtonActionId(buttonIndex, choiceIndex) {
970
- return `${SLACK_QUESTION_BUTTON_ACTION_ID}:${String(buttonIndex)}:${String(choiceIndex + 1)}`;
971
- }
972
- function resolveSlackButtonStyle(style) {
973
- if (style === "primary" || style === "danger") return style;
974
- if (style === "success") return "primary";
975
- }
976
- function resolveSlackActionTarget(action, optionIndex) {
977
- if (!action) return;
978
- if (action.type === "approval") return {
979
- kind: "approval",
980
- value: encodeSlackApprovalAction(action)
981
- };
982
- if (action.type === "question") {
983
- const value = optionIndex === void 0 ? void 0 : encodeSlackQuestionAction({
984
- questionId: action.questionId,
985
- optionIndex
986
- });
987
- return value ? {
988
- kind: "question",
989
- value
990
- } : void 0;
991
- }
992
- if (action.type === "url" || action.type === "web-app") {
993
- const url = normalizeOptionalString(action.url);
994
- return url ? {
995
- kind: "link",
996
- url
997
- } : void 0;
998
- }
999
- if (action.type === "callback") {
1000
- const value = normalizeOptionalString(action.value);
1001
- return value ? {
1002
- kind: "callback",
1003
- value
1004
- } : void 0;
1005
- }
1006
- const command = normalizeOptionalString(action.command);
1007
- return command && parseExecApprovalCommandText(command) ? {
1008
- kind: "reply",
1009
- value: command
1010
- } : void 0;
1011
- }
1012
- function resolveSlackButtonTarget(button, optionIndex) {
1013
- if (button.action !== void 0) {
1014
- const action = resolveMessagePresentationButtonAction(button);
1015
- return action ? resolveSlackActionTarget(action, optionIndex) : void 0;
1016
- }
1017
- const legacyUrl = normalizeOptionalString(button.url ?? button.webApp?.url ?? button.web_app?.url);
1018
- if (legacyUrl && isWithinSlackLimit(legacyUrl, SLACK_BUTTON_URL_MAX)) return {
1019
- kind: "link",
1020
- url: legacyUrl
1021
- };
1022
- const legacyValue = normalizeOptionalString(button.value);
1023
- if (legacyValue) return {
1024
- kind: "reply",
1025
- value: legacyValue
1026
- };
1027
- return legacyUrl ? {
1028
- kind: "link",
1029
- url: legacyUrl
1030
- } : void 0;
1031
- }
1032
- function resolveSlackOptionTarget(option) {
1033
- if (option.action !== void 0) {
1034
- const action = resolveMessagePresentationOptionAction(option);
1035
- const target = action ? resolveSlackActionTarget(action) : void 0;
1036
- return target?.kind === "link" || target?.kind === "question" ? void 0 : target;
1037
- }
1038
- const value = normalizeOptionalString(option.value);
1039
- return value ? {
1040
- kind: "reply",
1041
- value
1042
- } : void 0;
1043
- }
1044
- function isWithinSlackLimit(value, maxLength) {
1045
- return value.length <= maxLength;
1046
- }
1047
- function isRenderableSlackOption(option) {
1048
- return isWithinSlackLimit(option.value, 150);
1049
- }
1050
- function readSlackBlockId(block) {
1051
- const value = block.block_id;
1052
- return typeof value === "string" ? value : void 0;
1053
- }
1054
- function readSlackOpenClawBlockIndex(blockId, prefix) {
1055
- if (!blockId.startsWith(prefix)) return;
1056
- const value = Number.parseInt(blockId.slice(prefix.length), 10);
1057
- return Number.isSafeInteger(value) && value > 0 ? value : void 0;
1058
- }
1059
- /** Resolve existing Block Kit indexes and native-data budgets before appending portable blocks. */
1060
- function resolveSlackBlockOffsets(blocks) {
1061
- let buttonIndexOffset = 0;
1062
- const dataTableCellCharacterCountOffset = countSlackDataTableBlocksCellCharacters(blocks) ?? 10001;
1063
- let dataVisualizationCountOffset = 0;
1064
- let selectIndexOffset = 0;
1065
- for (const block of blocks ?? []) {
1066
- if (hasSlackDataVisualizationBlock([block])) dataVisualizationCountOffset += 1;
1067
- const blockId = readSlackBlockId(block);
1068
- if (!blockId) continue;
1069
- buttonIndexOffset = Math.max(buttonIndexOffset, readSlackOpenClawBlockIndex(blockId, "openclaw_reply_buttons_") ?? 0);
1070
- selectIndexOffset = Math.max(selectIndexOffset, readSlackOpenClawBlockIndex(blockId, "openclaw_reply_select_") ?? 0);
1071
- }
1072
- return {
1073
- buttonIndexOffset,
1074
- dataTableCellCharacterCountOffset,
1075
- dataVisualizationCountOffset,
1076
- selectIndexOffset
1077
- };
1078
- }
1079
- /**
1080
- * @deprecated Use buildSlackPresentationBlocks with MessagePresentation.
1081
- */
1082
- function buildSlackInteractiveBlocks(interactive, options = {}) {
1083
- return reduceLegacyInteractiveReply(interactive, {
1084
- blocks: [],
1085
- buttonIndex: options.buttonIndexOffset ?? 0,
1086
- selectIndex: options.selectIndexOffset ?? 0
1087
- }, (state, block) => {
1088
- if (block.type === "text") {
1089
- const trimmed = block.text.trim();
1090
- if (!trimmed) return state;
1091
- state.blocks.push({
1092
- type: "section",
1093
- text: {
1094
- type: "mrkdwn",
1095
- text: truncateSlackText(trimmed, SLACK_SECTION_TEXT_MAX)
1096
- }
1097
- });
1098
- return state;
1099
- }
1100
- if (block.type === "buttons") {
1101
- const elements = block.buttons.flatMap((button, choiceIndex) => {
1102
- const target = resolveSlackButtonTarget(button, choiceIndex);
1103
- if (!target || (target.kind === "link" ? !isWithinSlackLimit(target.url, SLACK_BUTTON_URL_MAX) : !isWithinSlackLimit(target.value, 2e3))) return [];
1104
- const style = resolveSlackButtonStyle(button.style);
1105
- return [{
1106
- type: "button",
1107
- action_id: target.kind === "link" ? buildSlackReplyLinkActionId(state.buttonIndex + 1, choiceIndex) : target.kind === "approval" ? buildSlackApprovalButtonActionId(state.buttonIndex + 1, choiceIndex) : target.kind === "callback" ? buildSlackCallbackButtonActionId(state.buttonIndex + 1, choiceIndex) : target.kind === "question" ? buildSlackQuestionButtonActionId(state.buttonIndex + 1, choiceIndex) : buildSlackReplyButtonActionId(state.buttonIndex + 1, choiceIndex),
1108
- text: {
1109
- type: "plain_text",
1110
- text: truncateSlackText(button.label, 75),
1111
- emoji: true
1112
- },
1113
- ...target.kind === "link" ? { url: target.url } : { value: target.value },
1114
- ...style ? { style } : {}
1115
- }];
1116
- }).slice(0, 25);
1117
- if (elements.length === 0) return state;
1118
- state.blocks.push({
1119
- type: "actions",
1120
- block_id: `openclaw_reply_buttons_${++state.buttonIndex}`,
1121
- elements
1122
- });
1123
- return state;
1124
- }
1125
- const optionsLocal = block.options.flatMap((option) => {
1126
- const target = resolveSlackOptionTarget(option);
1127
- return target ? [{
1128
- label: option.label,
1129
- ...target
1130
- }] : [];
1131
- }).filter(isRenderableSlackOption).slice(0, 100);
1132
- const optionKinds = new Set(optionsLocal.map((option) => option.kind));
1133
- if (optionsLocal.length === 0 || optionKinds.size !== 1) return state;
1134
- state.blocks.push({
1135
- type: "actions",
1136
- block_id: `openclaw_reply_select_${++state.selectIndex}`,
1137
- elements: [{
1138
- type: "static_select",
1139
- action_id: optionsLocal[0]?.kind === "approval" ? buildSlackApprovalSelectActionId(state.selectIndex) : optionsLocal[0]?.kind === "callback" ? buildSlackCallbackSelectActionId(state.selectIndex) : buildSlackReplySelectActionId(state.selectIndex),
1140
- placeholder: {
1141
- type: "plain_text",
1142
- text: truncateSlackText(normalizeOptionalString(block.placeholder) ?? "Choose an option", 75),
1143
- emoji: true
1144
- },
1145
- options: optionsLocal.map((option, _choiceIndex) => ({
1146
- text: {
1147
- type: "plain_text",
1148
- text: truncateSlackText(option.label, 75),
1149
- emoji: true
1150
- },
1151
- value: option.value
1152
- }))
1153
- }]
1154
- });
1155
- return state;
1156
- }).blocks;
1157
- }
1158
- /** Render portable presentation blocks as Slack Block Kit blocks. */
1159
- function buildSlackPresentationBlocks(presentation, options = {}) {
1160
- if (!presentation) return [];
1161
- const renderTablesNatively = canRenderSlackPresentationTables(presentation, options);
1162
- const blocks = [];
1163
- if (presentation.title) blocks.push({
1164
- type: "header",
1165
- text: {
1166
- type: "plain_text",
1167
- text: truncateSlackText(presentation.title, 150),
1168
- emoji: true
1169
- }
1170
- });
1171
- let buttonIndex = options.buttonIndexOffset ?? 0;
1172
- let dataTableCellCharacterCount = options.dataTableCellCharacterCountOffset ?? 0;
1173
- let dataVisualizationCount = options.dataVisualizationCountOffset ?? 0;
1174
- let selectIndex = options.selectIndexOffset ?? 0;
1175
- for (const block of presentation.blocks) {
1176
- if (block.type === "text" || block.type === "context") {
1177
- const text = block.text.trim();
1178
- if (!text) continue;
1179
- if (block.type === "context") blocks.push({
1180
- type: "context",
1181
- elements: [{
1182
- type: "mrkdwn",
1183
- text: truncateSlackText(text, SLACK_SECTION_TEXT_MAX),
1184
- verbatim: true
1185
- }]
1186
- });
1187
- else blocks.push({
1188
- type: "section",
1189
- text: {
1190
- type: "mrkdwn",
1191
- text: truncateSlackText(text, SLACK_SECTION_TEXT_MAX)
1192
- }
1193
- });
1194
- continue;
1195
- }
1196
- if (block.type === "divider") {
1197
- blocks.push({ type: "divider" });
1198
- continue;
1199
- }
1200
- if (block.type === "buttons") {
1201
- const rendered = buildSlackPresentationButtonBlock(block, buttonIndex + 1);
1202
- if (rendered) {
1203
- buttonIndex += 1;
1204
- blocks.push(rendered);
1205
- }
1206
- continue;
1207
- }
1208
- if (block.type === "chart") {
1209
- const rendered = dataVisualizationCount < 2 ? buildSlackPresentationChartBlock(block) : void 0;
1210
- if (rendered) {
1211
- dataVisualizationCount += 1;
1212
- blocks.push(rendered);
1213
- } else {
1214
- const fallback = renderSlackMessagePresentationChartFallbackText(block);
1215
- blocks.push(...chunkTextForOutbound(fallback, SLACK_SECTION_TEXT_MAX).map((text) => ({
1216
- type: "context",
1217
- elements: [{
1218
- type: "mrkdwn",
1219
- text,
1220
- verbatim: true
1221
- }]
1222
- })));
1223
- }
1224
- continue;
1225
- }
1226
- if (block.type === "table") {
1227
- if (!renderTablesNatively) continue;
1228
- const rendered = buildSlackDataTableBlock(block, { cellCharacterCountOffset: dataTableCellCharacterCount });
1229
- if (rendered) {
1230
- dataTableCellCharacterCount += countSlackDataTableCellCharacters(rendered);
1231
- blocks.push(rendered);
1232
- }
1233
- continue;
1234
- }
1235
- if (block.type === "select") {
1236
- const rendered = buildSlackPresentationSelectBlock(block, selectIndex + 1);
1237
- if (rendered) {
1238
- selectIndex += 1;
1239
- blocks.push(rendered);
1240
- }
1241
- }
1242
- }
1243
- return blocks;
1244
- }
1245
- function buildSlackPresentationChartBlock(block) {
1246
- return buildSlackDataVisualizationBlock(block);
1247
- }
1248
- function buildSlackPresentationButtonBlock(block, buttonIndex) {
1249
- const elements = block.buttons.flatMap((button, choiceIndex) => {
1250
- const target = resolveSlackButtonTarget(button, choiceIndex);
1251
- if (!target || (target.kind === "link" ? !isWithinSlackLimit(target.url, SLACK_BUTTON_URL_MAX) : !isWithinSlackLimit(target.value, 2e3))) return [];
1252
- const style = resolveSlackButtonStyle(button.style);
1253
- return [{
1254
- type: "button",
1255
- action_id: target.kind === "link" ? buildSlackReplyLinkActionId(buttonIndex, choiceIndex) : target.kind === "approval" ? buildSlackApprovalButtonActionId(buttonIndex, choiceIndex) : target.kind === "callback" ? buildSlackCallbackButtonActionId(buttonIndex, choiceIndex) : target.kind === "question" ? buildSlackQuestionButtonActionId(buttonIndex, choiceIndex) : buildSlackReplyButtonActionId(buttonIndex, choiceIndex),
1256
- text: {
1257
- type: "plain_text",
1258
- text: truncateSlackText(button.label, 75),
1259
- emoji: true
1260
- },
1261
- ...target.kind === "link" ? { url: target.url } : { value: target.value },
1262
- ...style ? { style } : {}
1263
- }];
1264
- }).slice(0, 25);
1265
- return elements.length > 0 ? {
1266
- type: "actions",
1267
- block_id: `openclaw_reply_buttons_${buttonIndex}`,
1268
- elements
1269
- } : void 0;
1270
- }
1271
- /** True when every portable table fits Slack's native per-message table budget. */
1272
- function canRenderSlackPresentationTables(presentation, options = {}) {
1273
- let cellCharacterCount = options.dataTableCellCharacterCountOffset ?? 0;
1274
- for (const block of presentation.blocks) {
1275
- if (block.type !== "table") continue;
1276
- const rendered = buildSlackDataTableBlock(block, { cellCharacterCountOffset: cellCharacterCount });
1277
- if (!rendered) return false;
1278
- cellCharacterCount += countSlackDataTableCellCharacters(rendered);
1279
- }
1280
- return true;
1281
- }
1282
- /** True when native Slack rendering preserves every portable control. */
1283
- function canRenderSlackPresentation(presentation, options = {}) {
1284
- if (presentation.title && !isWithinSlackLimit(presentation.title.trim(), 150)) return false;
1285
- if (!canRenderSlackPresentationTables(presentation, options)) return false;
1286
- let dataVisualizationCount = options.dataVisualizationCountOffset ?? 0;
1287
- for (const block of presentation.blocks) {
1288
- if (block.type === "text" || block.type === "context") {
1289
- if (!isWithinSlackLimit(block.text.trim(), 3e3)) return false;
1290
- continue;
1291
- }
1292
- if (block.type === "buttons") {
1293
- if (!(block.buttons.length <= 25 && block.buttons.every((button, choiceIndex) => {
1294
- if (!isWithinSlackLimit(button.label, 75)) return false;
1295
- const target = resolveSlackButtonTarget(button, choiceIndex);
1296
- return target ? target.kind === "link" ? isWithinSlackLimit(target.url, SLACK_BUTTON_URL_MAX) : isWithinSlackLimit(target.value, 2e3) : false;
1297
- }))) return false;
1298
- continue;
1299
- }
1300
- if (block.type === "select") {
1301
- if (!(isWithinSlackLimit(normalizeOptionalString(block.placeholder) ?? "Choose an option", 75) && block.options.length <= 100 && (!block.placeholder || isWithinSlackLimit(block.placeholder, 75)) && block.options.every((option) => {
1302
- if (!isWithinSlackLimit(option.label, 75)) return false;
1303
- const target = resolveSlackOptionTarget(option);
1304
- return target ? isRenderableSlackOption({
1305
- label: option.label,
1306
- ...target
1307
- }) : false;
1308
- }) && new Set(block.options.map((option) => resolveSlackOptionTarget(option)?.kind)).size === 1)) return false;
1309
- continue;
1310
- }
1311
- if (block.type === "chart") {
1312
- if (dataVisualizationCount >= 2 || !canRenderSlackDataVisualization(block)) return false;
1313
- dataVisualizationCount += 1;
1314
- continue;
1315
- }
1316
- if (block.type === "table") continue;
1317
- }
1318
- return true;
1319
- }
1320
- function buildSlackPresentationSelectBlock(block, selectIndex) {
1321
- const options = block.options.flatMap((option) => {
1322
- const target = resolveSlackOptionTarget(option);
1323
- return target ? [{
1324
- label: option.label,
1325
- ...target
1326
- }] : [];
1327
- }).filter(isRenderableSlackOption).slice(0, 100);
1328
- const optionKinds = new Set(options.map((option) => option.kind));
1329
- return options.length > 0 && optionKinds.size === 1 ? {
1330
- type: "actions",
1331
- block_id: `openclaw_reply_select_${selectIndex}`,
1332
- elements: [{
1333
- type: "static_select",
1334
- action_id: options[0]?.kind === "approval" ? buildSlackApprovalSelectActionId(selectIndex) : options[0]?.kind === "callback" ? buildSlackCallbackSelectActionId(selectIndex) : buildSlackReplySelectActionId(selectIndex),
1335
- placeholder: {
1336
- type: "plain_text",
1337
- text: truncateSlackText(normalizeOptionalString(block.placeholder) ?? "Choose an option", 75),
1338
- emoji: true
1339
- },
1340
- options: options.map((option) => ({
1341
- text: {
1342
- type: "plain_text",
1343
- text: truncateSlackText(option.label, 75),
1344
- emoji: true
1345
- },
1346
- value: option.value
1347
- }))
1348
- }]
1349
- } : void 0;
1350
- }
1351
- //#endregion
1352
- //#region extensions/slack/src/limits.ts
1353
- const SLACK_TEXT_LIMIT = 8e3;
1354
- const SLACK_EDIT_TEXT_MAX_BYTES = 4e3;
1355
- const SLACK_MESSAGE_TEXT_HARD_LIMIT = 4e4;
1356
- //#endregion
1357
- //#region extensions/slack/src/authored-text.ts
1358
- function normalizeComparableSlackText(text) {
1359
- return text.trim().replace(/\s+/g, " ");
1360
- }
1361
- function isSlackAuthoredTextRepresentedInInteractive(text, interactive) {
1362
- return isSlackAuthoredTextRepresentedInFragments(text, interactive?.blocks.flatMap((block) => block.type === "text" ? [block.text] : []) ?? []);
1363
- }
1364
- function isSlackAuthoredTextRepresentedInFragments(text, rawFragments) {
1365
- const target = normalizeComparableSlackText(text);
1366
- const fragments = rawFragments.map(normalizeComparableSlackText).filter(Boolean);
1367
- for (let start = 0; start < fragments.length; start += 1) {
1368
- let combined = "";
1369
- for (let end = start; end < fragments.length; end += 1) {
1370
- combined = normalizeComparableSlackText(`${combined} ${fragments[end]}`);
1371
- if (combined === target) return true;
1372
- if (combined.length > target.length) break;
1373
- }
1374
- }
1375
- return false;
1376
- }
1377
- /** Resolve placement from producer facts, before accessibility text changes the payload text. */
1378
- function resolveSlackAuthoredTextPlacement(params) {
1379
- const text = normalizeOptionalString(params.text);
1380
- if (!text) return "none";
1381
- return params.renderedInBlocks || isSlackAuthoredTextRepresentedInFragments(text, params.renderedTextFragments ?? []) || isSlackAuthoredTextRepresentedInInteractive(text, params.interactive) ? "blocks" : "outside-blocks";
1382
- }
1383
- //#endregion
1384
- //#region extensions/slack/src/blocks-fallback.ts
1385
- const SLACK_SELECT_ELEMENT_TYPES = /* @__PURE__ */ new Set([
1386
- "static_select",
1387
- "multi_static_select",
1388
- "external_select",
1389
- "multi_external_select",
1390
- "users_select",
1391
- "multi_users_select",
1392
- "conversations_select",
1393
- "multi_conversations_select",
1394
- "channels_select",
1395
- "multi_channels_select"
1396
- ]);
1397
- function asRecord$1(value) {
1398
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
1399
- }
1400
- function readNonEmptyString(value) {
1401
- if (typeof value !== "string") return;
1402
- const trimmed = value.trim();
1403
- return trimmed.length > 0 ? trimmed : void 0;
1404
- }
1405
- function readTextObject(value, options = {}) {
1406
- const record = asRecord$1(value);
1407
- if (!record) return;
1408
- const text = readNonEmptyString(record?.text);
1409
- if (!text) return;
1410
- return record.type === "plain_text" && options.nativeDataFormat !== "plain" ? escapeSlackMrkdwn(text) : text;
1411
- }
1412
- function readTextValue(value, options = {}) {
1413
- return readNonEmptyString(value) ?? readTextObject(value, options);
1414
- }
1415
- function renderSlackRichTextLeaf(element) {
1416
- switch (element.type) {
1417
- case "text": return typeof element.text === "string" ? escapeSlackMrkdwn(element.text) : "";
1418
- case "link": return escapeSlackMrkdwn(readNonEmptyString(element.text) ?? readNonEmptyString(element.url) ?? "");
1419
- case "user": {
1420
- const userId = readNonEmptyString(element.user_id);
1421
- return userId ? escapeSlackMrkdwn(`<@${userId}>`) : "";
1422
- }
1423
- case "channel": {
1424
- const channelId = readNonEmptyString(element.channel_id);
1425
- return channelId ? escapeSlackMrkdwn(`<#${channelId}>`) : "";
1426
- }
1427
- case "usergroup": {
1428
- const usergroupId = readNonEmptyString(element.usergroup_id);
1429
- return usergroupId ? escapeSlackMrkdwn(`<!subteam^${usergroupId}>`) : "";
1430
- }
1431
- case "broadcast": {
1432
- const range = readNonEmptyString(element.range);
1433
- return range ? escapeSlackMrkdwn(`<!${range}>`) : "";
1434
- }
1435
- case "emoji": {
1436
- const name = readNonEmptyString(element.name);
1437
- return name ? `:${name}:` : "";
1438
- }
1439
- case "date": return escapeSlackMrkdwn(readNonEmptyString(element.fallback) ?? "");
1440
- default: return "";
1441
- }
1442
- }
1443
- function renderSlackRichTextElement(value) {
1444
- const element = asRecord$1(value);
1445
- if (!element) return "";
1446
- switch (element.type) {
1447
- case "rich_text_section":
1448
- case "rich_text_preformatted":
1449
- case "rich_text_quote": return renderSlackRichTextElements(element.elements, "");
1450
- case "rich_text_list": return renderSlackRichTextElements(element.elements, "\n");
1451
- default: return renderSlackRichTextLeaf(element);
1452
- }
1453
- }
1454
- function renderSlackRichTextElements(value, separator) {
1455
- if (!Array.isArray(value)) return "";
1456
- return value.map(renderSlackRichTextElement).filter(Boolean).join(separator);
1457
- }
1458
- function readImageText(block) {
1459
- const altText = readNonEmptyString(block.alt_text);
1460
- return (altText ? escapeSlackMrkdwn(altText) : void 0) ?? readTextObject(block.title);
1461
- }
1462
- function readVideoText(block, options = {}) {
1463
- const altText = readNonEmptyString(block.alt_text);
1464
- return readTextObject(block.title, options) ?? (altText ? escapeSlackMrkdwn(altText) : void 0);
1465
- }
1466
- function readContextText(block, options = {}) {
1467
- if (!Array.isArray(block.elements)) return;
1468
- const parts = block.elements.map((element) => {
1469
- const record = asRecord$1(element);
1470
- const altText = readNonEmptyString(record?.alt_text);
1471
- return readTextObject(record, options) ?? (altText ? escapeSlackMrkdwn(altText) : void 0);
1472
- }).filter((part) => Boolean(part));
1473
- return parts.length > 0 ? parts.join(" ") : void 0;
1474
- }
1475
- function readControlElementText(value, options = {}) {
1476
- const element = asRecord$1(value);
1477
- const type = readNonEmptyString(element?.type);
1478
- if (type === "button" || type === "workflow_button") return readTextValue(element?.text, options);
1479
- if (type && SLACK_SELECT_ELEMENT_TYPES.has(type)) return readTextObject(element?.placeholder, options);
1480
- }
1481
- function readControlElementsText(values, options = {}) {
1482
- const seen = /* @__PURE__ */ new Set();
1483
- const labels = [];
1484
- for (const value of values) {
1485
- const candidate = readControlElementText(value, options);
1486
- if (!candidate || seen.has(candidate)) continue;
1487
- seen.add(candidate);
1488
- labels.push(candidate);
1489
- }
1490
- return labels.length > 0 ? labels.join("\n") : void 0;
1491
- }
1492
- function readSectionText(block, options = {}) {
1493
- const parts = [readTextObject(block.text, options)];
1494
- if (Array.isArray(block.fields)) parts.push(...block.fields.map((field) => readTextObject(field, options)));
1495
- parts.push(readControlElementText(block.accessory, options));
1496
- const visibleParts = parts.filter((part) => Boolean(part));
1497
- return visibleParts.length > 0 ? visibleParts.join("\n") : void 0;
1498
- }
1499
- function readActionsText(block, options = {}) {
1500
- return Array.isArray(block.elements) ? readControlElementsText(block.elements, options) : void 0;
1501
- }
1502
- /** Read only user-visible text from one Slack block. */
1503
- function renderSlackBlockFallbackText(raw, options = {}) {
1504
- const block = asRecord$1(raw);
1505
- if (!block) return;
1506
- switch (block.type) {
1507
- case "rich_text": return readNonEmptyString(renderSlackRichTextElements(block.elements, "\n"));
1508
- case "header": return readTextObject(block.text, options);
1509
- case "section": return readSectionText(block, options);
1510
- case "image": return readImageText(block) ?? "Shared an image";
1511
- case "video": return readVideoText(block, options) ?? "Shared a video";
1512
- case "file": return "Shared a file";
1513
- case "context": return readContextText(block, options);
1514
- case "actions": return readActionsText(block, options);
1515
- case "data_visualization": return options.nativeDataFormat === "plain" ? renderSlackDataVisualizationFallbackText(block) : renderSlackDataVisualizationMrkdwnFallbackText(block);
1516
- case "data_table": return options.nativeDataFormat === "plain" ? renderSlackDataTableFallbackText(block) : renderSlackDataTableMrkdwnFallbackText(block);
1517
- case "table": return options.nativeDataFormat === "plain" ? renderSlackTableFallbackText(block) : renderSlackTableMrkdwnFallbackText(block);
1518
- default: return;
1519
- }
1520
- }
1521
- function buildSlackBlocksFallbackText(blocks) {
1522
- for (const block of blocks) {
1523
- const text = renderSlackBlockFallbackText(block);
1524
- if (text) return text;
1525
- }
1526
- return "Shared a Block Kit message";
1527
- }
1528
- function buildSlackCompleteBlocksFallbackText(blocks) {
1529
- return blocks.map((block) => renderSlackBlockFallbackText(block)).filter(Boolean).join("\n\n").trim() || buildSlackBlocksFallbackText(blocks);
1530
- }
1531
- //#endregion
1532
- //#region extensions/slack/src/format.ts
1533
- function escapeSlackMrkdwnSegment(text) {
1534
- return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1535
- }
1536
- const SLACK_ANGLE_TOKEN_RE = /<[^>\n]+>/g;
1537
- function isAllowedSlackAngleToken(token) {
1538
- if (!token.startsWith("<") || !token.endsWith(">")) return false;
1539
- const inner = token.slice(1, -1);
1540
- return inner.startsWith("@") || inner.startsWith("#") || inner.startsWith("!") || inner.startsWith("mailto:") || inner.startsWith("tel:") || inner.startsWith("http://") || inner.startsWith("https://") || inner.startsWith("slack://");
1541
- }
1542
- function escapeSlackMrkdwnContent(text) {
1543
- if (!text) return "";
1544
- if (!text.includes("&") && !text.includes("<") && !text.includes(">")) return text;
1545
- SLACK_ANGLE_TOKEN_RE.lastIndex = 0;
1546
- const out = [];
1547
- let lastIndex = 0;
1548
- for (let match = SLACK_ANGLE_TOKEN_RE.exec(text); match; match = SLACK_ANGLE_TOKEN_RE.exec(text)) {
1549
- const matchIndex = match.index ?? 0;
1550
- out.push(escapeSlackMrkdwnSegment(text.slice(lastIndex, matchIndex)));
1551
- const token = match[0] ?? "";
1552
- out.push(isAllowedSlackAngleToken(token) ? token : escapeSlackMrkdwnSegment(token));
1553
- lastIndex = matchIndex + token.length;
1554
- }
1555
- out.push(escapeSlackMrkdwnSegment(text.slice(lastIndex)));
1556
- return out.join("");
1557
- }
1558
- function escapeSlackMrkdwnText(text) {
1559
- if (!text) return "";
1560
- if (!text.includes("&") && !text.includes("<") && !text.includes(">")) return text;
1561
- return text.split("\n").map((line) => {
1562
- if (line.startsWith("> ")) return `> ${escapeSlackMrkdwnContent(line.slice(2))}`;
1563
- return escapeSlackMrkdwnContent(line);
1564
- }).join("\n");
1565
- }
1566
- function buildSlackLink(link, text) {
1567
- const href = link.href.trim();
1568
- if (!href) return null;
1569
- const trimmedLabel = text.slice(link.start, link.end).trim();
1570
- const comparableHref = href.startsWith("mailto:") ? href.slice(7) : href;
1571
- if (!(trimmedLabel.length > 0 && trimmedLabel !== href && trimmedLabel !== comparableHref)) return null;
1572
- const safeHref = escapeSlackMrkdwnSegment(href);
1573
- return {
1574
- start: link.start,
1575
- end: link.end,
1576
- open: `<${safeHref}|`,
1577
- close: ">"
1578
- };
1579
- }
1580
- const SLACK_MRKDWN_WORD_CHARACTER_RE = /[\p{L}\p{M}\p{N}_]/u;
1581
- const SLACK_MRKDWN_PUNCTUATION_RE = /\p{P}/u;
1582
- const SLACK_MRKDWN_SYMBOL_RE = /\p{S}/u;
1583
- const SLACK_MRKDWN_CJK_SCRIPT_RE = /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}]/u;
1584
- const SLACK_MRKDWN_EMOJI_PRESENTATION_RE = /\p{Emoji_Presentation}/u;
1585
- function getCodePointBefore(text, index) {
1586
- if (index <= 0) return "";
1587
- const lastCodeUnit = text.charCodeAt(index - 1);
1588
- if (lastCodeUnit >= 56320 && lastCodeUnit <= 57343 && index > 1) {
1589
- const previousCodeUnit = text.charCodeAt(index - 2);
1590
- if (previousCodeUnit >= 55296 && previousCodeUnit <= 56319) return text.slice(index - 2, index);
1591
- }
1592
- return text[index - 1] ?? "";
1593
- }
1594
- function getCodePointAt(text, index) {
1595
- const codePoint = text.codePointAt(index);
1596
- return codePoint === void 0 ? "" : String.fromCodePoint(codePoint);
1597
- }
1598
- function isSlackCjkPunctuation(character) {
1599
- if (!SLACK_MRKDWN_PUNCTUATION_RE.test(character)) return false;
1600
- if (SLACK_MRKDWN_CJK_SCRIPT_RE.test(character)) return true;
1601
- const codePoint = character.codePointAt(0);
1602
- if (codePoint === void 0) return false;
1603
- const width = eastAsianWidthType(codePoint);
1604
- return width === "fullwidth" || width === "halfwidth" || width === "wide" && !SLACK_MRKDWN_EMOJI_PRESENTATION_RE.test(character);
1605
- }
1606
- function isUnsafeSlackEmphasisBoundary(character) {
1607
- if (SLACK_MRKDWN_WORD_CHARACTER_RE.test(character)) return true;
1608
- const codePoint = character.codePointAt(0);
1609
- if (codePoint === void 0 || codePoint <= 127) return false;
1610
- return SLACK_MRKDWN_SYMBOL_RE.test(character) || isSlackCjkPunctuation(character);
1611
- }
1612
- function makeSlackEmphasisStylesSafe(ir) {
1613
- const styles = ir.styles.filter((span) => {
1614
- if (span.style !== "italic" && span.style !== "bold") return true;
1615
- return !isUnsafeSlackEmphasisBoundary(getCodePointBefore(ir.text, span.start)) && !isUnsafeSlackEmphasisBoundary(getCodePointAt(ir.text, span.end));
1616
- });
1617
- return styles.length === ir.styles.length ? ir : {
1618
- ...ir,
1619
- styles
1620
- };
1621
- }
1622
- const SLACK_FORMAT_PROFILE = FormatCapabilityProfile.define({
1623
- mechanism: "markdown",
1624
- constructs: {
1625
- underline: "strip",
1626
- spoiler: "fallback",
1627
- codeLanguage: "fallback",
1628
- heading: "fallback",
1629
- bulletList: "fallback",
1630
- orderedList: "fallback",
1631
- taskList: "fallback",
1632
- table: "fallback",
1633
- image: "fallback"
1634
- },
1635
- chunk: {
1636
- limit: 4e3,
1637
- unit: "chars",
1638
- hardCap: 4e4
1639
- }
1640
- });
1641
- const SLACK_ASSISTANT_TRANSCRIPT_PREFIX = "`Assistant:` ";
1642
- function tokenizeSlackMrkdwn(text) {
1643
- const tokens = [];
1644
- for (let index = 0; index < text.length;) {
1645
- if (text.startsWith("```", index)) {
1646
- tokens.push("```");
1647
- index += 3;
1648
- continue;
1649
- }
1650
- const entity = [
1651
- "&amp;",
1652
- "&lt;",
1653
- "&gt;"
1654
- ].find((candidate) => text.startsWith(candidate, index));
1655
- if (entity) {
1656
- tokens.push(entity);
1657
- index += entity.length;
1658
- continue;
1659
- }
1660
- if (text[index] === "<") {
1661
- const end = text.indexOf(">", index + 1);
1662
- const angleToken = end >= 0 ? text.slice(index, end + 1) : void 0;
1663
- if (angleToken && !angleToken.includes("\n") && isAllowedSlackAngleToken(angleToken)) {
1664
- tokens.push(angleToken);
1665
- index += angleToken.length;
1666
- continue;
1667
- }
1668
- }
1669
- const codePoint = text.codePointAt(index);
1670
- if (codePoint === void 0) break;
1671
- const character = String.fromCodePoint(codePoint);
1672
- index += character.length;
1673
- if (character === "\\" && index < text.length) {
1674
- const escapedCodePoint = text.codePointAt(index);
1675
- if (escapedCodePoint !== void 0) {
1676
- const escapedCharacter = String.fromCodePoint(escapedCodePoint);
1677
- tokens.push(character + escapedCharacter);
1678
- index += escapedCharacter.length;
1679
- continue;
1680
- }
1681
- }
1682
- tokens.push(character);
1683
- }
1684
- return tokens;
1685
- }
1686
- function resolveSlackCodeMarkerTransition(active, token) {
1687
- if (token === "```" && active !== "`") return active === "```" ? void 0 : "```";
1688
- if (token === "`" && active !== "```") return active === "`" ? void 0 : "`";
1689
- return null;
1690
- }
1691
- function maskSlackExcludedText(text) {
1692
- return text.split("\n").map((line) => line.trim() ? `x${" ".repeat(Math.max(0, line.length - 1))}` : " ".repeat(line.length)).join("\n");
1693
- }
1694
- function maskSlackExcludedRanges(projection) {
1695
- let masked = "";
1696
- let cursor = 0;
1697
- for (const range of projection.excludedRanges) {
1698
- masked += projection.text.slice(cursor, range.start);
1699
- masked += maskSlackExcludedText(projection.text.slice(range.start, range.end));
1700
- cursor = range.end;
1701
- }
1702
- return masked + projection.text.slice(cursor);
1703
- }
1704
- function slackProjectionHasRoleHeader(projection) {
1705
- return Boolean(markdownToIR(maskSlackExcludedRanges(projection), {
1706
- assistantTranscriptRoleHeaders: true,
1707
- autolink: false,
1708
- blockquotePrefix: "",
1709
- headingStyle: "none",
1710
- linkify: false,
1711
- tableMode: "off"
1712
- }).annotations?.some((annotation) => annotation.type === "assistant_transcript_role"));
1713
- }
1714
- function decodeSlackMrkdwnEntities(text) {
1715
- return text.replaceAll("&amp;", "&").replaceAll("&lt;", "<").replaceAll("&gt;", ">");
1716
- }
1717
- function projectSlackAngleToken(token, dateDisplay) {
1718
- const inner = token.slice(1, -1);
1719
- if (inner.startsWith("!date^")) {
1720
- const fallbackSeparator = inner.indexOf("|");
1721
- const tokenString = (fallbackSeparator === -1 ? inner : inner.slice(0, fallbackSeparator)).split("^")[2] ?? "";
1722
- const fallback = fallbackSeparator === -1 ? "" : inner.slice(fallbackSeparator + 1);
1723
- return decodeSlackMrkdwnEntities(dateDisplay === "fallback" ? fallback || tokenString : tokenString || fallback);
1724
- }
1725
- const labelSeparator = inner.indexOf("|");
1726
- if (labelSeparator >= 0) return decodeSlackMrkdwnEntities(inner.slice(labelSeparator + 1));
1727
- if (inner.startsWith("@")) return "@";
1728
- if (inner.startsWith("#")) return "#";
1729
- if (inner.startsWith("!")) return "!";
1730
- return decodeSlackMrkdwnEntities(inner);
1731
- }
1732
- function appendSlackVisibleProjection(projection, visible, excluded) {
1733
- if (!visible) return;
1734
- const start = projection.text.length;
1735
- projection.text += visible;
1736
- if (!excluded) return;
1737
- const previous = projection.excludedRanges.at(-1);
1738
- if (previous?.end === start) previous.end = projection.text.length;
1739
- else projection.excludedRanges.push({
1740
- start,
1741
- end: projection.text.length
1742
- });
1743
- }
1744
- function projectSlackMrkdwnVisibleText(text, dateDisplay) {
1745
- const projection = {
1746
- text: "",
1747
- excludedRanges: []
1748
- };
1749
- let activeMarker;
1750
- let lineHasVisibleContent = false;
1751
- for (const token of tokenizeSlackMrkdwn(text)) {
1752
- const transition = resolveSlackCodeMarkerTransition(activeMarker, token);
1753
- if (transition !== null) {
1754
- activeMarker = transition;
1755
- continue;
1756
- }
1757
- let visible = token;
1758
- if (isAllowedSlackAngleToken(token)) visible = activeMarker ? token : projectSlackAngleToken(token, dateDisplay);
1759
- else if (token === "&amp;" || token === "&lt;" || token === "&gt;") visible = decodeSlackMrkdwnEntities(token);
1760
- else if (!activeMarker && (token === "*" || token === "_" || token === "~")) visible = "";
1761
- else if (!activeMarker && token === ">" && !lineHasVisibleContent) visible = "";
1762
- else if (token.startsWith("\\") && token.length > 1) visible = token.slice(1);
1763
- appendSlackVisibleProjection(projection, visible, activeMarker !== void 0);
1764
- for (const character of visible) if (character === "\n") lineHasVisibleContent = false;
1765
- else if (character !== " " && character !== " " && character !== "\r") lineHasVisibleContent = true;
1766
- }
1767
- return projection;
1768
- }
1769
- function protectSlackAssistantTranscriptRoleHeaders(text) {
1770
- if (text.startsWith(SLACK_ASSISTANT_TRANSCRIPT_PREFIX)) return text;
1771
- const tokenProjection = projectSlackMrkdwnVisibleText(text, "token");
1772
- const fallbackProjection = projectSlackMrkdwnVisibleText(text, "fallback");
1773
- if (!slackProjectionHasRoleHeader(tokenProjection) && !slackProjectionHasRoleHeader(fallbackProjection)) return text;
1774
- return `${SLACK_ASSISTANT_TRANSCRIPT_PREFIX}${text}`;
1775
- }
1776
- function hardSliceSlackToken(token, limit) {
1777
- const chunks = [];
1778
- let chunk = "";
1779
- for (const character of token) {
1780
- if (chunk && chunk.length + character.length > limit) {
1781
- chunks.push(chunk);
1782
- chunk = "";
1783
- }
1784
- chunk += character;
1785
- }
1786
- if (chunk) chunks.push(chunk);
1787
- return chunks;
1788
- }
1789
- function buildSlackRenderOptions() {
1790
- return {
1791
- annotationMarkers: { assistant_transcript_role: {
1792
- open: "`",
1793
- close: "`",
1794
- suppressNestedFormatting: true
1795
- } },
1796
- styleMarkers: {
1797
- bold: {
1798
- open: "*",
1799
- close: "*"
1800
- },
1801
- italic: {
1802
- open: "_",
1803
- close: "_"
1804
- },
1805
- strikethrough: {
1806
- open: "~",
1807
- close: "~"
1808
- },
1809
- code: {
1810
- open: "`",
1811
- close: "`"
1812
- },
1813
- code_block: {
1814
- open: "```\n",
1815
- close: "```"
1816
- }
1817
- },
1818
- escapeText: escapeSlackMrkdwnText,
1819
- buildLink: buildSlackLink
1820
- };
1821
- }
1822
- function markdownToSlackMrkdwn(markdown, options = {}) {
1823
- return renderMarkdownWithMarkers(makeSlackEmphasisStylesSafe(markdownToIR(markdown ?? "", {
1824
- assistantTranscriptRoleHeaders: true,
1825
- linkify: false,
1826
- autolink: false,
1827
- headingStyle: "rich",
1828
- blockquotePrefix: "> ",
1829
- tableMode: options.tableMode
1830
- })), buildSlackRenderOptions(), SLACK_FORMAT_PROFILE);
1831
- }
1832
- function normalizeSlackOutboundText(markdown) {
1833
- return protectSlackAssistantTranscriptRoleHeaders(markdownToSlackMrkdwn(markdown ?? ""));
1834
- }
1835
- /** Chunk already-rendered Slack mrkdwn without splitting entities or code markers. */
1836
- function chunkSlackMrkdwnText(text, limit) {
1837
- if (text.length <= limit) return [text];
1838
- if (!(text.includes("`") || text.includes("&amp;") || text.includes("&lt;") || text.includes("&gt;") || (text.match(/<[^>\n]+>/gu)?.some(isAllowedSlackAngleToken) ?? false) || /\\[\s\S]/u.test(text))) return chunkTextForOutbound(text, limit);
1839
- const chunks = [];
1840
- let activeMarker;
1841
- let content = "";
1842
- const wrapper = () => activeMarker && limit > activeMarker.length * 2 ? activeMarker : void 0;
1843
- const capacity = () => limit - (wrapper()?.length ?? 0) * 2;
1844
- const flush = () => {
1845
- if (!content) return;
1846
- const marker = wrapper();
1847
- chunks.push(marker ? `${marker}${content}${marker}` : content);
1848
- content = "";
1849
- };
1850
- for (const token of tokenizeSlackMrkdwn(text)) {
1851
- const transition = resolveSlackCodeMarkerTransition(activeMarker, token);
1852
- if (transition !== null) {
1853
- flush();
1854
- activeMarker = transition;
1855
- continue;
1856
- }
1857
- const contentLimit = capacity();
1858
- if (token.length > contentLimit) {
1859
- flush();
1860
- const marker = wrapper();
1861
- if (activeMarker && isAllowedSlackAngleToken(token)) {
1862
- if (marker) chunks.push(...hardSliceSlackToken(token, contentLimit).map((fragment) => `${marker}${fragment}${marker}`));
1863
- else chunks.push(...hardSliceSlackToken(escapeSlackMrkdwnSegment(token), limit));
1864
- continue;
1865
- }
1866
- chunks.push(...token.length <= limit ? [token] : chunkTextForOutbound(token, limit));
1867
- continue;
1868
- }
1869
- if (content && content.length + token.length > contentLimit) flush();
1870
- content += token;
1871
- }
1872
- flush();
1873
- return chunks;
1874
- }
1875
- function markdownToSlackMrkdwnChunks(markdown, limit, options = {}) {
1876
- const ir = makeSlackEmphasisStylesSafe(markdownToIR(markdown ?? "", {
1877
- assistantTranscriptRoleHeaders: true,
1878
- linkify: false,
1879
- autolink: false,
1880
- headingStyle: "rich",
1881
- blockquotePrefix: "> ",
1882
- tableMode: options.tableMode
1883
- }));
1884
- const renderOptions = buildSlackRenderOptions();
1885
- return renderMarkdownIRChunksWithinLimit({
1886
- ir,
1887
- limit,
1888
- renderChunk: (chunk) => protectSlackAssistantTranscriptRoleHeaders(renderMarkdownWithMarkers(chunk, renderOptions, SLACK_FORMAT_PROFILE)),
1889
- measureRendered: (rendered) => rendered.length
1890
- }).map(({ rendered }) => rendered);
1891
- }
1892
- //#endregion
1893
- //#region extensions/slack/src/native-data-blocks.ts
1894
- const SLACK_MALFORMED_NATIVE_DATA_FALLBACK = "Slack could not render this chart or table data.";
1895
- const SLACK_RESPONSE_URL_BODY_LIMIT_BYTES = 16 * 1024;
1896
- const SLACK_RESPONSE_URL_BODY_TIMEOUT_MS = 3e4;
1897
- function asRecord(value) {
1898
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
1899
- }
1900
- /** Detect a native Slack chart or table block. */
1901
- function hasSlackNativeDataBlock(blocks) {
1902
- return hasSlackDataVisualizationBlock(blocks) || hasSlackDataTableBlock(blocks);
1903
- }
1904
- /** Keep every sibling block while removing Slack's native data blocks. */
1905
- function stripSlackNativeDataBlocks(blocks) {
1906
- return (blocks ?? []).filter((block) => {
1907
- const type = asRecord(block)?.type;
1908
- return type !== "data_table" && type !== "data_visualization";
1909
- });
1910
- }
1911
- /** Match Slack's Web API and response_url `invalid_blocks` error shapes. */
1912
- function isSlackInvalidBlocksError(error) {
1913
- const record = asRecord(error);
1914
- const rawData = record?.data;
1915
- const data = asRecord(rawData);
1916
- const rawResponseData = asRecord(record?.response)?.data;
1917
- const responseData = asRecord(rawResponseData);
1918
- const code = data?.error ?? (typeof rawData === "string" ? rawData : void 0) ?? responseData?.error ?? (typeof rawResponseData === "string" ? rawResponseData : void 0) ?? record?.error;
1919
- return typeof code === "string" && code.trim().toLowerCase() === "invalid_blocks";
1920
- }
1921
- function isSlackResponseLike(value) {
1922
- const record = asRecord(value);
1923
- const body = asRecord(record?.body);
1924
- return typeof record?.status === "number" && (typeof record.arrayBuffer === "function" || typeof body?.getReader === "function");
1925
- }
1926
- /** Consume Bolt 5's native response_url body under strict time and byte bounds. */
1927
- async function isSlackInvalidBlocksResponse(response) {
1928
- if (!isSlackResponseLike(response)) return isSlackInvalidBlocksError(response);
1929
- try {
1930
- const body = await readResponseTextLimited(response, SLACK_RESPONSE_URL_BODY_LIMIT_BYTES, { timeoutMs: SLACK_RESPONSE_URL_BODY_TIMEOUT_MS });
1931
- if (body.trim().toLowerCase() === "invalid_blocks") return true;
1932
- return isSlackInvalidBlocksError(JSON.parse(body));
1933
- } catch {
1934
- return false;
1935
- }
1936
- }
1937
- /** Bolt 5 omits the response body from RespondError; 400 is contextual here. */
1938
- function isSlackNativeResponseUrlRejection(error) {
1939
- if (isSlackInvalidBlocksError(error)) return true;
1940
- const record = asRecord(error);
1941
- return record?.code === "slack_bolt_respond_error" && record.statusCode === 400;
1942
- }
1943
- /** Extract a complete accessible summary from a supported native data block. */
1944
- function renderSlackNativeDataFallbackText(value) {
1945
- const type = asRecord(value)?.type;
1946
- if (type === "data_visualization") return renderSlackDataVisualizationMrkdwnFallbackText(value);
1947
- if (type === "data_table") return renderSlackDataTableMrkdwnFallbackText(value);
1948
- }
1949
- function comparableText(value) {
1950
- return value.replace(/\s+/gu, " ").trim();
1951
- }
1952
- function countComparableOccurrences(value, candidate) {
1953
- if (!candidate) return 0;
1954
- let count = 0;
1955
- let offset = 0;
1956
- while ((offset = value.indexOf(candidate, offset)) >= 0) {
1957
- count += 1;
1958
- offset += candidate.length;
1959
- }
1960
- return count;
1961
- }
1962
- /** Consume native fallback occurrences already carried by an explicit outside base. */
1963
- function createSlackNativeDataBaseTextConsumer(baseText) {
1964
- const comparableBase = comparableText(baseText);
1965
- const remainingByText = /* @__PURE__ */ new Map();
1966
- return (text) => {
1967
- const comparable = comparableText(text);
1968
- const remaining = remainingByText.get(comparable) ?? countComparableOccurrences(comparableBase, comparable);
1969
- if (remaining <= 0) return false;
1970
- remainingByText.set(comparable, remaining - 1);
1971
- return true;
1972
- };
1973
- }
1974
- function appendSlackNativeDataFallback(text, blocks, render) {
1975
- const base = text.trim();
1976
- const consumeFromBase = createSlackNativeDataBaseTextConsumer(base);
1977
- const dataTexts = [];
1978
- for (const block of blocks ?? []) {
1979
- const dataText = render(block);
1980
- if (!dataText) continue;
1981
- if (!comparableText(dataText) || consumeFromBase(dataText)) continue;
1982
- dataTexts.push(dataText);
1983
- }
1984
- return [base, ...dataTexts].filter(Boolean).join("\n\n");
1985
- }
1986
- function renderSlackNativeDataPlainTextBlock(value) {
1987
- const type = asRecord(value)?.type;
1988
- if (type === "data_table") return renderSlackDataTableCompactPlainTextFallback(value);
1989
- if (type === "data_visualization") return renderSlackDataVisualizationFallbackText(value);
1990
- }
1991
- /** Build formatting-disabled accessibility text from actual Slack block order. */
1992
- function buildSlackNativeDataAccessibilityText(text, blocks) {
1993
- const parts = [];
1994
- const consumeFromBase = createSlackNativeDataBaseTextConsumer(text);
1995
- const append = (value) => {
1996
- if (value?.trim()) parts.push(value);
1997
- };
1998
- append(text);
1999
- for (const block of blocks ?? []) {
2000
- const isNativeData = hasSlackNativeDataBlock([block]);
2001
- const rendered = renderSlackNativeDataPlainTextBlock(block) ?? renderSlackBlockFallbackText(block, { nativeDataFormat: "plain" }) ?? (isNativeData ? "Slack could not render this chart or table data." : void 0);
2002
- if (!rendered || isNativeData && consumeFromBase(rendered)) continue;
2003
- append(rendered);
2004
- }
2005
- return parts.join("\n\n");
2006
- }
2007
- /** Preserve every native data block's content once when Slack requires a text-only retry. */
2008
- function appendSlackNativeDataFallbackText(text, blocks) {
2009
- return appendSlackNativeDataFallback(text, blocks, renderSlackNativeDataFallbackText);
2010
- }
2011
- /** Build a bounded plain-text retry without activating control tokens. */
2012
- function appendSlackNativeDataPlainTextFallback(text, blocks) {
2013
- return appendSlackNativeDataFallback(text, blocks, renderSlackNativeDataPlainTextBlock);
2014
- }
2015
- //#endregion
2016
- //#region extensions/slack/src/reply-blocks.ts
2017
- function parseSlackReplyBlockSegments(value) {
2018
- if (value === void 0) return;
2019
- if (!Array.isArray(value)) throw new Error("Slack rendered presentation segments must be an array");
2020
- return value.map((raw) => {
2021
- if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new Error("Slack rendered presentation segment must be an object");
2022
- const segment = raw;
2023
- if (segment.kind === "text" && typeof segment.text === "string" && segment.mrkdwn === false) return {
2024
- kind: "text",
2025
- text: segment.text,
2026
- mrkdwn: false
2027
- };
2028
- if (segment.kind === "blocks") {
2029
- const blocks = parseSlackBlocksInput(segment.blocks);
2030
- if (blocks?.length) return {
2031
- kind: "blocks",
2032
- blocks
2033
- };
2034
- }
2035
- throw new Error("Slack rendered presentation segment is invalid");
2036
- });
2037
- }
2038
- /** Convert compiled segments into ordered sender calls without re-inferring text placement. */
2039
- function resolveSlackReplyDeliveryMessages(params) {
2040
- const messages = [];
2041
- let outsideText = params.authoredTextPlacement === "outside-blocks" ? params.text?.trim() ?? "" : "";
2042
- for (const segment of params.segments) {
2043
- if (segment.kind === "text") {
2044
- const text = [outsideText, segment.text].filter(Boolean).join("\n\n");
2045
- outsideText = "";
2046
- if (text) messages.push({
2047
- text,
2048
- textIsSlackPlainText: true
2049
- });
2050
- continue;
2051
- }
2052
- const baseText = outsideText;
2053
- outsideText = "";
2054
- const text = buildSlackNativeDataAccessibilityText(baseText, segment.blocks) || buildSlackBlocksFallbackText(segment.blocks);
2055
- const authoredTextPlacement = baseText ? "outside-blocks" : params.authoredTextPlacement === "blocks" ? "blocks" : "none";
2056
- messages.push({
2057
- text,
2058
- blocks: segment.blocks,
2059
- authoredTextPlacement,
2060
- ...baseText ? { nativeDataFallbackBaseText: baseText } : {}
2061
- });
2062
- }
2063
- if (outsideText) messages.push({ text: outsideText });
2064
- return messages;
2065
- }
2066
- function resolveSlackReplyText(payload, text = payload.text) {
2067
- const presentation = normalizeMessagePresentation(payload.presentation);
2068
- return presentation ? renderSlackMessagePresentationFallbackText({
2069
- text,
2070
- presentation
2071
- }) : text ?? "";
2072
- }
2073
- function resolveSlackReplyRenderPlan(payload, text = payload.text) {
2074
- const hasStructuredContent = hasSlackReplyStructuredContent(payload);
2075
- const resolution = resolveSlackReplyBlockResolution({
2076
- ...payload,
2077
- text
2078
- }, { materializeAuthoredText: hasStructuredContent });
2079
- const messages = resolveSlackReplyDeliveryMessages({
2080
- authoredTextPlacement: resolution.authoredTextPlacement,
2081
- segments: resolution.segments,
2082
- text
2083
- });
2084
- if (messages.length <= 1) {
2085
- const [message] = messages;
2086
- const sourceText = text?.trim() ?? "";
2087
- const blocks = message?.authoredTextPlacement === "blocks" ? addPreviewVerbatimToAuthoredTextBlocks(message.blocks, sourceText) : message?.blocks;
2088
- let renderedText = message?.text ?? resolveSlackReplyText(payload, text);
2089
- let textIsSlackMrkdwn = Boolean(message && !message.textIsSlackPlainText && (message.authoredTextPlacement !== "outside-blocks" || message.nativeDataFallbackBaseText));
2090
- if (blocks?.length && sourceText) {
2091
- if (hasSlackNativeDataBlock(blocks)) {
2092
- renderedText = appendSlackNativeDataFallbackText(sourceText, blocks) || renderedText;
2093
- textIsSlackMrkdwn = true;
2094
- } else if (message?.authoredTextPlacement === "blocks") {
2095
- renderedText = sourceText;
2096
- textIsSlackMrkdwn = false;
2097
- }
2098
- }
2099
- return {
2100
- mode: "single",
2101
- text: renderedText,
2102
- ...blocks ? { blocks } : {},
2103
- ...textIsSlackMrkdwn ? { textIsSlackMrkdwn: true } : {}
2104
- };
2105
- }
2106
- const blockPart = messages.find((message) => message.blocks?.length);
2107
- return {
2108
- mode: "split",
2109
- fallbackText: messages.map((message) => message.text).filter(Boolean).join("\n\n"),
2110
- ...blockPart ? { blockPart: {
2111
- text: blockPart.text,
2112
- blocks: blockPart.blocks
2113
- } } : {}
2114
- };
2115
- }
2116
- function readSlackChannelBlocks(payload) {
2117
- const slackData = payload.channelData?.slack;
2118
- if (!slackData || typeof slackData !== "object" || Array.isArray(slackData)) return [];
2119
- return parseSlackBlocksInput(slackData.blocks) ?? [];
2120
- }
2121
- function hasSlackReplyStructuredContent(payload) {
2122
- return Boolean(readSlackChannelBlocks(payload).length || normalizeMessagePresentation(payload.presentation) || payload.interactive?.blocks.length);
2123
- }
2124
- function renderSlackAuthoredTextFragments(blocks) {
2125
- return blocks.flatMap((block) => {
2126
- if (block.type === "actions") return [];
2127
- const text = renderSlackBlockFallbackText(block, { nativeDataFormat: "plain" });
2128
- return text ? [text] : [];
2129
- });
2130
- }
2131
- function buildSlackAuthoredTextBlocks(text) {
2132
- return markdownToSlackMrkdwnChunks(text, SLACK_SECTION_TEXT_MAX).map((chunk) => ({
2133
- type: "section",
2134
- text: {
2135
- type: "mrkdwn",
2136
- text: chunk,
2137
- verbatim: true
2138
- }
2139
- }));
2140
- }
2141
- function addPreviewVerbatimToAuthoredTextBlocks(blocks, sourceText) {
2142
- if (!blocks?.length || !sourceText) return blocks;
2143
- const authoredChunks = new Set(markdownToSlackMrkdwnChunks(sourceText, SLACK_SECTION_TEXT_MAX));
2144
- return blocks.map((block) => {
2145
- const text = block.text;
2146
- if (block.type !== "section" || text?.type !== "mrkdwn" || typeof text.text !== "string" || !authoredChunks.has(text.text)) return block;
2147
- return {
2148
- ...block,
2149
- text: {
2150
- ...text,
2151
- verbatim: true
2152
- }
2153
- };
2154
- });
2155
- }
2156
- function readLastBlockSegment(segments) {
2157
- const last = segments.at(-1);
2158
- return last?.kind === "blocks" ? last.blocks : [];
2159
- }
2160
- function readAllNativeBlocks(segments) {
2161
- return segments.flatMap((segment) => segment.kind === "blocks" ? segment.blocks : []);
2162
- }
2163
- function appendTextSegment(segments, text) {
2164
- const trimmed = text.trim();
2165
- if (!trimmed) return;
2166
- const last = segments.at(-1);
2167
- if (last?.kind === "text") {
2168
- last.text = `${last.text}\n\n${trimmed}`;
2169
- return;
2170
- }
2171
- segments.push({
2172
- kind: "text",
2173
- text: trimmed,
2174
- mrkdwn: false
2175
- });
2176
- }
2177
- function appendBlockSegment(segments, blocks, startNew = false) {
2178
- let shouldStartNew = startNew;
2179
- for (const block of blocks) {
2180
- const last = segments.at(-1);
2181
- if (!shouldStartNew && last?.kind === "blocks" && last.blocks.length < 50) last.blocks.push(block);
2182
- else segments.push({
2183
- kind: "blocks",
2184
- blocks: [block]
2185
- });
2186
- shouldStartNew = false;
2187
- }
2188
- }
2189
- function resolvePresentationRenderOptions(segments, mode) {
2190
- const allOffsets = resolveSlackBlockOffsets(readAllNativeBlocks(segments));
2191
- return {
2192
- ...mode === "current" ? resolveSlackBlockOffsets(readLastBlockSegment(segments)) : {},
2193
- buttonIndexOffset: allOffsets.buttonIndexOffset,
2194
- selectIndexOffset: allOffsets.selectIndexOffset
2195
- };
2196
- }
2197
- function renderNativePresentation(presentation, options) {
2198
- if (!canRenderSlackPresentation(presentation, options)) return;
2199
- const blocks = buildSlackPresentationBlocks(presentation, options);
2200
- return blocks.length > 0 ? blocks : void 0;
2201
- }
2202
- function appendPresentationPart(segments, presentation) {
2203
- const currentBlocks = readLastBlockSegment(segments);
2204
- const currentRendered = renderNativePresentation(presentation, resolvePresentationRenderOptions(segments, "current"));
2205
- if (currentRendered && currentBlocks.length + currentRendered.length <= 50) {
2206
- appendBlockSegment(segments, currentRendered);
2207
- return;
2208
- }
2209
- const freshRendered = renderNativePresentation(presentation, resolvePresentationRenderOptions(segments, "new-message"));
2210
- if (freshRendered) {
2211
- appendBlockSegment(segments, freshRendered, true);
2212
- return;
2213
- }
2214
- appendTextSegment(segments, renderMessagePresentationFallbackText({ presentation }));
2215
- }
2216
- const SLACK_BUTTON_CONTROL_ACTION_IDS = [
2217
- SLACK_APPROVAL_BUTTON_ACTION_ID,
2218
- SLACK_CALLBACK_BUTTON_ACTION_ID,
2219
- SLACK_REPLY_BUTTON_ACTION_ID,
2220
- SLACK_REPLY_LINK_ACTION_ID
2221
- ];
2222
- const SLACK_SELECT_CONTROL_ACTION_IDS = [
2223
- SLACK_APPROVAL_SELECT_ACTION_ID,
2224
- SLACK_CALLBACK_SELECT_ACTION_ID,
2225
- SLACK_REPLY_SELECT_ACTION_ID
2226
- ];
2227
- function readGeneratedSlackControlRowKey(block) {
2228
- const record = block;
2229
- if (record.type !== "actions" || typeof record.block_id !== "string") return;
2230
- const expectedElementType = /^openclaw_reply_buttons_[1-9]\d*$/.test(record.block_id) ? "button" : /^openclaw_reply_select_[1-9]\d*$/.test(record.block_id) ? "static_select" : void 0;
2231
- if (!expectedElementType || !Array.isArray(record.elements) || record.elements.length === 0) return;
2232
- const actionIds = expectedElementType === "button" ? SLACK_BUTTON_CONTROL_ACTION_IDS : SLACK_SELECT_CONTROL_ACTION_IDS;
2233
- const elements = record.elements.map((element) => {
2234
- if (!element || typeof element !== "object" || Array.isArray(element)) return;
2235
- const { action_id: actionId, ...content } = element;
2236
- const actionFamily = typeof actionId === "string" ? actionIds.find((candidate) => actionId.startsWith(`${candidate}:`)) : void 0;
2237
- return actionFamily && content.type === expectedElementType ? [actionFamily, content] : void 0;
2238
- });
2239
- return elements.some((element) => element === void 0) ? void 0 : JSON.stringify(elements);
2240
- }
2241
- function subtractMirroredSlackControlRows(params) {
2242
- const remainingMirrors = /* @__PURE__ */ new Map();
2243
- for (const block of params.presentationBlocks) {
2244
- const key = readGeneratedSlackControlRowKey(block);
2245
- if (key) remainingMirrors.set(key, (remainingMirrors.get(key) ?? 0) + 1);
2246
- }
2247
- return params.interactiveBlocks.filter((block) => {
2248
- const key = readGeneratedSlackControlRowKey(block);
2249
- const remaining = key ? remainingMirrors.get(key) ?? 0 : 0;
2250
- if (!key || remaining === 0) return true;
2251
- remainingMirrors.set(key, remaining - 1);
2252
- return false;
2253
- });
2254
- }
2255
- /**
2256
- * Resolve reply content into transport-order segments. Each blocks segment is
2257
- * one Slack message; text segments carry complete fallback content between it.
2258
- */
2259
- function resolveSlackReplyBlockResolution(payload, options = {}) {
2260
- const segments = [];
2261
- const channelBlocks = readSlackChannelBlocks(payload);
2262
- let compiledChannelBlocks = channelBlocks;
2263
- let authoredTextKnownInBlocks = false;
2264
- if (options.materializeAuthoredText) {
2265
- const rawTextFragments = renderSlackAuthoredTextFragments(channelBlocks);
2266
- const initialPlacement = resolveSlackAuthoredTextPlacement({
2267
- text: payload.text,
2268
- interactive: payload.interactive,
2269
- renderedTextFragments: rawTextFragments
2270
- });
2271
- authoredTextKnownInBlocks = initialPlacement === "blocks";
2272
- const text = normalizeOptionalString(payload.text);
2273
- if (text && initialPlacement === "outside-blocks") {
2274
- const textBlocks = buildSlackAuthoredTextBlocks(text);
2275
- if (resolveSlackAuthoredTextPlacement({
2276
- text: renderSlackAuthoredTextFragments(textBlocks).join(" "),
2277
- renderedTextFragments: rawTextFragments
2278
- }) !== "blocks") compiledChannelBlocks = [...channelBlocks, ...textBlocks];
2279
- authoredTextKnownInBlocks = true;
2280
- }
2281
- }
2282
- if (compiledChannelBlocks.length > 0) appendBlockSegment(segments, compiledChannelBlocks);
2283
- const presentation = normalizeMessagePresentation(payload.presentation);
2284
- const presentationBlockOffset = readAllNativeBlocks(segments).length;
2285
- if (presentation?.title) appendPresentationPart(segments, {
2286
- title: presentation.title,
2287
- blocks: []
2288
- });
2289
- for (const block of presentation?.blocks ?? []) appendPresentationPart(segments, { blocks: [block] });
2290
- const renderedPresentationBlocks = readAllNativeBlocks(segments).slice(presentationBlockOffset);
2291
- appendBlockSegment(segments, subtractMirroredSlackControlRows({
2292
- interactiveBlocks: buildSlackInteractiveBlocks(payload.interactive, resolveSlackBlockOffsets(readAllNativeBlocks(segments))),
2293
- presentationBlocks: renderedPresentationBlocks
2294
- }));
2295
- const renderedTextFragments = segments.flatMap((segment) => {
2296
- if (segment.kind === "text") return [segment.text];
2297
- return renderSlackAuthoredTextFragments(segment.blocks);
2298
- });
2299
- const authoredTextPlacement = resolveSlackAuthoredTextPlacement({
2300
- text: payload.text,
2301
- interactive: payload.interactive,
2302
- renderedTextFragments
2303
- });
2304
- return {
2305
- authoredTextPlacement: authoredTextKnownInBlocks ? "blocks" : authoredTextPlacement,
2306
- segments
2307
- };
2308
- }
2309
- /** Return the single-message native shape when no ordered text fallback is required. */
2310
- function resolveSlackReplyBlocks(payload) {
2311
- const { segments } = resolveSlackReplyBlockResolution(payload);
2312
- return segments.length === 1 && segments[0]?.kind === "blocks" ? segments[0].blocks : void 0;
2313
- }
2314
- //#endregion
2315
- //#region extensions/slack/src/monitor/allow-list.ts
2316
- const SLACK_SLUG_CACHE_MAX = 512;
2317
- const slackSlugCache = /* @__PURE__ */ new Map();
2318
- function normalizeSlackSlug(raw) {
2319
- const key = raw ?? "";
2320
- const cached = slackSlugCache.get(key);
2321
- if (cached !== void 0) return cached;
2322
- const normalized = normalizeHyphenSlug(raw);
2323
- slackSlugCache.set(key, normalized);
2324
- if (slackSlugCache.size > SLACK_SLUG_CACHE_MAX) {
2325
- const oldest = slackSlugCache.keys().next();
2326
- if (!oldest.done) slackSlugCache.delete(oldest.value);
2327
- }
2328
- return normalized;
2329
- }
2330
- function normalizeAllowList(list) {
2331
- return normalizeStringEntries$1(list);
2332
- }
2333
- function normalizeAllowListLower(list) {
2334
- return normalizeStringEntriesLower$1(list);
2335
- }
2336
- function normalizeSlackAllowOwnerEntry(entry) {
2337
- const trimmed = normalizeOptionalLowercaseString(entry);
2338
- if (!trimmed || trimmed === "*") return;
2339
- const withoutPrefix = trimmed.replace(/^(slack:|user:)/, "");
2340
- return /^u[a-z0-9]+$/.test(withoutPrefix) ? withoutPrefix : void 0;
2341
- }
2342
- function resolveSlackAllowListMatch(params) {
2343
- const compiledAllowList = compileAllowlist(params.allowList);
2344
- const id = normalizeOptionalLowercaseString(params.id);
2345
- const name = normalizeOptionalLowercaseString(params.name);
2346
- const slug = normalizeSlackSlug(name);
2347
- return resolveCompiledAllowlistMatch({
2348
- compiledAllowlist: compiledAllowList,
2349
- candidates: [
2350
- {
2351
- value: id,
2352
- source: "id"
2353
- },
2354
- {
2355
- value: id ? `slack:${id}` : void 0,
2356
- source: "prefixed-id"
2357
- },
2358
- {
2359
- value: id ? `user:${id}` : void 0,
2360
- source: "prefixed-user"
2361
- },
2362
- ...params.allowNameMatching === true ? [
2363
- {
2364
- value: name,
2365
- source: "name"
2366
- },
2367
- {
2368
- value: name ? `slack:${name}` : void 0,
2369
- source: "prefixed-name"
2370
- },
2371
- {
2372
- value: slug,
2373
- source: "slug"
2374
- }
2375
- ] : []
2376
- ]
2377
- });
2378
- }
2379
- function allowListMatches(params) {
2380
- return resolveSlackAllowListMatch(params).allowed;
2381
- }
2382
- function resolveSlackUserAllowed(params) {
2383
- const allowList = normalizeAllowListLower(params.allowList);
2384
- if (allowList.length === 0) return true;
2385
- return allowListMatches({
2386
- allowList,
2387
- id: params.userId,
2388
- name: params.userName,
2389
- allowNameMatching: params.allowNameMatching
2390
- });
2391
- }
2392
- //#endregion
2393
- //#region extensions/slack/src/direct-send-admission.ts
2394
- function assertSlackDirectSendAllowed(account) {
2395
- if (account.config.enterpriseOrgInstall === true) throw new Error("unsupported_enterprise_slack_delivery");
2396
- }
2397
- //#endregion
2398
- //#region extensions/slack/src/group-policy.ts
2399
- function buildSlackChannelPolicyScope(params) {
2400
- const channels = params.channels ?? {};
2401
- const tree = { scopes: channels };
2402
- const matchKey = params.candidates.find((candidate) => candidate !== "*" && Object.hasOwn(tree.scopes, candidate)) ?? (Object.hasOwn(tree.scopes, "*") ? "*" : void 0);
2403
- const matchSource = matchKey === void 0 ? void 0 : matchKey === "*" ? "wildcard" : "direct";
2404
- return {
2405
- tree,
2406
- path: matchKey ? [matchKey] : [],
2407
- entry: matchKey ? channels[matchKey] : void 0,
2408
- wildcardEntry: channels["*"],
2409
- matchKey,
2410
- matchSource
2411
- };
2412
- }
2413
- function resolveSlackGroupPolicyScope(params) {
2414
- const accountId = normalizeAccountId(params.accountId ?? resolveDefaultSlackAccountId(params.cfg));
2415
- const channels = mergeSlackAccountConfig(params.cfg, accountId).channels;
2416
- const channelId = params.groupId?.trim();
2417
- const channelName = params.groupChannel?.replace(/^#/, "");
2418
- return buildSlackChannelPolicyScope({
2419
- channels,
2420
- candidates: [
2421
- channelId,
2422
- channelName ? `#${channelName}` : void 0,
2423
- channelName,
2424
- normalizeHyphenSlug(channelName)
2425
- ].filter((candidate) => Boolean(candidate))
2426
- });
2427
- }
2428
- function resolveSlackGroupRequireMention(params) {
2429
- return resolveScopeRequireMention(resolveSlackGroupPolicyScope(params));
2430
- }
2431
- function resolveSlackGroupToolPolicy(params) {
2432
- return resolveScopeToolsPolicy({
2433
- ...resolveSlackGroupPolicyScope(params),
2434
- senderPolicyMode: params.senderPolicyMode,
2435
- senderId: params.senderId,
2436
- senderName: params.senderName,
2437
- senderUsername: params.senderUsername,
2438
- senderE164: params.senderE164
2439
- });
2440
- }
2441
- //#endregion
2442
- export { escapeSlackMrkdwn as $, normalizeSlackOutboundText as A, canRenderSlackPresentation as B, hasSlackNativeDataBlock as C, stripSlackNativeDataBlocks as D, isSlackNativeResponseUrlRejection as E, SLACK_EDIT_TEXT_MAX_BYTES as F, SLACK_REPLY_LINK_ACTION_ID as G, truncateSlackText as H, SLACK_MESSAGE_TEXT_HARD_LIMIT as I, isSlackCallbackActionId as J, SLACK_REPLY_SELECT_ACTION_ID as K, SLACK_TEXT_LIMIT as L, buildSlackCompleteBlocksFallbackText as M, renderSlackBlockFallbackText as N, chunkSlackMrkdwnText as O, resolveSlackAuthoredTextPlacement as P, renderSlackMessagePresentationFallbackText as Q, buildSlackInteractiveBlocks as R, createSlackNativeDataBaseTextConsumer as S, shouldSuppressLocalSlackExecApprovalPrompt as St, isSlackInvalidBlocksResponse as T, truncateSlackTextByUtf8Bytes as U, countSlackTextUtf8Bytes as V, SLACK_REPLY_BUTTON_ACTION_ID as W, decodeSlackQuestionAction as X, isSlackQuestionActionId as Y, resolveSlackQuestionAction as Z, resolveSlackReplyRenderPlan as _, getSlackExecApprovalApprovers as _t, allowListMatches as a, hasSlackPluginApprovers as at, appendSlackNativeDataPlainTextFallback as b, normalizeSlackApproverId as bt, normalizeSlackAllowOwnerEntry as c, normalizeSlackOriginTarget as ct, resolveSlackUserAllowed as d, resolveTurnSourceSlackOriginTarget as dt, decodeSlackApprovalAction as et, hasSlackReplyStructuredContent as f, shouldHandleSlackNativeApprovalRequest as ft, resolveSlackReplyDeliveryMessages as g, isSlackApprovalAuthorizedSender as gt, resolveSlackReplyBlocks as h, getSlackApprovalApprovers as ht, assertSlackDirectSendAllowed as i, validateSlackBlocksArray as it, buildSlackBlocksFallbackText as j, markdownToSlackMrkdwnChunks as k, normalizeSlackSlug as l, resolveSessionSlackOriginTarget as lt, resolveSlackReplyBlockResolution as m, slackTargetsMatch as mt, resolveSlackGroupRequireMention as n, SLACK_MAX_BLOCKS as nt, normalizeAllowList as o, isSlackAnyNativeApprovalClientEnabled as ot, parseSlackReplyBlockSegments as p, shouldHandleSlackPluginViaForwardingSession as pt, isSlackApprovalActionId as q, resolveSlackGroupToolPolicy as r, parseSlackBlocksInput as rt, normalizeAllowListLower as s, normalizeSlackForwardTarget as st, buildSlackChannelPolicyScope as t, SLACK_PRESENTATION_CAPABILITIES as tt, resolveSlackAllowListMatch as u, resolveSlackFallbackOriginTarget as ut, SLACK_MALFORMED_NATIVE_DATA_FALLBACK as v, isSlackExecApprovalAuthorizedSender as vt, isSlackInvalidBlocksError as w, buildSlackNativeDataAccessibilityText as x, resolveSlackExecApprovalTarget as xt, appendSlackNativeDataFallbackText as y, isSlackExecApprovalClientEnabled as yt, buildSlackPresentationBlocks as z };