@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,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-CK4AVI2_.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 { $ as isSlackCallbackActionId, B as SLACK_TEXT_LIMIT, Et as isSlackApprovalAuthorizedSender, G as truncateSlackText, Ot as isSlackExecApprovalAuthorizedSender, Q as isSlackApprovalActionId, a as allowListMatches, at as escapeSlackMrkdwn, c as normalizeSlackAllowOwnerEntry, d as resolveSlackUserAllowListForTeam, et as isSlackQuestionActionId, ft as isSlackAnyNativeApprovalClientEnabled, l as normalizeSlackSlug, nt as decodeSlackQuestionAction, o as normalizeAllowList, ot as decodeSlackApprovalAction, rt as resolveSlackQuestionAction, s as normalizeAllowListLower, t as buildSlackChannelIdCandidates, u as resolveSlackAllowListMatch, wt as registerSlackInstallationState } from "./group-policy-c4RP9bjc.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-HoEg_WxB.js";
4
+ import { $ as isSlackCallbackActionId, B as SLACK_TEXT_LIMIT, G as truncateSlackText, Nt as isSlackExecApprovalAuthorizedSender, Q as isSlackApprovalActionId, _t as isSlackAnyNativeApprovalClientEnabled, a as qualifySlackConversationId, c as allowListMatches, ct as escapeSlackMrkdwn, d as normalizeSlackAllowOwnerEntry, et as isSlackQuestionActionId, f as normalizeSlackSlug, jt as isSlackApprovalAuthorizedSender, kt as registerSlackInstallationState, l as normalizeAllowList, m as resolveSlackUserAllowListForTeam, nt as decodeSlackQuestionAction, o as qualifySlackRoutePeerId, p as resolveSlackAllowListMatch, rt as resolveSlackQuestionAction, s as resolveSlackEnterpriseMainDmSessionKey, t as buildSlackChannelIdCandidates, u as normalizeAllowListLower, ut as decodeSlackApprovalAction } from "./group-policy-CU1tEGpS.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-4_aHtVT3.js";
6
6
  import { n as getSlackRuntime, t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
7
- import { t as hasSlackMessageTableBlock } from "./block-text-YtiNkqmx.js";
8
- import { i as setSlackDefaultSendIdentity } from "./send-Nor0iBwY.js";
7
+ import { i as hasSlackMessageTableBlock, r as saveRemoteMedia, t as isGovSlackClient } from "./slack-client-kind-hSfjXyUM.js";
8
+ import { i as setSlackDefaultSendIdentity, p as requireSlackPostMessageTimestamp } from "./send-DtjEnlLh.js";
9
9
  import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
10
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CNPrxaXY.js";
11
- import { t as resolveSlackUserAllowlist } from "./resolve-users-Dzomuwnr.js";
12
- import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-TapwbeaT.js";
10
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DSamDgVs.js";
11
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-CIzwbaJR.js";
12
+ import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-BoP6t88v.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";
@@ -25,13 +25,13 @@ import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
25
25
  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
+ import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
28
29
  import { collectErrorGraphCandidates, extractErrorCode, formatErrorMessage, isApprovalNotFoundError, readErrorName, toErrorObject } from "openclaw/plugin-sdk/error-runtime";
29
- import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
30
30
  import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
31
31
  import { buildChannelMetadata } from "openclaw/plugin-sdk/security-runtime";
32
32
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
33
+ import { classifyTransientNetworkErrorCode } from "openclaw/plugin-sdk/retry-runtime";
33
34
  import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
34
- import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
35
35
  import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
36
36
  import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
37
37
  import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history";
@@ -45,7 +45,7 @@ import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-w
45
45
  import { mutateConfigFile, readConfigFileSnapshotForWrite } from "openclaw/plugin-sdk/config-mutation";
46
46
  import { enqueueRoutedSystemEvent } from "openclaw/plugin-sdk/system-event-runtime";
47
47
  import { createChannelIngressResolver, defineStableChannelIngressIdentity, readChannelIngressStoreAllowFromForDmPolicy } from "openclaw/plugin-sdk/channel-ingress-runtime";
48
- import { classifyTransientNetworkErrorCode } from "openclaw/plugin-sdk/retry-runtime";
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";
@@ -376,20 +376,6 @@ async function updateSlackSuggestedPrompts(params) {
376
376
  }
377
377
  }
378
378
  //#endregion
379
- //#region extensions/slack/src/monitor/workspace-routing.ts
380
- function resolveSlackEnterpriseMainDmSessionKey(params) {
381
- const accountId = encodeURIComponent(params.accountId).toLowerCase();
382
- const teamId = encodeURIComponent(params.eventScope.teamId).toLowerCase();
383
- return `${params.baseSessionKey}:account:${accountId}:team:${teamId}`;
384
- }
385
- function qualifySlackRoutePeerId(params) {
386
- if (!params.eventScope) return params.id;
387
- return `team:${encodeURIComponent(params.eventScope.teamId)}:${params.kind}:${encodeURIComponent(params.id)}`;
388
- }
389
- function qualifySlackConversationId(conversationId, eventScope) {
390
- return eventScope ? `team:${encodeURIComponent(eventScope.teamId)}:${conversationId}` : conversationId;
391
- }
392
- //#endregion
393
379
  //#region extensions/slack/src/monitor/system-event-session.ts
394
380
  function createSlackSystemEventRouteResolver(params) {
395
381
  return (event) => {
@@ -489,6 +475,12 @@ function resolveSlackSystemEventRoute(params) {
489
475
  //#region extensions/slack/src/monitor/context.ts
490
476
  const SLACK_CHANNEL_CACHE_MAX_ENTRIES = 1024;
491
477
  const SLACK_USER_CACHE_MAX_ENTRIES = 2048;
478
+ const SLACK_AVATAR_CACHE_MAX_ENTRIES = 128;
479
+ const SLACK_AVATAR_MAX_BYTES = 256 * 1024;
480
+ const SLACK_AVATAR_SSRF_POLICY = {
481
+ allowedHostnames: ["avatars.slack-edge.com", "*.slack-edge.com"],
482
+ hostnameAllowlist: ["avatars.slack-edge.com", "*.slack-edge.com"]
483
+ };
492
484
  const SLACK_CHANNEL_DENIAL_WARNING_TTL_MS = 5 * 6e4;
493
485
  const SLACK_CHANNEL_DENIAL_WARNING_MAX_ENTRIES = 1024;
494
486
  function createSlackMonitorContext(params) {
@@ -496,6 +488,8 @@ function createSlackMonitorContext(params) {
496
488
  const logger = getChildLogger({ module: "slack-auto-reply" });
497
489
  const channelCache = /* @__PURE__ */ new Map();
498
490
  const userCache = /* @__PURE__ */ new Map();
491
+ const avatarCache = /* @__PURE__ */ new Map();
492
+ const pendingAvatars = /* @__PURE__ */ new Set();
499
493
  const channelDenialWarnings = createDedupeCache({
500
494
  ttlMs: SLACK_CHANNEL_DENIAL_WARNING_TTL_MS,
501
495
  maxSize: SLACK_CHANNEL_DENIAL_WARNING_MAX_ENTRIES
@@ -581,13 +575,41 @@ function createSlackMonitorContext(params) {
581
575
  user: userId
582
576
  });
583
577
  const profile = info.user?.profile;
584
- const entry = { name: profile?.display_name || profile?.real_name || info.user?.name || void 0 };
578
+ const entry = {
579
+ name: profile?.display_name || profile?.real_name || info.user?.name || void 0,
580
+ imageUrl: normalizeOptionalString(profile?.image_192) ?? normalizeOptionalString(profile?.image_512) ?? normalizeOptionalString(profile?.image_72)
581
+ };
585
582
  writeLruMapEntry(userCache, cacheKey, entry, SLACK_USER_CACHE_MAX_ENTRIES);
586
583
  return entry;
587
584
  } catch (error) {
588
585
  return { error };
589
586
  }
590
587
  };
588
+ const resolveUserAvatar = (userId, eventScope) => {
589
+ if (isGovSlackClient(eventScope?.client ?? params.app.client)) return;
590
+ const imageUrl = readLruMapEntry(userCache, scopedKey(userId, eventScope))?.imageUrl;
591
+ if (!imageUrl) return;
592
+ const cacheKey = scopedKey(`${userId}\0${imageUrl}`, eventScope);
593
+ const cached = readLruMapEntry(avatarCache, cacheKey);
594
+ if (cached) return cached;
595
+ if (pendingAvatars.has(cacheKey) || pendingAvatars.size >= SLACK_AVATAR_CACHE_MAX_ENTRIES) return;
596
+ pendingAvatars.add(cacheKey);
597
+ saveRemoteMedia({
598
+ url: imageUrl,
599
+ filePathHint: "conversation-avatar.png",
600
+ maxBytes: SLACK_AVATAR_MAX_BYTES,
601
+ ssrfPolicy: SLACK_AVATAR_SSRF_POLICY
602
+ }).then((media) => {
603
+ writeLruMapEntry(avatarCache, cacheKey, media.path, SLACK_AVATAR_CACHE_MAX_ENTRIES);
604
+ }).catch((error) => {
605
+ logger.debug({
606
+ error: formatSlackError(error),
607
+ userId
608
+ }, "Slack conversation avatar download failed");
609
+ }).finally(() => {
610
+ pendingAvatars.delete(cacheKey);
611
+ });
612
+ };
591
613
  const setSlackThreadStatus = async (p) => {
592
614
  if (!p.threadTs) return;
593
615
  try {
@@ -683,6 +705,7 @@ function createSlackMonitorContext(params) {
683
705
  }
684
706
  return false;
685
707
  };
708
+ const channelRuntime = params.channelRuntime;
686
709
  const ctx = {
687
710
  cfg: params.cfg,
688
711
  accountId: params.accountId,
@@ -690,7 +713,8 @@ function createSlackMonitorContext(params) {
690
713
  app: params.app,
691
714
  runtime: params.runtime,
692
715
  channelRuntime: params.channelRuntime,
693
- buildContext: params.channelRuntime?.inbound.buildContext,
716
+ buildContext: channelRuntime?.inbound.buildContext,
717
+ dispatchReplyFromConfig: channelRuntime?.reply?.dispatchReplyFromConfig,
694
718
  botUserId: params.botUserId,
695
719
  botId: params.botId,
696
720
  identityHealth: params.identityHealth,
@@ -734,6 +758,7 @@ function createSlackMonitorContext(params) {
734
758
  rememberSlackChannelType,
735
759
  recallSlackChannelType,
736
760
  resolveUserName,
761
+ resolveUserAvatar,
737
762
  setSlackThreadStatus,
738
763
  getSlackAssistantThreadContext: assistantThreadContextStore.get,
739
764
  saveSlackAssistantThreadContext: assistantThreadContextStore.save,
@@ -1255,6 +1280,8 @@ function resolveSlackIngressTurnLifecycle(context) {
1255
1280
  function createSlackDurableIngress(options) {
1256
1281
  let app;
1257
1282
  let relayDispatch;
1283
+ const activeSessionTurns = /* @__PURE__ */ new Map();
1284
+ const activeChannelTurns = /* @__PURE__ */ new Map();
1258
1285
  const monitor = createChannelIngressMonitor({
1259
1286
  queue: options.queue ?? (() => getSlackRuntime().state.openChannelIngressQueue({ accountId: options.accountId })),
1260
1287
  inspect: inspectSlackIngress,
@@ -1291,26 +1318,110 @@ function createSlackDurableIngress(options) {
1291
1318
  onDurableAdmission: async (raw) => {
1292
1319
  if (raw.kind === "events-api") await raw.afterDurableAdmission?.();
1293
1320
  },
1294
- deliver: async (raw, lifecycle) => {
1295
- if (raw.kind === "relay") {
1296
- if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
1297
- await relayDispatch(raw.message, lifecycle);
1298
- return;
1321
+ deliver: async (raw, lifecycle, claim) => {
1322
+ const laneKey = claim.laneKey ?? inspectSlackIngress(raw).laneKey;
1323
+ let releaseSession;
1324
+ let releaseChannel;
1325
+ let routedSession;
1326
+ let adoptOnCompletion = false;
1327
+ const settleSession = () => {
1328
+ adoptOnCompletion = false;
1329
+ releaseSession?.();
1330
+ };
1331
+ const settleTurn = () => {
1332
+ settleSession();
1333
+ releaseChannel?.();
1334
+ lifecycle.abortSignal.removeEventListener("abort", settleTurn);
1335
+ };
1336
+ const routedLifecycle = {
1337
+ ...lifecycle,
1338
+ onSessionRouted: async (sessionKey) => {
1339
+ if (routedSession !== void 0) {
1340
+ if (routedSession !== sessionKey) throw new Error("Slack ingress session ownership changed after routing.");
1341
+ return;
1342
+ }
1343
+ lifecycle.abortSignal.throwIfAborted();
1344
+ routedSession = sessionKey;
1345
+ adoptOnCompletion = true;
1346
+ const previousTurn = activeSessionTurns.get(sessionKey);
1347
+ const releasedCurrentTurn = createDeferred();
1348
+ const currentTurn = previousTurn ? previousTurn.then(() => releasedCurrentTurn.promise) : releasedCurrentTurn.promise;
1349
+ activeSessionTurns.set(sessionKey, currentTurn);
1350
+ const channelTurn = createDeferred();
1351
+ const channelTurns = activeChannelTurns.get(laneKey) ?? /* @__PURE__ */ new Set();
1352
+ channelTurns.add(channelTurn.promise);
1353
+ activeChannelTurns.set(laneKey, channelTurns);
1354
+ currentTurn.then(() => {
1355
+ if (activeSessionTurns.get(sessionKey) === currentTurn) activeSessionTurns.delete(sessionKey);
1356
+ });
1357
+ channelTurn.promise.then(() => {
1358
+ channelTurns.delete(channelTurn.promise);
1359
+ if (channelTurns.size === 0 && activeChannelTurns.get(laneKey) === channelTurns) activeChannelTurns.delete(laneKey);
1360
+ });
1361
+ releaseSession = () => releasedCurrentTurn.resolve();
1362
+ releaseChannel = () => channelTurn.resolve();
1363
+ lifecycle.abortSignal.addEventListener("abort", settleTurn, { once: true });
1364
+ lifecycle.onDeferred();
1365
+ if (previousTurn) lifecycle.onAdoptionFinalizing();
1366
+ monitor.requestDrain();
1367
+ await previousTurn;
1368
+ lifecycle.abortSignal.throwIfAborted();
1369
+ },
1370
+ onAdopted: async () => {
1371
+ try {
1372
+ await lifecycle.onAdopted();
1373
+ } finally {
1374
+ settleTurn();
1375
+ }
1376
+ },
1377
+ onDeferred: () => {
1378
+ lifecycle.onDeferred();
1379
+ settleSession();
1380
+ monitor.requestDrain();
1381
+ },
1382
+ onAbandoned: async () => {
1383
+ try {
1384
+ await lifecycle.onAbandoned();
1385
+ } finally {
1386
+ settleTurn();
1387
+ }
1388
+ }
1389
+ };
1390
+ try {
1391
+ if (asOptionalRecord(raw.kind === "events-api" ? asOptionalRecord(raw.body)?.event : void 0)?.type === "channel_id_changed") {
1392
+ const channelTurns = activeChannelTurns.get(laneKey);
1393
+ if (channelTurns && channelTurns.size > 0) {
1394
+ adoptOnCompletion = true;
1395
+ lifecycle.onAdoptionFinalizing();
1396
+ await Promise.all(channelTurns);
1397
+ lifecycle.abortSignal.throwIfAborted();
1398
+ }
1399
+ }
1400
+ if (raw.kind === "relay") {
1401
+ if (!relayDispatch) throw new Error("Slack relay ingress dispatcher is not attached.");
1402
+ await relayDispatch(raw.message, routedLifecycle);
1403
+ } else {
1404
+ if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
1405
+ await app.processEvent({
1406
+ body: raw.body,
1407
+ ack: async () => {},
1408
+ ...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
1409
+ ...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
1410
+ customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: routedLifecycle }
1411
+ });
1412
+ }
1413
+ if (adoptOnCompletion) await routedLifecycle.onAdopted();
1414
+ } catch (error) {
1415
+ settleTurn();
1416
+ throw error;
1299
1417
  }
1300
- if (!app) throw new Error("Slack ingress receiver is not attached to a Bolt app.");
1301
- await app.processEvent({
1302
- body: raw.body,
1303
- ack: async () => {},
1304
- ...raw.retryNum === void 0 ? {} : { retryNum: raw.retryNum },
1305
- ...raw.retryReason === void 0 ? {} : { retryReason: raw.retryReason },
1306
- customProperties: { [SLACK_INGRESS_LIFECYCLE_CONTEXT_KEY]: lifecycle }
1307
- });
1308
1418
  },
1309
1419
  pollIntervalMs: options.pollIntervalMs ?? SLACK_INGRESS_POLL_INTERVAL_MS,
1310
1420
  retention: "standard",
1311
1421
  appendRetryDelaysMs: [0],
1312
1422
  drain: {
1313
1423
  resolveNonRetryableFailure: resolveSlackIngressNonRetryableFailure,
1424
+ deferredLaneOccupancy: "release",
1314
1425
  deriveLaneKey: (record) => record.payload.kind === "relay" ? resolveSlackIngressLane({ event: record.payload.message }, record.id) : resolveSlackIngressLane(record.payload.body, record.id),
1315
1426
  ...options.adoptionStallTimeoutMs === void 0 ? {} : { adoptionStallTimeoutMs: options.adoptionStallTimeoutMs },
1316
1427
  ...options.onLog ? { onLog: options.onLog } : {}
@@ -1992,6 +2103,7 @@ async function authorizeAndResolveSlackSystemEventContext(params) {
1992
2103
  channelId,
1993
2104
  channelType: auth.channelType,
1994
2105
  senderId,
2106
+ threadTs: auth.channelType === "im" ? void 0 : params.threadTs,
1995
2107
  eventScope: params.eventScope
1996
2108
  })
1997
2109
  };
@@ -2421,8 +2533,8 @@ function removeSlackApprovalControls(blocks) {
2421
2533
  }
2422
2534
  function buildSlackApprovalTerminalBlocks(params) {
2423
2535
  const blocks = removeSlackApprovalControls(params.blocks ?? []).filter((block) => {
2424
- const text = block.text?.text;
2425
- return !(block.type === "section" && typeof text === "string" && /^\*(?:Exec|Plugin) approval required\*/u.test(text));
2536
+ const blockId = block.block_id;
2537
+ return !(block.type === "section" && blockId === "openclaw_approval_header");
2426
2538
  });
2427
2539
  return [{
2428
2540
  type: "section",
@@ -3630,10 +3742,57 @@ function noteSlackDraftConversationMessage(conversation) {
3630
3742
  }
3631
3743
  }
3632
3744
  //#endregion
3745
+ //#region extensions/slack/src/threading.ts
3746
+ function resolveSlackThreadContext(params) {
3747
+ const incomingThreadTs = params.message.thread_ts;
3748
+ const eventTs = params.message.event_ts;
3749
+ const messageTs = params.message.ts ?? eventTs;
3750
+ const hasThreadTs = typeof incomingThreadTs === "string" && incomingThreadTs.length > 0;
3751
+ const isThreadReply = hasThreadTs && (incomingThreadTs !== messageTs || Boolean(params.message.parent_user_id));
3752
+ const replyToId = isThreadReply ? incomingThreadTs : void 0;
3753
+ const isAssistantDmThreadRoot = hasThreadTs && !isThreadReply && params.isDirectMessage === true;
3754
+ return {
3755
+ incomingThreadTs,
3756
+ messageTs,
3757
+ isThreadReply,
3758
+ replyToId,
3759
+ messageThreadId: isThreadReply || isAssistantDmThreadRoot ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
3760
+ };
3761
+ }
3762
+ /**
3763
+ * Resolves Slack thread targeting for replies and status indicators.
3764
+ *
3765
+ * @returns replyThreadTs - Thread timestamp for reply messages
3766
+ * @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
3767
+ * @returns isThreadReply - true if this is a genuine user reply in a thread,
3768
+ * false if thread_ts comes from a bot status message (e.g. typing indicator)
3769
+ */
3770
+ function resolveSlackThreadTargets(params) {
3771
+ const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
3772
+ const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
3773
+ return {
3774
+ replyThreadTs,
3775
+ statusThreadTs: replyThreadTs,
3776
+ isThreadReply
3777
+ };
3778
+ }
3779
+ //#endregion
3633
3780
  //#region extensions/slack/src/monitor/events/message-subtype-handlers.ts
3781
+ function resolveNestedThreadTs(event) {
3782
+ const changed = event;
3783
+ const message = changed.message?.thread_ts ? changed.message : changed.previous_message;
3784
+ if (!message) return;
3785
+ return resolveSlackThreadContext({
3786
+ message: {
3787
+ type: "message",
3788
+ channel: event.channel,
3789
+ ...message
3790
+ },
3791
+ replyToMode: "off"
3792
+ }).replyToId;
3793
+ }
3634
3794
  const SUBTYPE_HANDLER_REGISTRY = {
3635
3795
  message_changed: {
3636
- subtype: "message_changed",
3637
3796
  eventKind: "message_changed",
3638
3797
  describe: (channelLabel) => `Slack message edited in ${channelLabel}.`,
3639
3798
  contextKey: (event) => {
@@ -3644,11 +3803,9 @@ const SUBTYPE_HANDLER_REGISTRY = {
3644
3803
  const changed = event;
3645
3804
  return changed.message?.user ?? changed.previous_message?.user ?? changed.message?.bot_id ?? changed.previous_message?.bot_id;
3646
3805
  },
3647
- resolveChannelId: (event) => event.channel,
3648
- resolveChannelType: () => void 0
3806
+ resolveThreadTs: resolveNestedThreadTs
3649
3807
  },
3650
3808
  message_deleted: {
3651
- subtype: "message_deleted",
3652
3809
  eventKind: "message_deleted",
3653
3810
  describe: (channelLabel) => `Slack message deleted in ${channelLabel}.`,
3654
3811
  contextKey: (event) => {
@@ -3659,8 +3816,7 @@ const SUBTYPE_HANDLER_REGISTRY = {
3659
3816
  const deleted = event;
3660
3817
  return deleted.previous_message?.user ?? deleted.previous_message?.bot_id;
3661
3818
  },
3662
- resolveChannelId: (event) => event.channel,
3663
- resolveChannelType: () => void 0
3819
+ resolveThreadTs: resolveNestedThreadTs
3664
3820
  }
3665
3821
  };
3666
3822
  function resolveSlackMessageSubtypeHandler(event) {
@@ -3783,14 +3939,6 @@ function registerSlackMessageEvents(params) {
3783
3939
  if (ctx.shouldDropMismatchedSlackEvent(body)) return;
3784
3940
  const message = event;
3785
3941
  ctx.rememberSlackChannelType(message.channel, message.channel_type, eventScope);
3786
- if (eventScope && isBotAuthoredEnterpriseEvent(message)) {
3787
- logVerbose("slack: drop enterprise bot-authored message");
3788
- return;
3789
- }
3790
- if (eventScope && message.subtype && message.subtype !== "file_share") {
3791
- logVerbose(`slack: drop enterprise message subtype=${message.subtype}`);
3792
- return;
3793
- }
3794
3942
  const assistantChangedInbound = resolveAssistantMessageChangedInbound({
3795
3943
  event: message,
3796
3944
  ctx
@@ -3812,12 +3960,11 @@ function registerSlackMessageEvents(params) {
3812
3960
  })) return;
3813
3961
  const subtypeHandler = resolveSlackMessageSubtypeHandler(message);
3814
3962
  if (subtypeHandler) {
3815
- const channelId = subtypeHandler.resolveChannelId(message);
3816
3963
  const ingressContext = await authorizeAndResolveSlackSystemEventContext({
3817
3964
  ctx,
3818
3965
  senderId: subtypeHandler.resolveSenderId(message),
3819
- channelId,
3820
- channelType: subtypeHandler.resolveChannelType(message),
3966
+ channelId: message.channel,
3967
+ threadTs: subtypeHandler.resolveThreadTs(message),
3821
3968
  eventKind: subtypeHandler.eventKind,
3822
3969
  eventScope
3823
3970
  });
@@ -4149,19 +4296,7 @@ function buildSlackDebounceKey(message, accountId, teamId) {
4149
4296
  }
4150
4297
  //#endregion
4151
4298
  //#region extensions/slack/src/monitor/message-handler.ts
4152
- const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-BvYsM5JO.js"));
4153
- function createSlackDispatchCompletion() {
4154
- let resolve;
4155
- let reject;
4156
- return {
4157
- promise: new Promise((nextResolve, nextReject) => {
4158
- resolve = nextResolve;
4159
- reject = nextReject;
4160
- }),
4161
- resolve,
4162
- reject
4163
- };
4164
- }
4299
+ const loadSlackMessagePipeline = createLazyRuntimeModule(() => import("./pipeline.runtime-CRRng_Nw.js"));
4165
4300
  const RETRYABLE_FLUSH_MAX_ATTEMPTS = 3;
4166
4301
  const RETRYABLE_FLUSH_RETRY_DELAY_MS = 1e3;
4167
4302
  const REPLY_SESSION_INIT_CONFLICT_MESSAGE_RE = /reply session initialization conflicted for \S+/u;
@@ -4228,6 +4363,19 @@ function createSlackMessageHandler(params) {
4228
4363
  const completions = entries.map((entry) => entry.opts.dispatchCompletion).filter((completion) => completion !== void 0);
4229
4364
  try {
4230
4365
  await (async () => {
4366
+ const flushedEntry = entries.at(-1);
4367
+ if (flushedEntry) {
4368
+ const teamId = flushedEntry.opts.eventScope?.teamId;
4369
+ const flushedKey = buildSlackDebounceKey(flushedEntry.message, ctx.accountId, teamId);
4370
+ const topLevelConversationKey = buildTopLevelSlackConversationKey(flushedEntry.message, ctx.accountId, teamId);
4371
+ if (flushedKey && topLevelConversationKey) {
4372
+ const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
4373
+ if (pendingKeys) {
4374
+ pendingKeys.delete(flushedKey);
4375
+ if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
4376
+ }
4377
+ }
4378
+ }
4231
4379
  const claims = [];
4232
4380
  const claimedKeys = /* @__PURE__ */ new Map();
4233
4381
  const surviving = [];
@@ -4281,16 +4429,6 @@ function createSlackMessageHandler(params) {
4281
4429
  releaseClaims();
4282
4430
  return;
4283
4431
  }
4284
- const teamId = last.opts.eventScope?.teamId;
4285
- const flushedKey = buildSlackDebounceKey(last.message, ctx.accountId, teamId);
4286
- const topLevelConversationKey = buildTopLevelSlackConversationKey(last.message, ctx.accountId, teamId);
4287
- if (flushedKey && topLevelConversationKey) {
4288
- const pendingKeys = pendingTopLevelDebounceKeys.get(topLevelConversationKey);
4289
- if (pendingKeys) {
4290
- pendingKeys.delete(flushedKey);
4291
- if (pendingKeys.size === 0) pendingTopLevelDebounceKeys.delete(topLevelConversationKey);
4292
- }
4293
- }
4294
4432
  const combinedText = surviving.length === 1 ? last.message.text ?? "" : surviving.map((entry) => entry.message.text ?? "").filter(Boolean).join("\n");
4295
4433
  const combinedMentioned = surviving.some((entry) => Boolean(entry.opts.wasMentioned));
4296
4434
  const syntheticMessage = {
@@ -4323,6 +4461,7 @@ function createSlackMessageHandler(params) {
4323
4461
  releaseClaims();
4324
4462
  return;
4325
4463
  }
4464
+ await turnAdoptionLifecycle?.onSessionRouted?.(prepared.route.sessionKey);
4326
4465
  prepared.turnAdoptionLifecycle = {
4327
4466
  ...turnAdoptionLifecycle,
4328
4467
  admission: turnAdoptionLifecycle?.admission ?? "exclusive",
@@ -4401,7 +4540,7 @@ function createSlackMessageHandler(params) {
4401
4540
  pendingKeys.add(debounceKey);
4402
4541
  pendingTopLevelDebounceKeys.set(conversationKey, pendingKeys);
4403
4542
  }
4404
- const dispatchCompletion = opts.awaitDispatch ? createSlackDispatchCompletion() : void 0;
4543
+ const dispatchCompletion = opts.awaitDispatch ? createDeferred() : void 0;
4405
4544
  await debouncer.enqueue({
4406
4545
  message: resolvedMessage,
4407
4546
  opts: {
@@ -4427,9 +4566,13 @@ const SLACK_PRESENCE_AUTO_MAX_PARTICIPANTS = 8;
4427
4566
  const SLACK_PRESENCE_TARGET_TTL_MS = 1440 * 60 * 1e3;
4428
4567
  const SLACK_PRESENCE_MAX_POLLS_PER_INTERVAL = 45;
4429
4568
  const SLACK_PRESENCE_MAX_TARGETS = 2e3;
4569
+ const DEFAULT_SLACK_PRESENCE_EVENT_PROMPT = ["Before greeting, retrieve relevant memory and wiki context for this immutable user_id, including a known timezone when available. Use their local time; if their timezone is unknown, do not guess.", "Send at most one short, natural greeting in this Slack conversation. Do not reveal private memory. If no greeting is appropriate, stay silent."];
4430
4570
  function resolveMode(channelConfig, accountConfig) {
4431
4571
  return channelConfig?.mode ?? accountConfig?.mode ?? "off";
4432
4572
  }
4573
+ function resolvePrompt(channelConfig, accountConfig) {
4574
+ return channelConfig?.prompt ?? accountConfig?.prompt;
4575
+ }
4433
4576
  function hasSlackPresenceEventsEnabled(params) {
4434
4577
  if (resolveMode(void 0, params.account) !== "off") return true;
4435
4578
  return Object.values(params.channels ?? {}).some((entry) => resolveMode(entry?.presenceEvents, void 0) !== "off");
@@ -4442,12 +4585,12 @@ function isTargetEligible(target) {
4442
4585
  function formatSlackPresenceEvent(target, userId, awayObservation) {
4443
4586
  const { observedAwayAtMs, observedActiveAtMs } = awayObservation;
4444
4587
  const observedAwayDurationMs = Math.max(0, observedActiveAtMs - observedAwayAtMs);
4588
+ const promptLines = target.prompt === void 0 ? DEFAULT_SLACK_PRESENCE_EVENT_PROMPT : target.prompt.length > 0 ? [target.prompt] : [];
4445
4589
  return [
4446
4590
  "Slack presence event:",
4447
4591
  `A human participant became active on Slack after being observed away: user_id=${JSON.stringify(userId)}${target.teamId ? ` team_id=${JSON.stringify(target.teamId)}` : ""} channel_id=${JSON.stringify(target.channelId)}${target.threadId ? ` thread_ts=${JSON.stringify(target.threadId)}` : ""}.`,
4448
4592
  `observed_away_at_ms=${observedAwayAtMs} observed_active_at_ms=${observedActiveAtMs} observed_away_duration_ms=${observedAwayDurationMs}`,
4449
- "Before greeting, retrieve relevant memory and wiki context for this immutable user_id, including a known timezone when available. Use their local time; if their timezone is unknown, do not guess.",
4450
- "Send at most one short, natural greeting in this Slack conversation. Do not reveal private memory. If no greeting is appropriate, stay silent."
4593
+ ...promptLines
4451
4594
  ].join("\n");
4452
4595
  }
4453
4596
  function resolveObservedTarget(params) {
@@ -4470,6 +4613,7 @@ function resolveObservedTarget(params) {
4470
4613
  key: `${teamId ? `team:${teamId}:` : ""}${channelId}${targetSuffix}`,
4471
4614
  ...teamId ? { teamId } : {},
4472
4615
  mode,
4616
+ prompt: resolvePrompt(prepared.channelConfig?.presenceEvents, params.accountConfig),
4473
4617
  channelId,
4474
4618
  threadId,
4475
4619
  to: formatSlackTarget({
@@ -4523,6 +4667,7 @@ function createSlackPresenceMonitor(params) {
4523
4667
  const current = targets.get(observed.key);
4524
4668
  if (current) {
4525
4669
  current.mode = observed.mode;
4670
+ current.prompt = observed.prompt;
4526
4671
  current.sessionKey = observed.sessionKey;
4527
4672
  current.agentId = observed.agentId;
4528
4673
  current.to = observed.to;
@@ -5119,7 +5264,7 @@ const SLACK_COMMAND_ARG_CONFIRM_TEXT_MAX = 300;
5119
5264
  const SLACK_HEADER_TEXT_MAX = 150;
5120
5265
  const SLACK_COMMAND_ARG_ACTION_BLOCKS_MAX = 47;
5121
5266
  const loadSlashCommandsRuntime = createLazyRuntimeModule(() => import("./slash-commands.runtime-BTTMlmwy.js"));
5122
- const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-Bnr9GR1S.js"));
5267
+ const loadSlashDispatchRuntime = createLazyRuntimeModule(() => import("./slash-dispatch.runtime-Chr3YHnT.js"));
5123
5268
  const loadSlashSkillCommandsRuntime = createLazyRuntimeModule(() => import("./slash-skill-commands.runtime-CD1J2ODY.js"));
5124
5269
  const loadPluginCommandRuntime = createLazyRuntimeModule(() => import("openclaw/plugin-sdk/plugin-command-runtime"));
5125
5270
  function resolveSlackCommandMenuModelContext(params) {
@@ -5581,7 +5726,7 @@ async function registerSlackMonitorSlashCommands(params) {
5581
5726
  }
5582
5727
  const channelName = channelInfo?.name;
5583
5728
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
5584
- const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode } = await loadSlashDispatchRuntime();
5729
+ const { deliverSlackSlashReplies, dispatchChannelInboundTurn, finalizeInboundContext, isChannelPartialDeliveryError, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode, sanitizeSlackMonitorReplyPayload } = await loadSlashDispatchRuntime();
5585
5730
  const route = resolvedSlashRoute ?? resolveAgentRoute({
5586
5731
  cfg,
5587
5732
  channel: "slack",
@@ -5681,10 +5826,8 @@ async function registerSlackMonitorSlashCommands(params) {
5681
5826
  sessionKey: ctxPayload.SessionKey ?? route.sessionKey
5682
5827
  },
5683
5828
  ctxPayload,
5684
- replyPipeline: { transformReplyPayload: (payload) => {
5685
- if (payload.isReasoning === true) return null;
5686
- return payload;
5687
- } },
5829
+ dispatchReplyFromConfig: ctx.dispatchReplyFromConfig,
5830
+ replyPipeline: { transformReplyPayload: sanitizeSlackMonitorReplyPayload },
5688
5831
  dispatcherOptions: { onSettled: async () => {
5689
5832
  if (pendingSlashReplies.length === 0) return;
5690
5833
  const pending = pendingSlashReplies.splice(0);
@@ -5899,11 +6042,13 @@ async function registerSlackMonitorSlashCommands(params) {
5899
6042
  const respondFn = respond ?? (async (message) => {
5900
6043
  if (!body.channel?.id || !body.user?.id) return new Response(null, { status: 204 });
5901
6044
  const payload = typeof message === "string" ? { text: message } : message;
6045
+ const threadTs = body.container?.thread_ts ?? body.message?.thread_ts;
5902
6046
  await args.client.chat.postEphemeral({
5903
6047
  token: ctx.botToken,
5904
6048
  channel: body.channel.id,
5905
6049
  user: body.user.id,
5906
6050
  text: payload.text ?? "",
6051
+ ...threadTs ? { thread_ts: threadTs } : {},
5907
6052
  ...payload.blocks ? { blocks: payload.blocks } : {},
5908
6053
  ...typeof payload.mrkdwn === "boolean" ? { mrkdwn: payload.mrkdwn } : {}
5909
6054
  });
@@ -5978,12 +6123,12 @@ async function deliverSlackSlashResponseWithWebApi(params) {
5978
6123
  const mrkdwn = "mrkdwn" in payload && typeof payload.mrkdwn === "boolean" ? payload.mrkdwn : void 0;
5979
6124
  if (payload.response_type === "in_channel") {
5980
6125
  const postSlackMessage = params.client.chat.postMessage;
5981
- await postSlackMessage({
6126
+ requireSlackPostMessageTimestamp(await postSlackMessage({
5982
6127
  channel: params.command.channel_id,
5983
6128
  text,
5984
6129
  ...blocks ? { blocks } : {},
5985
6130
  ...mrkdwn !== void 0 ? { mrkdwn } : {}
5986
- });
6131
+ }));
5987
6132
  } else await params.client.chat.postEphemeral({
5988
6133
  channel: params.command.channel_id,
5989
6134
  user: params.command.user_id,
@@ -6015,7 +6160,7 @@ async function getSlackBoltInterop() {
6015
6160
  }
6016
6161
  return slackBoltInterop;
6017
6162
  }
6018
- const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-C9leF11u.js"));
6163
+ const loadSlackRelaySource = createLazyRuntimeModule(() => import("./relay-source-CEmze11m.js"));
6019
6164
  const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
6020
6165
  const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
6021
6166
  function resolveSlackRuntimeIdentity(params) {
@@ -6729,4 +6874,4 @@ function createSlackWorkspaceClientResolver(params) {
6729
6874
  }
6730
6875
  const resolveSlackRuntimeGroupPolicy = resolveOpenProviderRuntimeGroupPolicy$1;
6731
6876
  //#endregion
6732
- export { resolveChannelResetConfig as C, stripSlackMentionsForCommandDetection as D, buildSlackSlashCommandMatcher as E, resolveChannelContextVisibilityMode as S, updateLastRoute as T, normalizeSlackChannelType as _, createSlackResponseUrlBudget as a, parseSlackAssistantThreadMetadata as b, resolveConversationLabel$1 as c, resolveSlackEffectiveAllowFrom as d, SLACK_SOCKET_RECONNECT_POLICY as f, resolveSlackEnterpriseMainDmSessionKey as g, qualifySlackRoutePeerId as h, SlackResponseAlreadyReportedError as i, authorizeSlackBotRoomMessage as l, qualifySlackConversationId as m, resolveSlackRuntimeGroupPolicy as n, authorizeSlackDirectMessage as o, formatUnknownError as p, resolveSlackRoomContextHints as r, trackSlackDraftMessage as s, monitorSlackProvider as t, resolveSlackCommandIngress as u, resolveSlackChatType as v, resolveStorePath$1 as w, readSessionUpdatedAt as x, buildSlackAssistantThreadMetadata as y };
6877
+ 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-CDNvBXUi.js";
1
+ import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-D4nDgxCh.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";