Rene Fichtmueller d43b9f5298 feat: TokenVault MVP — hybrid MCP + proxy for LLM token savings
4-package monorepo:
- @tokenvault/core: Fastify 5.x proxy server, 7-stage pipeline,
  3 provider adapters (Anthropic, OpenAI, Ollama), PostgreSQL
  ticket system, cost calculator with real provider pricing
- @tokenvault/mcp: MCP server (stdio) with tv_ticket, tv_cost,
  tv_health tools for IDE integration
- @tokenvault/client: TypeScript SDK with createTokenVaultClient()
- @tokenvault/dashboard: Single-file HTML dashboard with MAGATAMA
  CI style (indigo #6366f1), bilingual DE+EN, 4 tabs

OpenAI-compatible proxy at /v1/chat/completions — drop-in replacement.
Every LLM request becomes a trackable ticket (TV-00001).
2026-04-14 10:10:22 +02:00

20 lines
546 B
TypeScript

import type { FastifyInstance } from 'fastify';
import { getAllProviders } from '../providers/index.js';
export async function healthRoutes(app: FastifyInstance): Promise<void> {
app.get('/health', async () => {
const providers = getAllProviders();
return {
status: 'ok',
service: 'tokenvault',
version: '0.1.0',
uptime_s: Math.floor(process.uptime()),
providers: providers.map(p => ({
name: p.name,
configured: p.isConfigured(),
models: p.models.length,
})),
};
});
}