- services/control-bot: read-only Telegram/Discord bot (/status /regime /journal /verify /skills); dry-run default; never signs. - services/gateway: stdlib edge proxy (per-IP rate limit + CORS + GET cache) fronting the read-only API; --check offline-safe. - services/report-publisher: renders the python-lab HTML report bundle to a published dir. All stdlib, offline-safe, secrets via env only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Guardrail Edge Gateway (read-only)
A tiny standard-library reverse proxy that fronts the read-only Guardrail API for
public/dashboard access, adding in-memory rate limiting, permissive CORS,
and short-TTL response caching — without touching the Rust API. Only
GET/HEAD/OPTIONS are proxied; writes get 405.
Run
# validate config, no socket bind (offline-safe)
python3 services/gateway/gateway.py --check
# serve on :8088 in front of the API
python3 services/gateway/gateway.py --listen 8088 --upstream http://localhost:8080
Flags
| Flag | Default | Meaning |
|---|---|---|
--listen |
8088 |
port to bind |
--upstream |
http://localhost:8080 |
the guardrail-api base |
--rate / --window |
60 / 60s |
per-IP request budget |
--cache-ttl |
5s |
GET response cache TTL |
--check |
— | validate config + exit 0 (no bind) |
Responses carry an X-Cache: HIT|MISS|BYPASS header. Standard library only.