{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-client-diagnostic-event-schema.json",
  "title": "ClientDiagnosticEvent",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-diagnostics-api-openapi.yml#/components/schemas/ClientDiagnosticEvent",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "event_id",
    "event_at",
    "schema_version",
    "flow_version",
    "event",
    "check_name",
    "code",
    "os_family",
    "node_major",
    "run402_major",
    "run402_minor",
    "buzz_fixture_id",
    "install_context"
  ],
  "properties": {
    "event_id": {
      "type": "string",
      "format": "uuid",
      "description": "Fresh random UUID v4 used only for 24-hour deduplication."
    },
    "event_at": {
      "type": "string",
      "format": "date-time"
    },
    "schema_version": {
      "type": "integer",
      "enum": [
        1
      ]
    },
    "flow_version": {
      "type": "string",
      "enum": [
        "run402.buzz-doctor.v1"
      ]
    },
    "event": {
      "type": "string",
      "enum": [
        "preflight_started",
        "preflight_passed",
        "preflight_blocked"
      ]
    },
    "check_name": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "session_shell",
        "node_runtime",
        "run402_cli",
        "buzz_cli",
        "buzz_agent_target",
        "run402_api",
        "run402_console",
        "buzz_relay",
        "wallet_profile",
        null
      ]
    },
    "code": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "BUZZ_PREFLIGHT_SHELL_UNAVAILABLE",
        "BUZZ_PREFLIGHT_NODE_UNAVAILABLE",
        "BUZZ_PREFLIGHT_NODE_INCOMPATIBLE",
        "BUZZ_PREFLIGHT_RUN402_UNAVAILABLE",
        "BUZZ_PREFLIGHT_RUN402_INCOMPATIBLE",
        "BUZZ_PREFLIGHT_RUN402_UPDATE_AVAILABLE",
        "BUZZ_PREFLIGHT_BUZZ_CLI_UNAVAILABLE",
        "BUZZ_PREFLIGHT_BUZZ_CLI_INCOMPATIBLE",
        "BUZZ_AGENT_TARGET_REQUIRED",
        "BUZZ_AGENT_TARGET_UNVERIFIED",
        "BUZZ_AGENT_TARGET_MISMATCH",
        "BUZZ_PREFLIGHT_API_UNREACHABLE",
        "BUZZ_PREFLIGHT_CONSOLE_UNREACHABLE",
        "BUZZ_PREFLIGHT_RELAY_UNSAFE",
        "BUZZ_PREFLIGHT_RELAY_UNREACHABLE",
        "BUZZ_PREFLIGHT_WALLET_PROFILE_REQUIRED",
        "BUZZ_PREFLIGHT_WALLET_PROFILE_NOT_FOUND",
        "BUZZ_PREFLIGHT_WALLET_PROFILE_MISMATCH",
        null
      ]
    },
    "os_family": {
      "type": "string",
      "enum": [
        "macos",
        "linux",
        "windows",
        "other"
      ]
    },
    "node_major": {
      "type": "integer",
      "minimum": 0,
      "maximum": 999
    },
    "run402_major": {
      "type": "integer",
      "minimum": 0,
      "maximum": 999
    },
    "run402_minor": {
      "type": "integer",
      "minimum": 0,
      "maximum": 999
    },
    "buzz_fixture_id": {
      "type": "string",
      "enum": [
        "buzz-cli-v0.5.2-capabilities"
      ]
    },
    "install_context": {
      "type": "string",
      "enum": [
        "project_local",
        "user_global_npm",
        "ephemeral_exec",
        "managed_buzz_sidecar",
        "custom_path",
        "unknown"
      ]
    }
  }
}