/** * Plugin Event Bus - Centralized event management for plugins */ import { EventEmitter } from 'events'; export interface PluginEventData { pluginId: string; timestamp: Date; data?: any; } export interface EventSubscription { eventType: string; pluginId: string; handler: (data: any) => Promise | void; } export declare class PluginEventBus extends EventEmitter { private subscriptions; private eventHistory; private maxHistorySize; constructor(); /** * Subscribe to an event type */ subscribe(eventType: string, pluginId: string, handler: (data: any) => Promise | void): void; /** * Unsubscribe from an event type */ unsubscribe(eventType: string, pluginId: string): void; /** * Unsubscribe a plugin from all events */ unsubscribeAll(pluginId: string): void; /** * Publish an event */ publish(eventType: string, pluginId: string, data?: any): void; /** * Get event subscriptions for a plugin */ getSubscriptions(pluginId: string): Array<{ eventType: string; count: number; }>; /** * Get all active event types */ getActiveEventTypes(): string[]; /** * Get event statistics */ getEventStatistics(): { totalEventTypes: number; totalSubscriptions: number; eventHistory: number; subscriptionsByPlugin: Record; }; /** * Get recent event history */ getEventHistory(limit?: number): Array<{ event: string; data: PluginEventData; timestamp: Date; }>; /** * Clear event history */ clearHistory(): void; /** * Clean up resources */ cleanup(): void; private addToHistory; } export declare const CommonPluginEvents: { readonly SYSTEM_STARTUP: "system:startup"; readonly SYSTEM_SHUTDOWN: "system:shutdown"; readonly PROJECT_OPENED: "project:opened"; readonly PROJECT_CLOSED: "project:closed"; readonly PROJECT_CHANGED: "project:changed"; readonly FILE_CREATED: "file:created"; readonly FILE_MODIFIED: "file:modified"; readonly FILE_DELETED: "file:deleted"; readonly FILE_RENAMED: "file:renamed"; readonly CODE_GENERATED: "code:generated"; readonly CODE_ANALYZED: "code:analyzed"; readonly CODE_FORMATTED: "code:formatted"; readonly BUILD_STARTED: "build:started"; readonly BUILD_COMPLETED: "build:completed"; readonly BUILD_FAILED: "build:failed"; readonly TEST_STARTED: "test:started"; readonly TEST_COMPLETED: "test:completed"; readonly TEST_FAILED: "test:failed"; readonly DEPLOY_STARTED: "deploy:started"; readonly DEPLOY_COMPLETED: "deploy:completed"; readonly DEPLOY_FAILED: "deploy:failed"; readonly AI_REQUEST_STARTED: "ai:request:started"; readonly AI_REQUEST_COMPLETED: "ai:request:completed"; readonly AI_REQUEST_FAILED: "ai:request:failed"; readonly SECURITY_SCAN_COMPLETED: "security:scan:completed"; readonly VULNERABILITY_FOUND: "security:vulnerability:found"; readonly PLUGIN_INSTALLED: "plugin:installed"; readonly PLUGIN_UNINSTALLED: "plugin:uninstalled"; readonly PLUGIN_ACTIVATED: "plugin:activated"; readonly PLUGIN_DEACTIVATED: "plugin:deactivated"; readonly PLUGIN_ERROR: "plugin:error"; }; //# sourceMappingURL=event-bus.d.ts.map