{
  "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.6.0/schemas/configuration.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "$ref": "#/$defs/__schema0"
    },
    "serverStateRoot": {
      "$ref": "#/$defs/__schema1"
    },
    "scanMaxFiles": {
      "$ref": "#/$defs/__schema2"
    },
    "maxConcurrentTools": {
      "$ref": "#/$defs/__schema3"
    },
    "maxSharedTools": {
      "$ref": "#/$defs/__schema4"
    },
    "scanMaxBytes": {
      "$ref": "#/$defs/__schema5"
    },
    "scanMaxFileBytes": {
      "$ref": "#/$defs/__schema6"
    },
    "artifactMaxBytes": {
      "$ref": "#/$defs/__schema7"
    },
    "artifactMaxEntries": {
      "$ref": "#/$defs/__schema8"
    },
    "artifactMaxSingleBytes": {
      "$ref": "#/$defs/__schema9"
    },
    "modRoots": {
      "$ref": "#/$defs/__schema10"
    },
    "gameRoot": {
      "$ref": "#/$defs/__schema12"
    },
    "workspaceStorageRoot": {
      "$ref": "#/$defs/__schema13"
    },
    "storageRoots": {
      "$ref": "#/$defs/__schema14"
    },
    "workspaces": {
      "$ref": "#/$defs/__schema16"
    },
    "http": {
      "$ref": "#/$defs/__schema35"
    }
  },
  "required": [
    "version"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "number",
      "const": 1
    },
    "__schema1": {
      "type": "string",
      "minLength": 1
    },
    "__schema2": {
      "default": 100000,
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "__schema3": {
      "default": 2,
      "type": "integer",
      "minimum": 1,
      "maximum": 32
    },
    "__schema4": {
      "default": 4,
      "type": "integer",
      "minimum": 1,
      "maximum": 128
    },
    "__schema5": {
      "default": 268435456,
      "type": "integer",
      "minimum": 1048576,
      "maximum": 9007199254740991
    },
    "__schema6": {
      "default": 67108864,
      "type": "integer",
      "minimum": 65536,
      "maximum": 9007199254740991
    },
    "__schema7": {
      "default": 536870912,
      "type": "integer",
      "minimum": 1048576,
      "maximum": 9007199254740991
    },
    "__schema8": {
      "default": 5000,
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "__schema9": {
      "default": 134217728,
      "type": "integer",
      "minimum": 1048576,
      "maximum": 9007199254740991
    },
    "__schema10": {
      "default": [],
      "maxItems": 16,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema11"
      }
    },
    "__schema11": {
      "type": "string",
      "minLength": 1
    },
    "__schema12": {
      "type": "string",
      "minLength": 1
    },
    "__schema13": {
      "type": "string",
      "minLength": 1
    },
    "__schema14": {
      "default": [],
      "maxItems": 16,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema15"
      }
    },
    "__schema15": {
      "type": "string",
      "minLength": 1
    },
    "__schema16": {
      "default": [],
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema17"
      }
    },
    "__schema17": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema18"
        },
        "name": {
          "$ref": "#/$defs/__schema19"
        },
        "root": {
          "$ref": "#/$defs/__schema20"
        },
        "kind": {
          "$ref": "#/$defs/__schema21"
        },
        "gameRoot": {
          "$ref": "#/$defs/__schema22"
        },
        "dependencyRoots": {
          "$ref": "#/$defs/__schema23"
        },
        "dependencies": {
          "$ref": "#/$defs/__schema25"
        },
        "replacePaths": {
          "$ref": "#/$defs/__schema28"
        },
        "roots": {
          "$ref": "#/$defs/__schema29"
        },
        "artifactRoot": {
          "$ref": "#/$defs/__schema30"
        },
        "cacheRoot": {
          "$ref": "#/$defs/__schema31"
        },
        "fixtureRoot": {
          "$ref": "#/$defs/__schema32"
        },
        "wikiRoot": {
          "$ref": "#/$defs/__schema33"
        },
        "scriptDocsRoot": {
          "$ref": "#/$defs/__schema34"
        }
      },
      "required": [
        "id",
        "name",
        "root"
      ],
      "additionalProperties": false
    },
    "__schema18": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$"
    },
    "__schema19": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "__schema20": {
      "type": "string",
      "minLength": 1
    },
    "__schema21": {
      "default": "mod",
      "type": "string",
      "enum": [
        "mod",
        "game",
        "dependency"
      ]
    },
    "__schema22": {
      "type": "string",
      "minLength": 1
    },
    "__schema23": {
      "default": [],
      "maxItems": 16,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema24"
      }
    },
    "__schema24": {
      "type": "string",
      "minLength": 1
    },
    "__schema25": {
      "default": [],
      "maxItems": 16,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema26"
      }
    },
    "__schema26": {
      "type": "object",
      "properties": {
        "root": {
          "type": "string",
          "minLength": 1
        },
        "replacePaths": {
          "default": [],
          "maxItems": 1000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        }
      },
      "required": [
        "root"
      ],
      "additionalProperties": false
    },
    "__schema27": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "__schema28": {
      "default": [],
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema27"
      }
    },
    "__schema29": {
      "default": {
        "localisation": [
          "localisation",
          "localisation_synced"
        ],
        "interface": [
          "interface"
        ],
        "gfx": [
          "gfx"
        ],
        "map": [
          "map"
        ],
        "focus": [
          "common/national_focus"
        ],
        "scriptedGui": [
          "common/scripted_guis"
        ],
        "states": [
          "history/states"
        ]
      },
      "type": "object",
      "properties": {
        "localisation": {
          "default": [
            "localisation",
            "localisation_synced"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "interface": {
          "default": [
            "interface"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "gfx": {
          "default": [
            "gfx"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "map": {
          "default": [
            "map"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "focus": {
          "default": [
            "common/national_focus"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "scriptedGui": {
          "default": [
            "common/scripted_guis"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        },
        "states": {
          "default": [
            "history/states"
          ],
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema27"
          }
        }
      },
      "additionalProperties": false
    },
    "__schema30": {
      "type": "string",
      "minLength": 1
    },
    "__schema31": {
      "type": "string",
      "minLength": 1
    },
    "__schema32": {
      "type": "string",
      "minLength": 1
    },
    "__schema33": {
      "type": "string",
      "minLength": 1
    },
    "__schema34": {
      "type": "string",
      "minLength": 1
    },
    "__schema35": {
      "default": {
        "host": "127.0.0.1",
        "port": 3210,
        "allowedOrigins": [],
        "trustedProxyAddresses": [],
        "tokens": [],
        "principals": [],
        "maxBodyBytes": 67108864,
        "headersTimeoutMs": 10000,
        "requestTimeoutMs": 30000,
        "keepAliveTimeoutMs": 5000,
        "maxConnections": 512,
        "maxRequestsPerSocket": 100,
        "maxConcurrentRequests": 128,
        "maxSessions": 128,
        "maxSessionsPerPrincipal": 32,
        "maxEventStreams": 128,
        "maxEventStreamsPerPrincipal": 32,
        "maxSessionEventBytes": 2097152,
        "maxEventStoreBytes": 16777216,
        "requestsPerMinute": 6000,
        "sessionTtlSeconds": 3600
      },
      "type": "object",
      "properties": {
        "host": {
          "$ref": "#/$defs/__schema36"
        },
        "port": {
          "$ref": "#/$defs/__schema37"
        },
        "publicUrl": {
          "$ref": "#/$defs/__schema38"
        },
        "allowedOrigins": {
          "$ref": "#/$defs/__schema39"
        },
        "trustedProxyAddresses": {
          "$ref": "#/$defs/__schema40"
        },
        "tokens": {
          "$ref": "#/$defs/__schema41"
        },
        "principals": {
          "$ref": "#/$defs/__schema44"
        },
        "oauth": {
          "$ref": "#/$defs/__schema47"
        },
        "maxBodyBytes": {
          "$ref": "#/$defs/__schema49"
        },
        "headersTimeoutMs": {
          "$ref": "#/$defs/__schema50"
        },
        "requestTimeoutMs": {
          "$ref": "#/$defs/__schema51"
        },
        "keepAliveTimeoutMs": {
          "$ref": "#/$defs/__schema52"
        },
        "maxConnections": {
          "$ref": "#/$defs/__schema53"
        },
        "maxRequestsPerSocket": {
          "$ref": "#/$defs/__schema54"
        },
        "maxConcurrentRequests": {
          "$ref": "#/$defs/__schema55"
        },
        "maxSessions": {
          "$ref": "#/$defs/__schema56"
        },
        "maxSessionsPerPrincipal": {
          "$ref": "#/$defs/__schema57"
        },
        "maxEventStreams": {
          "$ref": "#/$defs/__schema58"
        },
        "maxEventStreamsPerPrincipal": {
          "$ref": "#/$defs/__schema59"
        },
        "maxSessionEventBytes": {
          "$ref": "#/$defs/__schema60"
        },
        "maxEventStoreBytes": {
          "$ref": "#/$defs/__schema61"
        },
        "requestsPerMinute": {
          "$ref": "#/$defs/__schema62"
        },
        "sessionTtlSeconds": {
          "$ref": "#/$defs/__schema63"
        }
      },
      "additionalProperties": false
    },
    "__schema36": {
      "default": "127.0.0.1",
      "type": "string"
    },
    "__schema37": {
      "default": 3210,
      "type": "integer",
      "minimum": 0,
      "maximum": 65535
    },
    "__schema38": {
      "type": "string",
      "format": "uri"
    },
    "__schema39": {
      "default": [],
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "__schema40": {
      "default": [],
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "format": "ipv4",
            "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
          },
          {
            "type": "string",
            "format": "ipv6",
            "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
          }
        ]
      }
    },
    "__schema41": {
      "default": [],
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema42"
      }
    },
    "__schema42": {
      "type": "object",
      "properties": {
        "principal": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._@-]{1,128}$"
        },
        "tokenEnv": {
          "type": "string",
          "pattern": "^[A-Z][A-Z0-9_]{1,127}$"
        },
        "workspaceIds": {
          "default": [],
          "maxItems": 1000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema43"
          }
        },
        "allowDiscoveredMods": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "principal",
        "tokenEnv"
      ],
      "additionalProperties": false
    },
    "__schema43": {
      "type": "string"
    },
    "__schema44": {
      "default": [],
      "maxItems": 1000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema45"
      }
    },
    "__schema45": {
      "type": "object",
      "properties": {
        "principal": {
          "type": "string",
          "pattern": "^[A-Za-z0-9._@:-]{1,256}$"
        },
        "workspaceIds": {
          "default": [],
          "maxItems": 1000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema46"
          }
        },
        "allowDiscoveredMods": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "principal"
      ],
      "additionalProperties": false
    },
    "__schema46": {
      "type": "string"
    },
    "__schema47": {
      "type": "object",
      "properties": {
        "issuer": {
          "type": "string",
          "format": "uri"
        },
        "jwksUri": {
          "type": "string",
          "format": "uri"
        },
        "audience": {
          "type": "string",
          "minLength": 1
        },
        "authorizationServers": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema48"
          }
        },
        "requiredScopes": {
          "default": [
            "hoi4:read"
          ],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "algorithms": {
          "default": [
            "RS256"
          ],
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "RS256",
              "RS384",
              "RS512",
              "ES256",
              "ES384",
              "ES512",
              "EdDSA"
            ]
          }
        }
      },
      "required": [
        "issuer",
        "jwksUri",
        "audience",
        "authorizationServers"
      ],
      "additionalProperties": false
    },
    "__schema48": {
      "type": "string",
      "format": "uri"
    },
    "__schema49": {
      "default": 67108864,
      "type": "integer",
      "minimum": 1024,
      "maximum": 67108864
    },
    "__schema50": {
      "default": 10000,
      "type": "integer",
      "minimum": 1000,
      "maximum": 120000
    },
    "__schema51": {
      "default": 30000,
      "type": "integer",
      "minimum": 1000,
      "maximum": 300000
    },
    "__schema52": {
      "default": 5000,
      "type": "integer",
      "minimum": 1000,
      "maximum": 120000
    },
    "__schema53": {
      "default": 512,
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "__schema54": {
      "default": 100,
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "__schema55": {
      "default": 128,
      "type": "integer",
      "minimum": 1,
      "maximum": 1024
    },
    "__schema56": {
      "default": 128,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "__schema57": {
      "default": 32,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "__schema58": {
      "default": 128,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "__schema59": {
      "default": 32,
      "type": "integer",
      "minimum": 1,
      "maximum": 10000
    },
    "__schema60": {
      "default": 2097152,
      "type": "integer",
      "minimum": 65536,
      "maximum": 67108864
    },
    "__schema61": {
      "default": 16777216,
      "type": "integer",
      "minimum": 65536,
      "maximum": 268435456
    },
    "__schema62": {
      "default": 6000,
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "__schema63": {
      "default": 3600,
      "type": "integer",
      "minimum": 60,
      "maximum": 86400
    }
  }
}
