@openclaw/slack 2026.8.1-beta.3 → 2026.8.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 (237) 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-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-044ldvNL.js} +53 -48
  7. package/dist/action-runtime.runtime-BL3KzX13.js +2 -0
  8. package/dist/{actions-DFk0ANVB.js → actions-BI7JkfVm.js} +266 -96
  9. package/dist/api.js +12 -12
  10. package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-DYv0UIZS.js} +53 -176
  11. package/dist/{channel-CA5w7qDF.js → channel-1vIJOzPx.js} +77 -142
  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-DlFSKeIZ.js} +3 -3
  15. package/dist/{channel.setup-CpyYsEXH.js → channel.setup-ofDi3_Pu.js} +34 -49
  16. package/dist/{config-schema-CN3XZRX5.js → config-schema-BVIMyiDN.js} +19 -12
  17. package/dist/configured-state.js +34 -0
  18. package/dist/{directory-config-BGYyuzWh.js → directory-config-DqfQ42OV.js} +1 -1
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-DjUJQLbq.js → directory-live-BPaNHjmP.js} +2 -2
  21. package/dist/{group-policy-DyfB_ZIE.js → group-policy-BdwszjYn.js} +581 -743
  22. package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-CJ0kjcg5.js} +23 -5
  23. package/dist/message-tool-api.js +1 -1
  24. package/dist/{monitor-Chrecrb9.js → monitor-Dq5Cmrvp.js} +3 -3
  25. package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-DYaI8ThX.js} +93 -68
  26. package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-Bd22U0ga.js} +128 -160
  27. package/dist/{policy-BKXSxrIS.js → policy-CtQVbde1.js} +2 -1
  28. package/dist/{probe-BVA65leh.js → probe-0usmAb0i.js} +209 -22
  29. package/dist/{provider-CUUiwsg2.js → provider-CN_8hFv2.js} +243 -146
  30. package/dist/{relay-source-mhpMMRG-.js → relay-source-BNGpsdwV.js} +1 -1
  31. package/dist/{replies-SnWyXcsL.js → replies-BSiRQOJ1.js} +15 -5
  32. package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-Czheznc8.js} +1 -1
  33. package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-BAOlNimr.js} +1 -1
  34. package/dist/runtime-api.js +11 -11
  35. package/dist/{scopes-BSk4GZvZ.js → scopes-COSlmhnH.js} +1 -1
  36. package/dist/{send-CtnOxKCc.js → send-DS9ICrBI.js} +39 -31
  37. package/dist/send-results-eeOu_HYm.js +23 -0
  38. package/dist/{send.runtime-kYctMHSd.js → send.runtime-D_Bb6IuH.js} +1 -1
  39. package/dist/setup-plugin-api.js +1 -1
  40. package/dist/{setup-surface-BPFfp6So.js → setup-surface-BGnd2pSe.js} +6 -6
  41. package/dist/{shared-DJBaslN7.js → shared-D5B-5hBg.js} +26 -6
  42. package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-CilDmI0c.js} +3 -3
  43. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  44. package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
  45. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
  46. package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
  47. package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
  48. package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
  49. package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
  50. package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
  51. package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
  52. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  53. package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
  54. package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
  55. package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
  56. package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
  57. package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
  58. package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
  59. package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
  60. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
  61. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
  62. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
  63. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
  64. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
  65. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
  66. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
  67. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
  68. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
  69. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
  70. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  71. package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
  72. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
  73. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
  74. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
  75. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
  76. package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
  77. package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
  78. package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
  79. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  80. package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
  81. package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
  82. package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
  83. package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
  84. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
  85. package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
  86. package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
  87. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  88. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
  89. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
  90. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
  91. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
  92. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
  93. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
  94. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
  95. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
  96. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  97. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
  98. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
  99. package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
  100. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
  101. package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
  102. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
  103. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
  104. package/node_modules/typebox/build/format/date.d.mts +1 -1
  105. package/node_modules/typebox/build/format/date.mjs +1 -1
  106. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  107. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  108. package/node_modules/typebox/build/format/email.d.mts +1 -1
  109. package/node_modules/typebox/build/format/email.mjs +2 -2
  110. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  111. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  112. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  113. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  114. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  115. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  116. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  117. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  118. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  119. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  120. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  121. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  122. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  123. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  124. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  125. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  126. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  127. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  128. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  129. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  130. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  131. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  132. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  133. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  134. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  135. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  136. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  137. package/node_modules/typebox/build/format/iri.mjs +26 -8
  138. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  139. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  140. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  141. package/node_modules/typebox/build/format/regex.mjs +2 -6
  142. package/node_modules/typebox/build/format/time.d.mts +2 -2
  143. package/node_modules/typebox/build/format/time.mjs +19 -14
  144. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  145. package/node_modules/typebox/build/format/uri.mjs +3 -130
  146. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  147. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  148. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  149. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  150. package/node_modules/typebox/build/format/url.d.mts +3 -3
  151. package/node_modules/typebox/build/format/url.mjs +4 -5
  152. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  153. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  154. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  155. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  156. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  157. package/node_modules/typebox/build/guard/string.mjs +7 -7
  158. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  159. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  160. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  161. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  162. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  163. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  164. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  165. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  166. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  167. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  168. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  169. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  170. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  171. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  172. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  173. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  174. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  175. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  176. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  177. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  178. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  179. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  180. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  181. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  182. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  183. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  184. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  185. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  186. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  187. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  188. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  189. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  190. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  191. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  192. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  193. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  194. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  195. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  196. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  197. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  198. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  199. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  200. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  201. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  202. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  203. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  204. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  205. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  206. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  207. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  208. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  209. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  210. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  211. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  212. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  213. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  214. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  215. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  216. package/node_modules/typebox/package.json +27 -27
  217. package/node_modules/typebox/readme.md +79 -82
  218. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  219. package/node_modules/ws/package.json +1 -1
  220. package/openclaw.plugin.json +14 -6
  221. package/package.json +9 -7
  222. package/dist/account-configured-BwfXBo_F.js +0 -14
  223. package/dist/account-inspect-YJvFBbCR.js +0 -89
  224. package/dist/action-runtime.runtime-JtoOK9l5.js +0 -2
  225. package/dist/actions.runtime-CYLsYRai.js +0 -2
  226. package/dist/runtime-api-DBi7xc_g.js +0 -10
  227. package/dist/slack-client-kind-BXyOOICI.js +0 -94
  228. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  229. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  230. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  231. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  232. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  233. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  234. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  235. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  236. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  237. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
@@ -1,15 +1,15 @@
1
1
  import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
2
- import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-BlzxuYle.js";
2
+ import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js";
3
3
  import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
4
- import { At as isSlackApprovalAuthorizedSender, J as truncateSlackText, Mt as isSlackExecApprovalAuthorizedSender, Ot as registerSlackInstallationState, U as SLACK_TEXT_LIMIT, a as qualifySlackConversationId, at as decodeSlackQuestionAction, c as allowListMatches, ct as escapeSlackMrkdwn, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, gt as isSlackAnyNativeApprovalClientEnabled, l as normalizeAllowList, m as resolveSlackUserAllowListForTeam, nt as isSlackCallbackActionId, o as qualifySlackRoutePeerId, ot as resolveSlackQuestionAction, p as resolveSlackAllowListMatch, rt as isSlackQuestionActionId, s as resolveSlackEnterpriseMainDmSessionKey, t as buildSlackChannelIdCandidates, tt as isSlackApprovalActionId, u as normalizeAllowListLower, ut as decodeSlackApprovalAction } from "./group-policy-DyfB_ZIE.js";
5
- import { c as createSlackWebClient, g as resolveSlackWebClientOptions, h as resolveSlackProxyDispatcher, m as resolveSlackLookupClientOptions, o as createSlackStartupAuthClient, r as formatSlackError, u as getSlackListenerUploadCompletionClient } from "./probe-BVA65leh.js";
4
+ import { Ct as isSlackApprovalAuthorizedSender, G as isSlackCallbackActionId, J as decodeSlackQuestionAction, K as isSlackQuestionActionId, L as truncateSlackText, M as SLACK_TEXT_LIMIT, Tt as isSlackExecApprovalAuthorizedSender, W as isSlackApprovalActionId, Y as resolveSlackQuestionAction, a as qualifySlackConversationId, et as escapeSlackMrkdwn, lt as isSlackAnyNativeApprovalClientEnabled, nt as decodeSlackApprovalAction, o as qualifySlackRoutePeerId, s as resolveSlackEnterpriseMainDmSessionKey, t as buildSlackChannelIdCandidates, xt as registerSlackInstallationState } from "./group-policy-BdwszjYn.js";
5
+ import { D as resolveSlackWebClientOptions, E as resolveSlackProxyDispatcher, T as resolveSlackLookupClientOptions, _ as createSlackStartupAuthClient, a as slackIngressIdentity, c as normalizeAllowList, d as normalizeSlackSlug, f as resolveSlackAllowListMatch, i as createSlackIngressSubject, l as normalizeAllowListLower, o as formatSlackError, p as resolveSlackUserAllowListForTeam, s as allowListMatches, u as normalizeSlackAllowOwnerEntry, x as getSlackListenerUploadCompletionClient, y as createSlackWebClient } from "./probe-0usmAb0i.js";
6
6
  import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
7
- import { i as hasSlackMessageTableBlock, r as saveRemoteMedia, t as isGovSlackClient } from "./slack-client-kind-BXyOOICI.js";
8
- import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-CtnOxKCc.js";
7
+ import { C as hasSlackMessageTableBlock, b as saveRemoteMedia, f as readSlackMessages, y as isGovSlackClient } from "./actions-BI7JkfVm.js";
8
+ import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-DS9ICrBI.js";
9
9
  import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
10
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-BSpqC8jU.js";
11
- import { t as resolveSlackUserAllowlist } from "./resolve-users-Dvz9pDe0.js";
12
- import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-BKXSxrIS.js";
10
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-Czheznc8.js";
11
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-BAOlNimr.js";
12
+ import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-CtQVbde1.js";
13
13
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
14
14
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
15
15
  import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -26,6 +26,7 @@ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
26
26
  import { WebAPIHTTPError, WebAPIPlatformError, WebAPIRateLimitedError, WebAPIRequestError, WebClient } from "@slack/web-api";
27
27
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
28
28
  import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
29
+ import { createChannelIngressResolver, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
29
30
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, isApprovalNotFoundError, readErrorName, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
30
31
  import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
31
32
  import { buildChannelMetadata } from "openclaw/plugin-sdk/security-runtime";
@@ -44,12 +45,12 @@ import { resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy as res
44
45
  import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes";
45
46
  import { mutateConfigFile, readConfigFileSnapshotForWrite } from "openclaw/plugin-sdk/config-mutation";
46
47
  import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
47
- import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
48
48
  import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
49
49
  import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
50
50
  import { formatCommandArgMenuTitle, resolveCommandAuthorization, resolveEffectiveAgentRuntime, resolveNativeCommandSessionTargets, resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth-native";
51
51
  import { requestHeartbeat } from "openclaw/plugin-sdk/heartbeat-runtime";
52
52
  import { createChannelInteractiveDispatcher } from "openclaw/plugin-sdk/plugin-runtime";
53
+ import { reportChannelRoomJoin } from "openclaw/plugin-sdk/channel-join-intro-runtime";
53
54
  import { createChannelInboundDebouncer, shouldDebounceTextInbound } from "openclaw/plugin-sdk/channel-inbound";
54
55
  import { createChannelReplayGuard, runClaimableDedupeClaimLoop } from "openclaw/plugin-sdk/persistent-dedupe";
55
56
  import { channelBlockedPatch, channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
@@ -705,6 +706,7 @@ function createSlackMonitorContext(params) {
705
706
  }
706
707
  return false;
707
708
  };
709
+ const channelRuntime = params.channelRuntime;
708
710
  const ctx = {
709
711
  cfg: params.cfg,
710
712
  accountId: params.accountId,
@@ -712,7 +714,8 @@ function createSlackMonitorContext(params) {
712
714
  app: params.app,
713
715
  runtime: params.runtime,
714
716
  channelRuntime: params.channelRuntime,
715
- buildContext: params.channelRuntime?.inbound.buildContext,
717
+ buildContext: channelRuntime?.inbound.buildContext,
718
+ dispatchReplyFromConfig: channelRuntime?.reply?.dispatchReplyFromConfig,
716
719
  botUserId: params.botUserId,
717
720
  botId: params.botId,
718
721
  identityHealth: params.identityHealth,
@@ -1278,6 +1281,8 @@ function resolveSlackIngressTurnLifecycle(context) {
1278
1281
  function createSlackDurableIngress(options) {
1279
1282
  let app;
1280
1283
  let relayDispatch;
1284
+ const activeSessionTurns = /* @__PURE__ */ new Map();
1285
+ const activeChannelTurns = /* @__PURE__ */ new Map();
1281
1286
  const monitor = createChannelIngressMonitor({
1282
1287
  queue: options.queue ?? (() => getSlackRuntime().state.openChannelIngressQueue({ accountId: options.accountId })),
1283
1288
  inspect: inspectSlackIngress,
@@ -1314,26 +1319,110 @@ function createSlackDurableIngress(options) {
1314
1319
  onDurableAdmission: async (raw) => {
1315
1320
  if (raw.kind === "events-api") await raw.afterDurableAdmission?.();
1316
1321
  },
1317
- deliver: async (raw, lifecycle) => {
1318
- if (raw.kind === "relay") {
1319
- if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
1320
- await relayDispatch(raw.message, lifecycle);
1321
- return;
1322
+ deliver: async (raw, lifecycle, claim) => {
1323
+ const laneKey = claim.laneKey ?? inspectSlackIngress(raw).laneKey;
1324
+ let releaseSession;
1325
+ let releaseChannel;
1326
+ let routedSession;
1327
+ let adoptOnCompletion = false;
1328
+ const settleSession = () => {
1329
+ adoptOnCompletion = false;
1330
+ releaseSession?.();
1331
+ };
1332
+ const settleTurn = () => {
1333
+ settleSession();
1334
+ releaseChannel?.();
1335
+ lifecycle.abortSignal.removeEventListener("abort", settleTurn);
1336
+ };
1337
+ const routedLifecycle = {
1338
+ ...lifecycle,
1339
+ onSessionRouted: async (sessionKey) => {
1340
+ if (routedSession !== void 0) {
1341
+ if (routedSession !== sessionKey) throw new Error("Slack ingress session ownership changed after routing.");
1342
+ return;
1343
+ }
1344
+ lifecycle.abortSignal.throwIfAborted();
1345
+ routedSession = sessionKey;
1346
+ adoptOnCompletion = true;
1347
+ const previousTurn = activeSessionTurns.get(sessionKey);
1348
+ const releasedCurrentTurn = createDeferred();
1349
+ const currentTurn = previousTurn ? previousTurn.then(() => releasedCurrentTurn.promise) : releasedCurrentTurn.promise;
1350
+ activeSessionTurns.set(sessionKey, currentTurn);
1351
+ const channelTurn = createDeferred();
1352
+ const channelTurns = activeChannelTurns.get(laneKey) ?? /* @__PURE__ */ new Set();
1353
+ channelTurns.add(channelTurn.promise);
1354
+ activeChannelTurns.set(laneKey, channelTurns);
1355
+ currentTurn.then(() => {
1356
+ if (activeSessionTurns.get(sessionKey) === currentTurn) activeSessionTurns.delete(sessionKey);
1357
+ });
1358
+ channelTurn.promise.then(() => {
1359
+ channelTurns.delete(channelTurn.promise);
1360
+ if (channelTurns.size === 0 && activeChannelTurns.get(laneKey) === channelTurns) activeChannelTurns.delete(laneKey);
1361
+ });
1362
+ releaseSession = () => releasedCurrentTurn.resolve();
1363
+ releaseChannel = () => channelTurn.resolve();
1364
+ lifecycle.abortSignal.addEventListener("abort", settleTurn, { once: true });
1365
+ lifecycle.onDeferred();
1366
+ if (previousTurn) lifecycle.onAdoptionFinalizing();
1367
+ monitor.requestDrain();
1368
+ await previousTurn;
1369
+ lifecycle.abortSignal.throwIfAborted();
1370
+ },
1371
+ onAdopted: async () => {
1372
+ try {
1373
+ await lifecycle.onAdopted();
1374
+ } finally {
1375
+ settleTurn();
1376
+ }
1377
+ },
1378
+ onDeferred: () => {
1379
+ lifecycle.onDeferred();
1380
+ settleSession();
1381
+ monitor.requestDrain();
1382
+ },
1383
+ onAbandoned: async () => {
1384
+ try {
1385
+ await lifecycle.onAbandoned();
1386
+ } finally {
1387
+ settleTurn();
1388
+ }
1389
+ }
1390
+ };
1391
+ try {
1392
+ if (asOptionalRecord(raw.kind === "events-api" ? asOptionalRecord(raw.body)?.event : void 0)?.type === "channel_id_changed") {
1393
+ const channelTurns = activeChannelTurns.get(laneKey);
1394
+ if (channelTurns && channelTurns.size > 0) {
1395
+ adoptOnCompletion = true;
1396
+ lifecycle.onAdoptionFinalizing();
1397
+ await Promise.all(channelTurns);
1398
+ lifecycle.abortSignal.throwIfAborted();
1399
+ }
1400
+ }
1401
+ if (raw.kind === "relay") {
1402
+ if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
1403
+ await relayDispatch(raw.message, routedLifecycle);
1404
+ } else {
1405
+ if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
1406
+ await app.processEvent({
1407
+ body: raw.body,
1408
+ ack: async () => {},
1409
+ ...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
1410
+ ...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
1411
+ customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: routedLifecycle }
1412
+ });
1413
+ }
1414
+ if (adoptOnCompletion) await routedLifecycle.onAdopted();
1415
+ } catch (error) {
1416
+ settleTurn();
1417
+ throw error;
1322
1418
  }
1323
- if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
1324
- await app.processEvent({
1325
- body: raw.body,
1326
- ack: async () => {},
1327
- ...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
1328
- ...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
1329
- customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: lifecycle }
1330
- });
1331
1419
  },
1332
1420
  pollIntervalMs: options.pollIntervalMs ?? SLACK_INGRESS_POLL_INTERVAL_MS,
1333
1421
  retention: "standard",
1334
1422
  appendRetryDelaysMs: [0],
1335
1423
  drain: {
1336
1424
  resolveNonRetryableFailure: resolveSlackIngressNonRetryableFailure,
1425
+ deferredLaneOccupancy: "release",
1337
1426
  deriveLaneKey: (record) => record.payload.kind === "relay" ? resolveSlackIngressLane({ event: record.payload.message }, record.id) : resolveSlackIngressLane(record.payload.body, record.id),
1338
1427
  ...options.adoptionStallTimeoutMs === void 0 ? {} : { adoptionStallTimeoutMs: options.adoptionStallTimeoutMs },
1339
1428
  ...options.onLog ? { onLog: options.onLog } : {}
@@ -1498,88 +1587,7 @@ const slackChannelMembersCache = /* @__PURE__ */ new WeakMap();
1498
1587
  const DEFAULT_CHANNEL_MEMBERS_CACHE_TTL_MS = 6e4;
1499
1588
  const CHANNEL_MEMBERS_CACHE_MAX = 512;
1500
1589
  const SLACK_CHANNEL_ID = "slack";
1501
- const SLACK_USER_NAME_KIND = "plugin:slack-user-name";
1502
- const SLACK_WORKSPACE_USER_ID_KIND = "plugin:slack-workspace-user-id";
1503
1590
  var SlackSystemEventAuthRetryError = class extends Error {};
1504
- function normalizeSlackUserId(raw) {
1505
- const value = (raw ?? "").trim().toLowerCase();
1506
- if (!value) return "";
1507
- const mention = value.match(/^<@([a-z0-9_]+)>$/i);
1508
- if (mention?.[1]) return mention[1];
1509
- return value.replace(/^(slack:|user:)/, "");
1510
- }
1511
- function isSlackStableUserId(value) {
1512
- return /^[ubw][a-z0-9_]+$/i.test(value);
1513
- }
1514
- function normalizeSlackWorkspaceUserEntry(entry) {
1515
- const normalized = entry.trim().toLowerCase();
1516
- if (!normalized) return null;
1517
- try {
1518
- const target = parseSlackTarget(normalized);
1519
- if (target?.kind === "user" && target.teamId) return target.normalized;
1520
- } catch {
1521
- return null;
1522
- }
1523
- return null;
1524
- }
1525
- function normalizeSlackBareUserEntry(entry) {
1526
- const normalized = entry.trim().toLowerCase();
1527
- if (!normalized || normalizeSlackWorkspaceUserEntry(normalized)) return null;
1528
- const userId = normalizeSlackUserId(normalized);
1529
- return isSlackStableUserId(userId) ? userId : null;
1530
- }
1531
- function normalizeSlackStableEntry(entry) {
1532
- return normalizeSlackBareUserEntry(entry) ?? normalizeSlackWorkspaceUserEntry(entry);
1533
- }
1534
- function normalizeSlackNameEntry(entry) {
1535
- const normalized = entry.trim().toLowerCase();
1536
- if (!normalized || normalizeSlackStableEntry(normalized)) return null;
1537
- return normalized.replace(/^slack:/, "") || null;
1538
- }
1539
- function normalizeSlackNameSubject(value) {
1540
- return value.trim().toLowerCase() || null;
1541
- }
1542
- function normalizeSlackNameSlugEntry(entry) {
1543
- const name = normalizeSlackNameEntry(entry);
1544
- if (!name) return null;
1545
- const slug = normalizeSlackSlug(name);
1546
- return slug && slug !== name ? slug : null;
1547
- }
1548
- const slackIngressIdentity = defineStableChannelIngressIdentity({
1549
- key: "senderId",
1550
- kind: "stable-id",
1551
- normalizeEntry: normalizeSlackBareUserEntry,
1552
- normalizeSubject: normalizeSlackUserId,
1553
- sensitivity: "pii",
1554
- aliases: [{
1555
- key: "workspaceSenderId",
1556
- kind: SLACK_WORKSPACE_USER_ID_KIND,
1557
- normalizeEntry: normalizeSlackWorkspaceUserEntry,
1558
- normalizeSubject: normalizeSlackWorkspaceUserEntry,
1559
- sensitivity: "pii"
1560
- }, ...[["senderName", normalizeSlackNameEntry], ["senderNameSlug", normalizeSlackNameSlugEntry]].map(([key, normalizeEntry]) => ({
1561
- key,
1562
- kind: SLACK_USER_NAME_KIND,
1563
- normalizeEntry,
1564
- normalizeSubject: normalizeSlackNameSubject,
1565
- dangerous: true,
1566
- sensitivity: "pii"
1567
- }))]
1568
- });
1569
- function createSlackIngressSubject(params) {
1570
- const senderId = normalizeSlackUserId(params.senderId);
1571
- const teamId = normalizeOptionalLowercaseString(params.teamId);
1572
- const senderName = params.senderName?.trim().toLowerCase();
1573
- const senderNameSlug = senderName ? normalizeSlackSlug(senderName) : void 0;
1574
- return {
1575
- stableId: senderId,
1576
- aliases: {
1577
- workspaceSenderId: teamId && senderId ? `team:${teamId}:user:${senderId}` : void 0,
1578
- senderName,
1579
- senderNameSlug
1580
- }
1581
- };
1582
- }
1583
1591
  function createSlackIngressResolver(ctx) {
1584
1592
  return createChannelIngressResolver({
1585
1593
  channelId: SLACK_CHANNEL_ID,
@@ -1821,7 +1829,7 @@ async function decideSlackSystemIngress(params) {
1821
1829
  } : void 0
1822
1830
  };
1823
1831
  const result = await resolver.message(input);
1824
- if (result.ingress.decision !== "allow" && params.retryNameLookup && result.state.allowlists[isDirectMessage ? "dm" : "group"].normalizedEntries.some((entry) => entry.kind === SLACK_USER_NAME_KIND)) {
1832
+ if (result.ingress.decision !== "allow" && params.retryNameLookup && result.state.allowlists[isDirectMessage ? "dm" : "group"].normalizedEntries.some((entry) => entry.kind === "plugin:slack-user-name")) {
1825
1833
  const lookup = await params.ctx.resolveUserName(params.senderId, params.eventScope);
1826
1834
  if (lookup.error && isTransientSlackThreadLookupError(lookup.error)) throw new SlackSystemEventAuthRetryError(formatErrorMessage(lookup.error));
1827
1835
  if (lookup.name) return (await resolver.message({
@@ -2015,6 +2023,7 @@ async function authorizeAndResolveSlackSystemEventContext(params) {
2015
2023
  channelId,
2016
2024
  channelType: auth.channelType,
2017
2025
  senderId,
2026
+ threadTs: auth.channelType === "im" ? void 0 : params.threadTs,
2018
2027
  eventScope: params.eventScope
2019
2028
  })
2020
2029
  };
@@ -3562,6 +3571,55 @@ function registerSlackMemberEvents(params) {
3562
3571
  const channelId = payload.channel;
3563
3572
  const channelInfo = channelId ? await ctx.resolveChannelName(channelId, eventScope) : {};
3564
3573
  const channelType = payload.channel_type ?? channelInfo?.type;
3574
+ if (paramsLocal.verb === "joined" && payload.user === ctx.botUserId && channelId) {
3575
+ const roomType = normalizeSlackChannelType(channelType, channelId);
3576
+ if (roomType === "channel" || roomType === "group") {
3577
+ const roomAllowed = ctx.isChannelAllowed({
3578
+ teamId: eventScope?.teamId ?? ctx.teamId,
3579
+ channelId,
3580
+ channelName: channelInfo.name,
3581
+ channelType: roomType
3582
+ });
3583
+ const inviterLabel = roomAllowed && payload.inviter ? (await ctx.resolveUserName(payload.inviter, eventScope)).name ?? payload.inviter : void 0;
3584
+ await reportChannelRoomJoin({
3585
+ cfg: ctx.cfg,
3586
+ channel: "slack",
3587
+ accountId: ctx.accountId,
3588
+ conversationId: channelId,
3589
+ deliverTo: `channel:${channelId}`,
3590
+ route: ctx.resolveSlackSystemEventRoute({
3591
+ channelId,
3592
+ channelType: roomType,
3593
+ eventScope
3594
+ }),
3595
+ inviterLabel,
3596
+ roomAllowed,
3597
+ resolveRoomContext: async ({ messageLimit }) => {
3598
+ const purpose = [channelInfo.purpose, channelInfo.topic].filter((value) => Boolean(value?.trim())).join("\n");
3599
+ const roomContext = {
3600
+ title: channelInfo.name ? `#${channelInfo.name}` : void 0,
3601
+ purpose: purpose || void 0
3602
+ };
3603
+ try {
3604
+ const { messages } = await readSlackMessages(channelId, {
3605
+ limit: messageLimit,
3606
+ client: eventScope?.client ?? ctx.app.client
3607
+ });
3608
+ return {
3609
+ ...roomContext,
3610
+ recentMessages: messages.toReversed().flatMap(({ user, text }) => text?.trim() ? [{
3611
+ sender: user,
3612
+ text
3613
+ }] : [])
3614
+ };
3615
+ } catch {
3616
+ return roomContext;
3617
+ }
3618
+ }
3619
+ });
3620
+ return;
3621
+ }
3622
+ }
3565
3623
  const ingressContext = await authorizeAndResolveSlackSystemEventContext({
3566
3624
  ctx,
3567
3625
  senderId: payload.user,
@@ -3653,10 +3711,57 @@ function noteSlackDraftConversationMessage(conversation) {
3653
3711
  }
3654
3712
  }
3655
3713
  //#endregion
3714
+ //#region extensions/slack/src/threading.ts
3715
+ function resolveSlackThreadContext(params) {
3716
+ const incomingThreadTs = params.message.thread_ts;
3717
+ const eventTs = params.message.event_ts;
3718
+ const messageTs = params.message.ts ?? eventTs;
3719
+ const hasThreadTs = typeof incomingThreadTs === "string" && incomingThreadTs.length > 0;
3720
+ const isThreadReply = hasThreadTs && (incomingThreadTs !== messageTs || Boolean(params.message.parent_user_id));
3721
+ const replyToId = isThreadReply ? incomingThreadTs : void 0;
3722
+ const isAssistantDmThreadRoot = hasThreadTs && !isThreadReply && params.isDirectMessage === true;
3723
+ return {
3724
+ incomingThreadTs,
3725
+ messageTs,
3726
+ isThreadReply,
3727
+ replyToId,
3728
+ messageThreadId: isThreadReply || isAssistantDmThreadRoot ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
3729
+ };
3730
+ }
3731
+ /**
3732
+ * Resolves Slack thread targeting for replies and status indicators.
3733
+ *
3734
+ * @returns replyThreadTs - Thread timestamp for reply messages
3735
+ * @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
3736
+ * @returns isThreadReply - true if this is a genuine user reply in a thread,
3737
+ * false if thread_ts comes from a bot status message (e.g. typing indicator)
3738
+ */
3739
+ function resolveSlackThreadTargets(params) {
3740
+ const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
3741
+ const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
3742
+ return {
3743
+ replyThreadTs,
3744
+ statusThreadTs: replyThreadTs,
3745
+ isThreadReply
3746
+ };
3747
+ }
3748
+ //#endregion
3656
3749
  //#region extensions/slack/src/monitor/events/message-subtype-handlers.ts
3750
+ function resolveNestedThreadTs(event) {
3751
+ const changed = event;
3752
+ const message = changed.message?.thread_ts ? changed.message : changed.previous_message;
3753
+ if (!message) return;
3754
+ return resolveSlackThreadContext({
3755
+ message: {
3756
+ type: "message",
3757
+ channel: event.channel,
3758
+ ...message
3759
+ },
3760
+ replyToMode: "off"
3761
+ }).replyToId;
3762
+ }
3657
3763
  const SUBTYPE_HANDLER_REGISTRY = {
3658
3764
  message_changed: {
3659
- subtype: "message_changed",
3660
3765
  eventKind: "message_changed",
3661
3766
  describe: (channelLabel) => `Slack message edited in ${channelLabel}.`,
3662
3767
  contextKey: (event) => {
@@ -3667,11 +3772,9 @@ const SUBTYPE_HANDLER_REGISTRY = {
3667
3772
  const changed = event;
3668
3773
  return changed.message?.user ?? changed.previous_message?.user ?? changed.message?.bot_id ?? changed.previous_message?.bot_id;
3669
3774
  },
3670
- resolveChannelId: (event) => event.channel,
3671
- resolveChannelType: () => void 0
3775
+ resolveThreadTs: resolveNestedThreadTs
3672
3776
  },
3673
3777
  message_deleted: {
3674
- subtype: "message_deleted",
3675
3778
  eventKind: "message_deleted",
3676
3779
  describe: (channelLabel) => `Slack message deleted in ${channelLabel}.`,
3677
3780
  contextKey: (event) => {
@@ -3682,8 +3785,7 @@ const SUBTYPE_HANDLER_REGISTRY = {
3682
3785
  const deleted = event;
3683
3786
  return deleted.previous_message?.user ?? deleted.previous_message?.bot_id;
3684
3787
  },
3685
- resolveChannelId: (event) => event.channel,
3686
- resolveChannelType: () => void 0
3788
+ resolveThreadTs: resolveNestedThreadTs
3687
3789
  }
3688
3790
  };
3689
3791
  function resolveSlackMessageSubtypeHandler(event) {
@@ -3827,12 +3929,11 @@ function registerSlackMessageEvents(params) {
3827
3929
  })) return;
3828
3930
  const subtypeHandler = resolveSlackMessageSubtypeHandler(message);
3829
3931
  if (subtypeHandler) {
3830
- const channelId = subtypeHandler.resolveChannelId(message);
3831
3932
  const ingressContext = await authorizeAndResolveSlackSystemEventContext({
3832
3933
  ctx,
3833
3934
  senderId: subtypeHandler.resolveSenderId(message),
3834
- channelId,
3835
- channelType: subtypeHandler.resolveChannelType(message),
3935
+ channelId: message.channel,
3936
+ threadTs: subtypeHandler.resolveThreadTs(message),
3836
3937
  eventKind: subtypeHandler.eventKind,
3837
3938
  eventScope
3838
3939
  });
@@ -4164,19 +4265,7 @@ function buildSlackDebounceKey(message, accountId, teamId) {
4164
4265
  }
4165
4266
  //#endregion
4166
4267
  //#region extensions/slack/src/monitor/message-handler.ts
4167
- const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-Bbfd5VFW.js"));
4168
- function createSlackDispatchCompletion() {
4169
- let resolve;
4170
- let reject;
4171
- return {
4172
- promise: new Promise((nextResolve, nextReject) => {
4173
- resolve = nextResolve;
4174
- reject = nextReject;
4175
- }),
4176
- resolve,
4177
- reject
4178
- };
4179
- }
4268
+ const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-Bd22U0ga.js"));
4180
4269
  const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
4181
4270
  const RETRYABLE_FLUSH_RETRY_DELAY_MS = 1e3;
4182
4271
  const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /reply session initialization conflicted for \S+/u;
@@ -4243,6 +4332,19 @@ function createSlackMessageHandler(params) {
4243
4332
  const completions = entries.map((entry) => entry.opts.dispatchCompletion).filter((completion) => completion !== void 0);
4244
4333
  try {
4245
4334
  await (async () => {
4335
+ const flushedEntry = entries.at(-1);
4336
+ if (flushedEntry) {
4337
+ const teamId = flushedEntry.opts.eventScope?.teamId;
4338
+ const flushedKey = buildSlackDebounceKey(flushedEntry.message, ctx.accountId, teamId);
4339
+ const topLevelConversationKey = buildTopLevelSlackConversationKey(flushedEntry.message, ctx.accountId, teamId);
4340
+ if (flushedKey && topLevelConversationKey) {
4341
+ const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
4342
+ if (pendingKeys) {
4343
+ pendingKeys.delete(flushedKey);
4344
+ if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
4345
+ }
4346
+ }
4347
+ }
4246
4348
  const claims = [];
4247
4349
  const claimedKeys = /* @__PURE__ */ new Map();
4248
4350
  const surviving = [];
@@ -4296,16 +4398,6 @@ function createSlackMessageHandler(params) {
4296
4398
  releaseClaims();
4297
4399
  return;
4298
4400
  }
4299
- const teamId = last.opts.eventScope?.teamId;
4300
- const flushedKey = buildSlackDebounceKey(last.message, ctx.accountId, teamId);
4301
- const topLevelConversationKey = buildTopLevelSlackConversationKey(last.message, ctx.accountId, teamId);
4302
- if (flushedKey && topLevelConversationKey) {
4303
- const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
4304
- if (pendingKeys) {
4305
- pendingKeys.delete(flushedKey);
4306
- if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
4307
- }
4308
- }
4309
4401
  const combinedText = surviving.length === 1 ? last.message.text ?? "" : surviving.map((entry) => entry.message.text ?? "").filter(Boolean).join("\n");
4310
4402
  const combinedMentioned = surviving.some((entry) => Boolean(entry.opts.wasMentioned));
4311
4403
  const syntheticMessage = {
@@ -4338,6 +4430,7 @@ function createSlackMessageHandler(params) {
4338
4430
  releaseClaims();
4339
4431
  return;
4340
4432
  }
4433
+ await turnAdoptionLifecycle?.onSessionRouted?.(prepared.route.sessionKey);
4341
4434
  prepared.turnAdoptionLifecycle = {
4342
4435
  ...turnAdoptionLifecycle,
4343
4436
  admission: turnAdoptionLifecycle?.admission ?? "exclusive",
@@ -4353,6 +4446,10 @@ function createSlackMessageHandler(params) {
4353
4446
  if (admissionLifecycle.onDeferred() === false) return false;
4354
4447
  settlementHandedOff = true;
4355
4448
  },
4449
+ onDeferredHeartbeat: () => {
4450
+ turnAdoptionLifecycle?.onDeferredHeartbeat?.();
4451
+ admissionLifecycle.onDeferredHeartbeat?.();
4452
+ },
4356
4453
  onAbandoned: () => {
4357
4454
  settlementHandedOff = true;
4358
4455
  releaseClaims();
@@ -4416,7 +4513,7 @@ function createSlackMessageHandler(params) {
4416
4513
  pendingKeys.add(debounceKey);
4417
4514
  pendingTopLevelDebounceKeys.set(conversationKey, pendingKeys);
4418
4515
  }
4419
- const dispatchCompletion = opts.awaitDispatch ? createSlackDispatchCompletion() : void 0;
4516
+ const dispatchCompletion = opts.awaitDispatch ? createDeferred() : void 0;
4420
4517
  await debouncer.enqueue({
4421
4518
  message: resolvedMessage,
4422
4519
  opts: {
@@ -5140,7 +5237,7 @@ const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
5140
5237
  const SLACK_HEADER_TEXT_MAX = 150;
5141
5238
  const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
5142
5239
  const loadSlashCommandsRuntime = createLazyRuntimeModule(() => import("./slash-commands.runtime-BTTMlmwy.js"));
5143
- const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-Cf2FTrnf.js"));
5240
+ const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-CilDmI0c.js"));
5144
5241
  const loadSlashSkillCommandsRuntime = createLazyRuntimeModule(() => import("./slash-skill-commands.runtime-CD1J2ODY.js"));
5145
5242
  const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
5146
5243
  function resolveSlackCommandMenuModelContext(params) {
@@ -5602,7 +5699,7 @@ async function registerSlackMonitorSlashCommands(params) {
5602
5699
  }
5603
5700
  const channelName = channelInfo?.name;
5604
5701
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
5605
- const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode } = await loadSlashDispatchRuntime();
5702
+ const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode, sanitizeSlackMonitorReplyPayload } = await loadSlashDispatchRuntime();
5606
5703
  const route = resolvedSlashRoute ?? resolveAgentRoute({
5607
5704
  cfg,
5608
5705
  channel: "slack",
@@ -5702,10 +5799,8 @@ async function registerSlackMonitorSlashCommands(params) {
5702
5799
  sessionKey: ctxPayload.SessionKey ?? route.sessionKey
5703
5800
  },
5704
5801
  ctxPayload,
5705
- replyPipeline: { transformReplyPayload: (payload) => {
5706
- if (payload.isReasoning === true) return null;
5707
- return payload;
5708
- } },
5802
+ dispatchReplyFromConfig: ctx.dispatchReplyFromConfig,
5803
+ replyPipeline: { transformReplyPayload: sanitizeSlackMonitorReplyPayload },
5709
5804
  dispatcherOptions: { onSettled: async () => {
5710
5805
  if (pendingSlashReplies.length === 0) return;
5711
5806
  const pending = pendingSlashReplies.splice(0);
@@ -5920,11 +6015,13 @@ async function registerSlackMonitorSlashCommands(params) {
5920
6015
  const respondFn = respond ?? (async (message) => {
5921
6016
  if (!body.channel?.id || !body.user?.id) return new Response(null, { status: 204 });
5922
6017
  const payload = typeof message === "string" ? { text: message } : message;
6018
+ const threadTs = body.container?.thread_ts ?? body.message?.thread_ts;
5923
6019
  await args.client.chat.postEphemeral({
5924
6020
  token: ctx.botToken,
5925
6021
  channel: body.channel.id,
5926
6022
  user: body.user.id,
5927
6023
  text: payload.text ?? "",
6024
+ ...threadTs ? { thread_ts: threadTs } : {},
5928
6025
  ...payload.blocks ? { blocks: payload.blocks } : {},
5929
6026
  ...typeof payload.mrkdwn === "boolean" ? { mrkdwn: payload.mrkdwn } : {}
5930
6027
  });
@@ -6036,7 +6133,7 @@ async function getSlackBoltInterop() {
6036
6133
  }
6037
6134
  return slackBoltInterop;
6038
6135
  }
6039
- const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-mhpMMRG-.js"));
6136
+ const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-BNGpsdwV.js"));
6040
6137
  const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
6041
6138
  const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
6042
6139
  function resolveSlackRuntimeIdentity(params) {
@@ -6750,4 +6847,4 @@ function createSlackWorkspaceClientResolver(params) {
6750
6847
  }
6751
6848
  const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy$1;
6752
6849
  //#endregion
6753
- export { buildSlackSlashCommandMatcher as C, updateLastRoute as S, parseSlackAssistantThreadMetadata as _, createSlackResponseUrlBudget as a, resolveChannelResetConfig as b, resolveConversationLabel$1 as c, resolveSlackEffectiveAllowFrom as d, SLACK_SOCKET_RECONNECT_POLICY as f, buildSlackAssistantThreadMetadata as g, resolveSlackChatType as h, SlackResponseAlreadyReportedError as i, authorizeSlackBotRoomMessage as l, normalizeSlackChannelType as m, resolveSlackRuntimeGroupPolicy as n, authorizeSlackDirectMessage as o, formatUnknownError as p, resolveSlackRoomContextHints as r, trackSlackDraftMessage as s, monitorSlackProvider as t, resolveSlackCommandIngress as u, readSessionUpdatedAt as v, stripSlackMentionsForCommandDetection as w, resolveStorePath$1 as x, resolveChannelContextVisibilityMode as y };
6850
+ export { resolveStorePath$1 as C, stripSlackMentionsForCommandDetection as E, resolveChannelResetConfig as S, buildSlackSlashCommandMatcher as T, resolveSlackChatType as _, createSlackResponseUrlBudget as a, readSessionUpdatedAt as b, resolveSlackThreadTargets as c, authorizeSlackBotRoomMessage as d, resolveSlackCommandIngress as f, normalizeSlackChannelType as g, formatUnknownError as h, SlackResponseAlreadyReportedError as i, trackSlackDraftMessage as l, SLACK_SOCKET_RECONNECT_POLICY as m, resolveSlackRuntimeGroupPolicy as n, authorizeSlackDirectMessage as o, resolveSlackEffectiveAllowFrom as p, resolveSlackRoomContextHints as r, resolveSlackThreadContext as s, monitorSlackProvider as t, resolveConversationLabel$1 as u, buildSlackAssistantThreadMetadata as v, updateLastRoute as w, resolveChannelContextVisibilityMode as x, parseSlackAssistantThreadMetadata as y };
@@ -1,4 +1,4 @@
1
- import { f as SLACK_SOCKET_RECONNECT_POLICY, p as formatUnknownError } from "./provider-CUUiwsg2.js";
1
+ import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-CN_8hFv2.js";
2
2
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
4
4
  import { isIP } from "node:net";
@@ -1,11 +1,12 @@
1
- import { A as isSlackInvalidBlocksResponse, E as buildSlackNativeDataAccessibilityText, I as buildSlackBlocksFallbackText, O as hasSlackNativeDataBlock, P as markdownToSlackMrkdwnChunks, U as SLACK_TEXT_LIMIT, _ as hasSlackReplyStructuredContent, b as resolveSlackReplyBlocks, j as isSlackNativeResponseUrlRejection, y as resolveSlackReplyBlockResolution } from "./group-policy-DyfB_ZIE.js";
2
- import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-CtnOxKCc.js";
3
- import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-CUUiwsg2.js";
1
+ import { C as isSlackNativeResponseUrlRejection, M as SLACK_TEXT_LIMIT, S as isSlackInvalidBlocksResponse, T as buildSlackBlocksFallbackText, Z as markdownToSlackMrkdwnChunks, b as hasSlackNativeDataBlock, d as resolveSlackReplyBlockResolution, f as resolveSlackReplyBlocks, l as hasSlackReplyStructuredContent, v as buildSlackNativeDataAccessibilityText } from "./group-policy-BdwszjYn.js";
2
+ import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-DS9ICrBI.js";
3
+ import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-CN_8hFv2.js";
4
4
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
5
+ import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
5
6
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
7
+ import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
6
8
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
9
  import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
8
- import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
9
10
  import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
10
11
  import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
11
12
  import { buildCanonicalSentMessageHookContext, createInternalHookEvent, fireAndForgetHook, toInternalMessageSentContext, toPluginMessageContext, toPluginMessageSentEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
@@ -114,6 +115,15 @@ function compactSlackResponseUrlFallback(messages) {
114
115
  function readSlackReplyBlocks(payload) {
115
116
  return resolveSlackReplyBlocks(payload);
116
117
  }
118
+ function sanitizeSlackMonitorReplyPayload(payload) {
119
+ if (payload.isReasoning === true || typeof payload.text !== "string") return payload.isReasoning === true ? null : payload;
120
+ const text = sanitizeAssistantVisibleText(payload.text);
121
+ if (text === payload.text) return payload;
122
+ return text || resolveSendableOutboundReplyParts(payload).hasMedia || hasSlackReplyStructuredContent(payload) ? {
123
+ ...payload,
124
+ text: text || void 0
125
+ } : null;
126
+ }
117
127
  function resolveSlackMediaHookSpokenText(payload) {
118
128
  return (getReplyPayloadTtsSupplement(payload)?.spokenText ?? payload.spokenText)?.trim() || void 0;
119
129
  }
@@ -511,4 +521,4 @@ async function deliverSlackSlashReplies(params) {
511
521
  }
512
522
  }
513
523
  //#endregion
514
- export { resolveDeliveredSlackReplyThreadTs as a, readSlackReplyBlocks as i, deliverReplies as n, resolveSlackThreadTs as o, deliverSlackSlashReplies as r, emitSlackMessageSentHooks as s, createSlackReplyDeliveryPlan as t };
524
+ export { resolveDeliveredSlackReplyThreadTs as a, emitSlackMessageSentHooks as c, readSlackReplyBlocks as i, deliverReplies as n, resolveSlackThreadTs as o, deliverSlackSlashReplies as r, sanitizeSlackMonitorReplyPayload as s, createSlackReplyDeliveryPlan as t };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
2
  import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
3
- import { i as createSlackLookupClient } from "./probe-BVA65leh.js";
3
+ import { h as createSlackLookupClient } from "./probe-0usmAb0i.js";
4
4
  import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
5
5
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";