@openclaw/slack 2026.8.1-beta.2 → 2026.9.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/dist/account-configured-sUohAxZr.js +33 -0
  2. package/dist/account-inspect-CN2hBsim.js +87 -0
  3. package/dist/account-inspect-api.js +1 -1
  4. package/dist/{accounts-CK4AVI2_.js → accounts-Dm_H77gH.js} +12 -11
  5. package/dist/{accounts.runtime-Cb7QwWBz.js → accounts.runtime-DRuEK6mL.js} +1 -1
  6. package/dist/{action-runtime-BkGe7ny_.js → action-runtime-BoSeX09X.js} +76 -83
  7. package/dist/action-runtime.runtime-Dpa16J87.js +2 -0
  8. package/dist/{actions-BTDXwwE3.js → actions-XdQyjG_p.js} +134 -262
  9. package/dist/api.js +14 -14
  10. package/dist/{approval-handler.runtime-CJaNzAq2.js → approval-handler.runtime-DxXfGX_Z.js} +53 -174
  11. package/dist/{channel-D_tovcUL.js → channel-C_vnTgxo.js} +117 -72
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel-type-B9MSdoGN.js → channel-type-j-2lalcC.js} +3 -7
  15. package/dist/{channel.setup-Bch9dYmA.js → channel.setup-aal8tokM.js} +34 -49
  16. package/dist/{config-schema-xto5jFIx.js → config-schema-CN3XZRX5.js} +23 -7
  17. package/dist/configured-state.js +34 -0
  18. package/dist/conversation-binding-route-DFVLUdYF.js +115 -0
  19. package/dist/{directory-config-CNBz8lJa.js → directory-config-DqfQ42OV.js} +1 -1
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-CFKUtW9E.js → directory-live-lC6X_Ru-.js} +2 -2
  22. package/dist/{group-policy-c4RP9bjc.js → group-policy-CU1tEGpS.js} +583 -642
  23. package/dist/{message-tool-api-BykQB4AU.js → message-tool-api-CWosHSi5.js} +6 -5
  24. package/dist/message-tool-api.js +1 -1
  25. package/dist/{monitor-1nF1NtqT.js → monitor-DrNCGneD.js} +3 -3
  26. package/dist/{outbound-adapter-S81tsswN.js → outbound-adapter-DkT2vUE9.js} +50 -19
  27. package/dist/{pipeline.runtime-BvYsM5JO.js → pipeline.runtime-CRRng_Nw.js} +440 -451
  28. package/dist/{policy-TapwbeaT.js → policy-BoP6t88v.js} +1 -1
  29. package/dist/{probe-HoEg_WxB.js → probe-4_aHtVT3.js} +2 -21
  30. package/dist/{provider-CDNvBXUi.js → provider-D4nDgxCh.js} +240 -95
  31. package/dist/{relay-source-C9leF11u.js → relay-source-CEmze11m.js} +1 -1
  32. package/dist/{replies-CeOfv82I.js → replies-D9XMM_S0.js} +47 -26
  33. package/dist/{resolve-channels-CNPrxaXY.js → resolve-channels-DSamDgVs.js} +1 -1
  34. package/dist/{resolve-users-Dzomuwnr.js → resolve-users-CIzwbaJR.js} +1 -1
  35. package/dist/runtime-api.js +11 -11
  36. package/dist/{scopes-cYXKkrRD.js → scopes-BBrUzpBH.js} +1 -1
  37. package/dist/security-contract-api.js +1 -1
  38. package/dist/{send-Nor0iBwY.js → send-DtjEnlLh.js} +86 -98
  39. package/dist/{send.runtime-BmgNe6S9.js → send.runtime-DQeNKa2J.js} +1 -1
  40. package/dist/setup-plugin-api.js +1 -1
  41. package/dist/{setup-surface-CbX1-Knh.js → setup-surface-CsBCM4rP.js} +6 -6
  42. package/dist/{shared-zdT5AMp-.js → shared-D9GeeR9K.js} +33 -9
  43. package/dist/{block-text-YtiNkqmx.js → slack-client-kind-hSfjXyUM.js} +17 -2
  44. package/dist/{slash-dispatch.runtime-Bnr9GR1S.js → slash-dispatch.runtime-Chr3YHnT.js} +3 -3
  45. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  46. package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
  47. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
  48. package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
  49. package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
  50. package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
  51. package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
  52. package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
  53. package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
  54. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  55. package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
  56. package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
  57. package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
  58. package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
  59. package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
  60. package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
  61. package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
  62. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
  63. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
  64. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
  65. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
  66. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
  67. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
  68. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
  69. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
  70. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
  71. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
  72. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  73. package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
  74. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
  75. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
  76. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
  77. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
  78. package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
  79. package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
  80. package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
  81. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  82. package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
  83. package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
  84. package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
  85. package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
  86. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
  87. package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
  88. package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
  89. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  90. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
  91. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
  92. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
  93. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
  94. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
  95. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
  96. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
  97. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
  98. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  99. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
  100. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
  101. package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
  102. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
  103. package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
  104. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
  105. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
  106. package/node_modules/typebox/build/format/date.d.mts +1 -1
  107. package/node_modules/typebox/build/format/date.mjs +1 -1
  108. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  109. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  110. package/node_modules/typebox/build/format/email.d.mts +1 -1
  111. package/node_modules/typebox/build/format/email.mjs +2 -2
  112. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  113. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  114. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  115. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  116. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  117. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  118. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  119. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  120. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  121. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  122. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  123. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  124. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  125. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  126. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  127. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  128. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  129. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  130. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  131. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  132. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  133. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  134. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  135. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  136. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  137. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  138. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  139. package/node_modules/typebox/build/format/iri.mjs +26 -8
  140. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  141. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  142. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  143. package/node_modules/typebox/build/format/regex.mjs +2 -6
  144. package/node_modules/typebox/build/format/time.d.mts +2 -2
  145. package/node_modules/typebox/build/format/time.mjs +19 -14
  146. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  147. package/node_modules/typebox/build/format/uri.mjs +3 -130
  148. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  149. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  150. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  151. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  152. package/node_modules/typebox/build/format/url.d.mts +3 -3
  153. package/node_modules/typebox/build/format/url.mjs +4 -5
  154. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  155. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  156. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  157. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  158. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  159. package/node_modules/typebox/build/guard/string.mjs +7 -7
  160. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  161. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  162. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  163. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  164. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  165. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  166. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  167. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  168. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  169. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  170. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  171. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  172. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  173. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  174. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  175. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  176. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  177. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  178. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  179. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  180. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  181. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  182. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  183. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  184. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  185. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  186. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  187. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  188. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  189. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  190. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  191. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  192. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  193. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  194. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  195. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  196. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  197. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  198. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  199. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  200. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  201. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  202. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  203. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  204. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  205. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  206. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  207. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  208. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  209. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  210. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  211. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  212. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  213. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  214. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  215. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  216. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  217. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  218. package/node_modules/typebox/package.json +27 -27
  219. package/node_modules/typebox/readme.md +79 -82
  220. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  221. package/node_modules/ws/package.json +1 -1
  222. package/openclaw.plugin.json +43 -1
  223. package/package.json +9 -9
  224. package/dist/account-configured-BwfXBo_F.js +0 -14
  225. package/dist/account-inspect-Drw2gAiN.js +0 -89
  226. package/dist/account-reply-mode-DrUXogvO.js +0 -14
  227. package/dist/action-runtime.runtime-D9I6uc0Q.js +0 -2
  228. package/dist/actions.runtime-DLFyUkvg.js +0 -2
  229. package/dist/runtime-api-Cj9nxBNv.js +0 -10
  230. package/node_modules/p-map/index.d.ts +0 -155
  231. package/node_modules/p-map/index.js +0 -285
  232. package/node_modules/p-map/license +0 -9
  233. package/node_modules/p-map/package.json +0 -57
  234. package/node_modules/p-map/readme.md +0 -190
  235. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  236. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  237. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  238. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  239. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  240. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  241. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  242. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  243. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  244. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
  245. package/dist/{security-audit-DR097212.js → security-audit-B_yKr7MW.js} +1 -1
@@ -1,6 +1,6 @@
1
1
  import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
2
- import { At as normalizeSlackApproverId, K as truncateSlackTextByUtf8Bytes, L as SLACK_EDIT_TEXT_MAX_BYTES, _ as resolveSlackReplyBlocks, ft as isSlackAnyNativeApprovalClientEnabled, yt as shouldHandleSlackNativeApprovalRequest } from "./group-policy-c4RP9bjc.js";
3
- import { r as sendMessageSlack } from "./send-Nor0iBwY.js";
2
+ import { Ft as normalizeSlackApproverId, K as truncateSlackTextByUtf8Bytes, L as SLACK_EDIT_TEXT_MAX_BYTES, _t as isSlackAnyNativeApprovalClientEnabled, b as resolveSlackReplyBlocks, lt as SLACK_APPROVAL_HEADER_BLOCK_ID, wt as shouldHandleSlackNativeApprovalRequest } from "./group-policy-CU1tEGpS.js";
3
+ import { r as sendMessageSlack } from "./send-DtjEnlLh.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";
@@ -90,178 +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
- text: {
127
- type: "mrkdwn",
128
- text: "*Exec approval required*\nA command needs your approval."
129
- }
130
- },
131
- {
132
- type: "section",
133
- text: {
134
- type: "mrkdwn",
135
- text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
136
- }
137
- },
138
- ...buildSlackMetadataContextBlocks(view.metadata),
139
- ...interactiveBlocks
140
- ];
141
- }
142
- function buildSlackPluginPendingApprovalBlocks(view) {
143
- const interactiveBlocks = resolveSlackReplyBlocks({
144
- text: "",
145
- presentation: buildApprovalPresentationFromActionDescriptors(view.actions)
146
- }) ?? [];
147
- return [
148
- {
149
- type: "section",
150
- text: {
151
- type: "mrkdwn",
152
- text: `*Plugin approval required*\n${truncateSlackMrkdwn(resolveSlackPluginDescription(view), 2600)}`
153
- }
154
- },
155
- ...buildSlackPluginRequestBlocks(view),
156
- ...interactiveBlocks
157
- ];
158
- }
159
- function buildSlackPendingApprovalBlocks(view) {
160
- return view.approvalKind === "plugin" ? buildSlackPluginPendingApprovalBlocks(view) : buildSlackExecPendingApprovalBlocks(view);
161
- }
162
- function buildSlackExecResolvedText(view) {
163
- const resolvedBy = formatSlackApprover(view.resolvedBy);
164
- return [
165
- `*Exec approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*`,
166
- resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.",
167
- "",
168
- "*Command*",
169
- buildSlackCodeBlock(view.commandText)
170
- ].join("\n");
171
- }
172
- function buildSlackPluginResolvedText(view) {
173
- const resolvedBy = formatSlackApprover(view.resolvedBy);
174
- const metadataLines = buildSlackMetadataLines(buildSlackPluginMetadata(view));
175
- return [
176
- `*Plugin approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*`,
177
- resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved.",
178
- "",
179
- "*Request*",
180
- view.title,
181
- ...metadataLines
182
- ].join("\n");
183
- }
184
- function buildSlackResolvedText(view) {
185
- return view.approvalKind === "plugin" ? buildSlackPluginResolvedText(view) : buildSlackExecResolvedText(view);
186
- }
187
- function buildSlackExecResolvedBlocks(view) {
188
- const resolvedBy = formatSlackApprover(view.resolvedBy);
189
- return [{
190
- type: "section",
191
- text: {
192
- type: "mrkdwn",
193
- text: `*Exec approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
194
- }
195
- }, {
196
- type: "section",
197
- text: {
198
- type: "mrkdwn",
199
- text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
200
- }
201
- }];
202
- }
203
- function buildSlackPluginResolvedBlocks(view) {
204
- const resolvedBy = formatSlackApprover(view.resolvedBy);
205
- return [{
206
- type: "section",
207
- text: {
208
- type: "mrkdwn",
209
- text: `*Plugin approval: ${resolveSlackApprovalDecisionLabel(view.decision)}*\n${resolvedBy ? `Resolved by ${resolvedBy}.` : "Resolved."}`
210
- }
211
- }, ...buildSlackPluginRequestBlocks(view)];
212
- }
213
- function buildSlackResolvedBlocks(view) {
214
- return view.approvalKind === "plugin" ? buildSlackPluginResolvedBlocks(view) : buildSlackExecResolvedBlocks(view);
215
- }
216
- function buildSlackExecExpiredText(view) {
217
- return [
218
- "*Exec approval expired*",
219
- "This approval request expired before it was resolved.",
220
- "",
221
- "*Command*",
222
- buildSlackCodeBlock(view.commandText)
223
- ].join("\n");
224
- }
225
- function buildSlackPluginExpiredText(view) {
226
- const metadataLines = buildSlackMetadataLines(buildSlackPluginMetadata(view));
227
- return [
228
- "*Plugin approval expired*",
229
- "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,
230
116
  "",
231
- "*Request*",
232
- view.title,
233
- ...metadataLines
117
+ bodyLabel,
118
+ bodyText,
119
+ ...isPlugin || phase === "pending" ? buildSlackMetadataLines(metadata) : []
234
120
  ].join("\n");
235
- }
236
- function buildSlackExpiredText(view) {
237
- return view.approvalKind === "plugin" ? buildSlackPluginExpiredText(view) : buildSlackExecExpiredText(view);
238
- }
239
- function buildSlackExecExpiredBlocks(view) {
240
- return [{
121
+ const headerDescription = isPlugin && phase === "pending" ? truncateSlackMrkdwn(description, 2600) : description;
122
+ const blocks = [{
241
123
  type: "section",
124
+ ...phase === "pending" ? { block_id: SLACK_APPROVAL_HEADER_BLOCK_ID } : {},
242
125
  text: {
243
126
  type: "mrkdwn",
244
- text: "*Exec approval expired*\nThis approval request expired before it was resolved."
127
+ text: `${heading}\n${headerDescription}`
245
128
  }
246
- }, {
129
+ }, ...view.approvalKind === "plugin" ? buildSlackPluginRequestBlocks(view) : [{
247
130
  type: "section",
248
131
  text: {
249
132
  type: "mrkdwn",
250
133
  text: `*Command*\n${buildSlackCodeBlock(truncateSlackMrkdwn(view.commandText, 2600))}`
251
134
  }
252
- }];
253
- }
254
- function buildSlackPluginExpiredBlocks(view) {
255
- return [{
256
- type: "section",
257
- text: {
258
- type: "mrkdwn",
259
- text: "*Plugin approval expired*\nThis approval request expired before it was resolved."
260
- }
261
- }, ...buildSlackPluginRequestBlocks(view)];
262
- }
263
- function buildSlackExpiredBlocks(view) {
264
- 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
+ };
265
144
  }
266
145
  async function updateMessage(params) {
267
146
  try {
@@ -297,23 +176,23 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
297
176
  }
298
177
  },
299
178
  presentation: {
300
- buildPendingPayload: ({ view }) => ({
301
- text: buildSlackPendingApprovalText(view),
302
- blocks: buildSlackPendingApprovalBlocks(view)
179
+ buildPendingPayload: ({ view }) => buildSlackApprovalPayload({
180
+ phase: "pending",
181
+ view
303
182
  }),
304
183
  buildResolvedResult: ({ view }) => ({
305
184
  kind: "update",
306
- payload: {
307
- text: buildSlackResolvedText(view),
308
- blocks: buildSlackResolvedBlocks(view)
309
- }
185
+ payload: buildSlackApprovalPayload({
186
+ phase: "resolved",
187
+ view
188
+ })
310
189
  }),
311
190
  buildExpiredResult: ({ view }) => ({
312
191
  kind: "update",
313
- payload: {
314
- text: buildSlackExpiredText(view),
315
- blocks: buildSlackExpiredBlocks(view)
316
- }
192
+ payload: buildSlackApprovalPayload({
193
+ phase: "expired",
194
+ view
195
+ })
317
196
  })
318
197
  },
319
198
  transport: {
@@ -1,20 +1,20 @@
1
- import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-CK4AVI2_.js";
2
- import { t as resolveSlackReplyToMode } from "./account-reply-mode-DrUXogvO.js";
1
+ import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAxZr.js";
2
+ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, l as resolveSlackOperationToken, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom } from "./accounts-Dm_H77gH.js";
3
+ import { n as resolveSlackConversationBindingRoute, r as resolveSlackReplyToMode, t as normalizeSlackRouteBindingConfig } from "./conversation-binding-route-DFVLUdYF.js";
3
4
  import { a as parseSlackTarget, i as normalizeSlackMessagingTarget, n as formatSlackTarget, o as resolveSlackChannelId, r as looksLikeSlackTargetId, t as canonicalizeSlackApiTargetId } from "./target-parsing-BnMD2ZqZ.js";
4
5
  import { t as slackContextTargetsMatch } from "./targets-Cx5W_n3W.js";
5
- import { B as SLACK_TEXT_LIMIT, Ct as isSlackWorkspaceInstallation, Dt as getSlackExecApprovalApprovers, Et as isSlackApprovalAuthorizedSender, H as buildSlackPresentationBlocks, L as SLACK_EDIT_TEXT_MAX_BYTES, Mt as shouldSuppressLocalSlackExecApprovalPrompt, Ot as isSlackExecApprovalAuthorizedSender, Tt as getSlackApprovalApprovers, U as canRenderSlackPresentation, W as countSlackTextUtf8Bytes, _ as resolveSlackReplyBlocks, _t as resolveSlackFallbackOriginTarget, bt as shouldHandleSlackPluginViaForwardingSession, dt as hasSlackPluginApprovers, ft as isSlackAnyNativeApprovalClientEnabled, g as resolveSlackReplyBlockResolution, gt as resolveSessionSlackOriginTarget, ht as resolveEnterpriseApprovalTeamId, i as resolveSlackGroupToolPolicy, it as renderSlackMessagePresentationFallbackText, jt as resolveSlackExecApprovalTarget, kt as isSlackExecApprovalClientEnabled, mt as normalizeSlackOriginTarget, p as assertSlackDetachedTargetAllowed, pt as normalizeSlackForwardTarget, r as resolveSlackGroupRequireMention, st as SLACK_PRESENTATION_CAPABILITIES, v as resolveSlackReplyDeliveryMessages, vt as resolveTurnSourceSlackOriginTarget, xt as slackTargetsMatch, yt as shouldHandleSlackNativeApprovalRequest } from "./group-policy-c4RP9bjc.js";
6
- import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.js";
6
+ import { At as getSlackApprovalApprovers, B as SLACK_TEXT_LIMIT, Ct as resolveTurnSourceSlackOriginTarget, Dt as getSlackInstallationKind, Et as slackTargetsMatch, H as buildSlackPresentationBlocks, It as resolveSlackExecApprovalTarget, L as SLACK_EDIT_TEXT_MAX_BYTES, Lt as shouldSuppressLocalSlackExecApprovalPrompt, Mt as getSlackExecApprovalApprovers, Nt as isSlackExecApprovalAuthorizedSender, Ot as isSlackWorkspaceInstallation, Pt as isSlackExecApprovalClientEnabled, St as resolveSlackFallbackOriginTarget, Tt as shouldHandleSlackPluginViaForwardingSession, U as canRenderSlackPresentation, W as countSlackTextUtf8Bytes, _t as isSlackAnyNativeApprovalClientEnabled, a as qualifySlackConversationId, b as resolveSlackReplyBlocks, bt as resolveEnterpriseApprovalTeamId, dt as SLACK_PRESENTATION_CAPABILITIES, g as assertSlackDetachedTargetAllowed, gt as hasSlackPluginApprovers, i as resolveSlackGroupToolPolicy, jt as isSlackApprovalAuthorizedSender, o as qualifySlackRoutePeerId, ot as normalizeSlackOutboundText, r as resolveSlackGroupRequireMention, st as renderSlackMessagePresentationFallbackText, vt as normalizeSlackForwardTarget, wt as shouldHandleSlackNativeApprovalRequest, x as resolveSlackReplyDeliveryMessages, xt as resolveSessionSlackOriginTarget, y as resolveSlackReplyBlockResolution, yt as normalizeSlackOriginTarget, zt as resolveSlackAutoThreadId } from "./group-policy-CU1tEGpS.js";
7
7
  import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
8
- import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-BykQB4AU.js";
9
- import { S as resolveConfiguredFromRequiredCredentialStatuses, d as getSlackWriteClient, r as formatSlackError, v as DEFAULT_ACCOUNT_ID$1, x as projectCredentialSnapshotFields, y as PAIRING_APPROVED_MESSAGE } from "./probe-HoEg_WxB.js";
10
- import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-B9MSdoGN.js";
8
+ import { n as extractSlackToolSend, t as describeSlackMessageTool } from "./message-tool-api-CWosHSi5.js";
9
+ import { a as PAIRING_APPROVED_MESSAGE, i as DEFAULT_ACCOUNT_ID$1, n as slackConfigAdapter, o as projectCredentialSnapshotFields, r as slackSecurityAdapter, s as resolveConfiguredFromRequiredCredentialStatuses, t as createSlackPluginBase } from "./shared-D9GeeR9K.js";
10
+ import { d as getSlackWriteClient, r as formatSlackError } from "./probe-4_aHtVT3.js";
11
+ import { n as resolveSlackChannelType, r as resolveSlackConversationInfo } from "./channel-type-j-2lalcC.js";
11
12
  import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
12
- import { n as slackConfigAdapter, r as slackSecurityAdapter, t as createSlackPluginBase } from "./shared-zdT5AMp-.js";
13
- import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-Bch9dYmA.js";
13
+ import { a as slackSetupContract, i as createSlackSetupWizardProxy, o as SLACK_CHANNEL } from "./channel.setup-aal8tokM.js";
14
14
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
15
15
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
16
16
  import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
17
- import { buildOutboundBaseSessionKey, normalizeMessageChannel } from "openclaw/plugin-sdk/routing";
17
+ import { buildOutboundBaseSessionKey, normalizeMessageChannel, resolveAgentRoute } from "openclaw/plugin-sdk/routing";
18
18
  import { buildLegacyDmAccountAllowlistAdapter, createAccountScopedAllowlistNameResolver, createFlatAllowlistOverrideResolver } from "openclaw/plugin-sdk/allowlist-config-edit";
19
19
  import { buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
20
20
  import { createChannelMessageAdapterFromOutbound, createRuntimeOutboundDelegates, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
@@ -24,28 +24,13 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
24
24
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
25
25
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
26
26
  import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
27
- import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";
28
27
  import { createApproverRestrictedNativeApprovalCapability } from "openclaw/plugin-sdk/approval-delivery-runtime";
29
28
  import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
30
29
  import { createChannelNativeOriginTargetResolver, createNativeApprovalForwardingFallbackSuppressor } from "openclaw/plugin-sdk/approval-native-runtime";
31
30
  import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
32
31
  import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
33
32
  import { normalizeLegacyInteractiveReply, normalizeMessagePresentation } from "openclaw/plugin-sdk/interactive-runtime";
34
- import { readPositiveIntegerParam, readStringParam } from "openclaw/plugin-sdk/param-readers";
35
- //#region extensions/slack/src/action-threading.ts
36
- function resolveSlackAutoThreadId(params) {
37
- const context = params.toolContext;
38
- if (!context?.currentChannelId && !context?.currentMessagingTarget) return;
39
- if (!slackContextTargetsMatch(params.to, context)) return;
40
- if (!context.currentThreadTs) {
41
- if (context.sameChannelThreadRequired) throw new Error("Slack thread context is required for same-channel replies from a threaded Slack turn. Set topLevel=true or threadId=null to post at the channel root.");
42
- return;
43
- }
44
- if (context.replyToMode !== "all" && !isSingleUseReplyToMode(context.replyToMode ?? "off")) return;
45
- if (isSingleUseReplyToMode(context.replyToMode ?? "off") && context.hasRepliedRef?.value) return;
46
- return context.currentThreadTs;
47
- }
48
- //#endregion
33
+ import { readPositiveIntegerParam as readPositiveIntegerParam$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/param-readers";
49
34
  //#region extensions/slack/src/approval-native.ts
50
35
  function resolveSlackNativeSuppressionAccountId({ target, request }) {
51
36
  return normalizeOptionalString(target.accountId) ?? normalizeOptionalString(request.request.turnSourceAccountId);
@@ -145,7 +130,7 @@ const baseSlackApprovalCapability = createApproverRestrictedNativeApprovalCapabi
145
130
  approvalKind,
146
131
  request
147
132
  }),
148
- load: async () => (await import("./approval-handler.runtime-CJaNzAq2.js")).slackApprovalNativeRuntime
133
+ load: async () => (await import("./approval-handler.runtime-DxXfGX_Z.js")).slackApprovalNativeRuntime
149
134
  })
150
135
  });
151
136
  const baseSlackNativeAdapter = baseSlackApprovalCapability.native;
@@ -207,7 +192,7 @@ function resolveSlackPresentationText(content, presentation) {
207
192
  }
208
193
  function renderSlackActionPresentation(presentation) {
209
194
  if (!presentation) return { usesPresentationTextFallback: false };
210
- const renderedBlocks = canRenderSlackPresentation(presentation) ? buildSlackPresentationBlocks(presentation) : void 0;
195
+ const renderedBlocks = !presentation.blocks.some((block) => (block.type === "text" || block.type === "context") && block.text.trim().length > 3e3) && canRenderSlackPresentation(presentation) ? buildSlackPresentationBlocks(presentation) : void 0;
211
196
  const usesPresentationTextFallback = !renderedBlocks || renderedBlocks.length > 50;
212
197
  const blocks = usesPresentationTextFallback ? void 0 : renderedBlocks;
213
198
  return {
@@ -221,16 +206,16 @@ async function handleSlackMessageAction(params) {
221
206
  const { action, cfg, params: actionParams } = ctx;
222
207
  const accountId = ctx.accountId ?? void 0;
223
208
  const resolveChannelId = () => {
224
- const channelId = readStringParam(actionParams, "channelId") ?? readStringParam(actionParams, "to", { required: true });
209
+ const channelId = readStringParam$1(actionParams, "channelId") ?? readStringParam$1(actionParams, "to", { required: true });
225
210
  return normalizeChannelId ? normalizeChannelId(channelId) : channelId;
226
211
  };
227
212
  if (action === "send") {
228
- const to = readStringParam(actionParams, "to", { required: true });
229
- const content = readStringParam(actionParams, "message", {
213
+ const to = readStringParam$1(actionParams, "to", { required: true });
214
+ const content = readStringParam$1(actionParams, "message", {
230
215
  required: false,
231
216
  allowEmpty: true
232
217
  });
233
- const mediaUrl = readStringParam(actionParams, "media", { trim: false });
218
+ const mediaUrl = readStringParam$1(actionParams, "media", { trim: false });
234
219
  const presentation = normalizeMessagePresentation(actionParams.presentation);
235
220
  const interactive = normalizeLegacyInteractiveReply(actionParams.interactive);
236
221
  const hasStructuredContent = Boolean(presentation || interactive?.blocks.length);
@@ -247,8 +232,8 @@ async function handleSlackMessageAction(params) {
247
232
  if (!content && preparedMessages.length === 0 && !mediaUrl) throw new Error("Slack send requires message, blocks, or media.");
248
233
  const replyBroadcast = readBooleanParam(actionParams, "replyBroadcast");
249
234
  if (replyBroadcast && mediaUrl) throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");
250
- const threadId = readStringParam(actionParams, "threadId");
251
- const replyTo = readStringParam(actionParams, "replyTo");
235
+ const threadId = readStringParam$1(actionParams, "threadId");
236
+ const replyTo = readStringParam$1(actionParams, "replyTo");
252
237
  const topLevel = readBooleanParam(actionParams, "topLevel") === true || actionParams.threadId === null;
253
238
  const toolContext = preparedMessages.length > 0 ? {
254
239
  ...ctx.toolContext,
@@ -261,7 +246,10 @@ async function handleSlackMessageAction(params) {
261
246
  mediaUrl: mediaUrl ?? void 0,
262
247
  ...readSlackForceDocument(actionParams) ? { forceDocument: true } : {},
263
248
  accountId,
264
- threadTs: threadId ?? replyTo ?? void 0,
249
+ threadTs: resolveSlackThreadTsValue({
250
+ replyToId: replyTo,
251
+ threadId
252
+ }),
265
253
  ...topLevel ? { topLevel: true } : {},
266
254
  ...replyBroadcast ? { replyBroadcast } : {}
267
255
  }, cfg, toolContext);
@@ -273,7 +261,7 @@ async function handleSlackMessageAction(params) {
273
261
  });
274
262
  if (messageIdRaw == null) throw new Error("messageId required. Provide messageId explicitly or react to the current inbound message.");
275
263
  const messageId = String(messageIdRaw);
276
- const emoji = readStringParam(actionParams, "emoji", { allowEmpty: true });
264
+ const emoji = readStringParam$1(actionParams, "emoji", { allowEmpty: true });
277
265
  const remove = typeof actionParams.remove === "boolean" ? actionParams.remove : void 0;
278
266
  return await invoke({
279
267
  action: "react",
@@ -285,7 +273,7 @@ async function handleSlackMessageAction(params) {
285
273
  }, cfg, ctx.toolContext);
286
274
  }
287
275
  if (action === "reactions") {
288
- const messageId = readStringParam(actionParams, "messageId", { required: true });
276
+ const messageId = readStringParam$1(actionParams, "messageId", { required: true });
289
277
  return await invoke({
290
278
  action: "reactions",
291
279
  channelId: resolveChannelId(),
@@ -299,17 +287,17 @@ async function handleSlackMessageAction(params) {
299
287
  action: "readMessages",
300
288
  channelId: resolveChannelId(),
301
289
  limit: actionParams.limit,
302
- before: readStringParam(actionParams, "before"),
303
- after: readStringParam(actionParams, "after"),
304
- messageId: readStringParam(actionParams, "messageId"),
290
+ before: readStringParam$1(actionParams, "before"),
291
+ after: readStringParam$1(actionParams, "after"),
292
+ messageId: readStringParam$1(actionParams, "messageId"),
305
293
  accountId
306
294
  };
307
- if (includeReadThreadId) readAction.threadId = readStringParam(actionParams, "threadId");
295
+ if (includeReadThreadId) readAction.threadId = readStringParam$1(actionParams, "threadId");
308
296
  return await invoke(readAction, cfg, ctx.toolContext);
309
297
  }
310
298
  if (action === "edit") {
311
- const messageId = readStringParam(actionParams, "messageId", { required: true });
312
- const content = readStringParam(actionParams, "message", { allowEmpty: true });
299
+ const messageId = readStringParam$1(actionParams, "messageId", { required: true });
300
+ const content = readStringParam$1(actionParams, "message", { allowEmpty: true });
313
301
  const presentation = normalizeMessagePresentation(actionParams.presentation);
314
302
  const renderedPresentation = renderSlackActionPresentation(presentation);
315
303
  const blocks = renderedPresentation.usesPresentationTextFallback ? void 0 : renderedPresentation.blocks;
@@ -317,7 +305,10 @@ async function handleSlackMessageAction(params) {
317
305
  text: content,
318
306
  presentation
319
307
  }) : resolveSlackPresentationText(content, presentation);
320
- if (renderedPresentation.usesPresentationTextFallback && countSlackTextUtf8Bytes(accessibleContent) > 4e3) throw new Error(`Slack presentation fallback exceeds the ${String(SLACK_EDIT_TEXT_MAX_BYTES)}-byte edit limit. Send a new message instead.`);
308
+ if (!blocks && countSlackTextUtf8Bytes(normalizeSlackOutboundText(accessibleContent)) > 4e3) {
309
+ const editSubject = renderedPresentation.usesPresentationTextFallback ? "Slack presentation fallback" : "Slack edit";
310
+ throw new Error(`${editSubject} exceeds the ${String(SLACK_EDIT_TEXT_MAX_BYTES)}-byte edit limit. Send a new message instead.`);
311
+ }
321
312
  if (!accessibleContent && !blocks) throw new Error("Slack edit requires message or blocks.");
322
313
  return await invoke({
323
314
  action: "editMessage",
@@ -329,7 +320,7 @@ async function handleSlackMessageAction(params) {
329
320
  }, cfg, ctx.toolContext);
330
321
  }
331
322
  if (action === "delete") {
332
- const messageId = readStringParam(actionParams, "messageId", { required: true });
323
+ const messageId = readStringParam$1(actionParams, "messageId", { required: true });
333
324
  return await invoke({
334
325
  action: "deleteMessage",
335
326
  channelId: resolveChannelId(),
@@ -338,7 +329,7 @@ async function handleSlackMessageAction(params) {
338
329
  }, cfg, ctx.toolContext);
339
330
  }
340
331
  if (action === "pin" || action === "unpin" || action === "list-pins") {
341
- const messageId = action === "list-pins" ? void 0 : readStringParam(actionParams, "messageId", { required: true });
332
+ const messageId = action === "list-pins" ? void 0 : readStringParam$1(actionParams, "messageId", { required: true });
342
333
  return await invoke({
343
334
  action: action === "pin" ? "pinMessage" : action === "unpin" ? "unpinMessage" : "listPins",
344
335
  channelId: resolveChannelId(),
@@ -350,7 +341,7 @@ async function handleSlackMessageAction(params) {
350
341
  const requesterAccountId = ctx.requesterAccountId ? normalizeAccountId(ctx.requesterAccountId) : void 0;
351
342
  const targetAccountId = normalizeAccountId(accountId ?? resolveDefaultSlackAccountId(cfg));
352
343
  const requesterUserId = normalizeOptionalLowercaseString(ctx.toolContext?.currentChannelProvider) === "slack" && requesterAccountId !== void 0 && requesterAccountId === targetAccountId ? normalizeOptionalString(ctx.requesterSenderId) : void 0;
353
- const userId = readStringParam(actionParams, "userId") ?? requesterUserId;
344
+ const userId = readStringParam$1(actionParams, "userId") ?? requesterUserId;
354
345
  if (!userId) throw new Error("member-info requires a userId outside a current Slack conversation.");
355
346
  return await invoke({
356
347
  action: "memberInfo",
@@ -360,16 +351,16 @@ async function handleSlackMessageAction(params) {
360
351
  }
361
352
  if (action === "emoji-list") return await invoke({
362
353
  action: "emojiList",
363
- limit: readPositiveIntegerParam(actionParams, "limit", { message: "limit must be a positive integer." }),
354
+ limit: readPositiveIntegerParam$1(actionParams, "limit", { message: "limit must be a positive integer." }),
364
355
  accountId
365
356
  }, cfg, ctx.toolContext);
366
357
  if (action === "download-file") {
367
- const fileIdParam = readStringParam(actionParams, "fileId");
368
- const messageIdParam = readStringParam(actionParams, "messageId") ?? readStringParam(actionParams, "message_id");
358
+ const fileIdParam = readStringParam$1(actionParams, "fileId");
359
+ const messageIdParam = readStringParam$1(actionParams, "messageId") ?? readStringParam$1(actionParams, "message_id");
369
360
  if (!fileIdParam && messageIdParam) throw new Error("download-file requires fileId (the Slack file id, for example F0B0LTT8M36 from event.files[].id), not messageId. Did you mean to pass fileId? messageId is the Slack message timestamp and is used by react / reactions / edit / delete / pin / unpin actions, not download-file.");
370
- const fileId = readStringParam(actionParams, "fileId", { required: true });
371
- const channelId = readStringParam(actionParams, "channelId") ?? readStringParam(actionParams, "to");
372
- const threadId = readStringParam(actionParams, "threadId") ?? readStringParam(actionParams, "replyTo");
361
+ const fileId = readStringParam$1(actionParams, "fileId", { required: true });
362
+ const channelId = readStringParam$1(actionParams, "channelId") ?? readStringParam$1(actionParams, "to");
363
+ const threadId = readStringParam$1(actionParams, "threadId") ?? readStringParam$1(actionParams, "replyTo");
373
364
  return await invoke({
374
365
  action: "downloadFile",
375
366
  fileId,
@@ -380,18 +371,18 @@ async function handleSlackMessageAction(params) {
380
371
  }
381
372
  if (action === "upload-file") {
382
373
  if (readBooleanParam(actionParams, "replyBroadcast")) throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");
383
- const to = readStringParam(actionParams, "to") ?? resolveChannelId();
384
- const filePath = readStringParam(actionParams, "filePath", { trim: false }) ?? readStringParam(actionParams, "path", { trim: false }) ?? readStringParam(actionParams, "media", { trim: false });
374
+ const to = readStringParam$1(actionParams, "to") ?? resolveChannelId();
375
+ const filePath = readStringParam$1(actionParams, "filePath", { trim: false }) ?? readStringParam$1(actionParams, "path", { trim: false }) ?? readStringParam$1(actionParams, "media", { trim: false });
385
376
  if (!filePath) throw new Error("upload-file requires filePath, path, or media");
386
- const threadId = readStringParam(actionParams, "threadId") ?? readStringParam(actionParams, "replyTo");
377
+ const threadId = readStringParam$1(actionParams, "threadId") ?? readStringParam$1(actionParams, "replyTo");
387
378
  const topLevel = readBooleanParam(actionParams, "topLevel") === true || actionParams.threadId === null;
388
379
  return await invoke({
389
380
  action: "uploadFile",
390
381
  to,
391
382
  filePath,
392
- initialComment: readStringParam(actionParams, "initialComment", { allowEmpty: true }) ?? readStringParam(actionParams, "message", { allowEmpty: true }) ?? "",
393
- filename: readStringParam(actionParams, "filename"),
394
- title: readStringParam(actionParams, "title"),
383
+ initialComment: readStringParam$1(actionParams, "initialComment", { allowEmpty: true }) ?? readStringParam$1(actionParams, "message", { allowEmpty: true }) ?? readStringParam$1(actionParams, "caption", { allowEmpty: true }) ?? "",
384
+ filename: readStringParam$1(actionParams, "filename"),
385
+ title: readStringParam$1(actionParams, "title"),
395
386
  threadTs: threadId ?? void 0,
396
387
  ...readSlackForceDocument(actionParams) ? { forceDocument: true } : {},
397
388
  ...topLevel ? { topLevel: true } : {},
@@ -411,7 +402,7 @@ const SLACK_TOOL_DELIVERY_ACTIONS = /* @__PURE__ */ new Set([
411
402
  "unpinMessage",
412
403
  "uploadFile"
413
404
  ]);
414
- const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-D9I6uc0Q.js"));
405
+ const loadSlackActionRuntime$1 = createLazyRuntimeModule(() => import("./action-runtime.runtime-Dpa16J87.js"));
415
406
  function resolveSlackActionContext(ctx, toolContext) {
416
407
  if (!toolContext && !ctx.mediaAccess && !ctx.mediaLocalRoots && !ctx.mediaReadFile && !ctx.conversationReadOrigin && !ctx.requesterAccountId && !ctx.requesterSenderId) return;
417
408
  return {
@@ -426,6 +417,7 @@ function resolveSlackActionContext(ctx, toolContext) {
426
417
  }
427
418
  function createSlackActions(providerId, options) {
428
419
  return {
420
+ providerOwnedReadGates: true,
429
421
  describeMessageTool: describeSlackMessageTool,
430
422
  extractToolSend: ({ args }) => extractSlackToolSend(args),
431
423
  isToolDeliveryAction: ({ args }) => typeof args.action === "string" && SLACK_TOOL_DELIVERY_ACTIONS.has(args.action),
@@ -464,6 +456,58 @@ function shouldUseWorkspaceAwareSlackActionSend(rawTarget, context) {
464
456
  return false;
465
457
  }
466
458
  //#endregion
459
+ //#region extensions/slack/src/conversation-route-owner.ts
460
+ function inspectSlackConversationRouteOwner(params) {
461
+ const installationKind = getSlackInstallationKind(params.accountId);
462
+ const direct = params.conversation.kind === "direct";
463
+ const target = parseSlackTarget(params.conversation.peerId, { defaultKind: direct ? "user" : "channel" });
464
+ if (!target || target.kind !== (direct ? "user" : "channel")) return null;
465
+ const targetIsEnterprise = Boolean(target.teamId);
466
+ if (!targetIsEnterprise && (installationKind === "degraded" || !installationKind)) return { kind: "unavailable" };
467
+ if (targetIsEnterprise && installationKind === "workspace") return null;
468
+ const contextTeamId = params.conversation.context?.teamId?.trim();
469
+ if (contextTeamId && target.teamId && contextTeamId.toLowerCase() !== target.teamId.toLowerCase()) return null;
470
+ const teamId = contextTeamId ?? target.teamId;
471
+ if (!direct && params.conversation.nativeChannelId && params.conversation.nativeChannelId.toLowerCase() !== target.id.toLowerCase()) return null;
472
+ const enterpriseRoute = installationKind === "enterprise" || targetIsEnterprise;
473
+ if (enterpriseRoute && !teamId) return null;
474
+ const enterpriseScope = enterpriseRoute && teamId ? { teamId } : void 0;
475
+ const route = resolveAgentRoute({
476
+ cfg: normalizeSlackRouteBindingConfig(params.cfg),
477
+ channel: "slack",
478
+ accountId: params.accountId,
479
+ teamId,
480
+ peer: {
481
+ kind: params.conversation.kind,
482
+ id: qualifySlackRoutePeerId({
483
+ id: target.id,
484
+ kind: direct ? "user" : "channel",
485
+ eventScope: enterpriseScope
486
+ })
487
+ }
488
+ });
489
+ const baseConversationId = qualifySlackConversationId(direct ? `user:${target.id}` : target.id, enterpriseScope);
490
+ const bindingRoute = resolveSlackConversationBindingRoute({
491
+ cfg: params.cfg,
492
+ route,
493
+ accountId: params.accountId,
494
+ baseConversationId,
495
+ runtimeBindingThreadId: params.conversation.threadId,
496
+ bindingsEnabled: !enterpriseRoute,
497
+ touchBinding: false
498
+ });
499
+ if (!bindingRoute.runtimeRoute.bindingOwnerAvailable) return { kind: "unavailable" };
500
+ if (bindingRoute.runtimeRoute.pluginId) return {
501
+ kind: "plugin",
502
+ pluginId: bindingRoute.runtimeRoute.pluginId,
503
+ fallbackAgentId: route.agentId
504
+ };
505
+ return {
506
+ kind: "agent",
507
+ agentId: bindingRoute.runtimeRoute.boundAgentId ?? bindingRoute.configuredRoute?.boundAgentId ?? route.agentId
508
+ };
509
+ }
510
+ //#endregion
467
511
  //#region extensions/slack/src/threading-tool-context.ts
468
512
  function buildSlackThreadingToolContext(params) {
469
513
  const account = resolveSlackAccount({
@@ -500,23 +544,23 @@ const EXTENSION_SHARED_MODULE_ID = "openclaw/plugin-sdk/extension-shared";
500
544
  const TARGET_RESOLVER_RUNTIME_MODULE_ID = "openclaw/plugin-sdk/target-resolver-runtime";
501
545
  const loadExtensionSharedSdk = createLazyRuntimeModule(() => import(EXTENSION_SHARED_MODULE_ID));
502
546
  const loadTargetResolverRuntimeSdk = createLazyRuntimeModule(() => import(TARGET_RESOLVER_RUNTIME_MODULE_ID));
503
- const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-CbX1-Knh.js"));
504
- const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-cYXKkrRD.js"));
505
- const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-S81tsswN.js"));
547
+ const loadSlackSetupSurfaceModule = createLazyRuntimeModule(() => import("./setup-surface-CsBCM4rP.js"));
548
+ const loadSlackScopesModule = createLazyRuntimeModule(() => import("./scopes-BBrUzpBH.js"));
549
+ const loadSlackOutboundAdapterModule = createLazyRuntimeModule(() => import("./outbound-adapter-DkT2vUE9.js"));
506
550
  async function resolveSlackHandleAction() {
507
551
  return getOptionalSlackRuntime()?.channel?.slack?.handleSlackAction ?? (await loadSlackActionRuntime()).handleSlackAction;
508
552
  }
509
553
  function shouldTreatSlackDeliveredTextAsVisible(params) {
510
554
  return params.kind === "block" && typeof params.text === "string" && params.text.trim().length > 0;
511
555
  }
512
- const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-CNBz8lJa.js").then((n) => n.t));
513
- const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-CNPrxaXY.js").then((n) => n.n));
514
- const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-Dzomuwnr.js").then((n) => n.n));
515
- const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-D9I6uc0Q.js"));
516
- const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-BmgNe6S9.js"));
517
- const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-HoEg_WxB.js").then((n) => n.n));
518
- const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-1nF1NtqT.js").then((n) => n.t));
519
- const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-CFKUtW9E.js").then((n) => n.t));
556
+ const loadSlackDirectoryConfigModule = createLazyRuntimeModule(() => import("./directory-config-DqfQ42OV.js").then((n) => n.t));
557
+ const loadSlackResolveChannelsModule = createLazyRuntimeModule(() => import("./resolve-channels-DSamDgVs.js").then((n) => n.n));
558
+ const loadSlackResolveUsersModule = createLazyRuntimeModule(() => import("./resolve-users-CIzwbaJR.js").then((n) => n.n));
559
+ const loadSlackActionRuntime = createLazyRuntimeModule(() => import("./action-runtime.runtime-Dpa16J87.js"));
560
+ const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-DQeNKa2J.js"));
561
+ const loadSlackProbeModule = createLazyRuntimeModule(() => import("./probe-4_aHtVT3.js").then((n) => n.n));
562
+ const loadSlackMonitorModule = createLazyRuntimeModule(() => import("./monitor-DrNCGneD.js").then((n) => n.t));
563
+ const loadSlackDirectoryLiveModule = createLazyRuntimeModule(() => import("./directory-live-lC6X_Ru-.js").then((n) => n.t));
520
564
  async function resolveSlackSendContext(params) {
521
565
  const account = resolveSlackAccount({
522
566
  cfg: params.cfg,
@@ -886,6 +930,7 @@ const slackPlugin = createChatChannelPlugin({
886
930
  },
887
931
  conversationBindings: { isCurrentConversationBindingSupported: ({ accountId }) => isSlackWorkspaceInstallation(accountId) },
888
932
  messaging: {
933
+ resolveConversationRouteOwner: inspectSlackConversationRouteOwner,
889
934
  targetPrefixes: ["slack"],
890
935
  directTargetStyle: "user-prefixed",
891
936
  targetIdComparison: "lowercase",
@@ -1175,4 +1220,4 @@ const slackPlugin = createChatChannelPlugin({
1175
1220
  outbound: slackChannelOutbound
1176
1221
  });
1177
1222
  //#endregion
1178
- export { buildSlackThreadingToolContext as n, resolveSlackAutoThreadId as r, slackPlugin as t };
1223
+ export { buildSlackThreadingToolContext as n, slackPlugin as t };