| 20 | } |
| 21 | |
| 22 | export interface VmHandle { |
| 23 | readonly os: VmOs; |
| 24 | readonly arch: VmArch; |
| 25 | /** Current reachable address of the guest (re-resolved across reboots). */ |
| 26 | readonly host: string; |
| 27 | /** |
| 28 | * Path to the SSH private key for key-based providers (EC2). Undefined for |
| 29 | * password-based providers (tart/sshpass). Published by globalsetup so the |
| 30 | * stateless worker-side `restart()` can reboot the guest. |
| 31 | */ |
| 32 | readonly sshKeyPath?: string; |
| 33 | /** Run a command in the guest over SSH (shell on Unix, PowerShell on Windows). */ |
| 34 | ssh(command: string): Promise<SshResult>; |
| 35 | /** Copy a local file or directory into the guest (recursive for directories). */ |
| 36 | push(localPath: string, remotePath: string): Promise<void>; |
| 37 | /** Reboot the guest OS; resolves only once SSH is reachable again. */ |
| 38 | reboot(): Promise<void>; |
| 39 | /** Forward `localhost:<localPort>` → `guest:<guestPort>` over SSH. */ |
| 40 | tunnel(guestPort: number): Promise<Tunnel>; |
| 41 | /** Discard the VM (delete the tart clone / terminate the EC2 instance). */ |
| 42 | discard(): Promise<void>; |
| 43 | } |
| 44 | |
| 45 | export interface VmProvider { |
| 46 | readonly os: VmOs; |
no outgoing calls
no test coverage detected