import type { ContextMetadata, EvaluationResult } from '../types/context-types';
import type { ValidationResult, EvaluationType } from '../types/base-types';
import type { LLMDocumentation } from '../types/command-types';
export declare const WebWorkerInputSchema: import("../validation/lightweight-validators").RuntimeValidator<unknown>;
export declare const WebWorkerOutputSchema: import("../validation/lightweight-validators").RuntimeValidator<unknown>;
export type WebWorkerInput = any;
export type WebWorkerOutput = any;
export interface WorkerInstance {
    id: string;
    name?: string;
    worker: Worker;
    script: string;
    type: 'module' | 'classic';
    state: 'starting' | 'running' | 'terminating' | 'terminated' | 'error';
    createdAt: number;
    lastMessageTime: number;
    messageCount: number;
    errorCount: number;
    isTerminating: boolean;
}
export interface WorkerMessage {
    id: string;
    workerId: string;
    type: 'outgoing' | 'incoming';
    data: any;
    transferables?: Transferable[];
    timestamp: number;
    format: 'json' | 'text' | 'binary';
    size?: number;
    error?: Error;
}
export interface WorkerEventHandler {
    id: string;
    workerId: string;
    eventType: 'message' | 'error' | 'messageerror';
    commands: any[];
    filter?: string;
    options?: {
        throttle?: number;
        debounce?: number;
    };
    isActive: boolean;
    executionCount: number;
    lastExecutionTime: number;
}
export declare class TypedWebWorkerFeatureImplementation {
    readonly name = "webworkerFeature";
    readonly category: "Frontend";
    readonly description = "Type-safe Web Worker management feature with message handling, event processing, and comprehensive error management";
    readonly inputSchema: import("../validation/lightweight-validators").RuntimeValidator<unknown>;
    readonly outputType: EvaluationType;
    private evaluationHistory;
    private workers;
    private messageHistory;
    private eventHandlers;
    private messageQueue;
    private errorHistory;
    private throttleTimers;
    private debounceTimers;
    readonly metadata: ContextMetadata;
    readonly documentation: LLMDocumentation;
    initialize(input: WebWorkerInput): Promise<EvaluationResult<WebWorkerOutput>>;
    validate(input: unknown): ValidationResult;
    private initializeConfig;
    private createWorker;
    private handleWorkerMessage;
    private handleWorkerError;
    private handleWorkerMessageError;
    private processEventHandlers;
    private executeEventHandler;
    private executeCommands;
    private executeBasicCommand;
    private isValidWorkerScript;
    private detectMessageFormat;
    private testMessageFilter;
    private isThrottled;
    private applyDebounce;
    private createWorkerCreator;
    private createWorkerTerminator;
    private createWorkerRestarter;
    private createWorkerGetter;
    private createWorkerLister;
    private createWorkerInfoGetter;
    private createMessageSender;
    private createJSONSender;
    private createBinarySender;
    private createBroadcaster;
    private createMessageHistoryGetter;
    private createMessageSubscriber;
    private createMessageUnsubscriber;
    private createEventHandlerAdder;
    private createEventHandlerRemover;
    private createEventHandlerGetter;
    private createEventEmitter;
    private createQueueAdder;
    private createQueueProcessor;
    private createQueueSizeGetter;
    private createPendingGetter;
    private createQueueClearer;
    private createErrorHandler;
    private createErrorHistoryGetter;
    private createErrorClearer;
    private createErrorHandlerSetter;
    private trackPerformance;
    getPerformanceMetrics(): {
        totalInitializations: number;
        successRate: number;
        averageDuration: number;
        lastEvaluationTime: number;
        evaluationHistory: {
            input: WebWorkerInput;
            output?: WebWorkerOutput;
            success: boolean;
            duration: number;
            timestamp: number;
        }[];
        totalWorkers: number;
        totalMessages: number;
        totalErrors: number;
        totalEventHandlers: number;
        queuedMessages: number;
    };
}
export declare function createWebWorkerFeature(): TypedWebWorkerFeatureImplementation;
export declare function createWebWorker(worker: Partial<WebWorkerInput['worker']>, options?: Partial<WebWorkerInput>): Promise<EvaluationResult<WebWorkerOutput>>;
export declare const enhancedWebWorkerImplementation: TypedWebWorkerFeatureImplementation;
//# sourceMappingURL=webworker.d.ts.map