Expand description
Single-instance daemon for sharing a hyperd process across MCP clients.
Modules§
- discovery
- Discovery file management for the single-instance daemon.
- health
- TCP health listener for the daemon.
- run
- Daemon main loop: spawns
hyperd, runs health listener, monitors hyperd liveness and optional idle timeout, restarts hyperd if it dies. - spawn
- Spawn the daemon as a detached background process.
Constants§
- DAEMON_
PORT_ SCAN_ SPAN - Number of ports to scan starting from the base port when discovering or spawning a daemon. Used by the later port-scanning stage (not yet implemented).
- DEFAULT_
DAEMON_ BASE_ PORT - Default base TCP port for the daemon health listener. When no env var is set,
the daemon scans
[base, base + DAEMON_PORT_SCAN_SPAN)to find a free port. Previously 7484; changed to 7485 to avoid collision with hyperd’s default gRPC port. - DEFAULT_
IDLE_ TIMEOUT_ SECS - Suggested idle timeout value (30 minutes) for use with the
--idle-timeoutflag orHYPERDB_DAEMON_IDLE_TIMEOUTenv var. By default (when neither is set), the daemon never auto-shuts down due to inactivity. - ENV_
DAEMON_ PORT - Environment variable to override the daemon port.
- ENV_
IDLE_ TIMEOUT - Environment variable to override the idle timeout (seconds).