import * as http from 'node:http';
import type { OwlCodaConfig } from './config.js';
export declare const activeStreams: Set<http.ServerResponse<http.IncomingMessage>>;
export declare function getShutdownSignal(): AbortSignal | undefined;
export declare function readBody(req: http.IncomingMessage, maxBytes?: number): Promise<string>;
/**
 * Run a request handler with crash isolation. If it throws synchronously, the
 * error is contained to a 500 for THAT request and never propagates to the
 * process — without this, a throw in the dispatch path (parse / routing /
 * requestId) reaches `uncaughtException` → `shutdown()`, taking down the shared
 * daemon for every client. `onError` lets the caller log (now captured in
 * daemon.log). Async route rejections are handled by each route's own `.catch`
 * (and `unhandledRejection`, which only logs); this guards the synchronous gap.
 */
export declare function dispatchRequestSafely(handler: () => void, res: http.ServerResponse, onError?: (err: unknown) => void): void;
export declare function startServer(config: OwlCodaConfig): http.Server;
