export type StructuredKind = "json" | "xml" | "yaml" | "toml" | "csv" | "text"; /** * Classify a Content-Type header. Returns null for HTML, for anything binary, * and for a missing or unparseable header — callers treat null as "not * structured, use the normal cascade", so an unknown type never diverts a page * away from the browser tiers. */ export declare function classifyContentType(header: string | null | undefined): StructuredKind | null; /** * Whether a body is markup despite what its header claims. * * `text/plain` is worth fast-pathing — READMEs, robots.txt, raw source files — * but servers do mislabel HTML as text/plain, and treating that as plain text * would hand the caller a page full of raw tags instead of extracted prose. * Only the opening bytes are examined; a document that mentions `` in its * body is not one. */ export declare function looksLikeHtml(body: string): boolean; /** * Render a structured body for an LLM consumer. JSON is re-indented so a * minified API response is legible; everything else is passed through. Plain * text is returned bare — it is already readable and a fence would only add * noise. */ export declare function renderStructured(body: string, kind: StructuredKind): string; /** * HEAD-probe a URL to decide whether it serves structured data. * * Fails open: any error, timeout, non-OK status, or server that refuses HEAD * returns null and the caller runs its normal cascade. A probe that cannot * answer must never cost the caller a fetch. * * Callers must have already run assertResolvedPublic — safeFetch re-applies the * string-level guard and the DNS-validating dispatcher, but the ordering keeps * this consistent with the other pre-cascade dispatches. */ export declare function probeStructuredContent(url: string): Promise;