Add WS message filtering, idle grace period, webhook env var

- Browser WS clients can now send {"type": "subscribe", "message_types": [...]}
  to only receive specific message types. Default is all (no change for browsers).
- Discord bot subscribes to only "rare" and "chat" — eliminates 82GB+ of
  unnecessary telemetry/vitals/inventory traffic.
- Idle detection now has a 5-minute grace period before firing Discord alerts,
  preventing false positives on brief idle states.
- Added DISCORD_ACLOG_WEBHOOK env var to docker-compose.yml for death/idle alerts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-15 00:08:55 +02:00
parent 3885b408c9
commit de2cc3a0e3
3 changed files with 62 additions and 20 deletions

View file

@ -29,6 +29,7 @@ services:
SECRET_KEY: "${SECRET_KEY}"
LOG_LEVEL: "DEBUG"
INVENTORY_SERVICE_URL: "http://inventory-service:8000"
DISCORD_ACLOG_WEBHOOK: "${DISCORD_ACLOG_WEBHOOK:-}"
restart: unless-stopped
logging:
driver: "json-file"