{
  "$defs": {
    "evidence_boundary": {
      "additionalProperties": false,
      "properties": {
        "evidence_class": {"const": "companion_local_receipt_only"},
        "host_request_owned": {"const": false},
        "provider_claim_authority": {"const": false},
        "provider_join_status": {"const": "missing"},
        "runtime_observer_present": {"const": false},
        "schema_version": {"const": "contextguard-receipt-evidence-boundary/v1"},
        "selected_branch": {"const": "S2-UNSUPPORTED"},
        "selected_transport": {"const": "NONE"},
        "stage1_evidence": {"const": false},
        "stage2_evidence": {"const": false}
      },
      "required": ["evidence_class", "host_request_owned", "provider_claim_authority", "provider_join_status", "runtime_observer_present", "schema_version", "selected_branch", "selected_transport", "stage1_evidence", "stage2_evidence"],
      "type": "object"
    }
  },
  "$id": "https://context-guard.local/schemas/evidence-reference-v1.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "artifact_kind": {"const": "evidence_reference"},
    "byte_length": {"maximum": 900000, "minimum": 0, "type": "integer"},
    "capability": {"pattern": "^cgr1p_[A-Za-z0-9_-]{43}$", "type": "string"},
    "content_sha256": {"pattern": "^[0-9a-f]{64}$", "type": "string"},
    "evidence_boundary": {"$ref": "#/$defs/evidence_boundary"},
    "router_policy_version": {"const": "contextguard-receipt-router/v1"},
    "schema_version": {"const": "contextguard-receipt-evidence-reference/v1"},
    "subject_identity_sha256": {"pattern": "^[0-9a-f]{64}$", "type": "string"}
  },
  "required": ["artifact_kind", "byte_length", "capability", "content_sha256", "evidence_boundary", "router_policy_version", "schema_version", "subject_identity_sha256"],
  "title": "Context Guard Receipt exact evidence reference",
  "type": "object"
}
