// Health — diagnostics report. One-shot health check across services. const HEALTH_CHECKS = [ { name: 'Anthropic API', status: 'ok', latency: '124 ms', detail: 'authenticated as Aurora · sonnet-4.5 reachable' }, { name: 'Local gateway', status: 'ok', latency: '2 ms', detail: 'pid 84021 · uptime 4d 2h · listening :7421' }, { name: 'Filesystem', status: 'ok', latency: '—', detail: '14.2 GB free of 512 GB' }, { name: 'GitHub MCP', status: 'ok', latency: '84 ms', detail: 'oauth ok · 18 tools · rate-limit 4500/5000 (warn at 4750)' }, { name: 'Linear MCP', status: 'ok', latency: '142 ms', detail: 'oauth ok · 9 tools' }, { name: 'Postgres MCP', status: 'ok', latency: '12 ms', detail: 'stdio · prod read replica' }, { name: 'Figma MCP', status: 'ok', latency: '210 ms', detail: 'oauth ok · 6 tools' }, { name: 'Notion MCP', status: 'error', latency: '—', detail: 'TLS handshake failed · 4 retries · backing off 30s' }, { name: 'Slack MCP', status: 'warn', latency: '—', detail: 'oauth token expired · re-authenticate' }, { name: 'Sentry MCP', status: 'idle', latency: '—', detail: 'disabled' }, { name: 'Cron scheduler', status: 'ok', latency: '—', detail: '5 jobs registered · next: incident-triage in 12m' }, { name: 'Local model cache', status: 'ok', latency: '—', detail: '412 MB · last pruned 2d ago' }, ]; function Health() { const [scanning, setScanning] = React.useState(false); React.useEffect(() => { requestAnimationFrame(() => window.lucide && window.lucide.createIcons()); }); const ok = HEALTH_CHECKS.filter(c => c.status === 'ok').length; const warn = HEALTH_CHECKS.filter(c => c.status === 'warn').length; const err = HEALTH_CHECKS.filter(c => c.status === 'error').length; function rerun() { setScanning(true); setTimeout(() => setScanning(false), 1400); } return (