clawbox-types
Shared type definitions for the clawbox sandboxed agent execution service.
Overview
clawbox-types is the foundational crate in the clawbox ecosystem. It defines the core API types, tool manifests, sandbox policies, agent configuration, and host call interfaces used by every other clawbox crate. By centralizing these definitions, all crates stay in sync without circular dependencies.
Usage
use ;
// Build an execution request
let req = new
.with_capabilities;
// Configure an agent with builder pattern
let agent = new
.with_policy
.with_capabilities;
Features
- API types —
ExecuteRequest,ExecuteResponse,ContainerSpawnRequest,HealthResponse, and more - Tool manifests —
ToolManifestwith network, credential, and resource configurations - Sandbox policies —
WasmOnly,Container, andContainerDirectisolation levels - Agent types —
AgentConfig,AgentInfo,AgentStatusfor lifecycle management - Resource limits — Timeout, memory, CPU, and output size budgets
- Host call trait —
HostCallHandlerfor WASM-host RPC dispatch - Credential patterns — Shared regex patterns for leak detection
- Builder patterns — Ergonomic construction for all major types
#[non_exhaustive]— All structs and enums are non-exhaustive for semver safety
Architecture
| Module | Contents |
|---|---|
api |
HTTP request/response types (ExecuteRequest, etc.) |
policy |
SandboxPolicy, Capabilities, ResourceLimits |
manifest |
ToolManifest, ToolMeta, network/credential config |
agent |
AgentConfig, AgentInfo, lifecycle types |
host |
HostCallHandler trait for WASM-host RPC |
patterns |
Shared credential detection regex patterns |
License
MIT