

























@@ -4,6 +4,7 @@ import { tmpdir } from "node:os";
44import path from "node:path";
55import { PassThrough, Writable } from "node:stream";
66import { createContext, Script } from "node:vm";
7+import { validateJsonSchemaValue, type JsonSchemaObject } from "openclaw/plugin-sdk/config-schema";
78import type { RealtimeTranscriptionProviderPlugin } from "openclaw/plugin-sdk/realtime-transcription";
89import type { RealtimeVoiceProviderPlugin } from "openclaw/plugin-sdk/realtime-voice";
910import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
@@ -479,17 +480,13 @@ describe("google-meet plugin", () => {
479480});
480481});
481482482-it("declares barge-in config metadata in the plugin entry and manifest", () => {
483+it("declares advanced config metadata in the plugin entry and manifest", () => {
483484const manifest = JSON.parse(
484485readFileSync(new URL("./openclaw.plugin.json", import.meta.url), "utf8"),
485486) as {
486487uiHints?: Record<string, unknown>;
487-configSchema?: {
488-properties?: {
489-chrome?: {
490-properties?: Record<string, unknown>;
491-};
492-};
488+configSchema?: JsonSchemaObject & {
489+properties?: Record<string, JsonSchemaObject & { properties?: Record<string, unknown> }>;
493490};
494491};
495492const entry = plugin as unknown as {
@@ -504,13 +501,15 @@ describe("google-meet plugin", () => {
504501"chrome.bargeInRmsThreshold": expect.objectContaining({ advanced: true }),
505502"chrome.bargeInPeakThreshold": expect.objectContaining({ advanced: true }),
506503"chrome.bargeInCooldownMs": expect.objectContaining({ advanced: true }),
504+"voiceCall.postDtmfSpeechDelayMs": expect.objectContaining({ advanced: true }),
507505});
508506expect(manifest.uiHints).toMatchObject({
509507"chrome.audioBufferBytes": expect.objectContaining({ advanced: true }),
510508"chrome.bargeInInputCommand": expect.objectContaining({ advanced: true }),
511509"chrome.bargeInRmsThreshold": expect.objectContaining({ advanced: true }),
512510"chrome.bargeInPeakThreshold": expect.objectContaining({ advanced: true }),
513511"chrome.bargeInCooldownMs": expect.objectContaining({ advanced: true }),
512+"voiceCall.postDtmfSpeechDelayMs": expect.objectContaining({ advanced: true }),
514513});
515514expect(manifest.configSchema?.properties?.chrome?.properties).toMatchObject({
516515audioBufferBytes: expect.objectContaining({ type: "number", default: 4096 }),
@@ -522,6 +521,19 @@ describe("google-meet plugin", () => {
522521bargeInPeakThreshold: expect.objectContaining({ type: "number", default: 2500 }),
523522bargeInCooldownMs: expect.objectContaining({ type: "number", default: 900 }),
524523});
524+expect(manifest.configSchema?.properties?.voiceCall?.properties).toMatchObject({
525+postDtmfSpeechDelayMs: expect.objectContaining({ type: "number", default: 5000 }),
526+});
527+const result = validateJsonSchemaValue({
528+schema: manifest.configSchema!,
529+cacheKey: "google-meet.manifest.voice-call-post-dtmf-speech-delay",
530+value: {
531+voiceCall: {
532+postDtmfSpeechDelayMs: 750,
533+},
534+},
535+});
536+expect(result.ok).toBe(true);
525537});
526538527539it("resolves the realtime consult agent id", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。