
























@@ -1,4 +1,5 @@
11import { beforeEach, describe, expect, it, vi } from "vitest";
2+import type { CallGatewayOptions } from "../gateway/call.js";
23import { SUBAGENT_ENDED_REASON_COMPLETE } from "./subagent-lifecycle-events.js";
34import { createSubagentRegistryLifecycleController } from "./subagent-registry-lifecycle.js";
45import type { SubagentRunRecord } from "./subagent-registry.types.js";
@@ -121,7 +122,9 @@ function createLifecycleController({
121122emitSubagentEndedHookForRun: vi.fn(async () => {}),
122123notifyContextEngineSubagentEnded: vi.fn(async () => {}),
123124resumeSubagentRun: vi.fn(),
124-callGateway: gatewayMocks.callGateway,
125+callGateway: gatewayMocks.callGateway as <T = Record<string, unknown>>(
126+opts: CallGatewayOptions,
127+) => Promise<T>,
125128captureSubagentCompletionReply: vi.fn(async () => "final completion reply"),
126129runSubagentAnnounceFlow: vi.fn(async () => true),
127130warn: vi.fn(),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。