import type { RecordType } from '../types.cjs'; /** Maximum UTF-8 bytes retained in any user-visible or persisted diagnostic. */ export declare const MAX_DIAGNOSTIC_BYTES: number; export interface BoundedErrorDiagnostic { name: string; code?: string; message: string; summary: string; } export type HttpTransportError = Error & { code: string; status: number; statusCode: number; }; /** * Redact and bound untrusted diagnostic text before it reaches logs, public * responses, caches, or persistence. The source window is bounded before any * regular-expression work, so a hostile upstream message cannot trigger a * second unbounded diagnostic allocation. */ export declare function boundedDiagnostic(value: unknown, maxBytes?: number): string; /** Preserve stable identifiers separately while bounding the hostile message. */ export declare function boundedErrorDiagnostic(error: unknown, maxBytes?: number): BoundedErrorDiagnostic; /** Create the shared structured error shape used by every DoH transport. */ export declare function createHttpTransportError(provider: string, status: number, statusText: string): HttpTransportError; export declare function createDnsError(hostname: string, status: number, type: RecordType): Error;