refactor(tasks): update plugin and acp task-flow consumers

This commit is contained in:
Vincent Koc
2026-04-02 20:36:40 +09:00
parent a7909d46d2
commit b6c3ecedd8
3 changed files with 43 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { getFlowById, resetFlowRegistryForTests } from "../../tasks/flow-registry.js";
import { getTaskFlowById, resetTaskFlowRegistryForTests } from "../../tasks/task-flow-registry.js";
import { getTaskById, resetTaskRegistryForTests } from "../../tasks/task-registry.js";
import { createRuntimeTaskFlow } from "./runtime-taskflow.js";
@@ -30,7 +30,7 @@ vi.mock("../../agents/subagent-control.js", () => ({
afterEach(() => {
resetTaskRegistryForTests();
resetFlowRegistryForTests({ persist: false });
resetTaskFlowRegistryForTests({ persist: false });
vi.clearAllMocks();
});
@@ -146,7 +146,7 @@ describe("runtime TaskFlow", () => {
parentFlowId: created.flowId,
ownerKey: "agent:main:main",
});
expect(getFlowById(created.flowId)).toMatchObject({
expect(getTaskFlowById(created.flowId)).toMatchObject({
flowId: created.flowId,
});
expect(ownerTaskFlow.getTaskSummary(created.flowId)).toMatchObject({