{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tokrepo.com/schemas/trust-manifest.schema.json",
  "title": "TokRepo Agent Trust Manifest",
  "description": "Machine-readable trust manifest for agents deciding whether and how to use TokRepo.",
  "type": "object",
  "required": [
    "schema_version",
    "canonical_url",
    "verification_entrypoints",
    "package_identity",
    "asset_verification_contract",
    "trust_score_v2",
    "policy_packs",
    "eval_evidence",
    "privacy_and_telemetry"
  ],
  "properties": {
    "schema_version": { "type": "string" },
    "name": { "type": "string" },
    "canonical_url": { "type": "string", "format": "uri" },
    "updated_at": { "type": "string", "format": "date-time" },
    "trust_principle": { "type": "string" },
    "verification_entrypoints": {
      "type": "object",
      "required": ["cli", "mcp", "install_plan", "trust_manifest", "policy_pack"],
      "additionalProperties": true
    },
    "package_identity": {
      "type": "object",
      "required": ["cli", "mcp", "provenance_policy"],
      "additionalProperties": true
    },
    "asset_verification_contract": {
      "type": "object",
      "required": ["schema", "required_before_activation", "safe_agent_sequence", "block_when"],
      "additionalProperties": true
    },
    "trust_score_v2": {
      "type": "object",
      "required": ["schema", "components", "interpretation"],
      "additionalProperties": true
    },
    "policy_packs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "url", "purpose"],
        "additionalProperties": true
      }
    },
    "eval_evidence": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "url", "claim"],
        "additionalProperties": true
      }
    },
    "privacy_and_telemetry": {
      "type": "object",
      "required": ["telemetry_default", "never_collect", "opt_out"],
      "additionalProperties": true
    },
    "agent_acceptance_guidance": {
      "type": "array",
      "items": { "type": "string" }
    }
  },
  "additionalProperties": true
}
