
























@@ -1087,26 +1087,22 @@ describe("CodexAppServerEventProjector", () => {
10871087mockCallArg(afterToolCall, 0, 0, "after_tool_call event"),
10881088"after_tool_call event",
10891089);
1090-expect(event).toMatchObject({
1091-toolName: "bash",
1092-params: { command: "pnpm test extensions/codex", cwd: "/workspace" },
1093-runId: "run-1",
1094-toolCallId: "cmd-observed",
1095-result: { status: "completed", exitCode: 0, durationMs: 42 },
1096-});
1090+expect(event.toolName).toBe("bash");
1091+expect(event.params).toEqual({ command: "pnpm test extensions/codex", cwd: "/workspace" });
1092+expect(event.runId).toBe("run-1");
1093+expect(event.toolCallId).toBe("cmd-observed");
1094+expect(event.result).toEqual({ status: "completed", exitCode: 0, durationMs: 42 });
10971095expect(event.durationMs).toBeGreaterThanOrEqual(42);
10981096const context = requireRecord(
10991097mockCallArg(afterToolCall, 0, 1, "after_tool_call context"),
11001098"after_tool_call context",
11011099);
1102-expect(context).toMatchObject({
1103-agentId: "main",
1104-sessionId: "session-1",
1105-sessionKey: "agent:main:session-1",
1106-runId: "run-1",
1107-toolName: "bash",
1108-toolCallId: "cmd-observed",
1109-});
1100+expect(context.agentId).toBe("main");
1101+expect(context.sessionId).toBe("session-1");
1102+expect(context.sessionKey).toBe("agent:main:session-1");
1103+expect(context.runId).toBe("run-1");
1104+expect(context.toolName).toBe("bash");
1105+expect(context.toolCallId).toBe("cmd-observed");
11101106});
1111110711121108it("does not duplicate native items already covered by PostToolUse relay", async () => {
@@ -1155,13 +1151,11 @@ describe("CodexAppServerEventProjector", () => {
11551151mockCallArg(afterToolCall, 0, 0, "after_tool_call event"),
11561152"after_tool_call event",
11571153);
1158-expect(event).toMatchObject({
1159-toolName: "web_search",
1160-params: { query: "native tool observability" },
1161-runId: "run-1",
1162-toolCallId: "search-observed",
1163-result: { status: "completed" },
1164-});
1154+expect(event.toolName).toBe("web_search");
1155+expect(event.params).toEqual({ query: "native tool observability" });
1156+expect(event.runId).toBe("run-1");
1157+expect(event.toolCallId).toBe("search-observed");
1158+expect(event.result).toEqual({ status: "completed" });
11651159});
1166116011671161it("records dynamic OpenClaw tool calls in mirrored transcript snapshots", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。