{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:psyon:practice-event:1.0.0",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "id",
        "topic",
        "participant_ids"
      ],
      "properties": {
        "action": {
          "const": "open_session"
        },
        "id": {
          "type": "string"
        },
        "topic": {
          "type": "string"
        },
        "participant_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "id",
        "session_id",
        "author_id",
        "claim_kind",
        "content",
        "source_ref",
        "correlation_group",
        "discovery_state"
      ],
      "properties": {
        "action": {
          "const": "add_account"
        },
        "id": {
          "type": "string"
        },
        "session_id": {
          "type": "string"
        },
        "author_id": {
          "type": "string"
        },
        "claim_kind": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "source_ref": {
          "type": "string"
        },
        "correlation_group": {
          "type": "string"
        },
        "discovery_state": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "session_id",
        "agreements",
        "differences",
        "unknowns"
      ],
      "properties": {
        "action": {
          "const": "compare"
        },
        "session_id": {
          "type": "string"
        },
        "agreements": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "differences": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "unknowns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "id",
        "session_id",
        "proposer_id",
        "scope",
        "value",
        "reason",
        "counterevidence",
        "account_treatment",
        "mission_assessment",
        "authority_basis"
      ],
      "properties": {
        "action": {
          "const": "propose_learning"
        },
        "id": {
          "type": "string"
        },
        "session_id": {
          "type": "string"
        },
        "proposer_id": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "counterevidence": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "account_treatment": {
          "type": "object"
        },
        "mission_assessment": {
          "type": "object"
        },
        "authority_basis": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "proposal_id",
        "reviewer_id",
        "decision",
        "reason",
        "conflict_free"
      ],
      "properties": {
        "action": {
          "const": "review_learning"
        },
        "proposal_id": {
          "type": "string"
        },
        "reviewer_id": {
          "type": "string"
        },
        "decision": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        },
        "conflict_free": {
          "type": "boolean"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "proposal_id"
      ],
      "properties": {
        "action": {
          "const": "adopt_learning"
        },
        "proposal_id": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "session_id"
      ],
      "properties": {
        "action": {
          "const": "close_session"
        },
        "session_id": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "session_id"
      ],
      "properties": {
        "action": {
          "const": "pause_session"
        },
        "session_id": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "session_id"
      ],
      "properties": {
        "action": {
          "const": "resume_session"
        },
        "session_id": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "participant_id"
      ],
      "properties": {
        "action": {
          "const": "withdraw"
        },
        "participant_id": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "target_revision",
        "operator_principal",
        "reason"
      ],
      "properties": {
        "action": {
          "const": "rollback"
        },
        "target_revision": {
          "type": "integer",
          "minimum": 0
        },
        "operator_principal": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "action",
        "operator_principal",
        "reason"
      ],
      "properties": {
        "action": {
          "const": "stop"
        },
        "operator_principal": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      }
    }
  ]
}
