// ─── Provider Registry ────────────────────────────────────────────────────────
export const PROVIDER_REGISTRY = {
    hetzner: {
        envKey: "HETZNER_TOKEN",
        displayName: "Hetzner Cloud",
        apiBaseUrl: "https://api.hetzner.cloud/v1",
    },
    digitalocean: {
        envKey: "DIGITALOCEAN_TOKEN",
        displayName: "DigitalOcean",
        apiBaseUrl: "https://api.digitalocean.com/v2",
    },
    vultr: {
        envKey: "VULTR_TOKEN",
        displayName: "Vultr",
        apiBaseUrl: "https://api.vultr.com/v2",
    },
    linode: {
        envKey: "LINODE_TOKEN",
        displayName: "Linode (Akamai)",
        apiBaseUrl: "https://api.linode.com/v4",
    },
};
export const SUPPORTED_PROVIDERS = Object.keys(PROVIDER_REGISTRY);
export const PROVIDER_ENV_KEYS = Object.fromEntries(SUPPORTED_PROVIDERS.map((p) => [p, PROVIDER_REGISTRY[p].envKey]));
export const PROVIDER_DISPLAY_NAMES = Object.fromEntries(SUPPORTED_PROVIDERS.map((p) => [p, PROVIDER_REGISTRY[p].displayName]));
export function invalidProviderError(value) {
    return `Invalid provider: "${value}". Use ${SUPPORTED_PROVIDERS.map((p) => `"${p}"`).join(", ")}.`;
}
// ─── Provider-specific IP wait configuration (IP assignment latency varies significantly)
export const IP_WAIT = {
    hetzner: { attempts: 10, interval: 3000 }, // 30s (instant IP)
    digitalocean: { attempts: 20, interval: 3000 }, // 60s
    vultr: { attempts: 40, interval: 5000 }, // 200s (slowest IP assignment)
    linode: { attempts: 30, interval: 5000 }, // 150s
};
// Provider-specific minimum wait before first Coolify health check
export const COOLIFY_MIN_WAIT = {
    hetzner: 60000, digitalocean: 120000, vultr: 180000, linode: 120000,
};
// Provider-specific boot polling (boot time varies significantly by provider)
export const BOOT_WAIT = {
    hetzner: { attempts: 15, interval: 2000 }, // 30s
    digitalocean: { attempts: 30, interval: 2000 }, // 60s
    vultr: { attempts: 60, interval: 3000 }, // 180s
    linode: { attempts: 40, interval: 3000 }, // 120s
};
export const BOOT_WAIT_DEFAULT = { attempts: 30, interval: 2000 }; // 60s fallback
// SCP file transfer timeout — prevents CLI hang on network failures (MCP + interactive mode)
export const SCP_TIMEOUT_MS = 300_000; // 5 minutes
// Platform install URLs (pinned to HTTPS CDN)
export const COOLIFY_INSTALL_URL = "https://cdn.coollabs.io/coolify/install.sh";
export const DOKPLOY_INSTALL_URL = "https://dokploy.com/install.sh";
export const COOLIFY_RESTART_CMD = "cd /data/coolify/source && docker compose -f docker-compose.yml -f docker-compose.prod.yml restart coolify";
// Coolify database/paths
export const COOLIFY_SOURCE_DIR = "/data/coolify/source";
export const COOLIFY_DB_CONTAINER = "coolify-db";
export const COOLIFY_DB_USER = "coolify";
export const COOLIFY_DB_NAME = "coolify";
// Provider-specific OS IDs
export const VULTR_UBUNTU_OS_ID = 2284; // Ubuntu 24.04
// Dokploy database/paths
export const DOKPLOY_DB_CONTAINER = "dokploy-postgres";
export const DOKPLOY_DB_USER = "dokploy";
export const DOKPLOY_DB_NAME = "dokploy";
// Platform default ports
export const COOLIFY_PORT = 8000;
export const DOKPLOY_PORT = 3000;
// ─── Timeout & Delay Constants ──────────────────────────────────────────────
export const HTTP_TIMEOUT_MS = 5_000; // axios health/status checks
export const DOCTOR_TIMEOUT_MS = 10_000; // doctor token validation
export const LOCK_FIREWALL_TIMEOUT_MS = 60_000;
export const LOCK_UPGRADES_TIMEOUT_MS = 120_000;
export const LOCK_PACKAGES_TIMEOUT_MS = 60_000;
export const EVIDENCE_TIMEOUT_MS = 120_000;
export const POLL_DELAY_MS = 5_000; // status/deploy polling
export const RESTART_DELAY_MS = 2_000; // restart wait
export const DEPLOY_STEP_DELAY_MS = 1_000; // deploy inter-step
// ─── Snapshot Cost Rates (per GB per month) ─────────────────────────────────
export const SNAPSHOT_COST_PER_GB = {
    hetzner: { rate: 0.006, currency: "€" },
    digitalocean: { rate: 0.06, currency: "$" },
    vultr: { rate: 0.05, currency: "$" },
    linode: { rate: 0.004, currency: "$" },
};
export function formatSnapshotCost(provider, sizeGb) {
    const cost = SNAPSHOT_COST_PER_GB[provider];
    if (!cost)
        return "N/A";
    return `${cost.currency}${(sizeGb * cost.rate).toFixed(2)}/mo`;
}
// ─── SSH Crypto Blacklists (shared by lock + audit) ─────────────────────────
export const WEAK_CIPHERS = ["arcfour", "arcfour128", "arcfour256", "3des-cbc", "blowfish-cbc", "cast128-cbc"];
export const WEAK_MACS = ["hmac-md5", "hmac-sha1-96", "umac-64@openssh.com"];
export const WEAK_KEX = ["diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1"];
// ─── Audit Versioning ─────────────────────────────────────────────────────────
export const AUDIT_VERSION = "1.10.0";
//# sourceMappingURL=constants.js.map