declare module "e2b" { export class CommandExitError extends Error { exitCode: number; stdout: string; stderr: string; } export class SandboxNotFoundError extends Error {} export class TimeoutError extends Error {} export interface SandboxRunResult { exitCode: number; stdout: string; stderr: string; } export interface SandboxBackgroundHandle { pid: number; stdout: string; stderr: string; wait(): Promise; } export class Sandbox { sandboxId: string; sandboxDomain?: string; static create( templateOrOptions?: string | Record, maybeOptions?: Record, ): Promise; static connect( sandboxId: string, options?: Record, ): Promise; setTimeout(timeoutMs: number): Promise; kill(): Promise; pause(): Promise; files: { write(path: string, data: string | ArrayBuffer): Promise; remove(path: string): Promise; }; commands: { run( command: string, options?: { background?: boolean; stdin?: boolean; cwd?: string; envs?: Record; timeoutMs?: number; }, ): Promise; sendStdin(pid: number, input: string): Promise; closeStdin(pid: number): Promise; }; } }