{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kairos-lang.org/schema/supply.schema.json",
  "title": "Kairos --supply (static resolution bundle for external())",
  "description": "Input of the reference CLI's --supply: one entry per external() binding, keyed by the binding name or 'premise.binding' (the qualified key wins). The CLI checks only the shape; the supply contract (covering ⊇ points, ascending, real dates, kind match, label domain) is enforced by the evaluator (ADR-46). Unknown keys inside an entry are ignored. Published with kairos-lang 1.0.6 (1.0 addendum 23).",
  "type": "object",
  "propertyNames": {
    "pattern": "^[^\\s.]+(\\.[^\\s.]+)?$"
  },
  "additionalProperties": {
    "$ref": "#/$defs/entry"
  },
  "$defs": {
    "entry": {
      "type": "object",
      "required": [
        "covering",
        "asof"
      ],
      "properties": {
        "dates": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "description": "kind: dates — civil days in the premise's tz (YYYY-MM-DD), ascending, no duplicates"
        },
        "instants": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "kind: instants — epoch milliseconds (the same convention as CliReport points), ascending, within ±8.64e15"
        },
        "covering": {
          "type": "string",
          "minLength": 1,
          "description": "the completeness claim: 'YYYY-MM-DD..YYYY-MM-DD' (year-only ends allowed), '..' for all time, an open end for a concluded claim; several ranges separated by ', '"
        },
        "asof": {
          "type": "string",
          "minLength": 1,
          "description": "version identifier of this data, compared by identity only (never ordered or parsed). Use the observation date YYYY-MM-DD unless your source has a better version id. Shown in annotations and the coverage summary; a mismatch with the premise's asof: is reported, not overridden"
        },
        "labels": {
          "type": "array",
          "items": {
            "type": [
              "string",
              "number",
              "boolean"
            ]
          },
          "description": "optional parallel labels, one per point (kind: dates|instants with labels: declared)"
        }
      },
      "oneOf": [
        {
          "required": [
            "dates"
          ]
        },
        {
          "required": [
            "instants"
          ]
        }
      ]
    }
  }
}
