{
  "$defs": {
    "Sensor": {
      "additionalProperties": false,
      "description": "Execution configuration only: adapters own provider-specific projection.",
      "properties": {
        "command": {
          "items": { "type": "string" },
          "maxItems": 128,
          "minItems": 1,
          "title": "Command",
          "type": "array"
        },
        "enabled": { "default": true, "title": "Enabled", "type": "boolean" },
        "lookback": { "default": 86400, "maximum": 31536000, "minimum": 1, "title": "Lookback", "type": "integer" },
        "max_bytes": {
          "default": 67108864,
          "maximum": 268435456,
          "minimum": 1,
          "title": "Max Bytes",
          "type": "integer"
        },
        "mode": { "default": "window", "enum": ["window", "snapshot"], "title": "Mode", "type": "string" },
        "overlap": { "default": 300, "maximum": 31536000, "minimum": 0, "title": "Overlap", "type": "integer" },
        "refresh": { "default": 0, "maximum": 31536000, "minimum": 0, "title": "Refresh", "type": "integer" },
        "timeout": { "default": 300, "maximum": 3600, "minimum": 1, "title": "Timeout", "type": "integer" }
      },
      "required": ["command"],
      "title": "Sensor",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "One brain: its name and the sensors it may run.",
  "properties": {
    "name": { "pattern": "^[a-z][a-z0-9-]{0,63}$", "title": "Name", "type": "string" },
    "sensors": {
      "patternProperties": { "^[a-z][a-z0-9-]{0,63}$": { "$ref": "#/$defs/Sensor" } },
      "title": "Sensors",
      "type": "object"
    },
    "version": { "const": 3, "default": 3, "title": "Version", "type": "integer" }
  },
  "required": ["name"],
  "title": "Config",
  "type": "object"
}
