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

推荐订阅源

H
Heimdal Security Blog
A
Arctic Wolf
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs
D
Docker
爱范儿
爱范儿
T
Tenable Blog
C
Check Point Blog
B
Blog
C
Cisco Blogs
Vercel News
Vercel News
The Cloudflare Blog
T
Threatpost
NISL@THU
NISL@THU
T
Tor Project blog
V2EX - 技术
V2EX - 技术
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
博客园 - 司徒正美
S
Security @ Cisco Blogs
GbyAI
GbyAI
S
Secure Thoughts
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Cloudbric
Cloudbric
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
Y
Y Combinator Blog
博客园_首页
T
Troy Hunt's Blog
The Hacker News
The Hacker News
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
U
Unit 42
AWS News Blog
AWS News Blog
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell

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
Fix Discord realtime voice playback stability · openclaw/openclaw@6e80294
Solvely-Coli · 2026-05-18 · via Recent Commits to openclaw:main

@@ -762,6 +762,7 @@ describe("DiscordVoiceManager", () => {

762762

audioSink?: {

763763

sendAudio: (audio: Buffer) => void;

764764

};

765+

onEvent?: (event: { direction: "server"; type: string }) => void;

765766

}

766767

| undefined;

767768

player.state.status = "playing";

@@ -781,6 +782,7 @@ describe("DiscordVoiceManager", () => {

781782

);

782783

expect(subscribeCall?.[0]).toBe("u1");

783784

expect(requireRecord(subscribeCall?.[1], "subscribe options").end).toBeTypeOf("object");

785+

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

784786

});

785787786788

it("interrupts realtime playback when an already-active speaker keeps talking", async () => {

@@ -819,6 +821,7 @@ describe("DiscordVoiceManager", () => {

819821

audioSink?: {

820822

sendAudio: (audio: Buffer) => void;

821823

};

824+

onEvent?: (event: { direction: "server"; type: string }) => void;

822825

}

823826

| undefined;

824827

const player = getLastAudioPlayer();

@@ -838,6 +841,7 @@ describe("DiscordVoiceManager", () => {

838841

expect(lastTimestampCall).toBeLessThan(firstBargeInCall);

839842

expect(player.stop).not.toHaveBeenCalled();

840843

expect(realtimeSessionMock.sendAudio).toHaveBeenCalled();

844+

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

841845

});

842846843847

it("does not interrupt realtime provider state when local playback is already idle", async () => {

@@ -882,6 +886,95 @@ describe("DiscordVoiceManager", () => {

882886

expect(realtimeSessionMock.sendAudio).toHaveBeenCalled();

883887

});

884888889+

it("sends trailing realtime silence when a speaker turn closes", async () => {

890+

const manager = createManager({

891+

groupPolicy: "open",

892+

allowFrom: ["discord:u1"],

893+

voice: {

894+

enabled: true,

895+

mode: "bidi",

896+

realtime: {

897+

provider: "openai",

898+

providers: {

899+

openai: {

900+

silenceDurationMs: 450,

901+

},

902+

},

903+

},

904+

},

905+

});

906+907+

await manager.join({ guildId: "g1", channelId: "1001" });

908+909+

const entry = getSessionEntry(manager) as {

910+

realtime?: {

911+

beginSpeakerTurn: (

912+

context: { extraSystemPrompt?: string; senderIsOwner: boolean; speakerLabel: string },

913+

userId: string,

914+

) => { close: () => void; sendInputAudio: (audio: Buffer) => void };

915+

};

916+

};

917+

const turn = entry.realtime?.beginSpeakerTurn(

918+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

919+

"u1",

920+

);

921+922+

turn?.sendInputAudio(Buffer.alloc(3840));

923+

turn?.close();

924+925+

expect(realtimeSessionMock.sendAudio).toHaveBeenCalledTimes(2);

926+

const trailingSilence = realtimeSessionMock.sendAudio.mock.calls.at(-1)?.[0] as

927+

| Buffer

928+

| undefined;

929+

expect(trailingSilence).toBeInstanceOf(Buffer);

930+

expect(trailingSilence?.length).toBe(33_600);

931+

expect(trailingSilence?.equals(Buffer.alloc(33_600))).toBe(true);

932+

});

933+934+

it("clamps configured realtime trailing silence before allocating audio", async () => {

935+

const manager = createManager({

936+

groupPolicy: "open",

937+

allowFrom: ["discord:u1"],

938+

voice: {

939+

enabled: true,

940+

mode: "bidi",

941+

realtime: {

942+

provider: "openai",

943+

providers: {

944+

openai: {

945+

silenceDurationMs: 60_000,

946+

},

947+

},

948+

},

949+

},

950+

});

951+952+

await manager.join({ guildId: "g1", channelId: "1001" });

953+954+

const entry = getSessionEntry(manager) as {

955+

realtime?: {

956+

beginSpeakerTurn: (

957+

context: { extraSystemPrompt?: string; senderIsOwner: boolean; speakerLabel: string },

958+

userId: string,

959+

) => { close: () => void; sendInputAudio: (audio: Buffer) => void };

960+

};

961+

};

962+

const turn = entry.realtime?.beginSpeakerTurn(

963+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

964+

"u1",

965+

);

966+967+

turn?.sendInputAudio(Buffer.alloc(3840));

968+

turn?.close();

969+970+

const trailingSilence = realtimeSessionMock.sendAudio.mock.calls.at(-1)?.[0] as

971+

| Buffer

972+

| undefined;

973+

expect(trailingSilence).toBeInstanceOf(Buffer);

974+

expect(trailingSilence?.length).toBe(144_000);

975+

expect(trailingSilence?.equals(Buffer.alloc(144_000))).toBe(true);

976+

});

977+885978

it("ignores realtime capture during playback when barge-in is disabled", async () => {

886979

const connection = createConnectionMock();

887980

joinVoiceChannelMock.mockReturnValueOnce(connection);

@@ -1229,11 +1322,12 @@ describe("DiscordVoiceManager", () => {

12291322

| undefined;

1230132312311324

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1325+

expect(createAudioResourceMock).not.toHaveBeenCalled();

1326+

expect(player.play).not.toHaveBeenCalled();

1327+

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

12321328

expect(createAudioResourceMock).toHaveBeenCalledTimes(1);

12331329

expect(player.play).toHaveBeenCalledTimes(1);

12341330

const firstStream = lastAudioResourceInput() as { writableEnded?: boolean } | undefined;

1235-

expect(firstStream?.writableEnded).toBe(false);

1236-

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

12371331

expect(firstStream?.writableEnded).toBe(true);

1238133212391333

const idleHandler = player.on.mock.calls.find(([event]) => event === "idle")?.[1] as

@@ -1243,10 +1337,90 @@ describe("DiscordVoiceManager", () => {

12431337

idleHandler?.();

1244133812451339

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1340+

expect(createAudioResourceMock).toHaveBeenCalledTimes(1);

1341+

expect(player.play).toHaveBeenCalledTimes(1);

1342+

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

12461343

expect(createAudioResourceMock).toHaveBeenCalledTimes(2);

12471344

expect(player.play).toHaveBeenCalledTimes(2);

12481345

});

124913461347+

it("prebuffers realtime output before starting Discord playback", async () => {

1348+

const manager = createManager({

1349+

groupPolicy: "open",

1350+

voice: {

1351+

enabled: true,

1352+

mode: "agent-proxy",

1353+

realtime: { provider: "openai" },

1354+

},

1355+

});

1356+1357+

await manager.join({ guildId: "g1", channelId: "1001" });

1358+1359+

const player = getLastAudioPlayer();

1360+

const bridgeParams = createRealtimeVoiceBridgeSessionMock.mock.calls.at(-1)?.[0] as

1361+

| {

1362+

audioSink?: {

1363+

sendAudio: (audio: Buffer) => void;

1364+

};

1365+

onEvent?: (event: { direction: "server"; type: string }) => void;

1366+

}

1367+

| undefined;

1368+1369+

for (let index = 0; index < 49; index += 1) {

1370+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1371+

}

1372+1373+

expect(createAudioResourceMock).not.toHaveBeenCalled();

1374+

expect(player.play).not.toHaveBeenCalled();

1375+1376+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1377+1378+

expect(createAudioResourceMock).toHaveBeenCalledTimes(1);

1379+

expect(player.play).toHaveBeenCalledTimes(1);

1380+

bridgeParams?.onEvent?.({ direction: "server", type: "response.done" });

1381+

});

1382+1383+

it("discards prebuffered realtime output when the response is cancelled", async () => {

1384+

const manager = createManager({

1385+

groupPolicy: "open",

1386+

voice: {

1387+

enabled: true,

1388+

mode: "agent-proxy",

1389+

realtime: { provider: "openai" },

1390+

},

1391+

});

1392+1393+

await manager.join({ guildId: "g1", channelId: "1001" });

1394+1395+

const player = getLastAudioPlayer();

1396+

const bridgeParams = createRealtimeVoiceBridgeSessionMock.mock.calls.at(-1)?.[0] as

1397+

| {

1398+

audioSink?: {

1399+

sendAudio: (audio: Buffer) => void;

1400+

};

1401+

onEvent?: (event: { detail?: string; direction: "server"; type: string }) => void;

1402+

}

1403+

| undefined;

1404+1405+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1406+

bridgeParams?.onEvent?.({ direction: "server", type: "response.cancelled" });

1407+1408+

expect(createAudioResourceMock).not.toHaveBeenCalled();

1409+

expect(player.play).not.toHaveBeenCalled();

1410+

expect(player.stop).toHaveBeenCalledWith(true);

1411+1412+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1413+

bridgeParams?.onEvent?.({

1414+

detail: "response completed with status=cancelled",

1415+

direction: "server",

1416+

type: "response.done",

1417+

});

1418+1419+

expect(createAudioResourceMock).not.toHaveBeenCalled();

1420+

expect(player.play).not.toHaveBeenCalled();

1421+

expect(player.stop).toHaveBeenCalledTimes(2);

1422+

});

1423+12501424

it("applies Discord realtime model and voice overrides during provider auto-selection", async () => {

12511425

const manager = createManager({

12521426

groupPolicy: "open",

@@ -1622,6 +1796,66 @@ describe("DiscordVoiceManager", () => {

16221796

expectUserMessageIncludes("second answer");

16231797

});

162417981799+

it("drains queued exact speech after cancelled prebuffered output is discarded", async () => {

1800+

agentCommandMock

1801+

.mockResolvedValueOnce({ payloads: [{ text: "first answer" }] })

1802+

.mockResolvedValueOnce({ payloads: [{ text: "second answer" }] });

1803+

const manager = createManager({

1804+

groupPolicy: "open",

1805+

voice: {

1806+

enabled: true,

1807+

mode: "agent-proxy",

1808+

realtime: { provider: "openai" },

1809+

},

1810+

});

1811+1812+

await manager.join({ guildId: "g1", channelId: "1001" });

1813+

const entry = getSessionEntry(manager) as {

1814+

realtime?: {

1815+

beginSpeakerTurn: (

1816+

context: { extraSystemPrompt?: string; senderIsOwner: boolean; speakerLabel: string },

1817+

userId: string,

1818+

) => { close: () => void; sendInputAudio: (audio: Buffer) => void };

1819+

};

1820+

};

1821+

const player = getLastAudioPlayer();

1822+

const bridgeParams = createRealtimeVoiceBridgeSessionMock.mock.calls.at(-1)?.[0] as

1823+

| {

1824+

audioSink?: { sendAudio: (audio: Buffer) => void };

1825+

onEvent?: (event: { detail?: string; direction: "server"; type: string }) => void;

1826+

onTranscript?: (role: "user" | "assistant", text: string, isFinal: boolean) => void;

1827+

}

1828+

| undefined;

1829+1830+

const firstTurn = entry.realtime?.beginSpeakerTurn(

1831+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

1832+

"u-owner",

1833+

);

1834+

firstTurn?.sendInputAudio(Buffer.alloc(8));

1835+

bridgeParams?.onTranscript?.("user", "first question", true);

1836+1837+

await new Promise((resolve) => setTimeout(resolve, 260));

1838+

await vi.waitFor(() => expectUserMessageIncludes("first answer"));

1839+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(480));

1840+1841+

const secondTurn = entry.realtime?.beginSpeakerTurn(

1842+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

1843+

"u-owner",

1844+

);

1845+

secondTurn?.sendInputAudio(Buffer.alloc(8));

1846+

bridgeParams?.onTranscript?.("user", "second question", true);

1847+1848+

await new Promise((resolve) => setTimeout(resolve, 260));

1849+

expectUserMessageNotIncludes("second answer");

1850+1851+

bridgeParams?.onEvent?.({ direction: "server", type: "response.cancelled" });

1852+1853+

expect(createAudioResourceMock).not.toHaveBeenCalled();

1854+

expect(player.play).not.toHaveBeenCalled();

1855+

expect(player.stop).toHaveBeenCalledWith(true);

1856+

expectUserMessageIncludes("second answer");

1857+

});

1858+16251859

it("matches agent-proxy consult tool calls to the pending transcript", async () => {

16261860

agentCommandMock

16271861

.mockResolvedValueOnce({ payloads: [{ text: "owner answer" }] })