{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oms.local/schemas/conductor-activity-payload.schema.json",
  "title": "OMS conductor activity payload",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conductor_session_id",
    "launch_generation",
    "pane_id",
    "conductor_process",
    "provider_version",
    "health",
    "last_hook_event",
    "last_source_sha256",
    "updated_at"
  ],
  "properties": {
    "conductor_session_id": { "type": "string", "minLength": 1, "maxLength": 128 },
    "launch_generation": { "type": "integer", "minimum": 1 },
    "pane_id": { "type": "string", "pattern": "^%[0-9]{1,10}$" },
    "conductor_process": {
      "type": "object",
      "additionalProperties": false,
      "required": ["process_id", "boot_id", "start_ticks"],
      "properties": {
        "process_id": { "type": "integer", "minimum": 1 },
        "boot_id": { "type": "string", "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" },
        "start_ticks": { "type": "string", "pattern": "^[1-9][0-9]*$" }
      }
    },
    "provider_version": { "type": "string", "enum": ["2.1.207", "2.1.210", "2.1.211", "2.1.214", "2.1.215"] },
    "health": { "type": "string", "enum": ["healthy", "stalled", "stopped"] },
    "last_hook_event": { "type": "string", "enum": ["SessionStart", "UserPromptSubmit", "Stop", "StopFailure", "SessionEnd", "NotificationWake", "WatchdogFailure"] },
    "last_source_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
    "updated_at": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" }
  }
}
