/**
 * Port Allocator - Dynamic Port Management for Multi-Project Sessions
 *
 * Automatically assigns unique port ranges to each debugging session
 * to prevent conflicts between concurrent projects.
 */
import { PortRange } from './types';
export declare class PortAllocator {
    private basePort;
    private portRangeSize;
    private allocatedRanges;
    private portUsageMap;
    constructor(basePort?: number, portRangeSize?: number);
    /**
     * Allocate a unique port range for a project session
     */
    allocatePortRange(projectId: string): Promise<PortRange>;
    /**
     * Release allocated port range for a project
     */
    releasePortRange(projectId: string): Promise<void>;
    /**
     * Get allocated port range for a project
     */
    getPortRange(projectId: string): PortRange | null;
    /**
     * Get all allocated port ranges
     */
    getAllAllocatedRanges(): Map<string, PortRange>;
    /**
     * Check if a specific port is available
     */
    isPortAvailable(port: number): Promise<boolean>;
    /**
     * Find the next available port starting from a given port
     */
    findAvailablePort(startPort: number): Promise<number>;
    /**
     * Find an available port range (3 consecutive ports)
     */
    private findAvailablePortRange;
    /**
     * Get usage statistics
     */
    getUsageStats(): {
        totalAllocated: number;
        totalPortsUsed: number;
        availableRanges: number;
        basePort: number;
        portRangeSize: number;
    };
    /**
     * Force cleanup of all allocations (emergency use)
     */
    emergencyCleanup(): void;
    /**
     * Validate that allocated ports are still in use
     * and clean up abandoned allocations
     */
    validateAndCleanup(): Promise<string[]>;
    /**
     * Check if a port is actually in use by a process
     */
    private isPortInUse;
}
//# sourceMappingURL=port-allocator.d.ts.map