{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bernstein-run/json-schema/bernstein-run-node-response-schema.json",
  "title": "NodeResponse",
  "description": "Serialised node in API responses.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bernstein-run-cluster-api-openapi.yml#/components/schemas/NodeResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "url": {
      "type": "string",
      "title": "Url"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "capacity": {
      "$ref": "#/$defs/NodeCapacitySchema"
    },
    "last_heartbeat": {
      "type": "number",
      "title": "Last Heartbeat"
    },
    "registered_at": {
      "type": "number",
      "title": "Registered At"
    },
    "labels": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Labels"
    },
    "cell_ids": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Cell Ids"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "url",
    "status",
    "capacity",
    "last_heartbeat",
    "registered_at",
    "labels",
    "cell_ids"
  ],
  "$defs": {
    "NodeCapacitySchema": {
      "properties": {
        "max_agents": {
          "type": "integer",
          "title": "Max Agents",
          "default": 6
        },
        "available_slots": {
          "type": "integer",
          "title": "Available Slots",
          "default": 6
        },
        "active_agents": {
          "type": "integer",
          "title": "Active Agents",
          "default": 0
        },
        "gpu_available": {
          "type": "boolean",
          "title": "Gpu Available",
          "default": false
        },
        "supported_models": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Supported Models"
        }
      },
      "type": "object",
      "title": "NodeCapacitySchema",
      "description": "Advertised capacity of a cluster node."
    }
  }
}