/** * Agentic QE v3 - Cross-Domain Event Router * Routes events between all 12 domains, tracks correlations, and provides aggregation */ import { DomainName, DomainEvent } from '../shared/types'; import { EventBus } from '../kernel/interfaces'; import { CrossDomainRouter, EventCorrelation, EventAggregation, DomainRoute } from './interfaces'; export declare class CrossDomainEventRouter implements CrossDomainRouter { private readonly eventBus; private readonly subscriptions; private readonly correlations; private readonly eventHistory; private readonly routes; private readonly domainSubscriptions; private readonly maxHistorySize; private readonly correlationTimeout; private readonly maxEventsPerCorrelation; private initialized; constructor(eventBus: EventBus, options?: { maxHistorySize?: number; correlationTimeout?: number; maxEventsPerCorrelation?: number; }); /** * Initialize the router by subscribing to all domains */ initialize(): Promise; /** * Subscribe to events from a specific domain */ subscribeToDoamin(domain: DomainName, handler: (event: DomainEvent) => Promise): string; /** * Subscribe to specific event types */ subscribeToEventType(eventType: string, handler: (event: DomainEvent) => Promise): string; /** * Unsubscribe from events */ unsubscribe(subscriptionId: string): boolean; /** * Route an event to appropriate handlers */ route(event: DomainEvent): Promise; /** * Get correlation by ID */ getCorrelation(correlationId: string): EventCorrelation | undefined; /** * Track event for correlation */ trackCorrelation(event: DomainEvent): void; /** * Get aggregated events for a time window */ aggregate(windowStart: Date, windowEnd: Date): EventAggregation; /** * Get event history with optional filtering */ getHistory(filter?: { eventTypes?: string[]; domains?: DomainName[]; fromTimestamp?: Date; toTimestamp?: Date; limit?: number; }): DomainEvent[]; /** * Add a route for event forwarding */ addRoute(route: DomainRoute): void; /** * Remove a route */ removeRoute(eventPattern: string, source?: DomainName): boolean; /** * Dispose resources */ dispose(): Promise; /** * Handle incoming events from the event bus */ private handleIncomingEvent; /** * Find subscriptions matching an event */ private findMatchingSubscriptions; /** * Match event type against pattern (supports wildcards) */ private matchEventType; /** * Apply routes to forward events */ private applyRoutes; /** * Add event to history */ private addToHistory; } export declare function createCrossDomainRouter(eventBus: EventBus, options?: { maxHistorySize?: number; correlationTimeout?: number; maxEventsPerCorrelation?: number; }): CrossDomainRouter; //# sourceMappingURL=cross-domain-router.d.ts.map