/**
 * CommandBuilder - 命令构建器
 * 参考 Rust 实现: crates/executors/src/command.rs
 */
export interface CommandParts {
    program: string;
    args: string[];
}
export interface CmdOverrides {
    /** 覆盖基础命令 */
    baseCommandOverride?: string;
    /** 额外参数 */
    additionalParams?: string[];
    /** 环境变量 */
    env?: Record<string, string>;
}
export declare class CommandBuildError extends Error {
    constructor(message: string);
}
export declare class CommandBuilder {
    private base;
    private params;
    constructor(base: string);
    /**
     * 创建新的 CommandBuilder
     */
    static new(base: string): CommandBuilder;
    /**
     * 设置参数（替换现有参数）
     */
    setParams(params: string[]): CommandBuilder;
    /**
     * 扩展参数
     */
    extendParams(more: string[]): CommandBuilder;
    /**
     * 覆盖基础命令
     */
    overrideBase(base: string): CommandBuilder;
    /**
     * 构建初始命令
     */
    buildInitial(): CommandParts;
    /**
     * 构建 follow-up 命令
     */
    buildFollowUp(additionalArgs: string[]): CommandParts;
    /**
     * 内部构建方法
     */
    private build;
}
/**
 * 应用命令覆盖
 */
export declare function applyOverrides(builder: CommandBuilder, overrides?: CmdOverrides): CommandBuilder;
/**
 * 解析命令路径
 */
export declare function resolveCommandParts(parts: CommandParts): Promise<{
    programPath: string;
    args: string[];
}>;
//# sourceMappingURL=command-builder.d.ts.map