{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/agent-queue-scheduler-monitor.schema.json",
  "title": "Agent Queue Scheduler Monitor",
  "description": "A Wever Labs OS monitor object showing queue health, scheduler heartbeat, task movement, stuck tasks, retry targets, settlement-funded task readiness, and callback pressure.",
  "type": "object",
  "required": [
    "object_type",
    "monitor_id",
    "os_host",
    "queue_state",
    "heartbeat",
    "task_counts",
    "scheduler_windows",
    "operator_actions",
    "generated_at"
  ],
  "additionalProperties": true,
  "properties": {
    "object_type": {
      "type": "string",
      "const": "agent_queue_scheduler_monitor"
    },
    "monitor_id": {
      "type": "string"
    },
    "os_host": {
      "type": "string",
      "format": "uri"
    },
    "queue_state": {
      "type": "string",
      "enum": [
        "healthy",
        "moving",
        "attention_required",
        "paused",
        "degraded"
      ]
    },
    "heartbeat": {
      "type": "object",
      "additionalProperties": true
    },
    "task_counts": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "scheduler_windows": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "stuck_tasks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "retry_targets": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "callback_pressure": {
      "type": "object",
      "additionalProperties": true
    },
    "settlement_credit_pressure": {
      "type": "object",
      "additionalProperties": true
    },
    "operator_actions": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
