import type { Rule, RuleFileStructureArtifact } from './rule-matcher.js'; type RuleSet = Array>; type DeepReadonly = T extends readonly unknown[] ? { readonly [K in keyof T]: DeepReadonly } : T extends object ? { readonly [K in keyof T]: DeepReadonly } : T; export type ResolvedRuleSet = ReadonlyArray>>; type RuleDomain = 'kernels' | 'inference' | 'shared' | 'loader' | 'converter' | 'tooling'; type KernelRuleGroup = | 'attention' | 'conv2d' | 'dequant' | 'energy' | 'fusedFfn' | 'fusedMatmulResidual' | 'fusedMatmulRmsnorm' | 'gather' | 'gelu' | 'groupnorm' | 'kv_quantize' | 'layernorm' | 'matmul' | 'moe' | 'moeGptoss' | 'moeMixtral' | 'residual' | 'rmsnorm' | 'rope' | 'sample' | 'scale' | 'silu' | 'splitQkv' | 'softmax' | 'upsample2d'; type RuleGroup = KernelRuleGroup | string; export declare function getRuleSet(domain: RuleDomain, group: RuleGroup, name: string): ResolvedRuleSet; export declare function selectRuleValue( domain: RuleDomain, group: RuleGroup, name: string, context: Record ): T; export declare function registerRuleGroup( domain: RuleDomain, group: RuleGroup, rules: Record ): void; export declare function getInferenceExecutionRulesContractArtifact(): RuleFileStructureArtifact; export declare function getInferenceLayerPatternContractArtifact(): RuleFileStructureArtifact; export interface RuleRegistry { readonly identity: string; readonly ruleSets: Readonly>>>>>; getRuleSet(domain: string, group: string, name: string): ResolvedRuleSet; selectRuleValue(domain: string, group: string, name: string, context: Record): T; } export declare function createRuleRegistry(options?: { base?: RuleRegistry | null; extensions?: Array<{ domain: string; group: string; rules: Record }>; }): RuleRegistry; export declare const DEFAULT_RULE_REGISTRY: RuleRegistry; export declare function isRuleRegistry(value: unknown): value is RuleRegistry; export declare function getRuleRegistry(): RuleRegistry; /** Internal compatibility lease; caller must serialize the entire operation. */ export declare function enterRuleRegistry(registry: RuleRegistry): () => void; export declare function getDefaultRuleRegistry(): RuleRegistry;