{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:jsoncraft:world:2",
  "title": "jsonCraft world / version 2",
  "description": "Portable authoring and checkpoint structure. The engine additionally validates resolved components, cross-references, hierarchy bounds, and runtime consistency.",
  "type": "object",
  "required": ["format", "id", "areas"],
  "properties": {
    "format": { "const": "jsoncraft/2" },
    "id": { "$ref": "#/$defs/id" },
    "revision": { "$ref": "#/$defs/counter" },
    "clock": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tick": { "$ref": "#/$defs/counter" },
        "hz": { "type": "integer", "minimum": 30, "maximum": 240 },
        "accumulator": { "type": "number", "minimum": 0 }
      }
    },
    "settings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "paused": { "type": "boolean" },
        "gravity": { "type": "number", "minimum": 0, "maximum": 100 },
        "lighting": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "direction": { "$ref": "#/$defs/vector" },
            "ambient": { "type": "number", "minimum": 0, "maximum": 1 },
            "intensity": { "type": "number", "minimum": 0, "maximum": 2 }
          }
        }
      }
    },
    "assets": {
      "type": "object",
      "maxProperties": 128,
      "propertyNames": { "$ref": "#/$defs/id" },
      "additionalProperties": { "$ref": "#/$defs/asset" }
    },
    "prefabs": {
      "type": "object",
      "maxProperties": 128,
      "propertyNames": { "$ref": "#/$defs/id" },
      "additionalProperties": { "$ref": "#/$defs/prefab" }
    },
    "areas": {
      "type": "object",
      "minProperties": 1,
      "maxProperties": 32,
      "propertyNames": { "$ref": "#/$defs/id" },
      "additionalProperties": { "$ref": "#/$defs/area" }
    },
    "actors": {
      "type": "object",
      "maxProperties": 32,
      "propertyNames": { "$ref": "#/$defs/id" },
      "additionalProperties": { "$ref": "#/$defs/actor" }
    },
    "camera": { "$ref": "#/$defs/camera" },
    "extensions": {
      "type": "object",
      "maxProperties": 32,
      "propertyNames": { "$ref": "#/$defs/id" },
      "additionalProperties": {
        "type": "object",
        "required": ["version"],
        "properties": {
          "version": { "type": "integer", "minimum": 1, "maximum": 1000 },
          "url": { "$ref": "#/$defs/url" }
        }
      }
    },
    "runtime": {
      "type": "object",
      "properties": {
        "bodies": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "velocity": { "$ref": "#/$defs/vector" },
              "grounded": { "type": "boolean" }
            },
            "required": ["velocity"]
          }
        },
        "inputs": { "type": "object", "additionalProperties": { "$ref": "#/$defs/input" } },
        "jobs": {
          "type": "array",
          "maxItems": 32,
          "items": {
            "type": "object",
            "required": ["id", "actor", "steps", "index", "elapsed", "status"],
            "properties": {
              "id": { "$ref": "#/$defs/id" },
              "actor": { "$ref": "#/$defs/id" },
              "steps": {
                "type": "array",
                "minItems": 1,
                "maxItems": 32,
                "items": { "$ref": "#/$defs/jobStep" }
              },
              "index": { "$ref": "#/$defs/counter" },
              "elapsed": { "$ref": "#/$defs/counter" },
              "status": { "enum": ["running", "done", "failed", "cancelled"] }
            }
          }
        },
        "events": { "type": "array", "maxItems": 64, "items": { "type": "object" } },
        "receipts": {
          "type": "array",
          "maxItems": 64,
          "items": {
            "type": "object",
            "required": ["key", "actor", "hash", "revision"],
            "properties": {
              "key": { "$ref": "#/$defs/id" },
              "actor": { "anyOf": [{ "$ref": "#/$defs/id" }, { "type": "null" }] },
              "revision": { "$ref": "#/$defs/counter" },
              "hash": { "type": "string", "pattern": "^[0-9a-fA-F]{1,16}$" },
              "created": { "type": "array", "items": { "$ref": "#/$defs/reference" } },
              "results": { "type": "array" }
            }
          }
        },
        "serial": { "$ref": "#/$defs/counter" },
        "eventSeq": { "$ref": "#/$defs/counter" },
        "inputSeq": { "$ref": "#/$defs/counter" }
      }
    }
  },
  "$defs": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,79}$",
      "not": { "enum": ["__proto__", "prototype", "constructor"] }
    },
    "counter": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
    "vector": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number" } },
    "color": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" },
    "url": { "type": "string", "pattern": "^https?://", "format": "uri" },
    "reference": {
      "type": "object",
      "required": ["area", "entity"],
      "properties": { "area": { "$ref": "#/$defs/id" }, "entity": { "$ref": "#/$defs/id" } }
    },
    "material": {
      "type": ["object", "null"],
      "additionalProperties": false,
      "properties": {
        "roughness": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
        "emissive": { "type": ["number", "null"], "minimum": 0, "maximum": 2 },
        "pattern": { "enum": ["plain", "wood", "stone", "foliage", null] },
        "density": { "type": ["number", "null"], "minimum": 0.1, "maximum": 4 },
        "glyphs": { "type": ["string", "null"], "minLength": 2, "maxLength": 64 }
      }
    },
    "assetMaterial": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "color": { "$ref": "#/$defs/color" },
        "roughness": { "type": "number", "minimum": 0, "maximum": 1 },
        "emissive": { "type": "number", "minimum": 0, "maximum": 2 },
        "pattern": { "enum": ["plain", "wood", "stone", "foliage"] },
        "density": { "type": "number", "minimum": 0.1, "maximum": 4 },
        "glyphs": { "type": "string", "minLength": 2, "maxLength": 64, "pattern": "^[ -~]+$" }
      }
    },
    "part": {
      "type": "object",
      "additionalProperties": false,
      "required": ["shape"],
      "properties": {
        "name": { "type": "string", "maxLength": 100 },
        "shape": { "enum": ["box", "bevelBox", "cylinder", "torus", "plane", "cone", "sphere"] },
        "position": { "$ref": "#/$defs/vector" },
        "rotation": { "$ref": "#/$defs/vector" },
        "size": { "type": "array", "minItems": 2, "maxItems": 3, "items": { "type": "number", "minimum": 0.01, "maximum": 100 } },
        "axis": { "enum": ["x", "y"] },
        "color": { "$ref": "#/$defs/color" },
        "material": { "$ref": "#/$defs/material" },
        "radius": { "type": "number", "minimum": 0.001, "maximum": 100 },
        "top": { "type": "number", "minimum": 0, "maximum": 100 },
        "height": { "type": "number", "minimum": 0.001, "maximum": 100 },
        "tube": { "type": "number", "minimum": 0.001, "maximum": 100 },
        "bevel": { "type": "number", "minimum": 0.001, "maximum": 100 },
        "segments": { "type": "integer", "minimum": 3, "maximum": 32 }
      },
      "allOf": [{ "if": { "properties": { "shape": { "not": { "const": "plane" } } } }, "then": { "properties": { "size": { "minItems": 3 } } } }]
    },
    "modelPosition": { "type": "number", "minimum": -10000, "maximum": 10000 },
    "modelPositions": {
      "oneOf": [
        { "type": "array", "minItems": 3, "maxItems": 288000, "items": { "$ref": "#/$defs/modelPosition" } },
        { "type": "array", "minItems": 1, "maxItems": 96000, "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "$ref": "#/$defs/modelPosition" } } }
      ]
    },
    "modelIndices": {
      "oneOf": [
        { "type": "array", "minItems": 3, "maxItems": 96000, "items": { "type": "integer", "minimum": 0 } },
        { "type": "array", "minItems": 1, "maxItems": 32000, "items": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "integer", "minimum": 0 } } }
      ]
    },
    "triangleData": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "positions": { "$ref": "#/$defs/modelPositions" },
        "vertices": { "$ref": "#/$defs/modelPositions" },
        "indices": { "$ref": "#/$defs/modelIndices" },
        "triangles": { "$ref": "#/$defs/modelIndices" },
        "normals": { "type": "array", "minItems": 3, "maxItems": 288000, "items": { "type": "number", "minimum": -1, "maximum": 1 } },
        "uvs": { "type": "array", "maxItems": 192000, "items": { "type": "number" } },
        "colors": { "type": "array", "minItems": 1, "maxItems": 96000, "items": { "$ref": "#/$defs/color" } }
      },
      "allOf": [
        { "oneOf": [{ "required": ["positions"] }, { "required": ["vertices"] }] },
        { "oneOf": [{ "required": ["indices"] }, { "required": ["triangles"] }] }
      ]
    },
    "voxelData": {
      "type": "object",
      "additionalProperties": false,
      "required": ["voxels"],
      "properties": {
        "voxels": { "type": "array", "minItems": 1, "maxItems": 100000, "items": { "type": "array", "minItems": 3, "maxItems": 4, "prefixItems": [{ "type": "integer", "minimum": -10000, "maximum": 10000 }, { "type": "integer", "minimum": -10000, "maximum": 10000 }, { "type": "integer", "minimum": -10000, "maximum": 10000 }, { "$ref": "#/$defs/color" }] } },
        "unit": { "type": "number", "minimum": 0.001, "maximum": 100 },
        "color": { "$ref": "#/$defs/color" }
      }
    },
    "asset": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": { "enum": ["mesh", "primitive", "image", "link", "widget", "gltf", "model"] },
        "link": { "type": "string", "minLength": 1 },
        "url": { "type": "string", "minLength": 1 },
        "size": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": 0.01, "maximum": 100 } },
        "fit": { "enum": ["contain", "cover", "stretch"] },
        "parts": {
          "type": "array",
          "minItems": 1,
          "maxItems": 64,
          "items": { "$ref": "#/$defs/part" }
        },
        "data": { "oneOf": [{ "$ref": "#/$defs/triangleData" }, { "$ref": "#/$defs/voxelData" }] },
        "format": { "enum": ["auto", "obj", "triangles", "voxels"] },
        "pivot": { "$ref": "#/$defs/vector" },
        "normalize": { "type": "boolean" },
        "scale": { "oneOf": [{ "type": "number" }, { "$ref": "#/$defs/vector" }] },
        "rotation": { "oneOf": [{ "type": "number" }, { "$ref": "#/$defs/vector" }] },
        "position": { "oneOf": [{ "type": "number" }, { "$ref": "#/$defs/vector" }] },
        "offset": { "$ref": "#/$defs/vector" },
        "color": { "$ref": "#/$defs/color" },
        "tint": { "$ref": "#/$defs/color" },
        "materials": {
          "type": "object",
          "propertyNames": { "$ref": "#/$defs/color" },
          "additionalProperties": { "$ref": "#/$defs/assetMaterial" }
        },
        "transform": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "position": { "$ref": "#/$defs/vector" },
            "rotation": { "$ref": "#/$defs/vector" },
            "scale": { "$ref": "#/$defs/vector" }
          }
        },
        "model": {
          "enum": [
            "block",
            "shelter",
            "board",
            "image",
            "tree",
            "sculpture",
            "portal",
            "agent",
            "car"
          ]
        },
        "primitive": {
          "enum": [
            "block",
            "shelter",
            "board",
            "image",
            "tree",
            "sculpture",
            "portal",
            "agent",
            "car"
          ]
        },
        "version": { "type": ["string", "number"] },
        "name": { "type": "string" },
        "meta": {}
      },
      "allOf": [
        { "not": { "required": ["link", "url"] } },
        {
          "oneOf": [
            { "required": ["parts"] },
            { "required": ["data"] },
            { "anyOf": [{ "required": ["link"] }, { "required": ["url"] }] },
            { "anyOf": [{ "required": ["primitive"] }, { "required": ["model"] }] }
          ]
        },
        {
          "if": { "required": ["type"], "properties": { "type": { "const": "mesh" } } },
          "then": { "anyOf": [{ "required": ["parts"] }, { "required": ["link"] }, { "required": ["url"] }] }
        },
        {
          "if": { "required": ["type"], "properties": { "type": { "const": "primitive" } } },
          "then": { "anyOf": [{ "required": ["model"] }, { "required": ["primitive"] }] }
        },
        {
          "if": { "required": ["type"], "properties": { "type": { "enum": ["image", "link", "widget", "gltf"] } } },
          "then": { "anyOf": [{ "required": ["link"] }, { "required": ["url"] }] }
        },
        {
          "if": { "required": ["type"], "properties": { "type": { "const": "model" } } },
          "then": { "anyOf": [{ "required": ["data"] }, { "required": ["link"] }, { "required": ["url"] }] }
        },
        {
          "if": { "required": ["data", "format"] },
          "then": { "oneOf": [
            { "properties": { "format": { "const": "auto" } } },
            { "properties": { "format": { "const": "triangles" }, "data": { "$ref": "#/$defs/triangleData" } } },
            { "properties": { "format": { "const": "voxels" }, "data": { "$ref": "#/$defs/voxelData" } } }
          ] }
        },
        {
          "if": { "anyOf": [{ "required": ["pivot"] }, { "required": ["transform"] }, { "required": ["normalize"] }, { "required": ["scale"] }, { "required": ["rotation"] }, { "required": ["position"] }, { "required": ["offset"] }, { "required": ["color"] }, { "required": ["tint"] }] },
          "then": { "anyOf": [
            { "required": ["type"], "properties": { "type": { "enum": ["model", "gltf"] } } },
            { "not": { "required": ["type"] }, "required": ["data"] },
            { "not": { "required": ["type"] }, "anyOf": [
              { "required": ["link"], "properties": { "link": { "pattern": "\\.([oO][bB][jJ]|[gG][lL][bB]|[gG][lL][tT][fF])([?#].*)?$" } } },
              { "required": ["url"], "properties": { "url": { "pattern": "\\.([oO][bB][jJ]|[gG][lL][bB]|[gG][lL][tT][fF])([?#].*)?$" } } }
            ] }
          ] }
        },
        {
          "not": { "anyOf": [
            { "required": ["offset", "position"] },
            { "required": ["scale", "transform"], "properties": { "transform": { "required": ["scale"] } } },
            { "required": ["rotation", "transform"], "properties": { "transform": { "required": ["rotation"] } } },
            { "required": ["position", "transform"], "properties": { "transform": { "required": ["position"] } } },
            { "required": ["offset", "transform"], "properties": { "transform": { "required": ["position"] } } }
          ] }
        }
      ]
    },
    "prefab": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": { "type": "string", "maxLength": 100 },
        "meta": {},
        "prefab": { "$ref": "#/$defs/id" },
        "components": { "$ref": "#/$defs/components" }
      }
    },
    "entity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": { "type": "string", "maxLength": 100 },
        "prefab": { "$ref": "#/$defs/id" },
        "parent": { "$ref": "#/$defs/id" },
        "position": { "$ref": "#/$defs/vector" },
        "rotation": { "$ref": "#/$defs/vector" },
        "scale": { "$ref": "#/$defs/vector" },
        "version": { "$ref": "#/$defs/counter" },
        "components": { "$ref": "#/$defs/components" },
        "state": { "type": "object" },
        "meta": {}
      }
    },
    "area": {
      "type": "object",
      "additionalProperties": false,
      "required": ["size"],
      "properties": {
        "name": { "type": "string", "maxLength": 100 },
        "size": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": { "type": "number", "minimum": 4, "maximum": 200 }
        },
        "spawn": { "$ref": "#/$defs/vector" },
        "ground": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "enabled": { "type": "boolean" },
            "height": { "type": "number", "minimum": -100, "maximum": 100 },
            "color": { "$ref": "#/$defs/color" }
          }
        },
        "meta": {},
        "entities": {
          "type": "object",
          "maxProperties": 256,
          "propertyNames": { "$ref": "#/$defs/id" },
          "additionalProperties": { "$ref": "#/$defs/entity" }
        }
      }
    },
    "actor": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": { "type": "string", "maxLength": 100 },
        "control": { "$ref": "#/$defs/reference" },
        "meta": {}
      }
    },
    "camera": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "area": { "$ref": "#/$defs/id" },
        "follow": { "anyOf": [{ "$ref": "#/$defs/id" }, { "type": "null" }] },
        "position": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": { "type": "number" }
        },
        "yaw": { "type": "number" },
        "pitch": { "type": "number", "minimum": 0.15, "maximum": 1.4 },
        "zoom": { "type": "number", "minimum": 0.25, "maximum": 4 },
        "height": { "type": "number" },
        "followWeight": { "type": "number", "minimum": 0, "maximum": 1 },
        "smoothing": { "type": "number", "minimum": 0, "maximum": 40 },
        "followHeight": { "type": "number", "minimum": 0, "maximum": 1 },
        "framing": { "anyOf": [{ "$ref": "#/$defs/framing" }, { "type": "null" }] },
        "target": {
          "type": ["object", "null"], "additionalProperties": false,
          "properties": { "yaw": { "type": "number" }, "pitch": { "type": "number", "minimum": 0.15, "maximum": 1.4 }, "zoom": { "type": "number", "minimum": 0.25, "maximum": 4 } }
        }
      }
    },
    "framing": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "width": { "type": "number", "minimum": 1, "maximum": 500 },
        "height": { "type": "number", "minimum": 1, "maximum": 500 },
        "center": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": 0.1, "maximum": 0.9 } },
        "portrait": { "$ref": "#/$defs/framingOverride" },
        "compact": { "$ref": "#/$defs/framingOverride" }
      }
    },
    "framingOverride": {
      "type": "object", "additionalProperties": false,
      "properties": {
        "width": { "type": "number", "minimum": 1, "maximum": 500 },
        "height": { "type": "number", "minimum": 1, "maximum": 500 },
        "center": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": 0.1, "maximum": 0.9 } }
      }
    },
    "components": {
      "type": "object",
      "maxProperties": 32,
      "description": "Sparse component overrides. Null removes inherited fields. Custom components require a matching extensions declaration and JavaScript implementation.",
      "additionalProperties": { "type": ["object", "null"] },
      "properties": {
        "render": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": {
            "asset": { "type": ["string", "null"] },
            "color": { "type": ["string", "null"] },
            "visible": { "type": ["boolean", "null"] },
            "label": { "type": ["string", "null"] },
            "material": { "$ref": "#/$defs/material" },
            "when": {
              "type": ["object", "null"],
              "additionalProperties": false,
              "description": "Derive visibility from entity state instead of a fixed value.",
              "properties": {
                "entity": { "type": ["string", "null"] },
                "key": { "type": "string" },
                "equals": {},
                "invert": { "type": ["boolean", "null"] }
              },
              "required": ["key"]
            }
          }
        },
        "trigger": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "description": "Fire declared interact actions when a controlled entity enters range.",
          "properties": {
            "range": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
            "once": { "type": ["boolean", "null"] },
            "cooldown": { "type": ["integer", "null"], "minimum": 0, "maximum": 72000 },
            "actor": { "type": ["string", "null"] },
            "actions": {
              "type": ["array", "null"], "minItems": 1, "maxItems": 16,
              "items": { "type": "string" }
            }
          }
        },
        "body": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": {
            "type": { "enum": ["static", "dynamic", null] },
            "enabled": { "type": ["boolean", "null"] },
            "size": { "anyOf": [{ "$ref": "#/$defs/vector" }, { "type": "null" }] },
            "radius": { "type": ["number", "null"], "minimum": 0.01, "maximum": 20 },
            "height": { "type": ["number", "null"], "minimum": 0.01, "maximum": 100 },
            "drag": { "type": ["number", "null"] },
            "gravityScale": { "type": ["number", "null"] },
            "restitution": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
            "spawn": { "anyOf": [{ "$ref": "#/$defs/vector" }, { "type": "null" }] },
            "resetBelow": { "type": ["number", "null"], "minimum": -1000, "maximum": -1 }
          }
        },
        "controller": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": {
            "type": { "enum": ["vehicle", "walk", "fly", null] },
            "enabled": { "type": ["boolean", "null"] },
            "speed": { "type": ["number", "null"], "minimum": 0, "maximum": 80 },
            "acceleration": { "type": ["number", "null"], "minimum": 0, "maximum": 80 },
            "turnSpeed": { "type": ["number", "null"], "minimum": 0, "maximum": 720 },
            "jump": { "type": ["number", "null"], "minimum": 0, "maximum": 80 }
          }
        },
        "input": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": { "scheme": { "enum": ["vehicle", "walk", "fly", null] } }
        },
        "spin": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": { "rate": { "anyOf": [{ "$ref": "#/$defs/vector" }, { "type": "null" }] } }
        },
        "text": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": { "value": { "type": ["string", "null"], "maxLength": 4000 } }
        },
        "interact": {
          "type": ["object", "null"],
          "additionalProperties": false,
          "properties": {
            "primary": { "type": ["string", "null"] },
            "range": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
            "remote": { "type": ["boolean", "null"] },
            "actions": {
              "type": ["object", "null"],
              "maxProperties": 16,
              "additionalProperties": {
                "type": ["object", "null"],
                "properties": {
                  "type": {
                    "enum": [
                      "link",
                      "portal",
                      "increment",
                      "toggle",
                      "set",
                      "append",
                      "event",
                      null
                    ]
                  },
                  "label": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "area": { "type": ["string", "null"] },
                  "position": { "anyOf": [{ "$ref": "#/$defs/vector" }, { "type": "null" }] },
                  "key": { "type": ["string", "null"] },
                  "by": { "type": ["number", "null"] },
                  "value": {},
                  "event": { "type": ["string", "null"] },
                  "limit": { "type": ["integer", "null"], "minimum": 1, "maximum": 100 },
                  "maxLength": { "type": ["integer", "null"], "minimum": 1, "maximum": 2000 },
                  "fromArg": { "type": ["string", "null"] }
                }
              }
            }
          }
        }
      }
    },
    "input": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "x": { "type": "number", "minimum": -1, "maximum": 1 },
        "z": { "type": "number", "minimum": -1, "maximum": 1 },
        "up": { "type": "number", "minimum": -1, "maximum": 1 },
        "forward": { "type": "number", "minimum": -1, "maximum": 1 },
        "steer": { "type": "number", "minimum": -1, "maximum": 1 },
        "jump": { "type": "boolean" },
        "boost": { "type": "boolean" }
      }
    },
    "jobStep": {
      "oneOf": [
        {
          "type": "object",
          "required": ["type", "ticks"],
          "properties": {
            "type": { "const": "wait" },
            "ticks": { "type": "integer", "minimum": 1, "maximum": 72000 }
          }
        },
        {
          "type": "object",
          "required": ["type", "position"],
          "properties": {
            "type": { "const": "move" },
            "position": { "$ref": "#/$defs/vector" },
            "timeout": { "type": "integer", "minimum": 1, "maximum": 72000 }
          }
        },
        {
          "type": "object",
          "required": ["type", "operations"],
          "properties": {
            "type": { "const": "apply" },
            "operations": {
              "type": "array",
              "minItems": 1,
              "maxItems": 128,
              "items": { "type": "object" }
            }
          }
        },
        {
          "type": "object",
          "required": ["type", "target", "action"],
          "properties": {
            "type": { "const": "invoke" },
            "target": { "$ref": "#/$defs/reference" },
            "action": { "$ref": "#/$defs/id" },
            "args": { "type": "object" }
          }
        }
      ]
    }
  }
}
