/**
 * Sanity Canvas adapter — config schema + eager-validating helper.
 *
 * `defineCanvasSource` is the user-facing entry point for declaring a
 * Canvas source in `config/sources.ts`. It parses the input through Zod
 * eagerly so typos / wrong shapes surface at config-load time, not at
 * first eval-run. As a convenience, `documentIds` entries may be dashboard
 * doc URLs — they are normalized to bare ids and validated against the
 * declared environment + organization before the schema parse.
 */
import { z } from "zod";
import type { ResolvedSourceConfig } from "../../../sources.js";
import type { CanvasSource } from "./types.js";
/**
 * Zod schema for a Canvas source. Asserts `satisfies z.ZodType<CanvasSource>`
 * against the independently-authored interface in `types.ts` (D0045 trust-
 * boundary rule) — drift becomes a compile error.
 */
export declare const CanvasSourceSchema: z.ZodObject<{
    kind: z.ZodDefault<z.ZodLiteral<"sanity-canvas">>;
    name: z.ZodString;
    environment: z.ZodEnum<{
        staging: "staging";
        production: "production";
    }>;
    organizationId: z.ZodString;
    resourceId: z.ZodString;
    documentIds: z.ZodArray<z.ZodString>;
    tokenEnvVar: z.ZodDefault<z.ZodString>;
    default: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
/** Convenience alias — the parsed/validated shape. */
export type CanvasSourceConfig = CanvasSource;
/**
 * Define a Sanity Canvas doc source for `config/sources.ts`. Validates
 * eagerly; throws a `ZodError` (or a descriptive `Error` for URL-form
 * document entries) on bad input. The returned value is fully populated
 * with defaults (`kind`, `tokenEnvVar`); `environment` is deliberately
 * required — see the {@link CanvasSource} deployment-status note.
 *
 * `documentIds` entries may be dashboard doc URLs
 * (`https://<dashboard host>/@<org>/canvas/doc/<id>`) — the id is
 * extracted, and the URL's host and org must agree with the declared
 * `environment` / `organizationId` so a pasted wrong-environment link
 * fails at config time instead of as a mid-run 404.
 */
export declare function defineCanvasSource(input: z.input<typeof CanvasSourceSchema>): CanvasSource;
/**
 * Project a Canvas source onto the resolved-source shape, so `loadSource`
 * can return a plain `ResolvedSourceConfig` for Canvas too — keeping Canvas
 * contained here and sparing every downstream step a source-kind branch
 * (mirrors `resolveGoogleDriveSource`).
 *
 * The dashboard org canvas home surfaces as `baseUrl` so logs and
 * provenance name the real source. Sanity-only coordinates stay empty —
 * the fetch runs through the Canvas preset, not these fields. No llms.txt:
 * Canvas has no site index; docs are read directly through this adapter.
 */
export declare function resolveCanvasSource(source: CanvasSource): ResolvedSourceConfig;
