/**
 * Adapter: Load task definitions from the Sanity Content Lake.
 *
 * Fetches ailf.task documents via GROQ and maps them to
 * `ContentLakeAuthorableTask` — the subset of `GeneralizedTaskDefinition`
 * authorable in Studio per D0038. Today that subset is exactly the
 * literacy variant.
 *
 * The pipeline never knows which adapter loaded the tasks; the
 * `TaskSource` port widens the return type back to
 * `GeneralizedTaskDefinition[]`.
 *
 * Wired in the composition root as the default task source.
 *
 * @see packages/core/src/ports/task-source.ts — TaskSource port
 * @see docs/decisions/D0038-content-lake-authorable-task-modes.md
 */
import type { SanityClient } from "@sanity/client";
import type { ContentLakeAuthorableTask, FilterOptions, GeneralizedTaskDefinition, TaskPublishState, TaskSource, TaskStatus, TaskViabilityProbe } from "../../_vendor/ailf-core/index.d.ts";
/** Shape of a single ailf.task document as returned by the GROQ query. */
export interface ContentLakeTask {
    areaId?: string;
    assertions?: ContentLakeAssertion[];
    baseline?: {
        enabled?: boolean;
        rubric?: string;
    };
    contextDocs?: ContentLakeCanonicalDoc[];
    description?: string;
    docCoverage?: boolean;
    promptText?: string;
    rawAssert?: {
        threshold?: number;
        type?: string;
        value?: string;
    }[];
    referenceSolutionTitle?: string;
    status?: TaskStatus;
    tags?: string[];
    taskId?: string;
    title?: string;
}
/**
 * Context doc ref shape from the Content Lake.
 * The GROQ query projects refType + all possible value fields.
 * Only the field matching refType will have a value.
 */
interface ContentLakeCanonicalDoc {
    docId?: string;
    docRefId?: string;
    path?: string;
    perspective?: string;
    reason?: string;
    refType?: string;
    sectionSlug?: string;
    slug?: string;
}
interface ContentLakeCriterion {
    id?: string;
    text?: string;
}
/** Assertion shape from the Content Lake (mirrors the Studio schema). */
interface ContentLakeAssertion {
    criteria?: ContentLakeCriterion[];
    template?: string;
    threshold?: number;
    type?: string;
    value?: string;
}
export declare class ContentLakeTaskSource implements TaskSource, TaskViabilityProbe {
    private readonly client;
    constructor(client: SanityClient);
    /**
     * Diagnose the publish state of specific task ids (`TaskViabilityProbe`).
     *
     * Reads under the `raw` perspective so unpublished drafts (`drafts.<id>`)
     * are visible — `loadTasks` runs under the client's default `published`
     * perspective and so cannot see them. This is purely a *reason* probe used
     * by the fast-fail validation step after it has already decided a task is
     * non-viable; it never changes the viability decision itself.
     */
    probeTaskPublishState(taskIds: string[]): Promise<Map<string, TaskPublishState>>;
    loadTasks(filter?: FilterOptions): Promise<GeneralizedTaskDefinition[]>;
}
/**
 * Map a Content Lake ailf.task document to a `ContentLakeAuthorableTask`.
 *
 * Returns null if the document is missing required fields (taskId,
 * title, areaId, promptText). These are required by the
 * Studio schema, but defensive coding handles edge cases (drafts,
 * partially-created documents, etc.).
 */
export declare function mapToAuthorableTask(raw: ContentLakeTask): ContentLakeAuthorableTask | null;
export {};
