// KBDB Base — atomic universal table worker (arcrun self-hosted data layer + official core). // SDD: .agents/specs/arcrun/kbdb-base/design.md // // Base = D1 only (free, no credit card): entries / templates / records + LIKE search + recipe-stats. // Optional modules (NOT in this base): embed (Vectorize+AI binding, semantic search), triplet (separate repo). import { Hono } from 'hono'; import type { Bindings } from './types'; import { entryRoutes } from './routes/entries'; import { templateRoutes } from './routes/templates'; import { recordRoutes } from './routes/records'; import { recipeStatRoutes } from './routes/recipe-stats'; const app = new Hono<{ Bindings: Bindings }>(); app.get('/', (c) => c.json({ service: 'arcrun-kbdb', tier: 'base', status: 'ok' })); app.get('/health', (c) => c.json({ ok: true })); app.route('/entries', entryRoutes); app.route('/templates', templateRoutes); app.route('/records', recordRoutes); app.route('/recipe-stats', recipeStatRoutes); export default app;