Available on crate feature
sandbox only.Expand description
Isolated code execution runtime (experimental — full preset).
Provides the SandboxBackend trait and built-in backends:
ProcessBackend- Subprocess execution with timeout and env isolationWasmBackend- In-process WASM execution via wasmtime (requireswasmfeature)SandboxTool- Tool trait implementation for agent integration
Available with feature: sandbox
Modules§
- backend
- The
SandboxBackendtrait andBackendCapabilitiesdescriptor. - error
- Error types for sandbox execution.
- process
process ProcessBackend— subprocess-based code execution viatokio::process::Command.- sandbox
- OS-level sandbox enforcement types and traits.
- tool
SandboxTool— anadk_core::Toolimplementation that delegates execution to a configuredSandboxBackend.- types
- Core types for sandbox execution:
Language,ExecRequest, andExecResult.
Structs§
- Allowed
Path - A filesystem path entry with an access mode.
- Backend
Capabilities - Describes what a backend supports and enforces.
- Enforced
Limits - Describes which resource limits a backend enforces.
- Exec
Request - A request to execute code in a sandbox.
- Exec
Result - The result of a sandbox execution.
- Network
Rule - A network access rule specifying an allowed domain and ports.
- Process
Backend - Subprocess-based sandbox backend.
- Process
Config - Configuration for
ProcessBackend. - Sandbox
Policy - A declarative sandbox policy describing allowed operations.
- Sandbox
Policy Builder - Builder for constructing
SandboxPolicyvalues incrementally. - Sandbox
Tool - A tool that executes code in an isolated sandbox.
- Wrapped
Command - The result of wrapping a command with sandbox enforcement.
Enums§
- Access
Mode - Filesystem access mode for an allowed path.
- Isolation
Class - How much isolation a backend actually provides.
- Language
- Supported execution languages.
- Sandbox
Error - Errors that can occur during sandbox execution.
Traits§
- Sandbox
Backend - Async trait for isolated code execution backends.
- Sandbox
Enforcer - Platform-specific sandbox enforcement.
Functions§
- get_
enforcer - Returns the platform-appropriate sandbox enforcer.