import { Logger, NodeVersionInfo, RuntimeDetector } from './nodejs-layer-manager';
/**
 * Configuration options for DockerRuntimeDetector.
 */
export interface DockerRuntimeDetectorOptions {
    /**
     * Cache TTL in milliseconds. Default: 1 hour (3600000ms)
     */
    cacheTtl?: number;
    /**
     * Docker command timeout in milliseconds. Default: 60 seconds (60000ms)
     */
    dockerTimeout?: number;
    /**
     * Logger for debugging and monitoring. Default: createDefaultLogger()
     */
    logger?: Logger;
    /**
     * Whether to enable fallback to known version mappings when Docker fails.
     * Default: true
     */
    enableFallback?: boolean;
}
/**
 * Docker-based implementation of RuntimeDetector.
 *
 * Uses official AWS Lambda runtime Docker images to detect exact Node.js versions.
 * Implements caching to avoid repeated Docker operations and provides fallback
 * version mappings when Docker is unavailable.
 *
 * @example
 * ```typescript
 * const detector = new DockerRuntimeDetector();
 * const versionInfo = await detector.detectNodeVersion('nodejs20.x', 'x86_64');
 * console.log(`Node.js version: ${versionInfo.version}`);
 * ```
 */
export declare class DockerRuntimeDetector implements RuntimeDetector {
    private readonly versionCache;
    private readonly cacheTtl;
    private readonly dockerTimeout;
    private readonly logger;
    private readonly enableFallback;
    /**
     * Known fallback version mappings for when Docker is unavailable.
     * These are based on AWS Lambda runtime documentation and should be
     * updated when AWS releases new runtime versions.
     */
    private static readonly FALLBACK_VERSIONS;
    /**
     * Supported AWS Lambda Node.js runtimes.
     */
    private static readonly SUPPORTED_RUNTIMES;
    /**
     * Supported architectures.
     */
    private static readonly SUPPORTED_ARCHITECTURES;
    constructor(options?: DockerRuntimeDetectorOptions);
    /**
     * Detects the exact Node.js version for a given runtime and architecture.
     *
     * First checks the cache for existing version information. If not cached or expired,
     * attempts to detect the version using Docker. Falls back to known version mappings
     * if Docker operations fail and fallback is enabled.
     *
     * @param runtimeName - The AWS Lambda runtime (e.g., "nodejs20.x")
     * @param architecture - The target architecture ("x86_64" or "arm64")
     * @returns Promise resolving to Node.js version information
     * @throws NodeRuntimeLayerError if detection fails
     */
    detectNodeVersion(runtimeName: string, architecture: string): Promise<NodeVersionInfo>;
    /**
     * Validates input parameters for runtime name and architecture.
     *
     * @param runtimeName - The runtime name to validate
     * @param architecture - The architecture to validate
     * @throws NodeRuntimeLayerError if inputs are invalid
     */
    private validateInputs;
    /**
     * Retrieves cached version information if available and not expired.
     *
     * @param cacheKey - The cache key to look up
     * @returns Cached version entry if valid, null otherwise
     */
    private getCachedVersion;
    /**
     * Caches version information with TTL.
     *
     * @param cacheKey - The cache key to store under
     * @param versionInfo - The version information to cache
     */
    private cacheVersion;
    /**
     * Detects Node.js version using Docker by pulling AWS Lambda runtime image
     * and executing `node --version` within a container.
     *
     * @param runtimeName - The AWS Lambda runtime name
     * @param architecture - The target architecture
     * @returns Promise resolving to version information
     * @throws NodeRuntimeLayerError if Docker operations fail
     */
    private detectVersionFromDocker;
    /**
     * Builds the Docker image name for AWS Lambda runtime.
     *
     * @param runtimeName - The AWS Lambda runtime name (e.g., "nodejs20.x")
     * @param architecture - The target architecture
     * @returns Docker image name (e.g., "public.ecr.aws/lambda/nodejs:20-x86_64")
     */
    private buildDockerImageName;
    /**
     * Checks if Docker image exists locally before pulling.
     *
     * @param dockerImage - The Docker image to check
     * @returns Promise<boolean> - true if image exists locally
     */
    private checkDockerImageExists;
    /**
     * Pulls a Docker image using the docker pull command.
     * Optimized to skip pull if image already exists locally.
     *
     * @param dockerImage - The Docker image to pull
     * @returns Promise that resolves when the image is pulled
     * @throws Error if docker pull fails
     */
    private pullDockerImage;
    /**
     * Extracts Node.js version by running `node --version` in a Docker container.
     *
     * @param dockerImage - The Docker image to run
     * @returns Promise resolving to the Node.js version string
     * @throws Error if container execution fails
     */
    private extractNodeVersionFromContainer;
    /**
     * Validates that a version string follows semantic versioning format.
     *
     * @param version - The version string to validate
     * @returns true if the version is valid, false otherwise
     */
    private isValidSemanticVersion;
    /**
     * Provides fallback version information when Docker detection fails.
     *
     * @param runtimeName - The AWS Lambda runtime name
     * @param architecture - The target architecture
     * @returns NodeVersionInfo with fallback version
     * @throws NodeRuntimeLayerError if no fallback is available
     */
    private getFallbackVersion;
    /**
     * Clears the version cache.
     * Useful for testing or when cache invalidation is needed.
     */
    clearCache(): void;
    /**
     * Gets the current cache size.
     * Useful for monitoring and debugging.
     */
    getCacheSize(): number;
    /**
     * Checks if Docker is available on the system.
     *
     * @returns Promise resolving to true if Docker is available, false otherwise
     */
    isDockerAvailable(): Promise<boolean>;
}
