/** * Candidate Rule Proposer * * Turns a confirmed miss into a *candidate* detection rule, parked in a * "proposed" state (enabled:false) so it cannot affect certification until a * human promotes it. This is the "miss -> candidate rule" link of the * human-in-the-loop self-improvement loop. * * Safety property: a proposed rule is `enabled:false` and tagged * `metadata.state="proposed"`, so even if its YAML is accidentally placed in * an active rules directory it will not fire. Only {@link promoteRule} * (gated on a human approver + passing eval) activates it. * * @module scanners/detection/rules/proposer */ import type { DetectionRule } from "../types.js"; import type { MissEntry } from "../../fn-feedback.js"; /** * Build a candidate rule (parked, disabled) from a logged miss. */ export declare function proposeRuleFromMiss(miss: MissEntry): { rule: DetectionRule; yaml: string; }; /** Persist a proposed rule YAML; returns the path written. */ export declare function writeProposedRule(dir: string, rule: DetectionRule): Promise; export declare function loadProposedRules(dir: string): Promise; export interface PromoteOptions { approvedBy: string; /** Reference to a passing eval report (the machine gate). */ evalReportId: string; } export declare class RulePromotionError extends Error { constructor(message: string); } /** * Promote a proposed rule to active — the ONLY path that activates a rule. * Refuses without a human approver and a referenced passing eval report. * Moves the YAML from the proposed dir to the active dir with * `enabled:true` and `metadata.state="active"`. */ export declare function promoteRule(proposedDir: string, activeDir: string, ruleId: string, options: PromoteOptions): Promise; //# sourceMappingURL=proposer.d.ts.map