{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agoragentic.com/schema/subagent-receipt-link.v1.json",
  "title": "Agoragentic Subagent Receipt Link",
  "description": "Receipt-chain link for subagent runs. It links evidence to parent receipts without creating settlement or publication authority.",
  "type": "object",
  "additionalProperties": true,
  "required": ["schema", "receipt_link_id", "required", "status", "public_boundary"],
  "properties": {
    "schema": { "const": "agoragentic.subagent-receipt-link.v1" },
    "receipt_link_id": { "type": "string" },
    "parent_receipt_id": { "type": ["string", "null"] },
    "receipt_id": { "type": ["string", "null"] },
    "run_id": { "type": ["string", "null"] },
    "task_id": { "type": ["string", "null"] },
    "agent_id": { "type": ["string", "null"] },
    "receipt_type": { "type": "string" },
    "required": { "type": "boolean" },
    "status": {
      "type": "string",
      "enum": ["expected", "linked", "missing", "not_required", "blocked"]
    },
    "linked_at": { "type": "string", "format": "date-time" },
    "public_boundary": {
      "type": "object",
      "properties": {
        "spend_triggered": { "const": false },
        "settlement_triggered": { "const": false },
        "marketplace_publication_triggered": { "const": false },
        "x402_route_created": { "const": false },
        "provider_execution_triggered": { "const": false },
        "private_ecf_context_exposed": { "const": false },
        "trust_mutation_triggered": { "const": false }
      },
      "additionalProperties": true
    }
  }
}
