Overview of microsandbox types contracts
mainThe microsandbox-types package provides the shared task and wire contract types used across the Rust SDK, CLI, cloud API, and TypeScript frontend. It defines the backend-neutral shapes for sandbox specifications and cloud communication.
Note: This is a contract layer only; it does not provide a runtime or manage sandbox lifecycles.
Key Data Models Included:
- Sandbox Specs:
SandboxSpec,SandboxResources,SandboxRuntimeOptions, rootfs sources, mounts, patches, init, and lifecycle policy. - Networking:
NetworkSpec, published ports, and protocols. - Storage:
VolumeSpec,SnapshotSpec, and their kinds. - Execution & Logging:
Rlimit,RlimitResource,LogSource, andSandboxLogLevel. - Cloud Wire Contracts:
CloudCreateSandboxRequest,CloudSandbox, and various paginated/message/error bodies. - Validation: Shared rules for
sandbox-nameandhostname.
Exclusions: Backend-private state (registry credentials, local cache paths, DB rows, resolved manifest digests, process handles) is not included in these types.