/**
 * confidence-schema.ts — shared Zod schema for the D0049 `Confidence` triple.
 *
 * Authored ONCE here so adapter schemas under
 * `packages/eval/src/adapters/grader-outputs/` and
 * `packages/eval/src/adapters/attribution/` import a single shared schema
 * fragment instead of redeclaring the shape inline. The schema asserts
 * `satisfies z.ZodType<Confidence>` against the domain type in
 * `packages/core/src/types/confidence.ts` so drift is a build error.
 *
 * NON-BOUNDARY HELPER: this file lives outside the D0045 SCAN_ROOTS gate
 * by intent — it is a reusable schema fragment, not a trust boundary.
 * Consumers import via the pinned subpath export
 * `@sanity/ailf-core/schemas` (declared in `packages/core/package.json`),
 * NOT through the top-level barrel — that pin is the
 * single legal access path so all adapter sites use the same specifier.
 *
 * @see docs/decisions/D0045-type-architecture-and-contract-enforcement.md
 * @see docs/decisions/D0049-shared-confidence-contract.md
 */
import { z } from "zod";
/**
 * Shared schema for {@link Confidence}. The `derivation` field is the
 * open `ConfidenceDerivation` tag; we accept any non-empty string so
 * future emitters can mint their own identifiers without editing this
 * package (matches `isConfidence`'s runtime guard).
 */
export const ConfidenceSchema = z.object({
    level: z.enum(["high", "medium", "low"]),
    signalsPresent: z.number().int().nonnegative(),
    derivation: z.string().min(1),
});
