/**
 * HTTP server factory for gxwf-web.
 *
 * Creates a Node.js http.Server wired to the contents/workflow request handler.
 * Returns a `ready` promise that resolves once the ToolCache is loaded and
 * initial workflow discovery completes — callers may await it before serving
 * traffic but the server is safe to bind before that.
 */
import { type Server } from "node:http";
import type { ToolSource } from "@galaxy-tool-util/core";
import { type AppState } from "./router.js";
export type { AppState };
export interface CreateAppOptions {
    cacheDir?: string;
    /** Tool sources to fetch from when a tool is not in cache. */
    sources?: ToolSource[];
    /** Absolute path to a built gxwf-ui dist directory. When set, the server
     *  serves the frontend at the root and falls back to index.html for SPA routing. */
    uiDir?: string;
    /** Extra origins appended to the CSP `connect-src` directive (tool-cache
     *  proxies, custom ToolShed mirrors). Applied when uiDir is set. */
    extraConnectSrc?: string[];
}
/** Create a configured gxwf-web HTTP server for the given workflow directory. */
export declare function createApp(directory: string, opts?: CreateAppOptions): {
    server: Server;
    state: AppState;
    ready: Promise<void>;
};
//# sourceMappingURL=app.d.ts.map