import type { ExecutionContext, TypedExecutionContext, ValidationResult } from '../types/core';
import type { ASTNode } from '../types/base-types';
import { HookRegistry } from '../types/hooks';
import { ExpressionEvaluator } from '../core/expression-evaluator';
export interface RuntimeCommand {
    name: string;
    execute(context: ExecutionContext, ...args: unknown[]): Promise<unknown>;
    validate?(input: unknown): ValidationResult<unknown>;
    metadata?: {
        description: string;
        examples: string[];
        syntax: string;
    };
}
export interface CommandWithParseInput {
    name: string;
    parseInput?(raw: {
        args: ASTNode[];
        modifiers: Record<string, any>;
        commandName?: string;
    }, evaluator: ExpressionEvaluator, context: ExecutionContext): Promise<any>;
    execute(input: any, context: TypedExecutionContext): Promise<unknown>;
    validate?(input: unknown): ValidationResult<unknown>;
    metadata?: any;
}
export declare class ContextBridge {
    static toTyped(context: ExecutionContext): TypedExecutionContext;
    static fromTyped(typedContext: TypedExecutionContext, originalContext: ExecutionContext): ExecutionContext;
}
export declare class CommandAdapterV2 implements RuntimeCommand {
    private impl;
    private expressionEvaluator;
    private hookRegistry;
    constructor(impl: CommandWithParseInput, sharedEvaluator?: ExpressionEvaluator, hookRegistry?: HookRegistry);
    setHookRegistry(registry: HookRegistry): void;
    private createHookContext;
    get name(): string;
    get metadata(): {
        description: any;
        examples: any;
        syntax: any;
    };
    execute(context: ExecutionContext, ...args: unknown[]): Promise<unknown>;
    validate(input: unknown): ValidationResult<unknown>;
}
export declare class CommandRegistryV2 {
    private adapters;
    private implementations;
    private sharedEvaluator?;
    private hookRegistry?;
    constructor(sharedEvaluator?: ExpressionEvaluator, hookRegistry?: HookRegistry);
    setHookRegistry(registry: HookRegistry): void;
    getHookRegistry(): HookRegistry | undefined;
    register(impl: any): void;
    getAdapter(name: string): CommandAdapterV2 | undefined;
    has(name: string): boolean;
    getCommandNames(): string[];
    getImplementation(name: string): CommandWithParseInput | undefined;
    getAdapters(): Map<string, CommandAdapterV2>;
    validateCommand(name: string, input: unknown): ValidationResult<unknown>;
}
export declare function createCommandRegistryV2(commands: CommandWithParseInput[], sharedEvaluator?: ExpressionEvaluator, hookRegistry?: HookRegistry): CommandRegistryV2;
//# sourceMappingURL=command-adapter.d.ts.map