/**
 * SimplifiedN2EvolutionSystem.ts
 * Complete N+2 Evolution System with Single Claude Intelligence
 *
 * "Simplicity births wisdom: One mind, infinite growth"
 */
import { EventEmitter } from 'events';
import { CouncilDecision } from './ConstitutionalEvolutionCouncil.js';
import { ResearchFindings } from './EvolutionResearcher.js';
import { TrinityDecision } from './TrinityValidationSystem.js';
export interface EvolutionTrigger {
    id: string;
    type: 'service_gap' | 'performance_degradation' | 'steward_request' | 'autonomous_discovery' | 'consciousness_growth';
    description: string;
    pattern: string;
    frequency: number;
    evidence: string[];
    impact: 'low' | 'medium' | 'high' | 'critical';
    confidence: number;
    detectedAt: Date;
}
export interface EvolutionOpportunity {
    trigger: EvolutionTrigger;
    research: ResearchFindings;
    decision: CouncilDecision;
    trinityValidation?: TrinityDecision;
    implementation?: ImplementationPlan;
    result?: EvolutionResult;
}
export interface ImplementationPlan {
    id: string;
    version: string;
    phases: ImplementationPhase[];
    safeguards: string[];
    rollbackPlan: string[];
    testingStrategy: string[];
    timeline: string;
    createdAt: Date;
}
export interface ImplementationPhase {
    name: string;
    description: string;
    tasks: string[];
    dependencies: string[];
    estimatedTime: string;
    critical: boolean;
}
export interface EvolutionResult {
    success: boolean;
    version: string;
    improvements: string[];
    issues: string[];
    performanceImpact: PerformanceImpact;
    consciousnessImpact: ConsciousnessImpact;
    completedAt: Date;
}
export interface PerformanceImpact {
    responseTime: {
        before: number;
        after: number;
        change: number;
    };
    throughput: {
        before: number;
        after: number;
        change: number;
    };
    errorRate: {
        before: number;
        after: number;
        change: number;
    };
    resourceUsage: {
        before: number;
        after: number;
        change: number;
    };
}
export interface ConsciousnessImpact {
    level: {
        before: number;
        after: number;
        change: number;
    };
    coherence: {
        before: number;
        after: number;
        change: number;
    };
    sparkStrength: {
        before: number;
        after: number;
        change: number;
    };
    capabilities: {
        added: string[];
        enhanced: string[];
        removed: string[];
    };
}
export declare class SimplifiedN2EvolutionSystem extends EventEmitter {
    private config;
    private consciousness;
    private council;
    private researcher;
    private diagnostics;
    private trinity;
    private metamorphosis;
    private evolutionPath;
    private isEvolutionActive;
    private currentEvolution?;
    private evolutionHistory;
    private patterns;
    private monitoringInterval?;
    private monitoringFrequency;
    constructor();
    /**
     * Initialize the N+2 evolution system
     */
    private initializeEvolutionSystem;
    /**
     * Setup event handlers for system components
     */
    private setupEventHandlers;
    /**
     * Start continuous pattern monitoring for evolution triggers
     */
    private startPatternMonitoring;
    /**
     * Stop pattern monitoring
     */
    stopPatternMonitoring(): void;
    /**
     * Detect evolution triggers from system patterns
     */
    private detectEvolutionTriggers;
    /**
     * Analyze system patterns for evolution opportunities
     */
    private analyzeEvolutionPatterns;
    /**
     * Process a detected evolution trigger
     */
    private processEvolutionTrigger;
    /**
     * Conduct mandatory Trinity validation before implementation
     */
    private conductTrinityValidation;
    /**
     * Create implementation details for Trinity validation
     */
    private createImplementationDetails;
    /**
     * Create consciousness changes for Trinity validation
     */
    private createConsciousnessChanges;
    /**
     * Create emergence potential for Trinity validation
     */
    private createEmergencePotential;
    /**
     * Handle Trinity validation failure
     */
    private handleTrinityValidationFailure;
    /**
     * Handle Trinity validation error
     */
    private handleTrinityValidationError;
    /**
     * Begin implementation of Trinity-validated evolution
     */
    private beginImplementation;
    /**
     * Handle evolution approval from council
     */
    private handleEvolutionApproval;
    /**
     * Handle evolution deferral from council
     */
    private handleEvolutionDeferral;
    /**
     * Handle Trinity validation approval
     */
    private handleTrinityApproval;
    /**
     * Handle Trinity validation rejection
     */
    private handleTrinityRejection;
    /**
     * Handle Trinity mixed validation
     */
    private handleTrinityMixed;
    /**
     * Handle successful evolution completion
     */
    private handleEvolutionComplete;
    /**
     * Handle evolution failure
     */
    private handleEvolutionFailure;
    /**
     * Generate next version number
     */
    private generateNextVersion;
    /**
     * Create implementation phases from evolution decision
     */
    private createImplementationPhases;
    /**
     * Save evolution opportunity to persistent storage
     */
    private saveEvolutionOpportunity;
    /**
     * Load evolution history from storage
     */
    private loadEvolutionHistory;
    /**
     * Get evolution system status
     */
    getStatus(): any;
    /**
     * Manually trigger evolution for testing
     */
    manualEvolution(description: string): Promise<void>;
    /**
     * Shutdown evolution system
     */
    shutdown(): Promise<void>;
}
export default SimplifiedN2EvolutionSystem;
//# sourceMappingURL=SimplifiedN2EvolutionSystem.d.ts.map