{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fleet.forgesdlc.com/schemas/fleet-app-manifest.schema.json",
  "title": "Forge Fleet App package manifest",
  "description": "Root fleet-app.manifest.json inside a FAEP v1 zip package.",
  "type": "object",
  "additionalProperties": false,
  "required": ["protocol_version", "id", "version", "title", "summary", "python", "ui", "docs"],
  "properties": {
    "protocol_version": { "type": "integer", "const": 1 },
    "id": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{0,63}$" },
    "version": { "type": "string", "minLength": 1 },
    "title": { "type": "string", "minLength": 1 },
    "summary": { "type": "string" },
    "python": {
      "type": "object",
      "additionalProperties": false,
      "required": ["package", "handlers_module"],
      "properties": {
        "package": { "type": "string", "minLength": 1 },
        "handlers_module": { "type": "string", "minLength": 1 }
      }
    },
    "ui": {
      "type": "object",
      "additionalProperties": false,
      "required": ["spec"],
      "properties": {
        "spec": { "type": "string", "minLength": 1 }
      }
    },
    "docs": {
      "type": "object",
      "additionalProperties": false,
      "required": ["root"],
      "properties": {
        "root": { "type": "string", "minLength": 1 }
      }
    },
    "permissions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": ["read_host_paths", "invoke_local_cli"]
      },
      "uniqueItems": true
    }
  }
}
