Expand description
mimobox-sdk: Unified Agent Sandbox API
Smart routing by default, full control for advanced users.
Zero-config sandbox creation with automatic backend selection, plus
complete configuration control via Config::builder().
§Quick Start
use mimobox_sdk::Sandbox;
let mut sandbox = Sandbox::new()?;
let result = sandbox.execute("/bin/echo hello")?;
println!("exit: {:?}", result.exit_code);
sandbox.destroy()?;§Feature Gates
| Feature | Backend | Default |
|---|---|---|
os | OS-level (Linux/macOS) | Yes |
vm | microVM (Linux + KVM) | No |
wasm | Wasm (Wasmtime) | No |
§Key Types
Sandbox— Primary entry point for all sandbox operationsConfig/ConfigBuilder— SDK configuration with builder patternExecuteResult— Command execution result (stdout, stderr, exit code, timing)StreamEvent— Streaming output event enumSdkError/ErrorCode— Structured error modelSandboxSnapshot— Opaque snapshot handlePtySession— Interactive terminal session
Structs§
- Config
- SDK-level configuration for sandbox creation and behavior.
- Config
Builder - Fluent builder for constructing
Configinstances. - DirEntry
- 目录条目,表示 list_dir 返回的单个条目。
- Execute
Result - Result of a sandbox command execution.
- File
Stat - 文件元信息,stat 方法返回的类型。
- Http
Response - HTTP response from the controlled host-side proxy.
- PtyConfig
- PTY session configuration.
- PtySession
- Interactive PTY terminal session.
- PtySize
- PTY terminal dimensions.
- Restore
Pool vmand Linux - Snapshot-based restore pool for sub-millisecond VM restore-to-ready latency.
- Restore
Pool Config vmand Linux - Configuration for creating a snapshot-based restore pool.
- Sandbox
- Primary entry point for all sandbox operations.
- Sandbox
Snapshot - Opaque handle to a sandbox memory snapshot.
Enums§
- Error
Code - Structured error code for programmatic error matching.
- File
Type - 文件类型枚举,用于目录条目的类型区分。
- Isolation
Level - Isolation level selection strategy.
- Network
Policy - Network access policy for the sandbox.
- PtyEvent
- PTY session event.
- SdkError
- SDK error type.
- Stream
Event - Streaming output event from [
Sandbox::stream_execute()]. - Trust
Level - Trust level for code being executed.