惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tor Project blog
B
Blog RSS Feed
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
H
Hackread – Cybersecurity News, Data Breaches, AI and More
罗磊的独立博客
GbyAI
GbyAI
N
Netflix TechBlog - Medium
博客园 - 司徒正美
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
宝玉的分享
宝玉的分享
W
WeLiveSecurity
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
SecWiki News
SecWiki News
V
Vulnerabilities – Threatpost
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
Martin Fowler
Martin Fowler
A
About on SuperTechFans
S
Security @ Cisco Blogs
T
Tenable Blog
C
Check Point Blog
N
News and Events Feed by Topic
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Attack and Defense Labs
Attack and Defense Labs
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cisco Blogs
P
Palo Alto Networks Blog
V
V2EX
博客园 - 聂微东
Project Zero
Project Zero
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
N
News | PayPal Newsroom
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
Application and Cybersecurity Blog
Application and Cybersecurity Blog
人人都是产品经理
人人都是产品经理
V2EX - 技术
V2EX - 技术
I
Intezer
L
LINUX DO - 最新话题

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
feat(slack): support reply broadcasts · openclaw/openclaw@2296325
steipete · 2026-05-10 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -9,6 +9,7 @@ Docs: https://docs.openclaw.ai

99

- Agents: trim default system prompt guidance and send-only message tool schemas to reduce prompt tokens while preserving GPT-5 personality guidance.

1010

- Context: add `/context map` to send a treemap image of the current session context contributors. (#79867)

1111

- Slack: add `unfurlLinks` and `unfurlMedia` config for bot `chat.postMessage` replies, including per-account overrides, so Slack link and media previews can be suppressed without workspace-wide settings. Fixes #48435. (#80145) Thanks @esegev1 and @HemantSudarshan.

12+

- Slack: add explicit `replyBroadcast` support for text and Block Kit thread replies so agents can opt into Slack's parent-channel `reply_broadcast` behavior. (#64365) Thanks @tony88331.

1213

- Plugin SDK: deprecate public subpaths that existed for at least one month and have no bundled extension production imports, keep legacy barrel/test/zod subpath package exports for backwards compatibility, and track both sets in the SDK surface report.

1314

- Plugin SDK: deprecate public subpaths currently used by only one or two bundled plugin owners, keeping them importable while steering new plugin code to focused shared SDK seams or plugin-owned APIs.

1415

- Plugin SDK: remove the owner-specific `provider-auth-login` public subpath after moving Chutes, GitHub Copilot, and OpenAI Codex auth flows back to provider-owned modules.

Original file line numberDiff line numberDiff line change

@@ -946,6 +946,8 @@ Manual reply tags are supported:

946946

- `[[reply_to_current]]`

947947

- `[[reply_to:<id>]]`

948948
949+

For explicit Slack thread replies from the `message` tool, set `replyBroadcast: true` with `action: "send"` and `threadId` or `replyTo` to ask Slack to also broadcast the thread reply to the parent channel. This maps to Slack's `chat.postMessage` `reply_broadcast` flag and is only supported for text or Block Kit sends, not media uploads.

950+
949951

<Note>

950952

`replyToMode="off"` disables **all** reply threading in Slack, including explicit `[[reply_to_*]]` tags. This differs from Telegram, where explicit tags are still honored in `"off"` mode. Slack threads hide messages from the channel while Telegram replies stay visible inline.

951953

</Note>

Original file line numberDiff line numberDiff line change

@@ -252,6 +252,27 @@ describe("handleSlackAction", () => {

252252

});

253253

});

254254
255+

it("passes replyBroadcast to sendSlackMessage for thread replies", async () => {

256+

const cfg = slackConfig();

257+

await handleSlackAction(

258+

{

259+

action: "sendMessage",

260+

to: "channel:C123",

261+

content: "Hello thread",

262+

threadTs: "1234567890.123456",

263+

replyBroadcast: true,

264+

},

265+

cfg,

266+

);

267+

expectSlackSendCall(0, "channel:C123", "Hello thread", {

268+

cfg,

269+

mediaUrl: undefined,

270+

threadTs: "1234567890.123456",

271+

replyBroadcast: true,

272+

blocks: undefined,

273+

});

274+

});

275+
255276

it("returns a friendly error when downloadFile cannot fetch the attachment", async () => {

256277

downloadSlackFile.mockResolvedValueOnce(null);

257278

const result = await handleSlackAction(

@@ -436,6 +457,21 @@ describe("handleSlackAction", () => {

436457

});

437458

});

438459
460+

it("rejects replyBroadcast for uploadFile", async () => {

461+

await expect(

462+

handleSlackAction(

463+

{

464+

action: "uploadFile",

465+

to: "channel:C123",

466+

filePath: "/tmp/report.txt",

467+

threadTs: "111.222",

468+

replyBroadcast: true,

469+

},

470+

slackConfig(),

471+

),

472+

).rejects.toThrow(/replyBroadcast is only supported for text or block thread replies/i);

473+

});

474+
439475

it("sends media before a separate blocks message", async () => {

440476

sendSlackMessage.mockResolvedValueOnce({ channelId: "C123" });

441477

sendSlackMessage.mockResolvedValueOnce({ channelId: "C123" });

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,5 @@

11

import type { AgentToolResult } from "@mariozechner/pi-agent-core";

2+

import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";

23

import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";

34

import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";

45

import { parseSlackBlocksInput } from "./blocks-input.js";

@@ -239,9 +240,15 @@ export async function handleSlackAction(

239240

});

240241

const mediaUrl = readStringParam(params, "mediaUrl");

241242

const blocks = readSlackBlocksParam(params);

243+

const replyBroadcast = readBooleanParam(params, "replyBroadcast");

242244

if (!content && !mediaUrl && !blocks) {

243245

throw new Error("Slack sendMessage requires content, blocks, or mediaUrl.");

244246

}

247+

if (replyBroadcast && mediaUrl) {

248+

throw new Error(

249+

"Slack replyBroadcast is only supported for text or block thread replies.",

250+

);

251+

}

245252

const threadTs = resolveThreadTsFromContext(

246253

readStringParam(params, "threadTs"),

247254

to,

@@ -252,6 +259,7 @@ export async function handleSlackAction(

252259

mediaLocalRoots: context?.mediaLocalRoots,

253260

mediaReadFile: context?.mediaReadFile,

254261

threadTs: threadTs ?? undefined,

262+

...(replyBroadcast ? { replyBroadcast } : {}),

255263

};

256264

const result =

257265

mediaUrl && blocks

@@ -293,6 +301,12 @@ export async function handleSlackAction(

293301

});

294302

const filename = readStringParam(params, "filename");

295303

const title = readStringParam(params, "title");

304+

const replyBroadcast = readBooleanParam(params, "replyBroadcast");

305+

if (replyBroadcast) {

306+

throw new Error(

307+

"Slack replyBroadcast is only supported for text or block thread replies.",

308+

);

309+

}

296310

const threadTs = resolveThreadTsFromContext(

297311

readStringParam(params, "threadTs"),

298312

to,

Original file line numberDiff line numberDiff line change

@@ -207,6 +207,7 @@ export async function sendSlackMessage(

207207

mediaLocalRoots?: readonly string[];

208208

mediaReadFile?: (filePath: string) => Promise<Buffer>;

209209

threadTs?: string;

210+

replyBroadcast?: boolean;

210211

uploadFileName?: string;

211212

uploadTitle?: string;

212213

blocks?: (Block | KnownBlock)[];

@@ -222,6 +223,7 @@ export async function sendSlackMessage(

222223

mediaReadFile: opts.mediaReadFile,

223224

client: opts.client,

224225

threadTs: opts.threadTs,

226+

replyBroadcast: opts.replyBroadcast,

225227

...(opts.uploadFileName ? { uploadFileName: opts.uploadFileName } : {}),

226228

...(opts.uploadTitle ? { uploadTitle: opts.uploadTitle } : {}),

227229

blocks: opts.blocks,

Original file line numberDiff line numberDiff line change

@@ -153,6 +153,38 @@ describe("handleSlackMessageAction", () => {

153153

expectForwardedCfg(invoke, cfg);

154154

});

155155
156+

it("passes replyBroadcast through for Slack thread sends", async () => {

157+

const invoke = createInvokeSpy();

158+

const cfg = slackConfig();

159+
160+

await handleSlackMessageAction({

161+

providerId: "slack",

162+

ctx: {

163+

action: "send",

164+

cfg,

165+

params: {

166+

to: "channel:C1",

167+

message: "Visible from the channel",

168+

threadId: "111.222",

169+

replyBroadcast: true,

170+

},

171+

} as never,

172+

invoke: invoke as never,

173+

});

174+
175+

expect(invoke).toHaveBeenCalledWith(

176+

expect.objectContaining({

177+

action: "sendMessage",

178+

to: "channel:C1",

179+

content: "Visible from the channel",

180+

threadTs: "111.222",

181+

replyBroadcast: true,

182+

}),

183+

cfg,

184+

undefined,

185+

);

186+

});

187+
156188

it("maps upload-file to the internal uploadFile action", async () => {

157189

const invoke = createInvokeSpy();

158190

const cfg = slackConfig();

@@ -190,6 +222,25 @@ describe("handleSlackMessageAction", () => {

190222

expectForwardedCfg(invoke, cfg);

191223

});

192224
225+

it("rejects replyBroadcast for upload-file", async () => {

226+

await expect(

227+

handleSlackMessageAction({

228+

providerId: "slack",

229+

ctx: {

230+

action: "upload-file",

231+

cfg: {},

232+

params: {

233+

to: "channel:C1",

234+

filePath: "/tmp/report.png",

235+

threadId: "111.222",

236+

replyBroadcast: true,

237+

},

238+

} as never,

239+

invoke: createInvokeSpy() as never,

240+

}),

241+

).rejects.toThrow(/replyBroadcast is only supported for text or block thread replies/i);

242+

});

243+
193244

it("maps upload-file aliases to upload params", async () => {

194245

const invoke = createInvokeSpy();

195246

const cfg = slackConfig();

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,5 @@

11

import type { AgentToolResult } from "@mariozechner/pi-agent-core";

2+

import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";

23

import type { ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract";

34

import {

45

normalizeInteractiveReply,

@@ -58,6 +59,10 @@ export async function handleSlackMessageAction(params: {

5859

if (!content && !mediaUrl && !blocks) {

5960

throw new Error("Slack send requires message, blocks, or media.");

6061

}

62+

const replyBroadcast = readBooleanParam(actionParams, "replyBroadcast");

63+

if (replyBroadcast && mediaUrl) {

64+

throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");

65+

}

6166

const threadId = readStringParam(actionParams, "threadId");

6267

const replyTo = readStringParam(actionParams, "replyTo");

6368

return await invoke(

@@ -68,6 +73,7 @@ export async function handleSlackMessageAction(params: {

6873

mediaUrl: mediaUrl ?? undefined,

6974

accountId,

7075

threadTs: threadId ?? replyTo ?? undefined,

76+

...(replyBroadcast ? { replyBroadcast } : {}),

7177

...(blocks ? { blocks } : {}),

7278

},

7379

cfg,

@@ -219,6 +225,10 @@ export async function handleSlackMessageAction(params: {

219225

}

220226
221227

if (action === "upload-file") {

228+

const replyBroadcast = readBooleanParam(actionParams, "replyBroadcast");

229+

if (replyBroadcast) {

230+

throw new Error("Slack replyBroadcast is only supported for text or block thread replies.");

231+

}

222232

const to = readStringParam(actionParams, "to") ?? resolveChannelId();

223233

const filePath =

224234

readStringParam(actionParams, "filePath", { trim: false }) ??

Original file line numberDiff line numberDiff line change

@@ -30,6 +30,17 @@ function createSlackMessageIdActionSchema(): Record<string, TSchema> {

3030

};

3131

}

3232
33+

function createSlackSendActionSchema(): Record<string, TSchema> {

34+

return {

35+

replyBroadcast: Type.Optional(

36+

Type.Boolean({

37+

description:

38+

'Slack-only opt-in for action="send" thread replies. Set true with threadId or replyTo on text/block sends to also broadcast the reply to the parent channel. Not supported for media or upload-file.',

39+

}),

40+

),

41+

};

42+

}

43+
3344

export function describeSlackMessageTool({

3445

cfg,

3546

accountId,

@@ -51,6 +62,12 @@ export function describeSlackMessageTool({

5162

actions: ["download-file"],

5263

});

5364

}

65+

if (actions.includes("send")) {

66+

schema.push({

67+

properties: createSlackSendActionSchema(),

68+

actions: ["send"],

69+

});

70+

}

5471

const messageIdActions: ChannelMessageActionName[] = [];

5572

for (const action of SLACK_MESSAGE_ID_ACTIONS) {

5673

if (actions.includes(action)) {

Original file line numberDiff line numberDiff line change

@@ -172,6 +172,25 @@ describe("Slack message tools", () => {

172172

expect(alias.description).toMatch(/Alias for messageId/i);

173173

});

174174
175+

it("describes Slack reply broadcasts as send-only thread hints", () => {

176+

const discovery = describeSlackMessageTool({

177+

cfg: {

178+

channels: {

179+

slack: {

180+

botToken: "xoxb-test",

181+

},

182+

},

183+

},

184+

});

185+
186+

const { schema, property } = requireSchemaProperty(discovery, "replyBroadcast");

187+
188+

expect(schema.actions).toEqual(["send"]);

189+

expect(property.description).toContain('action="send"');

190+

expect(property.description).toContain("threadId");

191+

expect(property.description).toContain("Not supported for media or upload-file");

192+

});

193+
175194

it("omits Slack file and message id schemas when those actions are disabled", () => {

176195

const discovery = describeSlackMessageTool({

177196

cfg: {

@@ -191,6 +210,13 @@ describe("Slack message tools", () => {

191210

});

192211
193212

expect(discovery.actions).toEqual(["send"]);

194-

expect(discovery.schema).toBeNull();

213+

const schemas = Array.isArray(discovery.schema)

214+

? discovery.schema

215+

: discovery.schema

216+

? [discovery.schema]

217+

: [];

218+

expect(schemas.some((entry) => "fileId" in entry.properties)).toBe(false);

219+

expect(schemas.some((entry) => "messageId" in entry.properties)).toBe(false);

220+

expect(schemas.some((entry) => "replyBroadcast" in entry.properties)).toBe(true);

195221

});

196222

});

Original file line numberDiff line numberDiff line change

@@ -254,6 +254,44 @@ describe("sendMessageSlack blocks", () => {

254254

expect(result.receipt.threadId).toBe("171234.100");

255255

});

256256
257+

it("passes reply_broadcast for threaded text sends only on the first chunk", async () => {

258+

const client = createSlackSendTestClient();

259+
260+

await sendMessageSlack("channel:C123", "a".repeat(8500), {

261+

token: "xoxb-test",

262+

cfg: SLACK_TEST_CFG,

263+

client,

264+

threadTs: "171234.100",

265+

replyBroadcast: true,

266+

});

267+
268+

expect(client.chat.postMessage).toHaveBeenCalledTimes(2);

269+

expect(client.chat.postMessage.mock.calls[0]?.[0]).toEqual(

270+

expect.objectContaining({

271+

thread_ts: "171234.100",

272+

reply_broadcast: true,

273+

}),

274+

);

275+

expect(client.chat.postMessage.mock.calls[1]?.[0]).not.toHaveProperty("reply_broadcast");

276+

});

277+
278+

it("does not pass reply_broadcast when no thread is selected", async () => {

279+

const client = createSlackSendTestClient();

280+
281+

await sendMessageSlack("channel:C123", "hello", {

282+

token: "xoxb-test",

283+

cfg: SLACK_TEST_CFG,

284+

client,

285+

replyBroadcast: true,

286+

});

287+
288+

expect(client.chat.postMessage).toHaveBeenCalledWith(

289+

expect.not.objectContaining({

290+

reply_broadcast: true,

291+

}),

292+

);

293+

});

294+
257295

it("does not retry Slack platform errors", async () => {

258296

const client = createSlackSendTestClient();

259297

const platformError = Object.assign(

@@ -375,6 +413,21 @@ describe("sendMessageSlack blocks", () => {

375413

expect(client.chat.postMessage).not.toHaveBeenCalled();

376414

});

377415
416+

it("rejects replyBroadcast combined with mediaUrl", async () => {

417+

const client = createSlackSendTestClient();

418+

await expect(

419+

sendMessageSlack("channel:C123", "hi", {

420+

token: "xoxb-test",

421+

cfg: SLACK_TEST_CFG,

422+

client,

423+

mediaUrl: "https://example.com/image.png",

424+

threadTs: "171234.100",

425+

replyBroadcast: true,

426+

}),

427+

).rejects.toThrow(/replyBroadcast is only supported for text or block thread replies/i);

428+

expect(client.chat.postMessage).not.toHaveBeenCalled();

429+

});

430+
378431

it("rejects empty blocks arrays from runtime callers", async () => {

379432

const client = createSlackSendTestClient();

380433

await expect(