{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:awoooi:security-mirror-intake-plan-v1",
  "title": "AWOOOI Security Supply Chain Mirror Intake Plan (v1)",
  "description": "定義 AwoooP 初期如何以 mirror-only / read-only 方式消費 Security Supply Chain contracts。此契約不授權任何執行動作。",
  "type": "object",
  "required": [
    "schema_version",
    "status",
    "date",
    "mode",
    "runtime_execution_authorized",
    "source_indexes",
    "intake_waves",
    "acceptance_gates",
    "forbidden_actions"
  ],
  "properties": {
    "schema_version": {
      "const": "security_mirror_intake_plan_v1"
    },
    "status": {
      "type": "string",
      "enum": ["draft"]
    },
    "date": {
      "type": "string"
    },
    "mode": {
      "type": "string",
      "enum": ["mirror_only"]
    },
    "runtime_execution_authorized": {
      "type": "boolean",
      "const": false
    },
    "source_indexes": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "intake_waves": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "wave_id",
          "title",
          "contracts",
          "destinations",
          "allowed_processing",
          "blocked_processing",
          "exit_gate"
        ],
        "properties": {
          "wave_id": {"type": "string"},
          "title": {"type": "string"},
          "contracts": {
            "type": "array",
            "minItems": 1,
            "items": {"type": "string"},
            "uniqueItems": true
          },
          "destinations": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "operator_console",
                "runtime_state",
                "channel_event",
                "audit_evidence",
                "approval_queue"
              ]
            },
            "uniqueItems": true
          },
          "allowed_processing": {
            "type": "array",
            "items": {"type": "string"}
          },
          "blocked_processing": {
            "type": "array",
            "items": {"type": "string"}
          },
          "exit_gate": {"type": "string"}
        },
        "additionalProperties": false
      }
    },
    "acceptance_gates": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["gate_id", "requirement", "evidence_ref"],
        "properties": {
          "gate_id": {"type": "string"},
          "requirement": {"type": "string"},
          "evidence_ref": {"type": "string"}
        },
        "additionalProperties": false
      }
    },
    "forbidden_actions": {
      "type": "array",
      "items": {"type": "string"}
    }
  },
  "additionalProperties": false
}
