{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/runtime_event_proposal.schema.json",
  "title": "runtime_event_proposal.v1",
  "description": "task-2553+55 — input proposal candidate consumed by the bounded runtime-event enactor. This is the +54 runtime-event-loop result (envelope or inner) whose consolidated_summary_candidates / dispatch_candidates / quarantined_events are the proposal candidates. Every candidate is a PROPOSAL (authority=none); the enactor classifies it (consolidated_summary | closeout_candidate | next_dispatch_candidate | hold_packet) and enacts only authorized bounded actions. The enactor NEVER promotes a proposal to a merge/PR/branch/credential op; closeout is an additive artifact only.",
  "type": "object",
  "properties": {
    "schema": {"type": "string"},
    "authority": {
      "const": "none",
      "description": "The loop has zero authority — every candidate is a proposal."
    },
    "action_mode": {"const": "proposal"},
    "auto_executed": {"const": false},
    "result": {
      "type": "object",
      "description": "Inner runtime_event_loop_result.v1 when the envelope form is supplied."
    },
    "consolidated_summary_candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["schema", "authority", "action_mode", "status"],
        "properties": {
          "authority": {"const": "none"},
          "action_mode": {"const": "proposal"},
          "auto_executed": {"const": false},
          "status": {"const": "CONSOLIDATED_SUMMARY_CANDIDATE_READY"},
          "batch_id": {"type": "string"},
          "all_settled": {"type": "boolean"},
          "all_authoritative_pass": {"type": "boolean"},
          "track_states": {"type": "array", "items": {"type": "object"}}
        },
        "additionalProperties": true
      }
    },
    "dispatch_candidates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["schema", "authority", "action_mode", "auto_executed", "anu_key_owner_required"],
        "properties": {
          "authority": {"const": "none"},
          "action_mode": {"const": "proposal"},
          "auto_executed": {"const": false},
          "anu_key_owner_required": {"const": true},
          "anu_keys": {"type": "array", "items": {"type": "string"}},
          "next_phase": {"type": "object"},
          "callback_contract": {
            "type": "object",
            "description": "Optional prospective callback 4-tuple. The §2.6 triple (ANU-key owner + +49 owner/key guard + callback-mandatory contract) is verified against these fields; a missing/invalid contract -> proposal_only (never promoted).",
            "properties": {
              "executor_key": {"type": "string"},
              "collector_key": {"type": "string"},
              "collector_owner_key": {"type": "string"},
              "collector_role": {"type": "string"},
              "normal_collector_cron_id": {"type": "string"},
              "callback_mandatory": {"type": "boolean"}
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      }
    },
    "quarantined_events": {
      "type": "array",
      "description": "Self-chain / non-ANU / mismatch packets -> classified as hold_packet (Track C routing/verify-only).",
      "items": {"type": "object"}
    }
  },
  "additionalProperties": true
}
