Skip to content

Commit 9d85943

Browse files
committed
test: cover voice call doctor session ids
1 parent b2dc70a commit 9d85943

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

src/plugins/doctor-contract-registry.load-paths.test.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import {
1010
clearPluginDoctorContractRegistryCache,
1111
listPluginDoctorLegacyConfigRules,
1212
listPluginDoctorSessionRouteStateOwners,
13+
listPluginDoctorSessionStoreAgentIds,
1314
} from "./doctor-contract-registry.js";
1415

1516
const tempDirs: string[] = [];
17+
const repoRoot = path.resolve(import.meta.dirname, "../..");
1618

1719
function makeTempDir(): string {
1820
const dir = fs.mkdtempSync(
@@ -306,4 +308,34 @@ describe("doctor contract registry load-path plugins", () => {
306308
},
307309
]);
308310
});
311+
312+
it("loads session-store agent IDs from the real Voice Call doctor contract", () => {
313+
const stateDir = makeTempDir();
314+
const pluginRoot = path.join(repoRoot, "extensions", "voice-call");
315+
const config = {
316+
plugins: {
317+
load: { paths: [pluginRoot] },
318+
entries: {
319+
"voice-call": {
320+
enabled: true,
321+
config: {
322+
agentId: "Voice",
323+
numbers: {
324+
"+15550001111": { agentId: "Cards" },
325+
"+15550002222": {},
326+
},
327+
},
328+
},
329+
},
330+
},
331+
} as OpenClawConfig;
332+
333+
expect(
334+
listPluginDoctorSessionStoreAgentIds({
335+
config,
336+
env: makeHermeticDoctorEnv(stateDir),
337+
pluginIds: ["voice-call"],
338+
}),
339+
).toEqual(["cards", "voice"]);
340+
});
309341
});

0 commit comments

Comments
 (0)