{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-monitoring-runtime-details-schema.json",
  "title": "MonitoringRuntimeDetails",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-openapi.json#/components/schemas/MonitoringRuntimeDetails",
  "additionalProperties": false,
  "properties": {
    "agentId": {
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "type": "string"
    },
    "attempts7d": {
      "maximum": 9007199254740991,
      "minimum": 0,
      "type": "integer"
    },
    "deliveries": {
      "additionalProperties": false,
      "properties": {
        "completed": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "dead_letter": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "pending": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "processing": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "skipped": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "pending",
        "processing",
        "completed",
        "skipped",
        "dead_letter"
      ],
      "type": "object"
    },
    "lastClaimedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFinishedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "latency7d": {
      "additionalProperties": false,
      "properties": {
        "averageMs": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "maxMs": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "samples": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "samples",
        "averageMs",
        "maxMs"
      ],
      "type": "object"
    },
    "recentDeliveries": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "attempts": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "leaseUntil": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "messageId": {
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "nextAttemptAt": {
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
            "type": "string"
          },
          "processedAt": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "roomId": {
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "sequence": {
            "pattern": "^[0-9]+$",
            "type": "string"
          },
          "state": {
            "enum": [
              "pending",
              "processing",
              "completed",
              "skipped",
              "dead_letter"
            ],
            "type": "string"
          },
          "version": {
            "pattern": "^[0-9]+$",
            "type": "string"
          }
        },
        "required": [
          "messageId",
          "roomId",
          "sequence",
          "state",
          "version",
          "attempts",
          "leaseUntil",
          "nextAttemptAt",
          "processedAt"
        ],
        "type": "object"
      },
      "maxItems": 25,
      "type": "array"
    },
    "runtime": {
      "additionalProperties": false,
      "properties": {
        "concurrency": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "createdAt": {
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
          "type": "string"
        },
        "from": {
          "enum": [
            "beginning",
            "now"
          ],
          "type": "string"
        },
        "handlerReservations": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "maxAttempts": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "maxCallsPerHour": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "pattern": "^[0-9]+$",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "version",
        "createdAt",
        "from",
        "maxAttempts",
        "maxCallsPerHour",
        "concurrency",
        "handlerReservations"
      ],
      "type": "object"
    },
    "usage7d": {
      "additionalProperties": false,
      "properties": {
        "inputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "modelCalls": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "outputTokens": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "reportedAttempts": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "unreportedAttempts": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "reportedAttempts",
        "unreportedAttempts",
        "modelCalls",
        "inputTokens",
        "outputTokens"
      ],
      "type": "object"
    }
  },
  "required": [
    "agentId",
    "runtime",
    "deliveries",
    "attempts7d",
    "usage7d",
    "latency7d",
    "lastClaimedAt",
    "lastFinishedAt",
    "recentDeliveries"
  ],
  "type": "object"
}