caelum0x 32d8482958 feat(watch): ship Railyard Watch's box 1 checks agent (stacks/gatus-customers)
apps/console/README.md and lib/watch/types.ts already documented
WATCH_AGENT_TOKEN and RAILYARD_WATCH_LIVE as if stacks/gatus-customers/agent.sh
existed. It did not -- the console side (agentChecks/recordResults, the
/api/v1/watch/agent/* routes) had nothing on the other end to call it, so
Watch could never actually turn on.

Adds the real box 1 stack: a Gatus probe engine (docker-compose.yml,
config.yaml) plus agent.sh, the bridge that pulls the console's check list,
regenerates Gatus's config, reads Gatus's own results, and pushes them back
-- stateless by design since the console already dedupes by last_checked_at.
Plus agent.env.sample, a systemd unit and install.sh (same shape as
tools/reconcile-relay-rago).

Verified against real components: a real ghcr.io/twin/gatus:stable container
and a scratch server wiring the exact shipped lib/watch/http.ts handlers to
a MemoryWatchStore, exercised end to end over two passes against a real
https://example.com check -- which caught and fixed two real bugs (Gatus
refuses to start with zero endpoints; the generated config's timestamp was
forcing a gatus restart on every single pass). Container, volume and image
removed afterward; apps/console's existing 167 tests and 3 bundle tests
pass unchanged (this item touched no console source file).
2026-10-24 01:12:45 +03:00
..