import type { ProxmoxClient } from "../proxmox/client.js"; import type { RuntimeConfig } from "../config/validate.js"; import type { SshBatchOptions } from "./sshClient.js"; export type ResolvedTarget = { node: string; ssh: SshBatchOptions; /** Identity for a direct connection; wraps in a nested ssh for a hop. */ wrapCommand: (remoteCommand: string) => string; route: "direct" | "hop"; }; export declare class SshDisabledError extends Error { constructor(); } export declare class GuestNotFoundError extends Error { constructor(vmid: number); } export type ClusterTopology = { isCluster: boolean; clusterName?: string; quorate?: boolean; nodes: Array<{ name: string; ip?: string; local: boolean; online: boolean; }>; }; /** * Reads cluster membership. A standalone node answers with a single node entry * and no cluster entry, which is exactly how we tell the two apart. */ export declare const readClusterTopology: (client: ProxmoxClient) => Promise; export declare class NodeRouter { private readonly client; private readonly config; private topology?; private readonly routeCache; constructor(client: ProxmoxClient, config: RuntimeConfig); private baseSsh; topologySnapshot(): Promise; /** Finds the node hosting a guest. Cluster-wide, so it works from any node. */ resolveNodeForGuest(vmid: number): Promise; /** * True when the entry host we already SSH into is the node in question, in * which case no routing is needed at all. */ private isEntryNode; private addressFor; private directTarget; private hopTarget; /** * Returns every route worth attempting, in order. `auto` yields the direct * route first and the hop as a fallback; the caller records which succeeded. */ routesForNode(node: string): Promise; rememberWorkingRoute(node: string, route: "direct" | "hop"): void; routesForGuest(vmid: number): Promise; } //# sourceMappingURL=nodeRouter.d.ts.map