Ассистент: API памяти, сессии и истории агентов; предложение по инструментам разбора; принцип про зависимые работы
Some checks failed
ci / test (push) Successful in 22s
ci / deploy (push) Has been cancelled

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 23:21:57 +03:00
parent ed3b9e13dc
commit 918ace43c8
7 changed files with 171 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import { randomUUID } from "node:crypto";
import Fastify, { type FastifyInstance } from "fastify";
import type { Pool } from "khb_common";
import { registerAgentRoutes } from "./agents-api.js";
import type { PrepJob, PrepResult } from "./jobs.js";
export interface ChatApi {
@@ -37,6 +38,8 @@ export function buildApi(deps: PrepApiDeps): FastifyInstance {
if (req.headers.authorization !== `Bearer ${deps.token}`) return reply.code(401).send({ error: "unauthorized" });
});
registerAgentRoutes(app, deps.pool);
app.get("/healthz", async () => {
let db = false;
try {