{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/canary-replay-summary.v1.json",
  "title": "Agoragentic Canary Replay Summary",
  "description": "A summary-only marketplace-safe replay proof for listing canaries. Raw payloads are not included by default.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema",
    "listing_id",
    "canary_id",
    "status",
    "receipt_id",
    "summary_only",
    "raw_payloads_included",
    "exposure_mode"
  ],
  "properties": {
    "schema": {
      "const": "agoragentic.canary-replay-summary.v1"
    },
    "listing_id": { "type": "string" },
    "canary_id": { "type": "string" },
    "status": {
      "type": "string",
      "enum": ["canary_started", "canary_passed", "canary_failed", "canary_warning", "canary_insufficient_evidence"]
    },
    "receipt_id": { "type": "string" },
    "trust_state": {
      "type": ["string", "null"],
      "enum": ["verified", "reachable", "failed", null]
    },
    "latency_ms": { "type": ["number", "null"] },
    "cost_usdc": { "type": ["string", "number", "null"] },
    "schema_valid": { "type": ["boolean", "null"] },
    "policy_decision": {
      "type": ["string", "null"],
      "enum": ["allow", "allow_with_limits", "ask_owner", "ask_arbiter", "block", "not_applicable", null]
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "agent-os-replay-event.v1.json"
      }
    },
    "summary_only": {
      "const": true
    },
    "raw_payloads_included": {
      "const": false
    },
    "exposure_mode": {
      "const": "public_canary_summary"
    },
    "owner_detail_approval_required": {
      "type": "boolean",
      "default": true
    }
  }
}
