/**
 * Fastify adapter for the MCP transport core (operations port, #614).
 *
 * Maps Fastify's `(request, reply)` ↔ the transport's normalized
 * Request/Response shape. The route is registered with the
 * `authAndEnsureUserOnRequest` preValidation hook, so the authenticated
 * user lands on `request.hdb_user` before this handler runs.
 *
 * Fastify auto-parses JSON request bodies; we re-stringify so the core's
 * `parseMessage` sees the raw envelope it expects. The round-trip is
 * cheap for the small JSON-RPC frames in the MCP wire format and keeps
 * the core framework-agnostic.
 */
import { type McpProfile } from '../transport.ts';
interface FastifyLikeRequest {
    method: string;
    headers: Record<string, string | string[] | undefined>;
    body: unknown;
    /**
     * `authAndEnsureUserOnRequest` sets the full user (incl. role + permission
     * tree) on `req.hdb_user`. Used for session binding (`username`) and
     * forwarded as the transport's `userObject` for resource/tool RBAC.
     */
    hdb_user?: {
        username?: string;
        role?: unknown;
    } | null;
}
interface FastifyLikeReply {
    code: (status: number) => FastifyLikeReply;
    header: (name: string, value: string) => FastifyLikeReply;
    send: (body?: unknown) => unknown;
}
export declare function createFastifyHandler(profile: McpProfile): (request: FastifyLikeRequest, reply: FastifyLikeReply) => Promise<void>;
export {};
