export { BaselineStore, baselineStore } from './baseline.js'; export { TripwireInjector, tripwireInjector } from './tripwire.js'; export { CircuitBreaker, circuitBreaker } from './circuit-breaker.js'; export { ContinuousMonitor } from './monitor.js'; import { BaselineStore } from './baseline.js'; import { TripwireInjector } from './tripwire.js'; import { CircuitBreaker } from './circuit-breaker.js'; import { ContinuousMonitor } from './monitor.js'; export declare class DriftDetectionEngine { baselineStore: BaselineStore; tripwireInjector: TripwireInjector; circuitBreaker: CircuitBreaker; monitor: ContinuousMonitor; constructor(); /** * Enable or disable the entire drift detection system. */ setEnabled(enabled: boolean): void; /** * Get comprehensive drift status for an agent. */ getAgentStatus(agentId: string): { baselines: number; tripwireFailureRate: number; circuitBreakerAlerts: import("../index.js").DriftAlert[]; metrics: import("../types/index.js").DriftMetrics; circuitState: string; isAllowed: boolean; driftScore: number; operationCount: number; circuitBreakerState: "closed" | "open" | "half-open"; }; /** * Get system-wide statistics. */ getSystemStats(): { tripwires: { totalTests: number; passed: number; failed: number; validTripwiresPassed: number; invalidTripwiresRejected: number; }; circuitBreakers: { totalAgents: number; closedCircuits: number; openCircuits: number; halfOpenCircuits: number; totalAlerts: number; criticalAlerts: number; }; baselines: number; agents: number; }; /** * Recalibrate an agent (reset to baseline). */ recalibrateAgent(agentId: string): void; /** * Reset the entire system. */ reset(): void; /** * Record an operation for drift tracking. * Returns a drift alert if threshold exceeded. */ recordOperation(agentId: string, frame: string, action: string, success: boolean): { type: string; message: string; } | null; /** * Get all agent IDs being tracked. */ getAllAgentIds(): string[]; /** * Get alerts for a specific agent. */ getAgentAlerts(agentId: string): Array<{ alertId: string; agentId: string; timestamp: number; type: string; severity: string; message: string; }>; /** * Reset circuit breaker for agent. */ resetCircuitBreaker(agentId: string): void; /** * Reset drift metrics for agent. */ resetDriftMetrics(agentId: string): void; /** * Set baseline for an agent. */ setBaseline(agentId: string, frame: string, expectedBehavior: string[]): void; /** * Halt an agent by opening circuit breaker. */ haltAgent(agentId: string, reason: string): void; /** * Resume a halted agent. */ resumeAgent(agentId: string): void; /** * Alias for setBaseline - records a baseline for an agent. */ recordBaseline(agentId: string, frame: string, expectedBehavior: string[]): void; /** * Alias for getAgentStatus - gets the current state of an agent. */ getAgentState(agentId: string): { baselines: number; tripwireFailureRate: number; circuitBreakerAlerts: import("../index.js").DriftAlert[]; metrics: import("../types/index.js").DriftMetrics; circuitState: string; isAllowed: boolean; driftScore: number; operationCount: number; circuitBreakerState: "closed" | "open" | "half-open"; }; /** * Get circuit breaker status for an agent. * Returns the circuit breaker state information. */ getCircuitBreakerStatus(agentId: string): { state: 'CLOSED' | 'OPEN' | 'HALF_OPEN'; failureCount: number; successCount: number; openedAt?: number; lastFailure?: string; reason?: string; }; /** * Predict potential drift based on baseline comparison. * Returns a prediction based on comparing the frame and action against recorded baselines. */ predictDrift(agentId: string, frame: string, action: string): { hasBaseline: boolean; predictedDriftScore: number; riskLevel: 'low' | 'medium' | 'high' | 'critical'; recommendation: string; }; /** * Get drift history for an agent. */ getDriftHistory(agentId: string, since?: number, limit?: number): Array<{ timestamp: number; driftScore: number; frame: string; action: string; alert?: { type: string; message: string; }; }>; } export declare const driftEngine: DriftDetectionEngine; //# sourceMappingURL=index.d.ts.map