Module payload

Module payload 

Source
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§

JsonRpcError
JSON-RPC error structure
JsonRpcNotification
JSON-RPC notification structure (no id field, no response expected)
JsonRpcRequest
JSON-RPC request structure
JsonRpcResponse
JSON-RPC response structure
ProcessedNotification
Represents a processed JSON-RPC notification (no response expected)
RegularMessageResponse
Response type for regular message responses
SandboxCommandGetOutputParams
Request parameters for retrieving output from a previous command execution
SandboxCommandRunParams
Request parameters for executing a shell command
SandboxConfig
Configuration for a sandbox Similar to microsandbox-core’s Sandbox but with optional fields for update operations
SandboxConfigResponse
Sandbox configuration response
SandboxMetricsGetParams
Request payload for getting sandbox metrics
SandboxReplGetOutputParams
Request parameters for retrieving output from a previous REPL execution
SandboxReplRunParams
Request parameters for executing code in a REPL environment
SandboxStartParams
Request payload for starting a sandbox
SandboxStatus
Status of an individual sandbox
SandboxStatusResponse
Sandbox status response
SandboxStopParams
Request payload for stopping a sandbox
SystemStatusResponse
System status response

Enums§

JsonRpcResponseOrNotification
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”