{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:zeroexternal:formation:request:v1",
  "title": "Bounded Formation Runtime request",
  "description": "Five separate models; not a unified first-principles particle derivation. Atom requests additionally require nLower < nUpper, enforced by core.mjs.",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "model"
      ],
      "properties": {
        "schema": {
          "const": "zeroexternal.formation.request.v1"
        },
        "model": {
          "const": "strings"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "mode": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12,
              "default": 2
            },
            "amplitude": {
              "type": "number",
              "minimum": 0,
              "maximum": 1,
              "default": 0.5
            },
            "speed": {
              "type": "number",
              "minimum": 0.1,
              "maximum": 3,
              "default": 1
            }
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "model"
      ],
      "properties": {
        "schema": {
          "const": "zeroexternal.formation.request.v1"
        },
        "model": {
          "const": "confinement"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kappa": {
              "type": "number",
              "minimum": 0.02,
              "maximum": 0.14,
              "default": 0.1
            },
            "tension": {
              "type": "number",
              "minimum": 0.2,
              "maximum": 0.8,
              "default": 0.6
            },
            "mass": {
              "type": "integer",
              "minimum": 12,
              "maximum": 40,
              "default": 20
            },
            "radius": {
              "type": "number",
              "minimum": 0.3,
              "maximum": 1.5,
              "default": 0.7
            },
            "radialKick": {
              "type": "number",
              "minimum": -0.04,
              "maximum": 0.04,
              "default": 0.02
            },
            "duration": {
              "type": "number",
              "minimum": 2,
              "maximum": 12,
              "default": 8
            }
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "model"
      ],
      "properties": {
        "schema": {
          "const": "zeroexternal.formation.request.v1"
        },
        "model": {
          "const": "hadrons"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "species": {
              "enum": [
                "proton",
                "neutron",
                "pion-plus",
                "pion-minus",
                "kaon-plus",
                "delta-plus-plus"
              ],
              "default": "proton"
            }
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "model"
      ],
      "properties": {
        "schema": {
          "const": "zeroexternal.formation.request.v1"
        },
        "model": {
          "const": "recombination"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "alpha13": {
              "type": "number",
              "minimum": 0.1,
              "maximum": 10,
              "default": 2.6
            },
            "density": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 100
            },
            "tauEnd": {
              "type": "number",
              "minimum": 0,
              "maximum": 10,
              "default": 6
            }
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schema",
        "model"
      ],
      "properties": {
        "schema": {
          "const": "zeroexternal.formation.request.v1"
        },
        "model": {
          "const": "atom"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120
        },
        "params": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "orbital": {
              "enum": [
                "1s",
                "2s",
                "3s"
              ],
              "default": "1s"
            },
            "nUpper": {
              "type": "integer",
              "minimum": 2,
              "maximum": 8,
              "default": 3
            },
            "nLower": {
              "type": "integer",
              "minimum": 1,
              "maximum": 7,
              "default": 2
            },
            "seed": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4294967295,
              "default": 2026
            }
          }
        }
      }
    }
  ]
}
