{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.compliancehealth.ca/agents/manifest.schema.json",
  "title": "Compliance Health Agent Manifest v1.1.1",
  "type": "object",
  "required": [
    "version",
    "schemaUrl",
    "changelogUrl",
    "lastReviewed",
    "organization",
    "offering",
    "careRails",
    "fitSignals",
    "trustProfile",
    "contact",
    "usagePolicy",
    "localization",
    "sources"
  ],
  "properties": {
    "version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "schemaUrl": {
      "type": "string",
      "format": "uri"
    },
    "changelogUrl": {
      "type": "string",
      "format": "uri"
    },
    "lastReviewed": {
      "type": "string",
      "format": "date"
    },
    "organization": {
      "type": "object",
      "required": [
        "name",
        "legalName",
        "alternateName",
        "website",
        "foundingLocation",
        "inLanguage",
        "knowsAbout"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "legalName": {
          "type": "string"
        },
        "alternateName": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "website": {
          "type": "string",
          "format": "uri"
        },
        "foundingLocation": {
          "type": "string"
        },
        "inLanguage": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "knowsAbout": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "offering": {
      "type": "object"
    },
    "careRails": {
      "type": "array",
      "minItems": 4,
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "fitSignals": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "trustProfile": {
      "type": "object"
    },
    "contact": {
      "type": "object",
      "required": [
        "email",
        "primaryCtaUrl"
      ],
      "properties": {
        "email": {
          "type": "string",
          "format": "email"
        },
        "primaryCtaUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "usagePolicy": {
      "type": "object",
      "required": [
        "retrieval",
        "training",
        "termsUrl",
        "transparencyUrl"
      ],
      "properties": {
        "retrieval": {
          "type": "object"
        },
        "training": {
          "type": "object"
        },
        "termsUrl": {
          "type": "string",
          "format": "uri"
        },
        "transparencyUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "localization": {
      "type": "object"
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "minItems": 1
    }
  },
  "additionalProperties": false
}