/**
 * Plugin Manager
 * Extensible plugin system with lifecycle hooks
 * Sealed namespace for immutability
 */
export type PluginHook = 'beforeStart' | 'afterStart' | 'beforeProcess' | 'afterProcess' | 'beforeStop' | 'afterStop' | 'onError' | 'onComplete' | 'onRetry' | 'onCircuitOpen' | 'onCircuitClose' | 'onScaleUp' | 'onScaleDown';
export type HookContext = {
    workerName: string;
    jobId?: string;
    version?: string;
    jobData?: unknown;
    error?: Error;
    metadata?: Record<string, unknown>;
    timestamp: Date;
};
export type HookResult = {
    modified?: boolean;
    jobData?: unknown;
    stop?: boolean;
    error?: Error;
};
export type PluginMetadata = {
    name: string;
    version: string;
    author?: string;
    description?: string;
    dependencies?: string[];
};
export type Plugin = {
    metadata: PluginMetadata;
    hooks: Partial<Record<PluginHook, PluginHookHandler>>;
    onEnable?: () => void | Promise<void>;
    onDisable?: () => void | Promise<void>;
};
export type PluginHookHandler = (context: HookContext) => HookResult | Promise<HookResult> | undefined | Promise<HookResult | undefined>;
export type RegisteredPlugin = {
    plugin: Plugin;
    enabled: boolean;
    registeredAt: Date;
    priority: number;
};
export type HookExecutionResult = {
    data: unknown;
    hook: PluginHook;
    executionTime: number;
    pluginsExecuted: number;
    errors: Array<{
        pluginName: string;
        error: Error;
    }>;
    context: HookContext;
    modified: boolean;
    stopped: boolean;
};
/**
 * Plugin Manager - Sealed namespace
 */
export declare const PluginManager: Readonly<{
    /**
     * Register a plugin
     */
    register(plugin: Plugin, priority?: number): Promise<void>;
    /**
     * Unregister a plugin
     */
    unregister(pluginName: string): Promise<void>;
    /**
     * Enable a plugin
     */
    enable(pluginName: string): Promise<void>;
    /**
     * Disable a plugin
     */
    disable(pluginName: string): Promise<void>;
    /**
     * Execute hooks for a lifecycle event
     */
    executeHook(hook: PluginHook, context: HookContext): Promise<HookExecutionResult>;
    /**
     * Get registered plugins
     */
    getPlugins(): ReadonlyArray<RegisteredPlugin & {
        name: string;
    }>;
    /**
     * Get plugin by name
     */
    getPlugin(pluginName: string): (RegisteredPlugin & {
        name: string;
    }) | null;
    /**
     * Check if plugin is registered
     */
    isRegistered(pluginName: string): boolean;
    /**
     * Check if plugin is enabled
     */
    isEnabled(pluginName: string): boolean;
    /**
     * Get hook execution history
     */
    getExecutionHistory(hook?: PluginHook, limit?: number): ReadonlyArray<HookExecutionResult>;
    /**
     * Get plugin statistics
     */
    getStatistics(): {
        totalPlugins: number;
        enabledPlugins: number;
        disabledPlugins: number;
        totalHookExecutions: number;
        hookExecutionsByType: Record<PluginHook, number>;
        averageExecutionTime: number;
        totalErrors: number;
    };
    /**
     * Clear execution history
     */
    clearHistory(): void;
    /**
     * Shutdown and disable all plugins
     */
    shutdown(): Promise<void>;
}>;
//# sourceMappingURL=PluginManager.d.ts.map