feat: add phase 1 runnable skeleton

This commit is contained in:
Hermes Agent
2026-07-09 04:19:23 +00:00
parent deec0c7fa3
commit bd0cf34aa3
35 changed files with 675 additions and 5 deletions
+21
View File
@@ -0,0 +1,21 @@
import type { FastifyInstance } from 'fastify';
import { healthResponseSchema } from '@hermes-mobile/shared';
import { getHermesHealth } from '../system/hermesHealth.js';
export async function registerHealthRoutes(app: FastifyInstance): Promise<void> {
app.get('/api/health', async () => {
const response = {
ok: true,
service: 'hermes-mobile-companion' as const,
version: process.env.npm_package_version ?? '0.1.0',
mode: process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' ? process.env.NODE_ENV : 'development',
uptimeSeconds: process.uptime(),
timestamp: new Date().toISOString(),
checks: {
hermes: await getHermesHealth(),
},
};
return healthResponseSchema.parse(response);
});
}