/** * Bounded outbound HTTP for the managed runtime. * * Node's `fetch` has no default timeout, so a peer that accepts the connection * and never responds pins the caller forever. On the auth path that turns one * hung IdP into a fully unavailable deployment: every request parks in token * verification holding a request slot, and the fail-closed 401 never runs. * * Every outbound call in this package goes through {@link fetchWithTimeout}. * Budgets mirror the Python runtime so the two stay behavior-compatible. */ /** * Auth/authz-path calls: OIDC discovery, token introspection, thread-ownership * proof. Mirrors `_validated_token.py` (`timeout=10`). */ export declare const AUTH_HTTP_TIMEOUT_MS = 10000; /** * Provider egress: Slack/GitHub APIs, OAuth code exchange, credential * token exchange. Mirrors the Python runtime's `timeout=30`. */ export declare const PROVIDER_HTTP_TIMEOUT_MS = 30000; /** * Remote JWKS fetches performed inside `jose`. Passed explicitly to * `createRemoteJWKSet` rather than relying on the library default. */ export declare const JWKS_HTTP_TIMEOUT_MS = 5000; /** * `fetch` with a hard wall-clock budget. * * The request is aborted with a `TimeoutError` once `timeoutMs` elapses; a * caller-supplied `init.signal` still aborts as usual. * * The budget spans the whole exchange, body included: a peer that sends headers * and then stalls rejects at `response.json()`/`.text()`, *after* this call has * already resolved. Callers that map a network failure to a specific status must * put the body read under the same mapping, or a stalled body takes a different * path than a stalled connection. * * @param input - Request URL. * @param init - Request init, or `undefined`. * @param timeoutMs - Abort budget in milliseconds. * @param fetchImpl - Fetch override (tests, or an injected transport). * @returns The response, or a rejection once the budget elapses. */ export declare function fetchWithTimeout(input: string | URL, init: RequestInit | undefined, timeoutMs: number, fetchImpl?: typeof fetch): Promise; //# sourceMappingURL=http.d.ts.map