{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent-news.org/schema/v1",
  "title": "NewsAgentManifest",
  "description": "Machine-readable manifest for news publisher retrieval rights, freshness, attribution, and compensation terms for AI agents. Place at /.well-known/news-agent.json.",
  "version": "1.0.0-draft",
  "status": "draft",
  "type": "object",
  "required": [
    "version",
    "protocol",
    "publisher",
    "agent_access",
    "rights",
    "attribution"
  ],
  "properties": {
    "@context": {
      "type": "string",
      "const": "https://agent-news.org/schema/v1"
    },
    "@type": {
      "type": "string",
      "const": "NewsAgentManifest"
    },
    "version": {
      "type": "string"
    },
    "protocol": {
      "type": "string",
      "const": "ANRM/1.0"
    },
    "publisher": {
      "type": "object",
      "required": [
        "name",
        "domain"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "id": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string",
          "enum": [
            "news-publisher",
            "aggregator",
            "wire-service",
            "broadcaster",
            "protocol-specification"
          ]
        },
        "contact": {
          "type": "string"
        }
      }
    },
    "agent_access": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "open",
            "restricted",
            "paid",
            "delayed",
            "hostile"
          ]
        },
        "modes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "full-text",
              "summarization",
              "indexing",
              "headlines-only",
              "structured-only",
              "none"
            ]
          }
        },
        "allowed_agents": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cache_window_seconds": {
          "type": "integer",
          "default": 3600
        },
        "delay_seconds": {
          "type": "integer",
          "default": 0
        }
      }
    },
    "rights": {
      "type": "object",
      "properties": {
        "summarization": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "full_text_retrieval": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "indexing": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "training": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "commercial_use": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "republication": {
          "type": "string",
          "enum": [
            "permitted",
            "license-required",
            "prohibited"
          ]
        },
        "attribution_required": {
          "type": "boolean",
          "default": true
        }
      }
    },
    "attribution": {
      "type": "object",
      "required": [
        "required_fields"
      ],
      "properties": {
        "format": {
          "type": "string",
          "enum": [
            "text",
            "structured",
            "link"
          ]
        },
        "required_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "template": {
          "type": "string"
        }
      }
    },
    "freshness": {
      "type": "object",
      "properties": {
        "refresh_interval_seconds": {
          "type": "integer",
          "default": 3600
        },
        "breaking_news_interval_seconds": {
          "type": "integer",
          "default": 300
        },
        "archive_cutoff_days": {
          "type": "integer",
          "default": 90
        }
      }
    },
    "compensation": {
      "type": "object",
      "description": "Licensing and compensation terms. rate_card_url enables machine-readable pricing — the field that makes paid/metered models agent-actionable.",
      "properties": {
        "model": {
          "type": "string",
          "enum": [
            "free",
            "contact",
            "metered",
            "prepaid",
            "revenue-share"
          ]
        },
        "licensing_url": {
          "type": "string",
          "format": "uri"
        },
        "contact": {
          "type": "string"
        },
        "rate_card_url": {
          "type": "string",
          "format": "uri",
          "description": "Machine-readable rate card. Agents fetch and evaluate without human mediation."
        },
        "registry_url": {
          "type": "string",
          "format": "uri"
        },
        "notes": {
          "type": "string"
        }
      }
    },
    "provenance": {
      "type": "object",
      "properties": {
        "signed": {
          "type": "boolean",
          "default": false
        },
        "verification_url": {
          "type": "string",
          "format": "uri"
        },
        "trust_anchor": {
          "type": "string",
          "format": "uri"
        },
        "fcs_version": {
          "type": "string"
        },
        "canonical_feed": {
          "type": "string",
          "format": "uri"
        },
        "content_hash_header": {
          "type": "string"
        }
      }
    },
    "content_scope": {
      "type": "object",
      "properties": {
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "feed_url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "discovery": {
      "type": "object",
      "properties": {
        "agent_manifest": {
          "type": "string",
          "format": "uri"
        },
        "fcs_protocol": {
          "type": "string",
          "format": "uri"
        },
        "validator": {
          "type": "string",
          "format": "uri"
        },
        "mcp_server": {
          "type": "string",
          "format": "uri",
          "description": "MCP server for agent-callable manifest lookup."
        }
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "spec_version": {
          "type": "string"
        },
        "published": {
          "type": "string",
          "format": "date"
        },
        "last_modified": {
          "type": "string",
          "format": "date"
        },
        "changelog": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}