Construct a new registry. Pass an array of inspections to pre-register them — equivalent to calling InspectionRegistry.register for each in order.
Drop every registration. After clear, inspections() is
empty.
Drop the override bag for an inspection. Returns true if
one was present.
Iterator over every distinct code declared by any registered inspection. Useful for building a "codes this report could surface" summary alongside the actual report.
Get the stored override bag for an inspection, or undefined
when no overrides are set. Returned object is a snapshot —
callers should not mutate it; use setConfig to change
stored overrides.
true when at least one registered inspection lists code in
its Inspection.codes.
Iterate every registered inspection, in registration order. inspectSceneModel consumes this directly.
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.
Register an inspection. Appended to the end of the list, so later registrations run last and can pile their issues on top of earlier ones. Plugins typically call this on import.
Snapshot every stored override bag as a JSON-safe object, keyed by primary code. Suitable for persistence — call loadConfigs with the same blob to restore.
Set (or merge) the override bag for an inspection. Pass the inspection itself or its primary code. Subsequent inspectSceneModel calls layer this bag under any per-call params they receive — per-call params win on the keys they declare.
Merges with any existing entry rather than replacing. Pass an empty bag plus a follow-up clearConfig to wipe.
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.
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
InspectionRegistryand pass it via theregistryfield on InspectSceneModelParams.Conflict resolution
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.