{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/problem.schema.json",
  "title": "Problem Details (RFC 9457) with HEART code",
  "type": "object",
  "required": [
    "type",
    "title",
    "status",
    "code"
  ],
  "properties": {
    "type": {
      "type": "string",
      "format": "uri"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer",
      "minimum": 400,
      "maximum": 599
    },
    "detail": {
      "type": "string"
    },
    "instance": {
      "type": "string"
    },
    "code": {
      "enum": [
        "invalid-request",
        "unsupported-version",
        "unauthenticated",
        "insufficient-clearance",
        "not-found",
        "conflict",
        "idempotency-conflict",
        "capability-not-allowed",
        "valve-blocked",
        "budget-exceeded",
        "rate-limited",
        "model-unavailable",
        "internal-error",
        "not-implemented",
        "guard-failed",
        "native-failed",
        "native-timeout",
        "autonomy-stopped",
        "system-unreachable",
        "presence-required",
        "presence-invalid",
        "token-not-bound",
        "signature-required",
        "signature-invalid",
        "identity-changed",
        "caller-not-allowed",
        "out-of-range",
        "cannot-undo"
      ]
    },
    "retryAfterSec": {
      "type": "integer",
      "minimum": 0
    }
  }
}
