/** * HTTP client for Proxmox VE API. * * Uses native fetch (Node 18+) with PVE API Token authentication. * All PVE JSON responses are wrapped in {"data": ...} — this client * unwraps them so callers get clean data. */ import type { AppConfig } from "../types/index.js"; export declare class PveClient { private readonly authHeader; private readonly apiBase; private readonly baseUrl; constructor(config: AppConfig); /** Send a GET request and return unwrapped data. */ get(path: string): Promise; /** Send a POST request with optional body and return unwrapped data. */ post(path: string, body?: Record): Promise; /** Send a PUT request with optional body and return unwrapped data. */ put(path: string, body?: Record): Promise; /** Send a DELETE request and return unwrapped data. */ delete(path: string): Promise; /** * Validate the connection to PVE by calling GET /api2/json/version. * Logs the PVE version on success. */ validateConnection(): Promise; /** * Core request method. Builds the full URL, sends the request, * checks for errors, and unwraps PVE's {"data": ...} envelope. */ private request; } /** * Create a PVE client from config. * Registers credentials as sensitive patterns before creating the client. */ export declare function createClient(config: AppConfig): PveClient; /** * Validate connectivity to PVE. * Must be called during startup before accepting MCP connections. * Exits the process with code 1 if validation fails. */ export declare function validateConnection(client: PveClient): Promise;