/// <reference types="node" />
import type { FileLockManager } from '@php-wasm/node';
import { EmscriptenDownloadMonitor } from '@php-wasm/progress';
import type { RemoteAPI, SupportedPHPVersion } from '@php-wasm/universal';
import { PHPWorker } from '@php-wasm/universal';
import { type ParsedBlueprintV2Declaration, type BlueprintV2Declaration } from './blueprint-v2-declaration';
import { type MessagePort } from 'worker_threads';
import { type RunCLIArgs } from '../run-cli';
export type WorkerBootArgs = RunCLIArgs & {
    php: SupportedPHPVersion;
    siteUrl: string;
    firstProcessId: number;
    processIdSpaceLength: number;
    trace: boolean;
    blueprint: BlueprintV2Declaration | ParsedBlueprintV2Declaration;
};
type WorkerRunBlueprintArgs = RunCLIArgs & {
    siteUrl: string;
    blueprint: BlueprintV2Declaration | ParsedBlueprintV2Declaration;
};
interface WorkerBootRequestHandlerOptions {
    siteUrl: string;
    php: SupportedPHPVersion;
    allow?: string;
    firstProcessId: number;
    processIdSpaceLength: number;
    trace: boolean;
}
export declare class PlaygroundCliBlueprintV2Worker extends PHPWorker {
    booted: boolean;
    fileLockManager: RemoteAPI<FileLockManager> | FileLockManager | undefined;
    constructor(monitor: EmscriptenDownloadMonitor);
    /**
     * Call this method before boot() to use file locking.
     *
     * This method is separate from boot() to simplify the related Comlink.transferHandlers
     * setup – if an argument is a MessagePort, we're transferring it, not copying it.
     *
     * @see comlink-sync.ts
     * @see phpwasm-emscripten-library-file-locking-for-node.js
     */
    useFileLockManager(port: MessagePort): Promise<void>;
    bootAsPrimaryWorker(args: WorkerBootArgs): Promise<void>;
    bootAsSecondaryWorker(args: WorkerBootArgs): Promise<void>;
    runBlueprintV2(args: WorkerRunBlueprintArgs): Promise<void>;
    bootRequestHandler({ siteUrl, allow, php, firstProcessId, processIdSpaceLength, trace, }: WorkerBootRequestHandlerOptions): Promise<void>;
    dispose(): Promise<void>;
}
export {};
