import type { McpServer } from "@modelcontextprotocol/server";
import type { ILogger } from "../core/logger.js";
import type { Result } from "../core/result.js";
import type { StreamableHttpTransportConfig } from "./config.js";
/**
 * Express HTTP Manager
 *
 * Manages HTTP server lifecycle for Streamable HTTP transport.
 *
 * Serving is stateless per protocol revision 2026-07-28: there are no
 * protocol-level sessions and no `Mcp-Session-Id` header. Every request is
 * answered by a fresh server instance from the factory via the SDK's
 * `createMcpHandler` entry, which speaks the 2026-07-28 revision and falls
 * back to stateless serving for 2025-era clients on the same endpoint.
 *
 * Key Features:
 * - /mcp endpoint → per-request stateless serving for both protocol eras
 * - /health endpoint → liveness check
 * - DNS rebinding protection → Host/Origin validation from the SDK Express app
 * - Graceful shutdown → closes open subscription streams, then the HTTP server
 *
 * @example
 * ```typescript
 * const manager = new ExpressHttpManager(
 *   config,
 *   () => TouchDesignerServer.create(), // Server factory
 *   logger
 * );
 *
 * // Start server
 * const result = await manager.start();
 *
 * // Graceful shutdown
 * await manager.stop();
 * ```
 */
export declare class ExpressHttpManager {
    private readonly config;
    private readonly serverFactory;
    private readonly logger;
    private handler;
    private server;
    /**
     * Create ExpressHttpManager with server factory
     *
     * @param config - Streamable HTTP transport configuration
     * @param serverFactory - Factory function creating a new server instance per request
     * @param logger - Logger instance
     */
    constructor(config: StreamableHttpTransportConfig, serverFactory: () => McpServer, logger: ILogger);
    /**
     * Start HTTP server with Express app from SDK
     *
     * @returns Result indicating success or failure
     */
    start(): Promise<Result<void, Error>>;
    /**
     * Graceful shutdown
     *
     * Closes the MCP handler (open subscription streams) and the HTTP server.
     *
     * @returns Result indicating success or failure
     */
    stop(): Promise<Result<void, Error>>;
    /**
     * Check if server is running
     *
     * @returns True if server is running
     */
    isRunning(): boolean;
}
