{
  "$defs": {
    "AssetDeclaration": {
      "additionalProperties": false,
      "description": "Asset identity, source decoder and mandatory attribution.",
      "properties": {
        "asset_type": {
          "$ref": "#/$defs/AssetKind",
          "description": "Content category produced by the declared asset decoder."
        },
        "credits": {
          "description": "Attribution lines retained in generated credits.",
          "items": {
            "$ref": "#/$defs/DisplayText"
          },
          "maxItems": 32,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "format": {
          "$ref": "#/$defs/AssetFormat",
          "description": "Declared decoder for the asset's source bytes."
        },
        "id": {
          "$ref": "#/$defs/ContentId",
          "description": "Package-qualified identity; unique within its declaring namespace."
        },
        "license": {
          "$ref": "#/$defs/DisplayText",
          "description": "License identifier or license terms supplied by the asset author."
        },
        "path": {
          "$ref": "#/$defs/AssetPath",
          "description": "Package-relative source file; traversal and aliases are forbidden."
        }
      },
      "required": [
        "id",
        "path",
        "asset_type",
        "format",
        "license",
        "credits"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "AssetFormat": {
      "description": "Source encoding consumed by an activated asset decoder.",
      "oneOf": [
        {
          "const": "native_prefab",
          "description": "Decode the native indexed voxel prefab format.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "native_world_library",
          "description": "Decode the native world library index (hearthwild-world-library version 1).",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "native_array",
          "description": "Decode a headerless little-endian array whose type and shape the world library declares.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "native_table",
          "description": "Decode a JSON table, optionally gzip-compressed, whose shape the world library declares.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "webp",
          "description": "Decode a lossless or lossy WebP image.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "png",
          "description": "Decode a PNG image.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "ogg",
          "description": "Decode Ogg Vorbis audio.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "mp3",
          "description": "Decode MPEG layer III audio.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "wav",
          "description": "Decode PCM WAV audio.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "AssetKind": {
      "description": "Decoded content category supplied by an asset source.",
      "oneOf": [
        {
          "const": "prefab_source",
          "description": "Provide native prefab geometry as an asset.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "world_library",
          "description": "Provide the index of a native world library: prefab templates, rigs, materials, textures and the settlement.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "world_data",
          "description": "Provide one array or table file referenced by a native world library.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "texture",
          "description": "Provide a decoded RGBA texture of at most 8192 by 8192 pixels.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "audio",
          "description": "Provide a recording of at most 30 minutes, decoded or streamed by the client.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "AssetPath": {
      "description": "Relative lowercase asset path within the package: JSON, gzip JSON, binary array, PNG, WebP, Ogg, MP3 or WAV.",
      "maxLength": 4096,
      "minLength": 1,
      "pattern": "^(?:[a-z0-9_][a-z0-9_-]*/)*[a-z0-9_][a-z0-9_-]*\\.(?:json|json\\.gz|bin|png|webp|ogg|mp3|wav)$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "AuthorityScript": {
      "additionalProperties": false,
      "description": "Authority script source, event, effect capabilities and parameter declarations.",
      "properties": {
        "effects": {
          "description": "Unique effect capabilities the handler is permitted to return.",
          "items": {
            "$ref": "#/$defs/EffectKind"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "event": {
          "$ref": "#/$defs/EventKind",
          "description": "Event kind or typed event payload selected by the handler declaration."
        },
        "id": {
          "$ref": "#/$defs/ContentId",
          "description": "Package-qualified identity; unique within its declaring namespace."
        },
        "parameters": {
          "description": "Ordered declarations of the exact parameter names, scalar types and bounds.",
          "items": {
            "$ref": "#/$defs/ParameterDeclaration"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "path": {
          "$ref": "#/$defs/ScriptPath",
          "description": "Package-relative source file; traversal and aliases are forbidden."
        },
        "random_streams": {
          "description": "Unique deterministic RNG stream names allowed for this script.",
          "items": {
            "$ref": "#/$defs/Name"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "target_packages": {
          "description": "Requested target packages; effective rights also require host approval and event scope.",
          "items": {
            "$ref": "#/$defs/PackageId"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "id",
        "path",
        "event",
        "effects",
        "target_packages",
        "random_streams",
        "parameters"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "authority",
      "x-hw-rights": "none"
    },
    "ContentId": {
      "description": "Package-qualified identity, written package:name.",
      "maxLength": 129,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "DefinitionKind": {
      "description": "Closed v1 target-kind vocabulary; definition loading still checks the activated subset.",
      "oneOf": [
        {
          "const": "game",
          "description": "game reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "tag",
          "description": "tag reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "binding",
          "description": "binding reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "dialogue",
          "description": "dialogue reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "item",
          "description": "item reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "quest",
          "description": "quest reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "recipe",
          "description": "recipe reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "ruleset",
          "description": "ruleset reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "timer",
          "description": "timer reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "variable",
          "description": "variable reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "animal",
          "description": "animal reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "fish",
          "description": "fish reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "behavior",
          "description": "behavior reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "character",
          "description": "character reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "character_options",
          "description": "character_options reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "damage_type",
          "description": "damage_type reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "encounter",
          "description": "encounter reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "enemy",
          "description": "enemy reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "equipment",
          "description": "equipment reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "skill",
          "description": "skill reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "progress_track",
          "description": "progress_track reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "projectile",
          "description": "projectile reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "light",
          "description": "light reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "loot",
          "description": "loot reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "movement",
          "description": "movement reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "npc",
          "description": "npc reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "player_profile",
          "description": "player_profile reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "routine",
          "description": "routine reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "status",
          "description": "status reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "tool",
          "description": "tool reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "biome",
          "description": "biome reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "climate",
          "description": "climate reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "flora",
          "description": "flora reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "map",
          "description": "map reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "material",
          "description": "material reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "prefab",
          "description": "prefab reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "schedule",
          "description": "schedule reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "season",
          "description": "season reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "structure",
          "description": "structure reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "weather",
          "description": "weather reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "ambient",
          "description": "ambient reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "animation",
          "description": "animation reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "audio_cue",
          "description": "audio_cue reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "cutscene",
          "description": "cutscene reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "fx",
          "description": "fx reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "music",
          "description": "music reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "palette",
          "description": "palette reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "presentation_profile",
          "description": "presentation_profile reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "rig",
          "description": "rig reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "voice",
          "description": "voice reference target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "Dependency": {
      "additionalProperties": false,
      "description": "Direct package dependency pinned to one exact semantic version.",
      "properties": {
        "package": {
          "$ref": "#/$defs/PackageId",
          "description": "Namespace of this package or an exact dependency."
        },
        "version": {
          "$ref": "#/$defs/PackageVersion",
          "description": "Exact supported format or package version; no implicit upgrades."
        }
      },
      "required": [
        "package",
        "version"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "DisplayText": {
      "description": "Human-readable text; never an entity or content reference.",
      "maxLength": 4096,
      "minLength": 1,
      "pattern": "^[\\s\\S]*$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "EffectKind": {
      "description": "Names of the activated protocol operations.",
      "oneOf": [
        {
          "const": "consume_item",
          "description": "Explicitly remove a positive quantity from the inventory of a permitted actor.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "grant_item",
          "description": "Add a positive quantity to the inventory of a permitted actor; a full inventory or stack overflow rejects the whole transaction.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "heal",
          "description": "Restore positive HP to a living actor, capped at max_health. Does not revive.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "transition_quest",
          "description": "Advance one declared quest edge only when the current stage equals from.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "set_variable",
          "description": "Replace this owner’s package-owned variable with a value matching its declaration.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "restore_need",
          "description": "Refill a positive amount of hunger or stamina of a living actor, capped at its maximum.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "set_light",
          "description": "Switch the light of the actor's equipped item explicitly on or off.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "teleport",
          "description": "Relocate a living actor to a free position; the host validates and replicates the relocation.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "notify",
          "description": "Show one localized text key to the permitted player after commit.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "damage",
          "description": "Damage a living actor or structure by a defined damage type; resistances apply and the actual damage is recorded. The source is the event's confirmed provenance.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "apply_status",
          "description": "Apply a status for a positive duration; the status definition's stacking rule decides a repeated application.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "remove_status",
          "description": "End a status; removing an absent status succeeds without change.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "equip",
          "description": "Equip an item from the target's own inventory in the slot its equip record names, replacing the slot's content.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "unequip",
          "description": "Empty one equipment slot of the target.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "drop_item",
          "description": "Spawn an item on the ground at a legal position; takes nothing from any inventory (consume_item first to drop from one).",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "craft",
          "description": "Craft a recipe for an actor: ingredients are debited and the result granted atomically.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "spawn",
          "description": "Spawn an NPC, enemy or animal at a free position near the given one; actor_spawned names the new actor next tick.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "despawn",
          "description": "Remove an AI-controlled actor; players are excluded and nothing drops.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "move_to",
          "description": "Start a persisted navigation order of an AI-controlled actor; movement_finished reports its end.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "set_weather",
          "description": "Override the weather of a map for a positive duration; afterwards the profile weather returns.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "set_time",
          "description": "Move the time of day forward to a later minute (at most one day); the tick stays monotone.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "start_dialogue",
          "description": "Start a dialogue session of a player with a living NPC in reach.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "play_cutscene",
          "description": "Start a player's personal cutscene; one cutscene per player at a time.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "play_animation",
          "description": "Show an animation clip on an actor after commit; purely visual.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "play_audio",
          "description": "Play a positioned audio cue after commit; audio failures change no state.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "build",
          "description": "Build the structure of a build recipe for an actor: materials are debited and the structure placed atomically.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "repair",
          "description": "Repair a damaged structure with a matching repair recipe; materials are debited atomically.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "set_block",
          "description": "Place a block of an engine block material in one free, supported cell of a map.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "remove_block",
          "description": "Remove the block of one cell; an empty cell succeeds without change.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "set_timer",
          "description": "Set a timer of this package for the invocation owner; an active timer of the same ID is replaced.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "cancel_timer",
          "description": "Cancel a timer of the invocation owner; cancelling an absent timer succeeds.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "unlock_recipe",
          "description": "Make a recipe available to a player; an unlocked recipe stays unchanged.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "set_routine",
          "description": "Replace the daily routine of an NPC; its current order ends.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "assign_behavior",
          "description": "Replace the behavior graph of an AI-controlled actor; it starts in the graph's initial state.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "grant_xp",
          "description": "Grant a player experience on the character level or a progress track; levels it reaches announce themselves.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "launch_projectile",
          "description": "Launch a projectile from the caster along its aim; it strikes the first hostile body on its way and bursts where it ends. A player's spell power raises its damage.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "area_effect",
          "description": "Strike every living body hostile to the caster in a circle or ring around it, now; each takes the damage and the status. A player's spell power raises the damage.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "EventKind": {
      "description": "Names of the activated protocol operations.",
      "oneOf": [
        {
          "const": "world_started",
          "description": "The world was created; delivered exactly once per world.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "package_activated",
          "description": "A package generation became active in this world; once per activation generation.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "player_created",
          "description": "A player profile entered this world for the first time.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "player_joined",
          "description": "A player started a session in this world.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "player_left",
          "description": "A player ended its session in this world.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "item_used",
          "description": "The host validated an item intent and selected exactly its declared use handler.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "item_use_committed",
          "description": "A successful item use committed; delivered no earlier than the following tick.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "interacted",
          "description": "An actor interacted with a target that offers an interaction.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "dialogue_choice",
          "description": "A player chose an offered choice of its active dialogue session.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "inventory_changed",
          "description": "The inventory of an actor changed by a committed delta of one item.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "equipment_changed",
          "description": "The content of an equipment slot of an actor changed.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "actor_spawned",
          "description": "A new actor entered the world.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "actor_died",
          "description": "A living actor's health reached zero (life transition, not despawn).",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "actor_despawned",
          "description": "An actor left the world; its owner state is gone.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "damage_applied",
          "description": "Committed damage reduced a living actor's health.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "zone_entered",
          "description": "A player entered a zone belonging to the referenced map.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "zone_left",
          "description": "A player left a zone of the referenced map.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "time_reached",
          "description": "The world clock reached a scheduled minute on a map.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "weather_changed",
          "description": "The weather of a map actually changed.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "quest_changed",
          "description": "A quest of a player moved to another stage.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "structure_built",
          "description": "A structure was built.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "crafted",
          "description": "An actor crafted a recipe.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "timer_fired",
          "description": "A timer of the receiving owner became due; it is removed when the event is created.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "movement_finished",
          "description": "A movement order of an actor ended.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "cutscene_finished",
          "description": "A player's cutscene ended by host time, a validated skip or a disconnect.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "resource_harvested",
          "description": "An actor harvested a resource (a tree, rock or crop); the item reached its inventory.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "structure_damaged",
          "description": "Committed damage reduced a structure's health.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "structure_destroyed",
          "description": "A structure's health reached zero and it collapsed.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "structure_repaired",
          "description": "An actor repaired a structure.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        },
        {
          "const": "status_applied",
          "description": "A status became active on an actor or was renewed by its stacking rule.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "status_expired",
          "description": "A status of an actor ended by time or removal.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "dialogue_started",
          "description": "A dialogue session of a player with an NPC started.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "dialogue_finished",
          "description": "A player's dialogue session ended.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "const": "cutscene_started",
          "description": "A player's personal cutscene started.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        },
        {
          "const": "player_defeated",
          "description": "A player's actor went down.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "player_revived",
          "description": "A downed player's actor got up again.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "actors",
          "x-hw-rights": "none"
        },
        {
          "const": "season_changed",
          "description": "The season of a map changed.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "world",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "Exports": {
      "additionalProperties": false,
      "description": "Read-only variable visibility granted to dependent packages.",
      "properties": {
        "readonly_variables": {
          "description": "Owned variables that dependent packages may include in snapshots.",
          "items": {
            "$ref": "#/$defs/VariableId"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "readonly_variables"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "Feature": {
      "description": "Capabilities required by a package and its typed references.",
      "oneOf": [
        {
          "const": "foundation",
          "description": "Package identities, text and activation metadata.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "authority",
          "description": "Authoritative inventory, quests and persistent state.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "actors",
          "description": "Spawned characters, movement and actor snapshots.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "world",
          "description": "Maps, geometry, climate and world clock.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "const": "presentation",
          "description": "Notifications, animation and audio presentation.",
          "type": "string",
          "x-hw-error-classes": {
            "invalid_type": "fault"
          },
          "x-hw-errors": "invalid_type",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "FormatVersion": {
      "description": "Supported version of this wire format.",
      "maximum": 1,
      "minimum": 1,
      "type": "integer",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "out_of_range": "fault"
      },
      "x-hw-errors": "invalid_type,out_of_range",
      "x-hw-feature": "foundation",
      "x-hw-unit": "count"
    },
    "JsonPath": {
      "description": "Relative lowercase JSON path within the package.",
      "maxLength": 4096,
      "minLength": 1,
      "pattern": "^(?:[a-z0-9_][a-z0-9_-]*/)*[a-z0-9_][a-z0-9_-]*\\.json$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "Locale": {
      "description": "Canonical language tag with optional script and region.",
      "maxLength": 12,
      "minLength": 1,
      "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-[0-9]{3})?$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "LocaleDeclaration": {
      "additionalProperties": false,
      "description": "Canonical language tag and package-relative text source.",
      "properties": {
        "language": {
          "$ref": "#/$defs/Locale",
          "description": "Canonical locale tag for the associated text file."
        },
        "path": {
          "$ref": "#/$defs/JsonPath",
          "description": "Package-relative source file; traversal and aliases are forbidden."
        }
      },
      "required": [
        "language",
        "path"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "Manifest": {
      "additionalProperties": false,
      "description": "Package identity, exact source inventory, capabilities and pinned dependencies.",
      "properties": {
        "api_features": {
          "description": "Capabilities required by the package's declarations and references.",
          "items": {
            "$ref": "#/$defs/Feature"
          },
          "maxItems": 5,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "api_version": {
          "$ref": "#/$defs/FormatVersion",
          "description": "Major Game API contract required to load this package."
        },
        "assets": {
          "description": "Declared asset sources, decoders and attribution.",
          "items": {
            "$ref": "#/$defs/AssetDeclaration"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "base_locale": {
          "$ref": "#/$defs/Locale",
          "description": "Required fallback locale containing every declared text key."
        },
        "definitions": {
          "description": "JSON files containing the package's definition records.",
          "items": {
            "$ref": "#/$defs/JsonPath"
          },
          "maxItems": 10000,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "dependencies": {
          "description": "Direct package dependencies pinned to exact versions.",
          "items": {
            "$ref": "#/$defs/Dependency"
          },
          "maxItems": 64,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "exports": {
          "$ref": "#/$defs/Exports",
          "description": "Read-only cross-package state access granted by the owner."
        },
        "locales": {
          "description": "Language tags and their package-relative text files.",
          "items": {
            "$ref": "#/$defs/LocaleDeclaration"
          },
          "maxItems": 128,
          "minItems": 1,
          "type": "array",
          "uniqueItems": true
        },
        "migrations": {
          "description": "Explicit transitions between saved-state schema versions.",
          "items": {
            "$ref": "#/$defs/MigrationDeclaration"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "package": {
          "$ref": "#/$defs/PackageId",
          "description": "Namespace of this package or an exact dependency."
        },
        "scripts": {
          "description": "Authority handlers and their exact capabilities and parameters.",
          "items": {
            "$ref": "#/$defs/ScriptDeclaration"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "state_version": {
          "$ref": "#/$defs/PositiveCount",
          "description": "Version of persistent package-owned state."
        },
        "tests": {
          "description": "Authoring fixtures; hashed but never executed by production loading.",
          "items": {
            "$ref": "#/$defs/JsonPath"
          },
          "maxItems": 4096,
          "minItems": 0,
          "type": "array",
          "uniqueItems": true
        },
        "version": {
          "$ref": "#/$defs/PackageVersion",
          "description": "Exact supported format or package version; no implicit upgrades."
        }
      },
      "required": [
        "package",
        "version",
        "api_version",
        "api_features",
        "state_version",
        "base_locale",
        "dependencies",
        "definitions",
        "scripts",
        "assets",
        "locales",
        "migrations",
        "exports",
        "tests"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "MigrationDeclaration": {
      "additionalProperties": false,
      "description": "Explicit source version and state migration script.",
      "properties": {
        "from_state_version": {
          "$ref": "#/$defs/PositiveCount",
          "description": "Saved-state version accepted as input to this migration."
        },
        "script": {
          "$ref": "#/$defs/ScriptId",
          "description": "Migration script declared by the same package."
        }
      },
      "required": [
        "from_state_version",
        "script"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "MigrationScript": {
      "additionalProperties": false,
      "description": "Migration script source; it receives MigrationInput and returns MigrationResult.",
      "properties": {
        "id": {
          "$ref": "#/$defs/ContentId",
          "description": "Package-qualified identity; unique within its declaring namespace."
        },
        "path": {
          "$ref": "#/$defs/ScriptPath",
          "description": "Package-relative source file; traversal and aliases are forbidden."
        }
      },
      "required": [
        "id",
        "path"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "Name": {
      "description": "Local identifier within a definition; starts with a lowercase letter.",
      "maxLength": 96,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9_]{0,95}$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "PackageId": {
      "description": "Namespace owned by one exact-version content package.",
      "maxLength": 32,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9_]{0,31}$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "PackageVersion": {
      "description": "Exact semantic version, including optional prerelease and excluding build metadata.",
      "maxLength": 4096,
      "minLength": 1,
      "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "foundation"
    },
    "ParameterDeclaration": {
      "description": "Named primitive argument and its exact type and allowed domain.",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "Store an integer constrained by inclusive bounds.",
          "properties": {
            "max": {
              "$ref": "#/$defs/SignedInt",
              "description": "Inclusive upper bound accepted by this declaration."
            },
            "min": {
              "$ref": "#/$defs/SignedInt",
              "description": "Inclusive lower bound accepted by this declaration."
            },
            "name": {
              "$ref": "#/$defs/Name",
              "description": "Local parameter name used by the handler."
            },
            "type": {
              "const": "int"
            }
          },
          "required": [
            "name",
            "min",
            "max",
            "type"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "additionalProperties": false,
          "description": "Store a boolean state with an explicit initial setting.",
          "properties": {
            "name": {
              "$ref": "#/$defs/Name",
              "description": "Local parameter name used by the handler."
            },
            "type": {
              "const": "bool"
            }
          },
          "required": [
            "name",
            "type"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "additionalProperties": false,
          "description": "Store a reference constrained to one definition category.",
          "properties": {
            "name": {
              "$ref": "#/$defs/Name",
              "description": "Local parameter name used by the handler."
            },
            "target_kind": {
              "$ref": "#/$defs/DefinitionKind",
              "description": "Exact definition category accepted by this content-ID parameter."
            },
            "type": {
              "const": "content_id"
            }
          },
          "required": [
            "name",
            "target_kind",
            "type"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "PositiveCount": {
      "description": "Strictly positive quantity or capacity.",
      "maximum": 2147483647,
      "minimum": 1,
      "type": "integer",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "out_of_range": "fault"
      },
      "x-hw-errors": "invalid_type,out_of_range",
      "x-hw-feature": "foundation",
      "x-hw-unit": "count"
    },
    "PresentationScript": {
      "additionalProperties": false,
      "description": "Presentation script source; it receives VisualFrame and returns VisualResult (a cutscene's camera_script).",
      "properties": {
        "id": {
          "$ref": "#/$defs/ContentId",
          "description": "Package-qualified identity; unique within its declaring namespace."
        },
        "path": {
          "$ref": "#/$defs/ScriptPath",
          "description": "Package-relative source file; traversal and aliases are forbidden."
        }
      },
      "required": [
        "id",
        "path"
      ],
      "type": "object",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "presentation",
      "x-hw-rights": "none"
    },
    "ScriptDeclaration": {
      "description": "A package script and its execution profile: an authority handler, a state migration or a presentation script.",
      "oneOf": [
        {
          "additionalProperties": false,
          "description": "A pure authority handler: event, effect capabilities, target packages, RNG streams and parameters.",
          "properties": {
            "effects": {
              "description": "Unique effect capabilities the handler is permitted to return.",
              "items": {
                "$ref": "#/$defs/EffectKind"
              },
              "maxItems": 4096,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "event": {
              "$ref": "#/$defs/EventKind",
              "description": "Event kind or typed event payload selected by the handler declaration."
            },
            "id": {
              "$ref": "#/$defs/ContentId",
              "description": "Package-qualified identity; unique within its declaring namespace."
            },
            "parameters": {
              "description": "Ordered declarations of the exact parameter names, scalar types and bounds.",
              "items": {
                "$ref": "#/$defs/ParameterDeclaration"
              },
              "maxItems": 4096,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "path": {
              "$ref": "#/$defs/ScriptPath",
              "description": "Package-relative source file; traversal and aliases are forbidden."
            },
            "random_streams": {
              "description": "Unique deterministic RNG stream names allowed for this script.",
              "items": {
                "$ref": "#/$defs/Name"
              },
              "maxItems": 4096,
              "minItems": 0,
              "type": "array",
              "uniqueItems": true
            },
            "runtime": {
              "const": "authority"
            },
            "target_packages": {
              "description": "Requested target packages; effective rights also require host approval and event scope.",
              "items": {
                "$ref": "#/$defs/PackageId"
              },
              "maxItems": 64,
              "minItems": 1,
              "type": "array",
              "uniqueItems": true
            }
          },
          "required": [
            "id",
            "path",
            "event",
            "effects",
            "target_packages",
            "random_streams",
            "parameters",
            "runtime"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "authority",
          "x-hw-rights": "none"
        },
        {
          "additionalProperties": false,
          "description": "A state migration `MigrationInput -> MigrationResult` in its own VM: no reads, randomness or effects.",
          "properties": {
            "id": {
              "$ref": "#/$defs/ContentId",
              "description": "Package-qualified identity; unique within its declaring namespace."
            },
            "path": {
              "$ref": "#/$defs/ScriptPath",
              "description": "Package-relative source file; traversal and aliases are forbidden."
            },
            "runtime": {
              "const": "migration"
            }
          },
          "required": [
            "id",
            "path",
            "runtime"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "foundation",
          "x-hw-rights": "none"
        },
        {
          "additionalProperties": false,
          "description": "A presentation script `VisualFrame -> VisualResult` of a cutscene's camera, evaluated per frame on the viewing client: no reads, randomness, effects or state.",
          "properties": {
            "id": {
              "$ref": "#/$defs/ContentId",
              "description": "Package-qualified identity; unique within its declaring namespace."
            },
            "path": {
              "$ref": "#/$defs/ScriptPath",
              "description": "Package-relative source file; traversal and aliases are forbidden."
            },
            "runtime": {
              "const": "presentation"
            }
          },
          "required": [
            "id",
            "path",
            "runtime"
          ],
          "type": "object",
          "x-hw-error-classes": {
            "invalid_type": "fault",
            "missing_reference": "fault",
            "out_of_range": "fault",
            "unknown_field": "fault"
          },
          "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
          "x-hw-feature": "presentation",
          "x-hw-rights": "none"
        }
      ],
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault",
        "out_of_range": "fault",
        "unknown_field": "fault"
      },
      "x-hw-errors": "invalid_type,unknown_field,out_of_range,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-rights": "none"
    },
    "ScriptId": {
      "description": "Reference to script content; resolution checks namespace and target kind.",
      "maxLength": 129,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault"
      },
      "x-hw-errors": "invalid_type,missing_reference",
      "x-hw-feature": "foundation",
      "x-hw-reference": "script"
    },
    "ScriptPath": {
      "description": "Relative lowercase Luau source path within the package.",
      "maxLength": 4096,
      "minLength": 1,
      "pattern": "^(?:[a-z0-9_][a-z0-9_-]*/)*[a-z0-9_][a-z0-9_-]*\\.luau$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault"
      },
      "x-hw-errors": "invalid_type",
      "x-hw-feature": "authority"
    },
    "SignedInt": {
      "description": "Exactly representable signed integer for script arithmetic.",
      "maximum": 9007199254740991,
      "minimum": -9007199254740991,
      "type": "integer",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "out_of_range": "fault"
      },
      "x-hw-errors": "invalid_type,out_of_range",
      "x-hw-feature": "foundation",
      "x-hw-unit": "integer"
    },
    "VariableId": {
      "description": "Reference to variable content; resolution checks namespace and target kind.",
      "maxLength": 129,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$",
      "type": "string",
      "x-hw-error-classes": {
        "invalid_type": "fault",
        "missing_reference": "fault"
      },
      "x-hw-errors": "invalid_type,missing_reference",
      "x-hw-feature": "authority",
      "x-hw-reference": "variable"
    }
  },
  "$ref": "#/$defs/Manifest",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
