import type { IBaselineRule } from '../baseline/baseline-rule.js'; import type { IRegistrationIdiom } from './registration-idiom.js'; import type { IRegistryDeclaration } from './registry-declaration.js'; import { type ExtractorMap } from './resolve-extractor-ref.js'; import type { IWiringRule } from './wiring-rule.js'; /** * Plane-wide `$use` resolution — one walk that rewrites EVERY source of every * data-defined rule against the named `extractors` map. * * It lives here, next to the rule types, because the alternative is each plane * remembering to resolve its own sources: the registry consumer side, the * wiring `chain` hops, the baseline compute. One forgotten site would leave an * unresolved `$use` reaching an engine, where it reads as "a source with no * files" and matches nothing — a silent pass, which is the exact failure this * plane exists to prevent. */ /** A rule whose `$use` could not be resolved, with the reason. */ export interface IExtractorRefError { /** Dotted path to the offending source, e.g. `wiringRules[handlers].declared`. */ readonly path: string; readonly message: string; } /** The config planes that carry extractor sources. */ export interface IExtractorHostPlanes { readonly wiringRules?: readonly IWiringRule[]; readonly registries?: readonly IRegistryDeclaration[]; readonly registrationGraph?: readonly IRegistrationIdiom[]; readonly baselines?: readonly IBaselineRule[]; } /** The rewritten planes plus every unresolvable reference found on the way. */ export interface IResolvedPlanes extends IExtractorHostPlanes { readonly errors: readonly IExtractorRefError[]; } /** * Rewrite every plane's sources with their `$use` references resolved. * * Planes absent from `planes` stay absent (rather than becoming empty arrays), * so a caller can spread the result over a config without inventing planes the * repo never declared. */ export declare function resolvePlaneExtractors(planes: IExtractorHostPlanes, extractors: ExtractorMap | undefined): IResolvedPlanes; //# sourceMappingURL=resolve-plane-extractors.d.ts.map