import { Duplex } from "stream"; import type { VMTunnelOptions } from "../../types/vm"; /** A private TCP byte stream using beta9's resumable protocol and exactly-once request acknowledgements. */ export declare class VMTunnel extends Duplex { private url; private opts; readonly session: `${string}-${string}-${string}-${string}-${string}`; private socket?; private readId; private readAck; private inputAck; private pendingInput?; private pendingOutput; private wantRead; private sentRead?; private recoverySince; private retry?; private attempt; private readyResolve; private readyReject; private abort?; readonly ready: Promise; constructor(url: string, opts?: VMTunnelOptions); static open(vmId: string, port: number, opts?: VMTunnelOptions): Promise; private connect; private send; private requestRead; private finishRead; _read(): void; _write(chunk: Buffer, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void; _final(callback: (error?: Error | null) => void): void; _destroy(error: Error | null, callback: (error?: Error | null) => void): void; close(): void; }