























11/**
22 * Tests agent harness runtime helpers and task dispatch behavior.
33 */
4-import { describe, expect, it } from "vitest";
4+import { beforeEach, describe, expect, it, vi } from "vitest";
55import {
66classifyAgentHarnessTerminalOutcome,
77type AgentHarnessTerminalOutcomeClassification,
88} from "./agent-harness-runtime.js";
9910+const { loadResearchAutocapture } = vi.hoisted(() => ({
11+loadResearchAutocapture: vi.fn(),
12+}));
13+14+vi.mock("../skills/research/autocapture.js", () => {
15+loadResearchAutocapture();
16+return {
17+runSkillResearchAutoCapture: vi.fn(),
18+};
19+});
20+1021describe("classifyAgentHarnessTerminalOutcome", () => {
1122it("does not classify an in-flight turn", () => {
1223expect(
@@ -129,3 +140,15 @@ describe("classifyAgentHarnessTerminalOutcome", () => {
129140expect(classification).toBe("empty");
130141});
131142});
143+144+describe("agent harness runtime SDK facade", () => {
145+beforeEach(() => {
146+loadResearchAutocapture.mockClear();
147+});
148+149+it("does not load research autocapture when the SDK facade is imported", async () => {
150+await import("./agent-harness-runtime.js");
151+152+expect(loadResearchAutocapture).not.toHaveBeenCalled();
153+});
154+});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。