/** * SystemSSHConnection — SSH transport via system `ssh` and `scp` binaries. * * Uses `node:child_process` to shell out. Supports OpenSSH multiplexing * (ControlMaster/ControlPersist) for connection reuse across commands. */ import { type ExecOptions, type ExecResult, type SSHConnectionConfig, type Transport, type TransportCapability } from "./types.ts"; /** * Build a deterministic ControlPath for a given config. * * Uses `%C` (a hash of `%l%h%p%r`) to keep the socket path short — macOS * limits Unix socket paths to 104 bytes, and `%h-%p-%r` can easily exceed * that with long hostnames. Falls back to `/tmp` which is shorter than * `$TMPDIR` on macOS (`/var/folders/…` is ~50 chars alone). */ export declare function controlPath(config: SSHConnectionConfig): string; /** * SSH transport that shells out to the system's `ssh` and `scp` binaries * via `node:child_process`. Supports OpenSSH multiplexing for connection reuse. * * Implements the full Transport interface with all four capabilities: * exec, transfer, fetch, and ping. */ export declare class SystemSSHConnection implements Transport { #private; config: SSHConnectionConfig; constructor(config: SSHConnectionConfig); /** SSH supports all transport capabilities. */ capabilities(): ReadonlySet; exec(command: string, opts?: ExecOptions): Promise; transfer(localPath: string, remotePath: string, signal?: AbortSignal): Promise; fetch(remotePath: string, localPath: string, signal?: AbortSignal): Promise; /** Last ping stderr, available for diagnostics after ping() returns false. */ lastPingError: string; ping(): Promise; /** * Close the connection and clean up multiplexing socket if active. * * Sends `ssh -O exit` to tear down the ControlMaster. Failures are * silently ignored — the socket will expire via ControlPersist anyway. */ close(): Promise; } /** Create a SystemSSHConnection, validating that `ssh` is available. */ export declare function createSystemSSHConnection(config: SSHConnectionConfig): Promise; //# sourceMappingURL=connection.d.ts.map