{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glasswarp-com/json-schema/glasswarp-com-session-schema.json",
  "title": "Session",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/glasswarp-com-openapi.yaml#/components/schemas/Session",
  "type": "object",
  "properties": {
    "session_id": {
      "type": "string"
    },
    "rig_id": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": [
        "desktop",
        "app"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "ended",
        "failed"
      ]
    },
    "started_at": {
      "type": "string",
      "format": "date-time"
    },
    "action_count": {
      "type": "integer"
    },
    "idle_timeout_seconds": {
      "type": "integer",
      "description": "Inactivity seconds before automatic idle end (60–3600)."
    },
    "capture_mode": {
      "type": "string",
      "enum": [
        "dxgi",
        "gdi",
        "gdi_fallback",
        "unknown"
      ],
      "description": "Host API capture path (updates mid-session on DXGI loss → GDI fallback)"
    }
  }
}