import type { ResolvedTarget } from "./nodeRouter.js"; import type { SshBatchOptions } from "./sshClient.js"; /** * Wraps plain SSH options as a direct target, for callers that reach a single * known host and do not need cluster node resolution (for example `doctor`). */ export declare const directTarget: (options: SshBatchOptions, node?: string) => ResolvedTarget; export type PctExecResult = { stdout: string; node: string; route: "direct" | "hop"; }; /** ssh itself exits 255 when it cannot establish the connection. */ export declare const SSH_CONNECT_FAILURE_EXIT_CODE = 255; export declare class PctExecError extends Error { readonly exitCode: number; readonly route: "direct" | "hop"; constructor(message: string, exitCode: number, route: "direct" | "hop"); /** * Distinguishes "could not reach the node" from "the command failed". Only * the former justifies trying a different route: retrying a genuine command * failure on another path would just run it twice. */ get isConnectivityFailure(): boolean; } /** * Runs a command inside a container on whichever node hosts it. * * `target.wrapCommand` is what makes this cluster-aware: for a direct route it * is the identity, and for a hop it nests the call inside an ssh to the owning * node from the entry host. */ export declare const pctExecOn: (target: ResolvedTarget, ctid: number, command: string) => Promise; /** Back-compatible single-host form. */ export declare const pctExec: (options: SshBatchOptions, ctid: number, command: string) => Promise; //# sourceMappingURL=pctExec.d.ts.map