/** Request options the domain needs from an HTTP call. */ export interface HttpRequestInit { method?: string; headers?: Record; body?: string; signal?: AbortSignal; } /** Performs one HTTP request and resolves to a Response. */ export type HttpPort = (url: string, init?: HttpRequestInit) => Promise; /** Production adapter over the global fetch (Node 18+). */ export declare const fetchHttpAdapter: HttpPort; /** Whether a usable global fetch exists. Lets callers keep their * "no fetch available → give up" path without touching globalThis directly. */ export declare function hasGlobalFetch(): boolean; /** * Read a `Response` body with a hard size cap. Stops streaming as soon as * the cumulative bytes exceed `max` and cancels the reader — defence in * depth against an upstream (or a hijacked endpoint) that returns an * unbounded payload. Falls back to `text()` only when the platform doesn't * expose a readable stream on the response (rare). */ export declare function readBodyCapped(res: Response, max: number): Promise<{ text: string; tooLarge: boolean; }>;