Skip to content

Commit 47449a7

Browse files
committed
test(gateway): provide direct agent runtime fixture
1 parent c19f245 commit 47449a7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/gateway/server-methods/agent.test-harness.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ vi.mock("../../commands/agent.js", () => ({
151151
agentCommandFromIngress: mocks.agentCommand,
152152
}));
153153

154+
vi.mock("../../agents/prepared-model-runtime.js", () => ({
155+
// Direct handler tests bypass Gateway startup, so provide the lifecycle fact
156+
// that production publishes before admitting agent RPCs.
157+
loadPublishedGatewayReplyDispatchRuntime: async ({ agentId }: { agentId: string }) => ({
158+
agentId,
159+
config: mocks.loadConfigReturn,
160+
pluginGeneration: { pluginMetadataSnapshot: {} },
161+
}),
162+
}));
163+
154164
vi.mock("../../acp/runtime/session-meta.js", async () => {
155165
const actual = await vi.importActual<typeof import("../../acp/runtime/session-meta.js")>(
156166
"../../acp/runtime/session-meta.js",

0 commit comments

Comments
 (0)