import type { SimEvent } from '../types/events.ts'; import type { SimComponent } from '../types/components.ts'; import type { FailureScenario } from '../types/failures.ts'; /** * Failure injector: converts FailureScenarios into timed SimEvents * and applies/removes failure effects on components. * * Validates: Requirements 9.1, 9.2, 9.3, 9.4, 9.5 */ export declare class FailureInjector { /** Set of currently disabled connection IDs (for network-partition) */ private disabledConnections; /** * Convert each FailureScenario into a pair of SimEvents (inject + recover) * and schedule them via the provided callback. * * Req 9.1: Failure scenarios trigger at configured simulation time. */ scheduleFailures(scenarios: FailureScenario[], scheduleEvent: (event: SimEvent) => void, nextId: () => string): void; /** * Handle a failure-inject or failure-recover event by applying or * removing the failure effect on the target component. */ handleFailureEvent(event: SimEvent, components: Map): void; /** * Check whether a connection is currently disabled by a network partition. * Req 9.5: network-partition disables a connection. */ isConnectionDisabled(connectionId: string): boolean; /** * Check whether traffic between two components is blocked by a network partition. * Checks bidirectionally: a partition on connection A→B blocks both A→B and B→A traffic. */ isPathBlocked(sourceId: string, targetId: string, connectionById: Map): boolean; /** Reset injector state */ reset(): void; private createInjectEvent; private createRecoverEvent; private getTargetId; private getRecoverTime; private createFailureWorkUnit; private extractScenarioDetails; private applyFailure; private removeFailure; } //# sourceMappingURL=failure-injector.d.ts.map