/** * Auto-Configuration Module * * Detecta ambiente automaticamente e gera configuração otimizada * - Recursos disponíveis (CPU, RAM, disco, rede) - Ambiente (home, datacenter, cloud, mobile) * - Padrão de uso (light, full-node, relay) * - Configura de porta automática */ export interface SystemResources { cpu: { cores: number; model: string; speed: number; loadAvg: number[]; }; memory: { total: number; free: number; available: number; }; disk: { path: string; total: number; free: number; type: string; }; network: { interfaces: Record; hasPublicIP: boolean; estimatedBandwidth: number; }; } export interface NetworkInterfaceInfo { address: string; family: string; internal: boolean; } export interface DetectedEnvironment { type: 'home' | 'office' | 'datacenter' | 'cloud' | 'mobile' | 'unknown'; cloudProvider?: 'aws' | 'gcp' | 'azure' | 'digitalocean' | 'heroku' | 'other'; hasPublicIP: boolean; behindNAT: boolean; canBeRelay: boolean; } export interface UsagePattern { type: 'light' | 'standard' | 'full' | 'relay'; maxConnections: number; cacheSizeMB: number; enableDHT: boolean; enableRelay: boolean; logLevel: 'debug' | 'info' | 'warn' | 'error'; } export interface AutoConfig { environment: DetectedEnvironment; resources: SystemResources; usage: UsagePattern; recommended: { p2pPort: number; apiPort: number; wsPort: number; storagePath: string; maxPeers: number; connectionLimits: { min: number; max: number; }; }; } export declare class AutoConfigurator { private configDir; constructor(); /** * Detect system resources */ detectResources(): Promise; /** * Find best storage path (most free space) */ private findBestStoragePath; /** * Detect filesystem type */ private detectFilesystemType; /** * Detect if machine has public IP */ private detectPublicIP; /** * Check if IP is private */ private isPrivateIP; /** * Estimate network bandwidth (rough) */ private estimateBandwidth; /** * Detect environment type */ detectEnvironment(): Promise; /** * Determine optimal usage pattern based on resources */ determineUsagePattern(): Promise; /** * Find available port */ private findAvailablePort; /** * Generate complete auto-configuration */ generateConfig(): Promise; /** * Apply configuration to config file */ applyConfig(config?: AutoConfig): Promise; /** * Print detected configuration (for CLI) */ printConfig(): Promise; } /** * Quick auto-config */ export declare function autoConfigure(): Promise; /** * Detect if running in CI/CD environment */ export declare function detectCI(): { isCI: boolean; provider?: string; }; /** * Detect if running in Docker/container */ export declare function detectContainer(): boolean; //# sourceMappingURL=autoconfig.d.ts.map