{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nestorhome.dev/schemas/satellite/1/manifest.json",
  "title": "Satellite manifest",
  "x-protocol": "nestor.satellite/1",
  "type": "object",
  "properties": {
    "protocol": {
      "const": "nestor.satellite/1"
    },
    "device": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        },
        "model": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "room": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        },
        "brand": {
          "type": "string",
          "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$"
        }
      },
      "required": [
        "id",
        "model",
        "room"
      ],
      "additionalProperties": false
    },
    "sdk": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        }
      },
      "required": [
        "name",
        "version"
      ],
      "additionalProperties": false
    },
    "pairing_methods": {
      "type": "array",
      "items": {
        "enum": [
          "device_code.display",
          "device_code.speech",
          "enrollment.input",
          "enrollment.provisioning",
          "enrollment.qr"
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "capabilities": {
      "type": "array",
      "maxItems": 32,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  "required": [
    "protocol",
    "device",
    "pairing_methods"
  ],
  "additionalProperties": false
}
