{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pkgseek-com/json-schema/pkgseek-com-knowledge-identify-hit-schema.json",
  "title": "KnowledgeIdentifyHit",
  "description": "Binary reverse lookup enriched with the owning curated tool.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pkgseek-com-openapi.yml#/components/schemas/KnowledgeIdentifyHit",
  "type": "object",
  "required": [
    "tool_id",
    "canonical_name",
    "category",
    "platform",
    "distro",
    "package_name",
    "binary_name",
    "install_command",
    "repo",
    "gotcha",
    "source",
    "last_verified",
    "packages"
  ],
  "properties": {
    "binary_name": {
      "type": "string"
    },
    "canonical_name": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "distro": {
      "type": "string"
    },
    "gotcha": {
      "type": "boolean"
    },
    "install_command": {
      "type": "string"
    },
    "last_verified": {
      "type": "string"
    },
    "package_name": {
      "type": "string"
    },
    "packages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/KnowledgePackageMatch"
      }
    },
    "platform": {
      "type": "string"
    },
    "repo": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "tool_id": {
      "type": "string"
    },
    "verification": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/KnowledgeFactVerification"
        }
      ]
    }
  },
  "$defs": {
    "KnowledgeFactVerification": {
      "type": "object",
      "required": [
        "status",
        "package_matches",
        "binary_matches",
        "files_indexed",
        "reconciled_at"
      ],
      "properties": {
        "binary_matches": {
          "type": "integer",
          "format": "int32"
        },
        "files_indexed": {
          "type": "integer",
          "format": "int32"
        },
        "package_matches": {
          "type": "integer",
          "format": "int32"
        },
        "reconciled_at": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "KnowledgePackageMatch": {
      "type": "object",
      "description": "One current pkgseek package row linked to a curated distro-level fact.",
      "required": [
        "source",
        "release",
        "repo",
        "package_name",
        "version",
        "arch",
        "file_indexed",
        "binary_verified"
      ],
      "properties": {
        "arch": {
          "type": "string"
        },
        "binary_path": {
          "type": [
            "string",
            "null"
          ]
        },
        "binary_verified": {
          "type": "boolean"
        },
        "file_indexed": {
          "type": "boolean"
        },
        "package_name": {
          "type": "string"
        },
        "release": {
          "type": "string"
        },
        "repo": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "version": {
          "type": "string"
        }
      }
    }
  }
}