@openclaw/slack 2026.8.1-beta.3 → 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 (233) 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-BoSeX09X.js} +18 -21
  7. package/dist/action-runtime.runtime-Dpa16J87.js +2 -0
  8. package/dist/{actions-DFk0ANVB.js → actions-XdQyjG_p.js} +98 -66
  9. package/dist/api.js +12 -12
  10. package/dist/{approval-handler.runtime-BNvAoKdK.js → approval-handler.runtime-DxXfGX_Z.js} +53 -176
  11. package/dist/{channel-CA5w7qDF.js → channel-C_vnTgxo.js} +60 -54
  12. package/dist/channel-plugin-api.js +1 -1
  13. package/dist/{channel-type-CZWv55Wu.js → channel-type-j-2lalcC.js} +3 -3
  14. package/dist/{channel.setup-CpyYsEXH.js → channel.setup-aal8tokM.js} +33 -48
  15. package/dist/configured-state.js +34 -0
  16. package/dist/{directory-config-BGYyuzWh.js → directory-config-DqfQ42OV.js} +1 -1
  17. package/dist/directory-contract-api.js +1 -1
  18. package/dist/{directory-live-DjUJQLbq.js → directory-live-lC6X_Ru-.js} +2 -2
  19. package/dist/{group-policy-DyfB_ZIE.js → group-policy-CU1tEGpS.js} +536 -609
  20. package/dist/{message-tool-api-CqMr5Rmc.js → message-tool-api-CWosHSi5.js} +6 -5
  21. package/dist/message-tool-api.js +1 -1
  22. package/dist/{monitor-Chrecrb9.js → monitor-DrNCGneD.js} +3 -3
  23. package/dist/{outbound-adapter-DuRqAQXK.js → outbound-adapter-DkT2vUE9.js} +34 -13
  24. package/dist/{pipeline.runtime-Bbfd5VFW.js → pipeline.runtime-CRRng_Nw.js} +74 -137
  25. package/dist/{policy-BKXSxrIS.js → policy-BoP6t88v.js} +1 -1
  26. package/dist/{probe-BVA65leh.js → probe-4_aHtVT3.js} +2 -21
  27. package/dist/{provider-CUUiwsg2.js → provider-D4nDgxCh.js} +187 -63
  28. package/dist/{relay-source-mhpMMRG-.js → relay-source-CEmze11m.js} +1 -1
  29. package/dist/{replies-SnWyXcsL.js → replies-D9XMM_S0.js} +14 -4
  30. package/dist/{resolve-channels-BSpqC8jU.js → resolve-channels-DSamDgVs.js} +1 -1
  31. package/dist/{resolve-users-Dvz9pDe0.js → resolve-users-CIzwbaJR.js} +1 -1
  32. package/dist/runtime-api.js +11 -11
  33. package/dist/{scopes-BSk4GZvZ.js → scopes-BBrUzpBH.js} +1 -1
  34. package/dist/{send-CtnOxKCc.js → send-DtjEnlLh.js} +37 -29
  35. package/dist/{send.runtime-kYctMHSd.js → send.runtime-DQeNKa2J.js} +1 -1
  36. package/dist/setup-plugin-api.js +1 -1
  37. package/dist/{setup-surface-BPFfp6So.js → setup-surface-CsBCM4rP.js} +6 -6
  38. package/dist/{shared-DJBaslN7.js → shared-D9GeeR9K.js} +24 -6
  39. package/dist/{slack-client-kind-BXyOOICI.js → slack-client-kind-hSfjXyUM.js} +1 -1
  40. package/dist/{slash-dispatch.runtime-Cf2FTrnf.js → slash-dispatch.runtime-Chr3YHnT.js} +2 -2
  41. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  42. package/node_modules/@slack/bolt/node_modules/@types/node/child_process.d.ts +0 -1
  43. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +6 -6
  44. package/node_modules/@slack/bolt/node_modules/@types/node/dns/promises.d.ts +5 -5
  45. package/node_modules/@slack/bolt/node_modules/@types/node/dns.d.ts +5 -5
  46. package/node_modules/@slack/bolt/node_modules/@types/node/fs.d.ts +7 -0
  47. package/node_modules/@slack/bolt/node_modules/@types/node/http.d.ts +30 -0
  48. package/node_modules/@slack/bolt/node_modules/@types/node/http2.d.ts +4 -4
  49. package/node_modules/@slack/bolt/node_modules/@types/node/os.d.ts +30 -30
  50. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  51. package/node_modules/@slack/bolt/node_modules/@types/node/perf_hooks.d.ts +2 -1
  52. package/node_modules/@slack/bolt/node_modules/@types/node/process.d.ts +42 -43
  53. package/node_modules/@slack/bolt/node_modules/@types/node/quic.d.ts +1049 -84
  54. package/node_modules/@slack/bolt/node_modules/@types/node/sqlite.d.ts +14 -1
  55. package/node_modules/@slack/bolt/node_modules/@types/node/stream/iter.d.ts +3 -2
  56. package/node_modules/@slack/bolt/node_modules/@types/node/test.d.ts +61 -0
  57. package/node_modules/@slack/bolt/node_modules/@types/node/v8.d.ts +20 -23
  58. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/README.md +2 -0
  59. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +20 -0
  60. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js +20 -14
  61. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -1
  62. package/node_modules/@slack/bolt/node_modules/body-parser/node_modules/content-type/package.json +1 -1
  63. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/README.md +2 -0
  64. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.d.ts +20 -0
  65. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js +20 -14
  66. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -1
  67. package/node_modules/@slack/bolt/node_modules/type-is/node_modules/content-type/package.json +1 -1
  68. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  69. package/node_modules/@slack/socket-mode/node_modules/@types/node/child_process.d.ts +0 -1
  70. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +6 -6
  71. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns/promises.d.ts +5 -5
  72. package/node_modules/@slack/socket-mode/node_modules/@types/node/dns.d.ts +5 -5
  73. package/node_modules/@slack/socket-mode/node_modules/@types/node/fs.d.ts +7 -0
  74. package/node_modules/@slack/socket-mode/node_modules/@types/node/http.d.ts +30 -0
  75. package/node_modules/@slack/socket-mode/node_modules/@types/node/http2.d.ts +4 -4
  76. package/node_modules/@slack/socket-mode/node_modules/@types/node/os.d.ts +30 -30
  77. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  78. package/node_modules/@slack/socket-mode/node_modules/@types/node/perf_hooks.d.ts +2 -1
  79. package/node_modules/@slack/socket-mode/node_modules/@types/node/process.d.ts +42 -43
  80. package/node_modules/@slack/socket-mode/node_modules/@types/node/quic.d.ts +1049 -84
  81. package/node_modules/@slack/socket-mode/node_modules/@types/node/sqlite.d.ts +14 -1
  82. package/node_modules/@slack/socket-mode/node_modules/@types/node/stream/iter.d.ts +3 -2
  83. package/node_modules/@slack/socket-mode/node_modules/@types/node/test.d.ts +61 -0
  84. package/node_modules/@slack/socket-mode/node_modules/@types/node/v8.d.ts +20 -23
  85. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  86. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +0 -1
  87. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +6 -6
  88. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +5 -5
  89. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +5 -5
  90. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +7 -0
  91. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +30 -0
  92. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +4 -4
  93. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +30 -30
  94. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  95. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +2 -1
  96. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +42 -43
  97. package/node_modules/@slack/web-api/node_modules/@types/node/quic.d.ts +1049 -84
  98. package/node_modules/@slack/web-api/node_modules/@types/node/sqlite.d.ts +14 -1
  99. package/node_modules/@slack/web-api/node_modules/@types/node/stream/iter.d.ts +3 -2
  100. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +61 -0
  101. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +20 -23
  102. package/node_modules/typebox/build/format/date.d.mts +1 -1
  103. package/node_modules/typebox/build/format/date.mjs +1 -1
  104. package/node_modules/typebox/build/format/date_time.d.mts +2 -2
  105. package/node_modules/typebox/build/format/date_time.mjs +3 -3
  106. package/node_modules/typebox/build/format/email.d.mts +1 -1
  107. package/node_modules/typebox/build/format/email.mjs +2 -2
  108. package/node_modules/typebox/build/format/hostname.mjs +2 -10
  109. package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
  110. package/node_modules/typebox/build/format/idn_email.mjs +3 -3
  111. package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
  112. package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
  113. package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
  114. package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
  115. package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
  116. package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
  117. package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
  118. package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
  119. package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
  120. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
  121. package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
  122. package/node_modules/typebox/build/format/idna/index.mjs +2 -0
  123. package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
  124. package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
  125. package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
  126. package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
  127. package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
  128. package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
  129. package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
  130. package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
  131. package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
  132. package/node_modules/typebox/build/format/ipv4.mjs +2 -32
  133. package/node_modules/typebox/build/format/ipv6.mjs +2 -61
  134. package/node_modules/typebox/build/format/iri.d.mts +2 -2
  135. package/node_modules/typebox/build/format/iri.mjs +26 -8
  136. package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
  137. package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
  138. package/node_modules/typebox/build/format/regex.d.mts +1 -2
  139. package/node_modules/typebox/build/format/regex.mjs +2 -6
  140. package/node_modules/typebox/build/format/time.d.mts +2 -2
  141. package/node_modules/typebox/build/format/time.mjs +19 -14
  142. package/node_modules/typebox/build/format/uri.d.mts +1 -1
  143. package/node_modules/typebox/build/format/uri.mjs +3 -130
  144. package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
  145. package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
  146. package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
  147. package/node_modules/typebox/build/format/uri_template.mjs +4 -5
  148. package/node_modules/typebox/build/format/url.d.mts +3 -3
  149. package/node_modules/typebox/build/format/url.mjs +4 -5
  150. package/node_modules/typebox/build/guard/emit.d.mts +3 -1
  151. package/node_modules/typebox/build/guard/emit.mjs +12 -5
  152. package/node_modules/typebox/build/guard/guard.d.mts +8 -2
  153. package/node_modules/typebox/build/guard/guard.mjs +25 -4
  154. package/node_modules/typebox/build/guard/string.d.mts +2 -2
  155. package/node_modules/typebox/build/guard/string.mjs +7 -7
  156. package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
  157. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
  158. package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
  159. package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
  160. package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
  161. package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
  162. package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
  163. package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
  164. package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
  165. package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
  166. package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
  167. package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
  168. package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
  169. package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
  170. package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
  171. package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
  172. package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
  173. package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
  174. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  175. package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
  176. package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
  177. package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
  178. package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
  179. package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
  180. package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
  181. package/node_modules/typebox/build/schema/types/index.mjs +0 -2
  182. package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
  183. package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
  184. package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
  185. package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
  186. package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
  187. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
  188. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
  189. package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
  190. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
  191. package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
  192. package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
  193. package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
  194. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
  195. package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
  196. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
  197. package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
  198. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
  199. package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
  200. package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
  201. package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
  202. package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
  203. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
  204. package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
  205. package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
  206. package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
  207. package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
  208. package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
  209. package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
  210. package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
  211. package/node_modules/typebox/build/type/script/parser.mjs +27 -23
  212. package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
  213. package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
  214. package/node_modules/typebox/package.json +27 -27
  215. package/node_modules/typebox/readme.md +79 -82
  216. package/node_modules/ws/lib/permessage-deflate.js +3 -1
  217. package/node_modules/ws/package.json +1 -1
  218. package/package.json +9 -7
  219. package/dist/account-configured-BwfXBo_F.js +0 -14
  220. package/dist/account-inspect-YJvFBbCR.js +0 -89
  221. package/dist/action-runtime.runtime-JtoOK9l5.js +0 -2
  222. package/dist/actions.runtime-CYLsYRai.js +0 -2
  223. package/dist/runtime-api-DBi7xc_g.js +0 -10
  224. package/node_modules/typebox/build/format/_idna.d.mts +0 -2
  225. package/node_modules/typebox/build/format/_idna.mjs +0 -246
  226. package/node_modules/typebox/build/format/_puny.d.mts +0 -1
  227. package/node_modules/typebox/build/format/_puny.mjs +0 -77
  228. package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
  229. package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
  230. package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
  231. package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
  232. package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
  233. package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
@@ -1,5 +1,5 @@
1
- import { n as listSlackAccountIds } from "./accounts-BlzxuYle.js";
2
- import { t as inspectSlackAccount } from "./account-inspect-YJvFBbCR.js";
1
+ import { n as listSlackAccountIds } from "./accounts-Dm_H77gH.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-CN2hBsim.js";
3
3
  import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
4
4
  import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
5
5
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
@@ -71,8 +71,9 @@ const SLACK_MESSAGE_ID_ACTIONS = [
71
71
  function createSlackFileActionSchema() {
72
72
  return { fileId: Type.Optional(Type.String({ description: "Slack file id, starting with \"F\" (for example F0B0LTT8M36). Required for action=\"download-file\". Read it from inbound Slack file metadata at event.files[].id. This is not the Slack message timestamp/messageId." })) };
73
73
  }
74
- function createSlackReactionEmojiSchema() {
75
- return { emoji: Type.Optional(Type.String({ description: "Slack emoji shortcode name (for example \"white_check_mark\" or \"+1\") or common emoji character (for example \"✅\"). Colons are optional around shortcodes." })) };
74
+ function createSlackReactionEmojiSchema(emojiListAvailable) {
75
+ const discoveryHint = emojiListAvailable ? " Discover workspace custom emoji with action:\"emoji-list\"." : "";
76
+ return { emoji: Type.Optional(Type.String({ description: "Slack standard or workspace custom emoji shortcode (for example \"white_check_mark\" or \"+1\") or common emoji character (for example \"✅\"). Colons are optional." + discoveryHint })) };
76
77
  }
77
78
  function createSlackForcedMediaSchema() {
78
79
  const description = "Preserve original image bytes without image optimization. Slack still uploads a regular file; this does not convert it into a Slack document.";
@@ -119,7 +120,7 @@ function describeSlackMessageTool({ cfg, accountId }) {
119
120
  actions: ["upload-file"]
120
121
  });
121
122
  if (actions.includes("react")) schema.push({
122
- properties: createSlackReactionEmojiSchema(),
123
+ properties: createSlackReactionEmojiSchema(actions.includes("emoji-list")),
123
124
  actions: ["react", "reactions"]
124
125
  });
125
126
  const messageIdActions = [];
@@ -1,2 +1,2 @@
1
- import { t as describeSlackMessageTool } from "./message-tool-api-CqMr5Rmc.js";
1
+ import { t as describeSlackMessageTool } from "./message-tool-api-CWosHSi5.js";
2
2
  export { describeSlackMessageTool as describeMessageTool };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { C as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-CUUiwsg2.js";
3
- import { t as isSlackChannelAllowedByPolicy } from "./policy-BKXSxrIS.js";
4
- import { o as resolveSlackThreadTs } from "./replies-SnWyXcsL.js";
2
+ import { T as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-D4nDgxCh.js";
3
+ import { t as isSlackChannelAllowedByPolicy } from "./policy-BoP6t88v.js";
4
+ import { o as resolveSlackThreadTs } from "./replies-D9XMM_S0.js";
5
5
  //#region extensions/slack/src/monitor.ts
6
6
  var monitor_exports = /* @__PURE__ */ __exportAll({
7
7
  buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
@@ -1,8 +1,8 @@
1
1
  import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
2
- import { U as SLACK_TEXT_LIMIT, X as SLACK_QUESTION_FINALIZATION_BLOCKS, ct as escapeSlackMrkdwn, dt as SLACK_PRESENTATION_CAPABILITIES, it as resolveSlackQuestionActionIds, v as parseSlackReplyBlockSegments, x as resolveSlackReplyDeliveryMessages, y as resolveSlackReplyBlockResolution, z as resolveSlackAuthoredTextPlacement } from "./group-policy-DyfB_ZIE.js";
2
+ import { B as SLACK_TEXT_LIMIT, I as resolveSlackAuthoredTextPlacement, ct as escapeSlackMrkdwn, dt as SLACK_PRESENTATION_CAPABILITIES, q as SLACK_QUESTION_FINALIZATION_BLOCKS, tt as resolveSlackQuestionActionIds, v as parseSlackReplyBlockSegments, x as resolveSlackReplyDeliveryMessages, y as resolveSlackReplyBlockResolution } from "./group-policy-CU1tEGpS.js";
3
3
  import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
4
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
- import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
5
+ import { createMessageReceiptFromOutboundResults, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
6
6
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
7
7
  import { normalizeMessagePresentation, resolveLegacyInteractiveTextFallback } from "openclaw/plugin-sdk/interactive-runtime";
8
8
  import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
@@ -49,7 +49,7 @@ function readSlackRenderedPresentation(slackData) {
49
49
  return;
50
50
  }
51
51
  }
52
- const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-kYctMHSd.js"));
52
+ const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-DQeNKa2J.js"));
53
53
  function resolveSlackSendIdentity(identity) {
54
54
  if (!identity) return;
55
55
  const username = normalizeOptionalString(identity.name);
@@ -173,6 +173,7 @@ const slackOutbound = {
173
173
  text: payload.text
174
174
  });
175
175
  const useSingleDeliveryMarker = mediaUrls.length === 0 && deliveryMessages.length === 1;
176
+ const sentResults = [];
176
177
  return attachChannelToResult("slack", toSlackOutboundResult(await sendPayloadMediaSequenceAndFinalize({
177
178
  text: "",
178
179
  mediaUrls,
@@ -182,19 +183,39 @@ const slackOutbound = {
182
183
  mediaUrl,
183
184
  deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
184
185
  }),
186
+ onResult: (result) => {
187
+ sentResults.push(result);
188
+ },
185
189
  finalize: async () => {
186
190
  let lastResult;
187
- for (const message of deliveryMessages) lastResult = await sendSlackOutboundMessage({
188
- ...ctx,
189
- text: message.text,
190
- ...message.blocks ? { blocks: message.blocks } : {},
191
- ...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
192
- ...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
193
- ...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
194
- deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
195
- });
191
+ for (const message of deliveryMessages) {
192
+ lastResult = await sendSlackOutboundMessage({
193
+ ...ctx,
194
+ text: message.text,
195
+ ...message.blocks ? { blocks: message.blocks } : {},
196
+ ...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
197
+ ...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
198
+ ...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
199
+ deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
200
+ });
201
+ sentResults.push(lastResult);
202
+ }
196
203
  if (!lastResult) throw new Error("Slack rendered presentation produced no deliverable segment");
197
- return lastResult;
204
+ if (sentResults.length === 1) return lastResult;
205
+ const receipt = createMessageReceiptFromOutboundResults({ results: sentResults });
206
+ receipt.parts = receipt.parts.map((part, index) => ({
207
+ ...part,
208
+ index
209
+ }));
210
+ const questionResult = sentResults.find((result) => result.meta?.slackQuestionActionIds.length);
211
+ return {
212
+ ...lastResult,
213
+ receipt,
214
+ ...questionResult?.meta ? { meta: {
215
+ ...questionResult.meta,
216
+ slackQuestionMessageId: questionResult.meta.slackQuestionMessageId ?? questionResult.messageId
217
+ } } : {}
218
+ };
198
219
  }
199
220
  })));
200
221
  },
@@ -1,19 +1,20 @@
1
1
  import { n as resolveSlackConversationBindingRoute, r as resolveSlackReplyToMode, t as normalizeSlackRouteBindingConfig } from "./conversation-binding-route-DFVLUdYF.js";
2
2
  import { n as formatSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
3
- import { B as SLACK_EDIT_TEXT_MAX_BYTES, F as normalizeSlackOutboundText, I as buildSlackBlocksFallbackText, J as truncateSlackText, O as hasSlackNativeDataBlock, S as resolveSlackReplyRenderPlan, U as SLACK_TEXT_LIMIT, Y as truncateSlackTextByUtf8Bytes, a as qualifySlackConversationId, ct as escapeSlackMrkdwn, d as normalizeSlackAllowOwnerEntry, et as SLACK_SESSION_LINK_ACTION_ID, o as qualifySlackRoutePeerId, p as resolveSlackAllowListMatch, q as countSlackTextUtf8Bytes, s as resolveSlackEnterpriseMainDmSessionKey, u as normalizeAllowListLower } from "./group-policy-DyfB_ZIE.js";
4
- import { r as formatSlackError } from "./probe-BVA65leh.js";
3
+ import { B as SLACK_TEXT_LIMIT, G as truncateSlackText, K as truncateSlackTextByUtf8Bytes, L as SLACK_EDIT_TEXT_MAX_BYTES, N as buildSlackBlocksFallbackText, O as hasSlackNativeDataBlock, S as resolveSlackReplyRenderPlan, W as countSlackTextUtf8Bytes, Z as SLACK_SESSION_LINK_ACTION_ID, a as qualifySlackConversationId, ct as escapeSlackMrkdwn, d as normalizeSlackAllowOwnerEntry, o as qualifySlackRoutePeerId, ot as normalizeSlackOutboundText, p as resolveSlackAllowListMatch, s as resolveSlackEnterpriseMainDmSessionKey, u as normalizeAllowListLower } from "./group-policy-CU1tEGpS.js";
4
+ import { r as formatSlackError } from "./probe-4_aHtVT3.js";
5
5
  import { n as resolveSlackStreamingMode, t as resolveSlackNativeStreaming } from "./streaming-compat-B-e0mqM0.js";
6
- import { b as formatSlackFileReferenceList, i as editSlackRenderedMessage, p as removeSlackReaction, r as editSlackMessage, t as deleteSlackMessage, u as reactSlackMessage, v as logVerbose$1, x as buildSlackEditTextPayload, y as formatSlackFileReference } from "./actions-DFk0ANVB.js";
7
- import { a as hasSlackTableBlock, c as resolveSlackMessageText$1, o as isSlackUnfurlAttachment, s as resolveSlackBlocksText } from "./slack-client-kind-BXyOOICI.js";
8
- import { c as hasSlackThreadFailureNotice, d as recordSlackThreadFailureNotice, f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, m as buildSlackNativeDataDeliveryPlan, o as clearSlackThreadFailureNotice, r as sendMessageSlack, u as hasSlackThreadParticipationWithPersistence } from "./send-CtnOxKCc.js";
9
- import { S as updateLastRoute, _ as parseSlackAssistantThreadMetadata, b as resolveChannelResetConfig, c as resolveConversationLabel$1, d as resolveSlackEffectiveAllowFrom, g as buildSlackAssistantThreadMetadata, h as resolveSlackChatType, l as authorizeSlackBotRoomMessage, m as normalizeSlackChannelType, o as authorizeSlackDirectMessage, r as resolveSlackRoomContextHints, s as trackSlackDraftMessage, u as resolveSlackCommandIngress, v as readSessionUpdatedAt, w as stripSlackMentionsForCommandDetection, x as resolveStorePath, y as resolveChannelContextVisibilityMode } from "./provider-CUUiwsg2.js";
10
- import { n as resolveSlackChannelConfig } from "./policy-BKXSxrIS.js";
11
- import { a as resolveDeliveredSlackReplyThreadTs, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as emitSlackMessageSentHooks, t as createSlackReplyDeliveryPlan } from "./replies-SnWyXcsL.js";
6
+ import { a as editSlackRenderedMessage, b as formatSlackFileReferenceList, d as reactSlackMessage, i as editSlackMessage, m as removeSlackReaction, n as deleteSlackMessage, v as logVerbose$1, x as buildSlackEditTextPayload, y as formatSlackFileReference } from "./actions-XdQyjG_p.js";
7
+ import { a as hasSlackTableBlock, c as resolveSlackMessageText$1, o as isSlackUnfurlAttachment, s as resolveSlackBlocksText } from "./slack-client-kind-hSfjXyUM.js";
8
+ import { c as hasSlackThreadFailureNotice, d as recordSlackThreadFailureNotice, f as recordSlackThreadParticipation, l as hasSlackThreadParticipation, m as buildSlackNativeDataDeliveryPlan, o as clearSlackThreadFailureNotice, r as sendMessageSlack, u as hasSlackThreadParticipationWithPersistence } from "./send-DtjEnlLh.js";
9
+ import { C as resolveStorePath, E as stripSlackMentionsForCommandDetection, S as resolveChannelResetConfig, _ as resolveSlackChatType, b as readSessionUpdatedAt, c as resolveSlackThreadTargets, d as authorizeSlackBotRoomMessage, f as resolveSlackCommandIngress, g as normalizeSlackChannelType, l as trackSlackDraftMessage, o as authorizeSlackDirectMessage, p as resolveSlackEffectiveAllowFrom, r as resolveSlackRoomContextHints, s as resolveSlackThreadContext, u as resolveConversationLabel$1, v as buildSlackAssistantThreadMetadata, w as updateLastRoute, x as resolveChannelContextVisibilityMode, y as parseSlackAssistantThreadMetadata } from "./provider-D4nDgxCh.js";
10
+ import { n as resolveSlackChannelConfig } from "./policy-BoP6t88v.js";
11
+ import { a as resolveDeliveredSlackReplyThreadTs, c as emitSlackMessageSentHooks, i as readSlackReplyBlocks, n as deliverReplies, o as resolveSlackThreadTs, s as sanitizeSlackMonitorReplyPayload, t as createSlackReplyDeliveryPlan } from "./replies-D9XMM_S0.js";
12
12
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
13
13
  import { resolveAgentRoute, resolveInboundLastRouteSessionKey, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
14
14
  import { buildChannelProgressDraftLine, buildChannelProgressDraftLineForEntry, createChannelMessageReplyPipeline, createChannelProgressDraftCompositor, createChannelProgressWorkCounter, createFinalizableDraftStreamControlsForState, defineFinalizableLivePreviewAdapter, deliverWithFinalizableLivePreviewAdapter, formatChannelProgressDraftText, formatPlanChecklistLines, isChannelProgressDraftWorkToolName, resolveAgentOutboundIdentity, resolveChannelMessageSourceReplyDeliveryMode, resolveChannelProgressDraftConfig, resolveChannelProgressDraftMaxLineChars, resolveChannelStreamingBlockEnabled, resolveChannelStreamingPreviewToolProgress, resolveChannelStreamingSuppressDefaultToolProgressMessages } from "openclaw/plugin-sdk/channel-outbound";
15
15
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
16
16
  import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
17
+ import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
17
18
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
18
19
  import { createHash } from "node:crypto";
19
20
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
@@ -384,12 +385,12 @@ function createSlackDraftStream(params) {
384
385
  const send = params.send ?? sendMessageSlack;
385
386
  const edit = params.edit ?? editSlackMessage;
386
387
  const remove = params.remove ?? deleteSlackMessage;
387
- let streamMessageId;
388
- let streamChannelId;
388
+ let streamMessage;
389
389
  let untrackConversationBoundary;
390
390
  let lastVisibleUpdate;
391
391
  let lastSentKey = "";
392
- const detachedMessages = [];
392
+ const pendingCleanupMessages = [];
393
+ let cleanupTail = Promise.resolve();
393
394
  const finalizedMessageIds = /* @__PURE__ */ new Set();
394
395
  const streamState = {
395
396
  stopped: false,
@@ -411,8 +412,8 @@ function createSlackDraftStream(params) {
411
412
  if (sentKey === lastSentKey) return;
412
413
  lastSentKey = sentKey;
413
414
  try {
414
- if (streamChannelId && streamMessageId) {
415
- await edit(streamChannelId, streamMessageId, trimmed, {
415
+ if (streamMessage) {
416
+ await edit(streamMessage.channelId, streamMessage.messageId, trimmed, {
416
417
  cfg: params.cfg,
417
418
  token: params.token,
418
419
  accountId: params.accountId,
@@ -444,27 +445,29 @@ function createSlackDraftStream(params) {
444
445
  ...params.metadata ? { metadata: params.metadata } : {},
445
446
  ...blocks ? { blocks } : {}
446
447
  });
447
- streamChannelId = sent.channelId || streamChannelId;
448
- streamMessageId = sent.messageId || streamMessageId;
449
- if (!streamChannelId || !streamMessageId) {
448
+ if (!sent.channelId || !sent.messageId) {
450
449
  stopTrackingConversationBoundary();
451
450
  streamState.stopped = true;
452
451
  params.warn?.("slack stream preview stopped (missing identifiers from sendMessage)");
453
452
  return;
454
453
  }
454
+ streamMessage = {
455
+ channelId: sent.channelId,
456
+ messageId: sent.messageId
457
+ };
455
458
  lastVisibleUpdate = {
456
459
  text: trimmed,
457
460
  ...blocks ? { blocks } : {}
458
461
  };
459
- if (pendingBoundary && params.conversationChannelId === streamChannelId) pendingBoundary.setMessageTs(streamMessageId);
462
+ if (pendingBoundary && params.conversationChannelId === streamMessage.channelId) pendingBoundary.setMessageTs(streamMessage.messageId);
460
463
  else {
461
464
  stopTrackingConversationBoundary();
462
465
  untrackConversationBoundary = trackSlackDraftMessage({
463
466
  accountId: params.accountId,
464
467
  teamId: params.eventScope?.teamId,
465
- channelId: streamChannelId,
468
+ channelId: streamMessage.channelId,
466
469
  threadTs,
467
- messageTs: streamMessageId,
470
+ messageTs: streamMessage.messageId,
468
471
  onInterveningMessage: forceNewMessage
469
472
  }).stop;
470
473
  }
@@ -485,60 +488,58 @@ function createSlackDraftStream(params) {
485
488
  untrackConversationBoundary?.();
486
489
  untrackConversationBoundary = void 0;
487
490
  };
488
- const removeMessage = async (channelId, messageId) => {
489
- try {
490
- await remove(channelId, messageId, {
491
- token: params.token,
492
- accountId: params.accountId,
493
- ...params.eventScope ? { client: params.eventScope.client } : {}
494
- });
495
- } catch (err) {
496
- params.warn?.(`slack stream preview cleanup failed: ${formatSlackError(err)}`);
497
- }
491
+ const dropDetachedMessages = () => {
492
+ cleanupTail = cleanupTail.then(async () => {
493
+ for (let index = 0; index < pendingCleanupMessages.length;) {
494
+ const message = pendingCleanupMessages[index];
495
+ if (!message) return;
496
+ try {
497
+ await remove(message.channelId, message.messageId, {
498
+ token: params.token,
499
+ accountId: params.accountId,
500
+ ...params.eventScope ? { client: params.eventScope.client } : {}
501
+ });
502
+ pendingCleanupMessages.splice(index, 1);
503
+ } catch (err) {
504
+ params.warn?.(`slack stream preview cleanup failed: ${formatSlackError(err)}`);
505
+ index += 1;
506
+ }
507
+ }
508
+ });
509
+ return cleanupTail;
498
510
  };
499
511
  const clear = async () => {
500
512
  stopTrackingConversationBoundary();
501
513
  await discardPending();
502
- const channelId = streamChannelId;
503
- const messageId = streamMessageId;
504
- streamChannelId = void 0;
505
- streamMessageId = void 0;
514
+ if (streamMessage) {
515
+ pendingCleanupMessages.push(streamMessage);
516
+ streamMessage = void 0;
517
+ }
506
518
  lastVisibleUpdate = void 0;
507
519
  lastSentKey = "";
508
- if (!channelId || !messageId) return;
509
- await removeMessage(channelId, messageId);
520
+ await dropDetachedMessages();
510
521
  };
511
522
  const forceNewMessage = () => {
512
523
  stopTrackingConversationBoundary();
513
524
  streamState.stopped = false;
514
525
  streamState.final = false;
515
- if (streamChannelId && streamMessageId && !finalizedMessageIds.has(streamMessageId)) detachedMessages.push({
516
- channelId: streamChannelId,
517
- messageId: streamMessageId
518
- });
519
- streamMessageId = void 0;
520
- streamChannelId = void 0;
526
+ if (streamMessage && !finalizedMessageIds.has(streamMessage.messageId)) pendingCleanupMessages.push(streamMessage);
527
+ streamMessage = void 0;
521
528
  lastVisibleUpdate = void 0;
522
529
  lastSentKey = "";
523
530
  loop.resetPending();
524
531
  };
525
- const dropDetachedMessages = async () => {
526
- let message;
527
- while ((message = detachedMessages.shift()) !== void 0) {
528
- const { channelId, messageId } = message;
529
- await removeMessage(channelId, messageId);
530
- }
531
- };
532
532
  const discardPendingAndStopTracking = async () => {
533
533
  stopTrackingConversationBoundary();
534
534
  await discardPending();
535
535
  };
536
536
  const finalizeMessage = async (messageId, editFinal) => {
537
- const channelId = streamChannelId;
537
+ const currentMessage = streamMessage;
538
538
  const previousUpdate = lastVisibleUpdate;
539
- if (!channelId || streamMessageId !== messageId || !previousUpdate) return false;
539
+ if (!currentMessage || currentMessage.messageId !== messageId || !previousUpdate) return false;
540
+ const { channelId } = currentMessage;
540
541
  await editFinal();
541
- if (streamChannelId === channelId && streamMessageId === messageId) {
542
+ if (streamMessage?.channelId === channelId && streamMessage.messageId === messageId) {
542
543
  finalizedMessageIds.add(messageId);
543
544
  stopTrackingConversationBoundary();
544
545
  return true;
@@ -566,8 +567,8 @@ function createSlackDraftStream(params) {
566
567
  forceNewMessage,
567
568
  dropDetachedMessages,
568
569
  finalizeMessage,
569
- messageId: () => streamMessageId,
570
- channelId: () => streamChannelId
570
+ messageId: () => streamMessage?.messageId,
571
+ channelId: () => streamMessage?.channelId
571
572
  };
572
573
  }
573
574
  //#endregion
@@ -1336,7 +1337,7 @@ function createSlackProgressRuntime(runtimeParams) {
1336
1337
  log: logVerbose,
1337
1338
  warn: logVerbose
1338
1339
  }) : void 0;
1339
- let hasStreamedMessage = false;
1340
+ let hasStreamedAnswer = false;
1340
1341
  const isProgressMode = slackStreaming.mode === "progress";
1341
1342
  const useNativeProgressStreaming = useStreaming && slackStreaming.mode === "progress";
1342
1343
  const progressDraftActive = Boolean(draftStream) || useNativeProgressStreaming;
@@ -1513,7 +1514,6 @@ function createSlackProgressRuntime(runtimeParams) {
1513
1514
  text: previewText,
1514
1515
  blocks: progressCard.resolvePresentation(snapshot, "working")
1515
1516
  } : previewText);
1516
- hasStreamedMessage = true;
1517
1517
  if (options?.flush) await draftStream.flush();
1518
1518
  return Boolean(draftStream.messageId() && draftStream.channelId());
1519
1519
  }
@@ -1595,10 +1595,7 @@ function createSlackProgressRuntime(runtimeParams) {
1595
1595
  narration: explanation,
1596
1596
  plan: steps
1597
1597
  });
1598
- if (text) {
1599
- draftStream.update(text);
1600
- hasStreamedMessage = true;
1601
- }
1598
+ if (text) draftStream.update(text);
1602
1599
  return false;
1603
1600
  };
1604
1601
  const pushPreviewProgress = async (line, options) => {
@@ -1613,7 +1610,7 @@ function createSlackProgressRuntime(runtimeParams) {
1613
1610
  return await progressDraft.pushToolProgress(line, options);
1614
1611
  };
1615
1612
  const updateDraftFromPartial = (text) => {
1616
- const trimmed = text?.trimEnd();
1613
+ const trimmed = text && sanitizeAssistantVisibleText(text).trimEnd();
1617
1614
  if (!trimmed) return false;
1618
1615
  if (slackStreaming.mode === "block") {
1619
1616
  previewToolProgressSuppressed = true;
@@ -1627,14 +1624,14 @@ function createSlackProgressRuntime(runtimeParams) {
1627
1624
  appendSourceText = next.source;
1628
1625
  if (!next.changed) return false;
1629
1626
  draftStream?.update(next.rendered);
1630
- hasStreamedMessage = true;
1627
+ hasStreamedAnswer = true;
1631
1628
  return false;
1632
1629
  }
1633
1630
  if (isProgressMode) return false;
1634
1631
  previewToolProgressSuppressed = true;
1635
1632
  progressDraft.suppress();
1636
1633
  draftStream?.update(trimmed);
1637
- hasStreamedMessage = true;
1634
+ hasStreamedAnswer = true;
1638
1635
  return false;
1639
1636
  };
1640
1637
  const pushReasoningProgress = async (payload) => {
@@ -1654,7 +1651,7 @@ function createSlackProgressRuntime(runtimeParams) {
1654
1651
  return await progressDraft.pushReasoningProgress(payload.text, { snapshot: payload.isReasoningSnapshot === true });
1655
1652
  };
1656
1653
  const resetDraftDeliveryState = () => {
1657
- hasStreamedMessage = false;
1654
+ hasStreamedAnswer = false;
1658
1655
  appendRenderedText = "";
1659
1656
  appendSourceText = "";
1660
1657
  };
@@ -1687,7 +1684,7 @@ function createSlackProgressRuntime(runtimeParams) {
1687
1684
  await beginNewProgressTurn();
1688
1685
  return;
1689
1686
  }
1690
- if (hasStreamedMessage) draftStream?.forceNewMessage();
1687
+ if (hasStreamedAnswer) draftStream?.forceNewMessage();
1691
1688
  resetDraftDeliveryState();
1692
1689
  resetDraftProgressState();
1693
1690
  };
@@ -1742,41 +1739,6 @@ function createSlackProgressRuntime(runtimeParams) {
1742
1739
  };
1743
1740
  }
1744
1741
  //#endregion
1745
- //#region extensions/slack/src/threading.ts
1746
- function resolveSlackThreadContext(params) {
1747
- const incomingThreadTs = params.message.thread_ts;
1748
- const eventTs = params.message.event_ts;
1749
- const messageTs = params.message.ts ?? eventTs;
1750
- const hasThreadTs = typeof incomingThreadTs === "string" && incomingThreadTs.length > 0;
1751
- const isThreadReply = hasThreadTs && (incomingThreadTs !== messageTs || Boolean(params.message.parent_user_id));
1752
- const replyToId = isThreadReply ? incomingThreadTs : void 0;
1753
- const isAssistantDmThreadRoot = hasThreadTs && !isThreadReply && params.isDirectMessage === true;
1754
- return {
1755
- incomingThreadTs,
1756
- messageTs,
1757
- isThreadReply,
1758
- replyToId,
1759
- messageThreadId: isThreadReply || isAssistantDmThreadRoot ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
1760
- };
1761
- }
1762
- /**
1763
- * Resolves Slack thread targeting for replies and status indicators.
1764
- *
1765
- * @returns replyThreadTs - Thread timestamp for reply messages
1766
- * @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
1767
- * @returns isThreadReply - true if this is a genuine user reply in a thread,
1768
- * false if thread_ts comes from a bot status message (e.g. typing indicator)
1769
- */
1770
- function resolveSlackThreadTargets(params) {
1771
- const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
1772
- const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
1773
- return {
1774
- replyThreadTs,
1775
- statusThreadTs: replyThreadTs,
1776
- isThreadReply
1777
- };
1778
- }
1779
- //#endregion
1780
1742
  //#region extensions/slack/src/monitor/message-handler/dispatch-setup.ts
1781
1743
  async function createSlackDispatchSetup(prepared) {
1782
1744
  const { ctx, account, message, route } = prepared;
@@ -1898,10 +1860,7 @@ async function createSlackDispatchSetup(prepared) {
1898
1860
  agentId: route.agentId,
1899
1861
  channel: "slack",
1900
1862
  accountId: route.accountId,
1901
- transformReplyPayload: (payload) => {
1902
- if (payload.isReasoning === true) return null;
1903
- return payload;
1904
- },
1863
+ transformReplyPayload: sanitizeSlackMonitorReplyPayload,
1905
1864
  typing: {
1906
1865
  start: async () => {
1907
1866
  if (!threadStatusGate.hasVisibleOutput()) {
@@ -2187,7 +2146,6 @@ function createSlackStreamingDeliveryRuntime(setup) {
2187
2146
  }
2188
2147
  };
2189
2148
  const deliverNormally = async (params) => {
2190
- if (params.payload.isReasoning === true) return;
2191
2149
  const replyThreadTs = resolveDeliveryThreadTs(params);
2192
2150
  const deliveryReplyThreadTs = replyDeliveryMode === "off" && !forcedReplyThreadTs && !isThreadReply ? void 0 : replyThreadTs;
2193
2151
  if (deliveryTracker.hasDelivered({
@@ -2250,7 +2208,6 @@ function createSlackStreamingDeliveryRuntime(setup) {
2250
2208
  return !state.streamFailed && !reply.hasMedia && renderPlan.mode !== "split" && !plannedBlocks?.length && !readSlackReplyBlocks(payload)?.length && reply.hasText && (!options?.maxTextBytes || countSlackTextUtf8Bytes(reply.trimmedText) <= options.maxTextBytes);
2251
2209
  };
2252
2210
  const deliverWithStreaming = async (params) => {
2253
- if (params.payload.isReasoning === true) return;
2254
2211
  const reply = resolveSendableOutboundReplyParts(params.payload);
2255
2212
  if (!isStreamingEligible(params.payload)) {
2256
2213
  await deliverNormally({
@@ -2452,7 +2409,6 @@ async function dispatchPreparedSlackMessage(prepared) {
2452
2409
  return payload;
2453
2410
  };
2454
2411
  const deliverSlackPayload = async (payload, info) => {
2455
- if (payload.isReasoning === true) return { visibleReplySent: false };
2456
2412
  if (info.kind === "final" && slackStreaming.mode === "progress" && progress.isProgressMode) {
2457
2413
  if (progress.useNativeProgressStreaming) {
2458
2414
  await progress.deliverNativeFinal(payload, info.kind);
@@ -2619,6 +2575,7 @@ async function dispatchPreparedSlackMessage(prepared) {
2619
2575
  sessionKey: route.sessionKey
2620
2576
  },
2621
2577
  ctxPayload: prepared.ctxPayload,
2578
+ dispatchReplyFromConfig: ctx.dispatchReplyFromConfig,
2622
2579
  dispatcherOptions: {
2623
2580
  ...replyPipeline,
2624
2581
  transformReplyPayload: (payload) => {
@@ -3008,7 +2965,7 @@ async function discardSlackPreflightMedia(media) {
3008
2965
  const SLACK_MENTION_RESOLUTION_CONCURRENCY = 4;
3009
2966
  const SLACK_MENTION_RESOLUTION_MAX_LOOKUPS_PER_MESSAGE = 20;
3010
2967
  const SLACK_USER_MENTION_RE$1 = /<@([A-Z0-9]+)(?:\|[^>]+)?>/gi;
3011
- const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-DFk0ANVB.js").then((n) => n._));
2968
+ const loadSlackMediaModule$1 = createLazyRuntimeModule(() => import("./actions-XdQyjG_p.js").then((n) => n._));
3012
2969
  function collectUniqueSlackMentionIds$1(texts) {
3013
2970
  const seen = /* @__PURE__ */ new Set();
3014
2971
  const mentionIds = [];
@@ -3046,8 +3003,9 @@ async function resolveSlackMessageContent(params) {
3046
3003
  isThreadReply: params.isThreadReply,
3047
3004
  threadStarter: params.threadStarter
3048
3005
  });
3049
- const mediaPromise = ownFiles && ownFiles.length > 0 ? loadSlackMediaModule$1().then(({ resolveSlackMedia }) => resolveSlackMedia({
3006
+ const attachmentContent = ownFiles?.length || params.message.attachments?.length ? await loadSlackMediaModule$1().then(({ resolveSlackAttachmentContent }) => resolveSlackAttachmentContent({
3050
3007
  files: ownFiles,
3008
+ attachments: params.message.attachments,
3051
3009
  client: params.client,
3052
3010
  token: params.botToken,
3053
3011
  maxBytes: params.mediaMaxBytes,
@@ -3055,30 +3013,10 @@ async function resolveSlackMessageContent(params) {
3055
3013
  totalTimeoutMs: params.mediaTotalTimeoutMs,
3056
3014
  abortSignal: params.abortSignal,
3057
3015
  preloadedMedia: params.preloadedMedia
3058
- })) : Promise.resolve(null);
3059
- const attachmentContentPromise = params.message.attachments && params.message.attachments.length > 0 ? loadSlackMediaModule$1().then(({ resolveSlackAttachmentContent }) => resolveSlackAttachmentContent({
3060
- attachments: params.message.attachments,
3061
- client: params.client,
3062
- token: params.botToken,
3063
- maxBytes: params.mediaMaxBytes,
3064
- readIdleTimeoutMs: params.mediaReadIdleTimeoutMs,
3065
- totalTimeoutMs: params.mediaTotalTimeoutMs,
3066
- abortSignal: params.abortSignal
3067
- })) : Promise.resolve(null);
3068
- const [media, attachmentContent] = await Promise.all([mediaPromise, attachmentContentPromise]);
3069
- const mergedMedia = [...media ?? [], ...attachmentContent?.media ?? []];
3070
- const effectiveDirectMedia = mergedMedia.length > 0 ? mergedMedia : null;
3071
- const mediaPlaceholder = effectiveDirectMedia ? effectiveDirectMedia.map((item) => item.placeholder).join(" ") : void 0;
3072
- const fallbackFileIds = /* @__PURE__ */ new Set();
3073
- const fallbackFiles = [...ownFiles ?? [], ...attachmentContent?.files ?? []].filter((file) => {
3074
- const fileId = normalizeOptionalString(file.id);
3075
- if (!fileId) return true;
3076
- if (fallbackFileIds.has(fileId)) return false;
3077
- fallbackFileIds.add(fileId);
3078
- return true;
3079
- });
3080
- const fileOnlyFallback = !mediaPlaceholder && fallbackFiles.length > 0 ? fallbackFiles.slice(0, 8).map((file) => formatSlackFileReference(file)).join(", ") : void 0;
3081
- const fileOnlyPlaceholder = fileOnlyFallback ? `[Slack file: ${fileOnlyFallback}]` : void 0;
3016
+ })) : null;
3017
+ const effectiveDirectMedia = attachmentContent?.media.length ? attachmentContent.media : null;
3018
+ const mediaPlaceholder = effectiveDirectMedia?.map((item) => item.placeholder).join(" ");
3019
+ const fileOnlyFallback = attachmentContent?.files?.map(formatSlackFileReference).join(", ");
3082
3020
  let botAttachmentText;
3083
3021
  if (params.isBotMessage && !attachmentContent?.text) {
3084
3022
  const botAttachmentTextParts = [];
@@ -3120,18 +3058,17 @@ async function resolveSlackMessageContent(params) {
3120
3058
  renderSlackUserMentions(textParts[1], renderedMentions),
3121
3059
  renderSlackUserMentions(textParts[2], renderedMentions),
3122
3060
  mediaPlaceholder,
3123
- fileOnlyPlaceholder
3061
+ fileOnlyFallback ? `[Slack file: ${fileOnlyFallback}]` : void 0
3124
3062
  ].filter(Boolean).join("\n") || "";
3125
3063
  const unavailableImageCount = attachmentContent?.unavailableImageCount ?? 0;
3126
3064
  if (unavailableImageCount > 0) rawBody = formatInboundMediaUnavailableText({
3127
3065
  body: rawBody,
3128
3066
  notice: `[slack ${unavailableImageCount > 1 ? `${unavailableImageCount} forwarded images` : "forwarded image"} unavailable]`
3129
3067
  });
3130
- if (!rawBody) return null;
3131
- return {
3068
+ return rawBody ? {
3132
3069
  rawBody,
3133
3070
  effectiveDirectMedia
3134
- };
3071
+ } : null;
3135
3072
  }
3136
3073
  //#endregion
3137
3074
  //#region extensions/slack/src/monitor/message-handler/prepare-dm-history.ts
@@ -3359,7 +3296,7 @@ function formatSlackThreadLabelSnippet(text) {
3359
3296
  }
3360
3297
  //#endregion
3361
3298
  //#region extensions/slack/src/monitor/message-handler/prepare-thread-context.ts
3362
- const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-DFk0ANVB.js").then((n) => n._));
3299
+ const loadSlackMediaModule = createLazyRuntimeModule(() => import("./actions-XdQyjG_p.js").then((n) => n._));
3363
3300
  const SLACK_THREAD_CONTEXT_USER_LOOKUP_CONCURRENCY = 4;
3364
3301
  function resolveSlackThreadSessionFreshness(params) {
3365
3302
  return params.ctx.channelRuntime?.session?.resolveEntryResetFreshness?.({
@@ -1,4 +1,4 @@
1
- import { f as normalizeSlackSlug, m as resolveSlackUserAllowListForTeam, n as buildSlackChannelPolicyScope, t as buildSlackChannelIdCandidates } from "./group-policy-DyfB_ZIE.js";
1
+ import { f as normalizeSlackSlug, m as resolveSlackUserAllowListForTeam, n as buildSlackChannelPolicyScope, t as buildSlackChannelIdCandidates } from "./group-policy-CU1tEGpS.js";
2
2
  import { applyChannelMatchMeta, buildChannelKeyCandidates } from "openclaw/plugin-sdk/channel-targets";
3
3
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
4
4
  //#region extensions/slack/src/monitor/channel-config.ts
@@ -1,32 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { u as formatSlackBotTokenIdentityWarning } from "./accounts-BlzxuYle.js";
3
- import "./target-parsing-BnMD2ZqZ.js";
2
+ import { u as formatSlackBotTokenIdentityWarning } from "./accounts-Dm_H77gH.js";
4
3
  import { createRequire } from "node:module";
5
- import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
6
4
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
5
  import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
8
- import { PAIRING_APPROVED_MESSAGE, projectCredentialSnapshotFields, resolveConfiguredFromRequiredCredentialStatuses } from "openclaw/plugin-sdk/channel-status";
9
6
  import { createHash } from "node:crypto";
10
7
  import { WebClient } from "@slack/web-api";
11
8
  import { addActiveManagedProxyTlsOptions, resolveEnvHttpProxyAgentOptions, resolveFetch } from "openclaw/plugin-sdk/fetch-runtime";
12
9
  import { isDebugProxyGlobalFetchPatchInstalled } from "openclaw/plugin-sdk/proxy-capture";
13
10
  import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core";
14
- //#region extensions/slack/src/channel-api.ts
15
- const SLACK_CHANNEL_META = {
16
- id: "slack",
17
- label: "Slack",
18
- selectionLabel: "Slack",
19
- docsPath: "/channels/slack",
20
- docsLabel: "slack",
21
- blurb: "supports bot + app tokens, channels, threads, and interactive replies.",
22
- systemImage: "number.square",
23
- markdownCapable: true
24
- };
25
- function getChatChannelMeta(id) {
26
- if (id !== SLACK_CHANNEL_META.id) throw new Error(`Unsupported Slack channel meta lookup: ${id}`);
27
- return SLACK_CHANNEL_META;
28
- }
29
- //#endregion
30
11
  //#region extensions/slack/src/client-options.ts
31
12
  const requireFromSlackSocketMode = (() => {
32
13
  return createRequire(createRequire(import.meta.url).resolve("@slack/socket-mode/package.json"));
@@ -362,4 +343,4 @@ async function probeSlack(token, timeoutMs = 2500, opts) {
362
343
  }));
363
344
  }
364
345
  //#endregion
365
- export { resolveConfiguredFromRequiredCredentialStatuses as S, resolveSlackWriteClientOptions as _, createSlackReadClient as a, getChatChannelMeta as b, createSlackWebClient as c, getSlackWriteClient as d, SLACK_DEFAULT_RETRY_OPTIONS as f, resolveSlackWebClientOptions as g, resolveSlackProxyDispatcher as h, createSlackLookupClient as i, createSlackWriteClient as l, resolveSlackLookupClientOptions as m, probe_exports as n, createSlackStartupAuthClient as o, SLACK_WRITE_RETRY_OPTIONS as p, formatSlackError as r, createSlackTokenCacheKey as s, probeSlack as t, getSlackListenerUploadCompletionClient as u, DEFAULT_ACCOUNT_ID$1 as v, projectCredentialSnapshotFields as x, PAIRING_APPROVED_MESSAGE as y };
346
+ export { resolveSlackWriteClientOptions as _, createSlackReadClient as a, createSlackWebClient as c, getSlackWriteClient as d, SLACK_DEFAULT_RETRY_OPTIONS as f, resolveSlackWebClientOptions as g, resolveSlackProxyDispatcher as h, createSlackLookupClient as i, createSlackWriteClient as l, resolveSlackLookupClientOptions as m, probe_exports as n, createSlackStartupAuthClient as o, SLACK_WRITE_RETRY_OPTIONS as p, formatSlackError as r, createSlackTokenCacheKey as s, probeSlack as t, getSlackListenerUploadCompletionClient as u };