/** * Origin-politeness helpers for the anti-bot tier. Pure functions so they are * unit-testable without a network or a DB. The router uses these to translate a * rate-limit response into a bounded per-host backoff window and to avoid * re-hammering a host that is actively refusing us. */ /** Backoff applied to a 429 that carries no parseable Retry-After header. */ export declare const DEFAULT_BACKOFF_MS = 60000; /** * Upper bound on any backoff window. A hostile or absurd Retry-After * ("99999") must not park a domain for hours — 5 minutes is the ceiling. */ export declare const MAX_BACKOFF_MS = 300000; /** * Parse an HTTP `Retry-After` header into a delay in milliseconds relative to * `nowMs`. Supports both header forms: * - delta-seconds integer (`"120"`) → `120_000` * - HTTP-date (`"Wed, 21 Oct 2026 07:28:00 GMT"`) → `Date.parse(...) - nowMs`, * floored at 0 so a stale/past date never yields a negative delay. * Returns null for an empty, missing, or unparseable value. */ export declare function parseRetryAfter(headerValue: string | undefined, nowMs: number): number | null; /** Clamp a backoff delay into `[0, MAX_BACKOFF_MS]`. */ export declare function clampBackoffMs(ms: number): number; //# sourceMappingURL=politeness.d.ts.map