{
  "$schema":"http://json-schema.org/draft-07/schema#",
  "$id":"https://darknovainfo.com/developers/business-contract-v1.json",
  "title":"RealityEngine local business prototype contract v1",
  "description":"Local fixtures only. This schema does not enable production API access.",
  "type":"object",
  "required":["contract"],
  "properties":{
    "synthetic":{"const":true},
    "contract":{"const":"realityengine.business.v1"},
    "investigationId":{"type":"string","pattern":"^[a-f0-9-]{36}$"},
    "state":{"enum":["QUEUED","RUNNING","COMPLETE","FAILED_UNCERTAIN","EXPIRED","CLARIFICATION_REQUIRED"]},
    "question":{"type":"string","maxLength":6000},
    "mode":{"const":"deep"},
    "createdAt":{"type":"string"},"expiresAt":{"type":"string"},
    "error":{"type":"string","maxLength":80},
    "result":{"$ref":"#/definitions/evidence"},"evidence":{"$ref":"#/definitions/evidence"},
    "usage":{"type":"object"},"events":{"type":"array"},"scope":{"type":"object"},
    "providerCalls":{"const":0},"reservedCostMicroUSD":{"type":"integer","minimum":0},
    "costBasis":{"const":"reserved_estimate"},"customerBilling":{"const":false},
    "invitationOnly":{"const":true},"modes":{"type":"array","items":{"const":"deep"}},
    "clarification":{"const":true},"providerExecution":{"type":"boolean"},"uploads":{"const":false},
    "webhooks":{"const":false},"productionAvailable":{"const":false},"status":{"const":"local_fixture_only"},"providerProbe":{"const":false}
  },
  "additionalProperties":false,
  "definitions":{
    "request":{"type":"object","required":["question","mode","idempotencyKey"],"properties":{"question":{"type":"string","minLength":1,"maxLength":6000},"mode":{"const":"deep"},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{16,80}$"}},"additionalProperties":false},
    "evidence":{"type":"object","required":["schema","question","sources","findings","unknowns"],"properties":{"schema":{"const":"realityengine.evidence.v3"},"question":{"type":"string"},"sources":{"type":"array"},"findings":{"type":"array"},"unknowns":{"type":"array"}},"additionalProperties":true}
  }
}
