import { SandboxPrimitive, WriteFilesResult, WatchEvent } from "../base"; import { AgentProfile } from "../../../types/agent-profiles"; import { ModalContext } from "./client"; import { AGENT_ARCHITECTURE_TYPE } from "../../../types/session/index"; export declare class ModalSandbox implements SandboxPrimitive { private readonly sandbox; static create(agentProfile: AgentProfile, modalContext: ModalContext, agentArchitecture: AGENT_ARCHITECTURE_TYPE): Promise; private constructor(); getId(): string; getBasePaths(): { APP_DIR: string; WORKSPACE_DIR: string; HOME_DIR: string; BUNDLED_MCP_DIR: string; }; /** * Check if sandbox is running */ isRunning(): Promise; /** * Poll the sandbox to check if it's still running * @returns null if running, exit code (number) if exited */ poll(): Promise; /** * Terminate the sandbox */ terminate(): Promise; /** * Execute a command in the sandbox * Returns the same process type as Modal's sandbox.exec() */ exec(command: string[], options?: { cwd?: string; }): Promise>; /** * Read a file from the sandbox */ readFile(path: string): Promise; /** * Write a file to the sandbox */ writeFile(path: string, content: string): Promise; /** * Write multiple files in a single operation (bulk write for efficiency). * Creates a tar archive and extracts it via stdin to avoid multiple round-trips. */ writeFiles(files: { path: string; content: string | undefined; }[]): Promise; /** * Create a directory in the sandbox */ createDirectory(path: string): Promise; /** * List files in a directory */ listFiles(directory: string, pattern?: string): Promise; /** * Watch a directory for file changes. * Promise resolves immediately when watcher process starts. * Callback is invoked for each file change event. * Cleanup is automatic on terminate(). */ watch(watchPath: string, callback: (event: WatchEvent) => void, opts?: { ignorePatterns?: string[]; }): Promise; } //# sourceMappingURL=index.d.ts.map