Expand description
Request and response payload definitions for the microsandbox server.
This module defines the data structures for:
- API request payloads for sandbox operations
- API response payloads for operation results
- Error response structures and types
- Status message formatting
The module implements:
- Request/response serialization and deserialization
- Structured error responses with type categorization
- Success message formatting for sandbox operations
- Detailed error information handling
Structs§
- Json
RpcError - JSON-RPC error structure
- Json
RpcNotification - JSON-RPC notification structure (no id field, no response expected)
- Json
RpcRequest - JSON-RPC request structure
- Json
RpcResponse - JSON-RPC response structure
- Processed
Notification - Represents a processed JSON-RPC notification (no response expected)
- Regular
Message Response - Response type for regular message responses
- Sandbox
Command GetOutput Params - Request parameters for retrieving output from a previous command execution
- Sandbox
Command RunParams - Request parameters for executing a shell command
- Sandbox
Config - Configuration for a sandbox Similar to microsandbox-core’s Sandbox but with optional fields for update operations
- Sandbox
Config Response - Sandbox configuration response
- Sandbox
Metrics GetParams - Request payload for getting sandbox metrics
- Sandbox
Repl GetOutput Params - Request parameters for retrieving output from a previous REPL execution
- Sandbox
Repl RunParams - Request parameters for executing code in a REPL environment
- Sandbox
Start Params - Request payload for starting a sandbox
- Sandbox
Status - Status of an individual sandbox
- Sandbox
Status Response - Sandbox status response
- Sandbox
Stop Params - Request payload for stopping a sandbox
- System
Status Response - System status response
Enums§
- Json
RpcResponse OrNotification - JSON-RPC response or notification result This enum allows handlers to return either a response (for regular requests) or no response (for notifications) while maintaining type safety
Constants§
- JSONRPC_
VERSION - JSON-RPC version - always “2.0”