{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/api-canary-receipt.v1.json",
  "title": "Agoragentic API Canary Receipt v1",
  "description": "Receipt for a no-publication API wrapper canary check. It records candidate reachability and evidence without creating marketplace listings, x402 routes, provider partnerships, or settlement.",
  "type": "object",
  "required": [
    "schema",
    "receipt_type",
    "receipt_id",
    "candidate_id",
    "status",
    "checks",
    "evidence_hash",
    "public_boundary"
  ],
  "properties": {
    "schema": { "const": "agoragentic.api-canary-receipt.v1" },
    "receipt_type": { "const": "api_canary_receipt" },
    "receipt_id": { "type": "string", "minLength": 1 },
    "candidate_id": { "type": ["string", "null"] },
    "api_name": { "type": ["string", "null"] },
    "source": { "type": "string" },
    "status": {
      "type": "string",
      "enum": ["canary_pending", "canary_passed", "failed"]
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["status"],
        "properties": {
          "name": { "type": "string" },
          "status": { "type": "string" },
          "message": { "type": "string" }
        },
        "additionalProperties": true
      }
    },
    "latency_ms": { "type": ["number", "null"], "minimum": 0 },
    "response_schema_hash": { "type": ["string", "null"] },
    "evidence_hash": { "type": "string", "minLength": 1 },
    "warnings": {
      "type": "array",
      "items": { "type": ["string", "object"] }
    },
    "public_boundary": {
      "type": "object",
      "required": [
        "test_call_only",
        "runtime_wrapper_published",
        "marketplace_listing_published",
        "x402_route_created",
        "provider_partnership_claimed",
        "raw_secret_stored"
      ],
      "properties": {
        "test_call_only": { "const": true },
        "runtime_wrapper_published": { "const": false },
        "marketplace_listing_published": { "const": false },
        "x402_route_created": { "const": false },
        "provider_partnership_claimed": { "const": false },
        "raw_secret_stored": { "const": false }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
