{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Artifact": {
      "properties": {
        "bytes": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "bytes",
        "type"
      ],
      "description": "Artifact is exact retained content with a selected interpretation: the hash of the bytes and the hash of the interpretation descriptor the bytes are read under (order 0002 D4)."
    },
    "EntryRef": {
      "properties": {
        "root_id": {
          "type": "string"
        },
        "space_id": {
          "type": "string"
        },
        "position": {
          "type": "integer"
        }
      },
      "type": "object",
      "required": [
        "root_id",
        "space_id",
        "position"
      ],
      "description": "EntryRef is the occurrence identity of one entry: a position in one journal."
    }
  },
  "properties": {
    "attempt": {
      "$ref": "#/$defs/EntryRef"
    },
    "release": {
      "$ref": "#/$defs/EntryRef"
    },
    "outcome": {
      "type": "string"
    },
    "result": {
      "oneOf": [
        {
          "$ref": "#/$defs/EntryRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "outputs": {
      "additionalProperties": {
        "$ref": "#/$defs/Artifact"
      },
      "type": "object"
    },
    "reason": {
      "type": "string"
    },
    "replayed": {
      "type": "boolean"
    },
    "reused": {
      "oneOf": [
        {
          "$ref": "#/$defs/EntryRef"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "attempt",
    "release",
    "outcome",
    "replayed"
  ],
  "title": "ApplyResult",
  "description": "ApplyResult is the admitted attempt and where it stands: the attempt's occurrence A; the release occurrence that ran; the outcome; on completion the result's head occurrence and its outputs by role; on failure the reason."
}
