/** * SSH transport errors * * Thrown only when the transport itself fails. A non-zero return code from * the remote command is not an error — it arrives in ExecResult. */ /** * Base transport error */ export declare class SSHRunnerError extends Error { /** ssh's return code, if the process managed to exit */ readonly exitCode?: number; /** ssh's diagnostic output */ readonly stderr?: string; constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * Network or transport error — the only class that's safe to retry * (and even then, only for idempotent operations) */ export declare class SSHTransportError extends SSHRunnerError { constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * The channel closed without letting the command print anything. The * connection itself is still alive, so the retry happens right away — * there's no one and nothing to wait for here. */ export declare class SSHChannelClosedError extends SSHTransportError { constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * Authentication error — retrying is pointless and harmful: * every attempt counts against the server as a failed login */ export declare class SSHAuthError extends SSHRunnerError { constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * Host key mismatch or unknown host key */ export declare class SSHHostKeyError extends SSHRunnerError { constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * Operation aborted by timeout. * * Never retried: the command already started on the server, and a retry * could run the mutation twice. */ export declare class SSHTimeoutError extends SSHRunnerError { /** Partial output accumulated before the timeout fired */ readonly partialStdout: string; readonly partialStderr: string; constructor(message: string, details?: { partialStdout?: string; partialStderr?: string; }); } /** * Operation cancelled by the caller. * * Differs from a timeout in that it's an expected outcome, not a failure: * the agent changed its mind, or the user interrupted the call. */ export declare class SSHCancelledError extends SSHRunnerError { readonly partialStdout: string; readonly partialStderr: string; constructor(message: string, details?: { partialStdout?: string; partialStderr?: string; }); } /** * The system ssh was not found in PATH */ export declare class SSHBinaryMissingError extends SSHRunnerError { constructor(message: string); } /** * The profile configuration is incompatible with the environment * (e.g. a password-based profile on OpenSSH older than 8.4) */ export declare class SSHUnsupportedConfigError extends SSHRunnerError { constructor(message: string); } /** * The server's concurrent session limit was reached (MaxSessions), and the * client also failed to open a separate connection in place of a session: * a plain session refusal it handles on its own, without our involvement. */ export declare class SSHMuxLimitError extends SSHRunnerError { constructor(message: string, details?: { exitCode?: number; stderr?: string; }); } /** * Whether it's safe to retry the operation for this error. * * Only transport failures are retried — and only when the caller explicitly * marked the operation idempotent. */ export declare function isRetryable(error: unknown, idempotent: boolean): boolean;