import type { CallableVectorSnapshot } from "./vector.js"; /** * Static coverage gate for the enforced @vector conformance tier. * * The generated conformance suite fails at runtime when an operation has a * vector but no adapter and no waiver. This module lets a build assert the same * invariant ahead of time — against a runtime's declared adapter/waiver * registry — so a missing adapter is caught in CI rather than only when the * suite runs. Waivers must enumerate concrete operations: a wildcard waiver * (e.g. `*`) would let a runtime silently drop whole contracts, which defeats * the purpose of the tier, so wildcards are rejected. * * As of issue #511 Cat 1 there is a SECOND, code-verified way for an operation * to be covered: a seam exercised by the EMITTED typed conformance entrypoint * needs no hand adapter at all. Eligibility (`isTypedSeamEntry`) covers a scalar * seam (every param and the return JSON-native scalar) and, as of the model * parity slice, a model-in/model-out seam whose boundary models are all in the * emitter's `@serializable` closure (carried in `snapshot.serializedTypes`, since * that loader is what the typed entrypoint decodes with). Such operations are * reported in their own `typed` bucket. Classification is additive and strictly * expanding: an adapter registered today keeps its `covered` classification * (adapters stay authoritative), and the typed rail only ever rescues operations * that would otherwise be `missing` (or made a waiver redundant). Each operation * lands in exactly one bucket. */ export interface VectorAdapterCoverageInput { snapshot: CallableVectorSnapshot; /** Keys registered by the runtime, each `Contract.operation` or bare `operation`. */ adapterKeys: Iterable; /** Explicit waiver keys, each `Contract.operation` or bare `operation`. */ waiverKeys?: Iterable; } export interface VectorAdapterCoverageResult { ok: boolean; /** Every distinct operation carrying at least one vector, as `Contract.operation`. */ operations: string[]; /** Operations covered by a registered hand adapter (authoritative). */ covered: string[]; /** * Seams covered by the emitted typed conformance entrypoint with no hand * adapter required (scalar seams, plus model-in/model-out seams whose boundary * models are in the `@serializable` closure). These are as good as `covered` * for gate purposes. */ typed: string[]; waived: string[]; missing: string[]; /** Waiver keys that use a wildcard; these are never allowed. */ wildcardWaivers: string[]; } export declare function evaluateVectorAdapterCoverage(input: VectorAdapterCoverageInput): VectorAdapterCoverageResult; /** Human-readable summary of a failing coverage result, for build output. */ export declare function formatVectorAdapterCoverageFailure(result: VectorAdapterCoverageResult): string;