{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/agent-scorecard-evidence.v1.json",
  "title": "Agoragentic Agent Scorecard Evidence",
  "description": "Redacted evidence bundle for advisory Agent Scorecards. Raw prompts, private ECF payloads, raw private receipts, private tool outputs, wallet-private data, and internal trust weights are excluded.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "schema",
    "evidence_id",
    "target_type",
    "target_id",
    "evidence_state",
    "advisory_only",
    "private_context_excluded",
    "public_boundary",
    "created_at"
  ],
  "properties": {
    "schema": { "const": "agoragentic.agent-scorecard-evidence.v1" },
    "evidence_id": { "type": "string", "minLength": 1 },
    "target_type": { "type": "string" },
    "target_id": { "type": "string", "minLength": 1 },
    "run_id": { "type": ["string", "null"] },
    "deployment_id": { "type": ["string", "null"] },
    "workspace_id": { "type": ["string", "null"] },
    "receipt_refs": { "type": "array", "items": { "type": "string" } },
    "canary_receipt_refs": { "type": "array", "items": { "type": "string" } },
    "paid_canary_receipt_refs": { "type": "array", "items": { "type": "string" } },
    "failed_receipt_refs": { "type": "array", "items": { "type": "string" } },
    "has_receipt": { "type": "boolean" },
    "has_canary_receipt": { "type": "boolean" },
    "has_paid_canary_receipt": { "type": "boolean" },
    "outcome": { "type": "string" },
    "policy_violation_count": { "type": "integer", "minimum": 0 },
    "trap_block_count": { "type": "integer", "minimum": 0 },
    "private_context_exposed": { "type": "boolean" },
    "diagnostic_status": { "type": "string" },
    "memory_candidate_count": { "type": "integer", "minimum": 0 },
    "approved_memory_candidate_count": { "type": "integer", "minimum": 0 },
    "rejected_memory_candidate_count": { "type": "integer", "minimum": 0 },
    "blocked_memory_candidate_count": { "type": "integer", "minimum": 0 },
    "skill_candidate_count": { "type": "integer", "minimum": 0 },
    "metrics": { "type": "object", "additionalProperties": true },
    "run_summary_refs": { "type": "array", "items": { "type": "string" } },
    "evidence_state": { "type": "string", "enum": ["complete", "partial", "missing", "conflicting", "unknown"] },
    "public_safe": { "type": "boolean" },
    "private_context_excluded": { "const": true },
    "advisory_only": { "const": true },
    "redaction": {
      "type": "object",
      "properties": {
        "private_ecf_excluded": { "const": true },
        "raw_prompts_excluded": { "const": true },
        "raw_private_receipts_excluded": { "const": true },
        "private_tool_outputs_excluded": { "const": true },
        "wallet_private_data_excluded": { "const": true }
      },
      "additionalProperties": true
    },
    "public_boundary": {
      "type": "object",
      "properties": {
        "evidence_only": { "const": true },
        "raw_private_ecf_payload_included": { "const": false },
        "raw_prompt_included": { "const": false },
        "raw_private_receipt_payload_included": { "const": false },
        "raw_private_tool_output_included": { "const": false },
        "wallet_private_data_included": { "const": false },
        "target_mutated": { "const": false },
        "routing_weight_changed": { "const": false },
        "trust_mutated": { "const": false },
        "marketplace_publication_triggered": { "const": false },
        "x402_readiness_mutated": { "const": false },
        "settlement_triggered": { "const": false }
      },
      "additionalProperties": true
    },
    "created_at": { "type": "string", "format": "date-time" }
  }
}
