/** * Network diagnostic module. * * Uses exec to inspect Docker networks, Traefik proxy, DNS, and container connectivity. * All commands run inside the application container via the Coolify exec API. * * @module */ import { type Result } from "@mks2508/no-throw"; import type { CoolifyService } from "./coolify/index.js"; import { type IOperationTrace } from "./trace.js"; /** * Container network information. */ export interface INetworkInfo { /** /etc/hosts entries */ hosts: string[]; /** DNS resolution results */ dns: Array<{ hostname: string; resolved: boolean; ip?: string; }>; /** Container environment variables related to networking */ networkEnv: Record; /** Reachable services (connectivity test results) */ connectivity: Array<{ target: string; reachable: boolean; responseTime?: number; }>; /** Container's network interfaces */ interfaces: string[]; /** Operation trace */ trace: IOperationTrace; } /** * Deploy failure analysis. */ export interface IDeployFailureAnalysis { /** Deployment UUID */ deploymentUuid: string; /** Deployment status */ status: string; /** Raw build logs */ rawLogs: string; /** Extracted error lines */ errors: string[]; /** Likely error category */ category: "build_error" | "install_error" | "docker_error" | "network_error" | "timeout" | "unknown"; /** Human-readable summary */ summary: string; /** Suggested fix */ suggestion: string; /** Operation trace */ trace: IOperationTrace; } /** * Inspects the network environment of an application container. * * @param svc - CoolifyService instance * @param appUuid - Application UUID * @param servicesToTest - Optional list of service names to test connectivity (e.g., ['db', 'redis']) * @returns Network diagnostic information */ export declare function inspectNetwork(svc: CoolifyService, appUuid: string, servicesToTest?: string[]): Promise>; /** * Analyzes a failed deployment, extracting errors from build logs. * * @param svc - CoolifyService instance * @param deploymentUuid - Deployment UUID * @returns Failure analysis with categorized errors */ export declare function analyzeDeployFailure(svc: CoolifyService, deploymentUuid: string): Promise>; //# sourceMappingURL=network.d.ts.map