{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.troupes.ai/schema/0.12/session-header.schema.json",
  "title": "Troupe session header",
  "description": "The first line of a Troupe session file.",
  "type": "object",
  "required": [
    "troupe",
    "kind",
    "scenario"
  ],
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "minLength": 1
    },
    "troupe": {
      "$ref": "bundle.schema.json#/$defs/version"
    },
    "kind": {
      "const": "session"
    },
    "bundle": {
      "$ref": "bundle.schema.json#/$defs/opaqueId"
    },
    "limits": {
      "$ref": "bundle.schema.json#/$defs/limits"
    },
    "scenario": {
      "$ref": "bundle.schema.json#/$defs/ownerId"
    },
    "timezone": {
      "type": "string",
      "minLength": 1
    },
    "characters": {
      "type": "array",
      "items": {
        "$ref": "bundle.schema.json#/$defs/character"
      },
      "minItems": 1
    },
    "players": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "$ref": "bundle.schema.json#/$defs/characterId"
      },
      "minItems": 1
    },
    "worlds": {
      "type": "array",
      "items": {
        "$ref": "bundle.schema.json#/$defs/world"
      },
      "minItems": 1
    },
    "head": {
      "$ref": "bundle.schema.json#/$defs/opaqueId"
    },
    "ext": {
      "$ref": "bundle.schema.json#/$defs/ext"
    }
  }
}
