{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "clause"
      ],
      "properties": {
        "kind": {
          "const": "clause"
        },
        "clause": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "field",
            "operator",
            "value"
          ],
          "properties": {
            "field": {
              "type": "string",
              "enum": [
                "workspace",
                "interaction_type",
                "resource_type",
                "source_category",
                "agent",
                "recipient",
                "role",
                "status",
                "priority_band",
                "deadline_window",
                "age_days",
                "business_hours"
              ]
            },
            "operator": {
              "type": "string",
              "enum": [
                "is",
                "is_not",
                "in",
                "gte",
                "lte"
              ]
            },
            "value": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "maxItems": 12,
                  "items": {
                    "type": "string"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "conditions"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "all",
            "any"
          ]
        },
        "conditions": {
          "type": "array",
          "minItems": 1,
          "maxItems": 24,
          "items": {
            "$ref": "#/components/schemas/InboxAttentionPolicyCondition"
          }
        }
      }
    },
    {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "kind",
        "condition"
      ],
      "properties": {
        "kind": {
          "const": "not"
        },
        "condition": {
          "$ref": "#/components/schemas/InboxAttentionPolicyCondition"
        }
      }
    }
  ]
}