UNPKG

agentic-qe

Version:

Agentic Quality Engineering Fleet System - AI-driven quality management platform

62 lines 2.15 kB
/// <reference types="node" /> import { EventEmitter } from 'events'; import { SwarmMemoryManager } from '../memory/SwarmMemoryManager'; import { EventHandler } from './types'; /** * QE Event Bus for real-time agent coordination * * Provides event-driven communication between agents with optional * persistence to SwarmMemoryManager for event history and auditing. */ export declare class QEEventBus extends EventEmitter { private memory?; private isActive; constructor(memory?: SwarmMemoryManager); /** * Subscribe to an event type * @param event Event name to subscribe to * @param handler Handler function to call when event is emitted */ subscribe<T = any>(event: string, handler: EventHandler<T>): void; /** * Unsubscribe from an event type * @param event Event name to unsubscribe from * @param handler Handler function to remove */ unsubscribe<T = any>(event: string, handler: EventHandler<T>): void; /** * Emit an event to all subscribers and optionally persist to memory * @param event Event name to emit * @param data Event data payload */ emitAsync(event: string, data: any): Promise<boolean>; /** * Emit an event once - will be automatically unsubscribed after first call * @param event Event name to subscribe to * @param handler Handler function */ subscribeOnce<T = any>(event: string, handler: EventHandler<T>): this; /** * Get all event names currently being listened to */ getEventNames(): (string | symbol)[]; /** * Get listener count for a specific event * @param event Event name */ getListenerCount(event: string): number; /** * Remove all listeners for a specific event or all events * @param event Optional event name - if not provided, removes all listeners */ removeAllListeners(event?: string): this; /** * Shutdown the event bus and stop emitting events */ shutdown(): Promise<void>; /** * Check if event bus is active */ isEventBusActive(): boolean; } //# sourceMappingURL=QEEventBus.d.ts.map