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

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
Jina AI
Jina AI
B
Blog
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
腾讯CDC
C
Check Point Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
罗磊的独立博客
B
Blog RSS Feed
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
M
MIT News - Artificial intelligence
GbyAI
GbyAI

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: dedupe google meet mock calls · openclaw/openclaw@0...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -156,6 +156,29 @@ function requireRecord(value: unknown, label: string): Record<string, unknown> {

156156

return value;

157157

}

158158159+

function mockCall(mock: { mock: { calls: unknown[][] } }, callIndex = 0): unknown[] {

160+

const call = mock.mock.calls.at(callIndex);

161+

if (!call) {

162+

throw new Error(`Expected mock call at index ${callIndex}`);

163+

}

164+

return call;

165+

}

166+167+

function mockCallArg(mock: { mock: { calls: unknown[][] } }, argIndex: number, callIndex = 0) {

168+

return mockCall(mock, callIndex)[argIndex];

169+

}

170+171+

function expectRespondedOk(respond: { mock: { calls: unknown[][] } }): void {

172+

expect(mockCallArg(respond, 0)).toBe(true);

173+

}

174+175+

function requireRespondPayload(

176+

respond: { mock: { calls: unknown[][] } },

177+

label: string,

178+

): Record<string, unknown> {

179+

return requireRecord(mockCallArg(respond, 1), label);

180+

}

181+159182

function requireSetupCheck(checks: unknown[] | undefined, id: string): Record<string, unknown> {

160183

const check = checks

161184

?.map((item) => requireRecord(item, "setup check"))

@@ -1395,7 +1418,7 @@ describe("google-meet plugin", () => {

1395141813961419

await tool.execute("id", { action: "leave", sessionId: joined.details.session.id });

139714201398-

const [endParams] = voiceCallMocks.endMeetVoiceCallGatewayCall.mock.calls.at(0) as unknown as [

1421+

const [endParams] = mockCall(voiceCallMocks.endMeetVoiceCallGatewayCall) as [

13991422

Record<string, unknown>,

14001423

];

14011424

expect(requireRecord(endParams.config, "voice-call end config").defaultTransport).toBe(

@@ -2173,7 +2196,7 @@ describe("google-meet plugin", () => {

21732196

respond,

21742197

});

217521982176-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

2199+

expectRespondedOk(respond);

21772200

expect(runCommandWithTimeout).not.toHaveBeenCalled();

21782201

const openCall = callGatewayFromCli.mock.calls.find(

21792202

([, , request]) => requireRecord(request, "browser request").path === "/tabs/open",

@@ -2194,7 +2217,7 @@ describe("google-meet plugin", () => {

21942217

([, , request]) => (request as { path?: string }).path === "/permissions/grant",

21952218

),

21962219

).toBe(false);

2197-

const payload = requireRecord(respond.mock.calls.at(0)?.[1], "join response payload");

2220+

const payload = requireRespondPayload(respond, "join response payload");

21982221

const session = requireRecord(payload.session, "join session");

21992222

const chrome = requireRecord(session.chrome, "join chrome session");

22002223

const health = requireRecord(chrome.health, "join chrome health");

@@ -2253,7 +2276,7 @@ describe("google-meet plugin", () => {

22532276

respond,

22542277

});

225522782256-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

2279+

expectRespondedOk(respond);

22572280

const grantCall = callGatewayFromCli.mock.calls.find(

22582281

([, , request]) => requireRecord(request, "browser request").path === "/permissions/grant",

22592282

);

@@ -2349,7 +2372,7 @@ describe("google-meet plugin", () => {

23492372

respond,

23502373

});

235123742352-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

2375+

expectRespondedOk(respond);

23532376

expect(events.indexOf("browser:/act")).toBeGreaterThan(-1);

23542377

expect(events.indexOf("command:bridge start")).toBeGreaterThan(

23552378

events.indexOf("browser:/act"),

@@ -2435,7 +2458,7 @@ describe("google-meet plugin", () => {

24352458

respond,

24362459

});

243724602438-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

2461+

expectRespondedOk(respond);

24392462

expect(events).toContain("browser:/act");

24402463

expect(events).not.toContain("command:bridge start");

24412464

} finally {

@@ -2874,7 +2897,7 @@ describe("google-meet plugin", () => {

28742897

respond,

28752898

});

287628992877-

const payload = requireRecord(respond.mock.calls.at(0)?.[1], "join response payload");

2900+

const payload = requireRespondPayload(respond, "join response payload");

28782901

expect(payload.spoken).toBe(false);

28792902

const session = requireRecord(payload.session, "join session");

28802903

const chrome = requireRecord(session.chrome, "join chrome session");

@@ -2923,7 +2946,7 @@ describe("google-meet plugin", () => {

29232946

await vi.advanceTimersByTimeAsync(2_000);

29242947

await run;

292529482926-

const payload = requireRecord(respond.mock.calls.at(0)?.[1], "join response payload");

2949+

const payload = requireRespondPayload(respond, "join response payload");

29272950

expect(payload.spoken).toBe(false);

29282951

const session = requireRecord(payload.session, "join session");

29292952

const chrome = requireRecord(session.chrome, "join chrome session");

@@ -2962,8 +2985,8 @@ describe("google-meet plugin", () => {

29622985

respond,

29632986

});

296429872965-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

2966-

expect(nodesList.mock.calls.at(0)).toStrictEqual([]);

2988+

expectRespondedOk(respond);

2989+

expect(mockCall(nodesList)).toStrictEqual([]);

29672990

const stopCall = nodesInvoke.mock.calls.find(([rawCall]) => {

29682991

const call = requireRecord(rawCall, "node invoke");

29692992

const params = requireRecord(call.params, "node invoke params");

@@ -3018,7 +3041,7 @@ describe("google-meet plugin", () => {

30183041

expect(startParams.mode).toBe("transcribe");

30193042

expect(startParams.launch).toBe(false);

30203043

expect(startParams.joinTimeoutMs).toBe(30000);

3021-

const payload = requireRecord(respond.mock.calls.at(0)?.[1], "join response payload");

3044+

const payload = requireRespondPayload(respond, "join response payload");

30223045

const session = requireRecord(payload.session, "join session");

30233046

expect(session.transport).toBe("chrome-node");

30243047

const chrome = requireRecord(session.chrome, "join chrome session");

@@ -3062,7 +3085,7 @@ describe("google-meet plugin", () => {

30623085

expect(

30633086

nodesInvoke.mock.calls.filter(([call]) => call.command === "googlemeet.chrome"),

30643087

).toHaveLength(2);

3065-

const payload = requireRecord(second.mock.calls.at(0)?.[1], "second join response payload");

3088+

const payload = requireRespondPayload(second, "second join response payload");

30663089

const session = requireRecord(payload.session, "second join session");

30673090

const chrome = requireRecord(session.chrome, "second join chrome session");

30683091

const health = requireRecord(chrome.health, "second join chrome health");

@@ -3107,7 +3130,7 @@ describe("google-meet plugin", () => {

31073130

expect(

31083131

nodesInvoke.mock.calls.filter(([call]) => call.command === "googlemeet.chrome"),

31093132

).toHaveLength(2);

3110-

const payload = requireRecord(second.mock.calls.at(0)?.[1], "second join response payload");

3133+

const payload = requireRespondPayload(second, "second join response payload");

31113134

const session = requireRecord(payload.session, "second join session");

31123135

expect(session.notes).toContain("Reused existing active Meet session.");

31133136

});

@@ -3476,7 +3499,7 @@ describe("google-meet plugin", () => {

34763499

params: { url: "https://meet.google.com/abc-defg-hij" },

34773500

respond: joinRespond,

34783501

});

3479-

const joinPayload = requireRecord(joinRespond.mock.calls.at(0)?.[1], "join response payload");

3502+

const joinPayload = requireRespondPayload(joinRespond, "join response payload");

34803503

const joinSession = requireRecord(joinPayload.session, "join session");

34813504

const joinChrome = requireRecord(joinSession.chrome, "join chrome session");

34823505

expect(requireRecord(joinChrome.health, "join chrome health").inCall).toBe(false);

@@ -3488,10 +3511,7 @@ describe("google-meet plugin", () => {

34883511

};

34893512

await status?.({ params: {}, respond: statusRespond });

349035133491-

const statusPayload = requireRecord(

3492-

statusRespond.mock.calls.at(0)?.[1],

3493-

"status response payload",

3494-

);

3514+

const statusPayload = requireRespondPayload(statusRespond, "status response payload");

34953515

const sessions = statusPayload.sessions as unknown[];

34963516

expect(sessions).toHaveLength(1);

34973517

const statusSession = requireRecord(sessions[0], "status session");

@@ -3595,7 +3615,7 @@ describe("google-meet plugin", () => {

35953615

});

3596361635973617

expect(join).toHaveBeenCalledTimes(1);

3598-

const joinArgs = requireRecord(join.mock.calls.at(0)?.[0], "test speech join args");

3618+

const joinArgs = requireRecord(mockCallArg(join, 0), "test speech join args");

35993619

expect(joinArgs.message).toBe("Say exactly: hello.");

36003620

expect(joinArgs.mode).toBe("agent");

36013621

expect(speak).not.toHaveBeenCalled();

@@ -3643,7 +3663,7 @@ describe("google-meet plugin", () => {

36433663

});

3644366436453665

expect(join).toHaveBeenCalledTimes(1);

3646-

const joinArgs = requireRecord(join.mock.calls.at(0)?.[0], "test speech join args");

3666+

const joinArgs = requireRecord(mockCallArg(join, 0), "test speech join args");

36473667

expect(joinArgs.message).toBe("Say exactly: hello.");

36483668

expect(joinArgs.mode).toBe("bidi");

36493669

});

@@ -3965,7 +3985,7 @@ describe("google-meet plugin", () => {

39653985

respond,

39663986

});

396739873968-

expect(respond.mock.calls.at(0)?.[0]).toBe(true);

3988+

expectRespondedOk(respond);

39693989

expect(runCommandWithTimeout).toHaveBeenNthCalledWith(2, ["bridge", "status"], {

39703990

timeoutMs: 30000,

39713991

});

@@ -4092,7 +4112,7 @@ describe("google-meet plugin", () => {

40924112

await vi.advanceTimersByTimeAsync(GOOGLE_MEET_AGENT_TRANSCRIPT_DEBOUNCE_MS);

4093411340944114

expect(sendAudio).toHaveBeenCalledTimes(1);

4095-

const audioChunk = sendAudio.mock.calls.at(0)?.[0];

4115+

const audioChunk = mockCallArg(sendAudio, 0) as Buffer;

40964116

expect(Buffer.isBuffer(audioChunk)).toBe(true);

40974117

expect(audioChunk.byteLength).toBeGreaterThan(0);

40984118

expect(runtime.agent.runEmbeddedPiAgent).toHaveBeenCalled();

@@ -4277,10 +4297,10 @@ describe("google-meet plugin", () => {

42774297

args: { question: "What should I say about launch timing?" },

42784298

});

42794299

expect(bridge.submitToolResult).toHaveBeenCalled();

4280-

const firstToolResultCall = bridge.submitToolResult.mock.calls.at(0);

4281-

expect(firstToolResultCall?.[0]).toBe("tool-call-1");

4282-

expect(firstToolResultCall?.[2]).toStrictEqual({ willContinue: true });

4283-

const progressPayload = requireRecord(firstToolResultCall?.[1], "tool progress payload");

4300+

const firstToolResultCall = mockCall(bridge.submitToolResult);

4301+

expect(firstToolResultCall[0]).toBe("tool-call-1");

4302+

expect(firstToolResultCall[2]).toStrictEqual({ willContinue: true });

4303+

const progressPayload = requireRecord(firstToolResultCall[1], "tool progress payload");

42844304

expect(progressPayload.status).toBe("working");

42854305

expect(progressPayload.tool).toBe("openclaw_agent_consult");

42864306

@@ -4362,7 +4382,7 @@ describe("google-meet plugin", () => {

43624382

}

43634383

expect(runtime.agent.runEmbeddedPiAgent).toHaveBeenCalledTimes(1);

43644384

const agentRequest = requireRecord(

4365-

runtime.agent.runEmbeddedPiAgent.mock.calls.at(0)?.[0],

4385+

mockCallArg(runtime.agent.runEmbeddedPiAgent, 0),

43664386

"embedded agent request",

43674387

);

43684388

expect(agentRequest.messageProvider).toBe("google-meet");

@@ -4495,7 +4515,7 @@ describe("google-meet plugin", () => {

44954515

"Are we still on track?\\nPlease include launch blockers.",

44964516

);

44974517

expect(sendUserMessage).toHaveBeenCalledTimes(1);

4498-

const sentUserMessage = sendUserMessage.mock.calls.at(0)?.[0];

4518+

const sentUserMessage = mockCallArg(sendUserMessage, 0) as string;

44994519

expect(typeof sentUserMessage).toBe("string");

45004520

expect(sentUserMessage).toContain(JSON.stringify("The launch is still on track."));

45014521

expect(sessionStore).toHaveProperty("agent:jay:subagent:google-meet:meet-1");

@@ -4767,10 +4787,10 @@ describe("google-meet plugin", () => {

47674787

args: { question: "What should I say?" },

47684788

});

47694789

expect(bridge.submitToolResult).toHaveBeenCalled();

4770-

const firstToolResultCall = bridge.submitToolResult.mock.calls.at(0);

4771-

expect(firstToolResultCall?.[0]).toBe("tool-call-1");

4772-

expect(firstToolResultCall?.[2]).toStrictEqual({ willContinue: true });

4773-

const progressPayload = requireRecord(firstToolResultCall?.[1], "node tool progress payload");

4790+

const firstToolResultCall = mockCall(bridge.submitToolResult);

4791+

expect(firstToolResultCall[0]).toBe("tool-call-1");

4792+

expect(firstToolResultCall[2]).toStrictEqual({ willContinue: true });

4793+

const progressPayload = requireRecord(firstToolResultCall[1], "node tool progress payload");

47744794

expect(progressPayload.status).toBe("working");

47754795

expect(progressPayload.tool).toBe("openclaw_agent_consult");

47764796