{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://darkoza.com/robotics/robot-profile.schema.json",
  "title": "DARKOZA Robot Profile",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "robot_id",
    "vendor",
    "model",
    "embodiment",
    "capabilities"
  ],
  "properties": {
    "robot_id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9._-]{1,63}$"
    },
    "vendor": {
      "type": "string",
      "enum": [
        "abb",
        "agility",
        "anybotics",
        "boston_dynamics",
        "clearpath",
        "custom",
        "darkoza",
        "dji",
        "dobot",
        "figure",
        "franka",
        "generic",
        "kuka",
        "simulation",
        "tesla",
        "unitree",
        "universal_robots"
      ]
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "embodiment": {
      "type": "string",
      "enum": [
        "aerial",
        "fixed_manipulator",
        "humanoid",
        "industrial_arm",
        "industrial_mobile",
        "mobile_base",
        "mobile_manipulator",
        "other",
        "quadruped",
        "service_robot",
        "simulation",
        "tracked_vehicle",
        "underwater"
      ]
    },
    "capabilities": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "dexterity",
          "human_detection",
          "interaction",
          "locomotion",
          "manipulation",
          "mapping",
          "navigation",
          "object_detection",
          "perception",
          "simulation",
          "speech",
          "telemetry"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "maxProperties": 32
    },
    "connection_state": {
      "type": "string",
      "enum": [
        "disconnected",
        "simulated"
      ]
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "vendor": {
            "const": "custom"
          }
        },
        "required": [
          "vendor"
        ]
      },
      "then": {
        "properties": {
          "metadata": {
            "type": "object",
            "required": [
              "vendor_name"
            ],
            "properties": {
              "vendor_name": {
                "type": "string",
                "minLength": 2,
                "maxLength": 80
              }
            }
          }
        }
      }
    }
  ],
  "x-darkoza-policy": {
    "verification_default": "OWNER_DECLARED_UNVERIFIED",
    "adapter_state_default": "NOT_CONNECTED",
    "execution_mode": "planning_only",
    "physical_actuation": false,
    "task_dispatch": false,
    "note": "A profile is an owner declaration, not verified device identity, adapter conformance or proof of physical safety."
  }
}
