{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runheed-com/json-schema/runheed-com-event-schema.json",
  "title": "Event",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runheed-com-openapi.json#/components/schemas/Event",
  "type": "object",
  "required": [
    "errorType",
    "errorMessage"
  ],
  "properties": {
    "errorType": {
      "type": "string",
      "maxLength": 500,
      "description": "e.g. TypeError"
    },
    "errorMessage": {
      "type": "string",
      "maxLength": 10000
    },
    "stacktrace": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Frame"
      }
    },
    "platform": {
      "type": "string"
    },
    "runtime": {
      "type": "string"
    },
    "os": {
      "type": "string"
    },
    "environment": {
      "type": "string",
      "description": "e.g. production"
    },
    "release": {
      "type": "string",
      "description": "e.g. a git sha"
    },
    "agent": {
      "type": "object",
      "description": "Which coding agent shipped the code",
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "sessionId": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "toolName": {
          "type": "string"
        }
      }
    },
    "request": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Authorization, cookie and API-key headers are redacted on arrival"
        }
      }
    },
    "user": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "ip": {
          "type": "string"
        }
      }
    },
    "breadcrumbs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "data": {
            "type": "object"
          }
        }
      }
    },
    "extra": {
      "type": "object"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "fingerprint": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Override grouping"
    }
  },
  "$defs": {
    "Frame": {
      "type": "object",
      "properties": {
        "filename": {
          "type": "string"
        },
        "function": {
          "type": "string"
        },
        "lineno": {
          "type": "integer"
        },
        "colno": {
          "type": "integer"
        },
        "inApp": {
          "type": "boolean"
        },
        "context": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}