/** * Twig Server — Middleware * CORS, body parsing, request logging, error handling. */ import type { Request, Response, NextFunction } from 'express'; export interface KindlingError extends Error { statusCode?: number; } /** CORS — allow all origins */ export declare function corsMiddleware(req: Request, res: Response, next: NextFunction): void; /** Request logging to stderr — structured JSON */ export declare function requestLogger(req: Request, res: Response, next: NextFunction): void; /** Error handler — never leaks stack traces */ export declare function errorHandler(err: KindlingError, _req: Request, res: Response, _next: NextFunction): void;