Pluggable list of inspections that inspectSceneModel runs against a SceneModel. Mirrors FixRegistry — same conventions, complementary half of the pipeline.

The SDK ships a pre-populated singleton at DEFAULT_INSPECTION_REGISTRY. Plugins typically register additional inspections into that singleton on import — every call to inspectSceneModel then sees them automatically. Tests, custom pipelines, or code that needs to work in isolation can build a fresh InspectionRegistry and pass it via the registry field on InspectSceneModelParams.

An Inspection declares the codes it can emit in Inspection.codes. Last registration wins for any given code — a later registration claims the code, but the earlier inspection still runs (registry's lookup is a list, not a per-code map). This differs slightly from FixRegistry: there's only one fix per code, but any number of inspections can contribute to the same report.

Use InspectionRegistry.unregister to remove all registrations for a code, or InspectionRegistry.clear to start over.

Constructors

Methods

  • Hydrate stored overrides from a serializeConfigs blob. Each code's bag is merged with any existing entry (last-write-wins on overlapping keys), so a partial blob overlays cleanly without wiping per-inspection fields the caller didn't touch. Codes the caller didn't supply keep their current overrides; orphan codes (no matching registered inspection) are accepted — they sit idle until that inspection is registered.

    Parameters

    • blob: Record<string, Record<string, unknown>>

    Returns void

  • Unregister every inspection that claims code. Returns the number of inspections removed.

    If a removed inspection also handled other codes, those other codes are dropped along with it — unregister is a per-rule eject, not per-code.

    Parameters

    • code: string

    Returns number