declare const AGENTS: {
    npm: {
        run: (args: string[]) => string;
        install: string;
        frozen: string;
        global: string;
        add: string;
        upgrade: string;
        'upgrade-interactive': null;
        execute: string;
        uninstall: string;
        global_uninstall: string;
        audit: string;
        bin: string;
        global_bin: string;
        link: string;
        list: string;
        global_list: string;
        outdated: string;
        global_outdated: string;
        publish: string;
        version: string;
        test: string;
        help: string;
        diff: string;
    };
    pnpm: {
        run: (args: string[]) => string;
        install: string;
        frozen: string;
        global: string;
        add: string;
        upgrade: string;
        'upgrade-interactive': string;
        execute: string;
        uninstall: string;
        global_uninstall: string;
        audit: string;
        bin: string;
        global_bin: string;
        link: string;
        list: string;
        global_list: string;
        outdated: string;
        global_outdated: string;
        publish: string;
        version: string;
        test: string;
        help: string;
        diff: string;
    };
    yarn: {
        run: string;
        install: string;
        frozen: string;
        global: string;
        add: string;
        upgrade: string;
        'upgrade-interactive': string;
        execute: string;
        uninstall: string;
        global_uninstall: string;
        audit: string;
        bin: string;
        global_bin: string;
        link: string;
        list: string;
        global_list: string;
        outdated: string;
        global_outdated: string;
        publish: string;
        version: string;
        test: string;
        help: string;
        diff: string;
    };
    'yarn@berry': {
        run: string;
        install: string;
        frozen: string;
        global: string;
        add: string;
        upgrade: string;
        'upgrade-interactive': string;
        execute: string;
        uninstall: string;
        global_uninstall: string;
        audit: string;
        bin: string;
        global_bin: string;
        link: string;
        list: string;
        global_list: string;
        outdated: string;
        global_outdated: string;
        publish: string;
        version: string;
        test: string;
        help: string;
        diff: string;
    };
};
declare type Agent = (keyof typeof AGENTS) | 'prompt';
declare type Command = keyof typeof AGENTS.npm;

interface DetectOptions {
    autoInstall?: boolean;
    cwd?: string;
}
declare function detect({ autoInstall, cwd }: DetectOptions): Promise<Agent | null>;

interface RunnerContext {
    hasLock?: boolean;
    cwd?: string;
}
declare type Runner = (agent: Agent, args: string[], ctx?: RunnerContext) => Promise<string | undefined> | string | undefined;
declare function runCli(fn: Runner, options?: DetectOptions): Promise<void>;
declare function run(fn: Runner, args: string[], options?: DetectOptions): Promise<void>;

declare type Agents = Exclude<Agent, 'prompt'>;
declare function getCommand(agent: Agents, command: Command, args?: string[]): string;
declare const parseNi: Runner;
declare const parseNr: Runner;
declare const parseNu: Runner;
declare const parseNun: Runner;
declare const parseNx: Runner;
declare const parseNo: Runner;
declare const parseNp: Runner;
declare const parseNh: Runner;
declare const parseNv: Runner;
declare const parseNl: Runner;
declare const parseNt: Runner;
declare const parseNd: Runner;
declare const parseNa: Runner;
declare const parseNb: Runner;

interface Config {
    defaultAgent: Agent | 'prompt';
    globalAgent: Agent;
}
declare function getConfig(): Promise<Config>;
declare const getDefaultAgent: () => Promise<Agent>;
declare const getGlobalAgent: () => Promise<Agent>;

declare function remove<T>(arr: T[], v: T): T[];
declare function exclude<T>(arr: T[], v: T): T[];
declare function cmdExists(cmd: string): boolean;
declare function getVoltaPrefix(): string;

export { Agents, DetectOptions, Runner, RunnerContext, cmdExists, detect, exclude, getCommand, getConfig, getDefaultAgent, getGlobalAgent, getVoltaPrefix, parseNa, parseNb, parseNd, parseNh, parseNi, parseNl, parseNo, parseNp, parseNr, parseNt, parseNu, parseNun, parseNv, parseNx, remove, run, runCli };
