@openclaw/slack 2026.8.1-beta.3 → 2026.8.2

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 (255) hide show
  1. package/dist/account-configured-sUohAxZr.js +33 -0
  2. package/dist/account-inspect-C3sePHWa.js +87 -0
  3. package/dist/account-inspect-api.js +1 -1
  4. package/dist/{accounts-BlzxuYle.js → accounts-Dm_H77gH.js} +7 -10
  5. package/dist/{accounts.runtime-CbabBL8x.js → accounts.runtime-DRuEK6mL.js} +1 -1
  6. package/dist/{action-runtime-D6jg2CQd.js → action-runtime-B0kRJ69h.js} +90 -75
  7. package/dist/action-runtime.runtime-IuA14rev.js +2 -0
  8. package/dist/{actions-DFk0ANVB.js → actions-BOxiu2Vy.js} +278 -102
  9. package/dist/api.js +15 -15
  10. package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-l5_2JLqi.js} +58 -180
  11. package/dist/{channel-CA5w7qDF.js → channel-BguxhhNG.js} +97 -154
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel-type-CZWv55Wu.js → channel-type-ChkODKBW.js} +3 -3
  15. package/dist/{channel.setup-CpyYsEXH.js → channel.setup-BJohRJha.js} +54 -68
  16. package/dist/{config-schema-CN3XZRX5.js → config-schema-B9GwoRlE.js} +24 -15
  17. package/dist/configured-state.js +34 -0
  18. package/dist/{conversation-binding-route-DFVLUdYF.js → conversation-binding-route-Vee8Dgbf.js} +2 -2
  19. package/dist/{directory-config-BGYyuzWh.js → directory-config-Bmw4ykSy.js} +5 -4
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-DjUJQLbq.js → directory-live-BOILcXPo.js} +2 -2
  22. package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
  23. package/dist/doctor-contract-api.js +1 -1
  24. package/dist/{group-policy-DyfB_ZIE.js → group-policy-BYH74y50.js} +643 -774
  25. package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-BsZbsulu.js} +23 -5
  26. package/dist/message-tool-api.js +1 -1
  27. package/dist/{monitor-Chrecrb9.js → monitor-B72wWXWg.js} +3 -3
  28. package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-CPgYQ-BM.js} +94 -69
  29. package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-CcdujV99.js} +357 -544
  30. package/dist/{policy-BKXSxrIS.js → policy-CUpBeOt9.js} +7 -4
  31. package/dist/{probe-BVA65leh.js → probe-gj5yQgN2.js} +209 -21
  32. package/dist/{provider-CUUiwsg2.js → provider-DW9YC_no.js} +301 -179
  33. package/dist/{relay-source-mhpMMRG-.js → relay-source-BLMdBrAw.js} +6 -4
  34. package/dist/{replies-SnWyXcsL.js → replies-DLjQ8RYU.js} +25 -10
  35. package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-Bv6IiGZ4.js} +4 -3
  36. package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-BXw2pA7y.js} +4 -3
  37. package/dist/runtime-api.js +11 -11
  38. package/dist/{scopes-BSk4GZvZ.js → scopes-B9HRguDe.js} +1 -1
  39. package/dist/{send-CtnOxKCc.js → send-GUz4_v2E.js} +58 -42
  40. package/dist/send-results-eeOu_HYm.js +23 -0
  41. package/dist/{send.runtime-kYctMHSd.js → send.runtime-rScD-UJi.js} +1 -1
  42. package/dist/setup-plugin-api.js +1 -1
  43. package/dist/{setup-surface-BPFfp6So.js → setup-surface-Cc3P-z35.js} +6 -6
  44. package/dist/{shared-DJBaslN7.js → shared-CQGVZ_8a.js} +28 -8
  45. package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-C2015r6s.js} +3 -3
  46. package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
  47. package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.js} +1 -1
  48. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  49. package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
  50. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
  51. package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
  52. package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
  53. package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
  54. package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
  55. package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
  56. package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
  57. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  58. package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
  59. package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
  60. package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
  61. package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
  62. package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
  63. package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
  64. package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
  65. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
  66. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
  67. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
  68. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
  69. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
  70. package/node_modules/@slack/bolt/node_modules/negotiator/lib/accept.js +54 -0
  71. package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
  72. package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
  73. package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
  74. package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
  75. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  76. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
  77. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
  78. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  79. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
  80. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
  81. package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
  82. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
  83. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
  84. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
  85. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
  86. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
  87. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  88. package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
  89. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
  90. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
  91. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
  92. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
  93. package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
  94. package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
  95. package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
  96. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  97. package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
  98. package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
  99. package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
  100. package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
  101. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
  102. package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
  103. package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
  104. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  105. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
  106. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
  107. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
  108. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
  109. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
  110. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
  111. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
  112. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
  113. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  114. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
  115. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
  116. package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
  117. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
  118. package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
  119. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
  120. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
  121. package/node_modules/typebox/build/format/date.d.mts +1 -1
  122. package/node_modules/typebox/build/format/date.mjs +1 -1
  123. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  124. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  125. package/node_modules/typebox/build/format/email.d.mts +1 -1
  126. package/node_modules/typebox/build/format/email.mjs +2 -2
  127. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  128. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  129. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  130. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  131. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  132. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  133. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  134. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  135. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  136. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  137. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  138. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  139. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +41 -0
  140. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  141. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  142. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  143. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  144. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  145. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  146. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  147. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  148. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  149. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  150. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  151. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  152. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  153. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  154. package/node_modules/typebox/build/format/iri.mjs +26 -8
  155. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  156. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  157. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  158. package/node_modules/typebox/build/format/regex.mjs +2 -6
  159. package/node_modules/typebox/build/format/time.d.mts +2 -2
  160. package/node_modules/typebox/build/format/time.mjs +19 -14
  161. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  162. package/node_modules/typebox/build/format/uri.mjs +3 -130
  163. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  164. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  165. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  166. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  167. package/node_modules/typebox/build/format/url.d.mts +3 -3
  168. package/node_modules/typebox/build/format/url.mjs +4 -5
  169. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  170. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  171. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  172. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  173. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  174. package/node_modules/typebox/build/guard/string.mjs +7 -7
  175. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  176. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  177. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  178. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  179. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  180. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  181. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  182. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  183. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  184. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  185. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  186. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  187. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  188. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  189. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  190. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  191. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  192. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  193. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  194. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  195. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  196. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  197. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  198. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  199. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  200. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  201. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  202. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  203. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  204. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  205. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  206. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  207. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  208. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  209. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  210. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  211. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  212. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  213. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  214. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  215. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  216. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  217. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  218. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  219. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  220. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  221. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  222. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  223. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  224. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  225. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  226. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  227. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  228. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  229. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  230. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  231. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  232. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  233. package/node_modules/typebox/package.json +27 -27
  234. package/node_modules/typebox/readme.md +79 -82
  235. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  236. package/node_modules/ws/package.json +1 -1
  237. package/openclaw.plugin.json +14 -6
  238. package/package.json +9 -7
  239. package/dist/account-configured-BwfXBo_F.js +0 -14
  240. package/dist/account-inspect-YJvFBbCR.js +0 -89
  241. package/dist/action-runtime.runtime-JtoOK9l5.js +0 -2
  242. package/dist/actions.runtime-CYLsYRai.js +0 -2
  243. package/dist/runtime-api-DBi7xc_g.js +0 -10
  244. package/dist/slack-client-kind-BXyOOICI.js +0 -94
  245. package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
  246. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  247. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  248. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  249. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  250. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  251. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  252. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  253. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  254. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  255. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
@@ -1,6 +1,6 @@
1
- import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
2
- import { B as SLACK_EDIT_TEXT_MAX_BYTES, Ct as shouldHandleSlackNativeApprovalRequest, Pt as normalizeSlackApproverId, Y as truncateSlackTextByUtf8Bytes, b as resolveSlackReplyBlocks, gt as isSlackAnyNativeApprovalClientEnabled, lt as SLACK_APPROVAL_HEADER_BLOCK_ID } from "./group-policy-DyfB_ZIE.js";
3
- import { r as sendMessageSlack } from "./send-CtnOxKCc.js";
1
+ import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
2
+ import { Dt as normalizeSlackApproverId, R as truncateSlackTextByUtf8Bytes, f as resolveSlackReplyBlocks, gt as shouldHandleSlackNativeApprovalRequest, k as SLACK_EDIT_TEXT_MAX_BYTES, lt as isSlackAnyNativeApprovalClientEnabled, tt as SLACK_APPROVAL_HEADER_BLOCK_ID } from "./group-policy-BYH74y50.js";
3
+ import { r as sendMessageSlack } from "./send-GUz4_v2E.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
6
6
  import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
@@ -46,7 +46,7 @@ function buildSlackMetadataLines(metadata) {
46
46
  }
47
47
  function buildSlackMetadataContextElements(metadata) {
48
48
  const lines = buildSlackMetadataLines(metadata);
49
- const visibleLineCount = lines.length > SLACK_CONTEXT_ELEMENTS_MAX ? SLACK_CONTEXT_ELEMENTS_MAX - 1 : lines.length;
49
+ const visibleLineCount = lines.length > SLACK_CONTEXT_ELEMENTS_MAX ? 9 : lines.length;
50
50
  const elements = [];
51
51
  for (let index = 0; index < visibleLineCount; index += 1) {
52
52
  const line = lines[index];
@@ -90,180 +90,57 @@ function buildSlackPluginRequestBlocks(view) {
90
90
  }
91
91
  }, ...buildSlackMetadataContextBlocks(buildSlackPluginMetadata(view))];
92
92
  }
93
- function buildSlackExecPendingApprovalText(view) {
94
- const metadataLines = buildSlackMetadataLines(view.metadata);
95
- return [
96
- "*Exec approval required*",
97
- "A command needs your approval.",
98
- "",
99
- "*Command*",
100
- buildSlackCodeBlock(view.commandText),
101
- ...metadataLines
102
- ].join("\n");
103
- }
104
- function buildSlackPluginPendingApprovalText(view) {
105
- const metadataLines = buildSlackMetadataLines(buildSlackPluginMetadata(view));
106
- return [
107
- "*Plugin approval required*",
108
- resolveSlackPluginDescription(view),
109
- "",
110
- "*Request*",
111
- view.title,
112
- ...metadataLines
113
- ].join("\n");
114
- }
115
- function buildSlackPendingApprovalText(view) {
116
- return view.approvalKind === "plugin" ? buildSlackPluginPendingApprovalText(view) : buildSlackExecPendingApprovalText(view);
117
- }
118
- function buildSlackExecPendingApprovalBlocks(view) {
119
- const interactiveBlocks = resolveSlackReplyBlocks({
120
- text: "",
121
- presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
122
- }) ?? [];
123
- return [
124
- {
125
- type: "section",
126
- block_id: SLACK_APPROVAL_HEADER_BLOCK_ID,
127
- text: {
128
- type: "mrkdwn",
129
- text: "*Exec approval required*\nA command needs your approval."
130
- }
131
- },
132
- {
133
- type: "section",
134
- text: {
135
- type: "mrkdwn",
136
- text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
137
- }
138
- },
139
- ...buildSlackMetadataContextBlocks(view.metadata),
140
- ...interactiveBlocks
141
- ];
142
- }
143
- function buildSlackPluginPendingApprovalBlocks(view) {
144
- const interactiveBlocks = resolveSlackReplyBlocks({
145
- text: "",
146
- presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
147
- }) ?? [];
148
- return [
149
- {
150
- type: "section",
151
- block_id: SLACK_APPROVAL_HEADER_BLOCK_ID,
152
- text: {
153
- type: "mrkdwn",
154
- text: `*Plugin approval required*\n${truncateSlackMrkdwn(resolveSlackPluginDescription(view), 2600)}`
155
- }
156
- },
157
- ...buildSlackPluginRequestBlocks(view),
158
- ...interactiveBlocks
159
- ];
160
- }
161
- function buildSlackPendingApprovalBlocks(view) {
162
- return view.approvalKind === "plugin" ? buildSlackPluginPendingApprovalBlocks(view) : buildSlackExecPendingApprovalBlocks(view);
163
- }
164
- function buildSlackExecResolvedText(view) {
165
- const resolvedBy = formatSlackApprover(view.resolvedBy);
166
- return [
167
- `*Exec approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*`,
168
- resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.",
169
- "",
170
- "*Command*",
171
- buildSlackCodeBlock(view.commandText)
172
- ].join("\n");
173
- }
174
- function buildSlackPluginResolvedText(view) {
175
- const resolvedBy = formatSlackApprover(view.resolvedBy);
176
- const metadataLines = buildSlackMetadataLines(buildSlackPluginMetadata(view));
177
- return [
178
- `*Plugin approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*`,
179
- resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.",
180
- "",
181
- "*Request*",
182
- view.title,
183
- ...metadataLines
184
- ].join("\n");
185
- }
186
- function buildSlackResolvedText(view) {
187
- return view.approvalKind === "plugin" ? buildSlackPluginResolvedText(view) : buildSlackExecResolvedText(view);
188
- }
189
- function buildSlackExecResolvedBlocks(view) {
190
- const resolvedBy = formatSlackApprover(view.resolvedBy);
191
- return [{
192
- type: "section",
193
- text: {
194
- type: "mrkdwn",
195
- text: `*Exec approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
196
- }
197
- }, {
198
- type: "section",
199
- text: {
200
- type: "mrkdwn",
201
- text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
202
- }
203
- }];
204
- }
205
- function buildSlackPluginResolvedBlocks(view) {
206
- const resolvedBy = formatSlackApprover(view.resolvedBy);
207
- return [{
208
- type: "section",
209
- text: {
210
- type: "mrkdwn",
211
- text: `*Plugin approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
212
- }
213
- }, ...buildSlackPluginRequestBlocks(view)];
214
- }
215
- function buildSlackResolvedBlocks(view) {
216
- return view.approvalKind === "plugin" ? buildSlackPluginResolvedBlocks(view) : buildSlackExecResolvedBlocks(view);
217
- }
218
- function buildSlackExecExpiredText(view) {
219
- return [
220
- "*Exec approval expired*",
221
- "This approval request expired before it was resolved.",
222
- "",
223
- "*Command*",
224
- buildSlackCodeBlock(view.commandText)
225
- ].join("\n");
226
- }
227
- function buildSlackPluginExpiredText(view) {
228
- const metadataLines = buildSlackMetadataLines(buildSlackPluginMetadata(view));
229
- return [
230
- "*Plugin approval expired*",
231
- "This approval request expired before it was resolved.",
93
+ function buildSlackApprovalPayload(input) {
94
+ const { phase, view } = input;
95
+ const isPlugin = view.approvalKind === "plugin";
96
+ const approvalName = isPlugin ? "Plugin" : "Exec";
97
+ let heading;
98
+ let description;
99
+ if (phase === "pending") {
100
+ heading = `*${approvalName} approval required*`;
101
+ description = view.approvalKind === "plugin" ? resolveSlackPluginDescription(view) : "A command needs your approval.";
102
+ } else if (phase === "resolved") {
103
+ heading = `*${approvalName} approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*`;
104
+ const resolvedBy = formatSlackApprover(view.resolvedBy);
105
+ description = resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.";
106
+ } else {
107
+ heading = `*${approvalName} approval expired*`;
108
+ description = "This approval request expired before it was resolved.";
109
+ }
110
+ const metadata = isPlugin ? buildSlackPluginMetadata(view) : view.metadata;
111
+ const bodyLabel = isPlugin ? "*Request*" : "*Command*";
112
+ const bodyText = isPlugin ? view.title : buildSlackCodeBlock(view.commandText);
113
+ const text = [
114
+ heading,
115
+ description,
232
116
  "",
233
- "*Request*",
234
- view.title,
235
- ...metadataLines
117
+ bodyLabel,
118
+ bodyText,
119
+ ...isPlugin || phase === "pending" ? buildSlackMetadataLines(metadata) : []
236
120
  ].join("\n");
237
- }
238
- function buildSlackExpiredText(view) {
239
- return view.approvalKind === "plugin" ? buildSlackPluginExpiredText(view) : buildSlackExecExpiredText(view);
240
- }
241
- function buildSlackExecExpiredBlocks(view) {
242
- return [{
121
+ const headerDescription = isPlugin && phase === "pending" ? truncateSlackMrkdwn(description, 2600) : description;
122
+ const blocks = [{
243
123
  type: "section",
124
+ ...phase === "pending" ? { block_id: SLACK_APPROVAL_HEADER_BLOCK_ID } : {},
244
125
  text: {
245
126
  type: "mrkdwn",
246
- text: "*Exec approval expired*\nThis approval request expired before it was resolved."
127
+ text: `${heading}\n${headerDescription}`
247
128
  }
248
- }, {
129
+ }, ...view.approvalKind === "plugin" ? buildSlackPluginRequestBlocks(view) : [{
249
130
  type: "section",
250
131
  text: {
251
132
  type: "mrkdwn",
252
133
  text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
253
134
  }
254
- }];
255
- }
256
- function buildSlackPluginExpiredBlocks(view) {
257
- return [{
258
- type: "section",
259
- text: {
260
- type: "mrkdwn",
261
- text: "*Plugin approval expired*\nThis approval request expired before it was resolved."
262
- }
263
- }, ...buildSlackPluginRequestBlocks(view)];
264
- }
265
- function buildSlackExpiredBlocks(view) {
266
- return view.approvalKind === "plugin" ? buildSlackPluginExpiredBlocks(view) : buildSlackExecExpiredBlocks(view);
135
+ }, ...phase === "pending" ? buildSlackMetadataContextBlocks(view.metadata) : []]];
136
+ if (phase === "pending") blocks.push(...resolveSlackReplyBlocks({
137
+ text: "",
138
+ presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
139
+ }) ?? []);
140
+ return {
141
+ text,
142
+ blocks
143
+ };
267
144
  }
268
145
  async function updateMessage(params) {
269
146
  try {
@@ -299,23 +176,23 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
299
176
  }
300
177
  },
301
178
  presentation: {
302
- buildPendingPayload: ({ view }) => ({
303
- text: buildSlackPendingApprovalText(view),
304
- blocks: buildSlackPendingApprovalBlocks(view)
179
+ buildPendingPayload: ({ view }) => buildSlackApprovalPayload({
180
+ phase: "pending",
181
+ view
305
182
  }),
306
183
  buildResolvedResult: ({ view }) => ({
307
184
  kind: "update",
308
- payload: {
309
- text: buildSlackResolvedText(view),
310
- blocks: buildSlackResolvedBlocks(view)
311
- }
185
+ payload: buildSlackApprovalPayload({
186
+ phase: "resolved",
187
+ view
188
+ })
312
189
  }),
313
190
  buildExpiredResult: ({ view }) => ({
314
191
  kind: "update",
315
- payload: {
316
- text: buildSlackExpiredText(view),
317
- blocks: buildSlackExpiredBlocks(view)
318
- }
192
+ payload: buildSlackApprovalPayload({
193
+ phase: "expired",
194
+ view
195
+ })
319
196
  })
320
197
  },
321
198
  transport: {
@@ -395,10 +272,11 @@ async function resolveApprovalChannel(client, target, teamId) {
395
272
  const parsed = parseSlackTarget(target, { defaultKind: "channel" });
396
273
  if (!parsed) throw new Error("Slack approval delivery target is missing");
397
274
  if (parsed.kind === "channel") return `channel:${parsed.id}`;
398
- const channelId = normalizeOptionalString((await client.conversations.open({
275
+ const opened = await client.conversations.open({
399
276
  users: parsed.id,
400
277
  return_im: true
401
- })).channel?.id);
278
+ });
279
+ const channelId = normalizeOptionalString(opened.channel?.id);
402
280
  if (!channelId) throw new Error("Slack Enterprise Grid approval DM did not return a channel id");
403
281
  return `channel:${channelId}`;
404
282
  }