import { RemoteSandbox } from '@struktoai/mirage-core/runtime/sandbox/base'; import type { RunResult, RuntimeOptions } from '@struktoai/mirage-core/runtime/types'; import { type SSHRuntimeConfig } from './config.ts'; import type * as Ssh2Mod from 'ssh2'; export type Ssh2Sdk = typeof Ssh2Mod; interface SshResult { stdout: Uint8Array; stderr: Uint8Array; code: number; } /** * A machine reached over SSH as a whole-line runtime. * * You run the machine and its sshd yourself; mirage only connects * (keys or an agent, never a password) and execs lines. One connection opens on * the first captured line and is reused; each line is one exec * channel with real byte stdin and separated stderr, the merged * environment and session cwd dressed onto the command by wrapLine, * because SSH exec has no docker-style `-w`/`-e`. * * This is the one provider whose machine usually IS the fileserver: * mount the same host's directory over the ssh resource at a prefix * equal to its remote absolute path, and captured lines read and * write those files natively, with no FUSE and no mirage installed * remotely. Host keys are not verified (ssh2 never does), so treat * the network path as trusted. */ export declare class SSHRuntime extends RemoteSandbox { readonly name = "ssh"; private client; constructor(options?: RuntimeOptions | Record); protected loadSdk(): Promise; private connectOpts; connect(): Promise; execLine(line: string, stdin: Uint8Array | null, env: Record, cwd: string): Promise; protected ssh(command: string, stdin: Uint8Array | null): Promise; close(): Promise; } export {}; //# sourceMappingURL=runtime.d.ts.map