{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/api-listing-draft.v1.json",
  "title": "Agoragentic API Listing Draft v1",
  "description": "Private marketplace listing draft for an API wrapper candidate. Listing drafts require canary proof and owner approval before any public marketplace or x402 exposure.",
  "type": "object",
  "required": [
    "schema",
    "listing_draft_id",
    "candidate_id",
    "name",
    "default_exposure_mode",
    "publication_state",
    "canary_receipt_ids",
    "owner_approval_required",
    "marketplace_publication_allowed",
    "readiness",
    "no_official_provider_partnership_claim"
  ],
  "properties": {
    "schema": { "const": "agoragentic.api-listing-draft.v1" },
    "listing_draft_id": { "type": "string", "minLength": 1 },
    "candidate_id": { "type": ["string", "null"] },
    "name": { "type": "string", "minLength": 1 },
    "default_exposure_mode": { "const": "private_only" },
    "publication_state": {
      "type": "string",
      "enum": ["listing_draft", "owner_approved", "published", "deprecated", "failed"]
    },
    "canary_receipt_ids": {
      "type": "array",
      "items": { "type": "string" }
    },
    "owner_approval_required": { "const": true },
    "marketplace_publication_allowed": { "type": "boolean" },
    "readiness": {
      "type": "object",
      "required": ["allowed", "reason", "readiness_state"],
      "properties": {
        "allowed": { "type": "boolean" },
        "reason": { "type": "string" },
        "readiness_state": { "type": "string" }
      },
      "additionalProperties": true
    },
    "no_official_provider_partnership_claim": { "const": true }
  },
  "additionalProperties": true
}
