import http from "http";
import type { ExportedItem } from "../types.js";
import type { Logger } from "../../logger.js";
export type HttpConfig = {
    exports: ExportedItem[];
    port: number;
    apiKey?: string;
    /** Interface to bind to. Default "127.0.0.1" (loopback only). */
    host?: string;
    /**
     * Allowed Host: header values (DNS-rebinding defense). If unset, defaults
     * are derived from `host`: loopback binds get an allowlist of loopback
     * names. Non-loopback binds skip Host validation by default (the strict
     * API key requirement mitigates DNS rebinding there); pass an explicit
     * array to lock the server down to specific hostnames.
     */
    allowedHosts?: string[];
    logger: Logger;
    hasInterrupts: (data: unknown) => boolean;
    respondToInterrupts: (interrupts: unknown[], responses: unknown[]) => Promise<unknown>;
};
type RouteResult = {
    status: number;
    body: unknown;
};
export declare function createHttpHandler(config: HttpConfig): (method: string, path: string, body: unknown) => Promise<RouteResult>;
export declare function startHttpServer(config: HttpConfig): http.Server;
export {};
