import { type ExecFileSyncOptions } from 'child_process';
export interface DaemonUpgradeHelperPayload {
    packageName: string;
    targetVersion: string;
    parentPid: number;
    restartArgv: string[];
    cwd?: string;
    sessionHostAppName?: string;
}
export interface CurrentGlobalInstallSurface {
    npmExecutable: string;
    npmArgsPrefix?: string[];
    packageRoot: string | null;
    installPrefix: string | null;
    execOptions?: NpmExecOptions;
}
export interface PinnedGlobalInstallCommand {
    command: string;
    args: string[];
    surface: CurrentGlobalInstallSurface;
    execOptions: NpmExecOptions;
}
export type NpmExecOptions = {
    shell: boolean;
    windowsHide?: boolean;
};
export declare function resolveCurrentGlobalInstallSurface(options: {
    packageName: string;
    currentCliPath?: string;
    nodeExecutable?: string;
    platform?: NodeJS.Platform;
}): CurrentGlobalInstallSurface;
export declare function buildPinnedGlobalInstallCommand(options: {
    packageName: string;
    targetVersion: string;
    currentCliPath?: string;
    nodeExecutable?: string;
    platform?: NodeJS.Platform;
}): PinnedGlobalInstallCommand;
export declare function getNpmExecOptions(platform?: NodeJS.Platform): NpmExecOptions;
export declare function execNpmCommandSync(args: string[], options?: ExecFileSyncOptions, surface?: Pick<CurrentGlobalInstallSurface, 'npmExecutable' | 'npmArgsPrefix' | 'execOptions'>): Buffer | string;
export declare function stopSessionHostProcesses(appName: string): void;
export declare function spawnDetachedDaemonUpgradeHelper(payload: DaemonUpgradeHelperPayload): void;
export declare function maybeRunDaemonUpgradeHelperFromEnv(): Promise<boolean>;
