{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "attempt": {
      "type": "string"
    },
    "quest": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "decision": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            }
          },
          "required": ["kind"],
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "recorded": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string"
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["kind", "reason"],
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "changed": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "divergence": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "sequence": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "reason": {
              "type": "string",
              "enum": ["new", "changed", "uncaptured"]
            },
            "recorded": {
              "anyOf": [
                {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                {
                  "type": "null"
                }
              ]
            },
            "replayed": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": ["sequence", "reason", "recorded", "replayed"],
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ]
    },
    "calls": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "out": {
      "type": "string"
    }
  },
  "required": [
    "attempt",
    "quest",
    "decision",
    "recorded",
    "changed",
    "divergence",
    "calls"
  ],
  "additionalProperties": {},
  "title": "Attempt replay",
  "description": "Local quest code evaluated against a test-environment attempt's capture. `quest` is the captured quest's key, null for a quest created in Console. `decision` is null when the replay stopped at `divergence`; `changed` is null when `decision` or `recorded` is null. `calls` counts the capability calls the replay answered. `out` is where --out wrote the capture."
}
