import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const { version: PKG_VERSION } = require("../../package.json");
const startedAt = Date.now();
export function registerHealthRoutes(app, config, deps) {
    app.get("/health", async () => ({
        version: PKG_VERSION,
        schemaVersion: deps?.getSchemaVersion?.() ?? 0,
        uptime: Math.floor((Date.now() - startedAt) / 1000),
        sessions: 0,
        surfaces: 0,
        devices: deps?.getDeviceCount?.() ?? 0,
        hasUsers: (deps?.getUserCount?.() ?? 0) > 0,
        healthy: true,
        provider: config?.llmProvider ?? "ollama",
        model: config?.llmProvider === "openai"
            ? config.openaiModel
            : config?.ollamaModel ?? null,
        ollamaUrl: config?.llmProvider !== "openai"
            ? config?.ollamaUrl ?? null
            : null,
    }));
}
//# sourceMappingURL=health.js.map