import type { RuntimeValidator } from '../validation/lightweight-validators';
import type { TypedExpressionContext, EvaluationType, ExpressionMetadata, ValidationResult } from './expression-types';
import type { LLMDocumentation } from './command-types';
import type { EvaluationResult } from './base-types';
export type { EvaluationResult } from './base-types';
export type ContextCategory = 'Frontend' | 'Backend' | 'Universal' | 'SSR' | 'Testing';
export interface ContextMetadata extends Omit<ExpressionMetadata, 'category'> {
    category: ContextCategory;
    relatedContexts?: string[];
    frameworkDependencies?: string[];
    environmentRequirements?: {
        browser?: boolean;
        server?: boolean;
        nodejs?: boolean;
        python?: boolean;
    };
}
export interface TypedContextImplementation<TInput, TOutput> {
    readonly name: string;
    readonly category: ContextCategory;
    readonly description: string;
    readonly inputSchema: RuntimeValidator<TInput>;
    readonly outputType: EvaluationType;
    readonly metadata: ContextMetadata;
    readonly documentation?: LLMDocumentation;
    initialize(input: TInput): Promise<EvaluationResult<TOutput>>;
    validate(input: unknown): ValidationResult;
    trackPerformance?(startTime: number, success: boolean, output?: any): void;
}
export declare abstract class ContextBase<TInput, TOutput> implements TypedContextImplementation<TInput, TOutput> {
    abstract readonly name: string;
    abstract readonly category: ContextCategory;
    abstract readonly description: string;
    abstract readonly inputSchema: RuntimeValidator<TInput>;
    abstract readonly outputType: EvaluationType;
    abstract readonly metadata: ContextMetadata;
    abstract readonly documentation?: LLMDocumentation;
    protected evaluationHistory: Array<{
        contextName: string;
        category: ContextCategory;
        input: string;
        output: any;
        timestamp: number;
        duration: number;
        success: boolean;
    }>;
    abstract initialize(input: TInput): Promise<EvaluationResult<TOutput>>;
    validate(input: unknown): ValidationResult;
    protected validateContextSpecific(_data: TInput): ValidationResult;
    protected generateValidationSuggestions(error: any): string[];
    trackPerformance(startTime: number, success: boolean, output?: any): void;
    getPerformanceMetrics(): {
        totalInitializations: number;
        successRate: number;
        averageDuration: number;
        recentPerformance: {
            contextName: string;
            category: ContextCategory;
            input: string;
            output: any;
            timestamp: number;
            duration: number;
            success: boolean;
        }[];
    };
}
export declare const BaseContextInputSchema: RuntimeValidator<unknown>;
export declare const BaseContextOutputSchema: RuntimeValidator<unknown>;
export type BaseContextInput = any;
export type BaseContextOutput = any;
export interface ExtendedTypedExpressionContext extends TypedExpressionContext {
    contextCategory?: ContextCategory;
    framework?: {
        name: 'django' | 'flask' | 'express' | 'fastapi' | 'vanilla';
        version?: string;
        capabilities?: string[];
    };
    performanceTracking?: {
        enabled: boolean;
        includeMemoryUsage: boolean;
        includeNetworkMetrics: boolean;
    };
    services?: {
        logger?: any;
        cache?: any;
        database?: any;
        queue?: any;
    };
}
export interface ContextRegistry {
    register<T extends TypedContextImplementation<any, any>>(context: T): void;
    get<_T>(name: string): TypedContextImplementation<any, any> | null;
    listByCategory(category: ContextCategory): TypedContextImplementation<any, any>[];
    validate<T extends TypedContextImplementation<any, any>>(context: T): ValidationResult;
}
export interface ContextFilter {
    category?: ContextCategory;
    environment?: 'frontend' | 'backend' | 'universal';
    framework?: string;
    capabilities?: string[];
}
//# sourceMappingURL=context-types.d.ts.map