/**
 * fetch-url-content.ts
 *
 * Fetches documentation content from a URL. Tries the .md endpoint first
 * (Sanity's agent-friendly format), then content-type negotiation.
 * Does NOT attempt HTML-to-Markdown conversion — if the endpoint
 * doesn't serve markdown, the fetch fails cleanly.
 *
 * Part of Phase 4: Modular doc fetching for baseline mode.
 */
/** Metadata for a single URL fetch, suitable for JSON serialization */
export interface UrlFetchMetadata {
    contentLength?: number;
    error?: string;
    method: UrlFetchResult["method"];
    status?: number;
    url: string;
}
/** Result of fetching documentation content from a URL */
export interface UrlFetchResult {
    /** The markdown content, or undefined if fetch failed */
    content?: string;
    /** Error message if fetch failed */
    error?: string;
    /** How the content was obtained */
    method: "content-negotiation" | "failed" | "md-endpoint";
    /** HTTP status code */
    status?: number;
    /** The URL that was fetched */
    url: string;
}
/**
 * Fetch documentation content from a URL.
 *
 * Strategy:
 *   1. Try `.md` endpoint with `Accept: text/markdown`
 *   2. Try content-type negotiation (ask for markdown)
 *   3. Fail cleanly if only HTML is available (no conversion)
 *
 * @param url - The documentation URL to fetch
 * @param headers - Optional custom headers to merge with defaults
 * @returns A `UrlFetchResult` with success or failure metadata
 */
export declare function fetchUrlContent(url: string, headers?: Record<string, string>): Promise<UrlFetchResult>;
