import type { TiesInstance } from '../../../lib/runtime-web/types/microservice.types';
import type { DependencyMetadata, DependencyMetadataCollection, HashCollision, MetadataValidationResult } from './dependency-metadata.types';
/**
 * Manages dependency metadata generation and validation for stable hash-based DI.
 *
 * Provides build-time metadata generation and runtime metadata loading to ensure
 * hash-based dependency keys remain stable across minification and build processes.
 */
export declare class DependencyMetadataManager {
    private static readonly METADATA_VERSION;
    private static readonly HASH_ALGORITHM;
    /**
     * Generate dependency metadata at build time.
     *
     * Processes Ties classes and generates stable metadata that can be used
     * at runtime for hash-based dependency registration.
     *
     * @param tiesClasses - Array of Ties class constructors
     * @returns Complete dependency metadata collection
     */
    generateBuildTimeMetadata(tiesClasses: TiesInstance[]): DependencyMetadataCollection;
    /**
     * Load dependency metadata at runtime.
     *
     * Loads pre-generated metadata from build time and validates it for use
     * in hash-based dependency registration.
     *
     * @param metadataJson - JSON string containing dependency metadata
     * @returns Parsed and validated dependency metadata collection
     * @throws Error if metadata is invalid or corrupted
     */
    loadRuntimeMetadata(metadataJson: string): DependencyMetadataCollection;
    /**
     * Load dependency metadata from file at runtime.
     *
     * Loads pre-generated metadata file from the Lambda bundle and validates it.
     * This method is used by the container lifecycle manager to get build-time
     * generated metadata for hash-based dependency registration.
     *
     * @param metadataFilePath - Path to the metadata file (optional, defaults to bundled metadata)
     * @returns Parsed and validated dependency metadata collection
     * @throws Error if metadata file cannot be loaded or is invalid
     */
    loadRuntimeMetadataFromFile(metadataFilePath?: string): DependencyMetadataCollection;
    /**
     * Validate metadata and return it if valid.
     *
     * @param metadata - Metadata object to validate
     * @returns Validated metadata collection
     * @private
     */
    private validateAndReturnMetadata;
    /**
     * Create empty metadata collection as fallback.
     *
     * @returns Empty metadata collection
     * @private
     */
    private createEmptyMetadata;
    /**
     * Compute stable hash for class code.
     *
     * Uses the same hash algorithm as the existing system to ensure consistency.
     *
     * @param classCode - String representation of the class
     * @returns Stable hash key
     */
    computeStableHash(classCode: string): string;
    /**
     * Validate hash uniqueness across all dependencies.
     *
     * Checks for hash collisions and validates that each dependency has a unique hash key.
     *
     * @param dependencies - Array of dependency metadata to validate
     * @returns Validation result with collision information
     */
    validateHashUniqueness(dependencies: DependencyMetadata[]): MetadataValidationResult;
    /**
     * Detect hash collisions in a set of Ties classes.
     *
     * Analyzes classes at runtime to detect potential hash collisions before registration.
     *
     * @param tiesClasses - Array of Ties class constructors to analyze
     * @returns Array of hash collisions found
     */
    detectHashCollisions(tiesClasses: TiesInstance[]): HashCollision[];
    /**
     * Generate metadata file content for build output.
     *
     * Creates a JSON string that can be written to a file and included in Lambda bundles.
     *
     * @param metadata - Dependency metadata collection to serialize
     * @returns JSON string representation of metadata
     */
    generateMetadataFileContent(metadata: DependencyMetadataCollection): string;
    /**
     * Validate metadata structure and required fields.
     *
     * @param metadata - Metadata object to validate
     * @throws Error if metadata structure is invalid
     */
    private validateMetadataStructure;
}
