import { CliCore } from './cli-core';
import type { CliActionLeaf, CliActionRoot, CliConfigTree, CliCoreMeta } from './cli-core.types';
import type { StrategyContainer } from './strategy.types';
/**
 * Extended CLI Core that supports runtime extensibility and configuration overrides
 *
 * This class extends the base CliCore with:
 * - Runtime action tree modification
 * - Configuration override capabilities for different workspaces
 * - Loading command configurations from multiple sources
 * - Support for adding new command types without core changes
 * - Backward compatibility with existing configurations
 */
export declare class ExtensibleCliCore extends CliCore {
    private configurationSources;
    private workspaceOverrides;
    private runtimeCommands;
    private runtimeActions;
    private removedCommands;
    private removedActions;
    private mergedCommands;
    private mergedActions;
    constructor(commands: CliConfigTree, actions: CliActionRoot, meta: CliCoreMeta, strategies?: StrategyContainer);
    /**
     * Add new commands to the CLI at runtime
     *
     * @param commands - Command configuration tree to add
     */
    addCommands(commands: CliConfigTree): void;
    /**
     * Add new actions to the CLI at runtime
     *
     * @param actions - Action tree to add
     */
    addActions(actions: CliActionRoot): void;
    /**
     * Add both commands and actions atomically to avoid validation errors
     *
     * @param commands - Command configuration tree to add
     * @param actions - Action tree to add
     */
    addCommandsAndActions(commands: CliConfigTree, actions: CliActionRoot): void;
    /**
     * Modify an existing action handler
     *
     * @param path - Command path to modify
     * @param handler - New action handler
     */
    modifyAction(path: string[], handler: CliActionLeaf): void;
    /**
     * Remove a command from the CLI
     *
     * @param path - Command path to remove
     */
    removeCommand(path: string[]): void;
    /**
     * Remove an action from the CLI
     *
     * @param path - Action path to remove
     */
    removeAction(path: string[]): void;
    /**
     * Apply workspace-specific configuration overrides
     *
     * @param workspaceName - Name of the workspace
     * @param config - Workspace-specific command configuration
     * @param actions - Workspace-specific action tree
     */
    applyWorkspaceOverride(workspaceName: string, config: CliConfigTree, actions: CliActionRoot): void;
    /**
     * Remove workspace-specific overrides
     *
     * @param workspaceName - Name of the workspace to remove
     */
    removeWorkspaceOverride(workspaceName: string): void;
    /**
     * Load configuration from multiple sources with priority support
     *
     * @param sourceName - Unique name for the configuration source
     * @param config - Command configuration tree
     * @param actions - Action tree
     * @param priority - Priority level (higher numbers override lower numbers)
     */
    loadConfigurationSource(sourceName: string, config: CliConfigTree, actions: CliActionRoot, priority?: number): void;
    /**
     * Remove a configuration source
     *
     * @param sourceName - Name of the source to remove
     */
    removeConfigurationSource(sourceName: string): void;
    /**
     * Get list of active workspace names
     *
     * @returns Array of workspace names
     */
    getWorkspaceNames(): string[];
    /**
     * Get configuration source metadata
     *
     * @returns Array of source metadata sorted by priority
     */
    getSourceMetadata(): Array<{
        name: string;
        priority: number;
    }>;
    /**
     * Override getConfigurationSources to return actual sources
     */
    getConfigurationSources(): Array<{
        name: string;
        priority: number;
    }>;
    /**
     * Rebuild the merged configuration from all sources
     */
    private rebuildMergedConfiguration;
    /**
     * Rebuild the CLI with current merged configuration
     */
    private rebuildCli;
    /**
     * Rebuild the CLI without validation (for testing invalid configurations)
     */
    private rebuildCliWithoutValidation;
    /**
     * Override the getCurrentCommands method to use merged configuration
     */
    protected getCurrentCommands(): CliConfigTree;
    /**
     * Override the getCurrentActions method to use merged configuration
     */
    protected getCurrentActions(): CliActionRoot;
    /**
     * Merge two command configuration trees
     *
     * @param base - Base configuration
     * @param override - Override configuration
     * @returns Merged configuration
     */
    private mergeConfigurations;
    /**
     * Merge two command configurations
     *
     * @param base - Base command configuration
     * @param override - Override command configuration
     * @returns Merged command configuration
     */
    private mergeCommandConfigs;
    /**
     * Merge two action trees
     *
     * @param base - Base action tree
     * @param override - Override action tree
     * @returns Merged action tree
     */
    private mergeActionTrees;
    /**
     * Merge two action nodes
     *
     * @param base - Base action node
     * @param override - Override action node
     * @returns Merged action node
     */
    private mergeActionNodes;
    /**
     * Clone an action node
     *
     * @param node - Action node to clone
     * @returns Cloned action node
     */
    private cloneActionNode;
    /**
     * Deep clone an action tree
     *
     * @param tree - Action tree to clone
     * @returns Cloned action tree
     */
    private cloneActionTree;
    /**
     * Set action handler at specific path
     *
     * @param actionTree - Action tree to modify
     * @param path - Path to set handler at
     * @param handler - Handler to set
     */
    private setActionAtPath;
    /**
     * Remove command at specific path
     *
     * @param configTree - Configuration tree to modify
     * @param path - Path to remove
     */
    private removeCommandAtPath;
    /**
     * Remove action at specific path
     *
     * @param actionTree - Action tree to modify
     * @param path - Path to remove
     */
    private removeActionAtPath;
    /**
     * Remove command from configuration tree
     *
     * @param configTree - Configuration tree to modify
     * @param path - Path to remove
     */
    private removeCommandFromTree;
    /**
     * Remove action from action tree
     *
     * @param actionTree - Action tree to modify
     * @param path - Path to remove
     */
    private removeActionFromTree;
}
