import { RuleMetaVerifier } from './rule-meta-verifier.js'; import { RuleConflictDetector, type ConflictReport } from './rule-conflict-detector.js'; import { RuleCanaryDeployer } from './rule-canary-deployer.js'; import type { VerificationRule, RuleMetaVerification, ModificationProposal, ModificationApproval, ProposalStatus } from './types.js'; export interface PendingRuleApproval { readonly proposal: ModificationProposal; readonly metaVerification: RuleMetaVerification; readonly conflictReport: ConflictReport; readonly ruleDefinition: VerificationRule; } export declare class RuleProposalManager { private metaVerifier; private conflictDetector; private canaryDeployer; private pendingApprovals; private activeRules; constructor(opts?: { metaVerifier?: RuleMetaVerifier; conflictDetector?: RuleConflictDetector; canaryDeployer?: RuleCanaryDeployer; existingRules?: VerificationRule[]; }); /** * Propose a new verification rule. * Runs meta-verification and conflict detection, then queues for approval. */ propose(rule: VerificationRule, justification: { capability_gap: string; evidence: string[]; expected_impact: string; risk_assessment: string; }): Promise<{ proposalId: string; metaVerification: RuleMetaVerification; conflictReport: ConflictReport; status: ProposalStatus; }>; /** * List all pending rule approvals. */ listPending(): PendingRuleApproval[]; /** * Get a specific pending approval. */ getPending(proposalId: string): PendingRuleApproval | undefined; /** * Approve a pending rule proposal. * Starts the canary deployment pipeline. */ approve(proposalId: string, approvedBy: string, reasoning: string): { approval: ModificationApproval; rule: VerificationRule; canaryStage: string; }; /** * Reject a pending rule proposal. */ reject(proposalId: string, rejectedBy: string, reasoning: string): ModificationApproval; /** * Check if a canary rule is ready to promote. */ checkCanaryPromotion(ruleId: string): { action: 'promote' | 'wait' | 'rollback'; nextStage?: string; reason: string; }; /** * Promote a canary rule to the next stage. * When promoted to full_rollout, adds to active rules. */ promoteCanary(ruleId: string): { promoted: boolean; stage: string; isActive: boolean; }; /** * Rollback a canary deployment. */ rollbackCanary(ruleId: string): { success: boolean; reason: string; }; /** * Get the canary deployer (for recording evaluations externally). */ getCanaryDeployer(): RuleCanaryDeployer; /** * Get all active rules. */ getActiveRules(): readonly VerificationRule[]; /** * Add a rule to the active set (used when loading from registry). */ addActiveRule(rule: VerificationRule): void; }