{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hsimc.tech/reality-compute/schemas/context-compute-vector.schema.json",
  "title": "HSIMC Context Compute Vector",
  "type": "object",
  "required": [
    "context_id",
    "runtime_refs",
    "scope",
    "facts"
  ],
  "properties": {
    "context_id": {
      "type": "string"
    },
    "runtime_refs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "string"
    },
    "facts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "dimension",
          "state"
        ],
        "properties": {
          "dimension": {
            "enum": [
              "LANGUAGE_EXPRESSION",
              "CURRENCY_PAYMENT",
              "TIMEZONE_CALENDAR_HOLIDAYS",
              "OPERATING_SUBJECT",
              "LEGAL_REGULATORY",
              "TAX",
              "CUSTOMS_TARIFF",
              "LIVING_LABOR_COST",
              "PRODUCTIVITY",
              "DATA_PRIVACY",
              "LOGISTICS",
              "ACCESSIBILITY_CULTURAL_REQUIREMENTS"
            ]
          },
          "state": {
            "enum": [
              "UNKNOWN",
              "OBSERVED",
              "VERIFIED",
              "STALE",
              "NOT_APPLICABLE"
            ]
          },
          "value": {},
          "unit": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "observed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_from": {
            "type": [
              "string",
              "null"
            ]
          },
          "effective_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": "string"
          }
        }
      }
    }
  }
}
