test(gateway): model ops as configured in voice-wake agent fixture

This commit is contained in:
Pick-cat
2026-06-27 23:27:21 +08:00
committed by Ayaan Zaidi
parent 60f30be526
commit 8cf599cb93
+4 -1
View File
@@ -5316,6 +5316,8 @@ describe("gateway agent handler", () => {
});
it("does not auto-route voice wake requests with another agent's explicit main session", async () => {
const opsAgentCfg = { agents: { list: [{ id: "main" }, { id: "ops" }] } };
mocks.listAgentIds.mockReturnValue(["main", "ops"]);
mocks.loadVoiceWakeRoutingConfig.mockResolvedValue({
version: 1,
defaultTarget: { sessionKey: "agent:main:voice" },
@@ -5325,7 +5327,7 @@ describe("gateway agent handler", () => {
mocks.resolveVoiceWakeRouteByTrigger.mockReturnValue({ sessionKey: "agent:main:voice" });
mocks.loadSessionEntry.mockImplementation((sessionKey: string) => ({
cfg: {},
cfg: opsAgentCfg,
storePath: "/tmp/sessions.json",
entry: {
sessionId: "voice-session-id",
@@ -5340,6 +5342,7 @@ describe("gateway agent handler", () => {
});
mocks.loadVoiceWakeRoutingConfig.mockClear();
mocks.resolveVoiceWakeRouteByTrigger.mockClear();
mocks.agentCommand.mockClear();
const respond = vi.fn();
await invokeAgent(