/** * Rule Host Evaluator �?Pure decision merge logic * * PURPOSE: Iterate loaded code implementations and merge their decisions. * Block short-circuits, auto_correct collects (validated), requireApproval * collects, allow is implicit. * * Precedence: block > auto_correct > requireApproval > allow * * PRI-45: Pure function extracted from the plugin's RuleHost.evaluate(). * PRI-114: Added auto_correct handling with fail-closed validation. * No filesystem, no VM, no side effects. */ import type { RuleHostInput, RuleHostResult, LoadedImplementation } from './rule-host-contracts.js'; export interface DecisionMergeLogger { warn?: (_message: string) => void; onImplementationUnhealthy?: (_implementation: LoadedImplementation, _reason: string) => void; } /** * Alias for consumers that prefer the RuleHost naming convention. * @deprecated Use DecisionMergeLogger instead. */ export type RuleHostLogger = DecisionMergeLogger; /** * Merge decisions from multiple loaded implementations. * * Rules: * - If any implementation returns `block`, short-circuit and return block. * - `auto_correct` proposals are collected and validated. * First valid proposal wins. Invalid proposals are logged and skipped. * - Collect all `requireApproval` results and merge their reasons/diagnostics. * - `allow` results are ignored (no opinion). * - Individual implementation errors are logged and skipped. * - Outer errors return undefined (conservative degradation D-08). */ export declare function mergeDecisions(implementations: readonly LoadedImplementation[], input: RuleHostInput, logger?: DecisionMergeLogger): RuleHostResult | undefined; //# sourceMappingURL=rule-host-evaluator.d.ts.map