__init__.py
__init__.pyBrowse 18 files
674 tokens
2,822 bytes
Token encoding: o200k_base
Snapshot 24fd22b
← Back to SKILL.md
1"""google_meet plugin — let the agent join a Meet call, transcribe it, follow up.2 3Headless Chromium (Playwright) joins the URL, enables live captions and scrapes them into a4transcript. Realtime mode adds agent speech (OpenAI Realtime + virtual audio device); remote5nodes run the bot on another machine. Explicit-by-design: only joins ``https://meet.google.com/``6URLs passed in — no calendar scanning, auto-dial or consent announcement.7"""8 9from __future__ import annotations10 11import logging12import platform13 14from plugins.google_meet import process_manager as pm15from plugins.google_meet.cli import meet_command as _meet_command, register_cli as _register_meet_cli16from plugins.google_meet.tools import (17 MEET_JOIN_SCHEMA, MEET_LEAVE_SCHEMA, MEET_SAY_SCHEMA, MEET_STATUS_SCHEMA, MEET_TRANSCRIPT_SCHEMA,18 check_meet_requirements, handle_meet_join, handle_meet_leave, handle_meet_say, handle_meet_status,19 handle_meet_transcript)20 21logger = logging.getLogger(__name__)22 23 24_TOOLS = (25 ("meet_join", MEET_JOIN_SCHEMA, handle_meet_join, "📞"),26 ("meet_status", MEET_STATUS_SCHEMA, handle_meet_status, "🟢"),27 ("meet_transcript", MEET_TRANSCRIPT_SCHEMA, handle_meet_transcript, "📝"),28 ("meet_leave", MEET_LEAVE_SCHEMA, handle_meet_leave, "👋"),29 ("meet_say", MEET_SAY_SCHEMA, handle_meet_say, "🗣️"))30 31 32def _on_session_end(**kwargs) -> None:33 """Leave a still-running call so we don't orphan a headless Chromium (never raises)."""34 try:35 status = pm.status()36 if status.get("ok") and status.get("alive"):37 pm.stop(reason="session ended")38 except Exception as e: # pragma: no cover — defensive39 logger.debug("google_meet on_session_end cleanup failed: %s", e)40 41 42def register(ctx) -> None:43 """Register tools, CLI, and lifecycle hooks (called once by the plugin loader)."""44 # Windows: no tested audio-routing path and flaky guest-join Chromium — refuse rather than half-work.45 system = platform.system().lower()46 if system not in {"linux", "darwin"}:47 logger.info("google_meet plugin: platform=%s not supported (linux/macos only)", system)48 return49 for name, schema, handler, emoji in _TOOLS:50 ctx.register_tool(name=name, toolset="google_meet", schema=schema, handler=handler,51 check_fn=check_meet_requirements, emoji=emoji)52 ctx.register_cli_command(53 name="meet", help="Google Meet bot (join, transcribe, follow up)",54 setup_fn=_register_meet_cli, handler_fn=_meet_command,55 description=("Let the hermes agent join a Google Meet call and scrape live "56 "captions into a transcript. See: hermes meet setup"))57 ctx.register_hook("on_session_end", _on_session_end)58