{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://localendpoints.com/schemas/localendpoint.chat-control-recipe.schema.json",
  "title": "LocalEndpoint Chat Control Recipe",
  "description": "Local-only recipe that compiles into bounded chatbox desktop actions.",
  "type": "object",
  "required": [
    "recipeVersion",
    "name",
    "description",
    "createdUtc",
    "steps",
    "nonClaims"
  ],
  "additionalProperties": false,
  "properties": {
    "recipeVersion": {
      "const": "1.0"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "description": {
      "type": "string",
      "minLength": 3,
      "maxLength": 400
    },
    "createdUtc": {
      "type": "string",
      "pattern": "Z$"
    },
    "steps": {
      "type": "array",
      "minItems": 1,
      "maxItems": 12,
      "items": {
        "type": "object",
        "required": [
          "stepId",
          "command",
          "reason",
          "requiresApproval"
        ],
        "additionalProperties": false,
        "properties": {
          "stepId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "command": {
            "type": "string",
            "minLength": 1,
            "maxLength": 800
          },
          "reason": {
            "type": "string",
            "minLength": 3,
            "maxLength": 400
          },
          "requiresApproval": {
            "type": "boolean"
          }
        }
      }
    },
    "nonClaims": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
