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

推荐订阅源

G
Google Developers Blog
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
A
About on SuperTechFans
量子位
Engineering at Meta
Engineering at Meta
B
Blog
The Cloudflare Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
J
Java Code Geeks
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
T
Tailwind CSS Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
V2EX
Stack Overflow Blog
Stack Overflow Blog
C
Check Point 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
chore(lint): enable no-misused-promises · openclaw/opencl...
steipete · 2026-06-01 · via Recent Commits to openclaw:main

@@ -54,9 +54,14 @@ const { testing, runCodexAppServerSideQuestion } = await import("./side-question

5454

type ServerRequest = Required<Pick<RpcRequest, "id" | "method">> & {

5555

params?: RpcRequest["params"];

5656

};

57+

type ClientRequest = (

58+

method: string,

59+

requestParams?: unknown,

60+

options?: unknown,

61+

) => Promise<unknown>;

57625863

type FakeClient = {

59-

request: ReturnType<typeof vi.fn>;

64+

request: ReturnType<typeof vi.fn<ClientRequest>>;

6065

addNotificationHandler: ReturnType<typeof vi.fn>;

6166

addRequestHandler: ReturnType<typeof vi.fn>;

6267

notifications: Array<(notification: CodexServerNotification) => void>;

@@ -71,7 +76,7 @@ function createFakeClient(): FakeClient {

7176

const client: FakeClient = {

7277

notifications,

7378

requests,

74-

request: vi.fn(),

79+

request: vi.fn<ClientRequest>(),

7580

addNotificationHandler: vi.fn((handler: (notification: CodexServerNotification) => void) => {

7681

notifications.push(handler);

7782

return () => {

@@ -625,19 +630,21 @@ describe("runCodexAppServerSideQuestion", () => {

625630

return {};

626631

}

627632

if (method === "turn/start") {

628-

setTimeout(async () => {

629-

approvalResponse = await client.handleRequest({

630-

id: 42,

631-

method: "item/commandExecution/requestApproval",

632-

params: {

633-

threadId: "side-thread",

634-

turnId: "turn-1",

635-

itemId: "cmd-side",

636-

command: "/bin/bash -lc 'node -v'",

637-

cwd: "/tmp/workspace",

638-

},

639-

});

640-

client.emit(turnCompleted("side-thread", "turn-1", "Side answer."));

633+

setTimeout(() => {

634+

void (async () => {

635+

approvalResponse = await client.handleRequest({

636+

id: 42,

637+

method: "item/commandExecution/requestApproval",

638+

params: {

639+

threadId: "side-thread",

640+

turnId: "turn-1",

641+

itemId: "cmd-side",

642+

command: "/bin/bash -lc 'node -v'",

643+

cwd: "/tmp/workspace",

644+

},

645+

});

646+

client.emit(turnCompleted("side-thread", "turn-1", "Side answer."));

647+

})();

641648

}, 0);

642649

return turnStartResult("turn-1");

643650

}

@@ -913,20 +920,22 @@ describe("runCodexAppServerSideQuestion", () => {

913920

return {};

914921

}

915922

if (method === "turn/start") {

916-

setTimeout(async () => {

917-

toolResponse = await client.handleRequest({

918-

id: 42,

919-

method: "item/tool/call",

920-

params: {

921-

threadId: "side-thread",

922-

turnId: "turn-1",

923-

callId: "tool-1",

924-

tool: "wiki_status",

925-

arguments: { topic: "AGENTS.md" },

926-

},

927-

});

928-

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

929-

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

923+

setTimeout(() => {

924+

void (async () => {

925+

toolResponse = await client.handleRequest({

926+

id: 42,

927+

method: "item/tool/call",

928+

params: {

929+

threadId: "side-thread",

930+

turnId: "turn-1",

931+

callId: "tool-1",

932+

tool: "wiki_status",

933+

arguments: { topic: "AGENTS.md" },

934+

},

935+

});

936+

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

937+

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

938+

})();

930939

}, 0);

931940

return turnStartResult("turn-1");

932941

}

@@ -966,20 +975,22 @@ describe("runCodexAppServerSideQuestion", () => {

966975

return {};

967976

}

968977

if (method === "turn/start") {

969-

setTimeout(async () => {

970-

await client.handleRequest({

971-

id: 42,

972-

method: "item/tool/call",

973-

params: {

974-

threadId: "side-thread",

975-

turnId: "turn-1",

976-

callId: "tool-1",

977-

tool: "wiki_status",

978-

arguments: { topic: "AGENTS.md" },

979-

},

980-

});

981-

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

982-

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

978+

setTimeout(() => {

979+

void (async () => {

980+

await client.handleRequest({

981+

id: 42,

982+

method: "item/tool/call",

983+

params: {

984+

threadId: "side-thread",

985+

turnId: "turn-1",

986+

callId: "tool-1",

987+

tool: "wiki_status",

988+

arguments: { topic: "AGENTS.md" },

989+

},

990+

});

991+

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

992+

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

993+

})();

983994

}, 0);

984995

return turnStartResult("turn-1");

985996

}

@@ -1045,20 +1056,22 @@ describe("runCodexAppServerSideQuestion", () => {

10451056

return {};

10461057

}

10471058

if (method === "turn/start") {

1048-

setTimeout(async () => {

1049-

await client.handleRequest({

1050-

id: 42,

1051-

method: "item/tool/call",

1052-

params: {

1053-

threadId: "side-thread",

1054-

turnId: "turn-1",

1055-

callId: "tool-1",

1056-

tool: "wiki_status",

1057-

arguments: { topic: "AGENTS.md" },

1058-

},

1059-

});

1060-

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

1061-

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

1059+

setTimeout(() => {

1060+

void (async () => {

1061+

await client.handleRequest({

1062+

id: 42,

1063+

method: "item/tool/call",

1064+

params: {

1065+

threadId: "side-thread",

1066+

turnId: "turn-1",

1067+

callId: "tool-1",

1068+

tool: "wiki_status",

1069+

arguments: { topic: "AGENTS.md" },

1070+

},

1071+

});

1072+

client.emit(agentDelta("side-thread", "turn-1", "Tool answer."));

1073+

client.emit(turnCompleted("side-thread", "turn-1", "Tool answer."));

1074+

})();

10621075

}, 0);

10631076

return turnStartResult("turn-1");

10641077

}

@@ -1098,35 +1111,37 @@ describe("runCodexAppServerSideQuestion", () => {

10981111

return {};

10991112

}

11001113

if (method === "turn/start") {

1101-

setTimeout(async () => {

1102-

unrelatedUserInputResponse = await client.handleRequest({

1103-

id: 42,

1104-

method: "item/tool/requestUserInput",

1105-

params: {

1106-

threadId: "parent-thread",

1107-

turnId: "parent-turn",

1108-

itemId: "input-parent",

1109-

questions: [],

1110-

},

1111-

});

1112-

userInputResponse = await client.handleRequest({

1113-

id: 43,

1114-

method: "item/tool/requestUserInput",

1115-

params: {

1116-

threadId: "side-thread",

1117-

turnId: "turn-1",

1118-

itemId: "input-1",

1119-

questions: [

1120-

{

1121-

id: "choice",

1122-

header: "Choice",

1123-

question: "Pick one",

1124-

options: [{ label: "A", description: "" }],

1125-

},

1126-

],

1127-

},

1128-

});

1129-

client.emit(turnCompleted("side-thread", "turn-1", "No input needed."));

1114+

setTimeout(() => {

1115+

void (async () => {

1116+

unrelatedUserInputResponse = await client.handleRequest({

1117+

id: 42,

1118+

method: "item/tool/requestUserInput",

1119+

params: {

1120+

threadId: "parent-thread",

1121+

turnId: "parent-turn",

1122+

itemId: "input-parent",

1123+

questions: [],

1124+

},

1125+

});

1126+

userInputResponse = await client.handleRequest({

1127+

id: 43,

1128+

method: "item/tool/requestUserInput",

1129+

params: {

1130+

threadId: "side-thread",

1131+

turnId: "turn-1",

1132+

itemId: "input-1",

1133+

questions: [

1134+

{

1135+

id: "choice",

1136+

header: "Choice",

1137+

question: "Pick one",

1138+

options: [{ label: "A", description: "" }],

1139+

},

1140+

],

1141+

},

1142+

});

1143+

client.emit(turnCompleted("side-thread", "turn-1", "No input needed."));

1144+

})();

11301145

}, 0);

11311146

return turnStartResult("turn-1");

11321147

}