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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
Cyberwarzone
Cyberwarzone
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
S
Securelist
L
Lohrmann on Cybersecurity
Security Latest
Security Latest
T
Threatpost
H
Heimdal Security Blog
W
WeLiveSecurity
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
TaoSecurity Blog
TaoSecurity Blog
A
About on SuperTechFans
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
量子位
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
Vercel News
Vercel News
C
Cyber Attacks, Cyber Crime and Cyber Security
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security

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
test: clear discord message process broad matchers · openclaw/openclaw@1429f9a
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -445,25 +445,87 @@ function getReactionEmojis(): string[] {

445445

).map((call) => call[2]);

446446

}

447447448-

function expectAckReactionRuntimeOptions(params?: {

449-

accountId?: string;

450-

ackReaction?: string;

451-

removeAckAfterReply?: boolean;

452-

}) {

448+

function requireRecord(value: unknown, label: string): Record<string, unknown> {

449+

expect(typeof value).toBe("object");

450+

expect(value).not.toBeNull();

451+

if (typeof value !== "object" || value === null) {

452+

throw new Error(`${label} was not an object`);

453+

}

454+

return value as Record<string, unknown>;

455+

}

456+457+

function expectRecordFields(record: Record<string, unknown>, fields: Record<string, unknown>) {

458+

for (const [key, value] of Object.entries(fields)) {

459+

expect(record[key]).toEqual(value);

460+

}

461+

}

462+463+

function expectAckReactionRuntimeOptions(

464+

options: unknown,

465+

params?: {

466+

accountId?: string;

467+

ackReaction?: string;

468+

removeAckAfterReply?: boolean;

469+

},

470+

) {

471+

const optionRecord = requireRecord(options, "reaction runtime options");

472+

requireRecord(optionRecord.rest, "reaction REST client");

473+

if (params?.accountId) {

474+

expect(optionRecord.accountId).toBe(params.accountId);

475+

}

453476

const messages: Record<string, unknown> = {};

454477

if (params?.ackReaction) {

455478

messages.ackReaction = params.ackReaction;

456479

}

457480

if (params?.removeAckAfterReply !== undefined) {

458481

messages.removeAckAfterReply = params.removeAckAfterReply;

459482

}

460-

return expect.objectContaining({

461-

rest: expect.anything(),

462-

...(Object.keys(messages).length > 0

463-

? { cfg: expect.objectContaining({ messages: expect.objectContaining(messages) }) }

464-

: {}),

465-

...(params?.accountId ? { accountId: params.accountId } : {}),

466-

});

483+

if (Object.keys(messages).length > 0) {

484+

const cfg = requireRecord(optionRecord.cfg, "reaction config");

485+

expectRecordFields(requireRecord(cfg.messages, "reaction message config"), messages);

486+

}

487+

}

488+489+

function requireReactionCall(

490+

mock: typeof sendMocks.reactMessageDiscord | typeof sendMocks.removeReactionDiscord,

491+

index: number,

492+

) {

493+

const call = mock.mock.calls[index] as unknown[] | undefined;

494+

expect(call).toBeDefined();

495+

if (!call) {

496+

throw new Error(`missing reaction call ${index + 1}`);

497+

}

498+

return call;

499+

}

500+501+

function expectReactionCallAt(

502+

mock: typeof sendMocks.reactMessageDiscord | typeof sendMocks.removeReactionDiscord,

503+

index: number,

504+

emoji: string,

505+

params?: {

506+

accountId?: string;

507+

ackReaction?: string;

508+

removeAckAfterReply?: boolean;

509+

channelId?: string;

510+

messageId?: string;

511+

},

512+

) {

513+

const call = requireReactionCall(mock, index);

514+

expect(call[0]).toBe(params?.channelId ?? "c1");

515+

expect(call[1]).toBe(params?.messageId ?? "m1");

516+

expect(call[2]).toBe(emoji);

517+

expectAckReactionRuntimeOptions(call[3], params);

518+

}

519+520+

function expectReactionCallsContain(channelId: string, messageId: string, emoji: string) {

521+

const calls = sendMocks.reactMessageDiscord.mock.calls as unknown as Array<

522+

[string, string, string]

523+

>;

524+

const hasCall = calls.some(

525+

([actualChannelId, actualMessageId, actualEmoji]) =>

526+

actualChannelId === channelId && actualMessageId === messageId && actualEmoji === emoji,

527+

);

528+

expect(hasCall).toBe(true);

467529

}

468530469531

function expectReactAckCallAt(

@@ -477,13 +539,7 @@ function expectReactAckCallAt(

477539

removeAckAfterReply?: boolean;

478540

},

479541

) {

480-

expect(sendMocks.reactMessageDiscord).toHaveBeenNthCalledWith(

481-

index + 1,

482-

params?.channelId ?? "c1",

483-

params?.messageId ?? "m1",

484-

emoji,

485-

expectAckReactionRuntimeOptions(params),

486-

);

542+

expectReactionCallAt(sendMocks.reactMessageDiscord, index, emoji, params);

487543

}

488544489545

function expectRemoveAckCallAt(

@@ -497,13 +553,7 @@ function expectRemoveAckCallAt(

497553

removeAckAfterReply?: boolean;

498554

},

499555

) {

500-

expect(sendMocks.removeReactionDiscord).toHaveBeenNthCalledWith(

501-

index + 1,

502-

params?.channelId ?? "c1",

503-

params?.messageId ?? "m1",

504-

emoji,

505-

expectAckReactionRuntimeOptions(params),

506-

);

556+

expectReactionCallAt(sendMocks.removeReactionDiscord, index, emoji, params);

507557

}

508558509559

function createMockDraftStreamForTest() {

@@ -512,13 +562,20 @@ function createMockDraftStreamForTest() {

512562

return draftStream;

513563

}

514564565+

function expectPreviewEditContent(content: string) {

566+

const call = editMessageDiscord.mock.calls[0] as unknown[] | undefined;

567+

expect(call).toBeDefined();

568+

if (!call) {

569+

throw new Error("missing preview edit call");

570+

}

571+

expect(call[0]).toBe("c1");

572+

expect(call[1]).toBe("preview-1");

573+

expect(call[2]).toEqual({ content });

574+

requireRecord(requireRecord(call[3], "preview edit options").rest, "preview edit REST client");

575+

}

576+515577

function expectSinglePreviewEdit() {

516-

expect(editMessageDiscord).toHaveBeenCalledWith(

517-

"c1",

518-

"preview-1",

519-

{ content: "Hello\nWorld" },

520-

expect.objectContaining({ rest: expect.anything() }),

521-

);

578+

expectPreviewEditContent("Hello\nWorld");

522579

expect(deliverDiscordReply).not.toHaveBeenCalled();

523580

}

524581

@@ -601,12 +658,13 @@ describe("processDiscordMessage ack reactions", () => {

601658

await runProcessDiscordMessage(ctx);

602659603660

expect(sendMocks.reactMessageDiscord).toHaveBeenCalled();

604-

expect(sendMocks.reactMessageDiscord.mock.calls[0]?.[3]).toEqual(

605-

expect.objectContaining({ rest: feedbackRest }),

606-

);

607-

expect(deliverDiscordReply).toHaveBeenCalledWith(

608-

expect.objectContaining({ rest: deliveryRest }),

661+

const feedbackOptions = requireRecord(

662+

sendMocks.reactMessageDiscord.mock.calls[0]?.[3],

663+

"feedback reaction options",

609664

);

665+

expect(feedbackOptions.rest).toBe(feedbackRest);

666+

const deliveryParams = requireRecord(deliverDiscordReply.mock.calls[0]?.[0], "delivery params");

667+

expect(deliveryParams.rest).toBe(deliveryRest);

610668

expect(feedbackRest).not.toBe(deliveryRest);

611669

});

612670

@@ -669,12 +727,9 @@ describe("processDiscordMessage ack reactions", () => {

669727

await runProcessDiscordMessage(ctx);

670728

await vi.runAllTimersAsync();

671729672-

const calls = sendMocks.reactMessageDiscord.mock.calls as unknown as Array<

673-

[string, string, string]

674-

>;

675-

expect(calls).toContainEqual(expect.arrayContaining(["c1", "m1", "📈"]));

676-

expect(calls).toContainEqual(expect.arrayContaining(["c1", "m1", "✉️"]));

677-

expect(calls).toContainEqual(expect.arrayContaining(["c1", "m1", DEFAULT_EMOJIS.done]));

730+

expectReactionCallsContain("c1", "m1", "📈");

731+

expectReactionCallsContain("c1", "m1", "✉️");

732+

expectReactionCallsContain("c1", "m1", DEFAULT_EMOJIS.done);

678733

});

679734680735

it("resolves tracked reaction to targets like the Discord reaction action", async () => {

@@ -702,16 +757,20 @@ describe("processDiscordMessage ack reactions", () => {

702757

await runProcessDiscordMessage(ctx);

703758

await vi.runAllTimersAsync();

704759705-

expect(discordTargetMocks.resolveDiscordTargetChannelId).toHaveBeenCalledWith(

706-

"user:u1",

707-

expect.objectContaining({ accountId: "default" }),

760+

const resolveCall = discordTargetMocks.resolveDiscordTargetChannelId.mock.calls[0] as

761+

| unknown[]

762+

| undefined;

763+

expect(resolveCall).toBeDefined();

764+

if (!resolveCall) {

765+

throw new Error("missing Discord target resolve call");

766+

}

767+

expect(resolveCall[0]).toBe("user:u1");

768+

expect(requireRecord(resolveCall[1], "Discord target resolve options").accountId).toBe(

769+

"default",

708770

);

709-

const calls = sendMocks.reactMessageDiscord.mock.calls as unknown as Array<

710-

[string, string, string]

711-

>;

712-

expect(calls).toContainEqual(expect.arrayContaining(["dm-u1", "m1", "📈"]));

713-

expect(calls).toContainEqual(expect.arrayContaining(["dm-u1", "m1", "✉️"]));

714-

expect(calls).toContainEqual(expect.arrayContaining(["dm-u1", "m1", DEFAULT_EMOJIS.done]));

771+

expectReactionCallsContain("dm-u1", "m1", "📈");

772+

expectReactionCallsContain("dm-u1", "m1", "✉️");

773+

expectReactionCallsContain("dm-u1", "m1", DEFAULT_EMOJIS.done);

715774

});

716775717776

it("shows stall emojis for long no-progress runs", async () => {

@@ -911,7 +970,7 @@ describe("processDiscordMessage session routing", () => {

911970912971

await runProcessDiscordMessage(ctx);

913972914-

expect(getLastDispatchCtx()).toMatchObject({

973+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

915974

BodyForAgent: "hello from discord voice",

916975

CommandBody: "hello from discord voice",

917976

Transcript: "hello from discord voice",

@@ -939,7 +998,7 @@ describe("processDiscordMessage session routing", () => {

939998

to: "user:U1",

940999

accountId: "default",

9411000

});

942-

expect(getLastDispatchCtx()).toMatchObject({

1001+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

9431002

ChatType: "direct",

9441003

From: "discord:U1",

9451004

To: "user:U1",

@@ -978,16 +1037,22 @@ describe("processDiscordMessage session routing", () => {

97810379791038

await runProcessDiscordMessage(ctx);

9801039981-

expect(getLastRouteUpdate()).toMatchObject({

1040+

expectRecordFields(requireRecord(getLastRouteUpdate(), "last route update"), {

9821041

sessionKey: "agent:main:main",

9831042

channel: "discord",

9841043

to: "user:222",

9851044

accountId: "default",

986-

mainDmOwnerPin: {

1045+

});

1046+

expectRecordFields(

1047+

requireRecord(

1048+

requireRecord(getLastRouteUpdate(), "last route update").mainDmOwnerPin,

1049+

"main DM owner pin",

1050+

),

1051+

{

9871052

ownerRecipient: "111",

9881053

senderRecipient: "222",

9891054

},

990-

});

1055+

);

9911056

});

99210579931058

it("stores group lastRoute with channel target", async () => {

@@ -1016,7 +1081,7 @@ describe("processDiscordMessage session routing", () => {

1016108110171082

await runProcessDiscordMessage(ctx);

101810831019-

expect(getLastDispatchReplyOptions()).toMatchObject({

1084+

expectRecordFields(requireRecord(getLastDispatchReplyOptions(), "dispatch reply options"), {

10201085

sourceReplyDeliveryMode: "message_tool_only",

10211086

disableBlockStreaming: true,

10221087

});

@@ -1098,7 +1163,7 @@ describe("processDiscordMessage session routing", () => {

1098116310991164

await runProcessDiscordMessage(ctx);

110011651101-

expect(getLastDispatchCtx()).toMatchObject({

1166+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

11021167

MessageSid: "orig-123",

11031168

MessageSidFull: "proxy-456",

11041169

});

@@ -1169,7 +1234,7 @@ describe("processDiscordMessage session routing", () => {

1169123411701235

await runProcessDiscordMessage(ctx);

117112361172-

expect(getLastDispatchCtx()).toMatchObject({

1237+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

11731238

SessionKey: "agent:main:subagent:child",

11741239

MessageThreadId: "thread-1",

11751240

});

@@ -1202,7 +1267,7 @@ describe("processDiscordMessage session routing", () => {

1202126712031268

await runProcessDiscordMessage(ctx);

120412691205-

expect(getLastDispatchCtx()).toMatchObject({

1270+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

12061271

SessionKey: "agent:main:discord:channel:thread-1",

12071272

MessageThreadId: "thread-1",

12081273

ModelParentSessionKey: "agent:main:discord:channel:parent-1",

@@ -1246,7 +1311,7 @@ describe("processDiscordMessage session routing", () => {

12461311

await runProcessDiscordMessage(ctx);

1247131212481313

expect(rest.get).toHaveBeenCalled();

1249-

expect(getLastDispatchCtx()).toMatchObject({

1314+

expectRecordFields(requireRecord(getLastDispatchCtx(), "dispatch context"), {

12501315

SessionKey: threadSessionKey,

12511316

MessageThreadId: "thread-1",

12521317

});

@@ -1320,12 +1385,7 @@ describe("processDiscordMessage draft streaming", () => {

1320138513211386

expect(draftStream.update).toHaveBeenCalledWith(expect.stringContaining("Exec"));

13221387

expect(draftStream.update).toHaveBeenCalledWith(expect.stringContaining("exec done"));

1323-

expect(editMessageDiscord).toHaveBeenCalledWith(

1324-

"c1",

1325-

"preview-1",

1326-

{ content: "done" },

1327-

expect.objectContaining({ rest: expect.anything() }),

1328-

);

1388+

expectPreviewEditContent("done");

13291389

expect(deliverDiscordReply).not.toHaveBeenCalled();

13301390

});

13311391

@@ -1365,12 +1425,7 @@ describe("processDiscordMessage draft streaming", () => {

1365142513661426

await runProcessDiscordMessage(ctx);

136714271368-

expect(editMessageDiscord).toHaveBeenCalledWith(

1369-

"c1",

1370-

"preview-1",

1371-

{ content: longReply },

1372-

expect.objectContaining({ rest: expect.anything() }),

1373-

);

1428+

expectPreviewEditContent(longReply);

13741429

expect(deliverDiscordReply).not.toHaveBeenCalled();

13751430

});

13761431

@@ -1535,9 +1590,12 @@ describe("processDiscordMessage draft streaming", () => {

15351590

expect(draftStream.update).toHaveBeenCalledTimes(1);

15361591

expect(draftStream.update).toHaveBeenCalledWith("Shelling");

15371592

expect(draftStream.flush).toHaveBeenCalledTimes(1);

1538-

expect(dispatchInboundMessage.mock.calls[0]?.[0]?.replyOptions).toMatchObject({

1539-

suppressDefaultToolProgressMessages: true,

1540-

});

1593+

expect(

1594+

requireRecord(

1595+

dispatchInboundMessage.mock.calls[0]?.[0]?.replyOptions,

1596+

"dispatch reply options",

1597+

).suppressDefaultToolProgressMessages,

1598+

).toBe(true);

15411599

});

1542160015431601

it("does not start Discord progress drafts for text-only accepted turns", async () => {

@@ -1588,12 +1646,7 @@ describe("processDiscordMessage draft streaming", () => {

1588164615891647

expect(draftStream.update).toHaveBeenCalledWith("Shelling\n🛠️ Exec\n• exec done");

15901648

expect(deliverDiscordReply).not.toHaveBeenCalled();

1591-

expect(editMessageDiscord).toHaveBeenCalledWith(

1592-

"c1",

1593-

"preview-1",

1594-

{ content: "done" },

1595-

expect.objectContaining({ rest: expect.anything() }),

1596-

);

1649+

expectPreviewEditContent("done");

15971650

});

1598165115991652

it("uses raw tool-progress detail in Discord progress drafts", async () => {