/**
 * Background Agent Manager
 * Continuous debugging companions inspired by Wordware's background agents concept
 */
import { EventEmitter } from 'events';
import { BackgroundAgentConfig, DebugContext } from '../types/enhanced-tool-metadata';
export interface BackgroundAgent {
    id: string;
    name: string;
    description: string;
    status: 'idle' | 'running' | 'paused' | 'error';
    config: BackgroundAgentConfig;
    lastExecution: Date | null;
    executionCount: number;
    findings: AgentFinding[];
}
export interface AgentFinding {
    id: string;
    agentId: string;
    timestamp: Date;
    severity: 'info' | 'warning' | 'error' | 'critical';
    category: string;
    title: string;
    description: string;
    context: any;
    actionable: boolean;
    autoFixAvailable: boolean;
    humanEscalationNeeded: boolean;
}
export interface HumanEscalationRequest {
    id: string;
    agentId: string;
    reason: 'approval_needed' | 'unknown_error' | 'context_missing' | 'user_input_required';
    description: string;
    suggestedActions: string[];
    urgency: 'low' | 'medium' | 'high' | 'critical';
    context: any;
}
/**
 * Core Background Agent Manager
 * Orchestrates multiple background debugging agents
 */
export declare class BackgroundAgentManager extends EventEmitter {
    private agents;
    private activeTimers;
    private escalationQueue;
    private debugContext;
    constructor();
    /**
     * Initialize default background debugging agents
     */
    private initializeDefaultAgents;
    /**
     * Register a new background agent
     */
    registerAgent(agent: BackgroundAgent): void;
    /**
     * Start a background agent
     */
    startAgent(agentId: string): Promise<void>;
    /**
     * Stop a background agent
     */
    stopAgent(agentId: string): Promise<void>;
    /**
     * Pause a background agent (can be resumed)
     */
    pauseAgent(agentId: string): Promise<void>;
    /**
     * Execute an agent's monitoring logic
     */
    private executeAgent;
    /**
     * Execute agent-specific monitoring logic
     */
    private executeAgentLogic;
    /**
     * Performance Watcher execution logic
     * REAL IMPLEMENTATION - No fake functionality
     */
    private executePerformanceWatcher;
    /**
     * Error Sentinel execution logic
     * REAL IMPLEMENTATION - No fake functionality
     */
    private executeErrorSentinel;
    /**
     * Accessibility Guardian execution logic
     * REAL IMPLEMENTATION - No fake functionality
     */
    private executeAccessibilityGuardian;
    /**
     * Regression Detective execution logic
     * REAL IMPLEMENTATION - No fake functionality
     */
    private executeRegressionDetective;
    /**
     * Escalate findings to human attention
     */
    private escalateToHuman;
    /**
     * Generate suggested actions for human escalation
     */
    private generateSuggestedActions;
    /**
     * Attempt automatic fix for issues that support it
     */
    private attemptAutoFix;
    /**
     * Update debug context for all agents
     */
    updateDebugContext(context: DebugContext): void;
    /**
     * Get all agent findings
     */
    getAllFindings(): AgentFinding[];
    /**
     * Get pending human escalations
     */
    getPendingEscalations(): HumanEscalationRequest[];
    /**
     * Resolve a human escalation
     */
    resolveEscalation(escalationId: string, resolution: string): void;
    /**
     * Get agent status summary
     */
    getAgentStatusSummary(): {
        agentId: string;
        name: string;
        status: string;
        findings: number;
    }[];
    /**
     * Start all agents
     */
    startAllAgents(): Promise<void>;
    /**
     * Stop all agents
     */
    stopAllAgents(): Promise<void>;
    /**
     * Helper methods for real implementations - No fake functionality
     */
    /**
     * Get performance metrics from active debug session
     */
    private getActiveSessionPerformanceMetrics;
    /**
     * Get console errors from active debug session
     */
    private getActiveSessionConsoleErrors;
    /**
     * Group errors by pattern for analysis
     */
    private groupErrorsByPattern;
    /**
     * Calculate error severity based on error characteristics
     */
    private calculateErrorSeverity;
    /**
     * Calculate current error rate (errors per minute)
     */
    private calculateErrorRate;
    /**
     * Get accessibility audit results from active debug session
     */
    private getActiveSessionAccessibilityResults;
    /**
     * Check if auto-fix is available for accessibility violations
     */
    private hasAutoFixForA11yViolations;
    /**
     * Get previous accessibility score for comparison
     */
    private getPreviousAccessibilityScore;
    /**
     * Capture current screenshot for visual regression testing
     */
    private captureCurrentScreenshot;
    /**
     * Get baseline screenshot for comparison
     */
    private getBaselineScreenshot;
    /**
     * Compare two screenshots for visual differences
     */
    private compareScreenshots;
    /**
     * Set baseline screenshot for future comparisons
     */
    private setBaselineScreenshot;
    /**
     * Detect layout shifts in the current page
     */
    private detectLayoutShifts;
}
//# sourceMappingURL=background-agent-manager.d.ts.map