/ plugins / google_meet / node / __init__.py
__init__.py
 1  """Remote 'node host' primitive for the google_meet plugin.
 2  
 3  Lets the Meet bot (Playwright + Chrome) run on a different machine than
 4  the hermes-agent gateway. The gateway speaks a small JSON-over-WebSocket
 5  RPC protocol to the remote node; the node wraps the existing
 6  ``plugins.google_meet.process_manager`` API.
 7  
 8  Topology
 9  --------
10      gateway (Linux)  ── ws://mac.local:18789 ──▶  node server (Mac)
11                                                    └─ process_manager
12                                                       └─ meet_bot (Playwright)
13  
14  Why: Google sign-in + Chrome profile live on the user's laptop. Running
15  the bot there reuses that profile without shipping credentials to the
16  server.
17  
18  Public surface
19  --------------
20      NodeClient     — gateway-side RPC client (short-lived sync WS per call)
21      NodeServer     — long-running server that hosts the bot
22      NodeRegistry   — local JSON registry of approved nodes (name → url+token)
23      protocol       — message envelope helpers (make_request, encode, decode, ...)
24  """
25  
26  from __future__ import annotations
27  
28  from plugins.google_meet.node import protocol
29  from plugins.google_meet.node.client import NodeClient
30  from plugins.google_meet.node.protocol import (
31      VALID_REQUEST_TYPES,
32      decode,
33      encode,
34      make_error,
35      make_request,
36      make_response,
37      validate_request,
38  )
39  from plugins.google_meet.node.registry import NodeRegistry
40  from plugins.google_meet.node.server import NodeServer
41  
42  __all__ = [
43      "NodeClient",
44      "NodeServer",
45      "NodeRegistry",
46      "protocol",
47      "make_request",
48      "make_response",
49      "make_error",
50      "encode",
51      "decode",
52      "validate_request",
53      "VALID_REQUEST_TYPES",
54  ]