hotplexd is the main entry point for the HotPlex daemon. It initializes the HotPlex engine, starts the HTTP servers, and manages the overall lifecycle of the agent runtime.
Files
main.go: Contains the main function and the runDaemon logic. It handles flag parsing, environment loading, and server orchestration.
main_test.go: Unit tests for the daemon startup and management logic.
Daemon Responsibilities
Environment Loading: Loads configuration from .env files and environment variables.
Configuration Management: Resolves and loads the server configuration YAML.
Engine Initialization: Sets up the HotPlex Engine with the designated provider (e.g., Claude Code).
HTTP Server Setup:
Main Server: Handles WebSocket connections for agents and OpenCode compatibility APIs.
Admin Server: Provides internal management APIs on a separate port.
Observability: Registers health checks and metrics endpoints.
ChatApps Integration: Optionally initializes adapters for platforms like Slack or Feishu.