{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-sandbox-run-code-result-schema.json",
  "title": "Run code result",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-sandboxes-api-openapi.yml#/components/schemas/SandboxRunCodeResult",
  "type": "object",
  "required": [
    "stdout",
    "stderr",
    "result",
    "error",
    "duration_ms",
    "execution_count",
    "kernel_restarted"
  ],
  "properties": {
    "stdout": {
      "type": "string",
      "description": "Text printed to stdout during the cell."
    },
    "stderr": {
      "type": "string",
      "description": "Text printed to stderr during the cell."
    },
    "result": {
      "type": [
        "string",
        "null"
      ],
      "description": "repr of the last expression, or null."
    },
    "error": {
      "type": [
        "object",
        "null"
      ],
      "description": "The uncaught exception, or null.",
      "required": [
        "name",
        "value",
        "traceback"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "traceback": {
          "type": "string"
        }
      }
    },
    "duration_ms": {
      "type": "integer",
      "description": "Wall-clock milliseconds."
    },
    "execution_count": {
      "type": "integer",
      "description": "Kernel execution counter."
    },
    "kernel_restarted": {
      "type": "boolean",
      "description": "True when the kernel was restarted (timeout or crash) and its state is lost."
    }
  }
}