import { type ChildProcess } from 'child_process'; import type { LaunchHostType } from './launch-spec.js'; export interface WorkerHostCommand { executable: string; args: string[]; options: { cwd: string; env: NodeJS.ProcessEnv; detached?: boolean; stdio?: ['ignore', number, number] | 'ignore'; windowsHide: true; }; } export interface WorkerHostDeps { platform?: NodeJS.Platform; nodePath?: string; spawnProcess?: (command: WorkerHostCommand) => ChildProcess | { pid?: number; unref?: () => void; }; uid?: number; } export interface WorkerHostResult { kind: 'detached' | 'systemd-transient' | 'launchd-temporary'; pid?: number; command: WorkerHostCommand; artifactPath?: string; serviceIdentifier?: string; started: Promise; } export declare function getPackagedWorkerPath(): string; export declare function startUpgradeWorker(input: { jobId: string; jobPath: string; workerPath: string; hostType: LaunchHostType; testFailLocalHealthVersion?: string; }, deps?: WorkerHostDeps): WorkerHostResult; export declare function cleanupUpgradeWorkerHost(result: WorkerHostResult, deps?: WorkerHostDeps): void;