interface SandboxBackendProtocolUnique identifier for the sandbox backend
Download multiple files from the sandbox. Implementations must support partial success.
Edit a file by replacing string occurrences.
Uses downloadFiles() to read, performs string replacement in TypeScript, then uploadFiles() to write back. No runtime needed on the sandbox host.
Memory-conscious: releases intermediate references early so the GC can reclaim buffers before the next large allocation is made.
Execute a command in the sandbox. This is the only method concrete implementations must provide.
Structured glob matching returning FileInfo objects.
Search file contents for a literal text pattern.
Binary files (determined by MIME type) are skipped.
Structured listing with file metadata.
Lists files and directories in the specified directory (non-recursive). Directories have a trailing / in their path and is_dir=true.
Read file content with line numbers.
Uses pure POSIX shell (awk) via execute() — only the requested slice is returned over the wire, making this efficient for large files. Works on any Linux including Alpine (no Python or Node.js needed).
Read file content as raw FileData.
Uses downloadFiles() directly — no runtime needed on the sandbox host.
Upload multiple files to the sandbox. Implementations must support partial success.
Create a new file with content.
Uses downloadFiles() to check existence and uploadFiles() to write. No runtime needed on the sandbox host.
Download multiple files from the sandbox.
Edit a file by replacing string occurrences.
Execute a command in the sandbox.
Structured glob matching returning FileInfo objects.
Search file contents for a literal text pattern.
Structured listing with file metadata.
Read file content with line numbers.
Read file content as raw FileData.
Upload multiple files to the sandbox.
Create a new file with content.
Download multiple files from the sandbox.
Edit a file by replacing string occurrences.
Structured glob matching returning FileInfo objects.
Search file contents for a literal text pattern.
Structured listing with file metadata.
Read file content with line numbers.
Read file content as raw FileData.
Upload multiple files to the sandbox.
Create a new file with content.