Add health endpoints, agents wiring, and deployment updates

This commit is contained in:
Alexa Amundson
2025-11-20 12:38:48 -06:00
parent 459a5b8b6a
commit 066c3f77cd
18 changed files with 519 additions and 197 deletions

View File

@@ -0,0 +1,17 @@
import { NextResponse } from 'next/server';
import { pollServiceHealth, serverConfig } from '@/lib/config';
export async function GET() {
const services = await pollServiceHealth();
const healthy = services.every((service) => service.status === 'healthy' || service.status === 'not_configured');
const payload = {
status: healthy ? 'ok' : 'degraded',
timestamp: new Date().toISOString(),
environment: serverConfig.environment,
version: process.env.npm_package_version ?? 'unknown',
services
};
return NextResponse.json(payload, { status: healthy ? 200 : 503 });
}