/**
 * GoogleDriveDocFetcher — DocFetcher adapter for Google Drive (W0208).
 *
 * Accepts only `kind: "drive-*"` refs; rejects everything else via
 * `RefKindMismatchError`. Dispatches per file by MIME type:
 *   - Google Docs (`application/vnd.google-apps.document`) → export as markdown
 *   - `text/markdown`, `text/x-markdown`, `text/plain` → fetch raw bytes
 *   - `application/vnd.google-apps.folder` → recurse via `files.list`
 *   - anything else (including `text/html`) → skip with a fetch-failure entry
 *
 * Per-file failures are accumulated rather than aborting the run; the
 * catastrophic failure modes are: auth missing (preset-construction time),
 * `maxFiles` exceeded (pre/in-flight), or every file failed (post-fetch).
 *
 * Per-file caching by `(fileId, file.version)` is intentionally deferred —
 * the eval step-runner's cache covers re-runs at the step granularity, and
 * the finer-grained cache would expand the v1 surface without enabling
 * Drive functionality. Worth revisiting if/when Drive runs become hot.
 */
import { type DocFetcher, type DocSourceConfig, type FetchResult, type GeneralizedTaskDefinition } from "../../../_vendor/ailf-core/index.d.ts";
import type { DriveClient } from "./drive-client.js";
import type { GoogleDriveSource } from "./types.js";
export declare class GoogleDriveDocFetcher implements DocFetcher {
    private readonly source;
    private readonly client;
    private readonly maxFiles;
    private readonly recurseDepth;
    private readonly mimeFilters;
    private readonly rootDir;
    constructor(source: GoogleDriveSource, client: DriveClient, options?: {
        rootDir?: string;
    });
    /**
     * Implements the `DocFetcher` port. The optional `source` parameter
     * lets a caller override the closure-captured `GoogleDriveSource` on a
     * per-call basis — same per-call-override semantics the Sanity adapter
     * honors. Wrong-kind sources (e.g. a Sanity source passed in) are
     * rejected loudly via `RefKindMismatchError` so a future per-call
     * dispatch can't silently misroute work.
     */
    fetch(tasks: GeneralizedTaskDefinition[], source?: DocSourceConfig): Promise<FetchResult>;
    /**
     * Validate + narrow a per-call source override. The composition root wires
     * the kind-matched source into the constructor, and the pipeline's
     * fetch-docs step passes the resolved source (kind-erased by
     * `resolveGoogleDriveSource`, which routes the fetch through this preset
     * rather than the resolved fields) on every call. So an untagged override
     * is the normal case — fall back to the constructor source. Only a *tagged*
     * foreign source (e.g. a Sanity source) signals a caller bypassing the
     * registry, which we still reject.
     */
    private resolveSource;
    private limitsFor;
    /**
     * Emit the per-task canonical context files and the symbol-index
     * manifest under `<rootDir>/contexts/`. `document-manifest.json` and
     * `fetch-failures.json` are written by `fetch-docs-step.ts` from the
     * returned `FetchMetadata` (same path as the Sanity adapter).
     *
     * `escapeNunjucks` runs once at the write seam (C3) so the
     * `DocContext.content` returned from `fetch()` stays as clean
     * markdown — only the on-disk artifact Promptfoo consumes carries
     * the `{{` / `}}` escapes.
     */
    private writeArtifacts;
    private expandRef;
    private fetchFileById;
    private expandFolder;
    private listChildren;
    /**
     * Fetch the content of a single file and convert it to markdown when the
     * MIME type is supported. Unsupported types yield a soft-skip failure
     * (status undefined) so the run continues with the rest of the batch.
     */
    private materializeFile;
    /**
     * Resolve a file's content per its MIME type. Returns `null` for
     * unsupported types (caller records the skip; not an error).
     */
    private fetchContentByMime;
}
