Surfaces
Gateway daemon
The gateway daemon runs Gray in the background: cron jobs, scheduled prompts and connections keep firing with no REPL window open.
Source: crates/gray/src/gateway
The gateway is a user service running gray gateway run: a 60-second cron ticker plus a control socket at $GRAY_HOME/gateway.sock. It is supervised by systemd --user, or runit on Void Linux. Messaging apps such as Discord install as plugins and appear in the /gateway connections panel.
gray gateway install # write the user service (--print previews it) gray gateway status # daemon, service and ticker health; exits 1 when down gray gateway restart # also: start, stop, uninstall
The daemon claims $GRAY_HOME/gateway.pid, records why it stopped in gateway.state.json, and drains an in-flight cron fire for up to 65 seconds on SIGTERM.