Construct a new registry. Pass an array of strategies to pre-register them — equivalent to calling FixRegistry.register for each in order.
Drop every registration. After clear, has(code) is false
for every code.
Drop the override bag for a fix. Returns true if one was
present.
Iterator over every code that has a registered strategy. Useful for building a "what can we auto-fix?" summary alongside an inspection report.
Iterator over every distinct Fix registered. One
strategy can claim multiple codes (fix.codes[]), so this
deduplicates — each strategy appears once regardless of how
many codes it owns. Useful for UI code that wants to render
one entry per strategy (e.g. an "Inspection settings" panel
with one row per fix).
Look up the strategy currently registered under code, or
undefined when no strategy claims it.
true when a strategy is registered for code.
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-fix fields the caller didn't touch. Codes the caller didn't supply keep their current overrides; orphan codes (no matching registered fix) are accepted — they sit idle until that fix is registered.
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 a fix. Pass the fix itself or its primary code. Subsequent applyFixes calls layer this bag under any per-call overrides — per-call overrides 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.
Remove the strategy registered under code. Returns true if
one was present, false otherwise.
If the strategy that owned code also handled other codes,
those other codes remain pointed at it — only the named code
is detached.
Pluggable lookup table mapping issue codes to fix strategies. Plays the role of
eslint's rule registry / IntelliJ'sLocalQuickFixProviderregistry: callers register strategies once and every subsequent applyFixes run dispatches through the same registry.The SDK ships a pre-populated singleton at DEFAULT_FIX_REGISTRY. Plugins typically register additional strategies into that singleton on import — every call to applyFixes then sees them automatically. Tests, custom pipelines, or code that needs to work in isolation can build a fresh
FixRegistryand pass it toapplyFixesdirectly.Conflict resolution
A Fix declares the codes it handles in Fix.codes. When
registeris called the strategy is stored under each of those codes. Last registration wins — a later registration for an existing code overrides the earlier one. This matches plugin-framework convention: bring your own override later in the load order.Use FixRegistry.unregister to remove all registrations for a code, or FixRegistry.clear to start over.