{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.ergoblockchain.org/agent-economy/agent-service-publish.schema.v0.json",
  "title": "Ergo Agent Service Publish Validation",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "ok",
    "type",
    "status",
    "accepted_for_operator_review",
    "accepted_service_id",
    "accepted_category",
    "errors",
    "warnings",
    "next_steps"
  ],
  "properties": {
    "ok": { "type": "boolean" },
    "type": { "const": "ergo.agent_service_publish_validation.v0" },
    "status": { "enum": ["accepted_for_operator_review", "blocked"] },
    "accepted_for_operator_review": { "type": "boolean" },
    "accepted_service_id": {
      "type": ["string", "null"],
      "description": "Candidate service id when the manifest is accepted for operator review."
    },
    "accepted_category": {
      "type": ["string", "null"],
      "description": "Candidate service category when the manifest is accepted for operator review."
    },
    "errors": {
      "type": "array",
      "items": { "type": "string" }
    },
    "warnings": {
      "type": "array",
      "items": { "type": "string" }
    },
    "next_steps": {
      "type": "array",
      "items": { "type": "string" }
    },
    "submit_draft": {
      "$ref": "https://www.ergoblockchain.org/agent-economy/agent-service-submit-draft.schema.v0.json"
    }
  }
}
