/** * @file metrics.routes.ts * @description HTTP route registration for the `/metrics` endpoint (issue #397). */ import type { MetricsOptionsInterface } from '../common'; import type { MetricsService } from './metrics.service'; /** * Minimal server interface for route registration. Mirrors `HealthRouteServer` * to avoid importing the full `FrontMcpServerInstance` (circular dependencies). */ export interface MetricsRouteServer { registerRoute(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD', path: string, handler: (req: { headers?: Record; }, res: MetricsResponseLike) => Promise | void): void; } /** Subset of the Express-style response object the route uses. */ export interface MetricsResponseLike { status(code: number): MetricsResponseLike; setHeader?(name: string, value: string): MetricsResponseLike | void; type?(contentType: string): MetricsResponseLike; send?(body: string): MetricsResponseLike | void; json(payload: unknown): void; } /** * Register the `GET ` metrics endpoint. No-op when the config has * `enabled !== true` — callers should already have gated this call but the * extra guard keeps `prepare()` simple. */ export declare function registerMetricsRoutes(server: MetricsRouteServer, service: MetricsService, config: MetricsOptionsInterface): void; //# sourceMappingURL=metrics.routes.d.ts.map