{
  "$id": "https://github.com/klimPaskov/hoi4-agent-tools/blob/v3.6.0/schemas/scenario-test-input.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspaceId": {
      "$ref": "#/$defs/__schema0"
    },
    "suite": {
      "$ref": "#/$defs/__schema1"
    },
    "suitePath": {
      "$ref": "#/$defs/__schema32"
    },
    "continuation": {
      "$ref": "#/$defs/__schema33"
    },
    "maxCases": {
      "$ref": "#/$defs/__schema34"
    },
    "expectedRevision": {
      "$ref": "#/$defs/__schema35"
    },
    "refresh": {
      "$ref": "#/$defs/__schema36"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "default": "current",
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]{0,63}$"
    },
    "__schema1": {
      "type": "object",
      "properties": {
        "schemaVersion": {
          "$ref": "#/$defs/__schema2"
        },
        "id": {
          "$ref": "#/$defs/__schema3"
        },
        "cases": {
          "$ref": "#/$defs/__schema4"
        }
      },
      "required": [
        "schemaVersion",
        "id",
        "cases"
      ],
      "additionalProperties": false
    },
    "__schema2": {
      "type": "string",
      "const": "1.0"
    },
    "__schema3": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "__schema4": {
      "minItems": 1,
      "maxItems": 10000,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema5"
      }
    },
    "__schema5": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "domain": {
              "type": "string",
              "const": "mechanic"
            },
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "test": {
              "type": "object",
              "properties": {
                "id": {
                  "$ref": "#/$defs/__schema3"
                },
                "scenario": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "actor": {
                      "type": "string",
                      "maxLength": 256
                    },
                    "date": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "controls": {
                      "type": "object",
                      "propertyNames": {
                        "$ref": "#/$defs/__schema6"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema7"
                      }
                    },
                    "state": {
                      "$ref": "#/$defs/__schema8"
                    },
                    "flags": {
                      "maxItems": 10000,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema12"
                      }
                    },
                    "eventTargets": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 512
                      }
                    },
                    "scopes": {
                      "type": "object",
                      "propertyNames": {
                        "$ref": "#/$defs/__schema13"
                      },
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema14"
                      }
                    },
                    "candidateOverrides": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "maxLength": 512
                      },
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    },
                    "closedFlags": {
                      "type": "boolean"
                    },
                    "schemaVersion": {
                      "type": "string",
                      "const": "1.0"
                    },
                    "globalFlags": {
                      "maxItems": 10000,
                      "type": "array",
                      "items": {
                        "$ref": "#/$defs/__schema3"
                      }
                    },
                    "scopeCatalogs": {
                      "type": "object",
                      "propertyNames": {
                        "$ref": "#/$defs/__schema3"
                      },
                      "additionalProperties": {
                        "type": "object",
                        "properties": {
                          "complete": {
                            "type": "boolean"
                          },
                          "members": {
                            "maxItems": 2048,
                            "type": "array",
                            "items": {
                              "$ref": "#/$defs/__schema3"
                            }
                          }
                        },
                        "required": [
                          "complete",
                          "members"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "id",
                    "state",
                    "schemaVersion"
                  ],
                  "additionalProperties": false
                },
                "steps": {
                  "minItems": 1,
                  "maxItems": 128,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema16"
                  }
                },
                "assertions": {
                  "minItems": 1,
                  "maxItems": 256,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema17"
                  }
                }
              },
              "required": [
                "id",
                "scenario",
                "steps",
                "assertions"
              ],
              "additionalProperties": false
            },
            "sourceSelectors": {
              "$ref": "#/$defs/__schema20"
            },
            "assertions": {
              "$ref": "#/$defs/__schema23"
            },
            "views": {
              "$ref": "#/$defs/__schema25"
            }
          },
          "required": [
            "domain",
            "id",
            "test"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "domain": {
              "type": "string",
              "const": "package"
            },
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "manifest": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "string",
                  "const": "1.0"
                },
                "id": {
                  "$ref": "#/$defs/__schema22"
                },
                "definitions": {
                  "default": [],
                  "maxItems": 2048,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema21"
                  }
                },
                "calls": {
                  "default": [],
                  "maxItems": 2048,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema27"
                  }
                },
                "registrations": {
                  "default": [],
                  "maxItems": 2048,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema28"
                  }
                },
                "localisation": {
                  "default": [],
                  "maxItems": 2048,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema22"
                  }
                },
                "assets": {
                  "default": [],
                  "maxItems": 2048,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema29"
                  }
                },
                "requiredCases": {
                  "default": [],
                  "maxItems": 512,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema30"
                  }
                }
              },
              "required": [
                "schemaVersion",
                "id"
              ],
              "additionalProperties": false
            },
            "sourceSelectors": {
              "$ref": "#/$defs/__schema20"
            },
            "assertions": {
              "$ref": "#/$defs/__schema23"
            },
            "views": {
              "$ref": "#/$defs/__schema25"
            }
          },
          "required": [
            "domain",
            "id",
            "manifest"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "domain": {
              "type": "string",
              "const": "tool"
            },
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "tool": {
              "type": "string",
              "enum": [
                "hoi4.impact_inspect",
                "hoi4.decision_inspect",
                "hoi4.event_inspect",
                "hoi4.event_render",
                "hoi4.tech_inspect",
                "hoi4.tech_render",
                "hoi4.probability_inspect",
                "hoi4.probability_evaluate",
                "hoi4.probability_render",
                "hoi4.focus_inspect",
                "hoi4.focus_render",
                "hoi4.gui_inspect",
                "hoi4.gui_render",
                "hoi4.map_inspect",
                "hoi4.map_render"
              ]
            },
            "arguments": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "maxLength": 256
              },
              "additionalProperties": {
                "$ref": "#/$defs/__schema31"
              }
            },
            "sourceSelectors": {
              "$ref": "#/$defs/__schema20"
            },
            "assertions": {
              "$ref": "#/$defs/__schema23"
            },
            "views": {
              "$ref": "#/$defs/__schema25"
            }
          },
          "required": [
            "domain",
            "id",
            "tool",
            "arguments"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema6": {
      "type": "string",
      "pattern": "^[1-9][0-9]{0,8}$"
    },
    "__schema7": {
      "type": "string",
      "pattern": "^[A-Z0-9]{3}$"
    },
    "__schema8": {
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/__schema9"
      },
      "additionalProperties": {
        "$ref": "#/$defs/__schema10"
      }
    },
    "__schema9": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "__schema10": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema11"
        },
        {
          "maxItems": 10000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema11"
          }
        }
      ]
    },
    "__schema11": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4096
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema12": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "__schema13": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "__schema14": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512
        },
        "type": {
          "type": "string",
          "enum": [
            "country",
            "state",
            "character",
            "unit_leader",
            "operative",
            "strategic_region",
            "province",
            "unknown"
          ]
        },
        "actor": {
          "type": "string",
          "maxLength": 256
        },
        "state": {
          "$ref": "#/$defs/__schema8"
        },
        "flags": {
          "maxItems": 10000,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema15"
          }
        },
        "eventTargets": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "maxLength": 512
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 512
          }
        },
        "weight": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "string",
              "maxLength": 1024
            }
          ]
        }
      },
      "required": [
        "id",
        "state"
      ],
      "additionalProperties": false
    },
    "__schema15": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512
    },
    "__schema16": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "effect"
            },
            "source": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "scripted_effect",
                    "event_option",
                    "decision",
                    "focus_reward"
                  ]
                },
                "id": {
                  "$ref": "#/$defs/__schema3"
                },
                "option": {
                  "$ref": "#/$defs/__schema3"
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            "repeat": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            }
          },
          "required": [
            "kind",
            "source"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "advance_days"
            },
            "days": {
              "type": "integer",
              "minimum": 0,
              "maximum": 36500
            }
          },
          "required": [
            "kind",
            "days"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema17": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "equals"
            },
            "path": {
              "$ref": "#/$defs/__schema18"
            },
            "expected": {
              "$ref": "#/$defs/__schema19"
            }
          },
          "required": [
            "id",
            "kind",
            "path",
            "expected"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "conservation"
            },
            "paths": {
              "minItems": 2,
              "maxItems": 64,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema18"
              }
            },
            "tolerance": {
              "default": 0,
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "id",
            "kind",
            "paths"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "array_alignment"
            },
            "paths": {
              "minItems": 2,
              "maxItems": 32,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema18"
              }
            }
          },
          "required": [
            "id",
            "kind",
            "paths"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "affordability"
            },
            "balance": {
              "$ref": "#/$defs/__schema18"
            },
            "cost": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "id",
            "kind",
            "balance",
            "cost"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "single_payment"
            },
            "balance": {
              "$ref": "#/$defs/__schema18"
            },
            "cost": {
              "type": "number",
              "minimum": 0
            }
          },
          "required": [
            "id",
            "kind",
            "balance",
            "cost"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "repeated_setup"
            },
            "firstStep": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "secondStep": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "id",
            "kind",
            "firstStep",
            "secondStep"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "exclusive_flags"
            },
            "scope": {
              "default": "ROOT",
              "$ref": "#/$defs/__schema3"
            },
            "flags": {
              "minItems": 2,
              "maxItems": 64,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema3"
              }
            }
          },
          "required": [
            "id",
            "kind",
            "flags"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "cleanup"
            },
            "scope": {
              "default": "ROOT",
              "$ref": "#/$defs/__schema3"
            },
            "flags": {
              "default": [],
              "maxItems": 64,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema3"
              }
            },
            "targets": {
              "default": [],
              "maxItems": 64,
              "type": "array",
              "items": {
                "$ref": "#/$defs/__schema3"
              }
            }
          },
          "required": [
            "id",
            "kind"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "id": {
              "$ref": "#/$defs/__schema3"
            },
            "kind": {
              "type": "string",
              "const": "end_state"
            },
            "path": {
              "$ref": "#/$defs/__schema18"
            },
            "expected": {
              "$ref": "#/$defs/__schema19"
            }
          },
          "required": [
            "id",
            "kind",
            "path",
            "expected"
          ],
          "additionalProperties": false
        }
      ]
    },
    "__schema18": {
      "type": "object",
      "properties": {
        "scope": {
          "default": "ROOT",
          "$ref": "#/$defs/__schema3"
        },
        "key": {
          "$ref": "#/$defs/__schema3"
        }
      },
      "required": [
        "key"
      ],
      "additionalProperties": false
    },
    "__schema19": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 4096
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "__schema20": {
      "default": [],
      "maxItems": 64,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema21"
      }
    },
    "__schema21": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/__schema22"
        },
        "id": {
          "$ref": "#/$defs/__schema22"
        }
      },
      "required": [
        "kind",
        "id"
      ],
      "additionalProperties": false
    },
    "__schema22": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,512}$"
    },
    "__schema23": {
      "default": [],
      "maxItems": 64,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema24"
      }
    },
    "__schema24": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/__schema3"
        },
        "path": {
          "minItems": 1,
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema3"
          }
        },
        "expected": {
          "$ref": "#/$defs/__schema19"
        }
      },
      "required": [
        "id",
        "path",
        "expected"
      ],
      "additionalProperties": false
    },
    "__schema25": {
      "default": [
        "summary"
      ],
      "maxItems": 3,
      "type": "array",
      "items": {
        "$ref": "#/$defs/__schema26"
      }
    },
    "__schema26": {
      "type": "string",
      "enum": [
        "summary",
        "artifacts",
        "diagnostics"
      ]
    },
    "__schema27": {
      "type": "object",
      "properties": {
        "from": {
          "$ref": "#/$defs/__schema21"
        },
        "to": {
          "$ref": "#/$defs/__schema21"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "additionalProperties": false
    },
    "__schema28": {
      "type": "object",
      "properties": {
        "path": {
          "$ref": "#/$defs/__schema29"
        },
        "token": {
          "$ref": "#/$defs/__schema22"
        }
      },
      "required": [
        "path",
        "token"
      ],
      "additionalProperties": false
    },
    "__schema29": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024
    },
    "__schema30": {
      "type": "object",
      "properties": {
        "suite": {
          "$ref": "#/$defs/__schema29"
        },
        "caseId": {
          "$ref": "#/$defs/__schema22"
        }
      },
      "required": [
        "suite",
        "caseId"
      ],
      "additionalProperties": false
    },
    "__schema31": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema31"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema31"
          }
        }
      ]
    },
    "__schema32": {
      "$ref": "#/$defs/__schema29"
    },
    "__schema33": {
      "type": "string",
      "maxLength": 4096
    },
    "__schema34": {
      "default": 32,
      "type": "integer",
      "minimum": 1,
      "maximum": 256
    },
    "__schema35": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "__schema36": {
      "default": false,
      "type": "boolean"
    }
  }
}
