/**
 * Harper-HTTP adapter for the MCP transport core (application port, #614).
 *
 * Maps Harper's HTTP handler signature `(request, nextHandler) => { status,
 * headers, body }` to/from the transport's normalized Request/Response.
 * Auth runs upstream via `{ after: 'authentication' }` on the registration,
 * so `request.user` is already populated when this handler fires.
 *
 * SSE responses (reserved for #619) are returned as `{ body: iterable,
 * headers: { 'content-type': 'text/event-stream' } }`. Harper's serializer
 * at `server/serverHelpers/contentTypes.ts:128-162` picks the SSE writer
 * automatically and pipes the iterable to the wire.
 */
import { type McpProfile } from '../transport.ts';
interface HarperHttpRequest {
    method: string;
    headers: Iterable<[string, string | string[]]> & {
        get?: (name: string) => string | undefined;
    };
    body?: AsyncIterable<Buffer | string>;
    /**
     * Full user object as Harper's auth pipeline attaches it (includes role +
     * permission tree). Transport reads `username` for session binding and
     * forwards the full object as `userObject` for resource/tool RBAC.
     */
    user?: {
        username?: string;
        role?: unknown;
    };
    isWebSocket?: boolean;
}
interface HarperHttpResponse {
    status: number;
    headers: Record<string, string>;
    body?: unknown;
}
export declare function createHarperHttpHandler(profile: McpProfile): (request: HarperHttpRequest, nextHandler: (req: HarperHttpRequest) => unknown) => Promise<HarperHttpResponse | unknown>;
export {};
