Add nightly realm reports and observed bot activity explanations
Core tests / core (push) Successful in 59s

This commit is contained in:
Codex
2026-09-22 20:46:02 -04:00
parent 64fb329b2e
commit 9d586f4c44
13 changed files with 183 additions and 6 deletions
+6
View File
@@ -195,6 +195,12 @@ class Handler(BaseHTTPRequestHandler):
at = data['rosterAt'] if data else 0
from datetime import datetime, timezone
self.reply(200, json.dumps({'ok':bool(data),'ale':{'lastEventAt':datetime.fromtimestamp(at,timezone.utc).isoformat() if at else None,'activeRecently':bool(data and not data['stale'])},'events':[],'commands':{}}).encode())
elif path == '/api/realm-insights':
try:
# Fixed read-only endpoint: public aggregate facts and bot activity only.
self.reply(200, local_get('/api/realm-insights'))
except Exception:
self.reply(503,b'{"error":"Realm insights unavailable"}')
elif path == '/api/operations':
try:
health = json.loads(local_get('/api/operations'))