import type { VM } from "./vm"; import { SandboxFileSystem, SandboxProcess, SandboxProcessStream } from "./sandbox"; import type { VMExecOptions, VMProcessWaitOptions } from "../../types/vm"; /** A reattachable process bound to one boot's container ID, never to a reused PID. */ export declare class VMProcess extends SandboxProcess { readonly vm: VM; private source; private out?; private err?; private combined?; constructor(vm: VM, source: SandboxProcess); get containerId(): string; status(opts?: VMProcessWaitOptions): Promise<[number, string]>; /** A wait timeout or abort ends the wait; call kill() explicitly to cancel execution. */ wait(opts?: VMProcessWaitOptions | number): Promise; kill(): Promise; private stream; get stdout(): SandboxProcessStream; get stderr(): SandboxProcessStream; private makeLogs; /** Cached async stream of stdout and stderr. close() kills a live log-follow process. */ get logs(): { _stdout: SandboxProcessStream; _stderr: SandboxProcessStream; _queue: string[]; _stdoutBuffer: string; _stderrBuffer: string; _stdoutExhausted: boolean; _stderrExhausted: boolean; _process_stream(streamName: "stdout" | "stderr"): Promise; _fill_queue(): Promise; read(): Promise; [Symbol.asyncIterator](): AsyncIterableIterator; } & { process: VMProcess; close: () => Promise; }; } /** Python-style process namespace; direct vm.exec/listProcesses/getProcess are also available. */ export declare class VMProcessManager { private vm; constructor(vm: VM); exec(command: string | string[], opts?: VMExecOptions): Promise; execShell(command: string, opts?: VMExecOptions): Promise; list(): Promise; get(pid: number, opts?: { containerId?: string; }): Promise; getProcess(pid: number, opts?: { containerId?: string; }): Promise; } /** The existing JS filesystem surface, resolved against the current VM boot on every operation. */ export declare class VMFileSystem { private vm; constructor(vm: VM); private call; uploadFile(...args: Parameters): Promise; upload(...args: Parameters): Promise; download(...args: Parameters): Promise>; stat(...args: Parameters): Promise; list(...args: Parameters): Promise; mkdir(...args: Parameters): Promise; removeDir(...args: Parameters): Promise; removeFile(...args: Parameters): Promise; replace(...args: Parameters): Promise; find(...args: Parameters): Promise; downloadFile(...args: Parameters): Promise; writeBytes(...args: Parameters): Promise; writeText(...args: Parameters): Promise; readBytes(...args: Parameters): Promise>; readText(...args: Parameters): Promise; statFile(...args: Parameters): Promise; listFiles(...args: Parameters): Promise; createDirectory(...args: Parameters): Promise; deleteDirectory(...args: Parameters): Promise; deleteFile(...args: Parameters): Promise; remove(...args: Parameters): Promise; replaceInFiles(...args: Parameters): Promise; findInFiles(...args: Parameters): Promise; } /** Docker commands use literal argv and keep the same run/compose helpers as Sandbox. */ export declare class VMDocker { private vm; private readyContainer?; constructor(vm: VM); ensureReady(timeoutMs?: number): Promise; exec(args: string[], opts?: VMExecOptions): Promise; run(image: string, args?: string[], opts?: VMExecOptions): Promise; compose(args: string[], opts?: VMExecOptions): Promise; composeStandalone(args: string[], opts?: VMExecOptions): Promise; version(opts?: VMExecOptions): Promise; }