import type { InitializeEmitter, OperationState } from 'balena-device-init';
import type * as BalenaSdk from 'balena-sdk';
export declare function getGroupDefaults(group: {
    options: Array<{
        name: string;
        default: string | number;
    }>;
}): {
    [name: string]: string | number | undefined;
};
export declare function stateToString(state: OperationState): string;
export declare function sudo(command: string[], { stderr, msg, isCLIcmd, }?: {
    stderr?: NodeJS.WritableStream;
    msg?: string;
    isCLIcmd?: boolean;
}): Promise<void>;
export declare function runCommand<T>(commandArgs: string[]): Promise<T>;
export declare function getManifest(image: string, deviceType: string): Promise<BalenaSdk.DeviceTypeJson.DeviceType>;
export declare const areDeviceTypesCompatible: (appDeviceTypeSlug: string, osDeviceTypeSlug: string) => Promise<boolean>;
export declare function osProgressHandler(step: InitializeEmitter): Promise<void>;
export declare function getAppWithArch(applicationName: string): Promise<{
    arch: string;
    slug: string;
    id: number;
    created_at: string;
    app_name: string;
    actor: BalenaSdk.PineDeferred;
    uuid: string;
    is_accessible_by_support_until__date: string;
    is_host: boolean;
    should_track_latest_release: boolean;
    is_public: boolean;
    is_of__class: "fleet" | "block" | "app";
    is_archived: boolean;
    is_discoverable: boolean;
    is_stored_at__repository_url: string | null;
    public_organization: BalenaSdk.PineDeferred | null;
    depends_on__application: BalenaSdk.PineDeferred | null;
    organization: BalenaSdk.PineDeferred;
    should_be_running__release: BalenaSdk.PineDeferred | null;
    application_type: [Omit<import("balena-sdk/typings/pinejs-client-core").SelectResultObject<BalenaSdk.ApplicationType, "name" | "slug" | "supports_multicontainer">, never> & object];
    is_for__device_type: [Omit<import("balena-sdk/typings/pinejs-client-core").SelectResultObject<BalenaSdk.DeviceType, "slug">, "is_of__cpu_architecture"> & import("balena-sdk/typings/pinejs-client-core").ExpandResourceExpandObject<BalenaSdk.DeviceType, {
        is_of__cpu_architecture: {
            $select: "slug";
        };
    }>];
}>;
export declare const delay: typeof import("timers/promises").setTimeout;
export declare function retry<T>({ func, maxAttempts, label, initialDelayMs, backoffScaler, maxSingleDelayMs, }: {
    func: () => T;
    maxAttempts: number;
    label: string;
    initialDelayMs?: number;
    backoffScaler?: number;
    maxSingleDelayMs?: number;
}): Promise<T>;
export declare function isWindowsComExeShell(): boolean | undefined;
export declare function shellEscape(args: string[], detectShell?: boolean): string[];
export interface ProxyConfig {
    host: string;
    port: string;
    username?: string;
    password?: string;
    proxyAuth?: string;
}
export declare function getProxyConfig(): ProxyConfig | undefined;
export declare const expandForAppName: {
    $expand: {
        belongs_to__application: {
            $select: ("slug" | "app_name")[];
        };
        is_of__device_type: {
            $select: "slug";
        };
        is_running__release: {
            $select: "commit";
        };
    };
};
export declare function addSIGINTHandler(sigintHandler: () => void, once?: boolean): void;
export declare function awaitInterruptibleTask<T extends (...args: any[]) => Promise<any>>(task: T, ...theArgs: Parameters<T>): Promise<ReturnType<T>>;
export declare function pickAndRename<T extends Dictionary<any>>(obj: T, fields: string[]): Dictionary<any>;
