




















@@ -345,12 +345,17 @@ function shouldJoinCreatedMeet(raw: Record<string, unknown>): boolean {
345345346346const googleMeetToolDeps = {
347347 callGatewayFromCli,
348+platform: () => process.platform,
348349};
349350350351export const __testing = {
351352setCallGatewayFromCliForTests(next?: typeof callGatewayFromCli): void {
352353googleMeetToolDeps.callGatewayFromCli = next ?? callGatewayFromCli;
353354},
355+setPlatformForTests(next?: () => NodeJS.Platform): void {
356+googleMeetToolDeps.platform = next ?? (() => process.platform);
357+},
358+ isGoogleMeetAgentToolActionUnsupportedOnHost,
354359};
355360356361type GoogleMeetGatewayToolAction =
@@ -382,6 +387,43 @@ function googleMeetGatewayMethodForToolAction(action: GoogleMeetGatewayToolActio
382387}
383388}
384389390+function isGoogleMeetAgentToolActionUnsupportedOnHost(params: {
391+config: GoogleMeetConfig;
392+raw: Record<string, unknown>;
393+platform?: NodeJS.Platform;
394+}): boolean {
395+const platform = params.platform ?? googleMeetToolDeps.platform();
396+if (platform === "darwin") {
397+return false;
398+}
399+const action = params.raw.action;
400+if (
401+action !== "join" &&
402+action !== "test_speech" &&
403+!(action === "create" && shouldJoinCreatedMeet(params.raw))
404+) {
405+return false;
406+}
407+const transport = normalizeTransport(params.raw.transport) ?? params.config.defaultTransport;
408+const mode =
409+action === "test_speech"
410+ ? "realtime"
411+ : (normalizeMode(params.raw.mode) ?? params.config.defaultMode);
412+return transport === "chrome" && mode === "realtime";
413+}
414+415+function assertGoogleMeetAgentToolActionSupported(params: {
416+config: GoogleMeetConfig;
417+raw: Record<string, unknown>;
418+}): void {
419+if (!isGoogleMeetAgentToolActionUnsupportedOnHost(params)) {
420+return;
421+}
422+throw new Error(
423+"Google Meet local Chrome realtime audio is macOS-only. On this host, use mode: transcribe, transport: twilio, or transport: chrome-node backed by a macOS node.",
424+);
425+}
426+385427function resolveGoogleMeetToolGatewayTimeoutMs(config: GoogleMeetConfig): number {
386428return Math.max(
38742960_000,
@@ -944,11 +986,12 @@ export default definePluginEntry({
944986name: "google_meet",
945987label: "Google Meet",
946988description:
947-"Join and track Google Meet sessions through Chrome or Twilio. Call setup_status before join/create/test_listen/test_speech; if it reports a Chrome node offline or local audio missing, surface that blocker instead of retrying or switching transports. Offline nodes are diagnostics only, not usable candidates. If a Meet tab is already open after a timeout, call recover_current_tab before retrying join to report login, permission, or admission blockers without opening another tab.",
989+"Join and track Google Meet sessions through Chrome or Twilio. Call setup_status before join/create/test_listen/test_speech; if it reports a Chrome node offline or local audio missing, surface that blocker instead of retrying or switching transports. Offline nodes are diagnostics only, not usable candidates. If local Chrome realtime audio is unsupported on this OS, use mode=transcribe, transport=twilio, or a macOS chrome-node for realtime Chrome. If a Meet tab is already open after a timeout, call recover_current_tab before retrying join to report login, permission, or admission blockers without opening another tab.",
948990parameters: GoogleMeetToolSchema,
949991async execute(_toolCallId, params) {
950992const raw = asParamRecord(params);
951993try {
994+assertGoogleMeetAgentToolActionSupported({ config, raw });
952995switch (raw.action) {
953996case "join": {
954997return json(await callGoogleMeetGatewayFromTool({ config, action: "join", raw }));
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。