{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/device-profiles.schema.json",
  "version": "1.0.0",
  "title": "Multi-Agent Pipeline  -  device profile catalog",
  "description": "Device profiles a /multi-agent:bug-bash session runs on: the model, OS, system language, text size, appearance and location of one simulator or emulator, and the person who uses it. bug-bash.mjs devices selects profiles from this catalog and prints the toolkit calls that create and configure each device.",
  "type": "object",
  "required": ["version", "profiles"],
  "properties": {
    "version": { "type": "string" },
    "profiles": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "platform",
          "label",
          "stance",
          "os",
          "device",
          "locale",
          "appearance",
          "text",
          "location"
        ],
        "additionalProperties": false,
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" },
          "platform": { "enum": ["ios", "android"] },
          "label": { "type": "string", "minLength": 1 },
          "stance": {
            "type": "string",
            "minLength": 1,
            "description": "Who uses this device, in one sentence the explorer plays."
          },
          "os": {
            "type": "integer",
            "description": "iOS major version, or the Android API level."
          },
          "device": {
            "type": "string",
            "minLength": 1,
            "description": "simctl device type name on iOS, AVD hardware profile id on Android."
          },
          "locale": { "type": "string", "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$" },
          "appearance": { "enum": ["light", "dark"] },
          "text": {
            "description": "iOS content size name, or the Android font scale.",
            "oneOf": [
              {
                "enum": [
                  "extra-small",
                  "small",
                  "medium",
                  "large",
                  "extra-large",
                  "extra-extra-large",
                  "extra-extra-extra-large",
                  "accessibility-medium",
                  "accessibility-large",
                  "accessibility-extra-large",
                  "accessibility-extra-extra-large",
                  "accessibility-extra-extra-extra-large"
                ]
              },
              { "type": "number", "minimum": 0.8, "maximum": 2.0 }
            ]
          },
          "location": {
            "type": "object",
            "required": ["latitude", "longitude"],
            "additionalProperties": false,
            "properties": {
              "latitude": { "type": "number", "minimum": -90, "maximum": 90 },
              "longitude": { "type": "number", "minimum": -180, "maximum": 180 }
            }
          },
          "default": {
            "type": "boolean",
            "description": "Part of the set a run takes when --devices is not given."
          },
          "notes": { "type": "string" }
        }
      }
    }
  }
}
