{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/energyops-result-package.schema.json",
  "title": "EnergyOps Result Package",
  "type": "object",
  "required": [
    "object_type",
    "package_id",
    "requested_tool",
    "workflow_type",
    "result_status",
    "summary"
  ],
  "properties": {
    "object_type": {
      "const": "energyops_result_package"
    },
    "package_id": {
      "type": "string"
    },
    "requested_tool": {
      "const": "energyops"
    },
    "workflow_type": {
      "type": "string"
    },
    "project_id": {
      "type": "string"
    },
    "readiness_status": {
      "type": "string"
    },
    "readiness_score": {
      "type": "number"
    },
    "result_status": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "missing_items": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "milestone_summary": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "exceptions": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "delivery_package_url": {
      "type": "string"
    },
    "result_contract_url": {
      "type": "string"
    },
    "task_ledger_url": {
      "type": "string"
    },
    "result_attestation_url": {
      "type": "string"
    },
    "callback_status": {
      "type": "string"
    },
    "next_action": {
      "type": "string"
    }
  }
}
