/** * Fastify route: `GET /audit`. * * Proxies a `audit_query` MCP call through the runtime handle matching the * requested wallet address. AbortSignal is wired to the HTTP request lifetime * so MCP cancels in-flight work when the client disconnects. * * Business logic lives entirely in `handlers/audit.ts`. This file contains * only Fastify wiring and query-string coercion. */ import type { FastifyInstance } from "fastify"; import type { RuntimeHandle } from "../../runtime/run.js"; import type { Logger } from "../../utils/logger.js"; /** * Dependencies injected into the `/audit` route at registration time. */ export interface AuditRouteDeps { /** Live runtime handles maintained by the plugin, keyed by lowercased address. */ runtimeHandles: Map; /** Logger instance for unexpected errors. */ logger: Logger; } /** * Register `GET /audit` on the given Fastify instance. * * Coerces string query-string values to their typed counterparts before * forwarding to `auditHandler`. The `success` field is `"true" | "false"` from * the schema; converted to `boolean`. Integer fields are parsed with * `parseInt`. Missing optional fields are left as `undefined`. * * HTTP status mapping from `AuditQueryError.code`: * - `NOT_FOUND` → 404 * - `ABORTED` → 504 (gateway timeout — client disconnected) * - `UPSTREAM` → 502 (bad gateway — MCP error) * * @param fastify Fastify instance to register the route on. * @param deps Route dependencies injected at plugin start. */ export declare function registerAuditRoute(fastify: FastifyInstance, deps: AuditRouteDeps): void; //# sourceMappingURL=audit.d.ts.map