{ "openapi": "3.1.0", "info": { "title": "SmolVM SDK bridge", "summary": "A private local bridge for SmolVM SDK clients.", "version": "1" }, "paths": { "/sdk/v1/capabilities": { "get": { "summary": "Capabilities", "operationId": "capabilities_sdk_v1_capabilities_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilitiesResponse" } } } } } } }, "/sdk/v1/events": { "get": { "summary": "Events", "operationId": "events_sdk_v1_events_get", "responses": { "200": { "description": "Successful Response", "content": { "text/event-stream": {} } } } } }, "/sdk/v1/diagnostics": { "get": { "summary": "Diagnostics", "operationId": "diagnostics_sdk_v1_diagnostics_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiagnosticsResponse" } } } } } } }, "/computers": { "post": { "summary": "Create Computer", "operationId": "createComputer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateComputerRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComputerResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/computers/{computer_id}": { "delete": { "summary": "Delete Computer", "operationId": "deleteComputer", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/computers/{computer_id}/cancel": { "post": { "summary": "Cancel Computer Operation", "description": "Stop an in-flight operation by deleting its computer VM.", "operationId": "cancel_computer_operation_computers__computer_id__cancel_post", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/computers/{computer_id}/exec": { "post": { "summary": "Exec Computer Command", "operationId": "execComputerCommand", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/computers/{computer_id}/files": { "put": { "summary": "Write Computer File", "operationId": "writeComputerFile", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } } }, "get": { "summary": "Read Computer File", "operationId": "readComputerFile", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/computers/{computer_id}/browser/launch": { "post": { "summary": "Launch Computer Browser", "operationId": "launchComputerBrowser", "parameters": [ { "name": "computer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Computer Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ComputerBrowserResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/browser-sessions": { "post": { "summary": "Create Browser Session", "operationId": "createBrowserSession", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBrowserSessionRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BrowserSessionResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/browser-sessions/{session_id}": { "delete": { "summary": "Delete Browser Session", "operationId": "deleteBrowserSession", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/browser-sessions/{session_id}/exec": { "post": { "summary": "Exec Browser Command", "operationId": "execBrowserCommand", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/browser-sessions/{session_id}/files": { "put": { "summary": "Write Browser File", "operationId": "writeBrowserFile", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "204": { "description": "Successful Response" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } } }, "get": { "summary": "Read Browser File", "operationId": "readBrowserFile", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Session Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }, "description": "Not Found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes": { "get": { "summary": "List Sandboxes", "operationId": "listSandboxes", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "items": { "$ref": "#/components/schemas/SandboxResponse" }, "type": "array", "title": "Response Listsandboxes" } } } } } }, "post": { "summary": "Create Sandbox", "operationId": "createSandbox", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSandboxRequest" } } }, "required": true }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes/{sandbox_id}": { "get": { "summary": "Get Sandbox", "operationId": "getSandbox", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SandboxResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "summary": "Delete Sandbox", "operationId": "deleteSandbox", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes/{sandbox_id}/desktop": { "get": { "summary": "Get Sandbox Desktop", "operationId": "getSandboxDesktop", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DesktopResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes/{sandbox_id}/cancel": { "post": { "summary": "Cancel Sandbox Operation", "description": "Stop an in-flight operation by deleting its session VM.", "operationId": "cancel_sandbox_operation_sandboxes__sandbox_id__cancel_post", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes/{sandbox_id}/exec": { "post": { "summary": "Exec Command", "operationId": "execCommand", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExecResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/sandboxes/{sandbox_id}/files": { "put": { "summary": "Write File", "operationId": "write_file_sandboxes__sandbox_id__files_put", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "summary": "Read File", "operationId": "read_file_sandboxes__sandbox_id__files_get", "parameters": [ { "name": "sandbox_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Sandbox Id" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string", "title": "Path" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "BrowserSessionResponse": { "properties": { "session_id": { "type": "string", "title": "Session Id" }, "sandbox_id": { "type": "string", "title": "Sandbox Id" }, "status": { "$ref": "#/components/schemas/BrowserSessionState" }, "cdp_url": { "type": "string", "title": "Cdp Url" }, "viewer_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Viewer Url" }, "display_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Display Url" }, "profile_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Profile Id" } }, "type": "object", "required": [ "session_id", "sandbox_id", "status", "cdp_url" ], "title": "BrowserSessionResponse", "description": "Ready browser session endpoints returned only to the owning SDK client." }, "BrowserSessionState": { "type": "string", "enum": [ "created", "starting", "ready", "stopping", "error", "deleted" ], "title": "BrowserSessionState", "description": "Browser session lifecycle states." }, "BrowserViewportRequest": { "properties": { "width": { "type": "integer", "maximum": 7680.0, "minimum": 640.0, "title": "Width", "default": 1280 }, "height": { "type": "integer", "maximum": 4320.0, "minimum": 480.0, "title": "Height", "default": 720 } }, "type": "object", "title": "BrowserViewportRequest", "description": "Requested browser viewport in CSS pixels." }, "CapabilitiesResponse": { "properties": { "protocol_version": { "type": "integer", "const": 1, "title": "Protocol Version", "default": 1 }, "capabilities": { "items": { "type": "string" }, "type": "array", "title": "Capabilities", "default": [ "sandbox.create", "sandbox.delete", "sandbox.exec", "files.read", "files.write", "browser.create", "browser.delete", "browser.endpoints", "browser.exec", "browser.files", "browser.events", "computer.create", "computer.delete", "computer.endpoints", "computer.exec", "computer.files", "computer.browser", "computer.events", "events", "diagnostics" ] } }, "type": "object", "title": "CapabilitiesResponse", "description": "Runtime protocol and feature discovery." }, "ComputerBrowserResponse": { "properties": { "status": { "type": "string", "enum": [ "ready", "closed", "error" ], "title": "Status" }, "cdp_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cdp Url" } }, "type": "object", "required": [ "status", "cdp_url" ], "title": "ComputerBrowserResponse", "description": "State and automation address for Chromium inside a computer." }, "ComputerDisplayResponse": { "properties": { "viewer_url": { "type": "string", "title": "Viewer Url" }, "vnc_url": { "type": "string", "title": "Vnc Url" } }, "type": "object", "required": [ "viewer_url", "vnc_url" ], "title": "ComputerDisplayResponse", "description": "Addresses for watching or controlling a computer display." }, "ComputerResourcesRequest": { "properties": { "memory_mib": { "type": "integer", "maximum": 16384.0, "minimum": 512.0, "title": "Memory Mib", "default": 2048 }, "disk_mib": { "type": "integer", "maximum": 16384.0, "minimum": 2048.0, "title": "Disk Mib", "default": 8192 }, "vcpus": { "type": "integer", "const": 2, "title": "Vcpus", "default": 2 } }, "type": "object", "title": "ComputerResourcesRequest", "description": "CPU, memory, and disk requested for a Linux computer." }, "ComputerResponse": { "properties": { "computer_id": { "type": "string", "title": "Computer Id" }, "sandbox_id": { "type": "string", "title": "Sandbox Id" }, "template": { "type": "string", "const": "linux-desktop", "title": "Template" }, "status": { "type": "string", "const": "ready", "title": "Status" }, "capabilities": { "items": { "type": "string", "enum": [ "display.viewer", "display.vnc", "browser.cdp", "sandbox.exec", "sandbox.files" ] }, "type": "array", "title": "Capabilities" }, "display": { "$ref": "#/components/schemas/ComputerDisplayResponse" }, "browser": { "$ref": "#/components/schemas/ComputerBrowserResponse" } }, "type": "object", "required": [ "computer_id", "sandbox_id", "template", "status", "capabilities", "display", "browser" ], "title": "ComputerResponse", "description": "A ready Linux computer and its grouped application endpoints." }, "CreateBrowserSessionRequest": { "properties": { "session_id": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,62}[a-z0-9]$|^[a-z0-9]$" }, { "type": "null" } ], "title": "Session Id" }, "mode": { "type": "string", "enum": [ "headless", "live" ], "title": "Mode", "default": "headless" }, "backend": { "type": "string", "enum": [ "firecracker", "qemu", "libkrun", "auto" ], "title": "Backend", "default": "auto" }, "profile_mode": { "type": "string", "enum": [ "ephemeral", "persistent" ], "title": "Profile Mode", "default": "ephemeral" }, "profile_id": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,62}[a-z0-9]$|^[a-z0-9]$" }, { "type": "null" } ], "title": "Profile Id" }, "timeout_minutes": { "type": "integer", "maximum": 240.0, "minimum": 1.0, "title": "Timeout Minutes", "default": 30 }, "viewport": { "$ref": "#/components/schemas/BrowserViewportRequest" }, "record_video": { "type": "boolean", "title": "Record Video", "default": false }, "allow_downloads": { "type": "boolean", "title": "Allow Downloads", "default": true }, "memory": { "type": "integer", "maximum": 16384.0, "minimum": 512.0, "title": "Memory", "default": 2048 }, "disk_size": { "type": "integer", "maximum": 16384.0, "minimum": 2048.0, "title": "Disk Size", "default": 4096 }, "network": { "oneOf": [ { "$ref": "#/components/schemas/OpenNetworkPolicy" }, { "$ref": "#/components/schemas/OffNetworkPolicy" }, { "$ref": "#/components/schemas/RestrictedNetworkPolicy" } ], "title": "Network", "discriminator": { "propertyName": "mode", "mapping": { "off": "#/components/schemas/OffNetworkPolicy", "open": "#/components/schemas/OpenNetworkPolicy", "restricted": "#/components/schemas/RestrictedNetworkPolicy" } } } }, "type": "object", "title": "CreateBrowserSessionRequest", "description": "Create and boot a browser session owned by one SDK client." }, "CreateComputerRequest": { "properties": { "computer_id": { "anyOf": [ { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,62}[a-z0-9]$|^[a-z0-9]$" }, { "type": "null" } ], "title": "Computer Id" }, "template": { "type": "string", "const": "linux-desktop", "title": "Template", "default": "linux-desktop" }, "backend": { "type": "string", "enum": [ "firecracker", "qemu", "auto" ], "title": "Backend", "default": "auto" }, "display": { "$ref": "#/components/schemas/BrowserViewportRequest" }, "resources": { "$ref": "#/components/schemas/ComputerResourcesRequest" }, "network": { "oneOf": [ { "$ref": "#/components/schemas/OpenNetworkPolicy" }, { "$ref": "#/components/schemas/OffNetworkPolicy" }, { "$ref": "#/components/schemas/RestrictedNetworkPolicy" } ], "title": "Network", "discriminator": { "propertyName": "mode", "mapping": { "off": "#/components/schemas/OffNetworkPolicy", "open": "#/components/schemas/OpenNetworkPolicy", "restricted": "#/components/schemas/RestrictedNetworkPolicy" } } }, "workspace": { "items": { "$ref": "#/components/schemas/WorkspaceMount" }, "type": "array", "title": "Workspace" } }, "type": "object", "title": "CreateComputerRequest", "description": "Create a ready Linux computer owned by one SDK client." }, "CreateSandboxRequest": { "properties": { "image": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image", "description": "Image reference to boot. Omit to use the published image for the OS." }, "os": { "anyOf": [ { "type": "string", "enum": [ "alpine", "ubuntu" ] }, { "type": "null" } ], "title": "Os", "description": "Guest OS. Ubuntu is the SDK default; Alpine is optional." }, "memory": { "anyOf": [ { "type": "integer", "maximum": 16384.0, "minimum": 128.0 }, { "type": "null" } ], "title": "Memory", "description": "Memory in MiB." }, "disk_size": { "anyOf": [ { "type": "integer", "maximum": 262144.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Disk Size", "description": "Root disk size in MiB." }, "backend": { "anyOf": [ { "type": "string", "enum": [ "firecracker", "qemu", "libkrun", "vz" ] }, { "type": "null" } ], "title": "Backend", "description": "Optional runtime backend override." }, "network": { "oneOf": [ { "$ref": "#/components/schemas/OpenNetworkPolicy" }, { "$ref": "#/components/schemas/OffNetworkPolicy" }, { "$ref": "#/components/schemas/RestrictedNetworkPolicy" } ], "title": "Network", "description": "Outbound network policy.", "discriminator": { "propertyName": "mode", "mapping": { "off": "#/components/schemas/OffNetworkPolicy", "open": "#/components/schemas/OpenNetworkPolicy", "restricted": "#/components/schemas/RestrictedNetworkPolicy" } } } }, "type": "object", "title": "CreateSandboxRequest", "description": "Create and boot an SDK-session sandbox." }, "DesktopResponse": { "properties": { "protocol": { "type": "string", "const": "vnc", "title": "Protocol", "default": "vnc" }, "host": { "type": "string", "enum": [ "127.0.0.1", "localhost", "::1" ], "title": "Host" }, "port": { "type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Port" }, "viewer_url": { "type": "string", "title": "Viewer Url" } }, "type": "object", "required": [ "host", "port", "viewer_url" ], "title": "DesktopResponse", "description": "A sanitized loopback display endpoint for a running sandbox." }, "DiagnosticsResponse": { "properties": { "protocol_version": { "type": "integer", "const": 1, "title": "Protocol Version", "default": 1 }, "runtime_version": { "type": "string", "title": "Runtime Version" }, "python_version": { "type": "string", "title": "Python Version" }, "platform": { "type": "string", "title": "Platform" }, "supported": { "type": "boolean", "title": "Supported" }, "problems": { "items": { "type": "string" }, "type": "array", "title": "Problems", "default": [] } }, "type": "object", "required": [ "runtime_version", "python_version", "platform", "supported" ], "title": "DiagnosticsResponse", "description": "Safe local runtime facts suitable for a bug report." }, "ErrorResponse": { "properties": { "detail": { "type": "string", "title": "Detail", "description": "Short explanation with a recovery action." } }, "type": "object", "required": [ "detail" ], "title": "ErrorResponse", "description": "The body returned for a handled API error." }, "ExecRequest": { "properties": { "command": { "type": "string", "title": "Command" }, "timeout": { "type": "integer", "maximum": 3600.0, "minimum": 1.0, "title": "Timeout", "default": 30 }, "shell": { "type": "string", "enum": [ "login", "raw" ], "title": "Shell", "default": "login" }, "cwd": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Cwd", "description": "Absolute working directory in the guest." }, "env": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Env" } }, "type": "object", "required": [ "command" ], "title": "ExecRequest", "description": "Run one command inside a sandbox." }, "ExecResponse": { "properties": { "exit_code": { "type": "integer", "title": "Exit Code" }, "stdout": { "type": "string", "title": "Stdout" }, "stderr": { "type": "string", "title": "Stderr" }, "duration_ms": { "type": "integer", "minimum": 0.0, "title": "Duration Ms", "default": 0 } }, "type": "object", "required": [ "exit_code", "stdout", "stderr" ], "title": "ExecResponse", "description": "Captured command result. Non-zero exits are successful HTTP responses." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "OffNetworkPolicy": { "properties": { "mode": { "type": "string", "const": "off", "title": "Mode" } }, "type": "object", "required": [ "mode" ], "title": "OffNetworkPolicy", "description": "Block outbound network access." }, "OpenNetworkPolicy": { "properties": { "mode": { "type": "string", "const": "open", "title": "Mode" } }, "type": "object", "required": [ "mode" ], "title": "OpenNetworkPolicy", "description": "Allow all outbound network access." }, "RestrictedNetworkPolicy": { "properties": { "mode": { "type": "string", "const": "restricted", "title": "Mode" }, "allowed_cidrs": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Allowed Cidrs" } }, "type": "object", "required": [ "mode", "allowed_cidrs" ], "title": "RestrictedNetworkPolicy", "description": "Allow outbound access only to the supplied IPv4 ranges." }, "SandboxResponse": { "properties": { "id": { "type": "string", "title": "Id" }, "status": { "$ref": "#/components/schemas/VMState" } }, "type": "object", "required": [ "id", "status" ], "title": "SandboxResponse", "description": "Public state for one session-owned sandbox." }, "VMState": { "type": "string", "enum": [ "created", "running", "paused", "stopped", "error" ], "title": "VMState", "description": "VM lifecycle states." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WorkspaceMount": { "properties": { "host_path": { "type": "string", "format": "path", "title": "Host Path" }, "guest_path": { "type": "string", "title": "Guest Path", "default": "/workspace" }, "mount_tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Mount Tag" }, "writable": { "type": "boolean", "title": "Writable", "default": false } }, "type": "object", "required": [ "host_path" ], "title": "WorkspaceMount", "description": "Host directory to mount inside the guest via virtio-9p.\n\nBy default the host directory is exposed read-only through QEMU's\nvirtio-9p passthrough, with an overlayfs layer on top so the guest\ncan read and write freely \u2014 changes stay inside the VM and never\ntouch the host.\n\nWhen ``writable`` is True the host directory is exposed read-write\nand mounted directly at ``guest_path`` (no overlay), so writes from\nthe guest are visible on the host.\n\nAttributes:\n host_path: Absolute path to a directory on the host.\n guest_path: Mount point inside the guest (default ``/workspace``).\n mount_tag: 9p mount tag passed to QEMU. Auto-generated when omitted.\n writable: When True, guest writes propagate to the host directory.\n Default False (read-only host, writable overlay in guest)." } } } }