One pluggable check in the DataModel inspector pipeline. Mirrors Inspection without the fix half — SDK policy is to surface defects in user data, not auto-mutate.

interface Inspection {
    codes: string[];
    description: string;
    descriptions?: Record<string, string>;
    labels?: Record<string, string>;
    optIn?: boolean;
    paramsKey?: string;
    schemas?: readonly string[];
    run(
        dataModel: DataModel,
        params: InspectDataModelParams,
    ): inspect.dataModel.Issue[];
}

Properties

codes: string[]

Issue codes this inspection can emit.

description: string
descriptions?: Record<string, string>

Per-code plain-English descriptions for "What is this?" tooltips. Resolve via descriptionForCode.

labels?: Record<string, string>

Per-code human-readable labels for UI rendering. Resolve via labelForCode.

optIn?: boolean

When true, the inspection runs only when a matching check… flag is set on params.

paramsKey?: string

For opt-in inspections — the InspectDataModelParams key that gates the work. Metadata only; the orchestrator doesn't read it.

schemas?: readonly string[]

When set, restricts this inspection to DataModels whose schema id matches one of these. The orchestrator resolves the model's schema id as params.schema?.id ?? dataModel.schema and skips the inspection when neither side is set or the resolved id isn't in the list.

Schema-agnostic inspections leave this undefined — they run regardless of schema id.

Methods