/**
 * Worker Management System Initializer
 *
 * Handles initialization and lifecycle management of the worker management system.
 * - Registers shutdown handlers
 * - Initializes monitoring and resource management
 * - Sets up auto-scaling and health checks
 * - Ensures graceful startup and shutdown
 */
import type { WorkerPersistenceConfig } from './WorkerFactory';
export interface IWorkerInitOptions {
    /**
     * Whether to start resource monitoring on initialization
     * @default true
     */
    enableResourceMonitoring?: boolean;
    /**
     * Whether to start health monitoring on initialization
     * @default true
     */
    enableHealthMonitoring?: boolean;
    /**
     * Whether to start auto-scaling on initialization
     * @default false - must be explicitly enabled
     */
    enableAutoScaling?: boolean;
    /**
     * Whether to register graceful shutdown handlers
     * @default true
     */
    registerShutdownHandlers?: boolean;
    /**
     * Resource monitoring interval in milliseconds
     * @default 60000 (1 minute)
     */
    resourceMonitoringInterval?: number;
}
interface IInitState {
    initialized: boolean;
    initializedAt: Date | null;
    resourceMonitoring: boolean;
    healthMonitoring: boolean;
    autoScaling: boolean;
    shutdownHandlersRegistered: boolean;
}
type AutoStartCandidate = {
    name: string;
    autoStart: boolean;
    activeStatus?: boolean;
};
type PersistenceOverride = WorkerPersistenceConfig;
type AutoStartTask = AutoStartCandidate & {
    persistenceOverride: PersistenceOverride;
    source: 'database' | 'redis' | 'memory' | 'file';
};
export declare const buildFileBackedAutoStartTasks: (records: AutoStartCandidate[], warn?: (message: string) => void) => AutoStartTask[];
export declare const selectAutoStartTasks: (persistedTasks: AutoStartTask[], fileRecords: AutoStartCandidate[], warn?: (message: string) => void) => AutoStartTask[];
export declare const selectAutoStartNames: (persistedRecords: AutoStartCandidate[], fileRecords: AutoStartCandidate[], warn?: (message: string) => void) => {
    names: string[];
    source: "persisted" | "file" | "none";
};
/**
 * Initialize the worker management system
 */
declare function initialize(options?: IWorkerInitOptions): Promise<void>;
declare function autoStartPersistedWorkers(): Promise<void>;
/**
 * Check if worker management system is initialized
 */
declare function isInitialized(): boolean;
/**
 * Get initialization state
 */
declare function getInitState(): Readonly<IInitState>;
/**
 * Graceful shutdown of worker management system
 * (convenience method that delegates to WorkerShutdown)
 */
declare function shutdown(): Promise<void>;
export declare const WorkerInit: Readonly<{
    /**
     * Initialize the worker management system
     */
    initialize: typeof initialize;
    /**
     * Check if worker management system is initialized
     */
    isInitialized: typeof isInitialized;
    /**
     * Get initialization state
     */
    getInitState: typeof getInitState;
    /**
     * Graceful shutdown of worker management system
     */
    shutdown: typeof shutdown;
    /**
     * Start persisted workers after boot completes
     */
    autoStartPersistedWorkers: typeof autoStartPersistedWorkers;
}>;
export {};
//# sourceMappingURL=WorkerInit.d.ts.map