Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

9.3 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dodaios.dev/schema/verse.placement-1.json",
  "title": "verse.placement/1",
  "description": "Placements of one deck zone in Unreal space (docs/verse/unreal/contracts/art-pipeline.md section 4). Checked by scripts/unreal/check_art_text.py, which adds the rules a schema cannot express (unique ids, bounds, unit quaternions, rooms).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "deck",
    "zone",
    "bounds_cm",
    "level",
    "source",
    "generator",
    "placements",
    "sockets",
    "rooms"
  ],
  "properties": {
    "schema": { "const": "verse.placement/1" },
    "deck": { "$ref": "#/$defs/lowerId" },
    "zone": { "$ref": "#/$defs/lowerId" },
    "bounds_cm": {
      "type": "object",
      "additionalProperties": false,
      "required": ["min", "max"],
      "properties": {
        "min": { "$ref": "#/$defs/vec3" },
        "max": { "$ref": "#/$defs/vec3" }
      }
    },
    "level": {
      "type": "string",
      "pattern": "^/Game/Verse/Decks/[A-Z][A-Za-z0-9]*/LV_[A-Za-z0-9_]+$"
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": ["builder", "sha256"],
      "properties": {
        "builder": { "type": "string", "pattern": "^art/verse/[A-Za-z0-9_/.-]+\\.py$" },
        "sha256": { "$ref": "#/$defs/sha256" }
      }
    },
    "generator": {
      "type": "object",
      "additionalProperties": false,
      "required": ["script", "version", "blender"],
      "properties": {
        "script": { "type": "string", "minLength": 1 },
        "version": { "type": "string", "pattern": "^[0-9]+$" },
        "blender": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" }
      }
    },
    "placements": { "type": "array", "items": { "$ref": "#/$defs/placement" } },
    "sockets": { "type": "array", "items": { "$ref": "#/$defs/socket" } },
    "rooms": { "type": "array", "items": { "$ref": "#/$defs/room" } }
  },
  "$defs": {
    "lowerId": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" },
    "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
    "vec3": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "items": { "type": "number" }
    },
    "quat": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "items": { "type": "number", "minimum": -1, "maximum": 1 }
    },
    "assetName": { "type": "string", "pattern": "^(SM|GC)_[A-Za-z0-9][A-Za-z0-9_]{0,60}$" },
    "objectPath": {
      "type": "string",
      "pattern": "^/Game/Verse/[A-Za-z0-9_/]+/([A-Za-z0-9_]+)\\.([A-Za-z0-9_]+)$",
      "maxLength": 180
    },
    "roomRef": {
      "anyOf": [{ "type": "null" }, { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" }]
    },
    "station": {
      "anyOf": [
        { "type": "null" },
        {
          "type": "object",
          "additionalProperties": false,
          "required": ["id", "kind"],
          "properties": {
            "id": { "type": "string", "minLength": 1 },
            "kind": { "type": "string", "minLength": 1 }
          }
        }
      ]
    },
    "collision": {
      "enum": [
        "Verse_Architecture",
        "Verse_Destructible",
        "Verse_Glass",
        "Verse_Prop",
        "Verse_PropSmall",
        "Verse_Debris",
        "Verse_ProxyOnly",
        "Verse_NoCollision"
      ]
    },
    "destructibleState": { "enum": ["Intact", "Damaged", "Holed", "Breached", "Destroyed", "Repairing"] },
    "destructible": {
      "anyOf": [
        { "type": "null" },
        {
          "type": "object",
          "additionalProperties": false,
          "required": ["actor_class", "penetration_material", "health", "states", "proxies", "repair_s"],
          "properties": {
            "actor_class": { "type": "string", "pattern": "^/Script/[A-Za-z0-9]+\\.[A-Za-z0-9_]+$|^/Game/Verse/[A-Za-z0-9_/]+\\.[A-Za-z0-9_]+_C$" },
            "penetration_material": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]*$" },
            "health": { "type": "number", "exclusiveMinimum": 0 },
            "states": {
              "type": "array",
              "minItems": 1,
              "uniqueItems": true,
              "items": { "$ref": "#/$defs/destructibleState" }
            },
            "proxies": {
              "type": "object",
              "propertyNames": { "$ref": "#/$defs/destructibleState" },
              "additionalProperties": { "$ref": "#/$defs/objectPath" }
            },
            "repair_s": { "type": "number", "minimum": 0 }
          }
        }
      ]
    },
    "placement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "piece",
        "asset",
        "location",
        "rotation",
        "scale",
        "room",
        "nav",
        "mobility",
        "data_layer",
        "collision",
        "destructible",
        "station",
        "owner"
      ],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9_]+$", "maxLength": 96 },
        "piece": { "$ref": "#/$defs/assetName" },
        "asset": { "$ref": "#/$defs/objectPath" },
        "location": { "$ref": "#/$defs/vec3" },
        "rotation": { "$ref": "#/$defs/quat" },
        "scale": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "items": { "type": "number", "exclusiveMinimum": 0 }
        },
        "room": { "$ref": "#/$defs/roomRef" },
        "nav": { "enum": ["walk", "block", "none"] },
        "mobility": { "enum": ["static", "movable"] },
        "data_layer": { "type": "string", "pattern": "^DL_[A-Z][A-Za-z0-9]*_[A-Z][A-Za-z0-9]*$" },
        "collision": { "$ref": "#/$defs/collision" },
        "material_overrides": {
          "type": "object",
          "propertyNames": { "pattern": "^[A-Za-z0-9_]+$" },
          "additionalProperties": { "type": "string", "pattern": "^/Game/Verse/Materials/[A-Za-z0-9_/]+/(MI_[A-Za-z0-9_]+)\\.(MI_[A-Za-z0-9_]+)$" }
        },
        "destructible": { "$ref": "#/$defs/destructible" },
        "station": { "$ref": "#/$defs/station" },
        "owner": { "type": "string", "pattern": "^WP[0-9]{2}$" },
        "tags": {
          "type": "array",
          "uniqueItems": true,
          "items": { "type": "string", "pattern": "^Verse(\\.[A-Za-z0-9_]+)+$" }
        }
      }
    },
    "socket": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "kind", "location", "rotation", "room", "station"],
      "properties": {
        "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$", "maxLength": 120 },
        "kind": {
          "enum": ["screen", "seat", "stand", "bunk", "holo", "light", "door", "spawn", "lift", "station", "waypoint"]
        },
        "location": { "$ref": "#/$defs/vec3" },
        "rotation": { "$ref": "#/$defs/quat" },
        "room": { "$ref": "#/$defs/roomRef" },
        "station": { "$ref": "#/$defs/station" },
        "size_cm": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": { "type": "number", "exclusiveMinimum": 0 }
        },
        "light": {
          "type": "object",
          "additionalProperties": false,
          "required": ["type", "kelvin", "intensity_lm", "attenuation_cm", "shadows"],
          "properties": {
            "type": { "enum": ["spot", "rect", "point"] },
            "kelvin": { "type": "number", "minimum": 1000, "maximum": 20000 },
            "intensity_lm": { "type": "number", "minimum": 0 },
            "attenuation_cm": { "type": "number", "exclusiveMinimum": 0 },
            "cone_deg": { "type": "number", "exclusiveMinimum": 0, "maximum": 180 },
            "source_size_cm": { "type": "number", "minimum": 0 },
            "shadows": { "const": true }
          }
        },
        "spawn": {
          "type": "object",
          "additionalProperties": false,
          "required": ["team", "duel"],
          "properties": {
            "team": { "enum": ["any", "a", "b"] },
            "duel": { "type": "boolean" }
          }
        },
        "props": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        }
      },
      "allOf": [
        {
          "if": { "properties": { "kind": { "const": "screen" } } },
          "then": { "required": ["size_cm"] },
          "else": { "not": { "required": ["size_cm"] } }
        },
        {
          "if": { "properties": { "kind": { "const": "light" } } },
          "then": { "required": ["light"] },
          "else": { "not": { "required": ["light"] } }
        },
        {
          "if": { "properties": { "kind": { "const": "spawn" } } },
          "then": { "required": ["spawn"] },
          "else": { "not": { "required": ["spawn"] } }
        }
      ]
    },
    "room": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "name", "polygon_cm", "z_cm", "main"],
      "properties": {
        "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]*$" },
        "name": { "type": "string", "minLength": 1 },
        "polygon_cm": {
          "type": "array",
          "minItems": 3,
          "items": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": { "type": "number" }
          }
        },
        "z_cm": { "type": "number" },
        "main": { "type": "boolean" }
      }
    }
  }
}