How trycua/hermes-cua-spaces works
Hermes on Cua Spaces is a terminal-environment plugin that runs Hermes commands inside isolated Cua machines. The main flow is Hermes asking the registered provider for an environment; settings and the Cua client determine which Space to use, and that environment runs terminal work remotely and cleans up created Spaces. Additional branches support streamed desktop/browser tools, optional Linux desktop setup, and Windows command and file-tool compatibility. The sampled excerpts show the core calls; some secondary wiring is supported only by the README and source index.
Main entry points: environment.py Terminal environment · client.py Spaces client · __init__.py Provider registration · desktop.py Desktop stack setup
Components 14
Hermes plugin
- Provider registration
hermes_cua_spaces/__init__.py - Settings
hermes_cua_spaces/config.py - Terminal environment
hermes_cua_spaces/environment.py - Error mapping
hermes_cua_spaces/errors.py
Space lifecycle
- Spaces client
hermes_cua_spaces/client.py - Async loop bridge
hermes_cua_spaces/_loop.py - Cua SDK
- Cua Space
Remote tools
- Desktop stack setup
hermes_cua_spaces/desktop.py - Tool stream bridge
hermes_cua_spaces/streams.py
Platform support
- Windows command adapter
hermes_cua_spaces/windows.py - Windows prerequisites
hermes_cua_spaces/windows_setup.py
Other components
- Hermes Agent
- Desktop and browser tools
Connections 18
- Hermes Agent → Provider registration: requests backend
README.md - Provider registration → Terminal environment: creates environment
hermes_cua_spaces/__init__.py - Provider registration → Settings: loads settings
hermes_cua_spaces/__init__.py - Terminal environment → Spaces client: uses Space client
hermes_cua_spaces/environment.py - Terminal environment → Settings: uses settings
hermes_cua_spaces/environment.py - Spaces client → Async loop bridge: runs SDK calls
hermes_cua_spaces/client.py - Spaces client → Cua SDK: creates and controls
hermes_cua_spaces/client.py - Spaces client → Cua Space: returns handle
hermes_cua_spaces/client.py - Terminal environment → Cua Space: runs remote work
README.md - Spaces client → Error mapping: maps SDK errors
hermes_cua_spaces/client.py - Terminal environment → Error mapping: reports Space errors
hermes_cua_spaces/environment.py - Terminal environment → Desktop stack setup: ensures Linux stack
hermes_cua_spaces/environment.py - Desktop stack setup → Cua Space: checks and installs
hermes_cua_spaces/desktop.py - Desktop and browser tools → Tool stream bridge: requests Space streams
README.md - Tool stream bridge → Cua Space: opens tool stream
hermes_cua_spaces/streams.py - Terminal environment → Windows command adapter: adapts Windows commands
hermes_cua_spaces/environment.py - Terminal environment → Windows prerequisites: installs prerequisites
hermes_cua_spaces/environment.py - Windows prerequisites → Cua Space: installs Git and Python
hermes_cua_spaces/windows_setup.py