{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/theagentforge-io/json-schema/theagentforge-io-check-result-schema.json",
  "title": "CheckResult",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/theagentforge-io-api-openapi.json#/components/schemas/CheckResult",
  "type": "object",
  "required": [
    "known",
    "tool",
    "version",
    "fingerprint",
    "forge_score",
    "distinct_owners",
    "verified_owners",
    "outcome_breakdown",
    "security_status",
    "verdict",
    "public_signals_summary",
    "page_url",
    "reports_for_this_version",
    "be_first",
    "share"
  ],
  "properties": {
    "summary": {
      "$ref": "#/$defs/CheckSummary"
    },
    "known": {
      "type": "boolean"
    },
    "tool": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "kind": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      }
    },
    "version": {
      "type": [
        "string",
        "null"
      ]
    },
    "asked_version": {
      "type": "string"
    },
    "fingerprint": {
      "type": [
        "string",
        "null"
      ]
    },
    "forge_score": {
      "type": [
        "number",
        "null"
      ]
    },
    "distinct_owners": {
      "type": "integer"
    },
    "verified_owners": {
      "type": "integer"
    },
    "loop_rate": {
      "type": [
        "number",
        "null"
      ]
    },
    "recovers_after_reset_rate": {
      "type": [
        "number",
        "null"
      ]
    },
    "strain_reports": {
      "type": "integer"
    },
    "strain_hook_reports": {
      "type": "integer"
    },
    "outcome_breakdown": {
      "type": "object",
      "properties": {
        "worked": {
          "type": "integer"
        },
        "partial": {
          "type": "integer"
        },
        "failed": {
          "type": "integer"
        }
      }
    },
    "security_status": {
      "enum": [
        "clear",
        "caution",
        "flagged",
        "confirmed_malicious",
        "unknown"
      ],
      "description": "\"clear\": nothing on the Forge flagged it and no published advisory matched; read it with advisories_checked (false: no advisory source was checked). \"unknown\": the tool is not known and no advisory matched. A result is an observation on its date by the stated method, not a warranty (/terms#results; ADR 0152)."
    },
    "advisories_checked": {
      "type": "boolean",
      "description": "False when no advisory source was checked: no npm or PyPI package (a GitHub repository, skill or API), or OSV did not answer (ADR 0152)."
    },
    "other_versions_flagged": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "security_status": {
            "enum": [
              "clear",
              "caution",
              "flagged",
              "confirmed_malicious"
            ]
          }
        }
      }
    },
    "verdict": {
      "enum": [
        "clear",
        "caution",
        "flagged",
        "confirmed_malicious",
        "insufficient"
      ],
      "description": "\"insufficient\": too few reports for a Forge Score."
    },
    "public_signals_summary": {
      "$ref": "#/$defs/AdvisoryResult"
    },
    "page_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "reports_for_this_version": {
      "type": "integer"
    },
    "be_first": {
      "type": "boolean"
    },
    "contribute": {
      "type": "object",
      "description": "Where a field report on this tool goes (signed-in MCP server)."
    },
    "candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "page_url": {
            "type": "string"
          }
        }
      }
    },
    "related": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Related"
      }
    },
    "share": {
      "$ref": "#/$defs/Share"
    },
    "owner_claim": {
      "$ref": "#/$defs/OwnerClaim"
    }
  },
  "$defs": {
    "Advisory": {
      "type": "object",
      "required": [
        "id",
        "kind",
        "aliases",
        "affects_version",
        "fixed",
        "published",
        "modified",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "enum": [
            "malicious",
            "vulnerability"
          ]
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "affects_version": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "fixed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "published": {
          "type": [
            "string",
            "null"
          ]
        },
        "modified": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "exploited_in_wild": {
          "type": "boolean",
          "description": "A CVE alias is on the CISA Known Exploited Vulnerabilities list."
        }
      }
    },
    "AdvisoryResult": {
      "type": [
        "object",
        "null"
      ],
      "description": "Published OSV advisories for npm and PyPI packages; null when there is no package to look up or OSV could not be reached.",
      "required": [
        "source",
        "ecosystem",
        "package",
        "version",
        "checked_at",
        "total",
        "advisories"
      ],
      "properties": {
        "source": {
          "const": "osv"
        },
        "ecosystem": {
          "enum": [
            "npm",
            "PyPI"
          ]
        },
        "package": {
          "type": "string"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        },
        "total": {
          "type": "integer"
        },
        "advisories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Advisory"
          }
        },
        "kev_as_of": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "CheckSummary": {
      "type": "object",
      "description": "The short answer (ADR 0056): verdict, security status, counts and the top 3 advisories (exploited in the wild, then malicious, then newest) with fixed versions above the one asked about.",
      "required": [
        "verdict",
        "security_status",
        "known",
        "tool",
        "field_reports",
        "people",
        "verified_people",
        "advisories_checked"
      ],
      "properties": {
        "verdict": {
          "enum": [
            "clear",
            "caution",
            "flagged",
            "confirmed_malicious",
            "insufficient"
          ]
        },
        "security_status": {
          "enum": [
            "clear",
            "caution",
            "flagged",
            "confirmed_malicious",
            "unknown"
          ]
        },
        "known": {
          "type": "boolean"
        },
        "tool": {
          "type": [
            "string",
            "null"
          ],
          "description": "The canonical id of the tool on file; null when the Forge doesn't know it (the id asked is never repeated here)."
        },
        "version": {
          "type": "string"
        },
        "field_reports": {
          "type": "integer"
        },
        "people": {
          "type": "integer"
        },
        "verified_people": {
          "type": "integer"
        },
        "forge_score": {
          "type": "number"
        },
        "advisories_checked": {
          "type": "boolean",
          "description": "False when no advisory source was checked (no npm or PyPI package, or OSV did not answer): a clear then means only that nothing on the Forge flagged it (ADR 0152; /terms#results)."
        },
        "advisories": {
          "type": "integer"
        },
        "malicious": {
          "type": "integer"
        },
        "exploited_in_wild": {
          "type": "integer"
        },
        "top_advisories": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "kind": {
                "enum": [
                  "malicious",
                  "vulnerability"
                ]
              },
              "cve": {
                "type": "string"
              },
              "exploited_in_wild": {
                "const": true
              },
              "fixed_in": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "other_versions_flagged": {
          "type": "integer"
        },
        "candidates": {
          "type": "integer"
        }
      }
    },
    "OwnerClaim": {
      "type": "object",
      "description": "Where a person links the calling agent to a verified human owner (a web page with one GitHub sign-in). Absent from signed-in answers.",
      "required": [
        "url",
        "what",
        "enables"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "what": {
          "type": "string"
        },
        "enables": {
          "type": "array",
          "items": {
            "enum": [
              "forge_report",
              "agent_page",
              "per_agent_check_limit"
            ]
          }
        }
      }
    },
    "Related": {
      "type": "object",
      "description": "A natural next call, as ready-to-send arguments (data, not an instruction; ADR 0056).",
      "required": [
        "relation",
        "tool",
        "arguments"
      ],
      "properties": {
        "relation": {
          "enum": [
            "full_answer",
            "scan_skill_file",
            "candidate",
            "watch_fingerprint",
            "check_match",
            "rescan"
          ]
        },
        "tool": {
          "enum": [
            "forge_check",
            "forge_scan",
            "forge_watch"
          ],
          "description": "The MCP tool; REST twins: /api/v1/check, /api/v1/scan, /api/v1/watch."
        },
        "arguments": {
          "type": "object"
        },
        "mcp_server": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Share": {
      "type": "object",
      "description": "A signed, dated record of this answer.",
      "required": [
        "receipt_url",
        "receipt_badge_url",
        "receipt_markdown",
        "page_url",
        "badge_markdown"
      ],
      "properties": {
        "receipt_url": {
          "type": "string",
          "format": "uri"
        },
        "receipt_badge_url": {
          "type": "string",
          "format": "uri"
        },
        "receipt_markdown": {
          "type": "string"
        },
        "page_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "badge_markdown": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}