/**
 * Instance Factory Resolver
 *
 * Resolves deployment capabilities to instance factories
 * using manifest configuration and capability mappings.
 */
import { InstanceFactoryLibrary } from './library.js';
import type { CapabilityMapping, InstanceMapping, DefaultMappings, ResolvedImplementation } from '../types/index.js';
/**
 * Resolver configuration (v3.3 hybrid mapping only)
 */
export interface ResolverConfig {
    /** v3.3 Hybrid Mapping System */
    defaultMappings?: DefaultMappings;
    capabilityMappings?: CapabilityMapping[];
    instanceMappings?: InstanceMapping[];
    /** Global configuration overrides */
    globalConfiguration?: Record<string, any>;
}
/**
 * Resolution context for a deployment instance
 */
export interface ResolutionContext {
    /** Deployment instance being resolved */
    instance: any;
    /** Component name */
    componentName?: string;
    /** Environment name */
    environment?: string;
    /** Additional context properties */
    [key: string]: any;
}
/**
 * Resolution error
 */
export declare class ResolutionError extends Error {
    capability: string;
    instance?: any;
    constructor(message: string, capability: string, instance?: any);
}
/**
 * Resolver for mapping capabilities to instance factories
 */
export declare class InstanceFactoryResolver {
    private library;
    private validator;
    private config;
    constructor(library: InstanceFactoryLibrary, config?: ResolverConfig);
    /**
     * Resolve a single capability to an instance factory (v3.3 hybrid mapping)
     *
     * Resolution priority:
     * 1. Instance-specific mapping (instanceMappings) - highest priority
     * 2. Capability-based mapping (capabilityMappings) - medium priority
     * 3. Default category mapping (defaultMappings) - lowest priority
     */
    resolveCapability(capability: string, context?: ResolutionContext): ResolvedImplementation;
    /**
     * Resolve all capabilities for a deployment instance
     */
    resolveForInstance(instance: any, context?: ResolutionContext): ResolvedImplementation[];
    /**
     * Resolve all capabilities for a deployment
     */
    resolveForDeployment(deployment: any, context?: Omit<ResolutionContext, 'instance'>): Map<string, ResolvedImplementation[]>;
    /**
     * Find capability mapping that matches the given capability
     *
     * Supports wildcard patterns (e.g., "api.*" matches "api.rest", "api.graphql")
     */
    private findCapabilityMapping;
    /**
     * Extract capabilities from a deployment instance
     */
    private getInstanceCapabilities;
    /**
     * Apply template overrides to an instance factory
     */
    private applyTemplateOverrides;
    /**
     * Infer instance category from capability pattern (v3.3)
     *
     * Used as fallback when instance doesn't have explicit category
     */
    private inferCategoryFromCapability;
    /**
     * Get configuration summary for debugging
     */
    getConfigSummary(): {
        capabilityMappings: number;
        instanceMappings: number;
        defaultMappings: number;
    };
}
/**
 * Create a resolver from manifest data (v3.3 hybrid mapping only)
 */
export declare function createResolver(library: InstanceFactoryLibrary, manifest: {
    defaultMappings?: DefaultMappings;
    capabilityMappings?: CapabilityMapping[];
    instanceMappings?: InstanceMapping[];
    configuration?: Record<string, any>;
}): InstanceFactoryResolver;
//# sourceMappingURL=resolver.d.ts.map