/** * Parser for the `x-chaos-fault-*` response headers emitted by * `@mizchi/server-faults` when its `metadataHeader` option is set. * Pure function: no I/O, no Playwright surface — invoked from * `page.on('response', …)` once per response. * * Wire-format mirror: this module deliberately re-states the * `FaultAttrs` shape from server-faults rather than importing it. * The HTTP header contract is the load-bearing interface; the type * is shared by convention only. If server-faults adds a kind, the * `KNOWN_KINDS` tuple below must be extended in lockstep. */ declare const KNOWN_KINDS: readonly ["5xx", "latency"]; export type ServerFaultKind = (typeof KNOWN_KINDS)[number]; export interface ServerFaultEventAttrs { kind: ServerFaultKind; path: string; method: string; /** HTTP status code (integral). Set when kind === "5xx". */ targetStatus?: number; /** Sleep duration in milliseconds (may be fractional). Set when kind === "latency". */ latencyMs?: number; traceId?: string; } export interface ParsedServerFault { attrs: ServerFaultEventAttrs; /** * Duplicated at top level for O(1) collector indexing; `attrs.traceId` is * for OTel-attribute parity at the FaultAttrs schema level. */ traceId?: string; } export declare function parseServerFaultHeaders(headers: Headers, prefix: string): ParsedServerFault | null; export {}; //# sourceMappingURL=server-fault-events.d.ts.map