{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blvkware-dev/json-schema/blvkware-dev-result-schema.json",
  "title": "Result",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blvkware-dev-openapi.json#/components/schemas/Result",
  "properties": {
    "confidence": {
      "maximum": 1,
      "minimum": 0,
      "type": "number"
    },
    "evidence": {
      "$ref": "#/$defs/Evidence"
    },
    "namespace": {
      "type": "string"
    },
    "reason": {
      "description": "Only on the `unknown` verdict.",
      "enum": [
        "namespace_unsupported",
        "registry_unreachable",
        "malformed_identifier",
        "quota_exceeded"
      ],
      "type": "string"
    },
    "recommendation": {
      "type": "string"
    },
    "successor": {
      "description": "The identifier to use instead. Present only when it can be named with confidence.",
      "type": "string"
    },
    "value": {
      "type": "string"
    },
    "verdict": {
      "enum": [
        "exists",
        "deprecated",
        "absent",
        "phantom",
        "squat",
        "unknown"
      ],
      "type": "string"
    }
  },
  "required": [
    "namespace",
    "value",
    "verdict",
    "confidence"
  ],
  "type": "object",
  "$defs": {
    "Evidence": {
      "description": "Everything that was true at decision time.",
      "properties": {
        "attestations": {
          "type": "integer"
        },
        "attestationsBeforeRegistration": {
          "type": "integer"
        },
        "firstObserved": {
          "type": "string"
        },
        "lastObserved": {
          "type": "string"
        },
        "nearestExisting": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "note": {
          "type": "string"
        },
        "observedFrom": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "phantomSince": {
          "type": "string"
        },
        "publisherPriorPackages": {
          "type": "integer"
        },
        "registeredAt": {
          "type": "string"
        },
        "registryCheckedAt": {
          "format": "date-time",
          "type": "string"
        },
        "registryStatus": {
          "enum": [
            "found",
            "not_found",
            "deprecated",
            "unreachable"
          ],
          "type": "string"
        },
        "stale": {
          "type": "boolean"
        }
      },
      "type": "object"
    }
  }
}