fix(google-meet): require voice call setup entry

This commit is contained in:
Vincent Koc
2026-05-03 20:28:06 -07:00
parent 484195d14e
commit fe107d5256
3 changed files with 38 additions and 1 deletions

View File

@@ -1868,6 +1868,41 @@ describe("google-meet plugin", () => {
);
});
it("reports missing voice-call plugin entry for explicit Twilio transport", async () => {
vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");
vi.stubEnv("TWILIO_FROM_NUMBER", "+15550001234");
const { tools } = setup(
{ defaultTransport: "chrome" },
{
fullConfig: {
plugins: {
allow: ["google-meet", "voice-call"],
entries: {},
},
},
},
);
const tool = tools[0] as {
execute: (
id: string,
params: unknown,
) => Promise<{ details: { ok?: boolean; checks?: unknown[] } }>;
};
const result = await tool.execute("id", { action: "setup_status", transport: "twilio" });
expect(result.details.ok).toBe(false);
expect(result.details.checks).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: "twilio-voice-call-plugin",
ok: false,
}),
]),
);
});
it("reports missing Twilio dial plan for explicit Twilio setup", async () => {
vi.stubEnv("TWILIO_ACCOUNT_SID", "AC123");
vi.stubEnv("TWILIO_AUTH_TOKEN", "secret");

View File

@@ -225,7 +225,8 @@ export function getGoogleMeetSetupStatus(
Object.hasOwn(pluginEntries, "voice-call"));
if (shouldCheckTwilioDelegation) {
const voiceCallAllowed = !Array.isArray(pluginAllow) || pluginAllow.includes("voice-call");
const voiceCallEnabled = voiceCallEntry.enabled !== false;
const hasVoiceCallEntry = Object.hasOwn(pluginEntries, "voice-call");
const voiceCallEnabled = hasVoiceCallEntry && voiceCallEntry.enabled !== false;
checks.push({
id: "twilio-voice-call-plugin",
ok: voiceCallAllowed && voiceCallEnabled,