/** * Redirect chain tracker — records the full redirect chain for crawled URLs. * * Why: redirect chains (A→B→C) slow down pages; circular redirects crash crawlers; * redirect loops indicate config errors. ZeTa records chains for SEO/perf audit. * * Integration: hook into Playwright's page.on('response') to see each redirect hop. */ export interface RedirectHop { from: string; to: string; statusCode: number; durationMs: number; } export interface RedirectChain { originalUrl: string; finalUrl: string; hops: RedirectHop[]; isCircular: boolean; hopCount: number; totalDurationMs: number; } import type { Page } from 'playwright'; export declare function trackRedirects(page: Page, url: string): Promise; export declare class RedirectRegistry { private chains; register(chain: RedirectChain): void; get(url: string): RedirectChain | undefined; getAll(): RedirectChain[]; getProblematic(): RedirectChain[]; stats(): { total: number; withRedirects: number; circular: number; deepChains: number; }; }