export declare const DEFAULT_CONNECTOR_REQUEST_TIMEOUT_MS = 30000; export declare const CONNECTOR_HEALTH_TIMEOUT_MS = 5000; export declare const DEFAULT_CONNECTOR_MAX_RESPONSE_BYTES: number; export declare function validateConnectorTimeoutMs(value: number, label: string): number; export declare function validateConnectorMaxResponseBytes(value: number, label: string): number; export declare function requireSafeConnectorInputHeaders(headers: Readonly> | undefined, label: string): void; export declare function requireHttpUrl(value: string, label: string): URL; export declare function requireSameOrigin(value: string, configuredOrigin: string, label: string): URL; /** * Read a platform response without allocating beyond the connector's byte * budget. `Content-Length` is only an early refusal; the streaming count is * authoritative because chunked and dishonest responses omit or understate it. */ export declare function readConnectorResponseBody(response: Response, operation: ConnectorHttpOperation, maxBytes: number): Promise; /** * One whole HTTP operation boundary: fetch and body reads share one clock. * * The promise race is intentional. Forwarding a signal cannot settle a custom * fetch/body implementation that ignores it, and a connector lifecycle is a * public entry point independent of the turn executor's own tool deadline. */ export declare class ConnectorHttpOperation { readonly signal: AbortSignal; private readonly controller; private readonly aborted; private readonly callerSignal; private readonly onCallerAbort; private readonly timer; private rejectAbort; private hasCause; private firstCause; constructor(callerSignal: AbortSignal | undefined, timeoutMs: number, label: string); get cause(): unknown; wait(operation: Promise): Promise; /** * Check authority before starting foreign work, then again after it wins. * * Passing an already-created promise to `wait()` cannot prevent the work * that created it from starting. Callers use this thunk form at every * network, resolver and stream boundary where admission matters. */ run(start: () => Promise): Promise; throwIfStopped(): void; close(): void; cancel(reason: unknown): void; private stop; } //# sourceMappingURL=http-operation.d.ts.map