{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://scriptmasterlabs.com/.well-known/market-event.schema.json",
  "title": "SML Evidence-Bounded Market Event",
  "type": "object",
  "required": ["schema","event_id","event_type","symbol","observed_at","source","state","claims","non_claims","evidence","artifact_hash"],
  "properties": {
    "schema": {"const":"sml.market-event.v1"},
    "event_id": {"type":"string","minLength":8},
    "event_type": {"type":"string","enum":["breakout_candidate","breakout_test","market_attention"]},
    "symbol": {"type":"string","pattern":"^[A-Z0-9.:-]{1,20}$"},
    "observed_at": {"type":"string"},
    "source": {
      "type":"object",
      "required":["name","runtime"],
      "properties": {
        "name":{"type":"string"},
        "runtime":{"type":"string"},
        "source_state":{"type":["string","null"]}
      }
    },
    "state": {
      "type":"object",
      "required":["label","classification"],
      "properties": {
        "label":{"type":"string"},
        "classification":{"const":"heuristic_state"},
        "score":{"type":["number","null"]},
        "score_scale":{"type":["string","null"]}
      }
    },
    "evidence": {"type":"object","additionalProperties":true},
    "claims": {"type":"array","items":{"type":"string"}},
    "non_claims": {"type":"array","items":{"type":"string"},"minItems":1},
    "limitations": {"type":"array","items":{"type":"string"}},
    "invalidation": {"type":["number","null"]},
    "artifact_hash": {"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},
    "delivery": {
      "type":"object",
      "properties": {
        "tier":{"enum":["free_preview","paid_full"]},
        "settlement_required":{"type":"boolean"}
      }
    }
  },
  "additionalProperties": true
}
