import { Command } from 'commander';
import type { CliActionLeaf, CliActionRoot, CliConfigTree, CliCoreMeta } from './cli-core.types';
import type { StrategyContainer } from './strategy.types';
/**
 * Generic CLI Core class that provides framework-agnostic CLI infrastructure
 *
 * This class handles:
 * - Command configuration tree processing
 * - Action tree validation and routing
 * - Commander.js integration
 * - Recursive command building
 * - Configuration validation
 *
 * Framework-specific implementations should extend this class and provide:
 * - Concrete command configurations
 * - Action tree implementations
 * - Context creation logic
 * - Error handling customization
 */
export declare abstract class CliCore {
    protected readonly commands: CliConfigTree;
    protected actions: CliActionRoot;
    protected readonly meta: CliCoreMeta;
    protected readonly program: Command;
    protected strategies?: StrategyContainer;
    constructor(commands: CliConfigTree, actions: CliActionRoot, meta: CliCoreMeta, strategies?: StrategyContainer);
    /**
     * Configure the root Commander.js program with metadata
     */
    protected configureProgram(): void;
    /**
     * Add comprehensive help text to the root program
     */
    protected addComprehensiveHelp(): void;
    /**
     * Get version from package.json with fallback
     */
    protected getVersion(): string;
    /**
     * Recursively build CLI commands from configuration tree
     *
     * @param parentCmd - Parent Commander.js command
     * @param tree - Command configuration tree
     * @param parentPath - Path segments to current position
     */
    protected buildCliToolOptions(parentCmd: Command, tree: CliConfigTree, parentPath: string[]): void;
    /**
     * Resolve action handler for a command path
     */
    protected resolveActionHandler(path: string[]): CliActionLeaf | undefined;
    /**
     * Default action for commands without handlers (should not happen after validation)
     */
    protected defaultAction: CliActionLeaf;
    /**
     * Set strategy container for command customization
     * @param strategies - Strategy container with customization instances
     */
    setStrategies(strategies: StrategyContainer): void;
    /**
     * Get current strategy container
     * @returns Current strategy container or undefined
     */
    getStrategies(): StrategyContainer | undefined;
    /**
     * Validate that every leaf command in the configuration has a corresponding action handler
     *
     * @throws Error if validation fails with detailed error messages
     */
    protected validateConfigAgainstActions(): void;
    /**
     * Get current commands (can be overridden by subclasses for extensibility)
     *
     * @returns Current command configuration tree
     */
    protected getCurrentCommands(): CliConfigTree;
    /**
     * Get current actions (can be overridden by subclasses for extensibility)
     *
     * @returns Current action tree
     */
    protected getCurrentActions(): CliActionRoot;
    /**
     * Generate all possible command paths from configuration tree
     *
     * @param tree - Command configuration tree
     * @param currentPath - Current path segments
     * @returns Array of command paths (leaf commands only)
     */
    protected generateCommandPaths(tree: CliConfigTree, currentPath: string[]): string[][];
    /**
     * Run the CLI with provided arguments
     *
     * @param argv - Command line arguments (defaults to process.argv)
     */
    run(argv?: string[]): Promise<void>;
    /**
     * Get the underlying Commander.js program (for testing or advanced usage)
     */
    getProgram(): Command;
    /**
     * Validate that global options are consistently available across all commands
     */
    protected validateGlobalOptions(): void;
    /**
     * Recursively validate command options don't conflict with global options
     */
    private validateCommandOptionsConsistency;
    /**
     * Get all command paths as strings (for testing)
     */
    getAllCommandPaths(): string[];
    /**
     * Get action handler for a specific path (for testing)
     */
    getActionHandler(path: string[]): CliActionLeaf | undefined;
    /**
     * Get configuration sources (for testing extensible CLI)
     */
    getConfigurationSources(): Array<{
        name: string;
        priority: number;
    }>;
    /**
     * Validate configuration (for testing)
     */
    validateConfiguration(): void;
}
