import type { ValidationResult, LLMDocumentation, EvaluationType, ExecutionContext } from '../types/base-types';
import type { ContextMetadata } from '../types/context-types';
import type { EvaluationResult } from '../types/command-types';
export declare const DefInputSchema: import("../validation/lightweight-validators").RuntimeValidator<{
    [x: string]: unknown;
}>;
export declare const DefOutputSchema: import("../validation/lightweight-validators").RuntimeValidator<{
    [x: string]: unknown;
}>;
export type DefInput = any;
export type DefOutput = any;
export interface FunctionDefinition {
    name: string;
    namespace?: string;
    parameters: string[];
    body: any[];
    catchBlock?: {
        parameter: string;
        body: any[];
    };
    finallyBlock?: any[];
    isAsync: boolean;
    returnType?: string;
    context: ExecutionContext;
    metadata: FunctionMetadata;
}
export interface FunctionMetadata {
    name: string;
    namespace?: string;
    parameters: string[];
    isAsync: boolean;
    returnType?: string;
    complexity: number;
    createdAt: number;
    callCount: number;
    averageExecutionTime: number;
}
export interface FunctionCall {
    functionName: string;
    parameters: any[];
    context: ExecutionContext;
    timestamp: number;
    result?: any;
    error?: Error;
    executionTime: number;
}
export declare class TypedDefFeatureImplementation {
    readonly name = "defFeature";
    readonly category: "Universal";
    readonly description = "Type-safe function definition feature with parameter validation, closure support, and async execution";
    readonly inputSchema: import("../validation/lightweight-validators").RuntimeValidator<{
        [x: string]: unknown;
    }>;
    readonly outputType: EvaluationType;
    private evaluationHistory;
    private functions;
    private callHistory;
    private namespaces;
    readonly metadata: ContextMetadata;
    readonly documentation: LLMDocumentation;
    initialize(input: DefInput): Promise<EvaluationResult<DefOutput>>;
    validate(input: unknown): ValidationResult;
    private initializeConfig;
    private registerFunction;
    private createFunctionDefiner;
    private createFunctionCaller;
    private createFunctionChecker;
    private createFunctionRemover;
    private createFunctionLister;
    private createMetadataGetter;
    private createParameterValidator;
    private createParameterBinder;
    private createSignatureGetter;
    private createFunctionInvoker;
    private createAsyncInvoker;
    private createClosureCreator;
    private createCallStackGetter;
    private createTypeChecker;
    private createTypeInferrer;
    private createTypeValidator;
    private createTypeAnnotator;
    private createErrorHandler;
    private createCatchBlockGetter;
    private createFinallyBlockGetter;
    private executeFunction;
    private executeAsyncFunction;
    private executeCatchBlock;
    private executeFinallyBlock;
    private calculateComplexity;
    dispose(): void;
    private trackPerformance;
    getPerformanceMetrics(): {
        totalInitializations: number;
        successRate: number;
        averageDuration: number;
        lastEvaluationTime: number;
        evaluationHistory: {
            input: DefInput;
            output?: DefOutput;
            success: boolean;
            duration: number;
            timestamp: number;
        }[];
        totalFunctions: number;
        totalNamespaces: number;
        totalCalls: number;
        averageCallTime: number;
    };
}
export declare function createDefFeature(): TypedDefFeatureImplementation;
export declare function createDef(definition: Partial<DefInput['definition']>, options?: Partial<DefInput>): Promise<EvaluationResult<DefOutput>>;
export declare class DefFeature {
    private static instance;
    private functions;
    readonly name = "def";
    readonly description = "Function definition feature for hyperscript";
    static getInstance(): DefFeature;
    defineFunction(name: string, parameters: string[], body: any[], context: ExecutionContext, catchBlock?: {
        parameter: string;
        body: any[];
    }, finallyBlock?: any[], force?: boolean): void;
    hasFunction(name: string): boolean;
    getFunctionNames(): string[];
    getFunction(name: string): FunctionDefinition | undefined;
    getFunctionsByNamespace(namespace: string): FunctionDefinition[];
    executeFunction(name: string, args: any[], context: ExecutionContext): Promise<any>;
    private evaluateExpression;
    defineAsyncFunction(name: string, parameters: string[], body: any[], context: ExecutionContext): void;
    removeFunction(name: string): boolean;
    getJavaScriptFunction(name: string, context?: ExecutionContext): Function;
    getFunctionMetadata(name: string): FunctionMetadata | null;
    clear(): void;
}
export declare const enhancedDefImplementation: TypedDefFeatureImplementation;
//# sourceMappingURL=def.d.ts.map