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

推荐订阅源

博客园_首页
H
Help Net Security
量子位
The Cloudflare Blog
博客园 - Franky
博客园 - 聂微东
博客园 - 司徒正美
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
罗磊的独立博客
GbyAI
GbyAI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
MongoDB | Blog
MongoDB | Blog

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
Fix Google Meet realtime interruption playback (#72524) ·...
BsnizND · 2026-04-27 · via Recent Commits to openclaw:main

@@ -15,6 +15,7 @@ type NodeBridgeSession = {

1515

id: string;

1616

url?: string;

1717

mode?: string;

18+

outputCommand: { command: string; args: string[] };

1819

input?: ChildProcess;

1920

output?: ChildProcess;

2021

chunks: Buffer[];

@@ -23,9 +24,11 @@ type NodeBridgeSession = {

2324

createdAt: string;

2425

lastInputAt?: string;

2526

lastOutputAt?: string;

27+

lastClearAt?: string;

2628

lastInputBytes: number;

2729

lastOutputBytes: number;

2830

closedAt?: string;

31+

clearCount: number;

2932

};

30333134

const sessions = new Map<string, NodeBridgeSession>();

@@ -110,6 +113,25 @@ function stopSession(session: NodeBridgeSession) {

110113

wake(session);

111114

}

112115116+

function attachOutputProcessHandlers(session: NodeBridgeSession, outputProcess: ChildProcess) {

117+

outputProcess.on("exit", () => {

118+

if (session.output === outputProcess) {

119+

stopSession(session);

120+

}

121+

});

122+

outputProcess.on("error", () => {

123+

if (session.output === outputProcess) {

124+

stopSession(session);

125+

}

126+

});

127+

}

128+129+

function startOutputProcess(command: { command: string; args: string[] }) {

130+

return spawn(command.command, command.args, {

131+

stdio: ["pipe", "ignore", "pipe"],

132+

});

133+

}

134+113135

function startCommandPair(params: {

114136

inputCommand: string[];

115137

outputCommand: string[];

@@ -122,16 +144,16 @@ function startCommandPair(params: {

122144

id: `meet_node_${randomUUID()}`,

123145

url: params.url,

124146

mode: params.mode,

147+

outputCommand: output,

125148

chunks: [],

126149

waiters: [],

127150

closed: false,

128151

createdAt: new Date().toISOString(),

129152

lastInputBytes: 0,

130153

lastOutputBytes: 0,

154+

clearCount: 0,

131155

};

132-

const outputProcess = spawn(output.command, output.args, {

133-

stdio: ["pipe", "ignore", "pipe"],

134-

});

156+

const outputProcess = startOutputProcess(output);

135157

const inputProcess = spawn(input.command, input.args, {

136158

stdio: ["ignore", "pipe", "pipe"],

137159

});

@@ -148,9 +170,8 @@ function startCommandPair(params: {

148170

wake(session);

149171

});

150172

inputProcess.on("exit", () => stopSession(session));

151-

outputProcess.on("exit", () => stopSession(session));

173+

attachOutputProcessHandlers(session, outputProcess);

152174

inputProcess.on("error", () => stopSession(session));

153-

outputProcess.on("error", () => stopSession(session));

154175

sessions.set(session.id, session);

155176

return session;

156177

}

@@ -224,6 +245,25 @@ function pushAudio(params: Record<string, unknown>) {

224245

return { bridgeId, ok: true };

225246

}

226247248+

function clearAudio(params: Record<string, unknown>) {

249+

const bridgeId = readString(params.bridgeId);

250+

if (!bridgeId) {

251+

throw new Error("bridgeId required");

252+

}

253+

const session = sessions.get(bridgeId);

254+

if (!session || session.closed) {

255+

throw new Error(`bridge is not open: ${bridgeId}`);

256+

}

257+

const previousOutput = session.output;

258+

const outputProcess = startOutputProcess(session.outputCommand);

259+

session.output = outputProcess;

260+

attachOutputProcessHandlers(session, outputProcess);

261+

session.clearCount += 1;

262+

session.lastClearAt = new Date().toISOString();

263+

terminateChild(previousOutput);

264+

return { bridgeId, ok: true, clearCount: session.clearCount };

265+

}

266+227267

function startChrome(params: Record<string, unknown>) {

228268

const url = readString(params.url);

229269

if (!url) {

@@ -317,8 +357,11 @@ function bridgeStatus(params: Record<string, unknown>) {

317357

createdAt: session.createdAt,

318358

lastInputAt: session.lastInputAt,

319359

lastOutputAt: session.lastOutputAt,

360+

lastClearAt: session.lastClearAt,

320361

lastInputBytes: session.lastInputBytes,

321362

lastOutputBytes: session.lastOutputBytes,

363+

clearCount: session.clearCount,

364+

queuedInputChunks: session.chunks.length,

322365

}

323366

: bridgeId

324367

? { bridgeId, closed: true }

@@ -438,6 +481,9 @@ export async function handleGoogleMeetNodeHostCommand(paramsJSON?: string | null

438481

case "pushAudio":

439482

result = pushAudio(params);

440483

break;

484+

case "clearAudio":

485+

result = clearAudio(params);

486+

break;

441487

case "stop":

442488

result = stopChrome(params);

443489

break;