/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * In-memory `PolicyRegistry`. Stores per-(component, locale) policy entries and applies them to a * flat list of `ClassificationProposal`s. * * Mutation API (`set`, `remove`) lives here so that locale profiles (#6 §LocaleProfile) can install * per-locale overrides at startup. Look-up and `apply` are pure. */ import type { ClassificationProposal, ComponentTag } from "#types"; import type { ClassifierPolicy, PolicyMode, PolicyRegistry } from "./policy.ts"; /** * Concrete registry implementation. Construct empty with `new InMemoryPolicyRegistry()` and load entries via `set()`, * or pre-load defaults via `InMemoryPolicyRegistry.withDefaults()`. */ export declare class InMemoryPolicyRegistry implements PolicyRegistry { #private; /** * Build a registry pre-loaded with `mode` for every component (default `rule_only`). The input-shape router (#478) * passes a shape-derived default so the whole table starts from the routed prior. */ static withDefaults(mode?: PolicyMode): InMemoryPolicyRegistry; /** * Install a policy entry. Replaces any prior entry with the same key. */ set(policy: ClassifierPolicy): void; /** * Remove a policy entry, if present. */ remove(component: ComponentTag, locale?: string): void; /** * All current entries, in insertion order. */ entries(): ClassifierPolicy[]; lookup(component: ComponentTag, locale?: string): ClassifierPolicy; apply(proposals: readonly ClassificationProposal[], locale?: string): ClassificationProposal[]; } //# sourceMappingURL=registry.d.ts.map