FsProvider and ShellProvider — that you can implement for any environment.
This lets you run the same agent code locally, in a sandbox, or in the cloud, just by swapping the provider.
Interfaces
FsProvider
ShellProvider
Environment
TheEnvironment type combines both providers:
Built-in Providers
NodeFsProvider
The default filesystem provider for Node.js environments. Usesnode:fs under the hood.
- File size guard — throws
FileTooLargeErrorif a file exceedsmaxFileSize - Auto-mkdir —
writeFilecreates parent directories automatically - Path resolution — relative paths are resolved from
cwd
NodeShellProvider
The default shell provider for Node.js. Runs commands viabash -c.
exec method supports per-call timeout (default 30s), cwd, and env overrides.
VfsFsProvider
A virtual filesystem provider from the@openharness/provider-vfs package. Provides sandboxed, in-memory, or SQLite-backed file access — ideal for testing, isolated execution, or environments without a real filesystem.
/workspace. It initializes lazily on first use.
Options:
Storage Backends
The VFS provider supports three backends via@platformatic/vfs (or the future node:vfs):
- Memory (default)
- SQLite
- Real FS
In-memory filesystem — fast, ephemeral, no persistence:
Accessing the VFS Instance
For advanced use cases, you can access the underlyingVirtualFileSystem:
Custom Providers
Implement theFsProvider and/or ShellProvider interfaces to support any environment:
- E2B sandboxes for isolated code execution
- Cloudflare Workers for edge deployment
- Daytona for managed dev environments
- Docker containers for reproducible builds
- Custom APIs wrapping remote filesystems