{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentberg-ai/json-schema/agentberg-ai-trap-diagnostic-schema.json",
  "title": "TrapDiagnostic",
  "description": "Standardized envelope all 35+ traps populate. Null fields = not applicable for this trap.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentberg-ai-support-api-openapi.yml#/components/schemas/TrapDiagnostic",
  "properties": {
    "agent_id": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Agent Id"
    },
    "kit_version": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Kit Version"
    },
    "trap_name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Trap Name"
    },
    "severity": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "title": "Severity",
      "default": "medium"
    },
    "concern": {
      "type": "string",
      "maxLength": 500,
      "minLength": 5,
      "title": "Concern"
    },
    "run_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run Count"
    },
    "diagnostics": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Diagnostics"
    }
  },
  "type": "object",
  "required": [
    "agent_id",
    "trap_name",
    "concern"
  ]
}