{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://jig-harness.dev/protocol/comment-markers/v5/schemas/tracker-claim-marker.json",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "kind": {
          "const": "tracker-claim-marker"
        },
        "v": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1
        },
        "key": {
          "type": "string",
          "pattern": "^claim$"
        },
        "writer": {
          "type": "object",
          "properties": {
            "login": {
              "type": "string",
              "minLength": 1
            },
            "host": {
              "type": "string",
              "minLength": 1
            },
            "bootId": {
              "type": "string"
            },
            "pid": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "start": {
              "type": "string"
            }
          },
          "required": ["host"],
          "additionalProperties": true
        },
        "at": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
        },
        "generation": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["kind", "v", "key", "writer", "at"],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "attempt": true,
        "session": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "claimant": {
          "type": "string"
        },
        "override": true
      },
      "required": ["session", "branch", "claimant"],
      "additionalProperties": true
    }
  ]
}
